Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 323
b: refs/heads/master
c: 021740d
h: refs/heads/master
i:
  321: 7354094
  319: 3b729a5
v: v3
  • Loading branch information
Hugh Dickins authored and Linus Torvalds committed Apr 19, 2005
1 parent cc9d8fa commit de0ea23
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 47 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: 146425a316fb937fbdcac018b34a23c67d12214b
refs/heads/master: 021740dc30d184e3b0fa7679936e65a56090c425
11 changes: 2 additions & 9 deletions trunk/arch/i386/mm/hugetlbpage.c
Original file line number Diff line number Diff line change
Expand Up @@ -249,15 +249,8 @@ int hugetlb_prefault(struct address_space *mapping, struct vm_area_struct *vma)
goto out;
}

if (!pte_none(*pte)) {
pmd_t *pmd = (pmd_t *) pte;

page = pmd_page(*pmd);
pmd_clear(pmd);
mm->nr_ptes--;
dec_page_state(nr_page_table_pages);
page_cache_release(page);
}
if (!pte_none(*pte))
continue;

idx = ((addr - vma->vm_start) >> HPAGE_SHIFT)
+ (vma->vm_pgoff >> (HPAGE_SHIFT - PAGE_SHIFT));
Expand Down
37 changes: 0 additions & 37 deletions trunk/arch/ppc64/mm/hugetlbpage.c
Original file line number Diff line number Diff line change
Expand Up @@ -203,8 +203,6 @@ static int prepare_low_seg_for_htlb(struct mm_struct *mm, unsigned long seg)
unsigned long start = seg << SID_SHIFT;
unsigned long end = (seg+1) << SID_SHIFT;
struct vm_area_struct *vma;
unsigned long addr;
struct mmu_gather *tlb;

BUG_ON(seg >= 16);

Expand All @@ -213,41 +211,6 @@ static int prepare_low_seg_for_htlb(struct mm_struct *mm, unsigned long seg)
if (vma && (vma->vm_start < end))
return -EBUSY;

/* Clean up any leftover PTE pages in the region */
spin_lock(&mm->page_table_lock);
tlb = tlb_gather_mmu(mm, 0);
for (addr = start; addr < end; addr += PMD_SIZE) {
pgd_t *pgd = pgd_offset(mm, addr);
pmd_t *pmd;
struct page *page;
pte_t *pte;
int i;

if (pgd_none(*pgd))
continue;
pmd = pmd_offset(pgd, addr);
if (!pmd || pmd_none(*pmd))
continue;
if (pmd_bad(*pmd)) {
pmd_ERROR(*pmd);
pmd_clear(pmd);
continue;
}
pte = (pte_t *)pmd_page_kernel(*pmd);
/* No VMAs, so there should be no PTEs, check just in case. */
for (i = 0; i < PTRS_PER_PTE; i++) {
BUG_ON(!pte_none(*pte));
pte++;
}
page = pmd_page(*pmd);
pmd_clear(pmd);
mm->nr_ptes--;
dec_page_state(nr_page_table_pages);
pte_free_tlb(tlb, page);
}
tlb_finish_mmu(tlb, start, end);
spin_unlock(&mm->page_table_lock);

return 0;
}

Expand Down

0 comments on commit de0ea23

Please sign in to comment.