mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-01 06:33:07 +00:00
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>
This commit is contained in:
parent
69f4cab134
commit
9b42f76ad5
1 changed files with 2 additions and 2 deletions
|
@ -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()) {
|
||||
|
|
Loading…
Reference in a new issue