From patchwork Tue Aug 27 02:39:36 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Joakim Zhang X-Patchwork-Id: 11115957 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id A0BC41398 for ; Tue, 27 Aug 2019 02:39:57 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 7DE63206E0 for ; Tue, 27 Aug 2019 02:39:57 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="Hsa1WXeo"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=nxp.com header.i=@nxp.com header.b="GTbdhMmW" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7DE63206E0 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=nxp.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org 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=dxj+SPpmAt53xfH7H/mwlILcYBNiNGArCYvtSJb6+Gw=; b=Hsa1WXeoS6kk01 7w1ZsKsB+KLterqINEuPxtvCJbG33YA6AzCPKyqRxB885hiviS5TwVFQIoSRdzuFwDRK+jrKh9VMH QxUGByhz+fpdkv3tt+1sYDCVzjPj677Dx0T0ccegCFUqkFpHRS1TxxaOVIYu0X8cgCUi3SyKrkykU 2kPwV5PnNyMJZJNvNvlTDNTBBXa13RFjgzP46V5ANih98DvU0zg/dStHFlOZWgiFO867qwtzpql66 MhLH1z27hNfsPArwfHWLciHDpU2h1Ck2FrkNlsndQF83MhPxe3EYRwyuNWfwqhqMW7LYyOVRwXRFd Yw+BC5N09I4Bc1dqBo1Q==; 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 1i2ROm-0006yN-M7; Tue, 27 Aug 2019 02:39:56 +0000 Received: from mail-eopbgr10068.outbound.protection.outlook.com ([40.107.1.68] helo=EUR02-HE1-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.92 #3 (Red Hat Linux)) id 1i2ROV-0006jM-TC for linux-arm-kernel@lists.infradead.org; Tue, 27 Aug 2019 02:39:41 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Bg1Hd4xJCWIZC+mym0nT9FKs2UE26lk1S6O2RQKD8xQJVMIDOYmMeA7EsAIM5cwvMBdTxoofkckloTMGyN0tL8muMkBnxi1m7+2loAgi7sDTMu5cZDbvkIpg+sYI3Uv17jADJ/zrxEORDt+35+WdSH4g1mMfIp9DSxihSjn42vCyKh+cd6EERJL8ixk/dM63avAzrXt3+Uj3H519Xh0oim1wpPd/hwXUOVNZ2FA9AJTi7hoNf4zrxOVQW2Qy7O0Zo711B3PhhJeecj9wSiiyCbpggi+jqSBmp9WGzivKIt/mDSGgPhGla2D1BQsqmvvTEqwJc4iMQEKStR66m7XEdw== 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=1xVAIu1ZQNQDeNE//JCaDzo8CwyUw7+Bj9csRSKIAbA=; b=krXvygw4iuIHpa4ng/vefuFYpnvAzt8h8Qh0Bi45Z1Mu8g1FUzc9Wb7HlyEoHRkmx158AIbSQrs5bmVrig+OTv8aXrjR71o7eZJgj1mYcr8f1el8MX7Dv0Hota3Yk5/fkrb+QU4Mlbx2+gBQoEfpssI/zJT8i79iw/Fb7KZmlLp83G7V3RrncAfslNQbhm7Y60nJhF14hFe+ZSQqOZOiKw25w+Zy6azdxXTbFdA4BkHxD6cz5L2wv8ZW2rg0C2MG/O961d2kaQzyYYClnlR7TPV6E8G+6SFM/+CfdTQC25Ahb3m/pb4scxn1W2InI0a2x0nI5/97+ZkDNFDUOhetcQ== 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=1xVAIu1ZQNQDeNE//JCaDzo8CwyUw7+Bj9csRSKIAbA=; b=GTbdhMmW18odzNvoDij1ZCUOhPEOUgJqP3OHUE/xVheyshgcDIpm5S050+mDo6E0gftJJnwdw2dd/N4G6D9aVPD0yHT5JMh6azZPETIy4WTPGG0ZV5kaAE5u0ZeRKdKA9vzb3qtp7Lkem1jx43m3ACs0xH146yUB7uEMhz+Xm3g= Received: from DB7PR04MB4618.eurprd04.prod.outlook.com (52.135.139.151) by DB7PR04MB4156.eurprd04.prod.outlook.com (52.134.110.151) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2199.21; Tue, 27 Aug 2019 02:39:36 +0000 Received: from DB7PR04MB4618.eurprd04.prod.outlook.com ([fe80::c8ca:1c9c:6c3:fb6f]) by DB7PR04MB4618.eurprd04.prod.outlook.com ([fe80::c8ca:1c9c:6c3:fb6f%4]) with mapi id 15.20.2199.021; Tue, 27 Aug 2019 02:39:36 +0000 From: Joakim Zhang To: "mark.rutland@arm.com" , "will@kernel.org" , "robin.murphy@arm.com" Subject: [PATCH V7 2/3] Documentation: admin-guide: perf: add i.MX8 ddr pmu user doc Thread-Topic: [PATCH V7 2/3] Documentation: admin-guide: perf: add i.MX8 ddr pmu user doc Thread-Index: AQHVXICq9eVS3INrXEGFIllwegiR9w== Date: Tue, 27 Aug 2019 02:39:36 +0000 Message-ID: <20190827023557.7071-2-qiangqing.zhang@nxp.com> References: <20190827023557.7071-1-qiangqing.zhang@nxp.com> In-Reply-To: <20190827023557.7071-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: SG2PR01CA0111.apcprd01.prod.exchangelabs.com (2603:1096:4:40::15) 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: 1181e130-b72d-409c-fe48-08d72a97cca8 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(5600166)(711020)(4605104)(1401327)(4618075)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(2017052603328)(7193020); SRVR:DB7PR04MB4156; x-ms-traffictypediagnostic: DB7PR04MB4156: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:7691; x-forefront-prvs: 0142F22657 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(4636009)(396003)(366004)(376002)(346002)(136003)(39860400002)(54534003)(189003)(199004)(99286004)(81156014)(81166006)(6506007)(386003)(26005)(71200400001)(71190400001)(1076003)(102836004)(25786009)(2906002)(6116002)(8676002)(186003)(36756003)(76176011)(7736002)(3846002)(8936002)(66066001)(14444005)(256004)(52116002)(316002)(110136005)(54906003)(14454004)(50226002)(4326008)(478600001)(2201001)(5660300002)(53936002)(6436002)(486006)(476003)(2616005)(11346002)(6486002)(446003)(66556008)(305945005)(86362001)(2501003)(66946007)(66446008)(64756008)(66476007)(6512007); DIR:OUT; SFP:1101; SCL:1; SRVR:DB7PR04MB4156; 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: C+N1KMW+gS+lTs+BotmWugN+HcPCpv73yJ4/45c10mWTLds1gXHgIV42DToyPgIgnkQssmMEnJVVTBS+axRhITTa0bnkItjfr92GFSf6/PNhLQtbWK52lhorQRa9u5hyrgoB7t+BNWXN9F1GCNnKpk+JPLT/aCSQzLRoPO9EaQGolqsyKQPNb+xdiI6sJcLHm232lFh6Jfgth4Vpf2J8/gKnblxBpBuniKTiQD8n9eDT31g1lqUyt5zZX0bmts8PHssqdAFODi4w65VZcbDslCmmNpkWAWd25bpHA5LCfOkNSfD15ft7FfMWJwYQ0TyIYtjRpVGWO/EzvVFGexYnJnRvmWWL/KJS9EwS8P1r2ttQaGcIpAFXEuWDjk2+oLi7IF1AzJddVRUUlqTl0ObxmH01Yhf36vmbFuvRIjy5d44= Content-ID: MIME-Version: 1.0 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 1181e130-b72d-409c-fe48-08d72a97cca8 X-MS-Exchange-CrossTenant-originalarrivaltime: 27 Aug 2019 02:39:36.0478 (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: q38zvIAHZHqDJBacXjgZ7i/fa7S4O/Ypdif2urgFz/v4NYIumKdv31b87Wz/Czdmb5vNd+WPJb6M5XGT/gabnA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB7PR04MB4156 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190826_193939_941468_8EDA1329 X-CRM114-Status: GOOD ( 16.30 ) X-Spam-Score: -0.2 (/) X-Spam-Report: SpamAssassin version 3.4.2 on bombadil.infradead.org summary: Content analysis details: (-0.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [40.107.1.68 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain 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: Frank Li , dl-linux-imx , "linux-arm-kernel@lists.infradead.org" , Joakim Zhang Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org Add i.MX8 ddr pmu user doc. ChangeLog: V1 -> V4: * new add in V4. V4 -> V5: * no change. V5 -> V6: * change the event name V6 -> V7: * no change. 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..2540a4d1417b --- /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 ID filter is only used by CSV modes 0x41 (axid-read) and 0x42 (axid-write) +to count reading or writing matches filter setting. User should specify this two +events with the same AXI ID filter value if want to count at the same time, as +this filter register is shared between counters. + +Example for perf tool use:: + + perf stat -a -e imx8_ddr0/cycles/ cmd + perf stat -a -e imx8_ddr0/read/,imx8_ddr0/write/ cmd + perf stat -a -e imx8_ddr0/axid-read,axi_id=0xMMMMDDDD/,imx8_ddr0/axid-write,axi_id=0xMMMMDDDD/ cmd