linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ARM: mm: use phys_addr_t for physical address when populating pud
@ 2013-02-25 15:16 Will Deacon
  2013-02-26  8:42 ` Santosh Shilimkar
  0 siblings, 1 reply; 4+ messages in thread
From: Will Deacon @ 2013-02-25 15:16 UTC (permalink / raw)
  To: linux-arm-kernel

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@vger.kernel.org>
Signed-off-by: Will Deacon <will.deacon@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

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH] ARM: mm: use phys_addr_t for physical address when populating pud
  2013-02-25 15:16 [PATCH] ARM: mm: use phys_addr_t for physical address when populating pud Will Deacon
@ 2013-02-26  8:42 ` Santosh Shilimkar
  2013-02-26 12:17   ` Will Deacon
  0 siblings, 1 reply; 4+ messages in thread
From: Santosh Shilimkar @ 2013-02-26  8:42 UTC (permalink / raw)
  To: linux-arm-kernel

Will,

On Monday 25 February 2013 08:46 PM, Will Deacon wrote:
> 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@vger.kernel.org>
> Signed-off-by: Will Deacon <will.deacon@arm.com>
> ---
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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH] ARM: mm: use phys_addr_t for physical address when populating pud
  2013-02-26  8:42 ` Santosh Shilimkar
@ 2013-02-26 12:17   ` Will Deacon
  2013-02-26 12:29     ` Santosh Shilimkar
  0 siblings, 1 reply; 4+ messages in thread
From: Will Deacon @ 2013-02-26 12:17 UTC (permalink / raw)
  To: linux-arm-kernel

On Tue, Feb 26, 2013 at 08:42:46AM +0000, Santosh Shilimkar wrote:
> Will,

Hi Santosh,

> On Monday 25 February 2013 08:46 PM, Will Deacon wrote:
> > 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@vger.kernel.org>
> > Signed-off-by: Will Deacon <will.deacon@arm.com>
> > ---
> 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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH] ARM: mm: use phys_addr_t for physical address when populating pud
  2013-02-26 12:17   ` Will Deacon
@ 2013-02-26 12:29     ` Santosh Shilimkar
  0 siblings, 0 replies; 4+ messages in thread
From: Santosh Shilimkar @ 2013-02-26 12:29 UTC (permalink / raw)
  To: linux-arm-kernel

On Tuesday 26 February 2013 05:47 PM, Will Deacon wrote:
> On Tue, Feb 26, 2013 at 08:42:46AM +0000, Santosh Shilimkar wrote:
>> Will,
>
> Hi Santosh,
>
>> On Monday 25 February 2013 08:46 PM, Will Deacon wrote:
>>> 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@vger.kernel.org>
>>> Signed-off-by: Will Deacon <will.deacon@arm.com>
>>> ---
>> 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

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2013-02-26 12:29 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-02-25 15:16 [PATCH] ARM: mm: use phys_addr_t for physical address when populating pud Will Deacon
2013-02-26  8:42 ` Santosh Shilimkar
2013-02-26 12:17   ` Will Deacon
2013-02-26 12:29     ` Santosh Shilimkar

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).