* [PATCH] x86: add reboot=acpi quirk for OLPC XO-1.5
@ 2011-02-11 21:32 Daniel Drake
2011-02-11 21:37 ` H. Peter Anvin
0 siblings, 1 reply; 2+ messages in thread
From: Daniel Drake @ 2011-02-11 21:32 UTC (permalink / raw)
To: tglx, mingo, hpa, x86; +Cc: dilinger, linux-kernel
The OLPC XO-1.5 needs the reboot=acpi flag to reboot correctly.
Add a quirk so that this becomes the default.
Signed-off-by: Daniel Drake <dsd@laptop.org>
---
arch/x86/kernel/reboot.c | 22 ++++++++++++++++++++++
1 files changed, 22 insertions(+), 0 deletions(-)
diff --git a/arch/x86/kernel/reboot.c b/arch/x86/kernel/reboot.c
index fc7aae1..110e334 100644
--- a/arch/x86/kernel/reboot.c
+++ b/arch/x86/kernel/reboot.c
@@ -135,6 +135,19 @@ static int __init set_bios_reboot(const struct dmi_system_id *d)
return 0;
}
+/*
+ * Some machines require the "reboot=a" commandline option,
+ * this quirk makes that automatic.
+ */
+static int __init set_acpi_reboot(const struct dmi_system_id *d)
+{
+ if (reboot_type != BOOT_ACPI) {
+ reboot_type = BOOT_ACPI;
+ printk(KERN_INFO "%s series board detected. Selecting ACPI-method for reboots.\n", d->ident);
+ }
+ return 0;
+}
+
static struct dmi_system_id __initdata reboot_dmi_table[] = {
{ /* Handle problems with rebooting on Dell E520's */
.callback = set_bios_reboot,
@@ -285,6 +298,15 @@ static struct dmi_system_id __initdata reboot_dmi_table[] = {
DMI_MATCH(DMI_BOARD_NAME, "P4S800"),
},
},
+ { /* OLPC XO-1.5 does not implement KBD reboot */
+ .callback = set_acpi_reboot,
+ .ident = "OLPC XO-1.5",
+ .matches = {
+ DMI_MATCH(DMI_SYS_VENDOR, "OLPC"),
+ DMI_MATCH(DMI_PRODUCT_NAME, "XO"),
+ DMI_MATCH(DMI_PRODUCT_VERSION, "1.5"),
+ },
+ },
{ }
};
--
1.7.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] x86: add reboot=acpi quirk for OLPC XO-1.5
2011-02-11 21:32 [PATCH] x86: add reboot=acpi quirk for OLPC XO-1.5 Daniel Drake
@ 2011-02-11 21:37 ` H. Peter Anvin
0 siblings, 0 replies; 2+ messages in thread
From: H. Peter Anvin @ 2011-02-11 21:37 UTC (permalink / raw)
To: Daniel Drake; +Cc: tglx, mingo, x86, dilinger, linux-kernel
On 02/11/2011 01:32 PM, Daniel Drake wrote:
> The OLPC XO-1.5 needs the reboot=acpi flag to reboot correctly.
> Add a quirk so that this becomes the default.
>
> Signed-off-by: Daniel Drake <dsd@laptop.org>
We keep talking about making this the default, let me check on the
status of that.
-hpa
--
H. Peter Anvin, Intel Open Source Technology Center
I work for Intel. I don't speak on their behalf.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-02-11 21:46 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-02-11 21:32 [PATCH] x86: add reboot=acpi quirk for OLPC XO-1.5 Daniel Drake
2011-02-11 21:37 ` H. Peter Anvin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox