diff --git a/mm/memblock.c b/mm/memblock.c index 6349c48154f4..43e036f3e11a 100644 --- a/mm/memblock.c +++ b/mm/memblock.c @@ -2224,10 +2224,8 @@ static void __init free_unused_memmap(void) } #ifdef CONFIG_SPARSEMEM - if (!IS_ALIGNED(prev_end, PAGES_PER_SECTION)) { - prev_end = pageblock_align(end); + if (!IS_ALIGNED(prev_end, PAGES_PER_SECTION)) free_memmap(prev_end, ALIGN(prev_end, PAGES_PER_SECTION)); - } #endif } diff --git a/mm/mm_init.c b/mm/mm_init.c index 3afebe5ab4ca..d87166a36ee8 100644 --- a/mm/mm_init.c +++ b/mm/mm_init.c @@ -1665,7 +1665,6 @@ static void __init free_area_init_node(int nid) pgdat->node_id = nid; pgdat->node_start_pfn = start_pfn; - pgdat->per_cpu_nodestats = NULL; if (start_pfn != end_pfn) { pr_info("Initmem setup node %d [mem %#018Lx-%#018Lx]\n", nid, @@ -1788,7 +1787,6 @@ static void __init free_area_init(void) } /* Find the PFNs that ZONE_MOVABLE begins at in each node */ - memset(zone_movable_pfn, 0, sizeof(zone_movable_pfn)); find_zone_movable_pfns_for_nodes(); /* Print out the zone ranges */