From patchwork Mon Aug 26 07:34:19 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Joakim Zhang X-Patchwork-Id: 11114193 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 B14ED1398 for ; Mon, 26 Aug 2019 07:34:53 +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 8B50F20874 for ; Mon, 26 Aug 2019 07:34:53 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="GVbVtool"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=nxp.com header.i=@nxp.com header.b="HoSo7vMj" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 8B50F20874 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=rRZeI4G8b6K7UR6KJOdNky9/QKw3JD/wyLoN7uNgKPw=; b=GVbVtoolFHgKnC ad9urH8GeDncyoae2u8Q0J07i7WMTNJE0OGcvBg3my1vVgXP05McrtHYNmx9qVd5NFnYX3gdQhVLz XOT3PSjU8zI+PNx9w8rdmZOp6ntLkFjvdRxd95xI+MO4+7gKjyZWTH7hLEI8Oahz54rgROBufK33l VjSCdT0QKMzrCkrQJxNU2joIebttwQ3h2Qsof5SGqpfDr/000saCOWMilc3x5A6mFNs1IP2XW7U1K OfeMt0fxCP1QBz48q8ddC02a0MCXfZLSXFY8f+fake5u05eDKWsSxjrIWO3qPPhu5ofSkd7dX9/ce FltfF3s3Mqvts8q5F4Pw==; 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 1i29Wa-0007se-Qp; Mon, 26 Aug 2019 07:34:48 +0000 Received: from mail-eopbgr20081.outbound.protection.outlook.com ([40.107.2.81] helo=EUR02-VE1-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.92 #3 (Red Hat Linux)) id 1i29WA-0007Jp-AN for linux-arm-kernel@lists.infradead.org; Mon, 26 Aug 2019 07:34:23 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Rw1t+mn0MX8epzG1XLNCYm7VJp6j1PizBdZpfQgqnZyGBwv3UCHDc+OwGoklvRkPiN/sB3htsvLVZ4nBwZIZa9BaMMmNzXMpYtj91StPZvki80nfS0FSMAdYTesyMTSR4QZobqWmf7MW/Pt5w2gJy2ORd0zE2R/H85ZKk3N32luLVZkR4Zuw/qAB+RGqcqI25CNWWBKVoGOyeJYheV9sdhIuxqhKMUX4Bfbs3FrvpiQ+1/G51NOxJkdkp63sUr0fUNDdOt2OJ7Ci/j4XJEVVbXqQkqRmw4D3py3x6EDQrsw7HfnP/wt1/XNSrkyz3B+QefkhIjf3qWSmEIvnqHHSSA== 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=/3DQ6Fkq2u0+0bPy4FvIlQ5xzQZTvBQcuJrk6sod2AY=; b=G/Vnq7VXcOoUAV20UJavwAGpik8P1H82yLUOh2Co7X1ZHQJlHOGhftr68Osv6W9JAS9TNK1zj73AiGIDUo1X2oiwfzyb2ezOk5KN97kWKWt4IfLIus4rBvinxt3qdYYeXBsS+bASe5PNFYhBwc/ZqIUY7CCRlieECc/4/BE4VWaFGLAjlHdyK/cukMszJLIOT9FrlnO1r6iUklqKFu9gJ8JJ/6hUl0SChTdOmfj8j7W+jwvRKE9mUhmi0W73R3iwqthrElPpbeo90X7lmSaQU4W7KUEsDHzHRVyWoJck/5ChkNXVEWFQsZjfA6hFjhk1pEqJvTcR18PtGm11+2cH8w== 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=/3DQ6Fkq2u0+0bPy4FvIlQ5xzQZTvBQcuJrk6sod2AY=; b=HoSo7vMjc2VAfWaM4wPs9VuwIhQOlAqjCh4xg/5M4Hhe6DH6n8sv4SPMRLvJ0bP/yMfch8kUfIo2oZ8eprE4eAwUKhNJR5PYYBPXyX5/ko/agXMriSGCfOPUSGsuMXZesjc6j5Ku50R67CUbfQB1rZ1AKunC7ScMQljuCWI4mvk= Received: from DB7PR04MB4618.eurprd04.prod.outlook.com (52.135.139.151) by DB7PR04MB4122.eurprd04.prod.outlook.com (52.135.130.143) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2178.18; Mon, 26 Aug 2019 07:34:19 +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; Mon, 26 Aug 2019 07:34:19 +0000 From: Joakim Zhang To: "robin.murphy@arm.com" , "will@kernel.org" , "mark.rutland@arm.com" Subject: [PATCH V6 2/3] Documentation: admin-guide: perf: add i.MX8 ddr pmu user doc Thread-Topic: [PATCH V6 2/3] Documentation: admin-guide: perf: add i.MX8 ddr pmu user doc Thread-Index: AQHVW+CsguzZcKJe/0G7XjtQ91RqNg== Date: Mon, 26 Aug 2019 07:34:19 +0000 Message-ID: <20190826073128.10052-3-qiangqing.zhang@nxp.com> References: <20190826073128.10052-1-qiangqing.zhang@nxp.com> In-Reply-To: <20190826073128.10052-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: SG2PR03CA0087.apcprd03.prod.outlook.com (2603:1096:4:7c::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: 097e65ac-b509-4273-ccbc-08d729f7ce5a x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600166)(711020)(4605104)(1401327)(4618075)(2017052603328)(7193020); SRVR:DB7PR04MB4122; x-ms-traffictypediagnostic: DB7PR04MB4122: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:7691; x-forefront-prvs: 01415BB535 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(4636009)(396003)(376002)(366004)(39860400002)(136003)(346002)(199004)(189003)(54534003)(6486002)(26005)(2501003)(6436002)(2906002)(102836004)(14454004)(6506007)(386003)(316002)(110136005)(256004)(2616005)(50226002)(2201001)(305945005)(14444005)(36756003)(7736002)(66066001)(71200400001)(8676002)(86362001)(478600001)(5660300002)(4326008)(71190400001)(81156014)(81166006)(99286004)(54906003)(486006)(53936002)(3846002)(76176011)(52116002)(6116002)(66446008)(66946007)(66476007)(66556008)(6512007)(186003)(11346002)(1076003)(25786009)(8936002)(446003)(64756008)(476003); DIR:OUT; SFP:1101; SCL:1; SRVR:DB7PR04MB4122; H:DB7PR04MB4618.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: lBiFTGPp43DVbriPe276qRAxzc2yr9UabkChNY876WS0ygp05ZnGOTotXshgO1rC2B59sootoQTYHLArq4aJanL+GnjiAu2Hs8WF+sq0ug4YI/MoqB0f3VtLCKJN11bISKgROxNC5AXh4EkW7jirGhKM43/yn8Ju7oVKgLJ2Vv8Dov+EXNMfpnaAgsvDKB/hv1i863hsbrfYgMTrh9PihuFPogvnWcc9kt3l8vvanMXRF584wRsREm6iSNt3GfMW1jYfRe8WRJRtS88zS4URRm1Da3V90Mvn2MZ792nNAXSLQUp2wiCwQq2VqcBXTPlkRYUS6IvnrIQN1oewDVJr8+4bH86j2e15ik9e0fX9GQ1jKX5kh54W0sZdjKIDozTE2UbZchCIl68GK81gMjh+Ov5a8NnYPs+hah1N7wR537k= Content-ID: <49B067E77C9EF748B265A02C23D4DA3D@eurprd04.prod.outlook.com> MIME-Version: 1.0 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 097e65ac-b509-4273-ccbc-08d729f7ce5a X-MS-Exchange-CrossTenant-originalarrivaltime: 26 Aug 2019 07:34:19.4550 (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: WYdrEhBCYwLb0WiIhN2cHAjZTy63HU3DpfuHANh2c55Ue2yqTU+0LeOZbDf18kOVAqMzO7pdFTfEqXexvjvEzQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB7PR04MB4122 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190826_003422_410091_DD68F525 X-CRM114-Status: GOOD ( 15.77 ) 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.2.81 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_AU Message has a valid DKIM or DK signature from author's domain -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_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 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..071d38b74d9d --- /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/ sleep 1 + perf stat -a -e imx8_ddr0/read/,imx8_ddr0/write/ sleep 1 + perf stat -a -e imx8_ddr0/axid-read,axi_id=0xMMMMDDDD/,imx8_ddr0/axid-write,axi_id=0xMMMMDDDD/ sleep 1