aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Ellerman <michael@ellerman.id.au>2005-07-07 20:56:30 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2005-07-07 21:23:41 -0400
commit62d60e9f0f890c31e5a83a7d8ecdfd1c7975fdb9 (patch)
tree840653ffa74b54ec277630116355d161ab076679
parentc66d5dd6b5b62e1435b95c0fb42f6bcddeb395ea (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>
-rw-r--r--arch/ppc64/kernel/iSeries_setup.c1
-rw-r--r--arch/ppc64/kernel/maple_setup.c3
-rw-r--r--arch/ppc64/kernel/pSeries_setup.c18
-rw-r--r--arch/ppc64/kernel/pmac_setup.c5
4 files changed, 26 insertions, 1 deletions
diff --git a/arch/ppc64/kernel/iSeries_setup.c b/arch/ppc64/kernel/iSeries_setup.c
index 1139e27e171..fae215ea54b 100644
--- a/arch/ppc64/kernel/iSeries_setup.c
+++ b/arch/ppc64/kernel/iSeries_setup.c
@@ -940,5 +940,6 @@ void __init iSeries_early_setup(void)
940 ppc_md.get_rtc_time = iSeries_get_rtc_time; 940 ppc_md.get_rtc_time = iSeries_get_rtc_time;
941 ppc_md.calibrate_decr = iSeries_calibrate_decr; 941 ppc_md.calibrate_decr = iSeries_calibrate_decr;
942 ppc_md.progress = iSeries_progress; 942 ppc_md.progress = iSeries_progress;
943 ppc_md.idle_loop = iSeries_idle;
943} 944}
944 945
diff --git a/arch/ppc64/kernel/maple_setup.c b/arch/ppc64/kernel/maple_setup.c
index da8900b51f4..bb55b5a5691 100644
--- a/arch/ppc64/kernel/maple_setup.c
+++ b/arch/ppc64/kernel/maple_setup.c
@@ -177,6 +177,8 @@ void __init maple_setup_arch(void)
177#ifdef CONFIG_DUMMY_CONSOLE 177#ifdef CONFIG_DUMMY_CONSOLE
178 conswitchp = &dummy_con; 178 conswitchp = &dummy_con;
179#endif 179#endif
180
181 printk(KERN_INFO "Using native/NAP idle loop\n");
180} 182}
181 183
182/* 184/*
@@ -297,4 +299,5 @@ struct machdep_calls __initdata maple_md = {
297 .get_rtc_time = maple_get_rtc_time, 299 .get_rtc_time = maple_get_rtc_time,
298 .calibrate_decr = generic_calibrate_decr, 300 .calibrate_decr = generic_calibrate_decr,
299 .progress = maple_progress, 301 .progress = maple_progress,
302 .idle_loop = native_idle,
300}; 303};
diff --git a/arch/ppc64/kernel/pSeries_setup.c b/arch/ppc64/kernel/pSeries_setup.c
index 849ed9ba785..3f3be8ae935 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 */
82extern void pSeries_system_reset_exception(struct pt_regs *regs); 83extern void pSeries_system_reset_exception(struct pt_regs *regs);
83extern int pSeries_machine_check_exception(struct pt_regs *regs); 84extern int pSeries_machine_check_exception(struct pt_regs *regs);
84 85
86static int shared_idle(void);
87static int dedicated_idle(void);
88
85static volatile void __iomem * chrp_int_ack_special; 89static volatile void __iomem * chrp_int_ack_special;
86struct mpic *pSeries_mpic; 90struct 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
234static int __init pSeries_init_panel(void) 252static int __init pSeries_init_panel(void)
diff --git a/arch/ppc64/kernel/pmac_setup.c b/arch/ppc64/kernel/pmac_setup.c
index 6cf03d387b9..3013cdb5f93 100644
--- a/arch/ppc64/kernel/pmac_setup.c
+++ b/arch/ppc64/kernel/pmac_setup.c
@@ -186,6 +186,8 @@ void __init pmac_setup_arch(void)
186#ifdef CONFIG_DUMMY_CONSOLE 186#ifdef CONFIG_DUMMY_CONSOLE
187 conswitchp = &dummy_con; 187 conswitchp = &dummy_con;
188#endif 188#endif
189
190 printk(KERN_INFO "Using native/NAP idle loop\n");
189} 191}
190 192
191#ifdef CONFIG_SCSI 193#ifdef CONFIG_SCSI
@@ -507,5 +509,6 @@ struct machdep_calls __initdata pmac_md = {
507 .calibrate_decr = pmac_calibrate_decr, 509 .calibrate_decr = pmac_calibrate_decr,
508 .feature_call = pmac_do_feature_call, 510 .feature_call = pmac_do_feature_call,
509 .progress = pmac_progress, 511 .progress = pmac_progress,
510 .check_legacy_ioport = pmac_check_legacy_ioport 512 .check_legacy_ioport = pmac_check_legacy_ioport,
513 .idle_loop = native_idle,
511}; 514};