diff options
Diffstat (limited to 'arch/i386/kernel/process.c')
-rw-r--r-- | arch/i386/kernel/process.c | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/arch/i386/kernel/process.c b/arch/i386/kernel/process.c index e06f2dc7123d..5f8cfa6b7940 100644 --- a/arch/i386/kernel/process.c +++ b/arch/i386/kernel/process.c | |||
@@ -152,21 +152,19 @@ static void poll_idle (void) | |||
152 | /* We don't actually take CPU down, just spin without interrupts. */ | 152 | /* We don't actually take CPU down, just spin without interrupts. */ |
153 | static inline void play_dead(void) | 153 | static inline void play_dead(void) |
154 | { | 154 | { |
155 | /* This must be done before dead CPU ack */ | ||
156 | cpu_exit_clear(); | ||
157 | wbinvd(); | ||
158 | mb(); | ||
155 | /* Ack it */ | 159 | /* Ack it */ |
156 | __get_cpu_var(cpu_state) = CPU_DEAD; | 160 | __get_cpu_var(cpu_state) = CPU_DEAD; |
157 | 161 | ||
158 | /* We shouldn't have to disable interrupts while dead, but | 162 | /* |
159 | * some interrupts just don't seem to go away, and this makes | 163 | * With physical CPU hotplug, we should halt the cpu |
160 | * it "work" for testing purposes. */ | 164 | */ |
161 | /* Death loop */ | ||
162 | while (__get_cpu_var(cpu_state) != CPU_UP_PREPARE) | ||
163 | cpu_relax(); | ||
164 | |||
165 | local_irq_disable(); | 165 | local_irq_disable(); |
166 | __flush_tlb_all(); | 166 | while (1) |
167 | cpu_set(smp_processor_id(), cpu_online_map); | 167 | __asm__ __volatile__("hlt":::"memory"); |
168 | enable_APIC_timer(); | ||
169 | local_irq_enable(); | ||
170 | } | 168 | } |
171 | #else | 169 | #else |
172 | static inline void play_dead(void) | 170 | static inline void play_dead(void) |