函数逻辑报告 |
Source Code:mm\cma.c |
Create Date:2022-07-27 18:07:13 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
首页 | 函数Tree |
注解内核,赢得工具 | 下载SCCT | English |
函数名称:ma_declare_contiguous() - reserve custom contiguous area*@base: Base address of the reserved area optional, use 0 for any*@size: Size of the reserved area (in bytes),*@limit: End address of the reserved memory (optional, 0 for any)
函数原型:int __init cma_declare_contiguous(phys_addr_t base, phys_addr_t size, phys_addr_t limit, phys_addr_t alignment, unsigned int order_per_bit, bool fixed, const char *name, struct cma **res_cma)
返回类型:int
参数:
类型 | 参数 | 名称 |
---|---|---|
phys_addr_t | base | |
phys_addr_t | size | |
phys_addr_t | limit | |
phys_addr_t | alignment | |
unsigned int | order_per_bit | |
bool | fixed | |
const char * | name | |
struct cma ** | res_cma |
246 | memblock_end等于memblock_end_of_DRAM() |
248 | ret等于0 |
256 | highmem_start等于__pa(A number of key systems in x86 including ioremap() rely on the assumption* that high_memory defines the upper bound on direct map memory, then end* of ZONE_NORMAL - 1)加1 |
257 | pr_debug("%s(size %pa, base %pa, limit %pa alignment %pa)\n", __func__, & size, & base, & limit, & alignment) |
283 | 转到:err |
285 | base等于@a is a power of 2 value (base, alignment) |
286 | size等于@a is a power of 2 value (size, alignment) |
293 | 如果非IS_ALIGNED(size >> PAGE_SHIFT determines the page size , 1 << order_per_bit)则返回:负EINVAL |
300 | 如果fixed且base小于highmem_start且base加size大于highmem_start则 |
302 | 打印错误信息("Region at %pa defined on low/high memory boundary (%pa)\n", & base, & highmem_start) |
304 | 转到:err |
312 | 如果limit恒等于0或limit大于memblock_end则limit等于memblock_end |
319 | 转到:err |
323 | 如果fixed则 |
324 | 如果memblock_is_region_reserved(base, size)或memblock_reserve(base, size)小于0则 |
329 | 否则 |
330 | addr等于0 |
338 | 如果base小于highmem_start且limit大于highmem_start则 |
341 | limit等于highmem_start |
344 | 如果非addr则 |
367 | 返回:0 |
369 | free_mem : |
370 | memblock_free(base, size) |
371 | err : |
373 | 返回:ret |
名称 | 描述 |
---|---|
dma_contiguous_reserve_area | dma_contiguous_reserve_area() - reserve custom contiguous area*@size: Size of the reserved area (in bytes),*@base: Base address of the reserved area optional, use 0 for any*@limit: End address of the reserved memory (optional, 0 for any). |
源代码转换工具 开放的插件接口 | X |
---|---|
支持:c/c++/esqlc/java Oracle/Informix/Mysql 插件可实现:逻辑报告 代码生成和批量转换代码 |