diff options
author | Ingo Molnar <mingo@elte.hu> | 2009-06-01 16:29:35 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-06-01 16:30:01 -0400 |
commit | ee4c24a5c9b530481394132c8dbc10572d57c075 (patch) | |
tree | 91c580724b9de9f2ae09bb375fc33f4df24b55c0 | |
parent | 3d58f48ba05caed9118bce62b3047f8683438835 (diff) | |
parent | 3e0c373749d7eb5b354ac0b043f2b2cdf84eefef (diff) |
Merge branch 'x86/cpufeature' into irq/numa
Merge reason: irq/numa didnt build because this commit:
2759c32: x86: don't call read_apic_id if !cpu_has_apic
Had a dependency on x86/cpufeature changes. Pull in that
(small) branch to fix the dependency.
Signed-off-by: Ingo Molnar <mingo@elte.hu>
-rw-r--r-- | arch/x86/include/asm/cpufeature.h | 6 | ||||
-rw-r--r-- | arch/x86/include/asm/processor.h | 3 | ||||
-rw-r--r-- | arch/x86/kernel/cpu/common.c | 17 |
3 files changed, 17 insertions, 9 deletions
diff --git a/arch/x86/include/asm/cpufeature.h b/arch/x86/include/asm/cpufeature.h index bb83b1c397aa..13cc6a503a02 100644 --- a/arch/x86/include/asm/cpufeature.h +++ b/arch/x86/include/asm/cpufeature.h | |||
@@ -22,7 +22,7 @@ | |||
22 | #define X86_FEATURE_TSC (0*32+ 4) /* Time Stamp Counter */ | 22 | #define X86_FEATURE_TSC (0*32+ 4) /* Time Stamp Counter */ |
23 | #define X86_FEATURE_MSR (0*32+ 5) /* Model-Specific Registers */ | 23 | #define X86_FEATURE_MSR (0*32+ 5) /* Model-Specific Registers */ |
24 | #define X86_FEATURE_PAE (0*32+ 6) /* Physical Address Extensions */ | 24 | #define X86_FEATURE_PAE (0*32+ 6) /* Physical Address Extensions */ |
25 | #define X86_FEATURE_MCE (0*32+ 7) /* Machine Check Architecture */ | 25 | #define X86_FEATURE_MCE (0*32+ 7) /* Machine Check Exception */ |
26 | #define X86_FEATURE_CX8 (0*32+ 8) /* CMPXCHG8 instruction */ | 26 | #define X86_FEATURE_CX8 (0*32+ 8) /* CMPXCHG8 instruction */ |
27 | #define X86_FEATURE_APIC (0*32+ 9) /* Onboard APIC */ | 27 | #define X86_FEATURE_APIC (0*32+ 9) /* Onboard APIC */ |
28 | #define X86_FEATURE_SEP (0*32+11) /* SYSENTER/SYSEXIT */ | 28 | #define X86_FEATURE_SEP (0*32+11) /* SYSENTER/SYSEXIT */ |
@@ -192,11 +192,11 @@ extern const char * const x86_power_flags[32]; | |||
192 | #define clear_cpu_cap(c, bit) clear_bit(bit, (unsigned long *)((c)->x86_capability)) | 192 | #define clear_cpu_cap(c, bit) clear_bit(bit, (unsigned long *)((c)->x86_capability)) |
193 | #define setup_clear_cpu_cap(bit) do { \ | 193 | #define setup_clear_cpu_cap(bit) do { \ |
194 | clear_cpu_cap(&boot_cpu_data, bit); \ | 194 | clear_cpu_cap(&boot_cpu_data, bit); \ |
195 | set_bit(bit, (unsigned long *)cleared_cpu_caps); \ | 195 | set_bit(bit, (unsigned long *)cpu_caps_cleared); \ |
196 | } while (0) | 196 | } while (0) |
197 | #define setup_force_cpu_cap(bit) do { \ | 197 | #define setup_force_cpu_cap(bit) do { \ |
198 | set_cpu_cap(&boot_cpu_data, bit); \ | 198 | set_cpu_cap(&boot_cpu_data, bit); \ |
199 | clear_bit(bit, (unsigned long *)cleared_cpu_caps); \ | 199 | set_bit(bit, (unsigned long *)cpu_caps_set); \ |
200 | } while (0) | 200 | } while (0) |
201 | 201 | ||
202 | #define cpu_has_fpu boot_cpu_has(X86_FEATURE_FPU) | 202 | #define cpu_has_fpu boot_cpu_has(X86_FEATURE_FPU) |
diff --git a/arch/x86/include/asm/processor.h b/arch/x86/include/asm/processor.h index c2cceae709c8..fed93fec9764 100644 --- a/arch/x86/include/asm/processor.h +++ b/arch/x86/include/asm/processor.h | |||
@@ -135,7 +135,8 @@ extern struct cpuinfo_x86 boot_cpu_data; | |||
135 | extern struct cpuinfo_x86 new_cpu_data; | 135 | extern struct cpuinfo_x86 new_cpu_data; |
136 | 136 | ||
137 | extern struct tss_struct doublefault_tss; | 137 | extern struct tss_struct doublefault_tss; |
138 | extern __u32 cleared_cpu_caps[NCAPINTS]; | 138 | extern __u32 cpu_caps_cleared[NCAPINTS]; |
139 | extern __u32 cpu_caps_set[NCAPINTS]; | ||
139 | 140 | ||
140 | #ifdef CONFIG_SMP | 141 | #ifdef CONFIG_SMP |
141 | DECLARE_PER_CPU_SHARED_ALIGNED(struct cpuinfo_x86, cpu_info); | 142 | DECLARE_PER_CPU_SHARED_ALIGNED(struct cpuinfo_x86, cpu_info); |
diff --git a/arch/x86/kernel/cpu/common.c b/arch/x86/kernel/cpu/common.c index c2fa56a3ae13..b0517aa2bd3b 100644 --- a/arch/x86/kernel/cpu/common.c +++ b/arch/x86/kernel/cpu/common.c | |||
@@ -299,7 +299,8 @@ static const char *__cpuinit table_lookup_model(struct cpuinfo_x86 *c) | |||
299 | return NULL; /* Not found */ | 299 | return NULL; /* Not found */ |
300 | } | 300 | } |
301 | 301 | ||
302 | __u32 cleared_cpu_caps[NCAPINTS] __cpuinitdata; | 302 | __u32 cpu_caps_cleared[NCAPINTS] __cpuinitdata; |
303 | __u32 cpu_caps_set[NCAPINTS] __cpuinitdata; | ||
303 | 304 | ||
304 | void load_percpu_segment(int cpu) | 305 | void load_percpu_segment(int cpu) |
305 | { | 306 | { |
@@ -819,6 +820,16 @@ static void __cpuinit identify_cpu(struct cpuinfo_x86 *c) | |||
819 | #endif | 820 | #endif |
820 | 821 | ||
821 | init_hypervisor(c); | 822 | init_hypervisor(c); |
823 | |||
824 | /* | ||
825 | * Clear/Set all flags overriden by options, need do it | ||
826 | * before following smp all cpus cap AND. | ||
827 | */ | ||
828 | for (i = 0; i < NCAPINTS; i++) { | ||
829 | c->x86_capability[i] &= ~cpu_caps_cleared[i]; | ||
830 | c->x86_capability[i] |= cpu_caps_set[i]; | ||
831 | } | ||
832 | |||
822 | /* | 833 | /* |
823 | * On SMP, boot_cpu_data holds the common feature set between | 834 | * On SMP, boot_cpu_data holds the common feature set between |
824 | * all CPUs; so make sure that we indicate which features are | 835 | * all CPUs; so make sure that we indicate which features are |
@@ -831,10 +842,6 @@ static void __cpuinit identify_cpu(struct cpuinfo_x86 *c) | |||
831 | boot_cpu_data.x86_capability[i] &= c->x86_capability[i]; | 842 | boot_cpu_data.x86_capability[i] &= c->x86_capability[i]; |
832 | } | 843 | } |
833 | 844 | ||
834 | /* Clear all flags overriden by options */ | ||
835 | for (i = 0; i < NCAPINTS; i++) | ||
836 | c->x86_capability[i] &= ~cleared_cpu_caps[i]; | ||
837 | |||
838 | #ifdef CONFIG_X86_MCE | 845 | #ifdef CONFIG_X86_MCE |
839 | /* Init Machine Check Exception if available. */ | 846 | /* Init Machine Check Exception if available. */ |
840 | mcheck_init(c); | 847 | mcheck_init(c); |