Function report |
Source Code:mm\cma.c |
Create Date:2022-07-28 16:31:49 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
home page | Tree |
Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:ma_init_reserved_mem() - create custom contiguous area from reserved memory*@base: Base address of the reserved area*@size: Size of the reserved area (in bytes),*@order_per_bit: Order of pages represented by one bit on bitmap.*@name: The name of the area
Proto:int __init cma_init_reserved_mem(phys_addr_t base, phys_addr_t size, unsigned int order_per_bit, const char *name, struct cma **res_cma)
Type:int
Parameter:
Type | Parameter | Name |
---|---|---|
phys_addr_t | base | |
phys_addr_t | size | |
unsigned int | order_per_bit | |
const char * | name | |
struct cma ** | res_cma |
186 | If Not size || Not memblock_is_region_reserved(base, size) Then Return -EINVAL |
194 | If Not IS_ALIGNED(alignment >> PAGE_SHIFT determines the page size , 1 << order_per_bit) Then Return -EINVAL |
197 | If @a is a power of 2 value (base, alignment) != base || @a is a power of 2 value (size, alignment) != size Then Return -EINVAL |
204 | cma = cma_areas[cma_area_count] |
205 | If name Then |
207 | Else |
208 | name = kasprintf(GFP_KERNEL, "cma%d\n", cma_area_count) |
213 | count = size >> PAGE_SHIFT determines the page size |
216 | cma_area_count++ |
217 | totalcma_pages += size / PAGE_SIZE |
219 | Return 0 |
Name | Describe |
---|---|
cma_declare_contiguous | 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) |
Source code conversion tool public plug-in interface | X |
---|---|
Support c/c++/esqlc/java Oracle/Informix/Mysql Plug-in can realize: logical Report Code generation and batch code conversion |