aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sparc
diff options
context:
space:
mode:
authorHugh Dickins <hugh@veritas.com>2005-10-29 21:16:24 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2005-10-30 00:40:40 -0400
commitb462705ac679f6195d1b23a752cda592d9107495 (patch)
treec4d9be08f67b0ffdc66c3e170614bd03945f3c42 /arch/sparc
parentc74df32c724a1652ad8399b4891bb02c9d43743a (diff)
[PATCH] mm: arches skip ptlock
Convert those few architectures which are calling pud_alloc, pmd_alloc, pte_alloc_map on a user mm, not to take the page_table_lock first, nor drop it after. Each of these can continue to use pte_alloc_map, no need to change over to pte_alloc_map_lock, they're neither racy nor swappable. In the sparc64 io_remap_pfn_range, flush_tlb_range then falls outside of the page_table_lock: that's okay, on sparc64 it's like flush_tlb_mm, and that has always been called from outside of page_table_lock in dup_mmap. Signed-off-by: Hugh Dickins <hugh@veritas.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'arch/sparc')
-rw-r--r--arch/sparc/mm/generic.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/arch/sparc/mm/generic.c b/arch/sparc/mm/generic.c
index 659c9a71f867..9604893ffdbd 100644
--- a/arch/sparc/mm/generic.c
+++ b/arch/sparc/mm/generic.c
@@ -81,9 +81,8 @@ int io_remap_pfn_range(struct vm_area_struct *vma, unsigned long from,
81 dir = pgd_offset(mm, from); 81 dir = pgd_offset(mm, from);
82 flush_cache_range(vma, beg, end); 82 flush_cache_range(vma, beg, end);
83 83
84 spin_lock(&mm->page_table_lock);
85 while (from < end) { 84 while (from < end) {
86 pmd_t *pmd = pmd_alloc(current->mm, dir, from); 85 pmd_t *pmd = pmd_alloc(mm, dir, from);
87 error = -ENOMEM; 86 error = -ENOMEM;
88 if (!pmd) 87 if (!pmd)
89 break; 88 break;
@@ -93,7 +92,6 @@ int io_remap_pfn_range(struct vm_area_struct *vma, unsigned long from,
93 from = (from + PGDIR_SIZE) & PGDIR_MASK; 92 from = (from + PGDIR_SIZE) & PGDIR_MASK;
94 dir++; 93 dir++;
95 } 94 }
96 spin_unlock(&mm->page_table_lock);
97 95
98 flush_tlb_range(vma, beg, end); 96 flush_tlb_range(vma, beg, end);
99 return error; 97 return error;