Skip to contentSkip to conversation

generify early_pfn_to_nid

PATCH New Andy Whitcroft 1 participant 1 message May 4, 2005

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/6 generify early_pfn_to_nid

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.

---
 arch/i386/Kconfig         |    4 ++++
 include/asm-i386/mmzone.h |    3 +++
 include/linux/mmzone.h    |    4 ++++
 3 files changed, 11 insertions(+)
arch/i386/Kconfig +4 -0
diff -X /home/apw/brief/lib/vdiff.excl -rupN reference/arch/i386/Kconfig current/arch/i386/Kconfig
@@ -794,6 +794,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
include/asm-i386/mmzone.h +3 -0
diff -X /home/apw/brief/lib/vdiff.excl -rupN reference/include/asm-i386/mmzone.h current/include/asm-i386/mmzone.h
@@ -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_ */
include/linux/mmzone.h +4 -0
diff -X /home/apw/brief/lib/vdiff.excl -rupN reference/include/linux/mmzone.h current/include/linux/mmzone.h
@@ -418,6 +418,10 @@ extern struct pglist_data contig_page_da
 
 #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 */

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>