linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH AUTOSEL 5.4 01/10] ASoC: ops: Fix off by one in range control validation
@ 2022-07-14  4:26 Sasha Levin
  2022-07-14  4:26 ` [PATCH AUTOSEL 5.4 02/10] ASoC: wm5110: Fix DRE control Sasha Levin
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: Sasha Levin @ 2022-07-14  4:26 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: Mark Brown, Sasha Levin, lgirdwood, perex, tiwai, alsa-devel

From: Mark Brown <broonie@kernel.org>

[ Upstream commit 5871321fb4558c55bf9567052b618ff0be6b975e ]

We currently report that range controls accept a range of 0..(max-min) but
accept writes in the range 0..(max-min+1). Remove that extra +1.

Signed-off-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20220604105246.4055214-1-broonie@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 sound/soc/soc-ops.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/sound/soc/soc-ops.c b/sound/soc/soc-ops.c
index 7a37312c8e0c..453b61b42dd9 100644
--- a/sound/soc/soc-ops.c
+++ b/sound/soc/soc-ops.c
@@ -530,7 +530,7 @@ int snd_soc_put_volsw_range(struct snd_kcontrol *kcontrol,
 		return -EINVAL;
 	if (mc->platform_max && tmp > mc->platform_max)
 		return -EINVAL;
-	if (tmp > mc->max - mc->min + 1)
+	if (tmp > mc->max - mc->min)
 		return -EINVAL;
 
 	if (invert)
@@ -551,7 +551,7 @@ int snd_soc_put_volsw_range(struct snd_kcontrol *kcontrol,
 			return -EINVAL;
 		if (mc->platform_max && tmp > mc->platform_max)
 			return -EINVAL;
-		if (tmp > mc->max - mc->min + 1)
+		if (tmp > mc->max - mc->min)
 			return -EINVAL;
 
 		if (invert)
-- 
2.35.1


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH AUTOSEL 5.4 02/10] ASoC: wm5110: Fix DRE control
  2022-07-14  4:26 [PATCH AUTOSEL 5.4 01/10] ASoC: ops: Fix off by one in range control validation Sasha Levin
@ 2022-07-14  4:26 ` Sasha Levin
  2022-07-14  4:26 ` [PATCH AUTOSEL 5.4 03/10] ASoC: cs47l15: Fix event generation for low power mux control Sasha Levin
                   ` (7 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: Sasha Levin @ 2022-07-14  4:26 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: Charles Keepax, Mark Brown, Sasha Levin, lgirdwood, perex, tiwai,
	simont, patches, alsa-devel

From: Charles Keepax <ckeepax@opensource.cirrus.com>

[ Upstream commit 0bc0ae9a5938d512fd5d44f11c9c04892dcf4961 ]

The DRE controls on wm5110 should return a value of 1 if the DRE state
is actually changed, update to fix this.

Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20220621102041.1713504-2-ckeepax@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 sound/soc/codecs/wm5110.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/sound/soc/codecs/wm5110.c b/sound/soc/codecs/wm5110.c
index 9dc215b5c504..06ec3f48c808 100644
--- a/sound/soc/codecs/wm5110.c
+++ b/sound/soc/codecs/wm5110.c
@@ -413,6 +413,7 @@ static int wm5110_put_dre(struct snd_kcontrol *kcontrol,
 	unsigned int rnew = (!!ucontrol->value.integer.value[1]) << mc->rshift;
 	unsigned int lold, rold;
 	unsigned int lena, rena;
+	bool change = false;
 	int ret;
 
 	snd_soc_dapm_mutex_lock(dapm);
@@ -440,8 +441,8 @@ static int wm5110_put_dre(struct snd_kcontrol *kcontrol,
 		goto err;
 	}
 
-	ret = regmap_update_bits(arizona->regmap, ARIZONA_DRE_ENABLE,
-				 mask, lnew | rnew);
+	ret = regmap_update_bits_check(arizona->regmap, ARIZONA_DRE_ENABLE,
+				       mask, lnew | rnew, &change);
 	if (ret) {
 		dev_err(arizona->dev, "Failed to set DRE: %d\n", ret);
 		goto err;
@@ -454,6 +455,9 @@ static int wm5110_put_dre(struct snd_kcontrol *kcontrol,
 	if (!rnew && rold)
 		wm5110_clear_pga_volume(arizona, mc->rshift);
 
+	if (change)
+		ret = 1;
+
 err:
 	snd_soc_dapm_mutex_unlock(dapm);
 
-- 
2.35.1


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH AUTOSEL 5.4 03/10] ASoC: cs47l15: Fix event generation for low power mux control
  2022-07-14  4:26 [PATCH AUTOSEL 5.4 01/10] ASoC: ops: Fix off by one in range control validation Sasha Levin
  2022-07-14  4:26 ` [PATCH AUTOSEL 5.4 02/10] ASoC: wm5110: Fix DRE control Sasha Levin
@ 2022-07-14  4:26 ` Sasha Levin
  2022-07-14  4:26 ` [PATCH AUTOSEL 5.4 04/10] ASoC: madera: Fix event generation for OUT1 demux Sasha Levin
                   ` (6 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: Sasha Levin @ 2022-07-14  4:26 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: Charles Keepax, Mark Brown, Sasha Levin, rf, james.schulman,
	david.rhodes, tanureal, lgirdwood, perex, tiwai, alsa-devel,
	patches

From: Charles Keepax <ckeepax@opensource.cirrus.com>

[ Upstream commit 7f103af4a10f375b9b346b4d0b730f6a66b8c451 ]

cs47l15_in1_adc_put always returns zero regardless of if the control
value was updated. This results in missing notifications to user-space
of the control change. Update the handling to return 1 when the value is
changed.

Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20220623105120.1981154-3-ckeepax@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 sound/soc/codecs/cs47l15.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/sound/soc/codecs/cs47l15.c b/sound/soc/codecs/cs47l15.c
index ece1276f38eb..1f7148794a5a 100644
--- a/sound/soc/codecs/cs47l15.c
+++ b/sound/soc/codecs/cs47l15.c
@@ -122,6 +122,9 @@ static int cs47l15_in1_adc_put(struct snd_kcontrol *kcontrol,
 		snd_soc_kcontrol_component(kcontrol);
 	struct cs47l15 *cs47l15 = snd_soc_component_get_drvdata(component);
 
+	if (!!ucontrol->value.integer.value[0] == cs47l15->in1_lp_mode)
+		return 0;
+
 	switch (ucontrol->value.integer.value[0]) {
 	case 0:
 		/* Set IN1 to normal mode */
@@ -150,7 +153,7 @@ static int cs47l15_in1_adc_put(struct snd_kcontrol *kcontrol,
 		break;
 	}
 
-	return 0;
+	return 1;
 }
 
 static const struct snd_kcontrol_new cs47l15_snd_controls[] = {
-- 
2.35.1


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH AUTOSEL 5.4 04/10] ASoC: madera: Fix event generation for OUT1 demux
  2022-07-14  4:26 [PATCH AUTOSEL 5.4 01/10] ASoC: ops: Fix off by one in range control validation Sasha Levin
  2022-07-14  4:26 ` [PATCH AUTOSEL 5.4 02/10] ASoC: wm5110: Fix DRE control Sasha Levin
  2022-07-14  4:26 ` [PATCH AUTOSEL 5.4 03/10] ASoC: cs47l15: Fix event generation for low power mux control Sasha Levin
@ 2022-07-14  4:26 ` Sasha Levin
  2022-07-14  4:26 ` [PATCH AUTOSEL 5.4 05/10] ASoC: madera: Fix event generation for rate controls Sasha Levin
                   ` (5 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: Sasha Levin @ 2022-07-14  4:26 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: Charles Keepax, Mark Brown, Sasha Levin, rf, lgirdwood, perex,
	tiwai, alsa-devel, patches

From: Charles Keepax <ckeepax@opensource.cirrus.com>

[ Upstream commit e3cabbef3db8269207a6b8808f510137669f8deb ]

madera_out1_demux_put returns the value of
snd_soc_dapm_mux_update_power, which returns a 1 if a path was found for
the kcontrol. This is obviously different to the expected return a 1 if
the control was updated value. This results in spurious notifications to
user-space. Update the handling to only return a 1 when the value is
changed.

Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20220623105120.1981154-4-ckeepax@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 sound/soc/codecs/madera.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/sound/soc/codecs/madera.c b/sound/soc/codecs/madera.c
index 52639811cc52..e375dca9ba8d 100644
--- a/sound/soc/codecs/madera.c
+++ b/sound/soc/codecs/madera.c
@@ -568,7 +568,13 @@ int madera_out1_demux_put(struct snd_kcontrol *kcontrol,
 end:
 	snd_soc_dapm_mutex_unlock(dapm);
 
-	return snd_soc_dapm_mux_update_power(dapm, kcontrol, mux, e, NULL);
+	ret = snd_soc_dapm_mux_update_power(dapm, kcontrol, mux, e, NULL);
+	if (ret < 0) {
+		dev_err(madera->dev, "Failed to update demux power state: %d\n", ret);
+		return ret;
+	}
+
+	return change;
 }
 EXPORT_SYMBOL_GPL(madera_out1_demux_put);
 
-- 
2.35.1


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH AUTOSEL 5.4 05/10] ASoC: madera: Fix event generation for rate controls
  2022-07-14  4:26 [PATCH AUTOSEL 5.4 01/10] ASoC: ops: Fix off by one in range control validation Sasha Levin
                   ` (2 preceding siblings ...)
  2022-07-14  4:26 ` [PATCH AUTOSEL 5.4 04/10] ASoC: madera: Fix event generation for OUT1 demux Sasha Levin
@ 2022-07-14  4:26 ` Sasha Levin
  2022-07-14  4:26 ` [PATCH AUTOSEL 5.4 06/10] irqchip: or1k-pic: Undefine mask_ack for level triggered hardware Sasha Levin
                   ` (4 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: Sasha Levin @ 2022-07-14  4:26 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: Charles Keepax, Mark Brown, Sasha Levin, rf, lgirdwood, perex,
	tiwai, alsa-devel, patches

From: Charles Keepax <ckeepax@opensource.cirrus.com>

[ Upstream commit 980555e95f7cabdc9c80a07107622b097ba23703 ]

madera_adsp_rate_put always returns zero regardless of if the control
value was updated. This results in missing notifications to user-space
of the control change. Update the handling to return 1 when the
value is changed.

Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20220623105120.1981154-5-ckeepax@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 sound/soc/codecs/madera.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/sound/soc/codecs/madera.c b/sound/soc/codecs/madera.c
index e375dca9ba8d..4a56082a4c43 100644
--- a/sound/soc/codecs/madera.c
+++ b/sound/soc/codecs/madera.c
@@ -853,7 +853,7 @@ static int madera_adsp_rate_put(struct snd_kcontrol *kcontrol,
 	struct soc_enum *e = (struct soc_enum *)kcontrol->private_value;
 	const int adsp_num = e->shift_l;
 	const unsigned int item = ucontrol->value.enumerated.item[0];
-	int ret;
+	int ret = 0;
 
 	if (item >= e->items)
 		return -EINVAL;
@@ -870,10 +870,10 @@ static int madera_adsp_rate_put(struct snd_kcontrol *kcontrol,
 			 "Cannot change '%s' while in use by active audio paths\n",
 			 kcontrol->id.name);
 		ret = -EBUSY;
-	} else {
+	} else if (priv->adsp_rate_cache[adsp_num] != e->values[item]) {
 		/* Volatile register so defer until the codec is powered up */
 		priv->adsp_rate_cache[adsp_num] = e->values[item];
-		ret = 0;
+		ret = 1;
 	}
 
 	mutex_unlock(&priv->rate_lock);
-- 
2.35.1


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH AUTOSEL 5.4 06/10] irqchip: or1k-pic: Undefine mask_ack for level triggered hardware
  2022-07-14  4:26 [PATCH AUTOSEL 5.4 01/10] ASoC: ops: Fix off by one in range control validation Sasha Levin
                   ` (3 preceding siblings ...)
  2022-07-14  4:26 ` [PATCH AUTOSEL 5.4 05/10] ASoC: madera: Fix event generation for rate controls Sasha Levin
@ 2022-07-14  4:26 ` Sasha Levin
  2022-07-14  4:26 ` [PATCH AUTOSEL 5.4 07/10] x86: Clear .brk area at early boot Sasha Levin
                   ` (3 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: Sasha Levin @ 2022-07-14  4:26 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: Stafford Horne, Marc Zyngier, Sasha Levin, jonas,
	stefan.kristiansson, tglx, openrisc

From: Stafford Horne <shorne@gmail.com>

[ Upstream commit 8520501346ed8d1c4a6dfa751cb57328a9c843f1 ]

The mask_ack operation clears the interrupt by writing to the PICSR
register.  This we don't want for level triggered interrupt because
it does not actually clear the interrupt on the source hardware.

This was causing issues in qemu with multi core setups where
interrupts would continue to fire even though they had been cleared in
PICSR.

Just remove the mask_ack operation.

Acked-by: Marc Zyngier <maz@kernel.org>
Signed-off-by: Stafford Horne <shorne@gmail.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/irqchip/irq-or1k-pic.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/irqchip/irq-or1k-pic.c b/drivers/irqchip/irq-or1k-pic.c
index 03d2366118dd..d5f1fabc45d7 100644
--- a/drivers/irqchip/irq-or1k-pic.c
+++ b/drivers/irqchip/irq-or1k-pic.c
@@ -66,7 +66,6 @@ static struct or1k_pic_dev or1k_pic_level = {
 		.name = "or1k-PIC-level",
 		.irq_unmask = or1k_pic_unmask,
 		.irq_mask = or1k_pic_mask,
-		.irq_mask_ack = or1k_pic_mask_ack,
 	},
 	.handle = handle_level_irq,
 	.flags = IRQ_LEVEL | IRQ_NOPROBE,
-- 
2.35.1


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH AUTOSEL 5.4 07/10] x86: Clear .brk area at early boot
  2022-07-14  4:26 [PATCH AUTOSEL 5.4 01/10] ASoC: ops: Fix off by one in range control validation Sasha Levin
                   ` (4 preceding siblings ...)
  2022-07-14  4:26 ` [PATCH AUTOSEL 5.4 06/10] irqchip: or1k-pic: Undefine mask_ack for level triggered hardware Sasha Levin
@ 2022-07-14  4:26 ` Sasha Levin
  2022-07-14  4:26 ` [PATCH AUTOSEL 5.4 08/10] soc: ixp4xx/npe: Fix unused match warning Sasha Levin
                   ` (2 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: Sasha Levin @ 2022-07-14  4:26 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: Juergen Gross, Borislav Petkov, Sasha Levin, tglx, mingo, bp,
	dave.hansen, x86, brijesh.singh, ak, kirill.shutemov,
	michael.roth, sathyanarayanan.kuppuswamy, thomas.lendacky

From: Juergen Gross <jgross@suse.com>

[ Upstream commit 38fa5479b41376dc9d7f57e71c83514285a25ca0 ]

The .brk section has the same properties as .bss: it is an alloc-only
section and should be cleared before being used.

Not doing so is especially a problem for Xen PV guests, as the
hypervisor will validate page tables (check for writable page tables
and hypervisor private bits) before accepting them to be used.

Make sure .brk is initially zero by letting clear_bss() clear the brk
area, too.

Signed-off-by: Juergen Gross <jgross@suse.com>
Signed-off-by: Borislav Petkov <bp@suse.de>
Link: https://lore.kernel.org/r/20220630071441.28576-3-jgross@suse.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 arch/x86/kernel/head64.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/arch/x86/kernel/head64.c b/arch/x86/kernel/head64.c
index 206a4b6144c2..950286016f63 100644
--- a/arch/x86/kernel/head64.c
+++ b/arch/x86/kernel/head64.c
@@ -383,6 +383,8 @@ static void __init clear_bss(void)
 {
 	memset(__bss_start, 0,
 	       (unsigned long) __bss_stop - (unsigned long) __bss_start);
+	memset(__brk_base, 0,
+	       (unsigned long) __brk_limit - (unsigned long) __brk_base);
 }
 
 static unsigned long get_cmd_line_ptr(void)
-- 
2.35.1


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH AUTOSEL 5.4 08/10] soc: ixp4xx/npe: Fix unused match warning
  2022-07-14  4:26 [PATCH AUTOSEL 5.4 01/10] ASoC: ops: Fix off by one in range control validation Sasha Levin
                   ` (5 preceding siblings ...)
  2022-07-14  4:26 ` [PATCH AUTOSEL 5.4 07/10] x86: Clear .brk area at early boot Sasha Levin
@ 2022-07-14  4:26 ` Sasha Levin
  2022-07-14  4:26 ` [PATCH AUTOSEL 5.4 09/10] ARM: dts: stm32: use the correct clock source for CEC on stm32mp151 Sasha Levin
  2022-07-14  4:26 ` [PATCH AUTOSEL 5.4 10/10] signal handling: don't use BUG_ON() for debugging Sasha Levin
  8 siblings, 0 replies; 10+ messages in thread
From: Sasha Levin @ 2022-07-14  4:26 UTC (permalink / raw)
  To: linux-kernel, stable; +Cc: Linus Walleij, Arnd Bergmann, Sasha Levin, khalasa

From: Linus Walleij <linus.walleij@linaro.org>

[ Upstream commit 620f83b8326ce9706b1118334f0257ae028ce045 ]

The kernel test robot found this inconsistency:

  drivers/soc/ixp4xx/ixp4xx-npe.c:737:34: warning:
  'ixp4xx_npe_of_match' defined but not used [-Wunused-const-variable=]
     737 | static const struct of_device_id ixp4xx_npe_of_match[] = {

This is because the match is enclosed in the of_match_ptr()
which compiles into NULL when OF is disabled and this
is unnecessary.

Fix it by dropping of_match_ptr() around the match.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Link: https://lore.kernel.org/r/20220626074315.61209-1-linus.walleij@linaro.org'
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/soc/ixp4xx/ixp4xx-npe.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/soc/ixp4xx/ixp4xx-npe.c b/drivers/soc/ixp4xx/ixp4xx-npe.c
index 6065aaab6740..8482a4892b83 100644
--- a/drivers/soc/ixp4xx/ixp4xx-npe.c
+++ b/drivers/soc/ixp4xx/ixp4xx-npe.c
@@ -735,7 +735,7 @@ static const struct of_device_id ixp4xx_npe_of_match[] = {
 static struct platform_driver ixp4xx_npe_driver = {
 	.driver = {
 		.name           = "ixp4xx-npe",
-		.of_match_table = of_match_ptr(ixp4xx_npe_of_match),
+		.of_match_table = ixp4xx_npe_of_match,
 	},
 	.probe = ixp4xx_npe_probe,
 	.remove = ixp4xx_npe_remove,
-- 
2.35.1


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH AUTOSEL 5.4 09/10] ARM: dts: stm32: use the correct clock source for CEC on stm32mp151
  2022-07-14  4:26 [PATCH AUTOSEL 5.4 01/10] ASoC: ops: Fix off by one in range control validation Sasha Levin
                   ` (6 preceding siblings ...)
  2022-07-14  4:26 ` [PATCH AUTOSEL 5.4 08/10] soc: ixp4xx/npe: Fix unused match warning Sasha Levin
@ 2022-07-14  4:26 ` Sasha Levin
  2022-07-14  4:26 ` [PATCH AUTOSEL 5.4 10/10] signal handling: don't use BUG_ON() for debugging Sasha Levin
  8 siblings, 0 replies; 10+ messages in thread
From: Sasha Levin @ 2022-07-14  4:26 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: Gabriel Fernandez, Alexandre Torgue, Sasha Levin, robh+dt,
	krzysztof.kozlowski+dt, mcoquelin.stm32, devicetree, linux-stm32,
	linux-arm-kernel

From: Gabriel Fernandez <gabriel.fernandez@foss.st.com>

[ Upstream commit 78ece8cce1ba0c3f3e5a7c6c1b914b3794f04c44 ]

The peripheral clock of CEC is not LSE but CEC.

Signed-off-by: Gabriel Fernandez <gabriel.fernandez@foss.st.com>
Signed-off-by: Alexandre Torgue <alexandre.torgue@foss.st.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 arch/arm/boot/dts/stm32mp157c.dtsi | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/boot/dts/stm32mp157c.dtsi b/arch/arm/boot/dts/stm32mp157c.dtsi
index a687c024daa9..0e9e930c60f0 100644
--- a/arch/arm/boot/dts/stm32mp157c.dtsi
+++ b/arch/arm/boot/dts/stm32mp157c.dtsi
@@ -515,7 +515,7 @@ cec: cec@40016000 {
 			compatible = "st,stm32-cec";
 			reg = <0x40016000 0x400>;
 			interrupts = <GIC_SPI 94 IRQ_TYPE_LEVEL_HIGH>;
-			clocks = <&rcc CEC_K>, <&clk_lse>;
+			clocks = <&rcc CEC_K>, <&rcc CEC>;
 			clock-names = "cec", "hdmi-cec";
 			status = "disabled";
 		};
-- 
2.35.1


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH AUTOSEL 5.4 10/10] signal handling: don't use BUG_ON() for debugging
  2022-07-14  4:26 [PATCH AUTOSEL 5.4 01/10] ASoC: ops: Fix off by one in range control validation Sasha Levin
                   ` (7 preceding siblings ...)
  2022-07-14  4:26 ` [PATCH AUTOSEL 5.4 09/10] ARM: dts: stm32: use the correct clock source for CEC on stm32mp151 Sasha Levin
@ 2022-07-14  4:26 ` Sasha Levin
  8 siblings, 0 replies; 10+ messages in thread
From: Sasha Levin @ 2022-07-14  4:26 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: Linus Torvalds, Sasha Levin, ebiederm, keescook, oleg, tglx, peterz

From: Linus Torvalds <torvalds@linux-foundation.org>

[ Upstream commit a382f8fee42ca10c9bfce0d2352d4153f931f5dc ]

These are indeed "should not happen" situations, but it turns out recent
changes made the 'task_is_stopped_or_trace()' case trigger (fix for that
exists, is pending more testing), and the BUG_ON() makes it
unnecessarily hard to actually debug for no good reason.

It's been that way for a long time, but let's make it clear: BUG_ON() is
not good for debugging, and should never be used in situations where you
could just say "this shouldn't happen, but we can continue".

Use WARN_ON_ONCE() instead to make sure it gets logged, and then just
continue running.  Instead of making the system basically unusuable
because you crashed the machine while potentially holding some very core
locks (eg this function is commonly called while holding 'tasklist_lock'
for writing).

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 kernel/signal.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/kernel/signal.c b/kernel/signal.c
index 3f61367fd168..1f4293a107b4 100644
--- a/kernel/signal.c
+++ b/kernel/signal.c
@@ -1916,12 +1916,12 @@ bool do_notify_parent(struct task_struct *tsk, int sig)
 	bool autoreap = false;
 	u64 utime, stime;
 
-	BUG_ON(sig == -1);
+	WARN_ON_ONCE(sig == -1);
 
- 	/* do_notify_parent_cldstop should have been called instead.  */
- 	BUG_ON(task_is_stopped_or_traced(tsk));
+	/* do_notify_parent_cldstop should have been called instead.  */
+	WARN_ON_ONCE(task_is_stopped_or_traced(tsk));
 
-	BUG_ON(!tsk->ptrace &&
+	WARN_ON_ONCE(!tsk->ptrace &&
 	       (tsk->group_leader != tsk || !thread_group_empty(tsk)));
 
 	/* Wake up all pidfd waiters */
-- 
2.35.1


^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2022-07-14  4:37 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-14  4:26 [PATCH AUTOSEL 5.4 01/10] ASoC: ops: Fix off by one in range control validation Sasha Levin
2022-07-14  4:26 ` [PATCH AUTOSEL 5.4 02/10] ASoC: wm5110: Fix DRE control Sasha Levin
2022-07-14  4:26 ` [PATCH AUTOSEL 5.4 03/10] ASoC: cs47l15: Fix event generation for low power mux control Sasha Levin
2022-07-14  4:26 ` [PATCH AUTOSEL 5.4 04/10] ASoC: madera: Fix event generation for OUT1 demux Sasha Levin
2022-07-14  4:26 ` [PATCH AUTOSEL 5.4 05/10] ASoC: madera: Fix event generation for rate controls Sasha Levin
2022-07-14  4:26 ` [PATCH AUTOSEL 5.4 06/10] irqchip: or1k-pic: Undefine mask_ack for level triggered hardware Sasha Levin
2022-07-14  4:26 ` [PATCH AUTOSEL 5.4 07/10] x86: Clear .brk area at early boot Sasha Levin
2022-07-14  4:26 ` [PATCH AUTOSEL 5.4 08/10] soc: ixp4xx/npe: Fix unused match warning Sasha Levin
2022-07-14  4:26 ` [PATCH AUTOSEL 5.4 09/10] ARM: dts: stm32: use the correct clock source for CEC on stm32mp151 Sasha Levin
2022-07-14  4:26 ` [PATCH AUTOSEL 5.4 10/10] signal handling: don't use BUG_ON() for debugging Sasha Levin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).