Skip to content

Commit ec953b7

Browse files
murzinvRussell King
authored andcommitted
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 <[email protected]> Signed-off-by: Russell King <[email protected]>
1 parent 5b526bd commit ec953b7

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

arch/arm/include/asm/domain.h

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@
8484

8585
#ifndef __ASSEMBLY__
8686

87+
#ifdef CONFIG_CPU_CP15_MMU
8788
static inline unsigned int get_domain(void)
8889
{
8990
unsigned int domain;
@@ -103,6 +104,16 @@ static inline void set_domain(unsigned val)
103104
: : "r" (val) : "memory");
104105
isb();
105106
}
107+
#else
108+
static inline unsigned int get_domain(void)
109+
{
110+
return 0;
111+
}
112+
113+
static inline void set_domain(unsigned val)
114+
{
115+
}
116+
#endif
106117

107118
#ifdef CONFIG_CPU_USE_DOMAINS
108119
#define modify_domain(dom,type) \

0 commit comments

Comments
 (0)