History

mm: rename free_area_init_node() to free_area_init_memoryless_node()

free_area_init_node() is only used by x86 to initialize a memory-less nodes. Make its name reflect this and drop all the function parameters except node ID as they are anyway zero.

Mike Rapoport committed 6 years ago

Commit bc9331a1 parent 51930df3 files · +6 −15Browse files

Unified · Split

3 files
  1. arch/x86/mm/numa.c +1 −4
  2. include/linux/mm.h +3 −6
  3. mm/page_alloc.c +2 −5
arch/x86/mm/numa.c+1−4
@@ -737,12 +737,9 @@ void __init x86_numa_init(void) · 736 unmodified lines
737 737
738static void __init init_memory_less_node(int nid)738static void __init init_memory_less_node(int nid)
739{739{
740 unsigned long zones_size[MAX_NR_ZONES] = {0};
741 unsigned long zholes_size[MAX_NR_ZONES] = {0};
742
743 /* Allocate and initialize node data. Memory-less node is now online.*/740 /* Allocate and initialize node data. Memory-less node is now online.*/
744 alloc_node_data(nid);741 alloc_node_data(nid);
745 free_area_init_node(nid, zones_size, 0, zholes_size);742 free_area_init_memoryless_node(nid);
746 743
747 /*744 /*
748 * All zonelists will be built later in start_kernel() after per cpu745 * All zonelists will be built later in start_kernel() after per cpu
include/linux/mm.h+3−6
@@ -2329,8 +2329,7 @@ static inline spinlock_t *pud_lock(struct mm_struct *mm, pud_t *pud) · 2328 unmodified lines
2329}2329}
2330 2330
2331extern void __init pagecache_init(void);2331extern void __init pagecache_init(void);
2332extern void __init free_area_init_node(int nid, unsigned long * zones_size,2332extern void __init free_area_init_memoryless_node(int nid);
2333 unsigned long zone_start_pfn, unsigned long *zholes_size);
2334extern void free_initmem(void);2333extern void free_initmem(void);
2335 2334
2336/*2335/*
@@ -2402,10 +2401,8 @@ static inline unsigned long get_num_physpages(void) · 65 unmodified lines
2402 2401
2403/*2402/*
2404 * Using memblock node mappings, an architecture may initialise its2403 * Using memblock node mappings, an architecture may initialise its
2405 * zones, allocate the backing mem_map and account for memory holes in a more2404 * zones, allocate the backing mem_map and account for memory holes in an
2406 * architecture independent manner. This is a substitute for creating the2405 * architecture independent manner.
2407 * zone_sizes[] and zholes_size[] arrays and passing them to
2408 * free_area_init_node()
2409 *2406 *
2410 * An architecture is expected to register range of page frames backed by2407 * An architecture is expected to register range of page frames backed by
2411 * physical memory with memblock_add[_node]() before calling2408 * physical memory with memblock_add[_node]() before calling
mm/page_alloc.c+2−5
@@ -6974,12 +6974,9 @@ static void __init __free_area_init_node(int nid, unsigned long *zones_size, · 6973 unmodified lines
6974 free_area_init_core(pgdat);6974 free_area_init_core(pgdat);
6975}6975}
6976 6976
6977void __init free_area_init_node(int nid, unsigned long *zones_size,6977void __init free_area_init_memoryless_node(int nid)
6978 unsigned long node_start_pfn,
6979 unsigned long *zholes_size)
6980{6978{
6981 __free_area_init_node(nid, zones_size, node_start_pfn, zholes_size,6979 __free_area_init_node(nid, NULL, 0, NULL, false);
6982 true);
6983}6980}
6984 6981
6985#if !defined(CONFIG_FLAT_NODE_MEM_MAP)6982#if !defined(CONFIG_FLAT_NODE_MEM_MAP)