From: Marc Zyngier <maz@kernel.org>
To: Michael Ellerman <mpe@ellerman.id.au>
Cc: apatel@ventanamicro.com, Rob Herring <robh@kernel.org>,
Darren Stevens <darren@stevens-zone.net>,
"R.T.Dickinson" <rtd2@xtra.co.nz>,
DTML <devicetree@vger.kernel.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
mad skateman <madskateman@gmail.com>,
Christian Zigotzky <chzigotzky@xenosoft.de>,
Matthew Leaman <matthew@a-eon.biz>,
linuxppc-dev <linuxppc-dev@lists.ozlabs.org>,
Christian Zigotzky <info@xenosoft.de>
Subject: Re: [PowerPC] [PASEMI] Issue with the identification of ATA drives after the of/irq updates 2024-05-29
Date: Wed, 03 Jul 2024 13:09:00 +0100 [thread overview]
Message-ID: <868qyiad9f.wl-maz@kernel.org> (raw)
In-Reply-To: <87le2ik90h.fsf@mail.lhotse>
Hi Michael,
On Wed, 03 Jul 2024 12:30:38 +0100,
Michael Ellerman <mpe@ellerman.id.au> wrote:
>
> Rob Herring <robh@kernel.org> writes:
> > On Tue, Jul 2, 2024 at 10:54 AM Marc Zyngier <maz@kernel.org> wrote:
> >>
> >> On Sun, 30 Jun 2024 11:21:55 +0100,
> >> Christian Zigotzky <chzigotzky@xenosoft.de> 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 of_phandle_args *out_irq)
> >>
> >> oldimap = imap;
> >> imap = of_irq_parse_imap_parent(oldimap, imaplen, out_irq);
> >> - if (!imap)
> >> - goto fail;
> >> + if (!imap) {
> >> + match = 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 &= 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.
>
> Not sure if it helps, but there's already some code in arch/powerpc to
> "fixup" the nemo device tree at boot.
>
> 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.
>
> The code is in fixup_device_tree_pasemi():
>
> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/arch/powerpc/kernel/prom_init.c?h=v6.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.
--
Without deviation from the norm, progress is not possible.
WARNING: multiple messages have this Message-ID (diff)
From: Marc Zyngier <maz@kernel.org>
To: Michael Ellerman <mpe@ellerman.id.au>
Cc: Rob Herring <robh@kernel.org>,
Christian Zigotzky <chzigotzky@xenosoft.de>,
apatel@ventanamicro.com, DTML <devicetree@vger.kernel.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
linuxppc-dev <linuxppc-dev@lists.ozlabs.org>,
mad skateman <madskateman@gmail.com>,
"R.T.Dickinson" <rtd2@xtra.co.nz>,
Matthew Leaman <matthew@a-eon.biz>,
Darren Stevens <darren@stevens-zone.net>,
Christian Zigotzky <info@xenosoft.de>
Subject: Re: [PowerPC] [PASEMI] Issue with the identification of ATA drives after the of/irq updates 2024-05-29
Date: Wed, 03 Jul 2024 13:09:00 +0100 [thread overview]
Message-ID: <868qyiad9f.wl-maz@kernel.org> (raw)
In-Reply-To: <87le2ik90h.fsf@mail.lhotse>
Hi Michael,
On Wed, 03 Jul 2024 12:30:38 +0100,
Michael Ellerman <mpe@ellerman.id.au> wrote:
>
> Rob Herring <robh@kernel.org> writes:
> > On Tue, Jul 2, 2024 at 10:54 AM Marc Zyngier <maz@kernel.org> wrote:
> >>
> >> On Sun, 30 Jun 2024 11:21:55 +0100,
> >> Christian Zigotzky <chzigotzky@xenosoft.de> 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 of_phandle_args *out_irq)
> >>
> >> oldimap = imap;
> >> imap = of_irq_parse_imap_parent(oldimap, imaplen, out_irq);
> >> - if (!imap)
> >> - goto fail;
> >> + if (!imap) {
> >> + match = 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 &= 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.
>
> Not sure if it helps, but there's already some code in arch/powerpc to
> "fixup" the nemo device tree at boot.
>
> 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.
>
> The code is in fixup_device_tree_pasemi():
>
> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/arch/powerpc/kernel/prom_init.c?h=v6.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.
--
Without deviation from the norm, progress is not possible.
next prev parent reply other threads:[~2024-07-03 12:09 UTC|newest]
Thread overview: 70+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-30 10:21 [PowerPC] [PASEMI] Issue with the identification of ATA drives after the of/irq updates 2024-05-29 Christian Zigotzky
2024-07-02 15:19 ` Marc Zyngier
2024-07-02 15:19 ` Marc Zyngier
2024-07-02 17:55 ` Christian Zigotzky
2024-07-02 17:55 ` Christian Zigotzky
2024-07-02 19:49 ` Marc Zyngier
2024-07-02 19:49 ` Marc Zyngier
2024-07-03 3:11 ` Christian Zigotzky
2024-07-03 3:11 ` Christian Zigotzky
2024-07-03 6:40 ` Marc Zyngier
2024-07-03 6:40 ` Marc Zyngier
2024-07-03 10:26 ` Christian Zigotzky
2024-07-03 10:26 ` Christian Zigotzky
2024-07-03 10:41 ` Marc Zyngier
2024-07-03 10:41 ` Marc Zyngier
2024-07-03 16:23 ` Christian Zigotzky
2024-07-03 16:23 ` Christian Zigotzky
2024-07-02 16:54 ` Marc Zyngier
2024-07-02 16:54 ` Marc Zyngier
2024-07-02 20:48 ` Rob Herring
2024-07-02 20:48 ` Rob Herring
2024-07-02 21:42 ` Marc Zyngier
2024-07-02 21:42 ` Marc Zyngier
2024-07-03 11:30 ` Michael Ellerman
2024-07-03 11:30 ` Michael Ellerman
2024-07-03 12:09 ` Marc Zyngier [this message]
2024-07-03 12:09 ` Marc Zyngier
2024-07-03 3:27 ` Christian Zigotzky
2024-07-03 3:27 ` Christian Zigotzky
2024-07-03 6:41 ` Marc Zyngier
2024-07-03 6:41 ` Marc Zyngier
2024-07-04 4:10 ` Christian Zigotzky
2024-07-04 4:10 ` Christian Zigotzky
2024-07-04 8:28 ` Marc Zyngier
2024-07-04 8:28 ` Marc Zyngier
2024-07-04 18:54 ` Christian Zigotzky
2024-07-04 18:54 ` Christian Zigotzky
2024-07-05 7:05 ` Christian Zigotzky
2024-07-05 8:05 ` Christian Zigotzky
2024-07-05 8:05 ` Christian Zigotzky
2024-07-05 13:01 ` Marc Zyngier
2024-07-05 13:01 ` Marc Zyngier
2024-07-05 13:30 ` Trevor Dickinson
2024-07-09 3:46 ` Damien Stewart
2024-07-09 12:48 ` Michael Ellerman
2024-07-04 11:53 ` Michael Ellerman
2024-07-04 11:53 ` Michael Ellerman
2024-07-04 18:27 ` Christian Zigotzky
2024-07-04 18:27 ` Christian Zigotzky
2024-07-04 18:59 ` Christian Zigotzky
2024-07-04 18:59 ` Christian Zigotzky
2024-07-05 1:19 ` Michael Ellerman
2024-07-05 1:19 ` Michael Ellerman
2024-07-05 20:45 ` Segher Boessenkool
2024-07-05 20:45 ` Segher Boessenkool
2024-07-06 3:51 ` Christian Zigotzky
2024-07-06 4:15 ` Christian Zigotzky
2024-07-06 4:15 ` Christian Zigotzky
2024-07-06 15:54 ` Christian Zigotzky
2024-07-06 15:54 ` Christian Zigotzky
2024-07-10 3:53 ` Christian Zigotzky
2024-07-10 3:53 ` Christian Zigotzky
2024-07-10 15:05 ` Rob Herring
2024-07-10 15:05 ` Rob Herring
2024-07-10 15:53 ` Christian Zigotzky
2024-07-10 15:53 ` Christian Zigotzky
2024-07-06 4:08 ` Christian Zigotzky
2024-07-06 4:08 ` Christian Zigotzky
2024-07-05 6:59 ` Christian Zigotzky
2024-07-05 6:59 ` Christian Zigotzky
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=868qyiad9f.wl-maz@kernel.org \
--to=maz@kernel.org \
--cc=apatel@ventanamicro.com \
--cc=chzigotzky@xenosoft.de \
--cc=darren@stevens-zone.net \
--cc=devicetree@vger.kernel.org \
--cc=info@xenosoft.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=madskateman@gmail.com \
--cc=matthew@a-eon.biz \
--cc=mpe@ellerman.id.au \
--cc=robh@kernel.org \
--cc=rtd2@xtra.co.nz \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.