mm: pass the vmem_altmap to memmap_init_zone
Pass the vmem_altmap two levels down instead of needing a lookup. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
This commit is contained in:

committed by
Dan Williams

parent
24b6d41643
commit
a99583e780
@@ -5314,9 +5314,9 @@ void __ref build_all_zonelists(pg_data_t *pgdat)
|
||||
* done. Non-atomic initialization, single-pass.
|
||||
*/
|
||||
void __meminit memmap_init_zone(unsigned long size, int nid, unsigned long zone,
|
||||
unsigned long start_pfn, enum memmap_context context)
|
||||
unsigned long start_pfn, enum memmap_context context,
|
||||
struct vmem_altmap *altmap)
|
||||
{
|
||||
struct vmem_altmap *altmap = to_vmem_altmap(__pfn_to_phys(start_pfn));
|
||||
unsigned long end_pfn = start_pfn + size;
|
||||
pg_data_t *pgdat = NODE_DATA(nid);
|
||||
unsigned long pfn;
|
||||
@@ -5417,7 +5417,7 @@ 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)
|
||||
memmap_init_zone((size), (nid), (zone), (start_pfn), MEMMAP_EARLY, NULL)
|
||||
#endif
|
||||
|
||||
static int zone_batchsize(struct zone *zone)
|
||||
|
Reference in New Issue
Block a user