treewide: remove redundant IS_ERR() before error code check
[linux/fpc-iii.git] / arch / s390 / include / asm / cpufeature.h
blob1d007c6ede954b609a350a28db5a52e11099aca5
1 /* SPDX-License-Identifier: GPL-2.0 */
2 /*
3 * Module interface for CPU features
5 * Copyright IBM Corp. 2015
6 * Author(s): Hendrik Brueckner <brueckner@linux.vnet.ibm.com>
7 */
9 #ifndef __ASM_S390_CPUFEATURE_H
10 #define __ASM_S390_CPUFEATURE_H
12 #include <asm/elf.h>
14 /* Hardware features on Linux on z Systems are indicated by facility bits that
15 * are mapped to the so-called machine flags. Particular machine flags are
16 * then used to define ELF hardware capabilities; most notably hardware flags
17 * that are essential for user space / glibc.
19 * Restrict the set of exposed CPU features to ELF hardware capabilities for
20 * now. Additional machine flags can be indicated by values larger than
21 * MAX_ELF_HWCAP_FEATURES.
23 #define MAX_ELF_HWCAP_FEATURES (8 * sizeof(elf_hwcap))
24 #define MAX_CPU_FEATURES MAX_ELF_HWCAP_FEATURES
26 #define cpu_feature(feat) ilog2(HWCAP_S390_ ## feat)
28 int cpu_have_feature(unsigned int nr);
30 #endif /* __ASM_S390_CPUFEATURE_H */