Received: by 2002:a05:7412:2a8a:b0:fc:a2b0:25d7 with SMTP id u10csp269030rdh; Wed, 7 Feb 2024 04:28:33 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCUar9BLD6saYdA2h+Ec2L/5QDKIfwT508iMyFcH8pQWxJB/mO1Zy2CM/Vf2cCkOBuApkA+VJ6GYiSoICT/+/Wt5jQr4lNAeGe2gRu6Alg== X-Google-Smtp-Source: AGHT+IFFpq11298E6PG8PQrYIovLneF7g2uTFxV7AuRS58ierFMdXtUU4c1eHt097lpE2t0ss+Qs X-Received: by 2002:a05:6358:7251:b0:178:75cb:18dc with SMTP id i17-20020a056358725100b0017875cb18dcmr2762247rwa.10.1707308913132; Wed, 07 Feb 2024 04:28:33 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707308913; cv=pass; d=google.com; s=arc-20160816; b=RKd2Cj0gdNlsAiBPzKiqSA06TIKbacvg38sl8cx1UbegtSgjd33XqnaX6y6I3RsEGB Pae6sHOW7cbbX7rgPXWeFEjmPH2RUuowQIC8QospsLLpXds0iuSF7/vgG9kz8ICEDFOQ IhLyLc1cFbjoKY8WcaXaHd5KH67qqpN4LRs87ZR5GcFOg+zR6OGuoVH4uTdObGNEQR6a BIV8PgRFJTUsVFjMmnoOMQG/M03kSrTFvE+gb0V0vDrjWPpgSXZyhy9kBI9pDeXqlojg DXb4aahV+VXrlnBzrcch1caDm1f31ldebvdOOrHSq7USl+V7CxeWHhe/+N7ZtjcrnCH8 Nj/w== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:organization:references :in-reply-to:message-id:subject:cc:to:from:date; bh=HiRuMvQj0uDap0+0ElyYHtaCcFYSgyQy5EE6FhN6FSg=; fh=cVZJdM7MrmD9DFTud+cUMhV9yxx5t4mftfse8Jxl3dQ=; b=UuVzbd8eSP0pdif/7GLZEHL4UPvpW6D1pAVlAq7IKCi1Cj2oKRgjaIry38buJe/pjV h/YBOOooSxrd8ROdOQfDWKkDoikWPeEZlxzfrul8DkgvPJvY5wSAraaz+901oITw9jkc SC+FtlMWqnE09VYmf7xiOYfjuBZqgxqigrZxUHc6aIibaYkKIekzPf14PbSiWw+2yOCI yDpEmieCDDrjsmMlOvBuHzMzem/Eck6jYKfjUE94LRWAlV3q/AzzJzhq6iBkYo82I2gm 68uelEFkYHp8vsgluMKWD+Y3mb+4oSc0F1YBX2lRFEKtbKPh/ZtRcTz67GNj5j2vV52A jqyQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=huawei.com dmarc=pass fromdomain=huawei.com); spf=pass (google.com: domain of linux-kernel+bounces-56482-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-56482-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com X-Forwarded-Encrypted: i=2; AJvYcCV2Wuj9vaJUncTbJyeaNnHgK/tmat8LlRDGxulTCWOthmJdNyHOculZOwiFEOoOkEqJCX0TEQ1wVHTxxXqSLdQg1YhcAO5+nfnZDkHlkA== Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id b4-20020aa78704000000b006e04474ddbesi1388515pfo.294.2024.02.07.04.28.32 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 07 Feb 2024 04:28:33 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-56482-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=huawei.com dmarc=pass fromdomain=huawei.com); spf=pass (google.com: domain of linux-kernel+bounces-56482-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-56482-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id C3A3EB21170 for ; Wed, 7 Feb 2024 12:28:01 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 7B8E659B7F; Wed, 7 Feb 2024 12:27:56 +0000 (UTC) Received: from frasgout.his.huawei.com (frasgout.his.huawei.com [185.176.79.56]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C3C5A5A0FD; Wed, 7 Feb 2024 12:27:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.176.79.56 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707308875; cv=none; b=N6DptMUbslajFagpNPmN7sMRle+QA7S05LSAflNri5W0nKIfvMfPBgfnOBd85C+WykA90tMUcXOo6/xaKco+oXKTC2CvM1EpxrwoUBfkre1j5BftJC63mwAUG7xxt5obH/b+rArC9LaoqUXH6UqiRvMmwb93FDs/RhHW/mJ+RQ4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707308875; c=relaxed/simple; bh=zNgtsqJEnEr66FZuG+V88C+VFdZoePSCJZJWhNtsyyA=; h=Date:From:To:CC:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=GW23hhP26mDl1CaBAIUie0IPjDZ7V14IxtaqLC6aBZnEEUL4KbcEPwNhggYPmXHPe6W/AAcNdQod6s34HhTyxfc4EGZjOL+E0R9XjMyzhQ1lT3ftq4tktpSW3QXCfJgonOW5n0ehYAK3NqDDosEFB48pG/xNTB2LSHsLxeZDqD0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=Huawei.com; spf=pass smtp.mailfrom=huawei.com; arc=none smtp.client-ip=185.176.79.56 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=Huawei.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=huawei.com Received: from mail.maildlp.com (unknown [172.18.186.216]) by frasgout.his.huawei.com (SkyGuard) with ESMTP id 4TVK6y1jhjz6K62N; Wed, 7 Feb 2024 20:24:26 +0800 (CST) Received: from lhrpeml500005.china.huawei.com (unknown [7.191.163.240]) by mail.maildlp.com (Postfix) with ESMTPS id 97A32140736; Wed, 7 Feb 2024 20:27:44 +0800 (CST) Received: from localhost (10.202.227.76) by lhrpeml500005.china.huawei.com (7.191.163.240) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35; Wed, 7 Feb 2024 12:27:44 +0000 Date: Wed, 7 Feb 2024 12:27:43 +0000 From: Jonathan Cameron To: Hojin Nam CC: "linux-cxl@vger.kernel.org" , Wonjae Lee , KyungSan Kim , "linux-arm-kernel@lists.infradead.org" , "linux-kernel@vger.kernel.org" , "will@kernel.org" , "mark.rutland@arm.com" Subject: Re: [PATCH v2] perf: CXL: fix mismatched cpmu event opcode Message-ID: <20240207122743.00004acc@Huawei.com> In-Reply-To: <20240207042235epcms2p358e40f0409e25bd9e875ad1ae0dd0764@epcms2p3> References: <20240207042235epcms2p358e40f0409e25bd9e875ad1ae0dd0764@epcms2p3> Organization: Huawei Technologies Research and Development (UK) Ltd. X-Mailer: Claws Mail 4.1.0 (GTK 3.24.33; x86_64-w64-mingw32) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-ClientProxiedBy: lhrpeml100005.china.huawei.com (7.191.160.25) To lhrpeml500005.china.huawei.com (7.191.163.240) On Wed, 07 Feb 2024 13:22:35 +0900 Hojin Nam wrote: > S2M NDR BI-ConflictAck opcode is described as 4 in the CXL > r3.1 3.3.9 Table 3.50. However, it is defined as 3 in macro definition. Also > adds s2m_ndr_cmpm for bit 3 that was added in CXL r3.1. > > Fixes: 5d7107c72796 ("perf: CXL Performance Monitoring Unit driver") > Signed-off-by: Hojin Nam Ah. Sorry I've mislead you. I lazily assumed this was in the 3.0 spec as well without checking. As a fix, we should not add the cmpm or update the reference comment. So should be the v1 patch with a reference to table 3-43 in r3.0 and the fixes tag. A follow up patch to add the 3.1 definitions would be excellent but we shouldn't be looking to backport that so it doesn't belong in the fix :( Jonathan > --- > > Hi Jonathan, > I've modified the commit messsge and code to reflect you mentioned. Thank you! > > Changes since v1: > - Add s2m_ndr_cmpm event attribute (Jonathan) > > > drivers/perf/cxl_pmu.c | 5 +++-- > 1 file changed, 3 insertions(+), 2 deletions(-) > > diff --git a/drivers/perf/cxl_pmu.c b/drivers/perf/cxl_pmu.c > index 365d964b0f6a..d85d53d907a6 100644 > --- a/drivers/perf/cxl_pmu.c > +++ b/drivers/perf/cxl_pmu.c > @@ -415,11 +415,12 @@ static struct attribute *cxl_pmu_event_attrs[] = { > CXL_PMU_EVENT_CXL_ATTR(s2m_bisnp_curblk, CXL_PMU_GID_S2M_BISNP, BIT(4)), > CXL_PMU_EVENT_CXL_ATTR(s2m_bisnp_datblk, CXL_PMU_GID_S2M_BISNP, BIT(5)), > CXL_PMU_EVENT_CXL_ATTR(s2m_bisnp_invblk, CXL_PMU_GID_S2M_BISNP, BIT(6)), > - /* CXL rev 3.0 Table 3-43 S2M NDR Opcopdes */ > + /* CXL rev 3.1 Table 3-50 S2M NDR Opcopdes */ > CXL_PMU_EVENT_CXL_ATTR(s2m_ndr_cmp, CXL_PMU_GID_S2M_NDR, BIT(0)), > CXL_PMU_EVENT_CXL_ATTR(s2m_ndr_cmps, CXL_PMU_GID_S2M_NDR, BIT(1)), > CXL_PMU_EVENT_CXL_ATTR(s2m_ndr_cmpe, CXL_PMU_GID_S2M_NDR, BIT(2)), > - CXL_PMU_EVENT_CXL_ATTR(s2m_ndr_biconflictack, CXL_PMU_GID_S2M_NDR, BIT(3)), > + CXL_PMU_EVENT_CXL_ATTR(s2m_ndr_cmpm, CXL_PMU_GID_S2M_NDR, BIT(3)), > + CXL_PMU_EVENT_CXL_ATTR(s2m_ndr_biconflictack, CXL_PMU_GID_S2M_NDR, BIT(4)), > /* CXL rev 3.0 Table 3-46 S2M DRS opcodes */ > CXL_PMU_EVENT_CXL_ATTR(s2m_drs_memdata, CXL_PMU_GID_S2M_DRS, BIT(0)), > CXL_PMU_EVENT_CXL_ATTR(s2m_drs_memdatanxm, CXL_PMU_GID_S2M_DRS, BIT(1)), > -- > 2.34.1