From: Mete Durlu <meted@linux.ibm.com>
To: Bradley Morgan <include@grrlz.net>
Cc: agordeev@linux.ibm.com, akpm@linux-foundation.org,
andreas@gaisler.com, borntraeger@linux.ibm.com,
davem@davemloft.net, gor@linux.ibm.com, hca@linux.ibm.com,
linux-kernel@vger.kernel.org, linux-s390@vger.kernel.org,
pmladek@suse.com, sparclinux@vger.kernel.org,
svens@linux.ibm.com
Subject: Re: [PATCH v2 1/3] panic: Introduce arch_do_panic
Date: Tue, 28 Jul 2026 12:13:33 +0200 [thread overview]
Message-ID: <6b856add-646e-4e44-a0f8-98670fd6d663@linux.ibm.com> (raw)
In-Reply-To: <FF4C0015-29DD-480C-8905-E9594659521E@grrlz.net>
On 27/07/2026 14:59, Bradley Morgan wrote:
> Hi Mete,
Hi Bradley,
>> +#ifndef arch_do_panic
>> +#define arch_do_panic arch_do_panic
>> +static inline void arch_do_panic(void) {}
>> +#endif
>
> this is fragile. the arch override only kicks in if whatever header
> defines the macro happens to be in panic.c's include chain. if it ever
> falls out, the empty stub wins silently, the arch version still
> compiles as a global nobody calls, and the hook is just dead. no build
> break, no warning, nothing.
>
> use a weak function instead.
While I acknowledge the benefits you just listed, I got the
notion that maintainers don't prefer __weak implementations
and instead opt for arch specific override via ifndef guards.
Therefore I wanted to start with this approach.
However I am willing to switch if the maintainers would favor
that approach.
>
> one more thing on the call site: arch code now runs (and prints, on
> sparc) after the "end Kernel panic" marker, which until now was the
> last line anyone would ever see. tools grep for that as a terminal
> marker. probably fine, but say so in the changelog instead of leaving
> it implicit.
Right, I'll mention that. And by changelog I take it that you mean
the commit message, right?
> s/already has/already have/ in the changelog while your at it.
Thanks, I'll fix the typo in the next version.
next prev parent reply other threads:[~2026-07-28 10:13 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-27 10:36 [PATCH v2 0/3] Introduce arch_do_panic Mete Durlu
2026-07-27 10:36 ` [PATCH v2 1/3] panic: " Mete Durlu
2026-07-27 12:59 ` Bradley Morgan
2026-07-28 10:13 ` Mete Durlu [this message]
2026-07-27 10:36 ` [PATCH v2 2/3] s390: Implement arch_do_panic Mete Durlu
2026-07-27 13:01 ` Bradley Morgan
2026-07-28 10:43 ` Mete Durlu
2026-07-28 11:02 ` Bradley Morgan
2026-07-28 11:40 ` Sven Schnelle
2026-07-28 11:43 ` Bradley Morgan
2026-07-27 10:36 ` [PATCH v2 3/3] sparc: " Mete Durlu
2026-07-27 13:02 ` Bradley Morgan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=6b856add-646e-4e44-a0f8-98670fd6d663@linux.ibm.com \
--to=meted@linux.ibm.com \
--cc=agordeev@linux.ibm.com \
--cc=akpm@linux-foundation.org \
--cc=andreas@gaisler.com \
--cc=borntraeger@linux.ibm.com \
--cc=davem@davemloft.net \
--cc=gor@linux.ibm.com \
--cc=hca@linux.ibm.com \
--cc=include@grrlz.net \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-s390@vger.kernel.org \
--cc=pmladek@suse.com \
--cc=sparclinux@vger.kernel.org \
--cc=svens@linux.ibm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox