From: Heiko Carstens Date: Thu, 14 Mar 2013 12:44:25 +0000 (+0100) Subject: s390/dumpstack: fix call chain walking X-Git-Tag: omap-for-v3.10/dt-fixes-for-merge-window~146^2~45 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1bca09f7144450989e409c82ff0db83dddf489ac;p=pandora-kernel.git s390/dumpstack: fix call chain walking dumpstack() did not always print a sane callchain when being called. The reason is that show_trace() accessed register 15 directly to get the current stack pointer and passed that pointer to __show_trace() which expects a valid stack frame pointer as argument. However due to tail call optimization the stack frame may not exist anymore when __show_trace() gets called and therefore an invalid stack frame pointer gets passed. To prevent that disable tail call optimization for call chain walking functions. So move all the show_* functions to a dumpstack.c file like other architectures have it already and add a -fno-optimize-sibling-calls compile flag to both dumpstack.c and stacktrace.c to prevent tail call optimization. Fixes callchains that looked e.g. like this: [ 12.868258] Call Trace: [ 12.868262] ([<0000000000008000>] 0x8000) Signed-off-by: Heiko Carstens Signed-off-by: Martin Schwidefsky --- Reading git-diff-tree failed