s390/unwind: introduce stack unwind API
authorMartin Schwidefsky <schwidefsky@de.ibm.com>
Mon, 28 Jan 2019 07:33:08 +0000 (08:33 +0100)
committerMartin Schwidefsky <schwidefsky@de.ibm.com>
Thu, 2 May 2019 11:54:11 +0000 (13:54 +0200)
commit78c98f9074135d3dab4e39544e0a537f92388fce
tree6f6d96e8e0911fe2aa27ec89cca52d56d3ed6f7e
parent1c705ad5efae9c712e763a47fbcc95b87b7347d2
s390/unwind: introduce stack unwind API

Rework the dump_trace() stack unwinder interface to support different
unwinding algorithms. The new interface looks like this:

struct unwind_state state;
unwind_for_each_frame(&state, task, regs, start_stack)
do_something(state.sp, state.ip, state.reliable);

The unwind_bc.c file contains the implementation for the classic
back-chain unwinder.

One positive side effect of the new code is it now handles ftraced
functions gracefully. It prints the real name of the return function
instead of 'return_to_handler'.

Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
16 files changed:
arch/s390/include/asm/processor.h
arch/s390/include/asm/stacktrace.h [new file with mode: 0644]
arch/s390/include/asm/unwind.h [new file with mode: 0644]
arch/s390/kernel/Makefile
arch/s390/kernel/asm-offsets.c
arch/s390/kernel/dumpstack.c
arch/s390/kernel/irq.c
arch/s390/kernel/machine_kexec.c
arch/s390/kernel/perf_event.c
arch/s390/kernel/process.c
arch/s390/kernel/setup.c
arch/s390/kernel/smp.c
arch/s390/kernel/stacktrace.c
arch/s390/kernel/unwind_bc.c [new file with mode: 0644]
arch/s390/mm/maccess.c
arch/s390/oprofile/init.c