Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 231542
b: refs/heads/master
c: b3697c0
h: refs/heads/master
v: v3
  • Loading branch information
Andrea Arcangeli authored and Linus Torvalds committed Jan 16, 2011
1 parent 0f4ac15 commit 57b3ae0
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 19 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: 7e3d0eb0b028ed9e9384e6afcae2f22993bbdf25
refs/heads/master: b3697c0255d9d73eaaa4deb4512e3f0ff97b3b71
14 changes: 3 additions & 11 deletions trunk/include/asm-generic/pgtable.h
Original file line number Diff line number Diff line change
Expand Up @@ -87,14 +87,6 @@ static inline pmd_t pmdp_get_and_clear(struct mm_struct *mm,
pmd_clear(mm, address, pmdp);
return pmd;
})
#else /* CONFIG_TRANSPARENT_HUGEPAGE */
static inline pmd_t pmdp_get_and_clear(struct mm_struct *mm,
unsigned long address,
pmd_t *pmdp)
{
BUG();
return __pmd(0);
}
#endif /* CONFIG_TRANSPARENT_HUGEPAGE */
#endif

Expand Down Expand Up @@ -163,9 +155,9 @@ static inline void pmdp_set_wrprotect(struct mm_struct *mm,
#endif

#ifndef __HAVE_ARCH_PMDP_SPLITTING_FLUSH
extern pmd_t pmdp_clear_flush(struct vm_area_struct *vma,
unsigned long address,
pmd_t *pmdp);
extern pmd_t pmdp_splitting_flush(struct vm_area_struct *vma,
unsigned long address,
pmd_t *pmdp);
#endif

#ifndef __HAVE_ARCH_PTE_SAME
Expand Down
11 changes: 4 additions & 7 deletions trunk/mm/pgtable-generic.c
Original file line number Diff line number Diff line change
Expand Up @@ -92,32 +92,29 @@ pte_t ptep_clear_flush(struct vm_area_struct *vma, unsigned long address,
#endif

#ifndef __HAVE_ARCH_PMDP_CLEAR_FLUSH
#ifdef CONFIG_TRANSPARENT_HUGEPAGE
pmd_t pmdp_clear_flush(struct vm_area_struct *vma, unsigned long address,
pmd_t *pmdp)
{
pmd_t pmd;
#ifndef CONFIG_TRANSPARENT_HUGEPAGE
BUG();
#endif /* CONFIG_TRANSPARENT_HUGEPAGE */
VM_BUG_ON(address & ~HPAGE_PMD_MASK);
pmd = pmdp_get_and_clear(vma->vm_mm, address, pmdp);
flush_tlb_range(vma, address, address + HPAGE_PMD_SIZE);
return pmd;
}
#endif /* CONFIG_TRANSPARENT_HUGEPAGE */
#endif

#ifndef __HAVE_ARCH_PMDP_SPLITTING_FLUSH
#ifdef CONFIG_TRANSPARENT_HUGEPAGE
pmd_t pmdp_splitting_flush(struct vm_area_struct *vma, unsigned long address,
pmd_t *pmdp)
{
#ifdef CONFIG_TRANSPARENT_HUGEPAGE
pmd_t pmd = pmd_mksplitting(*pmdp);
VM_BUG_ON(address & ~HPAGE_PMD_MASK);
set_pmd_at(vma->vm_mm, address, pmdp, pmd);
/* tlb flush only to serialize against gup-fast */
flush_tlb_range(vma, address, address + HPAGE_PMD_SIZE);
#else /* CONFIG_TRANSPARENT_HUGEPAGE */
BUG();
#endif /* CONFIG_TRANSPARENT_HUGEPAGE */
}
#endif /* CONFIG_TRANSPARENT_HUGEPAGE */
#endif

0 comments on commit 57b3ae0

Please sign in to comment.