Matthew Garrett | 4 Apr 2011 19:55
Picon
Favicon

[PATCH] X86: Reorder reboot method preferences

Windows reboots by hitting the ACPI reboot vector (if available), trying
the keyboard controller, hitting the ACPI reboot vector again and then
giving the keyboard controller one last go. This is important for modern
hardware, which often lacks a keyboard controller and may even wedge if the
legacy io ports are hit. Rework our reboot process a little to default to
matching this behaviour, although we'll fall through to attempting a triple
fault if nothing else works.

Signed-off-by: Matthew Garrett <mjg <at> redhat.com>
---
 arch/x86/kernel/reboot.c |   23 ++++++++++++++++++++++-
 1 files changed, 22 insertions(+), 1 deletions(-)

diff --git a/arch/x86/kernel/reboot.c b/arch/x86/kernel/reboot.c
index d3ce37e..9dd4330 100644
--- a/arch/x86/kernel/reboot.c
+++ b/arch/x86/kernel/reboot.c
 <at>  <at>  -35,7 +35,7  <at>  <at>  EXPORT_SYMBOL(pm_power_off);

 static const struct desc_ptr no_idt = {};
 static int reboot_mode;
-enum reboot_type reboot_type = BOOT_KBD;
+enum reboot_type reboot_type = BOOT_ACPI;
 int reboot_force;

 #if defined(CONFIG_X86_32) && defined(CONFIG_SMP)
 <at>  <at>  -477,9 +477,23  <at>  <at>  void __attribute__((weak)) mach_reboot_fixups(void)
 {
 }

(Continue reading)

Alan Cox | 4 Apr 2011 20:17
Face
Picon

Re: [PATCH] X86: Reorder reboot method preferences

On Mon,  4 Apr 2011 13:55:05 -0400
Matthew Garrett <mjg <at> redhat.com> wrote:

> Windows reboots by hitting the ACPI reboot vector (if available), trying
> the keyboard controller, hitting the ACPI reboot vector again and then
> giving the keyboard controller one last go. This is important for modern
> hardware, which often lacks a keyboard controller and may even wedge if the
> legacy io ports are hit. Rework our reboot process a little to default to
> matching this behaviour, although we'll fall through to attempting a triple
> fault if nothing else works.

Acked-by: Alan Cox <alan <at> linux.intel.com>

and will also save special casing Oaktrail boards
Picon
Favicon

[tip:x86/reboot] x86: Reorder reboot method preferences

Commit-ID:  660e34cebf0a11d54f2d5dd8838607452355f321
Gitweb:     http://git.kernel.org/tip/660e34cebf0a11d54f2d5dd8838607452355f321
Author:     Matthew Garrett <mjg <at> redhat.com>
AuthorDate: Mon, 4 Apr 2011 13:55:05 -0400
Committer:  Ingo Molnar <mingo <at> elte.hu>
CommitDate: Wed, 6 Apr 2011 10:36:50 +0200

x86: Reorder reboot method preferences

We have a never ending stream of 'reboot quirks' for new boxes
that will not reboot properly under Linux (they will hang on
reboot).

The reason is widespread 'Windows compatible' assumption of modern
x86 hardware, which expects the following reboot sequence:

 - hitting the ACPI reboot vector (if available)
 - trying the keyboard controller
 - hitting the ACPI reboot vector again
 - then giving the keyboard controller one last go

This sequence expectation gets more and more embedded in modern
hardware, which often lacks a keyboard controller and may even
lock up if the legacy io ports are hit - and which hardware is
often not tested with Linux during development.

The end result is that reboot works under Windows-alike OSs but not
under Linux.

Rework our reboot process to meet this hardware externality a little
(Continue reading)


Gmane