Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:gen_pool_free_owner - free allocated special memory back to the pool*@pool: pool to free to*@addr: starting address of memory to free back to pool*@size: size in bytes of memory to free*@owner: private data stashed at gen_pool_add() time* Free previously

Proto:void gen_pool_free_owner(struct gen_pool *pool, unsigned long addr, size_t size, void **owner)

Type:void

Parameter:

TypeParameterName
struct gen_pool *pool
unsigned longaddr
size_tsize
void **owner
489  order = minimum allocation order
493  BUG_ON(in_nmi())
496  If owner Then * owner = NULL
499  nbits = size + (1UL << order) - 1 >> order
500  _read_lock() - mark the beginning of an RCU read-side critical section* When synchronize_rcu() is invoked on one CPU while other CPUs* are within RCU read-side critical sections, then the* synchronize_rcu() is guaranteed to block until after all the other
502  If addr >= start address of memory chunk && addr <= d address of memory chunk (inclusive) Then
503  BUG_ON(addr + size - 1 > d address of memory chunk (inclusive) )
504  start_bit = addr - start address of memory chunk >> order
505  remain = map_clear_ll - clear the specified number of bits at the specified position*@map: pointer to a bitmap*@start: a bit position in @map*@nr: number of bits to set* Clear @nr bits start from @start in @map lock-lessly. Several users
506  BUG_ON(remain)
507  size = nbits << order
508  atomic_long_add(size, & avail)
509  If owner Then owner = private data to retrieve at alloc time
511  _read_unlock() - marks the end of an RCU read-side critical section.* In most situations, rcu_read_unlock() is immune from deadlock.* However, in kernels built with CONFIG_RCU_BOOST, rcu_read_unlock()
512  Return
515  _read_unlock() - marks the end of an RCU read-side critical section.* In most situations, rcu_read_unlock() is immune from deadlock.* However, in kernels built with CONFIG_RCU_BOOST, rcu_read_unlock()
516  BUG()
Caller
NameDescribe
gen_pool_free