ARM: domains: move initial domain setting value to asm/domains.h
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
This commit is contained in:
parent
8e798706f7
commit
0171356a77
|
@ -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:
|
||||||
#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
|
||||||
|
|
Loading…
Reference in New Issue