函数逻辑报告 |
Source Code:mm\cma.c |
Create Date:2022-07-27 18:07:21 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
首页 | 函数Tree |
注解内核,赢得工具 | 下载SCCT | English |
函数名称:ma_alloc() - allocate pages from contiguous area*@cma: Contiguous memory region for which the allocation is performed
函数原型:struct page *cma_alloc(struct cma *cma, size_t count, unsigned int align, bool no_warn)
返回类型:struct page
参数:
类型 | 参数 | 名称 |
---|---|---|
struct cma * | cma | |
size_t | count | |
unsigned int | align | |
bool | no_warn |
419 | pfn等于负1 |
420 | start等于0 |
432 | 如果非count则返回:NULL |
435 | mask等于cma_bitmap_aligned_mask(cma, align) |
436 | offset等于Find the offset of the base PFN from the specified align_order.* The value returned is represented in order_per_bits. |
437 | bitmap_maxno等于cma_bitmap_maxno(cma) |
440 | 如果bitmap_count大于bitmap_maxno则返回:NULL |
443 | 循环 |
444 | mutex_lock( & lock) |
448 | 如果bitmap_no大于等于bitmap_maxno则 |
450 | 退出 |
452 | bitmap_set(bitmap, bitmap_no, bitmap_count) |
461 | mutex_lock( & cma_mutex) |
465 | 如果ret恒等于0则 |
466 | page等于pfn_to_page(pfn) |
467 | 退出 |
470 | cma_clear_bitmap(cma, pfn, count) |
474 | pr_debug("%s(): memory range at %p is busy, retrying\n", __func__, pfn_to_page(pfn)) |
480 | trace_cma_alloc(pfn, page, count, align) |
487 | 如果page则 |
495 | cma_debug_show_areas(cma) |
499 | 返回:page |
名称 | 描述 |
---|---|
dma_alloc_contiguous | dma_alloc_contiguous() - allocate contiguous pages*@dev: Pointer to device for which the allocation is performed |
cma_alloc_mem | |
dma_alloc_from_contiguous | dma_alloc_from_contiguous() - allocate pages from contiguous area*@dev: Pointer to device for which the allocation is performed.*@count: Requested number of pages.*@align: Requested alignment of pages (in PAGE_SIZE order). |
源代码转换工具 开放的插件接口 | X |
---|---|
支持:c/c++/esqlc/java Oracle/Informix/Mysql 插件可实现:逻辑报告 代码生成和批量转换代码 |