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.
Unified · Split
| @@ -737,12 +737,9 @@ void __init x86_numa_init(void) · 736 unmodified lines | ||
| 737 | 737 | |
| 738 | 738 | static 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 | 740 | /* Allocate and initialize node data. Memory-less node is now online.*/ |
| 744 | 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 | 745 | * All zonelists will be built later in start_kernel() after per cpu |
| @@ -2329,8 +2329,7 @@ static inline spinlock_t *pud_lock(struct mm_struct *mm, pud_t *pud) · 2328 unmodified lines | ||
| 2329 | 2329 | } |
| 2330 | 2330 | |
| 2331 | 2331 | extern void __init pagecache_init(void); |
| 2332 | −extern void __init free_area_init_node(int nid, unsigned long * zones_size, | |
| 2333 | − unsigned long zone_start_pfn, unsigned long *zholes_size); | |
| 2332 | +extern void __init free_area_init_memoryless_node(int nid); | |
| 2334 | 2333 | extern 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 | 2403 | * Using memblock node mappings, an architecture may initialise its |
| 2405 | − * zones, allocate the backing mem_map and account for memory holes in a more | |
| 2406 | − * architecture independent manner. This is a substitute for creating the | |
| 2407 | − * zone_sizes[] and zholes_size[] arrays and passing them to | |
| 2408 | − * free_area_init_node() | |
| 2404 | + * zones, allocate the backing mem_map and account for memory holes in an | |
| 2405 | + * architecture independent manner. | |
| 2409 | 2406 | * |
| 2410 | 2407 | * An architecture is expected to register range of page frames backed by |
| 2411 | 2408 | * physical memory with memblock_add[_node]() before calling |
| @@ -6974,12 +6974,9 @@ static void __init __free_area_init_node(int nid, unsigned long *zones_size, · 6973 unmodified lines | ||
| 6974 | 6974 | free_area_init_core(pgdat); |
| 6975 | 6975 | } |
| 6976 | 6976 | |
| 6977 | −void __init free_area_init_node(int nid, unsigned long *zones_size, | |
| 6978 | − unsigned long node_start_pfn, | |
| 6979 | − unsigned long *zholes_size) | |
| 6977 | +void __init free_area_init_memoryless_node(int nid) | |
| 6980 | 6978 | { |
| 6981 | − __free_area_init_node(nid, zones_size, node_start_pfn, zholes_size, | |
| 6982 | − true); | |
| 6979 | + __free_area_init_node(nid, NULL, 0, NULL, false); | |
| 6983 | 6980 | } |
| 6984 | 6981 | |
| 6985 | 6982 | #if !defined(CONFIG_FLAT_NODE_MEM_MAP) |