diff options
author | James Bottomley <jejb@mulgrave.il.steeleye.com> | 2006-11-22 13:06:44 -0500 |
---|---|---|
committer | James Bottomley <jejb@mulgrave.il.steeleye.com> | 2006-11-22 13:06:44 -0500 |
commit | 0bd2af46839ad6262d25714a6ec0365db9d6b98f (patch) | |
tree | dcced72d230d69fd0c5816ac6dd03ab84799a93e /Documentation | |
parent | e138a5d2356729b8752e88520cc1525fae9794ac (diff) | |
parent | f26b90440cd74c78fe10c9bd5160809704a9627c (diff) |
Merge ../scsi-rc-fixes-2.6
Diffstat (limited to 'Documentation')
34 files changed, 796 insertions, 412 deletions
diff --git a/Documentation/ABI/testing/sysfs-power b/Documentation/ABI/testing/sysfs-power index d882f8093871..dcff4d0623ad 100644 --- a/Documentation/ABI/testing/sysfs-power +++ b/Documentation/ABI/testing/sysfs-power | |||
@@ -21,7 +21,7 @@ Description: | |||
21 | these states. | 21 | these states. |
22 | 22 | ||
23 | What: /sys/power/disk | 23 | What: /sys/power/disk |
24 | Date: August 2006 | 24 | Date: September 2006 |
25 | Contact: Rafael J. Wysocki <rjw@sisk.pl> | 25 | Contact: Rafael J. Wysocki <rjw@sisk.pl> |
26 | Description: | 26 | Description: |
27 | The /sys/power/disk file controls the operating mode of the | 27 | The /sys/power/disk file controls the operating mode of the |
@@ -39,6 +39,19 @@ Description: | |||
39 | 'reboot' - the memory image will be saved by the kernel and | 39 | 'reboot' - the memory image will be saved by the kernel and |
40 | the system will be rebooted. | 40 | the system will be rebooted. |
41 | 41 | ||
42 | Additionally, /sys/power/disk can be used to turn on one of the | ||
43 | two testing modes of the suspend-to-disk mechanism: 'testproc' | ||
44 | or 'test'. If the suspend-to-disk mechanism is in the | ||
45 | 'testproc' mode, writing 'disk' to /sys/power/state will cause | ||
46 | the kernel to disable nonboot CPUs and freeze tasks, wait for 5 | ||
47 | seconds, unfreeze tasks and enable nonboot CPUs. If it is in | ||
48 | the 'test' mode, writing 'disk' to /sys/power/state will cause | ||
49 | the kernel to disable nonboot CPUs and freeze tasks, shrink | ||
50 | memory, suspend devices, wait for 5 seconds, resume devices, | ||
51 | unfreeze tasks and enable nonboot CPUs. Then, we are able to | ||
52 | look in the log messages and work out, for example, which code | ||
53 | is being slow and which device drivers are misbehaving. | ||
54 | |||
42 | The suspend-to-disk method may be chosen by writing to this | 55 | The suspend-to-disk method may be chosen by writing to this |
43 | file one of the accepted strings: | 56 | file one of the accepted strings: |
44 | 57 | ||
@@ -46,6 +59,8 @@ Description: | |||
46 | 'platform' | 59 | 'platform' |
47 | 'shutdown' | 60 | 'shutdown' |
48 | 'reboot' | 61 | 'reboot' |
62 | 'testproc' | ||
63 | 'test' | ||
49 | 64 | ||
50 | It will only change to 'firmware' or 'platform' if the system | 65 | It will only change to 'firmware' or 'platform' if the system |
51 | supports that. | 66 | supports that. |
diff --git a/Documentation/DocBook/Makefile b/Documentation/DocBook/Makefile index 66e1cf733571..db9499adbed4 100644 --- a/Documentation/DocBook/Makefile +++ b/Documentation/DocBook/Makefile | |||
@@ -9,7 +9,7 @@ | |||
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 \ | 11 | procfs-guide.xml writing_usb_driver.xml \ |
12 | kernel-api.xml journal-api.xml lsm.xml usb.xml \ | 12 | kernel-api.xml filesystems.xml lsm.xml usb.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 | 14 | genericirq.xml |
15 | 15 | ||
diff --git a/Documentation/DocBook/journal-api.tmpl b/Documentation/DocBook/filesystems.tmpl index 2077f9a28c19..39fa2aba7f9b 100644 --- a/Documentation/DocBook/journal-api.tmpl +++ b/Documentation/DocBook/filesystems.tmpl | |||
@@ -2,39 +2,11 @@ | |||
2 | <!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN" | 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" []> | 3 | "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd" []> |
4 | 4 | ||
5 | <book id="LinuxJBDAPI"> | 5 | <book id="Linux-filesystems-API"> |
6 | <bookinfo> | 6 | <bookinfo> |
7 | <title>The Linux Journalling API</title> | 7 | <title>Linux Filesystems API</title> |
8 | <authorgroup> | ||
9 | <author> | ||
10 | <firstname>Roger</firstname> | ||
11 | <surname>Gammans</surname> | ||
12 | <affiliation> | ||
13 | <address> | ||
14 | <email>rgammans@computer-surgery.co.uk</email> | ||
15 | </address> | ||
16 | </affiliation> | ||
17 | </author> | ||
18 | </authorgroup> | ||
19 | |||
20 | <authorgroup> | ||
21 | <author> | ||
22 | <firstname>Stephen</firstname> | ||
23 | <surname>Tweedie</surname> | ||
24 | <affiliation> | ||
25 | <address> | ||
26 | <email>sct@redhat.com</email> | ||
27 | </address> | ||
28 | </affiliation> | ||
29 | </author> | ||
30 | </authorgroup> | ||
31 | 8 | ||
32 | <copyright> | 9 | <legalnotice> |
33 | <year>2002</year> | ||
34 | <holder>Roger Gammans</holder> | ||
35 | </copyright> | ||
36 | |||
37 | <legalnotice> | ||
38 | <para> | 10 | <para> |
39 | This documentation is free software; you can redistribute | 11 | This documentation is free software; you can redistribute |
40 | it and/or modify it under the terms of the GNU General Public | 12 | it and/or modify it under the terms of the GNU General Public |
@@ -42,21 +14,21 @@ | |||
42 | version 2 of the License, or (at your option) any later | 14 | version 2 of the License, or (at your option) any later |
43 | version. | 15 | version. |
44 | </para> | 16 | </para> |
45 | 17 | ||
46 | <para> | 18 | <para> |
47 | This program is distributed in the hope that it will be | 19 | This program is distributed in the hope that it will be |
48 | useful, but WITHOUT ANY WARRANTY; without even the implied | 20 | useful, but WITHOUT ANY WARRANTY; without even the implied |
49 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | 21 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
50 | See the GNU General Public License for more details. | 22 | See the GNU General Public License for more details. |
51 | </para> | 23 | </para> |
52 | 24 | ||
53 | <para> | 25 | <para> |
54 | You should have received a copy of the GNU General Public | 26 | You should have received a copy of the GNU General Public |
55 | License along with this program; if not, write to the Free | 27 | License along with this program; if not, write to the Free |
56 | Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, | 28 | Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, |
57 | MA 02111-1307 USA | 29 | MA 02111-1307 USA |
58 | </para> | 30 | </para> |
59 | 31 | ||
60 | <para> | 32 | <para> |
61 | For more details see the file COPYING in the source | 33 | For more details see the file COPYING in the source |
62 | distribution of Linux. | 34 | distribution of Linux. |
@@ -66,17 +38,113 @@ | |||
66 | 38 | ||
67 | <toc></toc> | 39 | <toc></toc> |
68 | 40 | ||
69 | <chapter id="Overview"> | 41 | <chapter id="vfs"> |
42 | <title>The Linux VFS</title> | ||
43 | <sect1><title>The Filesystem types</title> | ||
44 | !Iinclude/linux/fs.h | ||
45 | </sect1> | ||
46 | <sect1><title>The Directory Cache</title> | ||
47 | !Efs/dcache.c | ||
48 | !Iinclude/linux/dcache.h | ||
49 | </sect1> | ||
50 | <sect1><title>Inode Handling</title> | ||
51 | !Efs/inode.c | ||
52 | !Efs/bad_inode.c | ||
53 | </sect1> | ||
54 | <sect1><title>Registration and Superblocks</title> | ||
55 | !Efs/super.c | ||
56 | </sect1> | ||
57 | <sect1><title>File Locks</title> | ||
58 | !Efs/locks.c | ||
59 | !Ifs/locks.c | ||
60 | </sect1> | ||
61 | <sect1><title>Other Functions</title> | ||
62 | !Efs/mpage.c | ||
63 | !Efs/namei.c | ||
64 | !Efs/buffer.c | ||
65 | !Efs/bio.c | ||
66 | !Efs/seq_file.c | ||
67 | !Efs/filesystems.c | ||
68 | !Efs/fs-writeback.c | ||
69 | !Efs/block_dev.c | ||
70 | </sect1> | ||
71 | </chapter> | ||
72 | |||
73 | <chapter id="proc"> | ||
74 | <title>The proc filesystem</title> | ||
75 | |||
76 | <sect1><title>sysctl interface</title> | ||
77 | !Ekernel/sysctl.c | ||
78 | </sect1> | ||
79 | |||
80 | <sect1><title>proc filesystem interface</title> | ||
81 | !Ifs/proc/base.c | ||
82 | </sect1> | ||
83 | </chapter> | ||
84 | |||
85 | <chapter id="sysfs"> | ||
86 | <title>The Filesystem for Exporting Kernel Objects</title> | ||
87 | !Efs/sysfs/file.c | ||
88 | !Efs/sysfs/symlink.c | ||
89 | !Efs/sysfs/bin.c | ||
90 | </chapter> | ||
91 | |||
92 | <chapter id="debugfs"> | ||
93 | <title>The debugfs filesystem</title> | ||
94 | |||
95 | <sect1><title>debugfs interface</title> | ||
96 | !Efs/debugfs/inode.c | ||
97 | !Efs/debugfs/file.c | ||
98 | </sect1> | ||
99 | </chapter> | ||
100 | |||
101 | <chapter id="LinuxJDBAPI"> | ||
102 | <chapterinfo> | ||
103 | <title>The Linux Journalling API</title> | ||
104 | |||
105 | <authorgroup> | ||
106 | <author> | ||
107 | <firstname>Roger</firstname> | ||
108 | <surname>Gammans</surname> | ||
109 | <affiliation> | ||
110 | <address> | ||
111 | <email>rgammans@computer-surgery.co.uk</email> | ||
112 | </address> | ||
113 | </affiliation> | ||
114 | </author> | ||
115 | </authorgroup> | ||
116 | |||
117 | <authorgroup> | ||
118 | <author> | ||
119 | <firstname>Stephen</firstname> | ||
120 | <surname>Tweedie</surname> | ||
121 | <affiliation> | ||
122 | <address> | ||
123 | <email>sct@redhat.com</email> | ||
124 | </address> | ||
125 | </affiliation> | ||
126 | </author> | ||
127 | </authorgroup> | ||
128 | |||
129 | <copyright> | ||
130 | <year>2002</year> | ||
131 | <holder>Roger Gammans</holder> | ||
132 | </copyright> | ||
133 | </chapterinfo> | ||
134 | |||
135 | <title>The Linux Journalling API</title> | ||
136 | |||
137 | <sect1> | ||
70 | <title>Overview</title> | 138 | <title>Overview</title> |
71 | <sect1> | 139 | <sect2> |
72 | <title>Details</title> | 140 | <title>Details</title> |
73 | <para> | 141 | <para> |
74 | The journalling layer is easy to use. You need to | 142 | The journalling layer is easy to use. You need to |
75 | first of all create a journal_t data structure. There are | 143 | first of all create a journal_t data structure. There are |
76 | two calls to do this dependent on how you decide to allocate the physical | 144 | two calls to do this dependent on how you decide to allocate the physical |
77 | media on which the journal resides. The journal_init_inode() call | 145 | media on which the journal resides. The journal_init_inode() call |
78 | is for journals stored in filesystem inodes, or the journal_init_dev() | 146 | is for journals stored in filesystem inodes, or the journal_init_dev() |
79 | call can be use for journal stored on a raw device (in a continuous range | 147 | call can be use for journal stored on a raw device (in a continuous range |
80 | of blocks). A journal_t is a typedef for a struct pointer, so when | 148 | of blocks). A journal_t is a typedef for a struct pointer, so when |
81 | you are finally finished make sure you call journal_destroy() on it | 149 | you are finally finished make sure you call journal_destroy() on it |
82 | to free up any used kernel memory. | 150 | to free up any used kernel memory. |
@@ -91,27 +159,26 @@ need to call journal_create(). | |||
91 | <para> | 159 | <para> |
92 | Most of the time however your journal file will already have been created, but | 160 | Most of the time however your journal file will already have been created, but |
93 | before you load it you must call journal_wipe() to empty the journal file. | 161 | before you load it you must call journal_wipe() to empty the journal file. |
94 | Hang on, you say , what if the filesystem wasn't cleanly umount()'d . Well, it is the | 162 | Hang on, you say , what if the filesystem wasn't cleanly umount()'d . Well, it is the |
95 | job of the client file system to detect this and skip the call to journal_wipe(). | 163 | job of the client file system to detect this and skip the call to journal_wipe(). |
96 | </para> | 164 | </para> |
97 | 165 | ||
98 | <para> | 166 | <para> |
99 | In either case the next call should be to journal_load() which prepares the | 167 | In either case the next call should be to journal_load() which prepares the |
100 | journal file for use. Note that journal_wipe(..,0) calls journal_skip_recovery() | 168 | journal file for use. Note that journal_wipe(..,0) calls journal_skip_recovery() |
101 | for you if it detects any outstanding transactions in the journal and similarly | 169 | for you if it detects any outstanding transactions in the journal and similarly |
102 | journal_load() will call journal_recover() if necessary. | 170 | journal_load() will call journal_recover() if necessary. |
103 | I would advise reading fs/ext3/super.c for examples on this stage. | 171 | I would advise reading fs/ext3/super.c for examples on this stage. |
104 | [RGG: Why is the journal_wipe() call necessary - doesn't this needlessly | 172 | [RGG: Why is the journal_wipe() call necessary - doesn't this needlessly |
105 | complicate the API. Or isn't a good idea for the journal layer to hide | 173 | complicate the API. Or isn't a good idea for the journal layer to hide |
106 | dirty mounts from the client fs] | 174 | dirty mounts from the client fs] |
107 | </para> | 175 | </para> |
108 | 176 | ||
109 | <para> | 177 | <para> |
110 | Now you can go ahead and start modifying the underlying | 178 | Now you can go ahead and start modifying the underlying |
111 | filesystem. Almost. | 179 | filesystem. Almost. |
112 | </para> | 180 | </para> |
113 | 181 | ||
114 | |||
115 | <para> | 182 | <para> |
116 | 183 | ||
117 | You still need to actually journal your filesystem changes, this | 184 | You still need to actually journal your filesystem changes, this |
@@ -138,10 +205,10 @@ individual buffers (blocks). Before you start to modify a buffer you | |||
138 | need to call journal_get_{create,write,undo}_access() as appropriate, | 205 | need to call journal_get_{create,write,undo}_access() as appropriate, |
139 | this allows the journalling layer to copy the unmodified data if it | 206 | this allows the journalling layer to copy the unmodified data if it |
140 | needs to. After all the buffer may be part of a previously uncommitted | 207 | needs to. After all the buffer may be part of a previously uncommitted |
141 | transaction. | 208 | transaction. |
142 | At this point you are at last ready to modify a buffer, and once | 209 | At this point you are at last ready to modify a buffer, and once |
143 | you are have done so you need to call journal_dirty_{meta,}data(). | 210 | you are have done so you need to call journal_dirty_{meta,}data(). |
144 | Or if you've asked for access to a buffer you now know is now longer | 211 | Or if you've asked for access to a buffer you now know is now longer |
145 | required to be pushed back on the device you can call journal_forget() | 212 | required to be pushed back on the device you can call journal_forget() |
146 | in much the same way as you might have used bforget() in the past. | 213 | in much the same way as you might have used bforget() in the past. |
147 | </para> | 214 | </para> |
@@ -156,7 +223,6 @@ Then at umount time , in your put_super() (2.4) or write_super() (2.5) | |||
156 | you can then call journal_destroy() to clean up your in-core journal object. | 223 | you can then call journal_destroy() to clean up your in-core journal object. |
157 | </para> | 224 | </para> |
158 | 225 | ||
159 | |||
160 | <para> | 226 | <para> |
161 | Unfortunately there a couple of ways the journal layer can cause a deadlock. | 227 | Unfortunately there a couple of ways the journal layer can cause a deadlock. |
162 | The first thing to note is that each task can only have | 228 | The first thing to note is that each task can only have |
@@ -164,19 +230,19 @@ a single outstanding transaction at any one time, remember nothing | |||
164 | commits until the outermost journal_stop(). This means | 230 | commits until the outermost journal_stop(). This means |
165 | you must complete the transaction at the end of each file/inode/address | 231 | you must complete the transaction at the end of each file/inode/address |
166 | etc. operation you perform, so that the journalling system isn't re-entered | 232 | etc. operation you perform, so that the journalling system isn't re-entered |
167 | on another journal. Since transactions can't be nested/batched | 233 | on another journal. Since transactions can't be nested/batched |
168 | across differing journals, and another filesystem other than | 234 | across differing journals, and another filesystem other than |
169 | yours (say ext3) may be modified in a later syscall. | 235 | yours (say ext3) may be modified in a later syscall. |
170 | </para> | 236 | </para> |
171 | 237 | ||
172 | <para> | 238 | <para> |
173 | The second case to bear in mind is that journal_start() can | 239 | The second case to bear in mind is that journal_start() can |
174 | block if there isn't enough space in the journal for your transaction | 240 | block if there isn't enough space in the journal for your transaction |
175 | (based on the passed nblocks param) - when it blocks it merely(!) needs to | 241 | (based on the passed nblocks param) - when it blocks it merely(!) needs to |
176 | wait for transactions to complete and be committed from other tasks, | 242 | wait for transactions to complete and be committed from other tasks, |
177 | so essentially we are waiting for journal_stop(). So to avoid | 243 | so essentially we are waiting for journal_stop(). So to avoid |
178 | deadlocks you must treat journal_start/stop() as if they | 244 | deadlocks you must treat journal_start/stop() as if they |
179 | were semaphores and include them in your semaphore ordering rules to prevent | 245 | were semaphores and include them in your semaphore ordering rules to prevent |
180 | deadlocks. Note that journal_extend() has similar blocking behaviour to | 246 | deadlocks. Note that journal_extend() has similar blocking behaviour to |
181 | journal_start() so you can deadlock here just as easily as on journal_start(). | 247 | journal_start() so you can deadlock here just as easily as on journal_start(). |
182 | </para> | 248 | </para> |
@@ -184,7 +250,7 @@ journal_start() so you can deadlock here just as easily as on journal_start(). | |||
184 | <para> | 250 | <para> |
185 | Try to reserve the right number of blocks the first time. ;-). This will | 251 | Try to reserve the right number of blocks the first time. ;-). This will |
186 | be the maximum number of blocks you are going to touch in this transaction. | 252 | be the maximum number of blocks you are going to touch in this transaction. |
187 | I advise having a look at at least ext3_jbd.h to see the basis on which | 253 | I advise having a look at at least ext3_jbd.h to see the basis on which |
188 | ext3 uses to make these decisions. | 254 | ext3 uses to make these decisions. |
189 | </para> | 255 | </para> |
190 | 256 | ||
@@ -193,13 +259,13 @@ Another wriggle to watch out for is your on-disk block allocation strategy. | |||
193 | why? Because, if you undo a delete, you need to ensure you haven't reused any | 259 | why? Because, if you undo a delete, you need to ensure you haven't reused any |
194 | of the freed blocks in a later transaction. One simple way of doing this | 260 | of the freed blocks in a later transaction. One simple way of doing this |
195 | is make sure any blocks you allocate only have checkpointed transactions | 261 | is make sure any blocks you allocate only have checkpointed transactions |
196 | listed against them. Ext3 does this in ext3_test_allocatable(). | 262 | listed against them. Ext3 does this in ext3_test_allocatable(). |
197 | </para> | 263 | </para> |
198 | 264 | ||
199 | <para> | 265 | <para> |
200 | Lock is also providing through journal_{un,}lock_updates(), | 266 | Lock is also providing through journal_{un,}lock_updates(), |
201 | ext3 uses this when it wants a window with a clean and stable fs for a moment. | 267 | ext3 uses this when it wants a window with a clean and stable fs for a moment. |
202 | eg. | 268 | eg. |
203 | </para> | 269 | </para> |
204 | 270 | ||
205 | <programlisting> | 271 | <programlisting> |
@@ -230,19 +296,19 @@ extend it like this:- | |||
230 | struct journal_callback for_jbd; | 296 | struct journal_callback for_jbd; |
231 | // Stuff for myfs allocated together. | 297 | // Stuff for myfs allocated together. |
232 | myfs_inode* i_commited; | 298 | myfs_inode* i_commited; |
233 | 299 | ||
234 | } | 300 | } |
235 | </programlisting> | 301 | </programlisting> |
236 | 302 | ||
237 | <para> | 303 | <para> |
238 | this would be useful if you needed to know when data was committed to a | 304 | this would be useful if you needed to know when data was committed to a |
239 | particular inode. | 305 | particular inode. |
240 | </para> | 306 | </para> |
241 | 307 | ||
242 | </sect1> | 308 | </sect2> |
243 | 309 | ||
244 | <sect1> | 310 | <sect2> |
245 | <title>Summary</title> | 311 | <title>Summary</title> |
246 | <para> | 312 | <para> |
247 | Using the journal is a matter of wrapping the different context changes, | 313 | Using the journal is a matter of wrapping the different context changes, |
248 | being each mount, each modification (transaction) and each changed buffer | 314 | being each mount, each modification (transaction) and each changed buffer |
@@ -260,15 +326,15 @@ an example. | |||
260 | if (clean) journal_wipe(); | 326 | if (clean) journal_wipe(); |
261 | journal_load(); | 327 | journal_load(); |
262 | 328 | ||
263 | foreach(transaction) { /*transactions must be | 329 | foreach(transaction) { /*transactions must be |
264 | completed before | 330 | completed before |
265 | a syscall returns to | 331 | a syscall returns to |
266 | userspace*/ | 332 | userspace*/ |
267 | 333 | ||
268 | handle_t * xct=journal_start(my_jnrl); | 334 | handle_t * xct=journal_start(my_jnrl); |
269 | foreach(bh) { | 335 | foreach(bh) { |
270 | journal_get_{create,write,undo}_access(xact,bh); | 336 | journal_get_{create,write,undo}_access(xact,bh); |
271 | if ( myfs_modify(bh) ) { /* returns true | 337 | if ( myfs_modify(bh) ) { /* returns true |
272 | if makes changes */ | 338 | if makes changes */ |
273 | journal_dirty_{meta,}data(xact,bh); | 339 | journal_dirty_{meta,}data(xact,bh); |
274 | } else { | 340 | } else { |
@@ -279,55 +345,57 @@ an example. | |||
279 | } | 345 | } |
280 | journal_destroy(my_jrnl); | 346 | journal_destroy(my_jrnl); |
281 | </programlisting> | 347 | </programlisting> |
282 | </sect1> | 348 | </sect2> |
283 | 349 | ||
284 | </chapter> | 350 | </sect1> |
285 | 351 | ||
286 | <chapter id="adt"> | 352 | <sect1> |
287 | <title>Data Types</title> | 353 | <title>Data Types</title> |
288 | <para> | 354 | <para> |
289 | The journalling layer uses typedefs to 'hide' the concrete definitions | 355 | The journalling layer uses typedefs to 'hide' the concrete definitions |
290 | of the structures used. As a client of the JBD layer you can | 356 | of the structures used. As a client of the JBD layer you can |
291 | just rely on the using the pointer as a magic cookie of some sort. | 357 | just rely on the using the pointer as a magic cookie of some sort. |
292 | 358 | ||
293 | Obviously the hiding is not enforced as this is 'C'. | 359 | Obviously the hiding is not enforced as this is 'C'. |
294 | </para> | 360 | </para> |
295 | <sect1><title>Structures</title> | 361 | <sect2><title>Structures</title> |
296 | !Iinclude/linux/jbd.h | 362 | !Iinclude/linux/jbd.h |
297 | </sect1> | 363 | </sect2> |
298 | </chapter> | 364 | </sect1> |
299 | 365 | ||
300 | <chapter id="calls"> | 366 | <sect1> |
301 | <title>Functions</title> | 367 | <title>Functions</title> |
302 | <para> | 368 | <para> |
303 | The functions here are split into two groups those that | 369 | The functions here are split into two groups those that |
304 | affect a journal as a whole, and those which are used to | 370 | affect a journal as a whole, and those which are used to |
305 | manage transactions | 371 | manage transactions |
306 | </para> | 372 | </para> |
307 | <sect1><title>Journal Level</title> | 373 | <sect2><title>Journal Level</title> |
308 | !Efs/jbd/journal.c | 374 | !Efs/jbd/journal.c |
309 | !Ifs/jbd/recovery.c | 375 | !Ifs/jbd/recovery.c |
310 | </sect1> | 376 | </sect2> |
311 | <sect1><title>Transasction Level</title> | 377 | <sect2><title>Transasction Level</title> |
312 | !Efs/jbd/transaction.c | 378 | !Efs/jbd/transaction.c |
313 | </sect1> | 379 | </sect2> |
314 | </chapter> | 380 | </sect1> |
315 | <chapter> | 381 | <sect1> |
316 | <title>See also</title> | 382 | <title>See also</title> |
317 | <para> | 383 | <para> |
318 | <citation> | 384 | <citation> |
319 | <ulink url="ftp://ftp.uk.linux.org/pub/linux/sct/fs/jfs/journal-design.ps.gz"> | 385 | <ulink url="ftp://ftp.uk.linux.org/pub/linux/sct/fs/jfs/journal-design.ps.gz"> |
320 | Journaling the Linux ext2fs Filesystem,LinuxExpo 98, Stephen Tweedie | 386 | Journaling the Linux ext2fs Filesystem, LinuxExpo 98, Stephen Tweedie |
321 | </ulink> | 387 | </ulink> |
322 | </citation> | 388 | </citation> |
323 | </para> | 389 | </para> |
324 | <para> | 390 | <para> |
325 | <citation> | 391 | <citation> |
326 | <ulink url="http://olstrans.sourceforge.net/release/OLS2000-ext3/OLS2000-ext3.html"> | 392 | <ulink url="http://olstrans.sourceforge.net/release/OLS2000-ext3/OLS2000-ext3.html"> |
327 | Ext3 Journalling FileSystem , OLS 2000, Dr. Stephen Tweedie | 393 | Ext3 Journalling FileSystem, OLS 2000, Dr. Stephen Tweedie |
328 | </ulink> | 394 | </ulink> |
329 | </citation> | 395 | </citation> |
330 | </para> | 396 | </para> |
331 | </chapter> | 397 | </sect1> |
398 | |||
399 | </chapter> | ||
332 | 400 | ||
333 | </book> | 401 | </book> |
diff --git a/Documentation/DocBook/kernel-api.tmpl b/Documentation/DocBook/kernel-api.tmpl index 2b5ac604948c..a166675c4303 100644 --- a/Documentation/DocBook/kernel-api.tmpl +++ b/Documentation/DocBook/kernel-api.tmpl | |||
@@ -182,66 +182,6 @@ X!Ilib/string.c | |||
182 | </sect1> | 182 | </sect1> |
183 | </chapter> | 183 | </chapter> |
184 | 184 | ||
185 | <chapter id="vfs"> | ||
186 | <title>The Linux VFS</title> | ||
187 | <sect1><title>The Filesystem types</title> | ||
188 | !Iinclude/linux/fs.h | ||
189 | </sect1> | ||
190 | <sect1><title>The Directory Cache</title> | ||
191 | !Efs/dcache.c | ||
192 | !Iinclude/linux/dcache.h | ||
193 | </sect1> | ||
194 | <sect1><title>Inode Handling</title> | ||
195 | !Efs/inode.c | ||
196 | !Efs/bad_inode.c | ||
197 | </sect1> | ||
198 | <sect1><title>Registration and Superblocks</title> | ||
199 | !Efs/super.c | ||
200 | </sect1> | ||
201 | <sect1><title>File Locks</title> | ||
202 | !Efs/locks.c | ||
203 | !Ifs/locks.c | ||
204 | </sect1> | ||
205 | <sect1><title>Other Functions</title> | ||
206 | !Efs/mpage.c | ||
207 | !Efs/namei.c | ||
208 | !Efs/buffer.c | ||
209 | !Efs/bio.c | ||
210 | !Efs/seq_file.c | ||
211 | !Efs/filesystems.c | ||
212 | !Efs/fs-writeback.c | ||
213 | !Efs/block_dev.c | ||
214 | </sect1> | ||
215 | </chapter> | ||
216 | |||
217 | <chapter id="proc"> | ||
218 | <title>The proc filesystem</title> | ||
219 | |||
220 | <sect1><title>sysctl interface</title> | ||
221 | !Ekernel/sysctl.c | ||
222 | </sect1> | ||
223 | |||
224 | <sect1><title>proc filesystem interface</title> | ||
225 | !Ifs/proc/base.c | ||
226 | </sect1> | ||
227 | </chapter> | ||
228 | |||
229 | <chapter id="sysfs"> | ||
230 | <title>The Filesystem for Exporting Kernel Objects</title> | ||
231 | !Efs/sysfs/file.c | ||
232 | !Efs/sysfs/symlink.c | ||
233 | !Efs/sysfs/bin.c | ||
234 | </chapter> | ||
235 | |||
236 | <chapter id="debugfs"> | ||
237 | <title>The debugfs filesystem</title> | ||
238 | |||
239 | <sect1><title>debugfs interface</title> | ||
240 | !Efs/debugfs/inode.c | ||
241 | !Efs/debugfs/file.c | ||
242 | </sect1> | ||
243 | </chapter> | ||
244 | |||
245 | <chapter id="relayfs"> | 185 | <chapter id="relayfs"> |
246 | <title>relay interface support</title> | 186 | <title>relay interface support</title> |
247 | 187 | ||
diff --git a/Documentation/HOWTO b/Documentation/HOWTO index d6f3dd1a3464..8d51c148f721 100644 --- a/Documentation/HOWTO +++ b/Documentation/HOWTO | |||
@@ -395,6 +395,26 @@ bugme-janitor mailing list (every change in the bugzilla is mailed here) | |||
395 | 395 | ||
396 | 396 | ||
397 | 397 | ||
398 | Managing bug reports | ||
399 | -------------------- | ||
400 | |||
401 | One of the best ways to put into practice your hacking skills is by fixing | ||
402 | bugs reported by other people. Not only you will help to make the kernel | ||
403 | more stable, you'll learn to fix real world problems and you will improve | ||
404 | your skills, and other developers will be aware of your presence. Fixing | ||
405 | bugs is one of the best ways to get merits among other developers, because | ||
406 | not many people like wasting time fixing other people's bugs. | ||
407 | |||
408 | To work in the already reported bug reports, go to http://bugzilla.kernel.org. | ||
409 | If you want to be advised of the future bug reports, you can subscribe to the | ||
410 | bugme-new mailing list (only new bug reports are mailed here) or to the | ||
411 | bugme-janitor mailing list (every change in the bugzilla is mailed here) | ||
412 | |||
413 | http://lists.osdl.org/mailman/listinfo/bugme-new | ||
414 | http://lists.osdl.org/mailman/listinfo/bugme-janitors | ||
415 | |||
416 | |||
417 | |||
398 | Mailing lists | 418 | Mailing lists |
399 | ------------- | 419 | ------------- |
400 | 420 | ||
diff --git a/Documentation/MSI-HOWTO.txt b/Documentation/MSI-HOWTO.txt index c70306abb7b2..5c34910665d1 100644 --- a/Documentation/MSI-HOWTO.txt +++ b/Documentation/MSI-HOWTO.txt | |||
@@ -470,7 +470,68 @@ LOC: 324553 325068 | |||
470 | ERR: 0 | 470 | ERR: 0 |
471 | MIS: 0 | 471 | MIS: 0 |
472 | 472 | ||
473 | 6. FAQ | 473 | 6. MSI quirks |
474 | |||
475 | Several PCI chipsets or devices are known to not support MSI. | ||
476 | The PCI stack provides 3 possible levels of MSI disabling: | ||
477 | * on a single device | ||
478 | * on all devices behind a specific bridge | ||
479 | * globally | ||
480 | |||
481 | 6.1. Disabling MSI on a single device | ||
482 | |||
483 | Under some circumstances, it might be required to disable MSI on a | ||
484 | single device, It may be achived by either not calling pci_enable_msi() | ||
485 | or all, or setting the pci_dev->no_msi flag before (most of the time | ||
486 | in a quirk). | ||
487 | |||
488 | 6.2. Disabling MSI below a bridge | ||
489 | |||
490 | The vast majority of MSI quirks are required by PCI bridges not | ||
491 | being able to route MSI between busses. In this case, MSI have to be | ||
492 | disabled on all devices behind this bridge. It is achieves by setting | ||
493 | the PCI_BUS_FLAGS_NO_MSI flag in the pci_bus->bus_flags of the bridge | ||
494 | subordinate bus. There is no need to set the same flag on bridges that | ||
495 | are below the broken brigde. When pci_enable_msi() is called to enable | ||
496 | MSI on a device, pci_msi_supported() takes care of checking the NO_MSI | ||
497 | flag in all parent busses of the device. | ||
498 | |||
499 | Some bridges actually support dynamic MSI support enabling/disabling | ||
500 | by changing some bits in their PCI configuration space (especially | ||
501 | the Hypertransport chipsets such as the nVidia nForce and Serverworks | ||
502 | HT2000). It may then be required to update the NO_MSI flag on the | ||
503 | corresponding devices in the sysfs hierarchy. To enable MSI support | ||
504 | on device "0000:00:0e", do: | ||
505 | |||
506 | echo 1 > /sys/bus/pci/devices/0000:00:0e/msi_bus | ||
507 | |||
508 | To disable MSI support, echo 0 instead of 1. Note that it should be | ||
509 | used with caution since changing this value might break interrupts. | ||
510 | |||
511 | 6.3. Disabling MSI globally | ||
512 | |||
513 | Some extreme cases may require to disable MSI globally on the system. | ||
514 | For now, the only known case is a Serverworks PCI-X chipsets (MSI are | ||
515 | not supported on several busses that are not all connected to the | ||
516 | chipset in the Linux PCI hierarchy). In the vast majority of other | ||
517 | cases, disabling only behind a specific bridge is enough. | ||
518 | |||
519 | For debugging purpose, the user may also pass pci=nomsi on the kernel | ||
520 | command-line to explicitly disable MSI globally. But, once the appro- | ||
521 | priate quirks are added to the kernel, this option should not be | ||
522 | required anymore. | ||
523 | |||
524 | 6.4. Finding why MSI cannot be enabled on a device | ||
525 | |||
526 | Assuming that MSI are not enabled on a device, you should look at | ||
527 | dmesg to find messages that quirks may output when disabling MSI | ||
528 | on some devices, some bridges or even globally. | ||
529 | Then, lspci -t gives the list of bridges above a device. Reading | ||
530 | /sys/bus/pci/devices/0000:00:0e/msi_bus will tell you whether MSI | ||
531 | are enabled (1) or disabled (0). In 0 is found in a single bridge | ||
532 | msi_bus file above the device, MSI cannot be enabled. | ||
533 | |||
534 | 7. FAQ | ||
474 | 535 | ||
475 | Q1. Are there any limitations on using the MSI? | 536 | Q1. Are there any limitations on using the MSI? |
476 | 537 | ||
diff --git a/Documentation/accounting/getdelays.c b/Documentation/accounting/getdelays.c index b11792abd6b6..bf2b0e2f87e1 100644 --- a/Documentation/accounting/getdelays.c +++ b/Documentation/accounting/getdelays.c | |||
@@ -49,7 +49,7 @@ __u64 stime, utime; | |||
49 | } | 49 | } |
50 | 50 | ||
51 | /* Maximum size of response requested or message sent */ | 51 | /* Maximum size of response requested or message sent */ |
52 | #define MAX_MSG_SIZE 256 | 52 | #define MAX_MSG_SIZE 1024 |
53 | /* Maximum number of cpus expected to be specified in a cpumask */ | 53 | /* Maximum number of cpus expected to be specified in a cpumask */ |
54 | #define MAX_CPUS 32 | 54 | #define MAX_CPUS 32 |
55 | /* Maximum length of pathname to log file */ | 55 | /* Maximum length of pathname to log file */ |
diff --git a/Documentation/cpu-hotplug.txt b/Documentation/cpu-hotplug.txt index bc107cb157a8..4868c34f7509 100644 --- a/Documentation/cpu-hotplug.txt +++ b/Documentation/cpu-hotplug.txt | |||
@@ -46,7 +46,7 @@ maxcpus=n Restrict boot time cpus to n. Say if you have 4 cpus, using | |||
46 | maxcpus=2 will only boot 2. You can choose to bring the | 46 | maxcpus=2 will only boot 2. You can choose to bring the |
47 | other cpus later online, read FAQ's for more info. | 47 | other cpus later online, read FAQ's for more info. |
48 | 48 | ||
49 | additional_cpus*=n Use this to limit hotpluggable cpus. This option sets | 49 | additional_cpus=n (*) Use this to limit hotpluggable cpus. This option sets |
50 | cpu_possible_map = cpu_present_map + additional_cpus | 50 | cpu_possible_map = cpu_present_map + additional_cpus |
51 | 51 | ||
52 | (*) Option valid only for following architectures | 52 | (*) Option valid only for following architectures |
@@ -101,15 +101,15 @@ cpu_possible_map/for_each_possible_cpu() to iterate. | |||
101 | 101 | ||
102 | Never use anything other than cpumask_t to represent bitmap of CPUs. | 102 | Never use anything other than cpumask_t to represent bitmap of CPUs. |
103 | 103 | ||
104 | #include <linux/cpumask.h> | 104 | #include <linux/cpumask.h> |
105 | 105 | ||
106 | for_each_possible_cpu - Iterate over cpu_possible_map | 106 | for_each_possible_cpu - Iterate over cpu_possible_map |
107 | for_each_online_cpu - Iterate over cpu_online_map | 107 | for_each_online_cpu - Iterate over cpu_online_map |
108 | for_each_present_cpu - Iterate over cpu_present_map | 108 | for_each_present_cpu - Iterate over cpu_present_map |
109 | for_each_cpu_mask(x,mask) - Iterate over some random collection of cpu mask. | 109 | for_each_cpu_mask(x,mask) - Iterate over some random collection of cpu mask. |
110 | 110 | ||
111 | #include <linux/cpu.h> | 111 | #include <linux/cpu.h> |
112 | lock_cpu_hotplug() and unlock_cpu_hotplug(): | 112 | lock_cpu_hotplug() and unlock_cpu_hotplug(): |
113 | 113 | ||
114 | The above calls are used to inhibit cpu hotplug operations. While holding the | 114 | The above calls are used to inhibit cpu hotplug operations. While holding the |
115 | cpucontrol mutex, cpu_online_map will not change. If you merely need to avoid | 115 | cpucontrol mutex, cpu_online_map will not change. If you merely need to avoid |
@@ -120,7 +120,7 @@ will work as long as stop_machine_run() is used to take a cpu down. | |||
120 | 120 | ||
121 | CPU Hotplug - Frequently Asked Questions. | 121 | CPU Hotplug - Frequently Asked Questions. |
122 | 122 | ||
123 | Q: How to i enable my kernel to support CPU hotplug? | 123 | Q: How to enable my kernel to support CPU hotplug? |
124 | A: When doing make defconfig, Enable CPU hotplug support | 124 | A: When doing make defconfig, Enable CPU hotplug support |
125 | 125 | ||
126 | "Processor type and Features" -> Support for Hotpluggable CPUs | 126 | "Processor type and Features" -> Support for Hotpluggable CPUs |
@@ -141,39 +141,39 @@ A: You should now notice an entry in sysfs. | |||
141 | Check if sysfs is mounted, using the "mount" command. You should notice | 141 | Check if sysfs is mounted, using the "mount" command. You should notice |
142 | an entry as shown below in the output. | 142 | an entry as shown below in the output. |
143 | 143 | ||
144 | .... | 144 | .... |
145 | none on /sys type sysfs (rw) | 145 | none on /sys type sysfs (rw) |
146 | .... | 146 | .... |
147 | 147 | ||
148 | if this is not mounted, do the following. | 148 | If this is not mounted, do the following. |
149 | 149 | ||
150 | #mkdir /sysfs | 150 | #mkdir /sysfs |
151 | #mount -t sysfs sys /sys | 151 | #mount -t sysfs sys /sys |
152 | 152 | ||
153 | now you should see entries for all present cpu, the following is an example | 153 | Now you should see entries for all present cpu, the following is an example |
154 | in a 8-way system. | 154 | in a 8-way system. |
155 | 155 | ||
156 | #pwd | 156 | #pwd |
157 | #/sys/devices/system/cpu | 157 | #/sys/devices/system/cpu |
158 | #ls -l | 158 | #ls -l |
159 | total 0 | 159 | total 0 |
160 | drwxr-xr-x 10 root root 0 Sep 19 07:44 . | 160 | drwxr-xr-x 10 root root 0 Sep 19 07:44 . |
161 | drwxr-xr-x 13 root root 0 Sep 19 07:45 .. | 161 | drwxr-xr-x 13 root root 0 Sep 19 07:45 .. |
162 | drwxr-xr-x 3 root root 0 Sep 19 07:44 cpu0 | 162 | drwxr-xr-x 3 root root 0 Sep 19 07:44 cpu0 |
163 | drwxr-xr-x 3 root root 0 Sep 19 07:44 cpu1 | 163 | drwxr-xr-x 3 root root 0 Sep 19 07:44 cpu1 |
164 | drwxr-xr-x 3 root root 0 Sep 19 07:44 cpu2 | 164 | drwxr-xr-x 3 root root 0 Sep 19 07:44 cpu2 |
165 | drwxr-xr-x 3 root root 0 Sep 19 07:44 cpu3 | 165 | drwxr-xr-x 3 root root 0 Sep 19 07:44 cpu3 |
166 | drwxr-xr-x 3 root root 0 Sep 19 07:44 cpu4 | 166 | drwxr-xr-x 3 root root 0 Sep 19 07:44 cpu4 |
167 | drwxr-xr-x 3 root root 0 Sep 19 07:44 cpu5 | 167 | drwxr-xr-x 3 root root 0 Sep 19 07:44 cpu5 |
168 | drwxr-xr-x 3 root root 0 Sep 19 07:44 cpu6 | 168 | drwxr-xr-x 3 root root 0 Sep 19 07:44 cpu6 |
169 | drwxr-xr-x 3 root root 0 Sep 19 07:48 cpu7 | 169 | drwxr-xr-x 3 root root 0 Sep 19 07:48 cpu7 |
170 | 170 | ||
171 | Under each directory you would find an "online" file which is the control | 171 | Under each directory you would find an "online" file which is the control |
172 | file to logically online/offline a processor. | 172 | file to logically online/offline a processor. |
173 | 173 | ||
174 | Q: Does hot-add/hot-remove refer to physical add/remove of cpus? | 174 | Q: Does hot-add/hot-remove refer to physical add/remove of cpus? |
175 | A: The usage of hot-add/remove may not be very consistently used in the code. | 175 | A: The usage of hot-add/remove may not be very consistently used in the code. |
176 | CONFIG_CPU_HOTPLUG enables logical online/offline capability in the kernel. | 176 | CONFIG_HOTPLUG_CPU enables logical online/offline capability in the kernel. |
177 | To support physical addition/removal, one would need some BIOS hooks and | 177 | To support physical addition/removal, one would need some BIOS hooks and |
178 | the platform should have something like an attention button in PCI hotplug. | 178 | the platform should have something like an attention button in PCI hotplug. |
179 | CONFIG_ACPI_HOTPLUG_CPU enables ACPI support for physical add/remove of CPUs. | 179 | CONFIG_ACPI_HOTPLUG_CPU enables ACPI support for physical add/remove of CPUs. |
@@ -181,17 +181,17 @@ CONFIG_ACPI_HOTPLUG_CPU enables ACPI support for physical add/remove of CPUs. | |||
181 | Q: How do i logically offline a CPU? | 181 | Q: How do i logically offline a CPU? |
182 | A: Do the following. | 182 | A: Do the following. |
183 | 183 | ||
184 | #echo 0 > /sys/devices/system/cpu/cpuX/online | 184 | #echo 0 > /sys/devices/system/cpu/cpuX/online |
185 | 185 | ||
186 | once the logical offline is successful, check | 186 | Once the logical offline is successful, check |
187 | 187 | ||
188 | #cat /proc/interrupts | 188 | #cat /proc/interrupts |
189 | 189 | ||
190 | you should now not see the CPU that you removed. Also online file will report | 190 | You should now not see the CPU that you removed. Also online file will report |
191 | the state as 0 when a cpu if offline and 1 when its online. | 191 | the state as 0 when a cpu if offline and 1 when its online. |
192 | 192 | ||
193 | #To display the current cpu state. | 193 | #To display the current cpu state. |
194 | #cat /sys/devices/system/cpu/cpuX/online | 194 | #cat /sys/devices/system/cpu/cpuX/online |
195 | 195 | ||
196 | Q: Why cant i remove CPU0 on some systems? | 196 | Q: Why cant i remove CPU0 on some systems? |
197 | A: Some architectures may have some special dependency on a certain CPU. | 197 | A: Some architectures may have some special dependency on a certain CPU. |
@@ -234,8 +234,8 @@ Q: If i have some kernel code that needs to be aware of CPU arrival and | |||
234 | departure, how to i arrange for proper notification? | 234 | departure, how to i arrange for proper notification? |
235 | A: This is what you would need in your kernel code to receive notifications. | 235 | A: This is what you would need in your kernel code to receive notifications. |
236 | 236 | ||
237 | #include <linux/cpu.h> | 237 | #include <linux/cpu.h> |
238 | static int __cpuinit foobar_cpu_callback(struct notifier_block *nfb, | 238 | static int __cpuinit foobar_cpu_callback(struct notifier_block *nfb, |
239 | unsigned long action, void *hcpu) | 239 | unsigned long action, void *hcpu) |
240 | { | 240 | { |
241 | unsigned int cpu = (unsigned long)hcpu; | 241 | unsigned int cpu = (unsigned long)hcpu; |
@@ -279,10 +279,10 @@ Q: I don't see my action being called for all CPUs already up and running? | |||
279 | A: Yes, CPU notifiers are called only when new CPUs are on-lined or offlined. | 279 | A: Yes, CPU notifiers are called only when new CPUs are on-lined or offlined. |
280 | If you need to perform some action for each cpu already in the system, then | 280 | If you need to perform some action for each cpu already in the system, then |
281 | 281 | ||
282 | for_each_online_cpu(i) { | 282 | for_each_online_cpu(i) { |
283 | foobar_cpu_callback(&foobar_cpu_notifier, CPU_UP_PREPARE, i); | 283 | foobar_cpu_callback(&foobar_cpu_notifier, CPU_UP_PREPARE, i); |
284 | foobar_cpu_callback(&foobar-cpu_notifier, CPU_ONLINE, i); | 284 | foobar_cpu_callback(&foobar_cpu_notifier, CPU_ONLINE, i); |
285 | } | 285 | } |
286 | 286 | ||
287 | Q: If i would like to develop cpu hotplug support for a new architecture, | 287 | Q: If i would like to develop cpu hotplug support for a new architecture, |
288 | what do i need at a minimum? | 288 | what do i need at a minimum? |
@@ -307,38 +307,38 @@ Q: I need to ensure that a particular cpu is not removed when there is some | |||
307 | work specific to this cpu is in progress. | 307 | work specific to this cpu is in progress. |
308 | A: First switch the current thread context to preferred cpu | 308 | A: First switch the current thread context to preferred cpu |
309 | 309 | ||
310 | int my_func_on_cpu(int cpu) | 310 | int my_func_on_cpu(int cpu) |
311 | { | 311 | { |
312 | cpumask_t saved_mask, new_mask = CPU_MASK_NONE; | 312 | cpumask_t saved_mask, new_mask = CPU_MASK_NONE; |
313 | int curr_cpu, err = 0; | 313 | int curr_cpu, err = 0; |
314 | 314 | ||
315 | saved_mask = current->cpus_allowed; | 315 | saved_mask = current->cpus_allowed; |
316 | cpu_set(cpu, new_mask); | 316 | cpu_set(cpu, new_mask); |
317 | err = set_cpus_allowed(current, new_mask); | 317 | err = set_cpus_allowed(current, new_mask); |
318 | 318 | ||
319 | if (err) | 319 | if (err) |
320 | return err; | 320 | return err; |
321 | 321 | ||
322 | /* | 322 | /* |
323 | * If we got scheduled out just after the return from | 323 | * If we got scheduled out just after the return from |
324 | * set_cpus_allowed() before running the work, this ensures | 324 | * set_cpus_allowed() before running the work, this ensures |
325 | * we stay locked. | 325 | * we stay locked. |
326 | */ | 326 | */ |
327 | curr_cpu = get_cpu(); | 327 | curr_cpu = get_cpu(); |
328 | 328 | ||
329 | if (curr_cpu != cpu) { | 329 | if (curr_cpu != cpu) { |
330 | err = -EAGAIN; | 330 | err = -EAGAIN; |
331 | goto ret; | 331 | goto ret; |
332 | } else { | 332 | } else { |
333 | /* | 333 | /* |
334 | * Do work : But cant sleep, since get_cpu() disables preempt | 334 | * Do work : But cant sleep, since get_cpu() disables preempt |
335 | */ | 335 | */ |
336 | } | 336 | } |
337 | ret: | 337 | ret: |
338 | put_cpu(); | 338 | put_cpu(); |
339 | set_cpus_allowed(current, saved_mask); | 339 | set_cpus_allowed(current, saved_mask); |
340 | return err; | 340 | return err; |
341 | } | 341 | } |
342 | 342 | ||
343 | 343 | ||
344 | Q: How do we determine how many CPUs are available for hotplug. | 344 | Q: How do we determine how many CPUs are available for hotplug. |
diff --git a/Documentation/feature-removal-schedule.txt b/Documentation/feature-removal-schedule.txt index 24f3c63b3017..d52c4aaaf17f 100644 --- a/Documentation/feature-removal-schedule.txt +++ b/Documentation/feature-removal-schedule.txt | |||
@@ -53,18 +53,6 @@ Who: Mauro Carvalho Chehab <mchehab@brturbo.com.br> | |||
53 | 53 | ||
54 | --------------------------- | 54 | --------------------------- |
55 | 55 | ||
56 | What: sys_sysctl | ||
57 | When: January 2007 | ||
58 | Why: The same information is available through /proc/sys and that is the | ||
59 | interface user space prefers to use. And there do not appear to be | ||
60 | any existing user in user space of sys_sysctl. The additional | ||
61 | maintenance overhead of keeping a set of binary names gets | ||
62 | in the way of doing a good job of maintaining this interface. | ||
63 | |||
64 | Who: Eric Biederman <ebiederm@xmission.com> | ||
65 | |||
66 | --------------------------- | ||
67 | |||
68 | What: PCMCIA control ioctl (needed for pcmcia-cs [cardmgr, cardctl]) | 56 | What: PCMCIA control ioctl (needed for pcmcia-cs [cardmgr, cardctl]) |
69 | When: November 2005 | 57 | When: November 2005 |
70 | Files: drivers/pcmcia/: pcmcia_ioctl.c | 58 | Files: drivers/pcmcia/: pcmcia_ioctl.c |
@@ -255,7 +243,7 @@ Who: Stephen Hemminger <shemminger@osdl.org> | |||
255 | 243 | ||
256 | 244 | ||
257 | What: PHYSDEVPATH, PHYSDEVBUS, PHYSDEVDRIVER in the uevent environment | 245 | What: PHYSDEVPATH, PHYSDEVBUS, PHYSDEVDRIVER in the uevent environment |
258 | When: Oktober 2008 | 246 | When: October 2008 |
259 | Why: The stacking of class devices makes these values misleading and | 247 | Why: The stacking of class devices makes these values misleading and |
260 | inconsistent. | 248 | inconsistent. |
261 | Class devices should not carry any of these properties, and bus | 249 | Class devices should not carry any of these properties, and bus |
diff --git a/Documentation/filesystems/00-INDEX b/Documentation/filesystems/00-INDEX index 3c384c0cf86e..4dc28cc93503 100644 --- a/Documentation/filesystems/00-INDEX +++ b/Documentation/filesystems/00-INDEX | |||
@@ -34,6 +34,8 @@ ext2.txt | |||
34 | - info, mount options and specifications for the Ext2 filesystem. | 34 | - info, mount options and specifications for the Ext2 filesystem. |
35 | ext3.txt | 35 | ext3.txt |
36 | - info, mount options and specifications for the Ext3 filesystem. | 36 | - info, mount options and specifications for the Ext3 filesystem. |
37 | ext4.txt | ||
38 | - info, mount options and specifications for the Ext4 filesystem. | ||
37 | files.txt | 39 | files.txt |
38 | - info on file management in the Linux kernel. | 40 | - info on file management in the Linux kernel. |
39 | fuse.txt | 41 | fuse.txt |
diff --git a/Documentation/filesystems/ext4.txt b/Documentation/filesystems/ext4.txt new file mode 100644 index 000000000000..6a4adcae9f9a --- /dev/null +++ b/Documentation/filesystems/ext4.txt | |||
@@ -0,0 +1,236 @@ | |||
1 | |||
2 | Ext4 Filesystem | ||
3 | =============== | ||
4 | |||
5 | This is a development version of the ext4 filesystem, an advanced level | ||
6 | of the ext3 filesystem which incorporates scalability and reliability | ||
7 | enhancements for supporting large filesystems (64 bit) in keeping with | ||
8 | increasing disk capacities and state-of-the-art feature requirements. | ||
9 | |||
10 | Mailing list: linux-ext4@vger.kernel.org | ||
11 | |||
12 | |||
13 | 1. Quick usage instructions: | ||
14 | =========================== | ||
15 | |||
16 | - Grab updated e2fsprogs from | ||
17 | ftp://ftp.kernel.org/pub/linux/kernel/people/tytso/e2fsprogs-interim/ | ||
18 | This is a patchset on top of e2fsprogs-1.39, which can be found at | ||
19 | ftp://ftp.kernel.org/pub/linux/kernel/people/tytso/e2fsprogs/ | ||
20 | |||
21 | - It's still mke2fs -j /dev/hda1 | ||
22 | |||
23 | - mount /dev/hda1 /wherever -t ext4dev | ||
24 | |||
25 | - To enable extents, | ||
26 | |||
27 | mount /dev/hda1 /wherever -t ext4dev -o extents | ||
28 | |||
29 | - The filesystem is compatible with the ext3 driver until you add a file | ||
30 | which has extents (ie: `mount -o extents', then create a file). | ||
31 | |||
32 | NOTE: The "extents" mount flag is temporary. It will soon go away and | ||
33 | extents will be enabled by the "-o extents" flag to mke2fs or tune2fs | ||
34 | |||
35 | - When comparing performance with other filesystems, remember that | ||
36 | ext3/4 by default offers higher data integrity guarantees than most. So | ||
37 | when comparing with a metadata-only journalling filesystem, use `mount -o | ||
38 | data=writeback'. And you might as well use `mount -o nobh' too along | ||
39 | with it. Making the journal larger than the mke2fs default often helps | ||
40 | performance with metadata-intensive workloads. | ||
41 | |||
42 | 2. Features | ||
43 | =========== | ||
44 | |||
45 | 2.1 Currently available | ||
46 | |||
47 | * ability to use filesystems > 16TB | ||
48 | * extent format reduces metadata overhead (RAM, IO for access, transactions) | ||
49 | * extent format more robust in face of on-disk corruption due to magics, | ||
50 | * internal redunancy in tree | ||
51 | |||
52 | 2.1 Previously available, soon to be enabled by default by "mkefs.ext4": | ||
53 | |||
54 | * dir_index and resize inode will be on by default | ||
55 | * large inodes will be used by default for fast EAs, nsec timestamps, etc | ||
56 | |||
57 | 2.2 Candidate features for future inclusion | ||
58 | |||
59 | There are several under discussion, whether they all make it in is | ||
60 | partly a function of how much time everyone has to work on them: | ||
61 | |||
62 | * improved file allocation (multi-block alloc, delayed alloc; basically done) | ||
63 | * fix 32000 subdirectory limit (patch exists, needs some e2fsck work) | ||
64 | * nsec timestamps for mtime, atime, ctime, create time (patch exists, | ||
65 | needs some e2fsck work) | ||
66 | * inode version field on disk (NFSv4, Lustre; prototype exists) | ||
67 | * reduced mke2fs/e2fsck time via uninitialized groups (prototype exists) | ||
68 | * journal checksumming for robustness, performance (prototype exists) | ||
69 | * persistent file preallocation (e.g for streaming media, databases) | ||
70 | |||
71 | Features like metadata checksumming have been discussed and planned for | ||
72 | a bit but no patches exist yet so I'm not sure they're in the near-term | ||
73 | roadmap. | ||
74 | |||
75 | The big performance win will come with mballoc and delalloc. CFS has | ||
76 | been using mballoc for a few years already with Lustre, and IBM + Bull | ||
77 | did a lot of benchmarking on it. The reason it isn't in the first set of | ||
78 | patches is partly a manageability issue, and partly because it doesn't | ||
79 | directly affect the on-disk format (outside of much better allocation) | ||
80 | so it isn't critical to get into the first round of changes. I believe | ||
81 | Alex is working on a new set of patches right now. | ||
82 | |||
83 | 3. Options | ||
84 | ========== | ||
85 | |||
86 | When mounting an ext4 filesystem, the following option are accepted: | ||
87 | (*) == default | ||
88 | |||
89 | extents ext4 will use extents to address file data. The | ||
90 | file system will no longer be mountable by ext3. | ||
91 | |||
92 | journal=update Update the ext4 file system's journal to the current | ||
93 | format. | ||
94 | |||
95 | journal=inum When a journal already exists, this option is ignored. | ||
96 | Otherwise, it specifies the number of the inode which | ||
97 | will represent the ext4 file system's journal file. | ||
98 | |||
99 | journal_dev=devnum When the external journal device's major/minor numbers | ||
100 | have changed, this option allows the user to specify | ||
101 | the new journal location. The journal device is | ||
102 | identified through its new major/minor numbers encoded | ||
103 | in devnum. | ||
104 | |||
105 | noload Don't load the journal on mounting. | ||
106 | |||
107 | data=journal All data are committed into the journal prior to being | ||
108 | written into the main file system. | ||
109 | |||
110 | data=ordered (*) All data are forced directly out to the main file | ||
111 | system prior to its metadata being committed to the | ||
112 | journal. | ||
113 | |||
114 | data=writeback Data ordering is not preserved, data may be written | ||
115 | into the main file system after its metadata has been | ||
116 | committed to the journal. | ||
117 | |||
118 | commit=nrsec (*) Ext4 can be told to sync all its data and metadata | ||
119 | every 'nrsec' seconds. The default value is 5 seconds. | ||
120 | This means that if you lose your power, you will lose | ||
121 | as much as the latest 5 seconds of work (your | ||
122 | filesystem will not be damaged though, thanks to the | ||
123 | journaling). This default value (or any low value) | ||
124 | will hurt performance, but it's good for data-safety. | ||
125 | Setting it to 0 will have the same effect as leaving | ||
126 | it at the default (5 seconds). | ||
127 | Setting it to very large values will improve | ||
128 | performance. | ||
129 | |||
130 | barrier=1 This enables/disables barriers. barrier=0 disables | ||
131 | it, barrier=1 enables it. | ||
132 | |||
133 | orlov (*) This enables the new Orlov block allocator. It is | ||
134 | enabled by default. | ||
135 | |||
136 | oldalloc This disables the Orlov block allocator and enables | ||
137 | the old block allocator. Orlov should have better | ||
138 | performance - we'd like to get some feedback if it's | ||
139 | the contrary for you. | ||
140 | |||
141 | user_xattr Enables Extended User Attributes. Additionally, you | ||
142 | need to have extended attribute support enabled in the | ||
143 | kernel configuration (CONFIG_EXT4_FS_XATTR). See the | ||
144 | attr(5) manual page and http://acl.bestbits.at/ to | ||
145 | learn more about extended attributes. | ||
146 | |||
147 | nouser_xattr Disables Extended User Attributes. | ||
148 | |||
149 | acl Enables POSIX Access Control Lists support. | ||
150 | Additionally, you need to have ACL support enabled in | ||
151 | the kernel configuration (CONFIG_EXT4_FS_POSIX_ACL). | ||
152 | See the acl(5) manual page and http://acl.bestbits.at/ | ||
153 | for more information. | ||
154 | |||
155 | noacl This option disables POSIX Access Control List | ||
156 | support. | ||
157 | |||
158 | reservation | ||
159 | |||
160 | noreservation | ||
161 | |||
162 | bsddf (*) Make 'df' act like BSD. | ||
163 | minixdf Make 'df' act like Minix. | ||
164 | |||
165 | check=none Don't do extra checking of bitmaps on mount. | ||
166 | nocheck | ||
167 | |||
168 | debug Extra debugging information is sent to syslog. | ||
169 | |||
170 | errors=remount-ro(*) Remount the filesystem read-only on an error. | ||
171 | errors=continue Keep going on a filesystem error. | ||
172 | errors=panic Panic and halt the machine if an error occurs. | ||
173 | |||
174 | grpid Give objects the same group ID as their creator. | ||
175 | bsdgroups | ||
176 | |||
177 | nogrpid (*) New objects have the group ID of their creator. | ||
178 | sysvgroups | ||
179 | |||
180 | resgid=n The group ID which may use the reserved blocks. | ||
181 | |||
182 | resuid=n The user ID which may use the reserved blocks. | ||
183 | |||
184 | sb=n Use alternate superblock at this location. | ||
185 | |||
186 | quota | ||
187 | noquota | ||
188 | grpquota | ||
189 | usrquota | ||
190 | |||
191 | bh (*) ext4 associates buffer heads to data pages to | ||
192 | nobh (a) cache disk block mapping information | ||
193 | (b) link pages into transaction to provide | ||
194 | ordering guarantees. | ||
195 | "bh" option forces use of buffer heads. | ||
196 | "nobh" option tries to avoid associating buffer | ||
197 | heads (supported only for "writeback" mode). | ||
198 | |||
199 | |||
200 | Data Mode | ||
201 | --------- | ||
202 | There are 3 different data modes: | ||
203 | |||
204 | * writeback mode | ||
205 | In data=writeback mode, ext4 does not journal data at all. This mode provides | ||
206 | a similar level of journaling as that of XFS, JFS, and ReiserFS in its default | ||
207 | mode - metadata journaling. A crash+recovery can cause incorrect data to | ||
208 | appear in files which were written shortly before the crash. This mode will | ||
209 | typically provide the best ext4 performance. | ||
210 | |||
211 | * ordered mode | ||
212 | In data=ordered mode, ext4 only officially journals metadata, but it logically | ||
213 | groups metadata and data blocks into a single unit called a transaction. When | ||
214 | it's time to write the new metadata out to disk, the associated data blocks | ||
215 | are written first. In general, this mode performs slightly slower than | ||
216 | writeback but significantly faster than journal mode. | ||
217 | |||
218 | * journal mode | ||
219 | data=journal mode provides full data and metadata journaling. All new data is | ||
220 | written to the journal first, and then to its final location. | ||
221 | In the event of a crash, the journal can be replayed, bringing both data and | ||
222 | metadata into a consistent state. This mode is the slowest except when data | ||
223 | needs to be read from and written to disk at the same time where it | ||
224 | outperforms all others modes. | ||
225 | |||
226 | References | ||
227 | ========== | ||
228 | |||
229 | kernel source: <file:fs/ext4/> | ||
230 | <file:fs/jbd2/> | ||
231 | |||
232 | programs: http://e2fsprogs.sourceforge.net/ | ||
233 | http://ext2resize.sourceforge.net | ||
234 | |||
235 | useful links: http://fedoraproject.org/wiki/ext3-devel | ||
236 | http://www.bullopensource.org/ext4/ | ||
diff --git a/Documentation/filesystems/udf.txt b/Documentation/filesystems/udf.txt index 511b4230c053..fde829a756e6 100644 --- a/Documentation/filesystems/udf.txt +++ b/Documentation/filesystems/udf.txt | |||
@@ -7,8 +7,17 @@ If you encounter problems with reading UDF discs using this driver, | |||
7 | please report them to linux_udf@hpesjro.fc.hp.com, which is the | 7 | please report them to linux_udf@hpesjro.fc.hp.com, which is the |
8 | developer's list. | 8 | developer's list. |
9 | 9 | ||
10 | Write support requires a block driver which supports writing. The current | 10 | Write support requires a block driver which supports writing. Currently |
11 | scsi and ide cdrom drivers do not support writing. | 11 | dvd+rw drives and media support true random sector writes, and so a udf |
12 | filesystem on such devices can be directly mounted read/write. CD-RW | ||
13 | media however, does not support this. Instead the media can be formatted | ||
14 | for packet mode using the utility cdrwtool, then the pktcdvd driver can | ||
15 | be bound to the underlying cd device to provide the required buffering | ||
16 | and read-modify-write cycles to allow the filesystem random sector writes | ||
17 | while providing the hardware with only full packet writes. While not | ||
18 | required for dvd+rw media, use of the pktcdvd driver often enhances | ||
19 | performance due to very poor read-modify-write support supplied internally | ||
20 | by drive firmware. | ||
12 | 21 | ||
13 | ------------------------------------------------------------------------------- | 22 | ------------------------------------------------------------------------------- |
14 | The following mount options are supported: | 23 | The following mount options are supported: |
diff --git a/Documentation/hwmon/adm9240 b/Documentation/hwmon/adm9240 index 35f618f32896..2c6f1fed4618 100644 --- a/Documentation/hwmon/adm9240 +++ b/Documentation/hwmon/adm9240 | |||
@@ -24,7 +24,7 @@ Authors: | |||
24 | Frodo Looijaard <frodol@dds.nl>, | 24 | Frodo Looijaard <frodol@dds.nl>, |
25 | Philip Edelbrock <phil@netroedge.com>, | 25 | Philip Edelbrock <phil@netroedge.com>, |
26 | Michiel Rook <michiel@grendelproject.nl>, | 26 | Michiel Rook <michiel@grendelproject.nl>, |
27 | Grant Coady <gcoady@gmail.com> with guidance | 27 | Grant Coady <gcoady.lk@gmail.com> with guidance |
28 | from Jean Delvare <khali@linux-fr.org> | 28 | from Jean Delvare <khali@linux-fr.org> |
29 | 29 | ||
30 | Interface | 30 | Interface |
diff --git a/Documentation/hwmon/f71805f b/Documentation/hwmon/f71805f index 28c5b7d1eb90..2ca69df669c3 100644 --- a/Documentation/hwmon/f71805f +++ b/Documentation/hwmon/f71805f | |||
@@ -17,7 +17,7 @@ Thanks to Kris Chen from Fintek for answering technical questions and | |||
17 | providing additional documentation. | 17 | providing additional documentation. |
18 | 18 | ||
19 | Thanks to Chris Lin from Jetway for providing wiring schematics and | 19 | Thanks to Chris Lin from Jetway for providing wiring schematics and |
20 | anwsering technical questions. | 20 | answering technical questions. |
21 | 21 | ||
22 | 22 | ||
23 | Description | 23 | Description |
diff --git a/Documentation/hwmon/k8temp b/Documentation/hwmon/k8temp index bab445ab0f52..30d123b8d920 100644 --- a/Documentation/hwmon/k8temp +++ b/Documentation/hwmon/k8temp | |||
@@ -2,7 +2,7 @@ Kernel driver k8temp | |||
2 | ==================== | 2 | ==================== |
3 | 3 | ||
4 | Supported chips: | 4 | Supported chips: |
5 | * AMD K8 CPU | 5 | * AMD Athlon64/FX or Opteron CPUs |
6 | Prefix: 'k8temp' | 6 | Prefix: 'k8temp' |
7 | Addresses scanned: PCI space | 7 | Addresses scanned: PCI space |
8 | Datasheet: http://www.amd.com/us-en/assets/content_type/white_papers_and_tech_docs/32559.pdf | 8 | Datasheet: http://www.amd.com/us-en/assets/content_type/white_papers_and_tech_docs/32559.pdf |
@@ -13,10 +13,13 @@ Contact: Rudolf Marek <r.marek@sh.cvut.cz> | |||
13 | Description | 13 | Description |
14 | ----------- | 14 | ----------- |
15 | 15 | ||
16 | This driver permits reading temperature sensor(s) embedded inside AMD K8 CPUs. | 16 | This driver permits reading temperature sensor(s) embedded inside AMD K8 |
17 | Official documentation says that it works from revision F of K8 core, but | 17 | family CPUs (Athlon64/FX, Opteron). Official documentation says that it works |
18 | in fact it seems to be implemented for all revisions of K8 except the first | 18 | from revision F of K8 core, but in fact it seems to be implemented for all |
19 | two revisions (SH-B0 and SH-B3). | 19 | revisions of K8 except the first two revisions (SH-B0 and SH-B3). |
20 | |||
21 | Please note that you will need at least lm-sensors 2.10.1 for proper userspace | ||
22 | support. | ||
20 | 23 | ||
21 | There can be up to four temperature sensors inside single CPU. The driver | 24 | There can be up to four temperature sensors inside single CPU. The driver |
22 | will auto-detect the sensors and will display only temperatures from | 25 | will auto-detect the sensors and will display only temperatures from |
diff --git a/Documentation/hwmon/smsc47m1 b/Documentation/hwmon/smsc47m1 index c15bbe68264e..04a11124f667 100644 --- a/Documentation/hwmon/smsc47m1 +++ b/Documentation/hwmon/smsc47m1 | |||
@@ -2,12 +2,14 @@ Kernel driver smsc47m1 | |||
2 | ====================== | 2 | ====================== |
3 | 3 | ||
4 | Supported chips: | 4 | Supported chips: |
5 | * SMSC LPC47B27x, LPC47M10x, LPC47M13x, LPC47M14x, LPC47M15x and LPC47M192 | 5 | * SMSC LPC47B27x, LPC47M112, LPC47M10x, LPC47M13x, LPC47M14x, |
6 | LPC47M15x and LPC47M192 | ||
6 | Addresses scanned: none, address read from Super I/O config space | 7 | Addresses scanned: none, address read from Super I/O config space |
7 | Prefix: 'smsc47m1' | 8 | Prefix: 'smsc47m1' |
8 | Datasheets: | 9 | Datasheets: |
9 | http://www.smsc.com/main/datasheets/47b27x.pdf | 10 | http://www.smsc.com/main/datasheets/47b27x.pdf |
10 | http://www.smsc.com/main/datasheets/47m10x.pdf | 11 | http://www.smsc.com/main/datasheets/47m10x.pdf |
12 | http://www.smsc.com/main/datasheets/47m112.pdf | ||
11 | http://www.smsc.com/main/tools/discontinued/47m13x.pdf | 13 | http://www.smsc.com/main/tools/discontinued/47m13x.pdf |
12 | http://www.smsc.com/main/datasheets/47m14x.pdf | 14 | http://www.smsc.com/main/datasheets/47m14x.pdf |
13 | http://www.smsc.com/main/tools/discontinued/47m15x.pdf | 15 | http://www.smsc.com/main/tools/discontinued/47m15x.pdf |
diff --git a/Documentation/hwmon/w83627ehf b/Documentation/hwmon/w83627ehf index fae3b781d82d..caa610a297e8 100644 --- a/Documentation/hwmon/w83627ehf +++ b/Documentation/hwmon/w83627ehf | |||
@@ -26,7 +26,7 @@ fan control mode). | |||
26 | Temperatures are measured in degrees Celsius and measurement resolution is 1 | 26 | Temperatures are measured in degrees Celsius and measurement resolution is 1 |
27 | degC for temp1 and 0.5 degC for temp2 and temp3. An alarm is triggered when | 27 | degC for temp1 and 0.5 degC for temp2 and temp3. An alarm is triggered when |
28 | the temperature gets higher than high limit; it stays on until the temperature | 28 | the temperature gets higher than high limit; it stays on until the temperature |
29 | falls below the Hysteresis value. | 29 | falls below the hysteresis value. |
30 | 30 | ||
31 | Fan rotation speeds are reported in RPM (rotations per minute). An alarm is | 31 | Fan rotation speeds are reported in RPM (rotations per minute). An alarm is |
32 | triggered if the rotation speed has dropped below a programmable limit. Fan | 32 | triggered if the rotation speed has dropped below a programmable limit. Fan |
@@ -67,9 +67,9 @@ Thermal Cruise mode | |||
67 | 67 | ||
68 | If the temperature is in the range defined by: | 68 | If the temperature is in the range defined by: |
69 | 69 | ||
70 | pwm[1-4]_target - set target temperature, unit millidegree Celcius | 70 | pwm[1-4]_target - set target temperature, unit millidegree Celsius |
71 | (range 0 - 127000) | 71 | (range 0 - 127000) |
72 | pwm[1-4]_tolerance - tolerance, unit millidegree Celcius (range 0 - 15000) | 72 | pwm[1-4]_tolerance - tolerance, unit millidegree Celsius (range 0 - 15000) |
73 | 73 | ||
74 | there are no changes to fan speed. Once the temperature leaves the interval, | 74 | there are no changes to fan speed. Once the temperature leaves the interval, |
75 | fan speed increases (temp is higher) or decreases if lower than desired. | 75 | fan speed increases (temp is higher) or decreases if lower than desired. |
diff --git a/Documentation/ibm-acpi.txt b/Documentation/ibm-acpi.txt index 71aa40345272..e50595bfd8ea 100644 --- a/Documentation/ibm-acpi.txt +++ b/Documentation/ibm-acpi.txt | |||
@@ -30,9 +30,10 @@ detailed description): | |||
30 | - ACPI sounds | 30 | - ACPI sounds |
31 | - temperature sensors | 31 | - temperature sensors |
32 | - Experimental: embedded controller register dump | 32 | - Experimental: embedded controller register dump |
33 | - Experimental: LCD brightness control | 33 | - LCD brightness control |
34 | - Experimental: volume control | 34 | - Volume control |
35 | - Experimental: fan speed, fan enable/disable | 35 | - Experimental: fan speed, fan enable/disable |
36 | - Experimental: WAN enable and disable | ||
36 | 37 | ||
37 | A compatibility table by model and feature is maintained on the web | 38 | A compatibility table by model and feature is maintained on the web |
38 | site, http://ibm-acpi.sf.net/. I appreciate any success or failure | 39 | site, http://ibm-acpi.sf.net/. I appreciate any success or failure |
@@ -52,40 +53,7 @@ Installation | |||
52 | 53 | ||
53 | If you are compiling this driver as included in the Linux kernel | 54 | If you are compiling this driver as included in the Linux kernel |
54 | sources, simply enable the CONFIG_ACPI_IBM option (Power Management / | 55 | sources, simply enable the CONFIG_ACPI_IBM option (Power Management / |
55 | ACPI / IBM ThinkPad Laptop Extras). The rest of this section describes | 56 | ACPI / IBM ThinkPad Laptop Extras). |
56 | how to install this driver when downloaded from the web site. | ||
57 | |||
58 | First, you need to get a kernel with ACPI support up and running. | ||
59 | Please refer to http://acpi.sourceforge.net/ for help with this | ||
60 | step. How successful you will be depends a lot on you ThinkPad model, | ||
61 | the kernel you are using and any additional patches applied. The | ||
62 | kernel provided with your distribution may not be good enough. I | ||
63 | needed to compile a 2.6.7 kernel with the 20040715 ACPI patch to get | ||
64 | ACPI working reliably on my ThinkPad X40. Old ThinkPad models may not | ||
65 | be supported at all. | ||
66 | |||
67 | Assuming you have the basic ACPI support working (e.g. you can see the | ||
68 | /proc/acpi directory), follow the following steps to install this | ||
69 | driver: | ||
70 | |||
71 | - unpack the archive: | ||
72 | |||
73 | tar xzvf ibm-acpi-x.y.tar.gz; cd ibm-acpi-x.y | ||
74 | |||
75 | - compile the driver: | ||
76 | |||
77 | make | ||
78 | |||
79 | - install the module in your kernel modules directory: | ||
80 | |||
81 | make install | ||
82 | |||
83 | - load the module: | ||
84 | |||
85 | modprobe ibm_acpi | ||
86 | |||
87 | After loading the module, check the "dmesg" output for any error messages. | ||
88 | |||
89 | 57 | ||
90 | Features | 58 | Features |
91 | -------- | 59 | -------- |
@@ -523,13 +491,8 @@ registers contain the current battery capacity, etc. If you experiment | |||
523 | with this, do send me your results (including some complete dumps with | 491 | with this, do send me your results (including some complete dumps with |
524 | a description of the conditions when they were taken.) | 492 | a description of the conditions when they were taken.) |
525 | 493 | ||
526 | EXPERIMENTAL: LCD brightness control -- /proc/acpi/ibm/brightness | 494 | LCD brightness control -- /proc/acpi/ibm/brightness |
527 | ----------------------------------------------------------------- | 495 | --------------------------------------------------- |
528 | |||
529 | This feature is marked EXPERIMENTAL because the implementation | ||
530 | directly accesses hardware registers and may not work as expected. USE | ||
531 | WITH CAUTION! To use this feature, you need to supply the | ||
532 | experimental=1 parameter when loading the module. | ||
533 | 496 | ||
534 | This feature allows software control of the LCD brightness on ThinkPad | 497 | This feature allows software control of the LCD brightness on ThinkPad |
535 | models which don't have a hardware brightness slider. The available | 498 | models which don't have a hardware brightness slider. The available |
@@ -542,13 +505,8 @@ commands are: | |||
542 | The <level> number range is 0 to 7, although not all of them may be | 505 | The <level> number range is 0 to 7, although not all of them may be |
543 | distinct. The current brightness level is shown in the file. | 506 | distinct. The current brightness level is shown in the file. |
544 | 507 | ||
545 | EXPERIMENTAL: Volume control -- /proc/acpi/ibm/volume | 508 | Volume control -- /proc/acpi/ibm/volume |
546 | ----------------------------------------------------- | 509 | --------------------------------------- |
547 | |||
548 | This feature is marked EXPERIMENTAL because the implementation | ||
549 | directly accesses hardware registers and may not work as expected. USE | ||
550 | WITH CAUTION! To use this feature, you need to supply the | ||
551 | experimental=1 parameter when loading the module. | ||
552 | 510 | ||
553 | This feature allows volume control on ThinkPad models which don't have | 511 | This feature allows volume control on ThinkPad models which don't have |
554 | a hardware volume knob. The available commands are: | 512 | a hardware volume knob. The available commands are: |
@@ -611,6 +569,23 @@ with the following command: | |||
611 | 569 | ||
612 | echo 'level <level>' > /proc/acpi/ibm/thermal | 570 | echo 'level <level>' > /proc/acpi/ibm/thermal |
613 | 571 | ||
572 | EXPERIMENTAL: WAN -- /proc/acpi/ibm/wan | ||
573 | --------------------------------------- | ||
574 | |||
575 | This feature is marked EXPERIMENTAL because the implementation | ||
576 | directly accesses hardware registers and may not work as expected. USE | ||
577 | WITH CAUTION! To use this feature, you need to supply the | ||
578 | experimental=1 parameter when loading the module. | ||
579 | |||
580 | This feature shows the presence and current state of a WAN (Sierra | ||
581 | Wireless EV-DO) device. If WAN is installed, the following commands can | ||
582 | be used: | ||
583 | |||
584 | echo enable > /proc/acpi/ibm/wan | ||
585 | echo disable > /proc/acpi/ibm/wan | ||
586 | |||
587 | It was tested on a Lenovo Thinkpad X60. It should probably work on other | ||
588 | Thinkpad models which come with this module installed. | ||
614 | 589 | ||
615 | Multiple Commands, Module Parameters | 590 | Multiple Commands, Module Parameters |
616 | ------------------------------------ | 591 | ------------------------------------ |
diff --git a/Documentation/input/xpad.txt b/Documentation/input/xpad.txt index b9111a703ce0..5427bdf225ed 100644 --- a/Documentation/input/xpad.txt +++ b/Documentation/input/xpad.txt | |||
@@ -3,20 +3,37 @@ xpad - Linux USB driver for X-Box gamepads | |||
3 | This is the very first release of a driver for X-Box gamepads. | 3 | This is the very first release of a driver for X-Box gamepads. |
4 | Basically, this was hacked away in just a few hours, so don't expect | 4 | Basically, this was hacked away in just a few hours, so don't expect |
5 | miracles. | 5 | miracles. |
6 | |||
6 | In particular, there is currently NO support for the rumble pack. | 7 | In particular, there is currently NO support for the rumble pack. |
7 | You won't find many ff-aware linux applications anyway. | 8 | You won't find many ff-aware linux applications anyway. |
8 | 9 | ||
9 | 10 | ||
10 | 0. Status | 11 | 0. Notes |
11 | --------- | 12 | -------- |
13 | |||
14 | Driver updated for kernel 2.6.17.11. (Based on a patch for 2.6.11.4.) | ||
12 | 15 | ||
13 | For now, this driver has only been tested on just one Linux-Box. | 16 | The number of buttons/axes reported varies based on 3 things: |
14 | This one is running a 2.4.18 kernel with usb-uhci on an amd athlon 600. | 17 | - if you are using a known controller |
18 | - if you are using a known dance pad | ||
19 | - if using an unknown device (one not listed below), what you set in the | ||
20 | module configuration for "Map D-PAD to buttons rather than axes for unknown | ||
21 | pads" (module option dpad_to_buttons) | ||
15 | 22 | ||
16 | The jstest-program from joystick-1.2.15 (jstest-version 2.1.0) reports | 23 | If you set dpad_to_buttons to 0 and you are using an unknown device (one |
17 | 8 axes and 10 buttons. | 24 | not listed below), the driver will map the directional pad to axes (X/Y), |
25 | if you said N it will map the d-pad to buttons, which is needed for dance | ||
26 | style games to function correctly. The default is Y. | ||
27 | |||
28 | dpad_to_buttons has no effect for known pads. | ||
29 | |||
30 | 0.1 Normal Controllers | ||
31 | ---------------------- | ||
32 | With a normal controller, the directional pad is mapped to its own X/Y axes. | ||
33 | The jstest-program from joystick-1.2.15 (jstest-version 2.1.0) will report 8 | ||
34 | axes and 10 buttons. | ||
18 | 35 | ||
19 | Alls 8 axes work, though they all have the same range (-32768..32767) | 36 | All 8 axes work, though they all have the same range (-32768..32767) |
20 | and the zero-setting is not correct for the triggers (I don't know if that | 37 | and the zero-setting is not correct for the triggers (I don't know if that |
21 | is some limitation of jstest, since the input device setup should be fine. I | 38 | is some limitation of jstest, since the input device setup should be fine. I |
22 | didn't have a look at jstest itself yet). | 39 | didn't have a look at jstest itself yet). |
@@ -30,16 +47,50 @@ in game functionality were OK. However, I find it rather difficult to | |||
30 | play first person shooters with a pad. Your mileage may vary. | 47 | play first person shooters with a pad. Your mileage may vary. |
31 | 48 | ||
32 | 49 | ||
50 | 0.2 Xbox Dance Pads | ||
51 | ------------------- | ||
52 | When using a known dance pad, jstest will report 6 axes and 14 buttons. | ||
53 | |||
54 | For dance style pads (like the redoctane pad) several changes | ||
55 | have been made. The old driver would map the d-pad to axes, resulting | ||
56 | in the driver being unable to report when the user was pressing both | ||
57 | left+right or up+down, making DDR style games unplayable. | ||
58 | |||
59 | Known dance pads automatically map the d-pad to buttons and will work | ||
60 | correctly out of the box. | ||
61 | |||
62 | If your dance pad is recognized by the driver but is using axes instead | ||
63 | of buttons, see section 0.3 - Unknown Controllers | ||
64 | |||
65 | I've tested this with Stepmania, and it works quite well. | ||
66 | |||
67 | |||
68 | 0.3 Unkown Controllers | ||
69 | ---------------------- | ||
70 | If you have an unkown xbox controller, it should work just fine with | ||
71 | the default settings. | ||
72 | |||
73 | HOWEVER if you have an unknown dance pad not listed below, it will not | ||
74 | work UNLESS you set "dpad_to_buttons" to 1 in the module configuration. | ||
75 | |||
76 | PLEASE if you have an unkown controller, email Dom <binary1230@yahoo.com> with | ||
77 | a dump from /proc/bus/usb and a description of the pad (manufacturer, country, | ||
78 | whether it is a dance pad or normal controller) so that we can add your pad | ||
79 | to the list of supported devices, ensuring that it will work out of the | ||
80 | box in the future. | ||
81 | |||
82 | |||
33 | 1. USB adapter | 83 | 1. USB adapter |
34 | -------------- | 84 | -------------- |
35 | 85 | ||
36 | Before you can actually use the driver, you need to get yourself an | 86 | Before you can actually use the driver, you need to get yourself an |
37 | adapter cable to connect the X-Box controller to your Linux-Box. | 87 | adapter cable to connect the X-Box controller to your Linux-Box. You |
88 | can buy these online fairly cheap, or build your own. | ||
38 | 89 | ||
39 | Such a cable is pretty easy to build. The Controller itself is a USB compound | 90 | Such a cable is pretty easy to build. The Controller itself is a USB |
40 | device (a hub with three ports for two expansion slots and the controller | 91 | compound device (a hub with three ports for two expansion slots and |
41 | device) with the only difference in a nonstandard connector (5 pins vs. 4 on | 92 | the controller device) with the only difference in a nonstandard connector |
42 | standard USB connector). | 93 | (5 pins vs. 4 on standard USB connector). |
43 | 94 | ||
44 | You just need to solder a USB connector onto the cable and keep the | 95 | You just need to solder a USB connector onto the cable and keep the |
45 | yellow wire unconnected. The other pins have the same order on both | 96 | yellow wire unconnected. The other pins have the same order on both |
@@ -51,36 +102,36 @@ original one. You can buy an extension cable and cut that instead. That way, | |||
51 | you can still use the controller with your X-Box, if you have one ;) | 102 | you can still use the controller with your X-Box, if you have one ;) |
52 | 103 | ||
53 | 104 | ||
54 | 2. driver installation | 105 | 2. Driver Installation |
55 | ---------------------- | 106 | ---------------------- |
56 | 107 | ||
57 | Once you have the adapter cable and the controller is connected, you need | 108 | Once you have the adapter cable and the controller is connected, you need |
58 | to load your USB subsystem and should cat /proc/bus/usb/devices. | 109 | to load your USB subsystem and should cat /proc/bus/usb/devices. |
59 | There should be an entry like the one at the end [4]. | 110 | There should be an entry like the one at the end [4]. |
60 | 111 | ||
61 | Currently (as of version 0.0.4), the following three devices are included: | 112 | Currently (as of version 0.0.6), the following devices are included: |
62 | original Microsoft XBOX controller (US), vendor=0x045e, product=0x0202 | 113 | original Microsoft XBOX controller (US), vendor=0x045e, product=0x0202 |
114 | smaller Microsoft XBOX controller (US), vendor=0x045e, product=0x0289 | ||
63 | original Microsoft XBOX controller (Japan), vendor=0x045e, product=0x0285 | 115 | original Microsoft XBOX controller (Japan), vendor=0x045e, product=0x0285 |
64 | InterAct PowerPad Pro (Germany), vendor=0x05fd, product=0x107a | 116 | InterAct PowerPad Pro (Germany), vendor=0x05fd, product=0x107a |
117 | RedOctane Xbox Dance Pad (US), vendor=0x0c12, product=0x8809 | ||
65 | 118 | ||
66 | If you have another controller that is not listed above and is not recognized | 119 | The driver should work with xbox pads not listed above as well, however |
67 | by the driver, please drop me a line with the appropriate info (that is, include | 120 | you will need to do something extra for dance pads to work. |
68 | the name, vendor and product ID, as well as the country where you bought it; | ||
69 | sending the whole dump out of /proc/bus/usb/devices along would be even better). | ||
70 | 121 | ||
71 | In theory, the driver should work with other controllers than mine | 122 | If you have a controller not listed above, see 0.3 - Unknown Controllers |
72 | (InterAct PowerPad pro, bought in Germany) just fine, but I cannot test this | ||
73 | for I only have this one controller. | ||
74 | 123 | ||
75 | If you compiled and installed the driver, test the functionality: | 124 | If you compiled and installed the driver, test the functionality: |
76 | > modprobe xpad | 125 | > modprobe xpad |
77 | > modprobe joydev | 126 | > modprobe joydev |
78 | > jstest /dev/js0 | 127 | > jstest /dev/js0 |
79 | 128 | ||
80 | There should be a single line showing 18 inputs (8 axes, 10 buttons), and | 129 | If you're using a normal controller, there should be a single line showing |
81 | it's values should change if you move the sticks and push the buttons. | 130 | 18 inputs (8 axes, 10 buttons), and its values should change if you move |
131 | the sticks and push the buttons. If you're using a dance pad, it should | ||
132 | show 20 inputs (6 axes, 14 buttons). | ||
82 | 133 | ||
83 | It works? Voila, your done ;) | 134 | It works? Voila, you're done ;) |
84 | 135 | ||
85 | 136 | ||
86 | 3. Thanks | 137 | 3. Thanks |
@@ -111,6 +162,22 @@ I: If#= 0 Alt= 0 #EPs= 2 Cls=58(unk. ) Sub=42 Prot=00 Driver=(none) | |||
111 | E: Ad=81(I) Atr=03(Int.) MxPS= 32 Ivl= 10ms | 162 | E: Ad=81(I) Atr=03(Int.) MxPS= 32 Ivl= 10ms |
112 | E: Ad=02(O) Atr=03(Int.) MxPS= 32 Ivl= 10ms | 163 | E: Ad=02(O) Atr=03(Int.) MxPS= 32 Ivl= 10ms |
113 | 164 | ||
165 | 5. /proc/bus/usb/devices - dump from Redoctane Xbox Dance Pad (US): | ||
166 | |||
167 | T: Bus=01 Lev=02 Prnt=09 Port=00 Cnt=01 Dev#= 10 Spd=12 MxCh= 0 | ||
168 | D: Ver= 1.10 Cls=00(>ifc ) Sub=00 Prot=00 MxPS= 8 #Cfgs= 1 | ||
169 | P: Vendor=0c12 ProdID=8809 Rev= 0.01 | ||
170 | S: Product=XBOX DDR | ||
171 | C:* #Ifs= 1 Cfg#= 1 Atr=80 MxPwr=100mA | ||
172 | I: If#= 0 Alt= 0 #EPs= 2 Cls=58(unk. ) Sub=42 Prot=00 Driver=xpad | ||
173 | E: Ad=82(I) Atr=03(Int.) MxPS= 32 Ivl=4ms | ||
174 | E: Ad=02(O) Atr=03(Int.) MxPS= 32 Ivl=4ms | ||
175 | |||
114 | -- | 176 | -- |
115 | Marko Friedemann <mfr@bmx-chemnitz.de> | 177 | Marko Friedemann <mfr@bmx-chemnitz.de> |
116 | 2002-07-16 | 178 | 2002-07-16 |
179 | - original doc | ||
180 | |||
181 | Dominic Cerquetti <binary1230@yahoo.com> | ||
182 | 2005-03-19 | ||
183 | - added stuff for dance pads, new d-pad->axes mappings | ||
diff --git a/Documentation/kernel-doc-nano-HOWTO.txt b/Documentation/kernel-doc-nano-HOWTO.txt index c65233d430f0..284e7e198e93 100644 --- a/Documentation/kernel-doc-nano-HOWTO.txt +++ b/Documentation/kernel-doc-nano-HOWTO.txt | |||
@@ -17,7 +17,7 @@ are: | |||
17 | special place-holders for where the extracted documentation should | 17 | special place-holders for where the extracted documentation should |
18 | go. | 18 | go. |
19 | 19 | ||
20 | - scripts/docproc.c | 20 | - scripts/basic/docproc.c |
21 | 21 | ||
22 | This is a program for converting SGML template files into SGML | 22 | This is a program for converting SGML template files into SGML |
23 | files. When a file is referenced it is searched for symbols | 23 | files. When a file is referenced it is searched for symbols |
diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt index 5a92ac085969..9913f0676643 100644 --- a/Documentation/kernel-parameters.txt +++ b/Documentation/kernel-parameters.txt | |||
@@ -164,6 +164,10 @@ and is between 256 and 4096 characters. It is defined in the file | |||
164 | acpi_skip_timer_override [HW,ACPI] | 164 | acpi_skip_timer_override [HW,ACPI] |
165 | Recognize and ignore IRQ0/pin2 Interrupt Override. | 165 | Recognize and ignore IRQ0/pin2 Interrupt Override. |
166 | For broken nForce2 BIOS resulting in XT-PIC timer. | 166 | For broken nForce2 BIOS resulting in XT-PIC timer. |
167 | acpi_use_timer_override [HW,ACPI} | ||
168 | Use timer override. For some broken Nvidia NF5 boards | ||
169 | that require a timer override, but don't have | ||
170 | HPET | ||
167 | 171 | ||
168 | acpi_dbg_layer= [HW,ACPI] | 172 | acpi_dbg_layer= [HW,ACPI] |
169 | Format: <int> | 173 | Format: <int> |
@@ -1231,6 +1235,11 @@ and is between 256 and 4096 characters. It is defined in the file | |||
1231 | machine check when some devices' config space | 1235 | machine check when some devices' config space |
1232 | is read. But various workarounds are disabled | 1236 | is read. But various workarounds are disabled |
1233 | and some IOMMU drivers will not work. | 1237 | and some IOMMU drivers will not work. |
1238 | bfsort Sort PCI devices into breadth-first order. | ||
1239 | This sorting is done to get a device | ||
1240 | order compatible with older (<= 2.4) kernels. | ||
1241 | nobfsort Don't sort PCI devices into breadth-first order. | ||
1242 | |||
1234 | pcmv= [HW,PCMCIA] BadgePAD 4 | 1243 | pcmv= [HW,PCMCIA] BadgePAD 4 |
1235 | 1244 | ||
1236 | pd. [PARIDE] | 1245 | pd. [PARIDE] |
diff --git a/Documentation/kprobes.txt b/Documentation/kprobes.txt index ba26201d5023..d71fafffce90 100644 --- a/Documentation/kprobes.txt +++ b/Documentation/kprobes.txt | |||
@@ -442,9 +442,10 @@ static int __init kprobe_init(void) | |||
442 | kp.fault_handler = handler_fault; | 442 | kp.fault_handler = handler_fault; |
443 | kp.symbol_name = "do_fork"; | 443 | kp.symbol_name = "do_fork"; |
444 | 444 | ||
445 | if ((ret = register_kprobe(&kp) < 0)) { | 445 | ret = register_kprobe(&kp); |
446 | if (ret < 0) { | ||
446 | printk("register_kprobe failed, returned %d\n", ret); | 447 | printk("register_kprobe failed, returned %d\n", ret); |
447 | return -1; | 448 | return ret; |
448 | } | 449 | } |
449 | printk("kprobe registered\n"); | 450 | printk("kprobe registered\n"); |
450 | return 0; | 451 | return 0; |
diff --git a/Documentation/lockdep-design.txt b/Documentation/lockdep-design.txt index dab123db5a4f..488773018152 100644 --- a/Documentation/lockdep-design.txt +++ b/Documentation/lockdep-design.txt | |||
@@ -50,10 +50,10 @@ The bit position indicates hardirq, softirq, hardirq-read, | |||
50 | softirq-read respectively, and the character displayed in each | 50 | softirq-read respectively, and the character displayed in each |
51 | indicates: | 51 | indicates: |
52 | 52 | ||
53 | '.' acquired while irqs enabled | 53 | '.' acquired while irqs disabled |
54 | '+' acquired in irq context | 54 | '+' acquired in irq context |
55 | '-' acquired in process context with irqs disabled | 55 | '-' acquired with irqs enabled |
56 | '?' read-acquired both with irqs enabled and in irq context | 56 | '?' read acquired in irq context with irqs enabled. |
57 | 57 | ||
58 | Unused mutexes cannot be part of the cause of an error. | 58 | Unused mutexes cannot be part of the cause of an error. |
59 | 59 | ||
diff --git a/Documentation/memory-barriers.txt b/Documentation/memory-barriers.txt index 994355b0cd19..7751704b6db1 100644 --- a/Documentation/memory-barriers.txt +++ b/Documentation/memory-barriers.txt | |||
@@ -1016,7 +1016,7 @@ There are some more advanced barrier functions: | |||
1016 | 1016 | ||
1017 | (*) set_mb(var, value) | 1017 | (*) set_mb(var, value) |
1018 | 1018 | ||
1019 | This assigns the value to the variable and then inserts at least a write | 1019 | This assigns the value to the variable and then inserts a full memory |
1020 | barrier after it, depending on the function. It isn't guaranteed to | 1020 | barrier after it, depending on the function. It isn't guaranteed to |
1021 | insert anything more than a compiler barrier in a UP compilation. | 1021 | insert anything more than a compiler barrier in a UP compilation. |
1022 | 1022 | ||
@@ -1898,7 +1898,7 @@ queue before processing any further requests: | |||
1898 | smp_wmb(); | 1898 | smp_wmb(); |
1899 | <A:modify v=2> <C:busy> | 1899 | <A:modify v=2> <C:busy> |
1900 | <C:queue v=2> | 1900 | <C:queue v=2> |
1901 | p = &b; q = p; | 1901 | p = &v; q = p; |
1902 | <D:request p> | 1902 | <D:request p> |
1903 | <B:modify p=&v> <D:commit p=&v> | 1903 | <B:modify p=&v> <D:commit p=&v> |
1904 | <D:read p> | 1904 | <D:read p> |
diff --git a/Documentation/mips/time.README b/Documentation/mips/time.README index 69ddc5c14b79..a4ce603ed3b3 100644 --- a/Documentation/mips/time.README +++ b/Documentation/mips/time.README | |||
@@ -38,19 +38,14 @@ The new time code provide the following services: | |||
38 | 38 | ||
39 | a) Implements functions required by Linux common code: | 39 | a) Implements functions required by Linux common code: |
40 | time_init | 40 | time_init |
41 | do_gettimeofday | ||
42 | do_settimeofday | ||
43 | 41 | ||
44 | b) provides an abstraction of RTC and null RTC implementation as default. | 42 | b) provides an abstraction of RTC and null RTC implementation as default. |
45 | extern unsigned long (*rtc_get_time)(void); | 43 | extern unsigned long (*rtc_get_time)(void); |
46 | extern int (*rtc_set_time)(unsigned long); | 44 | extern int (*rtc_set_time)(unsigned long); |
47 | 45 | ||
48 | c) a set of gettimeoffset functions for different CPUs and different | 46 | c) high-level and low-level timer interrupt routines where the timer |
49 | needs. | 47 | interrupt source may or may not be the CPU timer. The high-level |
50 | 48 | routine is dispatched through do_IRQ() while the low-level is | |
51 | d) high-level and low-level timer interrupt routines where the timer | ||
52 | interrupt source may or may not be the CPU timer. The high-level | ||
53 | routine is dispatched through do_IRQ() while the low-level is | ||
54 | dispatched in assemably code (usually int-handler.S) | 49 | dispatched in assemably code (usually int-handler.S) |
55 | 50 | ||
56 | 51 | ||
@@ -63,7 +58,7 @@ the following functions or values: | |||
63 | a) board_time_init - a function pointer. Invoked at the beginnig of | 58 | a) board_time_init - a function pointer. Invoked at the beginnig of |
64 | time_init(). It is optional. | 59 | time_init(). It is optional. |
65 | 1. (optional) set up RTC routines | 60 | 1. (optional) set up RTC routines |
66 | 2. (optional) calibrate and set the mips_counter_frequency | 61 | 2. (optional) calibrate and set the mips_hpt_frequency |
67 | 62 | ||
68 | b) plat_timer_setup - a function pointer. Invoked at the end of time_init() | 63 | b) plat_timer_setup - a function pointer. Invoked at the end of time_init() |
69 | 1. (optional) over-ride any decisions made in time_init() | 64 | 1. (optional) over-ride any decisions made in time_init() |
@@ -72,9 +67,8 @@ the following functions or values: | |||
72 | 67 | ||
73 | c) (optional) board-specific RTC routines. | 68 | c) (optional) board-specific RTC routines. |
74 | 69 | ||
75 | d) (optional) mips_counter_frequency - It must be definied if the board | 70 | d) (optional) mips_hpt_frequency - It must be definied if the board |
76 | is using CPU counter for timer interrupt or it is using fixed rate | 71 | is using CPU counter for timer interrupt. |
77 | gettimeoffset(). | ||
78 | 72 | ||
79 | 73 | ||
80 | PORTING GUIDE | 74 | PORTING GUIDE |
@@ -89,22 +83,12 @@ Step 1: decide how you like to implement the time services. | |||
89 | If the answer is no, you need a timer to provide the timer interrupt | 83 | If the answer is no, you need a timer to provide the timer interrupt |
90 | at 100 HZ speed. | 84 | at 100 HZ speed. |
91 | 85 | ||
92 | You cannot use the fast gettimeoffset functions, i.e., | ||
93 | |||
94 | unsigned long fixed_rate_gettimeoffset(void); | ||
95 | unsigned long calibrate_div32_gettimeoffset(void); | ||
96 | unsigned long calibrate_div64_gettimeoffset(void); | ||
97 | |||
98 | You can use null_gettimeoffset() will gives the same time resolution as | ||
99 | jiffy. Or you can implement your own gettimeoffset (probably based on | ||
100 | some ad hoc hardware on your machine.) | ||
101 | |||
102 | c) The following sub steps assume your CPU has counter register. | 86 | c) The following sub steps assume your CPU has counter register. |
103 | Do you plan to use the CPU counter register as the timer interrupt | 87 | Do you plan to use the CPU counter register as the timer interrupt |
104 | or use an exnternal timer? | 88 | or use an exnternal timer? |
105 | 89 | ||
106 | In order to use CPU counter register as the timer interrupt source, you | 90 | In order to use CPU counter register as the timer interrupt source, you |
107 | must know the counter speed (mips_counter_frequency). It is usually the | 91 | must know the counter speed (mips_hpt_frequency). It is usually the |
108 | same as the CPU speed or an integral divisor of it. | 92 | same as the CPU speed or an integral divisor of it. |
109 | 93 | ||
110 | d) decide on whether you want to use high-level or low-level timer | 94 | d) decide on whether you want to use high-level or low-level timer |
@@ -121,10 +105,10 @@ Step 3: implement rtc routines, board_time_init() and plat_timer_setup() | |||
121 | if needed. | 105 | if needed. |
122 | 106 | ||
123 | board_time_init() - | 107 | board_time_init() - |
124 | a) (optional) set up RTC routines, | 108 | a) (optional) set up RTC routines, |
125 | b) (optional) calibrate and set the mips_counter_frequency | 109 | b) (optional) calibrate and set the mips_hpt_frequency |
126 | (only needed if you intended to use fixed_rate_gettimeoffset | 110 | (only needed if you intended to use cpu counter as timer interrupt |
127 | or use cpu counter as timer interrupt source) | 111 | source) |
128 | 112 | ||
129 | plat_timer_setup() - | 113 | plat_timer_setup() - |
130 | a) (optional) over-write any choices made above by time_init(). | 114 | a) (optional) over-write any choices made above by time_init(). |
@@ -154,8 +138,8 @@ for some of the functions in time.c. | |||
154 | For example, you may define your own timer interrupt routine, which does | 138 | For example, you may define your own timer interrupt routine, which does |
155 | some of its own processing and then calls timer_interrupt(). | 139 | some of its own processing and then calls timer_interrupt(). |
156 | 140 | ||
157 | You can also over-ride any of the built-in functions (gettimeoffset, | 141 | You can also over-ride any of the built-in functions (RTC routines |
158 | RTC routines and/or timer interrupt routine). | 142 | and/or timer interrupt routine). |
159 | 143 | ||
160 | 144 | ||
161 | PORTING NOTES FOR SMP | 145 | PORTING NOTES FOR SMP |
@@ -187,10 +171,3 @@ You need to decide on your timer interrupt sources. | |||
187 | 171 | ||
188 | You can also do the low-level version of those interrupt routines, | 172 | You can also do the low-level version of those interrupt routines, |
189 | following similar dispatching routes described above. | 173 | following similar dispatching routes described above. |
190 | |||
191 | Note about do_gettimeoffset(): | ||
192 | |||
193 | It is very likely the CPU counter registers are not sync'ed up in a SMP box. | ||
194 | Therefore you cannot really use the many of the existing routines that | ||
195 | are based on CPU counter. You should wirte your own gettimeoffset rouinte | ||
196 | if you want intra-jiffy resolution. | ||
diff --git a/Documentation/power/interface.txt b/Documentation/power/interface.txt index a66bec222b16..74311d7e0f3c 100644 --- a/Documentation/power/interface.txt +++ b/Documentation/power/interface.txt | |||
@@ -30,6 +30,17 @@ testing). The system will support either 'firmware' or 'platform', and | |||
30 | that is known a priori. But, the user may choose 'shutdown' or | 30 | that is known a priori. But, the user may choose 'shutdown' or |
31 | 'reboot' as alternatives. | 31 | 'reboot' as alternatives. |
32 | 32 | ||
33 | Additionally, /sys/power/disk can be used to turn on one of the two testing | ||
34 | modes of the suspend-to-disk mechanism: 'testproc' or 'test'. If the | ||
35 | suspend-to-disk mechanism is in the 'testproc' mode, writing 'disk' to | ||
36 | /sys/power/state will cause the kernel to disable nonboot CPUs and freeze | ||
37 | tasks, wait for 5 seconds, unfreeze tasks and enable nonboot CPUs. If it is | ||
38 | in the 'test' mode, writing 'disk' to /sys/power/state will cause the kernel | ||
39 | to disable nonboot CPUs and freeze tasks, shrink memory, suspend devices, wait | ||
40 | for 5 seconds, resume devices, unfreeze tasks and enable nonboot CPUs. Then, | ||
41 | we are able to look in the log messages and work out, for example, which code | ||
42 | is being slow and which device drivers are misbehaving. | ||
43 | |||
33 | Reading from this file will display what the mode is currently set | 44 | Reading from this file will display what the mode is currently set |
34 | to. Writing to this file will accept one of | 45 | to. Writing to this file will accept one of |
35 | 46 | ||
@@ -37,6 +48,8 @@ to. Writing to this file will accept one of | |||
37 | 'platform' | 48 | 'platform' |
38 | 'shutdown' | 49 | 'shutdown' |
39 | 'reboot' | 50 | 'reboot' |
51 | 'testproc' | ||
52 | 'test' | ||
40 | 53 | ||
41 | It will only change to 'firmware' or 'platform' if the system supports | 54 | It will only change to 'firmware' or 'platform' if the system supports |
42 | it. | 55 | it. |
diff --git a/Documentation/s390/CommonIO b/Documentation/s390/CommonIO index 59d1166d41ee..d684a6ac69a8 100644 --- a/Documentation/s390/CommonIO +++ b/Documentation/s390/CommonIO | |||
@@ -66,7 +66,7 @@ Command line parameters | |||
66 | 66 | ||
67 | When a device is un-ignored, device recognition and sensing is performed and | 67 | When a device is un-ignored, device recognition and sensing is performed and |
68 | the device driver will be notified if possible, so the device will become | 68 | the device driver will be notified if possible, so the device will become |
69 | available to the system. | 69 | available to the system. Note that un-ignoring is performed asynchronously. |
70 | 70 | ||
71 | You can also add ranges of devices to be ignored by piping to | 71 | You can also add ranges of devices to be ignored by piping to |
72 | /proc/cio_ignore; "add <device range>, <device range>, ..." will ignore the | 72 | /proc/cio_ignore; "add <device range>, <device range>, ..." will ignore the |
diff --git a/Documentation/s390/cds.txt b/Documentation/s390/cds.txt index d80e5733827d..32a96cc39215 100644 --- a/Documentation/s390/cds.txt +++ b/Documentation/s390/cds.txt | |||
@@ -174,14 +174,10 @@ read_dev_chars() - Read Device Characteristics | |||
174 | 174 | ||
175 | This routine returns the characteristics for the device specified. | 175 | This routine returns the characteristics for the device specified. |
176 | 176 | ||
177 | The function is meant to be called with an irq handler in place; that is, | 177 | The function is meant to be called with the device already enabled; that is, |
178 | at earliest during set_online() processing. | 178 | at earliest during set_online() processing. |
179 | 179 | ||
180 | While the request is processed synchronously, the device interrupt | 180 | The ccw_device must not be locked prior to calling read_dev_chars(). |
181 | handler is called for final ending status. In case of error situations the | ||
182 | interrupt handler may recover appropriately. The device irq handler can | ||
183 | recognize the corresponding interrupts by the interruption parameter be | ||
184 | 0x00524443. The ccw_device must not be locked prior to calling read_dev_chars(). | ||
185 | 181 | ||
186 | The function may be called enabled or disabled. | 182 | The function may be called enabled or disabled. |
187 | 183 | ||
@@ -410,26 +406,7 @@ individual flag meanings. | |||
410 | 406 | ||
411 | Usage Notes : | 407 | Usage Notes : |
412 | 408 | ||
413 | Prior to call ccw_device_start() the device driver must assure disabled state, | 409 | ccw_device_start() must be called disabled and with the ccw device lock held. |
414 | i.e. the I/O mask value in the PSW must be disabled. This can be accomplished | ||
415 | by calling local_save_flags( flags). The current PSW flags are preserved and | ||
416 | can be restored by local_irq_restore( flags) at a later time. | ||
417 | |||
418 | If the device driver violates this rule while running in a uni-processor | ||
419 | environment an interrupt might be presented prior to the ccw_device_start() | ||
420 | routine returning to the device driver main path. In this case we will end in a | ||
421 | deadlock situation as the interrupt handler will try to obtain the irq | ||
422 | lock the device driver still owns (see below) ! | ||
423 | |||
424 | The driver must assure to hold the device specific lock. This can be | ||
425 | accomplished by | ||
426 | |||
427 | (i) spin_lock(get_ccwdev_lock(cdev)), or | ||
428 | (ii) spin_lock_irqsave(get_ccwdev_lock(cdev), flags) | ||
429 | |||
430 | Option (i) should be used if the calling routine is running disabled for | ||
431 | I/O interrupts (see above) already. Option (ii) obtains the device gate und | ||
432 | puts the CPU into I/O disabled state by preserving the current PSW flags. | ||
433 | 410 | ||
434 | The device driver is allowed to issue the next ccw_device_start() call from | 411 | The device driver is allowed to issue the next ccw_device_start() call from |
435 | within its interrupt handler already. It is not required to schedule a | 412 | within its interrupt handler already. It is not required to schedule a |
@@ -488,7 +465,7 @@ int ccw_device_resume(struct ccw_device *cdev); | |||
488 | 465 | ||
489 | cdev - ccw_device the resume operation is requested for | 466 | cdev - ccw_device the resume operation is requested for |
490 | 467 | ||
491 | The resume_IO() function returns: | 468 | The ccw_device_resume() function returns: |
492 | 469 | ||
493 | 0 - suspended channel program is resumed | 470 | 0 - suspended channel program is resumed |
494 | -EBUSY - status pending | 471 | -EBUSY - status pending |
@@ -507,6 +484,8 @@ a long-running channel program or the device might require to initially issue | |||
507 | a halt subchannel (HSCH) I/O command. For those purposes the ccw_device_halt() | 484 | a halt subchannel (HSCH) I/O command. For those purposes the ccw_device_halt() |
508 | command is provided. | 485 | command is provided. |
509 | 486 | ||
487 | ccw_device_halt() must be called disabled and with the ccw device lock held. | ||
488 | |||
510 | int ccw_device_halt(struct ccw_device *cdev, | 489 | int ccw_device_halt(struct ccw_device *cdev, |
511 | unsigned long intparm); | 490 | unsigned long intparm); |
512 | 491 | ||
@@ -517,7 +496,7 @@ intparm : interruption parameter; value is only used if no I/O | |||
517 | 496 | ||
518 | The ccw_device_halt() function returns : | 497 | The ccw_device_halt() function returns : |
519 | 498 | ||
520 | 0 - successful completion or request successfully initiated | 499 | 0 - request successfully initiated |
521 | -EBUSY - the device is currently busy, or status pending. | 500 | -EBUSY - the device is currently busy, or status pending. |
522 | -ENODEV - cdev invalid. | 501 | -ENODEV - cdev invalid. |
523 | -EINVAL - The device is not operational or the ccw device is not online. | 502 | -EINVAL - The device is not operational or the ccw device is not online. |
@@ -533,6 +512,23 @@ can then perform an appropriate action. Prior to interrupt of an outstanding | |||
533 | read to a network device (with or without PCI flag) a ccw_device_halt() | 512 | read to a network device (with or without PCI flag) a ccw_device_halt() |
534 | is required to end the pending operation. | 513 | is required to end the pending operation. |
535 | 514 | ||
515 | ccw_device_clear() - Terminage I/O Request Processing | ||
516 | |||
517 | In order to terminate all I/O processing at the subchannel, the clear subchannel | ||
518 | (CSCH) command is used. It can be issued via ccw_device_clear(). | ||
519 | |||
520 | ccw_device_clear() must be called disabled and with the ccw device lock held. | ||
521 | |||
522 | int ccw_device_clear(struct ccw_device *cdev, unsigned long intparm); | ||
523 | |||
524 | cdev: ccw_device the clear operation is requested for | ||
525 | intparm: interruption parameter (see ccw_device_halt()) | ||
526 | |||
527 | The ccw_device_clear() function returns: | ||
528 | |||
529 | 0 - request successfully initiated | ||
530 | -ENODEV - cdev invalid | ||
531 | -EINVAL - The device is not operational or the ccw device is not online. | ||
536 | 532 | ||
537 | Miscellaneous Support Routines | 533 | Miscellaneous Support Routines |
538 | 534 | ||
diff --git a/Documentation/s390/driver-model.txt b/Documentation/s390/driver-model.txt index 62c082387aea..77bf450ec39b 100644 --- a/Documentation/s390/driver-model.txt +++ b/Documentation/s390/driver-model.txt | |||
@@ -239,6 +239,9 @@ status - Can be 'online' or 'offline'. | |||
239 | 239 | ||
240 | type - The physical type of the channel path. | 240 | type - The physical type of the channel path. |
241 | 241 | ||
242 | shared - Whether the channel path is shared. | ||
243 | |||
244 | cmg - The channel measurement group. | ||
242 | 245 | ||
243 | 3. System devices | 246 | 3. System devices |
244 | ----------------- | 247 | ----------------- |
diff --git a/Documentation/sound/alsa/ALSA-Configuration.txt b/Documentation/sound/alsa/ALSA-Configuration.txt index 138673a907f5..3472d9c4ef1b 100644 --- a/Documentation/sound/alsa/ALSA-Configuration.txt +++ b/Documentation/sound/alsa/ALSA-Configuration.txt | |||
@@ -753,7 +753,7 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed. | |||
753 | position_fix - Fix DMA pointer (0 = auto, 1 = none, 2 = POSBUF, 3 = FIFO size) | 753 | position_fix - Fix DMA pointer (0 = auto, 1 = none, 2 = POSBUF, 3 = FIFO size) |
754 | single_cmd - Use single immediate commands to communicate with | 754 | single_cmd - Use single immediate commands to communicate with |
755 | codecs (for debugging only) | 755 | codecs (for debugging only) |
756 | disable_msi - Disable Message Signaled Interrupt (MSI) | 756 | enable_msi - Enable Message Signaled Interrupt (MSI) (default = off) |
757 | 757 | ||
758 | This module supports one card and autoprobe. | 758 | This module supports one card and autoprobe. |
759 | 759 | ||
diff --git a/Documentation/sysctl/kernel.txt b/Documentation/sysctl/kernel.txt index 89bf8c20a586..0bc7f1e3c9e6 100644 --- a/Documentation/sysctl/kernel.txt +++ b/Documentation/sysctl/kernel.txt | |||
@@ -86,7 +86,7 @@ valid for 30 seconds. | |||
86 | core_pattern: | 86 | core_pattern: |
87 | 87 | ||
88 | core_pattern is used to specify a core dumpfile pattern name. | 88 | core_pattern is used to specify a core dumpfile pattern name. |
89 | . max length 64 characters; default value is "core" | 89 | . max length 128 characters; default value is "core" |
90 | . core_pattern is used as a pattern template for the output filename; | 90 | . core_pattern is used as a pattern template for the output filename; |
91 | certain string patterns (beginning with '%') are substituted with | 91 | certain string patterns (beginning with '%') are substituted with |
92 | their actual values. | 92 | their actual values. |
@@ -105,6 +105,9 @@ core_pattern is used to specify a core dumpfile pattern name. | |||
105 | %h hostname | 105 | %h hostname |
106 | %e executable filename | 106 | %e executable filename |
107 | %<OTHER> both are dropped | 107 | %<OTHER> both are dropped |
108 | . If the first character of the pattern is a '|', the kernel will treat | ||
109 | the rest of the pattern as a command to run. The core dump will be | ||
110 | written to the standard input of that program instead of to a file. | ||
108 | 111 | ||
109 | ============================================================== | 112 | ============================================================== |
110 | 113 | ||
diff --git a/Documentation/usb/usb-serial.txt b/Documentation/usb/usb-serial.txt index 8dc2bacc8f1f..50436e1663ea 100644 --- a/Documentation/usb/usb-serial.txt +++ b/Documentation/usb/usb-serial.txt | |||
@@ -428,12 +428,6 @@ Options supported: | |||
428 | See http://www.uuhaus.de/linux/palmconnect.html for up-to-date | 428 | See http://www.uuhaus.de/linux/palmconnect.html for up-to-date |
429 | information on this driver. | 429 | information on this driver. |
430 | 430 | ||
431 | AIRcable USB Dongle Bluetooth driver | ||
432 | If there is the cdc_acm driver loaded in the system, you will find that the | ||
433 | cdc_acm claims the device before AIRcable can. This is simply corrected | ||
434 | by unloading both modules and then loading the aircable module before | ||
435 | cdc_acm module | ||
436 | |||
437 | Generic Serial driver | 431 | Generic Serial driver |
438 | 432 | ||
439 | If your device is not one of the above listed devices, compatible with | 433 | If your device is not one of the above listed devices, compatible with |
diff --git a/Documentation/video4linux/CARDLIST.cx88 b/Documentation/video4linux/CARDLIST.cx88 index 126e59d935cd..8755b3e7b09e 100644 --- a/Documentation/video4linux/CARDLIST.cx88 +++ b/Documentation/video4linux/CARDLIST.cx88 | |||
@@ -51,7 +51,7 @@ | |||
51 | 50 -> NPG Tech Real TV FM Top 10 [14f1:0842] | 51 | 50 -> NPG Tech Real TV FM Top 10 [14f1:0842] |
52 | 51 -> WinFast DTV2000 H [107d:665e] | 52 | 51 -> WinFast DTV2000 H [107d:665e] |
53 | 52 -> Geniatech DVB-S [14f1:0084] | 53 | 52 -> Geniatech DVB-S [14f1:0084] |
54 | 53 -> Hauppauge WinTV-HVR3000 TriMode Analog/DVB-S/DVB-T [0070:1404] | 54 | 53 -> Hauppauge WinTV-HVR3000 TriMode Analog/DVB-S/DVB-T [0070:1404,0070:1400,0070:1401,0070:1402] |
55 | 54 -> Norwood Micro TV Tuner | 55 | 54 -> Norwood Micro TV Tuner |
56 | 55 -> Shenzhen Tungsten Ages Tech TE-DTV-250 / Swann OEM [c180:c980] | 56 | 55 -> Shenzhen Tungsten Ages Tech TE-DTV-250 / Swann OEM [c180:c980] |
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] |
diff --git a/Documentation/watchdog/src/watchdog-simple.c b/Documentation/watchdog/src/watchdog-simple.c index 85cf17c48669..47801bc7e742 100644 --- a/Documentation/watchdog/src/watchdog-simple.c +++ b/Documentation/watchdog/src/watchdog-simple.c | |||
@@ -1,4 +1,6 @@ | |||
1 | #include <stdio.h> | ||
1 | #include <stdlib.h> | 2 | #include <stdlib.h> |
3 | #include <unistd.h> | ||
2 | #include <fcntl.h> | 4 | #include <fcntl.h> |
3 | 5 | ||
4 | int main(int argc, const char *argv[]) { | 6 | int main(int argc, const char *argv[]) { |