From patchwork Tue Nov 17 12:07:37 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Mel Gorman X-Patchwork-Id: 38627 Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from bilbo.ozlabs.org (localhost [127.0.0.1]) by ozlabs.org (Postfix) with ESMTP id B90EB100F8E for ; Tue, 17 Nov 2009 23:17:17 +1100 (EST) Received: by ozlabs.org (Postfix) id BA16CB7B66; Tue, 17 Nov 2009 23:16:53 +1100 (EST) Delivered-To: linuxppc-dev@ozlabs.org Received: from gir.skynet.ie (gir.skynet.ie [193.1.99.77]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 6575DB7B65 for ; Tue, 17 Nov 2009 23:16:53 +1100 (EST) Received: from localhost.localdomain (skynet.skynet.ie [193.1.99.74]) by gir.skynet.ie (Postfix) with ESMTP id 5269212354; Tue, 17 Nov 2009 12:06:17 +0000 (GMT) From: Mel Gorman To: Paul Mackerras , Benjamin Herrenschmidt Subject: [PATCH 2/4] powerpc: Panic on platform ppc-xicp when CONFIG_XICS not set instead of build failure Date: Tue, 17 Nov 2009 12:07:37 +0000 Message-Id: <1258459659-11770-3-git-send-email-mel@csn.ul.ie> X-Mailer: git-send-email 1.6.5 In-Reply-To: <1258459659-11770-1-git-send-email-mel@csn.ul.ie> References: <1258459659-11770-1-git-send-email-mel@csn.ul.ie> MIME-Version: 1.0 Cc: Mel Gorman , linuxppc-dev@ozlabs.org, linux-kernel@vger.kernel.org X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org Errors-To: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org If CONFIG_XICS is not set but CONFIG_PPC_PSERIES is, then the kernel fails to build with arch/powerpc/platforms/pseries/smp.c: In function ‘smp_init_pseries_xics’: arch/powerpc/platforms/pseries/smp.c:202: error: ‘pSeries_xics_smp_ops’ undeclared (first use in this function) arch/powerpc/platforms/pseries/smp.c:202: error: (Each undeclared identifier is reported only once arch/powerpc/platforms/pseries/smp.c:202: error: for each function it appears in.) make[2]: *** [arch/powerpc/platforms/pseries/smp.o] Error 1 As CONFIG_XICS is not always necessary, this patch allows the kernel to build but the system will panic at runtime if it is found that XICS is required. Signed-off-by: Mel Gorman --- arch/powerpc/platforms/pseries/smp.c | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/arch/powerpc/platforms/pseries/smp.c b/arch/powerpc/platforms/pseries/smp.c index 440000c..da78ea5 100644 --- a/arch/powerpc/platforms/pseries/smp.c +++ b/arch/powerpc/platforms/pseries/smp.c @@ -199,7 +199,11 @@ void __init smp_init_pseries_mpic(void) void __init smp_init_pseries_xics(void) { +#ifdef CONFIG_XICS smp_ops = &pSeries_xics_smp_ops; +#else + panic("Support for platform ppc-xicp not configured"); +#endif smp_init_pseries(); }