Lines Matching refs:nid

92 						unsigned int *nid)  in fake_numa_create_new_node()  argument
104 *nid = fake_nid; in fake_numa_create_new_node()
131 *nid = fake_nid; in fake_numa_create_new_node()
173 int nid; in __associativity_to_nid() local
182 nid = of_read_number(&associativity[index], 1); in __associativity_to_nid()
185 if (nid == 0xffff || nid >= nr_node_ids) in __associativity_to_nid()
186 nid = NUMA_NO_NODE; in __associativity_to_nid()
187 return nid; in __associativity_to_nid()
276 int nid = NUMA_NO_NODE; in of_node_to_nid_single() local
281 nid = associativity_to_nid(tmp); in of_node_to_nid_single()
282 return nid; in of_node_to_nid_single()
288 int nid = NUMA_NO_NODE; in of_node_to_nid() local
292 nid = of_node_to_nid_single(device); in of_node_to_nid()
293 if (nid != -1) in of_node_to_nid()
300 return nid; in of_node_to_nid()
307 int i, nid; in __initialize_form1_numa_distance() local
312 nid = __associativity_to_nid(associativity, max_array_sz); in __initialize_form1_numa_distance()
313 if (nid != NUMA_NO_NODE) { in __initialize_form1_numa_distance()
325 distance_lookup_table[nid][i] = of_read_number(entry, 1); in __initialize_form1_numa_distance()
344 int nid; in update_numa_distance() local
360 nid = of_node_to_nid_single(node); in update_numa_distance()
361 if (nid == NUMA_NO_NODE) in update_numa_distance()
368 WARN(numa_distance_table[nid][nid] == -1, in update_numa_distance()
369 "NUMA distance details for node %d not provided\n", nid); in update_numa_distance()
590 int nid = default_nid; in get_nid_and_numa_distance() local
606 nid = __associativity_to_nid(associativity, aa.array_sz); in get_nid_and_numa_distance()
607 if (nid > 0 && affinity_form == FORM1_AFFINITY) { in get_nid_and_numa_distance()
615 return nid; in get_nid_and_numa_distance()
626 int nid = default_nid; in of_drconf_to_nid_single() local
642 nid = __associativity_to_nid(associativity, aa.array_sz); in of_drconf_to_nid_single()
644 return nid; in of_drconf_to_nid_single()
708 int nid = NUMA_NO_NODE; in numa_setup_cpu() local
723 nid = numa_cpu_lookup_table[fcpu]; in numa_setup_cpu()
724 if (nid >= 0) { in numa_setup_cpu()
725 map_cpu_to_node(lcpu, nid); in numa_setup_cpu()
726 return nid; in numa_setup_cpu()
729 nid = vphn_get_nid(lcpu); in numa_setup_cpu()
730 if (nid != NUMA_NO_NODE) in numa_setup_cpu()
743 nid = of_node_to_nid_single(cpu); in numa_setup_cpu()
747 if (nid < 0 || !node_possible(nid)) in numa_setup_cpu()
748 nid = first_online_node; in numa_setup_cpu()
760 map_cpu_to_node(fcpu, nid); in numa_setup_cpu()
763 map_cpu_to_node(lcpu, nid); in numa_setup_cpu()
765 return nid; in numa_setup_cpu()
792 int nid; in ppc_numa_cpu_prepare() local
794 nid = numa_setup_cpu(cpu); in ppc_numa_cpu_prepare()
795 verify_cpu_node_mapping(cpu, nid); in ppc_numa_cpu_prepare()
856 int nid; in numa_setup_drmem_lmb() local
885 nid = get_nid_and_numa_distance(lmb); in numa_setup_drmem_lmb()
887 &nid); in numa_setup_drmem_lmb()
888 node_set_online(nid); in numa_setup_drmem_lmb()
891 memblock_set_node(base, sz, &memblock.memory, nid); in numa_setup_drmem_lmb()
936 int nid = NUMA_NO_NODE; in parse_numa_properties() local
941 nid = associativity_to_nid(vphn_assoc); in parse_numa_properties()
955 nid = associativity_to_nid(associativity); in parse_numa_properties()
962 if (likely(nid >= 0)) in parse_numa_properties()
963 node_set_online(nid); in parse_numa_properties()
971 int nid; in parse_numa_properties() local
997 nid = associativity_to_nid(associativity); in parse_numa_properties()
1000 nid = default_nid; in parse_numa_properties()
1002 fake_numa_create_new_node(((start + size) >> PAGE_SHIFT), &nid); in parse_numa_properties()
1003 node_set_online(nid); in parse_numa_properties()
1007 memblock_set_node(start, size, &memblock.memory, nid); in parse_numa_properties()
1032 unsigned int nid = 0; in setup_nonnuma() local
1039 fake_numa_create_new_node(end_pfn, &nid); in setup_nonnuma()
1042 &memblock.memory, nid); in setup_nonnuma()
1043 node_set_online(nid); in setup_nonnuma()
1083 static void __init setup_node_data(int nid, u64 start_pfn, u64 end_pfn) in setup_node_data() argument
1091 nd_pa = memblock_phys_alloc_try_nid(nd_size, SMP_CACHE_BYTES, nid); in setup_node_data()
1094 nd_size, nid); in setup_node_data()
1102 if (tnid != nid) in setup_node_data()
1103 pr_info(" NODE_DATA(%d) on node %d\n", nid, tnid); in setup_node_data()
1105 node_data[nid] = nd; in setup_node_data()
1106 memset(NODE_DATA(nid), 0, sizeof(pg_data_t)); in setup_node_data()
1107 NODE_DATA(nid)->node_id = nid; in setup_node_data()
1108 NODE_DATA(nid)->node_start_pfn = start_pfn; in setup_node_data()
1109 NODE_DATA(nid)->node_spanned_pages = spanned_pages; in setup_node_data()
1211 int nid; in initmem_init() local
1215 for_each_online_node(nid) { in initmem_init()
1218 get_pfn_range_for_nid(nid, &start_pfn, &end_pfn); in initmem_init()
1219 setup_node_data(nid, start_pfn, end_pfn); in initmem_init()
1261 int nid = NUMA_NO_NODE; in hot_add_drconf_scn_to_nid() local
1276 nid = of_drconf_to_nid_single(lmb); in hot_add_drconf_scn_to_nid()
1280 return nid; in hot_add_drconf_scn_to_nid()
1291 int nid = NUMA_NO_NODE; in hot_add_node_scn_to_nid() local
1305 nid = of_node_to_nid_single(memory); in hot_add_node_scn_to_nid()
1309 if (nid >= 0) in hot_add_node_scn_to_nid()
1315 return nid; in hot_add_node_scn_to_nid()
1326 int nid; in hot_add_scn_to_nid() local
1333 nid = hot_add_drconf_scn_to_nid(scn_addr); in hot_add_scn_to_nid()
1336 nid = hot_add_node_scn_to_nid(scn_addr); in hot_add_scn_to_nid()
1339 if (nid < 0 || !node_possible(nid)) in hot_add_scn_to_nid()
1340 nid = first_online_node; in hot_add_scn_to_nid()
1342 return nid; in hot_add_scn_to_nid()