* [PATCH] ARM: use phys_addr_t in pfn_to_kaddr()
@ 2015-06-23 15:13 ` Vitaly Andrianov
0 siblings, 0 replies; 8+ messages in thread
From: Vitaly Andrianov @ 2015-06-23 15:13 UTC (permalink / raw)
To: linux, ssantosh, linux-arm-kernel, linux-kernel; +Cc: Vitaly Andrianov
This patch fixes pfn_to_kaddr() to use phys_addr_t. Without this,
this macro is broken on LPAE systems. For physical addresses above
first 4GB result of shifting pfn with PAGE_SHIFT may be truncated.
Signed-off-by: Vitaly Andrianov <vitalya@ti.com>
---
arch/arm/include/asm/memory.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/arm/include/asm/memory.h b/arch/arm/include/asm/memory.h
index 184def0..063ef31 100644
--- a/arch/arm/include/asm/memory.h
+++ b/arch/arm/include/asm/memory.h
@@ -291,7 +291,7 @@ static inline void *phys_to_virt(phys_addr_t x)
*/
#define __pa(x) __virt_to_phys((unsigned long)(x))
#define __va(x) ((void *)__phys_to_virt((phys_addr_t)(x)))
-#define pfn_to_kaddr(pfn) __va((pfn) << PAGE_SHIFT)
+#define pfn_to_kaddr(pfn) __va((phys_addr_t)(pfn) << PAGE_SHIFT)
extern phys_addr_t (*arch_virt_to_idmap)(unsigned long x);
--
1.9.1
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH] ARM: use phys_addr_t in pfn_to_kaddr()
@ 2015-06-23 15:13 ` Vitaly Andrianov
0 siblings, 0 replies; 8+ messages in thread
From: Vitaly Andrianov @ 2015-06-23 15:13 UTC (permalink / raw)
To: linux-arm-kernel
This patch fixes pfn_to_kaddr() to use phys_addr_t. Without this,
this macro is broken on LPAE systems. For physical addresses above
first 4GB result of shifting pfn with PAGE_SHIFT may be truncated.
Signed-off-by: Vitaly Andrianov <vitalya@ti.com>
---
arch/arm/include/asm/memory.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/arm/include/asm/memory.h b/arch/arm/include/asm/memory.h
index 184def0..063ef31 100644
--- a/arch/arm/include/asm/memory.h
+++ b/arch/arm/include/asm/memory.h
@@ -291,7 +291,7 @@ static inline void *phys_to_virt(phys_addr_t x)
*/
#define __pa(x) __virt_to_phys((unsigned long)(x))
#define __va(x) ((void *)__phys_to_virt((phys_addr_t)(x)))
-#define pfn_to_kaddr(pfn) __va((pfn) << PAGE_SHIFT)
+#define pfn_to_kaddr(pfn) __va((phys_addr_t)(pfn) << PAGE_SHIFT)
extern phys_addr_t (*arch_virt_to_idmap)(unsigned long x);
--
1.9.1
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH] ARM: use phys_addr_t in pfn_to_kaddr()
2015-06-23 15:13 ` Vitaly Andrianov
@ 2015-06-24 19:22 ` santosh shilimkar
-1 siblings, 0 replies; 8+ messages in thread
From: santosh shilimkar @ 2015-06-24 19:22 UTC (permalink / raw)
To: linux, nicolas.pitre
Cc: Vitaly Andrianov, ssantosh, linux-arm-kernel, linux-kernel
On 6/23/2015 8:13 AM, Vitaly Andrianov wrote:
> This patch fixes pfn_to_kaddr() to use phys_addr_t. Without this,
> this macro is broken on LPAE systems. For physical addresses above
> first 4GB result of shifting pfn with PAGE_SHIFT may be truncated.
>
> Signed-off-by: Vitaly Andrianov <vitalya@ti.com>
> ---
Looks a valid fix.
RMK, Nico, what you say ?
> arch/arm/include/asm/memory.h | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/arm/include/asm/memory.h b/arch/arm/include/asm/memory.h
> index 184def0..063ef31 100644
> --- a/arch/arm/include/asm/memory.h
> +++ b/arch/arm/include/asm/memory.h
> @@ -291,7 +291,7 @@ static inline void *phys_to_virt(phys_addr_t x)
> */
> #define __pa(x) __virt_to_phys((unsigned long)(x))
> #define __va(x) ((void *)__phys_to_virt((phys_addr_t)(x)))
> -#define pfn_to_kaddr(pfn) __va((pfn) << PAGE_SHIFT)
> +#define pfn_to_kaddr(pfn) __va((phys_addr_t)(pfn) << PAGE_SHIFT)
>
> extern phys_addr_t (*arch_virt_to_idmap)(unsigned long x);
>
>
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH] ARM: use phys_addr_t in pfn_to_kaddr()
@ 2015-06-24 19:22 ` santosh shilimkar
0 siblings, 0 replies; 8+ messages in thread
From: santosh shilimkar @ 2015-06-24 19:22 UTC (permalink / raw)
To: linux-arm-kernel
On 6/23/2015 8:13 AM, Vitaly Andrianov wrote:
> This patch fixes pfn_to_kaddr() to use phys_addr_t. Without this,
> this macro is broken on LPAE systems. For physical addresses above
> first 4GB result of shifting pfn with PAGE_SHIFT may be truncated.
>
> Signed-off-by: Vitaly Andrianov <vitalya@ti.com>
> ---
Looks a valid fix.
RMK, Nico, what you say ?
> arch/arm/include/asm/memory.h | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/arm/include/asm/memory.h b/arch/arm/include/asm/memory.h
> index 184def0..063ef31 100644
> --- a/arch/arm/include/asm/memory.h
> +++ b/arch/arm/include/asm/memory.h
> @@ -291,7 +291,7 @@ static inline void *phys_to_virt(phys_addr_t x)
> */
> #define __pa(x) __virt_to_phys((unsigned long)(x))
> #define __va(x) ((void *)__phys_to_virt((phys_addr_t)(x)))
> -#define pfn_to_kaddr(pfn) __va((pfn) << PAGE_SHIFT)
> +#define pfn_to_kaddr(pfn) __va((phys_addr_t)(pfn) << PAGE_SHIFT)
>
> extern phys_addr_t (*arch_virt_to_idmap)(unsigned long x);
>
>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] ARM: use phys_addr_t in pfn_to_kaddr()
2015-06-24 19:22 ` santosh shilimkar
@ 2015-06-25 16:33 ` Nicolas Pitre
-1 siblings, 0 replies; 8+ messages in thread
From: Nicolas Pitre @ 2015-06-25 16:33 UTC (permalink / raw)
To: santosh shilimkar
Cc: linux, Vitaly Andrianov, ssantosh, linux-arm-kernel, linux-kernel
On Wed, 24 Jun 2015, santosh shilimkar wrote:
> On 6/23/2015 8:13 AM, Vitaly Andrianov wrote:
> > This patch fixes pfn_to_kaddr() to use phys_addr_t. Without this,
> > this macro is broken on LPAE systems. For physical addresses above
> > first 4GB result of shifting pfn with PAGE_SHIFT may be truncated.
> >
> > Signed-off-by: Vitaly Andrianov <vitalya@ti.com>
> > ---
> Looks a valid fix.
>
> RMK, Nico, what you say ?
Looks fine to me.
Acked-by: Nicolas Pitre <nico@linaro.org>
>
> > arch/arm/include/asm/memory.h | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/arch/arm/include/asm/memory.h b/arch/arm/include/asm/memory.h
> > index 184def0..063ef31 100644
> > --- a/arch/arm/include/asm/memory.h
> > +++ b/arch/arm/include/asm/memory.h
> > @@ -291,7 +291,7 @@ static inline void *phys_to_virt(phys_addr_t x)
> > */
> > #define __pa(x) __virt_to_phys((unsigned long)(x))
> > #define __va(x) ((void
> > *)__phys_to_virt((phys_addr_t)(x)))
> > -#define pfn_to_kaddr(pfn) __va((pfn) << PAGE_SHIFT)
> > +#define pfn_to_kaddr(pfn) __va((phys_addr_t)(pfn) << PAGE_SHIFT)
> >
> > extern phys_addr_t (*arch_virt_to_idmap)(unsigned long x);
> >
> >
>
>
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH] ARM: use phys_addr_t in pfn_to_kaddr()
@ 2015-06-25 16:33 ` Nicolas Pitre
0 siblings, 0 replies; 8+ messages in thread
From: Nicolas Pitre @ 2015-06-25 16:33 UTC (permalink / raw)
To: linux-arm-kernel
On Wed, 24 Jun 2015, santosh shilimkar wrote:
> On 6/23/2015 8:13 AM, Vitaly Andrianov wrote:
> > This patch fixes pfn_to_kaddr() to use phys_addr_t. Without this,
> > this macro is broken on LPAE systems. For physical addresses above
> > first 4GB result of shifting pfn with PAGE_SHIFT may be truncated.
> >
> > Signed-off-by: Vitaly Andrianov <vitalya@ti.com>
> > ---
> Looks a valid fix.
>
> RMK, Nico, what you say ?
Looks fine to me.
Acked-by: Nicolas Pitre <nico@linaro.org>
>
> > arch/arm/include/asm/memory.h | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/arch/arm/include/asm/memory.h b/arch/arm/include/asm/memory.h
> > index 184def0..063ef31 100644
> > --- a/arch/arm/include/asm/memory.h
> > +++ b/arch/arm/include/asm/memory.h
> > @@ -291,7 +291,7 @@ static inline void *phys_to_virt(phys_addr_t x)
> > */
> > #define __pa(x) __virt_to_phys((unsigned long)(x))
> > #define __va(x) ((void
> > *)__phys_to_virt((phys_addr_t)(x)))
> > -#define pfn_to_kaddr(pfn) __va((pfn) << PAGE_SHIFT)
> > +#define pfn_to_kaddr(pfn) __va((phys_addr_t)(pfn) << PAGE_SHIFT)
> >
> > extern phys_addr_t (*arch_virt_to_idmap)(unsigned long x);
> >
> >
>
>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] ARM: use phys_addr_t in pfn_to_kaddr()
2015-06-25 16:33 ` Nicolas Pitre
@ 2015-06-25 18:43 ` santosh shilimkar
-1 siblings, 0 replies; 8+ messages in thread
From: santosh shilimkar @ 2015-06-25 18:43 UTC (permalink / raw)
To: Nicolas Pitre, Vitaly Andrianov
Cc: linux, ssantosh, linux-arm-kernel, linux-kernel
On 6/25/2015 9:33 AM, Nicolas Pitre wrote:
> On Wed, 24 Jun 2015, santosh shilimkar wrote:
>
>> On 6/23/2015 8:13 AM, Vitaly Andrianov wrote:
>>> This patch fixes pfn_to_kaddr() to use phys_addr_t. Without this,
>>> this macro is broken on LPAE systems. For physical addresses above
>>> first 4GB result of shifting pfn with PAGE_SHIFT may be truncated.
>>>
>>> Signed-off-by: Vitaly Andrianov <vitalya@ti.com>
>>> ---
>> Looks a valid fix.
>>
>> RMK, Nico, what you say ?
>
> Looks fine to me.
>
> Acked-by: Nicolas Pitre <nico@linaro.org>
>
Thanks Nico.
Vitaly,
I suggest you to drop this patch into RMK's patch system with
mine and Nico's ack.
Regards,
Santosh
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH] ARM: use phys_addr_t in pfn_to_kaddr()
@ 2015-06-25 18:43 ` santosh shilimkar
0 siblings, 0 replies; 8+ messages in thread
From: santosh shilimkar @ 2015-06-25 18:43 UTC (permalink / raw)
To: linux-arm-kernel
On 6/25/2015 9:33 AM, Nicolas Pitre wrote:
> On Wed, 24 Jun 2015, santosh shilimkar wrote:
>
>> On 6/23/2015 8:13 AM, Vitaly Andrianov wrote:
>>> This patch fixes pfn_to_kaddr() to use phys_addr_t. Without this,
>>> this macro is broken on LPAE systems. For physical addresses above
>>> first 4GB result of shifting pfn with PAGE_SHIFT may be truncated.
>>>
>>> Signed-off-by: Vitaly Andrianov <vitalya@ti.com>
>>> ---
>> Looks a valid fix.
>>
>> RMK, Nico, what you say ?
>
> Looks fine to me.
>
> Acked-by: Nicolas Pitre <nico@linaro.org>
>
Thanks Nico.
Vitaly,
I suggest you to drop this patch into RMK's patch system with
mine and Nico's ack.
Regards,
Santosh
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2015-06-25 18:44 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-06-23 15:13 [PATCH] ARM: use phys_addr_t in pfn_to_kaddr() Vitaly Andrianov
2015-06-23 15:13 ` Vitaly Andrianov
2015-06-24 19:22 ` santosh shilimkar
2015-06-24 19:22 ` santosh shilimkar
2015-06-25 16:33 ` Nicolas Pitre
2015-06-25 16:33 ` Nicolas Pitre
2015-06-25 18:43 ` santosh shilimkar
2015-06-25 18:43 ` santosh shilimkar
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.