History

dma-mapping: move the dma_declare_coherent_memory documentation

dma_declare_coherent_memory should not be in a DMA API guide aimed at driver writers (that is consumers of the API). Move it to a comment near the function instead.

Christoph Hellwig committed 6 years ago

Commit a92df4f1 parent 545d2922 files · +17 −24Browse files

Showing the changes to kernel (1 of 2 files). Show all

Unified · Split

kernel/dma/coherent.c+17−0
@@ -107,6 +107,23 @@ static int dma_assign_coherent_memory(struct device *dev, · 106 unmodified lines
107107 return 0;
108108 }
109109
110+/*
111+ * Declare a region of memory to be handed out by dma_alloc_coherent() when it
112+ * is asked for coherent memory for this device. This shall only be used
113+ * from platform code, usually based on the device tree description.
114+ *
115+ * phys_addr is the CPU physical address to which the memory is currently
116+ * assigned (this will be ioremapped so the CPU can access the region).
117+ *
118+ * device_addr is the DMA address the device needs to be programmed with to
119+ * actually address this memory (this will be handed out as the dma_addr_t in
120+ * dma_alloc_coherent()).
121+ *
122+ * size is the size of the area (must be a multiple of PAGE_SIZE).
123+ *
124+ * As a simplification for the platforms, only *one* such region of memory may
125+ * be declared per device.
126+ */
110127 int dma_declare_coherent_memory(struct device *dev, phys_addr_t phys_addr,
111128 dma_addr_t device_addr, size_t size)
112129 {

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t