From patchwork Tue Apr 16 20:39:30 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frank Li X-Patchwork-Id: 10904195 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 204301515 for ; Tue, 16 Apr 2019 20:39:44 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 030FC285C9 for ; Tue, 16 Apr 2019 20:39:44 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id EA63028581; Tue, 16 Apr 2019 20:39:43 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id E922E285C9 for ; Tue, 16 Apr 2019 20:39:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-ID:Date:Subject: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=3f0F7kaxYTrnDjkj1PpdF/N6w/PaAvKVURxi3I8VxRg=; b=cZCBqKvtBtoJ1B mmIc5wIcnjSGWd6nvRsxyqoeqoeHxOjqFT2YrKfMUBQIY/UZHb+hOoEYXfsGJ2j1pmA4OQha+YPBA +KCL/ZOlUEdHVXI86VY5M9zX3wjT72xvJuEmKFvAnm3BpYg3/TQl6wpCpMXWXh40ybUIr9bfl8wPq mbhbr6vMav7M2iMq8ieC+VGYt2IHToFiS/WIohbfdVLBPjVouetidkUXKkZgSLYWQZeo4tV5kvXwQ uYi62TLcLngc4n7icU3gN3EopUSfjDuMJzfgRXtp5Z0O2vCBZiEDn5raZwEwkM064BJCMr2pFVPfO w1VyX3DXtRZM9oox13Tw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1hGUri-0006cz-3W; Tue, 16 Apr 2019 20:39:38 +0000 Received: from mail-he1eur02on0618.outbound.protection.outlook.com ([2a01:111:f400:fe05::618] helo=EUR02-HE1-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1hGUrf-0006c5-Fy for linux-arm-kernel@lists.infradead.org; Tue, 16 Apr 2019 20:39:36 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=yE7lfhHpLe/c3CwSpebQCp3o5ySiE5ftCs6e0dmNdyY=; b=YwSCa6G9y3gHM4KfnQnz6dG8a3sR99NHs2RDoz9JN7UUwp4FLUJwqQYUKUE+xkI5+GVS6zABrgsmi9QzGRSSQmTo6KPCM30pa10Vx6jJqbfH0TuLi2S7z8e855jIbdtM802qn+6EhqVbM5spAKLiRcDrEfQHF4oZoKJnRAqINdE= Received: from VI1PR04MB4910.eurprd04.prod.outlook.com (20.177.49.159) by VI1PR04MB5774.eurprd04.prod.outlook.com (20.178.127.204) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1792.15; Tue, 16 Apr 2019 20:39:30 +0000 Received: from VI1PR04MB4910.eurprd04.prod.outlook.com ([fe80::d973:1a7d:2eb6:281c]) by VI1PR04MB4910.eurprd04.prod.outlook.com ([fe80::d973:1a7d:2eb6:281c%7]) with mapi id 15.20.1813.011; Tue, 16 Apr 2019 20:39:30 +0000 From: Frank Li To: "mark.rutland@arm.com" , "will.deacon@arm.com" , "shawnguo@kernel.org" , "s.hauer@pengutronix.de" , "kernel@pengutronix.de" , "festevam@gmail.com" , dl-linux-imx , "robh+dt@kernel.org" , Aisheng Dong , "devicetree@vger.kernel.org" , "lznuaa@gmail.com" , "linux-arm-kernel@lists.infradead.org" Subject: [PATCH V5 1/4] dt-bindings: perf: imx8-ddr: add imx8qxp ddr performance monitor Thread-Topic: [PATCH V5 1/4] dt-bindings: perf: imx8-ddr: add imx8qxp ddr performance monitor Thread-Index: AQHU9JR9B53S/+Mq70mr4V2vVGGBRQ== Date: Tue, 16 Apr 2019 20:39:30 +0000 Message-ID: <1555447156-28306-1-git-send-email-Frank.Li@nxp.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: SN6PR01CA0004.prod.exchangelabs.com (2603:10b6:805:b6::17) To VI1PR04MB4910.eurprd04.prod.outlook.com (2603:10a6:803:56::31) authentication-results: spf=none (sender IP is ) smtp.mailfrom=frank.li@nxp.com; x-ms-exchange-messagesentrepresentingtype: 1 x-mailer: git-send-email 2.5.2 x-originating-ip: [64.157.242.222] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 1acd1291-48af-44b3-0d28-08d6c2aba005 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(5600140)(711020)(4605104)(4618075)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(2017052603328)(7193020); SRVR:VI1PR04MB5774; x-ms-traffictypediagnostic: VI1PR04MB5774: x-microsoft-antispam-prvs: x-forefront-prvs: 000947967F x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(346002)(136003)(39860400002)(366004)(376002)(396003)(199004)(189003)(81166006)(6512007)(36756003)(105586002)(316002)(106356001)(256004)(110136005)(53936002)(86362001)(7736002)(4326008)(81156014)(305945005)(7416002)(8676002)(5660300002)(102836004)(6486002)(50226002)(186003)(8936002)(66066001)(6116002)(71190400001)(3846002)(71200400001)(97736004)(476003)(2501003)(68736007)(25786009)(386003)(478600001)(486006)(2906002)(52116002)(2201001)(99286004)(14454004)(6436002)(26005)(2616005)(6506007)(921003)(21314003)(32563001)(1121003); DIR:OUT; SFP:1101; SCL:1; SRVR:VI1PR04MB5774; H:VI1PR04MB4910.eurprd04.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; received-spf: None (protection.outlook.com: nxp.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: MSWu9tJlXGbyiRedmYaufp2d6thIMJXjICQZRPNGn5oWdyBhMREy5FTCWC1bKZrAQx1PQJuQyfA0khUMyRFDDgmn0kX01H3j/KwyVU62/qFpZHYIn98xNoJUm3CHolMevnfO+stbEPBTjgeY25lbcUg4TxqrRdelCKbmzRwKr1/JTFanIWtK+TcAIrWKD84uGUiu57foshWIP9jjkiVWtlzTLMka9W3buLg6WdlKtJEI9PL0O0woE/nPRRY29eqe3bZ+tWSm0sasU4AOYkjNtl88rgqeT2rep1KVJP7ESVdy0QcxY7YOTdvKjPGOQSmMW+IzP/kBVI15gjnRYDHiWeyn5cpc0FoonlpAvdCBMVCaopTFE+PjBSkIYt7tUw6Wt6b0jUXb7rbSdrzGwI3rf/AhviOpGsCNsEWAJRvgWI0= MIME-Version: 1.0 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 1acd1291-48af-44b3-0d28-08d6c2aba005 X-MS-Exchange-CrossTenant-originalarrivaltime: 16 Apr 2019 20:39:30.4809 (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-Transport-CrossTenantHeadersStamped: VI1PR04MB5774 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190416_133935_639648_44B33554 X-CRM114-Status: GOOD ( 10.45 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Frank Li Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Added binding doc for imx8qxp ddr performance monitor Signed-off-by: Frank Li Reviewed-by: Rob Herring --- No change from v4 to v5 Change from v4 to v4 * remove "standard xxx" Change from v2 to v3 * ddr_pmu0 -> ddr-pmu .../devicetree/bindings/perf/fsl-imx-ddr.txt | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 Documentation/devicetree/bindings/perf/fsl-imx-ddr.txt diff --git a/Documentation/devicetree/bindings/perf/fsl-imx-ddr.txt b/Documentation/devicetree/bindings/perf/fsl-imx-ddr.txt new file mode 100644 index 0000000..c667b87 --- /dev/null +++ b/Documentation/devicetree/bindings/perf/fsl-imx-ddr.txt @@ -0,0 +1,22 @@ +* Freescale(NXP) IMX8 DDR performance monitor + +Required properties: + +- compatible: should be one of: + "fsl,imx8-ddr-pmu" + "fsl,imx8m-ddr-pmu" + +- reg: physical address and size + +- interrupts: single interrupt + generated by the control block + +Example: + + ddr-pmu@5c020000 { + compatible = "fsl,imx8-ddr-pmu"; + reg = <0x0 0x5c020000 0x0 0x10000>; + interrupt-parent = <&gic>; + interrupts = ; + }; + From patchwork Tue Apr 16 20:39:33 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frank Li X-Patchwork-Id: 10904197 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 51E2F1515 for ; Tue, 16 Apr 2019 20:39:55 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2EEB7285D9 for ; Tue, 16 Apr 2019 20:39:55 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2287E284E8; Tue, 16 Apr 2019 20:39:55 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 3283D2228E for ; Tue, 16 Apr 2019 20:39:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:In-Reply-To:References: Message-ID:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=gOiof0T1M4ppxQwByfn6zrqomMO7YG92n0vRE6K6pRo=; b=ABzm6f3eKnAmOO tt0vQKAO4LJyn3rpQSt/UBJDpPnlEl+y4LF4Y0OYjrqAKx95TGw1/VzLK8DVRdGTbWuA1TvTiBTKz HEDsVJoX8gS0OoIQyYmmSWhpTd/FowKhSJeI5JIWhwXBVdBqJAIAvrOg+/l5hEVz8lfj9y8bpiXXn OUEy/4lP8/G4l6ySsQXIX73q8bLWYstPZgQA1vBNV83o/M8Gs1SdBhPv+ReNc4l3deFtV18xrMY5L 5kQ/R2zhhcCnGhQZUV3NOf82f08XyIX49e8rhpgwalPEBH7aLOx7MjQjnikATVe1jppSf3JFS7veA zo+pd2by8cFT+rAZmUBQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1hGUru-0006qg-0S; Tue, 16 Apr 2019 20:39:50 +0000 Received: from mail-he1eur02on0618.outbound.protection.outlook.com ([2a01:111:f400:fe05::618] helo=EUR02-HE1-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1hGUrh-0006c5-DK for linux-arm-kernel@lists.infradead.org; Tue, 16 Apr 2019 20:39:41 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=OpvSOHAIKrpXakuVjgJNuT4hFTBZ4NpgFO1jXqAoV9E=; b=N5VXWhzTUUvU0KUdRaLpW8dnT3Ql2vLCzmLuu7AOzDC2U6577O4KLAndRlmngdw35/wEjhhN+hMRZUXlgUv6FfIgykppfueGfUPu0ozdokY5l9GoJyCoLZ6U8KFA2u27OYfBqCZ9WXyGIlYDzNFIOr5vQJrBgNv3YIVKYegYENg= Received: from VI1PR04MB4910.eurprd04.prod.outlook.com (20.177.49.159) by VI1PR04MB5774.eurprd04.prod.outlook.com (20.178.127.204) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1792.15; Tue, 16 Apr 2019 20:39:33 +0000 Received: from VI1PR04MB4910.eurprd04.prod.outlook.com ([fe80::d973:1a7d:2eb6:281c]) by VI1PR04MB4910.eurprd04.prod.outlook.com ([fe80::d973:1a7d:2eb6:281c%7]) with mapi id 15.20.1813.011; Tue, 16 Apr 2019 20:39:33 +0000 From: Frank Li To: "mark.rutland@arm.com" , "will.deacon@arm.com" , "shawnguo@kernel.org" , "s.hauer@pengutronix.de" , "kernel@pengutronix.de" , "festevam@gmail.com" , dl-linux-imx , "robh+dt@kernel.org" , Aisheng Dong , "devicetree@vger.kernel.org" , "lznuaa@gmail.com" , "linux-arm-kernel@lists.infradead.org" Subject: [PATCH V5 2/4] drivers/perf: imx_ddr: Add ddr performance counter support Thread-Topic: [PATCH V5 2/4] drivers/perf: imx_ddr: Add ddr performance counter support Thread-Index: AQHU9JR/2JB/pkJJSkSTzlJBScPxqw== Date: Tue, 16 Apr 2019 20:39:33 +0000 Message-ID: <1555447156-28306-2-git-send-email-Frank.Li@nxp.com> References: <1555447156-28306-1-git-send-email-Frank.Li@nxp.com> In-Reply-To: <1555447156-28306-1-git-send-email-Frank.Li@nxp.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: SN6PR01CA0004.prod.exchangelabs.com (2603:10b6:805:b6::17) To VI1PR04MB4910.eurprd04.prod.outlook.com (2603:10a6:803:56::31) authentication-results: spf=none (sender IP is ) smtp.mailfrom=frank.li@nxp.com; x-ms-exchange-messagesentrepresentingtype: 1 x-mailer: git-send-email 2.5.2 x-originating-ip: [64.157.242.222] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 55825e78-9e04-4111-f570-08d6c2aba1c5 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(5600140)(711020)(4605104)(4618075)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(2017052603328)(7193020); SRVR:VI1PR04MB5774; x-ms-traffictypediagnostic: VI1PR04MB5774: x-microsoft-antispam-prvs: x-forefront-prvs: 000947967F x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(346002)(136003)(39860400002)(366004)(376002)(396003)(199004)(189003)(81166006)(6512007)(36756003)(105586002)(316002)(30864003)(14444005)(106356001)(5024004)(256004)(110136005)(53936002)(86362001)(7736002)(4326008)(81156014)(305945005)(7416002)(8676002)(5660300002)(11346002)(102836004)(6486002)(50226002)(186003)(8936002)(446003)(66066001)(6116002)(71190400001)(3846002)(71200400001)(97736004)(476003)(2501003)(68736007)(25786009)(386003)(478600001)(486006)(2906002)(52116002)(2201001)(53946003)(99286004)(14454004)(6436002)(76176011)(26005)(2616005)(6506007)(921003)(1121003)(579004); DIR:OUT; SFP:1101; SCL:1; SRVR:VI1PR04MB5774; H:VI1PR04MB4910.eurprd04.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; received-spf: None (protection.outlook.com: nxp.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: Z8NQEZzCaJc2Y4A19of1Sy11jFbFiXzdHkNqjJV1pljGB6dgpYN/RxJ5eGS4FAJvaJv4511734tKEPgV3piz4BcZBqsTXJEDobCx6LCCMyrQ6t6dJo5ELwxnJ58x23qSXntRtSYEk1rIkm4u6E2tGa9hFcamCKp/JDQr3dwMYB0iQkWw/hRm0BFxJgTgn60Pjhr74kTqoBkcUpzNqKItOyEHyA5JcctDfVScbNfLY7o1VgxvRcUiDiWaL3ZRyYEk5HA4s2U1G4pmmzoNxk5iUy401A15atzBDEPIpWFvjGibuGz1aqsP0qw2qXHz+J96MGhUW1E/V4P7x7WzSMv6nPtym7wEZckFO+fWQaOOUBLVky/8N+0HXa8NFUNri/ObXH7eWsVNMnRNKxrkvuZKbHyasKmk1ELblH3xwR97LTc= MIME-Version: 1.0 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 55825e78-9e04-4111-f570-08d6c2aba1c5 X-MS-Exchange-CrossTenant-originalarrivaltime: 16 Apr 2019 20:39:33.2937 (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-Transport-CrossTenantHeadersStamped: VI1PR04MB5774 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190416_133937_619821_F4FF3BAF X-CRM114-Status: GOOD ( 13.70 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Frank Li Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Add ddr performance monitor support for iMX8QXP There are 4 counters for ddr perfomance events. counter 0 is dedicated for cycles. you choose any up to 3 no cycles events. for example: perf stat -a -e ddr0/read-cycles/,ddr0/write-cycles/,ddr0/precharge/ ls perf stat -a -e ddr0/cycles/,ddr0/read-access/,ddr0/write-access/ ls Support below events. ddr0/activate/ [Kernel PMU event] ddr0/cycles/ [Kernel PMU event] ddr0/hp-read-credit-cnt/ [Kernel PMU event] ddr0/hp-read/ [Kernel PMU event] ddr0/hp-req-nodcredit/ [Kernel PMU event] ddr0/hp-xact-credit/ [Kernel PMU event] ddr0/load-mode/ [Kernel PMU event] ddr0/lp-read-credit-cnt/ [Kernel PMU event] ddr0/lp-req-nocredit/ [Kernel PMU event] ddr0/lp-xact-credit/ [Kernel PMU event] ddr0/mwr/ [Kernel PMU event] ddr0/precharge/ [Kernel PMU event] ddr0/raw-hazard/ [Kernel PMU event] ddr0/read-access/ [Kernel PMU event] ddr0/read-activate/ [Kernel PMU event] ddr0/read-command/ [Kernel PMU event] ddr0/read-cycles/ [Kernel PMU event] ddr0/read-modify-write-command/ [Kernel PMU event] ddr0/read-queue-depth/ [Kernel PMU event] ddr0/read-write-transition/ [Kernel PMU event] ddr0/read/ [Kernel PMU event] ddr0/refresh/ [Kernel PMU event] ddr0/selfresh/ [Kernel PMU event] ddr0/wr-xact-credit/ [Kernel PMU event] ddr0/write-access/ [Kernel PMU event] ddr0/write-command/ [Kernel PMU event] ddr0/write-credit-cnt/ [Kernel PMU event] ddr0/write-cycles/ [Kernel PMU event] ddr0/write-queue-depth/ [Kernel PMU event] ddr0/write/ Signed-off-by: Frank Li --- Change from v4 to v5 * Remove AXI ID filter function Change from v3 to v4 * Change FSL_IMX8_DDR_PERF to FSL_IMX8_DDR_PMU * sort include * remove struct fsl_ddr_devtype_data * Added comment need disable control first * Added comment about must enable cycle counter * Added macro for EVENT_AXI_READ, remove hardcode 0x41 and 0x42 * Added comment about cycle counter is fastest one Change from v2 to v3 * remove kfree Change from V1 to V2 * update Kconfig by use i.MX8 instead of i.MX8 QXP * remove gpl statememnt since SPDX tag * use dev_kzalloc * use dev_err * commit message show axi_read 0x41\axi_write 0x42 * commit message show cycles must be enabled * Irq only issue at cycles overflow * use NUM_COUNTER * use devm_request_irq * add hotplug callback to handle context migration drivers/perf/Kconfig | 7 + drivers/perf/Makefile | 1 + drivers/perf/fsl_imx8_ddr_perf.c | 553 +++++++++++++++++++++++++++++++++++++++ 3 files changed, 561 insertions(+) create mode 100644 drivers/perf/fsl_imx8_ddr_perf.c diff --git a/drivers/perf/Kconfig b/drivers/perf/Kconfig index a94e586..9bc3785 100644 --- a/drivers/perf/Kconfig +++ b/drivers/perf/Kconfig @@ -70,6 +70,13 @@ config ARM_DSU_PMU system, control logic. The PMU allows counting various events related to DSU. +config FSL_IMX8_DDR_PMU + tristate "Freescale i.MX8 DDR perf monitor" + depends on ARCH_MXC + help + Provides support for ddr perfomance monitor in i.MX8. Provide memory + througput information. + config HISI_PMU bool "HiSilicon SoC PMU" depends on ARM64 && ACPI diff --git a/drivers/perf/Makefile b/drivers/perf/Makefile index 3048994..2ebb4de 100644 --- a/drivers/perf/Makefile +++ b/drivers/perf/Makefile @@ -5,6 +5,7 @@ obj-$(CONFIG_ARM_DSU_PMU) += arm_dsu_pmu.o obj-$(CONFIG_ARM_PMU) += arm_pmu.o arm_pmu_platform.o obj-$(CONFIG_ARM_PMU_ACPI) += arm_pmu_acpi.o obj-$(CONFIG_ARM_SMMU_V3_PMU) += arm_smmuv3_pmu.o +obj-$(CONFIG_FSL_IMX8_DDR_PMU) += fsl_imx8_ddr_perf.o obj-$(CONFIG_HISI_PMU) += hisilicon/ obj-$(CONFIG_QCOM_L2_PMU) += qcom_l2_pmu.o obj-$(CONFIG_QCOM_L3_PMU) += qcom_l3_pmu.o diff --git a/drivers/perf/fsl_imx8_ddr_perf.c b/drivers/perf/fsl_imx8_ddr_perf.c new file mode 100644 index 0000000..aed9414 --- /dev/null +++ b/drivers/perf/fsl_imx8_ddr_perf.c @@ -0,0 +1,553 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * Copyright 2017 NXP + * Copyright 2016 Freescale Semiconductor, Inc. + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define COUNTER_CNTL 0x0 +#define COUNTER_READ 0x20 + +#define COUNTER_DPCR1 0x30 + +#define CNTL_OVER 0x1 +#define CNTL_CLEAR 0x2 +#define CNTL_EN 0x4 +#define CNTL_EN_MASK 0xFFFFFFFB +#define CNTL_CLEAR_MASK 0xFFFFFFFD +#define CNTL_OVER_MASK 0xFFFFFFFE + +#define CNTL_CSV_SHIFT 24 +#define CNTL_CSV_MASK (0xFF << CNTL_CSV_SHIFT) + +#define EVENT_CYCLES_ID 0 +#define EVENT_CYCLES_COUNTER 0 +#define NUM_COUNTER 4 +#define MAX_EVENT 3 +#define EVENT_AXI_READ 0x41 +#define EVENT_AXI_WRITE 0x42 + +#define to_ddr_pmu(p) container_of(p, struct ddr_pmu, pmu) + +#define DDR_PERF_DEV_NAME "ddr_perf" + +static DEFINE_IDA(ddr_ida); + +PMU_EVENT_ATTR_STRING(cycles, ddr_perf_cycles, "event=0x00"); +PMU_EVENT_ATTR_STRING(selfresh, ddr_perf_selfresh, "event=0x01"); +PMU_EVENT_ATTR_STRING(read-access, ddr_perf_read_accesses, "event=0x04"); +PMU_EVENT_ATTR_STRING(write-access, ddr_perf_write_accesses, "event=0x05"); +PMU_EVENT_ATTR_STRING(read-queue-depth, ddr_perf_read_queue_depth, + "event=0x08"); +PMU_EVENT_ATTR_STRING(write-queue-depth, ddr_perf_write_queue_depth, + "event=0x09"); +PMU_EVENT_ATTR_STRING(lp-read-credit-cnt, ddr_perf_lp_read_credit_cnt, + "event=0x10"); +PMU_EVENT_ATTR_STRING(hp-read-credit-cnt, ddr_perf_hp_read_credit_cnt, + "event=0x11"); +PMU_EVENT_ATTR_STRING(write-credit-cnt, ddr_perf_write_credit_cnt, + "event=0x12"); +PMU_EVENT_ATTR_STRING(read-command, ddr_perf_read_command, "event=0x20"); +PMU_EVENT_ATTR_STRING(write-command, ddr_perf_write_command, "event=0x21"); +PMU_EVENT_ATTR_STRING(read-modify-write-command, + ddr_perf_read_modify_write_command, "event=0x22"); +PMU_EVENT_ATTR_STRING(hp-read, ddr_perf_hp_read, "event=0x23"); +PMU_EVENT_ATTR_STRING(hp-req-nodcredit, ddr_perf_hp_req_nocredit, "event=0x24"); +PMU_EVENT_ATTR_STRING(hp-xact-credit, ddr_perf_hp_xact_credit, "event=0x25"); +PMU_EVENT_ATTR_STRING(lp-req-nocredit, ddr_perf_lp_req_nocredit, "event=0x26"); +PMU_EVENT_ATTR_STRING(lp-xact-credit, ddr_perf_lp_xact_credit, "event=0x27"); +PMU_EVENT_ATTR_STRING(wr-xact-credit, ddr_perf_wr_xact_credit, "event=0x29"); +PMU_EVENT_ATTR_STRING(read-cycles, ddr_perf_read_cycles, "event=0x2a"); +PMU_EVENT_ATTR_STRING(write-cycles, ddr_perf_write_cycles, "event=0x2b"); +PMU_EVENT_ATTR_STRING(read-write-transition, ddr_perf_read_write_transition, + "event=0x30"); +PMU_EVENT_ATTR_STRING(precharge, ddr_perf_precharge, "event=0x31"); +PMU_EVENT_ATTR_STRING(activate, ddr_perf_activate, "event=0x32"); +PMU_EVENT_ATTR_STRING(load-mode, ddr_perf_load_mode, "event=0x33"); +PMU_EVENT_ATTR_STRING(mwr, ddr_perf_mwr, "event=0x34"); +PMU_EVENT_ATTR_STRING(read, ddr_perf_read, "event=0x35"); +PMU_EVENT_ATTR_STRING(read-activate, ddr_perf_read_activate, "event=0x36"); +PMU_EVENT_ATTR_STRING(refresh, ddr_perf_refresh, "event=0x37"); +PMU_EVENT_ATTR_STRING(write, ddr_perf_write, "event=0x38"); +PMU_EVENT_ATTR_STRING(raw-hazard, ddr_perf_raw_hazard, "event=0x39"); + +static const struct of_device_id imx_ddr_pmu_dt_ids[] = { + { .compatible = "fsl,imx8-ddr-pmu",}, + { .compatible = "fsl,imx8m-ddr-pmu",}, + { /* sentinel */ } +}; + +struct ddr_pmu { + struct pmu pmu; + void __iomem *base; + cpumask_t cpu; + struct hlist_node node; + struct device *dev; + struct perf_event *active_events[NUM_COUNTER]; + int total_events; + enum cpuhp_state cpuhp_state; + bool cycles_active; + uintptr_t flags; +}; + +static ssize_t ddr_perf_cpumask_show(struct device *dev, + struct device_attribute *attr, char *buf) +{ + struct ddr_pmu *pmu = dev_get_drvdata(dev); + + return cpumap_print_to_pagebuf(true, buf, &pmu->cpu); +} + +static struct device_attribute ddr_perf_cpumask_attr = + __ATTR(cpumask, 0444, ddr_perf_cpumask_show, NULL); + +static struct attribute *ddr_perf_cpumask_attrs[] = { + &ddr_perf_cpumask_attr.attr, + NULL, +}; + +static struct attribute_group ddr_perf_cpumask_attr_group = { + .attrs = ddr_perf_cpumask_attrs, +}; + +static struct attribute *ddr_perf_events_attrs[] = { + &ddr_perf_cycles.attr.attr, + &ddr_perf_selfresh.attr.attr, + &ddr_perf_read_accesses.attr.attr, + &ddr_perf_write_accesses.attr.attr, + &ddr_perf_read_queue_depth.attr.attr, + &ddr_perf_write_queue_depth.attr.attr, + &ddr_perf_lp_read_credit_cnt.attr.attr, + &ddr_perf_hp_read_credit_cnt.attr.attr, + &ddr_perf_write_credit_cnt.attr.attr, + &ddr_perf_read_command.attr.attr, + &ddr_perf_write_command.attr.attr, + &ddr_perf_read_modify_write_command.attr.attr, + &ddr_perf_hp_read.attr.attr, + &ddr_perf_hp_req_nocredit.attr.attr, + &ddr_perf_hp_xact_credit.attr.attr, + &ddr_perf_lp_req_nocredit.attr.attr, + &ddr_perf_lp_xact_credit.attr.attr, + &ddr_perf_wr_xact_credit.attr.attr, + &ddr_perf_read_cycles.attr.attr, + &ddr_perf_write_cycles.attr.attr, + &ddr_perf_read_write_transition.attr.attr, + &ddr_perf_precharge.attr.attr, + &ddr_perf_activate.attr.attr, + &ddr_perf_load_mode.attr.attr, + &ddr_perf_mwr.attr.attr, + &ddr_perf_read.attr.attr, + &ddr_perf_read_activate.attr.attr, + &ddr_perf_refresh.attr.attr, + &ddr_perf_write.attr.attr, + &ddr_perf_raw_hazard.attr.attr, + NULL, +}; + +static struct attribute_group ddr_perf_events_attr_group = { + .name = "events", + .attrs = ddr_perf_events_attrs, +}; + +PMU_FORMAT_ATTR(event, "config:0-63"); + +static struct attribute *ddr_perf_format_attrs[] = { + &format_attr_event.attr, + NULL, +}; + +static struct attribute_group ddr_perf_format_attr_group = { + .name = "format", + .attrs = ddr_perf_format_attrs, +}; + +static const struct attribute_group *attr_groups[] = { + &ddr_perf_events_attr_group, + &ddr_perf_format_attr_group, + &ddr_perf_cpumask_attr_group, + NULL, +}; + +static u32 ddr_perf_alloc_counter(struct ddr_pmu *pmu, int event) +{ + int i; + + /* Always map cycle event to counter 0 + Cycles counter is dedicated for cycle event + can't used for the other events + */ + if (event == EVENT_CYCLES_ID) + return EVENT_CYCLES_COUNTER; + + for (i = 1; i < NUM_COUNTER; i++) + if (pmu->active_events[i] == NULL) + return i; + + return -ENOENT; +} + +static u32 ddr_perf_free_counter(struct ddr_pmu *pmu, int counter) +{ + if (counter < 0 || counter >= NUM_COUNTER) + return -ENOENT; + + pmu->active_events[counter] = NULL; + + return 0; +} + +static u32 ddr_perf_read_counter(struct ddr_pmu *pmu, int counter) +{ + return readl(pmu->base + COUNTER_READ + counter * 4); +} + +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; + + if (event->attr.type != event->pmu->type) + return -ENOENT; + + if (is_sampling_event(event) || event->attach_state & PERF_ATTACH_TASK) + return -EOPNOTSUPP; + + if (event->cpu < 0) { + dev_warn(pmu->dev, "Can't provide per-task data!\n"); + return -EOPNOTSUPP; + } + + if (event->attr.exclude_user || + event->attr.exclude_kernel || + event->attr.exclude_hv || + event->attr.exclude_idle || + event->attr.exclude_host || + event->attr.exclude_guest || + event->attr.sample_period) + return -EINVAL; + + event->cpu = cpumask_first(&pmu->cpu); + hwc->idx = -1; + + return 0; +} + + +static void ddr_perf_event_update(struct perf_event *event) +{ + struct ddr_pmu *pmu = to_ddr_pmu(event->pmu); + struct hw_perf_event *hwc = &event->hw; + u64 delta, prev_raw_count, new_raw_count; + int counter = hwc->idx; + + do { + prev_raw_count = local64_read(&hwc->prev_count); + new_raw_count = ddr_perf_read_counter(pmu, counter); + } while (local64_cmpxchg(&hwc->prev_count, prev_raw_count, + new_raw_count) != prev_raw_count); + + delta = (new_raw_count - prev_raw_count) & 0xFFFFFFFF; + + local64_add(delta, &event->count); +} + +static void ddr_perf_event_enable(struct ddr_pmu *pmu, int config, + int counter, bool enable) +{ + u8 reg = counter * 4 + COUNTER_CNTL; + int val; + + if (enable) { + /* must disable first, then enable again + * otherwise, cycle counter will not work + * if previous state is enabled. + */ + writel(0, pmu->base + reg); + val = CNTL_EN | CNTL_CLEAR; + val |= (config << CNTL_CSV_SHIFT) & CNTL_CSV_MASK; + } else { + /* Disable counter */ + val = readl(pmu->base + reg) & CNTL_EN_MASK; + } + + writel(val, pmu->base + reg); + + if (config == EVENT_CYCLES_ID) + pmu->cycles_active = enable; +} + +static void ddr_perf_event_start(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; + + local64_set(&hwc->prev_count, 0); + + ddr_perf_event_enable(pmu, event->attr.config, counter, true); + /* + * If the cycles counter wasn't explicitly selected, + * we will enable it now. + * cycles counter must be enabled otherwise other counters will + * stopped. + */ + if (counter > 0 && !pmu->cycles_active) + ddr_perf_event_enable(pmu, EVENT_CYCLES_ID, + EVENT_CYCLES_COUNTER, true); +} + +static int ddr_perf_event_add(struct perf_event *event, int flags) +{ + struct ddr_pmu *pmu = to_ddr_pmu(event->pmu); + struct hw_perf_event *hwc = &event->hw; + int counter; + int cfg = event->attr.config; + + counter = ddr_perf_alloc_counter(pmu, cfg); + if (counter < 0) { + dev_dbg(pmu->dev, "There are not enough counters\n"); + return -EOPNOTSUPP; + } + + pmu->active_events[counter] = event; + pmu->total_events++; + hwc->idx = counter; + + if (flags & PERF_EF_START) + ddr_perf_event_start(event, flags); + + local64_set(&hwc->prev_count, ddr_perf_read_counter(pmu, counter)); + + return 0; +} + +static void ddr_perf_event_stop(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_enable(pmu, event->attr.config, counter, false); + ddr_perf_event_update(event); +} + +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); + + ddr_perf_free_counter(pmu, counter); + pmu->total_events--; + hwc->idx = -1; + + /* If all events have stopped, stop the cycles counter as well */ + if ((pmu->total_events == 0) && pmu->cycles_active) + ddr_perf_event_enable(pmu, EVENT_CYCLES_ID, + EVENT_CYCLES_COUNTER, false); +} + +static int ddr_perf_init(struct ddr_pmu *pmu, void __iomem *base, + struct device *dev) +{ + *pmu = (struct ddr_pmu) { + .pmu = (struct pmu) { + .task_ctx_nr = perf_invalid_context, + .attr_groups = attr_groups, + .event_init = ddr_perf_event_init, + .add = ddr_perf_event_add, + .del = ddr_perf_event_del, + .start = ddr_perf_event_start, + .stop = ddr_perf_event_stop, + .read = ddr_perf_event_update, + }, + .base = base, + .dev = dev, + }; + + return ida_simple_get(&ddr_ida, 0, 0, GFP_KERNEL); +} + +static irqreturn_t ddr_perf_irq_handler(int irq, void *p) +{ + int i; + u8 reg; + int val; + int counter; + struct ddr_pmu *pmu = (struct ddr_pmu *) p; + struct perf_event *event; + + /* Only cycles counter overflowed can issue irq. all counters will + * be stopped when cycles counter overflow. but other counter don't stop + * when overflow happen. Update all of the local counter values, + * then reset the cycles counter, so the others can continue + * counting. cycles counter is fastest counter in all events. at last + * 4 times than other counters. + */ + for (i = 0; i < NUM_COUNTER; i++) { + + if (!pmu->active_events[i]) + continue; + + event = pmu->active_events[i]; + counter = event->hw.idx; + reg = counter * 4 + COUNTER_CNTL; + val = readl(pmu->base + reg); + + ddr_perf_event_update(event); + + if (counter == EVENT_CYCLES_COUNTER) { + ddr_perf_event_enable(pmu, + EVENT_CYCLES_ID, + EVENT_CYCLES_COUNTER, + true); + ddr_perf_event_update(event); + } + } + + return IRQ_HANDLED; +} + +static int ddr_perf_offline_cpu(unsigned int cpu, struct hlist_node *node) +{ + struct ddr_pmu *pmu = hlist_entry_safe(node, struct ddr_pmu, node); + int target; + + if (!cpumask_test_and_clear_cpu(cpu, &pmu->cpu)) + return 0; + + target = cpumask_any_but(cpu_online_mask, cpu); + if (target >= nr_cpu_ids) + return 0; + + perf_pmu_migrate_context(&pmu->pmu, cpu, target); + cpumask_set_cpu(target, &pmu->cpu); + + return 0; +} + +static int ddr_perf_probe(struct platform_device *pdev) +{ + struct ddr_pmu *pmu; + struct device_node *np; + void __iomem *base; + struct resource *iomem; + char *name; + char *hpname; + int num; + int ret; + u32 irq; + const struct of_device_id *of_id = + of_match_device(imx_ddr_pmu_dt_ids, &pdev->dev); + + iomem = platform_get_resource(pdev, IORESOURCE_MEM, 0); + base = devm_ioremap_resource(&pdev->dev, iomem); + if (IS_ERR(base)) + return PTR_ERR(base); + + np = pdev->dev.of_node; + + pmu = devm_kzalloc(&pdev->dev, sizeof(*pmu), GFP_KERNEL); + if (!pmu) + return -ENOMEM; + + num = ddr_perf_init(pmu, base, &pdev->dev); + + name = devm_kasprintf(&pdev->dev, GFP_KERNEL, "ddr%d", num); + if (!name) + return -ENOMEM; + + hpname = devm_kasprintf(&pdev->dev, GFP_KERNEL, + "perf/imx/ddr%d:online", num); + if (!hpname) + return -ENOMEM; + + pmu->flags = (uintptr_t) of_id->data; + + cpumask_set_cpu(raw_smp_processor_id(), &pmu->cpu); + ret = cpuhp_setup_state_multi(CPUHP_AP_ONLINE_DYN, hpname, NULL, + ddr_perf_offline_cpu); + + if (ret < 0) { + dev_err(&pdev->dev, "cpuhp_setup_state_multi failed\n"); + goto ddr_perf_err; + } + + pmu->cpuhp_state = ret; + + /* Register the pmu instance for cpu hotplug */ + cpuhp_state_add_instance_nocalls(pmu->cpuhp_state, &pmu->node); + + ret = perf_pmu_register(&(pmu->pmu), name, -1); + if (ret) + goto ddr_perf_err; + + /* Request irq */ + irq = of_irq_get(np, 0); + if (irq < 0) { + dev_err(&pdev->dev, "Failed to get irq: %d", irq); + ret = irq; + goto ddr_perf_irq_err; + } + + ret = devm_request_irq(&pdev->dev, irq, + ddr_perf_irq_handler, + IRQF_TRIGGER_RISING | IRQF_ONESHOT, + DDR_PERF_DEV_NAME, + pmu); + if (ret < 0) { + dev_err(&pdev->dev, "Request irq failed: %d", ret); + goto ddr_perf_irq_err; + } + + return 0; + +ddr_perf_irq_err: + perf_pmu_unregister(&(pmu->pmu)); + +ddr_perf_err: + if (pmu->cpuhp_state) + cpuhp_state_remove_instance_nocalls(pmu->cpuhp_state, &pmu->node); + + dev_warn(&pdev->dev, "i.MX8 DDR Perf PMU failed (%d), disabled\n", ret); + return ret; +} + +static int ddr_perf_remove(struct platform_device *pdev) +{ + struct ddr_pmu *pmu = platform_get_drvdata(pdev); + + cpuhp_state_remove_instance_nocalls(pmu->cpuhp_state, &pmu->node); + perf_pmu_unregister(&pmu->pmu); + + return 0; +} + +static struct platform_driver imx_ddr_pmu_driver = { + .driver = { + .name = "imx-ddr-pmu", + .of_match_table = imx_ddr_pmu_dt_ids, + }, + .probe = ddr_perf_probe, + .remove = ddr_perf_remove, +}; + +static int __init imx_ddr_pmu_init(void) +{ + return platform_driver_register(&imx_ddr_pmu_driver); +} + +module_init(imx_ddr_pmu_init); + From patchwork Tue Apr 16 20:39:35 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frank Li X-Patchwork-Id: 10904199 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 0237A14DB for ; Tue, 16 Apr 2019 20:40:01 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DC34B28535 for ; Tue, 16 Apr 2019 20:40:00 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D09772865F; Tue, 16 Apr 2019 20:40:00 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 7B79A28535 for ; Tue, 16 Apr 2019 20:40:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:In-Reply-To:References: Message-ID:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=QpXmPiHLnMYDlS58ta58Dmt6ViOj5SG8vNCZLM7d5Ss=; b=NmefNK4veNcSZl RSccT+rQm5aVauZ4ivToFd1Jx6GW30kOaJDsHbSzUxRLs94AgK8Ycin59ZWGhUgvW6AYrCB0o8Ubn LaVSRK6vwh2eAdR4uqA4dwkRIVQi2WIxtOmE4B45wb8GTy490Ogp4pp8whrNEVCvJOnqLQ4NKT907 qB7lp6VZ2L5it5q/ohmgfkfEyyC70EhLfqO/VVIdpZE2bhHPbdN/ncMaJLoniDERikyHaPMyQUy49 3n9aGDUlDm2PXwCTfajM2Re3Nfp8uSmKzGFNP8e31wOfQlGSBqQnvvxxf8QgEOrNRL5fQ+z35oQKT R5THCdYTDqnXJBrE/LiQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1hGUs2-0006zy-IY; Tue, 16 Apr 2019 20:39:58 +0000 Received: from mail-he1eur02on0618.outbound.protection.outlook.com ([2a01:111:f400:fe05::618] helo=EUR02-HE1-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1hGUrm-0006c5-71 for linux-arm-kernel@lists.infradead.org; Tue, 16 Apr 2019 20:39:44 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=smRTX/082Bqsx4QkAjP+jxW2e08Q8rrYKhJvjXg39tw=; b=brijzTEXwbasT0hRhrUIpddBVEf0M1OQnxdd2lQdLJsQsD1A6WuxmyuUTHeXfh5MULp380aNl2Sdtb5B7JND7GLkge/WlveNAE+wadZ7ItuO7ZOLec1+a9e9vb8ajZFJU9IkgNoOYgxU6Fsciw7AIxWBHhZm+AFrhRVjihIcz68= Received: from VI1PR04MB4910.eurprd04.prod.outlook.com (20.177.49.159) by VI1PR04MB5774.eurprd04.prod.outlook.com (20.178.127.204) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1792.15; Tue, 16 Apr 2019 20:39:36 +0000 Received: from VI1PR04MB4910.eurprd04.prod.outlook.com ([fe80::d973:1a7d:2eb6:281c]) by VI1PR04MB4910.eurprd04.prod.outlook.com ([fe80::d973:1a7d:2eb6:281c%7]) with mapi id 15.20.1813.011; Tue, 16 Apr 2019 20:39:36 +0000 From: Frank Li To: "mark.rutland@arm.com" , "will.deacon@arm.com" , "shawnguo@kernel.org" , "s.hauer@pengutronix.de" , "kernel@pengutronix.de" , "festevam@gmail.com" , dl-linux-imx , "robh+dt@kernel.org" , Aisheng Dong , "devicetree@vger.kernel.org" , "lznuaa@gmail.com" , "linux-arm-kernel@lists.infradead.org" Subject: [PATCH V5 3/4] arm64: dts: imx8qxp: added ddr performance monitor nodes Thread-Topic: [PATCH V5 3/4] arm64: dts: imx8qxp: added ddr performance monitor nodes Thread-Index: AQHU9JSBLkT3g8n+V0e7Ej6oruay7A== Date: Tue, 16 Apr 2019 20:39:35 +0000 Message-ID: <1555447156-28306-3-git-send-email-Frank.Li@nxp.com> References: <1555447156-28306-1-git-send-email-Frank.Li@nxp.com> In-Reply-To: <1555447156-28306-1-git-send-email-Frank.Li@nxp.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: SN6PR01CA0004.prod.exchangelabs.com (2603:10b6:805:b6::17) To VI1PR04MB4910.eurprd04.prod.outlook.com (2603:10a6:803:56::31) authentication-results: spf=none (sender IP is ) smtp.mailfrom=frank.li@nxp.com; x-ms-exchange-messagesentrepresentingtype: 1 x-mailer: git-send-email 2.5.2 x-originating-ip: [64.157.242.222] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 042bd990-635c-44d5-b3cc-08d6c2aba369 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(5600140)(711020)(4605104)(4618075)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(2017052603328)(7193020); SRVR:VI1PR04MB5774; x-ms-traffictypediagnostic: VI1PR04MB5774: x-microsoft-antispam-prvs: x-forefront-prvs: 000947967F x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(346002)(136003)(39860400002)(366004)(376002)(396003)(199004)(189003)(4744005)(81166006)(6512007)(36756003)(105586002)(316002)(106356001)(256004)(110136005)(53936002)(86362001)(7736002)(4326008)(81156014)(305945005)(7416002)(8676002)(5660300002)(11346002)(102836004)(6486002)(50226002)(186003)(8936002)(446003)(66066001)(6116002)(71190400001)(3846002)(71200400001)(97736004)(476003)(2501003)(68736007)(25786009)(386003)(478600001)(486006)(2906002)(52116002)(2201001)(99286004)(14454004)(6436002)(76176011)(26005)(2616005)(6506007)(921003)(32563001)(1121003); DIR:OUT; SFP:1101; SCL:1; SRVR:VI1PR04MB5774; H:VI1PR04MB4910.eurprd04.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; received-spf: None (protection.outlook.com: nxp.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: WDNg6T/Ifahk5JKBvxKazyjzH7VdRhCtsgEdAnQH0EA3+8O9JBlAWPyk5YtlmlVENsA+weo9UNQhkcMziUjq7NDQCQK5LjTxE+nobM23Wc+D8BCuz4op9pLWQe1u/j8bEvufBJ5vSOkDv0zCgFCni8BoS48GiIkqfN1D0wreJCdFWCRmFaRMcdcbrTWr5suAGsqPL3fVb5cqhhVyULGyIsPKFMy5glsMMiH8hdQC7oCMiSNHBDkY2IxbyBpnWkL5X6Dte/U0NnV/3T5/kgb8otS7AaGZHvVkVorJdm53m+T45F3zlx7QDRTukOHGohcaLHwqDM8kewnzBzfn4DGyf7k1RQdSngifISvveP+v++1EyXRdhFmFYTCtsVkwZyaA3pfBorrWRfdkGqbCjRcALUT0behzXZuJD/QWaRjNcE8= MIME-Version: 1.0 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 042bd990-635c-44d5-b3cc-08d6c2aba369 X-MS-Exchange-CrossTenant-originalarrivaltime: 16 Apr 2019 20:39:36.0136 (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-Transport-CrossTenantHeadersStamped: VI1PR04MB5774 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190416_133942_873629_0AA1FB72 X-CRM114-Status: UNSURE ( 9.71 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Frank Li Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Add ddr performance monitor Signed-off-by: Frank Li Reviewed-by: Fabio Estevam --- Change from v3 to v5 * none Change from v2 to v3 * ddr_pmu0 -> ddr-pmu arch/arm64/boot/dts/freescale/imx8qxp.dtsi | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/arch/arm64/boot/dts/freescale/imx8qxp.dtsi b/arch/arm64/boot/dts/freescale/imx8qxp.dtsi index 0683ee2..16f2588 100644 --- a/arch/arm64/boot/dts/freescale/imx8qxp.dtsi +++ b/arch/arm64/boot/dts/freescale/imx8qxp.dtsi @@ -110,6 +110,13 @@ interrupts = ; }; + ddr-pmu@5c020000 { + compatible = "fsl,imx8-ddr-pmu"; + reg = <0x0 0x5c020000 0x0 0x10000>; + interrupt-parent = <&gic>; + interrupts = ; + }; + psci { compatible = "arm,psci-1.0"; method = "smc"; From patchwork Tue Apr 16 20:39:39 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frank Li X-Patchwork-Id: 10904201 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 032091515 for ; Tue, 16 Apr 2019 20:40:17 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D9709204BF for ; Tue, 16 Apr 2019 20:40:16 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D6F9328A11; Tue, 16 Apr 2019 20:40:16 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 8067828A11 for ; Tue, 16 Apr 2019 20:40:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:In-Reply-To:References: Message-ID:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=3/G4mcsxrQp4efWIjmtKwsSpo/wITVZb9WAmlTCIWSc=; b=IVqlOIgQTshkTG hANKG/LO/noZR6fFo7j80j9qw1PZa1yRby8yYCP5oukmIq+YqCvgTdCVScl88RvbTS/jyniBsyrj+ oleR1WKBuOFQiR2t4TzGtQhfhGrzUza6LBE21lqxHGrrWZsbYR/tmqnDbL8cCRed7hsPtMSCcO34B 8uu7GPP4ZMjRzlw4be1h+E25qwYb93nzAavlwKWIGxoFek99eqgC0lrTpZJtzMGRVogQXQypwRPhg WZAZdm/jhRucpli256rxmEw4aZqIlcBB4fuA92dxXTk+Dkg/TZQiucPHA8O58hE1KEDUbPWZ7I1/U BLqgMc3jhOhwbUci0e6w==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1hGUsH-00083V-DP; Tue, 16 Apr 2019 20:40:13 +0000 Received: from mail-he1eur02on0618.outbound.protection.outlook.com ([2a01:111:f400:fe05::618] helo=EUR02-HE1-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1hGUrp-0006c5-4I for linux-arm-kernel@lists.infradead.org; Tue, 16 Apr 2019 20:39:46 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=AkX3GMXqmv+c27RhFGkG2MKXWR9bZzO9TN/fLY/eM2U=; b=tBWDHRbvMHHkGgypieY1PKFUQXLLEl+/dSlsFjZujam36fpyZbClnDf2xvmStP8Z6Mlup0U9QBHRsTQF/7+EB905v36lgGmzUIQNkrpz6CucRVD/e48SrLOfPGsC/2KZrkBcXUkTvgRU3hYjZbpBT6jgsJqSH7tZr8ddFHXNiEc= Received: from VI1PR04MB4910.eurprd04.prod.outlook.com (20.177.49.159) by VI1PR04MB5774.eurprd04.prod.outlook.com (20.178.127.204) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1792.15; Tue, 16 Apr 2019 20:39:39 +0000 Received: from VI1PR04MB4910.eurprd04.prod.outlook.com ([fe80::d973:1a7d:2eb6:281c]) by VI1PR04MB4910.eurprd04.prod.outlook.com ([fe80::d973:1a7d:2eb6:281c%7]) with mapi id 15.20.1813.011; Tue, 16 Apr 2019 20:39:39 +0000 From: Frank Li To: "mark.rutland@arm.com" , "will.deacon@arm.com" , "shawnguo@kernel.org" , "s.hauer@pengutronix.de" , "kernel@pengutronix.de" , "festevam@gmail.com" , dl-linux-imx , "robh+dt@kernel.org" , Aisheng Dong , "devicetree@vger.kernel.org" , "lznuaa@gmail.com" , "linux-arm-kernel@lists.infradead.org" Subject: [PATCH V5 4/4] MAINTAINERS: Added imx DDR performonitor driver maintainer information Thread-Topic: [PATCH V5 4/4] MAINTAINERS: Added imx DDR performonitor driver maintainer information Thread-Index: AQHU9JSCv6ggJJfgK0ubZuZ8uCj6Mg== Date: Tue, 16 Apr 2019 20:39:39 +0000 Message-ID: <1555447156-28306-4-git-send-email-Frank.Li@nxp.com> References: <1555447156-28306-1-git-send-email-Frank.Li@nxp.com> In-Reply-To: <1555447156-28306-1-git-send-email-Frank.Li@nxp.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: SN6PR01CA0004.prod.exchangelabs.com (2603:10b6:805:b6::17) To VI1PR04MB4910.eurprd04.prod.outlook.com (2603:10a6:803:56::31) authentication-results: spf=none (sender IP is ) smtp.mailfrom=frank.li@nxp.com; x-ms-exchange-messagesentrepresentingtype: 1 x-mailer: git-send-email 2.5.2 x-originating-ip: [64.157.242.222] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 2832fc50-dc9e-47ee-c80f-08d6c2aba509 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(5600140)(711020)(4605104)(4618075)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(2017052603328)(7193020); SRVR:VI1PR04MB5774; x-ms-traffictypediagnostic: VI1PR04MB5774: x-microsoft-antispam-prvs: x-forefront-prvs: 000947967F x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(346002)(136003)(39860400002)(366004)(376002)(396003)(199004)(189003)(4744005)(81166006)(6512007)(36756003)(105586002)(316002)(106356001)(256004)(110136005)(53936002)(86362001)(7736002)(4326008)(81156014)(305945005)(7416002)(8676002)(5660300002)(11346002)(102836004)(6486002)(50226002)(186003)(8936002)(446003)(66066001)(6116002)(71190400001)(3846002)(71200400001)(97736004)(476003)(2501003)(68736007)(25786009)(386003)(478600001)(486006)(2906002)(52116002)(2201001)(99286004)(14454004)(6436002)(76176011)(26005)(2616005)(6506007)(921003)(1121003); DIR:OUT; SFP:1101; SCL:1; SRVR:VI1PR04MB5774; H:VI1PR04MB4910.eurprd04.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; received-spf: None (protection.outlook.com: nxp.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: SxSyh1uWXKhKdKKIXm7N3dCBMJeFocPCuzB3qtqYw09D0RVu5nUmqh25gqF3U6MXSvh6wFfqvDW38SRXCPLHdoo2cF0pahhzKg4zTJrPqaJvxlmjGZtEmHeRBFjlYXFG449KFrkOkR/jcHhTFWgZz8zxABZdfuDDEEcYVtzmNoaQe37oxmbrEoDyHZqtrYXbpNgFkgOiVyfWKLTJ+jZwbu7qJSWbv3uxz7SMi9XpzQwmCjPBuVdeSg9f7QNaXLOr+P+VB4W7n8ED3ejmokJp2cu2lqxrWIyd3TbLNmGgHv79Ex8P2sbk7Xfo5x7AoU1qZe3Yos2c7NOJnnaKfBo5oF9vvywQmUq0Gz1hoJVIZ9fMlNFG+xNvpUncb9DKKh0CzhDgxxn7jH/od1jtS6zuNnAELV8zUzK01SBMUWmje3s= MIME-Version: 1.0 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 2832fc50-dc9e-47ee-c80f-08d6c2aba509 X-MS-Exchange-CrossTenant-originalarrivaltime: 16 Apr 2019 20:39:39.0596 (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-Transport-CrossTenantHeadersStamped: VI1PR04MB5774 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190416_133945_254540_1EAF1057 X-CRM114-Status: UNSURE ( 9.27 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Frank Li Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Add DDR perf counter driver maintainer information Signed-off-by: Frank Li --- No change from v1 to v5 MAINTAINERS | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index b4a972f..332faba 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -6263,6 +6263,13 @@ L: linux-i2c@vger.kernel.org S: Maintained F: drivers/i2c/busses/i2c-cpm.c +FREESCALE IMX DDR Performance Monitor DRIVER +M: Frank Li +L: linux-arm-kernel@lists.infradead.org +S: Maintained +F: drivers/perf/fsl_imx8_ddr_perf.c +F: Documentation/devicetree/bindings/perf/fsl-imx-ddr.txt + FREESCALE IMX LPI2C DRIVER M: Dong Aisheng L: linux-i2c@vger.kernel.org