diff options
author | Mark Brown <broonie@kernel.org> | 2015-01-16 22:50:34 +0000 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2015-01-17 01:23:42 +0000 |
commit | d1f7a4c0bfda09bebb1948e2169a6ce6a7319bd3 (patch) | |
tree | 872faf5dcd234e04025a526e83e867a7855cb9b7 /arch/x86 | |
parent | c293f79246d7cdaf6e75b40aa1f957eb8d195835 (diff) | |
parent | c0131386abdafa081356c1c02129df6413e685e0 (diff) |
Merge remote-tracking branch 'lsk/v3.10/topic/arm64-misc' into linux-linaro-lsk
Conflicts:
arch/arm/include/asm/psci.h
arch/arm/kernel/psci.c
arch/arm/kernel/psci_smp.c
arch/arm/kernel/setup.c
arch/arm64/Kconfig
arch/arm64/include/asm/cpu_ops.h
arch/arm64/include/asm/pgtable.h
arch/arm64/include/asm/psci.h
arch/arm64/kernel/head.S
arch/arm64/kernel/psci.c
arch/arm64/kernel/ptrace.c
Diffstat (limited to 'arch/x86')
-rw-r--r-- | arch/x86/kernel/reboot.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/arch/x86/kernel/reboot.c b/arch/x86/kernel/reboot.c index 90fd1195f276..3876c04feef9 100644 --- a/arch/x86/kernel/reboot.c +++ b/arch/x86/kernel/reboot.c @@ -36,7 +36,7 @@ void (*pm_power_off)(void); EXPORT_SYMBOL(pm_power_off); static const struct desc_ptr no_idt = {}; -static int reboot_mode; +static enum reboot_mode reboot_mode; enum reboot_type reboot_type = BOOT_ACPI; int reboot_force; @@ -88,11 +88,11 @@ static int __init reboot_setup(char *str) switch (*str) { case 'w': - reboot_mode = 0x1234; + reboot_mode = REBOOT_WARM; break; case 'c': - reboot_mode = 0; + reboot_mode = REBOOT_COLD; break; #ifdef CONFIG_SMP @@ -552,6 +552,7 @@ static void native_machine_emergency_restart(void) int i; int attempt = 0; int orig_reboot_type = reboot_type; + unsigned short mode; if (reboot_emergency) emergency_vmx_disable_all(); @@ -559,7 +560,8 @@ static void native_machine_emergency_restart(void) tboot_shutdown(TB_SHUTDOWN_REBOOT); /* Tell the BIOS if we want cold or warm reboot */ - *((unsigned short *)__va(0x472)) = reboot_mode; + mode = reboot_mode == REBOOT_WARM ? 0x1234 : 0; + *((unsigned short *)__va(0x472)) = mode; for (;;) { /* Could also try the reset bit in the Hammer NB */ @@ -601,7 +603,7 @@ static void native_machine_emergency_restart(void) case BOOT_EFI: if (efi_enabled(EFI_RUNTIME_SERVICES)) - efi.reset_system(reboot_mode ? + efi.reset_system(reboot_mode == REBOOT_WARM ? EFI_RESET_WARM : EFI_RESET_COLD, EFI_SUCCESS, 0, NULL); |