Skip to content

Commit

Permalink
arm64: LLVMLinux: Use current_stack_pointer in save_stack_trace_tsk
Browse files Browse the repository at this point in the history
Use the global current_stack_pointer to get the value of the stack pointer.
This change supports being able to compile the kernel with both gcc and clang.

Signed-off-by: Behan Webster <[email protected]>
Signed-off-by: Mark Charlebois <[email protected]>
Reviewed-by: Jan-Simon Möller <[email protected]>
Reviewed-by: Olof Johansson <[email protected]>
Acked-by: Will Deacon <[email protected]>
Signed-off-by: Will Deacon <[email protected]>
  • Loading branch information
behanw authored and wildea01 committed Sep 8, 2014
1 parent 3337a10 commit bb28cec
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions arch/arm64/kernel/stacktrace.c
Original file line number Diff line number Diff line change
Expand Up @@ -111,10 +111,9 @@ void save_stack_trace_tsk(struct task_struct *tsk, struct stack_trace *trace)
frame.sp = thread_saved_sp(tsk);
frame.pc = thread_saved_pc(tsk);
} else {
register unsigned long current_sp asm("sp");
data.no_sched_functions = 0;
frame.fp = (unsigned long)__builtin_frame_address(0);
frame.sp = current_sp;
frame.sp = current_stack_pointer;
frame.pc = (unsigned long)save_stack_trace_tsk;
}

Expand Down

0 comments on commit bb28cec

Please sign in to comment.