summaryrefslogtreecommitdiff
path: root/arch/arm
diff options
context:
space:
mode:
authorBehan Webster <behanw@converseincode.com>2014-09-27 00:31:07 +0100
committerRussell King <rmk+kernel@arm.linux.org.uk>2014-11-13 23:58:01 +0000
commita556ee1247b99720d9ba6d8a3ed43dd960575d07 (patch)
treebd187df1d49f1639d5cd82f1b55d13b8b76e069d /arch/arm
parent0abc08baf2ddf61a37d375a9fb832be612f9c5a5 (diff)
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: 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>
Diffstat (limited to 'arch/arm')
-rw-r--r--arch/arm/kernel/return_address.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/arch/arm/kernel/return_address.c b/arch/arm/kernel/return_address.c
index 98ea4b7eb406..24b4a04846eb 100644
--- a/arch/arm/kernel/return_address.c
+++ b/arch/arm/kernel/return_address.c
@@ -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;
frame.lr = (unsigned long)__builtin_return_address(0);
frame.pc = (unsigned long)return_address;