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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id E996EC433EF for ; Wed, 22 Jun 2022 15:51:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=xPeF7uHDVvhZYxuZkqIGac5wz+SkRLJnpwpD6GMc73w=; b=FSY85IidhEmCnL IOp5V98ZdFVxDC5mqNJwt5JZA2uXArAyduWY3nAnJKdsXsA4l4YxsAvvRMkWllPP3TqBFn2k1qlNd Ay4wwFQF7K09DvOFmn43MdVgRMpIcCEaiV9X86FG8ZYeddOsyusCAvCQVYqJJ+eec/brLvxiAac/p geGlXkItQRAIi4ik27vO+cYGgw8IJ7aVWtKAkUSd8sjDJZ0YV64bto6gDb8rQWD1ySqMNJd9NvMSP HS+MwPujgo+oED/xMIW9UQFr7hRdZT3KcQ0NjtWBV9bZf3GvlEadKwUDMdxKdqF8PsbbfStxvxuiD jbx3N9nlp/TW4dSpGvtQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1o42cM-00BGPi-1l; Wed, 22 Jun 2022 15:50:10 +0000 Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1o42aW-00BFRo-51; Wed, 22 Jun 2022 15:48:17 +0000 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 84F1212FC; Wed, 22 Jun 2022 08:48:13 -0700 (PDT) Received: from bogus (unknown [10.57.36.82]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 2DC0D3F792; Wed, 22 Jun 2022 08:48:09 -0700 (PDT) Date: Wed, 22 Jun 2022 16:46:58 +0100 From: Sudeep Holla To: Ionela Voinescu 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 , Sudeep Holla , 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: <20220622154658.zehszxfe5eil3aq5@bogus> References: <20220621192034.3332546-1-sudeep.holla@arm.com> <20220621192034.3332546-21-sudeep.holla@arm.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220622_084816_264891_4EDE740C X-CRM114-Status: GOOD ( 25.88 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Wed, Jun 22, 2022 at 04:06:29PM +0100, Ionela Voinescu wrote: > 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? > You are absolutely correct. For some reason when I wrote this patch I read the line above as depth++ instead of depth + 1. I was searching for that now reading your reply just to realise that I misread it. Thanks for catching this. -- Regards, Sudeep _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel