From: Liam R. Howlett Date: Tue, 15 Dec 2020 19:30:38 +0000 (-0500) Subject: mm/mmap: linked list work.. part many of many X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=bdb220970e2231e1c528ecebfa370f6d72a6aa48;p=users%2Fjedix%2Flinux-maple.git mm/mmap: linked list work.. part many of many Signed-off-by: Liam R. Howlett --- diff --git a/mm/mmap.c b/mm/mmap.c index b17ad5b65818..ba3c6a52034f 100644 --- a/mm/mmap.c +++ b/mm/mmap.c @@ -2253,7 +2253,9 @@ static void unmap_region(struct mm_struct *mm, tlb_gather_mmu(&tlb, mm, start, end); update_hiwater_rss(mm); unmap_vmas_mt(&tlb, vma, mas, start, end); - free_pgtables(&tlb, vma, prev ? prev->vm_end : FIRST_USER_ADDRESS, max); + free_pgtables(&tlb, vma, + prev ? prev->vm_end : FIRST_USER_ADDRESS, + max); tlb_finish_mmu(&tlb, start, end); } /* @@ -3207,9 +3209,15 @@ void exit_mmap(struct mm_struct *mm) flush_cache_mm(mm); tlb_gather_mmu(&tlb, mm, 0, -1); /* update_hiwater_rss(mm) here? but nobody should be looking */ - /* Use -1 here to ensure all VMAs in the mm are unmapped */ - unmap_vmas(&tlb, vma, 0, -1); - free_pgtables(&tlb, vma, FIRST_USER_ADDRESS, USER_PGTABLES_CEILING); + mas_reset(&mas); + mas_set(&mas, FIRST_USER_ADDRESS); + /* Use 0 here to ensure all VMAs in the mm are unmapped */ +// unmap_vmas(&tlb, vma, 0, -1); + unmap_vmas_mt(&tlb, vma, &mas, 0, -1); + mas_reset(&mas); + mas_set(&mas, FIRST_USER_ADDRESS); +// free_pgtables(&tlb, vma, FIRST_USER_ADDRESS, USER_PGTABLES_CEILING); + free_mt_pgtables(&tlb, vma, &mas, FIRST_USER_ADDRESS, USER_PGTABLES_CEILING); tlb_finish_mmu(&tlb, 0, -1); /*