Skip to content

Commit 33d336d

Browse files
kvaneeshmpe
authored andcommitted
powerpc/mm: Use generic version of ptep_clear_flush_young()
The radix variant is going to require a flush_tlb_range(). With flush_tlb_range() added, ptep_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 ff844b7 commit 33d336d

File tree

1 file changed

+7
-16
lines changed
  • arch/powerpc/include/asm/book3s/64

1 file changed

+7
-16
lines changed

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

Lines changed: 7 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -275,6 +275,13 @@ static inline unsigned long pte_update(struct mm_struct *mm,
275275
return old;
276276
}
277277

278+
/*
279+
* We currently remove entries from the hashtable regardless of whether
280+
* the entry was young or dirty.
281+
*
282+
* We should be more intelligent about this but for the moment we override
283+
* these functions and force a tlb flush unconditionally
284+
*/
278285
static inline int __ptep_test_and_clear_young(struct mm_struct *mm,
279286
unsigned long addr, pte_t *ptep)
280287
{
@@ -313,22 +320,6 @@ static inline void huge_ptep_set_wrprotect(struct mm_struct *mm,
313320
pte_update(mm, addr, ptep, _PAGE_WRITE, 0, 1);
314321
}
315322

316-
/*
317-
* We currently remove entries from the hashtable regardless of whether
318-
* the entry was young or dirty. The generic routines only flush if the
319-
* entry was young or dirty which is not good enough.
320-
*
321-
* We should be more intelligent about this but for the moment we override
322-
* these functions and force a tlb flush unconditionally
323-
*/
324-
#define __HAVE_ARCH_PTEP_CLEAR_YOUNG_FLUSH
325-
#define ptep_clear_flush_young(__vma, __address, __ptep) \
326-
({ \
327-
int __young = __ptep_test_and_clear_young((__vma)->vm_mm, __address, \
328-
__ptep); \
329-
__young; \
330-
})
331-
332323
#define __HAVE_ARCH_PTEP_GET_AND_CLEAR
333324
static inline pte_t ptep_get_and_clear(struct mm_struct *mm,
334325
unsigned long addr, pte_t *ptep)

0 commit comments

Comments
 (0)