Lines Matching refs:nid
90 unsigned int *nid) in fake_numa_create_new_node() argument
102 *nid = fake_nid; in fake_numa_create_new_node()
129 *nid = fake_nid; in fake_numa_create_new_node()
171 int nid; in __associativity_to_nid() local
180 nid = of_read_number(&associativity[index], 1); in __associativity_to_nid()
183 if (nid == 0xffff || nid >= nr_node_ids) in __associativity_to_nid()
184 nid = NUMA_NO_NODE; in __associativity_to_nid()
185 return nid; in __associativity_to_nid()
274 int nid = NUMA_NO_NODE; in of_node_to_nid_single() local
279 nid = associativity_to_nid(tmp); in of_node_to_nid_single()
280 return nid; in of_node_to_nid_single()
286 int nid = NUMA_NO_NODE; in of_node_to_nid() local
290 nid = of_node_to_nid_single(device); in of_node_to_nid()
291 if (nid != -1) in of_node_to_nid()
298 return nid; in of_node_to_nid()
305 int i, nid; in __initialize_form1_numa_distance() local
310 nid = __associativity_to_nid(associativity, max_array_sz); in __initialize_form1_numa_distance()
311 if (nid != NUMA_NO_NODE) { in __initialize_form1_numa_distance()
323 distance_lookup_table[nid][i] = of_read_number(entry, 1); in __initialize_form1_numa_distance()
342 int nid; in update_numa_distance() local
358 nid = of_node_to_nid_single(node); in update_numa_distance()
359 if (nid == NUMA_NO_NODE) in update_numa_distance()
366 WARN(numa_distance_table[nid][nid] == -1, in update_numa_distance()
367 "NUMA distance details for node %d not provided\n", nid); in update_numa_distance()
587 int nid = default_nid; in get_nid_and_numa_distance() local
603 nid = __associativity_to_nid(associativity, aa.array_sz); in get_nid_and_numa_distance()
604 if (nid > 0 && affinity_form == FORM1_AFFINITY) { in get_nid_and_numa_distance()
612 return nid; in get_nid_and_numa_distance()
623 int nid = default_nid; in of_drconf_to_nid_single() local
639 nid = __associativity_to_nid(associativity, aa.array_sz); in of_drconf_to_nid_single()
641 return nid; in of_drconf_to_nid_single()
705 int nid = NUMA_NO_NODE; in numa_setup_cpu() local
720 nid = numa_cpu_lookup_table[fcpu]; in numa_setup_cpu()
721 if (nid >= 0) { in numa_setup_cpu()
722 map_cpu_to_node(lcpu, nid); in numa_setup_cpu()
723 return nid; in numa_setup_cpu()
726 nid = vphn_get_nid(lcpu); in numa_setup_cpu()
727 if (nid != NUMA_NO_NODE) in numa_setup_cpu()
740 nid = of_node_to_nid_single(cpu); in numa_setup_cpu()
744 if (nid < 0 || !node_possible(nid)) in numa_setup_cpu()
745 nid = first_online_node; in numa_setup_cpu()
757 map_cpu_to_node(fcpu, nid); in numa_setup_cpu()
760 map_cpu_to_node(lcpu, nid); in numa_setup_cpu()
762 return nid; in numa_setup_cpu()
789 int nid; in ppc_numa_cpu_prepare() local
791 nid = numa_setup_cpu(cpu); in ppc_numa_cpu_prepare()
792 verify_cpu_node_mapping(cpu, nid); in ppc_numa_cpu_prepare()
853 int nid; in numa_setup_drmem_lmb() local
882 nid = get_nid_and_numa_distance(lmb); in numa_setup_drmem_lmb()
884 &nid); in numa_setup_drmem_lmb()
885 node_set_online(nid); in numa_setup_drmem_lmb()
888 memblock_set_node(base, sz, &memblock.memory, nid); in numa_setup_drmem_lmb()
933 int nid = NUMA_NO_NODE; in parse_numa_properties() local
938 nid = associativity_to_nid(vphn_assoc); in parse_numa_properties()
952 nid = associativity_to_nid(associativity); in parse_numa_properties()
959 if (likely(nid >= 0)) in parse_numa_properties()
960 node_set_online(nid); in parse_numa_properties()
968 int nid; in parse_numa_properties() local
994 nid = associativity_to_nid(associativity); in parse_numa_properties()
997 nid = default_nid; in parse_numa_properties()
999 fake_numa_create_new_node(((start + size) >> PAGE_SHIFT), &nid); in parse_numa_properties()
1000 node_set_online(nid); in parse_numa_properties()
1004 memblock_set_node(start, size, &memblock.memory, nid); in parse_numa_properties()
1029 unsigned int nid = 0; in setup_nonnuma() local
1036 fake_numa_create_new_node(end_pfn, &nid); in setup_nonnuma()
1039 &memblock.memory, nid); in setup_nonnuma()
1040 node_set_online(nid); in setup_nonnuma()
1080 static void __init setup_node_data(int nid, u64 start_pfn, u64 end_pfn) in setup_node_data() argument
1088 nd_pa = memblock_phys_alloc_try_nid(nd_size, SMP_CACHE_BYTES, nid); in setup_node_data()
1091 nd_size, nid); in setup_node_data()
1099 if (tnid != nid) in setup_node_data()
1100 pr_info(" NODE_DATA(%d) on node %d\n", nid, tnid); in setup_node_data()
1102 node_data[nid] = nd; in setup_node_data()
1103 memset(NODE_DATA(nid), 0, sizeof(pg_data_t)); in setup_node_data()
1104 NODE_DATA(nid)->node_id = nid; in setup_node_data()
1105 NODE_DATA(nid)->node_start_pfn = start_pfn; in setup_node_data()
1106 NODE_DATA(nid)->node_spanned_pages = spanned_pages; in setup_node_data()
1208 int nid; in initmem_init() local
1212 for_each_online_node(nid) { in initmem_init()
1215 get_pfn_range_for_nid(nid, &start_pfn, &end_pfn); in initmem_init()
1216 setup_node_data(nid, start_pfn, end_pfn); in initmem_init()
1258 int nid = NUMA_NO_NODE; in hot_add_drconf_scn_to_nid() local
1273 nid = of_drconf_to_nid_single(lmb); in hot_add_drconf_scn_to_nid()
1277 return nid; in hot_add_drconf_scn_to_nid()
1288 int nid = NUMA_NO_NODE; in hot_add_node_scn_to_nid() local
1310 nid = of_node_to_nid_single(memory); in hot_add_node_scn_to_nid()
1314 if (nid >= 0) in hot_add_node_scn_to_nid()
1320 return nid; in hot_add_node_scn_to_nid()
1331 int nid; in hot_add_scn_to_nid() local
1338 nid = hot_add_drconf_scn_to_nid(scn_addr); in hot_add_scn_to_nid()
1341 nid = hot_add_node_scn_to_nid(scn_addr); in hot_add_scn_to_nid()
1344 if (nid < 0 || !node_possible(nid)) in hot_add_scn_to_nid()
1345 nid = first_online_node; in hot_add_scn_to_nid()
1347 return nid; in hot_add_scn_to_nid()