]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
Fixes for 6.3
authorSasha Levin <sashal@kernel.org>
Sat, 17 Jun 2023 00:33:38 +0000 (20:33 -0400)
committerSasha Levin <sashal@kernel.org>
Sat, 17 Jun 2023 00:33:38 +0000 (20:33 -0400)
Signed-off-by: Sasha Levin <sashal@kernel.org>
38 files changed:
queue-6.3/arm-dts-vexpress-add-missing-cache-properties.patch [new file with mode: 0644]
queue-6.3/arm64-dts-arm-add-missing-cache-properties.patch [new file with mode: 0644]
queue-6.3/asoc-cs35l41-fix-default-regmap-values-for-some-regi.patch [new file with mode: 0644]
queue-6.3/asoc-dwc-move-dma-init-to-snd_soc_dai_driver-probe.patch [new file with mode: 0644]
queue-6.3/asoc-intel-avs-account-for-uid-of-acpi-device.patch [new file with mode: 0644]
queue-6.3/asoc-intel-avs-add-missing-checks-on-fe-startup.patch [new file with mode: 0644]
queue-6.3/asoc-intel-avs-fix-avs_path_module-instance_id-size.patch [new file with mode: 0644]
queue-6.3/asoc-soc-pcm-test-if-a-be-can-be-prepared.patch [new file with mode: 0644]
queue-6.3/btrfs-handle-memory-allocation-failure-in-btrfs_csum.patch [new file with mode: 0644]
queue-6.3/btrfs-scrub-try-harder-to-mark-raid56-block-groups-r.patch [new file with mode: 0644]
queue-6.3/drm-amd-amdgpu-fix-missing-buffer-object-unlock-in-f.patch [new file with mode: 0644]
queue-6.3/drm-panel-orientation-quirks-change-air-s-quirk-to-s.patch [new file with mode: 0644]
queue-6.3/erofs-use-hipri-by-default-if-per-cpu-kthreads-are-e.patch [new file with mode: 0644]
queue-6.3/io_uring-unlock-sqd-lock-before-sq-thread-release-cp.patch [new file with mode: 0644]
queue-6.3/irqchip-gic-correctly-validate-of-quirk-descriptors.patch [new file with mode: 0644]
queue-6.3/irqchip-gic-v3-disable-pseudo-nmis-on-mediatek-devic.patch [new file with mode: 0644]
queue-6.3/irqchip-meson-gpio-mark-of-related-data-as-maybe-unu.patch [new file with mode: 0644]
queue-6.3/mips-alchemy-fix-dbdma2.patch [new file with mode: 0644]
queue-6.3/mips-move-initrd_start-check-after-initrd-address-sa.patch [new file with mode: 0644]
queue-6.3/mips-restore-au1300-support.patch [new file with mode: 0644]
queue-6.3/mips-unhide-pata_platform.patch [new file with mode: 0644]
queue-6.3/nvme-add-maxio-1602-to-bogus-nid-list.patch [new file with mode: 0644]
queue-6.3/of-overlay-fix-missing-of_node_put-in-error-case-of-.patch [new file with mode: 0644]
queue-6.3/parisc-flush-gatt-writes-and-adjust-gatt-mask-in-par.patch [new file with mode: 0644]
queue-6.3/parisc-improve-cache-flushing-for-pcxl-in-arch_sync_.patch [new file with mode: 0644]
queue-6.3/pci-dpc-quirk-pio-log-size-for-intel-ice-lake-root-p.patch [new file with mode: 0644]
queue-6.3/platform-x86-asus-wmi-ignore-wmi-events-with-codes-0.patch [new file with mode: 0644]
queue-6.3/power-supply-ab8500-fix-external_power_changed-race.patch [new file with mode: 0644]
queue-6.3/power-supply-bq27xxx-use-mod_delayed_work-instead-of.patch [new file with mode: 0644]
queue-6.3/power-supply-fix-logic-checking-if-system-is-running.patch [new file with mode: 0644]
queue-6.3/power-supply-ratelimit-no-data-debug-output.patch [new file with mode: 0644]
queue-6.3/power-supply-sc27xx-fix-external_power_changed-race.patch [new file with mode: 0644]
queue-6.3/regulator-fix-error-checking-for-debugfs_create_dir.patch [new file with mode: 0644]
queue-6.3/selftests-gpio-gpio-sim-fix-bug-test-failed-due-to-r.patch [new file with mode: 0644]
queue-6.3/series
queue-6.3/sfc-fix-devlink-info-error-handling.patch [new file with mode: 0644]
queue-6.3/tools-gpio-fix-debounce_period_us-output-of-lsgpio.patch [new file with mode: 0644]
queue-6.3/xen-blkfront-only-check-req_fua-for-writes.patch [new file with mode: 0644]

diff --git a/queue-6.3/arm-dts-vexpress-add-missing-cache-properties.patch b/queue-6.3/arm-dts-vexpress-add-missing-cache-properties.patch
new file mode 100644 (file)
index 0000000..72b28ca
--- /dev/null
@@ -0,0 +1,37 @@
+From 3662b5c573478b2aa9a0ff20775bb2c935e81a84 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Sun, 23 Apr 2023 17:08:37 +0200
+Subject: ARM: dts: vexpress: add missing cache properties
+
+From: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
+
+[ Upstream commit 328acc5657c6197753238d7ce0a6924ead829347 ]
+
+As all level 2 and level 3 caches are unified, add required
+cache-unified property to fix warnings like:
+
+  vexpress-v2p-ca5s.dtb: cache-controller@2c0f0000: 'cache-unified' is a required property
+
+Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
+Link: https://lore.kernel.org/r/20230423150837.118466-1-krzysztof.kozlowski@linaro.org
+Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ arch/arm/boot/dts/vexpress-v2p-ca5s.dts | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/arch/arm/boot/dts/vexpress-v2p-ca5s.dts b/arch/arm/boot/dts/vexpress-v2p-ca5s.dts
+index 3b88209bacea2..ff1f9a1bcfcfc 100644
+--- a/arch/arm/boot/dts/vexpress-v2p-ca5s.dts
++++ b/arch/arm/boot/dts/vexpress-v2p-ca5s.dts
+@@ -132,6 +132,7 @@ L2: cache-controller@2c0f0000 {
+               reg = <0x2c0f0000 0x1000>;
+               interrupts = <0 84 4>;
+               cache-level = <2>;
++              cache-unified;
+       };
+       pmu {
+-- 
+2.39.2
+
diff --git a/queue-6.3/arm64-dts-arm-add-missing-cache-properties.patch b/queue-6.3/arm64-dts-arm-add-missing-cache-properties.patch
new file mode 100644 (file)
index 0000000..34e33fa
--- /dev/null
@@ -0,0 +1,63 @@
+From fcf0f59ad5bf4d2e7c903e41317823cf352e8b46 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Sat, 22 Apr 2023 00:32:12 +0200
+Subject: arm64: dts: arm: add missing cache properties
+
+From: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
+
+[ Upstream commit 55b37d9c8ba23d28c584aef0801fb1e60e4a817c ]
+
+As all level 2 and level 3 caches are unified, add required
+cache-unified properties to fix warnings like:
+
+  foundation-v8.dtb: l2-cache0: 'cache-unified' is a required property
+
+Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
+Link: https://lore.kernel.org/r/20230421223213.115639-1-krzysztof.kozlowski@linaro.org
+Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ arch/arm64/boot/dts/arm/foundation-v8.dtsi           | 1 +
+ arch/arm64/boot/dts/arm/rtsm_ve-aemv8a.dts           | 1 +
+ arch/arm64/boot/dts/arm/vexpress-v2f-1xv7-ca53x2.dts | 1 +
+ 3 files changed, 3 insertions(+)
+
+diff --git a/arch/arm64/boot/dts/arm/foundation-v8.dtsi b/arch/arm64/boot/dts/arm/foundation-v8.dtsi
+index 029578072d8fb..7b41537731a6a 100644
+--- a/arch/arm64/boot/dts/arm/foundation-v8.dtsi
++++ b/arch/arm64/boot/dts/arm/foundation-v8.dtsi
+@@ -59,6 +59,7 @@ cpu3: cpu@3 {
+               L2_0: l2-cache0 {
+                       compatible = "cache";
+                       cache-level = <2>;
++                      cache-unified;
+               };
+       };
+diff --git a/arch/arm64/boot/dts/arm/rtsm_ve-aemv8a.dts b/arch/arm64/boot/dts/arm/rtsm_ve-aemv8a.dts
+index ef68f5aae7ddf..afdf954206f1d 100644
+--- a/arch/arm64/boot/dts/arm/rtsm_ve-aemv8a.dts
++++ b/arch/arm64/boot/dts/arm/rtsm_ve-aemv8a.dts
+@@ -72,6 +72,7 @@ cpu@3 {
+               L2_0: l2-cache0 {
+                       compatible = "cache";
+                       cache-level = <2>;
++                      cache-unified;
+               };
+       };
+diff --git a/arch/arm64/boot/dts/arm/vexpress-v2f-1xv7-ca53x2.dts b/arch/arm64/boot/dts/arm/vexpress-v2f-1xv7-ca53x2.dts
+index 796cd7d02eb55..7bdeb965f0a96 100644
+--- a/arch/arm64/boot/dts/arm/vexpress-v2f-1xv7-ca53x2.dts
++++ b/arch/arm64/boot/dts/arm/vexpress-v2f-1xv7-ca53x2.dts
+@@ -58,6 +58,7 @@ cpu@1 {
+               L2_0: l2-cache0 {
+                       compatible = "cache";
+                       cache-level = <2>;
++                      cache-unified;
+               };
+       };
+-- 
+2.39.2
+
diff --git a/queue-6.3/asoc-cs35l41-fix-default-regmap-values-for-some-regi.patch b/queue-6.3/asoc-cs35l41-fix-default-regmap-values-for-some-regi.patch
new file mode 100644 (file)
index 0000000..f4665f1
--- /dev/null
@@ -0,0 +1,47 @@
+From 571ba9418ff36a44376e982dc4a7130096360742 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Fri, 14 Apr 2023 16:25:51 +0100
+Subject: ASoC: cs35l41: Fix default regmap values for some registers
+
+From: Stefan Binding <sbinding@opensource.cirrus.com>
+
+[ Upstream commit e2d035f5a7d597bbabc268e236ec6c0408c4af0e ]
+
+Several values do not match the defaults of CS35L41, fix them.
+
+Signed-off-by: Stefan Binding <sbinding@opensource.cirrus.com>
+Acked-by: Mark Brown <broonie@kernel.org>
+Link: https://lore.kernel.org/r/20230414152552.574502-4-sbinding@opensource.cirrus.com
+Signed-off-by: Mark Brown <broonie@kernel.org>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ sound/soc/codecs/cs35l41-lib.c | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/sound/soc/codecs/cs35l41-lib.c b/sound/soc/codecs/cs35l41-lib.c
+index 04be71435491e..c2c56e5608094 100644
+--- a/sound/soc/codecs/cs35l41-lib.c
++++ b/sound/soc/codecs/cs35l41-lib.c
+@@ -46,7 +46,7 @@ static const struct reg_default cs35l41_reg[] = {
+       { CS35L41_DSP1_RX5_SRC,                 0x00000020 },
+       { CS35L41_DSP1_RX6_SRC,                 0x00000021 },
+       { CS35L41_DSP1_RX7_SRC,                 0x0000003A },
+-      { CS35L41_DSP1_RX8_SRC,                 0x00000001 },
++      { CS35L41_DSP1_RX8_SRC,                 0x0000003B },
+       { CS35L41_NGATE1_SRC,                   0x00000008 },
+       { CS35L41_NGATE2_SRC,                   0x00000009 },
+       { CS35L41_AMP_DIG_VOL_CTRL,             0x00008000 },
+@@ -58,8 +58,8 @@ static const struct reg_default cs35l41_reg[] = {
+       { CS35L41_IRQ1_MASK2,                   0xFFFFFFFF },
+       { CS35L41_IRQ1_MASK3,                   0xFFFF87FF },
+       { CS35L41_IRQ1_MASK4,                   0xFEFFFFFF },
+-      { CS35L41_GPIO1_CTRL1,                  0xE1000001 },
+-      { CS35L41_GPIO2_CTRL1,                  0xE1000001 },
++      { CS35L41_GPIO1_CTRL1,                  0x81000001 },
++      { CS35L41_GPIO2_CTRL1,                  0x81000001 },
+       { CS35L41_MIXER_NGATE_CFG,              0x00000000 },
+       { CS35L41_MIXER_NGATE_CH1_CFG,          0x00000303 },
+       { CS35L41_MIXER_NGATE_CH2_CFG,          0x00000303 },
+-- 
+2.39.2
+
diff --git a/queue-6.3/asoc-dwc-move-dma-init-to-snd_soc_dai_driver-probe.patch b/queue-6.3/asoc-dwc-move-dma-init-to-snd_soc_dai_driver-probe.patch
new file mode 100644 (file)
index 0000000..f2b9187
--- /dev/null
@@ -0,0 +1,146 @@
+From b447535a0cb6fecf4ca600dbc28432c06ff1433d Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Fri, 12 May 2023 14:03:42 +0300
+Subject: ASoC: dwc: move DMA init to snd_soc_dai_driver probe()
+
+From: Maxim Kochetkov <fido_max@inbox.ru>
+
+[ Upstream commit 011a8719d6105dcb48077ea7a6a88ac019d4aa50 ]
+
+When using DMA mode we are facing with Oops:
+[  396.458157] Unable to handle kernel access to user memory without uaccess routines at virtual address 000000000000000c
+[  396.469374] Oops [#1]
+[  396.471839] Modules linked in:
+[  396.475144] CPU: 0 PID: 114 Comm: arecord Not tainted 6.0.0-00164-g9a8eccdaf2be-dirty #68
+[  396.483619] Hardware name: YMP ELCT FPGA (DT)
+[  396.488156] epc : dmaengine_pcm_open+0x1d2/0x342
+[  396.493227]  ra : dmaengine_pcm_open+0x1d2/0x342
+[  396.498140] epc : ffffffff807fe346 ra : ffffffff807fe346 sp : ffffffc804e138f0
+[  396.505602]  gp : ffffffff817bf730 tp : ffffffd8042c8ac0 t0 : 6500000000000000
+[  396.513045]  t1 : 0000000000000064 t2 : 656e69676e65616d s0 : ffffffc804e13990
+[  396.520477]  s1 : ffffffd801b86a18 a0 : 0000000000000026 a1 : ffffffff816920f8
+[  396.527897]  a2 : 0000000000000010 a3 : fffffffffffffffe a4 : 0000000000000000
+[  396.535319]  a5 : 0000000000000000 a6 : ffffffd801b87040 a7 : 0000000000000038
+[  396.542740]  s2 : ffffffd801b94a00 s3 : 0000000000000000 s4 : ffffffd80427f5e8
+[  396.550153]  s5 : ffffffd80427f5e8 s6 : ffffffd801b44410 s7 : fffffffffffffff5
+[  396.557569]  s8 : 0000000000000800 s9 : 0000000000000001 s10: ffffffff8066d254
+[  396.564978]  s11: ffffffd8059cf768 t3 : ffffffff817d5577 t4 : ffffffff817d5577
+[  396.572391]  t5 : ffffffff817d5578 t6 : ffffffc804e136e8
+[  396.577876] status: 0000000200000120 badaddr: 000000000000000c cause: 000000000000000d
+[  396.586007] [<ffffffff806839f4>] snd_soc_component_open+0x1a/0x68
+[  396.592439] [<ffffffff807fdd62>] __soc_pcm_open+0xf0/0x502
+[  396.598217] [<ffffffff80685d86>] soc_pcm_open+0x2e/0x4e
+[  396.603741] [<ffffffff8066cea4>] snd_pcm_open_substream+0x442/0x68e
+[  396.610313] [<ffffffff8066d1ea>] snd_pcm_open+0xfa/0x212
+[  396.615868] [<ffffffff8066d39c>] snd_pcm_capture_open+0x3a/0x60
+[  396.622048] [<ffffffff8065b35a>] snd_open+0xa8/0x17a
+[  396.627421] [<ffffffff801ae036>] chrdev_open+0xa0/0x218
+[  396.632893] [<ffffffff801a5a28>] do_dentry_open+0x17c/0x2a6
+[  396.638713] [<ffffffff801a6d9a>] vfs_open+0x1e/0x26
+[  396.643850] [<ffffffff801b8544>] path_openat+0x96e/0xc96
+[  396.649518] [<ffffffff801b9390>] do_filp_open+0x7c/0xf6
+[  396.655034] [<ffffffff801a6ff2>] do_sys_openat2+0x8a/0x11e
+[  396.660765] [<ffffffff801a735a>] sys_openat+0x50/0x7c
+[  396.666068] [<ffffffff80003aca>] ret_from_syscall+0x0/0x2
+[  396.674964] ---[ end trace 0000000000000000 ]---
+
+It happens because of play_dma_data/capture_dma_data pointers are NULL.
+Current implementation assigns these pointers at snd_soc_dai_driver
+startup() callback and reset them back to NULL at shutdown(). But
+soc_pcm_open() sequence uses DMA pointers in dmaengine_pcm_open()
+before snd_soc_dai_driver startup().
+Most generic DMA capable I2S drivers use snd_soc_dai_driver probe()
+callback to init DMA pointers only once at probe. So move DMA init
+to dw_i2s_dai_probe and drop shutdown() and startup() callbacks.
+
+Signed-off-by: Maxim Kochetkov <fido_max@inbox.ru>
+Link: https://lore.kernel.org/r/20230512110343.66664-1-fido_max@inbox.ru
+Signed-off-by: Mark Brown <broonie@kernel.org>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ sound/soc/dwc/dwc-i2s.c | 41 +++++++++--------------------------------
+ 1 file changed, 9 insertions(+), 32 deletions(-)
+
+diff --git a/sound/soc/dwc/dwc-i2s.c b/sound/soc/dwc/dwc-i2s.c
+index 3496301582b22..f966d39c5c907 100644
+--- a/sound/soc/dwc/dwc-i2s.c
++++ b/sound/soc/dwc/dwc-i2s.c
+@@ -183,30 +183,6 @@ static void i2s_stop(struct dw_i2s_dev *dev,
+       }
+ }
+-static int dw_i2s_startup(struct snd_pcm_substream *substream,
+-              struct snd_soc_dai *cpu_dai)
+-{
+-      struct dw_i2s_dev *dev = snd_soc_dai_get_drvdata(cpu_dai);
+-      union dw_i2s_snd_dma_data *dma_data = NULL;
+-
+-      if (!(dev->capability & DWC_I2S_RECORD) &&
+-                      (substream->stream == SNDRV_PCM_STREAM_CAPTURE))
+-              return -EINVAL;
+-
+-      if (!(dev->capability & DWC_I2S_PLAY) &&
+-                      (substream->stream == SNDRV_PCM_STREAM_PLAYBACK))
+-              return -EINVAL;
+-
+-      if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK)
+-              dma_data = &dev->play_dma_data;
+-      else if (substream->stream == SNDRV_PCM_STREAM_CAPTURE)
+-              dma_data = &dev->capture_dma_data;
+-
+-      snd_soc_dai_set_dma_data(cpu_dai, substream, (void *)dma_data);
+-
+-      return 0;
+-}
+-
+ static void dw_i2s_config(struct dw_i2s_dev *dev, int stream)
+ {
+       u32 ch_reg;
+@@ -305,12 +281,6 @@ static int dw_i2s_hw_params(struct snd_pcm_substream *substream,
+       return 0;
+ }
+-static void dw_i2s_shutdown(struct snd_pcm_substream *substream,
+-              struct snd_soc_dai *dai)
+-{
+-      snd_soc_dai_set_dma_data(dai, substream, NULL);
+-}
+-
+ static int dw_i2s_prepare(struct snd_pcm_substream *substream,
+                         struct snd_soc_dai *dai)
+ {
+@@ -382,8 +352,6 @@ static int dw_i2s_set_fmt(struct snd_soc_dai *cpu_dai, unsigned int fmt)
+ }
+ static const struct snd_soc_dai_ops dw_i2s_dai_ops = {
+-      .startup        = dw_i2s_startup,
+-      .shutdown       = dw_i2s_shutdown,
+       .hw_params      = dw_i2s_hw_params,
+       .prepare        = dw_i2s_prepare,
+       .trigger        = dw_i2s_trigger,
+@@ -625,6 +593,14 @@ static int dw_configure_dai_by_dt(struct dw_i2s_dev *dev,
+ }
++static int dw_i2s_dai_probe(struct snd_soc_dai *dai)
++{
++      struct dw_i2s_dev *dev = snd_soc_dai_get_drvdata(dai);
++
++      snd_soc_dai_init_dma_data(dai, &dev->play_dma_data, &dev->capture_dma_data);
++      return 0;
++}
++
+ static int dw_i2s_probe(struct platform_device *pdev)
+ {
+       const struct i2s_platform_data *pdata = pdev->dev.platform_data;
+@@ -643,6 +619,7 @@ static int dw_i2s_probe(struct platform_device *pdev)
+               return -ENOMEM;
+       dw_i2s_dai->ops = &dw_i2s_dai_ops;
++      dw_i2s_dai->probe = dw_i2s_dai_probe;
+       dev->i2s_base = devm_platform_get_and_ioremap_resource(pdev, 0, &res);
+       if (IS_ERR(dev->i2s_base))
+-- 
+2.39.2
+
diff --git a/queue-6.3/asoc-intel-avs-account-for-uid-of-acpi-device.patch b/queue-6.3/asoc-intel-avs-account-for-uid-of-acpi-device.patch
new file mode 100644 (file)
index 0000000..9dae654
--- /dev/null
@@ -0,0 +1,56 @@
+From df0e70d2e39aed5806f737226bc0c4a5169dbc40 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Fri, 19 May 2023 22:17:09 +0200
+Subject: ASoC: Intel: avs: Account for UID of ACPI device
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+From: Cezary Rojewski <cezary.rojewski@intel.com>
+
+[ Upstream commit 836855100b87b4dd7a82546131779dc255c18b67 ]
+
+Configurations with multiple codecs attached to the platform are
+supported but only if each from the set is different. Add new field
+representing the 'Unique ID' so that codecs that share Vendor and Part
+IDs can be differentiated and thus enabling support for such
+configurations.
+
+Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com>
+Signed-off-by: Amadeusz SÅ‚awiÅ„ski <amadeuszx.slawinski@linux.intel.com>
+Link: https://lore.kernel.org/r/20230519201711.4073845-6-amadeuszx.slawinski@linux.intel.com
+Signed-off-by: Mark Brown <broonie@kernel.org>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ include/sound/soc-acpi.h              | 1 +
+ sound/soc/intel/avs/board_selection.c | 2 +-
+ 2 files changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/include/sound/soc-acpi.h b/include/sound/soc-acpi.h
+index b38fd25c57295..528279056b3ab 100644
+--- a/include/sound/soc-acpi.h
++++ b/include/sound/soc-acpi.h
+@@ -170,6 +170,7 @@ struct snd_soc_acpi_link_adr {
+ /* Descriptor for SST ASoC machine driver */
+ struct snd_soc_acpi_mach {
+       u8 id[ACPI_ID_LEN];
++      const char *uid;
+       const struct snd_soc_acpi_codecs *comp_ids;
+       const u32 link_mask;
+       const struct snd_soc_acpi_link_adr *links;
+diff --git a/sound/soc/intel/avs/board_selection.c b/sound/soc/intel/avs/board_selection.c
+index b2823c2107f77..60f8fb0bff95b 100644
+--- a/sound/soc/intel/avs/board_selection.c
++++ b/sound/soc/intel/avs/board_selection.c
+@@ -443,7 +443,7 @@ static int avs_register_i2s_boards(struct avs_dev *adev)
+       }
+       for (mach = boards->machs; mach->id[0]; mach++) {
+-              if (!acpi_dev_present(mach->id, NULL, -1))
++              if (!acpi_dev_present(mach->id, mach->uid, -1))
+                       continue;
+               if (mach->machine_quirk)
+-- 
+2.39.2
+
diff --git a/queue-6.3/asoc-intel-avs-add-missing-checks-on-fe-startup.patch b/queue-6.3/asoc-intel-avs-add-missing-checks-on-fe-startup.patch
new file mode 100644 (file)
index 0000000..c1fa583
--- /dev/null
@@ -0,0 +1,71 @@
+From c88651e11a9358163e0f1b4dffbd410b8f5cfec3 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Fri, 19 May 2023 22:17:11 +0200
+Subject: ASoC: Intel: avs: Add missing checks on FE startup
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+From: Amadeusz SÅ‚awiÅ„ski <amadeuszx.slawinski@linux.intel.com>
+
+[ Upstream commit 25148f57a2a6d157779bae494852e172952ba980 ]
+
+Constraint functions have return values, they should be checked for
+potential errors.
+
+Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com>
+Signed-off-by: Amadeusz SÅ‚awiÅ„ski <amadeuszx.slawinski@linux.intel.com>
+Link: https://lore.kernel.org/r/20230519201711.4073845-8-amadeuszx.slawinski@linux.intel.com
+Signed-off-by: Mark Brown <broonie@kernel.org>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ sound/soc/intel/avs/pcm.c | 23 ++++++++++++++++++-----
+ 1 file changed, 18 insertions(+), 5 deletions(-)
+
+diff --git a/sound/soc/intel/avs/pcm.c b/sound/soc/intel/avs/pcm.c
+index 31c032a0f7e4b..1fbb2c2fadb55 100644
+--- a/sound/soc/intel/avs/pcm.c
++++ b/sound/soc/intel/avs/pcm.c
+@@ -468,21 +468,34 @@ static int avs_dai_fe_startup(struct snd_pcm_substream *substream, struct snd_so
+       host_stream = snd_hdac_ext_stream_assign(bus, substream, HDAC_EXT_STREAM_TYPE_HOST);
+       if (!host_stream) {
+-              kfree(data);
+-              return -EBUSY;
++              ret = -EBUSY;
++              goto err;
+       }
+       data->host_stream = host_stream;
+-      snd_pcm_hw_constraint_integer(runtime, SNDRV_PCM_HW_PARAM_PERIODS);
++      ret = snd_pcm_hw_constraint_integer(runtime, SNDRV_PCM_HW_PARAM_PERIODS);
++      if (ret < 0)
++              goto err;
++
+       /* avoid wrap-around with wall-clock */
+-      snd_pcm_hw_constraint_minmax(runtime, SNDRV_PCM_HW_PARAM_BUFFER_TIME, 20, 178000000);
+-      snd_pcm_hw_constraint_list(runtime, 0, SNDRV_PCM_HW_PARAM_RATE, &hw_rates);
++      ret = snd_pcm_hw_constraint_minmax(runtime, SNDRV_PCM_HW_PARAM_BUFFER_TIME, 20, 178000000);
++      if (ret < 0)
++              goto err;
++
++      ret = snd_pcm_hw_constraint_list(runtime, 0, SNDRV_PCM_HW_PARAM_RATE, &hw_rates);
++      if (ret < 0)
++              goto err;
++
+       snd_pcm_set_sync(substream);
+       dev_dbg(dai->dev, "%s fe STARTUP tag %d str %p",
+               __func__, hdac_stream(host_stream)->stream_tag, substream);
+       return 0;
++
++err:
++      kfree(data);
++      return ret;
+ }
+ static void avs_dai_fe_shutdown(struct snd_pcm_substream *substream, struct snd_soc_dai *dai)
+-- 
+2.39.2
+
diff --git a/queue-6.3/asoc-intel-avs-fix-avs_path_module-instance_id-size.patch b/queue-6.3/asoc-intel-avs-fix-avs_path_module-instance_id-size.patch
new file mode 100644 (file)
index 0000000..fb9f211
--- /dev/null
@@ -0,0 +1,94 @@
+From ff63b28dd4cb8ca6b2f53f63ff9bd3686e716fbb Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Fri, 19 May 2023 22:17:10 +0200
+Subject: ASoC: Intel: avs: Fix avs_path_module::instance_id size
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+From: Amadeusz SÅ‚awiÅ„ski <amadeuszx.slawinski@linux.intel.com>
+
+[ Upstream commit 320f4d868b83a804e3a4bd61a5b7d0f1db66380e ]
+
+All IPCs using instance_id use 8 bit value. Original commit used 16 bit
+value because FW reports possible max value in 16 bit field, but in
+practice FW limits the value to 8 bits.
+
+Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com>
+Signed-off-by: Amadeusz SÅ‚awiÅ„ski <amadeuszx.slawinski@linux.intel.com>
+Link: https://lore.kernel.org/r/20230519201711.4073845-7-amadeuszx.slawinski@linux.intel.com
+Signed-off-by: Mark Brown <broonie@kernel.org>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ sound/soc/intel/avs/avs.h    | 4 ++--
+ sound/soc/intel/avs/dsp.c    | 4 ++--
+ sound/soc/intel/avs/path.h   | 2 +-
+ sound/soc/intel/avs/probes.c | 2 +-
+ 4 files changed, 6 insertions(+), 6 deletions(-)
+
+diff --git a/sound/soc/intel/avs/avs.h b/sound/soc/intel/avs/avs.h
+index d7fccdcb9c167..0cf38c9e768e7 100644
+--- a/sound/soc/intel/avs/avs.h
++++ b/sound/soc/intel/avs/avs.h
+@@ -283,8 +283,8 @@ void avs_release_firmwares(struct avs_dev *adev);
+ int avs_dsp_init_module(struct avs_dev *adev, u16 module_id, u8 ppl_instance_id,
+                       u8 core_id, u8 domain, void *param, u32 param_size,
+-                      u16 *instance_id);
+-void avs_dsp_delete_module(struct avs_dev *adev, u16 module_id, u16 instance_id,
++                      u8 *instance_id);
++void avs_dsp_delete_module(struct avs_dev *adev, u16 module_id, u8 instance_id,
+                          u8 ppl_instance_id, u8 core_id);
+ int avs_dsp_create_pipeline(struct avs_dev *adev, u16 req_size, u8 priority,
+                           bool lp, u16 attributes, u8 *instance_id);
+diff --git a/sound/soc/intel/avs/dsp.c b/sound/soc/intel/avs/dsp.c
+index b881100d3e02a..aa03af4473e94 100644
+--- a/sound/soc/intel/avs/dsp.c
++++ b/sound/soc/intel/avs/dsp.c
+@@ -225,7 +225,7 @@ static int avs_dsp_put_core(struct avs_dev *adev, u32 core_id)
+ int avs_dsp_init_module(struct avs_dev *adev, u16 module_id, u8 ppl_instance_id,
+                       u8 core_id, u8 domain, void *param, u32 param_size,
+-                      u16 *instance_id)
++                      u8 *instance_id)
+ {
+       struct avs_module_entry mentry;
+       bool was_loaded = false;
+@@ -272,7 +272,7 @@ int avs_dsp_init_module(struct avs_dev *adev, u16 module_id, u8 ppl_instance_id,
+       return ret;
+ }
+-void avs_dsp_delete_module(struct avs_dev *adev, u16 module_id, u16 instance_id,
++void avs_dsp_delete_module(struct avs_dev *adev, u16 module_id, u8 instance_id,
+                          u8 ppl_instance_id, u8 core_id)
+ {
+       struct avs_module_entry mentry;
+diff --git a/sound/soc/intel/avs/path.h b/sound/soc/intel/avs/path.h
+index 197222c5e008e..657f7b093e805 100644
+--- a/sound/soc/intel/avs/path.h
++++ b/sound/soc/intel/avs/path.h
+@@ -37,7 +37,7 @@ struct avs_path_pipeline {
+ struct avs_path_module {
+       u16 module_id;
+-      u16 instance_id;
++      u8 instance_id;
+       union avs_gtw_attributes gtw_attrs;
+       struct avs_tplg_module *template;
+diff --git a/sound/soc/intel/avs/probes.c b/sound/soc/intel/avs/probes.c
+index 70a94201d6a56..275928281c6c6 100644
+--- a/sound/soc/intel/avs/probes.c
++++ b/sound/soc/intel/avs/probes.c
+@@ -18,7 +18,7 @@ static int avs_dsp_init_probe(struct avs_dev *adev, union avs_connector_node_id
+ {
+       struct avs_probe_cfg cfg = {{0}};
+       struct avs_module_entry mentry;
+-      u16 dummy;
++      u8 dummy;
+       avs_get_module_entry(adev, &AVS_PROBE_MOD_UUID, &mentry);
+-- 
+2.39.2
+
diff --git a/queue-6.3/asoc-soc-pcm-test-if-a-be-can-be-prepared.patch b/queue-6.3/asoc-soc-pcm-test-if-a-be-can-be-prepared.patch
new file mode 100644 (file)
index 0000000..aa36798
--- /dev/null
@@ -0,0 +1,93 @@
+From 6ce9d25732c0cc5777aa8e116b4d4db53485ef64 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Wed, 17 May 2023 13:57:31 -0500
+Subject: ASoC: soc-pcm: test if a BE can be prepared
+
+From: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
+
+[ Upstream commit e123036be377ddf628226a7c6d4f9af5efd113d3 ]
+
+In the BE hw_params configuration, the existing code checks if any of the
+existing FEs are prepared, running, paused or suspended - and skips the
+configuration in those cases. This allows multiple calls of hw_params
+which the ALSA state machine supports.
+
+This check is not handled for the prepare stage, which can lead to the
+same BE being prepared multiple times. This patch adds a check similar to
+that of the hw_params, with the main difference being that the suspended
+state is allowed: the ALSA state machine allows a transition from
+suspended to prepared with hw_params skipped.
+
+This problem was detected on Intel IPC4/SoundWire devices, where the BE
+dailink .prepare stage is used to configure the SoundWire stream with a
+bank switch. Multiple .prepare calls lead to conflicts with the .trigger
+operation with IPC4 configurations. This problem was not detected earlier
+on Intel devices, HDaudio BE dailinks detect that the link is already
+prepared and skip the configuration, and for IPC3 devices there is no BE
+trigger.
+
+Link: https://github.com/thesofproject/sof/issues/7596
+Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com
+Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com
+Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com
+Link: https://lore.kernel.org/r/20230517185731.487124-1-pierre-louis.bossart@linux.intel.com
+Signed-off-by: Mark Brown <broonie@kernel.org
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ include/sound/soc-dpcm.h |  4 ++++
+ sound/soc/soc-pcm.c      | 20 ++++++++++++++++++++
+ 2 files changed, 24 insertions(+)
+
+diff --git a/include/sound/soc-dpcm.h b/include/sound/soc-dpcm.h
+index 1e7d09556fe3e..b7bc1865b9e4a 100644
+--- a/include/sound/soc-dpcm.h
++++ b/include/sound/soc-dpcm.h
+@@ -123,6 +123,10 @@ int snd_soc_dpcm_can_be_free_stop(struct snd_soc_pcm_runtime *fe,
+ int snd_soc_dpcm_can_be_params(struct snd_soc_pcm_runtime *fe,
+               struct snd_soc_pcm_runtime *be, int stream);
++/* can this BE perform prepare */
++int snd_soc_dpcm_can_be_prepared(struct snd_soc_pcm_runtime *fe,
++                               struct snd_soc_pcm_runtime *be, int stream);
++
+ /* is the current PCM operation for this FE ? */
+ int snd_soc_dpcm_fe_can_update(struct snd_soc_pcm_runtime *fe, int stream);
+diff --git a/sound/soc/soc-pcm.c b/sound/soc/soc-pcm.c
+index 7958c9defd492..1db82501fec18 100644
+--- a/sound/soc/soc-pcm.c
++++ b/sound/soc/soc-pcm.c
+@@ -2417,6 +2417,9 @@ int dpcm_be_dai_prepare(struct snd_soc_pcm_runtime *fe, int stream)
+               if (!snd_soc_dpcm_be_can_update(fe, be, stream))
+                       continue;
++              if (!snd_soc_dpcm_can_be_prepared(fe, be, stream))
++                      continue;
++
+               if ((be->dpcm[stream].state != SND_SOC_DPCM_STATE_HW_PARAMS) &&
+                   (be->dpcm[stream].state != SND_SOC_DPCM_STATE_STOP) &&
+                   (be->dpcm[stream].state != SND_SOC_DPCM_STATE_SUSPEND) &&
+@@ -3057,3 +3060,20 @@ int snd_soc_dpcm_can_be_params(struct snd_soc_pcm_runtime *fe,
+       return snd_soc_dpcm_check_state(fe, be, stream, state, ARRAY_SIZE(state));
+ }
+ EXPORT_SYMBOL_GPL(snd_soc_dpcm_can_be_params);
++
++/*
++ * We can only prepare a BE DAI if any of it's FE are not prepared,
++ * running or paused for the specified stream direction.
++ */
++int snd_soc_dpcm_can_be_prepared(struct snd_soc_pcm_runtime *fe,
++                               struct snd_soc_pcm_runtime *be, int stream)
++{
++      const enum snd_soc_dpcm_state state[] = {
++              SND_SOC_DPCM_STATE_START,
++              SND_SOC_DPCM_STATE_PAUSED,
++              SND_SOC_DPCM_STATE_PREPARE,
++      };
++
++      return snd_soc_dpcm_check_state(fe, be, stream, state, ARRAY_SIZE(state));
++}
++EXPORT_SYMBOL_GPL(snd_soc_dpcm_can_be_prepared);
+-- 
+2.39.2
+
diff --git a/queue-6.3/btrfs-handle-memory-allocation-failure-in-btrfs_csum.patch b/queue-6.3/btrfs-handle-memory-allocation-failure-in-btrfs_csum.patch
new file mode 100644 (file)
index 0000000..e0ae348
--- /dev/null
@@ -0,0 +1,48 @@
+From 5e561b2044a7a50df7c05016ce7f3b22162a00f3 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Thu, 4 May 2023 13:58:13 +0200
+Subject: btrfs: handle memory allocation failure in btrfs_csum_one_bio
+
+From: Johannes Thumshirn <johannes.thumshirn@wdc.com>
+
+[ Upstream commit 806570c0bb7b4847828c22c4934fcf2dc8fc572f ]
+
+Since f8a53bb58ec7 ("btrfs: handle checksum generation in the storage
+layer") the failures of btrfs_csum_one_bio() are handled via
+bio_end_io().
+
+This means, we can return BLK_STS_RESOURCE from btrfs_csum_one_bio() in
+case the allocation of the ordered sums fails.
+
+This also fixes a syzkaller report, where injecting a failure into the
+kvzalloc() call results in a BUG_ON().
+
+Reported-by: syzbot+d8941552e21eac774778@syzkaller.appspotmail.com
+Reviewed-by: Christoph Hellwig <hch@lst.de>
+Reviewed-by: Anand Jain <anand.jain@oracle.com>
+Signed-off-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
+Reviewed-by: David Sterba <dsterba@suse.com>
+Signed-off-by: David Sterba <dsterba@suse.com>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ fs/btrfs/file-item.c | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/fs/btrfs/file-item.c b/fs/btrfs/file-item.c
+index a4584c629ba35..9e45b416a9c85 100644
+--- a/fs/btrfs/file-item.c
++++ b/fs/btrfs/file-item.c
+@@ -847,7 +847,9 @@ blk_status_t btrfs_csum_one_bio(struct btrfs_bio *bbio)
+                               sums = kvzalloc(btrfs_ordered_sum_size(fs_info,
+                                                     bytes_left), GFP_KERNEL);
+                               memalloc_nofs_restore(nofs_flag);
+-                              BUG_ON(!sums); /* -ENOMEM */
++                              if (!sums)
++                                      return BLK_STS_RESOURCE;
++
+                               sums->len = bytes_left;
+                               ordered = btrfs_lookup_ordered_extent(inode,
+                                                               offset);
+-- 
+2.39.2
+
diff --git a/queue-6.3/btrfs-scrub-try-harder-to-mark-raid56-block-groups-r.patch b/queue-6.3/btrfs-scrub-try-harder-to-mark-raid56-block-groups-r.patch
new file mode 100644 (file)
index 0000000..f3bbc55
--- /dev/null
@@ -0,0 +1,95 @@
+From aab81ca6981b517ca707675d767e5e886853e7fc Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Thu, 13 Apr 2023 13:57:17 +0800
+Subject: btrfs: scrub: try harder to mark RAID56 block groups read-only
+
+From: Qu Wenruo <wqu@suse.com>
+
+[ Upstream commit 7561551e7ba870b9659083b95feb520fb2dacce3 ]
+
+Currently we allow a block group not to be marked read-only for scrub.
+
+But for RAID56 block groups if we require the block group to be
+read-only, then we're allowed to use cached content from scrub stripe to
+reduce unnecessary RAID56 reads.
+
+So this patch would:
+
+- Make btrfs_inc_block_group_ro() try harder
+  During my tests, for cases like btrfs/061 and btrfs/064, we can hit
+  ENOSPC from btrfs_inc_block_group_ro() calls during scrub.
+
+  The reason is if we only have one single data chunk, and trying to
+  scrub it, we won't have any space left for any newer data writes.
+
+  But this check should be done by the caller, especially for scrub
+  cases we only temporarily mark the chunk read-only.
+  And newer data writes would always try to allocate a new data chunk
+  when needed.
+
+- Return error for scrub if we failed to mark a RAID56 chunk read-only
+
+Signed-off-by: Qu Wenruo <wqu@suse.com>
+Signed-off-by: David Sterba <dsterba@suse.com>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ fs/btrfs/block-group.c | 14 ++++++++++++--
+ fs/btrfs/scrub.c       |  9 ++++++++-
+ 2 files changed, 20 insertions(+), 3 deletions(-)
+
+diff --git a/fs/btrfs/block-group.c b/fs/btrfs/block-group.c
+index 5fc670c27f864..58ce5d44ce4d5 100644
+--- a/fs/btrfs/block-group.c
++++ b/fs/btrfs/block-group.c
+@@ -2832,10 +2832,20 @@ int btrfs_inc_block_group_ro(struct btrfs_block_group *cache,
+       }
+       ret = inc_block_group_ro(cache, 0);
+-      if (!do_chunk_alloc || ret == -ETXTBSY)
+-              goto unlock_out;
+       if (!ret)
+               goto out;
++      if (ret == -ETXTBSY)
++              goto unlock_out;
++
++      /*
++       * Skip chunk alloction if the bg is SYSTEM, this is to avoid system
++       * chunk allocation storm to exhaust the system chunk array.  Otherwise
++       * we still want to try our best to mark the block group read-only.
++       */
++      if (!do_chunk_alloc && ret == -ENOSPC &&
++          (cache->flags & BTRFS_BLOCK_GROUP_SYSTEM))
++              goto unlock_out;
++
+       alloc_flags = btrfs_get_alloc_profile(fs_info, cache->space_info->flags);
+       ret = btrfs_chunk_alloc(trans, alloc_flags, CHUNK_ALLOC_FORCE);
+       if (ret < 0)
+diff --git a/fs/btrfs/scrub.c b/fs/btrfs/scrub.c
+index 69c93ae333f63..3720fd1f593d2 100644
+--- a/fs/btrfs/scrub.c
++++ b/fs/btrfs/scrub.c
+@@ -4034,13 +4034,20 @@ int scrub_enumerate_chunks(struct scrub_ctx *sctx,
+               if (ret == 0) {
+                       ro_set = 1;
+-              } else if (ret == -ENOSPC && !sctx->is_dev_replace) {
++              } else if (ret == -ENOSPC && !sctx->is_dev_replace &&
++                         !(cache->flags & BTRFS_BLOCK_GROUP_RAID56_MASK)) {
+                       /*
+                        * btrfs_inc_block_group_ro return -ENOSPC when it
+                        * failed in creating new chunk for metadata.
+                        * It is not a problem for scrub, because
+                        * metadata are always cowed, and our scrub paused
+                        * commit_transactions.
++                       *
++                       * For RAID56 chunks, we have to mark them read-only
++                       * for scrub, as later we would use our own cache
++                       * out of RAID56 realm.
++                       * Thus we want the RAID56 bg to be marked RO to
++                       * prevent RMW from screwing up out cache.
+                        */
+                       ro_set = 0;
+               } else if (ret == -ETXTBSY) {
+-- 
+2.39.2
+
diff --git a/queue-6.3/drm-amd-amdgpu-fix-missing-buffer-object-unlock-in-f.patch b/queue-6.3/drm-amd-amdgpu-fix-missing-buffer-object-unlock-in-f.patch
new file mode 100644 (file)
index 0000000..00367fa
--- /dev/null
@@ -0,0 +1,59 @@
+From 488adfa827d90161d82e4771a8d132cf3ab4f63d Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Wed, 3 May 2023 16:15:07 -0700
+Subject: drm:amd:amdgpu: Fix missing buffer object unlock in failure path
+
+From: Sukrut Bellary <sukrut.bellary@linux.com>
+
+[ Upstream commit 60ecaaf54886b0642d5c4744f7fbf1ff0d6b3e42 ]
+
+smatch warning -
+1) drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c:3615 gfx_v9_0_kiq_resume()
+warn: inconsistent returns 'ring->mqd_obj->tbo.base.resv'.
+
+2) drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c:6901 gfx_v10_0_kiq_resume()
+warn: inconsistent returns 'ring->mqd_obj->tbo.base.resv'.
+
+Signed-off-by: Sukrut Bellary <sukrut.bellary@linux.com>
+Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c | 4 +++-
+ drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c  | 4 +++-
+ 2 files changed, 6 insertions(+), 2 deletions(-)
+
+diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c
+index b1428068fef7f..8144d6693541e 100644
+--- a/drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c
++++ b/drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c
+@@ -6890,8 +6890,10 @@ static int gfx_v10_0_kiq_resume(struct amdgpu_device *adev)
+               return r;
+       r = amdgpu_bo_kmap(ring->mqd_obj, (void **)&ring->mqd_ptr);
+-      if (unlikely(r != 0))
++      if (unlikely(r != 0)) {
++              amdgpu_bo_unreserve(ring->mqd_obj);
+               return r;
++      }
+       gfx_v10_0_kiq_init_queue(ring);
+       amdgpu_bo_kunmap(ring->mqd_obj);
+diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c
+index c54d05bdc2d8c..7b1a359ab0849 100644
+--- a/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c
++++ b/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c
+@@ -3604,8 +3604,10 @@ static int gfx_v9_0_kiq_resume(struct amdgpu_device *adev)
+               return r;
+       r = amdgpu_bo_kmap(ring->mqd_obj, (void **)&ring->mqd_ptr);
+-      if (unlikely(r != 0))
++      if (unlikely(r != 0)) {
++              amdgpu_bo_unreserve(ring->mqd_obj);
+               return r;
++      }
+       gfx_v9_0_kiq_init_queue(ring);
+       amdgpu_bo_kunmap(ring->mqd_obj);
+-- 
+2.39.2
+
diff --git a/queue-6.3/drm-panel-orientation-quirks-change-air-s-quirk-to-s.patch b/queue-6.3/drm-panel-orientation-quirks-change-air-s-quirk-to-s.patch
new file mode 100644 (file)
index 0000000..5846663
--- /dev/null
@@ -0,0 +1,41 @@
+From 1969ebfded305aaff1e034a59caa1fd39d66d6e7 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Mon, 15 May 2023 20:48:43 +0200
+Subject: drm: panel-orientation-quirks: Change Air's quirk to support Air Plus
+
+From: Maya Matuszczyk <maccraft123mc@gmail.com>
+
+[ Upstream commit 1aa7f416175619e0286fddc5fc44e968b06bf2aa ]
+
+It turned out that Aya Neo Air Plus had a different board name than
+expected.
+This patch changes Aya Neo Air's quirk to account for that, as both
+devices share "Air" in DMI product name.
+
+Tested on Air claiming to be an Air Pro, and on Air Plus.
+
+Signed-off-by: Maya Matuszczyk <maccraft123mc@gmail.com>
+Reviewed-by: Hans de Goede <hdegoede@redhat.com>
+Signed-off-by: Hans de Goede <hdegoede@redhat.com>
+Link: https://patchwork.freedesktop.org/patch/msgid/20230515184843.1552612-1-maccraft123mc@gmail.com
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/gpu/drm/drm_panel_orientation_quirks.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/drivers/gpu/drm/drm_panel_orientation_quirks.c b/drivers/gpu/drm/drm_panel_orientation_quirks.c
+index b1a38e6ce2f8f..0cb646cb04ee1 100644
+--- a/drivers/gpu/drm/drm_panel_orientation_quirks.c
++++ b/drivers/gpu/drm/drm_panel_orientation_quirks.c
+@@ -179,7 +179,7 @@ static const struct dmi_system_id orientation_data[] = {
+       }, {    /* AYA NEO AIR */
+               .matches = {
+                 DMI_EXACT_MATCH(DMI_SYS_VENDOR, "AYANEO"),
+-                DMI_MATCH(DMI_BOARD_NAME, "AIR"),
++                DMI_MATCH(DMI_PRODUCT_NAME, "AIR"),
+               },
+               .driver_data = (void *)&lcd1080x1920_leftside_up,
+       }, {    /* AYA NEO NEXT */
+-- 
+2.39.2
+
diff --git a/queue-6.3/erofs-use-hipri-by-default-if-per-cpu-kthreads-are-e.patch b/queue-6.3/erofs-use-hipri-by-default-if-per-cpu-kthreads-are-e.patch
new file mode 100644 (file)
index 0000000..f46c535
--- /dev/null
@@ -0,0 +1,60 @@
+From aae75245ac4f6dbd1483554a652ed020fb3514be Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Mon, 22 May 2023 17:21:41 +0800
+Subject: erofs: use HIPRI by default if per-cpu kthreads are enabled
+
+From: Gao Xiang <hsiangkao@linux.alibaba.com>
+
+[ Upstream commit cf7f2732b4b83026842832e7e4e04bf862108ac2 ]
+
+As Sandeep shown [1], high priority RT per-cpu kthreads are
+typically helpful for Android scenarios to minimize the scheduling
+latencies.
+
+Switch EROFS_FS_PCPU_KTHREAD_HIPRI on by default if
+EROFS_FS_PCPU_KTHREAD is on since it's the typical use cases for
+EROFS_FS_PCPU_KTHREAD.
+
+Also clean up unneeded sched_set_normal().
+
+[1] https://lore.kernel.org/r/CAB=BE-SBtO6vcoyLNA9F-9VaN5R0t3o_Zn+FW8GbO6wyUqFneQ@mail.gmail.com
+
+Reviewed-by: Yue Hu <huyue2@coolpad.com>
+Reviewed-by: Sandeep Dhavale <dhavale@google.com>
+Reviewed-by: Chao Yu <chao@kernel.org>
+Signed-off-by: Gao Xiang <hsiangkao@linux.alibaba.com>
+Link: https://lore.kernel.org/r/20230522092141.124290-1-hsiangkao@linux.alibaba.com
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ fs/erofs/Kconfig | 1 +
+ fs/erofs/zdata.c | 2 --
+ 2 files changed, 1 insertion(+), 2 deletions(-)
+
+diff --git a/fs/erofs/Kconfig b/fs/erofs/Kconfig
+index 704fb59577e09..f259d92c97207 100644
+--- a/fs/erofs/Kconfig
++++ b/fs/erofs/Kconfig
+@@ -121,6 +121,7 @@ config EROFS_FS_PCPU_KTHREAD
+ config EROFS_FS_PCPU_KTHREAD_HIPRI
+       bool "EROFS high priority per-CPU kthread workers"
+       depends on EROFS_FS_ZIP && EROFS_FS_PCPU_KTHREAD
++      default y
+       help
+         This permits EROFS to configure per-CPU kthread workers to run
+         at higher priority.
+diff --git a/fs/erofs/zdata.c b/fs/erofs/zdata.c
+index f1708c77a9912..d7add72a09437 100644
+--- a/fs/erofs/zdata.c
++++ b/fs/erofs/zdata.c
+@@ -369,8 +369,6 @@ static struct kthread_worker *erofs_init_percpu_worker(int cpu)
+               return worker;
+       if (IS_ENABLED(CONFIG_EROFS_FS_PCPU_KTHREAD_HIPRI))
+               sched_set_fifo_low(worker->task);
+-      else
+-              sched_set_normal(worker->task, 0);
+       return worker;
+ }
+-- 
+2.39.2
+
diff --git a/queue-6.3/io_uring-unlock-sqd-lock-before-sq-thread-release-cp.patch b/queue-6.3/io_uring-unlock-sqd-lock-before-sq-thread-release-cp.patch
new file mode 100644 (file)
index 0000000..fcf23c4
--- /dev/null
@@ -0,0 +1,54 @@
+From 4cc8094dd4c58d5029fc98e197ecd9ff82b7aee2 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Thu, 25 May 2023 16:26:26 +0800
+Subject: io_uring: unlock sqd->lock before sq thread release CPU
+
+From: Wenwen Chen <wenwen.chen@samsung.com>
+
+[ Upstream commit 533ab73f5b5c95dcb4152b52d5482abcc824c690 ]
+
+The sq thread actively releases CPU resources by calling the
+cond_resched() and schedule() interfaces when it is idle. Therefore,
+more resources are available for other threads to run.
+
+There exists a problem in sq thread: it does not unlock sqd->lock before
+releasing CPU resources every time. This makes other threads pending on
+sqd->lock for a long time. For example, the following interfaces all
+require sqd->lock: io_sq_offload_create(), io_register_iowq_max_workers()
+and io_ring_exit_work().
+
+Before the sq thread releases CPU resources, unlocking sqd->lock will
+provide the user a better experience because it can respond quickly to
+user requests.
+
+Signed-off-by: Kanchan Joshi<joshi.k@samsung.com>
+Signed-off-by: Wenwen Chen<wenwen.chen@samsung.com>
+Link: https://lore.kernel.org/r/20230525082626.577862-1-wenwen.chen@samsung.com
+Signed-off-by: Jens Axboe <axboe@kernel.dk>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ io_uring/sqpoll.c | 6 +++++-
+ 1 file changed, 5 insertions(+), 1 deletion(-)
+
+diff --git a/io_uring/sqpoll.c b/io_uring/sqpoll.c
+index 9db4bc1f521a3..5e329e3cd4706 100644
+--- a/io_uring/sqpoll.c
++++ b/io_uring/sqpoll.c
+@@ -255,9 +255,13 @@ static int io_sq_thread(void *data)
+                       sqt_spin = true;
+               if (sqt_spin || !time_after(jiffies, timeout)) {
+-                      cond_resched();
+                       if (sqt_spin)
+                               timeout = jiffies + sqd->sq_thread_idle;
++                      if (unlikely(need_resched())) {
++                              mutex_unlock(&sqd->lock);
++                              cond_resched();
++                              mutex_lock(&sqd->lock);
++                      }
+                       continue;
+               }
+-- 
+2.39.2
+
diff --git a/queue-6.3/irqchip-gic-correctly-validate-of-quirk-descriptors.patch b/queue-6.3/irqchip-gic-correctly-validate-of-quirk-descriptors.patch
new file mode 100644 (file)
index 0000000..e432dfc
--- /dev/null
@@ -0,0 +1,41 @@
+From d3276a94d0ae0c681286b17e235cc461d60e4b24 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Tue, 30 May 2023 11:01:22 +0100
+Subject: irqchip/gic: Correctly validate OF quirk descriptors
+
+From: Marc Zyngier <maz@kernel.org>
+
+[ Upstream commit 91539341a3b6e9c868024a4292455dae36e6f58c ]
+
+When checking for OF quirks, make sure either 'compatible' or 'property'
+is set, and give up otherwise.
+
+This avoids non-OF quirks being randomly applied as they don't have any
+of the OF data that need checking.
+
+Cc: Douglas Anderson <dianders@chromium.org>
+Reported-by: Geert Uytterhoeven <geert+renesas@glider.be>
+Tested-by: Geert Uytterhoeven <geert+renesas@glider.be>
+Fixes: 44bd78dd2b88 ("irqchip/gic-v3: Disable pseudo NMIs on Mediatek devices w/ firmware issues")
+Signed-off-by: Marc Zyngier <maz@kernel.org>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/irqchip/irq-gic-common.c | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/drivers/irqchip/irq-gic-common.c b/drivers/irqchip/irq-gic-common.c
+index de47b51cdadbe..afd6a1841715a 100644
+--- a/drivers/irqchip/irq-gic-common.c
++++ b/drivers/irqchip/irq-gic-common.c
+@@ -16,6 +16,8 @@ void gic_enable_of_quirks(const struct device_node *np,
+                         const struct gic_quirk *quirks, void *data)
+ {
+       for (; quirks->desc; quirks++) {
++              if (!quirks->compatible && !quirks->property)
++                      continue;
+               if (quirks->compatible &&
+                   !of_device_is_compatible(np, quirks->compatible))
+                       continue;
+-- 
+2.39.2
+
diff --git a/queue-6.3/irqchip-gic-v3-disable-pseudo-nmis-on-mediatek-devic.patch b/queue-6.3/irqchip-gic-v3-disable-pseudo-nmis-on-mediatek-devic.patch
new file mode 100644 (file)
index 0000000..4afc754
--- /dev/null
@@ -0,0 +1,138 @@
+From 3ed5f8039e4f06f8a9a15fe17fad5c877c37eca5 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Mon, 15 May 2023 13:13:51 -0700
+Subject: irqchip/gic-v3: Disable pseudo NMIs on Mediatek devices w/ firmware
+ issues
+
+From: Douglas Anderson <dianders@chromium.org>
+
+[ Upstream commit 44bd78dd2b8897f59b7e3963f088caadb7e4f047 ]
+
+Some Chromebooks with Mediatek SoCs have a problem where the firmware
+doesn't properly save/restore certain GICR registers. Newer
+Chromebooks should fix this issue and we may be able to do firmware
+updates for old Chromebooks. At the moment, the only known issue with
+these Chromebooks is that we can't enable "pseudo NMIs" since the
+priority register can be lost. Enabling "pseudo NMIs" on Chromebooks
+with the problematic firmware causes crashes and freezes.
+
+Let's detect devices with this problem and then disable "pseudo NMIs"
+on them. We'll detect the problem by looking for the presence of the
+"mediatek,broken-save-restore-fw" property in the GIC device tree
+node. Any devices with fixed firmware will not have this property.
+
+Our detection plan works because we never bake a Chromebook's device
+tree into firmware. Instead, device trees are always bundled with the
+kernel. We'll update the device trees of all affected Chromebooks and
+then we'll never enable "pseudo NMI" on a kernel that is bundled with
+old device trees. When a firmware update is shipped that fixes this
+issue it will know to patch the device tree to remove the property.
+
+In order to make this work, the quick detection mechanism of the GICv3
+code is extended to be able to look for properties in addition to
+looking at "compatible".
+
+Reviewed-by: Julius Werner <jwerner@chromium.org>
+Signed-off-by: Douglas Anderson <dianders@chromium.org>
+Signed-off-by: Marc Zyngier <maz@kernel.org>
+Link: https://lore.kernel.org/r/20230515131353.v2.2.I88dc0a0eb1d9d537de61604cd8994ecc55c0cac1@changeid
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/irqchip/irq-gic-common.c |  8 ++++++--
+ drivers/irqchip/irq-gic-common.h |  1 +
+ drivers/irqchip/irq-gic-v3.c     | 20 ++++++++++++++++++++
+ 3 files changed, 27 insertions(+), 2 deletions(-)
+
+diff --git a/drivers/irqchip/irq-gic-common.c b/drivers/irqchip/irq-gic-common.c
+index a610821c8ff2a..de47b51cdadbe 100644
+--- a/drivers/irqchip/irq-gic-common.c
++++ b/drivers/irqchip/irq-gic-common.c
+@@ -16,7 +16,11 @@ void gic_enable_of_quirks(const struct device_node *np,
+                         const struct gic_quirk *quirks, void *data)
+ {
+       for (; quirks->desc; quirks++) {
+-              if (!of_device_is_compatible(np, quirks->compatible))
++              if (quirks->compatible &&
++                  !of_device_is_compatible(np, quirks->compatible))
++                      continue;
++              if (quirks->property &&
++                  !of_property_read_bool(np, quirks->property))
+                       continue;
+               if (quirks->init(data))
+                       pr_info("GIC: enabling workaround for %s\n",
+@@ -28,7 +32,7 @@ void gic_enable_quirks(u32 iidr, const struct gic_quirk *quirks,
+               void *data)
+ {
+       for (; quirks->desc; quirks++) {
+-              if (quirks->compatible)
++              if (quirks->compatible || quirks->property)
+                       continue;
+               if (quirks->iidr != (quirks->mask & iidr))
+                       continue;
+diff --git a/drivers/irqchip/irq-gic-common.h b/drivers/irqchip/irq-gic-common.h
+index 27e3d4ed4f328..3db4592cda1c0 100644
+--- a/drivers/irqchip/irq-gic-common.h
++++ b/drivers/irqchip/irq-gic-common.h
+@@ -13,6 +13,7 @@
+ struct gic_quirk {
+       const char *desc;
+       const char *compatible;
++      const char *property;
+       bool (*init)(void *data);
+       u32 iidr;
+       u32 mask;
+diff --git a/drivers/irqchip/irq-gic-v3.c b/drivers/irqchip/irq-gic-v3.c
+index 6fcee221f2017..a605aa79435a4 100644
+--- a/drivers/irqchip/irq-gic-v3.c
++++ b/drivers/irqchip/irq-gic-v3.c
+@@ -39,6 +39,7 @@
+ #define FLAGS_WORKAROUND_GICR_WAKER_MSM8996   (1ULL << 0)
+ #define FLAGS_WORKAROUND_CAVIUM_ERRATUM_38539 (1ULL << 1)
++#define FLAGS_WORKAROUND_MTK_GICR_SAVE                (1ULL << 2)
+ #define GIC_IRQ_TYPE_PARTITION        (GIC_IRQ_TYPE_LPI + 1)
+@@ -1720,6 +1721,15 @@ static bool gic_enable_quirk_msm8996(void *data)
+       return true;
+ }
++static bool gic_enable_quirk_mtk_gicr(void *data)
++{
++      struct gic_chip_data *d = data;
++
++      d->flags |= FLAGS_WORKAROUND_MTK_GICR_SAVE;
++
++      return true;
++}
++
+ static bool gic_enable_quirk_cavium_38539(void *data)
+ {
+       struct gic_chip_data *d = data;
+@@ -1792,6 +1802,11 @@ static const struct gic_quirk gic_quirks[] = {
+               .compatible = "qcom,msm8996-gic-v3",
+               .init   = gic_enable_quirk_msm8996,
+       },
++      {
++              .desc   = "GICv3: Mediatek Chromebook GICR save problem",
++              .property = "mediatek,broken-save-restore-fw",
++              .init   = gic_enable_quirk_mtk_gicr,
++      },
+       {
+               .desc   = "GICv3: HIP06 erratum 161010803",
+               .iidr   = 0x0204043b,
+@@ -1834,6 +1849,11 @@ static void gic_enable_nmi_support(void)
+       if (!gic_prio_masking_enabled())
+               return;
++      if (gic_data.flags & FLAGS_WORKAROUND_MTK_GICR_SAVE) {
++              pr_warn("Skipping NMI enable due to firmware issues\n");
++              return;
++      }
++
+       ppi_nmi_refs = kcalloc(gic_data.ppi_nr, sizeof(*ppi_nmi_refs), GFP_KERNEL);
+       if (!ppi_nmi_refs)
+               return;
+-- 
+2.39.2
+
diff --git a/queue-6.3/irqchip-meson-gpio-mark-of-related-data-as-maybe-unu.patch b/queue-6.3/irqchip-meson-gpio-mark-of-related-data-as-maybe-unu.patch
new file mode 100644 (file)
index 0000000..029cba6
--- /dev/null
@@ -0,0 +1,42 @@
+From 216a64dcfccf7e1301deda169f01cd0e43f43c70 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Fri, 12 May 2023 18:45:06 +0200
+Subject: irqchip/meson-gpio: Mark OF related data as maybe unused
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+From: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
+
+[ Upstream commit 14130211be5366a91ec07c3284c183b75d8fba17 ]
+
+The driver can be compile tested with !CONFIG_OF making certain data
+unused:
+
+  drivers/irqchip/irq-meson-gpio.c:153:34: error: â€˜meson_irq_gpio_matches’ defined but not used [-Werror=unused-const-variable=]
+
+Acked-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
+Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
+Signed-off-by: Marc Zyngier <maz@kernel.org>
+Link: https://lore.kernel.org/r/20230512164506.212267-1-krzysztof.kozlowski@linaro.org
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/irqchip/irq-meson-gpio.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/drivers/irqchip/irq-meson-gpio.c b/drivers/irqchip/irq-meson-gpio.c
+index 2aaa9aad3e87a..7da18ef952119 100644
+--- a/drivers/irqchip/irq-meson-gpio.c
++++ b/drivers/irqchip/irq-meson-gpio.c
+@@ -150,7 +150,7 @@ static const struct meson_gpio_irq_params s4_params = {
+       INIT_MESON_S4_COMMON_DATA(82)
+ };
+-static const struct of_device_id meson_irq_gpio_matches[] = {
++static const struct of_device_id meson_irq_gpio_matches[] __maybe_unused = {
+       { .compatible = "amlogic,meson8-gpio-intc", .data = &meson8_params },
+       { .compatible = "amlogic,meson8b-gpio-intc", .data = &meson8b_params },
+       { .compatible = "amlogic,meson-gxbb-gpio-intc", .data = &gxbb_params },
+-- 
+2.39.2
+
diff --git a/queue-6.3/mips-alchemy-fix-dbdma2.patch b/queue-6.3/mips-alchemy-fix-dbdma2.patch
new file mode 100644 (file)
index 0000000..22a12eb
--- /dev/null
@@ -0,0 +1,87 @@
+From e0a37093cd70e64aa62cff4fdefbcd746cadd14b Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Thu, 11 May 2023 17:30:10 +0200
+Subject: MIPS: Alchemy: fix dbdma2
+
+From: Manuel Lauss <manuel.lauss@gmail.com>
+
+[ Upstream commit 2d645604f69f3a772d58ead702f9a8e84ab2b342 ]
+
+Various fixes for the Au1200/Au1550/Au1300 DBDMA2 code:
+
+- skip cache invalidation if chip has working coherency circuitry.
+- invalidate KSEG0-portion of the (physical) data address.
+- force the dma channel doorbell write out to bus immediately with
+  a sync.
+
+Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ arch/mips/alchemy/common/dbdma.c | 27 +++++++++++++++------------
+ 1 file changed, 15 insertions(+), 12 deletions(-)
+
+diff --git a/arch/mips/alchemy/common/dbdma.c b/arch/mips/alchemy/common/dbdma.c
+index 5ab0430004092..6a3c890f7bbfe 100644
+--- a/arch/mips/alchemy/common/dbdma.c
++++ b/arch/mips/alchemy/common/dbdma.c
+@@ -30,6 +30,7 @@
+  *
+  */
++#include <linux/dma-map-ops.h> /* for dma_default_coherent */
+ #include <linux/init.h>
+ #include <linux/kernel.h>
+ #include <linux/slab.h>
+@@ -623,17 +624,18 @@ u32 au1xxx_dbdma_put_source(u32 chanid, dma_addr_t buf, int nbytes, u32 flags)
+               dp->dscr_cmd0 &= ~DSCR_CMD0_IE;
+       /*
+-       * There is an errata on the Au1200/Au1550 parts that could result
+-       * in "stale" data being DMA'ed. It has to do with the snoop logic on
+-       * the cache eviction buffer.  DMA_NONCOHERENT is on by default for
+-       * these parts. If it is fixed in the future, these dma_cache_inv will
+-       * just be nothing more than empty macros. See io.h.
++       * There is an erratum on certain Au1200/Au1550 revisions that could
++       * result in "stale" data being DMA'ed. It has to do with the snoop
++       * logic on the cache eviction buffer.  dma_default_coherent is set
++       * to false on these parts.
+        */
+-      dma_cache_wback_inv((unsigned long)buf, nbytes);
++      if (!dma_default_coherent)
++              dma_cache_wback_inv(KSEG0ADDR(buf), nbytes);
+       dp->dscr_cmd0 |= DSCR_CMD0_V;   /* Let it rip */
+       wmb(); /* drain writebuffer */
+       dma_cache_wback_inv((unsigned long)dp, sizeof(*dp));
+       ctp->chan_ptr->ddma_dbell = 0;
++      wmb(); /* force doorbell write out to dma engine */
+       /* Get next descriptor pointer. */
+       ctp->put_ptr = phys_to_virt(DSCR_GET_NXTPTR(dp->dscr_nxtptr));
+@@ -685,17 +687,18 @@ u32 au1xxx_dbdma_put_dest(u32 chanid, dma_addr_t buf, int nbytes, u32 flags)
+                         dp->dscr_source1, dp->dscr_dest0, dp->dscr_dest1);
+ #endif
+       /*
+-       * There is an errata on the Au1200/Au1550 parts that could result in
+-       * "stale" data being DMA'ed. It has to do with the snoop logic on the
+-       * cache eviction buffer.  DMA_NONCOHERENT is on by default for these
+-       * parts. If it is fixed in the future, these dma_cache_inv will just
+-       * be nothing more than empty macros. See io.h.
++       * There is an erratum on certain Au1200/Au1550 revisions that could
++       * result in "stale" data being DMA'ed. It has to do with the snoop
++       * logic on the cache eviction buffer.  dma_default_coherent is set
++       * to false on these parts.
+        */
+-      dma_cache_inv((unsigned long)buf, nbytes);
++      if (!dma_default_coherent)
++              dma_cache_inv(KSEG0ADDR(buf), nbytes);
+       dp->dscr_cmd0 |= DSCR_CMD0_V;   /* Let it rip */
+       wmb(); /* drain writebuffer */
+       dma_cache_wback_inv((unsigned long)dp, sizeof(*dp));
+       ctp->chan_ptr->ddma_dbell = 0;
++      wmb(); /* force doorbell write out to dma engine */
+       /* Get next descriptor pointer. */
+       ctp->put_ptr = phys_to_virt(DSCR_GET_NXTPTR(dp->dscr_nxtptr));
+-- 
+2.39.2
+
diff --git a/queue-6.3/mips-move-initrd_start-check-after-initrd-address-sa.patch b/queue-6.3/mips-move-initrd_start-check-after-initrd-address-sa.patch
new file mode 100644 (file)
index 0000000..7b5fd50
--- /dev/null
@@ -0,0 +1,52 @@
+From 2fb08f5c0613d8243d8f856e678f696b27c05ee4 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Tue, 9 May 2023 18:29:21 +0100
+Subject: mips: Move initrd_start check after initrd address sanitisation.
+
+From: Liviu Dudau <liviu@dudau.co.uk>
+
+[ Upstream commit 4897a898a216058dec55e5e5902534e6e224fcdf ]
+
+PAGE_OFFSET is technically a virtual address so when checking the value of
+initrd_start against it we should make sure that it has been sanitised from
+the values passed by the bootloader. Without this change, even with a bootloader
+that passes correct addresses for an initrd, we are failing to load it on MT7621
+boards, for example.
+
+Signed-off-by: Liviu Dudau <liviu@dudau.co.uk>
+Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ arch/mips/kernel/setup.c | 9 +++++----
+ 1 file changed, 5 insertions(+), 4 deletions(-)
+
+diff --git a/arch/mips/kernel/setup.c b/arch/mips/kernel/setup.c
+index f1c88f8a1dc51..81dbb4ef52317 100644
+--- a/arch/mips/kernel/setup.c
++++ b/arch/mips/kernel/setup.c
+@@ -158,10 +158,6 @@ static unsigned long __init init_initrd(void)
+               pr_err("initrd start must be page aligned\n");
+               goto disable;
+       }
+-      if (initrd_start < PAGE_OFFSET) {
+-              pr_err("initrd start < PAGE_OFFSET\n");
+-              goto disable;
+-      }
+       /*
+        * Sanitize initrd addresses. For example firmware
+@@ -174,6 +170,11 @@ static unsigned long __init init_initrd(void)
+       initrd_end = (unsigned long)__va(end);
+       initrd_start = (unsigned long)__va(__pa(initrd_start));
++      if (initrd_start < PAGE_OFFSET) {
++              pr_err("initrd start < PAGE_OFFSET\n");
++              goto disable;
++      }
++
+       ROOT_DEV = Root_RAM0;
+       return PFN_UP(end);
+ disable:
+-- 
+2.39.2
+
diff --git a/queue-6.3/mips-restore-au1300-support.patch b/queue-6.3/mips-restore-au1300-support.patch
new file mode 100644 (file)
index 0000000..cdd4f44
--- /dev/null
@@ -0,0 +1,48 @@
+From 95d650d57a794a80dfff425a5e8d5b0b80556925 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Wed, 10 May 2023 12:33:23 +0200
+Subject: MIPS: Restore Au1300 support
+
+From: Manuel Lauss <manuel.lauss@gmail.com>
+
+[ Upstream commit f2041708dee30a3425f680265c337acd28293782 ]
+
+The Au1300, at least the one I have to test, uses the NetLogic vendor
+ID, but commit 95b8a5e0111a ("MIPS: Remove NETLOGIC support") also
+dropped Au1300 detection.  Restore Au1300 detection.
+
+Tested on DB1300 with Au1380 chip.
+
+Signed-off-by: Manuel Lauss <manuel.lauss@gmail.com>
+Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ arch/mips/kernel/cpu-probe.c | 5 +++++
+ 1 file changed, 5 insertions(+)
+
+diff --git a/arch/mips/kernel/cpu-probe.c b/arch/mips/kernel/cpu-probe.c
+index 7ddf07f255f32..6f5d825958778 100644
+--- a/arch/mips/kernel/cpu-probe.c
++++ b/arch/mips/kernel/cpu-probe.c
+@@ -1502,6 +1502,10 @@ static inline void cpu_probe_alchemy(struct cpuinfo_mips *c, unsigned int cpu)
+                       break;
+               }
+               break;
++      case PRID_IMP_NETLOGIC_AU13XX:
++              c->cputype = CPU_ALCHEMY;
++              __cpu_name[cpu] = "Au1300";
++              break;
+       }
+ }
+@@ -1861,6 +1865,7 @@ void cpu_probe(void)
+               cpu_probe_mips(c, cpu);
+               break;
+       case PRID_COMP_ALCHEMY:
++      case PRID_COMP_NETLOGIC:
+               cpu_probe_alchemy(c, cpu);
+               break;
+       case PRID_COMP_SIBYTE:
+-- 
+2.39.2
+
diff --git a/queue-6.3/mips-unhide-pata_platform.patch b/queue-6.3/mips-unhide-pata_platform.patch
new file mode 100644 (file)
index 0000000..bce4f71
--- /dev/null
@@ -0,0 +1,34 @@
+From f3499a6083c293e0de429f7c6efdc336ddaabbc4 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Tue, 9 May 2023 20:57:44 +0200
+Subject: MIPS: unhide PATA_PLATFORM
+
+From: Manuel Lauss <manuel.lauss@gmail.com>
+
+[ Upstream commit 75b18aac6fa39a1720677970cfcb52ecea1eb44c ]
+
+Alchemy DB1200/DB1300 boards can use the pata_platform driver.
+Unhide the config entry in all of MIPS.
+
+Signed-off-by: Manuel Lauss <manuel.lauss@gmail.com>
+Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ arch/mips/Kconfig | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig
+index e2f3ca73f40d6..5b3f1f1dfd164 100644
+--- a/arch/mips/Kconfig
++++ b/arch/mips/Kconfig
+@@ -82,6 +82,7 @@ config MIPS
+       select HAVE_LD_DEAD_CODE_DATA_ELIMINATION
+       select HAVE_MOD_ARCH_SPECIFIC
+       select HAVE_NMI
++      select HAVE_PATA_PLATFORM
+       select HAVE_PERF_EVENTS
+       select HAVE_PERF_REGS
+       select HAVE_PERF_USER_STACK_DUMP
+-- 
+2.39.2
+
diff --git a/queue-6.3/nvme-add-maxio-1602-to-bogus-nid-list.patch b/queue-6.3/nvme-add-maxio-1602-to-bogus-nid-list.patch
new file mode 100644 (file)
index 0000000..dc221a1
--- /dev/null
@@ -0,0 +1,71 @@
+From ad14db24bf553326ed370dafa31c64f59ec44e7c Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Sat, 20 May 2023 21:23:50 +0900
+Subject: NVMe: Add MAXIO 1602 to bogus nid list.
+
+From: Tatsuki Sugiura <sugi@nemui.org>
+
+[ Upstream commit a3a9d63dcd15535e7fdf4c7c1b32bfaed762973a ]
+
+HIKSEMI FUTURE M.2 SSD uses the same dummy nguid and eui64.
+I confirmed it with my two devices.
+
+This patch marks the controller as NVME_QUIRK_BOGUS_NID.
+
+---------------------------------------------------------
+sugi@tempest:~% sudo nvme id-ctrl /dev/nvme0
+NVME Identify Controller:
+vid       : 0x1e4b
+ssvid     : 0x1e4b
+sn        : 30096022612
+mn        : HS-SSD-FUTURE 2048G
+fr        : SN10542
+rab       : 0
+ieee      : 000000
+cmic      : 0
+mdts      : 7
+cntlid    : 0
+ver       : 0x10400
+rtd3r     : 0x7a120
+rtd3e     : 0x1e8480
+oaes      : 0x200
+ctratt    : 0x2
+rrls      : 0
+cntrltype : 1
+fguid     : 00000000-0000-0000-0000-000000000000
+<snip...>
+---------------------------------------------------------
+
+---------------------------------------------------------
+sugi@tempest:~% sudo nvme id-ns /dev/nvme0n1
+NVME Identify Namespace 1:
+<snip...>
+nguid   : 00000000000000000000000000000000
+eui64   : 0000000000000002
+lbaf  0 : ms:0   lbads:9  rp:0 (in use)
+---------------------------------------------------------
+
+Signed-off-by: Tatsuki Sugiura <sugi@nemui.org>
+Reviewed-by: Christoph Hellwig <hch@lst.de>
+Signed-off-by: Keith Busch <kbusch@kernel.org>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/nvme/host/pci.c | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/drivers/nvme/host/pci.c b/drivers/nvme/host/pci.c
+index 60f51155a6d20..b682cc6a62f0a 100644
+--- a/drivers/nvme/host/pci.c
++++ b/drivers/nvme/host/pci.c
+@@ -3428,6 +3428,8 @@ static const struct pci_device_id nvme_id_table[] = {
+               .driver_data = NVME_QUIRK_BOGUS_NID, },
+       { PCI_DEVICE(0x1e4B, 0x1202),   /* MAXIO MAP1202 */
+               .driver_data = NVME_QUIRK_BOGUS_NID, },
++      { PCI_DEVICE(0x1e4B, 0x1602),   /* MAXIO MAP1602 */
++              .driver_data = NVME_QUIRK_BOGUS_NID, },
+       { PCI_DEVICE(0x1cc1, 0x5350),   /* ADATA XPG GAMMIX S50 */
+               .driver_data = NVME_QUIRK_BOGUS_NID, },
+       { PCI_DEVICE(0x1dbe, 0x5236),   /* ADATA XPG GAMMIX S70 */
+-- 
+2.39.2
+
diff --git a/queue-6.3/of-overlay-fix-missing-of_node_put-in-error-case-of-.patch b/queue-6.3/of-overlay-fix-missing-of_node_put-in-error-case-of-.patch
new file mode 100644 (file)
index 0000000..3c9c257
--- /dev/null
@@ -0,0 +1,37 @@
+From 46d3ff6fb9a291fadda151e32aabf28b67cd1d58 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Fri, 2 Jun 2023 11:05:02 +0900
+Subject: of: overlay: Fix missing of_node_put() in error case of
+ init_overlay_changeset()
+
+From: Kunihiko Hayashi <hayashi.kunihiko@socionext.com>
+
+[ Upstream commit 39affd1fdf65983904fafc07cf607cff737eaf30 ]
+
+In init_overlay_changeset(), the variable "node" is from
+of_get_child_by_name(), and the "node" should be discarded in error case.
+
+Fixes: d1651b03c2df ("of: overlay: add overlay symbols to live device tree")
+Signed-off-by: Kunihiko Hayashi <hayashi.kunihiko@socionext.com>
+Link: https://lore.kernel.org/r/20230602020502.11693-1-hayashi.kunihiko@socionext.com
+Signed-off-by: Rob Herring <robh@kernel.org>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/of/overlay.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/drivers/of/overlay.c b/drivers/of/overlay.c
+index 2e01960f1aeb3..7feb643f13707 100644
+--- a/drivers/of/overlay.c
++++ b/drivers/of/overlay.c
+@@ -811,6 +811,7 @@ static int init_overlay_changeset(struct overlay_changeset *ovcs)
+               if (!fragment->target) {
+                       pr_err("symbols in overlay, but not in live tree\n");
+                       ret = -EINVAL;
++                      of_node_put(node);
+                       goto err_out;
+               }
+-- 
+2.39.2
+
diff --git a/queue-6.3/parisc-flush-gatt-writes-and-adjust-gatt-mask-in-par.patch b/queue-6.3/parisc-flush-gatt-writes-and-adjust-gatt-mask-in-par.patch
new file mode 100644 (file)
index 0000000..b3481dc
--- /dev/null
@@ -0,0 +1,62 @@
+From 03fcf7dc0e427a28e2cf1c3c6a8908873fd68dea Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Wed, 17 May 2023 15:54:40 +0200
+Subject: parisc: Flush gatt writes and adjust gatt mask in
+ parisc_agp_mask_memory()
+
+From: Helge Deller <deller@gmx.de>
+
+[ Upstream commit d703797380c540bbeac03f104ebcfc364eaf47cc ]
+
+Flush caches after changing gatt entries and calculate entry according
+to SBA requirements.
+
+Signed-off-by: Helge Deller <deller@gmx.de>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/char/agp/parisc-agp.c | 15 ++++++++++++++-
+ 1 file changed, 14 insertions(+), 1 deletion(-)
+
+diff --git a/drivers/char/agp/parisc-agp.c b/drivers/char/agp/parisc-agp.c
+index d68d05d5d3838..514f9f287a781 100644
+--- a/drivers/char/agp/parisc-agp.c
++++ b/drivers/char/agp/parisc-agp.c
+@@ -90,6 +90,9 @@ parisc_agp_tlbflush(struct agp_memory *mem)
+ {
+       struct _parisc_agp_info *info = &parisc_agp_info;
++      /* force fdc ops to be visible to IOMMU */
++      asm_io_sync();
++
+       writeq(info->gart_base | ilog2(info->gart_size), info->ioc_regs+IOC_PCOM);
+       readq(info->ioc_regs+IOC_PCOM); /* flush */
+ }
+@@ -158,6 +161,7 @@ parisc_agp_insert_memory(struct agp_memory *mem, off_t pg_start, int type)
+                       info->gatt[j] =
+                               parisc_agp_mask_memory(agp_bridge,
+                                       paddr, type);
++                      asm_io_fdc(&info->gatt[j]);
+               }
+       }
+@@ -191,7 +195,16 @@ static unsigned long
+ parisc_agp_mask_memory(struct agp_bridge_data *bridge, dma_addr_t addr,
+                      int type)
+ {
+-      return SBA_PDIR_VALID_BIT | addr;
++      unsigned ci;                    /* coherent index */
++      dma_addr_t pa;
++
++      pa = addr & IOVP_MASK;
++      asm("lci 0(%1), %0" : "=r" (ci) : "r" (phys_to_virt(pa)));
++
++      pa |= (ci >> PAGE_SHIFT) & 0xff;/* move CI (8 bits) into lowest byte */
++      pa |= SBA_PDIR_VALID_BIT;       /* set "valid" bit */
++
++      return cpu_to_le64(pa);
+ }
+ static void
+-- 
+2.39.2
+
diff --git a/queue-6.3/parisc-improve-cache-flushing-for-pcxl-in-arch_sync_.patch b/queue-6.3/parisc-improve-cache-flushing-for-pcxl-in-arch_sync_.patch
new file mode 100644 (file)
index 0000000..333f4e1
--- /dev/null
@@ -0,0 +1,57 @@
+From 0d703d91efa35847550e6715aec961e271fb803b Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Wed, 17 May 2023 15:52:30 +0200
+Subject: parisc: Improve cache flushing for PCXL in arch_sync_dma_for_cpu()
+
+From: Helge Deller <deller@gmx.de>
+
+[ Upstream commit 59fa12646d9f56c842b4d5b6418ed77af625c588 ]
+
+Add comment in arch_sync_dma_for_device() and handle the direction flag in
+arch_sync_dma_for_cpu().
+
+When receiving data from the device (DMA_FROM_DEVICE) unconditionally
+purge the data cache in arch_sync_dma_for_cpu().
+
+Signed-off-by: Helge Deller <deller@gmx.de>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ arch/parisc/kernel/pci-dma.c | 18 +++++++++++++++++-
+ 1 file changed, 17 insertions(+), 1 deletion(-)
+
+diff --git a/arch/parisc/kernel/pci-dma.c b/arch/parisc/kernel/pci-dma.c
+index ba87f791323be..71ed5391f29d6 100644
+--- a/arch/parisc/kernel/pci-dma.c
++++ b/arch/parisc/kernel/pci-dma.c
+@@ -446,11 +446,27 @@ void arch_dma_free(struct device *dev, size_t size, void *vaddr,
+ void arch_sync_dma_for_device(phys_addr_t paddr, size_t size,
+               enum dma_data_direction dir)
+ {
++      /*
++       * fdc: The data cache line is written back to memory, if and only if
++       * it is dirty, and then invalidated from the data cache.
++       */
+       flush_kernel_dcache_range((unsigned long)phys_to_virt(paddr), size);
+ }
+ void arch_sync_dma_for_cpu(phys_addr_t paddr, size_t size,
+               enum dma_data_direction dir)
+ {
+-      flush_kernel_dcache_range((unsigned long)phys_to_virt(paddr), size);
++      unsigned long addr = (unsigned long) phys_to_virt(paddr);
++
++      switch (dir) {
++      case DMA_TO_DEVICE:
++      case DMA_BIDIRECTIONAL:
++              flush_kernel_dcache_range(addr, size);
++              return;
++      case DMA_FROM_DEVICE:
++              purge_kernel_dcache_range_asm(addr, addr + size);
++              return;
++      default:
++              BUG();
++      }
+ }
+-- 
+2.39.2
+
diff --git a/queue-6.3/pci-dpc-quirk-pio-log-size-for-intel-ice-lake-root-p.patch b/queue-6.3/pci-dpc-quirk-pio-log-size-for-intel-ice-lake-root-p.patch
new file mode 100644 (file)
index 0000000..7054b06
--- /dev/null
@@ -0,0 +1,62 @@
+From 6c7606c3c79eb2b70304050d837f3abcbf70fce7 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Thu, 11 May 2023 15:19:05 +0300
+Subject: PCI/DPC: Quirk PIO log size for Intel Ice Lake Root Ports
+
+From: Mika Westerberg <mika.westerberg@linux.intel.com>
+
+[ Upstream commit 3b8803494a0612acdeee714cb72aa142b1e05ce5 ]
+
+Commit 5459c0b70467 ("PCI/DPC: Quirk PIO log size for certain Intel Root
+Ports") added quirks for Tiger and Alder Lake Root Ports but missed that
+the same issue exists also in the previous generation, Ice Lake.
+
+Apply the quirk for Ice Lake Root Ports as well.  This prevents kernel
+complaints like:
+
+  DPC: RP PIO log size 0 is invalid
+
+and also enables the DPC driver to dump the RP PIO Log registers when DPC
+is triggered.
+
+[bhelgaas: add dmesg warning and RP PIO Log dump info]
+Closes: https://bugzilla.kernel.org/show_bug.cgi?id=209943
+Link: https://lore.kernel.org/r/20230511121905.73949-1-mika.westerberg@linux.intel.com
+Reported-by: Mark Blakeney <mark.blakeney@bullet-systems.net>
+Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
+Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/pci/quirks.c | 9 +++++++--
+ 1 file changed, 7 insertions(+), 2 deletions(-)
+
+diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c
+index f4e2a88729fd1..c525867760bf8 100644
+--- a/drivers/pci/quirks.c
++++ b/drivers/pci/quirks.c
+@@ -6003,8 +6003,9 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x56c1, aspm_l1_acceptable_latency
+ #ifdef CONFIG_PCIE_DPC
+ /*
+- * Intel Tiger Lake and Alder Lake BIOS has a bug that clears the DPC
+- * RP PIO Log Size of the integrated Thunderbolt PCIe Root Ports.
++ * Intel Ice Lake, Tiger Lake and Alder Lake BIOS has a bug that clears
++ * the DPC RP PIO Log Size of the integrated Thunderbolt PCIe Root
++ * Ports.
+  */
+ static void dpc_log_size(struct pci_dev *dev)
+ {
+@@ -6027,6 +6028,10 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x461f, dpc_log_size);
+ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x462f, dpc_log_size);
+ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x463f, dpc_log_size);
+ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x466e, dpc_log_size);
++DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x8a1d, dpc_log_size);
++DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x8a1f, dpc_log_size);
++DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x8a21, dpc_log_size);
++DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x8a23, dpc_log_size);
+ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x9a23, dpc_log_size);
+ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x9a25, dpc_log_size);
+ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x9a27, dpc_log_size);
+-- 
+2.39.2
+
diff --git a/queue-6.3/platform-x86-asus-wmi-ignore-wmi-events-with-codes-0.patch b/queue-6.3/platform-x86-asus-wmi-ignore-wmi-events-with-codes-0.patch
new file mode 100644 (file)
index 0000000..30cdc0c
--- /dev/null
@@ -0,0 +1,50 @@
+From eb682c1fe8e6c8a2e34e65acf3b4b437c8e0c330 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Fri, 12 May 2023 13:15:17 +0300
+Subject: platform/x86: asus-wmi: Ignore WMI events with codes 0x7B, 0xC0
+
+From: Alexandru Sorodoc <ealex95@gmail.com>
+
+[ Upstream commit 362c1f2ec82cb65940e1c73e15a395a7a891fc6f ]
+
+On ASUS GU604V the key 0x7B is issued when the charger is connected or
+disconnected, and key 0xC0 is issued when an external display is
+connected or disconnected.
+
+This commit maps them to KE_IGNORE to slience kernel messages about
+unknown keys, such as:
+
+    kernel: asus_wmi: Unknown key code 0x7b
+
+Signed-off-by: Alexandru Sorodoc <ealex95@gmail.com>
+Link: https://lore.kernel.org/r/20230512101517.47416-1-ealex95@gmail.com
+Reviewed-by: Hans de Goede <hdegoede@redhat.com>
+Signed-off-by: Hans de Goede <hdegoede@redhat.com>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/platform/x86/asus-nb-wmi.c | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/drivers/platform/x86/asus-nb-wmi.c b/drivers/platform/x86/asus-nb-wmi.c
+index e2c9a68d12df9..fdf7da06af306 100644
+--- a/drivers/platform/x86/asus-nb-wmi.c
++++ b/drivers/platform/x86/asus-nb-wmi.c
+@@ -555,6 +555,7 @@ static const struct key_entry asus_nb_wmi_keymap[] = {
+       { KE_KEY, 0x71, { KEY_F13 } }, /* General-purpose button */
+       { KE_IGNORE, 0x79, },  /* Charger type dectection notification */
+       { KE_KEY, 0x7a, { KEY_ALS_TOGGLE } }, /* Ambient Light Sensor Toggle */
++      { KE_IGNORE, 0x7B, }, /* Charger connect/disconnect notification */
+       { KE_KEY, 0x7c, { KEY_MICMUTE } },
+       { KE_KEY, 0x7D, { KEY_BLUETOOTH } }, /* Bluetooth Enable */
+       { KE_KEY, 0x7E, { KEY_BLUETOOTH } }, /* Bluetooth Disable */
+@@ -584,6 +585,7 @@ static const struct key_entry asus_nb_wmi_keymap[] = {
+       { KE_KEY, 0xAE, { KEY_FN_F5 } }, /* Fn+F5 fan mode on 2020+ */
+       { KE_KEY, 0xB3, { KEY_PROG4 } }, /* AURA */
+       { KE_KEY, 0xB5, { KEY_CALC } },
++      { KE_IGNORE, 0xC0, }, /* External display connect/disconnect notification */
+       { KE_KEY, 0xC4, { KEY_KBDILLUMUP } },
+       { KE_KEY, 0xC5, { KEY_KBDILLUMDOWN } },
+       { KE_IGNORE, 0xC6, },  /* Ambient Light Sensor notification */
+-- 
+2.39.2
+
diff --git a/queue-6.3/power-supply-ab8500-fix-external_power_changed-race.patch b/queue-6.3/power-supply-ab8500-fix-external_power_changed-race.patch
new file mode 100644 (file)
index 0000000..49a8a8f
--- /dev/null
@@ -0,0 +1,73 @@
+From c3cf5aa9477c7b855fef44ba30f8193807521acf Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Sat, 15 Apr 2023 18:07:29 +0200
+Subject: power: supply: ab8500: Fix external_power_changed race
+
+From: Hans de Goede <hdegoede@redhat.com>
+
+[ Upstream commit a5299ce4e96f3e8930e9c051b28d8093ada87b08 ]
+
+ab8500_btemp_external_power_changed() dereferences di->btemp_psy,
+which gets sets in ab8500_btemp_probe() like this:
+
+        di->btemp_psy = devm_power_supply_register(dev, &ab8500_btemp_desc,
+                                                   &psy_cfg);
+
+As soon as devm_power_supply_register() has called device_add()
+the external_power_changed callback can get called. So there is a window
+where ab8500_btemp_external_power_changed() may get called while
+di->btemp_psy has not been set yet leading to a NULL pointer dereference.
+
+Fixing this is easy. The external_power_changed callback gets passed
+the power_supply which will eventually get stored in di->btemp_psy,
+so ab8500_btemp_external_power_changed() can simply directly use
+the passed in psy argument which is always valid.
+
+And the same applies to ab8500_fg_external_power_changed().
+
+Signed-off-by: Hans de Goede <hdegoede@redhat.com>
+Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
+Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/power/supply/ab8500_btemp.c | 6 ++----
+ drivers/power/supply/ab8500_fg.c    | 6 ++----
+ 2 files changed, 4 insertions(+), 8 deletions(-)
+
+diff --git a/drivers/power/supply/ab8500_btemp.c b/drivers/power/supply/ab8500_btemp.c
+index 307ee6f71042e..6f83e99d2eb72 100644
+--- a/drivers/power/supply/ab8500_btemp.c
++++ b/drivers/power/supply/ab8500_btemp.c
+@@ -624,10 +624,8 @@ static int ab8500_btemp_get_ext_psy_data(struct device *dev, void *data)
+  */
+ static void ab8500_btemp_external_power_changed(struct power_supply *psy)
+ {
+-      struct ab8500_btemp *di = power_supply_get_drvdata(psy);
+-
+-      class_for_each_device(power_supply_class, NULL,
+-              di->btemp_psy, ab8500_btemp_get_ext_psy_data);
++      class_for_each_device(power_supply_class, NULL, psy,
++                            ab8500_btemp_get_ext_psy_data);
+ }
+ /* ab8500 btemp driver interrupts and their respective isr */
+diff --git a/drivers/power/supply/ab8500_fg.c b/drivers/power/supply/ab8500_fg.c
+index 41a7bff9ac376..53560fbb6dcd3 100644
+--- a/drivers/power/supply/ab8500_fg.c
++++ b/drivers/power/supply/ab8500_fg.c
+@@ -2407,10 +2407,8 @@ static int ab8500_fg_init_hw_registers(struct ab8500_fg *di)
+  */
+ static void ab8500_fg_external_power_changed(struct power_supply *psy)
+ {
+-      struct ab8500_fg *di = power_supply_get_drvdata(psy);
+-
+-      class_for_each_device(power_supply_class, NULL,
+-              di->fg_psy, ab8500_fg_get_ext_psy_data);
++      class_for_each_device(power_supply_class, NULL, psy,
++                            ab8500_fg_get_ext_psy_data);
+ }
+ /**
+-- 
+2.39.2
+
diff --git a/queue-6.3/power-supply-bq27xxx-use-mod_delayed_work-instead-of.patch b/queue-6.3/power-supply-bq27xxx-use-mod_delayed_work-instead-of.patch
new file mode 100644 (file)
index 0000000..f023d82
--- /dev/null
@@ -0,0 +1,40 @@
+From 973ecaf0d6e0f36f629ab38dcd343bff4ba1b68f Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Sat, 15 Apr 2023 20:23:39 +0200
+Subject: power: supply: bq27xxx: Use mod_delayed_work() instead of cancel() +
+ schedule()
+
+From: Hans de Goede <hdegoede@redhat.com>
+
+[ Upstream commit 59dddea9879713423c7b2ade43c423bb71e0d216 ]
+
+Use mod_delayed_work() instead of separate cancel_delayed_work_sync() +
+schedule_delayed_work() calls.
+
+Signed-off-by: Hans de Goede <hdegoede@redhat.com>
+Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/power/supply/bq27xxx_battery.c | 6 ++----
+ 1 file changed, 2 insertions(+), 4 deletions(-)
+
+diff --git a/drivers/power/supply/bq27xxx_battery.c b/drivers/power/supply/bq27xxx_battery.c
+index 929e813b9c443..4296600e8912a 100644
+--- a/drivers/power/supply/bq27xxx_battery.c
++++ b/drivers/power/supply/bq27xxx_battery.c
+@@ -1083,10 +1083,8 @@ static int poll_interval_param_set(const char *val, const struct kernel_param *k
+               return ret;
+       mutex_lock(&bq27xxx_list_lock);
+-      list_for_each_entry(di, &bq27xxx_battery_devices, list) {
+-              cancel_delayed_work_sync(&di->work);
+-              schedule_delayed_work(&di->work, 0);
+-      }
++      list_for_each_entry(di, &bq27xxx_battery_devices, list)
++              mod_delayed_work(system_wq, &di->work, 0);
+       mutex_unlock(&bq27xxx_list_lock);
+       return ret;
+-- 
+2.39.2
+
diff --git a/queue-6.3/power-supply-fix-logic-checking-if-system-is-running.patch b/queue-6.3/power-supply-fix-logic-checking-if-system-is-running.patch
new file mode 100644 (file)
index 0000000..0bb4067
--- /dev/null
@@ -0,0 +1,66 @@
+From 24259b318b4d4173a15372ea3c495867cd1cba9e Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Tue, 16 May 2023 13:25:40 -0500
+Subject: power: supply: Fix logic checking if system is running from battery
+
+From: Mario Limonciello <mario.limonciello@amd.com>
+
+[ Upstream commit 95339f40a8b652b5b1773def31e63fc53c26378a ]
+
+The logic used for power_supply_is_system_supplied() counts all power
+supplies and assumes that the system is running from AC if there is
+either a non-battery power-supply reporting to be online or if no
+power-supplies exist at all.
+
+The second rule is for desktop systems, that don't have any
+battery/charger devices. These systems will incorrectly report to be
+powered from battery once a device scope power-supply is registered
+(e.g. a HID device), since these power-supplies increase the counter.
+
+Apart from HID devices, recent dGPUs provide UCSI power supplies on a
+desktop systems. The dGPU by default doesn't have anything plugged in so
+it's 'offline'. This makes power_supply_is_system_supplied() return 0
+with a count of 1 meaning all drivers that use this get a wrong judgement.
+
+To fix this case adjust the logic to also examine the scope of the power
+supply. If the power supply is deemed a device power supply, then don't
+count it.
+
+Cc: Evan Quan <Evan.Quan@amd.com>
+Suggested-by: Lijo Lazar <Lijo.Lazar@amd.com>
+Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
+Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/power/supply/power_supply_core.c | 8 ++++++--
+ 1 file changed, 6 insertions(+), 2 deletions(-)
+
+diff --git a/drivers/power/supply/power_supply_core.c b/drivers/power/supply/power_supply_core.c
+index f3d7c1da299fe..d325e6dbc7709 100644
+--- a/drivers/power/supply/power_supply_core.c
++++ b/drivers/power/supply/power_supply_core.c
+@@ -348,6 +348,10 @@ static int __power_supply_is_system_supplied(struct device *dev, void *data)
+       struct power_supply *psy = dev_get_drvdata(dev);
+       unsigned int *count = data;
++      if (!psy->desc->get_property(psy, POWER_SUPPLY_PROP_SCOPE, &ret))
++              if (ret.intval == POWER_SUPPLY_SCOPE_DEVICE)
++                      return 0;
++
+       (*count)++;
+       if (psy->desc->type != POWER_SUPPLY_TYPE_BATTERY)
+               if (!psy->desc->get_property(psy, POWER_SUPPLY_PROP_ONLINE,
+@@ -366,8 +370,8 @@ int power_supply_is_system_supplied(void)
+                                     __power_supply_is_system_supplied);
+       /*
+-       * If no power class device was found at all, most probably we are
+-       * running on a desktop system, so assume we are on mains power.
++       * If no system scope power class device was found at all, most probably we
++       * are running on a desktop system, so assume we are on mains power.
+        */
+       if (count == 0)
+               return 1;
+-- 
+2.39.2
+
diff --git a/queue-6.3/power-supply-ratelimit-no-data-debug-output.patch b/queue-6.3/power-supply-ratelimit-no-data-debug-output.patch
new file mode 100644 (file)
index 0000000..a1cb0e9
--- /dev/null
@@ -0,0 +1,43 @@
+From 3ab0a7f888be443dfc8d00c8ffda613910d8d001 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Sun, 5 Mar 2023 21:52:26 +0100
+Subject: power: supply: Ratelimit no data debug output
+
+From: Marek Vasut <marex@denx.de>
+
+[ Upstream commit 155c45a25679f571c2ae57d10db843a9dfc63430 ]
+
+Reduce the amount of output this dev_dbg() statement emits into logs,
+otherwise if system software polls the sysfs entry for data and keeps
+getting -ENODATA, it could end up filling the logs up.
+
+This does in fact make systemd journald choke, since during boot the
+sysfs power supply entries are polled and if journald starts at the
+same time, the journal is just being repeatedly filled up, and the
+system stops on trying to start journald without booting any further.
+
+Signed-off-by: Marek Vasut <marex@denx.de>
+Reviewed-by: Hans de Goede <hdegoede@redhat.com>
+Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/power/supply/power_supply_sysfs.c | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/drivers/power/supply/power_supply_sysfs.c b/drivers/power/supply/power_supply_sysfs.c
+index c228205e09538..4bbb3053eef44 100644
+--- a/drivers/power/supply/power_supply_sysfs.c
++++ b/drivers/power/supply/power_supply_sysfs.c
+@@ -285,7 +285,8 @@ static ssize_t power_supply_show_property(struct device *dev,
+               if (ret < 0) {
+                       if (ret == -ENODATA)
+-                              dev_dbg(dev, "driver has no data for `%s' property\n",
++                              dev_dbg_ratelimited(dev,
++                                      "driver has no data for `%s' property\n",
+                                       attr->attr.name);
+                       else if (ret != -ENODEV && ret != -EAGAIN)
+                               dev_err_ratelimited(dev,
+-- 
+2.39.2
+
diff --git a/queue-6.3/power-supply-sc27xx-fix-external_power_changed-race.patch b/queue-6.3/power-supply-sc27xx-fix-external_power_changed-race.patch
new file mode 100644 (file)
index 0000000..377bf47
--- /dev/null
@@ -0,0 +1,70 @@
+From 54af5c17ad0de9ffbdbd77039666133bdfc7e2c1 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Sat, 15 Apr 2023 18:07:32 +0200
+Subject: power: supply: sc27xx: Fix external_power_changed race
+
+From: Hans de Goede <hdegoede@redhat.com>
+
+[ Upstream commit 4d5c129d6c8993fe96e9ae712141eedcb9ca68c2 ]
+
+sc27xx_fgu_external_power_changed() dereferences data->battery,
+which gets sets in ab8500_btemp_probe() like this:
+
+       data->battery = devm_power_supply_register(dev, &sc27xx_fgu_desc,
+                                                   &fgu_cfg);
+
+As soon as devm_power_supply_register() has called device_add()
+the external_power_changed callback can get called. So there is a window
+where sc27xx_fgu_external_power_changed() may get called while
+data->battery has not been set yet leading to a NULL pointer dereference.
+
+Fixing this is easy. The external_power_changed callback gets passed
+the power_supply which will eventually get stored in data->battery,
+so sc27xx_fgu_external_power_changed() can simply directly use
+the passed in psy argument which is always valid.
+
+After this change sc27xx_fgu_external_power_changed() is reduced to just
+"power_supply_changed(psy);" and it has the same prototype. While at it
+simply replace it with making the external_power_changed callback
+directly point to power_supply_changed.
+
+Cc: Orson Zhai <orsonzhai@gmail.com>
+Cc: Chunyan Zhang <zhang.lyra@gmail.com>
+Signed-off-by: Hans de Goede <hdegoede@redhat.com>
+Reviewed-by: Baolin Wang <baolin.wang@linux.alibaba.com>
+Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/power/supply/sc27xx_fuel_gauge.c | 9 +--------
+ 1 file changed, 1 insertion(+), 8 deletions(-)
+
+diff --git a/drivers/power/supply/sc27xx_fuel_gauge.c b/drivers/power/supply/sc27xx_fuel_gauge.c
+index 632977f84b954..bd23c4d9fed43 100644
+--- a/drivers/power/supply/sc27xx_fuel_gauge.c
++++ b/drivers/power/supply/sc27xx_fuel_gauge.c
+@@ -733,13 +733,6 @@ static int sc27xx_fgu_set_property(struct power_supply *psy,
+       return ret;
+ }
+-static void sc27xx_fgu_external_power_changed(struct power_supply *psy)
+-{
+-      struct sc27xx_fgu_data *data = power_supply_get_drvdata(psy);
+-
+-      power_supply_changed(data->battery);
+-}
+-
+ static int sc27xx_fgu_property_is_writeable(struct power_supply *psy,
+                                           enum power_supply_property psp)
+ {
+@@ -774,7 +767,7 @@ static const struct power_supply_desc sc27xx_fgu_desc = {
+       .num_properties         = ARRAY_SIZE(sc27xx_fgu_props),
+       .get_property           = sc27xx_fgu_get_property,
+       .set_property           = sc27xx_fgu_set_property,
+-      .external_power_changed = sc27xx_fgu_external_power_changed,
++      .external_power_changed = power_supply_changed,
+       .property_is_writeable  = sc27xx_fgu_property_is_writeable,
+       .no_thermal             = true,
+ };
+-- 
+2.39.2
+
diff --git a/queue-6.3/regulator-fix-error-checking-for-debugfs_create_dir.patch b/queue-6.3/regulator-fix-error-checking-for-debugfs_create_dir.patch
new file mode 100644 (file)
index 0000000..388573c
--- /dev/null
@@ -0,0 +1,46 @@
+From c09eaf8f6f56b9478fca98e60778c6bba76fa536 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Mon, 15 May 2023 22:29:38 +0500
+Subject: regulator: Fix error checking for debugfs_create_dir
+
+From: Osama Muhammad <osmtendev@gmail.com>
+
+[ Upstream commit 2bf1c45be3b8f3a3f898d0756c1282f09719debd ]
+
+This patch fixes the error checking in core.c in debugfs_create_dir.
+The correct way to check if an error occurred is 'IS_ERR' inline function.
+
+Signed-off-by: Osama Muhammad <osmtendev@gmail.com
+Suggested-by: Ivan Orlov <ivan.orlov0322@gmail.com
+Link: https://lore.kernel.org/r/20230515172938.13338-1-osmtendev@gmail.com
+Signed-off-by: Mark Brown <broonie@kernel.org
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/regulator/core.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c
+index 08726bc0da9d7..323e8187a98ff 100644
+--- a/drivers/regulator/core.c
++++ b/drivers/regulator/core.c
+@@ -5263,7 +5263,7 @@ static void rdev_init_debugfs(struct regulator_dev *rdev)
+       }
+       rdev->debugfs = debugfs_create_dir(rname, debugfs_root);
+-      if (!rdev->debugfs) {
++      if (IS_ERR(rdev->debugfs)) {
+               rdev_warn(rdev, "Failed to create debugfs directory\n");
+               return;
+       }
+@@ -6185,7 +6185,7 @@ static int __init regulator_init(void)
+       ret = class_register(&regulator_class);
+       debugfs_root = debugfs_create_dir("regulator", NULL);
+-      if (!debugfs_root)
++      if (IS_ERR(debugfs_root))
+               pr_warn("regulator: Failed to create debugfs directory\n");
+ #ifdef CONFIG_DEBUG_FS
+-- 
+2.39.2
+
diff --git a/queue-6.3/selftests-gpio-gpio-sim-fix-bug-test-failed-due-to-r.patch b/queue-6.3/selftests-gpio-gpio-sim-fix-bug-test-failed-due-to-r.patch
new file mode 100644 (file)
index 0000000..14eb327
--- /dev/null
@@ -0,0 +1,55 @@
+From a514250f4fffd7a25f79d1cedd2f0877569967ba Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Tue, 11 Apr 2023 20:15:20 +0300
+Subject: selftests: gpio: gpio-sim: Fix BUG: test FAILED due to recent change
+
+From: Mirsad Todorovac <mirsad.todorovac@alu.unizg.hr>
+
+[ Upstream commit 976d3c6778e99390c6d854d140b746d12ea18a51 ]
+
+According to Mirsad the gpio-sim.sh test appears to FAIL in a wrong way
+due to missing initialisation of shell variables:
+
+ 4.2. Bias settings work correctly
+ cat: /sys/devices/platform/gpio-sim.0/gpiochip18/sim_gpio0/value: No such file or directory
+ ./gpio-sim.sh: line 393: test: =: unary operator expected
+ bias setting does not work
+ GPIO gpio-sim test FAIL
+
+After this change the test passed:
+
+ 4.2. Bias settings work correctly
+ GPIO gpio-sim test PASS
+
+His testing environment is AlmaLinux 8.7 on Lenovo desktop box with
+the latest Linux kernel based on v6.2:
+
+  Linux 6.2.0-mglru-kmlk-andy-09238-gd2980d8d8265 x86_64
+
+Suggested-by: Mirsad Todorovac <mirsad.todorovac@alu.unizg.hr>
+Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
+Tested-by: Mirsad Goran Todorovac <mirsad.todorovac@alu.unizg.hr>
+Signed-off-by: Mirsad Goran Todorovac <mirsad.todorovac@alu.unizg.hr>
+Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ tools/testing/selftests/gpio/gpio-sim.sh | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/tools/testing/selftests/gpio/gpio-sim.sh b/tools/testing/selftests/gpio/gpio-sim.sh
+index 9f539d454ee4d..fa2ce2b9dd5fc 100755
+--- a/tools/testing/selftests/gpio/gpio-sim.sh
++++ b/tools/testing/selftests/gpio/gpio-sim.sh
+@@ -389,6 +389,9 @@ create_chip chip
+ create_bank chip bank
+ set_num_lines chip bank 8
+ enable_chip chip
++DEVNAME=`configfs_dev_name chip`
++CHIPNAME=`configfs_chip_name chip bank`
++SYSFS_PATH="/sys/devices/platform/$DEVNAME/$CHIPNAME/sim_gpio0/value"
+ $BASE_DIR/gpio-mockup-cdev -b pull-up /dev/`configfs_chip_name chip bank` 0
+ test `cat $SYSFS_PATH` = "1" || fail "bias setting does not work"
+ remove_chip chip
+-- 
+2.39.2
+
index e52434bf660b42557a498e40e74791d8d3819d89..65d5416e5cf8c540d956db1690d2e4e2040613a4 100644 (file)
@@ -5,3 +5,40 @@ cgroup-fix-missing-cpus_read_-lock-unlock-in-cgroup_.patch
 qcom-llcc-edac-fix-the-base-address-used-for-accessi.patch
 edac-qcom-get-rid-of-hardcoded-register-offsets.patch
 ksmbd-validate-smb-request-protocol-id.patch
+of-overlay-fix-missing-of_node_put-in-error-case-of-.patch
+power-supply-ab8500-fix-external_power_changed-race.patch
+power-supply-sc27xx-fix-external_power_changed-race.patch
+power-supply-bq27xxx-use-mod_delayed_work-instead-of.patch
+arm-dts-vexpress-add-missing-cache-properties.patch
+arm64-dts-arm-add-missing-cache-properties.patch
+tools-gpio-fix-debounce_period_us-output-of-lsgpio.patch
+selftests-gpio-gpio-sim-fix-bug-test-failed-due-to-r.patch
+power-supply-ratelimit-no-data-debug-output.patch
+pci-dpc-quirk-pio-log-size-for-intel-ice-lake-root-p.patch
+platform-x86-asus-wmi-ignore-wmi-events-with-codes-0.patch
+regulator-fix-error-checking-for-debugfs_create_dir.patch
+irqchip-gic-v3-disable-pseudo-nmis-on-mediatek-devic.patch
+irqchip-meson-gpio-mark-of-related-data-as-maybe-unu.patch
+power-supply-fix-logic-checking-if-system-is-running.patch
+drm-panel-orientation-quirks-change-air-s-quirk-to-s.patch
+btrfs-scrub-try-harder-to-mark-raid56-block-groups-r.patch
+btrfs-handle-memory-allocation-failure-in-btrfs_csum.patch
+asoc-soc-pcm-test-if-a-be-can-be-prepared.patch
+sfc-fix-devlink-info-error-handling.patch
+asoc-intel-avs-account-for-uid-of-acpi-device.patch
+asoc-intel-avs-fix-avs_path_module-instance_id-size.patch
+asoc-intel-avs-add-missing-checks-on-fe-startup.patch
+parisc-improve-cache-flushing-for-pcxl-in-arch_sync_.patch
+parisc-flush-gatt-writes-and-adjust-gatt-mask-in-par.patch
+erofs-use-hipri-by-default-if-per-cpu-kthreads-are-e.patch
+mips-unhide-pata_platform.patch
+mips-restore-au1300-support.patch
+mips-alchemy-fix-dbdma2.patch
+mips-move-initrd_start-check-after-initrd-address-sa.patch
+asoc-cs35l41-fix-default-regmap-values-for-some-regi.patch
+asoc-dwc-move-dma-init-to-snd_soc_dai_driver-probe.patch
+xen-blkfront-only-check-req_fua-for-writes.patch
+drm-amd-amdgpu-fix-missing-buffer-object-unlock-in-f.patch
+io_uring-unlock-sqd-lock-before-sq-thread-release-cp.patch
+nvme-add-maxio-1602-to-bogus-nid-list.patch
+irqchip-gic-correctly-validate-of-quirk-descriptors.patch
diff --git a/queue-6.3/sfc-fix-devlink-info-error-handling.patch b/queue-6.3/sfc-fix-devlink-info-error-handling.patch
new file mode 100644 (file)
index 0000000..1d04851
--- /dev/null
@@ -0,0 +1,154 @@
+From 39dcf7e6974dffb417ecd9807151e20a8c9c3bd0 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Thu, 18 May 2023 06:48:22 +0100
+Subject: sfc: fix devlink info error handling
+
+From: Alejandro Lucero <alejandro.lucero-palau@amd.com>
+
+[ Upstream commit cfcb942863f6fce9266e1957a021e6c7295dee42 ]
+
+Avoid early devlink info return if errors arise with MCDI commands
+executed for getting the required info from the device. The rationale
+is some commands can fail but later ones could still give useful data.
+Moreover, some nvram partitions could not be present which needs to be
+handled as a non error.
+
+The specific errors are reported through system messages and if any
+error appears, it will be reported generically through extack.
+
+Fixes 14743ddd2495 ("sfc: add devlink info support for ef100")
+Signed-off-by: Alejandro Lucero <alejandro.lucero-palau@amd.com>
+Acked-by: Martin Habets <habetsm.xilinx@gmail.com>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/net/ethernet/sfc/efx_devlink.c | 95 ++++++++++++--------------
+ 1 file changed, 45 insertions(+), 50 deletions(-)
+
+diff --git a/drivers/net/ethernet/sfc/efx_devlink.c b/drivers/net/ethernet/sfc/efx_devlink.c
+index 381b805659d39..ef9971cbb695d 100644
+--- a/drivers/net/ethernet/sfc/efx_devlink.c
++++ b/drivers/net/ethernet/sfc/efx_devlink.c
+@@ -171,9 +171,14 @@ static int efx_devlink_info_nvram_partition(struct efx_nic *efx,
+       rc = efx_mcdi_nvram_metadata(efx, partition_type, NULL, version, NULL,
+                                    0);
++
++      /* If the partition does not exist, that is not an error. */
++      if (rc == -ENOENT)
++              return 0;
++
+       if (rc) {
+-              netif_err(efx, drv, efx->net_dev, "mcdi nvram %s: failed\n",
+-                        version_name);
++              netif_err(efx, drv, efx->net_dev, "mcdi nvram %s: failed (rc=%d)\n",
++                        version_name, rc);
+               return rc;
+       }
+@@ -187,36 +192,33 @@ static int efx_devlink_info_nvram_partition(struct efx_nic *efx,
+ static int efx_devlink_info_stored_versions(struct efx_nic *efx,
+                                           struct devlink_info_req *req)
+ {
+-      int rc;
+-
+-      rc = efx_devlink_info_nvram_partition(efx, req,
+-                                            NVRAM_PARTITION_TYPE_BUNDLE,
+-                                            DEVLINK_INFO_VERSION_GENERIC_FW_BUNDLE_ID);
+-      if (rc)
+-              return rc;
+-
+-      rc = efx_devlink_info_nvram_partition(efx, req,
+-                                            NVRAM_PARTITION_TYPE_MC_FIRMWARE,
+-                                            DEVLINK_INFO_VERSION_GENERIC_FW_MGMT);
+-      if (rc)
+-              return rc;
+-
+-      rc = efx_devlink_info_nvram_partition(efx, req,
+-                                            NVRAM_PARTITION_TYPE_SUC_FIRMWARE,
+-                                            EFX_DEVLINK_INFO_VERSION_FW_MGMT_SUC);
+-      if (rc)
+-              return rc;
+-
+-      rc = efx_devlink_info_nvram_partition(efx, req,
+-                                            NVRAM_PARTITION_TYPE_EXPANSION_ROM,
+-                                            EFX_DEVLINK_INFO_VERSION_FW_EXPROM);
+-      if (rc)
+-              return rc;
++      int err;
+-      rc = efx_devlink_info_nvram_partition(efx, req,
+-                                            NVRAM_PARTITION_TYPE_EXPANSION_UEFI,
+-                                            EFX_DEVLINK_INFO_VERSION_FW_UEFI);
+-      return rc;
++      /* We do not care here about the specific error but just if an error
++       * happened. The specific error will be reported inside the call
++       * through system messages, and if any error happened in any call
++       * below, we report it through extack.
++       */
++      err = efx_devlink_info_nvram_partition(efx, req,
++                                             NVRAM_PARTITION_TYPE_BUNDLE,
++                                             DEVLINK_INFO_VERSION_GENERIC_FW_BUNDLE_ID);
++
++      err |= efx_devlink_info_nvram_partition(efx, req,
++                                              NVRAM_PARTITION_TYPE_MC_FIRMWARE,
++                                              DEVLINK_INFO_VERSION_GENERIC_FW_MGMT);
++
++      err |= efx_devlink_info_nvram_partition(efx, req,
++                                              NVRAM_PARTITION_TYPE_SUC_FIRMWARE,
++                                              EFX_DEVLINK_INFO_VERSION_FW_MGMT_SUC);
++
++      err |= efx_devlink_info_nvram_partition(efx, req,
++                                              NVRAM_PARTITION_TYPE_EXPANSION_ROM,
++                                              EFX_DEVLINK_INFO_VERSION_FW_EXPROM);
++
++      err |= efx_devlink_info_nvram_partition(efx, req,
++                                              NVRAM_PARTITION_TYPE_EXPANSION_UEFI,
++                                              EFX_DEVLINK_INFO_VERSION_FW_UEFI);
++      return err;
+ }
+ #define EFX_VER_FLAG(_f)      \
+@@ -587,27 +589,20 @@ static int efx_devlink_info_get(struct devlink *devlink,
+ {
+       struct efx_devlink *devlink_private = devlink_priv(devlink);
+       struct efx_nic *efx = devlink_private->efx;
+-      int rc;
++      int err;
+-      /* Several different MCDI commands are used. We report first error
+-       * through extack returning at that point. Specific error
+-       * information via system messages.
++      /* Several different MCDI commands are used. We report if errors
++       * happened through extack. Specific error information via system
++       * messages inside the calls.
+        */
+-      rc = efx_devlink_info_board_cfg(efx, req);
+-      if (rc) {
+-              NL_SET_ERR_MSG_MOD(extack, "Getting board info failed");
+-              return rc;
+-      }
+-      rc = efx_devlink_info_stored_versions(efx, req);
+-      if (rc) {
+-              NL_SET_ERR_MSG_MOD(extack, "Getting stored versions failed");
+-              return rc;
+-      }
+-      rc = efx_devlink_info_running_versions(efx, req);
+-      if (rc) {
+-              NL_SET_ERR_MSG_MOD(extack, "Getting running versions failed");
+-              return rc;
+-      }
++      err = efx_devlink_info_board_cfg(efx, req);
++
++      err |= efx_devlink_info_stored_versions(efx, req);
++
++      err |= efx_devlink_info_running_versions(efx, req);
++
++      if (err)
++              NL_SET_ERR_MSG_MOD(extack, "Errors when getting device info. Check system messages");
+       return 0;
+ }
+-- 
+2.39.2
+
diff --git a/queue-6.3/tools-gpio-fix-debounce_period_us-output-of-lsgpio.patch b/queue-6.3/tools-gpio-fix-debounce_period_us-output-of-lsgpio.patch
new file mode 100644 (file)
index 0000000..da4d75c
--- /dev/null
@@ -0,0 +1,37 @@
+From 5b320a07780e4c27128e9981a27ebebc61f11fd6 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Mon, 8 May 2023 15:18:48 +0200
+Subject: tools: gpio: fix debounce_period_us output of lsgpio
+
+From: Milo Spadacini <milo.spadacini@gmail.com>
+
+[ Upstream commit eb4b8eca1bad98f4b8574558a74f041f9acb5a54 ]
+
+Fix incorrect output that could occur when more attributes are used and
+GPIO_V2_LINE_ATTR_ID_DEBOUNCE is not the first one.
+
+Signed-off-by: Milo Spadacini <milo.spadacini@gmail.com>
+Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
+Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
+Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ tools/gpio/lsgpio.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/tools/gpio/lsgpio.c b/tools/gpio/lsgpio.c
+index c61d061247e17..52a0be45410c9 100644
+--- a/tools/gpio/lsgpio.c
++++ b/tools/gpio/lsgpio.c
+@@ -94,7 +94,7 @@ static void print_attributes(struct gpio_v2_line_info *info)
+       for (i = 0; i < info->num_attrs; i++) {
+               if (info->attrs[i].id == GPIO_V2_LINE_ATTR_ID_DEBOUNCE)
+                       fprintf(stdout, ", debounce_period=%dusec",
+-                              info->attrs[0].debounce_period_us);
++                              info->attrs[i].debounce_period_us);
+       }
+ }
+-- 
+2.39.2
+
diff --git a/queue-6.3/xen-blkfront-only-check-req_fua-for-writes.patch b/queue-6.3/xen-blkfront-only-check-req_fua-for-writes.patch
new file mode 100644 (file)
index 0000000..032c3bc
--- /dev/null
@@ -0,0 +1,45 @@
+From 1e299be6c7d25a4d08b8df1c3f13d4ea9ea7514f Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Wed, 26 Apr 2023 17:40:05 +0100
+Subject: xen/blkfront: Only check REQ_FUA for writes
+
+From: Ross Lagerwall <ross.lagerwall@citrix.com>
+
+[ Upstream commit b6ebaa8100090092aa602530d7e8316816d0c98d ]
+
+The existing code silently converts read operations with the
+REQ_FUA bit set into write-barrier operations. This results in data
+loss as the backend scribbles zeroes over the data instead of returning
+it.
+
+While the REQ_FUA bit doesn't make sense on a read operation, at least
+one well-known out-of-tree kernel module does set it and since it
+results in data loss, let's be safe here and only look at REQ_FUA for
+writes.
+
+Signed-off-by: Ross Lagerwall <ross.lagerwall@citrix.com>
+Acked-by: Juergen Gross <jgross@suse.com>
+Link: https://lore.kernel.org/r/20230426164005.2213139-1-ross.lagerwall@citrix.com
+Signed-off-by: Juergen Gross <jgross@suse.com>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/block/xen-blkfront.c | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/drivers/block/xen-blkfront.c b/drivers/block/xen-blkfront.c
+index 23ed258b57f0e..c1890c8a9f6e7 100644
+--- a/drivers/block/xen-blkfront.c
++++ b/drivers/block/xen-blkfront.c
+@@ -780,7 +780,8 @@ static int blkif_queue_rw_req(struct request *req, struct blkfront_ring_info *ri
+               ring_req->u.rw.handle = info->handle;
+               ring_req->operation = rq_data_dir(req) ?
+                       BLKIF_OP_WRITE : BLKIF_OP_READ;
+-              if (req_op(req) == REQ_OP_FLUSH || req->cmd_flags & REQ_FUA) {
++              if (req_op(req) == REQ_OP_FLUSH ||
++                  (req_op(req) == REQ_OP_WRITE && (req->cmd_flags & REQ_FUA))) {
+                       /*
+                        * Ideally we can do an unordered flush-to-disk.
+                        * In case the backend onlysupports barriers, use that.
+-- 
+2.39.2
+