Kernel v6.17-rc4 with STATIC_CALL_SELFTEST=y enabled fails to boot at early stage (PowerMac G4 DP)
Madhavan Srinivasan
maddy at linux.ibm.com
Thu Sep 4 19:03:45 AEST 2025
On 9/4/25 2:15 PM, Christophe Leroy wrote:
>
>
> Le 04/09/2025 à 10:40, Madhavan Srinivasan a écrit :
>>
>>
>> On 9/4/25 1:01 PM, Christophe Leroy wrote:
>>> 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:
>>
>> I am using qemu with -M mac99 and it boots
>>
>> Hardware name: PowerMac3,1 7400 0xc0209 PowerMac
>> printk: legacy bootconsole [udbg0] enabled
>> -----------------------------------------------------
>> phys_mem_size = 0x8000000
>> dcache_bsize = 0x20
>>
>> I am missing something here. Digging some more
>
>
> Did you use the .config provided by Erhard ?
>
Oops. sorry for the noise
Maddy
> Christophe
>
More information about the Linuxppc-dev
mailing list