Skip to content

Commit

Permalink
xen/x86: Use do_kernel_power_off()
Browse files Browse the repository at this point in the history
Kernel now supports chained power-off handlers. Use do_kernel_power_off()
that invokes chained power-off handlers. It also invokes legacy
pm_power_off() for now, which will be removed once all drivers will
be converted to the new sys-off API.

Acked-by: Juergen Gross <jgross@suse.com>
Reviewed-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>
Signed-off-by: Dmitry Osipenko <dmitry.osipenko@collabora.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
  • Loading branch information
Dmitry Osipenko authored and Rafael J. Wysocki committed May 19, 2022
1 parent f4622fe commit f089ab6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions arch/x86/xen/enlighten_pv.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
#include <linux/gfp.h>
#include <linux/edd.h>
#include <linux/objtool.h>
#include <linux/reboot.h>

#include <xen/xen.h>
#include <xen/events.h>
Expand Down Expand Up @@ -1071,8 +1072,7 @@ static void xen_machine_halt(void)

static void xen_machine_power_off(void)
{
if (pm_power_off)
pm_power_off();
do_kernel_power_off();
xen_reboot(SHUTDOWN_poweroff);
}

Expand Down

0 comments on commit f089ab6

Please sign in to comment.