]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
powerpc: mem_init should call memblock_is_reserved with phys_addr_t
authorBecky Bruce <beckyb@kernel.crashing.org>
Tue, 28 Jun 2011 09:54:46 +0000 (09:54 +0000)
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>
Wed, 29 Jun 2011 07:48:18 +0000 (17:48 +1000)
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>
arch/powerpc/mm/mem.c

index 57e545b84bf199cb8db2b2fbefa0d4755a419394..097b288779e2e19467bf061f7d42ade9f827516f 100644 (file)
@@ -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);