Skip to content

Commit ff844b7

Browse files
kvaneeshmpe
authored andcommitted
powerpc/mm: Use generic version of pmdp_clear_flush_young()
The radix variant is going to require a flush_pmd_tlb_range(). With flush_pmd_tlb_range() added, pmdp_clear_flush_young() is the same as the generic version. So drop the powerpc specific variant. Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
1 parent 30bda41 commit ff844b7

File tree

2 files changed

+3
-13
lines changed

2 files changed

+3
-13
lines changed

arch/powerpc/include/asm/book3s/64/pgtable.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -298,9 +298,6 @@ extern int pmdp_set_access_flags(struct vm_area_struct *vma,
298298
#define __HAVE_ARCH_PMDP_TEST_AND_CLEAR_YOUNG
299299
extern int pmdp_test_and_clear_young(struct vm_area_struct *vma,
300300
unsigned long address, pmd_t *pmdp);
301-
#define __HAVE_ARCH_PMDP_CLEAR_YOUNG_FLUSH
302-
extern int pmdp_clear_flush_young(struct vm_area_struct *vma,
303-
unsigned long address, pmd_t *pmdp);
304301

305302
#define __HAVE_ARCH_PMDP_HUGE_GET_AND_CLEAR
306303
extern pmd_t pmdp_huge_get_and_clear(struct mm_struct *mm,

arch/powerpc/mm/pgtable_64.c

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -588,22 +588,15 @@ pmd_t pmdp_collapse_flush(struct vm_area_struct *vma, unsigned long address,
588588
return pmd;
589589
}
590590

591-
int pmdp_test_and_clear_young(struct vm_area_struct *vma,
592-
unsigned long address, pmd_t *pmdp)
593-
{
594-
return __pmdp_test_and_clear_young(vma->vm_mm, address, pmdp);
595-
}
596-
597591
/*
598592
* We currently remove entries from the hashtable regardless of whether
599-
* the entry was young or dirty. The generic routines only flush if the
600-
* entry was young or dirty which is not good enough.
593+
* the entry was young or dirty.
601594
*
602595
* We should be more intelligent about this but for the moment we override
603596
* these functions and force a tlb flush unconditionally
604597
*/
605-
int pmdp_clear_flush_young(struct vm_area_struct *vma,
606-
unsigned long address, pmd_t *pmdp)
598+
int pmdp_test_and_clear_young(struct vm_area_struct *vma,
599+
unsigned long address, pmd_t *pmdp)
607600
{
608601
return __pmdp_test_and_clear_young(vma->vm_mm, address, pmdp);
609602
}

0 commit comments

Comments
 (0)