Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp4966912iog; Wed, 22 Jun 2022 09:12:43 -0700 (PDT) X-Google-Smtp-Source: AGRyM1t+h16VKhV4Nk8OMAViNYPsAefvkwDg9n62sz7HZhUjWdRlUqaUz4EMZkSijZZeMc8+Odo3 X-Received: by 2002:aa7:c84d:0:b0:431:4226:70c9 with SMTP id g13-20020aa7c84d000000b00431422670c9mr5013790edt.51.1655914363429; Wed, 22 Jun 2022 09:12:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655914363; cv=none; d=google.com; s=arc-20160816; b=MbF1dqi0MdTZ09K6klNTuFIWhJxqDIEVgKcQ2mQ6JhOIh4Wipz6LSeBKCR1V9L2EWn qPZ9lJc7TBwQRmhgr3gYvuHraPepZ2kTne9tj6vsl+nHq4+ytNLOJFRDNSU0/nHKsRjS vjOKYJcdAWk9vKJatjj4xd4JhOLvHTkjmJ4U6pPgP2drjaZkKiifoZ21x2vABkBfsx36 D64T8+xqa+lwquM9oOzBpgl42Ko8siSz5IQC+3uzB5o5C2RIEcFz/C3GiPbQxdbtYabn HzaaXLIAr+DQrcJuMK8REh7HjB4aYg7EhDwZOWMOmG/I56QedTDVYLjPbhlH21jzPwhj Y5Hw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=LspmXdu6I+OhZw4gx+kCbjew8xQt3MVbkrD1kFcSoFU=; b=vbxhP2yHk529hI1NuykALNq1OzGzs8MSsUWATNqT0J+ZLmd3U6r3P1OfRDfSuc3r2n R4xE/Nx3b+M8TsuKbran7SY2+g24wqqD0eRtjZjFgnnhSQAHTI3oxpkiVdpDMGleMtaH HddU2AtoG5ZY4M9z49WhKzekmNrdsFnnFWxjm3xaCWjChbVIKLLsThABODHgi1jZ6dii DsIkEBfnsU1UroqbUdNyQMLBAl0xlLNN/HueOOfzx1Yniv2ovL/s4FltEVhvy4UdEfld hHjA9Lh0qEqSrGrsDRy2Xfa57hItef3eakMd5pMMcasbrXZXf//LbIOY6UlaW27oIqID 7Gew== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id x2-20020a05640225c200b00434fff6fe37si20983160edb.227.2022.06.22.09.12.12; Wed, 22 Jun 2022 09:12:43 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1359586AbiFVPtR (ORCPT + 99 others); Wed, 22 Jun 2022 11:49:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48714 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1359735AbiFVPsf (ORCPT ); Wed, 22 Jun 2022 11:48:35 -0400 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 6F7123B3F9 for ; Wed, 22 Jun 2022 08:48:13 -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 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-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.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