aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation
diff options
context:
space:
mode:
Diffstat (limited to 'Documentation')
-rw-r--r--Documentation/CodingStyle49
-rw-r--r--Documentation/DocBook/gadget.tmpl2
-rw-r--r--Documentation/DocBook/kernel-locking.tmpl123
-rw-r--r--Documentation/DocBook/usb.tmpl28
-rw-r--r--Documentation/HOWTO20
-rw-r--r--Documentation/block/capability.txt15
-rw-r--r--Documentation/dontdiff42
-rw-r--r--Documentation/feature-removal-schedule.txt27
-rw-r--r--Documentation/filesystems/directory-locking5
-rw-r--r--Documentation/filesystems/porting8
-rw-r--r--Documentation/gpio.txt8
-rw-r--r--Documentation/i386/boot.txt401
-rw-r--r--Documentation/initrd.txt74
-rw-r--r--Documentation/kernel-parameters.txt24
-rw-r--r--Documentation/ldm.txt21
-rw-r--r--Documentation/memory-barriers.txt98
-rw-r--r--Documentation/networking/netdevices.txt2
-rw-r--r--Documentation/s390/cds.txt82
-rw-r--r--Documentation/spi/spi-summary53
-rw-r--r--Documentation/vm/slabinfo.c26
20 files changed, 725 insertions, 383 deletions
diff --git a/Documentation/CodingStyle b/Documentation/CodingStyle
index afc286775891..b49b92edb396 100644
--- a/Documentation/CodingStyle
+++ b/Documentation/CodingStyle
@@ -495,29 +495,40 @@ re-formatting you may want to take a look at the man page. But
495remember: "indent" is not a fix for bad programming. 495remember: "indent" is not a fix for bad programming.
496 496
497 497
498 Chapter 10: Configuration-files 498 Chapter 10: Kconfig configuration files
499 499
500For configuration options (arch/xxx/Kconfig, and all the Kconfig files), 500For all of the Kconfig* configuration files throughout the source tree,
501somewhat different indentation is used. 501the indentation is somewhat different. Lines under a "config" definition
502are indented with one tab, while help text is indented an additional two
503spaces. Example:
502 504
503Help text is indented with 2 spaces. 505config AUDIT
504 506 bool "Auditing support"
505if CONFIG_EXPERIMENTAL 507 depends on NET
506 tristate CONFIG_BOOM
507 default n
508 help
509 Apply nitroglycerine inside the keyboard (DANGEROUS)
510 bool CONFIG_CHEER
511 depends on CONFIG_BOOM
512 default y
513 help 508 help
514 Output nice messages when you explode 509 Enable auditing infrastructure that can be used with another
515endif 510 kernel subsystem, such as SELinux (which requires this for
511 logging of avc messages output). Does not do system-call
512 auditing without CONFIG_AUDITSYSCALL.
513
514Features that might still be considered unstable should be defined as
515dependent on "EXPERIMENTAL":
516
517config SLUB
518 depends on EXPERIMENTAL && !ARCH_USES_SLAB_PAGE_STRUCT
519 bool "SLUB (Unqueued Allocator)"
520 ...
521
522while seriously dangerous features (such as write support for certain
523filesystems) should advertise this prominently in their prompt string:
524
525config ADFS_FS_RW
526 bool "ADFS write support (DANGEROUS)"
527 depends on ADFS_FS
528 ...
516 529
517Generally, CONFIG_EXPERIMENTAL should surround all options not considered 530For full documentation on the configuration files, see the file
518stable. All options that are known to trash data (experimental write- 531Documentation/kbuild/kconfig-language.txt.
519support for file-systems, for instance) should be denoted (DANGEROUS), other
520experimental options should be denoted (EXPERIMENTAL).
521 532
522 533
523 Chapter 11: Data structures 534 Chapter 11: Data structures
diff --git a/Documentation/DocBook/gadget.tmpl b/Documentation/DocBook/gadget.tmpl
index e7fc96433408..6996d977bf8f 100644
--- a/Documentation/DocBook/gadget.tmpl
+++ b/Documentation/DocBook/gadget.tmpl
@@ -52,7 +52,7 @@
52 52
53<toc></toc> 53<toc></toc>
54 54
55<chapter><title>Introduction</title> 55<chapter id="intro"><title>Introduction</title>
56 56
57<para>This document presents a Linux-USB "Gadget" 57<para>This document presents a Linux-USB "Gadget"
58kernel mode 58kernel mode
diff --git a/Documentation/DocBook/kernel-locking.tmpl b/Documentation/DocBook/kernel-locking.tmpl
index 644c3884fab9..0a441f73261a 100644
--- a/Documentation/DocBook/kernel-locking.tmpl
+++ b/Documentation/DocBook/kernel-locking.tmpl
@@ -551,10 +551,12 @@
551 <function>spin_lock_irqsave()</function>, which is a superset 551 <function>spin_lock_irqsave()</function>, which is a superset
552 of all other spinlock primitives. 552 of all other spinlock primitives.
553 </para> 553 </para>
554
554 <table> 555 <table>
555<title>Table of Locking Requirements</title> 556<title>Table of Locking Requirements</title>
556<tgroup cols="11"> 557<tgroup cols="11">
557<tbody> 558<tbody>
559
558<row> 560<row>
559<entry></entry> 561<entry></entry>
560<entry>IRQ Handler A</entry> 562<entry>IRQ Handler A</entry>
@@ -576,97 +578,128 @@
576 578
577<row> 579<row>
578<entry>IRQ Handler B</entry> 580<entry>IRQ Handler B</entry>
579<entry>spin_lock_irqsave</entry> 581<entry>SLIS</entry>
580<entry>None</entry> 582<entry>None</entry>
581</row> 583</row>
582 584
583<row> 585<row>
584<entry>Softirq A</entry> 586<entry>Softirq A</entry>
585<entry>spin_lock_irq</entry> 587<entry>SLI</entry>
586<entry>spin_lock_irq</entry> 588<entry>SLI</entry>
587<entry>spin_lock</entry> 589<entry>SL</entry>
588</row> 590</row>
589 591
590<row> 592<row>
591<entry>Softirq B</entry> 593<entry>Softirq B</entry>
592<entry>spin_lock_irq</entry> 594<entry>SLI</entry>
593<entry>spin_lock_irq</entry> 595<entry>SLI</entry>
594<entry>spin_lock</entry> 596<entry>SL</entry>
595<entry>spin_lock</entry> 597<entry>SL</entry>
596</row> 598</row>
597 599
598<row> 600<row>
599<entry>Tasklet A</entry> 601<entry>Tasklet A</entry>
600<entry>spin_lock_irq</entry> 602<entry>SLI</entry>
601<entry>spin_lock_irq</entry> 603<entry>SLI</entry>
602<entry>spin_lock</entry> 604<entry>SL</entry>
603<entry>spin_lock</entry> 605<entry>SL</entry>
604<entry>None</entry> 606<entry>None</entry>
605</row> 607</row>
606 608
607<row> 609<row>
608<entry>Tasklet B</entry> 610<entry>Tasklet B</entry>
609<entry>spin_lock_irq</entry> 611<entry>SLI</entry>
610<entry>spin_lock_irq</entry> 612<entry>SLI</entry>
611<entry>spin_lock</entry> 613<entry>SL</entry>
612<entry>spin_lock</entry> 614<entry>SL</entry>
613<entry>spin_lock</entry> 615<entry>SL</entry>
614<entry>None</entry> 616<entry>None</entry>
615</row> 617</row>
616 618
617<row> 619<row>
618<entry>Timer A</entry> 620<entry>Timer A</entry>
619<entry>spin_lock_irq</entry> 621<entry>SLI</entry>
620<entry>spin_lock_irq</entry> 622<entry>SLI</entry>
621<entry>spin_lock</entry> 623<entry>SL</entry>
622<entry>spin_lock</entry> 624<entry>SL</entry>
623<entry>spin_lock</entry> 625<entry>SL</entry>
624<entry>spin_lock</entry> 626<entry>SL</entry>
625<entry>None</entry> 627<entry>None</entry>
626</row> 628</row>
627 629
628<row> 630<row>
629<entry>Timer B</entry> 631<entry>Timer B</entry>
630<entry>spin_lock_irq</entry> 632<entry>SLI</entry>
631<entry>spin_lock_irq</entry> 633<entry>SLI</entry>
632<entry>spin_lock</entry> 634<entry>SL</entry>
633<entry>spin_lock</entry> 635<entry>SL</entry>
634<entry>spin_lock</entry> 636<entry>SL</entry>
635<entry>spin_lock</entry> 637<entry>SL</entry>
636<entry>spin_lock</entry> 638<entry>SL</entry>
637<entry>None</entry> 639<entry>None</entry>
638</row> 640</row>
639 641
640<row> 642<row>
641<entry>User Context A</entry> 643<entry>User Context A</entry>
642<entry>spin_lock_irq</entry> 644<entry>SLI</entry>
643<entry>spin_lock_irq</entry> 645<entry>SLI</entry>
644<entry>spin_lock_bh</entry> 646<entry>SLBH</entry>
645<entry>spin_lock_bh</entry> 647<entry>SLBH</entry>
646<entry>spin_lock_bh</entry> 648<entry>SLBH</entry>
647<entry>spin_lock_bh</entry> 649<entry>SLBH</entry>
648<entry>spin_lock_bh</entry> 650<entry>SLBH</entry>
649<entry>spin_lock_bh</entry> 651<entry>SLBH</entry>
650<entry>None</entry> 652<entry>None</entry>
651</row> 653</row>
652 654
653<row> 655<row>
654<entry>User Context B</entry> 656<entry>User Context B</entry>
657<entry>SLI</entry>
658<entry>SLI</entry>
659<entry>SLBH</entry>
660<entry>SLBH</entry>
661<entry>SLBH</entry>
662<entry>SLBH</entry>
663<entry>SLBH</entry>
664<entry>SLBH</entry>
665<entry>DI</entry>
666<entry>None</entry>
667</row>
668
669</tbody>
670</tgroup>
671</table>
672
673 <table>
674<title>Legend for Locking Requirements Table</title>
675<tgroup cols="2">
676<tbody>
677
678<row>
679<entry>SLIS</entry>
680<entry>spin_lock_irqsave</entry>
681</row>
682<row>
683<entry>SLI</entry>
655<entry>spin_lock_irq</entry> 684<entry>spin_lock_irq</entry>
656<entry>spin_lock_irq</entry> 685</row>
657<entry>spin_lock_bh</entry> 686<row>
658<entry>spin_lock_bh</entry> 687<entry>SL</entry>
659<entry>spin_lock_bh</entry> 688<entry>spin_lock</entry>
660<entry>spin_lock_bh</entry> 689</row>
661<entry>spin_lock_bh</entry> 690<row>
691<entry>SLBH</entry>
662<entry>spin_lock_bh</entry> 692<entry>spin_lock_bh</entry>
693</row>
694<row>
695<entry>DI</entry>
663<entry>down_interruptible</entry> 696<entry>down_interruptible</entry>
664<entry>None</entry>
665</row> 697</row>
666 698
667</tbody> 699</tbody>
668</tgroup> 700</tgroup>
669</table> 701</table>
702
670</sect1> 703</sect1>
671</chapter> 704</chapter>
672 705
diff --git a/Documentation/DocBook/usb.tmpl b/Documentation/DocBook/usb.tmpl
index a2ebd651b05a..af293606fbe3 100644
--- a/Documentation/DocBook/usb.tmpl
+++ b/Documentation/DocBook/usb.tmpl
@@ -185,7 +185,7 @@
185 185
186 </chapter> 186 </chapter>
187 187
188<chapter><title>USB-Standard Types</title> 188<chapter id="types"><title>USB-Standard Types</title>
189 189
190 <para>In <filename>&lt;linux/usb/ch9.h&gt;</filename> you will find 190 <para>In <filename>&lt;linux/usb/ch9.h&gt;</filename> you will find
191 the USB data types defined in chapter 9 of the USB specification. 191 the USB data types defined in chapter 9 of the USB specification.
@@ -197,7 +197,7 @@
197 197
198 </chapter> 198 </chapter>
199 199
200<chapter><title>Host-Side Data Types and Macros</title> 200<chapter id="hostside"><title>Host-Side Data Types and Macros</title>
201 201
202 <para>The host side API exposes several layers to drivers, some of 202 <para>The host side API exposes several layers to drivers, some of
203 which are more necessary than others. 203 which are more necessary than others.
@@ -211,7 +211,7 @@
211 211
212 </chapter> 212 </chapter>
213 213
214 <chapter><title>USB Core APIs</title> 214 <chapter id="usbcore"><title>USB Core APIs</title>
215 215
216 <para>There are two basic I/O models in the USB API. 216 <para>There are two basic I/O models in the USB API.
217 The most elemental one is asynchronous: drivers submit requests 217 The most elemental one is asynchronous: drivers submit requests
@@ -248,7 +248,7 @@
248!Edrivers/usb/core/hub.c 248!Edrivers/usb/core/hub.c
249 </chapter> 249 </chapter>
250 250
251 <chapter><title>Host Controller APIs</title> 251 <chapter id="hcd"><title>Host Controller APIs</title>
252 252
253 <para>These APIs are only for use by host controller drivers, 253 <para>These APIs are only for use by host controller drivers,
254 most of which implement standard register interfaces such as 254 most of which implement standard register interfaces such as
@@ -285,7 +285,7 @@
285!Idrivers/usb/core/buffer.c 285!Idrivers/usb/core/buffer.c
286 </chapter> 286 </chapter>
287 287
288 <chapter> 288 <chapter id="usbfs">
289 <title>The USB Filesystem (usbfs)</title> 289 <title>The USB Filesystem (usbfs)</title>
290 290
291 <para>This chapter presents the Linux <emphasis>usbfs</emphasis>. 291 <para>This chapter presents the Linux <emphasis>usbfs</emphasis>.
@@ -317,7 +317,7 @@
317 not it has a kernel driver. 317 not it has a kernel driver.
318 </para> 318 </para>
319 319
320 <sect1> 320 <sect1 id="usbfs-files">
321 <title>What files are in "usbfs"?</title> 321 <title>What files are in "usbfs"?</title>
322 322
323 <para>Conventionally mounted at 323 <para>Conventionally mounted at
@@ -356,7 +356,7 @@
356 356
357 </sect1> 357 </sect1>
358 358
359 <sect1> 359 <sect1 id="usbfs-fstab">
360 <title>Mounting and Access Control</title> 360 <title>Mounting and Access Control</title>
361 361
362 <para>There are a number of mount options for usbfs, which will 362 <para>There are a number of mount options for usbfs, which will
@@ -439,7 +439,7 @@
439 439
440 </sect1> 440 </sect1>
441 441
442 <sect1> 442 <sect1 id="usbfs-devices">
443 <title>/proc/bus/usb/devices</title> 443 <title>/proc/bus/usb/devices</title>
444 444
445 <para>This file is handy for status viewing tools in user 445 <para>This file is handy for status viewing tools in user
@@ -473,7 +473,7 @@ for (;;) {
473 </para> 473 </para>
474 </sect1> 474 </sect1>
475 475
476 <sect1> 476 <sect1 id="usbfs-bbbddd">
477 <title>/proc/bus/usb/BBB/DDD</title> 477 <title>/proc/bus/usb/BBB/DDD</title>
478 478
479 <para>Use these files in one of these basic ways: 479 <para>Use these files in one of these basic ways:
@@ -510,7 +510,7 @@ for (;;) {
510 </sect1> 510 </sect1>
511 511
512 512
513 <sect1> 513 <sect1 id="usbfs-lifecycle">
514 <title>Life Cycle of User Mode Drivers</title> 514 <title>Life Cycle of User Mode Drivers</title>
515 515
516 <para>Such a driver first needs to find a device file 516 <para>Such a driver first needs to find a device file
@@ -565,7 +565,7 @@ for (;;) {
565 565
566 </sect1> 566 </sect1>
567 567
568 <sect1><title>The ioctl() Requests</title> 568 <sect1 id="usbfs-ioctl"><title>The ioctl() Requests</title>
569 569
570 <para>To use these ioctls, you need to include the following 570 <para>To use these ioctls, you need to include the following
571 headers in your userspace program: 571 headers in your userspace program:
@@ -604,7 +604,7 @@ for (;;) {
604 </para> 604 </para>
605 605
606 606
607 <sect2> 607 <sect2 id="usbfs-mgmt">
608 <title>Management/Status Requests</title> 608 <title>Management/Status Requests</title>
609 609
610 <para>A number of usbfs requests don't deal very directly 610 <para>A number of usbfs requests don't deal very directly
@@ -736,7 +736,7 @@ usbdev_ioctl (int fd, int ifno, unsigned request, void *param)
736 736
737 </sect2> 737 </sect2>
738 738
739 <sect2> 739 <sect2 id="usbfs-sync">
740 <title>Synchronous I/O Support</title> 740 <title>Synchronous I/O Support</title>
741 741
742 <para>Synchronous requests involve the kernel blocking 742 <para>Synchronous requests involve the kernel blocking
@@ -865,7 +865,7 @@ usbdev_ioctl (int fd, int ifno, unsigned request, void *param)
865 </variablelist> 865 </variablelist>
866 </sect2> 866 </sect2>
867 867
868 <sect2> 868 <sect2 id="usbfs-async">
869 <title>Asynchronous I/O Support</title> 869 <title>Asynchronous I/O Support</title>
870 870
871 <para>As mentioned above, there are situations where it may be 871 <para>As mentioned above, there are situations where it may be
diff --git a/Documentation/HOWTO b/Documentation/HOWTO
index 48123dba5e6a..ced9207bedcf 100644
--- a/Documentation/HOWTO
+++ b/Documentation/HOWTO
@@ -396,26 +396,6 @@ bugme-janitor mailing list (every change in the bugzilla is mailed here)
396 396
397 397
398 398
399Managing bug reports
400--------------------
401
402One of the best ways to put into practice your hacking skills is by fixing
403bugs reported by other people. Not only you will help to make the kernel
404more stable, you'll learn to fix real world problems and you will improve
405your skills, and other developers will be aware of your presence. Fixing
406bugs is one of the best ways to get merits among other developers, because
407not many people like wasting time fixing other people's bugs.
408
409To work in the already reported bug reports, go to http://bugzilla.kernel.org.
410If you want to be advised of the future bug reports, you can subscribe to the
411bugme-new mailing list (only new bug reports are mailed here) or to the
412bugme-janitor mailing list (every change in the bugzilla is mailed here)
413
414 http://lists.osdl.org/mailman/listinfo/bugme-new
415 http://lists.osdl.org/mailman/listinfo/bugme-janitors
416
417
418
419Mailing lists 399Mailing lists
420------------- 400-------------
421 401
diff --git a/Documentation/block/capability.txt b/Documentation/block/capability.txt
new file mode 100644
index 000000000000..2f1729424ef4
--- /dev/null
+++ b/Documentation/block/capability.txt
@@ -0,0 +1,15 @@
1Generic Block Device Capability
2===============================================================================
3This file documents the sysfs file block/<disk>/capability
4
5capability is a hex word indicating which capabilities a specific disk
6supports. For more information on bits not listed here, see
7include/linux/genhd.h
8
9Capability Value
10-------------------------------------------------------------------------------
11GENHD_FL_MEDIA_CHANGE_NOTIFY 4
12 When this bit is set, the disk supports Asynchronous Notification
13 of media change events. These events will be broadcast to user
14 space via kernel uevent.
15
diff --git a/Documentation/dontdiff b/Documentation/dontdiff
index 64e9f6c4826b..595a5ea4c690 100644
--- a/Documentation/dontdiff
+++ b/Documentation/dontdiff
@@ -10,10 +10,12 @@
10*.grp 10*.grp
11*.gz 11*.gz
12*.html 12*.html
13*.i
13*.jpeg 14*.jpeg
14*.ko 15*.ko
15*.log 16*.log
16*.lst 17*.lst
18*.moc
17*.mod.c 19*.mod.c
18*.o 20*.o
19*.orig 21*.orig
@@ -25,6 +27,9 @@
25*.s 27*.s
26*.sgml 28*.sgml
27*.so 29*.so
30*.symtypes
31*.tab.c
32*.tab.h
28*.tex 33*.tex
29*.ver 34*.ver
30*.xml 35*.xml
@@ -32,9 +37,13 @@
32*_vga16.c 37*_vga16.c
33*cscope* 38*cscope*
34*~ 39*~
40*.9
41*.9.gz
35.* 42.*
36.cscope 43.cscope
3753c700_d.h 4453c700_d.h
4553c7xx_d.h
4653c7xx_u.h
3853c8xx_d.h* 4753c8xx_d.h*
39BitKeeper 48BitKeeper
40COPYING 49COPYING
@@ -70,9 +79,11 @@ bzImage*
70classlist.h* 79classlist.h*
71comp*.log 80comp*.log
72compile.h* 81compile.h*
82conf
73config 83config
74config-* 84config-*
75config_data.h* 85config_data.h*
86config_data.gz*
76conmakehash 87conmakehash
77consolemap_deftbl.c* 88consolemap_deftbl.c*
78crc32table.h* 89crc32table.h*
@@ -81,18 +92,23 @@ defkeymap.c*
81devlist.h* 92devlist.h*
82docproc 93docproc
83dummy_sym.c* 94dummy_sym.c*
95elf2ecoff
84elfconfig.h* 96elfconfig.h*
85filelist 97filelist
86fixdep 98fixdep
87fore200e_mkfirm 99fore200e_mkfirm
88fore200e_pca_fw.c* 100fore200e_pca_fw.c*
101gconf
89gen-devlist 102gen-devlist
90gen-kdb_cmds.c* 103gen-kdb_cmds.c*
91gen_crc32table 104gen_crc32table
92gen_init_cpio 105gen_init_cpio
93genksyms 106genksyms
94gentbl 107gentbl
108*_gray256.c
95ikconfig.h* 109ikconfig.h*
110initramfs_data.cpio
111initramfs_data.cpio.gz
96initramfs_list 112initramfs_list
97kallsyms 113kallsyms
98kconfig 114kconfig
@@ -100,19 +116,30 @@ kconfig.tk
100keywords.c* 116keywords.c*
101ksym.c* 117ksym.c*
102ksym.h* 118ksym.h*
119kxgettext
120lkc_defs.h
103lex.c* 121lex.c*
122lex.*.c
123lk201-map.c
104logo_*.c 124logo_*.c
105logo_*_clut224.c 125logo_*_clut224.c
106logo_*_mono.c 126logo_*_mono.c
107lxdialog 127lxdialog
108mach-types 128mach-types
109mach-types.h 129mach-types.h
130machtypes.h
110make_times_h 131make_times_h
111map 132map
112maui_boot.h 133maui_boot.h
134mconf
135miboot*
113mk_elfconfig 136mk_elfconfig
137mkboot
138mkbugboot
114mkdep 139mkdep
140mkprep
115mktables 141mktables
142mktree
116modpost 143modpost
117modversions.h* 144modversions.h*
118offset.h 145offset.h
@@ -120,18 +147,28 @@ offsets.h
120oui.c* 147oui.c*
121parse.c* 148parse.c*
122parse.h* 149parse.h*
150patches*
151pca200e.bin
152pca200e_ecd.bin2
153piggy.gz
154piggyback
123pnmtologo 155pnmtologo
124ppc_defs.h* 156ppc_defs.h*
125promcon_tbl.c* 157promcon_tbl.c*
126pss_boot.h 158pss_boot.h
159qconf
127raid6altivec*.c 160raid6altivec*.c
128raid6int*.c 161raid6int*.c
129raid6tables.c 162raid6tables.c
163relocs
164series
130setup 165setup
131sim710_d.h* 166sim710_d.h*
167sImage
132sm_tbl* 168sm_tbl*
133split-include 169split-include
134tags 170tags
171tftpboot.img
135times.h* 172times.h*
136tkparse 173tkparse
137trix_boot.h 174trix_boot.h
@@ -139,8 +176,11 @@ utsrelease.h*
139version.h* 176version.h*
140vmlinux 177vmlinux
141vmlinux-* 178vmlinux-*
179vmlinux.aout
142vmlinux.lds 180vmlinux.lds
143vsyscall.lds 181vsyscall.lds
144wanxlfw.inc 182wanxlfw.inc
145uImage 183uImage
146zImage 184unifdef
185zImage*
186zconf.hash.c
diff --git a/Documentation/feature-removal-schedule.txt b/Documentation/feature-removal-schedule.txt
index 498ff31f3aa1..2d7ea85075ba 100644
--- a/Documentation/feature-removal-schedule.txt
+++ b/Documentation/feature-removal-schedule.txt
@@ -62,7 +62,7 @@ Who: Dan Dennedy <dan@dennedy.org>, Stefan Richter <stefanr@s5r6.in-berlin.de>
62What: old NCR53C9x driver 62What: old NCR53C9x driver
63When: October 2007 63When: October 2007
64Why: Replaced by the much better esp_scsi driver. Actual low-level 64Why: Replaced by the much better esp_scsi driver. Actual low-level
65 driver can ported over almost trivially. 65 driver can be ported over almost trivially.
66Who: David Miller <davem@davemloft.net> 66Who: David Miller <davem@davemloft.net>
67 Christoph Hellwig <hch@lst.de> 67 Christoph Hellwig <hch@lst.de>
68 68
@@ -328,21 +328,20 @@ Who: Adrian Bunk <bunk@stusta.de>
328 328
329--------------------------- 329---------------------------
330 330
331What: libata.spindown_compat module parameter 331What: libata spindown skipping and warning
332When: Dec 2008 332When: Dec 2008
333Why: halt(8) synchronizes caches for and spins down libata disks 333Why: Some halt(8) implementations synchronize caches for and spin
334 because libata didn't use to spin down disk on system halt 334 down libata disks because libata didn't use to spin down disk on
335 (only synchronized caches). 335 system halt (only synchronized caches).
336 Spin down on system halt is now implemented and can be tested 336 Spin down on system halt is now implemented. sysfs node
337 using sysfs node /sys/class/scsi_disk/h:c:i:l/manage_start_stop. 337 /sys/class/scsi_disk/h:c:i:l/manage_start_stop is present if
338 spin down support is available.
338 Because issuing spin down command to an already spun down disk 339 Because issuing spin down command to an already spun down disk
339 makes some disks spin up just to spin down again, the old 340 makes some disks spin up just to spin down again, libata tracks
340 behavior needs to be maintained till userspace tool is updated 341 device spindown status to skip the extra spindown command and
341 to check the sysfs node and not to spin down disks with the 342 warn about it.
342 node set to one. 343 This is to give userspace tools the time to get updated and will
343 This module parameter is to give userspace tool the time to 344 be removed after userspace is reasonably updated.
344 get updated and should be removed after userspace is
345 reasonably updated.
346Who: Tejun Heo <htejun@gmail.com> 345Who: Tejun Heo <htejun@gmail.com>
347 346
348--------------------------- 347---------------------------
diff --git a/Documentation/filesystems/directory-locking b/Documentation/filesystems/directory-locking
index d7099a9266fb..ff7b611abf33 100644
--- a/Documentation/filesystems/directory-locking
+++ b/Documentation/filesystems/directory-locking
@@ -1,5 +1,6 @@
1 Locking scheme used for directory operations is based on two 1 Locking scheme used for directory operations is based on two
2kinds of locks - per-inode (->i_sem) and per-filesystem (->s_vfs_rename_sem). 2kinds of locks - per-inode (->i_mutex) and per-filesystem
3(->s_vfs_rename_mutex).
3 4
4 For our purposes all operations fall in 5 classes: 5 For our purposes all operations fall in 5 classes:
5 6
@@ -63,7 +64,7 @@ objects - A < B iff A is an ancestor of B.
63attempt to acquire some lock and already holds at least one lock. Let's 64attempt to acquire some lock and already holds at least one lock. Let's
64consider the set of contended locks. First of all, filesystem lock is 65consider the set of contended locks. First of all, filesystem lock is
65not contended, since any process blocked on it is not holding any locks. 66not contended, since any process blocked on it is not holding any locks.
66Thus all processes are blocked on ->i_sem. 67Thus all processes are blocked on ->i_mutex.
67 68
68 Non-directory objects are not contended due to (3). Thus link 69 Non-directory objects are not contended due to (3). Thus link
69creation can't be a part of deadlock - it can't be blocked on source 70creation can't be a part of deadlock - it can't be blocked on source
diff --git a/Documentation/filesystems/porting b/Documentation/filesystems/porting
index 5531694059ab..dac45c92d872 100644
--- a/Documentation/filesystems/porting
+++ b/Documentation/filesystems/porting
@@ -107,7 +107,7 @@ free to drop it...
107--- 107---
108[informational] 108[informational]
109 109
110->link() callers hold ->i_sem on the object we are linking to. Some of your 110->link() callers hold ->i_mutex on the object we are linking to. Some of your
111problems might be over... 111problems might be over...
112 112
113--- 113---
@@ -130,9 +130,9 @@ went in - and hadn't been documented ;-/). Just remove it from fs_flags
130--- 130---
131[mandatory] 131[mandatory]
132 132
133->setattr() is called without BKL now. Caller _always_ holds ->i_sem, so 133->setattr() is called without BKL now. Caller _always_ holds ->i_mutex, so
134watch for ->i_sem-grabbing code that might be used by your ->setattr(). 134watch for ->i_mutex-grabbing code that might be used by your ->setattr().
135Callers of notify_change() need ->i_sem now. 135Callers of notify_change() need ->i_mutex now.
136 136
137--- 137---
138[recommended] 138[recommended]
diff --git a/Documentation/gpio.txt b/Documentation/gpio.txt
index e8be0abb346c..36af58eba136 100644
--- a/Documentation/gpio.txt
+++ b/Documentation/gpio.txt
@@ -111,7 +111,9 @@ setting up a platform_device using the GPIO, is mark its direction:
111 111
112The return value is zero for success, else a negative errno. It should 112The return value is zero for success, else a negative errno. It should
113be checked, since the get/set calls don't have error returns and since 113be checked, since the get/set calls don't have error returns and since
114misconfiguration is possible. (These calls could sleep.) 114misconfiguration is possible. You should normally issue these calls from
115a task context. However, for spinlock-safe GPIOs it's OK to use them
116before tasking is enabled, as part of early board setup.
115 117
116For output GPIOs, the value provided becomes the initial output value. 118For output GPIOs, the value provided becomes the initial output value.
117This helps avoid signal glitching during system startup. 119This helps avoid signal glitching during system startup.
@@ -197,7 +199,9 @@ However, many platforms don't currently support this mechanism.
197 199
198Passing invalid GPIO numbers to gpio_request() will fail, as will requesting 200Passing invalid GPIO numbers to gpio_request() will fail, as will requesting
199GPIOs that have already been claimed with that call. The return value of 201GPIOs that have already been claimed with that call. The return value of
200gpio_request() must be checked. (These calls could sleep.) 202gpio_request() must be checked. You should normally issue these calls from
203a task context. However, for spinlock-safe GPIOs it's OK to request GPIOs
204before tasking is enabled, as part of early board setup.
201 205
202These calls serve two basic purposes. One is marking the signals which 206These calls serve two basic purposes. One is marking the signals which
203are actually in use as GPIOs, for better diagnostics; systems may have 207are actually in use as GPIOs, for better diagnostics; systems may have
diff --git a/Documentation/i386/boot.txt b/Documentation/i386/boot.txt
index d01b7a2a0f2e..35985b34d5a6 100644
--- a/Documentation/i386/boot.txt
+++ b/Documentation/i386/boot.txt
@@ -2,7 +2,7 @@
2 ---------------------------- 2 ----------------------------
3 3
4 H. Peter Anvin <hpa@zytor.com> 4 H. Peter Anvin <hpa@zytor.com>
5 Last update 2007-05-07 5 Last update 2007-05-23
6 6
7On the i386 platform, the Linux kernel uses a rather complicated boot 7On the i386 platform, the Linux kernel uses a rather complicated boot
8convention. This has evolved partially due to historical aspects, as 8convention. This has evolved partially due to historical aspects, as
@@ -52,7 +52,8 @@ zImage kernels, typically looks like:
520A0000 +------------------------+ 520A0000 +------------------------+
53 | Reserved for BIOS | Do not use. Reserved for BIOS EBDA. 53 | Reserved for BIOS | Do not use. Reserved for BIOS EBDA.
5409A000 +------------------------+ 5409A000 +------------------------+
55 | Stack/heap/cmdline | For use by the kernel real-mode code. 55 | Command line |
56 | Stack/heap | For use by the kernel real-mode code.
56098000 +------------------------+ 57098000 +------------------------+
57 | Kernel setup | The kernel real-mode code. 58 | Kernel setup | The kernel real-mode code.
58090200 +------------------------+ 59090200 +------------------------+
@@ -73,10 +74,9 @@ zImage kernels, typically looks like:
73When using bzImage, the protected-mode kernel was relocated to 74When using bzImage, the protected-mode kernel was relocated to
740x100000 ("high memory"), and the kernel real-mode block (boot sector, 750x100000 ("high memory"), and the kernel real-mode block (boot sector,
75setup, and stack/heap) was made relocatable to any address between 76setup, and stack/heap) was made relocatable to any address between
760x10000 and end of low memory. Unfortunately, in protocols 2.00 and 770x10000 and end of low memory. Unfortunately, in protocols 2.00 and
772.01 the command line is still required to live in the 0x9XXXX memory 782.01 the 0x90000+ memory range is still used internally by the kernel;
78range, and that memory range is still overwritten by the early kernel. 79the 2.02 protocol resolves that problem.
79The 2.02 protocol resolves that problem.
80 80
81It is desirable to keep the "memory ceiling" -- the highest point in 81It is desirable to keep the "memory ceiling" -- the highest point in
82low memory touched by the boot loader -- as low as possible, since 82low memory touched by the boot loader -- as low as possible, since
@@ -93,6 +93,35 @@ zImage or old bzImage kernels, which need data written into the
930x90000 segment, the boot loader should make sure not to use memory 930x90000 segment, the boot loader should make sure not to use memory
94above the 0x9A000 point; too many BIOSes will break above that point. 94above the 0x9A000 point; too many BIOSes will break above that point.
95 95
96For a modern bzImage kernel with boot protocol version >= 2.02, a
97memory layout like the following is suggested:
98
99 ~ ~
100 | Protected-mode kernel |
101100000 +------------------------+
102 | I/O memory hole |
1030A0000 +------------------------+
104 | Reserved for BIOS | Leave as much as possible unused
105 ~ ~
106 | Command line | (Can also be below the X+10000 mark)
107X+10000 +------------------------+
108 | Stack/heap | For use by the kernel real-mode code.
109X+08000 +------------------------+
110 | Kernel setup | The kernel real-mode code.
111 | Kernel boot sector | The kernel legacy boot sector.
112X +------------------------+
113 | Boot loader | <- Boot sector entry point 0000:7C00
114001000 +------------------------+
115 | Reserved for MBR/BIOS |
116000800 +------------------------+
117 | Typically used by MBR |
118000600 +------------------------+
119 | BIOS use only |
120000000 +------------------------+
121
122... where the address X is as low as the design of the boot loader
123permits.
124
96 125
97**** THE REAL-MODE KERNEL HEADER 126**** THE REAL-MODE KERNEL HEADER
98 127
@@ -160,29 +189,147 @@ e.g. protocol version 2.01 will contain 0x0201 in this field. When
160setting fields in the header, you must make sure only to set fields 189setting fields in the header, you must make sure only to set fields
161supported by the protocol version in use. 190supported by the protocol version in use.
162 191
163The "kernel_version" field, if set to a nonzero value, contains a 192
164pointer to a null-terminated human-readable kernel version number 193**** DETAILS OF HEADER FIELDS
165string, less 0x200. This can be used to display the kernel version to 194
166the user. This value should be less than (0x200*setup_sects). For 195For each field, some are information from the kernel to the bootloader
167example, if this value is set to 0x1c00, the kernel version number 196("read"), some are expected to be filled out by the bootloader
168string can be found at offset 0x1e00 in the kernel file. This is a 197("write"), and some are expected to be read and modified by the
169valid value if and only if the "setup_sects" field contains the value 198bootloader ("modify").
17014 or higher. 199
171 200All general purpose boot loaders should write the fields marked
172Most boot loaders will simply load the kernel at its target address 201(obligatory). Boot loaders who want to load the kernel at a
173directly. Such boot loaders do not need to worry about filling in 202nonstandard address should fill in the fields marked (reloc); other
174most of the fields in the header. The following fields should be 203boot loaders can ignore those fields.
175filled out, however: 204
176 205The byte order of all fields is littleendian (this is x86, after all.)
177 vid_mode: 206
178 Please see the section on SPECIAL COMMAND LINE OPTIONS. 207Field name: setup_secs
179 208Type: read
180 type_of_loader: 209Offset/size: 0x1f1/1
181 If your boot loader has an assigned id (see table below), enter 210Protocol: ALL
182 0xTV here, where T is an identifier for the boot loader and V is 211
183 a version number. Otherwise, enter 0xFF here. 212 The size of the setup code in 512-byte sectors. If this field is
184 213 0, the real value is 4. The real-mode code consists of the boot
185 Assigned boot loader ids: 214 sector (always one 512-byte sector) plus the setup code.
215
216Field name: root_flags
217Type: modify (optional)
218Offset/size: 0x1f2/2
219Protocol: ALL
220
221 If this field is nonzero, the root defaults to readonly. The use of
222 this field is deprecated; use the "ro" or "rw" options on the
223 command line instead.
224
225Field name: syssize
226Type: read
227Offset/size: 0x1f4/4 (protocol 2.04+) 0x1f4/2 (protocol ALL)
228Protocol: 2.04+
229
230 The size of the protected-mode code in units of 16-byte paragraphs.
231 For protocol versions older than 2.04 this field is only two bytes
232 wide, and therefore cannot be trusted for the size of a kernel if
233 the LOAD_HIGH flag is set.
234
235Field name: ram_size
236Type: kernel internal
237Offset/size: 0x1f8/2
238Protocol: ALL
239
240 This field is obsolete.
241
242Field name: vid_mode
243Type: modify (obligatory)
244Offset/size: 0x1fa/2
245
246 Please see the section on SPECIAL COMMAND LINE OPTIONS.
247
248Field name: root_dev
249Type: modify (optional)
250Offset/size: 0x1fc/2
251Protocol: ALL
252
253 The default root device device number. The use of this field is
254 deprecated, use the "root=" option on the command line instead.
255
256Field name: boot_flag
257Type: read
258Offset/size: 0x1fe/2
259Protocol: ALL
260
261 Contains 0xAA55. This is the closest thing old Linux kernels have
262 to a magic number.
263
264Field name: jump
265Type: read
266Offset/size: 0x200/2
267Protocol: 2.00+
268
269 Contains an x86 jump instruction, 0xEB followed by a signed offset
270 relative to byte 0x202. This can be used to determine the size of
271 the header.
272
273Field name: header
274Type: read
275Offset/size: 0x202/4
276Protocol: 2.00+
277
278 Contains the magic number "HdrS" (0x53726448).
279
280Field name: version
281Type: read
282Offset/size: 0x206/2
283Protocol: 2.00+
284
285 Contains the boot protocol version, in (major << 8)+minor format,
286 e.g. 0x0204 for version 2.04, and 0x0a11 for a hypothetical version
287 10.17.
288
289Field name: readmode_swtch
290Type: modify (optional)
291Offset/size: 0x208/4
292Protocol: 2.00+
293
294 Boot loader hook (see ADVANCED BOOT LOADER HOOKS below.)
295
296Field name: start_sys
297Type: read
298Offset/size: 0x20c/4
299Protocol: 2.00+
300
301 The load low segment (0x1000). Obsolete.
302
303Field name: kernel_version
304Type: read
305Offset/size: 0x20e/2
306Protocol: 2.00+
307
308 If set to a nonzero value, contains a pointer to a NUL-terminated
309 human-readable kernel version number string, less 0x200. This can
310 be used to display the kernel version to the user. This value
311 should be less than (0x200*setup_sects).
312
313 For example, if this value is set to 0x1c00, the kernel version
314 number string can be found at offset 0x1e00 in the kernel file.
315 This is a valid value if and only if the "setup_sects" field
316 contains the value 15 or higher, as:
317
318 0x1c00 < 15*0x200 (= 0x1e00) but
319 0x1c00 >= 14*0x200 (= 0x1c00)
320
321 0x1c00 >> 9 = 14, so the minimum value for setup_secs is 15.
322
323Field name: type_of_loader
324Type: write (obligatory)
325Offset/size: 0x210/1
326Protocol: 2.00+
327
328 If your boot loader has an assigned id (see table below), enter
329 0xTV here, where T is an identifier for the boot loader and V is
330 a version number. Otherwise, enter 0xFF here.
331
332 Assigned boot loader ids:
186 0 LILO (0x00 reserved for pre-2.00 bootloader) 333 0 LILO (0x00 reserved for pre-2.00 bootloader)
187 1 Loadlin 334 1 Loadlin
188 2 bootsect-loader (0x20, all other values reserved) 335 2 bootsect-loader (0x20, all other values reserved)
@@ -193,60 +340,145 @@ filled out, however:
193 8 U-BOOT 340 8 U-BOOT
194 9 Xen 341 9 Xen
195 A Gujin 342 A Gujin
343 B Qemu
344
345 Please contact <hpa@zytor.com> if you need a bootloader ID
346 value assigned.
347
348Field name: loadflags
349Type: modify (obligatory)
350Offset/size: 0x211/1
351Protocol: 2.00+
352
353 This field is a bitmask.
354
355 Bit 0 (read): LOADED_HIGH
356 - If 0, the protected-mode code is loaded at 0x10000.
357 - If 1, the protected-mode code is loaded at 0x100000.
358
359 Bit 7 (write): CAN_USE_HEAP
360 Set this bit to 1 to indicate that the value entered in the
361 heap_end_ptr is valid. If this field is clear, some setup code
362 functionality will be disabled.
363
364Field name: setup_move_size
365Type: modify (obligatory)
366Offset/size: 0x212/2
367Protocol: 2.00-2.01
368
369 When using protocol 2.00 or 2.01, if the real mode kernel is not
370 loaded at 0x90000, it gets moved there later in the loading
371 sequence. Fill in this field if you want additional data (such as
372 the kernel command line) moved in addition to the real-mode kernel
373 itself.
374
375 The unit is bytes starting with the beginning of the boot sector.
376
377 This field is can be ignored when the protocol is 2.02 or higher, or
378 if the real-mode code is loaded at 0x90000.
379
380Field name: code32_start
381Type: modify (optional, reloc)
382Offset/size: 0x214/4
383Protocol: 2.00+
384
385 The address to jump to in protected mode. This defaults to the load
386 address of the kernel, and can be used by the boot loader to
387 determine the proper load address.
388
389 This field can be modified for two purposes:
390
391 1. as a boot loader hook (see ADVANCED BOOT LOADER HOOKS below.)
392
393 2. if a bootloader which does not install a hook loads a
394 relocatable kernel at a nonstandard address it will have to modify
395 this field to point to the load address.
396
397Field name: ramdisk_image
398Type: write (obligatory)
399Offset/size: 0x218/4
400Protocol: 2.00+
401
402 The 32-bit linear address of the initial ramdisk or ramfs. Leave at
403 zero if there is no initial ramdisk/ramfs.
404
405Field name: ramdisk_size
406Type: write (obligatory)
407Offset/size: 0x21c/4
408Protocol: 2.00+
409
410 Size of the initial ramdisk or ramfs. Leave at zero if there is no
411 initial ramdisk/ramfs.
412
413Field name: bootsect_kludge
414Type: kernel internal
415Offset/size: 0x220/4
416Protocol: 2.00+
417
418 This field is obsolete.
419
420Field name: heap_end_ptr
421Type: write (obligatory)
422Offset/size: 0x224/2
423Protocol: 2.01+
424
425 Set this field to the offset (from the beginning of the real-mode
426 code) of the end of the setup stack/heap, minus 0x0200.
427
428Field name: cmd_line_ptr
429Type: write (obligatory)
430Offset/size: 0x228/4
431Protocol: 2.02+
432
433 Set this field to the linear address of the kernel command line.
434 The kernel command line can be located anywhere between the end of
435 the setup heap and 0xA0000; it does not have to be located in the
436 same 64K segment as the real-mode code itself.
437
438 Fill in this field even if your boot loader does not support a
439 command line, in which case you can point this to an empty string
440 (or better yet, to the string "auto".) If this field is left at
441 zero, the kernel will assume that your boot loader does not support
442 the 2.02+ protocol.
443
444Field name: initrd_addr_max
445Type: read
446Offset/size: 0x22c/4
447Protocol: 2.03+
448
449 The maximum address that may be occupied by the initial
450 ramdisk/ramfs contents. For boot protocols 2.02 or earlier, this
451 field is not present, and the maximum address is 0x37FFFFFF. (This
452 address is defined as the address of the highest safe byte, so if
453 your ramdisk is exactly 131072 bytes long and this field is
454 0x37FFFFFF, you can start your ramdisk at 0x37FE0000.)
455
456Field name: kernel_alignment
457Type: read (reloc)
458Offset/size: 0x230/4
459Protocol: 2.05+
460
461 Alignment unit required by the kernel (if relocatable_kernel is true.)
462
463Field name: relocatable_kernel
464Type: read (reloc)
465Offset/size: 0x234/1
466Protocol: 2.05+
467
468 If this field is nonzero, the protected-mode part of the kernel can
469 be loaded at any address that satisfies the kernel_alignment field.
470 After loading, the boot loader must set the code32_start field to
471 point to the loaded code, or to a boot loader hook.
472
473Field name: cmdline_size
474Type: read
475Offset/size: 0x238/4
476Protocol: 2.06+
196 477
197 Please contact <hpa@zytor.com> if you need a bootloader ID 478 The maximum size of the command line without the terminating
198 value assigned. 479 zero. This means that the command line can contain at most
199 480 cmdline_size characters. With protocol version 2.05 and earlier, the
200 loadflags, heap_end_ptr: 481 maximum size was 255.
201 If the protocol version is 2.01 or higher, enter the
202 offset limit of the setup heap into heap_end_ptr and set the
203 0x80 bit (CAN_USE_HEAP) of loadflags. heap_end_ptr appears to
204 be relative to the start of setup (offset 0x0200).
205
206 setup_move_size:
207 When using protocol 2.00 or 2.01, if the real mode
208 kernel is not loaded at 0x90000, it gets moved there later in
209 the loading sequence. Fill in this field if you want
210 additional data (such as the kernel command line) moved in
211 addition to the real-mode kernel itself.
212
213 The unit is bytes starting with the beginning of the boot
214 sector.
215
216 ramdisk_image, ramdisk_size:
217 If your boot loader has loaded an initial ramdisk (initrd),
218 set ramdisk_image to the 32-bit pointer to the ramdisk data
219 and the ramdisk_size to the size of the ramdisk data.
220
221 The initrd should typically be located as high in memory as
222 possible, as it may otherwise get overwritten by the early
223 kernel initialization sequence. However, it must never be
224 located above the address specified in the initrd_addr_max
225 field. The initrd should be at least 4K page aligned.
226
227 cmd_line_ptr:
228 If the protocol version is 2.02 or higher, this is a 32-bit
229 pointer to the kernel command line. The kernel command line
230 can be located anywhere between the end of setup and 0xA0000.
231 Fill in this field even if your boot loader does not support a
232 command line, in which case you can point this to an empty
233 string (or better yet, to the string "auto".) If this field
234 is left at zero, the kernel will assume that your boot loader
235 does not support the 2.02+ protocol.
236
237 ramdisk_max:
238 The maximum address that may be occupied by the initrd
239 contents. For boot protocols 2.02 or earlier, this field is
240 not present, and the maximum address is 0x37FFFFFF. (This
241 address is defined as the address of the highest safe byte, so
242 if your ramdisk is exactly 131072 bytes long and this field is
243 0x37FFFFFF, you can start your ramdisk at 0x37FE0000.)
244
245 cmdline_size:
246 The maximum size of the command line without the terminating
247 zero. This means that the command line can contain at most
248 cmdline_size characters. With protocol version 2.05 and
249 earlier, the maximum size was 255.
250 482
251 483
252**** THE KERNEL COMMAND LINE 484**** THE KERNEL COMMAND LINE
@@ -494,7 +726,7 @@ switched off, especially if the loaded kernel has the floppy driver as
494a demand-loaded module! 726a demand-loaded module!
495 727
496 728
497**** ADVANCED BOOT TIME HOOKS 729**** ADVANCED BOOT LOADER HOOKS
498 730
499If the boot loader runs in a particularly hostile environment (such as 731If the boot loader runs in a particularly hostile environment (such as
500LOADLIN, which runs under DOS) it may be impossible to follow the 732LOADLIN, which runs under DOS) it may be impossible to follow the
@@ -519,4 +751,5 @@ IMPORTANT: All the hooks are required to preserve %esp, %ebp, %esi and
519 set them up to BOOT_DS (0x18) yourself. 751 set them up to BOOT_DS (0x18) yourself.
520 752
521 After completing your hook, you should jump to the address 753 After completing your hook, you should jump to the address
522 that was in this field before your boot loader overwrote it. 754 that was in this field before your boot loader overwrote it
755 (relocated, if appropriate.)
diff --git a/Documentation/initrd.txt b/Documentation/initrd.txt
index 15f1b35deb34..d3dc505104da 100644
--- a/Documentation/initrd.txt
+++ b/Documentation/initrd.txt
@@ -27,16 +27,20 @@ When using initrd, the system typically boots as follows:
27 1) the boot loader loads the kernel and the initial RAM disk 27 1) the boot loader loads the kernel and the initial RAM disk
28 2) the kernel converts initrd into a "normal" RAM disk and 28 2) the kernel converts initrd into a "normal" RAM disk and
29 frees the memory used by initrd 29 frees the memory used by initrd
30 3) initrd is mounted read-write as root 30 3) if the root device is not /dev/ram0, the old (deprecated)
31 4) /linuxrc is executed (this can be any valid executable, including 31 change_root procedure is followed. see the "Obsolete root change
32 mechanism" section below.
33 4) root device is mounted. if it is /dev/ram0, the initrd image is
34 then mounted as root
35 5) /sbin/init is executed (this can be any valid executable, including
32 shell scripts; it is run with uid 0 and can do basically everything 36 shell scripts; it is run with uid 0 and can do basically everything
33 init can do) 37 init can do).
34 5) linuxrc mounts the "real" root file system 38 6) init mounts the "real" root file system
35 6) linuxrc places the root file system at the root directory using the 39 7) init places the root file system at the root directory using the
36 pivot_root system call 40 pivot_root system call
37 7) the usual boot sequence (e.g. invocation of /sbin/init) is performed 41 8) init execs the /sbin/init on the new root filesystem, performing
38 on the root file system 42 the usual boot sequence
39 8) the initrd file system is removed 43 9) the initrd file system is removed
40 44
41Note that changing the root directory does not involve unmounting it. 45Note that changing the root directory does not involve unmounting it.
42It is therefore possible to leave processes running on initrd during that 46It is therefore possible to leave processes running on initrd during that
@@ -70,7 +74,7 @@ initrd adds the following new options:
70 root=/dev/ram0 74 root=/dev/ram0
71 75
72 initrd is mounted as root, and the normal boot procedure is followed, 76 initrd is mounted as root, and the normal boot procedure is followed,
73 with the RAM disk still mounted as root. 77 with the RAM disk mounted as root.
74 78
75Compressed cpio images 79Compressed cpio images
76---------------------- 80----------------------
@@ -137,11 +141,11 @@ We'll describe the loopback device method:
137 # mkdir /mnt/dev 141 # mkdir /mnt/dev
138 # mknod /mnt/dev/console c 5 1 142 # mknod /mnt/dev/console c 5 1
139 5) copy all the files that are needed to properly use the initrd 143 5) copy all the files that are needed to properly use the initrd
140 environment. Don't forget the most important file, /linuxrc 144 environment. Don't forget the most important file, /sbin/init
141 Note that /linuxrc's permissions must include "x" (execute). 145 Note that /sbin/init's permissions must include "x" (execute).
142 6) correct operation the initrd environment can frequently be tested 146 6) correct operation the initrd environment can frequently be tested
143 even without rebooting with the command 147 even without rebooting with the command
144 # chroot /mnt /linuxrc 148 # chroot /mnt /sbin/init
145 This is of course limited to initrds that do not interfere with the 149 This is of course limited to initrds that do not interfere with the
146 general system state (e.g. by reconfiguring network interfaces, 150 general system state (e.g. by reconfiguring network interfaces,
147 overwriting mounted devices, trying to start already running demons, 151 overwriting mounted devices, trying to start already running demons,
@@ -154,7 +158,7 @@ We'll describe the loopback device method:
154 # gzip -9 initrd 158 # gzip -9 initrd
155 159
156For experimenting with initrd, you may want to take a rescue floppy and 160For experimenting with initrd, you may want to take a rescue floppy and
157only add a symbolic link from /linuxrc to /bin/sh. Alternatively, you 161only add a symbolic link from /sbin/init to /bin/sh. Alternatively, you
158can try the experimental newlib environment [2] to create a small 162can try the experimental newlib environment [2] to create a small
159initrd. 163initrd.
160 164
@@ -163,15 +167,14 @@ boot loaders support initrd. Since the boot process is still compatible
163with an older mechanism, the following boot command line parameters 167with an older mechanism, the following boot command line parameters
164have to be given: 168have to be given:
165 169
166 root=/dev/ram0 init=/linuxrc rw 170 root=/dev/ram0 rw
167 171
168(rw is only necessary if writing to the initrd file system.) 172(rw is only necessary if writing to the initrd file system.)
169 173
170With LOADLIN, you simply execute 174With LOADLIN, you simply execute
171 175
172 LOADLIN <kernel> initrd=<disk_image> 176 LOADLIN <kernel> initrd=<disk_image>
173e.g. LOADLIN C:\LINUX\BZIMAGE initrd=C:\LINUX\INITRD.GZ root=/dev/ram0 177e.g. LOADLIN C:\LINUX\BZIMAGE initrd=C:\LINUX\INITRD.GZ root=/dev/ram0 rw
174 init=/linuxrc rw
175 178
176With LILO, you add the option INITRD=<path> to either the global section 179With LILO, you add the option INITRD=<path> to either the global section
177or to the section of the respective kernel in /etc/lilo.conf, and pass 180or to the section of the respective kernel in /etc/lilo.conf, and pass
@@ -179,7 +182,7 @@ the options using APPEND, e.g.
179 182
180 image = /bzImage 183 image = /bzImage
181 initrd = /boot/initrd.gz 184 initrd = /boot/initrd.gz
182 append = "root=/dev/ram0 init=/linuxrc rw" 185 append = "root=/dev/ram0 rw"
183 186
184and run /sbin/lilo 187and run /sbin/lilo
185 188
@@ -191,7 +194,7 @@ Now you can boot and enjoy using initrd.
191Changing the root device 194Changing the root device
192------------------------ 195------------------------
193 196
194When finished with its duties, linuxrc typically changes the root device 197When finished with its duties, init typically changes the root device
195and proceeds with starting the Linux system on the "real" root device. 198and proceeds with starting the Linux system on the "real" root device.
196 199
197The procedure involves the following steps: 200The procedure involves the following steps:
@@ -217,7 +220,7 @@ must exist before calling pivot_root. Example:
217# mkdir initrd 220# mkdir initrd
218# pivot_root . initrd 221# pivot_root . initrd
219 222
220Now, the linuxrc process may still access the old root via its 223Now, the init process may still access the old root via its
221executable, shared libraries, standard input/output/error, and its 224executable, shared libraries, standard input/output/error, and its
222current root directory. All these references are dropped by the 225current root directory. All these references are dropped by the
223following command: 226following command:
@@ -249,10 +252,6 @@ disk can be freed:
249It is also possible to use initrd with an NFS-mounted root, see the 252It is also possible to use initrd with an NFS-mounted root, see the
250pivot_root(8) man page for details. 253pivot_root(8) man page for details.
251 254
252Note: if linuxrc or any program exec'ed from it terminates for some
253reason, the old change_root mechanism is invoked (see section "Obsolete
254root change mechanism").
255
256 255
257Usage scenarios 256Usage scenarios
258--------------- 257---------------
@@ -264,15 +263,15 @@ as follows:
264 1) system boots from floppy or other media with a minimal kernel 263 1) system boots from floppy or other media with a minimal kernel
265 (e.g. support for RAM disks, initrd, a.out, and the Ext2 FS) and 264 (e.g. support for RAM disks, initrd, a.out, and the Ext2 FS) and
266 loads initrd 265 loads initrd
267 2) /linuxrc determines what is needed to (1) mount the "real" root FS 266 2) /sbin/init determines what is needed to (1) mount the "real" root FS
268 (i.e. device type, device drivers, file system) and (2) the 267 (i.e. device type, device drivers, file system) and (2) the
269 distribution media (e.g. CD-ROM, network, tape, ...). This can be 268 distribution media (e.g. CD-ROM, network, tape, ...). This can be
270 done by asking the user, by auto-probing, or by using a hybrid 269 done by asking the user, by auto-probing, or by using a hybrid
271 approach. 270 approach.
272 3) /linuxrc loads the necessary kernel modules 271 3) /sbin/init loads the necessary kernel modules
273 4) /linuxrc creates and populates the root file system (this doesn't 272 4) /sbin/init creates and populates the root file system (this doesn't
274 have to be a very usable system yet) 273 have to be a very usable system yet)
275 5) /linuxrc invokes pivot_root to change the root file system and 274 5) /sbin/init invokes pivot_root to change the root file system and
276 execs - via chroot - a program that continues the installation 275 execs - via chroot - a program that continues the installation
277 6) the boot loader is installed 276 6) the boot loader is installed
278 7) the boot loader is configured to load an initrd with the set of 277 7) the boot loader is configured to load an initrd with the set of
@@ -291,7 +290,7 @@ different hardware configurations in a single administrative domain. In
291such cases, it is desirable to generate only a small set of kernels 290such cases, it is desirable to generate only a small set of kernels
292(ideally only one) and to keep the system-specific part of configuration 291(ideally only one) and to keep the system-specific part of configuration
293information as small as possible. In this case, a common initrd could be 292information as small as possible. In this case, a common initrd could be
294generated with all the necessary modules. Then, only /linuxrc or a file 293generated with all the necessary modules. Then, only /sbin/init or a file
295read by it would have to be different. 294read by it would have to be different.
296 295
297A third scenario are more convenient recovery disks, because information 296A third scenario are more convenient recovery disks, because information
@@ -337,6 +336,25 @@ This old, deprecated mechanism is commonly called "change_root", while
337the new, supported mechanism is called "pivot_root". 336the new, supported mechanism is called "pivot_root".
338 337
339 338
339Mixed change_root and pivot_root mechanism
340------------------------------------------
341
342In case you did not want to use root=/dev/ram0 to trig the pivot_root mechanism,
343you may create both /linuxrc and /sbin/init in your initrd image.
344
345/linuxrc would contain only the following:
346
347#! /bin/sh
348mount -n -t proc proc /proc
349echo 0x0100 >/proc/sys/kernel/real-root-dev
350umount -n /proc
351
352Once linuxrc exited, the kernel would mount again your initrd as root,
353this time executing /sbin/init. Again, it would be duty of this init
354to build the right environment (maybe using the root= device passed on
355the cmdline) before the final execution of the real /sbin/init.
356
357
340Resources 358Resources
341--------- 359---------
342 360
diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt
index 09220a1e22d9..aae2282600ca 100644
--- a/Documentation/kernel-parameters.txt
+++ b/Documentation/kernel-parameters.txt
@@ -396,6 +396,26 @@ and is between 256 and 4096 characters. It is defined in the file
396 clocksource is not available, it defaults to PIT. 396 clocksource is not available, it defaults to PIT.
397 Format: { pit | tsc | cyclone | pmtmr } 397 Format: { pit | tsc | cyclone | pmtmr }
398 398
399 clocksource= [GENERIC_TIME] Override the default clocksource
400 Format: <string>
401 Override the default clocksource and use the clocksource
402 with the name specified.
403 Some clocksource names to choose from, depending on
404 the platform:
405 [all] jiffies (this is the base, fallback clocksource)
406 [ACPI] acpi_pm
407 [ARM] imx_timer1,OSTS,netx_timer,mpu_timer2,
408 pxa_timer,timer3,32k_counter,timer0_1
409 [AVR32] avr32
410 [IA-32] pit,hpet,tsc,vmi-timer;
411 scx200_hrt on Geode; cyclone on IBM x440
412 [MIPS] MIPS
413 [PARISC] cr16
414 [S390] tod
415 [SH] SuperH
416 [SPARC64] tick
417 [X86-64] hpet,tsc
418
399 code_bytes [IA32] How many bytes of object code to print in an 419 code_bytes [IA32] How many bytes of object code to print in an
400 oops report. 420 oops report.
401 Range: 0 - 8192 421 Range: 0 - 8192
@@ -1807,10 +1827,6 @@ and is between 256 and 4096 characters. It is defined in the file
1807 1827
1808 time Show timing data prefixed to each printk message line 1828 time Show timing data prefixed to each printk message line
1809 1829
1810 clocksource= [GENERIC_TIME] Override the default clocksource
1811 Override the default clocksource and use the clocksource
1812 with the name specified.
1813
1814 tipar.timeout= [HW,PPT] 1830 tipar.timeout= [HW,PPT]
1815 Set communications timeout in tenths of a second 1831 Set communications timeout in tenths of a second
1816 (default 15). 1832 (default 15).
diff --git a/Documentation/ldm.txt b/Documentation/ldm.txt
index e266e11c19a3..718085bc9f1a 100644
--- a/Documentation/ldm.txt
+++ b/Documentation/ldm.txt
@@ -2,10 +2,13 @@
2 LDM - Logical Disk Manager (Dynamic Disks) 2 LDM - Logical Disk Manager (Dynamic Disks)
3 ------------------------------------------ 3 ------------------------------------------
4 4
5Originally Written by FlatCap - Richard Russon <ldm@flatcap.org>.
6Last Updated by Anton Altaparmakov on 30 March 2007 for Windows Vista.
7
5Overview 8Overview
6-------- 9--------
7 10
8Windows 2000 and XP use a new partitioning scheme. It is a complete 11Windows 2000, XP, and Vista use a new partitioning scheme. It is a complete
9replacement for the MSDOS style partitions. It stores its information in a 12replacement for the MSDOS style partitions. It stores its information in a
101MiB journalled database at the end of the physical disk. The size of 131MiB journalled database at the end of the physical disk. The size of
11partitions is limited only by disk space. The maximum number of partitions is 14partitions is limited only by disk space. The maximum number of partitions is
@@ -23,7 +26,11 @@ Once the LDM driver has divided up the disk, you can use the MD driver to
23assemble any multi-partition volumes, e.g. Stripes, RAID5. 26assemble any multi-partition volumes, e.g. Stripes, RAID5.
24 27
25To prevent legacy applications from repartitioning the disk, the LDM creates a 28To prevent legacy applications from repartitioning the disk, the LDM creates a
26dummy MSDOS partition containing one disk-sized partition. 29dummy MSDOS partition containing one disk-sized partition. This is what is
30supported with the Linux LDM driver.
31
32A newer approach that has been implemented with Vista is to put LDM on top of a
33GPT label disk. This is not supported by the Linux LDM driver yet.
27 34
28 35
29Example 36Example
@@ -88,13 +95,13 @@ and cannot boot from a Dynamic Disk.
88More Documentation 95More Documentation
89------------------ 96------------------
90 97
91There is an Overview of the LDM online together with complete Technical 98There is an Overview of the LDM together with complete Technical Documentation.
92Documentation. It can also be downloaded in html. 99It is available for download.
93 100
94 http://linux-ntfs.sourceforge.net/ldm/index.html 101 http://www.linux-ntfs.org/content/view/19/37/
95 http://linux-ntfs.sourceforge.net/downloads.html
96 102
97If you have any LDM questions that aren't answered on the website, email me. 103If you have any LDM questions that aren't answered in the documentation, email
104me.
98 105
99Cheers, 106Cheers,
100 FlatCap - Richard Russon 107 FlatCap - Richard Russon
diff --git a/Documentation/memory-barriers.txt b/Documentation/memory-barriers.txt
index 58408dd023c7..650657c54733 100644
--- a/Documentation/memory-barriers.txt
+++ b/Documentation/memory-barriers.txt
@@ -24,7 +24,7 @@ Contents:
24 (*) Explicit kernel barriers. 24 (*) Explicit kernel barriers.
25 25
26 - Compiler barrier. 26 - Compiler barrier.
27 - The CPU memory barriers. 27 - CPU memory barriers.
28 - MMIO write barrier. 28 - MMIO write barrier.
29 29
30 (*) Implicit kernel memory barriers. 30 (*) Implicit kernel memory barriers.
@@ -265,7 +265,7 @@ Memory barriers are such interventions. They impose a perceived partial
265ordering over the memory operations on either side of the barrier. 265ordering over the memory operations on either side of the barrier.
266 266
267Such enforcement is important because the CPUs and other devices in a system 267Such enforcement is important because the CPUs and other devices in a system
268can use a variety of tricks to improve performance - including reordering, 268can use a variety of tricks to improve performance, including reordering,
269deferral and combination of memory operations; speculative loads; speculative 269deferral and combination of memory operations; speculative loads; speculative
270branch prediction and various types of caching. Memory barriers are used to 270branch prediction and various types of caching. Memory barriers are used to
271override or suppress these tricks, allowing the code to sanely control the 271override or suppress these tricks, allowing the code to sanely control the
@@ -457,7 +457,7 @@ sequence, Q must be either &A or &B, and that:
457 (Q == &A) implies (D == 1) 457 (Q == &A) implies (D == 1)
458 (Q == &B) implies (D == 4) 458 (Q == &B) implies (D == 4)
459 459
460But! CPU 2's perception of P may be updated _before_ its perception of B, thus 460But! CPU 2's perception of P may be updated _before_ its perception of B, thus
461leading to the following situation: 461leading to the following situation:
462 462
463 (Q == &B) and (D == 2) ???? 463 (Q == &B) and (D == 2) ????
@@ -573,7 +573,7 @@ Basically, the read barrier always has to be there, even though it can be of
573the "weaker" type. 573the "weaker" type.
574 574
575[!] Note that the stores before the write barrier would normally be expected to 575[!] Note that the stores before the write barrier would normally be expected to
576match the loads after the read barrier or data dependency barrier, and vice 576match the loads after the read barrier or the data dependency barrier, and vice
577versa: 577versa:
578 578
579 CPU 1 CPU 2 579 CPU 1 CPU 2
@@ -588,7 +588,7 @@ versa:
588EXAMPLES OF MEMORY BARRIER SEQUENCES 588EXAMPLES OF MEMORY BARRIER SEQUENCES
589------------------------------------ 589------------------------------------
590 590
591Firstly, write barriers act as a partial orderings on store operations. 591Firstly, write barriers act as partial orderings on store operations.
592Consider the following sequence of events: 592Consider the following sequence of events:
593 593
594 CPU 1 594 CPU 1
@@ -608,15 +608,15 @@ STORE B, STORE C } all occurring before the unordered set of { STORE D, STORE E
608 +-------+ : : 608 +-------+ : :
609 | | +------+ 609 | | +------+
610 | |------>| C=3 | } /\ 610 | |------>| C=3 | } /\
611 | | : +------+ }----- \ -----> Events perceptible 611 | | : +------+ }----- \ -----> Events perceptible to
612 | | : | A=1 | } \/ to rest of system 612 | | : | A=1 | } \/ the rest of the system
613 | | : +------+ } 613 | | : +------+ }
614 | CPU 1 | : | B=2 | } 614 | CPU 1 | : | B=2 | }
615 | | +------+ } 615 | | +------+ }
616 | | wwwwwwwwwwwwwwww } <--- At this point the write barrier 616 | | wwwwwwwwwwwwwwww } <--- At this point the write barrier
617 | | +------+ } requires all stores prior to the 617 | | +------+ } requires all stores prior to the
618 | | : | E=5 | } barrier to be committed before 618 | | : | E=5 | } barrier to be committed before
619 | | : +------+ } further stores may be take place. 619 | | : +------+ } further stores may take place
620 | |------>| D=4 | } 620 | |------>| D=4 | }
621 | | +------+ 621 | | +------+
622 +-------+ : : 622 +-------+ : :
@@ -626,7 +626,7 @@ STORE B, STORE C } all occurring before the unordered set of { STORE D, STORE E
626 V 626 V
627 627
628 628
629Secondly, data dependency barriers act as a partial orderings on data-dependent 629Secondly, data dependency barriers act as partial orderings on data-dependent
630loads. Consider the following sequence of events: 630loads. Consider the following sequence of events:
631 631
632 CPU 1 CPU 2 632 CPU 1 CPU 2
@@ -975,7 +975,7 @@ compiler from moving the memory accesses either side of it to the other side:
975 975
976 barrier(); 976 barrier();
977 977
978This a general barrier - lesser varieties of compiler barrier do not exist. 978This is a general barrier - lesser varieties of compiler barrier do not exist.
979 979
980The compiler barrier has no direct effect on the CPU, which may then reorder 980The compiler barrier has no direct effect on the CPU, which may then reorder
981things however it wishes. 981things however it wishes.
@@ -997,7 +997,7 @@ The Linux kernel has eight basic CPU memory barriers:
997All CPU memory barriers unconditionally imply compiler barriers. 997All CPU memory barriers unconditionally imply compiler barriers.
998 998
999SMP memory barriers are reduced to compiler barriers on uniprocessor compiled 999SMP memory barriers are reduced to compiler barriers on uniprocessor compiled
1000systems because it is assumed that a CPU will be appear to be self-consistent, 1000systems because it is assumed that a CPU will appear to be self-consistent,
1001and will order overlapping accesses correctly with respect to itself. 1001and will order overlapping accesses correctly with respect to itself.
1002 1002
1003[!] Note that SMP memory barriers _must_ be used to control the ordering of 1003[!] Note that SMP memory barriers _must_ be used to control the ordering of
@@ -1146,9 +1146,9 @@ for each construct. These operations all imply certain barriers:
1146Therefore, from (1), (2) and (4) an UNLOCK followed by an unconditional LOCK is 1146Therefore, from (1), (2) and (4) an UNLOCK followed by an unconditional LOCK is
1147equivalent to a full barrier, but a LOCK followed by an UNLOCK is not. 1147equivalent to a full barrier, but a LOCK followed by an UNLOCK is not.
1148 1148
1149[!] Note: one of the consequence of LOCKs and UNLOCKs being only one-way 1149[!] Note: one of the consequences of LOCKs and UNLOCKs being only one-way
1150 barriers is that the effects instructions outside of a critical section may 1150 barriers is that the effects of instructions outside of a critical section
1151 seep into the inside of the critical section. 1151 may seep into the inside of the critical section.
1152 1152
1153A LOCK followed by an UNLOCK may not be assumed to be full memory barrier 1153A LOCK followed by an UNLOCK may not be assumed to be full memory barrier
1154because it is possible for an access preceding the LOCK to happen after the 1154because it is possible for an access preceding the LOCK to happen after the
@@ -1239,7 +1239,7 @@ three CPUs; then should the following sequence of events occur:
1239 UNLOCK M UNLOCK Q 1239 UNLOCK M UNLOCK Q
1240 *D = d; *H = h; 1240 *D = d; *H = h;
1241 1241
1242Then there is no guarantee as to what order CPU #3 will see the accesses to *A 1242Then there is no guarantee as to what order CPU 3 will see the accesses to *A
1243through *H occur in, other than the constraints imposed by the separate locks 1243through *H occur in, other than the constraints imposed by the separate locks
1244on the separate CPUs. It might, for example, see: 1244on the separate CPUs. It might, for example, see:
1245 1245
@@ -1269,12 +1269,12 @@ However, if the following occurs:
1269 UNLOCK M [2] 1269 UNLOCK M [2]
1270 *H = h; 1270 *H = h;
1271 1271
1272CPU #3 might see: 1272CPU 3 might see:
1273 1273
1274 *E, LOCK M [1], *C, *B, *A, UNLOCK M [1], 1274 *E, LOCK M [1], *C, *B, *A, UNLOCK M [1],
1275 LOCK M [2], *H, *F, *G, UNLOCK M [2], *D 1275 LOCK M [2], *H, *F, *G, UNLOCK M [2], *D
1276 1276
1277But assuming CPU #1 gets the lock first, it won't see any of: 1277But assuming CPU 1 gets the lock first, CPU 3 won't see any of:
1278 1278
1279 *B, *C, *D, *F, *G or *H preceding LOCK M [1] 1279 *B, *C, *D, *F, *G or *H preceding LOCK M [1]
1280 *A, *B or *C following UNLOCK M [1] 1280 *A, *B or *C following UNLOCK M [1]
@@ -1327,12 +1327,12 @@ spinlock, for example:
1327 mmiowb(); 1327 mmiowb();
1328 spin_unlock(Q); 1328 spin_unlock(Q);
1329 1329
1330this will ensure that the two stores issued on CPU #1 appear at the PCI bridge 1330this will ensure that the two stores issued on CPU 1 appear at the PCI bridge
1331before either of the stores issued on CPU #2. 1331before either of the stores issued on CPU 2.
1332 1332
1333 1333
1334Furthermore, following a store by a load to the same device obviates the need 1334Furthermore, following a store by a load from the same device obviates the need
1335for an mmiowb(), because the load forces the store to complete before the load 1335for the mmiowb(), because the load forces the store to complete before the load
1336is performed: 1336is performed:
1337 1337
1338 CPU 1 CPU 2 1338 CPU 1 CPU 2
@@ -1363,7 +1363,7 @@ circumstances in which reordering definitely _could_ be a problem:
1363 1363
1364 (*) Atomic operations. 1364 (*) Atomic operations.
1365 1365
1366 (*) Accessing devices (I/O). 1366 (*) Accessing devices.
1367 1367
1368 (*) Interrupts. 1368 (*) Interrupts.
1369 1369
@@ -1399,7 +1399,7 @@ To wake up a particular waiter, the up_read() or up_write() functions have to:
1399 (1) read the next pointer from this waiter's record to know as to where the 1399 (1) read the next pointer from this waiter's record to know as to where the
1400 next waiter record is; 1400 next waiter record is;
1401 1401
1402 (4) read the pointer to the waiter's task structure; 1402 (2) read the pointer to the waiter's task structure;
1403 1403
1404 (3) clear the task pointer to tell the waiter it has been given the semaphore; 1404 (3) clear the task pointer to tell the waiter it has been given the semaphore;
1405 1405
@@ -1407,7 +1407,7 @@ To wake up a particular waiter, the up_read() or up_write() functions have to:
1407 1407
1408 (5) release the reference held on the waiter's task struct. 1408 (5) release the reference held on the waiter's task struct.
1409 1409
1410In otherwords, it has to perform this sequence of events: 1410In other words, it has to perform this sequence of events:
1411 1411
1412 LOAD waiter->list.next; 1412 LOAD waiter->list.next;
1413 LOAD waiter->task; 1413 LOAD waiter->task;
@@ -1502,7 +1502,7 @@ operations and adjusting reference counters towards object destruction, and as
1502such the implicit memory barrier effects are necessary. 1502such the implicit memory barrier effects are necessary.
1503 1503
1504 1504
1505The following operation are potential problems as they do _not_ imply memory 1505The following operations are potential problems as they do _not_ imply memory
1506barriers, but might be used for implementing such things as UNLOCK-class 1506barriers, but might be used for implementing such things as UNLOCK-class
1507operations: 1507operations:
1508 1508
@@ -1517,7 +1517,7 @@ With these the appropriate explicit memory barrier should be used if necessary
1517 1517
1518The following also do _not_ imply memory barriers, and so may require explicit 1518The following also do _not_ imply memory barriers, and so may require explicit
1519memory barriers under some circumstances (smp_mb__before_atomic_dec() for 1519memory barriers under some circumstances (smp_mb__before_atomic_dec() for
1520instance)): 1520instance):
1521 1521
1522 atomic_add(); 1522 atomic_add();
1523 atomic_sub(); 1523 atomic_sub();
@@ -1641,8 +1641,8 @@ functions:
1641 indeed have special I/O space access cycles and instructions, but many 1641 indeed have special I/O space access cycles and instructions, but many
1642 CPUs don't have such a concept. 1642 CPUs don't have such a concept.
1643 1643
1644 The PCI bus, amongst others, defines an I/O space concept - which on such 1644 The PCI bus, amongst others, defines an I/O space concept which - on such
1645 CPUs as i386 and x86_64 cpus readily maps to the CPU's concept of I/O 1645 CPUs as i386 and x86_64 - readily maps to the CPU's concept of I/O
1646 space. However, it may also be mapped as a virtual I/O space in the CPU's 1646 space. However, it may also be mapped as a virtual I/O space in the CPU's
1647 memory map, particularly on those CPUs that don't support alternate I/O 1647 memory map, particularly on those CPUs that don't support alternate I/O
1648 spaces. 1648 spaces.
@@ -1664,7 +1664,7 @@ functions:
1664 i386 architecture machines, for example, this is controlled by way of the 1664 i386 architecture machines, for example, this is controlled by way of the
1665 MTRR registers. 1665 MTRR registers.
1666 1666
1667 Ordinarily, these will be guaranteed to be fully ordered and uncombined,, 1667 Ordinarily, these will be guaranteed to be fully ordered and uncombined,
1668 provided they're not accessing a prefetchable device. 1668 provided they're not accessing a prefetchable device.
1669 1669
1670 However, intermediary hardware (such as a PCI bridge) may indulge in 1670 However, intermediary hardware (such as a PCI bridge) may indulge in
@@ -1689,7 +1689,7 @@ functions:
1689 1689
1690 (*) ioreadX(), iowriteX() 1690 (*) ioreadX(), iowriteX()
1691 1691
1692 These will perform as appropriate for the type of access they're actually 1692 These will perform appropriately for the type of access they're actually
1693 doing, be it inX()/outX() or readX()/writeX(). 1693 doing, be it inX()/outX() or readX()/writeX().
1694 1694
1695 1695
@@ -1705,7 +1705,7 @@ of arch-specific code.
1705 1705
1706This means that it must be considered that the CPU will execute its instruction 1706This means that it must be considered that the CPU will execute its instruction
1707stream in any order it feels like - or even in parallel - provided that if an 1707stream in any order it feels like - or even in parallel - provided that if an
1708instruction in the stream depends on the an earlier instruction, then that 1708instruction in the stream depends on an earlier instruction, then that
1709earlier instruction must be sufficiently complete[*] before the later 1709earlier instruction must be sufficiently complete[*] before the later
1710instruction may proceed; in other words: provided that the appearance of 1710instruction may proceed; in other words: provided that the appearance of
1711causality is maintained. 1711causality is maintained.
@@ -1795,8 +1795,8 @@ eventually become visible on all CPUs, there's no guarantee that they will
1795become apparent in the same order on those other CPUs. 1795become apparent in the same order on those other CPUs.
1796 1796
1797 1797
1798Consider dealing with a system that has pair of CPUs (1 & 2), each of which has 1798Consider dealing with a system that has a pair of CPUs (1 & 2), each of which
1799a pair of parallel data caches (CPU 1 has A/B, and CPU 2 has C/D): 1799has a pair of parallel data caches (CPU 1 has A/B, and CPU 2 has C/D):
1800 1800
1801 : 1801 :
1802 : +--------+ 1802 : +--------+
@@ -1835,7 +1835,7 @@ Imagine the system has the following properties:
1835 1835
1836 (*) the coherency queue is not flushed by normal loads to lines already 1836 (*) the coherency queue is not flushed by normal loads to lines already
1837 present in the cache, even though the contents of the queue may 1837 present in the cache, even though the contents of the queue may
1838 potentially effect those loads. 1838 potentially affect those loads.
1839 1839
1840Imagine, then, that two writes are made on the first CPU, with a write barrier 1840Imagine, then, that two writes are made on the first CPU, with a write barrier
1841between them to guarantee that they will appear to reach that CPU's caches in 1841between them to guarantee that they will appear to reach that CPU's caches in
@@ -1845,7 +1845,7 @@ the requisite order:
1845 =============== =============== ======================================= 1845 =============== =============== =======================================
1846 u == 0, v == 1 and p == &u, q == &u 1846 u == 0, v == 1 and p == &u, q == &u
1847 v = 2; 1847 v = 2;
1848 smp_wmb(); Make sure change to v visible before 1848 smp_wmb(); Make sure change to v is visible before
1849 change to p 1849 change to p
1850 <A:modify v=2> v is now in cache A exclusively 1850 <A:modify v=2> v is now in cache A exclusively
1851 p = &v; 1851 p = &v;
@@ -1853,7 +1853,7 @@ the requisite order:
1853 1853
1854The write memory barrier forces the other CPUs in the system to perceive that 1854The write memory barrier forces the other CPUs in the system to perceive that
1855the local CPU's caches have apparently been updated in the correct order. But 1855the local CPU's caches have apparently been updated in the correct order. But
1856now imagine that the second CPU that wants to read those values: 1856now imagine that the second CPU wants to read those values:
1857 1857
1858 CPU 1 CPU 2 COMMENT 1858 CPU 1 CPU 2 COMMENT
1859 =============== =============== ======================================= 1859 =============== =============== =======================================
@@ -1861,7 +1861,7 @@ now imagine that the second CPU that wants to read those values:
1861 q = p; 1861 q = p;
1862 x = *q; 1862 x = *q;
1863 1863
1864The above pair of reads may then fail to happen in expected order, as the 1864The above pair of reads may then fail to happen in the expected order, as the
1865cacheline holding p may get updated in one of the second CPU's caches whilst 1865cacheline holding p may get updated in one of the second CPU's caches whilst
1866the update to the cacheline holding v is delayed in the other of the second 1866the update to the cacheline holding v is delayed in the other of the second
1867CPU's caches by some other cache event: 1867CPU's caches by some other cache event:
@@ -1916,7 +1916,7 @@ access depends on a read, not all do, so it may not be relied on.
1916 1916
1917Other CPUs may also have split caches, but must coordinate between the various 1917Other CPUs may also have split caches, but must coordinate between the various
1918cachelets for normal memory accesses. The semantics of the Alpha removes the 1918cachelets for normal memory accesses. The semantics of the Alpha removes the
1919need for coordination in absence of memory barriers. 1919need for coordination in the absence of memory barriers.
1920 1920
1921 1921
1922CACHE COHERENCY VS DMA 1922CACHE COHERENCY VS DMA
@@ -1931,10 +1931,10 @@ invalidate them as well).
1931 1931
1932In addition, the data DMA'd to RAM by a device may be overwritten by dirty 1932In addition, the data DMA'd to RAM by a device may be overwritten by dirty
1933cache lines being written back to RAM from a CPU's cache after the device has 1933cache lines being written back to RAM from a CPU's cache after the device has
1934installed its own data, or cache lines simply present in a CPUs cache may 1934installed its own data, or cache lines present in the CPU's cache may simply
1935simply obscure the fact that RAM has been updated, until at such time as the 1935obscure the fact that RAM has been updated, until at such time as the cacheline
1936cacheline is discarded from the CPU's cache and reloaded. To deal with this, 1936is discarded from the CPU's cache and reloaded. To deal with this, the
1937the appropriate part of the kernel must invalidate the overlapping bits of the 1937appropriate part of the kernel must invalidate the overlapping bits of the
1938cache on each CPU. 1938cache on each CPU.
1939 1939
1940See Documentation/cachetlb.txt for more information on cache management. 1940See Documentation/cachetlb.txt for more information on cache management.
@@ -1944,7 +1944,7 @@ CACHE COHERENCY VS MMIO
1944----------------------- 1944-----------------------
1945 1945
1946Memory mapped I/O usually takes place through memory locations that are part of 1946Memory mapped I/O usually takes place through memory locations that are part of
1947a window in the CPU's memory space that have different properties assigned than 1947a window in the CPU's memory space that has different properties assigned than
1948the usual RAM directed window. 1948the usual RAM directed window.
1949 1949
1950Amongst these properties is usually the fact that such accesses bypass the 1950Amongst these properties is usually the fact that such accesses bypass the
@@ -1960,7 +1960,7 @@ THE THINGS CPUS GET UP TO
1960========================= 1960=========================
1961 1961
1962A programmer might take it for granted that the CPU will perform memory 1962A programmer might take it for granted that the CPU will perform memory
1963operations in exactly the order specified, so that if a CPU is, for example, 1963operations in exactly the order specified, so that if the CPU is, for example,
1964given the following piece of code to execute: 1964given the following piece of code to execute:
1965 1965
1966 a = *A; 1966 a = *A;
@@ -1969,7 +1969,7 @@ given the following piece of code to execute:
1969 d = *D; 1969 d = *D;
1970 *E = e; 1970 *E = e;
1971 1971
1972They would then expect that the CPU will complete the memory operation for each 1972they would then expect that the CPU will complete the memory operation for each
1973instruction before moving on to the next one, leading to a definite sequence of 1973instruction before moving on to the next one, leading to a definite sequence of
1974operations as seen by external observers in the system: 1974operations as seen by external observers in the system:
1975 1975
@@ -1986,8 +1986,8 @@ assumption doesn't hold because:
1986 (*) loads may be done speculatively, and the result discarded should it prove 1986 (*) loads may be done speculatively, and the result discarded should it prove
1987 to have been unnecessary; 1987 to have been unnecessary;
1988 1988
1989 (*) loads may be done speculatively, leading to the result having being 1989 (*) loads may be done speculatively, leading to the result having been fetched
1990 fetched at the wrong time in the expected sequence of events; 1990 at the wrong time in the expected sequence of events;
1991 1991
1992 (*) the order of the memory accesses may be rearranged to promote better use 1992 (*) the order of the memory accesses may be rearranged to promote better use
1993 of the CPU buses and caches; 1993 of the CPU buses and caches;
@@ -2069,12 +2069,12 @@ AND THEN THERE'S THE ALPHA
2069 2069
2070The DEC Alpha CPU is one of the most relaxed CPUs there is. Not only that, 2070The DEC Alpha CPU is one of the most relaxed CPUs there is. Not only that,
2071some versions of the Alpha CPU have a split data cache, permitting them to have 2071some versions of the Alpha CPU have a split data cache, permitting them to have
2072two semantically related cache lines updating at separate times. This is where 2072two semantically-related cache lines updated at separate times. This is where
2073the data dependency barrier really becomes necessary as this synchronises both 2073the data dependency barrier really becomes necessary as this synchronises both
2074caches with the memory coherence system, thus making it seem like pointer 2074caches with the memory coherence system, thus making it seem like pointer
2075changes vs new data occur in the right order. 2075changes vs new data occur in the right order.
2076 2076
2077The Alpha defines the Linux's kernel's memory barrier model. 2077The Alpha defines the Linux kernel's memory barrier model.
2078 2078
2079See the subsection on "Cache Coherency" above. 2079See the subsection on "Cache Coherency" above.
2080 2080
diff --git a/Documentation/networking/netdevices.txt b/Documentation/networking/netdevices.txt
index 847cedb238f6..ce1361f95243 100644
--- a/Documentation/networking/netdevices.txt
+++ b/Documentation/networking/netdevices.txt
@@ -49,7 +49,7 @@ dev->hard_start_xmit:
49 for this and return -1 when the spin lock fails. 49 for this and return -1 when the spin lock fails.
50 The locking there should also properly protect against 50 The locking there should also properly protect against
51 set_multicast_list 51 set_multicast_list
52 Context: BHs disabled 52 Context: Process with BHs disabled or BH (timer).
53 Notes: netif_queue_stopped() is guaranteed false 53 Notes: netif_queue_stopped() is guaranteed false
54 Interrupts must be enabled when calling hard_start_xmit. 54 Interrupts must be enabled when calling hard_start_xmit.
55 (Interrupts must also be enabled when enabling the BH handler.) 55 (Interrupts must also be enabled when enabling the BH handler.)
diff --git a/Documentation/s390/cds.txt b/Documentation/s390/cds.txt
index 05a2b4f7e38f..58919d6a593a 100644
--- a/Documentation/s390/cds.txt
+++ b/Documentation/s390/cds.txt
@@ -51,13 +51,8 @@ The major changes are:
51* The interrupt handlers must be adapted to use a ccw_device as argument. 51* The interrupt handlers must be adapted to use a ccw_device as argument.
52 Moreover, they don't return a devstat, but an irb. 52 Moreover, they don't return a devstat, but an irb.
53* Before initiating an io, the options must be set via ccw_device_set_options(). 53* Before initiating an io, the options must be set via ccw_device_set_options().
54 54* Instead of calling read_dev_chars()/read_conf_data(), the driver issues
55read_dev_chars() 55 the channel program and handles the interrupt itself.
56 read device characteristics
57
58read_conf_data()
59read_conf_data_lpm()
60 read configuration data.
61 56
62ccw_device_get_ciw() 57ccw_device_get_ciw()
63 get commands from extended sense data. 58 get commands from extended sense data.
@@ -130,11 +125,6 @@ present their hardware status by the same (shared) IRQ, the operating system
130has to call every single device driver registered on this IRQ in order to 125has to call every single device driver registered on this IRQ in order to
131determine the device driver owning the device that raised the interrupt. 126determine the device driver owning the device that raised the interrupt.
132 127
133In order not to introduce a new I/O concept to the common Linux code,
134Linux/390 preserves the IRQ concept and semantically maps the ESA/390
135subchannels to Linux as IRQs. This allows Linux/390 to support up to 64k
136different IRQs, uniquely representing a single device each.
137
138Up to kernel 2.4, Linux/390 used to provide interfaces via the IRQ (subchannel). 128Up to kernel 2.4, Linux/390 used to provide interfaces via the IRQ (subchannel).
139For internal use of the common I/O layer, these are still there. However, 129For internal use of the common I/O layer, these are still there. However,
140device drivers should use the new calling interface via the ccw_device only. 130device drivers should use the new calling interface via the ccw_device only.
@@ -151,9 +141,8 @@ information during their initialization step to recognize the devices they
151support using the information saved in the struct ccw_device given to them. 141support using the information saved in the struct ccw_device given to them.
152This methods implies that Linux/390 doesn't require to probe for free (not 142This methods implies that Linux/390 doesn't require to probe for free (not
153armed) interrupt request lines (IRQs) to drive its devices with. Where 143armed) interrupt request lines (IRQs) to drive its devices with. Where
154applicable, the device drivers can use the read_dev_chars() to retrieve device 144applicable, the device drivers can use issue the READ DEVICE CHARACTERISTICS
155characteristics. This can be done without having to request device ownership 145ccw to retrieve device characteristics in its online routine.
156previously.
157 146
158In order to allow for easy I/O initiation the CDS layer provides a 147In order to allow for easy I/O initiation the CDS layer provides a
159ccw_device_start() interface that takes a device specific channel program (one 148ccw_device_start() interface that takes a device specific channel program (one
@@ -170,69 +159,6 @@ SUBCHANNEL (HSCH) command without having pending I/O requests. This function is
170also covered by ccw_device_halt(). 159also covered by ccw_device_halt().
171 160
172 161
173read_dev_chars() - Read Device Characteristics
174
175This routine returns the characteristics for the device specified.
176
177The function is meant to be called with the device already enabled; that is,
178at earliest during set_online() processing.
179
180The ccw_device must not be locked prior to calling read_dev_chars().
181
182The function may be called enabled or disabled.
183
184int read_dev_chars(struct ccw_device *cdev, void **buffer, int length );
185
186cdev - the ccw_device the information is requested for.
187buffer - pointer to a buffer pointer. The buffer pointer itself
188 must contain a valid buffer area.
189length - length of the buffer provided.
190
191The read_dev_chars() function returns :
192
193 0 - successful completion
194-ENODEV - cdev invalid
195-EINVAL - an invalid parameter was detected, or the function was called early.
196-EBUSY - an irrecoverable I/O error occurred or the device is not
197 operational.
198
199
200read_conf_data(), read_conf_data_lpm() - Read Configuration Data
201
202Retrieve the device dependent configuration data. Please have a look at your
203device dependent I/O commands for the device specific layout of the node
204descriptor elements. read_conf_data_lpm() will retrieve the configuration data
205for a specific path.
206
207The function is meant to be called with the device already enabled; that is,
208at earliest during set_online() processing.
209
210The function may be called enabled or disabled, but the device must not be
211locked
212
213int read_conf_data(struct ccw_device, void **buffer, int *length);
214int read_conf_data_lpm(struct ccw_device, void **buffer, int *length, __u8 lpm);
215
216cdev - the ccw_device the data is requested for.
217buffer - Pointer to a buffer pointer. The read_conf_data() routine
218 will allocate a buffer and initialize the buffer pointer
219 accordingly. It's the device driver's responsibility to
220 release the kernel memory if no longer needed.
221length - Length of the buffer allocated and retrieved.
222lpm - Logical path mask to be used for retrieving the data. If
223 zero the data is retrieved on the next path available.
224
225The read_conf_data() function returns :
226 0 - Successful completion
227-ENODEV - cdev invalid.
228-EINVAL - An invalid parameter was detected, or the function was called early.
229-EIO - An irrecoverable I/O error occurred or the device is
230 not operational.
231-ENOMEM - The read_conf_data() routine couldn't obtain storage.
232-EOPNOTSUPP - The device doesn't support the read configuration
233 data command.
234
235
236get_ciw() - get command information word 162get_ciw() - get command information word
237 163
238This call enables a device driver to get information about supported commands 164This call enables a device driver to get information about supported commands
diff --git a/Documentation/spi/spi-summary b/Documentation/spi/spi-summary
index 795fbb48ffa7..76ea6c837be5 100644
--- a/Documentation/spi/spi-summary
+++ b/Documentation/spi/spi-summary
@@ -1,26 +1,30 @@
1Overview of Linux kernel SPI support 1Overview of Linux kernel SPI support
2==================================== 2====================================
3 3
402-Dec-2005 421-May-2007
5 5
6What is SPI? 6What is SPI?
7------------ 7------------
8The "Serial Peripheral Interface" (SPI) is a synchronous four wire serial 8The "Serial Peripheral Interface" (SPI) is a synchronous four wire serial
9link used to connect microcontrollers to sensors, memory, and peripherals. 9link used to connect microcontrollers to sensors, memory, and peripherals.
10It's a simple "de facto" standard, not complicated enough to acquire a
11standardization body. SPI uses a master/slave configuration.
10 12
11The three signal wires hold a clock (SCK, often on the order of 10 MHz), 13The three signal wires hold a clock (SCK, often on the order of 10 MHz),
12and parallel data lines with "Master Out, Slave In" (MOSI) or "Master In, 14and parallel data lines with "Master Out, Slave In" (MOSI) or "Master In,
13Slave Out" (MISO) signals. (Other names are also used.) There are four 15Slave Out" (MISO) signals. (Other names are also used.) There are four
14clocking modes through which data is exchanged; mode-0 and mode-3 are most 16clocking modes through which data is exchanged; mode-0 and mode-3 are most
15commonly used. Each clock cycle shifts data out and data in; the clock 17commonly used. Each clock cycle shifts data out and data in; the clock
16doesn't cycle except when there is data to shift. 18doesn't cycle except when there is a data bit to shift. Not all data bits
19are used though; not every protocol uses those full duplex capabilities.
17 20
18SPI masters may use a "chip select" line to activate a given SPI slave 21SPI masters use a fourth "chip select" line to activate a given SPI slave
19device, so those three signal wires may be connected to several chips 22device, so those three signal wires may be connected to several chips
20in parallel. All SPI slaves support chipselects. Some devices have 23in parallel. All SPI slaves support chipselects; they are usually active
24low signals, labeled nCSx for slave 'x' (e.g. nCS0). Some devices have
21other signals, often including an interrupt to the master. 25other signals, often including an interrupt to the master.
22 26
23Unlike serial busses like USB or SMBUS, even low level protocols for 27Unlike serial busses like USB or SMBus, even low level protocols for
24SPI slave functions are usually not interoperable between vendors 28SPI slave functions are usually not interoperable between vendors
25(except for commodities like SPI memory chips). 29(except for commodities like SPI memory chips).
26 30
@@ -33,6 +37,11 @@ SPI slave functions are usually not interoperable between vendors
33 - Some devices may use eight bit words. Others may different word 37 - Some devices may use eight bit words. Others may different word
34 lengths, such as streams of 12-bit or 20-bit digital samples. 38 lengths, such as streams of 12-bit or 20-bit digital samples.
35 39
40 - Words are usually sent with their most significant bit (MSB) first,
41 but sometimes the least significant bit (LSB) goes first instead.
42
43 - Sometimes SPI is used to daisy-chain devices, like shift registers.
44
36In the same way, SPI slaves will only rarely support any kind of automatic 45In the same way, SPI slaves will only rarely support any kind of automatic
37discovery/enumeration protocol. The tree of slave devices accessible from 46discovery/enumeration protocol. The tree of slave devices accessible from
38a given SPI master will normally be set up manually, with configuration 47a given SPI master will normally be set up manually, with configuration
@@ -44,6 +53,14 @@ half-duplex SPI, for request/response protocols), SSP ("Synchronous
44Serial Protocol"), PSP ("Programmable Serial Protocol"), and other 53Serial Protocol"), PSP ("Programmable Serial Protocol"), and other
45related protocols. 54related protocols.
46 55
56Some chips eliminate a signal line by combining MOSI and MISO, and
57limiting themselves to half-duplex at the hardware level. In fact
58some SPI chips have this signal mode as a strapping option. These
59can be accessed using the same programming interface as SPI, but of
60course they won't handle full duplex transfers. You may find such
61chips described as using "three wire" signaling: SCK, data, nCSx.
62(That data line is sometimes called MOMI or SISO.)
63
47Microcontrollers often support both master and slave sides of the SPI 64Microcontrollers often support both master and slave sides of the SPI
48protocol. This document (and Linux) currently only supports the master 65protocol. This document (and Linux) currently only supports the master
49side of SPI interactions. 66side of SPI interactions.
@@ -74,6 +91,32 @@ interfaces with SPI modes. Given SPI support, they could use MMC or SD
74cards without needing a special purpose MMC/SD/SDIO controller. 91cards without needing a special purpose MMC/SD/SDIO controller.
75 92
76 93
94I'm confused. What are these four SPI "clock modes"?
95-----------------------------------------------------
96It's easy to be confused here, and the vendor documentation you'll
97find isn't necessarily helpful. The four modes combine two mode bits:
98
99 - CPOL indicates the initial clock polarity. CPOL=0 means the
100 clock starts low, so the first (leading) edge is rising, and
101 the second (trailing) edge is falling. CPOL=1 means the clock
102 starts high, so the first (leading) edge is falling.
103
104 - CPHA indicates the clock phase used to sample data; CPHA=0 says
105 sample on the leading edge, CPHA=1 means the trailing edge.
106
107 Since the signal needs to stablize before it's sampled, CPHA=0
108 implies that its data is written half a clock before the first
109 clock edge. The chipselect may have made it become available.
110
111Chip specs won't always say "uses SPI mode X" in as many words,
112but their timing diagrams will make the CPOL and CPHA modes clear.
113
114In the SPI mode number, CPOL is the high order bit and CPHA is the
115low order bit. So when a chip's timing diagram shows the clock
116starting low (CPOL=0) and data stabilized for sampling during the
117trailing clock edge (CPHA=1), that's SPI mode 1.
118
119
77How do these driver programming interfaces work? 120How do these driver programming interfaces work?
78------------------------------------------------ 121------------------------------------------------
79The <linux/spi/spi.h> header file includes kerneldoc, as does the 122The <linux/spi/spi.h> header file includes kerneldoc, as does the
diff --git a/Documentation/vm/slabinfo.c b/Documentation/vm/slabinfo.c
index 686a8e04a4f3..d4f21ffd1404 100644
--- a/Documentation/vm/slabinfo.c
+++ b/Documentation/vm/slabinfo.c
@@ -242,6 +242,9 @@ void decode_numa_list(int *numa, char *t)
242 242
243 memset(numa, 0, MAX_NODES * sizeof(int)); 243 memset(numa, 0, MAX_NODES * sizeof(int));
244 244
245 if (!t)
246 return;
247
245 while (*t == 'N') { 248 while (*t == 'N') {
246 t++; 249 t++;
247 node = strtoul(t, &t, 10); 250 node = strtoul(t, &t, 10);
@@ -259,11 +262,17 @@ void decode_numa_list(int *numa, char *t)
259 262
260void slab_validate(struct slabinfo *s) 263void slab_validate(struct slabinfo *s)
261{ 264{
265 if (strcmp(s->name, "*") == 0)
266 return;
267
262 set_obj(s, "validate", 1); 268 set_obj(s, "validate", 1);
263} 269}
264 270
265void slab_shrink(struct slabinfo *s) 271void slab_shrink(struct slabinfo *s)
266{ 272{
273 if (strcmp(s->name, "*") == 0)
274 return;
275
267 set_obj(s, "shrink", 1); 276 set_obj(s, "shrink", 1);
268} 277}
269 278
@@ -386,7 +395,9 @@ void report(struct slabinfo *s)
386{ 395{
387 if (strcmp(s->name, "*") == 0) 396 if (strcmp(s->name, "*") == 0)
388 return; 397 return;
389 printf("\nSlabcache: %-20s Aliases: %2d Order : %2d\n", s->name, s->aliases, s->order); 398
399 printf("\nSlabcache: %-20s Aliases: %2d Order : %2d Objects: %d\n",
400 s->name, s->aliases, s->order, s->objects);
390 if (s->hwcache_align) 401 if (s->hwcache_align)
391 printf("** Hardware cacheline aligned\n"); 402 printf("** Hardware cacheline aligned\n");
392 if (s->cache_dma) 403 if (s->cache_dma)
@@ -545,6 +556,9 @@ int slab_empty(struct slabinfo *s)
545 556
546void slab_debug(struct slabinfo *s) 557void slab_debug(struct slabinfo *s)
547{ 558{
559 if (strcmp(s->name, "*") == 0)
560 return;
561
548 if (sanity && !s->sanity_checks) { 562 if (sanity && !s->sanity_checks) {
549 set_obj(s, "sanity", 1); 563 set_obj(s, "sanity", 1);
550 } 564 }
@@ -791,11 +805,11 @@ void totals(void)
791 805
792 store_size(b1, total_size);store_size(b2, total_waste); 806 store_size(b1, total_size);store_size(b2, total_waste);
793 store_size(b3, total_waste * 100 / total_used); 807 store_size(b3, total_waste * 100 / total_used);
794 printf("Memory used: %6s # Loss : %6s MRatio: %6s%%\n", b1, b2, b3); 808 printf("Memory used: %6s # Loss : %6s MRatio:%6s%%\n", b1, b2, b3);
795 809
796 store_size(b1, total_objects);store_size(b2, total_partobj); 810 store_size(b1, total_objects);store_size(b2, total_partobj);
797 store_size(b3, total_partobj * 100 / total_objects); 811 store_size(b3, total_partobj * 100 / total_objects);
798 printf("# Objects : %6s # PartObj: %6s ORatio: %6s%%\n", b1, b2, b3); 812 printf("# Objects : %6s # PartObj: %6s ORatio:%6s%%\n", b1, b2, b3);
799 813
800 printf("\n"); 814 printf("\n");
801 printf("Per Cache Average Min Max Total\n"); 815 printf("Per Cache Average Min Max Total\n");
@@ -818,7 +832,7 @@ void totals(void)
818 store_size(b1, avg_ppart);store_size(b2, min_ppart); 832 store_size(b1, avg_ppart);store_size(b2, min_ppart);
819 store_size(b3, max_ppart); 833 store_size(b3, max_ppart);
820 store_size(b4, total_partial * 100 / total_slabs); 834 store_size(b4, total_partial * 100 / total_slabs);
821 printf("%%PartSlab %10s%% %10s%% %10s%% %10s%%\n", 835 printf("%%PartSlab%10s%% %10s%% %10s%% %10s%%\n",
822 b1, b2, b3, b4); 836 b1, b2, b3, b4);
823 837
824 store_size(b1, avg_partobj);store_size(b2, min_partobj); 838 store_size(b1, avg_partobj);store_size(b2, min_partobj);
@@ -830,7 +844,7 @@ void totals(void)
830 store_size(b1, avg_ppartobj);store_size(b2, min_ppartobj); 844 store_size(b1, avg_ppartobj);store_size(b2, min_ppartobj);
831 store_size(b3, max_ppartobj); 845 store_size(b3, max_ppartobj);
832 store_size(b4, total_partobj * 100 / total_objects); 846 store_size(b4, total_partobj * 100 / total_objects);
833 printf("%% PartObj %10s%% %10s%% %10s%% %10s%%\n", 847 printf("%% PartObj%10s%% %10s%% %10s%% %10s%%\n",
834 b1, b2, b3, b4); 848 b1, b2, b3, b4);
835 849
836 store_size(b1, avg_size);store_size(b2, min_size); 850 store_size(b1, avg_size);store_size(b2, min_size);
@@ -1100,6 +1114,8 @@ void output_slabs(void)
1100 ops(slab); 1114 ops(slab);
1101 else if (show_slab) 1115 else if (show_slab)
1102 slabcache(slab); 1116 slabcache(slab);
1117 else if (show_report)
1118 report(slab);
1103 } 1119 }
1104} 1120}
1105 1121