All of lore.kernel.org
 help / color / mirror / Atom feed
From: Wolfgang Grandegger <wg@domain.hid>
To: xenomai-core <xenomai@xenomai.org>
Subject: [Xenomai-core] Some issues with Xenomai 2.4.x on DENX Linux 2.4.25
Date: Sat, 24 May 2008 20:45:02 +0200	[thread overview]
Message-ID: <4838622E.4020108@domain.hid> (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.

Index: include/asm-generic/wrappers.h
===================================================================
--- include/asm-generic/wrappers.h	(revision 3869)
+++ include/asm-generic/wrappers.h	(working copy)
@@ -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) \
Index: ksrc/arch/generic/compat.c
===================================================================
--- ksrc/arch/generic/compat.c	(revision 3869)
+++ ksrc/arch/generic/compat.c	(working copy)
@@ -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);
 }


             reply	other threads:[~2008-05-24 18:45 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-05-24 18:45 Wolfgang Grandegger [this message]
2008-05-25 16:06 ` [Xenomai-core] Some issues with Xenomai 2.4.x on DENX Linux 2.4.25 Gilles Chanteperdrix

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4838622E.4020108@domain.hid \
    --to=wg@domain.hid \
    --cc=xenomai@xenomai.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.