diff options
author | Tom Goetz <tom.goetz@virtualcomputer.com> | 2011-05-16 15:06:26 -0400 |
---|---|---|
committer | Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> | 2011-06-15 16:48:29 -0400 |
commit | b2abe50688dcb470e2e46109da7e7e02245ed59b (patch) | |
tree | 34bb9dd8833b93ef986aed3492dc92be6de539fc /arch/x86/xen | |
parent | b5328cd14557880e9eb757a8a9c8a88f1b23533a (diff) | |
download | blackbird-obmc-linux-b2abe50688dcb470e2e46109da7e7e02245ed59b.tar.gz blackbird-obmc-linux-b2abe50688dcb470e2e46109da7e7e02245ed59b.zip |
xen: When calling power_off, don't call the halt function.
.. As it won't actually power off the machine.
Reported-by: Sven Köhler <sven.koehler@gmail.com>
Tested-by: Sven Köhler <sven.koehler@gmail.com>
Signed-off-by: Tom Goetz <tom.goetz@virtualcomputer.com>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Diffstat (limited to 'arch/x86/xen')
-rw-r--r-- | arch/x86/xen/enlighten.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/arch/x86/xen/enlighten.c b/arch/x86/xen/enlighten.c index dd7b88f2ec7a..5525163a0398 100644 --- a/arch/x86/xen/enlighten.c +++ b/arch/x86/xen/enlighten.c @@ -1033,6 +1033,13 @@ static void xen_machine_halt(void) xen_reboot(SHUTDOWN_poweroff); } +static void xen_machine_power_off(void) +{ + if (pm_power_off) + pm_power_off(); + xen_reboot(SHUTDOWN_poweroff); +} + static void xen_crash_shutdown(struct pt_regs *regs) { xen_reboot(SHUTDOWN_crash); @@ -1058,7 +1065,7 @@ int xen_panic_handler_init(void) static const struct machine_ops xen_machine_ops __initconst = { .restart = xen_restart, .halt = xen_machine_halt, - .power_off = xen_machine_halt, + .power_off = xen_machine_power_off, .shutdown = xen_machine_halt, .crash_shutdown = xen_crash_shutdown, .emergency_restart = xen_emergency_restart, |