Lines Matching +full:used +full:- +full:by +full:- +full:rtas
1 // SPDX-License-Identifier: GPL-2.0-or-later
65 [0 ... MAX_NUMNODES - 1] = { [0 ... MAX_NUMNODES - 1] = -1 }
67 static int numa_id_index_table[MAX_NUMNODES] = { [0 ... MAX_NUMNODES - 1] = NUMA_NO_NODE };
143 numa_cpu_lookup_table[cpu] = -1; in reset_numa_cpu_lookup_table()
177 int index = primary_domain_index - 1; in __associativity_to_nid()
190 * Returns nid in the range [0..nr_node_ids], or -1 if no useful NUMA
272 * or -1 if not found.
293 if (nid != -1) in of_node_to_nid()
316 int index = be32_to_cpu(distance_ref_points[i]) - 1; in __initialize_form1_numa_distance()
340 * Used to update distance information w.r.t newly added node.
368 WARN(numa_distance_table[nid][nid] == -1, in update_numa_distance()
374 * ibm,numa-lookup-index-table= {N, domainid1, domainid2, ..... domainidN}
375 * ibm,numa-distance-table = { N, 1, 2, 4, 5, 1, 6, .... N elements}
389 root = of_find_node_by_path("/rtas"); in initialize_form2_numa_distance_lookup_table()
393 numa_lookup_index = of_get_property(root, "ibm,numa-lookup-index-table", NULL); in initialize_form2_numa_distance_lookup_table()
396 /* first element of the array is the size and is encode-int */ in initialize_form2_numa_distance_lookup_table()
397 form2_distances = of_get_property(root, "ibm,numa-distance-table", NULL); in initialize_form2_numa_distance_lookup_table()
457 root = of_find_node_by_path("/rtas"); in find_primary_domain_index()
462 * This property is a set of 32-bit integers, each representing in find_primary_domain_index()
474 "ibm,associativity-reference-points", in find_primary_domain_index()
478 pr_debug("ibm,associativity-reference-points not found.\n"); in find_primary_domain_index()
485 pr_warn("short ibm,associativity-reference-points\n"); in find_primary_domain_index()
512 return -1; in find_primary_domain_index()
532 while (n--) { in read_n_cells()
547 * memory from the ibm,associativity-lookup-arrays property of the
550 * The layout of the ibm,associativity-lookup-arrays property is a number N
551 * indicating the number of associativity arrays, followed by a number M
552 * indicating the size of each associativity array, followed by a list
561 memory = of_find_node_by_path("/ibm,dynamic-reconfiguration-memory"); in of_get_assoc_arrays()
563 return -1; in of_get_assoc_arrays()
565 prop = of_get_property(memory, "ibm,associativity-lookup-arrays", &len); in of_get_assoc_arrays()
568 return -1; in of_get_assoc_arrays()
571 aa->n_arrays = of_read_number(prop++, 1); in of_get_assoc_arrays()
572 aa->array_sz = of_read_number(prop++, 1); in of_get_assoc_arrays()
579 if (len < (aa->n_arrays * aa->array_sz + 2) * sizeof(unsigned int)) in of_get_assoc_arrays()
580 return -1; in of_get_assoc_arrays()
582 aa->arrays = prop; in of_get_assoc_arrays()
601 !(lmb->flags & DRCONF_MEM_AI_INVALID) && lmb->aa_index < aa.n_arrays) { in get_nid_and_numa_distance()
604 index = lmb->aa_index * aa.array_sz; in get_nid_and_numa_distance()
620 * ibm,dynamic-reconfiguration-memory node.
637 !(lmb->flags & DRCONF_MEM_AI_INVALID) && lmb->aa_index < aa.n_arrays) { in of_drconf_to_nid_single()
640 index = lmb->aa_index * aa.array_sz; in of_drconf_to_nid_single()
673 return -1; in __vphn_get_associativity()
691 return -1; in __vphn_get_associativity()
702 * Return the id of the domain used.
716 * If a valid cpu-to-node mapping is already available, use it in numa_setup_cpu()
718 * the most recent mapping notified to us by the platform (eg: VPHN). in numa_setup_cpu()
720 * core. If a valid cpu-to-node mapping is already available, for in numa_setup_cpu()
828 return memblock_end_of_DRAM() - start; in numa_enforce_memory_limit()
833 * linux,drconf-usable-memory property
838 * For each lmb in ibm,dynamic-memory a corresponding in read_usm_ranges()
839 * entry in linux,drconf-usable-memory property contains in read_usm_ranges()
840 * a counter followed by that many (base, size) duple. in read_usm_ranges()
841 * read the counter from linux,drconf-usable-memory in read_usm_ranges()
847 * Extract NUMA information from the ibm,dynamic-reconfiguration-memory
862 if ((lmb->flags & DRCONF_MEM_RESERVED) in numa_setup_drmem_lmb()
863 || !(lmb->flags & DRCONF_MEM_ASSIGNED)) in numa_setup_drmem_lmb()
869 base = lmb->base_addr; in numa_setup_drmem_lmb()
892 } while (--ranges); in numa_setup_drmem_lmb()
905 pr_warn("disabled by user\n"); in parse_numa_properties()
906 return -1; in parse_numa_properties()
946 * 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()
1198 * 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()
1331 memory = of_find_node_by_path("/ibm,dynamic-reconfiguration-memory"); in hot_add_scn_to_nid()
1351 dn = of_find_node_by_path("/rtas"); in hot_add_drconf_memory_max()
1353 lrdr = of_get_property(dn, "ibm,lrdr-capacity", NULL); in hot_add_drconf_memory_max()
1359 memory = of_find_node_by_path("/ibm,dynamic-reconfiguration-memory"); in hot_add_drconf_memory_max()
1368 * memory_hotplug_max - return max address of memory that may be added
1370 * This is currently only used on systems that support drconfig memory
1435 // Associate node <-> cpu, so cpu_up() calls in find_and_update_cpu_nid()
1448 return -1; in cpu_to_coregroup_id()
1461 return of_read_number(&associativity[index - 1], 1); in cpu_to_coregroup_id()