summaryrefslogtreecommitdiff
path: root/arch/ppc64/kernel/idle.c
diff options
context:
space:
mode:
authorMichael Ellerman <michael@ellerman.id.au>2005-07-07 17:56:28 -0700
committerLinus Torvalds <torvalds@g5.osdl.org>2005-07-07 18:23:40 -0700
commitfd899c0cc725387992ccfc83fb6f70505c36cbeb (patch)
tree0de5d3960c7e7247638c962d7913acec1ce2e9fe /arch/ppc64/kernel/idle.c
parent88de0be0c7335650326a1236bf6ca1ed265c0a1c (diff)
[PATCH] ppc64: Make idle_loop a ppc_md function
This patch adds an idle member to the ppc_md structure and calls it from cpu_idle(). If a platform leaves ppc_md.idle as null it will get the default idle loop default_idle(). Signed-off-by: Michael Ellerman <michael@ellerman.id.au> Signed-off-by: Anton Blanchard <anton@samba.org> 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, 5 insertions, 3 deletions
diff --git a/arch/ppc64/kernel/idle.c b/arch/ppc64/kernel/idle.c
index 08952c7e6216..e270055e73e2 100644
--- a/arch/ppc64/kernel/idle.c
+++ b/arch/ppc64/kernel/idle.c
@@ -33,6 +33,7 @@
#include <asm/iSeries/ItLpQueue.h>
#include <asm/plpar_wrappers.h>
#include <asm/systemcfg.h>
+#include <asm/machdep.h>
extern void power4_idle(void);
@@ -122,7 +123,7 @@ static int iSeries_idle(void)
#else
-static int default_idle(void)
+int default_idle(void)
{
long oldval;
unsigned int cpu = smp_processor_id();
@@ -288,7 +289,7 @@ static int shared_idle(void)
#endif /* CONFIG_PPC_PSERIES */
-static int native_idle(void)
+int native_idle(void)
{
while(1) {
/* check CPU type here */
@@ -308,7 +309,8 @@ static int native_idle(void)
void cpu_idle(void)
{
- idle_loop();
+ BUG_ON(NULL == ppc_md.idle_loop);
+ ppc_md.idle_loop();
}
int powersave_nap;