函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:z3fold_map() - maps the allocation associated with the given handle*@pool: pool in which the allocation resides*@handle: handle associated with the allocation to be mapped* Extracts the buddy number from handle and constructs the pointer to the

函数原型:static void *z3fold_map(struct z3fold_pool *pool, unsigned long handle)

返回类型:void

参数:

类型参数名称
struct z3fold_pool *pool
unsigned longhandle
1498  zhdr等于rn locked z3fold page if it's not headless
1499  addr等于zhdr
1500  page等于virt_to_page(kaddr) returns a valid pointer if and only if* virt_addr_valid(kaddr) returns true.(zhdr)
1502  如果st_bit - Determine whether a bit is set*@nr: bit number to test*@addr: Address to start counting from则转到:out
1505  buddy等于(handle & BUDDY_MASK) < zhdr->first_num is possible in encode_handle* but that doesn't matter. because the masking will result in the* correct buddy number.
1507  :buddy恒等于FIRST
1508  addr加等于ZHDR_SIZE_ALIGNED
1509  退出
1510  :buddy恒等于MIDDLE
1511  addr加等于start_middle左移CHUNK_SHIFT
1512  设置内存位
1513  退出
1514  :buddy恒等于LAST
1515  addr加等于PAGE_SIZEly for LAST bud, returns zero otherwise 左移CHUNK_SHIFT位的值
1516  退出
1517  默认
1518  打印错误信息("unknown buddy id %d\n", buddy)
1519  WARN_ON(1)
1520  addr = NULL
1521  退出
1524  如果addrmapped_count自加
1526  out :
1527  put_z3fold_header(zhdr)
1528  返回:addr
调用者
名称描述
z3fold_zpool_map