From patchwork Wed Apr 24 22:29:13 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frank Li X-Patchwork-Id: 10915849 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 9816B13B5 for ; Wed, 24 Apr 2019 22:29:28 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7D0E228BE1 for ; Wed, 24 Apr 2019 22:29:28 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6FB2228BE5; Wed, 24 Apr 2019 22:29:28 +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 E352E28BE1 for ; Wed, 24 Apr 2019 22:29:27 +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=w88XhsUvn3O0huVOjJT6N8a4B6TL/iUyqAI1VkGHSUY=; b=Yum/RILXJ0Be/m tNRVHJMwkB8SLPFE17giNBqI1sfWZmwE7W8Crxlp+FR4O8mTOWL+no6egF7LyfxAG/rZMdWkLLKRj +7KTOCkGSfKr7ijMveN3NKxDKSt8BsnnHY2KO+nXdEYtGgSbnI6pPRSl4k6RnzafT4qXFHtpAI9Bd BPV3fk9Ag545QuOykIwItAQFpGdH1ubVa6C24SS4GnuKumymZkoij4TTJnp4IdhZQifoh9DD95gd8 /ZoD9Rj2b7rwIndGm/8PsDwpMEgDMb2S637UK2eoZ3wOymA1GR0oAo6v0AcoIUAI0+krf3pEUj+lv FyCSclRnJOQsdafiMtew==; 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 1hJQOJ-0005iS-7v; Wed, 24 Apr 2019 22:29:23 +0000 Received: from mail-db5eur01on061a.outbound.protection.outlook.com ([2a01:111:f400:fe02::61a] helo=EUR01-DB5-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1hJQOF-0005fx-DH for linux-arm-kernel@lists.infradead.org; Wed, 24 Apr 2019 22:29:21 +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=3YiVWRhupe55XxaM9QcSEway+MaOF8hVOBSkPqg80XA=; b=rrDALIDu/eXzh08GnWQ/Wlb3j7fDQrapdi4+cRbCfb0XBHaaVdpu1T09ld6W230R1smdS1FNvplEjueN3og1EOlf2tpV9sN8ppiz/oCzV+fidjl3v50e1qAgBFRsvIQc66UKf1U1YyTojOeUEJDNgFPzcyWcn5iorjBb3PGkfYc= Received: from VI1PR04MB4910.eurprd04.prod.outlook.com (20.177.49.159) by VI1PR04MB6079.eurprd04.prod.outlook.com (20.179.25.81) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1813.16; Wed, 24 Apr 2019 22:29:14 +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.1835.010; Wed, 24 Apr 2019 22:29:14 +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 V6 1/4] dt-bindings: perf: imx8-ddr: add imx8qxp ddr performance monitor Thread-Topic: [PATCH V6 1/4] dt-bindings: perf: imx8-ddr: add imx8qxp ddr performance monitor Thread-Index: AQHU+u0kaeJpmKgLgECRDqTOn88wIA== Date: Wed, 24 Apr 2019 22:29:13 +0000 Message-ID: <1556144928-24828-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: SN4PR0401CA0037.namprd04.prod.outlook.com (2603:10b6:803:2a::23) 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: 1d757bf8-2263-4ad9-40d6-08d6c904469a x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600141)(711020)(4605104)(4618075)(2017052603328)(7193020); SRVR:VI1PR04MB6079; x-ms-traffictypediagnostic: VI1PR04MB6079: x-microsoft-antispam-prvs: x-forefront-prvs: 00179089FD x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(396003)(136003)(366004)(376002)(39860400002)(346002)(199004)(189003)(68736007)(386003)(486006)(2201001)(36756003)(316002)(186003)(5660300002)(110136005)(256004)(6506007)(6512007)(53936002)(26005)(7416002)(102836004)(2906002)(2501003)(99286004)(66476007)(6486002)(8936002)(8676002)(64756008)(2616005)(71200400001)(476003)(66446008)(71190400001)(50226002)(97736004)(73956011)(66946007)(6436002)(81166006)(81156014)(66066001)(25786009)(4326008)(478600001)(52116002)(86362001)(6116002)(14454004)(7736002)(305945005)(66556008)(3846002)(21314003)(32563001)(921003)(1121003); DIR:OUT; SFP:1101; SCL:1; SRVR:VI1PR04MB6079; 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: WtQPOTUipmYizKpxv384QZRk6ilzUnSmtpOy2tmHGLt34j2nT3Nvh/dqqq/JEfA+Jag3865txtofnFsgospC4zKaZfkHE024RkXbKgCa2HKf3zY2/kJVwOxLgwWBb1IIhxN3iNda+716/oEFoowRV3ZV1G0+Z2U+XsEGuJ+Wi7pkLUhoAbWRo0sW4kX3TIQbgInJ+8JRs94ISGB9HAnIlUQpydu5l3nZDhRN7klsQgWXV0L9P7RWovP6HEVtuz7cW7tKJz/JLcVvIRhwewX5WQp1iSwdWjkyVodysSfSc0+zL08KW+oPzvnY5NOt8zbtqUZkfli3pZLIAPN0gehiFqn6+3ZUBIo6EpsB0M8HN4mnS7nnD6jGoFVksYpygt5+CLsTzYHV1PffGzHwSnhPV/pbHMz9cZ+VX81BJ2oI8M8= MIME-Version: 1.0 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 1d757bf8-2263-4ad9-40d6-08d6c904469a X-MS-Exchange-CrossTenant-originalarrivaltime: 24 Apr 2019 22:29:13.6321 (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: VI1PR04MB6079 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190424_152919_503952_8492D084 X-CRM114-Status: GOOD ( 10.05 ) 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 v6 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 Wed Apr 24 22:29:18 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frank Li X-Patchwork-Id: 10915851 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 27F1F13B5 for ; Wed, 24 Apr 2019 22:29:38 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 11CC128BE1 for ; Wed, 24 Apr 2019 22:29:38 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 013F228BE5; Wed, 24 Apr 2019 22:29:37 +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 C408D28BE1 for ; Wed, 24 Apr 2019 22:29:36 +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=VuHDoSs/yL74xAp5TQP1eYU3hLtSdEZcHhCq3yO57uA=; b=gJ4Ulr3VcMwONg aBO0F9fMxuQcXhXjbt+NBqprK9uO0qGdLg56qfbxK41yN1jlzoDV0/w3121k5WacRjZdQ1i8OExhC 6LIR1t8+H2/WJEbVcsaTCvWu/ThjQZrGvbTE+f2arSGFE8DfhhUBckhpMQ/p4mY1BCM778wWYzWj2 NvGjF2ViIp1RzTDPpL83xM1SEir2zZyt/wGICaZDTO82IbxEcoCo2ORnd822kpuDXO23xwftlRBxN 65W3tGdIS1iUIww6ZxhDL2MtD+wuIVTxb1YikqjXeHcQV4Rb9o08SUjv/S0st2IK1bzTEU5/qh49e bOucl7/J2cUsaJBJbdDA==; 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 1hJQOV-0005wU-6a; Wed, 24 Apr 2019 22:29:35 +0000 Received: from mail-db5eur01on061a.outbound.protection.outlook.com ([2a01:111:f400:fe02::61a] helo=EUR01-DB5-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1hJQOH-0005fx-GL for linux-arm-kernel@lists.infradead.org; Wed, 24 Apr 2019 22:29:24 +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=CV7mGCPWSV2X8kORwTFL/mTnrDvt8BXe/5CF/DmVs8A=; b=WrjdQqazLF2tb/kbdhpgE18K+ddUtZoI14sbx83eJIy/D1QOrtWD9dIa/Vgv5w64WTpB896u6UiTciE0KguGbjK4g8RSyoZEN4IQdxUIbOe8V0RYvHtObil+49sV/k+2MMPmsCLII0I0R+1JWD/jT4Fq4wkX1D60qPvhWXn5f2s= Received: from VI1PR04MB4910.eurprd04.prod.outlook.com (20.177.49.159) by VI1PR04MB6079.eurprd04.prod.outlook.com (20.179.25.81) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1813.16; Wed, 24 Apr 2019 22:29:18 +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.1835.010; Wed, 24 Apr 2019 22:29:18 +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 V6 2/4] drivers/perf: imx_ddr: Add ddr performance counter support Thread-Topic: [PATCH V6 2/4] drivers/perf: imx_ddr: Add ddr performance counter support Thread-Index: AQHU+u0no+ligooDt0yI6JcShT0l1g== Date: Wed, 24 Apr 2019 22:29:18 +0000 Message-ID: <1556144928-24828-2-git-send-email-Frank.Li@nxp.com> References: <1556144928-24828-1-git-send-email-Frank.Li@nxp.com> In-Reply-To: <1556144928-24828-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: SN4PR0401CA0037.namprd04.prod.outlook.com (2603:10b6:803:2a::23) 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: 5421d64a-73c6-4e59-efc2-08d6c90448eb x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600141)(711020)(4605104)(4618075)(2017052603328)(7193020); SRVR:VI1PR04MB6079; x-ms-traffictypediagnostic: VI1PR04MB6079: x-microsoft-antispam-prvs: x-forefront-prvs: 00179089FD x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(396003)(136003)(366004)(376002)(39860400002)(346002)(199004)(189003)(68736007)(386003)(486006)(2201001)(36756003)(316002)(5024004)(186003)(5660300002)(110136005)(14444005)(256004)(53946003)(6506007)(6512007)(53936002)(26005)(7416002)(102836004)(2906002)(2501003)(99286004)(66476007)(6486002)(8936002)(8676002)(64756008)(2616005)(71200400001)(476003)(66446008)(71190400001)(50226002)(97736004)(30864003)(73956011)(66946007)(6436002)(81166006)(81156014)(76176011)(66066001)(11346002)(25786009)(4326008)(478600001)(52116002)(86362001)(446003)(6116002)(14454004)(7736002)(305945005)(66556008)(3846002)(921003)(1121003)(579004); DIR:OUT; SFP:1101; SCL:1; SRVR:VI1PR04MB6079; 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: G9egj8kSbASq5FnKuOMTp5YcAX4rJm2lz13pIjDigipcGUBOrkxXr2s+lO92n2yCXpaWp6cRbC7yunpurVCG003cW28Ndtn1vVA0DwuPf5qTtthvTXmAWSIUS1xeRNcE9KErA039uJ4yPOH4JjrWUxbrkiucpGRBAQNWWnFnUVFBTuo3K63kDJdNlvyS8gbJRbJC/9HXCaTUdp6JWtG+2+2syChIvuHzRBb2JarQDXzKnNezJDtYZvC2LUDlc8OMFOEnQxii8UtqDz/zdcDKD4K9kZlyilGFgi4p57DXPcuKPULqnvCqTMrf2TjjtopLbOBzMoiJaGzNF7WKAu0BQb+TN74vsTyFfdJHDeOhi22ZcK8TnKpvmSRmvKDu/8YwALGEHXq+vItCZUJFkgFOA3svkxZTOTj62VE0nn1K6rM= MIME-Version: 1.0 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 5421d64a-73c6-4e59-efc2-08d6c90448eb X-MS-Exchange-CrossTenant-originalarrivaltime: 24 Apr 2019 22:29:18.0852 (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: VI1PR04MB6079 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190424_152921_682162_A406773D X-CRM114-Status: GOOD ( 13.51 ) 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/axid-read/ [Kernel PMU event] ddr0/axid-write/ [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 v5 to v6 * fix insmod\rmmod problem * remove randunt register read at irq handle * change u32 irq to int * devm_request_irq use default flags. 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 | 544 +++++++++++++++++++++++++++++++++++++++ 3 files changed, 552 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..3da70561 --- /dev/null +++ b/drivers/perf/fsl_imx8_ddr_perf.c @@ -0,0 +1,544 @@ +// 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; + 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]; + + ddr_perf_event_update(event); + + if (event->hw.idx == 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; + int 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); + + platform_set_drvdata(pdev, pmu); + + 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, + 0, + 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, +}; + +module_platform_driver(imx_ddr_pmu_driver); +MODULE_LICENSE("GPL v2"); From patchwork Wed Apr 24 22:29:20 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frank Li X-Patchwork-Id: 10915853 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 1D0D31575 for ; Wed, 24 Apr 2019 22:29:59 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0AC9E289CD for ; Wed, 24 Apr 2019 22:29:59 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id F2C2328B5D; Wed, 24 Apr 2019 22:29:58 +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 A0D28289CD for ; Wed, 24 Apr 2019 22:29:58 +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=Ol6luC76U0wQ+uEoa8kgDh8EsoRXqbVN3+3BWPFEyTs=; b=AZ+4PrvKJs0CcH CqIbCFJ80Lg2Pv2ACLlFBnBdBRmZdACJr0gwQt6RCOBTze2Ysh724f8uxrmDYli1kyGStIrG+yBwB 1Mw5zTBYOYLXXIAeRvYz0T2nebsFoBK10rGOupTHDnAD09UQqdanov9CgAbkcHDmcDUFHCcwRxGHt v1euteJbqhaX5m5FPzdPquqoIY2pudM+5Ec1HUJRmwyTsI6uivuNLIT+ahkI5wrGs/o8dJTtB3qBc EsC+yAKfbdm9V/fWOLyIKvEKCK6QBiPezaItlxGKgnDYRuPAZAbRGRdZHvVdXkRn2OZwniRGvgWat N1Jy0rKdBc09MtemB7KA==; 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 1hJQOo-0006NT-1w; Wed, 24 Apr 2019 22:29:54 +0000 Received: from mail-db5eur01on061a.outbound.protection.outlook.com ([2a01:111:f400:fe02::61a] helo=EUR01-DB5-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1hJQOK-0005fx-MZ for linux-arm-kernel@lists.infradead.org; Wed, 24 Apr 2019 22:29:27 +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=EEqMB/MOZdU3i6nLzxPLUoggOwci0bQ8ok7OlUP/dpI=; b=ZQHTOKNXv6jG3ESY+OzGia2Fb9ukYeB2M3HwSYmGNUwtVgQQV63GWvxf0HDXHaXujMx4jd+23tHSDP6q+ONO3kUv++jUUITQSWY2LgtpaSlJ52rQntgBBQ9AwwJ5UrORpq6RW90feLiWc4bDqy0gAsQbS4zgF98tf1M92ENsT5k= Received: from VI1PR04MB4910.eurprd04.prod.outlook.com (20.177.49.159) by VI1PR04MB6079.eurprd04.prod.outlook.com (20.179.25.81) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1813.16; Wed, 24 Apr 2019 22:29:21 +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.1835.010; Wed, 24 Apr 2019 22:29:21 +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 V6 3/4] arm64: dts: imx8qxp: added ddr performance monitor nodes Thread-Topic: [PATCH V6 3/4] arm64: dts: imx8qxp: added ddr performance monitor nodes Thread-Index: AQHU+u0pO98H39NrOkyyyxOrBg5XaA== Date: Wed, 24 Apr 2019 22:29:20 +0000 Message-ID: <1556144928-24828-3-git-send-email-Frank.Li@nxp.com> References: <1556144928-24828-1-git-send-email-Frank.Li@nxp.com> In-Reply-To: <1556144928-24828-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: SN4PR0401CA0037.namprd04.prod.outlook.com (2603:10b6:803:2a::23) 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: 5b83e542-58ff-4dc7-af92-08d6c9044b90 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600141)(711020)(4605104)(4618075)(2017052603328)(7193020); SRVR:VI1PR04MB6079; x-ms-traffictypediagnostic: VI1PR04MB6079: x-microsoft-antispam-prvs: x-forefront-prvs: 00179089FD x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(396003)(136003)(366004)(376002)(39860400002)(346002)(199004)(189003)(68736007)(386003)(486006)(2201001)(36756003)(316002)(186003)(5660300002)(110136005)(256004)(6506007)(6512007)(53936002)(26005)(7416002)(102836004)(2906002)(2501003)(99286004)(66476007)(6486002)(8936002)(8676002)(64756008)(2616005)(71200400001)(476003)(66446008)(71190400001)(50226002)(97736004)(73956011)(66946007)(6436002)(81166006)(81156014)(4744005)(76176011)(66066001)(11346002)(25786009)(4326008)(478600001)(52116002)(86362001)(446003)(6116002)(14454004)(7736002)(305945005)(66556008)(3846002)(32563001)(921003)(1121003); DIR:OUT; SFP:1101; SCL:1; SRVR:VI1PR04MB6079; 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: GK7glomcL5pFWxvSj9m5fbs5ZSXECaWnDOepowOaba9tEIpiDQNsWBeLhH2sEUMAUfC8J8Lj6y8NjxI3EGuBtAGW57Y4+aXklapuW3ecqWvoJi1g+aKILR2EBOfm46AP12AnRLIOnu70kANwqHFqTtLqPr0+B9z42na3jXMnX3VwbPwzVY5vSjl3d/E90YqpqNouaPit4UfkduNhrWPNjjUPZ7jNUWSNXfhAuMazZNt0LN68vHulwzQbK1FhxOVHTHx1eS67dZsuG0SakfHUalakr/zhoeOySrIMiVo4R6rrryQvEoZmCs1HjrIVLv7ifBVNstg+cFFKwNMVytgUdECqKPI3k+YABIQxMo9A0X4rknQF+CQCL6rzF4YD1NTWeJ2AFXXj5gP//mTBtPadv1lquzJEv0NuNltP2pDxa8I= MIME-Version: 1.0 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 5b83e542-58ff-4dc7-af92-08d6c9044b90 X-MS-Exchange-CrossTenant-originalarrivaltime: 24 Apr 2019 22:29:21.0343 (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: VI1PR04MB6079 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190424_152924_935996_EF82A91A X-CRM114-Status: UNSURE ( 9.31 ) 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 v6 * 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 Wed Apr 24 22:29:23 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frank Li X-Patchwork-Id: 10915855 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 BEDCD922 for ; Wed, 24 Apr 2019 22:30:15 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A88D028ABF for ; Wed, 24 Apr 2019 22:30:15 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 958CF28B70; Wed, 24 Apr 2019 22:30:15 +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 34F8A28ABF for ; Wed, 24 Apr 2019 22:30:15 +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=jOjR+lUuUDyr2czinWO7jn2QnLLwu8i4e74fAifE6Oc=; b=dLSU4ocq4FcXou KUNAceBP1yuqTv3oksxhlleT1qonVuQp+ASPfNqesAQT5zz4Mh8LzXKfxhEcwt7lFcF80cM+xGBSK 1q8EQhjOHPc2ybzUA13sIzC3v/g8RrItcgvM+84Nf9+ZN3DNW+e3wKEmpqcJXAJJ/3OUrKCQ+KfuX nTOaRRo7dyWI7B0XFUuqT+PtMcN+nbjSy4c2nZa8zwtpnLcNncIcmt97xpBuscdA6yLxAevoXAn// k2dB3SpG0nfpOAlvV3azEdBCJgBRwflbKWFe1BBiJHFB54eJApTOMgsdQarhdKf64TWSI0cWbqeU3 HRW2zWSj4yga9MKFbzTQ==; 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 1hJQP3-0006ls-C5; Wed, 24 Apr 2019 22:30:09 +0000 Received: from mail-db5eur01on061a.outbound.protection.outlook.com ([2a01:111:f400:fe02::61a] helo=EUR01-DB5-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1hJQOO-0005fx-AJ for linux-arm-kernel@lists.infradead.org; Wed, 24 Apr 2019 22:29:30 +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=AqUQIkmdiycCHDFLt9NIWohoY8Hr5i2Saos95n50R/s=; b=wqqqSxac37GCz2GCvsATBeE5JzCxAAQcGs/AmUQMoTaF5AUZ+U8TGpKXCnGx0CCIlC51KZY8hUu6cGHOVMugHzHUq4zbadOxR/iggM5dbvDip1b2FH3IGvUFdy95VHPfAdNvBdyjTQn1KQVkpmW2cGbIxGXD9G12MupdbwIz5yQ= Received: from VI1PR04MB4910.eurprd04.prod.outlook.com (20.177.49.159) by VI1PR04MB6079.eurprd04.prod.outlook.com (20.179.25.81) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1813.16; Wed, 24 Apr 2019 22:29:24 +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.1835.010; Wed, 24 Apr 2019 22:29:24 +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 V6 4/4] MAINTAINERS: Added imx DDR performonitor driver maintainer information Thread-Topic: [PATCH V6 4/4] MAINTAINERS: Added imx DDR performonitor driver maintainer information Thread-Index: AQHU+u0rt+xhZrE4j0+dL3cVupoSBA== Date: Wed, 24 Apr 2019 22:29:23 +0000 Message-ID: <1556144928-24828-4-git-send-email-Frank.Li@nxp.com> References: <1556144928-24828-1-git-send-email-Frank.Li@nxp.com> In-Reply-To: <1556144928-24828-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: SN4PR0401CA0037.namprd04.prod.outlook.com (2603:10b6:803:2a::23) 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: 4af2503c-3746-4f82-6059-08d6c9044d52 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600141)(711020)(4605104)(4618075)(2017052603328)(7193020); SRVR:VI1PR04MB6079; x-ms-traffictypediagnostic: VI1PR04MB6079: x-microsoft-antispam-prvs: x-forefront-prvs: 00179089FD x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(396003)(136003)(366004)(376002)(39860400002)(346002)(199004)(189003)(68736007)(386003)(486006)(2201001)(36756003)(316002)(186003)(5660300002)(110136005)(256004)(6506007)(6512007)(53936002)(26005)(7416002)(102836004)(2906002)(2501003)(99286004)(66476007)(6486002)(8936002)(8676002)(64756008)(2616005)(71200400001)(476003)(66446008)(71190400001)(50226002)(97736004)(73956011)(66946007)(6436002)(81166006)(81156014)(4744005)(76176011)(66066001)(11346002)(25786009)(4326008)(478600001)(52116002)(86362001)(446003)(6116002)(14454004)(7736002)(305945005)(66556008)(3846002)(921003)(1121003); DIR:OUT; SFP:1101; SCL:1; SRVR:VI1PR04MB6079; 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: wKQG+WnAGH1l7n+4PeW5qbm+GMOouxm/3M3sf2hB3vVJGbeat91tPqsI/e//GzDXRz7onWsv3xn6sBllNu7YMYrWeDMv1y+0wVhKlSspPLc+hRirxVmJGE50wOpcxrnA4m1cWGgYMrVrc0cA0qGnouhXJ/0XeD4j90CcipGgX9Z5paZhTVRI0hKLGChoVDqL2dzTPrXOIah3yiSSzpn24lciVqO9pHCwqX3hT29RMbRKHN/oA6MQJoyqLdqbmJGA2cQ4LR8+UrFL81f9HfqlUywNcgmU5YNyyTvPzFZJbmM4VbM3pn7ln/Zd4UiEvNco0zRWPrMmEOJKuc0X/lK7mz3XSExRz0zzvgxhJgt6V7mI3xFy648abdRN88SV398Avi0ktFJufSh10uvH8MLOXfakjzwCvxdz3JF8iZrGOWw= MIME-Version: 1.0 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 4af2503c-3746-4f82-6059-08d6c9044d52 X-MS-Exchange-CrossTenant-originalarrivaltime: 24 Apr 2019 22:29:23.8893 (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: VI1PR04MB6079 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190424_152928_648955_5B5F083C X-CRM114-Status: UNSURE ( 8.86 ) 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 v6 MAINTAINERS | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index 2c7d4e1..6a9868b 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -6264,6 +6264,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