Skip to contentSkip to conversation

2.6.0-test9-mm5 : compile error

DISCUSSION Remi Colinet 2 participants 8 messages Nov 22, 2003 – Nov 24, 2003 Bitmap API

lore
Share & tools
lore
#0 lore raw

Hi,

Any idea about this error?

 CC      lib/rwsem.o
 CC      lib/string.o
 CC      lib/vsprintf.o
 AR      lib/lib.a
 LD      arch/i386/lib/built-in.o
 AS      arch/i386/lib/checksum.o
 CC      arch/i386/lib/dec_and_lock.o
 CC      arch/i386/lib/delay.o
 AS      arch/i386/lib/getuser.o
 CC      arch/i386/lib/iodebug.o
 CC      arch/i386/lib/kgdb_serial.o
 CC      arch/i386/lib/memcpy.o
 CC      arch/i386/lib/strstr.o
 CC      arch/i386/lib/usercopy.o
 AR      arch/i386/lib/lib.a
 GEN     .version
 CHK     include/linux/compile.h
 UPD     include/linux/compile.h
 CC      init/version.o
 LD      init/built-in.o
 LD      .tmp_vmlinux1

arch/i386/oprofile/built-in.o: In function `oprofile_reset_stats':
/usr/src/mm/include/asm/bitops.h:251: undefined reference to cpu_possible_map' arch/i386/oprofile/built-in.o: In function oprofile_create_stats_files':
/usr/src/mm/include/asm/bitops.h:251: undefined reference to `cpu_possible_map'
make: *** [.tmp_vmlinux1] Error 1

grep SMP .config
CONFIG_BROKEN_ON_SMP=y
# CONFIG_X86_BIGSMP is not set
CONFIG_SMP=y
CONFIG_X86_FIND_SMP_CONFIG=y
CONFIG_X86_SMP=y

grep OPROFILE .config
CONFIG_OPROFILE=y

Remi

#1 lore raw
Quoted 7 lines · Remi Colinet

arch/i386/oprofile/built-in.o: In function `oprofile_reset_stats':
/usr/src/mm/include/asm/bitops.h:251: undefined reference to `cpu_possible_map'
arch/i386/oprofile/built-in.o: In function `oprofile_create_stats_files':
/usr/src/mm/include/asm/bitops.h:251: undefined reference to `cpu_possible_map'
make: *** [.tmp_vmlinux1] Error 1

Index: linux-2.6.0-test9-mm5/arch/i386/kernel/process.c
===================================================================
RCS file: /build/cvsroot/linux-2.6.0-test9-mm5/arch/i386/kernel/process.c,v retrieving revision 1.1.1.1

arch/i386/kernel/process.c +1 -0
diff -u -p -B -r1.1.1.1 process.c
@@ -50,6 +50,7 @@
 #include <asm/desc.h>
 #include <asm/tlbflush.h>
 #include <asm/cpu.h>
+#include <asm/atomic_kmap.h>
 #ifdef CONFIG_MATH_EMULATION
 #include <asm/math_emu.h>
 #endif

Index: linux-2.6.0-test9-mm5/drivers/oprofile/oprofile_stats.c
===================================================================
RCS file: /build/cvsroot/linux-2.6.0-test9-mm5/drivers/oprofile/oprofile_stats.c,v retrieving revision 1.1.1.1

drivers/oprofile/oprofile_stats.c +2 -1
diff -u -p -B -r1.1.1.1 oprofile_stats.c
@@ -10,7 +10,8 @@
 #include <linux/oprofile.h>
 #include <linux/cpumask.h>
 #include <linux/threads.h>
- 
+#include <linux/smp.h>
+
 #include "oprofile_stats.h"
 #include "cpu_buffer.h"
  

Index: linux-2.6.0-test9-mm5/include/linux/cpumask.h
===================================================================
RCS file: /build/cvsroot/linux-2.6.0-test9-mm5/include/linux/cpumask.h,v retrieving revision 1.1.1.1

include/linux/cpumask.h +1 -2
diff -u -p -B -r1.1.1.1 cpumask.h
@@ -39,9 +39,8 @@ typedef unsigned long cpumask_t;
 
 
 #ifdef CONFIG_SMP
-
+#include <asm/smp.h>
 extern cpumask_t cpu_online_map;
-extern cpumask_t cpu_possible_map;
 
 #define num_online_cpus()		cpus_weight(cpu_online_map)
 #define cpu_online(cpu)			cpu_isset(cpu, cpu_online_map)
#2 lore raw
Quoted 55 lines · Zwane Mwaikambo
Quoted 7 lines · Remi Colinet

arch/i386/oprofile/built-in.o: In function `oprofile_reset_stats':
/usr/src/mm/include/asm/bitops.h:251: undefined reference to cpu_possible_map' arch/i386/oprofile/built-in.o: In function oprofile_create_stats_files':
/usr/src/mm/include/asm/bitops.h:251: undefined reference to `cpu_possible_map'
make: *** [.tmp_vmlinux1] Error 1

Index: linux-2.6.0-test9-mm5/arch/i386/kernel/process.c
===================================================================
RCS file: /build/cvsroot/linux-2.6.0-test9-mm5/arch/i386/kernel/process.c,v retrieving revision 1.1.1.1
diff -u -p -B -r1.1.1.1 process.c

arch/i386/kernel/process.c +1 -0
@@ -50,6 +50,7 @@
 #include <asm/desc.h>
 #include <asm/tlbflush.h>
 #include <asm/cpu.h>
+#include <asm/atomic_kmap.h>
 #ifdef CONFIG_MATH_EMULATION
 #include <asm/math_emu.h>
 #endif

Index: linux-2.6.0-test9-mm5/drivers/oprofile/oprofile_stats.c
===================================================================
RCS file: /build/cvsroot/linux-2.6.0-test9-mm5/drivers/oprofile/oprofile_stats.c,v retrieving revision 1.1.1.1
diff -u -p -B -r1.1.1.1 oprofile_stats.c

drivers/oprofile/oprofile_stats.c +2 -1
@@ -10,7 +10,8 @@
 #include <linux/oprofile.h>
 #include <linux/cpumask.h>
 #include <linux/threads.h>
- 
+#include <linux/smp.h>
+
 #include "oprofile_stats.h"
 #include "cpu_buffer.h"
 

Index: linux-2.6.0-test9-mm5/include/linux/cpumask.h
===================================================================
RCS file: /build/cvsroot/linux-2.6.0-test9-mm5/include/linux/cpumask.h,v retrieving revision 1.1.1.1
diff -u -p -B -r1.1.1.1 cpumask.h

include/linux/cpumask.h typedef unsigned long cpumask_t; · line 46

Quoted 10 lines
include/linux/cpumask.h +1 -2
@@ -39,9 +39,8 @@ typedef unsigned long cpumask_t;
 
 
 #ifdef CONFIG_SMP
-
+#include <asm/smp.h>
 extern cpumask_t cpu_online_map;
-extern cpumask_t cpu_possible_map;
 
 #define num_online_cpus()		cpus_weight(cpu_online_map)
 #define cpu_online(cpu)			cpu_isset(cpu, cpu_online_map)

It compiles completely. :-)

Just a point : in the file arch/i383/process.c, I added the following lines.

#include <asm/tlbflush.h>
#include <asm/cpu.h>

My original processs.c file seems to be a little be bit different from yours (?). The following line was already in the process.c file.

+#include <asm/atomic_kmap.h>

Thanks
Rémi

#3 lore raw
Quoted 19 lines · Remi Colinet
Quoted 8 lines

Index: linux-2.6.0-test9-mm5/arch/i386/kernel/process.c
===================================================================
RCS file: /build/cvsroot/linux-2.6.0-test9-mm5/arch/i386/kernel/process.c,v retrieving revision 1.1.1.1
diff -u -p -B -r1.1.1.1 process.c

arch/i386/kernel/process.c line 56

Quoted 7 lines
arch/i386/kernel/process.c +1 -0
@@ -50,6 +50,7 @@
 #include <asm/desc.h>
 #include <asm/tlbflush.h>
 #include <asm/cpu.h>
+#include <asm/atomic_kmap.h>
 #ifdef CONFIG_MATH_EMULATION
 #include <asm/math_emu.h>
 #endif

Just a point : in the file arch/i383/process.c, I added the following lines.

Quoted 2 lines

#include <asm/tlbflush.h>
#include <asm/cpu.h>

That was already in there.

Quoted 5 lines

My original processs.c file seems to be a little be bit different from yours (?).
The following line was already in the process.c file.

+#include <asm/atomic_kmap.h>

Hmm that's strange, can you verify your tree and i'll do the same. There are two discrepancies.

#4 lore raw
Quoted 35 lines · Zwane Mwaikambo
Quoted 19 lines · Remi Colinet
Quoted 10 lines

Index: linux-2.6.0-test9-mm5/arch/i386/kernel/process.c
===================================================================
RCS file: /build/cvsroot/linux-2.6.0-test9-mm5/arch/i386/kernel/process.c,v retrieving revision 1.1.1.1
diff -u -p -B -r1.1.1.1 process.c

arch/i386/kernel/process.c line 56

Quoted 7 lines
arch/i386/kernel/process.c +1 -0
@@ -50,6 +50,7 @@
 #include <asm/desc.h>
 #include <asm/tlbflush.h>
 #include <asm/cpu.h>
+#include <asm/atomic_kmap.h>
 #ifdef CONFIG_MATH_EMULATION
 #include <asm/math_emu.h>
 #endif

Just a point : in the file arch/i383/process.c, I added the following lines.

Quoted 4 lines

#include <asm/tlbflush.h>
#include <asm/cpu.h>

That was already in there.

Quoted 3 lines

My original processs.c file seems to be a little be bit different from yours (?). The following line was already in the process.c file.

Quoted 7 lines
Quoted 3 lines

+#include <asm/atomic_kmap.h>

Hmm that's strange, can you verify your tree and i'll do the same. There are two discrepancies. -

I have dowloaded linux-2.6.0-test9.tar.bz2 and 2.6.0-test9-mm5.bz2. Here is the begining of my arch/i386/kernel/process.c file after applying the mm patch :

40
41 #include <asm/uaccess.h>
42 #include <asm/pgtable.h>
43 #include <asm/system.h>
44 #include <asm/io.h>
45 #include <asm/ldt.h>
46 #include <asm/processor.h>
47 #include <asm/i387.h>
48 #include <asm/irq.h>
49 #include <asm/desc.h>
50 #include <asm/atomic_kmap.h>
51 #ifdef CONFIG_MATH_EMULATION
52 #include <asm/math_emu.h>
53 #endif
54
55 #include <linux/irq.h>
56 #include <linux/err.h>
57

The following line

#include <asm/atomic_kmap.h>

is in 2.6.0-test9-mm5 and not in 2.6.0-test9[-bk25]

These following lines are neither in bk or mm trees.

#include <asm/tlbflush.h>
#include <asm/cpu.h>

Remi

#5 lore raw
Quoted 5 lines · Remi Colinet
Quoted 1 line · Zwane Mwaikambo

I have dowloaded linux-2.6.0-test9.tar.bz2 and 2.6.0-test9-mm5.bz2. Here is the begining of my arch/i386/kernel/process.c file after applying the mm patch :

Thanks for verifying that, the error was in my auto cvs import script. It seems to have generated rejects. I presume the following patch would suffice (including your other changes)?

Index: linux-2.6.0-test9-mm5/drivers/oprofile/oprofile_stats.c
===================================================================
RCS file: /build/cvsroot/linux-2.6.0-test9-mm5/drivers/oprofile/oprofile_stats.c,v retrieving revision 1.1.1.1

drivers/oprofile/oprofile_stats.c +2 -1
diff -u -p -B -r1.1.1.1 oprofile_stats.c
@@ -10,7 +10,8 @@
 #include <linux/oprofile.h>
 #include <linux/cpumask.h>
 #include <linux/threads.h>
- 
+#include <linux/smp.h>
+
 #include "oprofile_stats.h"
 #include "cpu_buffer.h"
  

Index: linux-2.6.0-test9-mm5/include/linux/cpumask.h
===================================================================
RCS file: /build/cvsroot/linux-2.6.0-test9-mm5/include/linux/cpumask.h,v retrieving revision 1.1.1.1

include/linux/cpumask.h +1 -2
diff -u -p -B -r1.1.1.1 cpumask.h
@@ -39,9 +39,8 @@ typedef unsigned long cpumask_t;
 
 
 #ifdef CONFIG_SMP
-
+#include <asm/smp.h>
 extern cpumask_t cpu_online_map;
-extern cpumask_t cpu_possible_map;
 
 #define num_online_cpus()		cpus_weight(cpu_online_map)
 #define cpu_online(cpu)			cpu_isset(cpu, cpu_online_map)
#6 lore raw

Zwane Mwaikambo wrote

Quoted 39 lines

Thanks for verifying that, the error was in my auto cvs import script. It seems to have generated rejects. I presume the following patch would suffice (including your other changes)?

Index: linux-2.6.0-test9-mm5/drivers/oprofile/oprofile_stats.c
===================================================================
RCS file: /build/cvsroot/linux-2.6.0-test9-mm5/drivers/oprofile/oprofile_stats.c,v retrieving revision 1.1.1.1
diff -u -p -B -r1.1.1.1 oprofile_stats.c

drivers/oprofile/oprofile_stats.c +2 -1
@@ -10,7 +10,8 @@
 #include <linux/oprofile.h>
 #include <linux/cpumask.h>
 #include <linux/threads.h>
- 
+#include <linux/smp.h>
+
 #include "oprofile_stats.h"
 #include "cpu_buffer.h"
 

Index: linux-2.6.0-test9-mm5/include/linux/cpumask.h
===================================================================
RCS file: /build/cvsroot/linux-2.6.0-test9-mm5/include/linux/cpumask.h,v retrieving revision 1.1.1.1
diff -u -p -B -r1.1.1.1 cpumask.h

include/linux/cpumask.h +1 -3
@@ -39,9 +39,8 @@ typedef unsigned long cpumask_t;
 
 
 #ifdef CONFIG_SMP
-
+#include <asm/smp.h>
 extern cpumask_t cpu_online_map;
-extern cpumask_t cpu_possible_map;
 
 #define num_online_cpus()		cpus_weight(cpu_online_map)
 #define cpu_online(cpu)			cpu_isset(cpu, cpu_online_map)
-
Quoted 7 lines

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

It is ok for me.

Thanks
Remi

#7 lore raw
In reply to Remi Colinet
Quoted 8 lines · Remi Colinet

#include <asm/tlbflush.h>
#include <asm/cpu.h>

My original processs.c file seems to be a little be bit different from yours (?).
The following line was already in the process.c file.

+#include <asm/atomic_kmap.h>

Yes i appear to have botched my local -mm5 tree.

Thanks for testing it,
Zwane