powerpc: Move cpu_has_feature() to a separate file
[cascardo/linux.git] / arch / powerpc / include / asm / cpu_has_feature.h
1 #ifndef __ASM_POWERPC_CPUFEATURES_H
2 #define __ASM_POWERPC_CPUFEATURES_H
3
4 #ifndef __ASSEMBLY__
5
6 #include <asm/cputable.h>
7
8 static inline bool early_cpu_has_feature(unsigned long feature)
9 {
10         return !!((CPU_FTRS_ALWAYS & feature) ||
11                   (CPU_FTRS_POSSIBLE & cur_cpu_spec->cpu_features & feature));
12 }
13
14 static inline bool cpu_has_feature(unsigned long feature)
15 {
16         return early_cpu_has_feature(feature);
17 }
18
19 #endif /* __ASSEMBLY__ */
20 #endif /* __ASM_POWERPC_CPUFEATURE_H */