summaryrefslogtreecommitdiffstats
path: root/arch/ppc64/kernel/idle.c
diff options
context:
space:
mode:
authorAnton Blanchard <anton@samba.org>2005-06-02 14:02:02 -0700
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-06-02 15:12:30 -0700
commit6dc2f0c7df6cefda5932ac8bcd9ca5ef45de36ee (patch)
treece3f5ba4f99adfbc7adf4242d5bc76a8d0c3fd69 /arch/ppc64/kernel/idle.c
parent79f1248962cfa1e11a5610e0349bc3515687516d (diff)
downloadop-kernel-dev-6dc2f0c7df6cefda5932ac8bcd9ca5ef45de36ee.zip
op-kernel-dev-6dc2f0c7df6cefda5932ac8bcd9ca5ef45de36ee.tar.gz
[PATCH] ppc64: cleanup iseries runlight support
The iseries has a bar graph on the front panel that shows how busy it is. The operating system sets and clears a bit in the CTRL register to control it. Instead of going to the complexity of using a thread info bit, just set and clear it in the idle loop. Also create two helper functions, ppc64_runlatch_on and ppc64_runlatch_off. Finally don't use the short form of the SPR defines. Signed-off-by: Anton Blanchard <anton@samba.org> Acked-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'arch/ppc64/kernel/idle.c')
-rw-r--r--arch/ppc64/kernel/idle.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/arch/ppc64/kernel/idle.c b/arch/ppc64/kernel/idle.c
index 6abc621..f24ce2b 100644
--- a/arch/ppc64/kernel/idle.c
+++ b/arch/ppc64/kernel/idle.c
@@ -75,13 +75,9 @@ static int iSeries_idle(void)
{
struct paca_struct *lpaca;
long oldval;
- unsigned long CTRL;
/* ensure iSeries run light will be out when idle */
- clear_thread_flag(TIF_RUN_LIGHT);
- CTRL = mfspr(CTRLF);
- CTRL &= ~RUNLATCH;
- mtspr(CTRLT, CTRL);
+ ppc64_runlatch_off();
lpaca = get_paca();
@@ -111,7 +107,9 @@ static int iSeries_idle(void)
}
}
+ ppc64_runlatch_on();
schedule();
+ ppc64_runlatch_off();
}
return 0;
OpenPOWER on IntegriCloud