Skip to content

Commit

Permalink
ARM: mm: Fix max_mapnr with recent max*pfn updates
Browse files Browse the repository at this point in the history
With commit  26ba47b {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>
  • Loading branch information
Santosh Shilimkar committed Nov 23, 2013
1 parent 6ce4eac commit b3ba41f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/arm/mm/init.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit b3ba41f

Please sign in to comment.