Function report |
Source Code:arch\x86\kernel\amd_gart_64.c |
Create Date:2022-07-28 08:52:28 |
| Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
| home page | Tree |
| Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:allocate and map a coherent mapping
Proto:static void *gart_alloc_coherent(struct device *dev, size_t size, dma_addr_t *dma_addr, gfp_t flag, unsigned long attrs)
Type:void
Parameter:
| Type | Parameter | Name |
|---|---|---|
| struct device * | dev | |
| size_t | size | |
| dma_addr_t * | dma_addr | |
| gfp_t | flag | |
| unsigned long | attrs |
| 473 | If Not vaddr || Not force_iommu || Like dma_mask, but for alloc_coherent mappings as not all hardware supports 64 bit addresses for consistent allocations such descriptors. <= DMA_BIT_MASK(24) Then Return vaddr |
| 477 | dma_addr = Map a single continuous physical area into the IOMMU.* Caller needs to check if the iommu is needed and flush. |
| 480 | If Value for the false possibility is greater at compile time( * dma_addr == DMA_MAPPING_ERROR) Then Go to out_free |
| 482 | Return vaddr |
| 483 | out_free : |
| 485 | Return NULL |
| 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 |