Lines Matching +full:assoc +full:- +full:weight
143 numa_cpu_lookup_table[cpu] = -1; in reset_numa_cpu_lookup_table()
209 entry = &associativity[be32_to_cpu(distance_ref_points[i]) - 1]; in initialize_distance_lookup_table()
214 /* Returns nid in the range [0..MAX_NUMNODES-1], or -1 if no useful numa
219 int nid = -1; in associativity_to_nid()
221 if (min_common_depth == -1) in associativity_to_nid()
229 nid = -1; in associativity_to_nid()
244 * or -1 if not found.
248 int nid = -1; in of_node_to_nid_single()
260 int nid = -1; in of_node_to_nid()
265 if (nid != -1) in of_node_to_nid()
289 * This property is a set of 32-bit integers, each representing in find_min_common_depth()
301 "ibm,associativity-reference-points", in find_min_common_depth()
305 dbg("NUMA: ibm,associativity-reference-points not found.\n"); in find_min_common_depth()
322 "short ibm,associativity-reference-points\n"); in find_min_common_depth()
344 return -1; in find_min_common_depth()
364 while (n--) { in read_n_cells()
379 * memory from the ibm,associativity-lookup-arrays property of the
382 * The layout of the ibm,associativity-lookup-arrays property is a number N
393 memory = of_find_node_by_path("/ibm,dynamic-reconfiguration-memory"); in of_get_assoc_arrays()
395 return -1; in of_get_assoc_arrays()
397 prop = of_get_property(memory, "ibm,associativity-lookup-arrays", &len); in of_get_assoc_arrays()
400 return -1; in of_get_assoc_arrays()
403 aa->n_arrays = of_read_number(prop++, 1); in of_get_assoc_arrays()
404 aa->array_sz = of_read_number(prop++, 1); in of_get_assoc_arrays()
411 if (len < (aa->n_arrays * aa->array_sz + 2) * sizeof(unsigned int)) in of_get_assoc_arrays()
412 return -1; in of_get_assoc_arrays()
414 aa->arrays = prop; in of_get_assoc_arrays()
420 * ibm,dynamic-reconfiguration-memory node.
434 !(lmb->flags & DRCONF_MEM_AI_INVALID) && in of_drconf_to_nid_single()
435 lmb->aa_index < aa.n_arrays) { in of_drconf_to_nid_single()
436 index = lmb->aa_index * aa.array_sz + min_common_depth - 1; in of_drconf_to_nid_single()
443 index = lmb->aa_index * aa.array_sz; in of_drconf_to_nid_single()
458 int nid = -1; in numa_setup_cpu()
462 * If a valid cpu-to-node mapping is already available, use it in numa_setup_cpu()
556 return memblock_end_of_DRAM() - start; in numa_enforce_memory_limit()
561 * linux,drconf-usable-memory property
566 * For each lmb in ibm,dynamic-memory a corresponding in read_usm_ranges()
567 * entry in linux,drconf-usable-memory property contains in read_usm_ranges()
569 * read the counter from linux,drconf-usable-memory in read_usm_ranges()
575 * Extract NUMA information from the ibm,dynamic-reconfiguration-memory
589 if ((lmb->flags & DRCONF_MEM_RESERVED) in numa_setup_drmem_lmb()
590 || !(lmb->flags & DRCONF_MEM_ASSIGNED)) in numa_setup_drmem_lmb()
596 base = lmb->base_addr; in numa_setup_drmem_lmb()
619 } while (--ranges); in numa_setup_drmem_lmb()
630 return -1; in parse_numa_properties()
655 * Don't fall back to default_nid yet -- we will plug in parse_numa_properties()
675 "linux,usable-memory", &len); in parse_numa_properties()
684 /* these are order-sensitive, and modify the buffer pointer */ in parse_numa_properties()
704 if (--ranges) in parse_numa_properties()
710 * ibm,dynamic-memory property in the in parse_numa_properties()
711 * ibm,dynamic-reconfiguration-memory node. in parse_numa_properties()
713 memory = of_find_node_by_path("/ibm,dynamic-reconfiguration-memory"); in parse_numa_properties()
733 (top_of_ram - total_ram) >> 20); in setup_nonnuma()
741 PFN_PHYS(end_pfn - start_pfn), in setup_nonnuma()
752 if (min_common_depth == -1 || !numa_enabled) in dump_numa_cpu_topology()
771 pr_cont("-%u", cpu - 1); in dump_numa_cpu_topology()
777 pr_cont("-%u", nr_cpu_ids - 1); in dump_numa_cpu_topology()
785 u64 spanned_pages = end_pfn - start_pfn; in setup_node_data()
795 pr_info(" NODE_DATA [mem %#010Lx-%#010Lx]\n", in setup_node_data()
796 nd_pa, nd_pa + nd_size - 1); in setup_node_data()
803 NODE_DATA(nid)->node_id = nid; in setup_node_data()
804 NODE_DATA(nid)->node_start_pfn = start_pfn; in setup_node_data()
805 NODE_DATA(nid)->node_spanned_pages = spanned_pages; in setup_node_data()
821 "ibm,max-associativity-domains", in find_possible_nodes()
928 * ibm,dynamic-reconfiguration-memory/ibm,dynamic-memory.
934 int nid = -1; in hot_add_drconf_scn_to_nid()
941 if ((lmb->flags & DRCONF_MEM_RESERVED) in hot_add_drconf_scn_to_nid()
942 || !(lmb->flags & DRCONF_MEM_ASSIGNED)) in hot_add_drconf_scn_to_nid()
945 if ((scn_addr < lmb->base_addr) in hot_add_drconf_scn_to_nid()
946 || (scn_addr >= (lmb->base_addr + lmb_size))) in hot_add_drconf_scn_to_nid()
964 int nid = -1; in hot_add_node_scn_to_nid()
979 while (ranges--) { in hot_add_node_scn_to_nid()
1012 memory = of_find_node_by_path("/ibm,dynamic-reconfiguration-memory"); in hot_add_scn_to_nid()
1034 lrdr = of_get_property(dn, "ibm,lrdr-capacity", NULL); in hot_add_drconf_memory_max()
1040 memory = of_find_node_by_path("/ibm,dynamic-reconfiguration-memory"); in hot_add_drconf_memory_max()
1049 * memory_hotplug_max - return max address of memory that may be added
1123 * ibm,associativity-reference-points property. When an associativity
1229 * to deal with more memoryless-node error conditions. in find_and_online_cpu_nid()
1251 return -EINVAL; in update_cpu_topology()
1255 for (update = data; update; update = update->next) { in update_cpu_topology()
1256 int new_nid = update->new_nid; in update_cpu_topology()
1257 if (cpu != update->cpu) in update_cpu_topology()
1275 return -EINVAL; in update_lookup_table()
1278 * Upon topology update, the numa-cpu lookup table needs to be updated in update_lookup_table()
1280 * future hotplug operations respect the cpu-to-node associativity in update_lookup_table()
1283 for (update = data; update; update = update->next) { in update_lookup_table()
1286 nid = update->new_nid; in update_lookup_table()
1287 base = cpu_first_thread_sibling(update->cpu); in update_lookup_table()
1309 int weight, new_nid, i = 0; in numa_update_cpu_topology() local
1314 weight = cpumask_weight(&cpu_associativity_changes_mask); in numa_update_cpu_topology()
1315 if (!weight) in numa_update_cpu_topology()
1318 updates = kcalloc(weight, sizeof(*updates), GFP_KERNEL); in numa_update_cpu_topology()
1347 dbg("Assoc chg gives same node %d for cpu%d\n", in numa_update_cpu_topology()
1355 ud->next = &updates[i]; in numa_update_cpu_topology()
1356 ud->cpu = sibling; in numa_update_cpu_topology()
1357 ud->new_nid = new_nid; in numa_update_cpu_topology()
1358 ud->old_nid = numa_cpu_lookup_table[sibling]; in numa_update_cpu_topology()
1369 updates[i-1].next = NULL; in numa_update_cpu_topology()
1373 for (ud = &updates[0]; ud; ud = ud->next) { in numa_update_cpu_topology()
1375 "to %d\n", ud->cpu, in numa_update_cpu_topology()
1376 ud->old_nid, ud->new_nid); in numa_update_cpu_topology()
1383 * skip invoking update_cpu_topology() via stop-machine(). This is in numa_update_cpu_topology()
1384 * necessary (and not just a fast-path optimization) since stop-machine in numa_update_cpu_topology()
1386 * thus trick us into setting up incorrect cpu-node mappings (since in numa_update_cpu_topology()
1401 * Update the numa-cpu lookup table with the new mappings, even for in numa_update_cpu_topology()
1402 * offline CPUs. It is best to perform this update from the stop- in numa_update_cpu_topology()
1412 for (ud = &updates[0]; ud; ud = ud->next) { in numa_update_cpu_topology()
1413 unregister_cpu_under_node(ud->cpu, ud->old_nid); in numa_update_cpu_topology()
1414 register_cpu_under_node(ud->cpu, ud->new_nid); in numa_update_cpu_topology()
1416 dev = get_cpu_device(ud->cpu); in numa_update_cpu_topology()
1418 kobject_uevent(&dev->kobj, KOBJ_CHANGE); in numa_update_cpu_topology()
1419 cpumask_clear_cpu(ud->cpu, &cpu_associativity_changes_mask); in numa_update_cpu_topology()
1472 if (!of_prop_cmp(update->dn->type, "cpu") && in dt_update_callback()
1473 !of_prop_cmp(update->prop->name, "ibm,associativity")) { in dt_update_callback()
1475 of_property_read_u32(update->dn, "reg", &core_id); in dt_update_callback()
1584 return -EINVAL; in topology_write()
1595 return -EINVAL; in topology_write()
1615 return -ENOMEM; in topology_update_init()