Skip to content

Commit 74dbeee

Browse files
behanwRussell King
authored andcommitted
ARM: 8172/1: Use current_stack_pointer in save_stack_trace_tsk
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 <behanw@converseincode.com> Reviewed-by: Mark Charlebois <charlebm@gmail.com> Reviewed-by: Jan-Simon Möller <dl9pf@gmx.de> Acked-by: Will Deacon <will.deacon@arm.com> Acked-by: Nicolas Pitre <nico@linaro.org> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
1 parent a556ee1 commit 74dbeee

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

‎arch/arm/kernel/stacktrace.c‎

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -134,12 +134,10 @@ static noinline void __save_stack_trace(struct task_struct *tsk,
134134
frame.pc = thread_saved_pc(tsk);
135135
#endif
136136
} else {
137-
register unsigned long current_sp asm ("sp");
138-
139137
/* We don't want this function nor the caller */
140138
data.skip += 2;
141139
frame.fp = (unsigned long)__builtin_frame_address(0);
142-
frame.sp = current_sp;
140+
frame.sp = current_stack_pointer;
143141
frame.lr = (unsigned long)__builtin_return_address(0);
144142
frame.pc = (unsigned long)__save_stack_trace;
145143
}

0 commit comments

Comments
 (0)