]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
[PATCH] powerpc: sched fixups
authorAndrew Morton <akpm@osdl.org>
Wed, 9 Nov 2005 23:45:30 +0000 (15:45 -0800)
committerLinus Torvalds <torvalds@g5.osdl.org>
Thu, 10 Nov 2005 00:07:44 +0000 (16:07 -0800)
- Re-add a hunk lost during merge: ppc64 is missing the hunk that disables
  preempt on the secondary CPUs before they call cpu_idle().

- ppc's cpu_idle() had the need_resched() test wrong.

Cc: Nick Piggin <nickpiggin@yahoo.com.au>
CC: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Anton Blanchard <anton@samba.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
arch/powerpc/kernel/smp.c
arch/ppc/kernel/idle.c

index 5c330c3366e42e2ec500cd8fe98fbdd7c94c3bc8..36d67a8d7cbbb1b1d2c798dc0958f4f5d792e756 100644 (file)
@@ -510,6 +510,7 @@ int __devinit start_secondary(void *unused)
 
        smp_store_cpu_info(cpu);
        set_dec(tb_ticks_per_jiffy);
+       preempt_disable();
        cpu_callin_map[cpu] = 1;
 
        smp_ops->setup_cpu(cpu);
index 3c4e4cb610743e070d7237ed7df5fff2fa67c75e..821a75e45602b9c42abd3de2f0d1949cb7f0f48e 100644 (file)
@@ -63,7 +63,7 @@ void cpu_idle(void)
        int cpu = smp_processor_id();
 
        for (;;) {
-               while (need_resched()) {
+               while (!need_resched()) {
                        if (ppc_md.idle != NULL)
                                ppc_md.idle();
                        else