[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20180726193509.3326-2-pasha.tatashin@oracle.com>
Date: Thu, 26 Jul 2018 15:35:07 -0400
From: Pavel Tatashin <pasha.tatashin@...cle.com>
To: steven.sistare@...cle.com, daniel.m.jordan@...cle.com,
linux-kernel@...r.kernel.org, akpm@...ux-foundation.org,
kirill.shutemov@...ux.intel.com, mhocko@...e.com,
linux-mm@...ck.org, dan.j.williams@...el.com, jack@...e.cz,
jglisse@...hat.com, jrdr.linux@...il.com, bhe@...hat.com,
gregkh@...uxfoundation.org, vbabka@...e.cz,
richard.weiyang@...il.com, dave.hansen@...el.com,
rientjes@...gle.com, mingo@...nel.org,
osalvador@...hadventures.net, pasha.tatashin@...cle.com,
abdhalee@...ux.vnet.ibm.com, mpe@...erman.id.au
Subject: [PATCH v2 1/3] mm: make memmap_init a proper function
memmap_init is sometimes a macro sometimes a function based on
__HAVE_ARCH_MEMMAP_INIT. It is only a function on ia64. Make
memmap_init a weak function instead, and let ia64 redefine it.
Signed-off-by: Pavel Tatashin <pasha.tatashin@...cle.com>
Reviewed-by: Andrew Morton <akpm@...ux-foundation.org>
Reviewed-by: Oscar Salvador <osalvador@...e.de>
---
arch/ia64/include/asm/pgtable.h | 1 -
mm/page_alloc.c | 9 +++++----
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/arch/ia64/include/asm/pgtable.h b/arch/ia64/include/asm/pgtable.h
index 165827774bea..b1e7468eb65a 100644
--- a/arch/ia64/include/asm/pgtable.h
+++ b/arch/ia64/include/asm/pgtable.h
@@ -544,7 +544,6 @@ extern struct page *zero_page_memmap_ptr;
# ifdef CONFIG_VIRTUAL_MEM_MAP
/* arch mem_map init routine is needed due to holes in a virtual mem_map */
-# define __HAVE_ARCH_MEMMAP_INIT
extern void memmap_init (unsigned long size, int nid, unsigned long zone,
unsigned long start_pfn);
# endif /* CONFIG_VIRTUAL_MEM_MAP */
diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index 2dec8056a091..6796dacd46ac 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -5554,10 +5554,11 @@ static void __meminit zone_init_free_lists(struct zone *zone)
}
}
-#ifndef __HAVE_ARCH_MEMMAP_INIT
-#define memmap_init(size, nid, zone, start_pfn) \
- memmap_init_zone((size), (nid), (zone), (start_pfn), MEMMAP_EARLY, NULL)
-#endif
+void __meminit __weak memmap_init(unsigned long size, int nid,
+ unsigned long zone, unsigned long start_pfn)
+{
+ memmap_init_zone(size, nid, zone, start_pfn, MEMMAP_EARLY, NULL);
+}
static int zone_batchsize(struct zone *zone)
{
--
2.18.0
Powered by blists - more mailing lists