Commit 0876d825 authored by David S. Miller's avatar David S. Miller

[SPARC64]: Implement dump stack and handle dumping currents stack properly.

parent a2eb0723
......@@ -1575,6 +1575,9 @@ void show_trace_raw(struct thread_info *tp, unsigned long ksp)
struct reg_window *rw;
int count = 0;
if (tp == current_thread_info())
flushw_all();
fp = ksp + STACK_BIAS;
thread_base = (unsigned long) tp;
do {
......@@ -1597,6 +1600,15 @@ void show_trace_task(struct task_struct *tsk)
tsk->thread_info->ksp);
}
void dump_stack(void)
{
unsigned long ksp;
__asm__ __volatile__("mov %%fp, %0"
: "=r" (ksp));
show_trace_raw(current_thread_info(), ksp);
}
void die_if_kernel(char *str, struct pt_regs *regs)
{
static int die_counter;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment