From b789ad63ac46b00f0862bdc23fc95556adc3cf2f Mon Sep 17 00:00:00 2001 From: Yong Zhang Date: Thu, 19 Jul 2012 09:13:53 +0200 Subject: [PATCH] MIPS: smp: Warn on too early irq enable Just to catch a potential issue. Signed-off-by: Yong Zhang Cc: Sergei Shtylyov Cc: David Daney Acked-by: David Daney Patchwork: https://patchwork.linux-mips.org/patch/3852/ Signed-off-by: Ralf Baechle --- arch/mips/kernel/smp.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/arch/mips/kernel/smp.c b/arch/mips/kernel/smp.c index eb3e2b112a0d..1268392f1d27 100644 --- a/arch/mips/kernel/smp.c +++ b/arch/mips/kernel/smp.c @@ -130,6 +130,11 @@ asmlinkage __cpuinit void start_secondary(void) synchronise_count_slave(); + /* + * irq will be enabled in ->smp_finish(), enabling it too early + * is dangerous. + */ + WARN_ON_ONCE(!irqs_disabled()); mp_ops->smp_finish(); cpu_idle(); -- GitLab