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 C5CC3D30004 for ; Fri, 18 Oct 2024 13:00:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: Content-Type:MIME-Version:References:In-Reply-To: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=t8uO6/Yp30fiu5OdXc6qyVspZLvqyz+LNPo9uHHiq8Y=; b=wjnIHM9vDgxrmWy1ylMkhJ0kNb bpFrK0C0WlMvNGZ6tv6utriqi8Gpy/6cWVJa8uL/D2LiQGSDJg7HBbnCvreV55JHnJ1TxMhmnetbH RCqCoCmxhpNpaWJGCY3Scep272BtpXlcIveIRM+ffCc8/wAxBJimpGpOBbzKvyGYjY9QZBQLb4LBZ YvbAt6XzyEjD99PXrWGnQYLzAMmpluS/BLwKPTRWekQ6qLGCSqxjhDcCYGlU9Pf2Mo1zMQzwyjqX8 3pcnt7rYEjDacmt5zo+KB+OYyFzADMEl+1AIBd1/JZSfrRRQNEsNw1B8/QegnroMSCiu3fUOUxH94 2gYPNpIA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1t1maT-00000000orj-33PR; Fri, 18 Oct 2024 13:00:13 +0000 Received: from frasgout.his.huawei.com ([185.176.79.56]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1t1mUv-00000000o83-3obI for linux-arm-kernel@lists.infradead.org; Fri, 18 Oct 2024 12:54:31 +0000 Received: from mail.maildlp.com (unknown [172.18.186.31]) by frasgout.his.huawei.com (SkyGuard) with ESMTP id 4XVPlR6sZBz6HJrV; Fri, 18 Oct 2024 20:53:39 +0800 (CST) Received: from frapeml500008.china.huawei.com (unknown [7.182.85.71]) by mail.maildlp.com (Postfix) with ESMTPS id DA8931403A0; Fri, 18 Oct 2024 20:54:22 +0800 (CST) Received: from localhost (10.203.177.66) by frapeml500008.china.huawei.com (7.182.85.71) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.39; Fri, 18 Oct 2024 14:54:22 +0200 Date: Fri, 18 Oct 2024 13:54:20 +0100 From: Jonathan Cameron To: Yicong Yang CC: , , , , , , , Subject: Re: [PATCH 3/8] drivers/perf: hisi: Extract topology information to a separate structure Message-ID: <20241018135420.000003ba@Huawei.com> In-Reply-To: <20241018095745.57057-4-yangyicong@huawei.com> References: <20241018095745.57057-1-yangyicong@huawei.com> <20241018095745.57057-4-yangyicong@huawei.com> Organization: Huawei Technologies Research and Development (UK) Ltd. X-Mailer: Claws Mail 4.1.0 (GTK 3.24.33; x86_64-w64-mingw32) MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.203.177.66] X-ClientProxiedBy: lhrpeml100004.china.huawei.com (7.191.162.219) To frapeml500008.china.huawei.com (7.182.85.71) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20241018_055430_126156_A30CDAD1 X-CRM114-Status: GOOD ( 20.89 ) 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: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Fri, 18 Oct 2024 17:57:40 +0800 Yicong Yang wrote: > From: Yicong Yang > > HiSilicon Uncore PMUs are identified by the IDs of the topology element > on which the PMUs are located. Add a new separate struct hisi_pmu_toplogy > to encapsulate this information. Add additional documentation on the > meaning of each ID. > > - make sccl_id and sicl_id into a union since they're exclusive. It can > also be accessed by scl_id if the SICL/SCCL is unawared. As below. Maybe "distinction is not relevant." as not sure what unwared means here. > - make index_id and sub_id to int since we'll make them to -1 if the > PMU doesn't have this topology or fail to retrieve them - make index_id and sub_id signed so -1 may be used to indicate the PMU doesn't have this topology element or it could not be retrieved. > > This patch should have no functional changes. > > Signed-off-by: Yicong Yang With those small description updates (or similar) Reviewed-by: Jonathan Cameron > --- > +/** > + * struct hisi_pmu_topology - Describe the topology hierarchy on which the PMU > + * is located. > + * @sccl_id: ID of the SCCL on which the PMU locate is located. > + * @sicl_id: ID of the SICL on which the PMU locate is located. > + * @scl_id: ID used by the core which is unaware of the SCCL/SICL. > + * @ccl_id: ID of the CCL (CPU cluster) on which the PMU is located. > + * @index_id: the ID of the PMU module if there're several PMUs at a > + * particularly location in the topology. > + * @sub_id: submodule ID of the PMU. For example we use this for DDRC PMU v2 > + * since each DDRC has more than one DMC > + * > + * The ID will be -1 if the PMU isn't located on a certain topology. > + */ > +struct hisi_pmu_topology { > + /* > + * SCCL (Super CPU CLuster) and SICL (Super I/O Cluster) are parallel > + * so a PMU cannot locate on a SCCL and a SICL. If the SCCL/SICL is > + * not awared use scl_id instead. distinction is not relevant? I' not quite sure what not awared means. > + */ > + union { > + int sccl_id; > + int sicl_id; > + int scl_id; > + }; > + int ccl_id; > + int index_id; > + int sub_id; > +}; > +