summaryrefslogtreecommitdiff
path: root/arch/sh/kernel/return_address.c
AgeCommit message (Collapse)Author
2010-05-25sh: handle early calls to return_address() when using dwarf unwinder.Paul Mundt
The dwarf unwinder ties in to an early initcall, but it's possible that return_address() calls will be made prior to that. This implements some additional error handling in to the dwarf unwinder as well as an exit path in the return_address() case to bail out if the unwinder hasn't come up yet. This fixes a NULL pointer deref in early boot when mempool_alloc() blows up on the not-yet-ready mempool via dwarf_unwind_stack(). Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-04-02sh: export return_address() symbol.Paul Mundt
This is needed with some of the tracing code built as modules, so provide the export. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-10-13sh: Generalize CALLER_ADDRx support.Paul Mundt
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>