diff options
author | Stephen Rothwell <sfr@canb.auug.org.au> | 2015-05-01 14:21:08 +1000 |
---|---|---|
committer | Stephen Rothwell <sfr@canb.auug.org.au> | 2015-05-01 14:22:03 +1000 |
commit | 9467a93edbfba73f03b3f8847588c73b1e1d8335 (patch) | |
tree | 686d8470806ac093f5f52e73de0ae36640c1addc | |
parent | 15af31b402bbcc9c0ab2f1811c259f60f8f22c0d (diff) |
mm: page_alloc: pass PFN to __free_pages_bootmem fix
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
-rw-r--r-- | mm/bootmem.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/mm/bootmem.c b/mm/bootmem.c index daf956bb4782..0a0eb62b1c92 100644 --- a/mm/bootmem.c +++ b/mm/bootmem.c @@ -173,6 +173,7 @@ static unsigned long __init free_all_bootmem_core(bootmem_data_t *bdata) { struct page *page; unsigned long *map, start, end, pages, count = 0; + unsigned long cur; if (!bdata->node_bootmem_map) return 0; @@ -214,7 +215,7 @@ static unsigned long __init free_all_bootmem_core(bootmem_data_t *bdata) count += BITS_PER_LONG; start += BITS_PER_LONG; } else { - unsigned long cur = start; + cur = start; start = ALIGN(start + 1, BITS_PER_LONG); while (vec && cur != start) { @@ -233,6 +234,7 @@ static unsigned long __init free_all_bootmem_core(bootmem_data_t *bdata) pages = bdata->node_low_pfn - bdata->node_min_pfn; pages = bootmem_bootmap_pages(pages); count += pages; + cur = bdata->node_min_pfn; while (pages--) __free_pages_bootmem(page++, cur++, 0); |