[bootlin/training-materials updates] master: kernel-source: Rework the userspace modules slides (6881fb73)

Miquel Raynal miquel.raynal at bootlin.com
Wed Jan 18 14:27:53 CET 2023

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


commit 6881fb7340de0ca0103febdba6c932267d1e466b
Author: Miquel Raynal <miquel.raynal at bootlin.com>
Date:   Wed Jan 18 12:14:40 2023 +0100

    kernel-source: Rework the userspace modules slides
    Signed-off-by: Miquel Raynal <miquel.raynal at bootlin.com>


 slides/kernel-source-code-drivers/binary-blobs.dia | Bin 1932 -> 1576 bytes
 .../kernel-source-code-drivers/empty-modules.dia   | Bin 0 -> 1746 bytes
 .../kernel-source-code-drivers.tex                 |  41 +++++++++------------
 3 files changed, 17 insertions(+), 24 deletions(-)

diff --git a/slides/kernel-source-code-drivers/binary-blobs.dia b/slides/kernel-source-code-drivers/binary-blobs.dia
index c2b02c1c..a118fd69 100644
Binary files a/slides/kernel-source-code-drivers/binary-blobs.dia and b/slides/kernel-source-code-drivers/binary-blobs.dia differ
diff --git a/slides/kernel-source-code-drivers/empty-modules.dia b/slides/kernel-source-code-drivers/empty-modules.dia
new file mode 100644
index 00000000..db7633bd
Binary files /dev/null and b/slides/kernel-source-code-drivers/empty-modules.dia differ
diff --git a/slides/kernel-source-code-drivers/kernel-source-code-drivers.tex b/slides/kernel-source-code-drivers/kernel-source-code-drivers.tex
index 938a5d03..e5ecbe45 100644
--- a/slides/kernel-source-code-drivers/kernel-source-code-drivers.tex
+++ b/slides/kernel-source-code-drivers/kernel-source-code-drivers.tex
@@ -242,41 +242,34 @@
-  \frametitle{User space device drivers 1/3}
+  \frametitle{User space device drivers 1/2}
-  \item In some cases, it is possible to implement device drivers in
-    user space!
-  \item Can be used when
+  \item The kernel provides certain mechanisms to access hardware
+    directly from userspace:
+    \begin{itemize}
+    \item USB devices with {\em libusb}, \url{https://libusb.info/}
+    \item SPI devices with {\em spidev}, \kdochtml{spi/spidev}
+    \item I2C devices with {\em i2cdev}, \kdochtml{i2c/dev-interface}
+    \item Memory-mapped devices with {\em UIO}, including interrupt
+      handling, \kdochtml{driver-api/uio-howto}
+    \end{itemize}
+  \item These solutions can only be used if:
-    \item The kernel provides a mechanism that allows user space
-      applications to directly access the hardware.
     \item There is no need to leverage an existing kernel subsystem
       such as the networking stack or filesystems.
     \item There is no need for the kernel to act as a ``multiplexer''
       for the device: only one application accesses the device.
+  \item Certain classes of devices like printers and scanners do not
+    have any kernel support, they have always been handled in user space
+    for historical reasons.
+  \item Otherwise this is *not* how the system should be
+    architectured. Kernel drivers should always be preferred!
-  \frametitle{User space device drivers 2/3}
-  \begin{itemize}
-  \item Possibilities for user space device drivers:
-    \begin{itemize}
-    \item USB with {\em libusb}, \url{https://libusb.info/}
-    \item SPI with {\em spidev}, \kdochtml{spi/spidev}
-    \item I2C with {\em i2cdev}, \kdochtml{i2c/dev-interface}
-    \item Memory-mapped devices with {\em UIO}, including interrupt
-      handling, \kdochtml{driver-api/uio-howto}
-    \end{itemize}
-  \item Certain classes of devices (printers, scanners, 2D/3D graphics
-    acceleration) are typically handled partly in kernel space, partly
-    in user space.
-  \end{itemize}
-  \frametitle{User space device drivers 3/3}
+  \frametitle{User space device drivers 2/2}
   \item Advantages

More information about the training-materials-updates mailing list