aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNathan Fontenot <nfont@linux.vnet.ibm.com>2013-04-24 01:58:23 -0400
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2013-04-26 02:08:22 -0400
commit8002b0c54b16931ad71771e6c97e46aca1be4456 (patch)
tree78f970bb07eb19b6875b3925391e88b0154a94e5
parentf0ff7eb483b4c9b24b83aa682c4f42db256f9bdb (diff)
powerpc/pseries: Update numa.c to use updated firmware_has_feature()
Update the numa code to use the updated firmware_has_feature() when checking for type 1 affinity. Signed-off-by: Nathan Fontenot <nfont@linux.vnet.ibm.com> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
-rw-r--r--arch/powerpc/mm/numa.c22
1 files changed, 3 insertions, 19 deletions
diff --git a/arch/powerpc/mm/numa.c b/arch/powerpc/mm/numa.c
index 7218e9d3a0bc..4cee83592b0c 100644
--- a/arch/powerpc/mm/numa.c
+++ b/arch/powerpc/mm/numa.c
@@ -291,9 +291,7 @@ EXPORT_SYMBOL_GPL(of_node_to_nid);
291static int __init find_min_common_depth(void) 291static int __init find_min_common_depth(void)
292{ 292{
293 int depth; 293 int depth;
294 struct device_node *chosen;
295 struct device_node *root; 294 struct device_node *root;
296 const char *vec5;
297 295
298 if (firmware_has_feature(FW_FEATURE_OPAL)) 296 if (firmware_has_feature(FW_FEATURE_OPAL))
299 root = of_find_node_by_path("/ibm,opal"); 297 root = of_find_node_by_path("/ibm,opal");
@@ -325,24 +323,10 @@ static int __init find_min_common_depth(void)
325 323
326 distance_ref_points_depth /= sizeof(int); 324 distance_ref_points_depth /= sizeof(int);
327 325
328#define VEC5_AFFINITY_BYTE 5 326 if (firmware_has_feature(FW_FEATURE_OPAL) ||
329#define VEC5_AFFINITY 0x80 327 firmware_has_feature(FW_FEATURE_TYPE1_AFFINITY)) {
330 328 dbg("Using form 1 affinity\n");
331 if (firmware_has_feature(FW_FEATURE_OPAL))
332 form1_affinity = 1; 329 form1_affinity = 1;
333 else {
334 chosen = of_find_node_by_path("/chosen");
335 if (chosen) {
336 vec5 = of_get_property(chosen,
337 "ibm,architecture-vec-5", NULL);
338 if (vec5 && (vec5[VEC5_AFFINITY_BYTE] &
339 VEC5_AFFINITY)) {
340 dbg("Using form 1 affinity\n");
341 form1_affinity = 1;
342 }
343
344 of_node_put(chosen);
345 }
346 } 330 }
347 331
348 if (form1_affinity) { 332 if (form1_affinity) {