From: Aaron Durbin <adurbin@google.com>
To: linux-kernel@vger.kernel.org
Cc: ak@suse.de, akpm@osdl.org
Subject: [PATCH] x86_64: Add ACPI reboot option
Date: Mon, 16 Jul 2007 11:01:28 -0700 [thread overview]
Message-ID: <20070716180128.GA5352@google.com> (raw)
Add the ability to reboot an x86_64 based machine using the RESET_REG in the
FADT ACPI table.
Signed-off-by: Aaron Durbin <adurbin@google.com>
----
This patch relies on the ACPI reboot mechanism patch.
diff --git a/Documentation/x86_64/boot-options.txt b/Documentation/x86_64/boot-options.txt
index 6177d88..a9253bc 100644
--- a/Documentation/x86_64/boot-options.txt
+++ b/Documentation/x86_64/boot-options.txt
@@ -108,12 +108,15 @@ Idle loop
Rebooting
- reboot=b[ios] | t[riple] | k[bd] [, [w]arm | [c]old]
+ reboot=b[ios] | t[riple] | k[bd] | a[cpi] [, [w]arm | [c]old]
bios Use the CPU reboot vector for warm reset
warm Don't set the cold reboot flag
cold Set the cold reboot flag
triple Force a triple fault (init)
kbd Use the keyboard controller. cold reset (default)
+ acpi Use the ACPI RESET_REG in the FADT. If ACPI is not configured or the
+ ACPI reset does not work, the reboot path attempts the reset using
+ the keyboard controller.
Using warm reset will be much faster especially on big memory
systems because the BIOS will not go through the memory check.
diff --git a/arch/x86_64/kernel/reboot.c b/arch/x86_64/kernel/reboot.c
index 7503068..239b576 100644
--- a/arch/x86_64/kernel/reboot.c
+++ b/arch/x86_64/kernel/reboot.c
@@ -9,6 +9,7 @@ #include <linux/string.h>
#include <linux/pm.h>
#include <linux/kdebug.h>
#include <linux/sched.h>
+#include <acpi/reboot.h>
#include <asm/io.h>
#include <asm/delay.h>
#include <asm/hw_irq.h>
@@ -26,7 +27,8 @@ EXPORT_SYMBOL(pm_power_off);
static long no_idt[3];
static enum {
BOOT_TRIPLE = 't',
- BOOT_KBD = 'k'
+ BOOT_KBD = 'k',
+ BOOT_ACPI = 'a'
} reboot_type = BOOT_KBD;
static int reboot_mode = 0;
int reboot_force;
@@ -36,6 +38,7 @@ int reboot_force;
cold Set the cold reboot flag
triple Force a triple fault (init)
kbd Use the keyboard controller. cold reset (default)
+ acpi Use the RESET_REG in the FADT
force Avoid anything that could hang.
*/
static int __init reboot_setup(char *str)
@@ -51,6 +54,7 @@ static int __init reboot_setup(char *str
break;
case 't':
+ case 'a':
case 'b':
case 'k':
reboot_type = *str;
@@ -137,6 +141,11 @@ void machine_emergency_restart(void)
reboot_type = BOOT_KBD;
break;
+
+ case BOOT_ACPI:
+ acpi_reboot();
+ reboot_type = BOOT_KBD;
+ break;
}
}
}
reply other threads:[~2007-07-16 18:03 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20070716180128.GA5352@google.com \
--to=adurbin@google.com \
--cc=ak@suse.de \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox