Commit 510f8fa7 authored by Andy Whitcroft's avatar Andy Whitcroft Committed by Linus Torvalds

[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: default avatarAndy Whitcroft <>
Signed-off-by: default avatarDave Hansen <>
Signed-off-by: default avatarMartin Bligh <>
Signed-off-by: default avatarAndrew Morton <>
Signed-off-by: default avatarLinus Torvalds <>
parent 29751f69
......@@ -211,6 +211,10 @@ config ARCH_FLATMEM_ENABLE
source "mm/Kconfig"
default y
# Some NUMA nodes have memory ranges that span
# other nodes. Even though a pfn is valid and
# between a node's start and end pfns, it may not
......@@ -90,4 +90,9 @@ static inline int pa_to_nid(unsigned long pa)
#define discontigmem_pfn_valid(pfn) ((pfn) < num_physpages)
#define early_pfn_to_nid(pfn) pa_to_nid(((unsigned long)pfn) << PAGE_SHIFT)
#endif /* _ASM_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