summaryrefslogtreecommitdiff
path: root/drivers/firmware/efi/reboot.c
diff options
context:
space:
mode:
authorArd Biesheuvel <ardb@kernel.org>2020-01-23 13:12:14 +0100
committerArd Biesheuvel <ardb@kernel.org>2020-02-23 21:59:42 +0100
commit9b42f76ad58b3f641197d031766c6979acf4b4a6 (patch)
tree8c0373b66c6de4d03d4794243d7f08be23bc30df /drivers/firmware/efi/reboot.c
parent69f4cab134d204f0260d69ae407a2562e56a5025 (diff)
efi: Use EFI ResetSystem only when available
Do not attempt to call EFI ResetSystem if the runtime supported mask tells us it is no longer functional at OS runtime. Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Diffstat (limited to 'drivers/firmware/efi/reboot.c')
-rw-r--r--drivers/firmware/efi/reboot.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/firmware/efi/reboot.c b/drivers/firmware/efi/reboot.c
index 7effff969eb9..73089a24f04b 100644
--- a/drivers/firmware/efi/reboot.c
+++ b/drivers/firmware/efi/reboot.c
@@ -15,7 +15,7 @@ void efi_reboot(enum reboot_mode reboot_mode, const char *__unused)
const char *str[] = { "cold", "warm", "shutdown", "platform" };
int efi_mode, cap_reset_mode;
- if (!efi_enabled(EFI_RUNTIME_SERVICES))
+ if (!efi_rt_services_supported(EFI_RT_SUPPORTED_RESET_SYSTEM))
return;
switch (reboot_mode) {
@@ -64,7 +64,7 @@ static void efi_power_off(void)
static int __init efi_shutdown_init(void)
{
- if (!efi_enabled(EFI_RUNTIME_SERVICES))
+ if (!efi_rt_services_supported(EFI_RT_SUPPORTED_RESET_SYSTEM))
return -ENODEV;
if (efi_poweroff_required()) {