aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/apm_32.c
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@linux.intel.com>2011-02-14 21:36:03 -0500
committerH. Peter Anvin <hpa@linux.intel.com>2011-02-18 00:05:34 -0500
commit3d35ac346e981162eeba391e496faceed4753e7b (patch)
tree1f902bd0b8d62aa65b9d216483cbecc9a712a72b /arch/x86/kernel/apm_32.c
parent014eea518af3d141e276664cf40ef3da899eba35 (diff)
x86, reboot: Move the real-mode reboot code to an assembly file
Move the real-mode reboot code out to an assembly file (reboot_32.S) which is allocated using the common lowmem trampoline allocator. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com> LKML-Reference: <4D5DFBE4.7090104@intel.com> Cc: Stephen Rothwell <sfr@canb.auug.org.au> Cc: Rafael J. Wysocki <rjw@sisk.pl> Cc: Matthieu Castet <castet.matthieu@free.fr>
Diffstat (limited to 'arch/x86/kernel/apm_32.c')
-rw-r--r--arch/x86/kernel/apm_32.c12
1 files changed, 1 insertions, 11 deletions
diff --git a/arch/x86/kernel/apm_32.c b/arch/x86/kernel/apm_32.c
index 0e4f24c2a746..b929108eb58f 100644
--- a/arch/x86/kernel/apm_32.c
+++ b/arch/x86/kernel/apm_32.c
@@ -975,20 +975,10 @@ recalc:
975 975
976static void apm_power_off(void) 976static void apm_power_off(void)
977{ 977{
978 unsigned char po_bios_call[] = {
979 0xb8, 0x00, 0x10, /* movw $0x1000,ax */
980 0x8e, 0xd0, /* movw ax,ss */
981 0xbc, 0x00, 0xf0, /* movw $0xf000,sp */
982 0xb8, 0x07, 0x53, /* movw $0x5307,ax */
983 0xbb, 0x01, 0x00, /* movw $0x0001,bx */
984 0xb9, 0x03, 0x00, /* movw $0x0003,cx */
985 0xcd, 0x15 /* int $0x15 */
986 };
987
988 /* Some bioses don't like being called from CPU != 0 */ 978 /* Some bioses don't like being called from CPU != 0 */
989 if (apm_info.realmode_power_off) { 979 if (apm_info.realmode_power_off) {
990 set_cpus_allowed_ptr(current, cpumask_of(0)); 980 set_cpus_allowed_ptr(current, cpumask_of(0));
991 machine_real_restart(po_bios_call, sizeof(po_bios_call)); 981 machine_real_restart(MRR_APM);
992 } else { 982 } else {
993 (void)set_system_power_state(APM_STATE_OFF); 983 (void)set_system_power_state(APM_STATE_OFF);
994 } 984 }