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 ED526C7EE29 for ; Tue, 6 Jun 2023 15:50:15 +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=MHSpZVuoVgnOPs8CpRleNRafLUkpbvaK1UQh1eqFMBo=; b=fVjt9qjg50sdaSNGKyvlVp4PFG WTZWg1DsKINIe0fhxpBgr1VBwalNDtEhNitt17zjr29Hlp2ZpfY77t5MLQ5Iy1b1AsFwDROTmuWyP qws9EPDBLaSk2qvCkUr6d91OqwOTI31TmDhGNVia0zkYkup+MjCkppvJ9x/0+7PjpHOO9L3OKn3tS YBcnlUMKLTshNhs896UrsKjKuBUlJzLWp0KT2c76DDNo9d9KLenCKrMondorD7D2sZ6WuIGquOM3W 2BHf58WIUfvGnP4Bzoz/WjPi0eeVQL1aPEWs1ujxLRYeCSjDQYkwW/zYFJnh/UAlcdsgSU9s73AHF UCpYteSw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1q6YwV-002Ipc-0t; Tue, 06 Jun 2023 15:49:55 +0000 Received: from dfw.source.kernel.org ([139.178.84.217]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1q6YwS-002Ioz-1m; Tue, 06 Jun 2023 15:49:53 +0000 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id F1E0E62F8B; Tue, 6 Jun 2023 15:49:51 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1DBF3C433EF; Tue, 6 Jun 2023 15:49:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1686066591; bh=0d32+WCapjwVnQgaci/Xdg3bjraWXhNb2bKu6buPcK4=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=IoZi0BQW66anQarIWSMnPwiut1QOJ9Q+u7ExVx3uFR+qftDx3biEjQ+U+w8aiHAvd xijGUPsZ3PdGeSWthdwbJmya9zMUgYGdj7JWkOOmAMyVucibyR0+kdLfkneyKyP2XX lRlI4M2d5BkG+eFM0NHenP0AfNyW1R1J50ehfrrGhOrAF6fuVCgLhMMLX4aCJGo84+ TU/DRAXRf8egURMhhWLq/DSJB53CLKxi3YEkI/2Odc0mEYbaRVmiS9B8Q9Sx2QHlQi 328SLQ2WvI7DemhS7edZdynQHYf7qLNXpTlDejTdHnolQaKDfEhphP75lXJh/zped3 HF7FHPcjs7thA== Date: Tue, 6 Jun 2023 16:49:46 +0100 From: Conor Dooley To: Sunil V L Cc: linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Paul Walmsley , Palmer Dabbelt , Albert Ou , Atish Patra , Anup Patel , Will Deacon , Mark Rutland Subject: Re: [PATCH v1 -next 2/2] RISC-V/perf: Use standard interface to get INTC domain Message-ID: <20230606-scribe-discuss-b884605cb870@spud> References: <20230605143512.707533-1-sunilvl@ventanamicro.com> <20230605143512.707533-3-sunilvl@ventanamicro.com> MIME-Version: 1.0 In-Reply-To: <20230605143512.707533-3-sunilvl@ventanamicro.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230606_084952_665246_BF0225B4 X-CRM114-Status: GOOD ( 21.66 ) 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="===============4980356334955267228==" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org --===============4980356334955267228== Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="gwX9jHrHYHhC33x/" Content-Disposition: inline --gwX9jHrHYHhC33x/ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Jun 05, 2023 at 08:05:12PM +0530, Sunil V L wrote: > Currently the PMU driver is using DT based lookup to > find the INTC node for sscofpmf extension. This will not work > for ACPI based systems causing the driver to fail to register > the PMU overflow interrupt handler. >=20 > Hence, change the code to use the standard interface to find > the INTC node which works irrespective of DT or ACPI. >=20 > Signed-off-by: Sunil V L > --- > drivers/perf/riscv_pmu_sbi.c | 17 ++--------------- > 1 file changed, 2 insertions(+), 15 deletions(-) >=20 > diff --git a/drivers/perf/riscv_pmu_sbi.c b/drivers/perf/riscv_pmu_sbi.c > index 4f3ac296b3e2..0bc491252a44 100644 > --- a/drivers/perf/riscv_pmu_sbi.c > +++ b/drivers/perf/riscv_pmu_sbi.c > @@ -739,7 +739,6 @@ static int pmu_sbi_setup_irqs(struct riscv_pmu *pmu, = struct platform_device *pde > { > int ret; > struct cpu_hw_events __percpu *hw_events =3D pmu->hw_events; > - struct device_node *cpu, *child; > struct irq_domain *domain =3D NULL; > =20 > if (riscv_isa_extension_available(NULL, SSCOFPMF)) { > @@ -756,20 +755,8 @@ static int pmu_sbi_setup_irqs(struct riscv_pmu *pmu,= struct platform_device *pde > if (!riscv_pmu_use_irq) > return -EOPNOTSUPP; > =20 > - for_each_of_cpu_node(cpu) { > - child =3D of_get_compatible_child(cpu, "riscv,cpu-intc"); > - if (!child) { > - pr_err("Failed to find INTC node\n"); > - of_node_put(cpu); > - return -ENODEV; > - } > - domain =3D irq_find_host(child); > - of_node_put(child); > - if (domain) { > - of_node_put(cpu); > - break; > - } > - } > + domain =3D irq_find_matching_fwnode(riscv_get_intc_hwnode(), > + DOMAIN_BUS_ANY); This riscv_get_intc_hwnode stuff is horrific, but that's besides the point. Reviewed-by: Conor Dooley Cheers, Conor. > if (!domain) { > pr_err("Failed to find INTC IRQ root domain\n"); > return -ENODEV; > --=20 > 2.34.1 >=20 --gwX9jHrHYHhC33x/ Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEABYIAB0WIQRh246EGq/8RLhDjO14tDGHoIJi0gUCZH9VmgAKCRB4tDGHoIJi 0oFHAQCK0+LA4Hkdi2DZBS7TOsIy0vK07SpAap5peSAzvtbB9AD9HXu6oqENThnH LWiUD5Y9PW0nx9C+Y9alXKaylYBWPwk= =BJKN -----END PGP SIGNATURE----- --gwX9jHrHYHhC33x/-- --===============4980356334955267228== 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 --===============4980356334955267228==--