]> git.baikalelectronics.ru Git - kernel.git/commitdiff
s390/cpufeature: allow for facility bits
authorHeiko Carstens <hca@linux.ibm.com>
Wed, 13 Jul 2022 12:56:43 +0000 (14:56 +0200)
committerAlexander Gordeev <agordeev@linux.ibm.com>
Tue, 19 Jul 2022 14:18:49 +0000 (16:18 +0200)
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>
arch/s390/kernel/cpufeature.c

index 89c41830894d2cc43769a66438061f63eef0cf67..8b5072b335f4c56be555d0bdf2d195638335d1f3 100644 (file)
@@ -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;