Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp2130668pxb; Fri, 25 Mar 2022 11:37:28 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwDu/h/V/zkz65+MAytdbVwlQMcEe4fCIWgknnkF9vUuL9f9zXKJwnql8UHsnnMjJugyuG/ X-Received: by 2002:a05:6a00:1a91:b0:4fa:b21d:2ce with SMTP id e17-20020a056a001a9100b004fab21d02cemr11705433pfv.75.1648233447838; Fri, 25 Mar 2022 11:37:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1648233447; cv=none; d=google.com; s=arc-20160816; b=O0Y/S2lNu5DZnnEpGfmO7iIkH+mw67XVRn0GoSvxVtIjI5ZKnxEvx4O9YrbPgDaTRd VOEzKMksUlj4EVOTw3k1rjuj5oXopyDWwMtpyIrHCNN/eJgoYE2wDMt5Q1bkKHDEmvd1 SyFiSdWRpuDQs3hA5aRDNr6vzdmkf7n37VZQl3JyUMUkRyL2Ob4tJU/IB/vOjS27V+l0 nU6f/mulkRDPEeoW/QrE8nQ3lMLzI8aNAyVjzmUlkYyQGSoLIjkiGruxP86c2RWR2H/J xYsgCzQN1LsxpA8tcA4LULbJSsfC7+0X7cFkmqgKBRseOdFaAturrw0YeQem6x1fme3a ehGg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent:references:in-reply-to :subject:cc:to:from:message-id:date:dkim-signature; bh=iV3kH/YNWLlDz0GY3ov7M8C+mMHpYOKEVXj3PUPgKSc=; b=sEJU5bQQ+RzxM6GBpX2GpthH8pUESCeWlPtx26nGCkmdpJK2v8vgkIc6LU9w28Vg8m lIa4dnSkUPierNtxzCbZeeXCsy1uNbbWLZbsh5J501ZXqCmtsmDPUT0TltpIxPI1T7LK o1DUCSGh4LJyh3XZpjLRYd9tF8IXaOIsBeIfoFfcir0EY39swNG/79335DFytgeadcz0 G+A0AC9XK0sGECr1WIIphjOb+LAZRTVQnIE1AmiVjXjt+wlZcJ2A4uP19MKrjiwnvpk/ rkQrRmaXgTPMiw4OGd47r8Qm0SRN9GulQ+LalNVurjt1pHVVoH2U598U5u12DtT2i8nu FqJQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="EYj5g7//"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 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 lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id x195-20020a627ccc000000b004fa3a8e0099si3893091pfc.336.2022.03.25.11.37.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 25 Mar 2022 11:37:27 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="EYj5g7//"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 924D818D28A; Fri, 25 Mar 2022 10:55:01 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1352490AbiCXSI3 (ORCPT + 99 others); Thu, 24 Mar 2022 14:08:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36970 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1352487AbiCXSI2 (ORCPT ); Thu, 24 Mar 2022 14:08:28 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7E1A8B6E65; Thu, 24 Mar 2022 11:06:55 -0700 (PDT) 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 1B19C61A82; Thu, 24 Mar 2022 18:06:55 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6D995C340EC; Thu, 24 Mar 2022 18:06:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1648145214; bh=VB34RmWkNKi7pMneHjijxQjFaKafnbqhGLB3g+XF1nM=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=EYj5g7//W378H5/85DEIu7OgQm27CNcQIL6hOq7JiWtZlStNLJmfAQJeduvBnU8nK P9Fb0sCeyWh8cJ4fTl/4ytKLJuTBB4Jr4jR0/bOdqaSLuLLIn1QR/bP66bdCCOM9g8 9Qau/yjeD3YGD/WD8mxFRPeoYE7ZWTaPSz19qBUSIApgc9egmNPhImK6CMClbOBzMk RtKI29OVFTYslExk3Ga2EhXxROFJrVjd5Xapdad7MRzi3qK/Pd7BgelaMCCXN7czAn n83+EXSTUiz8mb6gGjrEdjyYaFQa0fyPeFEuLZGjID+KJQoY8YyxFai4A7Be26NqSF r0aJJ+jOIjKZg== 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 1nXRrI-00GltS-5d; Thu, 24 Mar 2022 18:06:52 +0000 Date: Thu, 24 Mar 2022 18:06:51 +0000 Message-ID: <87k0cj5io4.wl-maz@kernel.org> From: Marc Zyngier To: Vladimir Oltean Cc: "devicetree@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" , Rob Herring , Shawn Guo , Leo Li , Biwen Li , "Z.Q. Hou" , Kurt Kanzenbach , Rasmus Villemoes Subject: Re: [RFC PATCH devicetree 00/10] Do something about ls-extirq interrupt-map breakage In-Reply-To: <20220324173405.nusk6247ouvek46y@skbuf> References: <20211214013800.2703568-1-vladimir.oltean@nxp.com> <87ilvrk1r0.wl-maz@kernel.org> <20211214095853.4emzycaxkuqr4tun@skbuf> <87czlzjxmz.wl-maz@kernel.org> <20220324171041.t5yoocinj6gizcc7@skbuf> <87lewz5kr5.wl-maz@kernel.org> <20220324173405.nusk6247ouvek46y@skbuf> 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=US-ASCII X-SA-Exim-Connect-IP: 185.219.108.64 X-SA-Exim-Rcpt-To: vladimir.oltean@nxp.com, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, robh+dt@kernel.org, shawnguo@kernel.org, leoyang.li@nxp.com, biwen.li@nxp.com, zhiqiang.hou@nxp.com, kurt@linutronix.de, linux@rasmusvillemoes.dk 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=-3.5 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable 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 Thu, 24 Mar 2022 17:34:06 +0000, Vladimir Oltean wrote: > > On Thu, Mar 24, 2022 at 05:21:50PM +0000, Marc Zyngier wrote: > > On Thu, 24 Mar 2022 17:10:42 +0000, > > Vladimir Oltean wrote: > > > > > > Hello Marc, > > > > > > On Tue, Dec 14, 2021 at 10:20:36AM +0000, Marc Zyngier wrote: > > > > On Tue, 14 Dec 2021 09:58:54 +0000, > > > > Vladimir Oltean wrote: > > > > > > > > > > Hi Marc (with a c), > > > > > > > > > > I wish the firmware for these SoCs was smart enough to be compatible > > > > > with the bindings that are in the kernel and provide a blob that the > > > > > kernel could actually use. Some work has been started there and this is > > > > > work in progress. True, I don't know what other OF-based firmware some > > > > > other customers may use, but I trust it isn't a lot more advanced than > > > > > what U-Boot currently has :) > > > > > > > > > > Also, the machines may have been in the wild for years, but the > > > > > ls-extirq driver was added in November 2019. So not with the > > > > > introduction of the SoC device trees themselves. That isn't so long ago. > > > > > > > > > > As for compatibility between old kernel and new DT: I guess you'll hear > > > > > various opinions on this one. > > > > > https://www.spinics.net/lists/linux-mips/msg07778.html > > > > > > > > > > | > Are we okay with the new device tree blobs breaking the old kernel? > > > > > | > > > > > | From my point of view, newer device trees are not required to work on > > > > > | older kernel, this would impose an unreasonable limitation and the use > > > > > | case is very limited. > > > > > > > > My views are on the opposite side. DT is an ABI, full stop. If you > > > > change something, you *must* guarantee forward *and* backward > > > > compatibility. That's because: > > > > > > > > - you don't control how updatable the firmware is > > > > > > > > - people may need to revert to other versions of the kernel because > > > > the new one is broken > > > > > > > > - there are plenty of DT users beyond Linux, and we are not creating > > > > bindings for Linux only. > > > > > > > > You may disagree with this, but for the subsystems I maintain, this is > > > > the rule I intent to stick to. > > > > > > > > M. > > > > > > > > -- > > > > Without deviation from the norm, progress is not possible. > > > > > > I was just debugging an interesting issue with an old kernel not working > > > with a new DT blob, and after figuring out what the problem was (is), > > > I remembered this message and I'm curious what you have to say about it. > > > > > > I have this DT layout: > > > > > > ethernet-phy@1 { > > > reg = <0x1>; > > > interrupts-extended = <&extirq 2 IRQ_TYPE_LEVEL_LOW>; > > > }; > > > > > > extirq: interrupt-controller@1ac { > > > compatible = "fsl,ls1021a-extirq"; > > > > > > }; > > > > > > I booted the new DT blob (which has "interrupts-extended") on a kernel > > > where the ls-extirq driver did not exist. This had the result of > > > of_mdiobus_phy_device_register() -> of_irq_get() returning -EPROBE_DEFER > > > forever and ever. So the PHY driver in turn never probed, and Ethernet > > > was broken. So I had to delete the interrupts OF property to let the PHY > > > at least work in poll mode. > > > > > > What went wrong here in your opinion? > > > > I'm not sure what you expect me to say here. You have a device that > > references an interrupt. The DT seems sound (I don't get why you think > > "interrupt-extended" is a problem here, but hey...). > > > > If your kernel doesn't have a driver for the interrupt controller > > referenced here, what do you expect, other than things not working? > > > > M. > > > > -- > > Without deviation from the norm, progress is not possible. > > I was just raising this as what I thought would be a simple and > non-controversial counter example to your remark "If you change something, > you *must* guarantee forward *and* backward compatibility." If you change something *in the binding*, which was implicit in the context, and makes no sense out of context. > > Practically speaking, what has happened is that the board DT appeared in > kernel N, the ls-extirq driver in kernel N+1, and the DT was updated to > enable PHY interrupts in kernel N+2. That DT update practically broke > kernel N from running correctly on DTs taken from kernel N+2 onwards. > This is the observable behavior, we can find as many justifications for > it as we wish. Well, you can also argue that the DT was broken at N and N+1 for not describing the HW correctly and completely. No binding has changed here. Your DT was incomplete, and someone fixed it for you. We can argue this things forever and a half. I've laid down the ground rules for the stuff I maintain. If you're not happy with this, you can fix it by either removing the NXP hardware from the tree, or taking over from me as the irqchip maintainer. I'd be perfectly happy with any (and even more, with both) of these outcomes. M. -- Without deviation from the norm, progress is not possible.