@@ -99,6 +99,12 @@ notrace unsigned long __init early_init(unsigned long dt_ptr)
PTRRELOC(&__stop___lwsync_fixup));
do_final_fixups();
+ /*
+ * init jump label so that cpu and mmu feature check can be optimized
+ * using jump label. We should have all the cpu/mmu features finalized
+ * by now.
+ */
+ jump_label_init();
return KERNELBASE + offset;
}
@@ -480,6 +480,12 @@ void __init setup_system(void)
do_lwsync_fixups(cur_cpu_spec->cpu_features,
&__start___lwsync_fixup, &__stop___lwsync_fixup);
do_final_fixups();
+ /*
+ * init jump label so that cpu and mmu feature check can be optimized
+ * using jump label. We should have all the cpu/mmu features finalized
+ * by now.
+ */
+ jump_label_init();
/*
* Unflatten the device-tree passed by prom_init or kexec
Call jump_label_init early so that can use static keys for cpu and mmu feature check. We should have finalzed all the cpu/mmu features when we call setup_system and we also did feature fixup for ASM based code. Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> --- arch/powerpc/kernel/setup_32.c | 6 ++++++ arch/powerpc/kernel/setup_64.c | 6 ++++++ 2 files changed, 12 insertions(+)