diff options
Diffstat (limited to 'arch/powerpc')
-rw-r--r-- | arch/powerpc/include/asm/processor.h | 1 | ||||
-rw-r--r-- | arch/powerpc/kernel/idle_power7.S | 2 | ||||
-rw-r--r-- | arch/powerpc/platforms/powernv/smp.c | 10 |
3 files changed, 4 insertions, 9 deletions
diff --git a/arch/powerpc/include/asm/processor.h b/arch/powerpc/include/asm/processor.h index 53b6dfa83344..54b73a28c205 100644 --- a/arch/powerpc/include/asm/processor.h +++ b/arch/powerpc/include/asm/processor.h | |||
@@ -386,6 +386,7 @@ extern unsigned long cpuidle_disable; | |||
386 | enum idle_boot_override {IDLE_NO_OVERRIDE = 0, IDLE_POWERSAVE_OFF}; | 386 | enum idle_boot_override {IDLE_NO_OVERRIDE = 0, IDLE_POWERSAVE_OFF}; |
387 | 387 | ||
388 | extern int powersave_nap; /* set if nap mode can be used in idle loop */ | 388 | extern int powersave_nap; /* set if nap mode can be used in idle loop */ |
389 | extern void power7_nap(void); | ||
389 | 390 | ||
390 | #ifdef CONFIG_PSERIES_IDLE | 391 | #ifdef CONFIG_PSERIES_IDLE |
391 | extern void update_smt_snooze_delay(int snooze); | 392 | extern void update_smt_snooze_delay(int snooze); |
diff --git a/arch/powerpc/kernel/idle_power7.S b/arch/powerpc/kernel/idle_power7.S index 7140d838339e..e11863f4e595 100644 --- a/arch/powerpc/kernel/idle_power7.S +++ b/arch/powerpc/kernel/idle_power7.S | |||
@@ -28,7 +28,9 @@ _GLOBAL(power7_idle) | |||
28 | lwz r4,ADDROFF(powersave_nap)(r3) | 28 | lwz r4,ADDROFF(powersave_nap)(r3) |
29 | cmpwi 0,r4,0 | 29 | cmpwi 0,r4,0 |
30 | beqlr | 30 | beqlr |
31 | /* fall through */ | ||
31 | 32 | ||
33 | _GLOBAL(power7_nap) | ||
32 | /* NAP is a state loss, we create a regs frame on the | 34 | /* NAP is a state loss, we create a regs frame on the |
33 | * stack, fill it up with the state we care about and | 35 | * stack, fill it up with the state we care about and |
34 | * stick a pointer to it in PACAR1. We really only | 36 | * stick a pointer to it in PACAR1. We really only |
diff --git a/arch/powerpc/platforms/powernv/smp.c b/arch/powerpc/platforms/powernv/smp.c index 3ef46254c35b..7698b6e13c57 100644 --- a/arch/powerpc/platforms/powernv/smp.c +++ b/arch/powerpc/platforms/powernv/smp.c | |||
@@ -106,14 +106,6 @@ static void pnv_smp_cpu_kill_self(void) | |||
106 | { | 106 | { |
107 | unsigned int cpu; | 107 | unsigned int cpu; |
108 | 108 | ||
109 | /* If powersave_nap is enabled, use NAP mode, else just | ||
110 | * spin aimlessly | ||
111 | */ | ||
112 | if (!powersave_nap) { | ||
113 | generic_mach_cpu_die(); | ||
114 | return; | ||
115 | } | ||
116 | |||
117 | /* Standard hot unplug procedure */ | 109 | /* Standard hot unplug procedure */ |
118 | local_irq_disable(); | 110 | local_irq_disable(); |
119 | idle_task_exit(); | 111 | idle_task_exit(); |
@@ -128,7 +120,7 @@ static void pnv_smp_cpu_kill_self(void) | |||
128 | */ | 120 | */ |
129 | mtspr(SPRN_LPCR, mfspr(SPRN_LPCR) & ~(u64)LPCR_PECE1); | 121 | mtspr(SPRN_LPCR, mfspr(SPRN_LPCR) & ~(u64)LPCR_PECE1); |
130 | while (!generic_check_cpu_restart(cpu)) { | 122 | while (!generic_check_cpu_restart(cpu)) { |
131 | power7_idle(); | 123 | power7_nap(); |
132 | if (!generic_check_cpu_restart(cpu)) { | 124 | if (!generic_check_cpu_restart(cpu)) { |
133 | DBG("CPU%d Unexpected exit while offline !\n", cpu); | 125 | DBG("CPU%d Unexpected exit while offline !\n", cpu); |
134 | /* We may be getting an IPI, so we re-enable | 126 | /* We may be getting an IPI, so we re-enable |