linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Michael Ellerman <michael@ellerman.id.au>
To: Mel Gorman <mel@csn.ul.ie>
Cc: Paul Mackerras <paulus@samba.org>,
	linux-kernel@vger.kernel.org, linuxppc-dev@ozlabs.org
Subject: Re: [PATCH 2/4] powerpc: Panic on platform ppc-xicp when CONFIG_XICS not set instead of build failure
Date: Tue, 17 Nov 2009 23:45:00 +1100	[thread overview]
Message-ID: <1258461900.24093.77.camel@concordia> (raw)
In-Reply-To: <1258459659-11770-3-git-send-email-mel@csn.ul.ie>

[-- Attachment #1: Type: text/plain, Size: 1665 bytes --]

On Tue, 2009-11-17 at 12:07 +0000, Mel Gorman wrote:
> 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 <mel@csn.ul.ie>
> ---
>  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();
>  }

I think it'd be neater to just ifdef the whole block in
pseries_discover_pic(), or move it out and ifdef that. That'd avoid
referencing pseries_xics_init_IRQ() and setup_kexec_cpu_down_xics()
also.

cheers

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 197 bytes --]

  reply	other threads:[~2009-11-17 12:45 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-11-17 12:07 [PATCH 0/4] powerpc: Fix minor build issues on 2.6.32-rc7 without CONFIG_XICS set Mel Gorman
2009-11-17 12:07 ` [PATCH 1/4] powerpc: Add Kconfig dependency for PCI_MSI as needed by XICS Mel Gorman
2009-11-17 12:40   ` Michael Ellerman
2009-11-17 12:07 ` [PATCH 2/4] powerpc: Panic on platform ppc-xicp when CONFIG_XICS not set instead of build failure Mel Gorman
2009-11-17 12:45   ` Michael Ellerman [this message]
2009-11-17 12:07 ` [PATCH 3/4] powerpc: Only define smp_pSeries_cpu_bootable when CONFIG_XICS is set Mel Gorman
2009-11-17 12:47   ` Michael Ellerman
2009-11-17 12:07 ` [PATCH 4/4] powerpc: Avoid reference to XICS-related functions when CONFIG_XICS is not set Mel Gorman
2009-11-17 12:39 ` [PATCH 0/4] powerpc: Fix minor build issues on 2.6.32-rc7 without CONFIG_XICS set Michael Ellerman
2009-11-17 12:52   ` Michael Ellerman
2009-11-18  6:00     ` Benjamin Herrenschmidt
2009-11-17 13:25   ` Mel Gorman
2009-11-18  6:05 ` Benjamin Herrenschmidt
2009-11-18 17:05   ` Mel Gorman
2009-11-27  2:40     ` Benjamin Herrenschmidt
2009-11-27 16:33       ` [PATCH] powerpc: Add Kconfig dependency on PCI_MSI for XICS and select for PSERIES Mel Gorman

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=1258461900.24093.77.camel@concordia \
    --to=michael@ellerman.id.au \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxppc-dev@ozlabs.org \
    --cc=mel@csn.ul.ie \
    --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).