Function report |
Source Code:kernel\dma\coherent.c |
Create Date:2022-07-28 10:33:50 |
| Last Modify:2020-03-17 14:54:14 | Copyright©Brick |
| home page | Tree |
| Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:__dma_alloc_from_coherent
Proto:static void *__dma_alloc_from_coherent(struct device *dev, struct dma_coherent_mem *mem, ssize_t size, dma_addr_t *dma_handle)
Type:void
Parameter:
| Type | Parameter | Name |
|---|---|---|
| struct device * | dev | |
| struct dma_coherent_mem * | mem | |
| ssize_t | size | |
| dma_addr_t * | dma_handle |
| 130 | order = get_order - Determine the allocation order of a memory size*@size: The size for which to get the order* Determine the allocation order of a particular sized block of memory |
| 135 | spin_lock_irqsave( & spinlock, flags) |
| 137 | If Value for the false possibility is greater at compile time(size > (size << PAGE_SHIFT determines the page size )) Then Go to err |
| 141 | If Value for the false possibility is greater at compile time(pageno < 0) Then Go to err |
| 147 | dma_handle = dma_get_device_base(dev, mem) + (pageno << PAGE_SHIFT determines the page size ) |
| 148 | ret = virt_base + (pageno << PAGE_SHIFT determines the page size ) |
| 149 | spin_unlock_irqrestore( & spinlock, flags) |
| 151 | Return ret |
| 152 | err : |
| 153 | spin_unlock_irqrestore( & spinlock, flags) |
| 154 | Return NULL |
| Name | Describe |
|---|---|
| dma_alloc_from_dev_coherent | dma_alloc_from_dev_coherent() - allocate memory from device coherent pool*@dev: device from which we allocate memory*@size: size of requested memory area*@dma_handle: This will be filled with the correct dma handle*@ret: This pointer will be filled with |
| dma_alloc_from_global_coherent |
| 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 |