1 /* SPDX-License-Identifier: GPL-2.0 */
2 #ifndef _ASM_M68K_SYSCALL_H
3 #define _ASM_M68K_SYSCALL_H
5 #include <uapi/linux/audit.h>
7 #include <asm/unistd.h>
9 extern const unsigned long sys_call_table[];
11 static inline int syscall_get_nr(struct task_struct *task,
17 static inline void syscall_rollback(struct task_struct *task,
20 regs->d0 = regs->orig_d0;
23 static inline long syscall_get_error(struct task_struct *task,
26 unsigned long error = regs->d0;
28 return IS_ERR_VALUE(error) ? error : 0;
31 static inline long syscall_get_return_value(struct task_struct *task,
37 static inline void syscall_set_return_value(struct task_struct *task,
41 regs->d0 = (long)error ?: val;
44 static inline void syscall_get_arguments(struct task_struct *task,
48 args[0] = regs->orig_d0;
51 memcpy(args, ®s->d1, 5 * sizeof(args[0]));
54 static inline void syscall_set_arguments(struct task_struct *task,
58 regs->orig_d0 = args[0];
61 memcpy(®s->d1, args, 5 * sizeof(args[0]));
64 static inline int syscall_get_arch(struct task_struct *task)
66 return AUDIT_ARCH_M68K;
69 #endif /* _ASM_M68K_SYSCALL_H */