Message ID | 1387532866-22601-8-git-send-email-bigeasy@linutronix.de (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On Fri, Dec 20, 2013 at 10:47 AM, Sebastian Andrzej Siewior <bigeasy@linutronix.de> wrote: > From: Frank Rowand <frank.rowand@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: Linus Walleij <linus.walleij@linaro.org> > Cc: Frank Rowand <frank.rowand@sonymobile.com> > Signed-off-by: Frank Rowand <frank.rowand@am.sony.com> > Link: http://lkml.kernel.org/r/4E77B952.3010606@am.sony.com > Signed-off-by: Thomas Gleixner <tglx@linutronix.de> > Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> A bit late I guess, but anyway: Acked-by: Linus Walleij <linus.walleij@linaro.org> Yours, Linus Walleij
diff --git a/arch/arm/mach-ux500/platsmp.c b/arch/arm/mach-ux500/platsmp.c index 1f296e7..eeb5916 100644 --- a/arch/arm/mach-ux500/platsmp.c +++ b/arch/arm/mach-ux500/platsmp.c @@ -52,7 +52,7 @@ static void __iomem *scu_base_addr(void) return NULL; } -static DEFINE_SPINLOCK(boot_lock); +static DEFINE_RAW_SPINLOCK(boot_lock); static void ux500_secondary_init(unsigned int cpu) { @@ -65,8 +65,8 @@ static void ux500_secondary_init(unsigned int cpu) /* * Synchronise with the boot thread. */ - spin_lock(&boot_lock); - spin_unlock(&boot_lock); + raw_spin_lock(&boot_lock); + raw_spin_unlock(&boot_lock); } static int ux500_boot_secondary(unsigned int cpu, struct task_struct *idle) @@ -77,7 +77,7 @@ static int ux500_boot_secondary(unsigned int cpu, struct task_struct *idle) * set synchronisation state between this boot processor * and the secondary one */ - spin_lock(&boot_lock); + raw_spin_lock(&boot_lock); /* * The secondary processor is waiting to be released from @@ -98,7 +98,7 @@ static int ux500_boot_secondary(unsigned int cpu, struct task_struct *idle) * now the secondary core is starting up let it run its * calibrations, then wait for it to finish */ - spin_unlock(&boot_lock); + raw_spin_unlock(&boot_lock); return pen_release != -1 ? -ENOSYS : 0; }