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>
Tested-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
Tested-by: Subash Patel <subash.rp@samsung.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
This commit is contained in:
Vitaly Andrianov 2012-06-21 08:09:05 -04:00 коммит произвёл Will Deacon
Родитель 20d6956d8c
Коммит 56bc628666
1 изменённых файлов: 3 добавлений и 3 удалений

Просмотреть файл

@ -442,7 +442,7 @@ static inline void
free_memmap(unsigned long start_pfn, unsigned long end_pfn) free_memmap(unsigned long start_pfn, unsigned long end_pfn)
{ {
struct page *start_pg, *end_pg; 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. * Convert start_pfn/end_pfn to a struct page pointer.
@ -454,8 +454,8 @@ free_memmap(unsigned long start_pfn, unsigned long end_pfn)
* Convert to physical addresses, and * Convert to physical addresses, and
* round start upwards and end downwards. * round start upwards and end downwards.
*/ */
pg = (unsigned long)PAGE_ALIGN(__pa(start_pg)); pg = PAGE_ALIGN(__pa(start_pg));
pgend = (unsigned long)__pa(end_pg) & PAGE_MASK; pgend = __pa(end_pg) & PAGE_MASK;
/* /*
* If there are free pages between these, * If there are free pages between these,