diff options
-rw-r--r-- | arch/x86/mm/pgtable.c | 12 | ||||
-rw-r--r-- | include/asm-x86/pgtable.h | 10 |
2 files changed, 14 insertions, 8 deletions
diff --git a/arch/x86/mm/pgtable.c b/arch/x86/mm/pgtable.c index 54bd77a7eee0..af0c50161d95 100644 --- a/arch/x86/mm/pgtable.c +++ b/arch/x86/mm/pgtable.c | |||
@@ -295,3 +295,15 @@ int ptep_test_and_clear_young(struct vm_area_struct *vma, | |||
295 | 295 | ||
296 | return ret; | 296 | return ret; |
297 | } | 297 | } |
298 | |||
299 | int ptep_clear_flush_young(struct vm_area_struct *vma, | ||
300 | unsigned long address, pte_t *ptep) | ||
301 | { | ||
302 | int young; | ||
303 | |||
304 | young = ptep_test_and_clear_young(vma, address, ptep); | ||
305 | if (young) | ||
306 | flush_tlb_page(vma, address); | ||
307 | |||
308 | return young; | ||
309 | } | ||
diff --git a/include/asm-x86/pgtable.h b/include/asm-x86/pgtable.h index 676408c98631..4ebea41ea70e 100644 --- a/include/asm-x86/pgtable.h +++ b/include/asm-x86/pgtable.h | |||
@@ -398,14 +398,8 @@ extern int ptep_test_and_clear_young(struct vm_area_struct *vma, | |||
398 | unsigned long addr, pte_t *ptep); | 398 | unsigned long addr, pte_t *ptep); |
399 | 399 | ||
400 | #define __HAVE_ARCH_PTEP_CLEAR_YOUNG_FLUSH | 400 | #define __HAVE_ARCH_PTEP_CLEAR_YOUNG_FLUSH |
401 | #define ptep_clear_flush_young(vma, address, ptep) \ | 401 | extern int ptep_clear_flush_young(struct vm_area_struct *vma, |
402 | ({ \ | 402 | unsigned long address, pte_t *ptep); |
403 | int __young; \ | ||
404 | __young = ptep_test_and_clear_young((vma), (address), (ptep)); \ | ||
405 | if (__young) \ | ||
406 | flush_tlb_page(vma, address); \ | ||
407 | __young; \ | ||
408 | }) | ||
409 | 403 | ||
410 | #define __HAVE_ARCH_PTEP_GET_AND_CLEAR | 404 | #define __HAVE_ARCH_PTEP_GET_AND_CLEAR |
411 | static inline pte_t ptep_get_and_clear(struct mm_struct *mm, unsigned long addr, | 405 | static inline pte_t ptep_get_and_clear(struct mm_struct *mm, unsigned long addr, |