Re: [PATCH v2 0/3] Introduce arch_do_panic
Heiko Carstens <[email protected]> Wed, 29 Jul 2026 14:06:24 +0200
| Newsgroups | gmane.linux.kernel,gmane.linux.ports.sparc |
|---|---|
| Message-ID | <[email protected]> |
On Wed, Jul 29, 2026 at 12:48:49PM +0200, Mete Durlu wrote: > On 29/07/2026 10:56, Heiko Carstens wrote: > > On Mon, Jul 27, 2026 at 12:36:19PM +0200, Mete Durlu wrote: > > Putting the define in a different header file per architecture doesn't > > seem to be a good idea. There is no guarantee that this will work. So > > either you find a common header file, where it is known that is (and > > will be) included in panic.c, or you go with a weak function. > > I went over the headers included to panic.c, either they are really > irrelevant or not present on other archs. To me the best candidate > header seems like "asm/bug.h" > > $ find ./arch/ -name "bug.h" | grep include/asm | wc -l > 16 > > $ ls ./arch | wc -l > 22 # actually 21 as we shouldn't count Kconfig file > > The architectures missing bug.h in their include/asm/ directory are > hexagon, microblaze, nios2, um and xtensa > > I believe 16/21 is a good ratio but if this is still not good > enough, I'd like to fallback to __weak implementation. > > What do you think Heiko? Then go for __weak and wait if people shout at you :)