commit | ae1b3d51c89a96c641111e2c103557592577cf51 | [log] [tgz] |
---|---|---|
author | Ralf Baechle <ralf@linux-mips.org> | Fri Jul 15 15:44:02 2005 +0000 |
committer | Ralf Baechle <ralf@linux-mips.org> | Sat Oct 29 19:31:55 2005 +0100 |
tree | 1aae0a75db788d079c5e79646082bec192709250 | |
parent | 1d40cfcd3442a53e98468cdb3e6d4d9a568d76cf [diff] |
Make sure that the processor is actually online or die spectacularly. Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
diff --git a/arch/mips/kernel/smp.c b/arch/mips/kernel/smp.c index 2576291..798fce5 100644 --- a/arch/mips/kernel/smp.c +++ b/arch/mips/kernel/smp.c
@@ -142,6 +142,11 @@ int i, cpus = num_online_cpus() - 1; int cpu = smp_processor_id(); + /* + * Can die spectacularly if this CPU isn't yet marked online + */ + BUG_ON(!cpu_online(cpu)); + if (!cpus) return 0;