summaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/cpu/cpuid-deps.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/x86/kernel/cpu/cpuid-deps.c')
-rw-r--r--arch/x86/kernel/cpu/cpuid-deps.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/x86/kernel/cpu/cpuid-deps.c b/arch/x86/kernel/cpu/cpuid-deps.c
index b7174209d855..5dd427c6feb2 100644
--- a/arch/x86/kernel/cpu/cpuid-deps.c
+++ b/arch/x86/kernel/cpu/cpuid-deps.c
@@ -114,6 +114,9 @@ static void do_clear_cpu_cap(struct cpuinfo_x86 *c, unsigned int feature)
if (WARN_ON(feature >= MAX_FEATURE_BITS))
return;
+ if (boot_cpu_has(feature))
+ WARN_ON(alternatives_patched);
+
clear_feature(c, feature);
/* Collect all features to disable, handling dependencies */