Page MenuHomeFreeBSD

D23414.id67467.diff
No OneTemporary

D23414.id67467.diff

Index: head/sys/powerpc/powernv/platform_powernv.c
===================================================================
--- head/sys/powerpc/powernv/platform_powernv.c
+++ head/sys/powerpc/powernv/platform_powernv.c
@@ -517,17 +517,20 @@
cell_t associativity[5];
int i, res;
- res = OF_getproplen(node, "ibm,associativity");
+ res = OF_getencprop(node, "ibm,associativity",
+ associativity, sizeof(associativity));
- /* If already at the root, use default domain. */
- if (res == 0)
- return (0);
- else if (res < 0)
- /* If this node doesn't have associativity, check its parent. */
- return (powernv_node_numa_domain(platform, OF_parent(node)));
-
- OF_getencprop(node, "ibm,associativity",
- associativity, res);
+ /*
+ * If this node doesn't have associativity, or if there are not
+ * enough elements in it, check its parent.
+ */
+ if (res < (int)(sizeof(cell_t) * (platform_associativity + 1))) {
+ node = OF_parent(node);
+ /* If already at the root, use default domain. */
+ if (node == 0)
+ return (0);
+ return (powernv_node_numa_domain(platform, node));
+ }
for (i = 0; i < numa_max_domain; i++) {
if (numa_domains[i] == associativity[platform_associativity])

File Metadata

Mime Type
text/plain
Expires
Sat, May 16, 5:38 PM (13 h, 26 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
33139991
Default Alt Text
D23414.id67467.diff (1 KB)

Event Timeline