aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-x86_64/numa.h
diff options
context:
space:
mode:
authorRavikiran G Thirumalai <kiran@scalex86.org>2006-02-03 15:51:05 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2006-02-04 19:43:13 -0500
commit10f4dc8b27ac42f930ac55adb8c521264dc997f8 (patch)
tree88d56b784d7ae5d84fd5e486f666b779c161d8af /include/asm-x86_64/numa.h
parent7bcd3f34e262bbebffa954d80eab3a84f053da31 (diff)
[PATCH] x86_64: Fix the node cpumask of a cpu going down
Currently, x86_64 and ia64 arches do not clear the corresponding bits in the node's cpumask when a cpu goes down or cpu bring up is cancelled. This is buggy since there are pieces of common code where the cpumask is checked in the cpu down code path to decide on things (like in the slab down path). PPC does the right thing, but x86_64 and ia64 don't (This was the reason Sonny hit upon a slab bug during cpu offline on ppc and could not reproduce on other arches). This patch fixes it for x86_64. I won't attempt ia64 as I cannot test it. Credit for spotting this should go to Alok. Signed-off-by: Alok N Kataria <alokk@calsoftinc.com> Signed-off-by: Ravikiran Thirumalai <kiran@scalex86.org> Signed-off-by: Shai Fultheim <shai@scalex86.org> Signed-off-by: Andi Kleen <ak@suse.de> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include/asm-x86_64/numa.h')
-rw-r--r--include/asm-x86_64/numa.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/asm-x86_64/numa.h b/include/asm-x86_64/numa.h
index 34e434ce3268..dffe276ca2df 100644
--- a/include/asm-x86_64/numa.h
+++ b/include/asm-x86_64/numa.h
@@ -22,8 +22,15 @@ extern void numa_set_node(int cpu, int node);
22extern unsigned char apicid_to_node[256]; 22extern unsigned char apicid_to_node[256];
23#ifdef CONFIG_NUMA 23#ifdef CONFIG_NUMA
24extern void __init init_cpu_to_node(void); 24extern void __init init_cpu_to_node(void);
25
26static inline void clear_node_cpumask(int cpu)
27{
28 clear_bit(cpu, &node_to_cpumask[cpu_to_node(cpu)]);
29}
30
25#else 31#else
26#define init_cpu_to_node() do {} while (0) 32#define init_cpu_to_node() do {} while (0)
33#define clear_node_cpumask(cpu) do {} while (0)
27#endif 34#endif
28 35
29#define NUMA_NO_NODE 0xff 36#define NUMA_NO_NODE 0xff