[PATCH] arm: Convert arm boot_lock to raw

Krzysztof Kozlowski krzk at kernel.org
Sun May 6 11:23:25 PDT 2018


On Fri, May 04, 2018 at 12:55:58PM +0200, Sebastian Andrzej Siewior wrote:
> From: Frank Rowand <frank.rowand at am.sony.com>
> 
> The arm boot_lock is used by the secondary processor startup code.  The locking
> task is the idle thread, which has idle->sched_class == &idle_sched_class.
> idle_sched_class->enqueue_task == NULL, so if the idle task blocks on the
> lock, the attempt to wake it when the lock becomes available will fail:
> 
> try_to_wake_up()
>    ...
>       activate_task()
>          enqueue_task()
>             p->sched_class->enqueue_task(rq, p, flags)
> 
> Fix by converting boot_lock to a raw spin lock.
> 
> Cc: "Andreas Färber" <afaerber at suse.de>
> Cc: Russell King <linux at armlinux.org.uk>
> Cc: Kukjin Kim <kgene at kernel.org>
> Cc: Krzysztof Kozlowski <krzk at kernel.org>
> Cc: Wei Xu <xuwei5 at hisilicon.com>
> Cc: Tony Lindgren <tony at atomide.com>
> Cc: Barry Song <baohua at kernel.org>
> Cc: Andy Gross <andy.gross at linaro.org>
> Cc: David Brown <david.brown at linaro.org>
> Cc: Viresh Kumar <vireshk at kernel.org>
> Cc: Shiraz Hashim <shiraz.linux.kernel at gmail.com>
> Cc: Patrice Chotard <patrice.chotard at st.com>
> Cc: Maxime Ripard <maxime.ripard at bootlin.com>
> Cc: Chen-Yu Tsai <wens at csie.org>
> Cc: linux-arm-kernel at lists.infradead.org
> Cc: linux-samsung-soc at vger.kernel.org
> Cc: linux-omap at vger.kernel.org
> Cc: linux-arm-msm at vger.kernel.org
> Cc: linux-soc at vger.kernel.org
> Signed-off-by: Frank Rowand <frank.rowand at am.sony.com>
> Link: http://lkml.kernel.org/r/4E77B952.3010606@am.sony.com
> Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
> [bigeasy: added new boot_lock user]
> Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
> ---
>  arch/arm/mach-actions/platsmp.c   |    6 +++---
>  arch/arm/mach-exynos/platsmp.c    |   12 ++++++------

I assume this is needed for -rt patches?

For Exynos:
Acked-by: Krzysztof Kozlowski <krzk at kernel.org>
Tested on Exynos5422 (Odroid HC1) with Linaro PM-QA:
Tested-by: Krzysztof Kozlowski <krzk at kernel.org>

Best regards,
Krzysztof



More information about the linux-arm-kernel mailing list