Module Name:    src
Committed By:   maxv
Date:           Sat Aug  6 14:54:25 UTC 2016

Modified Files:
        src/sys/arch/i386/acpi: acpi_wakeup_low.S

Log Message:
Use the stack to save %edx.


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/sys/arch/i386/acpi/acpi_wakeup_low.S

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/i386/acpi/acpi_wakeup_low.S
diff -u src/sys/arch/i386/acpi/acpi_wakeup_low.S:1.7 src/sys/arch/i386/acpi/acpi_wakeup_low.S:1.8
--- src/sys/arch/i386/acpi/acpi_wakeup_low.S:1.7	Sun Jul 24 14:09:22 2016
+++ src/sys/arch/i386/acpi/acpi_wakeup_low.S	Sat Aug  6 14:54:25 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: acpi_wakeup_low.S,v 1.7 2016/07/24 14:09:22 maxv Exp $	*/
+/*	$NetBSD: acpi_wakeup_low.S,v 1.8 2016/08/06 14:54:25 maxv Exp $	*/
 
 /*-
  * Copyright (c) 2007 Joerg Sonnenberger <jo...@netbsd.org>
@@ -29,7 +29,7 @@
  */
 
 #include <machine/asm.h>
-__KERNEL_RCSID(0, "$NetBSD: acpi_wakeup_low.S,v 1.7 2016/07/24 14:09:22 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: acpi_wakeup_low.S,v 1.8 2016/08/06 14:54:25 maxv Exp $");
 
 #include "assym.h"
 #include <machine/segments.h>
@@ -105,8 +105,9 @@ acpi_md_sleep_prepare:
 	movl	%esp,ACPI_SUSPEND_REG+(4*4)(%edx)
 
 	movl	$MSR_EFER,%ecx
-	rdmsr
-	movl	CPUVAR(SELF),%edx
+	pushl	%edx
+	rdmsr	/* overwrites %edx */
+	popl	%edx
 	movl	%eax,ACPI_SUSPEND_EFER(%edx)
 
 	movl	%cr0,%eax

Reply via email to