Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:mm\cma.c Create Date:2022-07-28 16:31:43
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:cma_activate_area

Proto:static int __init cma_activate_area(struct cma *cma)

Type:int

Parameter:

TypeParameterName
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  If Not bitmap Then
104  count = 0
105  Return -ENOMEM
108  WARN_ON_ONCE(!pfn_valid(pfn))
109  zone = page_zone(pfn_to_page(pfn))
111  Do
114  base_pfn = pfn
115  When j cycle
123  If page_zone(pfn_to_page(pfn)) != zone Then Go to not_in_zone
126  Free whole pageblock and set its migration type to MIGRATE_CMA.
127  When --i cycle
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  Process spin lock initialization( & mem_head_lock)
136  Return 0
138  not_in_zone :
139  pr_err("CMA area %s could not be activated\n", name)
140  bitmap_free(bitmap)
141  count = 0
142  Return -EINVAL
Caller
NameDescribe
cma_init_reserved_areas