Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 234845
b: refs/heads/master
c: 9e81509
h: refs/heads/master
i:
  234843: cdb5a67
v: v3
  • Loading branch information
Borislav Petkov authored and Ingo Molnar committed Feb 15, 2011
1 parent b9f549f commit c3e2d32
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 691269f0d918cd72454c254f97722f194c07b9a8
refs/heads/master: 9e81509efc4fefcdd75cc6a4121672fa71ae8745
6 changes: 3 additions & 3 deletions trunk/arch/x86/kernel/cpu/amd.c
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ static int __cpuinit nearby_node(int apicid)
#ifdef CONFIG_X86_HT
static void __cpuinit amd_get_topology(struct cpuinfo_x86 *c)
{
u32 nodes, cores_per_cu;
u32 nodes, cores_per_cu = 1;
u8 node_id;
int cpu = smp_processor_id();

Expand All @@ -276,7 +276,7 @@ static void __cpuinit amd_get_topology(struct cpuinfo_x86 *c)
/* get compute unit information */
smp_num_siblings = ((ebx >> 8) & 3) + 1;
c->compute_unit_id = ebx & 0xff;
cores_per_cu = ((ebx >> 8) & 3) + 1;
cores_per_cu += ((ebx >> 8) & 3);
} else if (cpu_has(c, X86_FEATURE_NODEID_MSR)) {
u64 value;

Expand All @@ -298,7 +298,7 @@ static void __cpuinit amd_get_topology(struct cpuinfo_x86 *c)
/* store NodeID, use llc_shared_map to store sibling info */
per_cpu(cpu_llc_id, cpu) = node_id;

/* core id to be in range from 0 to (cores_per_node - 1) */
/* core id has to be in the [0 .. cores_per_node - 1] range */
c->cpu_core_id %= cores_per_node;
c->compute_unit_id %= cus_per_node;
}
Expand Down

0 comments on commit c3e2d32

Please sign in to comment.