Lines Matching +full:used +full:- +full:by +full:- +full:rtas
1 // SPDX-License-Identifier: GPL-2.0-or-later
63 [0 ... MAX_NUMNODES - 1] = { [0 ... MAX_NUMNODES - 1] = -1 }
65 static int numa_id_index_table[MAX_NUMNODES] = { [0 ... MAX_NUMNODES - 1] = NUMA_NO_NODE };
141 numa_cpu_lookup_table[cpu] = -1; in reset_numa_cpu_lookup_table()
175 int index = primary_domain_index - 1; in __associativity_to_nid()
188 * Returns nid in the range [0..nr_node_ids], or -1 if no useful NUMA
270 * or -1 if not found.
291 if (nid != -1) in of_node_to_nid()
314 int index = be32_to_cpu(distance_ref_points[i]) - 1; in __initialize_form1_numa_distance()
338 * Used to update distance information w.r.t newly added node.
366 WARN(numa_distance_table[nid][nid] == -1, in update_numa_distance()
372 * ibm,numa-lookup-index-table= {N, domainid1, domainid2, ..... domainidN}
373 * ibm,numa-distance-table = { N, 1, 2, 4, 5, 1, 6, .... N elements}
387 root = of_find_node_by_path("/rtas"); in initialize_form2_numa_distance_lookup_table()
391 numa_lookup_index = of_get_property(root, "ibm,numa-lookup-index-table", NULL); in initialize_form2_numa_distance_lookup_table()
394 /* first element of the array is the size and is encode-int */ in initialize_form2_numa_distance_lookup_table()
395 form2_distances = of_get_property(root, "ibm,numa-distance-table", NULL); in initialize_form2_numa_distance_lookup_table()
455 root = of_find_node_by_path("/rtas"); in find_primary_domain_index()
460 * This property is a set of 32-bit integers, each representing in find_primary_domain_index()
472 "ibm,associativity-reference-points", in find_primary_domain_index()
476 pr_debug("ibm,associativity-reference-points not found.\n"); in find_primary_domain_index()
483 pr_warn("short ibm,associativity-reference-points\n"); in find_primary_domain_index()
510 return -1; in find_primary_domain_index()
530 while (n--) { in read_n_cells()
545 * memory from the ibm,associativity-lookup-arrays property of the
548 * The layout of the ibm,associativity-lookup-arrays property is a number N
549 * indicating the number of associativity arrays, followed by a number M
550 * indicating the size of each associativity array, followed by a list
559 memory = of_find_node_by_path("/ibm,dynamic-reconfiguration-memory"); in of_get_assoc_arrays()
561 return -1; in of_get_assoc_arrays()
563 prop = of_get_property(memory, "ibm,associativity-lookup-arrays", &len); in of_get_assoc_arrays()
566 return -1; in of_get_assoc_arrays()
569 aa->n_arrays = of_read_number(prop++, 1); in of_get_assoc_arrays()
570 aa->array_sz = of_read_number(prop++, 1); in of_get_assoc_arrays()
577 if (len < (aa->n_arrays * aa->array_sz + 2) * sizeof(unsigned int)) in of_get_assoc_arrays()
578 return -1; in of_get_assoc_arrays()
580 aa->arrays = prop; in of_get_assoc_arrays()
599 !(lmb->flags & DRCONF_MEM_AI_INVALID) && lmb->aa_index < aa.n_arrays) { in get_nid_and_numa_distance()
602 index = lmb->aa_index * aa.array_sz; in get_nid_and_numa_distance()
618 * ibm,dynamic-reconfiguration-memory node.
635 !(lmb->flags & DRCONF_MEM_AI_INVALID) && lmb->aa_index < aa.n_arrays) { in of_drconf_to_nid_single()
638 index = lmb->aa_index * aa.array_sz; in of_drconf_to_nid_single()
671 return -1; in __vphn_get_associativity()
689 return -1; in __vphn_get_associativity()
700 * Return the id of the domain used.
714 * If a valid cpu-to-node mapping is already available, use it in numa_setup_cpu()
716 * the most recent mapping notified to us by the platform (eg: VPHN). in numa_setup_cpu()
718 * core. If a valid cpu-to-node mapping is already available, for in numa_setup_cpu()
826 return memblock_end_of_DRAM() - start; in numa_enforce_memory_limit()
831 * linux,drconf-usable-memory property
836 * For each lmb in ibm,dynamic-memory a corresponding in read_usm_ranges()
837 * entry in linux,drconf-usable-memory property contains in read_usm_ranges()
838 * a counter followed by that many (base, size) duple. in read_usm_ranges()
839 * read the counter from linux,drconf-usable-memory in read_usm_ranges()
845 * Extract NUMA information from the ibm,dynamic-reconfiguration-memory
860 if ((lmb->flags & DRCONF_MEM_RESERVED) in numa_setup_drmem_lmb()
861 || !(lmb->flags & DRCONF_MEM_ASSIGNED)) in numa_setup_drmem_lmb()
867 base = lmb->base_addr; in numa_setup_drmem_lmb()
890 } while (--ranges); in numa_setup_drmem_lmb()
903 pr_warn("disabled by user\n"); in parse_numa_properties()
904 return -1; in parse_numa_properties()
944 * Don't fall back to default_nid yet -- we will plug in parse_numa_properties()
975 "linux,usable-memory", &len); in parse_numa_properties()
984 /* these are order-sensitive, and modify the buffer pointer */ in parse_numa_properties()
1007 if (--ranges) in parse_numa_properties()
1025 * ibm,dynamic-memory property in the in parse_numa_properties()
1026 * ibm,dynamic-reconfiguration-memory node. in parse_numa_properties()
1028 memory = of_find_node_by_path("/ibm,dynamic-reconfiguration-memory"); in parse_numa_properties()
1046 pr_debug("Memory hole size: %ldMB\n", (top_of_ram - total_ram) >> 20); in setup_nonnuma()
1051 PFN_PHYS(end_pfn - start_pfn), in setup_nonnuma()
1070 * If we used a CPU iterator here we would miss printing in dump_numa_cpu_topology()
1081 pr_cont("-%u", cpu - 1); in dump_numa_cpu_topology()
1087 pr_cont("-%u", nr_cpu_ids - 1); in dump_numa_cpu_topology()
1095 u64 spanned_pages = end_pfn - start_pfn; in setup_node_data()
1099 NODE_DATA(nid)->node_id = nid; in setup_node_data()
1100 NODE_DATA(nid)->node_start_pfn = start_pfn; in setup_node_data()
1101 NODE_DATA(nid)->node_spanned_pages = spanned_pages; in setup_node_data()
1106 struct device_node *rtas, *root; in find_possible_nodes() local
1114 rtas = of_find_node_by_path("/rtas"); in find_possible_nodes()
1115 if (!rtas) in find_possible_nodes()
1119 * ibm,current-associativity-domains is a fairly recent property. If in find_possible_nodes()
1120 * it doesn't exist, then fallback on ibm,max-associativity-domains. in find_possible_nodes()
1128 if (!of_get_property(root, "ibm,migratable-partition", NULL)) in find_possible_nodes()
1129 domains = of_get_property(rtas, in find_possible_nodes()
1130 "ibm,current-associativity-domains", in find_possible_nodes()
1134 domains = of_get_property(rtas, "ibm,max-associativity-domains", in find_possible_nodes()
1153 of_node_put(rtas); in find_possible_nodes()
1192 * Powerpc with CONFIG_NUMA always used to have a node 0, in mem_topology_setup()
1222 * _nocalls() + manual invocation is used because cpuhp is not yet in initmem_init()
1248 * memory represented in the device tree by the property
1249 * ibm,dynamic-reconfiguration-memory/ibm,dynamic-memory.
1262 if ((lmb->flags & DRCONF_MEM_RESERVED) in hot_add_drconf_scn_to_nid()
1263 || !(lmb->flags & DRCONF_MEM_ASSIGNED)) in hot_add_drconf_scn_to_nid()
1266 if ((scn_addr < lmb->base_addr) in hot_add_drconf_scn_to_nid()
1267 || (scn_addr >= (lmb->base_addr + lmb_size))) in hot_add_drconf_scn_to_nid()
1325 memory = of_find_node_by_path("/ibm,dynamic-reconfiguration-memory"); in hot_add_scn_to_nid()
1345 dn = of_find_node_by_path("/rtas"); in hot_add_drconf_memory_max()
1347 lrdr = of_get_property(dn, "ibm,lrdr-capacity", NULL); in hot_add_drconf_memory_max()
1353 memory = of_find_node_by_path("/ibm,dynamic-reconfiguration-memory"); in hot_add_drconf_memory_max()
1362 * memory_hotplug_max - return max address of memory that may be added
1364 * This is currently only used on systems that support drconfig memory
1429 // Associate node <-> cpu, so cpu_up() calls in find_and_update_cpu_nid()
1442 return -1; in cpu_to_coregroup_id()
1455 return of_read_number(&associativity[index - 1], 1); in cpu_to_coregroup_id()