Commit 14c03a4a authored by Rafael J. Wysocki's avatar Rafael J. Wysocki
Browse files

Merge back reboot/poweroff notifiers rework for 5.19-rc1.

parents 09583dfe 6779db97
Loading
Loading
Loading
Loading
+1 −3
Original line number Diff line number Diff line
@@ -116,9 +116,7 @@ void machine_power_off(void)
{
	local_irq_disable();
	smp_send_stop();

	if (pm_power_off)
		pm_power_off();
	do_kernel_power_off();
}

/*
+1 −2
Original line number Diff line number Diff line
@@ -111,8 +111,7 @@ void machine_power_off(void)
{
	local_irq_disable();
	smp_send_stop();
	if (pm_power_off)
		pm_power_off();
	do_kernel_power_off();
}

/*
+2 −4
Original line number Diff line number Diff line
@@ -9,16 +9,14 @@ EXPORT_SYMBOL(pm_power_off);
void machine_power_off(void)
{
	local_irq_disable();
	if (pm_power_off)
		pm_power_off();
	do_kernel_power_off();
	asm volatile ("bkpt");
}

void machine_halt(void)
{
	local_irq_disable();
	if (pm_power_off)
		pm_power_off();
	do_kernel_power_off();
	asm volatile ("bkpt");
}

+2 −2
Original line number Diff line number Diff line
@@ -19,6 +19,7 @@
#include <linux/module.h>
#include <linux/notifier.h>
#include <linux/personality.h>
#include <linux/reboot.h>
#include <linux/sched.h>
#include <linux/sched/debug.h>
#include <linux/sched/hotplug.h>
@@ -599,8 +600,7 @@ machine_halt (void)
void
machine_power_off (void)
{
	if (pm_power_off)
		pm_power_off();
	do_kernel_power_off();
	machine_halt();
}

+2 −1
Original line number Diff line number Diff line
@@ -15,6 +15,7 @@
#include <linux/string.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/reboot.h>
#include <linux/io.h>
#include <asm/machdep.h>
#include <asm/natfeat.h>
@@ -90,5 +91,5 @@ void __init nf_init(void)
	pr_info("NatFeats found (%s, %lu.%lu)\n", buf, version >> 16,
		version & 0xffff);

	mach_power_off = nf_poweroff;
	register_platform_power_off(nf_poweroff);
}
Loading