powerpc: Call jump_label_init() in apply_feature_fixups()
authorAneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Sat, 23 Jul 2016 09:12:38 +0000 (14:42 +0530)
committerMichael Ellerman <mpe@ellerman.id.au>
Mon, 1 Aug 2016 01:15:02 +0000 (11:15 +1000)
Call jump_label_init() early so that we can use static keys for CPU and
MMU feature checks.

Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
arch/powerpc/lib/feature-fixups.c

index 59c7caee05b2b9fbb9b91a395794378b88e6094a..ae57de78e2aa7ff284bf62fc00b059a8cdc52451 100644 (file)
@@ -13,6 +13,7 @@
  */
 
 #include <linux/types.h>
+#include <linux/jump_label.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
 #include <linux/init.h>
@@ -187,6 +188,13 @@ void __init apply_feature_fixups(void)
                          &__start___fw_ftr_fixup, &__stop___fw_ftr_fixup);
 #endif
        do_final_fixups();
+
+       /*
+        * Initialise jump label. This causes all the cpu/mmu_has_feature()
+        * checks to take on their correct polarity based on the current set of
+        * CPU/MMU features.
+        */
+       jump_label_init();
 }
 
 static int __init check_features(void)