aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Documentation/00-INDEX28
-rw-r--r--Documentation/Changes6
-rw-r--r--Documentation/CodingStyle1
-rw-r--r--Documentation/DocBook/Makefile2
-rw-r--r--Documentation/DocBook/crypto-API.tmpl2
-rw-r--r--Documentation/DocBook/kgdb.tmpl81
-rw-r--r--Documentation/SubmittingPatches452
-rw-r--r--Documentation/arm/00-INDEX12
-rw-r--r--Documentation/blackfin/Makefile2
-rw-r--r--Documentation/devicetree/bindings/arm/msm/timer.txt2
-rw-r--r--Documentation/devicetree/bindings/ata/cavium-compact-flash.txt2
-rw-r--r--Documentation/devicetree/bindings/c6x/dscr.txt2
-rw-r--r--Documentation/devicetree/bindings/dma/renesas,rcar-dmac.txt2
-rw-r--r--Documentation/devicetree/bindings/gpio/gpio-pcf857x.txt2
-rw-r--r--Documentation/devicetree/bindings/iio/adc/xilinx-xadc.txt2
-rw-r--r--Documentation/devicetree/bindings/mtd/fsmc-nand.txt2
-rw-r--r--Documentation/devicetree/bindings/net/broadcom-systemport.txt2
-rw-r--r--Documentation/devicetree/bindings/power/rockchip-io-domain.txt2
-rw-r--r--Documentation/devicetree/overlay-notes.txt4
-rw-r--r--Documentation/dmaengine/00-INDEX8
-rw-r--r--Documentation/driver-model/bus.txt2
-rw-r--r--Documentation/filesystems/proc.txt2
-rw-r--r--Documentation/filesystems/seq_file.txt12
-rw-r--r--Documentation/gpio/board.txt2
-rw-r--r--Documentation/kprobes.txt3
-rw-r--r--Documentation/locking/00-INDEX16
-rw-r--r--Documentation/locking/lockstat.txt5
-rw-r--r--Documentation/misc-devices/mei/mei-client-bus.txt17
-rw-r--r--Documentation/misc-devices/mei/mei.txt126
-rw-r--r--Documentation/networking/00-INDEX8
-rw-r--r--Documentation/networking/can.txt2
-rw-r--r--Documentation/scheduler/completion.txt236
-rw-r--r--Documentation/sysctl/vm.txt2
-rw-r--r--Documentation/trace/ftrace.txt2
-rw-r--r--MAINTAINERS1
35 files changed, 664 insertions, 388 deletions
diff --git a/Documentation/00-INDEX b/Documentation/00-INDEX
index 1750fcef1ab4..cd077ca0e1b8 100644
--- a/Documentation/00-INDEX
+++ b/Documentation/00-INDEX
@@ -29,8 +29,6 @@ DMA-ISA-LPC.txt
29 - How to do DMA with ISA (and LPC) devices. 29 - How to do DMA with ISA (and LPC) devices.
30DMA-attributes.txt 30DMA-attributes.txt
31 - listing of the various possible attributes a DMA region can have 31 - listing of the various possible attributes a DMA region can have
32dmatest.txt
33 - how to compile, configure and use the dmatest system.
34DocBook/ 32DocBook/
35 - directory with DocBook templates etc. for kernel documentation. 33 - directory with DocBook templates etc. for kernel documentation.
36EDID/ 34EDID/
@@ -163,8 +161,6 @@ digsig.txt
163 -info on the Digital Signature Verification API 161 -info on the Digital Signature Verification API
164dma-buf-sharing.txt 162dma-buf-sharing.txt
165 - the DMA Buffer Sharing API Guide 163 - the DMA Buffer Sharing API Guide
166dmaengine.txt
167 -the DMA Engine API Guide
168dontdiff 164dontdiff
169 - file containing a list of files that should never be diff'ed. 165 - file containing a list of files that should never be diff'ed.
170driver-model/ 166driver-model/
@@ -209,6 +205,8 @@ hid/
209 - directory with information on human interface devices 205 - directory with information on human interface devices
210highuid.txt 206highuid.txt
211 - notes on the change from 16 bit to 32 bit user/group IDs. 207 - notes on the change from 16 bit to 32 bit user/group IDs.
208hsi.txt
209 - HSI subsystem overview.
212hwspinlock.txt 210hwspinlock.txt
213 - hardware spinlock provides hardware assistance for synchronization 211 - hardware spinlock provides hardware assistance for synchronization
214timers/ 212timers/
@@ -277,6 +275,8 @@ kprobes.txt
277 - documents the kernel probes debugging feature. 275 - documents the kernel probes debugging feature.
278kref.txt 276kref.txt
279 - docs on adding reference counters (krefs) to kernel objects. 277 - docs on adding reference counters (krefs) to kernel objects.
278kselftest.txt
279 - small unittests for (some) individual codepaths in the kernel.
280laptops/ 280laptops/
281 - directory with laptop related info and laptop driver documentation. 281 - directory with laptop related info and laptop driver documentation.
282ldm.txt 282ldm.txt
@@ -285,22 +285,22 @@ leds/
285 - directory with info about LED handling under Linux. 285 - directory with info about LED handling under Linux.
286local_ops.txt 286local_ops.txt
287 - semantics and behavior of local atomic operations. 287 - semantics and behavior of local atomic operations.
288lockdep-design.txt
289 - documentation on the runtime locking correctness validator.
290locking/ 288locking/
291 - directory with info about kernel locking primitives 289 - directory with info about kernel locking primitives
292lockstat.txt
293 - info on collecting statistics on locks (and contention).
294lockup-watchdogs.txt 290lockup-watchdogs.txt
295 - info on soft and hard lockup detectors (aka nmi_watchdog). 291 - info on soft and hard lockup detectors (aka nmi_watchdog).
296logo.gif 292logo.gif
297 - full colour GIF image of Linux logo (penguin - Tux). 293 - full colour GIF image of Linux logo (penguin - Tux).
298logo.txt 294logo.txt
299 - info on creator of above logo & site to get additional images from. 295 - info on creator of above logo & site to get additional images from.
296lzo.txt
297 - kernel LZO decompressor input formats
300m68k/ 298m68k/
301 - directory with info about Linux on Motorola 68k architecture. 299 - directory with info about Linux on Motorola 68k architecture.
302magic-number.txt 300magic-number.txt
303 - list of magic numbers used to mark/protect kernel data structures. 301 - list of magic numbers used to mark/protect kernel data structures.
302mailbox.txt
303 - How to write drivers for the common mailbox framework (IPC).
304md.txt 304md.txt
305 - info on boot arguments for the multiple devices driver. 305 - info on boot arguments for the multiple devices driver.
306media-framework.txt 306media-framework.txt
@@ -327,8 +327,6 @@ mtd/
327 - directory with info about memory technology devices (flash) 327 - directory with info about memory technology devices (flash)
328mono.txt 328mono.txt
329 - how to execute Mono-based .NET binaries with the help of BINFMT_MISC. 329 - how to execute Mono-based .NET binaries with the help of BINFMT_MISC.
330mutex-design.txt
331 - info on the generic mutex subsystem.
332namespaces/ 330namespaces/
333 - directory with various information about namespaces 331 - directory with various information about namespaces
334netlabel/ 332netlabel/
@@ -395,10 +393,6 @@ robust-futexes.txt
395 - a description of what robust futexes are. 393 - a description of what robust futexes are.
396rpmsg.txt 394rpmsg.txt
397 - info on the Remote Processor Messaging (rpmsg) Framework 395 - info on the Remote Processor Messaging (rpmsg) Framework
398rt-mutex-design.txt
399 - description of the RealTime mutex implementation design.
400rt-mutex.txt
401 - desc. of RT-mutex subsystem with PI (Priority Inheritance) support.
402rtc.txt 396rtc.txt
403 - notes on how to use the Real Time Clock (aka CMOS clock) driver. 397 - notes on how to use the Real Time Clock (aka CMOS clock) driver.
404s390/ 398s390/
@@ -425,8 +419,6 @@ sparse.txt
425 - info on how to obtain and use the sparse tool for typechecking. 419 - info on how to obtain and use the sparse tool for typechecking.
426spi/ 420spi/
427 - overview of Linux kernel Serial Peripheral Interface (SPI) support. 421 - overview of Linux kernel Serial Peripheral Interface (SPI) support.
428spinlocks.txt
429 - info on using spinlocks to provide exclusive access in kernel.
430stable_api_nonsense.txt 422stable_api_nonsense.txt
431 - info on why the kernel does not have a stable in-kernel api or abi. 423 - info on why the kernel does not have a stable in-kernel api or abi.
432stable_kernel_rules.txt 424stable_kernel_rules.txt
@@ -483,10 +475,10 @@ wimax/
483 - directory with info about Intel Wireless Wimax Connections 475 - directory with info about Intel Wireless Wimax Connections
484workqueue.txt 476workqueue.txt
485 - information on the Concurrency Managed Workqueue implementation 477 - information on the Concurrency Managed Workqueue implementation
486ww-mutex-design.txt
487 - Intro to Mutex wait/would deadlock handling.s
488x86/x86_64/ 478x86/x86_64/
489 - directory with info on Linux support for AMD x86-64 (Hammer) machines. 479 - directory with info on Linux support for AMD x86-64 (Hammer) machines.
480xillybus.txt
481 - Overview and basic ui of xillybus driver
490xtensa/ 482xtensa/
491 - directory with documents relating to arch/xtensa port/implementation 483 - directory with documents relating to arch/xtensa port/implementation
492xz.txt 484xz.txt
diff --git a/Documentation/Changes b/Documentation/Changes
index 74bdda9272a4..646cdaa6e9d1 100644
--- a/Documentation/Changes
+++ b/Documentation/Changes
@@ -21,8 +21,8 @@ running a Linux kernel. Also, not all tools are necessary on all
21systems; obviously, if you don't have any ISDN hardware, for example, 21systems; obviously, if you don't have any ISDN hardware, for example,
22you probably needn't concern yourself with isdn4k-utils. 22you probably needn't concern yourself with isdn4k-utils.
23 23
24o Gnu C 3.2 # gcc --version 24o GNU C 3.2 # gcc --version
25o Gnu make 3.80 # make --version 25o GNU make 3.80 # make --version
26o binutils 2.12 # ld -v 26o binutils 2.12 # ld -v
27o util-linux 2.10o # fdformat --version 27o util-linux 2.10o # fdformat --version
28o module-init-tools 0.9.10 # depmod -V 28o module-init-tools 0.9.10 # depmod -V
@@ -57,7 +57,7 @@ computer.
57Make 57Make
58---- 58----
59 59
60You will need Gnu make 3.80 or later to build the kernel. 60You will need GNU make 3.80 or later to build the kernel.
61 61
62Binutils 62Binutils
63-------- 63--------
diff --git a/Documentation/CodingStyle b/Documentation/CodingStyle
index 618a33c940df..449a8a19fc21 100644
--- a/Documentation/CodingStyle
+++ b/Documentation/CodingStyle
@@ -527,6 +527,7 @@ values. To do the latter, you can stick the following in your .emacs file:
527 (string-match (expand-file-name "~/src/linux-trees") 527 (string-match (expand-file-name "~/src/linux-trees")
528 filename)) 528 filename))
529 (setq indent-tabs-mode t) 529 (setq indent-tabs-mode t)
530 (setq show-trailing-whitespace t)
530 (c-set-style "linux-tabs-only"))))) 531 (c-set-style "linux-tabs-only")))))
531 532
532This will make emacs go better with the kernel coding style for C 533This will make emacs go better with the kernel coding style for C
diff --git a/Documentation/DocBook/Makefile b/Documentation/DocBook/Makefile
index 9c7d92d03f62..b6a6a2e0dd3b 100644
--- a/Documentation/DocBook/Makefile
+++ b/Documentation/DocBook/Makefile
@@ -56,7 +56,7 @@ htmldocs: $(HTML)
56 56
57MAN := $(patsubst %.xml, %.9, $(BOOKS)) 57MAN := $(patsubst %.xml, %.9, $(BOOKS))
58mandocs: $(MAN) 58mandocs: $(MAN)
59 $(if $(wildcard $(obj)/man/*.9),gzip -f $(obj)/man/*.9) 59 find $(obj)/man -name '*.9' | xargs gzip -f
60 60
61installmandocs: mandocs 61installmandocs: mandocs
62 mkdir -p /usr/local/man/man9/ 62 mkdir -p /usr/local/man/man9/
diff --git a/Documentation/DocBook/crypto-API.tmpl b/Documentation/DocBook/crypto-API.tmpl
index c763d30f4893..04a8c24ead47 100644
--- a/Documentation/DocBook/crypto-API.tmpl
+++ b/Documentation/DocBook/crypto-API.tmpl
@@ -111,7 +111,7 @@
111 <para> 111 <para>
112 This specification is intended for consumers of the kernel crypto 112 This specification is intended for consumers of the kernel crypto
113 API as well as for developers implementing ciphers. This API 113 API as well as for developers implementing ciphers. This API
114 specification, however, does not discusses all API calls available 114 specification, however, does not discuss all API calls available
115 to data transformation implementations (i.e. implementations of 115 to data transformation implementations (i.e. implementations of
116 ciphers and other transformations (such as CRC or even compression 116 ciphers and other transformations (such as CRC or even compression
117 algorithms) that can register with the kernel crypto API). 117 algorithms) that can register with the kernel crypto API).
diff --git a/Documentation/DocBook/kgdb.tmpl b/Documentation/DocBook/kgdb.tmpl
index f77358f96930..2428cc04dbc8 100644
--- a/Documentation/DocBook/kgdb.tmpl
+++ b/Documentation/DocBook/kgdb.tmpl
@@ -75,7 +75,7 @@
75 a development machine and the other is the target machine. The 75 a development machine and the other is the target machine. The
76 kernel to be debugged runs on the target machine. The development 76 kernel to be debugged runs on the target machine. The development
77 machine runs an instance of gdb against the vmlinux file which 77 machine runs an instance of gdb against the vmlinux file which
78 contains the symbols (not boot image such as bzImage, zImage, 78 contains the symbols (not a boot image such as bzImage, zImage,
79 uImage...). In gdb the developer specifies the connection 79 uImage...). In gdb the developer specifies the connection
80 parameters and connects to kgdb. The type of connection a 80 parameters and connects to kgdb. The type of connection a
81 developer makes with gdb depends on the availability of kgdb I/O 81 developer makes with gdb depends on the availability of kgdb I/O
@@ -95,7 +95,7 @@
95 <title>Kernel config options for kgdb</title> 95 <title>Kernel config options for kgdb</title>
96 <para> 96 <para>
97 To enable <symbol>CONFIG_KGDB</symbol> you should look under 97 To enable <symbol>CONFIG_KGDB</symbol> you should look under
98 "Kernel debugging" and select "KGDB: kernel debugger". 98 "Kernel hacking" / "Kernel debugging" and select "KGDB: kernel debugger".
99 </para> 99 </para>
100 <para> 100 <para>
101 While it is not a hard requirement that you have symbols in your 101 While it is not a hard requirement that you have symbols in your
@@ -105,7 +105,7 @@
105 kernel with debug info" in the config menu. 105 kernel with debug info" in the config menu.
106 </para> 106 </para>
107 <para> 107 <para>
108 It is advised, but not required that you turn on the 108 It is advised, but not required, that you turn on the
109 <symbol>CONFIG_FRAME_POINTER</symbol> kernel option which is called "Compile the 109 <symbol>CONFIG_FRAME_POINTER</symbol> kernel option which is called "Compile the
110 kernel with frame pointers" in the config menu. This option 110 kernel with frame pointers" in the config menu. This option
111 inserts code to into the compiled executable which saves the frame 111 inserts code to into the compiled executable which saves the frame
@@ -181,7 +181,7 @@
181 <para>This section describes the various runtime kernel 181 <para>This section describes the various runtime kernel
182 parameters that affect the configuration of the kernel debugger. 182 parameters that affect the configuration of the kernel debugger.
183 The following chapter covers using kdb and kgdb as well as 183 The following chapter covers using kdb and kgdb as well as
184 provides some examples of the configuration parameters.</para> 184 providing some examples of the configuration parameters.</para>
185 <sect1 id="kgdboc"> 185 <sect1 id="kgdboc">
186 <title>Kernel parameter: kgdboc</title> 186 <title>Kernel parameter: kgdboc</title>
187 <para>The kgdboc driver was originally an abbreviation meant to 187 <para>The kgdboc driver was originally an abbreviation meant to
@@ -219,8 +219,8 @@
219 <listitem><para>kbd = Keyboard</para></listitem> 219 <listitem><para>kbd = Keyboard</para></listitem>
220 </itemizedlist> 220 </itemizedlist>
221 </para> 221 </para>
222 <para>You can configure kgdboc to use the keyboard, and or a serial 222 <para>You can configure kgdboc to use the keyboard, and/or a serial
223 device depending on if you are using kdb and or kgdb, in one of the 223 device depending on if you are using kdb and/or kgdb, in one of the
224 following scenarios. The order listed above must be observed if 224 following scenarios. The order listed above must be observed if
225 you use any of the optional configurations together. Using kms + 225 you use any of the optional configurations together. Using kms +
226 only gdb is generally not a useful combination.</para> 226 only gdb is generally not a useful combination.</para>
@@ -261,11 +261,8 @@
261 </sect3> 261 </sect3>
262 <sect3 id="kgdbocArgs3"> 262 <sect3 id="kgdbocArgs3">
263 <title>More examples</title> 263 <title>More examples</title>
264 <para>You can configure kgdboc to use the keyboard, and or a serial 264 <para>You can configure kgdboc to use the keyboard, and/or a serial device
265 device depending on if you are using kdb and or kgdb, in one of the 265 depending on if you are using kdb and/or kgdb, in one of the
266 following scenarios.</para>
267 <para>You can configure kgdboc to use the keyboard, and or a serial device
268 depending on if you are using kdb and or kgdb, in one of the
269 following scenarios. 266 following scenarios.
270 <orderedlist> 267 <orderedlist>
271 <listitem><para>kdb and kgdb over only a serial port</para> 268 <listitem><para>kdb and kgdb over only a serial port</para>
@@ -315,7 +312,7 @@
315 <para> 312 <para>
316 The Kernel command line option <constant>kgdbwait</constant> makes 313 The Kernel command line option <constant>kgdbwait</constant> makes
317 kgdb wait for a debugger connection during booting of a kernel. You 314 kgdb wait for a debugger connection during booting of a kernel. You
318 can only use this option you compiled a kgdb I/O driver into the 315 can only use this option if you compiled a kgdb I/O driver into the
319 kernel and you specified the I/O driver configuration as a kernel 316 kernel and you specified the I/O driver configuration as a kernel
320 command line option. The kgdbwait parameter should always follow the 317 command line option. The kgdbwait parameter should always follow the
321 configuration parameter for the kgdb I/O driver in the kernel 318 configuration parameter for the kgdb I/O driver in the kernel
@@ -354,7 +351,7 @@
354 </listitem> 351 </listitem>
355 </orderedlist> 352 </orderedlist>
356 <para>IMPORTANT NOTE: You cannot use kgdboc + kgdbcon on a tty that is an 353 <para>IMPORTANT NOTE: You cannot use kgdboc + kgdbcon on a tty that is an
357 active system console. An example incorrect usage is <constant>console=ttyS0,115200 kgdboc=ttyS0 kgdbcon</constant> 354 active system console. An example of incorrect usage is <constant>console=ttyS0,115200 kgdboc=ttyS0 kgdbcon</constant>
358 </para> 355 </para>
359 <para>It is possible to use this option with kgdboc on a tty that is not a system console. 356 <para>It is possible to use this option with kgdboc on a tty that is not a system console.
360 </para> 357 </para>
@@ -386,12 +383,12 @@
386 <title>Quick start for kdb on a serial port</title> 383 <title>Quick start for kdb on a serial port</title>
387 <para>This is a quick example of how to use kdb.</para> 384 <para>This is a quick example of how to use kdb.</para>
388 <para><orderedlist> 385 <para><orderedlist>
389 <listitem><para>Boot kernel with arguments: 386 <listitem><para>Configure kgdboc at boot using kernel parameters:
390 <itemizedlist> 387 <itemizedlist>
391 <listitem><para><constant>console=ttyS0,115200 kgdboc=ttyS0,115200</constant></para></listitem> 388 <listitem><para><constant>console=ttyS0,115200 kgdboc=ttyS0,115200</constant></para></listitem>
392 </itemizedlist></para> 389 </itemizedlist></para>
393 <para>OR</para> 390 <para>OR</para>
394 <para>Configure kgdboc after the kernel booted; assuming you are using a serial port console: 391 <para>Configure kgdboc after the kernel has booted; assuming you are using a serial port console:
395 <itemizedlist> 392 <itemizedlist>
396 <listitem><para><constant>echo ttyS0 &gt; /sys/module/kgdboc/parameters/kgdboc</constant></para></listitem> 393 <listitem><para><constant>echo ttyS0 &gt; /sys/module/kgdboc/parameters/kgdboc</constant></para></listitem>
397 </itemizedlist> 394 </itemizedlist>
@@ -442,12 +439,12 @@
442 <title>Quick start for kdb using a keyboard connected console</title> 439 <title>Quick start for kdb using a keyboard connected console</title>
443 <para>This is a quick example of how to use kdb with a keyboard.</para> 440 <para>This is a quick example of how to use kdb with a keyboard.</para>
444 <para><orderedlist> 441 <para><orderedlist>
445 <listitem><para>Boot kernel with arguments: 442 <listitem><para>Configure kgdboc at boot using kernel parameters:
446 <itemizedlist> 443 <itemizedlist>
447 <listitem><para><constant>kgdboc=kbd</constant></para></listitem> 444 <listitem><para><constant>kgdboc=kbd</constant></para></listitem>
448 </itemizedlist></para> 445 </itemizedlist></para>
449 <para>OR</para> 446 <para>OR</para>
450 <para>Configure kgdboc after the kernel booted: 447 <para>Configure kgdboc after the kernel has booted:
451 <itemizedlist> 448 <itemizedlist>
452 <listitem><para><constant>echo kbd &gt; /sys/module/kgdboc/parameters/kgdboc</constant></para></listitem> 449 <listitem><para><constant>echo kbd &gt; /sys/module/kgdboc/parameters/kgdboc</constant></para></listitem>
453 </itemizedlist> 450 </itemizedlist>
@@ -501,12 +498,12 @@
501 <title>Connecting with gdb to a serial port</title> 498 <title>Connecting with gdb to a serial port</title>
502 <orderedlist> 499 <orderedlist>
503 <listitem><para>Configure kgdboc</para> 500 <listitem><para>Configure kgdboc</para>
504 <para>Boot kernel with arguments: 501 <para>Configure kgdboc at boot using kernel parameters:
505 <itemizedlist> 502 <itemizedlist>
506 <listitem><para><constant>kgdboc=ttyS0,115200</constant></para></listitem> 503 <listitem><para><constant>kgdboc=ttyS0,115200</constant></para></listitem>
507 </itemizedlist></para> 504 </itemizedlist></para>
508 <para>OR</para> 505 <para>OR</para>
509 <para>Configure kgdboc after the kernel booted: 506 <para>Configure kgdboc after the kernel has booted:
510 <itemizedlist> 507 <itemizedlist>
511 <listitem><para><constant>echo ttyS0 &gt; /sys/module/kgdboc/parameters/kgdboc</constant></para></listitem> 508 <listitem><para><constant>echo ttyS0 &gt; /sys/module/kgdboc/parameters/kgdboc</constant></para></listitem>
512 </itemizedlist></para> 509 </itemizedlist></para>
@@ -536,7 +533,7 @@
536 </para> 533 </para>
537 </listitem> 534 </listitem>
538 <listitem> 535 <listitem>
539 <para>Connect from from gdb</para> 536 <para>Connect from gdb</para>
540 <para> 537 <para>
541 Example (using a directly connected port): 538 Example (using a directly connected port):
542 </para> 539 </para>
@@ -584,7 +581,7 @@
584 <para> 581 <para>
585 There are two ways to switch from kgdb to kdb: you can use gdb to 582 There are two ways to switch from kgdb to kdb: you can use gdb to
586 issue a maintenance packet, or you can blindly type the command $3#33. 583 issue a maintenance packet, or you can blindly type the command $3#33.
587 Whenever kernel debugger stops in kgdb mode it will print the 584 Whenever the kernel debugger stops in kgdb mode it will print the
588 message <constant>KGDB or $3#33 for KDB</constant>. It is important 585 message <constant>KGDB or $3#33 for KDB</constant>. It is important
589 to note that you have to type the sequence correctly in one pass. 586 to note that you have to type the sequence correctly in one pass.
590 You cannot type a backspace or delete because kgdb will interpret 587 You cannot type a backspace or delete because kgdb will interpret
@@ -704,7 +701,7 @@ Task Addr Pid Parent [*] cpu State Thread Command
704 <listitem><para>Registration and unregistration of architecture specific trap hooks</para></listitem> 701 <listitem><para>Registration and unregistration of architecture specific trap hooks</para></listitem>
705 <listitem><para>Any special exception handling and cleanup</para></listitem> 702 <listitem><para>Any special exception handling and cleanup</para></listitem>
706 <listitem><para>NMI exception handling and cleanup</para></listitem> 703 <listitem><para>NMI exception handling and cleanup</para></listitem>
707 <listitem><para>(optional)HW breakpoints</para></listitem> 704 <listitem><para>(optional) HW breakpoints</para></listitem>
708 </itemizedlist> 705 </itemizedlist>
709 </para> 706 </para>
710 </listitem> 707 </listitem>
@@ -760,7 +757,7 @@ Task Addr Pid Parent [*] cpu State Thread Command
760 a kgdb I/O driver for characters when it needs input. The I/O 757 a kgdb I/O driver for characters when it needs input. The I/O
761 driver is expected to return immediately if there is no data 758 driver is expected to return immediately if there is no data
762 available. Doing so allows for the future possibility to touch 759 available. Doing so allows for the future possibility to touch
763 watch dog hardware in such a way as to have a target system not 760 watchdog hardware in such a way as to have a target system not
764 reset when these are enabled. 761 reset when these are enabled.
765 </para> 762 </para>
766 </listitem> 763 </listitem>
@@ -779,21 +776,25 @@ Task Addr Pid Parent [*] cpu State Thread Command
779 their &lt;asm/kgdb.h&gt; file. These are: 776 their &lt;asm/kgdb.h&gt; file. These are:
780 <itemizedlist> 777 <itemizedlist>
781 <listitem> 778 <listitem>
782 <para> 779 <para>
783 NUMREGBYTES: The size in bytes of all of the registers, so 780 NUMREGBYTES: The size in bytes of all of the registers, so
784 that we can ensure they will all fit into a packet. 781 that we can ensure they will all fit into a packet.
785 </para> 782 </para>
786 <para> 783 </listitem>
787 BUFMAX: The size in bytes of the buffer GDB will read into. 784 <listitem>
788 This must be larger than NUMREGBYTES. 785 <para>
789 </para> 786 BUFMAX: The size in bytes of the buffer GDB will read into.
790 <para> 787 This must be larger than NUMREGBYTES.
791 CACHE_FLUSH_IS_SAFE: Set to 1 if it is always safe to call 788 </para>
792 flush_cache_range or flush_icache_range. On some architectures, 789 </listitem>
793 these functions may not be safe to call on SMP since we keep other 790 <listitem>
794 CPUs in a holding pattern. 791 <para>
795 </para> 792 CACHE_FLUSH_IS_SAFE: Set to 1 if it is always safe to call
796 </listitem> 793 flush_cache_range or flush_icache_range. On some architectures,
794 these functions may not be safe to call on SMP since we keep other
795 CPUs in a holding pattern.
796 </para>
797 </listitem>
797 </itemizedlist> 798 </itemizedlist>
798 </para> 799 </para>
799 <para> 800 <para>
@@ -812,8 +813,8 @@ Task Addr Pid Parent [*] cpu State Thread Command
812 <para> 813 <para>
813 The kgdboc driver is actually a very thin driver that relies on the 814 The kgdboc driver is actually a very thin driver that relies on the
814 underlying low level to the hardware driver having "polling hooks" 815 underlying low level to the hardware driver having "polling hooks"
815 which the to which the tty driver is attached. In the initial 816 to which the tty driver is attached. In the initial
816 implementation of kgdboc it the serial_core was changed to expose a 817 implementation of kgdboc the serial_core was changed to expose a
817 low level UART hook for doing polled mode reading and writing of a 818 low level UART hook for doing polled mode reading and writing of a
818 single character while in an atomic context. When kgdb makes an I/O 819 single character while in an atomic context. When kgdb makes an I/O
819 request to the debugger, kgdboc invokes a callback in the serial 820 request to the debugger, kgdboc invokes a callback in the serial
diff --git a/Documentation/SubmittingPatches b/Documentation/SubmittingPatches
index 1fa1caa198eb..447671bd2927 100644
--- a/Documentation/SubmittingPatches
+++ b/Documentation/SubmittingPatches
@@ -10,27 +10,49 @@ kernel, the process can sometimes be daunting if you're not familiar
10with "the system." This text is a collection of suggestions which 10with "the system." This text is a collection of suggestions which
11can greatly increase the chances of your change being accepted. 11can greatly increase the chances of your change being accepted.
12 12
13Read Documentation/SubmitChecklist for a list of items to check 13This document contains a large number of suggestions in a relatively terse
14before submitting code. If you are submitting a driver, also read 14format. For detailed information on how the kernel development process
15Documentation/SubmittingDrivers. 15works, see Documentation/development-process. Also, read
16Documentation/SubmitChecklist for a list of items to check before
17submitting code. If you are submitting a driver, also read
18Documentation/SubmittingDrivers; for device tree binding patches, read
19Documentation/devicetree/bindings/submitting-patches.txt.
16 20
17Many of these steps describe the default behavior of the git version 21Many of these steps describe the default behavior of the git version
18control system; if you use git to prepare your patches, you'll find much 22control system; if you use git to prepare your patches, you'll find much
19of the mechanical work done for you, though you'll still need to prepare 23of the mechanical work done for you, though you'll still need to prepare
20and document a sensible set of patches. 24and document a sensible set of patches. In general, use of git will make
25your life as a kernel developer easier.
21 26
22-------------------------------------------- 27--------------------------------------------
23SECTION 1 - CREATING AND SENDING YOUR CHANGE 28SECTION 1 - CREATING AND SENDING YOUR CHANGE
24-------------------------------------------- 29--------------------------------------------
25 30
26 31
320) Obtain a current source tree
33-------------------------------
34
35If you do not have a repository with the current kernel source handy, use
36git to obtain one. You'll want to start with the mainline repository,
37which can be grabbed with:
38
39 git clone git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
40
41Note, however, that you may not want to develop against the mainline tree
42directly. Most subsystem maintainers run their own trees and want to see
43patches prepared against those trees. See the "T:" entry for the subsystem
44in the MAINTAINERS file to find that tree, or simply ask the maintainer if
45the tree is not listed there.
46
47It is still possible to download kernel releases via tarballs (as described
48in the next section), but that is the hard way to do kernel development.
27 49
281) "diff -up" 501) "diff -up"
29------------ 51------------
30 52
31Use "diff -up" or "diff -uprN" to create patches. git generates patches 53If you must generate your patches by hand, use "diff -up" or "diff -uprN"
32in this form by default; if you're using git, you can skip this section 54to create patches. Git generates patches in this form by default; if
33entirely. 55you're using git, you can skip this section entirely.
34 56
35All changes to the Linux kernel occur in the form of patches, as 57All changes to the Linux kernel occur in the form of patches, as
36generated by diff(1). When creating your patch, make sure to create it 58generated by diff(1). When creating your patch, make sure to create it
@@ -42,7 +64,7 @@ not in any lower subdirectory.
42 64
43To create a patch for a single file, it is often sufficient to do: 65To create a patch for a single file, it is often sufficient to do:
44 66
45 SRCTREE= linux-2.6 67 SRCTREE= linux
46 MYFILE= drivers/net/mydriver.c 68 MYFILE= drivers/net/mydriver.c
47 69
48 cd $SRCTREE 70 cd $SRCTREE
@@ -55,17 +77,16 @@ To create a patch for multiple files, you should unpack a "vanilla",
55or unmodified kernel source tree, and generate a diff against your 77or unmodified kernel source tree, and generate a diff against your
56own source tree. For example: 78own source tree. For example:
57 79
58 MYSRC= /devel/linux-2.6 80 MYSRC= /devel/linux
59 81
60 tar xvfz linux-2.6.12.tar.gz 82 tar xvfz linux-3.19.tar.gz
61 mv linux-2.6.12 linux-2.6.12-vanilla 83 mv linux-3.19 linux-3.19-vanilla
62 diff -uprN -X linux-2.6.12-vanilla/Documentation/dontdiff \ 84 diff -uprN -X linux-3.19-vanilla/Documentation/dontdiff \
63 linux-2.6.12-vanilla $MYSRC > /tmp/patch 85 linux-3.19-vanilla $MYSRC > /tmp/patch
64 86
65"dontdiff" is a list of files which are generated by the kernel during 87"dontdiff" is a list of files which are generated by the kernel during
66the build process, and should be ignored in any diff(1)-generated 88the build process, and should be ignored in any diff(1)-generated
67patch. The "dontdiff" file is included in the kernel tree in 89patch.
682.6.12 and later.
69 90
70Make sure your patch does not include any extra files which do not 91Make sure your patch does not include any extra files which do not
71belong in a patch submission. Make sure to review your patch -after- 92belong in a patch submission. Make sure to review your patch -after-
@@ -83,6 +104,7 @@ is another popular alternative.
83 104
84 105
852) Describe your changes. 1062) Describe your changes.
107-------------------------
86 108
87Describe your problem. Whether your patch is a one-line bug fix or 109Describe your problem. Whether your patch is a one-line bug fix or
885000 lines of a new feature, there must be an underlying problem that 1105000 lines of a new feature, there must be an underlying problem that
@@ -124,10 +146,10 @@ See #3, next.
124When you submit or resubmit a patch or patch series, include the 146When you submit or resubmit a patch or patch series, include the
125complete patch description and justification for it. Don't just 147complete patch description and justification for it. Don't just
126say that this is version N of the patch (series). Don't expect the 148say that this is version N of the patch (series). Don't expect the
127patch merger to refer back to earlier patch versions or referenced 149subsystem maintainer to refer back to earlier patch versions or referenced
128URLs to find the patch description and put that into the patch. 150URLs to find the patch description and put that into the patch.
129I.e., the patch (series) and its description should be self-contained. 151I.e., the patch (series) and its description should be self-contained.
130This benefits both the patch merger(s) and reviewers. Some reviewers 152This benefits both the maintainers and reviewers. Some reviewers
131probably didn't even receive earlier versions of the patch. 153probably didn't even receive earlier versions of the patch.
132 154
133Describe your changes in imperative mood, e.g. "make xyzzy do frotz" 155Describe your changes in imperative mood, e.g. "make xyzzy do frotz"
@@ -156,10 +178,15 @@ Example:
156 platform_set_drvdata(), but left the variable "dev" unused, 178 platform_set_drvdata(), but left the variable "dev" unused,
157 delete it. 179 delete it.
158 180
181You should also be sure to use at least the first twelve characters of the
182SHA-1 ID. The kernel repository holds a *lot* of objects, making
183collisions with shorter IDs a real possibility. Bear in mind that, even if
184there is no collision with your six-character ID now, that condition may
185change five years from now.
186
159If your patch fixes a bug in a specific commit, e.g. you found an issue using 187If your patch fixes a bug in a specific commit, e.g. you found an issue using
160git-bisect, please use the 'Fixes:' tag with the first 12 characters of the 188git-bisect, please use the 'Fixes:' tag with the first 12 characters of the
161SHA-1 ID, and the one line summary. 189SHA-1 ID, and the one line summary. For example:
162Example:
163 190
164 Fixes: e21d2170f366 ("video: remove unnecessary platform_set_drvdata()") 191 Fixes: e21d2170f366 ("video: remove unnecessary platform_set_drvdata()")
165 192
@@ -172,8 +199,9 @@ outputting the above style in the git log or git show commands
172 fixes = Fixes: %h (\"%s\") 199 fixes = Fixes: %h (\"%s\")
173 200
1743) Separate your changes. 2013) Separate your changes.
202-------------------------
175 203
176Separate _logical changes_ into a single patch file. 204Separate each _logical change_ into a separate patch.
177 205
178For example, if your changes include both bug fixes and performance 206For example, if your changes include both bug fixes and performance
179enhancements for a single driver, separate those changes into two 207enhancements for a single driver, separate those changes into two
@@ -184,90 +212,116 @@ On the other hand, if you make a single change to numerous files,
184group those changes into a single patch. Thus a single logical change 212group those changes into a single patch. Thus a single logical change
185is contained within a single patch. 213is contained within a single patch.
186 214
215The point to remember is that each patch should make an easily understood
216change that can be verified by reviewers. Each patch should be justifiable
217on its own merits.
218
187If one patch depends on another patch in order for a change to be 219If one patch depends on another patch in order for a change to be
188complete, that is OK. Simply note "this patch depends on patch X" 220complete, that is OK. Simply note "this patch depends on patch X"
189in your patch description. 221in your patch description.
190 222
223When dividing your change into a series of patches, take special care to
224ensure that the kernel builds and runs properly after each patch in the
225series. Developers using "git bisect" to track down a problem can end up
226splitting your patch series at any point; they will not thank you if you
227introduce bugs in the middle.
228
191If you cannot condense your patch set into a smaller set of patches, 229If you cannot condense your patch set into a smaller set of patches,
192then only post say 15 or so at a time and wait for review and integration. 230then only post say 15 or so at a time and wait for review and integration.
193 231
194 232
195 233
1964) Style check your changes. 2344) Style-check your changes.
235----------------------------
197 236
198Check your patch for basic style violations, details of which can be 237Check your patch for basic style violations, details of which can be
199found in Documentation/CodingStyle. Failure to do so simply wastes 238found in Documentation/CodingStyle. Failure to do so simply wastes
200the reviewers time and will get your patch rejected, probably 239the reviewers time and will get your patch rejected, probably
201without even being read. 240without even being read.
202 241
203At a minimum you should check your patches with the patch style 242One significant exception is when moving code from one file to
204checker prior to submission (scripts/checkpatch.pl). You should 243another -- in this case you should not modify the moved code at all in
205be able to justify all violations that remain in your patch. 244the same patch which moves it. This clearly delineates the act of
206 245moving the code and your changes. This greatly aids review of the
207 246actual differences and allows tools to better track the history of
247the code itself.
208 248
2095) Select e-mail destination. 249Check your patches with the patch style checker prior to submission
250(scripts/checkpatch.pl). Note, though, that the style checker should be
251viewed as a guide, not as a replacement for human judgment. If your code
252looks better with a violation then its probably best left alone.
210 253
211Look through the MAINTAINERS file and the source code, and determine 254The checker reports at three levels:
212if your change applies to a specific subsystem of the kernel, with 255 - ERROR: things that are very likely to be wrong
213an assigned maintainer. If so, e-mail that person. The script 256 - WARNING: things requiring careful review
214scripts/get_maintainer.pl can be very useful at this step. 257 - CHECK: things requiring thought
215 258
216If no maintainer is listed, or the maintainer does not respond, send 259You should be able to justify all violations that remain in your
217your patch to the primary Linux kernel developer's mailing list, 260patch.
218linux-kernel@vger.kernel.org. Most kernel developers monitor this
219e-mail list, and can comment on your changes.
220 261
221 262
222Do not send more than 15 patches at once to the vger mailing lists!!! 2635) Select the recipients for your patch.
264----------------------------------------
223 265
266You should always copy the appropriate subsystem maintainer(s) on any patch
267to code that they maintain; look through the MAINTAINERS file and the
268source code revision history to see who those maintainers are. The
269script scripts/get_maintainer.pl can be very useful at this step. If you
270cannot find a maintainer for the subsystem your are working on, Andrew
271Morton (akpm@linux-foundation.org) serves as a maintainer of last resort.
224 272
225Linus Torvalds is the final arbiter of all changes accepted into the 273You should also normally choose at least one mailing list to receive a copy
226Linux kernel. His e-mail address is <torvalds@linux-foundation.org>. 274of your patch set. linux-kernel@vger.kernel.org functions as a list of
227He gets a lot of e-mail, so typically you should do your best to -avoid- 275last resort, but the volume on that list has caused a number of developers
228sending him e-mail. 276to tune it out. Look in the MAINTAINERS file for a subsystem-specific
277list; your patch will probably get more attention there. Please do not
278spam unrelated lists, though.
229 279
230Patches which are bug fixes, are "obvious" changes, or similarly 280Many kernel-related lists are hosted on vger.kernel.org; you can find a
231require little discussion should be sent or CC'd to Linus. Patches 281list of them at http://vger.kernel.org/vger-lists.html. There are
232which require discussion or do not have a clear advantage should 282kernel-related lists hosted elsewhere as well, though.
233usually be sent first to linux-kernel. Only after the patch is
234discussed should the patch then be submitted to Linus.
235 283
284Do not send more than 15 patches at once to the vger mailing lists!!!
236 285
286Linus Torvalds is the final arbiter of all changes accepted into the
287Linux kernel. His e-mail address is <torvalds@linux-foundation.org>.
288He gets a lot of e-mail, and, at this point, very few patches go through
289Linus directly, so typically you should do your best to -avoid-
290sending him e-mail.
237 291
2386) Select your CC (e-mail carbon copy) list. 292If you have a patch that fixes an exploitable security bug, send that patch
293to security@kernel.org. For severe bugs, a short embargo may be considered
294to allow distrbutors to get the patch out to users; in such cases,
295obviously, the patch should not be sent to any public lists.
239 296
240Unless you have a reason NOT to do so, CC linux-kernel@vger.kernel.org. 297Patches that fix a severe bug in a released kernel should be directed
298toward the stable maintainers by putting a line like this:
241 299
242Other kernel developers besides Linus need to be aware of your change, 300 Cc: stable@vger.kernel.org
243so that they may comment on it and offer code review and suggestions.
244linux-kernel is the primary Linux kernel developer mailing list.
245Other mailing lists are available for specific subsystems, such as
246USB, framebuffer devices, the VFS, the SCSI subsystem, etc. See the
247MAINTAINERS file for a mailing list that relates specifically to
248your change.
249 301
250Majordomo lists of VGER.KERNEL.ORG at: 302into your patch.
251 <http://vger.kernel.org/vger-lists.html>
252 303
253If changes affect userland-kernel interfaces, please send 304Note, however, that some subsystem maintainers want to come to their own
254the MAN-PAGES maintainer (as listed in the MAINTAINERS file) 305conclusions on which patches should go to the stable trees. The networking
255a man-pages patch, or at least a notification of the change, 306maintainer, in particular, would rather not see individual developers
256so that some information makes its way into the manual pages. 307adding lines like the above to their patches.
257 308
258Even if the maintainer did not respond in step #5, make sure to ALWAYS 309If changes affect userland-kernel interfaces, please send the MAN-PAGES
259copy the maintainer when you change their code. 310maintainer (as listed in the MAINTAINERS file) a man-pages patch, or at
311least a notification of the change, so that some information makes its way
312into the manual pages. User-space API changes should also be copied to
313linux-api@vger.kernel.org.
260 314
261For small patches you may want to CC the Trivial Patch Monkey 315For small patches you may want to CC the Trivial Patch Monkey
262trivial@kernel.org which collects "trivial" patches. Have a look 316trivial@kernel.org which collects "trivial" patches. Have a look
263into the MAINTAINERS file for its current manager. 317into the MAINTAINERS file for its current manager.
264Trivial patches must qualify for one of the following rules: 318Trivial patches must qualify for one of the following rules:
265 Spelling fixes in documentation 319 Spelling fixes in documentation
266 Spelling fixes which could break grep(1) 320 Spelling fixes for errors which could break grep(1)
267 Warning fixes (cluttering with useless warnings is bad) 321 Warning fixes (cluttering with useless warnings is bad)
268 Compilation fixes (only if they are actually correct) 322 Compilation fixes (only if they are actually correct)
269 Runtime fixes (only if they actually fix things) 323 Runtime fixes (only if they actually fix things)
270 Removing use of deprecated functions/macros (eg. check_region) 324 Removing use of deprecated functions/macros
271 Contact detail and documentation fixes 325 Contact detail and documentation fixes
272 Non-portable code replaced by portable code (even in arch-specific, 326 Non-portable code replaced by portable code (even in arch-specific,
273 since people copy, as long as it's trivial) 327 since people copy, as long as it's trivial)
@@ -276,7 +330,8 @@ Trivial patches must qualify for one of the following rules:
276 330
277 331
278 332
2797) No MIME, no links, no compression, no attachments. Just plain text. 3336) No MIME, no links, no compression, no attachments. Just plain text.
334-----------------------------------------------------------------------
280 335
281Linus and other kernel developers need to be able to read and comment 336Linus and other kernel developers need to be able to read and comment
282on the changes you are submitting. It is important for a kernel 337on the changes you are submitting. It is important for a kernel
@@ -299,54 +354,48 @@ you to re-send them using MIME.
299See Documentation/email-clients.txt for hints about configuring 354See Documentation/email-clients.txt for hints about configuring
300your e-mail client so that it sends your patches untouched. 355your e-mail client so that it sends your patches untouched.
301 356
3028) E-mail size. 3577) E-mail size.
303 358---------------
304When sending patches to Linus, always follow step #7.
305 359
306Large changes are not appropriate for mailing lists, and some 360Large changes are not appropriate for mailing lists, and some
307maintainers. If your patch, uncompressed, exceeds 300 kB in size, 361maintainers. If your patch, uncompressed, exceeds 300 kB in size,
308it is preferred that you store your patch on an Internet-accessible 362it is preferred that you store your patch on an Internet-accessible
309server, and provide instead a URL (link) pointing to your patch. 363server, and provide instead a URL (link) pointing to your patch. But note
364that if your patch exceeds 300 kB, it almost certainly needs to be broken up
365anyway.
310 366
3678) Respond to review comments.
368------------------------------
311 369
370Your patch will almost certainly get comments from reviewers on ways in
371which the patch can be improved. You must respond to those comments;
372ignoring reviewers is a good way to get ignored in return. Review comments
373or questions that do not lead to a code change should almost certainly
374bring about a comment or changelog entry so that the next reviewer better
375understands what is going on.
312 376
3139) Name your kernel version. 377Be sure to tell the reviewers what changes you are making and to thank them
378for their time. Code review is a tiring and time-consuming process, and
379reviewers sometimes get grumpy. Even in that case, though, respond
380politely and address the problems they have pointed out.
314 381
315It is important to note, either in the subject line or in the patch
316description, the kernel version to which this patch applies.
317 382
318If the patch does not apply cleanly to the latest kernel version, 3839) Don't get discouraged - or impatient.
319Linus will not apply it. 384----------------------------------------
320 385
386After you have submitted your change, be patient and wait. Reviewers are
387busy people and may not get to your patch right away.
321 388
389Once upon a time, patches used to disappear into the void without comment,
390but the development process works more smoothly than that now. You should
391receive comments within a week or so; if that does not happen, make sure
392that you have sent your patches to the right place. Wait for a minimum of
393one week before resubmitting or pinging reviewers - possibly longer during
394busy times like merge windows.
322 395
32310) Don't get discouraged. Re-submit.
324 396
325After you have submitted your change, be patient and wait. If Linus 39710) Include PATCH in the subject
326likes your change and applies it, it will appear in the next version 398--------------------------------
327of the kernel that he releases.
328
329However, if your change doesn't appear in the next version of the
330kernel, there could be any number of reasons. It's YOUR job to
331narrow down those reasons, correct what was wrong, and submit your
332updated change.
333
334It is quite common for Linus to "drop" your patch without comment.
335That's the nature of the system. If he drops your patch, it could be
336due to
337* Your patch did not apply cleanly to the latest kernel version.
338* Your patch was not sufficiently discussed on linux-kernel.
339* A style issue (see section 2).
340* An e-mail formatting issue (re-read this section).
341* A technical problem with your change.
342* He gets tons of e-mail, and yours got lost in the shuffle.
343* You are being annoying.
344
345When in doubt, solicit comments on linux-kernel mailing list.
346
347
348
34911) Include PATCH in the subject
350 399
351Due to high e-mail traffic to Linus, and to linux-kernel, it is common 400Due to high e-mail traffic to Linus, and to linux-kernel, it is common
352convention to prefix your subject line with [PATCH]. This lets Linus 401convention to prefix your subject line with [PATCH]. This lets Linus
@@ -355,7 +404,8 @@ e-mail discussions.
355 404
356 405
357 406
35812) Sign your work 40711) Sign your work
408------------------
359 409
360To improve tracking of who did what, especially with patches that can 410To improve tracking of who did what, especially with patches that can
361percolate to their final resting place in the kernel through several 411percolate to their final resting place in the kernel through several
@@ -387,11 +437,11 @@ can certify the below:
387 person who certified (a), (b) or (c) and I have not modified 437 person who certified (a), (b) or (c) and I have not modified
388 it. 438 it.
389 439
390 (d) I understand and agree that this project and the contribution 440 (d) I understand and agree that this project and the contribution
391 are public and that a record of the contribution (including all 441 are public and that a record of the contribution (including all
392 personal information I submit with it, including my sign-off) is 442 personal information I submit with it, including my sign-off) is
393 maintained indefinitely and may be redistributed consistent with 443 maintained indefinitely and may be redistributed consistent with
394 this project or the open source license(s) involved. 444 this project or the open source license(s) involved.
395 445
396then you just add a line saying 446then you just add a line saying
397 447
@@ -401,7 +451,7 @@ using your real name (sorry, no pseudonyms or anonymous contributions.)
401 451
402Some people also put extra tags at the end. They'll just be ignored for 452Some people also put extra tags at the end. They'll just be ignored for
403now, but you can do this to mark internal company procedures or just 453now, but you can do this to mark internal company procedures or just
404point out some special detail about the sign-off. 454point out some special detail about the sign-off.
405 455
406If you are a subsystem or branch maintainer, sometimes you need to slightly 456If you are a subsystem or branch maintainer, sometimes you need to slightly
407modify patches you receive in order to merge them, because the code is not 457modify patches you receive in order to merge them, because the code is not
@@ -429,15 +479,15 @@ which appears in the changelog.
429Special note to back-porters: It seems to be a common and useful practice 479Special note to back-porters: It seems to be a common and useful practice
430to insert an indication of the origin of a patch at the top of the commit 480to insert an indication of the origin of a patch at the top of the commit
431message (just after the subject line) to facilitate tracking. For instance, 481message (just after the subject line) to facilitate tracking. For instance,
432here's what we see in 2.6-stable : 482here's what we see in a 3.x-stable release:
433 483
434 Date: Tue May 13 19:10:30 2008 +0000 484Date: Tue Oct 7 07:26:38 2014 -0400
435 485
436 SCSI: libiscsi regression in 2.6.25: fix nop timer handling 486 libata: Un-break ATA blacklist
437 487
438 commit 4cf1043593db6a337f10e006c23c69e5fc93e722 upstream 488 commit 1c40279960bcd7d52dbdf1d466b20d24b99176c8 upstream.
439 489
440And here's what appears in 2.4 : 490And here's what might appear in an older kernel once a patch is backported:
441 491
442 Date: Tue May 13 22:12:27 2008 +0200 492 Date: Tue May 13 22:12:27 2008 +0200
443 493
@@ -446,18 +496,19 @@ And here's what appears in 2.4 :
446 [backport of 2.6 commit b7acbdfbd1f277c1eb23f344f899cfa4cd0bf36a] 496 [backport of 2.6 commit b7acbdfbd1f277c1eb23f344f899cfa4cd0bf36a]
447 497
448Whatever the format, this information provides a valuable help to people 498Whatever the format, this information provides a valuable help to people
449tracking your trees, and to people trying to trouble-shoot bugs in your 499tracking your trees, and to people trying to troubleshoot bugs in your
450tree. 500tree.
451 501
452 502
45313) When to use Acked-by: and Cc: 50312) When to use Acked-by: and Cc:
504---------------------------------
454 505
455The Signed-off-by: tag indicates that the signer was involved in the 506The Signed-off-by: tag indicates that the signer was involved in the
456development of the patch, or that he/she was in the patch's delivery path. 507development of the patch, or that he/she was in the patch's delivery path.
457 508
458If a person was not directly involved in the preparation or handling of a 509If a person was not directly involved in the preparation or handling of a
459patch but wishes to signify and record their approval of it then they can 510patch but wishes to signify and record their approval of it then they can
460arrange to have an Acked-by: line added to the patch's changelog. 511ask to have an Acked-by: line added to the patch's changelog.
461 512
462Acked-by: is often used by the maintainer of the affected code when that 513Acked-by: is often used by the maintainer of the affected code when that
463maintainer neither contributed to nor forwarded the patch. 514maintainer neither contributed to nor forwarded the patch.
@@ -465,7 +516,8 @@ maintainer neither contributed to nor forwarded the patch.
465Acked-by: is not as formal as Signed-off-by:. It is a record that the acker 516Acked-by: is not as formal as Signed-off-by:. It is a record that the acker
466has at least reviewed the patch and has indicated acceptance. Hence patch 517has at least reviewed the patch and has indicated acceptance. Hence patch
467mergers will sometimes manually convert an acker's "yep, looks good to me" 518mergers will sometimes manually convert an acker's "yep, looks good to me"
468into an Acked-by:. 519into an Acked-by: (but note that it is usually better to ask for an
520explicit ack).
469 521
470Acked-by: does not necessarily indicate acknowledgement of the entire patch. 522Acked-by: does not necessarily indicate acknowledgement of the entire patch.
471For example, if a patch affects multiple subsystems and has an Acked-by: from 523For example, if a patch affects multiple subsystems and has an Acked-by: from
@@ -477,11 +529,13 @@ list archives.
477If a person has had the opportunity to comment on a patch, but has not 529If a person has had the opportunity to comment on a patch, but has not
478provided such comments, you may optionally add a "Cc:" tag to the patch. 530provided such comments, you may optionally add a "Cc:" tag to the patch.
479This is the only tag which might be added without an explicit action by the 531This is the only tag which might be added without an explicit action by the
480person it names. This tag documents that potentially interested parties 532person it names - but it should indicate that this person was copied on the
481have been included in the discussion 533patch. This tag documents that potentially interested parties
534have been included in the discussion.
482 535
483 536
48414) Using Reported-by:, Tested-by:, Reviewed-by:, Suggested-by: and Fixes: 53713) Using Reported-by:, Tested-by:, Reviewed-by:, Suggested-by: and Fixes:
538--------------------------------------------------------------------------
485 539
486The Reported-by tag gives credit to people who find bugs and report them and it 540The Reported-by tag gives credit to people who find bugs and report them and it
487hopefully inspires them to help us again in the future. Please note that if 541hopefully inspires them to help us again in the future. Please note that if
@@ -541,7 +595,13 @@ which stable kernel versions should receive your fix. This is the preferred
541method for indicating a bug fixed by the patch. See #2 above for more details. 595method for indicating a bug fixed by the patch. See #2 above for more details.
542 596
543 597
54415) The canonical patch format 59814) The canonical patch format
599------------------------------
600
601This section describes how the patch itself should be formatted. Note
602that, if you have your patches stored in a git repository, proper patch
603formatting can be had with "git format-patch". The tools cannot create
604the necessary text, though, so read the instructions below anyway.
545 605
546The canonical patch subject line is: 606The canonical patch subject line is:
547 607
@@ -549,7 +609,8 @@ The canonical patch subject line is:
549 609
550The canonical patch message body contains the following: 610The canonical patch message body contains the following:
551 611
552 - A "from" line specifying the patch author. 612 - A "from" line specifying the patch author (only needed if the person
613 sending the patch is not the author).
553 614
554 - An empty line. 615 - An empty line.
555 616
@@ -656,128 +717,63 @@ See more details on the proper patch format in the following
656references. 717references.
657 718
658 719
65916) Sending "git pull" requests (from Linus emails) 72015) Sending "git pull" requests
660 721-------------------------------
661Please write the git repo address and branch name alone on the same line
662so that I can't even by mistake pull from the wrong branch, and so
663that a triple-click just selects the whole thing.
664
665So the proper format is something along the lines of:
666
667 "Please pull from
668
669 git://jdelvare.pck.nerim.net/jdelvare-2.6 i2c-for-linus
670
671 to get these changes:"
672
673so that I don't have to hunt-and-peck for the address and inevitably
674get it wrong (actually, I've only gotten it wrong a few times, and
675checking against the diffstat tells me when I get it wrong, but I'm
676just a lot more comfortable when I don't have to "look for" the right
677thing to pull, and double-check that I have the right branch-name).
678
679
680Please use "git diff -M --stat --summary" to generate the diffstat:
681the -M enables rename detection, and the summary enables a summary of
682new/deleted or renamed files.
683
684With rename detection, the statistics are rather different [...]
685because git will notice that a fair number of the changes are renames.
686
687-----------------------------------
688SECTION 2 - HINTS, TIPS, AND TRICKS
689-----------------------------------
690
691This section lists many of the common "rules" associated with code
692submitted to the kernel. There are always exceptions... but you must
693have a really good reason for doing so. You could probably call this
694section Linus Computer Science 101.
695
696
697
6981) Read Documentation/CodingStyle
699
700Nuff said. If your code deviates too much from this, it is likely
701to be rejected without further review, and without comment.
702
703One significant exception is when moving code from one file to
704another -- in this case you should not modify the moved code at all in
705the same patch which moves it. This clearly delineates the act of
706moving the code and your changes. This greatly aids review of the
707actual differences and allows tools to better track the history of
708the code itself.
709
710Check your patches with the patch style checker prior to submission
711(scripts/checkpatch.pl). The style checker should be viewed as
712a guide not as the final word. If your code looks better with
713a violation then its probably best left alone.
714
715The checker reports at three levels:
716 - ERROR: things that are very likely to be wrong
717 - WARNING: things requiring careful review
718 - CHECK: things requiring thought
719
720You should be able to justify all violations that remain in your
721patch.
722
723
724
7252) #ifdefs are ugly
726
727Code cluttered with ifdefs is difficult to read and maintain. Don't do
728it. Instead, put your ifdefs in a header, and conditionally define
729'static inline' functions, or macros, which are used in the code.
730Let the compiler optimize away the "no-op" case.
731
732Simple example, of poor code:
733
734 dev = alloc_etherdev (sizeof(struct funky_private));
735 if (!dev)
736 return -ENODEV;
737 #ifdef CONFIG_NET_FUNKINESS
738 init_funky_net(dev);
739 #endif
740
741Cleaned-up example:
742
743(in header)
744 #ifndef CONFIG_NET_FUNKINESS
745 static inline void init_funky_net (struct net_device *d) {}
746 #endif
747 722
748(in the code itself) 723If you have a series of patches, it may be most convenient to have the
749 dev = alloc_etherdev (sizeof(struct funky_private)); 724maintainer pull them directly into the subsystem repository with a
750 if (!dev) 725"git pull" operation. Note, however, that pulling patches from a developer
751 return -ENODEV; 726requires a higher degree of trust than taking patches from a mailing list.
752 init_funky_net(dev); 727As a result, many subsystem maintainers are reluctant to take pull
728requests, especially from new, unknown developers. If in doubt you can use
729the pull request as the cover letter for a normal posting of the patch
730series, giving the maintainer the option of using either.
753 731
732A pull request should have [GIT] or [PULL] in the subject line. The
733request itself should include the repository name and the branch of
734interest on a single line; it should look something like:
754 735
736 Please pull from
755 737
7563) 'static inline' is better than a macro 738 git://jdelvare.pck.nerim.net/jdelvare-2.6 i2c-for-linus
757 739
758Static inline functions are greatly preferred over macros. 740 to get these changes:"
759They provide type safety, have no length limitations, no formatting
760limitations, and under gcc they are as cheap as macros.
761 741
762Macros should only be used for cases where a static inline is clearly 742A pull request should also include an overall message saying what will be
763suboptimal [there are a few, isolated cases of this in fast paths], 743included in the request, a "git shortlog" listing of the patches
764or where it is impossible to use a static inline function [such as 744themselves, and a diffstat showing the overall effect of the patch series.
765string-izing]. 745The easiest way to get all this information together is, of course, to let
746git do it for you with the "git request-pull" command.
766 747
767'static inline' is preferred over 'static __inline__', 'extern inline', 748Some maintainers (including Linus) want to see pull requests from signed
768and 'extern __inline__'. 749commits; that increases their confidence that the request actually came
750from you. Linus, in particular, will not pull from public hosting sites
751like GitHub in the absence of a signed tag.
769 752
753The first step toward creating such tags is to make a GNUPG key and get it
754signed by one or more core kernel developers. This step can be hard for
755new developers, but there is no way around it. Attending conferences can
756be a good way to find developers who can sign your key.
770 757
758Once you have prepared a patch series in git that you wish to have somebody
759pull, create a signed tag with "git tag -s". This will create a new tag
760identifying the last commit in the series and containing a signature
761created with your private key. You will also have the opportunity to add a
762changelog-style message to the tag; this is an ideal place to describe the
763effects of the pull request as a whole.
771 764
7724) Don't over-design. 765If the tree the maintainer will be pulling from is not the repository you
766are working from, don't forget to push the signed tag explicitly to the
767public tree.
773 768
774Don't try to anticipate nebulous future cases which may or may not 769When generating your pull request, use the signed tag as the target. A
775be useful: "Make it as simple as you can, and no simpler." 770command like this will do the trick:
776 771
772 git request-pull master git://my.public.tree/linux.git my-signed-tag
777 773
778 774
779---------------------- 775----------------------
780SECTION 3 - REFERENCES 776SECTION 2 - REFERENCES
781---------------------- 777----------------------
782 778
783Andrew Morton, "The perfect patch" (tpp). 779Andrew Morton, "The perfect patch" (tpp).
diff --git a/Documentation/arm/00-INDEX b/Documentation/arm/00-INDEX
index 3b08bc2b04cf..8edb9007844e 100644
--- a/Documentation/arm/00-INDEX
+++ b/Documentation/arm/00-INDEX
@@ -2,11 +2,15 @@
2 - this file 2 - this file
3Booting 3Booting
4 - requirements for booting 4 - requirements for booting
5CCN.txt
6 - Cache Coherent Network ring-bus and perf PMU driver.
5Interrupts 7Interrupts
6 - ARM Interrupt subsystem documentation 8 - ARM Interrupt subsystem documentation
7IXP4xx 9IXP4xx
8 - Intel IXP4xx Network processor. 10 - Intel IXP4xx Network processor.
9msm 11Makefile
12 - Build sourcefiles as part of the Documentation-build for arm
13msm/
10 - MSM specific documentation 14 - MSM specific documentation
11Netwinder 15Netwinder
12 - Netwinder specific documentation 16 - Netwinder specific documentation
@@ -18,11 +22,9 @@ README
18 - General ARM documentation 22 - General ARM documentation
19SA1100/ 23SA1100/
20 - SA1100 documentation 24 - SA1100 documentation
21Samsung-S3C24XX 25Samsung-S3C24XX/
22 - S3C24XX ARM Linux Overview 26 - S3C24XX ARM Linux Overview
23Sharp-LH 27SPEAr/
24 - Linux on Sharp LH79524 and LH7A40X System On a Chip (SOC)
25SPEAr
26 - ST SPEAr platform Linux Overview 28 - ST SPEAr platform Linux Overview
27VFP/ 29VFP/
28 - Release notes for Linux Kernel Vector Floating Point support code 30 - Release notes for Linux Kernel Vector Floating Point support code
diff --git a/Documentation/blackfin/Makefile b/Documentation/blackfin/Makefile
index c7e6c99bad81..03f78059d6f5 100644
--- a/Documentation/blackfin/Makefile
+++ b/Documentation/blackfin/Makefile
@@ -1,3 +1,5 @@
1ifneq ($(CONFIG_BLACKFIN),) 1ifneq ($(CONFIG_BLACKFIN),)
2ifneq ($(CONFIG_BFIN_GPTIMERS,)
2obj-m := gptimers-example.o 3obj-m := gptimers-example.o
3endif 4endif
5endif
diff --git a/Documentation/devicetree/bindings/arm/msm/timer.txt b/Documentation/devicetree/bindings/arm/msm/timer.txt
index c6ef8f13dc7e..74607b6c1117 100644
--- a/Documentation/devicetree/bindings/arm/msm/timer.txt
+++ b/Documentation/devicetree/bindings/arm/msm/timer.txt
@@ -8,7 +8,7 @@ Properties:
8 "qcom,kpss-timer" - krait subsystem 8 "qcom,kpss-timer" - krait subsystem
9 "qcom,scss-timer" - scorpion subsystem 9 "qcom,scss-timer" - scorpion subsystem
10 10
11- interrupts : Interrupts for the the debug timer, the first general purpose 11- interrupts : Interrupts for the debug timer, the first general purpose
12 timer, and optionally a second general purpose timer in that 12 timer, and optionally a second general purpose timer in that
13 order. 13 order.
14 14
diff --git a/Documentation/devicetree/bindings/ata/cavium-compact-flash.txt b/Documentation/devicetree/bindings/ata/cavium-compact-flash.txt
index 93986a5a8018..3bacc8e0931e 100644
--- a/Documentation/devicetree/bindings/ata/cavium-compact-flash.txt
+++ b/Documentation/devicetree/bindings/ata/cavium-compact-flash.txt
@@ -9,7 +9,7 @@ Properties:
9 9
10 Compatibility with many Cavium evaluation boards. 10 Compatibility with many Cavium evaluation boards.
11 11
12- reg: The base address of the the CF chip select banks. Depending on 12- reg: The base address of the CF chip select banks. Depending on
13 the device configuration, there may be one or two banks. 13 the device configuration, there may be one or two banks.
14 14
15- cavium,bus-width: The width of the connection to the CF devices. Valid 15- cavium,bus-width: The width of the connection to the CF devices. Valid
diff --git a/Documentation/devicetree/bindings/c6x/dscr.txt b/Documentation/devicetree/bindings/c6x/dscr.txt
index b0e97144cfb1..92672235de57 100644
--- a/Documentation/devicetree/bindings/c6x/dscr.txt
+++ b/Documentation/devicetree/bindings/c6x/dscr.txt
@@ -12,7 +12,7 @@ configuration register for writes. These configuration register may be used to
12enable (and disable in some cases) SoC pin drivers, select peripheral clock 12enable (and disable in some cases) SoC pin drivers, select peripheral clock
13sources (internal or pin), etc. In some cases, a configuration register is 13sources (internal or pin), etc. In some cases, a configuration register is
14write once or the individual bits are write once. In addition to device config, 14write once or the individual bits are write once. In addition to device config,
15the DSCR block may provide registers which which are used to reset peripherals, 15the DSCR block may provide registers which are used to reset peripherals,
16provide device ID information, provide ethernet MAC addresses, as well as other 16provide device ID information, provide ethernet MAC addresses, as well as other
17miscellaneous functions. 17miscellaneous functions.
18 18
diff --git a/Documentation/devicetree/bindings/dma/renesas,rcar-dmac.txt b/Documentation/devicetree/bindings/dma/renesas,rcar-dmac.txt
index df0f48bcf75a..f7e21b1c2a05 100644
--- a/Documentation/devicetree/bindings/dma/renesas,rcar-dmac.txt
+++ b/Documentation/devicetree/bindings/dma/renesas,rcar-dmac.txt
@@ -1,6 +1,6 @@
1* Renesas R-Car DMA Controller Device Tree bindings 1* Renesas R-Car DMA Controller Device Tree bindings
2 2
3Renesas R-Car Generation 2 SoCs have have multiple multi-channel DMA 3Renesas R-Car Generation 2 SoCs have multiple multi-channel DMA
4controller instances named DMAC capable of serving multiple clients. Channels 4controller instances named DMAC capable of serving multiple clients. Channels
5can be dedicated to specific clients or shared between a large number of 5can be dedicated to specific clients or shared between a large number of
6clients. 6clients.
diff --git a/Documentation/devicetree/bindings/gpio/gpio-pcf857x.txt b/Documentation/devicetree/bindings/gpio/gpio-pcf857x.txt
index d63194a2c848..ada4e2973323 100644
--- a/Documentation/devicetree/bindings/gpio/gpio-pcf857x.txt
+++ b/Documentation/devicetree/bindings/gpio/gpio-pcf857x.txt
@@ -39,7 +39,7 @@ Optional Properties:
39 - lines-initial-states: Bitmask that specifies the initial state of each 39 - lines-initial-states: Bitmask that specifies the initial state of each
40 line. When a bit is set to zero, the corresponding line will be initialized to 40 line. When a bit is set to zero, the corresponding line will be initialized to
41 the input (pulled-up) state. When the bit is set to one, the line will be 41 the input (pulled-up) state. When the bit is set to one, the line will be
42 initialized the the low-level output state. If the property is not specified 42 initialized the low-level output state. If the property is not specified
43 all lines will be initialized to the input state. 43 all lines will be initialized to the input state.
44 44
45 The I/O expander can detect input state changes, and thus optionally act as 45 The I/O expander can detect input state changes, and thus optionally act as
diff --git a/Documentation/devicetree/bindings/iio/adc/xilinx-xadc.txt b/Documentation/devicetree/bindings/iio/adc/xilinx-xadc.txt
index d9ee909d2b78..d71258e2d456 100644
--- a/Documentation/devicetree/bindings/iio/adc/xilinx-xadc.txt
+++ b/Documentation/devicetree/bindings/iio/adc/xilinx-xadc.txt
@@ -59,7 +59,7 @@ Optional properties:
59 Each child node represents one channel and has the following 59 Each child node represents one channel and has the following
60 properties: 60 properties:
61 Required properties: 61 Required properties:
62 * reg: Pair of pins the the channel is connected to. 62 * reg: Pair of pins the channel is connected to.
63 0: VP/VN 63 0: VP/VN
64 1: VAUXP[0]/VAUXN[0] 64 1: VAUXP[0]/VAUXN[0]
65 2: VAUXP[1]/VAUXN[1] 65 2: VAUXP[1]/VAUXN[1]
diff --git a/Documentation/devicetree/bindings/mtd/fsmc-nand.txt b/Documentation/devicetree/bindings/mtd/fsmc-nand.txt
index ec42935f3908..5235cbc551b0 100644
--- a/Documentation/devicetree/bindings/mtd/fsmc-nand.txt
+++ b/Documentation/devicetree/bindings/mtd/fsmc-nand.txt
@@ -9,7 +9,7 @@ Required properties:
9Optional properties: 9Optional properties:
10- bank-width : Width (in bytes) of the device. If not present, the width 10- bank-width : Width (in bytes) of the device. If not present, the width
11 defaults to 1 byte 11 defaults to 1 byte
12- nand-skip-bbtscan: Indicates the the BBT scanning should be skipped 12- nand-skip-bbtscan: Indicates the BBT scanning should be skipped
13- timings: array of 6 bytes for NAND timings. The meanings of these bytes 13- timings: array of 6 bytes for NAND timings. The meanings of these bytes
14 are: 14 are:
15 byte 0 TCLR : CLE to RE delay in number of AHB clock cycles, only 4 bits 15 byte 0 TCLR : CLE to RE delay in number of AHB clock cycles, only 4 bits
diff --git a/Documentation/devicetree/bindings/net/broadcom-systemport.txt b/Documentation/devicetree/bindings/net/broadcom-systemport.txt
index aa7ad622259d..877da34145b0 100644
--- a/Documentation/devicetree/bindings/net/broadcom-systemport.txt
+++ b/Documentation/devicetree/bindings/net/broadcom-systemport.txt
@@ -3,7 +3,7 @@
3Required properties: 3Required properties:
4- compatible: should be one of "brcm,systemport-v1.00" or "brcm,systemport" 4- compatible: should be one of "brcm,systemport-v1.00" or "brcm,systemport"
5- reg: address and length of the register set for the device. 5- reg: address and length of the register set for the device.
6- interrupts: interrupts for the device, first cell must be for the the rx 6- interrupts: interrupts for the device, first cell must be for the rx
7 interrupts, and the second cell should be for the transmit queues. An 7 interrupts, and the second cell should be for the transmit queues. An
8 optional third interrupt cell for Wake-on-LAN can be specified 8 optional third interrupt cell for Wake-on-LAN can be specified
9- local-mac-address: Ethernet MAC address (48 bits) of this adapter 9- local-mac-address: Ethernet MAC address (48 bits) of this adapter
diff --git a/Documentation/devicetree/bindings/power/rockchip-io-domain.txt b/Documentation/devicetree/bindings/power/rockchip-io-domain.txt
index 6fbf6e7ecde6..8b70db103ca7 100644
--- a/Documentation/devicetree/bindings/power/rockchip-io-domain.txt
+++ b/Documentation/devicetree/bindings/power/rockchip-io-domain.txt
@@ -37,7 +37,7 @@ Required properties:
37 37
38 38
39You specify supplies using the standard regulator bindings by including 39You specify supplies using the standard regulator bindings by including
40a phandle the the relevant regulator. All specified supplies must be able 40a phandle the relevant regulator. All specified supplies must be able
41to report their voltage. The IO Voltage Domain for any non-specified 41to report their voltage. The IO Voltage Domain for any non-specified
42supplies will be not be touched. 42supplies will be not be touched.
43 43
diff --git a/Documentation/devicetree/overlay-notes.txt b/Documentation/devicetree/overlay-notes.txt
index 30ae758e3eef..d418a6ce9812 100644
--- a/Documentation/devicetree/overlay-notes.txt
+++ b/Documentation/devicetree/overlay-notes.txt
@@ -10,7 +10,7 @@ How overlays work
10----------------- 10-----------------
11 11
12A Device Tree's overlay purpose is to modify the kernel's live tree, and 12A Device Tree's overlay purpose is to modify the kernel's live tree, and
13have the modification affecting the state of the the kernel in a way that 13have the modification affecting the state of the kernel in a way that
14is reflecting the changes. 14is reflecting the changes.
15Since the kernel mainly deals with devices, any new device node that result 15Since the kernel mainly deals with devices, any new device node that result
16in an active device should have it created while if the device node is either 16in an active device should have it created while if the device node is either
@@ -80,7 +80,7 @@ result in foo+bar.dts
80 }; 80 };
81---- foo+bar.dts ------------------------------------------------------------- 81---- foo+bar.dts -------------------------------------------------------------
82 82
83As a result of the the overlay, a new device node (bar) has been created 83As a result of the overlay, a new device node (bar) has been created
84so a bar platform device will be registered and if a matching device driver 84so a bar platform device will be registered and if a matching device driver
85is loaded the device will be created as expected. 85is loaded the device will be created as expected.
86 86
diff --git a/Documentation/dmaengine/00-INDEX b/Documentation/dmaengine/00-INDEX
new file mode 100644
index 000000000000..07de6573d22b
--- /dev/null
+++ b/Documentation/dmaengine/00-INDEX
@@ -0,0 +1,8 @@
100-INDEX
2 - this file.
3client.txt
4 -the DMA Engine API Guide.
5dmatest.txt
6 - how to compile, configure and use the dmatest system.
7provider.txt
8 - the DMA controller API. \ No newline at end of file
diff --git a/Documentation/driver-model/bus.txt b/Documentation/driver-model/bus.txt
index 6754b2df8aa1..b577a45b93ea 100644
--- a/Documentation/driver-model/bus.txt
+++ b/Documentation/driver-model/bus.txt
@@ -45,7 +45,7 @@ them are inherently bus-specific. Drivers typically declare an array
45of device IDs of devices they support that reside in a bus-specific 45of device IDs of devices they support that reside in a bus-specific
46driver structure. 46driver structure.
47 47
48The purpose of the match callback is provide the bus an opportunity to 48The purpose of the match callback is to give the bus an opportunity to
49determine if a particular driver supports a particular device by 49determine if a particular driver supports a particular device by
50comparing the device IDs the driver supports with the device ID of a 50comparing the device IDs the driver supports with the device ID of a
51particular device, without sacrificing bus-specific functionality or 51particular device, without sacrificing bus-specific functionality or
diff --git a/Documentation/filesystems/proc.txt b/Documentation/filesystems/proc.txt
index aae9dd13c91f..79b3cc821e7b 100644
--- a/Documentation/filesystems/proc.txt
+++ b/Documentation/filesystems/proc.txt
@@ -28,7 +28,7 @@ Table of Contents
28 1.6 Parallel port info in /proc/parport 28 1.6 Parallel port info in /proc/parport
29 1.7 TTY info in /proc/tty 29 1.7 TTY info in /proc/tty
30 1.8 Miscellaneous kernel statistics in /proc/stat 30 1.8 Miscellaneous kernel statistics in /proc/stat
31 1.9 Ext4 file system parameters 31 1.9 Ext4 file system parameters
32 32
33 2 Modifying System Parameters 33 2 Modifying System Parameters
34 34
diff --git a/Documentation/filesystems/seq_file.txt b/Documentation/filesystems/seq_file.txt
index b797ed38de46..9de4303201e1 100644
--- a/Documentation/filesystems/seq_file.txt
+++ b/Documentation/filesystems/seq_file.txt
@@ -194,16 +194,16 @@ which is in the string esc will be represented in octal form in the output.
194 194
195There are also a pair of functions for printing filenames: 195There are also a pair of functions for printing filenames:
196 196
197 int seq_path(struct seq_file *m, struct path *path, char *esc); 197 int seq_path(struct seq_file *m, const struct path *path,
198 int seq_path_root(struct seq_file *m, struct path *path, 198 const char *esc);
199 struct path *root, char *esc) 199 int seq_path_root(struct seq_file *m, const struct path *path,
200 const struct path *root, const char *esc)
200 201
201Here, path indicates the file of interest, and esc is a set of characters 202Here, path indicates the file of interest, and esc is a set of characters
202which should be escaped in the output. A call to seq_path() will output 203which should be escaped in the output. A call to seq_path() will output
203the path relative to the current process's filesystem root. If a different 204the path relative to the current process's filesystem root. If a different
204root is desired, it can be used with seq_path_root(). Note that, if it 205root is desired, it can be used with seq_path_root(). If it turns out that
205turns out that path cannot be reached from root, the value of root will be 206path cannot be reached from root, seq_path_root() returns SEQ_SKIP.
206changed in seq_file_root() to a root which *does* work.
207 207
208A function producing complicated output may want to check 208A function producing complicated output may want to check
209 bool seq_has_overflowed(struct seq_file *m); 209 bool seq_has_overflowed(struct seq_file *m);
diff --git a/Documentation/gpio/board.txt b/Documentation/gpio/board.txt
index 4452786225b8..8b35f51fe7b6 100644
--- a/Documentation/gpio/board.txt
+++ b/Documentation/gpio/board.txt
@@ -31,7 +31,7 @@ through gpiod_get(). For example:
31 <&gpio 16 GPIO_ACTIVE_HIGH>, /* green */ 31 <&gpio 16 GPIO_ACTIVE_HIGH>, /* green */
32 <&gpio 17 GPIO_ACTIVE_HIGH>; /* blue */ 32 <&gpio 17 GPIO_ACTIVE_HIGH>; /* blue */
33 33
34 power-gpio = <&gpio 1 GPIO_ACTIVE_LOW>; 34 power-gpios = <&gpio 1 GPIO_ACTIVE_LOW>;
35 }; 35 };
36 36
37This property will make GPIOs 15, 16 and 17 available to the driver under the 37This property will make GPIOs 15, 16 and 17 available to the driver under the
diff --git a/Documentation/kprobes.txt b/Documentation/kprobes.txt
index 4227ec2e3ab2..1488b6525eb6 100644
--- a/Documentation/kprobes.txt
+++ b/Documentation/kprobes.txt
@@ -702,7 +702,8 @@ a virtual address that is no longer valid (module init sections, module
702virtual addresses that correspond to modules that've been unloaded), 702virtual addresses that correspond to modules that've been unloaded),
703such probes are marked with [GONE]. If the probe is temporarily disabled, 703such probes are marked with [GONE]. If the probe is temporarily disabled,
704such probes are marked with [DISABLED]. If the probe is optimized, it is 704such probes are marked with [DISABLED]. If the probe is optimized, it is
705marked with [OPTIMIZED]. 705marked with [OPTIMIZED]. If the probe is ftrace-based, it is marked with
706[FTRACE].
706 707
707/sys/kernel/debug/kprobes/enabled: Turn kprobes ON/OFF forcibly. 708/sys/kernel/debug/kprobes/enabled: Turn kprobes ON/OFF forcibly.
708 709
diff --git a/Documentation/locking/00-INDEX b/Documentation/locking/00-INDEX
new file mode 100644
index 000000000000..c256c9bee2a4
--- /dev/null
+++ b/Documentation/locking/00-INDEX
@@ -0,0 +1,16 @@
100-INDEX
2 - this file.
3lockdep-design.txt
4 - documentation on the runtime locking correctness validator.
5lockstat.txt
6 - info on collecting statistics on locks (and contention).
7mutex-design.txt
8 - info on the generic mutex subsystem.
9rt-mutex-design.txt
10 - description of the RealTime mutex implementation design.
11rt-mutex.txt
12 - desc. of RT-mutex subsystem with PI (Priority Inheritance) support.
13spinlocks.txt
14 - info on using spinlocks to provide exclusive access in kernel.
15ww-mutex-design.txt
16 - Intro to Mutex wait/would deadlock handling.s
diff --git a/Documentation/locking/lockstat.txt b/Documentation/locking/lockstat.txt
index 7428773a1e69..568bbbacee91 100644
--- a/Documentation/locking/lockstat.txt
+++ b/Documentation/locking/lockstat.txt
@@ -121,6 +121,11 @@ show the header with column descriptions. Lines 05-18 and 20-31 show the actual
121statistics. These statistics come in two parts; the actual stats separated by a 121statistics. These statistics come in two parts; the actual stats separated by a
122short separator (line 08, 13) from the contention points. 122short separator (line 08, 13) from the contention points.
123 123
124Lines 09-12 show the first 4 recorded contention points (the code
125which tries to get the lock) and lines 14-17 show the first 4 recorded
126contended points (the lock holder). It is possible that the max
127con-bounces point is missing in the statistics.
128
124The first lock (05-18) is a read/write lock, and shows two lines above the 129The first lock (05-18) is a read/write lock, and shows two lines above the
125short separator. The contention points don't match the column descriptors, 130short separator. The contention points don't match the column descriptors,
126they have two: contentions and [<IP>] symbol. The second set of contention 131they have two: contentions and [<IP>] symbol. The second set of contention
diff --git a/Documentation/misc-devices/mei/mei-client-bus.txt b/Documentation/misc-devices/mei/mei-client-bus.txt
index f83910a8ce76..743be4ec8989 100644
--- a/Documentation/misc-devices/mei/mei-client-bus.txt
+++ b/Documentation/misc-devices/mei/mei-client-bus.txt
@@ -1,9 +1,10 @@
1Intel(R) Management Engine (ME) Client bus API 1Intel(R) Management Engine (ME) Client bus API
2=============================================== 2==============================================
3 3
4 4
5Rationale 5Rationale
6========= 6=========
7
7MEI misc character device is useful for dedicated applications to send and receive 8MEI misc character device is useful for dedicated applications to send and receive
8data to the many FW appliance found in Intel's ME from the user space. 9data to the many FW appliance found in Intel's ME from the user space.
9However for some of the ME functionalities it make sense to leverage existing software 10However for some of the ME functionalities it make sense to leverage existing software
@@ -17,7 +18,8 @@ the existing code.
17 18
18 19
19MEI CL bus API 20MEI CL bus API
20=========== 21==============
22
21A driver implementation for an MEI Client is very similar to existing bus 23A driver implementation for an MEI Client is very similar to existing bus
22based device drivers. The driver registers itself as an MEI CL bus driver through 24based device drivers. The driver registers itself as an MEI CL bus driver through
23the mei_cl_driver structure: 25the mei_cl_driver structure:
@@ -55,6 +57,7 @@ received buffers.
55 57
56Example 58Example
57======= 59=======
60
58As a theoretical example let's pretend the ME comes with a "contact" NFC IP. 61As a theoretical example let's pretend the ME comes with a "contact" NFC IP.
59The driver init and exit routines for this device would look like: 62The driver init and exit routines for this device would look like:
60 63
@@ -69,11 +72,11 @@ static struct mei_cl_device_id contact_mei_cl_tbl[] = {
69MODULE_DEVICE_TABLE(mei_cl, contact_mei_cl_tbl); 72MODULE_DEVICE_TABLE(mei_cl, contact_mei_cl_tbl);
70 73
71static struct mei_cl_driver contact_driver = { 74static struct mei_cl_driver contact_driver = {
72 .id_table = contact_mei_tbl, 75 .id_table = contact_mei_tbl,
73 .name = CONTACT_DRIVER_NAME, 76 .name = CONTACT_DRIVER_NAME,
74 77
75 .probe = contact_probe, 78 .probe = contact_probe,
76 .remove = contact_remove, 79 .remove = contact_remove,
77}; 80};
78 81
79static int contact_init(void) 82static int contact_init(void)
@@ -109,7 +112,7 @@ int contact_probe(struct mei_cl_device *dev, struct mei_cl_device_id *id)
109 mei_cl_register_event_cb(dev, contact_event_cb, contact); 112 mei_cl_register_event_cb(dev, contact_event_cb, contact);
110 113
111 return 0; 114 return 0;
112 } 115}
113 116
114In the probe routine the driver first enable the MEI device and then registers 117In the probe routine the driver first enable the MEI device and then registers
115an ME bus event handler which is as close as it can get to registering a 118an ME bus event handler which is as close as it can get to registering a
diff --git a/Documentation/misc-devices/mei/mei.txt b/Documentation/misc-devices/mei/mei.txt
index 15bba1aeba9a..8d47501bba0a 100644
--- a/Documentation/misc-devices/mei/mei.txt
+++ b/Documentation/misc-devices/mei/mei.txt
@@ -1,8 +1,8 @@
1Intel(R) Management Engine Interface (Intel(R) MEI) 1Intel(R) Management Engine Interface (Intel(R) MEI)
2======================= 2===================================================
3 3
4Introduction 4Introduction
5======================= 5============
6 6
7The Intel Management Engine (Intel ME) is an isolated and protected computing 7The Intel Management Engine (Intel ME) is an isolated and protected computing
8resource (Co-processor) residing inside certain Intel chipsets. The Intel ME 8resource (Co-processor) residing inside certain Intel chipsets. The Intel ME
@@ -19,7 +19,7 @@ each client has its own protocol. The protocol is message-based with a
19header and payload up to 512 bytes. 19header and payload up to 512 bytes.
20 20
21Prominent usage of the Intel ME Interface is to communicate with Intel(R) 21Prominent usage of the Intel ME Interface is to communicate with Intel(R)
22Active Management Technology (Intel AMT)implemented in firmware running on 22Active Management Technology (Intel AMT) implemented in firmware running on
23the Intel ME. 23the Intel ME.
24 24
25Intel AMT provides the ability to manage a host remotely out-of-band (OOB) 25Intel AMT provides the ability to manage a host remotely out-of-band (OOB)
@@ -44,8 +44,9 @@ HTTP/S that are received from a remote management console application.
44For more information about Intel AMT: 44For more information about Intel AMT:
45http://software.intel.com/sites/manageability/AMT_Implementation_and_Reference_Guide 45http://software.intel.com/sites/manageability/AMT_Implementation_and_Reference_Guide
46 46
47
47Intel MEI Driver 48Intel MEI Driver
48======================= 49================
49 50
50The driver exposes a misc device called /dev/mei. 51The driver exposes a misc device called /dev/mei.
51 52
@@ -91,8 +92,10 @@ A code snippet for an application communicating with Intel AMTHI client:
91 [...] 92 [...]
92 close(fd); 93 close(fd);
93 94
94IOCTL: 95
95====== 96IOCTL
97=====
98
96The Intel MEI Driver supports the following IOCTL command: 99The Intel MEI Driver supports the following IOCTL command:
97 IOCTL_MEI_CONNECT_CLIENT Connect to firmware Feature (client). 100 IOCTL_MEI_CONNECT_CLIENT Connect to firmware Feature (client).
98 101
@@ -122,58 +125,61 @@ The Intel MEI Driver supports the following IOCTL command:
122 data that can be sent or received. (e.g. if MTU=2K, can send 125 data that can be sent or received. (e.g. if MTU=2K, can send
123 requests up to bytes 2k and received responses up to 2k bytes). 126 requests up to bytes 2k and received responses up to 2k bytes).
124 127
125Intel ME Applications: 128
126============== 129Intel ME Applications
127 130=====================
1281) Intel Local Management Service (Intel LMS) 131
129 132 1) Intel Local Management Service (Intel LMS)
130 Applications running locally on the platform communicate with Intel AMT Release 133
131 2.0 and later releases in the same way that network applications do via SOAP 134 Applications running locally on the platform communicate with Intel AMT Release
132 over HTTP (deprecated starting with Release 6.0) or with WS-Management over 135 2.0 and later releases in the same way that network applications do via SOAP
133 SOAP over HTTP. This means that some Intel AMT features can be accessed from a 136 over HTTP (deprecated starting with Release 6.0) or with WS-Management over
134 local application using the same network interface as a remote application 137 SOAP over HTTP. This means that some Intel AMT features can be accessed from a
135 communicating with Intel AMT over the network. 138 local application using the same network interface as a remote application
136 139 communicating with Intel AMT over the network.
137 When a local application sends a message addressed to the local Intel AMT host 140
138 name, the Intel LMS, which listens for traffic directed to the host name, 141 When a local application sends a message addressed to the local Intel AMT host
139 intercepts the message and routes it to the Intel MEI. 142 name, the Intel LMS, which listens for traffic directed to the host name,
140 For more information: 143 intercepts the message and routes it to the Intel MEI.
141 http://software.intel.com/sites/manageability/AMT_Implementation_and_Reference_Guide 144 For more information:
142 Under "About Intel AMT" => "Local Access" 145 http://software.intel.com/sites/manageability/AMT_Implementation_and_Reference_Guide
143 146 Under "About Intel AMT" => "Local Access"
144 For downloading Intel LMS: 147
145 http://software.intel.com/en-us/articles/download-the-latest-intel-amt-open-source-drivers/ 148 For downloading Intel LMS:
146 149 http://software.intel.com/en-us/articles/download-the-latest-intel-amt-open-source-drivers/
147 The Intel LMS opens a connection using the Intel MEI driver to the Intel LMS 150
148 firmware feature using a defined UUID and then communicates with the feature 151 The Intel LMS opens a connection using the Intel MEI driver to the Intel LMS
149 using a protocol called Intel AMT Port Forwarding Protocol(Intel APF protocol). 152 firmware feature using a defined UUID and then communicates with the feature
150 The protocol is used to maintain multiple sessions with Intel AMT from a 153 using a protocol called Intel AMT Port Forwarding Protocol (Intel APF protocol).
151 single application. 154 The protocol is used to maintain multiple sessions with Intel AMT from a
152 155 single application.
153 See the protocol specification in the Intel AMT Software Development Kit(SDK) 156
154 http://software.intel.com/sites/manageability/AMT_Implementation_and_Reference_Guide 157 See the protocol specification in the Intel AMT Software Development Kit (SDK)
155 Under "SDK Resources" => "Intel(R) vPro(TM) Gateway(MPS)" 158 http://software.intel.com/sites/manageability/AMT_Implementation_and_Reference_Guide
156 => "Information for Intel(R) vPro(TM) Gateway Developers" 159 Under "SDK Resources" => "Intel(R) vPro(TM) Gateway (MPS)"
157 => "Description of the Intel AMT Port Forwarding (APF)Protocol" 160 => "Information for Intel(R) vPro(TM) Gateway Developers"
158 161 => "Description of the Intel AMT Port Forwarding (APF) Protocol"
159 2) Intel AMT Remote configuration using a Local Agent 162
160 A Local Agent enables IT personnel to configure Intel AMT out-of-the-box 163 2) Intel AMT Remote configuration using a Local Agent
161 without requiring installing additional data to enable setup. The remote 164
162 configuration process may involve an ISV-developed remote configuration 165 A Local Agent enables IT personnel to configure Intel AMT out-of-the-box
163 agent that runs on the host. 166 without requiring installing additional data to enable setup. The remote
164 For more information: 167 configuration process may involve an ISV-developed remote configuration
165 http://software.intel.com/sites/manageability/AMT_Implementation_and_Reference_Guide 168 agent that runs on the host.
166 Under "Setup and Configuration of Intel AMT" => 169 For more information:
167 "SDK Tools Supporting Setup and Configuration" => 170 http://software.intel.com/sites/manageability/AMT_Implementation_and_Reference_Guide
168 "Using the Local Agent Sample" 171 Under "Setup and Configuration of Intel AMT" =>
169 172 "SDK Tools Supporting Setup and Configuration" =>
170 An open source Intel AMT configuration utility, implementing a local agent 173 "Using the Local Agent Sample"
171 that accesses the Intel MEI driver, can be found here: 174
172 http://software.intel.com/en-us/articles/download-the-latest-intel-amt-open-source-drivers/ 175 An open source Intel AMT configuration utility, implementing a local agent
173 176 that accesses the Intel MEI driver, can be found here:
174 177 http://software.intel.com/en-us/articles/download-the-latest-intel-amt-open-source-drivers/
175Intel AMT OS Health Watchdog: 178
176============================= 179
180Intel AMT OS Health Watchdog
181============================
182
177The Intel AMT Watchdog is an OS Health (Hang/Crash) watchdog. 183The Intel AMT Watchdog is an OS Health (Hang/Crash) watchdog.
178Whenever the OS hangs or crashes, Intel AMT will send an event 184Whenever the OS hangs or crashes, Intel AMT will send an event
179to any subscriber to this event. This mechanism means that 185to any subscriber to this event. This mechanism means that
@@ -192,8 +198,10 @@ watchdog is 120 seconds.
192If the Intel AMT Watchdog feature does not exist (i.e. the connection failed), 198If the Intel AMT Watchdog feature does not exist (i.e. the connection failed),
193the Intel MEI driver will disable the sending of heartbeats. 199the Intel MEI driver will disable the sending of heartbeats.
194 200
195Supported Chipsets: 201
202Supported Chipsets
196================== 203==================
204
1977 Series Chipset Family 2057 Series Chipset Family
1986 Series Chipset Family 2066 Series Chipset Family
1995 Series Chipset Family 2075 Series Chipset Family
diff --git a/Documentation/networking/00-INDEX b/Documentation/networking/00-INDEX
index 557b6ef70c26..df27a1a50776 100644
--- a/Documentation/networking/00-INDEX
+++ b/Documentation/networking/00-INDEX
@@ -1,7 +1,5 @@
100-INDEX 100-INDEX
2 - this file 2 - this file
33c505.txt
4 - information on the 3Com EtherLink Plus (3c505) driver.
53c509.txt 33c509.txt
6 - information on the 3Com Etherlink III Series Ethernet cards. 4 - information on the 3Com Etherlink III Series Ethernet cards.
76pack.txt 56pack.txt
@@ -24,6 +22,8 @@ README.sb1000
24 - info on General Instrument/NextLevel SURFboard1000 cable modem. 22 - info on General Instrument/NextLevel SURFboard1000 cable modem.
25alias.txt 23alias.txt
26 - info on using alias network devices. 24 - info on using alias network devices.
25altera_tse.txt
26 - Altera Triple-Speed Ethernet controller.
27arcnet-hardware.txt 27arcnet-hardware.txt
28 - tons of info on ARCnet, hubs, jumper settings for ARCnet cards, etc. 28 - tons of info on ARCnet, hubs, jumper settings for ARCnet cards, etc.
29arcnet.txt 29arcnet.txt
@@ -42,6 +42,8 @@ bridge.txt
42 - where to get user space programs for ethernet bridging with Linux. 42 - where to get user space programs for ethernet bridging with Linux.
43can.txt 43can.txt
44 - documentation on CAN protocol family. 44 - documentation on CAN protocol family.
45cdc_mbim.txt
46 - 3G/LTE USB modem (Mobile Broadband Interface Model)
45cops.txt 47cops.txt
46 - info on the COPS LocalTalk Linux driver 48 - info on the COPS LocalTalk Linux driver
47cs89x0.txt 49cs89x0.txt
@@ -54,6 +56,8 @@ cxgb.txt
54 - Release Notes for the Chelsio N210 Linux device driver. 56 - Release Notes for the Chelsio N210 Linux device driver.
55dccp.txt 57dccp.txt
56 - the Datagram Congestion Control Protocol (DCCP) (RFC 4340..42). 58 - the Datagram Congestion Control Protocol (DCCP) (RFC 4340..42).
59dctcp.txt
60 - DataCenter TCP congestion control
57de4x5.txt 61de4x5.txt
58 - the Digital EtherWORKS DE4?? and DE5?? PCI Ethernet driver 62 - the Digital EtherWORKS DE4?? and DE5?? PCI Ethernet driver
59decnet.txt 63decnet.txt
diff --git a/Documentation/networking/can.txt b/Documentation/networking/can.txt
index 2236d6dcb7da..0a2859a8ee7e 100644
--- a/Documentation/networking/can.txt
+++ b/Documentation/networking/can.txt
@@ -234,7 +234,7 @@ solution for a couple of reasons:
234 mechanisms. Inside this filter definition the (interested) type of 234 mechanisms. Inside this filter definition the (interested) type of
235 errors may be selected. The reception of error messages is disabled 235 errors may be selected. The reception of error messages is disabled
236 by default. The format of the CAN error message frame is briefly 236 by default. The format of the CAN error message frame is briefly
237 described in the Linux header file "include/linux/can/error.h". 237 described in the Linux header file "include/uapi/linux/can/error.h".
238 238
2394. How to use SocketCAN 2394. How to use SocketCAN
240------------------------ 240------------------------
diff --git a/Documentation/scheduler/completion.txt b/Documentation/scheduler/completion.txt
new file mode 100644
index 000000000000..f77651eca31e
--- /dev/null
+++ b/Documentation/scheduler/completion.txt
@@ -0,0 +1,236 @@
1completions - wait for completion handling
2==========================================
3
4This document was originally written based on 3.18.0 (linux-next)
5
6Introduction:
7-------------
8
9If you have one or more threads of execution that must wait for some process
10to have reached a point or a specific state, completions can provide a race
11free solution to this problem. Semantically they are somewhat like a
12pthread_barriers and have similar use-cases.
13
14Completions are a code synchronization mechanism that is preferable to any
15misuse of locks. Any time you think of using yield() or some quirky
16msleep(1); loop to allow something else to proceed, you probably want to
17look into using one of the wait_for_completion*() calls instead. The
18advantage of using completions is clear intent of the code but also more
19efficient code as both threads can continue until the result is actually
20needed.
21
22Completions are built on top of the generic event infrastructure in Linux,
23with the event reduced to a simple flag appropriately called "done" in
24struct completion, that tells the waiting threads of execution if they
25can continue safely.
26
27As completions are scheduling related the code is found in
28kernel/sched/completion.c - for details on completion design and
29implementation see completions-design.txt
30
31
32Usage:
33------
34
35There are three parts to the using completions, the initialization of the
36struct completion, the waiting part through a call to one of the variants of
37wait_for_completion() and the signaling side through a call to complete(),
38or complete_all(). Further there are some helper functions for checking the
39state of completions.
40
41To use completions one needs to include <linux/completion.h> and
42create a variable of type struct completion. The structure used for
43handling of completions is:
44
45 struct completion {
46 unsigned int done;
47 wait_queue_head_t wait;
48 };
49
50providing the wait queue to place tasks on for waiting and the flag for
51indicating the state of affairs.
52
53Completions should be named to convey the intent of the waiter. A good
54example is:
55
56 wait_for_completion(&early_console_added);
57
58 complete(&early_console_added);
59
60Good naming (as always) helps code readability.
61
62
63Initializing completions:
64-------------------------
65
66Initialization of dynamically allocated completions, often embedded in
67other structures, is done with:
68
69 void init_completion(&done);
70
71Initialization is accomplished by initializing the wait queue and setting
72the default state to "not available", that is, "done" is set to 0.
73
74The re-initialization function, reinit_completion(), simply resets the
75done element to "not available", thus again to 0, without touching the
76wait queue. Calling init_completion() on the same completions object is
77most likely a bug as it re-initializes the queue to an empty queue and
78enqueued tasks could get "lost" - use reinit_completion() in that case.
79
80For static declaration and initialization, macros are available. These are:
81
82 static DECLARE_COMPLETION(setup_done)
83
84used for static declarations in file scope. Within functions the static
85initialization should always use:
86
87 DECLARE_COMPLETION_ONSTACK(setup_done)
88
89suitable for automatic/local variables on the stack and will make lockdep
90happy. Note also that one needs to making *sure* the completion passt to
91work threads remains in-scope, and no references remain to on-stack data
92when the initiating function returns.
93
94
95Waiting for completions:
96------------------------
97
98For a thread of execution to wait for some concurrent work to finish, it
99calls wait_for_completion() on the initialized completion structure.
100A typical usage scenario is:
101
102 structure completion setup_done;
103 init_completion(&setup_done);
104 initialze_work(...,&setup_done,...)
105
106 /* run non-dependent code */ /* do setup */
107
108 wait_for_completion(&seupt_done); complete(setup_done)
109
110This is not implying any temporal order of wait_for_completion() and the
111call to complete() - if the call to complete() happened before the call
112to wait_for_completion() then the waiting side simply will continue
113immediately as all dependencies are satisfied.
114
115Note that wait_for_completion() is calling spin_lock_irq/spin_unlock_irq
116so it can only be called safely when you know that interrupts are enabled.
117Calling it from hard-irq context will result in hard to detect spurious
118enabling of interrupts.
119
120wait_for_completion():
121
122 void wait_for_completion(struct completion *done):
123
124The default behavior is to wait without a timeout and mark the task as
125uninterruptible. wait_for_completion() and its variants are only safe
126in soft-interrupt or process context but not in hard-irq context.
127As all variants of wait_for_completion() can (obviously) block for a long
128time, you probably don't want to call this with held locks - see also
129try_wait_for_completion() below.
130
131
132Variants available:
133-------------------
134
135The below variants all return status and this status should be checked in
136most(/all) cases - in cases where the status is deliberately not checked you
137probably want to make a note explaining this (e.g. see
138arch/arm/kernel/smp.c:__cpu_up()).
139
140A common problem that occurs is to have unclean assignment of return types,
141so care should be taken with assigning return-values to variables of proper
142type. Checking for the specific meaning of return values also has been found
143to be quite inaccurate e.g. constructs like
144if(!wait_for_completion_interruptible_timeout(...)) would execute the same
145code path for successful completion and for the interrupted case - which is
146probably not what you want.
147
148 int wait_for_completion_interruptible(struct completion *done)
149
150marking the task TASK_INTERRUPTIBLE. If a signal was received while waiting.
151It will return -ERESTARTSYS and 0 otherwise.
152
153 unsigned long wait_for_completion_timeout(struct completion *done,
154 unsigned long timeout)
155
156The task is marked as TASK_UNINTERRUPTIBLE and will wait at most timeout
157(in jiffies). If timeout occurs it return 0 else the remaining time in
158jiffies (but at least 1). Timeouts are preferably passed by msecs_to_jiffies()
159or usecs_to_jiffies(). If the returned timeout value is deliberately ignored
160a comment should probably explain why (e.g. see drivers/mfd/wm8350-core.c
161wm8350_read_auxadc())
162
163 long wait_for_completion_interruptible_timeout(
164 struct completion *done, unsigned long timeout)
165
166passing a timeout in jiffies and marking the task as TASK_INTERRUPTIBLE. If a
167signal was received it will return -ERESTARTSYS, 0 if completion timed-out and
168the remaining time in jiffies if completion occurred.
169
170Further variants include _killable which passes TASK_KILLABLE as the
171designated tasks state and will return a -ERESTARTSYS if interrupted or
172else 0 if completions was achieved as well as a _timeout variant.
173
174 long wait_for_completion_killable(struct completion *done)
175 long wait_for_completion_killable_timeout(struct completion *done,
176 unsigned long timeout)
177
178The _io variants wait_for_completion_io behave the same as the non-_io
179variants, except for accounting waiting time as waiting on IO, which has
180an impact on how scheduling is calculated.
181
182 void wait_for_completion_io(struct completion *done)
183 unsigned long wait_for_completion_io_timeout(struct completion *done
184 unsigned long timeout)
185
186
187Signaling completions:
188----------------------
189
190A thread of execution that wants to signal that the conditions for
191continuation have been achieved calls complete() to signal exactly one
192of the waiters that it can continue.
193
194 void complete(struct completion *done)
195
196or calls complete_all to signal all current and future waiters.
197
198 void complete_all(struct completion *done)
199
200The signaling will work as expected even if completions are signaled before
201a thread starts waiting. This is achieved by the waiter "consuming"
202(decrementing) the done element of struct completion. Waiting threads
203wakeup order is the same in which they were enqueued (FIFO order).
204
205If complete() is called multiple times then this will allow for that number
206of waiters to continue - each call to complete() will simply increment the
207done element. Calling complete_all() multiple times is a bug though. Both
208complete() and complete_all() can be called in hard-irq context safely.
209
210There only can be one thread calling complete() or complete_all() on a
211particular struct completions at any time - serialized through the wait
212queue spinlock. Any such concurrent calls to complete() or complete_all()
213probably are a design bug.
214
215Signaling completion from hard-irq context is fine as it will appropriately
216lock with spin_lock_irqsave/spin_unlock_irqrestore.
217
218
219try_wait_for_completion()/completion_done():
220--------------------------------------------
221
222The try_wait_for_completion will not put the thread on the wait queue but
223rather returns false if it would need to enqueue (block) the thread, else it
224consumes any posted completions and returns true.
225
226 bool try_wait_for_completion(struct completion *done)
227
228Finally to check state of a completions without changing it in any way is
229provided by completion_done() returning false if there are any posted
230completion that was not yet consumed by waiters implying that there are
231waiters and true otherwise;
232
233 bool completion_done(struct completion *done)
234
235Both try_wait_for_completion() and completion_done() are safe to be called in
236hard-irq context.
diff --git a/Documentation/sysctl/vm.txt b/Documentation/sysctl/vm.txt
index 4415aa915681..de3afef76837 100644
--- a/Documentation/sysctl/vm.txt
+++ b/Documentation/sysctl/vm.txt
@@ -728,7 +728,7 @@ The default value is 60.
728 728
729- user_reserve_kbytes 729- user_reserve_kbytes
730 730
731When overcommit_memory is set to 2, "never overommit" mode, reserve 731When overcommit_memory is set to 2, "never overcommit" mode, reserve
732min(3% of current process size, user_reserve_kbytes) of free memory. 732min(3% of current process size, user_reserve_kbytes) of free memory.
733This is intended to prevent a user from starting a single memory hogging 733This is intended to prevent a user from starting a single memory hogging
734process, such that they cannot recover (kill the hog). 734process, such that they cannot recover (kill the hog).
diff --git a/Documentation/trace/ftrace.txt b/Documentation/trace/ftrace.txt
index 8408e040f06f..572ca923631a 100644
--- a/Documentation/trace/ftrace.txt
+++ b/Documentation/trace/ftrace.txt
@@ -1740,7 +1740,7 @@ no pid
1740 yum-updatesd-3111 [003] 1637.254683: lock_hrtimer_base <-hrtimer_try_to_cancel 1740 yum-updatesd-3111 [003] 1637.254683: lock_hrtimer_base <-hrtimer_try_to_cancel
1741 yum-updatesd-3111 [003] 1637.254685: fget_light <-do_sys_poll 1741 yum-updatesd-3111 [003] 1637.254685: fget_light <-do_sys_poll
1742 yum-updatesd-3111 [003] 1637.254686: pipe_poll <-do_sys_poll 1742 yum-updatesd-3111 [003] 1637.254686: pipe_poll <-do_sys_poll
1743# echo -1 > set_ftrace_pid 1743# echo > set_ftrace_pid
1744# cat trace |head 1744# cat trace |head
1745 # tracer: function 1745 # tracer: function
1746 # 1746 #
diff --git a/MAINTAINERS b/MAINTAINERS
index 43c293276a92..cc66549dd761 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -3226,6 +3226,7 @@ F: Documentation/
3226X: Documentation/ABI/ 3226X: Documentation/ABI/
3227X: Documentation/devicetree/ 3227X: Documentation/devicetree/
3228X: Documentation/[a-z][a-z]_[A-Z][A-Z]/ 3228X: Documentation/[a-z][a-z]_[A-Z][A-Z]/
3229T: git git://git.lwn.net/linux-2.6.git docs-next
3229 3230
3230DOUBLETALK DRIVER 3231DOUBLETALK DRIVER
3231M: "James R. Van Zandt" <jrv@vanzandt.mv.com> 3232M: "James R. Van Zandt" <jrv@vanzandt.mv.com>