diff options
Diffstat (limited to 'arch/x86_64/kernel/setup.c')
-rw-r--r-- | arch/x86_64/kernel/setup.c | 27 |
1 files changed, 14 insertions, 13 deletions
diff --git a/arch/x86_64/kernel/setup.c b/arch/x86_64/kernel/setup.c index 238f73e1a834..cb28df14ff6f 100644 --- a/arch/x86_64/kernel/setup.c +++ b/arch/x86_64/kernel/setup.c | |||
@@ -831,8 +831,6 @@ static void __init amd_detect_cmp(struct cpuinfo_x86 *c) | |||
831 | #endif | 831 | #endif |
832 | } | 832 | } |
833 | 833 | ||
834 | #define HWCR 0xc0010015 | ||
835 | |||
836 | static int __init init_amd(struct cpuinfo_x86 *c) | 834 | static int __init init_amd(struct cpuinfo_x86 *c) |
837 | { | 835 | { |
838 | int r; | 836 | int r; |
@@ -841,14 +839,18 @@ static int __init init_amd(struct cpuinfo_x86 *c) | |||
841 | #ifdef CONFIG_SMP | 839 | #ifdef CONFIG_SMP |
842 | unsigned long value; | 840 | unsigned long value; |
843 | 841 | ||
844 | // Disable TLB flush filter by setting HWCR.FFDIS: | 842 | /* |
845 | // bit 6 of msr C001_0015 | 843 | * Disable TLB flush filter by setting HWCR.FFDIS on K8 |
846 | // | 844 | * bit 6 of msr C001_0015 |
847 | // Errata 63 for SH-B3 steppings | 845 | * |
848 | // Errata 122 for all(?) steppings | 846 | * Errata 63 for SH-B3 steppings |
849 | rdmsrl(HWCR, value); | 847 | * Errata 122 for all steppings (F+ have it disabled by default) |
850 | value |= 1 << 6; | 848 | */ |
851 | wrmsrl(HWCR, value); | 849 | if (c->x86 == 15) { |
850 | rdmsrl(MSR_K8_HWCR, value); | ||
851 | value |= 1 << 6; | ||
852 | wrmsrl(MSR_K8_HWCR, value); | ||
853 | } | ||
852 | #endif | 854 | #endif |
853 | 855 | ||
854 | /* Bit 31 in normal CPUID used for nonstandard 3DNow ID; | 856 | /* Bit 31 in normal CPUID used for nonstandard 3DNow ID; |
@@ -965,13 +967,12 @@ static int __cpuinit intel_num_cpu_cores(struct cpuinfo_x86 *c) | |||
965 | static void srat_detect_node(void) | 967 | static void srat_detect_node(void) |
966 | { | 968 | { |
967 | #ifdef CONFIG_NUMA | 969 | #ifdef CONFIG_NUMA |
968 | unsigned apicid, node; | 970 | unsigned node; |
969 | int cpu = smp_processor_id(); | 971 | int cpu = smp_processor_id(); |
970 | 972 | ||
971 | /* Don't do the funky fallback heuristics the AMD version employs | 973 | /* Don't do the funky fallback heuristics the AMD version employs |
972 | for now. */ | 974 | for now. */ |
973 | apicid = phys_proc_id[cpu]; | 975 | node = apicid_to_node[hard_smp_processor_id()]; |
974 | node = apicid_to_node[apicid]; | ||
975 | if (node == NUMA_NO_NODE) | 976 | if (node == NUMA_NO_NODE) |
976 | node = 0; | 977 | node = 0; |
977 | cpu_to_node[cpu] = node; | 978 | cpu_to_node[cpu] = node; |