Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp7421628rwb; Wed, 23 Nov 2022 06:23:31 -0800 (PST) X-Google-Smtp-Source: AA0mqf5NAiSzp2wk+mFGQX/5KS6qg0yb2LLIBQm/xMMJpKHPJ75JIgHLf50zDynZBc6fs7pFtOei X-Received: by 2002:a17:902:a982:b0:186:c958:64f with SMTP id bh2-20020a170902a98200b00186c958064fmr10369894plb.33.1669213410899; Wed, 23 Nov 2022 06:23:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669213410; cv=none; d=google.com; s=arc-20160816; b=cIDSpWhBZcrvhMPqFrpXfGM5qLQFoWO8vmzSn79nRZT1jMIvCU1vJ5mzoytAKwsa58 yNRNyfEouGR0N4pro97IxQDVf23tns81P6jNmyjnkECYvi2eOBE5VP7jZVuJ1BNYPAPp i8Bln5hQgaiEbl9vrJDHH6d9YBMvPQB7kBXZt/x8n7JuLkAgVq9Is7lO9T4J74XCHqVm U2p2lkSWQ7bv5FVFQCd4Uw5Ii+W1wU+XCxXtvUyBL40H5o7RF6PZQUzWbQpNDO6Z6joQ i1tnqoCeLZzcceU3WPsl3nNQft7gCU2MsFCG8h8N1K/OpCnwzINqLnWKT7OKTFy7axjG Odzw== 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=NOgIpVrlpucBlaJkpnhEazuRhW897l3K++IodTYG1bQ=; b=juqPP0n+ankYIUmkNLguwCWcYRK/iM0GYPtYh7ponlCzkG4Hz658zSmxUtqk654Ewa axTkx59VrIeOLBXpyWbVKaCOk3VKKtkWA/wsJFiKsXJEsAaE+IzjThaBBTucRjA5l6R6 A5b5wc5nW7xhsZNHF5loEPut2PdLUUPDZ376d5kPJHKPdRJptXkubyDEg9Ks399UFffQ xLfaCmSSzEyLqoZrgIirCgTt2Wea+LoZkhi/jUgTAKUsroh3UdMRyNK9qlXhB81Sgkim P0/Ndb59XG9SJztcGuRIkOZ9HGx/pt6M6tgrzrONlICCM7UMAFNdpUzGAr3WSIlwRF2O tBgw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=JNuaMJzF; 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 203-20020a6300d4000000b004403ddda6e6si11924499pga.847.2022.11.23.06.23.18; Wed, 23 Nov 2022 06:23:30 -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=JNuaMJzF; 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 S237905AbiKWNnQ (ORCPT + 89 others); Wed, 23 Nov 2022 08:43:16 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55178 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237693AbiKWNmw (ORCPT ); Wed, 23 Nov 2022 08:42:52 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EBA388C789 for ; Wed, 23 Nov 2022 05:31:29 -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 ams.source.kernel.org (Postfix) with ESMTPS id A8C8CB81FE3 for ; Wed, 23 Nov 2022 13:31:28 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6FA9AC433D6; Wed, 23 Nov 2022 13:31:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1669210287; bh=xhMb47QWuCx9wN9NlFV2TTZEC2WMoD7BQHLTVP9bUAY=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=JNuaMJzFOBj/Q46PIZkO+hAchqenxYgGdCrzWuE5egmSIs21U0MTLwNYEWB9ht2qG swRLiUJA+AEp4aGcbzhZjbe8QjlLupw4DR65Fv3WRuivJYUfXW+x5AH+5wkMl8hgZ5 DL4y0w0iIo2XfkzA61JdVHY5NaJgOP4aT8HT4gTGzhqi3NNDHrq8Cb0tGdu/0k2wHZ 3dQSH8+InklXRqQG72o6+9HifpkLO6NOVTIV5hTeFqrs3uDG8pa+5ceLg1X3eT29HH My308bj09u/SLB/ZH63dbLdtGpmMXtKs+KrWBPXU47Y8DpSrJESV+eRSmkN2AIqrbX 4P2efDOHoQmwQ== Received: from sofa.misterjones.org ([185.219.108.64] helo=goblin-girl.misterjones.org) by disco-boy.misterjones.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1oxpqX-0088D3-5m; Wed, 23 Nov 2022 13:31:25 +0000 Date: Wed, 23 Nov 2022 13:31:24 +0000 Message-ID: <86h6ypol03.wl-maz@kernel.org> From: Marc Zyngier To: Icenowy Zheng Cc: Thomas Gleixner , Palmer Dabbelt , Paul Walmsley , Samuel Holland , linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org Subject: Re: [PATCH] irqchip/sifive-plic: drop quirk for two-cell variant In-Reply-To: <402eb920c5ca84e7d751ec7bd9b7f4f512a66921.camel@icenowy.me> References: <20221121042026.419383-1-uwu@icenowy.me> <86o7syoq4t.wl-maz@kernel.org> <16d01eebc1693916fc74e1e75458d6c0f080cf37.camel@icenowy.me> <86ilj5oltb.wl-maz@kernel.org> <402eb920c5ca84e7d751ec7bd9b7f4f512a66921.camel@icenowy.me> 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 (aarch64-unknown-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: uwu@icenowy.me, tglx@linutronix.de, palmer@dabbelt.com, paul.walmsley@sifive.com, samuel@sholland.org, linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.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 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 Wed, 23 Nov 2022 13:16:01 +0000, Icenowy Zheng wrote: >=20 > =E5=9C=A8 2022-11-23=E6=98=9F=E6=9C=9F=E4=B8=89=E7=9A=84 13:13 +0000=EF= =BC=8CMarc Zyngier=E5=86=99=E9=81=93=EF=BC=9A > > On Wed, 23 Nov 2022 12:38:56 +0000, > > Icenowy Zheng wrote: > > >=20 > > > =E5=9C=A8 2022-11-22=E6=98=9F=E6=9C=9F=E4=BA=8C=E7=9A=84 17:28 +0000= =EF=BC=8CMarc Zyngier=E5=86=99=E9=81=93=EF=BC=9A > > > > On Mon, 21 Nov 2022 04:20:26 +0000, > > > > Icenowy Zheng wrote: > > > > >=20 > > > > > As the special handling of edge-triggered interrupts are > > > > > defined in > > > > > the > > > > > PLIC spec, we can assume it's not a quirk, but a feature of the > > > > > PLIC > > > > > spec; thus making it a quirk and use quirk-based codepath is > > > > > not so > > > > > necessary. > > > >=20 > > > > It *is* necessary. > > > >=20 > > > > >=20 > > > > > Move to a #interrupt-cells-based practice which will allow both > > > > > device > > > > > trees without interrupt flags and with interrupt flags work for > > > > > all > > > > > compatible strings. > > > >=20 > > > > No. You're tying together two unrelated concepts: > > > >=20 > > > > - Edges get dropped in some implementations (and only some). You > > > > can > > > > =C2=A0 argue that the architecture allows it, but I see it is an > > > > =C2=A0 implementation bug. > > >=20 > > > As the specification allows it, it's not an implementation bug -- > > > and > > > for those which do not show this problem, it's possible that it's > > > just > > > all using the same trigger type (e.g. Rocket). > >=20 > > What are you against? The fact that this is flagged as a quirk? > > Honestly, I don't care about that. If we can fold all implementations > > into the same scheme, that's fine by me. >=20 > Then what should I do? Make all edge-triggered interrupts use the edge flow. >=20 > >=20 > > >=20 > > > >=20 > > > > - The need for expressing additional information in the interrupt > > > > =C2=A0 specifier is not necessarily related to the above. Other > > > > interrupt > > > > =C2=A0 controllers use extra cells to encode the interrupt affinity, > > > > for > > > > =C2=A0 example. > > >=20 > > > I think in these situations, if the interrupt controller does not > > > contain any special handling for edge interrupts, we can just > > > describe > > > them as level ones in SW. > >=20 > > No, that's utterly wrong. We don't describe an edge as level. Ever. > >=20 > > >=20 > > > >=20 > > > > I want these two things to be kept separate. Otherwise, once we > > > > get > > > > some fancy ACPI support for RISCV (no, please...), we'll have to > > > > redo > > > > the whole thing... > > > >=20 > > > > > In addition, this addresses a stable version DT binding > > > > > violation - > > > > > - > > > > > Linux v5.19 comes with "thead,c900-plic" with #interrupt-cells > > > > > defined to > > > > > be 1 instead of 2, this commit will allow DTs that complies to > > > > > Linux > > > > > v5.19 binding work (although no such DT is devliered to the > > > > > public > > > > > now). > > > >=20 > > > > *That* is what should get fixed. > > >=20 > > > Supporting all stable versions' DT binding is our promise, I think. > >=20 > > Absolutely. And I'm asking you to fix it. And only that. >=20 > Then what should I do? Mask this as another quirk that is only > applicable to c900-plic? No. Make interrupts with a single cell use the level flow. > Sounds more crazy... There is obviously no accounting for taste. M. --=20 Without deviation from the norm, progress is not possible.