diff options
author | Michael Ellerman <michael@ellerman.id.au> | 2005-07-07 20:56:30 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-07-07 21:23:41 -0400 |
commit | 62d60e9f0f890c31e5a83a7d8ecdfd1c7975fdb9 (patch) | |
tree | 840653ffa74b54ec277630116355d161ab076679 /arch/ppc64/kernel/pSeries_setup.c | |
parent | c66d5dd6b5b62e1435b95c0fb42f6bcddeb395ea (diff) |
[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.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/arch/ppc64/kernel/pSeries_setup.c b/arch/ppc64/kernel/pSeries_setup.c index 849ed9ba7856..3f3be8ae9351 100644 --- a/arch/ppc64/kernel/pSeries_setup.c +++ b/arch/ppc64/kernel/pSeries_setup.c | |||
@@ -19,6 +19,7 @@ | |||
19 | #undef DEBUG | 19 | #undef DEBUG |
20 | 20 | ||
21 | #include <linux/config.h> | 21 | #include <linux/config.h> |
22 | #include <linux/cpu.h> | ||
22 | #include <linux/errno.h> | 23 | #include <linux/errno.h> |
23 | #include <linux/sched.h> | 24 | #include <linux/sched.h> |
24 | #include <linux/kernel.h> | 25 | #include <linux/kernel.h> |
@@ -82,6 +83,9 @@ int fwnmi_active; /* TRUE if an FWNMI handler is present */ | |||
82 | extern void pSeries_system_reset_exception(struct pt_regs *regs); | 83 | extern void pSeries_system_reset_exception(struct pt_regs *regs); |
83 | extern int pSeries_machine_check_exception(struct pt_regs *regs); | 84 | extern int pSeries_machine_check_exception(struct pt_regs *regs); |
84 | 85 | ||
86 | static int shared_idle(void); | ||
87 | static int dedicated_idle(void); | ||
88 | |||
85 | static volatile void __iomem * chrp_int_ack_special; | 89 | static volatile void __iomem * chrp_int_ack_special; |
86 | struct mpic *pSeries_mpic; | 90 | struct mpic *pSeries_mpic; |
87 | 91 | ||
@@ -229,6 +233,20 @@ static void __init pSeries_setup_arch(void) | |||
229 | 233 | ||
230 | if (cur_cpu_spec->firmware_features & FW_FEATURE_SPLPAR) | 234 | if (cur_cpu_spec->firmware_features & FW_FEATURE_SPLPAR) |
231 | vpa_init(boot_cpuid); | 235 | vpa_init(boot_cpuid); |
236 | |||
237 | /* Choose an idle loop */ | ||
238 | if (cur_cpu_spec->firmware_features & FW_FEATURE_SPLPAR) { | ||
239 | if (get_paca()->lppaca.shared_proc) { | ||
240 | printk(KERN_INFO "Using shared processor idle loop\n"); | ||
241 | ppc_md.idle_loop = shared_idle; | ||
242 | } else { | ||
243 | printk(KERN_INFO "Using dedicated idle loop\n"); | ||
244 | ppc_md.idle_loop = dedicated_idle; | ||
245 | } | ||
246 | } else { | ||
247 | printk(KERN_INFO "Using default idle loop\n"); | ||
248 | ppc_md.idle_loop = default_idle; | ||
249 | } | ||
232 | } | 250 | } |
233 | 251 | ||
234 | static int __init pSeries_init_panel(void) | 252 | static int __init pSeries_init_panel(void) |