From: Dave Hansen Date: Fri, 13 Dec 2024 20:50:29 +0000 (-0800) Subject: x86/cpu: Use MWAIT leaf definition X-Git-Tag: v6.14-rc1~190^2~8 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=8bd6821c9cf3b81d3c07a94fa4e3f97a3cc7b724;p=thirdparty%2Fkernel%2Flinux.git x86/cpu: Use MWAIT leaf definition 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 Reviewed-by: Zhao Liu Link: https://lore.kernel.org/all/20241213205029.5B055D6E%40davehans-spike.ostc.intel.com --- diff --git a/arch/x86/kernel/cpu/common.c b/arch/x86/kernel/cpu/common.c index d21b352bcd720..853e373d28290 100644 --- a/arch/x86/kernel/cpu/common.c +++ b/arch/x86/kernel/cpu/common.c @@ -29,6 +29,7 @@ #include #include +#include #include #include #include @@ -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 }