From patchwork Thu Mar 7 09:57:24 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Xu Yang X-Patchwork-Id: 13585317 Received: from EUR03-DBA-obe.outbound.protection.outlook.com (mail-dbaeur03on2051.outbound.protection.outlook.com [40.107.104.51]) (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 F30E174262 for ; Thu, 7 Mar 2024 09:57:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.104.51 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709805449; cv=fail; b=D0xYFwSp36yCG7ENYJ5QyOlhnuZdTFb16njiV61TXZX1qwLA7JuRgESPk0CGLP9CpIkpt+EjbXWT4PQdyTaN9CDUjfxe3IfSW+TlerfhdyquF0hiPK3TF0CynIXNBH4/JI1IrRL2R25ZqhRO8tAQsFV5g0DRzZcJyz8aZf9hGQ8= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709805449; c=relaxed/simple; bh=/W87hgfBmepeJpvzH4bTILFbDkTTMJF8sCBd2yJ4bgQ=; h=From:To:Cc:Subject:Date:Message-Id:Content-Type:MIME-Version; b=YDHcR1G3bgmdFWves5+WaiE++GA4Pa5dZqWZocJ+Ho5u11npceqnw6Dlfut51UUwPaekEAA8J+VmW2OcoZkf9HqnYw79le8h0wYdC3m0I74HC6PpWxsXiCnfZxEpF3M/OTGeGftA5kEvBVfVtALUYdmiZuSmcUBoteRAKn/4zeQ= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com; spf=pass smtp.mailfrom=nxp.com; dkim=pass (1024-bit key) header.d=nxp.com header.i=@nxp.com header.b=UYI5qVUB; arc=fail smtp.client-ip=40.107.104.51 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=nxp.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=nxp.com header.i=@nxp.com header.b="UYI5qVUB" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=lozqq6Saz/gxnEWwIIO2f0T+IGbXjj6gNcoFHTb9m3TsTfFoeUjcXDssJXf1UPfaXU0c1wmjJ3Tqqc4Wr6+BF0uTrmljJFbyoshd6R2oSsfXpqns1Y3RGLaxRdfcVIBzJvfWUYDJUZMuHAMXRBdgIP8Y3P7rJKkjyhbUz/EecotI2EpAtgdmpWmA2DumsnD5he8JflxEgslNr2v3vVVRMryfAdqpMV2KXVpsuKAiDngQQdyAA+ApX1gGaHc5wJWBAk83MiVhHmvGwEx49I8odaGu4//zmS9VO2PAHNKa0rMGPkueauvmbkknQmm48WngK+ZWwBt9BNWE537INj4NDw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=mkHod9uTc567uZyWPz64+1YFQBNwCsdTDer53U35t/I=; b=d8RsIBu5cbB408+hVHHVy01BUi1zRYF8M67dU339LGiWZI8AcOmiPHBYdUJSC1Lk5qZNbQBqjDWMb5NeVODABuc1LFsKHRw4BvLhOkvYUKBzrQxmliZ/6lBUEly3KtBElzOkjYVSWcBxY+7DX3v8doWU7lu3jVMNc3RKk0isako5dg7i/En7GPR/txuh74TtMnN+F5GorgQfMAPPJS8s0mdG1kgauSa1k56QyAk4oOcXb0MtYnRAK3pgyvY457iMhTZBswGjW0NupU8KgbHh0vVcE0q3QPIP81suNiMQhCCBLAPlVEeXd3FHlYflIHpvqCsZ0anWMUPA4O+ovdolXQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=mkHod9uTc567uZyWPz64+1YFQBNwCsdTDer53U35t/I=; b=UYI5qVUBZgdHvezYCEgCU7RCO+dBb1yNhBaSUIoH3u3wDUxD/spdH8fCenlwJq5wbrZ+A3ZyY+aD1H0ixGSYbFJ+LFnl7gT5ztn9jFwuzmdTEhOe8UpX7SFJAqtesZqI64sDWefemYVSduxnVsh2laN+RJBatCJb1DzvN0QssX8= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from DU2PR04MB8822.eurprd04.prod.outlook.com (2603:10a6:10:2e1::11) by DU2PR04MB8504.eurprd04.prod.outlook.com (2603:10a6:10:2d3::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7339.38; Thu, 7 Mar 2024 09:57:24 +0000 Received: from DU2PR04MB8822.eurprd04.prod.outlook.com ([fe80::d45f:4483:c11:68b0]) by DU2PR04MB8822.eurprd04.prod.outlook.com ([fe80::d45f:4483:c11:68b0%7]) with mapi id 15.20.7339.035; Thu, 7 Mar 2024 09:57:24 +0000 From: Xu Yang To: Frank.li@nxp.com, will@kernel.org, mark.rutland@arm.com, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org, shawnguo@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com, john.g.garry@oracle.com, jolsa@kernel.org, namhyung@kernel.org, irogers@google.com Cc: mike.leach@linaro.org, peterz@infradead.org, mingo@redhat.com, acme@kernel.org, alexander.shishkin@linux.intel.com, adrian.hunter@intel.com, linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org, imx@lists.linux.dev Subject: [PATCH v6 1/7] dt-bindings: perf: fsl-imx-ddr: Add i.MX95 compatible Date: Thu, 7 Mar 2024 17:57:24 +0800 Message-Id: <20240307095730.3792680-1-xu.yang_2@nxp.com> X-Mailer: git-send-email 2.34.1 X-ClientProxiedBy: SG2PR06CA0212.apcprd06.prod.outlook.com (2603:1096:4:68::20) To DU2PR04MB8822.eurprd04.prod.outlook.com (2603:10a6:10:2e1::11) Precedence: bulk X-Mailing-List: imx@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DU2PR04MB8822:EE_|DU2PR04MB8504:EE_ X-MS-Office365-Filtering-Correlation-Id: be32b33e-affb-4ede-8de9-08dc3e8cfcec X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: IexKGYrthrQGO45E+VAqxnxzQfaPxb2BOVSAMrTR7st0vUeaTcCFnEVbzJ1nDczVfzu2BudOVniMss9l38JmsBSUsqlr4GmC+03lrAjDsJHkKTyaOizLli0KnIG8wNKke8X8iidizfJI+vVoWs+RYI2BPA+QCGKExV2jAfZk2JyoWMU7nogQtkGQigUlAjWiArzaiBBmcxLc5TyyZWQl4oDL1AQh3p7hG4rjKxQiOXdgOGN4AKoZGW/emW/1vjtMdpf85VhBpfyReHlfMim1XUMYxdn8syBjK55fRWW6VLymTkPv/E2sF4ogIi7p+FsKoDJ1rfXGWoLRqgMhE1yUlY61ujsm2x56BmjmiqA5hC/BQ6Ot8k+tVRSjWxR5WdKYTAjg9aSVTAKzlK3PYLt1iRBl+rcN3gUx7E9ZAj7YjE4rQ62zOThpgBIpicGJ53QoAe23beMY0Cdg02Jw08kK3gTclFODtOMvkDDfaNdTwjVzqTM7+EB+TL3ypRBZqvzb8BDSogSKiAX1H6h47Ys7mIs2URKhY3HHDXew4Ng9W0AGdSNbWZddj5vQN+mJNTz5aU15LNbe1f3uXXudkno76qtryNC+wnlvVsxiZzf7kC6byCCqA3AZeDwjMgBQKrFXT2+WvR/vNxvq1LmPnlfjVxOKRJdlgw830UHBCYTHmrlwA5+sBspHY8N+NRMAAFFDBqbDTnPs9GAkvAEdyZFFYHRdHP27pQ8e11WdQlLcujQ= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DU2PR04MB8822.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(376005)(38350700005)(921011);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: AKGEAW8QBKaJxId81ELJbeWPZZQU58oPOyThcNFvQKouNIzVJbREGhHf7VTsEYd51ZCdvf4bHY3BHUVAlSCT3tQ4ccEQjSjUS18wFwFiVBD/urUms6Kf1UZnTLFi92E1ZUlJhKTBPB27n7nlQo9FbDxRuD2SpyfO0zKeplA+ss28OoUr9unfKkUH97FFedMLSz7XaRtqJ+p7gT5GzMGaMpxJ0PlkF68TQeD7cwiw5PNu/WGZ40Wm+7Wk3esKhDGflV0/bzTZB+jE0OX/2BsdeyPiP0EDBbhRA3xV1xh6vXT5IvPd6r3+50I/CvJ/NFLtb/NDhTayWfsq4nqGEM1sGYiaUrUDYKPU4bq00YMbk6pkf5sea00JosNrc7ydhn8EK0i6JP05YX0mBSkC7CAxhYObSCuZ2WPLnJ02JZ3ewIpGyhzhkVgClK45k1cWWwL32eRI0e/OzOBcyR6G9g1gENT+olzd89LZtDOVMbeRtviWCwoQe6fIfqniKKrTsG+G4qGKXcFQ11z0sSH1336wvHSsowrKaNTrb8SV6ukqIItuJrG2mJnYSA3ehiDyiipMfirq3HQEZ/w0HITpcYDxJuAni0k6y3NrzkhIbc8MS6xovUabp+Cx6Jzl964QkTrexV/ElOK9nG2B2+Y44Cb9tUaB9C6l78mP96J+lyFlpgxsQsL+oWrJkNQY894GBrBc0EXLV0XU9+nTdqrXoad5enzaEWJZtmsHjQaWxqyEwlD8g4OG2xVw3CD2hvXQp3Gxg1UdXGlULzHrISQFugayU0HjAGN+w6ziHDkkANpUFfQ/z+BdXl5Y5Poo/H1yQZFgAn9sI/cx3HxIHpNuecbY2a3zCVsUsgJq6ld31e1d1lVFRiT6Cup2OMcK8NaVwl7BJwRADP9OorbuB6G3JlN5434GFDTAGtLDUVyhvekhPfJfy8T5b0qCtWIH2zhnWAyKwzJ8dA6O1p2Ok3GeWm/M8V38g6G1v+28QTDK+N/KKWAP8nQQgzfXH22zGZbT9RpVe1zhuazPBWEZm2Dp3UO+VsBwvEjsw7gOG1G6A01yFrtogXJlPEGD8JafeGZXSCR/vXuCyPV5kSOleL0IA/Bzk3ZPqo2e28qgEP/zcV3/h1YIo+ulZ0PyZWRN5QGsqxv038Vyqq9wGr94wgDhOBEaDQhS6a/UIr3jRcN8u5e3yZ5RD7JoRw5MW2BlCMCJ0uSRnd7FCFSCzV7Jp20R9Hky3Uo93IN8NDC54RFrvOqERPROj2xhAXVFp+7TOTwlCl40yVGJslYUC7/IuECxoYiajHTNh1TczluiSujwPmH/fsYupYkBFymtSr4Qo6xHC5t7zMJMDuBxpIDX1L5NDZgbeHdFbu5FkYgvESQ9EmFVau8cYd16/alEN+1jvjpbTzr6yh9cWBWPdBrmtTvSWW3NH17RJ9d1F+eB5nV5ekc/1Nqa+el1r3V1JOc2OdOvzN0SLx8bZ5vRi9inBnSW2iZ9fLfjtpzGydX3ar7n4TfWesvCP+nwcASGvvtX4ijkww7j67EmOZPth5Wf+/fMXO7LUTQ9i1Lm6+sgpUwRZZmGY8BavKlAByoW8FQm1og5JgP2 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: be32b33e-affb-4ede-8de9-08dc3e8cfcec X-MS-Exchange-CrossTenant-AuthSource: DU2PR04MB8822.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Mar 2024 09:57:24.2788 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: GS52US/D9emZu6ZjpmAuLRQYKQKs55u+an4ehDkoLLwcEKxTDbwPlJ7IHYrDVW7Vqh7l7OdDEfc7kjwRN8Z7GQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DU2PR04MB8504 i.MX95 has a DDR pmu. This will add a compatible for it. Acked-by: Conor Dooley Signed-off-by: Xu Yang --- Changes in v2: - no changes Changes in v3: - let imx95 compatilbe with imx93 Changes in v4: - add Acked-by tag Changes in v5: - no changes Changes in v6: - no changes --- Documentation/devicetree/bindings/perf/fsl-imx-ddr.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Documentation/devicetree/bindings/perf/fsl-imx-ddr.yaml b/Documentation/devicetree/bindings/perf/fsl-imx-ddr.yaml index 6c96a4204e5d..37e8b98f2cdc 100644 --- a/Documentation/devicetree/bindings/perf/fsl-imx-ddr.yaml +++ b/Documentation/devicetree/bindings/perf/fsl-imx-ddr.yaml @@ -30,6 +30,9 @@ properties: - items: - const: fsl,imx8dxl-ddr-pmu - const: fsl,imx8-ddr-pmu + - items: + - const: fsl,imx95-ddr-pmu + - const: fsl,imx93-ddr-pmu reg: maxItems: 1 From patchwork Thu Mar 7 09:57:25 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Xu Yang X-Patchwork-Id: 13585318 Received: from EUR03-DBA-obe.outbound.protection.outlook.com (mail-dbaeur03on2080.outbound.protection.outlook.com [40.107.104.80]) (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 1A2861292E5 for ; Thu, 7 Mar 2024 09:57:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.104.80 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709805455; cv=fail; b=u8yY87dJ+fI6W9/fkcyCnmDkn+OhoOs54rrpm/E+GOhq2XxMQC/ybNXUyrNZcphwwep6Fg5D3OK5TeJ7T/AE4ycTG2qT/J3D9PYF84hJvIQMNQK1aly3yAqhNWA2lFL7bAx30tQ3vNbPbilMFSEifHXmB8q5iSYKFu24Ny0fl7I= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709805455; c=relaxed/simple; bh=kyTWMp6dEGTdTVopemiSiazWFrZMpxaNHgMYhapHgBE=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: Content-Type:MIME-Version; b=qDp98K4KK4Ny2zmwuqMkvmWF+wOWjn8uF7zEJqRnmHWV5b40BZW7y+FWRHuVA3Oh9WwGx/OLxMjqWV8E0Gov0XZUKDqviGLGqYptMaliiyxaDiozpx5KuVolUEYEfslVmUxlnw2fBqFDDewIiD881b6v6txIYuY0xPPkRcVOCZU= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com; spf=pass smtp.mailfrom=nxp.com; dkim=pass (1024-bit key) header.d=nxp.com header.i=@nxp.com header.b=o2/yHDAm; arc=fail smtp.client-ip=40.107.104.80 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=nxp.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=nxp.com header.i=@nxp.com header.b="o2/yHDAm" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=W8A0xqB/NwltRF5Pf23m8N5ODCkuwkwC1r88psefWkGZgWxqmA4Tt8cGeoiNLrP5cT3vAreKDYjTel2IdacWAhOpePbjVNIsYArSBf7h344EyzyUD+gJBEAa5up2Nq1Shq4w8FI5dQd0nlK+b2CAEEVNtKGv+kThgSpDv1dyc+OqHLALead+xnKX7YZV4DRTzrGp7WQD5OCUApkJ9i/7wHaxNWiLVJ4d8gA7px3tcBqgcjT2nOq23eYlTcQJJOrJ4V3CW8OCv3WPtefI57Vc65IR4obRFQzrqXerqYn9ZANso+mwxPkBv3++WclaKyMPwC6hi13Y7Vr3swshfokmAQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=wSeSPkwtLOTMXf4NxSxuTegX/doYDSiFgycD/Td0+bA=; b=WSaLQK9tGLyj/b7p/NDeQnmGFUzpOuvfN0MibV1X6IzB9mV3yeeaF4VL8E1xKrZ4gabW7tv0SLTOEeMvzzCmxa3sdJPtxeKdXf+VM8kQR9DnW9Ux/b9OmipdAsCMDa8Q5ce+XacPB41gbT6HjXho2+nXzS8k5HPLSsCChmDOcuJkztlN+KwxprX2DGJUYECbnYPK4qkUSbI6XWc2/+wdMc2w7V/QBECyilh07RQbYeHVR1lriyXNX/Reho7QoBQfIK2+1cgm2B/hnYOXHfiyS63HPB9EoUIsS1OyJzJ2lMxxp7eUjT1oL3JyZ3UlE9iBlyROjPXrxCliCpf3k2FO0g== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=wSeSPkwtLOTMXf4NxSxuTegX/doYDSiFgycD/Td0+bA=; b=o2/yHDAm/MtyHA21Bw1aH1jQ82hpFJ9cIq7T/fOFmBFgaFUrSkGDwRqk96R1DmGCjRSWcmbNrQvzPv4KDPBOim0USn5AQ1pkfO3NWX3QPf/xNft5AxPNBSIF2YKdAhjmnlmbtJsK5SrU8tLgHC+PTt7PBhevwnOR4og9nHNtPOs= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from DU2PR04MB8822.eurprd04.prod.outlook.com (2603:10a6:10:2e1::11) by DU2PR04MB8504.eurprd04.prod.outlook.com (2603:10a6:10:2d3::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7339.38; Thu, 7 Mar 2024 09:57:31 +0000 Received: from DU2PR04MB8822.eurprd04.prod.outlook.com ([fe80::d45f:4483:c11:68b0]) by DU2PR04MB8822.eurprd04.prod.outlook.com ([fe80::d45f:4483:c11:68b0%7]) with mapi id 15.20.7339.035; Thu, 7 Mar 2024 09:57:31 +0000 From: Xu Yang To: Frank.li@nxp.com, will@kernel.org, mark.rutland@arm.com, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org, shawnguo@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com, john.g.garry@oracle.com, jolsa@kernel.org, namhyung@kernel.org, irogers@google.com Cc: mike.leach@linaro.org, peterz@infradead.org, mingo@redhat.com, acme@kernel.org, alexander.shishkin@linux.intel.com, adrian.hunter@intel.com, linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org, imx@lists.linux.dev Subject: [PATCH v6 2/7] perf: imx_perf: add macro definitions for parsing config attr Date: Thu, 7 Mar 2024 17:57:25 +0800 Message-Id: <20240307095730.3792680-2-xu.yang_2@nxp.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240307095730.3792680-1-xu.yang_2@nxp.com> References: <20240307095730.3792680-1-xu.yang_2@nxp.com> X-ClientProxiedBy: SG2PR06CA0212.apcprd06.prod.outlook.com (2603:1096:4:68::20) To DU2PR04MB8822.eurprd04.prod.outlook.com (2603:10a6:10:2e1::11) Precedence: bulk X-Mailing-List: imx@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DU2PR04MB8822:EE_|DU2PR04MB8504:EE_ X-MS-Office365-Filtering-Correlation-Id: 03721603-7b99-478e-3841-08dc3e8d0148 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Fo8KOgwgYLUaHFHb/NHzaQ2oygjDsobtP90KOJ6UzWVonRuQWtyzTreYDfQvpOotWWboeWBSfyUNszRvAwJdVX9R0gKrTzt5xT8wxuEJc+4LAdJLNQZ2d4B5F2wzA+Ka3Jf8pwSY+3xaZ0LASMmtwnZGJbcFKyhwfuDVU+O0udLhPttkapkm7m1/9etKy2dUdcDzQRgWRjJc3QSkNPYCYSy7FxqC7M7LKS/v08fWDOGjkjEsW2IBtTsyLjuT9XAh3oS8e2AhCH0Ph4RVSVTbYbcQoimYb/z3B+Lm1IxmB1P9RNBqxYBJUbTaXXmos/dJKw0zWwnsP8ZJbHq/dTyNKZg6R5++lcPmyxxWBFC/AOSC6wROYJ2zkjWlK+cYIP7KOzjIiDfq+do6pHRFwHf1zVGQGhzgalYIKftMP9WvUmlYWCmsQ35aa31ODJuVGdFmoVDkaS3tstGHZo7RFxZ29H2IWVdIlPKooX1SIVWX5A6tzQkH07J+P0d48teFOmA+qsDXz8a8mqEHeAT58GANeOUXu40snAefZUM9MbpYebXdP7rsqW+ZXI7qa5mZWlWZFEHQRnds+9aJMT0f4KEdxdxUJIxj6ZBA1iC/1ihY/41SUlYg5gB5lQVlErtIZmzFU+6Fz6MYgY+cXphJzSH9WaPs/Edxk3ExfeVMTJLG9RcnmhhszpM+SgOscupK9lfGpiti2mek6zG/JPYp90bU62eX38W7OobOV6EgYA80bGE= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DU2PR04MB8822.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(376005)(38350700005)(921011);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 5C4h0fMRt8wX5B7N3CiKO1WbnL0AL9podf8paUWZzqwW+weU2p0e7djSpJ6DnkM5Ux21rGeQCwVAdqEkZ1GPKibVINNZAAHbTjVEU8SaY1mQdWL6CptkvPhmgEoZurGeajN/AiFnWS1AovSBZSt+ARB/vyWlghlyQFc90/OCIll8TxDz8GMjTdTfpksFx5IfPXT4N++1+/F9sG0R0MJqvtGauOIaOKFNAvdKcPbkg7RsVcKU171l9Jr1M3RkT8/tfZuJINzYeFPm4KCsSJ4ok9x6QCysL8WjHyQkVUX2ppEhoMHZUxSgHkzNpMTAhu7Cbg597bQyGRYG42iQ9EPE6SJgVsSw4Nzd61XpA1JUGXUKW5rN96BauI4mmxqBu/uQZXSRul9HdJN+WncB23235DwTCvk5mo2fV8nWvAhUzBU1fB5/wWx1hYnpINNJRgA2NTuo5tFrT6YA+N05wp3tpxwSIsZWSysu3xvyMkzo6LEaxLAGppABrXYfS1Y/lVuU6uj93HTQayN7/f374LeZ7NYpHSszCyiM1JMHCwtUvABizcelwjiJjt/rX5zRl2/W0Z9bWrwUdfRFcEbaArslEDDTWkfBPtfM3bLtXegNmB65tpE7J8gktkqQ3d2JwSU7ARQo8eNiv/avaTELUhylfrUlme3Fx6gJGSIbWPZ44552AjniR23/lkCnQrFb9CXLEp8C/mfapt1OhOIgjgT/Tqwui9V+e5ijbSrNHqxiS5JASbwAMZAYdPQpQviENH1uwsyF2p3KeQwsejAr2Ta35unEKiOqpCr+3kTbYJ3GaLguv4RKyp+ZaP9JQLpwlZcgGUyc46KD4PNDqevEBCpnesC7THcpeEgDMeKbalynjyly/zvaI1f3jFaMLarddHTGJSZezk2uWysAN04IXJkloR6ZFLvJ65uNofw93GxZ5RRoEmNOhNAydxg6b3SDbUCoAdW12M2xoKZy/FrM3WdZh49rMdPn2GriiKSORqpyBdBQECg4/fsIPvxozK7HiATuoT5xGnKDiSJyZiGcBO8N+jjcdpgGxy39sCihh+VeWAfrdEjFmQBpHS728etcVV+yGLlIla8WCcn3S6j8mSMS3CKfSUej0OZ1gdmjuf0NO5WD6qYlVEGi/gmtFIyDf3++0olUAP9x4ENz4n13Pb1vPcMvPa+inDy9uVEe8+0Ap9WS8evIxv+EIg1ohWGxNWZfl7lzGbmXjEqhu8SsZ2Srz5cIk0mCWVBCWdhFIoP92FQnv/AE6pJaxKTexTdwZb//3L3lZynjVlvN42P5kHzdq2QsAIDigYivKL62aYkrf3wx3pNFf/KmAndmnR3PELFjvpi/+ObtOCYIytGWBYBaUdql4rFfdSqmAWNHR+b37AN+5OEqoJbpWd1vQb6zojJIibB/9Se4IVV2xYjFoZmLGjjLNkUq335OQXkcO8fnNbdnsbV6kgpVsdUaOjpdWhSRJUUA3iW+LdRwKYH49orIEqFWecp0xzpiJ14cw2XjrwUletFNrrfYa5PeqI61tk+cyv23K5aiIy+5/L2EFPLuNQXhymXs/+Ncx7aNOykDdzkap8/F1lOalC1UGhmxBF4A X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 03721603-7b99-478e-3841-08dc3e8d0148 X-MS-Exchange-CrossTenant-AuthSource: DU2PR04MB8822.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Mar 2024 09:57:31.4290 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: Y+/qBuHQI27LyPvFmE0KBe/hVdjjEm2V2VN1Gk7DZLa6uiLWjHWVJs01C0xMqTe5rlYgC5d+xn4nAhA5TTL7+g== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DU2PR04MB8504 The user can set event and counter in cmdline and the driver need to parse it using 'config' attr value. This will add macro definitions to avoid hard-code in driver. Signed-off-by: Xu Yang --- Changes in v4: - new patch Changes in v5: - move this patch earlier Changes in v6: - no changes --- drivers/perf/fsl_imx9_ddr_perf.c | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/drivers/perf/fsl_imx9_ddr_perf.c b/drivers/perf/fsl_imx9_ddr_perf.c index 9685645bfe04..d1c566e661d8 100644 --- a/drivers/perf/fsl_imx9_ddr_perf.c +++ b/drivers/perf/fsl_imx9_ddr_perf.c @@ -42,6 +42,11 @@ #define NUM_COUNTERS 11 #define CYCLES_COUNTER 0 +#define CONFIG_EVENT_MASK 0x00FF +#define CONFIG_EVENT_OFFSET 0 +#define CONFIG_COUNTER_MASK 0xFF00 +#define CONFIG_COUNTER_OFFSET 8 + #define to_ddr_pmu(p) container_of(p, struct ddr_pmu, pmu) #define DDR_PERF_DEV_NAME "imx9_ddr" @@ -339,8 +344,10 @@ static void ddr_perf_counter_local_config(struct ddr_pmu *pmu, int config, int counter, bool enable) { u32 ctrl_a; + int event; ctrl_a = readl_relaxed(pmu->base + PMLCA(counter)); + event = (config & CONFIG_EVENT_MASK) >> CONFIG_EVENT_OFFSET; if (enable) { ctrl_a |= PMLCA_FC; @@ -352,7 +359,7 @@ static void ddr_perf_counter_local_config(struct ddr_pmu *pmu, int config, ctrl_a &= ~PMLCA_FC; ctrl_a |= PMLCA_CE; ctrl_a &= ~FIELD_PREP(PMLCA_EVENT, 0x7F); - ctrl_a |= FIELD_PREP(PMLCA_EVENT, (config & 0x000000FF)); + ctrl_a |= FIELD_PREP(PMLCA_EVENT, event); writel(ctrl_a, pmu->base + PMLCA(counter)); } else { /* Freeze counter. */ @@ -366,8 +373,8 @@ static void ddr_perf_monitor_config(struct ddr_pmu *pmu, int cfg, int cfg1, int u32 pmcfg1, pmcfg2; int event, counter; - event = cfg & 0x000000FF; - counter = (cfg & 0x0000FF00) >> 8; + event = (cfg & CONFIG_EVENT_MASK) >> CONFIG_EVENT_OFFSET; + counter = (cfg & CONFIG_COUNTER_MASK) >> CONFIG_COUNTER_OFFSET; pmcfg1 = readl_relaxed(pmu->base + PMCFG1); @@ -469,7 +476,7 @@ static int ddr_perf_event_add(struct perf_event *event, int flags) int cfg2 = event->attr.config2; int counter; - counter = (cfg & 0x0000FF00) >> 8; + counter = (cfg & CONFIG_COUNTER_MASK) >> CONFIG_COUNTER_OFFSET; pmu->events[counter] = event; pmu->active_events++; From patchwork Thu Mar 7 09:57:26 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Xu Yang X-Patchwork-Id: 13585319 Received: from EUR03-DBA-obe.outbound.protection.outlook.com (mail-dbaeur03on2083.outbound.protection.outlook.com [40.107.104.83]) (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 2F9A6129A85 for ; Thu, 7 Mar 2024 09:57:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.104.83 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709805463; cv=fail; b=J8UEAYSvFhj+N79W3DmhCcFFTLsic19BMCw/CwuI1AwQmsisjq/CXC1Nb4CFWqTx4X9Gbyr8YeX5YTqaXARePL4s2kwKYPC9QSplvfd4gC3Z3GIDnXV0qcb/fI8HmZrt3Bo8PUXU2hqSiJ/HNCNT0PFguyLkoE6JD1cWQ5LwfRU= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709805463; c=relaxed/simple; bh=jXkNpCZsLhSucEJLaqmERZGAUbJTj58O1VjlhwFPm/w=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: Content-Type:MIME-Version; b=cIYWxv0r2dcgAlYHhCWOTNW/uHIkMikxeSWVcXd5RgxyImC2ewqFOPUK/L2rDYRZlA52rTyBdi8EYwE/TEYOcYNFwyKpB7cuDHV0QxXDvqvEllhsKtHUFwb3gQEtvQbrja9BTOCRWPv0UmlahEj9PIj1gfM5Ic8ExpeLDa6/h14= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com; spf=pass smtp.mailfrom=nxp.com; dkim=pass (1024-bit key) header.d=nxp.com header.i=@nxp.com header.b=YbQLenlt; arc=fail smtp.client-ip=40.107.104.83 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=nxp.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=nxp.com header.i=@nxp.com header.b="YbQLenlt" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=kSnv362bhLoyS6bYJyJfL/xWjGSbL04hajrckBTXVNEa77BrvMuAwbJcDXg5/M3U47+9vGbqznmqZPo+Krd5eUPllZRXe1jaw+OTI4BlYxstzU7we9ftD11a1EajbxovJmMNZJMnLO2f4nx7RXa6EBOzogNkHJMqDre9O7ANlVEMjnKAl7eiSvkyaCquBcxLSD03HhT3JU4xUPFMsDxZFsKakwP9LCS+fgdPdRFcJNHIoSJdiA0Gm9UtT2v9LSDKJntuYfgp8oJZ63ecB1Aqg7XByLNtgcU63W/ZG40kUepA6BOhq8Yek/uQHv7yySTChLCKiQ7YXXEBn1EarBnz7w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=h0IF9chlpVscxM54pVRIff9nKJT+0ZOCxABfvJslcYs=; b=J6HgYkzRPVBHSjU/bd/VSjSoos2dgU034tqC7VWXFrpQBP5GwHVAErjvAJzoV13EBdvWP+AC+WAffXtrsanu0F+wXvpstb6EL/ATjjjZ6jzBT/FOvY1f/U4U0yHigc6Jgowo2PkB+Wh+x5buEHSw8AJBpcsyd1G44ZwvBguAxCP4szRco16MU3Saa6JgVNL1F9ZNRJ7PT/4/VGus3bSOHDjnNLixcJMWaQUpdzkyKKeF1kx7GuB/U31wA3vEPgE+ZyVxw/+tvdkGRcZ8vGoSAkfol5be2RRcpDkPELGeeiL/Z5GLMtvF0MrsB0CUDYhRdumg1x4q6dSVnz8oaJbyng== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=h0IF9chlpVscxM54pVRIff9nKJT+0ZOCxABfvJslcYs=; b=YbQLenlt+8E2D2D8tjSp3bqMZHxnCayUNK+XOIx0IshoJqeCvq00qbyZezDa3akPB32bRzJZgbZ/aLooj1IIlafVciH1jbAi5JZ/p0wOoKy+ufdZYYxrM2Csh8n5i17l/Se7e/+QLG+lAX96N4Ei3PhYdW85xwEqidbOy9YZNEk= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from DU2PR04MB8822.eurprd04.prod.outlook.com (2603:10a6:10:2e1::11) by DU2PR04MB8504.eurprd04.prod.outlook.com (2603:10a6:10:2d3::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7339.38; Thu, 7 Mar 2024 09:57:38 +0000 Received: from DU2PR04MB8822.eurprd04.prod.outlook.com ([fe80::d45f:4483:c11:68b0]) by DU2PR04MB8822.eurprd04.prod.outlook.com ([fe80::d45f:4483:c11:68b0%7]) with mapi id 15.20.7339.035; Thu, 7 Mar 2024 09:57:38 +0000 From: Xu Yang To: Frank.li@nxp.com, will@kernel.org, mark.rutland@arm.com, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org, shawnguo@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com, john.g.garry@oracle.com, jolsa@kernel.org, namhyung@kernel.org, irogers@google.com Cc: mike.leach@linaro.org, peterz@infradead.org, mingo@redhat.com, acme@kernel.org, alexander.shishkin@linux.intel.com, adrian.hunter@intel.com, linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org, imx@lists.linux.dev Subject: [PATCH v6 3/7] perf: imx_perf: let the driver manage the counter usage rather the user Date: Thu, 7 Mar 2024 17:57:26 +0800 Message-Id: <20240307095730.3792680-3-xu.yang_2@nxp.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240307095730.3792680-1-xu.yang_2@nxp.com> References: <20240307095730.3792680-1-xu.yang_2@nxp.com> X-ClientProxiedBy: SG2PR06CA0212.apcprd06.prod.outlook.com (2603:1096:4:68::20) To DU2PR04MB8822.eurprd04.prod.outlook.com (2603:10a6:10:2e1::11) Precedence: bulk X-Mailing-List: imx@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DU2PR04MB8822:EE_|DU2PR04MB8504:EE_ X-MS-Office365-Filtering-Correlation-Id: 23a29084-cfb6-4cc3-3627-08dc3e8d056d X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: o6FFN49jho8YzuixVEstENmXTo//LvoBaohNurkohnpXAK2tWVmB0nJ/iZ0ZDA5ofhZQldGy3N/QSBz9TlbmgezinPmxpK50IYtkRkSDynEMg+yoy04pT0n9K1tDs303PZuozfRZU3Pxsm8ejdG2lFs6qXbNyh4oGue5PQ9XzBkGCTs9oPynPxwR1V0ElTxitBOyhnyaqW67WHbB7eXioOYUZ49PafkI3BN69TC4S3HES9Euizp0UkN2CWHSJAHHRH60y96h9z0vDF/L9mj3MfwpXUBkjPcQzISQZrSRWodmD7T358pXDAeFmzA8xkHbrvSQa6v0AVOlDejW5wBDyz4GxLuW7ZkcdraiGfkIadmHybEaqe372hpzF8NpZrRGrcyIlWIvnjUOaW5UyQOIHaTIRKhRN2vTk2Jf4sKjSbAijoLdoZEZ0rGuvrKCNiaNbIJdxmRI357iT8aoltf6aG5URpaJf/j9tZZKlmJtYaFt265ui4i91/a6JapSeiDhIupQ0AAbb16HPSGf7gYWpnz9IB9ny3vVigFYOlqiTm5SRPjkbV/wXtg4XdWCn/MguJOX+zWhpOR3aGIhXjTSUiKl4HNm4fMD81pdGm6eLZ0CpY2prQasLhnJoSV0RedL1/VyoxHk11Xu0+WhPahqqsg0Y5nfssG64IVQJOR2S8JyVcFvupKEOwse8RQDWhQaeVJ1kav2XVbCWul/fjc9Nu7TdwQdlM4GYgyMVL27Ba4= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DU2PR04MB8822.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(376005)(38350700005)(921011);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 9Oo5K+speK/Cy6s5ejWky6/RfNzWWwFolc8KyBVI1sn4xcXtii9+5LGKPlZ0dRHsa7GGVgCK3UlHGPvKtwRWSfZFp+xKUysaYOnELzAjdNCqzLZmmEE/1U47WnesnzcEEBCaCL4HYFll6IcfwZRgQnD5M8P+9E0HyiWPg4BVIdZ4rPfNsIG0Ooyh5uZPKpKiekIZ/iJLLX8U/xjPHIV0tI7vxnsUZUMAuXyDOHY0GzxRPTSnoktOWz7lP9b4MUN/UB4c7CxagHIFO+WSm7rXab6+XWVKV87hHy8R/UQVbgLvtXHGk6DzrQGbKvaWgd/Oi8nTEK3deVeRj3RdJ0V74mf1e8sfTmZj9qqbjveGWtkG2nTFPxAfc/xN6egJ5BE8zVFH+fc6wWz4APFrrz9nmMHlisd9QygfRN/295Qtmzbb2nvDePfo6IIR+/8je0KQwCqextsCb+Lpntp7DHYRlHoF6KALdzNpbIUTG1asIkg+gvy21LtOJ18il4ZGUpjZox+hH8A6MgPJJNxSWAIjSY9uj7J79NH6ppo8slyEzWzWmvE13/XB87CswL8ZPOEnX77/IbZ0cOVOfcbJdUzVhj7o9lvWr9PTs8YHuYaCLV0FdSjD9iqoLVAoUgGVlBrsN2cJOT0nt1orDEeVViczQcN5KOVeBL3eXyk8lc70GP7PGBlufayoq1tGnXI9e+sv3cE9QUS/u0VIBjncP7hiyrfBzER94ZCeqElbea1W/FHxJ00/BHuJbDF6cSBkzuYwVxpVVCHXPtDRAZNUDgTOKjt7u2jnBS1Hr72k0oI4QO86a+wcN6KbUwRF5G+04FVgtE/x8M9B7OZ3zq8wQjWrCVs4zSn0MILgS43ciWQriL5h7H9bjp21Si4S4k4eOEPrjJ9NLIMqFJbGP1W9RP//7CWxe+iMEjiK77GkQf/Yp4DI61eqEIHxdMsaRKKkz5/ogUABDt/QdA09aTuLRVjOks1S8ADjTbWOiIMZo8ZqVJw49r2qkawZ/wY445grfBY+MZ5ZV9c9P81TlgSv416Rd0y1zjs4mvy1459QA9FOpxVyVOg9yOQaQAStmuwvKHPjK0lwwl+kQWBXV7UNY0rd/6ZTskDX0jzzcYhzZ+Oazu+DKLwf9ffUBhxhK9R2UcCAiuaMXNPCi4JG+mKoPW0DT1kn8Pq0rr4hSWHG0JLA+7RiFdyi+Y33ZeEukwQpLnXO2VvS7xCLXJOf4JnuGWsp+eclv487g2VQv6eq3ZZ/42fWYtsGfjUqVeXE9fksZlBhZgSRkPNRqC2p7BUTSgbn+66WQ7HgplNZsA290FQw0nDGHLTBNYxTq9cd6CfjcyEyj0VSq8TGb4Ie4tzGwZNok+zBTgeb7g1y59IKZgWYOYK8CQ0wnjrHMk2bhUZbFxzSXEaZRq1+39AdXAZDcws4Uh5K46QX/fE3LQK7FOm1yrkM7K4+OUXeAeFZ6j/h0QdQIuRGA2g07ZtMcKmJ0I17mYQsOntFh/eJRWJu6QPTV52vkcA5yPQxPfx0PCdXTjyxtWXERKtYq5skrrBGQ1H0uYHwAAq0/+QseMjPphIjGRID/bTmKAOgALz5b6KfiXoW X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 23a29084-cfb6-4cc3-3627-08dc3e8d056d X-MS-Exchange-CrossTenant-AuthSource: DU2PR04MB8822.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Mar 2024 09:57:38.3942 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: aXkVbUtk6WZgdT6iW1aAwEKBeRkjbSjUlrBMyXBRvkH5qF8458HF2TGNTi0JBAK5KokeiVipdFDgZp/DIgrnQQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DU2PR04MB8504 In current design, the user of perf app needs to input counter ID to count events. However, this is not user-friendly since the user needs to lookup the map table to find the counter. Instead of letting the user to input the counter, let this driver to manage the counters in this patch. This will be implemented by: 1. allocate counter 0 for cycle event. 2. find unused counter from 1-10 for reference events. 3. allocate specific counter for counter-specific events. In this patch, counter attribute is removed too. To mark counter-specific events, counter ID will be encoded into perf_pmu_events_attr.id. Signed-off-by: Xu Yang --- Changes in v6: - new patch --- drivers/perf/fsl_imx9_ddr_perf.c | 167 ++++++++++++++++++------------- 1 file changed, 98 insertions(+), 69 deletions(-) diff --git a/drivers/perf/fsl_imx9_ddr_perf.c b/drivers/perf/fsl_imx9_ddr_perf.c index d1c566e661d8..8d85b4d98544 100644 --- a/drivers/perf/fsl_imx9_ddr_perf.c +++ b/drivers/perf/fsl_imx9_ddr_perf.c @@ -41,6 +41,7 @@ #define NUM_COUNTERS 11 #define CYCLES_COUNTER 0 +#define CYCLES_EVENT_ID 0 #define CONFIG_EVENT_MASK 0x00FF #define CONFIG_EVENT_OFFSET 0 @@ -132,6 +133,8 @@ static ssize_t ddr_pmu_event_show(struct device *dev, return sysfs_emit(page, "event=0x%02llx\n", pmu_attr->id); } +#define ID(counter, id) ((counter << CONFIG_COUNTER_OFFSET) | id) + #define IMX9_DDR_PMU_EVENT_ATTR(_name, _id) \ (&((struct perf_pmu_events_attr[]) { \ { .attr = __ATTR(_name, 0444, ddr_pmu_event_show, NULL),\ @@ -164,81 +167,81 @@ static struct attribute *ddr_perf_events_attrs[] = { IMX9_DDR_PMU_EVENT_ATTR(ddrc_pm_29, 63), /* counter1 specific events */ - IMX9_DDR_PMU_EVENT_ATTR(ddrc_ld_riq_0, 64), - IMX9_DDR_PMU_EVENT_ATTR(ddrc_ld_riq_1, 65), - IMX9_DDR_PMU_EVENT_ATTR(ddrc_ld_riq_2, 66), - IMX9_DDR_PMU_EVENT_ATTR(ddrc_ld_riq_3, 67), - IMX9_DDR_PMU_EVENT_ATTR(ddrc_ld_riq_4, 68), - IMX9_DDR_PMU_EVENT_ATTR(ddrc_ld_riq_5, 69), - IMX9_DDR_PMU_EVENT_ATTR(ddrc_ld_riq_6, 70), - IMX9_DDR_PMU_EVENT_ATTR(ddrc_ld_riq_7, 71), + IMX9_DDR_PMU_EVENT_ATTR(ddrc_ld_riq_0, ID(1, 64)), + IMX9_DDR_PMU_EVENT_ATTR(ddrc_ld_riq_1, ID(1, 65)), + IMX9_DDR_PMU_EVENT_ATTR(ddrc_ld_riq_2, ID(1, 66)), + IMX9_DDR_PMU_EVENT_ATTR(ddrc_ld_riq_3, ID(1, 67)), + IMX9_DDR_PMU_EVENT_ATTR(ddrc_ld_riq_4, ID(1, 68)), + IMX9_DDR_PMU_EVENT_ATTR(ddrc_ld_riq_5, ID(1, 69)), + IMX9_DDR_PMU_EVENT_ATTR(ddrc_ld_riq_6, ID(1, 70)), + IMX9_DDR_PMU_EVENT_ATTR(ddrc_ld_riq_7, ID(1, 71)), /* counter2 specific events */ - IMX9_DDR_PMU_EVENT_ATTR(ddrc_ld_wiq_0, 64), - IMX9_DDR_PMU_EVENT_ATTR(ddrc_ld_wiq_1, 65), - IMX9_DDR_PMU_EVENT_ATTR(ddrc_ld_wiq_2, 66), - IMX9_DDR_PMU_EVENT_ATTR(ddrc_ld_wiq_3, 67), - IMX9_DDR_PMU_EVENT_ATTR(ddrc_ld_wiq_4, 68), - IMX9_DDR_PMU_EVENT_ATTR(ddrc_ld_wiq_5, 69), - IMX9_DDR_PMU_EVENT_ATTR(ddrc_ld_wiq_6, 70), - IMX9_DDR_PMU_EVENT_ATTR(ddrc_ld_wiq_7, 71), - IMX9_DDR_PMU_EVENT_ATTR(eddrtq_pmon_empty, 72), - IMX9_DDR_PMU_EVENT_ATTR(eddrtq_pm_rd_trans_filt, 73), + IMX9_DDR_PMU_EVENT_ATTR(ddrc_ld_wiq_0, ID(2, 64)), + IMX9_DDR_PMU_EVENT_ATTR(ddrc_ld_wiq_1, ID(2, 65)), + IMX9_DDR_PMU_EVENT_ATTR(ddrc_ld_wiq_2, ID(2, 66)), + IMX9_DDR_PMU_EVENT_ATTR(ddrc_ld_wiq_3, ID(2, 67)), + IMX9_DDR_PMU_EVENT_ATTR(ddrc_ld_wiq_4, ID(2, 68)), + IMX9_DDR_PMU_EVENT_ATTR(ddrc_ld_wiq_5, ID(2, 69)), + IMX9_DDR_PMU_EVENT_ATTR(ddrc_ld_wiq_6, ID(2, 70)), + IMX9_DDR_PMU_EVENT_ATTR(ddrc_ld_wiq_7, ID(2, 71)), + IMX9_DDR_PMU_EVENT_ATTR(eddrtq_pmon_empty, ID(2, 72)), + IMX9_DDR_PMU_EVENT_ATTR(eddrtq_pm_rd_trans_filt, ID(2, 73)), /* counter3 specific events */ - IMX9_DDR_PMU_EVENT_ATTR(ddrc_qx_row_collision_0, 64), - IMX9_DDR_PMU_EVENT_ATTR(ddrc_qx_row_collision_1, 65), - IMX9_DDR_PMU_EVENT_ATTR(ddrc_qx_row_collision_2, 66), - IMX9_DDR_PMU_EVENT_ATTR(ddrc_qx_row_collision_3, 67), - IMX9_DDR_PMU_EVENT_ATTR(ddrc_qx_row_collision_4, 68), - IMX9_DDR_PMU_EVENT_ATTR(ddrc_qx_row_collision_5, 69), - IMX9_DDR_PMU_EVENT_ATTR(ddrc_qx_row_collision_6, 70), - IMX9_DDR_PMU_EVENT_ATTR(ddrc_qx_row_collision_7, 71), - IMX9_DDR_PMU_EVENT_ATTR(eddrtq_pmon_full, 72), - IMX9_DDR_PMU_EVENT_ATTR(eddrtq_pm_wr_trans_filt, 73), + IMX9_DDR_PMU_EVENT_ATTR(ddrc_qx_row_collision_0, ID(3, 64)), + IMX9_DDR_PMU_EVENT_ATTR(ddrc_qx_row_collision_1, ID(3, 65)), + IMX9_DDR_PMU_EVENT_ATTR(ddrc_qx_row_collision_2, ID(3, 66)), + IMX9_DDR_PMU_EVENT_ATTR(ddrc_qx_row_collision_3, ID(3, 67)), + IMX9_DDR_PMU_EVENT_ATTR(ddrc_qx_row_collision_4, ID(3, 68)), + IMX9_DDR_PMU_EVENT_ATTR(ddrc_qx_row_collision_5, ID(3, 69)), + IMX9_DDR_PMU_EVENT_ATTR(ddrc_qx_row_collision_6, ID(3, 70)), + IMX9_DDR_PMU_EVENT_ATTR(ddrc_qx_row_collision_7, ID(3, 71)), + IMX9_DDR_PMU_EVENT_ATTR(eddrtq_pmon_full, ID(3, 72)), + IMX9_DDR_PMU_EVENT_ATTR(eddrtq_pm_wr_trans_filt, ID(3, 73)), /* counter4 specific events */ - IMX9_DDR_PMU_EVENT_ATTR(ddrc_qx_row_open_0, 64), - IMX9_DDR_PMU_EVENT_ATTR(ddrc_qx_row_open_1, 65), - IMX9_DDR_PMU_EVENT_ATTR(ddrc_qx_row_open_2, 66), - IMX9_DDR_PMU_EVENT_ATTR(ddrc_qx_row_open_3, 67), - IMX9_DDR_PMU_EVENT_ATTR(ddrc_qx_row_open_4, 68), - IMX9_DDR_PMU_EVENT_ATTR(ddrc_qx_row_open_5, 69), - IMX9_DDR_PMU_EVENT_ATTR(ddrc_qx_row_open_6, 70), - IMX9_DDR_PMU_EVENT_ATTR(ddrc_qx_row_open_7, 71), - IMX9_DDR_PMU_EVENT_ATTR(eddrtq_pmon_ld_rdq2_rmw, 72), - IMX9_DDR_PMU_EVENT_ATTR(eddrtq_pm_rd_beat_filt, 73), + IMX9_DDR_PMU_EVENT_ATTR(ddrc_qx_row_open_0, ID(4, 64)), + IMX9_DDR_PMU_EVENT_ATTR(ddrc_qx_row_open_1, ID(4, 65)), + IMX9_DDR_PMU_EVENT_ATTR(ddrc_qx_row_open_2, ID(4, 66)), + IMX9_DDR_PMU_EVENT_ATTR(ddrc_qx_row_open_3, ID(4, 67)), + IMX9_DDR_PMU_EVENT_ATTR(ddrc_qx_row_open_4, ID(4, 68)), + IMX9_DDR_PMU_EVENT_ATTR(ddrc_qx_row_open_5, ID(4, 69)), + IMX9_DDR_PMU_EVENT_ATTR(ddrc_qx_row_open_6, ID(4, 70)), + IMX9_DDR_PMU_EVENT_ATTR(ddrc_qx_row_open_7, ID(4, 71)), + IMX9_DDR_PMU_EVENT_ATTR(eddrtq_pmon_ld_rdq2_rmw, ID(4, 72)), + IMX9_DDR_PMU_EVENT_ATTR(eddrtq_pm_rd_beat_filt, ID(4, 73)), /* counter5 specific events */ - IMX9_DDR_PMU_EVENT_ATTR(ddrc_qx_valid_start_0, 64), - IMX9_DDR_PMU_EVENT_ATTR(ddrc_qx_valid_start_1, 65), - IMX9_DDR_PMU_EVENT_ATTR(ddrc_qx_valid_start_2, 66), - IMX9_DDR_PMU_EVENT_ATTR(ddrc_qx_valid_start_3, 67), - IMX9_DDR_PMU_EVENT_ATTR(ddrc_qx_valid_start_4, 68), - IMX9_DDR_PMU_EVENT_ATTR(ddrc_qx_valid_start_5, 69), - IMX9_DDR_PMU_EVENT_ATTR(ddrc_qx_valid_start_6, 70), - IMX9_DDR_PMU_EVENT_ATTR(ddrc_qx_valid_start_7, 71), - IMX9_DDR_PMU_EVENT_ATTR(eddrtq_pmon_ld_rdq1, 72), + IMX9_DDR_PMU_EVENT_ATTR(ddrc_qx_valid_start_0, ID(5, 64)), + IMX9_DDR_PMU_EVENT_ATTR(ddrc_qx_valid_start_1, ID(5, 65)), + IMX9_DDR_PMU_EVENT_ATTR(ddrc_qx_valid_start_2, ID(5, 66)), + IMX9_DDR_PMU_EVENT_ATTR(ddrc_qx_valid_start_3, ID(5, 67)), + IMX9_DDR_PMU_EVENT_ATTR(ddrc_qx_valid_start_4, ID(5, 68)), + IMX9_DDR_PMU_EVENT_ATTR(ddrc_qx_valid_start_5, ID(5, 69)), + IMX9_DDR_PMU_EVENT_ATTR(ddrc_qx_valid_start_6, ID(5, 70)), + IMX9_DDR_PMU_EVENT_ATTR(ddrc_qx_valid_start_7, ID(5, 71)), + IMX9_DDR_PMU_EVENT_ATTR(eddrtq_pmon_ld_rdq1, ID(5, 72)), /* counter6 specific events */ - IMX9_DDR_PMU_EVENT_ATTR(ddrc_qx_valid_end_0, 64), - IMX9_DDR_PMU_EVENT_ATTR(eddrtq_pmon_ld_rdq2, 72), + IMX9_DDR_PMU_EVENT_ATTR(ddrc_qx_valid_end_0, ID(6, 64)), + IMX9_DDR_PMU_EVENT_ATTR(eddrtq_pmon_ld_rdq2, ID(6, 72)), /* counter7 specific events */ - IMX9_DDR_PMU_EVENT_ATTR(eddrtq_pmon_1_2_full, 64), - IMX9_DDR_PMU_EVENT_ATTR(eddrtq_pmon_ld_wrq0, 65), + IMX9_DDR_PMU_EVENT_ATTR(eddrtq_pmon_1_2_full, ID(7, 64)), + IMX9_DDR_PMU_EVENT_ATTR(eddrtq_pmon_ld_wrq0, ID(7, 65)), /* counter8 specific events */ - IMX9_DDR_PMU_EVENT_ATTR(eddrtq_pmon_bias_switched, 64), - IMX9_DDR_PMU_EVENT_ATTR(eddrtq_pmon_1_4_full, 65), + IMX9_DDR_PMU_EVENT_ATTR(eddrtq_pmon_bias_switched, ID(8, 64)), + IMX9_DDR_PMU_EVENT_ATTR(eddrtq_pmon_1_4_full, ID(8, 65)), /* counter9 specific events */ - IMX9_DDR_PMU_EVENT_ATTR(eddrtq_pmon_ld_wrq1, 65), - IMX9_DDR_PMU_EVENT_ATTR(eddrtq_pmon_3_4_full, 66), + IMX9_DDR_PMU_EVENT_ATTR(eddrtq_pmon_ld_wrq1, ID(9, 65)), + IMX9_DDR_PMU_EVENT_ATTR(eddrtq_pmon_3_4_full, ID(9, 66)), /* counter10 specific events */ - IMX9_DDR_PMU_EVENT_ATTR(eddrtq_pmon_misc_mrk, 65), - IMX9_DDR_PMU_EVENT_ATTR(eddrtq_pmon_ld_rdq0, 66), + IMX9_DDR_PMU_EVENT_ATTR(eddrtq_pmon_misc_mrk, ID(10, 65)), + IMX9_DDR_PMU_EVENT_ATTR(eddrtq_pmon_ld_rdq0, ID(10, 66)), NULL, }; @@ -247,14 +250,12 @@ static const struct attribute_group ddr_perf_events_attr_group = { .attrs = ddr_perf_events_attrs, }; -PMU_FORMAT_ATTR(event, "config:0-7"); -PMU_FORMAT_ATTR(counter, "config:8-15"); +PMU_FORMAT_ATTR(event, "config:0-15"); PMU_FORMAT_ATTR(axi_id, "config1:0-17"); PMU_FORMAT_ATTR(axi_mask, "config2:0-17"); static struct attribute *ddr_perf_format_attrs[] = { &format_attr_event.attr, - &format_attr_counter.attr, &format_attr_axi_id.attr, &format_attr_axi_mask.attr, NULL, @@ -368,13 +369,10 @@ static void ddr_perf_counter_local_config(struct ddr_pmu *pmu, int config, } } -static void ddr_perf_monitor_config(struct ddr_pmu *pmu, int cfg, int cfg1, int cfg2) +static void ddr_perf_monitor_config(struct ddr_pmu *pmu, int event, + int counter, int axi_id, int axi_mask) { u32 pmcfg1, pmcfg2; - int event, counter; - - event = (cfg & CONFIG_EVENT_MASK) >> CONFIG_EVENT_OFFSET; - counter = (cfg & CONFIG_COUNTER_MASK) >> CONFIG_COUNTER_OFFSET; pmcfg1 = readl_relaxed(pmu->base + PMCFG1); @@ -394,12 +392,12 @@ static void ddr_perf_monitor_config(struct ddr_pmu *pmu, int cfg, int cfg1, int pmcfg1 &= ~PMCFG1_RD_BT_FILT_EN; pmcfg1 &= ~FIELD_PREP(PMCFG1_ID_MASK, 0x3FFFF); - pmcfg1 |= FIELD_PREP(PMCFG1_ID_MASK, cfg2); + pmcfg1 |= FIELD_PREP(PMCFG1_ID_MASK, axi_mask); writel(pmcfg1, pmu->base + PMCFG1); pmcfg2 = readl_relaxed(pmu->base + PMCFG2); pmcfg2 &= ~FIELD_PREP(PMCFG2_ID, 0x3FFFF); - pmcfg2 |= FIELD_PREP(PMCFG2_ID, cfg1); + pmcfg2 |= FIELD_PREP(PMCFG2_ID, axi_id); writel(pmcfg2, pmu->base + PMCFG2); } @@ -467,6 +465,28 @@ static void ddr_perf_event_start(struct perf_event *event, int flags) hwc->state = 0; } +static int ddr_perf_alloc_counter(struct ddr_pmu *pmu, int event, int counter) +{ + int i; + + if (event == CYCLES_EVENT_ID) { + // Cycles counter is dedicated for cycle event. + if (pmu->events[CYCLES_COUNTER] == NULL) + return CYCLES_COUNTER; + } else if (counter != 0) { + // Counter specific event use specific counter. + if (pmu->events[counter] == NULL) + return counter; + } else { + // Auto allocate counter for referene event. + for (i = 1; i < NUM_COUNTERS; i++) + if (pmu->events[i] == NULL) + return i; + } + + return -ENOENT; +} + static int ddr_perf_event_add(struct perf_event *event, int flags) { struct ddr_pmu *pmu = to_ddr_pmu(event->pmu); @@ -474,10 +494,17 @@ static int ddr_perf_event_add(struct perf_event *event, int flags) int cfg = event->attr.config; int cfg1 = event->attr.config1; int cfg2 = event->attr.config2; - int counter; + int event_id, counter; + event_id = (cfg & CONFIG_EVENT_MASK) >> CONFIG_EVENT_OFFSET; counter = (cfg & CONFIG_COUNTER_MASK) >> CONFIG_COUNTER_OFFSET; + counter = ddr_perf_alloc_counter(pmu, event_id, counter); + if (counter < 0) { + dev_dbg(pmu->dev, "There are not enough counters\n"); + return -EOPNOTSUPP; + } + pmu->events[counter] = event; pmu->active_events++; hwc->idx = counter; @@ -487,7 +514,7 @@ static int ddr_perf_event_add(struct perf_event *event, int flags) ddr_perf_event_start(event, flags); /* read trans, write trans, read beat */ - ddr_perf_monitor_config(pmu, cfg, cfg1, cfg2); + ddr_perf_monitor_config(pmu, event_id, counter, cfg1, cfg2); return 0; } @@ -508,9 +535,11 @@ static void ddr_perf_event_del(struct perf_event *event, int flags) { struct ddr_pmu *pmu = to_ddr_pmu(event->pmu); struct hw_perf_event *hwc = &event->hw; + int counter = hwc->idx; ddr_perf_event_stop(event, PERF_EF_UPDATE); + pmu->events[counter] = NULL; pmu->active_events--; hwc->idx = -1; } From patchwork Thu Mar 7 09:57:27 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Xu Yang X-Patchwork-Id: 13585320 Received: from EUR03-DBA-obe.outbound.protection.outlook.com (mail-dbaeur03on2077.outbound.protection.outlook.com [40.107.104.77]) (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 1207312A153 for ; Thu, 7 Mar 2024 09:57:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.104.77 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709805470; cv=fail; b=pzeijzRiEHOi0CQpiRXKuZOe4OSh+Dc82aHSlUhr5cekS7D+7mTVSkbJGkR7VM1xirE5M7Nwj3eWKXtBwCTVIKyM3qrqg/dNjfxJa+UbWBLMeqk7CU5wrNbwMio4g/ER2+mMfKzHSTswtWuGlLixmutkoAVsLur3SRYYR3NKSjE= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709805470; c=relaxed/simple; bh=ZJMyBQ30Z1VEPdI1egHx4gZmI6MQkz/u4UsGEKgJDEA=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: Content-Type:MIME-Version; b=EzAMQt/Z2HDsPxzVE6yeR2qRGjYOJvYQVwPkyfxu/iS3BDz7TEiUSZpr7T6OMtMdcgfKR0wIvlmUvHhhfMfZsrQ1mh0fP7tarBpn5M2trgUXiYOENJB8l91Q8TA4+NLSmoeOglRlsi426f+CXaMl+TX7E6wFOJARH2BmDiznty8= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com; spf=pass smtp.mailfrom=nxp.com; dkim=pass (1024-bit key) header.d=nxp.com header.i=@nxp.com header.b=fVC+mX3m; arc=fail smtp.client-ip=40.107.104.77 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=nxp.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=nxp.com header.i=@nxp.com header.b="fVC+mX3m" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ApgJcrp3KWXAGjtipsEvW7vUaP1mPWW2zr9VYxkewazqBDNbbCgNdqvoE1/ubi3tz9lgA2IqPUbGbzwYIOCBSLNhu1K2YQE/AhqtX7MIl7Cf/LBS70zIpgbYSHadp1dL8OGzZBb9IX/7paHfS3NUnjVSpq2PZWvBZ/2rAXuO+dUuj4v5z6R5fbv0ywKIwiacyMo5hQ8QuVm5bIoyk8IKP6VkYKrqxAjmkMkeX6Km7ldRTqOg95eEZMJL5jVozSWN5vDbHAzzy0uXDtro0osuWjFiR1r7x9N3P3mbm2fQeHkL8t+EC/VG8RU4dWQMPOO+dgd7zz57ph+xFjIS1sZUjA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=Q2aVeCE8HCIRl3T+2BvJ3i58qAnIyEyLLUM5Z0Z84AE=; b=VaeNZ+BQabDF8eqqA4tvLVZDDJOxNR5J1Ji1s8/mOvKt0Oo87/EDClySI1AtS8HR1y8m6HuR9Q1R3X5r10GH3SsIg73poRSqbEDy1cbj64yJTTm2XcLKBnIMxVLrYs/AL805OAKo+RuVpxY1R+W/5bXmk3FpbmM7oXYxgJI9JXwRYZ2lRbmfitHy7KhoMny/E/UmdugrCkRmQ1ZGuwmSGm0kikzybAtuzhdTuYd8X+lovdf6eUEeAzwuAV5s/1ThVKDQ4e5bgcktkJMubHVzeU1tpEh6+nalp0//5P8UDab/CvBSIa1ejGo/I0zI1ipDTY/6UdektgRjlS2DJHVPag== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Q2aVeCE8HCIRl3T+2BvJ3i58qAnIyEyLLUM5Z0Z84AE=; b=fVC+mX3my1/9ddGYeePvln57/uAcIN6NF8THGW97qyxmfJaoVztMAAsljquFGn3+zQZOVompIIzZ6bv88AbNuQdoJkE1w1C+gcliAWlcvwpVGOTvLXx6Lh3QRYW9YLEazsUv+GHrfh5Kc6X0K1/gtKVBl2mW6F/CyRAgwvnZUa4= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from DU2PR04MB8822.eurprd04.prod.outlook.com (2603:10a6:10:2e1::11) by DU2PR04MB8504.eurprd04.prod.outlook.com (2603:10a6:10:2d3::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7339.38; Thu, 7 Mar 2024 09:57:45 +0000 Received: from DU2PR04MB8822.eurprd04.prod.outlook.com ([fe80::d45f:4483:c11:68b0]) by DU2PR04MB8822.eurprd04.prod.outlook.com ([fe80::d45f:4483:c11:68b0%7]) with mapi id 15.20.7339.035; Thu, 7 Mar 2024 09:57:45 +0000 From: Xu Yang To: Frank.li@nxp.com, will@kernel.org, mark.rutland@arm.com, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org, shawnguo@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com, john.g.garry@oracle.com, jolsa@kernel.org, namhyung@kernel.org, irogers@google.com Cc: mike.leach@linaro.org, peterz@infradead.org, mingo@redhat.com, acme@kernel.org, alexander.shishkin@linux.intel.com, adrian.hunter@intel.com, linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org, imx@lists.linux.dev Subject: [PATCH v6 4/7] perf: imx_perf: refactor driver for imx93 Date: Thu, 7 Mar 2024 17:57:27 +0800 Message-Id: <20240307095730.3792680-4-xu.yang_2@nxp.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240307095730.3792680-1-xu.yang_2@nxp.com> References: <20240307095730.3792680-1-xu.yang_2@nxp.com> X-ClientProxiedBy: SG2PR06CA0212.apcprd06.prod.outlook.com (2603:1096:4:68::20) To DU2PR04MB8822.eurprd04.prod.outlook.com (2603:10a6:10:2e1::11) Precedence: bulk X-Mailing-List: imx@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DU2PR04MB8822:EE_|DU2PR04MB8504:EE_ X-MS-Office365-Filtering-Correlation-Id: fcb989cd-d345-4614-5c0e-08dc3e8d0993 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: mj5tce7/kxkMER286AIKQbIbQDu5pChbSiO5Gft1fJ0t7nAC4h913Eq2YoPSMCwaqN41PUe1rnBwWMSTXEqMsSXqa4jf+4XhP23AFhGdiWyWlwPwq9h9MDv3GaZuCp5L71yKFC2z1B74VIhVDrZeZ8GaVUm/Zbw76wnwI/oJ7p2Q14orL6460096M0+Mr87c6gJbar9bDaQQbWO0gB9I3Gd33dNQx4JEXdLvzTsQ+CqX34s2x7HeinGXWaTuWrxniIc4O3RdAaaxhRWlWhzqfhuHLR/kHB6Gq84Z9Y8oCT4zHXrexu6+dooCqBDewkcurkFRJT/V8HP7XEozHiz3RYuoT1KW+yigGx+p3wJmGTW7tGRAUnvpG3FiLBl1rsxuRVXLNQ+J/C6krSSgKFtfCFZ0oI3Oj085Ld1LqxJImSRawIKy7CuV/+kVRR29B8hcUUNhIs6v5+Tc6SIJtM0aEd6rZMBredvfcTNf4P+dxlSAFRIGqwJbVI6QutqnZnO/PkXjN1KlCfXGFz7A2d4U6/T2ZA30yVzAO9iLs34AnT2CGE2EjnFOVxp9Pj8PtH1rXPosdL7L5ayyGuL2JZ7o2Oc5wuBE2mHJzdCuYZioYvfykJLM7dgnaxepaDq4w8C6TUClc9yPwKH1HBoETCLpbKpKHc5Jv8ynHxQQ8f/0BvmMEEpnAIi5TA6BjP7S4YY8FBVrhrbxIeQIP4JFJfZ5aa4X27uvmy6hWFFhqtLuLqA= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DU2PR04MB8822.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(376005)(38350700005)(921011);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: QTEtxcpYs5CaGBkWmDBTmtrxFRBY2SJcrUREp3I4EkRRyfkQn3E8Q69j0mT/bAtnVWjgNE+gLB8hayyISGGFFmrQLqfKjoTP/kKfcmFmi1PSqb5A4BnG5EIIrXBn2SkSqFpwFoPIGxjj23eaBpqP9qNVhiklOS5FBgGUreZVReDYk8fBhEi9XPrqxLiPziIMZUKzZfKpqRJOYNCGAPRLKhKq/3lx9UcDpPdTWQcn70VIBlulbdJ1riVsD9dXSvPGlKKwWNxp98usUwlPjL4JsDGS38JCAerFsc+ZfeUcgbeVXSgBtBLOUmEB3RYjWmwSzyODfmFMbATk5HO3N63S8erwiue1Xz1m3zSCWGrw54TG3I0530Ha5DCnhPxGQ+hRw89cT7MIpadEAHzWnEfsejYBMjBMx4SOS+F8TI4tmshEsquaiVIy8i5IUPOU7xDRfeQP1bD1DSno5Kc68YL+bKpnIiBavAZwLmx08Ye3/mJvl2C/F8RMORVgwmTswAW6uTq4/p0KeVDovuYBCep+oZL7r3fbNzNGd6U7HBNMHErhahsrlQ+D9fQskzCYSX0nbDyk1mNjuhvcg+6qZZaoZ8AHVS3tPQD20mbd1LnQfQhXOnMlcbHsy95DPNSCGT0DFLKexZYqiUHnIJrPfyCgZ1WCvUI7+XETNPn3xcrTJCf7vfRIVcBDOATu136ZUjdTBFVLtKS1rzWWABz0G3ZNHxoc4j+SzQ5ctfRNOIz16cmdEd6GM3+PfmKWiY2r6Q7TNa6e7bC6fhgRb1eRckzQBtKvbi65/hHoUjFk7pE2HGA9M42oeEVXHGPgH2dZlN65l/r/Z/mSvr4EjnwYdFjlKbREJJI3Z+PvpvNYFhe/IfhqDt/gvGmnf2KVHhXnWqrxOVtrszPFx5KI8qYAtefaYm66ax5T5jyjO3tuux6CQ4gQHFbLlPm7bB/7ewytr0i7699n+XIlCs64jsgzTD5u4pONSrFCiXmxvIdvOn7cEy7B7I/KMm95FiPTcTM66B5ZK/Q3lcqAUTmjxI3FHnfCGpd5RkMRcgVI9PInMwtRhrIVHRCJX+MwNdLhFp1GkBgS1SnIeU3e4RHrXzsfxNqTWVUcje1ASEG7lrAfSyPpwaUAQ2o7QNZlSmMtQ9fu+KZl5NnScMbEtrKv0JYhLg174KVPD3DYRRKafkq3bj+/DTep7uEApGQt8c1bbO5tBw0C9IaNfOt5JB/FDmNyam6lCALp3m7CimgrhIStzJk2+gobiEIRvUi7AyNok5tz4aPnUaiu0gdzyT1Gr3tw2yAUkIKy//8SQ3A3N78g8ym9afM7FNETJk6hz/MDj/IZWjQlH112j0HvzXa13L7JmcAKr5llTwGn3dl0AUev13phnBlQ+3xE7vtbJz3g/mscQB9wgZ7w8FzMxObvz/X9/5HAzIt5HPM5addDIEPSMN9aZR8JsYRXEdvALGH/V4Qw6mdYQ+FUivLeVqLsgoqwIh4p03czbZ9bzosHc9EEooCOfNaWM92tBSwuCVjVoH8ZZLOvF3kKDIrAXiKojr71HQ++C3PMSDueVV0H7GYabcY/d7R3/NNlvUB3SaUB1Tjb+8Ni X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: fcb989cd-d345-4614-5c0e-08dc3e8d0993 X-MS-Exchange-CrossTenant-AuthSource: DU2PR04MB8822.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Mar 2024 09:57:45.3517 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: Tb3aWXArgbZQj0V/VV9f+kr4GIRgy41X8f82afIn4eS3uJGXxjHQDSBHvjZGJxF/wocOoBjBnP7Pi9pIejsm8g== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DU2PR04MB8504 This driver is initinally used to support imx93 Soc and now it's time to add support for imx95 Soc. However, some macro definitions and events are different on these two Socs. For preparing imx95 supports, this will refactor driver for imx93. Signed-off-by: Xu Yang --- Changes in v4: - new patch Changes in v5: - use is_visible to hide unwanted attributes as suggested by Will Changes in v6: - improve imx93_ddr_perf_monitor_config() --- drivers/perf/fsl_imx9_ddr_perf.c | 99 +++++++++++++++++++++----------- 1 file changed, 66 insertions(+), 33 deletions(-) diff --git a/drivers/perf/fsl_imx9_ddr_perf.c b/drivers/perf/fsl_imx9_ddr_perf.c index 8d85b4d98544..4e8a3a4349c5 100644 --- a/drivers/perf/fsl_imx9_ddr_perf.c +++ b/drivers/perf/fsl_imx9_ddr_perf.c @@ -11,14 +11,14 @@ #include /* Performance monitor configuration */ -#define PMCFG1 0x00 -#define PMCFG1_RD_TRANS_FILT_EN BIT(31) -#define PMCFG1_WR_TRANS_FILT_EN BIT(30) -#define PMCFG1_RD_BT_FILT_EN BIT(29) -#define PMCFG1_ID_MASK GENMASK(17, 0) +#define PMCFG1 0x00 +#define MX93_PMCFG1_RD_TRANS_FILT_EN BIT(31) +#define MX93_PMCFG1_WR_TRANS_FILT_EN BIT(30) +#define MX93_PMCFG1_RD_BT_FILT_EN BIT(29) +#define MX93_PMCFG1_ID_MASK GENMASK(17, 0) -#define PMCFG2 0x04 -#define PMCFG2_ID GENMASK(17, 0) +#define PMCFG2 0x04 +#define MX93_PMCFG2_ID GENMASK(17, 0) /* Global control register affects all counters and takes priority over local control registers */ #define PMGC0 0x40 @@ -77,6 +77,11 @@ static const struct imx_ddr_devtype_data imx93_devtype_data = { .identifier = "imx93", }; +static inline bool is_imx93(struct ddr_pmu *pmu) +{ + return pmu->devtype_data == &imx93_devtype_data; +} + static const struct of_device_id imx_ddr_pmu_dt_ids[] = { {.compatible = "fsl,imx93-ddr-pmu", .data = &imx93_devtype_data}, { /* sentinel */ } @@ -186,7 +191,7 @@ static struct attribute *ddr_perf_events_attrs[] = { IMX9_DDR_PMU_EVENT_ATTR(ddrc_ld_wiq_6, ID(2, 70)), IMX9_DDR_PMU_EVENT_ATTR(ddrc_ld_wiq_7, ID(2, 71)), IMX9_DDR_PMU_EVENT_ATTR(eddrtq_pmon_empty, ID(2, 72)), - IMX9_DDR_PMU_EVENT_ATTR(eddrtq_pm_rd_trans_filt, ID(2, 73)), + IMX9_DDR_PMU_EVENT_ATTR(eddrtq_pm_rd_trans_filt, ID(2, 73)), /* imx93 specific*/ /* counter3 specific events */ IMX9_DDR_PMU_EVENT_ATTR(ddrc_qx_row_collision_0, ID(3, 64)), @@ -198,7 +203,7 @@ static struct attribute *ddr_perf_events_attrs[] = { IMX9_DDR_PMU_EVENT_ATTR(ddrc_qx_row_collision_6, ID(3, 70)), IMX9_DDR_PMU_EVENT_ATTR(ddrc_qx_row_collision_7, ID(3, 71)), IMX9_DDR_PMU_EVENT_ATTR(eddrtq_pmon_full, ID(3, 72)), - IMX9_DDR_PMU_EVENT_ATTR(eddrtq_pm_wr_trans_filt, ID(3, 73)), + IMX9_DDR_PMU_EVENT_ATTR(eddrtq_pm_wr_trans_filt, ID(3, 73)), /* imx93 specific*/ /* counter4 specific events */ IMX9_DDR_PMU_EVENT_ATTR(ddrc_qx_row_open_0, ID(4, 64)), @@ -210,7 +215,7 @@ static struct attribute *ddr_perf_events_attrs[] = { IMX9_DDR_PMU_EVENT_ATTR(ddrc_qx_row_open_6, ID(4, 70)), IMX9_DDR_PMU_EVENT_ATTR(ddrc_qx_row_open_7, ID(4, 71)), IMX9_DDR_PMU_EVENT_ATTR(eddrtq_pmon_ld_rdq2_rmw, ID(4, 72)), - IMX9_DDR_PMU_EVENT_ATTR(eddrtq_pm_rd_beat_filt, ID(4, 73)), + IMX9_DDR_PMU_EVENT_ATTR(eddrtq_pm_rd_beat_filt, ID(4, 73)), /* imx93 specific*/ /* counter5 specific events */ IMX9_DDR_PMU_EVENT_ATTR(ddrc_qx_valid_start_0, ID(5, 64)), @@ -245,9 +250,26 @@ static struct attribute *ddr_perf_events_attrs[] = { NULL, }; +static umode_t +ddr_perf_events_attrs_is_visible(struct kobject *kobj, + struct attribute *attr, int unused) +{ + struct pmu *pmu = dev_get_drvdata(kobj_to_dev(kobj)); + struct ddr_pmu *ddr_pmu = to_ddr_pmu(pmu); + + if ((!strcmp(attr->name, "eddrtq_pm_rd_trans_filt") || + !strcmp(attr->name, "eddrtq_pm_wr_trans_filt") || + !strcmp(attr->name, "eddrtq_pm_rd_beat_filt")) && + !is_imx93(ddr_pmu)) + return 0; + + return attr->mode; +} + static const struct attribute_group ddr_perf_events_attr_group = { .name = "events", .attrs = ddr_perf_events_attrs, + .is_visible = ddr_perf_events_attrs_is_visible, }; PMU_FORMAT_ATTR(event, "config:0-15"); @@ -369,36 +391,47 @@ static void ddr_perf_counter_local_config(struct ddr_pmu *pmu, int config, } } -static void ddr_perf_monitor_config(struct ddr_pmu *pmu, int event, - int counter, int axi_id, int axi_mask) +static void imx93_ddr_perf_monitor_config(struct ddr_pmu *pmu, int event, + int counter, int axi_id, int axi_mask) { u32 pmcfg1, pmcfg2; pmcfg1 = readl_relaxed(pmu->base + PMCFG1); - if (counter == 2 && event == 73) - pmcfg1 |= PMCFG1_RD_TRANS_FILT_EN; - else if (counter == 2 && event != 73) - pmcfg1 &= ~PMCFG1_RD_TRANS_FILT_EN; - - if (counter == 3 && event == 73) - pmcfg1 |= PMCFG1_WR_TRANS_FILT_EN; - else if (counter == 3 && event != 73) - pmcfg1 &= ~PMCFG1_WR_TRANS_FILT_EN; - - if (counter == 4 && event == 73) - pmcfg1 |= PMCFG1_RD_BT_FILT_EN; - else if (counter == 4 && event != 73) - pmcfg1 &= ~PMCFG1_RD_BT_FILT_EN; + if (event == 73) { + switch (counter) { + case 2: + pmcfg1 |= MX93_PMCFG1_RD_TRANS_FILT_EN; + break; + case 3: + pmcfg1 |= MX93_PMCFG1_WR_TRANS_FILT_EN; + break; + case 4: + pmcfg1 |= MX93_PMCFG1_RD_BT_FILT_EN; + break; + } + } else { + switch (counter) { + case 2: + pmcfg1 &= ~MX93_PMCFG1_RD_TRANS_FILT_EN; + break; + case 3: + pmcfg1 &= ~MX93_PMCFG1_WR_TRANS_FILT_EN; + break; + case 4: + pmcfg1 &= ~MX93_PMCFG1_RD_BT_FILT_EN; + break; + } + } - pmcfg1 &= ~FIELD_PREP(PMCFG1_ID_MASK, 0x3FFFF); - pmcfg1 |= FIELD_PREP(PMCFG1_ID_MASK, axi_mask); - writel(pmcfg1, pmu->base + PMCFG1); + pmcfg1 &= ~FIELD_PREP(MX93_PMCFG1_ID_MASK, 0x3FFFF); + pmcfg1 |= FIELD_PREP(MX93_PMCFG1_ID_MASK, axi_mask); + writel_relaxed(pmcfg1, pmu->base + PMCFG1); pmcfg2 = readl_relaxed(pmu->base + PMCFG2); - pmcfg2 &= ~FIELD_PREP(PMCFG2_ID, 0x3FFFF); - pmcfg2 |= FIELD_PREP(PMCFG2_ID, axi_id); - writel(pmcfg2, pmu->base + PMCFG2); + pmcfg2 &= ~FIELD_PREP(MX93_PMCFG2_ID, 0x3FFFF); + pmcfg2 |= FIELD_PREP(MX93_PMCFG2_ID, axi_id); + writel_relaxed(pmcfg2, pmu->base + PMCFG2); } static void ddr_perf_event_update(struct perf_event *event) @@ -514,7 +547,7 @@ static int ddr_perf_event_add(struct perf_event *event, int flags) ddr_perf_event_start(event, flags); /* read trans, write trans, read beat */ - ddr_perf_monitor_config(pmu, event_id, counter, cfg1, cfg2); + imx93_ddr_perf_monitor_config(pmu, event_id, counter, cfg1, cfg2); return 0; } From patchwork Thu Mar 7 09:57:28 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Xu Yang X-Patchwork-Id: 13585321 Received: from EUR03-DBA-obe.outbound.protection.outlook.com (mail-dbaeur03on2074.outbound.protection.outlook.com [40.107.104.74]) (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 5068712AAE9 for ; Thu, 7 Mar 2024 09:57:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.104.74 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709805477; cv=fail; b=POwkRY1cPsAv1DOMsJ3DRSGIP+j2BmuJxFw8LJnMAoFULOwV2csMRfi2/Vvf4zqeg5rtQvZpf+N3bIx4fA9E+0xfc6Y+SOlIGKsRwXwOYLAr7WLWYu7HDvZt+dTTXuS8iyXJnyicYazZWPbIOSgjWZECycBXNyY+LhkAIsnrrBQ= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709805477; c=relaxed/simple; bh=rAIg/z5WFPmD9rJiqtZzUclV2yUnrpvZ+yUSZtT3/Ic=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: Content-Type:MIME-Version; b=sZV6E0O+Jdn4DzbT8pLvO9Wqvw4i7u1R0dDaO3jmb5jkcinjrFVrOpqGGgyRgxSeVGK8ZxAZpxS7Hfr0R3yP0EWuZVPSH8bRruDFezQhujEJW2eEtVr6W8phi5qa4CQNL+8+SF3ixZR+yZ7R9dETFKSy7DIyt/PVkFYxTh7HOcs= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com; spf=pass smtp.mailfrom=nxp.com; dkim=pass (1024-bit key) header.d=nxp.com header.i=@nxp.com header.b=T71owC2d; arc=fail smtp.client-ip=40.107.104.74 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=nxp.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=nxp.com header.i=@nxp.com header.b="T71owC2d" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Ty/YywlsSV8WUYjVPQDO4DdEeestbsoXcsClpExgdAu54oUeBpLRc4KduhOcQEfFDzy3pa1EuHX4NG185+r1xV6C0OZ8uU6tWKrGGNIO/KB/csJgQfvJTyiifEe1lVMj9K87ZUoQwv7Lv8IpO6xwKdLdcgcSjE+1sn6jTu8wIIK/lMHzXwDqm0pJVa6DnA92MD8ol+q0aWP9Tptg26JKDLXCfUg/fI9oQ+xN0HlZNjLKctrIJbnFKxOpD2Yh+QFouYDn4BwRVW2Ec2XWRFpLO5ZvxNEewum/CXviH2mUeBBN4JAcGSTuWx+kpLwgBgoIhb7rT6riALq5OY+R/3Njeg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=TCpzQMQMQqszgg3W6CM2LVpPEFvKH19j+v/4y3aPj7k=; b=jbR6Ut8OxsudMyLvq5pBeJ7lkjeBOPYb96HrSXHtPc6ucNwGbaAZ64F07v+BhloOesWQcPs99Zt2IKidUI9+XyDAHcASnKeDxWVb6FN4ru7aP/nIEtR+bXPQdxQOtZF9/j3Bxzj7ycp3f+P/LJ/H1YVVPchcPUI3tNnX1iHi0fycU1WE3dkoWJeN4vf6m8vBJq4/G9CYFyOA0aV4E+duAeF0JkG1UpjNYIfzY6xqhYVNTnOX0WU0LXAa9WopggiSNpJRuR3gLAWpbP2sTw/q1wHm9thalkDdFfGAMmYM56etd1FztJWNqNvsOuwAg7xSEG/+mZXn7+JJDOfAyQYgNg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=TCpzQMQMQqszgg3W6CM2LVpPEFvKH19j+v/4y3aPj7k=; b=T71owC2dInp/TXLcAWWsF4oPQgpr1/HRUBkKS/JVW4RasSQ/m8/KVLjMlNi3V7+yRW27AbP7W5rBGfzSjM21O2cB8to70gXMBDZ+ewtOCbD3bCjdySt5gdRRZXfz2xbWdQwtztv7fMLy5iT6wLKTeRV/bnVjBsLK4kqFRoU8Hc8= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from DU2PR04MB8822.eurprd04.prod.outlook.com (2603:10a6:10:2e1::11) by DU2PR04MB8504.eurprd04.prod.outlook.com (2603:10a6:10:2d3::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7339.38; Thu, 7 Mar 2024 09:57:52 +0000 Received: from DU2PR04MB8822.eurprd04.prod.outlook.com ([fe80::d45f:4483:c11:68b0]) by DU2PR04MB8822.eurprd04.prod.outlook.com ([fe80::d45f:4483:c11:68b0%7]) with mapi id 15.20.7339.035; Thu, 7 Mar 2024 09:57:52 +0000 From: Xu Yang To: Frank.li@nxp.com, will@kernel.org, mark.rutland@arm.com, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org, shawnguo@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com, john.g.garry@oracle.com, jolsa@kernel.org, namhyung@kernel.org, irogers@google.com Cc: mike.leach@linaro.org, peterz@infradead.org, mingo@redhat.com, acme@kernel.org, alexander.shishkin@linux.intel.com, adrian.hunter@intel.com, linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org, imx@lists.linux.dev Subject: [PATCH v6 5/7] perf: imx_perf: fix counter start and config sequence Date: Thu, 7 Mar 2024 17:57:28 +0800 Message-Id: <20240307095730.3792680-5-xu.yang_2@nxp.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240307095730.3792680-1-xu.yang_2@nxp.com> References: <20240307095730.3792680-1-xu.yang_2@nxp.com> X-ClientProxiedBy: SG2PR06CA0212.apcprd06.prod.outlook.com (2603:1096:4:68::20) To DU2PR04MB8822.eurprd04.prod.outlook.com (2603:10a6:10:2e1::11) Precedence: bulk X-Mailing-List: imx@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DU2PR04MB8822:EE_|DU2PR04MB8504:EE_ X-MS-Office365-Filtering-Correlation-Id: 3ccc7ae2-1a1d-4539-821e-08dc3e8d0df4 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 2sfUP6yR4HYSabKxsJxef2rfq+d1mf0KVc854bunyp/DovfNErYZR88z2Yly6XzKOfLbxOkj+gUIFVFAY8FoCZ+jm/7po1lMan96tTbCCCnOKAQ9d0LY7NxA+VSGjgSC3eTSeWQ1FnOitmuan/GqYlTJQXJBsCwmKgvBxuXw0hkogF5dkLE63NSO77cqYfFTHgcw8mCkEcb4Tnz6CHrM3EPViAXhvI5atFC8eOeQ10c/KZHMHWeBeoRB5jNXU1aPI/RicHUIc0hiLrfkaQq6Da4U5qWd8ZOuvsFQIuxcSCEfEnXwIQiMsPqXfghJ0GAkvCNB2C6O5Ls2chRj+5Nu3ZJHLqFz0tfZMRF012DrrjL4Y9Dvz8lTQHdiPp+XGa0rreu4BqvCSgPfATq4XcNMtLhh3z5CV0JE9yS4xCLNZQ4Sa3szcmVMmcvzZuwSkNCpQkMBIsx3NnG3h/BmXXUTchLnQ0TBBrRKb3MI1MD18HP0lirfpFUXBMTAEocYnlEkOzT6kpp8b3pp8uT4N4+pEXZOKI1+PHCJHLLaiZhWN2a8LAm3fgLgD8j5pJB3+C5pYEpxub5zlTWkbJaELpTnei281CwCovoELjR3RLgk0vIU8kX7JIGYX3h3iD1LMliWPxPaK/0s1N7uJ84Nnz+3MPm/m/AcN69D43XUtesqEhyigyFPGcqVekpLO/CzIMjBLo3LqMneziw8vnz6XTfWHK/P83X7cRZx0waNGF0Rygw= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DU2PR04MB8822.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(376005)(38350700005)(921011);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: PKWnbxceFK5pYxCzHLtLh8Hzc9uivulkr4HC9rahLyBj4cy+Bl36JvrmyhfgA5OwwbYgxfq1wRuMDCO1vtn3tuSfK1KgJO+BonwwnMzC5q0/NQMagLGAhZ2D1yOtGYKb5gO53fw8+JKf0IYIdiFxcKMmDru/9nZVkPVBZhF5HORgBbycb9fUB0xMS+kRmmqgkp2xDmEqHl67uezWQSp4kNha8mUUo/Wh+PAKi0jDeuTIWEofOgySnIfS6H5kh38O1p5X4uw/3Pq4ssTpFgmtcULXmY5GgfoXk2IaqTssB+UqnEio2q00AELGEE5Eaz0KFWYwxEVQYvaSrmR6LGpkou4dPhxr4tAr7NP3TzVv17UDHufOnGaplDdHG/Qe0SIB/1u9yRKgEo94nzgWZc8fSYPRDh6dh7OgnbhAu41QUp19i0rvbh6pkO9AhgCpSRW1RgkWsX3x9iira1OlF6hc9KSuFvyPpMnM4hHrwbkxK/shyEqtFFx5BHdiLkFt927bXm0Wt8t1oSJN1lwa3fQZ8FdnPE0oxV6oWMF6HoS3mKT9leDyGElByg2by3/aWfQVV1uZML9xkFCXH/BMUT6woOy3hnzy6dHaMzuQgCbqXAOjLeYVha8yc9XwLKTPJ930W2r/tEdVgvBaiE31rXCuAnJQqBorsdjGxWMEgghBcmp2x9eIKkRj8J694ZrsAlRIFn6JT/5PloiPVQwQAokuBhUCRxXdr/VhG4p7sE4J0RyuzmZjgppBRw2cFLKP3lEzizEfRSZ4e9i6jy5hmU05T5w+yR6uyuc+GjXNQr3XNzM/Jok5xaYvqv0YfagM3xgmmr2yzE46fDZeUtTjLD0Amjz1OH0ltQBNH6bHfCfEbFBcnfMs1ztnEYOAybGxUDoft690coqGT4xP1fZgnoD+gWV4N8oCtsAPLaSsa2IwBuZpMgQ7aoirgQZESPXO/AD+zsq5jcg3OqmGmDJ7WsKOfdRyEzhDXeiMC4SG+m3GqeXGHLoY2zb52jcphidOe/OYCJZfOUKg+xZLRoZoZUe8bT6CiRGmZi6DABRuj8CYfSUfOTcRPCiuFh+9pbqGvKwrWejhDtTJW/EdAsZNYjHb7+xPaaAIuiUX+ITInEkK5WtEz20s5f/+OA15aiewfpEdEYFSBISqn4e4V5FW/oBgbjxTTdGCT1n0z0xmu8fPtXo6GfZ2WVP6BGvNvEjxQzzMd6pK/P8XW1tvMczLFsv4iaqEA1AKmNrT+o7L9PDq9gpAM3lA7uOaEi4NMh+Rbc7v2xXJIwlywZWEc1nQpBtkx0uAtSkTbatMIWPsJhyh00Hkv9uF6068hS4ZlyQ9B6V0zvnFsQDbYoBDKfUWSN1MV8gqhuS0dD8/tO3VQSe4d/EiVk5k4mzV/yh4yBDAYfzTkD3MNu2T1G3ofWn2b38GQ7jfbskmLMIVso0QLIvW0TUpjx+eXate5Zd+lyOP0HiXj0kHRECEDzZ07IzldwrmsS85WemkaEEyfctu3VF6lKVC1sS/exOAgLtLMs/ZJO1B6VVowIp7m5hgCybrpGw87lXPSKDF/z5MmgYbb64vZ9TL9b9MxFmc14ZbBEYrZ8OD X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 3ccc7ae2-1a1d-4539-821e-08dc3e8d0df4 X-MS-Exchange-CrossTenant-AuthSource: DU2PR04MB8822.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Mar 2024 09:57:52.8485 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: XDQF9X5CZXcG6o0nkGdCvFRk7V1QnlsA27Nd4aKT00xl1KvJiAFcejQk+pjAxp2eGhkvhLmZUuzUfU8UIhX6xw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DU2PR04MB8504 In current driver, the counter will start firstly and then be configured. This sequence is not correct for AXI filter events since the correct AXI_MASK and AXI_ID are not set yet. Then the results may be inaccurate. Signed-off-by: Xu Yang --- Changes in v5: - new patch Changes in v6: - no changes --- drivers/perf/fsl_imx9_ddr_perf.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/perf/fsl_imx9_ddr_perf.c b/drivers/perf/fsl_imx9_ddr_perf.c index 4e8a3a4349c5..52234b97d0cb 100644 --- a/drivers/perf/fsl_imx9_ddr_perf.c +++ b/drivers/perf/fsl_imx9_ddr_perf.c @@ -543,12 +543,12 @@ static int ddr_perf_event_add(struct perf_event *event, int flags) hwc->idx = counter; hwc->state |= PERF_HES_STOPPED; - if (flags & PERF_EF_START) - ddr_perf_event_start(event, flags); - /* read trans, write trans, read beat */ imx93_ddr_perf_monitor_config(pmu, event_id, counter, cfg1, cfg2); + if (flags & PERF_EF_START) + ddr_perf_event_start(event, flags); + return 0; } From patchwork Thu Mar 7 09:57:29 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Xu Yang X-Patchwork-Id: 13585322 Received: from EUR04-HE1-obe.outbound.protection.outlook.com (mail-he1eur04on2059.outbound.protection.outlook.com [40.107.7.59]) (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 6C27612B172 for ; Thu, 7 Mar 2024 09:58:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.7.59 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709805485; cv=fail; b=hi06z0hisHoj3knvej7SFV8/dSb48ADl9VBJtd2MI/exxnyVBlveTqj4YJ/oQCMiB+Vl/ddQs1MxxiPlC0k+z+TAM/9L5EsdXGUoFBBOJ9p3v8d4YpcGerwDEZaYR67mfcQJG5rGTSZKDytD99s6nDEQiKImCvUlFKG+7NAH1Ac= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709805485; c=relaxed/simple; bh=RbXnBSQMG36BsaE76Nmc2umxgS1/mRM6Nny4U9hZbHI=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: Content-Type:MIME-Version; b=ABOIO0ol9wYxHooQgiz/pZ5ckbwHcFtbIvT5gB8KRkfVUJKvsrr1X957ik5o7pToOHKjezrsliE+acu2rplWDNMrroKQIh1OD2oRz50vUq6c+e9cVLHeFyy3Zc/d0JYIvM2axysmMkvg2lYMFG1fQK6uJqM7tbxg5euHsM8MQmw= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com; spf=pass smtp.mailfrom=nxp.com; dkim=pass (1024-bit key) header.d=nxp.com header.i=@nxp.com header.b=kfA7OovW; arc=fail smtp.client-ip=40.107.7.59 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=nxp.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=nxp.com header.i=@nxp.com header.b="kfA7OovW" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=bJ8imZU88O09xReud/n79uvjORADMC/0Z2O6VrrsARjZoLydv8JZL8XnbiqSjbOsevvcNnhYjCpxg+pyJxTDJBK5rh2iV/o2AgIKMbBBMISxJp0A9ukthvxn32zYmM+ChwhIzZAT1kIPnaMQlbCsS3u8yOzFDfqXiS38PP0uVAeATe8TWV6CAvqJI0yVMjTyIaUZMNPKtN5lMOlU8ByngTHnI5DNQvpnZKS83WKFi6flCn0mh6hj7VW9X6EdEzBflzHKW64H0w8qP99hQefhOMp1ZQSrLCjuko/H9jG8ostfz9fJMzJchVUukuzqVpIbKxi9zVouReg460mdOeVRjA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=3IHUN1dZWeSD1VqIASpk0MIY4pEIaQDpx/0rjsrEY9c=; b=YuhD0Yt9kXNTyNN2PdwSZl9Fbe0bu5iDnX4KbDpI0JaaCBiZ5IRLiD9T9whFUEdyhK9BIUpXc5VEkwEmmevuXPQZIheq+6RzzM56XfWR7jJpa5yvM2nOGLlKy81jNdRDNyX+620ok6BXuxYfMmVCCfYahHE394bzpHfeOfaykYWtFSrnx5lynGXENCiGCjtJNLOi2fkBEv1A8ctPz33XYuRpHeQv6Idrp+ZElGrMDU+Ee0S5hZ7VA0lDgkCVuonVBMYeHyGP22N39syBM5Dj+6EuOS5lhjUVm/5KrQMWEzfS00JLisMySBe81Kh5mkq4MpQlAktXU+K9tZyvJfpM3g== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=3IHUN1dZWeSD1VqIASpk0MIY4pEIaQDpx/0rjsrEY9c=; b=kfA7OovW4816C/fId6+eqqavaOnvyNIuaEZLIMp0lV9epbagaxS6Yr1aWWco9OSl8QHGax8syRoRQTcqSv2SyArvT+pMWppIEYWR9uKJlalAOIHlEq07okaqxGvBobadhm+g3rla4oMNfocN56yVrY1vfaaEgnZdQQ3Tvt5e1lc= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from DU2PR04MB8822.eurprd04.prod.outlook.com (2603:10a6:10:2e1::11) by AM8PR04MB7812.eurprd04.prod.outlook.com (2603:10a6:20b:245::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7362.24; Thu, 7 Mar 2024 09:58:00 +0000 Received: from DU2PR04MB8822.eurprd04.prod.outlook.com ([fe80::d45f:4483:c11:68b0]) by DU2PR04MB8822.eurprd04.prod.outlook.com ([fe80::d45f:4483:c11:68b0%7]) with mapi id 15.20.7339.035; Thu, 7 Mar 2024 09:57:59 +0000 From: Xu Yang To: Frank.li@nxp.com, will@kernel.org, mark.rutland@arm.com, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org, shawnguo@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com, john.g.garry@oracle.com, jolsa@kernel.org, namhyung@kernel.org, irogers@google.com Cc: mike.leach@linaro.org, peterz@infradead.org, mingo@redhat.com, acme@kernel.org, alexander.shishkin@linux.intel.com, adrian.hunter@intel.com, linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org, imx@lists.linux.dev Subject: [PATCH v6 6/7] perf: imx_perf: add support for i.MX95 platform Date: Thu, 7 Mar 2024 17:57:29 +0800 Message-Id: <20240307095730.3792680-6-xu.yang_2@nxp.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240307095730.3792680-1-xu.yang_2@nxp.com> References: <20240307095730.3792680-1-xu.yang_2@nxp.com> X-ClientProxiedBy: SG2PR06CA0212.apcprd06.prod.outlook.com (2603:1096:4:68::20) To DU2PR04MB8822.eurprd04.prod.outlook.com (2603:10a6:10:2e1::11) Precedence: bulk X-Mailing-List: imx@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DU2PR04MB8822:EE_|AM8PR04MB7812:EE_ X-MS-Office365-Filtering-Correlation-Id: f1d888b8-fdd4-4558-d6c1-08dc3e8d1232 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 8xl+Ys6obZOuXcoYpQ9IjY5PB7YngRz5/GJEanFkAsdX7rkzNKwuUpYjIpAr/a8Br+Yk9DGoOfwcnCaaURkxGhW39ToWSPFctHhJ0pNXMf9633ZYq9uLcX7rkgQLhZLK/eMtIDCOLW3wwtbj11wFaB8gPXwUDm66sfrtj7JewpXDMJ5VOzuAZw1CHrTdbcitwKGP6+ZJ6dXD+b7ZWOwZrzpJxTdQzRq1Inw4cDtYNL47dckTYE9wX0r4SOO2bKZ2cvyxFTpZfwjpAmlXcFBYeyfH6psjAx0WQVFenG6idAEDBPlgHKeGI+9LKLTyJXGcz7KRoXo1k3YKog++02kCHTVEcv1ZPm/BelxggDpPJ0c1mkmTAYCw/apJDyu6FgtuMxME1QXC5aP4FdpHnDKsjGmNxsOuGZXNpUKndU4X6EmurbmfKWdE4lCb/3MuEENa2gphKP0CidqiAtpGgVUXS1F9cY4GLYZ2nyU/SJIAr4PFMbAnWUyEH/ohIBtnsL8m/dOyZe4+rmevPtkU/7fPlcwl/Jj+jdsAGx+HlSyFO4PzKprHG59Bb7B3UEWGdx5a/MPV379dVwpH1sbZwCU2Qd0KNr9dnSO7Cjm4Lgcxf6MApInW8I9fH3J9RcEMweSgQMawIEdBgQpu2508/89m1DEbKXwaWvD7SH9NwFRCgN4OvWpZjagjtsfVatkFdGLZm+TNt0oFfhgKMoKObDADyFsVSe6n60mF/OVmSr6aDu4= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DU2PR04MB8822.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(376005)(921011)(38350700005);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: FSPk5CEK838zDG30DaqzAKyof89LOiRDKLwJ+QK39KSbwzZOE6uwqQDxd2rS8+L61GyrVmczgECgpUSx0ysodqTHXk4tcLa4fo91GYRLYsXcOBBcyFpa6PMth5DvqPpeEKsAHv/Vxno6B2lZ61g0W/radD3p1GpGr0KJeYG7359m14A3yDpJWNz32r938pwbZTK+0mKofrqCsWNneJFwhu3rwIE1xqlDwThpFuQ/T5qI4oXTe1Ngzi3qxw9P2yXfLIQoY4KuXDPpDhiMOxsTbAd9Xc+eyzgbj6PMuXvWfvpJnDb4WVnN92s4qwaktOK11XvpRx8qdVLVrCijUtJrQgCCXdc0+gi0PsW/fcMgU1BpoJtAY+9F3X6N7veMFQqovaCCobnLN3gH5+7WpqHQD9B548QawgDRFAKgXjRV2Qu62W9EM/5HQFcrFXTNWXgFz6Rre2CLKgKlqlje17bZepy58Jv4K+A5/+OSnELkifpCB+8HZQAW7qS6i2jAiSW3iMbIiMzE38sRQ58VmmYx0oYveT2xQ76NvAiDDKo/92B2Z7r4bt+yojo8ugE1Bg40ay71jH5x2Gkg7X6PTwI6am9M9YlvQL6/jwvJMmebKMs4+kEipPuuJzxz0xLAHBpEnqHtzTFcdkr5Z7Yv2JlTqDafSkgKcHXBymaT1LAGESkXdizCIJJ/WhHGKsnAnn7Tn3I6ut42UGiwB0VUeum9apYMwXn7XLzjdQOHMTdoXZc6Gw0viaYzplGCtxh7uhScWLU9eJSf83cK42G3yCxBInwpeAwsypahQjGYB8c7oGTiCKGq0JyAAN0xTdXg+qrnYWawCq7209L9zE8BnO3C5CF+aiHKjsqCwXqTs5xzZ94hW7ugFLkQzn4HYwh6N55DcNSILTkWWzBbtsfG+aLCVk34is6kth9L+zlBknW2P9MLfXjGJcUjwz0B6PFrQZSfMm2VcRBArPesGaNj6kOve7DtaiFPjpb6QArSmuCrXA/0Ko69fsq21jZXR63Ltwdmld5IH+bhyiMiP/JY4urcmSgQSoplUzqOPqWqcszrIrILuDbukjOG9zCshI6PNevBuRO10d2AbH7ARoZ3Z/ffP6+ccjLd7B/5L9Yc9OKWgSfx93m5poFd4B4z8LDRut1Wkdw5dNJAA+MGGyfSSQHBvsmsrUz2UpF6xdtJt5/kayeiJsrsCKTVOLdSylkLvG8wW3FxYIDN9LPXfBOrYpIrM+tQtQYuCWogjI/zNFGYQcIn4JgUs5HwYGfTyiqnDnBLa20kNNY4Ftxm/9NBpPgZU9qO9wpJDeXhfHARWLUScEj8PWy9ds3cAweSZgNLnGw3HglA52Bfdo38pYZ8oq/+46t9CGza49g7LR7DJxNSaktl0+9Z1yKRFXm5yvqDENclBtsANxecZc3mbZz5Vc5pHwSaCC3e5fw6c3INHoxhB810E3XeAyXXbFIEr8NhmlkIv0TVBcstbUcxA9lTVX9u2GJoXMqNRvZShXrM5OkZIxWEBMA4OgS29qAlJQdsJcANBolzKWgOOEeex9X5Xvg2GxeJ+9bK/sfci1UX6+IASz5vJ0A9/6UaiZq654Ideo35 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: f1d888b8-fdd4-4558-d6c1-08dc3e8d1232 X-MS-Exchange-CrossTenant-AuthSource: DU2PR04MB8822.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Mar 2024 09:57:59.8391 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 403lGvEof0ZVPKWKC1oPxkd0jL/MHB6VY7GrghUFBc0fu/CKG5e02JZtNE+xP9cWnUMN7SvLxfsdG4rqpRTRHw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM8PR04MB7812 i.MX95 has a DDR PMU which is almostly same as i.MX93, it now supports read beat and write beat filter capabilities. This will add support for i.MX95 and enhance the driver to support specific filter handling for it. Usage: For read beat: ~# perf stat -a -I 1000 -e imx9_ddr0/eddrtq_pm_rd_beat_filt2,axi_mask=ID_MASK,axi_id=ID/ ~# perf stat -a -I 1000 -e imx9_ddr0/eddrtq_pm_rd_beat_filt1,axi_mask=ID_MASK,axi_id=ID/ ~# perf stat -a -I 1000 -e imx9_ddr0/eddrtq_pm_rd_beat_filt0,axi_mask=ID_MASK,axi_id=ID/ eg: For edma2: perf stat -a -I 1000 -e imx9_ddr0/eddrtq_pm_rd_beat_filt0,axi_mask=0x00f,axi_id=0x00c/ For write beat: ~# perf stat -a -I 1000 -e imx9_ddr0/eddrtq_pm_wr_beat_filt,axi_mask=ID_MASK,axi_id=ID/ eg: For edma2: perf stat -a -I 1000 -e imx9_ddr0/eddrtq_pm_wr_beat_filt,axi_mask=0x00f,axi_id=0x00c/ Signed-off-by: Xu Yang --- Changes in v2: - put soc spefific axi filter events to drvdata according to franks suggestions. - adjust pmcfg axi_id and axi_mask config Changes in v3: - no changes Changes in v4: - only contain imx95 parts Changes in v5: - improve imx95_ddr_perf_monitor_config() - use write_relaxed to pair read_relaxed Changes in v6: - no changes --- drivers/perf/fsl_imx9_ddr_perf.c | 93 ++++++++++++++++++++++++++++++-- 1 file changed, 90 insertions(+), 3 deletions(-) diff --git a/drivers/perf/fsl_imx9_ddr_perf.c b/drivers/perf/fsl_imx9_ddr_perf.c index 52234b97d0cb..a91267e2f5d8 100644 --- a/drivers/perf/fsl_imx9_ddr_perf.c +++ b/drivers/perf/fsl_imx9_ddr_perf.c @@ -17,9 +17,19 @@ #define MX93_PMCFG1_RD_BT_FILT_EN BIT(29) #define MX93_PMCFG1_ID_MASK GENMASK(17, 0) +#define MX95_PMCFG1_WR_BEAT_FILT_EN BIT(31) +#define MX95_PMCFG1_RD_BEAT_FILT_EN BIT(30) + #define PMCFG2 0x04 #define MX93_PMCFG2_ID GENMASK(17, 0) +#define PMCFG3 0x08 +#define PMCFG4 0x0C +#define PMCFG5 0x10 +#define PMCFG6 0x14 +#define MX95_PMCFG_ID_MASK GENMASK(9, 0) +#define MX95_PMCFG_ID GENMASK(25, 16) + /* Global control register affects all counters and takes priority over local control registers */ #define PMGC0 0x40 /* Global control register bits */ @@ -77,13 +87,23 @@ static const struct imx_ddr_devtype_data imx93_devtype_data = { .identifier = "imx93", }; +static const struct imx_ddr_devtype_data imx95_devtype_data = { + .identifier = "imx95", +}; + static inline bool is_imx93(struct ddr_pmu *pmu) { return pmu->devtype_data == &imx93_devtype_data; } +static inline bool is_imx95(struct ddr_pmu *pmu) +{ + return pmu->devtype_data == &imx95_devtype_data; +} + static const struct of_device_id imx_ddr_pmu_dt_ids[] = { - {.compatible = "fsl,imx93-ddr-pmu", .data = &imx93_devtype_data}, + { .compatible = "fsl,imx93-ddr-pmu", .data = &imx93_devtype_data }, + { .compatible = "fsl,imx95-ddr-pmu", .data = &imx95_devtype_data }, { /* sentinel */ } }; MODULE_DEVICE_TABLE(of, imx_ddr_pmu_dt_ids); @@ -192,6 +212,7 @@ static struct attribute *ddr_perf_events_attrs[] = { IMX9_DDR_PMU_EVENT_ATTR(ddrc_ld_wiq_7, ID(2, 71)), IMX9_DDR_PMU_EVENT_ATTR(eddrtq_pmon_empty, ID(2, 72)), IMX9_DDR_PMU_EVENT_ATTR(eddrtq_pm_rd_trans_filt, ID(2, 73)), /* imx93 specific*/ + IMX9_DDR_PMU_EVENT_ATTR(eddrtq_pm_wr_beat_filt, ID(2, 73)), /* imx95 specific*/ /* counter3 specific events */ IMX9_DDR_PMU_EVENT_ATTR(ddrc_qx_row_collision_0, ID(3, 64)), @@ -204,6 +225,7 @@ static struct attribute *ddr_perf_events_attrs[] = { IMX9_DDR_PMU_EVENT_ATTR(ddrc_qx_row_collision_7, ID(3, 71)), IMX9_DDR_PMU_EVENT_ATTR(eddrtq_pmon_full, ID(3, 72)), IMX9_DDR_PMU_EVENT_ATTR(eddrtq_pm_wr_trans_filt, ID(3, 73)), /* imx93 specific*/ + IMX9_DDR_PMU_EVENT_ATTR(eddrtq_pm_rd_beat_filt2, ID(3, 73)), /* imx95 specific*/ /* counter4 specific events */ IMX9_DDR_PMU_EVENT_ATTR(ddrc_qx_row_open_0, ID(4, 64)), @@ -216,6 +238,7 @@ static struct attribute *ddr_perf_events_attrs[] = { IMX9_DDR_PMU_EVENT_ATTR(ddrc_qx_row_open_7, ID(4, 71)), IMX9_DDR_PMU_EVENT_ATTR(eddrtq_pmon_ld_rdq2_rmw, ID(4, 72)), IMX9_DDR_PMU_EVENT_ATTR(eddrtq_pm_rd_beat_filt, ID(4, 73)), /* imx93 specific*/ + IMX9_DDR_PMU_EVENT_ATTR(eddrtq_pm_rd_beat_filt1, ID(4, 73)), /* imx95 specific*/ /* counter5 specific events */ IMX9_DDR_PMU_EVENT_ATTR(ddrc_qx_valid_start_0, ID(5, 64)), @@ -227,6 +250,7 @@ static struct attribute *ddr_perf_events_attrs[] = { IMX9_DDR_PMU_EVENT_ATTR(ddrc_qx_valid_start_6, ID(5, 70)), IMX9_DDR_PMU_EVENT_ATTR(ddrc_qx_valid_start_7, ID(5, 71)), IMX9_DDR_PMU_EVENT_ATTR(eddrtq_pmon_ld_rdq1, ID(5, 72)), + IMX9_DDR_PMU_EVENT_ATTR(eddrtq_pm_rd_beat_filt0, ID(5, 73)), /* imx95 specific*/ /* counter6 specific events */ IMX9_DDR_PMU_EVENT_ATTR(ddrc_qx_valid_end_0, ID(6, 64)), @@ -263,6 +287,13 @@ ddr_perf_events_attrs_is_visible(struct kobject *kobj, !is_imx93(ddr_pmu)) return 0; + if ((!strcmp(attr->name, "eddrtq_pm_wr_beat_filt") || + !strcmp(attr->name, "eddrtq_pm_rd_beat_filt2") || + !strcmp(attr->name, "eddrtq_pm_rd_beat_filt1") || + !strcmp(attr->name, "eddrtq_pm_rd_beat_filt0")) && + !is_imx95(ddr_pmu)) + return 0; + return attr->mode; } @@ -434,6 +465,57 @@ static void imx93_ddr_perf_monitor_config(struct ddr_pmu *pmu, int event, writel_relaxed(pmcfg2, pmu->base + PMCFG2); } +static void imx95_ddr_perf_monitor_config(struct ddr_pmu *pmu, int event, + int counter, int axi_id, int axi_mask) +{ + u32 pmcfg1, pmcfg, offset = 0; + + pmcfg1 = readl_relaxed(pmu->base + PMCFG1); + + if (event == 73) { + switch (counter) { + case 2: + pmcfg1 |= MX95_PMCFG1_WR_BEAT_FILT_EN; + offset = PMCFG3; + break; + case 3: + pmcfg1 |= MX95_PMCFG1_RD_BEAT_FILT_EN; + offset = PMCFG4; + break; + case 4: + pmcfg1 |= MX95_PMCFG1_RD_BEAT_FILT_EN; + offset = PMCFG5; + break; + case 5: + pmcfg1 |= MX95_PMCFG1_RD_BEAT_FILT_EN; + offset = PMCFG6; + break; + } + } else { + switch (counter) { + case 2: + pmcfg1 &= ~MX95_PMCFG1_WR_BEAT_FILT_EN; + break; + case 3: + case 4: + case 5: + pmcfg1 &= ~MX95_PMCFG1_RD_BEAT_FILT_EN; + break; + } + } + + writel_relaxed(pmcfg1, pmu->base + PMCFG1); + + if (offset) { + pmcfg = readl_relaxed(pmu->base + offset); + pmcfg &= ~(FIELD_PREP(MX95_PMCFG_ID_MASK, 0x3FF) | + FIELD_PREP(MX95_PMCFG_ID, 0x3FF)); + pmcfg |= (FIELD_PREP(MX95_PMCFG_ID_MASK, axi_mask) | + FIELD_PREP(MX95_PMCFG_ID, axi_id)); + writel_relaxed(pmcfg, pmu->base + offset); + } +} + static void ddr_perf_event_update(struct perf_event *event) { struct ddr_pmu *pmu = to_ddr_pmu(event->pmu); @@ -543,8 +625,13 @@ static int ddr_perf_event_add(struct perf_event *event, int flags) hwc->idx = counter; hwc->state |= PERF_HES_STOPPED; - /* read trans, write trans, read beat */ - imx93_ddr_perf_monitor_config(pmu, event_id, counter, cfg1, cfg2); + if (is_imx93(pmu)) + /* read trans, write trans, read beat */ + imx93_ddr_perf_monitor_config(pmu, event_id, counter, cfg1, cfg2); + + if (is_imx95(pmu)) + /* write beat, read beat2, read beat1, read beat */ + imx95_ddr_perf_monitor_config(pmu, event_id, counter, cfg1, cfg2); if (flags & PERF_EF_START) ddr_perf_event_start(event, flags); From patchwork Thu Mar 7 09:57:30 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Xu Yang X-Patchwork-Id: 13585323 Received: from EUR04-HE1-obe.outbound.protection.outlook.com (mail-he1eur04on2082.outbound.protection.outlook.com [40.107.7.82]) (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 E18DC12DDBF for ; Thu, 7 Mar 2024 09:58:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.7.82 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709805493; cv=fail; b=cnDxV5BILNRJkFg6TUzVYiAmz91jpjvy39JWaj75pcS+nh9hI3a4l4++whkSki+wSQ1uPQgLTJ+neHmybgZwTWTU334TmY9CM6p9uNVuihHvs85IpekcA9IK7TGrYsDGyhFhaz866UE5cH4Vfst7VJ5ZL9Xf3Cn4bkyGqh+xyAs= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709805493; c=relaxed/simple; bh=d6Lou5sZ5y+dJoA5cTibbY2QLow0ljkWSbhzNguixAo=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: Content-Type:MIME-Version; b=USMem1/n5aNQ90JPxtNF2txWasv1DW3XKF1R0hzuhOPIeyu4aoNr2nrMxJt095QTLnUG3j4Lmc8seH6L03eX1k/xuWqbcitjyekJfsZJV3bqdcOCycBTvlKshgoZ/rkD+EEUw9a1EP7yxarP4l6uTsE24ETIpcG+sJx8WmIiy2Q= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com; spf=pass smtp.mailfrom=nxp.com; dkim=pass (1024-bit key) header.d=nxp.com header.i=@nxp.com header.b=myam/1pJ; arc=fail smtp.client-ip=40.107.7.82 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=nxp.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=nxp.com header.i=@nxp.com header.b="myam/1pJ" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=gLSjOWPdMeaQRGNNuZyVSL6rcKkJ/oTc3cA2lRFOASsb7qIFQbchwFJf3nIYZWCq8Rv6oHKb7fqySVVTs2uUCPaCMCOEkPsIbX1hyCcw/ZDsHrmC0lNGDK3u1WD+2l6lED9MXLWI4utb5nvUELn3Seog92jbmeKMQxwe3ScH0qdBSY+n5Kn6XeMV3zkzjnAKR0/fP8a44i+VrQu9JehSO1eYpv/Soka9KHfRiu9yXW48o/SuG5LAyql7pK3R8JFKqsC7U6YIO41SoVKCWNw2aFCtr9kNSZIqWH0obUGJv3FoH7ch+BapqrAIPf9NEC4kGz+GCjMtEoMkCfBx+TzeJw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=a6Rjs34+eFb/L+lfs0uQCJYi/tjqVswfkJxoFAx/j1E=; b=am4ZOhcXr/q6yZosEFpteSq2e7Zu7UWfWXQ+L3SU0ky4+Wlbrk3r+Vvq4e/ahSaXH6BV+Xo4VL47MfapV6AJh53XvfJoUWCdpYFMMZ0Ab9H22G+xTPC/ZvkmbHsdQdEVdbsy/XatyeCqtLy165WtJHSgWY/ZuP6N5CxgOCeMNmT2Cl3++5CJz3H3L3wjDLNfsCeJiandbqsiulc+8jhOguUOqwHLvcroCG4906GD/zlyPvFfSEh6DB8QENLD/YhHj/Y232kkgGaXoMmzlI5ZWvXfU8Ibf2EZ709pEASSuwKIeSB5a+78tHo0X3DJ0lGsiuRS3xM4hZWewdWzwCyLXg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=a6Rjs34+eFb/L+lfs0uQCJYi/tjqVswfkJxoFAx/j1E=; b=myam/1pJWOSLa6Fg64kZWU608AX8qDTfAQVnKOaZ0Yb5P1RZGQoRVMZbRqm3ngdj/NZSylJD+mdVP2+s6ylfE39u/d73hZKN+fzXcpLPlFDLy8bleA38r1aaHUfZ6wdiqLib0LmrSWEcLgK3rCr4Tk45ItmHoNSYr6kZUohimSk= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from DU2PR04MB8822.eurprd04.prod.outlook.com (2603:10a6:10:2e1::11) by AM8PR04MB7812.eurprd04.prod.outlook.com (2603:10a6:20b:245::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7362.24; Thu, 7 Mar 2024 09:58:07 +0000 Received: from DU2PR04MB8822.eurprd04.prod.outlook.com ([fe80::d45f:4483:c11:68b0]) by DU2PR04MB8822.eurprd04.prod.outlook.com ([fe80::d45f:4483:c11:68b0%7]) with mapi id 15.20.7339.035; Thu, 7 Mar 2024 09:58:07 +0000 From: Xu Yang To: Frank.li@nxp.com, will@kernel.org, mark.rutland@arm.com, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org, shawnguo@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com, john.g.garry@oracle.com, jolsa@kernel.org, namhyung@kernel.org, irogers@google.com Cc: mike.leach@linaro.org, peterz@infradead.org, mingo@redhat.com, acme@kernel.org, alexander.shishkin@linux.intel.com, adrian.hunter@intel.com, linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org, imx@lists.linux.dev Subject: [PATCH v6 7/7] perf vendor events arm64:: Add i.MX95 DDR Performance Monitor metrics Date: Thu, 7 Mar 2024 17:57:30 +0800 Message-Id: <20240307095730.3792680-7-xu.yang_2@nxp.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240307095730.3792680-1-xu.yang_2@nxp.com> References: <20240307095730.3792680-1-xu.yang_2@nxp.com> X-ClientProxiedBy: SG2PR06CA0212.apcprd06.prod.outlook.com (2603:1096:4:68::20) To DU2PR04MB8822.eurprd04.prod.outlook.com (2603:10a6:10:2e1::11) Precedence: bulk X-Mailing-List: imx@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DU2PR04MB8822:EE_|AM8PR04MB7812:EE_ X-MS-Office365-Filtering-Correlation-Id: 1bf2f989-ebba-43b1-9260-08dc3e8d165d X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: reSqy0QqkYtb5bqUIGo/8Z4y0ModuACWYu/c+ciFxO8csBA90OewSZ1eG14enQG7ElHkcQjH7yrFS0P99R+hXtFEXT2sinxrNox6xxjWZe7mYfTf+WRByp29sszWR7wsdf/QVdz8VtOIQ2NTjrZ/KlXeu67/NBayHRlBmQNt1K2SFFUjf42A7e/bQghlYNRUziCb6njmNhb+teqqh9Z4kndCuCeNkzsEK9p6IL4ancbM8mynNAn8E2e0t7nR/5U0yOMO5zzU2UZC4n9PRQg0u46IuBDNZKGmXmDn2mWxZ1RNPovXMWKlRsrDVgCCMotYBguXaFpKrJrzIRftK5tu7o/5gIgwvlPXnPEIX7Tff6YiQH+qyR1JhixTJZOEbxwH6NldHFAtYUN6M/8wh48BCtwC3gGrHmriqlfpJ8P7lZ3ur71zDJJfsbob1nsadDRe1CRCaXKrMFBIz6M9xcLs9EkNysmewjMPhdqgnwuZHyw0bGznRjQx7Tnn0mJ0g95KCYRYrlSOXkcuBCbNWqtmIsZ6+68w7mThEf33GFJs+8tAvgqFITe5wLwhOnuQozI1qqpah/IQdnar9B5fBMDco0Xx8sh2D56AFiuetL4n3ePeiYcOzfkScV2jIiCBK2qmKMQCzKHqrJ6+NUYu6uCwWmUYkrjsCcKGQ/UETgcSGJdK1PWwpXFZFj5t08zDXw42IMve31WkbBGUl0LBYeXg0OuXpO3Qrh/cNXTIdEjNWBQ= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DU2PR04MB8822.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(376005)(921011)(38350700005);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 326X+1IK6oEiaizoichB3Yv1v8uMpDfCxJBw0Os9kG0WRX8Eu6CC93xuQ9hiAkThV2C1ZoIn6OaTcFV+llVYTieZ7E5dGKsUKcef3IPu6GUGaTYP0jZ8jmOybG59zDlkg+s0bCFf1v0VVmkTPvfQr4MvR/NKAW6ZBKqKdaZEVTD3uRKmszM4oOIFDBHXjrgKJbQqDNq2MnORneWZai3smRTl3BTLfJZavW+sD7qNcKgjJHa/J+VfSwtoesEsOgiSamaaPuT9rthdDkdkYipez8buUhAewGWquy0Qv0XaHSDGg/AiBGH49wmaW2w7S+z33YezbpZx84YFKQyDnpLquLSsrHlPNns/rJW6b6PBEyNZw3u0j3VwQ+sQoDv0t0a3gAhytp4OBBJiQTnhj/YjIcqaDiWn5fYQb0dhFolU4+kbr2wwUd0Q7WPUoZIwudj61HHV4CwusFb2+RRVh6/24l0RLYUtx0Ty8Mid9a0nLRyAj5YPVWNX4IKf5oOhxrqpF/FyWczC3YcaX6bVF6Lu5m84kVr1MUkpiIVGuXYawPmvPymv+lwTO3+AU3gKjvubhOpBx7qMCJS8ezMTq2VG2fY2P2B6AqhoUa8a+bg1R6x3E/wdZaPC3jgxGfrGo5PUm1fRnkURfpXHMNZsFswNPrJKqeP/YaUVWW6McfLRYUYRNQNBf/9+YD5+XBxPNS1G9fjBAvgsxXqkkFrXiewqv49tIo7OStq0UCzbhc3N9Tr9s6Shfli9FkIdBeVicOrBttZljSedRsNUSAvYJENmaOpkPX1dXZC7Hr8ME4/m0HH32JENWQKabFL1KLuAwUJqcRyzL/cIDR5BZEHMCoiddpTMw65WcfB9Fc6Do88pehGDxFaby2NUAoSMr3ajUeYLzgONUwBnWmKWe9KKqzNgtYmgUfImDlNxB4gVaYPu/5pPy7D/YiMW3GmDB21Paqr+2458j2ploBV4e1M/rkvG/a84ntS/d45Z7BMKvIsYHnRlWRE2/bSB9kPUQCKxMl9iZ+lOjeEag/+tz5NkVYfPuYLb8sfIqmhL+WZbQADYoRDhj66OSlhtoK55ceeY7KOjySv9q/hGNAxDgvUtlI98TLdOWyl23Q755VQ8t/Ydlb1b9gxRvOLyrADLyN4iriFv36gWvH4PT5//+iMLNO8GifZHq5TnpbRYd8XbXna4vt5zAb98r/NV+JYYDzOxeb2zeNsX6odeCmsUM++ILYZ9HRPNHOuPwNCxB7PsJ+I3YDCGOf1LDriFYe1SUshFo29ynhmBlIzOjsRKqOv52E23N3Szf8KTdrUg+UI1Pe8iDfn+v99x01LXw29IDM0GKXyIpUh1WV4e2pihbofnu1LxwrP3+LSGhYjCStU7fyJm1L0OBRnKYuvpB25xvEBfALcnOVN/fiE+Wy8OmG/iWVnNsZKwOGoZJSpIgBl68oUg69zawTtIMCGkvAH97j4PeQrpM4keAVO74HjAWx4QR3Gb/s0cyPZPYRrxSRjTx6r0sB38KFu8mpiYzYgmVKypenf+QlYXutE48GbNHDDQKhSyYWpzZKMhebLGtIbewB6MZgnw9j3R9UuscUj/h1XPCGVK X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 1bf2f989-ebba-43b1-9260-08dc3e8d165d X-MS-Exchange-CrossTenant-AuthSource: DU2PR04MB8822.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Mar 2024 09:58:06.9912 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: vslYui3shx+P//cSVFO3Bcf/pTWtKV3F02DE0KF/c0oXyJDNrKBOxJWnYlX6R5QQhNNNFSa+wuP5bkafvfY/Kw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM8PR04MB7812 Add JSON metrics for i.MX95 DDR Performance Monitor. Reviewed-by: Ian Rogers Reviewed-by: Frank Li Signed-off-by: Xu Yang --- Changes in v2: - fix wrong AXI_MASK setting - remove unnecessary metrics - add bandwidth_usage, camera_all, disp_all metrics Changes in v3: - no changes Changes in v4: - add Reviewed-by tag Changes in v5: - fix typo Changes in v6: - remove "counter=X" from each metric --- .../arch/arm64/freescale/imx95/sys/ddrc.json | 9 + .../arm64/freescale/imx95/sys/metrics.json | 778 ++++++++++++++++++ tools/perf/pmu-events/jevents.py | 1 + 3 files changed, 788 insertions(+) create mode 100644 tools/perf/pmu-events/arch/arm64/freescale/imx95/sys/ddrc.json create mode 100644 tools/perf/pmu-events/arch/arm64/freescale/imx95/sys/metrics.json diff --git a/tools/perf/pmu-events/arch/arm64/freescale/imx95/sys/ddrc.json b/tools/perf/pmu-events/arch/arm64/freescale/imx95/sys/ddrc.json new file mode 100644 index 000000000000..4dc9d2968bdc --- /dev/null +++ b/tools/perf/pmu-events/arch/arm64/freescale/imx95/sys/ddrc.json @@ -0,0 +1,9 @@ +[ + { + "BriefDescription": "ddr cycles event", + "EventCode": "0x00", + "EventName": "imx95_ddr.cycles", + "Unit": "imx9_ddr", + "Compat": "imx95" + } +] diff --git a/tools/perf/pmu-events/arch/arm64/freescale/imx95/sys/metrics.json b/tools/perf/pmu-events/arch/arm64/freescale/imx95/sys/metrics.json new file mode 100644 index 000000000000..a3ae787d448c --- /dev/null +++ b/tools/perf/pmu-events/arch/arm64/freescale/imx95/sys/metrics.json @@ -0,0 +1,778 @@ +[ + { + "BriefDescription": "bandwidth usage for lpddr5 evk board", + "MetricName": "imx95_bandwidth_usage.lpddr5", + "MetricExpr": "(( imx9_ddr0@eddrtq_pm_rd_beat_filt0\\,axi_mask\\=0x000\\,axi_id\\=0x000@ + imx9_ddr0@eddrtq_pm_wr_beat_filt\\,axi_mask\\=0x000\\,axi_id\\=0x000@ ) * 32 / duration_time) / (6400 * 1000000 * 4)", + "ScaleUnit": "1e2%", + "Unit": "imx9_ddr", + "Compat": "imx95" + }, + { + "BriefDescription": "bytes of all masters read from ddr", + "MetricName": "imx95_ddr_read.all", + "MetricExpr": "( imx9_ddr0@eddrtq_pm_rd_beat_filt0\\,axi_mask\\=0x000\\,axi_id\\=0x000@ ) * 32", + "ScaleUnit": "9.765625e-4KB", + "Unit": "imx9_ddr", + "Compat": "imx95" + }, + { + "BriefDescription": "bytes of all masters write to ddr", + "MetricName": "imx95_ddr_write.all", + "MetricExpr": "( imx9_ddr0@eddrtq_pm_wr_beat_filt\\,axi_mask\\=0x000\\,axi_id\\=0x000@ ) * 32", + "ScaleUnit": "9.765625e-4KB", + "Unit": "imx9_ddr", + "Compat": "imx95" + }, + { + "BriefDescription": "bytes of all a55 read from ddr", + "MetricName": "imx95_ddr_read.a55_all", + "MetricExpr": "( imx9_ddr0@eddrtq_pm_rd_beat_filt0\\,axi_mask\\=0x3fc\\,axi_id\\=0x000@ + imx9_ddr0@eddrtq_pm_rd_beat_filt1\\,axi_mask\\=0x3fe\\,axi_id\\=0x004@ ) * 32", + "ScaleUnit": "9.765625e-4KB", + "Unit": "imx9_ddr", + "Compat": "imx95" + }, + { + "BriefDescription": "bytes of all a55 write to ddr (part1)", + "MetricName": "imx95_ddr_write.a55_all_1", + "MetricExpr": "( imx9_ddr0@eddrtq_pm_wr_beat_filt\\,axi_mask\\=0x3fc\\,axi_id\\=0x000@ ) * 32", + "ScaleUnit": "9.765625e-4KB", + "Unit": "imx9_ddr", + "Compat": "imx95" + }, + { + "BriefDescription": "bytes of all a55 write to ddr (part2)", + "MetricName": "imx95_ddr_write.a55_all_2", + "MetricExpr": "( imx9_ddr0@eddrtq_pm_wr_beat_filt\\,axi_mask\\=0x3fe\\,axi_id\\=0x004@ ) * 32", + "ScaleUnit": "9.765625e-4KB", + "Unit": "imx9_ddr", + "Compat": "imx95" + }, + { + "BriefDescription": "bytes of a55 core 0 read from ddr", + "MetricName": "imx95_ddr_read.a55_0", + "MetricExpr": "( imx9_ddr0@eddrtq_pm_rd_beat_filt0\\,axi_mask\\=0x3ff\\,axi_id\\=0x000@ ) * 32", + "ScaleUnit": "9.765625e-4KB", + "Unit": "imx9_ddr", + "Compat": "imx95" + }, + { + "BriefDescription": "bytes of a55 core 0 write to ddr", + "MetricName": "imx95_ddr_write.a55_0", + "MetricExpr": "( imx9_ddr0@eddrtq_pm_wr_beat_filt\\,axi_mask\\=0x3ff\\,axi_id\\=0x000@ ) * 32", + "ScaleUnit": "9.765625e-4KB", + "Unit": "imx9_ddr", + "Compat": "imx95" + }, + { + "BriefDescription": "bytes of a55 core 1 read from ddr", + "MetricName": "imx95_ddr_read.a55_1", + "MetricExpr": "( imx9_ddr0@eddrtq_pm_rd_beat_filt1\\,axi_mask\\=0x00f\\,axi_id\\=0x001@ ) * 32", + "ScaleUnit": "9.765625e-4KB", + "Unit": "imx9_ddr", + "Compat": "imx95" + }, + { + "BriefDescription": "bytes of a55 core 1 write to ddr", + "MetricName": "imx95_ddr_write.a55_1", + "MetricExpr": "( imx9_ddr0@eddrtq_pm_wr_beat_filt\\,axi_mask\\=0x00f\\,axi_id\\=0x001@ ) * 32", + "ScaleUnit": "9.765625e-4KB", + "Unit": "imx9_ddr", + "Compat": "imx95" + }, + { + "BriefDescription": "bytes of a55 core 2 read from ddr", + "MetricName": "imx95_ddr_read.a55_2", + "MetricExpr": "( imx9_ddr0@eddrtq_pm_rd_beat_filt2\\,axi_mask\\=0x00f\\,axi_id\\=0x002@ ) * 32", + "ScaleUnit": "9.765625e-4KB", + "Unit": "imx9_ddr", + "Compat": "imx95" + }, + { + "BriefDescription": "bytes of a55 core 2 write to ddr", + "MetricName": "imx95_ddr_write.a55_2", + "MetricExpr": "( imx9_ddr0@eddrtq_pm_wr_beat_filt\\,axi_mask\\=0x00f\\,axi_id\\=0x002@ ) * 32", + "ScaleUnit": "9.765625e-4KB", + "Unit": "imx9_ddr", + "Compat": "imx95" + }, + { + "BriefDescription": "bytes of a55 core 3 read from ddr", + "MetricName": "imx95_ddr_read.a55_3", + "MetricExpr": "( imx9_ddr0@eddrtq_pm_rd_beat_filt0\\,axi_mask\\=0x00f\\,axi_id\\=0x003@ ) * 32", + "ScaleUnit": "9.765625e-4KB", + "Unit": "imx9_ddr", + "Compat": "imx95" + }, + { + "BriefDescription": "bytes of a55 core 3 write to ddr", + "MetricName": "imx95_ddr_write.a55_3", + "MetricExpr": "( imx9_ddr0@eddrtq_pm_wr_beat_filt\\,axi_mask\\=0x00f\\,axi_id\\=0x003@ ) * 32", + "ScaleUnit": "9.765625e-4KB", + "Unit": "imx9_ddr", + "Compat": "imx95" + }, + { + "BriefDescription": "bytes of a55 core 4 read from ddr", + "MetricName": "imx95_ddr_read.a55_4", + "MetricExpr": "( imx9_ddr0@eddrtq_pm_rd_beat_filt1\\,axi_mask\\=0x00f\\,axi_id\\=0x004@ ) * 32", + "ScaleUnit": "9.765625e-4KB", + "Unit": "imx9_ddr", + "Compat": "imx95" + }, + { + "BriefDescription": "bytes of a55 core 4 write to ddr", + "MetricName": "imx95_ddr_write.a55_4", + "MetricExpr": "( imx9_ddr0@eddrtq_pm_wr_beat_filt\\,axi_mask\\=0x00f\\,axi_id\\=0x004@ ) * 32", + "ScaleUnit": "9.765625e-4KB", + "Unit": "imx9_ddr", + "Compat": "imx95" + }, + { + "BriefDescription": "bytes of a55 core 5 read from ddr", + "MetricName": "imx95_ddr_read.a55_5", + "MetricExpr": "( imx9_ddr0@eddrtq_pm_rd_beat_filt2\\,axi_mask\\=0x00f\\,axi_id\\=0x005@ ) * 32", + "ScaleUnit": "9.765625e-4KB", + "Unit": "imx9_ddr", + "Compat": "imx95" + }, + { + "BriefDescription": "bytes of a55 core 5 write to ddr", + "MetricName": "imx95_ddr_write.a55_5", + "MetricExpr": "( imx9_ddr0@eddrtq_pm_wr_beat_filt\\,axi_mask\\=0x00f\\,axi_id\\=0x005@ ) * 32", + "ScaleUnit": "9.765625e-4KB", + "Unit": "imx9_ddr", + "Compat": "imx95" + }, + { + "BriefDescription": "bytes of Cortex-A DSU L3 evicted/ACP transactions read from ddr", + "MetricName": "imx95_ddr_read.cortexa_dsu_l3", + "MetricExpr": "( imx9_ddr0@eddrtq_pm_rd_beat_filt0\\,axi_mask\\=0x00f\\,axi_id\\=0x007@ ) * 32", + "ScaleUnit": "9.765625e-4KB", + "Unit": "imx9_ddr", + "Compat": "imx95" + }, + { + "BriefDescription": "bytes of Cortex-A DSU L3 evicted/ACP transactions write to ddr", + "MetricName": "imx95_ddr_write.cortexa_dsu_l3", + "MetricExpr": "( imx9_ddr0@eddrtq_pm_wr_beat_filt\\,axi_mask\\=0x00f\\,axi_id\\=0x007@ ) * 32", + "ScaleUnit": "9.765625e-4KB", + "Unit": "imx9_ddr", + "Compat": "imx95" + }, + { + "BriefDescription": "bytes of m33 read from ddr", + "MetricName": "imx95_ddr_read.m33", + "MetricExpr": "( imx9_ddr0@eddrtq_pm_rd_beat_filt0\\,axi_mask\\=0x00f\\,axi_id\\=0x008@ ) * 32", + "ScaleUnit": "9.765625e-4KB", + "Unit": "imx9_ddr", + "Compat": "imx95" + }, + { + "BriefDescription": "bytes of m33 write to ddr", + "MetricName": "imx95_ddr_write.m33", + "MetricExpr": "( imx9_ddr0@eddrtq_pm_wr_beat_filt\\,axi_mask\\=0x00f\\,axi_id\\=0x008@ ) * 32", + "ScaleUnit": "9.765625e-4KB", + "Unit": "imx9_ddr", + "Compat": "imx95" + }, + { + "BriefDescription": "bytes of m7 read from ddr", + "MetricName": "imx95_ddr_read.m7", + "MetricExpr": "( imx9_ddr0@eddrtq_pm_rd_beat_filt1\\,axi_mask\\=0x00f\\,axi_id\\=0x009@ ) * 32", + "ScaleUnit": "9.765625e-4KB", + "Unit": "imx9_ddr", + "Compat": "imx95" + }, + { + "BriefDescription": "bytes of m7 write to ddr", + "MetricName": "imx95_ddr_write.m7", + "MetricExpr": "( imx9_ddr0@eddrtq_pm_wr_beat_filt\\,axi_mask\\=0x00f\\,axi_id\\=0x009@ ) * 32", + "ScaleUnit": "9.765625e-4KB", + "Unit": "imx9_ddr", + "Compat": "imx95" + }, + { + "BriefDescription": "bytes of sentinel read from ddr", + "MetricName": "imx95_ddr_read.sentinel", + "MetricExpr": "( imx9_ddr0@eddrtq_pm_rd_beat_filt2\\,axi_mask\\=0x00f\\,axi_id\\=0x00a@ ) * 32", + "ScaleUnit": "9.765625e-4KB", + "Unit": "imx9_ddr", + "Compat": "imx95" + }, + { + "BriefDescription": "bytes of sentinel write to ddr", + "MetricName": "imx95_ddr_write.sentinel", + "MetricExpr": "( imx9_ddr0@eddrtq_pm_wr_beat_filt\\,axi_mask\\=0x00f\\,axi_id\\=0x00a@ ) * 32", + "ScaleUnit": "9.765625e-4KB", + "Unit": "imx9_ddr", + "Compat": "imx95" + }, + { + "BriefDescription": "bytes of edma1 read from ddr", + "MetricName": "imx95_ddr_read.edma1", + "MetricExpr": "( imx9_ddr0@eddrtq_pm_rd_beat_filt0\\,axi_mask\\=0x00f\\,axi_id\\=0x00b@ ) * 32", + "ScaleUnit": "9.765625e-4KB", + "Unit": "imx9_ddr", + "Compat": "imx95" + }, + { + "BriefDescription": "bytes of edma1 write to ddr", + "MetricName": "imx95_ddr_write.edma1", + "MetricExpr": "( imx9_ddr0@eddrtq_pm_wr_beat_filt\\,axi_mask\\=0x00f\\,axi_id\\=0x00b@ ) * 32", + "ScaleUnit": "9.765625e-4KB", + "Unit": "imx9_ddr", + "Compat": "imx95" + }, + { + "BriefDescription": "bytes of edma2 read from ddr", + "MetricName": "imx95_ddr_read.edma2", + "MetricExpr": "( imx9_ddr0@eddrtq_pm_rd_beat_filt1\\,axi_mask\\=0x00f\\,axi_id\\=0x00c@ ) * 32", + "ScaleUnit": "9.765625e-4KB", + "Unit": "imx9_ddr", + "Compat": "imx95" + }, + { + "BriefDescription": "bytes of edma2 write to ddr", + "MetricName": "imx95_ddr_write.edma2", + "MetricExpr": "( imx9_ddr0@eddrtq_pm_wr_beat_filt\\,axi_mask\\=0x00f\\,axi_id\\=0x00c@ ) * 32", + "ScaleUnit": "9.765625e-4KB", + "Unit": "imx9_ddr", + "Compat": "imx95" + }, + { + "BriefDescription": "bytes of netc read from ddr", + "MetricName": "imx95_ddr_read.netc", + "MetricExpr": "( imx9_ddr0@eddrtq_pm_rd_beat_filt2\\,axi_mask\\=0x00f\\,axi_id\\=0x00d@ ) * 32", + "ScaleUnit": "9.765625e-4KB", + "Unit": "imx9_ddr", + "Compat": "imx95" + }, + { + "BriefDescription": "bytes of netc write to ddr", + "MetricName": "imx95_ddr_write.netc", + "MetricExpr": "( imx9_ddr0@eddrtq_pm_wr_beat_filt\\,axi_mask\\=0x00f\\,axi_id\\=0x00d@ ) * 32", + "ScaleUnit": "9.765625e-4KB", + "Unit": "imx9_ddr", + "Compat": "imx95" + }, + { + "BriefDescription": "bytes of npu read from ddr", + "MetricName": "imx95_ddr_read.npu", + "MetricExpr": "( imx9_ddr0@eddrtq_pm_rd_beat_filt0\\,axi_mask\\=0x3f0\\,axi_id\\=0x010@ ) * 32", + "ScaleUnit": "9.765625e-4KB", + "Unit": "imx9_ddr", + "Compat": "imx95" + }, + { + "BriefDescription": "bytes of npu write to ddr", + "MetricName": "imx95_ddr_write.npu", + "MetricExpr": "( imx9_ddr0@eddrtq_pm_wr_beat_filt\\,axi_mask\\=0x3f0\\,axi_id\\=0x010@ ) * 32", + "ScaleUnit": "9.765625e-4KB", + "Unit": "imx9_ddr", + "Compat": "imx95" + }, + { + "BriefDescription": "bytes of gpu read from ddr", + "MetricName": "imx95_ddr_read.gpu", + "MetricExpr": "( imx9_ddr0@eddrtq_pm_rd_beat_filt1\\,axi_mask\\=0x3f0\\,axi_id\\=0x020@ ) * 32", + "ScaleUnit": "9.765625e-4KB", + "Unit": "imx9_ddr", + "Compat": "imx95" + }, + { + "BriefDescription": "bytes of gpu write to ddr", + "MetricName": "imx95_ddr_write.gpu", + "MetricExpr": "( imx9_ddr0@eddrtq_pm_wr_beat_filt\\,axi_mask\\=0x3f0\\,axi_id\\=0x020@ ) * 32", + "ScaleUnit": "9.765625e-4KB", + "Unit": "imx9_ddr", + "Compat": "imx95" + }, + { + "BriefDescription": "bytes of usdhc1 read from ddr", + "MetricName": "imx95_ddr_read.usdhc1", + "MetricExpr": "( imx9_ddr0@eddrtq_pm_rd_beat_filt2\\,axi_mask\\=0x3f0\\,axi_id\\=0x0b0@ ) * 32", + "ScaleUnit": "9.765625e-4KB", + "Unit": "imx9_ddr", + "Compat": "imx95" + }, + { + "BriefDescription": "bytes of usdhc1 write to ddr", + "MetricName": "imx95_ddr_write.usdhc1", + "MetricExpr": "( imx9_ddr0@eddrtq_pm_wr_beat_filt\\,axi_mask\\=0x3f0\\,axi_id\\=0x0b0@ ) * 32", + "ScaleUnit": "9.765625e-4KB", + "Unit": "imx9_ddr", + "Compat": "imx95" + }, + { + "BriefDescription": "bytes of usdhc2 read from ddr", + "MetricName": "imx95_ddr_read.usdhc2", + "MetricExpr": "( imx9_ddr0@eddrtq_pm_rd_beat_filt0\\,axi_mask\\=0x3f0\\,axi_id\\=0x0c0@ ) * 32", + "ScaleUnit": "9.765625e-4KB", + "Unit": "imx9_ddr", + "Compat": "imx95" + }, + { + "BriefDescription": "bytes of usdhc2 write to ddr", + "MetricName": "imx95_ddr_write.usdhc2", + "MetricExpr": "( imx9_ddr0@eddrtq_pm_wr_beat_filt\\,axi_mask\\=0x3f0\\,axi_id\\=0x0c0@ ) * 32", + "ScaleUnit": "9.765625e-4KB", + "Unit": "imx9_ddr", + "Compat": "imx95" + }, + { + "BriefDescription": "bytes of usdhc3 read from ddr", + "MetricName": "imx95_ddr_read.usdhc3", + "MetricExpr": "( imx9_ddr0@eddrtq_pm_rd_beat_filt1\\,axi_mask\\=0x3f0\\,axi_id\\=0x0d0@ ) * 32", + "ScaleUnit": "9.765625e-4KB", + "Unit": "imx9_ddr", + "Compat": "imx95" + }, + { + "BriefDescription": "bytes of usdhc3 write to ddr", + "MetricName": "imx95_ddr_write.usdhc3", + "MetricExpr": "( imx9_ddr0@eddrtq_pm_wr_beat_filt\\,axi_mask\\=0x3f0\\,axi_id\\=0x0d0@ ) * 32", + "ScaleUnit": "9.765625e-4KB", + "Unit": "imx9_ddr", + "Compat": "imx95" + }, + { + "BriefDescription": "bytes of xspi read from ddr", + "MetricName": "imx95_ddr_read.xspi", + "MetricExpr": "( imx9_ddr0@eddrtq_pm_rd_beat_filt2\\,axi_mask\\=0x3f0\\,axi_id\\=0x0f0@ ) * 32", + "ScaleUnit": "9.765625e-4KB", + "Unit": "imx9_ddr", + "Compat": "imx95" + }, + { + "BriefDescription": "bytes of xspi write to ddr", + "MetricName": "imx95_ddr_write.xspi", + "MetricExpr": "( imx9_ddr0@eddrtq_pm_wr_beat_filt\\,axi_mask\\=0x3f0\\,axi_id\\=0x0f0@ ) * 32", + "ScaleUnit": "9.765625e-4KB", + "Unit": "imx9_ddr", + "Compat": "imx95" + }, + { + "BriefDescription": "bytes of pcie1 read from ddr", + "MetricName": "imx95_ddr_read.pcie1", + "MetricExpr": "( imx9_ddr0@eddrtq_pm_rd_beat_filt0\\,axi_mask\\=0x3f0\\,axi_id\\=0x100@ ) * 32", + "ScaleUnit": "9.765625e-4KB", + "Unit": "imx9_ddr", + "Compat": "imx95" + }, + { + "BriefDescription": "bytes of pcie1 write to ddr", + "MetricName": "imx95_ddr_write.pcie1", + "MetricExpr": "( imx9_ddr0@eddrtq_pm_wr_beat_filt\\,axi_mask\\=0x3f0\\,axi_id\\=0x100@ ) * 32", + "ScaleUnit": "9.765625e-4KB", + "Unit": "imx9_ddr", + "Compat": "imx95" + }, + { + "BriefDescription": "bytes of pcie2 read from ddr", + "MetricName": "imx95_ddr_read.pcie2", + "MetricExpr": "( imx9_ddr0@eddrtq_pm_rd_beat_filt1\\,axi_mask\\=0x00f\\,axi_id\\=0x006@ ) * 32", + "ScaleUnit": "9.765625e-4KB", + "Unit": "imx9_ddr", + "Compat": "imx95" + }, + { + "BriefDescription": "bytes of pcie2 write to ddr", + "MetricName": "imx95_ddr_write.pcie2", + "MetricExpr": "( imx9_ddr0@eddrtq_pm_wr_beat_filt\\,axi_mask\\=0x00f\\,axi_id\\=0x006@ ) * 32", + "ScaleUnit": "9.765625e-4KB", + "Unit": "imx9_ddr", + "Compat": "imx95" + }, + { + "BriefDescription": "bytes of pcie3 read from ddr", + "MetricName": "imx95_ddr_read.pcie3", + "MetricExpr": "( imx9_ddr0@eddrtq_pm_rd_beat_filt2\\,axi_mask\\=0x3f0\\,axi_id\\=0x120@ ) * 32", + "ScaleUnit": "9.765625e-4KB", + "Unit": "imx9_ddr", + "Compat": "imx95" + }, + { + "BriefDescription": "bytes of pcie3 write to ddr", + "MetricName": "imx95_ddr_write.pcie3", + "MetricExpr": "( imx9_ddr0@eddrtq_pm_wr_beat_filt\\,axi_mask\\=0x3f0\\,axi_id\\=0x120@ ) * 32", + "ScaleUnit": "9.765625e-4KB", + "Unit": "imx9_ddr", + "Compat": "imx95" + }, + { + "BriefDescription": "bytes of pcie4 read from ddr", + "MetricName": "imx95_ddr_read.pcie4", + "MetricExpr": "( imx9_ddr0@eddrtq_pm_rd_beat_filt0\\,axi_mask\\=0x3f0\\,axi_id\\=0x130@ ) * 32", + "ScaleUnit": "9.765625e-4KB", + "Unit": "imx9_ddr", + "Compat": "imx95" + }, + { + "BriefDescription": "bytes of pcie4 write to ddr", + "MetricName": "imx95_ddr_write.pcie4", + "MetricExpr": "( imx9_ddr0@eddrtq_pm_wr_beat_filt\\,axi_mask\\=0x3f0\\,axi_id\\=0x130@ ) * 32", + "ScaleUnit": "9.765625e-4KB", + "Unit": "imx9_ddr", + "Compat": "imx95" + }, + { + "BriefDescription": "bytes of usb1 read from ddr", + "MetricName": "imx95_ddr_read.usb1", + "MetricExpr": "( imx9_ddr0@eddrtq_pm_rd_beat_filt1\\,axi_mask\\=0x3f0\\,axi_id\\=0x140@ ) * 32", + "ScaleUnit": "9.765625e-4KB", + "Unit": "imx9_ddr", + "Compat": "imx95" + }, + { + "BriefDescription": "bytes of usb1 write to ddr", + "MetricName": "imx95_ddr_write.usb1", + "MetricExpr": "( imx9_ddr0@eddrtq_pm_wr_beat_filt\\,axi_mask\\=0x3f0\\,axi_id\\=0x140@ ) * 32", + "ScaleUnit": "9.765625e-4KB", + "Unit": "imx9_ddr", + "Compat": "imx95" + }, + { + "BriefDescription": "bytes of usb2 read from ddr", + "MetricName": "imx95_ddr_read.usb2", + "MetricExpr": "( imx9_ddr0@eddrtq_pm_rd_beat_filt2\\,axi_mask\\=0x3f0\\,axi_id\\=0x150@ ) * 32", + "ScaleUnit": "9.765625e-4KB", + "Unit": "imx9_ddr", + "Compat": "imx95" + }, + { + "BriefDescription": "bytes of usb2 write to ddr", + "MetricName": "imx95_ddr_write.usb2", + "MetricExpr": "( imx9_ddr0@eddrtq_pm_wr_beat_filt\\,axi_mask\\=0x3f0\\,axi_id\\=0x150@ ) * 32", + "ScaleUnit": "9.765625e-4KB", + "Unit": "imx9_ddr", + "Compat": "imx95" + }, + { + "BriefDescription": "bytes of vpu codec primary bus read from ddr", + "MetricName": "imx95_ddr_read.vpu_primy", + "MetricExpr": "( imx9_ddr0@eddrtq_pm_rd_beat_filt0\\,axi_mask\\=0x3f0\\,axi_id\\=0x180@ ) * 32", + "ScaleUnit": "9.765625e-4KB", + "Unit": "imx9_ddr", + "Compat": "imx95" + }, + { + "BriefDescription": "bytes of vpu codec primary bus write to ddr", + "MetricName": "imx95_ddr_write.vpu_primy", + "MetricExpr": "( imx9_ddr0@eddrtq_pm_wr_beat_filt\\,axi_mask\\=0x3f0\\,axi_id\\=0x180@ ) * 32", + "ScaleUnit": "9.765625e-4KB", + "Unit": "imx9_ddr", + "Compat": "imx95" + }, + { + "BriefDescription": "bytes of vpu codec secondary bus read from ddr", + "MetricName": "imx95_ddr_read.vpu_secndy", + "MetricExpr": "( imx9_ddr0@eddrtq_pm_rd_beat_filt1\\,axi_mask\\=0x3f0\\,axi_id\\=0x190@ ) * 32", + "ScaleUnit": "9.765625e-4KB", + "Unit": "imx9_ddr", + "Compat": "imx95" + }, + { + "BriefDescription": "bytes of vpu codec secondary bus write to ddr", + "MetricName": "imx95_ddr_write.vpu_secndy", + "MetricExpr": "( imx9_ddr0@eddrtq_pm_wr_beat_filt\\,axi_mask\\=0x3f0\\,axi_id\\=0x190@ ) * 32", + "ScaleUnit": "9.765625e-4KB", + "Unit": "imx9_ddr", + "Compat": "imx95" + }, + { + "BriefDescription": "bytes of jpeg decoder read from ddr", + "MetricName": "imx95_ddr_read.jpeg_dec", + "MetricExpr": "( imx9_ddr0@eddrtq_pm_rd_beat_filt2\\,axi_mask\\=0x3f0\\,axi_id\\=0x1a0@ ) * 32", + "ScaleUnit": "9.765625e-4KB", + "Unit": "imx9_ddr", + "Compat": "imx95" + }, + { + "BriefDescription": "bytes of jpeg decoder write to ddr", + "MetricName": "imx95_ddr_write.jpeg_dec", + "MetricExpr": "( imx9_ddr0@eddrtq_pm_wr_beat_filt\\,axi_mask\\=0x3f0\\,axi_id\\=0x1a0@ ) * 32", + "ScaleUnit": "9.765625e-4KB", + "Unit": "imx9_ddr", + "Compat": "imx95" + }, + { + "BriefDescription": "bytes of jpeg encoder read from ddr", + "MetricName": "imx95_ddr_read.jpeg_dec", + "MetricExpr": "( imx9_ddr0@eddrtq_pm_rd_beat_filt0\\,axi_mask\\=0x3f0\\,axi_id\\=0x1b0@ ) * 32", + "ScaleUnit": "9.765625e-4KB", + "Unit": "imx9_ddr", + "Compat": "imx95" + }, + { + "BriefDescription": "bytes of jpeg encoder write to ddr", + "MetricName": "imx95_ddr_write.jpeg_enc", + "MetricExpr": "( imx9_ddr0@eddrtq_pm_wr_beat_filt\\,axi_mask\\=0x3f0\\,axi_id\\=0x1b0@ ) * 32", + "ScaleUnit": "9.765625e-4KB", + "Unit": "imx9_ddr", + "Compat": "imx95" + }, + { + "BriefDescription": "bytes of all vpu submodules read from ddr", + "MetricName": "imx95_ddr_read.vpu_all", + "MetricExpr": "( imx9_ddr0@eddrtq_pm_rd_beat_filt1\\,axi_mask\\=0x380\\,axi_id\\=0x180@ ) * 32", + "ScaleUnit": "9.765625e-4KB", + "Unit": "imx9_ddr", + "Compat": "imx95" + }, + { + "BriefDescription": "bytes of all vpu submodules write to ddr", + "MetricName": "imx95_ddr_write.vpu_all", + "MetricExpr": "( imx9_ddr0@eddrtq_pm_wr_beat_filt\\,axi_mask\\=0x380\\,axi_id\\=0x180@ ) * 32", + "ScaleUnit": "9.765625e-4KB", + "Unit": "imx9_ddr", + "Compat": "imx95" + }, + { + "BriefDescription": "bytes of cortex m0+ read from ddr", + "MetricName": "imx95_ddr_read.m0", + "MetricExpr": "( imx9_ddr0@eddrtq_pm_rd_beat_filt2\\,axi_mask\\=0x3f0\\,axi_id\\=0x200@ ) * 32", + "ScaleUnit": "9.765625e-4KB", + "Unit": "imx9_ddr", + "Compat": "imx95" + }, + { + "BriefDescription": "bytes of cortex m0+ write to ddr", + "MetricName": "imx95_ddr_write.m0", + "MetricExpr": "( imx9_ddr0@eddrtq_pm_wr_beat_filt\\,axi_mask\\=0x3f0\\,axi_id\\=0x200@ ) * 32", + "ScaleUnit": "9.765625e-4KB", + "Unit": "imx9_ddr", + "Compat": "imx95" + }, + { + "BriefDescription": "bytes of camera edma read from ddr", + "MetricName": "imx95_ddr_read.camera_edma", + "MetricExpr": "( imx9_ddr0@eddrtq_pm_rd_beat_filt0\\,axi_mask\\=0x3f0\\,axi_id\\=0x210@ ) * 32", + "ScaleUnit": "9.765625e-4KB", + "Unit": "imx9_ddr", + "Compat": "imx95" + }, + { + "BriefDescription": "bytes of camera edma write to ddr", + "MetricName": "imx95_ddr_write.camera_edma", + "MetricExpr": "( imx9_ddr0@eddrtq_pm_wr_beat_filt\\,axi_mask\\=0x3f0\\,axi_id\\=0x210@ ) * 32", + "ScaleUnit": "9.765625e-4KB", + "Unit": "imx9_ddr", + "Compat": "imx95" + }, + { + "BriefDescription": "bytes of isi rd read from ddr", + "MetricName": "imx95_ddr_read.isi_rd", + "MetricExpr": "( imx9_ddr0@eddrtq_pm_rd_beat_filt1\\,axi_mask\\=0x3f0\\,axi_id\\=0x220@ ) * 32", + "ScaleUnit": "9.765625e-4KB", + "Unit": "imx9_ddr", + "Compat": "imx95" + }, + { + "BriefDescription": "bytes of isi rd write to ddr", + "MetricName": "imx95_ddr_write.isi_rd", + "MetricExpr": "( imx9_ddr0@eddrtq_pm_wr_beat_filt\\,axi_mask\\=0x3f0\\,axi_id\\=0x220@ ) * 32", + "ScaleUnit": "9.765625e-4KB", + "Unit": "imx9_ddr", + "Compat": "imx95" + }, + { + "BriefDescription": "bytes of isi wr y read from ddr", + "MetricName": "imx95_ddr_read.isi_wr_y", + "MetricExpr": "( imx9_ddr0@eddrtq_pm_rd_beat_filt2\\,axi_mask\\=0x3f0\\,axi_id\\=0x230@ ) * 32", + "ScaleUnit": "9.765625e-4KB", + "Unit": "imx9_ddr", + "Compat": "imx95" + }, + { + "BriefDescription": "bytes of isi wr y write to ddr", + "MetricName": "imx95_ddr_write.isi_wr_y", + "MetricExpr": "( imx9_ddr0@eddrtq_pm_wr_beat_filt\\,axi_mask\\=0x3f0\\,axi_id\\=0x230@ ) * 32", + "ScaleUnit": "9.765625e-4KB", + "Unit": "imx9_ddr", + "Compat": "imx95" + }, + { + "BriefDescription": "bytes of isi wr u read from ddr", + "MetricName": "imx95_ddr_read.isi_wr_u", + "MetricExpr": "( imx9_ddr0@eddrtq_pm_rd_beat_filt0\\,axi_mask\\=0x3f0\\,axi_id\\=0x240@ ) * 32", + "ScaleUnit": "9.765625e-4KB", + "Unit": "imx9_ddr", + "Compat": "imx95" + }, + { + "BriefDescription": "bytes of isi wr u write to ddr", + "MetricName": "imx95_ddr_write.isi_wr_u", + "MetricExpr": "( imx9_ddr0@eddrtq_pm_wr_beat_filt\\,axi_mask\\=0x3f0\\,axi_id\\=0x240@ ) * 32", + "ScaleUnit": "9.765625e-4KB", + "Unit": "imx9_ddr", + "Compat": "imx95" + }, + { + "BriefDescription": "bytes of isi wr v read from ddr", + "MetricName": "imx95_ddr_read.isi_wr_v", + "MetricExpr": "( imx9_ddr0@eddrtq_pm_rd_beat_filt1\\,axi_mask\\=0x3f0\\,axi_id\\=0x250@ ) * 32", + "ScaleUnit": "9.765625e-4KB", + "Unit": "imx9_ddr", + "Compat": "imx95" + }, + { + "BriefDescription": "bytes of isi wr v write to ddr", + "MetricName": "imx95_ddr_write.isi_wr_v", + "MetricExpr": "( imx9_ddr0@eddrtq_pm_wr_beat_filt\\,axi_mask\\=0x3f0\\,axi_id\\=0x250@ ) * 32", + "ScaleUnit": "9.765625e-4KB", + "Unit": "imx9_ddr", + "Compat": "imx95" + }, + { + "BriefDescription": "bytes of isp input dma1 read from ddr", + "MetricName": "imx95_ddr_read.isp_in_dma1", + "MetricExpr": "( imx9_ddr0@eddrtq_pm_rd_beat_filt2\\,axi_mask\\=0x3f0\\,axi_id\\=0x260@ ) * 32", + "ScaleUnit": "9.765625e-4KB", + "Unit": "imx9_ddr", + "Compat": "imx95" + }, + { + "BriefDescription": "bytes of isp input dma1 write to ddr", + "MetricName": "imx95_ddr_write.isp_in_dma1", + "MetricExpr": "( imx9_ddr0@eddrtq_pm_wr_beat_filt\\,axi_mask\\=0x3f0\\,axi_id\\=0x260@ ) * 32", + "ScaleUnit": "9.765625e-4KB", + "Unit": "imx9_ddr", + "Compat": "imx95" + }, + { + "BriefDescription": "bytes of isp input dma2 read from ddr", + "MetricName": "imx95_ddr_read.isp_in_dma2", + "MetricExpr": "( imx9_ddr0@eddrtq_pm_rd_beat_filt0\\,axi_mask\\=0x3f0\\,axi_id\\=0x270@ ) * 32", + "ScaleUnit": "9.765625e-4KB", + "Unit": "imx9_ddr", + "Compat": "imx95" + }, + { + "BriefDescription": "bytes of isp input dma2 write to ddr", + "MetricName": "imx95_ddr_write.isp_in_dma2", + "MetricExpr": "( imx9_ddr0@eddrtq_pm_wr_beat_filt\\,axi_mask\\=0x3f0\\,axi_id\\=0x270@ ) * 32", + "ScaleUnit": "9.765625e-4KB", + "Unit": "imx9_ddr", + "Compat": "imx95" + }, + { + "BriefDescription": "bytes of isp output dma1 read from ddr", + "MetricName": "imx95_ddr_read.isp_out_dma1", + "MetricExpr": "( imx9_ddr0@eddrtq_pm_rd_beat_filt1\\,axi_mask\\=0x3f0\\,axi_id\\=0x280@ ) * 32", + "ScaleUnit": "9.765625e-4KB", + "Unit": "imx9_ddr", + "Compat": "imx95" + }, + { + "BriefDescription": "bytes of isp output dma1 write to ddr", + "MetricName": "imx95_ddr_write.isp_out_dma1", + "MetricExpr": "( imx9_ddr0@eddrtq_pm_wr_beat_filt\\,axi_mask\\=0x3f0\\,axi_id\\=0x280@ ) * 32", + "ScaleUnit": "9.765625e-4KB", + "Unit": "imx9_ddr", + "Compat": "imx95" + }, + { + "BriefDescription": "bytes of isp output dma2 read from ddr", + "MetricName": "imx95_ddr_read.isp_out_dma2", + "MetricExpr": "( imx9_ddr0@eddrtq_pm_rd_beat_filt2\\,axi_mask\\=0x3f0\\,axi_id\\=0x290@ ) * 32", + "ScaleUnit": "9.765625e-4KB", + "Unit": "imx9_ddr", + "Compat": "imx95" + }, + { + "BriefDescription": "bytes of isp output dma2 write to ddr", + "MetricName": "imx95_ddr_write.isp_out_dma2", + "MetricExpr": "( imx9_ddr0@eddrtq_pm_wr_beat_filt\\,axi_mask\\=0x3f0\\,axi_id\\=0x290@ ) * 32", + "ScaleUnit": "9.765625e-4KB", + "Unit": "imx9_ddr", + "Compat": "imx95" + }, + { + "BriefDescription": "bytes of all camera submodules read from ddr", + "MetricName": "imx95_ddr_read.camera_all", + "MetricExpr": "( imx9_ddr0@eddrtq_pm_rd_beat_filt0\\,axi_mask\\=0x380\\,axi_id\\=0x200@ + imx9_ddr0@eddrtq_pm_rd_beat_filt1\\,axi_mask\\=0x3f0\\,axi_id\\=0x280@ + imx9_ddr0@eddrtq_pm_rd_beat_filt2\\,axi_mask\\=0x3f0\\,axi_id\\=0x290@ ) * 32", + "ScaleUnit": "9.765625e-4KB", + "Unit": "imx9_ddr", + "Compat": "imx95" + }, + { + "BriefDescription": "bytes of all camera submodules write to ddr (part1)", + "MetricName": "imx95_ddr_write.camera_all_1", + "MetricExpr": "( imx9_ddr0@eddrtq_pm_wr_beat_filt\\,axi_mask\\=0x380\\,axi_id\\=0x200@ ) * 32", + "ScaleUnit": "9.765625e-4KB", + "Unit": "imx9_ddr", + "Compat": "imx95" + }, + { + "BriefDescription": "bytes of all camera submodules write to ddr (part2)", + "MetricName": "imx95_ddr_write.camera_all_2", + "MetricExpr": "( imx9_ddr0@eddrtq_pm_wr_beat_filt\\,axi_mask\\=0x3f0\\,axi_id\\=0x280@ ) * 32", + "ScaleUnit": "9.765625e-4KB", + "Unit": "imx9_ddr", + "Compat": "imx95" + }, + { + "BriefDescription": "bytes of all camera submodules write to ddr (part3)", + "MetricName": "imx95_ddr_write.camera_all_3", + "MetricExpr": "( imx9_ddr0@eddrtq_pm_wr_beat_filt\\,axi_mask\\=0x3f0\\,axi_id\\=0x290@ ) * 32", + "ScaleUnit": "9.765625e-4KB", + "Unit": "imx9_ddr", + "Compat": "imx95" + }, + { + "BriefDescription": "bytes of display blitter store read from ddr", + "MetricName": "imx95_ddr_read.disp_blit", + "MetricExpr": "( imx9_ddr0@eddrtq_pm_rd_beat_filt0\\,axi_mask\\=0x3f0\\,axi_id\\=0x2a0@ ) * 32", + "ScaleUnit": "9.765625e-4KB", + "Unit": "imx9_ddr", + "Compat": "imx95" + }, + { + "BriefDescription": "bytes of display blitter write to ddr", + "MetricName": "imx95_ddr_write.disp_blit", + "MetricExpr": "( imx9_ddr0@eddrtq_pm_wr_beat_filt\\,axi_mask\\=0x3f0\\,axi_id\\=0x2a0@ ) * 32", + "ScaleUnit": "9.765625e-4KB", + "Unit": "imx9_ddr", + "Compat": "imx95" + }, + { + "BriefDescription": "bytes of display command sequencer read from ddr", + "MetricName": "imx95_ddr_read.disp_cmd", + "MetricExpr": "( imx9_ddr0@eddrtq_pm_rd_beat_filt1\\,axi_mask\\=0x3f0\\,axi_id\\=0x2b0@ ) * 32", + "ScaleUnit": "9.765625e-4KB", + "Unit": "imx9_ddr", + "Compat": "imx95" + }, + { + "BriefDescription": "bytes of display command sequencer write to ddr", + "MetricName": "imx95_ddr_write.disp_cmd", + "MetricExpr": "( imx9_ddr0@eddrtq_pm_wr_beat_filt\\,axi_mask\\=0x3f0\\,axi_id\\=0x2b0@ ) * 32", + "ScaleUnit": "9.765625e-4KB", + "Unit": "imx9_ddr", + "Compat": "imx95" + }, + { + "BriefDescription": "bytes of all display submodules read from ddr", + "MetricName": "imx95_ddr_read.disp_all", + "MetricExpr": "( imx9_ddr0@eddrtq_pm_rd_beat_filt0\\,axi_mask\\=0x300\\,axi_id\\=0x300@ + imx9_ddr0@eddrtq_pm_rd_beat_filt1\\,axi_mask\\=0x3a0\\,axi_id\\=0x2a0@ ) * 32", + "ScaleUnit": "9.765625e-4KB", + "Unit": "imx9_ddr", + "Compat": "imx95" + }, + { + "BriefDescription": "bytes of all display submodules write to ddr (part1)", + "MetricName": "imx95_ddr_write.disp_all_1", + "MetricExpr": "( imx9_ddr0@eddrtq_pm_wr_beat_filt\\,axi_mask\\=0x300\\,axi_id\\=0x300@ ) * 32", + "ScaleUnit": "9.765625e-4KB", + "Unit": "imx9_ddr", + "Compat": "imx95" + }, + { + "BriefDescription": "bytes of all display submodules write to ddr (part2)", + "MetricName": "imx95_ddr_write.disp_all_2", + "MetricExpr": "( imx9_ddr0@eddrtq_pm_wr_beat_filt\\,axi_mask\\=0x3a0\\,axi_id\\=0x2a0@ ) * 32", + "ScaleUnit": "9.765625e-4KB", + "Unit": "imx9_ddr", + "Compat": "imx95" + } +] diff --git a/tools/perf/pmu-events/jevents.py b/tools/perf/pmu-events/jevents.py index 53ab050c8fa4..be4b541a0820 100755 --- a/tools/perf/pmu-events/jevents.py +++ b/tools/perf/pmu-events/jevents.py @@ -284,6 +284,7 @@ class JsonEvent: 'hisi_sccl,hha': 'hisi_sccl,hha', 'hisi_sccl,l3c': 'hisi_sccl,l3c', 'imx8_ddr': 'imx8_ddr', + 'imx9_ddr': 'imx9_ddr', 'L3PMC': 'amd_l3', 'DFPMC': 'amd_df', 'UMCPMC': 'amd_umc',