summaryrefslogtreecommitdiff
path: root/arch/x86
diff options
context:
space:
mode:
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>2022-05-25 14:38:29 +0200
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2022-05-25 14:38:29 +0200
commit14c03a4a757f4be3e81c5004ca72f809ab04e0b1 (patch)
treebd2586eb8dab7e979aef0cf378037877521395ea /arch/x86
parent09583dfed2cb9723da31601cb7080490c2e2e2d7 (diff)
parent6779db970bd287bb35b28bd5dc256fd7aef19d1c (diff)
Merge back reboot/poweroff notifiers rework for 5.19-rc1.
Diffstat (limited to 'arch/x86')
-rw-r--r--arch/x86/kernel/reboot.c4
-rw-r--r--arch/x86/xen/enlighten_pv.c4
2 files changed, 4 insertions, 4 deletions
diff --git a/arch/x86/kernel/reboot.c b/arch/x86/kernel/reboot.c
index fa700b46588e..c3636ea4aa71 100644
--- a/arch/x86/kernel/reboot.c
+++ b/arch/x86/kernel/reboot.c
@@ -739,10 +739,10 @@ static void native_machine_halt(void)
static void native_machine_power_off(void)
{
- if (pm_power_off) {
+ if (kernel_can_power_off()) {
if (!reboot_force)
machine_shutdown();
- pm_power_off();
+ do_kernel_power_off();
}
/* A fallback in case there is no PM info available */
tboot_shutdown(TB_SHUTDOWN_HALT);
diff --git a/arch/x86/xen/enlighten_pv.c b/arch/x86/xen/enlighten_pv.c
index ca85d1409917..f33a4421e7cd 100644
--- a/arch/x86/xen/enlighten_pv.c
+++ b/arch/x86/xen/enlighten_pv.c
@@ -30,6 +30,7 @@
#include <linux/pci.h>
#include <linux/gfp.h>
#include <linux/edd.h>
+#include <linux/reboot.h>
#include <xen/xen.h>
#include <xen/events.h>
@@ -1069,8 +1070,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);
}