Commit 12abcba2 authored by Andrey Panin's avatar Andrey Panin Committed by Linus Torvalds

[PATCH] port reboot workarounds to new DMI probing

This patch moves reboot related workarounds out of dmi_scan.c Please
consider applying.
Signed-off-by: default avatarAndrey Panin <pazke@donpac.ru>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent ea1aebcd
...@@ -164,51 +164,6 @@ static void __init dmi_save_ident(struct dmi_header *dm, int slot, int string) ...@@ -164,51 +164,6 @@ static void __init dmi_save_ident(struct dmi_header *dm, int slot, int string)
#define NO_MATCH { DMI_NONE, NULL} #define NO_MATCH { DMI_NONE, NULL}
#define MATCH DMI_MATCH #define MATCH DMI_MATCH
/*
* Reboot options and system auto-detection code provided by
* Dell Inc. so their systems "just work". :-)
*/
/*
* Some machines require the "reboot=b" commandline option, this quirk makes that automatic.
*/
static __init int set_bios_reboot(struct dmi_blacklist *d)
{
extern int reboot_thru_bios;
if (reboot_thru_bios == 0)
{
reboot_thru_bios = 1;
printk(KERN_INFO "%s series board detected. Selecting BIOS-method for reboots.\n", d->ident);
}
return 0;
}
/*
* Some machines require the "reboot=s" commandline option, this quirk makes that automatic.
*/
static __init int set_smp_reboot(struct dmi_blacklist *d)
{
#ifdef CONFIG_SMP
extern int reboot_smp;
if (reboot_smp == 0)
{
reboot_smp = 1;
printk(KERN_INFO "%s series board detected. Selecting SMP-method for reboots.\n", d->ident);
}
#endif
return 0;
}
/*
* Some machines require the "reboot=b,s" commandline option, this quirk makes that automatic.
*/
static __init int set_smp_bios_reboot(struct dmi_blacklist *d)
{
set_smp_reboot(d);
set_bios_reboot(d);
return 0;
}
/* /*
* Some machines, usually laptops, can't handle an enabled local APIC. * Some machines, usually laptops, can't handle an enabled local APIC.
* The symptoms include hangs or reboots when suspending or resuming, * The symptoms include hangs or reboots when suspending or resuming,
...@@ -340,21 +295,6 @@ static __init int disable_acpi_pci(struct dmi_blacklist *d) ...@@ -340,21 +295,6 @@ static __init int disable_acpi_pci(struct dmi_blacklist *d)
*/ */
static __initdata struct dmi_blacklist dmi_blacklist[]={ static __initdata struct dmi_blacklist dmi_blacklist[]={
{ set_smp_bios_reboot, "Dell PowerEdge 1300", { /* Handle problems with rebooting on Dell 1300's */
MATCH(DMI_SYS_VENDOR, "Dell Computer Corporation"),
MATCH(DMI_PRODUCT_NAME, "PowerEdge 1300/"),
NO_MATCH, NO_MATCH
} },
{ set_bios_reboot, "Dell PowerEdge 300", { /* Handle problems with rebooting on Dell 300's */
MATCH(DMI_SYS_VENDOR, "Dell Computer Corporation"),
MATCH(DMI_PRODUCT_NAME, "PowerEdge 300/"),
NO_MATCH, NO_MATCH
} },
{ set_bios_reboot, "Dell PowerEdge 2400", { /* Handle problems with rebooting on Dell 2400's */
MATCH(DMI_SYS_VENDOR, "Dell Computer Corporation"),
MATCH(DMI_PRODUCT_NAME, "PowerEdge 2400"),
NO_MATCH, NO_MATCH
} },
/* Machines which have problems handling enabled local APICs */ /* Machines which have problems handling enabled local APICs */
......
...@@ -9,6 +9,7 @@ ...@@ -9,6 +9,7 @@
#include <linux/interrupt.h> #include <linux/interrupt.h>
#include <linux/mc146818rtc.h> #include <linux/mc146818rtc.h>
#include <linux/efi.h> #include <linux/efi.h>
#include <linux/dmi.h>
#include <asm/uaccess.h> #include <asm/uaccess.h>
#include <asm/apic.h> #include <asm/apic.h>
#include "mach_reboot.h" #include "mach_reboot.h"
...@@ -67,6 +68,83 @@ static int __init reboot_setup(char *str) ...@@ -67,6 +68,83 @@ static int __init reboot_setup(char *str)
__setup("reboot=", reboot_setup); __setup("reboot=", reboot_setup);
/*
* Reboot options and system auto-detection code provided by
* Dell Inc. so their systems "just work". :-)
*/
/*
* Some machines require the "reboot=b" commandline option, this quirk makes that automatic.
*/
static int __init set_bios_reboot(struct dmi_system_id *d)
{
if (!reboot_thru_bios) {
reboot_thru_bios = 1;
printk(KERN_INFO "%s series board detected. Selecting BIOS-method for reboots.\n", d->ident);
}
return 0;
}
/*
* Some machines require the "reboot=s" commandline option, this quirk makes that automatic.
*/
static int __init set_smp_reboot(struct dmi_system_id *d)
{
#ifdef CONFIG_SMP
if (!reboot_smp) {
reboot_smp = 1;
printk(KERN_INFO "%s series board detected. Selecting SMP-method for reboots.\n", d->ident);
}
#endif
return 0;
}
/*
* Some machines require the "reboot=b,s" commandline option, this quirk makes that automatic.
*/
static int __init set_smp_bios_reboot(struct dmi_system_id *d)
{
set_smp_reboot(d);
set_bios_reboot(d);
return 0;
}
static struct dmi_system_id __initdata reboot_dmi_table[] = {
{ /* Handle problems with rebooting on Dell 1300's */
.callback = set_smp_bios_reboot,
.ident = "Dell PowerEdge 1300",
.matches = {
DMI_MATCH(DMI_SYS_VENDOR, "Dell Computer Corporation"),
DMI_MATCH(DMI_PRODUCT_NAME, "PowerEdge 1300/"),
},
},
{ /* Handle problems with rebooting on Dell 300's */
.callback = set_bios_reboot,
.ident = "Dell PowerEdge 300",
.matches = {
DMI_MATCH(DMI_SYS_VENDOR, "Dell Computer Corporation"),
DMI_MATCH(DMI_PRODUCT_NAME, "PowerEdge 300/"),
},
},
{ /* Handle problems with rebooting on Dell 2400's */
.callback = set_bios_reboot,
.ident = "Dell PowerEdge 2400",
.matches = {
DMI_MATCH(DMI_SYS_VENDOR, "Dell Computer Corporation"),
DMI_MATCH(DMI_PRODUCT_NAME, "PowerEdge 2400"),
},
},
{ }
};
static int reboot_init(void)
{
dmi_check_system(reboot_dmi_table);
return 0;
}
core_initcall(reboot_init);
/* The following code and data reboots the machine by switching to real /* The following code and data reboots the machine by switching to real
mode and jumping to the BIOS reset entry point, as if the CPU has mode and jumping to the BIOS reset entry point, as if the CPU has
really been reset. The previous version asked the keyboard really been reset. The previous version asked the keyboard
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment