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, 8 insertions, 2 deletions
diff --git a/mm/sparse.c b/mm/sparse.c
index 58cab483e81b..73dc2fcc0eab 100644
--- a/mm/sparse.c
+++ b/mm/sparse.c
@@ -629,7 +629,7 @@ void offline_mem_sections(unsigned long start_pfn, unsigned long end_pfn)
629 unsigned long pfn; 629 unsigned long pfn;
630 630
631 for (pfn = start_pfn; pfn < end_pfn; pfn += PAGES_PER_SECTION) { 631 for (pfn = start_pfn; pfn < end_pfn; pfn += PAGES_PER_SECTION) {
632 unsigned long section_nr = pfn_to_section_nr(start_pfn); 632 unsigned long section_nr = pfn_to_section_nr(pfn);
633 struct mem_section *ms; 633 struct mem_section *ms;
634 634
635 /* 635 /*
@@ -779,7 +779,13 @@ int __meminit sparse_add_one_section(struct pglist_data *pgdat,
779 goto out; 779 goto out;
780 } 780 }
781 781
782 memset(memmap, 0, sizeof(struct page) * PAGES_PER_SECTION); 782#ifdef CONFIG_DEBUG_VM
783 /*
784 * Poison uninitialized struct pages in order to catch invalid flags
785 * combinations.
786 */
787 memset(memmap, PAGE_POISON_PATTERN, sizeof(struct page) * PAGES_PER_SECTION);
788#endif
783 789
784 section_mark_present(ms); 790 section_mark_present(ms);
785 791