Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 156225
b: refs/heads/master
c: 6c6c51e
h: refs/heads/master
i:
  156223: 72a363a
v: v3
  • Loading branch information
Paul Mackerras authored and H. Peter Anvin committed Aug 3, 2009
1 parent f5643f4 commit 2edd20b
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 8523acfe40efc1a8d3da8f473ca67cb195b06f0c
refs/heads/master: 6c6c51e4cc11a5456fb1172008f7c69d955af9f6
34 changes: 33 additions & 1 deletion trunk/arch/x86/kernel/reboot.c
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
#include <linux/init.h>
#include <linux/pm.h>
#include <linux/efi.h>
#include <linux/dmi.h>
#include <acpi/reboot.h>
#include <asm/io.h>
#include <asm/apic.h>
Expand All @@ -17,7 +18,6 @@
#include <asm/cpu.h>

#ifdef CONFIG_X86_32
# include <linux/dmi.h>
# include <linux/ctype.h>
# include <linux/mc146818rtc.h>
#else
Expand Down Expand Up @@ -404,6 +404,38 @@ EXPORT_SYMBOL(machine_real_restart);

#endif /* CONFIG_X86_32 */

/*
* Apple MacBook5,2 (2009 MacBook) needs reboot=p
*/
static int __init set_pci_reboot(const struct dmi_system_id *d)
{
if (reboot_type != BOOT_CF9) {
reboot_type = BOOT_CF9;
printk(KERN_INFO "%s series board detected. "
"Selecting PCI-method for reboots.\n", d->ident);
}
return 0;
}

static struct dmi_system_id __initdata pci_reboot_dmi_table[] = {
{ /* Handle problems with rebooting on Apple MacBook5,2 */
.callback = set_pci_reboot,
.ident = "Apple MacBook",
.matches = {
DMI_MATCH(DMI_SYS_VENDOR, "Apple Inc."),
DMI_MATCH(DMI_PRODUCT_NAME, "MacBook5,2"),
},
},
{ }
};

static int __init pci_reboot_init(void)
{
dmi_check_system(pci_reboot_dmi_table);
return 0;
}
core_initcall(pci_reboot_init);

static inline void kb_wait(void)
{
int i;
Expand Down

0 comments on commit 2edd20b

Please sign in to comment.