2022-05-06 02:28:04

by Wyes Karny

[permalink] [raw]
Subject: [PATCH v2 3/3] x86: Fix comment for X86_FEATURE_ZEN

The feature X86_FEATURE_ZEN implies that the CPU supports Zen
microarchitecture. Call this out explicitly in the comment.

Signed-off-by: Wyes Karny <[email protected]>
---
arch/x86/include/asm/cpufeatures.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/x86/include/asm/cpufeatures.h b/arch/x86/include/asm/cpufeatures.h
index 73e643ae94b6..c851ab4e45b9 100644
--- a/arch/x86/include/asm/cpufeatures.h
+++ b/arch/x86/include/asm/cpufeatures.h
@@ -219,7 +219,7 @@
#define X86_FEATURE_IBRS ( 7*32+25) /* Indirect Branch Restricted Speculation */
#define X86_FEATURE_IBPB ( 7*32+26) /* Indirect Branch Prediction Barrier */
#define X86_FEATURE_STIBP ( 7*32+27) /* Single Thread Indirect Branch Predictors */
-#define X86_FEATURE_ZEN ( 7*32+28) /* "" CPU is AMD family 0x17 or above (Zen) */
+#define X86_FEATURE_ZEN (7*32+28) /* "" CPU supports Zen microarchitecture */
#define X86_FEATURE_L1TF_PTEINV ( 7*32+29) /* "" L1TF workaround PTE inversion */
#define X86_FEATURE_IBRS_ENHANCED ( 7*32+30) /* Enhanced IBRS */
#define X86_FEATURE_MSR_IA32_FEAT_CTL ( 7*32+31) /* "" MSR IA32_FEAT_CTL configured */
--
2.27.0



2022-05-06 12:26:35

by Dave Hansen

[permalink] [raw]
Subject: Re: [PATCH v2 3/3] x86: Fix comment for X86_FEATURE_ZEN

On 5/5/22 04:04, Wyes Karny wrote:
> The feature X86_FEATURE_ZEN implies that the CPU supports Zen
> microarchitecture. Call this out explicitly in the comment.

Is "supports" the best word here?

A CPU is based on a microarchitecture, it doesn't really support it. I
guess we could say the CPU supports a microarchitecture's *features*,
but that's a bit wordy for a tiny comment.

Maybe:

#define X86_FEATURE_ZEN (7*32+28) /* "" CPU based on Zen uarch */

or spell out "microarchitecture" if there's room.