mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 1/3] xtensa: ISS: Use register_sys_off_handler(SYS_OFF_MODE_RESTART)
@ 2026-03-02 19:35 Andrew Davis
  2026-03-02 19:35 ` [PATCH 2/3] xtensa: xt2000: " Andrew Davis
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Andrew Davis @ 2026-03-02 19:35 UTC (permalink / raw)
  To: Chris Zankel, Max Filippov; +Cc: linux-kernel, Andrew Davis

Function register_restart_handler() is deprecated. Using this new API
removes our need to keep and manage a struct notifier_block.

Signed-off-by: Andrew Davis <afd@ti.com>
---
 arch/xtensa/platforms/iss/setup.c | 11 ++++-------
 1 file changed, 4 insertions(+), 7 deletions(-)

diff --git a/arch/xtensa/platforms/iss/setup.c b/arch/xtensa/platforms/iss/setup.c
index 0f1fe132691e2..21283acab1a89 100644
--- a/arch/xtensa/platforms/iss/setup.c
+++ b/arch/xtensa/platforms/iss/setup.c
@@ -32,8 +32,7 @@ static int iss_power_off(struct sys_off_data *unused)
 	return NOTIFY_DONE;
 }
 
-static int iss_restart(struct notifier_block *this,
-		       unsigned long event, void *ptr)
+static int iss_restart(struct sys_off_data *unused)
 {
 	/* Flush and reset the mmu, simulate a processor reset, and
 	 * jump to the reset vector. */
@@ -42,10 +41,6 @@ static int iss_restart(struct notifier_block *this,
 	return NOTIFY_DONE;
 }
 
-static struct notifier_block iss_restart_block = {
-	.notifier_call = iss_restart,
-};
-
 static int
 iss_panic_event(struct notifier_block *this, unsigned long event, void *ptr)
 {
@@ -84,7 +79,9 @@ void __init platform_setup(char **p_cmdline)
 	}
 
 	atomic_notifier_chain_register(&panic_notifier_list, &iss_panic_block);
-	register_restart_handler(&iss_restart_block);
+	register_sys_off_handler(SYS_OFF_MODE_RESTART,
+				 SYS_OFF_PRIO_PLATFORM,
+				 iss_restart, NULL);
 	register_sys_off_handler(SYS_OFF_MODE_POWER_OFF,
 				 SYS_OFF_PRIO_PLATFORM,
 				 iss_power_off, NULL);
-- 
2.39.2


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2026-03-03 20:27 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-03-02 19:35 [PATCH 1/3] xtensa: ISS: Use register_sys_off_handler(SYS_OFF_MODE_RESTART) Andrew Davis
2026-03-02 19:35 ` [PATCH 2/3] xtensa: xt2000: " Andrew Davis
2026-03-02 19:35 ` [PATCH 3/3] xtensa: xtfpga: " Andrew Davis
2026-03-03 20:26 ` [PATCH 1/3] xtensa: ISS: " Max Filippov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®