From: Christophe Leroy <christophe.leroy@csgroup.eu>
To: Erhard Furtner <erhard_f@mailbox.org>,
"linuxppc-dev@lists.ozlabs.org" <linuxppc-dev@lists.ozlabs.org>
Cc: Andrew Donnellan <ajd@linux.ibm.com>
Subject: Re: Kernel v6.17-rc4 with STATIC_CALL_SELFTEST=y enabled fails to boot at early stage (PowerMac G4 DP)
Date: Thu, 4 Sep 2025 09:31:29 +0200 [thread overview]
Message-ID: <98dbafee-aad3-439b-9efb-76f80c6668fd@csgroup.eu> (raw)
In-Reply-To: <342b4120-911c-4723-82ec-d8c9b03a8aef@mailbox.org>
Hi Erhard,
Le 04/09/2025 à 00:44, Erhard Furtner a écrit :
> Greetings!
>
> In a conversation with Andrew about his page table check code for
> PowerPC he found out there seems to be a general problem of the code
> patching code on ppc:
>
> > I note that STATIC_CALL_SELFTEST seems to fail, which could be but isn't
> > necessarily related.
>
> > Specifically, it looks like code patching fails if the instruction
> being patched
> > is in an __init function, and in this case, that occurs due to
> > page_table_check_pte_clear() being inlined into ptep_clear(), which
> is in turn
> > inlined into pte_clear_tests() in debug_vm_pgtable.c which is marked
> __init.
> > Very curious!
>
> Indeed, when I enable STATIC_CALL_SELFTEST=y on my G4 the kernel fails
> to boot at an early stage, the OpenFirmware console showing only:
>
> done
> found display : /pci@f0000000/ATY,AlteracParent@10/ATY,Alterac_B@1,
> opening...
>
> Without STATIC_CALL_SELFTEST the kernel boots just fine.
>
> Kernel .config attached.
With your .config, on QEMU I get the following. I will investigate.
[ 0.000000] Kernel panic - not syncing: arch_static_call_transform:
patching failed func_a+0x0/0x10 at 0x0
[ 0.000000] CPU: 0 UID: 0 PID: 0 Comm: swapper Not tainted
6.17.0-rc4-PMacG4+ #1628 PREEMPTLAZY
[ 0.000000] Hardware name: PowerMac3,1 7400 0xc0209 PowerMac
[ 0.000000] Call Trace:
[ 0.000000] [c0dd7e60] [c0810e54] dump_stack_lvl+0x70/0x8c (unreliable)
[ 0.000000] [c0dd7e80] [c004b220] vpanic+0x114/0x2e4
[ 0.000000] [c0dd7eb0] [c004b45c] arch_set_bit+0x0/0x38
[ 0.000000] [c0dd7f00] [c00155fc] arch_static_call_transform+0xec/0x1e8
[ 0.000000] [c0dd7f30] [c0176944] __static_call_init+0x110/0x288
[ 0.000000] [c0dd7f80] [c0c19ab0] static_call_init+0x4c/0x9c
[ 0.000000] [c0dd7fa0] [c0c02e00] start_kernel+0x7c/0x664
[ 0.000000] [c0dd7ff0] [000035d0] 0x35d0
[ 0.000000] Rebooting in 40 seconds..
Christophe
next prev parent reply other threads:[~2025-09-04 7:50 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-03 22:44 Kernel v6.17-rc4 with STATIC_CALL_SELFTEST=y enabled fails to boot at early stage (PowerMac G4 DP) Erhard Furtner
2025-09-04 7:31 ` Christophe Leroy [this message]
2025-09-04 8:15 ` Christophe Leroy
2025-09-04 8:40 ` Madhavan Srinivasan
2025-09-04 8:45 ` Christophe Leroy
2025-09-04 9:03 ` Madhavan Srinivasan
2025-09-04 9:57 ` Andrew Donnellan
2025-09-04 10:05 ` Christophe Leroy
2025-09-04 16:33 ` [PATCH] powerpc/32: Remove PAGE_KERNEL_TEXT to fix startup failure Christophe Leroy
2025-09-05 3:55 ` Ritesh Harjani
2025-09-05 5:07 ` Christophe Leroy
2025-09-05 5:23 ` Ritesh Harjani
2025-09-05 6:57 ` Andrew Donnellan
2025-09-05 9:43 ` Christophe Leroy
2025-09-05 14:30 ` Erhard Furtner
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=98dbafee-aad3-439b-9efb-76f80c6668fd@csgroup.eu \
--to=christophe.leroy@csgroup.eu \
--cc=ajd@linux.ibm.com \
--cc=erhard_f@mailbox.org \
--cc=linuxppc-dev@lists.ozlabs.org \
/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;
as well as URLs for NNTP newsgroup(s).