summaryrefslogtreecommitdiffstats
path: root/arch/arm/include/asm/percpu.h
diff options
context:
space:
mode:
authorMark Charlebois <charlebm@gmail.com>2014-09-27 00:31:05 +0100
committerRussell King <rmk+kernel@arm.linux.org.uk>2014-11-13 23:58:06 +0000
commitccbd2da50db2111f6d055e3201c39a37e542ceb6 (patch)
tree95420fe2377eb5497fd26138c4db0901614a5403 /arch/arm/include/asm/percpu.h
parentf6c9cbf091a4b0769180d663e37621569b054d11 (diff)
downloadtalos-op-linux-ccbd2da50db2111f6d055e3201c39a37e542ceb6.tar.gz
talos-op-linux-ccbd2da50db2111f6d055e3201c39a37e542ceb6.zip
ARM: 8174/1: Use global stack register variable for percpu
Using global current_stack_pointer works on both clang and gcc. current_stack_pointer is an unsigned long and needs to be cast as a pointer to dereference. Signed-off-by: Mark Charlebois <charlebm@gmail.com> Signed-off-by: Behan Webster <behanw@converseincode.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/include/asm/percpu.h')
-rw-r--r--arch/arm/include/asm/percpu.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/arm/include/asm/percpu.h b/arch/arm/include/asm/percpu.h
index 209e6504922e..a89b4076cde4 100644
--- a/arch/arm/include/asm/percpu.h
+++ b/arch/arm/include/asm/percpu.h
@@ -30,14 +30,14 @@ 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");
/*
* Read TPIDRPRW.
* We want to allow caching the value, so avoid using volatile and
* instead use a fake stack read to hazard against barrier().
*/
- asm("mrc p15, 0, %0, c13, c0, 4" : "=r" (off) : "Q" (*sp));
+ asm("mrc p15, 0, %0, c13, c0, 4" : "=r" (off)
+ : "Q" (*(const unsigned long *)current_stack_pointer));
return off;
}
OpenPOWER on IntegriCloud