diff options
-rw-r--r-- | arch/x86_64/kernel/process.c | 5 | ||||
-rw-r--r-- | include/asm-x86_64/system.h | 2 |
2 files changed, 5 insertions, 2 deletions
diff --git a/arch/x86_64/kernel/process.c b/arch/x86_64/kernel/process.c index 7519fc520eb3..3060ed97b755 100644 --- a/arch/x86_64/kernel/process.c +++ b/arch/x86_64/kernel/process.c | |||
@@ -157,7 +157,7 @@ EXPORT_SYMBOL_GPL(cpu_idle_wait); | |||
157 | DECLARE_PER_CPU(int, cpu_state); | 157 | DECLARE_PER_CPU(int, cpu_state); |
158 | 158 | ||
159 | #include <asm/nmi.h> | 159 | #include <asm/nmi.h> |
160 | /* We don't actually take CPU down, just spin without interrupts. */ | 160 | /* We halt the CPU with physical CPU hotplug */ |
161 | static inline void play_dead(void) | 161 | static inline void play_dead(void) |
162 | { | 162 | { |
163 | idle_task_exit(); | 163 | idle_task_exit(); |
@@ -166,8 +166,9 @@ static inline void play_dead(void) | |||
166 | /* Ack it */ | 166 | /* Ack it */ |
167 | __get_cpu_var(cpu_state) = CPU_DEAD; | 167 | __get_cpu_var(cpu_state) = CPU_DEAD; |
168 | 168 | ||
169 | local_irq_disable(); | ||
169 | while (1) | 170 | while (1) |
170 | safe_halt(); | 171 | halt(); |
171 | } | 172 | } |
172 | #else | 173 | #else |
173 | static inline void play_dead(void) | 174 | static inline void play_dead(void) |
diff --git a/include/asm-x86_64/system.h b/include/asm-x86_64/system.h index 85348e02ad2e..b34cc2ee222b 100644 --- a/include/asm-x86_64/system.h +++ b/include/asm-x86_64/system.h | |||
@@ -315,6 +315,8 @@ static inline unsigned long __cmpxchg(volatile void *ptr, unsigned long old, | |||
315 | #define local_irq_enable() __asm__ __volatile__("sti": : :"memory") | 315 | #define local_irq_enable() __asm__ __volatile__("sti": : :"memory") |
316 | /* used in the idle loop; sti takes one instruction cycle to complete */ | 316 | /* used in the idle loop; sti takes one instruction cycle to complete */ |
317 | #define safe_halt() __asm__ __volatile__("sti; hlt": : :"memory") | 317 | #define safe_halt() __asm__ __volatile__("sti; hlt": : :"memory") |
318 | /* used when interrupts are already enabled or to shutdown the processor */ | ||
319 | #define halt() __asm__ __volatile__("hlt": : :"memory") | ||
318 | 320 | ||
319 | #define irqs_disabled() \ | 321 | #define irqs_disabled() \ |
320 | ({ \ | 322 | ({ \ |