]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/blobdiff - arch/x86/kernel/cpu/amd.c
x86: Use hard_smp_processor_id() to get apic id for AMD K8 cpus
[mirror_ubuntu-artful-kernel.git] / arch / x86 / kernel / cpu / amd.c
index a76d2c18f150e999c459ff38993117b35090d67c..e1600c775e1d2f4665fe37b5079c2574597bcc82 100644 (file)
@@ -336,7 +336,7 @@ static void __cpuinit srat_detect_node(struct cpuinfo_x86 *c)
 #if defined(CONFIG_NUMA) && defined(CONFIG_X86_64)
        int cpu = smp_processor_id();
        int node;
-       unsigned apicid = cpu_has_apic ? hard_smp_processor_id() : c->apicid;
+       unsigned apicid = c->apicid;
 
        node = per_cpu(cpu_llc_id, cpu);
 
@@ -481,6 +481,9 @@ static void __cpuinit init_amd(struct cpuinfo_x86 *c)
        }
        if (c->x86 == 0x10 || c->x86 == 0x11)
                set_cpu_cap(c, X86_FEATURE_REP_GOOD);
+
+       /* get apicid instead of initial apic id from cpuid */
+       c->apicid = hard_smp_processor_id();
 #else
 
        /*