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, 4 insertions, 6 deletions
diff --git a/mm/sparse.c b/mm/sparse.c
index fac95f2888f2..a83de2f72b30 100644
--- a/mm/sparse.c
+++ b/mm/sparse.c
@@ -617,7 +617,7 @@ static void __kfree_section_memmap(struct page *memmap, unsigned long nr_pages)
617{ 617{
618 return; /* XXX: Not implemented yet */ 618 return; /* XXX: Not implemented yet */
619} 619}
620static void free_map_bootmem(struct page *page, unsigned long nr_pages) 620static void free_map_bootmem(struct page *memmap, unsigned long nr_pages)
621{ 621{
622} 622}
623#else 623#else
@@ -658,10 +658,11 @@ static void __kfree_section_memmap(struct page *memmap, unsigned long nr_pages)
658 get_order(sizeof(struct page) * nr_pages)); 658 get_order(sizeof(struct page) * nr_pages));
659} 659}
660 660
661static void free_map_bootmem(struct page *page, unsigned long nr_pages) 661static void free_map_bootmem(struct page *memmap, unsigned long nr_pages)
662{ 662{
663 unsigned long maps_section_nr, removing_section_nr, i; 663 unsigned long maps_section_nr, removing_section_nr, i;
664 unsigned long magic; 664 unsigned long magic;
665 struct page *page = virt_to_page(memmap);
665 666
666 for (i = 0; i < nr_pages; i++, page++) { 667 for (i = 0; i < nr_pages; i++, page++) {
667 magic = (unsigned long) page->lru.next; 668 magic = (unsigned long) page->lru.next;
@@ -710,13 +711,10 @@ static void free_section_usemap(struct page *memmap, unsigned long *usemap)
710 */ 711 */
711 712
712 if (memmap) { 713 if (memmap) {
713 struct page *memmap_page;
714 memmap_page = virt_to_page(memmap);
715
716 nr_pages = PAGE_ALIGN(PAGES_PER_SECTION * sizeof(struct page)) 714 nr_pages = PAGE_ALIGN(PAGES_PER_SECTION * sizeof(struct page))
717 >> PAGE_SHIFT; 715 >> PAGE_SHIFT;
718 716
719 free_map_bootmem(memmap_page, nr_pages); 717 free_map_bootmem(memmap, nr_pages);
720 } 718 }
721} 719}
722 720