diff options
| author | Matt Fleming <matt.fleming@intel.com> | 2014-06-13 07:22:22 -0400 |
|---|---|---|
| committer | Matt Fleming <matt.fleming@intel.com> | 2014-07-18 16:23:51 -0400 |
| commit | 8562c99cdd30217dea3609e268572f8764f401a5 (patch) | |
| tree | 4a494dab6d089e0030255d2c5f6521b35321b97f /include/linux | |
| parent | f4f75ad5741fe0331bbe1f5c42b906cda299f26b (diff) | |
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 'include/linux')
| -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 3a64f2f85821..e6980ba528ec 100644 --- a/include/linux/efi.h +++ b/include/linux/efi.h | |||
| @@ -20,6 +20,7 @@ | |||
| 20 | #include <linux/ioport.h> | 20 | #include <linux/ioport.h> |
| 21 | #include <linux/pfn.h> | 21 | #include <linux/pfn.h> |
| 22 | #include <linux/pstore.h> | 22 | #include <linux/pstore.h> |
| 23 | #include <linux/reboot.h> | ||
| 23 | 24 | ||
| 24 | #include <asm/page.h> | 25 | #include <asm/page.h> |
| 25 | 26 | ||
| @@ -928,11 +929,14 @@ static inline bool efi_enabled(int feature) | |||
| 928 | { | 929 | { |
| 929 | return test_bit(feature, &efi.flags) != 0; | 930 | return test_bit(feature, &efi.flags) != 0; |
| 930 | } | 931 | } |
| 932 | extern void efi_reboot(enum reboot_mode reboot_mode, const char *__unused); | ||
| 931 | #else | 933 | #else |
| 932 | static inline bool efi_enabled(int feature) | 934 | static inline bool efi_enabled(int feature) |
| 933 | { | 935 | { |
| 934 | return false; | 936 | return false; |
| 935 | } | 937 | } |
| 938 | static inline void | ||
| 939 | efi_reboot(enum reboot_mode reboot_mode, const char *__unused) {} | ||
| 936 | #endif | 940 | #endif |
| 937 | 941 | ||
| 938 | /* | 942 | /* |
