Commit | Line | Data |
---|---|---|
b2441318 | 1 | /* SPDX-License-Identifier: GPL-2.0 */ |
d2a5f499 YS |
2 | #ifndef __ASM_H8300_SYSCALLS_32_H |
3 | #define __ASM_H8300_SYSCALLS_32_H | |
4 | ||
5 | #ifdef __KERNEL__ | |
6 | ||
7 | #include <linux/compiler.h> | |
8 | #include <linux/linkage.h> | |
9 | #include <linux/types.h> | |
10 | #include <linux/ptrace.h> | |
11 | ||
12 | static inline int | |
13 | syscall_get_nr(struct task_struct *task, struct pt_regs *regs) | |
14 | { | |
15 | return regs->orig_er0; | |
16 | } | |
17 | ||
18 | static inline void | |
19 | syscall_get_arguments(struct task_struct *task, struct pt_regs *regs, | |
b35f549d | 20 | unsigned long *args) |
d2a5f499 | 21 | { |
b35f549d SRRH |
22 | *args++ = regs->er1; |
23 | *args++ = regs->er2; | |
24 | *args++ = regs->er3; | |
25 | *args++ = regs->er4; | |
26 | *args++ = regs->er5; | |
27 | *args = regs->er6; | |
d2a5f499 YS |
28 | } |
29 | ||
30 | ||
31 | ||
32 | /* Misc syscall related bits */ | |
33 | asmlinkage long do_syscall_trace_enter(struct pt_regs *regs); | |
34 | asmlinkage void do_syscall_trace_leave(struct pt_regs *regs); | |
35 | ||
36 | #endif /* __KERNEL__ */ | |
37 | #endif /* __ASM_H8300_SYSCALLS_32_H */ |