|
@@ -292,7 +292,8 @@ static const char *__cpuinit table_lookup_model(struct cpuinfo_x86 *c)
|
|
|
return NULL; /* Not found */
|
|
|
}
|
|
|
|
|
|
-__u32 cleared_cpu_caps[NCAPINTS] __cpuinitdata;
|
|
|
+__u32 cpu_caps_cleared[NCAPINTS] __cpuinitdata;
|
|
|
+__u32 cpu_caps_set[NCAPINTS] __cpuinitdata;
|
|
|
|
|
|
void load_percpu_segment(int cpu)
|
|
|
{
|
|
@@ -806,6 +807,16 @@ static void __cpuinit identify_cpu(struct cpuinfo_x86 *c)
|
|
|
#endif
|
|
|
|
|
|
init_hypervisor(c);
|
|
|
+
|
|
|
+ /*
|
|
|
+ * Clear/Set all flags overriden by options, need do it
|
|
|
+ * before following smp all cpus cap AND.
|
|
|
+ */
|
|
|
+ for (i = 0; i < NCAPINTS; i++) {
|
|
|
+ c->x86_capability[i] &= ~cpu_caps_cleared[i];
|
|
|
+ c->x86_capability[i] |= cpu_caps_set[i];
|
|
|
+ }
|
|
|
+
|
|
|
/*
|
|
|
* On SMP, boot_cpu_data holds the common feature set between
|
|
|
* all CPUs; so make sure that we indicate which features are
|
|
@@ -818,10 +829,6 @@ static void __cpuinit identify_cpu(struct cpuinfo_x86 *c)
|
|
|
boot_cpu_data.x86_capability[i] &= c->x86_capability[i];
|
|
|
}
|
|
|
|
|
|
- /* Clear all flags overriden by options */
|
|
|
- for (i = 0; i < NCAPINTS; i++)
|
|
|
- c->x86_capability[i] &= ~cleared_cpu_caps[i];
|
|
|
-
|
|
|
#ifdef CONFIG_X86_MCE
|
|
|
/* Init Machine Check Exception if available. */
|
|
|
mcheck_init(c);
|