Lines Matching refs:nid
125 static int __init numa_add_memblk_to(int nid, u64 start, u64 end,
133 if (start > end || nid < 0 || nid >= MAX_NUMNODES) {
135 nid, start, end - 1);
146 mi->blk[mi->nr_blks].nid = nid;
181 * @nid: NUMA node ID of the new memblk
190 int __init numa_add_memblk(int nid, u64 start, u64 end)
192 return numa_add_memblk_to(nid, start, end, &numa_meminfo);
196 static void __init alloc_node_data(int nid)
207 nd_pa = memblock_phys_alloc_try_nid(nd_size, SMP_CACHE_BYTES, nid);
210 nd_size, nid);
216 printk(KERN_INFO "NODE_DATA(%d) allocated [mem %#010Lx-%#010Lx]\n", nid,
219 if (tnid != nid)
220 printk(KERN_INFO " NODE_DATA(%d) on node %d\n", nid, tnid);
222 node_data[nid] = nd;
223 memset(NODE_DATA(nid), 0, sizeof(pg_data_t));
225 node_set_online(nid);
260 numa_add_memblk_to(bi->nid, high, bi->end,
280 * about but allow overlaps of the same nid. They
284 if (bi->nid != bj->nid) {
286 bi->nid, bi->start, bi->end - 1,
287 bj->nid, bj->start, bj->end - 1);
291 bi->nid, bi->start, bi->end - 1,
300 if (bi->nid != bj->nid)
307 if (bi->nid == bk->nid)
315 bi->nid, bi->start, bi->end - 1, bj->start,
326 mi->blk[i].nid = NUMA_NO_NODE;
342 mi->blk[i].nid != NUMA_NO_NODE)
343 node_set(mi->blk[i].nid, *nodemask);
465 numaram -= __absent_pages_in_range(mi->blk[i].nid, s, e);
502 * and use those ranges to set the nid in memblock.reserved.
510 ret = memblock_set_node(mb->start, mb->end - mb->start, &memblock.reserved, mb->nid);
524 int nid = memblock_get_region_node(mb_region);
526 if (nid != MAX_NUMNODES)
527 node_set(nid, reserved_nodemask);
541 if (!node_isset(mb->nid, reserved_nodemask))
550 int i, nid;
561 &memblock.memory, mb->nid);
574 * If sections array is gonna be used for pfn -> nid mapping, check
591 for_each_node_mask(nid, node_possible_map) {
596 if (nid != mi->blk[i].nid)
605 alloc_node_data(nid);
678 int nid = early_cpu_to_node(i);
680 if (nid == NUMA_NO_NODE)
682 if (!node_online(nid))
735 static void __init init_memory_less_node(int nid)
738 alloc_node_data(nid);
739 free_area_init_memoryless_node(nid);
753 * node_data[nid] is needed for zone list setup in build_all_zonelists().
761 int nid;
763 for_each_node_state(nid, N_GENERIC_INITIATOR)
764 if (!node_online(nid))
765 init_memory_less_node(nid);
923 return mi->blk[i].nid;
929 int nid = meminfo_to_nid(&numa_meminfo, start);
935 if (nid != NUMA_NO_NODE)
936 return nid;
944 int nid = meminfo_to_nid(&numa_meminfo, start);
946 if (nid == NUMA_NO_NODE)
947 nid = numa_meminfo.blk[0].nid;
948 return nid;