Function report |
Source Code:kernel\dma\swiotlb.c |
Create Date:2022-07-28 10:36:08 |
| Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
| home page | Tree |
| Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:Bounce: copy the swiotlb buffer from or back to the original dma location
Proto:static void swiotlb_bounce(phys_addr_t orig_addr, phys_addr_t tlb_addr, size_t size, enum dma_data_direction dir)
Type:void
Parameter:
| Type | Parameter | Name |
|---|---|---|
| phys_addr_t | orig_addr | |
| phys_addr_t | tlb_addr | |
| size_t | size | |
| enum dma_data_direction | dir |
| 414 | If PageHighMem(pfn_to_page(pfn)) Then |
| 418 | sz = 0 |
| 422 | sz = min_t - return minimum of two values, using the specified type*@type: data type to use*@x: first value*@y: second value(size_t, PAGE_SIZE - offset, size) |
| 424 | local_irq_save(flags) |
| 425 | buffer = kmap_atomic(pfn_to_page(pfn)) |
| 426 | If dir == DMA_TO_DEVICE Then No 3D Now!(vaddr, buffer + offset, sz) |
| 428 | Else No 3D Now!(buffer + offset, vaddr, sz) |
| 430 | Prevent people trying to call kunmap_atomic() as if it were kunmap()* kunmap_atomic() should get the return value of kmap_atomic, not the page.(buffer) |
| 431 | local_irq_restore(flags) |
| 434 | pfn++ |
| 436 | offset = 0 |
| 438 | Else if dir == DMA_TO_DEVICE Then |
| 440 | Else |
| Name | Describe |
|---|---|
| swiotlb_tbl_map_single | |
| swiotlb_tbl_unmap_single | lb_addr is the physical address of the bounce buffer to unmap. |
| swiotlb_tbl_sync_single |
| 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 |