Skip to contentSkip to conversation

AMD: modify cpu probe from APICID to initial APICID

PATCH In review Eial Czerwacki 2 participants 3 messages Oct 25, 2011 – Oct 26, 2011 4 messages not in the archive x86

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): 9B14D1490DDECA4E974F6B9FC9EBAB3140CD274366@VMBX108.ihostexchange.net

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): 9B14D1490DDECA4E974F6B9FC9EBAB3140CD27436C@VMBX108.ihostexchange.net

#4 lore raw

PATCH 1/1 AMD: modify cpu probe from APICID to initial APICID

Make AMD probe processors using APICID rather than the initial APICID.

---

arch/x86/kernel/cpu/amd.c +2 -2
@@ -299,9 +299,9 @@ static void __cpuinit amd_detect_cmp(str
 
   	bits = c->x86_coreid_bits;
   	/* Low order bits define the core id (index of core in socket) */
-	c->cpu_core_id = c->initial_apicid&    ((1<<    bits)-1);
+	c->cpu_core_id = c->apicid&    ((1<<    bits)-1);
   	/* Convert the initial APIC ID into the socket ID */
-	c->phys_proc_id = c->initial_apicid>>    bits;
+	c->phys_proc_id = c->apicid>>    bits;
   	/* use socket ID also for last level cache */
   	per_cpu(cpu_llc_id, cpu) = c->phys_proc_id;
   	/* fixup topology information on multi-node processors */
#5 lore raw
Quoted 12 lines · Eial Czerwacki

Make AMD probe processors using APICID rather than the initial APICID.

---

arch/x86/kernel/cpu/amd.c 2011-09-14 06:01:41.493209624 -0700 renamed from arch/x86/kernel/cpu/amd.c 2011-09-14 05:58:19.542910736 -0700 +0 -0
@@ -299,9 +299,9 @@ static void __cpuinit amd_detect_cmp(str
 

arch/x86/kernel/cpu/amd.c 2011-09-14 06:01:41.493209624 -0700 static void __cpuinit amd_detect_cmp(str · line 307

Quoted 10 lines
arch/x86/kernel/cpu/amd.c 2011-09-14 06:01:41.493209624 -0700 renamed from arch/x86/kernel/cpu/amd.c 2011-09-14 05:58:19.542910736 -0700 +2 -2
        bits = c->x86_coreid_bits;
        /* Low order bits define the core id (index of core in socket) */
-       c->cpu_core_id = c->initial_apicid&    ((1<<    bits)-1);
+       c->cpu_core_id = c->apicid&    ((1<<    bits)-1);
        /* Convert the initial APIC ID into the socket ID */
-       c->phys_proc_id = c->initial_apicid>>    bits;
+       c->phys_proc_id = c->apicid>>    bits;
        /* use socket ID also for last level cache */
        per_cpu(cpu_llc_id, cpu) = c->phys_proc_id;
        /* fixup topology information on multi-node processors */

No, that is not right.

We have to initial apicid to get socket/core mapping.

BTW, your mail client has some problem with formatting.

Thanks

Yinghai

#6 lore raw
Quoted 30 lines · Yinghai Lu
Quoted 12 lines · Eial Czerwacki

Make AMD probe processors using APICID rather than the initial APICID.

---

arch/x86/kernel/cpu/amd.c 2011-09-14 06:01:41.493209624 -0700 renamed from arch/x86/kernel/cpu/amd.c 2011-09-14 05:58:19.542910736 -0700 +0 -0
@@ -299,9 +299,9 @@ static void __cpuinit amd_detect_cmp(str
 

arch/x86/kernel/cpu/amd.c 2011-09-14 06:01:41.493209624 -0700 static void __cpuinit amd_detect_cmp(str · line 307

Quoted 10 lines
arch/x86/kernel/cpu/amd.c 2011-09-14 06:01:41.493209624 -0700 renamed from arch/x86/kernel/cpu/amd.c 2011-09-14 05:58:19.542910736 -0700 +2 -2
        bits = c->x86_coreid_bits;
        /* Low order bits define the core id (index of core in socket) */
-       c->cpu_core_id = c->initial_apicid&      ((1<<      bits)-1);
+       c->cpu_core_id = c->apicid&      ((1<<      bits)-1);
        /* Convert the initial APIC ID into the socket ID */
-       c->phys_proc_id = c->initial_apicid>>      bits;
+       c->phys_proc_id = c->apicid>>      bits;
        /* use socket ID also for last level cache */
        per_cpu(cpu_llc_id, cpu) = c->phys_proc_id;
        /* fixup topology information on multi-node processors */

No, that is not right.

We have to initial apicid to get socket/core mapping.

BTW, your mail client has some problem with formatting.

Quoted 9 lines

Thanks

Yinghai
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

ok, I'll review the patch again.

is the format ok now?

Thanks,

Eial.