From patchwork Wed Nov 19 13:50:58 2008 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 9589 Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from ozlabs.org (localhost [127.0.0.1]) by ozlabs.org (Postfix) with ESMTP id A0472DDEEF for ; Thu, 20 Nov 2008 00:51:42 +1100 (EST) X-Original-To: cbe-oss-dev@ozlabs.org Delivered-To: cbe-oss-dev@ozlabs.org Received: from moutng.kundenserver.de (moutng.kundenserver.de [212.227.126.188]) by ozlabs.org (Postfix) with ESMTP id DCBA8DDDEA; Thu, 20 Nov 2008 00:51:12 +1100 (EST) Received: from dyn-9-152-222-41.boeblingen.de.ibm.com (blueice2n1.de.ibm.com [195.212.29.171]) by mrelayeu.kundenserver.de (node=mrelayeu7) with ESMTP (Nemesis) id 0ML2xA-1L2nSR1JgV-0004gh; Wed, 19 Nov 2008 14:51:06 +0100 From: Arnd Bergmann To: linuxppc-dev@ozlabs.org, cbe-oss-dev@ozlabs.org, kexec@lists.infradead.org, Max Krasnyansky , paulus@samba.org, benh@kernel.crashing.org Date: Wed, 19 Nov 2008 14:50:58 +0100 User-Agent: KMail/1.9.9 X-Face: I@=L^?./?$U, EK.)V[4*>`zSqm0>65YtkOe>TFD'!aw?7OVv#~5xd\s, [~w]-J!)|%=]>=?utf-8?q?+=0A=09=7EohchhkRGW=3F=7C6=5FqTmkd=5Ft=3FLZC=23Q-=60=2E=60Y=2Ea=5E?= =?utf-8?q?3zb?=) =?utf-8?q?+U-JVN=5DWT=25cw=23=5BYo0=267C=26bL12wWGlZi=0A=09=7EJ=3B=5Cwg?= =?utf-8?q?=3B3zRnz?=, J"CT_)=\H'1/{?SR7GDu?WIopm.HaBG=QYj"NZD_[zrM\Gip^U MIME-Version: 1.0 Content-Disposition: inline Message-Id: <200811191450.59361.arnd@arndb.de> X-Provags-ID: V01U2FsdGVkX18m+Mb2TWYuXXdw6nRFC2c04pYmuC1DUulrnla +wFPxnEuaNhoMIAP8NWidmmQqejSp0nxHTLfPSI5/UBB1HXUWQ 7dPG/1FZq+sYWyWqTA/+g== Subject: [Cbe-oss-dev] [PATCH] powerpc/mpic: don't reset affinity for secondary MPIC on boot X-BeenThere: cbe-oss-dev@ozlabs.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: Discussion about Open Source Software for the Cell Broadband Engine List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: cbe-oss-dev-bounces+patchwork-incoming=ozlabs.org@ozlabs.org Errors-To: cbe-oss-dev-bounces+patchwork-incoming=ozlabs.org@ozlabs.org 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 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 */