Commit a556ee12 authored by Behan Webster's avatar Behan Webster Committed by Russell King
Browse files

ARM: 8171/1: Use current_stack_pointer for return_address

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: default avatarBehan Webster <>
Reviewed-by: default avatarMark Charlebois <>
Reviewed-by: default avatarJan-Simon Möller <>
Acked-by: default avatarWill Deacon <>
Acked-by: default avatarNicolas Pitre <>
Signed-off-by: default avatarRussell King <>
parent 0abc08ba
......@@ -39,13 +39,12 @@ void *return_address(unsigned int level)
struct return_address_data data;
struct stackframe frame;
register unsigned long current_sp asm ("sp");
data.level = level + 2;
data.addr = NULL;
frame.fp = (unsigned long)__builtin_frame_address(0);
frame.sp = current_sp;
frame.sp = current_stack_pointer; = (unsigned long)__builtin_return_address(0);
frame.pc = (unsigned long)return_address;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment