diff options
Diffstat (limited to 'Documentation')
25 files changed, 554 insertions, 287 deletions
diff --git a/Documentation/BUG-HUNTING b/Documentation/BUG-HUNTING index 65b97e1dbf70..35f5bd243336 100644 --- a/Documentation/BUG-HUNTING +++ b/Documentation/BUG-HUNTING | |||
@@ -191,6 +191,30 @@ e.g. crash dump output as shown by Dave Miller. | |||
191 | > mov 0x8(%ebp), %ebx ! %ebx = skb->sk | 191 | > mov 0x8(%ebp), %ebx ! %ebx = skb->sk |
192 | > mov 0x13c(%ebx), %eax ! %eax = inet_sk(sk)->opt | 192 | > mov 0x13c(%ebx), %eax ! %eax = inet_sk(sk)->opt |
193 | 193 | ||
194 | In addition, you can use GDB to figure out the exact file and line | ||
195 | number of the OOPS from the vmlinux file. If you have | ||
196 | CONFIG_DEBUG_INFO enabled, you can simply copy the EIP value from the | ||
197 | OOPS: | ||
198 | |||
199 | EIP: 0060:[<c021e50e>] Not tainted VLI | ||
200 | |||
201 | And use GDB to translate that to human-readable form: | ||
202 | |||
203 | gdb vmlinux | ||
204 | (gdb) l *0xc021e50e | ||
205 | |||
206 | If you don't have CONFIG_DEBUG_INFO enabled, you use the function | ||
207 | offset from the OOPS: | ||
208 | |||
209 | EIP is at vt_ioctl+0xda8/0x1482 | ||
210 | |||
211 | And recompile the kernel with CONFIG_DEBUG_INFO enabled: | ||
212 | |||
213 | make vmlinux | ||
214 | gdb vmlinux | ||
215 | (gdb) p vt_ioctl | ||
216 | (gdb) l *(0x<address of vt_ioctl> + 0xda8) | ||
217 | |||
194 | Another very useful option of the Kernel Hacking section in menuconfig is | 218 | Another very useful option of the Kernel Hacking section in menuconfig is |
195 | Debug memory allocations. This will help you see whether data has been | 219 | Debug memory allocations. This will help you see whether data has been |
196 | initialised and not set before use etc. To see the values that get assigned | 220 | initialised and not set before use etc. To see the values that get assigned |
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/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/SubmitChecklist b/Documentation/SubmitChecklist index 3af3e65cf43b..6ebffb57e3db 100644 --- a/Documentation/SubmitChecklist +++ b/Documentation/SubmitChecklist | |||
@@ -84,3 +84,9 @@ kernel patches. | |||
84 | 24: Avoid whitespace damage such as indenting with spaces or whitespace | 84 | 24: Avoid whitespace damage such as indenting with spaces or whitespace |
85 | at the end of lines. You can test this by feeding the patch to | 85 | at the end of lines. You can test this by feeding the patch to |
86 | "git apply --check --whitespace=error-all" | 86 | "git apply --check --whitespace=error-all" |
87 | |||
88 | 25: Check your patch for general style as detailed in | ||
89 | Documentation/CodingStyle. Check for trivial violations with the | ||
90 | patch style checker prior to submission (scripts/checkpatch.pl). | ||
91 | You should be able to justify all violations that remain in | ||
92 | your patch. | ||
diff --git a/Documentation/SubmittingPatches b/Documentation/SubmittingPatches index a417b25fb1aa..d91125ab6f49 100644 --- a/Documentation/SubmittingPatches +++ b/Documentation/SubmittingPatches | |||
@@ -118,7 +118,20 @@ then only post say 15 or so at a time and wait for review and integration. | |||
118 | 118 | ||
119 | 119 | ||
120 | 120 | ||
121 | 4) Select e-mail destination. | 121 | 4) Style check your changes. |
122 | |||
123 | Check your patch for basic style violations, details of which can be | ||
124 | found in Documentation/CodingStyle. Failure to do so simply wastes | ||
125 | the reviewers time and will get your patch rejected, probabally | ||
126 | without even being read. | ||
127 | |||
128 | At a minimum you should check your patches with the patch style | ||
129 | checker prior to submission (scripts/patchcheck.pl). You should | ||
130 | be able to justify all violations that remain in your patch. | ||
131 | |||
132 | |||
133 | |||
134 | 5) Select e-mail destination. | ||
122 | 135 | ||
123 | Look through the MAINTAINERS file and the source code, and determine | 136 | Look through the MAINTAINERS file and the source code, and determine |
124 | if your change applies to a specific subsystem of the kernel, with | 137 | if your change applies to a specific subsystem of the kernel, with |
@@ -146,7 +159,7 @@ discussed should the patch then be submitted to Linus. | |||
146 | 159 | ||
147 | 160 | ||
148 | 161 | ||
149 | 5) Select your CC (e-mail carbon copy) list. | 162 | 6) Select your CC (e-mail carbon copy) list. |
150 | 163 | ||
151 | Unless you have a reason NOT to do so, CC linux-kernel@vger.kernel.org. | 164 | Unless you have a reason NOT to do so, CC linux-kernel@vger.kernel.org. |
152 | 165 | ||
@@ -187,8 +200,7 @@ URL: <http://www.kernel.org/pub/linux/kernel/people/bunk/trivial/> | |||
187 | 200 | ||
188 | 201 | ||
189 | 202 | ||
190 | 203 | 7) No MIME, no links, no compression, no attachments. Just plain text. | |
191 | 6) No MIME, no links, no compression, no attachments. Just plain text. | ||
192 | 204 | ||
193 | Linus and other kernel developers need to be able to read and comment | 205 | Linus and other kernel developers need to be able to read and comment |
194 | on the changes you are submitting. It is important for a kernel | 206 | on the changes you are submitting. It is important for a kernel |
@@ -223,9 +235,9 @@ pref("mailnews.display.disable_format_flowed_support", true); | |||
223 | 235 | ||
224 | 236 | ||
225 | 237 | ||
226 | 7) E-mail size. | 238 | 8) E-mail size. |
227 | 239 | ||
228 | When sending patches to Linus, always follow step #6. | 240 | When sending patches to Linus, always follow step #7. |
229 | 241 | ||
230 | Large changes are not appropriate for mailing lists, and some | 242 | Large changes are not appropriate for mailing lists, and some |
231 | maintainers. If your patch, uncompressed, exceeds 40 kB in size, | 243 | maintainers. If your patch, uncompressed, exceeds 40 kB in size, |
@@ -234,7 +246,7 @@ server, and provide instead a URL (link) pointing to your patch. | |||
234 | 246 | ||
235 | 247 | ||
236 | 248 | ||
237 | 8) Name your kernel version. | 249 | 9) Name your kernel version. |
238 | 250 | ||
239 | It is important to note, either in the subject line or in the patch | 251 | It is important to note, either in the subject line or in the patch |
240 | description, the kernel version to which this patch applies. | 252 | description, the kernel version to which this patch applies. |
@@ -244,7 +256,7 @@ Linus will not apply it. | |||
244 | 256 | ||
245 | 257 | ||
246 | 258 | ||
247 | 9) Don't get discouraged. Re-submit. | 259 | 10) Don't get discouraged. Re-submit. |
248 | 260 | ||
249 | After you have submitted your change, be patient and wait. If Linus | 261 | After you have submitted your change, be patient and wait. If Linus |
250 | likes your change and applies it, it will appear in the next version | 262 | likes your change and applies it, it will appear in the next version |
@@ -270,7 +282,7 @@ When in doubt, solicit comments on linux-kernel mailing list. | |||
270 | 282 | ||
271 | 283 | ||
272 | 284 | ||
273 | 10) Include PATCH in the subject | 285 | 11) Include PATCH in the subject |
274 | 286 | ||
275 | Due to high e-mail traffic to Linus, and to linux-kernel, it is common | 287 | Due to high e-mail traffic to Linus, and to linux-kernel, it is common |
276 | convention to prefix your subject line with [PATCH]. This lets Linus | 288 | convention to prefix your subject line with [PATCH]. This lets Linus |
@@ -279,7 +291,7 @@ e-mail discussions. | |||
279 | 291 | ||
280 | 292 | ||
281 | 293 | ||
282 | 11) Sign your work | 294 | 12) Sign your work |
283 | 295 | ||
284 | To improve tracking of who did what, especially with patches that can | 296 | To improve tracking of who did what, especially with patches that can |
285 | percolate to their final resting place in the kernel through several | 297 | percolate to their final resting place in the kernel through several |
@@ -328,7 +340,8 @@ now, but you can do this to mark internal company procedures or just | |||
328 | point out some special detail about the sign-off. | 340 | point out some special detail about the sign-off. |
329 | 341 | ||
330 | 342 | ||
331 | 12) The canonical patch format | 343 | |
344 | 13) The canonical patch format | ||
332 | 345 | ||
333 | The canonical patch subject line is: | 346 | The canonical patch subject line is: |
334 | 347 | ||
@@ -427,6 +440,10 @@ section Linus Computer Science 101. | |||
427 | Nuff said. If your code deviates too much from this, it is likely | 440 | Nuff said. If your code deviates too much from this, it is likely |
428 | to be rejected without further review, and without comment. | 441 | to be rejected without further review, and without comment. |
429 | 442 | ||
443 | Check your patches with the patch style checker prior to submission | ||
444 | (scripts/checkpatch.pl). You should be able to justify all | ||
445 | violations that remain in your patch. | ||
446 | |||
430 | 447 | ||
431 | 448 | ||
432 | 2) #ifdefs are ugly | 449 | 2) #ifdefs are ugly |
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 5c8695a3d139..49ae1ea9e868 100644 --- a/Documentation/feature-removal-schedule.txt +++ b/Documentation/feature-removal-schedule.txt | |||
@@ -62,7 +62,7 @@ Who: Dan Dennedy <dan@dennedy.org>, Stefan Richter <stefanr@s5r6.in-berlin.de> | |||
62 | What: old NCR53C9x driver | 62 | What: old NCR53C9x driver |
63 | When: October 2007 | 63 | When: October 2007 |
64 | Why: Replaced by the much better esp_scsi driver. Actual low-level | 64 | Why: Replaced by the much better esp_scsi driver. Actual low-level |
65 | driver can ported over almost trivially. | 65 | driver can be ported over almost trivially. |
66 | Who: David Miller <davem@davemloft.net> | 66 | Who: David Miller <davem@davemloft.net> |
67 | Christoph Hellwig <hch@lst.de> | 67 | Christoph Hellwig <hch@lst.de> |
68 | 68 | ||
@@ -70,6 +70,7 @@ Who: David Miller <davem@davemloft.net> | |||
70 | 70 | ||
71 | What: Video4Linux API 1 ioctls and video_decoder.h from Video devices. | 71 | What: Video4Linux API 1 ioctls and video_decoder.h from Video devices. |
72 | When: December 2006 | 72 | When: December 2006 |
73 | Files: include/linux/video_decoder.h | ||
73 | Why: V4L1 AP1 was replaced by V4L2 API. during migration from 2.4 to 2.6 | 74 | Why: V4L1 AP1 was replaced by V4L2 API. during migration from 2.4 to 2.6 |
74 | series. The old API have lots of drawbacks and don't provide enough | 75 | series. The old API have lots of drawbacks and don't provide enough |
75 | means to work with all video and audio standards. The newer API is | 76 | means to work with all video and audio standards. The newer API is |
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/hrtimer/timer_stats.txt b/Documentation/hrtimer/timer_stats.txt index 27f782e3593f..22b0814d0ad0 100644 --- a/Documentation/hrtimer/timer_stats.txt +++ b/Documentation/hrtimer/timer_stats.txt | |||
@@ -2,9 +2,10 @@ timer_stats - timer usage statistics | |||
2 | ------------------------------------ | 2 | ------------------------------------ |
3 | 3 | ||
4 | timer_stats is a debugging facility to make the timer (ab)usage in a Linux | 4 | timer_stats is a debugging facility to make the timer (ab)usage in a Linux |
5 | system visible to kernel and userspace developers. It is not intended for | 5 | system visible to kernel and userspace developers. If enabled in the config |
6 | production usage as it adds significant overhead to the (hr)timer code and the | 6 | but not used it has almost zero runtime overhead, and a relatively small |
7 | (hr)timer data structures. | 7 | data structure overhead. Even if collection is enabled runtime all the |
8 | locking is per-CPU and lookup is hashed. | ||
8 | 9 | ||
9 | timer_stats should be used by kernel and userspace developers to verify that | 10 | timer_stats should be used by kernel and userspace developers to verify that |
10 | their code does not make unduly use of timers. This helps to avoid unnecessary | 11 | their code does not make unduly use of timers. This helps to avoid unnecessary |
diff --git a/Documentation/i386/boot.txt b/Documentation/i386/boot.txt index 66fa67fec2a7..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-16 | 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 |
@@ -202,6 +202,8 @@ All general purpose boot loaders should write the fields marked | |||
202 | nonstandard address should fill in the fields marked (reloc); other | 202 | nonstandard address should fill in the fields marked (reloc); other |
203 | boot loaders can ignore those fields. | 203 | boot loaders can ignore those fields. |
204 | 204 | ||
205 | The byte order of all fields is littleendian (this is x86, after all.) | ||
206 | |||
205 | Field name: setup_secs | 207 | Field name: setup_secs |
206 | Type: read | 208 | Type: read |
207 | Offset/size: 0x1f1/1 | 209 | Offset/size: 0x1f1/1 |
@@ -280,14 +282,16 @@ Type: read | |||
280 | Offset/size: 0x206/2 | 282 | Offset/size: 0x206/2 |
281 | Protocol: 2.00+ | 283 | Protocol: 2.00+ |
282 | 284 | ||
283 | Contains the boot protocol version, e.g. 0x0204 for version 2.04. | 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. | ||
284 | 288 | ||
285 | Field name: readmode_swtch | 289 | Field name: readmode_swtch |
286 | Type: modify (optional) | 290 | Type: modify (optional) |
287 | Offset/size: 0x208/4 | 291 | Offset/size: 0x208/4 |
288 | Protocol: 2.00+ | 292 | Protocol: 2.00+ |
289 | 293 | ||
290 | Boot loader hook (see separate chapter.) | 294 | Boot loader hook (see ADVANCED BOOT LOADER HOOKS below.) |
291 | 295 | ||
292 | Field name: start_sys | 296 | Field name: start_sys |
293 | Type: read | 297 | Type: read |
@@ -304,10 +308,17 @@ Protocol: 2.00+ | |||
304 | If set to a nonzero value, contains a pointer to a NUL-terminated | 308 | If set to a nonzero value, contains a pointer to a NUL-terminated |
305 | human-readable kernel version number string, less 0x200. This can | 309 | human-readable kernel version number string, less 0x200. This can |
306 | be used to display the kernel version to the user. This value | 310 | be used to display the kernel version to the user. This value |
307 | should be less than (0x200*setup_sects). For example, if this value | 311 | should be less than (0x200*setup_sects). |
308 | is set to 0x1c00, the kernel version number string can be found at | 312 | |
309 | offset 0x1e00 in the kernel file. This is a valid value if and only | 313 | For example, if this value is set to 0x1c00, the kernel version |
310 | if the "setup_sects" field contains the value 14 or higher. | 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. | ||
311 | 322 | ||
312 | Field name: type_of_loader | 323 | Field name: type_of_loader |
313 | Type: write (obligatory) | 324 | Type: write (obligatory) |
@@ -377,7 +388,7 @@ Protocol: 2.00+ | |||
377 | 388 | ||
378 | This field can be modified for two purposes: | 389 | This field can be modified for two purposes: |
379 | 390 | ||
380 | 1. as a boot loader hook (see separate chapter.) | 391 | 1. as a boot loader hook (see ADVANCED BOOT LOADER HOOKS below.) |
381 | 392 | ||
382 | 2. if a bootloader which does not install a hook loads a | 393 | 2. if a bootloader which does not install a hook loads a |
383 | relocatable kernel at a nonstandard address it will have to modify | 394 | relocatable kernel at a nonstandard address it will have to modify |
@@ -715,7 +726,7 @@ switched off, especially if the loaded kernel has the floppy driver as | |||
715 | a demand-loaded module! | 726 | a demand-loaded module! |
716 | 727 | ||
717 | 728 | ||
718 | **** ADVANCED BOOT TIME HOOKS | 729 | **** ADVANCED BOOT LOADER HOOKS |
719 | 730 | ||
720 | 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 |
721 | 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 |
@@ -740,4 +751,5 @@ IMPORTANT: All the hooks are required to preserve %esp, %ebp, %esi and | |||
740 | set them up to BOOT_DS (0x18) yourself. | 751 | set them up to BOOT_DS (0x18) yourself. |
741 | 752 | ||
742 | After completing your hook, you should jump to the address | 753 | After completing your hook, you should jump to the address |
743 | 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/ia64/aliasing-test.c b/Documentation/ia64/aliasing-test.c index 3153167b41c3..d485256ee1ce 100644 --- a/Documentation/ia64/aliasing-test.c +++ b/Documentation/ia64/aliasing-test.c | |||
@@ -197,7 +197,7 @@ skip: | |||
197 | return rc; | 197 | return rc; |
198 | } | 198 | } |
199 | 199 | ||
200 | main() | 200 | int main() |
201 | { | 201 | { |
202 | int rc; | 202 | int rc; |
203 | 203 | ||
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..5d0283cd3a81 100644 --- a/Documentation/kernel-parameters.txt +++ b/Documentation/kernel-parameters.txt | |||
@@ -170,7 +170,10 @@ and is between 256 and 4096 characters. It is defined in the file | |||
170 | acpi_os_name= [HW,ACPI] Tell ACPI BIOS the name of the OS | 170 | acpi_os_name= [HW,ACPI] Tell ACPI BIOS the name of the OS |
171 | Format: To spoof as Windows 98: ="Microsoft Windows" | 171 | Format: To spoof as Windows 98: ="Microsoft Windows" |
172 | 172 | ||
173 | acpi_osi= [HW,ACPI] empty param disables _OSI | 173 | acpi_osi= [HW,ACPI] Modify list of supported OS interface strings |
174 | acpi_osi="string1" # add string1 -- only one string | ||
175 | acpi_osi="!string2" # remove built-in string2 | ||
176 | acpi_osi= # disable all strings | ||
174 | 177 | ||
175 | acpi_serialize [HW,ACPI] force serialization of AML methods | 178 | acpi_serialize [HW,ACPI] force serialization of AML methods |
176 | 179 | ||
@@ -396,6 +399,26 @@ and is between 256 and 4096 characters. It is defined in the file | |||
396 | clocksource is not available, it defaults to PIT. | 399 | clocksource is not available, it defaults to PIT. |
397 | Format: { pit | tsc | cyclone | pmtmr } | 400 | Format: { pit | tsc | cyclone | pmtmr } |
398 | 401 | ||
402 | clocksource= [GENERIC_TIME] Override the default clocksource | ||
403 | Format: <string> | ||
404 | Override the default clocksource and use the clocksource | ||
405 | with the name specified. | ||
406 | Some clocksource names to choose from, depending on | ||
407 | the platform: | ||
408 | [all] jiffies (this is the base, fallback clocksource) | ||
409 | [ACPI] acpi_pm | ||
410 | [ARM] imx_timer1,OSTS,netx_timer,mpu_timer2, | ||
411 | pxa_timer,timer3,32k_counter,timer0_1 | ||
412 | [AVR32] avr32 | ||
413 | [IA-32] pit,hpet,tsc,vmi-timer; | ||
414 | scx200_hrt on Geode; cyclone on IBM x440 | ||
415 | [MIPS] MIPS | ||
416 | [PARISC] cr16 | ||
417 | [S390] tod | ||
418 | [SH] SuperH | ||
419 | [SPARC64] tick | ||
420 | [X86-64] hpet,tsc | ||
421 | |||
399 | code_bytes [IA32] How many bytes of object code to print in an | 422 | code_bytes [IA32] How many bytes of object code to print in an |
400 | oops report. | 423 | oops report. |
401 | Range: 0 - 8192 | 424 | Range: 0 - 8192 |
@@ -1112,9 +1135,9 @@ and is between 256 and 4096 characters. It is defined in the file | |||
1112 | when set. | 1135 | when set. |
1113 | Format: <int> | 1136 | Format: <int> |
1114 | 1137 | ||
1115 | noaliencache [MM, NUMA] Disables the allcoation of alien caches in | 1138 | noaliencache [MM, NUMA, SLAB] Disables the allocation of alien |
1116 | the slab allocator. Saves per-node memory, but will | 1139 | caches in the slab allocator. Saves per-node memory, |
1117 | impact performance on real NUMA hardware. | 1140 | but will impact performance. |
1118 | 1141 | ||
1119 | noalign [KNL,ARM] | 1142 | noalign [KNL,ARM] |
1120 | 1143 | ||
@@ -1593,6 +1616,37 @@ and is between 256 and 4096 characters. It is defined in the file | |||
1593 | 1616 | ||
1594 | slram= [HW,MTD] | 1617 | slram= [HW,MTD] |
1595 | 1618 | ||
1619 | slub_debug [MM, SLUB] | ||
1620 | Enabling slub_debug allows one to determine the culprit | ||
1621 | if slab objects become corrupted. Enabling slub_debug | ||
1622 | creates guard zones around objects and poisons objects | ||
1623 | when not in use. Also tracks the last alloc / free. | ||
1624 | For more information see Documentation/vm/slub.txt. | ||
1625 | |||
1626 | slub_max_order= [MM, SLUB] | ||
1627 | Determines the maximum allowed order for slabs. Setting | ||
1628 | this too high may cause fragmentation. | ||
1629 | For more information see Documentation/vm/slub.txt. | ||
1630 | |||
1631 | slub_min_objects= [MM, SLUB] | ||
1632 | The minimum objects per slab. SLUB will increase the | ||
1633 | slab order up to slub_max_order to generate a | ||
1634 | sufficiently big slab to satisfy the number of objects. | ||
1635 | The higher the number of objects the smaller the overhead | ||
1636 | of tracking slabs. | ||
1637 | For more information see Documentation/vm/slub.txt. | ||
1638 | |||
1639 | slub_min_order= [MM, SLUB] | ||
1640 | Determines the mininum page order for slabs. Must be | ||
1641 | lower than slub_max_order | ||
1642 | For more information see Documentation/vm/slub.txt. | ||
1643 | |||
1644 | slub_nomerge [MM, SLUB] | ||
1645 | Disable merging of slabs of similar size. May be | ||
1646 | necessary if there is some reason to distinguish | ||
1647 | allocs to different slabs. | ||
1648 | For more information see Documentation/vm/slub.txt. | ||
1649 | |||
1596 | smart2= [HW] | 1650 | smart2= [HW] |
1597 | Format: <io1>[,<io2>[,...,<io8>]] | 1651 | Format: <io1>[,<io2>[,...,<io8>]] |
1598 | 1652 | ||
@@ -1807,10 +1861,6 @@ and is between 256 and 4096 characters. It is defined in the file | |||
1807 | 1861 | ||
1808 | time Show timing data prefixed to each printk message line | 1862 | time Show timing data prefixed to each printk message line |
1809 | 1863 | ||
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] | 1864 | tipar.timeout= [HW,PPT] |
1815 | Set communications timeout in tenths of a second | 1865 | Set communications timeout in tenths of a second |
1816 | (default 15). | 1866 | (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/xfrm_sysctl.txt b/Documentation/networking/xfrm_sysctl.txt new file mode 100644 index 000000000000..5bbd16792fe1 --- /dev/null +++ b/Documentation/networking/xfrm_sysctl.txt | |||
@@ -0,0 +1,4 @@ | |||
1 | /proc/sys/net/core/xfrm_* Variables: | ||
2 | |||
3 | xfrm_acq_expires - INTEGER | ||
4 | default 30 - hard timeout in seconds for acquire requests | ||
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/sound/alsa/ALSA-Configuration.txt b/Documentation/sound/alsa/ALSA-Configuration.txt index 57b878cc393c..355ff0a2bb7c 100644 --- a/Documentation/sound/alsa/ALSA-Configuration.txt +++ b/Documentation/sound/alsa/ALSA-Configuration.txt | |||
@@ -917,6 +917,7 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed. | |||
917 | ref Reference board, base config | 917 | ref Reference board, base config |
918 | m2-2 Some Gateway MX series laptops | 918 | m2-2 Some Gateway MX series laptops |
919 | m6 Some Gateway NX series laptops | 919 | m6 Some Gateway NX series laptops |
920 | pa6 Gateway NX860 series | ||
920 | 921 | ||
921 | STAC9227/9228/9229/927x | 922 | STAC9227/9228/9229/927x |
922 | ref Reference board | 923 | ref Reference board |
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/thinkpad-acpi.txt b/Documentation/thinkpad-acpi.txt index 2d4803359a04..9e6b94face4b 100644 --- a/Documentation/thinkpad-acpi.txt +++ b/Documentation/thinkpad-acpi.txt | |||
@@ -138,7 +138,7 @@ Hot keys | |||
138 | -------- | 138 | -------- |
139 | 139 | ||
140 | procfs: /proc/acpi/ibm/hotkey | 140 | procfs: /proc/acpi/ibm/hotkey |
141 | sysfs device attribute: hotkey/* | 141 | sysfs device attribute: hotkey_* |
142 | 142 | ||
143 | Without this driver, only the Fn-F4 key (sleep button) generates an | 143 | Without this driver, only the Fn-F4 key (sleep button) generates an |
144 | ACPI event. With the driver loaded, the hotkey feature enabled and the | 144 | ACPI event. With the driver loaded, the hotkey feature enabled and the |
@@ -196,10 +196,7 @@ The following commands can be written to the /proc/acpi/ibm/hotkey file: | |||
196 | 196 | ||
197 | sysfs notes: | 197 | sysfs notes: |
198 | 198 | ||
199 | The hot keys attributes are in a hotkey/ subdirectory off the | 199 | hotkey_bios_enabled: |
200 | thinkpad device. | ||
201 | |||
202 | bios_enabled: | ||
203 | Returns the status of the hot keys feature when | 200 | Returns the status of the hot keys feature when |
204 | thinkpad-acpi was loaded. Upon module unload, the hot | 201 | thinkpad-acpi was loaded. Upon module unload, the hot |
205 | key feature status will be restored to this value. | 202 | key feature status will be restored to this value. |
@@ -207,19 +204,19 @@ sysfs notes: | |||
207 | 0: hot keys were disabled | 204 | 0: hot keys were disabled |
208 | 1: hot keys were enabled | 205 | 1: hot keys were enabled |
209 | 206 | ||
210 | bios_mask: | 207 | hotkey_bios_mask: |
211 | Returns the hot keys mask when thinkpad-acpi was loaded. | 208 | Returns the hot keys mask when thinkpad-acpi was loaded. |
212 | Upon module unload, the hot keys mask will be restored | 209 | Upon module unload, the hot keys mask will be restored |
213 | to this value. | 210 | to this value. |
214 | 211 | ||
215 | enable: | 212 | hotkey_enable: |
216 | Enables/disables the hot keys feature, and reports | 213 | Enables/disables the hot keys feature, and reports |
217 | current status of the hot keys feature. | 214 | current status of the hot keys feature. |
218 | 215 | ||
219 | 0: disables the hot keys feature / feature disabled | 216 | 0: disables the hot keys feature / feature disabled |
220 | 1: enables the hot keys feature / feature enabled | 217 | 1: enables the hot keys feature / feature enabled |
221 | 218 | ||
222 | mask: | 219 | hotkey_mask: |
223 | bit mask to enable ACPI event generation for each hot | 220 | bit mask to enable ACPI event generation for each hot |
224 | key (see above). Returns the current status of the hot | 221 | key (see above). Returns the current status of the hot |
225 | keys mask, and allows one to modify it. | 222 | keys mask, and allows one to modify it. |
@@ -229,7 +226,7 @@ Bluetooth | |||
229 | --------- | 226 | --------- |
230 | 227 | ||
231 | procfs: /proc/acpi/ibm/bluetooth | 228 | procfs: /proc/acpi/ibm/bluetooth |
232 | sysfs device attribute: bluetooth/enable | 229 | sysfs device attribute: bluetooth_enable |
233 | 230 | ||
234 | This feature shows the presence and current state of a ThinkPad | 231 | This feature shows the presence and current state of a ThinkPad |
235 | Bluetooth device in the internal ThinkPad CDC slot. | 232 | Bluetooth device in the internal ThinkPad CDC slot. |
@@ -244,7 +241,7 @@ If Bluetooth is installed, the following commands can be used: | |||
244 | Sysfs notes: | 241 | Sysfs notes: |
245 | 242 | ||
246 | If the Bluetooth CDC card is installed, it can be enabled / | 243 | If the Bluetooth CDC card is installed, it can be enabled / |
247 | disabled through the "bluetooth/enable" thinkpad-acpi device | 244 | disabled through the "bluetooth_enable" thinkpad-acpi device |
248 | attribute, and its current status can also be queried. | 245 | attribute, and its current status can also be queried. |
249 | 246 | ||
250 | enable: | 247 | enable: |
@@ -252,7 +249,7 @@ Sysfs notes: | |||
252 | 1: enables Bluetooth / Bluetooth is enabled. | 249 | 1: enables Bluetooth / Bluetooth is enabled. |
253 | 250 | ||
254 | Note: this interface will be probably be superseeded by the | 251 | Note: this interface will be probably be superseeded by the |
255 | generic rfkill class. | 252 | generic rfkill class, so it is NOT to be considered stable yet. |
256 | 253 | ||
257 | Video output control -- /proc/acpi/ibm/video | 254 | Video output control -- /proc/acpi/ibm/video |
258 | -------------------------------------------- | 255 | -------------------------------------------- |
@@ -898,7 +895,7 @@ EXPERIMENTAL: WAN | |||
898 | ----------------- | 895 | ----------------- |
899 | 896 | ||
900 | procfs: /proc/acpi/ibm/wan | 897 | procfs: /proc/acpi/ibm/wan |
901 | sysfs device attribute: wwan/enable | 898 | sysfs device attribute: wwan_enable |
902 | 899 | ||
903 | This feature is marked EXPERIMENTAL because the implementation | 900 | This feature is marked EXPERIMENTAL because the implementation |
904 | directly accesses hardware registers and may not work as expected. USE | 901 | directly accesses hardware registers and may not work as expected. USE |
@@ -921,7 +918,7 @@ If the W-WAN card is installed, the following commands can be used: | |||
921 | Sysfs notes: | 918 | Sysfs notes: |
922 | 919 | ||
923 | If the W-WAN card is installed, it can be enabled / | 920 | If the W-WAN card is installed, it can be enabled / |
924 | disabled through the "wwan/enable" thinkpad-acpi device | 921 | disabled through the "wwan_enable" thinkpad-acpi device |
925 | attribute, and its current status can also be queried. | 922 | attribute, and its current status can also be queried. |
926 | 923 | ||
927 | enable: | 924 | enable: |
@@ -929,7 +926,7 @@ Sysfs notes: | |||
929 | 1: enables WWAN card / WWAN card is enabled. | 926 | 1: enables WWAN card / WWAN card is enabled. |
930 | 927 | ||
931 | Note: this interface will be probably be superseeded by the | 928 | Note: this interface will be probably be superseeded by the |
932 | generic rfkill class. | 929 | generic rfkill class, so it is NOT to be considered stable yet. |
933 | 930 | ||
934 | Multiple Commands, Module Parameters | 931 | Multiple Commands, Module Parameters |
935 | ------------------------------------ | 932 | ------------------------------------ |
diff --git a/Documentation/vm/slub.txt b/Documentation/vm/slub.txt index 727c8d81aeaf..1523320abd87 100644 --- a/Documentation/vm/slub.txt +++ b/Documentation/vm/slub.txt | |||
@@ -1,13 +1,9 @@ | |||
1 | Short users guide for SLUB | 1 | Short users guide for SLUB |
2 | -------------------------- | 2 | -------------------------- |
3 | 3 | ||
4 | First of all slub should transparently replace SLAB. If you enable | ||
5 | SLUB then everything should work the same (Note the word "should". | ||
6 | There is likely not much value in that word at this point). | ||
7 | |||
8 | The basic philosophy of SLUB is very different from SLAB. SLAB | 4 | The basic philosophy of SLUB is very different from SLAB. SLAB |
9 | requires rebuilding the kernel to activate debug options for all | 5 | requires rebuilding the kernel to activate debug options for all |
10 | SLABS. SLUB always includes full debugging but its off by default. | 6 | slab caches. SLUB always includes full debugging but it is off by default. |
11 | SLUB can enable debugging only for selected slabs in order to avoid | 7 | SLUB can enable debugging only for selected slabs in order to avoid |
12 | an impact on overall system performance which may make a bug more | 8 | an impact on overall system performance which may make a bug more |
13 | difficult to find. | 9 | difficult to find. |
@@ -76,13 +72,28 @@ of objects. | |||
76 | Careful with tracing: It may spew out lots of information and never stop if | 72 | Careful with tracing: It may spew out lots of information and never stop if |
77 | used on the wrong slab. | 73 | used on the wrong slab. |
78 | 74 | ||
79 | SLAB Merging | 75 | Slab merging |
80 | ------------ | 76 | ------------ |
81 | 77 | ||
82 | If no debugging is specified then SLUB may merge similar slabs together | 78 | If no debug options are specified then SLUB may merge similar slabs together |
83 | in order to reduce overhead and increase cache hotness of objects. | 79 | in order to reduce overhead and increase cache hotness of objects. |
84 | slabinfo -a displays which slabs were merged together. | 80 | slabinfo -a displays which slabs were merged together. |
85 | 81 | ||
82 | Slab validation | ||
83 | --------------- | ||
84 | |||
85 | SLUB can validate all object if the kernel was booted with slub_debug. In | ||
86 | order to do so you must have the slabinfo tool. Then you can do | ||
87 | |||
88 | slabinfo -v | ||
89 | |||
90 | which will test all objects. Output will be generated to the syslog. | ||
91 | |||
92 | This also works in a more limited way if boot was without slab debug. | ||
93 | In that case slabinfo -v simply tests all reachable objects. Usually | ||
94 | these are in the cpu slabs and the partial slabs. Full slabs are not | ||
95 | tracked by SLUB in a non debug situation. | ||
96 | |||
86 | Getting more performance | 97 | Getting more performance |
87 | ------------------------ | 98 | ------------------------ |
88 | 99 | ||
@@ -91,9 +102,9 @@ list_lock once in a while to deal with partial slabs. That overhead is | |||
91 | governed by the order of the allocation for each slab. The allocations | 102 | governed by the order of the allocation for each slab. The allocations |
92 | can be influenced by kernel parameters: | 103 | can be influenced by kernel parameters: |
93 | 104 | ||
94 | slub_min_objects=x (default 8) | 105 | slub_min_objects=x (default 4) |
95 | slub_min_order=x (default 0) | 106 | slub_min_order=x (default 0) |
96 | slub_max_order=x (default 4) | 107 | slub_max_order=x (default 1) |
97 | 108 | ||
98 | slub_min_objects allows to specify how many objects must at least fit | 109 | slub_min_objects allows to specify how many objects must at least fit |
99 | into one slab in order for the allocation order to be acceptable. | 110 | into one slab in order for the allocation order to be acceptable. |
@@ -109,5 +120,107 @@ longer be checked. This is useful to avoid SLUB trying to generate | |||
109 | super large order pages to fit slub_min_objects of a slab cache with | 120 | super large order pages to fit slub_min_objects of a slab cache with |
110 | large object sizes into one high order page. | 121 | large object sizes into one high order page. |
111 | 122 | ||
112 | 123 | SLUB Debug output | |
113 | Christoph Lameter, <clameter@sgi.com>, April 10, 2007 | 124 | ----------------- |
125 | |||
126 | Here is a sample of slub debug output: | ||
127 | |||
128 | *** SLUB kmalloc-8: Redzone Active@0xc90f6d20 slab 0xc528c530 offset=3360 flags=0x400000c3 inuse=61 freelist=0xc90f6d58 | ||
129 | Bytes b4 0xc90f6d10: 00 00 00 00 00 00 00 00 5a 5a 5a 5a 5a 5a 5a 5a ........ZZZZZZZZ | ||
130 | Object 0xc90f6d20: 31 30 31 39 2e 30 30 35 1019.005 | ||
131 | Redzone 0xc90f6d28: 00 cc cc cc . | ||
132 | FreePointer 0xc90f6d2c -> 0xc90f6d58 | ||
133 | Last alloc: get_modalias+0x61/0xf5 jiffies_ago=53 cpu=1 pid=554 | ||
134 | Filler 0xc90f6d50: 5a 5a 5a 5a 5a 5a 5a 5a ZZZZZZZZ | ||
135 | [<c010523d>] dump_trace+0x63/0x1eb | ||
136 | [<c01053df>] show_trace_log_lvl+0x1a/0x2f | ||
137 | [<c010601d>] show_trace+0x12/0x14 | ||
138 | [<c0106035>] dump_stack+0x16/0x18 | ||
139 | [<c017e0fa>] object_err+0x143/0x14b | ||
140 | [<c017e2cc>] check_object+0x66/0x234 | ||
141 | [<c017eb43>] __slab_free+0x239/0x384 | ||
142 | [<c017f446>] kfree+0xa6/0xc6 | ||
143 | [<c02e2335>] get_modalias+0xb9/0xf5 | ||
144 | [<c02e23b7>] dmi_dev_uevent+0x27/0x3c | ||
145 | [<c027866a>] dev_uevent+0x1ad/0x1da | ||
146 | [<c0205024>] kobject_uevent_env+0x20a/0x45b | ||
147 | [<c020527f>] kobject_uevent+0xa/0xf | ||
148 | [<c02779f1>] store_uevent+0x4f/0x58 | ||
149 | [<c027758e>] dev_attr_store+0x29/0x2f | ||
150 | [<c01bec4f>] sysfs_write_file+0x16e/0x19c | ||
151 | [<c0183ba7>] vfs_write+0xd1/0x15a | ||
152 | [<c01841d7>] sys_write+0x3d/0x72 | ||
153 | [<c0104112>] sysenter_past_esp+0x5f/0x99 | ||
154 | [<b7f7b410>] 0xb7f7b410 | ||
155 | ======================= | ||
156 | @@@ SLUB kmalloc-8: Restoring redzone (0xcc) from 0xc90f6d28-0xc90f6d2b | ||
157 | |||
158 | |||
159 | |||
160 | If SLUB encounters a corrupted object then it will perform the following | ||
161 | actions: | ||
162 | |||
163 | 1. Isolation and report of the issue | ||
164 | |||
165 | This will be a message in the system log starting with | ||
166 | |||
167 | *** SLUB <slab cache affected>: <What went wrong>@<object address> | ||
168 | offset=<offset of object into slab> flags=<slabflags> | ||
169 | inuse=<objects in use in this slab> freelist=<first free object in slab> | ||
170 | |||
171 | 2. Report on how the problem was dealt with in order to ensure the continued | ||
172 | operation of the system. | ||
173 | |||
174 | These are messages in the system log beginning with | ||
175 | |||
176 | @@@ SLUB <slab cache affected>: <corrective action taken> | ||
177 | |||
178 | |||
179 | In the above sample SLUB found that the Redzone of an active object has | ||
180 | been overwritten. Here a string of 8 characters was written into a slab that | ||
181 | has the length of 8 characters. However, a 8 character string needs a | ||
182 | terminating 0. That zero has overwritten the first byte of the Redzone field. | ||
183 | After reporting the details of the issue encountered the @@@ SLUB message | ||
184 | tell us that SLUB has restored the redzone to its proper value and then | ||
185 | system operations continue. | ||
186 | |||
187 | Various types of lines can follow the @@@ SLUB line: | ||
188 | |||
189 | Bytes b4 <address> : <bytes> | ||
190 | Show a few bytes before the object where the problem was detected. | ||
191 | Can be useful if the corruption does not stop with the start of the | ||
192 | object. | ||
193 | |||
194 | Object <address> : <bytes> | ||
195 | The bytes of the object. If the object is inactive then the bytes | ||
196 | typically contain poisoning values. Any non-poison value shows a | ||
197 | corruption by a write after free. | ||
198 | |||
199 | Redzone <address> : <bytes> | ||
200 | The redzone following the object. The redzone is used to detect | ||
201 | writes after the object. All bytes should always have the same | ||
202 | value. If there is any deviation then it is due to a write after | ||
203 | the object boundary. | ||
204 | |||
205 | Freepointer | ||
206 | The pointer to the next free object in the slab. May become | ||
207 | corrupted if overwriting continues after the red zone. | ||
208 | |||
209 | Last alloc: | ||
210 | Last free: | ||
211 | Shows the address from which the object was allocated/freed last. | ||
212 | We note the pid, the time and the CPU that did so. This is usually | ||
213 | the most useful information to figure out where things went wrong. | ||
214 | Here get_modalias() did an kmalloc(8) instead of a kmalloc(9). | ||
215 | |||
216 | Filler <address> : <bytes> | ||
217 | Unused data to fill up the space in order to get the next object | ||
218 | properly aligned. In the debug case we make sure that there are | ||
219 | at least 4 bytes of filler. This allow for the detection of writes | ||
220 | before the object. | ||
221 | |||
222 | Following the filler will be a stackdump. That stackdump describes the | ||
223 | location where the error was detected. The cause of the corruption is more | ||
224 | likely to be found by looking at the information about the last alloc / free. | ||
225 | |||
226 | Christoph Lameter, <clameter@sgi.com>, May 23, 2007 | ||