Linux 驱动之基础(二)DMA-API
😊 There are two types of DMA mappings
Consistent DM(硬件保证 cache 一致性) mappings which are usually mapped at driver initialization, unmapped at the end and for which the hardware should guarantee that the device and the CPU can access the data in parallel and will see updates made by each other without any explicit software flushing.
Streaming DMA(需要软件来维护 cache 一致性) mappings which are usually mapped for one DMA transfer, unmapped right after it (unless you use dma_sync_* below) and for which hardware can optimize for sequential accesses.