Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 287140
b: refs/heads/master
c: 5955633
h: refs/heads/master
v: v3
  • Loading branch information
Michael D Labriola authored and Ingo Molnar committed Jan 30, 2012
1 parent 7d9e4c7 commit 8d946d2
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 3 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: fc395b9291925b1880e0afc61274fe2f6ddc1269
refs/heads/master: 5955633e91bfc5cd0a41d8d82259e1d8b32980ef
28 changes: 26 additions & 2 deletions trunk/arch/x86/kernel/reboot.c
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,14 @@ static int reboot_mode;
enum reboot_type reboot_type = BOOT_ACPI;
int reboot_force;

/* This variable is used privately to keep track of whether or not
* reboot_type is still set to its default value (i.e., reboot= hasn't
* been set on the command line). This is needed so that we can
* suppress DMI scanning for reboot quirks. Without it, it's
* impossible to override a faulty reboot quirk without recompiling.
*/
static int reboot_default = 1;

#if defined(CONFIG_X86_32) && defined(CONFIG_SMP)
static int reboot_cpu = -1;
#endif
Expand Down Expand Up @@ -67,6 +75,12 @@ bool port_cf9_safe = false;
static int __init reboot_setup(char *str)
{
for (;;) {
/* Having anything passed on the command line via
* reboot= will cause us to disable DMI checking
* below.
*/
reboot_default = 0;

switch (*str) {
case 'w':
reboot_mode = 0x1234;
Expand Down Expand Up @@ -316,7 +330,12 @@ static struct dmi_system_id __initdata reboot_dmi_table[] = {

static int __init reboot_init(void)
{
dmi_check_system(reboot_dmi_table);
/* Only do the DMI check if reboot_type hasn't been overridden
* on the command line
*/
if (reboot_default) {
dmi_check_system(reboot_dmi_table);
}
return 0;
}
core_initcall(reboot_init);
Expand Down Expand Up @@ -465,7 +484,12 @@ static struct dmi_system_id __initdata pci_reboot_dmi_table[] = {

static int __init pci_reboot_init(void)
{
dmi_check_system(pci_reboot_dmi_table);
/* Only do the DMI check if reboot_type hasn't been overridden
* on the command line
*/
if (reboot_default) {
dmi_check_system(pci_reboot_dmi_table);
}
return 0;
}
core_initcall(pci_reboot_init);
Expand Down

0 comments on commit 8d946d2

Please sign in to comment.