Lines Matching +full:used +full:- +full:by +full:- +full:rtas
1 // SPDX-License-Identifier: GPL-2.0-or-later
137 numa_cpu_lookup_table[cpu] = -1; in reset_numa_cpu_lookup_table()
219 entry = &associativity[be32_to_cpu(distance_ref_points[i]) - 1]; in initialize_distance_lookup_table()
225 * Returns nid in the range [0..nr_node_ids], or -1 if no useful NUMA
255 * or -1 if not found.
276 if (nid != -1) in of_node_to_nid()
295 root = of_find_node_by_path("/rtas"); in find_min_common_depth()
300 * This property is a set of 32-bit integers, each representing in find_min_common_depth()
312 "ibm,associativity-reference-points", in find_min_common_depth()
316 dbg("NUMA: ibm,associativity-reference-points not found.\n"); in find_min_common_depth()
333 "short ibm,associativity-reference-points\n"); in find_min_common_depth()
355 return -1; in find_min_common_depth()
375 while (n--) { in read_n_cells()
390 * memory from the ibm,associativity-lookup-arrays property of the
393 * The layout of the ibm,associativity-lookup-arrays property is a number N
394 * indicating the number of associativity arrays, followed by a number M
395 * indicating the size of each associativity array, followed by a list
404 memory = of_find_node_by_path("/ibm,dynamic-reconfiguration-memory"); in of_get_assoc_arrays()
406 return -1; in of_get_assoc_arrays()
408 prop = of_get_property(memory, "ibm,associativity-lookup-arrays", &len); in of_get_assoc_arrays()
411 return -1; in of_get_assoc_arrays()
414 aa->n_arrays = of_read_number(prop++, 1); in of_get_assoc_arrays()
415 aa->array_sz = of_read_number(prop++, 1); in of_get_assoc_arrays()
422 if (len < (aa->n_arrays * aa->array_sz + 2) * sizeof(unsigned int)) in of_get_assoc_arrays()
423 return -1; in of_get_assoc_arrays()
425 aa->arrays = prop; in of_get_assoc_arrays()
431 * ibm,dynamic-reconfiguration-memory node.
448 !(lmb->flags & DRCONF_MEM_AI_INVALID) && lmb->aa_index < aa.n_arrays) { in of_drconf_to_nid_single()
449 index = lmb->aa_index * aa.array_sz + min_common_depth - 1; in of_drconf_to_nid_single()
456 index = lmb->aa_index * aa.array_sz; in of_drconf_to_nid_single()
502 * Return the id of the domain used.
516 * If a valid cpu-to-node mapping is already available, use it in numa_setup_cpu()
518 * the most recent mapping notified to us by the platform (eg: VPHN). in numa_setup_cpu()
520 * core. If a valid cpu-to-node mapping is already available, for in numa_setup_cpu()
631 return memblock_end_of_DRAM() - start; in numa_enforce_memory_limit()
636 * linux,drconf-usable-memory property
641 * For each lmb in ibm,dynamic-memory a corresponding in read_usm_ranges()
642 * entry in linux,drconf-usable-memory property contains in read_usm_ranges()
643 * a counter followed by that many (base, size) duple. in read_usm_ranges()
644 * read the counter from linux,drconf-usable-memory in read_usm_ranges()
650 * Extract NUMA information from the ibm,dynamic-reconfiguration-memory
665 if ((lmb->flags & DRCONF_MEM_RESERVED) in numa_setup_drmem_lmb()
666 || !(lmb->flags & DRCONF_MEM_ASSIGNED)) in numa_setup_drmem_lmb()
672 base = lmb->base_addr; in numa_setup_drmem_lmb()
695 } while (--ranges); in numa_setup_drmem_lmb()
707 printk(KERN_WARNING "NUMA disabled by user\n"); in parse_numa_properties()
708 return -1; in parse_numa_properties()
734 * Don't fall back to default_nid yet -- we will plug in parse_numa_properties()
759 "linux,usable-memory", &len); in parse_numa_properties()
768 /* these are order-sensitive, and modify the buffer pointer */ in parse_numa_properties()
788 if (--ranges) in parse_numa_properties()
794 * ibm,dynamic-memory property in the in parse_numa_properties()
795 * ibm,dynamic-reconfiguration-memory node. in parse_numa_properties()
797 memory = of_find_node_by_path("/ibm,dynamic-reconfiguration-memory"); in parse_numa_properties()
817 (top_of_ram - total_ram) >> 20); in setup_nonnuma()
822 PFN_PHYS(end_pfn - start_pfn), in setup_nonnuma()
841 * If we used a CPU iterator here we would miss printing in dump_numa_cpu_topology()
852 pr_cont("-%u", cpu - 1); in dump_numa_cpu_topology()
858 pr_cont("-%u", nr_cpu_ids - 1); in dump_numa_cpu_topology()
866 u64 spanned_pages = end_pfn - start_pfn; in setup_node_data()
880 pr_info(" NODE_DATA [mem %#010Lx-%#010Lx]\n", in setup_node_data()
881 nd_pa, nd_pa + nd_size - 1); in setup_node_data()
888 NODE_DATA(nid)->node_id = nid; in setup_node_data()
889 NODE_DATA(nid)->node_start_pfn = start_pfn; in setup_node_data()
890 NODE_DATA(nid)->node_spanned_pages = spanned_pages; in setup_node_data()
895 struct device_node *rtas; in find_possible_nodes() local
903 rtas = of_find_node_by_path("/rtas"); in find_possible_nodes()
904 if (!rtas) in find_possible_nodes()
908 * ibm,current-associativity-domains is a fairly recent property. If in find_possible_nodes()
909 * it doesn't exist, then fallback on ibm,max-associativity-domains. in find_possible_nodes()
913 domains = of_get_property(rtas, "ibm,current-associativity-domains", in find_possible_nodes()
916 domains = of_get_property(rtas, "ibm,max-associativity-domains", in find_possible_nodes()
933 of_node_put(rtas); in find_possible_nodes()
969 * Powerpc with CONFIG_NUMA always used to have a node 0, in mem_topology_setup()
1002 * _nocalls() + manual invocation is used because cpuhp is not yet in initmem_init()
1031 * memory represented in the device tree by the property
1032 * ibm,dynamic-reconfiguration-memory/ibm,dynamic-memory.
1045 if ((lmb->flags & DRCONF_MEM_RESERVED) in hot_add_drconf_scn_to_nid()
1046 || !(lmb->flags & DRCONF_MEM_ASSIGNED)) in hot_add_drconf_scn_to_nid()
1049 if ((scn_addr < lmb->base_addr) in hot_add_drconf_scn_to_nid()
1050 || (scn_addr >= (lmb->base_addr + lmb_size))) in hot_add_drconf_scn_to_nid()
1083 while (ranges--) { in hot_add_node_scn_to_nid()
1116 memory = of_find_node_by_path("/ibm,dynamic-reconfiguration-memory"); in hot_add_scn_to_nid()
1136 dn = of_find_node_by_path("/rtas"); in hot_add_drconf_memory_max()
1138 lrdr = of_get_property(dn, "ibm,lrdr-capacity", NULL); in hot_add_drconf_memory_max()
1144 memory = of_find_node_by_path("/ibm,dynamic-reconfiguration-memory"); in hot_add_drconf_memory_max()
1153 * memory_hotplug_max - return max address of memory that may be added
1155 * This is currently only used on systems that support drconfig memory
1233 * to deal with more memoryless-node error conditions. in find_and_online_cpu_nid()
1250 return -1; in cpu_to_coregroup_id()
1263 return of_read_number(&associativity[index - 1], 1); in cpu_to_coregroup_id()