Skip to contentSkip to conversation

x86 suspend: Sanitize wakeup_64.S

PATCH New Rafael J. Wysocki 1 participant 1 message Oct 26, 2008

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 x86 suspend: Sanitize wakeup_64.S

Hi,

Please queue as .29 material.

Thanks,
Rafael

---
From: Rafael J. Wysocki <[email protected]>
Subject: x86 suspend: Sanitize wakeup_64.S

Segment registers are already set by head_64.S, which jumps into wakeup_64.S, to the same values that wakeup_64.S wants them to contain. Remove the unnecessary initialization of segment registers from wakeup_64.S.

Add hlt into the endless loop under bogus_64_magic.

---
 arch/x86/kernel/acpi/wakeup_64.S |    7 +------
 1 files changed, 1 insertions(+), 6 deletions(-)
arch/x86/kernel/acpi/wakeup_64.S +1 -6
index bcc2934..0c5bf2f 100644
@@ -19,12 +19,6 @@ wakeup_long64:
 	cmpq	%rdx, %rax
 	jne	bogus_64_magic
 
-	movw	$__KERNEL_DS, %ax
-	movw	%ax, %ss	
-	movw	%ax, %ds
-	movw	%ax, %es
-	movw	%ax, %fs
-	movw	%ax, %gs
 	movq	saved_rsp, %rsp
 
 	movq	saved_rbx, %rbx
@@ -36,6 +30,7 @@ wakeup_long64:
 	jmp	*%rax
 
 bogus_64_magic:
+	hlt
 	jmp	bogus_64_magic
 
 	.align 2
Signature · 1 line
1.5.6