diff options
author | Ard Biesheuvel <ard.biesheuvel@linaro.org> | 2015-03-06 15:49:24 +0100 |
---|---|---|
committer | Catalin Marinas <catalin.marinas@arm.com> | 2015-03-14 12:00:18 +0100 |
commit | 60c0d45a7f7ab4e30452fa14deb23a33e29adbc2 (patch) | |
tree | 121c8626db3bd9313368c00da9b4f56caee315f8 /arch/arm64/kernel/process.c | |
parent | arm64: Invalidate the TLB corresponding to intermediate page table levels (diff) | |
download | linux-60c0d45a7f7ab4e30452fa14deb23a33e29adbc2.tar.xz linux-60c0d45a7f7ab4e30452fa14deb23a33e29adbc2.zip |
efi/arm64: use UEFI for system reset and poweroff
If UEFI Runtime Services are available, they are preferred over direct
PSCI calls or other methods to reset the system.
For the reset case, we need to hook into machine_restart(), as the
arm_pm_restart function pointer may be overwritten by modules.
Tested-by: Mark Rutland <mark.rutland@arm.com>
Reviewed-by: Mark Rutland <mark.rutland@arm.com>
Reviewed-by: Matt Fleming <matt.fleming@intel.com>
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Diffstat (limited to '')
-rw-r--r-- | arch/arm64/kernel/process.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/arch/arm64/kernel/process.c b/arch/arm64/kernel/process.c index fde9923af859..c6b1f3b96f45 100644 --- a/arch/arm64/kernel/process.c +++ b/arch/arm64/kernel/process.c @@ -21,6 +21,7 @@ #include <stdarg.h> #include <linux/compat.h> +#include <linux/efi.h> #include <linux/export.h> #include <linux/sched.h> #include <linux/kernel.h> @@ -150,6 +151,13 @@ void machine_restart(char *cmd) local_irq_disable(); smp_send_stop(); + /* + * UpdateCapsule() depends on the system being reset via + * ResetSystem(). + */ + if (efi_enabled(EFI_RUNTIME_SERVICES)) + efi_reboot(reboot_mode, NULL); + /* Now call the architecture specific reboot code. */ if (arm_pm_restart) arm_pm_restart(reboot_mode, cmd); |