x86: Don't apply reboot quirks if reboot set by user
PATCH v2 1/1 x86: Don't apply reboot quirks if reboot set by user
If reboot= is specified on the command-line, don't apply reboot quirks to allow the command-line option to take precedence.
This is a port of Linux commit 5955633e91bf ("x86/reboot: Skip DMI checks if reboot set by user").
Signed-off-by Ross Lagerwall <[email protected]>
---
Changed in v2:
* Use __initdata.
* Don't ignore reboot quirks if n, w or c is set.
xen/arch/x86/shutdown.c | 9 +++++++++ 1 file changed, 9 insertions(+)
xen/arch/x86/shutdown.c +9 -0
@@ -35,6 +35,7 @@ enum reboot_type { };static int reboot_mode; +static bool_t __initdata reboot_default =1 ;/* * reboot=t[riple] | k[bd] | a[cpi] | p[ci] | n[o] [, [w]arm | [c]old]
@@ -66,6 +67,7 @@ static void __init set_reboot_type(char *str)case 'k' :case 't' :case 'p' : + reboot_default =0 ; reboot_type = *str;break ; }
@@ -452,6 +454,13 @@ static struct dmi_system_id __initdata reboot_dmi_table[] = {static int __init reboot_init (void ) { +/* +* Only do the DMI check if reboot_type hasn't been overridden +* on the command line +*/ +if ( !reboot_default ) +return 0 ; +dmi_check_system (reboot_dmi_table);return 0 ; }
Signature · 1 line
2.1.0