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

Author: Gilles Chanteperdrix <gilles.chanteperd...@xenomai.org>
Date:   Sat Mar 23 21:42:53 2013 +0100

hal/arm: adapt to Linux 3.8

---

 include/asm-arm/calibration.h |    5 +++++
 include/asm-arm/hal.h         |    4 +++-
 include/asm-arm/wrappers.h    |    4 ++++
 3 files changed, 12 insertions(+), 1 deletions(-)

diff --git a/include/asm-arm/calibration.h b/include/asm-arm/calibration.h
index d9dd759..b0283c0 100644
--- a/include/asm-arm/calibration.h
+++ b/include/asm-arm/calibration.h
@@ -27,6 +27,11 @@
 #error "please don't include asm/calibration.h directly"
 #endif
 
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,8,0)
+extern unsigned omap_rev(void);
+#define cpu_is_omap44xx() ((omap_rev() & 0xff) == 0x44)
+#endif
+
 static inline unsigned long xnarch_get_sched_latency (void)
 {
 #if CONFIG_XENO_OPT_TIMING_SCHEDLAT != 0
diff --git a/include/asm-arm/hal.h b/include/asm-arm/hal.h
index b6c5ac6..3d7e8e6 100644
--- a/include/asm-arm/hal.h
+++ b/include/asm-arm/hal.h
@@ -235,7 +235,9 @@ typedef struct rthal_fpenv {
      */
     __u8                    used_cp[16];    /* thread used copro */
     unsigned long           tp_value;
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 18)
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,7,0) && defined(CONFIG_CRUNCH)) \
+       || (LINUX_VERSION_CODE < KERNEL_VERSION(3,7,0)                  \
+           && LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 18))
     struct crunch_state     crunchstate;
 #endif /* Linux version >= 2.6.18 */
 #if LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 15)
diff --git a/include/asm-arm/wrappers.h b/include/asm-arm/wrappers.h
index 91a2ec4..b95801c 100644
--- a/include/asm-arm/wrappers.h
+++ b/include/asm-arm/wrappers.h
@@ -30,7 +30,11 @@
 
 #define wrap_phys_mem_prot(filp,pfn,size,prot) (prot)
 
+#if LINUX_VERSION_CODE < KERNEL_VERSION(3,8,0)
 #define wrap_strncpy_from_user(dstP, srcP, n)  __strncpy_from_user(dstP, srcP, 
n)
+#else
+#define wrap_strncpy_from_user(dstP, srcP, n)  strncpy_from_user(dstP, srcP, n)
+#endif
 
 #define rthal_irq_desc_status(irq)     (rthal_irq_descp(irq)->status)
 


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

Reply via email to