x86/unwind: Move common code into update_stack_state()
authorJosh Poimboeuf <jpoimboe@redhat.com>
Wed, 12 Apr 2017 18:47:10 +0000 (13:47 -0500)
committerIngo Molnar <mingo@kernel.org>
Fri, 14 Apr 2017 08:19:49 +0000 (10:19 +0200)
commit5ed8d8bb38c5dcd78de540182cedb0fb19399aab
tree8a8fa0f779e57d4e7b35f918062268d2c6c893a1
parentb5effd3815ccbe3df1a015a6d67d8a24a27813d5
x86/unwind: Move common code into update_stack_state()

The __unwind_start() and unwind_next_frame() functions have some
duplicated functionality.  They both call decode_frame_pointer() and set
state->regs and state->bp accordingly.  Move that functionality to a
common place in update_stack_state().

Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com>
Acked-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Andy Lutomirski <luto@kernel.org>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Brian Gerst <brgerst@gmail.com>
Cc: Daniel Borkmann <daniel@iogearbox.net>
Cc: Dave Jones <davej@codemonkey.org.uk>
Cc: Denys Vlasenko <dvlasenk@redhat.com>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/a2ee4801113f6d2300d58f08f6b69f85edf4eb43.1492020577.git.jpoimboe@redhat.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
arch/x86/kernel/unwind_frame.c