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

Author: Dmitriy Cherkasov <dmit...@mperpetuo.com>
Date:   Thu May  7 13:58:14 2015 -0700

cobalt/arm64: update register struct usage for arm64

---

 .../arch/arm64/include/asm/xenomai/syscall.h       |   22 ++++++++++----------
 kernel/cobalt/arch/arm64/mayday.c                  |   20 +++++++++---------
 2 files changed, 21 insertions(+), 21 deletions(-)

diff --git a/kernel/cobalt/arch/arm64/include/asm/xenomai/syscall.h 
b/kernel/cobalt/arch/arm64/include/asm/xenomai/syscall.h
index d80df77..f0a1090 100644
--- a/kernel/cobalt/arch/arm64/include/asm/xenomai/syscall.h
+++ b/kernel/cobalt/arch/arm64/include/asm/xenomai/syscall.h
@@ -36,21 +36,21 @@
 #define __xn_reg_sys(__regs)   ((__regs)->ARM_ORIG_r0)
 /* In OABI_COMPAT mode, handle both OABI and EABI userspace syscalls */
 #ifdef CONFIG_OABI_COMPAT
-#define __xn_syscall_p(__regs) (((__regs)->ARM_r7 == __NR_OABI_SYSCALL_BASE + 
XENO_ARM_SYSCALL) || \
-                                ((__regs)->ARM_r7 == __ARM_NR_ipipe))
+#define __xn_syscall_p(__regs) (((__regs)->regs[7] == __NR_OABI_SYSCALL_BASE + 
XENO_ARM_SYSCALL) || \
+                                ((__regs)->regs[7] == __ARM_NR_ipipe))
 #else /* !CONFIG_OABI_COMPAT */
-#define __xn_syscall_p(__regs) ((__regs)->ARM_r7 == __ARM_NR_ipipe)
+#define __xn_syscall_p(__regs) ((__regs)->regs[7] == __ARM_NR_ipipe)
 #endif /* !CONFIG_OABI_COMPAT */
 #define __xn_syscall(__regs)   (__xn_reg_sys(__regs) & ~__COBALT_SYSCALL_BIT)
 
-#define __xn_reg_rval(__regs)  ((__regs)->ARM_r0)
-#define __xn_reg_arg1(__regs)  ((__regs)->ARM_r1)
-#define __xn_reg_arg2(__regs)  ((__regs)->ARM_r2)
-#define __xn_reg_arg3(__regs)  ((__regs)->ARM_r3)
-#define __xn_reg_arg4(__regs)  ((__regs)->ARM_r4)
-#define __xn_reg_arg5(__regs)  ((__regs)->ARM_r5)
-#define __xn_reg_pc(__regs)    ((__regs)->ARM_ip)
-#define __xn_reg_sp(__regs)    ((__regs)->ARM_sp)
+#define __xn_reg_rval(__regs)  ((__regs)->regs[0])
+#define __xn_reg_arg1(__regs)  ((__regs)->regs[1])
+#define __xn_reg_arg2(__regs)  ((__regs)->regs[2])
+#define __xn_reg_arg3(__regs)  ((__regs)->regs[3])
+#define __xn_reg_arg4(__regs)  ((__regs)->regs[4])
+#define __xn_reg_arg5(__regs)  ((__regs)->regs[5])
+#define __xn_reg_pc(__regs)    ((__regs)->ip)
+#define __xn_reg_sp(__regs)    ((__regs)->sp)
 
 static inline void __xn_error_return(struct pt_regs *regs, int v)
 {
diff --git a/kernel/cobalt/arch/arm64/mayday.c 
b/kernel/cobalt/arch/arm64/mayday.c
index 20e4559..bc51ad6 100644
--- a/kernel/cobalt/arch/arm64/mayday.c
+++ b/kernel/cobalt/arch/arm64/mayday.c
@@ -120,27 +120,27 @@ void *xnarch_get_mayday_page(void)
 void xnarch_handle_mayday(struct xnarchtcb *tcb, struct pt_regs *regs,
                          unsigned long tramp)
 {
-       tcb->mayday.pc = regs->ARM_pc;
-       tcb->mayday.r0 = regs->ARM_r0;
+       tcb->mayday.pc = regs->pc;
+       tcb->mayday.r0 = regs->regs[0];
 #ifdef __ARM_EABI__
-       tcb->mayday.r7 = regs->ARM_r7;
+       tcb->mayday.r7 = regs->regs[7];
 #endif
 #ifdef CONFIG_ARM_THUMB
        /* The code on the mayday page must be run in ARM mode */
-       tcb->mayday.psr = regs->ARM_cpsr;
-       regs->ARM_cpsr &= ~PSR_T_BIT;
+       tcb->mayday.psr = regs->cpsr;
+       regs->cpsr &= ~PSR_T_BIT;
 #endif
-       regs->ARM_pc = tramp;
+       regs->pc = tramp;
 }
 
 void xnarch_fixup_mayday(struct xnarchtcb *tcb, struct pt_regs *regs)
 {
-       regs->ARM_pc = tcb->mayday.pc;
-       regs->ARM_r0 = tcb->mayday.r0;
+       regs->pc = tcb->mayday.pc;
+       regs->regs[0] = tcb->mayday.r0;
 #ifdef __ARM_EABI__
-       regs->ARM_r7 = tcb->mayday.r7;
+       regs->regs[7] = tcb->mayday.r7;
 #endif
 #ifdef CONFIG_ARM_THUMB
-       regs->ARM_cpsr = tcb->mayday.psr;
+       regs->cpsr = tcb->mayday.psr;
 #endif
 }


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

Reply via email to