Commit 0171356a authored by Russell King's avatar Russell King

ARM: domains: move initial domain setting value to asm/domains.h

Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
parent 8e798706
...@@ -58,6 +58,12 @@ ...@@ -58,6 +58,12 @@
#define domain_mask(dom) ((3) << (2 * (dom))) #define domain_mask(dom) ((3) << (2 * (dom)))
#define domain_val(dom,type) ((type) << (2 * (dom))) #define domain_val(dom,type) ((type) << (2 * (dom)))
#define DACR_INIT \
(domain_val(DOMAIN_USER, DOMAIN_MANAGER) | \
domain_val(DOMAIN_KERNEL, DOMAIN_MANAGER) | \
domain_val(DOMAIN_TABLE, DOMAIN_MANAGER) | \
domain_val(DOMAIN_IO, DOMAIN_CLIENT))
#ifndef __ASSEMBLY__ #ifndef __ASSEMBLY__
static inline unsigned int get_domain(void) static inline unsigned int get_domain(void)
......
...@@ -461,10 +461,7 @@ __enable_mmu: ...@@ -461,10 +461,7 @@ __enable_mmu:
#ifdef CONFIG_ARM_LPAE #ifdef CONFIG_ARM_LPAE
mcrr p15, 0, r4, r5, c2 @ load TTBR0 mcrr p15, 0, r4, r5, c2 @ load TTBR0
#else #else
mov r5, #(domain_val(DOMAIN_USER, DOMAIN_MANAGER) | \ mov r5, #DACR_INIT
domain_val(DOMAIN_KERNEL, DOMAIN_MANAGER) | \
domain_val(DOMAIN_TABLE, DOMAIN_MANAGER) | \
domain_val(DOMAIN_IO, DOMAIN_CLIENT))
mcr p15, 0, r5, c3, c0, 0 @ load domain access register mcr p15, 0, r5, c3, c0, 0 @ load domain access register
mcr p15, 0, r4, c2, c0, 0 @ load page table pointer mcr p15, 0, r4, c2, c0, 0 @ load page table pointer
#endif #endif
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment