Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 11358
b: refs/heads/master
c: b462705
h: refs/heads/master
v: v3
  • Loading branch information
Hugh Dickins authored and Linus Torvalds committed Oct 30, 2005
1 parent 563011b commit 54d101a
Show file tree
Hide file tree
Showing 6 changed files with 4 additions and 40 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: c74df32c724a1652ad8399b4891bb02c9d43743a
refs/heads/master: b462705ac679f6195d1b23a752cda592d9107495
14 changes: 0 additions & 14 deletions trunk/arch/arm/mm/mm-armv.c
Original file line number Diff line number Diff line change
Expand Up @@ -179,11 +179,6 @@ pgd_t *get_pgd_slow(struct mm_struct *mm)
clean_dcache_area(new_pgd, PTRS_PER_PGD * sizeof(pgd_t));

if (!vectors_high()) {
/*
* This lock is here just to satisfy pmd_alloc and pte_lock
*/
spin_lock(&mm->page_table_lock);

/*
* On ARM, first page must always be allocated since it
* contains the machine vectors.
Expand All @@ -201,23 +196,14 @@ pgd_t *get_pgd_slow(struct mm_struct *mm)
set_pte(new_pte, *init_pte);
pte_unmap_nested(init_pte);
pte_unmap(new_pte);

spin_unlock(&mm->page_table_lock);
}

return new_pgd;

no_pte:
spin_unlock(&mm->page_table_lock);
pmd_free(new_pmd);
free_pages((unsigned long)new_pgd, 2);
return NULL;

no_pmd:
spin_unlock(&mm->page_table_lock);
free_pages((unsigned long)new_pgd, 2);
return NULL;

no_pgd:
return NULL;
}
Expand Down
15 changes: 0 additions & 15 deletions trunk/arch/arm26/mm/memc.c
Original file line number Diff line number Diff line change
Expand Up @@ -78,12 +78,6 @@ pgd_t *get_pgd_slow(struct mm_struct *mm)
if (!new_pgd)
goto no_pgd;

/*
* This lock is here just to satisfy pmd_alloc and pte_lock
* FIXME: I bet we could avoid taking it pretty much altogether
*/
spin_lock(&mm->page_table_lock);

/*
* On ARM, first page must always be allocated since it contains
* the machine vectors.
Expand Down Expand Up @@ -113,23 +107,14 @@ pgd_t *get_pgd_slow(struct mm_struct *mm)
memcpy(new_pgd + FIRST_KERNEL_PGD_NR, init_pgd + FIRST_KERNEL_PGD_NR,
(PTRS_PER_PGD - FIRST_KERNEL_PGD_NR) * sizeof(pgd_t));

spin_unlock(&mm->page_table_lock);

/* update MEMC tables */
cpu_memc_update_all(new_pgd);
return new_pgd;

no_pte:
spin_unlock(&mm->page_table_lock);
pmd_free(new_pmd);
free_pgd_slow(new_pgd);
return NULL;

no_pmd:
spin_unlock(&mm->page_table_lock);
free_pgd_slow(new_pgd);
return NULL;

no_pgd:
return NULL;
}
Expand Down
4 changes: 1 addition & 3 deletions trunk/arch/sparc/mm/generic.c
Original file line number Diff line number Diff line change
Expand Up @@ -81,9 +81,8 @@ int io_remap_pfn_range(struct vm_area_struct *vma, unsigned long from,
dir = pgd_offset(mm, from);
flush_cache_range(vma, beg, end);

spin_lock(&mm->page_table_lock);
while (from < end) {
pmd_t *pmd = pmd_alloc(current->mm, dir, from);
pmd_t *pmd = pmd_alloc(mm, dir, from);
error = -ENOMEM;
if (!pmd)
break;
Expand All @@ -93,7 +92,6 @@ int io_remap_pfn_range(struct vm_area_struct *vma, unsigned long from,
from = (from + PGDIR_SIZE) & PGDIR_MASK;
dir++;
}
spin_unlock(&mm->page_table_lock);

flush_tlb_range(vma, beg, end);
return error;
Expand Down
6 changes: 2 additions & 4 deletions trunk/arch/sparc64/mm/generic.c
Original file line number Diff line number Diff line change
Expand Up @@ -135,9 +135,8 @@ int io_remap_pfn_range(struct vm_area_struct *vma, unsigned long from,
dir = pgd_offset(mm, from);
flush_cache_range(vma, beg, end);

spin_lock(&mm->page_table_lock);
while (from < end) {
pud_t *pud = pud_alloc(current->mm, dir, from);
pud_t *pud = pud_alloc(mm, dir, from);
error = -ENOMEM;
if (!pud)
break;
Expand All @@ -147,8 +146,7 @@ int io_remap_pfn_range(struct vm_area_struct *vma, unsigned long from,
from = (from + PGDIR_SIZE) & PGDIR_MASK;
dir++;
}
flush_tlb_range(vma, beg, end);
spin_unlock(&mm->page_table_lock);

flush_tlb_range(vma, beg, end);
return error;
}
3 changes: 0 additions & 3 deletions trunk/arch/um/kernel/skas/mmu.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ static int init_stub_pte(struct mm_struct *mm, unsigned long proc,
pmd_t *pmd;
pte_t *pte;

spin_lock(&mm->page_table_lock);
pgd = pgd_offset(mm, proc);
pud = pud_alloc(mm, pgd, proc);
if (!pud)
Expand Down Expand Up @@ -63,15 +62,13 @@ static int init_stub_pte(struct mm_struct *mm, unsigned long proc,
*pte = mk_pte(virt_to_page(kernel), __pgprot(_PAGE_PRESENT));
*pte = pte_mkexec(*pte);
*pte = pte_wrprotect(*pte);
spin_unlock(&mm->page_table_lock);
return(0);

out_pmd:
pud_free(pud);
out_pte:
pmd_free(pmd);
out:
spin_unlock(&mm->page_table_lock);
return(-ENOMEM);
}

Expand Down

0 comments on commit 54d101a

Please sign in to comment.