Skip to content

Commit

Permalink
core/cpufeatures: Fix setting DARN and SCV HWCAP feature bits
Browse files Browse the repository at this point in the history
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@gmail.com>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
  • Loading branch information
npiggin authored and stewartsmith committed Apr 5, 2018
1 parent cfe9d44 commit e0c7c89
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions core/cpufeatures.c
Original file line number Diff line number Diff line change
Expand Up @@ -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, },

/*
Expand Down Expand Up @@ -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, },

/*
Expand Down

0 comments on commit e0c7c89

Please sign in to comment.