]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
[PATCH] generify early_pfn_to_nid
authorAndy Whitcroft <apw@shadowen.org>
Thu, 23 Jun 2005 07:07:52 +0000 (00:07 -0700)
committerLinus Torvalds <torvalds@ppc970.osdl.org>
Thu, 23 Jun 2005 16:45:04 +0000 (09:45 -0700)
Provide a default implementation for early_pfn_to_nid returning node 0.  Allow
architectures to override this with their own implementation out of
asm/mmzone.h.

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>
arch/i386/Kconfig
include/asm-i386/mmzone.h
include/linux/mmzone.h

index 8e5242c8e09d77b3a41cb859d4ad6527c9d1a918..a8128f9973394ec306725b465f7d5f20dc181b75 100644 (file)
@@ -810,6 +810,10 @@ config HAVE_ARCH_ALLOC_REMAP
 
 source "mm/Kconfig"
 
+config HAVE_ARCH_EARLY_PFN_TO_NID
+       bool
+       default y
+
 config HIGHPTE
        bool "Allocate 3rd-level pagetables from highmem"
        depends on HIGHMEM4G || HIGHMEM64G
index 9cec191f462c2ae0ed1175aec4b25f34d991c7dc..48e46d403aa6dd2c6d3401657bb3fb4402231004 100644 (file)
@@ -143,4 +143,7 @@ static inline void get_memcfg_numa(void)
 }
 
 #endif /* CONFIG_DISCONTIGMEM */
+
+extern int early_pfn_to_nid(unsigned long pfn);
+
 #endif /* _ASM_MMZONE_H_ */
index 95f4a780ea66c1e93368a9afcca551849e2ccf1f..6ef07de98d69efe9a884f7c7f3702556f81c5339 100644 (file)
@@ -435,6 +435,10 @@ extern struct pglist_data contig_page_data;
 
 #endif
 
+#ifndef CONFIG_HAVE_ARCH_EARLY_PFN_TO_NID
+#define early_pfn_to_nid(nid)  (0UL)
+#endif
+
 #endif /* !__ASSEMBLY__ */
 #endif /* __KERNEL__ */
 #endif /* _LINUX_MMZONE_H */