diff options
author | Vladimir Murzin <vladimir.murzin@arm.com> | 2016-05-04 10:39:02 +0100 |
---|---|---|
committer | Russell King <rmk+kernel@armlinux.org.uk> | 2016-05-05 19:03:02 +0100 |
commit | ec953b70f368330e806a94df6fe2dd1d72176b2d (patch) | |
tree | 83b5c0abd92b2f9490d6f3e9b3362af14babfbd0 | |
parent | 5b526bd92511a12807a51b7bedd16af03e99bc33 (diff) | |
download | linux-ec953b70f368330e806a94df6fe2dd1d72176b2d.tar.gz linux-ec953b70f368330e806a94df6fe2dd1d72176b2d.tar.bz2 linux-ec953b70f368330e806a94df6fe2dd1d72176b2d.zip |
ARM: 8573/1: domain: move {set,get}_domain under config guard
Recursive undefined instrcution falut is seen with R-class taking an
exception. The reson for that is __show_regs() tries to get domain
information, but domains is not available on !MMU cores, like R/M
class.
Fix it by puting {set,get}_domain functions under CONFIG_CPU_CP15_MMU
guard and providing stubs for the case where domains is not supported.
Signed-off-by: Vladimir Murzin <vladimir.murzin@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
-rw-r--r-- | arch/arm/include/asm/domain.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/arch/arm/include/asm/domain.h b/arch/arm/include/asm/domain.h index fc8ba1663601..99d9f630d6b6 100644 --- a/arch/arm/include/asm/domain.h +++ b/arch/arm/include/asm/domain.h @@ -84,6 +84,7 @@ #ifndef __ASSEMBLY__ +#ifdef CONFIG_CPU_CP15_MMU static inline unsigned int get_domain(void) { unsigned int domain; @@ -103,6 +104,16 @@ static inline void set_domain(unsigned val) : : "r" (val) : "memory"); isb(); } +#else +static inline unsigned int get_domain(void) +{ + return 0; +} + +static inline void set_domain(unsigned val) +{ +} +#endif #ifdef CONFIG_CPU_USE_DOMAINS #define modify_domain(dom,type) \ |