Loading...
Note: File does not exist in v4.6.
1/*
2 * CPU feature definitions for module loading, used by
3 * module_cpu_feature_match(), see uapi/asm/hwcap.h for MIPS CPU features.
4 *
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.
9 */
10
11#ifndef __ASM_CPUFEATURE_H
12#define __ASM_CPUFEATURE_H
13
14#include <uapi/asm/hwcap.h>
15#include <asm/elf.h>
16
17#define MAX_CPU_FEATURES (8 * sizeof(elf_hwcap))
18
19#define cpu_feature(x) ilog2(HWCAP_ ## x)
20
21static inline bool cpu_have_feature(unsigned int num)
22{
23 return elf_hwcap & (1UL << num);
24}
25
26#endif /* __ASM_CPUFEATURE_H */