Received: by 2002:a05:6a10:7420:0:0:0:0 with SMTP id hk32csp3923779pxb; Mon, 21 Feb 2022 08:24:01 -0800 (PST) X-Google-Smtp-Source: ABdhPJyDiOp1R84KZyb0D0m9QX7xq+k8lcN8jKsFPwyUcDKiXrkVmQPHux/5VubRJFTYZjVOm4QF X-Received: by 2002:a17:907:c0c:b0:6d1:8c46:6415 with SMTP id ga12-20020a1709070c0c00b006d18c466415mr4613247ejc.326.1645460641208; Mon, 21 Feb 2022 08:24:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1645460641; cv=none; d=google.com; s=arc-20160816; b=dUo6ipxtlJWGInWAW1HcVY8k9Boz2v1JfKBHqVyWQFYA8x7UQQQ0kF5oxEFKPnq/j/ XcwhIeqnbSkFmi8ptLkgi7V15jYEtgN7ljq2z02ed6jMIlgyQc/lfWucIKZGOBAd3PKQ ZMZ8iT67QRBL5Gt3N/vr4DHoKPVMc2s42IXaqDg+/6n+73mH2zIzG22BHnyPkaZ0H3ZC +XbVaglmNE8GA2URbN57zXuxgq2+3lv2G5+pxaDefigSj9DJJzMC8E6lrPoW0C5N5u20 LJFo41ScV3G0R/QE3zUwCsRTiTnpNr1V+sIPdDF83SzwA6fXHBwO4QZycETXSwXNdxFN cv3w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:subject:cc:to:from:message-id :date:dkim-signature; bh=1h1im8m2nKsPnH5iaEYms43npktasrdaAl4q3lNigZU=; b=xYDB6CL5u8zbo2JcXbACcxibIcofsyEtWek80L8PxSKAthY8QUzL6o4s2tymzOFbdg SctATQFUFfVPgfcJ55YevHfUw2N1pK+xxvsa+IEd/9cui/kXeynahKvElNDYrQQIlcj2 Ipm+36nkd9PXPOnbNJwymX4VmapbItIkbWlPPzeBzO6NkVq3zC3Ll1WElq6zYGH6OZVv 1RK7IKNd3ENrHBPC8hRdzdoWKwNqXW6gyD9s6scBA6c3cqd8BjClGOD8pG2j8LXRFPe+ xcTZeyZdSytEwcracB+nItY2PA8mBmPUZaQ416oVCqMDpRv/U0pov4i6JTpUw0b7kmMD fn8g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=lkWHHoOv; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id b12si9016797ejp.179.2022.02.21.08.23.37; Mon, 21 Feb 2022 08:24:01 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=lkWHHoOv; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1353429AbiBUKKs (ORCPT + 99 others); Mon, 21 Feb 2022 05:10:48 -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 X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net 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.