linux-stable/drivers/soc
Sean Anderson d6b5aac451 soc: fsl: qbman: Use raw spinlock for cgr_lock
[ Upstream commit fbec4e7fed ]

smp_call_function always runs its callback in hard IRQ context, even on
PREEMPT_RT, where spinlocks can sleep. So we need to use a raw spinlock
for cgr_lock to ensure we aren't waiting on a sleeping task.

Although this bug has existed for a while, it was not apparent until
commit ef2a8d5478 ("net: dpaa: Adjust queue depth on rate change")
which invokes smp_call_function_single via qman_update_cgr_safe every
time a link goes up or down.

Fixes: 96f413f476 ("soc/fsl/qbman: fix issue in qman_delete_cgr_safe()")
CC: stable@vger.kernel.org
Reported-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Closes: https://lore.kernel.org/all/20230323153935.nofnjucqjqnz34ej@skbuf/
Reported-by: Steffen Trumtrar <s.trumtrar@pengutronix.de>
Closes: https://lore.kernel.org/linux-arm-kernel/87wmsyvclu.fsf@pengutronix.de/
Signed-off-by: Sean Anderson <sean.anderson@linux.dev>
Reviewed-by: Camelia Groza <camelia.groza@nxp.com>
Tested-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-04-03 15:19:36 +02:00
..
actions
amlogic drivers: meson: secure-pwrc: always enable DMA domain 2023-07-19 16:21:33 +02:00
apple
aspeed soc: aspeed: socinfo: Add kfree for kstrdup 2023-08-23 17:52:38 +02:00
atmel
bcm pmdomain: bcm: bcm2835-power: check if the ASB register is equal to enable 2023-11-28 17:07:16 +00:00
canaan
dove
fsl soc: fsl: qbman: Use raw spinlock for cgr_lock 2024-04-03 15:19:36 +02:00
fujitsu
gemini
imx pmdomain: imx: Make imx pgc power domain also set the fwnode 2023-11-28 17:07:16 +00:00
ixp4xx
lantiq
litex
mediatek pmdomain: mediatek: fix race conditions with genpd 2024-03-01 13:26:30 +01:00
microchip soc: microchip: Fix POLARFIRE_SOC_SYS_CTRL input prompt 2024-03-26 18:20:25 -04:00
pxa
qcom pmdomain: qcom: rpmhpd: Drop SA8540P gfx.lvl 2024-03-26 18:20:32 -04:00
renesas pmdomain: renesas: r8a77980-sysc: CR7 must be always on 2024-03-01 13:26:30 +01:00
rockchip
samsung
sifive
sunxi
tegra
ti
ux500
versatile
xilinx soc: xilinx: fix unhandled SGI warning message 2024-02-05 20:12:50 +00:00
Kconfig
Makefile