diff options
author | Kyle McMartin <kyle@mcmartin.ca> | 2009-07-05 15:59:56 -0400 |
---|---|---|
committer | Kyle McMartin <kyle@ihatethathostname.lab.bos.redhat.com> | 2009-09-27 23:07:23 -0400 |
commit | 40e03b6857051ea61ebdb4a53e65485acfb1d98e (patch) | |
tree | b3bc174fe6e3572c827a6f55adf4c004d0056158 /arch/parisc | |
parent | ecd3d4bc06e48357d12e730482577c756a9f2dbc (diff) |
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')
-rw-r--r-- | arch/parisc/include/asm/ptrace.h | 5 | ||||
-rw-r--r-- | arch/parisc/include/asm/syscall.h | 40 |
2 files changed, 44 insertions, 1 deletions
diff --git a/arch/parisc/include/asm/ptrace.h b/arch/parisc/include/asm/ptrace.h index 302f68dc889c..aead40b16dd8 100644 --- a/arch/parisc/include/asm/ptrace.h +++ b/arch/parisc/include/asm/ptrace.h | |||
@@ -59,8 +59,11 @@ void user_enable_block_step(struct task_struct *task); | |||
59 | #define user_mode(regs) (((regs)->iaoq[0] & 3) ? 1 : 0) | 59 | #define user_mode(regs) (((regs)->iaoq[0] & 3) ? 1 : 0) |
60 | #define user_space(regs) (((regs)->iasq[1] != 0) ? 1 : 0) | 60 | #define user_space(regs) (((regs)->iasq[1] != 0) ? 1 : 0) |
61 | #define instruction_pointer(regs) ((regs)->iaoq[0] & ~3) | 61 | #define instruction_pointer(regs) ((regs)->iaoq[0] & ~3) |
62 | #define user_stack_pointer(regs) ((regs)->gr[30]) | ||
62 | unsigned long profile_pc(struct pt_regs *); | 63 | unsigned long profile_pc(struct pt_regs *); |
63 | extern void show_regs(struct pt_regs *); | 64 | extern void show_regs(struct pt_regs *); |
64 | #endif | 65 | |
66 | |||
67 | #endif /* __KERNEL__ */ | ||
65 | 68 | ||
66 | #endif | 69 | #endif |
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 @@ | |||
1 | /* syscall.h */ | ||
2 | |||
3 | #ifndef _ASM_PARISC_SYSCALL_H_ | ||
4 | #define _ASM_PARISC_SYSCALL_H_ | ||
5 | |||
6 | #include <linux/err.h> | ||
7 | #include <asm/ptrace.h> | ||
8 | |||
9 | static inline long syscall_get_nr(struct task_struct *tsk, | ||
10 | struct pt_regs *regs) | ||
11 | { | ||
12 | return regs->gr[20]; | ||
13 | } | ||
14 | |||
15 | static inline void syscall_get_arguments(struct task_struct *tsk, | ||
16 | struct pt_regs *regs, unsigned int i, | ||
17 | unsigned int n, unsigned long *args) | ||
18 | { | ||
19 | BUG_ON(i); | ||
20 | |||
21 | switch (n) { | ||
22 | case 6: | ||
23 | args[5] = regs->gr[21]; | ||
24 | case 5: | ||
25 | args[4] = regs->gr[22]; | ||
26 | case 4: | ||
27 | args[3] = regs->gr[23]; | ||
28 | case 3: | ||
29 | args[2] = regs->gr[24]; | ||
30 | case 2: | ||
31 | args[1] = regs->gr[25]; | ||
32 | case 1: | ||
33 | args[0] = regs->gr[26]; | ||
34 | break; | ||
35 | default: | ||
36 | BUG(); | ||
37 | } | ||
38 | } | ||
39 | |||
40 | #endif /*_ASM_PARISC_SYSCALL_H_*/ | ||