From patchwork Wed Jul 31 10:46:13 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Joakim Zhang X-Patchwork-Id: 11067489 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 75F7B1398 for ; Wed, 31 Jul 2019 10:46:31 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5EF30201CB for ; Wed, 31 Jul 2019 10:46:31 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5224228699; Wed, 31 Jul 2019 10:46: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 B82CD201CB for ; Wed, 31 Jul 2019 10:46: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:Content-ID:In-Reply-To: References:Message-ID:Date:Subject:To:From:Reply-To:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=dqmR1ySynvBpLbr5eWwKkA/yOPd7frrX/kWorz4TosA=; b=j4vc6FvX14mcUp bscZAYCyxzpFMsi7izgIXchPHBFpk7D+pTtxJsALq6ElRduJBFWZ2GWTj1+5tMg2LU1MQaVbJiqx+ OQkjsMiTAbNuckKB4ZZ563ARA1TwycA31kzQnzhZ8RUe+7oGiqt3WYgZgMGhJIN2qZULBHSNRDmDf kS0z5/TTSiLE3pxRtXxW68EzydIBkN3Xcm4NumfcE5eTDunki9HRTK9JQLUSqOmogTzZnh3gqpHyB oNUUfSpXQ99cVv412+jfwFb86r6X9D9uGFMF1FTa8MYRiP6y6QvStKSm9Dxf/Q/1ZRSXw3oxsfVnt xMjbxaxNnEtvf6h3PWtQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92 #3 (Red Hat Linux)) id 1hsm7p-0002lU-6F; Wed, 31 Jul 2019 10:46:29 +0000 Received: from mail-ve1eur01on061d.outbound.protection.outlook.com ([2a01:111:f400:fe1f::61d] helo=EUR01-VE1-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.92 #3 (Red Hat Linux)) id 1hsm7e-0002ZO-3P for linux-arm-kernel@lists.infradead.org; Wed, 31 Jul 2019 10:46:19 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=GxJiuip5o3PhUD8InrvCLfXOZoAkb2pZtRs1tzxLMNU9Jive/NK8pFlG9QZZMx4bMrUfaDTlM7oKQDiVcWF8/Aj7LG7QtoSUn3bHyzuVoBWEM3QsuFtQz486/CXjTb+z1EB47C/r1cRX1v1cprVDwulThDvrWqv7EERddDJUm6VfIapbgtYZeS+DyF30IZhz241NXch+YrQcQ/ZJDa3kp7Qkfc+A45vc8vjhPime3f65+QGQJhMGImb8oAV3CGCevjN9uMPKKnzSWOoO/JA6zcTFDlvT5/uJWZXoWjkhpfEf1vpfT30s6rdxpJzzCiKGmIth+Z9DCZvCTYvzXcVJEw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=vYe6gN/Y9cfvc5F2tnO3dUCdzvkuZMZoZy1Qo8JpNwE=; b=LTbMavRO2vGqkNbjgTrjJ7uAWzHZNUYAbKPHvIld64pxVGeFop27/YDW+6dn8T+HA7Viz334FXOG84/zHYL16qAMp5VKyfaH4r6teBk11uATE0J0qF45M/5xHLN9jzcPH7yWay+/O4RzL3qxWdAU4Pu5IbyR3iYOKnoIxSVtcM019ukY2guxHKHiKBtTSj+uWpiwM1/YgTFOYGa+JO2jYmdI0eIuAmlE0MVpFgxMs/7aWwK/h1BqU+TaJN7fYBbHz/ePo2AT8GfhSuRPuMWPHlxSf+SvE0JoKGE4NIyrjHZWWFPBCSqV7TtyGbKo3YMtFAbkwRmDN9zpSCSYtqILDg== ARC-Authentication-Results: i=1; mx.microsoft.com 1;spf=pass smtp.mailfrom=nxp.com;dmarc=pass action=none header.from=nxp.com;dkim=pass header.d=nxp.com;arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=vYe6gN/Y9cfvc5F2tnO3dUCdzvkuZMZoZy1Qo8JpNwE=; b=i1iydFkR1sDC1QI+ZC6WMcy1aq3TbyIcSB7C+oho9S1gAU9QicCN6Qq6k/Nto1CcScLrc5FAuKFoEN5SEAIbTO7TrOcLocuMfFdSp5TkWIbbfpzBn6w+Zz1TNt8p0e6wSxL1Xldny2WnklOb25J1jI45uxMbqbx5dLuZxa7Mvhg= Received: from DB7PR04MB4618.eurprd04.prod.outlook.com (52.135.139.151) by DB7PR04MB4778.eurprd04.prod.outlook.com (20.176.233.88) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2115.11; Wed, 31 Jul 2019 10:46:14 +0000 Received: from DB7PR04MB4618.eurprd04.prod.outlook.com ([fe80::6553:8d04:295c:774b]) by DB7PR04MB4618.eurprd04.prod.outlook.com ([fe80::6553:8d04:295c:774b%5]) with mapi id 15.20.2115.005; Wed, 31 Jul 2019 10:46:14 +0000 From: Joakim Zhang To: "robin.murphy@arm.com" , "will@kernel.org" , "mark.rutland@arm.com" , Frank Li Subject: [PATCH V4 2/2] Documentation: admin-guide: perf: add i.MX8 ddr pmu user doc Thread-Topic: [PATCH V4 2/2] Documentation: admin-guide: perf: add i.MX8 ddr pmu user doc Thread-Index: AQHVR40sm2gF1783/0m0I6BiO+hsYg== Date: Wed, 31 Jul 2019 10:46:13 +0000 Message-ID: <20190731104351.3117-2-qiangqing.zhang@nxp.com> References: <20190731104351.3117-1-qiangqing.zhang@nxp.com> In-Reply-To: <20190731104351.3117-1-qiangqing.zhang@nxp.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-mailer: git-send-email 2.17.1 x-clientproxiedby: SG2PR04CA0194.apcprd04.prod.outlook.com (2603:1096:4:14::32) To DB7PR04MB4618.eurprd04.prod.outlook.com (2603:10a6:5:38::23) authentication-results: spf=none (sender IP is ) smtp.mailfrom=qiangqing.zhang@nxp.com; x-ms-exchange-messagesentrepresentingtype: 1 x-originating-ip: [119.31.174.71] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: f46b56be-75cc-43ee-280a-08d715a44ed2 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(5600148)(711020)(4605104)(1401327)(4618075)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(2017052603328)(7193020); SRVR:DB7PR04MB4778; x-ms-traffictypediagnostic: DB7PR04MB4778: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:7691; x-forefront-prvs: 011579F31F x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(4636009)(39860400002)(396003)(136003)(366004)(346002)(376002)(189003)(199004)(54534003)(7736002)(64756008)(478600001)(66476007)(36756003)(6636002)(316002)(66066001)(2501003)(3846002)(6116002)(76176011)(110136005)(52116002)(54906003)(5660300002)(50226002)(6512007)(99286004)(6436002)(186003)(6486002)(81166006)(26005)(68736007)(2201001)(81156014)(102836004)(6506007)(8676002)(386003)(86362001)(8936002)(1076003)(25786009)(71200400001)(446003)(11346002)(486006)(53936002)(2906002)(14444005)(305945005)(71190400001)(2616005)(66946007)(66556008)(4326008)(66446008)(476003)(14454004)(256004); DIR:OUT; SFP:1101; SCL:1; SRVR:DB7PR04MB4778; H:DB7PR04MB4618.eurprd04.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A: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: 9NP/NSVdKWxPbnI1etAkGTqh3P44YqPFEKYb9S/mICZQ1dR+cQ+Je2foetzvpXbj7r0MI6+J6OgcPHm0fsyEU8S3uJws2xOeT/GnHTNPi4wHDbqqjPxmw6+eqilNJ8+U6MvigCLDsPNqp/YAoaimMG4NMOoRekwY/MSqHnYcXYPaKzk41VtCbscPYsY4aETjLskOIkdmph/6QWeSyZqu40LTVXP+f9Vj06ZpSZ/RX0RgrpkXwQmV5URRlE7lxip5URxZbz4OYWyeNGXcdLWPq3ILWQAGZA+QqUHzT5ApxBK4nVY6Nk3xJdiZYAw+1zn5EF5f12JOhspZZ4LeqxEqA7HJ8djYk+ulkHtzlRV6bMjlpIbbOG/51iBA4qVbGzVtUaLICQ2rqCsmdqPuFyatL+lKTTUNdP21rG274AQiGSE= Content-ID: <8067A104D5B7824B910E1425671D07CE@eurprd04.prod.outlook.com> MIME-Version: 1.0 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: f46b56be-75cc-43ee-280a-08d715a44ed2 X-MS-Exchange-CrossTenant-originalarrivaltime: 31 Jul 2019 10:46:13.9328 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: qiangqing.zhang@nxp.com X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB7PR04MB4778 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190731_034618_142103_B390AA18 X-CRM114-Status: GOOD ( 15.03 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Joakim Zhang , "kernel@pengutronix.de" , "linux-arm-kernel@lists.infradead.org" , dl-linux-imx 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 i.MX8 ddr pmu user doc. ChangeLog: V1 -> V4: * new add in V4. Signed-off-by: Joakim Zhang --- Documentation/admin-guide/perf/imx-ddr.rst | 30 ++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 Documentation/admin-guide/perf/imx-ddr.rst diff --git a/Documentation/admin-guide/perf/imx-ddr.rst b/Documentation/admin-guide/perf/imx-ddr.rst new file mode 100644 index 000000000000..9beb47e86c9c --- /dev/null +++ b/Documentation/admin-guide/perf/imx-ddr.rst @@ -0,0 +1,30 @@ +==================================================== +Freescale i.MX8 DDR Performance Monitoring Unit (PMU) +==================================================== + +There are no performance counters inside the DRAM controller, so performance +signals are brought out to the edge of the controller where a set of 4 x 32 bit +counters is implemented. This is controlled by the Performance log on parameter +which causes a large number of PERF signals to be generated. + +Selection of the value for each counter is done via the config registiers. There +is one register for each counter. Counter 0 is special in that it always counts +“time” and when expired causes a lock on itself and the other counters and an +interrupt ie enable of counter 0 is a global function. + +The "format" directory describes format of the config (event ID) and config1 +(AXI ID filter) fields of the perf_event_attr structure, see /sys/bus/event_source/ +devices/imx8_ddr0/format/. The "events" directory describes the events types +hardware supported that can be used with perf tool, see /sys/bus/event_source/ +devices/imx8_ddr0/events/. + +AXI filtering is used by CSV modes 0x41 (axi-id-read event) and 0x42 (axi-id-write +event) to count reads or writes matching filter setting. Read and write AXI ID +filter must have the same value if you want to specify them at the same time as +this filter is shared between counters. + +Example for perf tool use:: + + perf stat -e imx8_ddr0/cycles/ sleep 1 + perf stat -e imx8_ddr0/read/,imx8_ddr0/write/ sleep 1 + perf stat -e imx8_ddr0/axi-id-read,axi_id=0xMMMMDDDD/,imx8_ddr0/axi-id-write,axi_id=0xMMMMDDDD/ sleep 1