summaryrefslogtreecommitdiffstats
path: root/arch/powerpc/include/asm/cputable.h
diff options
context:
space:
mode:
authorMichael Ellerman <mpe@ellerman.id.au>2016-07-27 12:48:36 +0200
committerMichael Ellerman <mpe@ellerman.id.au>2016-08-01 03:15:00 +0200
commita141cca3892bb391d17a73dae917ad51d40ff69a (patch)
tree63a5057ac076031298f8da2499a5ba7301cfcf1d /arch/powerpc/include/asm/cputable.h
parentpowerpc/mm: Define radix_enabled() in one place & use static inline (diff)
downloadlinux-a141cca3892bb391d17a73dae917ad51d40ff69a.tar.xz
linux-a141cca3892bb391d17a73dae917ad51d40ff69a.zip
powerpc/mm: Add early_[cpu|mmu]_has_feature()
In later patches, we will be switching CPU and MMU feature checks to use static keys. For checks in early boot before jump label is initialized we need a variant of [cpu|mmu]_has_feature() that doesn't use jump labels. So create those called, unimaginatively, early_[cpu|mmu]_has_feature(). Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Diffstat (limited to 'arch/powerpc/include/asm/cputable.h')
-rw-r--r--arch/powerpc/include/asm/cputable.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/arch/powerpc/include/asm/cputable.h b/arch/powerpc/include/asm/cputable.h
index 7bb87017d9db..3d8dc9a7831d 100644
--- a/arch/powerpc/include/asm/cputable.h
+++ b/arch/powerpc/include/asm/cputable.h
@@ -577,12 +577,17 @@ enum {
};
#endif /* __powerpc64__ */
-static inline bool cpu_has_feature(unsigned long feature)
+static inline bool early_cpu_has_feature(unsigned long feature)
{
return !!((CPU_FTRS_ALWAYS & feature) ||
(CPU_FTRS_POSSIBLE & cur_cpu_spec->cpu_features & feature));
}
+static inline bool cpu_has_feature(unsigned long feature)
+{
+ return early_cpu_has_feature(feature);
+}
+
#define HBP_NUM 1
#endif /* !__ASSEMBLY__ */