aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sparc/kernel/process_32.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/sparc/kernel/process_32.c')
-rw-r--r--arch/sparc/kernel/process_32.c16
1 files changed, 7 insertions, 9 deletions
diff --git a/arch/sparc/kernel/process_32.c b/arch/sparc/kernel/process_32.c
index c85241006e32..2be4214b3905 100644
--- a/arch/sparc/kernel/process_32.c
+++ b/arch/sparc/kernel/process_32.c
@@ -142,11 +142,13 @@ void show_stack(struct task_struct *tsk, unsigned long *_ksp)
142 struct reg_window32 *rw; 142 struct reg_window32 *rw;
143 int count = 0; 143 int count = 0;
144 144
145 if (tsk != NULL) 145 if (!tsk)
146 task_base = (unsigned long) task_stack_page(tsk); 146 tsk = current;
147 else
148 task_base = (unsigned long) current_thread_info();
149 147
148 if (tsk == current && !_ksp)
149 __asm__ __volatile__("mov %%fp, %0" : "=r" (_ksp));
150
151 task_base = (unsigned long) task_stack_page(tsk);
150 fp = (unsigned long) _ksp; 152 fp = (unsigned long) _ksp;
151 do { 153 do {
152 /* Bogus frame pointer? */ 154 /* Bogus frame pointer? */
@@ -164,11 +166,7 @@ void show_stack(struct task_struct *tsk, unsigned long *_ksp)
164 166
165void dump_stack(void) 167void dump_stack(void)
166{ 168{
167 unsigned long *ksp; 169 show_stack(current, NULL);
168
169 __asm__ __volatile__("mov %%fp, %0"
170 : "=r" (ksp));
171 show_stack(current, ksp);
172} 170}
173 171
174EXPORT_SYMBOL(dump_stack); 172EXPORT_SYMBOL(dump_stack);