aboutsummaryrefslogtreecommitdiffstats
path: root/arch/riscv/include/asm/syscall.h
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <[email protected]>2019-01-15 14:20:53 +0000
committerGreg Kroah-Hartman <[email protected]>2019-01-15 14:20:53 +0000
commitbdfe0df1e97beedc15f68ee6556830548e81f63f (patch)
treeed4f0eb7acb8814642eb1fb4da0ac28704dc4fe0 /arch/riscv/include/asm/syscall.h
parentdriver core: drop use of BUS_ATTR() (diff)
parentLinux 5.0-rc2 (diff)
downloadkernel-bdfe0df1e97beedc15f68ee6556830548e81f63f.tar.gz
kernel-bdfe0df1e97beedc15f68ee6556830548e81f63f.zip
Merge 5.0-rc2 into driver-core-next
We want the driver core changes in that branch in here to build on top of. Signed-off-by: Greg Kroah-Hartman <[email protected]>
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 @@
#ifndef _ASM_RISCV_SYSCALL_H
#define _ASM_RISCV_SYSCALL_H
+#include <uapi/linux/audit.h>
#include <linux/sched.h>
#include <linux/err.h>
@@ -99,4 +100,13 @@ static inline void syscall_set_arguments(struct task_struct *task,
memcpy(&regs->a1 + i * sizeof(regs->a1), args, n * sizeof(regs->a0));
}
+static inline int syscall_get_arch(void)
+{
+#ifdef CONFIG_64BIT
+ return AUDIT_ARCH_RISCV64;
+#else
+ return AUDIT_ARCH_RISCV32;
+#endif
+}
+
#endif /* _ASM_RISCV_SYSCALL_H */