powerpc: ARCH_PFN_OFFSET should be unsigned long
authorScott Wood <scottwood@freescale.com>
Thu, 24 Mar 2011 11:51:19 +0000 (11:51 +0000)
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>
Tue, 29 Mar 2011 23:44:07 +0000 (10:44 +1100)
pfns are unsigned long, but MEMORY_START is phys_addr_t.  This leads
to page_to_pfn() returning phys_addr_t, and thus type mismatches in a few
print statements.

Signed-off-by: Scott Wood <scottwood@freescale.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
arch/powerpc/include/asm/page.h

index da4b200085411989593edd7fe3dd02c86446d09e..2cd664ef0a5e66abd924002e56839379657efd41 100644 (file)
@@ -100,7 +100,7 @@ extern phys_addr_t kernstart_addr;
 #endif
 
 #ifdef CONFIG_FLATMEM
-#define ARCH_PFN_OFFSET                (MEMORY_START >> PAGE_SHIFT)
+#define ARCH_PFN_OFFSET                ((unsigned long)(MEMORY_START >> PAGE_SHIFT))
 #define pfn_valid(pfn)         ((pfn) >= ARCH_PFN_OFFSET && (pfn) < max_mapnr)
 #endif