]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
6.12-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 21 Apr 2025 11:41:13 +0000 (13:41 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 21 Apr 2025 11:41:13 +0000 (13:41 +0200)
added patches:
asoc-codecs-lpass-wsa-macro-fix-logic-of-enabling-vi-channels.patch
asoc-codecs-lpass-wsa-macro-fix-vi-feedback-rate.patch
asoc-fsl-fsl_qmc_audio-reset-audio-data-pointers-on-trigger_start-event.patch
asoc-intel-sof_sdw-add-quirk-for-asus-zenbook-s16.patch
asoc-qcom-fix-sc7280-lpass-potential-buffer-overflow.patch
asus-laptop-fix-an-uninitialized-variable.patch
block-integrity-do-not-call-set_page_dirty_lock.patch
objtool-rust-add-one-more-noreturn-rust-function-for-rust-1.86.0.patch
revert-pci-avoid-reset-when-disabled-via-sysfs.patch
rust-disable-clippy-needless_continue.patch
rust-kasan-kbuild-fix-missing-flags-on-first-build.patch
rust-kbuild-use-pound-to-support-gnu-make-4.3.patch
writeback-fix-false-warning-in-inode_to_wb.patch

14 files changed:
queue-6.12/asoc-codecs-lpass-wsa-macro-fix-logic-of-enabling-vi-channels.patch [new file with mode: 0644]
queue-6.12/asoc-codecs-lpass-wsa-macro-fix-vi-feedback-rate.patch [new file with mode: 0644]
queue-6.12/asoc-fsl-fsl_qmc_audio-reset-audio-data-pointers-on-trigger_start-event.patch [new file with mode: 0644]
queue-6.12/asoc-intel-sof_sdw-add-quirk-for-asus-zenbook-s16.patch [new file with mode: 0644]
queue-6.12/asoc-qcom-fix-sc7280-lpass-potential-buffer-overflow.patch [new file with mode: 0644]
queue-6.12/asus-laptop-fix-an-uninitialized-variable.patch [new file with mode: 0644]
queue-6.12/block-integrity-do-not-call-set_page_dirty_lock.patch [new file with mode: 0644]
queue-6.12/objtool-rust-add-one-more-noreturn-rust-function-for-rust-1.86.0.patch [new file with mode: 0644]
queue-6.12/revert-pci-avoid-reset-when-disabled-via-sysfs.patch [new file with mode: 0644]
queue-6.12/rust-disable-clippy-needless_continue.patch [new file with mode: 0644]
queue-6.12/rust-kasan-kbuild-fix-missing-flags-on-first-build.patch [new file with mode: 0644]
queue-6.12/rust-kbuild-use-pound-to-support-gnu-make-4.3.patch [new file with mode: 0644]
queue-6.12/series
queue-6.12/writeback-fix-false-warning-in-inode_to_wb.patch [new file with mode: 0644]

diff --git a/queue-6.12/asoc-codecs-lpass-wsa-macro-fix-logic-of-enabling-vi-channels.patch b/queue-6.12/asoc-codecs-lpass-wsa-macro-fix-logic-of-enabling-vi-channels.patch
new file mode 100644 (file)
index 0000000..60e1ea5
--- /dev/null
@@ -0,0 +1,167 @@
+From 7648beb65600220996ebb2da207610b1ff9b735e Mon Sep 17 00:00:00 2001
+From: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
+Date: Thu, 3 Apr 2025 17:02:09 +0100
+Subject: ASoC: codecs:lpass-wsa-macro: Fix logic of enabling vi channels
+
+From: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
+
+commit 7648beb65600220996ebb2da207610b1ff9b735e upstream.
+
+Existing code only configures one of WSA_MACRO_TX0 or WSA_MACRO_TX1
+paths eventhough we enable both of them. Fix this bug by adding proper
+checks and rearranging some of the common code to able to allow setting
+both TX0 and TX1 paths
+
+Without this patch only one channel gets enabled in VI path instead of 2
+channels. End result would be 1 channel recording instead of 2.
+
+Fixes: 2c4066e5d428 ("ASoC: codecs: lpass-wsa-macro: add dapm widgets and route")
+Cc: stable@vger.kernel.org
+Co-developed-by: Manikantan R <quic_manrav@quicinc.com>
+Signed-off-by: Manikantan R <quic_manrav@quicinc.com>
+Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
+Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
+Link: https://patch.msgid.link/20250403160209.21613-3-srinivas.kandagatla@linaro.org
+Signed-off-by: Mark Brown <broonie@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ sound/soc/codecs/lpass-wsa-macro.c |  108 +++++++++++++++++++++----------------
+ 1 file changed, 63 insertions(+), 45 deletions(-)
+
+--- a/sound/soc/codecs/lpass-wsa-macro.c
++++ b/sound/soc/codecs/lpass-wsa-macro.c
+@@ -1459,6 +1459,67 @@ static void wsa_macro_mclk_enable(struct
+       }
+ }
++static void wsa_macro_enable_disable_vi_sense(struct snd_soc_component *component, bool enable,
++                                              u32 tx_reg0, u32 tx_reg1, u32 val)
++{
++      if (enable) {
++              /* Enable V&I sensing */
++              snd_soc_component_update_bits(component, tx_reg0,
++                                            CDC_WSA_TX_SPKR_PROT_RESET_MASK,
++                                            CDC_WSA_TX_SPKR_PROT_RESET);
++              snd_soc_component_update_bits(component, tx_reg1,
++                                            CDC_WSA_TX_SPKR_PROT_RESET_MASK,
++                                            CDC_WSA_TX_SPKR_PROT_RESET);
++              snd_soc_component_update_bits(component, tx_reg0,
++                                            CDC_WSA_TX_SPKR_PROT_PCM_RATE_MASK,
++                                            val);
++              snd_soc_component_update_bits(component, tx_reg1,
++                                            CDC_WSA_TX_SPKR_PROT_PCM_RATE_MASK,
++                                            val);
++              snd_soc_component_update_bits(component, tx_reg0,
++                                            CDC_WSA_TX_SPKR_PROT_CLK_EN_MASK,
++                                            CDC_WSA_TX_SPKR_PROT_CLK_ENABLE);
++              snd_soc_component_update_bits(component, tx_reg1,
++                                            CDC_WSA_TX_SPKR_PROT_CLK_EN_MASK,
++                                            CDC_WSA_TX_SPKR_PROT_CLK_ENABLE);
++              snd_soc_component_update_bits(component, tx_reg0,
++                                            CDC_WSA_TX_SPKR_PROT_RESET_MASK,
++                                            CDC_WSA_TX_SPKR_PROT_NO_RESET);
++              snd_soc_component_update_bits(component, tx_reg1,
++                                            CDC_WSA_TX_SPKR_PROT_RESET_MASK,
++                                            CDC_WSA_TX_SPKR_PROT_NO_RESET);
++      } else {
++              snd_soc_component_update_bits(component, tx_reg0,
++                                            CDC_WSA_TX_SPKR_PROT_RESET_MASK,
++                                            CDC_WSA_TX_SPKR_PROT_RESET);
++              snd_soc_component_update_bits(component, tx_reg1,
++                                            CDC_WSA_TX_SPKR_PROT_RESET_MASK,
++                                            CDC_WSA_TX_SPKR_PROT_RESET);
++              snd_soc_component_update_bits(component, tx_reg0,
++                                            CDC_WSA_TX_SPKR_PROT_CLK_EN_MASK,
++                                            CDC_WSA_TX_SPKR_PROT_CLK_DISABLE);
++              snd_soc_component_update_bits(component, tx_reg1,
++                                            CDC_WSA_TX_SPKR_PROT_CLK_EN_MASK,
++                                            CDC_WSA_TX_SPKR_PROT_CLK_DISABLE);
++      }
++}
++
++static void wsa_macro_enable_disable_vi_feedback(struct snd_soc_component *component,
++                                               bool enable, u32 rate)
++{
++      struct wsa_macro *wsa = snd_soc_component_get_drvdata(component);
++
++      if (test_bit(WSA_MACRO_TX0, &wsa->active_ch_mask[WSA_MACRO_AIF_VI]))
++              wsa_macro_enable_disable_vi_sense(component, enable,
++                              CDC_WSA_TX0_SPKR_PROT_PATH_CTL,
++                              CDC_WSA_TX1_SPKR_PROT_PATH_CTL, rate);
++
++      if (test_bit(WSA_MACRO_TX1, &wsa->active_ch_mask[WSA_MACRO_AIF_VI]))
++              wsa_macro_enable_disable_vi_sense(component, enable,
++                              CDC_WSA_TX2_SPKR_PROT_PATH_CTL,
++                              CDC_WSA_TX3_SPKR_PROT_PATH_CTL, rate);
++}
++
+ static int wsa_macro_mclk_event(struct snd_soc_dapm_widget *w,
+                               struct snd_kcontrol *kcontrol, int event)
+ {
+@@ -1475,7 +1536,6 @@ static int wsa_macro_enable_vi_feedback(
+ {
+       struct snd_soc_component *component = snd_soc_dapm_to_component(w->dapm);
+       struct wsa_macro *wsa = snd_soc_component_get_drvdata(component);
+-      u32 tx_reg0, tx_reg1;
+       u32 rate_val;
+       switch (wsa->pcm_rate_vi) {
+@@ -1499,56 +1559,14 @@ static int wsa_macro_enable_vi_feedback(
+               break;
+       }
+-      if (test_bit(WSA_MACRO_TX0, &wsa->active_ch_mask[WSA_MACRO_AIF_VI])) {
+-              tx_reg0 = CDC_WSA_TX0_SPKR_PROT_PATH_CTL;
+-              tx_reg1 = CDC_WSA_TX1_SPKR_PROT_PATH_CTL;
+-      } else if (test_bit(WSA_MACRO_TX1, &wsa->active_ch_mask[WSA_MACRO_AIF_VI])) {
+-              tx_reg0 = CDC_WSA_TX2_SPKR_PROT_PATH_CTL;
+-              tx_reg1 = CDC_WSA_TX3_SPKR_PROT_PATH_CTL;
+-      }
+-
+       switch (event) {
+       case SND_SOC_DAPM_POST_PMU:
+               /* Enable V&I sensing */
+-              snd_soc_component_update_bits(component, tx_reg0,
+-                                            CDC_WSA_TX_SPKR_PROT_RESET_MASK,
+-                                            CDC_WSA_TX_SPKR_PROT_RESET);
+-              snd_soc_component_update_bits(component, tx_reg1,
+-                                            CDC_WSA_TX_SPKR_PROT_RESET_MASK,
+-                                            CDC_WSA_TX_SPKR_PROT_RESET);
+-              snd_soc_component_update_bits(component, tx_reg0,
+-                                            CDC_WSA_TX_SPKR_PROT_PCM_RATE_MASK,
+-                                            rate_val);
+-              snd_soc_component_update_bits(component, tx_reg1,
+-                                            CDC_WSA_TX_SPKR_PROT_PCM_RATE_MASK,
+-                                            rate_val);
+-              snd_soc_component_update_bits(component, tx_reg0,
+-                                            CDC_WSA_TX_SPKR_PROT_CLK_EN_MASK,
+-                                            CDC_WSA_TX_SPKR_PROT_CLK_ENABLE);
+-              snd_soc_component_update_bits(component, tx_reg1,
+-                                            CDC_WSA_TX_SPKR_PROT_CLK_EN_MASK,
+-                                            CDC_WSA_TX_SPKR_PROT_CLK_ENABLE);
+-              snd_soc_component_update_bits(component, tx_reg0,
+-                                            CDC_WSA_TX_SPKR_PROT_RESET_MASK,
+-                                            CDC_WSA_TX_SPKR_PROT_NO_RESET);
+-              snd_soc_component_update_bits(component, tx_reg1,
+-                                            CDC_WSA_TX_SPKR_PROT_RESET_MASK,
+-                                            CDC_WSA_TX_SPKR_PROT_NO_RESET);
++              wsa_macro_enable_disable_vi_feedback(component, true, rate_val);
+               break;
+       case SND_SOC_DAPM_POST_PMD:
+               /* Disable V&I sensing */
+-              snd_soc_component_update_bits(component, tx_reg0,
+-                                            CDC_WSA_TX_SPKR_PROT_RESET_MASK,
+-                                            CDC_WSA_TX_SPKR_PROT_RESET);
+-              snd_soc_component_update_bits(component, tx_reg1,
+-                                            CDC_WSA_TX_SPKR_PROT_RESET_MASK,
+-                                            CDC_WSA_TX_SPKR_PROT_RESET);
+-              snd_soc_component_update_bits(component, tx_reg0,
+-                                            CDC_WSA_TX_SPKR_PROT_CLK_EN_MASK,
+-                                            CDC_WSA_TX_SPKR_PROT_CLK_DISABLE);
+-              snd_soc_component_update_bits(component, tx_reg1,
+-                                            CDC_WSA_TX_SPKR_PROT_CLK_EN_MASK,
+-                                            CDC_WSA_TX_SPKR_PROT_CLK_DISABLE);
++              wsa_macro_enable_disable_vi_feedback(component, false, rate_val);
+               break;
+       }
diff --git a/queue-6.12/asoc-codecs-lpass-wsa-macro-fix-vi-feedback-rate.patch b/queue-6.12/asoc-codecs-lpass-wsa-macro-fix-vi-feedback-rate.patch
new file mode 100644 (file)
index 0000000..f0a2212
--- /dev/null
@@ -0,0 +1,118 @@
+From d7bff1415e85b889dc8908be6aedba8807ae5e37 Mon Sep 17 00:00:00 2001
+From: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
+Date: Thu, 3 Apr 2025 17:02:08 +0100
+Subject: ASoC: codecs:lpass-wsa-macro: Fix vi feedback rate
+
+From: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
+
+commit d7bff1415e85b889dc8908be6aedba8807ae5e37 upstream.
+
+Currently the VI feedback rate is set to fixed 8K, fix this by getting
+the correct rate from params_rate.
+
+Without this patch incorrect rate will be set on the VI feedback
+recording resulting in rate miss match and audio artifacts.
+
+Fixes: 2c4066e5d428 ("ASoC: codecs: lpass-wsa-macro: add dapm widgets and route")
+Cc: stable@vger.kernel.org
+Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
+Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
+Link: https://patch.msgid.link/20250403160209.21613-2-srinivas.kandagatla@linaro.org
+Signed-off-by: Mark Brown <broonie@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ sound/soc/codecs/lpass-wsa-macro.c |   39 ++++++++++++++++++++++++++++++++++---
+ 1 file changed, 36 insertions(+), 3 deletions(-)
+
+--- a/sound/soc/codecs/lpass-wsa-macro.c
++++ b/sound/soc/codecs/lpass-wsa-macro.c
+@@ -63,6 +63,10 @@
+ #define CDC_WSA_TX_SPKR_PROT_CLK_DISABLE      0
+ #define CDC_WSA_TX_SPKR_PROT_PCM_RATE_MASK    GENMASK(3, 0)
+ #define CDC_WSA_TX_SPKR_PROT_PCM_RATE_8K      0
++#define CDC_WSA_TX_SPKR_PROT_PCM_RATE_16K     1
++#define CDC_WSA_TX_SPKR_PROT_PCM_RATE_24K     2
++#define CDC_WSA_TX_SPKR_PROT_PCM_RATE_32K     3
++#define CDC_WSA_TX_SPKR_PROT_PCM_RATE_48K     4
+ #define CDC_WSA_TX0_SPKR_PROT_PATH_CFG0               (0x0248)
+ #define CDC_WSA_TX1_SPKR_PROT_PATH_CTL                (0x0264)
+ #define CDC_WSA_TX1_SPKR_PROT_PATH_CFG0               (0x0268)
+@@ -407,6 +411,7 @@ struct wsa_macro {
+       int ear_spkr_gain;
+       int spkr_gain_offset;
+       int spkr_mode;
++      u32 pcm_rate_vi;
+       int is_softclip_on[WSA_MACRO_SOFTCLIP_MAX];
+       int softclip_clk_users[WSA_MACRO_SOFTCLIP_MAX];
+       struct regmap *regmap;
+@@ -1280,6 +1285,7 @@ static int wsa_macro_hw_params(struct sn
+                              struct snd_soc_dai *dai)
+ {
+       struct snd_soc_component *component = dai->component;
++      struct wsa_macro *wsa = snd_soc_component_get_drvdata(component);
+       int ret;
+       switch (substream->stream) {
+@@ -1292,6 +1298,11 @@ static int wsa_macro_hw_params(struct sn
+                       return ret;
+               }
+               break;
++      case SNDRV_PCM_STREAM_CAPTURE:
++              if (dai->id == WSA_MACRO_AIF_VI)
++                      wsa->pcm_rate_vi = params_rate(params);
++
++              break;
+       default:
+               break;
+       }
+@@ -1465,6 +1476,28 @@ static int wsa_macro_enable_vi_feedback(
+       struct snd_soc_component *component = snd_soc_dapm_to_component(w->dapm);
+       struct wsa_macro *wsa = snd_soc_component_get_drvdata(component);
+       u32 tx_reg0, tx_reg1;
++      u32 rate_val;
++
++      switch (wsa->pcm_rate_vi) {
++      case 8000:
++              rate_val = CDC_WSA_TX_SPKR_PROT_PCM_RATE_8K;
++              break;
++      case 16000:
++              rate_val = CDC_WSA_TX_SPKR_PROT_PCM_RATE_16K;
++              break;
++      case 24000:
++              rate_val = CDC_WSA_TX_SPKR_PROT_PCM_RATE_24K;
++              break;
++      case 32000:
++              rate_val = CDC_WSA_TX_SPKR_PROT_PCM_RATE_32K;
++              break;
++      case 48000:
++              rate_val = CDC_WSA_TX_SPKR_PROT_PCM_RATE_48K;
++              break;
++      default:
++              rate_val = CDC_WSA_TX_SPKR_PROT_PCM_RATE_8K;
++              break;
++      }
+       if (test_bit(WSA_MACRO_TX0, &wsa->active_ch_mask[WSA_MACRO_AIF_VI])) {
+               tx_reg0 = CDC_WSA_TX0_SPKR_PROT_PATH_CTL;
+@@ -1476,7 +1509,7 @@ static int wsa_macro_enable_vi_feedback(
+       switch (event) {
+       case SND_SOC_DAPM_POST_PMU:
+-                      /* Enable V&I sensing */
++              /* Enable V&I sensing */
+               snd_soc_component_update_bits(component, tx_reg0,
+                                             CDC_WSA_TX_SPKR_PROT_RESET_MASK,
+                                             CDC_WSA_TX_SPKR_PROT_RESET);
+@@ -1485,10 +1518,10 @@ static int wsa_macro_enable_vi_feedback(
+                                             CDC_WSA_TX_SPKR_PROT_RESET);
+               snd_soc_component_update_bits(component, tx_reg0,
+                                             CDC_WSA_TX_SPKR_PROT_PCM_RATE_MASK,
+-                                            CDC_WSA_TX_SPKR_PROT_PCM_RATE_8K);
++                                            rate_val);
+               snd_soc_component_update_bits(component, tx_reg1,
+                                             CDC_WSA_TX_SPKR_PROT_PCM_RATE_MASK,
+-                                            CDC_WSA_TX_SPKR_PROT_PCM_RATE_8K);
++                                            rate_val);
+               snd_soc_component_update_bits(component, tx_reg0,
+                                             CDC_WSA_TX_SPKR_PROT_CLK_EN_MASK,
+                                             CDC_WSA_TX_SPKR_PROT_CLK_ENABLE);
diff --git a/queue-6.12/asoc-fsl-fsl_qmc_audio-reset-audio-data-pointers-on-trigger_start-event.patch b/queue-6.12/asoc-fsl-fsl_qmc_audio-reset-audio-data-pointers-on-trigger_start-event.patch
new file mode 100644 (file)
index 0000000..b42c7ec
--- /dev/null
@@ -0,0 +1,41 @@
+From 9aa33d5b4a53a1945dd2aee45c09282248d3c98b Mon Sep 17 00:00:00 2001
+From: Herve Codina <herve.codina@bootlin.com>
+Date: Thu, 10 Apr 2025 11:16:43 +0200
+Subject: ASoC: fsl: fsl_qmc_audio: Reset audio data pointers on TRIGGER_START event
+
+From: Herve Codina <herve.codina@bootlin.com>
+
+commit 9aa33d5b4a53a1945dd2aee45c09282248d3c98b upstream.
+
+On SNDRV_PCM_TRIGGER_START event, audio data pointers are not reset.
+
+This leads to wrong data buffer usage when multiple TRIGGER_START are
+received and ends to incorrect buffer usage between the user-space and
+the driver. Indeed, the driver can read data that are not already set by
+the user-space or the user-space and the driver are writing and reading
+the same area.
+
+Fix that resetting data pointers on each SNDRV_PCM_TRIGGER_START events.
+
+Fixes: 075c7125b11c ("ASoC: fsl: Add support for QMC audio")
+Cc: stable@vger.kernel.org
+Signed-off-by: Herve Codina <herve.codina@bootlin.com>
+Link: https://patch.msgid.link/20250410091643.535627-1-herve.codina@bootlin.com
+Signed-off-by: Mark Brown <broonie@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ sound/soc/fsl/fsl_qmc_audio.c |    3 +++
+ 1 file changed, 3 insertions(+)
+
+--- a/sound/soc/fsl/fsl_qmc_audio.c
++++ b/sound/soc/fsl/fsl_qmc_audio.c
+@@ -250,6 +250,9 @@ static int qmc_audio_pcm_trigger(struct
+       switch (cmd) {
+       case SNDRV_PCM_TRIGGER_START:
+               bitmap_zero(prtd->chans_pending, 64);
++              prtd->buffer_ended = 0;
++              prtd->ch_dma_addr_current = prtd->ch_dma_addr_start;
++
+               if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) {
+                       for (i = 0; i < prtd->channels; i++)
+                               prtd->qmc_dai->chans[i].prtd_tx = prtd;
diff --git a/queue-6.12/asoc-intel-sof_sdw-add-quirk-for-asus-zenbook-s16.patch b/queue-6.12/asoc-intel-sof_sdw-add-quirk-for-asus-zenbook-s16.patch
new file mode 100644 (file)
index 0000000..6dbd5db
--- /dev/null
@@ -0,0 +1,36 @@
+From dfcf3dde45df383f2695c3d3475fec153d2c7dbe Mon Sep 17 00:00:00 2001
+From: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
+Date: Fri, 4 Apr 2025 16:32:13 +0300
+Subject: ASoC: Intel: sof_sdw: Add quirk for Asus Zenbook S16
+
+From: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
+
+commit dfcf3dde45df383f2695c3d3475fec153d2c7dbe upstream.
+
+Asus laptops with sound PCI subsystem ID 1043:1f43 have the DMICs
+connected to the host instead of the CS42L43 so need the
+SOC_SDW_CODEC_MIC quirk.
+
+Link: https://github.com/thesofproject/sof/issues/9930
+Fixes: 084344970808 ("ASoC: Intel: sof_sdw: Add quirk for Asus Zenbook S14")
+Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
+Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
+Reviewed-by: Simon Trimmer <simont@opensource.cirrus.com>
+Cc: stable@vger.kernel.org
+Link: https://patch.msgid.link/20250404133213.4658-1-peter.ujfalusi@linux.intel.com
+Signed-off-by: Mark Brown <broonie@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ sound/soc/intel/boards/sof_sdw.c |    1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/sound/soc/intel/boards/sof_sdw.c
++++ b/sound/soc/intel/boards/sof_sdw.c
+@@ -688,6 +688,7 @@ static const struct dmi_system_id sof_sd
+ static const struct snd_pci_quirk sof_sdw_ssid_quirk_table[] = {
+       SND_PCI_QUIRK(0x1043, 0x1e13, "ASUS Zenbook S14", SOC_SDW_CODEC_MIC),
++      SND_PCI_QUIRK(0x1043, 0x1f43, "ASUS Zenbook S16", SOC_SDW_CODEC_MIC),
+       {}
+ };
diff --git a/queue-6.12/asoc-qcom-fix-sc7280-lpass-potential-buffer-overflow.patch b/queue-6.12/asoc-qcom-fix-sc7280-lpass-potential-buffer-overflow.patch
new file mode 100644 (file)
index 0000000..63ebb70
--- /dev/null
@@ -0,0 +1,46 @@
+From a31a4934b31faea76e735bab17e63d02fcd8e029 Mon Sep 17 00:00:00 2001
+From: Evgeny Pimenov <pimenoveu12@gmail.com>
+Date: Tue, 1 Apr 2025 23:40:58 +0300
+Subject: ASoC: qcom: Fix sc7280 lpass potential buffer overflow
+
+From: Evgeny Pimenov <pimenoveu12@gmail.com>
+
+commit a31a4934b31faea76e735bab17e63d02fcd8e029 upstream.
+
+Case values introduced in commit
+5f78e1fb7a3e ("ASoC: qcom: Add driver support for audioreach solution")
+cause out of bounds access in arrays of sc7280 driver data (e.g. in case
+of RX_CODEC_DMA_RX_0 in sc7280_snd_hw_params()).
+
+Redefine LPASS_MAX_PORTS to consider the maximum possible port id for
+q6dsp as sc7280 driver utilizes some of those values.
+
+Found by Linux Verification Center (linuxtesting.org) with SVACE.
+
+Fixes: 77d0ffef793d ("ASoC: qcom: Add macro for lpass DAI id's max limit")
+Cc: stable@vger.kernel.org # v6.0+
+Suggested-by: Mikhail Kobuk <m.kobuk@ispras.ru>
+Suggested-by: Alexey Khoroshilov <khoroshilov@ispras.ru>
+Signed-off-by: Evgeny Pimenov <pimenoveu12@gmail.com>
+Link: https://patch.msgid.link/20250401204058.32261-1-pimenoveu12@gmail.com
+Signed-off-by: Mark Brown <broonie@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ sound/soc/qcom/lpass.h |    3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+--- a/sound/soc/qcom/lpass.h
++++ b/sound/soc/qcom/lpass.h
+@@ -13,10 +13,11 @@
+ #include <linux/platform_device.h>
+ #include <linux/regmap.h>
+ #include <dt-bindings/sound/qcom,lpass.h>
++#include <dt-bindings/sound/qcom,q6afe.h>
+ #include "lpass-hdmi.h"
+ #define LPASS_AHBIX_CLOCK_FREQUENCY           131072000
+-#define LPASS_MAX_PORTS                       (LPASS_CDC_DMA_VA_TX8 + 1)
++#define LPASS_MAX_PORTS                       (DISPLAY_PORT_RX_7 + 1)
+ #define LPASS_MAX_MI2S_PORTS                  (8)
+ #define LPASS_MAX_DMA_CHANNELS                        (8)
+ #define LPASS_MAX_HDMI_DMA_CHANNELS           (4)
diff --git a/queue-6.12/asus-laptop-fix-an-uninitialized-variable.patch b/queue-6.12/asus-laptop-fix-an-uninitialized-variable.patch
new file mode 100644 (file)
index 0000000..bc21863
--- /dev/null
@@ -0,0 +1,56 @@
+From 6c683c6887e4addcd6bd1ddce08cafccb0a21e32 Mon Sep 17 00:00:00 2001
+From: Denis Arefev <arefev@swemel.ru>
+Date: Thu, 3 Apr 2025 15:26:01 +0300
+Subject: asus-laptop: Fix an uninitialized variable
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+From: Denis Arefev <arefev@swemel.ru>
+
+commit 6c683c6887e4addcd6bd1ddce08cafccb0a21e32 upstream.
+
+The value returned by acpi_evaluate_integer() is not checked,
+but the result is not always successful, so it is necessary to
+add a check of the returned value.
+
+If the result remains negative during three iterations of the loop,
+then the uninitialized variable 'val' will be used in the clamp_val()
+macro, so it must be initialized with the current value of the 'curr'
+variable.
+
+In this case, the algorithm should be less noisy.
+
+Found by Linux Verification Center (linuxtesting.org) with SVACE.
+
+Fixes: b23910c2194e ("asus-laptop: Pegatron Lucid accelerometer")
+Cc: stable@vger.kernel.org
+Signed-off-by: Denis Arefev <arefev@swemel.ru>
+Link: https://lore.kernel.org/r/20250403122603.18172-1-arefev@swemel.ru
+Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
+Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/platform/x86/asus-laptop.c |    9 ++++++---
+ 1 file changed, 6 insertions(+), 3 deletions(-)
+
+--- a/drivers/platform/x86/asus-laptop.c
++++ b/drivers/platform/x86/asus-laptop.c
+@@ -426,11 +426,14 @@ static int asus_pega_lucid_set(struct as
+ static int pega_acc_axis(struct asus_laptop *asus, int curr, char *method)
+ {
++      unsigned long long val = (unsigned long long)curr;
++      acpi_status status;
+       int i, delta;
+-      unsigned long long val;
+-      for (i = 0; i < PEGA_ACC_RETRIES; i++) {
+-              acpi_evaluate_integer(asus->handle, method, NULL, &val);
++      for (i = 0; i < PEGA_ACC_RETRIES; i++) {
++              status = acpi_evaluate_integer(asus->handle, method, NULL, &val);
++              if (ACPI_FAILURE(status))
++                      continue;
+               /* The output is noisy.  From reading the ASL
+                * dissassembly, timeout errors are returned with 1's
+                * in the high word, and the lack of locking around
diff --git a/queue-6.12/block-integrity-do-not-call-set_page_dirty_lock.patch b/queue-6.12/block-integrity-do-not-call-set_page_dirty_lock.patch
new file mode 100644 (file)
index 0000000..798d0c4
--- /dev/null
@@ -0,0 +1,87 @@
+From 39e160505198ff8c158f11bce2ba19809a756e8b Mon Sep 17 00:00:00 2001
+From: "Martin K. Petersen" <martin.petersen@oracle.com>
+Date: Wed, 16 Apr 2025 16:04:10 -0400
+Subject: block: integrity: Do not call set_page_dirty_lock()
+
+From: Martin K. Petersen <martin.petersen@oracle.com>
+
+commit 39e160505198ff8c158f11bce2ba19809a756e8b upstream.
+
+Placing multiple protection information buffers inside the same page
+can lead to oopses because set_page_dirty_lock() can't be called from
+interrupt context.
+
+Since a protection information buffer is not backed by a file there is
+no point in setting its page dirty, there is nothing to synchronize.
+Drop the call to set_page_dirty_lock() and remove the last argument to
+bio_integrity_unpin_bvec().
+
+Cc: stable@vger.kernel.org
+Fixes: 492c5d455969 ("block: bio-integrity: directly map user buffers")
+Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
+Reviewed-by: Keith Busch <kbusch@kernel.org>
+Link: https://lore.kernel.org/r/yq1v7r3ev9g.fsf@ca-mkp.ca.oracle.com
+Signed-off-by: Jens Axboe <axboe@kernel.dk>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ block/bio-integrity.c |   17 ++++++-----------
+ 1 file changed, 6 insertions(+), 11 deletions(-)
+
+--- a/block/bio-integrity.c
++++ b/block/bio-integrity.c
+@@ -104,16 +104,12 @@ err:
+ }
+ EXPORT_SYMBOL(bio_integrity_alloc);
+-static void bio_integrity_unpin_bvec(struct bio_vec *bv, int nr_vecs,
+-                                   bool dirty)
++static void bio_integrity_unpin_bvec(struct bio_vec *bv, int nr_vecs)
+ {
+       int i;
+-      for (i = 0; i < nr_vecs; i++) {
+-              if (dirty && !PageCompound(bv[i].bv_page))
+-                      set_page_dirty_lock(bv[i].bv_page);
++      for (i = 0; i < nr_vecs; i++)
+               unpin_user_page(bv[i].bv_page);
+-      }
+ }
+ static void bio_integrity_uncopy_user(struct bio_integrity_payload *bip)
+@@ -129,7 +125,7 @@ static void bio_integrity_uncopy_user(st
+       ret = copy_to_iter(bvec_virt(bounce_bvec), bytes, &orig_iter);
+       WARN_ON_ONCE(ret != bytes);
+-      bio_integrity_unpin_bvec(orig_bvecs, orig_nr_vecs, true);
++      bio_integrity_unpin_bvec(orig_bvecs, orig_nr_vecs);
+ }
+ /**
+@@ -149,8 +145,7 @@ void bio_integrity_unmap_user(struct bio
+               return;
+       }
+-      bio_integrity_unpin_bvec(bip->bip_vec, bip->bip_max_vcnt,
+-                      bio_data_dir(bio) == READ);
++      bio_integrity_unpin_bvec(bip->bip_vec, bip->bip_max_vcnt);
+ }
+ /**
+@@ -236,7 +231,7 @@ static int bio_integrity_copy_user(struc
+       }
+       if (write)
+-              bio_integrity_unpin_bvec(bvec, nr_vecs, false);
++              bio_integrity_unpin_bvec(bvec, nr_vecs);
+       else
+               memcpy(&bip->bip_vec[1], bvec, nr_vecs * sizeof(*bvec));
+@@ -362,7 +357,7 @@ int bio_integrity_map_user(struct bio *b
+       return 0;
+ release_pages:
+-      bio_integrity_unpin_bvec(bvec, nr_bvecs, false);
++      bio_integrity_unpin_bvec(bvec, nr_bvecs);
+ free_bvec:
+       if (bvec != stack_vec)
+               kfree(bvec);
diff --git a/queue-6.12/objtool-rust-add-one-more-noreturn-rust-function-for-rust-1.86.0.patch b/queue-6.12/objtool-rust-add-one-more-noreturn-rust-function-for-rust-1.86.0.patch
new file mode 100644 (file)
index 0000000..850f6a9
--- /dev/null
@@ -0,0 +1,47 @@
+From a3cd5f507b72c0532c3345b6913557efab34f405 Mon Sep 17 00:00:00 2001
+From: Miguel Ojeda <ojeda@kernel.org>
+Date: Sun, 13 Apr 2025 02:23:38 +0200
+Subject: objtool/rust: add one more `noreturn` Rust function for Rust 1.86.0
+
+From: Miguel Ojeda <ojeda@kernel.org>
+
+commit a3cd5f507b72c0532c3345b6913557efab34f405 upstream.
+
+Starting with Rust 1.86.0 (see upstream commit b151b513ba2b ("Insert null
+checks for pointer dereferences when debug assertions are enabled") [1]),
+under some kernel configurations with `CONFIG_RUST_DEBUG_ASSERTIONS=y`,
+one may trigger a new `objtool` warning:
+
+    rust/kernel.o: warning: objtool: _R..._6kernel9workqueue6system()
+    falls through to next function _R...9workqueue14system_highpri()
+
+due to a call to the `noreturn` symbol:
+
+    core::panicking::panic_null_pointer_dereference
+
+Thus add it to the list so that `objtool` knows it is actually `noreturn`.
+
+See commit 56d680dd23c3 ("objtool/rust: list `noreturn` Rust functions")
+for more details.
+
+Cc: stable@vger.kernel.org # Needed in 6.12.y and later (Rust is pinned in older LTSs).
+Fixes: 56d680dd23c3 ("objtool/rust: list `noreturn` Rust functions")
+Link: https://github.com/rust-lang/rust/commit/b151b513ba2b65c7506ec1a80f2712bbd09154d1 [1]
+Reviewed-by: Alice Ryhl <aliceryhl@google.com>
+Link: https://lore.kernel.org/r/20250413002338.1741593-1-ojeda@kernel.org
+Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ tools/objtool/check.c |    1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/tools/objtool/check.c
++++ b/tools/objtool/check.c
+@@ -217,6 +217,7 @@ static bool is_rust_noreturn(const struc
+              str_ends_with(func->name, "_4core9panicking14panic_nounwind")                            ||
+              str_ends_with(func->name, "_4core9panicking18panic_bounds_check")                        ||
+              str_ends_with(func->name, "_4core9panicking19assert_failed_inner")                       ||
++             str_ends_with(func->name, "_4core9panicking30panic_null_pointer_dereference")            ||
+              str_ends_with(func->name, "_4core9panicking36panic_misaligned_pointer_dereference")      ||
+              strstr(func->name, "_4core9panicking13assert_failed")                                    ||
+              strstr(func->name, "_4core9panicking11panic_const24panic_const_")                        ||
diff --git a/queue-6.12/revert-pci-avoid-reset-when-disabled-via-sysfs.patch b/queue-6.12/revert-pci-avoid-reset-when-disabled-via-sysfs.patch
new file mode 100644 (file)
index 0000000..ac7c62d
--- /dev/null
@@ -0,0 +1,59 @@
+From bc0b828ef6e561081ebc4c758d0c4d166bb9829c Mon Sep 17 00:00:00 2001
+From: Alex Williamson <alex.williamson@redhat.com>
+Date: Mon, 14 Apr 2025 15:18:23 -0600
+Subject: Revert "PCI: Avoid reset when disabled via sysfs"
+
+From: Alex Williamson <alex.williamson@redhat.com>
+
+commit bc0b828ef6e561081ebc4c758d0c4d166bb9829c upstream.
+
+This reverts commit 479380efe1625e251008d24b2810283db60d6fcd.
+
+The reset_method attribute on a PCI device is only intended to manage the
+availability of function scoped resets for a device.  It was never intended
+to restrict resets targeting the bus or slot.
+
+In introducing a restriction that each device must support function level
+reset by testing pci_reset_supported(), we essentially create a catch-22,
+that a device must have a function scope reset in order to support bus/slot
+reset, when we use bus/slot reset to effect a reset of a device that does
+not support a function scoped reset, especially multi-function devices.
+
+This breaks the majority of uses cases where vfio-pci uses bus/slot resets
+to manage multifunction devices that do not support function scoped resets.
+
+Fixes: 479380efe162 ("PCI: Avoid reset when disabled via sysfs")
+Reported-by: Cal Peake <cp@absolutedigital.net>
+Closes: https://lore.kernel.org/all/808e1111-27b7-f35b-6d5c-5b275e73677b@absolutedigital.net
+Reported-by: Athul Krishna <athul.krishna.kr@protonmail.com>
+Closes: https://bugzilla.kernel.org/show_bug.cgi?id=220010
+Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
+Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
+Reviewed-by: Kevin Tian <kevin.tian@intel.com>
+Cc: stable@vger.kernel.org
+Link: https://patch.msgid.link/20250414211828.3530741-1-alex.williamson@redhat.com
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/pci/pci.c |    4 ----
+ 1 file changed, 4 deletions(-)
+
+--- a/drivers/pci/pci.c
++++ b/drivers/pci/pci.c
+@@ -5534,8 +5534,6 @@ static bool pci_bus_resettable(struct pc
+               return false;
+       list_for_each_entry(dev, &bus->devices, bus_list) {
+-              if (!pci_reset_supported(dev))
+-                      return false;
+               if (dev->dev_flags & PCI_DEV_FLAGS_NO_BUS_RESET ||
+                   (dev->subordinate && !pci_bus_resettable(dev->subordinate)))
+                       return false;
+@@ -5612,8 +5610,6 @@ static bool pci_slot_resettable(struct p
+       list_for_each_entry(dev, &slot->bus->devices, bus_list) {
+               if (!dev->slot || dev->slot != slot)
+                       continue;
+-              if (!pci_reset_supported(dev))
+-                      return false;
+               if (dev->dev_flags & PCI_DEV_FLAGS_NO_BUS_RESET ||
+                   (dev->subordinate && !pci_bus_resettable(dev->subordinate)))
+                       return false;
diff --git a/queue-6.12/rust-disable-clippy-needless_continue.patch b/queue-6.12/rust-disable-clippy-needless_continue.patch
new file mode 100644 (file)
index 0000000..80c1ff5
--- /dev/null
@@ -0,0 +1,81 @@
+From 0866ee8e50f017731b80891294c0edd0f5fcd0a9 Mon Sep 17 00:00:00 2001
+From: Miguel Ojeda <ojeda@kernel.org>
+Date: Thu, 3 Apr 2025 18:38:05 +0200
+Subject: rust: disable `clippy::needless_continue`
+
+From: Miguel Ojeda <ojeda@kernel.org>
+
+commit 0866ee8e50f017731b80891294c0edd0f5fcd0a9 upstream.
+
+Starting with Rust 1.86.0, Clippy's `needless_continue` lint complains
+about the last statement of a loop [1], including cases like:
+
+    while ... {
+        match ... {
+            ... if ... => {
+                ...
+                return ...;
+            }
+            _ => continue,
+        }
+    }
+
+as well as nested `match`es in a loop.
+
+One solution is changing `continue` for `()` [2], but arguably using
+`continue` shows the intent better when it is alone in an arm like that.
+
+Moreover, I am not sure we want to force people to try to find other
+ways to write the code either, in cases when that applies.
+
+In addition, the help text does not really apply in the new cases the
+lint has introduced, e.g. here one cannot simply "drop" the expression:
+
+    warning: this `continue` expression is redundant
+      --> rust/macros/helpers.rs:85:18
+       |
+    85 |             _ => continue,
+       |                  ^^^^^^^^
+       |
+       = help: consider dropping the `continue` expression
+       = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_continue
+       = note: requested on the command line with `-W clippy::needless-continue`
+
+The examples in the documentation do not show a case like this, either,
+so the second "help" line does not help.
+
+In addition, locally disabling the lint is not possible with `expect`,
+since the behavior differs across versions. Using `allow` would be
+possible, but, even then, an extra line just for this is a bit too much,
+especially if there are other ways to satisfy the lint.
+
+Finally, the lint is still in the "pedantic" category and disabled by
+default by Clippy.
+
+Thus disable the lint, at least for the time being.
+
+Feedback was submitted to upstream Clippy, in case this can be improved
+or perhaps the lint split into several [3].
+
+Cc: stable@vger.kernel.org # Needed in 6.12.y and later (Rust is pinned in older LTSs).
+Link: https://github.com/rust-lang/rust-clippy/pull/13891 [1]
+Link: https://lore.kernel.org/rust-for-linux/20250401221205.52381-1-ojeda@kernel.org/ [2]
+Link: https://github.com/rust-lang/rust-clippy/issues/14536 [3]
+Link: https://lore.kernel.org/r/20250403163805.67770-1-ojeda@kernel.org
+Reviewed-by: Alice Ryhl <aliceryhl@google.com>
+Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ Makefile |    1 -
+ 1 file changed, 1 deletion(-)
+
+--- a/Makefile
++++ b/Makefile
+@@ -455,7 +455,6 @@ export rust_common_flags := --edition=20
+                           -Wclippy::ignored_unit_patterns \
+                           -Wclippy::mut_mut \
+                           -Wclippy::needless_bitwise_bool \
+-                          -Wclippy::needless_continue \
+                           -Aclippy::needless_lifetimes \
+                           -Wclippy::no_mangle_with_rust_abi \
+                           -Wclippy::undocumented_unsafe_blocks \
diff --git a/queue-6.12/rust-kasan-kbuild-fix-missing-flags-on-first-build.patch b/queue-6.12/rust-kasan-kbuild-fix-missing-flags-on-first-build.patch
new file mode 100644 (file)
index 0000000..b3e77ac
--- /dev/null
@@ -0,0 +1,82 @@
+From 46e24a545cdb4556f8128c90ecc34eeae52477a0 Mon Sep 17 00:00:00 2001
+From: Miguel Ojeda <ojeda@kernel.org>
+Date: Wed, 9 Apr 2025 00:03:11 +0200
+Subject: rust: kasan/kbuild: fix missing flags on first build
+
+From: Miguel Ojeda <ojeda@kernel.org>
+
+commit 46e24a545cdb4556f8128c90ecc34eeae52477a0 upstream.
+
+If KASAN is enabled, and one runs in a clean repository e.g.:
+
+    make LLVM=1 prepare
+    make LLVM=1 prepare
+
+Then the Rust code gets rebuilt, which should not happen.
+
+The reason is some of the LLVM KASAN `rustc` flags are added in the
+second run:
+
+    -Cllvm-args=-asan-instrumentation-with-call-threshold=10000
+    -Cllvm-args=-asan-stack=0
+    -Cllvm-args=-asan-globals=1
+    -Cllvm-args=-asan-kernel-mem-intrinsic-prefix=1
+
+Further runs do not rebuild Rust because the flags do not change anymore.
+
+Rebuilding like that in the second run is bad, even if this just happens
+with KASAN enabled, but missing flags in the first one is even worse.
+
+The root issue is that we pass, for some architectures and for the moment,
+a generated `target.json` file. That file is not ready by the time `rustc`
+gets called for the flag test, and thus the flag test fails just because
+the file is not available, e.g.:
+
+    $ ... --target=./scripts/target.json ... -Cllvm-args=...
+    error: target file "./scripts/target.json" does not exist
+
+There are a few approaches we could take here to solve this. For instance,
+we could ensure that every time that the config is rebuilt, we regenerate
+the file and recompute the flags. Or we could use the LLVM version to
+check for these flags, instead of testing the flag (which may have other
+advantages, such as allowing us to detect renames on the LLVM side).
+
+However, it may be easier than that: `rustc` is aware of the `-Cllvm-args`
+regardless of the `--target` (e.g. I checked that the list printed
+is the same, plus that I can check for these flags even if I pass
+a completely unrelated target), and thus we can just eliminate the
+dependency completely.
+
+Thus filter out the target.
+
+This does mean that `rustc-option` cannot be used to test a flag that
+requires the right target, but we don't have other users yet, it is a
+minimal change and we want to get rid of custom targets in the future.
+
+We could only filter in the case `target.json` is used, to make it work
+in more cases, but then it would be harder to notice that it may not
+work in a couple architectures.
+
+Cc: Matthew Maurer <mmaurer@google.com>
+Cc: Sami Tolvanen <samitolvanen@google.com>
+Cc: stable@vger.kernel.org
+Fixes: e3117404b411 ("kbuild: rust: Enable KASAN support")
+Tested-by: Alice Ryhl <aliceryhl@google.com>
+Link: https://lore.kernel.org/r/20250408220311.1033475-1-ojeda@kernel.org
+Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ scripts/Makefile.compiler |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/scripts/Makefile.compiler
++++ b/scripts/Makefile.compiler
+@@ -76,7 +76,7 @@ ld-option = $(call try-run, $(LD) $(KBUI
+ # TODO: remove RUSTC_BOOTSTRAP=1 when we raise the minimum GNU Make version to 4.4
+ __rustc-option = $(call try-run,\
+       echo '#![allow(missing_docs)]#![feature(no_core)]#![no_core]' | RUSTC_BOOTSTRAP=1\
+-      $(1) --sysroot=/dev/null $(filter-out --sysroot=/dev/null,$(2)) $(3)\
++      $(1) --sysroot=/dev/null $(filter-out --sysroot=/dev/null --target=%,$(2)) $(3)\
+       --crate-type=rlib --out-dir=$(TMPOUT) --emit=obj=- - >/dev/null,$(3),$(4))
+ # rustc-option
diff --git a/queue-6.12/rust-kbuild-use-pound-to-support-gnu-make-4.3.patch b/queue-6.12/rust-kbuild-use-pound-to-support-gnu-make-4.3.patch
new file mode 100644 (file)
index 0000000..6148eec
--- /dev/null
@@ -0,0 +1,61 @@
+From 1c4494c14b4124f3a13a7f4912b84b633ff4f9ba Mon Sep 17 00:00:00 2001
+From: Miguel Ojeda <ojeda@kernel.org>
+Date: Mon, 14 Apr 2025 19:12:41 +0200
+Subject: rust: kbuild: use `pound` to support GNU Make < 4.3
+
+From: Miguel Ojeda <ojeda@kernel.org>
+
+commit 1c4494c14b4124f3a13a7f4912b84b633ff4f9ba upstream.
+
+GNU Make 4.3 changed the behavior of `#` inside commands in commit
+c6966b323811 ("[SV 20513] Un-escaped # are not comments in function
+invocations"):
+
+    * WARNING: Backward-incompatibility!
+      Number signs (#) appearing inside a macro reference or function invocation
+      no longer introduce comments and should not be escaped with backslashes:
+      thus a call such as:
+        foo := $(shell echo '#')
+      is legal.  Previously the number sign needed to be escaped, for example:
+        foo := $(shell echo '\#')
+      Now this latter will resolve to "\#".  If you want to write makefiles
+      portable to both versions, assign the number sign to a variable:
+        H := \#
+        foo := $(shell echo '$H')
+      This was claimed to be fixed in 3.81, but wasn't, for some reason.
+      To detect this change search for 'nocomment' in the .FEATURES variable.
+
+Unlike other commits in the kernel about this issue, such as commit
+633174a7046e ("lib/raid6/test/Makefile: Use $(pound) instead of \#
+for Make 4.3"), that fixed the issue for newer GNU Makes, in our case
+it was the opposite, i.e. we need to fix it for the older ones: someone
+building with e.g. 4.2.1 gets the following error:
+
+    scripts/Makefile.compiler:81: *** unterminated call to function 'call': missing ')'.  Stop.
+
+Thus use the existing variable to fix it.
+
+Reported-by: moyi geek <1441339168@qq.com>
+Closes: https://rust-for-linux.zulipchat.com/#narrow/channel/291565/topic/x/near/512001985
+Cc: stable@vger.kernel.org
+Fixes: e72a076c620f ("kbuild: fix issues with rustc-option")
+Reviewed-by: Nicolas Schier <nicolas@fjasle.eu>
+Reviewed-by: Alice Ryhl <aliceryhl@google.com>
+Link: https://lore.kernel.org/r/20250414171241.2126137-1-ojeda@kernel.org
+Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ scripts/Makefile.compiler |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/scripts/Makefile.compiler
++++ b/scripts/Makefile.compiler
+@@ -75,7 +75,7 @@ ld-option = $(call try-run, $(LD) $(KBUI
+ # Usage: MY_RUSTFLAGS += $(call __rustc-option,$(RUSTC),$(MY_RUSTFLAGS),-Cinstrument-coverage,-Zinstrument-coverage)
+ # TODO: remove RUSTC_BOOTSTRAP=1 when we raise the minimum GNU Make version to 4.4
+ __rustc-option = $(call try-run,\
+-      echo '#![allow(missing_docs)]#![feature(no_core)]#![no_core]' | RUSTC_BOOTSTRAP=1\
++      echo '$(pound)![allow(missing_docs)]$(pound)![feature(no_core)]$(pound)![no_core]' | RUSTC_BOOTSTRAP=1\
+       $(1) --sysroot=/dev/null $(filter-out --sysroot=/dev/null --target=%,$(2)) $(3)\
+       --crate-type=rlib --out-dir=$(TMPOUT) --emit=obj=- - >/dev/null,$(3),$(4))
index f6baa040e513ff8f82db28eb03f82ec849cd1a37..e7c21d24f8327e07f6d9f288852ae6b7f9b96c82 100644 (file)
@@ -80,3 +80,16 @@ kunit-qemu_configs-sh-respect-kunit-cmdline.patch
 riscv-kgdb-do-not-inline-arch_kgdb_breakpoint.patch
 riscv-kgdb-remove-.option-norvc-.option-rvc-for-kgdb.patch
 cpufreq-sched-fix-the-usage-of-cpufreq_need_update_l.patch
+objtool-rust-add-one-more-noreturn-rust-function-for-rust-1.86.0.patch
+rust-kasan-kbuild-fix-missing-flags-on-first-build.patch
+rust-disable-clippy-needless_continue.patch
+rust-kbuild-use-pound-to-support-gnu-make-4.3.patch
+writeback-fix-false-warning-in-inode_to_wb.patch
+revert-pci-avoid-reset-when-disabled-via-sysfs.patch
+asoc-fsl-fsl_qmc_audio-reset-audio-data-pointers-on-trigger_start-event.patch
+asoc-codecs-lpass-wsa-macro-fix-vi-feedback-rate.patch
+asoc-codecs-lpass-wsa-macro-fix-logic-of-enabling-vi-channels.patch
+asoc-intel-sof_sdw-add-quirk-for-asus-zenbook-s16.patch
+asoc-qcom-fix-sc7280-lpass-potential-buffer-overflow.patch
+asus-laptop-fix-an-uninitialized-variable.patch
+block-integrity-do-not-call-set_page_dirty_lock.patch
diff --git a/queue-6.12/writeback-fix-false-warning-in-inode_to_wb.patch b/queue-6.12/writeback-fix-false-warning-in-inode_to_wb.patch
new file mode 100644 (file)
index 0000000..7c8ab5b
--- /dev/null
@@ -0,0 +1,37 @@
+From 9e888998ea4d22257b07ce911576509486fa0667 Mon Sep 17 00:00:00 2001
+From: Andreas Gruenbacher <agruenba@redhat.com>
+Date: Sat, 12 Apr 2025 18:39:12 +0200
+Subject: writeback: fix false warning in inode_to_wb()
+
+From: Andreas Gruenbacher <agruenba@redhat.com>
+
+commit 9e888998ea4d22257b07ce911576509486fa0667 upstream.
+
+inode_to_wb() is used also for filesystems that don't support cgroup
+writeback.  For these filesystems inode->i_wb is stable during the
+lifetime of the inode (it points to bdi->wb) and there's no need to hold
+locks protecting the inode->i_wb dereference.  Improve the warning in
+inode_to_wb() to not trigger for these filesystems.
+
+Link: https://lkml.kernel.org/r/20250412163914.3773459-3-agruenba@redhat.com
+Fixes: aaa2cacf8184 ("writeback: add lockdep annotation to inode_to_wb()")
+Signed-off-by: Jan Kara <jack@suse.cz>
+Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
+Reviewed-by: Andreas Gruenbacher <agruenba@redhat.com>
+Cc: <stable@vger.kernel.org>
+Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ include/linux/backing-dev.h |    1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/include/linux/backing-dev.h
++++ b/include/linux/backing-dev.h
+@@ -249,6 +249,7 @@ static inline struct bdi_writeback *inod
+ {
+ #ifdef CONFIG_LOCKDEP
+       WARN_ON_ONCE(debug_locks &&
++                   (inode->i_sb->s_iflags & SB_I_CGROUPWB) &&
+                    (!lockdep_is_held(&inode->i_lock) &&
+                     !lockdep_is_held(&inode->i_mapping->i_pages.xa_lock) &&
+                     !lockdep_is_held(&inode->i_wb->list_lock)));