2009-01-11 10:08:57

by Petr Titěra

[permalink] [raw]
Subject: Build error on latest git

Hello,

I'm getting this build error in arch/x86/kernel/mpparse.c using latest git:

arch/x86/kernel/mpparse.c: In function ‘MP_processor_info’:
arch/x86/kernel/mpparse.c:57: error: ‘disabled_cpus’ undeclared (first
use in this function)
arch/x86/kernel/mpparse.c:57: error: (Each undeclared identifier is
reported only once
arch/x86/kernel/mpparse.c:57: error: for each function it appears in.)
arch/x86/kernel/mpparse.c: In function ‘MP_bus_info’:
arch/x86/kernel/mpparse.c:85: error: implicit declaration of function
‘apic_printk’
arch/x86/kernel/mpparse.c:85: error: ‘APIC_VERBOSE’ undeclared (first
use in this function)
arch/x86/kernel/mpparse.c: In function ‘print_MP_intsrc_info’:
arch/x86/kernel/mpparse.c:156: error: ‘APIC_VERBOSE’ undeclared (first
use in this function)
arch/x86/kernel/mpparse.c: In function ‘print_mp_irq_info’:
arch/x86/kernel/mpparse.c:164: error: ‘APIC_VERBOSE’ undeclared (first
use in this function)
arch/x86/kernel/mpparse.c: In function ‘MP_lintsrc_info’:
arch/x86/kernel/mpparse.c:236: error: ‘APIC_VERBOSE’ undeclared (first
use in this function)
arch/x86/kernel/mpparse.c: In function ‘smp_read_mpc’:
arch/x86/kernel/mpparse.c:395: error: ‘num_processors’ undeclared (first
use in this function)
arch/x86/kernel/mpparse.c: In function ‘__get_smp_config’:
arch/x86/kernel/mpparse.c:670: error: ‘num_processors’ undeclared (first
use in this function)
arch/x86/kernel/mpparse.c: In function ‘smp_scan_config’:
arch/x86/kernel/mpparse.c:692: error: ‘APIC_VERBOSE’ undeclared (first
use in this function)
make[1]: *** [arch/x86/kernel/mpparse.o] Error 1
make: *** [arch/x86/kernel] Error 2

Petr Titera


Attachments:
.config (38.93 kB)

2009-01-11 11:57:40

by Petr Titěra

[permalink] [raw]
Subject: Re: Build error on latest git

Going through source it seems to me (still building) that it is caused
by including asm/smp.h only if build with CONFIG_SMP. This patch seems
to fix this

diff --git a/include/linux/smp.h b/include/linux/smp.h
index b824669..fd51bb9 100644
--- a/include/linux/smp.h
+++ b/include/linux/smp.h
@@ -11,6 +11,8 @@
#include <linux/list.h>
#include <linux/cpumask.h>

+#include <asm/smp.h>
+
extern void cpu_idle(void);

struct call_single_data {
@@ -30,7 +32,6 @@ extern unsigned int total_cpus;
#include <linux/kernel.h>
#include <linux/compiler.h>
#include <linux/thread_info.h>
-#include <asm/smp.h>

/*
* main cross-CPU interfaces, handles INIT, TLB flush, STOP, etc.


Petr Titera napsal(a):
> Hello,
>
> I'm getting this build error in arch/x86/kernel/mpparse.c using latest
> git:
>
> arch/x86/kernel/mpparse.c: In function ‘MP_processor_info’:
> arch/x86/kernel/mpparse.c:57: error: ‘disabled_cpus’ undeclared (first
> use in this function)
> arch/x86/kernel/mpparse.c:57: error: (Each undeclared identifier is
> reported only once
> arch/x86/kernel/mpparse.c:57: error: for each function it appears in.)
> arch/x86/kernel/mpparse.c: In function ‘MP_bus_info’:
> arch/x86/kernel/mpparse.c:85: error: implicit declaration of function
> ‘apic_printk’
> arch/x86/kernel/mpparse.c:85: error: ‘APIC_VERBOSE’ undeclared (first
> use in this function)
> arch/x86/kernel/mpparse.c: In function ‘print_MP_intsrc_info’:
> arch/x86/kernel/mpparse.c:156: error: ‘APIC_VERBOSE’ undeclared (first
> use in this function)
> arch/x86/kernel/mpparse.c: In function ‘print_mp_irq_info’:
> arch/x86/kernel/mpparse.c:164: error: ‘APIC_VERBOSE’ undeclared (first
> use in this function)
> arch/x86/kernel/mpparse.c: In function ‘MP_lintsrc_info’:
> arch/x86/kernel/mpparse.c:236: error: ‘APIC_VERBOSE’ undeclared (first
> use in this function)
> arch/x86/kernel/mpparse.c: In function ‘smp_read_mpc’:
> arch/x86/kernel/mpparse.c:395: error: ‘num_processors’ undeclared
> (first use in this function)
> arch/x86/kernel/mpparse.c: In function ‘__get_smp_config’:
> arch/x86/kernel/mpparse.c:670: error: ‘num_processors’ undeclared
> (first use in this function)
> arch/x86/kernel/mpparse.c: In function ‘smp_scan_config’:
> arch/x86/kernel/mpparse.c:692: error: ‘APIC_VERBOSE’ undeclared (first
> use in this function)
> make[1]: *** [arch/x86/kernel/mpparse.o] Error 1
> make: *** [arch/x86/kernel] Error 2
>
> Petr Titera

2009-01-11 13:06:42

by Jaswinder Singh

[permalink] [raw]
Subject: Re: Build error on latest git

On Sun, Jan 11, 2009 at 5:27 PM, Petr Titera <[email protected]> wrote:
> Going through source it seems to me (still building) that it is caused by
> including asm/smp.h only if build with CONFIG_SMP. This patch seems to fix
> this
>
> diff --git a/include/linux/smp.h b/include/linux/smp.h
> index b824669..fd51bb9 100644
> --- a/include/linux/smp.h
> +++ b/include/linux/smp.h
> @@ -11,6 +11,8 @@
> #include <linux/list.h>
> #include <linux/cpumask.h>
>
> +#include <asm/smp.h>
> +
> extern void cpu_idle(void);
>

No, this is wrong.

asm/smp.h should only be included when CONFIG_SMP is defined.

I will send fix of this.

--
JSR

2009-01-11 13:11:22

by Jaswinder Singh Rajput

[permalink] [raw]
Subject: Re: Build error on latest git

On Sun, 2009-01-11 at 18:36 +0530, Jaswinder Singh Rajput wrote:
> On Sun, Jan 11, 2009 at 5:27 PM, Petr Titera <[email protected]> wrote:
> > Going through source it seems to me (still building) that it is caused by
> > including asm/smp.h only if build with CONFIG_SMP. This patch seems to fix
> > this
> >
> > diff --git a/include/linux/smp.h b/include/linux/smp.h
> > index b824669..fd51bb9 100644
> > --- a/include/linux/smp.h
> > +++ b/include/linux/smp.h
> > @@ -11,6 +11,8 @@
> > #include <linux/list.h>
> > #include <linux/cpumask.h>
> >
> > +#include <asm/smp.h>
> > +
> > extern void cpu_idle(void);
> >
>
> No, this is wrong.
>
> asm/smp.h should only be included when CONFIG_SMP is defined.
>
> I will send fix of this.
>

Here is the temporary fix, later on I will remove non-smp data from
smp.h

Subject: [PATCH] x86: mpparse.c fix compilation error

Impact: fix compilation error

Signed-off-by: Jaswinder Singh Rajput <[email protected]>
---
arch/x86/kernel/mpparse.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/arch/x86/kernel/mpparse.c b/arch/x86/kernel/mpparse.c
index 8385d4e..79dae60 100644
--- a/arch/x86/kernel/mpparse.c
+++ b/arch/x86/kernel/mpparse.c
@@ -27,6 +27,7 @@
#include <asm/e820.h>
#include <asm/trampoline.h>
#include <asm/setup.h>
+#include <asm/smp.h>

#include <mach_apic.h>
#ifdef CONFIG_X86_32
--
1.5.6.6


2009-01-11 13:51:49

by Ingo Molnar

[permalink] [raw]
Subject: Re: Build error on latest git


* Jaswinder Singh Rajput <[email protected]> wrote:

> On Sun, 2009-01-11 at 18:36 +0530, Jaswinder Singh Rajput wrote:
> > On Sun, Jan 11, 2009 at 5:27 PM, Petr Titera <[email protected]> wrote:
> > > Going through source it seems to me (still building) that it is caused by
> > > including asm/smp.h only if build with CONFIG_SMP. This patch seems to fix
> > > this
> > >
> > > diff --git a/include/linux/smp.h b/include/linux/smp.h
> > > index b824669..fd51bb9 100644
> > > --- a/include/linux/smp.h
> > > +++ b/include/linux/smp.h
> > > @@ -11,6 +11,8 @@
> > > #include <linux/list.h>
> > > #include <linux/cpumask.h>
> > >
> > > +#include <asm/smp.h>
> > > +
> > > extern void cpu_idle(void);
> > >
> >
> > No, this is wrong.
> >
> > asm/smp.h should only be included when CONFIG_SMP is defined.
> >
> > I will send fix of this.
> >
>
> Here is the temporary fix, later on I will remove non-smp data from
> smp.h
>
> Subject: [PATCH] x86: mpparse.c fix compilation error
>
> Impact: fix compilation error
>
> Signed-off-by: Jaswinder Singh Rajput <[email protected]>
> ---
> arch/x86/kernel/mpparse.c | 1 +
> 1 files changed, 1 insertions(+), 0 deletions(-)

applied to tip/x86/urgent, thanks Jaswinder!

Ingo

2009-01-11 14:54:25

by Petr Titěra

[permalink] [raw]
Subject: Re: Build error on latest git

Hmm that was my first try to fix this. But unfortunatelly it fails in
arch/x86/kernel/apic.c right after that.

Petr

Jaswinder Singh Rajput napsal(a):
> On Sun, 2009-01-11 at 18:36 +0530, Jaswinder Singh Rajput wrote:
>
>> On Sun, Jan 11, 2009 at 5:27 PM, Petr Titera <[email protected]> wrote:
>>
>>> Going through source it seems to me (still building) that it is caused by
>>> including asm/smp.h only if build with CONFIG_SMP. This patch seems to fix
>>> this
>>>
>>> diff --git a/include/linux/smp.h b/include/linux/smp.h
>>> index b824669..fd51bb9 100644
>>> --- a/include/linux/smp.h
>>> +++ b/include/linux/smp.h
>>> @@ -11,6 +11,8 @@
>>> #include <linux/list.h>
>>> #include <linux/cpumask.h>
>>>
>>> +#include <asm/smp.h>
>>> +
>>> extern void cpu_idle(void);
>>>
>>>
>> No, this is wrong.
>>
>> asm/smp.h should only be included when CONFIG_SMP is defined.
>>
>> I will send fix of this.
>>
>>
>
> Here is the temporary fix, later on I will remove non-smp data from
> smp.h
>
> Subject: [PATCH] x86: mpparse.c fix compilation error
>
> Impact: fix compilation error
>
> Signed-off-by: Jaswinder Singh Rajput <[email protected]>
> ---
> arch/x86/kernel/mpparse.c | 1 +
> 1 files changed, 1 insertions(+), 0 deletions(-)
>
> diff --git a/arch/x86/kernel/mpparse.c b/arch/x86/kernel/mpparse.c
> index 8385d4e..79dae60 100644
> --- a/arch/x86/kernel/mpparse.c
> +++ b/arch/x86/kernel/mpparse.c
> @@ -27,6 +27,7 @@
> #include <asm/e820.h>
> #include <asm/trampoline.h>
> #include <asm/setup.h>
> +#include <asm/smp.h>
>
> #include <mach_apic.h>
> #ifdef CONFIG_X86_32
>

2009-01-11 15:07:23

by Jaswinder Singh Rajput

[permalink] [raw]
Subject: Re: Build error on latest git

On Sun, 2009-01-11 at 15:54 +0100, Petr Titera wrote:
> Hmm that was my first try to fix this. But unfortunatelly it fails in
> arch/x86/kernel/apic.c right after that.
>

Ingo, please also apply this to x86/urgent

Subject: [PATCH] x86: fix apic.c build error on latest git

Fix this by reintroducing asm/smp.h include in apic.c - later on
I will fix this by removing non-smp data from smp.h

Signed-off-by: Jaswinder Singh Rajput <[email protected]>
---
arch/x86/kernel/apic.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/arch/x86/kernel/apic.c b/arch/x86/kernel/apic.c
index d2d17b8..b1fd8f6 100644
--- a/arch/x86/kernel/apic.c
+++ b/arch/x86/kernel/apic.c
@@ -48,6 +48,7 @@
#include <asm/proto.h>
#include <asm/apic.h>
#include <asm/i8259.h>
+#include <asm/smp.h>

#include <mach_apic.h>
#include <mach_apicdef.h>
--
1.5.6.6