summaryrefslogtreecommitdiffstats
path: root/arch/arm/include/asm/domain.h
diff options
context:
space:
mode:
authorRussell King <rmk+kernel@arm.linux.org.uk>2015-08-19 23:36:24 +0200
committerRussell King <rmk+kernel@arm.linux.org.uk>2015-08-21 14:55:50 +0200
commit8e798706f7e9cd7f096aa194de90269dde83773e (patch)
tree5250a05d9d65529bb36898bb54624f71e9f16c1b /arch/arm/include/asm/domain.h
parentARM: domains: switch to keeping domain value in register (diff)
downloadlinux-8e798706f7e9cd7f096aa194de90269dde83773e.tar.xz
linux-8e798706f7e9cd7f096aa194de90269dde83773e.zip
ARM: domains: provide domain_mask()
Provide a macro to generate the mask for a domain, rather than using domain_val(, DOMAIN_MANAGER) which won't work when CPU_USE_DOMAINS is turned off. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/include/asm/domain.h')
-rw-r--r--arch/arm/include/asm/domain.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/arch/arm/include/asm/domain.h b/arch/arm/include/asm/domain.h
index 7f2941905714..045b9b453bcd 100644
--- a/arch/arm/include/asm/domain.h
+++ b/arch/arm/include/asm/domain.h
@@ -55,7 +55,8 @@
#define DOMAIN_MANAGER 1
#endif
-#define domain_val(dom,type) ((type) << (2*(dom)))
+#define domain_mask(dom) ((3) << (2 * (dom)))
+#define domain_val(dom,type) ((type) << (2 * (dom)))
#ifndef __ASSEMBLY__
@@ -82,7 +83,7 @@ static inline void set_domain(unsigned val)
#define modify_domain(dom,type) \
do { \
unsigned int domain = get_domain(); \
- domain &= ~domain_val(dom, DOMAIN_MANAGER); \
+ domain &= ~domain_mask(dom); \
domain = domain | domain_val(dom, type); \
set_domain(domain); \
} while (0)