aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/reboot.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2009-09-02 02:17:56 -0400
committerIngo Molnar <mingo@elte.hu>2009-09-02 02:17:56 -0400
commit936e894a976dd3b0f07f1f6f43c17b77b7e6146d (patch)
tree5ed5c1f6735dcd26550594df23c8f7fe2aa21a15 /arch/x86/kernel/reboot.c
parent69575d388603365f2afbf4166df93152df59b165 (diff)
parent326ba5010a5429a5a528b268b36a5900d4ab0eba (diff)
Merge commit 'v2.6.31-rc8' into x86/txt
Conflicts: arch/x86/kernel/reboot.c security/Kconfig Merge reason: resolve the conflicts, bump up from rc3 to rc8. Signed-off-by: Ingo Molnar <mingo@elte.hu>
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;