Skip to content

Commit

Permalink
sh: Wire up oops reporting in the die notifier chain.
Browse files Browse the repository at this point in the history
Commit 3f5a54e ("ftrace: dump out ftrace
buffers to console on panic") added an ftrace buffer dumper that hooks
in to the die notifier chain and dumps out data in the oops path.

Unfortunately SH supported ftrace but didn't support DIE_OOPS, so add
that in and get it building again.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
  • Loading branch information
Paul Mundt committed Oct 21, 2008
1 parent f7141d5 commit c9306f0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions arch/sh/include/asm/kdebug.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
/* Grossly misnamed. */
enum die_val {
DIE_TRAP,
DIE_OOPS,
};

#endif /* __ASM_SH_KDEBUG_H */
2 changes: 2 additions & 0 deletions arch/sh/kernel/traps_32.c
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,8 @@ void die(const char * str, struct pt_regs * regs, long err)
dump_mem("Stack: ", regs->regs[15], THREAD_SIZE +
(unsigned long)task_stack_page(current));

notify_die(DIE_OOPS, str, regs, err, 255, SIGSEGV);

bust_spinlocks(0);
add_taint(TAINT_DIE);
spin_unlock_irq(&die_lock);
Expand Down

0 comments on commit c9306f0

Please sign in to comment.