Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 8582
b: refs/heads/master
c: df0cc26
h: refs/heads/master
v: v3
  • Loading branch information
Andi Kleen authored and Linus Torvalds committed Sep 12, 2005
1 parent a492b70 commit 2a17051
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 3f098c2605bdf50176b26f4fa724e9b9c99e5242
refs/heads/master: df0cc26b1b7f88f46307eea50a7469f0b58132d9
21 changes: 21 additions & 0 deletions trunk/arch/x86_64/kernel/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -942,6 +942,25 @@ static int __cpuinit intel_num_cpu_cores(struct cpuinfo_x86 *c)
return 1;
}

static void srat_detect_node(void)
{
#ifdef CONFIG_NUMA
unsigned apicid, node;
int cpu = smp_processor_id();

/* Don't do the funky fallback heuristics the AMD version employs
for now. */
apicid = phys_proc_id[cpu];
node = apicid_to_node[apicid];
if (node == NUMA_NO_NODE)
node = 0;
cpu_to_node[cpu] = node;

if (acpi_numa > 0)
printk(KERN_INFO "CPU %d -> Node %d\n", cpu, node);
#endif
}

static void __cpuinit init_intel(struct cpuinfo_x86 *c)
{
/* Cache sizes */
Expand All @@ -960,6 +979,8 @@ static void __cpuinit init_intel(struct cpuinfo_x86 *c)
if (c->x86 >= 15)
set_bit(X86_FEATURE_CONSTANT_TSC, &c->x86_capability);
c->x86_num_cores = intel_num_cpu_cores(c);

srat_detect_node();
}

static void __cpuinit get_cpu_vendor(struct cpuinfo_x86 *c)
Expand Down

0 comments on commit 2a17051

Please sign in to comment.