* [PATCH] Fix pSeries boot failure, by returning interrupt controller node when an interrupt-map property doesn't exist
@ 2015-06-29 23:50 Jeremy Linton
2015-06-30 3:23 ` Benjamin Herrenschmidt
0 siblings, 1 reply; 4+ messages in thread
From: Jeremy Linton @ 2015-06-29 23:50 UTC (permalink / raw)
To: benh; +Cc: robherring2, grant.likely, devicetree, linuxppc-dev, paulus
This is a reformat of the patch attached to "pSeries boot failure due
to wrong interrupt controller".
It allows of_irq_parse_raw() to return the node pointer of the
interrupt controller, rather than the parent bus. This allows
ics_rtas_host_match() to detect that the controller is a legacy 8259
and avoid using xics. This avoids an RTAS assertion/crash during early
kernel bootstrapping.
Signed-off-by: Jeremy Linton <lintonrjeremy@gmail.com>
---
drivers/of/irq.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/of/irq.c b/drivers/of/irq.c
index 1a79806..cb4b9ae 100644
--- a/drivers/of/irq.c
+++ b/drivers/of/irq.c
@@ -252,8 +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++)
out_irq->args[i] = be32_to_cpup(imap - newintsize + i);
@@ -262,6 +260,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;
--
1.8.1.4
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] Fix pSeries boot failure, by returning interrupt controller node when an interrupt-map property doesn't exist
2015-06-29 23:50 [PATCH] Fix pSeries boot failure, by returning interrupt controller node when an interrupt-map property doesn't exist Jeremy Linton
@ 2015-06-30 3:23 ` Benjamin Herrenschmidt
2015-06-30 16:01 ` Grant Likely
0 siblings, 1 reply; 4+ messages in thread
From: Benjamin Herrenschmidt @ 2015-06-30 3:23 UTC (permalink / raw)
To: Jeremy Linton; +Cc: robherring2, grant.likely, devicetree, linuxppc-dev, paulus
On Mon, 2015-06-29 at 18:50 -0500, Jeremy Linton wrote:
> This is a reformat of the patch attached to "pSeries boot failure due
> to wrong interrupt controller".
>
> It allows of_irq_parse_raw() to return the node pointer of the
> interrupt controller, rather than the parent bus. This allows
> ics_rtas_host_match() to detect that the controller is a legacy 8259
> and avoid using xics. This avoids an RTAS assertion/crash during early
> kernel bootstrapping
>
> Signed-off-by: Jeremy Linton <lintonrjeremy@gmail.com>
Reviewed-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
---
Rob, do you want to take this or should we ?
> ---
> drivers/of/irq.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/of/irq.c b/drivers/of/irq.c
> index 1a79806..cb4b9ae 100644
> --- a/drivers/of/irq.c
> +++ b/drivers/of/irq.c
> @@ -252,8 +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++)
> out_irq->args[i] = be32_to_cpup(imap - newintsize + i);
> @@ -262,6 +260,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;
> --
> 1.8.1.4
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] Fix pSeries boot failure, by returning interrupt controller node when an interrupt-map property doesn't exist
2015-06-30 3:23 ` Benjamin Herrenschmidt
@ 2015-06-30 16:01 ` Grant Likely
2015-06-30 18:14 ` Jeremy Linton
0 siblings, 1 reply; 4+ messages in thread
From: Grant Likely @ 2015-06-30 16:01 UTC (permalink / raw)
To: Benjamin Herrenschmidt, Jeremy Linton
Cc: robherring2, devicetree, linuxppc-dev, paulus
On Tue, 30 Jun 2015 13:23:33 +1000
, Benjamin Herrenschmidt <benh@kernel.crashing.org>
wrote:
> On Mon, 2015-06-29 at 18:50 -0500, Jeremy Linton wrote:
> > This is a reformat of the patch attached to "pSeries boot failure due
> > to wrong interrupt controller".
> >
> > It allows of_irq_parse_raw() to return the node pointer of the
> > interrupt controller, rather than the parent bus. This allows
> > ics_rtas_host_match() to detect that the controller is a legacy 8259
> > and avoid using xics. This avoids an RTAS assertion/crash during early
> > kernel bootstrapping
> >
> > Signed-off-by: Jeremy Linton <lintonrjeremy@gmail.com>
>
> Reviewed-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
> ---
>
> Rob, do you want to take this or should we ?
Merged, thanks.
Jeremy, please check your mailer configuration. The patch was mangled
and would not apply. I had to fix it up manually.
Also, does this patch need to be backported into stable? What commit
introduced this bug, and which kernel does it first appear in?
Thanks,
g.
>
> > ---
> > drivers/of/irq.c | 3 +--
> > 1 file changed, 1 insertion(+), 2 deletions(-)
> >
> > diff --git a/drivers/of/irq.c b/drivers/of/irq.c
> > index 1a79806..cb4b9ae 100644
> > --- a/drivers/of/irq.c
> > +++ b/drivers/of/irq.c
> > @@ -252,8 +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++)
> > out_irq->args[i] = be32_to_cpup(imap - newintsize + i);
> > @@ -262,6 +260,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;
> > --
> > 1.8.1.4
>
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] Fix pSeries boot failure, by returning interrupt controller node when an interrupt-map property doesn't exist
2015-06-30 16:01 ` Grant Likely
@ 2015-06-30 18:14 ` Jeremy Linton
0 siblings, 0 replies; 4+ messages in thread
From: Jeremy Linton @ 2015-06-30 18:14 UTC (permalink / raw)
To: Grant Likely, Benjamin Herrenschmidt, Jeremy Linton
Cc: robherring2, devicetree, linuxppc-dev, paulus
On 6/30/2015 11:01 AM, Grant Likely wrote:
> Merged, thanks.
Thanks!
> Jeremy, please check your mailer configuration. The patch was mangled
> and would not apply. I had to fix it up manually.
Sorry about that, I will see about creating a better setup (aka not gmail/web
client) for patches I send from home.
> Also, does this patch need to be backported into stable? What commit
> introduced this bug, and which kernel does it first appear in?
I didn't bisect the problem so i'm not 100% sure, but I think the commit that
caused this was 2361613206e66ce59cc0e08efa8d98ec15b84ed1 AKA 3.13. For me I
don't need stable, I just pulled the machine forward on a whim in order to build
some other things. I will try to do that more frequently due to the fact that
the bug existed for a little over a year..
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2015-06-30 18:14 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-06-29 23:50 [PATCH] Fix pSeries boot failure, by returning interrupt controller node when an interrupt-map property doesn't exist Jeremy Linton
2015-06-30 3:23 ` Benjamin Herrenschmidt
2015-06-30 16:01 ` Grant Likely
2015-06-30 18:14 ` Jeremy Linton
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).