Commit b159d43f authored by Andy Whitcroft's avatar Andy Whitcroft Committed by Linus Torvalds

[PATCH] 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.
Signed-off-by: default avatarAndy Whitcroft <apw@shadowen.org>
Signed-off-by: default avatarDave Hansen <haveblue@us.ibm.com>
Signed-off-by: default avatarMartin Bligh <mbligh@aracnet.com>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 368a0a3a
...@@ -810,6 +810,10 @@ config HAVE_ARCH_ALLOC_REMAP ...@@ -810,6 +810,10 @@ config HAVE_ARCH_ALLOC_REMAP
source "mm/Kconfig" source "mm/Kconfig"
config HAVE_ARCH_EARLY_PFN_TO_NID
bool
default y
config HIGHPTE config HIGHPTE
bool "Allocate 3rd-level pagetables from highmem" bool "Allocate 3rd-level pagetables from highmem"
depends on HIGHMEM4G || HIGHMEM64G depends on HIGHMEM4G || HIGHMEM64G
......
...@@ -143,4 +143,7 @@ static inline void get_memcfg_numa(void) ...@@ -143,4 +143,7 @@ static inline void get_memcfg_numa(void)
} }
#endif /* CONFIG_DISCONTIGMEM */ #endif /* CONFIG_DISCONTIGMEM */
extern int early_pfn_to_nid(unsigned long pfn);
#endif /* _ASM_MMZONE_H_ */ #endif /* _ASM_MMZONE_H_ */
...@@ -435,6 +435,10 @@ extern struct pglist_data contig_page_data; ...@@ -435,6 +435,10 @@ extern struct pglist_data contig_page_data;
#endif #endif
#ifndef CONFIG_HAVE_ARCH_EARLY_PFN_TO_NID
#define early_pfn_to_nid(nid) (0UL)
#endif
#endif /* !__ASSEMBLY__ */ #endif /* !__ASSEMBLY__ */
#endif /* __KERNEL__ */ #endif /* __KERNEL__ */
#endif /* _LINUX_MMZONE_H */ #endif /* _LINUX_MMZONE_H */
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment