diff options
author | Andi Kleen <ak@suse.de> | 2005-11-05 17:25:54 +0100 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-11-14 19:55:16 -0800 |
commit | e90f22edf432512219cc2952f5811961abbd164f (patch) | |
tree | adff9041edf84d365b209c353fe8112e8e2bb719 /include/asm-x86_64/mmzone.h | |
parent | 3506229ff9968e5dbc862a50285fbea0e8821b58 (diff) | |
download | blackbird-op-linux-e90f22edf432512219cc2952f5811961abbd164f.tar.gz blackbird-op-linux-e90f22edf432512219cc2952f5811961abbd164f.zip |
[PATCH] x86_64: Fix NUMA node lookup debug code which had bitrotted
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include/asm-x86_64/mmzone.h')
-rw-r--r-- | include/asm-x86_64/mmzone.h | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/include/asm-x86_64/mmzone.h b/include/asm-x86_64/mmzone.h index 8d48dc7e43a7..69baaa8a3ce0 100644 --- a/include/asm-x86_64/mmzone.h +++ b/include/asm-x86_64/mmzone.h @@ -17,16 +17,15 @@ /* Simple perfect hash to map physical addresses to node numbers */ extern int memnode_shift; extern u8 memnodemap[NODEMAPSIZE]; -extern int maxnode; extern struct pglist_data *node_data[]; static inline __attribute__((pure)) int phys_to_nid(unsigned long addr) { - int nid; + unsigned nid; VIRTUAL_BUG_ON((addr >> memnode_shift) >= NODEMAPSIZE); nid = memnodemap[addr >> memnode_shift]; - VIRTUAL_BUG_ON(nid > maxnode); + VIRTUAL_BUG_ON(nid >= MAX_NUMNODES || !node_data[nid]); return nid; } |