From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 42485CCA47D for ; Wed, 22 Jun 2022 15:06:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1358966AbiFVPGk (ORCPT ); Wed, 22 Jun 2022 11:06:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39960 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1358934AbiFVPGc (ORCPT ); Wed, 22 Jun 2022 11:06:32 -0400 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 70F96393F7 for ; Wed, 22 Jun 2022 08:06:31 -0700 (PDT) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 68EAD12FC; Wed, 22 Jun 2022 08:06:31 -0700 (PDT) Received: from localhost (ionvoi01-desktop.cambridge.arm.com [10.1.196.65]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id D67D83F792; Wed, 22 Jun 2022 08:06:30 -0700 (PDT) Date: Wed, 22 Jun 2022 16:06:29 +0100 From: Ionela Voinescu To: Sudeep Holla Cc: linux-kernel@vger.kernel.org, Greg KH , Atish Patra , Atish Patra , Vincent Guittot , Dietmar Eggemann , Qing Wang , Rob Herring , "Rafael J . Wysocki" , Pierre Gondois , linux-arm-kernel@lists.infradead.org, linux-riscv@lists.infradead.org Subject: Re: [PATCH v4 20/20] arch_topology: Warn that topology for nested clusters is not supported Message-ID: References: <20220621192034.3332546-1-sudeep.holla@arm.com> <20220621192034.3332546-21-sudeep.holla@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220621192034.3332546-21-sudeep.holla@arm.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, I just noticed this in a quick test. On Tuesday 21 Jun 2022 at 20:20:34 (+0100), Sudeep Holla wrote: > We don't support the topology for clusters of CPU clusters while the > DT and ACPI bindings theoritcally support the same. Just warn about the > same so that it is clear to the users of arch_topology that the nested > clusters are not yet supported. > > Signed-off-by: Sudeep Holla > --- > drivers/base/arch_topology.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/drivers/base/arch_topology.c b/drivers/base/arch_topology.c > index ed1cb64a95aa..1c5fa7bbbd00 100644 > --- a/drivers/base/arch_topology.c > +++ b/drivers/base/arch_topology.c > @@ -567,6 +567,8 @@ static int __init parse_cluster(struct device_node *cluster, int package_id, > if (c) { > leaf = false; > ret = parse_cluster(c, package_id, i, depth + 1); > + if (depth > 1) > + pr_warn("Topology for clusters of clusters not yet supported\n"); I think the check should be for (depth > 0) or (depth >= 1). We end up having depth = 2 when we have cluster 0 { //depth is 0 cluster 0 { //depth is 1 cluster0 { //depth is 2 ... I suppose we should warn about nested clusters from depth 1, right? Thanks, Ionela. > of_node_put(c); > if (ret != 0) > return ret; > -- > 2.36.1 >