Nicholas Piggin <npig...@gmail.com> writes: > diff --git a/arch/powerpc/include/asm/book3s/64/mmu.h > b/arch/powerpc/include/asm/book3s/64/mmu.h > index 015d7d972d16..c480d21a146c 100644 > --- a/arch/powerpc/include/asm/book3s/64/mmu.h > +++ b/arch/powerpc/include/asm/book3s/64/mmu.h > @@ -239,8 +251,9 @@ static inline void setup_initial_memory_limit(phys_addr_t > first_memblock_base, > * know which translations we will pick. Hence go with hash > * restrictions. > */ > - return hash__setup_initial_memory_limit(first_memblock_base, > - first_memblock_size); > + if (!radix_enabled()) > + hash__setup_initial_memory_limit(first_memblock_base, > + first_memblock_size); > }
This needs to use early_radix_enabled(), it's called before jump label patching. With the jump label feature check debugging on you get a warning: Booting Linux via __start() @ 0x0000000000400000 ... [ 0.000000][ T0] Warning! mmu_has_feature() used prior to jump label init! [ 0.000000][ T0] CPU: 0 PID: 0 Comm: swapper Not tainted 5.16.0-rc2-00167-ga2397104dbef #149 [ 0.000000][ T0] Call Trace: [ 0.000000][ T0] [c000000002843e20] [c000000000894d40] dump_stack_lvl+0x74/0xa8 (unreliable) [ 0.000000][ T0] [c000000002843e60] [c000000002009a28] early_init_devtree+0x164/0x554 [ 0.000000][ T0] [c000000002843f10] [c00000000200b3d4] early_setup+0xc8/0x280 [ 0.000000][ T0] [c000000002843f90] [000000000000d368] 0xd368 Or otherwise a really obscure crash :D cheers