Skip to contentSkip to conversation

ARM: mm: use phys_addr_t for physical address when populating pud

PATCH New Will Deacon 2 participants 4 messages Feb 25, 2013 – Feb 26, 2013 Arm (32-bit)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ARM: mm: use phys_addr_t for physical address when populating pud

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.

---
 arch/arm/mm/mmu.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/mm/mmu.c +1 -1
index e95a996..754c37f 100644
@@ -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;
Signature · 1 line
1.8.0
#1 lore raw

PATCH 1/1 ARM: mm: use phys_addr_t for physical address when populating pud

Will,

Quoted 7 lines · Will Deacon

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.

Quoted 5 lines

This patch fixes the function prototype to use phys_addr_t.

---

There is already a similar patch [1] on list which was suppose to get merged in 3.9 from Cyril's series [2]

Regards,
Santosh

[1] https://lkml.org/lkml/2013/1/31/491
[2] http://www.spinics.net/lists/arm-kernel/msg221994.html

#2 lore raw

PATCH 1/1 ARM: mm: use phys_addr_t for physical address when populating pud

Quoted 1 line · Santosh Shilimkar

Will,

Hi Santosh,

Quoted 8 lines · Will Deacon
Quoted 7 lines

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.

Quoted 7 lines
Quoted 5 lines

This patch fixes the function prototype to use phys_addr_t.

---

There is already a similar patch [1] on list which was suppose to get merged in 3.9 from Cyril's series [2]

Nice, that series contains a number of similar fixes too. However, I can't see anywhere destined for upstream.

Cyril -- what's the status on this branch?

Cheers,

Will

#3 lore raw

PATCH 1/1 ARM: mm: use phys_addr_t for physical address when populating pud

Quoted 15 lines · Will Deacon
Quoted 1 line · Santosh Shilimkar

Will,

Hi Santosh,

Quoted 10 lines · Will Deacon
Quoted 9 lines

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.

Quoted 9 lines
Quoted 5 lines
Quoted 3 lines

---

There is already a similar patch [1] on list which was suppose to get merged in 3.9 from Cyril's series [2]

Nice, that series contains a number of similar fixes too. However, I can't see anywhere destined for upstream.

I remember seeing a pull request [2] from Cyril sent to Russell.

Regards
Santosh

[2] http://www.spinics.net/lists/arm-kernel/msg221994.html