mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 18:51:56 -04:00
[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 <[email protected]> Signed-off-by: Dave Hansen <[email protected]> Signed-off-by: Martin Bligh <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
29751f6991
commit
510f8fa7ba
2 changed files with 9 additions and 0 deletions
|
|
@ -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_ */
|
||||
|
|
|
|||
Loading…
Reference in a new issue