aboutsummaryrefslogtreecommitdiffstats
path: root/arch/hexagon/include/asm/syscall.h
diff options
context:
space:
mode:
Diffstat (limited to 'arch/hexagon/include/asm/syscall.h')
-rw-r--r--arch/hexagon/include/asm/syscall.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/arch/hexagon/include/asm/syscall.h b/arch/hexagon/include/asm/syscall.h
index 4f054b1ddef5..f6e454f18038 100644
--- a/arch/hexagon/include/asm/syscall.h
+++ b/arch/hexagon/include/asm/syscall.h
@@ -9,6 +9,8 @@
9#define _ASM_HEXAGON_SYSCALL_H 9#define _ASM_HEXAGON_SYSCALL_H
10 10
11#include <uapi/linux/audit.h> 11#include <uapi/linux/audit.h>
12#include <linux/err.h>
13#include <asm/ptrace.h>
12 14
13typedef long (*syscall_fn)(unsigned long, unsigned long, 15typedef long (*syscall_fn)(unsigned long, unsigned long,
14 unsigned long, unsigned long, 16 unsigned long, unsigned long,
@@ -31,6 +33,18 @@ static inline void syscall_get_arguments(struct task_struct *task,
31 memcpy(args, &(&regs->r00)[0], 6 * sizeof(args[0])); 33 memcpy(args, &(&regs->r00)[0], 6 * sizeof(args[0]));
32} 34}
33 35
36static inline long syscall_get_error(struct task_struct *task,
37 struct pt_regs *regs)
38{
39 return IS_ERR_VALUE(regs->r00) ? regs->r00 : 0;
40}
41
42static inline long syscall_get_return_value(struct task_struct *task,
43 struct pt_regs *regs)
44{
45 return regs->r00;
46}
47
34static inline int syscall_get_arch(struct task_struct *task) 48static inline int syscall_get_arch(struct task_struct *task)
35{ 49{
36 return AUDIT_ARCH_HEXAGON; 50 return AUDIT_ARCH_HEXAGON;