[patch] use valid value when unmapping cpus

From: Matthew Dobson (colpatch@us.ibm.com)
Date: Wed Jun 04 2003 - 16:26:22 EST


For some unknown reason, we stick a -1 in cpu_2_node when we unmap a cpu
on i386. We're better off sticking a 0 in there, because at least 0 is
a valid value if something references it. -1 is only going to cause
problems at some point down the line. Besides, we initialize the array
with 0's, so undoing it should return it to that same value.

Cheers!

-Matt


--- linux-2.5.70-vanilla/arch/i386/kernel/smpboot.c Mon Mar 24 14:00:35 2003
+++ linux-2.5.70-vanilla/arch/i386/kernel/smpboot.c.fixed Wed Apr 2 18:23:06 2003
@@ -520,7 +520,7 @@
         printk("Unmapping cpu %d from all nodes\n", cpu);
         for (node = 0; node < MAX_NR_NODES; node ++)
                 node_2_cpu_mask[node] &= ~(1 << cpu);
- cpu_2_node[cpu] = -1;
+ cpu_2_node[cpu] = 0;
 }
 #else /* !CONFIG_NUMA */
 

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



This archive was generated by hypermail 2b29 : Sat Jun 07 2003 - 22:00:25 EST