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 lists.ozlabs.org (lists.ozlabs.org [112.213.38.117]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id EB4B8C2BD09 for ; Wed, 3 Jul 2024 12:09:57 +0000 (UTC) Authentication-Results: lists.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20201202 header.b=V+9gmcB1; dkim-atps=neutral Received: from boromir.ozlabs.org (localhost [IPv6:::1]) by lists.ozlabs.org (Postfix) with ESMTP id 4WDdrM2ykHz3dRb for ; Wed, 3 Jul 2024 22:09:55 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dmarc=pass (p=none dis=none) header.from=kernel.org Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20201202 header.b=V+9gmcB1; dkim-atps=neutral Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=kernel.org (client-ip=2604:1380:40e1:4800::1; helo=sin.source.kernel.org; envelope-from=maz@kernel.org; receiver=lists.ozlabs.org) Received: from sin.source.kernel.org (sin.source.kernel.org [IPv6:2604:1380:40e1:4800::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4WDdqR2N5yz3bVG for ; Wed, 3 Jul 2024 22:09:07 +1000 (AEST) Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by sin.source.kernel.org (Postfix) with ESMTP id B2D56CE2980; Wed, 3 Jul 2024 12:09:04 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id F11D2C2BD10; Wed, 3 Jul 2024 12:09:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1720008544; bh=eZ1R07sklVIHLJ7jAUSapT6sVA3yE63F67K5SBVmNPw=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=V+9gmcB1mPATTVawV18eL0+TPkJMuC5vtAT4YI/v6KwgOz0T0QzheugM7sgG4qbNz BUYdv3Xtc5rBa9T5iK2rFuKrvcdAmCK1gDWPV9YvURzM09Y8MUdNiUrjcxiEGpANtV ypNy2DLgdEA5Zgdftf9G2G6rhK9+vIppBgv84D+CcYc4ShIowLJDdlMxQz2b4LLf/X qnZXr5PA3z8t68QfJMaIvV4dW2Nv2N508pU/cYhRpKW3Hzi1OqGSxdH8I81tfwHgz8 YLHz+adRC41GFVXvA8g8qkWzNJtbM1vozmk4jPETSCXZH/yKnz/C6QiyNIUu1irYFA iPJb03yhosfXA== 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 1sOynF-009RDQ-JT; Wed, 03 Jul 2024 13:09:01 +0100 Date: Wed, 03 Jul 2024 13:09:00 +0100 Message-ID: <868qyiad9f.wl-maz@kernel.org> From: Marc Zyngier To: Michael Ellerman Subject: Re: [PowerPC] [PASEMI] Issue with the identification of ATA drives after the of/irq updates 2024-05-29 In-Reply-To: <87le2ik90h.fsf@mail.lhotse> References: <3ab66fab-c3f2-4bed-a04d-a10c57dcdd9b@xenosoft.de> <86zfqzhgys.wl-maz@kernel.org> <87le2ik90h.fsf@mail.lhotse> 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/29.3 (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: mpe@ellerman.id.au, robh@kernel.org, chzigotzky@xenosoft.de, apatel@ventanamicro.com, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, madskateman@gmail.com, rtd2@xtra.co.nz, matthew@a-eon.biz, darren@stevens-zone.net, info@xenosoft.de X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: apatel@ventanamicro.com, Rob Herring , Darren Stevens , "R.T.Dickinson" , DTML , Linux Kernel Mailing List , mad skateman , Christian Zigotzky , Matthew Leaman , linuxppc-dev , Christian Zigotzky Errors-To: linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Sender: "Linuxppc-dev" Hi Michael, On Wed, 03 Jul 2024 12:30:38 +0100, Michael Ellerman wrote: >=20 > Rob Herring writes: > > On Tue, Jul 2, 2024 at 10:54=E2=80=AFAM Marc Zyngier w= rote: > >> > >> On Sun, 30 Jun 2024 11:21:55 +0100, > >> Christian Zigotzky wrote: > >> > > >> > Hello, > >> > > >> > There is an issue with the identification of ATA drives with our > >> > P.A. Semi Nemo boards [1] after the > >> > commit "of/irq: Factor out parsing of interrupt-map parent > >> > phandle+args from of_irq_parse_raw()" [2]. > >> > >> [snip] > >> > >> My earlier request for valuable debug information still stands. But > >> while you're at it, can you please give the following hack a go? > >> > >> M. > >> > >> --- a/drivers/of/irq.c > >> +++ b/drivers/of/irq.c > >> @@ -282,8 +282,10 @@ int of_irq_parse_raw(const __be32 *addr, struct o= f_phandle_args *out_irq) > >> > >> oldimap =3D imap; > >> imap =3D of_irq_parse_imap_parent(oldimap, ima= plen, out_irq); > >> - if (!imap) > >> - goto fail; > >> + if (!imap) { > >> + match =3D 0; > >> + break; > >> + } > > > > AFAICT reading the DT, I don't think this would fix it. imap should > > only be null if malformed. This case to me looks like interrupt-map > > has the correct cell sizes, but just never matches to do the mapping. > > So maybe imaplen is off and that causes us to end up here, but if > > there's an error I don't see it. A boot with DEBUG enabled in > > drivers/of/irq.c would help. > > > >> > >> match &=3D of_device_is_available(out_irq->np); > >> if (match) > >> > >> This may not be the final workaround even if it solves your boot > >> problem, but will at least give us a hint at what is going wrong. > >> > >> I have the fuzzy feeling that we may be able to lob this broken system > >> as part of the of_irq_imap_abusers[] array, which would solve things > >> pretty "neatly". > > > > I think this would work and would consolidate the work-arounds. It > > would need either "pasemi,rootbus" or "pa-pxp" added to the list. >=20 > Not sure if it helps, but there's already some code in arch/powerpc to > "fixup" the nemo device tree at boot. >=20 > I'm not sure if it's actually the problem here, but it might be, it does > renumber some interrupts. Or possibly it could be tweaked to fix > whatever the issue is. >=20 > The code is in fixup_device_tree_pasemi(): >=20 > https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree= /arch/powerpc/kernel/prom_init.c?h=3Dv6.10-rc5#n3114 Ah, that's quite interesting, thanks for the pointer. I can see two possibilities here: - either we remove the interrupt-map from the DT (no idea if that is possible) - or we patch the interrupt-map to be slightly more useful and actually match its input Thanks, M. --=20 Without deviation from the norm, progress is not possible.