[bootlin/training-materials updates] master: Improve DMA explanations (23ccbf9f)

Michael Opdenacker michael.opdenacker at bootlin.com
Fri Feb 5 11:56:55 CET 2021


Repository : https://github.com/bootlin/training-materials
On branch  : master
Link       : https://github.com/bootlin/training-materials/commit/23ccbf9f80c997d765a1c97aec2cec4d63fb6543

>---------------------------------------------------------------

commit 23ccbf9f80c997d765a1c97aec2cec4d63fb6543
Author: Michael Opdenacker <michael.opdenacker at bootlin.com>
Date:   Fri Feb 5 11:56:55 2021 +0100

    Improve DMA explanations
    
    - Link to our commented network driver
    - Mention the "consistent" term too used by PCI
    
    Signed-off-by: Michael Opdenacker <michael.opdenacker at bootlin.com>


>---------------------------------------------------------------

23ccbf9f80c997d765a1c97aec2cec4d63fb6543
 .../kernel-driver-development-dma.tex                         | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/slides/kernel-driver-development-dma/kernel-driver-development-dma.tex b/slides/kernel-driver-development-dma/kernel-driver-development-dma.tex
index f40bccf5..7cfae65d 100644
--- a/slides/kernel-driver-development-dma/kernel-driver-development-dma.tex
+++ b/slides/kernel-driver-development-dma/kernel-driver-development-dma.tex
@@ -149,6 +149,8 @@ void *                       /* Output: buffer address */
 void dma_free_coherent(struct device *dev,
     size_t size, void *cpu_addr, dma_addr_t handle);
 \end{minted}
+Note: called {\em consistent mappings} on PCI\\
+(\kfunc{pci_alloc_consistent} and \kfunc{pci_free_consistent})
 \end{frame}
 
 \begin{frame}[fragile]
@@ -172,7 +174,8 @@ void dma_unmap_single(struct device *dev, dma_addr_t handdle,
 \end{frame}
 
 \begin{frame}
-  \frametitle{DMA streaming mapping notes}
+  \frametitle{DMA notes}
+  Streaming mapping notes:
   \begin{itemize}
   \item When the mapping is active: only the device should access the
     buffer (potential cache issues otherwise).
@@ -183,6 +186,12 @@ void dma_unmap_single(struct device *dev, dma_addr_t handdle,
   \item The Linux API also supports scatter / gather DMA streaming
     mappings.
   \end{itemize}
+  Commented network driver example:
+  \begin{itemize}
+    \item See {\small \url{https://bootlin.com/pub/drivers/r6040-network-driver-with-comments.c}}
+    for a commmented network driver, which both streaming and coherent
+    mappings.
+  \end{itemize}
 \end{frame}
 
 \subsection{DMA transfers}




More information about the training-materials-updates mailing list