aboutsummaryrefslogtreecommitdiff
path: root/include/asm-ppc64
diff options
context:
space:
mode:
authorAndy Whitcroft2005-06-23 00:08:01 -0700
committerLinus Torvalds2005-06-23 09:45:05 -0700
commit510f8fa7ba18320d408dd3093663e58f5664f2f0 (patch)
treee355a1268cc9f42fac7e4b904d67e450775fb91f /include/asm-ppc64
parent29751f6991e845f7d002a6ae520bf996b38c8dcd (diff)
[PATCH] ppc64: add early_pfn_to_nid
Provide an implementation of early_pfn_to_nid for PPC64. This is used by memory models to determine the node from which to take allocations before the memory allocators are fully initialised. Signed-off-by: Andy Whitcroft <apw@shadowen.org> Signed-off-by: Dave Hansen <haveblue@us.ibm.com> Signed-off-by: Martin Bligh <mbligh@aracnet.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include/asm-ppc64')
-rw-r--r--include/asm-ppc64/mmzone.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/asm-ppc64/mmzone.h b/include/asm-ppc64/mmzone.h
index cbfc5ecfe875..ecc4b07507d6 100644
--- a/include/asm-ppc64/mmzone.h
+++ b/include/asm-ppc64/mmzone.h
@@ -90,4 +90,9 @@ static inline int pa_to_nid(unsigned long pa)
#define discontigmem_pfn_valid(pfn) ((pfn) < num_physpages)
#endif /* CONFIG_DISCONTIGMEM */
+
+#ifdef CONFIG_HAVE_ARCH_EARLY_PFN_TO_NID
+#define early_pfn_to_nid(pfn) pa_to_nid(((unsigned long)pfn) << PAGE_SHIFT)
+#endif
+
#endif /* _ASM_MMZONE_H_ */