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>
This commit is contained in:
parent
0a5f9b382c
commit
e2f39c9f54
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue