aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/x86/kernel/reboot.c21
-rw-r--r--include/linux/efi.h7
2 files changed, 27 insertions, 1 deletions
diff --git a/arch/x86/kernel/reboot.c b/arch/x86/kernel/reboot.c
index 725624b6c0c0..8fd3cedd9acc 100644
--- a/arch/x86/kernel/reboot.c
+++ b/arch/x86/kernel/reboot.c
@@ -81,6 +81,19 @@ static int __init set_bios_reboot(const struct dmi_system_id *d)
81 return 0; 81 return 0;
82} 82}
83 83
84/*
85 * Some machines don't handle the default ACPI reboot method and
86 * require the EFI reboot method:
87 */
88static int __init set_efi_reboot(const struct dmi_system_id *d)
89{
90 if (reboot_type != BOOT_EFI && !efi_runtime_disabled()) {
91 reboot_type = BOOT_EFI;
92 pr_info("%s series board detected. Selecting EFI-method for reboot.\n", d->ident);
93 }
94 return 0;
95}
96
84void __noreturn machine_real_restart(unsigned int type) 97void __noreturn machine_real_restart(unsigned int type)
85{ 98{
86 local_irq_disable(); 99 local_irq_disable();
@@ -166,6 +179,14 @@ static const struct dmi_system_id reboot_dmi_table[] __initconst = {
166 DMI_MATCH(DMI_PRODUCT_NAME, "AOA110"), 179 DMI_MATCH(DMI_PRODUCT_NAME, "AOA110"),
167 }, 180 },
168 }, 181 },
182 { /* Handle reboot issue on Acer TravelMate X514-51T */
183 .callback = set_efi_reboot,
184 .ident = "Acer TravelMate X514-51T",
185 .matches = {
186 DMI_MATCH(DMI_SYS_VENDOR, "Acer"),
187 DMI_MATCH(DMI_PRODUCT_NAME, "TravelMate X514-51T"),
188 },
189 },
169 190
170 /* Apple */ 191 /* Apple */
171 { /* Handle problems with rebooting on Apple MacBook5 */ 192 { /* Handle problems with rebooting on Apple MacBook5 */
diff --git a/include/linux/efi.h b/include/linux/efi.h
index 54357a258b35..6ebc2098cfe1 100644
--- a/include/linux/efi.h
+++ b/include/linux/efi.h
@@ -1611,7 +1611,12 @@ efi_status_t efi_setup_gop(efi_system_table_t *sys_table_arg,
1611 struct screen_info *si, efi_guid_t *proto, 1611 struct screen_info *si, efi_guid_t *proto,
1612 unsigned long size); 1612 unsigned long size);
1613 1613
1614bool efi_runtime_disabled(void); 1614#ifdef CONFIG_EFI
1615extern bool efi_runtime_disabled(void);
1616#else
1617static inline bool efi_runtime_disabled(void) { return true; }
1618#endif
1619
1615extern void efi_call_virt_check_flags(unsigned long flags, const char *call); 1620extern void efi_call_virt_check_flags(unsigned long flags, const char *call);
1616extern unsigned long efi_call_virt_save_flags(void); 1621extern unsigned long efi_call_virt_save_flags(void);
1617 1622