]> git.hungrycats.org Git - linux/commitdiff
[PATCH] Don't register disabled nodes
authorAndi Kleen <ak@suse.de>
Sat, 27 Mar 2004 04:56:32 +0000 (20:56 -0800)
committerLinus Torvalds <torvalds@ppc970.osdl.org>
Sat, 27 Mar 2004 04:56:32 +0000 (20:56 -0800)
Don't register disabled nodes.  Hits on x86-64 when there is a node with no memory.
X86-64 shares this code with i386.

include/asm-i386/node.h

index 052e11250df993fafa2d20f98f7e682d55400ec7..c1aeb27b13547be3167a8856ea590b0f7516b7e4 100644 (file)
@@ -12,9 +12,13 @@ struct i386_node {
 extern struct i386_node node_devices[MAX_NUMNODES];
 
 static inline int arch_register_node(int num){
-       int p_node = parent_node(num);
+       int p_node;
        struct node *parent = NULL;
 
+       if (!node_online(num))
+               return 0;
+       p_node = parent_node(num);
+
        if (p_node != num)
                parent = &node_devices[p_node].node;