Home
last modified time | relevance | path

Searched refs:encl_mm (Results 1 – 3 of 3) sorted by relevance

/openbmc/linux/arch/x86/kernel/cpu/sgx/
H A Dencl.c776 struct sgx_encl_mm *encl_mm = container_of(mn, struct sgx_encl_mm, mmu_notifier); in sgx_mmu_notifier_release() local
784 spin_lock(&encl_mm->encl->mm_lock); in sgx_mmu_notifier_release()
785 list_for_each_entry(tmp, &encl_mm->encl->mm_list, list) { in sgx_mmu_notifier_release()
786 if (tmp == encl_mm) { in sgx_mmu_notifier_release()
787 list_del_rcu(&encl_mm->list); in sgx_mmu_notifier_release()
792 spin_unlock(&encl_mm->encl->mm_lock); in sgx_mmu_notifier_release()
795 synchronize_srcu(&encl_mm->encl->srcu); in sgx_mmu_notifier_release()
802 struct sgx_encl_mm *encl_mm = container_of(mn, struct sgx_encl_mm, mmu_notifier); in sgx_mmu_notifier_free() local
805 kref_put(&encl_mm->encl->refcount, sgx_encl_release); in sgx_mmu_notifier_free()
807 kfree(encl_mm); in sgx_mmu_notifier_free()
[all …]
H A Ddriver.c47 struct sgx_encl_mm *encl_mm; in sgx_release() local
59 encl_mm = NULL; in sgx_release()
61 encl_mm = list_first_entry(&encl->mm_list, in sgx_release()
63 list_del_rcu(&encl_mm->list); in sgx_release()
69 if (!encl_mm) in sgx_release()
73 mmu_notifier_unregister(&encl_mm->mmu_notifier, encl_mm->mm); in sgx_release()
74 kfree(encl_mm); in sgx_release()
H A Dmain.c113 struct sgx_encl_mm *encl_mm; in sgx_reclaimer_age() local
119 list_for_each_entry_rcu(encl_mm, &encl->mm_list, list) { in sgx_reclaimer_age()
120 if (!mmget_not_zero(encl_mm->mm)) in sgx_reclaimer_age()
123 mmap_read_lock(encl_mm->mm); in sgx_reclaimer_age()
124 ret = !sgx_encl_test_and_clear_young(encl_mm->mm, page); in sgx_reclaimer_age()
125 mmap_read_unlock(encl_mm->mm); in sgx_reclaimer_age()
127 mmput_async(encl_mm->mm); in sgx_reclaimer_age()