diff options
author | Frank Ch. Eigler <fche@elastic.org> | 2008-06-27 21:45:37 -0400 |
---|---|---|
committer | Frank Ch. Eigler <fche@elastic.org> | 2008-06-27 21:45:37 -0400 |
commit | 53ca410a6a6032c2cde6aac6e95b57c68585e48a (patch) | |
tree | 79cda31e77dd2fee51b8f2f20e2e76989f4c8ad7 /runtime/syscall.h | |
parent | 4494bb1367876f3067d0e7c90b1466b9bd88633f (diff) | |
parent | cfa2ca3cbf2da7bbabcdf35c3085a969bd2370e4 (diff) | |
download | systemtap-steved-53ca410a6a6032c2cde6aac6e95b57c68585e48a.tar.gz systemtap-steved-53ca410a6a6032c2cde6aac6e95b57c68585e48a.tar.xz systemtap-steved-53ca410a6a6032c2cde6aac6e95b57c68585e48a.zip |
Merge commit 'origin/master' into pr6429-comp-unwindsyms
* commit 'origin/master':
Always include libdw using link groups.
Fix bug in handling process(PID) probes.
Added tests for 'process(PID)' variants.
This commit makes changes to the VFS tapset. The changes include deprecation of
syscalls2.stp: Add sys_renameat.
Only probe lines once for the :* wildcard line pattern.
Revert checking address in runtime
bz451707: fix conversions.exp test $name
Cleanup in tapsets.cxx
Added powerpc support to runtime/syscall.h.
Remove validating _stext due to many aliased symbols
PR6646: Add checking address in runtime
Fixed offset argument to vm_callback.
Diffstat (limited to 'runtime/syscall.h')
-rw-r--r-- | runtime/syscall.h | 48 |
1 files changed, 45 insertions, 3 deletions
diff --git a/runtime/syscall.h b/runtime/syscall.h index 36fed2ff..3d1034e6 100644 --- a/runtime/syscall.h +++ b/runtime/syscall.h @@ -49,6 +49,13 @@ # endif #endif +#if defined(__powerpc__) +#define MMAP_SYSCALL_NO(tsk) 90 +#define MPROTECT_SYSCALL_NO(tsk) 125 +#define MUNMAP_SYSCALL_NO(tsk) 91 +#define MREMAP_SYSCALL_NO(tsk) 163 +#endif + #if !defined(MMAP_SYSCALL_NO) || !defined(MPROTECT_SYSCALL_NO) \ || !defined(MUNMAP_SYSCALL_NO) || !defined(MREMAP_SYSCALL_NO) #error "Unimplemented architecture" @@ -59,12 +66,20 @@ static inline unsigned long __stp_user_syscall_nr(struct pt_regs *regs) { #if defined(STAPCONF_X86_UNIREGS) - return regs->orig_ax; + return regs->orig_ax; #elif defined(__x86_64__) - return regs->orig_rax; + return regs->orig_rax; #elif defined (__i386__) - return regs->orig_eax; + return regs->orig_eax; +#endif +} #endif + +#if defined(__powerpc__) +static inline unsigned long +__stp_user_syscall_nr(struct pt_regs *regs) +{ + return regs->gpr[0]; } #endif @@ -94,6 +109,14 @@ __stp_user_syscall_return_value(struct task_struct *task, struct pt_regs *regs) } #endif +#if defined(__powerpc__) +static inline long * +__stp_user_syscall_return_value(struct task_struct *task, struct pt_regs *regs) +{ + return ®s->gpr[3]; +} +#endif + #if defined(__i386__) || defined(__x86_64__) static inline long * __stp_user_syscall_arg(struct task_struct *task, struct pt_regs *regs, @@ -157,4 +180,23 @@ __stp_user_syscall_arg(struct task_struct *task, struct pt_regs *regs, } #endif +#if defined(__powerpc__) +static inline long * +__stp_user_syscall_arg(struct task_struct *task, struct pt_regs *regs, + unsigned int n) +{ + switch (n) { + case 0: return ®s->gpr[3]; + case 1: return ®s->gpr[4]; + case 2: return ®s->gpr[5]; + case 3: return ®s->gpr[6]; + case 4: return ®s->gpr[7]; + case 5: return ®s->gpr[8]; + default: + _stp_error("syscall arg > 5"); + return NULL; + } +} +#endif + #endif /* _SYSCALL_H_ */ |