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
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
include/linux/smp.h +0 -0
@@ -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):
Quoted 27 lines
Hello,
I'm getting this build error in
arch/x86/kernel/mpparse.cusing 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 oncearch/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 2Petr Titera
Quoted 9 lines · Petr Titera
Going through source it seems to me (still building) that it is caused by including
asm/smp.honly if build withCONFIG_SMP. This patch seems to fix thisinclude/linux/smp.h +0
-0
include/linux/smp.h line 17
Quoted 7 lines
include/linux/smp.h +2
-0@@ -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
Quoted 20 lines · Jaswinder Singh Rajput
Quoted 9 lines · Petr Titera
Going through source it seems to me (still building) that it is caused by including
asm/smp.honly if build withCONFIG_SMP. This patch seems to fix thisinclude/linux/smp.h +0
-0include/linux/smp.h line 17
Quoted 7 lines
include/linux/smp.h +2
-0@@ -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.
Quoted 4 lines
asm/smp.hshould only be included whenCONFIG_SMPis 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
--- arch/x86/kernel/mpparse.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)
arch/x86/kernel/mpparse.c +1 -0
@@ -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
Signature · 1 line
1.5.6.6
Ingo Molnar
AppliedQuoted 29 lines · Jaswinder Singh Rajput
Quoted 20 lines · Jaswinder Singh Rajput
Quoted 9 lines · Petr Titera
Going through source it seems to me (still building) that it is caused by including
asm/smp.honly if build withCONFIG_SMP. This patch seems to fix thisinclude/linux/smp.h +0
-0include/linux/smp.h line 17
Quoted 7 lines
include/linux/smp.h +2
-0@@ -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.
Quoted 4 lines
asm/smp.hshould only be included whenCONFIG_SMPis defined.I will send fix of this.
Here is the temporary fix, later on I will remove non-smp data from
smp.h
Quoted 8 lines
Subject: [PATCH] x86:
mpparse.cfix compilation errorImpact: 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
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):
Quoted 54 lines · Jaswinder Singh Rajput
Quoted 22 lines · Petr Titera
Quoted 10 lines
Going through source it seems to me (still building) that it is caused by including
asm/smp.honly if build withCONFIG_SMP. This patch seems to fix thisinclude/linux/smp.h +0
-0include/linux/smp.h line 18
Quoted 8 lines
include/linux/smp.h +2
-0@@ -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.
Quoted 5 lines
asm/smp.hshould only be included whenCONFIG_SMPis defined.I will send fix of this.
Here is the temporary fix, later on I will remove non-smp data from
smp.hSubject: [PATCH] x86:
mpparse.cfix compilation errorImpact: fix compilation error
Signed-off-by Jaswinder Singh Rajput <[email protected]>--- arch/x86/kernel/mpparse.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)arch/x86/kernel/mpparse.c +1
-0@@ -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
Quoted 3 lines · Petr Titera
Hmm that was my first try to fix this. But unfortunatelly it fails in
arch/x86/kernel/apic.cright 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
--- arch/x86/kernel/apic.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)
arch/x86/kernel/apic.c +1 -0
@@ -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>
Signature · 1 line
1.5.6.6