summaryrefslogtreecommitdiff
path: root/arch/arm/include/asm/cp15.h
diff options
context:
space:
mode:
authorRussell King <rmk+kernel@arm.linux.org.uk>2014-04-13 21:47:34 +0400
committerRussell King <rmk+kernel@arm.linux.org.uk>2014-05-22 19:27:27 +0400
commit4585eaff634b1bbb09686895221b3645f53f7a60 (patch)
treeeec2c251befcfeacbe83a9d864f04c0ef0595310 /arch/arm/include/asm/cp15.h
parent7668fd577bae5bba50e97d257a4cf0c44ca002d3 (diff)
downloadlinux-4585eaff634b1bbb09686895221b3645f53f7a60.tar.xz
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/asm/cp15.h')
-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__ */