Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Merge tag 'docs-for-linus' of git://git.lwn.net/linux-2.6

Pull documentation updates from Jonathan Corbet:
"Highlights this time around include:

- A thrashing of SubmittingPatches to bring it out of the "send
everything to Linus" era of kernel development.

- A new document on completions from Nicholas McGuire

- Lots of typo fixes, formatting improvements, corrections, build
fixes, and more"

* tag 'docs-for-linus' of git://git.lwn.net/linux-2.6: (35 commits)
Documentation: Fix the wrong command `echo -1 > set_ftrace_pid` for cleaning the filter.
can-doc: Fixed a wrong filepath in can.txt
Documentation: Fix trivial typo in comment.
kgdb,docs: Fix typo and minor style issues
Documentation: add description for FTRACE probe status
doc: brief user documentation for completion
Documentation/misc-devices/mei: Fix indentation of embedded code.
Documentation/misc-devices/mei: Fix indentation of enumeration.
Documentation/misc-devices/mei: Fix spacing around parentheses.
Documentation/misc-devices/mei: Fix formatting of headings.
Documentation: devicetree: Fix double words in Doumentation/devicetree
Documentation: mm: Fix typo in vm.txt
lockstat: Add documentation on contention and contenting points
Documentation: fix blackfin gptimers-example build errors
Fixes column alignment in table of contents entry 1.9 in Documentation/filesystems/proc.txt
CodingStyle: enable emacs display of trailing whitespace
DocBook: Do not exceed argument list limit
gpio: board.txt: Fix the gpio name example
Documentation/SubmittingPatches: unify whitespace/tabs for the DCO
MAINTAINERS: Add the docs-next git tree to the maintainer entry
...

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