aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVitaly Andrianov <vitalya@ti.com>2012-06-21 08:09:05 -0400
committerCyril Chemparathy <cyril@ti.com>2012-09-21 10:43:57 -0400
commit4d4692e2c5dda901a7f51a8081a846b75540ebc4 (patch)
tree0fa7810685096f53a85f884dcb4e682590be8acd
parent95e7e7f1f484bb2f83e40dd52a7ea32512cb8528 (diff)
downloadlinux-keystone-4d4692e2c5dda901a7f51a8081a846b75540ebc4.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 9aec41fa80ae31..19ba70b31017a6 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,