mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Srikar Dronamraju <srikar@linux.ibm.com>
To: linuxppc-dev <linuxppc-dev@lists.ozlabs.org>
Cc: Michael Ellerman <mpe@ellerman.id.au>,
	Madhavan Srinivasan <maddy@linux.ibm.com>,
	chleroy@kernel.org, Srikar Dronamraju <srikar@linux.ibm.com>,
	Nicholas Piggin <npiggin@gmail.com>,
	Shrikanth Hegde <sshegde@linux.ibm.com>,
	Peter Zijlstra <peterz@infradead.org>,
	linux-kernel@vger.kernel.org
Subject: [PATCH 1/7] powerpc/numa: Remove redundant coregroup enablement
Date: Fri, 16 Oct 2026 16:34:06 +0530	[thread overview]
Message-ID: <20261016110412.1380298-2-srikar@linux.ibm.com> (raw)
In-Reply-To: <20261016110412.1380298-1-srikar@linux.ibm.com>

parse_numa_properties() determines whether the coregroup associativity
level is present and sets coregroup_enabled before find_possible_nodes()
is called.

Therefore, there is no need for find_possible_nodes() to determine the
same information again from the length of the associativity domain
property.

Signed-off-by: Srikar Dronamraju <srikar@linux.ibm.com>
---
 arch/powerpc/mm/numa.c | 13 +++----------
 1 file changed, 3 insertions(+), 10 deletions(-)

diff --git a/arch/powerpc/mm/numa.c b/arch/powerpc/mm/numa.c
index e97b624203ea..09f7e7b2b192 100644
--- a/arch/powerpc/mm/numa.c
+++ b/arch/powerpc/mm/numa.c
@@ -1124,7 +1124,7 @@ static void __init find_possible_nodes(void)
 {
 	struct device_node *rtas, *root;
 	const __be32 *domains = NULL;
-	int prop_length, max_nodes;
+	int max_nodes;
 	u32 i;
 
 	if (!numa_enabled)
@@ -1145,13 +1145,10 @@ static void __init find_possible_nodes(void)
 	 */
 	root = of_find_node_by_path("/");
 	if (!of_get_property(root, "ibm,migratable-partition", NULL))
-		domains = of_get_property(rtas,
-					  "ibm,current-associativity-domains",
-					  &prop_length);
+		domains = of_get_property(rtas, "ibm,current-associativity-domains", NULL);
 	of_node_put(root);
 	if (!domains) {
-		domains = of_get_property(rtas, "ibm,max-associativity-domains",
-					&prop_length);
+		domains = of_get_property(rtas, "ibm,max-associativity-domains", NULL);
 		if (!domains)
 			goto out;
 	}
@@ -1164,10 +1161,6 @@ static void __init find_possible_nodes(void)
 			node_set(i, node_possible_map);
 	}
 
-	prop_length /= sizeof(int);
-	if (prop_length > primary_domain_index + 2)
-		coregroup_enabled = 1;
-
 out:
 	of_node_put(rtas);
 }
-- 
2.47.1


  reply	other threads:[~2026-10-16 11:05 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-16 11:04 [PATCH 0/7] powerpc/numa: Enable coregroup support for shared LPARs Srikar Dronamraju
2026-10-16 11:04 ` Srikar Dronamraju [this message]
2026-10-16 11:04 ` [PATCH 2/7] powerpc/numa: Consolidate VPHN associativity lookup Srikar Dronamraju
2026-10-16 11:04 ` [PATCH 3/7] powerpc/numa: Factor out coregroup availability check Srikar Dronamraju
2026-10-16 11:04 ` [PATCH 4/7] powerpc/numa: Allow coregroup detection when NUMA is disabled Srikar Dronamraju
2026-10-16 11:04 ` [PATCH 5/7] powerpc/numa: Consolidate associativity lookup in parse_numa_properties Srikar Dronamraju
2026-10-16 11:04 ` [PATCH 6/7] powerpc/numa: Extract CPU associativity processing into separate function Srikar Dronamraju
2026-10-16 11:04 ` [PATCH 7/7] powerpc/numa: Enable coregroup support for shared LPARs Srikar Dronamraju

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=20261016110412.1380298-2-srikar@linux.ibm.com \
    --to=srikar@linux.ibm.com \
    --cc=chleroy@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=maddy@linux.ibm.com \
    --cc=mpe@ellerman.id.au \
    --cc=npiggin@gmail.com \
    --cc=peterz@infradead.org \
    --cc=sshegde@linux.ibm.com \
    /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

all inboxes | Powered by JetHome®