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 92EDAD15D8B for ; Mon, 21 Oct 2024 13:00:42 +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:In-Reply-To:MIME-Version:Date:Message-ID:From:References:To: Subject:CC:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=p8Ly2DC8Zt1a8wb8gyMCKV+1Rq+uZabqpNv3qQsQ36c=; b=aqcxCI7rFWiFP58ZBHO07a4/cd FYf1cT5XSI/Te726nfFCT+HNTvhzHw/5Aqumi9E42I4BUB6SY4nIqfqYsYAWEIFhZCOT+ZFe5wIDk ZgDIZ/p6rH49d//UNKc9BepCbEOKeiSNh5wM6Azbi/IgnjtWLS7EXF7qquQN3md/TMEYoz8AW3URK 9MpZGQXLsq4GCuoJaNLLYt2OruDU/KLuy/4bSh2plpa6gost1znYjbunjsalkXwMgDnYSFMPFA6ZA aFn7vKQisTwrRWH7pwSCZ7SBlJMx1PmvH9rEZySCbCxTW3Ed3FGHV8Fnxic/nqX8JgdoDWikVilox 70QT69gw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1t2s1O-00000007Lhr-16mm; Mon, 21 Oct 2024 13:00:30 +0000 Received: from desiato.infradead.org ([2001:8b0:10b:1:d65d:64ff:fe57:4e05]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1t2rm0-00000007J72-0WoX for linux-arm-kernel@bombadil.infradead.org; Mon, 21 Oct 2024 12:44:36 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; h=Content-Transfer-Encoding:Content-Type :In-Reply-To:MIME-Version:Date:Message-ID:From:References:To:Subject:CC: Sender:Reply-To:Content-ID:Content-Description; bh=p8Ly2DC8Zt1a8wb8gyMCKV+1Rq+uZabqpNv3qQsQ36c=; b=cvnYLMbAb94bOfIOpL4bVCkLj/ zJ+ENJuJhbGxcJkE9tksRjlqm97803ljshYR1ZQjUxvH3WiqSW+jhXxh/EEouUyYecfDhqNI9Y6s6 k5P06ZSJLOnWIIfXtOO3PcdPdTDK+y3HTQXmb7EZvwf4UmPEWP22b9cKKP2WL8swLL1L4ifl9QV30 d+abwqsB2xehyAmAgA20ePidR8PSnc/WysBfkp6wv0anQkf2dJvseEcENDugwCamFsB4Z79BKZBCj cWvi0NasKmuDhQ11lZsqc8gBcFr460eO7Spy8TCdSEDKisKXcQZHYoYuf9mJN6BUIYGG9AThb/hN4 jDpWPTcA==; Received: from szxga02-in.huawei.com ([45.249.212.188]) by desiato.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1t2rlt-00000007vcY-29pm for linux-arm-kernel@lists.infradead.org; Mon, 21 Oct 2024 12:44:35 +0000 Received: from mail.maildlp.com (unknown [172.19.88.194]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4XXFLz4rCyzpX8y; Mon, 21 Oct 2024 20:42:19 +0800 (CST) Received: from kwepemd200014.china.huawei.com (unknown [7.221.188.8]) by mail.maildlp.com (Postfix) with ESMTPS id 0B66A140118; Mon, 21 Oct 2024 20:44:17 +0800 (CST) Received: from [10.67.121.177] (10.67.121.177) by kwepemd200014.china.huawei.com (7.221.188.8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1258.34; Mon, 21 Oct 2024 20:44:16 +0800 CC: , , , , , , , Subject: Re: [PATCH 3/8] drivers/perf: hisi: Extract topology information to a separate structure To: Jonathan Cameron References: <20241018095745.57057-1-yangyicong@huawei.com> <20241018095745.57057-4-yangyicong@huawei.com> <20241018135420.000003ba@Huawei.com> From: Yicong Yang Message-ID: <97980cba-0603-a7a4-e128-7f80650fbfa6@huawei.com> Date: Mon, 21 Oct 2024 20:44:15 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.5.1 MIME-Version: 1.0 In-Reply-To: <20241018135420.000003ba@Huawei.com> Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.67.121.177] X-ClientProxiedBy: dggems702-chm.china.huawei.com (10.3.19.179) To kwepemd200014.china.huawei.com (7.221.188.8) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20241021_134433_587345_CFA72682 X-CRM114-Status: GOOD ( 22.40 ) 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 2024/10/18 20:54, Jonathan Cameron wrote: > 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. > The SICL or SCCL is only meaningful to the certain driver like L3C, since they know whether this PMU locates on a SICL or SCCL. For the framework it's not capable of inferring such information and don't care about it (not awared here). Will make this piece of comment more clearer. Thanks. >> + */ >> + union { >> + int sccl_id; >> + int sicl_id; >> + int scl_id; >> + }; >> + int ccl_id; >> + int index_id; >> + int sub_id; >> +}; >> + > > . >