xref: /openbmc/linux/arch/hexagon/include/asm/syscall.h (revision 03638e62)
1 /* SPDX-License-Identifier: GPL-2.0-only */
2 /*
3  * Syscall support for the Hexagon architecture
4  *
5  * Copyright (c) 2010-2011, The Linux Foundation. All rights reserved.
6  */
7 
8 #ifndef _ASM_HEXAGON_SYSCALL_H
9 #define _ASM_HEXAGON_SYSCALL_H
10 
11 #include <uapi/linux/audit.h>
12 
13 typedef long (*syscall_fn)(unsigned long, unsigned long,
14 	unsigned long, unsigned long,
15 	unsigned long, unsigned long);
16 
17 #include <asm-generic/syscalls.h>
18 
19 extern void *sys_call_table[];
20 
21 static inline long syscall_get_nr(struct task_struct *task,
22 				  struct pt_regs *regs)
23 {
24 	return regs->r06;
25 }
26 
27 static inline void syscall_get_arguments(struct task_struct *task,
28 					 struct pt_regs *regs,
29 					 unsigned long *args)
30 {
31 	memcpy(args, &(&regs->r00)[0], 6 * sizeof(args[0]));
32 }
33 
34 static inline int syscall_get_arch(struct task_struct *task)
35 {
36 	return AUDIT_ARCH_HEXAGON;
37 }
38 
39 #endif
40