aboutsummaryrefslogtreecommitdiffstats
path: root/mm/sparse.c
diff options
context:
space:
mode:
Diffstat (limited to 'mm/sparse.c')
-rw-r--r--mm/sparse.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/mm/sparse.c b/mm/sparse.c
index b00a97398795..d294148ba395 100644
--- a/mm/sparse.c
+++ b/mm/sparse.c
@@ -206,6 +206,16 @@ void __init memory_present(int nid, unsigned long start, unsigned long end)
206{ 206{
207 unsigned long pfn; 207 unsigned long pfn;
208 208
209#ifdef CONFIG_SPARSEMEM_EXTREME
210 if (unlikely(!mem_section)) {
211 unsigned long size, align;
212
213 size = sizeof(struct mem_section) * NR_SECTION_ROOTS;
214 align = 1 << (INTERNODE_CACHE_SHIFT);
215 mem_section = memblock_virt_alloc(size, align);
216 }
217#endif
218
209 start &= PAGE_SECTION_MASK; 219 start &= PAGE_SECTION_MASK;
210 mminit_validate_memmodel_limits(&start, &end); 220 mminit_validate_memmodel_limits(&start, &end);
211 for (pfn = start; pfn < end; pfn += PAGES_PER_SECTION) { 221 for (pfn = start; pfn < end; pfn += PAGES_PER_SECTION) {