irqchip: Fix dependencies for archs w/o HAS_IOMEM
[linux/fpc-iii.git] / arch / s390 / include / asm / cpufeature.h
blobfa7e69b7c299767e6fdf68d2e8767a56ab8cd293
1 /*
2 * Module interface for CPU features
4 * Copyright IBM Corp. 2015
5 * Author(s): Hendrik Brueckner <brueckner@linux.vnet.ibm.com>
6 */
8 #ifndef __ASM_S390_CPUFEATURE_H
9 #define __ASM_S390_CPUFEATURE_H
11 #include <asm/elf.h>
13 /* Hardware features on Linux on z Systems are indicated by facility bits that
14 * are mapped to the so-called machine flags. Particular machine flags are
15 * then used to define ELF hardware capabilities; most notably hardware flags
16 * that are essential for user space / glibc.
18 * Restrict the set of exposed CPU features to ELF hardware capabilities for
19 * now. Additional machine flags can be indicated by values larger than
20 * MAX_ELF_HWCAP_FEATURES.
22 #define MAX_ELF_HWCAP_FEATURES (8 * sizeof(elf_hwcap))
23 #define MAX_CPU_FEATURES MAX_ELF_HWCAP_FEATURES
25 #define cpu_feature(feat) ilog2(HWCAP_S390_ ## feat)
27 int cpu_have_feature(unsigned int nr);
29 #endif /* __ASM_S390_CPUFEATURE_H */