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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id D5343C433EF for ; Mon, 21 Feb 2022 10:12:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1353444AbiBUKKu (ORCPT ); Mon, 21 Feb 2022 05:10:50 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:55806 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1353295AbiBUJ5W (ORCPT ); Mon, 21 Feb 2022 04:57:22 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1328046B0A for ; Mon, 21 Feb 2022 01:25:18 -0800 (PST) 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 9FDB260FC1 for ; Mon, 21 Feb 2022 09:25:17 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 136E4C340E9; Mon, 21 Feb 2022 09:25:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1645435517; bh=+SlfpSN+7ew6DB983/BTiQCl7198EcRJ395ZNwoOy+A=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=lkWHHoOvawbH/Hr2DYFB47QtHxA3yAW/LXkzX6tCj1PBsJWYPH43PCinbvwGBEvaS BkOYaQ2CNPXUQY1qrQhXv0KtmP13Wbqbn9e5rqjaC02ljG3j0lyh48mzm8I+HmFuLc InbrGR2/nDJ+XLh82OxhUBvGYbgKe1uhd14JoFEXlufOKlx1q0IGys8AcWma1rOrJp nUXg0VmPNxXpi4dMPNCNueZK/FmJTVwYMisQsaK2TVb42gOhBjVtvvbgJ7+P3Lv3tk qpr75TUTD2rGo+NCPBrNTvjyegNo81a5SIYxz93GiE9Sa3Vby6ir9+ESdEzVB9B4GL ZPKqfq+T+eCLw== Received: from sofa.misterjones.org ([185.219.108.64] helo=why.misterjones.org) by disco-boy.misterjones.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1nM4wU-009Ecl-Pq; Mon, 21 Feb 2022 09:25:14 +0000 Date: Mon, 21 Feb 2022 09:25:08 +0000 Message-ID: <87ee3w4lmz.wl-maz@kernel.org> From: Marc Zyngier To: Jessica Clarke Cc: Anup Patel , Anup Patel , Palmer Dabbelt , Paul Walmsley , Thomas Gleixner , Daniel Lezcano , Atish Patra , Alistair Francis , linux-riscv , "linux-kernel@vger.kernel.org List" Subject: Re: [PATCH v2 2/6] irqchip/riscv-intc: Create domain using named fwnode In-Reply-To: <4A07582C-80BD-41F8-AEF5-EE48EB7D2D15@jrtc27.com> References: <20220128052505.859518-1-apatel@ventanamicro.com> <20220128052505.859518-3-apatel@ventanamicro.com> <063b8a5636d6372f37029946b2c3e0f4@kernel.org> <31fea18e51a5021b79adb17973f9528e@kernel.org> <4A07582C-80BD-41F8-AEF5-EE48EB7D2D15@jrtc27.com> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM-LB/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL-LB/10.8 EasyPG/1.0.0 Emacs/27.1 (x86_64-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-SA-Exim-Connect-IP: 185.219.108.64 X-SA-Exim-Rcpt-To: jrtc27@jrtc27.com, anup@brainfault.org, apatel@ventanamicro.com, palmer@dabbelt.com, paul.walmsley@sifive.com, tglx@linutronix.de, daniel.lezcano@linaro.org, atishp@atishpatra.org, Alistair.Francis@wdc.com, linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, 19 Feb 2022 14:51:22 +0000, Jessica Clarke wrote: >=20 > On 19 Feb 2022, at 09:32, Marc Zyngier wrote: > >=20 > > But how do you plan to work around the fact that everything is currently > > build around having a node (and an irqdomain) per CPU? The PLIC, for ex= ample, > > clearly has one parent per CPU, not one global parent. > >=20 > > I'm sure there was a good reason for this, and I suspect merging the do= mains > > will simply end up breaking things. >=20 > On the contrary, the drivers rely on the controller being the same > across all harts, with riscv_intc_init skipping initialisation for all > but the boot hart=E2=80=99s controller. The bindings are a complete pain = to > deal with as a result, what you *want* is like you have in the Arm > world where there is just one interrupt controller in the device tree > with some of the interrupts per-processor, but instead we have this > overengineered nuisance. The only reason there are per-hart interrupt > controllers is because that=E2=80=99s how the contexts for the CLINT/PLIC= are > specified, but that really should have been done another way rather > than abusing the interrupts-extended property for that. In the FreeBSD > world we=E2=80=99ve been totally ignoring the device tree nodes for the l= ocal > interrupt controllers but for my AIA and ACLINT branch I started a few > months ago (though ACLINT's now been completely screwed up by RVI > politics, things have been renamed and split up differently in the past > few days and software interrupts de-prioritised with no current path to > ratification, so that was a waste of my time) I just hang the driver > off the boot hart=E2=80=99s node and leave all the others as totally igno= red > and a waste of space other than to figure out the contexts for the PLIC > etc. >=20 > TL;DR yes the bindings are awful, no there=E2=80=99s no issue with mergin= g the > domains. I don't know how that flies with something like[1], where CPU0 only gets interrupts in M-Mode and not S-Mode. Maybe it doesn't really matter, but this sort of asymmetric routing is totally backward. It sometime feels like the RV folks are actively trying to make this architecture a mess... :-/ M. [1] CAAhSdy0jTTDzoc+3T_8uLiWfBN3AFCWj99Ayc-Yh8FBfzUY2sQ@mail.gmail.com --=20 Without deviation from the norm, progress is not possible.