lkml.org 
[lkml]   [2022]   [Jul]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 2/3] s390/cpufeature: allow for facility bits
Date
From: Heiko Carstens <hca@linux.ibm.com>

Allow for facility bits to be used in cpu features.

Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
---
arch/s390/kernel/cpufeature.c | 3 +++
1 file changed, 3 insertions(+)

diff --git a/arch/s390/kernel/cpufeature.c b/arch/s390/kernel/cpufeature.c
index ea4bbfd855db..e70b29804db4 100644
--- a/arch/s390/kernel/cpufeature.c
+++ b/arch/s390/kernel/cpufeature.c
@@ -10,6 +10,7 @@

enum {
TYPE_HWCAP,
+ TYPE_FACILITY,
};

struct s390_cpu_feature {
@@ -54,6 +55,8 @@ int cpu_have_feature(unsigned int num)
switch (feature->type) {
case TYPE_HWCAP:
return !!(elf_hwcap & (1UL << feature->num));
+ case TYPE_FACILITY:
+ return test_facility(feature->num);
default:
WARN_ON_ONCE(1);
return 0;
--
2.35.3
\
 
 \ /
  Last update: 2022-07-12 12:54    [W:0.129 / U:0.252 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site