summaryrefslogtreecommitdiffstats
path: root/arch/arm/include
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2011-08-07 18:53:03 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2011-08-07 18:53:06 +0200
commit5e25c6f9752ca3ecd1b37ace655e46e27d0a6e30 (patch)
treee0e9872d9ef5cc8c319442637d3a7dd6029ea606 /arch/arm/include
parent017d5ca933ca2745d577ad4698f6ac884b43c36f (diff)
downloadbarebox-5e25c6f9752ca3ecd1b37ace655e46e27d0a6e30.tar.gz
barebox-5e25c6f9752ca3ecd1b37ace655e46e27d0a6e30.tar.xz
ARM: add missing volatile in get_cr()
Without it, the compiler optimizes away subsequent reads of the control register. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch/arm/include')
-rw-r--r--arch/arm/include/asm/system.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/arm/include/asm/system.h b/arch/arm/include/asm/system.h
index 77d63054ce..1d67492477 100644
--- a/arch/arm/include/asm/system.h
+++ b/arch/arm/include/asm/system.h
@@ -59,7 +59,7 @@
static inline unsigned int get_cr(void)
{
unsigned int val;
- asm("mrc p15, 0, %0, c1, c0, 0 @ get CR" : "=r" (val) : : "cc");
+ asm volatile ("mrc p15, 0, %0, c1, c0, 0 @ get CR" : "=r" (val) : : "cc");
return val;
}