linux-stable/drivers/soc/fsl
Sean Anderson cd53a8ae5a 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:32:21 +02:00
..
dpio soc: fsl: dpio: fix kcalloc() argument order 2024-03-26 18:17:32 -04:00
qbman soc: fsl: qbman: Use raw spinlock for cgr_lock 2024-04-03 15:32:21 +02:00
qe soc: fsl: cpm1: qmc: Introduce functions to change timeslots at runtime 2023-12-12 10:29:20 +01:00
Kconfig soc: fsl: select FSL_GUTS driver for DPIO 2022-09-02 11:28:40 +02:00
Makefile soc: fsl: add RCPM driver 2019-11-12 15:26:05 -06:00
dpaa2-console.c soc/fsl: dpaa2-console: Convert to platform remove callback returning void 2023-10-14 23:26:45 +02:00
guts.c soc: fsl: guts: check return value after calling of_iomap() in fsl_guts_get_soc_uid() 2022-07-05 08:41:55 +08:00
rcpm.c soc: fsl: rcpm: Make use of the helper function devm_platform_ioremap_resource() 2021-10-21 19:37:32 -05:00