mirror of
https://github.com/FEX-Emu/linux.git
synced 2025-01-10 11:30:49 +00:00
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. Link: http://lkml.kernel.org/r/20180724235520.10200-2-pasha.tatashin@oracle.com Signed-off-by: Pavel Tatashin <pasha.tatashin@oracle.com> Reviewed-by: Andrew Morton <akpm@linux-foundation.org> Reviewed-by: Oscar Salvador <osalvador@suse.de> Cc: Steven Sistare <steven.sistare@oracle.com> Cc: Daniel Jordan <daniel.m.jordan@oracle.com> Cc: Kirill A. Shutemov <kirill.shutemov@linux.intel.com> Cc: Michal Hocko <mhocko@suse.com> Cc: Dan Williams <dan.j.williams@intel.com> Cc: Jan Kara <jack@suse.cz> Cc: Jérôme Glisse <jglisse@redhat.com> Cc: Souptick Joarder <jrdr.linux@gmail.com> Cc: Baoquan He <bhe@redhat.com> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Cc: Vlastimil Babka <vbabka@suse.cz> Cc: Wei Yang <richard.weiyang@gmail.com> Cc: Dave Hansen <dave.hansen@intel.com> Cc: David Rientjes <rientjes@google.com> Cc: Ingo Molnar <mingo@kernel.org> Cc: Pavel Tatashin <pasha.tatashin@oracle.com> Cc: Abdul Haleem <abdhalee@linux.vnet.ibm.com> Cc: Michael Ellerman <mpe@ellerman.id.au> Cc: Pasha Tatashin <Pavel.Tatashin@microsoft.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
1c2d479a11
commit
dfb3ccd00a
@ -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 */
|
||||
|
@ -5631,10 +5631,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)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user