From patchwork Fri Mar 15 09:55:48 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Xu Yang X-Patchwork-Id: 13593214 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id BD26EC54E6A for ; Fri, 15 Mar 2024 09:56:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=DYFaEjE5lFzvtjQ8p8TDy3D2gjKuKMgy+CAlBGPNH7A=; b=1B18d6jEicV2/f FVzr4TB9/b5K71PWq0d6njlPpxApOML4r97PBxbvn7tUqdIGjXecu7zujV896n3lwRn1rBHFxJzjK dYEONqYqiwxDWNhHv6cQcQTTiCSLDSDgtbhv11nyUseEag7b8zW2+FIK4pos8jZbtkvQmNZ1DBtpb G1iPa/dA/e/o6OMTQY9sfatWgUBjuN9B1SQN8oynBmmk2ubmpcl9ApSyjrEaDEMzxditxrbj4aXym CRh2veQgTx/rR64iYuaK1NWXAEv4B7f0fW1BLTyZGeac+ulhOifGA4FJDhxWnRVNqBP79k/q0X3yt oC8FHQVWU5wEBXX9epnQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rl4I7-0000000HML1-2YU4; Fri, 15 Mar 2024 09:55:55 +0000 Received: from mail-am0eur02on20601.outbound.protection.outlook.com ([2a01:111:f403:2606::601] helo=EUR02-AM0-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rl4I5-0000000HMJl-0Qbn for linux-arm-kernel@lists.infradead.org; Fri, 15 Mar 2024 09:55:54 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=a2FtWEs1YU5xv5sVZUvLvus2/thJDD1Xu5g7tQnQp8fEff9uHkn1Y4uJFUvdWRwqdQvu5VsfUZd3k1vo2qyyRoGDcr+ci9Ahwi/Lxc9XmNXd9iQ9Dj+NYIK2KGtuVwDVTLOQ4J84iDHzYbZRCsTP/pFf5rPzA1ydjrzo6o7Hqa//eS8dEFeXDTRqnDKx1gLzNP8jXBCVeIldZJLUEoCRoDzaF16WS2EnhiFZqHI3MMvmO0SnCwjjm/XZ/rdERjz2WPYKOJqhQc/xo1HLuVzDlXS0D5kyeV5I/HHgpebIwH+dM6xz5I/e2pT6lrqs4AHOdbgw7864TbQX+VdTS8u82A== 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=kgsMBGpxw/x1YGOlm4/rebrMq8R5J7h2s1WZSu6Tl24=; b=HviQfT5pFG/cPtMpM+5oC302QAXyWwCeHiZTtNqUFv6RCvroFqgrvNl7OEJDcc2Bj+WmSSOD1igRprFSI1+16bQ1qXteI7fRYm8FF5VXuGD7istMaEHXQ/c+k5ZrpKvqqBhWwrhPMx9vdLJ9fei3bQThsd7oacLbTqq4cNd6XC2whlZCM9eS+TafsrnUS+dXDO0Dji4GWWfMXVDWpqX8jSZG1aKnyVchhT4y2xWPoPCsD4bvXtHLt9saDNdGIBa9ZnrhfvVDexghOOCsN7G0B8Ri8BRICBXZhLZgbrUAERpzivrcUzkFj1goGidtglHTRPjGjGnsYONmtmfHcpqlfQ== 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=kgsMBGpxw/x1YGOlm4/rebrMq8R5J7h2s1WZSu6Tl24=; b=iMVlylM/oAvpu+iPHXsOOFOCCHLiiWvryDPMWEDH4G7vq/1ALap1YuIzUVvaZs/oEacpSSnVVCE5TvLYgdG1sZni+UXUMZnvT3BV+8aSkBuYf3DW63gS56u3q13oP6lEg8kCth9A8gbkZ37cHsstb762OXxxuw0gWZUbPNrCuMk= 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 AM8PR04MB7444.eurprd04.prod.outlook.com (2603:10a6:20b:1de::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7362.35; Fri, 15 Mar 2024 09:55:43 +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.7386.021; Fri, 15 Mar 2024 09:55:42 +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 v7 1/8] dt-bindings: perf: fsl-imx-ddr: Add i.MX95 compatible Date: Fri, 15 Mar 2024 17:55:48 +0800 Message-Id: <20240315095555.2628684-1-xu.yang_2@nxp.com> X-Mailer: git-send-email 2.34.1 X-ClientProxiedBy: SI2PR02CA0029.apcprd02.prod.outlook.com (2603:1096:4:195::6) To DU2PR04MB8822.eurprd04.prod.outlook.com (2603:10a6:10:2e1::11) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DU2PR04MB8822:EE_|AM8PR04MB7444:EE_ X-MS-Office365-Filtering-Correlation-Id: 686ec677-5c92-4c22-30ed-08dc44d613b7 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: OqLQqnq+Ia0UCDG9O9Qk1fS8Bau8I8V0iEbECBefRlpSAogsqAEaE2xyt47sj5vqpnsR3fJ9QgeM5c41i07F7EzYvHVaNakpq89eWoaxUpzl/Iv1yyPXNF3JnsR07I8S5gQJN+B9/yrbOOZom8PN1iyn2dpjgnwULs3JtTSr6TfLxzK2tN+m8pzTwmAtp4wVz3Gk6TPxJJUoA8C/ySgWZ0YQVULFBvLdiUuLcmrTTGr3/3c07EC2ZzMFYyjClmLdKitJKFrgRNbsarUX8wf+L1CffkWdzT4kTukOPpdboxIhla+BJE9fKpeW8L8sYB/ST+m+RYjdYgkEt4bvBWaTGtbnlADCzTiE1tebU9/64HOspzQze5VAJhZNnEP07nSvr55tPmEVnBUCSZMmzOXxZcy9bQjkyp4UaF7e/l7iTvnci3gxs7fuuhDwSXjW5urtzpKhHbqpZKqoHtf3I+J0p13Qd1+lNDKInIzpkRIX9/y95rw0q1LCm6gSEOJR+E/1HS44O61d12yjtoYMA0l364cowPRlsP6oqQX/xrFivLjNQ/jkB3P9Gw8PRRHj9IVX8Vro6kjKKc7VsdffMzTwDbYyZf6HIoC1D54Cr2XjY9JTjgWEymmO/7Kum6Iayafs9MppRh39rel9Hg/IgBMJip1ClMRwIKygFD5dAZZxH+J4uC6Kh6aEngF5QA5iagICCXQ0eOw9mL+2T2v4IByAB2+f9E6zKsNX2H+BwTuGr10= 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)(366007)(1800799015)(376005)(7416005)(52116005)(921011)(38350700005);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: VO0+x0WnqUpWLEpKgiVFTQVED54iL23ENXvVlh/CipDgpsCcQK8ge0xQjA0yuOx7m1wMBADPkUzIk3c9CvViFAt7npa2KfEowed0+vw8xDN4AbSaFPrDimefg+h8081ggq9CUfXswAPoNlSvAqLcNWu2a3abn3yHWpnqde6PCBkPAWtBSrbkU7+APCxBa66dRzsF1nFvXt9QoHq9t8WeHKBA08vlQd5J+LwFED984nJEmHZGnPBbFUhH74yJZuLEhy5MA3pDhYzVR7dfW6m9hUX9N9Y0pRnKANE9iz0yOeLpFe/Xaq99WGCxVIdERErJDgcJEBi60x5WB5wKPBG7E51jArLbp+hOBF/WGXOGte3Hr8AnBiCzrrBOhDJjz/vFsa/bPQlsJ7MFXhcAbD7BXYXSSH2OSdycD3HKkjqTv6cY39I3H7XX3iwcrW/rOJ4zzyk02J21ikzCdmiZ4WHTzEm68VxQUXCuhzgejXZl8j3hwJzlan0PRotxHS/OZrEcxzR7ZGXd9l4qhiFn9ug56QfAr4dzTrgYAyBLDwBQJkdvp9ayefbplVfTlCZYo+1VPxjq825BqdGq4fmUlbbnO2xzW0Rb8rAX7oiv57Aj+LZsUmjsvoOox2CEswkeFtWNKhOu/taePtzc9AN4r/NA8qX9jK6VKEApk4zt3Ir+h0VkNIW35KI6VVqE5d/Mv7sJqK7mVJM6T/YI4xH+LugIX2VjzH029DvsUYOBhBO4yG5bYOZvgqIn9x4t/8ZkhdH1kRs2byy5NVsLcWxu+wwa4iODp8P9TVvIS6h7x3pkM7gPLyhZREu8kieJcsxsYQ9IP5i1/U9OjHDvC+gWOoE2VEw1Q2zUpGj557A+CwHAvfjgBjKrGO+js6qHHYORgsxo9yVe57VhYmoLIcYn6e8syiolQH32guFmqhk/knTlFISZ+fH5VyhmdOfynPhuU8QCCXblE8fAZNDav3mRVP+tBtr4RTsk8oCGiaL1EX7MyygvMI7muphXkjhdJXu5xiZNzHmLrXY/9A3bYXtxCReTGaAehszdeMsqgYX37JzCnMBKqgrZPIne+HJISW1L7yUUpmsPXAlxegf4d6MQC4m3EI6IUA3B7nJaiUSnNRJ64bxLYxRv8xzBA/QOCXWkH4O0FcsnXdfL8NAS4ufrAoR4JHapDYHozdKw6g2hVlMznpfVOi5ACtyOAKthzmFO2cGOdMGuGSvU8bUbTGGhp2g4D/496dPuV9xDrOn8dVofKc5HFslF0gRv2+Njz45346V4pcN5+nFg1OIgCV2Kqr8nztBirR6pTRbPsV4ibd+Zh4Gbb51DfotozstP8f29Tmkblqe8Obr1Q2byU3pq9ppUknXoL9EAYmdbdsTWbHCqrEXzJFegbbObVRGM1+g3iizkKcqjIhv7Ao2ak4Xsi4lDtj+8n/drAk1VUBcjUXsPkH8TAOyfKLbYHiC+BmSoW+kl8cOnAbZqZudnD3v/daD+f3OZucGhvfMdb41B5JhY9lyYg0LbSayjBmWYSgmk4FF88Hou3hBmsg5ltqJPddMIKihL0fehFJ4fGyQq/yVcd1RkLApmd494Wu4UnUljvmc+ X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 686ec677-5c92-4c22-30ed-08dc44d613b7 X-MS-Exchange-CrossTenant-AuthSource: DU2PR04MB8822.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Mar 2024 09:55:42.7308 (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: lnvrpAuGoxtnJw194zutb1hZxcFM9OhYWPmJ+puDojrhg3CXCeh7CoQQSpFwilcqc3yZ3iILqmUuLdT8kp6IMQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM8PR04MB7444 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240315_025553_196793_5E2359AC X-CRM114-Status: UNSURE ( 8.91 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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 Changes in v7: - no changes --- Documentation/devicetree/bindings/perf/fsl-imx-ddr.yaml | 3 +++ 1 file changed, 3 insertions(+) -- 2.34.1 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 Fri Mar 15 09:55:49 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Xu Yang X-Patchwork-Id: 13593215 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id F18FAC54E69 for ; Fri, 15 Mar 2024 09:56:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=5Qbj9QvWR/DswOaxqset8JExfy2gAGhmwr15iqBuF+I=; b=nscwXMCoU2DO6T aL30n1/+LtgKZIBJvcs0wnqdMIuMbAUfk9bZokRlnkpUGVGZ0I7b790WBxVnt7oIJa8c8ii4KhVSr nOB6obvld5qZ40pCqH+6ULlptVgKJWfUDbminYC16kFlRLG+xKOHxcXADVg1GaHgH3dVHmJiy2ups dZUYr/Wldc/oxbd3DQwPAHirxBvnY4rxL/1M2kpleOhDqDdLL7www5WGecMZLan9E/OshLVcnA2eR CnJWavgMLzhMetphysOKbx5F6QMxbs2aKbIpM4JilYidPGO7L/hXlmLaofMiyJfV3MCLr1nia7PTu KxdtgLe59T0bLhd+YBrw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rl4IC-0000000HMMJ-05q0; Fri, 15 Mar 2024 09:56:00 +0000 Received: from mail-am0eur02on20601.outbound.protection.outlook.com ([2a01:111:f403:2606::601] helo=EUR02-AM0-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rl4I6-0000000HMJl-3OSO for linux-arm-kernel@lists.infradead.org; Fri, 15 Mar 2024 09:55:56 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=HMXWdP2xWON1q/KdZDU6mMrV+fmHGlUk5AtsRKwi4Gcec+HDrlp+IG9HesoQ7j+XbzAbBwcc4zav9THh33/ccyfju5Elaxwou73L8U/jqi1Qwp0jEiT6HfaKUNqiqpSqGIcWkoPhJOCUc6/OdmtBx8qzNQvKdUU+SMgNUS0X4xcSiAGg2DaKASrj/c5IGp3GTiFYesNqjrJ+K4fWAIkiWfqEMgUOU4iDsWbIt8EsJOFW5PPe3jVYPLtFKTbjD3vDvTQG6WmITx2bVzzyf/Soa2ki7IvHz+lyFdwOXsxEYoZK2076X60ahWkYUUxvytg9yPCRellxvCFdev186H0mGw== 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=C3xAxYC+/aeGs5NJwA07UrLuN8aKHuBTbTuCS4th7bM=; b=dRB4bw4gS8A/KzQ/eDg6TaJ3SEK9skNuk+dfAJWkbhpjqQsrDDEOeqeBk+HID5/zgVUbdFuo9LpCNHr1VnB45uGMvrHj5tr5We2+BG/4sDbZ8lI26YP9jiYbMuUBoaDPDxYdDiJwO8deZMO8PVEpgXeo4CYsGq7xc1zj9r86tXb4emtyaso2i1whOIs6WQDt/FUxLlOUp4MhdXO2SMEUeSgVVMLkZ723LYXCsot0Fp+zY+H1a27NDKQ+wunHtLAc/SFysl/Xh43IQsKahPDgkb4T70KCU0ZZ78IW1cfVLdMgqPd7hKJ2p5fvPc9Y6mQzuLFITVmjUkp4mAIQ9kgP6g== 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=C3xAxYC+/aeGs5NJwA07UrLuN8aKHuBTbTuCS4th7bM=; b=AiraP94uPTGrC5Ms89xCq6qulMwJ6ko3iNP6mdnTns40KICp37dhu6fVkx8CTTKnS4dHIb/aOfcFtPJIJQOAasQJvCn5I+ow64HIoWxb4g6VqgzBltCuA7PHKUvGMIRnvyGh70lYudahBJNo0mW0JpdNSUQBJFwJMhCBJuRJZpk= 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 AM8PR04MB7444.eurprd04.prod.outlook.com (2603:10a6:20b:1de::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7362.35; Fri, 15 Mar 2024 09:55:49 +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.7386.021; Fri, 15 Mar 2024 09:55:49 +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 v7 2/8] perf: imx_perf: add macro definitions for parsing config attr Date: Fri, 15 Mar 2024 17:55:49 +0800 Message-Id: <20240315095555.2628684-2-xu.yang_2@nxp.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240315095555.2628684-1-xu.yang_2@nxp.com> References: <20240315095555.2628684-1-xu.yang_2@nxp.com> X-ClientProxiedBy: SI2PR02CA0029.apcprd02.prod.outlook.com (2603:1096:4:195::6) To DU2PR04MB8822.eurprd04.prod.outlook.com (2603:10a6:10:2e1::11) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DU2PR04MB8822:EE_|AM8PR04MB7444:EE_ X-MS-Office365-Filtering-Correlation-Id: 50b38113-092d-495f-81b0-08dc44d61804 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: n7mHdb1U+0C2j71aqWByc/2az1dQgKMoWIi+wPsjnBEbqn/xWe/5rdtSus2+M8rk1EbKsBFXm5HBAnlO/imq+fRJpX7h8h0tK451JVuSOBRg5mFpCKCPpWnKGOCfmCmqVz2OaBImygirPL0kuvbmRR/ONWJRYZorBoQh3iqaGfGULQUADwADpalHjejYXvMZ/9YHmRG/yunPjPdVjsLhxwhmJvB5PyURtzCEfLUEW7wNaD5JvKS0c33j7RDnUF9xD6NxgYtvXutC8i5UeGJXSC43YIIsg6WLamC/6cK+j2x4lZw1bfFis4oRjUhy0ilKdLhESrcHgKG8tUNmeDPUxDvMxURe1FWIyhnkHdJbRqVqUgjKY4orQthDxkC8IKOTOSeRf2Sl7G6Uz2c8NY5b2AJda/gL52lTffsXpBt6Q/hCKGF7v8V6pGjnXxYvTJD8GKfPGPDoQ9nolNjR2AqG5I3TeGiqd4qJoFVOLRhmHeSJDSGIt7ayr7UbRzsVMkEFf/5SToc+iDJoH3fEIZTLcJxWaz1hmKiDN+n3Cmv6oGfy7LhKdmbRXJMv13nnenN2ButXFUYghe+0UdbKvJyM712t+agvF2CaQNzRIER8UYUVREzNbt5bu1S0r9Z/SKOYuaegxHluueUnqMWKsX8/q51CNhSiYvZ5T0AFBX6Cz7qppAVUgCu2OydiWH6Fk6g27KnFwK1KqUw4+c/RVZrHCry3jM2W+yn6wf4L6bgy078= 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)(366007)(1800799015)(376005)(7416005)(52116005)(921011)(38350700005);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: Sd1n1wBIRsOyzoaHSOMU0+iZ1bRWrRxfUhzD9KApY2wBzhEG32Q7U8jVFmsN+IMi9v88xgMTRTmtKr89axHSpN7/XjzprvLvtbwRRV+KRtyolP1Pk73/F46dP+3yYCxvsgK3eeWM4sRNUfHRWdMQ/sdnMerqGj9mckibSVxdsKG19DpiyyXdgPrgIMTH8BuG8yk02O9gb/idS6O+BOu4H8klZS6g7TDF78sjamnaITnrj2WbG3jzN3F0PK4sww4SU9KA7g7X8od5KytWqiuuRCRLTliYwpQKhqRCpKNg38qe9IjYFBxqwqMly8qHiaqVR48FXSZURNFx/N7z9JRmgXmaqtBCPHuZGd0iS91/fhn11vsBxPGkZheUOvCRH9zsdged4yVtWlb1fw5SiIQmHVsI+hNe+uh60X6Jl6UvU//FMa5IePEDMNC9yX9s/Fd9jVcOZor2IsUiPpZx1CFKkqH51rVuIKCqMbpLyUUuI6inuVQ/4MPPX6eQ5fGUcrZ6BuGwEwQsMtAfwv1EHLcfDTs3IrfW9fKOrbEJhwLX8AGboa9m1rd7jzULiPgt2E0WDQuBB+aiNpJh1dHbDUjBTFVEIobaRm9xcuaUrYofuKjJ3RGHfYc6H+BVE/fNY8B3UA1xv3emyqS9VO8/fBuSh4qjy+I3fi2diz+Ox4aUdU+xpN+kMIoACB2VmCdaaYwiSy4AhzQ/au16eyRAAHP9ht0qU3b6r6k7ub9kVy3BphYqjRl2yBZeFJHFZpNPkznBPa3z26s+c9DJBzAaAq7pR3YTUUnHLHNXw1hLoO87az69IqsJS7gknUcuOVvTRrPsOKLkKDmKxpmImkY7k4f9Kk/HOyqT+tuPS0KQMCjm/POYmr3CZ78yhDN76GiRjp8BL0gRFG1UDoSqNWIgXsDgdy34u7VEdpdp6hZRpWucZ6Ad0xcK7J25BfWNJrU8zFZCAwDa1u11OVHAse6moIjOVSSsIqzdE9XwwE3K9FF79tC+CYK6+f3VQ6nxQzCTEkrvRa1xL1sD20I1FLf9AwpayzdttX8coK4weSN/ozz3lDJAZJ5p1lwrZnY0073SYNryKS9bQf+nM+N+bWXXzefKpC1KtiFlsYEfzI8fP7IyZlbQ5LEv5hjHTEsN9x/5PZVAUCMSn+mQeicddMTLlg4WORawvzC80IaXq8MbVIGYd+7uuYFMf3E5YxcJB7BBQtU7Lma5VtWekj4xGCjUAmWPy1QWU+Q2RU3gf7IC4C7RNRipnOOhDV2YK4oRDKQ2YSm8yhLqQEYvURmmMNcyCcwjrLjbB/2C0eTiQff/9nq0jsIquHtBRkGEDey/93d6/h//olBqZGmuK2pDhA1CvmVCmzzq4Y0EFsGhV8XA7QvO0reSp9SekwuDbMFdO3KEmYV0TRUS0RymNmvK0ryipNhJq3rx2xoL2mcpRnpmqKQg4DJekmBVbps9GFLR78R+mDLCmj8USS8GwlTZaIwtD4bsPspr6ArV8a4a3IE976TIMw4JTbpgQFfdQjEJ/NJZlkWyXqpOxTg499LQSwAGuGQmOZv8dOHB4rx18nRSDY7ghDhQBqgw60JqvTElaCEVJS8x X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 50b38113-092d-495f-81b0-08dc44d61804 X-MS-Exchange-CrossTenant-AuthSource: DU2PR04MB8822.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Mar 2024 09:55:49.8222 (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: f8+c5RGySY6UaoLoe7L9VbI7Vzok9gWyODTcqV7ZGfEMppJxvxGz/p6kpmxfQk0CC+dfHcbe092PvURsyAnqLg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM8PR04MB7444 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240315_025554_884628_DF478DBE X-CRM114-Status: GOOD ( 14.02 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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 Reviewed-by: Frank Li --- Changes in v4: - new patch Changes in v5: - move this patch earlier Changes in v6: - no changes Changes in v7: - use FIELD_* --- drivers/perf/fsl_imx9_ddr_perf.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/drivers/perf/fsl_imx9_ddr_perf.c b/drivers/perf/fsl_imx9_ddr_perf.c index 9685645bfe04..4ec70775d1f0 100644 --- a/drivers/perf/fsl_imx9_ddr_perf.c +++ b/drivers/perf/fsl_imx9_ddr_perf.c @@ -42,6 +42,9 @@ #define NUM_COUNTERS 11 #define CYCLES_COUNTER 0 +#define CONFIG_EVENT GENMASK(7, 0) +#define CONFIG_COUNTER GENMASK(15, 8) + #define to_ddr_pmu(p) container_of(p, struct ddr_pmu, pmu) #define DDR_PERF_DEV_NAME "imx9_ddr" @@ -339,8 +342,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 = FIELD_GET(CONFIG_EVENT, config); if (enable) { ctrl_a |= PMLCA_FC; @@ -352,7 +357,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 +371,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 = FIELD_GET(CONFIG_EVENT, cfg); + counter = FIELD_GET(CONFIG_COUNTER, cfg); pmcfg1 = readl_relaxed(pmu->base + PMCFG1); @@ -469,7 +474,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 = FIELD_GET(CONFIG_COUNTER, cfg); pmu->events[counter] = event; pmu->active_events++; From patchwork Fri Mar 15 09:55:50 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Xu Yang X-Patchwork-Id: 13593216 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 278DEC54E58 for ; Fri, 15 Mar 2024 09:56:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=+Ug1Z96lJPGRDjFi70DSV9j/xfo/xXpL7M5KOYt87P0=; b=I7R/QRb1HoWiH5 vsZh+NmzaOcrjamRRnDNE5bvChkV3Gl8LUWZOfaDgCkmgITAfN35ALImTo78mzrPaCGjI1O4Aarlp 5ASSpJhjOXJ0jnokURQfclUCr8A+inYnedP2vJaVZ472Kxj/D4MHu9Tkr3iU9xCjINAx/1R3j3MDq euNC2Q//Wok9VhO8aEFkakFolBU9jaiV4UOWhzed2Su+z5uUr4tF445hrG2k3gtN+PIT0tz+RhAK7 xdmOyke+bS3C+KsjBAes2SoLsoiF9qEr1cKPcFMHldNPvPB1pXGTq3CHcVaIum1wJTWghbOdVONhS 7BcKqKwr3pydFtogazGQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rl4IJ-0000000HMPu-0qqN; Fri, 15 Mar 2024 09:56:07 +0000 Received: from mail-vi1eur05on20600.outbound.protection.outlook.com ([2a01:111:f403:2613::600] helo=EUR05-VI1-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rl4IF-0000000HMMy-2fVf for linux-arm-kernel@lists.infradead.org; Fri, 15 Mar 2024 09:56:06 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Zv3jiU47P9L/yiTQqybb6tmwMKjbL/rlIodLpXuDGMFKr+eSA/Mp2wUABw2c0fwwwBaftrS1++0VoSUcX1i8hGbDVvG45KGgmKnYrAwM+Squhr67KoZP7tNNZtEmT6PJz9rc3oP2cJvs9hE7y/QEzPEMFrTxHBlLiZyM9ObBBwdb4lpQV0KMhxtUUPLZHGhZYHg5fBDZkGdrg+DoTEv/Cnry7PAKI//KbjFPW23puNqiqt1WBlBB2rmMtd77wT8klB7CRlUWUtLU+jWRnt77j5T0k7YvYJB+ZnUp4HaLr8eE6vENv1h1aSASoTvIT5u99lexTrsx/kQoLHFqmrDTEQ== 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=ffTZDzbMFHQIg3K3oeKZ2q6kpHrWK2hPLvIiKWHN970=; b=d3Tqr50ftQSzLd3yMGvd0xVHhZ+gcXUiWtt/hCrv0fRKjSEMIttct2GOii57H7LqC9YAWx9NHlPcignnjqCGcVohcDc+odtY4OcboPWgRGT20MHN4Lfrhu40lrmvE7K1Oox35aDejMOBF8MCtAwjsBpQGDEaW2h0Bw84GEzRu4hMFFi/4m5wSH6Kzqx/Cy8mEkHMBy789YYZZOjYnFOJ5MnRalTWBwhzekPTqA0PLJkdWf+Z3JHg8IFb96d1sZbuJCMIiif3DGi0jkNVYWHEHCBMlNg1uEGOajvde5wwQHP5cwsOx0iyU6eOSKOTxILfW87s3KBA6Hb5isnWcIVkTA== 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=ffTZDzbMFHQIg3K3oeKZ2q6kpHrWK2hPLvIiKWHN970=; b=F7mNGyQVdmFLEnDRk4Y6CReOwQP7XAbitLDCQyJRo8sJukYnycsTmgZGCzFH/J/ELCBVPfXqr1uV4BTCjZfCca479NLLjAh3U6qOOtH8cmD4oaUlby4Ov0CnsYeUrTHI6wBFWpByyL+KuhJvEUlwfa7ob+AZAsB+mYIkCvCmpUE= 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 AM8PR04MB7444.eurprd04.prod.outlook.com (2603:10a6:20b:1de::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7362.35; Fri, 15 Mar 2024 09:55:57 +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.7386.021; Fri, 15 Mar 2024 09:55:57 +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 v7 3/8] perf: imx_perf: let the driver manage the counter usage rather the user Date: Fri, 15 Mar 2024 17:55:50 +0800 Message-Id: <20240315095555.2628684-3-xu.yang_2@nxp.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240315095555.2628684-1-xu.yang_2@nxp.com> References: <20240315095555.2628684-1-xu.yang_2@nxp.com> X-ClientProxiedBy: SI2PR02CA0029.apcprd02.prod.outlook.com (2603:1096:4:195::6) To DU2PR04MB8822.eurprd04.prod.outlook.com (2603:10a6:10:2e1::11) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DU2PR04MB8822:EE_|AM8PR04MB7444:EE_ X-MS-Office365-Filtering-Correlation-Id: ec50a88d-7398-4416-e670-08dc44d61c3f X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: mkZIq9qoTPYobUMcAQjMD0pSnoSW/zJ7UestCuDgDwoHaSPAoKFwFAYIeKsVLdbBKJJ8BJVT1L5QBqf0pAwBXWJIXfAfGsfr0UbU0NSetZA6z63CokHCTIFY6OeX61h2yvjpZGgTD2yxMoGXrLuGHG3Y8nXehq430E6565NgQxhSAJLvUkKOF40JOPenY1/5rDiNrFGK8/GXQYG2nPdenggY6ZnMf2C9XD4Ip1neFd+4jYYSKIBWCb4fe4kgzO+xLKmwDzcNSBvXcy+CfqB1ZQ9fy7syf1au95XrWORe0aBLoEwdAqwbzoFsyDtRP96PA3y7P5isKaaLtYgnK7q+p0Zx0MYiNheV5R5I7uxe5Nn2YqomjOXEomG5vZN8SIAretuE0mH8tZ7S92/TMFzOxZwL8kg8YgAFXkMu5RPx1js2cYqhMUbBR2WK+gWMMD+JxgUxWYm1HSYrkwwQIfmVbjHuCfdef9o3TEMbThlspp+9qFTIDXZIcovJc3D4FUXwCHzbeZ2WwaiNjOgTtO5lyKJ82sW0G40486Ie7OsDjlB2gVQNeFXi8HwIl3548yw+NDhkMS6TAncT1FkfvXOD+edV5a0S8q1EEzbUfgBDEMsPSGuDoBmfxN/I21AqXFQ42wwDdNzuZfY155jJUiROPJasxG+JzDs6K6kS2ghBKrhRZciHn9Lbu2cBEp+6Ebpr96lo1KAsdOuOOZ2wiLBoj3/kdY7rnPNIWDHxj2ULRNE= 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)(366007)(1800799015)(376005)(7416005)(52116005)(921011)(38350700005);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: grLNbizSy5xWR57bf5Ic6O3QzDD5ZjDqp1QpPD7PXfGOOHZveoHpJxgqzyT0In0wCr9ZJqAxYRRxykJtGjv6kxDXEhuNDsQKvbz8iMFwHlAvFmd6R9cEiohuU7zcCsqUe6C4uJpIlw1NFvZbPH/ZWR8dqi/mKXVJgzI9mpGgtFxT1PZVPnvlanRNhClEPrRg4flSie/x+8LsUvv1lCzWue3wMjpW014Ht7eWBFnlsYa8Q0kFlRPv7eDliVQa4UgoMPUROppFPqahKIyWwfIV+Dhml9A6MJQP1na9jgec9fURR6E9/l7xsL627/9b72XEBhmE5NClizz/BPNdBRJCrtV4AS0p3y1JCCfrVkzEYwzap93F1d0fh+bGEjIf6zB6YgQFqQCyBXZRMoaUdLE2S28++m6Q2PTrze71/1YgUGvmZgVYbZ/S3IwkMV23/FzvFRvWw9RYe5ERmo3bUQZOLzp3YAlS0fO54f3Hen6qeRnFV0wTkgWqnbqFbGisxt5C3MCvPAtGwiVqIMEeLvCq9e6Zqg0Od+up0II4TvWpXTQFL7COhRQIAvvF6iZab54FkNmHn1mHblORRGd4ntBc8f91dGS2WtUh4E8mSn3e8qF8yMsq39EtCofIjhqQXJ4kzwfmlv2fKtxrBOMoE3zs8sjFXz7xjfWe9RXCc2Lu7UPOMHsEOAABlZL0tIu70DaBpxZSxzaRl/Eb2RBgXCh0cFL75wky7j2UZ3k9v441U5BmbPGV6xlKQpJhgjG3IrXsKlOQ4DCVhSDlELVIypZwZnTIY0K3OWAHiXSuyHe7YpOq8KG+6ItBkPue9QkC26ZTN+1kamsKSDyVC886mxfZGKJYhugnGVf1eSq+5hltu5xBM5IVw3Kj6ANa2SNduwT8LDLaedd5EtHhUD9pLQrZ23vFZNek5JC79h63t74Gq9IRawCNM9QVfZZ/xb4Ha6e2zpOfqddQ3YXBJ2h6rtzUdN4xP+m23IGkjP+x77zFbZFozfgBS3Bzj0nDUjiIJdGQjKOQgU+1HOA4T1TYhTkKACTKXBS4BV8qKOfLncejKKBHbzQsy9W77zZdPwbCCPOf4nHW/skT3ZXJ34A3a2XN/VTmexBM42aCa/QdJml0pi8qCohUaQaR0NVbV06RgcnrQGprsouWW4E+25faq7q14yCZCHvcnXlti/PexI3Z6gb1ISDDwkt4Uu0xlrPF+wLyK+zuZ0v9GWqvSKqnWFPzy3Z9tSVYH3vC+Y/7Iytxo9oT1vJaENbqiIJt8+xBmcQ/5xN1nEc51hmCwwdDrezXh8hriBamedCiBfz4N289B67jdmznQJgD8xlrD/HVSQhcdgWcmiz8LR/LQ1DEhX7DH5YBCmvMScz0vYlWoRXB805KOCoFoo6CKFXG2KBVtBFq+MYw6yeYIoo2sMFAhbyW9gJEJKSGsCchsIQtFPHLVovW07EKK+Br0ftMENGI4b5K6PmEHdIbyJI9NQLoKPWddKYIEIxAOnZI2JiJPzU71pPR+G8fUal4UYfMMAj0bvR+SozcPwWN8v97kI6/hn4H3qpvAFm6yadgsTg5hPeM8go6sz3Z60lB8RjPzWI/AsxM X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: ec50a88d-7398-4416-e670-08dc44d61c3f X-MS-Exchange-CrossTenant-AuthSource: DU2PR04MB8822.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Mar 2024 09:55:56.9256 (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: 5HAEkAEMxea/ocMyC6BqieYUt+03NepSM4jEZ/OgFKDwEew+71XK4Q416UyesWwNYrMiEt9qGFLu6NaCtCBlHg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM8PR04MB7444 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240315_025603_934836_1BDCCE6D X-CRM114-Status: GOOD ( 14.12 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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 Reviewed-by: Frank Li --- Changes in v6: - new patch Changes in v7: - no changes --- drivers/perf/fsl_imx9_ddr_perf.c | 168 ++++++++++++++++++------------- 1 file changed, 99 insertions(+), 69 deletions(-) diff --git a/drivers/perf/fsl_imx9_ddr_perf.c b/drivers/perf/fsl_imx9_ddr_perf.c index 4ec70775d1f0..4fdf8bcf6646 100644 --- a/drivers/perf/fsl_imx9_ddr_perf.c +++ b/drivers/perf/fsl_imx9_ddr_perf.c @@ -41,9 +41,11 @@ #define NUM_COUNTERS 11 #define CYCLES_COUNTER 0 +#define CYCLES_EVENT_ID 0 #define CONFIG_EVENT GENMASK(7, 0) #define CONFIG_COUNTER GENMASK(15, 8) +#define CONFIG_COUNTER_OFFSET 8 #define to_ddr_pmu(p) container_of(p, struct ddr_pmu, pmu) @@ -130,6 +132,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),\ @@ -162,81 +166,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, }; @@ -245,14 +249,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, @@ -366,13 +368,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 = FIELD_GET(CONFIG_EVENT, cfg); - counter = FIELD_GET(CONFIG_COUNTER, cfg); pmcfg1 = readl_relaxed(pmu->base + PMCFG1); @@ -392,12 +391,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); } @@ -465,6 +464,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); @@ -472,10 +493,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 = FIELD_GET(CONFIG_EVENT, cfg); counter = FIELD_GET(CONFIG_COUNTER, cfg); + 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; @@ -485,7 +513,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; } @@ -506,9 +534,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 Fri Mar 15 09:55:51 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Xu Yang X-Patchwork-Id: 13593217 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id CFB51C54E69 for ; Fri, 15 Mar 2024 09:56:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=6qPEOD7lCAV2X8/Ac7ZrwEMyj0paZ5X6geKbCSHkego=; b=OwYTCpr0Lavtc6 s1TEGKH7vrODbHeLd2FqdaRn9Yn1tjSRpGg//aOFaBGjIu33NixZzQ9NBB/ajEGp5VLPZ8s8TO+Wy xp8pe0GcxdP4dQ4jJ90tjtLSaGqlOPUloyU+mEyzHZg/M/fHPsLwr6biztXmK2r4AlsEeSDvAgrOU FRJnL27caZzOCXpis9PGxr+XGxyBOZwEb2wfWvE/F5yoIxhQ4EMpywZpPCUGB3p4Bui4VrMjDtKof tMSTRIy533ptbch6wNxGgARPz4THF8LRYzV7r32EPJbrjKweI0lA9arE2/bBbSeFSgIev9j8brO3H /iZD5i1fD0ZhI2jztc8Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rl4IU-0000000HMWx-0hHz; Fri, 15 Mar 2024 09:56:18 +0000 Received: from mail-vi1eur05on20600.outbound.protection.outlook.com ([2a01:111:f403:2613::600] helo=EUR05-VI1-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rl4II-0000000HMMy-38cx for linux-arm-kernel@lists.infradead.org; Fri, 15 Mar 2024 09:56:09 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=MPGbBiqlZf5OEGzP7+Ce6ECjhiFWl5xRSKAzRXtnnNUxmAhRRqhV4AM+WXqoUfWQiMpKRDt5vYMvsChbXuDRzXa/+hPWH67awF7MSqkppQ9RdfSlhziRjbzvAye2O1v1LMSFWMB3OXk2Su19fmvV/y2AEOaX2RiGoHDtaRBwcMV3TK3Dh5iIvzoMDw+zYGtRmfI5r92cJk6v+IUE4BzU7jUQXHVmOhdI3FF4ayUlMSJofBYllLeEuYr6hkPjwUVFHkZHjyGg7e0IqI/eBysiE9xibMTAeL6dPqv1VyrclDnjpaP6CHpEqv+ujytvk8mNhDsRa0SqSPa7akIGpOfvEA== 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=Q9Yqjr1dejZhmLuzqaNbEmKwMZNV6BNYxmUx8Nnvylg=; b=ezyZ2EVq2bQ6dw6oO1/ur3Sg/TDCAq5QHLUGIBlT2et0G87PNgb2uxw1VlRaGoBBYfLAZZz9ZrtmZait/ToWXgusr6RrNHvK4G4t77dXGRTPuu31DMs54oBvbPt9iqliY1JOTkA3G4nkDgrrTQQoVR1R6n1GRORkQF9MaaxqY8KBqiRihrKf7SIkd1lrstpdbiYUfloXwrn39Ma7eoO7GR4nr+QQLaoOTo2AID9qM2BumCh//MgallpbI9T30xjovRN5sNIL5EcEmtBQgkv5kbMQ8enBgjo2T+zB/s2TLpa0KScg83fefnyts8tTMJvN1LvWWYTFgM6WQg2/Q0xZOg== 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=Q9Yqjr1dejZhmLuzqaNbEmKwMZNV6BNYxmUx8Nnvylg=; b=R6YhVhAS1lL6223abTnLZWOFU5SNv6e+1jzImwIqsrtWH/K+gGm+Se1sZ0cpW1lgvI51PYCa7dq5in+0ohU3ACtTXvoOahhxJ4VIJ80fpp5blqQqkCi2eM4xcVAagbaigWOZTpC087FFEQXb3LiqUw9k1euFx2j+uglxawDgINM= 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 AM8PR04MB7444.eurprd04.prod.outlook.com (2603:10a6:20b:1de::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7362.35; Fri, 15 Mar 2024 09:56:04 +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.7386.021; Fri, 15 Mar 2024 09:56:03 +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 v7 4/8] perf: imx_perf: refactor driver for imx93 Date: Fri, 15 Mar 2024 17:55:51 +0800 Message-Id: <20240315095555.2628684-4-xu.yang_2@nxp.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240315095555.2628684-1-xu.yang_2@nxp.com> References: <20240315095555.2628684-1-xu.yang_2@nxp.com> X-ClientProxiedBy: SI2PR02CA0029.apcprd02.prod.outlook.com (2603:1096:4:195::6) To DU2PR04MB8822.eurprd04.prod.outlook.com (2603:10a6:10:2e1::11) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DU2PR04MB8822:EE_|AM8PR04MB7444:EE_ X-MS-Office365-Filtering-Correlation-Id: c7f3b15a-b677-4483-8cde-08dc44d6206f X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 9U/G0oHKGBGMKkA/RyNY8V7U/s1h71BcPcXB1jFUjNWqUsXTodpZzVPwYxCWUQ5iQKbMCBfd6U+9CFbH3HvHTh9NkyoZRnoCETIu/XgrPJgeEbr/wPffoiLa7Leus2zym6GnI+A67p/zUjRZe4qcAR7py1zoJz7WjulpBmQteBEWBudPltk8vkcWBmH3x7nZzESpoDNWLV4BG9n9Qzmib2iaT1lXsdP8MqSnIqfz4N+pnJdXbn38PPft+zMWZR2Ay7fMGQguzJQrU1WYxeK7DhrN3zcTlKkNJ2p4H+aCjvaIjJbl3B0HhtJz4AoVmpua/liWD3VyTLZrSsX/hYyyoM2nL+chPP7LGyOWjuhXr52m3f6XMHowkcTOtAEvvpqYp2Ey0YJ1Nk0nfCNialfgPo0iotzFxBgEpWqE6u0Pwz8M38MT8P+XxSDNKt6s02rF7B4/HFTRyBmgn4ljgeKal4PLMweWyfTo3O/BW2XmyNzkbWEJ0FD6o6l0xYTb1l6OO5cVwtFDSqS1WMCUahi2vl+IcwD6Dg+gIZAupJWu5bKuEnENrsK9BIfgpOQNzGXjchCwABkUKvTZe8crj5WpjXgCHtk3E1Oy0naCZ0R3RWIQRxm5wkQiodpdIfg8f87ezWYdmZgtR00U2urBlIi1OGhf9LcJneciBet2dElO0ohXIUmxuQT1LZSQ34Lyn5bF+T7xHe8QFIm3R4w9KxZFDwVqRXKC8qAFOXEOXJrX6Oc= 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)(366007)(1800799015)(376005)(7416005)(52116005)(921011)(38350700005);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: E0x1+g/yezzJDS0x61cXEEidF1rkzeCXvhGW6+CFBvuP7ilo4XvEY6ifDI5Up7h0LkW2A5CEwA1vjTaL/jeQPRwo+7y/UeApu+ifIp8K6gADKWoShhs8ypzRtmStywPiS0g/vfDRrXEFDOKN7/rGMxNIlKigqY/NRPcQMQRppJAIn0nIQdJEAEu/y3UaU6fv3b74O75iTWtuEEYDZTEiCGrR6A91+VvGgCeSO/TrOZgeD5+AaK+qBMA7PRbh5YbdlQL4s1QBQfdrSm6h0GaW95Vdl45GTCGHMU5Jsf2czWqFSBMpTcjJA+FpynfbtsICrVT+h+SqRE81nPpMwCHEkO6Y/OrmDti3j98wtN/QdD0bZRqHvKD9njaJbC9Oofp3kDgWVzy9rO063MNeB4vTuTkJqymzNLSGG6DwVRw0VQTbuOvxw8LoyfEbmhAXYlRihaGpPf3d98hQvrR66Me/V1ZmvXPS2DhiKOTR3R7foMSeW9+XizfXsEYEdfVXGk3UoSpT0xRdL5i0usgWQPds4Md/uXMc3ZAbErTdibGpxuVqlFlfYR0Zl4iS8yLlw8mXwu/tkVjLkpsEtpBYyplG70pgrvX4okac15X1pAGs3AqUI2Wq6pvTmqWD30Hc9Vsgs77k7jSNnxiGiJ/DP5tSZSROP6WrNNAMvL9kXAZRRSsQ5jvWjLWdXrY3wwJjH/FLucYsPRqiF9bDGrp6rW4/uwfd4TFBDVu5HphmnVlov5NMo/50PIxLCmS4qJy4YWM1wXI3ZA0tTVtTlhBwdsxWUqr0/Jvrtv3QKC4wrmMyIMbDG5NPHD1RtwpIF9lKdmXtso3skAsFNPLH3FSrV+QMRB3BG6H/WcEkK/xAdkJa0m1OQ79OWp6VBFx6nFmU4jXME8b6JUs9N4dykHYM2HUXDQ3AyN0+CGqQ+Nr5RtyPJ5aKEZCzAAiJOaGKZKzfo5Qzi92gEwtpcx1cyQUUc27j3KdkQSqB9oIRiLbykNOxQ3P88BnwvGI73WOD+HzNn3oTqMLDpGvwKoRlUY4ehmRQTwTHAgfw+nROIExuIcM3A9miinw8hA1MLM6hpAWPdgaOsRacgX7BIjViJx4TEBw9ar5P3sfo4l5s1uxMRB8/79nlqc4bmbn3CxWaPD/m0oc43zBKDOoR/d+u+VAKvQK8uHdx3h6nJxUc5ZLYZfrfCnJ5KN76wfpiA0ULL51g971R4IxACM+UIkC65rJ5IRreilRoBWl+XWcOPGWJJ3ZRaTB5RXz7ozAzy8vEkWNxH4MKfFjTFo5omzXaQNgjI/qtFJkUgtvppCF1eZg8PQnKBfy6LQYWz8E2p0CnoymG6WgDG6iYQA8ivWcYa7zQ/MS2OZSkYFJZdZlsXWr9yQR5bxIDIPmuwXVoeY/oZTvqzI+e3rITcp9MqShICVRHrI8mHpr/olUJJh5rtbP1TfLJ3FhJ3GJrjVx/mELTf7wpAUl0z+oy4pEuHt6ZCsHJk3plp26DZ0mnBibzUdmTgzlE2oGxHzlTU4UqbEQAdoJxcvKZ0rb5d4Kc7D7xLecvJYIXpo+czz+mvsvgxL7852K7Ynj7t1VluN+KVzdJ6PArY+0c X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: c7f3b15a-b677-4483-8cde-08dc44d6206f X-MS-Exchange-CrossTenant-AuthSource: DU2PR04MB8822.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Mar 2024 09:56:03.9542 (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: t7O0jOiS30DgdrsxSvlZTrOXIYsquQz4DEE+GWOiFzjSIKJfW7DBInMmrD+w3rXuLrs6nOmTTD2dRcKMRqqRdw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM8PR04MB7444 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240315_025606_899883_7B7117EA X-CRM114-Status: GOOD ( 17.77 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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() Changes in v7: - improve imx93_ddr_perf_monitor_config() as suggested by Frank --- drivers/perf/fsl_imx9_ddr_perf.c | 80 +++++++++++++++++++------------- 1 file changed, 47 insertions(+), 33 deletions(-) diff --git a/drivers/perf/fsl_imx9_ddr_perf.c b/drivers/perf/fsl_imx9_ddr_perf.c index 4fdf8bcf6646..5537f4e07852 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 @@ -76,6 +76,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 */ } @@ -185,7 +190,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)), @@ -197,7 +202,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)), @@ -209,7 +214,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)), @@ -244,9 +249,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"); @@ -368,36 +390,28 @@ 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; + u32 mask[] = { MX93_PMCFG1_RD_TRANS_FILT_EN, + MX93_PMCFG1_WR_TRANS_FILT_EN, + MX93_PMCFG1_RD_BT_FILT_EN }; 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 (counter >= 2 && counter <= 4) + pmcfg1 = event == 73 ? pmcfg1 | mask[counter - 2] : + pmcfg1 & ~mask[counter - 2]; - 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) @@ -513,7 +527,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 Fri Mar 15 09:55:52 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Xu Yang X-Patchwork-Id: 13593218 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 49CF3C54E69 for ; Fri, 15 Mar 2024 09:56:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=3SP+2bQFAo9WB6QONaO4pZ0eGKLUXNDeWgsA8DklCbo=; b=1IZNQe4Bq5zC36 T4Qn7j6bRBwLZxflbUsuwCx8n/H1/ONZpw1kt/NvMafpP4uA85SjDXHeGkxYNVRz39t9sPfqqyR8c jPywTTWAzCvzRvQlYNjc4I0Asb9jjlYmSJ9sdtCUFuIwn7ybl6aECF6pVypyN85LbqqBdvqxgGRIn Ai3mcmcjsLtVeEZy8oO2ro/qO3VIGrUKhARdeaIFLinX97JDSfbhmQDxpluaqrnQJnp4BYENprysg zW+gVLr0X3F1x2i79ALPJ3OVzHCoB6QbCRNsWP5N67eR2uoSBZnN+RxzNVT67DOIlqLNKzcre+pAS 4eH8e0PWanQ7ql7FU/CQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rl4IZ-0000000HMaB-1rEZ; Fri, 15 Mar 2024 09:56:23 +0000 Received: from mail-vi1eur05on20600.outbound.protection.outlook.com ([2a01:111:f403:2613::600] helo=EUR05-VI1-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rl4IR-0000000HMUH-0zBn for linux-arm-kernel@lists.infradead.org; Fri, 15 Mar 2024 09:56:16 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=QTX2RGj/bDewt3NzPnqM7IxqnmN9MBAy69gEk4ZHbl/pz9Sts8ushth43jc+l4/xMcdLeorPbYmHXa0zJx6HjlxQLPag66Hw0tuopuQlXACWsS34dPLbvBpcgBRgi6Sf5vnWHhmX86prrDns8Qkp+XBegn8ylseQJBd9S1I3yTD4Tj+0y7r8Ir5CDHWV4Vd8CL2jm2fEvFXR77/L/yWJ9yBsP+Ug9jwrs9BZHfmbORtnBd9+eqe5bBRBYFES7n8rWXiJ2rLyNPUBUUpH0Oaa0Em+e+B+nwvehhnugSD2LuVw8BbLzcREQVtLe2FCrt16H5KxU9S0AOTD1/hL12kZyg== 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=yL6RRzoOpjMPWZWxX+J9jbiV3rDuEHCpScBVuM4mkUk=; b=kFdXC+FLqfse8Qjhf3U9IX92E14z7mGnIiD48w0CluRD/xd3vgYVHHpOiED3jm2IWLEXQulp7Z9aDaTPC6odA//yU2LZFKME7H+1ldCR0JHCWtGEkNXYbLb5WHhxuwxjCIQNqQDxpGX500yYGEaL4e8+5s7SkmLnoCJgyLuQdGoYRnQ4mFuzD6mkBUrmsuakY9WxSwbf8W/SdPXATNdXFv8rMjw5Dumg2+LG2RI267bbaujoQNpWHPinpTGPwokAAUvsDUc7MwqgZGL/CEuYpNbhyFpVwCW+ClMY4MgaL51dgWsf4wL8dhxCAn0CnaVtv5gvDWD7DGi6pjl8RBRMBA== 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=yL6RRzoOpjMPWZWxX+J9jbiV3rDuEHCpScBVuM4mkUk=; b=jEfyroPDZzd0G3jqC8+lKGdH+CEdVT2znm2OsA6S0T8L36u2w6xlKqpzy6taDnwrQJGl85MeRwbL/u14OmL+IvZPipMnQaK3NluUqK2TBeswGFDE9WVar9F4v8uhJJ+t8apuM9zvouU14l//6SSBEVssZTcDIEch7DVaqa1j+l0= 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 AM8PR04MB7444.eurprd04.prod.outlook.com (2603:10a6:20b:1de::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7362.35; Fri, 15 Mar 2024 09:56:11 +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.7386.021; Fri, 15 Mar 2024 09:56:11 +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 v7 5/8] perf: imx_perf: fix counter start and config sequence Date: Fri, 15 Mar 2024 17:55:52 +0800 Message-Id: <20240315095555.2628684-5-xu.yang_2@nxp.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240315095555.2628684-1-xu.yang_2@nxp.com> References: <20240315095555.2628684-1-xu.yang_2@nxp.com> X-ClientProxiedBy: SI2PR02CA0029.apcprd02.prod.outlook.com (2603:1096:4:195::6) To DU2PR04MB8822.eurprd04.prod.outlook.com (2603:10a6:10:2e1::11) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DU2PR04MB8822:EE_|AM8PR04MB7444:EE_ X-MS-Office365-Filtering-Correlation-Id: a3dea5f9-a52a-4bee-7f58-08dc44d6249d X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: QcjS/BJ7eAUCZmbEgGjPdbO9kOJpbeMX/FfVt63vf5NumjMQ1j/gvUapYBkAQ2jw/oh+mVd0Hi25f0r/B8wOMfruXnllVJ+kQZVDdBIiqP6+4Q53MRwRQO3TfO1rHahe691UQxSo1E445FKVEyfAzk16l3pBaKEArcQf+en4pT5/FZoP0IzbvV825vH4m19bdIvqEkhSnJgTX3tmaVjd1ke2obiRLtjtsL9dusUbXRqbrnzMrHCikAJI7sk3FEOdlvzfCAHP8k2snkGuynR8nWoLlNwijdytWHYjM70In+lh684V7UyiNAKxmuHuPsnOPweMsOZnupzE91HgWb6qckDPSOspC+qYeD57GM3uTU40MPfYJKBXzheHioMXYoWH/DLY2LjtjXE0zLPs26Bs9te6wMvOJ8h+ePvgk9bDdC8BQtjgwvvwgYC5zaGnx6XSh/FQa7FL2lvN9th3IqDQtjwgjRneFZFnTshlgMGsn9603vZLrTb9B6vIFqrEWZom227LrVYxLMcfkJSKyrhCcN3xSgs2AQ7lcEiYsdGhe5AdWvMJxm9CqqaK7kDcsgBZ5nrU2fCqc88MbyoW38Cw88iIHM+SwjD3VlR8qxYtFCaLwbmhEfp5TxFit9l1uS7bdCkhwpgwZktwua9iE+rOCOGuQdi7f/SNRGEZuGjpPZa2/FRsOByMUU0f5PVQhV6lT1R0im0bC0dHk21myMuaPwsDu7oU/ATANnrZPNGBs5o= 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)(366007)(1800799015)(376005)(7416005)(52116005)(921011)(38350700005);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: or0MEic+zaLUwPBTk9ypcJTEg+jIusZMoTY6cnivkSHfOlll8jWn+SEbzFCVWBzJl3H4Zrh5b8QndPdD00OEBnOwh5e06L+uz8+AtG5FvU6QOIbwoFXVgsD5/tBZN74Zj4b41SxkBxbYsMVE7KFm53AqANtevxSnB0hF4yU5MTH2GdBAsplICZuP3ddpjoZVwXy0Bjb3Kh76166Ak9kJjvpr2Xa+pSGDEEdhVmLbDsU4O7r4/njwj64xAijkGOsoq8ob0RMY9+z9QrWGmEGPIjNdQdLiQBvUgwFbKgneU5T9uRiSl0+9u3qEZ6zmyWqoeLaPA7NVD1vfeCyXEqhQtEF4weRJvNVCCbncDijYIRBs4ZL6OSG/wPA1ptFDnaKf/CMB0QyR+dePS16Iw/5Lh+xcgbsf0eEFmWXQY+4L+SC/j/zV15dcdIALFhLG/l2sK7C7hBVb4ozL/EDLxgftsnWN5UKg30HgCaT9PHrCS1eA8AOjSOQz6qT5sMkkUvjvSEZZzLHhWqbgBKAf7EQHZKoQ+5krIJ3msgZK9COtWo77LJy/onX9jIEA/kRIMph5yeWtnphxw9AijkALYWELhs1QFc6fHSAy7+9s+bJXKUztpJ/9xp+cyvXkUeMpCTPJDlpd0g51/ZqSLgXozYOE7Ywexu8etsXJvyatF7Lr1lmSCtFivLtuVW9bzT1NZ90pns2DXlkYeZoPsu5o6iyHFeh10S5eqWYO6DiCyWwuCpj83beIkvwpzqQYHh6iiLxef63PmgTfUVh93f3KZWOHgawrnuJA43/0REG/Fk31vRdRFO4R5TEp4hLSsu+f+MGrVClyErqF5R/lVh017lV4TQAXfvW7VADq/LXVgVBgD4FeMtvipt1Cq9OSaebmtRpF6OlQLhX5CSR2sr+yze8D0Vr9qyd+v/JlGGeuilvKgqDEMEJWrim7/9D77a+Hplqy8n5oJf2um41J9EjdmRYkBTW+/zpsMUtAAsPHkZle/YLVtwX8eBhseeHdWhUjdXQdYhkOWRsuIbF7nANeuTCddW1Nol2sBcT7bI5X8rdC3lA76jAJl9jqvnxiSgWqcPPARHNeFbsJWDRrvcHcrZvmAqghaRUbesACNGwCciyW3pq4PzMC9u7VhLtd4/FuRU5ZWlnVxjKjswTjxbB5LS0/3rDV0WoY7cI99VXlhrPepyFHnt/9mF6CdbCJVIaaWqkIo4k9HtkZhr5jcj6wRWneYn/J0L2sVbJezG9RSFNo5Q3G1LJ7CXuCQ4BPIS99/aVW3AypGY1+42hVsh7FVGZCWCupDIcb348+sM5F5FIRyQNpYZMbnaATQTYVWkJ3OUzHIGKgd6VokT4GkXVMErbtrCbdxEJJzQye8jxXc4fXBuLnDLEyMu5S0SvoxEsL5h9mOWdW0zr5tfwSLz+Bm9/pEmrUsnY3fO8PCruDlXKj5Yi/1KVapXi36BH6YsPIi1mWXlQsoxS4k5fzCc6Ye+gdYIls51YZAVX2yNFimqLLqO/S3UyiArMhK2iaNxMje/+zWIGKZ1gIujnIrJ0QuF3Kn0h350PoAz8cbMbo8MuUT4GeK4pZYQZZcvsWyJY0188w X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: a3dea5f9-a52a-4bee-7f58-08dc44d6249d X-MS-Exchange-CrossTenant-AuthSource: DU2PR04MB8822.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Mar 2024 09:56:11.0562 (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: tDyDUqf9MU9HPj82dB3t8p3B0EbAUSQDOE85hg57FLhjkNj2PbrI5fYhg0ftxrt+LteNQDgzuPPKunRYt0hUpA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM8PR04MB7444 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240315_025615_368992_93CF5930 X-CRM114-Status: GOOD ( 12.27 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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 Changes in v7: - 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 5537f4e07852..c99c43b214cb 100644 --- a/drivers/perf/fsl_imx9_ddr_perf.c +++ b/drivers/perf/fsl_imx9_ddr_perf.c @@ -523,12 +523,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 Fri Mar 15 09:55:53 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Xu Yang X-Patchwork-Id: 13593221 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id DA078C54E69 for ; Fri, 15 Mar 2024 09:56:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=Hm7wIAP0AnoXz2ypHxLookDh+P7gofc/XXO4UzJoUJU=; b=tPktC/xHmz/d+u kMZw+zKXP9KPaHck1aTdqGn7p/q2nupZrsjbj9+2SZHUkmZG8GSubtNu8YwUK9XUvPSgdBc1sSUDd PenRh7MSM7qQ35OuUPZeC1PutPGjMXgla8n6R7VkKgArgG0NReQtA5PJ6YDzwlW7qq9eJi75Wo7bK IxPvOcSGXb9CHHYgtQD6xULdrnetfBWJmDA4GdEJVlpFGfh2SCjN8Po55NgKLIMJmdIhB0WzqAc+O BcL38XbEClXbmWqjh/Sl0sN4/MNGZ4HFpTsDuuaA2f1wseJ/cbUqsBaLhWDFdgll3qh9bLyyDzBXR X+wKOcZ00n6aEGWI9liA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rl4Ih-0000000HMf7-1IZv; Fri, 15 Mar 2024 09:56:31 +0000 Received: from mail-vi1eur05on20601.outbound.protection.outlook.com ([2a01:111:f403:2613::601] helo=EUR05-VI1-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rl4IZ-0000000HMZk-2Kgy for linux-arm-kernel@lists.infradead.org; Fri, 15 Mar 2024 09:56:25 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ZAgOJVOjuQgfxj/AYgXiiLGMQHfh4EjNYzZpHnt92jwJXZ9hyEessQxAEdyJ2RO0DuY4rSK96r3vG73dt9mf3wgn3nciO9lp8qtq8n3BhwNtwiZeOG91yU+xzlcvdLHKdGSN9rAAXNevcnHrwlZBhNX0ts7shA5XjErWEzDBZ2qmIdyR21EAkXcmzUNLl4bmsnCWTmSMSskVVnZrglzilOW+ZBhCyv/KzjWzkTSY2b451fe3jFVrcitrZBu7HbxdEsKOdv/EZUyhk2NA/AP0r2BwVZS8gkwndCvHU80Z1SCm9iwenWn/H89sbPF4HGMHAFKZlF1XHJ6jsTy71jxHKw== 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=NN2dPQSVYZ16l0Ek6H80W/jszQp+QmiMrvz2VJqKC8c=; b=fZe9RScF2SRBzX2vVKH0GFSpyPcVgwgkKJhYU0SHWiXHHwOFnd7y/s+KhIoo4q2NaVGAVT+hsprBMWHfS8gWr9m8nLPHbmCKjJbGg13c3mt3tE9q842O9fTCaFFDr9V7fZD+0MdCH/XfgNNDLnXoVJ7eTxwaNU2xZjSwGOlUnAXAFMOZ1Oidd+TQgnSAmTDN/8RoYFySsEsByiKfCWfBGTwAwRQGnMRc/dLQx9r6dJjiuLn+ozAc/SwbSRaDyPzdAMRaEPxs3dWhbyUoQzyLVPAzslEBvtnpyECTWcp+pXW17n+L1mGhPcV+ChXQmk1dmqYj31BaEMyR5cQFl/nrXw== 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=NN2dPQSVYZ16l0Ek6H80W/jszQp+QmiMrvz2VJqKC8c=; b=PGaTpbOYn5OJg4IZ4uWLjiRSWfZcFw6E0XMmbkNAX2VrQMuTpdyLJGYwr3JzG5zLSb5deorKRCFpZQny3mlBNDWaIACnRWJ4m7upVvB2J66pYCsrOvIC8dp3kNzRogasLviBrcEDaUYsyJjrAgdp69Wg0p/c4PLIur4SrFYx0U4= 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 AM8PR04MB7444.eurprd04.prod.outlook.com (2603:10a6:20b:1de::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7362.35; Fri, 15 Mar 2024 09:56:20 +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.7386.021; Fri, 15 Mar 2024 09:56:20 +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 v7 6/8] perf: imx_perf: add support for i.MX95 platform Date: Fri, 15 Mar 2024 17:55:53 +0800 Message-Id: <20240315095555.2628684-6-xu.yang_2@nxp.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240315095555.2628684-1-xu.yang_2@nxp.com> References: <20240315095555.2628684-1-xu.yang_2@nxp.com> X-ClientProxiedBy: SI2PR02CA0029.apcprd02.prod.outlook.com (2603:1096:4:195::6) To DU2PR04MB8822.eurprd04.prod.outlook.com (2603:10a6:10:2e1::11) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DU2PR04MB8822:EE_|AM8PR04MB7444:EE_ X-MS-Office365-Filtering-Correlation-Id: 3351a12f-c169-4e74-b1b1-08dc44d62a24 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: wUQmysr0gmpYHDfwqT/ormktyNo+ii4DNoT1WLB4CU8nEMptoGbNbDwoRXmpclxSuy+JqIk6Lc0iHdPjIxkSzCJHf/A8C/8FSlHZFkO4z6y8OBGWwL2qFic9NHvRIutGL7OfInDOzVK2kH+lBnhOnPArq6hyEFz8nlzX2MAohmdr7tp/eJ1lbLDx7OeIUcBLIesoD/y+JB4FytYUD0rP7D2N5ZUMLlxK+GBTO7WPE4KBpMW6GMZPXFIrd0qjxAHcFLX5S0oTRIAEsCT10eeqZGHvilz4mRcQkGD9EAkxHojdr2wyAEBh2ZY0+1OBq3ZbmZVkecLh4v1Zu7kx7Gq6FlJRvblZ90p8CWLYTMG2tcuy+T7yzH0cQ4XQYhk8mG/DxrA2RJbvKgSwm/J5rPKK8DTxCmLxk6ZfJX3NnD7Msz0NNI6ozSi9c2rQQf9vZEu39h0u39GWSYfL+PSCBm3pAEswbwOo9HyoRNvbNqVy5R6T5k5OSSVJKNPf/xfPFAAA+QqqzpLuYkZTYCcZ5N3Ls6NdrzbYJpVZoZ5vGRq9oOUGaAQ3Vr+Dj6CBnCyg91QpnfopAHLQEz88z/14sY413ypbFir0MS8WrYE38PTfBL9JKLkRTzCcgaz8wOC05PlOmkkwUaPYFEZpNqcjIvrKnJanjnRiE9aS2HcLmrJA6uUR9CYN6S1c1HfiwXSTwaYjOroA45eJ0nDpwQknZAVhvQczz03ZUZ44xPFeFMh+xto= 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)(366007)(1800799015)(376005)(7416005)(52116005)(921011)(38350700005);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: QWxfA6VkVF+TafexAV57TC8bLo4AxaTAmD2cM/WnMTOahXbb0upwHbNhkuls2XQxJXG2C5epGhgtQrSAPXr+Dbb8dhSI7jlT4iCfFAyASpa3FXPui/IXdr/mPdyBWB6xet5w1NLwmK88PzGJpQ3hFEyptbT6HYjGzBjq4RUDI4bXkEPRWYzD/p0bxeNJ3jKEsgam4jkYx/XTvK+xdOyYJ9mHMYqwkwV04kLP4gru/wTRpSzsGZECgYUFUvPGh/C6m9MhqMvRS8TDHQNsY+dR0CBhu+SRFw6xq1jtWx7Zu12NrBPmMt5821Zc0cAV4TmxGSa5H808KV2LS4i/ll6/sPF7LadLOg6iEIoyXZpYdWsQwcVRCxk2bxtX2h0XZz91TdX5sQm+RHwLPVSE83gNbfpNEz3B4bqW2/MRNsHsCMIhA7mLLPBXwkgB23SXWWJRp1GnGJmbLu1jLqhbruOaS8R1QvJ44CWli5zuGeBol31oc8GU7yzQOHlo17Jljw3GZMuurxmykxgmsGi8vg44lx7ZMAcCik141m0Y0lmDODyY7kx7z+/f25ktCbLcPRBmtIyjHhBq1TtYAyU00LwwEgzJwh1SdBEdYQEgfn9L8HpIVcWZWDsUGKIc1FfFjcTd18DlIp32WJXK1erFkawPIxGtXpgWbnnVfyNg0hk+2GKOJ3MNViOY65UPgnLw3fv/KUIQvx/awXweV/C9X64HNczf/hpKqQnjFgpRreNKozV59Pofp3NYeYaMzcON+dD+hW3AuW/UoXN4fHmWxNXAx++8c5Aumn++vkzpl0ZrqIN+JlqpuReWhNoAsjODAfpb6DTs3yZ2wvmLHF6gaf89fgYyarqvoX2mVhIkyJH6XgAlHvw/gOr9e+lawYKtFa/D6pysDr9q7otUtwbRUkf9ZY8gNFfOvm81JAjkZ8VIBrhX1mppd8QwHPnaSL1+naDgVIhcUo+5CP2FH37q1W3QWqulmRmBa0Guj84V/tKN1utSsh7bo4RjaXc/hP6s2JKWpwTgCKJ1LyYAjNq5cIxEmbGIRl6tpviYuEIQGgeJVMzg2IcqU3rK2RTti8Y0kJkjHV42EpsHNxpshiy8Z4X2mzfdx+9/zDwexcWrBA4ysCqblP4ZhTTvvhwjZnBG/JSghqcMk2x43PjD14nikqGNJPlcR/3Tgwr0ulDWKTSG8hgLOg8Ckg79xiEGlFMq7iQUvqn7273cEO2O3ywGWJbseRMU23YwiZlX/RGozRbUlhKme7zkQSqRODqBu5ND3Z3yMHDQu8UvqKmmBwGscDf6BEhJdG8RygIkay2KHZvliApDQGBOGqh9L/eaxuSIdOXioifm/P5+tNUZi3MRcJs6jgJti0OVgV32yk4mRNQx4f0SdV0kKuRrygM2ZpqEHkGfqBlH6aPdWyvqb+zeYNC8SQ0vPxH61CO+O+q2fTie9AqexfPIaHhucKWz8hiJ5msiD2Myc0zzFc5RM2694mqv1HnU+zmnXuX5b6j7Dfnud90kRvFUdk2DclwxdmOuaZHHA+QS6TC65Z8YfCYeeiIHVQ2LRY6h5XJC1dLJAUafjzvm/NVK4vfXn8fSNy+zwspM X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 3351a12f-c169-4e74-b1b1-08dc44d62a24 X-MS-Exchange-CrossTenant-AuthSource: DU2PR04MB8822.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Mar 2024 09:56:20.2327 (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: Wz1c8cetM5PxN1sA7sZ3ygB4vwCBAucnBfx5+4aOP1aEEAmV79uoCl1W2rvXdb+0GH30ff7QTHAobSL40EEtmA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM8PR04MB7444 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240315_025623_863710_DB012A6F X-CRM114-Status: GOOD ( 19.58 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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 Changes in v7: - 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 c99c43b214cb..bf654e458322 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 */ @@ -76,13 +86,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); @@ -191,6 +211,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)), @@ -203,6 +224,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)), @@ -215,6 +237,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)), @@ -226,6 +249,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)), @@ -262,6 +286,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; } @@ -414,6 +445,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); @@ -523,8 +605,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 Fri Mar 15 09:55:54 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Xu Yang X-Patchwork-Id: 13593222 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 4DDF7C54E58 for ; Fri, 15 Mar 2024 09:57:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=5lIlVd/Mb/Ubd8F9oU9vGIYGAxzRS29KWTLMRf8SRH0=; b=LjMZ8mWQPc/cgr Aw3FnF18AUsK85XQPQdILVTtOLcib0c7mUMqZpLwQljFTp4kXogZoeCUTfVjW1d+oTv9XN2tSK+Y5 O1t9VgaSzIZRdbcKW3QEijCEOeypZBTd5ohBnuFxUPO0ULwAsXFvJymIgdcm/YHfOcmGE2jtMh6M4 1QcvHk5dylW5Q/4TsgbFU/OkumwTugOnoXVcMh67AAlAi83hAVACy2LQl2UNB51qZb6JuzApk7r7t h9bQ25AzeiqjfuSbw+Ls4qQKqnORaJHlARwTuM5x9a/bvpvj1e+f45kPmKIHk4pH7EMQjo1YknFq6 6zhNNAymQh0vFC4EhX0w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rl4Ix-0000000HMp5-1rPJ; Fri, 15 Mar 2024 09:56:47 +0000 Received: from mail-vi1eur05on20600.outbound.protection.outlook.com ([2a01:111:f403:2613::600] helo=EUR05-VI1-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rl4Ik-0000000HMgK-26Ys for linux-arm-kernel@lists.infradead.org; Fri, 15 Mar 2024 09:56:44 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=OX9T6ibhAK5KB/TtoGbEzwJexJ5uVQ1CC7ND0u3zJSXTSwLe7Tc8/WG/biss/nYnRZhSmUkTJnu/Ouz22D15Cb8UAsNZN8fhdnv2cxfIn1xZQQJO8ymTiWPbsp1LgaYUEJZFJNC++7a07bc/P9yfr0xpX+BHcpi0PDLazrqybvNry5rDBNu4VSRgHRqdMG8qB3c5Z6102NyqvXyuDInnOjE+uItLKVo1oeVW0bR4Mibxf75MW3pp7PqU4Ilotna/w5EqCpmsahgz8uhzGkpUwu0Pu1BJyrRpp+JcN5FAiXS7aWDW//hI0o11w9mPqTG1iQHn0Z0w1sg0S5F7F0D1Sw== 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=C2sbUEws9NrCOEpV9b2/7l3xtU2ocdRkuXIS4yCgPFY=; b=OOLe3E3cdba2rpWSdCBXi2QxGTnC7tZPW/HwidN7vs0sI2mjTzG4X0qBMiNl3NQNWjYLNX/eJt1YqONyKYWEK1f2LCXggdOr1X3xC0TAz7KM/ifVxjHwWfAjaSJHk8z3urwpYAN5yhhQZM2FMwceHAI49fFfSpJWZy3lvggEWQjb+jiAoF4h1S3PLDvNeVmXf/jY5J7GGfd3DTNJtscVy7Hw6Rw6kNwGVaB/8DxB7onHD07wKpQsWRcFKw3JDMR1ScNQVWxCY7y9Uxt7wVFYODKI/fJIwKtj4t4BnVyvNJaX5iPHyaGPV3KcaUkPPHaIdGFvY/EfZKlPYiI8xpgUvw== 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=C2sbUEws9NrCOEpV9b2/7l3xtU2ocdRkuXIS4yCgPFY=; b=JPAZ5ceMVHVDHMxrY44wcIiXt23PKSaIwab5fI+cWFaA/xe3oOvifO2ZYnWam3adoq1jUigGUlw3U2wtwYl9yG4WezHaH9ho3taIyzZbiDVoWeZiYsb3ku+vNEnyOb3rQn+QiEzf2P4bFJy4uKkV0qWd2Y87iNn7wd7ohmzrBv8= 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 AM8PR04MB7444.eurprd04.prod.outlook.com (2603:10a6:20b:1de::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7362.35; Fri, 15 Mar 2024 09:56:27 +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.7386.021; Fri, 15 Mar 2024 09:56:27 +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 v7 7/8] perf vendor events arm64:: Add i.MX95 DDR Performance Monitor metrics Date: Fri, 15 Mar 2024 17:55:54 +0800 Message-Id: <20240315095555.2628684-7-xu.yang_2@nxp.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240315095555.2628684-1-xu.yang_2@nxp.com> References: <20240315095555.2628684-1-xu.yang_2@nxp.com> X-ClientProxiedBy: SI2PR02CA0029.apcprd02.prod.outlook.com (2603:1096:4:195::6) To DU2PR04MB8822.eurprd04.prod.outlook.com (2603:10a6:10:2e1::11) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DU2PR04MB8822:EE_|AM8PR04MB7444:EE_ X-MS-Office365-Filtering-Correlation-Id: da65f97e-62e1-4844-31a4-08dc44d62e56 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: us0Z3VO1jJaVA/7ESirEg+ZayZE5wtXc5p4fVAopHWpHZM2blOSu6Lt4DeY1fkRNWQ/MnITaQOqoSDefGBCRYykP0IX4d/soVOpea2RKIyY5yzNZ0NjN2SoIdAyljAb5nc/Zk6y1t4FguwCjH2gjtBjJG/HlnZocJFEjNd9wIxNDYese0KR5hXKzYOvL8F5Lr6cniQCYuyOQK+cv3uAfXVzgVwVp5EqYxiFHZYzW1uGQG1n3gQ15NDH53rS97/e43zv+kxMsGGIo1ATLH9ygoapBYA9RS3XotP+WBhaJYYUHl8aXom0c4htQtCVYm6b7TFgOtOOc5MMxqfxkyhMG0+tOL037lrokF2dBUM5K3s0fLzzjM9+PSshhq7BzknjGW1t7WY9lKrqd5hRtPU5KJjEUQCS5RaqGA3spsAOJIQjaPnL5Y4hU7Nnnx0KUYhr5nhZMp2RdPAqGDbdixYbd8kjUPNvVJ09yA6wKo4GAWlSkm3WPBocFFZT3e7uZ/T63lRPA0+Ki6eaItP2COKoe11pgvoqtntVJNisxRVbH9+8q+hWQNWpScHVkJeDH2E5Z7LJjQ+pBeHBPhcOuuQr5k9ksQjK1Fis07q5nj2h+2HHwTni7djdvM1N98GTO0CmkjrdDDj0Cu4fgEl9qcsdWjtSADwHvxmSnVy6BlHihSqxJutd0CO8wzZNnlweCklbcuRyzQGTyCwujddsMg6QKVuSe+nMW/yo/9G3mI7q+LM0= 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)(366007)(1800799015)(376005)(7416005)(52116005)(921011)(38350700005);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: AZcJNmgW6J6+Cq3YN9k0V3q6SQxyR25HFeBnswPdXvpJYDx9rf2x+6fp9Cnl6MexrWvhtdrGxNGhQMuyE2Fa5TrO0F+marBgMTHaZblBoutfpPx7NpEQjtQEnndsahc53XXsz23eYCgyB5J3N3G1AA6aa0aF1+g6/xwJDUSF8kQoaKWQkyf3jDNNT8xn+Q5NIs4J/pDAQgyBKEfeDidVm+OCSv3nJdQKE1uieIlLOVjoQncO0Hlx4KEbopLmeI1+C15GQF0xJIjMv4+c517HGONCR/qmAZ19W9U0bla+w5HKc4Kh5o/7tKKC5m/qae+cvXDZM//QS5JM1nccqMgGLnaDhuX76KMZnhwbdYNjZLxncy72bp7NhOvK2jZgT8NGiG1DvS6kj/3W0MaPuYAofYb8Ze9TjlKLM4xVjyg4j/wmWiDcNbJZiVKrcecvUiFnqlXdZWFEobs0omGEvxwelJVWzJ7GhQYQLRzfgP1dDmV5OpynoFYeMMd8xfWbQ3tuA5gv8pyqklapekErzwujOqTZTWu2CtbkUbhI7ua8UzsCJaWarieX1cTwJ6dNJzHoXmYBOw5mQ1JFf18FtpplPzWE6FFApUKNfMorXgpx/bTdmyZumxVOAnW5E0GqMJsJcREvHXYtGvUydYYfjMONl2osPM8ahq6LzA/utZ/D5Yk60xowd3CFDrEb9nWkdlAlEiFn6hJ1wEbUo/ssuNG/Qaq/rGPCpY29DQtRqGVAdCjL2BLvFDUfFFl6lYBoS21sjXFzGcQWdCLi8+1fwfsxpal2/iOSv4hKgoz0Wmjt4jQO5l40W0j6kosbIAmuVD+HTFVNYP4Jd6m9t+qDEtdjGMcbPsHC8OgriURi28H0cCsq1XhuU8PSys2SgmIjbH++y4ff8T7zSEFva9LyHNagROAcbtsk0gl3n9zEd7I02rjBvs3+hvJ1j2XelMrJ+JSAL+rqn/jl64abXPxdARHOpVRJ61FDG5Zdm04h2eDAPph03GJvfxJ1obh0w9zE2aXe+6mIgX96TQ+LfvBT9mJs9qBVC1yNUl0iUaIgqPE6GTLO9z4uv3EP2qc36ZrRE5lLXwtvx5Q7zmvhVcKKmryPcBlIRnpEx437n+f6wfCdzMMBhLDdI5HRfK4hnzw9IiMCxIGsDId1+/yzXLVi0zT7q3Y477Q/riURs0YtD6LnhKJ/2BFHu5VKefLu8uNn2ODnivD0AXX/VtsYGUqCAs4ws7f9lodppkhfc4d8u20sGpo0xKMB0IuPvFPY6calikuKop1i9zRdY0EdN4Zuph42oBFItrxp87ooHjtFg/i1fglBUoJVpk+15YKpW074qtLqwE+JofZZHN/xZpgYzg+1JMPxWkIdMvpxqmGZVQBgpUo3e/VsB5bDRJWHY7Db9VUR6Q/nJ99e7f0WMHTirsUIJTGvSpRyJfprM3jaacSLkJ+8bhLGam6SvpXJDYEXRzJQrvX7kWCX9UKeJs3NfgaDKUtdzDZjtJT2msF+tXi4vi8qKd6uDjtx9Dlafc3KeHAwlIr3ERDh9AewTKrR6SWfDN5JDhaFC7a/yVqHdWjG/GvLfBn+3eEY7NwNWRktQomy X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: da65f97e-62e1-4844-31a4-08dc44d62e56 X-MS-Exchange-CrossTenant-AuthSource: DU2PR04MB8822.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Mar 2024 09:56:27.3975 (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: VV7JuiAZOdkg/eBPi+TVjiUNzlRPPniusTFMwKb37HQATd0SyO+NrJMr2aoau63QJCoyC8pghtXEkquv2FLDIA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM8PR04MB7444 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240315_025635_019340_FEAD5C44 X-CRM114-Status: GOOD ( 13.99 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Add JSON metrics for i.MX95 DDR Performance Monitor. Reviewed-by: John Garry 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 Changes in v7: - add RB tag --- .../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', From patchwork Fri Mar 15 09:55:55 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Xu Yang X-Patchwork-Id: 13593223 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 80FC2C54E58 for ; Fri, 15 Mar 2024 09:57:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=H028SUC9NoaPeseoQ8MPtiV/OPS170DtYQfbgctumPY=; b=rC0feN/N2Rkig4 4GYTzE8cki96xBxvY2W3vLAhHEBbza+rK7q6DRI/Z3rRjL/aTnXSNVVqjFOFACeq4qjiskPdSeorV zzGnLbIxKh0HhqoJoSXhsep4gfQN5ZUKZGjls5OWl/laGjWt9o/BmhlexTSarERXq+l8RLdbUsmp4 d6B5HiE23OhJzglqxNpFWJs22dOopOZqM3OHxQZFGH5tUy4wJtNr75umeRRFYkoFxkGhU7VfTIrgJ nLk4K1D2NkYNVtO4YzDxInMECW8cwA8duYNF10ZmBKtnOdlOHWFfySWoVLkSp1tHmPJxKIpgH7hXk n3S0PJTjuNzVw15lKTGg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rl4JA-0000000HMxK-3XYE; Fri, 15 Mar 2024 09:57:00 +0000 Received: from mail-vi1eur05on20600.outbound.protection.outlook.com ([2a01:111:f403:2613::600] helo=EUR05-VI1-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rl4Iu-0000000HMgK-3Khx for linux-arm-kernel@lists.infradead.org; Fri, 15 Mar 2024 09:56:49 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=krJ6yUw7ewUF8vixYHbLe0o/8bA/3IvarojQ4iS7OB0ot9CHYhjWZHntEFWPaCPw+m1Ed9sFqhV/bOm/FuOxWN9/dDy2P70U2KckdWkiecN7/VqCgB/X9hRBZjwWJQhe9ujL6M0OLcZZPQcn/w3eBeQUs+KO8njVtAfu0fUCLZQKaVA2S+K6esw8AQsyaVnIr04fNM1WCeA5HHbPAfsMu920GlQiyS80W120oeamBOq6mL3ndJ4MF3rvqxslqgvrOov07Tnq3R60JtUh9NFq5LektKef9pcLNStlZKtc8icjAuHZ1AuV3e5SvITiji6U/7GYBNCYTwNpDaR6SOX4mw== 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=/vyDbuMctvpMPqycrjJSM65sHwairLUE/u4gLzHL5zA=; b=DSRR3xDhc8mXGR3GG5fb8EdbPLkgHP5aiOcIy3jI87iqh3YWhOyZnzxQ+Beg/JP5hUxIduvas1NE6mFJMhKMy65ahszzE6UN8u6tJsivZqjipiePtoo1uc5wIVle7ovIWzdqKamnblDmP5y8AyrmCnQk48sYDiV1pl8Ae7Rw7z1YEqVzC8ch8OP//jwZBBMMb9GEef3gX1wfpDowEfWxZguvPa0bhd48lUMcfy4aO5eusGaactOfs5Mmm5Km+K8B5ZwZ49pT4m9inujNp455hSEjhd+nZg86Ru7/t3lrbZvlP2qHHwWQh3PVvw22gHISlK53f+uRy5eg2+V/wbYiUA== 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=/vyDbuMctvpMPqycrjJSM65sHwairLUE/u4gLzHL5zA=; b=MVACsic42jNrMy3UsjhoCxOUhzPX0tFFzBSAJRKH2mgQyyh5hHQR8cQ2uyglOhrzf51OAu3CjFEkb6AsTKkx1kFQ2rH/GlyPTQpAwZ3rBllD3RjouTofMZU+2PBoEd8y1zsoI8LGSRId/R2kbHs0EYTDK1v5WlGUVGDlDDdWjdQ= 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 AM8PR04MB7444.eurprd04.prod.outlook.com (2603:10a6:20b:1de::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7362.35; Fri, 15 Mar 2024 09:56:34 +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.7386.021; Fri, 15 Mar 2024 09:56:34 +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 v7 8/8] perf vendor events arm64:: Add i.MX93 DDR Performance Monitor metrics Date: Fri, 15 Mar 2024 17:55:55 +0800 Message-Id: <20240315095555.2628684-8-xu.yang_2@nxp.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240315095555.2628684-1-xu.yang_2@nxp.com> References: <20240315095555.2628684-1-xu.yang_2@nxp.com> X-ClientProxiedBy: SI2PR02CA0029.apcprd02.prod.outlook.com (2603:1096:4:195::6) To DU2PR04MB8822.eurprd04.prod.outlook.com (2603:10a6:10:2e1::11) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DU2PR04MB8822:EE_|AM8PR04MB7444:EE_ X-MS-Office365-Filtering-Correlation-Id: 5e990d4e-185b-4481-0d4f-08dc44d632b2 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Jw08Qn/k8MTTF4JCIMIWwzkOhXQcwUacpcZ5v3tnWoTlIJU0AwjLTMFvu4dIkpwSQMLa6pxYCxTa3zvPAcqJ9CaCc7hCzWmzmWJn8FdfjZPm68GVjf06PjnRaqAgulINfeAK3XGSYIbtvghez1g9wDCx8/yZPLNkapMDaK/x460OgN5L1VDoxlphCnUPg/9FTLDgfisTUnxc3fuhHSB7T5ePmDhQ8IOQhB8IKCfZ8bUnD8L0Jg721VypZRiclTGJaUi7C9ZkpnzP9p95V+lFHyti8bx4VqqaBWlC4zfUlj7PtlBxHRZa3jXybXMpTseNbT16N8il7W8jt5F5dU7zBktVQJnw4STf6q8pQQ+GAQKiUH8o3M7ukDyjO1Bl49+Y22zgKr2ns5S+K/cIMHG8wFgZX0CT7/Rs05m1xzFQYz8UGLRNG1d7R+xtywI1X4XqfQb5Z6ZdtdQQwa+elNC4O0YjISbgfmIOAOp1rnUDO9VwfBx1U41jjcOFavMY443Rcl5/CxIMLyQh8PXC6Tq5rUgnRMgpxVsBxrEv6BlU6w7Ykb0X6geKsyK1uYAfpauKS7GdKE7+ldHasbSyfcIxQR1j6s4J11TWS/xr2aR28Em411FwOiPsEdb9tuUIWjqUheRxcZ/WP8g/I/QozogtYuhC9+PoTXbh/EGHEI3pv6ufOPd/3ooOUrRI/4zrxQeTWj4Q6txqt0lxTUZE4tjaSY/UTUe3TxzSdu9+g+SSXuw= 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)(366007)(1800799015)(376005)(7416005)(52116005)(921011)(38350700005);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: g43Q+tXVw4Ybt/ZXMquurnvNwnRHUhIU2c2Ee4UlZpaKXkc2bjz9LMZ+164aOOq7iewUDJDgu3VlTVU7U6GY7SLL0qUPVLY9QLycsxEaGMIO5woXqC1VWJzf6pV7poKq1F91VwztoI7fSg6nC/zwFwXk1nLlCefZF58g6XD6AmVMPAyyyeLPKJu8o4L8QzJn4JjYBnsRu+PRiE/Jo+PDc9tpWxsivq4Pn9lYgbR8TEBpEHesuvkOFLivvrcDPGT3QQjC+sxfok3IF5SbJlM6Iv0RSqtJLdJAHjnHdzvBepN1w1H38a1z+axpuSQosevIVOhM7/UpzId61Eo+ElX9d21/fQFnqjlW5qCSJMvuOfg+4JRlND1j+Z88bFkZVUfRC6ui0qLrY+WefQzEOnzsNowm/g1p50f8seDNXFcM7kmg9Jbe3R3dJULv2xLLVUa+uNRU9H03X8PQD0s07Gpz5A4ZK8ogngUX/ZvHN3IyPpGHDV1Iv5eLzMZDOYLPrpF1EqWMAWyM6vGMWARY6zoBJpx3MRLQRIbmeljS1W9z5x7AIy19UbLRMFVqv6DhM+4YRLqSncZvGiwMpyhU8/d8LKn2zT8mF+rGjL9lqsI5+29UqLT/hPG/0X79oiZ9mZy9ECX2O13rEdJ6n0Fxt5XTDnX5rxcDmZEKkWU/sDLS972jsoxJ3/uxQE5YWRxjHniVB66dnWy5eVP2xqpvdguUVmCfNdT1lghuESCxvif5jqNchjCwpnMZukLfPQz9GVqCHw0wY+VjRGHwqZwQzYcObgn0odMxFrxL1mLVrejRxSAhha4TcmqMFY5KqAsZ+EYeM6Ar+ziHpcpfA+bi/Rhy5aosqxUDz2JMgxkwVI6mn9Hm8MTBRuxCLyhj63rUTyurgTeRN29bsZS0qKXOHkeHom28ITLDypwPVCSQzQvyZ4jjF3fE3LhdP44ksneUJ3sfsRfL6lZ7f2pBa+STNKko06u4nTZtYmNE1pfL0cxhJ8Yc+1/fsGtA0kmdlibuR9Vddq6jptpqvrff+MNjON6Y7oBwQA69ZxAfnHYDUioIxH/IYdgSBEFSfeE5bZPApuruxi5y3LoYd6x2Tb6PXgBuA/JGEr+9Cz+Ukn9KjMY/BbgV8VrAlUJ+rDAQcdolSk6wv/T55gUJfN28Yp/MYyjb1gAF1uB4h3jcFpKgup631E76YxaMwapcxMQUnyYZsA9LnPRBLwJvZ0rMnhEb285AKX9OBgoL4igFvUN+Lv0bkiWM/qiRGKOHH5Qmr3HoqaLHM0DDeZpNPNO/DbopCeSuOvwUltzKKO9Y+IC5/L5DsItfxzdsWBgv/LWzwfRab6Ae0yynmYa7XV3cbZZx0hQupEsXEJRtRTlEN1/HNyLBRSwiggxhkZyXGv3PWMwjdXG4ILuW1hOxsv9ZCZvvAOG0D/1UTsmf7VtE8hfEFBht0x2H4n12HKNuXqrF5aEjoW57zMFo3Itv2l850Qy/XDw5QLdUfnC0Zm5guSeDnPLCuXM5MHNO39O4idvL9UpoR2JR+sJB+If05IQaS+0rsqV5d9z4JOe4sqty3825iczbIHWQ9ZXZlybUScHqRYk1rSay X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 5e990d4e-185b-4481-0d4f-08dc44d632b2 X-MS-Exchange-CrossTenant-AuthSource: DU2PR04MB8822.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Mar 2024 09:56:34.6433 (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: 1TlgGlF6lFNdluvBtxYiFMLaRdiZJO4Dd4qh5JIKsCrhsEjlGWlre2aPN5GBYt0SvP+kZct948fcR2fttS1PWg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM8PR04MB7444 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240315_025644_965735_2C596521 X-CRM114-Status: GOOD ( 11.45 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Add JSON metrics for i.MX93 DDR Performance Monitor. Signed-off-by: Xu Yang --- Changes in v7: - new patch --- .../arch/arm64/freescale/imx93/sys/ddrc.json | 9 +++++++ .../arm64/freescale/imx93/sys/metrics.json | 26 +++++++++++++++++++ 2 files changed, 35 insertions(+) create mode 100644 tools/perf/pmu-events/arch/arm64/freescale/imx93/sys/ddrc.json create mode 100644 tools/perf/pmu-events/arch/arm64/freescale/imx93/sys/metrics.json diff --git a/tools/perf/pmu-events/arch/arm64/freescale/imx93/sys/ddrc.json b/tools/perf/pmu-events/arch/arm64/freescale/imx93/sys/ddrc.json new file mode 100644 index 000000000000..eeeae4d49fce --- /dev/null +++ b/tools/perf/pmu-events/arch/arm64/freescale/imx93/sys/ddrc.json @@ -0,0 +1,9 @@ +[ + { + "BriefDescription": "ddr cycles event", + "EventCode": "0x00", + "EventName": "imx93_ddr.cycles", + "Unit": "imx9_ddr", + "Compat": "imx93" + } +] diff --git a/tools/perf/pmu-events/arch/arm64/freescale/imx93/sys/metrics.json b/tools/perf/pmu-events/arch/arm64/freescale/imx93/sys/metrics.json new file mode 100644 index 000000000000..4d2454ca1259 --- /dev/null +++ b/tools/perf/pmu-events/arch/arm64/freescale/imx93/sys/metrics.json @@ -0,0 +1,26 @@ +[ + { + "BriefDescription": "bandwidth usage for lpddr4x evk board", + "MetricName": "imx93_bandwidth_usage.lpddr4x", + "MetricExpr": "(((( imx9_ddr0@ddrc_pm_0@ ) * 2 * 8 ) + (( imx9_ddr0@ddrc_pm_3@ + imx9_ddr0@ddrc_pm_5@ + imx9_ddr0@ddrc_pm_7@ + imx9_ddr0@ddrc_pm_9@ - imx9_ddr0@ddrc_pm_2@ - imx9_ddr0@ddrc_pm_4@ - imx9_ddr0@ddrc_pm_6@ - imx9_ddr0@ddrc_pm_8@ ) * 32 )) / duration_time) / (3733 * 1000000 * 2)", + "ScaleUnit": "1e2%", + "Unit": "imx9_ddr", + "Compat": "imx93" + }, + { + "BriefDescription": "bytes all masters read from ddr", + "MetricName": "imx93_ddr_read.all", + "MetricExpr": "( imx9_ddr0@ddrc_pm_0@ ) * 2 * 8", + "ScaleUnit": "9.765625e-4KB", + "Unit": "imx9_ddr", + "Compat": "imx93" + }, + { + "BriefDescription": "bytes all masters write to ddr", + "MetricName": "imx93_ddr_write.all", + "MetricExpr": "( imx9_ddr0@ddrc_pm_3@ + imx9_ddr0@ddrc_pm_5@ + imx9_ddr0@ddrc_pm_7@ + imx9_ddr0@ddrc_pm_9@ - imx9_ddr0@ddrc_pm_2@ - imx9_ddr0@ddrc_pm_4@ - imx9_ddr0@ddrc_pm_6@ - imx9_ddr0@ddrc_pm_8@ ) * 32", + "ScaleUnit": "9.765625e-4KB", + "Unit": "imx9_ddr", + "Compat": "imx93" + } +]