linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Arnd Bergmann <arnd@arndb.de>
To: linuxppc-dev@ozlabs.org, cbe-oss-dev@ozlabs.org,
	kexec@lists.infradead.org, Max Krasnyansky <maxk@qualcomm.com>,
	paulus@samba.org, benh@kernel.crashing.org
Subject: [PATCH] powerpc/mpic: don't reset affinity for secondary MPIC on boot
Date: Wed, 19 Nov 2008 14:50:58 +0100	[thread overview]
Message-ID: <200811191450.59361.arnd@arndb.de> (raw)

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 */

             reply	other threads:[~2008-11-19 13:50 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-11-19 13:50 Arnd Bergmann [this message]
2008-11-20  7:30 ` [PATCH] powerpc/mpic: don't reset affinity for secondary MPIC on boot 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200811191450.59361.arnd@arndb.de \
    --to=arnd@arndb.de \
    --cc=benh@kernel.crashing.org \
    --cc=cbe-oss-dev@ozlabs.org \
    --cc=kexec@lists.infradead.org \
    --cc=linuxppc-dev@ozlabs.org \
    --cc=maxk@qualcomm.com \
    --cc=paulus@samba.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).