ARM: 8171/1: Use current_stack_pointer for return_address
authorBehan Webster <behanw@converseincode.com>
Fri, 26 Sep 2014 23:31:07 +0000 (00:31 +0100)
committerRussell King <rmk+kernel@arm.linux.org.uk>
Thu, 13 Nov 2014 23:58:01 +0000 (23:58 +0000)
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>
arch/arm/kernel/return_address.c

index 98ea4b7eb406604c6a37f2b34b77b75215d38d23..24b4a04846ebe749c3ce5ec4fc2b82a9961c2a5f 100644 (file)
@@ -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;