Message ID | 1680169620-26012-1-git-send-email-renyu.zj@linux.alibaba.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp1006557vqo; Thu, 30 Mar 2023 02:56:55 -0700 (PDT) X-Google-Smtp-Source: AKy350Zl0av0vArsE5x9tXH+jCKNGLxZiKuly2U+7LXPsnUMdrbajwxJU0iCWv9rL9kh+FvTI7U2 X-Received: by 2002:a17:90b:4d12:b0:23d:c49:3875 with SMTP id mw18-20020a17090b4d1200b0023d0c493875mr26417039pjb.33.1680170215569; Thu, 30 Mar 2023 02:56:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680170215; cv=none; d=google.com; s=arc-20160816; b=JIoXi5pRYZvceywB1IH+iMRf8oNvG7WnEI7t/20R/Sywpd003xTF0PezP1wK84N65v zYQ1W0LvnrLpoA6HVCl0d4h1oMRbfk5WrMo8X0dS2zGaAGVRQQZmBh9Lf4C/ScWQAJDj xt28MDxs/JiIjo71gUVuqGEV2fPgdV2L2H2rUa3SGuLz5e/69iwpDT7aYAuK6DEQ81c+ uKFdxpnb4HDDtAO24arr9vDRSR2P/XAh+v6qBtIlvPyfyYJXvNrg6HnJMJDMvCaNaBCG yyap4DuMI0wJ/IwJ12qR+kvpMkyoKYfWyvPoyjuBJF7DCKP5iqiQziBzQWAeuysGCPXy Ih4Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:subject:cc:to:from; bh=B1nCU4BshEeuSRpuxqBvc3wXDNlOfWhpl9z959z1NgE=; b=AyMuvicAyapgJaZ/TFo5s02p6G4pwRDpIWixL13JiQpnO4jSq2P3V2px+Icm+i1tQH VYq9TepoiLw6vCuAtfchpKgWf7Wayw/uOpjtLNPWRGCpE8RWOYiBb6vu+qt0EpurkaWo ZORIsvMmyvbmmebL+VurjZznJVBge92hhC8dhUZ4iz5MOj6iIZlBgqtx/Fv2yFzMv2n1 5flXmik/ZdTuZqmUWzb/mQmULxk5Iv3eVSaQ+7why/Lt4O5q96YyHW31eXzJ8oTJfsVj iAjGe+q1lifzdkJDbcDSOjZru8ndvW4eKq3YipHHaVzzCINqukqNUc25v0LU25LVBYTV pPNQ== 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=alibaba.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id p13-20020a170902e74d00b001a1def4a046si25095372plf.314.2023.03.30.02.56.41; Thu, 30 Mar 2023 02:56:55 -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=alibaba.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230505AbjC3Jsw (ORCPT <rfc822;rua109.linux@gmail.com> + 99 others); Thu, 30 Mar 2023 05:48:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41372 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230420AbjC3JsT (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Thu, 30 Mar 2023 05:48:19 -0400 Received: from out30-113.freemail.mail.aliyun.com (out30-113.freemail.mail.aliyun.com [115.124.30.113]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 92EA693E0; Thu, 30 Mar 2023 02:47:24 -0700 (PDT) X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R181e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=ay29a033018045176;MF=renyu.zj@linux.alibaba.com;NM=1;PH=DS;RN=12;SR=0;TI=SMTPD_---0Vf-9mI6_1680169623; Received: from srmbuffer011165236051.sqa.net(mailfrom:renyu.zj@linux.alibaba.com fp:SMTPD_---0Vf-9mI6_1680169623) by smtp.aliyun-inc.com; Thu, 30 Mar 2023 17:47:11 +0800 From: Jing Zhang <renyu.zj@linux.alibaba.com> To: Ilkka Koskinen <ilkka@os.amperecomputing.com>, Robin Murphy <robin.murphy@arm.com>, Will Deacon <will@kernel.org>, Mark Rutland <mark.rutland@arm.com> Cc: linux-kernel@vger.kernel.org, linux-acpi@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-perf-users@vger.kernel.org, Shuai Xue <xueshuai@linux.alibaba.com>, Zhuo Song <zhuo.song@linux.alibaba.com>, Jing Zhang <renyu.zj@linux.alibaba.com>, Ruidong Tian <tianruidong@linux.alibaba.com> Subject: [PATCH] perf/arm-cmn: fix regitster offset of CMN_MXP__CONNECT_INFO_P2-5 Date: Thu, 30 Mar 2023 17:47:00 +0800 Message-Id: <1680169620-26012-1-git-send-email-renyu.zj@linux.alibaba.com> X-Mailer: git-send-email 1.8.3.1 X-Spam-Status: No, score=-8.0 required=5.0 tests=ENV_AND_HDR_SPF_MATCH, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS, UNPARSEABLE_RELAY,USER_IN_DEF_SPF_WL autolearn=unavailable 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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1761786164058038624?= X-GMAIL-MSGID: =?utf-8?q?1761786164058038624?= |
Series |
perf/arm-cmn: fix regitster offset of CMN_MXP__CONNECT_INFO_P2-5
|
|
Commit Message
Jing Zhang
March 30, 2023, 9:47 a.m. UTC
In the CMN700 specification, it is described that the address offset of the mxp_device_connect_info_p0-5 register is 16'h8 + #{8*index}. Therefore, the address offset of the CMN_MXP__CONNECT_INFO_P2-5 macro defined in the code is wrong, which causes the cmn700 topology map incorrect printed in debugfs. So correct the address offset value to make the cmn700 topology map correct in debugfs. Fixes: 60d1504070c2 ("perf/arm-cmn: Support new IP features") Signed-off-by: Jing Zhang <renyu.zj@linux.alibaba.com> Signed-off-by: Ruidong Tian <tianruidong@linux.alibaba.com> --- drivers/perf/arm-cmn.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
Comments
On 2023-03-30 10:47, Jing Zhang wrote: > In the CMN700 specification, it is described that the address offset > of the mxp_device_connect_info_p0-5 register is 16'h8 + #{8*index}. > Therefore, the address offset of the CMN_MXP__CONNECT_INFO_P2-5 macro > defined in the code is wrong, which causes the cmn700 topology map > incorrect printed in debugfs. > > So correct the address offset value to make the cmn700 topology map > correct in debugfs. > > Fixes: 60d1504070c2 ("perf/arm-cmn: Support new IP features") Ugh, these offsets are correct for CI-700, so strictly that commit is fine. What I failed to notice is that CMN-700 shuffled the mesh_port_connect_info registers out of the way, so it's commit 23760a014417 which should have added more handling for this difference. Thanks, Robin. > Signed-off-by: Jing Zhang <renyu.zj@linux.alibaba.com> > Signed-off-by: Ruidong Tian <tianruidong@linux.alibaba.com> > --- > drivers/perf/arm-cmn.c | 8 ++++---- > 1 file changed, 4 insertions(+), 4 deletions(-) > > diff --git a/drivers/perf/arm-cmn.c b/drivers/perf/arm-cmn.c > index 1deb61b..e9f844b 100644 > --- a/drivers/perf/arm-cmn.c > +++ b/drivers/perf/arm-cmn.c > @@ -59,10 +59,10 @@ > /* XPs also have some local topology info which has uses too */ > #define CMN_MXP__CONNECT_INFO_P0 0x0008 > #define CMN_MXP__CONNECT_INFO_P1 0x0010 > -#define CMN_MXP__CONNECT_INFO_P2 0x0028 > -#define CMN_MXP__CONNECT_INFO_P3 0x0030 > -#define CMN_MXP__CONNECT_INFO_P4 0x0038 > -#define CMN_MXP__CONNECT_INFO_P5 0x0040 > +#define CMN_MXP__CONNECT_INFO_P2 0x0018 > +#define CMN_MXP__CONNECT_INFO_P3 0x0020 > +#define CMN_MXP__CONNECT_INFO_P4 0x0028 > +#define CMN_MXP__CONNECT_INFO_P5 0x0030 > #define CMN__CONNECT_INFO_DEVICE_TYPE GENMASK_ULL(4, 0) > > /* PMU registers occupy the 3rd 4KB page of each node's region */
On Thu, Mar 30, 2023 at 11:34:22AM +0100, Robin Murphy wrote: > On 2023-03-30 10:47, Jing Zhang wrote: > > In the CMN700 specification, it is described that the address offset > > of the mxp_device_connect_info_p0-5 register is 16'h8 + #{8*index}. > > Therefore, the address offset of the CMN_MXP__CONNECT_INFO_P2-5 macro > > defined in the code is wrong, which causes the cmn700 topology map > > incorrect printed in debugfs. > > > > So correct the address offset value to make the cmn700 topology map > > correct in debugfs. > > > > Fixes: 60d1504070c2 ("perf/arm-cmn: Support new IP features") > > Ugh, these offsets are correct for CI-700, so strictly that commit is fine. > What I failed to notice is that CMN-700 shuffled the mesh_port_connect_info > registers out of the way, so it's commit 23760a014417 which should have > added more handling for this difference. I'm assuming that means that this patch breaks !CMN-700 ? i.e. a more substantial fix is necessary, and it's not just a matter of changing the Fixes tag. Thanks, Mark. > > Thanks, > Robin. > > > Signed-off-by: Jing Zhang <renyu.zj@linux.alibaba.com> > > Signed-off-by: Ruidong Tian <tianruidong@linux.alibaba.com> > > --- > > drivers/perf/arm-cmn.c | 8 ++++---- > > 1 file changed, 4 insertions(+), 4 deletions(-) > > > > diff --git a/drivers/perf/arm-cmn.c b/drivers/perf/arm-cmn.c > > index 1deb61b..e9f844b 100644 > > --- a/drivers/perf/arm-cmn.c > > +++ b/drivers/perf/arm-cmn.c > > @@ -59,10 +59,10 @@ > > /* XPs also have some local topology info which has uses too */ > > #define CMN_MXP__CONNECT_INFO_P0 0x0008 > > #define CMN_MXP__CONNECT_INFO_P1 0x0010 > > -#define CMN_MXP__CONNECT_INFO_P2 0x0028 > > -#define CMN_MXP__CONNECT_INFO_P3 0x0030 > > -#define CMN_MXP__CONNECT_INFO_P4 0x0038 > > -#define CMN_MXP__CONNECT_INFO_P5 0x0040 > > +#define CMN_MXP__CONNECT_INFO_P2 0x0018 > > +#define CMN_MXP__CONNECT_INFO_P3 0x0020 > > +#define CMN_MXP__CONNECT_INFO_P4 0x0028 > > +#define CMN_MXP__CONNECT_INFO_P5 0x0030 > > #define CMN__CONNECT_INFO_DEVICE_TYPE GENMASK_ULL(4, 0) > > /* PMU registers occupy the 3rd 4KB page of each node's region */
On 2023-04-03 08:45, Mark Rutland wrote: > On Thu, Mar 30, 2023 at 11:34:22AM +0100, Robin Murphy wrote: >> On 2023-03-30 10:47, Jing Zhang wrote: >>> In the CMN700 specification, it is described that the address offset >>> of the mxp_device_connect_info_p0-5 register is 16'h8 + #{8*index}. >>> Therefore, the address offset of the CMN_MXP__CONNECT_INFO_P2-5 macro >>> defined in the code is wrong, which causes the cmn700 topology map >>> incorrect printed in debugfs. >>> >>> So correct the address offset value to make the cmn700 topology map >>> correct in debugfs. >>> >>> Fixes: 60d1504070c2 ("perf/arm-cmn: Support new IP features") >> >> Ugh, these offsets are correct for CI-700, so strictly that commit is fine. >> What I failed to notice is that CMN-700 shuffled the mesh_port_connect_info >> registers out of the way, so it's commit 23760a014417 which should have >> added more handling for this difference. > > I'm assuming that means that this patch breaks !CMN-700 ? > > i.e. a more substantial fix is necessary, and it's not just a matter of > changing the Fixes tag. Yes, indeed. I have half an idea, and the plan for this week was to work on other CMN stuff anyway, so I'll see what I can cook up. Cheers, Robin.
在 2023/4/3 下午5:40, Robin Murphy 写道: > On 2023-04-03 08:45, Mark Rutland wrote: >> On Thu, Mar 30, 2023 at 11:34:22AM +0100, Robin Murphy wrote: >>> On 2023-03-30 10:47, Jing Zhang wrote: >>>> In the CMN700 specification, it is described that the address offset >>>> of the mxp_device_connect_info_p0-5 register is 16'h8 + #{8*index}. >>>> Therefore, the address offset of the CMN_MXP__CONNECT_INFO_P2-5 macro >>>> defined in the code is wrong, which causes the cmn700 topology map >>>> incorrect printed in debugfs. >>>> >>>> So correct the address offset value to make the cmn700 topology map >>>> correct in debugfs. >>>> >>>> Fixes: 60d1504070c2 ("perf/arm-cmn: Support new IP features") >>> >>> Ugh, these offsets are correct for CI-700, so strictly that commit is fine. >>> What I failed to notice is that CMN-700 shuffled the mesh_port_connect_info >>> registers out of the way, so it's commit 23760a014417 which should have >>> added more handling for this difference. >> >> I'm assuming that means that this patch breaks !CMN-700 ? >> >> i.e. a more substantial fix is necessary, and it's not just a matter of >> changing the Fixes tag. > > Yes, indeed. I have half an idea, and the plan for this week was to work on other CMN stuff anyway, so I'll see what I can cook up. > > Cheers, > Robin. Yes, I did ignore the CI700 situation, I don't know much about !CMN700. Robin, can you please help to fix this problem? Thank you so much. Thanks, Jing
diff --git a/drivers/perf/arm-cmn.c b/drivers/perf/arm-cmn.c index 1deb61b..e9f844b 100644 --- a/drivers/perf/arm-cmn.c +++ b/drivers/perf/arm-cmn.c @@ -59,10 +59,10 @@ /* XPs also have some local topology info which has uses too */ #define CMN_MXP__CONNECT_INFO_P0 0x0008 #define CMN_MXP__CONNECT_INFO_P1 0x0010 -#define CMN_MXP__CONNECT_INFO_P2 0x0028 -#define CMN_MXP__CONNECT_INFO_P3 0x0030 -#define CMN_MXP__CONNECT_INFO_P4 0x0038 -#define CMN_MXP__CONNECT_INFO_P5 0x0040 +#define CMN_MXP__CONNECT_INFO_P2 0x0018 +#define CMN_MXP__CONNECT_INFO_P3 0x0020 +#define CMN_MXP__CONNECT_INFO_P4 0x0028 +#define CMN_MXP__CONNECT_INFO_P5 0x0030 #define CMN__CONNECT_INFO_DEVICE_TYPE GENMASK_ULL(4, 0) /* PMU registers occupy the 3rd 4KB page of each node's region */