Lines Matching defs:nid
66 int nid = cpu_to_node(cpu);
68 if (nid == NUMA_NO_NODE)
72 cpumask_clear_cpu(cpu, node_to_cpumask_map[nid]);
74 cpumask_set_cpu(cpu, node_to_cpumask_map[nid]);
126 void __init early_map_cpu_to_node(unsigned int cpu, int nid)
129 if (nid < 0 || nid >= MAX_NUMNODES || numa_off)
130 nid = 0;
132 cpu_to_node_map[cpu] = nid;
140 set_cpu_numa_node(cpu, nid);
194 * @nid: NUMA node ID of the new memblk
201 int __init numa_add_memblk(int nid, u64 start, u64 end)
205 ret = memblock_set_node(start, (end - start), &memblock.memory, nid);
208 start, (end - 1), nid);
212 node_set(nid, numa_nodes_parsed);
219 static void __init setup_node_data(int nid, u64 start_pfn, u64 end_pfn)
227 pr_info("Initmem setup node %d [<memory-less node>]\n", nid);
229 nd_pa = memblock_phys_alloc_try_nid(nd_size, SMP_CACHE_BYTES, nid);
232 nd_size, nid);
240 if (tnid != nid)
241 pr_info("NODE_DATA(%d) on node %d\n", nid, tnid);
243 node_data[nid] = nd;
244 memset(NODE_DATA(nid), 0, sizeof(pg_data_t));
245 NODE_DATA(nid)->node_id = nid;
246 NODE_DATA(nid)->node_start_pfn = start_pfn;
247 NODE_DATA(nid)->node_spanned_pages = end_pfn - start_pfn;
345 int nid;
348 /* Check that valid nid is set to memblks */
362 for_each_node_mask(nid, numa_nodes_parsed) {
365 get_pfn_range_for_nid(nid, &start_pfn, &end_pfn);
366 setup_node_data(nid, start_pfn, end_pfn);
367 node_set_online(nid);