aboutsummaryrefslogtreecommitdiffstats
path: root/arch/um/kernel/skas/mmu.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/um/kernel/skas/mmu.c')
-rw-r--r--arch/um/kernel/skas/mmu.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/arch/um/kernel/skas/mmu.c b/arch/um/kernel/skas/mmu.c
index d837223e22af..240143b616a2 100644
--- a/arch/um/kernel/skas/mmu.c
+++ b/arch/um/kernel/skas/mmu.c
@@ -56,6 +56,9 @@ static int init_stub_pte(struct mm_struct *mm, unsigned long proc,
56 */ 56 */
57 57
58 mm->context.skas.last_page_table = pmd_page_kernel(*pmd); 58 mm->context.skas.last_page_table = pmd_page_kernel(*pmd);
59#ifdef CONFIG_3_LEVEL_PGTABLES
60 mm->context.skas.last_pmd = (unsigned long) __va(pud_val(*pud));
61#endif
59 62
60 *pte = mk_pte(virt_to_page(kernel), __pgprot(_PAGE_PRESENT)); 63 *pte = mk_pte(virt_to_page(kernel), __pgprot(_PAGE_PRESENT));
61 *pte = pte_mkexec(*pte); 64 *pte = pte_mkexec(*pte);
@@ -144,6 +147,10 @@ void destroy_context_skas(struct mm_struct *mm)
144 147
145 if(!proc_mm || !ptrace_faultinfo){ 148 if(!proc_mm || !ptrace_faultinfo){
146 free_page(mmu->id.stack); 149 free_page(mmu->id.stack);
147 free_page(mmu->last_page_table); 150 pte_free_kernel((pte_t *) mmu->last_page_table);
151 dec_page_state(nr_page_table_pages);
152#ifdef CONFIG_3_LEVEL_PGTABLES
153 pmd_free((pmd_t *) mmu->last_pmd);
154#endif
148 } 155 }
149} 156}