x86/pgtable.h: demacro ptep_test_and_clear_young
Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com> Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
This commit is contained in:
committed by
Ingo Molnar
parent
ee5aa8d3ba
commit
f9fbf1a36a
@@ -280,3 +280,18 @@ int ptep_set_access_flags(struct vm_area_struct *vma,
|
||||
|
||||
return changed;
|
||||
}
|
||||
|
||||
int ptep_test_and_clear_young(struct vm_area_struct *vma,
|
||||
unsigned long addr, pte_t *ptep)
|
||||
{
|
||||
int ret = 0;
|
||||
|
||||
if (pte_young(*ptep))
|
||||
ret = test_and_clear_bit(_PAGE_BIT_ACCESSED,
|
||||
&ptep->pte);
|
||||
|
||||
if (ret)
|
||||
pte_update(vma->vm_mm, addr, ptep);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
Reference in New Issue
Block a user