aboutsummaryrefslogtreecommitdiffstats
path: root/arch/s390/include
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2010-02-28 13:17:55 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2010-02-28 13:17:55 -0500
commite0d272429a34ff143bfa04ee8e29dd4eed2964c7 (patch)
tree5a719135b245811b5d61ed084d7b8c1bc2e87031 /arch/s390/include
parentd25e8dbdab203ed8b4fd0a174bb5259e35ecd87c (diff)
parent480917427b0b6ff39de55ffc81391055472e6c26 (diff)
Merge branch 'tracing-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
* 'tracing-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: (28 commits) ftrace: Add function names to dangling } in function graph tracer tracing: Simplify memory recycle of trace_define_field tracing: Remove unnecessary variable in print_graph_return tracing: Fix typo of info text in trace_kprobe.c tracing: Fix typo in prof_sysexit_enable() tracing: Remove CONFIG_TRACE_POWER from kernel config tracing: Fix ftrace_event_call alignment for use with gcc 4.5 ftrace: Remove memory barriers from NMI code when not needed tracing/kprobes: Add short documentation for HAVE_REGS_AND_STACK_ACCESS_API s390: Add pt_regs register and stack access API tracing/kprobes: Make Kconfig dependencies generic tracing: Unify arch_syscall_addr() implementations tracing: Add notrace to TRACE_EVENT implementation functions ftrace: Allow to remove a single function from function graph filter tracing: Add correct/incorrect to sort keys for branch annotation output tracing: Simplify test for function_graph tracing start point tracing: Drop the tr check from the graph tracing path tracing: Add stack dump to trace_printk if stacktrace option is set tracing: Use appropriate perl constructs in recordmcount.pl tracing: optimize recordmcount.pl for offsets-handling ...
Diffstat (limited to 'arch/s390/include')
-rw-r--r--arch/s390/include/asm/ptrace.h13
-rw-r--r--arch/s390/include/asm/syscall.h7
2 files changed, 19 insertions, 1 deletions
diff --git a/arch/s390/include/asm/ptrace.h b/arch/s390/include/asm/ptrace.h
index 95dcf183a28d..dd2d913afcae 100644
--- a/arch/s390/include/asm/ptrace.h
+++ b/arch/s390/include/asm/ptrace.h
@@ -492,13 +492,24 @@ struct user_regs_struct
492struct task_struct; 492struct task_struct;
493extern void user_enable_single_step(struct task_struct *); 493extern void user_enable_single_step(struct task_struct *);
494extern void user_disable_single_step(struct task_struct *); 494extern void user_disable_single_step(struct task_struct *);
495extern void show_regs(struct pt_regs * regs);
495 496
496#define user_mode(regs) (((regs)->psw.mask & PSW_MASK_PSTATE) != 0) 497#define user_mode(regs) (((regs)->psw.mask & PSW_MASK_PSTATE) != 0)
497#define instruction_pointer(regs) ((regs)->psw.addr & PSW_ADDR_INSN) 498#define instruction_pointer(regs) ((regs)->psw.addr & PSW_ADDR_INSN)
498#define user_stack_pointer(regs)((regs)->gprs[15]) 499#define user_stack_pointer(regs)((regs)->gprs[15])
499#define regs_return_value(regs)((regs)->gprs[2]) 500#define regs_return_value(regs)((regs)->gprs[2])
500#define profile_pc(regs) instruction_pointer(regs) 501#define profile_pc(regs) instruction_pointer(regs)
501extern void show_regs(struct pt_regs * regs); 502
503int regs_query_register_offset(const char *name);
504const char *regs_query_register_name(unsigned int offset);
505unsigned long regs_get_register(struct pt_regs *regs, unsigned int offset);
506unsigned long regs_get_kernel_stack_nth(struct pt_regs *regs, unsigned int n);
507
508static inline unsigned long kernel_stack_pointer(struct pt_regs *regs)
509{
510 return regs->gprs[15] & PSW_ADDR_INSN;
511}
512
502#endif /* __KERNEL__ */ 513#endif /* __KERNEL__ */
503#endif /* __ASSEMBLY__ */ 514#endif /* __ASSEMBLY__ */
504 515
diff --git a/arch/s390/include/asm/syscall.h b/arch/s390/include/asm/syscall.h
index e0a73d3eb837..8429686951f9 100644
--- a/arch/s390/include/asm/syscall.h
+++ b/arch/s390/include/asm/syscall.h
@@ -15,6 +15,13 @@
15#include <linux/sched.h> 15#include <linux/sched.h>
16#include <asm/ptrace.h> 16#include <asm/ptrace.h>
17 17
18/*
19 * The syscall table always contains 32 bit pointers since we know that the
20 * address of the function to be called is (way) below 4GB. So the "int"
21 * type here is what we want [need] for both 32 bit and 64 bit systems.
22 */
23extern const unsigned int sys_call_table[];
24
18static inline long syscall_get_nr(struct task_struct *task, 25static inline long syscall_get_nr(struct task_struct *task,
19 struct pt_regs *regs) 26 struct pt_regs *regs)
20{ 27{