函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:cma_activate_area

函数原型:static int __init cma_activate_area(struct cma *cma)

返回类型:int

参数:

类型参数名称
struct cma *cma
98  base_pfn等于base_pfn, pfn等于base_pfn
99  i等于count右移Huge pages are a constant size
102  bitmap等于bitmap_zalloc(cma_bitmap_maxno(cma), GFP_KERNEL)
103  如果非bitmap
104  count等于0
105  返回:负ENOMEM
108  WARN_ON_ONCE(!pfn_valid(pfn))
109  zone等于page_zone(pfn_to_page(pfn))
111  循环
114  base_pfn等于pfn
115 j循环
123  如果page_zone(pfn_to_page(pfn))不等于zone则转到:not_in_zone
126  Free whole pageblock and set its migration type to MIGRATE_CMA.
127 i先自减循环
129  mutex_init - initialize the mutex*@mutex: the mutex to be initialized* Initialize the mutex to unlocked state.* It is not allowed to initialize an already locked mutex.( & lock)
132  INIT_HLIST_HEAD( & mem_head)
133  spin_lock_init( & mem_head_lock)
136  返回:0
138  not_in_zone :
139  打印错误信息("CMA area %s could not be activated\n", name)
140  bitmap_free(bitmap)
141  count等于0
142  返回:负EINVAL
调用者
名称描述
cma_init_reserved_areas