Lines Matching refs:nid
51 static void set_section_nid(unsigned long section_nr, int nid) in set_section_nid() argument
53 section_to_node_table[section_nr] = nid; in set_section_nid()
56 static inline void set_section_nid(unsigned long section_nr, int nid) in set_section_nid() argument
62 static struct mem_section noinline __init_refok *sparse_index_alloc(int nid) in sparse_index_alloc() argument
69 if (node_state(nid, N_HIGH_MEMORY)) in sparse_index_alloc()
70 section = kzalloc_node(array_size, GFP_KERNEL, nid); in sparse_index_alloc()
74 section = memblock_virt_alloc_node(array_size, nid); in sparse_index_alloc()
80 static int __meminit sparse_index_init(unsigned long section_nr, int nid) in sparse_index_init() argument
88 section = sparse_index_alloc(nid); in sparse_index_init()
97 static inline int sparse_index_init(unsigned long section_nr, int nid) in sparse_index_init() argument
133 static inline unsigned long sparse_encode_early_nid(int nid) in sparse_encode_early_nid() argument
135 return (nid << SECTION_NID_SHIFT); in sparse_encode_early_nid()
170 void __init memory_present(int nid, unsigned long start, unsigned long end) in memory_present() argument
180 sparse_index_init(section, nid); in memory_present()
181 set_section_nid(section, nid); in memory_present()
185 ms->section_mem_map = sparse_encode_early_nid(nid) | in memory_present()
194 unsigned long __init node_memmap_size_bytes(int nid, unsigned long start_pfn, in node_memmap_size_bytes() argument
202 if (nid != early_pfn_to_nid(pfn)) in node_memmap_size_bytes()
269 int nid; in sparse_early_usemaps_alloc_pgdat_section() local
282 nid = early_pfn_to_nid(goal >> PAGE_SHIFT); in sparse_early_usemaps_alloc_pgdat_section()
286 nid); in sparse_early_usemaps_alloc_pgdat_section()
294 static void __init check_usemap_section_nr(int nid, unsigned long *usemap) in check_usemap_section_nr() argument
299 struct pglist_data *pgdat = NODE_DATA(nid); in check_usemap_section_nr()
315 if (usemap_nid != nid) { in check_usemap_section_nr()
318 nid, usemap_snr); in check_usemap_section_nr()
328 pgdat_snr, nid); in check_usemap_section_nr()
340 static void __init check_usemap_section_nr(int nid, unsigned long *usemap) in check_usemap_section_nr() argument
372 struct page __init *sparse_mem_map_populate(unsigned long pnum, int nid) in sparse_mem_map_populate() argument
377 map = alloc_remap(nid, sizeof(struct page) * PAGES_PER_SECTION); in sparse_mem_map_populate()
384 BOOTMEM_ALLOC_ACCESSIBLE, nid); in sparse_mem_map_populate()
453 int nid = sparse_early_nid(ms); in sparse_early_mem_map_alloc() local
455 map = sparse_mem_map_populate(pnum, nid); in sparse_early_mem_map_alloc()
598 static inline struct page *kmalloc_section_memmap(unsigned long pnum, int nid) in kmalloc_section_memmap() argument
601 return sparse_mem_map_populate(pnum, nid); in kmalloc_section_memmap()
641 static inline struct page *kmalloc_section_memmap(unsigned long pnum, int nid) in kmalloc_section_memmap() argument