diff options
author | Behan Webster <behanw@converseincode.com> | 2014-09-27 01:31:07 +0200 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2014-11-14 00:58:01 +0100 |
commit | a556ee1247b99720d9ba6d8a3ed43dd960575d07 (patch) | |
tree | bd187df1d49f1639d5cd82f1b55d13b8b76e069d /arch | |
parent | ARM: 8170/1: Add global named register current_stack_pointer for ARM (diff) | |
download | linux-a556ee1247b99720d9ba6d8a3ed43dd960575d07.tar.xz linux-a556ee1247b99720d9ba6d8a3ed43dd960575d07.zip |
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')
-rw-r--r-- | arch/arm/kernel/return_address.c | 3 |
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; |