Skip to contentSkip to conversation

Compile-time error with xenomai x86_64 port (probably dualcore related)

Xenomai-help Matthias Scheer 3 participants 8 messages Feb 27, 2007 – Feb 28, 2007

lore
Share & tools
lore
#0 lore raw

Dear developers,

I'm trying to compile the latest /trunk version together with the adeos x86_64 patch v1.00.04. The kernel version is 2.6.19.5. The compiling is done on an Athlon 64 X2 and stops with these error messages:

CC kernel/xenomai/nucleus/pod.o
kernel/xenomai/nucleus/pod.c:944:48: error: macro "cpus_equal" passed 3 arguments, but takes just 2
kernel/xenomai/nucleus/pod.c: In function ‘xnpod_start_thread’:
kernel/xenomai/nucleus/pod.c:944: error: ‘cpus_equal’ undeclared (first use in this function)
kernel/xenomai/nucleus/pod.c:944: error: (Each undeclared identifier is reported only once
kernel/xenomai/nucleus/pod.c:944: error: for each function it appears in.)

Notice the _macro "cpus_equal"_ error, which eventually uses the identifier CPU_MASK_ALL which contains more than one element on a dualcore system. Does this explanation make sense? And is there a easy way to fix it? (maybe with a variable number of arguments)

Thanks for your time,
Matthias Scheer

#1 lore raw
Quoted 16 lines · Matthias Scheer

Dear developers,

I'm trying to compile the latest /trunk version together with the adeos x86_64 patch v1.00.04. The kernel version is 2.6.19.5. The compiling is done on an Athlon 64 X2 and stops with these error messages:

CC kernel/xenomai/nucleus/pod.o
kernel/xenomai/nucleus/pod.c:944:48: error: macro "cpus_equal" passed 3 arguments, but takes just 2
kernel/xenomai/nucleus/pod.c: In function ‘xnpod_start_thread’:
kernel/xenomai/nucleus/pod.c:944: error: ‘cpus_equal’ undeclared (first use in this function)
kernel/xenomai/nucleus/pod.c:944: error: (Each undeclared identifier is reported only once
kernel/xenomai/nucleus/pod.c:944: error: for each function it appears in.)

Quoted 5 lines

Notice the _macro "cpus_equal"_ error, which eventually uses the identifier CPU_MASK_ALL which contains more than one element on a dualcore system. Does this explanation make sense? And is there a easy way to fix it? (maybe with a variable number of arguments)

Does this help?

asm-generic/system.h (Arbeitskopie) renamed from asm-generic/system.h (Revision 2262) +1 -0
@@ -32,6 +32,7 @@
 #include <linux/errno.h>
 #include <linux/vmalloc.h>
 #include <linux/mm.h>
+#include <linux/cpumask.h>
 #include <asm/uaccess.h>
 #include <asm/param.h>
 #include <asm/mmu_context.h>

[At least it is cleaner than relying on cpumask.h being implicitly included.]

Jan

#2 lore raw

Hi, thanx for the reply,

I'm sorry but including linux/cpumask.h doesn't fix the problem. The error stays the same. Any more tips?

Matthias Scheer

Quoted 19 lines
Quoted 3 lines

I'm trying to compile the latest /trunk version together with the adeos x86_64 patch v1.00.04. The kernel version is 2.6.19.5. The compiling is done on an Athlon 64 X2 and stops with these error messages:

Does this help?

asm-generic/system.h (Arbeitskopie) renamed from asm-generic/system.h (Revision 2262) +1 -0
@@ -32,6 +32,7 @@
 #include <linux/errno.h>
 #include <linux/vmalloc.h>
 #include <linux/mm.h>
+#include <linux/cpumask.h>
 #include <asm/uaccess.h>
 #include <asm/param.h>
 #include <asm/mmu_context.h>

[At least it is cleaner than relying on cpumask.h being implicitly included.]

#3 lore raw
Quoted 4 lines · Matthias Scheer

Hi, thanx for the reply,

I'm sorry but including linux/cpumask.h doesn't fix the problem. The error stays the same. Any more tips?

Please post your .config then.

Jan

#4 lore raw
Quoted 4 lines · Jan Kiszka
Quoted 2 lines
Quoted 1 line

I'm sorry but including linux/cpumask.h doesn't fix the problem. The

error stays the same. Any more tips?

Please post your .config then.

Using a clean defconfig together with your patch fixed it.

Thanx again.

#5 lore raw
Quoted 8 lines · Matthias Scheer
Quoted 4 lines · Jan Kiszka
Quoted 2 lines
Quoted 1 line

I'm sorry but including linux/cpumask.h doesn't fix the problem. The

error stays the same. Any more tips?

Please post your .config then.

Using a clean defconfig together with your patch fixed it.

Does the bug trigger again if you remove the patch while retaining your defconfig?

Quoted 5 lines

Thanx again.
_______________________________________________
Xenomai-help mailing list
[email protected]
https://mail.gna.org/listinfo/xenomai-help

Signature · 1 line
Philippe.
#6 lore raw
Quoted 4 lines · Philippe Gerum
Quoted 1 line

Using a clean defconfig together with your patch fixed it.

Does the bug trigger again if you remove the patch while retaining your defconfig?

It seems the patch wasn't causing any different behaviour, as the bug doesn't reappear. I'm going to enable options step by step to see which one triggered the bug in the first place.

I'll let you guys know.

Matthias

#7 lore raw
Quoted 5 lines · Matthias Scheer

It seems the patch wasn't causing any different behaviour, as the bug doesn't reappear. I'm going to enable options step by step to see which one triggered the bug in the first place.

I'll let you guys know.

CONFIG_NR_CPUS was set too high (128). After reducing the number to 32, compilation of pod.o succeeds.

Matthias