summaryrefslogtreecommitdiff
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 946813d816bf..b7d9f530ae16 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 */