diff options
| author | Matt Fleming <matt.fleming@intel.com> | 2014-06-13 12:22:22 +0100 |
|---|---|---|
| committer | Luis Henriques <luis.henriques@canonical.com> | 2015-05-12 09:36:34 +0100 |
| commit | c4bb687a50aa5021bc1837e1ec6bd1d6062e2cb7 (patch) | |
| tree | 9eca9d638e508cb61fd5cbe267b175ffb110ff0b /include | |
| parent | ddef2b7f77d0ce1403ea97907af12cd3ccd0ae4e (diff) | |
efi/reboot: Add generic wrapper around EfiResetSystem()
commit 8562c99cdd30217dea3609e268572f8764f401a5 upstream.
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>
Cc: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: Luis Henriques <luis.henriques@canonical.com>
Diffstat (limited to 'include')
| -rw-r--r-- | include/linux/efi.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/include/linux/efi.h b/include/linux/efi.h index 41bbf8ba4ba8..0958d4bb399f 100644 --- a/include/linux/efi.h +++ b/include/linux/efi.h @@ -20,6 +20,7 @@ #include <linux/ioport.h> #include <linux/pfn.h> #include <linux/pstore.h> +#include <linux/reboot.h> #include <asm/page.h> @@ -926,11 +927,14 @@ static inline bool efi_enabled(int feature) { return test_bit(feature, &efi.flags) != 0; } +extern void efi_reboot(enum reboot_mode reboot_mode, const char *__unused); #else static inline bool efi_enabled(int feature) { return false; } +static inline void +efi_reboot(enum reboot_mode reboot_mode, const char *__unused) {} #endif /* |
