aboutsummaryrefslogtreecommitdiffstats
path: root/arch/riscv/include/asm/syscall.h
diff options
context:
space:
mode:
Diffstat (limited to 'arch/riscv/include/asm/syscall.h')
-rw-r--r--arch/riscv/include/asm/syscall.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/arch/riscv/include/asm/syscall.h b/arch/riscv/include/asm/syscall.h
index 8d25f8904c00..bba3da6ef157 100644
--- a/arch/riscv/include/asm/syscall.h
+++ b/arch/riscv/include/asm/syscall.h
@@ -18,6 +18,7 @@
18#ifndef _ASM_RISCV_SYSCALL_H 18#ifndef _ASM_RISCV_SYSCALL_H
19#define _ASM_RISCV_SYSCALL_H 19#define _ASM_RISCV_SYSCALL_H
20 20
21#include <uapi/linux/audit.h>
21#include <linux/sched.h> 22#include <linux/sched.h>
22#include <linux/err.h> 23#include <linux/err.h>
23 24
@@ -99,4 +100,13 @@ static inline void syscall_set_arguments(struct task_struct *task,
99 memcpy(&regs->a1 + i * sizeof(regs->a1), args, n * sizeof(regs->a0)); 100 memcpy(&regs->a1 + i * sizeof(regs->a1), args, n * sizeof(regs->a0));
100} 101}
101 102
103static inline int syscall_get_arch(void)
104{
105#ifdef CONFIG_64BIT
106 return AUDIT_ARCH_RISCV64;
107#else
108 return AUDIT_ARCH_RISCV32;
109#endif
110}
111
102#endif /* _ASM_RISCV_SYSCALL_H */ 112#endif /* _ASM_RISCV_SYSCALL_H */