Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 228971
b: refs/heads/master
c: d906f0e
h: refs/heads/master
i:
  228969: 501b5b8
  228967: bcc8ff4
v: v3
  • Loading branch information
David Rientjes authored and Ingo Molnar committed Jan 7, 2011
1 parent 70d9fd9 commit 9a0dbfd
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 12 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: d50e8fc7e38d88909448a723cb1f825bb3af30e2
refs/heads/master: d906f0eb2f0e6d1a24c479f69a9c39e7e45c5ae8
48 changes: 37 additions & 11 deletions trunk/arch/x86/mm/numa_64.c
Original file line number Diff line number Diff line change
Expand Up @@ -833,15 +833,48 @@ void __cpuinit numa_remove_cpu(int cpu)
#endif /* !CONFIG_NUMA_EMU */

#else /* CONFIG_DEBUG_PER_CPU_MAPS */
static struct cpumask __cpuinit *debug_cpumask_set_cpu(int cpu, int enable)
{
int node = early_cpu_to_node(cpu);
struct cpumask *mask;
char buf[64];

mask = node_to_cpumask_map[node];
if (!mask) {
pr_err("node_to_cpumask_map[%i] NULL\n", node);
dump_stack();
return NULL;
}

cpulist_scnprintf(buf, sizeof(buf), mask);
printk(KERN_DEBUG "%s cpu %d node %d: mask now %s\n",
enable ? "numa_add_cpu" : "numa_remove_cpu",
cpu, node, buf);
return mask;
}

/*
* --------- debug versions of the numa functions ---------
*/
#ifndef CONFIG_NUMA_EMU
static void __cpuinit numa_set_cpumask(int cpu, int enable)
{
struct cpumask *mask;

mask = debug_cpumask_set_cpu(cpu, enable);
if (!mask)
return;

if (enable)
cpumask_set_cpu(cpu, mask);
else
cpumask_clear_cpu(cpu, mask);
}
#else
static void __cpuinit numa_set_cpumask(int cpu, int enable)
{
int node = early_cpu_to_node(cpu);
struct cpumask *mask;
char buf[64];
int i;

for_each_online_node(i) {
Expand All @@ -851,24 +884,17 @@ static void __cpuinit numa_set_cpumask(int cpu, int enable)
if (addr < physnodes[node].start ||
addr >= physnodes[node].end)
continue;
mask = node_to_cpumask_map[node];
if (mask == NULL) {
pr_err("node_to_cpumask_map[%i] NULL\n", i);
dump_stack();
mask = debug_cpumask_set_cpu(cpu, enable);
if (!mask)
return;
}

if (enable)
cpumask_set_cpu(cpu, mask);
else
cpumask_clear_cpu(cpu, mask);

cpulist_scnprintf(buf, sizeof(buf), mask);
printk(KERN_DEBUG "%s cpu %d node %d: mask now %s\n",
enable ? "numa_add_cpu" : "numa_remove_cpu",
cpu, node, buf);
}
}
#endif /* CONFIG_NUMA_EMU */

void __cpuinit numa_add_cpu(int cpu)
{
Expand Down

0 comments on commit 9a0dbfd

Please sign in to comment.