aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sparc64
diff options
context:
space:
mode:
Diffstat (limited to 'arch/sparc64')
-rw-r--r--arch/sparc64/kernel/stacktrace.c20
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
6void save_stack_trace(struct stack_trace *trace, struct task_struct *task) 6void 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;