aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/cpu/common.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2009-06-11 11:55:42 -0400
committerIngo Molnar <mingo@elte.hu>2009-06-11 11:55:42 -0400
commit940010c5a314a7bd9b498593bc6ba1718ac5aec5 (patch)
treed141e08ced08c40c6a8e3ab2cdecde5ff14e560f /arch/x86/kernel/cpu/common.c
parent8dc8e5e8bc0ce00b0f656bf972f67cd8a72759e5 (diff)
parent991ec02cdca33b03a132a0cacfe6f0aa0be9aa8d (diff)
Merge branch 'linus' into perfcounters/core
Conflicts: arch/x86/kernel/irqinit.c arch/x86/kernel/irqinit_64.c arch/x86/kernel/traps.c arch/x86/mm/fault.c include/linux/sched.h kernel/exit.c
Diffstat (limited to 'arch/x86/kernel/cpu/common.c')
-rw-r--r--arch/x86/kernel/cpu/common.c23
1 files changed, 18 insertions, 5 deletions
diff --git a/arch/x86/kernel/cpu/common.c b/arch/x86/kernel/cpu/common.c
index f60409081cb0..3ffdcfa9abdf 100644
--- a/arch/x86/kernel/cpu/common.c
+++ b/arch/x86/kernel/cpu/common.c
@@ -300,7 +300,8 @@ static const char *__cpuinit table_lookup_model(struct cpuinfo_x86 *c)
300 return NULL; /* Not found */ 300 return NULL; /* Not found */
301} 301}
302 302
303__u32 cleared_cpu_caps[NCAPINTS] __cpuinitdata; 303__u32 cpu_caps_cleared[NCAPINTS] __cpuinitdata;
304__u32 cpu_caps_set[NCAPINTS] __cpuinitdata;
304 305
305void load_percpu_segment(int cpu) 306void load_percpu_segment(int cpu)
306{ 307{
@@ -769,6 +770,12 @@ static void __cpuinit identify_cpu(struct cpuinfo_x86 *c)
769 if (this_cpu->c_identify) 770 if (this_cpu->c_identify)
770 this_cpu->c_identify(c); 771 this_cpu->c_identify(c);
771 772
773 /* Clear/Set all flags overriden by options, after probe */
774 for (i = 0; i < NCAPINTS; i++) {
775 c->x86_capability[i] &= ~cpu_caps_cleared[i];
776 c->x86_capability[i] |= cpu_caps_set[i];
777 }
778
772#ifdef CONFIG_X86_64 779#ifdef CONFIG_X86_64
773 c->apicid = apic->phys_pkg_id(c->initial_apicid, 0); 780 c->apicid = apic->phys_pkg_id(c->initial_apicid, 0);
774#endif 781#endif
@@ -814,6 +821,16 @@ static void __cpuinit identify_cpu(struct cpuinfo_x86 *c)
814#endif 821#endif
815 822
816 init_hypervisor(c); 823 init_hypervisor(c);
824
825 /*
826 * Clear/Set all flags overriden by options, need do it
827 * before following smp all cpus cap AND.
828 */
829 for (i = 0; i < NCAPINTS; i++) {
830 c->x86_capability[i] &= ~cpu_caps_cleared[i];
831 c->x86_capability[i] |= cpu_caps_set[i];
832 }
833
817 /* 834 /*
818 * On SMP, boot_cpu_data holds the common feature set between 835 * On SMP, boot_cpu_data holds the common feature set between
819 * all CPUs; so make sure that we indicate which features are 836 * all CPUs; so make sure that we indicate which features are
@@ -826,10 +843,6 @@ static void __cpuinit identify_cpu(struct cpuinfo_x86 *c)
826 boot_cpu_data.x86_capability[i] &= c->x86_capability[i]; 843 boot_cpu_data.x86_capability[i] &= c->x86_capability[i];
827 } 844 }
828 845
829 /* Clear all flags overriden by options */
830 for (i = 0; i < NCAPINTS; i++)
831 c->x86_capability[i] &= ~cleared_cpu_caps[i];
832
833#ifdef CONFIG_X86_MCE 846#ifdef CONFIG_X86_MCE
834 /* Init Machine Check Exception if available. */ 847 /* Init Machine Check Exception if available. */
835 mcheck_init(c); 848 mcheck_init(c);