Enhancements to DMA mapping API

Registered by Jesse Barker

One of the outcomes of the memory management mini-summit is the need to enhance the DMA mapping API in several key ways. Some new ops are required, some existing ones need updating and overall cache management needs refactoring.

Blueprint information

Status:
Complete
Approver:
Jesse Barker
Priority:
High
Drafter:
Jesse Barker
Direction:
Approved
Assignee:
Chunsang Jeong
Definition:
Approved
Series goal:
Accepted for trunk
Implementation:
Implemented
Milestone target:
milestone icon backlog
Started by
Jesse Barker
Completed by
Jesse Barker

Related branches

Sprints

Whiteboard

[jesse-barker 2011-06-01]
Example of sync ops changes can be seen in dma_sync_single_range_for_{cpu,device} in include/asm-generic/dma-mapping-common.h
Cache management work needs clean interaction with IOMMU code and insulation of ARM-specific to prevent breakage by other architectures.
[ChunsangJeong Oct 27 2011]
Moved work items to 2011.11 blueprint.
dma_alloc_coherent fix
dma_alloc_coherent fix
Support dma_alloc_noncoherent
Add build configuration switch to select between the two implementations

Work items (11.06):
[iamshariq]Study about the DMA coherent mapping concept: DONE
[iamshariq]Study about the Streaming DMA mapping concept: DONE
[iamshariq]Understand the physical and virtual memory management in Linux: DONE
Study DMA-mapping introduction document: DONE
Study DMA-mapping source: DONE
Understand dma_map_ops: DONE
Understand dma sync ops: DONE
Understand dma cacheable/coherent/write-combined mappings: DONE
Study IOMMU API: DONE

Work items:
[m-szyprowski]Send out RFC (request for comment) to linaro-mm-sig on mmap to user-space requirement: DONE
[m-szyprowski]Add start address and offset parameters to sync_single_for_cpu: DONE
[m-szyprowski]Add start address and offset parameters to sync_single_for_device: DONE
[m-szyprowski]Add start address and offset parameters to sync_sg_for_cpu: DONE
[m-szyprowski]Add start address and offset parameters to sync_sg_for_device: DONE
[m-szyprowski]Add attribute parameter for supporting cacheable/coherent/write-combined to alloc/free ops (similar to what map/unmap have): DONE
[m-szyprowski]dma_map_ops for ARM - using IOMMU API: DONE
[m-szyprowski]dma_map_ops for ARM - not using IOMMU API: DONE
[m-szyprowski]dma_map_ops for ARM - using bounce buffer (already exists for ARM, but not using the dma_map_ops API: DONE
[m-szyprowski]dma_map_ops for ARM - not using bounce buffer (already exists for ARM, but not using the map ops API): DONE
[m-szyprowski]Fix ARM version of dma_alloc_coherent (2 weeks): DONE

(?)

Work Items

Dependency tree

* Blueprints in grey have been implemented.

This blueprint contains Public information 
Everyone can see this information.