]> xenbits.xensource.com Git - xen.git/commitdiff
Power down an x86 system directly within domain0 rather than
authorkaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk>
Fri, 7 Apr 2006 12:40:22 +0000 (13:40 +0100)
committerkaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk>
Fri, 7 Apr 2006 12:40:22 +0000 (13:40 +0100)
executing a shutdown hypercall. Domain0 is able to execute
ACPI power-off code.

Signed-off-by: Harry Butterworth <butterwo@uk.ibm.com>
linux-2.6-xen-sparse/drivers/xen/core/reboot.c

index ba0b9b911277f434c77f5a0cc1f0350d0caf3faf..7a3d2cc39d5d88253a4732ef82d2d37c2bb8a133 100644 (file)
@@ -59,6 +59,10 @@ void machine_power_off(void)
 {
        /* We really want to get pending console data out before we die. */
        xencons_force_flush();
+#if defined(__i386__) || defined(__x86_64__)
+       if (pm_power_off)
+               pm_power_off();
+#endif
        HYPERVISOR_shutdown(SHUTDOWN_poweroff);
 }