[Skiboot] [PATCH 21/34] interrupts: Ack/fetch interrupts in reset_cpu_icp()

Benjamin Herrenschmidt benh at kernel.crashing.org
Sun Jul 24 09:27:15 AEST 2016


This does a fetch from the XIRR, thus acking any pending interrupt
before we clear IPIs and EOI. This mimmics a real sequence better
and works around problems on some sims (and possibly hardware)
where just raising MFRR won't lower the IRQ line to the CPU.

Signed-off-by: Benjamin Herrenschmidt <benh at kernel.crashing.org>
---
 core/interrupts.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/core/interrupts.c b/core/interrupts.c
index 3b919fa..ec9617b 100644
--- a/core/interrupts.c
+++ b/core/interrupts.c
@@ -237,7 +237,7 @@ void add_opal_interrupts(void)
 /*
  * This is called at init time (and one fast reboot) to sanitize the
  * ICP. We set our priority to 0 to mask all interrupts and make sure
- * no IPI is on the way.
+ * no IPI is on the way. This is also called on wakeup from nap
  */
 void reset_cpu_icp(void)
 {
@@ -246,6 +246,9 @@ void reset_cpu_icp(void)
 	if (!icp)
 		return;
 
+	/* Dummy fetch */
+	in_be32(icp + ICP_XIRR);
+
 	/* Clear pending IPIs */
 	out_8(icp + ICP_MFRR, 0xff);
 
-- 
2.7.4



More information about the Skiboot mailing list