From patchwork Thu Mar 7 02:47: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: 13584990 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 08A13C5475B for ; Thu, 7 Mar 2024 02:48:41 +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=urdfnLOoaYA1lT1W1wxTWr8Vq4mlOFR5P39m+5Os9nM=; b=W3HqiPmc/2EJ3K URoggJqS6iq/83Em6vnFm6OjYu7isOJHsPRZ1faxAld1R4eSNdkPr0WIePKbgEYrPIwxO6ZU18zwu epYmTWDryjj7jncAzpk8bElWEtY+LAZV2KI/L94JaYVpLwUUaj/aBbx8IdJfvP81uAdO/CgVEVWFh 4A92fFTqAUEvnJe2IQ5u3R4qnUtdE2W+XqhDQJFCyZe91spmPDDOrvA3X3xmhpKCoMapt2bJOnYsW /x7U2SqRZ2TYDah8zxWmaq4VKJMjuvAkBsktzyE/KNu9UBpfQ910JcfwAqjEw+dHTVg62EIqHpNIB gTec0OU+EJ8RA5wUQYtA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1ri3nr-00000002i2l-0BrI; Thu, 07 Mar 2024 02:48:15 +0000 Received: from mail-am0eur02on20600.outbound.protection.outlook.com ([2a01:111:f403:2606::600] helo=EUR02-AM0-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1ri3nn-00000002i0d-2pKI for linux-arm-kernel@lists.infradead.org; Thu, 07 Mar 2024 02:48:13 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=hq/Q1TUWg+Rt+mYpJw/g/c0zpPj1lPYXGkURkaLI9wzyCcljBf/icl6ZfLEDNrWkXuOx7xV328xuGv5s6881FvxD0wAbNLZGXkHuyD8g2DgmiSZuZikHfdy5TNXfyf8xS0WaDdGPmeXdyLtDzfjEGmqSkDyrO8Vsmqf1TBQNDDyphs/BSZtdYJ5Kjq9zAfiFSlei+fMEIr3MAh2C627qrZ7Lyq5lnK4/rXVoy+AHLJCZmjxCQt5WX+we52HexOybhrV6QxqKaRxT0aAIaxBxBjFdOfI6xltl4sTOQe+MXwOynuFV81xwZvtU17CCSSKmlJynD8dBXIK3y9PZYyEL3w== 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=daADBYoLpyfi3gTVesUrgMfOc3sM9N5CfKz3mR+j+/g=; b=Lqy+FVgfNHwTg4JioLhQO7ij6tp6qgw4mzgLIH25h7I4lgO2lYeC/sxvkCB5mBqzqXflnSKMZ0mAJRGy9mBRnlhxQTH6UuoaSrdeu4BpJpHtsG94SOeMIb2yAofRzDEOC9idFtVTQoWh3OHRXW1bpu6ssXwZcK5citehXQ8xe8JlaDPNuH0w7G5FjOwuSzr+BrZS1KbQphCV1p/9MWg9VnTMLlv2hPI83n6bZXBM+igMkKCDyWzLwubFEyeto/1l7vw1SJ87ggETTymjAVguBblbYImHQ6AZkb5gxJXODoPttp/3XAgsS0FPQxugI85VafDOV6mtxH90/E3zIri4zg== 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=daADBYoLpyfi3gTVesUrgMfOc3sM9N5CfKz3mR+j+/g=; b=skoWgE83iN3xC58PV/DR83mlH6LOWVsDaCpU843zMV6/gF3uRdUhlQwVog7T/YJTMbnxhD3/9Bb2qwxdzqcb/Z+XHsWfRRaa8/hHkVZkTic6R6EWFE2+q1r2bYZeFG54WiNnHkOeeQxZJ+778mISb7P1NP+BHaZUcyrfRTjk8KE= 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 AS4PR04MB9338.eurprd04.prod.outlook.com (2603:10a6:20b:4e6::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7339.32; Thu, 7 Mar 2024 02:47:58 +0000 Received: from DU2PR04MB8822.eurprd04.prod.outlook.com ([fe80::d45f:4483:c11:68b0]) by DU2PR04MB8822.eurprd04.prod.outlook.com ([fe80::d45f:4483:c11:68b0%7]) with mapi id 15.20.7339.035; Thu, 7 Mar 2024 02:47:58 +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 v5 1/7] dt-bindings: perf: fsl-imx-ddr: Add i.MX95 compatible Date: Thu, 7 Mar 2024 10:47:48 +0800 Message-Id: <20240307024754.3469810-1-xu.yang_2@nxp.com> X-Mailer: git-send-email 2.34.1 X-ClientProxiedBy: SI2PR02CA0037.apcprd02.prod.outlook.com (2603:1096:4:196::8) To DU2PR04MB8822.eurprd04.prod.outlook.com (2603:10a6:10:2e1::11) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DU2PR04MB8822:EE_|AS4PR04MB9338:EE_ X-MS-Office365-Filtering-Correlation-Id: c437633c-c45c-4d50-1037-08dc3e50ff2a X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Q25fWkSa6utcxDVlW4oGMCvz+hYTCM5v4SvN6oVa9086kkeebztfIqsNzjHGcgA7zPs+olUjeXHvUCgsmZs4aUnmvsa6ldqUX5fcsKIPU6taOZV7JPMuDl/KLRuroZ+sDbTEbz6nJfkhTy0nm2L/FmEVHIxmPUDcCqM5Jgo2LjBi1tzccysM59DAX0ficfyBUuOuWbvqQeYdu/KR1Gt0Z0YBjM1VL5GTFRvaom1DD/kWV9M9ONqCov00oMthv7HMtmn3TDm0CJG8CbeiwAN0xNuGH7vaMYGAlKexISCT9JTcXb1tbFFlb6uRhdBIMnvaq4zx6CavsQLHb+7tUqQDIaaYnBP1mogyxC1oKorIRmp5C+Nnejz0VvHUBlm9rmMbdt3cja/nUFBm9IGo4kzBn25N+FvmeLKNx3peHkkZ2v9OLi78LXmFfPIOXy9w3fvAiGIYf9AOSxjpJLgWqTTxJ2tJ3Rgt0s8oh4GgiPWzZ/kXWuZmiTIiCXwGNVRcFaq7mJpIdwcrjhLubjTe6SPrMYtDHWnPDj2cfJu/BpkT+Q9EOdRfhA4VkSpoJ5pgGpDrKdk73eWdncYAmrHO9HTVzBdZ4bhZCf8WkWflNUiNGd4uIrFXlyLyCO0ke9G9BCctiFCC3BdF/eCfqs0aWcViQxhz2wJin9rqYl5SrzuVkFNhnm3x+UKA/iQWKkGLLvdGXsFJklUqS7uPQV3AdsWQWBeD4VGqU+DGNG+huzXhtw0= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DU2PR04MB8822.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(376005)(38350700005)(921011);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: yWbrcy5kz485BHk2cCIacccXb25YRlHqfT6Z6L8oYcm0GSR+U3crkjZpcluR3y8c7E/FRnRXjKd3mJh1tIBkH5GVQEpiqDXuvKdny19W2Qy5zwzIx++1Yx77C0vfYMeHowS5FhkZiJZ5lFHP5ddLZUjdLRYuS74lxa5xrGZwINeATbJQMoRXkCDCYA7+PbndI6lXgXoceObTL9pCNsgRaYGkVZTivHTlSOTh3GyT1juf19MJoyMtNVKgj+3+ZEAQKZuevbH0lBFK0r0j3/qTkCEdTKfwknP0X61tS5yZ9bYUTwy7+sjKm9VtkfuKh8LlyaVSzPS2LHNH9U2nF5I6ScVs6uHJ17a+ms3E6jlcI0mvjmjmG6U+0oL3PuoGlo+JqmD4k2moONPnGy98lK2TW4pw9RC79mVpJNl1zGUf5bx3McX7FacyxQBTgBZwqP16WokQzla8R3Y9SzYMC1jgYHp07RJ6cxhqnCsXELjl9pG/X/o0Ugj1IIGeRFBpxsJBDrMlqNB5PSE0Abj6AhYoakTDjmcUwIoHqWGQ5Re6PGixmxrd6ifgmNBBqc6C08umaZIR8k0az+OKpdeB6NOhkD6YHk0KHKvAf21mbHLTddilgjLhRwe953J69lsgAnA1gca6qI5V30va7+FLmnISFHItoagVSGtF1JEKdsuTLqJ6QHF/nzc9CTpMclnb5N/g4ynGw9U6iM7T+CJRG4UMWUtelt8wQqEGDEK2gvjetTF3pCO0IgqIf5lQZfymiYZhUyotQ6IPzF5coR6FEuVc7M7d2IFauCX9CELSoJYn0qh9AIu+jiEN2SuqX/LCVaj1uCGJsV/g2s0BUaoLxLiMl3MYq3WMoLUf1ZngRvaVCjEXseHFSRZvQRRdXqqnC/DrLg4zNwhwootsiIFYQ/3axC4WAojuGBJzowM+jOB6IC5XtFVxiUfIvGEkcev/pz/x/mFZymgsjaYF6YY5Weti9h9QRWi62lGNCK2EcucIaHnZKwqBAa5zpu8uJtDMILVntNc1eE7pi3Ua7AWeGwLGtmH2tm92M+ElZXHrcYfuJb7lHwXff+iNPwqQmNqRMm42DeiX3SfGQluKhyjpDpdlLR3dJfT4CnBPmu6iAiOqVnXGMiYca8gCEbZvz7BFLq5QZnCpopIv+GeJsLc6ero9wGTmtIU9JvJXWu0O8nUuQgOeY6ItUV/H7DJve3a6L/TwfmGG/CbAYcw4mif3I7zVGMXJPiuhJA6GSzepjaGF8r8mB8WBdZ+dM0NTM1i+myJ7OrAEspEkformXIqBcbUL74TLaDkPo33CdTOGarrllznoWAMCd5C8HU+F1F2wOk7XpSt+YTD8LPUCPjyBGyT+ED01jM4up6fmgoepozq3SBxG3BRrf64ybOdAeYoLMwL0L4YsmXQthn8cYJQi1HHzCJmu9Isj8HUVOlgC639LbfbJamoSqZAmrYxmTMJnaf6w4G+uq9mKrdLNaFomw4klw9pdcnj8s3HiCHPDLBoaJeGZIp29GW0uv7PplNmJwxhAgBi+rdnG69lWpaQfTn0cFgnqQ5pTjuiSPfnSbx32ZmJ7P0toIElGMzbE6AC+E6t2 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: c437633c-c45c-4d50-1037-08dc3e50ff2a X-MS-Exchange-CrossTenant-AuthSource: DU2PR04MB8822.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Mar 2024 02:47:58.3280 (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: /HwAimhwdf1u7jzHvX0uXO8FFmDi82ujHhkYeJ7RcDIVLswyj0JVSUNCNujOR/aRb/bvUIdQhhTRZNeEffEXVw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS4PR04MB9338 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240306_184811_723498_55A2516B X-CRM114-Status: UNSURE ( 9.61 ) 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 --- Documentation/devicetree/bindings/perf/fsl-imx-ddr.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Documentation/devicetree/bindings/perf/fsl-imx-ddr.yaml b/Documentation/devicetree/bindings/perf/fsl-imx-ddr.yaml index 6c96a4204e5d..37e8b98f2cdc 100644 --- a/Documentation/devicetree/bindings/perf/fsl-imx-ddr.yaml +++ b/Documentation/devicetree/bindings/perf/fsl-imx-ddr.yaml @@ -30,6 +30,9 @@ properties: - items: - const: fsl,imx8dxl-ddr-pmu - const: fsl,imx8-ddr-pmu + - items: + - const: fsl,imx95-ddr-pmu + - const: fsl,imx93-ddr-pmu reg: maxItems: 1 From patchwork Thu Mar 7 02:47: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: 13584988 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 425FBC54E41 for ; Thu, 7 Mar 2024 02:48:37 +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=UVDFuM6WHnz01FsG0QfuvJDzHbfC6wR1aoVIaE24XFs=; b=1WOauXIWl1pgLb 5Q2ycZDXTc/fMvs2wS6vXp4kQUx70vH6U+08G8QIqa04wKgFjsUxXhngiX6iOHErh81SDWtP2AQ5+ MKVVzGs89w/wc30S2ew0VikoSmEMJOnQDbqT6aGYo2XjyaOziLLczdx5gJ9EKqmDlpS8QynXse485 ZVqFOwFHRw7G/adtSI5TreROCYb9pZ0vIfh3opbThjJKHkWozonDurGHlAO3QNKQanQLaJtgsQgt1 tuTRa8g7oTMEpkX+TLVrt0Mlo+SUVPo1yhEAHQ9tFY2xaoRDuG8eHHIMBLrBBYUNdOeJwB9fIW24K J54BBsSheotNnCobUELg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1ri3nr-00000002i3A-3qRQ; Thu, 07 Mar 2024 02:48:15 +0000 Received: from mail-am0eur02on20600.outbound.protection.outlook.com ([2a01:111:f403:2606::600] helo=EUR02-AM0-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1ri3np-00000002i0d-1q1l for linux-arm-kernel@lists.infradead.org; Thu, 07 Mar 2024 02:48:14 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=hoDSMvwI+dP0iWDmgDO1IYjpRPJ3wvTeWdNDZfFlAyn3Zyv7tnSHcNqgKdvwHz1RRGEI7tSrhzuwFXjf0sfkbn+fvMzJ6E7qr8Az8QHXWlaz36rd+3lOd10ceKDQXc/9Ib7HMQB9G3hbKN9Um4nh3L9m+4cbYRngLBd4/14lYWsRIwLKbaSPzb0fQRf87Llupv+6pSZVSFMM1EFMc8btj9GzKsd/GKnj6WYd/k49fAHqe1KgkdXTnJNL/Wku9rflIHTU/6Yz0ZA8aObljSpWGwnKEo419MRHoM/TtBKXEEdyrg1e8xjPXyc2+iN7HNYDTZcjoyqobtdIBRDOdG80LQ== 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=z5yzhS0OEXfsRQkqgy578gHVZSOeF3kdls5HSX4c0xM=; b=JqEQcJka8BYB9KZQwyKlXgV4WpWOvzxuw7t2iMgzblUtbPiSuxW/DFSvBtJINcj1mhrSOp3Nn5XVNKhaJKjo1StO3E95p/UMD6+eymHU2lAbJwP5TseH3GrjBopyLAxLWXYyBRztnewNSkubpJBEZZa6mlcxUkSnQBLu2mVY83lu4Tvk077zzOiWmu1kMmM7mGDyL06cVauEog7PbM/A/86aUpJ/LtSGoRPcx4l9FMTgomUtDlv90h4oX/qwuzSPxaUVl2DfaV0m5l3rAFzkbQUMB726/u8uRtuZ/BtYTToxTYEtsVX8xYF5U33sRaxx3J1PaNI7OV51q4LVDE9GHg== 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=z5yzhS0OEXfsRQkqgy578gHVZSOeF3kdls5HSX4c0xM=; b=cXTQzEyqH0m1wi2lcG/yVOIqfb6ZmkwAJ7S1CXUvaK/yhH6FY+Y9EClhP3c/5ZcGTCZPkZ/praCMzEtjVg/w9KkuZTtDn6sYT03LKFVoKowL84mJoYSBaMItJEFH724clFK/6fkAYP3m7ZMl3qW/wxk2bGKBYuNWfwP2MdWohR4= 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 AS4PR04MB9338.eurprd04.prod.outlook.com (2603:10a6:20b:4e6::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7339.32; Thu, 7 Mar 2024 02:48:05 +0000 Received: from DU2PR04MB8822.eurprd04.prod.outlook.com ([fe80::d45f:4483:c11:68b0]) by DU2PR04MB8822.eurprd04.prod.outlook.com ([fe80::d45f:4483:c11:68b0%7]) with mapi id 15.20.7339.035; Thu, 7 Mar 2024 02:48:05 +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 v5 2/7] perf: imx_perf: refactor driver for imx93 Date: Thu, 7 Mar 2024 10:47:49 +0800 Message-Id: <20240307024754.3469810-2-xu.yang_2@nxp.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240307024754.3469810-1-xu.yang_2@nxp.com> References: <20240307024754.3469810-1-xu.yang_2@nxp.com> X-ClientProxiedBy: SI2PR02CA0037.apcprd02.prod.outlook.com (2603:1096:4:196::8) To DU2PR04MB8822.eurprd04.prod.outlook.com (2603:10a6:10:2e1::11) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DU2PR04MB8822:EE_|AS4PR04MB9338:EE_ X-MS-Office365-Filtering-Correlation-Id: a822dd32-e456-49f1-a4fb-08dc3e510390 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: ZQ2JYIGrMDkPhVM3voS+LaIDlaFovCt6bc+WYnqVVlsTD4rJT/vBFs74AjJZvt3RwF35gahhQZyALy7shREAx48/3XLrV90Lc85C3jtD8wBky4wZBbNBFmQu2OOt9TicsWf+yjp+dqsBI/ife9e0FWlRZ33OJn2xMe8rRDBDQ+sdPthBEAp371QACNV+R/ykY21ApHRe7lscZY8i73DIreGI10wz1D4hpe06EvrQ6JYG9Xc/sNlUrpGQpGbQJGk0WqmHej03MeSKCwVvMReVu2q9xLV//E/P51iYkQEgmjME8D/1/gtjWnwCBFd4T5fWhuCG+FXlaC9F8000IQD6YCubfJuhBmQGVXAj0W4U4Nw5aFpYoqJNiE/wEBRJeSOWh46X+Y32qOIg6CSLV/nOAdeXl12mjmhW0vfbjLAWxaviAKl1SDK7D/td2RHx7ttYNHoxrYs9DGmsz6Y44NDnLlSzAaUwVLTEEQSMZiikIC02AkLqf8FQ0jDqhgV4AjIS69STJmv/Cfn61/iRy+Y+ouiBwkNrq1rNioF581IKEgSz0QtW8Uq72NsuQ21CY2zqRpIOfKYXtpWTltd4fp53xCTUWsyYzgrSsUhdkyIM5OMacKhJejvqPYLIdq/WMrcJqCwnGO+YMQ7nla42iyXWbrcW2AMaRqHi88Of2UYSvLhBNTxykl/4gSnKgO7oG6AxS/AzcwGmgzCqjMzU+DS7YKlezNS45wvkVSRtMeWqZYE= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DU2PR04MB8822.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(376005)(38350700005)(921011);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: KXv7a53pZU4jubmfHjz7C+0xpQ6q4unm2cQcLWmtmnlXsJ0jp2ohmMTl4yHhHA6tIKsSX+rRRdt/NCHqsdE8L2sQpSBbWXgyH7XAAgFfK+1wuBD4mpD8X+zM8aL6fb1CLqA0Vo/n4OxogEWWzKYQ/zJ8ne/7uqmuCJEKH4dHp+ItNOIXNuZRVL7iHvHOLqBV+v/bUn8ofrts/iHJmk9QU5EvOwGRJIdQYuUuULC4ZUJ4D2OPB/g4Gb6OLZEO8ww0C0NmshyNNHXgmmK6cAddPk+PCT2HA0uH+WzjF/mGq00rqr40LA+2kF1M+CYs0yDALA9V3Hj/4ZGSkYbfVwhscYUn2lkwfrkosr6I4rxngphVShlagcBf2mQ/mgduM9v+9uXCB7liUpQ9XTcnceFWMvokggWUuh1iW9UQbBvlFwp6emmgpeI18z4IHxmo710H9mfpJltrsuids9sWDJMQ4BLnkiw7jpvUucFQcYxc+Kj59V8hkh+JECNnK7DjjyoppflwQrKXXmYcp7JSsBHwADhTV63QENr9X0iJU6orhoKSgsMSBBaR4GyGZSESAmsCDpRkqI0Hk1YgSavHLTaWuGhxCwGl2JeaYgnSaikUplsH4R1EyxhL/rJFOKU16wdPpF/LXlrYc0QHfZzzUn8DUAAiqqMXTvs4TwRCCjuy5N1H8amXGVlXlw02tzrxaGeXqBqqNrQ6GB4PdfrIG2W58Bsb+Rto8G28CiSq1dg02ikrpmtRpwyoO6IGaGweIJ9V2wQyk6mChKau9oXub3oCMUuOdP/tzPcYD5+hQRNAyerbkk2ekmUNiQ23plVNP3dIu8YnDUqHRlMLGmZM+ZghbftEr42ifiAL9oO4chd5P8BjWY/j2quEdf2zRk/xCAJ07258bZm5lW0iB0HfO7MwmflFtbL+v4o1/vliRvkyyWn5JhneandUsZ8QjRlAyx/FiDaKkcYOmSj4M1Su7dsxr5CbAWApwgfgK3GfWQz18oPb5c+FqmGfyc2qETP8LxI43It4pLJAkYfFEVEcaooLGS4JZrc6Ys/SaI8nfmqwdLHm/ab2FVc+G9R51LpzIVmiftc3brX2JfGV8d7Bp58j+85P4E7n4o4x4lqS7M26Ac+X7nd4mf0kocF3XWGJ1PljZcl17wu2OV8cC0yhAd9hh5LsIgIcm6mTTJ43aU4pZxKMTHFmayV+D0texYlHK6lqKF7luLECUIFOj2KvdOsNMhmDFEXoVgzC8ov3q125up+KWUnMsQovcqa8q7/csgt2H1HSwxwXG9Im0FcA//g7a5ouM0SKuCQ1k3cn6tgCLVoYUo8fO/yw87vI9KAOiKeHQ54V7IvajI++8H4pycqmfVoSlr9qNnoGLrHn3gjQeEuragCtzflcGCEUr3TSq8WIb4DG2Kxm77EOZ7LNjloU/9L15odbKMkgiT2+MK5BvCh1DusuoTbPkDbIY4L2JCFxmwKj8QLuaAZpEgAwPgG4GebfL+YnjlxNACdrUTIkAi8IgIbcUKt/rOmMUbOD7Zlupbg56CaY4Kgm7O+6thyHDd2LdzBmSZCUBAZnhh6PROrZmPr1K63Y4iGe9EXM9dH0 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: a822dd32-e456-49f1-a4fb-08dc3e510390 X-MS-Exchange-CrossTenant-AuthSource: DU2PR04MB8822.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Mar 2024 02:48:05.4554 (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: /46YiFY/HKHBOYC34+bnXk5W8B9G1WwPNIkKy4z/nh91oP+HR9a0vI5sa0mG3ZljgrDoH9OUjMaR5wVUnNldnQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS4PR04MB9338 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240306_184813_507109_634074C3 X-CRM114-Status: GOOD ( 17.68 ) 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 --- drivers/perf/fsl_imx9_ddr_perf.c | 66 +++++++++++++++++++++----------- 1 file changed, 44 insertions(+), 22 deletions(-) diff --git a/drivers/perf/fsl_imx9_ddr_perf.c b/drivers/perf/fsl_imx9_ddr_perf.c index 9685645bfe04..f4dca813b174 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 @@ -71,6 +71,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 */ } @@ -178,7 +183,7 @@ static struct attribute *ddr_perf_events_attrs[] = { 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(eddrtq_pm_rd_trans_filt, 73), /* imx93 specific*/ /* counter3 specific events */ IMX9_DDR_PMU_EVENT_ATTR(ddrc_qx_row_collision_0, 64), @@ -190,7 +195,7 @@ static struct attribute *ddr_perf_events_attrs[] = { 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(eddrtq_pm_wr_trans_filt, 73), /* imx93 specific*/ /* counter4 specific events */ IMX9_DDR_PMU_EVENT_ATTR(ddrc_qx_row_open_0, 64), @@ -202,7 +207,7 @@ static struct attribute *ddr_perf_events_attrs[] = { 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(eddrtq_pm_rd_beat_filt, 73), /* imx93 specific*/ /* counter5 specific events */ IMX9_DDR_PMU_EVENT_ATTR(ddrc_qx_valid_start_0, 64), @@ -237,9 +242,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-7"); @@ -361,7 +383,7 @@ 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 imx93_ddr_perf_monitor_config(struct ddr_pmu *pmu, int cfg, int cfg1, int cfg2) { u32 pmcfg1, pmcfg2; int event, counter; @@ -372,27 +394,27 @@ static void ddr_perf_monitor_config(struct ddr_pmu *pmu, int cfg, int cfg1, int pmcfg1 = readl_relaxed(pmu->base + PMCFG1); if (counter == 2 && event == 73) - pmcfg1 |= PMCFG1_RD_TRANS_FILT_EN; + pmcfg1 |= MX93_PMCFG1_RD_TRANS_FILT_EN; else if (counter == 2 && event != 73) - pmcfg1 &= ~PMCFG1_RD_TRANS_FILT_EN; + pmcfg1 &= ~MX93_PMCFG1_RD_TRANS_FILT_EN; if (counter == 3 && event == 73) - pmcfg1 |= PMCFG1_WR_TRANS_FILT_EN; + pmcfg1 |= MX93_PMCFG1_WR_TRANS_FILT_EN; else if (counter == 3 && event != 73) - pmcfg1 &= ~PMCFG1_WR_TRANS_FILT_EN; + pmcfg1 &= ~MX93_PMCFG1_WR_TRANS_FILT_EN; if (counter == 4 && event == 73) - pmcfg1 |= PMCFG1_RD_BT_FILT_EN; + pmcfg1 |= MX93_PMCFG1_RD_BT_FILT_EN; else if (counter == 4 && event != 73) - pmcfg1 &= ~PMCFG1_RD_BT_FILT_EN; + pmcfg1 &= ~MX93_PMCFG1_RD_BT_FILT_EN; - pmcfg1 &= ~FIELD_PREP(PMCFG1_ID_MASK, 0x3FFFF); - pmcfg1 |= FIELD_PREP(PMCFG1_ID_MASK, cfg2); + pmcfg1 &= ~FIELD_PREP(MX93_PMCFG1_ID_MASK, 0x3FFFF); + pmcfg1 |= FIELD_PREP(MX93_PMCFG1_ID_MASK, cfg2); 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(MX93_PMCFG2_ID, 0x3FFFF); + pmcfg2 |= FIELD_PREP(MX93_PMCFG2_ID, cfg1); writel(pmcfg2, pmu->base + PMCFG2); } @@ -480,7 +502,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); + imx93_ddr_perf_monitor_config(pmu, cfg, cfg1, cfg2); return 0; } From patchwork Thu Mar 7 02:47: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: 13584989 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 4E029C5475B for ; Thu, 7 Mar 2024 02:48:38 +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=bJPIjaCCV48OJlBAkRLtUkoi8pb/YUKFCnjMjCD6cco=; b=XDrSIaUKRL7CGq +gfOlL8MW0F4SlDOApHGx6fVdwyq0pVsq8bfeG8jMDrZ9+JzLyA3yhBy1qohaJqtSfKx+EXS+KoSI xOibU/aZtEW6YBco1CFWZMst2x8QfPUUPG/I/as+wPmEcG1rxBMfaqjn0r70s9YkvCzsOG0ZhpcLM vjmH83+VAXtOdAwWqXCS8hI1iQBi+qA2WT5/Z+i29irx8cTE86gC/oMrT/+nKan6khfyCEnWEfapc zR3oLV4DOUPl5CX40avdXjaPbs7IQeI5Lpew+uN68EaRoEJ17H1cha6Kyoeh4CfBqyV3UVJJWrKq+ 0rkHic67d+aFvBGetKTg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1ri3nz-00000002i8D-1zFT; Thu, 07 Mar 2024 02:48:23 +0000 Received: from mail-am6eur05on20601.outbound.protection.outlook.com ([2a01:111:f403:2612::601] helo=EUR05-AM6-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1ri3nv-00000002i3s-3VnZ for linux-arm-kernel@lists.infradead.org; Thu, 07 Mar 2024 02:48:21 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=m+AxlLci8CGK0OcC2uwEKTTwkYwR9WzPx3RNheEcIe5f0MUlAASH6UpZs7NQnpfWImiUBlwjELYHRiqcinDAjON68b/U8w4AGsb619gf/TW5MFVkJcBDHJPpEjsHrK2vYXxISkeqsaPUjFyKQGruPEcFOqcXRhvnO7I/NuMRRH4Dt2y3HyuXi2MiDxUJBH3lhbUBbF4I0pYcW3Z+Zdrb+/IepS6Xjk3ZTkxBo0ZpQE5ScD/MhXZWqXcPASPJc83B5dSX1lRXYQXJswF+FHfaFDJzovQwD/oUD6T4Zme8V0kVVJGjqnfIhwxdAGRkwWGJ0oCpmacMqdRU880/GvgwQw== 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=xjn0r2xSo029Zmy14r8gIc/JC8/9MJtPMeZbHgmftPE=; b=UOAjj75kuG9/PBtBP2ozZc/jJDAEtHMSATmUc5CphkfTWJX/TAr+IAQQpOJD69Ky4evtyUkkgGNrVIzcbWTAtCyOZD30GDQihMRDVCHnVCigKSKRBtrvZ5IMmWbpxkD6+ee3l7dhwHhfR4SBV1/g/9IVqHw9OmRg0XGXfSjskI8pvZvC1KbOMbqebwSI3qtQTcrgvGYlx7swt2yHxZ5563XqWDHHbJkCZTwLSN/OprFRKcbbtrUHxq5ve/Ghil/kiQREtlnz1yuvGCF5EXln1pjquYhbUyUBwCxS7IwYx+vN4bP4zPbuoTQCQDAgoaG7uBKNgIy+FxpLutpKq8DzTg== 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=xjn0r2xSo029Zmy14r8gIc/JC8/9MJtPMeZbHgmftPE=; b=ntSXa0apI21CtnS9q2Y4MFOGoKaaleI3rG+p+QmYvUOtI1E0AnsZ4dx3QkuzqZCL1dJCxp3tb3KhYij83eQ5S1AMdBAcbDyS9pO6TTwI93Dous/QmBqh4w+YQ86UdMlk+FuOvWYXEWHeqkO/5uw1h88yJeCrwRLVilJTjOAplfs= 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 AS8PR04MB8022.eurprd04.prod.outlook.com (2603:10a6:20b:28a::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7339.39; Thu, 7 Mar 2024 02:48:12 +0000 Received: from DU2PR04MB8822.eurprd04.prod.outlook.com ([fe80::d45f:4483:c11:68b0]) by DU2PR04MB8822.eurprd04.prod.outlook.com ([fe80::d45f:4483:c11:68b0%7]) with mapi id 15.20.7339.035; Thu, 7 Mar 2024 02:48:12 +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 v5 3/7] perf: imx_perf: fix counter start and config sequence Date: Thu, 7 Mar 2024 10:47:50 +0800 Message-Id: <20240307024754.3469810-3-xu.yang_2@nxp.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240307024754.3469810-1-xu.yang_2@nxp.com> References: <20240307024754.3469810-1-xu.yang_2@nxp.com> X-ClientProxiedBy: SI2PR02CA0037.apcprd02.prod.outlook.com (2603:1096:4:196::8) To DU2PR04MB8822.eurprd04.prod.outlook.com (2603:10a6:10:2e1::11) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DU2PR04MB8822:EE_|AS8PR04MB8022:EE_ X-MS-Office365-Filtering-Correlation-Id: 86b8975d-2181-4048-bbff-08dc3e5107ac X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: /DzDqGw8/rblGlA6x8L9sjIkGyqzZaqwuK4n8ejSpZVC4YiSOqb91TJedBBAM/Pq8Qc6p620wnd09Ek50psj4OcTwenuuUUFA1VR0OmL69ktyTaO6Hr9u1lVWp1R6o9Qj/K6TgoF0gOPXvrPKO4W78C+pPa1PtRtQP50KezAiWYDjgDYvRkGp1OfrZH5qIvOyHFFcDmSK9fTBQBw0vRjmNljLT7A5q9BXzVmpTApSeouP6MpYhD0BBHT3QvJQzFAWbdjCjFH7fgo616NJk+WOcoixdmacTpBu5jcUhg78l51hhYLu/m+FJnaxq0Sx7cE57tEIWcuHFSjTrf6EfDdpswyE9bSvWhDsHP7b/nEJslH4IQFL5gPnfqXNeJVEzMwBJnOqswWL9+OecDya2QLEx+X3T1wXLNmSWXIzQBYchD8SJNd9AAhH4QS+VmjKRL9pdQw7kKbmjx3qaIBb3dvPIFZM62dHDt2AVJHkABBE5uWsr7e0hjZfpD38ysZSFU19nCBpayx+n0+8syc2VEK9vmDMjBLl+BBawW4majffW/1Eh6jK6XbpyzJerLRn42QanlUQaulHtZNrZxAoherbAs1RQA0Q1WKj1i6SZ1ON8UTyePOr35y1gdOMKoXHS2pYcz5lW17TCOBebfPCkTxZ1YlRIszJPVlSdK1M9/rQwxdWylI0VdffWMzksp1PvDs9TVKgF3PIuSUaBhq2uY2GfdC1ZzMawJN77SylgEsJOE= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DU2PR04MB8822.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(376005)(38350700005)(921011);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: Y54yp5D+vL3DLjAvuV24y1RiRqZWnszndQKwHWBd9Zr4ATGjckvNGOuSOcDqAlg7G6aEE1BUUbQ9QvUzvpOVwWfDLU15aguOli0H5tNzqBidZnpPzeFq4dJDvqCQJA2+Gxk54dEtG+iOw3m2D/UxZhArcHHI7lmOpqJIpCSC684mtrrgMGhVHVkzNZ1dhxPctMGBsUVNuKoE45zl4+WSMqsQn29W/fxlyABz1Qfh2vpA6pXFzVT5JuhOFh9xU4iFu6pVV8JSU01cdb0mUmqzFC2qaolGo7ubgl3g5UgDjtHEMQMCR2j57bM+dBm/XW1VUgMX3vzVtIFqcWdpmSW4I0nS0TZ8bdab2ENMt+gSRE48FyTahxjj/eSXxNw2+4lretL1/aIibofCaTwkKqJWClNGynWzujmYXFyerMzh7+ltbT3YNtmcFNfI1DFOTuqPoMGhZd/R4M8i7C5lD0rA4qPYmr2eG7THN3zuZVixEtvy321IWxFZR1hrGc+dMVjtr307B8EvbFGgSFBA4wc2d8jH7uwCO+YhsA0/EYQ+i8q/k5TDs4uxjkyc0SRZ7ZP13+Vuzzp/TYu/SNQNRUdSCDwCEaVrfLE6P09UX6olwuOl9cSezv59oagEDxwjjCAknY+W8/ddRCmNtBIfLeu1gmlQWCYvINsBd50x93ipkIkVr1Txtr1nw2O3yd8JLfKPbMibo0yFiSVu9EWAsMTPnC2hVgx6ltM1bJuAro9Pn45A1KIR9gp+KBJTTOJlqct6n3MuEXEA+x5/x1ySMCg/UKIrunFnTt3yd+mPj7gRt+/B+dbnlZzVuRXJS3P49qz7FvCsksW7ekFRwMLVDcBEyEkphN5RnOpJol3GEz5oLEe0wic7BCOY+uXsVzsD52ax7yczzAmuaA3+SxYpGEX9tdM0fsbquUNnKqU8vLT2rXHIhoorIT+r2Qhpr7geJyUePeyrnBYkJidmtsFK3koVAAnw3n5dBtXl/dulbVxJVC32so1ftsCzv+9JP5h3RPPc7YjcJxUNmbVsJtzw4hX6XDt/Z43Gkz7aP5n9YlnZgZx8fremyTAXRkedFAFwQWgpiWo/J5iiSgl2KlTdl9CGUBZfzkmTmOInK6S1gSJa+bRB+WbskA4jf/nRy09AFU6R9Bb0McbS8BUZg4HMzEwmCd3XGpVeQ07CFSgI2ruLjkkKrlbEU0Om9NC7Qbt7sUSoZYyESwvPLer+ON6KMYEiFVfaXVFkffdnK+oaNa2Pl9dyaXvlTCsrJVv4zsJt1V7bNTE0KKXtxis8Wi1B9pABfcILFBR/y4GmpPOT5+tstOb5aLWM3VDJxpODW4PWoIqwdEo2Lax8+qKXSI13l4anP0YNkDDIil4SSUBS9g+ULIGA9HO8FoPmEJdQKOoZIRKXLZ9rDE+jyJSTz/Q3jzBlnfnc+24p7bPAmlqiztcKax8X7HW/8GCLQplLoLubB/MtI64rNP5VFoRXd7VIcRXeUvx8dACTA/V+0XaW32LPbfBHuF2b8pdoj3X1SLvaFNu5jbz1sQ+8B2JBWNdajo1gOIVJf5NA6IDTQfCtu5O41lKHH9701aHBaHmQT08boi9p X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 86b8975d-2181-4048-bbff-08dc3e5107ac X-MS-Exchange-CrossTenant-AuthSource: DU2PR04MB8822.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Mar 2024 02:48:12.6513 (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: etX9nxNN738f3Q5fcO2kuyYhfdN1u2Vkiz2SBoKQNXHE0QiuwQoZaLjl+88zA3Vw6Pz49Dz/5mrfxPgj6VnI0g== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR04MB8022 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240306_184819_905866_8FBC70F4 X-CRM114-Status: GOOD ( 12.34 ) 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 --- 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 f4dca813b174..2cd5bcf1d3d1 100644 --- a/drivers/perf/fsl_imx9_ddr_perf.c +++ b/drivers/perf/fsl_imx9_ddr_perf.c @@ -498,12 +498,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, cfg, cfg1, cfg2); + if (flags & PERF_EF_START) + ddr_perf_event_start(event, flags); + return 0; } From patchwork Thu Mar 7 02:47: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: 13584991 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 94EB4C5475B for ; Thu, 7 Mar 2024 02:48:47 +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=/tylMf+9vjjKYBGOlHLzqGkorXcAJsDU8JkrJOkysxo=; b=wsiv8+LeU25DmI OlV3TQSH4KpRi8SspWCOgKTptvG+CPCqnnR1Shho47h8h4E4ddXuyJJZsXCVNKoNedzlm2HlVHeXv gCvJvkjeqG88nyeBhIPoG60yfPZ8kgp4BqgOkxEAQFQKS4n7rWRtN5c524vJiuBtYGpCjLLgYJne0 BNnVLSyEUul7Q/2wPf5Xjy3uBli4Gn8dGT1Ux8vK6Si0HAorVE34YHDL5OU+kjlrgifbtOvqHoYH9 l6yheXgaKBdyDqq+okErE8f5HMi71qh5gYQpu9cSS2HMyyoZuzHEriBwXqb5Tr1moEwL+xlUgvO+z 8t7TtbZTpC5gjMFQ87og==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1ri3o8-00000002iDB-0AMj; Thu, 07 Mar 2024 02:48:32 +0000 Received: from mail-he1eur04on20600.outbound.protection.outlook.com ([2a01:111:f403:260f::600] helo=EUR04-HE1-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1ri3o4-00000002i9H-1lA9 for linux-arm-kernel@lists.infradead.org; Thu, 07 Mar 2024 02:48:30 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=QPMpXHNrF9OO+jkWmt0ZroBfnr8q19adrL9YGuDRClh0mj+gBqdCNalfz5sDXouiFRe1WPy+ZSGjBTckFLom9jItIHVdpM7mW7JERL7cm+eGLz6HYQPKfkx28O//QsxKBWyJR7vI9TwU0asU2J2UV2bV9AWZgLALMuO8g+Yol2ilTjEzmRUPgPkkhOxBacWOvnFVgF1dEwYYLwpqbn0827kGEhu0R9oux4X138o50xWL2swT0H19joevJyv70zGOi/CTbgwJmtJNOQZLJWgVW5ZleM8JQfQW15CuRWr8P0KVDEUtxIHpc1izkdD8LDgij9HiWM1eeUHh+3GC1hjI4g== 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=txgi/SKif4pZzkn1YRbgXWmvam50+iuqmwjxPf4LUUo=; b=jRpCL8vpjzYXG3UjwoJjCTyuQ/A2SXD3RuJfu+llbleZ4Vd8J2+x3JLGE2YW/Jg6N2eQGlTCG0OYivIV6+1T0d0FE3p6g/fV1lY4Savk4NeDjaX8JT0WK419Wy514H5HtyyCx2KUnTXMDebbn/yGvzUi5xl8xHIQbTGcVthKYY+QwyOIUEj2UyuDEH59EtrjwMB2PevYuWFFVlS4DnUJd+eAzVtKg+qjFZAjaO2Wj2ocec3YcOZ3EOjTeaMsCZT3U+yYHz/on1fdSAP0WGQ2ocVcSU7afBukovBjDev4R4R4cnE3Kc2IiQIkFyba5SYxjfQLu/iyWV2OAd72OkeYkQ== 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=txgi/SKif4pZzkn1YRbgXWmvam50+iuqmwjxPf4LUUo=; b=QbJ363xc1zKSb90C36aRQIzXjGob3bSkGzFGj9uHJvUBzgZ32FGVbl/VOn8P4HCPSlqzqNtVabyF609kClRhyCevtib7mMjpp3epTYrxK9XlluPvirUSCdO8ruGV6mBnc11QLas+2piucLjQjzXQ2bEhNe90e4hqvkOMfFgw44w= 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 AS8PR04MB8022.eurprd04.prod.outlook.com (2603:10a6:20b:28a::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7339.39; Thu, 7 Mar 2024 02:48:21 +0000 Received: from DU2PR04MB8822.eurprd04.prod.outlook.com ([fe80::d45f:4483:c11:68b0]) by DU2PR04MB8822.eurprd04.prod.outlook.com ([fe80::d45f:4483:c11:68b0%7]) with mapi id 15.20.7339.035; Thu, 7 Mar 2024 02:48:21 +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 v5 4/7] perf: imx_perf: add macro definitions for parsing config attr Date: Thu, 7 Mar 2024 10:47:51 +0800 Message-Id: <20240307024754.3469810-4-xu.yang_2@nxp.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240307024754.3469810-1-xu.yang_2@nxp.com> References: <20240307024754.3469810-1-xu.yang_2@nxp.com> X-ClientProxiedBy: SI2PR02CA0037.apcprd02.prod.outlook.com (2603:1096:4:196::8) To DU2PR04MB8822.eurprd04.prod.outlook.com (2603:10a6:10:2e1::11) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DU2PR04MB8822:EE_|AS8PR04MB8022:EE_ X-MS-Office365-Filtering-Correlation-Id: 91765e0e-5db4-41e6-6210-08dc3e510d4e X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: uO/+d7HP3zHt/r4cuvLJSVEBmcDk03FlodA/m5e6XKYwna8iTcFBZZKhYlEKhMdlilHopa8WURUY2fUClyuDsFAFV5/W16S9AkGS6g5MvgNbXdOvJ6YKM6k1IbGkdH26AFEax9JgJWfab2bj0zC2gKqm4+mwM3yCtkdlYGZepDT4AZay6hedRnjSzGkdZXScgII/ef0GG6j7vV09Z9MrieUquCEB++5EjJHXLCbFs8PwUqWMDEXQU219LSKVKosTfAZfArSOF7qmnScSAXt8toOm3njeGZjZt+GrXND4O82WjJx9EcYoS+3fdhC1yZK7p9GLRQDdRuSqxjTzqlcMy7OiMmR26ZwzJLXaBrWCl/Tc0XOns5dLHuEq0+QJugs4Sr6bPSC8AFN4F/5fyY/nCS92Quv5e+yLcneg6UoFzVQpK42H5kJpdwaFUAQqWhfD2m3Pk6uuV+WKODgHLwgfWCn78a6Q9TvCCRS3OyskCjVbBYQZb8oIIdA+l3lVfVhMq59oy/rR2kHQimx2DNiOLw/d5xDkd75y+hVXc2CwTd3hap9mELzpArnL1CUnqgF8zwkmiRahKeCFzbNiYWcGsURLOjOqbTXIBsw4minFelH/J+i76hWdM5JwbGcIcWCtDY9Uyxs8b3/wU9bMyZr691jmDvAkKk1EE/u7eC+WFE4oEmcAgX+RoFjOB/yporFHYVRg0+d+x6CVcjaqk0z16HRyKV2uPahJfFJltRf/Rfg= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DU2PR04MB8822.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(376005)(38350700005)(921011);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: PeUQMOf7FCvU1vslfYQvsXfYFH80ART8AUt5jgfSzsQk+ANQb9ZijB+lerphrKIEU9QpDqky/s15pgZOtxMi0PDLGfDeQJAenUM9+9wxhG7JjPz7THH3cZVVc9A13ZW//0Hh8/pJu/e2Ae5+YHkMcyH8zFWrE0iPV5/9vDb9O9G0KjlZxMKimxeYB6fYlTBPlCmvmD15GdlTki7mW7cy1k1wz2GZ+Qu0Wdx3kqV5F3h7WDt7c1TW9bqvuVxXCN+hr3YePqt4xohtEmwI4Eqi64s906TjW+I6cei23Y6F//lLrzqbo3KBqAGpyzHeJG2l0jnv5K3lvt7x3adZ7EnIdUeqdR+jqUDUnqW2ESPpMipCQN9FueGY2g72TbstXmrXaDGEbrV4MvJupWq8JAm4bIxzx2buBg7Qzfy7w97wVzKoRvQRt76Rx7AhoIIm36RuB8Kd60AvPgJg5k254Ao/U6S7jCGr7DsFTLbS1Wkn/09MHBnsuAVCFNKd60qKm1+Nmkkz1odoGICTTnhlpJ6YsSY7BvgZjMV/e9HtNXteQwIShDXkE0A4j32u7XEsjmDsTnnVhGTOkB110+RWrDlMIch4c0p4wkY5tFFIkb87v0w6Unu6+iTJaGWsY6GL9myqAAtZ5iVmZ+QOY8aRWEOb2k7h3NWvN3FCqT/9r7CpUUyVjxz4XIoQIxJEWyf/7+Bdb+kWnqL/lCx2S6cfteGJYaSKMKw3hh5D+d2469Z4Cmm4wfowMjdZyw8frcj9RqVD/XCc47CT18sayiDzzDPyVlDfF/+ogwZ7XoipBnQ7CP5dXVYpBCOM0uxc0DzxDqqDjPbl1WpDtXJ7q0gS+hDkM/oDwKoR9Nt8zFvusZFot673+laChP2Zn/KvEPw5VvOhRaZngQdl2GlpH1c5P+ebXfwBTNCpZ7H2S2MhBVfF94vovM6qgp86h9YSTcwoMkm46RgfQsSkl8uJJDyggwfa6Wv20fDVdsXv4SJm56fPbE1CJnNualDQQE2zzcTz02HdeOsyZxNHLkrb1rgq2O0cq0w1Ziq2/4JkXjhBT0XvcNp5K1XuXAUavZDPqO0GvNzrMM7K3/EqH11uR7KJ+UePk9v7WEbm8+vDoXRlEYffcLC70g1m0lbXaKzc6YVl2bzqiRSBohm2mtcMxcwduChkB4BrJp6mOeGfHX4eU/44YvCuunZXXIFAX5N3O2PYQlW54KIj6bfzHkg8R1EMxMflROOGi93eRsh1y01sKa7QRH30WnLuYIDzeYWLx1YLUdZyMw1Zm1mxWNSLxQjmsn8oe13otDlQ5hqhWe5keYKuPQyDAt6eey0GWp1/PTArSl6BFnxAqVcX7SqHX31H+UUf7E+/OakQi2cSRnx7hfLBGyR0IgEstxQ14Upml3DVLwZ30nGSGJctt7ba6GdeGWkdHvk//d/CLE5AXVblBG+H9ijRslZzYbuADjQb3US1MFuaGXwyhVemWL7wF/YlZE+sGlJNfiNhjjCflk+enHFMZzWMQFoZ+MLo8S6+ECel/vxfRgAV2oSzOHqlv5gGMCTdfQGEtUfQa7nQzLs3uChfvARc1jRhDmRKAHXUgCjnBWlE X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 91765e0e-5db4-41e6-6210-08dc3e510d4e X-MS-Exchange-CrossTenant-AuthSource: DU2PR04MB8822.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Mar 2024 02:48:21.7912 (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: Dz2L0gi2kRbIpCJqmF/vED9x3D56+lsbSvqcjv9DfVGMNNc8ArQsYZAhq0IwdG7SA7puw8ApxiKPRqHdHT81qg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR04MB8022 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240306_184829_370902_D11483AE X-CRM114-Status: GOOD ( 14.28 ) 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 --- Changes in v4: - new patch Changes in v5: - move this patch earlier --- drivers/perf/fsl_imx9_ddr_perf.c | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/drivers/perf/fsl_imx9_ddr_perf.c b/drivers/perf/fsl_imx9_ddr_perf.c index 2cd5bcf1d3d1..35e422083948 100644 --- a/drivers/perf/fsl_imx9_ddr_perf.c +++ b/drivers/perf/fsl_imx9_ddr_perf.c @@ -42,6 +42,11 @@ #define NUM_COUNTERS 11 #define CYCLES_COUNTER 0 +#define CONFIG_EVENT_MASK 0x00FF +#define CONFIG_EVENT_OFFSET 0 +#define CONFIG_COUNTER_MASK 0xFF00 +#define CONFIG_COUNTER_OFFSET 8 + #define to_ddr_pmu(p) container_of(p, struct ddr_pmu, pmu) #define DDR_PERF_DEV_NAME "imx9_ddr" @@ -361,8 +366,10 @@ static void ddr_perf_counter_local_config(struct ddr_pmu *pmu, int config, int counter, bool enable) { u32 ctrl_a; + int event; ctrl_a = readl_relaxed(pmu->base + PMLCA(counter)); + event = (config & CONFIG_EVENT_MASK) >> CONFIG_EVENT_OFFSET; if (enable) { ctrl_a |= PMLCA_FC; @@ -374,7 +381,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. */ @@ -388,8 +395,8 @@ static void imx93_ddr_perf_monitor_config(struct ddr_pmu *pmu, int cfg, int cfg1 u32 pmcfg1, pmcfg2; int event, counter; - event = cfg & 0x000000FF; - counter = (cfg & 0x0000FF00) >> 8; + event = (cfg & CONFIG_EVENT_MASK) >> CONFIG_EVENT_OFFSET; + counter = (cfg & CONFIG_COUNTER_MASK) >> CONFIG_COUNTER_OFFSET; pmcfg1 = readl_relaxed(pmu->base + PMCFG1); @@ -491,7 +498,7 @@ static int ddr_perf_event_add(struct perf_event *event, int flags) int cfg2 = event->attr.config2; int counter; - counter = (cfg & 0x0000FF00) >> 8; + counter = (cfg & CONFIG_COUNTER_MASK) >> CONFIG_COUNTER_OFFSET; pmu->events[counter] = event; pmu->active_events++; From patchwork Thu Mar 7 02:47: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: 13584992 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 4629DC5475B for ; Thu, 7 Mar 2024 02:48:51 +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=OTVlJ7wHORgmb0VrbWda/B4zNX7zVJjzc1VbaHUVXP4=; b=ocKXtKucwnXAoK 8Aw+4IxgPhx99Fjom+WHN2R6tan4SZv9llZEQWQ8L2hM+5G/9IBmruE7ikbh9zHVWgFClAqY52SKO TE8g4qfu7b2ca/rPxgyA4HTwu2Sz91/oKokgSO9bCJJjzNAu+92KRKMtsXtVAffkewwiVvvofEM4m iaRQmLJmaiccQoEPeEsFb2R92CZsYrtA7pkELVi50T+Q+gmDAhqKIySaN2YCj2/kZFUpVEASnUGgX RinlnauWncNYckWvWqvZRCb7TE0xjoOzcTs/lP/QrOKrJS1Jh58iIYcXN5rZFterOBKQwBUJDgWAK gCjrZ5kye0lYbVxf5qqQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1ri3oB-00000002iF5-00EF; Thu, 07 Mar 2024 02:48:35 +0000 Received: from mail-he1eur04on20600.outbound.protection.outlook.com ([2a01:111:f403:260f::600] helo=EUR04-HE1-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1ri3o7-00000002i9H-0Xr0 for linux-arm-kernel@lists.infradead.org; Thu, 07 Mar 2024 02:48:33 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=gw5ZPn6xFm7/TvYgiqK8jCKZ/6VMo0RYdNWb1gpyrZoF8h+AFrcqIPpmjgD6mC+meSQ3hbJ5acspp6YnUw7eK5quAMaehIABma6X8RzsbgItRN/ZLa/ZtCTKWwxRYMc0yWvlm92XucXre+1V8CgA7hVxodmTKMDBnGxGwcKz39YuCqomfkEWgjLT8PytEPmmGM11A7SSX83ffZTLUuxQnxCeIZK4qbxfnfUYRYIOFGQQEzWsyPVvIGmg23kWP2U+DSSaL+MsNnKuI6daUbaY9EI5TLWceN0W/zFXnMBm3yddMQTwoA38ssgx9I7fhEH3wm2Gx5jD7bZHcgFS1b5b5w== 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=vby4bES25ZKfNpHmOX6CnqgorAfp6JG7dUM0VFPZ82Y=; b=At5J4+bDeB1IIa9or5gF3lc1xgMLQi2wb3U7V6heuBMm59nfJFc1YGX5FOn978lDaAHQNkCXolURTNXtOaTZ8guzTdPDK+u7/WrEtyM/Fe7+Xlf6pAu/FD+rAOj07Xsmp8hiWjhkGQnK8YaUsImm2GYOC5dFojnGZFa2KeUQelgM5+1sBB5hoFgSPIoneDGAecWHaiLZ9EBjZqBwqEaGz38JssF9JHGZ5iYY19uTzIL+naE+L7DoFemncam2kpoMh+J7/5cYw/j68GGGatikMinVonHBW5asGmNSuIrdNlWzUDZU5HrI37XCBSNKLFrqr9vBu+LmgZ7byB58Eh4v2A== 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=vby4bES25ZKfNpHmOX6CnqgorAfp6JG7dUM0VFPZ82Y=; b=oAIrfNTmkcTdH7Qh78THywkFqVOHB9bcBnKre/7SgOLv9WHZJ3P2x+F7IifxjgscK6qzHGNRUEm6e378A8Ap9H+UEubZr8CW2mGj0+nY9hGfhD8Bdo6iLiCSrugiKZWU/8RZ4Ojk1EfrlxObXTuDCmt6Sd07cJBCFxGmrFncvV8= 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 AS8PR04MB8022.eurprd04.prod.outlook.com (2603:10a6:20b:28a::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7339.39; Thu, 7 Mar 2024 02:48:28 +0000 Received: from DU2PR04MB8822.eurprd04.prod.outlook.com ([fe80::d45f:4483:c11:68b0]) by DU2PR04MB8822.eurprd04.prod.outlook.com ([fe80::d45f:4483:c11:68b0%7]) with mapi id 15.20.7339.035; Thu, 7 Mar 2024 02:48:28 +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 v5 5/7] perf: imx_perf: add support for i.MX95 platform Date: Thu, 7 Mar 2024 10:47:52 +0800 Message-Id: <20240307024754.3469810-5-xu.yang_2@nxp.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240307024754.3469810-1-xu.yang_2@nxp.com> References: <20240307024754.3469810-1-xu.yang_2@nxp.com> X-ClientProxiedBy: SI2PR02CA0037.apcprd02.prod.outlook.com (2603:1096:4:196::8) To DU2PR04MB8822.eurprd04.prod.outlook.com (2603:10a6:10:2e1::11) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DU2PR04MB8822:EE_|AS8PR04MB8022:EE_ X-MS-Office365-Filtering-Correlation-Id: efcfd9fe-882d-4e83-097b-08dc3e51116b X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Yq6LB1HWztYUQkt1TwRMYSODMkFA6I6omvtJdX+tzQHgHuPPdVcV0tu0ENTWw187cbFwmhPUBS9AwRgEIVfzzUUsoffrHM3Ficzv/wWyaaEddoIAH8s4fOZ8MZuLJxn/1K9sorNhokx8fW52+S2JH7jW1yjMi2zfM8kM5iSno3+nz5IPHBX6uCMyqL35m5bVn3IPsUXgtD7gJXQ61W74VXIIZUTPjn2wIwjFfPpo3mXKW3+ndf7QgfNW6+Uh4Sob58N0+uMIIflp1vQGBxWSfE0YFY3H6y9n6tm7kQj87sHzybOsTvbZA/4RZLYl7uguNre3V4ZBjOkMTjYmj8GKUN9RsTjyhC9frCJbE5UBWdmH7jxIbd3kyv7KtI/A70O+2cOr4ZUQ7AGHqgwH6rxIkf3RjfODtCiKg1junU7IxJF5nqyoeaNVBFSWUNn204k3KbB3Lq+EPA59mHRwtgDGdPxNDAq8+SfhSJwmqfQ/lh+5DjVChFfcpH8lpwdB/9tGVMNZXZ7JBtheaDScgloO5K+0tjmqhPOLDDnc0deoazpQH+Y/ZxL82GmbyJaSvP4O+zr3qsVBOBTgyzJEOm1tq/tbb7jci7u5SDX8qk5WlfLQMKCTrzK+VETPoox0+2LyhWSVDedQJJHkNWXwCm95t91E7hbGZpgTDqffiK0ODpC6b+w9vSRI2mLr78m9i7fxcfNZj5O8QiyMHcbZRad05I+DedZVGOmXa0X4L1FGHwk= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DU2PR04MB8822.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(376005)(38350700005)(921011);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: uyKC4Zg2yP6ZmDQBP0udh2AWzqKWenN4KPWooVxMeYmOxziRYxMlOFwflcZP1JcOEFDPOsVudh1lkhKGslEOHRwi88yHbr6h3CQeg3vk7NpDaSJUikwvaUxfceMohOJW3f0o1tHY3JHK3WeUpU/q6dUGr8r9IeXtjn8zjIa5wKrzZeMMxfUuEicPmXcni0VgTSfB0K9hVPmf/d99SRietIJ6HtOsrUHDw0tAVB664VW64zJk/aXzx0F23RIv3b2W8MfcAPYPhMd1Aj/E+TYAjxLMpQOsmUslxdcG4loxQvxVCrdp/xOnFAwwPoHZGU52nSzoo9igUk5uWqjXO+theeLb/cetaJUT0Y+xqecbhV7CRzMpz2hB3hwHo6LOE3MbgNLubXBR7Lz5tXOKBNyPHanOPx3QjzOpJPSV8EtFkbYGm9o6yGoiZSHu9NsiaSUmVj3K3CnfmrFl0nsPznjPfO5PApjdE+GsbFwZ+eVUDtigXlXV90QSAxgcF8tMOJQyCJLfPMeNWvzDUOrya8uk+ZfRC9O5Ce9WiRWju7CQHfen8DEVciaHjW//TdILdf3Ln8YmkvrvVKSzHODrKbc0BPW+sUYD1u3p8hqBhQuT+i+l77ELzVbjWr7zXOEKD7lPJ+YpdzZTC4CIJPwsH1uCGnIXOaoBoKy1jUKONBH6+rdd727GFn9Th81A+oefTLw9nk6M6sSvy7onhX8NKX936e3RPyzIElUTDeQLSo/fZP4nO2LHNjhID8dmh3gDAi72Y3dLBwjBjahDTgG4whQWucMCrz1Rrq/gDr2yE77Rc6+b0kIxZt7DpixSLaZLzJo0Xp1yajN82q1NEqS+LnpcMFZjeblQiSVSwlHvFc92GJy+nQDd5ibGDSB4FyknVquDP3Mg+KOms8Hsbej8UMQI8ikdt3CYxe5v2J2uUr9UPRLWEgVEnJu14CfJFh5Wn66AKwG5k5l0P+ju6xcL5RxF+3OpZPBcxFm2dA/K0LYhohOmr/lv+Siw11B1kdfCnT1pkMjOXfPndy9q4cy289B547X80z72bjubfIVukCQKTeD1AhsAtoAalDi26HiZCEMkrs5P8E00Hgd8OBPVzhUl4WklV74iHK4bmDTQXq9Yt/3YmWajJPfNY5wJjC9hQTJeznczNE7Cw5DGEXzVhg5rLd3siZR3GiuUWfGxprdK6tFDJgoaUcLbiY1oabLqtFd7J24TRrjalKjCPeo7mjhJiE7adZ39af6xAVXtiMbLgVLV0iDjeOY5dZJaij2Cfv3CEyaj7rHST6QD6Lyc9r652KF+YbotD0wFlDUDxLg/3sQ0Y0ecsratq1d4q7CQwVlVr9nL1GVveR7GHvjXg4hyUBKUp7h/peFji+OJwjf/SB5Xkmb8oWMBw2WaMxzzbPcAUs7sZlk+sflLNQM0Md7UFNtCuGutKZqkpz85aiWSf9FDQJxib2PZbiG1BIBbLyaz+Bef3edv7b8RRgGujyad/rSGrQozxnzuL3G2dAbLfG0VAMkmmPJp9ed4m+IEDe5IcEm6IK6D+cVFh6UO+QcTvHfHIn0QouWpIvN0Qelk2cPZhN4Uzx4oSVJLP/yHZ6I+ X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: efcfd9fe-882d-4e83-097b-08dc3e51116b X-MS-Exchange-CrossTenant-AuthSource: DU2PR04MB8822.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Mar 2024 02:48:28.7032 (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: WyfVU+3WBW7KOCXan+CpqNM1VQrFReZR705XRn0Q28mKssVUVN3JZOL6vGorr7ryqxdkf39EvFmi5Ff/2vdALA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR04MB8022 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240306_184832_124783_D8013E81 X-CRM114-Status: GOOD ( 20.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 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,counter=3,axi_mask=ID_MASK,axi_id=ID/ ~# perf stat -a -I 1000 -e imx9_ddr0/eddrtq_pm_rd_beat_filt1,counter=4,axi_mask=ID_MASK,axi_id=ID/ ~# perf stat -a -I 1000 -e imx9_ddr0/eddrtq_pm_rd_beat_filt0,counter=5,axi_mask=ID_MASK,axi_id=ID/ eg: For edma2: perf stat -a -I 1000 -e imx9_ddr0/eddrtq_pm_rd_beat_filt0,counter=5,axi_mask=0x00f,axi_id=0x00c/ For write beat: ~# perf stat -a -I 1000 -e imx9_ddr0/eddrtq_pm_wr_beat_filt,counter=2,axi_mask=ID_MASK,axi_id=ID/ eg: For edma2: perf stat -a -I 1000 -e imx9_ddr0/eddrtq_pm_wr_beat_filt,counter=2,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 --- drivers/perf/fsl_imx9_ddr_perf.c | 96 +++++++++++++++++++++++++++++++- 1 file changed, 93 insertions(+), 3 deletions(-) diff --git a/drivers/perf/fsl_imx9_ddr_perf.c b/drivers/perf/fsl_imx9_ddr_perf.c index 35e422083948..f25f55126004 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); @@ -189,6 +209,7 @@ static struct attribute *ddr_perf_events_attrs[] = { 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), /* imx93 specific*/ + IMX9_DDR_PMU_EVENT_ATTR(eddrtq_pm_wr_beat_filt, 73), /* imx95 specific*/ /* counter3 specific events */ IMX9_DDR_PMU_EVENT_ATTR(ddrc_qx_row_collision_0, 64), @@ -201,6 +222,7 @@ static struct attribute *ddr_perf_events_attrs[] = { 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), /* imx93 specific*/ + IMX9_DDR_PMU_EVENT_ATTR(eddrtq_pm_rd_beat_filt2, 73), /* imx95 specific*/ /* counter4 specific events */ IMX9_DDR_PMU_EVENT_ATTR(ddrc_qx_row_open_0, 64), @@ -213,6 +235,7 @@ static struct attribute *ddr_perf_events_attrs[] = { 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), /* imx93 specific*/ + IMX9_DDR_PMU_EVENT_ATTR(eddrtq_pm_rd_beat_filt1, 73), /* imx95 specific*/ /* counter5 specific events */ IMX9_DDR_PMU_EVENT_ATTR(ddrc_qx_valid_start_0, 64), @@ -224,6 +247,7 @@ static struct attribute *ddr_perf_events_attrs[] = { 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(eddrtq_pm_rd_beat_filt0, 73), /* imx95 specific*/ /* counter6 specific events */ IMX9_DDR_PMU_EVENT_ATTR(ddrc_qx_valid_end_0, 64), @@ -260,6 +284,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; } @@ -425,6 +456,60 @@ static void imx93_ddr_perf_monitor_config(struct ddr_pmu *pmu, int cfg, int cfg1 writel(pmcfg2, pmu->base + PMCFG2); } +static void imx95_ddr_perf_monitor_config(struct ddr_pmu *pmu, int cfg, int cfg1, int cfg2) +{ + u32 pmcfg1, pmcfg, offset = 0; + int event, counter; + + event = (cfg & CONFIG_EVENT_MASK) >> CONFIG_EVENT_OFFSET; + counter = (cfg & CONFIG_COUNTER_MASK) >> CONFIG_COUNTER_OFFSET; + + pmcfg1 = readl_relaxed(pmu->base + PMCFG1); + + 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, cfg2) | + FIELD_PREP(MX95_PMCFG_ID, cfg1)); + 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); @@ -505,8 +590,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, cfg, cfg1, cfg2); + if (is_imx93(pmu)) + /* read trans, write trans, read beat */ + imx93_ddr_perf_monitor_config(pmu, cfg, cfg1, cfg2); + + if (is_imx95(pmu)) + /* write beat, read beat2, read beat1, read beat */ + imx95_ddr_perf_monitor_config(pmu, cfg, cfg1, cfg2); if (flags & PERF_EF_START) ddr_perf_event_start(event, flags); From patchwork Thu Mar 7 02:47: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: 13584993 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 2337AC5475B for ; Thu, 7 Mar 2024 02:49:00 +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=VmyX3NOmaiaI9DggeMTagR9ve5cqRlfPjFDPRJT9bwc=; b=HyK38jJ5LpygEV zifx09GputKxzT9cnnBYPAi/jvHvlah1m/K/zjqlw1CNdIxVvEE1rnwvji/hPekqsDCk906Zb2+Ox 0RCCb/XooHZ+nUOjHGbpu0730BLPt6L72tMs0Y+az0dYswJw7kXMJULTyxtppIGEJqKX0pMpFu8Xq ONAgyFFjE4YWOEfSEfoIgOluZzad97TigYykVUEdHqGrdJ585W+ocaDvD0XGpSP/SZI4LPaybD+44 +N0uZpbdiT88aiMHrtJPvYcqe04O27UHUZoNPZB8w3NanaZYXGtej616uqMYZVj7Pvjl7wASntZH+ TMV+5iseN49PaJDdPvXA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1ri3oK-00000002iOB-0pVf; Thu, 07 Mar 2024 02:48:44 +0000 Received: from mail-am6eur05on20601.outbound.protection.outlook.com ([2a01:111:f403:2612::601] helo=EUR05-AM6-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1ri3oF-00000002iHr-1ARk for linux-arm-kernel@lists.infradead.org; Thu, 07 Mar 2024 02:48:41 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=JHxvCLlwcxiun+Wn+FHPWZhaibjpZ2jzXxV3z6HwBfzf8+TQSKCawyF3o5LFUwuvjlHNbBho4zzdyhJrNWiDU5cI2saVWo2zAusERNue3SKSv0/uTB3EunFM1DY+prJ3vutSTsdOC24crrNSVwhDSKoHLvGt2lrF8gztDdIgXjnFZQ2GouPlP2Dmiloi7HwlpZDx598IvlDhI00ILOmSFVfZi+DWKLA5q0F0djrEnwFv6lw0HfeeElWujL/ORIZDVmfRkTl9WYZs3/yvSx2CTTcMNknFMgO+X+6ay6I53PEb07L+Q7bm1Zx3x8Jls37ANawKpgkeW790wg+6fRy4lQ== 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=7M79/0HHkY19uCUfaVW/Jw9qmF8Jv/I+pmHhBdAOois=; b=K7a3tjGTySGeAKvS3ySZzd4CS/JBJD31xZ4VC9CZqdWfXNsDt91M+91KnnrCGWdYTk42HqqeiNnskWS8ut09m9xzf5ipnAFrSlhFV9Mp0Gchn3ze1MGMXKT2yWs/kWpzQ2X284oUgQwOL2wnxnkFQNhkiH6aiXnA/eMwqNqyIoeEbNLEnm3oTUeq0WwNmBgeiVZiVqP2AQLcoBrvNRpOkz5oWHtM0axIXQn3mmXZXMVXPZk3HX1IpxXab+F4PHHjZjKX0tr8gyIREwFLYfICjWGNEZKemRlMzSZ/MQB8AsD5nbs5vNWLnjOe7egNt1SFTf+zSGprDaDVTLhH7e6E0A== 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=7M79/0HHkY19uCUfaVW/Jw9qmF8Jv/I+pmHhBdAOois=; b=Cyw5IXcnrGYWc+131u/GXswfUQmy9bQUklJ29gOj6T6cxshjC/5+2y3sOsyQo+QQJAIMZtXWv8AeUDnwaATdx2LHI+1d6iVLGKkDoCfYT3Hwn6i0EfBAaCpWXBLUasrLnq39jKJESeMg/DwWTFcUk3Qq8VDaq7ruKA7TC2T+qvE= 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 AS8PR04MB8022.eurprd04.prod.outlook.com (2603:10a6:20b:28a::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7339.39; Thu, 7 Mar 2024 02:48:35 +0000 Received: from DU2PR04MB8822.eurprd04.prod.outlook.com ([fe80::d45f:4483:c11:68b0]) by DU2PR04MB8822.eurprd04.prod.outlook.com ([fe80::d45f:4483:c11:68b0%7]) with mapi id 15.20.7339.035; Thu, 7 Mar 2024 02:48:35 +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 v5 6/7] perf: imx_perf: limit counter ID from user space and optimize counter usage Date: Thu, 7 Mar 2024 10:47:53 +0800 Message-Id: <20240307024754.3469810-6-xu.yang_2@nxp.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240307024754.3469810-1-xu.yang_2@nxp.com> References: <20240307024754.3469810-1-xu.yang_2@nxp.com> X-ClientProxiedBy: SI2PR02CA0037.apcprd02.prod.outlook.com (2603:1096:4:196::8) To DU2PR04MB8822.eurprd04.prod.outlook.com (2603:10a6:10:2e1::11) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DU2PR04MB8822:EE_|AS8PR04MB8022:EE_ X-MS-Office365-Filtering-Correlation-Id: 853ae16e-5bf8-405b-a1be-08dc3e511583 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: wuUfUVGe/orPlHN5D132NA4VBZu/CtIGtbG6U2gl7VOQ+ZmVpUJh841INLm/GCui/Ypb5Cf5tK4oOKVP0/7V9TPoMfodcFh/xrB4devtt3OUUXROrpG8NvHLzwx8YWbrKn68woCjl1r4dlRnpnnmFJmb18U0qgv3n99FHYQaa1gGY2SIIKcSM03fI4LFw+rVtVWVcXeCkEnTdjdeKKqzg1MM2oYGipDm/d7RO9wq1wasGOUHVVH9nLYiVTkMdc1aLIhcx1gRDqdRC6NXj6DvQnu0cx35wItcHKi7yK4+5/O4NomzKxA5PgrKefHWLdlutT3c7rkVKxoO2W3XVSe3wj7LErFBL2z2rSY5v9Ot9h4v4i1Mp68oUHrq6Bu4loMJPkJ2S1J6rh6KTIeebMsoHfqbqhHEQQy3GYAN/ddJaBKgYd/gupRNdvI/McPn+JUtJaOZSI7jf/iHEnAK6A8E30KiwYQUAP2CUwi2PNpPNDAwU8tV4DuRz3yJW16XBhIg+QSiFl8VAjIEsUa1+c3eU8knNNjph1pk1RC+tgVk93KXtrcVkM9jVa3dcQyxL2Z0PxAp3whWJTYkFLWkfSUyRDnEmtzEvWSgfgn4UgvazAolyHEzsN633LXUg0Sop8WxSLhSd3C/pJ9WqQrwvSCbHnZflCO/XcYfcy95y0vwF2hrnSyLvgo6I/LlRK5IIVA2IyvFulIwEFVQreOa2xw4Xtk2u78lreU9n+T4LKKe9CY= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DU2PR04MB8822.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(376005)(38350700005)(921011);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: SR1aj2xQk6XOJg/YWKpGnBIJpTO4qiBRi6Ubg7S9G+uff2yOvrdvoigoRKFfnEqEEpB9B9QrE6I811G+QmNUqOrWXI3lWqI/Hi0Fkxj7LvY6Ft5lYS/u8Ovy1zD5ipQSRf3JgDKue3UdJv3CUIbJPWCuYSYzaJh+ZbEBrBz7I8rvr/7hLXDdvV/3kUyB4+ZXsAslZHmjZUjT1tY/et9jzuwOhmv8KEk7Onh9XGXfgnj+a5Q+rIXAIjEDrzLVu1B+bUAOAMCsCGWYCfL/q5+ANSaWjKpWjRIrYb9wEmvqx/0sFAAgb+fDR8p/m9JI5/8cf+oLuoTdJsswMgrLwfAFsfR2SdqqD4klzFVkcqHLYQRUnn+y41vpdb+FDPjX6vuzCRYp34wxD4VHKUXuENdhu02wFNKu6wzRo3ndhO/k12Rl1bFIEDphRlLXj+RXx87Bu3L+WoQ1Z1OjDMvMms6TyUnlCrD2gmdL3TPFsUnBmYwn0uYdmhU/8NEmlX/CfqoMThhoEmDzP6fu/e4cp/Gl26HYla7nGcqSl5kTt0hErGLD68agvQw79wePBKa09ClQWmpoKNGsT62xKmX26O9uYbO6zAYZiGeM/73gqhIW3Lr6yu7ci3b19trUVZFuGYK/cJwgZQezx3O6N5hpTJV5vVahptqsUzlusPZLLrNKIwgZaNYu5jENdmuAHowfRBd7FnoaaKZRRyEHA7iW4vv8jGi/hIi4p1voZi4zz1YK+3uDySQcRwsXEWoIxii6vPMg8wV3k6jgWuXDMosCEUpuqvlhlb9/x2oVuSnI3C4RNEOAMqKfbmLZpNHt9kxrc0koRxlUbdSh73xZTi/OXSUnVfEAZ9L6Z0Ngfss9VZh3Cd+VuS4Txti+mx50R1vU/opuuE2bQJI+JFAmTiZN90JqHVFHSu+zxWL9ZHN+fI5Hxjjp9zynG17/bk4WIrB8fgPMVMBDikNGzMrg1IVAr5Mgi644K8DYngj/5p2BL8pTV2AWioRl1nsNrebr6pOF6RnJEKHqB+D+uAfuJ7DuiPSI4NRKrLexDnJQdqCC/lKriiYq/WOx1LDh90tf5mSQyyU76jFEOnG0Wqv+scaRfd9ZforOR/ggdizQUfuKGgcPAdz/h6//60rpQiKHkPvMjNRGQJXkWFu8AIRmXhNpLfssPxOla0nHG0KAF1OyspFyB/cKb7F93IlVwN3/RypftvtIYCIRglJTwb/qAUWMdIBf2sDJgZaNBEKOiklNAp6RDl1Rdpp5ByfWwLJeiIvOuZh+9eTb57tiIsOgTrSVw3UZ+O2ygEu11SkYqipK//ZwK0tOMkbEKmYtEbMXiYag4KH8zgIVF/+TF7B+/akjTtZ6GVw718vAo+gllNrZs5JQu+JfSQk37fFMuDcH/A5ALnSJ2QAcxyF4fRW8+DNZaysjPPh5nFQo6+kFQWuUVBWDYP7hNOY//eJ1JFxKhWCxmYrTUef73QixBV7J4cfIjDevBXRRF1o3r7HO2y4TnMNsJSGzK+sd0NYnF5FNaaCy55DzDSwZr+5MfMPVnt8zBsXbgkIYJbVebUjIghMthT+6PCIA58F3owOoWPPQAZzqInVe X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 853ae16e-5bf8-405b-a1be-08dc3e511583 X-MS-Exchange-CrossTenant-AuthSource: DU2PR04MB8822.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Mar 2024 02:48:35.5993 (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: ino6kFf8ig9qMaa7yYumW/VNaMFDGZrbSXXZ21jPX8brMGxFbQ4K8sEMerjU/irzayxIMOZhoZc/itmjTJWE+g== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR04MB8022 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240306_184839_426963_A7F13620 X-CRM114-Status: GOOD ( 24.96 ) 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 pass any counter ID to perf app. However, current pmu driver doesn't judge the validity of the counter ID. This will add necessary check for counter ID from user space. Besides, this pmu has 10 counters except cycle counter which can be used to count reference events and counter specific evnets. This will also add supports to auto allocate counter if the user doesn't pass it the perf. Then, the usage of counter will be optimized. Signed-off-by: Xu Yang --- Changes in v2: - limit counter ID from user to 0-10 - combine dynamic and static allocation of counter Changes in v3: - no changes Changes in v4: - rename ddr_perf_is_specific_event() - use macro definitions to parse config attr Changes in v5: - improve ddr_perf_is_counter_specific_event() --- drivers/perf/fsl_imx9_ddr_perf.c | 69 +++++++++++++++++++++++++++++++- 1 file changed, 68 insertions(+), 1 deletion(-) diff --git a/drivers/perf/fsl_imx9_ddr_perf.c b/drivers/perf/fsl_imx9_ddr_perf.c index f25f55126004..0ac680ee2505 100644 --- a/drivers/perf/fsl_imx9_ddr_perf.c +++ b/drivers/perf/fsl_imx9_ddr_perf.c @@ -51,6 +51,7 @@ #define NUM_COUNTERS 11 #define CYCLES_COUNTER 0 +#define CYCLES_EVENT_ID 0 #define CONFIG_EVENT_MASK 0x00FF #define CONFIG_EVENT_OFFSET 0 @@ -271,6 +272,16 @@ static struct attribute *ddr_perf_events_attrs[] = { NULL, }; +/* + * An event is either reference evnet or counter specific event. + * For counter specific event, the event count will only be incremented + * on the corresponding counter. + */ +static bool ddr_perf_is_counter_specific_event(int event) +{ + return event >= 64 && event <= 73; +} + static umode_t ddr_perf_events_attrs_is_visible(struct kobject *kobj, struct attribute *attr, int unused) @@ -529,6 +540,7 @@ static int ddr_perf_event_init(struct perf_event *event) struct ddr_pmu *pmu = to_ddr_pmu(event->pmu); struct hw_perf_event *hwc = &event->hw; struct perf_event *sibling; + int event_id, counter; if (event->attr.type != event->pmu->type) return -ENOENT; @@ -541,6 +553,18 @@ static int ddr_perf_event_init(struct perf_event *event) return -EOPNOTSUPP; } + counter = (event->attr.config & CONFIG_COUNTER_MASK) >> CONFIG_COUNTER_OFFSET; + if (counter > NUM_COUNTERS) { + dev_warn(pmu->dev, "Only counter 0-10 is supported!\n"); + return -EINVAL; + } + + event_id = (event->attr.config & CONFIG_EVENT_MASK) >> CONFIG_EVENT_OFFSET; + if (ddr_perf_is_counter_specific_event(event_id) && counter == 0) { + dev_err(pmu->dev, "Need specify counter for counter specific events!\n"); + return -EINVAL; + } + /* * We must NOT create groups containing mixed PMUs, although software * events are acceptable (for example to create a CCN group @@ -574,6 +598,39 @@ 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) { + /* + * Always map cycle event to counter 0. + * Cycles counter is dedicated for cycle event + * can't used for the other counters. + */ + if (pmu->events[CYCLES_COUNTER] == NULL) + return CYCLES_COUNTER; + } else if (counter != 0) { + /* + * 1. ddr_perf_event_init() will make sure counter + * is not 0 for counter specific events. + * 2. Allow specify counter for referene event too. + */ + if (pmu->events[counter] == NULL) + return counter; + } else { + /* + * Counter may be 0 if user doesn't specify it. + * 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); @@ -581,10 +638,18 @@ static int ddr_perf_event_add(struct perf_event *event, int flags) int cfg = event->attr.config; int cfg1 = event->attr.config1; int cfg2 = event->attr.config2; - int counter; + int event_id, counter; + event_id = (cfg & CONFIG_EVENT_MASK) >> CONFIG_EVENT_OFFSET; counter = (cfg & CONFIG_COUNTER_MASK) >> CONFIG_COUNTER_OFFSET; + /* check if counter is available or needs to allocate one */ + 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; @@ -620,9 +685,11 @@ static void ddr_perf_event_del(struct perf_event *event, int flags) { struct ddr_pmu *pmu = to_ddr_pmu(event->pmu); struct hw_perf_event *hwc = &event->hw; + int counter = hwc->idx; ddr_perf_event_stop(event, PERF_EF_UPDATE); + pmu->events[counter] = NULL; pmu->active_events--; hwc->idx = -1; } From patchwork Thu Mar 7 02:47: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: 13584994 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 9D8A6C5475B for ; Thu, 7 Mar 2024 02:49:18 +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=FWk5OeXTLjWeUgaUh6un0M94j8fZvNG+hPU4mzjfk6M=; b=G1RQ9NWho3p/CJ 3m61hv0H+3t4/iLQO0jbTg4ztW/dKabmTY/pj1cQvne6pPcW/laYu6fMz+277nbAstTkFCbYHMyUG JAIrWZTkg/Uud1vc1c2cJWyDv5iSzk2Rgkzqg9JF58dQCo6/J+wIycjqQBECayaFt3VNUK2orweQY fwm0+1qUgxPPL/X3hgti+mGO02+kcA73hYrexQ9sDzk+F8ZLA5Tpw0VTyEZ3n9iYcL6mQ232UdntZ sVYc7jpM02nvpV2UXzah9gq9GpWmt1swU/8HeWg9qqjgN6dGuo8ohRiAOvhn9h1VPDKZp4z+yk9l6 hcHXHgAzLJj5ZoiGDFGA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1ri3ob-00000002icM-3ZUI; Thu, 07 Mar 2024 02:49:02 +0000 Received: from mail-am6eur05on20601.outbound.protection.outlook.com ([2a01:111:f403:2612::601] helo=EUR05-AM6-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1ri3oL-00000002iOK-3QT7 for linux-arm-kernel@lists.infradead.org; Thu, 07 Mar 2024 02:48:58 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=BzQjEXaIoXaA7j1zYP+oMP/6ZVgf2MoycLz0PpGOVt4QsYJ4OqfPmaUmrBll/OUQsW4g0520VBkeH1c8q0HhaPmuOur0Cgvu9+eyd0f4QRu7WON5zPbI7+EKE+4i6gQKr3r5XlkK7/9Uzwd5tBdGXvn9/o1X321Rkm3SgSHRS8hEttnIRc5unGyDfCO8jrm2HTNcYFYN1IEo8MC5ykgNOURLnZ8bomT/1mDfWih4h13vud/ByRx/dl2gIWFTJcn8n2pUp5ygZXLO8+udPUM/xfodOrFJaGd6hK8rdXjZVAe7h2EvCBjG6jNZswFUTxdrJof2i1cX6FsiPbb/NUK6Bg== 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=kFvtB+OgOR8gkvh3GSGyDw5OV/A8u1nEX0dx0QgHmUc=; b=D0ISBfL7YHYVY560UFSlRHQT/LsULek9D4mUvAv8sYNzmvRiIjMPssuiYN5va3c6n1KqxIelpiqEERmH2vmQxzEnLk3F4ypDGUvW4chMU5vvP49qei9VHvc9Ac5Ncqv4AOox/oLm3kQytnBYyHwcbRdFLNaY/B9Z77CYNeaZLJGJwJC0E/i1978AZhYYclkNo/nBR0WwrUv2cUVenPC6gP9tuDsVDuvUVF9HrCmc3PuUVPMbVYeXTR/SZzRlD1rzJRtLsUNWIslUrqy6EFYNWODBATX5Yp15cE/tlBXVdvyjQfVZ+5PUXZ0Wsn4o8WRXXvFfPYOI2pHG7152Zvhtqg== 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=kFvtB+OgOR8gkvh3GSGyDw5OV/A8u1nEX0dx0QgHmUc=; b=bniD2zW7t5g1QD8Blef941KPUyt/KiqZi5Kyd3CkBErgLcT9oLEMwr9PrVm4tYZD0VCIbZEejU3U4e00SHimsCscPCvfcKOam0a/W8iaNfR5USJ7IgE7o5pZEIYEBWtRoOPC21zJBbDCn5b7RP0jO85oQcd0VmFv2i3j6K+HDlM= 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 AS8PR04MB8022.eurprd04.prod.outlook.com (2603:10a6:20b:28a::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7339.39; Thu, 7 Mar 2024 02:48:42 +0000 Received: from DU2PR04MB8822.eurprd04.prod.outlook.com ([fe80::d45f:4483:c11:68b0]) by DU2PR04MB8822.eurprd04.prod.outlook.com ([fe80::d45f:4483:c11:68b0%7]) with mapi id 15.20.7339.035; Thu, 7 Mar 2024 02:48: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 v5 7/7] perf vendor events arm64:: Add i.MX95 DDR Performance Monitor metrics Date: Thu, 7 Mar 2024 10:47:54 +0800 Message-Id: <20240307024754.3469810-7-xu.yang_2@nxp.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240307024754.3469810-1-xu.yang_2@nxp.com> References: <20240307024754.3469810-1-xu.yang_2@nxp.com> X-ClientProxiedBy: SI2PR02CA0037.apcprd02.prod.outlook.com (2603:1096:4:196::8) To DU2PR04MB8822.eurprd04.prod.outlook.com (2603:10a6:10:2e1::11) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DU2PR04MB8822:EE_|AS8PR04MB8022:EE_ X-MS-Office365-Filtering-Correlation-Id: b502acc2-22b1-4ca4-0247-08dc3e51199f X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: vty4DWPCz85UjlKMcdC9ABavr/BgOQLFbdPdKAIGd6FZ5vScpl3KionhfYXce6fkg7In8tfuAdVxy58caRvSkR5CabDUbrbAi0SRZoWl0bFA5dSDqZOfINsTJATRdZX6w2woZCuDKCNJcV2YZQaRDJ6xR5/7ZZ+PnfDJv0MTv29XNkmUZGD3rVjFgaFWV9ec1/003n5w3zPIYdoZFY2N12/CuXf5zXBD/0zdJS9ehvL1kzw3HQY/JxaXf9CrTEmUF8Th3+6op9g8CZqQY76gJn1zWnBc0ilRtYD3usGps8/Ze9+kweURBKDXrHwa1o5ftgpxGl/LfIp7u6+KnHcx2a7XFCJlbbdOg2wduAX9b4Hf2DXn+l/WBcA1j1OFBkAvLCZFswNJkzAii6C/q+YOwgEE+UvAU7vJTIFENh25znp1jwcy65iUI+SKflOQfSxtKqG10DIBSV5tbmSezMRYCUrSU06HtfHAUMk4KXJZU2oWT11rm2D5gSnpTeoBqWs7MRTRslnN6WKZPvMAcCJtKquFs81rn3R9VnpwXrW8h9MO6/c4PG6RswS6rj+RO7ZMcb0lpo5pJZPh6mThQHxcCuklXMV2nMIhvz8jMWgN39oexpaWhTJp2tEueI95mHCAM/37S/yE6vqdDF/C9NCNSmLZL3YXjotZMZTFxf+9vaJKDp3HSWmCkZBDEIWp4rNmJsnvrO7saKXssY9K+1nMM7En9xIg9qMZXQwMv6M65c8= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DU2PR04MB8822.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(376005)(38350700005)(921011);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: p19Y9dXD/5S3k9Jex01FhOajURvy82NsIHxM+ZzVDdOkIjVvYlVQ6A3KbwtA8v7g+Zcv95qB4vqg0xDipwcwccBOqJrD4daott5Wckis46wbK9OQyibnTz2F2Rdy0KUauhCB65YhP5jk+fRCKSLT+VCadi4VWuSHj4H3xXaYTFaxBpmQv18lQhDHwu2sYXunpH2zWhzFIQQ9LtOs49Z/0rqrNpG41/dL04A07Nap3wumslenFas9hZzt+cpH3KX2hULt7GcOCXWlYx38iFxcYkozvV3uOF5bZjb1KbI6t5MaP8+K8j2Vyy+opmgMOM1KBACRkKqFhbDDu/eZimXWoDCmVpSuRs8LBtz0BWwsDE48dzdD5vu9RVynqLZcQTxFoB/WbnAx6nqzevu0FZqJpyt4MppBVIIZPnEdkfHbowSWlUw0HL91f+n6icDULEhxX5gyXB64NL/TfJdmFBVRafMunW14/T35Tsz67t6DchOvp736o38g9AnuKLDXALdjcbkgV+BsDlsHULgzkrsSraoE/V53qGPHjY3QtoMTLybvcwqG/NCgzajHOfxruTJ1fajne3do+EMg4OcQcqe5Qhl6fJKa80IINc3b7WmZ9UsRREQmrRVB9rwssBQHaTVI16a2RiyV/I9vLnCOVypvC228pmDnuAm430tDfgsbfqS7nNxwH/lZQ2S55dH3vVbUNUpVdbKQT8FTBK6Mj+hDtT7bQ818MpZ0Oww2dq4qBhrl8BlZShVm0PtfsA9VZcrwu6t42Cf3xedZgNWmgrLm83lxonlhAzp4K/GcnmTxob5CDQ3XrlGyqhxFRtstQ6EUxk8CTXYZx2uBDKjZmYP4RQ7OoQ9G3r5UFfseYPb92QN8B1/vle66Tj6NQG7ceP+E4/0vKAH8pjOkq8AGmDsxNw/i+A1dFxd/omgbsrGk4UWWtGP5/tWBnO1LNj4bDX2dPnHRBgZn1S8QP8ByVIhCDVz/MFSl0h0LDk72YwEEuzgkjA/EpbbzjRK3wWj2MqLI4oukWFyQIhwkXpbzGNKSDWUMmq5HEEltC6XgYlBNyh8gNBGPRjVK29Zb0b2z10/hJ/0xY5Zz/2QcFmRLfzgQXJxfJ942+CMyP1YxoDfX/KxHdLKey+W+FwCwtJbIUb8DuYgIvKwGRpojk8g99muaKimd/UzUFkawvt3hUR2p2bvMSziTYCktxXsnxXB2qS31aQkVIPAHf5XNikwtSRVqRlaKbJQIIKkOysmFRPs5Bf6Cx0Ar++uyXI2Ur7e7QLQXQtTUplokdC55JkxZV29A+gyldbp4urkt8iPdp9XCCRBNeszPMK1nDls+D0HduxslqkZwE8DPw5Hbz/5MoWOQ8DKzPOZeWN/KPPzCFqbMUU5ACHGvQrhgRBuXAf9wDOUAOzN7fyQsUBcEMfoQ9UdwTAm6UFq9dxTmIyhLlNeWtk77PYEs6Wrs84ItZRtmvfpyT8KDhDszd3D9n+D7ZLo3iLEyCHCFbxG0FUcJIag9kCFGJ++XBPiuuT4XcN1xc4zeWwvWCiN+iWxxwHLu5KfoTl0qd9WjWP4rrJPPSFwHwWKPTNNX5su0oD6otpJGcDNV X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: b502acc2-22b1-4ca4-0247-08dc3e51199f X-MS-Exchange-CrossTenant-AuthSource: DU2PR04MB8822.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Mar 2024 02:48:42.6072 (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: ujT+C7krDrabQyN+bWetLqkB5AVy/0zyatBCnUlwMawJwByLeelt/tvly8IEQMDJ01BnhseQ/KVcrFEQK8Ri2Q== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR04MB8022 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240306_184846_296757_FFF9E1FC X-CRM114-Status: GOOD ( 14.01 ) 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: 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 --- .../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..2bfcd4d574a8 --- /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\\,counter\\=5\\,axi_mask\\=0x000\\,axi_id\\=0x000@ + imx9_ddr0@eddrtq_pm_wr_beat_filt\\,counter\\=2\\,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\\,counter\\=5\\,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\\,counter\\=2\\,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\\,counter\\=5\\,axi_mask\\=0x3fc\\,axi_id\\=0x000@ + imx9_ddr0@eddrtq_pm_rd_beat_filt1\\,counter\\=4\\,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\\,counter\\=2\\,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\\,counter\\=2\\,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\\,counter\\=5\\,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\\,counter\\=2\\,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\\,counter\\=4\\,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\\,counter\\=2\\,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\\,counter\\=3\\,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\\,counter\\=2\\,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\\,counter\\=5\\,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\\,counter\\=2\\,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\\,counter\\=4\\,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\\,counter\\=2\\,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\\,counter\\=3\\,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\\,counter\\=2\\,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\\,counter\\=5\\,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\\,counter\\=2\\,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\\,counter\\=5\\,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\\,counter\\=2\\,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\\,counter\\=4\\,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\\,counter\\=2\\,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\\,counter\\=3\\,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\\,counter\\=2\\,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\\,counter\\=5\\,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\\,counter\\=2\\,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\\,counter\\=4\\,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\\,counter\\=2\\,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\\,counter\\=3\\,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\\,counter\\=2\\,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\\,counter\\=5\\,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\\,counter\\=2\\,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\\,counter\\=4\\,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\\,counter\\=2\\,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\\,counter\\=3\\,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\\,counter\\=2\\,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\\,counter\\=5\\,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\\,counter\\=2\\,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\\,counter\\=4\\,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\\,counter\\=2\\,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\\,counter\\=3\\,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\\,counter\\=2\\,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\\,counter\\=5\\,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\\,counter\\=2\\,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\\,counter\\=4\\,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\\,counter\\=2\\,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\\,counter\\=3\\,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\\,counter\\=2\\,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\\,counter\\=5\\,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\\,counter\\=2\\,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\\,counter\\=4\\,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\\,counter\\=2\\,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\\,counter\\=3\\,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\\,counter\\=2\\,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\\,counter\\=5\\,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\\,counter\\=2\\,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\\,counter\\=4\\,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\\,counter\\=2\\,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\\,counter\\=3\\,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\\,counter\\=2\\,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\\,counter\\=5\\,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\\,counter\\=2\\,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\\,counter\\=4\\,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\\,counter\\=2\\,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\\,counter\\=3\\,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\\,counter\\=2\\,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\\,counter\\=5\\,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\\,counter\\=2\\,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\\,counter\\=4\\,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\\,counter\\=2\\,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\\,counter\\=3\\,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\\,counter\\=2\\,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\\,counter\\=5\\,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\\,counter\\=2\\,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\\,counter\\=4\\,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\\,counter\\=2\\,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\\,counter\\=3\\,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\\,counter\\=2\\,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\\,counter\\=5\\,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\\,counter\\=2\\,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\\,counter\\=4\\,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\\,counter\\=2\\,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\\,counter\\=3\\,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\\,counter\\=2\\,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\\,counter\\=5\\,axi_mask\\=0x380\\,axi_id\\=0x200@ + imx9_ddr0@eddrtq_pm_rd_beat_filt1\\,counter\\=4\\,axi_mask\\=0x3f0\\,axi_id\\=0x280@ + imx9_ddr0@eddrtq_pm_rd_beat_filt2\\,counter\\=3\\,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\\,counter\\=2\\,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\\,counter\\=2\\,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\\,counter\\=2\\,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\\,counter\\=5\\,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\\,counter\\=2\\,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\\,counter\\=4\\,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\\,counter\\=2\\,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\\,counter\\=5\\,axi_mask\\=0x300\\,axi_id\\=0x300@ + imx9_ddr0@eddrtq_pm_rd_beat_filt1\\,counter\\=4\\,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\\,counter\\=2\\,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\\,counter\\=2\\,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',