Module Name:    src
Committed By:   khorben
Date:           Fri Apr 24 00:04:04 UTC 2015

Modified Files:
        src/sys/arch/amd64/amd64: machdep.c
        src/sys/arch/i386/i386: machdep.c

Log Message:
Also use ACPI shutdown on Xen DOM0

No objection on port-xen@
ok gdt@


To generate a diff of this commit:
cvs rdiff -u -r1.211 -r1.212 src/sys/arch/amd64/amd64/machdep.c
cvs rdiff -u -r1.753 -r1.754 src/sys/arch/i386/i386/machdep.c

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/amd64/amd64/machdep.c
diff -u src/sys/arch/amd64/amd64/machdep.c:1.211 src/sys/arch/amd64/amd64/machdep.c:1.212
--- src/sys/arch/amd64/amd64/machdep.c:1.211	Mon May 12 22:50:03 2014
+++ src/sys/arch/amd64/amd64/machdep.c	Fri Apr 24 00:04:04 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: machdep.c,v 1.211 2014/05/12 22:50:03 uebayasi Exp $	*/
+/*	$NetBSD: machdep.c,v 1.212 2015/04/24 00:04:04 khorben Exp $	*/
 
 /*-
  * Copyright (c) 1996, 1997, 1998, 2000, 2006, 2007, 2008, 2011
@@ -111,7 +111,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.211 2014/05/12 22:50:03 uebayasi Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.212 2015/04/24 00:04:04 khorben Exp $");
 
 /* #define XENDEBUG_LOW  */
 
@@ -674,14 +674,13 @@ haltsys:
 	doshutdownhooks();
 
         if ((howto & RB_POWERDOWN) == RB_POWERDOWN) {
-#ifndef XEN
 #if NACPICA > 0
 		if (s != IPL_NONE)
 			splx(s);
 
 		acpi_enter_sleep_state(ACPI_STATE_S5);
 #endif
-#else /* XEN */
+#ifdef XEN
 		HYPERVISOR_shutdown();
 #endif /* XEN */
 	}

Index: src/sys/arch/i386/i386/machdep.c
diff -u src/sys/arch/i386/i386/machdep.c:1.753 src/sys/arch/i386/i386/machdep.c:1.754
--- src/sys/arch/i386/i386/machdep.c:1.753	Fri Jan 23 02:52:14 2015
+++ src/sys/arch/i386/i386/machdep.c	Fri Apr 24 00:04:04 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: machdep.c,v 1.753 2015/01/23 02:52:14 christos Exp $	*/
+/*	$NetBSD: machdep.c,v 1.754 2015/04/24 00:04:04 khorben Exp $	*/
 
 /*-
  * Copyright (c) 1996, 1997, 1998, 2000, 2004, 2006, 2008, 2009
@@ -67,7 +67,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.753 2015/01/23 02:52:14 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.754 2015/04/24 00:04:04 khorben Exp $");
 
 #include "opt_beep.h"
 #include "opt_compat_ibcs2.h"
@@ -760,10 +760,6 @@ haltsys:
 	doshutdownhooks();
 
 	if ((howto & RB_POWERDOWN) == RB_POWERDOWN) {
-#ifdef XEN
-		HYPERVISOR_shutdown();
-		for (;;);
-#endif
 #if NACPICA > 0
 		if (s != IPL_NONE)
 			splx(s);
@@ -772,6 +768,10 @@ haltsys:
 #else
 		__USE(s);
 #endif
+#ifdef XEN
+		HYPERVISOR_shutdown();
+		for (;;);
+#endif
 	}
 
 #ifdef MULTIPROCESSOR

Reply via email to