From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: Jeremy Linton <jlinton@tributary.com>
Cc: Rob Herring <robherring2@gmail.com>,
Jeremy Linton <lintonrjeremy@gmail.com>,
Grant Likely <grant.likely@linaro.org>,
"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
Paul Mackerras <paulus@samba.org>,
linuxppc-dev@lists.ozlabs.org
Subject: Re: pSeries boot failure due to wrong interrupt controller
Date: Sat, 27 Jun 2015 07:54:47 +1000 [thread overview]
Message-ID: <1435355687.26815.8.camel@kernel.crashing.org> (raw)
In-Reply-To: <558D91C1.6030004@tributary.com>
On Fri, 2015-06-26 at 12:54 -0500, Jeremy Linton wrote:
> Ping? Anyone?
>
> I'm adding ppc-dev to see if anyone there is interested in picking up the patch..
Ah I missed that completely. From your discussion, it looks correct,
I'll see if I can find a machine to test, however I think we dropped
support for POWER3 so it might be non-trivial to do so.
And yes, when there is no map, the parent should be the interrupt-parent
with a fallback to the parent node if that doesn't exist.
Cheers,
Ben.
> Thanks,
> Jeremy
>
>
> Ok so I messed up the formatting a little and was lazy and didn't checkpatch it
> cause I mean, it was 1 line! If someone wants it resent I will do so.
>
>
>
>
>
> On 6/23/2015 8:42 AM, Rob Herring wrote:
> > +Grant
> >
> > On Mon, Jun 22, 2015 at 2:44 PM, Jeremy Linton <lintonrjeremy@gmail.com> wrote:
> >> The OF IRQ logic was refactored a while back, and it appears that it
> >> broke the case where a device doesn't have an interrupt-map
> >> (legacy/ISA platform peripherals). In particular on the older pSeries
> >> platforms the console serial port (keyboard/etc) is attached via a
> >> Winbond super I/O controller. With the refactored logic
> >> of_irq_parse_raw() returns with the out_irq->np pointing at the bus,
> >> rather than the interrupt controller. This results in the platform
> >> logic getting confused about the appropriate interrupt host, and in
> >> ics_rtas_host_match() it doesn't match "chrp,iic" and the xics takes
> >> over and tries to use RTAS to map the interrupt. RTAS then crashes the
> >> machine.
> >>
> >> This tweaks the "-> no map, getting parent" behavior to behave as
> >> before, and the machine boots.
> >
> > I think the real question is why doesn't of_irq_find_parent return the
> > interrupt controller node instead of the bus node.
> >
> > While I think this fix is correct, I think of_irq_parse_raw should be
> > a nop in the case of no interrupt-map.
> >
> > Rob
> >
> >>
> >> Thanks
> >>
> >> Signed-off-by: Jeremy Linton <lintonrjeremy@gmail.com>
> >>
> >>
> >> diff --git a/drivers/of/irq.c b/drivers/of/irq.c
> >> index 1a79806..78b4161b 100644
> >> --- a/drivers/of/irq.c
> >> +++ b/drivers/of/irq.c
> >> @@ -252,7 +252,6 @@ int of_irq_parse_raw(const __be32 *addr, struct
> >> of_phandle_args *out_irq)
> >> * Successfully parsed an interrrupt-map translation; copy new
> >> * interrupt specifier into the out_irq structure
> >> */
> >> - out_irq->np = newpar;
> >>
> >> match_array = imap - newaddrsize - newintsize;
> >> for (i = 0; i < newintsize; i++)
> >> @@ -262,6 +261,7 @@ int of_irq_parse_raw(const __be32 *addr, struct
> >> of_phandle_args *out_irq)
> >>
> >> skiplevel:
> >> /* Iterate again with new parent */
> >> + out_irq->np = newpar;
> >> pr_debug(" -> new parent: %s\n", of_node_full_name(newpar));
> >> of_node_put(ipar);
> >> ipar = newpar;
WARNING: multiple messages have this Message-ID (diff)
From: Benjamin Herrenschmidt <benh-XVmvHMARGAS8U2dJNN8I7kB+6BGkLq7r@public.gmane.org>
To: Jeremy Linton <jlinton-WMdfZNuR64nqlBn2x/YWAg@public.gmane.org>
Cc: Rob Herring <robherring2-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
Jeremy Linton
<lintonrjeremy-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
Grant Likely
<grant.likely-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>,
"devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
<devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
Paul Mackerras <paulus-eUNUBHrolfbYtjvyW6yDsg@public.gmane.org>,
linuxppc-dev-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org
Subject: Re: pSeries boot failure due to wrong interrupt controller
Date: Sat, 27 Jun 2015 07:54:47 +1000 [thread overview]
Message-ID: <1435355687.26815.8.camel@kernel.crashing.org> (raw)
In-Reply-To: <558D91C1.6030004-WMdfZNuR64nqlBn2x/YWAg@public.gmane.org>
On Fri, 2015-06-26 at 12:54 -0500, Jeremy Linton wrote:
> Ping? Anyone?
>
> I'm adding ppc-dev to see if anyone there is interested in picking up the patch..
Ah I missed that completely. From your discussion, it looks correct,
I'll see if I can find a machine to test, however I think we dropped
support for POWER3 so it might be non-trivial to do so.
And yes, when there is no map, the parent should be the interrupt-parent
with a fallback to the parent node if that doesn't exist.
Cheers,
Ben.
> Thanks,
> Jeremy
>
>
> Ok so I messed up the formatting a little and was lazy and didn't checkpatch it
> cause I mean, it was 1 line! If someone wants it resent I will do so.
>
>
>
>
>
> On 6/23/2015 8:42 AM, Rob Herring wrote:
> > +Grant
> >
> > On Mon, Jun 22, 2015 at 2:44 PM, Jeremy Linton <lintonrjeremy-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
> >> The OF IRQ logic was refactored a while back, and it appears that it
> >> broke the case where a device doesn't have an interrupt-map
> >> (legacy/ISA platform peripherals). In particular on the older pSeries
> >> platforms the console serial port (keyboard/etc) is attached via a
> >> Winbond super I/O controller. With the refactored logic
> >> of_irq_parse_raw() returns with the out_irq->np pointing at the bus,
> >> rather than the interrupt controller. This results in the platform
> >> logic getting confused about the appropriate interrupt host, and in
> >> ics_rtas_host_match() it doesn't match "chrp,iic" and the xics takes
> >> over and tries to use RTAS to map the interrupt. RTAS then crashes the
> >> machine.
> >>
> >> This tweaks the "-> no map, getting parent" behavior to behave as
> >> before, and the machine boots.
> >
> > I think the real question is why doesn't of_irq_find_parent return the
> > interrupt controller node instead of the bus node.
> >
> > While I think this fix is correct, I think of_irq_parse_raw should be
> > a nop in the case of no interrupt-map.
> >
> > Rob
> >
> >>
> >> Thanks
> >>
> >> Signed-off-by: Jeremy Linton <lintonrjeremy-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
> >>
> >>
> >> diff --git a/drivers/of/irq.c b/drivers/of/irq.c
> >> index 1a79806..78b4161b 100644
> >> --- a/drivers/of/irq.c
> >> +++ b/drivers/of/irq.c
> >> @@ -252,7 +252,6 @@ int of_irq_parse_raw(const __be32 *addr, struct
> >> of_phandle_args *out_irq)
> >> * Successfully parsed an interrrupt-map translation; copy new
> >> * interrupt specifier into the out_irq structure
> >> */
> >> - out_irq->np = newpar;
> >>
> >> match_array = imap - newaddrsize - newintsize;
> >> for (i = 0; i < newintsize; i++)
> >> @@ -262,6 +261,7 @@ int of_irq_parse_raw(const __be32 *addr, struct
> >> of_phandle_args *out_irq)
> >>
> >> skiplevel:
> >> /* Iterate again with new parent */
> >> + out_irq->np = newpar;
> >> pr_debug(" -> new parent: %s\n", of_node_full_name(newpar));
> >> of_node_put(ipar);
> >> ipar = newpar;
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2015-06-26 21:55 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-22 19:44 pSeries boot failure due to wrong interrupt controller Jeremy Linton
[not found] ` <CAEFTgiyHkf8ooYdWW0nTLcdraJ_L9FpLSVZa4KS3CcdpGWJxew-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-06-23 13:42 ` Rob Herring
2015-06-26 17:54 ` Jeremy Linton
2015-06-26 17:54 ` Jeremy Linton
2015-06-26 21:54 ` Benjamin Herrenschmidt [this message]
2015-06-26 21:54 ` Benjamin Herrenschmidt
2015-06-26 22:35 ` Jeremy Linton
2015-06-26 22:35 ` Jeremy Linton
2015-06-26 22:38 ` Benjamin Herrenschmidt
2015-06-26 22:38 ` Benjamin Herrenschmidt
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=1435355687.26815.8.camel@kernel.crashing.org \
--to=benh@kernel.crashing.org \
--cc=devicetree@vger.kernel.org \
--cc=grant.likely@linaro.org \
--cc=jlinton@tributary.com \
--cc=lintonrjeremy@gmail.com \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=paulus@samba.org \
--cc=robherring2@gmail.com \
/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.