1 /* SPDX-License-Identifier: GPL-2.0-or-later */
3 * Copyright (C) 2011 Texas Instruments Incorporated
7 #ifndef __ASM_C6X_SYSCALL_H
8 #define __ASM_C6X_SYSCALL_H
10 #include <uapi/linux/audit.h>
11 #include <linux/err.h>
12 #include <linux/sched.h>
14 static inline int syscall_get_nr(struct task_struct *task,
20 static inline void syscall_rollback(struct task_struct *task,
26 static inline long syscall_get_error(struct task_struct *task,
29 return IS_ERR_VALUE(regs->a4) ? regs->a4 : 0;
32 static inline long syscall_get_return_value(struct task_struct *task,
38 static inline void syscall_set_return_value(struct task_struct *task,
42 regs->a4 = error ?: val;
45 static inline void syscall_get_arguments(struct task_struct *task,
57 static inline void syscall_set_arguments(struct task_struct *task,
59 const unsigned long *args)
69 static inline int syscall_get_arch(struct task_struct *task)
71 return IS_ENABLED(CONFIG_CPU_BIG_ENDIAN)
72 ? AUDIT_ARCH_C6XBE : AUDIT_ARCH_C6X;
75 #endif /* __ASM_C6X_SYSCALLS_H */