mm/sparse: add common helper to mark all memblocks present
Presently the arches arm64, arm and sh have a function which loops through each memblock and calls memory present. riscv will require a similar function. Introduce a common memblocks_present() function that can be used by all the arches. Subsequent patches will cleanup the arches that make use of this. Link: http://lkml.kernel.org/r/20181107205433.3875-3-logang@deltatee.com Signed-off-by: Logan Gunthorpe <logang@deltatee.com> Acked-by: Andrew Morton <akpm@linux-foundation.org> Cc: Michal Hocko <mhocko@suse.com> Cc: Vlastimil Babka <vbabka@suse.cz> Cc: Oscar Salvador <osalvador@suse.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:

committed by
Linus Torvalds

parent
d1402fc708
commit
9def36e0fa
@@ -783,6 +783,12 @@ void memory_present(int nid, unsigned long start, unsigned long end);
|
||||
static inline void memory_present(int nid, unsigned long start, unsigned long end) {}
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_SPARSEMEM)
|
||||
void memblocks_present(void);
|
||||
#else
|
||||
static inline void memblocks_present(void) {}
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_HAVE_MEMORYLESS_NODES
|
||||
int local_memory_node(int node_id);
|
||||
#else
|
||||
|
Reference in New Issue
Block a user