Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp1604169rdb; Thu, 7 Dec 2023 04:09:27 -0800 (PST) X-Google-Smtp-Source: AGHT+IHQ2alfFVWVZ81Kelzu3b3aIGNNwameN3Pc1/eFzA7cuiR14b7RzIQLV6j1tNFpg0Rofhoc X-Received: by 2002:aa7:88d6:0:b0:6ce:2731:79ef with SMTP id k22-20020aa788d6000000b006ce273179efmr1748095pff.37.1701950966761; Thu, 07 Dec 2023 04:09:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701950966; cv=none; d=google.com; s=arc-20160816; b=MAcC8mSm8xFxNdi1WkO8GFzHDw0jDbakbZp6tmawhG1yfc8Zn22z5glOV3b2e9Vm3/ zFT9Vo2xH9KFnY0mjMikEERcUKQ45cG9oP5ewF9i1B0lrkP8RvIrrE5PmzBZ/ZIv1/RR gBhcb3nIJY/foomkKUAoVQ/yPs5xsjapcXuuo3gjM5lcN9yk562s2KRoeDYkWZmp96ka eTw9upsfIxw8sIHdMo8Kgj2kM1Pf5gypBpYD7niquensJCba3188KuhF8pE8Gr7AauLq fVot4Pcg8YzwBGyOiZfOfKT32rVzxxKimmdpU+IokEC1ayPqoe6/p3IU1offYgA305rs qSAQ== 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=hB1JsCX1Wy00QhBgWdI6GmVUiVUje3p/4eJj0uPVlms=; fh=fAP4wR4+b5xKHHBxYiAwn8VIqfOS0ydsoC5bpB/PMWw=; b=fY2hzFsVPFthOd9IkSQ59szvGgZbWJoRGAyV+ej2JjJES9GNOvoWjfyq4pxAFV4XCD ueSWmEFmD0dvI8fx37x6IHfens2O7L6+5ERPOeDacyolOFxpws0IqFUK3bZpQiCzox7t 2dL+IRAGFqYfJs2gpIs7/QzQQDjjmqNPCWF+dTCgWmTtIc6hudvSI0Ssktp9F8dv/Oxn KZmyuCQF+LmSGJ95ieUcB8yrgNr27MGU1cZJJFBHEdLTpa/gWaGH4x/8P858i5NfpNng llAW8wCUszjF5YAGJBG++w9oI/5k4MzH5dXvbwgFvbwjphmE8XEY9rp0HsWbp8cONzoK PD7w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@microchip.com header.s=mchp header.b=JD8SGKxR; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=microchip.com Return-Path: Received: from pete.vger.email (pete.vger.email. [2620:137:e000::3:6]) by mx.google.com with ESMTPS id s2-20020a6550c2000000b005c201eb7e85si1069687pgp.541.2023.12.07.04.09.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Dec 2023 04:09:26 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) client-ip=2620:137:e000::3:6; Authentication-Results: mx.google.com; dkim=pass header.i=@microchip.com header.s=mchp header.b=JD8SGKxR; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=microchip.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by pete.vger.email (Postfix) with ESMTP id 4A3A58056924; Thu, 7 Dec 2023 04:09:24 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232482AbjLGMJC (ORCPT + 99 others); Thu, 7 Dec 2023 07:09:02 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56388 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232470AbjLGMJB (ORCPT ); Thu, 7 Dec 2023 07:09:01 -0500 Received: from esa.microchip.iphmx.com (esa.microchip.iphmx.com [68.232.154.123]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DE8651AD; Thu, 7 Dec 2023 04:09:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1701950947; x=1733486947; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=PGxT31Xg37wy+4bCiUCfwZRvaijOlfFRgBP5EBA3Gws=; b=JD8SGKxRDO83kAlE5wb1Y3sgb1F3DSQJj+oM2hsYctNa3PELir9ort5w kboc8XZlChzfPqVDU7S6ZBhVLyFw51dzGmNuugsyz5siDnRXZcLc27cIn gBjtY0KHyxrbATWTHu+OHuU+pjmsqMIDNThhdZW/wli6P68DVhnb2q3Xm 37uZOWxuUgSiIGBc3szXVdAZuG8aTLQ8dEn0hM/sfUZAnshJc5GNUQmeY 30gMA3PN94bZvvJVP4VSr8uri3AwRrW8ssrdyl5otsSXprIrCG/pNt1N6 fhVeSVopuQDs1+4i/eElr1ii/MAgSqI+AhAKRmiJkz/dKe3JwvkZu8iy3 g==; X-CSE-ConnectionGUID: r15LG2u6TWaA+hfIIKdEMQ== X-CSE-MsgGUID: wSGchTArRhy/DVmW0Qj2Bg== X-ThreatScanner-Verdict: Negative X-IronPort-AV: E=Sophos;i="6.04,256,1695711600"; d="asc'?scan'208";a="180081943" 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/ECDHE-RSA-AES128-GCM-SHA256; 07 Dec 2023 05:09:06 -0700 Received: from chn-vm-ex01.mchp-main.com (10.10.85.143) 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.35; Thu, 7 Dec 2023 05:08:30 -0700 Received: from wendy (10.10.85.11) by chn-vm-ex01.mchp-main.com (10.10.85.143) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35 via Frontend Transport; Thu, 7 Dec 2023 05:08:27 -0700 Date: Thu, 7 Dec 2023 12:07:58 +0000 From: Conor Dooley To: Atish Patra CC: , Alexandre Ghiti , Andrew Jones , Anup Patel , Atish Patra , Guo Ren , Icenowy Zheng , , , , Mark Rutland , Palmer Dabbelt , Paul Walmsley , Will Deacon Subject: Re: [RFC 2/9] drivers/perf: riscv: Add a flag to indicate SBI v2.0 support Message-ID: <20231207-professed-component-84128c06befa@wendy> References: <20231205024310.1593100-1-atishp@rivosinc.com> <20231205024310.1593100-3-atishp@rivosinc.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="+sZQ4vQi3zI/C7dL" Content-Disposition: inline In-Reply-To: <20231205024310.1593100-3-atishp@rivosinc.com> X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on pete.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 (pete.vger.email [0.0.0.0]); Thu, 07 Dec 2023 04:09:24 -0800 (PST) --+sZQ4vQi3zI/C7dL Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Dec 04, 2023 at 06:43:03PM -0800, Atish Patra wrote: > SBI v2.0 added few functions to improve SBI PMU extension. In order > to be backward compatible, the driver must use these functions only > if SBI v2.0 is available. >=20 > Signed-off-by: Atish Patra IMO this does not make sense in a patch of its own and should probably be squashed with the first user for it. > --- > drivers/perf/riscv_pmu_sbi.c | 5 +++++ > 1 file changed, 5 insertions(+) >=20 > diff --git a/drivers/perf/riscv_pmu_sbi.c b/drivers/perf/riscv_pmu_sbi.c > index 16acd4dcdb96..40a335350d08 100644 > --- a/drivers/perf/riscv_pmu_sbi.c > +++ b/drivers/perf/riscv_pmu_sbi.c > @@ -35,6 +35,8 @@ > PMU_FORMAT_ATTR(event, "config:0-47"); > PMU_FORMAT_ATTR(firmware, "config:63"); > =20 > +static bool sbi_v2_available; > + > static struct attribute *riscv_arch_formats_attr[] =3D { > &format_attr_event.attr, > &format_attr_firmware.attr, > @@ -1108,6 +1110,9 @@ static int __init pmu_sbi_devinit(void) > return 0; > } > =20 > + if (sbi_spec_version >=3D sbi_mk_version(2, 0)) > + sbi_v2_available =3D true; > + > ret =3D cpuhp_setup_state_multi(CPUHP_AP_PERF_RISCV_STARTING, > "perf/riscv/pmu:starting", > pmu_sbi_starting_cpu, pmu_sbi_dying_cpu); > --=20 > 2.34.1 >=20 --+sZQ4vQi3zI/C7dL Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEABYIAB0WIQRh246EGq/8RLhDjO14tDGHoIJi0gUCZXG1nQAKCRB4tDGHoIJi 0phjAP0azU1/zzjDgPsIIJnAK22vEXqExrH10eEONV0Q6Qw4TAD+LGAWT5Xv5AM3 SnKvsMXfm2zEtsmp003njCE7XqidDwI= =Nnit -----END PGP SIGNATURE----- --+sZQ4vQi3zI/C7dL--