From: Andrew Morton Date: Wed, 9 Nov 2005 23:45:30 +0000 (-0800) Subject: [PATCH] powerpc: sched fixups X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=e4d76e1c0b15590f2ad9bba89426c2520cd22ca6;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git [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 CC: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: Anton Blanchard Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- 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) smp_store_cpu_info(cpu); set_dec(tb_ticks_per_jiffy); + preempt_disable(); cpu_callin_map[cpu] = 1; 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) int cpu = smp_processor_id(); for (;;) { - while (need_resched()) { + while (!need_resched()) { if (ppc_md.idle != NULL) ppc_md.idle(); else