Lines Matching refs:nid

91 						unsigned int *nid)  in fake_numa_create_new_node()  argument
103 *nid = fake_nid; in fake_numa_create_new_node()
130 *nid = fake_nid; in fake_numa_create_new_node()
172 int nid; in __associativity_to_nid() local
181 nid = of_read_number(&associativity[index], 1); in __associativity_to_nid()
184 if (nid == 0xffff || nid >= nr_node_ids) in __associativity_to_nid()
185 nid = NUMA_NO_NODE; in __associativity_to_nid()
186 return nid; in __associativity_to_nid()
275 int nid = NUMA_NO_NODE; in of_node_to_nid_single() local
280 nid = associativity_to_nid(tmp); in of_node_to_nid_single()
281 return nid; in of_node_to_nid_single()
287 int nid = NUMA_NO_NODE; in of_node_to_nid() local
291 nid = of_node_to_nid_single(device); in of_node_to_nid()
292 if (nid != -1) in of_node_to_nid()
299 return nid; in of_node_to_nid()
306 int i, nid; in __initialize_form1_numa_distance() local
311 nid = __associativity_to_nid(associativity, max_array_sz); in __initialize_form1_numa_distance()
312 if (nid != NUMA_NO_NODE) { in __initialize_form1_numa_distance()
324 distance_lookup_table[nid][i] = of_read_number(entry, 1); in __initialize_form1_numa_distance()
343 int nid; in update_numa_distance() local
359 nid = of_node_to_nid_single(node); in update_numa_distance()
360 if (nid == NUMA_NO_NODE) in update_numa_distance()
367 WARN(numa_distance_table[nid][nid] == -1, in update_numa_distance()
368 "NUMA distance details for node %d not provided\n", nid); in update_numa_distance()
588 int nid = default_nid; in get_nid_and_numa_distance() local
604 nid = __associativity_to_nid(associativity, aa.array_sz); in get_nid_and_numa_distance()
605 if (nid > 0 && affinity_form == FORM1_AFFINITY) { in get_nid_and_numa_distance()
613 return nid; in get_nid_and_numa_distance()
624 int nid = default_nid; in of_drconf_to_nid_single() local
640 nid = __associativity_to_nid(associativity, aa.array_sz); in of_drconf_to_nid_single()
642 return nid; in of_drconf_to_nid_single()
706 int nid = NUMA_NO_NODE; in numa_setup_cpu() local
721 nid = numa_cpu_lookup_table[fcpu]; in numa_setup_cpu()
722 if (nid >= 0) { in numa_setup_cpu()
723 map_cpu_to_node(lcpu, nid); in numa_setup_cpu()
724 return nid; in numa_setup_cpu()
727 nid = vphn_get_nid(lcpu); in numa_setup_cpu()
728 if (nid != NUMA_NO_NODE) in numa_setup_cpu()
741 nid = of_node_to_nid_single(cpu); in numa_setup_cpu()
745 if (nid < 0 || !node_possible(nid)) in numa_setup_cpu()
746 nid = first_online_node; in numa_setup_cpu()
758 map_cpu_to_node(fcpu, nid); in numa_setup_cpu()
761 map_cpu_to_node(lcpu, nid); in numa_setup_cpu()
763 return nid; in numa_setup_cpu()
790 int nid; in ppc_numa_cpu_prepare() local
792 nid = numa_setup_cpu(cpu); in ppc_numa_cpu_prepare()
793 verify_cpu_node_mapping(cpu, nid); in ppc_numa_cpu_prepare()
854 int nid; in numa_setup_drmem_lmb() local
883 nid = get_nid_and_numa_distance(lmb); in numa_setup_drmem_lmb()
885 &nid); in numa_setup_drmem_lmb()
886 node_set_online(nid); in numa_setup_drmem_lmb()
889 memblock_set_node(base, sz, &memblock.memory, nid); in numa_setup_drmem_lmb()
934 int nid = NUMA_NO_NODE; in parse_numa_properties() local
939 nid = associativity_to_nid(vphn_assoc); in parse_numa_properties()
953 nid = associativity_to_nid(associativity); in parse_numa_properties()
959 node_set_online(nid); in parse_numa_properties()
967 int nid; in parse_numa_properties() local
993 nid = associativity_to_nid(associativity); in parse_numa_properties()
996 nid = default_nid; in parse_numa_properties()
998 fake_numa_create_new_node(((start + size) >> PAGE_SHIFT), &nid); in parse_numa_properties()
999 node_set_online(nid); in parse_numa_properties()
1003 memblock_set_node(start, size, &memblock.memory, nid); in parse_numa_properties()
1028 unsigned int nid = 0; in setup_nonnuma() local
1035 fake_numa_create_new_node(end_pfn, &nid); in setup_nonnuma()
1038 &memblock.memory, nid); in setup_nonnuma()
1039 node_set_online(nid); in setup_nonnuma()
1079 static void __init setup_node_data(int nid, u64 start_pfn, u64 end_pfn) in setup_node_data() argument
1087 nd_pa = memblock_phys_alloc_try_nid(nd_size, SMP_CACHE_BYTES, nid); in setup_node_data()
1090 nd_size, nid); in setup_node_data()
1098 if (tnid != nid) in setup_node_data()
1099 pr_info(" NODE_DATA(%d) on node %d\n", nid, tnid); in setup_node_data()
1101 node_data[nid] = nd; in setup_node_data()
1102 memset(NODE_DATA(nid), 0, sizeof(pg_data_t)); in setup_node_data()
1103 NODE_DATA(nid)->node_id = nid; in setup_node_data()
1104 NODE_DATA(nid)->node_start_pfn = start_pfn; in setup_node_data()
1105 NODE_DATA(nid)->node_spanned_pages = spanned_pages; in setup_node_data()
1204 int nid; in initmem_init() local
1211 for_each_online_node(nid) { in initmem_init()
1214 get_pfn_range_for_nid(nid, &start_pfn, &end_pfn); in initmem_init()
1215 setup_node_data(nid, start_pfn, end_pfn); in initmem_init()
1257 int nid = NUMA_NO_NODE; in hot_add_drconf_scn_to_nid() local
1272 nid = of_drconf_to_nid_single(lmb); in hot_add_drconf_scn_to_nid()
1276 return nid; in hot_add_drconf_scn_to_nid()
1287 int nid = NUMA_NO_NODE; in hot_add_node_scn_to_nid() local
1309 nid = of_node_to_nid_single(memory); in hot_add_node_scn_to_nid()
1313 if (nid >= 0) in hot_add_node_scn_to_nid()
1319 return nid; in hot_add_node_scn_to_nid()
1330 int nid; in hot_add_scn_to_nid() local
1337 nid = hot_add_drconf_scn_to_nid(scn_addr); in hot_add_scn_to_nid()
1340 nid = hot_add_node_scn_to_nid(scn_addr); in hot_add_scn_to_nid()
1343 if (nid < 0 || !node_possible(nid)) in hot_add_scn_to_nid()
1344 nid = first_online_node; in hot_add_scn_to_nid()
1346 return nid; in hot_add_scn_to_nid()