aboutsummaryrefslogtreecommitdiffstats
path: root/mm/mmap.c
diff options
context:
space:
mode:
authorHugh Dickins <hughd@google.com>2013-04-23 11:20:35 +0100
committerRussell King <rmk+kernel@arm.linux.org.uk>2013-04-25 13:15:37 +0100
commita0a9434dd50aac5971d63207ff1e25e69c9abdb3 (patch)
tree64af128498e7b5ff5944dcb43a1a499da583a906 /mm/mmap.c
parentb361d61dc1aaa9bdac0a0995e443c12146d916fd (diff)
downloadkernel_replicant_linux-a0a9434dd50aac5971d63207ff1e25e69c9abdb3.tar.gz
kernel_replicant_linux-a0a9434dd50aac5971d63207ff1e25e69c9abdb3.tar.bz2
kernel_replicant_linux-a0a9434dd50aac5971d63207ff1e25e69c9abdb3.zip
ARM: 7701/1: mm: Allow arch code to control the user page table ceiling
On architectures where a pgd entry may be shared between user and kernel (e.g. ARM+LPAE), freeing page tables needs a ceiling other than 0. This patch introduces a generic USER_PGTABLES_CEILING that arch code can override. It is the responsibility of the arch code setting the ceiling to ensure the complete freeing of the page tables (usually in pgd_free()). [catalin.marinas@arm.com: commit log; shift_arg_pages(), asm-generic/pgtables.h changes] Signed-off-by: Hugh Dickins <hughd@google.com> Signed-off-by: Catalin Marinas <catalin.marinas@arm.com> Cc: Andrew Morton <akpm@linux-foundation.org> Cc: <stable@vger.kernel.org> # 3.3+ Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'mm/mmap.c')
-rw-r--r--mm/mmap.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/mm/mmap.c b/mm/mmap.c
index 2664a47cec93..067ac4d1f29e 100644
--- a/mm/mmap.c
+++ b/mm/mmap.c
@@ -2303,7 +2303,7 @@ static void unmap_region(struct mm_struct *mm,
update_hiwater_rss(mm);
unmap_vmas(&tlb, vma, start, end);
free_pgtables(&tlb, vma, prev ? prev->vm_end : FIRST_USER_ADDRESS,
- next ? next->vm_start : 0);
+ next ? next->vm_start : USER_PGTABLES_CEILING);
tlb_finish_mmu(&tlb, start, end);
}
@@ -2683,7 +2683,7 @@ void exit_mmap(struct mm_struct *mm)
/* 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, 0);
+ free_pgtables(&tlb, vma, FIRST_USER_ADDRESS, USER_PGTABLES_CEILING);
tlb_finish_mmu(&tlb, 0, -1);
/*