summaryrefslogtreecommitdiffstats
path: root/arch/arm/kernel
diff options
context:
space:
mode:
authorBehan Webster <behanw@converseincode.com>2014-09-27 01:31:07 +0200
committerRussell King <rmk+kernel@arm.linux.org.uk>2014-11-14 00:58:01 +0100
commita556ee1247b99720d9ba6d8a3ed43dd960575d07 (patch)
treebd187df1d49f1639d5cd82f1b55d13b8b76e069d /arch/arm/kernel
parentARM: 8170/1: Add global named register current_stack_pointer for ARM (diff)
downloadlinux-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/arm/kernel')
-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;