Skip to content

Commit 8bd6821

Browse files
committed
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 <[email protected]> Reviewed-by: Zhao Liu <[email protected]> Link: https://lore.kernel.org/all/20241213205029.5B055D6E%40davehans-spike.ostc.intel.com
1 parent 497f702 commit 8bd6821

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

arch/x86/kernel/cpu/common.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929

3030
#include <asm/alternative.h>
3131
#include <asm/cmdline.h>
32+
#include <asm/cpuid.h>
3233
#include <asm/perf_event.h>
3334
#include <asm/mmu_context.h>
3435
#include <asm/doublefault.h>
@@ -636,7 +637,7 @@ struct cpuid_dependent_feature {
636637

637638
static const struct cpuid_dependent_feature
638639
cpuid_dependent_features[] = {
639-
{ X86_FEATURE_MWAIT, 0x00000005 },
640+
{ X86_FEATURE_MWAIT, CPUID_MWAIT_LEAF },
640641
{ X86_FEATURE_DCA, 0x00000009 },
641642
{ X86_FEATURE_XSAVE, 0x0000000d },
642643
{ 0, 0 }

0 commit comments

Comments
 (0)