linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] powerpc/powernv: Bump opal_init initcall priority
@ 2015-06-11  9:25 Alistair Popple
  2015-06-12  9:47 ` Michael Ellerman
  2015-06-14  0:27 ` [PATCH] " Daniel Axtens
  0 siblings, 2 replies; 5+ messages in thread
From: Alistair Popple @ 2015-06-11  9:25 UTC (permalink / raw)
  To: Michael Ellerman, linuxppc-dev; +Cc: Gavin Shan, Alistair Popple

opal_init() is called via a machine_subsys_initcall(). Due to a hack
in the eeh code the eeh driver is initialised with at the same
initcall level. This means depending on link ordering the following
error can occur because the opal irchip has not been initialised:

irq: XICS didn't like hwirq-0x9 to VIRQ17 mapping (rc=-22)
pnv_eeh_post_init: Can't request OPAL event interrupt (0)

This patch solves the issue by making sure opal_init is called prior
to the subsystems that may need it.

Signed-off-by: Alistair Popple <alistair@popple.id.au>
Reported-by: Daniel Axtens <dja@axtens.net>
---

Michael,

This fixes a problem in your next tree introduced by my opal irqchip
series. I encountered similar problems when moving some of the other
subsystems across to the new interface which was the motivation behind
the first patch in that series (powerpc/powernv: Reorder OPAL
subsystem initialisation). I missed this one due to a quirk in the
generic eeh code.

It seems that initcall dependencies are not well defined (or at least
my understanding of the dependencies isn't), so I'm not overly
comfortable with this fix. To be honest I don't have a clear
understanding of what side effects bumping this up a level might have
- it boots, everything seems to "work", and a quick grep reveals
nothing obvious. However I'm open to suggestions for a better fix...

In the meantime this should fix the problem in your branch until I get
a chance to dig further.

- Alistair

 arch/powerpc/platforms/powernv/opal.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/powerpc/platforms/powernv/opal.c b/arch/powerpc/platforms/powernv/opal.c
index 9e9c483..cc3ba5f 100644
--- a/arch/powerpc/platforms/powernv/opal.c
+++ b/arch/powerpc/platforms/powernv/opal.c
@@ -718,7 +718,7 @@ static int __init opal_init(void)

 	return 0;
 }
-machine_subsys_initcall(powernv, opal_init);
+machine_arch_initcall(powernv, opal_init);

 void opal_shutdown(void)
 {
--
1.7.10.4

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

end of thread, other threads:[~2015-06-15  7:13 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-06-11  9:25 [PATCH] powerpc/powernv: Bump opal_init initcall priority Alistair Popple
2015-06-12  9:47 ` Michael Ellerman
2015-06-15  3:44   ` Alistair Popple
2015-06-15  7:13     ` Michael Ellerman
2015-06-14  0:27 ` [PATCH] " Daniel Axtens

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).