Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp7417809rwb; Wed, 23 Nov 2022 06:20:49 -0800 (PST) X-Google-Smtp-Source: AA0mqf4ZBZAdII6klA1iDBEmyJfwy2krTgACf0PPvqAYOrlf031e+hdkgPHgB0HLoQyQKXRBXzNt X-Received: by 2002:a17:90b:4cc7:b0:218:8711:abc3 with SMTP id nd7-20020a17090b4cc700b002188711abc3mr25724350pjb.218.1669213249138; Wed, 23 Nov 2022 06:20:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669213249; cv=none; d=google.com; s=arc-20160816; b=qbbyPFwjtMdmLjC9Kf7ESNHNP7VzcSYvQBs4PaXA/l/Oh3+GsOkIGLloQc+D1TrSuZ RGCnGhbc1gR5wmGV/VngNqjbDxnz0F4bTKBOvJr2VAbkSDzEvmkaRyzhw4x6enyAcdH9 tu5esTaKsb0TrKcWPm9oysM8ay9ag/E3lD/Yi4FvKw08zMaxgBEjhDtneFrwYzph/b3K PMn2EXfpEAOmtVamkwXMTj9Eot5hiUIR//ygaI//lkbdJakVWVXFe39bqvB+popCSGgg P/gwc/Gk/+/wZCpQ4s5gQ5O3EX90c/C7PO8cVKHXOlOFPP3F7SBeCXmvVCD6Yz54j0yI ieRA== 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=y220MNwso3ZYpWRsPbDKgQxJgjaNzSKHTPoZV8Xjdzw=; b=yd/0wmlbOq0XOUCi1my8xJFXxRQywCe4g/+e9qEJ5xJGh6uKcWCz0J3sklQ5r5LzCf JsCxJMB4+neQOOJTdo0oxmssUQWL8c/7Gxvt5UDZob+lnjsijB88bA8ppUh5x9xJ+6kL bP9i5KUuSo9t2YziFr5Tv0Iubsm5epE5gcoSaE2Q8NtpRfErQjt8Rtfbg+SgSjJZW0Ja 9I1hS/Uy+2YZmP3FObqg3rOEXrbvyMwiMe0sMJdySc2MqJ52SkdDsYB+sHjSUrWVfsPV 4+sJovhI2eJ0wWz8MlK+n6azi6Hl/5lzd/6BreX4bwXqtzVJQQphpHRGA+JQ7wHWQ8PY QpJg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=AiEemWIw; 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 l14-20020a056a0016ce00b0056ec68563d6si17871355pfc.135.2022.11.23.06.20.37; Wed, 23 Nov 2022 06:20:49 -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=AiEemWIw; 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 S238048AbiKWNcn (ORCPT + 89 others); Wed, 23 Nov 2022 08:32:43 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39282 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237948AbiKWNbd (ORCPT ); Wed, 23 Nov 2022 08:31:33 -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 50A788E2A9 for ; Wed, 23 Nov 2022 05:13:58 -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 0362EB81FDE for ; Wed, 23 Nov 2022 13:13:57 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id B890FC433D6; Wed, 23 Nov 2022 13:13:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1669209235; bh=y9f4lqeRCpiH5LbtYqo2O8Ic6S+ENQB8BPXqx1szLz4=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=AiEemWIwFHpFKyiCepagiUND0MTDLr0ozhKd8Ler5vKOkRyU9v4M5PrZwqsE/8C1+ quB58iEa/evirNJsVkL8rIQLo8U0IGDD36Snt/aiK4Tn1v/KcsAV2B0/KOXOMLRjeL IdLkreEVUC6zNYqX0cQKztQeQIG4D68hcTYx/2UMg+1TgT2YpxJQyu+CdEr3htHfMP Le+2kd3q0RSD9iZrWhlA4PYYO8yLdIsD8Hz3spZW/+BiH5SPEDgFjYVoWh/SV6QMPj haJTQXJbolDsTHHkcwxHiD8fy7jN0EpLaTI5KQQED78+YYM4MhmsySH9w+cIp4/PXO +45rtfCKqqRtQ== 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 1oxpZZ-0087sV-Fh; Wed, 23 Nov 2022 13:13:53 +0000 Date: Wed, 23 Nov 2022 13:13:52 +0000 Message-ID: <86ilj5oltb.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: <16d01eebc1693916fc74e1e75458d6c0f080cf37.camel@icenowy.me> References: <20221121042026.419383-1-uwu@icenowy.me> <86o7syoq4t.wl-maz@kernel.org> <16d01eebc1693916fc74e1e75458d6c0f080cf37.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 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). 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 > >=20 > > - The need for expressing additional information in the interrupt > > =C2=A0 specifier is not necessarily related to the above. Other interru= pt > > =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. No, that's utterly wrong. We don't describe an edge as level. Ever. >=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. Absolutely. And I'm asking you to fix it. And only that. Thanks, M. --=20 Without deviation from the norm, progress is not possible.