Skip to content

Commit

Permalink
powerpc: mem_init should call memblock_is_reserved with phys_addr_t
Browse files Browse the repository at this point in the history
This has been broken for a while but hasn't been an issue until
now because nobody was reserving regions at high addresses.

Signed-off-by: Becky Bruce <beckyb@kernel.crashing.org>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
  • Loading branch information
Becky Bruce authored and Benjamin Herrenschmidt committed Jun 29, 2011
1 parent 72632ce commit 3d41e0f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion arch/powerpc/mm/mem.c
Original file line number Diff line number Diff line change
Expand Up @@ -337,8 +337,9 @@ void __init mem_init(void)

highmem_mapnr = lowmem_end_addr >> PAGE_SHIFT;
for (pfn = highmem_mapnr; pfn < max_mapnr; ++pfn) {
phys_addr_t paddr = (phys_addr_t)pfn << PAGE_SHIFT;
struct page *page = pfn_to_page(pfn);
if (memblock_is_reserved(pfn << PAGE_SHIFT))
if (memblock_is_reserved(paddr))
continue;
ClearPageReserved(page);
init_page_count(page);
Expand Down

0 comments on commit 3d41e0f

Please sign in to comment.