From patchwork Tue Mar 20 07:27:33 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jeremy Kerr X-Patchwork-Id: 147749 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from chlorine.canonical.com (chlorine.canonical.com [91.189.94.204]) by ozlabs.org (Postfix) with ESMTP id 134E3B6EF4 for ; Tue, 20 Mar 2012 18:39:46 +1100 (EST) Received: from localhost ([127.0.0.1] helo=chlorine.canonical.com) by chlorine.canonical.com with esmtp (Exim 4.71) (envelope-from ) id 1S9tfF-000294-5i; Tue, 20 Mar 2012 07:39:29 +0000 Received: from ozlabs.org ([203.10.76.45]) by chlorine.canonical.com with esmtp (Exim 4.71) (envelope-from ) id 1S9tfC-00028o-7O for kernel-team@lists.ubuntu.com; Tue, 20 Mar 2012 07:39:26 +0000 Received: by ozlabs.org (Postfix, from userid 1023) id 570D6B6EF4; Tue, 20 Mar 2012 18:39:24 +1100 (EST) MIME-Version: 1.0 Subject: [PATCH precise] powerpc/pmac: Fix SMP kernels on pre-core99 UP machines Message-Id: <1332228453.147584.181533989908.1.gpush@pecola> To: kernel-team@lists.ubuntu.com From: Jeremy Kerr Date: Tue, 20 Mar 2012 15:27:33 +0800 Cc: 959959@bugs.launchpad.net X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.13 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: kernel-team-bounces@lists.ubuntu.com Errors-To: kernel-team-bounces@lists.ubuntu.com From: Benjamin Herrenschmidt BugLink: https://bugs.launchpad.net/bugs/959959 The code for "powersurge" SMP would kick in and cause a crash at boot due to the lack of a NULL test. Signed-off-by: Benjamin Herrenschmidt Signed-off-by: Jeremy Kerr Reported-By: Adam Conrad Tested-By: Adam Conrad Cherry-picked from upstream commit 78c5c68a4cf4329d17abfa469345ddf323d4fd62 --- arch/powerpc/platforms/powermac/smp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/powerpc/platforms/powermac/smp.c b/arch/powerpc/platforms/powermac/smp.c index 9b6a820..3394254 100644 --- a/arch/powerpc/platforms/powermac/smp.c +++ b/arch/powerpc/platforms/powermac/smp.c @@ -414,7 +414,7 @@ static struct irqaction psurge_irqaction = { static void __init smp_psurge_setup_cpu(int cpu_nr) { - if (cpu_nr != 0) + if (cpu_nr != 0 || !psurge_start) return; /* reset the entry point so if we get another intr we won't