aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86_64/kernel/reboot.c
diff options
context:
space:
mode:
authorEric W. Biederman <ebiederm@xmission.com>2005-07-26 13:45:31 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2005-07-26 17:35:42 -0400
commit62b3a04d75d2dc9480d5ad3b60f4258e548a6a83 (patch)
tree61c91a3fc9785346dd966249fb4acbe1feae1909 /arch/x86_64/kernel/reboot.c
parent7c9a90073c75bffbb89763a0c7d44a2e44e9e628 (diff)
[PATCH] x86_64: Implemenent machine_emergency_restart
It is not safe to call set_cpus_allowed() in interrupt context and disabling the apics is complicated code. So unconditionally skip machine_shutdown in machine_emergency_reboot on x86_64. Signed-off-by: Eric W. Biederman <ebiederm@xmission.com> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'arch/x86_64/kernel/reboot.c')
-rw-r--r--arch/x86_64/kernel/reboot.c18
1 files changed, 11 insertions, 7 deletions
diff --git a/arch/x86_64/kernel/reboot.c b/arch/x86_64/kernel/reboot.c
index d4c45ff92d5c..3d1cc09406a6 100644
--- a/arch/x86_64/kernel/reboot.c
+++ b/arch/x86_64/kernel/reboot.c
@@ -109,16 +109,10 @@ void machine_shutdown(void)
109 local_irq_enable(); 109 local_irq_enable();
110} 110}
111 111
112void machine_restart(char * __unused) 112void machine_emergency_restart(void)
113{ 113{
114 int i; 114 int i;
115 115
116 printk("machine restart\n");
117
118 if (!reboot_force) {
119 machine_shutdown();
120 }
121
122 /* Tell the BIOS if we want cold or warm reboot */ 116 /* Tell the BIOS if we want cold or warm reboot */
123 *((unsigned short *)__va(0x472)) = reboot_mode; 117 *((unsigned short *)__va(0x472)) = reboot_mode;
124 118
@@ -143,6 +137,16 @@ void machine_restart(char * __unused)
143 } 137 }
144} 138}
145 139
140void machine_restart(char * __unused)
141{
142 printk("machine restart\n");
143
144 if (!reboot_force) {
145 machine_shutdown();
146 }
147 machine_emergency_restart();
148}
149
146void machine_halt(void) 150void machine_halt(void)
147{ 151{
148} 152}