diff options
-rw-r--r-- | arch/powerpc/platforms/powernv/setup.c | 13 | ||||
-rw-r--r-- | drivers/cpuidle/cpuidle-powernv.c | 5 |
2 files changed, 6 insertions, 12 deletions
diff --git a/arch/powerpc/platforms/powernv/setup.c b/arch/powerpc/platforms/powernv/setup.c index 110f4fbd319f..81a7a0a79be7 100644 --- a/arch/powerpc/platforms/powernv/setup.c +++ b/arch/powerpc/platforms/powernv/setup.c | |||
@@ -26,7 +26,6 @@ | |||
26 | #include <linux/of_fdt.h> | 26 | #include <linux/of_fdt.h> |
27 | #include <linux/interrupt.h> | 27 | #include <linux/interrupt.h> |
28 | #include <linux/bug.h> | 28 | #include <linux/bug.h> |
29 | #include <linux/cpuidle.h> | ||
30 | #include <linux/pci.h> | 29 | #include <linux/pci.h> |
31 | 30 | ||
32 | #include <asm/machdep.h> | 31 | #include <asm/machdep.h> |
@@ -225,16 +224,6 @@ static int __init pnv_probe(void) | |||
225 | return 1; | 224 | return 1; |
226 | } | 225 | } |
227 | 226 | ||
228 | void powernv_idle(void) | ||
229 | { | ||
230 | /* Hook to cpuidle framework if available, else | ||
231 | * call on default platform idle code | ||
232 | */ | ||
233 | if (cpuidle_idle_call()) { | ||
234 | power7_idle(); | ||
235 | } | ||
236 | } | ||
237 | |||
238 | define_machine(powernv) { | 227 | define_machine(powernv) { |
239 | .name = "PowerNV", | 228 | .name = "PowerNV", |
240 | .probe = pnv_probe, | 229 | .probe = pnv_probe, |
@@ -244,7 +233,7 @@ define_machine(powernv) { | |||
244 | .show_cpuinfo = pnv_show_cpuinfo, | 233 | .show_cpuinfo = pnv_show_cpuinfo, |
245 | .progress = pnv_progress, | 234 | .progress = pnv_progress, |
246 | .machine_shutdown = pnv_shutdown, | 235 | .machine_shutdown = pnv_shutdown, |
247 | .power_save = powernv_idle, | 236 | .power_save = power7_idle, |
248 | .calibrate_decr = generic_calibrate_decr, | 237 | .calibrate_decr = generic_calibrate_decr, |
249 | .dma_set_mask = pnv_dma_set_mask, | 238 | .dma_set_mask = pnv_dma_set_mask, |
250 | #ifdef CONFIG_KEXEC | 239 | #ifdef CONFIG_KEXEC |
diff --git a/drivers/cpuidle/cpuidle-powernv.c b/drivers/cpuidle/cpuidle-powernv.c index 78fd174c57e8..f48607cd2540 100644 --- a/drivers/cpuidle/cpuidle-powernv.c +++ b/drivers/cpuidle/cpuidle-powernv.c | |||
@@ -14,6 +14,7 @@ | |||
14 | 14 | ||
15 | #include <asm/machdep.h> | 15 | #include <asm/machdep.h> |
16 | #include <asm/firmware.h> | 16 | #include <asm/firmware.h> |
17 | #include <asm/runlatch.h> | ||
17 | 18 | ||
18 | struct cpuidle_driver powernv_idle_driver = { | 19 | struct cpuidle_driver powernv_idle_driver = { |
19 | .name = "powernv_idle", | 20 | .name = "powernv_idle", |
@@ -30,12 +31,14 @@ static int snooze_loop(struct cpuidle_device *dev, | |||
30 | local_irq_enable(); | 31 | local_irq_enable(); |
31 | set_thread_flag(TIF_POLLING_NRFLAG); | 32 | set_thread_flag(TIF_POLLING_NRFLAG); |
32 | 33 | ||
34 | ppc64_runlatch_off(); | ||
33 | while (!need_resched()) { | 35 | while (!need_resched()) { |
34 | HMT_low(); | 36 | HMT_low(); |
35 | HMT_very_low(); | 37 | HMT_very_low(); |
36 | } | 38 | } |
37 | 39 | ||
38 | HMT_medium(); | 40 | HMT_medium(); |
41 | ppc64_runlatch_on(); | ||
39 | clear_thread_flag(TIF_POLLING_NRFLAG); | 42 | clear_thread_flag(TIF_POLLING_NRFLAG); |
40 | smp_mb(); | 43 | smp_mb(); |
41 | return index; | 44 | return index; |
@@ -45,7 +48,9 @@ static int nap_loop(struct cpuidle_device *dev, | |||
45 | struct cpuidle_driver *drv, | 48 | struct cpuidle_driver *drv, |
46 | int index) | 49 | int index) |
47 | { | 50 | { |
51 | ppc64_runlatch_off(); | ||
48 | power7_idle(); | 52 | power7_idle(); |
53 | ppc64_runlatch_on(); | ||
49 | return index; | 54 | return index; |
50 | } | 55 | } |
51 | 56 | ||