Module: xenomai-2.6
Branch: master
Commit: d7f7e99ea19eb0dc13b1e02e633ec53ac9b89475
URL:    
http://git.xenomai.org/?p=xenomai-2.6.git;a=commit;h=d7f7e99ea19eb0dc13b1e02e633ec53ac9b89475

Author: Gilles Chanteperdrix <gilles.chanteperd...@xenomai.org>
Date:   Thu Nov  6 00:26:41 2014 +0100

hal: fixups for kernel 3.16

---

 include/asm-arm/hal.h          |    2 +-
 include/asm-arm/wrappers.h     |   13 ++++++++++++-
 include/asm-generic/wrappers.h |    8 ++++++--
 include/rtdm/rtdm_driver.h     |    2 +-
 ksrc/arch/arm/hal.c            |    3 +--
 5 files changed, 21 insertions(+), 7 deletions(-)

diff --git a/include/asm-arm/hal.h b/include/asm-arm/hal.h
index d7768e8..f23b2b6 100644
--- a/include/asm-arm/hal.h
+++ b/include/asm-arm/hal.h
@@ -141,7 +141,7 @@ static inline __attribute_const__ unsigned long ffnz 
(unsigned long ul)
 #endif
 
 #ifndef __cplusplus
-#include <asm/system.h>
+#include <asm/xenomai/wrappers.h>
 #include <asm/timex.h>
 #include <asm/xenomai/atomic.h>
 #include <asm/processor.h>
diff --git a/include/asm-arm/wrappers.h b/include/asm-arm/wrappers.h
index 1d4e6a3..0ebc06e 100644
--- a/include/asm-arm/wrappers.h
+++ b/include/asm-arm/wrappers.h
@@ -28,6 +28,17 @@
 #include <linux/interrupt.h>
 #include <asm-generic/xenomai/wrappers.h> /* Read the generic portion. */
 
+#if LINUX_VERSION_CODE < KERNEL_VERSION(3,16,0)
+#include <asm/system.h>
+#else
+#include <asm/barrier.h>
+#include <asm/compiler.h>
+#include <asm/cmpxchg.h>
+#include <asm/switch_to.h>
+#include <asm/system_info.h>
+#include <asm/system_misc.h>
+#endif
+
 #define wrap_phys_mem_prot(filp,pfn,size,prot) (prot)
 
 #if LINUX_VERSION_CODE < KERNEL_VERSION(3,8,0)
@@ -91,7 +102,7 @@ static inline void fp_init(union fp_state *state)
 
 #endif
 
-#if IPIPE_MAJOR_NUMBER == 1 && /* There is no version 0. */    \
+#if IPIPE_MAJOR_NUMBER == 1 && /* There is no version 0. */    \
        (IPIPE_MINOR_NUMBER < 5 || \
         (IPIPE_MINOR_NUMBER == 5 && IPIPE_PATCH_NUMBER < 3))
 #define __ipipe_mach_release_timer()  \
diff --git a/include/asm-generic/wrappers.h b/include/asm-generic/wrappers.h
index 0ae9e75..089e45a 100644
--- a/include/asm-generic/wrappers.h
+++ b/include/asm-generic/wrappers.h
@@ -39,6 +39,10 @@
 #define IPIPE_CORE_APIREV  0
 #endif
 
+#if LINUX_VERSION_CODE < KERNEL_VERSION(3,16,0)
+#define smp_mb__before_atomic()  smp_mb()
+#endif
+
 #if LINUX_VERSION_CODE < KERNEL_VERSION(3,4,0)
 #include <asm/system.h>
 #endif /* kernel < 3.4.0 */
@@ -201,7 +205,7 @@ do {                                                        
                \
        .routine = (f),                                         \
        .data = (d),                                            \
 }
-#define DECLARE_WORK(n,f,d)            struct tq_struct n = 
__WORK_INITIALIZER(n, f, d)
+#define DECLARE_WORK(n,f,d)            struct tq_struct n = 
__WORK_INITIALIZER(n, f, d)
 #define DECLARE_WORK_NODATA(n, f)      DECLARE_WORK(n, f, NULL)
 #define DECLARE_WORK_FUNC(f)           void f(void *cookie)
 #define DECLARE_DELAYED_WORK_NODATA(n, f) DECLARE_WORK(n, f, NULL)
@@ -755,7 +759,7 @@ unsigned long vm_mmap(struct file *file, unsigned long addr,
 #define SEQ_START_TOKEN ((void *)1)
 #endif
 #ifndef SEQ_SKIP
-#define SEQ_SKIP       0       /* not implemented. */
+#define SEQ_SKIP       0       /* not implemented. */
 #endif
 
 #if IPIPE_CORE_APIREV >= 2
diff --git a/include/rtdm/rtdm_driver.h b/include/rtdm/rtdm_driver.h
index 8b01f04..15d61d3 100644
--- a/include/rtdm/rtdm_driver.h
+++ b/include/rtdm/rtdm_driver.h
@@ -584,7 +584,7 @@ static inline void rtdm_context_unlock(struct 
rtdm_dev_context *context)
 {
        XENO_ASSERT(RTDM, CONTEXT_IS_LOCKED(context),
                    /* just warn if context was a dangling pointer */);
-       smp_mb__before_atomic_dec();
+       smp_mb__before_atomic();
        if (unlikely(atomic_dec_and_test(&context->close_lock_count)))
                rthal_apc_schedule(rtdm_apc);
 }
diff --git a/ksrc/arch/arm/hal.c b/ksrc/arch/arm/hal.c
index c7e06a5..6ceac1d 100644
--- a/ksrc/arch/arm/hal.c
+++ b/ksrc/arch/arm/hal.c
@@ -36,7 +36,7 @@
 #include <linux/errno.h>
 #include <linux/module.h>
 #include <linux/console.h>
-#include <asm/system.h>
+#include <asm/xenomai/wrappers.h>
 #include <asm/hardirq.h>
 #include <asm/irq.h>
 #include <asm/io.h>
@@ -44,7 +44,6 @@
 #include <asm/unistd.h>
 #include <asm/xenomai/hal.h>
 #include <asm/cacheflush.h>
-#include <asm/system.h>
 #ifdef CONFIG_PROC_FS
 #include <linux/proc_fs.h>
 #endif /* CONFIG_PROC_FS */


_______________________________________________
Xenomai-git mailing list
Xenomai-git@xenomai.org
http://www.xenomai.org/mailman/listinfo/xenomai-git

Reply via email to