diff options
author | Santosh Shilimkar <santosh.shilimkar@ti.com> | 2013-11-23 20:36:42 +0100 |
---|---|---|
committer | Santosh Shilimkar <santosh.shilimkar@ti.com> | 2013-11-23 23:58:35 +0100 |
commit | b3ba41f28f7fe147c23bfadf6280b3492c9696b1 (patch) | |
tree | 1b2209fa74feb8707b59b723a8972d436457d3e8 /arch/arm/mm | |
parent | Linux 3.13-rc1 (diff) | |
download | linux-b3ba41f28f7fe147c23bfadf6280b3492c9696b1.tar.xz linux-b3ba41f28f7fe147c23bfadf6280b3492c9696b1.zip |
ARM: mm: Fix max_mapnr with recent max*pfn updates
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@arm.linux.org.uk>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Nicolas Pitre <nicolas.pitre@linaro.org>
Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>
Signed-off-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
Diffstat (limited to 'arch/arm/mm')
-rw-r--r-- | arch/arm/mm/init.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/arm/mm/init.c b/arch/arm/mm/init.c index 3e8f106ee5fe..4c7bab44bf5c 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); |