Skip to content

Commit

Permalink
[PATCH] x86_64: Fix NUMA node lookup debug code which had bitrotted
Browse files Browse the repository at this point in the history
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
  • Loading branch information
Andi Kleen authored and Linus Torvalds committed Nov 15, 2005
1 parent 3506229 commit e90f22e
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions include/asm-x86_64/mmzone.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit e90f22e

Please sign in to comment.