summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/cpuidle/cpuidle-powernv.c5
1 files changed, 5 insertions, 0 deletions
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
18struct cpuidle_driver powernv_idle_driver = { 19struct 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