aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/reboot.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/x86/kernel/reboot.c')
-rw-r--r--arch/x86/kernel/reboot.c50
1 files changed, 49 insertions, 1 deletions
diff --git a/arch/x86/kernel/reboot.c b/arch/x86/kernel/reboot.c
index 18ce5c04242a..27349f92a6d7 100644
--- a/arch/x86/kernel/reboot.c
+++ b/arch/x86/kernel/reboot.c
@@ -3,6 +3,7 @@
3#include <linux/init.h> 3#include <linux/init.h>
4#include <linux/pm.h> 4#include <linux/pm.h>
5#include <linux/efi.h> 5#include <linux/efi.h>
6#include <linux/dmi.h>
6#include <linux/tboot.h> 7#include <linux/tboot.h>
7#include <acpi/reboot.h> 8#include <acpi/reboot.h>
8#include <asm/io.h> 9#include <asm/io.h>
@@ -18,7 +19,6 @@
18#include <asm/cpu.h> 19#include <asm/cpu.h>
19 20
20#ifdef CONFIG_X86_32 21#ifdef CONFIG_X86_32
21# include <linux/dmi.h>
22# include <linux/ctype.h> 22# include <linux/ctype.h>
23# include <linux/mc146818rtc.h> 23# include <linux/mc146818rtc.h>
24#else 24#else
@@ -250,6 +250,14 @@ static struct dmi_system_id __initdata reboot_dmi_table[] = {
250 DMI_MATCH(DMI_PRODUCT_NAME, "VGN-Z540N"), 250 DMI_MATCH(DMI_PRODUCT_NAME, "VGN-Z540N"),
251 }, 251 },
252 }, 252 },
253 { /* Handle problems with rebooting on CompuLab SBC-FITPC2 */
254 .callback = set_bios_reboot,
255 .ident = "CompuLab SBC-FITPC2",
256 .matches = {
257 DMI_MATCH(DMI_SYS_VENDOR, "CompuLab"),
258 DMI_MATCH(DMI_PRODUCT_NAME, "SBC-FITPC2"),
259 },
260 },
253 { } 261 { }
254}; 262};
255 263
@@ -397,6 +405,46 @@ EXPORT_SYMBOL(machine_real_restart);
397 405
398#endif /* CONFIG_X86_32 */ 406#endif /* CONFIG_X86_32 */
399 407
408/*
409 * Some Apple MacBook and MacBookPro's needs reboot=p to be able to reboot
410 */
411static int __init set_pci_reboot(const struct dmi_system_id *d)
412{
413 if (reboot_type != BOOT_CF9) {
414 reboot_type = BOOT_CF9;
415 printk(KERN_INFO "%s series board detected. "
416 "Selecting PCI-method for reboots.\n", d->ident);
417 }
418 return 0;
419}
420
421static struct dmi_system_id __initdata pci_reboot_dmi_table[] = {
422 { /* Handle problems with rebooting on Apple MacBook5 */
423 .callback = set_pci_reboot,
424 .ident = "Apple MacBook5",
425 .matches = {
426 DMI_MATCH(DMI_SYS_VENDOR, "Apple Inc."),
427 DMI_MATCH(DMI_PRODUCT_NAME, "MacBook5"),
428 },
429 },
430 { /* Handle problems with rebooting on Apple MacBookPro5 */
431 .callback = set_pci_reboot,
432 .ident = "Apple MacBookPro5",
433 .matches = {
434 DMI_MATCH(DMI_SYS_VENDOR, "Apple Inc."),
435 DMI_MATCH(DMI_PRODUCT_NAME, "MacBookPro5"),
436 },
437 },
438 { }
439};
440
441static int __init pci_reboot_init(void)
442{
443 dmi_check_system(pci_reboot_dmi_table);
444 return 0;
445}
446core_initcall(pci_reboot_init);
447
400static inline void kb_wait(void) 448static inline void kb_wait(void)
401{ 449{
402 int i; 450 int i;