Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 6877
b: refs/heads/master
c: 0e5c9f3
h: refs/heads/master
i:
  6875: 4d0ca8a
v: v3
  • Loading branch information
Chen, Kenneth W authored and Linus Torvalds committed Sep 5, 2005
1 parent 7e89abe commit 01154df
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 29 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: 02b0ccef903e85673ead74ddb7c431f2f7ce183d
refs/heads/master: 0e5c9f39f64d8a55c5db37a5ea43e37d3422fd92
23 changes: 3 additions & 20 deletions trunk/arch/i386/mm/hugetlbpage.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,20 +22,14 @@ pte_t *huge_pte_alloc(struct mm_struct *mm, unsigned long addr)
{
pgd_t *pgd;
pud_t *pud;
pmd_t *pmd;
pte_t *pte = NULL;

pgd = pgd_offset(mm, addr);
pud = pud_alloc(mm, pgd, addr);
pmd = pmd_alloc(mm, pud, addr);
if (pud)
pte = (pte_t *) pmd_alloc(mm, pud, addr);
BUG_ON(pte && !pte_none(*pte) && !pte_huge(*pte));

if (!pmd)
goto out;

pte = (pte_t *) pmd;
if (!pte_none(*pte) && !pte_huge(*pte))
hugetlb_clean_stale_pgtable(pte);
out:
return pte;
}

Expand Down Expand Up @@ -130,17 +124,6 @@ follow_huge_pmd(struct mm_struct *mm, unsigned long address,
}
#endif

void hugetlb_clean_stale_pgtable(pte_t *pte)
{
pmd_t *pmd = (pmd_t *) pte;
struct page *page;

page = pmd_page(*pmd);
pmd_clear(pmd);
dec_page_state(nr_page_table_pages);
page_cache_release(page);
}

/* x86_64 also uses this file */

#ifdef HAVE_ARCH_HUGETLB_UNMAPPED_AREA
Expand Down
1 change: 0 additions & 1 deletion trunk/include/asm-i386/page.h
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@ typedef struct { unsigned long pgprot; } pgprot_t;
#define HPAGE_MASK (~(HPAGE_SIZE - 1))
#define HUGETLB_PAGE_ORDER (HPAGE_SHIFT - PAGE_SHIFT)
#define HAVE_ARCH_HUGETLB_UNMAPPED_AREA
#define ARCH_HAS_HUGETLB_CLEAN_STALE_PGTABLE
#endif

#define pgd_val(x) ((x).pgd)
Expand Down
1 change: 0 additions & 1 deletion trunk/include/asm-x86_64/page.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
#define HPAGE_SIZE ((1UL) << HPAGE_SHIFT)
#define HPAGE_MASK (~(HPAGE_SIZE - 1))
#define HUGETLB_PAGE_ORDER (HPAGE_SHIFT - PAGE_SHIFT)
#define ARCH_HAS_HUGETLB_CLEAN_STALE_PGTABLE

#ifdef __KERNEL__
#ifndef __ASSEMBLY__
Expand Down
6 changes: 0 additions & 6 deletions trunk/include/linux/hugetlb.h
Original file line number Diff line number Diff line change
Expand Up @@ -70,12 +70,6 @@ pte_t huge_ptep_get_and_clear(struct mm_struct *mm, unsigned long addr,
void hugetlb_prefault_arch_hook(struct mm_struct *mm);
#endif

#ifndef ARCH_HAS_HUGETLB_CLEAN_STALE_PGTABLE
#define hugetlb_clean_stale_pgtable(pte) BUG()
#else
void hugetlb_clean_stale_pgtable(pte_t *pte);
#endif

#else /* !CONFIG_HUGETLB_PAGE */

static inline int is_vm_hugetlb_page(struct vm_area_struct *vma)
Expand Down

0 comments on commit 01154df

Please sign in to comment.