Module: xenomai-3
Branch: stable-3.0.x
Commit: 1605481a413be99176464a0b18e2d5bb665eddd6
URL:    
http://git.xenomai.org/?p=xenomai-3.git;a=commit;h=1605481a413be99176464a0b18e2d5bb665eddd6

Author: Philippe Gerum <r...@xenomai.org>
Date:   Fri Nov 17 16:36:32 2017 +0100

cobalt/powerpc: add syscall decoding helper

---

 kernel/cobalt/arch/powerpc/include/asm/xenomai/syscall.h |   10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/kernel/cobalt/arch/powerpc/include/asm/xenomai/syscall.h 
b/kernel/cobalt/arch/powerpc/include/asm/xenomai/syscall.h
index a0e6103..6a9e836 100644
--- a/kernel/cobalt/arch/powerpc/include/asm/xenomai/syscall.h
+++ b/kernel/cobalt/arch/powerpc/include/asm/xenomai/syscall.h
@@ -39,6 +39,16 @@
 #define __xn_reg_pc(__regs)    ((__regs)->nip)
 #define __xn_reg_sp(__regs)    ((__regs)->gpr[1])
 
+/*
+ * Returns the syscall number depending on the handling core. Cobalt
+ * and Linux syscall numbers can be fetched from GPR0, masking out the
+ * __COBALT_SYSCALL_BIT marker.
+ */
+static inline long __xn_get_syscall_nr(struct pt_regs *regs)
+{
+       return __xn_syscall(regs);
+}
+
 static inline void __xn_error_return(struct pt_regs *regs, int v)
 {
        /*


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

Reply via email to