lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1258461900.24093.77.camel@concordia>
Date:	Tue, 17 Nov 2009 23:45:00 +1100
From:	Michael Ellerman <michael@...erman.id.au>
To:	Mel Gorman <mel@....ul.ie>
Cc:	Paul Mackerras <paulus@...ba.org>,
	Benjamin Herrenschmidt <benh@...nel.crashing.org>,
	linuxppc-dev@...abs.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 2/4] powerpc: Panic on platform ppc-xicp when
 CONFIG_XICS not set instead of build failure

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@....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

Download attachment "signature.asc" of type "application/pgp-signature" (198 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ