Patchwork cell: fix ras.c compilation

login
register
mail settings
Submitter Alexey Dobriyan
Date Nov. 2, 2008, 8:21 p.m.
Message ID <20081102202157.GA11316@x200.localdomain>
Download mbox | patch
Permalink /patch/6859/
State Accepted
Commit 9c8b4aff18b59cd0c2d9a77b3df1f9d7077df90c
Delegated to: Paul Mackerras
Headers show

Comments

Alexey Dobriyan - Nov. 2, 2008, 8:21 p.m.
arch/powerpc/platforms/cell/ras.c:299: error: implicit declaration of function 'crash_shutdown_register'

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
---

 arch/powerpc/platforms/cell/ras.c |    1 +
 1 file changed, 1 insertion(+)
Geert Uytterhoeven - Nov. 3, 2008, 8:20 a.m.
On Sun, 2 Nov 2008, Alexey Dobriyan wrote:
> arch/powerpc/platforms/cell/ras.c:299: error: implicit declaration of function 'crash_shutdown_register'
> 
> Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
> ---
> 
>  arch/powerpc/platforms/cell/ras.c |    1 +
>  1 file changed, 1 insertion(+)
> 
> --- a/arch/powerpc/platforms/cell/ras.c
> +++ b/arch/powerpc/platforms/cell/ras.c
> @@ -16,6 +16,7 @@
>  #include <linux/kexec.h>
>  #include <linux/crash_dump.h>
>  
> +#include <asm/kexec.h>

#include <linux/kexec.h>?

With kind regards,

Geert Uytterhoeven
Software Architect

Sony Techsoft Centre Europe
The Corporate Village · Da Vincilaan 7-D1 · B-1935 Zaventem · Belgium

Phone:    +32 (0)2 700 8453
Fax:      +32 (0)2 700 8622
E-mail:   Geert.Uytterhoeven@sonycom.com
Internet: http://www.sony-europe.com/

A division of Sony Europe (Belgium) N.V.
VAT BE 0413.825.160 · RPR Brussels
Fortis · BIC GEBABEBB · IBAN BE41293037680010
Michael Ellerman - Nov. 3, 2008, 8:40 a.m.
On Mon, 2008-11-03 at 09:20 +0100, Geert Uytterhoeven wrote:
> On Sun, 2 Nov 2008, Alexey Dobriyan wrote:
> > arch/powerpc/platforms/cell/ras.c:299: error: implicit declaration of function 'crash_shutdown_register'
> > 
> > Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
> > ---
> > 
> >  arch/powerpc/platforms/cell/ras.c |    1 +
> >  1 file changed, 1 insertion(+)
> > 
> > --- a/arch/powerpc/platforms/cell/ras.c
> > +++ b/arch/powerpc/platforms/cell/ras.c
> > @@ -16,6 +16,7 @@
> >  #include <linux/kexec.h>
> >  #include <linux/crash_dump.h>
> >  
> > +#include <asm/kexec.h>
> 
> #include <linux/kexec.h>?

That struck me too. But the generic header only includes the arch one if
CONFIG_KEXEC=y, and this code needs things from asm/kexec.h even when it
=n. So I think this is the best fix.

cheers
Geert Uytterhoeven - Nov. 3, 2008, 8:55 a.m.
On Mon, 3 Nov 2008, Michael Ellerman wrote:
> On Mon, 2008-11-03 at 09:20 +0100, Geert Uytterhoeven wrote:
> > On Sun, 2 Nov 2008, Alexey Dobriyan wrote:
> > > arch/powerpc/platforms/cell/ras.c:299: error: implicit declaration of function 'crash_shutdown_register'
> > > 
> > > Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
> > > ---
> > > 
> > >  arch/powerpc/platforms/cell/ras.c |    1 +
> > >  1 file changed, 1 insertion(+)
> > > 
> > > --- a/arch/powerpc/platforms/cell/ras.c
> > > +++ b/arch/powerpc/platforms/cell/ras.c
> > > @@ -16,6 +16,7 @@
> > >  #include <linux/kexec.h>
> > >  #include <linux/crash_dump.h>
> > >  
> > > +#include <asm/kexec.h>
> > 
> > #include <linux/kexec.h>?
> 
> That struck me too. But the generic header only includes the arch one if
> CONFIG_KEXEC=y, and this code needs things from asm/kexec.h even when it
> =n. So I think this is the best fix.

IC.

The real crash_shutdown_register() in arch/powerpc/kernel/crash.c only exists
if CONFIG_KEXEC. So arch/powerpc/include/asm/kexec.h has a dummy one if
!CONFIG_KEXEC.

But as you point out you don't get to see asm/kexec.h if !CONFIG_KEXEC, so the
dummy one doesn't help much...

With kind regards,

Geert Uytterhoeven
Software Architect

Sony Techsoft Centre Europe
The Corporate Village · Da Vincilaan 7-D1 · B-1935 Zaventem · Belgium

Phone:    +32 (0)2 700 8453
Fax:      +32 (0)2 700 8622
E-mail:   Geert.Uytterhoeven@sonycom.com
Internet: http://www.sony-europe.com/

A division of Sony Europe (Belgium) N.V.
VAT BE 0413.825.160 · RPR Brussels
Fortis · BIC GEBABEBB · IBAN BE41293037680010

Patch

--- a/arch/powerpc/platforms/cell/ras.c
+++ b/arch/powerpc/platforms/cell/ras.c
@@ -16,6 +16,7 @@ 
 #include <linux/kexec.h>
 #include <linux/crash_dump.h>
 
+#include <asm/kexec.h>
 #include <asm/reg.h>
 #include <asm/io.h>
 #include <asm/prom.h>