[FE training-materials-updates] LXR/Elixir links: distinguish kernel directories and regular files

Michael Opdenacker michael.opdenacker at free-electrons.com
Thu Mar 9 21:57:29 CET 2017

Repository : git://git.free-electrons.com/training-materials.git
On branch  : sysdev-4d
Link       : http://git.free-electrons.com/training-materials/commit/?id=1d7dc872bdef1a62a891f4d5e6ff4e23f1fcd3a4


commit 1d7dc872bdef1a62a891f4d5e6ff4e23f1fcd3a4
Author: Michael Opdenacker <michael.opdenacker at free-electrons.com>
Date:   Thu Mar 9 21:57:29 2017 +0100

    LXR/Elixir links: distinguish kernel directories and regular files
    - Using this to perform URL checks
      (Elixir doesn't support directories without the trailing /,
      therefore the need to process files and directories differently)
      Unlike LXR, Elixir returns 404 for paths that don't exist,
      and therefore can be used to look for symbols or files that
      have disappeared from the kernel source.
    Signed-off-by: Michael Opdenacker <michael.opdenacker at free-electrons.com>


 common/beamerthemeFreeElectrons.sty                |  7 ++-
 common/labs.sty                                    |  5 +-
 labs/android-new-board/android-new-board.tex       |  2 +-
 .../kernel-i2c-communication.tex                   |  2 +-
 slides/first-slides/first-slides.tex               |  4 +-
 slides/kernel-contribution/kernel-contribution.tex |  4 +-
 slides/kernel-device-model/kernel-device-model.tex | 16 +++---
 .../kernel-driver-development-debugging.tex        |  4 +-
 .../kernel-driver-development-general-apis.tex     | 10 ++--
 .../kernel-driver-development-interrupts.tex       |  6 +-
 .../kernel-driver-development-memory.tex           |  8 +--
 .../kernel-driver-development-modules.tex          |  4 +-
 .../kernel-driver-development-sleeping.tex         |  2 +-
 slides/kernel-frameworks2/kernel-frameworks2.tex   |  8 +--
 slides/kernel-i2c/kernel-i2c.tex                   | 10 ++--
 slides/kernel-init-content/kernel-init-content.tex |  2 +-
 slides/kernel-input/kernel-input.tex               |  6 +-
 slides/kernel-pinmuxing/kernel-pinmuxing.tex       |  2 +-
 .../kernel-porting-content.tex                     | 58 ++++++++++----------
 .../kernel-power-management-content.tex            | 22 ++++----
 .../kernel-source-code-drivers.tex                 |  2 +-
 .../kernel-source-code-layout.tex                  | 64 +++++++++++-----------
 .../sysdev-flash-filesystems.tex                   |  2 +-
 .../sysdev-linux-intro-configuration.tex           |  2 +-
 .../sysdev-linux-intro-features.tex                |  4 +-
 .../sysdev-linux-intro-sources.tex                 | 32 +++++------
 26 files changed, 145 insertions(+), 143 deletions(-)

diff --git a/common/beamerthemeFreeElectrons.sty b/common/beamerthemeFreeElectrons.sty
index 1b10f7e..d9a2a63 100644
--- a/common/beamerthemeFreeElectrons.sty
+++ b/common/beamerthemeFreeElectrons.sty
@@ -35,9 +35,10 @@
 \newcommand\kstruct[1]{\href{http://lxr.free-electrons.com/ident?i=#1}{\code{struct #1}}}
diff --git a/common/labs.sty b/common/labs.sty
index c6fd9ef..0fe4a72 100644
--- a/common/labs.sty
+++ b/common/labs.sty
@@ -125,8 +125,9 @@
 %% characters such as _ $ or &.
   \section{About this document}
diff --git a/labs/android-new-board/android-new-board.tex b/labs/android-new-board/android-new-board.tex
index 7c8697c..6da9b13 100644
--- a/labs/android-new-board/android-new-board.tex
+++ b/labs/android-new-board/android-new-board.tex
@@ -316,7 +316,7 @@ the values that are working.
 To make these changes permanently, you will have to edit the kernel
 code. The used PWM is defined is the \code{am335xevm} board file, in
-the \kpath{arch/arm/mach-omap2} folder. The PWM work by switching on
+the \kdir{arch/arm/mach-omap2} folder. The PWM work by switching on
 and off at a fast pace the power supply to be able to adjust the
 average voltage delivered between 0 and the actual voltage of the
 line. Increase the period by a factor of 100.
diff --git a/labs/kernel-i2c-communication/kernel-i2c-communication.tex b/labs/kernel-i2c-communication/kernel-i2c-communication.tex
index 76c4519..147de50 100644
--- a/labs/kernel-i2c-communication/kernel-i2c-communication.tex
+++ b/labs/kernel-i2c-communication/kernel-i2c-communication.tex
@@ -71,7 +71,7 @@ signals.
 Now that we know the register offsets, let's try to understand
 how they are used in existing code. For example, open the
 the Device Tree for the AM335x EVM board
-(\kpath{arch/arm/boot/dts/am335x-evm.dts}), which is using
+(\kfile{arch/arm/boot/dts/am335x-evm.dts}), which is using
 \code{i2c1} too. Look for \code{i2c1_pins}, and you will see how
 offsets are declared and what values they are given:
diff --git a/slides/first-slides/first-slides.tex b/slides/first-slides/first-slides.tex
index 98d7648..42538a1 100644
--- a/slides/first-slides/first-slides.tex
+++ b/slides/first-slides/first-slides.tex
@@ -62,8 +62,8 @@
     \item Kernel documentation links:\\
     \item Links to kernel source files and directories:\\
-	  \kpath{drivers/input} \\
-	  \kpath{include/linux/fb.h}
+	  \kdir{drivers/input} \\
+	  \kfile{include/linux/fb.h}
     \item Links to the declarations, definitions and instances
           of kernel symbols (functions, types, data, structures): \\
 	  \kfunc{platform_get_irq} \\
diff --git a/slides/kernel-contribution/kernel-contribution.tex b/slides/kernel-contribution/kernel-contribution.tex
index 542118f..222eed9 100644
--- a/slides/kernel-contribution/kernel-contribution.tex
+++ b/slides/kernel-contribution/kernel-contribution.tex
@@ -44,7 +44,7 @@
     accessing public mailing list archives.
   \item If the subsystem you report a bug on has a mailing list, use
     it. Otherwise, contact the official maintainer (see the
-    \kpath{MAINTAINERS} file). Always give as many useful details as
+    \kfile{MAINTAINERS} file). Always give as many useful details as
@@ -80,7 +80,7 @@
   \item Look at the master branch and check whether your issue /
     change hasn't been solved / implemented yet. Also check the
-    maintainer's git tree and mailing list (see the \kpath{MAINTAINERS}
+    maintainer's git tree and mailing list (see the \kfile{MAINTAINERS}
     file).You may miss submissions that are not in mainline yet.
   \item If the maintainer has its own git tree, create a remote branch
     tracking this tree. This is much better than creating another
diff --git a/slides/kernel-device-model/kernel-device-model.tex b/slides/kernel-device-model/kernel-device-model.tex
index 7779734..de91ddc 100644
--- a/slides/kernel-device-model/kernel-device-model.tex
+++ b/slides/kernel-device-model/kernel-device-model.tex
@@ -102,14 +102,14 @@
   \item Core infrastructure (bus driver)
-    \item \kpath{drivers/usb/core}
+    \item \kdir{drivers/usb/core}
     \item \kstruct{bus_type} is defined in
-      \kpath{drivers/usb/core/driver.c} and registered in
-      \kpath{drivers/usb/core/usb.c}
+      \kfile{drivers/usb/core/driver.c} and registered in
+      \kfile{drivers/usb/core/usb.c}
   \item Adapter drivers
-    \item \kpath{drivers/usb/host}
+    \item \kdir{drivers/usb/host}
     \item For EHCI, UHCI, OHCI, XHCI, and their implementations on
       various systems (Atmel, IXP, Xilinx, OMAP, Samsung, PXA, etc.)
@@ -134,7 +134,7 @@
   \item We will only look at the device driver side, and not the
     adapter driver side
-  \item The driver we will look at is \kpath{drivers/net/usb/rtl8150.c}
+  \item The driver we will look at is \kfile{drivers/net/usb/rtl8150.c}
@@ -331,7 +331,7 @@ static int rtl8150_probe(struct usb_interface *intf,
   \frametitle{Implementation of a Platform Driver}
   \item The driver implements a \kstruct{platform_driver}
-    structure (example taken from \kpath{drivers/tty/serial/imx.c},
+    structure (example taken from \kfile{drivers/tty/serial/imx.c},
@@ -376,7 +376,7 @@ static void __exit imx_serial_cleanup(void) {
       structures are created
   \item Example on ARM, where the instantiation was done in
-    \kpathversion{arch/arm/mach-imx/mx1ads.c}{2.6.30}
+    \kfileversion{arch/arm/mach-imx/mx1ads.c}{2.6.30}
 static struct platform_device imx_uart1_device = {
@@ -575,7 +575,7 @@ static int serial_imx_probe(struct platform_device *pdev)
   \item At boot time, the kernel is given a compiled version, the {\bf
       Device Tree Blob}, which is parsed to instantiate all the
     devices described in the DT.
-  \item On ARM, they are located in \kpath{arch/arm/boot/dts}.
+  \item On ARM, they are located in \kdir{arch/arm/boot/dts}.
diff --git a/slides/kernel-driver-development-debugging/kernel-driver-development-debugging.tex b/slides/kernel-driver-development-debugging/kernel-driver-development-debugging.tex
index a62671a..942442c 100644
--- a/slides/kernel-driver-development-debugging/kernel-driver-development-debugging.tex
+++ b/slides/kernel-driver-development-debugging/kernel-driver-development-debugging.tex
@@ -12,7 +12,7 @@
     \kfunc{pr_cont} \\
     and the special \kfunc{pr_debug} (see next pages)
-    \item Defined in \kpath{include/linux/printk.h}
+    \item Defined in \kfile{include/linux/printk.h}
     \item They take a classic format string with arguments
     \item Example:
@@ -33,7 +33,7 @@ pr_info("Booting CPU %d\n", cpu);
     \item They take a pointer to \kstruct{device} as first
       argument, and then a format string with arguments
-    \item Defined in \kpath{include/linux/device.h}
+    \item Defined in \kfile{include/linux/device.h}
     \item To be used in drivers integrated with the Linux device
     \item Example:
diff --git a/slides/kernel-driver-development-general-apis/kernel-driver-development-general-apis.tex b/slides/kernel-driver-development-general-apis/kernel-driver-development-general-apis.tex
index ff7addc..1bc9690 100644
--- a/slides/kernel-driver-development-general-apis/kernel-driver-development-general-apis.tex
+++ b/slides/kernel-driver-development-general-apis/kernel-driver-development-general-apis.tex
@@ -3,7 +3,7 @@
   \frametitle{Memory/string utilities}
-  \item In \kpath{include/linux/string.h}
+  \item In \kfile{include/linux/string.h}
     \item Memory-related: \kfunc{memset}, \kfunc{memcpy},
       \kfunc{memmove}, \kfunc{memscan}, \kfunc{memcmp}, \kfunc{memchr}
@@ -12,7 +12,7 @@
     \item Allocate and copy a string: \kfunc{kstrdup}, \kfunc{kstrndup}
     \item Allocate and copy a memory area: \kfunc{kmemdup}
-  \item In \kpath{include/linux/kernel.h}
+  \item In \kfile{include/linux/kernel.h}
     \item String to int conversion: \kfunc{simple_strtoul},
       \kfunc{simple_strtol}, \kfunc{simple_strtoull},
@@ -25,7 +25,7 @@
   \frametitle{Linked lists}
-  \item Convenient linked-list facility in \kpath{include/linux/list.h}
+  \item Convenient linked-list facility in \kfile{include/linux/list.h}
     \item Used in thousands of places in the kernel
@@ -51,7 +51,7 @@
   \frametitle{Linked Lists Examples (1)}
-  \item From \kpath{include/linux/atmel_tc.h}
+  \item From \kfile{include/linux/atmel_tc.h}
  * Definition of a list element, with a
@@ -69,7 +69,7 @@ struct atmel_tc
   \frametitle{Linked Lists Examples (2)}
-  \item From \kpath{drivers/misc/atmel_tclib.c}
+  \item From \kfile{drivers/misc/atmel_tclib.c}
 /* Define the global list */
diff --git a/slides/kernel-driver-development-interrupts/kernel-driver-development-interrupts.tex b/slides/kernel-driver-development-interrupts/kernel-driver-development-interrupts.tex
index a84c88a..f3d8462 100644
--- a/slides/kernel-driver-development-interrupts/kernel-driver-development-interrupts.tex
+++ b/slides/kernel-driver-development-interrupts/kernel-driver-development-interrupts.tex
@@ -37,7 +37,7 @@ void devm_free_irq(struct device *dev,
   \item Explicitly release an interrupt handler. Done automatically
         in normal situations.
-  Defined in \kpath{include/linux/interrupt.h}
+  Defined in \kfile{include/linux/interrupt.h}
@@ -200,7 +200,7 @@ int devm_request_threaded_irq(
     not directly used by drivers, but by complete kernel subsystems
     (network, etc.)
   \item The list of softirqs is defined in
-    \kpath{include/linux/interrupt.h}: \code{HI}, \code{TIMER},
+    \kfile{include/linux/interrupt.h}: \code{HI}, \code{TIMER},
     \code{NET_TX}, \code{NET_RX}, \code{BLOCK}, \code{BLOCK_IOPOLL},
     \code{TASKLET}, \code{SCHED}, \code{HRTIMER}, \code{RCU}
   \item The \code{HI} and \code{TASKLET} softirqs are used to execute
@@ -279,7 +279,7 @@ somewhere function(...) {
   \item A workqueue is registered with \kfunc{INIT_WORK} and typically
     triggered with \kfunc{queue_work}
-  \item The complete API, in \kpath{include/linux/workqueue.h} provides
+  \item The complete API, in \kfile{include/linux/workqueue.h} provides
     many other possibilities (creating its own workqueue threads,
diff --git a/slides/kernel-driver-development-memory/kernel-driver-development-memory.tex b/slides/kernel-driver-development-memory/kernel-driver-development-memory.tex
index 3aed854..f11dcdc 100644
--- a/slides/kernel-driver-development-memory/kernel-driver-development-memory.tex
+++ b/slides/kernel-driver-development-memory/kernel-driver-development-memory.tex
@@ -198,7 +198,7 @@
     \item Allocates memory in an area of the physical memory usable
       for DMA transfers. See our DMA chapter.
-  \item Others are defined in \kpath{include/linux/gfp.h}
+  \item Others are defined in \kfile{include/linux/gfp.h}
@@ -218,7 +218,7 @@
     \item See \code{/proc/slabinfo}
   \item They are rarely used for individual drivers.
-  \item See \kpath{include/linux/slab.h} for the API
+  \item See \kfile{include/linux/slab.h} for the API
@@ -292,7 +292,7 @@
     \item Free an allocated area
-  \item Example: (\kpath{drivers/infiniband/core/cache.c})
+  \item Example: (\kfile{drivers/infiniband/core/cache.c})
 struct ib_update_work *work;
 work = kmalloc(sizeof *work, GFP_ATOMIC);
@@ -357,7 +357,7 @@ kfree(work);
     cannot be used for DMA, as DMA usually requires physically
     contiguous buffers.
   \item Example use: to allocate kernel buffers to load module code.
-  \item API in \kpath{include/linux/vmalloc.h}
+  \item API in \kfile{include/linux/vmalloc.h}
     \item \mint{c}+void *vmalloc(unsigned long size);+
diff --git a/slides/kernel-driver-development-modules/kernel-driver-development-modules.tex b/slides/kernel-driver-development-modules/kernel-driver-development-modules.tex
index 33973e9..3ab1567 100644
--- a/slides/kernel-driver-development-modules/kernel-driver-development-modules.tex
+++ b/slides/kernel-driver-development-modules/kernel-driver-development-modules.tex
@@ -115,7 +115,7 @@ MODULE_AUTHOR("William Shakespeare");
   \item Values
-    \item GPL compatible (see \kpath{include/linux/license.h}:
+    \item GPL compatible (see \kfile{include/linux/license.h}:
       \code{GPL}, \code{GPL v2}, \code{GPL and additional rights},
       \code{Dual MIT/GPL}, \code{Dual BSD/GPL}, \code{Dual MPL/GPL})
     \item \code{Proprietary}
@@ -222,7 +222,7 @@ endif
   \item To add a new driver to the kernel sources:
     \item Add your new source file to the appropriate source
-      directory. Example: \kpath{drivers/usb/serial/navman.c}
+      directory. Example: \kfile{drivers/usb/serial/navman.c}
     \item Single file drivers in the common case, even if the file is
       several thousand lines of code big. Only really big drivers are
       split in several files or have their own directory.
diff --git a/slides/kernel-driver-development-sleeping/kernel-driver-development-sleeping.tex b/slides/kernel-driver-development-sleeping/kernel-driver-development-sleeping.tex
index 2ec20d7..6fe76ea 100644
--- a/slides/kernel-driver-development-sleeping/kernel-driver-development-sleeping.tex
+++ b/slides/kernel-driver-development-sleeping/kernel-driver-development-sleeping.tex
@@ -152,5 +152,5 @@ if (ret)
       condition again and go back to sleep if it is not met.
-  See \kpath{include/linux/wait.h} for implementation details.
+  See \kfile{include/linux/wait.h} for implementation details.
diff --git a/slides/kernel-frameworks2/kernel-frameworks2.tex b/slides/kernel-frameworks2/kernel-frameworks2.tex
index 96d352c..3a0c1c2 100644
--- a/slides/kernel-frameworks2/kernel-frameworks2.tex
+++ b/slides/kernel-frameworks2/kernel-frameworks2.tex
@@ -233,7 +233,7 @@ static long phantom_ioctl(struct file *file, unsigned int cmd,
     return 0; }
-Selected excerpt from \kpath{drivers/misc/phantom.c}
+Selected excerpt from \kfile{drivers/misc/phantom.c}
@@ -296,17 +296,17 @@ int main(void)
       \item \code{tristate "Support for frame buffer devices"}
-  \item Implemented in C files in \kpath{drivers/video/fbdev/core}
+  \item Implemented in C files in \kdir{drivers/video/fbdev/core}
   \item Implements a single character driver and defines the
     user/kernel API
-    \item First part of \kpath{include/linux/fb.h}
+    \item First part of \kfile{include/linux/fb.h}
   \item Defines the set of operations a framebuffer driver must
     implement and helper functions for the drivers
     \item \kstruct{fb_ops}
-    \item Second part of \kpath{include/linux/fb.h}
+    \item Second part of \kfile{include/linux/fb.h}
diff --git a/slides/kernel-i2c/kernel-i2c.tex b/slides/kernel-i2c/kernel-i2c.tex
index b7dd6a4..daaa549 100644
--- a/slides/kernel-i2c/kernel-i2c.tex
+++ b/slides/kernel-i2c/kernel-i2c.tex
@@ -32,12 +32,12 @@
     \item Providing an API to implement I2C device drivers, in user space
   \item The core of the I2C subsystem is located in
-    \kpath{drivers/i2c}.
+    \kdir{drivers/i2c}.
   \item The I2C controller drivers are located in
-    \kpath{drivers/i2c/busses}.
+    \kdir{drivers/i2c/busses}.
   \item The I2C device drivers are located throughout
-    \kpath{drivers/}, depending on the type of device (ex:
-    \kpath{drivers/input} for input devices).
+    \kdir{drivers/}, depending on the type of device (ex:
+    \kdir{drivers/input} for input devices).
@@ -375,7 +375,7 @@ error = i2c_transfer(client->adapter, msg, 2);
     use the raw I2C functions, \ksym{I2C_FUNC_SMBUS_BYTE_DATA} to be
     able to use SMBus commands to write a command and read/write one
     byte of data.
-  \item See \kpath{include/uapi/linux/i2c.h} for the full list of
+  \item See \kfile{include/uapi/linux/i2c.h} for the full list of
     existing functionalities.
diff --git a/slides/kernel-init-content/kernel-init-content.tex b/slides/kernel-init-content/kernel-init-content.tex
index 3d140f7..d1f7f9c 100644
--- a/slides/kernel-init-content/kernel-init-content.tex
+++ b/slides/kernel-init-content/kernel-init-content.tex
@@ -200,7 +200,7 @@ Defined in \code{include/linux/init.h}
   \frametitle{initcall example}
-From \kpathversion{arch/arm/mach-pxa/lpd270.c}{2.6.36} (Linux 2.6.36)
+From \kfileversion{arch/arm/mach-pxa/lpd270.c}{2.6.36} (Linux 2.6.36)
 static int __init lpd270_irq_device_init(void)
diff --git a/slides/kernel-input/kernel-input.tex b/slides/kernel-input/kernel-input.tex
index 1cf1efd..c244151 100644
--- a/slides/kernel-input/kernel-input.tex
+++ b/slides/kernel-input/kernel-input.tex
@@ -37,21 +37,21 @@
       \item \code{tristate "Generic input layer (needed for keyboard, mouse, ...)"}
-  \item Implemented in \kpath{drivers/input/}
+  \item Implemented in \kdir{drivers/input/}
     \item \code{input.c}, \code{input-polldev.c}, \code{evbug.c}
   \item Implements a single character driver and defines the
     user/kernel API
-    \item \kpath{include/uapi/linux/input.h}
+    \item \kfile{include/uapi/linux/input.h}
   \item Defines the set of operations a input driver must implement
     and helper functions for the drivers
     \item \kstruct{input_dev} for the device driver part
     \item \kstruct{input_handler} for the event handler part
-    \item  \kpath{include/linux/input.h}
+    \item  \kfile{include/linux/input.h}
diff --git a/slides/kernel-pinmuxing/kernel-pinmuxing.tex b/slides/kernel-pinmuxing/kernel-pinmuxing.tex
index d0a4a1a..19767fa 100644
--- a/slides/kernel-pinmuxing/kernel-pinmuxing.tex
+++ b/slides/kernel-pinmuxing/kernel-pinmuxing.tex
@@ -25,7 +25,7 @@
 \begin{frame}{Pin muxing in the Linux kernel}
   \item Since Linux 3.2, a \code{pinctrl} subsystem has been added.
-  \item This subsystem, located in \kpath{drivers/pinctrl} provides a
+  \item This subsystem, located in \kdir{drivers/pinctrl} provides a
     generic subsystem to handle pin muxing. It offers:
     \item A pin muxing driver interface, to implement the system-on-chip
diff --git a/slides/kernel-porting-content/kernel-porting-content.tex b/slides/kernel-porting-content/kernel-porting-content.tex
index a47d454..3bc4e78 100644
--- a/slides/kernel-porting-content/kernel-porting-content.tex
+++ b/slides/kernel-porting-content/kernel-porting-content.tex
@@ -5,7 +5,7 @@
   \item Each of them is maintained by a different group of
-    \item See the \kpath{MAINTAINERS} file for details
+    \item See the \kfile{MAINTAINERS} file for details
   \item The organization of the source code and the methods to port
     the Linux kernel to a new board are therefore very
@@ -23,7 +23,7 @@
   \item In the source tree, each architecture has its own directory
-    \item \kpath{arch/arm} for the ARM architecture
+    \item \kdir{arch/arm} for the ARM architecture
   \item This directory contains generic ARM code
@@ -46,7 +46,7 @@
   \item Some CPU types share some code, in directories named
-  \item Device Tree source files in \kpath{arch/arm/boot/dts}.
+  \item Device Tree source files in \kdir{arch/arm/boot/dts}.
@@ -80,10 +80,10 @@
   \item Second, many driver infrastructures were created to replace
     custom code in \code{arch/arm/mach-<foo>}:
-    \item The common clock framework in \kpath{drivers/clk}
-    \item The pinctrl subsystem in \kpath{drivers/pinctrl}
-    \item The irqchip subsystem in \kpath{drivers/irqchip}
-    \item The clocksource subsystem in \kpath{drivers/clocksource}
+    \item The common clock framework in \kdir{drivers/clk}
+    \item The pinctrl subsystem in \kdir{drivers/pinctrl}
+    \item The irqchip subsystem in \kdir{drivers/irqchip}
+    \item The clocksource subsystem in \kdir{drivers/clocksource}
   \item The amount of code in \code{mach-<foo>} has now significantly
@@ -94,7 +94,7 @@
   \frametitle{Adding the support for a new ARM board}
   Provided the SoC used on your board is supported by the Linux kernel:
-  \item Create a {\em Device Tree} file in \kpath{arch/arm/boot/dts},
+  \item Create a {\em Device Tree} file in \kdir{arch/arm/boot/dts},
     generally named \code{<soc-name>-<board-name>.dts}, and make it
     include the relevant SoC \code{.dtsi} file.
@@ -102,7 +102,7 @@
       are enabled, the pin muxing, as well as all the devices on the
-  \item Modify \kpath{arch/arm/boot/dts/Makefile} to make sure your
+  \item Modify \kdir{arch/arm/boot/dts/Makefile} to make sure your
     Device Tree gets built as a {\em DTB} during the kernel build.
   \item If needed, develop the missing device drivers for the devices
     that are on your board outside the SoC.
@@ -334,7 +334,7 @@ i2c0: i2c at 80058000 {
   \item To ensure that the Device Tree Blob gets built for this board
     Device Tree Source, one need to ensure it is listed in
-    \kpath{arch/arm/boot/dts/Makefile}:
+    \kfile{arch/arm/boot/dts/Makefile}:
 dtb-$(CONFIG_ARCH_MXS) += imx28-cfa10036.dtb \
@@ -356,7 +356,7 @@ dtb-$(CONFIG_ARCH_MXS) += imx28-cfa10036.dtb \
   \item Let's consider another ARM platform here, the Marvell Armada
   \item For this platform, the core of the SoC support is located in
-    \kpath{arch/arm/mach-mvebu}
+    \kdir{arch/arm/mach-mvebu}
   \item The \code{board-v7.c} file (see code on the next slide)
     contains the "{\em entry point}" of the SoC definition, the
     \code{DT_MACHINE_START} .. \code{MACHINE_END} definition:
@@ -411,18 +411,18 @@ MACHINE_END
   \item An SoC {\em entry point} file,
-    \kpath{arch/arm/mach-mvebu/board-v7.c}
+    \kfile{arch/arm/mach-mvebu/board-v7.c}
   \item At least one SoC \code{.dtsi} DT and one board \code{.dts} DT,
-    in \kpath{arch/arm/boot/dts}
+    in \kdir{arch/arm/boot/dts}
   \item A interrupt controller driver,
-    \kpath{drivers/irqchip/irq-armada-370-xp.c}
+    \kfile{drivers/irqchip/irq-armada-370-xp.c}
   \item A timer driver,
-    \kpath{drivers/clocksource/time-armada-370-xp.c}
+    \kfile{drivers/clocksource/time-armada-370-xp.c}
   \item An earlyprintk implementation to get early messages from the
-    console, \kpath{arch/arm/Kconfig.debug} and
-    \kpath{arch/arm/include/debug}
-  \item A serial port driver in \kpath{drivers/tty/serial}. For Armada
-    370/XP, the 8250 driver \kpath{drivers/tty/serial/8250} is used.
+    console, \kfile{arch/arm/Kconfig.debug} and
+    \kdir{arch/arm/include/debug}
+  \item A serial port driver in \kdir{drivers/tty/serial}. For Armada
+    370/XP, the 8250 driver \kdir{drivers/tty/serial/8250} is used.
   This allows to boot a minimal system up to user space, using a root
@@ -437,15 +437,15 @@ MACHINE_END
   \item Support for the clocks. Usually requires some clock drivers,
     as well as DT representations of the clocks. See
-    \kpath{drivers/clk/mvebu} for Armada 370/XP clock drivers.
+    \kdir{drivers/clk/mvebu} for Armada 370/XP clock drivers.
   \item Support for pin muxing, through the {\em pinctrl}
-    subsystem. See \kpath{drivers/pinctrl/mvebu} for the Armada 370/XP
+    subsystem. See \kdir{drivers/pinctrl/mvebu} for the Armada 370/XP
   \item Support for GPIOs, through the {\em GPIO} subsystem. See
-    \kpath{drivers/gpio/gpio-mvebu.c} for the Armada 370/XP GPIO
+    \kfile{drivers/gpio/gpio-mvebu.c} for the Armada 370/XP GPIO
   \item Support for SMP, through \kstruct{smp_operations}. See
-    \kpath{arch/arm/mach-mvebu/platsmp.c}.
+    \kfile{arch/arm/mach-mvebu/platsmp.c}.
@@ -454,12 +454,12 @@ MACHINE_END
   Once the core pieces of the SoC support have been implemented, the
   remaining part is to add drivers for the different hardware blocks:
-  \item Ethernet driver, in \kpath{drivers/net/ethernet/marvell/mvneta.c}
-  \item SATA driver, in \kpath{drivers/ata/sata_mv.c}
-  \item I2C driver, in \kpath{drivers/i2c/busses/i2c-mv64xxx.c}
-  \item SPI driver, in \kpath{drivers/spi/spi-orion.c}
-  \item PCIe driver, in \kpath{drivers/pci/host/pci-mvebu.c}
-  \item USB driver, in \kpath{drivers/usb/host/ehci-orion.c}
+  \item Ethernet driver, in \kfile{drivers/net/ethernet/marvell/mvneta.c}
+  \item SATA driver, in \kfile{drivers/ata/sata_mv.c}
+  \item I2C driver, in \kfile{drivers/i2c/busses/i2c-mv64xxx.c}
+  \item SPI driver, in \kfile{drivers/spi/spi-orion.c}
+  \item PCIe driver, in \kfile{drivers/pci/host/pci-mvebu.c}
+  \item USB driver, in \kfile{drivers/usb/host/ehci-orion.c}
   \item etc.
diff --git a/slides/kernel-power-management-content/kernel-power-management-content.tex b/slides/kernel-power-management-content/kernel-power-management-content.tex
index cd091ff..3524943 100644
--- a/slides/kernel-power-management-content/kernel-power-management-content.tex
+++ b/slides/kernel-power-management-content/kernel-power-management-content.tex
@@ -40,7 +40,7 @@
     to devices in the Device Tree (preferred) or statically in the
     source code (old method)
   \item Provides a {\em debugfs} representation of the clock tree
-  \item Is implemented in \kpath{drivers/clk}
+  \item Is implemented in \kdir{drivers/clk}
@@ -57,7 +57,7 @@
     \item Common definition of \kstruct{clk}
     \item Common implementation of the \code{clk.h} API (defined in
-      \kpath{drivers/clk/clk.c})
+      \kfile{drivers/clk/clk.c})
     \item \kstruct{clk_ops}: operations invoked by the clk API
     \item Not supposed to be modified when adding a new driver
@@ -96,14 +96,14 @@
     \item \code{prepare()}, \code{enter()}, \code{finish()},
       \code{valid()} in a \kstruct{platform_suspend_ops} structure
     \item Registered using the \kfunc{suspend_set_ops} function
-    \item See \kpath{arch/arm/mach-at91/pm.c}
+    \item See \kfile{arch/arm/mach-at91/pm.c}
   \item Device drivers
     \item \code{suspend()} and \code{resume()} hooks in the
       \code{*_driver} structures (\kstruct{platform_driver},
       \kstruct{usb_driver}, etc.)
-    \item See \kpath{drivers/net/ethernet/cadence/macb.c}
+    \item See \kfile{drivers/net/ethernet/cadence/macb.c}
@@ -122,7 +122,7 @@
   \item Can also use the s2ram program from
-  \item Read \kpath{kernel/power/suspend.c}
+  \item Read \kfile{kernel/power/suspend.c}
@@ -151,7 +151,7 @@
   \item Implemented in all architectures in
   \item Example to read: look for \code{cpu_idle} in
-    \kpath{arch/arm/kernel/process.c}
+    \kfile{arch/arm/kernel/process.c}
   \item Each ARM cpu defines its own \code{arch_idle} function.
   \item The CPU can run power saving HLT instructions, enter NAP mode,
     and even disable the timers (tickless systems).
@@ -174,7 +174,7 @@
       transition operations
     \item Platform-independent governors (ladder and menu)
     \item Available for x86/ACPI, not supported yet by all ARM cpus.
-      (look for \code{cpuidle*} files under \kpath{arch/arm/})
+      (look for \code{cpuidle*} files under \kdir{arch/arm/})
     \item See \kerneldoc{cpuidle/} in kernel sources.
@@ -197,8 +197,8 @@
   Frequency and voltage scaling possible through the
   \code{cpufreq} kernel infrastructure.
-  \item Generic infrastructure: \kpath{drivers/cpufreq/cpufreq.c} and
-    \kpath{include/linux/cpufreq.h}
+  \item Generic infrastructure: \kfile{drivers/cpufreq/cpufreq.c} and
+    \kfile{include/linux/cpufreq.h}
   \item Generic governors, responsible for deciding frequency and
     voltage transitions
@@ -219,8 +219,8 @@
   \frametitle{Frequency and Voltage Scaling (2)}
-  \item CPU drivers in \kpath{drivers/cpufreq}.  Example:
-    \kpath{drivers/cpufreq/omap-cpufreq.c}
+  \item CPU drivers in \kdir{drivers/cpufreq}.  Example:
+    \kfile{drivers/cpufreq/omap-cpufreq.c}
   \item Must implement the operations of the \code{cpufreq_driver}
     structure and register them using \code{cpufreq_register_driver()}
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 c7ba468..e1fe5e2 100644
--- a/slides/kernel-source-code-drivers/kernel-source-code-drivers.tex
+++ b/slides/kernel-source-code-drivers/kernel-source-code-drivers.tex
@@ -42,7 +42,7 @@
   \item The Linux kernel code is designed to be portable
-  \item All code outside \kpath{arch/} should be portable
+  \item All code outside \kdir{arch/} should be portable
   \item To this aim, the kernel provides macros and functions to
     abstract the architecture specific details
diff --git a/slides/kernel-source-code-layout/kernel-source-code-layout.tex b/slides/kernel-source-code-layout/kernel-source-code-layout.tex
index 2fff47d..897559e 100644
--- a/slides/kernel-source-code-layout/kernel-source-code-layout.tex
+++ b/slides/kernel-source-code-layout/kernel-source-code-layout.tex
@@ -13,19 +13,19 @@
     \item \code{arch/<ARCH>/boot/dts}, Device Tree source files, for
       some architectures
-  \item \kpath{block/}
+  \item \kdir{block/}
     \item Block layer core
-  \item \kpath{COPYING}
+  \item \kfile{COPYING}
     \item Linux copying conditions (GNU GPL)
-  \item \kpath{CREDITS}
+  \item \kfile{CREDITS}
     \item Linux main contributors
-  \item \kpath{crypto/}
+  \item \kdir{crypto/}
     \item Cryptographic libraries
@@ -35,39 +35,39 @@
   \frametitle{Linux sources structure 2/5}
-  \item \kpath{Documentation/}
+  \item \kdir{Documentation/}
     \item Kernel documentation. Don't miss it!
-  \item \kpath{drivers/}
+  \item \kdir{drivers/}
     \item All device drivers except sound ones (usb, pci...)
-  \item \kpath{firmware/}
+  \item \kdir{firmware/}
     \item Legacy: firmware images extracted from old drivers
-  \item \kpath{fs/}
+  \item \kdir{fs/}
-    \item Filesystems (\kpath{fs/ext4/}, etc.)
+    \item Filesystems (\kdir{fs/ext4/}, etc.)
-  \item \kpath{include/}
+  \item \kdir{include/}
     \item Kernel headers
-  \item \kpath{include/linux/}
+  \item \kdir{include/linux/}
     \item Linux kernel core headers
-  \item \kpath{include/uapi/}
+  \item \kdir{include/uapi/}
     \item User space API headers
-  \item \kpath{init/}
+  \item \kdir{init/}
-    \item Linux initialization (including \kpath{init/main.c})
+    \item Linux initialization (including \kfile{init/main.c})
-  \item \kpath{ipc/}
+  \item \kdir{ipc/}
     \item Code used for process communication
@@ -77,31 +77,31 @@
   \frametitle{Linux sources structure 3/5}
-  \item \kpath{Kbuild}
+  \item \kfile{Kbuild}
     \item Part of the kernel build system
-  \item \kpath{Kconfig}
+  \item \kfile{Kconfig}
     \item Top level description file for configuration parameters
-  \item \kpath{kernel/}
+  \item \kdir{kernel/}
     \item Linux kernel core (very small!)
-  \item \kpath{lib/}
+  \item \kdir{lib/}
     \item Misc library routines (zlib, crc32...)
-  \item \kpath{MAINTAINERS}
+  \item \kfile{MAINTAINERS}
     \item Maintainers of each kernel part. Very useful!
-  \item \kpath{Makefile}
+  \item \kfile{Makefile}
     \item Top Linux Makefile (sets arch and version)
-  \item \kpath{mm/}
+  \item \kdir{mm/}
     \item Memory management code (small too!)
@@ -111,35 +111,35 @@
   \frametitle{Linux sources structure 4/5}
-  \item \kpath{net/}
+  \item \kdir{net/}
     \item Network support code (not drivers)
-  \item \kpath{README}
+  \item \kfile{README}
     \item Overview and building instructions
-  \item \kpath{REPORTING-BUGS}
+  \item \kfile{REPORTING-BUGS}
     \item Bug report instructions
-  \item \kpath{samples/}
+  \item \kdir{samples/}
     \item Sample code (markers, kprobes, kobjects...)
-  \item \kpath{scripts/}
+  \item \kdir{scripts/}
     \item Scripts for internal or external use
-  \item \kpath{security/}
+  \item \kdir{security/}
     \item Security model implementations (SELinux...)
-  \item \kpath{sound/}
+  \item \kdir{sound/}
     \item Sound support code and drivers
-  \item \kpath{tools/}
+  \item \kdir{tools/}
     \item Code for various user space tools (mostly C)
@@ -149,11 +149,11 @@
   \frametitle{Linux sources structure 5/5}
-  \item \kpath{usr/}
+  \item \kdir{usr/}
     \item Code to generate an initramfs cpio archive
-  \item \kpath{virt/}
+  \item \kdir{virt/}
     \item Virtualization support (KVM)
diff --git a/slides/sysdev-flash-filesystems/sysdev-flash-filesystems.tex b/slides/sysdev-flash-filesystems/sysdev-flash-filesystems.tex
index 48b9d51..e17d1b4 100644
--- a/slides/sysdev-flash-filesystems/sysdev-flash-filesystems.tex
+++ b/slides/sysdev-flash-filesystems/sysdev-flash-filesystems.tex
@@ -162,7 +162,7 @@
   \frametitle{Linux: definition of MTD partitions}
   The Device Tree is the standard place to define MTD partitions
   for platforms with Device Tree support.\\
-  Example from \kpath{arch/arm/boot/dts/omap3-igep.dtsi}:
+  Example from \kfile{arch/arm/boot/dts/omap3-igep.dtsi}:
         nand at 0,0 {
                 linux,mtd-name= "micron,mt29c4g96maz";
diff --git a/slides/sysdev-linux-intro-configuration/sysdev-linux-intro-configuration.tex b/slides/sysdev-linux-intro-configuration/sysdev-linux-intro-configuration.tex
index 1fe06c2..b83058b 100644
--- a/slides/sysdev-linux-intro-configuration/sysdev-linux-intro-configuration.tex
+++ b/slides/sysdev-linux-intro-configuration/sysdev-linux-intro-configuration.tex
@@ -5,7 +5,7 @@
   \item The kernel configuration and build system is based on multiple
-  \item One only interacts with the main \kpath{Makefile}, present at
+  \item One only interacts with the main \kfile{Makefile}, present at
     the {\bf top directory} of the kernel source tree
   \item Interaction takes place
diff --git a/slides/sysdev-linux-intro-features/sysdev-linux-intro-features.tex b/slides/sysdev-linux-intro-features/sysdev-linux-intro-features.tex
index 379719d..ea83b7f 100644
--- a/slides/sysdev-linux-intro-features/sysdev-linux-intro-features.tex
+++ b/slides/sysdev-linux-intro-features/sysdev-linux-intro-features.tex
@@ -136,10 +136,10 @@
   \frametitle{Supported hardware architectures}
-  \item See the \kpath{arch/} directory in the kernel sources
+  \item See the \kdir{arch/} directory in the kernel sources
   \item Minimum: 32 bit processors, with or without MMU, and
     \code{gcc} support
-  \item 32 bit architectures (\kpath{arch/} subdirectories)\\
+  \item 32 bit architectures (\kdir{arch/} subdirectories)\\
     Examples: \ksubarch{arm}, \ksubarch{avr32}, \ksubarch{blackfin},
     \ksubarch{c6x}, \ksubarch{m68k}, \ksubarch{microblaze}, \ksubarch{mips},
     \ksubarch{score}, \ksubarch{sparc}, \ksubarch{um}
diff --git a/slides/sysdev-linux-intro-sources/sysdev-linux-intro-sources.tex b/slides/sysdev-linux-intro-sources/sysdev-linux-intro-sources.tex
index 82d23a6..7dd2976 100644
--- a/slides/sysdev-linux-intro-sources/sysdev-linux-intro-sources.tex
+++ b/slides/sysdev-linux-intro-sources/sysdev-linux-intro-sources.tex
@@ -75,25 +75,25 @@
-    \item \kpath{drivers/}: 57.0\%
-    \item \kpath{arch/}: 16.3\%
-    \item \kpath{fs/}: 5.5\%
-    \item \kpath{sound/}: 4.4\%
-    \item \kpath{net/}: 4.3\%
-    \item \kpath{include/}: 3.5\%
-    \item \kpath{Documentation/}: 2.8\%
-    \item \kpath{tools/}: 1.3\%
-    \item \kpath{kernel/}: 1.2\%
+    \item \kdir{drivers/}: 57.0\%
+    \item \kdir{arch/}: 16.3\%
+    \item \kdir{fs/}: 5.5\%
+    \item \kdir{sound/}: 4.4\%
+    \item \kdir{net/}: 4.3\%
+    \item \kdir{include/}: 3.5\%
+    \item \kdir{Documentation/}: 2.8\%
+    \item \kdir{tools/}: 1.3\%
+    \item \kdir{kernel/}: 1.2\%
-    \item \kpath{firmware/}: 0.6\%
-    \item \kpath{lib/}: 0.5\%
-    \item \kpath{mm/}: 0.5\%
-    \item \kpath{scripts/}: 0.4\%
-    \item \kpath{crypto/}: 0.4\%
-    \item \kpath{security/}: 0.3\%
-    \item \kpath{block/}: 0.1\%
+    \item \kdir{firmware/}: 0.6\%
+    \item \kdir{lib/}: 0.5\%
+    \item \kdir{mm/}: 0.5\%
+    \item \kdir{scripts/}: 0.4\%
+    \item \kdir{crypto/}: 0.4\%
+    \item \kdir{security/}: 0.3\%
+    \item \kdir{block/}: 0.1\%
     \item ...

More information about the training-materials-updates mailing list