From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 629FDC433F5 for ; Thu, 18 Nov 2021 19:19:18 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 48E61613A9 for ; Thu, 18 Nov 2021 19:19:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233734AbhKRTWR (ORCPT ); Thu, 18 Nov 2021 14:22:17 -0500 Received: from mail.kernel.org ([198.145.29.99]:33148 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233701AbhKRTWQ (ORCPT ); Thu, 18 Nov 2021 14:22:16 -0500 Received: from disco-boy.misterjones.org (disco-boy.misterjones.org [51.254.78.96]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 0AD1E610F8; Thu, 18 Nov 2021 19:19:16 +0000 (UTC) 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 1mnmwD-006OfV-Qh; Thu, 18 Nov 2021 19:19:13 +0000 Date: Thu, 18 Nov 2021 19:19:13 +0000 Message-ID: <87ilwp6zm6.wl-maz@kernel.org> From: Marc Zyngier To: Sander Vanheule Cc: Rob Herring , Lorenzo Pieralisi , Bjorn Helgaas , Birger Koblitz , Bert Vermeulen , John Crispin , Thomas Gleixner , linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, Frank Rowand Subject: Re: realtek,rtl-intc IRQ mapping broken on 5.16-rc1 In-Reply-To: References: 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: sander@svanheule.net, robh+dt@kernel.org, lorenzo.pieralisi@arm.com, bhelgaas@google.com, mail@birger-koblitz.de, bert@biot.com, john@phrozen.org, tglx@linutronix.de, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, frowand.list@gmail.com X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Sander, On Thu, 18 Nov 2021 15:56:06 +0000, Sander Vanheule wrote: > > Hi everyone, > > On 5.16-rc1, the realtek,rtl-intc interrupt controller driver for > Realtek RTL8380 SoCs (and related) appears broken. When booting, I > don't get a tty on the serial port, although serial output works. Thanks for the heads up. > The watchdog (currently under review) also cannot acquire the > required phase1 interrupt, and produces the following output: > [ 1.968228] realtek-otto-watchdog 18003150.watchdog: error -EINVAL: Failed to get IRQ 4 > for phase1 > [ 1.978404] realtek-otto-watchdog: probe of 18003150.watchdog failed with error -22 > > A bisects points to commit 041284181226 ("of/irq: Allow matching of > an interrupt-map local to an interrupt controller"). Reverting this > above commit and follow-up commit 10a20b34d735 ("of/irq: Don't > ignore interrupt-controller when interrupt-map failed") restores the > functionality from v5.15. OK, back to square one, we need to debug this one. [...] > cpuintc: cpuintc { > compatible = "mti,cpu-interrupt-controller"; > #address-cells = <0>; > #interrupt-cells = <1>; > interrupt-controller; > }; > [...] > > intc: interrupt-controller@3000 { > compatible = "realtek,rtl-intc"; > reg = <0x3000 0x20>; > interrupt-controller; > #interrupt-cells = <1>; > > #address-cells = <0>; > interrupt-map = > <31 &cpuintc 2>, /* UART0 */ > <20 &cpuintc 3>, /* SWCORE */ > <19 &cpuintc 4>, /* WDT IP1 */ > <18 &cpuintc 5>; /* WDT IP2 */ > }; Something looks pretty odd. With 5.15, this interrupt-map would be completely ignored. With 5.16-rc1, we should actually honour it. /me digs... Gah, I see. This driver has its own interrupt-map parser and invents something out of thin air. I will bang my own head on the wall for having merged this horror. Can you try applying the patch below and rename the interrupt-map property in your DT to "silly-interrupt-map" and let me know if that helps? That's of course not the right fix, but that's just to confirm the extent of the damage... M. diff --git a/drivers/irqchip/irq-realtek-rtl.c b/drivers/irqchip/irq-realtek-rtl.c index fd9f275592d2..3641cd2b1a2c 100644 --- a/drivers/irqchip/irq-realtek-rtl.c +++ b/drivers/irqchip/irq-realtek-rtl.c @@ -114,7 +114,7 @@ static int __init map_interrupts(struct device_node *node, struct irq_domain *do if (ret || tmp) return -EINVAL; - imap = of_get_property(node, "interrupt-map", &imaplen); + imap = of_get_property(node, "silly-interrupt-map", &imaplen); if (!imap || imaplen % 3) return -EINVAL; -- Without deviation from the norm, progress is not possible.