diff options
author | Christoph Hellwig <hch@lst.de> | 2007-05-08 03:23:29 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-05-08 14:14:58 -0400 |
commit | ab1b6f03a10ba1f5638188ab06bf46e33ac3a160 (patch) | |
tree | 2dc7ce01df5d51d81e250dd9cee1b7b04627466e /arch/sparc64/kernel | |
parent | 7e4c3690b07f04b1942c39db358a5c8a72831daa (diff) |
simplify the stacktrace code
Simplify the stacktrace code:
- remove the unused task argument to save_stack_trace, it's always
current
- remove the all_contexts flag, it's alwasy 0
Signed-off-by: Christoph Hellwig <hch@lst.de>
Cc: Paul Mundt <lethal@linux-sh.org>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Andi Kleen <ak@suse.de>
Cc: Akinobu Mita <akinobu.mita@gmail.com>
Acked-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch/sparc64/kernel')
-rw-r--r-- | arch/sparc64/kernel/stacktrace.c | 20 |
1 files changed, 7 insertions, 13 deletions
diff --git a/arch/sparc64/kernel/stacktrace.c b/arch/sparc64/kernel/stacktrace.c index c4d15f2762b9..47f92a59be18 100644 --- a/arch/sparc64/kernel/stacktrace.c +++ b/arch/sparc64/kernel/stacktrace.c | |||
@@ -3,22 +3,16 @@ | |||
3 | #include <linux/thread_info.h> | 3 | #include <linux/thread_info.h> |
4 | #include <asm/ptrace.h> | 4 | #include <asm/ptrace.h> |
5 | 5 | ||
6 | void save_stack_trace(struct stack_trace *trace, struct task_struct *task) | 6 | void save_stack_trace(struct stack_trace *trace) |
7 | { | 7 | { |
8 | unsigned long ksp, fp, thread_base; | 8 | unsigned long ksp, fp, thread_base; |
9 | struct thread_info *tp; | 9 | struct thread_info *tp = task_thread_info(current); |
10 | 10 | ||
11 | if (!task) | 11 | flushw_all(); |
12 | task = current; | 12 | __asm__ __volatile__( |
13 | tp = task_thread_info(task); | 13 | "mov %%fp, %0" |
14 | if (task == current) { | 14 | : "=r" (ksp) |
15 | flushw_all(); | 15 | ); |
16 | __asm__ __volatile__( | ||
17 | "mov %%fp, %0" | ||
18 | : "=r" (ksp) | ||
19 | ); | ||
20 | } else | ||
21 | ksp = tp->ksp; | ||
22 | 16 | ||
23 | fp = ksp + STACK_BIAS; | 17 | fp = ksp + STACK_BIAS; |
24 | thread_base = (unsigned long) tp; | 18 | thread_base = (unsigned long) tp; |