7 #ifndef _ASM_ARM_SYSCALL_H
8 #define _ASM_ARM_SYSCALL_H
11 #include <linux/sched.h>
13 #include <asm/unistd.h>
15 #define NR_syscalls (__NR_syscalls)
28 regs->ARM_r0 = regs->ARM_ORIG_r0;
34 unsigned long error = regs->ARM_r0;
48 regs->ARM_r0 = (
long) error ? error : val;
51 #define SYSCALL_MAX_ARGS 7
55 unsigned int i,
unsigned int n,
61 pr_warning(
"%s called with max args %d, handling only %d\n",
62 __func__, i + n, SYSCALL_MAX_ARGS);
63 memset(args_bad, 0, n_bad *
sizeof(args[0]));
64 n = SYSCALL_MAX_ARGS -
i;
68 args[0] = regs->ARM_ORIG_r0;
74 memcpy(args, ®s->ARM_r0 + i, n *
sizeof(args[0]));
79 unsigned int i,
unsigned int n,
80 const unsigned long *args)
83 pr_warning(
"%s called with max args %d, handling only %d\n",
89 regs->ARM_ORIG_r0 = args[0];
95 memcpy(®s->ARM_r0 + i, args, n *
sizeof(args[0]));