Module: xenomai-3
Branch: next
Commit: ab504be97be7a29f2ad55a8892e93ec8eecb7851
URL:    
http://git.xenomai.org/?p=xenomai-3.git;a=commit;h=ab504be97be7a29f2ad55a8892e93ec8eecb7851

Author: Dmitriy Cherkasov <dmit...@mperpetuo.com>
Date:   Thu May  7 16:41:45 2015 -0700

cobalt/arm64: set cache aliasing and disable floating point coprocessor 
instructions form aarch64/arm64

---

 kernel/cobalt/arch/arm64/include/asm/xenomai/machine.h    |    3 ++-
 .../cobalt/arch/arm64/include/asm/xenomai/uapi/fptest.h   |   13 ++++++++++++-
 2 files changed, 14 insertions(+), 2 deletions(-)

diff --git a/kernel/cobalt/arch/arm64/include/asm/xenomai/machine.h 
b/kernel/cobalt/arch/arm64/include/asm/xenomai/machine.h
index cf07a3f..e078564 100644
--- a/kernel/cobalt/arch/arm64/include/asm/xenomai/machine.h
+++ b/kernel/cobalt/arch/arm64/include/asm/xenomai/machine.h
@@ -38,7 +38,8 @@
 #include <asm/ipipe.h>
 #include <asm/cacheflush.h>
 
-#define xnarch_cache_aliasing() cache_is_vivt()
+/* D-side always behaves as PIPT on AArch64 (see 
arch/arm64/include/asm/cachetype.h) */
+#define xnarch_cache_aliasing() 0
 
 static inline __attribute_const__ unsigned long ffnz(unsigned long ul)
 {
diff --git a/kernel/cobalt/arch/arm64/include/asm/xenomai/uapi/fptest.h 
b/kernel/cobalt/arch/arm64/include/asm/xenomai/uapi/fptest.h
index b81d109..65a3e31 100644
--- a/kernel/cobalt/arch/arm64/include/asm/xenomai/uapi/fptest.h
+++ b/kernel/cobalt/arch/arm64/include/asm/xenomai/uapi/fptest.h
@@ -18,10 +18,17 @@
 #ifndef _COBALT_ARM_ASM_UAPI_FPTEST_H
 #define _COBALT_ARM_ASM_UAPI_FPTEST_H
 
+#ifdef __aarch64__
+/* CP10 and CP11, used for the FP/NEON operations, are already excluded from
+the list of valid operands for the generic coprocessor instructions */
+#define __COBALT_HAVE_VFP  0
+#else
 #define __COBALT_HAVE_VFP  0x1
+#endif
 
 static inline void fp_regs_set(int features, unsigned int val)
 {
+#if __COBALT_HAVE_VFP != 0
        unsigned long long e[16];
        unsigned int i;
 
@@ -34,12 +41,15 @@ static inline void fp_regs_set(int features, unsigned int 
val)
                __asm__ __volatile__("ldc p11, cr0, [%0],#32*4":
                                     "=r"(i): "0"(&e[0]): "memory");
        }
+#endif
 }
 
 static inline unsigned int fp_regs_check(int features, unsigned int val,
                                         int (*report)(const char *fmt, ...))
 {
-       unsigned int result = val, i;
+       unsigned int result = val;
+#if __COBALT_HAVE_VFP != 0
+       unsigned int i;
        unsigned long long e[16];
 
        if (features & __COBALT_HAVE_VFP) {
@@ -54,6 +64,7 @@ static inline unsigned int fp_regs_check(int features, 
unsigned int val,
                                result = e[i];
                        }
        }
+#endif
 
        return result;
 }


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

Reply via email to