Skip to content

Commit

Permalink
[PATCH] i386: Implement machine_emergency_reboot
Browse files Browse the repository at this point in the history
set_cpus_allowed is not safe in interrupt context
and disabling apics is complicated code so don't
call machine_shutdown on i386 from emergency_restart().

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
  • Loading branch information
Eric W. Biederman authored and Linus Torvalds committed Jul 26, 2005
1 parent 59586e5 commit 4a1421f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
10 changes: 7 additions & 3 deletions arch/i386/kernel/reboot.c
Original file line number Diff line number Diff line change
Expand Up @@ -311,10 +311,8 @@ void machine_shutdown(void)
#endif
}

void machine_restart(char * __unused)
void machine_emergency_restart(void)
{
machine_shutdown();

if (!reboot_thru_bios) {
if (efi_enabled) {
efi.reset_system(EFI_RESET_COLD, EFI_SUCCESS, 0, NULL);
Expand All @@ -337,6 +335,12 @@ void machine_restart(char * __unused)
machine_real_restart(jump_to_bios, sizeof(jump_to_bios));
}

void machine_restart(char * __unused)
{
machine_shutdown();
machine_emergency_restart();
}

void machine_halt(void)
{
}
Expand Down
2 changes: 1 addition & 1 deletion include/asm-i386/emergency-restart.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#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 */

0 comments on commit 4a1421f

Please sign in to comment.