diff options
Diffstat (limited to 'Documentation')
102 files changed, 4693 insertions, 2016 deletions
diff --git a/Documentation/00-INDEX b/Documentation/00-INDEX index e8fb24671967..1977fab38656 100644 --- a/Documentation/00-INDEX +++ b/Documentation/00-INDEX | |||
@@ -25,8 +25,6 @@ DMA-API.txt | |||
25 | - DMA API, pci_ API & extensions for non-consistent memory machines. | 25 | - DMA API, pci_ API & extensions for non-consistent memory machines. |
26 | DMA-ISA-LPC.txt | 26 | DMA-ISA-LPC.txt |
27 | - How to do DMA with ISA (and LPC) devices. | 27 | - How to do DMA with ISA (and LPC) devices. |
28 | DMA-mapping.txt | ||
29 | - info for PCI drivers using DMA portably across all platforms. | ||
30 | DocBook/ | 28 | DocBook/ |
31 | - directory with DocBook templates etc. for kernel documentation. | 29 | - directory with DocBook templates etc. for kernel documentation. |
32 | HOWTO | 30 | HOWTO |
@@ -43,8 +41,6 @@ ManagementStyle | |||
43 | - how to (attempt to) manage kernel hackers. | 41 | - how to (attempt to) manage kernel hackers. |
44 | MSI-HOWTO.txt | 42 | MSI-HOWTO.txt |
45 | - the Message Signaled Interrupts (MSI) Driver Guide HOWTO and FAQ. | 43 | - the Message Signaled Interrupts (MSI) Driver Guide HOWTO and FAQ. |
46 | PCIEBUS-HOWTO.txt | ||
47 | - a guide describing the PCI Express Port Bus driver. | ||
48 | RCU/ | 44 | RCU/ |
49 | - directory with info on RCU (read-copy update). | 45 | - directory with info on RCU (read-copy update). |
50 | README.DAC960 | 46 | README.DAC960 |
@@ -167,10 +163,8 @@ highuid.txt | |||
167 | - notes on the change from 16 bit to 32 bit user/group IDs. | 163 | - notes on the change from 16 bit to 32 bit user/group IDs. |
168 | hpet.txt | 164 | hpet.txt |
169 | - High Precision Event Timer Driver for Linux. | 165 | - High Precision Event Timer Driver for Linux. |
170 | hrtimer/ | 166 | timers/ |
171 | - info on the timer_stats debugging facility for timer (ab)use. | 167 | - info on the timer related topics |
172 | hrtimers/ | ||
173 | - info on the hrtimers subsystem for high-resolution kernel timers. | ||
174 | hw_random.txt | 168 | hw_random.txt |
175 | - info on Linux support for random number generator in i8xx chipsets. | 169 | - info on Linux support for random number generator in i8xx chipsets. |
176 | hwmon/ | 170 | hwmon/ |
@@ -287,12 +281,6 @@ parport.txt | |||
287 | - how to use the parallel-port driver. | 281 | - how to use the parallel-port driver. |
288 | parport-lowlevel.txt | 282 | parport-lowlevel.txt |
289 | - description and usage of the low level parallel port functions. | 283 | - description and usage of the low level parallel port functions. |
290 | pci-error-recovery.txt | ||
291 | - info on PCI error recovery. | ||
292 | pci.txt | ||
293 | - info on the PCI subsystem for device driver authors. | ||
294 | pcieaer-howto.txt | ||
295 | - the PCI Express Advanced Error Reporting Driver Guide HOWTO. | ||
296 | pcmcia/ | 284 | pcmcia/ |
297 | - info on the Linux PCMCIA driver. | 285 | - info on the Linux PCMCIA driver. |
298 | pi-futex.txt | 286 | pi-futex.txt |
@@ -341,8 +329,6 @@ sgi-visws.txt | |||
341 | - short blurb on the SGI Visual Workstations. | 329 | - short blurb on the SGI Visual Workstations. |
342 | sh/ | 330 | sh/ |
343 | - directory with info on porting Linux to a new architecture. | 331 | - directory with info on porting Linux to a new architecture. |
344 | smart-config.txt | ||
345 | - description of the Smart Config makefile feature. | ||
346 | sound/ | 332 | sound/ |
347 | - directory with info on sound card support. | 333 | - directory with info on sound card support. |
348 | sparc/ | 334 | sparc/ |
diff --git a/Documentation/ABI/obsolete/o2cb b/Documentation/ABI/obsolete/o2cb new file mode 100644 index 000000000000..9c49d8e6c0cc --- /dev/null +++ b/Documentation/ABI/obsolete/o2cb | |||
@@ -0,0 +1,11 @@ | |||
1 | What: /sys/o2cb symlink | ||
2 | Date: Dec 2005 | ||
3 | KernelVersion: 2.6.16 | ||
4 | Contact: ocfs2-devel@oss.oracle.com | ||
5 | Description: This is a symlink: /sys/o2cb to /sys/fs/o2cb. The symlink will | ||
6 | be removed when new versions of ocfs2-tools which know to look | ||
7 | in /sys/fs/o2cb are sufficiently prevalent. Don't code new | ||
8 | software to look here, it should try /sys/fs/o2cb instead. | ||
9 | See Documentation/ABI/stable/o2cb for more information on usage. | ||
10 | Users: ocfs2-tools. It's sufficient to mail proposed changes to | ||
11 | ocfs2-devel@oss.oracle.com. | ||
diff --git a/Documentation/ABI/stable/o2cb b/Documentation/ABI/stable/o2cb new file mode 100644 index 000000000000..5eb1545e0b8d --- /dev/null +++ b/Documentation/ABI/stable/o2cb | |||
@@ -0,0 +1,10 @@ | |||
1 | What: /sys/fs/o2cb/ (was /sys/o2cb) | ||
2 | Date: Dec 2005 | ||
3 | KernelVersion: 2.6.16 | ||
4 | Contact: ocfs2-devel@oss.oracle.com | ||
5 | Description: Ocfs2-tools looks at 'interface-revision' for versioning | ||
6 | information. Each logmask/ file controls a set of debug prints | ||
7 | and can be written into with the strings "allow", "deny", or | ||
8 | "off". Reading the file returns the current state. | ||
9 | Users: ocfs2-tools. It's sufficient to mail proposed changes to | ||
10 | ocfs2-devel@oss.oracle.com. | ||
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/ABI/testing/sysfs-bus-pci b/Documentation/ABI/testing/sysfs-bus-pci new file mode 100644 index 000000000000..ceddcff4082a --- /dev/null +++ b/Documentation/ABI/testing/sysfs-bus-pci | |||
@@ -0,0 +1,11 @@ | |||
1 | What: /sys/bus/pci/devices/.../vpd | ||
2 | Date: February 2008 | ||
3 | Contact: Ben Hutchings <bhutchings@solarflare.com> | ||
4 | Description: | ||
5 | A file named vpd in a device directory will be a | ||
6 | binary file containing the Vital Product Data for the | ||
7 | device. It should follow the VPD format defined in | ||
8 | PCI Specification 2.1 or 2.2, but users should consider | ||
9 | that some devices may have malformatted data. If the | ||
10 | underlying VPD has a writable section then the | ||
11 | corresponding section of this file will be writable. | ||
diff --git a/Documentation/ABI/testing/sysfs-ibft b/Documentation/ABI/testing/sysfs-ibft new file mode 100644 index 000000000000..c2b7d1154bec --- /dev/null +++ b/Documentation/ABI/testing/sysfs-ibft | |||
@@ -0,0 +1,23 @@ | |||
1 | What: /sys/firmware/ibft/initiator | ||
2 | Date: November 2007 | ||
3 | Contact: Konrad Rzeszutek <ketuzsezr@darnok.org> | ||
4 | Description: The /sys/firmware/ibft/initiator directory will contain | ||
5 | files that expose the iSCSI Boot Firmware Table initiator data. | ||
6 | Usually this contains the Initiator name. | ||
7 | |||
8 | What: /sys/firmware/ibft/targetX | ||
9 | Date: November 2007 | ||
10 | Contact: Konrad Rzeszutek <ketuzsezr@darnok.org> | ||
11 | Description: The /sys/firmware/ibft/targetX directory will contain | ||
12 | files that expose the iSCSI Boot Firmware Table target data. | ||
13 | Usually this contains the target's IP address, boot LUN, | ||
14 | target name, and what NIC it is associated with. It can also | ||
15 | contain the CHAP name (and password), the reverse CHAP | ||
16 | name (and password) | ||
17 | |||
18 | What: /sys/firmware/ibft/ethernetX | ||
19 | Date: November 2007 | ||
20 | Contact: Konrad Rzeszutek <ketuzsezr@darnok.org> | ||
21 | Description: The /sys/firmware/ibft/ethernetX directory will contain | ||
22 | files that expose the iSCSI Boot Firmware Table NIC data. | ||
23 | This can this can the IP address, MAC, and gateway of the NIC. | ||
diff --git a/Documentation/ABI/testing/sysfs-ocfs2 b/Documentation/ABI/testing/sysfs-ocfs2 new file mode 100644 index 000000000000..b7cc516a8a8a --- /dev/null +++ b/Documentation/ABI/testing/sysfs-ocfs2 | |||
@@ -0,0 +1,89 @@ | |||
1 | What: /sys/fs/ocfs2/ | ||
2 | Date: April 2008 | ||
3 | Contact: ocfs2-devel@oss.oracle.com | ||
4 | Description: | ||
5 | The /sys/fs/ocfs2 directory contains knobs used by the | ||
6 | ocfs2-tools to interact with the filesystem. | ||
7 | |||
8 | What: /sys/fs/ocfs2/max_locking_protocol | ||
9 | Date: April 2008 | ||
10 | Contact: ocfs2-devel@oss.oracle.com | ||
11 | Description: | ||
12 | The /sys/fs/ocfs2/max_locking_protocol file displays version | ||
13 | of ocfs2 locking supported by the filesystem. This version | ||
14 | covers how ocfs2 uses distributed locking between cluster | ||
15 | nodes. | ||
16 | |||
17 | The protocol version has a major and minor number. Two | ||
18 | cluster nodes can interoperate if they have an identical | ||
19 | major number and an overlapping minor number - thus, | ||
20 | a node with version 1.10 can interoperate with a node | ||
21 | sporting version 1.8, as long as both use the 1.8 protocol. | ||
22 | |||
23 | Reading from this file returns a single line, the major | ||
24 | number and minor number joined by a period, eg "1.10". | ||
25 | |||
26 | This file is read-only. The value is compiled into the | ||
27 | driver. | ||
28 | |||
29 | What: /sys/fs/ocfs2/loaded_cluster_plugins | ||
30 | Date: April 2008 | ||
31 | Contact: ocfs2-devel@oss.oracle.com | ||
32 | Description: | ||
33 | The /sys/fs/ocfs2/loaded_cluster_plugins file describes | ||
34 | the available plugins to support ocfs2 cluster operation. | ||
35 | A cluster plugin is required to use ocfs2 in a cluster. | ||
36 | There are currently two available plugins: | ||
37 | |||
38 | * 'o2cb' - The classic o2cb cluster stack that ocfs2 has | ||
39 | used since its inception. | ||
40 | * 'user' - A plugin supporting userspace cluster software | ||
41 | in conjunction with fs/dlm. | ||
42 | |||
43 | Reading from this file returns the names of all loaded | ||
44 | plugins, one per line. | ||
45 | |||
46 | This file is read-only. Its contents may change as | ||
47 | plugins are loaded or removed. | ||
48 | |||
49 | What: /sys/fs/ocfs2/active_cluster_plugin | ||
50 | Date: April 2008 | ||
51 | Contact: ocfs2-devel@oss.oracle.com | ||
52 | Description: | ||
53 | The /sys/fs/ocfs2/active_cluster_plugin displays which | ||
54 | cluster plugin is currently in use by the filesystem. | ||
55 | The active plugin will appear in the loaded_cluster_plugins | ||
56 | file as well. Only one plugin can be used at a time. | ||
57 | |||
58 | Reading from this file returns the name of the active plugin | ||
59 | on a single line. | ||
60 | |||
61 | This file is read-only. Which plugin is active depends on | ||
62 | the cluster stack in use. The contents may change | ||
63 | when all filesystems are unmounted and the cluster stack | ||
64 | is changed. | ||
65 | |||
66 | What: /sys/fs/ocfs2/cluster_stack | ||
67 | Date: April 2008 | ||
68 | Contact: ocfs2-devel@oss.oracle.com | ||
69 | Description: | ||
70 | The /sys/fs/ocfs2/cluster_stack file contains the name | ||
71 | of current ocfs2 cluster stack. This value is set by | ||
72 | userspace tools when bringing the cluster stack online. | ||
73 | |||
74 | Cluster stack names are 4 characters in length. | ||
75 | |||
76 | When the 'o2cb' cluster stack is used, the 'o2cb' cluster | ||
77 | plugin is active. All other cluster stacks use the 'user' | ||
78 | cluster plugin. | ||
79 | |||
80 | Reading from this file returns the name of the current | ||
81 | cluster stack on a single line. | ||
82 | |||
83 | Writing a new stack name to this file changes the current | ||
84 | cluster stack unless there are mounted ocfs2 filesystems. | ||
85 | If there are mounted filesystems, attempts to change the | ||
86 | stack return an error. | ||
87 | |||
88 | Users: | ||
89 | ocfs2-tools <ocfs2-tools-devel@oss.oracle.com> | ||
diff --git a/Documentation/DocBook/Makefile b/Documentation/DocBook/Makefile index 300e1707893f..83966e94cc32 100644 --- a/Documentation/DocBook/Makefile +++ b/Documentation/DocBook/Makefile | |||
@@ -9,9 +9,10 @@ | |||
9 | DOCBOOKS := wanbook.xml z8530book.xml mcabook.xml videobook.xml \ | 9 | DOCBOOKS := wanbook.xml z8530book.xml mcabook.xml videobook.xml \ |
10 | kernel-hacking.xml kernel-locking.xml deviceiobook.xml \ | 10 | kernel-hacking.xml kernel-locking.xml deviceiobook.xml \ |
11 | procfs-guide.xml writing_usb_driver.xml networking.xml \ | 11 | procfs-guide.xml writing_usb_driver.xml networking.xml \ |
12 | kernel-api.xml filesystems.xml lsm.xml usb.xml \ | 12 | kernel-api.xml filesystems.xml lsm.xml usb.xml kgdb.xml \ |
13 | gadget.xml libata.xml mtdnand.xml librs.xml rapidio.xml \ | 13 | gadget.xml libata.xml mtdnand.xml librs.xml rapidio.xml \ |
14 | genericirq.xml s390-drivers.xml uio-howto.xml scsi.xml | 14 | genericirq.xml s390-drivers.xml uio-howto.xml scsi.xml \ |
15 | mac80211.xml | ||
15 | 16 | ||
16 | ### | 17 | ### |
17 | # The build process is as follows (targets): | 18 | # The build process is as follows (targets): |
@@ -186,8 +187,11 @@ quiet_cmd_fig2png = FIG2PNG $@ | |||
186 | 187 | ||
187 | ### | 188 | ### |
188 | # 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 = : | ||
189 | %.xml: %.c | 193 | %.xml: %.c |
190 | @echo ' GEN $@' | 194 | @$($(quiet)gen_xml) |
191 | @( \ | 195 | @( \ |
192 | echo "<programlisting>"; \ | 196 | echo "<programlisting>"; \ |
193 | expand --tabs=8 < $< | \ | 197 | expand --tabs=8 < $< | \ |
diff --git a/Documentation/DocBook/kernel-api.tmpl b/Documentation/DocBook/kernel-api.tmpl index dc0f30c3e571..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 | ||
@@ -297,11 +297,6 @@ X!Earch/x86/kernel/mca_32.c | |||
297 | !Ikernel/acct.c | 297 | !Ikernel/acct.c |
298 | </chapter> | 298 | </chapter> |
299 | 299 | ||
300 | <chapter id="pmfuncs"> | ||
301 | <title>Power Management</title> | ||
302 | !Ekernel/power/pm.c | ||
303 | </chapter> | ||
304 | |||
305 | <chapter id="devdrivers"> | 300 | <chapter id="devdrivers"> |
306 | <title>Device drivers infrastructure</title> | 301 | <title>Device drivers infrastructure</title> |
307 | <sect1><title>Device Drivers Base</title> | 302 | <sect1><title>Device Drivers Base</title> |
@@ -650,4 +645,58 @@ X!Idrivers/video/console/fonts.c | |||
650 | !Edrivers/i2c/i2c-core.c | 645 | !Edrivers/i2c/i2c-core.c |
651 | </chapter> | 646 | </chapter> |
652 | 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 | |||
653 | </book> | 702 | </book> |
diff --git a/Documentation/DocBook/kernel-locking.tmpl b/Documentation/DocBook/kernel-locking.tmpl index 2e9d6b41f034..77c42f40be5d 100644 --- a/Documentation/DocBook/kernel-locking.tmpl +++ b/Documentation/DocBook/kernel-locking.tmpl | |||
@@ -241,7 +241,7 @@ | |||
241 | </para> | 241 | </para> |
242 | <para> | 242 | <para> |
243 | The third type is a semaphore | 243 | The third type is a semaphore |
244 | (<filename class="headerfile">include/asm/semaphore.h</filename>): it | 244 | (<filename class="headerfile">include/linux/semaphore.h</filename>): it |
245 | can have more than one holder at any time (the number decided at | 245 | can have more than one holder at any time (the number decided at |
246 | initialization time), although it is most commonly used as a | 246 | initialization time), although it is most commonly used as a |
247 | single-holder lock (a mutex). If you can't get a semaphore, your | 247 | single-holder lock (a mutex). If you can't get a semaphore, your |
@@ -290,7 +290,7 @@ | |||
290 | <para> | 290 | <para> |
291 | If you have a data structure which is only ever accessed from | 291 | If you have a data structure which is only ever accessed from |
292 | user context, then you can use a simple semaphore | 292 | user context, then you can use a simple semaphore |
293 | (<filename>linux/asm/semaphore.h</filename>) to protect it. This | 293 | (<filename>linux/linux/semaphore.h</filename>) to protect it. This |
294 | is the most trivial case: you initialize the semaphore to the number | 294 | is the most trivial case: you initialize the semaphore to the number |
295 | of resources available (usually 1), and call | 295 | of resources available (usually 1), and call |
296 | <function>down_interruptible()</function> to grab the semaphore, and | 296 | <function>down_interruptible()</function> to grab the semaphore, and |
@@ -854,7 +854,7 @@ The change is shown below, in standard patch format: the | |||
854 | }; | 854 | }; |
855 | 855 | ||
856 | -static DEFINE_MUTEX(cache_lock); | 856 | -static DEFINE_MUTEX(cache_lock); |
857 | +static spinlock_t cache_lock = SPIN_LOCK_UNLOCKED; | 857 | +static DEFINE_SPINLOCK(cache_lock); |
858 | static LIST_HEAD(cache); | 858 | static LIST_HEAD(cache); |
859 | static unsigned int cache_num = 0; | 859 | static unsigned int cache_num = 0; |
860 | #define MAX_CACHE_SIZE 10 | 860 | #define MAX_CACHE_SIZE 10 |
@@ -1238,7 +1238,7 @@ Here is the "lock-per-object" implementation: | |||
1238 | - int popularity; | 1238 | - int popularity; |
1239 | }; | 1239 | }; |
1240 | 1240 | ||
1241 | static spinlock_t cache_lock = SPIN_LOCK_UNLOCKED; | 1241 | static DEFINE_SPINLOCK(cache_lock); |
1242 | @@ -77,6 +84,7 @@ | 1242 | @@ -77,6 +84,7 @@ |
1243 | obj->id = id; | 1243 | obj->id = id; |
1244 | obj->popularity = 0; | 1244 | obj->popularity = 0; |
@@ -1656,7 +1656,7 @@ the amount of locking which needs to be done. | |||
1656 | #include <linux/slab.h> | 1656 | #include <linux/slab.h> |
1657 | #include <linux/string.h> | 1657 | #include <linux/string.h> |
1658 | +#include <linux/rcupdate.h> | 1658 | +#include <linux/rcupdate.h> |
1659 | #include <asm/semaphore.h> | 1659 | #include <linux/semaphore.h> |
1660 | #include <asm/errno.h> | 1660 | #include <asm/errno.h> |
1661 | 1661 | ||
1662 | struct object | 1662 | struct object |
diff --git a/Documentation/DocBook/kgdb.tmpl b/Documentation/DocBook/kgdb.tmpl new file mode 100644 index 000000000000..97618bed4d65 --- /dev/null +++ b/Documentation/DocBook/kgdb.tmpl | |||
@@ -0,0 +1,447 @@ | |||
1 | <?xml version="1.0" encoding="UTF-8"?> | ||
2 | <!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN" | ||
3 | "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd" []> | ||
4 | |||
5 | <book id="kgdbOnLinux"> | ||
6 | <bookinfo> | ||
7 | <title>Using kgdb and the kgdb Internals</title> | ||
8 | |||
9 | <authorgroup> | ||
10 | <author> | ||
11 | <firstname>Jason</firstname> | ||
12 | <surname>Wessel</surname> | ||
13 | <affiliation> | ||
14 | <address> | ||
15 | <email>jason.wessel@windriver.com</email> | ||
16 | </address> | ||
17 | </affiliation> | ||
18 | </author> | ||
19 | </authorgroup> | ||
20 | |||
21 | <authorgroup> | ||
22 | <author> | ||
23 | <firstname>Tom</firstname> | ||
24 | <surname>Rini</surname> | ||
25 | <affiliation> | ||
26 | <address> | ||
27 | <email>trini@kernel.crashing.org</email> | ||
28 | </address> | ||
29 | </affiliation> | ||
30 | </author> | ||
31 | </authorgroup> | ||
32 | |||
33 | <authorgroup> | ||
34 | <author> | ||
35 | <firstname>Amit S.</firstname> | ||
36 | <surname>Kale</surname> | ||
37 | <affiliation> | ||
38 | <address> | ||
39 | <email>amitkale@linsyssoft.com</email> | ||
40 | </address> | ||
41 | </affiliation> | ||
42 | </author> | ||
43 | </authorgroup> | ||
44 | |||
45 | <copyright> | ||
46 | <year>2008</year> | ||
47 | <holder>Wind River Systems, Inc.</holder> | ||
48 | </copyright> | ||
49 | <copyright> | ||
50 | <year>2004-2005</year> | ||
51 | <holder>MontaVista Software, Inc.</holder> | ||
52 | </copyright> | ||
53 | <copyright> | ||
54 | <year>2004</year> | ||
55 | <holder>Amit S. Kale</holder> | ||
56 | </copyright> | ||
57 | |||
58 | <legalnotice> | ||
59 | <para> | ||
60 | This file is licensed under the terms of the GNU General Public License | ||
61 | version 2. This program is licensed "as is" without any warranty of any | ||
62 | kind, whether express or implied. | ||
63 | </para> | ||
64 | |||
65 | </legalnotice> | ||
66 | </bookinfo> | ||
67 | |||
68 | <toc></toc> | ||
69 | <chapter id="Introduction"> | ||
70 | <title>Introduction</title> | ||
71 | <para> | ||
72 | kgdb is a source level debugger for linux kernel. It is used along | ||
73 | with gdb to debug a linux kernel. The expectation is that gdb can | ||
74 | be used to "break in" to the kernel to inspect memory, variables | ||
75 | and look through a cal stack information similar to what an | ||
76 | application developer would use gdb for. It is possible to place | ||
77 | breakpoints in kernel code and perform some limited execution | ||
78 | stepping. | ||
79 | </para> | ||
80 | <para> | ||
81 | Two machines are required for using kgdb. One of these machines is a | ||
82 | development machine and the other is a test machine. The kernel | ||
83 | to be debugged runs on the test machine. The development machine | ||
84 | runs an instance of gdb against the vmlinux file which contains | ||
85 | the symbols (not boot image such as bzImage, zImage, uImage...). | ||
86 | In gdb the developer specifies the connection parameters and | ||
87 | connects to kgdb. Depending on which kgdb I/O modules exist in | ||
88 | the kernel for a given architecture, it may be possible to debug | ||
89 | the test machine's kernel with the development machine using a | ||
90 | rs232 or ethernet connection. | ||
91 | </para> | ||
92 | </chapter> | ||
93 | <chapter id="CompilingAKernel"> | ||
94 | <title>Compiling a kernel</title> | ||
95 | <para> | ||
96 | To enable <symbol>CONFIG_KGDB</symbol>, look under the "Kernel debugging" | ||
97 | and then select "KGDB: kernel debugging with remote gdb". | ||
98 | </para> | ||
99 | <para> | ||
100 | Next you should choose one of more I/O drivers to interconnect debugging | ||
101 | host and debugged target. Early boot debugging requires a KGDB | ||
102 | I/O driver that supports early debugging and the driver must be | ||
103 | built into the kernel directly. Kgdb I/O driver configuration | ||
104 | takes place via kernel or module parameters, see following | ||
105 | chapter. | ||
106 | </para> | ||
107 | <para> | ||
108 | The kgdb test compile options are described in the kgdb test suite chapter. | ||
109 | </para> | ||
110 | |||
111 | </chapter> | ||
112 | <chapter id="EnableKGDB"> | ||
113 | <title>Enable kgdb for debugging</title> | ||
114 | <para> | ||
115 | In order to use kgdb you must activate it by passing configuration | ||
116 | information to one of the kgdb I/O drivers. If you do not pass any | ||
117 | configuration information kgdb will not do anything at all. Kgdb | ||
118 | will only actively hook up to the kernel trap hooks if a kgdb I/O | ||
119 | driver is loaded and configured. If you unconfigure a kgdb I/O | ||
120 | driver, kgdb will unregister all the kernel hook points. | ||
121 | </para> | ||
122 | <para> | ||
123 | All drivers can be reconfigured at run time, if | ||
124 | <symbol>CONFIG_SYSFS</symbol> and <symbol>CONFIG_MODULES</symbol> | ||
125 | are enabled, by echo'ing a new config string to | ||
126 | <constant>/sys/module/<driver>/parameter/<option></constant>. | ||
127 | The driver can be unconfigured by passing an empty string. You cannot | ||
128 | change the configuration while the debugger is attached. Make sure | ||
129 | to detach the debugger with the <constant>detach</constant> command | ||
130 | prior to trying unconfigure a kgdb I/O driver. | ||
131 | </para> | ||
132 | <sect1 id="kgdbwait"> | ||
133 | <title>Kernel parameter: kgdbwait</title> | ||
134 | <para> | ||
135 | The Kernel command line option <constant>kgdbwait</constant> makes | ||
136 | kgdb wait for a debugger connection during booting of a kernel. You | ||
137 | can only use this option you compiled a kgdb I/O driver into the | ||
138 | kernel and you specified the I/O driver configuration as a kernel | ||
139 | command line option. The kgdbwait parameter should always follow the | ||
140 | configuration parameter for the kgdb I/O driver in the kernel | ||
141 | command line else the I/O driver will not be configured prior to | ||
142 | asking the kernel to use it to wait. | ||
143 | </para> | ||
144 | <para> | ||
145 | The kernel will stop and wait as early as the I/O driver and | ||
146 | architecture will allow when you use this option. If you build the | ||
147 | kgdb I/O driver as a kernel module kgdbwait will not do anything. | ||
148 | </para> | ||
149 | </sect1> | ||
150 | <sect1 id="kgdboc"> | ||
151 | <title>Kernel parameter: kgdboc</title> | ||
152 | <para> | ||
153 | The kgdboc driver was originally an abbreviation meant to stand for | ||
154 | "kgdb over console". Kgdboc is designed to work with a single | ||
155 | serial port. It was meant to cover the circumstance | ||
156 | where you wanted to use a serial console as your primary console as | ||
157 | well as using it to perform kernel debugging. Of course you can | ||
158 | also use kgdboc without assigning a console to the same port. | ||
159 | </para> | ||
160 | <sect2 id="UsingKgdboc"> | ||
161 | <title>Using kgdboc</title> | ||
162 | <para> | ||
163 | You can configure kgdboc via sysfs or a module or kernel boot line | ||
164 | parameter depending on if you build with CONFIG_KGDBOC as a module | ||
165 | or built-in. | ||
166 | <orderedlist> | ||
167 | <listitem><para>From the module load or build-in</para> | ||
168 | <para><constant>kgdboc=<tty-device>,[baud]</constant></para> | ||
169 | <para> | ||
170 | The example here would be if your console port was typically ttyS0, you would use something like <constant>kgdboc=ttyS0,115200</constant> or on the ARM Versatile AB you would likely use <constant>kgdboc=ttyAMA0,115200</constant> | ||
171 | </para> | ||
172 | </listitem> | ||
173 | <listitem><para>From sysfs</para> | ||
174 | <para><constant>echo ttyS0 > /sys/module/kgdboc/parameters/kgdboc</constant></para> | ||
175 | </listitem> | ||
176 | </orderedlist> | ||
177 | </para> | ||
178 | <para> | ||
179 | NOTE: Kgdboc does not support interrupting the target via the | ||
180 | gdb remote protocol. You must manually send a sysrq-g unless you | ||
181 | have a proxy that splits console output to a terminal problem and | ||
182 | has a separate port for the debugger to connect to that sends the | ||
183 | sysrq-g for you. | ||
184 | </para> | ||
185 | <para>When using kgdboc with no debugger proxy, you can end up | ||
186 | connecting the debugger for one of two entry points. If an | ||
187 | exception occurs after you have loaded kgdboc a message should print | ||
188 | on the console stating it is waiting for the debugger. In case you | ||
189 | disconnect your terminal program and then connect the debugger in | ||
190 | its place. If you want to interrupt the target system and forcibly | ||
191 | enter a debug session you have to issue a Sysrq sequence and then | ||
192 | type the letter <constant>g</constant>. Then you disconnect the | ||
193 | terminal session and connect gdb. Your options if you don't like | ||
194 | this are to hack gdb to send the sysrq-g for you as well as on the | ||
195 | initial connect, or to use a debugger proxy that allows an | ||
196 | unmodified gdb to do the debugging. | ||
197 | </para> | ||
198 | </sect2> | ||
199 | </sect1> | ||
200 | <sect1 id="kgdbcon"> | ||
201 | <title>Kernel parameter: kgdbcon</title> | ||
202 | <para> | ||
203 | Kgdb supports using the gdb serial protocol to send console messages | ||
204 | to the debugger when the debugger is connected and running. There | ||
205 | are two ways to activate this feature. | ||
206 | <orderedlist> | ||
207 | <listitem><para>Activate with the kernel command line option:</para> | ||
208 | <para><constant>kgdbcon</constant></para> | ||
209 | </listitem> | ||
210 | <listitem><para>Use sysfs before configuring an io driver</para> | ||
211 | <para> | ||
212 | <constant>echo 1 > /sys/module/kgdb/parameters/kgdb_use_con</constant> | ||
213 | </para> | ||
214 | <para> | ||
215 | NOTE: If you do this after you configure the kgdb I/O driver, the | ||
216 | setting will not take effect until the next point the I/O is | ||
217 | reconfigured. | ||
218 | </para> | ||
219 | </listitem> | ||
220 | </orderedlist> | ||
221 | </para> | ||
222 | <para> | ||
223 | IMPORTANT NOTE: Using this option with kgdb over the console | ||
224 | (kgdboc) or kgdb over ethernet (kgdboe) is not supported. | ||
225 | </para> | ||
226 | </sect1> | ||
227 | </chapter> | ||
228 | <chapter id="ConnectingGDB"> | ||
229 | <title>Connecting gdb</title> | ||
230 | <para> | ||
231 | If you are using kgdboc, you need to have used kgdbwait as a boot | ||
232 | argument, issued a sysrq-g, or the system you are going to debug | ||
233 | has already taken an exception and is waiting for the debugger to | ||
234 | attach before you can connect gdb. | ||
235 | </para> | ||
236 | <para> | ||
237 | If you are not using different kgdb I/O driver other than kgdboc, | ||
238 | you should be able to connect and the target will automatically | ||
239 | respond. | ||
240 | </para> | ||
241 | <para> | ||
242 | Example (using a serial port): | ||
243 | </para> | ||
244 | <programlisting> | ||
245 | % gdb ./vmlinux | ||
246 | (gdb) set remotebaud 115200 | ||
247 | (gdb) target remote /dev/ttyS0 | ||
248 | </programlisting> | ||
249 | <para> | ||
250 | Example (kgdb to a terminal server): | ||
251 | </para> | ||
252 | <programlisting> | ||
253 | % gdb ./vmlinux | ||
254 | (gdb) target remote udp:192.168.2.2:6443 | ||
255 | </programlisting> | ||
256 | <para> | ||
257 | Example (kgdb over ethernet): | ||
258 | </para> | ||
259 | <programlisting> | ||
260 | % gdb ./vmlinux | ||
261 | (gdb) target remote udp:192.168.2.2:6443 | ||
262 | </programlisting> | ||
263 | <para> | ||
264 | Once connected, you can debug a kernel the way you would debug an | ||
265 | application program. | ||
266 | </para> | ||
267 | <para> | ||
268 | If you are having problems connecting or something is going | ||
269 | seriously wrong while debugging, it will most often be the case | ||
270 | that you want to enable gdb to be verbose about its target | ||
271 | communications. You do this prior to issuing the <constant>target | ||
272 | remote</constant> command by typing in: <constant>set remote debug 1</constant> | ||
273 | </para> | ||
274 | </chapter> | ||
275 | <chapter id="KGDBTestSuite"> | ||
276 | <title>kgdb Test Suite</title> | ||
277 | <para> | ||
278 | When kgdb is enabled in the kernel config you can also elect to | ||
279 | enable the config parameter KGDB_TESTS. Turning this on will | ||
280 | enable a special kgdb I/O module which is designed to test the | ||
281 | kgdb internal functions. | ||
282 | </para> | ||
283 | <para> | ||
284 | The kgdb tests are mainly intended for developers to test the kgdb | ||
285 | internals as well as a tool for developing a new kgdb architecture | ||
286 | specific implementation. These tests are not really for end users | ||
287 | of the Linux kernel. The primary source of documentation would be | ||
288 | to look in the drivers/misc/kgdbts.c file. | ||
289 | </para> | ||
290 | <para> | ||
291 | The kgdb test suite can also be configured at compile time to run | ||
292 | the core set of tests by setting the kernel config parameter | ||
293 | KGDB_TESTS_ON_BOOT. This particular option is aimed at automated | ||
294 | regression testing and does not require modifying the kernel boot | ||
295 | config arguments. If this is turned on, the kgdb test suite can | ||
296 | be disabled by specifying "kgdbts=" as a kernel boot argument. | ||
297 | </para> | ||
298 | </chapter> | ||
299 | <chapter id="CommonBackEndReq"> | ||
300 | <title>KGDB Internals</title> | ||
301 | <sect1 id="kgdbArchitecture"> | ||
302 | <title>Architecture Specifics</title> | ||
303 | <para> | ||
304 | Kgdb is organized into three basic components: | ||
305 | <orderedlist> | ||
306 | <listitem><para>kgdb core</para> | ||
307 | <para> | ||
308 | The kgdb core is found in kernel/kgdb.c. It contains: | ||
309 | <itemizedlist> | ||
310 | <listitem><para>All the logic to implement the gdb serial protocol</para></listitem> | ||
311 | <listitem><para>A generic OS exception handler which includes sync'ing the processors into a stopped state on an multi cpu system.</para></listitem> | ||
312 | <listitem><para>The API to talk to the kgdb I/O drivers</para></listitem> | ||
313 | <listitem><para>The API to make calls to the arch specific kgdb implementation</para></listitem> | ||
314 | <listitem><para>The logic to perform safe memory reads and writes to memory while using the debugger</para></listitem> | ||
315 | <listitem><para>A full implementation for software breakpoints unless overridden by the arch</para></listitem> | ||
316 | </itemizedlist> | ||
317 | </para> | ||
318 | </listitem> | ||
319 | <listitem><para>kgdb arch specific implementation</para> | ||
320 | <para> | ||
321 | This implementation is generally found in arch/*/kernel/kgdb.c. | ||
322 | As an example, arch/x86/kernel/kgdb.c contains the specifics to | ||
323 | implement HW breakpoint as well as the initialization to | ||
324 | dynamically register and unregister for the trap handlers on | ||
325 | this architecture. The arch specific portion implements: | ||
326 | <itemizedlist> | ||
327 | <listitem><para>contains an arch specific trap catcher which | ||
328 | invokes kgdb_handle_exception() to start kgdb about doing its | ||
329 | work</para></listitem> | ||
330 | <listitem><para>translation to and from gdb specific packet format to pt_regs</para></listitem> | ||
331 | <listitem><para>Registration and unregistration of architecture specific trap hooks</para></listitem> | ||
332 | <listitem><para>Any special exception handling and cleanup</para></listitem> | ||
333 | <listitem><para>NMI exception handling and cleanup</para></listitem> | ||
334 | <listitem><para>(optional)HW breakpoints</para></listitem> | ||
335 | </itemizedlist> | ||
336 | </para> | ||
337 | </listitem> | ||
338 | <listitem><para>kgdb I/O driver</para> | ||
339 | <para> | ||
340 | Each kgdb I/O driver has to provide an implemenation for the following: | ||
341 | <itemizedlist> | ||
342 | <listitem><para>configuration via builtin or module</para></listitem> | ||
343 | <listitem><para>dynamic configuration and kgdb hook registration calls</para></listitem> | ||
344 | <listitem><para>read and write character interface</para></listitem> | ||
345 | <listitem><para>A cleanup handler for unconfiguring from the kgdb core</para></listitem> | ||
346 | <listitem><para>(optional) Early debug methodology</para></listitem> | ||
347 | </itemizedlist> | ||
348 | Any given kgdb I/O driver has to operate very closely with the | ||
349 | hardware and must do it in such a way that does not enable | ||
350 | interrupts or change other parts of the system context without | ||
351 | completely restoring them. The kgdb core will repeatedly "poll" | ||
352 | a kgdb I/O driver for characters when it needs input. The I/O | ||
353 | driver is expected to return immediately if there is no data | ||
354 | available. Doing so allows for the future possibility to touch | ||
355 | watch dog hardware in such a way as to have a target system not | ||
356 | reset when these are enabled. | ||
357 | </para> | ||
358 | </listitem> | ||
359 | </orderedlist> | ||
360 | </para> | ||
361 | <para> | ||
362 | If you are intent on adding kgdb architecture specific support | ||
363 | for a new architecture, the architecture should define | ||
364 | <constant>HAVE_ARCH_KGDB</constant> in the architecture specific | ||
365 | Kconfig file. This will enable kgdb for the architecture, and | ||
366 | at that point you must create an architecture specific kgdb | ||
367 | implementation. | ||
368 | </para> | ||
369 | <para> | ||
370 | There are a few flags which must be set on every architecture in | ||
371 | their <asm/kgdb.h> file. These are: | ||
372 | <itemizedlist> | ||
373 | <listitem> | ||
374 | <para> | ||
375 | NUMREGBYTES: The size in bytes of all of the registers, so | ||
376 | that we can ensure they will all fit into a packet. | ||
377 | </para> | ||
378 | <para> | ||
379 | BUFMAX: The size in bytes of the buffer GDB will read into. | ||
380 | This must be larger than NUMREGBYTES. | ||
381 | </para> | ||
382 | <para> | ||
383 | CACHE_FLUSH_IS_SAFE: Set to 1 if it is always safe to call | ||
384 | flush_cache_range or flush_icache_range. On some architectures, | ||
385 | these functions may not be safe to call on SMP since we keep other | ||
386 | CPUs in a holding pattern. | ||
387 | </para> | ||
388 | </listitem> | ||
389 | </itemizedlist> | ||
390 | </para> | ||
391 | <para> | ||
392 | There are also the following functions for the common backend, | ||
393 | found in kernel/kgdb.c, that must be supplied by the | ||
394 | architecture-specific backend unless marked as (optional), in | ||
395 | which case a default function maybe used if the architecture | ||
396 | does not need to provide a specific implementation. | ||
397 | </para> | ||
398 | !Iinclude/linux/kgdb.h | ||
399 | </sect1> | ||
400 | <sect1 id="kgdbocDesign"> | ||
401 | <title>kgdboc internals</title> | ||
402 | <para> | ||
403 | The kgdboc driver is actually a very thin driver that relies on the | ||
404 | underlying low level to the hardware driver having "polling hooks" | ||
405 | which the to which the tty driver is attached. In the initial | ||
406 | implementation of kgdboc it the serial_core was changed to expose a | ||
407 | low level uart hook for doing polled mode reading and writing of a | ||
408 | single character while in an atomic context. When kgdb makes an I/O | ||
409 | request to the debugger, kgdboc invokes a call back in the serial | ||
410 | core which in turn uses the call back in the uart driver. It is | ||
411 | certainly possible to extend kgdboc to work with non-uart based | ||
412 | consoles in the future. | ||
413 | </para> | ||
414 | <para> | ||
415 | When using kgdboc with a uart, the uart driver must implement two callbacks in the <constant>struct uart_ops</constant>. Example from drivers/8250.c:<programlisting> | ||
416 | #ifdef CONFIG_CONSOLE_POLL | ||
417 | .poll_get_char = serial8250_get_poll_char, | ||
418 | .poll_put_char = serial8250_put_poll_char, | ||
419 | #endif | ||
420 | </programlisting> | ||
421 | Any implementation specifics around creating a polling driver use the | ||
422 | <constant>#ifdef CONFIG_CONSOLE_POLL</constant>, as shown above. | ||
423 | Keep in mind that polling hooks have to be implemented in such a way | ||
424 | that they can be called from an atomic context and have to restore | ||
425 | the state of the uart chip on return such that the system can return | ||
426 | to normal when the debugger detaches. You need to be very careful | ||
427 | with any kind of lock you consider, because failing here is most | ||
428 | going to mean pressing the reset button. | ||
429 | </para> | ||
430 | </sect1> | ||
431 | </chapter> | ||
432 | <chapter id="credits"> | ||
433 | <title>Credits</title> | ||
434 | <para> | ||
435 | The following people have contributed to this document: | ||
436 | <orderedlist> | ||
437 | <listitem><para>Amit Kale<email>amitkale@linsyssoft.com</email></para></listitem> | ||
438 | <listitem><para>Tom Rini<email>trini@kernel.crashing.org</email></para></listitem> | ||
439 | </orderedlist> | ||
440 | In March 2008 this document was completely rewritten by: | ||
441 | <itemizedlist> | ||
442 | <listitem><para>Jason Wessel<email>jason.wessel@windriver.com</email></para></listitem> | ||
443 | </itemizedlist> | ||
444 | </para> | ||
445 | </chapter> | ||
446 | </book> | ||
447 | |||
diff --git a/Documentation/DocBook/mac80211.tmpl b/Documentation/DocBook/mac80211.tmpl new file mode 100644 index 000000000000..b651e0a4b1c0 --- /dev/null +++ b/Documentation/DocBook/mac80211.tmpl | |||
@@ -0,0 +1,335 @@ | |||
1 | <?xml version="1.0" encoding="UTF-8"?> | ||
2 | <!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN" | ||
3 | "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd" []> | ||
4 | |||
5 | <book id="mac80211-developers-guide"> | ||
6 | <bookinfo> | ||
7 | <title>The mac80211 subsystem for kernel developers</title> | ||
8 | |||
9 | <authorgroup> | ||
10 | <author> | ||
11 | <firstname>Johannes</firstname> | ||
12 | <surname>Berg</surname> | ||
13 | <affiliation> | ||
14 | <address><email>johannes@sipsolutions.net</email></address> | ||
15 | </affiliation> | ||
16 | </author> | ||
17 | </authorgroup> | ||
18 | |||
19 | <copyright> | ||
20 | <year>2007</year> | ||
21 | <year>2008</year> | ||
22 | <holder>Johannes Berg</holder> | ||
23 | </copyright> | ||
24 | |||
25 | <legalnotice> | ||
26 | <para> | ||
27 | This documentation is free software; you can redistribute | ||
28 | it and/or modify it under the terms of the GNU General Public | ||
29 | License version 2 as published by the Free Software Foundation. | ||
30 | </para> | ||
31 | |||
32 | <para> | ||
33 | This documentation is distributed in the hope that it will be | ||
34 | useful, but WITHOUT ANY WARRANTY; without even the implied | ||
35 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | ||
36 | See the GNU General Public License for more details. | ||
37 | </para> | ||
38 | |||
39 | <para> | ||
40 | You should have received a copy of the GNU General Public | ||
41 | License along with this documentation; if not, write to the Free | ||
42 | Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, | ||
43 | MA 02111-1307 USA | ||
44 | </para> | ||
45 | |||
46 | <para> | ||
47 | For more details see the file COPYING in the source | ||
48 | distribution of Linux. | ||
49 | </para> | ||
50 | </legalnotice> | ||
51 | |||
52 | <abstract> | ||
53 | !Pinclude/net/mac80211.h Introduction | ||
54 | !Pinclude/net/mac80211.h Warning | ||
55 | </abstract> | ||
56 | </bookinfo> | ||
57 | |||
58 | <toc></toc> | ||
59 | |||
60 | <!-- | ||
61 | Generally, this document shall be ordered by increasing complexity. | ||
62 | It is important to note that readers should be able to read only | ||
63 | the first few sections to get a working driver and only advanced | ||
64 | usage should require reading the full document. | ||
65 | --> | ||
66 | |||
67 | <part> | ||
68 | <title>The basic mac80211 driver interface</title> | ||
69 | <partintro> | ||
70 | <para> | ||
71 | You should read and understand the information contained | ||
72 | within this part of the book while implementing a driver. | ||
73 | In some chapters, advanced usage is noted, that may be | ||
74 | skipped at first. | ||
75 | </para> | ||
76 | <para> | ||
77 | This part of the book only covers station and monitor mode | ||
78 | functionality, additional information required to implement | ||
79 | the other modes is covered in the second part of the book. | ||
80 | </para> | ||
81 | </partintro> | ||
82 | |||
83 | <chapter id="basics"> | ||
84 | <title>Basic hardware handling</title> | ||
85 | <para>TBD</para> | ||
86 | <para> | ||
87 | This chapter shall contain information on getting a hw | ||
88 | struct allocated and registered with mac80211. | ||
89 | </para> | ||
90 | <para> | ||
91 | Since it is required to allocate rates/modes before registering | ||
92 | a hw struct, this chapter shall also contain information on setting | ||
93 | up the rate/mode structs. | ||
94 | </para> | ||
95 | <para> | ||
96 | Additionally, some discussion about the callbacks and | ||
97 | the general programming model should be in here, including | ||
98 | the definition of ieee80211_ops which will be referred to | ||
99 | a lot. | ||
100 | </para> | ||
101 | <para> | ||
102 | Finally, a discussion of hardware capabilities should be done | ||
103 | with references to other parts of the book. | ||
104 | </para> | ||
105 | <!-- intentionally multiple !F lines to get proper order --> | ||
106 | !Finclude/net/mac80211.h ieee80211_hw | ||
107 | !Finclude/net/mac80211.h ieee80211_hw_flags | ||
108 | !Finclude/net/mac80211.h SET_IEEE80211_DEV | ||
109 | !Finclude/net/mac80211.h SET_IEEE80211_PERM_ADDR | ||
110 | !Finclude/net/mac80211.h ieee80211_ops | ||
111 | !Finclude/net/mac80211.h ieee80211_alloc_hw | ||
112 | !Finclude/net/mac80211.h ieee80211_register_hw | ||
113 | !Finclude/net/mac80211.h ieee80211_get_tx_led_name | ||
114 | !Finclude/net/mac80211.h ieee80211_get_rx_led_name | ||
115 | !Finclude/net/mac80211.h ieee80211_get_assoc_led_name | ||
116 | !Finclude/net/mac80211.h ieee80211_get_radio_led_name | ||
117 | !Finclude/net/mac80211.h ieee80211_unregister_hw | ||
118 | !Finclude/net/mac80211.h ieee80211_free_hw | ||
119 | </chapter> | ||
120 | |||
121 | <chapter id="phy-handling"> | ||
122 | <title>PHY configuration</title> | ||
123 | <para>TBD</para> | ||
124 | <para> | ||
125 | This chapter should describe PHY handling including | ||
126 | start/stop callbacks and the various structures used. | ||
127 | </para> | ||
128 | !Finclude/net/mac80211.h ieee80211_conf | ||
129 | !Finclude/net/mac80211.h ieee80211_conf_flags | ||
130 | </chapter> | ||
131 | |||
132 | <chapter id="iface-handling"> | ||
133 | <title>Virtual interfaces</title> | ||
134 | <para>TBD</para> | ||
135 | <para> | ||
136 | This chapter should describe virtual interface basics | ||
137 | that are relevant to the driver (VLANs, MGMT etc are not.) | ||
138 | It should explain the use of the add_iface/remove_iface | ||
139 | callbacks as well as the interface configuration callbacks. | ||
140 | </para> | ||
141 | <para>Things related to AP mode should be discussed there.</para> | ||
142 | <para> | ||
143 | Things related to supporting multiple interfaces should be | ||
144 | in the appropriate chapter, a BIG FAT note should be here about | ||
145 | this though and the recommendation to allow only a single | ||
146 | interface in STA mode at first! | ||
147 | </para> | ||
148 | !Finclude/net/mac80211.h ieee80211_if_types | ||
149 | !Finclude/net/mac80211.h ieee80211_if_init_conf | ||
150 | !Finclude/net/mac80211.h ieee80211_if_conf | ||
151 | </chapter> | ||
152 | |||
153 | <chapter id="rx-tx"> | ||
154 | <title>Receive and transmit processing</title> | ||
155 | <sect1> | ||
156 | <title>what should be here</title> | ||
157 | <para>TBD</para> | ||
158 | <para> | ||
159 | This should describe the receive and transmit | ||
160 | paths in mac80211/the drivers as well as | ||
161 | transmit status handling. | ||
162 | </para> | ||
163 | </sect1> | ||
164 | <sect1> | ||
165 | <title>Frame format</title> | ||
166 | !Pinclude/net/mac80211.h Frame format | ||
167 | </sect1> | ||
168 | <sect1> | ||
169 | <title>Alignment issues</title> | ||
170 | <para>TBD</para> | ||
171 | </sect1> | ||
172 | <sect1> | ||
173 | <title>Calling into mac80211 from interrupts</title> | ||
174 | !Pinclude/net/mac80211.h Calling mac80211 from interrupts | ||
175 | </sect1> | ||
176 | <sect1> | ||
177 | <title>functions/definitions</title> | ||
178 | !Finclude/net/mac80211.h ieee80211_rx_status | ||
179 | !Finclude/net/mac80211.h mac80211_rx_flags | ||
180 | !Finclude/net/mac80211.h ieee80211_tx_control | ||
181 | !Finclude/net/mac80211.h ieee80211_tx_status_flags | ||
182 | !Finclude/net/mac80211.h ieee80211_rx | ||
183 | !Finclude/net/mac80211.h ieee80211_rx_irqsafe | ||
184 | !Finclude/net/mac80211.h ieee80211_tx_status | ||
185 | !Finclude/net/mac80211.h ieee80211_tx_status_irqsafe | ||
186 | !Finclude/net/mac80211.h ieee80211_rts_get | ||
187 | !Finclude/net/mac80211.h ieee80211_rts_duration | ||
188 | !Finclude/net/mac80211.h ieee80211_ctstoself_get | ||
189 | !Finclude/net/mac80211.h ieee80211_ctstoself_duration | ||
190 | !Finclude/net/mac80211.h ieee80211_generic_frame_duration | ||
191 | !Finclude/net/mac80211.h ieee80211_get_hdrlen_from_skb | ||
192 | !Finclude/net/mac80211.h ieee80211_get_hdrlen | ||
193 | !Finclude/net/mac80211.h ieee80211_wake_queue | ||
194 | !Finclude/net/mac80211.h ieee80211_stop_queue | ||
195 | !Finclude/net/mac80211.h ieee80211_start_queues | ||
196 | !Finclude/net/mac80211.h ieee80211_stop_queues | ||
197 | !Finclude/net/mac80211.h ieee80211_wake_queues | ||
198 | </sect1> | ||
199 | </chapter> | ||
200 | |||
201 | <chapter id="filters"> | ||
202 | <title>Frame filtering</title> | ||
203 | !Pinclude/net/mac80211.h Frame filtering | ||
204 | !Finclude/net/mac80211.h ieee80211_filter_flags | ||
205 | </chapter> | ||
206 | </part> | ||
207 | |||
208 | <part id="advanced"> | ||
209 | <title>Advanced driver interface</title> | ||
210 | <partintro> | ||
211 | <para> | ||
212 | Information contained within this part of the book is | ||
213 | of interest only for advanced interaction of mac80211 | ||
214 | with drivers to exploit more hardware capabilities and | ||
215 | improve performance. | ||
216 | </para> | ||
217 | </partintro> | ||
218 | |||
219 | <chapter id="hardware-crypto-offload"> | ||
220 | <title>Hardware crypto acceleration</title> | ||
221 | !Pinclude/net/mac80211.h Hardware crypto acceleration | ||
222 | <!-- intentionally multiple !F lines to get proper order --> | ||
223 | !Finclude/net/mac80211.h set_key_cmd | ||
224 | !Finclude/net/mac80211.h ieee80211_key_conf | ||
225 | !Finclude/net/mac80211.h ieee80211_key_alg | ||
226 | !Finclude/net/mac80211.h ieee80211_key_flags | ||
227 | </chapter> | ||
228 | |||
229 | <chapter id="qos"> | ||
230 | <title>Multiple queues and QoS support</title> | ||
231 | <para>TBD</para> | ||
232 | !Finclude/net/mac80211.h ieee80211_tx_queue_params | ||
233 | !Finclude/net/mac80211.h ieee80211_tx_queue_stats_data | ||
234 | !Finclude/net/mac80211.h ieee80211_tx_queue | ||
235 | </chapter> | ||
236 | |||
237 | <chapter id="AP"> | ||
238 | <title>Access point mode support</title> | ||
239 | <para>TBD</para> | ||
240 | <para>Some parts of the if_conf should be discussed here instead</para> | ||
241 | <para> | ||
242 | Insert notes about VLAN interfaces with hw crypto here or | ||
243 | in the hw crypto chapter. | ||
244 | </para> | ||
245 | !Finclude/net/mac80211.h ieee80211_get_buffered_bc | ||
246 | !Finclude/net/mac80211.h ieee80211_beacon_get | ||
247 | </chapter> | ||
248 | |||
249 | <chapter id="multi-iface"> | ||
250 | <title>Supporting multiple virtual interfaces</title> | ||
251 | <para>TBD</para> | ||
252 | <para> | ||
253 | Note: WDS with identical MAC address should almost always be OK | ||
254 | </para> | ||
255 | <para> | ||
256 | Insert notes about having multiple virtual interfaces with | ||
257 | different MAC addresses here, note which configurations are | ||
258 | supported by mac80211, add notes about supporting hw crypto | ||
259 | with it. | ||
260 | </para> | ||
261 | </chapter> | ||
262 | |||
263 | <chapter id="hardware-scan-offload"> | ||
264 | <title>Hardware scan offload</title> | ||
265 | <para>TBD</para> | ||
266 | !Finclude/net/mac80211.h ieee80211_scan_completed | ||
267 | </chapter> | ||
268 | </part> | ||
269 | |||
270 | <part id="rate-control"> | ||
271 | <title>Rate control interface</title> | ||
272 | <partintro> | ||
273 | <para>TBD</para> | ||
274 | <para> | ||
275 | This part of the book describes the rate control algorithm | ||
276 | interface and how it relates to mac80211 and drivers. | ||
277 | </para> | ||
278 | </partintro> | ||
279 | <chapter id="dummy"> | ||
280 | <title>dummy chapter</title> | ||
281 | <para>TBD</para> | ||
282 | </chapter> | ||
283 | </part> | ||
284 | |||
285 | <part id="internal"> | ||
286 | <title>Internals</title> | ||
287 | <partintro> | ||
288 | <para>TBD</para> | ||
289 | <para> | ||
290 | This part of the book describes mac80211 internals. | ||
291 | </para> | ||
292 | </partintro> | ||
293 | |||
294 | <chapter id="key-handling"> | ||
295 | <title>Key handling</title> | ||
296 | <sect1> | ||
297 | <title>Key handling basics</title> | ||
298 | !Pnet/mac80211/key.c Key handling basics | ||
299 | </sect1> | ||
300 | <sect1> | ||
301 | <title>MORE TBD</title> | ||
302 | <para>TBD</para> | ||
303 | </sect1> | ||
304 | </chapter> | ||
305 | |||
306 | <chapter id="rx-processing"> | ||
307 | <title>Receive processing</title> | ||
308 | <para>TBD</para> | ||
309 | </chapter> | ||
310 | |||
311 | <chapter id="tx-processing"> | ||
312 | <title>Transmit processing</title> | ||
313 | <para>TBD</para> | ||
314 | </chapter> | ||
315 | |||
316 | <chapter id="sta-info"> | ||
317 | <title>Station info handling</title> | ||
318 | <sect1> | ||
319 | <title>Programming information</title> | ||
320 | !Fnet/mac80211/sta_info.h sta_info | ||
321 | !Fnet/mac80211/sta_info.h ieee80211_sta_info_flags | ||
322 | </sect1> | ||
323 | <sect1> | ||
324 | <title>STA information lifetime rules</title> | ||
325 | !Pnet/mac80211/sta_info.c STA information lifetime rules | ||
326 | </sect1> | ||
327 | </chapter> | ||
328 | |||
329 | <chapter id="synchronisation"> | ||
330 | <title>Synchronisation</title> | ||
331 | <para>TBD</para> | ||
332 | <para>Locking, lots of RCU</para> | ||
333 | </chapter> | ||
334 | </part> | ||
335 | </book> | ||
diff --git a/Documentation/DocBook/writing_usb_driver.tmpl b/Documentation/DocBook/writing_usb_driver.tmpl index d4188d4ff535..eeff19ca831b 100644 --- a/Documentation/DocBook/writing_usb_driver.tmpl +++ b/Documentation/DocBook/writing_usb_driver.tmpl | |||
@@ -100,8 +100,8 @@ | |||
100 | useful documents, at the USB home page (see Resources). An excellent | 100 | useful documents, at the USB home page (see Resources). An excellent |
101 | introduction to the Linux USB subsystem can be found at the USB Working | 101 | introduction to the Linux USB subsystem can be found at the USB Working |
102 | Devices List (see Resources). It explains how the Linux USB subsystem is | 102 | Devices List (see Resources). It explains how the Linux USB subsystem is |
103 | structured and introduces the reader to the concept of USB urbs, which | 103 | structured and introduces the reader to the concept of USB urbs |
104 | are essential to USB drivers. | 104 | (USB Request Blocks), which are essential to USB drivers. |
105 | </para> | 105 | </para> |
106 | <para> | 106 | <para> |
107 | The first thing a Linux USB driver needs to do is register itself with | 107 | The first thing a Linux USB driver needs to do is register itself with |
@@ -162,8 +162,8 @@ static int __init usb_skel_init(void) | |||
162 | module_init(usb_skel_init); | 162 | module_init(usb_skel_init); |
163 | </programlisting> | 163 | </programlisting> |
164 | <para> | 164 | <para> |
165 | When the driver is unloaded from the system, it needs to unregister | 165 | When the driver is unloaded from the system, it needs to deregister |
166 | itself with the USB subsystem. This is done with the usb_unregister | 166 | itself with the USB subsystem. This is done with the usb_deregister |
167 | function: | 167 | function: |
168 | </para> | 168 | </para> |
169 | <programlisting> | 169 | <programlisting> |
@@ -232,7 +232,7 @@ static int skel_probe(struct usb_interface *interface, | |||
232 | were passed to the USB subsystem will be called from a user program trying | 232 | were passed to the USB subsystem will be called from a user program trying |
233 | to talk to the device. The first function called will be open, as the | 233 | to talk to the device. The first function called will be open, as the |
234 | program tries to open the device for I/O. We increment our private usage | 234 | program tries to open the device for I/O. We increment our private usage |
235 | count and save off a pointer to our internal structure in the file | 235 | count and save a pointer to our internal structure in the file |
236 | structure. This is done so that future calls to file operations will | 236 | structure. This is done so that future calls to file operations will |
237 | enable the driver to determine which device the user is addressing. All | 237 | enable the driver to determine which device the user is addressing. All |
238 | of this is done with the following code: | 238 | of this is done with the following code: |
@@ -252,8 +252,8 @@ file->private_data = dev; | |||
252 | send to the device based on the size of the write urb it has created (this | 252 | send to the device based on the size of the write urb it has created (this |
253 | size depends on the size of the bulk out end point that the device has). | 253 | size depends on the size of the bulk out end point that the device has). |
254 | Then it copies the data from user space to kernel space, points the urb to | 254 | Then it copies the data from user space to kernel space, points the urb to |
255 | the data and submits the urb to the USB subsystem. This can be shown in | 255 | the data and submits the urb to the USB subsystem. This can be seen in |
256 | he following code: | 256 | the following code: |
257 | </para> | 257 | </para> |
258 | <programlisting> | 258 | <programlisting> |
259 | /* we can only write as much as 1 urb will hold */ | 259 | /* we can only write as much as 1 urb will hold */ |
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/PCI/00-INDEX b/Documentation/PCI/00-INDEX new file mode 100644 index 000000000000..49f43946c6b6 --- /dev/null +++ b/Documentation/PCI/00-INDEX | |||
@@ -0,0 +1,12 @@ | |||
1 | 00-INDEX | ||
2 | - this file | ||
3 | PCI-DMA-mapping.txt | ||
4 | - info for PCI drivers using DMA portably across all platforms | ||
5 | PCIEBUS-HOWTO.txt | ||
6 | - a guide describing the PCI Express Port Bus driver | ||
7 | pci-error-recovery.txt | ||
8 | - info on PCI error recovery | ||
9 | pci.txt | ||
10 | - info on the PCI subsystem for device driver authors | ||
11 | pcieaer-howto.txt | ||
12 | - the PCI Express Advanced Error Reporting Driver Guide HOWTO | ||
diff --git a/Documentation/PCIEBUS-HOWTO.txt b/Documentation/PCI/PCIEBUS-HOWTO.txt index c93f42a74d7e..9a07e38631b0 100644 --- a/Documentation/PCIEBUS-HOWTO.txt +++ b/Documentation/PCI/PCIEBUS-HOWTO.txt | |||
@@ -56,9 +56,9 @@ advantages of using the PCI Express Port Bus driver are listed below: | |||
56 | 56 | ||
57 | - Allow service drivers implemented in an independent | 57 | - Allow service drivers implemented in an independent |
58 | staged approach. | 58 | staged approach. |
59 | 59 | ||
60 | - Allow one service driver to run on multiple PCI-PCI Bridge | 60 | - Allow one service driver to run on multiple PCI-PCI Bridge |
61 | Port devices. | 61 | Port devices. |
62 | 62 | ||
63 | - Manage and distribute resources of a PCI-PCI Bridge Port | 63 | - Manage and distribute resources of a PCI-PCI Bridge Port |
64 | device to requested service drivers. | 64 | device to requested service drivers. |
@@ -82,7 +82,7 @@ Model requires some minimal changes on existing service drivers that | |||
82 | imposes no impact on the functionality of existing service drivers. | 82 | imposes no impact on the functionality of existing service drivers. |
83 | 83 | ||
84 | A service driver is required to use the two APIs shown below to | 84 | A service driver is required to use the two APIs shown below to |
85 | register its service with the PCI Express Port Bus driver (see | 85 | register its service with the PCI Express Port Bus driver (see |
86 | section 5.2.1 & 5.2.2). It is important that a service driver | 86 | section 5.2.1 & 5.2.2). It is important that a service driver |
87 | initializes the pcie_port_service_driver data structure, included in | 87 | initializes the pcie_port_service_driver data structure, included in |
88 | header file /include/linux/pcieport_if.h, before calling these APIs. | 88 | header file /include/linux/pcieport_if.h, before calling these APIs. |
@@ -137,7 +137,7 @@ driver. | |||
137 | static int __init aerdrv_service_init(void) | 137 | static int __init aerdrv_service_init(void) |
138 | { | 138 | { |
139 | int retval = 0; | 139 | int retval = 0; |
140 | 140 | ||
141 | retval = pcie_port_service_register(&root_aerdrv); | 141 | retval = pcie_port_service_register(&root_aerdrv); |
142 | if (!retval) { | 142 | if (!retval) { |
143 | /* | 143 | /* |
@@ -147,7 +147,7 @@ static int __init aerdrv_service_init(void) | |||
147 | return retval; | 147 | return retval; |
148 | } | 148 | } |
149 | 149 | ||
150 | static void __exit aerdrv_service_exit(void) | 150 | static void __exit aerdrv_service_exit(void) |
151 | { | 151 | { |
152 | pcie_port_service_unregister(&root_aerdrv); | 152 | pcie_port_service_unregister(&root_aerdrv); |
153 | } | 153 | } |
@@ -175,7 +175,7 @@ same physical Root Port. Both service drivers call pci_enable_msi to | |||
175 | request MSI based interrupts. A service driver may not know whether | 175 | request MSI based interrupts. A service driver may not know whether |
176 | any other service drivers have run on this Root Port. If either one | 176 | any other service drivers have run on this Root Port. If either one |
177 | of them calls pci_disable_msi, it puts the other service driver | 177 | of them calls pci_disable_msi, it puts the other service driver |
178 | in a wrong interrupt mode. | 178 | in a wrong interrupt mode. |
179 | 179 | ||
180 | To avoid this situation all service drivers are not permitted to | 180 | To avoid this situation all service drivers are not permitted to |
181 | switch interrupt mode on its device. The PCI Express Port Bus driver | 181 | switch interrupt mode on its device. The PCI Express Port Bus driver |
diff --git a/Documentation/pci-error-recovery.txt b/Documentation/PCI/pci-error-recovery.txt index 6650af432523..6650af432523 100644 --- a/Documentation/pci-error-recovery.txt +++ b/Documentation/PCI/pci-error-recovery.txt | |||
diff --git a/Documentation/pci.txt b/Documentation/PCI/pci.txt index d2c2e6e2b224..8d4dc6250c58 100644 --- a/Documentation/pci.txt +++ b/Documentation/PCI/pci.txt | |||
@@ -119,7 +119,7 @@ initialization with a pointer to a structure describing the driver | |||
119 | the power state of a device before reboot. | 119 | the power state of a device before reboot. |
120 | e.g. drivers/net/e100.c. | 120 | e.g. drivers/net/e100.c. |
121 | 121 | ||
122 | err_handler See Documentation/pci-error-recovery.txt | 122 | err_handler See Documentation/PCI/pci-error-recovery.txt |
123 | 123 | ||
124 | 124 | ||
125 | The ID table is an array of struct pci_device_id entries ending with an | 125 | The ID table is an array of struct pci_device_id entries ending with an |
diff --git a/Documentation/pcieaer-howto.txt b/Documentation/PCI/pcieaer-howto.txt index d5da86170106..16c251230c82 100644 --- a/Documentation/pcieaer-howto.txt +++ b/Documentation/PCI/pcieaer-howto.txt | |||
@@ -13,7 +13,7 @@ Reporting (AER) driver and provides information on how to use it, as | |||
13 | well as how to enable the drivers of endpoint devices to conform with | 13 | well as how to enable the drivers of endpoint devices to conform with |
14 | PCI Express AER driver. | 14 | PCI Express AER driver. |
15 | 15 | ||
16 | 1.2 Copyright © Intel Corporation 2006. | 16 | 1.2 Copyright © Intel Corporation 2006. |
17 | 17 | ||
18 | 1.3 What is the PCI Express AER Driver? | 18 | 1.3 What is the PCI Express AER Driver? |
19 | 19 | ||
diff --git a/Documentation/SubmittingPatches b/Documentation/SubmittingPatches index 1fc4e7144dce..9c93a03ea33b 100644 --- a/Documentation/SubmittingPatches +++ b/Documentation/SubmittingPatches | |||
@@ -183,7 +183,7 @@ Even if the maintainer did not respond in step #4, make sure to ALWAYS | |||
183 | copy the maintainer when you change their code. | 183 | copy the maintainer when you change their code. |
184 | 184 | ||
185 | For small patches you may want to CC the Trivial Patch Monkey | 185 | For small patches you may want to CC the Trivial Patch Monkey |
186 | trivial@kernel.org managed by Adrian Bunk; which collects "trivial" | 186 | trivial@kernel.org managed by Jesper Juhl; which collects "trivial" |
187 | patches. Trivial patches must qualify for one of the following rules: | 187 | patches. Trivial patches must qualify for one of the following rules: |
188 | Spelling fixes in documentation | 188 | Spelling fixes in documentation |
189 | Spelling fixes which could break grep(1) | 189 | Spelling fixes which could break grep(1) |
@@ -196,7 +196,7 @@ patches. Trivial patches must qualify for one of the following rules: | |||
196 | since people copy, as long as it's trivial) | 196 | since people copy, as long as it's trivial) |
197 | Any fix by the author/maintainer of the file (ie. patch monkey | 197 | Any fix by the author/maintainer of the file (ie. patch monkey |
198 | in re-transmission mode) | 198 | in re-transmission mode) |
199 | URL: <http://www.kernel.org/pub/linux/kernel/people/bunk/trivial/> | 199 | URL: <http://www.kernel.org/pub/linux/kernel/people/juhl/trivial/> |
200 | 200 | ||
201 | 201 | ||
202 | 202 | ||
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/block/biodoc.txt b/Documentation/block/biodoc.txt index 93f223b9723f..4dbb8be1c991 100644 --- a/Documentation/block/biodoc.txt +++ b/Documentation/block/biodoc.txt | |||
@@ -1097,7 +1097,7 @@ lock themselves, if required. Drivers that explicitly used the | |||
1097 | io_request_lock for serialization need to be modified accordingly. | 1097 | io_request_lock for serialization need to be modified accordingly. |
1098 | Usually it's as easy as adding a global lock: | 1098 | Usually it's as easy as adding a global lock: |
1099 | 1099 | ||
1100 | static spinlock_t my_driver_lock = SPIN_LOCK_UNLOCKED; | 1100 | static DEFINE_SPINLOCK(my_driver_lock); |
1101 | 1101 | ||
1102 | and passing the address to that lock to blk_init_queue(). | 1102 | and passing the address to that lock to blk_init_queue(). |
1103 | 1103 | ||
diff --git a/Documentation/cdrom/cdrom-standard.tex b/Documentation/cdrom/cdrom-standard.tex index c713aeb020c4..c06233fe52ac 100644 --- a/Documentation/cdrom/cdrom-standard.tex +++ b/Documentation/cdrom/cdrom-standard.tex | |||
@@ -777,7 +777,7 @@ Note that a driver must have one static structure, $<device>_dops$, while | |||
777 | it may have as many structures $<device>_info$ as there are minor devices | 777 | it may have as many structures $<device>_info$ as there are minor devices |
778 | active. $Register_cdrom()$ builds a linked list from these. | 778 | active. $Register_cdrom()$ builds a linked list from these. |
779 | 779 | ||
780 | \subsection{$Int\ unregister_cdrom(struct\ cdrom_device_info * cdi)$} | 780 | \subsection{$Void\ unregister_cdrom(struct\ cdrom_device_info * cdi)$} |
781 | 781 | ||
782 | Unregistering device $cdi$ with minor number $MINOR(cdi\to dev)$ removes | 782 | Unregistering device $cdi$ with minor number $MINOR(cdi\to dev)$ removes |
783 | the minor device from the list. If it was the last registered minor for | 783 | the minor device from the list. If it was the last registered minor for |
diff --git a/Documentation/cli-sti-removal.txt b/Documentation/cli-sti-removal.txt index 0223c9d20331..60932b02fcb3 100644 --- a/Documentation/cli-sti-removal.txt +++ b/Documentation/cli-sti-removal.txt | |||
@@ -43,7 +43,7 @@ would execute while the cli()-ed section is executing. | |||
43 | 43 | ||
44 | but from now on a more direct method of locking has to be used: | 44 | but from now on a more direct method of locking has to be used: |
45 | 45 | ||
46 | spinlock_t driver_lock = SPIN_LOCK_UNLOCKED; | 46 | DEFINE_SPINLOCK(driver_lock); |
47 | struct driver_data; | 47 | struct driver_data; |
48 | 48 | ||
49 | irq_handler (...) | 49 | irq_handler (...) |
diff --git a/Documentation/cpusets.txt b/Documentation/cpusets.txt index ad2bb3b3acc1..aa854b9b18cd 100644 --- a/Documentation/cpusets.txt +++ b/Documentation/cpusets.txt | |||
@@ -8,6 +8,7 @@ Portions Copyright (c) 2004-2006 Silicon Graphics, Inc. | |||
8 | Modified by Paul Jackson <pj@sgi.com> | 8 | Modified by Paul Jackson <pj@sgi.com> |
9 | Modified by Christoph Lameter <clameter@sgi.com> | 9 | Modified by Christoph Lameter <clameter@sgi.com> |
10 | Modified by Paul Menage <menage@google.com> | 10 | Modified by Paul Menage <menage@google.com> |
11 | Modified by Hidetoshi Seto <seto.hidetoshi@jp.fujitsu.com> | ||
11 | 12 | ||
12 | CONTENTS: | 13 | CONTENTS: |
13 | ========= | 14 | ========= |
@@ -20,7 +21,8 @@ CONTENTS: | |||
20 | 1.5 What is memory_pressure ? | 21 | 1.5 What is memory_pressure ? |
21 | 1.6 What is memory spread ? | 22 | 1.6 What is memory spread ? |
22 | 1.7 What is sched_load_balance ? | 23 | 1.7 What is sched_load_balance ? |
23 | 1.8 How do I use cpusets ? | 24 | 1.8 What is sched_relax_domain_level ? |
25 | 1.9 How do I use cpusets ? | ||
24 | 2. Usage Examples and Syntax | 26 | 2. Usage Examples and Syntax |
25 | 2.1 Basic Usage | 27 | 2.1 Basic Usage |
26 | 2.2 Adding/removing cpus | 28 | 2.2 Adding/removing cpus |
@@ -497,7 +499,73 @@ the cpuset code to update these sched domains, it compares the new | |||
497 | partition requested with the current, and updates its sched domains, | 499 | partition requested with the current, and updates its sched domains, |
498 | removing the old and adding the new, for each change. | 500 | removing the old and adding the new, for each change. |
499 | 501 | ||
500 | 1.8 How do I use cpusets ? | 502 | |
503 | 1.8 What is sched_relax_domain_level ? | ||
504 | -------------------------------------- | ||
505 | |||
506 | In sched domain, the scheduler migrates tasks in 2 ways; periodic load | ||
507 | balance on tick, and at time of some schedule events. | ||
508 | |||
509 | When a task is woken up, scheduler try to move the task on idle CPU. | ||
510 | For example, if a task A running on CPU X activates another task B | ||
511 | on the same CPU X, and if CPU Y is X's sibling and performing idle, | ||
512 | then scheduler migrate task B to CPU Y so that task B can start on | ||
513 | CPU Y without waiting task A on CPU X. | ||
514 | |||
515 | And if a CPU run out of tasks in its runqueue, the CPU try to pull | ||
516 | extra tasks from other busy CPUs to help them before it is going to | ||
517 | be idle. | ||
518 | |||
519 | Of course it takes some searching cost to find movable tasks and/or | ||
520 | idle CPUs, the scheduler might not search all CPUs in the domain | ||
521 | everytime. In fact, in some architectures, the searching ranges on | ||
522 | events are limited in the same socket or node where the CPU locates, | ||
523 | while the load balance on tick searchs all. | ||
524 | |||
525 | For example, assume CPU Z is relatively far from CPU X. Even if CPU Z | ||
526 | is idle while CPU X and the siblings are busy, scheduler can't migrate | ||
527 | woken task B from X to Z since it is out of its searching range. | ||
528 | As the result, task B on CPU X need to wait task A or wait load balance | ||
529 | on the next tick. For some applications in special situation, waiting | ||
530 | 1 tick may be too long. | ||
531 | |||
532 | The 'sched_relax_domain_level' file allows you to request changing | ||
533 | this searching range as you like. This file takes int value which | ||
534 | indicates size of searching range in levels ideally as follows, | ||
535 | otherwise initial value -1 that indicates the cpuset has no request. | ||
536 | |||
537 | -1 : no request. use system default or follow request of others. | ||
538 | 0 : no search. | ||
539 | 1 : search siblings (hyperthreads in a core). | ||
540 | 2 : search cores in a package. | ||
541 | 3 : search cpus in a node [= system wide on non-NUMA system] | ||
542 | ( 4 : search nodes in a chunk of node [on NUMA system] ) | ||
543 | ( 5~ : search system wide [on NUMA system]) | ||
544 | |||
545 | This file is per-cpuset and affect the sched domain where the cpuset | ||
546 | belongs to. Therefore if the flag 'sched_load_balance' of a cpuset | ||
547 | is disabled, then 'sched_relax_domain_level' have no effect since | ||
548 | there is no sched domain belonging the cpuset. | ||
549 | |||
550 | If multiple cpusets are overlapping and hence they form a single sched | ||
551 | domain, the largest value among those is used. Be careful, if one | ||
552 | requests 0 and others are -1 then 0 is used. | ||
553 | |||
554 | Note that modifying this file will have both good and bad effects, | ||
555 | and whether it is acceptable or not will be depend on your situation. | ||
556 | Don't modify this file if you are not sure. | ||
557 | |||
558 | If your situation is: | ||
559 | - The migration costs between each cpu can be assumed considerably | ||
560 | small(for you) due to your special application's behavior or | ||
561 | special hardware support for CPU cache etc. | ||
562 | - The searching cost doesn't have impact(for you) or you can make | ||
563 | the searching cost enough small by managing cpuset to compact etc. | ||
564 | - The latency is required even it sacrifices cache hit rate etc. | ||
565 | then increasing 'sched_relax_domain_level' would benefit you. | ||
566 | |||
567 | |||
568 | 1.9 How do I use cpusets ? | ||
501 | -------------------------- | 569 | -------------------------- |
502 | 570 | ||
503 | In order to minimize the impact of cpusets on critical kernel | 571 | In order to minimize the impact of cpusets on critical kernel |
diff --git a/Documentation/debugging-via-ohci1394.txt b/Documentation/debugging-via-ohci1394.txt index c360d4e91b48..59a91e5c6909 100644 --- a/Documentation/debugging-via-ohci1394.txt +++ b/Documentation/debugging-via-ohci1394.txt | |||
@@ -41,15 +41,19 @@ to a working state and enables physical DMA by default for all remote nodes. | |||
41 | This can be turned off by ohci1394's module parameter phys_dma=0. | 41 | This can be turned off by ohci1394's module parameter phys_dma=0. |
42 | 42 | ||
43 | The alternative firewire-ohci driver in drivers/firewire uses filtered physical | 43 | The alternative firewire-ohci driver in drivers/firewire uses filtered physical |
44 | DMA, hence is not yet suitable for remote debugging. | 44 | DMA by default, which is more secure but not suitable for remote debugging. |
45 | Compile the driver with CONFIG_FIREWIRE_OHCI_REMOTE_DMA (Kernel hacking menu: | ||
46 | Remote debugging over FireWire with firewire-ohci) to get unfiltered physical | ||
47 | DMA. | ||
45 | 48 | ||
46 | Because ohci1394 depends on the PCI enumeration to be completed, an | 49 | Because ohci1394 and firewire-ohci depend on the PCI enumeration to be |
47 | initialization routine which runs pretty early (long before console_init() | 50 | completed, an initialization routine which runs pretty early has been |
48 | which makes the printk buffer appear on the console can be called) was written. | 51 | implemented for x86. This routine runs long before console_init() can be |
52 | called, i.e. before the printk buffer appears on the console. | ||
49 | 53 | ||
50 | To activate it, enable CONFIG_PROVIDE_OHCI1394_DMA_INIT (Kernel hacking menu: | 54 | To activate it, enable CONFIG_PROVIDE_OHCI1394_DMA_INIT (Kernel hacking menu: |
51 | Provide code for enabling DMA over FireWire early on boot) and pass the | 55 | Remote debugging over FireWire early on boot) and pass the parameter |
52 | parameter "ohci1394_dma=early" to the recompiled kernel on boot. | 56 | "ohci1394_dma=early" to the recompiled kernel on boot. |
53 | 57 | ||
54 | Tools | 58 | Tools |
55 | ----- | 59 | ----- |
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 c09a96b99354..881e6dd03aea 100644 --- a/Documentation/dontdiff +++ b/Documentation/dontdiff | |||
@@ -47,7 +47,6 @@ | |||
47 | .mm | 47 | .mm |
48 | 53c700_d.h | 48 | 53c700_d.h |
49 | 53c8xx_d.h* | 49 | 53c8xx_d.h* |
50 | BitKeeper | ||
51 | COPYING | 50 | COPYING |
52 | CREDITS | 51 | CREDITS |
53 | CVS | 52 | CVS |
@@ -142,6 +141,7 @@ mkprep | |||
142 | mktables | 141 | mktables |
143 | mktree | 142 | mktree |
144 | modpost | 143 | modpost |
144 | modules.order | ||
145 | modversions.h* | 145 | modversions.h* |
146 | offset.h | 146 | offset.h |
147 | offsets.h | 147 | offsets.h |
@@ -172,6 +172,7 @@ sm_tbl* | |||
172 | split-include | 172 | split-include |
173 | tags | 173 | tags |
174 | tftpboot.img | 174 | tftpboot.img |
175 | timeconst.h | ||
175 | times.h* | 176 | times.h* |
176 | tkparse | 177 | tkparse |
177 | trix_boot.h | 178 | trix_boot.h |
diff --git a/Documentation/early-userspace/README b/Documentation/early-userspace/README index 766d320c8eb6..e35d83052192 100644 --- a/Documentation/early-userspace/README +++ b/Documentation/early-userspace/README | |||
@@ -89,8 +89,8 @@ the 2.7 era (it missed the boat for 2.5). | |||
89 | You can obtain somewhat infrequent snapshots of klibc from | 89 | You can obtain somewhat infrequent snapshots of klibc from |
90 | ftp://ftp.kernel.org/pub/linux/libs/klibc/ | 90 | ftp://ftp.kernel.org/pub/linux/libs/klibc/ |
91 | 91 | ||
92 | For active users, you are better off using the klibc BitKeeper | 92 | For active users, you are better off using the klibc git |
93 | repositories, at http://klibc.bkbits.net/ | 93 | repository, at http://git.kernel.org/?p=libs/klibc/klibc.git |
94 | 94 | ||
95 | The standalone klibc distribution currently provides three components, | 95 | The standalone klibc distribution currently provides three components, |
96 | in addition to the klibc library: | 96 | in addition to the klibc library: |
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 bf0e3df8e7a1..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 |
@@ -203,16 +194,8 @@ Who: linuxppc-dev@ozlabs.org | |||
203 | 194 | ||
204 | --------------------------- | 195 | --------------------------- |
205 | 196 | ||
206 | What: sk98lin network driver | ||
207 | When: Feburary 2008 | ||
208 | Why: In kernel tree version of driver is unmaintained. Sk98lin driver | ||
209 | replaced by the skge driver. | ||
210 | Who: Stephen Hemminger <shemminger@linux-foundation.org> | ||
211 | |||
212 | --------------------------- | ||
213 | |||
214 | What: i386/x86_64 bzImage symlinks | 197 | What: i386/x86_64 bzImage symlinks |
215 | When: April 2008 | 198 | When: April 2010 |
216 | 199 | ||
217 | Why: The i386/x86_64 merge provides a symlink to the old bzImage | 200 | Why: The i386/x86_64 merge provides a symlink to the old bzImage |
218 | location so not yet updated user space tools, e.g. package | 201 | location so not yet updated user space tools, e.g. package |
@@ -221,8 +204,6 @@ Who: Thomas Gleixner <tglx@linutronix.de> | |||
221 | 204 | ||
222 | --------------------------- | 205 | --------------------------- |
223 | 206 | ||
224 | --------------------------- | ||
225 | |||
226 | What: i2c-i810, i2c-prosavage and i2c-savage4 | 207 | What: i2c-i810, i2c-prosavage and i2c-savage4 |
227 | When: May 2008 | 208 | When: May 2008 |
228 | Why: These drivers are superseded by i810fb, intelfb and savagefb. | 209 | Why: These drivers are superseded by i810fb, intelfb and savagefb. |
@@ -230,33 +211,6 @@ Who: Jean Delvare <khali@linux-fr.org> | |||
230 | 211 | ||
231 | --------------------------- | 212 | --------------------------- |
232 | 213 | ||
233 | What: bcm43xx wireless network driver | ||
234 | When: 2.6.26 | ||
235 | Files: drivers/net/wireless/bcm43xx | ||
236 | Why: This driver's functionality has been replaced by the | ||
237 | mac80211-based b43 and b43legacy drivers. | ||
238 | Who: John W. Linville <linville@tuxdriver.com> | ||
239 | |||
240 | --------------------------- | ||
241 | |||
242 | What: ieee80211 softmac wireless networking component | ||
243 | When: 2.6.26 (or after removal of bcm43xx and port of zd1211rw to mac80211) | ||
244 | Files: net/ieee80211/softmac | ||
245 | Why: No in-kernel drivers will depend on it any longer. | ||
246 | Who: John W. Linville <linville@tuxdriver.com> | ||
247 | |||
248 | --------------------------- | ||
249 | |||
250 | What: rc80211-simple rate control algorithm for mac80211 | ||
251 | When: 2.6.26 | ||
252 | Files: net/mac80211/rc80211-simple.c | ||
253 | Why: This algorithm was provided for reference but always exhibited bad | ||
254 | responsiveness and performance and has some serious flaws. It has been | ||
255 | replaced by rc80211-pid. | ||
256 | Who: Stefano Brivio <stefano.brivio@polimi.it> | ||
257 | |||
258 | --------------------------- | ||
259 | |||
260 | What (Why): | 214 | What (Why): |
261 | - include/linux/netfilter_ipv4/ipt_TOS.h ipt_tos.h header files | 215 | - include/linux/netfilter_ipv4/ipt_TOS.h ipt_tos.h header files |
262 | (superseded by xt_TOS/xt_tos target & match) | 216 | (superseded by xt_TOS/xt_tos target & match) |
@@ -298,17 +252,6 @@ Who: Michael Buesch <mb@bu3sch.de> | |||
298 | 252 | ||
299 | --------------------------- | 253 | --------------------------- |
300 | 254 | ||
301 | What: Solaris/SunOS syscall and binary support on Sparc | ||
302 | When: 2.6.26 | ||
303 | Why: Largely unmaintained and almost entirely unused. File system | ||
304 | layering used to divert library and dynamic linker searches to | ||
305 | /usr/gnemul is extremely buggy and unfixable. Making it work | ||
306 | is largely pointless as without a lot of work only the most | ||
307 | trivial of Solaris binaries can work with the emulation code. | ||
308 | Who: David S. Miller <davem@davemloft.net> | ||
309 | |||
310 | --------------------------- | ||
311 | |||
312 | What: init_mm export | 255 | What: init_mm export |
313 | When: 2.6.26 | 256 | When: 2.6.26 |
314 | Why: Not used in-tree. The current out-of-tree users used it to | 257 | Why: Not used in-tree. The current out-of-tree users used it to |
@@ -318,3 +261,28 @@ Why: Not used in-tree. The current out-of-tree users used it to | |||
318 | code / infrastructure should be in the kernel and not in some | 261 | code / infrastructure should be in the kernel and not in some |
319 | out-of-tree driver. | 262 | out-of-tree driver. |
320 | Who: Thomas Gleixner <tglx@linutronix.de> | 263 | Who: Thomas Gleixner <tglx@linutronix.de> |
264 | |||
265 | ---------------------------- | ||
266 | |||
267 | What: usedac i386 kernel parameter | ||
268 | When: 2.6.27 | ||
269 | Why: replaced by allowdac and no dac combination | ||
270 | Who: Glauber Costa <gcosta@redhat.com> | ||
271 | |||
272 | --------------------------- | ||
273 | |||
274 | What: /sys/o2cb symlink | ||
275 | When: January 2010 | ||
276 | Why: /sys/fs/o2cb is the proper location for this information - /sys/o2cb | ||
277 | exists as a symlink for backwards compatibility for old versions of | ||
278 | ocfs2-tools. 2 years should be sufficient time to phase in new versions | ||
279 | which know to look in /sys/fs/o2cb. | ||
280 | Who: ocfs2-devel@oss.oracle.com | ||
281 | |||
282 | --------------------------- | ||
283 | |||
284 | What: asm/semaphore.h | ||
285 | When: 2.6.26 | ||
286 | Why: Implementation became generic; users should now include | ||
287 | linux/semaphore.h instead. | ||
288 | Who: Matthew Wilcox <willy@linux.intel.com> | ||
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/proc.txt b/Documentation/filesystems/proc.txt index 518ebe609e2b..2a99116edc47 100644 --- a/Documentation/filesystems/proc.txt +++ b/Documentation/filesystems/proc.txt | |||
@@ -43,6 +43,7 @@ Table of Contents | |||
43 | 2.13 /proc/<pid>/oom_score - Display current oom-killer score | 43 | 2.13 /proc/<pid>/oom_score - Display current oom-killer score |
44 | 2.14 /proc/<pid>/io - Display the IO accounting fields | 44 | 2.14 /proc/<pid>/io - Display the IO accounting fields |
45 | 2.15 /proc/<pid>/coredump_filter - Core dump filtering settings | 45 | 2.15 /proc/<pid>/coredump_filter - Core dump filtering settings |
46 | 2.16 /proc/<pid>/mountinfo - Information about mounts | ||
46 | 47 | ||
47 | ------------------------------------------------------------------------------ | 48 | ------------------------------------------------------------------------------ |
48 | Preface | 49 | Preface |
@@ -2348,4 +2349,41 @@ For example: | |||
2348 | $ echo 0x7 > /proc/self/coredump_filter | 2349 | $ echo 0x7 > /proc/self/coredump_filter |
2349 | $ ./some_program | 2350 | $ ./some_program |
2350 | 2351 | ||
2352 | 2.16 /proc/<pid>/mountinfo - Information about mounts | ||
2353 | -------------------------------------------------------- | ||
2354 | |||
2355 | This file contains lines of the form: | ||
2356 | |||
2357 | 36 35 98:0 /mnt1 /mnt2 rw,noatime master:1 - ext3 /dev/root rw,errors=continue | ||
2358 | (1)(2)(3) (4) (5) (6) (7) (8) (9) (10) (11) | ||
2359 | |||
2360 | (1) mount ID: unique identifier of the mount (may be reused after umount) | ||
2361 | (2) parent ID: ID of parent (or of self for the top of the mount tree) | ||
2362 | (3) major:minor: value of st_dev for files on filesystem | ||
2363 | (4) root: root of the mount within the filesystem | ||
2364 | (5) mount point: mount point relative to the process's root | ||
2365 | (6) mount options: per mount options | ||
2366 | (7) optional fields: zero or more fields of the form "tag[:value]" | ||
2367 | (8) separator: marks the end of the optional fields | ||
2368 | (9) filesystem type: name of filesystem of the form "type[.subtype]" | ||
2369 | (10) mount source: filesystem specific information or "none" | ||
2370 | (11) super options: per super block options | ||
2371 | |||
2372 | Parsers should ignore all unrecognised optional fields. Currently the | ||
2373 | possible optional fields are: | ||
2374 | |||
2375 | shared:X mount is shared in peer group X | ||
2376 | master:X mount is slave to peer group X | ||
2377 | propagate_from:X mount is slave and receives propagation from peer group X (*) | ||
2378 | unbindable mount is unbindable | ||
2379 | |||
2380 | (*) X is the closest dominant peer group under the process's root. If | ||
2381 | X is the immediate master of the mount, or if there's no dominant peer | ||
2382 | group under the same root, then only the "master:X" field is present | ||
2383 | and not the "propagate_from:X" field. | ||
2384 | |||
2385 | For more information on mount propagation see: | ||
2386 | |||
2387 | Documentation/filesystems/sharedsubtree.txt | ||
2388 | |||
2351 | ------------------------------------------------------------------------------ | 2389 | ------------------------------------------------------------------------------ |
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/sysfs.txt b/Documentation/filesystems/sysfs.txt index 4598ef7b622b..7f27b8f840d0 100644 --- a/Documentation/filesystems/sysfs.txt +++ b/Documentation/filesystems/sysfs.txt | |||
@@ -176,8 +176,10 @@ implementations: | |||
176 | Recall that an attribute should only be exporting one value, or an | 176 | Recall that an attribute should only be exporting one value, or an |
177 | array of similar values, so this shouldn't be that expensive. | 177 | array of similar values, so this shouldn't be that expensive. |
178 | 178 | ||
179 | This allows userspace to do partial reads and seeks arbitrarily over | 179 | This allows userspace to do partial reads and forward seeks |
180 | the entire file at will. | 180 | arbitrarily over the entire file at will. If userspace seeks back to |
181 | zero or does a pread(2) with an offset of '0' the show() method will | ||
182 | be called again, rearmed, to fill the buffer. | ||
181 | 183 | ||
182 | - On write(2), sysfs expects the entire buffer to be passed during the | 184 | - On write(2), sysfs expects the entire buffer to be passed during the |
183 | first write. Sysfs then passes the entire buffer to the store() | 185 | first write. Sysfs then passes the entire buffer to the store() |
@@ -192,6 +194,9 @@ implementations: | |||
192 | 194 | ||
193 | Other notes: | 195 | Other notes: |
194 | 196 | ||
197 | - Writing causes the show() method to be rearmed regardless of current | ||
198 | file position. | ||
199 | |||
195 | - The buffer will always be PAGE_SIZE bytes in length. On i386, this | 200 | - The buffer will always be PAGE_SIZE bytes in length. On i386, this |
196 | is 4096. | 201 | is 4096. |
197 | 202 | ||
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/filesystems/xfs.txt b/Documentation/filesystems/xfs.txt index 74aeb142ae5f..0a1668ba2600 100644 --- a/Documentation/filesystems/xfs.txt +++ b/Documentation/filesystems/xfs.txt | |||
@@ -52,16 +52,15 @@ When mounting an XFS filesystem, the following options are accepted. | |||
52 | and also gets the setgid bit set if it is a directory itself. | 52 | and also gets the setgid bit set if it is a directory itself. |
53 | 53 | ||
54 | ihashsize=value | 54 | ihashsize=value |
55 | Sets the number of hash buckets available for hashing the | 55 | In memory inode hashes have been removed, so this option has |
56 | in-memory inodes of the specified mount point. If a value | 56 | no function as of August 2007. Option is deprecated. |
57 | of zero is used, the value selected by the default algorithm | ||
58 | will be displayed in /proc/mounts. | ||
59 | 57 | ||
60 | ikeep/noikeep | 58 | ikeep/noikeep |
61 | When inode clusters are emptied of inodes, keep them around | 59 | When ikeep is specified, XFS does not delete empty inode clusters |
62 | on the disk (ikeep) - this is the traditional XFS behaviour | 60 | and keeps them around on disk. ikeep is the traditional XFS |
63 | and is still the default for now. Using the noikeep option, | 61 | behaviour. When noikeep is specified, empty inode clusters |
64 | inode clusters are returned to the free space pool. | 62 | are returned to the free space pool. The default is noikeep for |
63 | non-DMAPI mounts, while ikeep is the default when DMAPI is in use. | ||
65 | 64 | ||
66 | inode64 | 65 | inode64 |
67 | Indicates that XFS is allowed to create inodes at any location | 66 | Indicates that XFS is allowed to create inodes at any location |
diff --git a/Documentation/firmware_class/firmware_sample_driver.c b/Documentation/firmware_class/firmware_sample_driver.c deleted file mode 100644 index 6865cbe075ec..000000000000 --- a/Documentation/firmware_class/firmware_sample_driver.c +++ /dev/null | |||
@@ -1,115 +0,0 @@ | |||
1 | /* | ||
2 | * firmware_sample_driver.c - | ||
3 | * | ||
4 | * Copyright (c) 2003 Manuel Estrada Sainz | ||
5 | * | ||
6 | * Sample code on how to use request_firmware() from drivers. | ||
7 | * | ||
8 | */ | ||
9 | |||
10 | #include <linux/module.h> | ||
11 | #include <linux/kernel.h> | ||
12 | #include <linux/init.h> | ||
13 | #include <linux/device.h> | ||
14 | #include <linux/string.h> | ||
15 | |||
16 | #include "linux/firmware.h" | ||
17 | |||
18 | static struct device ghost_device = { | ||
19 | .bus_id = "ghost0", | ||
20 | }; | ||
21 | |||
22 | |||
23 | static void sample_firmware_load(char *firmware, int size) | ||
24 | { | ||
25 | u8 buf[size+1]; | ||
26 | memcpy(buf, firmware, size); | ||
27 | buf[size] = '\0'; | ||
28 | printk(KERN_INFO "firmware_sample_driver: firmware: %s\n", buf); | ||
29 | } | ||
30 | |||
31 | static void sample_probe_default(void) | ||
32 | { | ||
33 | /* uses the default method to get the firmware */ | ||
34 | const struct firmware *fw_entry; | ||
35 | printk(KERN_INFO "firmware_sample_driver: a ghost device got inserted :)\n"); | ||
36 | |||
37 | if(request_firmware(&fw_entry, "sample_driver_fw", &ghost_device)!=0) | ||
38 | { | ||
39 | printk(KERN_ERR | ||
40 | "firmware_sample_driver: Firmware not available\n"); | ||
41 | return; | ||
42 | } | ||
43 | |||
44 | sample_firmware_load(fw_entry->data, fw_entry->size); | ||
45 | |||
46 | release_firmware(fw_entry); | ||
47 | |||
48 | /* finish setting up the device */ | ||
49 | } | ||
50 | static void sample_probe_specific(void) | ||
51 | { | ||
52 | /* Uses some specific hotplug support to get the firmware from | ||
53 | * userspace directly into the hardware, or via some sysfs file */ | ||
54 | |||
55 | /* NOTE: This currently doesn't work */ | ||
56 | |||
57 | printk(KERN_INFO "firmware_sample_driver: a ghost device got inserted :)\n"); | ||
58 | |||
59 | if(request_firmware(NULL, "sample_driver_fw", &ghost_device)!=0) | ||
60 | { | ||
61 | printk(KERN_ERR | ||
62 | "firmware_sample_driver: Firmware load failed\n"); | ||
63 | return; | ||
64 | } | ||
65 | |||
66 | /* request_firmware blocks until userspace finished, so at | ||
67 | * this point the firmware should be already in the device */ | ||
68 | |||
69 | /* finish setting up the device */ | ||
70 | } | ||
71 | static void sample_probe_async_cont(const struct firmware *fw, void *context) | ||
72 | { | ||
73 | if(!fw){ | ||
74 | printk(KERN_ERR | ||
75 | "firmware_sample_driver: firmware load failed\n"); | ||
76 | return; | ||
77 | } | ||
78 | |||
79 | printk(KERN_INFO "firmware_sample_driver: device pointer \"%s\"\n", | ||
80 | (char *)context); | ||
81 | sample_firmware_load(fw->data, fw->size); | ||
82 | } | ||
83 | static void sample_probe_async(void) | ||
84 | { | ||
85 | /* Let's say that I can't sleep */ | ||
86 | int error; | ||
87 | error = request_firmware_nowait (THIS_MODULE, FW_ACTION_NOHOTPLUG, | ||
88 | "sample_driver_fw", &ghost_device, | ||
89 | "my device pointer", | ||
90 | sample_probe_async_cont); | ||
91 | if(error){ | ||
92 | printk(KERN_ERR | ||
93 | "firmware_sample_driver:" | ||
94 | " request_firmware_nowait failed\n"); | ||
95 | } | ||
96 | } | ||
97 | |||
98 | static int sample_init(void) | ||
99 | { | ||
100 | device_initialize(&ghost_device); | ||
101 | /* since there is no real hardware insertion I just call the | ||
102 | * sample probe functions here */ | ||
103 | sample_probe_specific(); | ||
104 | sample_probe_default(); | ||
105 | sample_probe_async(); | ||
106 | return 0; | ||
107 | } | ||
108 | static void __exit sample_exit(void) | ||
109 | { | ||
110 | } | ||
111 | |||
112 | module_init (sample_init); | ||
113 | module_exit (sample_exit); | ||
114 | |||
115 | MODULE_LICENSE("GPL"); | ||
diff --git a/Documentation/firmware_class/firmware_sample_firmware_class.c b/Documentation/firmware_class/firmware_sample_firmware_class.c deleted file mode 100644 index 2de62854f0e5..000000000000 --- a/Documentation/firmware_class/firmware_sample_firmware_class.c +++ /dev/null | |||
@@ -1,207 +0,0 @@ | |||
1 | /* | ||
2 | * firmware_sample_firmware_class.c - | ||
3 | * | ||
4 | * Copyright (c) 2003 Manuel Estrada Sainz | ||
5 | * | ||
6 | * NOTE: This is just a probe of concept, if you think that your driver would | ||
7 | * be well served by this mechanism please contact me first. | ||
8 | * | ||
9 | * DON'T USE THIS CODE AS IS | ||
10 | * | ||
11 | */ | ||
12 | |||
13 | #include <linux/device.h> | ||
14 | #include <linux/module.h> | ||
15 | #include <linux/init.h> | ||
16 | #include <linux/timer.h> | ||
17 | #include <linux/slab.h> | ||
18 | #include <linux/string.h> | ||
19 | #include <linux/firmware.h> | ||
20 | |||
21 | |||
22 | MODULE_AUTHOR("Manuel Estrada Sainz"); | ||
23 | MODULE_DESCRIPTION("Hackish sample for using firmware class directly"); | ||
24 | MODULE_LICENSE("GPL"); | ||
25 | |||
26 | static inline struct class_device *to_class_dev(struct kobject *obj) | ||
27 | { | ||
28 | return container_of(obj,struct class_device,kobj); | ||
29 | } | ||
30 | static inline | ||
31 | struct class_device_attribute *to_class_dev_attr(struct attribute *_attr) | ||
32 | { | ||
33 | return container_of(_attr,struct class_device_attribute,attr); | ||
34 | } | ||
35 | |||
36 | int sysfs_create_bin_file(struct kobject * kobj, struct bin_attribute * attr); | ||
37 | int sysfs_remove_bin_file(struct kobject * kobj, struct bin_attribute * attr); | ||
38 | |||
39 | struct firmware_priv { | ||
40 | char fw_id[FIRMWARE_NAME_MAX]; | ||
41 | s32 loading:2; | ||
42 | u32 abort:1; | ||
43 | }; | ||
44 | |||
45 | extern struct class firmware_class; | ||
46 | |||
47 | static ssize_t firmware_loading_show(struct class_device *class_dev, char *buf) | ||
48 | { | ||
49 | struct firmware_priv *fw_priv = class_get_devdata(class_dev); | ||
50 | return sprintf(buf, "%d\n", fw_priv->loading); | ||
51 | } | ||
52 | static ssize_t firmware_loading_store(struct class_device *class_dev, | ||
53 | const char *buf, size_t count) | ||
54 | { | ||
55 | struct firmware_priv *fw_priv = class_get_devdata(class_dev); | ||
56 | int prev_loading = fw_priv->loading; | ||
57 | |||
58 | fw_priv->loading = simple_strtol(buf, NULL, 10); | ||
59 | |||
60 | switch(fw_priv->loading){ | ||
61 | case -1: | ||
62 | /* abort load an panic */ | ||
63 | break; | ||
64 | case 1: | ||
65 | /* setup load */ | ||
66 | break; | ||
67 | case 0: | ||
68 | if(prev_loading==1){ | ||
69 | /* finish load and get the device back to working | ||
70 | * state */ | ||
71 | } | ||
72 | break; | ||
73 | } | ||
74 | |||
75 | return count; | ||
76 | } | ||
77 | static CLASS_DEVICE_ATTR(loading, 0644, | ||
78 | firmware_loading_show, firmware_loading_store); | ||
79 | |||
80 | static ssize_t firmware_data_read(struct kobject *kobj, | ||
81 | struct bin_attribute *bin_attr, | ||
82 | char *buffer, loff_t offset, size_t count) | ||
83 | { | ||
84 | struct class_device *class_dev = to_class_dev(kobj); | ||
85 | struct firmware_priv *fw_priv = class_get_devdata(class_dev); | ||
86 | |||
87 | /* read from the devices firmware memory */ | ||
88 | |||
89 | return count; | ||
90 | } | ||
91 | static ssize_t firmware_data_write(struct kobject *kobj, | ||
92 | struct bin_attribute *bin_attr, | ||
93 | char *buffer, loff_t offset, size_t count) | ||
94 | { | ||
95 | struct class_device *class_dev = to_class_dev(kobj); | ||
96 | struct firmware_priv *fw_priv = class_get_devdata(class_dev); | ||
97 | |||
98 | /* write to the devices firmware memory */ | ||
99 | |||
100 | return count; | ||
101 | } | ||
102 | static struct bin_attribute firmware_attr_data = { | ||
103 | .attr = {.name = "data", .mode = 0644}, | ||
104 | .size = 0, | ||
105 | .read = firmware_data_read, | ||
106 | .write = firmware_data_write, | ||
107 | }; | ||
108 | static int fw_setup_class_device(struct class_device *class_dev, | ||
109 | const char *fw_name, | ||
110 | struct device *device) | ||
111 | { | ||
112 | int retval; | ||
113 | struct firmware_priv *fw_priv; | ||
114 | |||
115 | fw_priv = kzalloc(sizeof(struct firmware_priv), GFP_KERNEL); | ||
116 | if (!fw_priv) { | ||
117 | retval = -ENOMEM; | ||
118 | goto out; | ||
119 | } | ||
120 | |||
121 | memset(class_dev, 0, sizeof(*class_dev)); | ||
122 | |||
123 | strncpy(fw_priv->fw_id, fw_name, FIRMWARE_NAME_MAX); | ||
124 | fw_priv->fw_id[FIRMWARE_NAME_MAX-1] = '\0'; | ||
125 | |||
126 | strncpy(class_dev->class_id, device->bus_id, BUS_ID_SIZE); | ||
127 | class_dev->class_id[BUS_ID_SIZE-1] = '\0'; | ||
128 | class_dev->dev = device; | ||
129 | |||
130 | class_dev->class = &firmware_class, | ||
131 | class_set_devdata(class_dev, fw_priv); | ||
132 | retval = class_device_register(class_dev); | ||
133 | if (retval){ | ||
134 | printk(KERN_ERR "%s: class_device_register failed\n", | ||
135 | __FUNCTION__); | ||
136 | goto error_free_fw_priv; | ||
137 | } | ||
138 | |||
139 | retval = sysfs_create_bin_file(&class_dev->kobj, &firmware_attr_data); | ||
140 | if (retval){ | ||
141 | printk(KERN_ERR "%s: sysfs_create_bin_file failed\n", | ||
142 | __FUNCTION__); | ||
143 | goto error_unreg_class_dev; | ||
144 | } | ||
145 | |||
146 | retval = class_device_create_file(class_dev, | ||
147 | &class_device_attr_loading); | ||
148 | if (retval){ | ||
149 | printk(KERN_ERR "%s: class_device_create_file failed\n", | ||
150 | __FUNCTION__); | ||
151 | goto error_remove_data; | ||
152 | } | ||
153 | |||
154 | goto out; | ||
155 | |||
156 | error_remove_data: | ||
157 | sysfs_remove_bin_file(&class_dev->kobj, &firmware_attr_data); | ||
158 | error_unreg_class_dev: | ||
159 | class_device_unregister(class_dev); | ||
160 | error_free_fw_priv: | ||
161 | kfree(fw_priv); | ||
162 | out: | ||
163 | return retval; | ||
164 | } | ||
165 | static void fw_remove_class_device(struct class_device *class_dev) | ||
166 | { | ||
167 | struct firmware_priv *fw_priv = class_get_devdata(class_dev); | ||
168 | |||
169 | class_device_remove_file(class_dev, &class_device_attr_loading); | ||
170 | sysfs_remove_bin_file(&class_dev->kobj, &firmware_attr_data); | ||
171 | class_device_unregister(class_dev); | ||
172 | } | ||
173 | |||
174 | static struct class_device *class_dev; | ||
175 | |||
176 | static struct device my_device = { | ||
177 | .bus_id = "my_dev0", | ||
178 | }; | ||
179 | |||
180 | static int __init firmware_sample_init(void) | ||
181 | { | ||
182 | int error; | ||
183 | |||
184 | device_initialize(&my_device); | ||
185 | class_dev = kmalloc(sizeof(struct class_device), GFP_KERNEL); | ||
186 | if(!class_dev) | ||
187 | return -ENOMEM; | ||
188 | |||
189 | error = fw_setup_class_device(class_dev, "my_firmware_image", | ||
190 | &my_device); | ||
191 | if(error){ | ||
192 | kfree(class_dev); | ||
193 | return error; | ||
194 | } | ||
195 | return 0; | ||
196 | |||
197 | } | ||
198 | static void __exit firmware_sample_exit(void) | ||
199 | { | ||
200 | struct firmware_priv *fw_priv = class_get_devdata(class_dev); | ||
201 | fw_remove_class_device(class_dev); | ||
202 | kfree(fw_priv); | ||
203 | kfree(class_dev); | ||
204 | } | ||
205 | module_init(firmware_sample_init); | ||
206 | module_exit(firmware_sample_exit); | ||
207 | |||
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/highuid.txt b/Documentation/highuid.txt index 76034d9dbfc0..6bad6f1d1cac 100644 --- a/Documentation/highuid.txt +++ b/Documentation/highuid.txt | |||
@@ -28,8 +28,6 @@ What's left to be done for 32-bit UIDs on all Linux architectures: | |||
28 | uses the 32-bit UID system calls properly otherwise. | 28 | uses the 32-bit UID system calls properly otherwise. |
29 | 29 | ||
30 | This affects at least: | 30 | This affects at least: |
31 | SunOS emulation | ||
32 | Solaris emulation | ||
33 | iBCS on Intel | 31 | iBCS on Intel |
34 | 32 | ||
35 | sparc32 emulation on sparc64 | 33 | sparc32 emulation on sparc64 |
diff --git a/Documentation/i386/boot.txt b/Documentation/i386/boot.txt index fc49b79bc1ab..0fac3465f2e3 100644 --- a/Documentation/i386/boot.txt +++ b/Documentation/i386/boot.txt | |||
@@ -42,6 +42,8 @@ Protocol 2.05: (Kernel 2.6.20) Make protected mode kernel relocatable. | |||
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.09: (kernel 2.6.26) Added a field of 64-bit physical | ||
46 | pointer to single linked list of struct setup_data. | ||
45 | 47 | ||
46 | **** MEMORY LAYOUT | 48 | **** MEMORY LAYOUT |
47 | 49 | ||
@@ -170,6 +172,10 @@ Offset Proto Name Meaning | |||
170 | 0238/4 2.06+ cmdline_size Maximum size of the kernel command line | 172 | 0238/4 2.06+ cmdline_size Maximum size of the kernel command line |
171 | 023C/4 2.07+ hardware_subarch Hardware subarchitecture | 173 | 023C/4 2.07+ hardware_subarch Hardware subarchitecture |
172 | 0240/8 2.07+ hardware_subarch_data Subarchitecture-specific data | 174 | 0240/8 2.07+ hardware_subarch_data Subarchitecture-specific data |
175 | 0248/4 2.08+ payload_offset Offset of kernel payload | ||
176 | 024C/4 2.08+ payload_length Length of kernel payload | ||
177 | 0250/8 2.09+ setup_data 64-bit physical pointer to linked list | ||
178 | of struct setup_data | ||
173 | 179 | ||
174 | (1) For backwards compatibility, if the setup_sects field contains 0, the | 180 | (1) For backwards compatibility, if the setup_sects field contains 0, the |
175 | real value is 4. | 181 | real value is 4. |
@@ -512,6 +518,32 @@ Protocol: 2.07+ | |||
512 | 518 | ||
513 | A pointer to data that is specific to hardware subarch | 519 | A pointer to data that is specific to hardware subarch |
514 | 520 | ||
521 | Field name: payload_offset | ||
522 | Type: read | ||
523 | Offset/size: 0x248/4 | ||
524 | Protocol: 2.08+ | ||
525 | |||
526 | If non-zero then this field contains the offset from the end of the | ||
527 | real-mode code to the payload. | ||
528 | |||
529 | The payload may be compressed. The format of both the compressed and | ||
530 | uncompressed data should be determined using the standard magic | ||
531 | numbers. Currently only gzip compressed ELF is used. | ||
532 | |||
533 | Field name: payload_length | ||
534 | Type: read | ||
535 | Offset/size: 0x24c/4 | ||
536 | Protocol: 2.08+ | ||
537 | |||
538 | The length of the payload. | ||
539 | |||
540 | **** THE IMAGE CHECKSUM | ||
541 | |||
542 | From boot protocol version 2.08 onwards the CRC-32 is calculated over | ||
543 | the entire file using the characteristic polynomial 0x04C11DB7 and an | ||
544 | initial remainder of 0xffffffff. The checksum is appended to the | ||
545 | file; therefore the CRC of the file up to the limit specified in the | ||
546 | syssize field of the header is always 0. | ||
515 | 547 | ||
516 | **** THE KERNEL COMMAND LINE | 548 | **** THE KERNEL COMMAND LINE |
517 | 549 | ||
@@ -544,6 +576,28 @@ command line is entered using the following protocol: | |||
544 | covered by setup_move_size, so you may need to adjust this | 576 | covered by setup_move_size, so you may need to adjust this |
545 | field. | 577 | field. |
546 | 578 | ||
579 | Field name: setup_data | ||
580 | Type: write (obligatory) | ||
581 | Offset/size: 0x250/8 | ||
582 | Protocol: 2.09+ | ||
583 | |||
584 | The 64-bit physical pointer to NULL terminated single linked list of | ||
585 | struct setup_data. This is used to define a more extensible boot | ||
586 | parameters passing mechanism. The definition of struct setup_data is | ||
587 | as follow: | ||
588 | |||
589 | struct setup_data { | ||
590 | u64 next; | ||
591 | u32 type; | ||
592 | u32 len; | ||
593 | u8 data[0]; | ||
594 | }; | ||
595 | |||
596 | Where, the next is a 64-bit physical pointer to the next node of | ||
597 | linked list, the next field of the last node is 0; the type is used | ||
598 | to identify the contents of data; the len is the length of data | ||
599 | field; the data holds the real payload. | ||
600 | |||
547 | 601 | ||
548 | **** MEMORY LAYOUT OF THE REAL-MODE CODE | 602 | **** MEMORY LAYOUT OF THE REAL-MODE CODE |
549 | 603 | ||
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 818676aad45a..0c78f4b1d9d9 100644 --- a/Documentation/ide/ide.txt +++ b/Documentation/ide/ide.txt | |||
@@ -71,29 +71,6 @@ This driver automatically probes for most IDE interfaces (including all PCI | |||
71 | ones), for the drives/geometries attached to those interfaces, and for the IRQ | 71 | ones), for the drives/geometries attached to those interfaces, and for the IRQ |
72 | lines being used by the interfaces (normally 14, 15 for ide0/ide1). | 72 | lines being used by the interfaces (normally 14, 15 for ide0/ide1). |
73 | 73 | ||
74 | For special cases, interfaces may be specified using kernel "command line" | ||
75 | options. For example, | ||
76 | |||
77 | ide3=0x168,0x36e,10 /* ioports 0x168-0x16f,0x36e, irq 10 */ | ||
78 | |||
79 | Normally the irq number need not be specified, as ide.c will probe for it: | ||
80 | |||
81 | ide3=0x168,0x36e /* ioports 0x168-0x16f,0x36e */ | ||
82 | |||
83 | The standard port, and irq values are these: | ||
84 | |||
85 | ide0=0x1f0,0x3f6,14 | ||
86 | ide1=0x170,0x376,15 | ||
87 | ide2=0x1e8,0x3ee,11 | ||
88 | ide3=0x168,0x36e,10 | ||
89 | |||
90 | Note that the first parameter reserves 8 contiguous ioports, whereas the | ||
91 | second value denotes a single ioport. If in doubt, do a 'cat /proc/ioports'. | ||
92 | |||
93 | In all probability the device uses these ports and IRQs if it is attached | ||
94 | to the appropriate ide channel. Pass the parameter for the correct ide | ||
95 | channel to the kernel, as explained above. | ||
96 | |||
97 | Any number of interfaces may share a single IRQ if necessary, at a slight | 74 | Any number of interfaces may share a single IRQ if necessary, at a slight |
98 | performance penalty, whether on separate cards or a single VLB card. | 75 | performance penalty, whether on separate cards or a single VLB card. |
99 | The IDE driver automatically detects and handles this. However, this may | 76 | The IDE driver automatically detects and handles this. However, this may |
@@ -105,27 +82,26 @@ Drives are normally found by auto-probing and/or examining the CMOS/BIOS data. | |||
105 | 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 |
106 | 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: |
107 | 84 | ||
108 | hdx=cyls,heads,sects | 85 | ide_core.chs=[interface_number.device_number]:cyls,heads,sects |
109 | or hdx=cdrom | 86 | or ide_core.cdrom=[interface_number.device_number] |
110 | 87 | ||
111 | where hdx can be any of hda through hdh, Three values are required | 88 | For example: |
112 | (cyls,heads,sects). For example: | ||
113 | 89 | ||
114 | hdc=1050,32,64 hdd=cdrom | 90 | ide_core.chs=1.0:1050,32,64 ide_core.cdrom=1.1 |
115 | 91 | ||
116 | 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 |
117 | override the physical geometry/irq specified, though the "original" geometry | 93 | specified, though the "original" geometry may be retained as the "logical" |
118 | may be retained as the "logical" geometry for partitioning purposes (fdisk). | 94 | geometry for partitioning purposes (fdisk). |
119 | 95 | ||
120 | 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 |
121 | 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 |
122 | 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 |
123 | probe/identification sequence. For example: | 99 | probe/identification sequence. For example: |
124 | 100 | ||
125 | hdb=noprobe | 101 | ide_core.noprobe=0.1 |
126 | or | 102 | or |
127 | hdc=768,16,32 | 103 | ide_core.chs=1.0:768,16,32 |
128 | hdc=noprobe | 104 | ide_core.noprobe=1.0 |
129 | 105 | ||
130 | 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 |
131 | jumpered as "single" or "master", *not* "slave". Many folks have had | 107 | jumpered as "single" or "master", *not* "slave". Many folks have had |
@@ -141,9 +117,9 @@ If for some reason your cdrom drive is *not* found at boot time, you can force | |||
141 | 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 |
142 | via LILO, such as: | 118 | via LILO, such as: |
143 | 119 | ||
144 | hdc=cdrom /* hdc = "master" on second interface */ | 120 | ide_core.cdrom=1.0 /* "master" on second interface (hdc) */ |
145 | or | 121 | or |
146 | hdd=cdrom /* hdd = "slave" on second interface */ | 122 | ide_core.cdrom=1.1 /* "slave" on second interface (hdd) */ |
147 | 123 | ||
148 | 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 |
149 | 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 |
@@ -184,13 +160,6 @@ provided it is mounted with the default block size of 1024 (as above). | |||
184 | Please pass on any feedback on any of this stuff to the maintainer, | 160 | Please pass on any feedback on any of this stuff to the maintainer, |
185 | whose address can be found in linux/MAINTAINERS. | 161 | whose address can be found in linux/MAINTAINERS. |
186 | 162 | ||
187 | Note that if BOTH hd.c and ide.c are configured into the kernel, | ||
188 | hd.c will normally be allowed to control the primary IDE interface. | ||
189 | This is useful for older hardware that may be incompatible with ide.c, | ||
190 | and still allows newer hardware to run on the 2nd/3rd/4th IDE ports | ||
191 | under control of ide.c. To have ide.c also "take over" the primary | ||
192 | IDE port in this situation, use the "command line" parameter: ide0=0x1f0 | ||
193 | |||
194 | The IDE driver is modularized. The high level disk/CD-ROM/tape/floppy | 163 | The IDE driver is modularized. The high level disk/CD-ROM/tape/floppy |
195 | drivers can always be compiled as loadable modules, the chipset drivers | 164 | drivers can always be compiled as loadable modules, the chipset drivers |
196 | can only be compiled into the kernel, and the core code (ide.c) can be | 165 | can only be compiled into the kernel, and the core code (ide.c) can be |
@@ -204,9 +173,7 @@ to /etc/modprobe.conf. | |||
204 | 173 | ||
205 | 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 |
206 | driver using the "options=" keyword to insmod, while replacing any ',' with | 175 | driver using the "options=" keyword to insmod, while replacing any ',' with |
207 | ';'. For example: | 176 | ';'. |
208 | |||
209 | insmod ide.o options="ide0=serialize ide1=serialize ide2=0x1e8;0x3ee;11" | ||
210 | 177 | ||
211 | 178 | ||
212 | ================================================================================ | 179 | ================================================================================ |
@@ -214,81 +181,48 @@ driver using the "options=" keyword to insmod, while replacing any ',' with | |||
214 | Summary of ide driver parameters for kernel command line | 181 | Summary of ide driver parameters for kernel command line |
215 | -------------------------------------------------------- | 182 | -------------------------------------------------------- |
216 | 183 | ||
217 | "hdx=" is recognized for all "x" from "a" to "u", such as "hdc". | 184 | For legacy IDE VLB host drivers (ali14xx/dtc2278/ht6560b/qd65xx/umc8672) |
218 | 185 | you need to explicitly enable probing by using "probe" kernel parameter, | |
219 | "idex=" is recognized for all "x" from "0" to "9", such as "ide1". | 186 | i.e. to enable probing for ALI M14xx chipsets (ali14xx host driver) use: |
220 | |||
221 | "hdx=noprobe" : drive may be present, but do not probe for it | ||
222 | |||
223 | "hdx=none" : drive is NOT present, ignore cmos and do not probe | ||
224 | |||
225 | "hdx=nowerr" : ignore the WRERR_STAT bit on this drive | ||
226 | |||
227 | "hdx=cdrom" : drive is present, and is a cdrom drive | ||
228 | |||
229 | "hdx=cyl,head,sect" : disk drive is present, with specified geometry | ||
230 | |||
231 | "hdx=autotune" : driver will attempt to tune interface speed | ||
232 | to the fastest PIO mode supported, | ||
233 | if possible for this drive only. | ||
234 | Not fully supported by all chipset types, | ||
235 | and quite likely to cause trouble with | ||
236 | older/odd IDE drives. | ||
237 | |||
238 | "hdx=nodma" : disallow DMA | ||
239 | |||
240 | "idebus=xx" : inform IDE driver of VESA/PCI bus speed in MHz, | ||
241 | where "xx" is between 20 and 66 inclusive, | ||
242 | used when tuning chipset PIO modes. | ||
243 | For PCI bus, 25 is correct for a P75 system, | ||
244 | 30 is correct for P90,P120,P180 systems, | ||
245 | and 33 is used for P100,P133,P166 systems. | ||
246 | If in doubt, use idebus=33 for PCI. | ||
247 | As for VLB, it is safest to not specify it. | ||
248 | Bigger values are safer than smaller ones. | ||
249 | 187 | ||
250 | "idex=base" : probe for an interface at the addr specified, | 188 | * "ali14xx.probe" boot option when ali14xx driver is built-in the kernel |
251 | where "base" is usually 0x1f0 or 0x170 | ||
252 | and "ctl" is assumed to be "base"+0x206 | ||
253 | 189 | ||
254 | "idex=base,ctl" : specify both base and ctl | 190 | * "probe" module parameter when ali14xx driver is compiled as module |
191 | ("modprobe ali14xx probe") | ||
255 | 192 | ||
256 | "idex=base,ctl,irq" : specify base, ctl, and irq number | 193 | Also for legacy CMD640 host driver (cmd640) you need to use "probe_vlb" |
194 | kernel paremeter to enable probing for VLB version of the chipset (PCI ones | ||
195 | are detected automatically). | ||
257 | 196 | ||
258 | "idex=serialize" : do not overlap operations on idex. Please note | 197 | You also need to use "probe" kernel parameter for ide-4drives driver |
259 | that you will have to specify this option for | 198 | (support for IDE generic chipset with four drives on one port). |
260 | both the respective primary and secondary channel | ||
261 | to take effect. | ||
262 | 199 | ||
263 | "idex=four" : four drives on idex and ide(x^1) share same ports | 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). | ||
264 | 202 | ||
265 | "idex=reset" : reset interface after probe | 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: | ||
266 | 206 | ||
267 | "idex=ata66" : informs the interface that it has an 80c cable | 207 | * "ide_core.ignore_cable=[interface_number]" boot option if IDE is built-in |
268 | for chipsets that are ATA-66 capable, but the | 208 | (i.e. "ide_core.ignore_cable=1" to force ignoring cable for "ide1") |
269 | ability to bit test for detection is currently | ||
270 | unknown. | ||
271 | 209 | ||
272 | "ide=reverse" : formerly called to pci sub-system, but now local. | 210 | * "ignore_cable=[interface_number]" module parameter (for ide_core module) |
211 | if IDE is compiled as module | ||
273 | 212 | ||
274 | "ide=doubler" : probe/support IDE doublers on Amiga | 213 | Other kernel parameters for ide_core are: |
275 | 214 | ||
276 | There may be more options than shown -- use the source, Luke! | 215 | * "nodma=[interface_number.device_number]" to disallow DMA for a device |
277 | 216 | ||
278 | Everything else is rejected with a "BAD OPTION" message. | 217 | * "noflush=[interface_number.device_number]" to disable flush requests |
279 | 218 | ||
280 | For legacy IDE VLB host drivers (ali14xx/dtc2278/ht6560b/qd65xx/umc8672) | 219 | * "noprobe=[interface_number.device_number]" to skip probing |
281 | you need to explicitly enable probing by using "probe" kernel parameter, | ||
282 | i.e. to enable probing for ALI M14xx chipsets (ali14xx host driver) use: | ||
283 | 220 | ||
284 | * "ali14xx.probe" boot option when ali14xx driver is built-in the kernel | 221 | * "nowerr=[interface_number.device_number]" to ignore the WRERR_STAT bit |
285 | 222 | ||
286 | * "probe" module parameter when ali14xx driver is compiled as module | 223 | * "cdrom=[interface_number.device_number]" to force device as a CD-ROM |
287 | ("modprobe ali14xx probe") | ||
288 | 224 | ||
289 | Also for legacy CMD640 host driver (cmd640) you need to use "probe_vlb" | 225 | * "chs=[interface_number.device_number]" to force device as a disk (using CHS) |
290 | kernel paremeter to enable probing for VLB version of the chipset (PCI ones | ||
291 | are detected automatically). | ||
292 | 226 | ||
293 | ================================================================================ | 227 | ================================================================================ |
294 | 228 | ||
diff --git a/Documentation/ide/warm-plug-howto.txt b/Documentation/ide/warm-plug-howto.txt new file mode 100644 index 000000000000..d5885468b072 --- /dev/null +++ b/Documentation/ide/warm-plug-howto.txt | |||
@@ -0,0 +1,13 @@ | |||
1 | |||
2 | IDE warm-plug HOWTO | ||
3 | =================== | ||
4 | |||
5 | To warm-plug devices on a port 'idex': | ||
6 | |||
7 | # echo -n "1" > /sys/class/ide_port/idex/delete_devices | ||
8 | |||
9 | unplug old device(s) and plug new device(s) | ||
10 | |||
11 | # echo -n "1" > /sys/class/ide_port/idex/scan | ||
12 | |||
13 | done | ||
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 dafd001bf833..e5f3d918316f 100644 --- a/Documentation/kernel-parameters.txt +++ b/Documentation/kernel-parameters.txt | |||
@@ -366,6 +366,12 @@ and is between 256 and 4096 characters. It is defined in the file | |||
366 | possible to determine what the correct size should be. | 366 | possible to determine what the correct size should be. |
367 | This option provides an override for these situations. | 367 | This option provides an override for these situations. |
368 | 368 | ||
369 | security= [SECURITY] Choose a security module to enable at boot. | ||
370 | If this boot parameter is not specified, only the first | ||
371 | security module asking for security registration will be | ||
372 | loaded. An invalid security module name will be treated | ||
373 | as if no module has been chosen. | ||
374 | |||
369 | capability.disable= | 375 | capability.disable= |
370 | [SECURITY] Disable capabilities. This would normally | 376 | [SECURITY] Disable capabilities. This would normally |
371 | be used only if an alternative security model is to be | 377 | be used only if an alternative security model is to be |
@@ -763,11 +769,7 @@ and is between 256 and 4096 characters. It is defined in the file | |||
763 | Format: <io>[,<membase>[,<icn_id>[,<icn_id2>]]] | 769 | Format: <io>[,<membase>[,<icn_id>[,<icn_id2>]]] |
764 | 770 | ||
765 | ide= [HW] (E)IDE subsystem | 771 | ide= [HW] (E)IDE subsystem |
766 | Format: ide=nodma or ide=doubler or ide=reverse | 772 | Format: ide=nodma or ide=doubler |
767 | See Documentation/ide/ide.txt. | ||
768 | |||
769 | ide?= [HW] (E)IDE subsystem | ||
770 | Format: ide?=noprobe or chipset specific parameters. | ||
771 | See Documentation/ide/ide.txt. | 773 | See Documentation/ide/ide.txt. |
772 | 774 | ||
773 | idebus= [HW] (E)IDE subsystem - VLB/PCI bus speed | 775 | idebus= [HW] (E)IDE subsystem - VLB/PCI bus speed |
@@ -812,6 +814,19 @@ and is between 256 and 4096 characters. It is defined in the file | |||
812 | 814 | ||
813 | inttest= [IA64] | 815 | inttest= [IA64] |
814 | 816 | ||
817 | iommu= [x86] | ||
818 | off | ||
819 | force | ||
820 | noforce | ||
821 | biomerge | ||
822 | panic | ||
823 | nopanic | ||
824 | merge | ||
825 | nomerge | ||
826 | forcesac | ||
827 | soft | ||
828 | |||
829 | |||
815 | intel_iommu= [DMAR] Intel IOMMU driver (DMAR) option | 830 | intel_iommu= [DMAR] Intel IOMMU driver (DMAR) option |
816 | off | 831 | off |
817 | Disable intel iommu driver. | 832 | Disable intel iommu driver. |
@@ -828,6 +843,10 @@ and is between 256 and 4096 characters. It is defined in the file | |||
828 | than 32 bit addressing. The default is to look | 843 | than 32 bit addressing. The default is to look |
829 | for translation below 32 bit and if not available | 844 | for translation below 32 bit and if not available |
830 | then look in the higher range. | 845 | then look in the higher range. |
846 | strict [Default Off] | ||
847 | With this option on every unmap_single operation will | ||
848 | result in a hardware IOTLB flush operation as opposed | ||
849 | to batching them for performance. | ||
831 | 850 | ||
832 | io_delay= [X86-32,X86-64] I/O delay method | 851 | io_delay= [X86-32,X86-64] I/O delay method |
833 | 0x80 | 852 | 0x80 |
@@ -928,8 +947,15 @@ and is between 256 and 4096 characters. It is defined in the file | |||
928 | kstack=N [X86-32,X86-64] Print N words from the kernel stack | 947 | kstack=N [X86-32,X86-64] Print N words from the kernel stack |
929 | in oops dumps. | 948 | in oops dumps. |
930 | 949 | ||
950 | kgdboc= [HW] kgdb over consoles. | ||
951 | Requires a tty driver that supports console polling. | ||
952 | (only serial suported for now) | ||
953 | Format: <serial_device>[,baud] | ||
954 | |||
931 | l2cr= [PPC] | 955 | l2cr= [PPC] |
932 | 956 | ||
957 | l3cr= [PPC] | ||
958 | |||
933 | lapic [X86-32,APIC] Enable the local APIC even if BIOS | 959 | lapic [X86-32,APIC] Enable the local APIC even if BIOS |
934 | disabled it. | 960 | disabled it. |
935 | 961 | ||
@@ -1134,6 +1160,11 @@ and is between 256 and 4096 characters. It is defined in the file | |||
1134 | or | 1160 | or |
1135 | memmap=0x10000$0x18690000 | 1161 | memmap=0x10000$0x18690000 |
1136 | 1162 | ||
1163 | memtest= [KNL,X86_64] Enable memtest | ||
1164 | Format: <integer> | ||
1165 | range: 0,4 : pattern number | ||
1166 | default : 0 <disable> | ||
1167 | |||
1137 | meye.*= [HW] Set MotionEye Camera parameters | 1168 | meye.*= [HW] Set MotionEye Camera parameters |
1138 | See Documentation/video4linux/meye.txt. | 1169 | See Documentation/video4linux/meye.txt. |
1139 | 1170 | ||
@@ -1251,8 +1282,16 @@ and is between 256 and 4096 characters. It is defined in the file | |||
1251 | noexec [IA-64] | 1282 | noexec [IA-64] |
1252 | 1283 | ||
1253 | noexec [X86-32,X86-64] | 1284 | noexec [X86-32,X86-64] |
1285 | On X86-32 available only on PAE configured kernels. | ||
1254 | noexec=on: enable non-executable mappings (default) | 1286 | noexec=on: enable non-executable mappings (default) |
1255 | noexec=off: disable nn-executable mappings | 1287 | noexec=off: disable non-executable mappings |
1288 | |||
1289 | noexec32 [X86-64] | ||
1290 | This affects only 32-bit executables. | ||
1291 | noexec32=on: enable non-executable mappings (default) | ||
1292 | read doesn't imply executable mappings | ||
1293 | noexec32=off: disable non-executable mappings | ||
1294 | read implies executable mappings | ||
1256 | 1295 | ||
1257 | nofxsr [BUGS=X86-32] Disables x86 floating point extended | 1296 | nofxsr [BUGS=X86-32] Disables x86 floating point extended |
1258 | register save and restore. The kernel will only save | 1297 | register save and restore. The kernel will only save |
@@ -1339,6 +1378,10 @@ and is between 256 and 4096 characters. It is defined in the file | |||
1339 | 1378 | ||
1340 | nowb [ARM] | 1379 | nowb [ARM] |
1341 | 1380 | ||
1381 | nptcg= [IA64] Override max number of concurrent global TLB | ||
1382 | purges which is reported from either PAL_VM_SUMMARY or | ||
1383 | SAL PALO. | ||
1384 | |||
1342 | numa_zonelist_order= [KNL, BOOT] Select zonelist order for NUMA. | 1385 | numa_zonelist_order= [KNL, BOOT] Select zonelist order for NUMA. |
1343 | one of ['zone', 'node', 'default'] can be specified | 1386 | one of ['zone', 'node', 'default'] can be specified |
1344 | This can be set from sysctl after boot. | 1387 | This can be set from sysctl after boot. |
@@ -1428,10 +1471,6 @@ and is between 256 and 4096 characters. It is defined in the file | |||
1428 | nomsi [MSI] If the PCI_MSI kernel config parameter is | 1471 | nomsi [MSI] If the PCI_MSI kernel config parameter is |
1429 | enabled, this kernel boot option can be used to | 1472 | enabled, this kernel boot option can be used to |
1430 | disable the use of MSI interrupts system-wide. | 1473 | disable the use of MSI interrupts system-wide. |
1431 | nosort [X86-32] Don't sort PCI devices according to | ||
1432 | order given by the PCI BIOS. This sorting is | ||
1433 | done to get a device order compatible with | ||
1434 | older kernels. | ||
1435 | biosirq [X86-32] Use PCI BIOS calls to get the interrupt | 1474 | biosirq [X86-32] Use PCI BIOS calls to get the interrupt |
1436 | routing table. These calls are known to be buggy | 1475 | routing table. These calls are known to be buggy |
1437 | on several machines and they hang the machine | 1476 | on several machines and they hang the machine |
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/laptops/acer-wmi.txt b/Documentation/laptops/acer-wmi.txt index 23df051dbf69..79b7dbd22141 100644 --- a/Documentation/laptops/acer-wmi.txt +++ b/Documentation/laptops/acer-wmi.txt | |||
@@ -80,7 +80,7 @@ once you enable the radio, will depend on your hardware and driver combination. | |||
80 | e.g. With the BCM4318 on the Acer Aspire 5020 series: | 80 | e.g. With the BCM4318 on the Acer Aspire 5020 series: |
81 | 81 | ||
82 | ndiswrapper: Light blinks on when transmitting | 82 | ndiswrapper: Light blinks on when transmitting |
83 | bcm43xx/b43: Solid light, blinks off when transmitting | 83 | b43: Solid light, blinks off when transmitting |
84 | 84 | ||
85 | Wireless radio control is unconditionally enabled - all Acer laptops that support | 85 | Wireless radio control is unconditionally enabled - all Acer laptops that support |
86 | acer-wmi come with built-in wireless. However, should you feel so inclined to | 86 | acer-wmi come with built-in wireless. However, should you feel so inclined to |
diff --git a/Documentation/laptops/thinkpad-acpi.txt b/Documentation/laptops/thinkpad-acpi.txt index 76cb428435da..01c6c3d8a7e3 100644 --- a/Documentation/laptops/thinkpad-acpi.txt +++ b/Documentation/laptops/thinkpad-acpi.txt | |||
@@ -1,7 +1,7 @@ | |||
1 | ThinkPad ACPI Extras Driver | 1 | ThinkPad ACPI Extras Driver |
2 | 2 | ||
3 | Version 0.19 | 3 | Version 0.20 |
4 | January 06th, 2008 | 4 | April 09th, 2008 |
5 | 5 | ||
6 | Borislav Deianov <borislav@users.sf.net> | 6 | Borislav Deianov <borislav@users.sf.net> |
7 | Henrique de Moraes Holschuh <hmh@hmh.eng.br> | 7 | Henrique de Moraes Holschuh <hmh@hmh.eng.br> |
@@ -18,6 +18,11 @@ This driver used to be named ibm-acpi until kernel 2.6.21 and release | |||
18 | moved to the drivers/misc tree and renamed to thinkpad-acpi for kernel | 18 | moved to the drivers/misc tree and renamed to thinkpad-acpi for kernel |
19 | 2.6.22, and release 0.14. | 19 | 2.6.22, and release 0.14. |
20 | 20 | ||
21 | The driver is named "thinkpad-acpi". In some places, like module | ||
22 | names, "thinkpad_acpi" is used because of userspace issues. | ||
23 | |||
24 | "tpacpi" is used as a shorthand where "thinkpad-acpi" would be too | ||
25 | long due to length limitations on some Linux kernel versions. | ||
21 | 26 | ||
22 | Status | 27 | Status |
23 | ------ | 28 | ------ |
@@ -571,6 +576,47 @@ netlink interface and the input layer interface, and don't bother at all | |||
571 | with hotkey_report_mode. | 576 | with hotkey_report_mode. |
572 | 577 | ||
573 | 578 | ||
579 | Brightness hotkey notes: | ||
580 | |||
581 | These are the current sane choices for brightness key mapping in | ||
582 | thinkpad-acpi: | ||
583 | |||
584 | For IBM and Lenovo models *without* ACPI backlight control (the ones on | ||
585 | which thinkpad-acpi will autoload its backlight interface by default, | ||
586 | and on which ACPI video does not export a backlight interface): | ||
587 | |||
588 | 1. Don't enable or map the brightness hotkeys in thinkpad-acpi, as | ||
589 | these older firmware versions unfortunately won't respect the hotkey | ||
590 | mask for brightness keys anyway, and always reacts to them. This | ||
591 | usually work fine, unless X.org drivers are doing something to block | ||
592 | the BIOS. In that case, use (3) below. This is the default mode of | ||
593 | operation. | ||
594 | |||
595 | 2. Enable the hotkeys, but map them to something else that is NOT | ||
596 | KEY_BRIGHTNESS_UP/DOWN or any other keycode that would cause | ||
597 | userspace to try to change the backlight level, and use that as an | ||
598 | on-screen-display hint. | ||
599 | |||
600 | 3. IF AND ONLY IF X.org drivers find a way to block the firmware from | ||
601 | automatically changing the brightness, enable the hotkeys and map | ||
602 | them to KEY_BRIGHTNESS_UP and KEY_BRIGHTNESS_DOWN, and feed that to | ||
603 | something that calls xbacklight. thinkpad-acpi will not be able to | ||
604 | change brightness in that case either, so you should disable its | ||
605 | backlight interface. | ||
606 | |||
607 | For Lenovo models *with* ACPI backlight control: | ||
608 | |||
609 | 1. Load up ACPI video and use that. ACPI video will report ACPI | ||
610 | events for brightness change keys. Do not mess with thinkpad-acpi | ||
611 | defaults in this case. thinkpad-acpi should not have anything to do | ||
612 | with backlight events in a scenario where ACPI video is loaded: | ||
613 | brightness hotkeys must be disabled, and the backlight interface is | ||
614 | to be kept disabled as well. This is the default mode of operation. | ||
615 | |||
616 | 2. Do *NOT* load up ACPI video, enable the hotkeys in thinkpad-acpi, | ||
617 | and map them to KEY_BRIGHTNESS_UP and KEY_BRIGHTNESS_DOWN. Process | ||
618 | these keys on userspace somehow (e.g. by calling xbacklight). | ||
619 | |||
574 | Bluetooth | 620 | Bluetooth |
575 | --------- | 621 | --------- |
576 | 622 | ||
@@ -647,16 +693,31 @@ while others are still having problems. For more information: | |||
647 | 693 | ||
648 | https://bugs.freedesktop.org/show_bug.cgi?id=2000 | 694 | https://bugs.freedesktop.org/show_bug.cgi?id=2000 |
649 | 695 | ||
650 | ThinkLight control -- /proc/acpi/ibm/light | 696 | ThinkLight control |
651 | ------------------------------------------ | 697 | ------------------ |
698 | |||
699 | procfs: /proc/acpi/ibm/light | ||
700 | sysfs attributes: as per LED class, for the "tpacpi::thinklight" LED | ||
652 | 701 | ||
653 | The current status of the ThinkLight can be found in this file. A few | 702 | procfs notes: |
654 | models which do not make the status available will show it as | 703 | |
655 | "unknown". The available commands are: | 704 | The ThinkLight status can be read and set through the procfs interface. A |
705 | few models which do not make the status available will show the ThinkLight | ||
706 | status as "unknown". The available commands are: | ||
656 | 707 | ||
657 | echo on > /proc/acpi/ibm/light | 708 | echo on > /proc/acpi/ibm/light |
658 | echo off > /proc/acpi/ibm/light | 709 | echo off > /proc/acpi/ibm/light |
659 | 710 | ||
711 | sysfs notes: | ||
712 | |||
713 | The ThinkLight sysfs interface is documented by the LED class | ||
714 | documentation, in Documentation/leds-class.txt. The ThinkLight LED name | ||
715 | is "tpacpi::thinklight". | ||
716 | |||
717 | Due to limitations in the sysfs LED class, if the status of the thinklight | ||
718 | cannot be read or if it is unknown, thinkpad-acpi will report it as "off". | ||
719 | It is impossible to know if the status returned through sysfs is valid. | ||
720 | |||
660 | Docking / undocking -- /proc/acpi/ibm/dock | 721 | Docking / undocking -- /proc/acpi/ibm/dock |
661 | ------------------------------------------ | 722 | ------------------------------------------ |
662 | 723 | ||
@@ -815,28 +876,63 @@ The cmos command interface is prone to firmware split-brain problems, as | |||
815 | in newer ThinkPads it is just a compatibility layer. Do not use it, it is | 876 | in newer ThinkPads it is just a compatibility layer. Do not use it, it is |
816 | exported just as a debug tool. | 877 | exported just as a debug tool. |
817 | 878 | ||
818 | LED control -- /proc/acpi/ibm/led | 879 | LED control |
819 | --------------------------------- | 880 | ----------- |
881 | |||
882 | procfs: /proc/acpi/ibm/led | ||
883 | sysfs attributes: as per LED class, see below for names | ||
884 | |||
885 | Some of the LED indicators can be controlled through this feature. On | ||
886 | some older ThinkPad models, it is possible to query the status of the | ||
887 | LED indicators as well. Newer ThinkPads cannot query the real status | ||
888 | of the LED indicators. | ||
820 | 889 | ||
821 | Some of the LED indicators can be controlled through this feature. The | 890 | procfs notes: |
822 | available commands are: | 891 | |
892 | The available commands are: | ||
823 | 893 | ||
824 | echo '<led number> on' >/proc/acpi/ibm/led | 894 | echo '<LED number> on' >/proc/acpi/ibm/led |
825 | echo '<led number> off' >/proc/acpi/ibm/led | 895 | echo '<LED number> off' >/proc/acpi/ibm/led |
826 | echo '<led number> blink' >/proc/acpi/ibm/led | 896 | echo '<LED number> blink' >/proc/acpi/ibm/led |
827 | 897 | ||
828 | The <led number> range is 0 to 7. The set of LEDs that can be | 898 | The <LED number> range is 0 to 7. The set of LEDs that can be |
829 | controlled varies from model to model. Here is the mapping on the X40: | 899 | controlled varies from model to model. Here is the common ThinkPad |
900 | mapping: | ||
830 | 901 | ||
831 | 0 - power | 902 | 0 - power |
832 | 1 - battery (orange) | 903 | 1 - battery (orange) |
833 | 2 - battery (green) | 904 | 2 - battery (green) |
834 | 3 - UltraBase | 905 | 3 - UltraBase/dock |
835 | 4 - UltraBay | 906 | 4 - UltraBay |
907 | 5 - UltraBase battery slot | ||
908 | 6 - (unknown) | ||
836 | 7 - standby | 909 | 7 - standby |
837 | 910 | ||
838 | All of the above can be turned on and off and can be made to blink. | 911 | All of the above can be turned on and off and can be made to blink. |
839 | 912 | ||
913 | sysfs notes: | ||
914 | |||
915 | The ThinkPad LED sysfs interface is described in detail by the LED class | ||
916 | documentation, in Documentation/leds-class.txt. | ||
917 | |||
918 | The leds are named (in LED ID order, from 0 to 7): | ||
919 | "tpacpi::power", "tpacpi:orange:batt", "tpacpi:green:batt", | ||
920 | "tpacpi::dock_active", "tpacpi::bay_active", "tpacpi::dock_batt", | ||
921 | "tpacpi::unknown_led", "tpacpi::standby". | ||
922 | |||
923 | Due to limitations in the sysfs LED class, if the status of the LED | ||
924 | indicators cannot be read due to an error, thinkpad-acpi will report it as | ||
925 | a brightness of zero (same as LED off). | ||
926 | |||
927 | If the thinkpad firmware doesn't support reading the current status, | ||
928 | trying to read the current LED brightness will just return whatever | ||
929 | brightness was last written to that attribute. | ||
930 | |||
931 | These LEDs can blink using hardware acceleration. To request that a | ||
932 | ThinkPad indicator LED should blink in hardware accelerated mode, use the | ||
933 | "timer" trigger, and leave the delay_on and delay_off parameters set to | ||
934 | zero (to request hardware acceleration autodetection). | ||
935 | |||
840 | ACPI sounds -- /proc/acpi/ibm/beep | 936 | ACPI sounds -- /proc/acpi/ibm/beep |
841 | ---------------------------------- | 937 | ---------------------------------- |
842 | 938 | ||
@@ -1090,6 +1186,15 @@ it there will be the following attributes: | |||
1090 | dim the display. | 1186 | dim the display. |
1091 | 1187 | ||
1092 | 1188 | ||
1189 | WARNING: | ||
1190 | |||
1191 | Whatever you do, do NOT ever call thinkpad-acpi backlight-level change | ||
1192 | interface and the ACPI-based backlight level change interface | ||
1193 | (available on newer BIOSes, and driven by the Linux ACPI video driver) | ||
1194 | at the same time. The two will interact in bad ways, do funny things, | ||
1195 | and maybe reduce the life of the backlight lamps by needlessly kicking | ||
1196 | its level up and down at every change. | ||
1197 | |||
1093 | Volume control -- /proc/acpi/ibm/volume | 1198 | Volume control -- /proc/acpi/ibm/volume |
1094 | --------------------------------------- | 1199 | --------------------------------------- |
1095 | 1200 | ||
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/magic-number.txt b/Documentation/magic-number.txt index bd450e797558..95070028d15e 100644 --- a/Documentation/magic-number.txt +++ b/Documentation/magic-number.txt | |||
@@ -95,7 +95,6 @@ RFCOMM_TTY_MAGIC 0x6d02 net/bluetooth/rfcomm/tty.c | |||
95 | USB_SERIAL_PORT_MAGIC 0x7301 usb_serial_port drivers/usb/serial/usb-serial.h | 95 | USB_SERIAL_PORT_MAGIC 0x7301 usb_serial_port drivers/usb/serial/usb-serial.h |
96 | CG_MAGIC 0x00090255 ufs_cylinder_group include/linux/ufs_fs.h | 96 | CG_MAGIC 0x00090255 ufs_cylinder_group include/linux/ufs_fs.h |
97 | A2232_MAGIC 0x000a2232 gs_port drivers/char/ser_a2232.h | 97 | A2232_MAGIC 0x000a2232 gs_port drivers/char/ser_a2232.h |
98 | SOLARIS_SOCKET_MAGIC 0x000ADDED sol_socket_struct arch/sparc64/solaris/socksys.h | ||
99 | RPORT_MAGIC 0x00525001 r_port drivers/char/rocket_int.h | 98 | RPORT_MAGIC 0x00525001 r_port drivers/char/rocket_int.h |
100 | LSEMAGIC 0x05091998 lse drivers/fc4/fc.c | 99 | LSEMAGIC 0x05091998 lse drivers/fc4/fc.c |
101 | GDTIOCTL_MAGIC 0x06030f07 gdth_iowr_str drivers/scsi/gdth_ioctl.h | 100 | GDTIOCTL_MAGIC 0x06030f07 gdth_iowr_str drivers/scsi/gdth_ioctl.h |
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/memory-barriers.txt b/Documentation/memory-barriers.txt index 1f506f7830ec..e5a819a4f0c9 100644 --- a/Documentation/memory-barriers.txt +++ b/Documentation/memory-barriers.txt | |||
@@ -430,8 +430,8 @@ There are certain things that the Linux kernel memory barriers do not guarantee: | |||
430 | 430 | ||
431 | [*] For information on bus mastering DMA and coherency please read: | 431 | [*] For information on bus mastering DMA and coherency please read: |
432 | 432 | ||
433 | Documentation/pci.txt | 433 | Documentation/PCI/pci.txt |
434 | Documentation/DMA-mapping.txt | 434 | Documentation/PCI/PCI-DMA-mapping.txt |
435 | Documentation/DMA-API.txt | 435 | Documentation/DMA-API.txt |
436 | 436 | ||
437 | 437 | ||
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/00-INDEX b/Documentation/networking/00-INDEX index c485ee028bd9..1634c6dcecae 100644 --- a/Documentation/networking/00-INDEX +++ b/Documentation/networking/00-INDEX | |||
@@ -100,8 +100,6 @@ tuntap.txt | |||
100 | - TUN/TAP device driver, allowing user space Rx/Tx of packets. | 100 | - TUN/TAP device driver, allowing user space Rx/Tx of packets. |
101 | vortex.txt | 101 | vortex.txt |
102 | - info on using 3Com Vortex (3c590, 3c592, 3c595, 3c597) Ethernet cards. | 102 | - info on using 3Com Vortex (3c590, 3c592, 3c595, 3c597) Ethernet cards. |
103 | wan-router.txt | ||
104 | - WAN router documentation | ||
105 | wavelan.txt | 103 | wavelan.txt |
106 | - AT&T GIS (nee NCR) WaveLAN card: An Ethernet-like radio transceiver | 104 | - AT&T GIS (nee NCR) WaveLAN card: An Ethernet-like radio transceiver |
107 | x25.txt | 105 | x25.txt |
diff --git a/Documentation/networking/bcm43xx.txt b/Documentation/networking/bcm43xx.txt deleted file mode 100644 index d602c8d6ff3e..000000000000 --- a/Documentation/networking/bcm43xx.txt +++ /dev/null | |||
@@ -1,89 +0,0 @@ | |||
1 | |||
2 | BCM43xx Linux Driver Project | ||
3 | ============================ | ||
4 | |||
5 | Introduction | ||
6 | ------------ | ||
7 | |||
8 | Many of the wireless devices found in modern notebook computers are | ||
9 | based on the wireless chips produced by Broadcom. These devices have | ||
10 | been a problem for Linux users as there is no open-source driver | ||
11 | available. In addition, Broadcom has not released specifications | ||
12 | for the device, and driver availability has been limited to the | ||
13 | binary-only form used in the GPL versions of AP hardware such as the | ||
14 | Linksys WRT54G, and the Windows and OS X drivers. Before this project | ||
15 | began, the only way to use these devices were to use the Windows or | ||
16 | OS X drivers with either the Linuxant or ndiswrapper modules. There | ||
17 | is a strong penalty if this method is used as loading the binary-only | ||
18 | module "taints" the kernel, and no kernel developer will help diagnose | ||
19 | any kernel problems. | ||
20 | |||
21 | Development | ||
22 | ----------- | ||
23 | |||
24 | This driver has been developed using | ||
25 | a clean-room technique that is described at | ||
26 | http://bcm-specs.sipsolutions.net/ReverseEngineeringProcess. For legal | ||
27 | reasons, none of the clean-room crew works on the on the Linux driver, | ||
28 | and none of the Linux developers sees anything but the specifications, | ||
29 | which are the ultimate product of the reverse-engineering group. | ||
30 | |||
31 | Software | ||
32 | -------- | ||
33 | |||
34 | Since the release of the 2.6.17 kernel, the bcm43xx driver has been | ||
35 | distributed with the kernel source, and is prebuilt in most, if not | ||
36 | all, distributions. There is, however, additional software that is | ||
37 | required. The firmware used by the chip is the intellectual property | ||
38 | of Broadcom and they have not given the bcm43xx team redistribution | ||
39 | rights to this firmware. Since we cannot legally redistribute | ||
40 | the firmware we cannot include it with the driver. Furthermore, it | ||
41 | cannot be placed in the downloadable archives of any distributing | ||
42 | organization; therefore, the user is responsible for obtaining the | ||
43 | firmware and placing it in the appropriate location so that the driver | ||
44 | can find it when initializing. | ||
45 | |||
46 | To help with this process, the bcm43xx developers provide a separate | ||
47 | program named bcm43xx-fwcutter to "cut" the firmware out of a | ||
48 | Windows or OS X driver and write the extracted files to the proper | ||
49 | location. This program is usually provided with the distribution; | ||
50 | however, it may be downloaded from | ||
51 | |||
52 | http://developer.berlios.de/project/showfiles.php?group_id=4547 | ||
53 | |||
54 | The firmware is available in two versions. V3 firmware is used with | ||
55 | the in-kernel bcm43xx driver that uses a software MAC layer called | ||
56 | SoftMAC, and will have a microcode revision of 0x127 or smaller. The | ||
57 | V4 firmware is used by an out-of-kernel driver employing a variation of | ||
58 | the Devicescape MAC layer known as d80211. Once bcm43xx-d80211 reaches | ||
59 | a satisfactory level of development, it will replace bcm43xx-softmac | ||
60 | in the kernel as it is much more flexible and powerful. | ||
61 | |||
62 | A source for the latest V3 firmware is | ||
63 | |||
64 | http://downloads.openwrt.org/sources/wl_apsta-3.130.20.0.o | ||
65 | |||
66 | Once this file is downloaded, the command | ||
67 | 'bcm43xx-fwcutter -w <dir> <filename>' | ||
68 | will extract the microcode and write it to directory | ||
69 | <dir>. The correct directory will depend on your distribution; | ||
70 | however, most use '/lib/firmware'. Once this step is completed, | ||
71 | the bcm3xx driver should load when the system is booted. To see | ||
72 | any messages relating to the driver, issue the command 'dmesg | | ||
73 | grep bcm43xx' from a terminal window. If there are any problems, | ||
74 | please send that output to Bcm43xx-dev@lists.berlios.de. | ||
75 | |||
76 | Although the driver has been in-kernel since 2.6.17, the earliest | ||
77 | version is quite limited in its capability. Patches that include | ||
78 | all features of later versions are available for the stable kernel | ||
79 | versions from 2.6.18. These will be needed if you use a BCM4318, | ||
80 | or a PCI Express version (BCM4311 and BCM4312). In addition, if you | ||
81 | have an early BCM4306 and more than 1 GB RAM, your kernel will need | ||
82 | to be patched. These patches, which are being updated regularly, | ||
83 | are available at ftp://lwfinger.dynalias.org/patches. Look for | ||
84 | combined_2.6.YY.patch. Of course you will need kernel source downloaded | ||
85 | from kernel.org, or the source from your distribution. | ||
86 | |||
87 | If you build your own kernel, please enable CONFIG_BCM43XX_DEBUG | ||
88 | and CONFIG_IEEE80211_SOFTMAC_DEBUG. The log information provided is | ||
89 | essential for solving any problems. | ||
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/networking/wan-router.txt b/Documentation/networking/wan-router.txt deleted file mode 100644 index bc2ab419a74a..000000000000 --- a/Documentation/networking/wan-router.txt +++ /dev/null | |||
@@ -1,621 +0,0 @@ | |||
1 | ------------------------------------------------------------------------------ | ||
2 | Linux WAN Router Utilities Package | ||
3 | ------------------------------------------------------------------------------ | ||
4 | Version 2.2.1 | ||
5 | Mar 28, 2001 | ||
6 | Author: Nenad Corbic <ncorbic@sangoma.com> | ||
7 | Copyright (c) 1995-2001 Sangoma Technologies Inc. | ||
8 | ------------------------------------------------------------------------------ | ||
9 | |||
10 | INTRODUCTION | ||
11 | |||
12 | Wide Area Networks (WANs) are used to interconnect Local Area Networks (LANs) | ||
13 | and/or stand-alone hosts over vast distances with data transfer rates | ||
14 | significantly higher than those achievable with commonly used dial-up | ||
15 | connections. | ||
16 | |||
17 | Usually an external device called `WAN router' sitting on your local network | ||
18 | or connected to your machine's serial port provides physical connection to | ||
19 | WAN. Although router's job may be as simple as taking your local network | ||
20 | traffic, converting it to WAN format and piping it through the WAN link, these | ||
21 | devices are notoriously expensive, with prices as much as 2 - 5 times higher | ||
22 | then the price of a typical PC box. | ||
23 | |||
24 | Alternatively, considering robustness and multitasking capabilities of Linux, | ||
25 | an internal router can be built (most routers use some sort of stripped down | ||
26 | Unix-like operating system anyway). With a number of relatively inexpensive WAN | ||
27 | interface cards available on the market, a perfectly usable router can be | ||
28 | built for less than half a price of an external router. Yet a Linux box | ||
29 | acting as a router can still be used for other purposes, such as fire-walling, | ||
30 | running FTP, WWW or DNS server, etc. | ||
31 | |||
32 | This kernel module introduces the notion of a WAN Link Driver (WLD) to Linux | ||
33 | operating system and provides generic hardware-independent services for such | ||
34 | drivers. Why can existing Linux network device interface not be used for | ||
35 | this purpose? Well, it can. However, there are a few key differences between | ||
36 | a typical network interface (e.g. Ethernet) and a WAN link. | ||
37 | |||
38 | Many WAN protocols, such as X.25 and frame relay, allow for multiple logical | ||
39 | connections (known as `virtual circuits' in X.25 terminology) over a single | ||
40 | physical link. Each such virtual circuit may (and almost always does) lead | ||
41 | to a different geographical location and, therefore, different network. As a | ||
42 | result, it is the virtual circuit, not the physical link, that represents a | ||
43 | route and, therefore, a network interface in Linux terms. | ||
44 | |||
45 | To further complicate things, virtual circuits are usually volatile in nature | ||
46 | (excluding so called `permanent' virtual circuits or PVCs). With almost no | ||
47 | time required to set up and tear down a virtual circuit, it is highly desirable | ||
48 | to implement on-demand connections in order to minimize network charges. So | ||
49 | unlike a typical network driver, the WAN driver must be able to handle multiple | ||
50 | network interfaces and cope as multiple virtual circuits come into existence | ||
51 | and go away dynamically. | ||
52 | |||
53 | Last, but not least, WAN configuration is much more complex than that of say | ||
54 | Ethernet and may well amount to several dozens of parameters. Some of them | ||
55 | are "link-wide" while others are virtual circuit-specific. The same holds | ||
56 | true for WAN statistics which is by far more extensive and extremely useful | ||
57 | when troubleshooting WAN connections. Extending the ifconfig utility to suit | ||
58 | these needs may be possible, but does not seem quite reasonable. Therefore, a | ||
59 | WAN configuration utility and corresponding application programmer's interface | ||
60 | is needed for this purpose. | ||
61 | |||
62 | Most of these problems are taken care of by this module. Its goal is to | ||
63 | provide a user with more-or-less standard look and feel for all WAN devices and | ||
64 | assist a WAN device driver writer by providing common services, such as: | ||
65 | |||
66 | o User-level interface via /proc file system | ||
67 | o Centralized configuration | ||
68 | o Device management (setup, shutdown, etc.) | ||
69 | o Network interface management (dynamic creation/destruction) | ||
70 | o Protocol encapsulation/decapsulation | ||
71 | |||
72 | To ba able to use the Linux WAN Router you will also need a WAN Tools package | ||
73 | available from | ||
74 | |||
75 | ftp.sangoma.com/pub/linux/current_wanpipe/wanpipe-X.Y.Z.tgz | ||
76 | |||
77 | where vX.Y.Z represent the wanpipe version number. | ||
78 | |||
79 | For technical questions and/or comments please e-mail to ncorbic@sangoma.com. | ||
80 | For general inquiries please contact Sangoma Technologies Inc. by | ||
81 | |||
82 | Hotline: 1-800-388-2475 (USA and Canada, toll free) | ||
83 | Phone: (905) 474-1990 ext: 106 | ||
84 | Fax: (905) 474-9223 | ||
85 | E-mail: dm@sangoma.com (David Mandelstam) | ||
86 | WWW: http://www.sangoma.com | ||
87 | |||
88 | |||
89 | INSTALLATION | ||
90 | |||
91 | Please read the WanpipeForLinux.pdf manual on how to | ||
92 | install the WANPIPE tools and drivers properly. | ||
93 | |||
94 | |||
95 | After installing wanpipe package: /usr/local/wanrouter/doc. | ||
96 | On the ftp.sangoma.com : /linux/current_wanpipe/doc | ||
97 | |||
98 | |||
99 | COPYRIGHT AND LICENSING INFORMATION | ||
100 | |||
101 | This program is free software; you can redistribute it and/or modify it under | ||
102 | the terms of the GNU General Public License as published by the Free Software | ||
103 | Foundation; either version 2, or (at your option) any later version. | ||
104 | |||
105 | This program is distributed in the hope that it will be useful, but WITHOUT | ||
106 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS | ||
107 | FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. | ||
108 | |||
109 | You should have received a copy of the GNU General Public License along with | ||
110 | this program; if not, write to the Free Software Foundation, Inc., 675 Mass | ||
111 | Ave, Cambridge, MA 02139, USA. | ||
112 | |||
113 | |||
114 | |||
115 | ACKNOWLEDGEMENTS | ||
116 | |||
117 | This product is based on the WANPIPE(tm) Multiprotocol WAN Router developed | ||
118 | by Sangoma Technologies Inc. for Linux 2.0.x and 2.2.x. Success of the WANPIPE | ||
119 | together with the next major release of Linux kernel in summer 1996 commanded | ||
120 | adequate changes to the WANPIPE code to take full advantage of new Linux | ||
121 | features. | ||
122 | |||
123 | Instead of continuing developing proprietary interface tied to Sangoma WAN | ||
124 | cards, we decided to separate all hardware-independent code into a separate | ||
125 | module and defined two levels of interfaces - one for user-level applications | ||
126 | and another for kernel-level WAN drivers. WANPIPE is now implemented as a | ||
127 | WAN driver compliant with the WAN Link Driver interface. Also a general | ||
128 | purpose WAN configuration utility and a set of shell scripts was developed to | ||
129 | support WAN router at the user level. | ||
130 | |||
131 | Many useful ideas concerning hardware-independent interface implementation | ||
132 | were given by Mike McLagan <mike.mclagan@linux.org> and his implementation | ||
133 | of the Frame Relay router and drivers for Sangoma cards (dlci/sdla). | ||
134 | |||
135 | With the new implementation of the APIs being incorporated into the WANPIPE, | ||
136 | a special thank goes to Alan Cox in providing insight into BSD sockets. | ||
137 | |||
138 | Special thanks to all the WANPIPE users who performed field-testing, reported | ||
139 | bugs and made valuable comments and suggestions that help us to improve this | ||
140 | product. | ||
141 | |||
142 | |||
143 | |||
144 | NEW IN THIS RELEASE | ||
145 | |||
146 | o Updated the WANCFG utility | ||
147 | Calls the pppconfig to configure the PPPD | ||
148 | for async connections. | ||
149 | |||
150 | o Added the PPPCONFIG utility | ||
151 | Used to configure the PPPD daemon for the | ||
152 | WANPIPE Async PPP and standard serial port. | ||
153 | The wancfg calls the pppconfig to configure | ||
154 | the pppd. | ||
155 | |||
156 | o Fixed the PCI autodetect feature. | ||
157 | The SLOT 0 was used as an autodetect option | ||
158 | however, some high end PC's slot numbers start | ||
159 | from 0. | ||
160 | |||
161 | o This release has been tested with the new backupd | ||
162 | daemon release. | ||
163 | |||
164 | |||
165 | PRODUCT COMPONENTS AND RELATED FILES | ||
166 | |||
167 | /etc: (or user defined) | ||
168 | wanpipe1.conf default router configuration file | ||
169 | |||
170 | /lib/modules/X.Y.Z/misc: | ||
171 | wanrouter.o router kernel loadable module | ||
172 | af_wanpipe.o wanpipe api socket module | ||
173 | |||
174 | /lib/modules/X.Y.Z/net: | ||
175 | sdladrv.o Sangoma SDLA support module | ||
176 | wanpipe.o Sangoma WANPIPE(tm) driver module | ||
177 | |||
178 | /proc/net/wanrouter | ||
179 | Config reads current router configuration | ||
180 | Status reads current router status | ||
181 | {name} reads WAN driver statistics | ||
182 | |||
183 | /usr/sbin: | ||
184 | wanrouter wanrouter start-up script | ||
185 | wanconfig wanrouter configuration utility | ||
186 | sdladump WANPIPE adapter memory dump utility | ||
187 | fpipemon Monitor for Frame Relay | ||
188 | cpipemon Monitor for Cisco HDLC | ||
189 | ppipemon Monitor for PPP | ||
190 | xpipemon Monitor for X25 | ||
191 | wpkbdmon WANPIPE keyboard led monitor/debugger | ||
192 | |||
193 | /usr/local/wanrouter: | ||
194 | README this file | ||
195 | COPYING GNU General Public License | ||
196 | Setup installation script | ||
197 | Filelist distribution definition file | ||
198 | wanrouter.rc meta-configuration file | ||
199 | (used by the Setup and wanrouter script) | ||
200 | |||
201 | /usr/local/wanrouter/doc: | ||
202 | wanpipeForLinux.pdf WAN Router User's Manual | ||
203 | |||
204 | /usr/local/wanrouter/patches: | ||
205 | wanrouter-v2213.gz patch for Linux kernels 2.2.11 up to 2.2.13. | ||
206 | wanrouter-v2214.gz patch for Linux kernel 2.2.14. | ||
207 | wanrouter-v2215.gz patch for Linux kernels 2.2.15 to 2.2.17. | ||
208 | wanrouter-v2218.gz patch for Linux kernels 2.2.18 and up. | ||
209 | wanrouter-v240.gz patch for Linux kernel 2.4.0. | ||
210 | wanrouter-v242.gz patch for Linux kernel 2.4.2 and up. | ||
211 | wanrouter-v2034.gz patch for Linux kernel 2.0.34 | ||
212 | wanrouter-v2036.gz patch for Linux kernel 2.0.36 and up. | ||
213 | |||
214 | /usr/local/wanrouter/patches/kdrivers: | ||
215 | Sources of the latest WANPIPE device drivers. | ||
216 | These are used to UPGRADE the linux kernel to the newest | ||
217 | version if the kernel source has already been patched with | ||
218 | WANPIPE drivers. | ||
219 | |||
220 | /usr/local/wanrouter/samples: | ||
221 | interface sample interface configuration file | ||
222 | wanpipe1.cpri CHDLC primary port | ||
223 | wanpipe2.csec CHDLC secondary port | ||
224 | wanpipe1.fr Frame Relay protocol | ||
225 | wanpipe1.ppp PPP protocol ) | ||
226 | wanpipe1.asy CHDLC ASYNC protocol | ||
227 | wanpipe1.x25 X25 protocol | ||
228 | wanpipe1.stty Sync TTY driver (Used by Kernel PPPD daemon) | ||
229 | wanpipe1.atty Async TTY driver (Used by Kernel PPPD daemon) | ||
230 | wanrouter.rc sample meta-configuration file | ||
231 | |||
232 | /usr/local/wanrouter/util: | ||
233 | * wan-tools utilities source code | ||
234 | |||
235 | /usr/local/wanrouter/api/x25: | ||
236 | * x25 api sample programs. | ||
237 | /usr/local/wanrouter/api/chdlc: | ||
238 | * chdlc api sample programs. | ||
239 | /usr/local/wanrouter/api/fr: | ||
240 | * fr api sample programs. | ||
241 | /usr/local/wanrouter/config/wancfg: | ||
242 | wancfg WANPIPE GUI configuration program. | ||
243 | Creates wanpipe#.conf files. | ||
244 | /usr/local/wanrouter/config/cfgft1: | ||
245 | cfgft1 GUI CSU/DSU configuration program. | ||
246 | |||
247 | /usr/include/linux: | ||
248 | wanrouter.h router API definitions | ||
249 | wanpipe.h WANPIPE API definitions | ||
250 | sdladrv.h SDLA support module API definitions | ||
251 | sdlasfm.h SDLA firmware module definitions | ||
252 | if_wanpipe.h WANPIPE Socket definitions | ||
253 | sdlapci.h WANPIPE PCI definitions | ||
254 | |||
255 | |||
256 | /usr/src/linux/net/wanrouter: | ||
257 | * wanrouter source code | ||
258 | |||
259 | /var/log: | ||
260 | wanrouter wanrouter start-up log (created by the Setup script) | ||
261 | |||
262 | /var/lock: (or /var/lock/subsys for RedHat) | ||
263 | wanrouter wanrouter lock file (created by the Setup script) | ||
264 | |||
265 | /usr/local/wanrouter/firmware: | ||
266 | fr514.sfm Frame relay firmware for Sangoma S508/S514 card | ||
267 | cdual514.sfm Dual Port Cisco HDLC firmware for Sangoma S508/S514 card | ||
268 | ppp514.sfm PPP Firmware for Sangoma S508 and S514 cards | ||
269 | x25_508.sfm X25 Firmware for Sangoma S508 card. | ||
270 | |||
271 | |||
272 | REVISION HISTORY | ||
273 | |||
274 | 1.0.0 December 31, 1996 Initial version | ||
275 | |||
276 | 1.0.1 January 30, 1997 Status and statistics can be read via /proc | ||
277 | filesystem entries. | ||
278 | |||
279 | 1.0.2 April 30, 1997 Added UDP management via monitors. | ||
280 | |||
281 | 1.0.3 June 3, 1997 UDP management for multiple boards using Frame | ||
282 | Relay and PPP | ||
283 | Enabled continuous transmission of Configure | ||
284 | Request Packet for PPP (for 508 only) | ||
285 | Connection Timeout for PPP changed from 900 to 0 | ||
286 | Flow Control Problem fixed for Frame Relay | ||
287 | |||
288 | 1.0.4 July 10, 1997 S508/FT1 monitoring capability in fpipemon and | ||
289 | ppipemon utilities. | ||
290 | Configurable TTL for UDP packets. | ||
291 | Multicast and Broadcast IP source addresses are | ||
292 | silently discarded. | ||
293 | |||
294 | 1.0.5 July 28, 1997 Configurable T391,T392,N391,N392,N393 for Frame | ||
295 | Relay in router.conf. | ||
296 | Configurable Memory Address through router.conf | ||
297 | for Frame Relay, PPP and X.25. (commenting this | ||
298 | out enables auto-detection). | ||
299 | Fixed freeing up received buffers using kfree() | ||
300 | for Frame Relay and X.25. | ||
301 | Protect sdla_peek() by calling save_flags(), | ||
302 | cli() and restore_flags(). | ||
303 | Changed number of Trace elements from 32 to 20 | ||
304 | Added DLCI specific data monitoring in FPIPEMON. | ||
305 | 2.0.0 Nov 07, 1997 Implemented protection of RACE conditions by | ||
306 | critical flags for FRAME RELAY and PPP. | ||
307 | DLCI List interrupt mode implemented. | ||
308 | IPX support in FRAME RELAY and PPP. | ||
309 | IPX Server Support (MARS) | ||
310 | More driver specific stats included in FPIPEMON | ||
311 | and PIPEMON. | ||
312 | |||
313 | 2.0.1 Nov 28, 1997 Bug Fixes for version 2.0.0. | ||
314 | Protection of "enable_irq()" while | ||
315 | "disable_irq()" has been enabled from any other | ||
316 | routine (for Frame Relay, PPP and X25). | ||
317 | Added additional Stats for Fpipemon and Ppipemon | ||
318 | Improved Load Sharing for multiple boards | ||
319 | |||
320 | 2.0.2 Dec 09, 1997 Support for PAP and CHAP for ppp has been | ||
321 | implemented. | ||
322 | |||
323 | 2.0.3 Aug 15, 1998 New release supporting Cisco HDLC, CIR for Frame | ||
324 | relay, Dynamic IP assignment for PPP and Inverse | ||
325 | Arp support for Frame-relay. Man Pages are | ||
326 | included for better support and a new utility | ||
327 | for configuring FT1 cards. | ||
328 | |||
329 | 2.0.4 Dec 09, 1998 Dual Port support for Cisco HDLC. | ||
330 | Support for HDLC (LAPB) API. | ||
331 | Supports BiSync Streaming code for S502E | ||
332 | and S503 cards. | ||
333 | Support for Streaming HDLC API. | ||
334 | Provides a BSD socket interface for | ||
335 | creating applications using BiSync | ||
336 | streaming. | ||
337 | |||
338 | 2.0.5 Aug 04, 1999 CHDLC initialization bug fix. | ||
339 | PPP interrupt driven driver: | ||
340 | Fix to the PPP line hangup problem. | ||
341 | New PPP firmware | ||
342 | Added comments to the startup SYSTEM ERROR messages | ||
343 | Xpipemon debugging application for the X25 protocol | ||
344 | New USER_MANUAL.txt | ||
345 | Fixed the odd boundary 4byte writes to the board. | ||
346 | BiSync Streaming code has been taken out. | ||
347 | Available as a patch. | ||
348 | Streaming HDLC API has been taken out. | ||
349 | Available as a patch. | ||
350 | |||
351 | 2.0.6 Aug 17, 1999 Increased debugging in statup scripts | ||
352 | Fixed installation bugs from 2.0.5 | ||
353 | Kernel patch works for both 2.2.10 and 2.2.11 kernels. | ||
354 | There is no functional difference between the two packages | ||
355 | |||
356 | 2.0.7 Aug 26, 1999 o Merged X25API code into WANPIPE. | ||
357 | o Fixed a memory leak for X25API | ||
358 | o Updated the X25API code for 2.2.X kernels. | ||
359 | o Improved NEM handling. | ||
360 | |||
361 | 2.1.0 Oct 25, 1999 o New code for S514 PCI Card | ||
362 | o New CHDLC and Frame Relay drivers | ||
363 | o PPP and X25 are not supported in this release | ||
364 | |||
365 | 2.1.1 Nov 30, 1999 o PPP support for S514 PCI Cards | ||
366 | |||
367 | 2.1.3 Apr 06, 2000 o Socket based x25api | ||
368 | o Socket based chdlc api | ||
369 | o Socket based fr api | ||
370 | o Dual Port Receive only CHDLC support. | ||
371 | o Asynchronous CHDLC support (Secondary Port) | ||
372 | o cfgft1 GUI csu/dsu configurator | ||
373 | o wancfg GUI configuration file | ||
374 | configurator. | ||
375 | o Architectural directory changes. | ||
376 | |||
377 | beta-2.1.4 Jul 2000 o Dynamic interface configuration: | ||
378 | Network interfaces reflect the state | ||
379 | of protocol layer. If the protocol becomes | ||
380 | disconnected, driver will bring down | ||
381 | the interface. Once the protocol reconnects | ||
382 | the interface will be brought up. | ||
383 | |||
384 | Note: This option is turned off by default. | ||
385 | |||
386 | o Dynamic wanrouter setup using 'wanconfig': | ||
387 | wanconfig utility can be used to | ||
388 | shutdown,restart,start or reconfigure | ||
389 | a virtual circuit dynamically. | ||
390 | |||
391 | Frame Relay: Each DLCI can be: | ||
392 | created,stopped,restarted and reconfigured | ||
393 | dynamically using wanconfig. | ||
394 | |||
395 | ex: wanconfig card wanpipe1 dev wp1_fr16 up | ||
396 | |||
397 | o Wanrouter startup via command line arguments: | ||
398 | wanconfig also supports wanrouter startup via command line | ||
399 | arguments. Thus, there is no need to create a wanpipe#.conf | ||
400 | configuration file. | ||
401 | |||
402 | o Socket based x25api update/bug fixes. | ||
403 | Added support for LCN numbers greater than 255. | ||
404 | Option to pass up modem messages. | ||
405 | Provided a PCI IRQ check, so a single S514 | ||
406 | card is guaranteed to have a non-sharing interrupt. | ||
407 | |||
408 | o Fixes to the wancfg utility. | ||
409 | o New FT1 debugging support via *pipemon utilities. | ||
410 | o Frame Relay ARP support Enabled. | ||
411 | |||
412 | beta3-2.1.4 Jul 2000 o X25 M_BIT Problem fix. | ||
413 | o Added the Multi-Port PPP | ||
414 | Updated utilities for the Multi-Port PPP. | ||
415 | |||
416 | 2.1.4 Aut 2000 | ||
417 | o In X25API: | ||
418 | Maximum packet an application can send | ||
419 | to the driver has been extended to 4096 bytes. | ||
420 | |||
421 | Fixed the x25 startup bug. Enable | ||
422 | communications only after all interfaces | ||
423 | come up. HIGH SVC/PVC is used to calculate | ||
424 | the number of channels. | ||
425 | Enable protocol only after all interfaces | ||
426 | are enabled. | ||
427 | |||
428 | o Added an extra state to the FT1 config, kernel module. | ||
429 | o Updated the pipemon debuggers. | ||
430 | |||
431 | o Blocked the Multi-Port PPP from running on kernels | ||
432 | 2.2.16 or greater, due to syncppp kernel module | ||
433 | change. | ||
434 | |||
435 | beta1-2.1.5 Nov 15 2000 | ||
436 | o Fixed the MultiPort PPP Support for kernels 2.2.16 and above. | ||
437 | 2.2.X kernels only | ||
438 | |||
439 | o Secured the driver UDP debugging calls | ||
440 | - All illegal network debugging calls are reported to | ||
441 | the log. | ||
442 | - Defined a set of allowed commands, all other denied. | ||
443 | |||
444 | o Cpipemon | ||
445 | - Added set FT1 commands to the cpipemon. Thus CSU/DSU | ||
446 | configuration can be performed using cpipemon. | ||
447 | All systems that cannot run cfgft1 GUI utility should | ||
448 | use cpipemon to configure the on board CSU/DSU. | ||
449 | |||
450 | |||
451 | o Keyboard Led Monitor/Debugger | ||
452 | - A new utility /usr/sbin/wpkbdmon uses keyboard leds | ||
453 | to convey operational statistic information of the | ||
454 | Sangoma WANPIPE cards. | ||
455 | NUM_LOCK = Line State (On=connected, Off=disconnected) | ||
456 | CAPS_LOCK = Tx data (On=transmitting, Off=no tx data) | ||
457 | SCROLL_LOCK = Rx data (On=receiving, Off=no rx data | ||
458 | |||
459 | o Hardware probe on module load and dynamic device allocation | ||
460 | - During WANPIPE module load, all Sangoma cards are probed | ||
461 | and found information is printed in the /var/log/messages. | ||
462 | - If no cards are found, the module load fails. | ||
463 | - Appropriate number of devices are dynamically loaded | ||
464 | based on the number of Sangoma cards found. | ||
465 | |||
466 | Note: The kernel configuration option | ||
467 | CONFIG_WANPIPE_CARDS has been taken out. | ||
468 | |||
469 | o Fixed the Frame Relay and Chdlc network interfaces so they are | ||
470 | compatible with libpcap libraries. Meaning, tcpdump, snort, | ||
471 | ethereal, and all other packet sniffers and debuggers work on | ||
472 | all WANPIPE network interfaces. | ||
473 | - Set the network interface encoding type to ARPHRD_PPP. | ||
474 | This tell the sniffers that data obtained from the | ||
475 | network interface is in pure IP format. | ||
476 | Fix for 2.2.X kernels only. | ||
477 | |||
478 | o True interface encoding option for Frame Relay and CHDLC | ||
479 | - The above fix sets the network interface encoding | ||
480 | type to ARPHRD_PPP, however some customers use | ||
481 | the encoding interface type to determine the | ||
482 | protocol running. Therefore, the TURE ENCODING | ||
483 | option will set the interface type back to the | ||
484 | original value. | ||
485 | |||
486 | NOTE: If this option is used with Frame Relay and CHDLC | ||
487 | libpcap library support will be broken. | ||
488 | i.e. tcpdump will not work. | ||
489 | Fix for 2.2.x Kernels only. | ||
490 | |||
491 | o Ethernet Bridgind over Frame Relay | ||
492 | - The Frame Relay bridging has been developed by | ||
493 | Kristian Hoffmann and Mark Wells. | ||
494 | - The Linux kernel bridge is used to send ethernet | ||
495 | data over the frame relay links. | ||
496 | For 2.2.X Kernels only. | ||
497 | |||
498 | o Added extensive 2.0.X support. Most new features of | ||
499 | 2.1.5 for protocols Frame Relay, PPP and CHDLC are | ||
500 | supported under 2.0.X kernels. | ||
501 | |||
502 | beta1-2.2.0 Dec 30 2000 | ||
503 | o Updated drivers for 2.4.X kernels. | ||
504 | o Updated drivers for SMP support. | ||
505 | o X25API is now able to share PCI interrupts. | ||
506 | o Took out a general polling routine that was used | ||
507 | only by X25API. | ||
508 | o Added appropriate locks to the dynamic reconfiguration | ||
509 | code. | ||
510 | o Fixed a bug in the keyboard debug monitor. | ||
511 | |||
512 | beta2-2.2.0 Jan 8 2001 | ||
513 | o Patches for 2.4.0 kernel | ||
514 | o Patches for 2.2.18 kernel | ||
515 | o Minor updates to PPP and CHLDC drivers. | ||
516 | Note: No functional difference. | ||
517 | |||
518 | beta3-2.2.9 Jan 10 2001 | ||
519 | o I missed the 2.2.18 kernel patches in beta2-2.2.0 | ||
520 | release. They are included in this release. | ||
521 | |||
522 | Stable Release | ||
523 | 2.2.0 Feb 01 2001 | ||
524 | o Bug fix in wancfg GUI configurator. | ||
525 | The edit function didn't work properly. | ||
526 | |||
527 | |||
528 | bata1-2.2.1 Feb 09 2001 | ||
529 | o WANPIPE TTY Driver emulation. | ||
530 | Two modes of operation Sync and Async. | ||
531 | Sync: Using the PPPD daemon, kernel SyncPPP layer | ||
532 | and the Wanpipe sync TTY driver: a PPP protocol | ||
533 | connection can be established via Sangoma adapter, over | ||
534 | a T1 leased line. | ||
535 | |||
536 | The 2.4.0 kernel PPP layer supports MULTILINK | ||
537 | protocol, that can be used to bundle any number of Sangoma | ||
538 | adapters (T1 lines) into one, under a single IP address. | ||
539 | Thus, efficiently obtaining multiple T1 throughput. | ||
540 | |||
541 | NOTE: The remote side must also implement MULTILINK PPP | ||
542 | protocol. | ||
543 | |||
544 | Async:Using the PPPD daemon, kernel AsyncPPP layer | ||
545 | and the WANPIPE async TTY driver: a PPP protocol | ||
546 | connection can be established via Sangoma adapter and | ||
547 | a modem, over a telephone line. | ||
548 | |||
549 | Thus, the WANPIPE async TTY driver simulates a serial | ||
550 | TTY driver that would normally be used to interface the | ||
551 | MODEM to the linux kernel. | ||
552 | |||
553 | o WANPIPE PPP Backup Utility | ||
554 | This utility will monitor the state of the PPP T1 line. | ||
555 | In case of failure, a dial up connection will be established | ||
556 | via pppd daemon, ether via a serial tty driver (serial port), | ||
557 | or a WANPIPE async TTY driver (in case serial port is unavailable). | ||
558 | |||
559 | Furthermore, while in dial up mode, the primary PPP T1 link | ||
560 | will be monitored for signs of life. | ||
561 | |||
562 | If the PPP T1 link comes back to life, the dial up connection | ||
563 | will be shutdown and T1 line re-established. | ||
564 | |||
565 | |||
566 | o New Setup installation script. | ||
567 | Option to UPGRADE device drivers if the kernel source has | ||
568 | already been patched with WANPIPE. | ||
569 | |||
570 | Option to COMPILE WANPIPE modules against the currently | ||
571 | running kernel, thus no need for manual kernel and module | ||
572 | re-compilation. | ||
573 | |||
574 | o Updates and Bug Fixes to wancfg utility. | ||
575 | |||
576 | bata2-2.2.1 Feb 20 2001 | ||
577 | |||
578 | o Bug fixes to the CHDLC device drivers. | ||
579 | The driver had compilation problems under kernels | ||
580 | 2.2.14 or lower. | ||
581 | |||
582 | o Bug fixes to the Setup installation script. | ||
583 | The device drivers compilation options didn't work | ||
584 | properly. | ||
585 | |||
586 | o Update to the wpbackupd daemon. | ||
587 | Optimized the cross-over times, between the primary | ||
588 | link and the backup dialup. | ||
589 | |||
590 | beta3-2.2.1 Mar 02 2001 | ||
591 | o Patches for 2.4.2 kernel. | ||
592 | |||
593 | o Bug fixes to util/ make files. | ||
594 | o Bug fixes to the Setup installation script. | ||
595 | |||
596 | o Took out the backupd support and made it into | ||
597 | as separate package. | ||
598 | |||
599 | beta4-2.2.1 Mar 12 2001 | ||
600 | |||
601 | o Fix to the Frame Relay Device driver. | ||
602 | IPSAC sends a packet of zero length | ||
603 | header to the frame relay driver. The | ||
604 | driver tries to push its own 2 byte header | ||
605 | into the packet, which causes the driver to | ||
606 | crash. | ||
607 | |||
608 | o Fix the WANPIPE re-configuration code. | ||
609 | Bug was found by trying to run the cfgft1 while the | ||
610 | interface was already running. | ||
611 | |||
612 | o Updates to cfgft1. | ||
613 | Writes a wanpipe#.cfgft1 configuration file | ||
614 | once the CSU/DSU is configured. This file can | ||
615 | holds the current CSU/DSU configuration. | ||
616 | |||
617 | |||
618 | |||
619 | >>>>>> END OF README <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< | ||
620 | |||
621 | |||
diff --git a/Documentation/power/devices.txt b/Documentation/power/devices.txt index 461e4f1dbec4..421e7d00ffd0 100644 --- a/Documentation/power/devices.txt +++ b/Documentation/power/devices.txt | |||
@@ -196,6 +196,11 @@ its parent; and can't be removed or suspended after that parent. | |||
196 | 196 | ||
197 | The policy is that the device tree should match hardware bus topology. | 197 | The policy is that the device tree should match hardware bus topology. |
198 | (Or at least the control bus, for devices which use multiple busses.) | 198 | (Or at least the control bus, for devices which use multiple busses.) |
199 | In particular, this means that a device registration may fail if the parent of | ||
200 | the device is suspending (ie. has been chosen by the PM core as the next | ||
201 | device to suspend) or has already suspended, as well as after all of the other | ||
202 | devices have been suspended. Device drivers must be prepared to cope with such | ||
203 | situations. | ||
199 | 204 | ||
200 | 205 | ||
201 | Suspending Devices | 206 | Suspending Devices |
diff --git a/Documentation/powerpc/booting-without-of.txt b/Documentation/powerpc/booting-without-of.txt index 7b4e8a70882c..1d2a772506cf 100644 --- a/Documentation/powerpc/booting-without-of.txt +++ b/Documentation/powerpc/booting-without-of.txt | |||
@@ -59,12 +59,39 @@ Table of Contents | |||
59 | p) Freescale Synchronous Serial Interface | 59 | p) Freescale Synchronous Serial Interface |
60 | q) USB EHCI controllers | 60 | q) USB EHCI controllers |
61 | 61 | ||
62 | VII - Specifying interrupt information for devices | 62 | VII - Marvell Discovery mv64[345]6x System Controller chips |
63 | 1) The /system-controller node | ||
64 | 2) Child nodes of /system-controller | ||
65 | a) Marvell Discovery MDIO bus | ||
66 | b) Marvell Discovery ethernet controller | ||
67 | c) Marvell Discovery PHY nodes | ||
68 | d) Marvell Discovery SDMA nodes | ||
69 | e) Marvell Discovery BRG nodes | ||
70 | f) Marvell Discovery CUNIT nodes | ||
71 | g) Marvell Discovery MPSCROUTING nodes | ||
72 | h) Marvell Discovery MPSCINTR nodes | ||
73 | i) Marvell Discovery MPSC nodes | ||
74 | j) Marvell Discovery Watch Dog Timer nodes | ||
75 | k) Marvell Discovery I2C nodes | ||
76 | l) Marvell Discovery PIC (Programmable Interrupt Controller) nodes | ||
77 | m) Marvell Discovery MPP (Multipurpose Pins) multiplexing nodes | ||
78 | n) Marvell Discovery GPP (General Purpose Pins) nodes | ||
79 | o) Marvell Discovery PCI host bridge node | ||
80 | p) Marvell Discovery CPU Error nodes | ||
81 | q) Marvell Discovery SRAM Controller nodes | ||
82 | r) Marvell Discovery PCI Error Handler nodes | ||
83 | s) Marvell Discovery Memory Controller nodes | ||
84 | |||
85 | VIII - Specifying interrupt information for devices | ||
63 | 1) interrupts property | 86 | 1) interrupts property |
64 | 2) interrupt-parent property | 87 | 2) interrupt-parent property |
65 | 3) OpenPIC Interrupt Controllers | 88 | 3) OpenPIC Interrupt Controllers |
66 | 4) ISA Interrupt Controllers | 89 | 4) ISA Interrupt Controllers |
67 | 90 | ||
91 | VIII - Specifying GPIO information for devices | ||
92 | 1) gpios property | ||
93 | 2) gpio-controller nodes | ||
94 | |||
68 | Appendix A - Sample SOC node for MPC8540 | 95 | Appendix A - Sample SOC node for MPC8540 |
69 | 96 | ||
70 | 97 | ||
@@ -1269,10 +1296,6 @@ platforms are moved over to use the flattened-device-tree model. | |||
1269 | 1296 | ||
1270 | Recommended properties: | 1297 | Recommended properties: |
1271 | 1298 | ||
1272 | - linux,network-index : This is the intended "index" of this | ||
1273 | network device. This is used by the bootwrapper to interpret | ||
1274 | MAC addresses passed by the firmware when no information other | ||
1275 | than indices is available to associate an address with a device. | ||
1276 | - phy-connection-type : a string naming the controller/PHY interface type, | 1299 | - phy-connection-type : a string naming the controller/PHY interface type, |
1277 | i.e., "mii" (default), "rmii", "gmii", "rgmii", "rgmii-id", "sgmii", | 1300 | i.e., "mii" (default), "rmii", "gmii", "rgmii", "rgmii-id", "sgmii", |
1278 | "tbi", or "rtbi". This property is only really needed if the connection | 1301 | "tbi", or "rtbi". This property is only really needed if the connection |
@@ -1622,8 +1645,7 @@ platforms are moved over to use the flattened-device-tree model. | |||
1622 | - device_type : should be "network", "hldc", "uart", "transparent" | 1645 | - device_type : should be "network", "hldc", "uart", "transparent" |
1623 | "bisync", "atm", or "serial". | 1646 | "bisync", "atm", or "serial". |
1624 | - compatible : could be "ucc_geth" or "fsl_atm" and so on. | 1647 | - compatible : could be "ucc_geth" or "fsl_atm" and so on. |
1625 | - model : should be "UCC". | 1648 | - cell-index : the ucc number(1-8), corresponding to UCCx in UM. |
1626 | - device-id : the ucc number(1-8), corresponding to UCCx in UM. | ||
1627 | - reg : Offset and length of the register set for the device | 1649 | - reg : Offset and length of the register set for the device |
1628 | - interrupts : <a b> where a is the interrupt number and b is a | 1650 | - interrupts : <a b> where a is the interrupt number and b is a |
1629 | field that represents an encoding of the sense and level | 1651 | field that represents an encoding of the sense and level |
@@ -1667,10 +1689,6 @@ platforms are moved over to use the flattened-device-tree model. | |||
1667 | - phy-handle : The phandle for the PHY connected to this controller. | 1689 | - phy-handle : The phandle for the PHY connected to this controller. |
1668 | 1690 | ||
1669 | Recommended properties: | 1691 | Recommended properties: |
1670 | - linux,network-index : This is the intended "index" of this | ||
1671 | network device. This is used by the bootwrapper to interpret | ||
1672 | MAC addresses passed by the firmware when no information other | ||
1673 | than indices is available to associate an address with a device. | ||
1674 | - phy-connection-type : a string naming the controller/PHY interface type, | 1692 | - phy-connection-type : a string naming the controller/PHY interface type, |
1675 | i.e., "mii" (default), "rmii", "gmii", "rgmii", "rgmii-id" (Internal | 1693 | i.e., "mii" (default), "rmii", "gmii", "rgmii", "rgmii-id" (Internal |
1676 | Delay), "rgmii-txid" (delay on TX only), "rgmii-rxid" (delay on RX only), | 1694 | Delay), "rgmii-txid" (delay on TX only), "rgmii-rxid" (delay on RX only), |
@@ -1680,8 +1698,7 @@ platforms are moved over to use the flattened-device-tree model. | |||
1680 | ucc@2000 { | 1698 | ucc@2000 { |
1681 | device_type = "network"; | 1699 | device_type = "network"; |
1682 | compatible = "ucc_geth"; | 1700 | compatible = "ucc_geth"; |
1683 | model = "UCC"; | 1701 | cell-index = <1>; |
1684 | device-id = <1>; | ||
1685 | reg = <2000 200>; | 1702 | reg = <2000 200>; |
1686 | interrupts = <a0 0>; | 1703 | interrupts = <a0 0>; |
1687 | interrupt-parent = <700>; | 1704 | interrupt-parent = <700>; |
@@ -1995,7 +2012,6 @@ platforms are moved over to use the flattened-device-tree model. | |||
1995 | interrupts = <20 8>; | 2012 | interrupts = <20 8>; |
1996 | interrupt-parent = <&PIC>; | 2013 | interrupt-parent = <&PIC>; |
1997 | phy-handle = <&PHY0>; | 2014 | phy-handle = <&PHY0>; |
1998 | linux,network-index = <0>; | ||
1999 | fsl,cpm-command = <12000300>; | 2015 | fsl,cpm-command = <12000300>; |
2000 | }; | 2016 | }; |
2001 | 2017 | ||
@@ -2217,12 +2233,6 @@ platforms are moved over to use the flattened-device-tree model. | |||
2217 | EMAC, that is the content of the current (bogus) "phy-port" | 2233 | EMAC, that is the content of the current (bogus) "phy-port" |
2218 | property. | 2234 | property. |
2219 | 2235 | ||
2220 | Recommended properties: | ||
2221 | - linux,network-index : This is the intended "index" of this | ||
2222 | network device. This is used by the bootwrapper to interpret | ||
2223 | MAC addresses passed by the firmware when no information other | ||
2224 | than indices is available to associate an address with a device. | ||
2225 | |||
2226 | Optional properties: | 2236 | Optional properties: |
2227 | - phy-address : 1 cell, optional, MDIO address of the PHY. If absent, | 2237 | - phy-address : 1 cell, optional, MDIO address of the PHY. If absent, |
2228 | a search is performed. | 2238 | a search is performed. |
@@ -2246,7 +2256,6 @@ platforms are moved over to use the flattened-device-tree model. | |||
2246 | Example: | 2256 | Example: |
2247 | 2257 | ||
2248 | EMAC0: ethernet@40000800 { | 2258 | EMAC0: ethernet@40000800 { |
2249 | linux,network-index = <0>; | ||
2250 | device_type = "network"; | 2259 | device_type = "network"; |
2251 | compatible = "ibm,emac-440gp", "ibm,emac"; | 2260 | compatible = "ibm,emac-440gp", "ibm,emac"; |
2252 | interrupt-parent = <&UIC1>; | 2261 | interrupt-parent = <&UIC1>; |
@@ -2592,6 +2601,17 @@ platforms are moved over to use the flattened-device-tree model. | |||
2592 | differ between different families. May be | 2601 | differ between different families. May be |
2593 | 'virtex2p', 'virtex4', or 'virtex5'. | 2602 | 'virtex2p', 'virtex4', or 'virtex5'. |
2594 | 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 | |||
2595 | p) Freescale Synchronous Serial Interface | 2615 | p) Freescale Synchronous Serial Interface |
2596 | 2616 | ||
2597 | 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 |
@@ -2816,10 +2836,562 @@ platforms are moved over to use the flattened-device-tree model. | |||
2816 | big-endian; | 2836 | big-endian; |
2817 | }; | 2837 | }; |
2818 | 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 | }; | ||
2872 | |||
2873 | VII - Marvell Discovery mv64[345]6x System Controller chips | ||
2874 | =========================================================== | ||
2875 | |||
2876 | The Marvell mv64[345]60 series of system controller chips contain | ||
2877 | many of the peripherals needed to implement a complete computer | ||
2878 | system. In this section, we define device tree nodes to describe | ||
2879 | the system controller chip itself and each of the peripherals | ||
2880 | which it contains. Compatible string values for each node are | ||
2881 | prefixed with the string "marvell,", for Marvell Technology Group Ltd. | ||
2882 | |||
2883 | 1) The /system-controller node | ||
2884 | |||
2885 | This node is used to represent the system-controller and must be | ||
2886 | present when the system uses a system contller chip. The top-level | ||
2887 | system-controller node contains information that is global to all | ||
2888 | devices within the system controller chip. The node name begins | ||
2889 | with "system-controller" followed by the unit address, which is | ||
2890 | the base address of the memory-mapped register set for the system | ||
2891 | controller chip. | ||
2892 | |||
2893 | Required properties: | ||
2894 | |||
2895 | - ranges : Describes the translation of system controller addresses | ||
2896 | for memory mapped registers. | ||
2897 | - clock-frequency: Contains the main clock frequency for the system | ||
2898 | controller chip. | ||
2899 | - reg : This property defines the address and size of the | ||
2900 | memory-mapped registers contained within the system controller | ||
2901 | chip. The address specified in the "reg" property should match | ||
2902 | the unit address of the system-controller node. | ||
2903 | - #address-cells : Address representation for system controller | ||
2904 | devices. This field represents the number of cells needed to | ||
2905 | represent the address of the memory-mapped registers of devices | ||
2906 | within the system controller chip. | ||
2907 | - #size-cells : Size representation for for the memory-mapped | ||
2908 | registers within the system controller chip. | ||
2909 | - #interrupt-cells : Defines the width of cells used to represent | ||
2910 | interrupts. | ||
2911 | |||
2912 | Optional properties: | ||
2913 | |||
2914 | - model : The specific model of the system controller chip. Such | ||
2915 | as, "mv64360", "mv64460", or "mv64560". | ||
2916 | - compatible : A string identifying the compatibility identifiers | ||
2917 | of the system controller chip. | ||
2918 | |||
2919 | The system-controller node contains child nodes for each system | ||
2920 | controller device that the platform uses. Nodes should not be created | ||
2921 | for devices which exist on the system controller chip but are not used | ||
2922 | |||
2923 | Example Marvell Discovery mv64360 system-controller node: | ||
2924 | |||
2925 | system-controller@f1000000 { /* Marvell Discovery mv64360 */ | ||
2926 | #address-cells = <1>; | ||
2927 | #size-cells = <1>; | ||
2928 | model = "mv64360"; /* Default */ | ||
2929 | compatible = "marvell,mv64360"; | ||
2930 | clock-frequency = <133333333>; | ||
2931 | reg = <0xf1000000 0x10000>; | ||
2932 | virtual-reg = <0xf1000000>; | ||
2933 | ranges = <0x88000000 0x88000000 0x1000000 /* PCI 0 I/O Space */ | ||
2934 | 0x80000000 0x80000000 0x8000000 /* PCI 0 MEM Space */ | ||
2935 | 0xa0000000 0xa0000000 0x4000000 /* User FLASH */ | ||
2936 | 0x00000000 0xf1000000 0x0010000 /* Bridge's regs */ | ||
2937 | 0xf2000000 0xf2000000 0x0040000>;/* Integrated SRAM */ | ||
2938 | |||
2939 | [ child node definitions... ] | ||
2940 | } | ||
2941 | |||
2942 | 2) Child nodes of /system-controller | ||
2943 | |||
2944 | a) Marvell Discovery MDIO bus | ||
2945 | |||
2946 | The MDIO is a bus to which the PHY devices are connected. For each | ||
2947 | device that exists on this bus, a child node should be created. See | ||
2948 | the definition of the PHY node below for an example of how to define | ||
2949 | a PHY. | ||
2950 | |||
2951 | Required properties: | ||
2952 | - #address-cells : Should be <1> | ||
2953 | - #size-cells : Should be <0> | ||
2954 | - device_type : Should be "mdio" | ||
2955 | - compatible : Should be "marvell,mv64360-mdio" | ||
2956 | |||
2957 | Example: | ||
2958 | |||
2959 | mdio { | ||
2960 | #address-cells = <1>; | ||
2961 | #size-cells = <0>; | ||
2962 | device_type = "mdio"; | ||
2963 | compatible = "marvell,mv64360-mdio"; | ||
2964 | |||
2965 | ethernet-phy@0 { | ||
2966 | ...... | ||
2967 | }; | ||
2968 | }; | ||
2969 | |||
2970 | |||
2971 | b) Marvell Discovery ethernet controller | ||
2972 | |||
2973 | The Discover ethernet controller is described with two levels | ||
2974 | of nodes. The first level describes an ethernet silicon block | ||
2975 | and the second level describes up to 3 ethernet nodes within | ||
2976 | that block. The reason for the multiple levels is that the | ||
2977 | registers for the node are interleaved within a single set | ||
2978 | of registers. The "ethernet-block" level describes the | ||
2979 | shared register set, and the "ethernet" nodes describe ethernet | ||
2980 | port-specific properties. | ||
2981 | |||
2982 | Ethernet block node | ||
2983 | |||
2984 | Required properties: | ||
2985 | - #address-cells : <1> | ||
2986 | - #size-cells : <0> | ||
2987 | - compatible : "marvell,mv64360-eth-block" | ||
2988 | - reg : Offset and length of the register set for this block | ||
2989 | |||
2990 | Example Discovery Ethernet block node: | ||
2991 | ethernet-block@2000 { | ||
2992 | #address-cells = <1>; | ||
2993 | #size-cells = <0>; | ||
2994 | compatible = "marvell,mv64360-eth-block"; | ||
2995 | reg = <0x2000 0x2000>; | ||
2996 | ethernet@0 { | ||
2997 | ....... | ||
2998 | }; | ||
2999 | }; | ||
3000 | |||
3001 | Ethernet port node | ||
3002 | |||
3003 | Required properties: | ||
3004 | - device_type : Should be "network". | ||
3005 | - compatible : Should be "marvell,mv64360-eth". | ||
3006 | - reg : Should be <0>, <1>, or <2>, according to which registers | ||
3007 | within the silicon block the device uses. | ||
3008 | - interrupts : <a> where a is the interrupt number for the port. | ||
3009 | - interrupt-parent : the phandle for the interrupt controller | ||
3010 | that services interrupts for this device. | ||
3011 | - phy : the phandle for the PHY connected to this ethernet | ||
3012 | controller. | ||
3013 | - local-mac-address : 6 bytes, MAC address | ||
3014 | |||
3015 | Example Discovery Ethernet port node: | ||
3016 | ethernet@0 { | ||
3017 | device_type = "network"; | ||
3018 | compatible = "marvell,mv64360-eth"; | ||
3019 | reg = <0>; | ||
3020 | interrupts = <32>; | ||
3021 | interrupt-parent = <&PIC>; | ||
3022 | phy = <&PHY0>; | ||
3023 | local-mac-address = [ 00 00 00 00 00 00 ]; | ||
3024 | }; | ||
3025 | |||
3026 | |||
3027 | |||
3028 | c) Marvell Discovery PHY nodes | ||
3029 | |||
3030 | Required properties: | ||
3031 | - device_type : Should be "ethernet-phy" | ||
3032 | - interrupts : <a> where a is the interrupt number for this phy. | ||
3033 | - interrupt-parent : the phandle for the interrupt controller that | ||
3034 | services interrupts for this device. | ||
3035 | - reg : The ID number for the phy, usually a small integer | ||
2819 | 3036 | ||
2820 | More devices will be defined as this spec matures. | 3037 | Example Discovery PHY node: |
3038 | ethernet-phy@1 { | ||
3039 | device_type = "ethernet-phy"; | ||
3040 | compatible = "broadcom,bcm5421"; | ||
3041 | interrupts = <76>; /* GPP 12 */ | ||
3042 | interrupt-parent = <&PIC>; | ||
3043 | reg = <1>; | ||
3044 | }; | ||
2821 | 3045 | ||
2822 | VII - Specifying interrupt information for devices | 3046 | |
3047 | d) Marvell Discovery SDMA nodes | ||
3048 | |||
3049 | Represent DMA hardware associated with the MPSC (multiprotocol | ||
3050 | serial controllers). | ||
3051 | |||
3052 | Required properties: | ||
3053 | - compatible : "marvell,mv64360-sdma" | ||
3054 | - reg : Offset and length of the register set for this device | ||
3055 | - interrupts : <a> where a is the interrupt number for the DMA | ||
3056 | device. | ||
3057 | - interrupt-parent : the phandle for the interrupt controller | ||
3058 | that services interrupts for this device. | ||
3059 | |||
3060 | Example Discovery SDMA node: | ||
3061 | sdma@4000 { | ||
3062 | compatible = "marvell,mv64360-sdma"; | ||
3063 | reg = <0x4000 0xc18>; | ||
3064 | virtual-reg = <0xf1004000>; | ||
3065 | interrupts = <36>; | ||
3066 | interrupt-parent = <&PIC>; | ||
3067 | }; | ||
3068 | |||
3069 | |||
3070 | e) Marvell Discovery BRG nodes | ||
3071 | |||
3072 | Represent baud rate generator hardware associated with the MPSC | ||
3073 | (multiprotocol serial controllers). | ||
3074 | |||
3075 | Required properties: | ||
3076 | - compatible : "marvell,mv64360-brg" | ||
3077 | - reg : Offset and length of the register set for this device | ||
3078 | - clock-src : A value from 0 to 15 which selects the clock | ||
3079 | source for the baud rate generator. This value corresponds | ||
3080 | to the CLKS value in the BRGx configuration register. See | ||
3081 | the mv64x60 User's Manual. | ||
3082 | - clock-frequence : The frequency (in Hz) of the baud rate | ||
3083 | generator's input clock. | ||
3084 | - current-speed : The current speed setting (presumably by | ||
3085 | firmware) of the baud rate generator. | ||
3086 | |||
3087 | Example Discovery BRG node: | ||
3088 | brg@b200 { | ||
3089 | compatible = "marvell,mv64360-brg"; | ||
3090 | reg = <0xb200 0x8>; | ||
3091 | clock-src = <8>; | ||
3092 | clock-frequency = <133333333>; | ||
3093 | current-speed = <9600>; | ||
3094 | }; | ||
3095 | |||
3096 | |||
3097 | f) Marvell Discovery CUNIT nodes | ||
3098 | |||
3099 | Represent the Serial Communications Unit device hardware. | ||
3100 | |||
3101 | Required properties: | ||
3102 | - reg : Offset and length of the register set for this device | ||
3103 | |||
3104 | Example Discovery CUNIT node: | ||
3105 | cunit@f200 { | ||
3106 | reg = <0xf200 0x200>; | ||
3107 | }; | ||
3108 | |||
3109 | |||
3110 | g) Marvell Discovery MPSCROUTING nodes | ||
3111 | |||
3112 | Represent the Discovery's MPSC routing hardware | ||
3113 | |||
3114 | Required properties: | ||
3115 | - reg : Offset and length of the register set for this device | ||
3116 | |||
3117 | Example Discovery CUNIT node: | ||
3118 | mpscrouting@b500 { | ||
3119 | reg = <0xb400 0xc>; | ||
3120 | }; | ||
3121 | |||
3122 | |||
3123 | h) Marvell Discovery MPSCINTR nodes | ||
3124 | |||
3125 | Represent the Discovery's MPSC DMA interrupt hardware registers | ||
3126 | (SDMA cause and mask registers). | ||
3127 | |||
3128 | Required properties: | ||
3129 | - reg : Offset and length of the register set for this device | ||
3130 | |||
3131 | Example Discovery MPSCINTR node: | ||
3132 | mpsintr@b800 { | ||
3133 | reg = <0xb800 0x100>; | ||
3134 | }; | ||
3135 | |||
3136 | |||
3137 | i) Marvell Discovery MPSC nodes | ||
3138 | |||
3139 | Represent the Discovery's MPSC (Multiprotocol Serial Controller) | ||
3140 | serial port. | ||
3141 | |||
3142 | Required properties: | ||
3143 | - device_type : "serial" | ||
3144 | - compatible : "marvell,mv64360-mpsc" | ||
3145 | - reg : Offset and length of the register set for this device | ||
3146 | - sdma : the phandle for the SDMA node used by this port | ||
3147 | - brg : the phandle for the BRG node used by this port | ||
3148 | - cunit : the phandle for the CUNIT node used by this port | ||
3149 | - mpscrouting : the phandle for the MPSCROUTING node used by this port | ||
3150 | - mpscintr : the phandle for the MPSCINTR node used by this port | ||
3151 | - cell-index : the hardware index of this cell in the MPSC core | ||
3152 | - max_idle : value needed for MPSC CHR3 (Maximum Frame Length) | ||
3153 | register | ||
3154 | - interrupts : <a> where a is the interrupt number for the MPSC. | ||
3155 | - interrupt-parent : the phandle for the interrupt controller | ||
3156 | that services interrupts for this device. | ||
3157 | |||
3158 | Example Discovery MPSCINTR node: | ||
3159 | mpsc@8000 { | ||
3160 | device_type = "serial"; | ||
3161 | compatible = "marvell,mv64360-mpsc"; | ||
3162 | reg = <0x8000 0x38>; | ||
3163 | virtual-reg = <0xf1008000>; | ||
3164 | sdma = <&SDMA0>; | ||
3165 | brg = <&BRG0>; | ||
3166 | cunit = <&CUNIT>; | ||
3167 | mpscrouting = <&MPSCROUTING>; | ||
3168 | mpscintr = <&MPSCINTR>; | ||
3169 | cell-index = <0>; | ||
3170 | max_idle = <40>; | ||
3171 | interrupts = <40>; | ||
3172 | interrupt-parent = <&PIC>; | ||
3173 | }; | ||
3174 | |||
3175 | |||
3176 | j) Marvell Discovery Watch Dog Timer nodes | ||
3177 | |||
3178 | Represent the Discovery's watchdog timer hardware | ||
3179 | |||
3180 | Required properties: | ||
3181 | - compatible : "marvell,mv64360-wdt" | ||
3182 | - reg : Offset and length of the register set for this device | ||
3183 | |||
3184 | Example Discovery Watch Dog Timer node: | ||
3185 | wdt@b410 { | ||
3186 | compatible = "marvell,mv64360-wdt"; | ||
3187 | reg = <0xb410 0x8>; | ||
3188 | }; | ||
3189 | |||
3190 | |||
3191 | k) Marvell Discovery I2C nodes | ||
3192 | |||
3193 | Represent the Discovery's I2C hardware | ||
3194 | |||
3195 | Required properties: | ||
3196 | - device_type : "i2c" | ||
3197 | - compatible : "marvell,mv64360-i2c" | ||
3198 | - reg : Offset and length of the register set for this device | ||
3199 | - interrupts : <a> where a is the interrupt number for the I2C. | ||
3200 | - interrupt-parent : the phandle for the interrupt controller | ||
3201 | that services interrupts for this device. | ||
3202 | |||
3203 | Example Discovery I2C node: | ||
3204 | compatible = "marvell,mv64360-i2c"; | ||
3205 | reg = <0xc000 0x20>; | ||
3206 | virtual-reg = <0xf100c000>; | ||
3207 | interrupts = <37>; | ||
3208 | interrupt-parent = <&PIC>; | ||
3209 | }; | ||
3210 | |||
3211 | |||
3212 | l) Marvell Discovery PIC (Programmable Interrupt Controller) nodes | ||
3213 | |||
3214 | Represent the Discovery's PIC hardware | ||
3215 | |||
3216 | Required properties: | ||
3217 | - #interrupt-cells : <1> | ||
3218 | - #address-cells : <0> | ||
3219 | - compatible : "marvell,mv64360-pic" | ||
3220 | - reg : Offset and length of the register set for this device | ||
3221 | - interrupt-controller | ||
3222 | |||
3223 | Example Discovery PIC node: | ||
3224 | pic { | ||
3225 | #interrupt-cells = <1>; | ||
3226 | #address-cells = <0>; | ||
3227 | compatible = "marvell,mv64360-pic"; | ||
3228 | reg = <0x0 0x88>; | ||
3229 | interrupt-controller; | ||
3230 | }; | ||
3231 | |||
3232 | |||
3233 | m) Marvell Discovery MPP (Multipurpose Pins) multiplexing nodes | ||
3234 | |||
3235 | Represent the Discovery's MPP hardware | ||
3236 | |||
3237 | Required properties: | ||
3238 | - compatible : "marvell,mv64360-mpp" | ||
3239 | - reg : Offset and length of the register set for this device | ||
3240 | |||
3241 | Example Discovery MPP node: | ||
3242 | mpp@f000 { | ||
3243 | compatible = "marvell,mv64360-mpp"; | ||
3244 | reg = <0xf000 0x10>; | ||
3245 | }; | ||
3246 | |||
3247 | |||
3248 | n) Marvell Discovery GPP (General Purpose Pins) nodes | ||
3249 | |||
3250 | Represent the Discovery's GPP hardware | ||
3251 | |||
3252 | Required properties: | ||
3253 | - compatible : "marvell,mv64360-gpp" | ||
3254 | - reg : Offset and length of the register set for this device | ||
3255 | |||
3256 | Example Discovery GPP node: | ||
3257 | gpp@f000 { | ||
3258 | compatible = "marvell,mv64360-gpp"; | ||
3259 | reg = <0xf100 0x20>; | ||
3260 | }; | ||
3261 | |||
3262 | |||
3263 | o) Marvell Discovery PCI host bridge node | ||
3264 | |||
3265 | Represents the Discovery's PCI host bridge device. The properties | ||
3266 | for this node conform to Rev 2.1 of the PCI Bus Binding to IEEE | ||
3267 | 1275-1994. A typical value for the compatible property is | ||
3268 | "marvell,mv64360-pci". | ||
3269 | |||
3270 | Example Discovery PCI host bridge node | ||
3271 | pci@80000000 { | ||
3272 | #address-cells = <3>; | ||
3273 | #size-cells = <2>; | ||
3274 | #interrupt-cells = <1>; | ||
3275 | device_type = "pci"; | ||
3276 | compatible = "marvell,mv64360-pci"; | ||
3277 | reg = <0xcf8 0x8>; | ||
3278 | ranges = <0x01000000 0x0 0x0 | ||
3279 | 0x88000000 0x0 0x01000000 | ||
3280 | 0x02000000 0x0 0x80000000 | ||
3281 | 0x80000000 0x0 0x08000000>; | ||
3282 | bus-range = <0 255>; | ||
3283 | clock-frequency = <66000000>; | ||
3284 | interrupt-parent = <&PIC>; | ||
3285 | interrupt-map-mask = <0xf800 0x0 0x0 0x7>; | ||
3286 | interrupt-map = < | ||
3287 | /* IDSEL 0x0a */ | ||
3288 | 0x5000 0 0 1 &PIC 80 | ||
3289 | 0x5000 0 0 2 &PIC 81 | ||
3290 | 0x5000 0 0 3 &PIC 91 | ||
3291 | 0x5000 0 0 4 &PIC 93 | ||
3292 | |||
3293 | /* IDSEL 0x0b */ | ||
3294 | 0x5800 0 0 1 &PIC 91 | ||
3295 | 0x5800 0 0 2 &PIC 93 | ||
3296 | 0x5800 0 0 3 &PIC 80 | ||
3297 | 0x5800 0 0 4 &PIC 81 | ||
3298 | |||
3299 | /* IDSEL 0x0c */ | ||
3300 | 0x6000 0 0 1 &PIC 91 | ||
3301 | 0x6000 0 0 2 &PIC 93 | ||
3302 | 0x6000 0 0 3 &PIC 80 | ||
3303 | 0x6000 0 0 4 &PIC 81 | ||
3304 | |||
3305 | /* IDSEL 0x0d */ | ||
3306 | 0x6800 0 0 1 &PIC 93 | ||
3307 | 0x6800 0 0 2 &PIC 80 | ||
3308 | 0x6800 0 0 3 &PIC 81 | ||
3309 | 0x6800 0 0 4 &PIC 91 | ||
3310 | >; | ||
3311 | }; | ||
3312 | |||
3313 | |||
3314 | p) Marvell Discovery CPU Error nodes | ||
3315 | |||
3316 | Represent the Discovery's CPU error handler device. | ||
3317 | |||
3318 | Required properties: | ||
3319 | - compatible : "marvell,mv64360-cpu-error" | ||
3320 | - reg : Offset and length of the register set for this device | ||
3321 | - interrupts : the interrupt number for this device | ||
3322 | - interrupt-parent : the phandle for the interrupt controller | ||
3323 | that services interrupts for this device. | ||
3324 | |||
3325 | Example Discovery CPU Error node: | ||
3326 | cpu-error@0070 { | ||
3327 | compatible = "marvell,mv64360-cpu-error"; | ||
3328 | reg = <0x70 0x10 0x128 0x28>; | ||
3329 | interrupts = <3>; | ||
3330 | interrupt-parent = <&PIC>; | ||
3331 | }; | ||
3332 | |||
3333 | |||
3334 | q) Marvell Discovery SRAM Controller nodes | ||
3335 | |||
3336 | Represent the Discovery's SRAM controller device. | ||
3337 | |||
3338 | Required properties: | ||
3339 | - compatible : "marvell,mv64360-sram-ctrl" | ||
3340 | - reg : Offset and length of the register set for this device | ||
3341 | - interrupts : the interrupt number for this device | ||
3342 | - interrupt-parent : the phandle for the interrupt controller | ||
3343 | that services interrupts for this device. | ||
3344 | |||
3345 | Example Discovery SRAM Controller node: | ||
3346 | sram-ctrl@0380 { | ||
3347 | compatible = "marvell,mv64360-sram-ctrl"; | ||
3348 | reg = <0x380 0x80>; | ||
3349 | interrupts = <13>; | ||
3350 | interrupt-parent = <&PIC>; | ||
3351 | }; | ||
3352 | |||
3353 | |||
3354 | r) Marvell Discovery PCI Error Handler nodes | ||
3355 | |||
3356 | Represent the Discovery's PCI error handler device. | ||
3357 | |||
3358 | Required properties: | ||
3359 | - compatible : "marvell,mv64360-pci-error" | ||
3360 | - reg : Offset and length of the register set for this device | ||
3361 | - interrupts : the interrupt number for this device | ||
3362 | - interrupt-parent : the phandle for the interrupt controller | ||
3363 | that services interrupts for this device. | ||
3364 | |||
3365 | Example Discovery PCI Error Handler node: | ||
3366 | pci-error@1d40 { | ||
3367 | compatible = "marvell,mv64360-pci-error"; | ||
3368 | reg = <0x1d40 0x40 0xc28 0x4>; | ||
3369 | interrupts = <12>; | ||
3370 | interrupt-parent = <&PIC>; | ||
3371 | }; | ||
3372 | |||
3373 | |||
3374 | s) Marvell Discovery Memory Controller nodes | ||
3375 | |||
3376 | Represent the Discovery's memory controller device. | ||
3377 | |||
3378 | Required properties: | ||
3379 | - compatible : "marvell,mv64360-mem-ctrl" | ||
3380 | - reg : Offset and length of the register set for this device | ||
3381 | - interrupts : the interrupt number for this device | ||
3382 | - interrupt-parent : the phandle for the interrupt controller | ||
3383 | that services interrupts for this device. | ||
3384 | |||
3385 | Example Discovery Memory Controller node: | ||
3386 | mem-ctrl@1400 { | ||
3387 | compatible = "marvell,mv64360-mem-ctrl"; | ||
3388 | reg = <0x1400 0x60>; | ||
3389 | interrupts = <17>; | ||
3390 | interrupt-parent = <&PIC>; | ||
3391 | }; | ||
3392 | |||
3393 | |||
3394 | VIII - Specifying interrupt information for devices | ||
2823 | =================================================== | 3395 | =================================================== |
2824 | 3396 | ||
2825 | The device tree represents the busses and devices of a hardware | 3397 | The device tree represents the busses and devices of a hardware |
@@ -2905,6 +3477,54 @@ encodings listed below: | |||
2905 | 2 = high to low edge sensitive type enabled | 3477 | 2 = high to low edge sensitive type enabled |
2906 | 3 = low to high edge sensitive type enabled | 3478 | 3 = low to high edge sensitive type enabled |
2907 | 3479 | ||
3480 | VIII - Specifying GPIO information for devices | ||
3481 | ============================================== | ||
3482 | |||
3483 | 1) gpios property | ||
3484 | ----------------- | ||
3485 | |||
3486 | Nodes that makes use of GPIOs should define them using `gpios' property, | ||
3487 | format of which is: <&gpio-controller1-phandle gpio1-specifier | ||
3488 | &gpio-controller2-phandle gpio2-specifier | ||
3489 | 0 /* holes are permitted, means no GPIO 3 */ | ||
3490 | &gpio-controller4-phandle gpio4-specifier | ||
3491 | ...>; | ||
3492 | |||
3493 | Note that gpio-specifier length is controller dependent. | ||
3494 | |||
3495 | gpio-specifier may encode: bank, pin position inside the bank, | ||
3496 | whether pin is open-drain and whether pin is logically inverted. | ||
3497 | |||
3498 | Example of the node using GPIOs: | ||
3499 | |||
3500 | node { | ||
3501 | gpios = <&qe_pio_e 18 0>; | ||
3502 | }; | ||
3503 | |||
3504 | In this example gpio-specifier is "18 0" and encodes GPIO pin number, | ||
3505 | and empty GPIO flags as accepted by the "qe_pio_e" gpio-controller. | ||
3506 | |||
3507 | 2) gpio-controller nodes | ||
3508 | ------------------------ | ||
3509 | |||
3510 | Every GPIO controller node must have #gpio-cells property defined, | ||
3511 | this information will be used to translate gpio-specifiers. | ||
3512 | |||
3513 | Example of two SOC GPIO banks defined as gpio-controller nodes: | ||
3514 | |||
3515 | qe_pio_a: gpio-controller@1400 { | ||
3516 | #gpio-cells = <2>; | ||
3517 | compatible = "fsl,qe-pario-bank-a", "fsl,qe-pario-bank"; | ||
3518 | reg = <0x1400 0x18>; | ||
3519 | gpio-controller; | ||
3520 | }; | ||
3521 | |||
3522 | qe_pio_e: gpio-controller@1460 { | ||
3523 | #gpio-cells = <2>; | ||
3524 | compatible = "fsl,qe-pario-bank-e", "fsl,qe-pario-bank"; | ||
3525 | reg = <0x1460 0x18>; | ||
3526 | gpio-controller; | ||
3527 | }; | ||
2908 | 3528 | ||
2909 | Appendix A - Sample SOC node for MPC8540 | 3529 | Appendix A - Sample SOC node for MPC8540 |
2910 | ======================================== | 3530 | ======================================== |
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/powerpc/phyp-assisted-dump.txt b/Documentation/powerpc/phyp-assisted-dump.txt new file mode 100644 index 000000000000..c4682b982a2e --- /dev/null +++ b/Documentation/powerpc/phyp-assisted-dump.txt | |||
@@ -0,0 +1,127 @@ | |||
1 | |||
2 | Hypervisor-Assisted Dump | ||
3 | ------------------------ | ||
4 | November 2007 | ||
5 | |||
6 | The goal of hypervisor-assisted dump is to enable the dump of | ||
7 | a crashed system, and to do so from a fully-reset system, and | ||
8 | to minimize the total elapsed time until the system is back | ||
9 | in production use. | ||
10 | |||
11 | As compared to kdump or other strategies, hypervisor-assisted | ||
12 | dump offers several strong, practical advantages: | ||
13 | |||
14 | -- Unlike kdump, the system has been reset, and loaded | ||
15 | with a fresh copy of the kernel. In particular, | ||
16 | PCI and I/O devices have been reinitialized and are | ||
17 | in a clean, consistent state. | ||
18 | -- As the dump is performed, the dumped memory becomes | ||
19 | immediately available to the system for normal use. | ||
20 | -- After the dump is completed, no further reboots are | ||
21 | required; the system will be fully usable, and running | ||
22 | in it's normal, production mode on it normal kernel. | ||
23 | |||
24 | The above can only be accomplished by coordination with, | ||
25 | and assistance from the hypervisor. The procedure is | ||
26 | as follows: | ||
27 | |||
28 | -- When a system crashes, the hypervisor will save | ||
29 | the low 256MB of RAM to a previously registered | ||
30 | save region. It will also save system state, system | ||
31 | registers, and hardware PTE's. | ||
32 | |||
33 | -- After the low 256MB area has been saved, the | ||
34 | hypervisor will reset PCI and other hardware state. | ||
35 | It will *not* clear RAM. It will then launch the | ||
36 | bootloader, as normal. | ||
37 | |||
38 | -- The freshly booted kernel will notice that there | ||
39 | is a new node (ibm,dump-kernel) in the device tree, | ||
40 | indicating that there is crash data available from | ||
41 | a previous boot. It will boot into only 256MB of RAM, | ||
42 | reserving the rest of system memory. | ||
43 | |||
44 | -- Userspace tools will parse /sys/kernel/release_region | ||
45 | and read /proc/vmcore to obtain the contents of memory, | ||
46 | which holds the previous crashed kernel. The userspace | ||
47 | tools may copy this info to disk, or network, nas, san, | ||
48 | iscsi, etc. as desired. | ||
49 | |||
50 | For Example: the values in /sys/kernel/release-region | ||
51 | would look something like this (address-range pairs). | ||
52 | CPU:0x177fee000-0x10000: HPTE:0x177ffe020-0x1000: / | ||
53 | DUMP:0x177fff020-0x10000000, 0x10000000-0x16F1D370A | ||
54 | |||
55 | -- As the userspace tools complete saving a portion of | ||
56 | dump, they echo an offset and size to | ||
57 | /sys/kernel/release_region to release the reserved | ||
58 | memory back to general use. | ||
59 | |||
60 | An example of this is: | ||
61 | "echo 0x40000000 0x10000000 > /sys/kernel/release_region" | ||
62 | which will release 256MB at the 1GB boundary. | ||
63 | |||
64 | Please note that the hypervisor-assisted dump feature | ||
65 | is only available on Power6-based systems with recent | ||
66 | firmware versions. | ||
67 | |||
68 | Implementation details: | ||
69 | ---------------------- | ||
70 | |||
71 | During boot, a check is made to see if firmware supports | ||
72 | this feature on this particular machine. If it does, then | ||
73 | we check to see if a active dump is waiting for us. If yes | ||
74 | then everything but 256 MB of RAM is reserved during early | ||
75 | boot. This area is released once we collect a dump from user | ||
76 | land scripts that are run. If there is dump data, then | ||
77 | the /sys/kernel/release_region file is created, and | ||
78 | the reserved memory is held. | ||
79 | |||
80 | If there is no waiting dump data, then only the highest | ||
81 | 256MB of the ram is reserved as a scratch area. This area | ||
82 | is *not* released: this region will be kept permanently | ||
83 | reserved, so that it can act as a receptacle for a copy | ||
84 | of the low 256MB in the case a crash does occur. See, | ||
85 | however, "open issues" below, as to whether | ||
86 | such a reserved region is really needed. | ||
87 | |||
88 | Currently the dump will be copied from /proc/vmcore to a | ||
89 | a new file upon user intervention. The starting address | ||
90 | to be read and the range for each data point in provided | ||
91 | in /sys/kernel/release_region. | ||
92 | |||
93 | The tools to examine the dump will be same as the ones | ||
94 | used for kdump. | ||
95 | |||
96 | General notes: | ||
97 | -------------- | ||
98 | Security: please note that there are potential security issues | ||
99 | with any sort of dump mechanism. In particular, plaintext | ||
100 | (unencrypted) data, and possibly passwords, may be present in | ||
101 | the dump data. Userspace tools must take adequate precautions to | ||
102 | preserve security. | ||
103 | |||
104 | Open issues/ToDo: | ||
105 | ------------ | ||
106 | o The various code paths that tell the hypervisor that a crash | ||
107 | occurred, vs. it simply being a normal reboot, should be | ||
108 | reviewed, and possibly clarified/fixed. | ||
109 | |||
110 | o Instead of using /sys/kernel, should there be a /sys/dump | ||
111 | instead? There is a dump_subsys being created by the s390 code, | ||
112 | perhaps the pseries code should use a similar layout as well. | ||
113 | |||
114 | o Is reserving a 256MB region really required? The goal of | ||
115 | reserving a 256MB scratch area is to make sure that no | ||
116 | important crash data is clobbered when the hypervisor | ||
117 | save low mem to the scratch area. But, if one could assure | ||
118 | that nothing important is located in some 256MB area, then | ||
119 | it would not need to be reserved. Something that can be | ||
120 | improved in subsequent versions. | ||
121 | |||
122 | o Still working the kdump team to integrate this with kdump, | ||
123 | some work remains but this would not affect the current | ||
124 | patches. | ||
125 | |||
126 | o Still need to write a shell script, to copy the dump away. | ||
127 | Currently I am parsing it manually. | ||
diff --git a/Documentation/prctl/disable-tsc-ctxt-sw-stress-test.c b/Documentation/prctl/disable-tsc-ctxt-sw-stress-test.c new file mode 100644 index 000000000000..f8e8e95e81fd --- /dev/null +++ b/Documentation/prctl/disable-tsc-ctxt-sw-stress-test.c | |||
@@ -0,0 +1,96 @@ | |||
1 | /* | ||
2 | * Tests for prctl(PR_GET_TSC, ...) / prctl(PR_SET_TSC, ...) | ||
3 | * | ||
4 | * Tests if the control register is updated correctly | ||
5 | * at context switches | ||
6 | * | ||
7 | * Warning: this test will cause a very high load for a few seconds | ||
8 | * | ||
9 | */ | ||
10 | |||
11 | #include <stdio.h> | ||
12 | #include <stdlib.h> | ||
13 | #include <unistd.h> | ||
14 | #include <signal.h> | ||
15 | #include <inttypes.h> | ||
16 | #include <wait.h> | ||
17 | |||
18 | |||
19 | #include <sys/prctl.h> | ||
20 | #include <linux/prctl.h> | ||
21 | |||
22 | /* Get/set the process' ability to use the timestamp counter instruction */ | ||
23 | #ifndef PR_GET_TSC | ||
24 | #define PR_GET_TSC 25 | ||
25 | #define PR_SET_TSC 26 | ||
26 | # define PR_TSC_ENABLE 1 /* allow the use of the timestamp counter */ | ||
27 | # define PR_TSC_SIGSEGV 2 /* throw a SIGSEGV instead of reading the TSC */ | ||
28 | #endif | ||
29 | |||
30 | uint64_t rdtsc() { | ||
31 | uint32_t lo, hi; | ||
32 | /* We cannot use "=A", since this would use %rax on x86_64 */ | ||
33 | __asm__ __volatile__ ("rdtsc" : "=a" (lo), "=d" (hi)); | ||
34 | return (uint64_t)hi << 32 | lo; | ||
35 | } | ||
36 | |||
37 | void sigsegv_expect(int sig) | ||
38 | { | ||
39 | /* */ | ||
40 | } | ||
41 | |||
42 | void segvtask(void) | ||
43 | { | ||
44 | if (prctl(PR_SET_TSC, PR_TSC_SIGSEGV) < 0) | ||
45 | { | ||
46 | perror("prctl"); | ||
47 | exit(0); | ||
48 | } | ||
49 | signal(SIGSEGV, sigsegv_expect); | ||
50 | alarm(10); | ||
51 | rdtsc(); | ||
52 | fprintf(stderr, "FATAL ERROR, rdtsc() succeeded while disabled\n"); | ||
53 | exit(0); | ||
54 | } | ||
55 | |||
56 | |||
57 | void sigsegv_fail(int sig) | ||
58 | { | ||
59 | fprintf(stderr, "FATAL ERROR, rdtsc() failed while enabled\n"); | ||
60 | exit(0); | ||
61 | } | ||
62 | |||
63 | void rdtsctask(void) | ||
64 | { | ||
65 | if (prctl(PR_SET_TSC, PR_TSC_ENABLE) < 0) | ||
66 | { | ||
67 | perror("prctl"); | ||
68 | exit(0); | ||
69 | } | ||
70 | signal(SIGSEGV, sigsegv_fail); | ||
71 | alarm(10); | ||
72 | for(;;) rdtsc(); | ||
73 | } | ||
74 | |||
75 | |||
76 | int main(int argc, char **argv) | ||
77 | { | ||
78 | int n_tasks = 100, i; | ||
79 | |||
80 | fprintf(stderr, "[No further output means we're allright]\n"); | ||
81 | |||
82 | for (i=0; i<n_tasks; i++) | ||
83 | if (fork() == 0) | ||
84 | { | ||
85 | if (i & 1) | ||
86 | segvtask(); | ||
87 | else | ||
88 | rdtsctask(); | ||
89 | } | ||
90 | |||
91 | for (i=0; i<n_tasks; i++) | ||
92 | wait(NULL); | ||
93 | |||
94 | exit(0); | ||
95 | } | ||
96 | |||
diff --git a/Documentation/prctl/disable-tsc-on-off-stress-test.c b/Documentation/prctl/disable-tsc-on-off-stress-test.c new file mode 100644 index 000000000000..1fcd91445375 --- /dev/null +++ b/Documentation/prctl/disable-tsc-on-off-stress-test.c | |||
@@ -0,0 +1,95 @@ | |||
1 | /* | ||
2 | * Tests for prctl(PR_GET_TSC, ...) / prctl(PR_SET_TSC, ...) | ||
3 | * | ||
4 | * Tests if the control register is updated correctly | ||
5 | * when set with prctl() | ||
6 | * | ||
7 | * Warning: this test will cause a very high load for a few seconds | ||
8 | * | ||
9 | */ | ||
10 | |||
11 | #include <stdio.h> | ||
12 | #include <stdlib.h> | ||
13 | #include <unistd.h> | ||
14 | #include <signal.h> | ||
15 | #include <inttypes.h> | ||
16 | #include <wait.h> | ||
17 | |||
18 | |||
19 | #include <sys/prctl.h> | ||
20 | #include <linux/prctl.h> | ||
21 | |||
22 | /* Get/set the process' ability to use the timestamp counter instruction */ | ||
23 | #ifndef PR_GET_TSC | ||
24 | #define PR_GET_TSC 25 | ||
25 | #define PR_SET_TSC 26 | ||
26 | # define PR_TSC_ENABLE 1 /* allow the use of the timestamp counter */ | ||
27 | # define PR_TSC_SIGSEGV 2 /* throw a SIGSEGV instead of reading the TSC */ | ||
28 | #endif | ||
29 | |||
30 | /* snippet from wikipedia :-) */ | ||
31 | |||
32 | uint64_t rdtsc() { | ||
33 | uint32_t lo, hi; | ||
34 | /* We cannot use "=A", since this would use %rax on x86_64 */ | ||
35 | __asm__ __volatile__ ("rdtsc" : "=a" (lo), "=d" (hi)); | ||
36 | return (uint64_t)hi << 32 | lo; | ||
37 | } | ||
38 | |||
39 | int should_segv = 0; | ||
40 | |||
41 | void sigsegv_cb(int sig) | ||
42 | { | ||
43 | if (!should_segv) | ||
44 | { | ||
45 | fprintf(stderr, "FATAL ERROR, rdtsc() failed while enabled\n"); | ||
46 | exit(0); | ||
47 | } | ||
48 | if (prctl(PR_SET_TSC, PR_TSC_ENABLE) < 0) | ||
49 | { | ||
50 | perror("prctl"); | ||
51 | exit(0); | ||
52 | } | ||
53 | should_segv = 0; | ||
54 | |||
55 | rdtsc(); | ||
56 | } | ||
57 | |||
58 | void task(void) | ||
59 | { | ||
60 | signal(SIGSEGV, sigsegv_cb); | ||
61 | alarm(10); | ||
62 | for(;;) | ||
63 | { | ||
64 | rdtsc(); | ||
65 | if (should_segv) | ||
66 | { | ||
67 | fprintf(stderr, "FATAL ERROR, rdtsc() succeeded while disabled\n"); | ||
68 | exit(0); | ||
69 | } | ||
70 | if (prctl(PR_SET_TSC, PR_TSC_SIGSEGV) < 0) | ||
71 | { | ||
72 | perror("prctl"); | ||
73 | exit(0); | ||
74 | } | ||
75 | should_segv = 1; | ||
76 | } | ||
77 | } | ||
78 | |||
79 | |||
80 | int main(int argc, char **argv) | ||
81 | { | ||
82 | int n_tasks = 100, i; | ||
83 | |||
84 | fprintf(stderr, "[No further output means we're allright]\n"); | ||
85 | |||
86 | for (i=0; i<n_tasks; i++) | ||
87 | if (fork() == 0) | ||
88 | task(); | ||
89 | |||
90 | for (i=0; i<n_tasks; i++) | ||
91 | wait(NULL); | ||
92 | |||
93 | exit(0); | ||
94 | } | ||
95 | |||
diff --git a/Documentation/prctl/disable-tsc-test.c b/Documentation/prctl/disable-tsc-test.c new file mode 100644 index 000000000000..843c81eac235 --- /dev/null +++ b/Documentation/prctl/disable-tsc-test.c | |||
@@ -0,0 +1,94 @@ | |||
1 | /* | ||
2 | * Tests for prctl(PR_GET_TSC, ...) / prctl(PR_SET_TSC, ...) | ||
3 | * | ||
4 | * Basic test to test behaviour of PR_GET_TSC and PR_SET_TSC | ||
5 | */ | ||
6 | |||
7 | #include <stdio.h> | ||
8 | #include <stdlib.h> | ||
9 | #include <unistd.h> | ||
10 | #include <signal.h> | ||
11 | #include <inttypes.h> | ||
12 | |||
13 | |||
14 | #include <sys/prctl.h> | ||
15 | #include <linux/prctl.h> | ||
16 | |||
17 | /* Get/set the process' ability to use the timestamp counter instruction */ | ||
18 | #ifndef PR_GET_TSC | ||
19 | #define PR_GET_TSC 25 | ||
20 | #define PR_SET_TSC 26 | ||
21 | # define PR_TSC_ENABLE 1 /* allow the use of the timestamp counter */ | ||
22 | # define PR_TSC_SIGSEGV 2 /* throw a SIGSEGV instead of reading the TSC */ | ||
23 | #endif | ||
24 | |||
25 | const char *tsc_names[] = | ||
26 | { | ||
27 | [0] = "[not set]", | ||
28 | [PR_TSC_ENABLE] = "PR_TSC_ENABLE", | ||
29 | [PR_TSC_SIGSEGV] = "PR_TSC_SIGSEGV", | ||
30 | }; | ||
31 | |||
32 | uint64_t rdtsc() { | ||
33 | uint32_t lo, hi; | ||
34 | /* We cannot use "=A", since this would use %rax on x86_64 */ | ||
35 | __asm__ __volatile__ ("rdtsc" : "=a" (lo), "=d" (hi)); | ||
36 | return (uint64_t)hi << 32 | lo; | ||
37 | } | ||
38 | |||
39 | void sigsegv_cb(int sig) | ||
40 | { | ||
41 | int tsc_val = 0; | ||
42 | |||
43 | printf("[ SIG_SEGV ]\n"); | ||
44 | printf("prctl(PR_GET_TSC, &tsc_val); "); | ||
45 | fflush(stdout); | ||
46 | |||
47 | if ( prctl(PR_GET_TSC, &tsc_val) == -1) | ||
48 | perror("prctl"); | ||
49 | |||
50 | printf("tsc_val == %s\n", tsc_names[tsc_val]); | ||
51 | printf("prctl(PR_SET_TSC, PR_TSC_ENABLE)\n"); | ||
52 | fflush(stdout); | ||
53 | if ( prctl(PR_SET_TSC, PR_TSC_ENABLE) == -1) | ||
54 | perror("prctl"); | ||
55 | |||
56 | printf("rdtsc() == "); | ||
57 | } | ||
58 | |||
59 | int main(int argc, char **argv) | ||
60 | { | ||
61 | int tsc_val = 0; | ||
62 | |||
63 | signal(SIGSEGV, sigsegv_cb); | ||
64 | |||
65 | printf("rdtsc() == %llu\n", (unsigned long long)rdtsc()); | ||
66 | printf("prctl(PR_GET_TSC, &tsc_val); "); | ||
67 | fflush(stdout); | ||
68 | |||
69 | if ( prctl(PR_GET_TSC, &tsc_val) == -1) | ||
70 | perror("prctl"); | ||
71 | |||
72 | printf("tsc_val == %s\n", tsc_names[tsc_val]); | ||
73 | printf("rdtsc() == %llu\n", (unsigned long long)rdtsc()); | ||
74 | printf("prctl(PR_SET_TSC, PR_TSC_ENABLE)\n"); | ||
75 | fflush(stdout); | ||
76 | |||
77 | if ( prctl(PR_SET_TSC, PR_TSC_ENABLE) == -1) | ||
78 | perror("prctl"); | ||
79 | |||
80 | printf("rdtsc() == %llu\n", (unsigned long long)rdtsc()); | ||
81 | printf("prctl(PR_SET_TSC, PR_TSC_SIGSEGV)\n"); | ||
82 | fflush(stdout); | ||
83 | |||
84 | if ( prctl(PR_SET_TSC, PR_TSC_SIGSEGV) == -1) | ||
85 | perror("prctl"); | ||
86 | |||
87 | printf("rdtsc() == "); | ||
88 | fflush(stdout); | ||
89 | printf("%llu\n", (unsigned long long)rdtsc()); | ||
90 | fflush(stdout); | ||
91 | |||
92 | exit(EXIT_SUCCESS); | ||
93 | } | ||
94 | |||
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/s390/s390dbf.txt b/Documentation/s390/s390dbf.txt index 0eb7c58916de..e05420973698 100644 --- a/Documentation/s390/s390dbf.txt +++ b/Documentation/s390/s390dbf.txt | |||
@@ -115,6 +115,27 @@ Return Value: Handle for generated debug area | |||
115 | Description: Allocates memory for a debug log | 115 | Description: Allocates memory for a debug log |
116 | Must not be called within an interrupt handler | 116 | Must not be called within an interrupt handler |
117 | 117 | ||
118 | ---------------------------------------------------------------------------- | ||
119 | debug_info_t *debug_register_mode(char *name, int pages, int nr_areas, | ||
120 | int buf_size, mode_t mode, uid_t uid, | ||
121 | gid_t gid); | ||
122 | |||
123 | Parameter: name: Name of debug log (e.g. used for debugfs entry) | ||
124 | pages: Number of pages, which will be allocated per area | ||
125 | nr_areas: Number of debug areas | ||
126 | buf_size: Size of data area in each debug entry | ||
127 | mode: File mode for debugfs files. E.g. S_IRWXUGO | ||
128 | uid: User ID for debugfs files. Currently only 0 is | ||
129 | supported. | ||
130 | gid: Group ID for debugfs files. Currently only 0 is | ||
131 | supported. | ||
132 | |||
133 | Return Value: Handle for generated debug area | ||
134 | NULL if register failed | ||
135 | |||
136 | Description: Allocates memory for a debug log | ||
137 | Must not be called within an interrupt handler | ||
138 | |||
118 | --------------------------------------------------------------------------- | 139 | --------------------------------------------------------------------------- |
119 | void debug_unregister (debug_info_t * id); | 140 | void debug_unregister (debug_info_t * id); |
120 | 141 | ||
diff --git a/Documentation/scheduler/sched-rt-group.txt b/Documentation/scheduler/sched-rt-group.txt index 1c6332f4543c..14f901f639ee 100644 --- a/Documentation/scheduler/sched-rt-group.txt +++ b/Documentation/scheduler/sched-rt-group.txt | |||
@@ -1,59 +1,177 @@ | |||
1 | Real-Time group scheduling | ||
2 | -------------------------- | ||
1 | 3 | ||
4 | CONTENTS | ||
5 | ======== | ||
2 | 6 | ||
3 | Real-Time group scheduling. | 7 | 1. Overview |
8 | 1.1 The problem | ||
9 | 1.2 The solution | ||
10 | 2. The interface | ||
11 | 2.1 System-wide settings | ||
12 | 2.2 Default behaviour | ||
13 | 2.3 Basis for grouping tasks | ||
14 | 3. Future plans | ||
4 | 15 | ||
5 | The problem space: | ||
6 | 16 | ||
7 | In order to schedule multiple groups of realtime tasks each group must | 17 | 1. Overview |
8 | be assigned a fixed portion of the CPU time available. Without a minimum | 18 | =========== |
9 | guarantee a realtime group can obviously fall short. A fuzzy upper limit | ||
10 | is of no use since it cannot be relied upon. Which leaves us with just | ||
11 | the single fixed portion. | ||
12 | 19 | ||
13 | CPU time is divided by means of specifying how much time can be spent | ||
14 | running in a given period. Say a frame fixed realtime renderer must | ||
15 | deliver 25 frames a second, which yields a period of 0.04s. Now say | ||
16 | it will also have to play some music and respond to input, leaving it | ||
17 | with around 80% for the graphics. We can then give this group a runtime | ||
18 | of 0.8 * 0.04s = 0.032s. | ||
19 | 20 | ||
20 | This way the graphics group will have a 0.04s period with a 0.032s runtime | 21 | 1.1 The problem |
21 | limit. | 22 | --------------- |
22 | 23 | ||
23 | Now if the audio thread needs to refill the DMA buffer every 0.005s, but | 24 | Realtime scheduling is all about determinism, a group has to be able to rely on |
24 | needs only about 3% CPU time to do so, it can do with a 0.03 * 0.005s | 25 | the amount of bandwidth (eg. CPU time) being constant. In order to schedule |
25 | = 0.00015s. | 26 | multiple groups of realtime tasks, each group must be assigned a fixed portion |
27 | of the CPU time available. Without a minimum guarantee a realtime group can | ||
28 | obviously fall short. A fuzzy upper limit is of no use since it cannot be | ||
29 | relied upon. Which leaves us with just the single fixed portion. | ||
26 | 30 | ||
31 | 1.2 The solution | ||
32 | ---------------- | ||
27 | 33 | ||
28 | The Interface: | 34 | CPU time is divided by means of specifying how much time can be spent running |
35 | in a given period. We allocate this "run time" for each realtime group which | ||
36 | the other realtime groups will not be permitted to use. | ||
29 | 37 | ||
30 | system wide: | 38 | Any time not allocated to a realtime group will be used to run normal priority |
39 | tasks (SCHED_OTHER). Any allocated run time not used will also be picked up by | ||
40 | SCHED_OTHER. | ||
31 | 41 | ||
32 | /proc/sys/kernel/sched_rt_period_ms | 42 | Let's consider an example: a frame fixed realtime renderer must deliver 25 |
33 | /proc/sys/kernel/sched_rt_runtime_us | 43 | frames a second, which yields a period of 0.04s per frame. Now say it will also |
44 | have to play some music and respond to input, leaving it with around 80% CPU | ||
45 | time dedicated for the graphics. We can then give this group a run time of 0.8 | ||
46 | * 0.04s = 0.032s. | ||
34 | 47 | ||
35 | CONFIG_FAIR_USER_SCHED | 48 | This way the graphics group will have a 0.04s period with a 0.032s run time |
49 | limit. Now if the audio thread needs to refill the DMA buffer every 0.005s, but | ||
50 | needs only about 3% CPU time to do so, it can do with a 0.03 * 0.005s = | ||
51 | 0.00015s. So this group can be scheduled with a period of 0.005s and a run time | ||
52 | of 0.00015s. | ||
36 | 53 | ||
37 | /sys/kernel/uids/<uid>/cpu_rt_runtime_us | 54 | The remaining CPU time will be used for user input and other tass. Because |
55 | realtime tasks have explicitly allocated the CPU time they need to perform | ||
56 | their tasks, buffer underruns in the graphocs or audio can be eliminated. | ||
38 | 57 | ||
39 | or | 58 | NOTE: the above example is not fully implemented as of yet (2.6.25). We still |
59 | lack an EDF scheduler to make non-uniform periods usable. | ||
40 | 60 | ||
41 | CONFIG_FAIR_CGROUP_SCHED | ||
42 | 61 | ||
43 | /cgroup/<cgroup>/cpu.rt_runtime_us | 62 | 2. The Interface |
63 | ================ | ||
44 | 64 | ||
45 | [ time is specified in us because the interface is s32; this gives an | ||
46 | operating range of ~35m to 1us ] | ||
47 | 65 | ||
48 | The period takes values in [ 1, INT_MAX ], runtime in [ -1, INT_MAX - 1 ]. | 66 | 2.1 System wide settings |
67 | ------------------------ | ||
49 | 68 | ||
50 | A runtime of -1 specifies runtime == period, ie. no limit. | 69 | The system wide settings are configured under the /proc virtual file system: |
51 | 70 | ||
52 | New groups get the period from /proc/sys/kernel/sched_rt_period_us and | 71 | /proc/sys/kernel/sched_rt_period_us: |
53 | a runtime of 0. | 72 | The scheduling period that is equivalent to 100% CPU bandwidth |
54 | 73 | ||
55 | Settings are constrained to: | 74 | /proc/sys/kernel/sched_rt_runtime_us: |
75 | A global limit on how much time realtime scheduling may use. Even without | ||
76 | CONFIG_RT_GROUP_SCHED enabled, this will limit time reserved to realtime | ||
77 | processes. With CONFIG_RT_GROUP_SCHED it signifies the total bandwidth | ||
78 | available to all realtime groups. | ||
79 | |||
80 | * Time is specified in us because the interface is s32. This gives an | ||
81 | operating range from 1us to about 35 minutes. | ||
82 | * sched_rt_period_us takes values from 1 to INT_MAX. | ||
83 | * sched_rt_runtime_us takes values from -1 to (INT_MAX - 1). | ||
84 | * A run time of -1 specifies runtime == period, ie. no limit. | ||
85 | |||
86 | |||
87 | 2.2 Default behaviour | ||
88 | --------------------- | ||
89 | |||
90 | The default values for sched_rt_period_us (1000000 or 1s) and | ||
91 | sched_rt_runtime_us (950000 or 0.95s). This gives 0.05s to be used by | ||
92 | SCHED_OTHER (non-RT tasks). These defaults were chosen so that a run-away | ||
93 | realtime tasks will not lock up the machine but leave a little time to recover | ||
94 | it. By setting runtime to -1 you'd get the old behaviour back. | ||
95 | |||
96 | By default all bandwidth is assigned to the root group and new groups get the | ||
97 | period from /proc/sys/kernel/sched_rt_period_us and a run time of 0. If you | ||
98 | want to assign bandwidth to another group, reduce the root group's bandwidth | ||
99 | and assign some or all of the difference to another group. | ||
100 | |||
101 | Realtime group scheduling means you have to assign a portion of total CPU | ||
102 | bandwidth to the group before it will accept realtime tasks. Therefore you will | ||
103 | not be able to run realtime tasks as any user other than root until you have | ||
104 | done that, even if the user has the rights to run processes with realtime | ||
105 | priority! | ||
106 | |||
107 | |||
108 | 2.3 Basis for grouping tasks | ||
109 | ---------------------------- | ||
110 | |||
111 | There are two compile-time settings for allocating CPU bandwidth. These are | ||
112 | configured using the "Basis for grouping tasks" multiple choice menu under | ||
113 | General setup > Group CPU Scheduler: | ||
114 | |||
115 | a. CONFIG_USER_SCHED (aka "Basis for grouping tasks" = "user id") | ||
116 | |||
117 | This lets you use the virtual files under | ||
118 | "/sys/kernel/uids/<uid>/cpu_rt_runtime_us" to control he CPU time reserved for | ||
119 | each user . | ||
120 | |||
121 | The other option is: | ||
122 | |||
123 | .o CONFIG_CGROUP_SCHED (aka "Basis for grouping tasks" = "Control groups") | ||
124 | |||
125 | This uses the /cgroup virtual file system and "/cgroup/<cgroup>/cpu.rt_runtime_us" | ||
126 | to control the CPU time reserved for each control group instead. | ||
127 | |||
128 | For more information on working with control groups, you should read | ||
129 | Documentation/cgroups.txt as well. | ||
130 | |||
131 | Group settings are checked against the following limits in order to keep the configuration | ||
132 | schedulable: | ||
56 | 133 | ||
57 | \Sum_{i} runtime_{i} / global_period <= global_runtime / global_period | 134 | \Sum_{i} runtime_{i} / global_period <= global_runtime / global_period |
58 | 135 | ||
59 | in order to keep the configuration schedulable. | 136 | For now, this can be simplified to just the following (but see Future plans): |
137 | |||
138 | \Sum_{i} runtime_{i} <= global_runtime | ||
139 | |||
140 | |||
141 | 3. Future plans | ||
142 | =============== | ||
143 | |||
144 | There is work in progress to make the scheduling period for each group | ||
145 | ("/sys/kernel/uids/<uid>/cpu_rt_period_us" or | ||
146 | "/cgroup/<cgroup>/cpu.rt_period_us" respectively) configurable as well. | ||
147 | |||
148 | The constraint on the period is that a subgroup must have a smaller or | ||
149 | equal period to its parent. But realistically its not very useful _yet_ | ||
150 | as its prone to starvation without deadline scheduling. | ||
151 | |||
152 | Consider two sibling groups A and B; both have 50% bandwidth, but A's | ||
153 | period is twice the length of B's. | ||
154 | |||
155 | * group A: period=100000us, runtime=10000us | ||
156 | - this runs for 0.01s once every 0.1s | ||
157 | |||
158 | * group B: period= 50000us, runtime=10000us | ||
159 | - this runs for 0.01s twice every 0.1s (or once every 0.05 sec). | ||
160 | |||
161 | This means that currently a while (1) loop in A will run for the full period of | ||
162 | B and can starve B's tasks (assuming they are of lower priority) for a whole | ||
163 | period. | ||
164 | |||
165 | The next project will be SCHED_EDF (Earliest Deadline First scheduling) to bring | ||
166 | full deadline scheduling to the linux kernel. Deadline scheduling the above | ||
167 | groups and treating end of the period as a deadline will ensure that they both | ||
168 | get their allocated time. | ||
169 | |||
170 | Implementing SCHED_EDF might take a while to complete. Priority Inheritance is | ||
171 | the biggest challenge as the current linux PI infrastructure is geared towards | ||
172 | the limited static priority levels 0-139. With deadline scheduling you need to | ||
173 | do deadline inheritance (since priority is inversely proportional to the | ||
174 | deadline delta (deadline - now). | ||
175 | |||
176 | This means the whole PI machinery will have to be reworked - and that is one of | ||
177 | the most complex pieces of code we have. | ||
diff --git a/Documentation/scsi/st.txt b/Documentation/scsi/st.txt index b7be95b5bd24..40752602c050 100644 --- a/Documentation/scsi/st.txt +++ b/Documentation/scsi/st.txt | |||
@@ -2,7 +2,7 @@ This file contains brief information about the SCSI tape driver. | |||
2 | The driver is currently maintained by Kai Mäkisara (email | 2 | The driver is currently maintained by Kai Mäkisara (email |
3 | Kai.Makisara@kolumbus.fi) | 3 | Kai.Makisara@kolumbus.fi) |
4 | 4 | ||
5 | Last modified: Mon Mar 7 21:14:44 2005 by kai.makisara | 5 | Last modified: Sun Feb 24 21:59:07 2008 by kai.makisara |
6 | 6 | ||
7 | 7 | ||
8 | BASICS | 8 | BASICS |
@@ -133,6 +133,11 @@ the defaults set by the user. The value -1 means the default is not set. The | |||
133 | file 'dev' contains the device numbers corresponding to this device. The links | 133 | file 'dev' contains the device numbers corresponding to this device. The links |
134 | 'device' and 'driver' point to the SCSI device and driver entries. | 134 | 'device' and 'driver' point to the SCSI device and driver entries. |
135 | 135 | ||
136 | Each directory also contains the entry 'options' which shows the currently | ||
137 | enabled driver and mode options. The value in the file is a bit mask where the | ||
138 | bit definitions are the same as those used with MTSETDRVBUFFER in setting the | ||
139 | options. | ||
140 | |||
136 | A link named 'tape' is made from the SCSI device directory to the class | 141 | A link named 'tape' is made from the SCSI device directory to the class |
137 | directory corresponding to the mode 0 auto-rewind device (e.g., st0). | 142 | directory corresponding to the mode 0 auto-rewind device (e.g., st0). |
138 | 143 | ||
@@ -372,6 +377,11 @@ MTSETDRVBUFFER | |||
372 | MT_ST_SYSV sets the SYSV semantics (mode) | 377 | MT_ST_SYSV sets the SYSV semantics (mode) |
373 | MT_ST_NOWAIT enables immediate mode (i.e., don't wait for | 378 | MT_ST_NOWAIT enables immediate mode (i.e., don't wait for |
374 | the command to finish) for some commands (e.g., rewind) | 379 | the command to finish) for some commands (e.g., rewind) |
380 | MT_ST_SILI enables setting the SILI bit in SCSI commands when | ||
381 | reading in variable block mode to enhance performance when | ||
382 | reading blocks shorter than the byte count; set this only | ||
383 | if you are sure that the drive supports SILI and the HBA | ||
384 | correctly returns transfer residuals | ||
375 | MT_ST_DEBUGGING debugging (global; debugging must be | 385 | MT_ST_DEBUGGING debugging (global; debugging must be |
376 | compiled into the driver) | 386 | compiled into the driver) |
377 | MT_ST_SETBOOLEANS | 387 | MT_ST_SETBOOLEANS |
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..fd4c32a031c9 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 | ||
@@ -818,19 +825,25 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed. | |||
818 | hippo_1 Hippo (Benq) with jack detection | 825 | hippo_1 Hippo (Benq) with jack detection |
819 | sony-assamd Sony ASSAMD | 826 | sony-assamd Sony ASSAMD |
820 | ultra Samsung Q1 Ultra Vista model | 827 | ultra Samsung Q1 Ultra Vista model |
828 | lenovo-3000 Lenovo 3000 y410 | ||
821 | basic fixed pin assignment w/o SPDIF | 829 | basic fixed pin assignment w/o SPDIF |
822 | auto auto-config reading BIOS (default) | 830 | auto auto-config reading BIOS (default) |
823 | 831 | ||
824 | ALC268 | 832 | ALC267/268 |
833 | quanta-il1 Quanta IL1 mini-notebook | ||
825 | 3stack 3-stack model | 834 | 3stack 3-stack model |
826 | toshiba Toshiba A205 | 835 | toshiba Toshiba A205 |
827 | acer Acer laptops | 836 | acer Acer laptops |
828 | dell Dell OEM laptops (Vostro 1200) | 837 | dell Dell OEM laptops (Vostro 1200) |
838 | zepto Zepto laptops | ||
829 | test for testing/debugging purpose, almost all controls can | 839 | test for testing/debugging purpose, almost all controls can |
830 | adjusted. Appearing only when compiled with | 840 | adjusted. Appearing only when compiled with |
831 | $CONFIG_SND_DEBUG=y | 841 | $CONFIG_SND_DEBUG=y |
832 | auto auto-config reading BIOS (default) | 842 | auto auto-config reading BIOS (default) |
833 | 843 | ||
844 | ALC269 | ||
845 | basic Basic preset | ||
846 | |||
834 | ALC662 | 847 | ALC662 |
835 | 3stack-dig 3-stack (2-channel) with SPDIF | 848 | 3stack-dig 3-stack (2-channel) with SPDIF |
836 | 3stack-6ch 3-stack (6-channel) | 849 | 3stack-6ch 3-stack (6-channel) |
@@ -871,10 +884,11 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed. | |||
871 | lenovo-nb0763 Lenovo NB0763 | 884 | lenovo-nb0763 Lenovo NB0763 |
872 | lenovo-ms7195-dig Lenovo MS7195 | 885 | lenovo-ms7195-dig Lenovo MS7195 |
873 | haier-w66 Haier W66 | 886 | haier-w66 Haier W66 |
874 | 6stack-hp HP machines with 6stack (Nettle boards) | ||
875 | 3stack-hp HP machines with 3stack (Lucknow, Samba boards) | 887 | 3stack-hp HP machines with 3stack (Lucknow, Samba boards) |
876 | 6stack-dell Dell machines with 6stack (Inspiron 530) | 888 | 6stack-dell Dell machines with 6stack (Inspiron 530) |
877 | mitac Mitac 8252D | 889 | mitac Mitac 8252D |
890 | clevo-m720 Clevo M720 laptop series | ||
891 | fujitsu-pi2515 Fujitsu AMILO Pi2515 | ||
878 | auto auto-config reading BIOS (default) | 892 | auto auto-config reading BIOS (default) |
879 | 893 | ||
880 | ALC861/660 | 894 | ALC861/660 |
@@ -911,6 +925,12 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed. | |||
911 | 3stack 3-stack mode (default) | 925 | 3stack 3-stack mode (default) |
912 | 6stack 6-stack mode | 926 | 6stack 6-stack mode |
913 | 927 | ||
928 | AD1884A / AD1883 / AD1984A / AD1984B | ||
929 | desktop 3-stack desktop (default) | ||
930 | laptop laptop with HP jack sensing | ||
931 | mobile mobile devices with HP jack sensing | ||
932 | thinkpad Lenovo Thinkpad X300 | ||
933 | |||
914 | AD1884 | 934 | AD1884 |
915 | N/A | 935 | N/A |
916 | 936 | ||
@@ -936,7 +956,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) | 956 | laptop-automute 2-channel with EAPD and HP-automute (Lenovo N100) |
937 | ultra 2-channel with EAPD (Samsung Ultra tablet PC) | 957 | ultra 2-channel with EAPD (Samsung Ultra tablet PC) |
938 | 958 | ||
939 | AD1988 | 959 | AD1988/AD1988B/AD1989A/AD1989B |
940 | 6stack 6-jack | 960 | 6stack 6-jack |
941 | 6stack-dig ditto with SPDIF | 961 | 6stack-dig ditto with SPDIF |
942 | 3stack 3-jack | 962 | 3stack 3-jack |
@@ -979,6 +999,7 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed. | |||
979 | dell-m26 Dell Inspiron 1501 | 999 | dell-m26 Dell Inspiron 1501 |
980 | dell-m27 Dell Inspiron E1705/9400 | 1000 | dell-m27 Dell Inspiron E1705/9400 |
981 | gateway Gateway laptops with EAPD control | 1001 | gateway Gateway laptops with EAPD control |
1002 | panasonic Panasonic CF-74 | ||
982 | 1003 | ||
983 | STAC9205/9254 | 1004 | STAC9205/9254 |
984 | ref Reference board | 1005 | ref Reference board |
@@ -1017,6 +1038,16 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed. | |||
1017 | 3stack D965 3stack | 1038 | 3stack D965 3stack |
1018 | 5stack D965 5stack + SPDIF | 1039 | 5stack D965 5stack + SPDIF |
1019 | dell-3stack Dell Dimension E520 | 1040 | dell-3stack Dell Dimension E520 |
1041 | dell-bios Fixes with Dell BIOS setup | ||
1042 | |||
1043 | STAC92HD71B* | ||
1044 | ref Reference board | ||
1045 | dell-m4-1 Dell desktops | ||
1046 | dell-m4-2 Dell desktops | ||
1047 | |||
1048 | STAC92HD73* | ||
1049 | ref Reference board | ||
1050 | dell-m6 Dell desktops | ||
1020 | 1051 | ||
1021 | STAC9872 | 1052 | STAC9872 |
1022 | vaio Setup for VAIO FE550G/SZ110 | 1053 | vaio Setup for VAIO FE550G/SZ110 |
@@ -1590,6 +1621,16 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed. | |||
1590 | 1621 | ||
1591 | Power management is _not_ supported. | 1622 | Power management is _not_ supported. |
1592 | 1623 | ||
1624 | Module snd-pcsp | ||
1625 | ----------------- | ||
1626 | |||
1627 | Module for internal PC-Speaker. | ||
1628 | |||
1629 | nforce_wa - enable NForce chipset workaround. Expect bad sound. | ||
1630 | |||
1631 | This module supports system beeps, some kind of PCM playback and | ||
1632 | even a few mixer controls. | ||
1633 | |||
1593 | Module snd-pcxhr | 1634 | Module snd-pcxhr |
1594 | ---------------- | 1635 | ---------------- |
1595 | 1636 | ||
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/thermal/sysfs-api.txt b/Documentation/thermal/sysfs-api.txt index d9f28be75403..70d68ce8640a 100644 --- a/Documentation/thermal/sysfs-api.txt +++ b/Documentation/thermal/sysfs-api.txt | |||
@@ -108,10 +108,12 @@ and throttle appropriate devices. | |||
108 | RO read only value | 108 | RO read only value |
109 | RW read/write value | 109 | RW read/write value |
110 | 110 | ||
111 | All thermal sysfs attributes will be represented under /sys/class/thermal | 111 | Thermal sysfs attributes will be represented under /sys/class/thermal. |
112 | Hwmon sysfs I/F extension is also available under /sys/class/hwmon | ||
113 | if hwmon is compiled in or built as a module. | ||
112 | 114 | ||
113 | Thermal zone device sys I/F, created once it's registered: | 115 | Thermal zone device sys I/F, created once it's registered: |
114 | |thermal_zone[0-*]: | 116 | /sys/class/thermal/thermal_zone[0-*]: |
115 | |-----type: Type of the thermal zone | 117 | |-----type: Type of the thermal zone |
116 | |-----temp: Current temperature | 118 | |-----temp: Current temperature |
117 | |-----mode: Working mode of the thermal zone | 119 | |-----mode: Working mode of the thermal zone |
@@ -119,7 +121,7 @@ Thermal zone device sys I/F, created once it's registered: | |||
119 | |-----trip_point_[0-*]_type: Trip point type | 121 | |-----trip_point_[0-*]_type: Trip point type |
120 | 122 | ||
121 | Thermal cooling device sys I/F, created once it's registered: | 123 | Thermal cooling device sys I/F, created once it's registered: |
122 | |cooling_device[0-*]: | 124 | /sys/class/thermal/cooling_device[0-*]: |
123 | |-----type : Type of the cooling device(processor/fan/...) | 125 | |-----type : Type of the cooling device(processor/fan/...) |
124 | |-----max_state: Maximum cooling state of the cooling device | 126 | |-----max_state: Maximum cooling state of the cooling device |
125 | |-----cur_state: Current cooling state of the cooling device | 127 | |-----cur_state: Current cooling state of the cooling device |
@@ -130,10 +132,19 @@ They represent the relationship between a thermal zone and its associated coolin | |||
130 | They are created/removed for each | 132 | They are created/removed for each |
131 | thermal_zone_bind_cooling_device/thermal_zone_unbind_cooling_device successful execution. | 133 | thermal_zone_bind_cooling_device/thermal_zone_unbind_cooling_device successful execution. |
132 | 134 | ||
133 | |thermal_zone[0-*] | 135 | /sys/class/thermal/thermal_zone[0-*] |
134 | |-----cdev[0-*]: The [0-*]th cooling device in the current thermal zone | 136 | |-----cdev[0-*]: The [0-*]th cooling device in the current thermal zone |
135 | |-----cdev[0-*]_trip_point: Trip point that cdev[0-*] is associated with | 137 | |-----cdev[0-*]_trip_point: Trip point that cdev[0-*] is associated with |
136 | 138 | ||
139 | Besides the thermal zone device sysfs I/F and cooling device sysfs I/F, | ||
140 | the generic thermal driver also creates a hwmon sysfs I/F for each _type_ of | ||
141 | thermal zone device. E.g. the generic thermal driver registers one hwmon class device | ||
142 | and build the associated hwmon sysfs I/F for all the registered ACPI thermal zones. | ||
143 | /sys/class/hwmon/hwmon[0-*]: | ||
144 | |-----name: The type of the thermal zone devices. | ||
145 | |-----temp[1-*]_input: The current temperature of thermal zone [1-*]. | ||
146 | |-----temp[1-*]_critical: The critical trip point of thermal zone [1-*]. | ||
147 | Please read Documentation/hwmon/sysfs-interface for additional information. | ||
137 | 148 | ||
138 | *************************** | 149 | *************************** |
139 | * Thermal zone attributes * | 150 | * Thermal zone attributes * |
@@ -141,7 +152,10 @@ thermal_zone_bind_cooling_device/thermal_zone_unbind_cooling_device successful e | |||
141 | 152 | ||
142 | type Strings which represent the thermal zone type. | 153 | type Strings which represent the thermal zone type. |
143 | This is given by thermal zone driver as part of registration. | 154 | This is given by thermal zone driver as part of registration. |
144 | Eg: "ACPI thermal zone" indicates it's a ACPI thermal device | 155 | Eg: "acpitz" indicates it's an ACPI thermal device. |
156 | In order to keep it consistent with hwmon sys attribute, | ||
157 | this should be a short, lowercase string, | ||
158 | not containing spaces nor dashes. | ||
145 | RO | 159 | RO |
146 | Required | 160 | Required |
147 | 161 | ||
@@ -218,7 +232,7 @@ the sys I/F structure will be built like this: | |||
218 | /sys/class/thermal: | 232 | /sys/class/thermal: |
219 | 233 | ||
220 | |thermal_zone1: | 234 | |thermal_zone1: |
221 | |-----type: ACPI thermal zone | 235 | |-----type: acpitz |
222 | |-----temp: 37000 | 236 | |-----temp: 37000 |
223 | |-----mode: kernel | 237 | |-----mode: kernel |
224 | |-----trip_point_0_temp: 100000 | 238 | |-----trip_point_0_temp: 100000 |
@@ -243,3 +257,10 @@ the sys I/F structure will be built like this: | |||
243 | |-----type: Fan | 257 | |-----type: Fan |
244 | |-----max_state: 2 | 258 | |-----max_state: 2 |
245 | |-----cur_state: 0 | 259 | |-----cur_state: 0 |
260 | |||
261 | /sys/class/hwmon: | ||
262 | |||
263 | |hwmon0: | ||
264 | |-----name: acpitz | ||
265 | |-----temp1_input: 37000 | ||
266 | |-----temp1_crit: 100000 | ||
diff --git a/Documentation/hrtimers/highres.txt b/Documentation/timers/highres.txt index a73ecf5b4bdb..a73ecf5b4bdb 100644 --- a/Documentation/hrtimers/highres.txt +++ b/Documentation/timers/highres.txt | |||
diff --git a/Documentation/hrtimers/hrtimers.txt b/Documentation/timers/hrtimers.txt index ce31f65e12e7..ce31f65e12e7 100644 --- a/Documentation/hrtimers/hrtimers.txt +++ b/Documentation/timers/hrtimers.txt | |||
diff --git a/Documentation/hrtimer/timer_stats.txt b/Documentation/timers/timer_stats.txt index 20d368c59814..20d368c59814 100644 --- a/Documentation/hrtimer/timer_stats.txt +++ b/Documentation/timers/timer_stats.txt | |||
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"); |
diff --git a/Documentation/x86/pat.txt b/Documentation/x86/pat.txt new file mode 100644 index 000000000000..17965f927c15 --- /dev/null +++ b/Documentation/x86/pat.txt | |||
@@ -0,0 +1,100 @@ | |||
1 | |||
2 | PAT (Page Attribute Table) | ||
3 | |||
4 | x86 Page Attribute Table (PAT) allows for setting the memory attribute at the | ||
5 | page level granularity. PAT is complementary to the MTRR settings which allows | ||
6 | for setting of memory types over physical address ranges. However, PAT is | ||
7 | more flexible than MTRR due to its capability to set attributes at page level | ||
8 | and also due to the fact that there are no hardware limitations on number of | ||
9 | such attribute settings allowed. Added flexibility comes with guidelines for | ||
10 | not having memory type aliasing for the same physical memory with multiple | ||
11 | virtual addresses. | ||
12 | |||
13 | PAT allows for different types of memory attributes. The most commonly used | ||
14 | ones that will be supported at this time are Write-back, Uncached, | ||
15 | Write-combined and Uncached Minus. | ||
16 | |||
17 | There are many different APIs in the kernel that allows setting of memory | ||
18 | attributes at the page level. In order to avoid aliasing, these interfaces | ||
19 | should be used thoughtfully. Below is a table of interfaces available, | ||
20 | their intended usage and their memory attribute relationships. Internally, | ||
21 | these APIs use a reserve_memtype()/free_memtype() interface on the physical | ||
22 | address range to avoid any aliasing. | ||
23 | |||
24 | |||
25 | ------------------------------------------------------------------- | ||
26 | API | RAM | ACPI,... | Reserved/Holes | | ||
27 | -----------------------|----------|------------|------------------| | ||
28 | | | | | | ||
29 | ioremap | -- | UC | UC | | ||
30 | | | | | | ||
31 | ioremap_cache | -- | WB | WB | | ||
32 | | | | | | ||
33 | ioremap_nocache | -- | UC | UC | | ||
34 | | | | | | ||
35 | ioremap_wc | -- | -- | WC | | ||
36 | | | | | | ||
37 | set_memory_uc | UC | -- | -- | | ||
38 | set_memory_wb | | | | | ||
39 | | | | | | ||
40 | set_memory_wc | WC | -- | -- | | ||
41 | set_memory_wb | | | | | ||
42 | | | | | | ||
43 | pci sysfs resource | -- | -- | UC | | ||
44 | | | | | | ||
45 | pci sysfs resource_wc | -- | -- | WC | | ||
46 | is IORESOURCE_PREFETCH| | | | | ||
47 | | | | | | ||
48 | pci proc | -- | -- | UC | | ||
49 | !PCIIOC_WRITE_COMBINE | | | | | ||
50 | | | | | | ||
51 | pci proc | -- | -- | WC | | ||
52 | PCIIOC_WRITE_COMBINE | | | | | ||
53 | | | | | | ||
54 | /dev/mem | -- | UC | UC | | ||
55 | read-write | | | | | ||
56 | | | | | | ||
57 | /dev/mem | -- | UC | UC | | ||
58 | mmap SYNC flag | | | | | ||
59 | | | | | | ||
60 | /dev/mem | -- | WB/WC/UC | WB/WC/UC | | ||
61 | mmap !SYNC flag | |(from exist-| (from exist- | | ||
62 | and | | ing alias)| ing alias) | | ||
63 | any alias to this area| | | | | ||
64 | | | | | | ||
65 | /dev/mem | -- | WB | WB | | ||
66 | mmap !SYNC flag | | | | | ||
67 | no alias to this area | | | | | ||
68 | and | | | | | ||
69 | MTRR says WB | | | | | ||
70 | | | | | | ||
71 | /dev/mem | -- | -- | UC_MINUS | | ||
72 | mmap !SYNC flag | | | | | ||
73 | no alias to this area | | | | | ||
74 | and | | | | | ||
75 | MTRR says !WB | | | | | ||
76 | | | | | | ||
77 | ------------------------------------------------------------------- | ||
78 | |||
79 | Notes: | ||
80 | |||
81 | -- in the above table mean "Not suggested usage for the API". Some of the --'s | ||
82 | are strictly enforced by the kernel. Some others are not really enforced | ||
83 | today, but may be enforced in future. | ||
84 | |||
85 | For ioremap and pci access through /sys or /proc - The actual type returned | ||
86 | can be more restrictive, in case of any existing aliasing for that address. | ||
87 | For example: If there is an existing uncached mapping, a new ioremap_wc can | ||
88 | return uncached mapping in place of write-combine requested. | ||
89 | |||
90 | set_memory_[uc|wc] and set_memory_wb should be used in pairs, where driver will | ||
91 | first make a region uc or wc and switch it back to wb after use. | ||
92 | |||
93 | Over time writes to /proc/mtrr will be deprecated in favor of using PAT based | ||
94 | interfaces. Users writing to /proc/mtrr are suggested to use above interfaces. | ||
95 | |||
96 | Drivers should use ioremap_[uc|wc] to access PCI BARs with [uc|wc] access | ||
97 | types. | ||
98 | |||
99 | Drivers should use set_memory_[uc|wc] to set access type for RAM ranges. | ||
100 | |||
diff --git a/Documentation/x86_64/boot-options.txt b/Documentation/x86_64/boot-options.txt index 34abae4e9442..b0c7b6c4abda 100644 --- a/Documentation/x86_64/boot-options.txt +++ b/Documentation/x86_64/boot-options.txt | |||
@@ -307,3 +307,8 @@ Debugging | |||
307 | stuck (default) | 307 | stuck (default) |
308 | 308 | ||
309 | Miscellaneous | 309 | Miscellaneous |
310 | |||
311 | nogbpages | ||
312 | Do not use GB pages for kernel direct mappings. | ||
313 | gbpages | ||
314 | Use GB pages for kernel direct mappings. | ||