All of lore.kernel.org
 help / color / mirror / Atom feed
* pSeries boot failure due to wrong interrupt controller
@ 2015-06-22 19:44 Jeremy Linton
       [not found] ` <CAEFTgiyHkf8ooYdWW0nTLcdraJ_L9FpLSVZa4KS3CcdpGWJxew-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
  0 siblings, 1 reply; 10+ messages in thread
From: Jeremy Linton @ 2015-06-22 19:44 UTC (permalink / raw)
  To: devicetree-u79uwXL29TY76Z2rM5mHXA, paulus-eUNUBHrolfbYtjvyW6yDsg

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.

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

^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2015-06-26 22:38 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
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

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.