2003-11-22 12:48:06

by Remi Colinet

[permalink] [raw]
Subject: 2.6.0-test9-mm5 : compile error

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



2003-11-22 14:48:23

by Zwane Mwaikambo

[permalink] [raw]
Subject: Re: 2.6.0-test9-mm5 : compile error

On Sat, 22 Nov 2003, Remi Colinet wrote:

> 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
--- linux-2.6.0-test9-mm5/arch/i386/kernel/process.c 21 Nov 2003 20:59:15 -0000 1.1.1.1
+++ linux-2.6.0-test9-mm5/arch/i386/kernel/process.c 21 Nov 2003 22:20:00 -0000
@@ -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
--- linux-2.6.0-test9-mm5/drivers/oprofile/oprofile_stats.c 21 Nov 2003 20:59:40 -0000 1.1.1.1
+++ linux-2.6.0-test9-mm5/drivers/oprofile/oprofile_stats.c 21 Nov 2003 21:27:44 -0000
@@ -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
--- linux-2.6.0-test9-mm5/include/linux/cpumask.h 21 Nov 2003 20:59:57 -0000 1.1.1.1
+++ linux-2.6.0-test9-mm5/include/linux/cpumask.h 21 Nov 2003 21:52:39 -0000
@@ -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)

2003-11-22 17:10:17

by Remi Colinet

[permalink] [raw]
Subject: Re: 2.6.0-test9-mm5 : compile error

Zwane Mwaikambo wrote:

>On Sat, 22 Nov 2003, Remi Colinet wrote:
>
>
>
>>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
>--- linux-2.6.0-test9-mm5/arch/i386/kernel/process.c 21 Nov 2003 20:59:15 -0000 1.1.1.1
>+++ linux-2.6.0-test9-mm5/arch/i386/kernel/process.c 21 Nov 2003 22:20:00 -0000
>@@ -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
>--- linux-2.6.0-test9-mm5/drivers/oprofile/oprofile_stats.c 21 Nov 2003 20:59:40 -0000 1.1.1.1
>+++ linux-2.6.0-test9-mm5/drivers/oprofile/oprofile_stats.c 21 Nov 2003 21:27:44 -0000
>@@ -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
>--- linux-2.6.0-test9-mm5/include/linux/cpumask.h 21 Nov 2003 20:59:57 -0000 1.1.1.1
>+++ linux-2.6.0-test9-mm5/include/linux/cpumask.h 21 Nov 2003 21:52:39 -0000
>@@ -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


2003-11-22 17:21:48

by Zwane Mwaikambo

[permalink] [raw]
Subject: Re: 2.6.0-test9-mm5 : compile error

On Sat, 22 Nov 2003, Remi Colinet wrote:

> >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
> >--- linux-2.6.0-test9-mm5/arch/i386/kernel/process.c 21 Nov 2003 20:59:15 -0000 1.1.1.1
> >+++ linux-2.6.0-test9-mm5/arch/i386/kernel/process.c 21 Nov 2003 22:20:00 -0000
> >@@ -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.
>
> #include <asm/tlbflush.h>
> #include <asm/cpu.h>

That was already in there.

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

2003-11-22 18:05:32

by Remi Colinet

[permalink] [raw]
Subject: Re: 2.6.0-test9-mm5 : compile error

Zwane Mwaikambo wrote:

>On Sat, 22 Nov 2003, Remi Colinet wrote:
>
>
>
>>>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
>>>--- linux-2.6.0-test9-mm5/arch/i386/kernel/process.c 21 Nov 2003 20:59:15 -0000 1.1.1.1
>>>+++ linux-2.6.0-test9-mm5/arch/i386/kernel/process.c 21 Nov 2003 22:20:00 -0000
>>>@@ -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.
>>
>>#include <asm/tlbflush.h>
>>#include <asm/cpu.h>
>>
>>
>
>That was already in there.
>
>
>
>>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.
>-
>
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

2003-11-22 19:41:11

by Zwane Mwaikambo

[permalink] [raw]
Subject: Re: 2.6.0-test9-mm5 : compile error

On Sat, 22 Nov 2003, Remi Colinet wrote:

> Zwane Mwaikambo wrote:
> >
> 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
diff -u -p -B -r1.1.1.1 oprofile_stats.c
--- linux-2.6.0-test9-mm5/drivers/oprofile/oprofile_stats.c 21 Nov 2003 20:59:40 -0000 1.1.1.1
+++ linux-2.6.0-test9-mm5/drivers/oprofile/oprofile_stats.c 21 Nov 2003 21:27:44 -0000
@@ -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
--- linux-2.6.0-test9-mm5/include/linux/cpumask.h 21 Nov 2003 20:59:57 -0000 1.1.1.1
+++ linux-2.6.0-test9-mm5/include/linux/cpumask.h 21 Nov 2003 21:52:39 -0000
@@ -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)

2003-11-24 11:13:02

by Remi Colinet

[permalink] [raw]
Subject: Re: 2.6.0-test9-mm5 : compile error

Zwane Mwaikambo wrote

>
>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
>--- linux-2.6.0-test9-mm5/drivers/oprofile/oprofile_stats.c 21 Nov 2003 20:59:40 -0000 1.1.1.1
>+++ linux-2.6.0-test9-mm5/drivers/oprofile/oprofile_stats.c 21 Nov 2003 21:27:44 -0000
>@@ -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
>--- linux-2.6.0-test9-mm5/include/linux/cpumask.h 21 Nov 2003 20:59:57 -0000 1.1.1.1
>+++ linux-2.6.0-test9-mm5/include/linux/cpumask.h 21 Nov 2003 21:52:39 -0000
>@@ -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)
>-
>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


2003-11-24 22:42:10

by Zwane Mwaikambo

[permalink] [raw]
Subject: Re: 2.6.0-test9-mm5 : compile error

On Sat, 22 Nov 2003, Remi Colinet wrote:

> #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