diff options
author | Heiko Carstens <hca@linux.ibm.com> | 2022-07-13 14:56:43 +0200 |
---|---|---|
committer | Alexander Gordeev <agordeev@linux.ibm.com> | 2022-07-19 16:18:49 +0200 |
commit | e2f39c9f547c88efd208f67a9ecacc1d78bf30a4 (patch) | |
tree | 5bc4e9bf8baf205b86fca7a9044f7a9db29447fd /arch/s390/kernel | |
parent | 0a5f9b382c6131381f9f2ed64ae6fdd994328d0d (diff) |
s390/cpufeature: allow for facility bits
Allow for facility bits to be used in cpu features.
Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
Reviewed-by: Claudio Imbrenda <imbrenda@linux.ibm.com>
Reviewed-by: Steffen Eiden <seiden@linux.ibm.com>
Link: https://lore.kernel.org/r/20220713125644.16121-3-seiden@linux.ibm.com
Signed-off-by: Alexander Gordeev <agordeev@linux.ibm.com>
Diffstat (limited to 'arch/s390/kernel')
-rw-r--r-- | arch/s390/kernel/cpufeature.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/s390/kernel/cpufeature.c b/arch/s390/kernel/cpufeature.c index 89c41830894d..8b5072b335f4 100644 --- a/arch/s390/kernel/cpufeature.c +++ b/arch/s390/kernel/cpufeature.c @@ -9,6 +9,7 @@ enum { TYPE_HWCAP, + TYPE_FACILITY, }; struct s390_cpu_feature { @@ -34,6 +35,8 @@ int cpu_have_feature(unsigned int num) switch (feature->type) { case TYPE_HWCAP: return !!(elf_hwcap & BIT(feature->num)); + case TYPE_FACILITY: + return test_facility(feature->num); default: WARN_ON_ONCE(1); return 0; |