diff options
author | Vitaly Andrianov <vitalya@ti.com> | 2015-06-26 17:13:03 +0100 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2015-06-29 11:16:09 +0100 |
commit | e48866647b486f31ff7c3927b48de8bbb1c6a4c0 (patch) | |
tree | bd8b7408022cdb4735e95371b96c2b081da0b3f1 /arch/arm | |
parent | 3de1f52a3ae823265299409e276f56cdadddc310 (diff) | |
download | linux-e48866647b486f31ff7c3927b48de8bbb1c6a4c0.tar.gz linux-e48866647b486f31ff7c3927b48de8bbb1c6a4c0.tar.bz2 linux-e48866647b486f31ff7c3927b48de8bbb1c6a4c0.zip |
ARM: 8396/1: use phys_addr_t in pfn_to_kaddr()
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>
Acked-by: Nicolas Pitre <nico@linaro.org>
Acked-by: Santosh Shilimkar <ssantosh@kernel.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm')
-rw-r--r-- | arch/arm/include/asm/memory.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/arm/include/asm/memory.h b/arch/arm/include/asm/memory.h index 184def0e1652..063ef314cca9 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); |