[PATCH] ARM: mm: use phys_addr_t for physical address when populating pud

Will Deacon will.deacon at arm.com
Mon Feb 25 10:16:50 EST 2013


When creating our initial mappings, we call alloc_init_pud, which
simply defers to alloc_init_section for mappings at the pmd level.

However, the physical address passed to alloc_init_pud is potentially
truncated to unsigned long, which could cause problems on systems making
use of LPAE.

This patch fixes the function prototype to use phys_addr_t.

Cc: <stable at vger.kernel.org>
Signed-off-by: Will Deacon <will.deacon at arm.com>
---
 arch/arm/mm/mmu.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/mm/mmu.c b/arch/arm/mm/mmu.c
index e95a996..754c37f 100644
--- a/arch/arm/mm/mmu.c
+++ b/arch/arm/mm/mmu.c
@@ -634,7 +634,7 @@ static void __init alloc_init_section(pud_t *pud, unsigned long addr,
 }
 
 static void __init alloc_init_pud(pgd_t *pgd, unsigned long addr,
-	unsigned long end, unsigned long phys, const struct mem_type *type)
+	unsigned long end, phys_addr_t phys, const struct mem_type *type)
 {
 	pud_t *pud = pud_offset(pgd, addr);
 	unsigned long next;
-- 
1.8.0




More information about the linux-arm-kernel mailing list