diff options
author | Hugh Dickins <hugh@veritas.com> | 2005-10-29 21:16:24 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-10-30 00:40:40 -0400 |
commit | b462705ac679f6195d1b23a752cda592d9107495 (patch) | |
tree | c4d9be08f67b0ffdc66c3e170614bd03945f3c42 /arch/arm/mm/mm-armv.c | |
parent | c74df32c724a1652ad8399b4891bb02c9d43743a (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/arm/mm/mm-armv.c')
-rw-r--r-- | arch/arm/mm/mm-armv.c | 14 |
1 files changed, 0 insertions, 14 deletions
diff --git a/arch/arm/mm/mm-armv.c b/arch/arm/mm/mm-armv.c index 61bc2fa0511e..60f3e039bac2 100644 --- a/arch/arm/mm/mm-armv.c +++ b/arch/arm/mm/mm-armv.c | |||
@@ -180,11 +180,6 @@ pgd_t *get_pgd_slow(struct mm_struct *mm) | |||
180 | 180 | ||
181 | if (!vectors_high()) { | 181 | if (!vectors_high()) { |
182 | /* | 182 | /* |
183 | * This lock is here just to satisfy pmd_alloc and pte_lock | ||
184 | */ | ||
185 | spin_lock(&mm->page_table_lock); | ||
186 | |||
187 | /* | ||
188 | * On ARM, first page must always be allocated since it | 183 | * On ARM, first page must always be allocated since it |
189 | * contains the machine vectors. | 184 | * contains the machine vectors. |
190 | */ | 185 | */ |
@@ -201,23 +196,14 @@ pgd_t *get_pgd_slow(struct mm_struct *mm) | |||
201 | set_pte(new_pte, *init_pte); | 196 | set_pte(new_pte, *init_pte); |
202 | pte_unmap_nested(init_pte); | 197 | pte_unmap_nested(init_pte); |
203 | pte_unmap(new_pte); | 198 | pte_unmap(new_pte); |
204 | |||
205 | spin_unlock(&mm->page_table_lock); | ||
206 | } | 199 | } |
207 | 200 | ||
208 | return new_pgd; | 201 | return new_pgd; |
209 | 202 | ||
210 | no_pte: | 203 | no_pte: |
211 | spin_unlock(&mm->page_table_lock); | ||
212 | pmd_free(new_pmd); | 204 | pmd_free(new_pmd); |
213 | free_pages((unsigned long)new_pgd, 2); | ||
214 | return NULL; | ||
215 | |||
216 | no_pmd: | 205 | no_pmd: |
217 | spin_unlock(&mm->page_table_lock); | ||
218 | free_pages((unsigned long)new_pgd, 2); | 206 | free_pages((unsigned long)new_pgd, 2); |
219 | return NULL; | ||
220 | |||
221 | no_pgd: | 207 | no_pgd: |
222 | return NULL; | 208 | return NULL; |
223 | } | 209 | } |