of: MSI: Simplify irqdomain lookup
[linux/fpc-iii.git] / arch / h8300 / include / asm / syscall.h
blobb41f688d02cf55d3ec821cd566b543a4e3724010
1 #ifndef __ASM_H8300_SYSCALLS_32_H
2 #define __ASM_H8300_SYSCALLS_32_H
4 #ifdef __KERNEL__
6 #include <linux/compiler.h>
7 #include <linux/linkage.h>
8 #include <linux/types.h>
9 #include <linux/ptrace.h>
11 static inline int
12 syscall_get_nr(struct task_struct *task, struct pt_regs *regs)
14 return regs->orig_er0;
17 static inline void
18 syscall_get_arguments(struct task_struct *task, struct pt_regs *regs,
19 unsigned int i, unsigned int n, unsigned long *args)
21 BUG_ON(i + n > 6);
23 while (n > 0) {
24 switch (i) {
25 case 0:
26 *args++ = regs->er1;
27 break;
28 case 1:
29 *args++ = regs->er2;
30 break;
31 case 2:
32 *args++ = regs->er3;
33 break;
34 case 3:
35 *args++ = regs->er4;
36 break;
37 case 4:
38 *args++ = regs->er5;
39 break;
40 case 5:
41 *args++ = regs->er6;
42 break;
44 i++;
45 n--;
51 /* Misc syscall related bits */
52 asmlinkage long do_syscall_trace_enter(struct pt_regs *regs);
53 asmlinkage void do_syscall_trace_leave(struct pt_regs *regs);
55 #endif /* __KERNEL__ */
56 #endif /* __ASM_H8300_SYSCALLS_32_H */