aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/powerpc/mm/numa.c20
1 files changed, 12 insertions, 8 deletions
diff --git a/arch/powerpc/mm/numa.c b/arch/powerpc/mm/numa.c
index aace5e5dfa0a..80d110635d24 100644
--- a/arch/powerpc/mm/numa.c
+++ b/arch/powerpc/mm/numa.c
@@ -271,7 +271,8 @@ static int __init find_min_common_depth(void)
271 const unsigned int *ref_points; 271 const unsigned int *ref_points;
272 struct device_node *rtas_root; 272 struct device_node *rtas_root;
273 unsigned int len; 273 unsigned int len;
274 struct device_node *options; 274 struct device_node *chosen;
275 const char *vec5;
275 276
276 rtas_root = of_find_node_by_path("/rtas"); 277 rtas_root = of_find_node_by_path("/rtas");
277 278
@@ -289,14 +290,17 @@ static int __init find_min_common_depth(void)
289 "ibm,associativity-reference-points", &len); 290 "ibm,associativity-reference-points", &len);
290 291
291 /* 292 /*
292 * For type 1 affinity information we want the first field 293 * For form 1 affinity information we want the first field
293 */ 294 */
294 options = of_find_node_by_path("/options"); 295#define VEC5_AFFINITY_BYTE 5
295 if (options) { 296#define VEC5_AFFINITY 0x80
296 const char *str; 297 chosen = of_find_node_by_path("/chosen");
297 str = of_get_property(options, "ibm,associativity-form", NULL); 298 if (chosen) {
298 if (str && !strcmp(str, "1")) 299 vec5 = of_get_property(chosen, "ibm,architecture-vec-5", NULL);
299 index = 0; 300 if (vec5 && (vec5[VEC5_AFFINITY_BYTE] & VEC5_AFFINITY)) {
301 dbg("Using form 1 affinity\n");
302 index = 0;
303 }
300 } 304 }
301 305
302 if ((len >= 2 * sizeof(unsigned int)) && ref_points) { 306 if ((len >= 2 * sizeof(unsigned int)) && ref_points) {