| /* SPDX-License-Identifier: GPL-2.0 */ |
| #ifndef _ASM_PARISC_SYSCALL_H_ |
| #define _ASM_PARISC_SYSCALL_H_ |
| #include <uapi/linux/audit.h> |
| #include <linux/compat.h> |
| #define NR_syscalls (__NR_Linux_syscalls) |
| static inline long syscall_get_nr(struct task_struct *tsk, |
| static inline void syscall_get_arguments(struct task_struct *tsk, |
| static inline long syscall_get_error(struct task_struct *task, |
| unsigned long error = regs->gr[28]; |
| return IS_ERR_VALUE(error) ? error : 0; |
| static inline long syscall_get_return_value(struct task_struct *task, |
| static inline void syscall_set_return_value(struct task_struct *task, |
| regs->gr[28] = error ? error : val; |
| static inline void syscall_rollback(struct task_struct *task, |
| static inline int syscall_get_arch(struct task_struct *task) |
| int arch = AUDIT_ARCH_PARISC; |
| if (!__is_compat_task(task)) |
| arch = AUDIT_ARCH_PARISC64; |
| #endif /*_ASM_PARISC_SYSCALL_H_*/ |