Skip to contentSkip to conversation

Some issues with Xenomai 2.4.x on DENX Linux 2.4.25

Xenomai-core Applied Wolfgang Grandegger 2 participants 2 messages May 24, 2008 – May 25, 2008

lore
Share & tools
lore
#0 lore raw

Hello,

the patch below fixes some issues with cross compiling the DENX linuxppc_2_4_devel tree (2.4.25) for the MPC5200. I think they are present on Xenomai trunk as well (and even a few more).

Wolfgang.

asm-generic/wrappers.h +5 -0
Index: include/asm-generic/wrappers.h
===================================================================
@@ -34,6 +34,7 @@
 #include <linux/wrapper.h>
 #include <linux/wait.h>
 #include <linux/sched.h>
+#include <linux/bitops.h>
 #include <linux/moduleparam.h>	/* Use the backport. */
 
 /* Compiler */
@@ -186,6 +187,10 @@ void show_stack(struct task_struct *task
 #define __deprecated  __attribute__((deprecated))
 #endif
 
+#ifndef BITOP_WORD
+#define BITOP_WORD(nr)	((nr) / BITS_PER_LONG)
+#endif
+
 #else /* LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0) */
 
 #define compat_module_param_array(name, type, count, perm) \
arch/generic/compat.c +3 -2
Index: ksrc/arch/generic/compat.c
===================================================================
@@ -1,3 +1,4 @@
+#include <asm/xenomai/wrappers.h>
 #include <linux/sched.h>
 #include <linux/completion.h>
 #include <linux/unistd.h>
@@ -108,7 +109,7 @@ EXPORT_SYMBOL(kthread_create);
 EXPORT_SYMBOL(kthread_should_stop);
 EXPORT_SYMBOL(kthread_stop);
 
-static inline unsigned long __ffs(unsigned long word)
+static inline unsigned long __ffs_compat(unsigned long word)
 {
 	if ((unsigned)(word))
 		return ffs(word) - 1;
@@ -157,5 +158,5 @@ found_first:
         if (tmp == 0UL)         /* Are any bits set? */
                 return result + size;   /* Nope. */
 found_middle:
-        return result + __ffs(tmp);
+        return result + __ffs_compat(tmp);
 }
#1 lore raw
Quoted 6 lines · Wolfgang Grandegger

Hello,

the patch below fixes some issues with cross compiling the DENX linuxppc_2_4_devel tree (2.4.25) for the MPC5200. I think they are present on Xenomai trunk as well (and even a few more).

Applied, thanks.

Signature · 1 line
					    Gilles.