Lines Matching refs:associativity
170 static int __associativity_to_nid(const __be32 *associativity,
182 nid = of_read_number(&associativity[index], 1);
193 static int associativity_to_nid(const __be32 *associativity)
195 int array_sz = of_read_number(associativity, 1);
197 /* Skip the first element in the associativity array */
198 return __associativity_to_nid((associativity + 1), array_sz);
246 return of_get_property(dev, "ibm,associativity", NULL);
285 /* Walk the device tree upwards, looking for an associativity id */
304 static void __initialize_form1_numa_distance(const __be32 *associativity,
312 nid = __associativity_to_nid(associativity, max_array_sz);
321 if (WARN(index >= max_array_sz, "Broken ibm,associativity property"))
324 entry = &associativity[index];
330 static void initialize_form1_numa_distance(const __be32 *associativity)
334 array_sz = of_read_number(associativity, 1);
335 /* Skip the first element in the associativity array */
336 __initialize_form1_numa_distance(associativity + 1, array_sz);
349 const __be32 *associativity;
351 associativity = of_get_associativity(node);
352 if (!associativity)
355 initialize_form1_numa_distance(associativity);
463 * an index into the ibm,associativity nodes.
474 "ibm,associativity-reference-points",
478 pr_debug("ibm,associativity-reference-points not found.\n");
485 pr_warn("short ibm,associativity-reference-points\n");
546 * Retrieve and validate the list of associativity arrays for drconf
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
553 * of N associativity arrays.
565 prop = of_get_property(memory, "ibm,associativity-lookup-arrays", &len);
602 const __be32 *associativity;
605 associativity = &aa.arrays[index];
606 nid = __associativity_to_nid(associativity, aa.array_sz);
609 * lookup array associativity entries have
612 __initialize_form1_numa_distance(associativity, aa.array_sz);
638 const __be32 *associativity;
641 associativity = &aa.arrays[index];
642 nid = __associativity_to_nid(associativity, aa.array_sz);
649 static int __vphn_get_associativity(long lcpu, __be32 *associativity)
654 * On a shared lpar, device tree will not have node associativity.
657 * request an explicit associativity irrespective of whether the
668 rc = hcall_vphn(hwid, VPHN_FLAG_VCPU, associativity);
678 __be32 associativity[VPHN_ASSOC_BUFSIZE] = {0};
681 if (!__vphn_get_associativity(lcpu, associativity))
682 return associativity_to_nid(associativity);
689 static int __vphn_get_associativity(long lcpu, __be32 *associativity)
754 * where virtual node associativity change causes subsequent threads
902 const __be32 *associativity;
920 pr_debug("associativity depth for CPU/Memory: %d\n", primary_domain_index);
953 associativity = of_get_associativity(cpu);
954 if (associativity) {
955 nid = associativity_to_nid(associativity);
956 initialize_form1_numa_distance(associativity);
992 * have associativity properties. If none, then
995 associativity = of_get_associativity(memory);
996 if (associativity) {
997 nid = associativity_to_nid(associativity);
998 initialize_form1_numa_distance(associativity);
1127 * ibm,current-associativity-domains is a fairly recent property. If
1128 * it doesn't exist, then fallback on ibm,max-associativity-domains.
1137 "ibm,current-associativity-domains",
1140 domains = of_get_property(rtas, "ibm,max-associativity-domains",
1384 * Retrieve the new associativity information for a virtual processor's
1388 __be32 *associativity)
1393 VPHN_FLAG_VCPU, associativity);
1422 __be32 associativity[VPHN_ASSOC_BUFSIZE] = {0};
1425 /* Use associativity from first thread for all siblings */
1426 if (vphn_get_associativity(cpu, associativity))
1429 /* Do not have previous associativity, so find it now. */
1430 new_nid = associativity_to_nid(associativity);
1444 __be32 associativity[VPHN_ASSOC_BUFSIZE] = {0};
1456 if (vphn_get_associativity(cpu, associativity))
1459 index = of_read_number(associativity, 1);
1461 return of_read_number(&associativity[index - 1], 1);