summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVitaly Andrianov <vitalya@ti.com>2012-09-21 11:56:06 -0400
committerTushar Behera <tushar.behera@linaro.org>2013-01-22 11:41:21 +0530
commit27d850466db507769702fae0004b04924e779684 (patch)
tree17cdecf3987c6bfbe7bf07f8715258b768abcddc
parent1d236f786fe7470a4a37df48a00bae276aaa9435 (diff)
downloadlinux-topics-27d850466db507769702fae0004b04924e779684.tar.gz
ARM: LPAE: use phys_addr_t in free_memmap()
The free_memmap() was mistakenly using unsigned long type to represent physical addresses. This breaks on PAE systems where memory could be placed above the 32-bit addressible limit. This patch fixes this function to properly use phys_addr_t instead. Signed-off-by: Vitaly Andrianov <vitalya@ti.com> Signed-off-by: Cyril Chemparathy <cyril@ti.com> Acked-by: Nicolas Pitre <nico@linaro.org>
-rw-r--r--arch/arm/mm/init.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/arch/arm/mm/init.c b/arch/arm/mm/init.c
index ad722f1208a..1c5151aac4f 100644
--- a/arch/arm/mm/init.c
+++ b/arch/arm/mm/init.c
@@ -457,7 +457,7 @@ static inline void
free_memmap(unsigned long start_pfn, unsigned long end_pfn)
{
struct page *start_pg, *end_pg;
- unsigned long pg, pgend;
+ phys_addr_t pg, pgend;
/*
* Convert start_pfn/end_pfn to a struct page pointer.
@@ -469,8 +469,8 @@ free_memmap(unsigned long start_pfn, unsigned long end_pfn)
* Convert to physical addresses, and
* round start upwards and end downwards.
*/
- pg = (unsigned long)PAGE_ALIGN(__pa(start_pg));
- pgend = (unsigned long)__pa(end_pg) & PAGE_MASK;
+ pg = PAGE_ALIGN(__pa(start_pg));
+ pgend = __pa(end_pg) & PAGE_MASK;
/*
* If there are free pages between these,