summaryrefslogtreecommitdiffstats
path: root/arch/ppc64/kernel/pSeries_setup.c
diff options
context:
space:
mode:
authorMichael Ellerman <michael@ellerman.id.au>2005-07-07 17:56:30 -0700
committerLinus Torvalds <torvalds@g5.osdl.org>2005-07-07 18:23:41 -0700
commit62d60e9f0f890c31e5a83a7d8ecdfd1c7975fdb9 (patch)
tree840653ffa74b54ec277630116355d161ab076679 /arch/ppc64/kernel/pSeries_setup.c
parentc66d5dd6b5b62e1435b95c0fb42f6bcddeb395ea (diff)
downloadop-kernel-dev-62d60e9f0f890c31e5a83a7d8ecdfd1c7975fdb9.zip
op-kernel-dev-62d60e9f0f890c31e5a83a7d8ecdfd1c7975fdb9.tar.gz
[PATCH] ppc64: Fixup platforms for new ppc_md.idle
This patch fixes up iSeries, pSeries, pmac and maple to set the correct idle function for each platform. 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/pSeries_setup.c')
-rw-r--r--arch/ppc64/kernel/pSeries_setup.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/arch/ppc64/kernel/pSeries_setup.c b/arch/ppc64/kernel/pSeries_setup.c
index 849ed9b..3f3be8a 100644
--- a/arch/ppc64/kernel/pSeries_setup.c
+++ b/arch/ppc64/kernel/pSeries_setup.c
@@ -19,6 +19,7 @@
#undef DEBUG
#include <linux/config.h>
+#include <linux/cpu.h>
#include <linux/errno.h>
#include <linux/sched.h>
#include <linux/kernel.h>
@@ -82,6 +83,9 @@ int fwnmi_active; /* TRUE if an FWNMI handler is present */
extern void pSeries_system_reset_exception(struct pt_regs *regs);
extern int pSeries_machine_check_exception(struct pt_regs *regs);
+static int shared_idle(void);
+static int dedicated_idle(void);
+
static volatile void __iomem * chrp_int_ack_special;
struct mpic *pSeries_mpic;
@@ -229,6 +233,20 @@ static void __init pSeries_setup_arch(void)
if (cur_cpu_spec->firmware_features & FW_FEATURE_SPLPAR)
vpa_init(boot_cpuid);
+
+ /* Choose an idle loop */
+ if (cur_cpu_spec->firmware_features & FW_FEATURE_SPLPAR) {
+ if (get_paca()->lppaca.shared_proc) {
+ printk(KERN_INFO "Using shared processor idle loop\n");
+ ppc_md.idle_loop = shared_idle;
+ } else {
+ printk(KERN_INFO "Using dedicated idle loop\n");
+ ppc_md.idle_loop = dedicated_idle;
+ }
+ } else {
+ printk(KERN_INFO "Using default idle loop\n");
+ ppc_md.idle_loop = default_idle;
+ }
}
static int __init pSeries_init_panel(void)
OpenPOWER on IntegriCloud