Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp1355851pxb; Thu, 24 Mar 2022 18:36:13 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzwYj0e09pwkf5qZqV4vKJpp7eRc8jcU30aOdM1OMnCK4mu32ptOHFsaJuiuSGxxlAzNQyH X-Received: by 2002:a17:907:3e99:b0:6df:7ad3:f66b with SMTP id hs25-20020a1709073e9900b006df7ad3f66bmr9069649ejc.230.1648172173363; Thu, 24 Mar 2022 18:36:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1648172173; cv=none; d=google.com; s=arc-20160816; b=f5vqHRK0EwiPcfIQpRqtAxojU6W0RBZyUUICecO4/BpcM/W1XZjRaJBAErpg/mvUdq a0erPE4T0tnYBDaXKuUgq5hE0HVRpg51iL7PAgcdcF6LfeWtuoSSaEvqCaSyW0tisyd7 zM00bZZLjqn3LEM4NP78JDoJTTWkWvHjhWNut9ooJNhDqr25HDgJ88dllOcaI5SzoGZz 2wyVlmhMPGnneoLjm/0T0pcYTH8vgCZnI/fXx+5gjdNX3u2LLMXyYlZp+ZhGgDdsa3II Y2hEGuXzdVFTNMxbehM7J6v3hylTX1S7qJUh4tzngaRmzS5Jqx177Kn2l5xiPDa+tZy0 KZ6w== 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=P7HjTU13EVqgMe3NKHHSvqiAny7tW8LehlK2a1YXkbw=; b=OEliwli93pY/gMwVy6LZ3WJlEEapKBHBW4RP51k52Ha2iyrl/cjkGMX+EL0niFiqAi mdSwfdEbUIgz4Gvr8KOPnIO31332uUP+zmWeJN/lPJQHnbg8WO24ATYQOJaChp7oimOn IeVU/kZWGz6MNbcfPtaZJLC9E3irdt51akUO5Z48q0irC+vfc1u3G9z0GFrOAxVwYACF 3IE3gzdjKiRsS0cHe+hqMIw3KlDHeTlZEs8Ku0iIRcxUqCN/s5S7lu6H0+XxFSXZhSrw 7YMh2lwfW4+2wpg2LL3Q1Xc5l93W3/TUv559EBsaPOUmwWOGWL7EM9bRIctz2OYWbC0o AfhQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="bv1u1/1i"; 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 u16-20020a056402065000b0041962abfa3fsi1245693edx.387.2022.03.24.18.35.47; Thu, 24 Mar 2022 18:36:13 -0700 (PDT) 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="bv1u1/1i"; 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 S1352227AbiCXRX3 (ORCPT + 99 others); Thu, 24 Mar 2022 13:23:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58288 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243445AbiCXRX2 (ORCPT ); Thu, 24 Mar 2022 13:23:28 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 60AE2996B8; Thu, 24 Mar 2022 10:21:54 -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 003A9619AC; Thu, 24 Mar 2022 17:21:54 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 607D5C340EC; Thu, 24 Mar 2022 17:21:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1648142513; bh=xLzfzYThBn01lrwpvVJEv2Gb/9OdefdCKN7vc1aeUEw=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=bv1u1/1it7BaXwJku7/IYXiuVhgsiXBhQa4EgtACA5qnP77ziBSr3FZu1eJWeFEGs GjSaKFzuTC0XHywiUxlXa2LJEj/Sv3pWxlMSS9uXsLIKNG7cIvqB1DxZSgA8/tf1rg iujsDrtoqMBoPErwsB2IzuVfdIlNVHcVnQn1fTR2Rq9X9rCN4fk0lTTYKFAWcpknWr R1gwvpZMZgOiQ5hDiUVzcP9C64USoR9ACc4ro1CCeCT7yrwMYKiG+ti4t2vx/ZPuZH yVwzwE6KrGqVYN42yDBXYkPpZ1C4BU+9KNkIrr3Yh58o8ZVW99f/ofvA3rOECDmDaa mJ1BwG/AzO8fw== 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 1nXR9j-00GlL9-5w; Thu, 24 Mar 2022 17:21:51 +0000 Date: Thu, 24 Mar 2022 17:21:50 +0000 Message-ID: <87lewz5kr5.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: <20220324171041.t5yoocinj6gizcc7@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> 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=-8.3 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 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.