Skip to content
This repository was archived by the owner on Nov 8, 2023. It is now read-only.

Commit 7f274e6

Browse files
sandip4nIngo Molnar
authored andcommitted
x86/cpufeatures: Add new word for scattered features
Add a new word for scattered features because all free bits among the existing Linux-defined auxiliary flags have been exhausted. Signed-off-by: Sandipan Das <sandipan.das@amd.com> Signed-off-by: Ingo Molnar <mingo@kernel.org> Link: https://lore.kernel.org/r/8380d2a0da469a1f0ad75b8954a79fb689599ff6.1711091584.git.sandipan.das@amd.com
1 parent 4cece76 commit 7f274e6

File tree

4 files changed

+9
-5
lines changed

4 files changed

+9
-5
lines changed

arch/x86/include/asm/cpufeature.h

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,8 +91,9 @@ extern const char * const x86_bug_flags[NBUGINTS*32];
9191
CHECK_BIT_IN_MASK_WORD(REQUIRED_MASK, 18, feature_bit) || \
9292
CHECK_BIT_IN_MASK_WORD(REQUIRED_MASK, 19, feature_bit) || \
9393
CHECK_BIT_IN_MASK_WORD(REQUIRED_MASK, 20, feature_bit) || \
94+
CHECK_BIT_IN_MASK_WORD(REQUIRED_MASK, 21, feature_bit) || \
9495
REQUIRED_MASK_CHECK || \
95-
BUILD_BUG_ON_ZERO(NCAPINTS != 21))
96+
BUILD_BUG_ON_ZERO(NCAPINTS != 22))
9697

9798
#define DISABLED_MASK_BIT_SET(feature_bit) \
9899
( CHECK_BIT_IN_MASK_WORD(DISABLED_MASK, 0, feature_bit) || \
@@ -116,8 +117,9 @@ extern const char * const x86_bug_flags[NBUGINTS*32];
116117
CHECK_BIT_IN_MASK_WORD(DISABLED_MASK, 18, feature_bit) || \
117118
CHECK_BIT_IN_MASK_WORD(DISABLED_MASK, 19, feature_bit) || \
118119
CHECK_BIT_IN_MASK_WORD(DISABLED_MASK, 20, feature_bit) || \
120+
CHECK_BIT_IN_MASK_WORD(DISABLED_MASK, 21, feature_bit) || \
119121
DISABLED_MASK_CHECK || \
120-
BUILD_BUG_ON_ZERO(NCAPINTS != 21))
122+
BUILD_BUG_ON_ZERO(NCAPINTS != 22))
121123

122124
#define cpu_has(c, bit) \
123125
(__builtin_constant_p(bit) && REQUIRED_MASK_BIT_SET(bit) ? 1 : \

arch/x86/include/asm/cpufeatures.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
/*
1414
* Defines x86 CPU feature bits
1515
*/
16-
#define NCAPINTS 21 /* N 32-bit words worth of info */
16+
#define NCAPINTS 22 /* N 32-bit words worth of info */
1717
#define NBUGINTS 2 /* N 32-bit bug flags */
1818

1919
/*

arch/x86/include/asm/disabled-features.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,7 @@
155155
#define DISABLED_MASK18 (DISABLE_IBT)
156156
#define DISABLED_MASK19 (DISABLE_SEV_SNP)
157157
#define DISABLED_MASK20 0
158-
#define DISABLED_MASK_CHECK BUILD_BUG_ON_ZERO(NCAPINTS != 21)
158+
#define DISABLED_MASK21 0
159+
#define DISABLED_MASK_CHECK BUILD_BUG_ON_ZERO(NCAPINTS != 22)
159160

160161
#endif /* _ASM_X86_DISABLED_FEATURES_H */

arch/x86/include/asm/required-features.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,7 @@
9999
#define REQUIRED_MASK18 0
100100
#define REQUIRED_MASK19 0
101101
#define REQUIRED_MASK20 0
102-
#define REQUIRED_MASK_CHECK BUILD_BUG_ON_ZERO(NCAPINTS != 21)
102+
#define REQUIRED_MASK21 0
103+
#define REQUIRED_MASK_CHECK BUILD_BUG_ON_ZERO(NCAPINTS != 22)
103104

104105
#endif /* _ASM_X86_REQUIRED_FEATURES_H */

0 commit comments

Comments
 (0)