Skip to contentSkip to conversation

Xenomai broken on Linux 2.4

Xenomai-core Wolfgang Grandegger 4 participants 13 messages Jan 12, 2006 – Jan 13, 2006 Generic include/asm header files

lore
Share & tools
lore
#0 lore raw

Hi Philippe,

I just realized that recent changes in ksrc/arch/powerpc/switch.S have broken the build of Xenomai with linuxppc_2_4_devel on PPC:

#include <asm/offsets.h> does not exist
Symbols like SAVE_NVGPRS do not exist

For the time being, I will stick with an older version for testing RTnet (where I'm currently debugging "floating point used in kernel" errors on the MPC8260),

Thanks.

Wolfgang.

#1 lore raw

Hi Wolfgang,

Quoted 7 lines · Wolfgang Grandegger

Hi Philippe,

I just realized that recent changes in ksrc/arch/powerpc/switch.S have broken the build of Xenomai with linuxppc_2_4_devel on PPC:

#include <asm/offsets.h> does not exist
Symbols like SAVE_NVGPRS do not exist

Ok, thanks for the info. I'm going to fix and check the 2.4/ppc port today.

Quoted 6 lines

For the time being, I will stick with an older version for testing RTnet (where I'm currently debugging "floating point used in kernel" errors on the MPC8260),

Thanks.

Wolfgang.

Signature · 1 line
Philippe.
#2 lore raw
Quoted 11 lines · Philippe Gerum

Hi Wolfgang,

Quoted 5 lines · Wolfgang Grandegger

Hi Philippe,
I just realized that recent changes in ksrc/arch/powerpc/switch.S have broken the build of Xenomai with linuxppc_2_4_devel on PPC:
#include <asm/offsets.h> does not exist
Symbols like SAVE_NVGPRS do not exist

Ok, thanks for the info. I'm going to fix and check the 2.4/ppc port today.

2.6/ppc build fails in the same way. Correcting it to <linux/asm-offsets.h> fixes fixes it.

Stelian.

#3 lore raw
Quoted 14 lines · Stelian Pop
Quoted 11 lines · Philippe Gerum

Hi Wolfgang,

Quoted 5 lines · Wolfgang Grandegger

Hi Philippe,
I just realized that recent changes in ksrc/arch/powerpc/switch.S have broken the build of Xenomai with linuxppc_2_4_devel on PPC:
#include <asm/offsets.h> does not exist
Symbols like SAVE_NVGPRS do not exist

Quoted 5 lines
Quoted 1 line

Ok, thanks for the info. I'm going to fix and check the 2.4/ppc port today.

2.6/ppc build fails in the same way. Correcting it to <linux/asm- offsets.h> fixes fixes it.

Forgot that pre-2.6.14 versions include asm/offsets.h, while post- ones now include asm/asm-offsets. Ok, will fix. Thanks.

Quoted 3 lines

Stelian.

Signature · 1 line
Philippe.
#4 lore raw
In reply to Stelian Pop
Quoted 14 lines · Stelian Pop
Quoted 11 lines · Philippe Gerum

Hi Wolfgang,

Quoted 5 lines · Wolfgang Grandegger

Hi Philippe,
I just realized that recent changes in ksrc/arch/powerpc/switch.S have broken the build of Xenomai with linuxppc_2_4_devel on PPC:
#include <asm/offsets.h> does not exist
Symbols like SAVE_NVGPRS do not exist

Quoted 5 lines
Quoted 1 line

Ok, thanks for the info. I'm going to fix and check the 2.4/ppc port today.

2.6/ppc build fails in the same way. Correcting it to <linux/asm- offsets.h> fixes fixes it.

Fixed.

Quoted 3 lines

Stelian.

Signature · 1 line
Philippe.
#5 lore raw
In reply to Wolfgang Grandegger
Quoted 7 lines · Wolfgang Grandegger

Hi Philippe,

I just realized that recent changes in ksrc/arch/powerpc/switch.S have broken the build of Xenomai with linuxppc_2_4_devel on PPC:

#include <asm/offsets.h> does not exist
Symbols like SAVE_NVGPRS do not exist

Fixed.

Quoted 6 lines

For the time being, I will stick with an older version for testing RTnet (where I'm currently debugging "floating point used in kernel" errors on the MPC8260),

Thanks.

Wolfgang.

Signature · 1 line
Philippe.
#6 lore raw
Quoted 11 lines · Philippe Gerum
Quoted 7 lines · Wolfgang Grandegger

Hi Philippe,

I just realized that recent changes in ksrc/arch/powerpc/switch.S have broken the build of Xenomai with linuxppc_2_4_devel on PPC:

#include <asm/offsets.h> does not exist
Symbols like SAVE_NVGPRS do not exist

Fixed.

Thanks. Attached is a little patch fixing a build problem with Linux 2.6.14 for PowerPC (ocotea, AMCC 440GX). But I'm not sure when exactly the change happened.

Quoted 8 lines
Quoted 6 lines

For the time being, I will stick with an older version for testing RTnet (where I'm currently debugging "floating point used in kernel" errors on the MPC8260),

Thanks.

Wolfgang.

+ diff -u linux-2.6.14-ipipe/include/asm-generic/xenomai/wrappers.h.ORIG1 linux-2.6.14-ipipe/include/asm-generic/xenomai/wrappers.h

include/asm-generic/xenomai/wrappers.h renamed from include/asm-generic/xenomai/wrappers.h.ORIG1 +1 -1
@@ -150,7 +150,7 @@
 /* Device registration */
 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,13)
 #define DECLARE_DEVCLASS(clname) struct class *clname
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,15)
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,14)
 #define wrap_class_device_create class_device_create
 #else /* < 2.6.15 */
 #define wrap_class_device_create(c,p,dt,dv,fmt,args...) class_device_create(c,dt,dv,fmt , ##args)
#7 lore raw
Quoted 8 lines · Wolfgang Grandegger
Quoted 6 lines · Philippe Gerum
Quoted 4 lines · Wolfgang Grandegger

Hi Philippe,

I just realized that recent changes in ksrc/arch/powerpc/switch.S have broken the build of Xenomai with linuxppc_2_4_devel on PPC:

Quoted 9 lines
Quoted 5 lines
Quoted 3 lines

#include <asm/offsets.h> does not exist
Symbols like SAVE_NVGPRS do not exist

Fixed.

Thanks. Attached is a little patch fixing a build problem with Linux 2.6.14 for PowerPC (ocotea, AMCC 440GX). But I'm not sure when exactly the change happened.

Looks like specific to 2.6.14-DENX (kernel.org shows the additional "parent" parameter only starting with 2.6.15).
http://www.denx.de/cgi-bin/gitweb.cgi?p=linux-2.6-denx.git;a=blobdiff;h=a9e72ac3fb9fd066ebc5607bd28cfdd4ba8f010e;hp=95d607a48f06edd22c6be64e0feaf74d1aa63467;hb=3692e2d8099f19a4d1ff95df94cc82b394f86931;f=include/linux/device.h

We likely need to find a way to specifically identify this tree.

Quoted 24 lines
Quoted 8 lines
Quoted 6 lines

For the time being, I will stick with an older version for testing RTnet (where I'm currently debugging "floating point used in kernel" errors on the MPC8260),

Thanks.

Wolfgang.

------------------------------------------------------------------------

+ diff -u linux-2.6.14-ipipe/include/asm-generic/xenomai/wrappers.h.ORIG1 linux-2.6.14-ipipe/include/asm-generic/xenomai/wrappers.h

include/asm-generic/xenomai/wrappers.h renamed from include/asm-generic/xenomai/wrappers.h.ORIG1 +1 -1
@@ -150,7 +150,7 @@
 /* Device registration */
 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,13)
 #define DECLARE_DEVCLASS(clname) struct class *clname
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,15)
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,14)
 #define wrap_class_device_create class_device_create
 #else /* < 2.6.15 */
 #define wrap_class_device_create(c,p,dt,dv,fmt,args...) class_device_create(c,dt,dv,fmt , ##args)
Signature · 1 line
Philippe.
#8 lore raw
Quoted 18 lines · Philippe Gerum
Quoted 16 lines · Wolfgang Grandegger
Quoted 11 lines · Philippe Gerum
Quoted 7 lines · Wolfgang Grandegger

Hi Philippe,

I just realized that recent changes in ksrc/arch/powerpc/switch.S have broken the build of Xenomai with linuxppc_2_4_devel on PPC:

#include <asm/offsets.h> does not exist
Symbols like SAVE_NVGPRS do not exist

Fixed.

Quoted 8 lines
Quoted 2 lines

Thanks. Attached is a little patch fixing a build problem with Linux 2.6.14 for PowerPC (ocotea, AMCC 440GX). But I'm not sure when exactly the change happened.

Looks like specific to 2.6.14-DENX (kernel.org shows the additional "parent" parameter only starting with 2.6.15).
http://www.denx.de/cgi-bin/gitweb.cgi?p=linux-2.6-denx.git;a=blobdiff;h=a9e72ac3fb9fd066ebc5607bd28cfdd4ba8f010e;hp=95d607a48f06edd22c6be64e0feaf74d1aa63467;hb=3692e2d8099f19a4d1ff95df94cc82b394f86931;f=include/linux/device.h

We likely need to find a way to specifically identify this tree.

Well, our 2.6 tree is based on the offical 2.6 tree. Don't know where the difference come from. Maybe Wolfgang can help (he is now on CC).

Quoted 32 lines
Quoted 29 lines
Quoted 9 lines
Quoted 7 lines

For the time being, I will stick with an older version for testing RTnet (where I'm currently debugging "floating point used in kernel" errors on the MPC8260),

Thanks.

Wolfgang.

------------------------------------------------------------------------

+ diff -u
linux-2.6.14-ipipe/include/asm-generic/xenomai/wrappers.h.ORIG1 linux-2.6.14-ipipe/include/asm-generic/xenomai/wrappers.h --- linux-2.6.14-ipipe/include/asm-generic/xenomai/wrappers.h.ORIG1

2006-01-12 16:13:28.958070000 +0100
+++ linux-2.6.14-ipipe/include/asm-generic/xenomai/wrappers.h    
2006-01-12 16:56:08.623129271 +0100
include/asm-generic/xenomai/wrappers.h renamed from include/asm-generic/xenomai/wrappers.h.ORIG1 +1 -1
@@ -150,7 +150,7 @@
 /* Device registration */
 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,13)
 #define DECLARE_DEVCLASS(clname) struct class *clname
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,15)
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,14)
 #define wrap_class_device_create class_device_create
 #else /* < 2.6.15 */
 #define wrap_class_device_create(c,p,dt,dv,fmt,args...) 

class_device_create(c,dt,dv,fmt , ##args)

#9 lore raw
Quoted 3 lines · In message <[email protected]> you wrote:

Well, our 2.6 tree is based on the offical 2.6 tree. Don't know where the difference come from. Maybe Wolfgang can help (he is now on CC).

I'm subscribed, too.

We added some patches (especially 4xx network driver related) to our tree long before they were accepted and merged into Linus' tree.

Does this answer the question? [Or what exactly is the problem?]

Best regards,

Wolfgang Denk

Signature · 6 lines
Software Engineering:  Embedded and Realtime Systems,  Embedded Linux
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: [email protected]
Digital computers are themselves more complex than most things people
build: They have very large numbers of states. This makes conceiving,
describing, and testing them hard. Software systems  have  orders-of-
magnitude more states than computers do.           - Fred Brooks, Jr.
#10 lore raw
Quoted 5 lines · Wolfgang Denk
Quoted 1 line · In message <[email protected]> you wrote:

Well, our 2.6 tree is based on the offical 2.6 tree. Don't know where the difference come from. Maybe Wolfgang can help (he is now on CC).

Quoted 7 lines

I'm subscribed, too.

We added some patches (especially 4xx network driver related) to our tree long before they were accepted and merged into Linus' tree.

Does this answer the question? [Or what exactly is the problem?]

We try to find a way to wrap class_device_create properly depending on the kernel version Xeno is compiled against. The parent device class argument in this call (2nd in order) seems to show up in 2.6.15 for kernel.org, but 2.6.14-denx-git has it too. So we have a problem relying on the version sublevel.

Quoted 4 lines

Best regards,

Wolfgang Denk

Signature · 1 line
Philippe.
#11 lore raw

Dear Philippe,

Quoted 5 lines · in message <[email protected]> you wrote:

We try to find a way to wrap class_device_create properly depending on the kernel version Xeno is compiled against. The parent device class argument in this call (2nd in order) seems to show up in 2.6.15 for kernel.org, but 2.6.14-denx-git has it too. So we have a problem relying on the version sublevel.

I see. Well, I feel honored, but the reference in such cases should always be Linus' tree (i. e. the "official" kernel.org tree). Xenomai cannot and should not have to be considerate of all the N vendor kernel trees that exist out there in the wild...

And if some user should use our old 2.6.14 tree and run into problems we can just tell him to use current code - so no problem here, either.

Please use kernel.org as reference (and remember that decision in case other vendors should come urging you).

Best regards,

Wolfgang Denk

Signature · 4 lines
Software Engineering:  Embedded and Realtime Systems,  Embedded Linux
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: [email protected]
"Unix is simple, but it takes a genius to understand the simplicity."
					             - Dennis Ritchie
#12 lore raw
Quoted 12 lines · Wolfgang Denk

Dear Philippe,

Quoted 1 line · in message <[email protected]> you wrote:

We try to find a way to wrap class_device_create properly depending on the kernel version Xeno is compiled against. The parent device class argument in this call (2nd in order) seems to show up in 2.6.15 for kernel.org, but 2.6.14-denx-git has it too. So we have a problem relying on the version sublevel.

I see. Well, I feel honored, but the reference in such cases should always be Linus' tree (i. e. the "official" kernel.org tree). Xenomai cannot and should not have to be considerate of all the N vendor kernel trees that exist out there in the wild...

Quoted 6 lines

And if some user should use our old 2.6.14 tree and run into problems we can just tell him to use current code - so no problem here, either.

Please use kernel.org as reference (and remember that decision in case other vendors should come urging you).

Philippe, for some (yet) unknown reasons the trees are not in sync but they should in respect to include/linux/device.h. Well, lets simply ignore this problem for Xenomai.

Thanks.

Wolfgang.

Quoted 4 lines

Best regards,

Wolfgang Denk