diff options
Diffstat (limited to 'Documentation')
64 files changed, 2450 insertions, 762 deletions
diff --git a/Documentation/00-INDEX b/Documentation/00-INDEX index a82a113b4a4b..1977fab38656 100644 --- a/Documentation/00-INDEX +++ b/Documentation/00-INDEX | |||
@@ -329,8 +329,6 @@ sgi-visws.txt | |||
329 | - short blurb on the SGI Visual Workstations. | 329 | - short blurb on the SGI Visual Workstations. |
330 | sh/ | 330 | sh/ |
331 | - directory with info on porting Linux to a new architecture. | 331 | - directory with info on porting Linux to a new architecture. |
332 | smart-config.txt | ||
333 | - description of the Smart Config makefile feature. | ||
334 | sound/ | 332 | sound/ |
335 | - directory with info on sound card support. | 333 | - directory with info on sound card support. |
336 | sparc/ | 334 | sparc/ |
diff --git a/Documentation/ABI/stable/sysfs-class-ubi b/Documentation/ABI/stable/sysfs-class-ubi new file mode 100644 index 000000000000..18d471d9faea --- /dev/null +++ b/Documentation/ABI/stable/sysfs-class-ubi | |||
@@ -0,0 +1,212 @@ | |||
1 | What: /sys/class/ubi/ | ||
2 | Date: July 2006 | ||
3 | KernelVersion: 2.6.22 | ||
4 | Contact: Artem Bityutskiy <dedekind@infradead.org> | ||
5 | Description: | ||
6 | The ubi/ class sub-directory belongs to the UBI subsystem and | ||
7 | provides general UBI information, per-UBI device information | ||
8 | and per-UBI volume information. | ||
9 | |||
10 | What: /sys/class/ubi/version | ||
11 | Date: July 2006 | ||
12 | KernelVersion: 2.6.22 | ||
13 | Contact: Artem Bityutskiy <dedekind@infradead.org> | ||
14 | Description: | ||
15 | This file contains version of the latest supported UBI on-media | ||
16 | format. Currently it is 1, and there is no plan to change this. | ||
17 | However, if in the future UBI needs on-flash format changes | ||
18 | which cannot be done in a compatible manner, a new format | ||
19 | version will be added. So this is a mechanism for possible | ||
20 | future backward-compatible (but forward-incompatible) | ||
21 | improvements. | ||
22 | |||
23 | What: /sys/class/ubiX/ | ||
24 | Date: July 2006 | ||
25 | KernelVersion: 2.6.22 | ||
26 | Contact: Artem Bityutskiy <dedekind@infradead.org> | ||
27 | Description: | ||
28 | The /sys/class/ubi0, /sys/class/ubi1, etc directories describe | ||
29 | UBI devices (UBI device 0, 1, etc). They contain general UBI | ||
30 | device information and per UBI volume information (each UBI | ||
31 | device may have many UBI volumes) | ||
32 | |||
33 | What: /sys/class/ubi/ubiX/avail_eraseblocks | ||
34 | Date: July 2006 | ||
35 | KernelVersion: 2.6.22 | ||
36 | Contact: Artem Bityutskiy <dedekind@infradead.org> | ||
37 | Description: | ||
38 | Amount of available logical eraseblock. For example, one may | ||
39 | create a new UBI volume which has this amount of logical | ||
40 | eraseblocks. | ||
41 | |||
42 | What: /sys/class/ubi/ubiX/bad_peb_count | ||
43 | Date: July 2006 | ||
44 | KernelVersion: 2.6.22 | ||
45 | Contact: Artem Bityutskiy <dedekind@infradead.org> | ||
46 | Description: | ||
47 | Count of bad physical eraseblocks on the underlying MTD device. | ||
48 | |||
49 | What: /sys/class/ubi/ubiX/bgt_enabled | ||
50 | Date: July 2006 | ||
51 | KernelVersion: 2.6.22 | ||
52 | Contact: Artem Bityutskiy <dedekind@infradead.org> | ||
53 | Description: | ||
54 | Contains ASCII "0\n" if the UBI background thread is disabled, | ||
55 | and ASCII "1\n" if it is enabled. | ||
56 | |||
57 | What: /sys/class/ubi/ubiX/dev | ||
58 | Date: July 2006 | ||
59 | KernelVersion: 2.6.22 | ||
60 | Contact: Artem Bityutskiy <dedekind@infradead.org> | ||
61 | Description: | ||
62 | Major and minor numbers of the character device corresponding | ||
63 | to this UBI device (in <major>:<minor> format). | ||
64 | |||
65 | What: /sys/class/ubi/ubiX/eraseblock_size | ||
66 | Date: July 2006 | ||
67 | KernelVersion: 2.6.22 | ||
68 | Contact: Artem Bityutskiy <dedekind@infradead.org> | ||
69 | Description: | ||
70 | Maximum logical eraseblock size this UBI device may provide. UBI | ||
71 | volumes may have smaller logical eraseblock size because of their | ||
72 | alignment. | ||
73 | |||
74 | What: /sys/class/ubi/ubiX/max_ec | ||
75 | Date: July 2006 | ||
76 | KernelVersion: 2.6.22 | ||
77 | Contact: Artem Bityutskiy <dedekind@infradead.org> | ||
78 | Description: | ||
79 | Maximum physical eraseblock erase counter value. | ||
80 | |||
81 | What: /sys/class/ubi/ubiX/max_vol_count | ||
82 | Date: July 2006 | ||
83 | KernelVersion: 2.6.22 | ||
84 | Contact: Artem Bityutskiy <dedekind@infradead.org> | ||
85 | Description: | ||
86 | Maximum number of volumes which this UBI device may have. | ||
87 | |||
88 | What: /sys/class/ubi/ubiX/min_io_size | ||
89 | Date: July 2006 | ||
90 | KernelVersion: 2.6.22 | ||
91 | Contact: Artem Bityutskiy <dedekind@infradead.org> | ||
92 | Description: | ||
93 | Minimum input/output unit size. All the I/O may only be done | ||
94 | in fractions of the contained number. | ||
95 | |||
96 | What: /sys/class/ubi/ubiX/mtd_num | ||
97 | Date: January 2008 | ||
98 | KernelVersion: 2.6.25 | ||
99 | Contact: Artem Bityutskiy <dedekind@infradead.org> | ||
100 | Description: | ||
101 | Number of the underlying MTD device. | ||
102 | |||
103 | What: /sys/class/ubi/ubiX/reserved_for_bad | ||
104 | Date: July 2006 | ||
105 | KernelVersion: 2.6.22 | ||
106 | Contact: Artem Bityutskiy <dedekind@infradead.org> | ||
107 | Description: | ||
108 | Number of physical eraseblocks reserved for bad block handling. | ||
109 | |||
110 | What: /sys/class/ubi/ubiX/total_eraseblocks | ||
111 | Date: July 2006 | ||
112 | KernelVersion: 2.6.22 | ||
113 | Contact: Artem Bityutskiy <dedekind@infradead.org> | ||
114 | Description: | ||
115 | Total number of good (not marked as bad) physical eraseblocks on | ||
116 | the underlying MTD device. | ||
117 | |||
118 | What: /sys/class/ubi/ubiX/volumes_count | ||
119 | Date: July 2006 | ||
120 | KernelVersion: 2.6.22 | ||
121 | Contact: Artem Bityutskiy <dedekind@infradead.org> | ||
122 | Description: | ||
123 | Count of volumes on this UBI device. | ||
124 | |||
125 | What: /sys/class/ubi/ubiX/ubiX_Y/ | ||
126 | Date: July 2006 | ||
127 | KernelVersion: 2.6.22 | ||
128 | Contact: Artem Bityutskiy <dedekind@infradead.org> | ||
129 | Description: | ||
130 | The /sys/class/ubi/ubiX/ubiX_0/, /sys/class/ubi/ubiX/ubiX_1/, | ||
131 | etc directories describe UBI volumes on UBI device X (volumes | ||
132 | 0, 1, etc). | ||
133 | |||
134 | What: /sys/class/ubi/ubiX/ubiX_Y/alignment | ||
135 | Date: July 2006 | ||
136 | KernelVersion: 2.6.22 | ||
137 | Contact: Artem Bityutskiy <dedekind@infradead.org> | ||
138 | Description: | ||
139 | Volume alignment - the value the logical eraseblock size of | ||
140 | this volume has to be aligned on. For example, 2048 means that | ||
141 | logical eraseblock size is multiple of 2048. In other words, | ||
142 | volume logical eraseblock size is UBI device logical eraseblock | ||
143 | size aligned to the alignment value. | ||
144 | |||
145 | What: /sys/class/ubi/ubiX/ubiX_Y/corrupted | ||
146 | Date: July 2006 | ||
147 | KernelVersion: 2.6.22 | ||
148 | Contact: Artem Bityutskiy <dedekind@infradead.org> | ||
149 | Description: | ||
150 | Contains ASCII "0\n" if the UBI volume is OK, and ASCII "1\n" | ||
151 | if it is corrupted (e.g., due to an interrupted volume update). | ||
152 | |||
153 | What: /sys/class/ubi/ubiX/ubiX_Y/data_bytes | ||
154 | Date: July 2006 | ||
155 | KernelVersion: 2.6.22 | ||
156 | Contact: Artem Bityutskiy <dedekind@infradead.org> | ||
157 | Description: | ||
158 | The amount of data this volume contains. This value makes sense | ||
159 | only for static volumes, and for dynamic volume it equivalent | ||
160 | to the total volume size in bytes. | ||
161 | |||
162 | What: /sys/class/ubi/ubiX/ubiX_Y/dev | ||
163 | Date: July 2006 | ||
164 | KernelVersion: 2.6.22 | ||
165 | Contact: Artem Bityutskiy <dedekind@infradead.org> | ||
166 | Description: | ||
167 | Major and minor numbers of the character device corresponding | ||
168 | to this UBI volume (in <major>:<minor> format). | ||
169 | |||
170 | What: /sys/class/ubi/ubiX/ubiX_Y/name | ||
171 | Date: July 2006 | ||
172 | KernelVersion: 2.6.22 | ||
173 | Contact: Artem Bityutskiy <dedekind@infradead.org> | ||
174 | Description: | ||
175 | Volume name. | ||
176 | |||
177 | What: /sys/class/ubi/ubiX/ubiX_Y/reserved_ebs | ||
178 | Date: July 2006 | ||
179 | KernelVersion: 2.6.22 | ||
180 | Contact: Artem Bityutskiy <dedekind@infradead.org> | ||
181 | Description: | ||
182 | Count of physical eraseblock reserved for this volume. | ||
183 | Equivalent to the volume size in logical eraseblocks. | ||
184 | |||
185 | What: /sys/class/ubi/ubiX/ubiX_Y/type | ||
186 | Date: July 2006 | ||
187 | KernelVersion: 2.6.22 | ||
188 | Contact: Artem Bityutskiy <dedekind@infradead.org> | ||
189 | Description: | ||
190 | Volume type. Contains ASCII "dynamic\n" for dynamic volumes and | ||
191 | "static\n" for static volumes. | ||
192 | |||
193 | What: /sys/class/ubi/ubiX/ubiX_Y/upd_marker | ||
194 | Date: July 2006 | ||
195 | KernelVersion: 2.6.22 | ||
196 | Contact: Artem Bityutskiy <dedekind@infradead.org> | ||
197 | Description: | ||
198 | Contains ASCII "0\n" if the update marker is not set for this | ||
199 | volume, and "1\n" if it is set. The update marker is set when | ||
200 | volume update starts, and cleaned when it ends. So the presence | ||
201 | of the update marker indicates that the volume is being updated | ||
202 | at the moment of the update was interrupted. The later may be | ||
203 | checked using the "corrupted" sysfs file. | ||
204 | |||
205 | What: /sys/class/ubi/ubiX/ubiX_Y/usable_eb_size | ||
206 | Date: July 2006 | ||
207 | KernelVersion: 2.6.22 | ||
208 | Contact: Artem Bityutskiy <dedekind@infradead.org> | ||
209 | Description: | ||
210 | Logical eraseblock size of this volume. Equivalent to logical | ||
211 | eraseblock size of the device aligned on the volume alignment | ||
212 | value. | ||
diff --git a/Documentation/DMA-API.txt b/Documentation/DMA-API.txt index b939ebb62871..80d150458c80 100644 --- a/Documentation/DMA-API.txt +++ b/Documentation/DMA-API.txt | |||
@@ -145,7 +145,7 @@ Part Ic - DMA addressing limitations | |||
145 | int | 145 | int |
146 | dma_supported(struct device *dev, u64 mask) | 146 | dma_supported(struct device *dev, u64 mask) |
147 | int | 147 | int |
148 | pci_dma_supported(struct device *dev, u64 mask) | 148 | pci_dma_supported(struct pci_dev *hwdev, u64 mask) |
149 | 149 | ||
150 | Checks to see if the device can support DMA to the memory described by | 150 | Checks to see if the device can support DMA to the memory described by |
151 | mask. | 151 | mask. |
@@ -189,7 +189,7 @@ dma_addr_t | |||
189 | dma_map_single(struct device *dev, void *cpu_addr, size_t size, | 189 | dma_map_single(struct device *dev, void *cpu_addr, size_t size, |
190 | enum dma_data_direction direction) | 190 | enum dma_data_direction direction) |
191 | dma_addr_t | 191 | dma_addr_t |
192 | pci_map_single(struct device *dev, void *cpu_addr, size_t size, | 192 | pci_map_single(struct pci_dev *hwdev, void *cpu_addr, size_t size, |
193 | int direction) | 193 | int direction) |
194 | 194 | ||
195 | Maps a piece of processor virtual memory so it can be accessed by the | 195 | Maps a piece of processor virtual memory so it can be accessed by the |
@@ -395,6 +395,71 @@ Notes: You must do this: | |||
395 | 395 | ||
396 | See also dma_map_single(). | 396 | See also dma_map_single(). |
397 | 397 | ||
398 | dma_addr_t | ||
399 | dma_map_single_attrs(struct device *dev, void *cpu_addr, size_t size, | ||
400 | enum dma_data_direction dir, | ||
401 | struct dma_attrs *attrs) | ||
402 | |||
403 | void | ||
404 | dma_unmap_single_attrs(struct device *dev, dma_addr_t dma_addr, | ||
405 | size_t size, enum dma_data_direction dir, | ||
406 | struct dma_attrs *attrs) | ||
407 | |||
408 | int | ||
409 | dma_map_sg_attrs(struct device *dev, struct scatterlist *sgl, | ||
410 | int nents, enum dma_data_direction dir, | ||
411 | struct dma_attrs *attrs) | ||
412 | |||
413 | void | ||
414 | dma_unmap_sg_attrs(struct device *dev, struct scatterlist *sgl, | ||
415 | int nents, enum dma_data_direction dir, | ||
416 | struct dma_attrs *attrs) | ||
417 | |||
418 | The four functions above are just like the counterpart functions | ||
419 | without the _attrs suffixes, except that they pass an optional | ||
420 | struct dma_attrs*. | ||
421 | |||
422 | struct dma_attrs encapsulates a set of "dma attributes". For the | ||
423 | definition of struct dma_attrs see linux/dma-attrs.h. | ||
424 | |||
425 | The interpretation of dma attributes is architecture-specific, and | ||
426 | each attribute should be documented in Documentation/DMA-attributes.txt. | ||
427 | |||
428 | If struct dma_attrs* is NULL, the semantics of each of these | ||
429 | functions is identical to those of the corresponding function | ||
430 | without the _attrs suffix. As a result dma_map_single_attrs() | ||
431 | can generally replace dma_map_single(), etc. | ||
432 | |||
433 | As an example of the use of the *_attrs functions, here's how | ||
434 | you could pass an attribute DMA_ATTR_FOO when mapping memory | ||
435 | for DMA: | ||
436 | |||
437 | #include <linux/dma-attrs.h> | ||
438 | /* DMA_ATTR_FOO should be defined in linux/dma-attrs.h and | ||
439 | * documented in Documentation/DMA-attributes.txt */ | ||
440 | ... | ||
441 | |||
442 | DEFINE_DMA_ATTRS(attrs); | ||
443 | dma_set_attr(DMA_ATTR_FOO, &attrs); | ||
444 | .... | ||
445 | n = dma_map_sg_attrs(dev, sg, nents, DMA_TO_DEVICE, &attr); | ||
446 | .... | ||
447 | |||
448 | Architectures that care about DMA_ATTR_FOO would check for its | ||
449 | presence in their implementations of the mapping and unmapping | ||
450 | routines, e.g.: | ||
451 | |||
452 | void whizco_dma_map_sg_attrs(struct device *dev, dma_addr_t dma_addr, | ||
453 | size_t size, enum dma_data_direction dir, | ||
454 | struct dma_attrs *attrs) | ||
455 | { | ||
456 | .... | ||
457 | int foo = dma_get_attr(DMA_ATTR_FOO, attrs); | ||
458 | .... | ||
459 | if (foo) | ||
460 | /* twizzle the frobnozzle */ | ||
461 | .... | ||
462 | |||
398 | 463 | ||
399 | Part II - Advanced dma_ usage | 464 | Part II - Advanced dma_ usage |
400 | ----------------------------- | 465 | ----------------------------- |
diff --git a/Documentation/DMA-attributes.txt b/Documentation/DMA-attributes.txt new file mode 100644 index 000000000000..6d772f84b477 --- /dev/null +++ b/Documentation/DMA-attributes.txt | |||
@@ -0,0 +1,24 @@ | |||
1 | DMA attributes | ||
2 | ============== | ||
3 | |||
4 | This document describes the semantics of the DMA attributes that are | ||
5 | defined in linux/dma-attrs.h. | ||
6 | |||
7 | DMA_ATTR_WRITE_BARRIER | ||
8 | ---------------------- | ||
9 | |||
10 | DMA_ATTR_WRITE_BARRIER is a (write) barrier attribute for DMA. DMA | ||
11 | to a memory region with the DMA_ATTR_WRITE_BARRIER attribute forces | ||
12 | all pending DMA writes to complete, and thus provides a mechanism to | ||
13 | strictly order DMA from a device across all intervening busses and | ||
14 | bridges. This barrier is not specific to a particular type of | ||
15 | interconnect, it applies to the system as a whole, and so its | ||
16 | implementation must account for the idiosyncracies of the system all | ||
17 | the way from the DMA device to memory. | ||
18 | |||
19 | As an example of a situation where DMA_ATTR_WRITE_BARRIER would be | ||
20 | useful, suppose that a device does a DMA write to indicate that data is | ||
21 | ready and available in memory. The DMA of the "completion indication" | ||
22 | could race with data DMA. Mapping the memory used for completion | ||
23 | indications with DMA_ATTR_WRITE_BARRIER would prevent the race. | ||
24 | |||
diff --git a/Documentation/DocBook/Makefile b/Documentation/DocBook/Makefile index b2b6366bba51..83966e94cc32 100644 --- a/Documentation/DocBook/Makefile +++ b/Documentation/DocBook/Makefile | |||
@@ -187,8 +187,11 @@ quiet_cmd_fig2png = FIG2PNG $@ | |||
187 | 187 | ||
188 | ### | 188 | ### |
189 | # Rule to convert a .c file to inline XML documentation | 189 | # Rule to convert a .c file to inline XML documentation |
190 | gen_xml = : | ||
191 | quiet_gen_xml = echo ' GEN $@' | ||
192 | silent_gen_xml = : | ||
190 | %.xml: %.c | 193 | %.xml: %.c |
191 | @echo ' GEN $@' | 194 | @$($(quiet)gen_xml) |
192 | @( \ | 195 | @( \ |
193 | echo "<programlisting>"; \ | 196 | echo "<programlisting>"; \ |
194 | expand --tabs=8 < $< | \ | 197 | expand --tabs=8 < $< | \ |
diff --git a/Documentation/DocBook/kernel-api.tmpl b/Documentation/DocBook/kernel-api.tmpl index 488dd4a4945b..b7b1482f6e04 100644 --- a/Documentation/DocBook/kernel-api.tmpl +++ b/Documentation/DocBook/kernel-api.tmpl | |||
@@ -119,7 +119,7 @@ X!Ilib/string.c | |||
119 | !Elib/string.c | 119 | !Elib/string.c |
120 | </sect1> | 120 | </sect1> |
121 | <sect1><title>Bit Operations</title> | 121 | <sect1><title>Bit Operations</title> |
122 | !Iinclude/asm-x86/bitops_32.h | 122 | !Iinclude/asm-x86/bitops.h |
123 | </sect1> | 123 | </sect1> |
124 | </chapter> | 124 | </chapter> |
125 | 125 | ||
@@ -645,4 +645,58 @@ X!Idrivers/video/console/fonts.c | |||
645 | !Edrivers/i2c/i2c-core.c | 645 | !Edrivers/i2c/i2c-core.c |
646 | </chapter> | 646 | </chapter> |
647 | 647 | ||
648 | <chapter id="clk"> | ||
649 | <title>Clock Framework</title> | ||
650 | |||
651 | <para> | ||
652 | The clock framework defines programming interfaces to support | ||
653 | software management of the system clock tree. | ||
654 | This framework is widely used with System-On-Chip (SOC) platforms | ||
655 | to support power management and various devices which may need | ||
656 | custom clock rates. | ||
657 | Note that these "clocks" don't relate to timekeeping or real | ||
658 | time clocks (RTCs), each of which have separate frameworks. | ||
659 | These <structname>struct clk</structname> instances may be used | ||
660 | to manage for example a 96 MHz signal that is used to shift bits | ||
661 | into and out of peripherals or busses, or otherwise trigger | ||
662 | synchronous state machine transitions in system hardware. | ||
663 | </para> | ||
664 | |||
665 | <para> | ||
666 | Power management is supported by explicit software clock gating: | ||
667 | unused clocks are disabled, so the system doesn't waste power | ||
668 | changing the state of transistors that aren't in active use. | ||
669 | On some systems this may be backed by hardware clock gating, | ||
670 | where clocks are gated without being disabled in software. | ||
671 | Sections of chips that are powered but not clocked may be able | ||
672 | to retain their last state. | ||
673 | This low power state is often called a <emphasis>retention | ||
674 | mode</emphasis>. | ||
675 | This mode still incurs leakage currents, especially with finer | ||
676 | circuit geometries, but for CMOS circuits power is mostly used | ||
677 | by clocked state changes. | ||
678 | </para> | ||
679 | |||
680 | <para> | ||
681 | Power-aware drivers only enable their clocks when the device | ||
682 | they manage is in active use. Also, system sleep states often | ||
683 | differ according to which clock domains are active: while a | ||
684 | "standby" state may allow wakeup from several active domains, a | ||
685 | "mem" (suspend-to-RAM) state may require a more wholesale shutdown | ||
686 | of clocks derived from higher speed PLLs and oscillators, limiting | ||
687 | the number of possible wakeup event sources. A driver's suspend | ||
688 | method may need to be aware of system-specific clock constraints | ||
689 | on the target sleep state. | ||
690 | </para> | ||
691 | |||
692 | <para> | ||
693 | Some platforms support programmable clock generators. These | ||
694 | can be used by external chips of various kinds, such as other | ||
695 | CPUs, multimedia codecs, and devices with strict requirements | ||
696 | for interface clocking. | ||
697 | </para> | ||
698 | |||
699 | !Iinclude/linux/clk.h | ||
700 | </chapter> | ||
701 | |||
648 | </book> | 702 | </book> |
diff --git a/Documentation/HOWTO b/Documentation/HOWTO index 54835610b3d6..0291ade44c17 100644 --- a/Documentation/HOWTO +++ b/Documentation/HOWTO | |||
@@ -249,9 +249,11 @@ process is as follows: | |||
249 | release a new -rc kernel every week. | 249 | release a new -rc kernel every week. |
250 | - Process continues until the kernel is considered "ready", the | 250 | - Process continues until the kernel is considered "ready", the |
251 | process should last around 6 weeks. | 251 | process should last around 6 weeks. |
252 | - A list of known regressions present in each -rc release is | 252 | - Known regressions in each release are periodically posted to the |
253 | tracked at the following URI: | 253 | linux-kernel mailing list. The goal is to reduce the length of |
254 | http://kernelnewbies.org/known_regressions | 254 | that list to zero before declaring the kernel to be "ready," but, in |
255 | the real world, a small number of regressions often remain at | ||
256 | release time. | ||
255 | 257 | ||
256 | It is worth mentioning what Andrew Morton wrote on the linux-kernel | 258 | It is worth mentioning what Andrew Morton wrote on the linux-kernel |
257 | mailing list about kernel releases: | 259 | mailing list about kernel releases: |
@@ -261,7 +263,7 @@ mailing list about kernel releases: | |||
261 | 263 | ||
262 | 2.6.x.y -stable kernel tree | 264 | 2.6.x.y -stable kernel tree |
263 | --------------------------- | 265 | --------------------------- |
264 | Kernels with 4 digit versions are -stable kernels. They contain | 266 | Kernels with 4-part versions are -stable kernels. They contain |
265 | relatively small and critical fixes for security problems or significant | 267 | relatively small and critical fixes for security problems or significant |
266 | regressions discovered in a given 2.6.x kernel. | 268 | regressions discovered in a given 2.6.x kernel. |
267 | 269 | ||
@@ -273,7 +275,10 @@ If no 2.6.x.y kernel is available, then the highest numbered 2.6.x | |||
273 | kernel is the current stable kernel. | 275 | kernel is the current stable kernel. |
274 | 276 | ||
275 | 2.6.x.y are maintained by the "stable" team <stable@kernel.org>, and are | 277 | 2.6.x.y are maintained by the "stable" team <stable@kernel.org>, and are |
276 | released almost every other week. | 278 | released as needs dictate. The normal release period is approximately |
279 | two weeks, but it can be longer if there are no pressing problems. A | ||
280 | security-related problem, instead, can cause a release to happen almost | ||
281 | instantly. | ||
277 | 282 | ||
278 | The file Documentation/stable_kernel_rules.txt in the kernel tree | 283 | The file Documentation/stable_kernel_rules.txt in the kernel tree |
279 | documents what kinds of changes are acceptable for the -stable tree, and | 284 | documents what kinds of changes are acceptable for the -stable tree, and |
@@ -298,7 +303,9 @@ a while Andrew or the subsystem maintainer pushes it on to Linus for | |||
298 | inclusion in mainline. | 303 | inclusion in mainline. |
299 | 304 | ||
300 | It is heavily encouraged that all new patches get tested in the -mm tree | 305 | It is heavily encouraged that all new patches get tested in the -mm tree |
301 | before they are sent to Linus for inclusion in the main kernel tree. | 306 | before they are sent to Linus for inclusion in the main kernel tree. Code |
307 | which does not make an appearance in -mm before the opening of the merge | ||
308 | window will prove hard to merge into the mainline. | ||
302 | 309 | ||
303 | These kernels are not appropriate for use on systems that are supposed | 310 | These kernels are not appropriate for use on systems that are supposed |
304 | to be stable and they are more risky to run than any of the other | 311 | to be stable and they are more risky to run than any of the other |
@@ -354,11 +361,12 @@ Here is a list of some of the different kernel trees available: | |||
354 | - SCSI, James Bottomley <James.Bottomley@SteelEye.com> | 361 | - SCSI, James Bottomley <James.Bottomley@SteelEye.com> |
355 | git.kernel.org:/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6.git | 362 | git.kernel.org:/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6.git |
356 | 363 | ||
364 | - x86, Ingo Molnar <mingo@elte.hu> | ||
365 | git://git.kernel.org/pub/scm/linux/kernel/git/x86/linux-2.6-x86.git | ||
366 | |||
357 | quilt trees: | 367 | quilt trees: |
358 | - USB, PCI, Driver Core, and I2C, Greg Kroah-Hartman <gregkh@suse.de> | 368 | - USB, Driver Core, and I2C, Greg Kroah-Hartman <gregkh@suse.de> |
359 | kernel.org/pub/linux/kernel/people/gregkh/gregkh-2.6/ | 369 | kernel.org/pub/linux/kernel/people/gregkh/gregkh-2.6/ |
360 | - x86-64, partly i386, Andi Kleen <ak@suse.de> | ||
361 | ftp.firstfloor.org:/pub/ak/x86_64/quilt/ | ||
362 | 370 | ||
363 | Other kernel trees can be found listed at http://git.kernel.org/ and in | 371 | Other kernel trees can be found listed at http://git.kernel.org/ and in |
364 | the MAINTAINERS file. | 372 | the MAINTAINERS file. |
@@ -392,8 +400,8 @@ If you want to be advised of the future bug reports, you can subscribe to the | |||
392 | bugme-new mailing list (only new bug reports are mailed here) or to the | 400 | bugme-new mailing list (only new bug reports are mailed here) or to the |
393 | bugme-janitor mailing list (every change in the bugzilla is mailed here) | 401 | bugme-janitor mailing list (every change in the bugzilla is mailed here) |
394 | 402 | ||
395 | http://lists.osdl.org/mailman/listinfo/bugme-new | 403 | http://lists.linux-foundation.org/mailman/listinfo/bugme-new |
396 | http://lists.osdl.org/mailman/listinfo/bugme-janitors | 404 | http://lists.linux-foundation.org/mailman/listinfo/bugme-janitors |
397 | 405 | ||
398 | 406 | ||
399 | 407 | ||
diff --git a/Documentation/arm/Samsung-S3C24XX/NAND.txt b/Documentation/arm/Samsung-S3C24XX/NAND.txt new file mode 100644 index 000000000000..bc478a3409b8 --- /dev/null +++ b/Documentation/arm/Samsung-S3C24XX/NAND.txt | |||
@@ -0,0 +1,30 @@ | |||
1 | S3C24XX NAND Support | ||
2 | ==================== | ||
3 | |||
4 | Introduction | ||
5 | ------------ | ||
6 | |||
7 | Small Page NAND | ||
8 | --------------- | ||
9 | |||
10 | The driver uses a 512 byte (1 page) ECC code for this setup. The | ||
11 | ECC code is not directly compatible with the default kernel ECC | ||
12 | code, so the driver enforces its own OOB layout and ECC parameters | ||
13 | |||
14 | Large Page NAND | ||
15 | --------------- | ||
16 | |||
17 | The driver is capable of handling NAND flash with a 2KiB page | ||
18 | size, with support for hardware ECC generation and correction. | ||
19 | |||
20 | Unlike the 512byte page mode, the driver generates ECC data for | ||
21 | each 256 byte block in an 2KiB page. This means that more than | ||
22 | one error in a page can be rectified. It also means that the | ||
23 | OOB layout remains the default kernel layout for these flashes. | ||
24 | |||
25 | |||
26 | Document Author | ||
27 | --------------- | ||
28 | |||
29 | Ben Dooks, Copyright 2007 Simtec Electronics | ||
30 | |||
diff --git a/Documentation/arm/Samsung-S3C24XX/Overview.txt b/Documentation/arm/Samsung-S3C24XX/Overview.txt index c31b76fa66c4..d04e1e30c47f 100644 --- a/Documentation/arm/Samsung-S3C24XX/Overview.txt +++ b/Documentation/arm/Samsung-S3C24XX/Overview.txt | |||
@@ -156,6 +156,8 @@ NAND | |||
156 | controller. If there are any problems the latest linux-mtd | 156 | controller. If there are any problems the latest linux-mtd |
157 | code can be found from http://www.linux-mtd.infradead.org/ | 157 | code can be found from http://www.linux-mtd.infradead.org/ |
158 | 158 | ||
159 | For more information see Documentation/arm/Samsung-S3C24XX/NAND.txt | ||
160 | |||
159 | 161 | ||
160 | Serial | 162 | Serial |
161 | ------ | 163 | ------ |
diff --git a/Documentation/cgroups.txt b/Documentation/cgroups.txt index 31d12e21ff8a..c298a6690e0d 100644 --- a/Documentation/cgroups.txt +++ b/Documentation/cgroups.txt | |||
@@ -500,8 +500,7 @@ post-attachment activity that requires memory allocations or blocking. | |||
500 | 500 | ||
501 | void fork(struct cgroup_subsy *ss, struct task_struct *task) | 501 | void fork(struct cgroup_subsy *ss, struct task_struct *task) |
502 | 502 | ||
503 | Called when a task is forked into a cgroup. Also called during | 503 | Called when a task is forked into a cgroup. |
504 | registration for all existing tasks. | ||
505 | 504 | ||
506 | void exit(struct cgroup_subsys *ss, struct task_struct *task) | 505 | void exit(struct cgroup_subsys *ss, struct task_struct *task) |
507 | 506 | ||
diff --git a/Documentation/controllers/devices.txt b/Documentation/controllers/devices.txt new file mode 100644 index 000000000000..4dcea42432c2 --- /dev/null +++ b/Documentation/controllers/devices.txt | |||
@@ -0,0 +1,48 @@ | |||
1 | Device Whitelist Controller | ||
2 | |||
3 | 1. Description: | ||
4 | |||
5 | Implement a cgroup to track and enforce open and mknod restrictions | ||
6 | on device files. A device cgroup associates a device access | ||
7 | whitelist with each cgroup. A whitelist entry has 4 fields. | ||
8 | 'type' is a (all), c (char), or b (block). 'all' means it applies | ||
9 | to all types and all major and minor numbers. Major and minor are | ||
10 | either an integer or * for all. Access is a composition of r | ||
11 | (read), w (write), and m (mknod). | ||
12 | |||
13 | The root device cgroup starts with rwm to 'all'. A child device | ||
14 | cgroup gets a copy of the parent. Administrators can then remove | ||
15 | devices from the whitelist or add new entries. A child cgroup can | ||
16 | never receive a device access which is denied its parent. However | ||
17 | when a device access is removed from a parent it will not also be | ||
18 | removed from the child(ren). | ||
19 | |||
20 | 2. User Interface | ||
21 | |||
22 | An entry is added using devices.allow, and removed using | ||
23 | devices.deny. For instance | ||
24 | |||
25 | echo 'c 1:3 mr' > /cgroups/1/devices.allow | ||
26 | |||
27 | allows cgroup 1 to read and mknod the device usually known as | ||
28 | /dev/null. Doing | ||
29 | |||
30 | echo a > /cgroups/1/devices.deny | ||
31 | |||
32 | will remove the default 'a *:* mrw' entry. | ||
33 | |||
34 | 3. Security | ||
35 | |||
36 | Any task can move itself between cgroups. This clearly won't | ||
37 | suffice, but we can decide the best way to adequately restrict | ||
38 | movement as people get some experience with this. We may just want | ||
39 | to require CAP_SYS_ADMIN, which at least is a separate bit from | ||
40 | CAP_MKNOD. We may want to just refuse moving to a cgroup which | ||
41 | isn't a descendent of the current one. Or we may want to use | ||
42 | CAP_MAC_ADMIN, since we really are trying to lock down root. | ||
43 | |||
44 | CAP_SYS_ADMIN is needed to modify the whitelist or move another | ||
45 | task to a new cgroup. (Again we'll probably want to change that). | ||
46 | |||
47 | A cgroup may not be granted more permissions than the cgroup's | ||
48 | parent has. | ||
diff --git a/Documentation/controllers/resource_counter.txt b/Documentation/controllers/resource_counter.txt new file mode 100644 index 000000000000..f196ac1d7d25 --- /dev/null +++ b/Documentation/controllers/resource_counter.txt | |||
@@ -0,0 +1,181 @@ | |||
1 | |||
2 | The Resource Counter | ||
3 | |||
4 | The resource counter, declared at include/linux/res_counter.h, | ||
5 | is supposed to facilitate the resource management by controllers | ||
6 | by providing common stuff for accounting. | ||
7 | |||
8 | This "stuff" includes the res_counter structure and routines | ||
9 | to work with it. | ||
10 | |||
11 | |||
12 | |||
13 | 1. Crucial parts of the res_counter structure | ||
14 | |||
15 | a. unsigned long long usage | ||
16 | |||
17 | The usage value shows the amount of a resource that is consumed | ||
18 | by a group at a given time. The units of measurement should be | ||
19 | determined by the controller that uses this counter. E.g. it can | ||
20 | be bytes, items or any other unit the controller operates on. | ||
21 | |||
22 | b. unsigned long long max_usage | ||
23 | |||
24 | The maximal value of the usage over time. | ||
25 | |||
26 | This value is useful when gathering statistical information about | ||
27 | the particular group, as it shows the actual resource requirements | ||
28 | for a particular group, not just some usage snapshot. | ||
29 | |||
30 | c. unsigned long long limit | ||
31 | |||
32 | The maximal allowed amount of resource to consume by the group. In | ||
33 | case the group requests for more resources, so that the usage value | ||
34 | would exceed the limit, the resource allocation is rejected (see | ||
35 | the next section). | ||
36 | |||
37 | d. unsigned long long failcnt | ||
38 | |||
39 | The failcnt stands for "failures counter". This is the number of | ||
40 | resource allocation attempts that failed. | ||
41 | |||
42 | c. spinlock_t lock | ||
43 | |||
44 | Protects changes of the above values. | ||
45 | |||
46 | |||
47 | |||
48 | 2. Basic accounting routines | ||
49 | |||
50 | a. void res_counter_init(struct res_counter *rc) | ||
51 | |||
52 | Initializes the resource counter. As usual, should be the first | ||
53 | routine called for a new counter. | ||
54 | |||
55 | b. int res_counter_charge[_locked] | ||
56 | (struct res_counter *rc, unsigned long val) | ||
57 | |||
58 | When a resource is about to be allocated it has to be accounted | ||
59 | with the appropriate resource counter (controller should determine | ||
60 | which one to use on its own). This operation is called "charging". | ||
61 | |||
62 | This is not very important which operation - resource allocation | ||
63 | or charging - is performed first, but | ||
64 | * if the allocation is performed first, this may create a | ||
65 | temporary resource over-usage by the time resource counter is | ||
66 | charged; | ||
67 | * if the charging is performed first, then it should be uncharged | ||
68 | on error path (if the one is called). | ||
69 | |||
70 | c. void res_counter_uncharge[_locked] | ||
71 | (struct res_counter *rc, unsigned long val) | ||
72 | |||
73 | When a resource is released (freed) it should be de-accounted | ||
74 | from the resource counter it was accounted to. This is called | ||
75 | "uncharging". | ||
76 | |||
77 | The _locked routines imply that the res_counter->lock is taken. | ||
78 | |||
79 | |||
80 | 2.1 Other accounting routines | ||
81 | |||
82 | There are more routines that may help you with common needs, like | ||
83 | checking whether the limit is reached or resetting the max_usage | ||
84 | value. They are all declared in include/linux/res_counter.h. | ||
85 | |||
86 | |||
87 | |||
88 | 3. Analyzing the resource counter registrations | ||
89 | |||
90 | a. If the failcnt value constantly grows, this means that the counter's | ||
91 | limit is too tight. Either the group is misbehaving and consumes too | ||
92 | many resources, or the configuration is not suitable for the group | ||
93 | and the limit should be increased. | ||
94 | |||
95 | b. The max_usage value can be used to quickly tune the group. One may | ||
96 | set the limits to maximal values and either load the container with | ||
97 | a common pattern or leave one for a while. After this the max_usage | ||
98 | value shows the amount of memory the container would require during | ||
99 | its common activity. | ||
100 | |||
101 | Setting the limit a bit above this value gives a pretty good | ||
102 | configuration that works in most of the cases. | ||
103 | |||
104 | c. If the max_usage is much less than the limit, but the failcnt value | ||
105 | is growing, then the group tries to allocate a big chunk of resource | ||
106 | at once. | ||
107 | |||
108 | d. If the max_usage is much less than the limit, but the failcnt value | ||
109 | is 0, then this group is given too high limit, that it does not | ||
110 | require. It is better to lower the limit a bit leaving more resource | ||
111 | for other groups. | ||
112 | |||
113 | |||
114 | |||
115 | 4. Communication with the control groups subsystem (cgroups) | ||
116 | |||
117 | All the resource controllers that are using cgroups and resource counters | ||
118 | should provide files (in the cgroup filesystem) to work with the resource | ||
119 | counter fields. They are recommended to adhere to the following rules: | ||
120 | |||
121 | a. File names | ||
122 | |||
123 | Field name File name | ||
124 | --------------------------------------------------- | ||
125 | usage usage_in_<unit_of_measurement> | ||
126 | max_usage max_usage_in_<unit_of_measurement> | ||
127 | limit limit_in_<unit_of_measurement> | ||
128 | failcnt failcnt | ||
129 | lock no file :) | ||
130 | |||
131 | b. Reading from file should show the corresponding field value in the | ||
132 | appropriate format. | ||
133 | |||
134 | c. Writing to file | ||
135 | |||
136 | Field Expected behavior | ||
137 | ---------------------------------- | ||
138 | usage prohibited | ||
139 | max_usage reset to usage | ||
140 | limit set the limit | ||
141 | failcnt reset to zero | ||
142 | |||
143 | |||
144 | |||
145 | 5. Usage example | ||
146 | |||
147 | a. Declare a task group (take a look at cgroups subsystem for this) and | ||
148 | fold a res_counter into it | ||
149 | |||
150 | struct my_group { | ||
151 | struct res_counter res; | ||
152 | |||
153 | <other fields> | ||
154 | } | ||
155 | |||
156 | b. Put hooks in resource allocation/release paths | ||
157 | |||
158 | int alloc_something(...) | ||
159 | { | ||
160 | if (res_counter_charge(res_counter_ptr, amount) < 0) | ||
161 | return -ENOMEM; | ||
162 | |||
163 | <allocate the resource and return to the caller> | ||
164 | } | ||
165 | |||
166 | void release_something(...) | ||
167 | { | ||
168 | res_counter_uncharge(res_counter_ptr, amount); | ||
169 | |||
170 | <release the resource> | ||
171 | } | ||
172 | |||
173 | In order to keep the usage value self-consistent, both the | ||
174 | "res_counter_ptr" and the "amount" in release_something() should be | ||
175 | the same as they were in the alloc_something() when the releasing | ||
176 | resource was allocated. | ||
177 | |||
178 | c. Provide the way to read res_counter values and set them (the cgroups | ||
179 | still can help with it). | ||
180 | |||
181 | c. Compile and run :) | ||
diff --git a/Documentation/cpu-freq/user-guide.txt b/Documentation/cpu-freq/user-guide.txt index af3b925ece08..6c442d8426b5 100644 --- a/Documentation/cpu-freq/user-guide.txt +++ b/Documentation/cpu-freq/user-guide.txt | |||
@@ -154,6 +154,11 @@ scaling_governor, and by "echoing" the name of another | |||
154 | that some governors won't load - they only | 154 | that some governors won't load - they only |
155 | work on some specific architectures or | 155 | work on some specific architectures or |
156 | processors. | 156 | processors. |
157 | |||
158 | cpuinfo_cur_freq : Current speed of the CPU, in KHz. | ||
159 | |||
160 | scaling_available_frequencies : List of available frequencies, in KHz. | ||
161 | |||
157 | scaling_min_freq and | 162 | scaling_min_freq and |
158 | scaling_max_freq show the current "policy limits" (in | 163 | scaling_max_freq show the current "policy limits" (in |
159 | kHz). By echoing new values into these | 164 | kHz). By echoing new values into these |
@@ -162,6 +167,15 @@ scaling_max_freq show the current "policy limits" (in | |||
162 | first set scaling_max_freq, then | 167 | first set scaling_max_freq, then |
163 | scaling_min_freq. | 168 | scaling_min_freq. |
164 | 169 | ||
170 | affected_cpus : List of CPUs that require software coordination | ||
171 | of frequency. | ||
172 | |||
173 | related_cpus : List of CPUs that need some sort of frequency | ||
174 | coordination, whether software or hardware. | ||
175 | |||
176 | scaling_driver : Hardware driver for cpufreq. | ||
177 | |||
178 | scaling_cur_freq : Current frequency of the CPU, in KHz. | ||
165 | 179 | ||
166 | If you have selected the "userspace" governor which allows you to | 180 | If you have selected the "userspace" governor which allows you to |
167 | set the CPU operating frequency to a specific value, you can read out | 181 | set the CPU operating frequency to a specific value, you can read out |
diff --git a/Documentation/cpusets.txt b/Documentation/cpusets.txt index aa854b9b18cd..fb7b361e6eea 100644 --- a/Documentation/cpusets.txt +++ b/Documentation/cpusets.txt | |||
@@ -171,6 +171,7 @@ files describing that cpuset: | |||
171 | - memory_migrate flag: if set, move pages to cpusets nodes | 171 | - memory_migrate flag: if set, move pages to cpusets nodes |
172 | - cpu_exclusive flag: is cpu placement exclusive? | 172 | - cpu_exclusive flag: is cpu placement exclusive? |
173 | - mem_exclusive flag: is memory placement exclusive? | 173 | - mem_exclusive flag: is memory placement exclusive? |
174 | - mem_hardwall flag: is memory allocation hardwalled | ||
174 | - memory_pressure: measure of how much paging pressure in cpuset | 175 | - memory_pressure: measure of how much paging pressure in cpuset |
175 | 176 | ||
176 | In addition, the root cpuset only has the following file: | 177 | In addition, the root cpuset only has the following file: |
@@ -222,17 +223,18 @@ If a cpuset is cpu or mem exclusive, no other cpuset, other than | |||
222 | a direct ancestor or descendent, may share any of the same CPUs or | 223 | a direct ancestor or descendent, may share any of the same CPUs or |
223 | Memory Nodes. | 224 | Memory Nodes. |
224 | 225 | ||
225 | A cpuset that is mem_exclusive restricts kernel allocations for | 226 | A cpuset that is mem_exclusive *or* mem_hardwall is "hardwalled", |
226 | page, buffer and other data commonly shared by the kernel across | 227 | i.e. it restricts kernel allocations for page, buffer and other data |
227 | multiple users. All cpusets, whether mem_exclusive or not, restrict | 228 | commonly shared by the kernel across multiple users. All cpusets, |
228 | allocations of memory for user space. This enables configuring a | 229 | whether hardwalled or not, restrict allocations of memory for user |
229 | system so that several independent jobs can share common kernel data, | 230 | space. This enables configuring a system so that several independent |
230 | such as file system pages, while isolating each jobs user allocation in | 231 | jobs can share common kernel data, such as file system pages, while |
231 | its own cpuset. To do this, construct a large mem_exclusive cpuset to | 232 | isolating each job's user allocation in its own cpuset. To do this, |
232 | hold all the jobs, and construct child, non-mem_exclusive cpusets for | 233 | construct a large mem_exclusive cpuset to hold all the jobs, and |
233 | each individual job. Only a small amount of typical kernel memory, | 234 | construct child, non-mem_exclusive cpusets for each individual job. |
234 | such as requests from interrupt handlers, is allowed to be taken | 235 | Only a small amount of typical kernel memory, such as requests from |
235 | outside even a mem_exclusive cpuset. | 236 | interrupt handlers, is allowed to be taken outside even a |
237 | mem_exclusive cpuset. | ||
236 | 238 | ||
237 | 239 | ||
238 | 1.5 What is memory_pressure ? | 240 | 1.5 What is memory_pressure ? |
@@ -707,7 +709,7 @@ Now you want to do something with this cpuset. | |||
707 | 709 | ||
708 | In this directory you can find several files: | 710 | In this directory you can find several files: |
709 | # ls | 711 | # ls |
710 | cpus cpu_exclusive mems mem_exclusive tasks | 712 | cpus cpu_exclusive mems mem_exclusive mem_hardwall tasks |
711 | 713 | ||
712 | Reading them will give you information about the state of this cpuset: | 714 | Reading them will give you information about the state of this cpuset: |
713 | the CPUs and Memory Nodes it can use, the processes that are using | 715 | the CPUs and Memory Nodes it can use, the processes that are using |
diff --git a/Documentation/device-mapper/dm-crypt.txt b/Documentation/device-mapper/dm-crypt.txt new file mode 100644 index 000000000000..6680cab2c705 --- /dev/null +++ b/Documentation/device-mapper/dm-crypt.txt | |||
@@ -0,0 +1,52 @@ | |||
1 | dm-crypt | ||
2 | ========= | ||
3 | |||
4 | Device-Mapper's "crypt" target provides transparent encryption of block devices | ||
5 | using the kernel crypto API. | ||
6 | |||
7 | Parameters: <cipher> <key> <iv_offset> <device path> <offset> | ||
8 | |||
9 | <cipher> | ||
10 | Encryption cipher and an optional IV generation mode. | ||
11 | (In format cipher-chainmode-ivopts:ivmode). | ||
12 | Examples: | ||
13 | des | ||
14 | aes-cbc-essiv:sha256 | ||
15 | twofish-ecb | ||
16 | |||
17 | /proc/crypto contains supported crypto modes | ||
18 | |||
19 | <key> | ||
20 | Key used for encryption. It is encoded as a hexadecimal number. | ||
21 | You can only use key sizes that are valid for the selected cipher. | ||
22 | |||
23 | <iv_offset> | ||
24 | The IV offset is a sector count that is added to the sector number | ||
25 | before creating the IV. | ||
26 | |||
27 | <device path> | ||
28 | This is the device that is going to be used as backend and contains the | ||
29 | encrypted data. You can specify it as a path like /dev/xxx or a device | ||
30 | number <major>:<minor>. | ||
31 | |||
32 | <offset> | ||
33 | Starting sector within the device where the encrypted data begins. | ||
34 | |||
35 | Example scripts | ||
36 | =============== | ||
37 | LUKS (Linux Unified Key Setup) is now the preferred way to set up disk | ||
38 | encryption with dm-crypt using the 'cryptsetup' utility, see | ||
39 | http://luks.endorphin.org/ | ||
40 | |||
41 | [[ | ||
42 | #!/bin/sh | ||
43 | # Create a crypt device using dmsetup | ||
44 | dmsetup create crypt1 --table "0 `blockdev --getsize $1` crypt aes-cbc-essiv:sha256 babebabebabebabebabebabebabebabe 0 $1 0" | ||
45 | ]] | ||
46 | |||
47 | [[ | ||
48 | #!/bin/sh | ||
49 | # Create a crypt device using cryptsetup and LUKS header with default cipher | ||
50 | cryptsetup luksFormat $1 | ||
51 | cryptsetup luksOpen $1 crypt1 | ||
52 | ]] | ||
diff --git a/Documentation/dontdiff b/Documentation/dontdiff index 354aec047c0e..881e6dd03aea 100644 --- a/Documentation/dontdiff +++ b/Documentation/dontdiff | |||
@@ -141,6 +141,7 @@ mkprep | |||
141 | mktables | 141 | mktables |
142 | mktree | 142 | mktree |
143 | modpost | 143 | modpost |
144 | modules.order | ||
144 | modversions.h* | 145 | modversions.h* |
145 | offset.h | 146 | offset.h |
146 | offsets.h | 147 | offsets.h |
@@ -171,6 +172,7 @@ sm_tbl* | |||
171 | split-include | 172 | split-include |
172 | tags | 173 | tags |
173 | tftpboot.img | 174 | tftpboot.img |
175 | timeconst.h | ||
174 | times.h* | 176 | times.h* |
175 | tkparse | 177 | tkparse |
176 | trix_boot.h | 178 | trix_boot.h |
diff --git a/Documentation/fb/gxfb.txt b/Documentation/fb/gxfb.txt new file mode 100644 index 000000000000..2f640903bbb2 --- /dev/null +++ b/Documentation/fb/gxfb.txt | |||
@@ -0,0 +1,52 @@ | |||
1 | [This file is cloned from VesaFB/aty128fb] | ||
2 | |||
3 | What is gxfb? | ||
4 | ================= | ||
5 | |||
6 | This is a graphics framebuffer driver for AMD Geode GX2 based processors. | ||
7 | |||
8 | Advantages: | ||
9 | |||
10 | * No need to use AMD's VSA code (or other VESA emulation layer) in the | ||
11 | BIOS. | ||
12 | * It provides a nice large console (128 cols + 48 lines with 1024x768) | ||
13 | without using tiny, unreadable fonts. | ||
14 | * You can run XF68_FBDev on top of /dev/fb0 | ||
15 | * Most important: boot logo :-) | ||
16 | |||
17 | Disadvantages: | ||
18 | |||
19 | * graphic mode is slower than text mode... | ||
20 | |||
21 | |||
22 | How to use it? | ||
23 | ============== | ||
24 | |||
25 | Switching modes is done using gxfb.mode_option=<resolution>... boot | ||
26 | parameter or using `fbset' program. | ||
27 | |||
28 | See Documentation/fb/modedb.txt for more information on modedb | ||
29 | resolutions. | ||
30 | |||
31 | |||
32 | X11 | ||
33 | === | ||
34 | |||
35 | XF68_FBDev should generally work fine, but it is non-accelerated. | ||
36 | |||
37 | |||
38 | Configuration | ||
39 | ============= | ||
40 | |||
41 | You can pass kernel command line options to gxfb with gxfb.<option>. | ||
42 | For example, gxfb.mode_option=800x600@75. | ||
43 | Accepted options: | ||
44 | |||
45 | mode_option - specify the video mode. Of the form | ||
46 | <x>x<y>[-<bpp>][@<refresh>] | ||
47 | vram - size of video ram (normally auto-detected) | ||
48 | vt_switch - enable vt switching during suspend/resume. The vt | ||
49 | switch is slow, but harmless. | ||
50 | |||
51 | -- | ||
52 | Andres Salomon <dilinger@debian.org> | ||
diff --git a/Documentation/fb/intelfb.txt b/Documentation/fb/intelfb.txt index da5ee74219e8..27a3160650a4 100644 --- a/Documentation/fb/intelfb.txt +++ b/Documentation/fb/intelfb.txt | |||
@@ -14,6 +14,8 @@ graphics devices. These would include: | |||
14 | Intel 915GM | 14 | Intel 915GM |
15 | Intel 945G | 15 | Intel 945G |
16 | Intel 945GM | 16 | Intel 945GM |
17 | Intel 965G | ||
18 | Intel 965GM | ||
17 | 19 | ||
18 | B. List of available options | 20 | B. List of available options |
19 | 21 | ||
diff --git a/Documentation/fb/lxfb.txt b/Documentation/fb/lxfb.txt new file mode 100644 index 000000000000..38b3ca6f6ca7 --- /dev/null +++ b/Documentation/fb/lxfb.txt | |||
@@ -0,0 +1,52 @@ | |||
1 | [This file is cloned from VesaFB/aty128fb] | ||
2 | |||
3 | What is lxfb? | ||
4 | ================= | ||
5 | |||
6 | This is a graphics framebuffer driver for AMD Geode LX based processors. | ||
7 | |||
8 | Advantages: | ||
9 | |||
10 | * No need to use AMD's VSA code (or other VESA emulation layer) in the | ||
11 | BIOS. | ||
12 | * It provides a nice large console (128 cols + 48 lines with 1024x768) | ||
13 | without using tiny, unreadable fonts. | ||
14 | * You can run XF68_FBDev on top of /dev/fb0 | ||
15 | * Most important: boot logo :-) | ||
16 | |||
17 | Disadvantages: | ||
18 | |||
19 | * graphic mode is slower than text mode... | ||
20 | |||
21 | |||
22 | How to use it? | ||
23 | ============== | ||
24 | |||
25 | Switching modes is done using lxfb.mode_option=<resolution>... boot | ||
26 | parameter or using `fbset' program. | ||
27 | |||
28 | See Documentation/fb/modedb.txt for more information on modedb | ||
29 | resolutions. | ||
30 | |||
31 | |||
32 | X11 | ||
33 | === | ||
34 | |||
35 | XF68_FBDev should generally work fine, but it is non-accelerated. | ||
36 | |||
37 | |||
38 | Configuration | ||
39 | ============= | ||
40 | |||
41 | You can pass kernel command line options to lxfb with lxfb.<option>. | ||
42 | For example, lxfb.mode_option=800x600@75. | ||
43 | Accepted options: | ||
44 | |||
45 | mode_option - specify the video mode. Of the form | ||
46 | <x>x<y>[-<bpp>][@<refresh>] | ||
47 | vram - size of video ram (normally auto-detected) | ||
48 | vt_switch - enable vt switching during suspend/resume. The vt | ||
49 | switch is slow, but harmless. | ||
50 | |||
51 | -- | ||
52 | Andres Salomon <dilinger@debian.org> | ||
diff --git a/Documentation/fb/metronomefb.txt b/Documentation/fb/metronomefb.txt index b9a2e7b7e838..237ca412582d 100644 --- a/Documentation/fb/metronomefb.txt +++ b/Documentation/fb/metronomefb.txt | |||
@@ -1,7 +1,7 @@ | |||
1 | Metronomefb | 1 | Metronomefb |
2 | ----------- | 2 | ----------- |
3 | Maintained by Jaya Kumar <jayakumar.lkml.gmail.com> | 3 | Maintained by Jaya Kumar <jayakumar.lkml.gmail.com> |
4 | Last revised: Nov 20, 2007 | 4 | Last revised: Mar 10, 2008 |
5 | 5 | ||
6 | Metronomefb is a driver for the Metronome display controller. The controller | 6 | Metronomefb is a driver for the Metronome display controller. The controller |
7 | is from E-Ink Corporation. It is intended to be used to drive the E-Ink | 7 | is from E-Ink Corporation. It is intended to be used to drive the E-Ink |
@@ -11,20 +11,18 @@ display media here http://www.e-ink.com/products/matrix/metronome.html . | |||
11 | Metronome is interfaced to the host CPU through the AMLCD interface. The | 11 | Metronome is interfaced to the host CPU through the AMLCD interface. The |
12 | host CPU generates the control information and the image in a framebuffer | 12 | host CPU generates the control information and the image in a framebuffer |
13 | which is then delivered to the AMLCD interface by a host specific method. | 13 | which is then delivered to the AMLCD interface by a host specific method. |
14 | Currently, that's implemented for the PXA's LCDC controller. The display and | 14 | The display and error status are each pulled through individual GPIOs. |
15 | error status are each pulled through individual GPIOs. | ||
16 | 15 | ||
17 | Metronomefb was written for the PXA255/gumstix/lyre combination and | 16 | Metronomefb is platform independent and depends on a board specific driver |
18 | therefore currently has board set specific code in it. If other boards based on | 17 | to do all physical IO work. Currently, an example is implemented for the |
19 | other architectures are available, then the host specific code can be separated | 18 | PXA board used in the AM-200 EPD devkit. This example is am200epd.c |
20 | and abstracted out. | ||
21 | 19 | ||
22 | Metronomefb requires waveform information which is delivered via the AMLCD | 20 | Metronomefb requires waveform information which is delivered via the AMLCD |
23 | interface to the metronome controller. The waveform information is expected to | 21 | interface to the metronome controller. The waveform information is expected to |
24 | be delivered from userspace via the firmware class interface. The waveform file | 22 | be delivered from userspace via the firmware class interface. The waveform file |
25 | can be compressed as long as your udev or hotplug script is aware of the need | 23 | can be compressed as long as your udev or hotplug script is aware of the need |
26 | to uncompress it before delivering it. metronomefb will ask for waveform.wbf | 24 | to uncompress it before delivering it. metronomefb will ask for metronome.wbf |
27 | which would typically go into /lib/firmware/waveform.wbf depending on your | 25 | which would typically go into /lib/firmware/metronome.wbf depending on your |
28 | udev/hotplug setup. I have only tested with a single waveform file which was | 26 | udev/hotplug setup. I have only tested with a single waveform file which was |
29 | originally labeled 23P01201_60_WT0107_MTC. I do not know what it stands for. | 27 | originally labeled 23P01201_60_WT0107_MTC. I do not know what it stands for. |
30 | Caution should be exercised when manipulating the waveform as there may be | 28 | Caution should be exercised when manipulating the waveform as there may be |
diff --git a/Documentation/fb/modedb.txt b/Documentation/fb/modedb.txt index 4fcdb4cf4cca..ec4dee75a354 100644 --- a/Documentation/fb/modedb.txt +++ b/Documentation/fb/modedb.txt | |||
@@ -125,8 +125,12 @@ There may be more modes. | |||
125 | amifb - Amiga chipset frame buffer | 125 | amifb - Amiga chipset frame buffer |
126 | aty128fb - ATI Rage128 / Pro frame buffer | 126 | aty128fb - ATI Rage128 / Pro frame buffer |
127 | atyfb - ATI Mach64 frame buffer | 127 | atyfb - ATI Mach64 frame buffer |
128 | pm2fb - Permedia 2/2V frame buffer | ||
129 | pm3fb - Permedia 3 frame buffer | ||
130 | sstfb - Voodoo 1/2 (SST1) chipset frame buffer | ||
128 | tdfxfb - 3D Fx frame buffer | 131 | tdfxfb - 3D Fx frame buffer |
129 | tridentfb - Trident (Cyber)blade chipset frame buffer | 132 | tridentfb - Trident (Cyber)blade chipset frame buffer |
133 | vt8623fb - VIA 8623 frame buffer | ||
130 | 134 | ||
131 | BTW, only a few drivers use this at the moment. Others are to follow | 135 | BTW, only a few drivers use this at the moment. Others are to follow |
132 | (feel free to send patches). | 136 | (feel free to send patches). |
diff --git a/Documentation/feature-removal-schedule.txt b/Documentation/feature-removal-schedule.txt index 448729fcaeb1..599fe55bf297 100644 --- a/Documentation/feature-removal-schedule.txt +++ b/Documentation/feature-removal-schedule.txt | |||
@@ -128,15 +128,6 @@ Who: Arjan van de Ven <arjan@linux.intel.com> | |||
128 | 128 | ||
129 | --------------------------- | 129 | --------------------------- |
130 | 130 | ||
131 | What: vm_ops.nopage | ||
132 | When: Soon, provided in-kernel callers have been converted | ||
133 | Why: This interface is replaced by vm_ops.fault, but it has been around | ||
134 | forever, is used by a lot of drivers, and doesn't cost much to | ||
135 | maintain. | ||
136 | Who: Nick Piggin <npiggin@suse.de> | ||
137 | |||
138 | --------------------------- | ||
139 | |||
140 | What: PHYSDEVPATH, PHYSDEVBUS, PHYSDEVDRIVER in the uevent environment | 131 | What: PHYSDEVPATH, PHYSDEVBUS, PHYSDEVDRIVER in the uevent environment |
141 | When: October 2008 | 132 | When: October 2008 |
142 | Why: The stacking of class devices makes these values misleading and | 133 | Why: The stacking of class devices makes these values misleading and |
diff --git a/Documentation/filesystems/Locking b/Documentation/filesystems/Locking index 42d4b30b1045..c2992bc54f2f 100644 --- a/Documentation/filesystems/Locking +++ b/Documentation/filesystems/Locking | |||
@@ -511,7 +511,6 @@ prototypes: | |||
511 | void (*open)(struct vm_area_struct*); | 511 | void (*open)(struct vm_area_struct*); |
512 | void (*close)(struct vm_area_struct*); | 512 | void (*close)(struct vm_area_struct*); |
513 | int (*fault)(struct vm_area_struct*, struct vm_fault *); | 513 | int (*fault)(struct vm_area_struct*, struct vm_fault *); |
514 | struct page *(*nopage)(struct vm_area_struct*, unsigned long, int *); | ||
515 | int (*page_mkwrite)(struct vm_area_struct *, struct page *); | 514 | int (*page_mkwrite)(struct vm_area_struct *, struct page *); |
516 | 515 | ||
517 | locking rules: | 516 | locking rules: |
@@ -519,7 +518,6 @@ locking rules: | |||
519 | open: no yes | 518 | open: no yes |
520 | close: no yes | 519 | close: no yes |
521 | fault: no yes | 520 | fault: no yes |
522 | nopage: no yes | ||
523 | page_mkwrite: no yes no | 521 | page_mkwrite: no yes no |
524 | 522 | ||
525 | ->page_mkwrite() is called when a previously read-only page is | 523 | ->page_mkwrite() is called when a previously read-only page is |
@@ -537,4 +535,3 @@ NULL. | |||
537 | 535 | ||
538 | ipc/shm.c::shm_delete() - may need BKL. | 536 | ipc/shm.c::shm_delete() - may need BKL. |
539 | ->read() and ->write() in many drivers are (probably) missing BKL. | 537 | ->read() and ->write() in many drivers are (probably) missing BKL. |
540 | drivers/sgi/char/graphics.c::sgi_graphics_nopage() - may need BKL. | ||
diff --git a/Documentation/filesystems/nfs-rdma.txt b/Documentation/filesystems/nfs-rdma.txt new file mode 100644 index 000000000000..d0ec45ae4e7d --- /dev/null +++ b/Documentation/filesystems/nfs-rdma.txt | |||
@@ -0,0 +1,256 @@ | |||
1 | ################################################################################ | ||
2 | # # | ||
3 | # NFS/RDMA README # | ||
4 | # # | ||
5 | ################################################################################ | ||
6 | |||
7 | Author: NetApp and Open Grid Computing | ||
8 | Date: April 15, 2008 | ||
9 | |||
10 | Table of Contents | ||
11 | ~~~~~~~~~~~~~~~~~ | ||
12 | - Overview | ||
13 | - Getting Help | ||
14 | - Installation | ||
15 | - Check RDMA and NFS Setup | ||
16 | - NFS/RDMA Setup | ||
17 | |||
18 | Overview | ||
19 | ~~~~~~~~ | ||
20 | |||
21 | This document describes how to install and setup the Linux NFS/RDMA client | ||
22 | and server software. | ||
23 | |||
24 | The NFS/RDMA client was first included in Linux 2.6.24. The NFS/RDMA server | ||
25 | was first included in the following release, Linux 2.6.25. | ||
26 | |||
27 | In our testing, we have obtained excellent performance results (full 10Gbit | ||
28 | wire bandwidth at minimal client CPU) under many workloads. The code passes | ||
29 | the full Connectathon test suite and operates over both Infiniband and iWARP | ||
30 | RDMA adapters. | ||
31 | |||
32 | Getting Help | ||
33 | ~~~~~~~~~~~~ | ||
34 | |||
35 | If you get stuck, you can ask questions on the | ||
36 | |||
37 | nfs-rdma-devel@lists.sourceforge.net | ||
38 | |||
39 | mailing list. | ||
40 | |||
41 | Installation | ||
42 | ~~~~~~~~~~~~ | ||
43 | |||
44 | These instructions are a step by step guide to building a machine for | ||
45 | use with NFS/RDMA. | ||
46 | |||
47 | - Install an RDMA device | ||
48 | |||
49 | Any device supported by the drivers in drivers/infiniband/hw is acceptable. | ||
50 | |||
51 | Testing has been performed using several Mellanox-based IB cards, the | ||
52 | Ammasso AMS1100 iWARP adapter, and the Chelsio cxgb3 iWARP adapter. | ||
53 | |||
54 | - Install a Linux distribution and tools | ||
55 | |||
56 | The first kernel release to contain both the NFS/RDMA client and server was | ||
57 | Linux 2.6.25 Therefore, a distribution compatible with this and subsequent | ||
58 | Linux kernel release should be installed. | ||
59 | |||
60 | The procedures described in this document have been tested with | ||
61 | distributions from Red Hat's Fedora Project (http://fedora.redhat.com/). | ||
62 | |||
63 | - Install nfs-utils-1.1.1 or greater on the client | ||
64 | |||
65 | An NFS/RDMA mount point can only be obtained by using the mount.nfs | ||
66 | command in nfs-utils-1.1.1 or greater. To see which version of mount.nfs | ||
67 | you are using, type: | ||
68 | |||
69 | > /sbin/mount.nfs -V | ||
70 | |||
71 | If the version is less than 1.1.1 or the command does not exist, | ||
72 | then you will need to install the latest version of nfs-utils. | ||
73 | |||
74 | Download the latest package from: | ||
75 | |||
76 | http://www.kernel.org/pub/linux/utils/nfs | ||
77 | |||
78 | Uncompress the package and follow the installation instructions. | ||
79 | |||
80 | If you will not be using GSS and NFSv4, the installation process | ||
81 | can be simplified by disabling these features when running configure: | ||
82 | |||
83 | > ./configure --disable-gss --disable-nfsv4 | ||
84 | |||
85 | For more information on this see the package's README and INSTALL files. | ||
86 | |||
87 | After building the nfs-utils package, there will be a mount.nfs binary in | ||
88 | the utils/mount directory. This binary can be used to initiate NFS v2, v3, | ||
89 | or v4 mounts. To initiate a v4 mount, the binary must be called mount.nfs4. | ||
90 | The standard technique is to create a symlink called mount.nfs4 to mount.nfs. | ||
91 | |||
92 | NOTE: mount.nfs and therefore nfs-utils-1.1.1 or greater is only needed | ||
93 | on the NFS client machine. You do not need this specific version of | ||
94 | nfs-utils on the server. Furthermore, only the mount.nfs command from | ||
95 | nfs-utils-1.1.1 is needed on the client. | ||
96 | |||
97 | - Install a Linux kernel with NFS/RDMA | ||
98 | |||
99 | The NFS/RDMA client and server are both included in the mainline Linux | ||
100 | kernel version 2.6.25 and later. This and other versions of the 2.6 Linux | ||
101 | kernel can be found at: | ||
102 | |||
103 | ftp://ftp.kernel.org/pub/linux/kernel/v2.6/ | ||
104 | |||
105 | Download the sources and place them in an appropriate location. | ||
106 | |||
107 | - Configure the RDMA stack | ||
108 | |||
109 | Make sure your kernel configuration has RDMA support enabled. Under | ||
110 | Device Drivers -> InfiniBand support, update the kernel configuration | ||
111 | to enable InfiniBand support [NOTE: the option name is misleading. Enabling | ||
112 | InfiniBand support is required for all RDMA devices (IB, iWARP, etc.)]. | ||
113 | |||
114 | Enable the appropriate IB HCA support (mlx4, mthca, ehca, ipath, etc.) or | ||
115 | iWARP adapter support (amso, cxgb3, etc.). | ||
116 | |||
117 | If you are using InfiniBand, be sure to enable IP-over-InfiniBand support. | ||
118 | |||
119 | - Configure the NFS client and server | ||
120 | |||
121 | Your kernel configuration must also have NFS file system support and/or | ||
122 | NFS server support enabled. These and other NFS related configuration | ||
123 | options can be found under File Systems -> Network File Systems. | ||
124 | |||
125 | - Build, install, reboot | ||
126 | |||
127 | The NFS/RDMA code will be enabled automatically if NFS and RDMA | ||
128 | are turned on. The NFS/RDMA client and server are configured via the hidden | ||
129 | SUNRPC_XPRT_RDMA config option that depends on SUNRPC and INFINIBAND. The | ||
130 | value of SUNRPC_XPRT_RDMA will be: | ||
131 | |||
132 | - N if either SUNRPC or INFINIBAND are N, in this case the NFS/RDMA client | ||
133 | and server will not be built | ||
134 | - M if both SUNRPC and INFINIBAND are on (M or Y) and at least one is M, | ||
135 | in this case the NFS/RDMA client and server will be built as modules | ||
136 | - Y if both SUNRPC and INFINIBAND are Y, in this case the NFS/RDMA client | ||
137 | and server will be built into the kernel | ||
138 | |||
139 | Therefore, if you have followed the steps above and turned no NFS and RDMA, | ||
140 | the NFS/RDMA client and server will be built. | ||
141 | |||
142 | Build a new kernel, install it, boot it. | ||
143 | |||
144 | Check RDMA and NFS Setup | ||
145 | ~~~~~~~~~~~~~~~~~~~~~~~~ | ||
146 | |||
147 | Before configuring the NFS/RDMA software, it is a good idea to test | ||
148 | your new kernel to ensure that the kernel is working correctly. | ||
149 | In particular, it is a good idea to verify that the RDMA stack | ||
150 | is functioning as expected and standard NFS over TCP/IP and/or UDP/IP | ||
151 | is working properly. | ||
152 | |||
153 | - Check RDMA Setup | ||
154 | |||
155 | If you built the RDMA components as modules, load them at | ||
156 | this time. For example, if you are using a Mellanox Tavor/Sinai/Arbel | ||
157 | card: | ||
158 | |||
159 | > modprobe ib_mthca | ||
160 | > modprobe ib_ipoib | ||
161 | |||
162 | If you are using InfiniBand, make sure there is a Subnet Manager (SM) | ||
163 | running on the network. If your IB switch has an embedded SM, you can | ||
164 | use it. Otherwise, you will need to run an SM, such as OpenSM, on one | ||
165 | of your end nodes. | ||
166 | |||
167 | If an SM is running on your network, you should see the following: | ||
168 | |||
169 | > cat /sys/class/infiniband/driverX/ports/1/state | ||
170 | 4: ACTIVE | ||
171 | |||
172 | where driverX is mthca0, ipath5, ehca3, etc. | ||
173 | |||
174 | To further test the InfiniBand software stack, use IPoIB (this | ||
175 | assumes you have two IB hosts named host1 and host2): | ||
176 | |||
177 | host1> ifconfig ib0 a.b.c.x | ||
178 | host2> ifconfig ib0 a.b.c.y | ||
179 | host1> ping a.b.c.y | ||
180 | host2> ping a.b.c.x | ||
181 | |||
182 | For other device types, follow the appropriate procedures. | ||
183 | |||
184 | - Check NFS Setup | ||
185 | |||
186 | For the NFS components enabled above (client and/or server), | ||
187 | test their functionality over standard Ethernet using TCP/IP or UDP/IP. | ||
188 | |||
189 | NFS/RDMA Setup | ||
190 | ~~~~~~~~~~~~~~ | ||
191 | |||
192 | We recommend that you use two machines, one to act as the client and | ||
193 | one to act as the server. | ||
194 | |||
195 | One time configuration: | ||
196 | |||
197 | - On the server system, configure the /etc/exports file and | ||
198 | start the NFS/RDMA server. | ||
199 | |||
200 | Exports entries with the following formats have been tested: | ||
201 | |||
202 | /vol0 192.168.0.47(fsid=0,rw,async,insecure,no_root_squash) | ||
203 | /vol0 192.168.0.0/255.255.255.0(fsid=0,rw,async,insecure,no_root_squash) | ||
204 | |||
205 | The IP address(es) is(are) the client's IPoIB address for an InfiniBand HCA or the | ||
206 | cleint's iWARP address(es) for an RNIC. | ||
207 | |||
208 | NOTE: The "insecure" option must be used because the NFS/RDMA client does not | ||
209 | use a reserved port. | ||
210 | |||
211 | Each time a machine boots: | ||
212 | |||
213 | - Load and configure the RDMA drivers | ||
214 | |||
215 | For InfiniBand using a Mellanox adapter: | ||
216 | |||
217 | > modprobe ib_mthca | ||
218 | > modprobe ib_ipoib | ||
219 | > ifconfig ib0 a.b.c.d | ||
220 | |||
221 | NOTE: use unique addresses for the client and server | ||
222 | |||
223 | - Start the NFS server | ||
224 | |||
225 | If the NFS/RDMA server was built as a module (CONFIG_SUNRPC_XPRT_RDMA=m in kernel config), | ||
226 | load the RDMA transport module: | ||
227 | |||
228 | > modprobe svcrdma | ||
229 | |||
230 | Regardless of how the server was built (module or built-in), start the server: | ||
231 | |||
232 | > /etc/init.d/nfs start | ||
233 | |||
234 | or | ||
235 | |||
236 | > service nfs start | ||
237 | |||
238 | Instruct the server to listen on the RDMA transport: | ||
239 | |||
240 | > echo rdma 2050 > /proc/fs/nfsd/portlist | ||
241 | |||
242 | - On the client system | ||
243 | |||
244 | If the NFS/RDMA client was built as a module (CONFIG_SUNRPC_XPRT_RDMA=m in kernel config), | ||
245 | load the RDMA client module: | ||
246 | |||
247 | > modprobe xprtrdma.ko | ||
248 | |||
249 | Regardless of how the client was built (module or built-in), issue the mount.nfs command: | ||
250 | |||
251 | > /path/to/your/mount.nfs <IPoIB-server-name-or-address>:/<export> /mnt -i -o rdma,port=2050 | ||
252 | |||
253 | To verify that the mount is using RDMA, run "cat /proc/mounts" and check the | ||
254 | "proto" field for the given mount. | ||
255 | |||
256 | Congratulations! You're using NFS/RDMA! | ||
diff --git a/Documentation/filesystems/seq_file.txt b/Documentation/filesystems/seq_file.txt index 7fb8e6dc62bf..b843743aa0b5 100644 --- a/Documentation/filesystems/seq_file.txt +++ b/Documentation/filesystems/seq_file.txt | |||
@@ -122,8 +122,7 @@ stop() is the place to free it. | |||
122 | } | 122 | } |
123 | 123 | ||
124 | Finally, the show() function should format the object currently pointed to | 124 | Finally, the show() function should format the object currently pointed to |
125 | by the iterator for output. It should return zero, or an error code if | 125 | by the iterator for output. The example module's show() function is: |
126 | something goes wrong. The example module's show() function is: | ||
127 | 126 | ||
128 | static int ct_seq_show(struct seq_file *s, void *v) | 127 | static int ct_seq_show(struct seq_file *s, void *v) |
129 | { | 128 | { |
@@ -132,6 +131,12 @@ something goes wrong. The example module's show() function is: | |||
132 | return 0; | 131 | return 0; |
133 | } | 132 | } |
134 | 133 | ||
134 | If all is well, the show() function should return zero. A negative error | ||
135 | code in the usual manner indicates that something went wrong; it will be | ||
136 | passed back to user space. This function can also return SEQ_SKIP, which | ||
137 | causes the current item to be skipped; if the show() function has already | ||
138 | generated output before returning SEQ_SKIP, that output will be dropped. | ||
139 | |||
135 | We will look at seq_printf() in a moment. But first, the definition of the | 140 | We will look at seq_printf() in a moment. But first, the definition of the |
136 | seq_file iterator is finished by creating a seq_operations structure with | 141 | seq_file iterator is finished by creating a seq_operations structure with |
137 | the four functions we have just defined: | 142 | the four functions we have just defined: |
@@ -182,12 +187,18 @@ The first two output a single character and a string, just like one would | |||
182 | expect. seq_escape() is like seq_puts(), except that any character in s | 187 | expect. seq_escape() is like seq_puts(), except that any character in s |
183 | which is in the string esc will be represented in octal form in the output. | 188 | which is in the string esc will be represented in octal form in the output. |
184 | 189 | ||
185 | There is also a function for printing filenames: | 190 | There is also a pair of functions for printing filenames: |
186 | 191 | ||
187 | int seq_path(struct seq_file *m, struct path *path, char *esc); | 192 | int seq_path(struct seq_file *m, struct path *path, char *esc); |
193 | int seq_path_root(struct seq_file *m, struct path *path, | ||
194 | struct path *root, char *esc) | ||
188 | 195 | ||
189 | Here, path indicates the file of interest, and esc is a set of characters | 196 | Here, path indicates the file of interest, and esc is a set of characters |
190 | which should be escaped in the output. | 197 | which should be escaped in the output. A call to seq_path() will output |
198 | the path relative to the current process's filesystem root. If a different | ||
199 | root is desired, it can be used with seq_path_root(). Note that, if it | ||
200 | turns out that path cannot be reached from root, the value of root will be | ||
201 | changed in seq_file_root() to a root which *does* work. | ||
191 | 202 | ||
192 | 203 | ||
193 | Making it all work | 204 | Making it all work |
diff --git a/Documentation/filesystems/tmpfs.txt b/Documentation/filesystems/tmpfs.txt index 145e44086358..222437efd75a 100644 --- a/Documentation/filesystems/tmpfs.txt +++ b/Documentation/filesystems/tmpfs.txt | |||
@@ -92,6 +92,18 @@ NodeList format is a comma-separated list of decimal numbers and ranges, | |||
92 | a range being two hyphen-separated decimal numbers, the smallest and | 92 | a range being two hyphen-separated decimal numbers, the smallest and |
93 | largest node numbers in the range. For example, mpol=bind:0-3,5,7,9-15 | 93 | largest node numbers in the range. For example, mpol=bind:0-3,5,7,9-15 |
94 | 94 | ||
95 | NUMA memory allocation policies have optional flags that can be used in | ||
96 | conjunction with their modes. These optional flags can be specified | ||
97 | when tmpfs is mounted by appending them to the mode before the NodeList. | ||
98 | See Documentation/vm/numa_memory_policy.txt for a list of all available | ||
99 | memory allocation policy mode flags. | ||
100 | |||
101 | =static is equivalent to MPOL_F_STATIC_NODES | ||
102 | =relative is equivalent to MPOL_F_RELATIVE_NODES | ||
103 | |||
104 | For example, mpol=bind=static:NodeList, is the equivalent of an | ||
105 | allocation policy of MPOL_BIND | MPOL_F_STATIC_NODES. | ||
106 | |||
95 | Note that trying to mount a tmpfs with an mpol option will fail if the | 107 | Note that trying to mount a tmpfs with an mpol option will fail if the |
96 | running kernel does not support NUMA; and will fail if its nodelist | 108 | running kernel does not support NUMA; and will fail if its nodelist |
97 | specifies a node which is not online. If your system relies on that | 109 | specifies a node which is not online. If your system relies on that |
diff --git a/Documentation/filesystems/vfat.txt b/Documentation/filesystems/vfat.txt index fcc123ffa252..2d5e1e582e13 100644 --- a/Documentation/filesystems/vfat.txt +++ b/Documentation/filesystems/vfat.txt | |||
@@ -17,6 +17,21 @@ dmask=### -- The permission mask for the directory. | |||
17 | fmask=### -- The permission mask for files. | 17 | fmask=### -- The permission mask for files. |
18 | The default is the umask of current process. | 18 | The default is the umask of current process. |
19 | 19 | ||
20 | allow_utime=### -- This option controls the permission check of mtime/atime. | ||
21 | |||
22 | 20 - If current process is in group of file's group ID, | ||
23 | you can change timestamp. | ||
24 | 2 - Other users can change timestamp. | ||
25 | |||
26 | The default is set from `dmask' option. (If the directory is | ||
27 | writable, utime(2) is also allowed. I.e. ~dmask & 022) | ||
28 | |||
29 | Normally utime(2) checks current process is owner of | ||
30 | the file, or it has CAP_FOWNER capability. But FAT | ||
31 | filesystem doesn't have uid/gid on disk, so normal | ||
32 | check is too unflexible. With this option you can | ||
33 | relax it. | ||
34 | |||
20 | codepage=### -- Sets the codepage number for converting to shortname | 35 | codepage=### -- Sets the codepage number for converting to shortname |
21 | characters on FAT filesystem. | 36 | characters on FAT filesystem. |
22 | By default, FAT_DEFAULT_CODEPAGE setting is used. | 37 | By default, FAT_DEFAULT_CODEPAGE setting is used. |
diff --git a/Documentation/gpio.txt b/Documentation/gpio.txt index 54630095aa3c..c35ca9e40d4c 100644 --- a/Documentation/gpio.txt +++ b/Documentation/gpio.txt | |||
@@ -107,6 +107,16 @@ type of GPIO controller, and on one particular board 80-95 with an FPGA. | |||
107 | The numbers need not be contiguous; either of those platforms could also | 107 | The numbers need not be contiguous; either of those platforms could also |
108 | use numbers 2000-2063 to identify GPIOs in a bank of I2C GPIO expanders. | 108 | use numbers 2000-2063 to identify GPIOs in a bank of I2C GPIO expanders. |
109 | 109 | ||
110 | If you want to initialize a structure with an invalid GPIO number, use | ||
111 | some negative number (perhaps "-EINVAL"); that will never be valid. To | ||
112 | test if a number could reference a GPIO, you may use this predicate: | ||
113 | |||
114 | int gpio_is_valid(int number); | ||
115 | |||
116 | A number that's not valid will be rejected by calls which may request | ||
117 | or free GPIOs (see below). Other numbers may also be rejected; for | ||
118 | example, a number might be valid but unused on a given board. | ||
119 | |||
110 | Whether a platform supports multiple GPIO controllers is currently a | 120 | Whether a platform supports multiple GPIO controllers is currently a |
111 | platform-specific implementation issue. | 121 | platform-specific implementation issue. |
112 | 122 | ||
diff --git a/Documentation/i386/boot.txt b/Documentation/i386/boot.txt index 2eb16100bb3f..95ad15c3b01f 100644 --- a/Documentation/i386/boot.txt +++ b/Documentation/i386/boot.txt | |||
@@ -40,8 +40,18 @@ Protocol 2.05: (Kernel 2.6.20) Make protected mode kernel relocatable. | |||
40 | Introduce relocatable_kernel and kernel_alignment fields. | 40 | Introduce relocatable_kernel and kernel_alignment fields. |
41 | 41 | ||
42 | Protocol 2.06: (Kernel 2.6.22) Added a field that contains the size of | 42 | Protocol 2.06: (Kernel 2.6.22) Added a field that contains the size of |
43 | the boot command line | 43 | the boot command line. |
44 | 44 | ||
45 | Protocol 2.07: (Kernel 2.6.24) Added paravirtualised boot protocol. | ||
46 | Introduced hardware_subarch and hardware_subarch_data | ||
47 | and KEEP_SEGMENTS flag in load_flags. | ||
48 | |||
49 | Protocol 2.08: (Kernel 2.6.26) Added crc32 checksum and ELF format | ||
50 | payload. Introduced payload_offset and payload length | ||
51 | fields to aid in locating the payload. | ||
52 | |||
53 | Protocol 2.09: (Kernel 2.6.26) Added a field of 64-bit physical | ||
54 | pointer to single linked list of struct setup_data. | ||
45 | 55 | ||
46 | **** MEMORY LAYOUT | 56 | **** MEMORY LAYOUT |
47 | 57 | ||
@@ -172,6 +182,8 @@ Offset Proto Name Meaning | |||
172 | 0240/8 2.07+ hardware_subarch_data Subarchitecture-specific data | 182 | 0240/8 2.07+ hardware_subarch_data Subarchitecture-specific data |
173 | 0248/4 2.08+ payload_offset Offset of kernel payload | 183 | 0248/4 2.08+ payload_offset Offset of kernel payload |
174 | 024C/4 2.08+ payload_length Length of kernel payload | 184 | 024C/4 2.08+ payload_length Length of kernel payload |
185 | 0250/8 2.09+ setup_data 64-bit physical pointer to linked list | ||
186 | of struct setup_data | ||
175 | 187 | ||
176 | (1) For backwards compatibility, if the setup_sects field contains 0, the | 188 | (1) For backwards compatibility, if the setup_sects field contains 0, the |
177 | real value is 4. | 189 | real value is 4. |
@@ -572,6 +584,28 @@ command line is entered using the following protocol: | |||
572 | covered by setup_move_size, so you may need to adjust this | 584 | covered by setup_move_size, so you may need to adjust this |
573 | field. | 585 | field. |
574 | 586 | ||
587 | Field name: setup_data | ||
588 | Type: write (obligatory) | ||
589 | Offset/size: 0x250/8 | ||
590 | Protocol: 2.09+ | ||
591 | |||
592 | The 64-bit physical pointer to NULL terminated single linked list of | ||
593 | struct setup_data. This is used to define a more extensible boot | ||
594 | parameters passing mechanism. The definition of struct setup_data is | ||
595 | as follow: | ||
596 | |||
597 | struct setup_data { | ||
598 | u64 next; | ||
599 | u32 type; | ||
600 | u32 len; | ||
601 | u8 data[0]; | ||
602 | }; | ||
603 | |||
604 | Where, the next is a 64-bit physical pointer to the next node of | ||
605 | linked list, the next field of the last node is 0; the type is used | ||
606 | to identify the contents of data; the len is the length of data | ||
607 | field; the data holds the real payload. | ||
608 | |||
575 | 609 | ||
576 | **** MEMORY LAYOUT OF THE REAL-MODE CODE | 610 | **** MEMORY LAYOUT OF THE REAL-MODE CODE |
577 | 611 | ||
diff --git a/Documentation/ia64/kvm.txt b/Documentation/ia64/kvm.txt new file mode 100644 index 000000000000..bec9d815da33 --- /dev/null +++ b/Documentation/ia64/kvm.txt | |||
@@ -0,0 +1,82 @@ | |||
1 | Currently, kvm module in EXPERIMENTAL stage on IA64. This means that | ||
2 | interfaces are not stable enough to use. So, plase had better don't run | ||
3 | critical applications in virtual machine. We will try our best to make it | ||
4 | strong in future versions! | ||
5 | Guide: How to boot up guests on kvm/ia64 | ||
6 | |||
7 | This guide is to describe how to enable kvm support for IA-64 systems. | ||
8 | |||
9 | 1. Get the kvm source from git.kernel.org. | ||
10 | Userspace source: | ||
11 | git clone git://git.kernel.org/pub/scm/virt/kvm/kvm-userspace.git | ||
12 | Kernel Source: | ||
13 | git clone git://git.kernel.org/pub/scm/linux/kernel/git/xiantao/kvm-ia64.git | ||
14 | |||
15 | 2. Compile the source code. | ||
16 | 2.1 Compile userspace code: | ||
17 | (1)cd ./kvm-userspace | ||
18 | (2)./configure | ||
19 | (3)cd kernel | ||
20 | (4)make sync LINUX= $kernel_dir (kernel_dir is the directory of kernel source.) | ||
21 | (5)cd .. | ||
22 | (6)make qemu | ||
23 | (7)cd qemu; make install | ||
24 | |||
25 | 2.2 Compile kernel source code: | ||
26 | (1) cd ./$kernel_dir | ||
27 | (2) Make menuconfig | ||
28 | (3) Enter into virtualization option, and choose kvm. | ||
29 | (4) make | ||
30 | (5) Once (4) done, make modules_install | ||
31 | (6) Make initrd, and use new kernel to reboot up host machine. | ||
32 | (7) Once (6) done, cd $kernel_dir/arch/ia64/kvm | ||
33 | (8) insmod kvm.ko; insmod kvm-intel.ko | ||
34 | |||
35 | Note: For step 2, please make sure that host page size == TARGET_PAGE_SIZE of qemu, otherwise, may fail. | ||
36 | |||
37 | 3. Get Guest Firmware named as Flash.fd, and put it under right place: | ||
38 | (1) If you have the guest firmware (binary) released by Intel Corp for Xen, use it directly. | ||
39 | |||
40 | (2) If you have no firmware at hand, Please download its source from | ||
41 | hg clone http://xenbits.xensource.com/ext/efi-vfirmware.hg | ||
42 | you can get the firmware's binary in the directory of efi-vfirmware.hg/binaries. | ||
43 | |||
44 | (3) Rename the firware you owned to Flash.fd, and copy it to /usr/local/share/qemu | ||
45 | |||
46 | 4. Boot up Linux or Windows guests: | ||
47 | 4.1 Create or install a image for guest boot. If you have xen experience, it should be easy. | ||
48 | |||
49 | 4.2 Boot up guests use the following command. | ||
50 | /usr/local/bin/qemu-system-ia64 -smp xx -m 512 -hda $your_image | ||
51 | (xx is the number of virtual processors for the guest, now the maximum value is 4) | ||
52 | |||
53 | 5. Known possibile issue on some platforms with old Firmware. | ||
54 | |||
55 | If meet strange host crashe issues, try to solve it through either of the following ways: | ||
56 | |||
57 | (1): Upgrade your Firmware to the latest one. | ||
58 | |||
59 | (2): Applying the below patch to kernel source. | ||
60 | diff --git a/arch/ia64/kernel/pal.S b/arch/ia64/kernel/pal.S | ||
61 | index 0b53344..f02b0f7 100644 | ||
62 | --- a/arch/ia64/kernel/pal.S | ||
63 | +++ b/arch/ia64/kernel/pal.S | ||
64 | @@ -84,7 +84,8 @@ GLOBAL_ENTRY(ia64_pal_call_static) | ||
65 | mov ar.pfs = loc1 | ||
66 | mov rp = loc0 | ||
67 | ;; | ||
68 | - srlz.d // seralize restoration of psr.l | ||
69 | + srlz.i // seralize restoration of psr.l | ||
70 | + ;; | ||
71 | br.ret.sptk.many b0 | ||
72 | END(ia64_pal_call_static) | ||
73 | |||
74 | 6. Bug report: | ||
75 | If you found any issues when use kvm/ia64, Please post the bug info to kvm-ia64-devel mailing list. | ||
76 | https://lists.sourceforge.net/lists/listinfo/kvm-ia64-devel/ | ||
77 | |||
78 | Thanks for your interest! Let's work together, and make kvm/ia64 stronger and stronger! | ||
79 | |||
80 | |||
81 | Xiantao Zhang <xiantao.zhang@intel.com> | ||
82 | 2008.3.10 | ||
diff --git a/Documentation/ide/ide-tape.txt b/Documentation/ide/ide-tape.txt index 658f271a373f..3f348a0b21d8 100644 --- a/Documentation/ide/ide-tape.txt +++ b/Documentation/ide/ide-tape.txt | |||
@@ -1,146 +1,65 @@ | |||
1 | /* | 1 | IDE ATAPI streaming tape driver. |
2 | * IDE ATAPI streaming tape driver. | 2 | |
3 | * | 3 | This driver is a part of the Linux ide driver. |
4 | * This driver is a part of the Linux ide driver. | 4 | |
5 | * | 5 | The driver, in co-operation with ide.c, basically traverses the |
6 | * The driver, in co-operation with ide.c, basically traverses the | 6 | request-list for the block device interface. The character device |
7 | * request-list for the block device interface. The character device | 7 | interface, on the other hand, creates new requests, adds them |
8 | * interface, on the other hand, creates new requests, adds them | 8 | to the request-list of the block device, and waits for their completion. |
9 | * to the request-list of the block device, and waits for their completion. | 9 | |
10 | * | 10 | The block device major and minor numbers are determined from the |
11 | * Pipelined operation mode is now supported on both reads and writes. | 11 | tape's relative position in the ide interfaces, as explained in ide.c. |
12 | * | 12 | |
13 | * The block device major and minor numbers are determined from the | 13 | The character device interface consists of the following devices: |
14 | * tape's relative position in the ide interfaces, as explained in ide.c. | 14 | |
15 | * | 15 | ht0 major 37, minor 0 first IDE tape, rewind on close. |
16 | * The character device interface consists of the following devices: | 16 | ht1 major 37, minor 1 second IDE tape, rewind on close. |
17 | * | 17 | ... |
18 | * ht0 major 37, minor 0 first IDE tape, rewind on close. | 18 | nht0 major 37, minor 128 first IDE tape, no rewind on close. |
19 | * ht1 major 37, minor 1 second IDE tape, rewind on close. | 19 | nht1 major 37, minor 129 second IDE tape, no rewind on close. |
20 | * ... | 20 | ... |
21 | * nht0 major 37, minor 128 first IDE tape, no rewind on close. | 21 | |
22 | * nht1 major 37, minor 129 second IDE tape, no rewind on close. | 22 | The general magnetic tape commands compatible interface, as defined by |
23 | * ... | 23 | include/linux/mtio.h, is accessible through the character device. |
24 | * | 24 | |
25 | * The general magnetic tape commands compatible interface, as defined by | 25 | General ide driver configuration options, such as the interrupt-unmask |
26 | * include/linux/mtio.h, is accessible through the character device. | 26 | flag, can be configured by issuing an ioctl to the block device interface, |
27 | * | 27 | as any other ide device. |
28 | * General ide driver configuration options, such as the interrupt-unmask | 28 | |
29 | * flag, can be configured by issuing an ioctl to the block device interface, | 29 | Our own ide-tape ioctl's can be issued to either the block device or |
30 | * as any other ide device. | 30 | the character device interface. |
31 | * | 31 | |
32 | * Our own ide-tape ioctl's can be issued to either the block device or | 32 | Maximal throughput with minimal bus load will usually be achieved in the |
33 | * the character device interface. | 33 | following scenario: |
34 | * | 34 | |
35 | * Maximal throughput with minimal bus load will usually be achieved in the | 35 | 1. ide-tape is operating in the pipelined operation mode. |
36 | * following scenario: | 36 | 2. No buffering is performed by the user backup program. |
37 | * | 37 | |
38 | * 1. ide-tape is operating in the pipelined operation mode. | 38 | Testing was done with a 2 GB CONNER CTMA 4000 IDE ATAPI Streaming Tape Drive. |
39 | * 2. No buffering is performed by the user backup program. | 39 | |
40 | * | 40 | Here are some words from the first releases of hd.c, which are quoted |
41 | * Testing was done with a 2 GB CONNER CTMA 4000 IDE ATAPI Streaming Tape Drive. | 41 | in ide.c and apply here as well: |
42 | * | 42 | |
43 | * Here are some words from the first releases of hd.c, which are quoted | 43 | | Special care is recommended. Have Fun! |
44 | * in ide.c and apply here as well: | 44 | |
45 | * | 45 | Possible improvements: |
46 | * | Special care is recommended. Have Fun! | 46 | |
47 | * | 47 | 1. Support for the ATAPI overlap protocol. |
48 | * | 48 | |
49 | * An overview of the pipelined operation mode. | 49 | In order to maximize bus throughput, we currently use the DSC |
50 | * | 50 | overlap method which enables ide.c to service requests from the |
51 | * In the pipelined write mode, we will usually just add requests to our | 51 | other device while the tape is busy executing a command. The |
52 | * pipeline and return immediately, before we even start to service them. The | 52 | DSC overlap method involves polling the tape's status register |
53 | * user program will then have enough time to prepare the next request while | 53 | for the DSC bit, and servicing the other device while the tape |
54 | * we are still busy servicing previous requests. In the pipelined read mode, | 54 | isn't ready. |
55 | * the situation is similar - we add read-ahead requests into the pipeline, | 55 | |
56 | * before the user even requested them. | 56 | In the current QIC development standard (December 1995), |
57 | * | 57 | it is recommended that new tape drives will *in addition* |
58 | * The pipeline can be viewed as a "safety net" which will be activated when | 58 | implement the ATAPI overlap protocol, which is used for the |
59 | * the system load is high and prevents the user backup program from keeping up | 59 | same purpose - efficient use of the IDE bus, but is interrupt |
60 | * with the current tape speed. At this point, the pipeline will get | 60 | driven and thus has much less CPU overhead. |
61 | * shorter and shorter but the tape will still be streaming at the same speed. | 61 | |
62 | * Assuming we have enough pipeline stages, the system load will hopefully | 62 | ATAPI overlap is likely to be supported in most new ATAPI |
63 | * decrease before the pipeline is completely empty, and the backup program | 63 | devices, including new ATAPI cdroms, and thus provides us |
64 | * will be able to "catch up" and refill the pipeline again. | 64 | a method by which we can achieve higher throughput when |
65 | * | 65 | sharing a (fast) ATA-2 disk with any (slow) new ATAPI device. |
66 | * When using the pipelined mode, it would be best to disable any type of | ||
67 | * buffering done by the user program, as ide-tape already provides all the | ||
68 | * benefits in the kernel, where it can be done in a more efficient way. | ||
69 | * As we will usually not block the user program on a request, the most | ||
70 | * efficient user code will then be a simple read-write-read-... cycle. | ||
71 | * Any additional logic will usually just slow down the backup process. | ||
72 | * | ||
73 | * Using the pipelined mode, I get a constant over 400 KBps throughput, | ||
74 | * which seems to be the maximum throughput supported by my tape. | ||
75 | * | ||
76 | * However, there are some downfalls: | ||
77 | * | ||
78 | * 1. We use memory (for data buffers) in proportional to the number | ||
79 | * of pipeline stages (each stage is about 26 KB with my tape). | ||
80 | * 2. In the pipelined write mode, we cheat and postpone error codes | ||
81 | * to the user task. In read mode, the actual tape position | ||
82 | * will be a bit further than the last requested block. | ||
83 | * | ||
84 | * Concerning (1): | ||
85 | * | ||
86 | * 1. We allocate stages dynamically only when we need them. When | ||
87 | * we don't need them, we don't consume additional memory. In | ||
88 | * case we can't allocate stages, we just manage without them | ||
89 | * (at the expense of decreased throughput) so when Linux is | ||
90 | * tight in memory, we will not pose additional difficulties. | ||
91 | * | ||
92 | * 2. The maximum number of stages (which is, in fact, the maximum | ||
93 | * amount of memory) which we allocate is limited by the compile | ||
94 | * time parameter IDETAPE_MAX_PIPELINE_STAGES. | ||
95 | * | ||
96 | * 3. The maximum number of stages is a controlled parameter - We | ||
97 | * don't start from the user defined maximum number of stages | ||
98 | * but from the lower IDETAPE_MIN_PIPELINE_STAGES (again, we | ||
99 | * will not even allocate this amount of stages if the user | ||
100 | * program can't handle the speed). We then implement a feedback | ||
101 | * loop which checks if the pipeline is empty, and if it is, we | ||
102 | * increase the maximum number of stages as necessary until we | ||
103 | * reach the optimum value which just manages to keep the tape | ||
104 | * busy with minimum allocated memory or until we reach | ||
105 | * IDETAPE_MAX_PIPELINE_STAGES. | ||
106 | * | ||
107 | * Concerning (2): | ||
108 | * | ||
109 | * In pipelined write mode, ide-tape can not return accurate error codes | ||
110 | * to the user program since we usually just add the request to the | ||
111 | * pipeline without waiting for it to be serviced. In case an error | ||
112 | * occurs, I will report it on the next user request. | ||
113 | * | ||
114 | * In the pipelined read mode, subsequent read requests or forward | ||
115 | * filemark spacing will perform correctly, as we preserve all blocks | ||
116 | * and filemarks which we encountered during our excess read-ahead. | ||
117 | * | ||
118 | * For accurate tape positioning and error reporting, disabling | ||
119 | * pipelined mode might be the best option. | ||
120 | * | ||
121 | * You can enable/disable/tune the pipelined operation mode by adjusting | ||
122 | * the compile time parameters below. | ||
123 | * | ||
124 | * | ||
125 | * Possible improvements. | ||
126 | * | ||
127 | * 1. Support for the ATAPI overlap protocol. | ||
128 | * | ||
129 | * In order to maximize bus throughput, we currently use the DSC | ||
130 | * overlap method which enables ide.c to service requests from the | ||
131 | * other device while the tape is busy executing a command. The | ||
132 | * DSC overlap method involves polling the tape's status register | ||
133 | * for the DSC bit, and servicing the other device while the tape | ||
134 | * isn't ready. | ||
135 | * | ||
136 | * In the current QIC development standard (December 1995), | ||
137 | * it is recommended that new tape drives will *in addition* | ||
138 | * implement the ATAPI overlap protocol, which is used for the | ||
139 | * same purpose - efficient use of the IDE bus, but is interrupt | ||
140 | * driven and thus has much less CPU overhead. | ||
141 | * | ||
142 | * ATAPI overlap is likely to be supported in most new ATAPI | ||
143 | * devices, including new ATAPI cdroms, and thus provides us | ||
144 | * a method by which we can achieve higher throughput when | ||
145 | * sharing a (fast) ATA-2 disk with any (slow) new ATAPI device. | ||
146 | */ | ||
diff --git a/Documentation/ide/ide.txt b/Documentation/ide/ide.txt index 486c699f4aea..0c78f4b1d9d9 100644 --- a/Documentation/ide/ide.txt +++ b/Documentation/ide/ide.txt | |||
@@ -82,27 +82,26 @@ Drives are normally found by auto-probing and/or examining the CMOS/BIOS data. | |||
82 | For really weird situations, the apparent (fdisk) geometry can also be specified | 82 | For really weird situations, the apparent (fdisk) geometry can also be specified |
83 | on the kernel "command line" using LILO. The format of such lines is: | 83 | on the kernel "command line" using LILO. The format of such lines is: |
84 | 84 | ||
85 | hdx=cyls,heads,sects | 85 | ide_core.chs=[interface_number.device_number]:cyls,heads,sects |
86 | or hdx=cdrom | 86 | or ide_core.cdrom=[interface_number.device_number] |
87 | 87 | ||
88 | where hdx can be any of hda through hdh, Three values are required | 88 | For example: |
89 | (cyls,heads,sects). For example: | ||
90 | 89 | ||
91 | hdc=1050,32,64 hdd=cdrom | 90 | ide_core.chs=1.0:1050,32,64 ide_core.cdrom=1.1 |
92 | 91 | ||
93 | either {hda,hdb} or {hdc,hdd}. The results of successful auto-probing may | 92 | The results of successful auto-probing may override the physical geometry/irq |
94 | override the physical geometry/irq specified, though the "original" geometry | 93 | specified, though the "original" geometry may be retained as the "logical" |
95 | may be retained as the "logical" geometry for partitioning purposes (fdisk). | 94 | geometry for partitioning purposes (fdisk). |
96 | 95 | ||
97 | If the auto-probing during boot time confuses a drive (ie. the drive works | 96 | If the auto-probing during boot time confuses a drive (ie. the drive works |
98 | with hd.c but not with ide.c), then an command line option may be specified | 97 | with hd.c but not with ide.c), then an command line option may be specified |
99 | for each drive for which you'd like the drive to skip the hardware | 98 | for each drive for which you'd like the drive to skip the hardware |
100 | probe/identification sequence. For example: | 99 | probe/identification sequence. For example: |
101 | 100 | ||
102 | hdb=noprobe | 101 | ide_core.noprobe=0.1 |
103 | or | 102 | or |
104 | hdc=768,16,32 | 103 | ide_core.chs=1.0:768,16,32 |
105 | hdc=noprobe | 104 | ide_core.noprobe=1.0 |
106 | 105 | ||
107 | Note that when only one IDE device is attached to an interface, it should be | 106 | Note that when only one IDE device is attached to an interface, it should be |
108 | jumpered as "single" or "master", *not* "slave". Many folks have had | 107 | jumpered as "single" or "master", *not* "slave". Many folks have had |
@@ -118,9 +117,9 @@ If for some reason your cdrom drive is *not* found at boot time, you can force | |||
118 | the probe to look harder by supplying a kernel command line parameter | 117 | the probe to look harder by supplying a kernel command line parameter |
119 | via LILO, such as: | 118 | via LILO, such as: |
120 | 119 | ||
121 | hdc=cdrom /* hdc = "master" on second interface */ | 120 | ide_core.cdrom=1.0 /* "master" on second interface (hdc) */ |
122 | or | 121 | or |
123 | hdd=cdrom /* hdd = "slave" on second interface */ | 122 | ide_core.cdrom=1.1 /* "slave" on second interface (hdd) */ |
124 | 123 | ||
125 | For example, a GW2000 system might have a hard drive on the primary | 124 | For example, a GW2000 system might have a hard drive on the primary |
126 | interface (/dev/hda) and an IDE cdrom drive on the secondary interface | 125 | interface (/dev/hda) and an IDE cdrom drive on the secondary interface |
@@ -174,9 +173,7 @@ to /etc/modprobe.conf. | |||
174 | 173 | ||
175 | When ide.c is used as a module, you can pass command line parameters to the | 174 | When ide.c is used as a module, you can pass command line parameters to the |
176 | driver using the "options=" keyword to insmod, while replacing any ',' with | 175 | driver using the "options=" keyword to insmod, while replacing any ',' with |
177 | ';'. For example: | 176 | ';'. |
178 | |||
179 | insmod ide.o options="hda=nodma hdb=nodma" | ||
180 | 177 | ||
181 | 178 | ||
182 | ================================================================================ | 179 | ================================================================================ |
@@ -184,57 +181,6 @@ driver using the "options=" keyword to insmod, while replacing any ',' with | |||
184 | Summary of ide driver parameters for kernel command line | 181 | Summary of ide driver parameters for kernel command line |
185 | -------------------------------------------------------- | 182 | -------------------------------------------------------- |
186 | 183 | ||
187 | "hdx=" is recognized for all "x" from "a" to "u", such as "hdc". | ||
188 | |||
189 | "idex=" is recognized for all "x" from "0" to "9", such as "ide1". | ||
190 | |||
191 | "hdx=noprobe" : drive may be present, but do not probe for it | ||
192 | |||
193 | "hdx=none" : drive is NOT present, ignore cmos and do not probe | ||
194 | |||
195 | "hdx=nowerr" : ignore the WRERR_STAT bit on this drive | ||
196 | |||
197 | "hdx=cdrom" : drive is present, and is a cdrom drive | ||
198 | |||
199 | "hdx=cyl,head,sect" : disk drive is present, with specified geometry | ||
200 | |||
201 | "hdx=autotune" : driver will attempt to tune interface speed | ||
202 | to the fastest PIO mode supported, | ||
203 | if possible for this drive only. | ||
204 | Not fully supported by all chipset types, | ||
205 | and quite likely to cause trouble with | ||
206 | older/odd IDE drives. | ||
207 | |||
208 | "hdx=nodma" : disallow DMA | ||
209 | |||
210 | "idebus=xx" : inform IDE driver of VESA/PCI bus speed in MHz, | ||
211 | where "xx" is between 20 and 66 inclusive, | ||
212 | used when tuning chipset PIO modes. | ||
213 | For PCI bus, 25 is correct for a P75 system, | ||
214 | 30 is correct for P90,P120,P180 systems, | ||
215 | and 33 is used for P100,P133,P166 systems. | ||
216 | If in doubt, use idebus=33 for PCI. | ||
217 | As for VLB, it is safest to not specify it. | ||
218 | Bigger values are safer than smaller ones. | ||
219 | |||
220 | "idex=serialize" : do not overlap operations on idex. Please note | ||
221 | that you will have to specify this option for | ||
222 | both the respective primary and secondary channel | ||
223 | to take effect. | ||
224 | |||
225 | "idex=reset" : reset interface after probe | ||
226 | |||
227 | "idex=ata66" : informs the interface that it has an 80c cable | ||
228 | for chipsets that are ATA-66 capable, but the | ||
229 | ability to bit test for detection is currently | ||
230 | unknown. | ||
231 | |||
232 | "ide=doubler" : probe/support IDE doublers on Amiga | ||
233 | |||
234 | There may be more options than shown -- use the source, Luke! | ||
235 | |||
236 | Everything else is rejected with a "BAD OPTION" message. | ||
237 | |||
238 | For legacy IDE VLB host drivers (ali14xx/dtc2278/ht6560b/qd65xx/umc8672) | 184 | For legacy IDE VLB host drivers (ali14xx/dtc2278/ht6560b/qd65xx/umc8672) |
239 | you need to explicitly enable probing by using "probe" kernel parameter, | 185 | you need to explicitly enable probing by using "probe" kernel parameter, |
240 | i.e. to enable probing for ALI M14xx chipsets (ali14xx host driver) use: | 186 | i.e. to enable probing for ALI M14xx chipsets (ali14xx host driver) use: |
@@ -251,6 +197,33 @@ are detected automatically). | |||
251 | You also need to use "probe" kernel parameter for ide-4drives driver | 197 | You also need to use "probe" kernel parameter for ide-4drives driver |
252 | (support for IDE generic chipset with four drives on one port). | 198 | (support for IDE generic chipset with four drives on one port). |
253 | 199 | ||
200 | To enable support for IDE doublers on Amiga use "doubler" kernel parameter | ||
201 | for gayle host driver (i.e. "gayle.doubler" if the driver is built-in). | ||
202 | |||
203 | To force ignoring cable detection (this should be needed only if you're using | ||
204 | short 40-wires cable which cannot be automatically detected - if this is not | ||
205 | a case please report it as a bug instead) use "ignore_cable" kernel parameter: | ||
206 | |||
207 | * "ide_core.ignore_cable=[interface_number]" boot option if IDE is built-in | ||
208 | (i.e. "ide_core.ignore_cable=1" to force ignoring cable for "ide1") | ||
209 | |||
210 | * "ignore_cable=[interface_number]" module parameter (for ide_core module) | ||
211 | if IDE is compiled as module | ||
212 | |||
213 | Other kernel parameters for ide_core are: | ||
214 | |||
215 | * "nodma=[interface_number.device_number]" to disallow DMA for a device | ||
216 | |||
217 | * "noflush=[interface_number.device_number]" to disable flush requests | ||
218 | |||
219 | * "noprobe=[interface_number.device_number]" to skip probing | ||
220 | |||
221 | * "nowerr=[interface_number.device_number]" to ignore the WRERR_STAT bit | ||
222 | |||
223 | * "cdrom=[interface_number.device_number]" to force device as a CD-ROM | ||
224 | |||
225 | * "chs=[interface_number.device_number]" to force device as a disk (using CHS) | ||
226 | |||
254 | ================================================================================ | 227 | ================================================================================ |
255 | 228 | ||
256 | Some Terminology | 229 | Some Terminology |
diff --git a/Documentation/ioctl-number.txt b/Documentation/ioctl-number.txt index c18363bd8d11..240ce7a56c40 100644 --- a/Documentation/ioctl-number.txt +++ b/Documentation/ioctl-number.txt | |||
@@ -183,6 +183,8 @@ Code Seq# Include File Comments | |||
183 | 0xAC 00-1F linux/raw.h | 183 | 0xAC 00-1F linux/raw.h |
184 | 0xAD 00 Netfilter device in development: | 184 | 0xAD 00 Netfilter device in development: |
185 | <mailto:rusty@rustcorp.com.au> | 185 | <mailto:rusty@rustcorp.com.au> |
186 | 0xAE all linux/kvm.h Kernel-based Virtual Machine | ||
187 | <mailto:kvm-devel@lists.sourceforge.net> | ||
186 | 0xB0 all RATIO devices in development: | 188 | 0xB0 all RATIO devices in development: |
187 | <mailto:vgo@ratio.de> | 189 | <mailto:vgo@ratio.de> |
188 | 0xB1 00-1F PPPoX <mailto:mostrows@styx.uwaterloo.ca> | 190 | 0xB1 00-1F PPPoX <mailto:mostrows@styx.uwaterloo.ca> |
diff --git a/Documentation/kbuild/kconfig-language.txt b/Documentation/kbuild/kconfig-language.txt index 649cb8799890..00b950d1c193 100644 --- a/Documentation/kbuild/kconfig-language.txt +++ b/Documentation/kbuild/kconfig-language.txt | |||
@@ -104,14 +104,15 @@ applicable everywhere (see syntax). | |||
104 | Reverse dependencies can only be used with boolean or tristate | 104 | Reverse dependencies can only be used with boolean or tristate |
105 | symbols. | 105 | symbols. |
106 | Note: | 106 | Note: |
107 | select is evil.... select will by brute force set a symbol | 107 | select should be used with care. select will force |
108 | equal to 'y' without visiting the dependencies. So abusing | 108 | a symbol to a value without visiting the dependencies. |
109 | select you are able to select a symbol FOO even if FOO depends | 109 | By abusing select you are able to select a symbol FOO even |
110 | on BAR that is not set. In general use select only for | 110 | if FOO depends on BAR that is not set. |
111 | non-visible symbols (no prompts anywhere) and for symbols with | 111 | In general use select only for non-visible symbols |
112 | no dependencies. That will limit the usefulness but on the | 112 | (no prompts anywhere) and for symbols with no dependencies. |
113 | other hand avoid the illegal configurations all over. kconfig | 113 | That will limit the usefulness but on the other hand avoid |
114 | should one day warn about such things. | 114 | the illegal configurations all over. |
115 | kconfig should one day warn about such things. | ||
115 | 116 | ||
116 | - numerical ranges: "range" <symbol> <symbol> ["if" <expr>] | 117 | - numerical ranges: "range" <symbol> <symbol> ["if" <expr>] |
117 | This allows to limit the range of possible input values for int | 118 | This allows to limit the range of possible input values for int |
diff --git a/Documentation/kbuild/modules.txt b/Documentation/kbuild/modules.txt index 1d247d59ad56..1821c077b435 100644 --- a/Documentation/kbuild/modules.txt +++ b/Documentation/kbuild/modules.txt | |||
@@ -486,7 +486,7 @@ Module.symvers contains a list of all exported symbols from a kernel build. | |||
486 | Sometimes, an external module uses exported symbols from another | 486 | Sometimes, an external module uses exported symbols from another |
487 | external module. Kbuild needs to have full knowledge on all symbols | 487 | external module. Kbuild needs to have full knowledge on all symbols |
488 | to avoid spitting out warnings about undefined symbols. | 488 | to avoid spitting out warnings about undefined symbols. |
489 | Two solutions exist to let kbuild know all symbols of more than | 489 | Three solutions exist to let kbuild know all symbols of more than |
490 | one external module. | 490 | one external module. |
491 | The method with a top-level kbuild file is recommended but may be | 491 | The method with a top-level kbuild file is recommended but may be |
492 | impractical in certain situations. | 492 | impractical in certain situations. |
@@ -523,6 +523,13 @@ Module.symvers contains a list of all exported symbols from a kernel build. | |||
523 | containing the sum of all symbols defined and not part of the | 523 | containing the sum of all symbols defined and not part of the |
524 | kernel. | 524 | kernel. |
525 | 525 | ||
526 | Use make variable KBUILD_EXTRA_SYMBOLS in the Makefile | ||
527 | If it is impractical to copy Module.symvers from another | ||
528 | module, you can assign a space separated list of files to | ||
529 | KBUILD_EXTRA_SYMBOLS in your Makfile. These files will be | ||
530 | loaded by modpost during the initialisation of its symbol | ||
531 | tables. | ||
532 | |||
526 | === 8. Tips & Tricks | 533 | === 8. Tips & Tricks |
527 | 534 | ||
528 | --- 8.1 Testing for CONFIG_FOO_BAR | 535 | --- 8.1 Testing for CONFIG_FOO_BAR |
diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt index bf6303ec0bde..3ce193f86565 100644 --- a/Documentation/kernel-parameters.txt +++ b/Documentation/kernel-parameters.txt | |||
@@ -627,8 +627,7 @@ and is between 256 and 4096 characters. It is defined in the file | |||
627 | eata= [HW,SCSI] | 627 | eata= [HW,SCSI] |
628 | 628 | ||
629 | edd= [EDD] | 629 | edd= [EDD] |
630 | Format: {"of[f]" | "sk[ipmbr]"} | 630 | Format: {"off" | "on" | "skip[mbr]"} |
631 | See comment in arch/i386/boot/edd.S | ||
632 | 631 | ||
633 | eisa_irq_edge= [PARISC,HW] | 632 | eisa_irq_edge= [PARISC,HW] |
634 | See header of drivers/parisc/eisa.c. | 633 | See header of drivers/parisc/eisa.c. |
@@ -772,10 +771,6 @@ and is between 256 and 4096 characters. It is defined in the file | |||
772 | Format: ide=nodma or ide=doubler | 771 | Format: ide=nodma or ide=doubler |
773 | See Documentation/ide/ide.txt. | 772 | See Documentation/ide/ide.txt. |
774 | 773 | ||
775 | ide?= [HW] (E)IDE subsystem | ||
776 | Format: ide?=ata66 or chipset specific parameters. | ||
777 | See Documentation/ide/ide.txt. | ||
778 | |||
779 | idebus= [HW] (E)IDE subsystem - VLB/PCI bus speed | 774 | idebus= [HW] (E)IDE subsystem - VLB/PCI bus speed |
780 | See Documentation/ide/ide.txt. | 775 | See Documentation/ide/ide.txt. |
781 | 776 | ||
@@ -1393,6 +1388,13 @@ and is between 256 and 4096 characters. It is defined in the file | |||
1393 | 1388 | ||
1394 | nr_uarts= [SERIAL] maximum number of UARTs to be registered. | 1389 | nr_uarts= [SERIAL] maximum number of UARTs to be registered. |
1395 | 1390 | ||
1391 | olpc_ec_timeout= [OLPC] ms delay when issuing EC commands | ||
1392 | Rather than timing out after 20 ms if an EC | ||
1393 | command is not properly ACKed, override the length | ||
1394 | of the timeout. We have interrupts disabled while | ||
1395 | waiting for the ACK, so if this is set too high | ||
1396 | interrupts *may* be lost! | ||
1397 | |||
1396 | opl3= [HW,OSS] | 1398 | opl3= [HW,OSS] |
1397 | Format: <io> | 1399 | Format: <io> |
1398 | 1400 | ||
diff --git a/Documentation/keys-request-key.txt b/Documentation/keys-request-key.txt index 266955d23ee6..09b55e461740 100644 --- a/Documentation/keys-request-key.txt +++ b/Documentation/keys-request-key.txt | |||
@@ -11,26 +11,29 @@ request_key*(): | |||
11 | 11 | ||
12 | struct key *request_key(const struct key_type *type, | 12 | struct key *request_key(const struct key_type *type, |
13 | const char *description, | 13 | const char *description, |
14 | const char *callout_string); | 14 | const char *callout_info); |
15 | 15 | ||
16 | or: | 16 | or: |
17 | 17 | ||
18 | struct key *request_key_with_auxdata(const struct key_type *type, | 18 | struct key *request_key_with_auxdata(const struct key_type *type, |
19 | const char *description, | 19 | const char *description, |
20 | const char *callout_string, | 20 | const char *callout_info, |
21 | size_t callout_len, | ||
21 | void *aux); | 22 | void *aux); |
22 | 23 | ||
23 | or: | 24 | or: |
24 | 25 | ||
25 | struct key *request_key_async(const struct key_type *type, | 26 | struct key *request_key_async(const struct key_type *type, |
26 | const char *description, | 27 | const char *description, |
27 | const char *callout_string); | 28 | const char *callout_info, |
29 | size_t callout_len); | ||
28 | 30 | ||
29 | or: | 31 | or: |
30 | 32 | ||
31 | struct key *request_key_async_with_auxdata(const struct key_type *type, | 33 | struct key *request_key_async_with_auxdata(const struct key_type *type, |
32 | const char *description, | 34 | const char *description, |
33 | const char *callout_string, | 35 | const char *callout_info, |
36 | size_t callout_len, | ||
34 | void *aux); | 37 | void *aux); |
35 | 38 | ||
36 | Or by userspace invoking the request_key system call: | 39 | Or by userspace invoking the request_key system call: |
diff --git a/Documentation/keys.txt b/Documentation/keys.txt index 51652d39e61c..d5c7a57d1700 100644 --- a/Documentation/keys.txt +++ b/Documentation/keys.txt | |||
@@ -170,7 +170,8 @@ The key service provides a number of features besides keys: | |||
170 | amount of description and payload space that can be consumed. | 170 | amount of description and payload space that can be consumed. |
171 | 171 | ||
172 | The user can view information on this and other statistics through procfs | 172 | The user can view information on this and other statistics through procfs |
173 | files. | 173 | files. The root user may also alter the quota limits through sysctl files |
174 | (see the section "New procfs files"). | ||
174 | 175 | ||
175 | Process-specific and thread-specific keyrings are not counted towards a | 176 | Process-specific and thread-specific keyrings are not counted towards a |
176 | user's quota. | 177 | user's quota. |
@@ -329,6 +330,27 @@ about the status of the key service: | |||
329 | <bytes>/<max> Key size quota | 330 | <bytes>/<max> Key size quota |
330 | 331 | ||
331 | 332 | ||
333 | Four new sysctl files have been added also for the purpose of controlling the | ||
334 | quota limits on keys: | ||
335 | |||
336 | (*) /proc/sys/kernel/keys/root_maxkeys | ||
337 | /proc/sys/kernel/keys/root_maxbytes | ||
338 | |||
339 | These files hold the maximum number of keys that root may have and the | ||
340 | maximum total number of bytes of data that root may have stored in those | ||
341 | keys. | ||
342 | |||
343 | (*) /proc/sys/kernel/keys/maxkeys | ||
344 | /proc/sys/kernel/keys/maxbytes | ||
345 | |||
346 | These files hold the maximum number of keys that each non-root user may | ||
347 | have and the maximum total number of bytes of data that each of those | ||
348 | users may have stored in their keys. | ||
349 | |||
350 | Root may alter these by writing each new limit as a decimal number string to | ||
351 | the appropriate file. | ||
352 | |||
353 | |||
332 | =============================== | 354 | =============================== |
333 | USERSPACE SYSTEM CALL INTERFACE | 355 | USERSPACE SYSTEM CALL INTERFACE |
334 | =============================== | 356 | =============================== |
@@ -711,6 +733,27 @@ The keyctl syscall functions are: | |||
711 | The assumed authoritative key is inherited across fork and exec. | 733 | The assumed authoritative key is inherited across fork and exec. |
712 | 734 | ||
713 | 735 | ||
736 | (*) Get the LSM security context attached to a key. | ||
737 | |||
738 | long keyctl(KEYCTL_GET_SECURITY, key_serial_t key, char *buffer, | ||
739 | size_t buflen) | ||
740 | |||
741 | This function returns a string that represents the LSM security context | ||
742 | attached to a key in the buffer provided. | ||
743 | |||
744 | Unless there's an error, it always returns the amount of data it could | ||
745 | produce, even if that's too big for the buffer, but it won't copy more | ||
746 | than requested to userspace. If the buffer pointer is NULL then no copy | ||
747 | will take place. | ||
748 | |||
749 | A NUL character is included at the end of the string if the buffer is | ||
750 | sufficiently big. This is included in the returned count. If no LSM is | ||
751 | in force then an empty string will be returned. | ||
752 | |||
753 | A process must have view permission on the key for this function to be | ||
754 | successful. | ||
755 | |||
756 | |||
714 | =============== | 757 | =============== |
715 | KERNEL SERVICES | 758 | KERNEL SERVICES |
716 | =============== | 759 | =============== |
@@ -771,7 +814,7 @@ payload contents" for more information. | |||
771 | 814 | ||
772 | struct key *request_key(const struct key_type *type, | 815 | struct key *request_key(const struct key_type *type, |
773 | const char *description, | 816 | const char *description, |
774 | const char *callout_string); | 817 | const char *callout_info); |
775 | 818 | ||
776 | This is used to request a key or keyring with a description that matches | 819 | This is used to request a key or keyring with a description that matches |
777 | the description specified according to the key type's match function. This | 820 | the description specified according to the key type's match function. This |
@@ -793,24 +836,28 @@ payload contents" for more information. | |||
793 | 836 | ||
794 | struct key *request_key_with_auxdata(const struct key_type *type, | 837 | struct key *request_key_with_auxdata(const struct key_type *type, |
795 | const char *description, | 838 | const char *description, |
796 | const char *callout_string, | 839 | const void *callout_info, |
840 | size_t callout_len, | ||
797 | void *aux); | 841 | void *aux); |
798 | 842 | ||
799 | This is identical to request_key(), except that the auxiliary data is | 843 | This is identical to request_key(), except that the auxiliary data is |
800 | passed to the key_type->request_key() op if it exists. | 844 | passed to the key_type->request_key() op if it exists, and the callout_info |
845 | is a blob of length callout_len, if given (the length may be 0). | ||
801 | 846 | ||
802 | 847 | ||
803 | (*) A key can be requested asynchronously by calling one of: | 848 | (*) A key can be requested asynchronously by calling one of: |
804 | 849 | ||
805 | struct key *request_key_async(const struct key_type *type, | 850 | struct key *request_key_async(const struct key_type *type, |
806 | const char *description, | 851 | const char *description, |
807 | const char *callout_string); | 852 | const void *callout_info, |
853 | size_t callout_len); | ||
808 | 854 | ||
809 | or: | 855 | or: |
810 | 856 | ||
811 | struct key *request_key_async_with_auxdata(const struct key_type *type, | 857 | struct key *request_key_async_with_auxdata(const struct key_type *type, |
812 | const char *description, | 858 | const char *description, |
813 | const char *callout_string, | 859 | const char *callout_info, |
860 | size_t callout_len, | ||
814 | void *aux); | 861 | void *aux); |
815 | 862 | ||
816 | which are asynchronous equivalents of request_key() and | 863 | which are asynchronous equivalents of request_key() and |
diff --git a/Documentation/kprobes.txt b/Documentation/kprobes.txt index be89f393274f..6877e7187113 100644 --- a/Documentation/kprobes.txt +++ b/Documentation/kprobes.txt | |||
@@ -37,6 +37,11 @@ registration function such as register_kprobe() specifies where | |||
37 | the probe is to be inserted and what handler is to be called when | 37 | the probe is to be inserted and what handler is to be called when |
38 | the probe is hit. | 38 | the probe is hit. |
39 | 39 | ||
40 | There are also register_/unregister_*probes() functions for batch | ||
41 | registration/unregistration of a group of *probes. These functions | ||
42 | can speed up unregistration process when you have to unregister | ||
43 | a lot of probes at once. | ||
44 | |||
40 | The next three subsections explain how the different types of | 45 | The next three subsections explain how the different types of |
41 | probes work. They explain certain things that you'll need to | 46 | probes work. They explain certain things that you'll need to |
42 | know in order to make the best use of Kprobes -- e.g., the | 47 | know in order to make the best use of Kprobes -- e.g., the |
@@ -190,10 +195,11 @@ code mapping. | |||
190 | 4. API Reference | 195 | 4. API Reference |
191 | 196 | ||
192 | The Kprobes API includes a "register" function and an "unregister" | 197 | The Kprobes API includes a "register" function and an "unregister" |
193 | function for each type of probe. Here are terse, mini-man-page | 198 | function for each type of probe. The API also includes "register_*probes" |
194 | specifications for these functions and the associated probe handlers | 199 | and "unregister_*probes" functions for (un)registering arrays of probes. |
195 | that you'll write. See the files in the samples/kprobes/ sub-directory | 200 | Here are terse, mini-man-page specifications for these functions and |
196 | for examples. | 201 | the associated probe handlers that you'll write. See the files in the |
202 | samples/kprobes/ sub-directory for examples. | ||
197 | 203 | ||
198 | 4.1 register_kprobe | 204 | 4.1 register_kprobe |
199 | 205 | ||
@@ -319,6 +325,43 @@ void unregister_kretprobe(struct kretprobe *rp); | |||
319 | Removes the specified probe. The unregister function can be called | 325 | Removes the specified probe. The unregister function can be called |
320 | at any time after the probe has been registered. | 326 | at any time after the probe has been registered. |
321 | 327 | ||
328 | NOTE: | ||
329 | If the functions find an incorrect probe (ex. an unregistered probe), | ||
330 | they clear the addr field of the probe. | ||
331 | |||
332 | 4.5 register_*probes | ||
333 | |||
334 | #include <linux/kprobes.h> | ||
335 | int register_kprobes(struct kprobe **kps, int num); | ||
336 | int register_kretprobes(struct kretprobe **rps, int num); | ||
337 | int register_jprobes(struct jprobe **jps, int num); | ||
338 | |||
339 | Registers each of the num probes in the specified array. If any | ||
340 | error occurs during registration, all probes in the array, up to | ||
341 | the bad probe, are safely unregistered before the register_*probes | ||
342 | function returns. | ||
343 | - kps/rps/jps: an array of pointers to *probe data structures | ||
344 | - num: the number of the array entries. | ||
345 | |||
346 | NOTE: | ||
347 | You have to allocate(or define) an array of pointers and set all | ||
348 | of the array entries before using these functions. | ||
349 | |||
350 | 4.6 unregister_*probes | ||
351 | |||
352 | #include <linux/kprobes.h> | ||
353 | void unregister_kprobes(struct kprobe **kps, int num); | ||
354 | void unregister_kretprobes(struct kretprobe **rps, int num); | ||
355 | void unregister_jprobes(struct jprobe **jps, int num); | ||
356 | |||
357 | Removes each of the num probes in the specified array at once. | ||
358 | |||
359 | NOTE: | ||
360 | If the functions find some incorrect probes (ex. unregistered | ||
361 | probes) in the specified array, they clear the addr field of those | ||
362 | incorrect probes. However, other probes in the array are | ||
363 | unregistered correctly. | ||
364 | |||
322 | 5. Kprobes Features and Limitations | 365 | 5. Kprobes Features and Limitations |
323 | 366 | ||
324 | Kprobes allows multiple probes at the same address. Currently, | 367 | Kprobes allows multiple probes at the same address. Currently, |
diff --git a/Documentation/leds-class.txt b/Documentation/leds-class.txt index 56757c751d6f..18860ad9935a 100644 --- a/Documentation/leds-class.txt +++ b/Documentation/leds-class.txt | |||
@@ -19,6 +19,12 @@ optimises away. | |||
19 | 19 | ||
20 | Complex triggers whilst available to all LEDs have LED specific | 20 | Complex triggers whilst available to all LEDs have LED specific |
21 | parameters and work on a per LED basis. The timer trigger is an example. | 21 | parameters and work on a per LED basis. The timer trigger is an example. |
22 | The timer trigger will periodically change the LED brightness between | ||
23 | LED_OFF and the current brightness setting. The "on" and "off" time can | ||
24 | be specified via /sys/class/leds/<device>/delay_{on,off} in milliseconds. | ||
25 | You can change the brightness value of a LED independently of the timer | ||
26 | trigger. However, if you set the brightness value to LED_OFF it will | ||
27 | also disable the timer trigger. | ||
22 | 28 | ||
23 | You can change triggers in a similar manner to the way an IO scheduler | 29 | You can change triggers in a similar manner to the way an IO scheduler |
24 | is chosen (via /sys/class/leds/<device>/trigger). Trigger specific | 30 | is chosen (via /sys/class/leds/<device>/trigger). Trigger specific |
@@ -63,9 +69,9 @@ value if it is called with *delay_on==0 && *delay_off==0 parameters. In | |||
63 | this case the driver should give back the chosen value through delay_on | 69 | this case the driver should give back the chosen value through delay_on |
64 | and delay_off parameters to the leds subsystem. | 70 | and delay_off parameters to the leds subsystem. |
65 | 71 | ||
66 | Any call to the brightness_set() callback function should cancel the | 72 | Setting the brightness to zero with brightness_set() callback function |
67 | previously programmed hardware blinking function so setting the brightness | 73 | should completely turn off the LED and cancel the previously programmed |
68 | to 0 can also cancel the blinking of the LED. | 74 | hardware blinking function, if any. |
69 | 75 | ||
70 | 76 | ||
71 | Known Issues | 77 | Known Issues |
diff --git a/Documentation/md.txt b/Documentation/md.txt index 396cdd982c26..a8b430627473 100644 --- a/Documentation/md.txt +++ b/Documentation/md.txt | |||
@@ -450,3 +450,9 @@ These currently include | |||
450 | there are upper and lower limits (32768, 16). Default is 128. | 450 | there are upper and lower limits (32768, 16). Default is 128. |
451 | strip_cache_active (currently raid5 only) | 451 | strip_cache_active (currently raid5 only) |
452 | number of active entries in the stripe cache | 452 | number of active entries in the stripe cache |
453 | preread_bypass_threshold (currently raid5 only) | ||
454 | number of times a stripe requiring preread will be bypassed by | ||
455 | a stripe that does not require preread. For fairness defaults | ||
456 | to 1. Setting this to 0 disables bypass accounting and | ||
457 | requires preread stripes to wait until all full-width stripe- | ||
458 | writes are complete. Valid values are 0 to stripe_cache_size. | ||
diff --git a/Documentation/mips/AU1xxx_IDE.README b/Documentation/mips/AU1xxx_IDE.README index 5c8334123f4f..25a6ed1aaa5b 100644 --- a/Documentation/mips/AU1xxx_IDE.README +++ b/Documentation/mips/AU1xxx_IDE.README | |||
@@ -46,8 +46,6 @@ Two files are introduced: | |||
46 | 46 | ||
47 | a) 'include/asm-mips/mach-au1x00/au1xxx_ide.h' | 47 | a) 'include/asm-mips/mach-au1x00/au1xxx_ide.h' |
48 | containes : struct _auide_hwif | 48 | containes : struct _auide_hwif |
49 | struct drive_list_entry dma_white_list | ||
50 | struct drive_list_entry dma_black_list | ||
51 | timing parameters for PIO mode 0/1/2/3/4 | 49 | timing parameters for PIO mode 0/1/2/3/4 |
52 | timing parameters for MWDMA 0/1/2 | 50 | timing parameters for MWDMA 0/1/2 |
53 | 51 | ||
@@ -63,12 +61,6 @@ Four configs variables are introduced: | |||
63 | CONFIG_BLK_DEV_IDE_AU1XXX_SEQTS_PER_RQ - maximum transfer size | 61 | CONFIG_BLK_DEV_IDE_AU1XXX_SEQTS_PER_RQ - maximum transfer size |
64 | per descriptor | 62 | per descriptor |
65 | 63 | ||
66 | If MWDMA is enabled and the connected hard disc is not on the white list, the | ||
67 | kernel switches to a "safe mwdma mode" at boot time. In this mode the IDE | ||
68 | performance is substantial slower then in full speed mwdma. In this case | ||
69 | please add your hard disc to the white list (follow instruction from 'ADD NEW | ||
70 | HARD DISC TO WHITE OR BLACK LIST' section). | ||
71 | |||
72 | 64 | ||
73 | SUPPORTED IDE MODES | 65 | SUPPORTED IDE MODES |
74 | ------------------- | 66 | ------------------- |
@@ -120,44 +112,6 @@ CONFIG_IDEDMA_AUTO=y | |||
120 | Also undefine 'IDE_AU1XXX_BURSTMODE' in 'drivers/ide/mips/au1xxx-ide.c' to | 112 | Also undefine 'IDE_AU1XXX_BURSTMODE' in 'drivers/ide/mips/au1xxx-ide.c' to |
121 | disable the burst support on DBDMA controller. | 113 | disable the burst support on DBDMA controller. |
122 | 114 | ||
123 | ADD NEW HARD DISC TO WHITE OR BLACK LIST | ||
124 | ---------------------------------------- | ||
125 | |||
126 | Step 1 : detect the model name of your hard disc | ||
127 | |||
128 | a) connect your hard disc to the AU1XXX | ||
129 | |||
130 | b) boot your kernel and get the hard disc model. | ||
131 | |||
132 | Example boot log: | ||
133 | |||
134 | --snipped-- | ||
135 | Uniform Multi-Platform E-IDE driver Revision: 7.00alpha2 | ||
136 | ide: Assuming 50MHz system bus speed for PIO modes; override with idebus=xx | ||
137 | Au1xxx IDE(builtin) configured for MWDMA2 | ||
138 | Probing IDE interface ide0... | ||
139 | hda: Maxtor 6E040L0, ATA DISK drive | ||
140 | ide0 at 0xac800000-0xac800007,0xac8001c0 on irq 64 | ||
141 | hda: max request size: 64KiB | ||
142 | hda: 80293248 sectors (41110 MB) w/2048KiB Cache, CHS=65535/16/63, (U)DMA | ||
143 | --snipped-- | ||
144 | |||
145 | In this example 'Maxtor 6E040L0'. | ||
146 | |||
147 | Step 2 : edit 'include/asm-mips/mach-au1x00/au1xxx_ide.h' | ||
148 | |||
149 | Add your hard disc to the dma_white_list or dma_black_list structur. | ||
150 | |||
151 | Step 3 : Recompile the kernel | ||
152 | |||
153 | Enable MWDMA support in the kernel configuration. Recompile the kernel and | ||
154 | reboot. | ||
155 | |||
156 | Step 4 : Tests | ||
157 | |||
158 | If you have add a hard disc to the white list, please run some stress tests | ||
159 | for verification. | ||
160 | |||
161 | 115 | ||
162 | ACKNOWLEDGMENTS | 116 | ACKNOWLEDGMENTS |
163 | --------------- | 117 | --------------- |
diff --git a/Documentation/networking/phy.txt b/Documentation/networking/phy.txt index 0bc95eab1512..8df6a7b0e66c 100644 --- a/Documentation/networking/phy.txt +++ b/Documentation/networking/phy.txt | |||
@@ -1,7 +1,7 @@ | |||
1 | 1 | ||
2 | ------- | 2 | ------- |
3 | PHY Abstraction Layer | 3 | PHY Abstraction Layer |
4 | (Updated 2006-11-30) | 4 | (Updated 2008-04-08) |
5 | 5 | ||
6 | Purpose | 6 | Purpose |
7 | 7 | ||
@@ -291,3 +291,39 @@ Writing a PHY driver | |||
291 | Feel free to look at the Marvell, Cicada, and Davicom drivers in | 291 | Feel free to look at the Marvell, Cicada, and Davicom drivers in |
292 | drivers/net/phy/ for examples (the lxt and qsemi drivers have | 292 | drivers/net/phy/ for examples (the lxt and qsemi drivers have |
293 | not been tested as of this writing) | 293 | not been tested as of this writing) |
294 | |||
295 | Board Fixups | ||
296 | |||
297 | Sometimes the specific interaction between the platform and the PHY requires | ||
298 | special handling. For instance, to change where the PHY's clock input is, | ||
299 | or to add a delay to account for latency issues in the data path. In order | ||
300 | to support such contingencies, the PHY Layer allows platform code to register | ||
301 | fixups to be run when the PHY is brought up (or subsequently reset). | ||
302 | |||
303 | When the PHY Layer brings up a PHY it checks to see if there are any fixups | ||
304 | registered for it, matching based on UID (contained in the PHY device's phy_id | ||
305 | field) and the bus identifier (contained in phydev->dev.bus_id). Both must | ||
306 | match, however two constants, PHY_ANY_ID and PHY_ANY_UID, are provided as | ||
307 | wildcards for the bus ID and UID, respectively. | ||
308 | |||
309 | When a match is found, the PHY layer will invoke the run function associated | ||
310 | with the fixup. This function is passed a pointer to the phy_device of | ||
311 | interest. It should therefore only operate on that PHY. | ||
312 | |||
313 | The platform code can either register the fixup using phy_register_fixup(): | ||
314 | |||
315 | int phy_register_fixup(const char *phy_id, | ||
316 | u32 phy_uid, u32 phy_uid_mask, | ||
317 | int (*run)(struct phy_device *)); | ||
318 | |||
319 | Or using one of the two stubs, phy_register_fixup_for_uid() and | ||
320 | phy_register_fixup_for_id(): | ||
321 | |||
322 | int phy_register_fixup_for_uid(u32 phy_uid, u32 phy_uid_mask, | ||
323 | int (*run)(struct phy_device *)); | ||
324 | int phy_register_fixup_for_id(const char *phy_id, | ||
325 | int (*run)(struct phy_device *)); | ||
326 | |||
327 | The stubs set one of the two matching criteria, and set the other one to | ||
328 | match anything. | ||
329 | |||
diff --git a/Documentation/oops-tracing.txt b/Documentation/oops-tracing.txt index 7f60dfe642ca..b152e81da592 100644 --- a/Documentation/oops-tracing.txt +++ b/Documentation/oops-tracing.txt | |||
@@ -253,6 +253,10 @@ characters, each representing a particular tainted value. | |||
253 | 253 | ||
254 | 8: 'D' if the kernel has died recently, i.e. there was an OOPS or BUG. | 254 | 8: 'D' if the kernel has died recently, i.e. there was an OOPS or BUG. |
255 | 255 | ||
256 | 9: 'A' if the ACPI table has been overridden. | ||
257 | |||
258 | 10: 'W' if a warning has previously been issued by the kernel. | ||
259 | |||
256 | The primary reason for the 'Tainted: ' string is to tell kernel | 260 | The primary reason for the 'Tainted: ' string is to tell kernel |
257 | debuggers if this is a clean kernel or if anything unusual has | 261 | debuggers if this is a clean kernel or if anything unusual has |
258 | occurred. Tainting is permanent: even if an offending module is | 262 | occurred. Tainting is permanent: even if an offending module is |
diff --git a/Documentation/powerpc/booting-without-of.txt b/Documentation/powerpc/booting-without-of.txt index 4cc780024e6c..1d2a772506cf 100644 --- a/Documentation/powerpc/booting-without-of.txt +++ b/Documentation/powerpc/booting-without-of.txt | |||
@@ -2601,6 +2601,17 @@ platforms are moved over to use the flattened-device-tree model. | |||
2601 | differ between different families. May be | 2601 | differ between different families. May be |
2602 | 'virtex2p', 'virtex4', or 'virtex5'. | 2602 | 'virtex2p', 'virtex4', or 'virtex5'. |
2603 | 2603 | ||
2604 | vi) Xilinx Uart 16550 | ||
2605 | |||
2606 | Xilinx UART 16550 devices are very similar to the NS16550 but with | ||
2607 | different register spacing and an offset from the base address. | ||
2608 | |||
2609 | Requred properties: | ||
2610 | - clock-frequency : Frequency of the clock input | ||
2611 | - reg-offset : A value of 3 is required | ||
2612 | - reg-shift : A value of 2 is required | ||
2613 | |||
2614 | |||
2604 | p) Freescale Synchronous Serial Interface | 2615 | p) Freescale Synchronous Serial Interface |
2605 | 2616 | ||
2606 | The SSI is a serial device that communicates with audio codecs. It can | 2617 | The SSI is a serial device that communicates with audio codecs. It can |
@@ -2825,6 +2836,39 @@ platforms are moved over to use the flattened-device-tree model. | |||
2825 | big-endian; | 2836 | big-endian; |
2826 | }; | 2837 | }; |
2827 | 2838 | ||
2839 | r) Freescale Display Interface Unit | ||
2840 | |||
2841 | The Freescale DIU is a LCD controller, with proper hardware, it can also | ||
2842 | drive DVI monitors. | ||
2843 | |||
2844 | Required properties: | ||
2845 | - compatible : should be "fsl-diu". | ||
2846 | - reg : should contain at least address and length of the DIU register | ||
2847 | set. | ||
2848 | - Interrupts : one DIU interrupt should be describe here. | ||
2849 | |||
2850 | Example (MPC8610HPCD) | ||
2851 | display@2c000 { | ||
2852 | compatible = "fsl,diu"; | ||
2853 | reg = <0x2c000 100>; | ||
2854 | interrupts = <72 2>; | ||
2855 | interrupt-parent = <&mpic>; | ||
2856 | }; | ||
2857 | |||
2858 | s) Freescale on board FPGA | ||
2859 | |||
2860 | This is the memory-mapped registers for on board FPGA. | ||
2861 | |||
2862 | Required properities: | ||
2863 | - compatible : should be "fsl,fpga-pixis". | ||
2864 | - reg : should contain the address and the lenght of the FPPGA register | ||
2865 | set. | ||
2866 | |||
2867 | Example (MPC8610HPCD) | ||
2868 | board-control@e8000000 { | ||
2869 | compatible = "fsl,fpga-pixis"; | ||
2870 | reg = <0xe8000000 32>; | ||
2871 | }; | ||
2828 | 2872 | ||
2829 | VII - Marvell Discovery mv64[345]6x System Controller chips | 2873 | VII - Marvell Discovery mv64[345]6x System Controller chips |
2830 | =========================================================== | 2874 | =========================================================== |
diff --git a/Documentation/powerpc/kvm_440.txt b/Documentation/powerpc/kvm_440.txt new file mode 100644 index 000000000000..c02a003fa03a --- /dev/null +++ b/Documentation/powerpc/kvm_440.txt | |||
@@ -0,0 +1,41 @@ | |||
1 | Hollis Blanchard <hollisb@us.ibm.com> | ||
2 | 15 Apr 2008 | ||
3 | |||
4 | Various notes on the implementation of KVM for PowerPC 440: | ||
5 | |||
6 | To enforce isolation, host userspace, guest kernel, and guest userspace all | ||
7 | run at user privilege level. Only the host kernel runs in supervisor mode. | ||
8 | Executing privileged instructions in the guest traps into KVM (in the host | ||
9 | kernel), where we decode and emulate them. Through this technique, unmodified | ||
10 | 440 Linux kernels can be run (slowly) as guests. Future performance work will | ||
11 | focus on reducing the overhead and frequency of these traps. | ||
12 | |||
13 | The usual code flow is started from userspace invoking an "run" ioctl, which | ||
14 | causes KVM to switch into guest context. We use IVPR to hijack the host | ||
15 | interrupt vectors while running the guest, which allows us to direct all | ||
16 | interrupts to kvmppc_handle_interrupt(). At this point, we could either | ||
17 | - handle the interrupt completely (e.g. emulate "mtspr SPRG0"), or | ||
18 | - let the host interrupt handler run (e.g. when the decrementer fires), or | ||
19 | - return to host userspace (e.g. when the guest performs device MMIO) | ||
20 | |||
21 | Address spaces: We take advantage of the fact that Linux doesn't use the AS=1 | ||
22 | address space (in host or guest), which gives us virtual address space to use | ||
23 | for guest mappings. While the guest is running, the host kernel remains mapped | ||
24 | in AS=0, but the guest can only use AS=1 mappings. | ||
25 | |||
26 | TLB entries: The TLB entries covering the host linear mapping remain | ||
27 | present while running the guest. This reduces the overhead of lightweight | ||
28 | exits, which are handled by KVM running in the host kernel. We keep three | ||
29 | copies of the TLB: | ||
30 | - guest TLB: contents of the TLB as the guest sees it | ||
31 | - shadow TLB: the TLB that is actually in hardware while guest is running | ||
32 | - host TLB: to restore TLB state when context switching guest -> host | ||
33 | When a TLB miss occurs because a mapping was not present in the shadow TLB, | ||
34 | but was present in the guest TLB, KVM handles the fault without invoking the | ||
35 | guest. Large guest pages are backed by multiple 4KB shadow pages through this | ||
36 | mechanism. | ||
37 | |||
38 | IO: MMIO and DCR accesses are emulated by userspace. We use virtio for network | ||
39 | and block IO, so those drivers must be enabled in the guest. It's possible | ||
40 | that some qemu device emulation (e.g. e1000 or rtl8139) may also work with | ||
41 | little effort. | ||
diff --git a/Documentation/s390/kvm.txt b/Documentation/s390/kvm.txt new file mode 100644 index 000000000000..6f5ceb0f09fc --- /dev/null +++ b/Documentation/s390/kvm.txt | |||
@@ -0,0 +1,125 @@ | |||
1 | *** BIG FAT WARNING *** | ||
2 | The kvm module is currently in EXPERIMENTAL state for s390. This means that | ||
3 | the interface to the module is not yet considered to remain stable. Thus, be | ||
4 | prepared that we keep breaking your userspace application and guest | ||
5 | compatibility over and over again until we feel happy with the result. Make sure | ||
6 | your guest kernel, your host kernel, and your userspace launcher are in a | ||
7 | consistent state. | ||
8 | |||
9 | This Documentation describes the unique ioctl calls to /dev/kvm, the resulting | ||
10 | kvm-vm file descriptors, and the kvm-vcpu file descriptors that differ from x86. | ||
11 | |||
12 | 1. ioctl calls to /dev/kvm | ||
13 | KVM does support the following ioctls on s390 that are common with other | ||
14 | architectures and do behave the same: | ||
15 | KVM_GET_API_VERSION | ||
16 | KVM_CREATE_VM (*) see note | ||
17 | KVM_CHECK_EXTENSION | ||
18 | KVM_GET_VCPU_MMAP_SIZE | ||
19 | |||
20 | Notes: | ||
21 | * KVM_CREATE_VM may fail on s390, if the calling process has multiple | ||
22 | threads and has not called KVM_S390_ENABLE_SIE before. | ||
23 | |||
24 | In addition, on s390 the following architecture specific ioctls are supported: | ||
25 | ioctl: KVM_S390_ENABLE_SIE | ||
26 | args: none | ||
27 | see also: include/linux/kvm.h | ||
28 | This call causes the kernel to switch on PGSTE in the user page table. This | ||
29 | operation is needed in order to run a virtual machine, and it requires the | ||
30 | calling process to be single-threaded. Note that the first call to KVM_CREATE_VM | ||
31 | will implicitly try to switch on PGSTE if the user process has not called | ||
32 | KVM_S390_ENABLE_SIE before. User processes that want to launch multiple threads | ||
33 | before creating a virtual machine have to call KVM_S390_ENABLE_SIE, or will | ||
34 | observe an error calling KVM_CREATE_VM. Switching on PGSTE is a one-time | ||
35 | operation, is not reversible, and will persist over the entire lifetime of | ||
36 | the calling process. It does not have any user-visible effect other than a small | ||
37 | performance penalty. | ||
38 | |||
39 | 2. ioctl calls to the kvm-vm file descriptor | ||
40 | KVM does support the following ioctls on s390 that are common with other | ||
41 | architectures and do behave the same: | ||
42 | KVM_CREATE_VCPU | ||
43 | KVM_SET_USER_MEMORY_REGION (*) see note | ||
44 | KVM_GET_DIRTY_LOG (**) see note | ||
45 | |||
46 | Notes: | ||
47 | * kvm does only allow exactly one memory slot on s390, which has to start | ||
48 | at guest absolute address zero and at a user address that is aligned on any | ||
49 | page boundary. This hardware "limitation" allows us to have a few unique | ||
50 | optimizations. The memory slot doesn't have to be filled | ||
51 | with memory actually, it may contain sparse holes. That said, with different | ||
52 | user memory layout this does still allow a large flexibility when | ||
53 | doing the guest memory setup. | ||
54 | ** KVM_GET_DIRTY_LOG doesn't work properly yet. The user will receive an empty | ||
55 | log. This ioctl call is only needed for guest migration, and we intend to | ||
56 | implement this one in the future. | ||
57 | |||
58 | In addition, on s390 the following architecture specific ioctls for the kvm-vm | ||
59 | file descriptor are supported: | ||
60 | ioctl: KVM_S390_INTERRUPT | ||
61 | args: struct kvm_s390_interrupt * | ||
62 | see also: include/linux/kvm.h | ||
63 | This ioctl is used to submit a floating interrupt for a virtual machine. | ||
64 | Floating interrupts may be delivered to any virtual cpu in the configuration. | ||
65 | Only some interrupt types defined in include/linux/kvm.h make sense when | ||
66 | submitted as floating interrupts. The following interrupts are not considered | ||
67 | to be useful as floating interrupts, and a call to inject them will result in | ||
68 | -EINVAL error code: program interrupts and interprocessor signals. Valid | ||
69 | floating interrupts are: | ||
70 | KVM_S390_INT_VIRTIO | ||
71 | KVM_S390_INT_SERVICE | ||
72 | |||
73 | 3. ioctl calls to the kvm-vcpu file descriptor | ||
74 | KVM does support the following ioctls on s390 that are common with other | ||
75 | architectures and do behave the same: | ||
76 | KVM_RUN | ||
77 | KVM_GET_REGS | ||
78 | KVM_SET_REGS | ||
79 | KVM_GET_SREGS | ||
80 | KVM_SET_SREGS | ||
81 | KVM_GET_FPU | ||
82 | KVM_SET_FPU | ||
83 | |||
84 | In addition, on s390 the following architecture specific ioctls for the | ||
85 | kvm-vcpu file descriptor are supported: | ||
86 | ioctl: KVM_S390_INTERRUPT | ||
87 | args: struct kvm_s390_interrupt * | ||
88 | see also: include/linux/kvm.h | ||
89 | This ioctl is used to submit an interrupt for a specific virtual cpu. | ||
90 | Only some interrupt types defined in include/linux/kvm.h make sense when | ||
91 | submitted for a specific cpu. The following interrupts are not considered | ||
92 | to be useful, and a call to inject them will result in -EINVAL error code: | ||
93 | service processor calls and virtio interrupts. Valid interrupt types are: | ||
94 | KVM_S390_PROGRAM_INT | ||
95 | KVM_S390_SIGP_STOP | ||
96 | KVM_S390_RESTART | ||
97 | KVM_S390_SIGP_SET_PREFIX | ||
98 | KVM_S390_INT_EMERGENCY | ||
99 | |||
100 | ioctl: KVM_S390_STORE_STATUS | ||
101 | args: unsigned long | ||
102 | see also: include/linux/kvm.h | ||
103 | This ioctl stores the state of the cpu at the guest real address given as | ||
104 | argument, unless one of the following values defined in include/linux/kvm.h | ||
105 | is given as arguement: | ||
106 | KVM_S390_STORE_STATUS_NOADDR - the CPU stores its status to the save area in | ||
107 | absolute lowcore as defined by the principles of operation | ||
108 | KVM_S390_STORE_STATUS_PREFIXED - the CPU stores its status to the save area in | ||
109 | its prefix page just like the dump tool that comes with zipl. This is useful | ||
110 | to create a system dump for use with lkcdutils or crash. | ||
111 | |||
112 | ioctl: KVM_S390_SET_INITIAL_PSW | ||
113 | args: struct kvm_s390_psw * | ||
114 | see also: include/linux/kvm.h | ||
115 | This ioctl can be used to set the processor status word (psw) of a stopped cpu | ||
116 | prior to running it with KVM_RUN. Note that this call is not required to modify | ||
117 | the psw during sie intercepts that fall back to userspace because struct kvm_run | ||
118 | does contain the psw, and this value is evaluated during reentry of KVM_RUN | ||
119 | after the intercept exit was recognized. | ||
120 | |||
121 | ioctl: KVM_S390_INITIAL_RESET | ||
122 | args: none | ||
123 | see also: include/linux/kvm.h | ||
124 | This ioctl can be used to perform an initial cpu reset as defined by the | ||
125 | principles of operation. The target cpu has to be in stopped state. | ||
diff --git a/Documentation/smart-config.txt b/Documentation/smart-config.txt deleted file mode 100644 index 8467447b5a87..000000000000 --- a/Documentation/smart-config.txt +++ /dev/null | |||
@@ -1,98 +0,0 @@ | |||
1 | Smart CONFIG_* Dependencies | ||
2 | 1 August 1999 | ||
3 | |||
4 | Michael Chastain <mec@shout.net> | ||
5 | Werner Almesberger <almesber@lrc.di.epfl.ch> | ||
6 | Martin von Loewis <martin@mira.isdn.cs.tu-berlin.de> | ||
7 | |||
8 | Here is the problem: | ||
9 | |||
10 | Suppose that drivers/net/foo.c has the following lines: | ||
11 | |||
12 | #include <linux/config.h> | ||
13 | |||
14 | ... | ||
15 | |||
16 | #ifdef CONFIG_FOO_AUTOFROB | ||
17 | /* Code for auto-frobbing */ | ||
18 | #else | ||
19 | /* Manual frobbing only */ | ||
20 | #endif | ||
21 | |||
22 | ... | ||
23 | |||
24 | #ifdef CONFIG_FOO_MODEL_TWO | ||
25 | /* Code for model two */ | ||
26 | #endif | ||
27 | |||
28 | Now suppose the user (the person building kernels) reconfigures the | ||
29 | kernel to change some unrelated setting. This will regenerate the | ||
30 | file include/linux/autoconf.h, which will cause include/linux/config.h | ||
31 | to be out of date, which will cause drivers/net/foo.c to be recompiled. | ||
32 | |||
33 | Most kernel sources, perhaps 80% of them, have at least one CONFIG_* | ||
34 | dependency somewhere. So changing _any_ CONFIG_* setting requires | ||
35 | almost _all_ of the kernel to be recompiled. | ||
36 | |||
37 | Here is the solution: | ||
38 | |||
39 | We've made the dependency generator, mkdep.c, smarter. Instead of | ||
40 | generating this dependency: | ||
41 | |||
42 | drivers/net/foo.c: include/linux/config.h | ||
43 | |||
44 | It now generates these dependencies: | ||
45 | |||
46 | drivers/net/foo.c: \ | ||
47 | include/config/foo/autofrob.h \ | ||
48 | include/config/foo/model/two.h | ||
49 | |||
50 | So drivers/net/foo.c depends only on the CONFIG_* lines that | ||
51 | it actually uses. | ||
52 | |||
53 | A new program, split-include.c, runs at the beginning of | ||
54 | compilation (make bzImage or make zImage). split-include reads | ||
55 | include/linux/autoconf.h and updates the include/config/ tree, | ||
56 | writing one file per option. It updates only the files for options | ||
57 | that have changed. | ||
58 | |||
59 | Flag Dependencies | ||
60 | |||
61 | Martin Von Loewis contributed another feature to this patch: | ||
62 | 'flag dependencies'. The idea is that a .o file depends on | ||
63 | the compilation flags used to build it. The file foo.o has | ||
64 | its flags stored in .flags.foo.o. | ||
65 | |||
66 | Suppose the user changes the foo driver from resident to modular. | ||
67 | 'make' will notice that the current foo.o was not compiled with | ||
68 | -DMODULE and will recompile foo.c. | ||
69 | |||
70 | All .o files made from C source have flag dependencies. So do .o | ||
71 | files made with ld, and .a files made with ar. However, .o files | ||
72 | made from assembly source do not have flag dependencies (nobody | ||
73 | needs this yet, but it would be good to fix). | ||
74 | |||
75 | Per-source-file Flags | ||
76 | |||
77 | Flag dependencies also work with per-source-file flags. | ||
78 | You can specify compilation flags for individual source files | ||
79 | like this: | ||
80 | |||
81 | CFLAGS_foo.o = -DSPECIAL_FOO_DEFINE | ||
82 | |||
83 | This helps clean up drivers/net/Makefile, drivers/scsi/Makefile, | ||
84 | and several other Makefiles. | ||
85 | |||
86 | Credit | ||
87 | |||
88 | Werner Almesberger had the original idea and wrote the first | ||
89 | version of this patch. | ||
90 | |||
91 | Michael Chastain picked it up and continued development. He is | ||
92 | now the principal author and maintainer. Please report any bugs | ||
93 | to him. | ||
94 | |||
95 | Martin von Loewis wrote flag dependencies, with some modifications | ||
96 | by Michael Chastain. | ||
97 | |||
98 | Thanks to all of the beta testers. | ||
diff --git a/Documentation/sound/alsa/ALSA-Configuration.txt b/Documentation/sound/alsa/ALSA-Configuration.txt index e985cf5e0410..0bbee38acd26 100644 --- a/Documentation/sound/alsa/ALSA-Configuration.txt +++ b/Documentation/sound/alsa/ALSA-Configuration.txt | |||
@@ -284,6 +284,13 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed. | |||
284 | control correctly. If you have problems regarding this, try | 284 | control correctly. If you have problems regarding this, try |
285 | another ALSA compliant mixer (alsamixer works). | 285 | another ALSA compliant mixer (alsamixer works). |
286 | 286 | ||
287 | Module snd-aw2 | ||
288 | -------------- | ||
289 | |||
290 | Module for Audiowerk2 sound card | ||
291 | |||
292 | This module supports multiple cards. | ||
293 | |||
287 | Module snd-azt2320 | 294 | Module snd-azt2320 |
288 | ------------------ | 295 | ------------------ |
289 | 296 | ||
@@ -788,6 +795,7 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed. | |||
788 | lg-lw LG LW20/LW25 laptop | 795 | lg-lw LG LW20/LW25 laptop |
789 | tcl TCL S700 | 796 | tcl TCL S700 |
790 | clevo Clevo laptops (m520G, m665n) | 797 | clevo Clevo laptops (m520G, m665n) |
798 | medion Medion Rim 2150 | ||
791 | test for testing/debugging purpose, almost all controls can be | 799 | test for testing/debugging purpose, almost all controls can be |
792 | adjusted. Appearing only when compiled with | 800 | adjusted. Appearing only when compiled with |
793 | $CONFIG_SND_DEBUG=y | 801 | $CONFIG_SND_DEBUG=y |
@@ -818,19 +826,25 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed. | |||
818 | hippo_1 Hippo (Benq) with jack detection | 826 | hippo_1 Hippo (Benq) with jack detection |
819 | sony-assamd Sony ASSAMD | 827 | sony-assamd Sony ASSAMD |
820 | ultra Samsung Q1 Ultra Vista model | 828 | ultra Samsung Q1 Ultra Vista model |
829 | lenovo-3000 Lenovo 3000 y410 | ||
821 | basic fixed pin assignment w/o SPDIF | 830 | basic fixed pin assignment w/o SPDIF |
822 | auto auto-config reading BIOS (default) | 831 | auto auto-config reading BIOS (default) |
823 | 832 | ||
824 | ALC268 | 833 | ALC267/268 |
834 | quanta-il1 Quanta IL1 mini-notebook | ||
825 | 3stack 3-stack model | 835 | 3stack 3-stack model |
826 | toshiba Toshiba A205 | 836 | toshiba Toshiba A205 |
827 | acer Acer laptops | 837 | acer Acer laptops |
828 | dell Dell OEM laptops (Vostro 1200) | 838 | dell Dell OEM laptops (Vostro 1200) |
839 | zepto Zepto laptops | ||
829 | test for testing/debugging purpose, almost all controls can | 840 | test for testing/debugging purpose, almost all controls can |
830 | adjusted. Appearing only when compiled with | 841 | adjusted. Appearing only when compiled with |
831 | $CONFIG_SND_DEBUG=y | 842 | $CONFIG_SND_DEBUG=y |
832 | auto auto-config reading BIOS (default) | 843 | auto auto-config reading BIOS (default) |
833 | 844 | ||
845 | ALC269 | ||
846 | basic Basic preset | ||
847 | |||
834 | ALC662 | 848 | ALC662 |
835 | 3stack-dig 3-stack (2-channel) with SPDIF | 849 | 3stack-dig 3-stack (2-channel) with SPDIF |
836 | 3stack-6ch 3-stack (6-channel) | 850 | 3stack-6ch 3-stack (6-channel) |
@@ -871,10 +885,11 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed. | |||
871 | lenovo-nb0763 Lenovo NB0763 | 885 | lenovo-nb0763 Lenovo NB0763 |
872 | lenovo-ms7195-dig Lenovo MS7195 | 886 | lenovo-ms7195-dig Lenovo MS7195 |
873 | haier-w66 Haier W66 | 887 | haier-w66 Haier W66 |
874 | 6stack-hp HP machines with 6stack (Nettle boards) | ||
875 | 3stack-hp HP machines with 3stack (Lucknow, Samba boards) | 888 | 3stack-hp HP machines with 3stack (Lucknow, Samba boards) |
876 | 6stack-dell Dell machines with 6stack (Inspiron 530) | 889 | 6stack-dell Dell machines with 6stack (Inspiron 530) |
877 | mitac Mitac 8252D | 890 | mitac Mitac 8252D |
891 | clevo-m720 Clevo M720 laptop series | ||
892 | fujitsu-pi2515 Fujitsu AMILO Pi2515 | ||
878 | auto auto-config reading BIOS (default) | 893 | auto auto-config reading BIOS (default) |
879 | 894 | ||
880 | ALC861/660 | 895 | ALC861/660 |
@@ -911,6 +926,12 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed. | |||
911 | 3stack 3-stack mode (default) | 926 | 3stack 3-stack mode (default) |
912 | 6stack 6-stack mode | 927 | 6stack 6-stack mode |
913 | 928 | ||
929 | AD1884A / AD1883 / AD1984A / AD1984B | ||
930 | desktop 3-stack desktop (default) | ||
931 | laptop laptop with HP jack sensing | ||
932 | mobile mobile devices with HP jack sensing | ||
933 | thinkpad Lenovo Thinkpad X300 | ||
934 | |||
914 | AD1884 | 935 | AD1884 |
915 | N/A | 936 | N/A |
916 | 937 | ||
@@ -936,7 +957,7 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed. | |||
936 | laptop-automute 2-channel with EAPD and HP-automute (Lenovo N100) | 957 | laptop-automute 2-channel with EAPD and HP-automute (Lenovo N100) |
937 | ultra 2-channel with EAPD (Samsung Ultra tablet PC) | 958 | ultra 2-channel with EAPD (Samsung Ultra tablet PC) |
938 | 959 | ||
939 | AD1988 | 960 | AD1988/AD1988B/AD1989A/AD1989B |
940 | 6stack 6-jack | 961 | 6stack 6-jack |
941 | 6stack-dig ditto with SPDIF | 962 | 6stack-dig ditto with SPDIF |
942 | 3stack 3-jack | 963 | 3stack 3-jack |
@@ -979,6 +1000,7 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed. | |||
979 | dell-m26 Dell Inspiron 1501 | 1000 | dell-m26 Dell Inspiron 1501 |
980 | dell-m27 Dell Inspiron E1705/9400 | 1001 | dell-m27 Dell Inspiron E1705/9400 |
981 | gateway Gateway laptops with EAPD control | 1002 | gateway Gateway laptops with EAPD control |
1003 | panasonic Panasonic CF-74 | ||
982 | 1004 | ||
983 | STAC9205/9254 | 1005 | STAC9205/9254 |
984 | ref Reference board | 1006 | ref Reference board |
@@ -1017,6 +1039,16 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed. | |||
1017 | 3stack D965 3stack | 1039 | 3stack D965 3stack |
1018 | 5stack D965 5stack + SPDIF | 1040 | 5stack D965 5stack + SPDIF |
1019 | dell-3stack Dell Dimension E520 | 1041 | dell-3stack Dell Dimension E520 |
1042 | dell-bios Fixes with Dell BIOS setup | ||
1043 | |||
1044 | STAC92HD71B* | ||
1045 | ref Reference board | ||
1046 | dell-m4-1 Dell desktops | ||
1047 | dell-m4-2 Dell desktops | ||
1048 | |||
1049 | STAC92HD73* | ||
1050 | ref Reference board | ||
1051 | dell-m6 Dell desktops | ||
1020 | 1052 | ||
1021 | STAC9872 | 1053 | STAC9872 |
1022 | vaio Setup for VAIO FE550G/SZ110 | 1054 | vaio Setup for VAIO FE550G/SZ110 |
@@ -1590,6 +1622,16 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed. | |||
1590 | 1622 | ||
1591 | Power management is _not_ supported. | 1623 | Power management is _not_ supported. |
1592 | 1624 | ||
1625 | Module snd-pcsp | ||
1626 | ----------------- | ||
1627 | |||
1628 | Module for internal PC-Speaker. | ||
1629 | |||
1630 | nforce_wa - enable NForce chipset workaround. Expect bad sound. | ||
1631 | |||
1632 | This module supports system beeps, some kind of PCM playback and | ||
1633 | even a few mixer controls. | ||
1634 | |||
1593 | Module snd-pcxhr | 1635 | Module snd-pcxhr |
1594 | ---------------- | 1636 | ---------------- |
1595 | 1637 | ||
diff --git a/Documentation/spi/spidev b/Documentation/spi/spidev index 5c8e1b988a08..ed2da5e5b28a 100644 --- a/Documentation/spi/spidev +++ b/Documentation/spi/spidev | |||
@@ -126,8 +126,8 @@ NOTES: | |||
126 | FULL DUPLEX CHARACTER DEVICE API | 126 | FULL DUPLEX CHARACTER DEVICE API |
127 | ================================ | 127 | ================================ |
128 | 128 | ||
129 | See the sample program below for one example showing the use of the full | 129 | See the spidev_fdx.c sample program for one example showing the use of the |
130 | duplex programming interface. (Although it doesn't perform a full duplex | 130 | full duplex programming interface. (Although it doesn't perform a full duplex |
131 | transfer.) The model is the same as that used in the kernel spi_sync() | 131 | transfer.) The model is the same as that used in the kernel spi_sync() |
132 | request; the individual transfers offer the same capabilities as are | 132 | request; the individual transfers offer the same capabilities as are |
133 | available to kernel drivers (except that it's not asynchronous). | 133 | available to kernel drivers (except that it's not asynchronous). |
@@ -141,167 +141,3 @@ and bitrate for each transfer segment.) | |||
141 | 141 | ||
142 | To make a full duplex request, provide both rx_buf and tx_buf for the | 142 | To make a full duplex request, provide both rx_buf and tx_buf for the |
143 | same transfer. It's even OK if those are the same buffer. | 143 | same transfer. It's even OK if those are the same buffer. |
144 | |||
145 | |||
146 | SAMPLE PROGRAM | ||
147 | ============== | ||
148 | |||
149 | -------------------------------- CUT HERE | ||
150 | #include <stdio.h> | ||
151 | #include <unistd.h> | ||
152 | #include <stdlib.h> | ||
153 | #include <fcntl.h> | ||
154 | #include <string.h> | ||
155 | |||
156 | #include <sys/ioctl.h> | ||
157 | #include <sys/types.h> | ||
158 | #include <sys/stat.h> | ||
159 | |||
160 | #include <linux/types.h> | ||
161 | #include <linux/spi/spidev.h> | ||
162 | |||
163 | |||
164 | static int verbose; | ||
165 | |||
166 | static void do_read(int fd, int len) | ||
167 | { | ||
168 | unsigned char buf[32], *bp; | ||
169 | int status; | ||
170 | |||
171 | /* read at least 2 bytes, no more than 32 */ | ||
172 | if (len < 2) | ||
173 | len = 2; | ||
174 | else if (len > sizeof(buf)) | ||
175 | len = sizeof(buf); | ||
176 | memset(buf, 0, sizeof buf); | ||
177 | |||
178 | status = read(fd, buf, len); | ||
179 | if (status < 0) { | ||
180 | perror("read"); | ||
181 | return; | ||
182 | } | ||
183 | if (status != len) { | ||
184 | fprintf(stderr, "short read\n"); | ||
185 | return; | ||
186 | } | ||
187 | |||
188 | printf("read(%2d, %2d): %02x %02x,", len, status, | ||
189 | buf[0], buf[1]); | ||
190 | status -= 2; | ||
191 | bp = buf + 2; | ||
192 | while (status-- > 0) | ||
193 | printf(" %02x", *bp++); | ||
194 | printf("\n"); | ||
195 | } | ||
196 | |||
197 | static void do_msg(int fd, int len) | ||
198 | { | ||
199 | struct spi_ioc_transfer xfer[2]; | ||
200 | unsigned char buf[32], *bp; | ||
201 | int status; | ||
202 | |||
203 | memset(xfer, 0, sizeof xfer); | ||
204 | memset(buf, 0, sizeof buf); | ||
205 | |||
206 | if (len > sizeof buf) | ||
207 | len = sizeof buf; | ||
208 | |||
209 | buf[0] = 0xaa; | ||
210 | xfer[0].tx_buf = (__u64) buf; | ||
211 | xfer[0].len = 1; | ||
212 | |||
213 | xfer[1].rx_buf = (__u64) buf; | ||
214 | xfer[1].len = len; | ||
215 | |||
216 | status = ioctl(fd, SPI_IOC_MESSAGE(2), xfer); | ||
217 | if (status < 0) { | ||
218 | perror("SPI_IOC_MESSAGE"); | ||
219 | return; | ||
220 | } | ||
221 | |||
222 | printf("response(%2d, %2d): ", len, status); | ||
223 | for (bp = buf; len; len--) | ||
224 | printf(" %02x", *bp++); | ||
225 | printf("\n"); | ||
226 | } | ||
227 | |||
228 | static void dumpstat(const char *name, int fd) | ||
229 | { | ||
230 | __u8 mode, lsb, bits; | ||
231 | __u32 speed; | ||
232 | |||
233 | if (ioctl(fd, SPI_IOC_RD_MODE, &mode) < 0) { | ||
234 | perror("SPI rd_mode"); | ||
235 | return; | ||
236 | } | ||
237 | if (ioctl(fd, SPI_IOC_RD_LSB_FIRST, &lsb) < 0) { | ||
238 | perror("SPI rd_lsb_fist"); | ||
239 | return; | ||
240 | } | ||
241 | if (ioctl(fd, SPI_IOC_RD_BITS_PER_WORD, &bits) < 0) { | ||
242 | perror("SPI bits_per_word"); | ||
243 | return; | ||
244 | } | ||
245 | if (ioctl(fd, SPI_IOC_RD_MAX_SPEED_HZ, &speed) < 0) { | ||
246 | perror("SPI max_speed_hz"); | ||
247 | return; | ||
248 | } | ||
249 | |||
250 | printf("%s: spi mode %d, %d bits %sper word, %d Hz max\n", | ||
251 | name, mode, bits, lsb ? "(lsb first) " : "", speed); | ||
252 | } | ||
253 | |||
254 | int main(int argc, char **argv) | ||
255 | { | ||
256 | int c; | ||
257 | int readcount = 0; | ||
258 | int msglen = 0; | ||
259 | int fd; | ||
260 | const char *name; | ||
261 | |||
262 | while ((c = getopt(argc, argv, "hm:r:v")) != EOF) { | ||
263 | switch (c) { | ||
264 | case 'm': | ||
265 | msglen = atoi(optarg); | ||
266 | if (msglen < 0) | ||
267 | goto usage; | ||
268 | continue; | ||
269 | case 'r': | ||
270 | readcount = atoi(optarg); | ||
271 | if (readcount < 0) | ||
272 | goto usage; | ||
273 | continue; | ||
274 | case 'v': | ||
275 | verbose++; | ||
276 | continue; | ||
277 | case 'h': | ||
278 | case '?': | ||
279 | usage: | ||
280 | fprintf(stderr, | ||
281 | "usage: %s [-h] [-m N] [-r N] /dev/spidevB.D\n", | ||
282 | argv[0]); | ||
283 | return 1; | ||
284 | } | ||
285 | } | ||
286 | |||
287 | if ((optind + 1) != argc) | ||
288 | goto usage; | ||
289 | name = argv[optind]; | ||
290 | |||
291 | fd = open(name, O_RDWR); | ||
292 | if (fd < 0) { | ||
293 | perror("open"); | ||
294 | return 1; | ||
295 | } | ||
296 | |||
297 | dumpstat(name, fd); | ||
298 | |||
299 | if (msglen) | ||
300 | do_msg(fd, msglen); | ||
301 | |||
302 | if (readcount) | ||
303 | do_read(fd, readcount); | ||
304 | |||
305 | close(fd); | ||
306 | return 0; | ||
307 | } | ||
diff --git a/Documentation/spi/spidev_fdx.c b/Documentation/spi/spidev_fdx.c new file mode 100644 index 000000000000..fc354f760384 --- /dev/null +++ b/Documentation/spi/spidev_fdx.c | |||
@@ -0,0 +1,158 @@ | |||
1 | #include <stdio.h> | ||
2 | #include <unistd.h> | ||
3 | #include <stdlib.h> | ||
4 | #include <fcntl.h> | ||
5 | #include <string.h> | ||
6 | |||
7 | #include <sys/ioctl.h> | ||
8 | #include <sys/types.h> | ||
9 | #include <sys/stat.h> | ||
10 | |||
11 | #include <linux/types.h> | ||
12 | #include <linux/spi/spidev.h> | ||
13 | |||
14 | |||
15 | static int verbose; | ||
16 | |||
17 | static void do_read(int fd, int len) | ||
18 | { | ||
19 | unsigned char buf[32], *bp; | ||
20 | int status; | ||
21 | |||
22 | /* read at least 2 bytes, no more than 32 */ | ||
23 | if (len < 2) | ||
24 | len = 2; | ||
25 | else if (len > sizeof(buf)) | ||
26 | len = sizeof(buf); | ||
27 | memset(buf, 0, sizeof buf); | ||
28 | |||
29 | status = read(fd, buf, len); | ||
30 | if (status < 0) { | ||
31 | perror("read"); | ||
32 | return; | ||
33 | } | ||
34 | if (status != len) { | ||
35 | fprintf(stderr, "short read\n"); | ||
36 | return; | ||
37 | } | ||
38 | |||
39 | printf("read(%2d, %2d): %02x %02x,", len, status, | ||
40 | buf[0], buf[1]); | ||
41 | status -= 2; | ||
42 | bp = buf + 2; | ||
43 | while (status-- > 0) | ||
44 | printf(" %02x", *bp++); | ||
45 | printf("\n"); | ||
46 | } | ||
47 | |||
48 | static void do_msg(int fd, int len) | ||
49 | { | ||
50 | struct spi_ioc_transfer xfer[2]; | ||
51 | unsigned char buf[32], *bp; | ||
52 | int status; | ||
53 | |||
54 | memset(xfer, 0, sizeof xfer); | ||
55 | memset(buf, 0, sizeof buf); | ||
56 | |||
57 | if (len > sizeof buf) | ||
58 | len = sizeof buf; | ||
59 | |||
60 | buf[0] = 0xaa; | ||
61 | xfer[0].tx_buf = (__u64) buf; | ||
62 | xfer[0].len = 1; | ||
63 | |||
64 | xfer[1].rx_buf = (__u64) buf; | ||
65 | xfer[1].len = len; | ||
66 | |||
67 | status = ioctl(fd, SPI_IOC_MESSAGE(2), xfer); | ||
68 | if (status < 0) { | ||
69 | perror("SPI_IOC_MESSAGE"); | ||
70 | return; | ||
71 | } | ||
72 | |||
73 | printf("response(%2d, %2d): ", len, status); | ||
74 | for (bp = buf; len; len--) | ||
75 | printf(" %02x", *bp++); | ||
76 | printf("\n"); | ||
77 | } | ||
78 | |||
79 | static void dumpstat(const char *name, int fd) | ||
80 | { | ||
81 | __u8 mode, lsb, bits; | ||
82 | __u32 speed; | ||
83 | |||
84 | if (ioctl(fd, SPI_IOC_RD_MODE, &mode) < 0) { | ||
85 | perror("SPI rd_mode"); | ||
86 | return; | ||
87 | } | ||
88 | if (ioctl(fd, SPI_IOC_RD_LSB_FIRST, &lsb) < 0) { | ||
89 | perror("SPI rd_lsb_fist"); | ||
90 | return; | ||
91 | } | ||
92 | if (ioctl(fd, SPI_IOC_RD_BITS_PER_WORD, &bits) < 0) { | ||
93 | perror("SPI bits_per_word"); | ||
94 | return; | ||
95 | } | ||
96 | if (ioctl(fd, SPI_IOC_RD_MAX_SPEED_HZ, &speed) < 0) { | ||
97 | perror("SPI max_speed_hz"); | ||
98 | return; | ||
99 | } | ||
100 | |||
101 | printf("%s: spi mode %d, %d bits %sper word, %d Hz max\n", | ||
102 | name, mode, bits, lsb ? "(lsb first) " : "", speed); | ||
103 | } | ||
104 | |||
105 | int main(int argc, char **argv) | ||
106 | { | ||
107 | int c; | ||
108 | int readcount = 0; | ||
109 | int msglen = 0; | ||
110 | int fd; | ||
111 | const char *name; | ||
112 | |||
113 | while ((c = getopt(argc, argv, "hm:r:v")) != EOF) { | ||
114 | switch (c) { | ||
115 | case 'm': | ||
116 | msglen = atoi(optarg); | ||
117 | if (msglen < 0) | ||
118 | goto usage; | ||
119 | continue; | ||
120 | case 'r': | ||
121 | readcount = atoi(optarg); | ||
122 | if (readcount < 0) | ||
123 | goto usage; | ||
124 | continue; | ||
125 | case 'v': | ||
126 | verbose++; | ||
127 | continue; | ||
128 | case 'h': | ||
129 | case '?': | ||
130 | usage: | ||
131 | fprintf(stderr, | ||
132 | "usage: %s [-h] [-m N] [-r N] /dev/spidevB.D\n", | ||
133 | argv[0]); | ||
134 | return 1; | ||
135 | } | ||
136 | } | ||
137 | |||
138 | if ((optind + 1) != argc) | ||
139 | goto usage; | ||
140 | name = argv[optind]; | ||
141 | |||
142 | fd = open(name, O_RDWR); | ||
143 | if (fd < 0) { | ||
144 | perror("open"); | ||
145 | return 1; | ||
146 | } | ||
147 | |||
148 | dumpstat(name, fd); | ||
149 | |||
150 | if (msglen) | ||
151 | do_msg(fd, msglen); | ||
152 | |||
153 | if (readcount) | ||
154 | do_read(fd, readcount); | ||
155 | |||
156 | close(fd); | ||
157 | return 0; | ||
158 | } | ||
diff --git a/Documentation/sysrq.txt b/Documentation/sysrq.txt index 10c8f6922ef4..5ce0952aa065 100644 --- a/Documentation/sysrq.txt +++ b/Documentation/sysrq.txt | |||
@@ -85,6 +85,8 @@ On all - write a character to /proc/sysrq-trigger. e.g.: | |||
85 | 'k' - Secure Access Key (SAK) Kills all programs on the current virtual | 85 | 'k' - Secure Access Key (SAK) Kills all programs on the current virtual |
86 | console. NOTE: See important comments below in SAK section. | 86 | console. NOTE: See important comments below in SAK section. |
87 | 87 | ||
88 | 'l' - Shows a stack backtrace for all active CPUs. | ||
89 | |||
88 | 'm' - Will dump current memory info to your console. | 90 | 'm' - Will dump current memory info to your console. |
89 | 91 | ||
90 | 'n' - Used to make RT tasks nice-able | 92 | 'n' - Used to make RT tasks nice-able |
diff --git a/Documentation/usb/anchors.txt b/Documentation/usb/anchors.txt new file mode 100644 index 000000000000..7304bcf5a306 --- /dev/null +++ b/Documentation/usb/anchors.txt | |||
@@ -0,0 +1,50 @@ | |||
1 | What is anchor? | ||
2 | =============== | ||
3 | |||
4 | A USB driver needs to support some callbacks requiring | ||
5 | a driver to cease all IO to an interface. To do so, a | ||
6 | driver has to keep track of the URBs it has submitted | ||
7 | to know they've all completed or to call usb_kill_urb | ||
8 | for them. The anchor is a data structure takes care of | ||
9 | keeping track of URBs and provides methods to deal with | ||
10 | multiple URBs. | ||
11 | |||
12 | Allocation and Initialisation | ||
13 | ============================= | ||
14 | |||
15 | There's no API to allocate an anchor. It is simply declared | ||
16 | as struct usb_anchor. init_usb_anchor() must be called to | ||
17 | initialise the data structure. | ||
18 | |||
19 | Deallocation | ||
20 | ============ | ||
21 | |||
22 | Once it has no more URBs associated with it, the anchor can be | ||
23 | freed with normal memory management operations. | ||
24 | |||
25 | Association and disassociation of URBs with anchors | ||
26 | =================================================== | ||
27 | |||
28 | An association of URBs to an anchor is made by an explicit | ||
29 | call to usb_anchor_urb(). The association is maintained until | ||
30 | an URB is finished by (successfull) completion. Thus disassociation | ||
31 | is automatic. A function is provided to forcibly finish (kill) | ||
32 | all URBs associated with an anchor. | ||
33 | Furthermore, disassociation can be made with usb_unanchor_urb() | ||
34 | |||
35 | Operations on multitudes of URBs | ||
36 | ================================ | ||
37 | |||
38 | usb_kill_anchored_urbs() | ||
39 | ------------------------ | ||
40 | |||
41 | This function kills all URBs associated with an anchor. The URBs | ||
42 | are called in the reverse temporal order they were submitted. | ||
43 | This way no data can be reordered. | ||
44 | |||
45 | usb_wait_anchor_empty_timeout() | ||
46 | ------------------------------- | ||
47 | |||
48 | This function waits for all URBs associated with an anchor to finish | ||
49 | or a timeout, whichever comes first. Its return value will tell you | ||
50 | whether the timeout was reached. | ||
diff --git a/Documentation/usb/callbacks.txt b/Documentation/usb/callbacks.txt new file mode 100644 index 000000000000..7c812411945b --- /dev/null +++ b/Documentation/usb/callbacks.txt | |||
@@ -0,0 +1,132 @@ | |||
1 | What callbacks will usbcore do? | ||
2 | =============================== | ||
3 | |||
4 | Usbcore will call into a driver through callbacks defined in the driver | ||
5 | structure and through the completion handler of URBs a driver submits. | ||
6 | Only the former are in the scope of this document. These two kinds of | ||
7 | callbacks are completely independent of each other. Information on the | ||
8 | completion callback can be found in Documentation/usb/URB.txt. | ||
9 | |||
10 | The callbacks defined in the driver structure are: | ||
11 | |||
12 | 1. Hotplugging callbacks: | ||
13 | |||
14 | * @probe: Called to see if the driver is willing to manage a particular | ||
15 | * interface on a device. | ||
16 | * @disconnect: Called when the interface is no longer accessible, usually | ||
17 | * because its device has been (or is being) disconnected or the | ||
18 | * driver module is being unloaded. | ||
19 | |||
20 | 2. Odd backdoor through usbfs: | ||
21 | |||
22 | * @ioctl: Used for drivers that want to talk to userspace through | ||
23 | * the "usbfs" filesystem. This lets devices provide ways to | ||
24 | * expose information to user space regardless of where they | ||
25 | * do (or don't) show up otherwise in the filesystem. | ||
26 | |||
27 | 3. Power management (PM) callbacks: | ||
28 | |||
29 | * @suspend: Called when the device is going to be suspended. | ||
30 | * @resume: Called when the device is being resumed. | ||
31 | * @reset_resume: Called when the suspended device has been reset instead | ||
32 | * of being resumed. | ||
33 | |||
34 | 4. Device level operations: | ||
35 | |||
36 | * @pre_reset: Called when the device is about to be reset. | ||
37 | * @post_reset: Called after the device has been reset | ||
38 | |||
39 | The ioctl interface (2) should be used only if you have a very good | ||
40 | reason. Sysfs is preferred these days. The PM callbacks are covered | ||
41 | separately in Documentation/usb/power-management.txt. | ||
42 | |||
43 | Calling conventions | ||
44 | =================== | ||
45 | |||
46 | All callbacks are mutually exclusive. There's no need for locking | ||
47 | against other USB callbacks. All callbacks are called from a task | ||
48 | context. You may sleep. However, it is important that all sleeps have a | ||
49 | small fixed upper limit in time. In particular you must not call out to | ||
50 | user space and await results. | ||
51 | |||
52 | Hotplugging callbacks | ||
53 | ===================== | ||
54 | |||
55 | These callbacks are intended to associate and disassociate a driver with | ||
56 | an interface. A driver's bond to an interface is exclusive. | ||
57 | |||
58 | The probe() callback | ||
59 | -------------------- | ||
60 | |||
61 | int (*probe) (struct usb_interface *intf, | ||
62 | const struct usb_device_id *id); | ||
63 | |||
64 | Accept or decline an interface. If you accept the device return 0, | ||
65 | otherwise -ENODEV or -ENXIO. Other error codes should be used only if a | ||
66 | genuine error occurred during initialisation which prevented a driver | ||
67 | from accepting a device that would else have been accepted. | ||
68 | You are strongly encouraged to use usbcore'sfacility, | ||
69 | usb_set_intfdata(), to associate a data structure with an interface, so | ||
70 | that you know which internal state and identity you associate with a | ||
71 | particular interface. The device will not be suspended and you may do IO | ||
72 | to the interface you are called for and endpoint 0 of the device. Device | ||
73 | initialisation that doesn't take too long is a good idea here. | ||
74 | |||
75 | The disconnect() callback | ||
76 | ------------------------- | ||
77 | |||
78 | void (*disconnect) (struct usb_interface *intf); | ||
79 | |||
80 | This callback is a signal to break any connection with an interface. | ||
81 | You are not allowed any IO to a device after returning from this | ||
82 | callback. You also may not do any other operation that may interfere | ||
83 | with another driver bound the interface, eg. a power management | ||
84 | operation. | ||
85 | If you are called due to a physical disconnection, all your URBs will be | ||
86 | killed by usbcore. Note that in this case disconnect will be called some | ||
87 | time after the physical disconnection. Thus your driver must be prepared | ||
88 | to deal with failing IO even prior to the callback. | ||
89 | |||
90 | Device level callbacks | ||
91 | ====================== | ||
92 | |||
93 | pre_reset | ||
94 | --------- | ||
95 | |||
96 | int (*pre_reset)(struct usb_interface *intf); | ||
97 | |||
98 | Another driver or user space is triggering a reset on the device which | ||
99 | contains the interface passed as an argument. Cease IO and save any | ||
100 | device state you need to restore. | ||
101 | |||
102 | If you need to allocate memory here, use GFP_NOIO or GFP_ATOMIC, if you | ||
103 | are in atomic context. | ||
104 | |||
105 | post_reset | ||
106 | ---------- | ||
107 | |||
108 | int (*post_reset)(struct usb_interface *intf); | ||
109 | |||
110 | The reset has completed. Restore any saved device state and begin | ||
111 | using the device again. | ||
112 | |||
113 | If you need to allocate memory here, use GFP_NOIO or GFP_ATOMIC, if you | ||
114 | are in atomic context. | ||
115 | |||
116 | Call sequences | ||
117 | ============== | ||
118 | |||
119 | No callbacks other than probe will be invoked for an interface | ||
120 | that isn't bound to your driver. | ||
121 | |||
122 | Probe will never be called for an interface bound to a driver. | ||
123 | Hence following a successful probe, disconnect will be called | ||
124 | before there is another probe for the same interface. | ||
125 | |||
126 | Once your driver is bound to an interface, disconnect can be | ||
127 | called at any time except in between pre_reset and post_reset. | ||
128 | pre_reset is always followed by post_reset, even if the reset | ||
129 | failed or the device has been unplugged. | ||
130 | |||
131 | suspend is always followed by one of: resume, reset_resume, or | ||
132 | disconnect. | ||
diff --git a/Documentation/usb/persist.txt b/Documentation/usb/persist.txt index df54d645cbb5..d56cb1a11550 100644 --- a/Documentation/usb/persist.txt +++ b/Documentation/usb/persist.txt | |||
@@ -2,7 +2,7 @@ | |||
2 | 2 | ||
3 | Alan Stern <stern@rowland.harvard.edu> | 3 | Alan Stern <stern@rowland.harvard.edu> |
4 | 4 | ||
5 | September 2, 2006 (Updated May 29, 2007) | 5 | September 2, 2006 (Updated February 25, 2008) |
6 | 6 | ||
7 | 7 | ||
8 | What is the problem? | 8 | What is the problem? |
@@ -65,9 +65,10 @@ much better.) | |||
65 | 65 | ||
66 | What is the solution? | 66 | What is the solution? |
67 | 67 | ||
68 | Setting CONFIG_USB_PERSIST will cause the kernel to work around these | 68 | The kernel includes a feature called USB-persist. It tries to work |
69 | issues. It enables a mode in which the core USB device data | 69 | around these issues by allowing the core USB device data structures to |
70 | structures are allowed to persist across a power-session disruption. | 70 | persist across a power-session disruption. |
71 | |||
71 | It works like this. If the kernel sees that a USB host controller is | 72 | It works like this. If the kernel sees that a USB host controller is |
72 | not in the expected state during resume (i.e., if the controller was | 73 | not in the expected state during resume (i.e., if the controller was |
73 | reset or otherwise had lost power) then it applies a persistence check | 74 | reset or otherwise had lost power) then it applies a persistence check |
@@ -80,28 +81,30 @@ re-enumeration shows that the device now attached to that port has the | |||
80 | same descriptors as before, including the Vendor and Product IDs, then | 81 | same descriptors as before, including the Vendor and Product IDs, then |
81 | the kernel continues to use the same device structure. In effect, the | 82 | the kernel continues to use the same device structure. In effect, the |
82 | kernel treats the device as though it had merely been reset instead of | 83 | kernel treats the device as though it had merely been reset instead of |
83 | unplugged. | 84 | unplugged. The same thing happens if the host controller is in the |
85 | expected state but a USB device was unplugged and then replugged. | ||
84 | 86 | ||
85 | If no device is now attached to the port, or if the descriptors are | 87 | If no device is now attached to the port, or if the descriptors are |
86 | different from what the kernel remembers, then the treatment is what | 88 | different from what the kernel remembers, then the treatment is what |
87 | you would expect. The kernel destroys the old device structure and | 89 | you would expect. The kernel destroys the old device structure and |
88 | behaves as though the old device had been unplugged and a new device | 90 | behaves as though the old device had been unplugged and a new device |
89 | plugged in, just as it would without the CONFIG_USB_PERSIST option. | 91 | plugged in. |
90 | 92 | ||
91 | The end result is that the USB device remains available and usable. | 93 | The end result is that the USB device remains available and usable. |
92 | Filesystem mounts and memory mappings are unaffected, and the world is | 94 | Filesystem mounts and memory mappings are unaffected, and the world is |
93 | now a good and happy place. | 95 | now a good and happy place. |
94 | 96 | ||
95 | Note that even when CONFIG_USB_PERSIST is set, the "persist" feature | 97 | Note that the "USB-persist" feature will be applied only to those |
96 | will be applied only to those devices for which it is enabled. You | 98 | devices for which it is enabled. You can enable the feature by doing |
97 | can enable the feature by doing (as root): | 99 | (as root): |
98 | 100 | ||
99 | echo 1 >/sys/bus/usb/devices/.../power/persist | 101 | echo 1 >/sys/bus/usb/devices/.../power/persist |
100 | 102 | ||
101 | where the "..." should be filled in the with the device's ID. Disable | 103 | where the "..." should be filled in the with the device's ID. Disable |
102 | the feature by writing 0 instead of 1. For hubs the feature is | 104 | the feature by writing 0 instead of 1. For hubs the feature is |
103 | automatically and permanently enabled, so you only have to worry about | 105 | automatically and permanently enabled and the power/persist file |
104 | setting it for devices where it really matters. | 106 | doesn't even exist, so you only have to worry about setting it for |
107 | devices where it really matters. | ||
105 | 108 | ||
106 | 109 | ||
107 | Is this the best solution? | 110 | Is this the best solution? |
@@ -112,19 +115,19 @@ centralized Logical Volume Manager. Such a solution would allow you | |||
112 | to plug in a USB flash device, create a persistent volume associated | 115 | to plug in a USB flash device, create a persistent volume associated |
113 | with it, unplug the flash device, plug it back in later, and still | 116 | with it, unplug the flash device, plug it back in later, and still |
114 | have the same persistent volume associated with the device. As such | 117 | have the same persistent volume associated with the device. As such |
115 | it would be more far-reaching than CONFIG_USB_PERSIST. | 118 | it would be more far-reaching than USB-persist. |
116 | 119 | ||
117 | On the other hand, writing a persistent volume manager would be a big | 120 | On the other hand, writing a persistent volume manager would be a big |
118 | job and using it would require significant input from the user. This | 121 | job and using it would require significant input from the user. This |
119 | solution is much quicker and easier -- and it exists now, a giant | 122 | solution is much quicker and easier -- and it exists now, a giant |
120 | point in its favor! | 123 | point in its favor! |
121 | 124 | ||
122 | Furthermore, the USB_PERSIST option applies to _all_ USB devices, not | 125 | Furthermore, the USB-persist feature applies to _all_ USB devices, not |
123 | just mass-storage devices. It might turn out to be equally useful for | 126 | just mass-storage devices. It might turn out to be equally useful for |
124 | other device types, such as network interfaces. | 127 | other device types, such as network interfaces. |
125 | 128 | ||
126 | 129 | ||
127 | WARNING: Using CONFIG_USB_PERSIST can be dangerous!! | 130 | WARNING: USB-persist can be dangerous!! |
128 | 131 | ||
129 | When recovering an interrupted power session the kernel does its best | 132 | When recovering an interrupted power session the kernel does its best |
130 | to make sure the USB device hasn't been changed; that is, the same | 133 | to make sure the USB device hasn't been changed; that is, the same |
@@ -133,10 +136,10 @@ aren't guaranteed to be 100% accurate. | |||
133 | 136 | ||
134 | If you replace one USB device with another of the same type (same | 137 | If you replace one USB device with another of the same type (same |
135 | manufacturer, same IDs, and so on) there's an excellent chance the | 138 | manufacturer, same IDs, and so on) there's an excellent chance the |
136 | kernel won't detect the change. Serial numbers and other strings are | 139 | kernel won't detect the change. The serial number string and other |
137 | not compared. In many cases it wouldn't help if they were, because | 140 | descriptors are compared with the kernel's stored values, but this |
138 | manufacturers frequently omit serial numbers entirely in their | 141 | might not help since manufacturers frequently omit serial numbers |
139 | devices. | 142 | entirely in their devices. |
140 | 143 | ||
141 | Furthermore it's quite possible to leave a USB device exactly the same | 144 | Furthermore it's quite possible to leave a USB device exactly the same |
142 | while changing its media. If you replace the flash memory card in a | 145 | while changing its media. If you replace the flash memory card in a |
@@ -152,5 +155,5 @@ but yourself. | |||
152 | YOU HAVE BEEN WARNED! USE AT YOUR OWN RISK! | 155 | YOU HAVE BEEN WARNED! USE AT YOUR OWN RISK! |
153 | 156 | ||
154 | That having been said, most of the time there shouldn't be any trouble | 157 | That having been said, most of the time there shouldn't be any trouble |
155 | at all. The "persist" feature can be extremely useful. Make the most | 158 | at all. The USB-persist feature can be extremely useful. Make the |
156 | of it. | 159 | most of it. |
diff --git a/Documentation/usb/usb-serial.txt b/Documentation/usb/usb-serial.txt index 8b077e43eee7..ff2c1ff57ba2 100644 --- a/Documentation/usb/usb-serial.txt +++ b/Documentation/usb/usb-serial.txt | |||
@@ -192,12 +192,9 @@ Keyspan USA-series Serial Adapters | |||
192 | 192 | ||
193 | FTDI Single Port Serial Driver | 193 | FTDI Single Port Serial Driver |
194 | 194 | ||
195 | This is a single port DB-25 serial adapter. More information about this | 195 | This is a single port DB-25 serial adapter. |
196 | device and the Linux driver can be found at: | ||
197 | http://reality.sgi.com/bryder_wellington/ftdi_sio/ | ||
198 | 196 | ||
199 | For any questions or problems with this driver, please contact Bill Ryder | 197 | For any questions or problems with this driver, please contact Bill Ryder. |
200 | at bryder@sgi.com | ||
201 | 198 | ||
202 | 199 | ||
203 | ZyXEL omni.net lcd plus ISDN TA | 200 | ZyXEL omni.net lcd plus ISDN TA |
diff --git a/Documentation/video4linux/CARDLIST.au0828 b/Documentation/video4linux/CARDLIST.au0828 new file mode 100644 index 000000000000..aaae360312e4 --- /dev/null +++ b/Documentation/video4linux/CARDLIST.au0828 | |||
@@ -0,0 +1,4 @@ | |||
1 | 0 -> Unknown board (au0828) | ||
2 | 1 -> Hauppauge HVR950Q (au0828) [2040:7200] | ||
3 | 2 -> Hauppauge HVR850 (au0828) [2040:7240] | ||
4 | 3 -> DViCO FusionHDTV USB (au0828) [0fe9:d620] | ||
diff --git a/Documentation/video4linux/CARDLIST.bttv b/Documentation/video4linux/CARDLIST.bttv index d97cf7cc6088..f32efb6fb12c 100644 --- a/Documentation/video4linux/CARDLIST.bttv +++ b/Documentation/video4linux/CARDLIST.bttv | |||
@@ -148,3 +148,5 @@ | |||
148 | 147 -> VoodooTV 200 (USA) [121a:3000] | 148 | 147 -> VoodooTV 200 (USA) [121a:3000] |
149 | 148 -> DViCO FusionHDTV 2 [dbc0:d200] | 149 | 148 -> DViCO FusionHDTV 2 [dbc0:d200] |
150 | 149 -> Typhoon TV-Tuner PCI (50684) | 150 | 149 -> Typhoon TV-Tuner PCI (50684) |
151 | 150 -> Geovision GV-600 [008a:763c] | ||
152 | 151 -> Kozumi KTV-01C | ||
diff --git a/Documentation/video4linux/CARDLIST.cx23885 b/Documentation/video4linux/CARDLIST.cx23885 index 0924e6e142c4..929b90c8387f 100644 --- a/Documentation/video4linux/CARDLIST.cx23885 +++ b/Documentation/video4linux/CARDLIST.cx23885 | |||
@@ -5,3 +5,6 @@ | |||
5 | 4 -> DViCO FusionHDTV5 Express [18ac:d500] | 5 | 4 -> DViCO FusionHDTV5 Express [18ac:d500] |
6 | 5 -> Hauppauge WinTV-HVR1500Q [0070:7790,0070:7797] | 6 | 5 -> Hauppauge WinTV-HVR1500Q [0070:7790,0070:7797] |
7 | 6 -> Hauppauge WinTV-HVR1500 [0070:7710,0070:7717] | 7 | 6 -> Hauppauge WinTV-HVR1500 [0070:7710,0070:7717] |
8 | 7 -> Hauppauge WinTV-HVR1200 [0070:71d1] | ||
9 | 8 -> Hauppauge WinTV-HVR1700 [0070:8101] | ||
10 | 9 -> Hauppauge WinTV-HVR1400 [0070:8010] | ||
diff --git a/Documentation/video4linux/CARDLIST.cx88 b/Documentation/video4linux/CARDLIST.cx88 index bc5593bd9704..543957346469 100644 --- a/Documentation/video4linux/CARDLIST.cx88 +++ b/Documentation/video4linux/CARDLIST.cx88 | |||
@@ -57,3 +57,12 @@ | |||
57 | 56 -> Hauppauge WinTV-HVR1300 DVB-T/Hybrid MPEG Encoder [0070:9600,0070:9601,0070:9602] | 57 | 56 -> Hauppauge WinTV-HVR1300 DVB-T/Hybrid MPEG Encoder [0070:9600,0070:9601,0070:9602] |
58 | 57 -> ADS Tech Instant Video PCI [1421:0390] | 58 | 57 -> ADS Tech Instant Video PCI [1421:0390] |
59 | 58 -> Pinnacle PCTV HD 800i [11bd:0051] | 59 | 58 -> Pinnacle PCTV HD 800i [11bd:0051] |
60 | 59 -> DViCO FusionHDTV 5 PCI nano [18ac:d530] | ||
61 | 60 -> Pinnacle Hybrid PCTV [12ab:1788] | ||
62 | 61 -> Winfast TV2000 XP Global [107d:6f18] | ||
63 | 62 -> PowerColor Real Angel 330 [14f1:ea3d] | ||
64 | 63 -> Geniatech X8000-MT DVBT [14f1:8852] | ||
65 | 64 -> DViCO FusionHDTV DVB-T PRO [18ac:db30] | ||
66 | 65 -> DViCO FusionHDTV 7 Gold [18ac:d610] | ||
67 | 66 -> Prolink Pixelview MPEG 8000GT [1554:4935] | ||
68 | 67 -> Kworld PlusTV HD PCI 120 (ATSC 120) [17de:08c1] | ||
diff --git a/Documentation/video4linux/CARDLIST.saa7134 b/Documentation/video4linux/CARDLIST.saa7134 index 0424901ebc78..44d84dd15ad6 100644 --- a/Documentation/video4linux/CARDLIST.saa7134 +++ b/Documentation/video4linux/CARDLIST.saa7134 | |||
@@ -25,8 +25,8 @@ | |||
25 | 24 -> KNC One TV-Station DVR [1894:a006] | 25 | 24 -> KNC One TV-Station DVR [1894:a006] |
26 | 25 -> ASUS TV-FM 7133 [1043:4843] | 26 | 25 -> ASUS TV-FM 7133 [1043:4843] |
27 | 26 -> Pinnacle PCTV Stereo (saa7134) [11bd:002b] | 27 | 26 -> Pinnacle PCTV Stereo (saa7134) [11bd:002b] |
28 | 27 -> Manli MuchTV M-TV002/Behold TV 403 FM | 28 | 27 -> Manli MuchTV M-TV002 |
29 | 28 -> Manli MuchTV M-TV001/Behold TV 401 | 29 | 28 -> Manli MuchTV M-TV001 |
30 | 29 -> Nagase Sangyo TransGear 3000TV [1461:050c] | 30 | 29 -> Nagase Sangyo TransGear 3000TV [1461:050c] |
31 | 30 -> Elitegroup ECS TVP3XP FM1216 Tuner Card(PAL-BG,FM) [1019:4cb4] | 31 | 30 -> Elitegroup ECS TVP3XP FM1216 Tuner Card(PAL-BG,FM) [1019:4cb4] |
32 | 31 -> Elitegroup ECS TVP3XP FM1236 Tuner Card (NTSC,FM) [1019:4cb5] | 32 | 31 -> Elitegroup ECS TVP3XP FM1236 Tuner Card (NTSC,FM) [1019:4cb5] |
@@ -131,3 +131,12 @@ | |||
131 | 130 -> Beholder BeholdTV M6 / BeholdTV M6 Extra [5ace:6190,5ace:6193] | 131 | 130 -> Beholder BeholdTV M6 / BeholdTV M6 Extra [5ace:6190,5ace:6193] |
132 | 131 -> Twinhan Hybrid DTV-DVB 3056 PCI [1822:0022] | 132 | 131 -> Twinhan Hybrid DTV-DVB 3056 PCI [1822:0022] |
133 | 132 -> Genius TVGO AM11MCE | 133 | 132 -> Genius TVGO AM11MCE |
134 | 133 -> NXP Snake DVB-S reference design | ||
135 | 134 -> Medion/Creatix CTX953 Hybrid [16be:0010] | ||
136 | 135 -> MSI TV@nywhere A/D v1.1 [1462:8625] | ||
137 | 136 -> AVerMedia Cardbus TV/Radio (E506R) [1461:f436] | ||
138 | 137 -> AVerMedia Hybrid TV/Radio (A16D) [1461:f936] | ||
139 | 138 -> Avermedia M115 [1461:a836] | ||
140 | 139 -> Compro VideoMate T750 [185b:c900] | ||
141 | 140 -> Avermedia DVB-S Pro A700 [1461:a7a1] | ||
142 | 141 -> Avermedia DVB-S Hybrid+FM A700 [1461:a7a2] | ||
diff --git a/Documentation/video4linux/extract_xc3028.pl b/Documentation/video4linux/extract_xc3028.pl index cced8ac5c543..2cb816047fc1 100644 --- a/Documentation/video4linux/extract_xc3028.pl +++ b/Documentation/video4linux/extract_xc3028.pl | |||
@@ -686,11 +686,11 @@ sub main_firmware($$$$) | |||
686 | write_hunk(812664, 192); | 686 | write_hunk(812664, 192); |
687 | 687 | ||
688 | # | 688 | # |
689 | # Firmware 58, type: SCODE FW HAS IF (0x60000000), IF = 4.50 MHz id: NTSC/M Jp (0000000000002000), size: 192 | 689 | # Firmware 58, type: SCODE FW MTS LCD NOGD MONO IF HAS IF (0x6002b004), IF = 4.50 MHz id: NTSC PAL/M PAL/N (000000000000b700), size: 192 |
690 | # | 690 | # |
691 | 691 | ||
692 | write_le32(0x60000000); # Type | 692 | write_le32(0x6002b004); # Type |
693 | write_le64(0x00000000, 0x00002000); # ID | 693 | write_le64(0x00000000, 0x0000b700); # ID |
694 | write_le16(4500); # IF | 694 | write_le16(4500); # IF |
695 | write_le32(192); # Size | 695 | write_le32(192); # Size |
696 | write_hunk(807672, 192); | 696 | write_hunk(807672, 192); |
@@ -706,10 +706,10 @@ sub main_firmware($$$$) | |||
706 | write_hunk(807864, 192); | 706 | write_hunk(807864, 192); |
707 | 707 | ||
708 | # | 708 | # |
709 | # Firmware 60, type: SCODE FW DTV78 ZARLINK456 HAS IF (0x62000100), IF = 4.76 MHz id: (0000000000000000), size: 192 | 709 | # Firmware 60, type: SCODE FW DTV6 QAM DTV7 DTV78 DTV8 ZARLINK456 HAS IF (0x620003e0), IF = 4.76 MHz id: (0000000000000000), size: 192 |
710 | # | 710 | # |
711 | 711 | ||
712 | write_le32(0x62000100); # Type | 712 | write_le32(0x620003e0); # Type |
713 | write_le64(0x00000000, 0x00000000); # ID | 713 | write_le64(0x00000000, 0x00000000); # ID |
714 | write_le16(4760); # IF | 714 | write_le16(4760); # IF |
715 | write_le32(192); # Size | 715 | write_le32(192); # Size |
@@ -726,30 +726,30 @@ sub main_firmware($$$$) | |||
726 | write_hunk(811512, 192); | 726 | write_hunk(811512, 192); |
727 | 727 | ||
728 | # | 728 | # |
729 | # Firmware 62, type: SCODE FW DTV7 ZARLINK456 HAS IF (0x62000080), IF = 5.26 MHz id: (0000000000000000), size: 192 | 729 | # Firmware 62, type: SCODE FW HAS IF (0x60000000), IF = 5.26 MHz id: (0000000000000000), size: 192 |
730 | # | 730 | # |
731 | 731 | ||
732 | write_le32(0x62000080); # Type | 732 | write_le32(0x60000000); # Type |
733 | write_le64(0x00000000, 0x00000000); # ID | 733 | write_le64(0x00000000, 0x00000000); # ID |
734 | write_le16(5260); # IF | 734 | write_le16(5260); # IF |
735 | write_le32(192); # Size | 735 | write_le32(192); # Size |
736 | write_hunk(810552, 192); | 736 | write_hunk(810552, 192); |
737 | 737 | ||
738 | # | 738 | # |
739 | # Firmware 63, type: SCODE FW MONO HAS IF (0x60008000), IF = 5.32 MHz id: PAL/BG NICAM/B (0000000800000007), size: 192 | 739 | # Firmware 63, type: SCODE FW MONO HAS IF (0x60008000), IF = 5.32 MHz id: PAL/BG A2 NICAM (0000000f00000007), size: 192 |
740 | # | 740 | # |
741 | 741 | ||
742 | write_le32(0x60008000); # Type | 742 | write_le32(0x60008000); # Type |
743 | write_le64(0x00000008, 0x00000007); # ID | 743 | write_le64(0x0000000f, 0x00000007); # ID |
744 | write_le16(5320); # IF | 744 | write_le16(5320); # IF |
745 | write_le32(192); # Size | 745 | write_le32(192); # Size |
746 | write_hunk(810744, 192); | 746 | write_hunk(810744, 192); |
747 | 747 | ||
748 | # | 748 | # |
749 | # Firmware 64, type: SCODE FW DTV8 CHINA HAS IF (0x64000200), IF = 5.40 MHz id: (0000000000000000), size: 192 | 749 | # Firmware 64, type: SCODE FW DTV7 DTV78 DTV8 DIBCOM52 CHINA HAS IF (0x65000380), IF = 5.40 MHz id: (0000000000000000), size: 192 |
750 | # | 750 | # |
751 | 751 | ||
752 | write_le32(0x64000200); # Type | 752 | write_le32(0x65000380); # Type |
753 | write_le64(0x00000000, 0x00000000); # ID | 753 | write_le64(0x00000000, 0x00000000); # ID |
754 | write_le16(5400); # IF | 754 | write_le16(5400); # IF |
755 | write_le32(192); # Size | 755 | write_le32(192); # Size |
@@ -766,50 +766,50 @@ sub main_firmware($$$$) | |||
766 | write_hunk(809592, 192); | 766 | write_hunk(809592, 192); |
767 | 767 | ||
768 | # | 768 | # |
769 | # Firmware 66, type: SCODE FW HAS IF (0x60000000), IF = 5.64 MHz id: PAL/BG A2/B (0000000200000007), size: 192 | 769 | # Firmware 66, type: SCODE FW HAS IF (0x60000000), IF = 5.64 MHz id: PAL/BG A2 (0000000300000007), size: 192 |
770 | # | 770 | # |
771 | 771 | ||
772 | write_le32(0x60000000); # Type | 772 | write_le32(0x60000000); # Type |
773 | write_le64(0x00000002, 0x00000007); # ID | 773 | write_le64(0x00000003, 0x00000007); # ID |
774 | write_le16(5640); # IF | 774 | write_le16(5640); # IF |
775 | write_le32(192); # Size | 775 | write_le32(192); # Size |
776 | write_hunk(808440, 192); | 776 | write_hunk(808440, 192); |
777 | 777 | ||
778 | # | 778 | # |
779 | # Firmware 67, type: SCODE FW HAS IF (0x60000000), IF = 5.74 MHz id: PAL/BG NICAM/B (0000000800000007), size: 192 | 779 | # Firmware 67, type: SCODE FW HAS IF (0x60000000), IF = 5.74 MHz id: PAL/BG NICAM (0000000c00000007), size: 192 |
780 | # | 780 | # |
781 | 781 | ||
782 | write_le32(0x60000000); # Type | 782 | write_le32(0x60000000); # Type |
783 | write_le64(0x00000008, 0x00000007); # ID | 783 | write_le64(0x0000000c, 0x00000007); # ID |
784 | write_le16(5740); # IF | 784 | write_le16(5740); # IF |
785 | write_le32(192); # Size | 785 | write_le32(192); # Size |
786 | write_hunk(808632, 192); | 786 | write_hunk(808632, 192); |
787 | 787 | ||
788 | # | 788 | # |
789 | # Firmware 68, type: SCODE FW DTV7 DIBCOM52 HAS IF (0x61000080), IF = 5.90 MHz id: (0000000000000000), size: 192 | 789 | # Firmware 68, type: SCODE FW HAS IF (0x60000000), IF = 5.90 MHz id: (0000000000000000), size: 192 |
790 | # | 790 | # |
791 | 791 | ||
792 | write_le32(0x61000080); # Type | 792 | write_le32(0x60000000); # Type |
793 | write_le64(0x00000000, 0x00000000); # ID | 793 | write_le64(0x00000000, 0x00000000); # ID |
794 | write_le16(5900); # IF | 794 | write_le16(5900); # IF |
795 | write_le32(192); # Size | 795 | write_le32(192); # Size |
796 | write_hunk(810360, 192); | 796 | write_hunk(810360, 192); |
797 | 797 | ||
798 | # | 798 | # |
799 | # Firmware 69, type: SCODE FW MONO HAS IF (0x60008000), IF = 6.00 MHz id: PAL/I (0000000000000010), size: 192 | 799 | # Firmware 69, type: SCODE FW MONO HAS IF (0x60008000), IF = 6.00 MHz id: PAL/DK PAL/I SECAM/K3 SECAM/L SECAM/Lc NICAM (0000000c04c000f0), size: 192 |
800 | # | 800 | # |
801 | 801 | ||
802 | write_le32(0x60008000); # Type | 802 | write_le32(0x60008000); # Type |
803 | write_le64(0x00000000, 0x00000010); # ID | 803 | write_le64(0x0000000c, 0x04c000f0); # ID |
804 | write_le16(6000); # IF | 804 | write_le16(6000); # IF |
805 | write_le32(192); # Size | 805 | write_le32(192); # Size |
806 | write_hunk(808824, 192); | 806 | write_hunk(808824, 192); |
807 | 807 | ||
808 | # | 808 | # |
809 | # Firmware 70, type: SCODE FW DTV6 QAM F6MHZ HAS IF (0x68000060), IF = 6.20 MHz id: (0000000000000000), size: 192 | 809 | # Firmware 70, type: SCODE FW DTV6 QAM ATSC LG60 F6MHZ HAS IF (0x68050060), IF = 6.20 MHz id: (0000000000000000), size: 192 |
810 | # | 810 | # |
811 | 811 | ||
812 | write_le32(0x68000060); # Type | 812 | write_le32(0x68050060); # Type |
813 | write_le64(0x00000000, 0x00000000); # ID | 813 | write_le64(0x00000000, 0x00000000); # ID |
814 | write_le16(6200); # IF | 814 | write_le16(6200); # IF |
815 | write_le32(192); # Size | 815 | write_le32(192); # Size |
@@ -846,11 +846,11 @@ sub main_firmware($$$$) | |||
846 | write_hunk(809208, 192); | 846 | write_hunk(809208, 192); |
847 | 847 | ||
848 | # | 848 | # |
849 | # Firmware 74, type: SCODE FW MONO HAS IF (0x60008000), IF = 6.50 MHz id: SECAM/K3 (0000000004000000), size: 192 | 849 | # Firmware 74, type: SCODE FW MONO HAS IF (0x60008000), IF = 6.50 MHz id: PAL/DK SECAM/K3 SECAM/L NICAM (0000000c044000e0), size: 192 |
850 | # | 850 | # |
851 | 851 | ||
852 | write_le32(0x60008000); # Type | 852 | write_le32(0x60008000); # Type |
853 | write_le64(0x00000000, 0x04000000); # ID | 853 | write_le64(0x0000000c, 0x044000e0); # ID |
854 | write_le16(6500); # IF | 854 | write_le16(6500); # IF |
855 | write_le32(192); # Size | 855 | write_le32(192); # Size |
856 | write_hunk(811128, 192); | 856 | write_hunk(811128, 192); |
diff --git a/Documentation/vm/numa_memory_policy.txt b/Documentation/vm/numa_memory_policy.txt index dd4986497996..bad16d3f6a47 100644 --- a/Documentation/vm/numa_memory_policy.txt +++ b/Documentation/vm/numa_memory_policy.txt | |||
@@ -135,77 +135,58 @@ most general to most specific: | |||
135 | 135 | ||
136 | Components of Memory Policies | 136 | Components of Memory Policies |
137 | 137 | ||
138 | A Linux memory policy is a tuple consisting of a "mode" and an optional set | 138 | A Linux memory policy consists of a "mode", optional mode flags, and an |
139 | of nodes. The mode determine the behavior of the policy, while the | 139 | optional set of nodes. The mode determines the behavior of the policy, |
140 | optional set of nodes can be viewed as the arguments to the behavior. | 140 | the optional mode flags determine the behavior of the mode, and the |
141 | optional set of nodes can be viewed as the arguments to the policy | ||
142 | behavior. | ||
141 | 143 | ||
142 | Internally, memory policies are implemented by a reference counted | 144 | Internally, memory policies are implemented by a reference counted |
143 | structure, struct mempolicy. Details of this structure will be discussed | 145 | structure, struct mempolicy. Details of this structure will be discussed |
144 | in context, below, as required to explain the behavior. | 146 | in context, below, as required to explain the behavior. |
145 | 147 | ||
146 | Note: in some functions AND in the struct mempolicy itself, the mode | ||
147 | is called "policy". However, to avoid confusion with the policy tuple, | ||
148 | this document will continue to use the term "mode". | ||
149 | |||
150 | Linux memory policy supports the following 4 behavioral modes: | 148 | Linux memory policy supports the following 4 behavioral modes: |
151 | 149 | ||
152 | Default Mode--MPOL_DEFAULT: The behavior specified by this mode is | 150 | Default Mode--MPOL_DEFAULT: This mode is only used in the memory |
153 | context or scope dependent. | 151 | policy APIs. Internally, MPOL_DEFAULT is converted to the NULL |
154 | 152 | memory policy in all policy scopes. Any existing non-default policy | |
155 | As mentioned in the Policy Scope section above, during normal | 153 | will simply be removed when MPOL_DEFAULT is specified. As a result, |
156 | system operation, the System Default Policy is hard coded to | 154 | MPOL_DEFAULT means "fall back to the next most specific policy scope." |
157 | contain the Default mode. | ||
158 | |||
159 | In this context, default mode means "local" allocation--that is | ||
160 | attempt to allocate the page from the node associated with the cpu | ||
161 | where the fault occurs. If the "local" node has no memory, or the | ||
162 | node's memory can be exhausted [no free pages available], local | ||
163 | allocation will "fallback to"--attempt to allocate pages from-- | ||
164 | "nearby" nodes, in order of increasing "distance". | ||
165 | 155 | ||
166 | Implementation detail -- subject to change: "Fallback" uses | 156 | For example, a NULL or default task policy will fall back to the |
167 | a per node list of sibling nodes--called zonelists--built at | 157 | system default policy. A NULL or default vma policy will fall |
168 | boot time, or when nodes or memory are added or removed from | 158 | back to the task policy. |
169 | the system [memory hotplug]. These per node zonelist are | ||
170 | constructed with nodes in order of increasing distance based | ||
171 | on information provided by the platform firmware. | ||
172 | 159 | ||
173 | When a task/process policy or a shared policy contains the Default | 160 | When specified in one of the memory policy APIs, the Default mode |
174 | mode, this also means "local allocation", as described above. | 161 | does not use the optional set of nodes. |
175 | 162 | ||
176 | In the context of a VMA, Default mode means "fall back to task | 163 | It is an error for the set of nodes specified for this policy to |
177 | policy"--which may or may not specify Default mode. Thus, Default | 164 | be non-empty. |
178 | mode can not be counted on to mean local allocation when used | ||
179 | on a non-shared region of the address space. However, see | ||
180 | MPOL_PREFERRED below. | ||
181 | |||
182 | The Default mode does not use the optional set of nodes. | ||
183 | 165 | ||
184 | MPOL_BIND: This mode specifies that memory must come from the | 166 | MPOL_BIND: This mode specifies that memory must come from the |
185 | set of nodes specified by the policy. | 167 | set of nodes specified by the policy. Memory will be allocated from |
186 | 168 | the node in the set with sufficient free memory that is closest to | |
187 | The memory policy APIs do not specify an order in which the nodes | 169 | the node where the allocation takes place. |
188 | will be searched. However, unlike "local allocation", the Bind | ||
189 | policy does not consider the distance between the nodes. Rather, | ||
190 | allocations will fallback to the nodes specified by the policy in | ||
191 | order of numeric node id. Like everything in Linux, this is subject | ||
192 | to change. | ||
193 | 170 | ||
194 | MPOL_PREFERRED: This mode specifies that the allocation should be | 171 | MPOL_PREFERRED: This mode specifies that the allocation should be |
195 | attempted from the single node specified in the policy. If that | 172 | attempted from the single node specified in the policy. If that |
196 | allocation fails, the kernel will search other nodes, exactly as | 173 | allocation fails, the kernel will search other nodes, in order of |
197 | it would for a local allocation that started at the preferred node | 174 | increasing distance from the preferred node based on information |
198 | in increasing distance from the preferred node. "Local" allocation | 175 | provided by the platform firmware. |
199 | policy can be viewed as a Preferred policy that starts at the node | ||
200 | containing the cpu where the allocation takes place. | 176 | containing the cpu where the allocation takes place. |
201 | 177 | ||
202 | Internally, the Preferred policy uses a single node--the | 178 | Internally, the Preferred policy uses a single node--the |
203 | preferred_node member of struct mempolicy. A "distinguished | 179 | preferred_node member of struct mempolicy. When the internal |
204 | value of this preferred_node, currently '-1', is interpreted | 180 | mode flag MPOL_F_LOCAL is set, the preferred_node is ignored and |
205 | as "the node containing the cpu where the allocation takes | 181 | the policy is interpreted as local allocation. "Local" allocation |
206 | place"--local allocation. This is the way to specify | 182 | policy can be viewed as a Preferred policy that starts at the node |
207 | local allocation for a specific range of addresses--i.e. for | 183 | containing the cpu where the allocation takes place. |
208 | VMA policies. | 184 | |
185 | It is possible for the user to specify that local allocation is | ||
186 | always preferred by passing an empty nodemask with this mode. | ||
187 | If an empty nodemask is passed, the policy cannot use the | ||
188 | MPOL_F_STATIC_NODES or MPOL_F_RELATIVE_NODES flags described | ||
189 | below. | ||
209 | 190 | ||
210 | MPOL_INTERLEAVED: This mode specifies that page allocations be | 191 | MPOL_INTERLEAVED: This mode specifies that page allocations be |
211 | interleaved, on a page granularity, across the nodes specified in | 192 | interleaved, on a page granularity, across the nodes specified in |
@@ -231,6 +212,154 @@ Components of Memory Policies | |||
231 | the temporary interleaved system default policy works in this | 212 | the temporary interleaved system default policy works in this |
232 | mode. | 213 | mode. |
233 | 214 | ||
215 | Linux memory policy supports the following optional mode flags: | ||
216 | |||
217 | MPOL_F_STATIC_NODES: This flag specifies that the nodemask passed by | ||
218 | the user should not be remapped if the task or VMA's set of allowed | ||
219 | nodes changes after the memory policy has been defined. | ||
220 | |||
221 | Without this flag, anytime a mempolicy is rebound because of a | ||
222 | change in the set of allowed nodes, the node (Preferred) or | ||
223 | nodemask (Bind, Interleave) is remapped to the new set of | ||
224 | allowed nodes. This may result in nodes being used that were | ||
225 | previously undesired. | ||
226 | |||
227 | With this flag, if the user-specified nodes overlap with the | ||
228 | nodes allowed by the task's cpuset, then the memory policy is | ||
229 | applied to their intersection. If the two sets of nodes do not | ||
230 | overlap, the Default policy is used. | ||
231 | |||
232 | For example, consider a task that is attached to a cpuset with | ||
233 | mems 1-3 that sets an Interleave policy over the same set. If | ||
234 | the cpuset's mems change to 3-5, the Interleave will now occur | ||
235 | over nodes 3, 4, and 5. With this flag, however, since only node | ||
236 | 3 is allowed from the user's nodemask, the "interleave" only | ||
237 | occurs over that node. If no nodes from the user's nodemask are | ||
238 | now allowed, the Default behavior is used. | ||
239 | |||
240 | MPOL_F_STATIC_NODES cannot be combined with the | ||
241 | MPOL_F_RELATIVE_NODES flag. It also cannot be used for | ||
242 | MPOL_PREFERRED policies that were created with an empty nodemask | ||
243 | (local allocation). | ||
244 | |||
245 | MPOL_F_RELATIVE_NODES: This flag specifies that the nodemask passed | ||
246 | by the user will be mapped relative to the set of the task or VMA's | ||
247 | set of allowed nodes. The kernel stores the user-passed nodemask, | ||
248 | and if the allowed nodes changes, then that original nodemask will | ||
249 | be remapped relative to the new set of allowed nodes. | ||
250 | |||
251 | Without this flag (and without MPOL_F_STATIC_NODES), anytime a | ||
252 | mempolicy is rebound because of a change in the set of allowed | ||
253 | nodes, the node (Preferred) or nodemask (Bind, Interleave) is | ||
254 | remapped to the new set of allowed nodes. That remap may not | ||
255 | preserve the relative nature of the user's passed nodemask to its | ||
256 | set of allowed nodes upon successive rebinds: a nodemask of | ||
257 | 1,3,5 may be remapped to 7-9 and then to 1-3 if the set of | ||
258 | allowed nodes is restored to its original state. | ||
259 | |||
260 | With this flag, the remap is done so that the node numbers from | ||
261 | the user's passed nodemask are relative to the set of allowed | ||
262 | nodes. In other words, if nodes 0, 2, and 4 are set in the user's | ||
263 | nodemask, the policy will be effected over the first (and in the | ||
264 | Bind or Interleave case, the third and fifth) nodes in the set of | ||
265 | allowed nodes. The nodemask passed by the user represents nodes | ||
266 | relative to task or VMA's set of allowed nodes. | ||
267 | |||
268 | If the user's nodemask includes nodes that are outside the range | ||
269 | of the new set of allowed nodes (for example, node 5 is set in | ||
270 | the user's nodemask when the set of allowed nodes is only 0-3), | ||
271 | then the remap wraps around to the beginning of the nodemask and, | ||
272 | if not already set, sets the node in the mempolicy nodemask. | ||
273 | |||
274 | For example, consider a task that is attached to a cpuset with | ||
275 | mems 2-5 that sets an Interleave policy over the same set with | ||
276 | MPOL_F_RELATIVE_NODES. If the cpuset's mems change to 3-7, the | ||
277 | interleave now occurs over nodes 3,5-6. If the cpuset's mems | ||
278 | then change to 0,2-3,5, then the interleave occurs over nodes | ||
279 | 0,3,5. | ||
280 | |||
281 | Thanks to the consistent remapping, applications preparing | ||
282 | nodemasks to specify memory policies using this flag should | ||
283 | disregard their current, actual cpuset imposed memory placement | ||
284 | and prepare the nodemask as if they were always located on | ||
285 | memory nodes 0 to N-1, where N is the number of memory nodes the | ||
286 | policy is intended to manage. Let the kernel then remap to the | ||
287 | set of memory nodes allowed by the task's cpuset, as that may | ||
288 | change over time. | ||
289 | |||
290 | MPOL_F_RELATIVE_NODES cannot be combined with the | ||
291 | MPOL_F_STATIC_NODES flag. It also cannot be used for | ||
292 | MPOL_PREFERRED policies that were created with an empty nodemask | ||
293 | (local allocation). | ||
294 | |||
295 | MEMORY POLICY REFERENCE COUNTING | ||
296 | |||
297 | To resolve use/free races, struct mempolicy contains an atomic reference | ||
298 | count field. Internal interfaces, mpol_get()/mpol_put() increment and | ||
299 | decrement this reference count, respectively. mpol_put() will only free | ||
300 | the structure back to the mempolicy kmem cache when the reference count | ||
301 | goes to zero. | ||
302 | |||
303 | When a new memory policy is allocated, it's reference count is initialized | ||
304 | to '1', representing the reference held by the task that is installing the | ||
305 | new policy. When a pointer to a memory policy structure is stored in another | ||
306 | structure, another reference is added, as the task's reference will be dropped | ||
307 | on completion of the policy installation. | ||
308 | |||
309 | During run-time "usage" of the policy, we attempt to minimize atomic operations | ||
310 | on the reference count, as this can lead to cache lines bouncing between cpus | ||
311 | and NUMA nodes. "Usage" here means one of the following: | ||
312 | |||
313 | 1) querying of the policy, either by the task itself [using the get_mempolicy() | ||
314 | API discussed below] or by another task using the /proc/<pid>/numa_maps | ||
315 | interface. | ||
316 | |||
317 | 2) examination of the policy to determine the policy mode and associated node | ||
318 | or node lists, if any, for page allocation. This is considered a "hot | ||
319 | path". Note that for MPOL_BIND, the "usage" extends across the entire | ||
320 | allocation process, which may sleep during page reclaimation, because the | ||
321 | BIND policy nodemask is used, by reference, to filter ineligible nodes. | ||
322 | |||
323 | We can avoid taking an extra reference during the usages listed above as | ||
324 | follows: | ||
325 | |||
326 | 1) we never need to get/free the system default policy as this is never | ||
327 | changed nor freed, once the system is up and running. | ||
328 | |||
329 | 2) for querying the policy, we do not need to take an extra reference on the | ||
330 | target task's task policy nor vma policies because we always acquire the | ||
331 | task's mm's mmap_sem for read during the query. The set_mempolicy() and | ||
332 | mbind() APIs [see below] always acquire the mmap_sem for write when | ||
333 | installing or replacing task or vma policies. Thus, there is no possibility | ||
334 | of a task or thread freeing a policy while another task or thread is | ||
335 | querying it. | ||
336 | |||
337 | 3) Page allocation usage of task or vma policy occurs in the fault path where | ||
338 | we hold them mmap_sem for read. Again, because replacing the task or vma | ||
339 | policy requires that the mmap_sem be held for write, the policy can't be | ||
340 | freed out from under us while we're using it for page allocation. | ||
341 | |||
342 | 4) Shared policies require special consideration. One task can replace a | ||
343 | shared memory policy while another task, with a distinct mmap_sem, is | ||
344 | querying or allocating a page based on the policy. To resolve this | ||
345 | potential race, the shared policy infrastructure adds an extra reference | ||
346 | to the shared policy during lookup while holding a spin lock on the shared | ||
347 | policy management structure. This requires that we drop this extra | ||
348 | reference when we're finished "using" the policy. We must drop the | ||
349 | extra reference on shared policies in the same query/allocation paths | ||
350 | used for non-shared policies. For this reason, shared policies are marked | ||
351 | as such, and the extra reference is dropped "conditionally"--i.e., only | ||
352 | for shared policies. | ||
353 | |||
354 | Because of this extra reference counting, and because we must lookup | ||
355 | shared policies in a tree structure under spinlock, shared policies are | ||
356 | more expensive to use in the page allocation path. This is expecially | ||
357 | true for shared policies on shared memory regions shared by tasks running | ||
358 | on different NUMA nodes. This extra overhead can be avoided by always | ||
359 | falling back to task or system default policy for shared memory regions, | ||
360 | or by prefaulting the entire shared memory region into memory and locking | ||
361 | it down. However, this might not be appropriate for all applications. | ||
362 | |||
234 | MEMORY POLICY APIs | 363 | MEMORY POLICY APIs |
235 | 364 | ||
236 | Linux supports 3 system calls for controlling memory policy. These APIS | 365 | Linux supports 3 system calls for controlling memory policy. These APIS |
@@ -251,7 +380,9 @@ Set [Task] Memory Policy: | |||
251 | Set's the calling task's "task/process memory policy" to mode | 380 | Set's the calling task's "task/process memory policy" to mode |
252 | specified by the 'mode' argument and the set of nodes defined | 381 | specified by the 'mode' argument and the set of nodes defined |
253 | by 'nmask'. 'nmask' points to a bit mask of node ids containing | 382 | by 'nmask'. 'nmask' points to a bit mask of node ids containing |
254 | at least 'maxnode' ids. | 383 | at least 'maxnode' ids. Optional mode flags may be passed by |
384 | combining the 'mode' argument with the flag (for example: | ||
385 | MPOL_INTERLEAVE | MPOL_F_STATIC_NODES). | ||
255 | 386 | ||
256 | See the set_mempolicy(2) man page for more details | 387 | See the set_mempolicy(2) man page for more details |
257 | 388 | ||
@@ -303,29 +434,19 @@ MEMORY POLICIES AND CPUSETS | |||
303 | Memory policies work within cpusets as described above. For memory policies | 434 | Memory policies work within cpusets as described above. For memory policies |
304 | that require a node or set of nodes, the nodes are restricted to the set of | 435 | that require a node or set of nodes, the nodes are restricted to the set of |
305 | nodes whose memories are allowed by the cpuset constraints. If the nodemask | 436 | nodes whose memories are allowed by the cpuset constraints. If the nodemask |
306 | specified for the policy contains nodes that are not allowed by the cpuset, or | 437 | specified for the policy contains nodes that are not allowed by the cpuset and |
307 | the intersection of the set of nodes specified for the policy and the set of | 438 | MPOL_F_RELATIVE_NODES is not used, the intersection of the set of nodes |
308 | nodes with memory is the empty set, the policy is considered invalid | 439 | specified for the policy and the set of nodes with memory is used. If the |
309 | and cannot be installed. | 440 | result is the empty set, the policy is considered invalid and cannot be |
310 | 441 | installed. If MPOL_F_RELATIVE_NODES is used, the policy's nodes are mapped | |
311 | The interaction of memory policies and cpusets can be problematic for a | 442 | onto and folded into the task's set of allowed nodes as previously described. |
312 | couple of reasons: | 443 | |
313 | 444 | The interaction of memory policies and cpusets can be problematic when tasks | |
314 | 1) the memory policy APIs take physical node id's as arguments. As mentioned | 445 | in two cpusets share access to a memory region, such as shared memory segments |
315 | above, it is illegal to specify nodes that are not allowed in the cpuset. | 446 | created by shmget() of mmap() with the MAP_ANONYMOUS and MAP_SHARED flags, and |
316 | The application must query the allowed nodes using the get_mempolicy() | 447 | any of the tasks install shared policy on the region, only nodes whose |
317 | API with the MPOL_F_MEMS_ALLOWED flag to determine the allowed nodes and | 448 | memories are allowed in both cpusets may be used in the policies. Obtaining |
318 | restrict itself to those nodes. However, the resources available to a | 449 | this information requires "stepping outside" the memory policy APIs to use the |
319 | cpuset can be changed by the system administrator, or a workload manager | 450 | cpuset information and requires that one know in what cpusets other task might |
320 | application, at any time. So, a task may still get errors attempting to | 451 | be attaching to the shared region. Furthermore, if the cpusets' allowed |
321 | specify policy nodes, and must query the allowed memories again. | 452 | memory sets are disjoint, "local" allocation is the only valid policy. |
322 | |||
323 | 2) when tasks in two cpusets share access to a memory region, such as shared | ||
324 | memory segments created by shmget() of mmap() with the MAP_ANONYMOUS and | ||
325 | MAP_SHARED flags, and any of the tasks install shared policy on the region, | ||
326 | only nodes whose memories are allowed in both cpusets may be used in the | ||
327 | policies. Obtaining this information requires "stepping outside" the | ||
328 | memory policy APIs to use the cpuset information and requires that one | ||
329 | know in what cpusets other task might be attaching to the shared region. | ||
330 | Furthermore, if the cpusets' allowed memory sets are disjoint, "local" | ||
331 | allocation is the only valid policy. | ||
diff --git a/Documentation/vm/slabinfo.c b/Documentation/vm/slabinfo.c index 22d7e3e4d60c..d3ce295bffac 100644 --- a/Documentation/vm/slabinfo.c +++ b/Documentation/vm/slabinfo.c | |||
@@ -31,7 +31,7 @@ struct slabinfo { | |||
31 | int hwcache_align, object_size, objs_per_slab; | 31 | int hwcache_align, object_size, objs_per_slab; |
32 | int sanity_checks, slab_size, store_user, trace; | 32 | int sanity_checks, slab_size, store_user, trace; |
33 | int order, poison, reclaim_account, red_zone; | 33 | int order, poison, reclaim_account, red_zone; |
34 | unsigned long partial, objects, slabs; | 34 | unsigned long partial, objects, slabs, objects_partial, objects_total; |
35 | unsigned long alloc_fastpath, alloc_slowpath; | 35 | unsigned long alloc_fastpath, alloc_slowpath; |
36 | unsigned long free_fastpath, free_slowpath; | 36 | unsigned long free_fastpath, free_slowpath; |
37 | unsigned long free_frozen, free_add_partial, free_remove_partial; | 37 | unsigned long free_frozen, free_add_partial, free_remove_partial; |
@@ -540,7 +540,8 @@ void slabcache(struct slabinfo *s) | |||
540 | return; | 540 | return; |
541 | 541 | ||
542 | store_size(size_str, slab_size(s)); | 542 | store_size(size_str, slab_size(s)); |
543 | snprintf(dist_str, 40, "%lu/%lu/%d", s->slabs, s->partial, s->cpu_slabs); | 543 | snprintf(dist_str, 40, "%lu/%lu/%d", s->slabs - s->cpu_slabs, |
544 | s->partial, s->cpu_slabs); | ||
544 | 545 | ||
545 | if (!line++) | 546 | if (!line++) |
546 | first_line(); | 547 | first_line(); |
@@ -776,7 +777,6 @@ void totals(void) | |||
776 | unsigned long used; | 777 | unsigned long used; |
777 | unsigned long long wasted; | 778 | unsigned long long wasted; |
778 | unsigned long long objwaste; | 779 | unsigned long long objwaste; |
779 | long long objects_in_partial_slabs; | ||
780 | unsigned long percentage_partial_slabs; | 780 | unsigned long percentage_partial_slabs; |
781 | unsigned long percentage_partial_objs; | 781 | unsigned long percentage_partial_objs; |
782 | 782 | ||
@@ -790,18 +790,11 @@ void totals(void) | |||
790 | wasted = size - used; | 790 | wasted = size - used; |
791 | objwaste = s->slab_size - s->object_size; | 791 | objwaste = s->slab_size - s->object_size; |
792 | 792 | ||
793 | objects_in_partial_slabs = s->objects - | ||
794 | (s->slabs - s->partial - s ->cpu_slabs) * | ||
795 | s->objs_per_slab; | ||
796 | |||
797 | if (objects_in_partial_slabs < 0) | ||
798 | objects_in_partial_slabs = 0; | ||
799 | |||
800 | percentage_partial_slabs = s->partial * 100 / s->slabs; | 793 | percentage_partial_slabs = s->partial * 100 / s->slabs; |
801 | if (percentage_partial_slabs > 100) | 794 | if (percentage_partial_slabs > 100) |
802 | percentage_partial_slabs = 100; | 795 | percentage_partial_slabs = 100; |
803 | 796 | ||
804 | percentage_partial_objs = objects_in_partial_slabs * 100 | 797 | percentage_partial_objs = s->objects_partial * 100 |
805 | / s->objects; | 798 | / s->objects; |
806 | 799 | ||
807 | if (percentage_partial_objs > 100) | 800 | if (percentage_partial_objs > 100) |
@@ -823,8 +816,8 @@ void totals(void) | |||
823 | min_objects = s->objects; | 816 | min_objects = s->objects; |
824 | if (used < min_used) | 817 | if (used < min_used) |
825 | min_used = used; | 818 | min_used = used; |
826 | if (objects_in_partial_slabs < min_partobj) | 819 | if (s->objects_partial < min_partobj) |
827 | min_partobj = objects_in_partial_slabs; | 820 | min_partobj = s->objects_partial; |
828 | if (percentage_partial_slabs < min_ppart) | 821 | if (percentage_partial_slabs < min_ppart) |
829 | min_ppart = percentage_partial_slabs; | 822 | min_ppart = percentage_partial_slabs; |
830 | if (percentage_partial_objs < min_ppartobj) | 823 | if (percentage_partial_objs < min_ppartobj) |
@@ -848,8 +841,8 @@ void totals(void) | |||
848 | max_objects = s->objects; | 841 | max_objects = s->objects; |
849 | if (used > max_used) | 842 | if (used > max_used) |
850 | max_used = used; | 843 | max_used = used; |
851 | if (objects_in_partial_slabs > max_partobj) | 844 | if (s->objects_partial > max_partobj) |
852 | max_partobj = objects_in_partial_slabs; | 845 | max_partobj = s->objects_partial; |
853 | if (percentage_partial_slabs > max_ppart) | 846 | if (percentage_partial_slabs > max_ppart) |
854 | max_ppart = percentage_partial_slabs; | 847 | max_ppart = percentage_partial_slabs; |
855 | if (percentage_partial_objs > max_ppartobj) | 848 | if (percentage_partial_objs > max_ppartobj) |
@@ -864,7 +857,7 @@ void totals(void) | |||
864 | 857 | ||
865 | total_objects += s->objects; | 858 | total_objects += s->objects; |
866 | total_used += used; | 859 | total_used += used; |
867 | total_partobj += objects_in_partial_slabs; | 860 | total_partobj += s->objects_partial; |
868 | total_ppart += percentage_partial_slabs; | 861 | total_ppart += percentage_partial_slabs; |
869 | total_ppartobj += percentage_partial_objs; | 862 | total_ppartobj += percentage_partial_objs; |
870 | 863 | ||
@@ -1160,6 +1153,8 @@ void read_slab_dir(void) | |||
1160 | slab->hwcache_align = get_obj("hwcache_align"); | 1153 | slab->hwcache_align = get_obj("hwcache_align"); |
1161 | slab->object_size = get_obj("object_size"); | 1154 | slab->object_size = get_obj("object_size"); |
1162 | slab->objects = get_obj("objects"); | 1155 | slab->objects = get_obj("objects"); |
1156 | slab->objects_partial = get_obj("objects_partial"); | ||
1157 | slab->objects_total = get_obj("objects_total"); | ||
1163 | slab->objs_per_slab = get_obj("objs_per_slab"); | 1158 | slab->objs_per_slab = get_obj("objs_per_slab"); |
1164 | slab->order = get_obj("order"); | 1159 | slab->order = get_obj("order"); |
1165 | slab->partial = get_obj("partial"); | 1160 | slab->partial = get_obj("partial"); |