Commit b3ba41f2 authored by Santosh Shilimkar's avatar Santosh Shilimkar

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: default avatarGrygorii Strashko <grygorii.strashko@ti.com>
Signed-off-by: default avatarSantosh Shilimkar <santosh.shilimkar@ti.com>
parent 6ce4eac1
...@@ -587,7 +587,7 @@ void __init mem_init(void) ...@@ -587,7 +587,7 @@ void __init mem_init(void)
extern u32 itcm_end; extern u32 itcm_end;
#endif #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 */ /* this will put all unused low memory onto the freelists */
free_unused_memmap(&meminfo); free_unused_memmap(&meminfo);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment