X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=arch%2Fmips%2Fkernel%2Fsmp.c;h=6d1c473f67d2d552ba2b226a5740ec2096a6c5af;hb=c7b5ebbddf7bcd3651947760f423e3783bbe6573;hp=557fb12d9f0570026baec406a08b414ebab6083a;hpb=5273a3df6485dc2ad6aa7ddd441b9a21970f003b;p=linux-2.6.git diff --git a/arch/mips/kernel/smp.c b/arch/mips/kernel/smp.c index 557fb12d9..6d1c473f6 100644 --- a/arch/mips/kernel/smp.c +++ b/arch/mips/kernel/smp.c @@ -35,7 +35,6 @@ #include #include #include -#include #include #include @@ -151,6 +150,9 @@ int smp_call_function (void (*func) (void *info), void *info, int retry, if (!cpus) return 0; + /* Can deadlock when called with interrupts disabled */ + WARN_ON(irqs_disabled()); + data.func = func; data.info = info; atomic_set(&data.started, 0); @@ -251,16 +253,6 @@ void __devinit smp_prepare_boot_cpu(void) cpu_set(0, cpu_callin_map); } -static struct task_struct * __init fork_by_hand(void) -{ - struct pt_regs regs; - /* - * don't care about the eip and regs settings since - * we'll never reschedule the forked task. - */ - return copy_process(CLONE_VM|CLONE_IDLETASK, 0, ®s, 0, NULL, NULL); -} - /* * Startup the CPU with this logical number */ @@ -272,20 +264,10 @@ static int __init do_boot_cpu(int cpu) * The following code is purely to make sure * Linux can schedule processes on this slave. */ - idle = fork_by_hand(); + idle = fork_idle(cpu); if (IS_ERR(idle)) panic("failed fork for CPU %d\n", cpu); - wake_up_forked_process(idle); - - /* - * We remove it from the pidhash and the runqueue once we've - * got the process: - */ - init_idle(idle, cpu); - - unhash_process(idle); - prom_boot_secondary(cpu, idle); /* XXXKW timeout */