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 <[email protected]>
---
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
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 <[email protected]>
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.