Skip to contentSkip to conversation

x86, reboot: Drop redundant write of reboot_mode

tip:x86/reboot tip-bot for H. Peter Anvin 1 participant 1 message Jun 21, 2012 x86

lore
Share & tools
lore
#0 lore raw
Commit-ID:  2b1b712f050eaf0ac576591281446dc960c0afc5
Gitweb:     http://git.kernel.org/tip/2b1b712f050eaf0ac576591281446dc960c0afc5
Author:     H. Peter Anvin <[email protected]>
AuthorDate: Wed, 20 Jun 2012 21:18:14 -0700
Committer:  H. Peter Anvin <[email protected]>
CommitDate: Wed, 20 Jun 2012 21:18:14 -0700

x86, reboot: Drop redundant write of reboot_mode

We write reboot_mode to BIOS location 0x472 in native_machine_emergency_restart() (reboot.c:542) already, there is no need to then write it again in machine_real_restart().

This means nothing gets written there for MRR_APM, but the APM call is a poweroff call and doesn't use this memory location.

---
 arch/x86/kernel/reboot.c |    8 --------
 1 files changed, 0 insertions(+), 8 deletions(-)
arch/x86/kernel/reboot.c +0 -8
index 6ddb9cd..6ef559f 100644
@@ -179,14 +179,6 @@ void __noreturn machine_real_restart(unsigned int type)
 	write_cr3(real_mode_header->trampoline_pgd);
 #endif
 
-	/*
-	 * Write 0x1234 to absolute memory location 0x472.  The BIOS reads
-	 * this on booting to tell it to "Bypass memory test (also warm
-	 * boot)".  This seems like a fairly standard thing that gets set by
-	 * REBOOT.COM programs, and the previous reset routine did this
-	 * too. */
-	*((unsigned short *)0x472) = reboot_mode;
-
 	/* Jump to the identity-mapped low memory code */
 #ifdef CONFIG_X86_32
 	asm volatile("jmpl *%0" : :