init.c (0ea8a56de21be24cb79abb03dee79aabcd60a316) | init.c (c9118e6c37bff9ade90b638207a6e0db676ee6a9) |
---|---|
1// SPDX-License-Identifier: GPL-2.0-only 2/* 3 * linux/arch/sh/mm/init.c 4 * 5 * Copyright (C) 1999 Niibe Yutaka 6 * Copyright (C) 2002 - 2011 Paul Mundt 7 * 8 * Based on linux/arch/i386/mm/init.c: --- 212 unchanged lines hidden (view full) --- 221#endif 222 223 NODE_DATA(nid)->node_start_pfn = start_pfn; 224 NODE_DATA(nid)->node_spanned_pages = end_pfn - start_pfn; 225} 226 227static void __init do_init_bootmem(void) 228{ | 1// SPDX-License-Identifier: GPL-2.0-only 2/* 3 * linux/arch/sh/mm/init.c 4 * 5 * Copyright (C) 1999 Niibe Yutaka 6 * Copyright (C) 2002 - 2011 Paul Mundt 7 * 8 * Based on linux/arch/i386/mm/init.c: --- 212 unchanged lines hidden (view full) --- 221#endif 222 223 NODE_DATA(nid)->node_start_pfn = start_pfn; 224 NODE_DATA(nid)->node_spanned_pages = end_pfn - start_pfn; 225} 226 227static void __init do_init_bootmem(void) 228{ |
229 struct memblock_region *reg; | 229 unsigned long start_pfn, end_pfn; 230 int i; |
230 231 /* Add active regions with valid PFNs. */ | 231 232 /* Add active regions with valid PFNs. */ |
232 for_each_memblock(memory, reg) { 233 unsigned long start_pfn, end_pfn; 234 start_pfn = memblock_region_memory_base_pfn(reg); 235 end_pfn = memblock_region_memory_end_pfn(reg); | 233 for_each_mem_pfn_range(i, MAX_NUMNODES, &start_pfn, &end_pfn, NULL) |
236 __add_active_range(0, start_pfn, end_pfn); | 234 __add_active_range(0, start_pfn, end_pfn); |
237 } | |
238 239 /* All of system RAM sits in node 0 for the non-NUMA case */ 240 allocate_pgdat(0); 241 node_set_online(0); 242 243 plat_mem_setup(); 244 245 sparse_init(); --- 192 unchanged lines hidden --- | 235 236 /* All of system RAM sits in node 0 for the non-NUMA case */ 237 allocate_pgdat(0); 238 node_set_online(0); 239 240 plat_mem_setup(); 241 242 sparse_init(); --- 192 unchanged lines hidden --- |