Re: [PATCH v2 3/3] sparc: Implement arch_do_panic
From: Bradley Morgan
Date: Mon Jul 27 2026 - 09:08:23 EST
Hi Mete,
the move itself is right. with the weak function from patch 1 the
asm/bug.h hunk goes away, and the asm/setup.h hunk deleting a blank
line is unrelated churn that shouldnt be here either. what remains:
diff --git a/arch/sparc/kernel/setup.c b/arch/sparc/kernel/setup.c
--- a/arch/sparc/kernel/setup.c
+++ b/arch/sparc/kernel/setup.c
@@ -36,6 +36,15 @@ static const struct ctl_table sparc_sysctl_table[] = {
#endif
};
+void arch_do_panic(void)
+{
+ extern int stop_a_enabled;
+
+ /* Make sure the user can actually press Stop-A (L1-A) */
+ stop_a_enabled = 1;
+ pr_emerg("Press Stop-A (L1-A) from sun keyboard or send break\n"
+ "twice on console to return to the boot prom\n");
+}
static int __init init_sparc_sysctls(void)
{
diff --git a/kernel/panic.c b/kernel/panic.c
--- a/kernel/panic.c
+++ b/kernel/panic.c
@@ -747,15 +747,6 @@ void vpanic(const char *fmt, va_list args)
reboot_mode = panic_reboot_mode;
emergency_restart();
}
-#ifdef __sparc__
- {
- extern int stop_a_enabled;
- /* Make sure the user can actually press Stop-A (L1-A) */
- stop_a_enabled = 1;
- pr_emerg("Press Stop-A (L1-A) from sun keyboard or send break\n"
- "twice on console to return to the boot prom\n");
- }
-#endif
pr_emerg("---[ end Kernel panic - not syncing: %s ]---\n", buf);
arch_do_panic();
suggestion only, no SoB from me, its yours to fold into v3.
note the Stop A message now prints after the "end Kernel panic"
marker instead of before it. thats the call site from patch 1 doing
that, im ok with it, but it wants a sentence in the changelog.
with the stray hunks gone this looks good to me.
Thanks!