search for: mmu_interval_notifier_start

Displaying 5 results from an estimated 5 matches for "mmu_interval_notifier_start".

2020 Jan 13
0
[PATCH v6 5/6] nouveau: use new mmu interval notifiers
...LL; + } + + return smi; +} + +static void nouveau_svmm_do_unmap(struct mmu_interval_notifier *mni, + const struct mmu_notifier_range *range) +{ + struct svmm_interval *smi = + container_of(mni, struct svmm_interval, notifier); + struct nouveau_svmm *svmm = smi->svmm; + unsigned long start = mmu_interval_notifier_start(mni); + unsigned long last = mmu_interval_notifier_last(mni); + + if (start >= range->start) { + /* Remove the whole interval or keep the right-hand part. */ + if (last <= range->end) + mmu_interval_notifier_put(mni); + else + mmu_interval_notifier_update(mni, range->end, last...
2020 Jan 14
2
[PATCH v6 5/6] nouveau: use new mmu interval notifiers
...static void nouveau_svmm_do_unmap(struct mmu_interval_notifier *mni, > + const struct mmu_notifier_range *range) > +{ > + struct svmm_interval *smi = > + container_of(mni, struct svmm_interval, notifier); > + struct nouveau_svmm *svmm = smi->svmm; > + unsigned long start = mmu_interval_notifier_start(mni); > + unsigned long last = mmu_interval_notifier_last(mni); This whole algorithm only works if it is protected by the read side of the interval tree lock. Deserves at least a comment if not an assertion too. > static int nouveau_range_fault(struct nouveau_svmm *svmm, > st...
2020 Jan 13
9
[PATCH v6 0/6] mm/hmm/test: add self tests for HMM
This series adds new functions to the mmu interval notifier API to allow device drivers with MMUs to dynamically mirror a process' page tables based on device faults and invalidation callbacks. The Nouveau driver is updated to use the extended API and a set of stand alone self tests is added to help validate and maintain correctness. The patches are based on linux-5.5.0-rc6 and are for
2020 Jan 13
0
[PATCH v6 4/6] mm/mmu_notifier: add mmu_interval_notifier_find()
..._update(struct mmu_interval_notifier *mni, unsigned long start, unsigned long last); +struct mmu_interval_notifier *mmu_interval_notifier_find(struct mm_struct *mm, + const struct mmu_interval_notifier_ops *ops, + unsigned long start, unsigned long last); + +static inline unsigned long mmu_interval_notifier_start( + struct mmu_interval_notifier *mni) +{ + return mni->interval_tree.start; +} + +static inline unsigned long mmu_interval_notifier_last( + struct mmu_interval_notifier *mni) +{ + return mni->interval_tree.last; +} /** * mmu_interval_set_seq - Save the invalidation sequence diff --...
2020 Jan 15
0
[PATCH v6 5/6] nouveau: use new mmu interval notifiers
..._do_unmap(struct mmu_interval_notifier *mni, >> + const struct mmu_notifier_range *range) >> +{ >> + struct svmm_interval *smi = >> + container_of(mni, struct svmm_interval, notifier); >> + struct nouveau_svmm *svmm = smi->svmm; >> + unsigned long start = mmu_interval_notifier_start(mni); >> + unsigned long last = mmu_interval_notifier_last(mni); > > This whole algorithm only works if it is protected by the read side of > the interval tree lock. Deserves at least a comment if not an > assertion too. This is called from the invalidate() callback and while ho...