Commit 62b3a04d authored by Eric W. Biederman's avatar Eric W. Biederman Committed by Linus Torvalds
Browse files

[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: default avatarEric W. Biederman <ebiederm@xmission.com>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 7c9a9007
Loading
Loading
Loading
Loading
+11 −7
Original line number Diff line number Diff line
@@ -109,16 +109,10 @@ void machine_shutdown(void)
	local_irq_enable();
}

void machine_restart(char * __unused)
void machine_emergency_restart(void)
{
	int i;

	printk("machine restart\n");

	if (!reboot_force) {
		machine_shutdown();
	}
	
	/* Tell the BIOS if we want cold or warm reboot */
	*((unsigned short *)__va(0x472)) = reboot_mode;
       
@@ -143,6 +137,16 @@ void machine_restart(char * __unused)
	}      
}

void machine_restart(char * __unused)
{
	printk("machine restart\n");

	if (!reboot_force) {
		machine_shutdown();
	}
	machine_emergency_restart();
}

void machine_halt(void)
{
}
+1 −1
Original line number Diff line number Diff line
#ifndef _ASM_EMERGENCY_RESTART_H
#define _ASM_EMERGENCY_RESTART_H

#include <asm-generic/emergency-restart.h>
extern void machine_emergency_restart(void);

#endif /* _ASM_EMERGENCY_RESTART_H */