diff options
Diffstat (limited to 'arch/arm/mm/mmu.c')
-rw-r--r-- | arch/arm/mm/mmu.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/arch/arm/mm/mmu.c b/arch/arm/mm/mmu.c index 69852003675f..e7113d0b8168 100644 --- a/arch/arm/mm/mmu.c +++ b/arch/arm/mm/mmu.c | |||
@@ -421,6 +421,10 @@ static void __init build_mem_type_table(void) | |||
421 | user_pgprot |= L_PTE_SHARED; | 421 | user_pgprot |= L_PTE_SHARED; |
422 | kern_pgprot |= L_PTE_SHARED; | 422 | kern_pgprot |= L_PTE_SHARED; |
423 | vecs_pgprot |= L_PTE_SHARED; | 423 | vecs_pgprot |= L_PTE_SHARED; |
424 | mem_types[MT_DEVICE_WC].prot_sect |= PMD_SECT_S; | ||
425 | mem_types[MT_DEVICE_WC].prot_pte |= L_PTE_SHARED; | ||
426 | mem_types[MT_DEVICE_CACHED].prot_sect |= PMD_SECT_S; | ||
427 | mem_types[MT_DEVICE_CACHED].prot_pte |= L_PTE_SHARED; | ||
424 | mem_types[MT_MEMORY].prot_sect |= PMD_SECT_S; | 428 | mem_types[MT_MEMORY].prot_sect |= PMD_SECT_S; |
425 | mem_types[MT_MEMORY_NONCACHED].prot_sect |= PMD_SECT_S; | 429 | mem_types[MT_MEMORY_NONCACHED].prot_sect |= PMD_SECT_S; |
426 | #endif | 430 | #endif |
@@ -1087,10 +1091,12 @@ void setup_mm_for_reboot(char mode) | |||
1087 | pgd_t *pgd; | 1091 | pgd_t *pgd; |
1088 | int i; | 1092 | int i; |
1089 | 1093 | ||
1090 | if (current->mm && current->mm->pgd) | 1094 | /* |
1091 | pgd = current->mm->pgd; | 1095 | * We need to access to user-mode page tables here. For kernel threads |
1092 | else | 1096 | * we don't have any user-mode mappings so we use the context that we |
1093 | pgd = init_mm.pgd; | 1097 | * "borrowed". |
1098 | */ | ||
1099 | pgd = current->active_mm->pgd; | ||
1094 | 1100 | ||
1095 | base_pmdval = PMD_SECT_AP_WRITE | PMD_SECT_AP_READ | PMD_TYPE_SECT; | 1101 | base_pmdval = PMD_SECT_AP_WRITE | PMD_SECT_AP_READ | PMD_TYPE_SECT; |
1096 | if (cpu_architecture() <= CPU_ARCH_ARMv5TEJ && !cpu_is_xscale()) | 1102 | if (cpu_architecture() <= CPU_ARCH_ARMv5TEJ && !cpu_is_xscale()) |