2 * CPU feature definitions for module loading, used by
3 * module_cpu_feature_match(), see uapi/asm/hwcap.h for MIPS CPU features.
5 * This program is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU General Public License
7 * as published by the Free Software Foundation; either version
8 * 2 of the License, or (at your option) any later version.
11 #ifndef __ASM_CPUFEATURE_H
12 #define __ASM_CPUFEATURE_H
14 #include <uapi/asm/hwcap.h>
17 #define MAX_CPU_FEATURES (8 * sizeof(elf_hwcap))
19 #define cpu_feature(x) ilog2(HWCAP_ ## x)
21 static inline bool cpu_have_feature(unsigned int num)
23 return elf_hwcap & (1UL << num);
26 #endif /* __ASM_CPUFEATURE_H */