linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Nathan Fontenot <nfont@linux.vnet.ibm.com>
To: linuxppc-dev@ozlabs.org
Subject: [PATCH 5/11] Update numa.c to use platform_has_feature()
Date: Fri, 08 Mar 2013 22:03:32 -0600	[thread overview]
Message-ID: <513AB494.5020701@linux.vnet.ibm.com> (raw)
In-Reply-To: <513AB2E3.6090209@linux.vnet.ibm.com>

Update the numa code to use the new platform_has_feature() when checking
for type 1 affinity.

Signed-off-by: Nathan Fontenot <nfont@linux.vnet.ibm.com>
---
 arch/powerpc/mm/numa.c |   22 +++-------------------
 1 file changed, 3 insertions(+), 19 deletions(-)

Index: powerpc/arch/powerpc/mm/numa.c
===================================================================
--- powerpc.orig/arch/powerpc/mm/numa.c	2013-03-08 19:23:06.000000000 -0600
+++ powerpc/arch/powerpc/mm/numa.c	2013-03-08 19:57:27.000000000 -0600
@@ -291,9 +291,7 @@
 static int __init find_min_common_depth(void)
 {
 	int depth;
-	struct device_node *chosen;
 	struct device_node *root;
-	const char *vec5;
 
 	if (firmware_has_feature(FW_FEATURE_OPAL))
 		root = of_find_node_by_path("/ibm,opal");
@@ -325,24 +323,10 @@
 
 	distance_ref_points_depth /= sizeof(int);
 
-#define VEC5_AFFINITY_BYTE	5
-#define VEC5_AFFINITY		0x80
-
-	if (firmware_has_feature(FW_FEATURE_OPAL))
+	if (firmware_has_feature(FW_FEATURE_OPAL) ||
+	    platform_has_feature(OV5_TYPE1_AFFINITY)) {
+		dbg("Using form 1 affinity\n");
 		form1_affinity = 1;
-	else {
-		chosen = of_find_node_by_path("/chosen");
-		if (chosen) {
-			vec5 = of_get_property(chosen,
-					       "ibm,architecture-vec-5", NULL);
-			if (vec5 && (vec5[VEC5_AFFINITY_BYTE] &
-							VEC5_AFFINITY)) {
-				dbg("Using form 1 affinity\n");
-				form1_affinity = 1;
-			}
-
-			of_node_put(chosen);
-		}
 	}
 
 	if (form1_affinity) {

  parent reply	other threads:[~2013-03-09  4:03 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-09  3:56 [PATCH 0/11] NUMA CPU Reconfiguration using PRRN Nathan Fontenot
2013-03-09  3:59 ` [PATCH 1/11] Expose pseries devicetree_update() Nathan Fontenot
2013-03-14  8:49   ` Paul Mackerras
2013-03-09  4:00 ` [PATCH2/11] Add PRRN Event Handler Nathan Fontenot
2013-03-14  8:51   ` Paul Mackerras
2013-03-19 18:01     ` Nathan Fontenot
2013-03-09  4:01 ` [PATCH 3/11] Move architecture vector definitions to prom.h Nathan Fontenot
2013-03-14  8:52   ` Paul Mackerras
2013-03-09  4:02 ` [PATCH 4/11] Add platform_has_feature() Nathan Fontenot
2013-03-14  8:56   ` Paul Mackerras
2013-03-19 18:03     ` Nathan Fontenot
2013-03-14  8:59   ` Paul Mackerras
2013-03-19 18:05     ` Nathan Fontenot
2013-03-14 13:42   ` Michael Ellerman
2013-03-19 18:15     ` Nathan Fontenot
2013-03-22  3:56       ` Michael Ellerman
2013-03-09  4:03 ` Nathan Fontenot [this message]
2013-03-09  4:04 ` [PATCH 6/11] Update CPU maps Nathan Fontenot
2013-03-09  4:05 ` [PATCH 7/11] Use stop machine to update cpu maps Nathan Fontenot
2013-03-09  4:07 ` [PATCH 8/11] Update numa cpu vdso info Nathan Fontenot
2013-03-14  9:02   ` Paul Mackerras
2013-03-09  4:08 ` [PATCH 9/11] Re-enable Virtual Private Home Node capabilities Nathan Fontenot
2013-03-09  4:08 ` [PATCH 10/11] Enable PRRN Nathan Fontenot
2013-03-09  4:10 ` [PATCH 11/11] Add /proc interface to control topology updates Nathan Fontenot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=513AB494.5020701@linux.vnet.ibm.com \
    --to=nfont@linux.vnet.ibm.com \
    --cc=linuxppc-dev@ozlabs.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).