diff options
author | Imre_Deak <imre.deak@solidboot.com> | 2007-02-11 07:45:13 -0500 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2007-02-11 12:06:17 -0500 |
commit | 44b18693904e65d840ae999ac8aa717551cf509f (patch) | |
tree | e4c7c9b1676a94d4488b0a5a4023fcbf23c002e4 /arch/arm/mm | |
parent | eeea82ff4a3aebed9f501f04ca7b65d3605f247a (diff) |
[ARM] 4158/1: Fix user page protection macros
The PAGE_* user page protection macros don't take into account the
configured memory policy and other architecture specific bits like
the global/ASID and shared mapping bits. Instead of constants let
these depend on a variable fixed up at init just like PAGE_KERNEL.
Signed-off-by: Imre Deak <imre.deak@solidboot.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/mm')
-rw-r--r-- | arch/arm/mm/mmu.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/arm/mm/mmu.c b/arch/arm/mm/mmu.c index 655c8376f0b5..94fd4bf5cb9e 100644 --- a/arch/arm/mm/mmu.c +++ b/arch/arm/mm/mmu.c | |||
@@ -49,8 +49,10 @@ pmd_t *top_pmd; | |||
49 | 49 | ||
50 | static unsigned int cachepolicy __initdata = CPOLICY_WRITEBACK; | 50 | static unsigned int cachepolicy __initdata = CPOLICY_WRITEBACK; |
51 | static unsigned int ecc_mask __initdata = 0; | 51 | static unsigned int ecc_mask __initdata = 0; |
52 | pgprot_t pgprot_user; | ||
52 | pgprot_t pgprot_kernel; | 53 | pgprot_t pgprot_kernel; |
53 | 54 | ||
55 | EXPORT_SYMBOL(pgprot_user); | ||
54 | EXPORT_SYMBOL(pgprot_kernel); | 56 | EXPORT_SYMBOL(pgprot_kernel); |
55 | 57 | ||
56 | struct cachepolicy { | 58 | struct cachepolicy { |
@@ -345,6 +347,7 @@ static void __init build_mem_type_table(void) | |||
345 | mem_types[MT_MINICLEAN].prot_sect &= ~PMD_SECT_TEX(1); | 347 | mem_types[MT_MINICLEAN].prot_sect &= ~PMD_SECT_TEX(1); |
346 | } | 348 | } |
347 | 349 | ||
350 | pgprot_user = __pgprot(L_PTE_PRESENT | L_PTE_YOUNG | user_pgprot); | ||
348 | pgprot_kernel = __pgprot(L_PTE_PRESENT | L_PTE_YOUNG | | 351 | pgprot_kernel = __pgprot(L_PTE_PRESENT | L_PTE_YOUNG | |
349 | L_PTE_DIRTY | L_PTE_WRITE | | 352 | L_PTE_DIRTY | L_PTE_WRITE | |
350 | L_PTE_EXEC | kern_pgprot); | 353 | L_PTE_EXEC | kern_pgprot); |