aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrew Morton <akpm@osdl.org>2005-11-09 18:45:30 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2005-11-09 19:07:44 -0500
commite4d76e1c0b15590f2ad9bba89426c2520cd22ca6 (patch)
tree077aa0dd49bc49e93e18ec9645443b185d513094
parenta47ab9371e664952b1104a70ec8e9b74db3f7a5f (diff)
[PATCH] powerpc: sched fixups
- 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>
-rw-r--r--arch/powerpc/kernel/smp.c1
-rw-r--r--arch/ppc/kernel/idle.c2
2 files changed, 2 insertions, 1 deletions
diff --git a/arch/powerpc/kernel/smp.c b/arch/powerpc/kernel/smp.c
index 5c330c3366e4..36d67a8d7cbb 100644
--- a/arch/powerpc/kernel/smp.c
+++ b/arch/powerpc/kernel/smp.c
@@ -510,6 +510,7 @@ int __devinit start_secondary(void *unused)
510 510
511 smp_store_cpu_info(cpu); 511 smp_store_cpu_info(cpu);
512 set_dec(tb_ticks_per_jiffy); 512 set_dec(tb_ticks_per_jiffy);
513 preempt_disable();
513 cpu_callin_map[cpu] = 1; 514 cpu_callin_map[cpu] = 1;
514 515
515 smp_ops->setup_cpu(cpu); 516 smp_ops->setup_cpu(cpu);
diff --git a/arch/ppc/kernel/idle.c b/arch/ppc/kernel/idle.c
index 3c4e4cb61074..821a75e45602 100644
--- a/arch/ppc/kernel/idle.c
+++ b/arch/ppc/kernel/idle.c
@@ -63,7 +63,7 @@ void cpu_idle(void)
63 int cpu = smp_processor_id(); 63 int cpu = smp_processor_id();
64 64
65 for (;;) { 65 for (;;) {
66 while (need_resched()) { 66 while (!need_resched()) {
67 if (ppc_md.idle != NULL) 67 if (ppc_md.idle != NULL)
68 ppc_md.idle(); 68 ppc_md.idle();
69 else 69 else