summaryrefslogtreecommitdiffstats
path: root/arch/parisc/include/asm/syscall.h
diff options
context:
space:
mode:
authorKyle McMartin <kyle@mcmartin.ca>2009-07-05 15:59:56 -0400
committerKyle McMartin <kyle@ihatethathostname.lab.bos.redhat.com>2009-09-27 23:07:23 -0400
commit40e03b6857051ea61ebdb4a53e65485acfb1d98e (patch)
treeb3bc174fe6e3572c827a6f55adf4c004d0056158 /arch/parisc/include/asm/syscall.h
parentecd3d4bc06e48357d12e730482577c756a9f2dbc (diff)
downloadlinux-40e03b6857051ea61ebdb4a53e65485acfb1d98e.tar.bz2
parisc: add skeleton syscall.h
Needed for lib/syscall.c when HAVE_ARCH_TRACEHOOK. Signed-off-by: Kyle McMartin <kyle@mcmartin.ca>
Diffstat (limited to 'arch/parisc/include/asm/syscall.h')
-rw-r--r--arch/parisc/include/asm/syscall.h40
1 files changed, 40 insertions, 0 deletions
diff --git a/arch/parisc/include/asm/syscall.h b/arch/parisc/include/asm/syscall.h
new file mode 100644
index 000000000000..8bdfd2c8c39f
--- /dev/null
+++ b/arch/parisc/include/asm/syscall.h
@@ -0,0 +1,40 @@
+/* syscall.h */
+
+#ifndef _ASM_PARISC_SYSCALL_H_
+#define _ASM_PARISC_SYSCALL_H_
+
+#include <linux/err.h>
+#include <asm/ptrace.h>
+
+static inline long syscall_get_nr(struct task_struct *tsk,
+ struct pt_regs *regs)
+{
+ return regs->gr[20];
+}
+
+static inline void syscall_get_arguments(struct task_struct *tsk,
+ struct pt_regs *regs, unsigned int i,
+ unsigned int n, unsigned long *args)
+{
+ BUG_ON(i);
+
+ switch (n) {
+ case 6:
+ args[5] = regs->gr[21];
+ case 5:
+ args[4] = regs->gr[22];
+ case 4:
+ args[3] = regs->gr[23];
+ case 3:
+ args[2] = regs->gr[24];
+ case 2:
+ args[1] = regs->gr[25];
+ case 1:
+ args[0] = regs->gr[26];
+ break;
+ default:
+ BUG();
+ }
+}
+
+#endif /*_ASM_PARISC_SYSCALL_H_*/