aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mm/mmu.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mm/mmu.c')
-rw-r--r--arch/arm/mm/mmu.c35
1 files changed, 0 insertions, 35 deletions
diff --git a/arch/arm/mm/mmu.c b/arch/arm/mm/mmu.c
index 94ee0930d690..bd1a11e62f4e 100644
--- a/arch/arm/mm/mmu.c
+++ b/arch/arm/mm/mmu.c
@@ -1045,38 +1045,3 @@ void __init paging_init(struct machine_desc *mdesc)
1045 empty_zero_page = virt_to_page(zero_page); 1045 empty_zero_page = virt_to_page(zero_page);
1046 __flush_dcache_page(NULL, empty_zero_page); 1046 __flush_dcache_page(NULL, empty_zero_page);
1047} 1047}
1048
1049/*
1050 * In order to soft-boot, we need to insert a 1:1 mapping in place of
1051 * the user-mode pages. This will then ensure that we have predictable
1052 * results when turning the mmu off
1053 */
1054void setup_mm_for_reboot(char mode)
1055{
1056 unsigned long base_pmdval;
1057 pgd_t *pgd;
1058 int i;
1059
1060 /*
1061 * We need to access to user-mode page tables here. For kernel threads
1062 * we don't have any user-mode mappings so we use the context that we
1063 * "borrowed".
1064 */
1065 pgd = current->active_mm->pgd;
1066
1067 base_pmdval = PMD_SECT_AP_WRITE | PMD_SECT_AP_READ | PMD_TYPE_SECT;
1068 if (cpu_architecture() <= CPU_ARCH_ARMv5TEJ && !cpu_is_xscale())
1069 base_pmdval |= PMD_BIT4;
1070
1071 for (i = 0; i < FIRST_USER_PGD_NR + USER_PTRS_PER_PGD; i++, pgd++) {
1072 unsigned long pmdval = (i << PGDIR_SHIFT) | base_pmdval;
1073 pmd_t *pmd;
1074
1075 pmd = pmd_off(pgd, i << PGDIR_SHIFT);
1076 pmd[0] = __pmd(pmdval);
1077 pmd[1] = __pmd(pmdval + (1 << (PGDIR_SHIFT - 1)));
1078 flush_pmd_entry(pmd);
1079 }
1080
1081 local_flush_tlb_all();
1082}