linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] x86, reboot: skip DMI checks if reboot set by user
@ 2012-01-17 15:16 Michael D Labriola
  2012-01-17 19:58 ` Alan Cox
  0 siblings, 1 reply; 11+ messages in thread
From: Michael D Labriola @ 2012-01-17 15:16 UTC (permalink / raw)
  To: Ingo Molnar, Matthew Garrett
  Cc: Michael D Labriola, H. Peter Anvin, Kushal Koolwal, linux-kernel,
	michael.d.labriola, support, Thomas Gleixner, x86

This commit causes DMI checks for vendor specific reboot
quirks to be skipped if the user passed in a reboot= arg
on the command line.

Signed-off-by: Michael D Labriola <mlabriol@gdeb.com>
---
 arch/x86/kernel/reboot.c |   16 ++++++++++++++--
 1 files changed, 14 insertions(+), 2 deletions(-)

diff --git a/arch/x86/kernel/reboot.c b/arch/x86/kernel/reboot.c
index 37a458b..4240d58 100644
--- a/arch/x86/kernel/reboot.c
+++ b/arch/x86/kernel/reboot.c
@@ -38,6 +38,7 @@ static const struct desc_ptr no_idt = {};
 static int reboot_mode;
 enum reboot_type reboot_type = BOOT_ACPI;
 int reboot_force;
+int reboot_user;
 
 #if defined(CONFIG_X86_32) && defined(CONFIG_SMP)
 static int reboot_cpu = -1;
@@ -70,10 +71,12 @@ static int __init reboot_setup(char *str)
                switch (*str) {
                case 'w':
                        reboot_mode = 0x1234;
+                       reboot_user = 1;
                        break;
 
                case 'c':
                        reboot_mode = 0;
+                       reboot_user = 1;
                        break;
 
 #ifdef CONFIG_X86_32
@@ -87,6 +90,7 @@ static int __init reboot_setup(char *str)
                                /* we will leave sorting out the final 
value
                                   when we are ready to reboot, since we 
might not
                                   have detected BSP APIC ID or 
smp_num_cpu */
+                       reboot_user = 1;
                        break;
 #endif /* CONFIG_SMP */
 
@@ -98,10 +102,12 @@ static int __init reboot_setup(char *str)
                case 'e':
                case 'p':
                        reboot_type = *str;
+                       reboot_user = 1;
                        break;
 
                case 'f':
                        reboot_force = 1;
+                       reboot_user = 1;
                        break;
                }
 
@@ -316,7 +322,10 @@ static struct dmi_system_id __initdata 
reboot_dmi_table[] = {
 
 static int __init reboot_init(void)
 {
-       dmi_check_system(reboot_dmi_table);
+       /* Skip the DMI check if user set reboot= on the command line */
+       if (!reboot_user) {
+               dmi_check_system(reboot_dmi_table);
+       }
        return 0;
 }
 core_initcall(reboot_init);
@@ -465,7 +474,10 @@ static struct dmi_system_id __initdata 
pci_reboot_dmi_table[] = {
 
 static int __init pci_reboot_init(void)
 {
-       dmi_check_system(pci_reboot_dmi_table);
+       /* Skip the DMI check if user set reboot= on the command line */
+       if (!reboot_user) {
+               dmi_check_system(pci_reboot_dmi_table);
+       }
        return 0;
 }
 core_initcall(pci_reboot_init);
-- 
1.6.0.3




 

^ permalink raw reply related	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2012-01-19 19:41 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-01-17 15:16 [PATCH] x86, reboot: skip DMI checks if reboot set by user Michael D Labriola
2012-01-17 19:58 ` Alan Cox
2012-01-19 15:32   ` Michael D Labriola
2012-01-19 15:45     ` Alan Cox
2012-01-19 15:48       ` Michael D Labriola
     [not found]       ` <OF8642E997.5ED041E1-ON8525798A.0056983A-8525798A.0056E05B@LocalDomain>
2012-01-19 17:46         ` Michael D Labriola
2012-01-19 17:52           ` H. Peter Anvin
2012-01-19 19:14             ` Michael D Labriola
2012-01-19 19:17               ` H. Peter Anvin
2012-01-19 19:34                 ` Michael D Labriola
2012-01-19 19:41               ` Ingo Molnar

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).