Skip to content

Commit

Permalink
[PATCH] powerpc: sched fixups
Browse files Browse the repository at this point in the history
- 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>
  • Loading branch information
Andrew Morton authored and Linus Torvalds committed Nov 10, 2005
1 parent a47ab93 commit e4d76e1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions arch/powerpc/kernel/smp.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion arch/ppc/kernel/idle.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit e4d76e1

Please sign in to comment.