Received: by 2002:a05:7412:f690:b0:e2:908c:2ebd with SMTP id ej16csp455697rdb; Thu, 19 Oct 2023 09:02:38 -0700 (PDT) X-Google-Smtp-Source: AGHT+IG6v4Ow4pYXt0qyZcAqdxTFNnX4kqY2nCXrasIcqPLbjo7CUJ3wTmF3VYP51LDo4sZvD8nX X-Received: by 2002:a05:6359:350a:b0:143:864e:f96f with SMTP id un10-20020a056359350a00b00143864ef96fmr2338979rwb.1.1697731357687; Thu, 19 Oct 2023 09:02:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697731357; cv=none; d=google.com; s=arc-20160816; b=jG7UPthFKQxebJBLQe0cOCzyuEP5OvEt3Kgvvgvx19bHzGdi9CgPtwmcR80UsR05Nw wirKjBdfR9wDrgU0kvGb8uto6Tr1BdNIlzwnOFyaCZWJiWhWqDoY6avZ8jSCc8QnB7/K g3wSPt677kW1H0CMJm2PkVux0mbup7LkqTSEtW3bYnNmgF/+ZKUYW2LCaDN5iZm8Y4Ys CHAcMyzxqVCS0QlRizkoEuG2gKNtwckIvSzKN7+b98LmcBuIWDATd+yth+ISltF19W4x xT0FdR7tVtzaZxKV+/sFKPrUgp3DGS2IWjbwmHk9z4m04zRAlIRWABg/icMAkPZsdPlW 8JJQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=IY/imzncr4xFKggBENGf7u3dheIupcnmAYJSpcdzZWE=; fh=0BAAJYuKTyVJJkwGPc4YJ0B/M7/4deuuCx5qi5KLGhg=; b=W6kZjgviRarm6Nf5jZigR+cTmtLwKnyvuLYdZTNJhAEyAffWZ5ld125JWnNm/U2rab 3tV+83FYJKPeUSnrfMSWXl3Ph6pVQuQ6yPFhEBVPrX41WW/GwL9ergQNMl9Ojgh1P/HI uBdFc4wnUNlLxL3lMjKumixgBKH9FRA47kz9SF7CHS64z82sMzxJdLPF9mc5MDwpAUl+ 7UwcrmPBeLBVATu1EfviS2vZJwV3JsIsGCeqCiK8ImTKLtvzX+S54LI272ZvLrnq+Pl8 7vBq4GWlo7BvX3K5wvfZiq91osbl/LDAoE1FNSPybXGx6BJAtNMVaU/Zdg4fXMyBX6y/ Vmdw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=ha4MIUcO; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from groat.vger.email (groat.vger.email. [2620:137:e000::3:5]) by mx.google.com with ESMTPS id f24-20020a637558000000b0057755c96163si4981452pgn.14.2023.10.19.09.02.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Oct 2023 09:02:37 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) client-ip=2620:137:e000::3:5; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=ha4MIUcO; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id 141D78246335; Thu, 19 Oct 2023 09:02:35 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346418AbjJSQC3 (ORCPT + 99 others); Thu, 19 Oct 2023 12:02:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48396 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345951AbjJSQC1 (ORCPT ); Thu, 19 Oct 2023 12:02:27 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id ADDC2124 for ; Thu, 19 Oct 2023 09:02:25 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id F30FCC433C7; Thu, 19 Oct 2023 16:02:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1697731345; bh=yZXzCmRk3ufriSIQXgt6TeP6axLbf0VDHMcw/aRKvKs=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=ha4MIUcOWDM7KryrnXdqTqRki9LFrT+ZiU8klxqgx9E5zJ2tEPgOkSmjU9KM8sV6v EYu9Qdi7wK1elAyP6K0JEc4nff0FHIxl1+P8YXxwGgnOuMBqMCBJJ6sRwBKOCkItTe GN0G6KNB47iwp0RvTWKHSK6uVOR2+pmvwWyD3GuSo38wCRzNdvvxLaYFPB+ZhW7Z4K vpbT0QbhZ8q9/4GVzGiR34VkhGulJK96eAP92C9mfEKGRNq9jxiJws+HCaIJLTarxB sBtQlK7pQqMfhzLI9MKpMpCW3GjCvgXepBAMja6QBjf+s7nwP4eNBfSC93WR5UZ9VG wXmqb6peDMoYw== Date: Thu, 19 Oct 2023 17:02:18 +0100 From: Conor Dooley To: Yu Chien Peter Lin Cc: paul.walmsley@sifive.com, palmer@dabbelt.com, aou@eecs.berkeley.edu, will@kernel.org, mark.rutland@arm.com, atishp@atishpatra.org, anup@brainfault.org, conor.dooley@microchip.com, ajones@ventanamicro.com, heiko@sntech.de, jszhang@kernel.org, evan@rivosinc.com, sunilvl@ventanamicro.com, linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, prabhakar.mahadev-lad.rj@bp.renesas.com, tim609@andestech.com, dylan@andestech.com, locus84@andestech.com, dminus@andestech.com, Leo Yu-Chi Liang Subject: Re: [RFC PATCH v2 08/10] perf: RISC-V: Introduce Andes PMU for perf event sampling Message-ID: <20231019-daybed-preschool-8663d5a86798@spud> References: <20231019140156.3660000-1-peterlin@andestech.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="x6otgCaD773VMsNY" Content-Disposition: inline In-Reply-To: <20231019140156.3660000-1-peterlin@andestech.com> X-Spam-Status: No, score=-1.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (groat.vger.email [0.0.0.0]); Thu, 19 Oct 2023 09:02:35 -0700 (PDT) --x6otgCaD773VMsNY Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Oct 19, 2023 at 10:01:56PM +0800, Yu Chien Peter Lin wrote: > The Andes PMU extension provides the same mechanism as Sscofpmf, > allowing us to reuse the SBI PMU driver to support event sampling > and mode filtering. >=20 > To make use of this custom PMU extension, "xandespmu" needs > to be appended to the riscv,isa-extensions for each cpu node > in device-tree, and enable CONFIG_ANDES_CUSTOM_PMU. >=20 > Signed-off-by: Yu Chien Peter Lin > Reviewed-by: Charles Ci-Jyun Wu > Reviewed-by: Leo Yu-Chi Liang > Co-developed-by: Locus Wei-Han Chen > Signed-off-by: Locus Wei-Han Chen > --- > Changes v1 -> v2: > - New patch > --- > arch/riscv/include/asm/hwcap.h | 1 + > arch/riscv/kernel/cpufeature.c | 1 + > drivers/perf/Kconfig | 14 ++++++++++++++ > drivers/perf/riscv_pmu_sbi.c | 35 +++++++++++++++++++++++++++++----- > 4 files changed, 46 insertions(+), 5 deletions(-) >=20 > diff --git a/arch/riscv/include/asm/hwcap.h b/arch/riscv/include/asm/hwca= p.h > index d3082391c901..eecfe95d5050 100644 > --- a/arch/riscv/include/asm/hwcap.h > +++ b/arch/riscv/include/asm/hwcap.h > @@ -59,6 +59,7 @@ > #define RISCV_ISA_EXT_ZIFENCEI 41 > #define RISCV_ISA_EXT_ZIHPM 42 > #define RISCV_ISA_EXT_XTHEADPMU 43 > +#define RISCV_ISA_EXT_XANDESPMU 44 > =20 > #define RISCV_ISA_EXT_MAX 64 > =20 > diff --git a/arch/riscv/kernel/cpufeature.c b/arch/riscv/kernel/cpufeatur= e.c > index 4a3fb017026c..a8e71c6dfb3e 100644 > --- a/arch/riscv/kernel/cpufeature.c > +++ b/arch/riscv/kernel/cpufeature.c > @@ -182,6 +182,7 @@ const struct riscv_isa_ext_data riscv_isa_ext[] =3D { > __RISCV_ISA_EXT_DATA(svnapot, RISCV_ISA_EXT_SVNAPOT), > __RISCV_ISA_EXT_DATA(svpbmt, RISCV_ISA_EXT_SVPBMT), > __RISCV_ISA_EXT_DATA(xtheadpmu, RISCV_ISA_EXT_XTHEADPMU), > + __RISCV_ISA_EXT_DATA(xandespmu, RISCV_ISA_EXT_XANDESPMU), This does not following the ordering convention (see the comment above this datastructure) and is not documented in the dt-binding AFAICT. Cheers, Conor. --x6otgCaD773VMsNY Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEABYIAB0WIQRh246EGq/8RLhDjO14tDGHoIJi0gUCZTFTCgAKCRB4tDGHoIJi 0nKIAP0UYudx+3t/W6mnFhUaOfIabhcVo8jVyLwKpJExRKvqSQEA5xL0ZAdqpAiu Ivu2MDucdOVHqs2n8o6sWhz+K4N3UAY= =k5/I -----END PGP SIGNATURE----- --x6otgCaD773VMsNY--