Commit c7878534 authored by Miaohe Lin's avatar Miaohe Lin Committed by Linus Torvalds

mm/sparse: make mminit_validate_memmodel_limits() static

It's only used in the sparse.c now. So we can make it static and further
clean up the relevant code.

Link: https://lkml.kernel.org/r/20220127093221.63524-1-linmiaohe@huawei.comSigned-off-by: default avatarMiaohe Lin <linmiaohe@huawei.com>
Reviewed-by: default avatarMike Rapoport <rppt@linux.ibm.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 0e6799db
...@@ -572,17 +572,6 @@ static inline void mminit_verify_zonelist(void) ...@@ -572,17 +572,6 @@ static inline void mminit_verify_zonelist(void)
} }
#endif /* CONFIG_DEBUG_MEMORY_INIT */ #endif /* CONFIG_DEBUG_MEMORY_INIT */
/* mminit_validate_memmodel_limits is independent of CONFIG_DEBUG_MEMORY_INIT */
#if defined(CONFIG_SPARSEMEM)
extern void mminit_validate_memmodel_limits(unsigned long *start_pfn,
unsigned long *end_pfn);
#else
static inline void mminit_validate_memmodel_limits(unsigned long *start_pfn,
unsigned long *end_pfn)
{
}
#endif /* CONFIG_SPARSEMEM */
#define NODE_RECLAIM_NOSCAN -2 #define NODE_RECLAIM_NOSCAN -2
#define NODE_RECLAIM_FULL -1 #define NODE_RECLAIM_FULL -1
#define NODE_RECLAIM_SOME 0 #define NODE_RECLAIM_SOME 0
......
...@@ -126,7 +126,7 @@ static inline int sparse_early_nid(struct mem_section *section) ...@@ -126,7 +126,7 @@ static inline int sparse_early_nid(struct mem_section *section)
} }
/* Validate the physical addressing limitations of the model */ /* Validate the physical addressing limitations of the model */
void __meminit mminit_validate_memmodel_limits(unsigned long *start_pfn, static void __meminit mminit_validate_memmodel_limits(unsigned long *start_pfn,
unsigned long *end_pfn) unsigned long *end_pfn)
{ {
unsigned long max_sparsemem_pfn = 1UL << (MAX_PHYSMEM_BITS-PAGE_SHIFT); unsigned long max_sparsemem_pfn = 1UL << (MAX_PHYSMEM_BITS-PAGE_SHIFT);
......
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