Patchwork [5/5] powerpc/numa: Fix bug in unmap_cpu_from_node

login
register
mail settings
Submitter Anton Blanchard
Date Jan. 29, 2011, 10:37 p.m.
Message ID <20110130093716.79e78bec@kryten>
Download mbox | patch
Permalink /patch/80982/
State Accepted, archived
Commit 429f4d8d20b91e4a6c239f951c06a56a6ac22957
Delegated to: Benjamin Herrenschmidt
Headers show

Comments

Anton Blanchard - Jan. 29, 2011, 10:37 p.m.
When converting to the new cpumask code I screwed up:

-       if (cpu_isset(cpu, numa_cpumask_lookup_table[node])) {
-               cpu_clear(cpu, numa_cpumask_lookup_table[node]);
+       if (cpumask_test_cpu(cpu, node_to_cpumask_map[node])) {
+               cpumask_set_cpu(cpu, node_to_cpumask_map[node]);

This was introduced in commit 25863de07af9 (powerpc/cpumask: Convert NUMA code
to new cpumask API)

Fix it.

Signed-off-by: Anton Blanchard <anton@samba.org>
Cc: <stable@kernel.org>
---

Patch

Index: linux-2.6/arch/powerpc/mm/numa.c
===================================================================
--- linux-2.6.orig/arch/powerpc/mm/numa.c	2011-01-29 13:06:05.259039081 +1100
+++ linux-2.6/arch/powerpc/mm/numa.c	2011-01-30 08:26:48.148366563 +1100
@@ -186,7 +186,7 @@  static void unmap_cpu_from_node(unsigned
 	dbg("removing cpu %lu from node %d\n", cpu, node);
 
 	if (cpumask_test_cpu(cpu, node_to_cpumask_map[node])) {
-		cpumask_set_cpu(cpu, node_to_cpumask_map[node]);
+		cpumask_clear_cpu(cpu, node_to_cpumask_map[node]);
 	} else {
 		printk(KERN_ERR "WARNING: cpu %lu not found in node %d\n",
 		       cpu, node);