Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:lib\test_xarray.c Create Date:2022-07-28 06:33:48
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:check_xa_alloc_3

Proto:static noinline void check_xa_alloc_3(struct xarray *xa, unsigned int base)

Type:void

Parameter:

TypeParameterName
struct xarray *xa
unsigned intbase
777  limit = XA_LIMIT(1, 0x3fff)
778  next = 0
783  XA_BUG_ON(xa, xa_alloc_cyclic(xa, & id, xa_mk_index(1), limit, & next, GFP_KERNEL) != 0)
785  XA_BUG_ON(xa, id != 1)
787  next = 0x3ffd
788  XA_BUG_ON(xa, xa_alloc_cyclic(xa, & id, xa_mk_index(0x3ffd), limit, & next, GFP_KERNEL) != 0)
790  XA_BUG_ON(xa, id != 0x3ffd)
791  xa_erase_index(xa, 0x3ffd)
792  xa_erase_index(xa, 1)
793  XA_BUG_ON(xa, !xa_empty() - Determine if an array has any present entries.*@xa: XArray.* Context: Any context.* Return: %true if the array contains only NULL pointers.)
795  When i < 0x4003 cycle
796  If i < 0x4000 Then entry = xa_mk_index(i)
798  Else entry = xa_mk_index(i - 0x3fff)
800  XA_BUG_ON(xa, xa_alloc_cyclic(xa, & id, entry, limit, & next, GFP_KERNEL) != (id == 1))
802  XA_BUG_ON(xa, xa_mk_index(id) != entry)
806  If base != 0 Then xa_erase_index(xa, base)
808  xa_erase_index(xa, base + 1)
809  next = UINT_MAX
810  XA_BUG_ON(xa, xa_alloc_cyclic(xa, & id, xa_mk_index(UINT_MAX), xa_limit_32b, & next, GFP_KERNEL) != 0)
812  XA_BUG_ON(xa, id != UINT_MAX)
813  XA_BUG_ON(xa, xa_alloc_cyclic(xa, & id, xa_mk_index(base), xa_limit_32b, & next, GFP_KERNEL) != 1)
815  XA_BUG_ON(xa, id != base)
816  XA_BUG_ON(xa, xa_alloc_cyclic(xa, & id, xa_mk_index(base + 1), xa_limit_32b, & next, GFP_KERNEL) != 0)
818  XA_BUG_ON(xa, id != base + 1)
820  xa_for_each() - Iterate over present entries in an XArray.*@xa: XArray.*@index: Index of @entry.*@entry: Entry retrieved from array.* During the iteration, @entry will have the value of the entry stored* in @xa at @index(xa, index, entry)
821  xa_erase_index(xa, index)
823  XA_BUG_ON(xa, !xa_empty() - Determine if an array has any present entries.*@xa: XArray.* Context: Any context.* Return: %true if the array contains only NULL pointers.)
Caller
NameDescribe
check_xa_alloc