summaryrefslogtreecommitdiffstats
path: root/arch/arm/include
diff options
context:
space:
mode:
authorRussell King2014-04-13 19:47:34 +0200
committerRussell King2014-05-22 17:27:27 +0200
commit4585eaff634b1bbb09686895221b3645f53f7a60 (patch)
treeeec2c251befcfeacbe83a9d864f04c0ef0595310 /arch/arm/include
parentARM: make get_cr()/set_cr() use unsigned long values (diff)
downloadkernel-qcow2-linux-4585eaff634b1bbb09686895221b3645f53f7a60.tar.gz
kernel-qcow2-linux-4585eaff634b1bbb09686895221b3645f53f7a60.tar.xz
kernel-qcow2-linux-4585eaff634b1bbb09686895221b3645f53f7a60.zip
ARM: use get_cr() rather than cr_alignment
Rather than reading the cr_alignment variable, use get_cr() to read directly from the hardware instead. We have two places where this occurs, neither of them are performance critical. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/include')
-rw-r--r--arch/arm/include/asm/cp15.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/arch/arm/include/asm/cp15.h b/arch/arm/include/asm/cp15.h
index d5bf322a0630..63427266015d 100644
--- a/arch/arm/include/asm/cp15.h
+++ b/arch/arm/include/asm/cp15.h
@@ -42,7 +42,7 @@
#ifndef __ASSEMBLY__
#if __LINUX_ARM_ARCH__ >= 4
-#define vectors_high() (cr_alignment & CR_V)
+#define vectors_high() (get_cr() & CR_V)
#else
#define vectors_high() (0)
#endif
@@ -113,6 +113,11 @@ static inline void set_copro_access(unsigned int val)
#define cr_no_alignment UL(0)
#define cr_alignment UL(0)
+static inline unsigned long get_cr(void)
+{
+ return 0;
+}
+
#endif /* ifdef CONFIG_CPU_CP15 / else */
#endif /* ifndef __ASSEMBLY__ */