X-Git-Url: https://git.kernelconcepts.de/?a=blobdiff_plain;f=mm%2Fmmu_notifier.c;h=5fbdd367bbed9c57bc9ffd600293a5913b44e752;hb=601d62959d08a450d4666c728ddd2f47c5ba1cfe;hp=3b9b3d0741b2a1546837761d90f7eec2c0b3b18b;hpb=104b61590dcd5f71ff518e2b820e1cdf9d0350f2;p=karo-tx-linux.git diff --git a/mm/mmu_notifier.c b/mm/mmu_notifier.c index 3b9b3d0741b2..5fbdd367bbed 100644 --- a/mm/mmu_notifier.c +++ b/mm/mmu_notifier.c @@ -123,6 +123,23 @@ int __mmu_notifier_clear_flush_young(struct mm_struct *mm, return young; } +int __mmu_notifier_clear_young(struct mm_struct *mm, + unsigned long start, + unsigned long end) +{ + struct mmu_notifier *mn; + int young = 0, id; + + id = srcu_read_lock(&srcu); + hlist_for_each_entry_rcu(mn, &mm->mmu_notifier_mm->list, hlist) { + if (mn->ops->clear_young) + young |= mn->ops->clear_young(mn, mm, start, end); + } + srcu_read_unlock(&srcu, id); + + return young; +} + int __mmu_notifier_test_young(struct mm_struct *mm, unsigned long address) {