函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:lib\genalloc.c Create Date:2022-07-27 07:54:03
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:gen_pool_add_owner- add a new chunk of special memory to the pool*@pool: pool to add new memory chunk to*@virt: virtual starting address of memory chunk to add to pool*@phys: physical starting address of memory chunk to add to pool*@size: size in bytes of

函数原型:int gen_pool_add_owner(struct gen_pool *pool, unsigned long virt, phys_addr_t phys, size_t size, int nid, void *owner)

返回类型:int

参数:

类型参数名称
struct gen_pool *pool
unsigned longvirt
phys_addr_tphys
size_tsize
intnid
void *owner
186  nbits等于size右移 minimum allocation order
187  nbytes等于sizeof(structgen_pool_chunk)加BITS_TO_LONGS(nbits)乘sizeof(long)
190  chunk等于vzalloc_node(nbytes, nid)
191  如果此条件成立可能性小(为编译器优化)(chunk == NULL)则返回:负ENOMEM
194  physical starting address of memory chunk 等于phys
195  start address of memory chunk 等于virt
196  d address of memory chunk (inclusive) 等于virtsize减1
197  private data to retrieve at alloc time 等于owner
198  atomic_long_set( & avail, size)
200  加自旋锁
201  添加RCU保护项
202  自旋锁解锁
204  返回:0
调用者
名称描述
gen_pool_add_virt