]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
Fixes for 5.11
authorSasha Levin <sashal@kernel.org>
Mon, 22 Mar 2021 03:05:01 +0000 (23:05 -0400)
committerSasha Levin <sashal@kernel.org>
Mon, 22 Mar 2021 03:05:01 +0000 (23:05 -0400)
Signed-off-by: Sasha Levin <sashal@kernel.org>
queue-5.11/asoc-codecs-lpass-va-macro-mute-unmute-all-active-de.patch [new file with mode: 0644]
queue-5.11/asoc-codecs-lpass-wsa-macro-fix-rx-mix-input-control.patch [new file with mode: 0644]
queue-5.11/counter-stm32-timer-cnt-report-count-function-when-s.patch [new file with mode: 0644]
queue-5.11/drm-ttm-make-ttm_bo_unpin-more-defensive.patch [new file with mode: 0644]
queue-5.11/drm-ttm-warn-on-pinning-without-holding-a-reference.patch [new file with mode: 0644]
queue-5.11/gpiolib-assign-fwnode-to-parent-s-if-no-primary-one-.patch [new file with mode: 0644]
queue-5.11/nvme-rdma-fix-possible-hang-when-failing-to-set-io-q.patch [new file with mode: 0644]
queue-5.11/powerpc-vdso32-add-missing-_restgpr_31_x-to-fix-buil.patch [new file with mode: 0644]
queue-5.11/series

diff --git a/queue-5.11/asoc-codecs-lpass-va-macro-mute-unmute-all-active-de.patch b/queue-5.11/asoc-codecs-lpass-va-macro-mute-unmute-all-active-de.patch
new file mode 100644 (file)
index 0000000..6a20a87
--- /dev/null
@@ -0,0 +1,85 @@
+From 808e5940d41cf6b659e729aa224789c9d8fbc9e6 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Thu, 4 Mar 2021 16:56:46 -0500
+Subject: ASoC: codecs: lpass-va-macro: mute/unmute all active decimators
+
+From: Jonathan Marek <jonathan@marek.ca>
+
+[ Upstream commit 5346f0e80b7160c91fb599d4545fd12560c286ed ]
+
+An interface can have multiple decimators enabled, so loop over all active
+decimators. Otherwise only one channel will be unmuted, and other channels
+will be zero. This fixes recording from dual DMIC as a single two channel
+stream.
+
+Also remove the now unused "active_decimator" field.
+
+Fixes: 908e6b1df26e ("ASoC: codecs: lpass-va-macro: Add support to VA Macro")
+Signed-off-by: Jonathan Marek <jonathan@marek.ca>
+Reviewed-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
+Link: https://lore.kernel.org/r/20210304215646.17956-1-jonathan@marek.ca
+Signed-off-by: Mark Brown <broonie@kernel.org>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ sound/soc/codecs/lpass-va-macro.c | 28 +++++++++++++---------------
+ 1 file changed, 13 insertions(+), 15 deletions(-)
+
+diff --git a/sound/soc/codecs/lpass-va-macro.c b/sound/soc/codecs/lpass-va-macro.c
+index 91e6890d6efc..3d6976a3d9e4 100644
+--- a/sound/soc/codecs/lpass-va-macro.c
++++ b/sound/soc/codecs/lpass-va-macro.c
+@@ -189,7 +189,6 @@ struct va_macro {
+       struct device *dev;
+       unsigned long active_ch_mask[VA_MACRO_MAX_DAIS];
+       unsigned long active_ch_cnt[VA_MACRO_MAX_DAIS];
+-      unsigned long active_decimator[VA_MACRO_MAX_DAIS];
+       u16 dmic_clk_div;
+       int dec_mode[VA_MACRO_NUM_DECIMATORS];
+@@ -549,11 +548,9 @@ static int va_macro_tx_mixer_put(struct snd_kcontrol *kcontrol,
+       if (enable) {
+               set_bit(dec_id, &va->active_ch_mask[dai_id]);
+               va->active_ch_cnt[dai_id]++;
+-              va->active_decimator[dai_id] = dec_id;
+       } else {
+               clear_bit(dec_id, &va->active_ch_mask[dai_id]);
+               va->active_ch_cnt[dai_id]--;
+-              va->active_decimator[dai_id] = -1;
+       }
+       snd_soc_dapm_mixer_update_power(widget->dapm, kcontrol, enable, update);
+@@ -880,18 +877,19 @@ static int va_macro_digital_mute(struct snd_soc_dai *dai, int mute, int stream)
+       struct va_macro *va = snd_soc_component_get_drvdata(component);
+       u16 tx_vol_ctl_reg, decimator;
+-      decimator = va->active_decimator[dai->id];
+-
+-      tx_vol_ctl_reg = CDC_VA_TX0_TX_PATH_CTL +
+-                              VA_MACRO_TX_PATH_OFFSET * decimator;
+-      if (mute)
+-              snd_soc_component_update_bits(component, tx_vol_ctl_reg,
+-                                            CDC_VA_TX_PATH_PGA_MUTE_EN_MASK,
+-                                            CDC_VA_TX_PATH_PGA_MUTE_EN);
+-      else
+-              snd_soc_component_update_bits(component, tx_vol_ctl_reg,
+-                                            CDC_VA_TX_PATH_PGA_MUTE_EN_MASK,
+-                                            CDC_VA_TX_PATH_PGA_MUTE_DISABLE);
++      for_each_set_bit(decimator, &va->active_ch_mask[dai->id],
++                       VA_MACRO_DEC_MAX) {
++              tx_vol_ctl_reg = CDC_VA_TX0_TX_PATH_CTL +
++                                      VA_MACRO_TX_PATH_OFFSET * decimator;
++              if (mute)
++                      snd_soc_component_update_bits(component, tx_vol_ctl_reg,
++                                      CDC_VA_TX_PATH_PGA_MUTE_EN_MASK,
++                                      CDC_VA_TX_PATH_PGA_MUTE_EN);
++              else
++                      snd_soc_component_update_bits(component, tx_vol_ctl_reg,
++                                      CDC_VA_TX_PATH_PGA_MUTE_EN_MASK,
++                                      CDC_VA_TX_PATH_PGA_MUTE_DISABLE);
++      }
+       return 0;
+ }
+-- 
+2.30.1
+
diff --git a/queue-5.11/asoc-codecs-lpass-wsa-macro-fix-rx-mix-input-control.patch b/queue-5.11/asoc-codecs-lpass-wsa-macro-fix-rx-mix-input-control.patch
new file mode 100644 (file)
index 0000000..16df226
--- /dev/null
@@ -0,0 +1,83 @@
+From a06849dfe140ea6cae41fb62f2ff9a21b3c7fd5b Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Thu, 4 Mar 2021 19:50:48 -0500
+Subject: ASoC: codecs: lpass-wsa-macro: fix RX MIX input controls
+
+From: Jonathan Marek <jonathan@marek.ca>
+
+[ Upstream commit e4b8b7c916038c1ffcba2c4ce92d5523c4cc2f46 ]
+
+Attempting to use the RX MIX path at 48kHz plays at 96kHz, because these
+controls are incorrectly toggling the first bit of the register, which
+is part of the FS_RATE field.
+
+Fix the problem by using the same method used by the "WSA RX_MIX EC0_MUX"
+control, which is to use SND_SOC_NOPM as the register and use an enum in
+the shift field instead.
+
+Fixes: 2c4066e5d428 ("ASoC: codecs: lpass-wsa-macro: add dapm widgets and route")
+Signed-off-by: Jonathan Marek <jonathan@marek.ca>
+Reviewed-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
+Link: https://lore.kernel.org/r/20210305005049.24726-1-jonathan@marek.ca
+Signed-off-by: Mark Brown <broonie@kernel.org>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ sound/soc/codecs/lpass-wsa-macro.c | 20 +++++++++++---------
+ 1 file changed, 11 insertions(+), 9 deletions(-)
+
+diff --git a/sound/soc/codecs/lpass-wsa-macro.c b/sound/soc/codecs/lpass-wsa-macro.c
+index 25f1df214ca5..cd59aa439373 100644
+--- a/sound/soc/codecs/lpass-wsa-macro.c
++++ b/sound/soc/codecs/lpass-wsa-macro.c
+@@ -1214,14 +1214,16 @@ static int wsa_macro_enable_mix_path(struct snd_soc_dapm_widget *w,
+                                    struct snd_kcontrol *kcontrol, int event)
+ {
+       struct snd_soc_component *component = snd_soc_dapm_to_component(w->dapm);
+-      u16 gain_reg;
++      u16 path_reg, gain_reg;
+       int val;
+-      switch (w->reg) {
+-      case CDC_WSA_RX0_RX_PATH_MIX_CTL:
++      switch (w->shift) {
++      case WSA_MACRO_RX_MIX0:
++              path_reg = CDC_WSA_RX0_RX_PATH_MIX_CTL;
+               gain_reg = CDC_WSA_RX0_RX_VOL_MIX_CTL;
+               break;
+-      case CDC_WSA_RX1_RX_PATH_MIX_CTL:
++      case WSA_MACRO_RX_MIX1:
++              path_reg = CDC_WSA_RX1_RX_PATH_MIX_CTL;
+               gain_reg = CDC_WSA_RX1_RX_VOL_MIX_CTL;
+               break;
+       default:
+@@ -1234,7 +1236,7 @@ static int wsa_macro_enable_mix_path(struct snd_soc_dapm_widget *w,
+               snd_soc_component_write(component, gain_reg, val);
+               break;
+       case SND_SOC_DAPM_POST_PMD:
+-              snd_soc_component_update_bits(component, w->reg,
++              snd_soc_component_update_bits(component, path_reg,
+                                             CDC_WSA_RX_PATH_MIX_CLK_EN_MASK,
+                                             CDC_WSA_RX_PATH_MIX_CLK_DISABLE);
+               break;
+@@ -2071,14 +2073,14 @@ static const struct snd_soc_dapm_widget wsa_macro_dapm_widgets[] = {
+       SND_SOC_DAPM_MUX("WSA_RX0 INP0", SND_SOC_NOPM, 0, 0, &rx0_prim_inp0_mux),
+       SND_SOC_DAPM_MUX("WSA_RX0 INP1", SND_SOC_NOPM, 0, 0, &rx0_prim_inp1_mux),
+       SND_SOC_DAPM_MUX("WSA_RX0 INP2", SND_SOC_NOPM, 0, 0, &rx0_prim_inp2_mux),
+-      SND_SOC_DAPM_MUX_E("WSA_RX0 MIX INP", CDC_WSA_RX0_RX_PATH_MIX_CTL,
+-                         0, 0, &rx0_mix_mux, wsa_macro_enable_mix_path,
++      SND_SOC_DAPM_MUX_E("WSA_RX0 MIX INP", SND_SOC_NOPM, WSA_MACRO_RX_MIX0,
++                         0, &rx0_mix_mux, wsa_macro_enable_mix_path,
+                          SND_SOC_DAPM_PRE_PMU | SND_SOC_DAPM_POST_PMD),
+       SND_SOC_DAPM_MUX("WSA_RX1 INP0", SND_SOC_NOPM, 0, 0, &rx1_prim_inp0_mux),
+       SND_SOC_DAPM_MUX("WSA_RX1 INP1", SND_SOC_NOPM, 0, 0, &rx1_prim_inp1_mux),
+       SND_SOC_DAPM_MUX("WSA_RX1 INP2", SND_SOC_NOPM, 0, 0, &rx1_prim_inp2_mux),
+-      SND_SOC_DAPM_MUX_E("WSA_RX1 MIX INP", CDC_WSA_RX1_RX_PATH_MIX_CTL,
+-                         0, 0, &rx1_mix_mux, wsa_macro_enable_mix_path,
++      SND_SOC_DAPM_MUX_E("WSA_RX1 MIX INP", SND_SOC_NOPM, WSA_MACRO_RX_MIX1,
++                         0, &rx1_mix_mux, wsa_macro_enable_mix_path,
+                          SND_SOC_DAPM_PRE_PMU | SND_SOC_DAPM_POST_PMD),
+       SND_SOC_DAPM_MIXER_E("WSA_RX INT0 MIX", SND_SOC_NOPM, 0, 0, NULL, 0,
+-- 
+2.30.1
+
diff --git a/queue-5.11/counter-stm32-timer-cnt-report-count-function-when-s.patch b/queue-5.11/counter-stm32-timer-cnt-report-count-function-when-s.patch
new file mode 100644 (file)
index 0000000..fbce314
--- /dev/null
@@ -0,0 +1,139 @@
+From 70169638973a543e7b30ced5315920170d10e2c4 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Fri, 26 Feb 2021 10:29:31 +0900
+Subject: counter: stm32-timer-cnt: Report count function when
+ SLAVE_MODE_DISABLED
+
+From: William Breathitt Gray <vilhelm.gray@gmail.com>
+
+[ Upstream commit fae6f62e6a580b663ecf42c2120a0898deae9137 ]
+
+When in SLAVE_MODE_DISABLED mode, the count still increases if the
+counter is enabled because an internal clock is used. This patch fixes
+the stm32_count_function_get() and stm32_count_function_set() functions
+to properly handle this behavior.
+
+Fixes: ad29937e206f ("counter: Add STM32 Timer quadrature encoder")
+Cc: Fabrice Gasnier <fabrice.gasnier@st.com>
+Cc: Maxime Coquelin <mcoquelin.stm32@gmail.com>
+Cc: Alexandre Torgue <alexandre.torgue@st.com>
+Signed-off-by: William Breathitt Gray <vilhelm.gray@gmail.com>
+Reviewed-by: Fabrice Gasnier <fabrice.gasnier@foss.st.com>
+Link: https://lore.kernel.org/r/20210226012931.161429-1-vilhelm.gray@gmail.com
+Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/counter/stm32-timer-cnt.c | 39 ++++++++++++++++++++-----------
+ 1 file changed, 25 insertions(+), 14 deletions(-)
+
+diff --git a/drivers/counter/stm32-timer-cnt.c b/drivers/counter/stm32-timer-cnt.c
+index ef2a974a2f10..cd50dc12bd02 100644
+--- a/drivers/counter/stm32-timer-cnt.c
++++ b/drivers/counter/stm32-timer-cnt.c
+@@ -44,13 +44,14 @@ struct stm32_timer_cnt {
+  * @STM32_COUNT_ENCODER_MODE_3: counts on both TI1FP1 and TI2FP2 edges
+  */
+ enum stm32_count_function {
+-      STM32_COUNT_SLAVE_MODE_DISABLED = -1,
++      STM32_COUNT_SLAVE_MODE_DISABLED,
+       STM32_COUNT_ENCODER_MODE_1,
+       STM32_COUNT_ENCODER_MODE_2,
+       STM32_COUNT_ENCODER_MODE_3,
+ };
+ static enum counter_count_function stm32_count_functions[] = {
++      [STM32_COUNT_SLAVE_MODE_DISABLED] = COUNTER_COUNT_FUNCTION_INCREASE,
+       [STM32_COUNT_ENCODER_MODE_1] = COUNTER_COUNT_FUNCTION_QUADRATURE_X2_A,
+       [STM32_COUNT_ENCODER_MODE_2] = COUNTER_COUNT_FUNCTION_QUADRATURE_X2_B,
+       [STM32_COUNT_ENCODER_MODE_3] = COUNTER_COUNT_FUNCTION_QUADRATURE_X4,
+@@ -90,6 +91,9 @@ static int stm32_count_function_get(struct counter_device *counter,
+       regmap_read(priv->regmap, TIM_SMCR, &smcr);
+       switch (smcr & TIM_SMCR_SMS) {
++      case 0:
++              *function = STM32_COUNT_SLAVE_MODE_DISABLED;
++              return 0;
+       case 1:
+               *function = STM32_COUNT_ENCODER_MODE_1;
+               return 0;
+@@ -99,9 +103,9 @@ static int stm32_count_function_get(struct counter_device *counter,
+       case 3:
+               *function = STM32_COUNT_ENCODER_MODE_3;
+               return 0;
++      default:
++              return -EINVAL;
+       }
+-
+-      return -EINVAL;
+ }
+ static int stm32_count_function_set(struct counter_device *counter,
+@@ -112,6 +116,9 @@ static int stm32_count_function_set(struct counter_device *counter,
+       u32 cr1, sms;
+       switch (function) {
++      case STM32_COUNT_SLAVE_MODE_DISABLED:
++              sms = 0;
++              break;
+       case STM32_COUNT_ENCODER_MODE_1:
+               sms = 1;
+               break;
+@@ -122,8 +129,7 @@ static int stm32_count_function_set(struct counter_device *counter,
+               sms = 3;
+               break;
+       default:
+-              sms = 0;
+-              break;
++              return -EINVAL;
+       }
+       /* Store enable status */
+@@ -274,31 +280,36 @@ static int stm32_action_get(struct counter_device *counter,
+       size_t function;
+       int err;
+-      /* Default action mode (e.g. STM32_COUNT_SLAVE_MODE_DISABLED) */
+-      *action = STM32_SYNAPSE_ACTION_NONE;
+-
+       err = stm32_count_function_get(counter, count, &function);
+       if (err)
+-              return 0;
++              return err;
+       switch (function) {
++      case STM32_COUNT_SLAVE_MODE_DISABLED:
++              /* counts on internal clock when CEN=1 */
++              *action = STM32_SYNAPSE_ACTION_NONE;
++              return 0;
+       case STM32_COUNT_ENCODER_MODE_1:
+               /* counts up/down on TI1FP1 edge depending on TI2FP2 level */
+               if (synapse->signal->id == count->synapses[0].signal->id)
+                       *action = STM32_SYNAPSE_ACTION_BOTH_EDGES;
+-              break;
++              else
++                      *action = STM32_SYNAPSE_ACTION_NONE;
++              return 0;
+       case STM32_COUNT_ENCODER_MODE_2:
+               /* counts up/down on TI2FP2 edge depending on TI1FP1 level */
+               if (synapse->signal->id == count->synapses[1].signal->id)
+                       *action = STM32_SYNAPSE_ACTION_BOTH_EDGES;
+-              break;
++              else
++                      *action = STM32_SYNAPSE_ACTION_NONE;
++              return 0;
+       case STM32_COUNT_ENCODER_MODE_3:
+               /* counts up/down on both TI1FP1 and TI2FP2 edges */
+               *action = STM32_SYNAPSE_ACTION_BOTH_EDGES;
+-              break;
++              return 0;
++      default:
++              return -EINVAL;
+       }
+-
+-      return 0;
+ }
+ static const struct counter_ops stm32_timer_cnt_ops = {
+-- 
+2.30.1
+
diff --git a/queue-5.11/drm-ttm-make-ttm_bo_unpin-more-defensive.patch b/queue-5.11/drm-ttm-make-ttm_bo_unpin-more-defensive.patch
new file mode 100644 (file)
index 0000000..6541d3e
--- /dev/null
@@ -0,0 +1,44 @@
+From 7f69522b0d84c4482b44717e8afe2c4f90d26529 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Fri, 12 Mar 2021 09:34:39 +0100
+Subject: drm/ttm: make ttm_bo_unpin more defensive
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+From: Christian König <christian.koenig@amd.com>
+
+[ Upstream commit 6c5403173a13a08ff61dbdafa4c0ed4a9dedbfe0 ]
+
+We seem to have some more driver bugs than thought.
+
+Signed-off-by: Christian König <christian.koenig@amd.com>
+Fixes: deb0814b43f3 ("drm/ttm: add ttm_bo_pin()/ttm_bo_unpin() v2")
+Acked-by: Matthew Auld <matthew.auld@intel.com>
+Link: https://patchwork.freedesktop.org/patch/msgid/20210312093810.2202-1-christian.koenig@amd.com
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ include/drm/ttm/ttm_bo_api.h | 6 ++++--
+ 1 file changed, 4 insertions(+), 2 deletions(-)
+
+diff --git a/include/drm/ttm/ttm_bo_api.h b/include/drm/ttm/ttm_bo_api.h
+index 79b9367e0ffd..b5bef3199196 100644
+--- a/include/drm/ttm/ttm_bo_api.h
++++ b/include/drm/ttm/ttm_bo_api.h
+@@ -613,9 +613,11 @@ static inline void ttm_bo_pin(struct ttm_buffer_object *bo)
+ static inline void ttm_bo_unpin(struct ttm_buffer_object *bo)
+ {
+       dma_resv_assert_held(bo->base.resv);
+-      WARN_ON_ONCE(!bo->pin_count);
+       WARN_ON_ONCE(!kref_read(&bo->kref));
+-      --bo->pin_count;
++      if (bo->pin_count)
++              --bo->pin_count;
++      else
++              WARN_ON_ONCE(true);
+ }
+ int ttm_mem_evict_first(struct ttm_bo_device *bdev,
+-- 
+2.30.1
+
diff --git a/queue-5.11/drm-ttm-warn-on-pinning-without-holding-a-reference.patch b/queue-5.11/drm-ttm-warn-on-pinning-without-holding-a-reference.patch
new file mode 100644 (file)
index 0000000..9f7d5f3
--- /dev/null
@@ -0,0 +1,66 @@
+From cd813d7f622d54729ddf0402d14359ee3ccba4c7 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Wed, 28 Oct 2020 12:31:20 +0100
+Subject: drm/ttm: Warn on pinning without holding a reference
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+From: Daniel Vetter <daniel.vetter@ffwll.ch>
+
+[ Upstream commit 57fcd550eb15bce14a7154736379dfd4ed60ae81 ]
+
+Not technically a problem for ttm, but very likely a driver bug and
+pretty big time confusing for reviewing code.
+
+So warn about it, both at cleanup time (so we catch these for sure)
+and at pin/unpin time (so we know who's the culprit).
+
+Reviewed-by: Huang Rui <ray.huang@amd.com>
+Reviewed-by: Christian König <christian.koenig@amd.com>
+Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
+Cc: Christian Koenig <christian.koenig@amd.com>
+Cc: Huang Rui <ray.huang@amd.com>
+Link: https://patchwork.freedesktop.org/patch/msgid/20201028113120.3641237-1-daniel.vetter@ffwll.ch
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/gpu/drm/ttm/ttm_bo.c | 2 +-
+ include/drm/ttm/ttm_bo_api.h | 2 ++
+ 2 files changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/drivers/gpu/drm/ttm/ttm_bo.c b/drivers/gpu/drm/ttm/ttm_bo.c
+index 22073e77fdf9..a76eb2c14e8c 100644
+--- a/drivers/gpu/drm/ttm/ttm_bo.c
++++ b/drivers/gpu/drm/ttm/ttm_bo.c
+@@ -514,7 +514,7 @@ static void ttm_bo_release(struct kref *kref)
+                * shrinkers, now that they are queued for
+                * destruction.
+                */
+-              if (bo->pin_count) {
++              if (WARN_ON(bo->pin_count)) {
+                       bo->pin_count = 0;
+                       ttm_bo_del_from_lru(bo);
+                       ttm_bo_add_mem_to_lru(bo, &bo->mem);
+diff --git a/include/drm/ttm/ttm_bo_api.h b/include/drm/ttm/ttm_bo_api.h
+index 2564e66e67d7..79b9367e0ffd 100644
+--- a/include/drm/ttm/ttm_bo_api.h
++++ b/include/drm/ttm/ttm_bo_api.h
+@@ -600,6 +600,7 @@ static inline bool ttm_bo_uses_embedded_gem_object(struct ttm_buffer_object *bo)
+ static inline void ttm_bo_pin(struct ttm_buffer_object *bo)
+ {
+       dma_resv_assert_held(bo->base.resv);
++      WARN_ON_ONCE(!kref_read(&bo->kref));
+       ++bo->pin_count;
+ }
+@@ -613,6 +614,7 @@ static inline void ttm_bo_unpin(struct ttm_buffer_object *bo)
+ {
+       dma_resv_assert_held(bo->base.resv);
+       WARN_ON_ONCE(!bo->pin_count);
++      WARN_ON_ONCE(!kref_read(&bo->kref));
+       --bo->pin_count;
+ }
+-- 
+2.30.1
+
diff --git a/queue-5.11/gpiolib-assign-fwnode-to-parent-s-if-no-primary-one-.patch b/queue-5.11/gpiolib-assign-fwnode-to-parent-s-if-no-primary-one-.patch
new file mode 100644 (file)
index 0000000..8dece3c
--- /dev/null
@@ -0,0 +1,54 @@
+From 5bc80a74a0a053eb587e64276cc1209eb4a86b72 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Mon, 15 Mar 2021 20:44:30 +0200
+Subject: gpiolib: Assign fwnode to parent's if no primary one provided
+
+From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
+
+[ Upstream commit 6cb59afe9e5b45a035bd6b97da6593743feefc72 ]
+
+In case when the properties are supplied in the secondary fwnode
+(for example, built-in device properties) the fwnode pointer left
+unassigned. This makes unable to retrieve them.
+
+Assign fwnode to parent's if no primary one provided.
+
+Fixes: 7cba1a4d5e16 ("gpiolib: generalize devprop_gpiochip_set_names() for device properties")
+Fixes: 2afa97e9868f ("gpiolib: Read "gpio-line-names" from a firmware node")
+Reported-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
+Tested-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
+Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
+Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/gpio/gpiolib.c | 7 +++++++
+ 1 file changed, 7 insertions(+)
+
+diff --git a/drivers/gpio/gpiolib.c b/drivers/gpio/gpiolib.c
+index e4cfa27f6893..a4a47305574c 100644
+--- a/drivers/gpio/gpiolib.c
++++ b/drivers/gpio/gpiolib.c
+@@ -573,6 +573,7 @@ int gpiochip_add_data_with_key(struct gpio_chip *gc, void *data,
+                              struct lock_class_key *lock_key,
+                              struct lock_class_key *request_key)
+ {
++      struct fwnode_handle *fwnode = gc->parent ? dev_fwnode(gc->parent) : NULL;
+       unsigned long   flags;
+       int             ret = 0;
+       unsigned        i;
+@@ -602,6 +603,12 @@ int gpiochip_add_data_with_key(struct gpio_chip *gc, void *data,
+               gc->of_node = gdev->dev.of_node;
+ #endif
++      /*
++       * Assign fwnode depending on the result of the previous calls,
++       * if none of them succeed, assign it to the parent's one.
++       */
++      gdev->dev.fwnode = dev_fwnode(&gdev->dev) ?: fwnode;
++
+       gdev->id = ida_alloc(&gpio_ida, GFP_KERNEL);
+       if (gdev->id < 0) {
+               ret = gdev->id;
+-- 
+2.30.1
+
diff --git a/queue-5.11/nvme-rdma-fix-possible-hang-when-failing-to-set-io-q.patch b/queue-5.11/nvme-rdma-fix-possible-hang-when-failing-to-set-io-q.patch
new file mode 100644 (file)
index 0000000..f391f4e
--- /dev/null
@@ -0,0 +1,46 @@
+From 29333a8d8d6b303121432235f02b17fd7145319b Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Mon, 15 Mar 2021 14:04:27 -0700
+Subject: nvme-rdma: fix possible hang when failing to set io queues
+
+From: Sagi Grimberg <sagi@grimberg.me>
+
+[ Upstream commit c4c6df5fc84659690d4391d1fba155cd94185295 ]
+
+We only setup io queues for nvme controllers, and it makes absolutely no
+sense to allow a controller (re)connect without any I/O queues.  If we
+happen to fail setting the queue count for any reason, we should not allow
+this to be a successful reconnect as I/O has no chance in going through.
+Instead just fail and schedule another reconnect.
+
+Reported-by: Chao Leng <lengchao@huawei.com>
+Fixes: 711023071960 ("nvme-rdma: add a NVMe over Fabrics RDMA host driver")
+Signed-off-by: Sagi Grimberg <sagi@grimberg.me>
+Reviewed-by: Chao Leng <lengchao@huawei.com>
+Signed-off-by: Christoph Hellwig <hch@lst.de>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/nvme/host/rdma.c | 7 +++++--
+ 1 file changed, 5 insertions(+), 2 deletions(-)
+
+diff --git a/drivers/nvme/host/rdma.c b/drivers/nvme/host/rdma.c
+index 746392eade45..0c3da10c1f29 100644
+--- a/drivers/nvme/host/rdma.c
++++ b/drivers/nvme/host/rdma.c
+@@ -736,8 +736,11 @@ static int nvme_rdma_alloc_io_queues(struct nvme_rdma_ctrl *ctrl)
+               return ret;
+       ctrl->ctrl.queue_count = nr_io_queues + 1;
+-      if (ctrl->ctrl.queue_count < 2)
+-              return 0;
++      if (ctrl->ctrl.queue_count < 2) {
++              dev_err(ctrl->ctrl.device,
++                      "unable to set any I/O queues\n");
++              return -ENOMEM;
++      }
+       dev_info(ctrl->ctrl.device,
+               "creating %d I/O queues.\n", nr_io_queues);
+-- 
+2.30.1
+
diff --git a/queue-5.11/powerpc-vdso32-add-missing-_restgpr_31_x-to-fix-buil.patch b/queue-5.11/powerpc-vdso32-add-missing-_restgpr_31_x-to-fix-buil.patch
new file mode 100644 (file)
index 0000000..d8e5629
--- /dev/null
@@ -0,0 +1,51 @@
+From 35df95b20980115e6ad065bf58808d0bd7bca94c Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Tue, 9 Mar 2021 06:19:30 +0000
+Subject: powerpc/vdso32: Add missing _restgpr_31_x to fix build failure
+
+From: Christophe Leroy <christophe.leroy@csgroup.eu>
+
+[ Upstream commit 08c18b63d9656e0389087d1956d2b37fd7019172 ]
+
+With some defconfig including CONFIG_CC_OPTIMIZE_FOR_SIZE,
+(for instance mvme5100_defconfig and ps3_defconfig), gcc 5
+generates a call to _restgpr_31_x.
+
+Until recently it went unnoticed, but
+commit 42ed6d56ade2 ("powerpc/vdso: Block R_PPC_REL24 relocations")
+made it rise to the surface.
+
+Provide that function (copied from lib/crtsavres.S) in
+gettimeofday.S
+
+Fixes: ab037dd87a2f ("powerpc/vdso: Switch VDSO to generic C implementation.")
+Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
+Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
+Link: https://lore.kernel.org/r/a7aa198a88bcd33c6e35e99f70f86c7b7f2f9440.1615270757.git.christophe.leroy@csgroup.eu
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ arch/powerpc/kernel/vdso32/gettimeofday.S | 11 +++++++++++
+ 1 file changed, 11 insertions(+)
+
+diff --git a/arch/powerpc/kernel/vdso32/gettimeofday.S b/arch/powerpc/kernel/vdso32/gettimeofday.S
+index a6e29f880e0e..d21d08140a5e 100644
+--- a/arch/powerpc/kernel/vdso32/gettimeofday.S
++++ b/arch/powerpc/kernel/vdso32/gettimeofday.S
+@@ -65,3 +65,14 @@ V_FUNCTION_END(__kernel_clock_getres)
+ V_FUNCTION_BEGIN(__kernel_time)
+       cvdso_call_time __c_kernel_time
+ V_FUNCTION_END(__kernel_time)
++
++/* Routines for restoring integer registers, called by the compiler.  */
++/* Called with r11 pointing to the stack header word of the caller of the */
++/* function, just beyond the end of the integer restore area.  */
++_GLOBAL(_restgpr_31_x)
++_GLOBAL(_rest32gpr_31_x)
++      lwz     r0,4(r11)
++      lwz     r31,-4(r11)
++      mtlr    r0
++      mr      r1,r11
++      blr
+-- 
+2.30.1
+
index 487f67d92edadf45f4cc94be8c9532ae8d75033d..cf1b5779484aaf3b24d7ab122e2befc0b28bf020 100644 (file)
@@ -66,3 +66,11 @@ scsi-myrs-fix-a-double-free-in-myrs_cleanup.patch
 scsi-ufs-ufs-mediatek-correct-operator.patch
 scsi-mpt3sas-do-not-use-gfp_kernel-in-atomic-context.patch
 risc-v-correct-enum-sbi_ext_rfence_fid.patch
+counter-stm32-timer-cnt-report-count-function-when-s.patch
+asoc-codecs-lpass-va-macro-mute-unmute-all-active-de.patch
+asoc-codecs-lpass-wsa-macro-fix-rx-mix-input-control.patch
+powerpc-vdso32-add-missing-_restgpr_31_x-to-fix-buil.patch
+drm-ttm-warn-on-pinning-without-holding-a-reference.patch
+drm-ttm-make-ttm_bo_unpin-more-defensive.patch
+gpiolib-assign-fwnode-to-parent-s-if-no-primary-one-.patch
+nvme-rdma-fix-possible-hang-when-failing-to-set-io-q.patch