From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 613FCC71153 for ; Mon, 28 Aug 2023 06:34:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:Content-Type: List-Subscribe:List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id: In-Reply-To:MIME-Version:References:Message-ID:Subject:CC:To:From:Date: Reply-To:Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date :Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=oCtNpPjauONl1gM2IZIibRjMjTRstCJJMb9Ys5U+b9w=; b=NkFry55Y42AGnUN/qqjCWwprtV 3ggzODHAb3H/KzXYvc1VH6VmfLafcYb3S0ccGXaPUhx27VtQhwQDSKy8QXvdTxhJFn8HaaL/GUnHK 57e7FYh/e00bMJzg6TGHZ52InTVCInS2Ha1TWotERzH28eRsEmyONvKO17A762azc9T4W9JFQf/U8 LagJQOX3MLNIxmA9gHijwu0Ni9TU5itrnxKvEob0lGsUvn64u3K0WjtkZRc/9yzyY+cjEaEAut81R YMK1Ug4jSwX5UQ82OK6imV2SQe1KryVjZnVKehJEiYHn2zXg+NSDJAVdP1W7Kow/ZYYQo5e4mSLQU oEINytMA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qaVp9-008xPU-21; Mon, 28 Aug 2023 06:34:07 +0000 Received: from esa.microchip.iphmx.com ([68.232.154.123]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qaVp5-008xP3-1i; Mon, 28 Aug 2023 06:34:05 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1693204443; x=1724740443; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=aCl90sVW5QNut/R0WQeqfLh8sCRLNOIav5lRzT5tZqI=; b=gHPX1JWYSDpQ3r9xRqlVXKmbgAMeOm2+q45AxigUzx+Y4Xom5lrc1GTt G32RE5g9DIV8hz1qJUc6FhGSUrqeKO8XXeRremWzCB3XN3zUNDJUOpj2G vDL8aQLbvDaimOXEWnvd6jTK9rnDqX8emuKi62F+lGfar1Ug4U6kkKkbE ktl5mdez96WHS0tzecQNGDO86KLIGK4hwRcKaNL9hY2A6r9fJUPQpcpWw 3D5RPO2A0JbBqVP0gbarWufZlhhWkpPIeM4UPP4/7kokiPFQ7Qy885QFe 4detvo7wUzZZUuZk1yX2LsBZuqqoUYL9IdoR39YtXZ4TvUwKrIuSVHNt3 A==; X-IronPort-AV: E=Sophos;i="6.02,207,1688454000"; d="asc'?scan'208";a="168600219" X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN Received: from unknown (HELO email.microchip.com) ([170.129.1.10]) by esa6.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 27 Aug 2023 23:33:57 -0700 Received: from chn-vm-ex04.mchp-main.com (10.10.85.152) by chn-vm-ex03.mchp-main.com (10.10.85.151) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.21; Sun, 27 Aug 2023 23:33:49 -0700 Received: from wendy (10.10.85.11) by chn-vm-ex04.mchp-main.com (10.10.85.152) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.21 via Frontend Transport; Sun, 27 Aug 2023 23:33:46 -0700 Date: Mon, 28 Aug 2023 07:33:04 +0100 From: Conor Dooley To: Inochi Amaoto CC: Rob Herring , Krzysztof Kozlowski , Conor Dooley , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland , Paul Walmsley , Palmer Dabbelt , Albert Ou , Heiko Stuebner , Wei Fu , Pei Chen , Wenhan Chen , Guo Ren , , , , , Subject: Re: [PATCH v4] riscv: dts: allwinner: d1: Add PMU event node Message-ID: <20230828-cupid-muck-130c4ef218f6@wendy> References: MIME-Version: 1.0 In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230827_233403_742278_FD41E871 X-CRM114-Status: GOOD ( 19.21 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: multipart/mixed; boundary="===============3026262043482457530==" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org --===============3026262043482457530== Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="DSHXjya6oD0FU0CL" Content-Disposition: inline --DSHXjya6oD0FU0CL Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Aug 28, 2023 at 12:30:22PM +0800, Inochi Amaoto wrote: > D1 has several pmu events supported by opensbi. > These events can be used by perf for profiling. >=20 > Signed-off-by: Inochi Amaoto > Link: https://dl.linux-sunxi.org/D1/Xuantie_C906_R1S0_User_Manual.pdf > Link: https://github.com/T-head-Semi/openc906/blob/main/C906_RTL_FACTORY/= gen_rtl/pmu/rtl/aq_hpcp_top.v#L657 > --- > changed from v3: > 1. remove wrong event mapping of 0x0000a > 2. add reference url of c906 events implementation (D1 only support events > described in R1S0 user manual, but event mapping is the same) Why'd you drop my ack? There's nothing here that'd invalidate it AFAICT. Acked-by: Conor Dooley Thanks, Conor. >=20 > changed from v2: > 1. move pmu node from /soc to / to avoid warnings when checking. >=20 > The meaning of T-HEAD events can be found in this pending patch: > https://lore.kernel.org/linux-perf-users/IA1PR20MB4953DD82D0116EC291C2177= 7BBE2A@IA1PR20MB4953.namprd20.prod.outlook.com >=20 > The patch above also provides a example that shows how to setup > environment and use perf with T-HEAD events. > --- > arch/riscv/boot/dts/allwinner/sun20i-d1s.dtsi | 39 +++++++++++++++++++ > 1 file changed, 39 insertions(+) >=20 > diff --git a/arch/riscv/boot/dts/allwinner/sun20i-d1s.dtsi b/arch/riscv/b= oot/dts/allwinner/sun20i-d1s.dtsi > index 8275630af977..53a984d78e3f 100644 > --- a/arch/riscv/boot/dts/allwinner/sun20i-d1s.dtsi > +++ b/arch/riscv/boot/dts/allwinner/sun20i-d1s.dtsi > @@ -73,4 +73,43 @@ plic: interrupt-controller@10000000 { > #interrupt-cells =3D <2>; > }; > }; > + > + pmu { > + compatible =3D "riscv,pmu"; > + riscv,event-to-mhpmcounters =3D > + <0x00003 0x00003 0x00000008>, > + <0x00004 0x00004 0x00000010>, > + <0x00005 0x00005 0x00000200>, > + <0x00006 0x00006 0x00000100>, > + <0x10000 0x10000 0x00004000>, > + <0x10001 0x10001 0x00008000>, > + <0x10002 0x10002 0x00010000>, > + <0x10003 0x10003 0x00020000>, > + <0x10019 0x10019 0x00000040>, > + <0x10021 0x10021 0x00000020>; > + riscv,event-to-mhpmevent =3D > + <0x00003 0x00000000 0x00000001>, > + <0x00004 0x00000000 0x00000002>, > + <0x00005 0x00000000 0x00000007>, > + <0x00006 0x00000000 0x00000006>, > + <0x10000 0x00000000 0x0000000c>, > + <0x10001 0x00000000 0x0000000d>, > + <0x10002 0x00000000 0x0000000e>, > + <0x10003 0x00000000 0x0000000f>, > + <0x10019 0x00000000 0x00000004>, > + <0x10021 0x00000000 0x00000003>; > + riscv,raw-event-to-mhpmcounters =3D > + <0x00000000 0x00000001 0xffffffff 0xffffffff 0x00000008>, > + <0x00000000 0x00000002 0xffffffff 0xffffffff 0x00000010>, > + <0x00000000 0x00000003 0xffffffff 0xffffffff 0x00000020>, > + <0x00000000 0x00000004 0xffffffff 0xffffffff 0x00000040>, > + <0x00000000 0x00000005 0xffffffff 0xffffffff 0x00000080>, > + <0x00000000 0x00000006 0xffffffff 0xffffffff 0x00000100>, > + <0x00000000 0x00000007 0xffffffff 0xffffffff 0x00000200>, > + <0x00000000 0x0000000b 0xffffffff 0xffffffff 0x00002000>, > + <0x00000000 0x0000000c 0xffffffff 0xffffffff 0x00004000>, > + <0x00000000 0x0000000d 0xffffffff 0xffffffff 0x00008000>, > + <0x00000000 0x0000000e 0xffffffff 0xffffffff 0x00010000>, > + <0x00000000 0x0000000f 0xffffffff 0xffffffff 0x00020000>; > + }; > }; > -- > 2.42.0 >=20 --DSHXjya6oD0FU0CL Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEABYIAB0WIQRh246EGq/8RLhDjO14tDGHoIJi0gUCZOw/nQAKCRB4tDGHoIJi 0lubAQDUXtFzd006E4QcDgB8++nyjK7XHOdcyJ8gxq6vr3ozeAEA4kcSKZeNq6ln Eeq59+bZ7kF7PhKl1/BFMaJVgBv/Rwg= =Vm8G -----END PGP SIGNATURE----- --DSHXjya6oD0FU0CL-- --===============3026262043482457530== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel --===============3026262043482457530==--