Lines Matching refs:nid
125 static int __init numa_add_memblk_to(int nid, u64 start, u64 end, in numa_add_memblk_to() argument
133 if (start > end || nid < 0 || nid >= MAX_NUMNODES) { in numa_add_memblk_to()
135 nid, start, end - 1); in numa_add_memblk_to()
146 mi->blk[mi->nr_blks].nid = nid; in numa_add_memblk_to()
190 int __init numa_add_memblk(int nid, u64 start, u64 end) in numa_add_memblk() argument
192 return numa_add_memblk_to(nid, start, end, &numa_meminfo); in numa_add_memblk()
196 static void __init alloc_node_data(int nid) in alloc_node_data() argument
207 nd_pa = memblock_phys_alloc_try_nid(nd_size, SMP_CACHE_BYTES, nid); in alloc_node_data()
210 nd_size, nid); in alloc_node_data()
216 printk(KERN_INFO "NODE_DATA(%d) allocated [mem %#010Lx-%#010Lx]\n", nid, in alloc_node_data()
219 if (tnid != nid) in alloc_node_data()
220 printk(KERN_INFO " NODE_DATA(%d) on node %d\n", nid, tnid); in alloc_node_data()
222 node_data[nid] = nd; in alloc_node_data()
223 memset(NODE_DATA(nid), 0, sizeof(pg_data_t)); in alloc_node_data()
225 node_set_online(nid); in alloc_node_data()
260 numa_add_memblk_to(bi->nid, high, bi->end, in numa_cleanup_meminfo()
284 if (bi->nid != bj->nid) { in numa_cleanup_meminfo()
286 bi->nid, bi->start, bi->end - 1, in numa_cleanup_meminfo()
287 bj->nid, bj->start, bj->end - 1); in numa_cleanup_meminfo()
291 bi->nid, bi->start, bi->end - 1, in numa_cleanup_meminfo()
300 if (bi->nid != bj->nid) in numa_cleanup_meminfo()
307 if (bi->nid == bk->nid) in numa_cleanup_meminfo()
315 bi->nid, bi->start, bi->end - 1, bj->start, in numa_cleanup_meminfo()
326 mi->blk[i].nid = NUMA_NO_NODE; in numa_cleanup_meminfo()
342 mi->blk[i].nid != NUMA_NO_NODE) in numa_nodemask_from_meminfo()
343 node_set(mi->blk[i].nid, *nodemask); in numa_nodemask_from_meminfo()
464 numaram -= __absent_pages_in_range(mi->blk[i].nid, s, e); in numa_meminfo_cover_memory()
509 ret = memblock_set_node(mb->start, mb->end - mb->start, &memblock.reserved, mb->nid); in numa_clear_kernel_node_hotplug()
523 int nid = memblock_get_region_node(mb_region); in numa_clear_kernel_node_hotplug() local
525 if (nid != MAX_NUMNODES) in numa_clear_kernel_node_hotplug()
526 node_set(nid, reserved_nodemask); in numa_clear_kernel_node_hotplug()
540 if (!node_isset(mb->nid, reserved_nodemask)) in numa_clear_kernel_node_hotplug()
549 int i, nid; in numa_register_memblks() local
560 &memblock.memory, mb->nid); in numa_register_memblks()
590 for_each_node_mask(nid, node_possible_map) { in numa_register_memblks()
595 if (nid != mi->blk[i].nid) in numa_register_memblks()
611 alloc_node_data(nid); in numa_register_memblks()
684 int nid = early_cpu_to_node(i); in numa_init() local
686 if (nid == NUMA_NO_NODE) in numa_init()
688 if (!node_online(nid)) in numa_init()
741 static void __init init_memory_less_node(int nid) in init_memory_less_node() argument
744 alloc_node_data(nid); in init_memory_less_node()
745 free_area_init_memoryless_node(nid); in init_memory_less_node()
767 int nid; in init_gi_nodes() local
769 for_each_node_state(nid, N_GENERIC_INITIATOR) in init_gi_nodes()
770 if (!node_online(nid)) in init_gi_nodes()
771 init_memory_less_node(nid); in init_gi_nodes()
929 return mi->blk[i].nid; in meminfo_to_nid()
935 int nid = meminfo_to_nid(&numa_meminfo, start); in phys_to_target_node() local
941 if (nid != NUMA_NO_NODE) in phys_to_target_node()
942 return nid; in phys_to_target_node()
950 int nid = meminfo_to_nid(&numa_meminfo, start); in memory_add_physaddr_to_nid() local
952 if (nid == NUMA_NO_NODE) in memory_add_physaddr_to_nid()
953 nid = numa_meminfo.blk[0].nid; in memory_add_physaddr_to_nid()
954 return nid; in memory_add_physaddr_to_nid()