Lines Matching +full:used +full:- +full:by +full:- +full:rtas

1 // SPDX-License-Identifier: GPL-2.0-or-later
64 [0 ... MAX_NUMNODES - 1] = { [0 ... MAX_NUMNODES - 1] = -1 }
66 static int numa_id_index_table[MAX_NUMNODES] = { [0 ... MAX_NUMNODES - 1] = NUMA_NO_NODE };
142 numa_cpu_lookup_table[cpu] = -1; in reset_numa_cpu_lookup_table()
176 int index = primary_domain_index - 1; in __associativity_to_nid()
189 * Returns nid in the range [0..nr_node_ids], or -1 if no useful NUMA
271 * or -1 if not found.
292 if (nid != -1) in of_node_to_nid()
315 int index = be32_to_cpu(distance_ref_points[i]) - 1; in __initialize_form1_numa_distance()
339 * Used to update distance information w.r.t newly added node.
367 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 numa_dist_table = of_get_property(root, "ibm,numa-distance-table", NULL); in initialize_form2_numa_distance_lookup_table()
459 root = of_find_node_by_path("/rtas"); in find_primary_domain_index()
464 * This property is a set of 32-bit integers, each representing in find_primary_domain_index()
476 "ibm,associativity-reference-points", in find_primary_domain_index()
480 pr_debug("ibm,associativity-reference-points not found.\n"); in find_primary_domain_index()
487 pr_warn("short ibm,associativity-reference-points\n"); in find_primary_domain_index()
514 return -1; in find_primary_domain_index()
534 while (n--) { in read_n_cells()
549 * memory from the ibm,associativity-lookup-arrays property of the
552 * The layout of the ibm,associativity-lookup-arrays property is a number N
553 * indicating the number of associativity arrays, followed by a number M
554 * indicating the size of each associativity array, followed by a list
563 memory = of_find_node_by_path("/ibm,dynamic-reconfiguration-memory"); in of_get_assoc_arrays()
565 return -1; in of_get_assoc_arrays()
567 prop = of_get_property(memory, "ibm,associativity-lookup-arrays", &len); in of_get_assoc_arrays()
570 return -1; in of_get_assoc_arrays()
573 aa->n_arrays = of_read_number(prop++, 1); in of_get_assoc_arrays()
574 aa->array_sz = of_read_number(prop++, 1); in of_get_assoc_arrays()
581 if (len < (aa->n_arrays * aa->array_sz + 2) * sizeof(unsigned int)) in of_get_assoc_arrays()
582 return -1; in of_get_assoc_arrays()
584 aa->arrays = prop; in of_get_assoc_arrays()
603 !(lmb->flags & DRCONF_MEM_AI_INVALID) && lmb->aa_index < aa.n_arrays) { in get_nid_and_numa_distance()
606 index = lmb->aa_index * aa.array_sz; in get_nid_and_numa_distance()
622 * ibm,dynamic-reconfiguration-memory node.
639 !(lmb->flags & DRCONF_MEM_AI_INVALID) && lmb->aa_index < aa.n_arrays) { in of_drconf_to_nid_single()
642 index = lmb->aa_index * aa.array_sz; in of_drconf_to_nid_single()
675 return -1; in __vphn_get_associativity()
693 return -1; in __vphn_get_associativity()
704 * Return the id of the domain used.
718 * If a valid cpu-to-node mapping is already available, use it in numa_setup_cpu()
720 * the most recent mapping notified to us by the platform (eg: VPHN). in numa_setup_cpu()
722 * core. If a valid cpu-to-node mapping is already available, for in numa_setup_cpu()
830 return memblock_end_of_DRAM() - start; in numa_enforce_memory_limit()
835 * linux,drconf-usable-memory property
840 * For each lmb in ibm,dynamic-memory a corresponding in read_usm_ranges()
841 * entry in linux,drconf-usable-memory property contains in read_usm_ranges()
842 * a counter followed by that many (base, size) duple. in read_usm_ranges()
843 * read the counter from linux,drconf-usable-memory in read_usm_ranges()
849 * Extract NUMA information from the ibm,dynamic-reconfiguration-memory
864 if ((lmb->flags & DRCONF_MEM_RESERVED) in numa_setup_drmem_lmb()
865 || !(lmb->flags & DRCONF_MEM_ASSIGNED)) in numa_setup_drmem_lmb()
871 base = lmb->base_addr; in numa_setup_drmem_lmb()
894 } while (--ranges); in numa_setup_drmem_lmb()
907 pr_warn("disabled by user\n"); in parse_numa_properties()
908 return -1; in parse_numa_properties()
948 * Don't fall back to default_nid yet -- we will plug in parse_numa_properties()
977 "linux,usable-memory", &len); in parse_numa_properties()
986 /* these are order-sensitive, and modify the buffer pointer */ in parse_numa_properties()
1009 if (--ranges) in parse_numa_properties()
1015 * ibm,dynamic-memory property in the in parse_numa_properties()
1016 * ibm,dynamic-reconfiguration-memory node. in parse_numa_properties()
1018 memory = of_find_node_by_path("/ibm,dynamic-reconfiguration-memory"); in parse_numa_properties()
1036 pr_debug("Memory hole size: %ldMB\n", (top_of_ram - total_ram) >> 20); in setup_nonnuma()
1041 PFN_PHYS(end_pfn - start_pfn), in setup_nonnuma()
1060 * If we used a CPU iterator here we would miss printing in dump_numa_cpu_topology()
1071 pr_cont("-%u", cpu - 1); in dump_numa_cpu_topology()
1077 pr_cont("-%u", nr_cpu_ids - 1); in dump_numa_cpu_topology()
1085 u64 spanned_pages = end_pfn - start_pfn; in setup_node_data()
1099 pr_info(" NODE_DATA [mem %#010Lx-%#010Lx]\n", in setup_node_data()
1100 nd_pa, nd_pa + nd_size - 1); 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()
1114 struct device_node *rtas; in find_possible_nodes() local
1122 rtas = of_find_node_by_path("/rtas"); in find_possible_nodes()
1123 if (!rtas) in find_possible_nodes()
1127 * ibm,current-associativity-domains is a fairly recent property. If in find_possible_nodes()
1128 * it doesn't exist, then fallback on ibm,max-associativity-domains. in find_possible_nodes()
1135 if (!of_get_property(of_root, "ibm,migratable-partition", NULL)) in find_possible_nodes()
1136 domains = of_get_property(rtas, in find_possible_nodes()
1137 "ibm,current-associativity-domains", in find_possible_nodes()
1140 domains = of_get_property(rtas, "ibm,max-associativity-domains", in find_possible_nodes()
1159 of_node_put(rtas); in find_possible_nodes()
1195 * Powerpc with CONFIG_NUMA always used to have a node 0, in mem_topology_setup()
1228 * _nocalls() + manual invocation is used because cpuhp is not yet in initmem_init()
1254 * memory represented in the device tree by the property
1255 * ibm,dynamic-reconfiguration-memory/ibm,dynamic-memory.
1268 if ((lmb->flags & DRCONF_MEM_RESERVED) in hot_add_drconf_scn_to_nid()
1269 || !(lmb->flags & DRCONF_MEM_ASSIGNED)) in hot_add_drconf_scn_to_nid()
1272 if ((scn_addr < lmb->base_addr) in hot_add_drconf_scn_to_nid()
1273 || (scn_addr >= (lmb->base_addr + lmb_size))) in hot_add_drconf_scn_to_nid()
1306 while (ranges--) { in hot_add_node_scn_to_nid()
1339 memory = of_find_node_by_path("/ibm,dynamic-reconfiguration-memory"); in hot_add_scn_to_nid()
1359 dn = of_find_node_by_path("/rtas"); in hot_add_drconf_memory_max()
1361 lrdr = of_get_property(dn, "ibm,lrdr-capacity", NULL); in hot_add_drconf_memory_max()
1367 memory = of_find_node_by_path("/ibm,dynamic-reconfiguration-memory"); in hot_add_drconf_memory_max()
1376 * memory_hotplug_max - return max address of memory that may be added
1378 * This is currently only used on systems that support drconfig memory
1456 * to deal with more memoryless-node error conditions. in find_and_online_cpu_nid()
1473 return -1; in cpu_to_coregroup_id()
1486 return of_read_number(&associativity[index - 1], 1); in cpu_to_coregroup_id()