Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 4242
b: refs/heads/master
c: 45e75df
h: refs/heads/master
v: v3
  • Loading branch information
Anton Blanchard authored and Linus Torvalds committed Jul 8, 2005
1 parent f57af21 commit 97bcafe
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 12 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 050a09389e045f37e5bf08718cf36909766e20d1
refs/heads/master: 45e75dfb609df4391636c2218bec5ea04536601d
23 changes: 12 additions & 11 deletions trunk/arch/ppc64/kernel/idle.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,18 +20,12 @@
#include <linux/kernel.h>
#include <linux/smp.h>
#include <linux/cpu.h>
#include <linux/module.h>
#include <linux/sysctl.h>
#include <linux/smp.h>

#include <asm/system.h>
#include <asm/processor.h>
#include <asm/mmu.h>
#include <asm/cputable.h>
#include <asm/time.h>
#include <asm/iSeries/HvCall.h>
#include <asm/iSeries/ItLpQueue.h>
#include <asm/plpar_wrappers.h>
#include <asm/systemcfg.h>
#include <asm/machdep.h>

Expand All @@ -49,7 +43,8 @@ int default_idle(void)
set_thread_flag(TIF_POLLING_NRFLAG);

while (!need_resched() && !cpu_is_offline(cpu)) {
barrier();
ppc64_runlatch_off();

/*
* Go into low thread priority and possibly
* low power mode.
Expand All @@ -64,6 +59,7 @@ int default_idle(void)
set_need_resched();
}

ppc64_runlatch_on();
schedule();
if (cpu_is_offline(cpu) && system_state == SYSTEM_RUNNING)
cpu_die();
Expand All @@ -74,17 +70,22 @@ int default_idle(void)

int native_idle(void)
{
while(1) {
/* check CPU type here */
while (1) {
ppc64_runlatch_off();

if (!need_resched())
power4_idle();
if (need_resched())

if (need_resched()) {
ppc64_runlatch_on();
schedule();
}

if (cpu_is_offline(raw_smp_processor_id()) &&
if (cpu_is_offline(smp_processor_id()) &&
system_state == SYSTEM_RUNNING)
cpu_die();
}

return 0;
}

Expand Down

0 comments on commit 97bcafe

Please sign in to comment.