Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:mm\mmu_notifier.c Create Date:2022-07-28 15:37:28
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:__mmu_interval_notifier_insert

Proto:static int __mmu_interval_notifier_insert(struct mmu_interval_notifier *mni, struct mm_struct *mm, struct mmu_notifier_mm *mmn_mm, unsigned long start, unsigned long length, const struct mmu_interval_notifier_ops *ops)

Type:int

Parameter:

TypeParameterName
struct mmu_interval_notifier *mni
struct mm_struct *mm
struct mmu_notifier_mm *mmn_mm
unsigned longstart
unsigned longlength
const struct mmu_interval_notifier_ops *ops
855  mm = mm
856  ops = ops
857  RB_CLEAR_NODE( & rb)
858  Start of interval = start
863  If length == 0 || For simplicity and code hygiene, the fallback code below insists on* a, b and *d having the same type (similar to the min() and max()* macros), whereas gcc's type-generic overflow checkers accept* different types(start, length - 1, & Last location _in_ interval ) Then Return -EOVERFLOW
868  If WARN_ON(atomic_read( & *@mm_count: The number of references to &struct mm_struct * (@mm_users count as 1). * Use mmgrab()/mmdrop() to modify. When this drops to 0, the * &struct mm_struct is freed.) <= 0) Then Return -EINVAL
872  mmgrab() - Pin a &struct mm_struct
887  spin_lock( & serialize the list modifications and hlist_unhashed )
888  If active_invalidate_ranges Then
889  If This is a collision-retry read-side/write-side 'lock', a lot like a* seqcount, however this allows multiple write-sides to hold it at* once Then hlist_add_head( & deferred_item, & deferred_list)
892  Else
893  invalidate_seq |= 1
897  invalidate_seq = invalidate_seq
898  Else
899  WARN_ON(This is a collision-retry read-side/write-side 'lock', a lot like a* seqcount, however this allows multiple write-sides to hold it at* once)
906  invalidate_seq = invalidate_seq - 1
907  interval_tree_insert( & interval_tree, & itree)
909  spin_unlock( & serialize the list modifications and hlist_unhashed )
910  Return 0
Caller
NameDescribe
mmu_interval_notifier_insertmmu_interval_notifier_insert - Insert an interval notifier*@mni: Interval notifier to register*@start: Starting virtual address to monitor*@length: Length of the range to monitor*@mm : mm_struct to attach to* This function subscribes the interval notifier
mmu_interval_notifier_insert_locked