diff options
author | Aaron Durbin <adurbin@google.com> | 2008-01-30 07:31:17 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-01-30 07:31:17 -0500 |
commit | fa20efd2fcd9349770113c6f72fc76ce437b62f5 (patch) | |
tree | 15600837350257043966fe7b8d8cf0d1d8badd00 | |
parent | 5f561d3be8f0db54f9b4fc5cb5db05343f372431 (diff) |
x86: add ACPI reboot option
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>
Cc: Len Brown <lenb@kernel.org>
Cc: Andi Kleen <ak@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
-rw-r--r-- | Documentation/x86_64/boot-options.txt | 5 | ||||
-rw-r--r-- | arch/x86/kernel/reboot_64.c | 11 |
2 files changed, 14 insertions, 2 deletions
diff --git a/Documentation/x86_64/boot-options.txt b/Documentation/x86_64/boot-options.txt index 945311840a10..d7a333258682 100644 --- a/Documentation/x86_64/boot-options.txt +++ b/Documentation/x86_64/boot-options.txt | |||
@@ -110,12 +110,15 @@ Idle loop | |||
110 | 110 | ||
111 | Rebooting | 111 | Rebooting |
112 | 112 | ||
113 | reboot=b[ios] | t[riple] | k[bd] [, [w]arm | [c]old] | 113 | reboot=b[ios] | t[riple] | k[bd] | a[cpi] [, [w]arm | [c]old] |
114 | bios Use the CPU reboot vector for warm reset | 114 | bios Use the CPU reboot vector for warm reset |
115 | warm Don't set the cold reboot flag | 115 | warm Don't set the cold reboot flag |
116 | cold Set the cold reboot flag | 116 | cold Set the cold reboot flag |
117 | triple Force a triple fault (init) | 117 | triple Force a triple fault (init) |
118 | kbd Use the keyboard controller. cold reset (default) | 118 | kbd Use the keyboard controller. cold reset (default) |
119 | acpi Use the ACPI RESET_REG in the FADT. If ACPI is not configured or the | ||
120 | ACPI reset does not work, the reboot path attempts the reset using | ||
121 | the keyboard controller. | ||
119 | 122 | ||
120 | Using warm reset will be much faster especially on big memory | 123 | Using warm reset will be much faster especially on big memory |
121 | systems because the BIOS will not go through the memory check. | 124 | systems because the BIOS will not go through the memory check. |
diff --git a/arch/x86/kernel/reboot_64.c b/arch/x86/kernel/reboot_64.c index 53620a92a8fd..307f996a3933 100644 --- a/arch/x86/kernel/reboot_64.c +++ b/arch/x86/kernel/reboot_64.c | |||
@@ -9,6 +9,7 @@ | |||
9 | #include <linux/pm.h> | 9 | #include <linux/pm.h> |
10 | #include <linux/kdebug.h> | 10 | #include <linux/kdebug.h> |
11 | #include <linux/sched.h> | 11 | #include <linux/sched.h> |
12 | #include <acpi/reboot.h> | ||
12 | #include <asm/io.h> | 13 | #include <asm/io.h> |
13 | #include <asm/delay.h> | 14 | #include <asm/delay.h> |
14 | #include <asm/desc.h> | 15 | #include <asm/desc.h> |
@@ -29,7 +30,8 @@ EXPORT_SYMBOL(pm_power_off); | |||
29 | static long no_idt[3]; | 30 | static long no_idt[3]; |
30 | static enum { | 31 | static enum { |
31 | BOOT_TRIPLE = 't', | 32 | BOOT_TRIPLE = 't', |
32 | BOOT_KBD = 'k' | 33 | BOOT_KBD = 'k', |
34 | BOOT_ACPI = 'a' | ||
33 | } reboot_type = BOOT_KBD; | 35 | } reboot_type = BOOT_KBD; |
34 | static int reboot_mode = 0; | 36 | static int reboot_mode = 0; |
35 | int reboot_force; | 37 | int reboot_force; |
@@ -39,6 +41,7 @@ int reboot_force; | |||
39 | cold Set the cold reboot flag | 41 | cold Set the cold reboot flag |
40 | triple Force a triple fault (init) | 42 | triple Force a triple fault (init) |
41 | kbd Use the keyboard controller. cold reset (default) | 43 | kbd Use the keyboard controller. cold reset (default) |
44 | acpi Use the RESET_REG in the FADT | ||
42 | force Avoid anything that could hang. | 45 | force Avoid anything that could hang. |
43 | */ | 46 | */ |
44 | static int __init reboot_setup(char *str) | 47 | static int __init reboot_setup(char *str) |
@@ -54,6 +57,7 @@ static int __init reboot_setup(char *str) | |||
54 | break; | 57 | break; |
55 | 58 | ||
56 | case 't': | 59 | case 't': |
60 | case 'a': | ||
57 | case 'b': | 61 | case 'b': |
58 | case 'k': | 62 | case 'k': |
59 | reboot_type = *str; | 63 | reboot_type = *str; |
@@ -146,6 +150,11 @@ void machine_emergency_restart(void) | |||
146 | 150 | ||
147 | reboot_type = BOOT_KBD; | 151 | reboot_type = BOOT_KBD; |
148 | break; | 152 | break; |
153 | |||
154 | case BOOT_ACPI: | ||
155 | acpi_reboot(); | ||
156 | reboot_type = BOOT_KBD; | ||
157 | break; | ||
149 | } | 158 | } |
150 | } | 159 | } |
151 | } | 160 | } |