diff options
Diffstat (limited to 'Documentation')
-rw-r--r-- | Documentation/CodingStyle | 49 | ||||
-rw-r--r-- | Documentation/DocBook/gadget.tmpl | 2 | ||||
-rw-r--r-- | Documentation/DocBook/kernel-locking.tmpl | 123 | ||||
-rw-r--r-- | Documentation/DocBook/usb.tmpl | 28 | ||||
-rw-r--r-- | Documentation/HOWTO | 20 | ||||
-rw-r--r-- | Documentation/block/capability.txt | 15 | ||||
-rw-r--r-- | Documentation/dontdiff | 42 | ||||
-rw-r--r-- | Documentation/feature-removal-schedule.txt | 25 | ||||
-rw-r--r-- | Documentation/filesystems/directory-locking | 5 | ||||
-rw-r--r-- | Documentation/filesystems/porting | 8 | ||||
-rw-r--r-- | Documentation/gpio.txt | 8 | ||||
-rw-r--r-- | Documentation/i386/boot.txt | 401 | ||||
-rw-r--r-- | Documentation/initrd.txt | 74 | ||||
-rw-r--r-- | Documentation/kernel-parameters.txt | 24 | ||||
-rw-r--r-- | Documentation/ldm.txt | 21 | ||||
-rw-r--r-- | Documentation/memory-barriers.txt | 98 | ||||
-rw-r--r-- | Documentation/networking/netdevices.txt | 2 | ||||
-rw-r--r-- | Documentation/s390/cds.txt | 82 | ||||
-rw-r--r-- | Documentation/spi/spi-summary | 53 | ||||
-rw-r--r-- | Documentation/vm/slabinfo.c | 26 |
20 files changed, 724 insertions, 382 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 | |||
495 | remember: "indent" is not a fix for bad programming. | 495 | remember: "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 | ||
500 | For configuration options (arch/xxx/Kconfig, and all the Kconfig files), | 500 | For all of the Kconfig* configuration files throughout the source tree, |
501 | somewhat different indentation is used. | 501 | the indentation is somewhat different. Lines under a "config" definition |
502 | are indented with one tab, while help text is indented an additional two | ||
503 | spaces. Example: | ||
502 | 504 | ||
503 | Help text is indented with 2 spaces. | 505 | config AUDIT |
504 | 506 | bool "Auditing support" | |
505 | if 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 |
515 | endif | 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 | |||
514 | Features that might still be considered unstable should be defined as | ||
515 | dependent on "EXPERIMENTAL": | ||
516 | |||
517 | config SLUB | ||
518 | depends on EXPERIMENTAL && !ARCH_USES_SLAB_PAGE_STRUCT | ||
519 | bool "SLUB (Unqueued Allocator)" | ||
520 | ... | ||
521 | |||
522 | while seriously dangerous features (such as write support for certain | ||
523 | filesystems) should advertise this prominently in their prompt string: | ||
524 | |||
525 | config ADFS_FS_RW | ||
526 | bool "ADFS write support (DANGEROUS)" | ||
527 | depends on ADFS_FS | ||
528 | ... | ||
516 | 529 | ||
517 | Generally, CONFIG_EXPERIMENTAL should surround all options not considered | 530 | For full documentation on the configuration files, see the file |
518 | stable. All options that are known to trash data (experimental write- | 531 | Documentation/kbuild/kconfig-language.txt. |
519 | support for file-systems, for instance) should be denoted (DANGEROUS), other | ||
520 | experimental 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" |
58 | kernel mode | 58 | kernel 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><linux/usb/ch9.h></filename> you will find | 190 | <para>In <filename><linux/usb/ch9.h></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 | ||
399 | Managing bug reports | ||
400 | -------------------- | ||
401 | |||
402 | One of the best ways to put into practice your hacking skills is by fixing | ||
403 | bugs reported by other people. Not only you will help to make the kernel | ||
404 | more stable, you'll learn to fix real world problems and you will improve | ||
405 | your skills, and other developers will be aware of your presence. Fixing | ||
406 | bugs is one of the best ways to get merits among other developers, because | ||
407 | not many people like wasting time fixing other people's bugs. | ||
408 | |||
409 | To work in the already reported bug reports, go to http://bugzilla.kernel.org. | ||
410 | If you want to be advised of the future bug reports, you can subscribe to the | ||
411 | bugme-new mailing list (only new bug reports are mailed here) or to the | ||
412 | bugme-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 | |||
419 | Mailing lists | 399 | Mailing 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 @@ | |||
1 | Generic Block Device Capability | ||
2 | =============================================================================== | ||
3 | This file documents the sysfs file block/<disk>/capability | ||
4 | |||
5 | capability is a hex word indicating which capabilities a specific disk | ||
6 | supports. For more information on bits not listed here, see | ||
7 | include/linux/genhd.h | ||
8 | |||
9 | Capability Value | ||
10 | ------------------------------------------------------------------------------- | ||
11 | GENHD_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 |
37 | 53c700_d.h | 44 | 53c700_d.h |
45 | 53c7xx_d.h | ||
46 | 53c7xx_u.h | ||
38 | 53c8xx_d.h* | 47 | 53c8xx_d.h* |
39 | BitKeeper | 48 | BitKeeper |
40 | COPYING | 49 | COPYING |
@@ -70,9 +79,11 @@ bzImage* | |||
70 | classlist.h* | 79 | classlist.h* |
71 | comp*.log | 80 | comp*.log |
72 | compile.h* | 81 | compile.h* |
82 | conf | ||
73 | config | 83 | config |
74 | config-* | 84 | config-* |
75 | config_data.h* | 85 | config_data.h* |
86 | config_data.gz* | ||
76 | conmakehash | 87 | conmakehash |
77 | consolemap_deftbl.c* | 88 | consolemap_deftbl.c* |
78 | crc32table.h* | 89 | crc32table.h* |
@@ -81,18 +92,23 @@ defkeymap.c* | |||
81 | devlist.h* | 92 | devlist.h* |
82 | docproc | 93 | docproc |
83 | dummy_sym.c* | 94 | dummy_sym.c* |
95 | elf2ecoff | ||
84 | elfconfig.h* | 96 | elfconfig.h* |
85 | filelist | 97 | filelist |
86 | fixdep | 98 | fixdep |
87 | fore200e_mkfirm | 99 | fore200e_mkfirm |
88 | fore200e_pca_fw.c* | 100 | fore200e_pca_fw.c* |
101 | gconf | ||
89 | gen-devlist | 102 | gen-devlist |
90 | gen-kdb_cmds.c* | 103 | gen-kdb_cmds.c* |
91 | gen_crc32table | 104 | gen_crc32table |
92 | gen_init_cpio | 105 | gen_init_cpio |
93 | genksyms | 106 | genksyms |
94 | gentbl | 107 | gentbl |
108 | *_gray256.c | ||
95 | ikconfig.h* | 109 | ikconfig.h* |
110 | initramfs_data.cpio | ||
111 | initramfs_data.cpio.gz | ||
96 | initramfs_list | 112 | initramfs_list |
97 | kallsyms | 113 | kallsyms |
98 | kconfig | 114 | kconfig |
@@ -100,19 +116,30 @@ kconfig.tk | |||
100 | keywords.c* | 116 | keywords.c* |
101 | ksym.c* | 117 | ksym.c* |
102 | ksym.h* | 118 | ksym.h* |
119 | kxgettext | ||
120 | lkc_defs.h | ||
103 | lex.c* | 121 | lex.c* |
122 | lex.*.c | ||
123 | lk201-map.c | ||
104 | logo_*.c | 124 | logo_*.c |
105 | logo_*_clut224.c | 125 | logo_*_clut224.c |
106 | logo_*_mono.c | 126 | logo_*_mono.c |
107 | lxdialog | 127 | lxdialog |
108 | mach-types | 128 | mach-types |
109 | mach-types.h | 129 | mach-types.h |
130 | machtypes.h | ||
110 | make_times_h | 131 | make_times_h |
111 | map | 132 | map |
112 | maui_boot.h | 133 | maui_boot.h |
134 | mconf | ||
135 | miboot* | ||
113 | mk_elfconfig | 136 | mk_elfconfig |
137 | mkboot | ||
138 | mkbugboot | ||
114 | mkdep | 139 | mkdep |
140 | mkprep | ||
115 | mktables | 141 | mktables |
142 | mktree | ||
116 | modpost | 143 | modpost |
117 | modversions.h* | 144 | modversions.h* |
118 | offset.h | 145 | offset.h |
@@ -120,18 +147,28 @@ offsets.h | |||
120 | oui.c* | 147 | oui.c* |
121 | parse.c* | 148 | parse.c* |
122 | parse.h* | 149 | parse.h* |
150 | patches* | ||
151 | pca200e.bin | ||
152 | pca200e_ecd.bin2 | ||
153 | piggy.gz | ||
154 | piggyback | ||
123 | pnmtologo | 155 | pnmtologo |
124 | ppc_defs.h* | 156 | ppc_defs.h* |
125 | promcon_tbl.c* | 157 | promcon_tbl.c* |
126 | pss_boot.h | 158 | pss_boot.h |
159 | qconf | ||
127 | raid6altivec*.c | 160 | raid6altivec*.c |
128 | raid6int*.c | 161 | raid6int*.c |
129 | raid6tables.c | 162 | raid6tables.c |
163 | relocs | ||
164 | series | ||
130 | setup | 165 | setup |
131 | sim710_d.h* | 166 | sim710_d.h* |
167 | sImage | ||
132 | sm_tbl* | 168 | sm_tbl* |
133 | split-include | 169 | split-include |
134 | tags | 170 | tags |
171 | tftpboot.img | ||
135 | times.h* | 172 | times.h* |
136 | tkparse | 173 | tkparse |
137 | trix_boot.h | 174 | trix_boot.h |
@@ -139,8 +176,11 @@ utsrelease.h* | |||
139 | version.h* | 176 | version.h* |
140 | vmlinux | 177 | vmlinux |
141 | vmlinux-* | 178 | vmlinux-* |
179 | vmlinux.aout | ||
142 | vmlinux.lds | 180 | vmlinux.lds |
143 | vsyscall.lds | 181 | vsyscall.lds |
144 | wanxlfw.inc | 182 | wanxlfw.inc |
145 | uImage | 183 | uImage |
146 | zImage | 184 | unifdef |
185 | zImage* | ||
186 | zconf.hash.c | ||
diff --git a/Documentation/feature-removal-schedule.txt b/Documentation/feature-removal-schedule.txt index adc84d521988..2d7ea85075ba 100644 --- a/Documentation/feature-removal-schedule.txt +++ b/Documentation/feature-removal-schedule.txt | |||
@@ -328,21 +328,20 @@ Who: Adrian Bunk <bunk@stusta.de> | |||
328 | 328 | ||
329 | --------------------------- | 329 | --------------------------- |
330 | 330 | ||
331 | What: libata.spindown_compat module parameter | 331 | What: libata spindown skipping and warning |
332 | When: Dec 2008 | 332 | When: Dec 2008 |
333 | Why: halt(8) synchronizes caches for and spins down libata disks | 333 | Why: 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. | ||
346 | Who: Tejun Heo <htejun@gmail.com> | 345 | Who: 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 |
2 | kinds of locks - per-inode (->i_sem) and per-filesystem (->s_vfs_rename_sem). | 2 | kinds 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. | |||
63 | attempt to acquire some lock and already holds at least one lock. Let's | 64 | attempt to acquire some lock and already holds at least one lock. Let's |
64 | consider the set of contended locks. First of all, filesystem lock is | 65 | consider the set of contended locks. First of all, filesystem lock is |
65 | not contended, since any process blocked on it is not holding any locks. | 66 | not contended, since any process blocked on it is not holding any locks. |
66 | Thus all processes are blocked on ->i_sem. | 67 | Thus 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 |
69 | creation can't be a part of deadlock - it can't be blocked on source | 70 | creation 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 |
111 | problems might be over... | 111 | problems 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 |
134 | watch for ->i_sem-grabbing code that might be used by your ->setattr(). | 134 | watch for ->i_mutex-grabbing code that might be used by your ->setattr(). |
135 | Callers of notify_change() need ->i_sem now. | 135 | Callers 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 | ||
112 | The return value is zero for success, else a negative errno. It should | 112 | The return value is zero for success, else a negative errno. It should |
113 | be checked, since the get/set calls don't have error returns and since | 113 | be checked, since the get/set calls don't have error returns and since |
114 | misconfiguration is possible. (These calls could sleep.) | 114 | misconfiguration is possible. You should normally issue these calls from |
115 | a task context. However, for spinlock-safe GPIOs it's OK to use them | ||
116 | before tasking is enabled, as part of early board setup. | ||
115 | 117 | ||
116 | For output GPIOs, the value provided becomes the initial output value. | 118 | For output GPIOs, the value provided becomes the initial output value. |
117 | This helps avoid signal glitching during system startup. | 119 | This helps avoid signal glitching during system startup. |
@@ -197,7 +199,9 @@ However, many platforms don't currently support this mechanism. | |||
197 | 199 | ||
198 | Passing invalid GPIO numbers to gpio_request() will fail, as will requesting | 200 | Passing invalid GPIO numbers to gpio_request() will fail, as will requesting |
199 | GPIOs that have already been claimed with that call. The return value of | 201 | GPIOs that have already been claimed with that call. The return value of |
200 | gpio_request() must be checked. (These calls could sleep.) | 202 | gpio_request() must be checked. You should normally issue these calls from |
203 | a task context. However, for spinlock-safe GPIOs it's OK to request GPIOs | ||
204 | before tasking is enabled, as part of early board setup. | ||
201 | 205 | ||
202 | These calls serve two basic purposes. One is marking the signals which | 206 | These calls serve two basic purposes. One is marking the signals which |
203 | are actually in use as GPIOs, for better diagnostics; systems may have | 207 | are 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 | ||
7 | On the i386 platform, the Linux kernel uses a rather complicated boot | 7 | On the i386 platform, the Linux kernel uses a rather complicated boot |
8 | convention. This has evolved partially due to historical aspects, as | 8 | convention. This has evolved partially due to historical aspects, as |
@@ -52,7 +52,8 @@ zImage kernels, typically looks like: | |||
52 | 0A0000 +------------------------+ | 52 | 0A0000 +------------------------+ |
53 | | Reserved for BIOS | Do not use. Reserved for BIOS EBDA. | 53 | | Reserved for BIOS | Do not use. Reserved for BIOS EBDA. |
54 | 09A000 +------------------------+ | 54 | 09A000 +------------------------+ |
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. | ||
56 | 098000 +------------------------+ | 57 | 098000 +------------------------+ |
57 | | Kernel setup | The kernel real-mode code. | 58 | | Kernel setup | The kernel real-mode code. |
58 | 090200 +------------------------+ | 59 | 090200 +------------------------+ |
@@ -73,10 +74,9 @@ zImage kernels, typically looks like: | |||
73 | When using bzImage, the protected-mode kernel was relocated to | 74 | When using bzImage, the protected-mode kernel was relocated to |
74 | 0x100000 ("high memory"), and the kernel real-mode block (boot sector, | 75 | 0x100000 ("high memory"), and the kernel real-mode block (boot sector, |
75 | setup, and stack/heap) was made relocatable to any address between | 76 | setup, and stack/heap) was made relocatable to any address between |
76 | 0x10000 and end of low memory. Unfortunately, in protocols 2.00 and | 77 | 0x10000 and end of low memory. Unfortunately, in protocols 2.00 and |
77 | 2.01 the command line is still required to live in the 0x9XXXX memory | 78 | 2.01 the 0x90000+ memory range is still used internally by the kernel; |
78 | range, and that memory range is still overwritten by the early kernel. | 79 | the 2.02 protocol resolves that problem. |
79 | The 2.02 protocol resolves that problem. | ||
80 | 80 | ||
81 | It is desirable to keep the "memory ceiling" -- the highest point in | 81 | It is desirable to keep the "memory ceiling" -- the highest point in |
82 | low memory touched by the boot loader -- as low as possible, since | 82 | low 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 | |||
93 | 0x90000 segment, the boot loader should make sure not to use memory | 93 | 0x90000 segment, the boot loader should make sure not to use memory |
94 | above the 0x9A000 point; too many BIOSes will break above that point. | 94 | above the 0x9A000 point; too many BIOSes will break above that point. |
95 | 95 | ||
96 | For a modern bzImage kernel with boot protocol version >= 2.02, a | ||
97 | memory layout like the following is suggested: | ||
98 | |||
99 | ~ ~ | ||
100 | | Protected-mode kernel | | ||
101 | 100000 +------------------------+ | ||
102 | | I/O memory hole | | ||
103 | 0A0000 +------------------------+ | ||
104 | | Reserved for BIOS | Leave as much as possible unused | ||
105 | ~ ~ | ||
106 | | Command line | (Can also be below the X+10000 mark) | ||
107 | X+10000 +------------------------+ | ||
108 | | Stack/heap | For use by the kernel real-mode code. | ||
109 | X+08000 +------------------------+ | ||
110 | | Kernel setup | The kernel real-mode code. | ||
111 | | Kernel boot sector | The kernel legacy boot sector. | ||
112 | X +------------------------+ | ||
113 | | Boot loader | <- Boot sector entry point 0000:7C00 | ||
114 | 001000 +------------------------+ | ||
115 | | Reserved for MBR/BIOS | | ||
116 | 000800 +------------------------+ | ||
117 | | Typically used by MBR | | ||
118 | 000600 +------------------------+ | ||
119 | | BIOS use only | | ||
120 | 000000 +------------------------+ | ||
121 | |||
122 | ... where the address X is as low as the design of the boot loader | ||
123 | permits. | ||
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 | |||
160 | setting fields in the header, you must make sure only to set fields | 189 | setting fields in the header, you must make sure only to set fields |
161 | supported by the protocol version in use. | 190 | supported by the protocol version in use. |
162 | 191 | ||
163 | The "kernel_version" field, if set to a nonzero value, contains a | 192 | |
164 | pointer to a null-terminated human-readable kernel version number | 193 | **** DETAILS OF HEADER FIELDS |
165 | string, less 0x200. This can be used to display the kernel version to | 194 | |
166 | the user. This value should be less than (0x200*setup_sects). For | 195 | For each field, some are information from the kernel to the bootloader |
167 | example, if this value is set to 0x1c00, the kernel version number | 196 | ("read"), some are expected to be filled out by the bootloader |
168 | string 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 |
169 | valid value if and only if the "setup_sects" field contains the value | 198 | bootloader ("modify"). |
170 | 14 or higher. | 199 | |
171 | 200 | All general purpose boot loaders should write the fields marked | |
172 | Most boot loaders will simply load the kernel at its target address | 201 | (obligatory). Boot loaders who want to load the kernel at a |
173 | directly. Such boot loaders do not need to worry about filling in | 202 | nonstandard address should fill in the fields marked (reloc); other |
174 | most of the fields in the header. The following fields should be | 203 | boot loaders can ignore those fields. |
175 | filled out, however: | 204 | |
176 | 205 | The 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. | 207 | Field name: setup_secs |
179 | 208 | Type: read | |
180 | type_of_loader: | 209 | Offset/size: 0x1f1/1 |
181 | If your boot loader has an assigned id (see table below), enter | 210 | Protocol: 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 | |||
216 | Field name: root_flags | ||
217 | Type: modify (optional) | ||
218 | Offset/size: 0x1f2/2 | ||
219 | Protocol: 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 | |||
225 | Field name: syssize | ||
226 | Type: read | ||
227 | Offset/size: 0x1f4/4 (protocol 2.04+) 0x1f4/2 (protocol ALL) | ||
228 | Protocol: 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 | |||
235 | Field name: ram_size | ||
236 | Type: kernel internal | ||
237 | Offset/size: 0x1f8/2 | ||
238 | Protocol: ALL | ||
239 | |||
240 | This field is obsolete. | ||
241 | |||
242 | Field name: vid_mode | ||
243 | Type: modify (obligatory) | ||
244 | Offset/size: 0x1fa/2 | ||
245 | |||
246 | Please see the section on SPECIAL COMMAND LINE OPTIONS. | ||
247 | |||
248 | Field name: root_dev | ||
249 | Type: modify (optional) | ||
250 | Offset/size: 0x1fc/2 | ||
251 | Protocol: 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 | |||
256 | Field name: boot_flag | ||
257 | Type: read | ||
258 | Offset/size: 0x1fe/2 | ||
259 | Protocol: ALL | ||
260 | |||
261 | Contains 0xAA55. This is the closest thing old Linux kernels have | ||
262 | to a magic number. | ||
263 | |||
264 | Field name: jump | ||
265 | Type: read | ||
266 | Offset/size: 0x200/2 | ||
267 | Protocol: 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 | |||
273 | Field name: header | ||
274 | Type: read | ||
275 | Offset/size: 0x202/4 | ||
276 | Protocol: 2.00+ | ||
277 | |||
278 | Contains the magic number "HdrS" (0x53726448). | ||
279 | |||
280 | Field name: version | ||
281 | Type: read | ||
282 | Offset/size: 0x206/2 | ||
283 | Protocol: 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 | |||
289 | Field name: readmode_swtch | ||
290 | Type: modify (optional) | ||
291 | Offset/size: 0x208/4 | ||
292 | Protocol: 2.00+ | ||
293 | |||
294 | Boot loader hook (see ADVANCED BOOT LOADER HOOKS below.) | ||
295 | |||
296 | Field name: start_sys | ||
297 | Type: read | ||
298 | Offset/size: 0x20c/4 | ||
299 | Protocol: 2.00+ | ||
300 | |||
301 | The load low segment (0x1000). Obsolete. | ||
302 | |||
303 | Field name: kernel_version | ||
304 | Type: read | ||
305 | Offset/size: 0x20e/2 | ||
306 | Protocol: 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 | |||
323 | Field name: type_of_loader | ||
324 | Type: write (obligatory) | ||
325 | Offset/size: 0x210/1 | ||
326 | Protocol: 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 | |||
348 | Field name: loadflags | ||
349 | Type: modify (obligatory) | ||
350 | Offset/size: 0x211/1 | ||
351 | Protocol: 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 | |||
364 | Field name: setup_move_size | ||
365 | Type: modify (obligatory) | ||
366 | Offset/size: 0x212/2 | ||
367 | Protocol: 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 | |||
380 | Field name: code32_start | ||
381 | Type: modify (optional, reloc) | ||
382 | Offset/size: 0x214/4 | ||
383 | Protocol: 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 | |||
397 | Field name: ramdisk_image | ||
398 | Type: write (obligatory) | ||
399 | Offset/size: 0x218/4 | ||
400 | Protocol: 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 | |||
405 | Field name: ramdisk_size | ||
406 | Type: write (obligatory) | ||
407 | Offset/size: 0x21c/4 | ||
408 | Protocol: 2.00+ | ||
409 | |||
410 | Size of the initial ramdisk or ramfs. Leave at zero if there is no | ||
411 | initial ramdisk/ramfs. | ||
412 | |||
413 | Field name: bootsect_kludge | ||
414 | Type: kernel internal | ||
415 | Offset/size: 0x220/4 | ||
416 | Protocol: 2.00+ | ||
417 | |||
418 | This field is obsolete. | ||
419 | |||
420 | Field name: heap_end_ptr | ||
421 | Type: write (obligatory) | ||
422 | Offset/size: 0x224/2 | ||
423 | Protocol: 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 | |||
428 | Field name: cmd_line_ptr | ||
429 | Type: write (obligatory) | ||
430 | Offset/size: 0x228/4 | ||
431 | Protocol: 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 | |||
444 | Field name: initrd_addr_max | ||
445 | Type: read | ||
446 | Offset/size: 0x22c/4 | ||
447 | Protocol: 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 | |||
456 | Field name: kernel_alignment | ||
457 | Type: read (reloc) | ||
458 | Offset/size: 0x230/4 | ||
459 | Protocol: 2.05+ | ||
460 | |||
461 | Alignment unit required by the kernel (if relocatable_kernel is true.) | ||
462 | |||
463 | Field name: relocatable_kernel | ||
464 | Type: read (reloc) | ||
465 | Offset/size: 0x234/1 | ||
466 | Protocol: 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 | |||
473 | Field name: cmdline_size | ||
474 | Type: read | ||
475 | Offset/size: 0x238/4 | ||
476 | Protocol: 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 | |||
494 | a demand-loaded module! | 726 | a demand-loaded module! |
495 | 727 | ||
496 | 728 | ||
497 | **** ADVANCED BOOT TIME HOOKS | 729 | **** ADVANCED BOOT LOADER HOOKS |
498 | 730 | ||
499 | If the boot loader runs in a particularly hostile environment (such as | 731 | If the boot loader runs in a particularly hostile environment (such as |
500 | LOADLIN, which runs under DOS) it may be impossible to follow the | 732 | LOADLIN, 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 | ||
41 | Note that changing the root directory does not involve unmounting it. | 45 | Note that changing the root directory does not involve unmounting it. |
42 | It is therefore possible to leave processes running on initrd during that | 46 | It 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 | ||
75 | Compressed cpio images | 79 | Compressed 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 | ||
156 | For experimenting with initrd, you may want to take a rescue floppy and | 160 | For experimenting with initrd, you may want to take a rescue floppy and |
157 | only add a symbolic link from /linuxrc to /bin/sh. Alternatively, you | 161 | only add a symbolic link from /sbin/init to /bin/sh. Alternatively, you |
158 | can try the experimental newlib environment [2] to create a small | 162 | can try the experimental newlib environment [2] to create a small |
159 | initrd. | 163 | initrd. |
160 | 164 | ||
@@ -163,15 +167,14 @@ boot loaders support initrd. Since the boot process is still compatible | |||
163 | with an older mechanism, the following boot command line parameters | 167 | with an older mechanism, the following boot command line parameters |
164 | have to be given: | 168 | have 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 | ||
170 | With LOADLIN, you simply execute | 174 | With LOADLIN, you simply execute |
171 | 175 | ||
172 | LOADLIN <kernel> initrd=<disk_image> | 176 | LOADLIN <kernel> initrd=<disk_image> |
173 | e.g. LOADLIN C:\LINUX\BZIMAGE initrd=C:\LINUX\INITRD.GZ root=/dev/ram0 | 177 | e.g. LOADLIN C:\LINUX\BZIMAGE initrd=C:\LINUX\INITRD.GZ root=/dev/ram0 rw |
174 | init=/linuxrc rw | ||
175 | 178 | ||
176 | With LILO, you add the option INITRD=<path> to either the global section | 179 | With LILO, you add the option INITRD=<path> to either the global section |
177 | or to the section of the respective kernel in /etc/lilo.conf, and pass | 180 | or 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 | ||
184 | and run /sbin/lilo | 187 | and run /sbin/lilo |
185 | 188 | ||
@@ -191,7 +194,7 @@ Now you can boot and enjoy using initrd. | |||
191 | Changing the root device | 194 | Changing the root device |
192 | ------------------------ | 195 | ------------------------ |
193 | 196 | ||
194 | When finished with its duties, linuxrc typically changes the root device | 197 | When finished with its duties, init typically changes the root device |
195 | and proceeds with starting the Linux system on the "real" root device. | 198 | and proceeds with starting the Linux system on the "real" root device. |
196 | 199 | ||
197 | The procedure involves the following steps: | 200 | The 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 | ||
220 | Now, the linuxrc process may still access the old root via its | 223 | Now, the init process may still access the old root via its |
221 | executable, shared libraries, standard input/output/error, and its | 224 | executable, shared libraries, standard input/output/error, and its |
222 | current root directory. All these references are dropped by the | 225 | current root directory. All these references are dropped by the |
223 | following command: | 226 | following command: |
@@ -249,10 +252,6 @@ disk can be freed: | |||
249 | It is also possible to use initrd with an NFS-mounted root, see the | 252 | It is also possible to use initrd with an NFS-mounted root, see the |
250 | pivot_root(8) man page for details. | 253 | pivot_root(8) man page for details. |
251 | 254 | ||
252 | Note: if linuxrc or any program exec'ed from it terminates for some | ||
253 | reason, the old change_root mechanism is invoked (see section "Obsolete | ||
254 | root change mechanism"). | ||
255 | |||
256 | 255 | ||
257 | Usage scenarios | 256 | Usage 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 | |||
291 | such cases, it is desirable to generate only a small set of kernels | 290 | such 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 |
293 | information as small as possible. In this case, a common initrd could be | 292 | information as small as possible. In this case, a common initrd could be |
294 | generated with all the necessary modules. Then, only /linuxrc or a file | 293 | generated with all the necessary modules. Then, only /sbin/init or a file |
295 | read by it would have to be different. | 294 | read by it would have to be different. |
296 | 295 | ||
297 | A third scenario are more convenient recovery disks, because information | 296 | A third scenario are more convenient recovery disks, because information |
@@ -337,6 +336,25 @@ This old, deprecated mechanism is commonly called "change_root", while | |||
337 | the new, supported mechanism is called "pivot_root". | 336 | the new, supported mechanism is called "pivot_root". |
338 | 337 | ||
339 | 338 | ||
339 | Mixed change_root and pivot_root mechanism | ||
340 | ------------------------------------------ | ||
341 | |||
342 | In case you did not want to use root=/dev/ram0 to trig the pivot_root mechanism, | ||
343 | you may create both /linuxrc and /sbin/init in your initrd image. | ||
344 | |||
345 | /linuxrc would contain only the following: | ||
346 | |||
347 | #! /bin/sh | ||
348 | mount -n -t proc proc /proc | ||
349 | echo 0x0100 >/proc/sys/kernel/real-root-dev | ||
350 | umount -n /proc | ||
351 | |||
352 | Once linuxrc exited, the kernel would mount again your initrd as root, | ||
353 | this time executing /sbin/init. Again, it would be duty of this init | ||
354 | to build the right environment (maybe using the root= device passed on | ||
355 | the cmdline) before the final execution of the real /sbin/init. | ||
356 | |||
357 | |||
340 | Resources | 358 | Resources |
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 | ||
5 | Originally Written by FlatCap - Richard Russon <ldm@flatcap.org>. | ||
6 | Last Updated by Anton Altaparmakov on 30 March 2007 for Windows Vista. | ||
7 | |||
5 | Overview | 8 | Overview |
6 | -------- | 9 | -------- |
7 | 10 | ||
8 | Windows 2000 and XP use a new partitioning scheme. It is a complete | 11 | Windows 2000, XP, and Vista use a new partitioning scheme. It is a complete |
9 | replacement for the MSDOS style partitions. It stores its information in a | 12 | replacement for the MSDOS style partitions. It stores its information in a |
10 | 1MiB journalled database at the end of the physical disk. The size of | 13 | 1MiB journalled database at the end of the physical disk. The size of |
11 | partitions is limited only by disk space. The maximum number of partitions is | 14 | partitions 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 | |||
23 | assemble any multi-partition volumes, e.g. Stripes, RAID5. | 26 | assemble any multi-partition volumes, e.g. Stripes, RAID5. |
24 | 27 | ||
25 | To prevent legacy applications from repartitioning the disk, the LDM creates a | 28 | To prevent legacy applications from repartitioning the disk, the LDM creates a |
26 | dummy MSDOS partition containing one disk-sized partition. | 29 | dummy MSDOS partition containing one disk-sized partition. This is what is |
30 | supported with the Linux LDM driver. | ||
31 | |||
32 | A newer approach that has been implemented with Vista is to put LDM on top of a | ||
33 | GPT label disk. This is not supported by the Linux LDM driver yet. | ||
27 | 34 | ||
28 | 35 | ||
29 | Example | 36 | Example |
@@ -88,13 +95,13 @@ and cannot boot from a Dynamic Disk. | |||
88 | More Documentation | 95 | More Documentation |
89 | ------------------ | 96 | ------------------ |
90 | 97 | ||
91 | There is an Overview of the LDM online together with complete Technical | 98 | There is an Overview of the LDM together with complete Technical Documentation. |
92 | Documentation. It can also be downloaded in html. | 99 | It 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 | ||
97 | If you have any LDM questions that aren't answered on the website, email me. | 103 | If you have any LDM questions that aren't answered in the documentation, email |
104 | me. | ||
98 | 105 | ||
99 | Cheers, | 106 | Cheers, |
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 | |||
265 | ordering over the memory operations on either side of the barrier. | 265 | ordering over the memory operations on either side of the barrier. |
266 | 266 | ||
267 | Such enforcement is important because the CPUs and other devices in a system | 267 | Such enforcement is important because the CPUs and other devices in a system |
268 | can use a variety of tricks to improve performance - including reordering, | 268 | can use a variety of tricks to improve performance, including reordering, |
269 | deferral and combination of memory operations; speculative loads; speculative | 269 | deferral and combination of memory operations; speculative loads; speculative |
270 | branch prediction and various types of caching. Memory barriers are used to | 270 | branch prediction and various types of caching. Memory barriers are used to |
271 | override or suppress these tricks, allowing the code to sanely control the | 271 | override 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 | ||
460 | But! CPU 2's perception of P may be updated _before_ its perception of B, thus | 460 | But! CPU 2's perception of P may be updated _before_ its perception of B, thus |
461 | leading to the following situation: | 461 | leading 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 | |||
573 | the "weaker" type. | 573 | the "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 |
576 | match the loads after the read barrier or data dependency barrier, and vice | 576 | match the loads after the read barrier or the data dependency barrier, and vice |
577 | versa: | 577 | versa: |
578 | 578 | ||
579 | CPU 1 CPU 2 | 579 | CPU 1 CPU 2 |
@@ -588,7 +588,7 @@ versa: | |||
588 | EXAMPLES OF MEMORY BARRIER SEQUENCES | 588 | EXAMPLES OF MEMORY BARRIER SEQUENCES |
589 | ------------------------------------ | 589 | ------------------------------------ |
590 | 590 | ||
591 | Firstly, write barriers act as a partial orderings on store operations. | 591 | Firstly, write barriers act as partial orderings on store operations. |
592 | Consider the following sequence of events: | 592 | Consider 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 | ||
629 | Secondly, data dependency barriers act as a partial orderings on data-dependent | 629 | Secondly, data dependency barriers act as partial orderings on data-dependent |
630 | loads. Consider the following sequence of events: | 630 | loads. 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 | ||
978 | This a general barrier - lesser varieties of compiler barrier do not exist. | 978 | This is a general barrier - lesser varieties of compiler barrier do not exist. |
979 | 979 | ||
980 | The compiler barrier has no direct effect on the CPU, which may then reorder | 980 | The compiler barrier has no direct effect on the CPU, which may then reorder |
981 | things however it wishes. | 981 | things however it wishes. |
@@ -997,7 +997,7 @@ The Linux kernel has eight basic CPU memory barriers: | |||
997 | All CPU memory barriers unconditionally imply compiler barriers. | 997 | All CPU memory barriers unconditionally imply compiler barriers. |
998 | 998 | ||
999 | SMP memory barriers are reduced to compiler barriers on uniprocessor compiled | 999 | SMP memory barriers are reduced to compiler barriers on uniprocessor compiled |
1000 | systems because it is assumed that a CPU will be appear to be self-consistent, | 1000 | systems because it is assumed that a CPU will appear to be self-consistent, |
1001 | and will order overlapping accesses correctly with respect to itself. | 1001 | and 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: | |||
1146 | Therefore, from (1), (2) and (4) an UNLOCK followed by an unconditional LOCK is | 1146 | Therefore, from (1), (2) and (4) an UNLOCK followed by an unconditional LOCK is |
1147 | equivalent to a full barrier, but a LOCK followed by an UNLOCK is not. | 1147 | equivalent 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 | ||
1153 | A LOCK followed by an UNLOCK may not be assumed to be full memory barrier | 1153 | A LOCK followed by an UNLOCK may not be assumed to be full memory barrier |
1154 | because it is possible for an access preceding the LOCK to happen after the | 1154 | because 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 | ||
1242 | Then there is no guarantee as to what order CPU #3 will see the accesses to *A | 1242 | Then there is no guarantee as to what order CPU 3 will see the accesses to *A |
1243 | through *H occur in, other than the constraints imposed by the separate locks | 1243 | through *H occur in, other than the constraints imposed by the separate locks |
1244 | on the separate CPUs. It might, for example, see: | 1244 | on 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 | ||
1272 | CPU #3 might see: | 1272 | CPU 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 | ||
1277 | But assuming CPU #1 gets the lock first, it won't see any of: | 1277 | But 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 | ||
1330 | this will ensure that the two stores issued on CPU #1 appear at the PCI bridge | 1330 | this will ensure that the two stores issued on CPU 1 appear at the PCI bridge |
1331 | before either of the stores issued on CPU #2. | 1331 | before either of the stores issued on CPU 2. |
1332 | 1332 | ||
1333 | 1333 | ||
1334 | Furthermore, following a store by a load to the same device obviates the need | 1334 | Furthermore, following a store by a load from the same device obviates the need |
1335 | for an mmiowb(), because the load forces the store to complete before the load | 1335 | for the mmiowb(), because the load forces the store to complete before the load |
1336 | is performed: | 1336 | is 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 | ||
1410 | In otherwords, it has to perform this sequence of events: | 1410 | In 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 | |||
1502 | such the implicit memory barrier effects are necessary. | 1502 | such the implicit memory barrier effects are necessary. |
1503 | 1503 | ||
1504 | 1504 | ||
1505 | The following operation are potential problems as they do _not_ imply memory | 1505 | The following operations are potential problems as they do _not_ imply memory |
1506 | barriers, but might be used for implementing such things as UNLOCK-class | 1506 | barriers, but might be used for implementing such things as UNLOCK-class |
1507 | operations: | 1507 | operations: |
1508 | 1508 | ||
@@ -1517,7 +1517,7 @@ With these the appropriate explicit memory barrier should be used if necessary | |||
1517 | 1517 | ||
1518 | The following also do _not_ imply memory barriers, and so may require explicit | 1518 | The following also do _not_ imply memory barriers, and so may require explicit |
1519 | memory barriers under some circumstances (smp_mb__before_atomic_dec() for | 1519 | memory barriers under some circumstances (smp_mb__before_atomic_dec() for |
1520 | instance)): | 1520 | instance): |
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 | ||
1706 | This means that it must be considered that the CPU will execute its instruction | 1706 | This means that it must be considered that the CPU will execute its instruction |
1707 | stream in any order it feels like - or even in parallel - provided that if an | 1707 | stream in any order it feels like - or even in parallel - provided that if an |
1708 | instruction in the stream depends on the an earlier instruction, then that | 1708 | instruction in the stream depends on an earlier instruction, then that |
1709 | earlier instruction must be sufficiently complete[*] before the later | 1709 | earlier instruction must be sufficiently complete[*] before the later |
1710 | instruction may proceed; in other words: provided that the appearance of | 1710 | instruction may proceed; in other words: provided that the appearance of |
1711 | causality is maintained. | 1711 | causality is maintained. |
@@ -1795,8 +1795,8 @@ eventually become visible on all CPUs, there's no guarantee that they will | |||
1795 | become apparent in the same order on those other CPUs. | 1795 | become apparent in the same order on those other CPUs. |
1796 | 1796 | ||
1797 | 1797 | ||
1798 | Consider dealing with a system that has pair of CPUs (1 & 2), each of which has | 1798 | Consider dealing with a system that has a pair of CPUs (1 & 2), each of which |
1799 | a pair of parallel data caches (CPU 1 has A/B, and CPU 2 has C/D): | 1799 | has 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 | ||
1840 | Imagine, then, that two writes are made on the first CPU, with a write barrier | 1840 | Imagine, then, that two writes are made on the first CPU, with a write barrier |
1841 | between them to guarantee that they will appear to reach that CPU's caches in | 1841 | between 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 | ||
1854 | The write memory barrier forces the other CPUs in the system to perceive that | 1854 | The write memory barrier forces the other CPUs in the system to perceive that |
1855 | the local CPU's caches have apparently been updated in the correct order. But | 1855 | the local CPU's caches have apparently been updated in the correct order. But |
1856 | now imagine that the second CPU that wants to read those values: | 1856 | now 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 | ||
1864 | The above pair of reads may then fail to happen in expected order, as the | 1864 | The above pair of reads may then fail to happen in the expected order, as the |
1865 | cacheline holding p may get updated in one of the second CPU's caches whilst | 1865 | cacheline holding p may get updated in one of the second CPU's caches whilst |
1866 | the update to the cacheline holding v is delayed in the other of the second | 1866 | the update to the cacheline holding v is delayed in the other of the second |
1867 | CPU's caches by some other cache event: | 1867 | CPU'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 | ||
1917 | Other CPUs may also have split caches, but must coordinate between the various | 1917 | Other CPUs may also have split caches, but must coordinate between the various |
1918 | cachelets for normal memory accesses. The semantics of the Alpha removes the | 1918 | cachelets for normal memory accesses. The semantics of the Alpha removes the |
1919 | need for coordination in absence of memory barriers. | 1919 | need for coordination in the absence of memory barriers. |
1920 | 1920 | ||
1921 | 1921 | ||
1922 | CACHE COHERENCY VS DMA | 1922 | CACHE COHERENCY VS DMA |
@@ -1931,10 +1931,10 @@ invalidate them as well). | |||
1931 | 1931 | ||
1932 | In addition, the data DMA'd to RAM by a device may be overwritten by dirty | 1932 | In addition, the data DMA'd to RAM by a device may be overwritten by dirty |
1933 | cache lines being written back to RAM from a CPU's cache after the device has | 1933 | cache lines being written back to RAM from a CPU's cache after the device has |
1934 | installed its own data, or cache lines simply present in a CPUs cache may | 1934 | installed its own data, or cache lines present in the CPU's cache may simply |
1935 | simply obscure the fact that RAM has been updated, until at such time as the | 1935 | obscure the fact that RAM has been updated, until at such time as the cacheline |
1936 | cacheline is discarded from the CPU's cache and reloaded. To deal with this, | 1936 | is discarded from the CPU's cache and reloaded. To deal with this, the |
1937 | the appropriate part of the kernel must invalidate the overlapping bits of the | 1937 | appropriate part of the kernel must invalidate the overlapping bits of the |
1938 | cache on each CPU. | 1938 | cache on each CPU. |
1939 | 1939 | ||
1940 | See Documentation/cachetlb.txt for more information on cache management. | 1940 | See Documentation/cachetlb.txt for more information on cache management. |
@@ -1944,7 +1944,7 @@ CACHE COHERENCY VS MMIO | |||
1944 | ----------------------- | 1944 | ----------------------- |
1945 | 1945 | ||
1946 | Memory mapped I/O usually takes place through memory locations that are part of | 1946 | Memory mapped I/O usually takes place through memory locations that are part of |
1947 | a window in the CPU's memory space that have different properties assigned than | 1947 | a window in the CPU's memory space that has different properties assigned than |
1948 | the usual RAM directed window. | 1948 | the usual RAM directed window. |
1949 | 1949 | ||
1950 | Amongst these properties is usually the fact that such accesses bypass the | 1950 | Amongst 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 | ||
1962 | A programmer might take it for granted that the CPU will perform memory | 1962 | A programmer might take it for granted that the CPU will perform memory |
1963 | operations in exactly the order specified, so that if a CPU is, for example, | 1963 | operations in exactly the order specified, so that if the CPU is, for example, |
1964 | given the following piece of code to execute: | 1964 | given 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 | ||
1972 | They would then expect that the CPU will complete the memory operation for each | 1972 | they would then expect that the CPU will complete the memory operation for each |
1973 | instruction before moving on to the next one, leading to a definite sequence of | 1973 | instruction before moving on to the next one, leading to a definite sequence of |
1974 | operations as seen by external observers in the system: | 1974 | operations 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 | ||
2070 | The DEC Alpha CPU is one of the most relaxed CPUs there is. Not only that, | 2070 | The DEC Alpha CPU is one of the most relaxed CPUs there is. Not only that, |
2071 | some versions of the Alpha CPU have a split data cache, permitting them to have | 2071 | some versions of the Alpha CPU have a split data cache, permitting them to have |
2072 | two semantically related cache lines updating at separate times. This is where | 2072 | two semantically-related cache lines updated at separate times. This is where |
2073 | the data dependency barrier really becomes necessary as this synchronises both | 2073 | the data dependency barrier really becomes necessary as this synchronises both |
2074 | caches with the memory coherence system, thus making it seem like pointer | 2074 | caches with the memory coherence system, thus making it seem like pointer |
2075 | changes vs new data occur in the right order. | 2075 | changes vs new data occur in the right order. |
2076 | 2076 | ||
2077 | The Alpha defines the Linux's kernel's memory barrier model. | 2077 | The Alpha defines the Linux kernel's memory barrier model. |
2078 | 2078 | ||
2079 | See the subsection on "Cache Coherency" above. | 2079 | See 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 | |
55 | read_dev_chars() | 55 | the channel program and handles the interrupt itself. |
56 | read device characteristics | ||
57 | |||
58 | read_conf_data() | ||
59 | read_conf_data_lpm() | ||
60 | read configuration data. | ||
61 | 56 | ||
62 | ccw_device_get_ciw() | 57 | ccw_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 | |||
130 | has to call every single device driver registered on this IRQ in order to | 125 | has to call every single device driver registered on this IRQ in order to |
131 | determine the device driver owning the device that raised the interrupt. | 126 | determine the device driver owning the device that raised the interrupt. |
132 | 127 | ||
133 | In order not to introduce a new I/O concept to the common Linux code, | ||
134 | Linux/390 preserves the IRQ concept and semantically maps the ESA/390 | ||
135 | subchannels to Linux as IRQs. This allows Linux/390 to support up to 64k | ||
136 | different IRQs, uniquely representing a single device each. | ||
137 | |||
138 | Up to kernel 2.4, Linux/390 used to provide interfaces via the IRQ (subchannel). | 128 | Up to kernel 2.4, Linux/390 used to provide interfaces via the IRQ (subchannel). |
139 | For internal use of the common I/O layer, these are still there. However, | 129 | For internal use of the common I/O layer, these are still there. However, |
140 | device drivers should use the new calling interface via the ccw_device only. | 130 | device 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 | |||
151 | support using the information saved in the struct ccw_device given to them. | 141 | support using the information saved in the struct ccw_device given to them. |
152 | This methods implies that Linux/390 doesn't require to probe for free (not | 142 | This methods implies that Linux/390 doesn't require to probe for free (not |
153 | armed) interrupt request lines (IRQs) to drive its devices with. Where | 143 | armed) interrupt request lines (IRQs) to drive its devices with. Where |
154 | applicable, the device drivers can use the read_dev_chars() to retrieve device | 144 | applicable, the device drivers can use issue the READ DEVICE CHARACTERISTICS |
155 | characteristics. This can be done without having to request device ownership | 145 | ccw to retrieve device characteristics in its online routine. |
156 | previously. | ||
157 | 146 | ||
158 | In order to allow for easy I/O initiation the CDS layer provides a | 147 | In order to allow for easy I/O initiation the CDS layer provides a |
159 | ccw_device_start() interface that takes a device specific channel program (one | 148 | ccw_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 | |||
170 | also covered by ccw_device_halt(). | 159 | also covered by ccw_device_halt(). |
171 | 160 | ||
172 | 161 | ||
173 | read_dev_chars() - Read Device Characteristics | ||
174 | |||
175 | This routine returns the characteristics for the device specified. | ||
176 | |||
177 | The function is meant to be called with the device already enabled; that is, | ||
178 | at earliest during set_online() processing. | ||
179 | |||
180 | The ccw_device must not be locked prior to calling read_dev_chars(). | ||
181 | |||
182 | The function may be called enabled or disabled. | ||
183 | |||
184 | int read_dev_chars(struct ccw_device *cdev, void **buffer, int length ); | ||
185 | |||
186 | cdev - the ccw_device the information is requested for. | ||
187 | buffer - pointer to a buffer pointer. The buffer pointer itself | ||
188 | must contain a valid buffer area. | ||
189 | length - length of the buffer provided. | ||
190 | |||
191 | The 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 | |||
200 | read_conf_data(), read_conf_data_lpm() - Read Configuration Data | ||
201 | |||
202 | Retrieve the device dependent configuration data. Please have a look at your | ||
203 | device dependent I/O commands for the device specific layout of the node | ||
204 | descriptor elements. read_conf_data_lpm() will retrieve the configuration data | ||
205 | for a specific path. | ||
206 | |||
207 | The function is meant to be called with the device already enabled; that is, | ||
208 | at earliest during set_online() processing. | ||
209 | |||
210 | The function may be called enabled or disabled, but the device must not be | ||
211 | locked | ||
212 | |||
213 | int read_conf_data(struct ccw_device, void **buffer, int *length); | ||
214 | int read_conf_data_lpm(struct ccw_device, void **buffer, int *length, __u8 lpm); | ||
215 | |||
216 | cdev - the ccw_device the data is requested for. | ||
217 | buffer - 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. | ||
221 | length - Length of the buffer allocated and retrieved. | ||
222 | lpm - Logical path mask to be used for retrieving the data. If | ||
223 | zero the data is retrieved on the next path available. | ||
224 | |||
225 | The 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 | |||
236 | get_ciw() - get command information word | 162 | get_ciw() - get command information word |
237 | 163 | ||
238 | This call enables a device driver to get information about supported commands | 164 | This 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 @@ | |||
1 | Overview of Linux kernel SPI support | 1 | Overview of Linux kernel SPI support |
2 | ==================================== | 2 | ==================================== |
3 | 3 | ||
4 | 02-Dec-2005 | 4 | 21-May-2007 |
5 | 5 | ||
6 | What is SPI? | 6 | What is SPI? |
7 | ------------ | 7 | ------------ |
8 | The "Serial Peripheral Interface" (SPI) is a synchronous four wire serial | 8 | The "Serial Peripheral Interface" (SPI) is a synchronous four wire serial |
9 | link used to connect microcontrollers to sensors, memory, and peripherals. | 9 | link used to connect microcontrollers to sensors, memory, and peripherals. |
10 | It's a simple "de facto" standard, not complicated enough to acquire a | ||
11 | standardization body. SPI uses a master/slave configuration. | ||
10 | 12 | ||
11 | The three signal wires hold a clock (SCK, often on the order of 10 MHz), | 13 | The three signal wires hold a clock (SCK, often on the order of 10 MHz), |
12 | and parallel data lines with "Master Out, Slave In" (MOSI) or "Master In, | 14 | and parallel data lines with "Master Out, Slave In" (MOSI) or "Master In, |
13 | Slave Out" (MISO) signals. (Other names are also used.) There are four | 15 | Slave Out" (MISO) signals. (Other names are also used.) There are four |
14 | clocking modes through which data is exchanged; mode-0 and mode-3 are most | 16 | clocking modes through which data is exchanged; mode-0 and mode-3 are most |
15 | commonly used. Each clock cycle shifts data out and data in; the clock | 17 | commonly used. Each clock cycle shifts data out and data in; the clock |
16 | doesn't cycle except when there is data to shift. | 18 | doesn't cycle except when there is a data bit to shift. Not all data bits |
19 | are used though; not every protocol uses those full duplex capabilities. | ||
17 | 20 | ||
18 | SPI masters may use a "chip select" line to activate a given SPI slave | 21 | SPI masters use a fourth "chip select" line to activate a given SPI slave |
19 | device, so those three signal wires may be connected to several chips | 22 | device, so those three signal wires may be connected to several chips |
20 | in parallel. All SPI slaves support chipselects. Some devices have | 23 | in parallel. All SPI slaves support chipselects; they are usually active |
24 | low signals, labeled nCSx for slave 'x' (e.g. nCS0). Some devices have | ||
21 | other signals, often including an interrupt to the master. | 25 | other signals, often including an interrupt to the master. |
22 | 26 | ||
23 | Unlike serial busses like USB or SMBUS, even low level protocols for | 27 | Unlike serial busses like USB or SMBus, even low level protocols for |
24 | SPI slave functions are usually not interoperable between vendors | 28 | SPI 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 | |||
36 | In the same way, SPI slaves will only rarely support any kind of automatic | 45 | In the same way, SPI slaves will only rarely support any kind of automatic |
37 | discovery/enumeration protocol. The tree of slave devices accessible from | 46 | discovery/enumeration protocol. The tree of slave devices accessible from |
38 | a given SPI master will normally be set up manually, with configuration | 47 | a given SPI master will normally be set up manually, with configuration |
@@ -44,6 +53,14 @@ half-duplex SPI, for request/response protocols), SSP ("Synchronous | |||
44 | Serial Protocol"), PSP ("Programmable Serial Protocol"), and other | 53 | Serial Protocol"), PSP ("Programmable Serial Protocol"), and other |
45 | related protocols. | 54 | related protocols. |
46 | 55 | ||
56 | Some chips eliminate a signal line by combining MOSI and MISO, and | ||
57 | limiting themselves to half-duplex at the hardware level. In fact | ||
58 | some SPI chips have this signal mode as a strapping option. These | ||
59 | can be accessed using the same programming interface as SPI, but of | ||
60 | course they won't handle full duplex transfers. You may find such | ||
61 | chips described as using "three wire" signaling: SCK, data, nCSx. | ||
62 | (That data line is sometimes called MOMI or SISO.) | ||
63 | |||
47 | Microcontrollers often support both master and slave sides of the SPI | 64 | Microcontrollers often support both master and slave sides of the SPI |
48 | protocol. This document (and Linux) currently only supports the master | 65 | protocol. This document (and Linux) currently only supports the master |
49 | side of SPI interactions. | 66 | side of SPI interactions. |
@@ -74,6 +91,32 @@ interfaces with SPI modes. Given SPI support, they could use MMC or SD | |||
74 | cards without needing a special purpose MMC/SD/SDIO controller. | 91 | cards without needing a special purpose MMC/SD/SDIO controller. |
75 | 92 | ||
76 | 93 | ||
94 | I'm confused. What are these four SPI "clock modes"? | ||
95 | ----------------------------------------------------- | ||
96 | It's easy to be confused here, and the vendor documentation you'll | ||
97 | find 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 | |||
111 | Chip specs won't always say "uses SPI mode X" in as many words, | ||
112 | but their timing diagrams will make the CPOL and CPHA modes clear. | ||
113 | |||
114 | In the SPI mode number, CPOL is the high order bit and CPHA is the | ||
115 | low order bit. So when a chip's timing diagram shows the clock | ||
116 | starting low (CPOL=0) and data stabilized for sampling during the | ||
117 | trailing clock edge (CPHA=1), that's SPI mode 1. | ||
118 | |||
119 | |||
77 | How do these driver programming interfaces work? | 120 | How do these driver programming interfaces work? |
78 | ------------------------------------------------ | 121 | ------------------------------------------------ |
79 | The <linux/spi/spi.h> header file includes kerneldoc, as does the | 122 | The <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 | ||
260 | void slab_validate(struct slabinfo *s) | 263 | void 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 | ||
265 | void slab_shrink(struct slabinfo *s) | 271 | void 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 | ||
546 | void slab_debug(struct slabinfo *s) | 557 | void 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 | ||