Function report |
Source Code:kernel\dma\coherent.c |
Create Date:2022-07-28 10:33:46 |
| Last Modify:2020-03-17 14:54:14 | Copyright©Brick |
| home page | Tree |
| Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:dma_init_coherent_memory
Proto:static int dma_init_coherent_memory(phys_addr_t phys_addr, dma_addr_t device_addr, size_t size, struct dma_coherent_mem **mem)
Type:int
Parameter:
| Type | Parameter | Name |
|---|---|---|
| phys_addr_t | phys_addr | |
| dma_addr_t | device_addr | |
| size_t | size | |
| struct dma_coherent_mem ** | mem |
| 44 | struct dma_coherent_mem * dma_mem = NULL |
| 45 | void * mem_base = NULL |
| 47 | bitmap_size = BITS_TO_LONGS(pages) * sizeof(long) |
| 50 | If Not size Then |
| 56 | If Not mem_base Then |
| 60 | dma_mem = kzalloc - allocate memory. The memory is set to zero.*@size: how many bytes of memory are required.*@flags: the type of memory to allocate (see kmalloc). |
| 61 | If Not dma_mem Then |
| 65 | bitmap = kzalloc - allocate memory. The memory is set to zero.*@size: how many bytes of memory are required.*@flags: the type of memory to allocate (see kmalloc). |
| 66 | If Not bitmap Then |
| 72 | device_base = device_addr |
| 78 | Return 0 |
| 80 | out : |
| 84 | Return ret |
| Name | Describe |
|---|---|
| dma_declare_coherent_memory |
| 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 |