diff options
| author | Robert Richter <robert.richter@amd.com> | 2010-10-25 10:28:14 -0400 | 
|---|---|---|
| committer | Robert Richter <robert.richter@amd.com> | 2010-10-25 10:29:12 -0400 | 
| commit | dbd1e66e04558a582e673bc4a9cd933ce0228d93 (patch) | |
| tree | 85f3633276282cde0a3ac558d988704eaa3e68af /arch/x86/kernel/cpu/common.c | |
| parent | 328b8f1ba50b708a1b3c0acd7c41ee1b356822f6 (diff) | |
| parent | 4a60cfa9457749f7987fd4f3c956dbba5a281129 (diff) | |
Merge commit 'linux-2.6/master' (early part) into oprofile/core
This branch depends on these apic patches:
      apic, x86: Use BIOS settings for IBS and MCE threshold interrupt LVT offsets
      apic, x86: Check if EILVT APIC registers are available (AMD only)
Signed-off-by: Robert Richter <robert.richter@amd.com>
Diffstat (limited to 'arch/x86/kernel/cpu/common.c')
| -rw-r--r-- | arch/x86/kernel/cpu/common.c | 24 | 
1 files changed, 11 insertions, 13 deletions
| diff --git a/arch/x86/kernel/cpu/common.c b/arch/x86/kernel/cpu/common.c index f2f9ac7da25c..4b68bda30938 100644 --- a/arch/x86/kernel/cpu/common.c +++ b/arch/x86/kernel/cpu/common.c | |||
| @@ -665,7 +665,7 @@ static void __init early_identify_cpu(struct cpuinfo_x86 *c) | |||
| 665 | this_cpu->c_early_init(c); | 665 | this_cpu->c_early_init(c); | 
| 666 | 666 | ||
| 667 | #ifdef CONFIG_SMP | 667 | #ifdef CONFIG_SMP | 
| 668 | c->cpu_index = boot_cpu_id; | 668 | c->cpu_index = 0; | 
| 669 | #endif | 669 | #endif | 
| 670 | filter_cpuid_features(c, false); | 670 | filter_cpuid_features(c, false); | 
| 671 | } | 671 | } | 
| @@ -704,16 +704,21 @@ void __init early_cpu_init(void) | |||
| 704 | } | 704 | } | 
| 705 | 705 | ||
| 706 | /* | 706 | /* | 
| 707 | * The NOPL instruction is supposed to exist on all CPUs with | 707 | * The NOPL instruction is supposed to exist on all CPUs of family >= 6; | 
| 708 | * family >= 6; unfortunately, that's not true in practice because | 708 | * unfortunately, that's not true in practice because of early VIA | 
| 709 | * of early VIA chips and (more importantly) broken virtualizers that | 709 | * chips and (more importantly) broken virtualizers that are not easy | 
| 710 | * are not easy to detect. In the latter case it doesn't even *fail* | 710 | * to detect. In the latter case it doesn't even *fail* reliably, so | 
| 711 | * reliably, so probing for it doesn't even work. Disable it completely | 711 | * probing for it doesn't even work. Disable it completely on 32-bit | 
| 712 | * unless we can find a reliable way to detect all the broken cases. | 712 | * unless we can find a reliable way to detect all the broken cases. | 
| 713 | * Enable it explicitly on 64-bit for non-constant inputs of cpu_has(). | ||
| 713 | */ | 714 | */ | 
| 714 | static void __cpuinit detect_nopl(struct cpuinfo_x86 *c) | 715 | static void __cpuinit detect_nopl(struct cpuinfo_x86 *c) | 
| 715 | { | 716 | { | 
| 717 | #ifdef CONFIG_X86_32 | ||
| 716 | clear_cpu_cap(c, X86_FEATURE_NOPL); | 718 | clear_cpu_cap(c, X86_FEATURE_NOPL); | 
| 719 | #else | ||
| 720 | set_cpu_cap(c, X86_FEATURE_NOPL); | ||
| 721 | #endif | ||
| 717 | } | 722 | } | 
| 718 | 723 | ||
| 719 | static void __cpuinit generic_identify(struct cpuinfo_x86 *c) | 724 | static void __cpuinit generic_identify(struct cpuinfo_x86 *c) | 
| @@ -1264,13 +1269,6 @@ void __cpuinit cpu_init(void) | |||
| 1264 | clear_all_debug_regs(); | 1269 | clear_all_debug_regs(); | 
| 1265 | dbg_restore_debug_regs(); | 1270 | dbg_restore_debug_regs(); | 
| 1266 | 1271 | ||
| 1267 | /* | ||
| 1268 | * Force FPU initialization: | ||
| 1269 | */ | ||
| 1270 | current_thread_info()->status = 0; | ||
| 1271 | clear_used_math(); | ||
| 1272 | mxcsr_feature_mask_init(); | ||
| 1273 | |||
| 1274 | fpu_init(); | 1272 | fpu_init(); | 
| 1275 | xsave_init(); | 1273 | xsave_init(); | 
| 1276 | } | 1274 | } | 
