aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorShaohua Li <shaohua.li@intel.com>2006-01-06 03:12:20 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2006-01-06 11:33:39 -0500
commit1fa744e6e91a895750b9980d13fcfc5791a0cd91 (patch)
tree2ba30e6d4f263cdb5e5ec9a85fc1fecec9100036 /arch
parent766c3f94d4492ee4ec60b65693e71ee4b1d6fd68 (diff)
[PATCH] cpu hotplug/x86_64: disable interrupt in play_dead
With physical CPU hotplug, the CPU is hot removed and it should not receive any interrupts. Disabling interrupt is much safer. This basically is what we do in ia64 & x86. Signed-off-by: Shaohua Li <shaohua.li@intel.com> Cc: Andi Kleen <ak@muc.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'arch')
-rw-r--r--arch/x86_64/kernel/process.c5
1 files changed, 3 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);
157DECLARE_PER_CPU(int, cpu_state); 157DECLARE_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 */
161static inline void play_dead(void) 161static 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
173static inline void play_dead(void) 174static inline void play_dead(void)