diff options
author | Bob Picco | 2005-06-21 17:15:05 -0700 |
---|---|---|
committer | Linus Torvalds | 2005-06-21 18:46:19 -0700 |
commit | 400e65146c428d2ef677a927786fda2cec545a76 (patch) | |
tree | 51c94fe3448b63f07886dcb90484ee9e51acb595 /include | |
parent | 0edd73b33426df61b1d8a0a50d1f2ec097500abb (diff) |
[PATCH] ia64: pfn_to_nid() implementation
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>
Diffstat (limited to 'include')
-rw-r--r-- | include/asm-ia64/mmzone.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/include/asm-ia64/mmzone.h b/include/asm-ia64/mmzone.h index 9491dacc89cf..83ca4043fc11 100644 --- a/include/asm-ia64/mmzone.h +++ b/include/asm-ia64/mmzone.h @@ -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 */ |