Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp1926486rwl; Thu, 30 Mar 2023 03:36:19 -0700 (PDT) X-Google-Smtp-Source: AKy350a+1Ki1rp+9gpBZma+nZuUnWAS5eMec/Gr7/n4econG5oB1W1it1In9l/PvgGv5JdSSw+wB X-Received: by 2002:a17:902:868b:b0:1a2:8f6d:8a14 with SMTP id g11-20020a170902868b00b001a28f6d8a14mr1142357plo.5.1680172579559; Thu, 30 Mar 2023 03:36:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680172579; cv=none; d=google.com; s=arc-20160816; b=We7I6CQk24fgnKmglTVG+erCJ2vLIKIYltU6GOstUdZ9lEAXWI8DRgJnnxKFae14vi hRTMhJVZclAkTrYlHULmsle11Oz9KZTmlfRRIWkGzHlyddjGt0hVlJh+2+Dc2O2Iz+Qm IAi8B135QeLQk5tRY0VhbV+KbQEGBSLonUl4Czcjhdm+TZ7OfaBeWJFU+VI0ojqmPxg/ sT9gObWAfWJ573u46NASMIx7CrHwphFtfrrQSmCZMZMISDRGjMNmeBH1Q3j+HTt8WOn/ QRP5OwKkk8PT0U2/F0i1fYCK/NwyJUymib1WiZs7IvcbXnU1iEV+EXiAmgOYvYa0k3ee M9pA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id; bh=+o4JHfqENsdzom68Oy/bYYEC2W/kAhzl2JwbQZWgFcw=; b=F6ILuuzZCqmIVNefCDKNOjU7+fd+gMA6+uMfYz454rnj7TKau+5Jd47v+xPVhdex0o cD/VU1XH78cbKiHNWG9xUM36IK78h8Yzr48lsus4aWQSNmD3D2XY/ZnUypxSuIythjBQ GSVUWJtNGhb4hgtAG6lM7k3AvIwMXrY4GWBa+5lRkQbcvjQRiCywTfVwTPNIwAjUKOd2 IopqLpkMB3NzhdFSHRDarCWnR2k2p0+K86dn7ohteVJ//vKQfoYKnR4qVHV+zlggahtm sHdEn48lM+ZeDpv+GhsdBFvIFIv82rKmhusjvvvH/+otEjJ+wzQRYB4N+zAoyNQIV2dM yhxw== 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 z7-20020a170903018700b001a2513b8e14si8674826plg.84.2023.03.30.03.36.07; Thu, 30 Mar 2023 03:36:19 -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 S230496AbjC3Ken (ORCPT + 99 others); Thu, 30 Mar 2023 06:34:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55054 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229807AbjC3Kel (ORCPT ); Thu, 30 Mar 2023 06:34:41 -0400 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id B40CB211C; Thu, 30 Mar 2023 03:34:31 -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 488202F4; Thu, 30 Mar 2023 03:35:15 -0700 (PDT) Received: from [10.57.54.254] (unknown [10.57.54.254]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 3FED43F663; Thu, 30 Mar 2023 03:34:29 -0700 (PDT) Message-ID: <3b95e362-300a-12af-0d55-76672c60be9f@arm.com> Date: Thu, 30 Mar 2023 11:34:22 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; rv:102.0) Gecko/20100101 Thunderbird/102.9.1 Subject: Re: [PATCH] perf/arm-cmn: fix regitster offset of CMN_MXP__CONNECT_INFO_P2-5 To: Jing Zhang , Ilkka Koskinen , Will Deacon , Mark Rutland 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 , Zhuo Song , Ruidong Tian References: <1680169620-26012-1-git-send-email-renyu.zj@linux.alibaba.com> Content-Language: en-GB From: Robin Murphy In-Reply-To: <1680169620-26012-1-git-send-email-renyu.zj@linux.alibaba.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.3 required=5.0 tests=NICE_REPLY_A, RCVD_IN_DNSWL_MED,SPF_HELO_NONE,SPF_NONE 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: X-Mailing-List: linux-kernel@vger.kernel.org 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 > Signed-off-by: Ruidong Tian > --- > 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 */