aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Charlebois <charlebm@gmail.com>2014-07-30 15:55:39 -0700
committerBehan Webster <behanw@converseincode.com>2014-07-30 20:28:41 -0700
commit489be6592b254f8813516eea5a1247f1e7a89cff (patch)
tree83cf41439c27c6a658d0ac40aad95ee8b6869245
parent9e13f189d8961a8f9c8befb4d2d693121fa1876c (diff)
arm64: LLVMLinux: Use global stack register variable for aarch64tracking-llvm-ll-20140818.0tracking-llvm-ll-20140814.0tracking-llvm-ll-20140807.0
To support both Clang and GCC, use the global stack register variable vs a local register variable. Author: Mark Charlebois <charlebm@gmail.com> Signed-off-by: Mark Charlebois <charlebm@gmail.com>
-rw-r--r--arch/arm64/include/asm/percpu.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/arm64/include/asm/percpu.h b/arch/arm64/include/asm/percpu.h
index 453a179469a3..5279e5733386 100644
--- a/arch/arm64/include/asm/percpu.h
+++ b/arch/arm64/include/asm/percpu.h
@@ -26,13 +26,13 @@ static inline void set_my_cpu_offset(unsigned long off)
static inline unsigned long __my_cpu_offset(void)
{
unsigned long off;
- register unsigned long *sp asm ("sp");
/*
* We want to allow caching the value, so avoid using volatile and
* instead use a fake stack read to hazard against barrier().
*/
- asm("mrs %0, tpidr_el1" : "=r" (off) : "Q" (*sp));
+ asm("mrs %0, tpidr_el1" : "=r" (off) :
+ "Q" (*(const unsigned long *)current_stack_pointer));
return off;
}