]> err.no Git - linux-2.6/commitdiff
[SPARC]: dump_stack for sparc
authorTom 'spot' Callaway <tcallawa@redhat.com>
Mon, 25 Apr 2005 03:46:49 +0000 (20:46 -0700)
committerDavid S. Miller <davem@davemloft.net>
Mon, 25 Apr 2005 03:46:49 +0000 (20:46 -0700)
Bob Breuer wrote a patch to add dump_stack for sparc. Supposedly, this
was applied, but it doesn't exist in 2.6.11.

This is the same patch, rediffed against 2.6.11.

Signed-off-by: Tom 'spot' Callaway <tcallawa@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
arch/sparc/kernel/process.c

index 143fe2f3c1c453ace3b46b41552957ffb9aa03af..066e253f9c124fd1c29de3a42f2ee14ffa41ac8d 100644 (file)
@@ -333,6 +333,17 @@ void show_stack(struct task_struct *tsk, unsigned long *_ksp)
        printk("\n");
 }
 
+void dump_stack(void)
+{
+       unsigned long *ksp;
+
+       __asm__ __volatile__("mov       %%fp, %0"
+                            : "=r" (ksp));
+       show_stack(current, ksp);
+}
+
+EXPORT_SYMBOL(dump_stack);
+
 /*
  * Note: sparc64 has a pretty intricated thread_saved_pc, check it out.
  */