linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] arm64:mm: initialize max_mapnr using function set_max_mapnr
@ 2014-09-11 13:37 Ganapatrao Kulkarni
  2014-09-11 13:52 ` Will Deacon
  2014-09-15 17:11 ` Catalin Marinas
  0 siblings, 2 replies; 5+ messages in thread
From: Ganapatrao Kulkarni @ 2014-09-11 13:37 UTC (permalink / raw)
  To: linux-arm-kernel

In some config cases, max_mapnr is not defined and direct reference
results in to compilation error.
This is fixed by using set_max_mapnr() helper.

Signed-off-by: Ganapatrao Kulkarni <ganapatrao.kulkarni@caviumnetworks.com>
---
 arch/arm64/mm/init.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm64/mm/init.c b/arch/arm64/mm/init.c
index 5472c24..271e654 100644
--- a/arch/arm64/mm/init.c
+++ b/arch/arm64/mm/init.c
@@ -256,7 +256,7 @@ static void __init free_unused_memmap(void)
  */
 void __init mem_init(void)
 {
-	max_mapnr   = pfn_to_page(max_pfn + PHYS_PFN_OFFSET) - mem_map;
+	set_max_mapnr(pfn_to_page(max_pfn) - mem_map);
 
 #ifndef CONFIG_SPARSEMEM_VMEMMAP
 	free_unused_memmap();
-- 
1.8.1.4

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2014-09-16 17:18 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-09-11 13:37 [PATCH] arm64:mm: initialize max_mapnr using function set_max_mapnr Ganapatrao Kulkarni
2014-09-11 13:52 ` Will Deacon
2014-09-15 17:11 ` Catalin Marinas
2014-09-15 18:37   ` Ganapatrao Kulkarni
2014-09-16 17:18     ` Catalin Marinas

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).