[PATCH 1/3] ARM: mm: Fix max_mapnr with recent max*pfn updates
Santosh Shilimkar
santosh.shilimkar at ti.com
Sat Nov 23 18:34:11 EST 2013
With commit 26ba47b1 {ARM: 7805/1: mm: change max*pfn to include
the physical offset of memory}, the max_pfn already contain
PHYS_PFN_OFFSET, so it shouldn't be taken into account again.
While at it, use use set_max_mapnr() helper.
Cc: Russell King <linux at arm.linux.org.uk>
Cc: Catalin Marinas <catalin.marinas at arm.com>
Cc: Nicolas Pitre <nicolas.pitre at linaro.org>
Signed-off-by: Grygorii Strashko <grygorii.strashko at ti.com>
Signed-off-by: Santosh Shilimkar <santosh.shilimkar at ti.com>
---
arch/arm/mm/init.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/arm/mm/init.c b/arch/arm/mm/init.c
index 3e8f106..4c7bab4 100644
--- a/arch/arm/mm/init.c
+++ b/arch/arm/mm/init.c
@@ -587,7 +587,7 @@ void __init mem_init(void)
extern u32 itcm_end;
#endif
- max_mapnr = pfn_to_page(max_pfn + PHYS_PFN_OFFSET) - mem_map;
+ set_max_mapnr(pfn_to_page(max_pfn) - mem_map);
/* this will put all unused low memory onto the freelists */
free_unused_memmap(&meminfo);
--
1.7.9.5
More information about the linux-arm-kernel
mailing list