# \[PATCH for-4.8 V2 05/10\] powerpc: Call jump\_label\_init early

- From: Aneesh Kumar K.V \<hidden\>
- Date: 2016-07-23 09:13:18 
- List: linuxppc-dev
- Page: https://ratatoskr.run/linuxppc-dev/2016/07/9491485
- Thread: https://ratatoskr.run/linuxppc-dev/2016/07/9491480/t.md

```text
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 <redacted>
---
 arch/powerpc/lib/feature-fixups.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/arch/powerpc/lib/feature-fixups.c b/arch/powerpc/lib/feature-fixups.c
index defb2998b818..8b0b0b51e8aa 100644
--- a/arch/powerpc/lib/feature-fixups.c
+++ b/arch/powerpc/lib/feature-fixups.c
@@ -177,6 +177,12 @@ void apply_feature_fixups(void)
 			  &__start___fw_ftr_fixup, &__stop___fw_ftr_fixup);
 #endif
 	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();
 }
 
 #ifdef CONFIG_FTR_FIXUP_SELFTEST
-- 
2.7.4
```
