]> Pileus Git - ~andy/linux/commit
sh: Generalize CALLER_ADDRx support.
authorPaul Mundt <lethal@linux-sh.org>
Tue, 13 Oct 2009 04:10:14 +0000 (13:10 +0900)
committerPaul Mundt <lethal@linux-sh.org>
Tue, 13 Oct 2009 04:10:14 +0000 (13:10 +0900)
commitac4fac8cb24ab209ae373a3e3e9995dff7d0c394
tree705fbf8cbb583bb3d055cd38dec813e19a746c1f
parent5852b203ef1b85a8eacc1cc686ed9bac11ee31cc
sh: Generalize CALLER_ADDRx support.

This splits out the unwinder implementation and adds a new
return_address() abstraction modelled after the ARM code. The DWARF
unwinder is tied in to this, returning NULL otherwise in the case of
being unable to support arbitrary depths.

This enables us to get correct behaviour with the unwinder enabled,
as well as disabling the arbitrary depth support when frame pointers are
enabled, as arbitrary depths with __builtin_return_address() are not
supported regardless.

With this abstraction it's also possible to layer on a simplified
implementation with frame pointers in the event that the unwinder isn't
enabled, although this is left as a future exercise.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
arch/sh/include/asm/dwarf.h
arch/sh/include/asm/ftrace.h
arch/sh/kernel/Makefile
arch/sh/kernel/return_address.c [new file with mode: 0644]