Skip to content

Commit

Permalink
[PATCH] ia64: pfn_to_nid() implementation
Browse files Browse the repository at this point in the history
pfn_to_nid is undefined.  We haven't had this interface on ia64.  The
sys_mbind patches need it.

Oh, the paddr_to_nid call could fail when DISCONTIG+NUMA is configured
because there isn't any ACPI SRAT NUMA information.

Signed-off-by: Bob Picco <bob.picco@hp.com>
Acked-by: Tony Luck <tony.luck@intel.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
  • Loading branch information
Bob Picco authored and Linus Torvalds committed Jun 22, 2005
1 parent 0edd73b commit 400e651
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions include/asm-ia64/mmzone.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,20 @@
#include <asm/page.h>
#include <asm/meminit.h>

static inline int pfn_to_nid(unsigned long pfn)
{
#ifdef CONFIG_NUMA
extern int paddr_to_nid(unsigned long);
int nid = paddr_to_nid(pfn << PAGE_SHIFT);
if (nid < 0)
return 0;
else
return nid;
#else
return 0;
#endif
}

#ifdef CONFIG_DISCONTIGMEM

#ifdef CONFIG_IA64_DIG /* DIG systems are small */
Expand Down

0 comments on commit 400e651

Please sign in to comment.