linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] powerpc/mpic: don't reset affinity for secondary MPIC on boot
@ 2008-11-19 13:50 Arnd Bergmann
  2008-11-20  7:30 ` Benjamin Herrenschmidt
  0 siblings, 1 reply; 6+ messages in thread
From: Arnd Bergmann @ 2008-11-19 13:50 UTC (permalink / raw)
  To: linuxppc-dev, cbe-oss-dev, kexec, Max Krasnyansky, paulus, benh

Kexec/kdump currently fails on the IBM QS2x blades when the kexec happens
on a CPU other than the initial boot CPU.  It turns out that this is the
result of mpic_init trying to set affinity of each interrupt vector to the
current boot CPU.

As far as I can tell,  the same problem is likely to exist on any
secondary MPIC, because they have to deliver interrupts to the first
output all the time. There are two potential solutions for this: either
not set up affinity at all for secondary MPICs, or assume that CPU
output 0 is connected to the upstream interrupt controller and hardcode
affinity to that.

This patch implements the first approach, because it can work on
machines that have a secondary controller that needs to deliver
interrupts to a destination other than CPU 0. The disadvantage
is that it requires the system to set up the affinity register
correctly on bootup.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>

---
Index: linux-2.6/arch/powerpc/sysdev/mpic.c
===================================================================
--- linux-2.6.orig/arch/powerpc/sysdev/mpic.c
+++ linux-2.6/arch/powerpc/sysdev/mpic.c
@@ -1323,8 +1323,9 @@ void __init mpic_init(struct mpic *mpic)
 			continue;
 		/* init hw */
 		mpic_irq_write(i, MPIC_INFO(IRQ_VECTOR_PRI), vecpri);
-		mpic_irq_write(i, MPIC_INFO(IRQ_DESTINATION),
-			       1 << hard_smp_processor_id());
+		if (mpic->flags & MPIC_PRIMARY)
+			mpic_irq_write(i, MPIC_INFO(IRQ_DESTINATION),
+				       1 << hard_smp_processor_id());
 	}
 	
 	/* Init spurious vector */

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

end of thread, other threads:[~2008-11-21 22:33 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-11-19 13:50 [PATCH] powerpc/mpic: don't reset affinity for secondary MPIC on boot Arnd Bergmann
2008-11-20  7:30 ` Benjamin Herrenschmidt
2008-11-20 17:23   ` Arnd Bergmann
2008-11-21  2:44     ` Benjamin Herrenschmidt
2008-11-21 14:40       ` Arnd Bergmann
2008-11-21 22:33         ` Benjamin Herrenschmidt

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