From patchwork Thu Apr 25 19:19:43 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frank Li X-Patchwork-Id: 10917647 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 AACA314B6 for ; Thu, 25 Apr 2019 19:19:52 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8DFBA28A82 for ; Thu, 25 Apr 2019 19:19:52 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7EBE528AFC; Thu, 25 Apr 2019 19:19:52 +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 04D3128A82 for ; Thu, 25 Apr 2019 19:19:52 +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=SGCXDn5XWZ139ppaT63QXxcrcLpnryDCOJ80TpgH+ug=; b=XAO4noNG7x2wZK nZwRfyMiyoC3JPzSwOfnWHhIRFC5USAlpBYR/9MuSNr53OqpGiWiBDTXw1pbfdaLPOX6+zas2TqY3 kjCjlw4bFzPPJ/Hj4CZhOYqXCC+gAIsvMJstuGKH6snbo5eTzSwCkbX0tWDdSAK508Bv0Q7YCfE+m uNWhJz55/uEi9pWnNScTiOb7GlJ6fr2dnE4tuz1/toGnLOjn5WMAgr13qAlooDr4Ky8GcCuNjCNB/ KVlo4m7i06Fn4ICx14TJIflLcrfdPFQB1VzNQuU1NMjG9SArGnJ81F2HESsaddjl1g3zINE2NBe70 bJ1rIGVMLTotHjIlAilQ==; 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 1hJjuQ-0005s3-Qy; Thu, 25 Apr 2019 19:19:50 +0000 Received: from mail-eopbgr40055.outbound.protection.outlook.com ([40.107.4.55] helo=EUR03-DB5-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1hJjuN-0005rO-Ib for linux-arm-kernel@lists.infradead.org; Thu, 25 Apr 2019 19:19:49 +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=lbzI3Cu3WUKNwpRm/71aoBCR3Vt6QdMiQtszgvV+vE4=; b=Nye00/9H+2bmGF9J+29iXam5jU4eCs+QobGc3ZYiRtcxHa0+AGJ+prxqG3nZujV/94JoFWrejqfr/90Jd0kA3kkuk2hxFZZ9CBSo6YBDz0RbRM1dgvwjYflZJtxcA/e5AMEwRTbDBJECUNxX7ECKkZ+SXFiYwvEU0apHmNs2TII= Received: from VI1PR04MB4910.eurprd04.prod.outlook.com (20.177.49.159) by VI1PR04MB4686.eurprd04.prod.outlook.com (20.177.56.78) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1835.13; Thu, 25 Apr 2019 19:19:43 +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; Thu, 25 Apr 2019 19:19:43 +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 V7 1/4] dt-bindings: perf: imx8-ddr: add imx8qxp ddr performance monitor Thread-Topic: [PATCH V7 1/4] dt-bindings: perf: imx8-ddr: add imx8qxp ddr performance monitor Thread-Index: AQHU+5vWbiTIMu6SxEK7mMY0pih2GA== Date: Thu, 25 Apr 2019 19:19:43 +0000 Message-ID: <1556219971-27322-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: SN6PR1501CA0025.namprd15.prod.outlook.com (2603:10b6:805::38) 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: 57fcbf69-5972-42dc-8b18-08d6c9b2f882 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:VI1PR04MB4686; x-ms-traffictypediagnostic: VI1PR04MB4686: x-microsoft-antispam-prvs: x-forefront-prvs: 0018A2705B x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(39860400002)(396003)(346002)(136003)(366004)(376002)(199004)(189003)(66946007)(478600001)(256004)(66066001)(8936002)(6116002)(97736004)(86362001)(8676002)(5660300002)(81166006)(2201001)(3846002)(110136005)(316002)(81156014)(186003)(7416002)(25786009)(71190400001)(26005)(66556008)(68736007)(64756008)(2906002)(66446008)(2616005)(73956011)(6506007)(386003)(66476007)(476003)(52116002)(102836004)(486006)(36756003)(6436002)(14454004)(50226002)(305945005)(6486002)(7736002)(53936002)(6512007)(2501003)(71200400001)(99286004)(4326008)(21314003)(921003)(32563001)(1121003); DIR:OUT; SFP:1101; SCL:1; SRVR:VI1PR04MB4686; 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: B9VpWzmUsdp8qa3fnJmWYec4iLIv+x+UkmO8cifkkTY5ak3CXUa5xE1JkIm7WotgWgQSeOrVLLUOEzmLCGaN0bXwudomS1XRvLfx4t1uTx1IQhfc7SznRK++Hzm+umIBjT2SxWwfgI2XnJC3NfN9QNZNEERE/aWxqRtMMqIlUXpCi26B/zlwbKj7YaRrUdo0h2/SFjnYac95BrKl8b5e8jcr2UEUbu2h8LvdF1iOrTGbBYVFyAi4ESNRyU3QzgBJYoGMqhBuMtouQ4O0z8TXmA7ZX6pCwYyyisXmEQQQQTZKEOYzhLiqtvodlTlK+R3iMKetNQHGRUx6Ehhuu8L2Wm0KkI8NPq8GTJ8btgWIl4ySM9BiwWxmqdQk22NLlTX7GhZ+mPL4AWxI5kjAmFD78xLiAH8RXupwg/fsUc1Ngis= MIME-Version: 1.0 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 57fcbf69-5972-42dc-8b18-08d6c9b2f882 X-MS-Exchange-CrossTenant-originalarrivaltime: 25 Apr 2019 19:19:43.5434 (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: VI1PR04MB4686 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190425_121947_674793_3E1696F1 X-CRM114-Status: UNSURE ( 9.53 ) 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 Added binding doc for imx8qxp ddr performance monitor Signed-off-by: Frank Li Reviewed-by: Rob Herring --- No change from v4 to v7 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 Thu Apr 25 19:19:46 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frank Li X-Patchwork-Id: 10917649 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 3489214B6 for ; Thu, 25 Apr 2019 19:20:18 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2139028AF5 for ; Thu, 25 Apr 2019 19:20:18 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 149FF28B2B; Thu, 25 Apr 2019 19:20:18 +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 B4E3428AF5 for ; Thu, 25 Apr 2019 19:20: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=SeTaQgpo9YSIyypl8Ap2c8JdbEtd5cZihQgl4h7/Lgs=; b=Lj47TtdEsPe7HO pl8cQzNRBxk2Z0s0froGRmi8Cd4YX3YpK7+VsC2eRXYZTx9zAjm3Go+vZt1ZyiTDmT1J1lNXjftIG ZsNTtzxk5jKugm5okDvaLiuCnDSWF0ec+a8aBVv9FWPLrX68CVbY8HI5QzpeTPXtN+vK4s3JFu9iR LbvqgDUX8llA/0m2kqNJMUXUHWDjmoD6j7PtkYoDkd/9Wj5EZe5Uz3OuJVeRvGS52/YRfWcAbCd5z f+i9Tlaz1vBOQ2NekZ374sXvBI+xYSAasu3TTxGDgs3FXXzBSmgK9zykSIJpq3dOM2/AlA+C6P5S7 sT3gP/wkU+vSUxxvrdTg==; 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 1hJjuc-00064F-Kn; Thu, 25 Apr 2019 19:20:02 +0000 Received: from mail-eopbgr40055.outbound.protection.outlook.com ([40.107.4.55] helo=EUR03-DB5-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1hJjuP-0005rO-Hw for linux-arm-kernel@lists.infradead.org; Thu, 25 Apr 2019 19:19:56 +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=aDB62MaHTZdztCIbCsmJvXVtp82Yk0Fgcdx5wDeksAk=; b=sZH7fGrz+l7m/TsF2Xdx2Fz5LoXN7fSWFaazdQjE8JJPPTVJ1g2KVZILlN8cOyy9D8Q/4EIRsXfzZtsEhUQM2vmNA1adtkwEm59Ta6xPfj5GVv4E/MSwK885ILC4CmZG7uLIVZ4osZICcAjXtwVVbDZ46BXg2LpVQUlWKWhc+go= Received: from VI1PR04MB4910.eurprd04.prod.outlook.com (20.177.49.159) by VI1PR04MB4686.eurprd04.prod.outlook.com (20.177.56.78) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1835.13; Thu, 25 Apr 2019 19:19:46 +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; Thu, 25 Apr 2019 19:19:46 +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 V7 2/4] drivers/perf: imx_ddr: Add ddr performance counter support Thread-Topic: [PATCH V7 2/4] drivers/perf: imx_ddr: Add ddr performance counter support Thread-Index: AQHU+5vXORDZC2GsbUSi9HuCvKSUsQ== Date: Thu, 25 Apr 2019 19:19:46 +0000 Message-ID: <1556219971-27322-2-git-send-email-Frank.Li@nxp.com> References: <1556219971-27322-1-git-send-email-Frank.Li@nxp.com> In-Reply-To: <1556219971-27322-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: SN6PR1501CA0025.namprd15.prod.outlook.com (2603:10b6:805::38) 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: 31083358-d47c-4470-b1b7-08d6c9b2fa39 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:VI1PR04MB4686; x-ms-traffictypediagnostic: VI1PR04MB4686: x-microsoft-antispam-prvs: x-forefront-prvs: 0018A2705B x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(39860400002)(396003)(346002)(136003)(366004)(376002)(199004)(189003)(66946007)(478600001)(5024004)(256004)(14444005)(66066001)(8936002)(6116002)(97736004)(86362001)(8676002)(5660300002)(76176011)(81166006)(2201001)(30864003)(3846002)(110136005)(316002)(81156014)(186003)(7416002)(25786009)(71190400001)(26005)(66556008)(68736007)(64756008)(2906002)(446003)(66446008)(2616005)(73956011)(6506007)(386003)(66476007)(476003)(52116002)(102836004)(486006)(36756003)(6436002)(14454004)(50226002)(305945005)(6486002)(7736002)(53936002)(6512007)(2501003)(71200400001)(53946003)(99286004)(11346002)(4326008)(921003)(1121003)(579004); DIR:OUT; SFP:1101; SCL:1; SRVR:VI1PR04MB4686; 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: F2xOpN4y8X3xD1FV05n2OvEUlYSKq09y1IxXa4F6lTyjg3TScQ1W3maJlwf/hZ6zQQFl1sQls7VCTMTl147oqKGAGU2stgK60DbfwRn/T/SZOOrNa5au5UYIOmEILbzINidtkkbVhk28Ct405ysV38/kxKcP2MQgjzECdqNXicOQrhJTRsQeGvjRMf60vLX0Es+Pg4b6iZaon+dn1SsDXyDfwXVQiJEoX8iw1EvfV1qotnufBx+hzbraGPGQn685C33fUohl+Wp+WHct9L2EAnTxc+IphLN6JeBD9NNyJE7vF50nc+/g3uAFTinzdH4kOqXm9gEb5EH1NSIRPk7/O1nhUZewHox9N24C18676BDX3XIPf33cZrSQD5vMFW6gUowVvDhfrF/x+kIc7iBsFqY2fZgr3fFZ1+XfRYjo2qc= MIME-Version: 1.0 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 31083358-d47c-4470-b1b7-08d6c9b2fa39 X-MS-Exchange-CrossTenant-originalarrivaltime: 25 Apr 2019 19:19:46.1792 (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: VI1PR04MB4686 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190425_121949_727525_E3BB923D X-CRM114-Status: GOOD ( 13.10 ) 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 v6 to v7 * added irq affinity handle, ref arm-ccn.c * added IRQF_NOBALANCING | IRQF_NO_THREAD * added ida_simple_remove at failure path 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 | 562 +++++++++++++++++++++++++++++++++++++++ 3 files changed, 570 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..7286182 --- /dev/null +++ b/drivers/perf/fsl_imx8_ddr_perf.c @@ -0,0 +1,562 @@ +// 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; + unsigned int 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; + int irq; + int id; +}; + +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, cpumask_of(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 = 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, + }; + + pmu->id = ida_simple_get(&ddr_ida, 0, 0, GFP_KERNEL); + return pmu->id; +} + +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 (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); + pmu->cpu = target; + + if (pmu->irq) + WARN_ON(irq_set_affinity_hint(pmu->irq, cpumask_of(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; + + pmu->cpu = raw_smp_processor_id(); + 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_NOBALANCING | IRQF_NO_THREAD, + DDR_PERF_DEV_NAME, + pmu); + if (ret < 0) { + dev_err(&pdev->dev, "Request irq failed: %d", ret); + goto ddr_perf_irq_err; + } + + pmu->irq = irq; + ret = irq_set_affinity_hint(pmu->irq, cpumask_of(pmu->cpu)); + if (ret) { + dev_err(pmu->dev, "Failed to set interrupt affinity!\n"); + 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); + + ida_simple_remove(&ddr_ida, pmu->id); + 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); + if (pmu->irq) + irq_set_affinity_hint(pmu->irq, NULL); + + perf_pmu_unregister(&pmu->pmu); + + ida_simple_remove(&ddr_ida, pmu->id); + 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 Thu Apr 25 19:19:48 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frank Li X-Patchwork-Id: 10917651 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 BDEC614B6 for ; Thu, 25 Apr 2019 19:20:21 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id AD21128D1E for ; Thu, 25 Apr 2019 19:20:21 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A0E5E28D20; Thu, 25 Apr 2019 19:20:21 +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 41E3E28D1E for ; Thu, 25 Apr 2019 19:20:21 +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=2Dt43aAiMXDayGttEhHp4F3sejqFE5GHIJz2g4Wx270=; b=IyS9KdHHoVVgZG 46yMWF85xO0LEeNfH32q1uMcOziPAPhIBu/JSea4tyrYN/GaeAZHxhXyWrstIwGNsc35eoA3/41ix kCea129AYcIKABvz1kHYOtUgLwUj1y1UcNJL/0xYaFrqiQnDYhnRAidfsrBEUXmdVcZ4cdHL4G7hn P49LAj93802O+YgtUQs+V+Af914Gp+nuZ/df+biGkhdany4p6stiut2FRAPJEQS+FYBHMem0VpxJ9 qa1l7RNtckNAqGlSVGMUNT7f36WDtsWAbTTCCooPb6NPZVF3RnGyYEeGTqSMIQ4tjw68Xt1W9RElN qXOfnCR/J5smNf2oPZwQ==; 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 1hJjun-0007DX-Br; Thu, 25 Apr 2019 19:20:13 +0000 Received: from mail-eopbgr40055.outbound.protection.outlook.com ([40.107.4.55] helo=EUR03-DB5-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1hJjuW-0005rO-SB for linux-arm-kernel@lists.infradead.org; Thu, 25 Apr 2019 19:19:58 +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=Wtp1WVH6D/5HMnJY/SzL4KLYb1EOiGZKwXkqCrWdd9g=; b=o6kUdPrC89wA5aR9l8EI/O1SRFBSTKKATX/eXQaKfBMTdo0lw0vLujddj/c7wBO8jdrvOduQLrIsr/trUJlvLe2ZhOA0gP3FuBjDg74dnqGp6AXMk1Zw//txMEp1eA+v9gq7cxwS4/EcMGIfYk6tEYFcTl/sFjDjGZkcfNzjq6E= Received: from VI1PR04MB4910.eurprd04.prod.outlook.com (20.177.49.159) by VI1PR04MB4686.eurprd04.prod.outlook.com (20.177.56.78) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1835.13; Thu, 25 Apr 2019 19:19:49 +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; Thu, 25 Apr 2019 19:19:49 +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 V7 3/4] arm64: dts: imx8qxp: added ddr performance monitor nodes Thread-Topic: [PATCH V7 3/4] arm64: dts: imx8qxp: added ddr performance monitor nodes Thread-Index: AQHU+5vZgXujFV0n/kuNhE9t8xqxFg== Date: Thu, 25 Apr 2019 19:19:48 +0000 Message-ID: <1556219971-27322-3-git-send-email-Frank.Li@nxp.com> References: <1556219971-27322-1-git-send-email-Frank.Li@nxp.com> In-Reply-To: <1556219971-27322-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: SN6PR1501CA0025.namprd15.prod.outlook.com (2603:10b6:805::38) 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: 9348e163-47a1-4296-889a-08d6c9b2fbc8 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:VI1PR04MB4686; x-ms-traffictypediagnostic: VI1PR04MB4686: x-microsoft-antispam-prvs: x-forefront-prvs: 0018A2705B x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(39860400002)(396003)(346002)(136003)(366004)(376002)(199004)(189003)(66946007)(478600001)(256004)(66066001)(8936002)(6116002)(97736004)(86362001)(8676002)(5660300002)(76176011)(81166006)(2201001)(3846002)(110136005)(316002)(81156014)(4744005)(186003)(7416002)(25786009)(71190400001)(26005)(66556008)(68736007)(64756008)(2906002)(446003)(66446008)(2616005)(73956011)(6506007)(386003)(66476007)(476003)(52116002)(102836004)(486006)(36756003)(6436002)(14454004)(50226002)(305945005)(6486002)(7736002)(53936002)(6512007)(2501003)(71200400001)(99286004)(11346002)(4326008)(921003)(32563001)(1121003); DIR:OUT; SFP:1101; SCL:1; SRVR:VI1PR04MB4686; 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: XHsI6QZPsdrwuCnvv1bZ/aWLHDJDfzAXPw0CqaHF/3jo9GZy4WO+iuM7GVNhzzZbOiwk19wS/Y01ijlxsaCdjCPt4dhdUbGbnjkXRBJ2sbZ3ZZfTrASK9txjuPZxDsMGSinWJP+/jfLnrYjfvIrxfiyMBlLWUFS075gjHgytvg1dpDcu/7AqMu8sFap2pHa/KcUuqJG75MXNTizTHWuL2XS0F0ij82NBppeL3wm+wcuLLjoMf/taRdA83Ob/MVsc1chQEIjCm52cv6TkOgcatSbB68Be9/aWDB4mJp4Jk84vnC603Un23Jl1H1Zg0HRhUC7BDSgMU6fGDaEV7vmbFI+0QCY6PC0O1lgpMcdYYO563W0kmcGtTFmWNgcnkk1H/bprsLfb5RIdv0tJW7jQwchvzhnA0AC37oHl3LMDWyU= MIME-Version: 1.0 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 9348e163-47a1-4296-889a-08d6c9b2fbc8 X-MS-Exchange-CrossTenant-originalarrivaltime: 25 Apr 2019 19:19:48.9021 (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: VI1PR04MB4686 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190425_121956_952871_572C267F X-CRM114-Status: UNSURE ( 8.79 ) 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 v7 * 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 Thu Apr 25 19:19:51 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frank Li X-Patchwork-Id: 10917653 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 61B5C14B6 for ; Thu, 25 Apr 2019 19:20:31 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 52C4228D1E for ; Thu, 25 Apr 2019 19:20:31 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 45A4B28D20; Thu, 25 Apr 2019 19:20:31 +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 EE5B428D1E for ; Thu, 25 Apr 2019 19:20:30 +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=rV2JqvelyW4ZNu1qxAvts9bL2dRsgNQmOZ4BJ6HMl+E=; b=I58VB39q+lHjMb RXKrBXCfTR62VSO57vZHEDJJ3XLI7LCcXgP4Bncm6JzEWgSMgvP64ynoB9pDWf3aNO+cqSHAB6nsB 772D3uP1eTAKxYocr8LQwpCl5mI3OvdXEHCyCsO3bSjwANdZtthOF3KaN9i/P2R0DlcuFGcAeapB8 VQt07+vPRWhmNBseTtS9B/hEbpHAK+zFzIZfTPLZNGueumntFkUIvRTpECx54loBKaVs23j5qc+wS oZo9gUR27tWeggB4Vk2lXPJy4HITUUNd6aABbq67IpOvYmPXFP79W2cKKVAOhUShJM7A0ga2r5h3H tS+2s52QEZbed76lf/KA==; 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 1hJjuz-0007fz-Ao; Thu, 25 Apr 2019 19:20:25 +0000 Received: from mail-eopbgr40055.outbound.protection.outlook.com ([40.107.4.55] helo=EUR03-DB5-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1hJjuY-0005rO-Lu for linux-arm-kernel@lists.infradead.org; Thu, 25 Apr 2019 19:20:00 +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=1qap4zKlIXVWOCENrhCV9M6chv/QylWg4f7UzyPQ05I=; b=t5WSo28rnEqhmw9uvtYb+ZSyeqFbg1cNhUggueKcH2YrqNEuSUr5KkrKK26FXkHodvbI1PL7jmZHtjcfePikyn77b6V3L8PlegaVeBZL4SA19fBFf97W2mVnjo5i2A1tV9Q+2MTKy3AbYcw5f8I4336G2vPDmKp/kXnzlE3Bsy4= Received: from VI1PR04MB4910.eurprd04.prod.outlook.com (20.177.49.159) by VI1PR04MB4686.eurprd04.prod.outlook.com (20.177.56.78) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1835.13; Thu, 25 Apr 2019 19:19:51 +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; Thu, 25 Apr 2019 19:19:51 +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 V7 4/4] MAINTAINERS: Added imx DDR performonitor driver maintainer information Thread-Topic: [PATCH V7 4/4] MAINTAINERS: Added imx DDR performonitor driver maintainer information Thread-Index: AQHU+5vbN4E/OVjsC0q2Jr7Hn2IfQg== Date: Thu, 25 Apr 2019 19:19:51 +0000 Message-ID: <1556219971-27322-4-git-send-email-Frank.Li@nxp.com> References: <1556219971-27322-1-git-send-email-Frank.Li@nxp.com> In-Reply-To: <1556219971-27322-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: SN6PR1501CA0025.namprd15.prod.outlook.com (2603:10b6:805::38) 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: fe166f08-0eed-4ae7-8b08-08d6c9b2fd69 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:VI1PR04MB4686; x-ms-traffictypediagnostic: VI1PR04MB4686: x-microsoft-antispam-prvs: x-forefront-prvs: 0018A2705B x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(39860400002)(396003)(346002)(136003)(366004)(376002)(199004)(189003)(66946007)(478600001)(256004)(66066001)(8936002)(6116002)(97736004)(86362001)(8676002)(5660300002)(76176011)(81166006)(2201001)(3846002)(110136005)(316002)(81156014)(4744005)(186003)(7416002)(25786009)(71190400001)(26005)(66556008)(68736007)(64756008)(2906002)(446003)(66446008)(2616005)(73956011)(6506007)(386003)(66476007)(476003)(52116002)(102836004)(486006)(36756003)(6436002)(14454004)(50226002)(305945005)(6486002)(7736002)(53936002)(6512007)(2501003)(71200400001)(99286004)(11346002)(4326008)(921003)(1121003); DIR:OUT; SFP:1101; SCL:1; SRVR:VI1PR04MB4686; 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: mzAFiYwA3aBdOkE31Pdq+1DdSgdaZrU4ii1hS5Ycd+Bse4Hg+kfsW3BIOhbzJgpJMjuqZwq5iYUzyq1ZBEhXkUTcBCyk4NVgLt8p8w4vHUd7vXaku1n+LimFvI2bdvEXRSSggsXkal7krQ8uVfuBtdXaWqcaampOqA7T8h2ytmPMj4LD2CH9vt8dsNHIAqik5N8iggxAh08J8gOz8GBwm12XzXz9aFdoOHqzkj5F/ckAmN4/tAs4O6vVLhH5nN5F0zjYa/mDGUEiT6NOuEAUAeNx6w30IFfgYzA+fV8V9yHOiJR0rPdEsrYOWGW61mdcAWcsmChBD6RPVIC5aWqDXZ649d1Dw8Tv3aGdKIQXP0Uf6mPqJwtpy5i1n/NyrDq6pXOshl9lPncHKLKaznR9bkE+nSGt3eU1LYuXUvNfZqY= MIME-Version: 1.0 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: fe166f08-0eed-4ae7-8b08-08d6c9b2fd69 X-MS-Exchange-CrossTenant-originalarrivaltime: 25 Apr 2019 19:19:51.7141 (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: VI1PR04MB4686 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190425_121958_768800_ED779DDB X-CRM114-Status: UNSURE ( 8.35 ) 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 v7 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