[PATCH 02/11] x86/cpu: Use MWAIT leaf definition

Dave Hansen posted 11 patches 3 weeks, 4 days ago
There is a newer version of this series
[PATCH 02/11] x86/cpu: Use MWAIT leaf definition
Posted by Dave Hansen 3 weeks, 4 days ago

From: Dave Hansen <dave.hansen@linux.intel.com>

This dependency array uses hard-coded leaf numbers.  Use the new common
header definition for the MWAIT leaf.

Signed-off-by: Dave Hansen <dave.hansen@linux.intel.com>
---

 b/arch/x86/kernel/cpu/common.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff -puN arch/x86/kernel/cpu/common.c~mwait-leaf-checks-1 arch/x86/kernel/cpu/common.c
--- a/arch/x86/kernel/cpu/common.c~mwait-leaf-checks-1	2024-10-30 12:28:09.562351049 -0700
+++ b/arch/x86/kernel/cpu/common.c	2024-10-30 12:28:09.566351056 -0700
@@ -29,6 +29,7 @@
 
 #include <asm/alternative.h>
 #include <asm/cmdline.h>
+#include <asm/cpuid.h>
 #include <asm/perf_event.h>
 #include <asm/mmu_context.h>
 #include <asm/doublefault.h>
@@ -636,7 +637,7 @@ struct cpuid_dependent_feature {
 
 static const struct cpuid_dependent_feature
 cpuid_dependent_features[] = {
-	{ X86_FEATURE_MWAIT,		0x00000005 },
+	{ X86_FEATURE_MWAIT,		CPUID_MWAIT_LEAF },
 	{ X86_FEATURE_DCA,		0x00000009 },
 	{ X86_FEATURE_XSAVE,		0x0000000d },
 	{ 0, 0 }
_