Commit 3506229f authored by Andi Kleen's avatar Andi Kleen Committed by Linus Torvalds

[PATCH] x86_64: Don't enable interrupt unconditionally in reboot path

When they were disabled before (e.g. after a panic) it's better
to keep them off, otherwise followon panics can happen from timer
interrupt handlers etc.

Drawback is that pageup in the console won't work anymore though.
Signed-off-by: default avatarAndi Kleen <ak@suse.de>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent a88cde13
...@@ -77,6 +77,7 @@ static inline void kb_wait(void) ...@@ -77,6 +77,7 @@ static inline void kb_wait(void)
void machine_shutdown(void) void machine_shutdown(void)
{ {
unsigned long flags;
/* Stop the cpus and apics */ /* Stop the cpus and apics */
#ifdef CONFIG_SMP #ifdef CONFIG_SMP
int reboot_cpu_id; int reboot_cpu_id;
...@@ -98,7 +99,7 @@ void machine_shutdown(void) ...@@ -98,7 +99,7 @@ void machine_shutdown(void)
smp_send_stop(); smp_send_stop();
#endif #endif
local_irq_disable(); local_irq_save(flags);
#ifndef CONFIG_SMP #ifndef CONFIG_SMP
disable_local_APIC(); disable_local_APIC();
...@@ -106,7 +107,7 @@ void machine_shutdown(void) ...@@ -106,7 +107,7 @@ void machine_shutdown(void)
disable_IO_APIC(); disable_IO_APIC();
local_irq_enable(); local_irq_restore(flags);
} }
void machine_emergency_restart(void) void machine_emergency_restart(void)
......
...@@ -450,13 +450,14 @@ int smp_call_function (void (*func) (void *info), void *info, int nonatomic, ...@@ -450,13 +450,14 @@ int smp_call_function (void (*func) (void *info), void *info, int nonatomic,
void smp_stop_cpu(void) void smp_stop_cpu(void)
{ {
unsigned long flags;
/* /*
* Remove this CPU: * Remove this CPU:
*/ */
cpu_clear(smp_processor_id(), cpu_online_map); cpu_clear(smp_processor_id(), cpu_online_map);
local_irq_disable(); local_irq_save(flags);
disable_local_APIC(); disable_local_APIC();
local_irq_enable(); local_irq_restore(flags);
} }
static void smp_really_stop_cpu(void *dummy) static void smp_really_stop_cpu(void *dummy)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment