aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/reboot.c
diff options
context:
space:
mode:
authorMatt Fleming <matt.fleming@intel.com>2014-06-13 12:22:22 +0100
committerMatt Fleming <matt.fleming@intel.com>2014-07-18 21:23:51 +0100
commit8562c99cdd30217dea3609e268572f8764f401a5 (patch)
tree4a494dab6d089e0030255d2c5f6521b35321b97f /arch/x86/kernel/reboot.c
parentefi: efistub: Convert into static library (diff)
downloadlinux-dev-8562c99cdd30217dea3609e268572f8764f401a5.tar.xz
linux-dev-8562c99cdd30217dea3609e268572f8764f401a5.zip
efi/reboot: Add generic wrapper around EfiResetSystem()
Implement efi_reboot(), which is really just a wrapper around the EfiResetSystem() EFI runtime service, but it does at least allow us to funnel all callers through a single location. It also simplifies the callsites since users no longer need to check to see whether EFI_RUNTIME_SERVICES are enabled. Cc: Tony Luck <tony.luck@intel.com> Tested-by: Mark Salter <msalter@redhat.com> Signed-off-by: Matt Fleming <matt.fleming@intel.com>
Diffstat (limited to 'arch/x86/kernel/reboot.c')
-rw-r--r--arch/x86/kernel/reboot.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/arch/x86/kernel/reboot.c b/arch/x86/kernel/reboot.c
index 52b1157c53eb..09e709fd1830 100644
--- a/arch/x86/kernel/reboot.c
+++ b/arch/x86/kernel/reboot.c
@@ -528,11 +528,7 @@ static void native_machine_emergency_restart(void)
break;
case BOOT_EFI:
- if (efi_enabled(EFI_RUNTIME_SERVICES))
- efi.reset_system(reboot_mode == REBOOT_WARM ?
- EFI_RESET_WARM :
- EFI_RESET_COLD,
- EFI_SUCCESS, 0, NULL);
+ efi_reboot(reboot_mode, NULL);
reboot_type = BOOT_BIOS;
break;