From: Frederic Weisbecker Date: Sat, 2 Jul 2011 13:00:52 +0000 (+0200) Subject: x86: Save stack pointer in perf live regs savings X-Git-Tag: MMI-PSA29.97-13-9~18912^2~16^2~5 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=9e46294dadedc0c04adcb8ce760bd2cd74f7332d;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git x86: Save stack pointer in perf live regs savings In order to prepare for fetching the stack pointer from the regs when possible in dump_trace() instead of taking the local one, save the current stack pointer in perf live regs saving. Signed-off-by: Frederic Weisbecker Cc: Ingo Molnar Cc: Thomas Gleixner Cc: H. Peter Anvin Cc: Peter Zijlstra Cc: Arnaldo Carvalho de Melo --- diff --git a/arch/x86/include/asm/perf_event.h b/arch/x86/include/asm/perf_event.h index d9d4dae305f6..094fb30817ab 100644 --- a/arch/x86/include/asm/perf_event.h +++ b/arch/x86/include/asm/perf_event.h @@ -152,6 +152,11 @@ extern unsigned long perf_misc_flags(struct pt_regs *regs); (regs)->bp = caller_frame_pointer(); \ (regs)->cs = __KERNEL_CS; \ regs->flags = 0; \ + asm volatile( \ + _ASM_MOV "%%"_ASM_SP ", %0\n" \ + : "=m" ((regs)->sp) \ + :: "memory" \ + ); \ } #else