aboutsummaryrefslogtreecommitdiff
path: root/arch/arm/include/asm/thread_info.h
diff options
context:
space:
mode:
authorBehan Webster <behanw@converseincode.com>2014-09-27 00:31:04 +0100
committerAmit Pundir <amit.pundir@linaro.org>2017-05-25 18:18:49 +0530
commit601e0069c24bdf0c1ae4e49021e3deee8ba2749f (patch)
tree163f6444a0b015b8722fc60d6a28b3ce67b8ed99 /arch/arm/include/asm/thread_info.h
parent54162c778c8aac6c7d11fe2c0fe0bd416a298f36 (diff)
downloadlinux-linaro-stable-601e0069c24bdf0c1ae4e49021e3deee8ba2749f.tar.gz
UPSTREAM: ARM: 8170/1: Add global named register current_stack_pointer for ARM
Define a global named register for current_stack_pointer. The use of this new variable guarantees that both gcc and clang can access this register in C code. Signed-off-by: Behan Webster <behanw@converseincode.com> Reviewed-by: Jan-Simon Möller <dl9pf@gmx.de> Reviewed-by: Mark Charlebois <charlebm@gmail.com> 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> (cherry picked from commit 0abc08baf2ddf61a37d375a9fb832be612f9c5a5) Bug: 29520177 Signed-off-by: Mohan Srinivasan <srmohan@google.com> Change-Id: I35d828dc5787d5ec698ec4fba5cbc352805f92e8
Diffstat (limited to 'arch/arm/include/asm/thread_info.h')
-rw-r--r--arch/arm/include/asm/thread_info.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/arch/arm/include/asm/thread_info.h b/arch/arm/include/asm/thread_info.h
index d5250c26c5c5..2db0105605b7 100644
--- a/arch/arm/include/asm/thread_info.h
+++ b/arch/arm/include/asm/thread_info.h
@@ -82,6 +82,11 @@ struct thread_info {
#define init_stack (init_thread_union.stack)
/*
+ * how to get the current stack pointer in C
+ */
+register unsigned long current_stack_pointer asm ("sp");
+
+/*
* how to get the thread information struct from C
*/
static inline struct thread_info *current_thread_info(void) __attribute_const__;