panic-introduce-arch_do_panic.patch removed from -mm tree
The quilt patch titled
Subject: panic: introduce arch_do_panic
has been removed from the -mm tree. Its filename was
panic-introduce-arch_do_panic.patch
This patch was dropped because it was merged into the mm-nonmm-stable branch of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
------------------------------------------------------
From: Mete Durlu <[email protected]>
Subject: panic: introduce arch_do_panic
Date: Mon, 31 Aug 2026 11:57:15 +0200
Patch series "Introduce arch_do_panic", v6.
Replace architecture-specific ifdef sections in vpanic() with a clean arch_do_panic() hook. Currently s390 and sparc embed their panic handlers directly in vpanic() using preprocessor conditionals, making the common code path harder to maintain.
Introduce arch_do_panic() as an architecture extension point called at the end of vpanic(). Architectures can use this hook to implement their specific panic handling without polluting the generic panic code.
Remove s390s ifdef block in vpanic() and move the corresponding code block to s390s own arch_do_panic() implementation in architecture specific code.
Move sparc panic handling from ifdef blocks to arch_do_panic(). Remove the preprocessor conditionals from vpanic() and place the Stop-A enablement code in architecture-specific files where it belongs. Stop-A enablement markers are now printed after "end Kernel panic" line. To me, there are no better alternatives other than setup.c to put sparc's arch_do_panic() implementation. The other files under arch/sparc/kernel are either divided to *_32.c and *_64.c variants, which mean code duplication, or unrelated.
The cleanup reduces vpanic() complexity and establishes a pattern for other architectures needing custom panic behavior. No functional changes, only minor print order changes.
This patch (of 3):
Introduce a hook for architectures to put their specific panic handlers. s390 and sparc already have ifdef preprocessor checks to execute architecture specific code. Pave the way for vpanic() cleanup.
---
include/linux/panic.h | 2 ++ kernel/panic.c | 3 +++ 2 files changed, 5 insertions(+)
include/linux/panic.h renamed from include/linux/panic.h~panic-introduce-arch_do_panic +2 -0
@@ -110,4 +110,6 @@ extern void add_taint(unsigned flag, enuextern int test_taint (unsigned flag);extern unsigned long get_taint (void ); +void arch_do_panic (void ); +#endif /* _LINUX_PANIC_H */
kernel/panic.c renamed from kernel/panic.c~panic-introduce-arch_do_panic +3 -0
@@ -567,6 +567,8 @@ static void panic_other_cpus_shutdown(bocrash_smp_send_stop (); } +void __weak arch_do_panic (void ) {} +/** * vpanic - halt the system * @fmt: The text string to print
@@ -756,6 +758,7 @@ void vpanic(const char *fmt, va_list arg#endif pr_emerg ("---[ end Kernel panic - not syncing: %s ]---\n" , buf); +arch_do_panic ();/* Do not scroll important messages printed above */ suppress_printk =1 ;
_
Patches currently in -mm which might be from [email protected] are