3 #ifndef _ASM_PARISC_SYSCALL_H_
4 #define _ASM_PARISC_SYSCALL_H_
6 #include <uapi/linux/audit.h>
7 #include <linux/compat.h>
9 #include <asm/ptrace.h>
11 #define NR_syscalls (__NR_Linux_syscalls)
13 static inline long syscall_get_nr(struct task_struct *tsk,
19 static inline void syscall_get_arguments(struct task_struct *tsk,
20 struct pt_regs *regs, unsigned int i,
21 unsigned int n, unsigned long *args)
27 args[5] = regs->gr[21];
29 args[4] = regs->gr[22];
31 args[3] = regs->gr[23];
33 args[2] = regs->gr[24];
35 args[1] = regs->gr[25];
37 args[0] = regs->gr[26];
45 static inline long syscall_get_return_value(struct task_struct *task,
51 static inline void syscall_set_return_value(struct task_struct *task,
55 regs->gr[28] = error ? error : val;
58 static inline void syscall_rollback(struct task_struct *task,
64 static inline int syscall_get_arch(void)
66 int arch = AUDIT_ARCH_PARISC;
68 if (!is_compat_task())
69 arch = AUDIT_ARCH_PARISC64;
73 #endif /*_ASM_PARISC_SYSCALL_H_*/