[RFC PATCH 3/4] arm64: Invoke pre_restart notifiers

Mathieu Desnoyers mathieu.desnoyers at efficios.com
Tue Jun 18 08:41:56 PDT 2024


Invoke the pre_restart notifiers after shutdown, before machine restart.
This allows preserving pmem memory across warm reboots.

Invoke the pre_restart notifiers before emergency machine restart as
well to cover the panic() scenario.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers at efficios.com>
Cc: Dan Williams <dan.j.williams at intel.com>
Cc: Vishal Verma <vishal.l.verma at intel.com>
Cc: Dave Jiang <dave.jiang at intel.com>
Cc: Ira Weiny <ira.weiny at intel.com>
Cc: Steven Rostedt <rostedt at goodmis.org>
Cc: nvdimm at lists.linux.dev
Cc: Catalin Marinas <catalin.marinas at arm.com>
Cc: Will Deacon <will at kernel.org>
Cc: linux-arm-kernel at lists.infradead.org
---
 arch/arm64/kernel/process.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/arch/arm64/kernel/process.c b/arch/arm64/kernel/process.c
index 4ae31b7af6c3..4a27397617fb 100644
--- a/arch/arm64/kernel/process.c
+++ b/arch/arm64/kernel/process.c
@@ -129,6 +129,8 @@ void machine_restart(char *cmd)
 	local_irq_disable();
 	smp_send_stop();
 
+	do_kernel_pre_restart(cmd);
+
 	/*
 	 * UpdateCapsule() depends on the system being reset via
 	 * ResetSystem().
-- 
2.39.2




More information about the linux-arm-kernel mailing list