]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
x86/cpu: Use MWAIT leaf definition
authorDave Hansen <dave.hansen@linux.intel.com>
Fri, 13 Dec 2024 20:50:29 +0000 (12:50 -0800)
committerDave Hansen <dave.hansen@linux.intel.com>
Wed, 18 Dec 2024 14:17:28 +0000 (06:17 -0800)
The leaf-to-feature 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>
Reviewed-by: Zhao Liu <zhao1.liu@intel.com>
Link: https://lore.kernel.org/all/20241213205029.5B055D6E%40davehans-spike.ostc.intel.com
arch/x86/kernel/cpu/common.c

index d21b352bcd720476cf79607b4954feac3269af0a..853e373d28290059034b63fec6c37c85f4865934 100644 (file)
@@ -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 }