Kernel v6.17-rc4 with STATIC_CALL_SELFTEST=y enabled fails to boot at early stage (PowerMac G4 DP)
Christophe Leroy
christophe.leroy at csgroup.eu
Thu Sep 4 17:31:29 AEST 2025
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 at f0000000/ATY,AlteracParent at 10/ATY,Alterac_B at 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
More information about the Linuxppc-dev
mailing list