[PATCH v2 2/2] soc: fsl: qbman: Use raw spinlock for cgr_lock
Camelia Alexandra Groza
camelia.groza at nxp.com
Tue Apr 4 19:36:00 AEST 2023
> -----Original Message-----
> From: Sean Anderson <sean.anderson at seco.com>
> Sent: Friday, March 31, 2023 18:14
> To: Leo Li <leoyang.li at nxp.com>; linuxppc-dev at lists.ozlabs.org; linux-arm-
> kernel at lists.infradead.org
> Cc: Scott Wood <oss at buserror.net>; Camelia Alexandra Groza
> <camelia.groza at nxp.com>; linux-kernel at vger.kernel.org; Roy Pledge
> <roy.pledge at nxp.com>; David S . Miller <davem at davemloft.net>; Claudiu
> Manoil <claudiu.manoil at nxp.com>; Vladimir Oltean
> <vladimir.oltean at nxp.com>; Sean Anderson <sean.anderson at seco.com>
> Subject: [PATCH v2 2/2] soc: fsl: qbman: Use raw spinlock for cgr_lock
>
> cgr_lock may be locked with interrupts already disabled by
> smp_call_function_single. As such, we must use a raw spinlock to avoid
> problems on PREEMPT_RT kernels. Although this bug has existed for a
> while, it was not apparent until commit ef2a8d5478b9 ("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: c535e923bb97 ("soc/fsl: Introduce DPAA 1.x QMan device driver")
> Reported-by: Vladimir Oltean <vladimir.oltean at nxp.com>
> Link: https://lore.kernel.org/all/20230323153935.nofnjucqjqnz34ej@skbuf/
> Signed-off-by: Sean Anderson <sean.anderson at seco.com>
Reviewed-by: Camelia Groza <camelia.groza at nxp.com>
More information about the Linuxppc-dev
mailing list