[Skiboot] [PATCH] core/cpufeatures: Fix setting DARN and SCV HWCAP feature bits

Nicholas Piggin npiggin at gmail.com
Thu Apr 5 15:17:42 AEST 2018


DARN and SCV has been assigned AT_HWCAP2 (32-63) bits:

#define PPC_FEATURE2_DARN               0x00200000 /* darn random number insn */
#define PPC_FEATURE2_SCV                0x00100000 /* scv syscall */

A cpufeatures-aware OS will not advertise these to userspace without
this patch.

Signed-off-by: Nicholas Piggin <npiggin at gmail.com>
---
 core/cpufeatures.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/core/cpufeatures.c b/core/cpufeatures.c
index fa946e4c..e9d2daf4 100644
--- a/core/cpufeatures.c
+++ b/core/cpufeatures.c
@@ -558,7 +558,7 @@ static const struct cpu_feature cpu_features_table[] = {
 	CPU_P9,
 	ISA_V3_0B, USABLE_OS|USABLE_PR,
 	HV_NONE, OS_CUSTOM,
-	-1, PPC_BITLSHIFT(51), -1,
+	-1, PPC_BITLSHIFT(51), 52,
 	NULL, },
 
 	/*
@@ -612,7 +612,7 @@ static const struct cpu_feature cpu_features_table[] = {
 	CPU_P9,
 	ISA_V3_0B, USABLE_HV|USABLE_OS|USABLE_PR,
 	HV_NONE, OS_NONE,
-	-1, -1, -1,
+	-1, -1, 53,
 	NULL, },
 
 	/*
-- 
2.16.3



More information about the Skiboot mailing list