Received: by 2002:a05:7412:2a8a:b0:fc:a2b0:25d7 with SMTP id u10csp76996rdh; Tue, 6 Feb 2024 20:22:56 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCW3XHrTQ7LlBhoj6NkbCy37xkdx9QXDwDi0BIejRYGe7i7jjMOf2gQnShovCVoy7dQSUsYvHhJTuRuN9Xe9SfSEzGWoPc4VjAPTn6+BJA== X-Google-Smtp-Source: AGHT+IGng/TUeawJkssy2oMQaicQSKe98R9PYS0o9MgC4w48GENf0W2+9WdWlIZ80/7riH2iM33n X-Received: by 2002:a17:906:4095:b0:a37:2696:b3e with SMTP id u21-20020a170906409500b00a3726960b3emr3888876ejj.59.1707279776677; Tue, 06 Feb 2024 20:22:56 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707279776; cv=pass; d=google.com; s=arc-20160816; b=OwdQUCbAatOtcCkAJhFLw/pbB3kOsHuuX98EqJbwEAvQBX5ekoSuXqNhnyu2JIrc4u Ajm6LRw8D1pTKV5znJX1YIMUqzB5BXwER9WuaufhB9AdGd0BO0ByP/MseAByAAhOWUr+ D/IvxB/mRdjzMteaFqlZUzQZRQ4zoQgjhfA0llyR0MhUn7tQz8UkubwRwSnqPWBxMNqZ bcmA1mc6U57BZGWsBLGjgunTiyKdmJaqKOanyjSrkPhGfZme7OIn8cHfQhmd2b2k/beK wxWy1yPEzwZow8s/CEEiGrfZ2L/2jOQsvyfumwqRdE2fCs5xsLHVQCNG0bnlv+tmT4cO xLlw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=references:dlp-filter:cms-type:content-transfer-encoding:date :message-id:cc:to:from:sender:reply-to:subject:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:dkim-signature :dkim-filter; bh=4iN7aGm2GIoezqePI+sDw2OitzYGXb1VOO9E8blVTaw=; fh=mMtVKl8trxAGPuBspa9d1m+PNaoV4ingnlUGSK1Rjt4=; b=DPNOVpJXBIRyGvTtcO0Mh7hGBcFTpCDfnA9IJnDZPGrXqnK+CtD6Mij+V7imZ5IUCK zLP27Ab/mVbONbgtsxRr7NtR8eB08A5PZCpWCVh/HmA4eDGayjwfhZhc4Jl4woXfjFEX mrg3Uo53DnXeSoTuBGQi6tusZGhK/ZxmTLbkr2KFlpBaKNEWz/z8QSF6xbC4207Qx0bp MwmC9dd4xo2U2iqBUn1zG2c8jPuh6j94nwtJIY+bwBa5+Y//iEJOdOLtILD6TCgVmH/u WwJ4G14hO+3VTJWWG/MrdwZA7AEoJR2sibCCHrWr0TrDNAnXcFYPa6FBO1SFhqEtxBNU 8D5w==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=FF+s0BpJ; arc=pass (i=1 spf=pass spfdomain=samsung.com dkim=pass dkdomain=samsung.com dmarc=pass fromdomain=samsung.com); spf=pass (google.com: domain of linux-kernel+bounces-55930-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-55930-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com X-Forwarded-Encrypted: i=2; AJvYcCXLIRiWAxkXhlM9NfskKII3b3SAHb6HO1KaVAvPDnBiZmJj906A3tMMKI0zdr0d5YvcwhuKhpIVbVzSKBD7eUIuNkJM8rya7Wk+8O4BZw== Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id n18-20020a170906b31200b00a2ca0482c51si358457ejz.695.2024.02.06.20.22.56 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 06 Feb 2024 20:22:56 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-55930-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=FF+s0BpJ; arc=pass (i=1 spf=pass spfdomain=samsung.com dkim=pass dkdomain=samsung.com dmarc=pass fromdomain=samsung.com); spf=pass (google.com: domain of linux-kernel+bounces-55930-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-55930-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.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 am.mirrors.kernel.org (Postfix) with ESMTPS id 443FC1F26591 for ; Wed, 7 Feb 2024 04:22:56 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 4872B1CD2E; Wed, 7 Feb 2024 04:22:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=samsung.com header.i=@samsung.com header.b="FF+s0BpJ" Received: from mailout1.samsung.com (mailout1.samsung.com [203.254.224.24]) (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 C1BF71CD13 for ; Wed, 7 Feb 2024 04:22:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=203.254.224.24 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707279768; cv=none; b=GBUIU+csk+AKmaDPZsJ3VsEGD9TY6XkEpxiP78Ej9bNRVUKfQFgIeF+lioIYiFNjw/aEeakJL8IupkKaH4jnC0pQBk60JNOPVRh3bDiSpuJFPuMT0ldAyW6uMJDXnZVr/Vf1/xx/ZGRGJGV66+qbgC2cLuYVgpnR3bglSJpAMJ0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707279768; c=relaxed/simple; bh=rukCa+dU1eZ6GSZTI440gjVvfzDMVGjFz/6VQOVW/40=; h=Mime-Version:Subject:From:To:CC:Message-ID:Date:Content-Type: References; b=g6nPEC7zSUzan1UwKho/AMt07LcHnPQ89fSn3mwpfpc4DwvATsxepUw/iuu3dxGLLFRGBHXYvVddanK+1ut1nwd+vefpbTUvvHz0tNJ5yZb7pu8bl2NiG9hkrjy2UlIvYZBmpeUC0YbVMpSpRXnukGKtd+/kDsjUkOI8xOo/18I= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=samsung.com; spf=pass smtp.mailfrom=samsung.com; dkim=pass (1024-bit key) header.d=samsung.com header.i=@samsung.com header.b=FF+s0BpJ; arc=none smtp.client-ip=203.254.224.24 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=samsung.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=samsung.com Received: from epcas2p3.samsung.com (unknown [182.195.41.55]) by mailout1.samsung.com (KnoxPortal) with ESMTP id 20240207042243epoutp01bf573941535ad2824de429c09a18f251~xeeY91aA60537505375epoutp01y for ; Wed, 7 Feb 2024 04:22:43 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.samsung.com 20240207042243epoutp01bf573941535ad2824de429c09a18f251~xeeY91aA60537505375epoutp01y DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1707279763; bh=4iN7aGm2GIoezqePI+sDw2OitzYGXb1VOO9E8blVTaw=; h=Subject:Reply-To:From:To:CC:Date:References:From; b=FF+s0BpJ/LSj+nf3wR66Ixm6kefAqja9n/FmuprwniZ7lFoZp6fCjtj4bFexkT7qw vVPBosOVd5lwK3Kw+aFpYJaQg7j7NFk4xcEtfVFPaNK23oA5DbBNFGGmvwP+kp/zC1 qHIiD1B/BP6ehMhJUyFanZbx4101OaLIP1g0n02Q= Received: from epsnrtp2.localdomain (unknown [182.195.42.163]) by epcas2p1.samsung.com (KnoxPortal) with ESMTP id 20240207042243epcas2p1ac78a64d3306eafdf5de4ab77faa5fb2~xeeYeJ0kc1480014800epcas2p1f; Wed, 7 Feb 2024 04:22:43 +0000 (GMT) Received: from epsmges2p1.samsung.com (unknown [182.195.36.90]) by epsnrtp2.localdomain (Postfix) with ESMTP id 4TV6R36WZmz4x9Q9; Wed, 7 Feb 2024 04:22:39 +0000 (GMT) X-AuditID: b6c32a45-179ff70000002716-ad-65c3058be231 Received: from epcas2p3.samsung.com ( [182.195.41.55]) by epsmges2p1.samsung.com (Symantec Messaging Gateway) with SMTP id 20.AC.10006.B8503C56; Wed, 7 Feb 2024 13:22:35 +0900 (KST) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 Subject: [PATCH v2] perf: CXL: fix mismatched cpmu event opcode Reply-To: hj96.nam@samsung.com Sender: Hojin Nam From: Hojin Nam To: "linux-cxl@vger.kernel.org" , "jonathan.cameron@huawei.com" CC: Wonjae Lee , KyungSan Kim , "linux-arm-kernel@lists.infradead.org" , "linux-kernel@vger.kernel.org" , "will@kernel.org" , "mark.rutland@arm.com" X-Priority: 3 X-Content-Kind-Code: NORMAL X-CPGS-Detection: blocking_info_exchange X-Drm-Type: N,general X-Msg-Generator: Mail X-Msg-Type: PERSONAL X-Reply-Demand: N Message-ID: <20240207042235epcms2p358e40f0409e25bd9e875ad1ae0dd0764@epcms2p3> Date: Wed, 07 Feb 2024 13:22:35 +0900 X-CMS-MailID: 20240207042235epcms2p358e40f0409e25bd9e875ad1ae0dd0764 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="utf-8" X-Sendblock-Type: AUTO_CONFIDENTIAL CMS-TYPE: 102P X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFupmk+LIzCtJLcpLzFFi42LZdljTXLeb9XCqwcLD2harFl5jszi6h8Ni 0+NrrBbnZ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rqYcnlNdmzY/F9+re8KV8xKSWs+/EGynGv/pMY43ZhVkxv35XT6JPDz ba6JMvdcxqfEUpyRaKjFXFScCABTg7sOHgQAAA== DLP-Filter: Pass X-CFilter-Loop: Reflected X-CMS-RootMailID: 20240207042235epcms2p358e40f0409e25bd9e875ad1ae0dd0764 References: 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 --- 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