aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation
diff options
context:
space:
mode:
Diffstat (limited to 'Documentation')
-rw-r--r--Documentation/ABI/testing/sysfs-class-regulator136
-rw-r--r--Documentation/ABI/testing/sysfs-class-uwb_rc14
-rw-r--r--Documentation/ABI/testing/sysfs-devices-memory51
-rw-r--r--Documentation/Changes4
-rw-r--r--Documentation/CodingStyle18
-rw-r--r--Documentation/DMA-API.txt11
-rw-r--r--Documentation/DMA-mapping.txt2
-rw-r--r--Documentation/DocBook/Makefile2
-rw-r--r--Documentation/DocBook/networking.tmpl8
-rw-r--r--Documentation/DocBook/regulator.tmpl304
-rw-r--r--Documentation/DocBook/uio-howto.tmpl189
-rw-r--r--Documentation/IO-mapping.txt4
-rw-r--r--Documentation/PCI/pci.txt3
-rw-r--r--Documentation/RCU/00-INDEX2
-rw-r--r--Documentation/RCU/rcubarrier.txt304
-rw-r--r--Documentation/accounting/getdelays.c4
-rw-r--r--Documentation/bad_memory.txt45
-rw-r--r--Documentation/blackfin/00-INDEX3
-rw-r--r--Documentation/blackfin/bfin-gpio-notes.txt71
-rw-r--r--Documentation/block/biodoc.txt11
-rw-r--r--Documentation/block/queue-sysfs.txt63
-rw-r--r--Documentation/cgroups/cgroups.txt14
-rw-r--r--Documentation/cgroups/cpuacct.txt (renamed from Documentation/controllers/cpuacct.txt)0
-rw-r--r--Documentation/cgroups/cpusets.txt (renamed from Documentation/cpusets.txt)0
-rw-r--r--Documentation/cgroups/devices.txt (renamed from Documentation/controllers/devices.txt)0
-rw-r--r--Documentation/cgroups/memcg_test.txt362
-rw-r--r--Documentation/cgroups/memory.txt (renamed from Documentation/controllers/memory.txt)135
-rw-r--r--Documentation/cgroups/resource_counter.txt (renamed from Documentation/controllers/resource_counter.txt)0
-rw-r--r--Documentation/cpu-hotplug.txt17
-rw-r--r--Documentation/cputopology.txt48
-rw-r--r--Documentation/crypto/async-tx-api.txt96
-rw-r--r--Documentation/dell_rbu.txt4
-rw-r--r--Documentation/development-process/4.Coding6
-rw-r--r--Documentation/dmaengine.txt1
-rw-r--r--Documentation/feature-removal-schedule.txt17
-rw-r--r--Documentation/filesystems/Locking12
-rw-r--r--Documentation/filesystems/btrfs.txt91
-rw-r--r--Documentation/filesystems/devpts.txt132
-rw-r--r--Documentation/filesystems/ext4.txt85
-rw-r--r--Documentation/filesystems/files.txt6
-rw-r--r--Documentation/filesystems/nfs-rdma.txt4
-rw-r--r--Documentation/filesystems/ocfs2.txt3
-rw-r--r--Documentation/filesystems/proc.txt293
-rw-r--r--Documentation/filesystems/squashfs.txt225
-rw-r--r--Documentation/filesystems/ubifs.txt10
-rw-r--r--Documentation/filesystems/vfs.txt13
-rw-r--r--Documentation/hwmon/abituguru-datasheet10
-rw-r--r--Documentation/hwmon/adt747019
-rw-r--r--Documentation/hwmon/adt747587
-rw-r--r--Documentation/hwmon/f71882fg89
-rw-r--r--Documentation/hwmon/it8720
-rw-r--r--Documentation/hwmon/lis3lv02d30
-rw-r--r--Documentation/hwmon/lm7012
-rw-r--r--Documentation/hwmon/lm852
-rw-r--r--Documentation/hwmon/ltc424581
-rw-r--r--Documentation/ide/warm-plug-howto.txt5
-rw-r--r--Documentation/input/walkera0701.txt109
-rw-r--r--Documentation/ioctl/ioctl-number.txt12
-rw-r--r--Documentation/ja_JP/stable_kernel_rules.txt15
-rw-r--r--Documentation/kbuild/00-INDEX6
-rw-r--r--Documentation/kbuild/kbuild.txt134
-rw-r--r--Documentation/kbuild/kconfig.txt188
-rw-r--r--Documentation/kbuild/modules.txt4
-rw-r--r--Documentation/kernel-doc-nano-HOWTO.txt34
-rw-r--r--Documentation/kernel-parameters.txt129
-rw-r--r--Documentation/kobject.txt4
-rw-r--r--Documentation/kprobes.txt5
-rw-r--r--Documentation/laptops/thinkpad-acpi.txt27
-rw-r--r--Documentation/lguest/Makefile2
-rw-r--r--Documentation/magic-number.txt6
-rw-r--r--Documentation/memory-hotplug.txt16
-rw-r--r--Documentation/mips/AU1xxx_IDE.README8
-rw-r--r--Documentation/networking/alias.txt25
-rw-r--r--Documentation/networking/netconsole.txt3
-rw-r--r--Documentation/networking/rxrpc.txt2
-rw-r--r--Documentation/networking/tuntap.txt2
-rw-r--r--Documentation/nommu-mmap.txt31
-rw-r--r--Documentation/powerpc/cpu_features.txt2
-rw-r--r--Documentation/powerpc/dts-bindings/4xx/ndfc.txt39
-rw-r--r--Documentation/powerpc/dts-bindings/fsl/board.txt32
-rw-r--r--Documentation/powerpc/dts-bindings/fsl/mpc5200.txt180
-rw-r--r--Documentation/powerpc/mpc52xx-device-tree-bindings.txt277
-rw-r--r--Documentation/s390/Debugging390.txt2
-rw-r--r--Documentation/s390/cds.txt2
-rw-r--r--Documentation/s390/s390dbf.txt2
-rw-r--r--Documentation/scheduler/sched-design-CFS.txt2
-rw-r--r--Documentation/scsi/ChangeLog.lpfc2
-rw-r--r--Documentation/scsi/ChangeLog.ncr53c8xx2
-rw-r--r--Documentation/scsi/ChangeLog.sym53c8xx2
-rw-r--r--Documentation/scsi/scsi_fc_transport.txt4
-rw-r--r--Documentation/sound/alsa/HD-Audio-Models.txt13
-rw-r--r--Documentation/spi/spi-lm70llp10
-rw-r--r--Documentation/sysctl/vm.txt616
-rw-r--r--Documentation/sysrq.txt19
-rw-r--r--Documentation/usb/dma.txt11
-rw-r--r--Documentation/usb/power-management.txt22
-rw-r--r--Documentation/usb/wusb-cbaf9
-rw-r--r--Documentation/video4linux/CARDLIST.saa71341
-rw-r--r--Documentation/video4linux/si470x.txt1
-rw-r--r--Documentation/video4linux/v4l2-framework.txt19
-rw-r--r--Documentation/video4linux/v4lgrab.c25
-rw-r--r--Documentation/vm/unevictable-lru.txt63
-rw-r--r--Documentation/w1/masters/00-INDEX2
-rw-r--r--Documentation/w1/masters/mxc-w111
-rw-r--r--Documentation/w1/w1.netlink164
-rw-r--r--Documentation/wimax/README.i2400m260
-rw-r--r--Documentation/wimax/README.wimax81
-rw-r--r--Documentation/x86/boot.txt2
-rw-r--r--Documentation/x86/zero-page.txt2
109 files changed, 4594 insertions, 1225 deletions
diff --git a/Documentation/ABI/testing/sysfs-class-regulator b/Documentation/ABI/testing/sysfs-class-regulator
index 3731f6f29bcb..873ef1fc1569 100644
--- a/Documentation/ABI/testing/sysfs-class-regulator
+++ b/Documentation/ABI/testing/sysfs-class-regulator
@@ -3,8 +3,9 @@ Date: April 2008
3KernelVersion: 2.6.26 3KernelVersion: 2.6.26
4Contact: Liam Girdwood <lrg@slimlogic.co.uk> 4Contact: Liam Girdwood <lrg@slimlogic.co.uk>
5Description: 5Description:
6 Each regulator directory will contain a field called 6 Some regulator directories will contain a field called
7 state. This holds the regulator output state. 7 state. This reports the regulator enable status, for
8 regulators which can report that value.
8 9
9 This will be one of the following strings: 10 This will be one of the following strings:
10 11
@@ -18,7 +19,8 @@ Description:
18 'disabled' means the regulator output is OFF and is not 19 'disabled' means the regulator output is OFF and is not
19 supplying power to the system.. 20 supplying power to the system..
20 21
21 'unknown' means software cannot determine the state. 22 'unknown' means software cannot determine the state, or
23 the reported state is invalid.
22 24
23 NOTE: this field can be used in conjunction with microvolts 25 NOTE: this field can be used in conjunction with microvolts
24 and microamps to determine regulator output levels. 26 and microamps to determine regulator output levels.
@@ -53,9 +55,10 @@ Date: April 2008
53KernelVersion: 2.6.26 55KernelVersion: 2.6.26
54Contact: Liam Girdwood <lrg@slimlogic.co.uk> 56Contact: Liam Girdwood <lrg@slimlogic.co.uk>
55Description: 57Description:
56 Each regulator directory will contain a field called 58 Some regulator directories will contain a field called
57 microvolts. This holds the regulator output voltage setting 59 microvolts. This holds the regulator output voltage setting
58 measured in microvolts (i.e. E-6 Volts). 60 measured in microvolts (i.e. E-6 Volts), for regulators
61 which can report that voltage.
59 62
60 NOTE: This value should not be used to determine the regulator 63 NOTE: This value should not be used to determine the regulator
61 output voltage level as this value is the same regardless of 64 output voltage level as this value is the same regardless of
@@ -67,9 +70,10 @@ Date: April 2008
67KernelVersion: 2.6.26 70KernelVersion: 2.6.26
68Contact: Liam Girdwood <lrg@slimlogic.co.uk> 71Contact: Liam Girdwood <lrg@slimlogic.co.uk>
69Description: 72Description:
70 Each regulator directory will contain a field called 73 Some regulator directories will contain a field called
71 microamps. This holds the regulator output current limit 74 microamps. This holds the regulator output current limit
72 setting measured in microamps (i.e. E-6 Amps). 75 setting measured in microamps (i.e. E-6 Amps), for regulators
76 which can report that current.
73 77
74 NOTE: This value should not be used to determine the regulator 78 NOTE: This value should not be used to determine the regulator
75 output current level as this value is the same regardless of 79 output current level as this value is the same regardless of
@@ -81,8 +85,9 @@ Date: April 2008
81KernelVersion: 2.6.26 85KernelVersion: 2.6.26
82Contact: Liam Girdwood <lrg@slimlogic.co.uk> 86Contact: Liam Girdwood <lrg@slimlogic.co.uk>
83Description: 87Description:
84 Each regulator directory will contain a field called 88 Some regulator directories will contain a field called
85 opmode. This holds the regulator operating mode setting. 89 opmode. This holds the current regulator operating mode,
90 for regulators which can report it.
86 91
87 The opmode value can be one of the following strings: 92 The opmode value can be one of the following strings:
88 93
@@ -92,7 +97,7 @@ Description:
92 'standby' 97 'standby'
93 'unknown' 98 'unknown'
94 99
95 The modes are described in include/linux/regulator/regulator.h 100 The modes are described in include/linux/regulator/consumer.h
96 101
97 NOTE: This value should not be used to determine the regulator 102 NOTE: This value should not be used to determine the regulator
98 output operating mode as this value is the same regardless of 103 output operating mode as this value is the same regardless of
@@ -104,9 +109,10 @@ Date: April 2008
104KernelVersion: 2.6.26 109KernelVersion: 2.6.26
105Contact: Liam Girdwood <lrg@slimlogic.co.uk> 110Contact: Liam Girdwood <lrg@slimlogic.co.uk>
106Description: 111Description:
107 Each regulator directory will contain a field called 112 Some regulator directories will contain a field called
108 min_microvolts. This holds the minimum safe working regulator 113 min_microvolts. This holds the minimum safe working regulator
109 output voltage setting for this domain measured in microvolts. 114 output voltage setting for this domain measured in microvolts,
115 for regulators which support voltage constraints.
110 116
111 NOTE: this will return the string 'constraint not defined' if 117 NOTE: this will return the string 'constraint not defined' if
112 the power domain has no min microvolts constraint defined by 118 the power domain has no min microvolts constraint defined by
@@ -118,9 +124,10 @@ Date: April 2008
118KernelVersion: 2.6.26 124KernelVersion: 2.6.26
119Contact: Liam Girdwood <lrg@slimlogic.co.uk> 125Contact: Liam Girdwood <lrg@slimlogic.co.uk>
120Description: 126Description:
121 Each regulator directory will contain a field called 127 Some regulator directories will contain a field called
122 max_microvolts. This holds the maximum safe working regulator 128 max_microvolts. This holds the maximum safe working regulator
123 output voltage setting for this domain measured in microvolts. 129 output voltage setting for this domain measured in microvolts,
130 for regulators which support voltage constraints.
124 131
125 NOTE: this will return the string 'constraint not defined' if 132 NOTE: this will return the string 'constraint not defined' if
126 the power domain has no max microvolts constraint defined by 133 the power domain has no max microvolts constraint defined by
@@ -132,10 +139,10 @@ Date: April 2008
132KernelVersion: 2.6.26 139KernelVersion: 2.6.26
133Contact: Liam Girdwood <lrg@slimlogic.co.uk> 140Contact: Liam Girdwood <lrg@slimlogic.co.uk>
134Description: 141Description:
135 Each regulator directory will contain a field called 142 Some regulator directories will contain a field called
136 min_microamps. This holds the minimum safe working regulator 143 min_microamps. This holds the minimum safe working regulator
137 output current limit setting for this domain measured in 144 output current limit setting for this domain measured in
138 microamps. 145 microamps, for regulators which support current constraints.
139 146
140 NOTE: this will return the string 'constraint not defined' if 147 NOTE: this will return the string 'constraint not defined' if
141 the power domain has no min microamps constraint defined by 148 the power domain has no min microamps constraint defined by
@@ -147,10 +154,10 @@ Date: April 2008
147KernelVersion: 2.6.26 154KernelVersion: 2.6.26
148Contact: Liam Girdwood <lrg@slimlogic.co.uk> 155Contact: Liam Girdwood <lrg@slimlogic.co.uk>
149Description: 156Description:
150 Each regulator directory will contain a field called 157 Some regulator directories will contain a field called
151 max_microamps. This holds the maximum safe working regulator 158 max_microamps. This holds the maximum safe working regulator
152 output current limit setting for this domain measured in 159 output current limit setting for this domain measured in
153 microamps. 160 microamps, for regulators which support current constraints.
154 161
155 NOTE: this will return the string 'constraint not defined' if 162 NOTE: this will return the string 'constraint not defined' if
156 the power domain has no max microamps constraint defined by 163 the power domain has no max microamps constraint defined by
@@ -185,7 +192,7 @@ Date: April 2008
185KernelVersion: 2.6.26 192KernelVersion: 2.6.26
186Contact: Liam Girdwood <lrg@slimlogic.co.uk> 193Contact: Liam Girdwood <lrg@slimlogic.co.uk>
187Description: 194Description:
188 Each regulator directory will contain a field called 195 Some regulator directories will contain a field called
189 requested_microamps. This holds the total requested load 196 requested_microamps. This holds the total requested load
190 current in microamps for this regulator from all its consumer 197 current in microamps for this regulator from all its consumer
191 devices. 198 devices.
@@ -204,125 +211,102 @@ Date: May 2008
204KernelVersion: 2.6.26 211KernelVersion: 2.6.26
205Contact: Liam Girdwood <lrg@slimlogic.co.uk> 212Contact: Liam Girdwood <lrg@slimlogic.co.uk>
206Description: 213Description:
207 Each regulator directory will contain a field called 214 Some regulator directories will contain a field called
208 suspend_mem_microvolts. This holds the regulator output 215 suspend_mem_microvolts. This holds the regulator output
209 voltage setting for this domain measured in microvolts when 216 voltage setting for this domain measured in microvolts when
210 the system is suspended to memory. 217 the system is suspended to memory, for voltage regulators
211 218 implementing suspend voltage configuration constraints.
212 NOTE: this will return the string 'not defined' if
213 the power domain has no suspend to memory voltage defined by
214 platform code.
215 219
216What: /sys/class/regulator/.../suspend_disk_microvolts 220What: /sys/class/regulator/.../suspend_disk_microvolts
217Date: May 2008 221Date: May 2008
218KernelVersion: 2.6.26 222KernelVersion: 2.6.26
219Contact: Liam Girdwood <lrg@slimlogic.co.uk> 223Contact: Liam Girdwood <lrg@slimlogic.co.uk>
220Description: 224Description:
221 Each regulator directory will contain a field called 225 Some regulator directories will contain a field called
222 suspend_disk_microvolts. This holds the regulator output 226 suspend_disk_microvolts. This holds the regulator output
223 voltage setting for this domain measured in microvolts when 227 voltage setting for this domain measured in microvolts when
224 the system is suspended to disk. 228 the system is suspended to disk, for voltage regulators
225 229 implementing suspend voltage configuration constraints.
226 NOTE: this will return the string 'not defined' if
227 the power domain has no suspend to disk voltage defined by
228 platform code.
229 230
230What: /sys/class/regulator/.../suspend_standby_microvolts 231What: /sys/class/regulator/.../suspend_standby_microvolts
231Date: May 2008 232Date: May 2008
232KernelVersion: 2.6.26 233KernelVersion: 2.6.26
233Contact: Liam Girdwood <lrg@slimlogic.co.uk> 234Contact: Liam Girdwood <lrg@slimlogic.co.uk>
234Description: 235Description:
235 Each regulator directory will contain a field called 236 Some regulator directories will contain a field called
236 suspend_standby_microvolts. This holds the regulator output 237 suspend_standby_microvolts. This holds the regulator output
237 voltage setting for this domain measured in microvolts when 238 voltage setting for this domain measured in microvolts when
238 the system is suspended to standby. 239 the system is suspended to standby, for voltage regulators
239 240 implementing suspend voltage configuration constraints.
240 NOTE: this will return the string 'not defined' if
241 the power domain has no suspend to standby voltage defined by
242 platform code.
243 241
244What: /sys/class/regulator/.../suspend_mem_mode 242What: /sys/class/regulator/.../suspend_mem_mode
245Date: May 2008 243Date: May 2008
246KernelVersion: 2.6.26 244KernelVersion: 2.6.26
247Contact: Liam Girdwood <lrg@slimlogic.co.uk> 245Contact: Liam Girdwood <lrg@slimlogic.co.uk>
248Description: 246Description:
249 Each regulator directory will contain a field called 247 Some regulator directories will contain a field called
250 suspend_mem_mode. This holds the regulator operating mode 248 suspend_mem_mode. This holds the regulator operating mode
251 setting for this domain when the system is suspended to 249 setting for this domain when the system is suspended to
252 memory. 250 memory, for regulators implementing suspend mode
253 251 configuration constraints.
254 NOTE: this will return the string 'not defined' if
255 the power domain has no suspend to memory mode defined by
256 platform code.
257 252
258What: /sys/class/regulator/.../suspend_disk_mode 253What: /sys/class/regulator/.../suspend_disk_mode
259Date: May 2008 254Date: May 2008
260KernelVersion: 2.6.26 255KernelVersion: 2.6.26
261Contact: Liam Girdwood <lrg@slimlogic.co.uk> 256Contact: Liam Girdwood <lrg@slimlogic.co.uk>
262Description: 257Description:
263 Each regulator directory will contain a field called 258 Some regulator directories will contain a field called
264 suspend_disk_mode. This holds the regulator operating mode 259 suspend_disk_mode. This holds the regulator operating mode
265 setting for this domain when the system is suspended to disk. 260 setting for this domain when the system is suspended to disk,
266 261 for regulators implementing suspend mode configuration
267 NOTE: this will return the string 'not defined' if 262 constraints.
268 the power domain has no suspend to disk mode defined by
269 platform code.
270 263
271What: /sys/class/regulator/.../suspend_standby_mode 264What: /sys/class/regulator/.../suspend_standby_mode
272Date: May 2008 265Date: May 2008
273KernelVersion: 2.6.26 266KernelVersion: 2.6.26
274Contact: Liam Girdwood <lrg@slimlogic.co.uk> 267Contact: Liam Girdwood <lrg@slimlogic.co.uk>
275Description: 268Description:
276 Each regulator directory will contain a field called 269 Some regulator directories will contain a field called
277 suspend_standby_mode. This holds the regulator operating mode 270 suspend_standby_mode. This holds the regulator operating mode
278 setting for this domain when the system is suspended to 271 setting for this domain when the system is suspended to
279 standby. 272 standby, for regulators implementing suspend mode
280 273 configuration constraints.
281 NOTE: this will return the string 'not defined' if
282 the power domain has no suspend to standby mode defined by
283 platform code.
284 274
285What: /sys/class/regulator/.../suspend_mem_state 275What: /sys/class/regulator/.../suspend_mem_state
286Date: May 2008 276Date: May 2008
287KernelVersion: 2.6.26 277KernelVersion: 2.6.26
288Contact: Liam Girdwood <lrg@slimlogic.co.uk> 278Contact: Liam Girdwood <lrg@slimlogic.co.uk>
289Description: 279Description:
290 Each regulator directory will contain a field called 280 Some regulator directories will contain a field called
291 suspend_mem_state. This holds the regulator operating state 281 suspend_mem_state. This holds the regulator operating state
292 when suspended to memory. 282 when suspended to memory, for regulators implementing suspend
293 283 configuration constraints.
294 This will be one of the following strings:
295 284
296 'enabled' 285 This will be one of the same strings reported by
297 'disabled' 286 the "state" attribute.
298 'not defined'
299 287
300What: /sys/class/regulator/.../suspend_disk_state 288What: /sys/class/regulator/.../suspend_disk_state
301Date: May 2008 289Date: May 2008
302KernelVersion: 2.6.26 290KernelVersion: 2.6.26
303Contact: Liam Girdwood <lrg@slimlogic.co.uk> 291Contact: Liam Girdwood <lrg@slimlogic.co.uk>
304Description: 292Description:
305 Each regulator directory will contain a field called 293 Some regulator directories will contain a field called
306 suspend_disk_state. This holds the regulator operating state 294 suspend_disk_state. This holds the regulator operating state
307 when suspended to disk. 295 when suspended to disk, for regulators implementing
308 296 suspend configuration constraints.
309 This will be one of the following strings:
310 297
311 'enabled' 298 This will be one of the same strings reported by
312 'disabled' 299 the "state" attribute.
313 'not defined'
314 300
315What: /sys/class/regulator/.../suspend_standby_state 301What: /sys/class/regulator/.../suspend_standby_state
316Date: May 2008 302Date: May 2008
317KernelVersion: 2.6.26 303KernelVersion: 2.6.26
318Contact: Liam Girdwood <lrg@slimlogic.co.uk> 304Contact: Liam Girdwood <lrg@slimlogic.co.uk>
319Description: 305Description:
320 Each regulator directory will contain a field called 306 Some regulator directories will contain a field called
321 suspend_standby_state. This holds the regulator operating 307 suspend_standby_state. This holds the regulator operating
322 state when suspended to standby. 308 state when suspended to standby, for regulators implementing
323 309 suspend configuration constraints.
324 This will be one of the following strings:
325 310
326 'enabled' 311 This will be one of the same strings reported by
327 'disabled' 312 the "state" attribute.
328 'not defined'
diff --git a/Documentation/ABI/testing/sysfs-class-uwb_rc b/Documentation/ABI/testing/sysfs-class-uwb_rc
index a0d18dbeb7a9..6a5fd072849d 100644
--- a/Documentation/ABI/testing/sysfs-class-uwb_rc
+++ b/Documentation/ABI/testing/sysfs-class-uwb_rc
@@ -32,14 +32,16 @@ Contact: linux-usb@vger.kernel.org
32Description: 32Description:
33 Write: 33 Write:
34 34
35 <channel> [<bpst offset>] 35 <channel>
36 36
37 to start beaconing on a specific channel, or stop 37 to force a specific channel to be used when beaconing,
38 beaconing if <channel> is -1. Valid channels depends 38 or, if <channel> is -1, to prohibit beaconing. If
39 on the radio controller's supported band groups. 39 <channel> is 0, then the default channel selection
40 algorithm will be used. Valid channels depends on the
41 radio controller's supported band groups.
40 42
41 <bpst offset> may be used to try and join a specific 43 Reading returns the currently active channel, or -1 if
42 beacon group if more than one was found during a scan. 44 the radio controller is not beaconing.
43 45
44What: /sys/class/uwb_rc/uwbN/scan 46What: /sys/class/uwb_rc/uwbN/scan
45Date: July 2008 47Date: July 2008
diff --git a/Documentation/ABI/testing/sysfs-devices-memory b/Documentation/ABI/testing/sysfs-devices-memory
index 7a16fe1e2270..9fe91c02ee40 100644
--- a/Documentation/ABI/testing/sysfs-devices-memory
+++ b/Documentation/ABI/testing/sysfs-devices-memory
@@ -6,7 +6,6 @@ Description:
6 internal state of the kernel memory blocks. Files could be 6 internal state of the kernel memory blocks. Files could be
7 added or removed dynamically to represent hot-add/remove 7 added or removed dynamically to represent hot-add/remove
8 operations. 8 operations.
9
10Users: hotplug memory add/remove tools 9Users: hotplug memory add/remove tools
11 https://w3.opensource.ibm.com/projects/powerpc-utils/ 10 https://w3.opensource.ibm.com/projects/powerpc-utils/
12 11
@@ -19,6 +18,56 @@ Description:
19 This is useful for a user-level agent to determine 18 This is useful for a user-level agent to determine
20 identify removable sections of the memory before attempting 19 identify removable sections of the memory before attempting
21 potentially expensive hot-remove memory operation 20 potentially expensive hot-remove memory operation
21Users: hotplug memory remove tools
22 https://w3.opensource.ibm.com/projects/powerpc-utils/
23
24What: /sys/devices/system/memory/memoryX/phys_device
25Date: September 2008
26Contact: Badari Pulavarty <pbadari@us.ibm.com>
27Description:
28 The file /sys/devices/system/memory/memoryX/phys_device
29 is read-only and is designed to show the name of physical
30 memory device. Implementation is currently incomplete.
22 31
32What: /sys/devices/system/memory/memoryX/phys_index
33Date: September 2008
34Contact: Badari Pulavarty <pbadari@us.ibm.com>
35Description:
36 The file /sys/devices/system/memory/memoryX/phys_index
37 is read-only and contains the section ID in hexadecimal
38 which is equivalent to decimal X contained in the
39 memory section directory name.
40
41What: /sys/devices/system/memory/memoryX/state
42Date: September 2008
43Contact: Badari Pulavarty <pbadari@us.ibm.com>
44Description:
45 The file /sys/devices/system/memory/memoryX/state
46 is read-write. When read, it's contents show the
47 online/offline state of the memory section. When written,
48 root can toggle the the online/offline state of a removable
49 memory section (see removable file description above)
50 using the following commands.
51 # echo online > /sys/devices/system/memory/memoryX/state
52 # echo offline > /sys/devices/system/memory/memoryX/state
53
54 For example, if /sys/devices/system/memory/memory22/removable
55 contains a value of 1 and
56 /sys/devices/system/memory/memory22/state contains the
57 string "online" the following command can be executed by
58 by root to offline that section.
59 # echo offline > /sys/devices/system/memory/memory22/state
23Users: hotplug memory remove tools 60Users: hotplug memory remove tools
24 https://w3.opensource.ibm.com/projects/powerpc-utils/ 61 https://w3.opensource.ibm.com/projects/powerpc-utils/
62
63What: /sys/devices/system/node/nodeX/memoryY
64Date: September 2008
65Contact: Gary Hade <garyhade@us.ibm.com>
66Description:
67 When CONFIG_NUMA is enabled
68 /sys/devices/system/node/nodeX/memoryY is a symbolic link that
69 points to the corresponding /sys/devices/system/memory/memoryY
70 memory section directory. For example, the following symbolic
71 link is created for memory section 9 on node0.
72 /sys/devices/system/node/node0/memory9 -> ../../memory/memory9
73
diff --git a/Documentation/Changes b/Documentation/Changes
index cb2b141b1c3e..b95082be4d5e 100644
--- a/Documentation/Changes
+++ b/Documentation/Changes
@@ -33,10 +33,12 @@ o Gnu make 3.79.1 # make --version
33o binutils 2.12 # ld -v 33o binutils 2.12 # ld -v
34o util-linux 2.10o # fdformat --version 34o util-linux 2.10o # fdformat --version
35o module-init-tools 0.9.10 # depmod -V 35o module-init-tools 0.9.10 # depmod -V
36o e2fsprogs 1.29 # tune2fs 36o e2fsprogs 1.41.4 # e2fsck -V
37o jfsutils 1.1.3 # fsck.jfs -V 37o jfsutils 1.1.3 # fsck.jfs -V
38o reiserfsprogs 3.6.3 # reiserfsck -V 2>&1|grep reiserfsprogs 38o reiserfsprogs 3.6.3 # reiserfsck -V 2>&1|grep reiserfsprogs
39o xfsprogs 2.6.0 # xfs_db -V 39o xfsprogs 2.6.0 # xfs_db -V
40o squashfs-tools 4.0 # mksquashfs -version
41o btrfs-progs 0.18 # btrfsck
40o pcmciautils 004 # pccardctl -V 42o pcmciautils 004 # pccardctl -V
41o quota-tools 3.09 # quota -V 43o quota-tools 3.09 # quota -V
42o PPP 2.4.0 # pppd --version 44o PPP 2.4.0 # pppd --version
diff --git a/Documentation/CodingStyle b/Documentation/CodingStyle
index 1875e502f872..72968cd5eaf3 100644
--- a/Documentation/CodingStyle
+++ b/Documentation/CodingStyle
@@ -483,17 +483,25 @@ values. To do the latter, you can stick the following in your .emacs file:
483 (* (max steps 1) 483 (* (max steps 1)
484 c-basic-offset))) 484 c-basic-offset)))
485 485
486(add-hook 'c-mode-common-hook
487 (lambda ()
488 ;; Add kernel style
489 (c-add-style
490 "linux-tabs-only"
491 '("linux" (c-offsets-alist
492 (arglist-cont-nonempty
493 c-lineup-gcc-asm-reg
494 c-lineup-arglist-tabs-only))))))
495
486(add-hook 'c-mode-hook 496(add-hook 'c-mode-hook
487 (lambda () 497 (lambda ()
488 (let ((filename (buffer-file-name))) 498 (let ((filename (buffer-file-name)))
489 ;; Enable kernel mode for the appropriate files 499 ;; Enable kernel mode for the appropriate files
490 (when (and filename 500 (when (and filename
491 (string-match "~/src/linux-trees" filename)) 501 (string-match (expand-file-name "~/src/linux-trees")
502 filename))
492 (setq indent-tabs-mode t) 503 (setq indent-tabs-mode t)
493 (c-set-style "linux") 504 (c-set-style "linux-tabs-only")))))
494 (c-set-offset 'arglist-cont-nonempty
495 '(c-lineup-gcc-asm-reg
496 c-lineup-arglist-tabs-only))))))
497 505
498This will make emacs go better with the kernel coding style for C 506This will make emacs go better with the kernel coding style for C
499files below ~/src/linux-trees. 507files below ~/src/linux-trees.
diff --git a/Documentation/DMA-API.txt b/Documentation/DMA-API.txt
index b462bb149543..2a3fcc55e981 100644
--- a/Documentation/DMA-API.txt
+++ b/Documentation/DMA-API.txt
@@ -5,7 +5,7 @@
5 5
6This document describes the DMA API. For a more gentle introduction 6This document describes the DMA API. For a more gentle introduction
7phrased in terms of the pci_ equivalents (and actual examples) see 7phrased in terms of the pci_ equivalents (and actual examples) see
8DMA-mapping.txt 8Documentation/PCI/PCI-DMA-mapping.txt.
9 9
10This API is split into two pieces. Part I describes the API and the 10This API is split into two pieces. Part I describes the API and the
11corresponding pci_ API. Part II describes the extensions to the API 11corresponding pci_ API. Part II describes the extensions to the API
@@ -170,16 +170,15 @@ Returns: 0 if successful and a negative error if not.
170u64 170u64
171dma_get_required_mask(struct device *dev) 171dma_get_required_mask(struct device *dev)
172 172
173After setting the mask with dma_set_mask(), this API returns the 173This API returns the mask that the platform requires to
174actual mask (within that already set) that the platform actually 174operate efficiently. Usually this means the returned mask
175requires to operate efficiently. Usually this means the returned mask
176is the minimum required to cover all of memory. Examining the 175is the minimum required to cover all of memory. Examining the
177required mask gives drivers with variable descriptor sizes the 176required mask gives drivers with variable descriptor sizes the
178opportunity to use smaller descriptors as necessary. 177opportunity to use smaller descriptors as necessary.
179 178
180Requesting the required mask does not alter the current mask. If you 179Requesting the required mask does not alter the current mask. If you
181wish to take advantage of it, you should issue another dma_set_mask() 180wish to take advantage of it, you should issue a dma_set_mask()
182call to lower the mask again. 181call to set the mask to the value returned.
183 182
184 183
185Part Id - Streaming DMA mappings 184Part Id - Streaming DMA mappings
diff --git a/Documentation/DMA-mapping.txt b/Documentation/DMA-mapping.txt
index c74fec8c2351..b2a4d6d244d9 100644
--- a/Documentation/DMA-mapping.txt
+++ b/Documentation/DMA-mapping.txt
@@ -26,7 +26,7 @@ mapped only for the time they are actually used and unmapped after the DMA
26transfer. 26transfer.
27 27
28The following API will work of course even on platforms where no such 28The following API will work of course even on platforms where no such
29hardware exists, see e.g. include/asm-i386/pci.h for how it is implemented on 29hardware exists, see e.g. arch/x86/include/asm/pci.h for how it is implemented on
30top of the virt_to_bus interface. 30top of the virt_to_bus interface.
31 31
32First of all, you should make sure 32First of all, you should make sure
diff --git a/Documentation/DocBook/Makefile b/Documentation/DocBook/Makefile
index 0a08126d3094..dc3154e49279 100644
--- a/Documentation/DocBook/Makefile
+++ b/Documentation/DocBook/Makefile
@@ -12,7 +12,7 @@ DOCBOOKS := z8530book.xml mcabook.xml \
12 kernel-api.xml filesystems.xml lsm.xml usb.xml kgdb.xml \ 12 kernel-api.xml filesystems.xml lsm.xml usb.xml kgdb.xml \
13 gadget.xml libata.xml mtdnand.xml librs.xml rapidio.xml \ 13 gadget.xml libata.xml mtdnand.xml librs.xml rapidio.xml \
14 genericirq.xml s390-drivers.xml uio-howto.xml scsi.xml \ 14 genericirq.xml s390-drivers.xml uio-howto.xml scsi.xml \
15 mac80211.xml debugobjects.xml sh.xml 15 mac80211.xml debugobjects.xml sh.xml regulator.xml
16 16
17### 17###
18# The build process is as follows (targets): 18# The build process is as follows (targets):
diff --git a/Documentation/DocBook/networking.tmpl b/Documentation/DocBook/networking.tmpl
index 627707a3cb9d..59ad69a9d777 100644
--- a/Documentation/DocBook/networking.tmpl
+++ b/Documentation/DocBook/networking.tmpl
@@ -74,6 +74,14 @@
74!Enet/sunrpc/rpcb_clnt.c 74!Enet/sunrpc/rpcb_clnt.c
75!Enet/sunrpc/clnt.c 75!Enet/sunrpc/clnt.c
76 </sect1> 76 </sect1>
77 <sect1><title>WiMAX</title>
78!Enet/wimax/op-msg.c
79!Enet/wimax/op-reset.c
80!Enet/wimax/op-rfkill.c
81!Enet/wimax/stack.c
82!Iinclude/net/wimax.h
83!Iinclude/linux/wimax.h
84 </sect1>
77 </chapter> 85 </chapter>
78 86
79 <chapter id="netdev"> 87 <chapter id="netdev">
diff --git a/Documentation/DocBook/regulator.tmpl b/Documentation/DocBook/regulator.tmpl
new file mode 100644
index 000000000000..53f4f8d3b810
--- /dev/null
+++ b/Documentation/DocBook/regulator.tmpl
@@ -0,0 +1,304 @@
1<?xml version="1.0" encoding="UTF-8"?>
2<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
3 "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd" []>
4
5<book id="regulator-api">
6 <bookinfo>
7 <title>Voltage and current regulator API</title>
8
9 <authorgroup>
10 <author>
11 <firstname>Liam</firstname>
12 <surname>Girdwood</surname>
13 <affiliation>
14 <address>
15 <email>lrg@slimlogic.co.uk</email>
16 </address>
17 </affiliation>
18 </author>
19 <author>
20 <firstname>Mark</firstname>
21 <surname>Brown</surname>
22 <affiliation>
23 <orgname>Wolfson Microelectronics</orgname>
24 <address>
25 <email>broonie@opensource.wolfsonmicro.com</email>
26 </address>
27 </affiliation>
28 </author>
29 </authorgroup>
30
31 <copyright>
32 <year>2007-2008</year>
33 <holder>Wolfson Microelectronics</holder>
34 </copyright>
35 <copyright>
36 <year>2008</year>
37 <holder>Liam Girdwood</holder>
38 </copyright>
39
40 <legalnotice>
41 <para>
42 This documentation is free software; you can redistribute
43 it and/or modify it under the terms of the GNU General Public
44 License version 2 as published by the Free Software Foundation.
45 </para>
46
47 <para>
48 This program is distributed in the hope that it will be
49 useful, but WITHOUT ANY WARRANTY; without even the implied
50 warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
51 See the GNU General Public License for more details.
52 </para>
53
54 <para>
55 You should have received a copy of the GNU General Public
56 License along with this program; if not, write to the Free
57 Software Foundation, Inc., 59 Temple Place, Suite 330, Boston,
58 MA 02111-1307 USA
59 </para>
60
61 <para>
62 For more details see the file COPYING in the source
63 distribution of Linux.
64 </para>
65 </legalnotice>
66 </bookinfo>
67
68<toc></toc>
69
70 <chapter id="intro">
71 <title>Introduction</title>
72 <para>
73 This framework is designed to provide a standard kernel
74 interface to control voltage and current regulators.
75 </para>
76 <para>
77 The intention is to allow systems to dynamically control
78 regulator power output in order to save power and prolong
79 battery life. This applies to both voltage regulators (where
80 voltage output is controllable) and current sinks (where current
81 limit is controllable).
82 </para>
83 <para>
84 Note that additional (and currently more complete) documentation
85 is available in the Linux kernel source under
86 <filename>Documentation/power/regulator</filename>.
87 </para>
88
89 <sect1 id="glossary">
90 <title>Glossary</title>
91 <para>
92 The regulator API uses a number of terms which may not be
93 familiar:
94 </para>
95 <glossary>
96
97 <glossentry>
98 <glossterm>Regulator</glossterm>
99 <glossdef>
100 <para>
101 Electronic device that supplies power to other devices. Most
102 regulators can enable and disable their output and some can also
103 control their output voltage or current.
104 </para>
105 </glossdef>
106 </glossentry>
107
108 <glossentry>
109 <glossterm>Consumer</glossterm>
110 <glossdef>
111 <para>
112 Electronic device which consumes power provided by a regulator.
113 These may either be static, requiring only a fixed supply, or
114 dynamic, requiring active management of the regulator at
115 runtime.
116 </para>
117 </glossdef>
118 </glossentry>
119
120 <glossentry>
121 <glossterm>Power Domain</glossterm>
122 <glossdef>
123 <para>
124 The electronic circuit supplied by a given regulator, including
125 the regulator and all consumer devices. The configuration of
126 the regulator is shared between all the components in the
127 circuit.
128 </para>
129 </glossdef>
130 </glossentry>
131
132 <glossentry>
133 <glossterm>Power Management Integrated Circuit</glossterm>
134 <acronym>PMIC</acronym>
135 <glossdef>
136 <para>
137 An IC which contains numerous regulators and often also other
138 subsystems. In an embedded system the primary PMIC is often
139 equivalent to a combination of the PSU and southbridge in a
140 desktop system.
141 </para>
142 </glossdef>
143 </glossentry>
144 </glossary>
145 </sect1>
146 </chapter>
147
148 <chapter id="consumer">
149 <title>Consumer driver interface</title>
150 <para>
151 This offers a similar API to the kernel clock framework.
152 Consumer drivers use <link
153 linkend='API-regulator-get'>get</link> and <link
154 linkend='API-regulator-put'>put</link> operations to acquire and
155 release regulators. Functions are
156 provided to <link linkend='API-regulator-enable'>enable</link>
157 and <link linkend='API-regulator-disable'>disable</link> the
158 reguator and to get and set the runtime parameters of the
159 regulator.
160 </para>
161 <para>
162 When requesting regulators consumers use symbolic names for their
163 supplies, such as "Vcc", which are mapped into actual regulator
164 devices by the machine interface.
165 </para>
166 <para>
167 A stub version of this API is provided when the regulator
168 framework is not in use in order to minimise the need to use
169 ifdefs.
170 </para>
171
172 <sect1 id="consumer-enable">
173 <title>Enabling and disabling</title>
174 <para>
175 The regulator API provides reference counted enabling and
176 disabling of regulators. Consumer devices use the <function><link
177 linkend='API-regulator-enable'>regulator_enable</link></function>
178 and <function><link
179 linkend='API-regulator-disable'>regulator_disable</link>
180 </function> functions to enable and disable regulators. Calls
181 to the two functions must be balanced.
182 </para>
183 <para>
184 Note that since multiple consumers may be using a regulator and
185 machine constraints may not allow the regulator to be disabled
186 there is no guarantee that calling
187 <function>regulator_disable</function> will actually cause the
188 supply provided by the regulator to be disabled. Consumer
189 drivers should assume that the regulator may be enabled at all
190 times.
191 </para>
192 </sect1>
193
194 <sect1 id="consumer-config">
195 <title>Configuration</title>
196 <para>
197 Some consumer devices may need to be able to dynamically
198 configure their supplies. For example, MMC drivers may need to
199 select the correct operating voltage for their cards. This may
200 be done while the regulator is enabled or disabled.
201 </para>
202 <para>
203 The <function><link
204 linkend='API-regulator-set-voltage'>regulator_set_voltage</link>
205 </function> and <function><link
206 linkend='API-regulator-set-current-limit'
207 >regulator_set_current_limit</link>
208 </function> functions provide the primary interface for this.
209 Both take ranges of voltages and currents, supporting drivers
210 that do not require a specific value (eg, CPU frequency scaling
211 normally permits the CPU to use a wider range of supply
212 voltages at lower frequencies but does not require that the
213 supply voltage be lowered). Where an exact value is required
214 both minimum and maximum values should be identical.
215 </para>
216 </sect1>
217
218 <sect1 id="consumer-callback">
219 <title>Callbacks</title>
220 <para>
221 Callbacks may also be <link
222 linkend='API-regulator-register-notifier'>registered</link>
223 for events such as regulation failures.
224 </para>
225 </sect1>
226 </chapter>
227
228 <chapter id="driver">
229 <title>Regulator driver interface</title>
230 <para>
231 Drivers for regulator chips <link
232 linkend='API-regulator-register'>register</link> the regulators
233 with the regulator core, providing operations structures to the
234 core. A <link
235 linkend='API-regulator-notifier-call-chain'>notifier</link> interface
236 allows error conditions to be reported to the core.
237 </para>
238 <para>
239 Registration should be triggered by explicit setup done by the
240 platform, supplying a <link
241 linkend='API-struct-regulator-init-data'>struct
242 regulator_init_data</link> for the regulator containing
243 <link linkend='machine-constraint'>constraint</link> and
244 <link linkend='machine-supply'>supply</link> information.
245 </para>
246 </chapter>
247
248 <chapter id="machine">
249 <title>Machine interface</title>
250 <para>
251 This interface provides a way to define how regulators are
252 connected to consumers on a given system and what the valid
253 operating parameters are for the system.
254 </para>
255
256 <sect1 id="machine-supply">
257 <title>Supplies</title>
258 <para>
259 Regulator supplies are specified using <link
260 linkend='API-struct-regulator-consumer-supply'>struct
261 regulator_consumer_supply</link>. This is done at
262 <link linkend='driver'>driver registration
263 time</link> as part of the machine constraints.
264 </para>
265 </sect1>
266
267 <sect1 id="machine-constraint">
268 <title>Constraints</title>
269 <para>
270 As well as definining the connections the machine interface
271 also provides constraints definining the operations that
272 clients are allowed to perform and the parameters that may be
273 set. This is required since generally regulator devices will
274 offer more flexibility than it is safe to use on a given
275 system, for example supporting higher supply voltages than the
276 consumers are rated for.
277 </para>
278 <para>
279 This is done at <link linkend='driver'>driver
280 registration time</link> by providing a <link
281 linkend='API-struct-regulation-constraints'>struct
282 regulation_constraints</link>.
283 </para>
284 <para>
285 The constraints may also specify an initial configuration for the
286 regulator in the constraints, which is particularly useful for
287 use with static consumers.
288 </para>
289 </sect1>
290 </chapter>
291
292 <chapter id="api">
293 <title>API reference</title>
294 <para>
295 Due to limitations of the kernel documentation framework and the
296 existing layout of the source code the entire regulator API is
297 documented here.
298 </para>
299!Iinclude/linux/regulator/consumer.h
300!Iinclude/linux/regulator/machine.h
301!Iinclude/linux/regulator/driver.h
302!Edrivers/regulator/core.c
303 </chapter>
304</book>
diff --git a/Documentation/DocBook/uio-howto.tmpl b/Documentation/DocBook/uio-howto.tmpl
index df87d1b93605..52e1b79ce0e6 100644
--- a/Documentation/DocBook/uio-howto.tmpl
+++ b/Documentation/DocBook/uio-howto.tmpl
@@ -42,6 +42,18 @@ GPL version 2.
42 42
43<revhistory> 43<revhistory>
44 <revision> 44 <revision>
45 <revnumber>0.7</revnumber>
46 <date>2008-12-23</date>
47 <authorinitials>hjk</authorinitials>
48 <revremark>Added generic platform drivers and offset attribute.</revremark>
49 </revision>
50 <revision>
51 <revnumber>0.6</revnumber>
52 <date>2008-12-05</date>
53 <authorinitials>hjk</authorinitials>
54 <revremark>Added description of portio sysfs attributes.</revremark>
55 </revision>
56 <revision>
45 <revnumber>0.5</revnumber> 57 <revnumber>0.5</revnumber>
46 <date>2008-05-22</date> 58 <date>2008-05-22</date>
47 <authorinitials>hjk</authorinitials> 59 <authorinitials>hjk</authorinitials>
@@ -306,6 +318,16 @@ interested in translating it, please email me
306 pointed to by addr. 318 pointed to by addr.
307 </para> 319 </para>
308</listitem> 320</listitem>
321<listitem>
322 <para>
323 <filename>offset</filename>: The offset, in bytes, that has to be
324 added to the pointer returned by <function>mmap()</function> to get
325 to the actual device memory. This is important if the device's memory
326 is not page aligned. Remember that pointers returned by
327 <function>mmap()</function> are always page aligned, so it is good
328 style to always add this offset.
329 </para>
330</listitem>
309</itemizedlist> 331</itemizedlist>
310 332
311<para> 333<para>
@@ -318,6 +340,54 @@ interested in translating it, please email me
318offset = N * getpagesize(); 340offset = N * getpagesize();
319</programlisting> 341</programlisting>
320 342
343<para>
344 Sometimes there is hardware with memory-like regions that can not be
345 mapped with the technique described here, but there are still ways to
346 access them from userspace. The most common example are x86 ioports.
347 On x86 systems, userspace can access these ioports using
348 <function>ioperm()</function>, <function>iopl()</function>,
349 <function>inb()</function>, <function>outb()</function>, and similar
350 functions.
351</para>
352<para>
353 Since these ioport regions can not be mapped, they will not appear under
354 <filename>/sys/class/uio/uioX/maps/</filename> like the normal memory
355 described above. Without information about the port regions a hardware
356 has to offer, it becomes difficult for the userspace part of the
357 driver to find out which ports belong to which UIO device.
358</para>
359<para>
360 To address this situation, the new directory
361 <filename>/sys/class/uio/uioX/portio/</filename> was added. It only
362 exists if the driver wants to pass information about one or more port
363 regions to userspace. If that is the case, subdirectories named
364 <filename>port0</filename>, <filename>port1</filename>, and so on,
365 will appear underneath
366 <filename>/sys/class/uio/uioX/portio/</filename>.
367</para>
368<para>
369 Each <filename>portX/</filename> directory contains three read-only
370 files that show start, size, and type of the port region:
371</para>
372<itemizedlist>
373<listitem>
374 <para>
375 <filename>start</filename>: The first port of this region.
376 </para>
377</listitem>
378<listitem>
379 <para>
380 <filename>size</filename>: The number of ports in this region.
381 </para>
382</listitem>
383<listitem>
384 <para>
385 <filename>porttype</filename>: A string describing the type of port.
386 </para>
387</listitem>
388</itemizedlist>
389
390
321</sect1> 391</sect1>
322</chapter> 392</chapter>
323 393
@@ -339,12 +409,12 @@ offset = N * getpagesize();
339 409
340<itemizedlist> 410<itemizedlist>
341<listitem><para> 411<listitem><para>
342<varname>char *name</varname>: Required. The name of your driver as 412<varname>const char *name</varname>: Required. The name of your driver as
343it will appear in sysfs. I recommend using the name of your module for this. 413it will appear in sysfs. I recommend using the name of your module for this.
344</para></listitem> 414</para></listitem>
345 415
346<listitem><para> 416<listitem><para>
347<varname>char *version</varname>: Required. This string appears in 417<varname>const char *version</varname>: Required. This string appears in
348<filename>/sys/class/uio/uioX/version</filename>. 418<filename>/sys/class/uio/uioX/version</filename>.
349</para></listitem> 419</para></listitem>
350 420
@@ -356,6 +426,13 @@ See the description below for details.
356</para></listitem> 426</para></listitem>
357 427
358<listitem><para> 428<listitem><para>
429<varname>struct uio_port port[ MAX_UIO_PORTS_REGIONS ]</varname>: Required
430if you want to pass information about ioports to userspace. For each port
431region you need to fill one of the <varname>uio_port</varname> structures.
432See the description below for details.
433</para></listitem>
434
435<listitem><para>
359<varname>long irq</varname>: Required. If your hardware generates an 436<varname>long irq</varname>: Required. If your hardware generates an
360interrupt, it's your modules task to determine the irq number during 437interrupt, it's your modules task to determine the irq number during
361initialization. If you don't have a hardware generated interrupt but 438initialization. If you don't have a hardware generated interrupt but
@@ -448,6 +525,42 @@ Please do not touch the <varname>kobj</varname> element of
448<varname>struct uio_mem</varname>! It is used by the UIO framework 525<varname>struct uio_mem</varname>! It is used by the UIO framework
449to set up sysfs files for this mapping. Simply leave it alone. 526to set up sysfs files for this mapping. Simply leave it alone.
450</para> 527</para>
528
529<para>
530Sometimes, your device can have one or more port regions which can not be
531mapped to userspace. But if there are other possibilities for userspace to
532access these ports, it makes sense to make information about the ports
533available in sysfs. For each region, you have to set up a
534<varname>struct uio_port</varname> in the <varname>port[]</varname> array.
535Here's a description of the fields of <varname>struct uio_port</varname>:
536</para>
537
538<itemizedlist>
539<listitem><para>
540<varname>char *porttype</varname>: Required. Set this to one of the predefined
541constants. Use <varname>UIO_PORT_X86</varname> for the ioports found in x86
542architectures.
543</para></listitem>
544
545<listitem><para>
546<varname>unsigned long start</varname>: Required if the port region is used.
547Fill in the number of the first port of this region.
548</para></listitem>
549
550<listitem><para>
551<varname>unsigned long size</varname>: Fill in the number of ports in this
552region. If <varname>size</varname> is zero, the region is considered unused.
553Note that you <emphasis>must</emphasis> initialize <varname>size</varname>
554with zero for all unused regions.
555</para></listitem>
556</itemizedlist>
557
558<para>
559Please do not touch the <varname>portio</varname> element of
560<varname>struct uio_port</varname>! It is used internally by the UIO
561framework to set up sysfs files for this region. Simply leave it alone.
562</para>
563
451</sect1> 564</sect1>
452 565
453<sect1 id="adding_irq_handler"> 566<sect1 id="adding_irq_handler">
@@ -497,6 +610,78 @@ to set up sysfs files for this mapping. Simply leave it alone.
497 </para> 610 </para>
498</sect1> 611</sect1>
499 612
613<sect1 id="using_uio_pdrv">
614<title>Using uio_pdrv for platform devices</title>
615 <para>
616 In many cases, UIO drivers for platform devices can be handled in a
617 generic way. In the same place where you define your
618 <varname>struct platform_device</varname>, you simply also implement
619 your interrupt handler and fill your
620 <varname>struct uio_info</varname>. A pointer to this
621 <varname>struct uio_info</varname> is then used as
622 <varname>platform_data</varname> for your platform device.
623 </para>
624 <para>
625 You also need to set up an array of <varname>struct resource</varname>
626 containing addresses and sizes of your memory mappings. This
627 information is passed to the driver using the
628 <varname>.resource</varname> and <varname>.num_resources</varname>
629 elements of <varname>struct platform_device</varname>.
630 </para>
631 <para>
632 You now have to set the <varname>.name</varname> element of
633 <varname>struct platform_device</varname> to
634 <varname>"uio_pdrv"</varname> to use the generic UIO platform device
635 driver. This driver will fill the <varname>mem[]</varname> array
636 according to the resources given, and register the device.
637 </para>
638 <para>
639 The advantage of this approach is that you only have to edit a file
640 you need to edit anyway. You do not have to create an extra driver.
641 </para>
642</sect1>
643
644<sect1 id="using_uio_pdrv_genirq">
645<title>Using uio_pdrv_genirq for platform devices</title>
646 <para>
647 Especially in embedded devices, you frequently find chips where the
648 irq pin is tied to its own dedicated interrupt line. In such cases,
649 where you can be really sure the interrupt is not shared, we can take
650 the concept of <varname>uio_pdrv</varname> one step further and use a
651 generic interrupt handler. That's what
652 <varname>uio_pdrv_genirq</varname> does.
653 </para>
654 <para>
655 The setup for this driver is the same as described above for
656 <varname>uio_pdrv</varname>, except that you do not implement an
657 interrupt handler. The <varname>.handler</varname> element of
658 <varname>struct uio_info</varname> must remain
659 <varname>NULL</varname>. The <varname>.irq_flags</varname> element
660 must not contain <varname>IRQF_SHARED</varname>.
661 </para>
662 <para>
663 You will set the <varname>.name</varname> element of
664 <varname>struct platform_device</varname> to
665 <varname>"uio_pdrv_genirq"</varname> to use this driver.
666 </para>
667 <para>
668 The generic interrupt handler of <varname>uio_pdrv_genirq</varname>
669 will simply disable the interrupt line using
670 <function>disable_irq_nosync()</function>. After doing its work,
671 userspace can reenable the interrupt by writing 0x00000001 to the UIO
672 device file. The driver already implements an
673 <function>irq_control()</function> to make this possible, you must not
674 implement your own.
675 </para>
676 <para>
677 Using <varname>uio_pdrv_genirq</varname> not only saves a few lines of
678 interrupt handler code. You also do not need to know anything about
679 the chip's internal registers to create the kernel part of the driver.
680 All you need to know is the irq number of the pin the chip is
681 connected to.
682 </para>
683</sect1>
684
500</chapter> 685</chapter>
501 686
502<chapter id="userspace_driver" xreflabel="Writing a driver in user space"> 687<chapter id="userspace_driver" xreflabel="Writing a driver in user space">
diff --git a/Documentation/IO-mapping.txt b/Documentation/IO-mapping.txt
index 86edb61bdee6..78a440695e11 100644
--- a/Documentation/IO-mapping.txt
+++ b/Documentation/IO-mapping.txt
@@ -1,6 +1,6 @@
1[ NOTE: The virt_to_bus() and bus_to_virt() functions have been 1[ NOTE: The virt_to_bus() and bus_to_virt() functions have been
2 superseded by the functionality provided by the PCI DMA 2 superseded by the functionality provided by the PCI DMA interface
3 interface (see Documentation/DMA-mapping.txt). They continue 3 (see Documentation/PCI/PCI-DMA-mapping.txt). They continue
4 to be documented below for historical purposes, but new code 4 to be documented below for historical purposes, but new code
5 must not use them. --davidm 00/12/12 ] 5 must not use them. --davidm 00/12/12 ]
6 6
diff --git a/Documentation/PCI/pci.txt b/Documentation/PCI/pci.txt
index fd4907a2968c..7f6de6ea5b47 100644
--- a/Documentation/PCI/pci.txt
+++ b/Documentation/PCI/pci.txt
@@ -294,7 +294,8 @@ NOTE: pci_enable_device() can fail! Check the return value.
294 294
295pci_set_master() will enable DMA by setting the bus master bit 295pci_set_master() will enable DMA by setting the bus master bit
296in the PCI_COMMAND register. It also fixes the latency timer value if 296in the PCI_COMMAND register. It also fixes the latency timer value if
297it's set to something bogus by the BIOS. 297it's set to something bogus by the BIOS. pci_clear_master() will
298disable DMA by clearing the bus master bit.
298 299
299If the PCI device can use the PCI Memory-Write-Invalidate transaction, 300If the PCI device can use the PCI Memory-Write-Invalidate transaction,
300call pci_set_mwi(). This enables the PCI_COMMAND bit for Mem-Wr-Inval 301call pci_set_mwi(). This enables the PCI_COMMAND bit for Mem-Wr-Inval
diff --git a/Documentation/RCU/00-INDEX b/Documentation/RCU/00-INDEX
index 7dc0695a8f90..9bb62f7b89c3 100644
--- a/Documentation/RCU/00-INDEX
+++ b/Documentation/RCU/00-INDEX
@@ -12,6 +12,8 @@ rcuref.txt
12 - Reference-count design for elements of lists/arrays protected by RCU 12 - Reference-count design for elements of lists/arrays protected by RCU
13rcu.txt 13rcu.txt
14 - RCU Concepts 14 - RCU Concepts
15rcubarrier.txt
16 - Unloading modules that use RCU callbacks
15RTFP.txt 17RTFP.txt
16 - List of RCU papers (bibliography) going back to 1980. 18 - List of RCU papers (bibliography) going back to 1980.
17torture.txt 19torture.txt
diff --git a/Documentation/RCU/rcubarrier.txt b/Documentation/RCU/rcubarrier.txt
new file mode 100644
index 000000000000..909602d409bb
--- /dev/null
+++ b/Documentation/RCU/rcubarrier.txt
@@ -0,0 +1,304 @@
1RCU and Unloadable Modules
2
3[Originally published in LWN Jan. 14, 2007: http://lwn.net/Articles/217484/]
4
5RCU (read-copy update) is a synchronization mechanism that can be thought
6of as a replacement for read-writer locking (among other things), but with
7very low-overhead readers that are immune to deadlock, priority inversion,
8and unbounded latency. RCU read-side critical sections are delimited
9by rcu_read_lock() and rcu_read_unlock(), which, in non-CONFIG_PREEMPT
10kernels, generate no code whatsoever.
11
12This means that RCU writers are unaware of the presence of concurrent
13readers, so that RCU updates to shared data must be undertaken quite
14carefully, leaving an old version of the data structure in place until all
15pre-existing readers have finished. These old versions are needed because
16such readers might hold a reference to them. RCU updates can therefore be
17rather expensive, and RCU is thus best suited for read-mostly situations.
18
19How can an RCU writer possibly determine when all readers are finished,
20given that readers might well leave absolutely no trace of their
21presence? There is a synchronize_rcu() primitive that blocks until all
22pre-existing readers have completed. An updater wishing to delete an
23element p from a linked list might do the following, while holding an
24appropriate lock, of course:
25
26 list_del_rcu(p);
27 synchronize_rcu();
28 kfree(p);
29
30But the above code cannot be used in IRQ context -- the call_rcu()
31primitive must be used instead. This primitive takes a pointer to an
32rcu_head struct placed within the RCU-protected data structure and
33another pointer to a function that may be invoked later to free that
34structure. Code to delete an element p from the linked list from IRQ
35context might then be as follows:
36
37 list_del_rcu(p);
38 call_rcu(&p->rcu, p_callback);
39
40Since call_rcu() never blocks, this code can safely be used from within
41IRQ context. The function p_callback() might be defined as follows:
42
43 static void p_callback(struct rcu_head *rp)
44 {
45 struct pstruct *p = container_of(rp, struct pstruct, rcu);
46
47 kfree(p);
48 }
49
50
51Unloading Modules That Use call_rcu()
52
53But what if p_callback is defined in an unloadable module?
54
55If we unload the module while some RCU callbacks are pending,
56the CPUs executing these callbacks are going to be severely
57disappointed when they are later invoked, as fancifully depicted at
58http://lwn.net/images/ns/kernel/rcu-drop.jpg.
59
60We could try placing a synchronize_rcu() in the module-exit code path,
61but this is not sufficient. Although synchronize_rcu() does wait for a
62grace period to elapse, it does not wait for the callbacks to complete.
63
64One might be tempted to try several back-to-back synchronize_rcu()
65calls, but this is still not guaranteed to work. If there is a very
66heavy RCU-callback load, then some of the callbacks might be deferred
67in order to allow other processing to proceed. Such deferral is required
68in realtime kernels in order to avoid excessive scheduling latencies.
69
70
71rcu_barrier()
72
73We instead need the rcu_barrier() primitive. This primitive is similar
74to synchronize_rcu(), but instead of waiting solely for a grace
75period to elapse, it also waits for all outstanding RCU callbacks to
76complete. Pseudo-code using rcu_barrier() is as follows:
77
78 1. Prevent any new RCU callbacks from being posted.
79 2. Execute rcu_barrier().
80 3. Allow the module to be unloaded.
81
82Quick Quiz #1: Why is there no srcu_barrier()?
83
84The rcutorture module makes use of rcu_barrier in its exit function
85as follows:
86
87 1 static void
88 2 rcu_torture_cleanup(void)
89 3 {
90 4 int i;
91 5
92 6 fullstop = 1;
93 7 if (shuffler_task != NULL) {
94 8 VERBOSE_PRINTK_STRING("Stopping rcu_torture_shuffle task");
95 9 kthread_stop(shuffler_task);
9610 }
9711 shuffler_task = NULL;
9812
9913 if (writer_task != NULL) {
10014 VERBOSE_PRINTK_STRING("Stopping rcu_torture_writer task");
10115 kthread_stop(writer_task);
10216 }
10317 writer_task = NULL;
10418
10519 if (reader_tasks != NULL) {
10620 for (i = 0; i < nrealreaders; i++) {
10721 if (reader_tasks[i] != NULL) {
10822 VERBOSE_PRINTK_STRING(
10923 "Stopping rcu_torture_reader task");
11024 kthread_stop(reader_tasks[i]);
11125 }
11226 reader_tasks[i] = NULL;
11327 }
11428 kfree(reader_tasks);
11529 reader_tasks = NULL;
11630 }
11731 rcu_torture_current = NULL;
11832
11933 if (fakewriter_tasks != NULL) {
12034 for (i = 0; i < nfakewriters; i++) {
12135 if (fakewriter_tasks[i] != NULL) {
12236 VERBOSE_PRINTK_STRING(
12337 "Stopping rcu_torture_fakewriter task");
12438 kthread_stop(fakewriter_tasks[i]);
12539 }
12640 fakewriter_tasks[i] = NULL;
12741 }
12842 kfree(fakewriter_tasks);
12943 fakewriter_tasks = NULL;
13044 }
13145
13246 if (stats_task != NULL) {
13347 VERBOSE_PRINTK_STRING("Stopping rcu_torture_stats task");
13448 kthread_stop(stats_task);
13549 }
13650 stats_task = NULL;
13751
13852 /* Wait for all RCU callbacks to fire. */
13953 rcu_barrier();
14054
14155 rcu_torture_stats_print(); /* -After- the stats thread is stopped! */
14256
14357 if (cur_ops->cleanup != NULL)
14458 cur_ops->cleanup();
14559 if (atomic_read(&n_rcu_torture_error))
14660 rcu_torture_print_module_parms("End of test: FAILURE");
14761 else
14862 rcu_torture_print_module_parms("End of test: SUCCESS");
14963 }
150
151Line 6 sets a global variable that prevents any RCU callbacks from
152re-posting themselves. This will not be necessary in most cases, since
153RCU callbacks rarely include calls to call_rcu(). However, the rcutorture
154module is an exception to this rule, and therefore needs to set this
155global variable.
156
157Lines 7-50 stop all the kernel tasks associated with the rcutorture
158module. Therefore, once execution reaches line 53, no more rcutorture
159RCU callbacks will be posted. The rcu_barrier() call on line 53 waits
160for any pre-existing callbacks to complete.
161
162Then lines 55-62 print status and do operation-specific cleanup, and
163then return, permitting the module-unload operation to be completed.
164
165Quick Quiz #2: Is there any other situation where rcu_barrier() might
166 be required?
167
168Your module might have additional complications. For example, if your
169module invokes call_rcu() from timers, you will need to first cancel all
170the timers, and only then invoke rcu_barrier() to wait for any remaining
171RCU callbacks to complete.
172
173
174Implementing rcu_barrier()
175
176Dipankar Sarma's implementation of rcu_barrier() makes use of the fact
177that RCU callbacks are never reordered once queued on one of the per-CPU
178queues. His implementation queues an RCU callback on each of the per-CPU
179callback queues, and then waits until they have all started executing, at
180which point, all earlier RCU callbacks are guaranteed to have completed.
181
182The original code for rcu_barrier() was as follows:
183
184 1 void rcu_barrier(void)
185 2 {
186 3 BUG_ON(in_interrupt());
187 4 /* Take cpucontrol mutex to protect against CPU hotplug */
188 5 mutex_lock(&rcu_barrier_mutex);
189 6 init_completion(&rcu_barrier_completion);
190 7 atomic_set(&rcu_barrier_cpu_count, 0);
191 8 on_each_cpu(rcu_barrier_func, NULL, 0, 1);
192 9 wait_for_completion(&rcu_barrier_completion);
19310 mutex_unlock(&rcu_barrier_mutex);
19411 }
195
196Line 3 verifies that the caller is in process context, and lines 5 and 10
197use rcu_barrier_mutex to ensure that only one rcu_barrier() is using the
198global completion and counters at a time, which are initialized on lines
1996 and 7. Line 8 causes each CPU to invoke rcu_barrier_func(), which is
200shown below. Note that the final "1" in on_each_cpu()'s argument list
201ensures that all the calls to rcu_barrier_func() will have completed
202before on_each_cpu() returns. Line 9 then waits for the completion.
203
204This code was rewritten in 2008 to support rcu_barrier_bh() and
205rcu_barrier_sched() in addition to the original rcu_barrier().
206
207The rcu_barrier_func() runs on each CPU, where it invokes call_rcu()
208to post an RCU callback, as follows:
209
210 1 static void rcu_barrier_func(void *notused)
211 2 {
212 3 int cpu = smp_processor_id();
213 4 struct rcu_data *rdp = &per_cpu(rcu_data, cpu);
214 5 struct rcu_head *head;
215 6
216 7 head = &rdp->barrier;
217 8 atomic_inc(&rcu_barrier_cpu_count);
218 9 call_rcu(head, rcu_barrier_callback);
21910 }
220
221Lines 3 and 4 locate RCU's internal per-CPU rcu_data structure,
222which contains the struct rcu_head that needed for the later call to
223call_rcu(). Line 7 picks up a pointer to this struct rcu_head, and line
2248 increments a global counter. This counter will later be decremented
225by the callback. Line 9 then registers the rcu_barrier_callback() on
226the current CPU's queue.
227
228The rcu_barrier_callback() function simply atomically decrements the
229rcu_barrier_cpu_count variable and finalizes the completion when it
230reaches zero, as follows:
231
232 1 static void rcu_barrier_callback(struct rcu_head *notused)
233 2 {
234 3 if (atomic_dec_and_test(&rcu_barrier_cpu_count))
235 4 complete(&rcu_barrier_completion);
236 5 }
237
238Quick Quiz #3: What happens if CPU 0's rcu_barrier_func() executes
239 immediately (thus incrementing rcu_barrier_cpu_count to the
240 value one), but the other CPU's rcu_barrier_func() invocations
241 are delayed for a full grace period? Couldn't this result in
242 rcu_barrier() returning prematurely?
243
244
245rcu_barrier() Summary
246
247The rcu_barrier() primitive has seen relatively little use, since most
248code using RCU is in the core kernel rather than in modules. However, if
249you are using RCU from an unloadable module, you need to use rcu_barrier()
250so that your module may be safely unloaded.
251
252
253Answers to Quick Quizzes
254
255Quick Quiz #1: Why is there no srcu_barrier()?
256
257Answer: Since there is no call_srcu(), there can be no outstanding SRCU
258 callbacks. Therefore, there is no need to wait for them.
259
260Quick Quiz #2: Is there any other situation where rcu_barrier() might
261 be required?
262
263Answer: Interestingly enough, rcu_barrier() was not originally
264 implemented for module unloading. Nikita Danilov was using
265 RCU in a filesystem, which resulted in a similar situation at
266 filesystem-unmount time. Dipankar Sarma coded up rcu_barrier()
267 in response, so that Nikita could invoke it during the
268 filesystem-unmount process.
269
270 Much later, yours truly hit the RCU module-unload problem when
271 implementing rcutorture, and found that rcu_barrier() solves
272 this problem as well.
273
274Quick Quiz #3: What happens if CPU 0's rcu_barrier_func() executes
275 immediately (thus incrementing rcu_barrier_cpu_count to the
276 value one), but the other CPU's rcu_barrier_func() invocations
277 are delayed for a full grace period? Couldn't this result in
278 rcu_barrier() returning prematurely?
279
280Answer: This cannot happen. The reason is that on_each_cpu() has its last
281 argument, the wait flag, set to "1". This flag is passed through
282 to smp_call_function() and further to smp_call_function_on_cpu(),
283 causing this latter to spin until the cross-CPU invocation of
284 rcu_barrier_func() has completed. This by itself would prevent
285 a grace period from completing on non-CONFIG_PREEMPT kernels,
286 since each CPU must undergo a context switch (or other quiescent
287 state) before the grace period can complete. However, this is
288 of no use in CONFIG_PREEMPT kernels.
289
290 Therefore, on_each_cpu() disables preemption across its call
291 to smp_call_function() and also across the local call to
292 rcu_barrier_func(). This prevents the local CPU from context
293 switching, again preventing grace periods from completing. This
294 means that all CPUs have executed rcu_barrier_func() before
295 the first rcu_barrier_callback() can possibly execute, in turn
296 preventing rcu_barrier_cpu_count from prematurely reaching zero.
297
298 Currently, -rt implementations of RCU keep but a single global
299 queue for RCU callbacks, and thus do not suffer from this
300 problem. However, when the -rt RCU eventually does have per-CPU
301 callback queues, things will have to change. One simple change
302 is to add an rcu_read_lock() before line 8 of rcu_barrier()
303 and an rcu_read_unlock() after line 8 of this same function. If
304 you can think of a better change, please let me know!
diff --git a/Documentation/accounting/getdelays.c b/Documentation/accounting/getdelays.c
index cc49400b4af8..7ea231172c85 100644
--- a/Documentation/accounting/getdelays.c
+++ b/Documentation/accounting/getdelays.c
@@ -392,6 +392,10 @@ int main(int argc, char *argv[])
392 goto err; 392 goto err;
393 } 393 }
394 } 394 }
395 if (!maskset && !tid && !containerset) {
396 usage();
397 goto err;
398 }
395 399
396 do { 400 do {
397 int i; 401 int i;
diff --git a/Documentation/bad_memory.txt b/Documentation/bad_memory.txt
new file mode 100644
index 000000000000..df8416213202
--- /dev/null
+++ b/Documentation/bad_memory.txt
@@ -0,0 +1,45 @@
1March 2008
2Jan-Simon Moeller, dl9pf@gmx.de
3
4
5How to deal with bad memory e.g. reported by memtest86+ ?
6#########################################################
7
8There are three possibilities I know of:
9
101) Reinsert/swap the memory modules
11
122) Buy new modules (best!) or try to exchange the memory
13 if you have spare-parts
14
153) Use BadRAM or memmap
16
17This Howto is about number 3) .
18
19
20BadRAM
21######
22BadRAM is the actively developed and available as kernel-patch
23here: http://rick.vanrein.org/linux/badram/
24
25For more details see the BadRAM documentation.
26
27memmap
28######
29
30memmap is already in the kernel and usable as kernel-parameter at
31boot-time. Its syntax is slightly strange and you may need to
32calculate the values by yourself!
33
34Syntax to exclude a memory area (see kernel-parameters.txt for details):
35memmap=<size>$<address>
36
37Example: memtest86+ reported here errors at address 0x18691458, 0x18698424 and
38 some others. All had 0x1869xxxx in common, so I chose a pattern of
39 0x18690000,0xffff0000.
40
41With the numbers of the example above:
42memmap=64K$0x18690000
43 or
44memmap=0x10000$0x18690000
45
diff --git a/Documentation/blackfin/00-INDEX b/Documentation/blackfin/00-INDEX
index 7cb3b356b249..d6840a91e1e1 100644
--- a/Documentation/blackfin/00-INDEX
+++ b/Documentation/blackfin/00-INDEX
@@ -9,3 +9,6 @@ cachefeatures.txt
9 9
10Filesystems 10Filesystems
11 - Requirements for mounting the root file system. 11 - Requirements for mounting the root file system.
12
13bfin-gpio-note.txt
14 - Notes in developing/using bfin-gpio driver.
diff --git a/Documentation/blackfin/bfin-gpio-notes.txt b/Documentation/blackfin/bfin-gpio-notes.txt
new file mode 100644
index 000000000000..9898c7ded7d3
--- /dev/null
+++ b/Documentation/blackfin/bfin-gpio-notes.txt
@@ -0,0 +1,71 @@
1/*
2 * File: Documentation/blackfin/bfin-gpio-note.txt
3 * Based on:
4 * Author:
5 *
6 * Created: $Id: bfin-gpio-note.txt 2008-11-24 16:42 grafyang $
7 * Description: This file contains the notes in developing/using bfin-gpio.
8 *
9 *
10 * Rev:
11 *
12 * Modified:
13 * Copyright 2004-2008 Analog Devices Inc.
14 *
15 * Bugs: Enter bugs at http://blackfin.uclinux.org/
16 *
17 */
18
19
201. Blackfin GPIO introduction
21
22 There are many GPIO pins on Blackfin. Most of these pins are muxed to
23 multi-functions. They can be configured as peripheral, or just as GPIO,
24 configured to input with interrupt enabled, or output.
25
26 For detailed information, please see "arch/blackfin/kernel/bfin_gpio.c",
27 or the relevant HRM.
28
29
302. Avoiding resource conflict
31
32 Followed function groups are used to avoiding resource conflict,
33 - Use the pin as peripheral,
34 int peripheral_request(unsigned short per, const char *label);
35 int peripheral_request_list(const unsigned short per[], const char *label);
36 void peripheral_free(unsigned short per);
37 void peripheral_free_list(const unsigned short per[]);
38 - Use the pin as GPIO,
39 int bfin_gpio_request(unsigned gpio, const char *label);
40 void bfin_gpio_free(unsigned gpio);
41 - Use the pin as GPIO interrupt,
42 int bfin_gpio_irq_request(unsigned gpio, const char *label);
43 void bfin_gpio_irq_free(unsigned gpio);
44
45 The request functions will record the function state for a certain pin,
46 the free functions will clear it's function state.
47 Once a pin is requested, it can't be requested again before it is freed by
48 previous caller, otherwise kernel will dump stacks, and the request
49 function fail.
50 These functions are wrapped by other functions, most of the users need not
51 care.
52
53
543. But there are some exceptions
55 - Kernel permit the identical GPIO be requested both as GPIO and GPIO
56 interrut.
57 Some drivers, like gpio-keys, need this behavior. Kernel only print out
58 warning messages like,
59 bfin-gpio: GPIO 24 is already reserved by gpio-keys: BTN0, and you are
60configuring it as IRQ!
61
62 Note: Consider the case that, if there are two drivers need the
63 identical GPIO, one of them use it as GPIO, the other use it as
64 GPIO interrupt. This will really cause resource conflict. So if
65 there is any abnormal driver behavior, please check the bfin-gpio
66 warning messages.
67
68 - Kernel permit the identical GPIO be requested from the same driver twice.
69
70
71
diff --git a/Documentation/block/biodoc.txt b/Documentation/block/biodoc.txt
index 3c5434c83daf..ecad6ee75705 100644
--- a/Documentation/block/biodoc.txt
+++ b/Documentation/block/biodoc.txt
@@ -186,8 +186,9 @@ a virtual address mapping (unlike the earlier scheme of virtual address
186do not have a corresponding kernel virtual address space mapping) and 186do not have a corresponding kernel virtual address space mapping) and
187low-memory pages. 187low-memory pages.
188 188
189Note: Please refer to DMA-mapping.txt for a discussion on PCI high mem DMA 189Note: Please refer to Documentation/PCI/PCI-DMA-mapping.txt for a discussion
190aspects and mapping of scatter gather lists, and support for 64 bit PCI. 190on PCI high mem DMA aspects and mapping of scatter gather lists, and support
191for 64 bit PCI.
191 192
192Special handling is required only for cases where i/o needs to happen on 193Special handling is required only for cases where i/o needs to happen on
193pages at physical memory addresses beyond what the device can support. In these 194pages at physical memory addresses beyond what the device can support. In these
@@ -953,14 +954,14 @@ elevator_allow_merge_fn called whenever the block layer determines
953 results in some sort of conflict internally, 954 results in some sort of conflict internally,
954 this hook allows it to do that. 955 this hook allows it to do that.
955 956
956elevator_dispatch_fn fills the dispatch queue with ready requests. 957elevator_dispatch_fn* fills the dispatch queue with ready requests.
957 I/O schedulers are free to postpone requests by 958 I/O schedulers are free to postpone requests by
958 not filling the dispatch queue unless @force 959 not filling the dispatch queue unless @force
959 is non-zero. Once dispatched, I/O schedulers 960 is non-zero. Once dispatched, I/O schedulers
960 are not allowed to manipulate the requests - 961 are not allowed to manipulate the requests -
961 they belong to generic dispatch queue. 962 they belong to generic dispatch queue.
962 963
963elevator_add_req_fn called to add a new request into the scheduler 964elevator_add_req_fn* called to add a new request into the scheduler
964 965
965elevator_queue_empty_fn returns true if the merge queue is empty. 966elevator_queue_empty_fn returns true if the merge queue is empty.
966 Drivers shouldn't use this, but rather check 967 Drivers shouldn't use this, but rather check
@@ -990,7 +991,7 @@ elevator_activate_req_fn Called when device driver first sees a request.
990elevator_deactivate_req_fn Called when device driver decides to delay 991elevator_deactivate_req_fn Called when device driver decides to delay
991 a request by requeueing it. 992 a request by requeueing it.
992 993
993elevator_init_fn 994elevator_init_fn*
994elevator_exit_fn Allocate and free any elevator specific storage 995elevator_exit_fn Allocate and free any elevator specific storage
995 for a queue. 996 for a queue.
996 997
diff --git a/Documentation/block/queue-sysfs.txt b/Documentation/block/queue-sysfs.txt
new file mode 100644
index 000000000000..e164403f60e1
--- /dev/null
+++ b/Documentation/block/queue-sysfs.txt
@@ -0,0 +1,63 @@
1Queue sysfs files
2=================
3
4This text file will detail the queue files that are located in the sysfs tree
5for each block device. Note that stacked devices typically do not export
6any settings, since their queue merely functions are a remapping target.
7These files are the ones found in the /sys/block/xxx/queue/ directory.
8
9Files denoted with a RO postfix are readonly and the RW postfix means
10read-write.
11
12hw_sector_size (RO)
13-------------------
14This is the hardware sector size of the device, in bytes.
15
16max_hw_sectors_kb (RO)
17----------------------
18This is the maximum number of kilobytes supported in a single data transfer.
19
20max_sectors_kb (RW)
21-------------------
22This is the maximum number of kilobytes that the block layer will allow
23for a filesystem request. Must be smaller than or equal to the maximum
24size allowed by the hardware.
25
26nomerges (RW)
27-------------
28This enables the user to disable the lookup logic involved with IO merging
29requests in the block layer. Merging may still occur through a direct
301-hit cache, since that comes for (almost) free. The IO scheduler will not
31waste cycles doing tree/hash lookups for merges if nomerges is 1. Defaults
32to 0, enabling all merges.
33
34nr_requests (RW)
35----------------
36This controls how many requests may be allocated in the block layer for
37read or write requests. Note that the total allocated number may be twice
38this amount, since it applies only to reads or writes (not the accumulated
39sum).
40
41read_ahead_kb (RW)
42------------------
43Maximum number of kilobytes to read-ahead for filesystems on this block
44device.
45
46rq_affinity (RW)
47----------------
48If this option is enabled, the block layer will migrate request completions
49to the CPU that originally submitted the request. For some workloads
50this provides a significant reduction in CPU cycles due to caching effects.
51
52scheduler (RW)
53--------------
54When read, this file will display the current and available IO schedulers
55for this block device. The currently active IO scheduler will be enclosed
56in [] brackets. Writing an IO scheduler name to this file will switch
57control of this block device to that new IO scheduler. Note that writing
58an IO scheduler name to this file will attempt to load that IO scheduler
59module, if it isn't already present in the system.
60
61
62
63Jens Axboe <jens.axboe@oracle.com>, February 2009
diff --git a/Documentation/cgroups/cgroups.txt b/Documentation/cgroups/cgroups.txt
index d9014aa0eb68..d9e5d6f41b92 100644
--- a/Documentation/cgroups/cgroups.txt
+++ b/Documentation/cgroups/cgroups.txt
@@ -1,7 +1,8 @@
1 CGROUPS 1 CGROUPS
2 ------- 2 -------
3 3
4Written by Paul Menage <menage@google.com> based on Documentation/cpusets.txt 4Written by Paul Menage <menage@google.com> based on
5Documentation/cgroups/cpusets.txt
5 6
6Original copyright statements from cpusets.txt: 7Original copyright statements from cpusets.txt:
7Portions Copyright (C) 2004 BULL SA. 8Portions Copyright (C) 2004 BULL SA.
@@ -68,7 +69,7 @@ On their own, the only use for cgroups is for simple job
68tracking. The intention is that other subsystems hook into the generic 69tracking. The intention is that other subsystems hook into the generic
69cgroup support to provide new attributes for cgroups, such as 70cgroup support to provide new attributes for cgroups, such as
70accounting/limiting the resources which processes in a cgroup can 71accounting/limiting the resources which processes in a cgroup can
71access. For example, cpusets (see Documentation/cpusets.txt) allows 72access. For example, cpusets (see Documentation/cgroups/cpusets.txt) allows
72you to associate a set of CPUs and a set of memory nodes with the 73you to associate a set of CPUs and a set of memory nodes with the
73tasks in each cgroup. 74tasks in each cgroup.
74 75
@@ -227,7 +228,6 @@ Each cgroup is represented by a directory in the cgroup file system
227containing the following files describing that cgroup: 228containing the following files describing that cgroup:
228 229
229 - tasks: list of tasks (by pid) attached to that cgroup 230 - tasks: list of tasks (by pid) attached to that cgroup
230 - releasable flag: cgroup currently removeable?
231 - notify_on_release flag: run the release agent on exit? 231 - notify_on_release flag: run the release agent on exit?
232 - release_agent: the path to use for release notifications (this file 232 - release_agent: the path to use for release notifications (this file
233 exists in the top cgroup only) 233 exists in the top cgroup only)
@@ -360,7 +360,7 @@ Now you want to do something with this cgroup.
360 360
361In this directory you can find several files: 361In this directory you can find several files:
362# ls 362# ls
363notify_on_release releasable tasks 363notify_on_release tasks
364(plus whatever files added by the attached subsystems) 364(plus whatever files added by the attached subsystems)
365 365
366Now attach your shell to this cgroup: 366Now attach your shell to this cgroup:
@@ -479,7 +479,6 @@ newly-created cgroup if an error occurs after this subsystem's
479create() method has been called for the new cgroup). 479create() method has been called for the new cgroup).
480 480
481void pre_destroy(struct cgroup_subsys *ss, struct cgroup *cgrp); 481void pre_destroy(struct cgroup_subsys *ss, struct cgroup *cgrp);
482(cgroup_mutex held by caller)
483 482
484Called before checking the reference count on each subsystem. This may 483Called before checking the reference count on each subsystem. This may
485be useful for subsystems which have some extra references even if 484be useful for subsystems which have some extra references even if
@@ -498,6 +497,7 @@ remain valid while the caller holds cgroup_mutex.
498 497
499void attach(struct cgroup_subsys *ss, struct cgroup *cgrp, 498void attach(struct cgroup_subsys *ss, struct cgroup *cgrp,
500 struct cgroup *old_cgrp, struct task_struct *task) 499 struct cgroup *old_cgrp, struct task_struct *task)
500(cgroup_mutex held by caller)
501 501
502Called after the task has been attached to the cgroup, to allow any 502Called after the task has been attached to the cgroup, to allow any
503post-attachment activity that requires memory allocations or blocking. 503post-attachment activity that requires memory allocations or blocking.
@@ -511,6 +511,7 @@ void exit(struct cgroup_subsys *ss, struct task_struct *task)
511Called during task exit. 511Called during task exit.
512 512
513int populate(struct cgroup_subsys *ss, struct cgroup *cgrp) 513int populate(struct cgroup_subsys *ss, struct cgroup *cgrp)
514(cgroup_mutex held by caller)
514 515
515Called after creation of a cgroup to allow a subsystem to populate 516Called after creation of a cgroup to allow a subsystem to populate
516the cgroup directory with file entries. The subsystem should make 517the cgroup directory with file entries. The subsystem should make
@@ -520,6 +521,7 @@ method can return an error code, the error code is currently not
520always handled well. 521always handled well.
521 522
522void post_clone(struct cgroup_subsys *ss, struct cgroup *cgrp) 523void post_clone(struct cgroup_subsys *ss, struct cgroup *cgrp)
524(cgroup_mutex held by caller)
523 525
524Called at the end of cgroup_clone() to do any paramater 526Called at the end of cgroup_clone() to do any paramater
525initialization which might be required before a task could attach. For 527initialization which might be required before a task could attach. For
@@ -527,7 +529,7 @@ example in cpusets, no task may attach before 'cpus' and 'mems' are set
527up. 529up.
528 530
529void bind(struct cgroup_subsys *ss, struct cgroup *root) 531void bind(struct cgroup_subsys *ss, struct cgroup *root)
530(cgroup_mutex held by caller) 532(cgroup_mutex and ss->hierarchy_mutex held by caller)
531 533
532Called when a cgroup subsystem is rebound to a different hierarchy 534Called when a cgroup subsystem is rebound to a different hierarchy
533and root cgroup. Currently this will only involve movement between 535and root cgroup. Currently this will only involve movement between
diff --git a/Documentation/controllers/cpuacct.txt b/Documentation/cgroups/cpuacct.txt
index bb775fbe43d7..bb775fbe43d7 100644
--- a/Documentation/controllers/cpuacct.txt
+++ b/Documentation/cgroups/cpuacct.txt
diff --git a/Documentation/cpusets.txt b/Documentation/cgroups/cpusets.txt
index 5c86c258c791..5c86c258c791 100644
--- a/Documentation/cpusets.txt
+++ b/Documentation/cgroups/cpusets.txt
diff --git a/Documentation/controllers/devices.txt b/Documentation/cgroups/devices.txt
index 7cc6e6a60672..7cc6e6a60672 100644
--- a/Documentation/controllers/devices.txt
+++ b/Documentation/cgroups/devices.txt
diff --git a/Documentation/cgroups/memcg_test.txt b/Documentation/cgroups/memcg_test.txt
new file mode 100644
index 000000000000..523a9c16c400
--- /dev/null
+++ b/Documentation/cgroups/memcg_test.txt
@@ -0,0 +1,362 @@
1Memory Resource Controller(Memcg) Implementation Memo.
2Last Updated: 2009/1/19
3Base Kernel Version: based on 2.6.29-rc2.
4
5Because VM is getting complex (one of reasons is memcg...), memcg's behavior
6is complex. This is a document for memcg's internal behavior.
7Please note that implementation details can be changed.
8
9(*) Topics on API should be in Documentation/cgroups/memory.txt)
10
110. How to record usage ?
12 2 objects are used.
13
14 page_cgroup ....an object per page.
15 Allocated at boot or memory hotplug. Freed at memory hot removal.
16
17 swap_cgroup ... an entry per swp_entry.
18 Allocated at swapon(). Freed at swapoff().
19
20 The page_cgroup has USED bit and double count against a page_cgroup never
21 occurs. swap_cgroup is used only when a charged page is swapped-out.
22
231. Charge
24
25 a page/swp_entry may be charged (usage += PAGE_SIZE) at
26
27 mem_cgroup_newpage_charge()
28 Called at new page fault and Copy-On-Write.
29
30 mem_cgroup_try_charge_swapin()
31 Called at do_swap_page() (page fault on swap entry) and swapoff.
32 Followed by charge-commit-cancel protocol. (With swap accounting)
33 At commit, a charge recorded in swap_cgroup is removed.
34
35 mem_cgroup_cache_charge()
36 Called at add_to_page_cache()
37
38 mem_cgroup_cache_charge_swapin()
39 Called at shmem's swapin.
40
41 mem_cgroup_prepare_migration()
42 Called before migration. "extra" charge is done and followed by
43 charge-commit-cancel protocol.
44 At commit, charge against oldpage or newpage will be committed.
45
462. Uncharge
47 a page/swp_entry may be uncharged (usage -= PAGE_SIZE) by
48
49 mem_cgroup_uncharge_page()
50 Called when an anonymous page is fully unmapped. I.e., mapcount goes
51 to 0. If the page is SwapCache, uncharge is delayed until
52 mem_cgroup_uncharge_swapcache().
53
54 mem_cgroup_uncharge_cache_page()
55 Called when a page-cache is deleted from radix-tree. If the page is
56 SwapCache, uncharge is delayed until mem_cgroup_uncharge_swapcache().
57
58 mem_cgroup_uncharge_swapcache()
59 Called when SwapCache is removed from radix-tree. The charge itself
60 is moved to swap_cgroup. (If mem+swap controller is disabled, no
61 charge to swap occurs.)
62
63 mem_cgroup_uncharge_swap()
64 Called when swp_entry's refcnt goes down to 0. A charge against swap
65 disappears.
66
67 mem_cgroup_end_migration(old, new)
68 At success of migration old is uncharged (if necessary), a charge
69 to new page is committed. At failure, charge to old page is committed.
70
713. charge-commit-cancel
72 In some case, we can't know this "charge" is valid or not at charging
73 (because of races).
74 To handle such case, there are charge-commit-cancel functions.
75 mem_cgroup_try_charge_XXX
76 mem_cgroup_commit_charge_XXX
77 mem_cgroup_cancel_charge_XXX
78 these are used in swap-in and migration.
79
80 At try_charge(), there are no flags to say "this page is charged".
81 at this point, usage += PAGE_SIZE.
82
83 At commit(), the function checks the page should be charged or not
84 and set flags or avoid charging.(usage -= PAGE_SIZE)
85
86 At cancel(), simply usage -= PAGE_SIZE.
87
88Under below explanation, we assume CONFIG_MEM_RES_CTRL_SWAP=y.
89
904. Anonymous
91 Anonymous page is newly allocated at
92 - page fault into MAP_ANONYMOUS mapping.
93 - Copy-On-Write.
94 It is charged right after it's allocated before doing any page table
95 related operations. Of course, it's uncharged when another page is used
96 for the fault address.
97
98 At freeing anonymous page (by exit() or munmap()), zap_pte() is called
99 and pages for ptes are freed one by one.(see mm/memory.c). Uncharges
100 are done at page_remove_rmap() when page_mapcount() goes down to 0.
101
102 Another page freeing is by page-reclaim (vmscan.c) and anonymous
103 pages are swapped out. In this case, the page is marked as
104 PageSwapCache(). uncharge() routine doesn't uncharge the page marked
105 as SwapCache(). It's delayed until __delete_from_swap_cache().
106
107 4.1 Swap-in.
108 At swap-in, the page is taken from swap-cache. There are 2 cases.
109
110 (a) If the SwapCache is newly allocated and read, it has no charges.
111 (b) If the SwapCache has been mapped by processes, it has been
112 charged already.
113
114 This swap-in is one of the most complicated work. In do_swap_page(),
115 following events occur when pte is unchanged.
116
117 (1) the page (SwapCache) is looked up.
118 (2) lock_page()
119 (3) try_charge_swapin()
120 (4) reuse_swap_page() (may call delete_swap_cache())
121 (5) commit_charge_swapin()
122 (6) swap_free().
123
124 Considering following situation for example.
125
126 (A) The page has not been charged before (2) and reuse_swap_page()
127 doesn't call delete_from_swap_cache().
128 (B) The page has not been charged before (2) and reuse_swap_page()
129 calls delete_from_swap_cache().
130 (C) The page has been charged before (2) and reuse_swap_page() doesn't
131 call delete_from_swap_cache().
132 (D) The page has been charged before (2) and reuse_swap_page() calls
133 delete_from_swap_cache().
134
135 memory.usage/memsw.usage changes to this page/swp_entry will be
136 Case (A) (B) (C) (D)
137 Event
138 Before (2) 0/ 1 0/ 1 1/ 1 1/ 1
139 ===========================================
140 (3) +1/+1 +1/+1 +1/+1 +1/+1
141 (4) - 0/ 0 - -1/ 0
142 (5) 0/-1 0/ 0 -1/-1 0/ 0
143 (6) - 0/-1 - 0/-1
144 ===========================================
145 Result 1/ 1 1/ 1 1/ 1 1/ 1
146
147 In any cases, charges to this page should be 1/ 1.
148
149 4.2 Swap-out.
150 At swap-out, typical state transition is below.
151
152 (a) add to swap cache. (marked as SwapCache)
153 swp_entry's refcnt += 1.
154 (b) fully unmapped.
155 swp_entry's refcnt += # of ptes.
156 (c) write back to swap.
157 (d) delete from swap cache. (remove from SwapCache)
158 swp_entry's refcnt -= 1.
159
160
161 At (b), the page is marked as SwapCache and not uncharged.
162 At (d), the page is removed from SwapCache and a charge in page_cgroup
163 is moved to swap_cgroup.
164
165 Finally, at task exit,
166 (e) zap_pte() is called and swp_entry's refcnt -=1 -> 0.
167 Here, a charge in swap_cgroup disappears.
168
1695. Page Cache
170 Page Cache is charged at
171 - add_to_page_cache_locked().
172
173 uncharged at
174 - __remove_from_page_cache().
175
176 The logic is very clear. (About migration, see below)
177 Note: __remove_from_page_cache() is called by remove_from_page_cache()
178 and __remove_mapping().
179
1806. Shmem(tmpfs) Page Cache
181 Memcg's charge/uncharge have special handlers of shmem. The best way
182 to understand shmem's page state transition is to read mm/shmem.c.
183 But brief explanation of the behavior of memcg around shmem will be
184 helpful to understand the logic.
185
186 Shmem's page (just leaf page, not direct/indirect block) can be on
187 - radix-tree of shmem's inode.
188 - SwapCache.
189 - Both on radix-tree and SwapCache. This happens at swap-in
190 and swap-out,
191
192 It's charged when...
193 - A new page is added to shmem's radix-tree.
194 - A swp page is read. (move a charge from swap_cgroup to page_cgroup)
195 It's uncharged when
196 - A page is removed from radix-tree and not SwapCache.
197 - When SwapCache is removed, a charge is moved to swap_cgroup.
198 - When swp_entry's refcnt goes down to 0, a charge in swap_cgroup
199 disappears.
200
2017. Page Migration
202 One of the most complicated functions is page-migration-handler.
203 Memcg has 2 routines. Assume that we are migrating a page's contents
204 from OLDPAGE to NEWPAGE.
205
206 Usual migration logic is..
207 (a) remove the page from LRU.
208 (b) allocate NEWPAGE (migration target)
209 (c) lock by lock_page().
210 (d) unmap all mappings.
211 (e-1) If necessary, replace entry in radix-tree.
212 (e-2) move contents of a page.
213 (f) map all mappings again.
214 (g) pushback the page to LRU.
215 (-) OLDPAGE will be freed.
216
217 Before (g), memcg should complete all necessary charge/uncharge to
218 NEWPAGE/OLDPAGE.
219
220 The point is....
221 - If OLDPAGE is anonymous, all charges will be dropped at (d) because
222 try_to_unmap() drops all mapcount and the page will not be
223 SwapCache.
224
225 - If OLDPAGE is SwapCache, charges will be kept at (g) because
226 __delete_from_swap_cache() isn't called at (e-1)
227
228 - If OLDPAGE is page-cache, charges will be kept at (g) because
229 remove_from_swap_cache() isn't called at (e-1)
230
231 memcg provides following hooks.
232
233 - mem_cgroup_prepare_migration(OLDPAGE)
234 Called after (b) to account a charge (usage += PAGE_SIZE) against
235 memcg which OLDPAGE belongs to.
236
237 - mem_cgroup_end_migration(OLDPAGE, NEWPAGE)
238 Called after (f) before (g).
239 If OLDPAGE is used, commit OLDPAGE again. If OLDPAGE is already
240 charged, a charge by prepare_migration() is automatically canceled.
241 If NEWPAGE is used, commit NEWPAGE and uncharge OLDPAGE.
242
243 But zap_pte() (by exit or munmap) can be called while migration,
244 we have to check if OLDPAGE/NEWPAGE is a valid page after commit().
245
2468. LRU
247 Each memcg has its own private LRU. Now, it's handling is under global
248 VM's control (means that it's handled under global zone->lru_lock).
249 Almost all routines around memcg's LRU is called by global LRU's
250 list management functions under zone->lru_lock().
251
252 A special function is mem_cgroup_isolate_pages(). This scans
253 memcg's private LRU and call __isolate_lru_page() to extract a page
254 from LRU.
255 (By __isolate_lru_page(), the page is removed from both of global and
256 private LRU.)
257
258
2599. Typical Tests.
260
261 Tests for racy cases.
262
263 9.1 Small limit to memcg.
264 When you do test to do racy case, it's good test to set memcg's limit
265 to be very small rather than GB. Many races found in the test under
266 xKB or xxMB limits.
267 (Memory behavior under GB and Memory behavior under MB shows very
268 different situation.)
269
270 9.2 Shmem
271 Historically, memcg's shmem handling was poor and we saw some amount
272 of troubles here. This is because shmem is page-cache but can be
273 SwapCache. Test with shmem/tmpfs is always good test.
274
275 9.3 Migration
276 For NUMA, migration is an another special case. To do easy test, cpuset
277 is useful. Following is a sample script to do migration.
278
279 mount -t cgroup -o cpuset none /opt/cpuset
280
281 mkdir /opt/cpuset/01
282 echo 1 > /opt/cpuset/01/cpuset.cpus
283 echo 0 > /opt/cpuset/01/cpuset.mems
284 echo 1 > /opt/cpuset/01/cpuset.memory_migrate
285 mkdir /opt/cpuset/02
286 echo 1 > /opt/cpuset/02/cpuset.cpus
287 echo 1 > /opt/cpuset/02/cpuset.mems
288 echo 1 > /opt/cpuset/02/cpuset.memory_migrate
289
290 In above set, when you moves a task from 01 to 02, page migration to
291 node 0 to node 1 will occur. Following is a script to migrate all
292 under cpuset.
293 --
294 move_task()
295 {
296 for pid in $1
297 do
298 /bin/echo $pid >$2/tasks 2>/dev/null
299 echo -n $pid
300 echo -n " "
301 done
302 echo END
303 }
304
305 G1_TASK=`cat ${G1}/tasks`
306 G2_TASK=`cat ${G2}/tasks`
307 move_task "${G1_TASK}" ${G2} &
308 --
309 9.4 Memory hotplug.
310 memory hotplug test is one of good test.
311 to offline memory, do following.
312 # echo offline > /sys/devices/system/memory/memoryXXX/state
313 (XXX is the place of memory)
314 This is an easy way to test page migration, too.
315
316 9.5 mkdir/rmdir
317 When using hierarchy, mkdir/rmdir test should be done.
318 Use tests like the following.
319
320 echo 1 >/opt/cgroup/01/memory/use_hierarchy
321 mkdir /opt/cgroup/01/child_a
322 mkdir /opt/cgroup/01/child_b
323
324 set limit to 01.
325 add limit to 01/child_b
326 run jobs under child_a and child_b
327
328 create/delete following groups at random while jobs are running.
329 /opt/cgroup/01/child_a/child_aa
330 /opt/cgroup/01/child_b/child_bb
331 /opt/cgroup/01/child_c
332
333 running new jobs in new group is also good.
334
335 9.6 Mount with other subsystems.
336 Mounting with other subsystems is a good test because there is a
337 race and lock dependency with other cgroup subsystems.
338
339 example)
340 # mount -t cgroup none /cgroup -t cpuset,memory,cpu,devices
341
342 and do task move, mkdir, rmdir etc...under this.
343
344 9.7 swapoff.
345 Besides management of swap is one of complicated parts of memcg,
346 call path of swap-in at swapoff is not same as usual swap-in path..
347 It's worth to be tested explicitly.
348
349 For example, test like following is good.
350 (Shell-A)
351 # mount -t cgroup none /cgroup -t memory
352 # mkdir /cgroup/test
353 # echo 40M > /cgroup/test/memory.limit_in_bytes
354 # echo 0 > /cgroup/test/tasks
355 Run malloc(100M) program under this. You'll see 60M of swaps.
356 (Shell-B)
357 # move all tasks in /cgroup/test to /cgroup
358 # /sbin/swapoff -a
359 # rmdir /test/cgroup
360 # kill malloc task.
361
362 Of course, tmpfs v.s. swapoff test should be tested, too.
diff --git a/Documentation/controllers/memory.txt b/Documentation/cgroups/memory.txt
index 1c07547d3f81..e1501964df1e 100644
--- a/Documentation/controllers/memory.txt
+++ b/Documentation/cgroups/memory.txt
@@ -137,7 +137,32 @@ behind this approach is that a cgroup that aggressively uses a shared
137page will eventually get charged for it (once it is uncharged from 137page will eventually get charged for it (once it is uncharged from
138the cgroup that brought it in -- this will happen on memory pressure). 138the cgroup that brought it in -- this will happen on memory pressure).
139 139
1402.4 Reclaim 140Exception: If CONFIG_CGROUP_CGROUP_MEM_RES_CTLR_SWAP is not used..
141When you do swapoff and make swapped-out pages of shmem(tmpfs) to
142be backed into memory in force, charges for pages are accounted against the
143caller of swapoff rather than the users of shmem.
144
145
1462.4 Swap Extension (CONFIG_CGROUP_MEM_RES_CTLR_SWAP)
147Swap Extension allows you to record charge for swap. A swapped-in page is
148charged back to original page allocator if possible.
149
150When swap is accounted, following files are added.
151 - memory.memsw.usage_in_bytes.
152 - memory.memsw.limit_in_bytes.
153
154usage of mem+swap is limited by memsw.limit_in_bytes.
155
156Note: why 'mem+swap' rather than swap.
157The global LRU(kswapd) can swap out arbitrary pages. Swap-out means
158to move account from memory to swap...there is no change in usage of
159mem+swap.
160
161In other words, when we want to limit the usage of swap without affecting
162global LRU, mem+swap limit is better than just limiting swap from OS point
163of view.
164
1652.5 Reclaim
141 166
142Each cgroup maintains a per cgroup LRU that consists of an active 167Each cgroup maintains a per cgroup LRU that consists of an active
143and inactive list. When a cgroup goes over its limit, we first try 168and inactive list. When a cgroup goes over its limit, we first try
@@ -207,12 +232,6 @@ exceeded.
207The memory.stat file gives accounting information. Now, the number of 232The memory.stat file gives accounting information. Now, the number of
208caches, RSS and Active pages/Inactive pages are shown. 233caches, RSS and Active pages/Inactive pages are shown.
209 234
210The memory.force_empty gives an interface to drop *all* charges by force.
211
212# echo 1 > memory.force_empty
213
214will drop all charges in cgroup. Currently, this is maintained for test.
215
2164. Testing 2354. Testing
217 236
218Balbir posted lmbench, AIM9, LTP and vmmstress results [10] and [11]. 237Balbir posted lmbench, AIM9, LTP and vmmstress results [10] and [11].
@@ -242,10 +261,106 @@ reclaimed.
242 261
243A cgroup can be removed by rmdir, but as discussed in sections 4.1 and 4.2, a 262A cgroup can be removed by rmdir, but as discussed in sections 4.1 and 4.2, a
244cgroup might have some charge associated with it, even though all 263cgroup might have some charge associated with it, even though all
245tasks have migrated away from it. Such charges are automatically dropped at 264tasks have migrated away from it.
246rmdir() if there are no tasks. 265Such charges are freed(at default) or moved to its parent. When moved,
266both of RSS and CACHES are moved to parent.
267If both of them are busy, rmdir() returns -EBUSY. See 5.1 Also.
268
269Charges recorded in swap information is not updated at removal of cgroup.
270Recorded information is discarded and a cgroup which uses swap (swapcache)
271will be charged as a new owner of it.
272
273
2745. Misc. interfaces.
275
2765.1 force_empty
277 memory.force_empty interface is provided to make cgroup's memory usage empty.
278 You can use this interface only when the cgroup has no tasks.
279 When writing anything to this
280
281 # echo 0 > memory.force_empty
282
283 Almost all pages tracked by this memcg will be unmapped and freed. Some of
284 pages cannot be freed because it's locked or in-use. Such pages are moved
285 to parent and this cgroup will be empty. But this may return -EBUSY in
286 some too busy case.
287
288 Typical use case of this interface is that calling this before rmdir().
289 Because rmdir() moves all pages to parent, some out-of-use page caches can be
290 moved to the parent. If you want to avoid that, force_empty will be useful.
291
2925.2 stat file
293 memory.stat file includes following statistics (now)
294 cache - # of pages from page-cache and shmem.
295 rss - # of pages from anonymous memory.
296 pgpgin - # of event of charging
297 pgpgout - # of event of uncharging
298 active_anon - # of pages on active lru of anon, shmem.
299 inactive_anon - # of pages on active lru of anon, shmem
300 active_file - # of pages on active lru of file-cache
301 inactive_file - # of pages on inactive lru of file cache
302 unevictable - # of pages cannot be reclaimed.(mlocked etc)
303
304 Below is depend on CONFIG_DEBUG_VM.
305 inactive_ratio - VM inernal parameter. (see mm/page_alloc.c)
306 recent_rotated_anon - VM internal parameter. (see mm/vmscan.c)
307 recent_rotated_file - VM internal parameter. (see mm/vmscan.c)
308 recent_scanned_anon - VM internal parameter. (see mm/vmscan.c)
309 recent_scanned_file - VM internal parameter. (see mm/vmscan.c)
310
311 Memo:
312 recent_rotated means recent frequency of lru rotation.
313 recent_scanned means recent # of scans to lru.
314 showing for better debug please see the code for meanings.
315
316
3175.3 swappiness
318 Similar to /proc/sys/vm/swappiness, but affecting a hierarchy of groups only.
319
320 Following cgroup's swapiness can't be changed.
321 - root cgroup (uses /proc/sys/vm/swappiness).
322 - a cgroup which uses hierarchy and it has child cgroup.
323 - a cgroup which uses hierarchy and not the root of hierarchy.
324
325
3266. Hierarchy support
327
328The memory controller supports a deep hierarchy and hierarchical accounting.
329The hierarchy is created by creating the appropriate cgroups in the
330cgroup filesystem. Consider for example, the following cgroup filesystem
331hierarchy
332
333 root
334 / | \
335 / | \
336 a b c
337 | \
338 | \
339 d e
340
341In the diagram above, with hierarchical accounting enabled, all memory
342usage of e, is accounted to its ancestors up until the root (i.e, c and root),
343that has memory.use_hierarchy enabled. If one of the ancestors goes over its
344limit, the reclaim algorithm reclaims from the tasks in the ancestor and the
345children of the ancestor.
346
3476.1 Enabling hierarchical accounting and reclaim
348
349The memory controller by default disables the hierarchy feature. Support
350can be enabled by writing 1 to memory.use_hierarchy file of the root cgroup
351
352# echo 1 > memory.use_hierarchy
353
354The feature can be disabled by
355
356# echo 0 > memory.use_hierarchy
357
358NOTE1: Enabling/disabling will fail if the cgroup already has other
359cgroups created below it.
360
361NOTE2: This feature can be enabled/disabled per subtree.
247 362
2485. TODO 3637. TODO
249 364
2501. Add support for accounting huge pages (as a separate controller) 3651. Add support for accounting huge pages (as a separate controller)
2512. Make per-cgroup scanner reclaim not-shared pages first 3662. Make per-cgroup scanner reclaim not-shared pages first
diff --git a/Documentation/controllers/resource_counter.txt b/Documentation/cgroups/resource_counter.txt
index f196ac1d7d25..f196ac1d7d25 100644
--- a/Documentation/controllers/resource_counter.txt
+++ b/Documentation/cgroups/resource_counter.txt
diff --git a/Documentation/cpu-hotplug.txt b/Documentation/cpu-hotplug.txt
index 94bbc27ddd4f..9d620c153b04 100644
--- a/Documentation/cpu-hotplug.txt
+++ b/Documentation/cpu-hotplug.txt
@@ -50,16 +50,17 @@ 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
53- x86_64, ia64 53- ia64
54 54
55ia64 and x86_64 use the number of disabled local apics in ACPI tables MADT 55ia64 uses the number of disabled local apics in ACPI tables MADT to
56to determine the number of potentially hot-pluggable cpus. The implementation 56determine the number of potentially hot-pluggable cpus. The implementation
57should only rely on this to count the # of cpus, but *MUST* not rely on the 57should only rely on this to count the # of cpus, but *MUST* not rely
58apicid values in those tables for disabled apics. In the event BIOS doesn't 58on the apicid values in those tables for disabled apics. In the event
59mark such hot-pluggable cpus as disabled entries, one could use this 59BIOS doesn't mark such hot-pluggable cpus as disabled entries, one could
60parameter "additional_cpus=x" to represent those cpus in the cpu_possible_map. 60use this parameter "additional_cpus=x" to represent those cpus in the
61cpu_possible_map.
61 62
62possible_cpus=n [s390 only] use this to set hotpluggable cpus. 63possible_cpus=n [s390,x86_64] use this to set hotpluggable cpus.
63 This option sets possible_cpus bits in 64 This option sets possible_cpus bits in
64 cpu_possible_map. Thus keeping the numbers of bits set 65 cpu_possible_map. Thus keeping the numbers of bits set
65 constant even if the machine gets rebooted. 66 constant even if the machine gets rebooted.
diff --git a/Documentation/cputopology.txt b/Documentation/cputopology.txt
index bd699da24666..45932ec21cee 100644
--- a/Documentation/cputopology.txt
+++ b/Documentation/cputopology.txt
@@ -31,3 +31,51 @@ not defined by include/asm-XXX/topology.h:
312) core_id: 0 312) core_id: 0
323) thread_siblings: just the given CPU 323) thread_siblings: just the given CPU
334) core_siblings: just the given CPU 334) core_siblings: just the given CPU
34
35Additionally, cpu topology information is provided under
36/sys/devices/system/cpu and includes these files. The internal
37source for the output is in brackets ("[]").
38
39 kernel_max: the maximum cpu index allowed by the kernel configuration.
40 [NR_CPUS-1]
41
42 offline: cpus that are not online because they have been
43 HOTPLUGGED off (see cpu-hotplug.txt) or exceed the limit
44 of cpus allowed by the kernel configuration (kernel_max
45 above). [~cpu_online_mask + cpus >= NR_CPUS]
46
47 online: cpus that are online and being scheduled [cpu_online_mask]
48
49 possible: cpus that have been allocated resources and can be
50 brought online if they are present. [cpu_possible_mask]
51
52 present: cpus that have been identified as being present in the
53 system. [cpu_present_mask]
54
55The format for the above output is compatible with cpulist_parse()
56[see <linux/cpumask.h>]. Some examples follow.
57
58In this example, there are 64 cpus in the system but cpus 32-63 exceed
59the kernel max which is limited to 0..31 by the NR_CPUS config option
60being 32. Note also that cpus 2 and 4-31 are not online but could be
61brought online as they are both present and possible.
62
63 kernel_max: 31
64 offline: 2,4-31,32-63
65 online: 0-1,3
66 possible: 0-31
67 present: 0-31
68
69In this example, the NR_CPUS config option is 128, but the kernel was
70started with possible_cpus=144. There are 4 cpus in the system and cpu2
71was manually taken offline (and is the only cpu that can be brought
72online.)
73
74 kernel_max: 127
75 offline: 2,4-127,128-143
76 online: 0-1,3
77 possible: 0-127
78 present: 0-3
79
80See cpu-hotplug.txt for the possible_cpus=NUM kernel start parameter
81as well as more information on the various cpumask's.
diff --git a/Documentation/crypto/async-tx-api.txt b/Documentation/crypto/async-tx-api.txt
index c1e9545c59bd..9f59fcbf5d82 100644
--- a/Documentation/crypto/async-tx-api.txt
+++ b/Documentation/crypto/async-tx-api.txt
@@ -13,9 +13,9 @@
133.6 Constraints 133.6 Constraints
143.7 Example 143.7 Example
15 15
164 DRIVER DEVELOPER NOTES 164 DMAENGINE DRIVER DEVELOPER NOTES
174.1 Conformance points 174.1 Conformance points
184.2 "My application needs finer control of hardware channels" 184.2 "My application needs exclusive control of hardware channels"
19 19
205 SOURCE 205 SOURCE
21 21
@@ -150,6 +150,7 @@ ops_run_* and ops_complete_* routines in drivers/md/raid5.c for more
150implementation examples. 150implementation examples.
151 151
1524 DRIVER DEVELOPMENT NOTES 1524 DRIVER DEVELOPMENT NOTES
153
1534.1 Conformance points: 1544.1 Conformance points:
154There are a few conformance points required in dmaengine drivers to 155There are a few conformance points required in dmaengine drivers to
155accommodate assumptions made by applications using the async_tx API: 156accommodate assumptions made by applications using the async_tx API:
@@ -158,58 +159,49 @@ accommodate assumptions made by applications using the async_tx API:
1583/ Use async_tx_run_dependencies() in the descriptor clean up path to 1593/ Use async_tx_run_dependencies() in the descriptor clean up path to
159 handle submission of dependent operations 160 handle submission of dependent operations
160 161
1614.2 "My application needs finer control of hardware channels" 1624.2 "My application needs exclusive control of hardware channels"
162This requirement seems to arise from cases where a DMA engine driver is 163Primarily this requirement arises from cases where a DMA engine driver
163trying to support device-to-memory DMA. The dmaengine and async_tx 164is being used to support device-to-memory operations. A channel that is
164implementations were designed for offloading memory-to-memory 165performing these operations cannot, for many platform specific reasons,
165operations; however, there are some capabilities of the dmaengine layer 166be shared. For these cases the dma_request_channel() interface is
166that can be used for platform-specific channel management. 167provided.
167Platform-specific constraints can be handled by registering the 168
168application as a 'dma_client' and implementing a 'dma_event_callback' to 169The interface is:
169apply a filter to the available channels in the system. Before showing 170struct dma_chan *dma_request_channel(dma_cap_mask_t mask,
170how to implement a custom dma_event callback some background of 171 dma_filter_fn filter_fn,
171dmaengine's client support is required. 172 void *filter_param);
172 173
173The following routines in dmaengine support multiple clients requesting 174Where dma_filter_fn is defined as:
174use of a channel: 175typedef bool (*dma_filter_fn)(struct dma_chan *chan, void *filter_param);
175- dma_async_client_register(struct dma_client *client) 176
176- dma_async_client_chan_request(struct dma_client *client) 177When the optional 'filter_fn' parameter is set to NULL
177 178dma_request_channel simply returns the first channel that satisfies the
178dma_async_client_register takes a pointer to an initialized dma_client 179capability mask. Otherwise, when the mask parameter is insufficient for
179structure. It expects that the 'event_callback' and 'cap_mask' fields 180specifying the necessary channel, the filter_fn routine can be used to
180are already initialized. 181disposition the available channels in the system. The filter_fn routine
181 182is called once for each free channel in the system. Upon seeing a
182dma_async_client_chan_request triggers dmaengine to notify the client of 183suitable channel filter_fn returns DMA_ACK which flags that channel to
183all channels that satisfy the capability mask. It is up to the client's 184be the return value from dma_request_channel. A channel allocated via
184event_callback routine to track how many channels the client needs and 185this interface is exclusive to the caller, until dma_release_channel()
185how many it is currently using. The dma_event_callback routine returns a 186is called.
186dma_state_client code to let dmaengine know the status of the 187
187allocation. 188The DMA_PRIVATE capability flag is used to tag dma devices that should
188 189not be used by the general-purpose allocator. It can be set at
189Below is the example of how to extend this functionality for 190initialization time if it is known that a channel will always be
190platform-specific filtering of the available channels beyond the 191private. Alternatively, it is set when dma_request_channel() finds an
191standard capability mask: 192unused "public" channel.
192 193
193static enum dma_state_client 194A couple caveats to note when implementing a driver and consumer:
194my_dma_client_callback(struct dma_client *client, 1951/ Once a channel has been privately allocated it will no longer be
195 struct dma_chan *chan, enum dma_state state) 196 considered by the general-purpose allocator even after a call to
196{ 197 dma_release_channel().
197 struct dma_device *dma_dev; 1982/ Since capabilities are specified at the device level a dma_device
198 struct my_platform_specific_dma *plat_dma_dev; 199 with multiple channels will either have all channels public, or all
199 200 channels private.
200 dma_dev = chan->device;
201 plat_dma_dev = container_of(dma_dev,
202 struct my_platform_specific_dma,
203 dma_dev);
204
205 if (!plat_dma_dev->platform_specific_capability)
206 return DMA_DUP;
207
208 . . .
209}
210 201
2115 SOURCE 2025 SOURCE
212include/linux/dmaengine.h: core header file for DMA drivers and clients 203
204include/linux/dmaengine.h: core header file for DMA drivers and api users
213drivers/dma/dmaengine.c: offload engine channel management routines 205drivers/dma/dmaengine.c: offload engine channel management routines
214drivers/dma/: location for offload engine drivers 206drivers/dma/: location for offload engine drivers
215include/linux/async_tx.h: core header file for the async_tx api 207include/linux/async_tx.h: core header file for the async_tx api
diff --git a/Documentation/dell_rbu.txt b/Documentation/dell_rbu.txt
index 2c0d631de0cf..c11b931f8f98 100644
--- a/Documentation/dell_rbu.txt
+++ b/Documentation/dell_rbu.txt
@@ -81,8 +81,8 @@ Until this step is completed the driver cannot be unloaded.
81Also echoing either mono ,packet or init in to image_type will free up the 81Also echoing either mono ,packet or init in to image_type will free up the
82memory allocated by the driver. 82memory allocated by the driver.
83 83
84If an user by accident executes steps 1 and 3 above without executing step 2; 84If a user by accident executes steps 1 and 3 above without executing step 2;
85it will make the /sys/class/firmware/dell_rbu/ entries to disappear. 85it will make the /sys/class/firmware/dell_rbu/ entries disappear.
86The entries can be recreated by doing the following 86The entries can be recreated by doing the following
87echo init > /sys/devices/platform/dell_rbu/image_type 87echo init > /sys/devices/platform/dell_rbu/image_type
88NOTE: echoing init in image_type does not change it original value. 88NOTE: echoing init in image_type does not change it original value.
diff --git a/Documentation/development-process/4.Coding b/Documentation/development-process/4.Coding
index 014aca8f14e2..a5a3450faaa0 100644
--- a/Documentation/development-process/4.Coding
+++ b/Documentation/development-process/4.Coding
@@ -375,10 +375,10 @@ say, this can be a large job, so it is best to be sure that the
375justification is solid. 375justification is solid.
376 376
377When making an incompatible API change, one should, whenever possible, 377When making an incompatible API change, one should, whenever possible,
378ensure that code which has not been updated is caught by the compiler. 378ensure that code which has not been updated is caught by the compiler.
379This will help you to be sure that you have found all in-tree uses of that 379This will help you to be sure that you have found all in-tree uses of that
380interface. It will also alert developers of out-of-tree code that there is 380interface. It will also alert developers of out-of-tree code that there is
381a change that they need to respond to. Supporting out-of-tree code is not 381a change that they need to respond to. Supporting out-of-tree code is not
382something that kernel developers need to be worried about, but we also do 382something that kernel developers need to be worried about, but we also do
383not have to make life harder for out-of-tree developers than it it needs to 383not have to make life harder for out-of-tree developers than it needs to
384be. 384be.
diff --git a/Documentation/dmaengine.txt b/Documentation/dmaengine.txt
new file mode 100644
index 000000000000..0c1c2f63c0a9
--- /dev/null
+++ b/Documentation/dmaengine.txt
@@ -0,0 +1 @@
See Documentation/crypto/async-tx-api.txt
diff --git a/Documentation/feature-removal-schedule.txt b/Documentation/feature-removal-schedule.txt
index a0ed3964a219..5ddbe350487a 100644
--- a/Documentation/feature-removal-schedule.txt
+++ b/Documentation/feature-removal-schedule.txt
@@ -310,15 +310,6 @@ Who: Krzysztof Piotr Oledzki <ole@ans.pl>
310 310
311--------------------------- 311---------------------------
312 312
313What: ide-scsi (BLK_DEV_IDESCSI)
314When: 2.6.29
315Why: The 2.6 kernel supports direct writing to ide CD drives, which
316 eliminates the need for ide-scsi. The new method is more
317 efficient in every way.
318Who: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
319
320---------------------------
321
322What: i2c_attach_client(), i2c_detach_client(), i2c_driver->detach_client() 313What: i2c_attach_client(), i2c_detach_client(), i2c_driver->detach_client()
323When: 2.6.29 (ideally) or 2.6.30 (more likely) 314When: 2.6.29 (ideally) or 2.6.30 (more likely)
324Why: Deprecated by the new (standard) device driver binding model. Use 315Why: Deprecated by the new (standard) device driver binding model. Use
@@ -327,6 +318,14 @@ Who: Jean Delvare <khali@linux-fr.org>
327 318
328--------------------------- 319---------------------------
329 320
321What: fscher and fscpos drivers
322When: June 2009
323Why: Deprecated by the new fschmd driver.
324Who: Hans de Goede <hdegoede@redhat.com>
325 Jean Delvare <khali@linux-fr.org>
326
327---------------------------
328
330What: SELinux "compat_net" functionality 329What: SELinux "compat_net" functionality
331When: 2.6.30 at the earliest 330When: 2.6.30 at the earliest
332Why: In 2.6.18 the Secmark concept was introduced to replace the "compat_net" 331Why: In 2.6.18 the Secmark concept was introduced to replace the "compat_net"
diff --git a/Documentation/filesystems/Locking b/Documentation/filesystems/Locking
index 23d2f4460deb..ec6a9392a173 100644
--- a/Documentation/filesystems/Locking
+++ b/Documentation/filesystems/Locking
@@ -97,8 +97,8 @@ prototypes:
97 void (*put_super) (struct super_block *); 97 void (*put_super) (struct super_block *);
98 void (*write_super) (struct super_block *); 98 void (*write_super) (struct super_block *);
99 int (*sync_fs)(struct super_block *sb, int wait); 99 int (*sync_fs)(struct super_block *sb, int wait);
100 void (*write_super_lockfs) (struct super_block *); 100 int (*freeze_fs) (struct super_block *);
101 void (*unlockfs) (struct super_block *); 101 int (*unfreeze_fs) (struct super_block *);
102 int (*statfs) (struct dentry *, struct kstatfs *); 102 int (*statfs) (struct dentry *, struct kstatfs *);
103 int (*remount_fs) (struct super_block *, int *, char *); 103 int (*remount_fs) (struct super_block *, int *, char *);
104 void (*clear_inode) (struct inode *); 104 void (*clear_inode) (struct inode *);
@@ -119,8 +119,8 @@ delete_inode: no
119put_super: yes yes no 119put_super: yes yes no
120write_super: no yes read 120write_super: no yes read
121sync_fs: no no read 121sync_fs: no no read
122write_super_lockfs: ? 122freeze_fs: ?
123unlockfs: ? 123unfreeze_fs: ?
124statfs: no no no 124statfs: no no no
125remount_fs: yes yes maybe (see below) 125remount_fs: yes yes maybe (see below)
126clear_inode: no 126clear_inode: no
@@ -394,11 +394,10 @@ prototypes:
394 unsigned long (*get_unmapped_area)(struct file *, unsigned long, 394 unsigned long (*get_unmapped_area)(struct file *, unsigned long,
395 unsigned long, unsigned long, unsigned long); 395 unsigned long, unsigned long, unsigned long);
396 int (*check_flags)(int); 396 int (*check_flags)(int);
397 int (*dir_notify)(struct file *, unsigned long);
398}; 397};
399 398
400locking rules: 399locking rules:
401 All except ->poll() may block. 400 All may block.
402 BKL 401 BKL
403llseek: no (see below) 402llseek: no (see below)
404read: no 403read: no
@@ -424,7 +423,6 @@ sendfile: no
424sendpage: no 423sendpage: no
425get_unmapped_area: no 424get_unmapped_area: no
426check_flags: no 425check_flags: no
427dir_notify: no
428 426
429->llseek() locking has moved from llseek to the individual llseek 427->llseek() locking has moved from llseek to the individual llseek
430implementations. If your fs is not using generic_file_llseek, you 428implementations. If your fs is not using generic_file_llseek, you
diff --git a/Documentation/filesystems/btrfs.txt b/Documentation/filesystems/btrfs.txt
new file mode 100644
index 000000000000..64087c34327f
--- /dev/null
+++ b/Documentation/filesystems/btrfs.txt
@@ -0,0 +1,91 @@
1
2 BTRFS
3 =====
4
5Btrfs is a new copy on write filesystem for Linux aimed at
6implementing advanced features while focusing on fault tolerance,
7repair and easy administration. Initially developed by Oracle, Btrfs
8is licensed under the GPL and open for contribution from anyone.
9
10Linux has a wealth of filesystems to choose from, but we are facing a
11number of challenges with scaling to the large storage subsystems that
12are becoming common in today's data centers. Filesystems need to scale
13in their ability to address and manage large storage, and also in
14their ability to detect, repair and tolerate errors in the data stored
15on disk. Btrfs is under heavy development, and is not suitable for
16any uses other than benchmarking and review. The Btrfs disk format is
17not yet finalized.
18
19The main Btrfs features include:
20
21 * Extent based file storage (2^64 max file size)
22 * Space efficient packing of small files
23 * Space efficient indexed directories
24 * Dynamic inode allocation
25 * Writable snapshots
26 * Subvolumes (separate internal filesystem roots)
27 * Object level mirroring and striping
28 * Checksums on data and metadata (multiple algorithms available)
29 * Compression
30 * Integrated multiple device support, with several raid algorithms
31 * Online filesystem check (not yet implemented)
32 * Very fast offline filesystem check
33 * Efficient incremental backup and FS mirroring (not yet implemented)
34 * Online filesystem defragmentation
35
36
37
38 MAILING LIST
39 ============
40
41There is a Btrfs mailing list hosted on vger.kernel.org. You can
42find details on how to subscribe here:
43
44http://vger.kernel.org/vger-lists.html#linux-btrfs
45
46Mailing list archives are available from gmane:
47
48http://dir.gmane.org/gmane.comp.file-systems.btrfs
49
50
51
52 IRC
53 ===
54
55Discussion of Btrfs also occurs on the #btrfs channel of the Freenode
56IRC network.
57
58
59
60 UTILITIES
61 =========
62
63Userspace tools for creating and manipulating Btrfs file systems are
64available from the git repository at the following location:
65
66 http://git.kernel.org/?p=linux/kernel/git/mason/btrfs-progs-unstable.git
67 git://git.kernel.org/pub/scm/linux/kernel/git/mason/btrfs-progs-unstable.git
68
69These include the following tools:
70
71mkfs.btrfs: create a filesystem
72
73btrfsctl: control program to create snapshots and subvolumes:
74
75 mount /dev/sda2 /mnt
76 btrfsctl -s new_subvol_name /mnt
77 btrfsctl -s snapshot_of_default /mnt/default
78 btrfsctl -s snapshot_of_new_subvol /mnt/new_subvol_name
79 btrfsctl -s snapshot_of_a_snapshot /mnt/snapshot_of_new_subvol
80 ls /mnt
81 default snapshot_of_a_snapshot snapshot_of_new_subvol
82 new_subvol_name snapshot_of_default
83
84 Snapshots and subvolumes cannot be deleted right now, but you can
85 rm -rf all the files and directories inside them.
86
87btrfsck: do a limited check of the FS extent trees.
88
89btrfs-debug-tree: print all of the FS metadata in text form. Example:
90
91 btrfs-debug-tree /dev/sda2 >& big_output_file
diff --git a/Documentation/filesystems/devpts.txt b/Documentation/filesystems/devpts.txt
new file mode 100644
index 000000000000..68dffd87f9b7
--- /dev/null
+++ b/Documentation/filesystems/devpts.txt
@@ -0,0 +1,132 @@
1
2To support containers, we now allow multiple instances of devpts filesystem,
3such that indices of ptys allocated in one instance are independent of indices
4allocated in other instances of devpts.
5
6To preserve backward compatibility, this support for multiple instances is
7enabled only if:
8
9 - CONFIG_DEVPTS_MULTIPLE_INSTANCES=y, and
10 - '-o newinstance' mount option is specified while mounting devpts
11
12IOW, devpts now supports both single-instance and multi-instance semantics.
13
14If CONFIG_DEVPTS_MULTIPLE_INSTANCES=n, there is no change in behavior and
15this referred to as the "legacy" mode. In this mode, the new mount options
16(-o newinstance and -o ptmxmode) will be ignored with a 'bogus option' message
17on console.
18
19If CONFIG_DEVPTS_MULTIPLE_INSTANCES=y and devpts is mounted without the
20'newinstance' option (as in current start-up scripts) the new mount binds
21to the initial kernel mount of devpts. This mode is referred to as the
22'single-instance' mode and the current, single-instance semantics are
23preserved, i.e PTYs are common across the system.
24
25The only difference between this single-instance mode and the legacy mode
26is the presence of new, '/dev/pts/ptmx' node with permissions 0000, which
27can safely be ignored.
28
29If CONFIG_DEVPTS_MULTIPLE_INSTANCES=y and 'newinstance' option is specified,
30the mount is considered to be in the multi-instance mode and a new instance
31of the devpts fs is created. Any ptys created in this instance are independent
32of ptys in other instances of devpts. Like in the single-instance mode, the
33/dev/pts/ptmx node is present. To effectively use the multi-instance mode,
34open of /dev/ptmx must be a redirected to '/dev/pts/ptmx' using a symlink or
35bind-mount.
36
37Eg: A container startup script could do the following:
38
39 $ chmod 0666 /dev/pts/ptmx
40 $ rm /dev/ptmx
41 $ ln -s pts/ptmx /dev/ptmx
42 $ ns_exec -cm /bin/bash
43
44 # We are now in new container
45
46 $ umount /dev/pts
47 $ mount -t devpts -o newinstance lxcpts /dev/pts
48 $ sshd -p 1234
49
50where 'ns_exec -cm /bin/bash' calls clone() with CLONE_NEWNS flag and execs
51/bin/bash in the child process. A pty created by the sshd is not visible in
52the original mount of /dev/pts.
53
54User-space changes
55------------------
56
57In multi-instance mode (i.e '-o newinstance' mount option is specified at least
58once), following user-space issues should be noted.
59
601. If -o newinstance mount option is never used, /dev/pts/ptmx can be ignored
61 and no change is needed to system-startup scripts.
62
632. To effectively use multi-instance mode (i.e -o newinstance is specified)
64 administrators or startup scripts should "redirect" open of /dev/ptmx to
65 /dev/pts/ptmx using either a bind mount or symlink.
66
67 $ mount -t devpts -o newinstance devpts /dev/pts
68
69 followed by either
70
71 $ rm /dev/ptmx
72 $ ln -s pts/ptmx /dev/ptmx
73 $ chmod 666 /dev/pts/ptmx
74 or
75 $ mount -o bind /dev/pts/ptmx /dev/ptmx
76
773. The '/dev/ptmx -> pts/ptmx' symlink is the preferred method since it
78 enables better error-reporting and treats both single-instance and
79 multi-instance mounts similarly.
80
81 But this method requires that system-startup scripts set the mode of
82 /dev/pts/ptmx correctly (default mode is 0000). The scripts can set the
83 mode by, either
84
85 - adding ptmxmode mount option to devpts entry in /etc/fstab, or
86 - using 'chmod 0666 /dev/pts/ptmx'
87
884. If multi-instance mode mount is needed for containers, but the system
89 startup scripts have not yet been updated, container-startup scripts
90 should bind mount /dev/ptmx to /dev/pts/ptmx to avoid breaking single-
91 instance mounts.
92
93 Or, in general, container-startup scripts should use:
94
95 mount -t devpts -o newinstance -o ptmxmode=0666 devpts /dev/pts
96 if [ ! -L /dev/ptmx ]; then
97 mount -o bind /dev/pts/ptmx /dev/ptmx
98 fi
99
100 When all devpts mounts are multi-instance, /dev/ptmx can permanently be
101 a symlink to pts/ptmx and the bind mount can be ignored.
102
1035. A multi-instance mount that is not accompanied by the /dev/ptmx to
104 /dev/pts/ptmx redirection would result in an unusable/unreachable pty.
105
106 mount -t devpts -o newinstance lxcpts /dev/pts
107
108 immediately followed by:
109
110 open("/dev/ptmx")
111
112 would create a pty, say /dev/pts/7, in the initial kernel mount.
113 But /dev/pts/7 would be invisible in the new mount.
114
1156. The permissions for /dev/pts/ptmx node should be specified when mounting
116 /dev/pts, using the '-o ptmxmode=%o' mount option (default is 0000).
117
118 mount -t devpts -o newinstance -o ptmxmode=0644 devpts /dev/pts
119
120 The permissions can be later be changed as usual with 'chmod'.
121
122 chmod 666 /dev/pts/ptmx
123
1247. A mount of devpts without the 'newinstance' option results in binding to
125 initial kernel mount. This behavior while preserving legacy semantics,
126 does not provide strict isolation in a container environment. i.e by
127 mounting devpts without the 'newinstance' option, a container could
128 get visibility into the 'host' or root container's devpts.
129
130 To workaround this and have strict isolation, all mounts of devpts,
131 including the mount in the root container, should use the newinstance
132 option.
diff --git a/Documentation/filesystems/ext4.txt b/Documentation/filesystems/ext4.txt
index 174eaff7ded9..cec829bc7291 100644
--- a/Documentation/filesystems/ext4.txt
+++ b/Documentation/filesystems/ext4.txt
@@ -58,13 +58,22 @@ Note: More extensive information for getting started with ext4 can be
58 58
59 # mount -t ext4 /dev/hda1 /wherever 59 # mount -t ext4 /dev/hda1 /wherever
60 60
61 - When comparing performance with other filesystems, remember that 61 - When comparing performance with other filesystems, it's always
62 ext3/4 by default offers higher data integrity guarantees than most. 62 important to try multiple workloads; very often a subtle change in a
63 So when comparing with a metadata-only journalling filesystem, such 63 workload parameter can completely change the ranking of which
64 as ext3, use `mount -o data=writeback'. And you might as well use 64 filesystems do well compared to others. When comparing versus ext3,
65 `mount -o nobh' too along with it. Making the journal larger than 65 note that ext4 enables write barriers by default, while ext3 does
66 the mke2fs default often helps performance with metadata-intensive 66 not enable write barriers by default. So it is useful to use
67 workloads. 67 explicitly specify whether barriers are enabled or not when via the
68 '-o barriers=[0|1]' mount option for both ext3 and ext4 filesystems
69 for a fair comparison. When tuning ext3 for best benchmark numbers,
70 it is often worthwhile to try changing the data journaling mode; '-o
71 data=writeback,nobh' can be faster for some workloads. (Note
72 however that running mounted with data=writeback can potentially
73 leave stale data exposed in recently written files in case of an
74 unclean shutdown, which could be a security exposure in some
75 situations.) Configuring the filesystem with a large journal can
76 also be helpful for metadata-intensive workloads.
68 77
692. Features 782. Features
70=========== 79===========
@@ -74,7 +83,7 @@ Note: More extensive information for getting started with ext4 can be
74* ability to use filesystems > 16TB (e2fsprogs support not available yet) 83* ability to use filesystems > 16TB (e2fsprogs support not available yet)
75* extent format reduces metadata overhead (RAM, IO for access, transactions) 84* extent format reduces metadata overhead (RAM, IO for access, transactions)
76* extent format more robust in face of on-disk corruption due to magics, 85* extent format more robust in face of on-disk corruption due to magics,
77* internal redunancy in tree 86* internal redundancy in tree
78* improved file allocation (multi-block alloc) 87* improved file allocation (multi-block alloc)
79* fix 32000 subdirectory limit 88* fix 32000 subdirectory limit
80* nsec timestamps for mtime, atime, ctime, create time 89* nsec timestamps for mtime, atime, ctime, create time
@@ -116,10 +125,11 @@ grouping of bitmaps and inode tables. Some test results available here:
116When mounting an ext4 filesystem, the following option are accepted: 125When mounting an ext4 filesystem, the following option are accepted:
117(*) == default 126(*) == default
118 127
119extents (*) ext4 will use extents to address file data. The 128ro Mount filesystem read only. Note that ext4 will
120 file system will no longer be mountable by ext3. 129 replay the journal (and thus write to the
121 130 partition) even when mounted "read only". The
122noextents ext4 will not use extents for newly created files 131 mount options "ro,noload" can be used to prevent
132 writes to the filesystem.
123 133
124journal_checksum Enable checksumming of the journal transactions. 134journal_checksum Enable checksumming of the journal transactions.
125 This will allow the recovery code in e2fsck and the 135 This will allow the recovery code in e2fsck and the
@@ -134,17 +144,17 @@ journal_async_commit Commit block can be written to disk without waiting
134journal=update Update the ext4 file system's journal to the current 144journal=update Update the ext4 file system's journal to the current
135 format. 145 format.
136 146
137journal=inum When a journal already exists, this option is ignored.
138 Otherwise, it specifies the number of the inode which
139 will represent the ext4 file system's journal file.
140
141journal_dev=devnum When the external journal device's major/minor numbers 147journal_dev=devnum When the external journal device's major/minor numbers
142 have changed, this option allows the user to specify 148 have changed, this option allows the user to specify
143 the new journal location. The journal device is 149 the new journal location. The journal device is
144 identified through its new major/minor numbers encoded 150 identified through its new major/minor numbers encoded
145 in devnum. 151 in devnum.
146 152
147noload Don't load the journal on mounting. 153noload Don't load the journal on mounting. Note that
154 if the filesystem was not unmounted cleanly,
155 skipping the journal replay will lead to the
156 filesystem containing inconsistencies that can
157 lead to any number of problems.
148 158
149data=journal All data are committed into the journal prior to being 159data=journal All data are committed into the journal prior to being
150 written into the main file system. 160 written into the main file system.
@@ -219,9 +229,12 @@ minixdf Make 'df' act like Minix.
219 229
220debug Extra debugging information is sent to syslog. 230debug Extra debugging information is sent to syslog.
221 231
222errors=remount-ro(*) Remount the filesystem read-only on an error. 232errors=remount-ro Remount the filesystem read-only on an error.
223errors=continue Keep going on a filesystem error. 233errors=continue Keep going on a filesystem error.
224errors=panic Panic and halt the machine if an error occurs. 234errors=panic Panic and halt the machine if an error occurs.
235 (These mount options override the errors behavior
236 specified in the superblock, which can be configured
237 using tune2fs)
225 238
226data_err=ignore(*) Just print an error message if an error occurs 239data_err=ignore(*) Just print an error message if an error occurs
227 in a file data buffer in ordered mode. 240 in a file data buffer in ordered mode.
@@ -261,6 +274,42 @@ delalloc (*) Deferring block allocation until write-out time.
261nodelalloc Disable delayed allocation. Blocks are allocation 274nodelalloc Disable delayed allocation. Blocks are allocation
262 when data is copied from user to page cache. 275 when data is copied from user to page cache.
263 276
277max_batch_time=usec Maximum amount of time ext4 should wait for
278 additional filesystem operations to be batch
279 together with a synchronous write operation.
280 Since a synchronous write operation is going to
281 force a commit and then a wait for the I/O
282 complete, it doesn't cost much, and can be a
283 huge throughput win, we wait for a small amount
284 of time to see if any other transactions can
285 piggyback on the synchronous write. The
286 algorithm used is designed to automatically tune
287 for the speed of the disk, by measuring the
288 amount of time (on average) that it takes to
289 finish committing a transaction. Call this time
290 the "commit time". If the time that the
291 transactoin has been running is less than the
292 commit time, ext4 will try sleeping for the
293 commit time to see if other operations will join
294 the transaction. The commit time is capped by
295 the max_batch_time, which defaults to 15000us
296 (15ms). This optimization can be turned off
297 entirely by setting max_batch_time to 0.
298
299min_batch_time=usec This parameter sets the commit time (as
300 described above) to be at least min_batch_time.
301 It defaults to zero microseconds. Increasing
302 this parameter may improve the throughput of
303 multi-threaded, synchronous workloads on very
304 fast disks, at the cost of increasing latency.
305
306journal_ioprio=prio The I/O priority (from 0 to 7, where 0 is the
307 highest priorty) which should be used for I/O
308 operations submitted by kjournald2 during a
309 commit operation. This defaults to 3, which is
310 a slightly higher priority than the default I/O
311 priority.
312
264Data Mode 313Data Mode
265========= 314=========
266There are 3 different data modes: 315There are 3 different data modes:
diff --git a/Documentation/filesystems/files.txt b/Documentation/filesystems/files.txt
index bb0142f61084..ac2facc50d2a 100644
--- a/Documentation/filesystems/files.txt
+++ b/Documentation/filesystems/files.txt
@@ -76,13 +76,13 @@ the fdtable structure -
765. Handling of the file structures is special. Since the look-up 765. Handling of the file structures is special. Since the look-up
77 of the fd (fget()/fget_light()) are lock-free, it is possible 77 of the fd (fget()/fget_light()) are lock-free, it is possible
78 that look-up may race with the last put() operation on the 78 that look-up may race with the last put() operation on the
79 file structure. This is avoided using atomic_inc_not_zero() 79 file structure. This is avoided using atomic_long_inc_not_zero()
80 on ->f_count : 80 on ->f_count :
81 81
82 rcu_read_lock(); 82 rcu_read_lock();
83 file = fcheck_files(files, fd); 83 file = fcheck_files(files, fd);
84 if (file) { 84 if (file) {
85 if (atomic_inc_not_zero(&file->f_count)) 85 if (atomic_long_inc_not_zero(&file->f_count))
86 *fput_needed = 1; 86 *fput_needed = 1;
87 else 87 else
88 /* Didn't get the reference, someone's freed */ 88 /* Didn't get the reference, someone's freed */
@@ -92,7 +92,7 @@ the fdtable structure -
92 .... 92 ....
93 return file; 93 return file;
94 94
95 atomic_inc_not_zero() detects if refcounts is already zero or 95 atomic_long_inc_not_zero() detects if refcounts is already zero or
96 goes to zero during increment. If it does, we fail 96 goes to zero during increment. If it does, we fail
97 fget()/fget_light(). 97 fget()/fget_light().
98 98
diff --git a/Documentation/filesystems/nfs-rdma.txt b/Documentation/filesystems/nfs-rdma.txt
index 44bd766f2e5d..85eaeaddd27c 100644
--- a/Documentation/filesystems/nfs-rdma.txt
+++ b/Documentation/filesystems/nfs-rdma.txt
@@ -251,7 +251,7 @@ NFS/RDMA Setup
251 251
252 Instruct the server to listen on the RDMA transport: 252 Instruct the server to listen on the RDMA transport:
253 253
254 $ echo rdma 2050 > /proc/fs/nfsd/portlist 254 $ echo rdma 20049 > /proc/fs/nfsd/portlist
255 255
256 - On the client system 256 - On the client system
257 257
@@ -263,7 +263,7 @@ NFS/RDMA Setup
263 Regardless of how the client was built (module or built-in), use this 263 Regardless of how the client was built (module or built-in), use this
264 command to mount the NFS/RDMA server: 264 command to mount the NFS/RDMA server:
265 265
266 $ mount -o rdma,port=2050 <IPoIB-server-name-or-address>:/<export> /mnt 266 $ mount -o rdma,port=20049 <IPoIB-server-name-or-address>:/<export> /mnt
267 267
268 To verify that the mount is using RDMA, run "cat /proc/mounts" and check 268 To verify that the mount is using RDMA, run "cat /proc/mounts" and check
269 the "proto" field for the given mount. 269 the "proto" field for the given mount.
diff --git a/Documentation/filesystems/ocfs2.txt b/Documentation/filesystems/ocfs2.txt
index 67310fbbb7df..c2a0871280a0 100644
--- a/Documentation/filesystems/ocfs2.txt
+++ b/Documentation/filesystems/ocfs2.txt
@@ -31,7 +31,6 @@ Features which OCFS2 does not support yet:
31 - quotas 31 - quotas
32 - Directory change notification (F_NOTIFY) 32 - Directory change notification (F_NOTIFY)
33 - Distributed Caching (F_SETLEASE/F_GETLEASE/break_lease) 33 - Distributed Caching (F_SETLEASE/F_GETLEASE/break_lease)
34 - POSIX ACLs
35 34
36Mount options 35Mount options
37============= 36=============
@@ -79,3 +78,5 @@ inode64 Indicates that Ocfs2 is allowed to create inodes at
79 bits of significance. 78 bits of significance.
80user_xattr (*) Enables Extended User Attributes. 79user_xattr (*) Enables Extended User Attributes.
81nouser_xattr Disables Extended User Attributes. 80nouser_xattr Disables Extended User Attributes.
81acl Enables POSIX Access Control Lists support.
82noacl (*) Disables POSIX Access Control Lists support.
diff --git a/Documentation/filesystems/proc.txt b/Documentation/filesystems/proc.txt
index 71df353e367c..a87be42f8211 100644
--- a/Documentation/filesystems/proc.txt
+++ b/Documentation/filesystems/proc.txt
@@ -140,6 +140,7 @@ Table 1-1: Process specific entries in /proc
140 statm Process memory status information 140 statm Process memory status information
141 status Process status in human readable form 141 status Process status in human readable form
142 wchan If CONFIG_KALLSYMS is set, a pre-decoded wchan 142 wchan If CONFIG_KALLSYMS is set, a pre-decoded wchan
143 stack Report full stack trace, enable via CONFIG_STACKTRACE
143 smaps Extension based on maps, the rss size for each mapped file 144 smaps Extension based on maps, the rss size for each mapped file
144.............................................................................. 145..............................................................................
145 146
@@ -1370,268 +1371,8 @@ auto_msgmni default value is 1.
13702.4 /proc/sys/vm - The virtual memory subsystem 13712.4 /proc/sys/vm - The virtual memory subsystem
1371----------------------------------------------- 1372-----------------------------------------------
1372 1373
1373The files in this directory can be used to tune the operation of the virtual 1374Please see: Documentation/sysctls/vm.txt for a description of these
1374memory (VM) subsystem of the Linux kernel. 1375entries.
1375
1376vfs_cache_pressure
1377------------------
1378
1379Controls the tendency of the kernel to reclaim the memory which is used for
1380caching of directory and inode objects.
1381
1382At the default value of vfs_cache_pressure=100 the kernel will attempt to
1383reclaim dentries and inodes at a "fair" rate with respect to pagecache and
1384swapcache reclaim. Decreasing vfs_cache_pressure causes the kernel to prefer
1385to retain dentry and inode caches. Increasing vfs_cache_pressure beyond 100
1386causes the kernel to prefer to reclaim dentries and inodes.
1387
1388dirty_background_ratio
1389----------------------
1390
1391Contains, as a percentage of the dirtyable system memory (free pages + mapped
1392pages + file cache, not including locked pages and HugePages), the number of
1393pages at which the pdflush background writeback daemon will start writing out
1394dirty data.
1395
1396dirty_ratio
1397-----------------
1398
1399Contains, as a percentage of the dirtyable system memory (free pages + mapped
1400pages + file cache, not including locked pages and HugePages), the number of
1401pages at which a process which is generating disk writes will itself start
1402writing out dirty data.
1403
1404dirty_writeback_centisecs
1405-------------------------
1406
1407The pdflush writeback daemons will periodically wake up and write `old' data
1408out to disk. This tunable expresses the interval between those wakeups, in
1409100'ths of a second.
1410
1411Setting this to zero disables periodic writeback altogether.
1412
1413dirty_expire_centisecs
1414----------------------
1415
1416This tunable is used to define when dirty data is old enough to be eligible
1417for writeout by the pdflush daemons. It is expressed in 100'ths of a second.
1418Data which has been dirty in-memory for longer than this interval will be
1419written out next time a pdflush daemon wakes up.
1420
1421highmem_is_dirtyable
1422--------------------
1423
1424Only present if CONFIG_HIGHMEM is set.
1425
1426This defaults to 0 (false), meaning that the ratios set above are calculated
1427as a percentage of lowmem only. This protects against excessive scanning
1428in page reclaim, swapping and general VM distress.
1429
1430Setting this to 1 can be useful on 32 bit machines where you want to make
1431random changes within an MMAPed file that is larger than your available
1432lowmem without causing large quantities of random IO. Is is safe if the
1433behavior of all programs running on the machine is known and memory will
1434not be otherwise stressed.
1435
1436legacy_va_layout
1437----------------
1438
1439If non-zero, this sysctl disables the new 32-bit mmap mmap layout - the kernel
1440will use the legacy (2.4) layout for all processes.
1441
1442lowmem_reserve_ratio
1443---------------------
1444
1445For some specialised workloads on highmem machines it is dangerous for
1446the kernel to allow process memory to be allocated from the "lowmem"
1447zone. This is because that memory could then be pinned via the mlock()
1448system call, or by unavailability of swapspace.
1449
1450And on large highmem machines this lack of reclaimable lowmem memory
1451can be fatal.
1452
1453So the Linux page allocator has a mechanism which prevents allocations
1454which _could_ use highmem from using too much lowmem. This means that
1455a certain amount of lowmem is defended from the possibility of being
1456captured into pinned user memory.
1457
1458(The same argument applies to the old 16 megabyte ISA DMA region. This
1459mechanism will also defend that region from allocations which could use
1460highmem or lowmem).
1461
1462The `lowmem_reserve_ratio' tunable determines how aggressive the kernel is
1463in defending these lower zones.
1464
1465If you have a machine which uses highmem or ISA DMA and your
1466applications are using mlock(), or if you are running with no swap then
1467you probably should change the lowmem_reserve_ratio setting.
1468
1469The lowmem_reserve_ratio is an array. You can see them by reading this file.
1470-
1471% cat /proc/sys/vm/lowmem_reserve_ratio
1472256 256 32
1473-
1474Note: # of this elements is one fewer than number of zones. Because the highest
1475 zone's value is not necessary for following calculation.
1476
1477But, these values are not used directly. The kernel calculates # of protection
1478pages for each zones from them. These are shown as array of protection pages
1479in /proc/zoneinfo like followings. (This is an example of x86-64 box).
1480Each zone has an array of protection pages like this.
1481
1482-
1483Node 0, zone DMA
1484 pages free 1355
1485 min 3
1486 low 3
1487 high 4
1488 :
1489 :
1490 numa_other 0
1491 protection: (0, 2004, 2004, 2004)
1492 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1493 pagesets
1494 cpu: 0 pcp: 0
1495 :
1496-
1497These protections are added to score to judge whether this zone should be used
1498for page allocation or should be reclaimed.
1499
1500In this example, if normal pages (index=2) are required to this DMA zone and
1501pages_high is used for watermark, the kernel judges this zone should not be
1502used because pages_free(1355) is smaller than watermark + protection[2]
1503(4 + 2004 = 2008). If this protection value is 0, this zone would be used for
1504normal page requirement. If requirement is DMA zone(index=0), protection[0]
1505(=0) is used.
1506
1507zone[i]'s protection[j] is calculated by following expression.
1508
1509(i < j):
1510 zone[i]->protection[j]
1511 = (total sums of present_pages from zone[i+1] to zone[j] on the node)
1512 / lowmem_reserve_ratio[i];
1513(i = j):
1514 (should not be protected. = 0;
1515(i > j):
1516 (not necessary, but looks 0)
1517
1518The default values of lowmem_reserve_ratio[i] are
1519 256 (if zone[i] means DMA or DMA32 zone)
1520 32 (others).
1521As above expression, they are reciprocal number of ratio.
1522256 means 1/256. # of protection pages becomes about "0.39%" of total present
1523pages of higher zones on the node.
1524
1525If you would like to protect more pages, smaller values are effective.
1526The minimum value is 1 (1/1 -> 100%).
1527
1528page-cluster
1529------------
1530
1531page-cluster controls the number of pages which are written to swap in
1532a single attempt. The swap I/O size.
1533
1534It is a logarithmic value - setting it to zero means "1 page", setting
1535it to 1 means "2 pages", setting it to 2 means "4 pages", etc.
1536
1537The default value is three (eight pages at a time). There may be some
1538small benefits in tuning this to a different value if your workload is
1539swap-intensive.
1540
1541overcommit_memory
1542-----------------
1543
1544Controls overcommit of system memory, possibly allowing processes
1545to allocate (but not use) more memory than is actually available.
1546
1547
15480 - Heuristic overcommit handling. Obvious overcommits of
1549 address space are refused. Used for a typical system. It
1550 ensures a seriously wild allocation fails while allowing
1551 overcommit to reduce swap usage. root is allowed to
1552 allocate slightly more memory in this mode. This is the
1553 default.
1554
15551 - Always overcommit. Appropriate for some scientific
1556 applications.
1557
15582 - Don't overcommit. The total address space commit
1559 for the system is not permitted to exceed swap plus a
1560 configurable percentage (default is 50) of physical RAM.
1561 Depending on the percentage you use, in most situations
1562 this means a process will not be killed while attempting
1563 to use already-allocated memory but will receive errors
1564 on memory allocation as appropriate.
1565
1566overcommit_ratio
1567----------------
1568
1569Percentage of physical memory size to include in overcommit calculations
1570(see above.)
1571
1572Memory allocation limit = swapspace + physmem * (overcommit_ratio / 100)
1573
1574 swapspace = total size of all swap areas
1575 physmem = size of physical memory in system
1576
1577nr_hugepages and hugetlb_shm_group
1578----------------------------------
1579
1580nr_hugepages configures number of hugetlb page reserved for the system.
1581
1582hugetlb_shm_group contains group id that is allowed to create SysV shared
1583memory segment using hugetlb page.
1584
1585hugepages_treat_as_movable
1586--------------------------
1587
1588This parameter is only useful when kernelcore= is specified at boot time to
1589create ZONE_MOVABLE for pages that may be reclaimed or migrated. Huge pages
1590are not movable so are not normally allocated from ZONE_MOVABLE. A non-zero
1591value written to hugepages_treat_as_movable allows huge pages to be allocated
1592from ZONE_MOVABLE.
1593
1594Once enabled, the ZONE_MOVABLE is treated as an area of memory the huge
1595pages pool can easily grow or shrink within. Assuming that applications are
1596not running that mlock() a lot of memory, it is likely the huge pages pool
1597can grow to the size of ZONE_MOVABLE by repeatedly entering the desired value
1598into nr_hugepages and triggering page reclaim.
1599
1600laptop_mode
1601-----------
1602
1603laptop_mode is a knob that controls "laptop mode". All the things that are
1604controlled by this knob are discussed in Documentation/laptops/laptop-mode.txt.
1605
1606block_dump
1607----------
1608
1609block_dump enables block I/O debugging when set to a nonzero value. More
1610information on block I/O debugging is in Documentation/laptops/laptop-mode.txt.
1611
1612swap_token_timeout
1613------------------
1614
1615This file contains valid hold time of swap out protection token. The Linux
1616VM has token based thrashing control mechanism and uses the token to prevent
1617unnecessary page faults in thrashing situation. The unit of the value is
1618second. The value would be useful to tune thrashing behavior.
1619
1620drop_caches
1621-----------
1622
1623Writing to this will cause the kernel to drop clean caches, dentries and
1624inodes from memory, causing that memory to become free.
1625
1626To free pagecache:
1627 echo 1 > /proc/sys/vm/drop_caches
1628To free dentries and inodes:
1629 echo 2 > /proc/sys/vm/drop_caches
1630To free pagecache, dentries and inodes:
1631 echo 3 > /proc/sys/vm/drop_caches
1632
1633As this is a non-destructive operation and dirty objects are not freeable, the
1634user should run `sync' first.
1635 1376
1636 1377
16372.5 /proc/sys/dev - Device specific parameters 13782.5 /proc/sys/dev - Device specific parameters
@@ -2286,6 +2027,34 @@ increase the likelihood of this process being killed by the oom-killer. Valid
2286values are in the range -16 to +15, plus the special value -17, which disables 2027values are in the range -16 to +15, plus the special value -17, which disables
2287oom-killing altogether for this process. 2028oom-killing altogether for this process.
2288 2029
2030The process to be killed in an out-of-memory situation is selected among all others
2031based on its badness score. This value equals the original memory size of the process
2032and is then updated according to its CPU time (utime + stime) and the
2033run time (uptime - start time). The longer it runs the smaller is the score.
2034Badness score is divided by the square root of the CPU time and then by
2035the double square root of the run time.
2036
2037Swapped out tasks are killed first. Half of each child's memory size is added to
2038the parent's score if they do not share the same memory. Thus forking servers
2039are the prime candidates to be killed. Having only one 'hungry' child will make
2040parent less preferable than the child.
2041
2042/proc/<pid>/oom_score shows process' current badness score.
2043
2044The following heuristics are then applied:
2045 * if the task was reniced, its score doubles
2046 * superuser or direct hardware access tasks (CAP_SYS_ADMIN, CAP_SYS_RESOURCE
2047 or CAP_SYS_RAWIO) have their score divided by 4
2048 * if oom condition happened in one cpuset and checked task does not belong
2049 to it, its score is divided by 8
2050 * the resulting score is multiplied by two to the power of oom_adj, i.e.
2051 points <<= oom_adj when it is positive and
2052 points >>= -(oom_adj) otherwise
2053
2054The task with the highest badness score is then selected and its children
2055are killed, process itself will be killed in an OOM situation when it does
2056not have children or some of them disabled oom like described above.
2057
22892.13 /proc/<pid>/oom_score - Display current oom-killer score 20582.13 /proc/<pid>/oom_score - Display current oom-killer score
2290------------------------------------------------------------- 2059-------------------------------------------------------------
2291 2060
diff --git a/Documentation/filesystems/squashfs.txt b/Documentation/filesystems/squashfs.txt
new file mode 100644
index 000000000000..3e79e4a7a392
--- /dev/null
+++ b/Documentation/filesystems/squashfs.txt
@@ -0,0 +1,225 @@
1SQUASHFS 4.0 FILESYSTEM
2=======================
3
4Squashfs is a compressed read-only filesystem for Linux.
5It uses zlib compression to compress files, inodes and directories.
6Inodes in the system are very small and all blocks are packed to minimise
7data overhead. Block sizes greater than 4K are supported up to a maximum
8of 1Mbytes (default block size 128K).
9
10Squashfs is intended for general read-only filesystem use, for archival
11use (i.e. in cases where a .tar.gz file may be used), and in constrained
12block device/memory systems (e.g. embedded systems) where low overhead is
13needed.
14
15Mailing list: squashfs-devel@lists.sourceforge.net
16Web site: www.squashfs.org
17
181. FILESYSTEM FEATURES
19----------------------
20
21Squashfs filesystem features versus Cramfs:
22
23 Squashfs Cramfs
24
25Max filesystem size: 2^64 16 MiB
26Max file size: ~ 2 TiB 16 MiB
27Max files: unlimited unlimited
28Max directories: unlimited unlimited
29Max entries per directory: unlimited unlimited
30Max block size: 1 MiB 4 KiB
31Metadata compression: yes no
32Directory indexes: yes no
33Sparse file support: yes no
34Tail-end packing (fragments): yes no
35Exportable (NFS etc.): yes no
36Hard link support: yes no
37"." and ".." in readdir: yes no
38Real inode numbers: yes no
3932-bit uids/gids: yes no
40File creation time: yes no
41Xattr and ACL support: no no
42
43Squashfs compresses data, inodes and directories. In addition, inode and
44directory data are highly compacted, and packed on byte boundaries. Each
45compressed inode is on average 8 bytes in length (the exact length varies on
46file type, i.e. regular file, directory, symbolic link, and block/char device
47inodes have different sizes).
48
492. USING SQUASHFS
50-----------------
51
52As squashfs is a read-only filesystem, the mksquashfs program must be used to
53create populated squashfs filesystems. This and other squashfs utilities
54can be obtained from http://www.squashfs.org. Usage instructions can be
55obtained from this site also.
56
57
583. SQUASHFS FILESYSTEM DESIGN
59-----------------------------
60
61A squashfs filesystem consists of seven parts, packed together on a byte
62alignment:
63
64 ---------------
65 | superblock |
66 |---------------|
67 | datablocks |
68 | & fragments |
69 |---------------|
70 | inode table |
71 |---------------|
72 | directory |
73 | table |
74 |---------------|
75 | fragment |
76 | table |
77 |---------------|
78 | export |
79 | table |
80 |---------------|
81 | uid/gid |
82 | lookup table |
83 ---------------
84
85Compressed data blocks are written to the filesystem as files are read from
86the source directory, and checked for duplicates. Once all file data has been
87written the completed inode, directory, fragment, export and uid/gid lookup
88tables are written.
89
903.1 Inodes
91----------
92
93Metadata (inodes and directories) are compressed in 8Kbyte blocks. Each
94compressed block is prefixed by a two byte length, the top bit is set if the
95block is uncompressed. A block will be uncompressed if the -noI option is set,
96or if the compressed block was larger than the uncompressed block.
97
98Inodes are packed into the metadata blocks, and are not aligned to block
99boundaries, therefore inodes overlap compressed blocks. Inodes are identified
100by a 48-bit number which encodes the location of the compressed metadata block
101containing the inode, and the byte offset into that block where the inode is
102placed (<block, offset>).
103
104To maximise compression there are different inodes for each file type
105(regular file, directory, device, etc.), the inode contents and length
106varying with the type.
107
108To further maximise compression, two types of regular file inode and
109directory inode are defined: inodes optimised for frequently occurring
110regular files and directories, and extended types where extra
111information has to be stored.
112
1133.2 Directories
114---------------
115
116Like inodes, directories are packed into compressed metadata blocks, stored
117in a directory table. Directories are accessed using the start address of
118the metablock containing the directory and the offset into the
119decompressed block (<block, offset>).
120
121Directories are organised in a slightly complex way, and are not simply
122a list of file names. The organisation takes advantage of the
123fact that (in most cases) the inodes of the files will be in the same
124compressed metadata block, and therefore, can share the start block.
125Directories are therefore organised in a two level list, a directory
126header containing the shared start block value, and a sequence of directory
127entries, each of which share the shared start block. A new directory header
128is written once/if the inode start block changes. The directory
129header/directory entry list is repeated as many times as necessary.
130
131Directories are sorted, and can contain a directory index to speed up
132file lookup. Directory indexes store one entry per metablock, each entry
133storing the index/filename mapping to the first directory header
134in each metadata block. Directories are sorted in alphabetical order,
135and at lookup the index is scanned linearly looking for the first filename
136alphabetically larger than the filename being looked up. At this point the
137location of the metadata block the filename is in has been found.
138The general idea of the index is ensure only one metadata block needs to be
139decompressed to do a lookup irrespective of the length of the directory.
140This scheme has the advantage that it doesn't require extra memory overhead
141and doesn't require much extra storage on disk.
142
1433.3 File data
144-------------
145
146Regular files consist of a sequence of contiguous compressed blocks, and/or a
147compressed fragment block (tail-end packed block). The compressed size
148of each datablock is stored in a block list contained within the
149file inode.
150
151To speed up access to datablocks when reading 'large' files (256 Mbytes or
152larger), the code implements an index cache that caches the mapping from
153block index to datablock location on disk.
154
155The index cache allows Squashfs to handle large files (up to 1.75 TiB) while
156retaining a simple and space-efficient block list on disk. The cache
157is split into slots, caching up to eight 224 GiB files (128 KiB blocks).
158Larger files use multiple slots, with 1.75 TiB files using all 8 slots.
159The index cache is designed to be memory efficient, and by default uses
16016 KiB.
161
1623.4 Fragment lookup table
163-------------------------
164
165Regular files can contain a fragment index which is mapped to a fragment
166location on disk and compressed size using a fragment lookup table. This
167fragment lookup table is itself stored compressed into metadata blocks.
168A second index table is used to locate these. This second index table for
169speed of access (and because it is small) is read at mount time and cached
170in memory.
171
1723.5 Uid/gid lookup table
173------------------------
174
175For space efficiency regular files store uid and gid indexes, which are
176converted to 32-bit uids/gids using an id look up table. This table is
177stored compressed into metadata blocks. A second index table is used to
178locate these. This second index table for speed of access (and because it
179is small) is read at mount time and cached in memory.
180
1813.6 Export table
182----------------
183
184To enable Squashfs filesystems to be exportable (via NFS etc.) filesystems
185can optionally (disabled with the -no-exports Mksquashfs option) contain
186an inode number to inode disk location lookup table. This is required to
187enable Squashfs to map inode numbers passed in filehandles to the inode
188location on disk, which is necessary when the export code reinstantiates
189expired/flushed inodes.
190
191This table is stored compressed into metadata blocks. A second index table is
192used to locate these. This second index table for speed of access (and because
193it is small) is read at mount time and cached in memory.
194
195
1964. TODOS AND OUTSTANDING ISSUES
197-------------------------------
198
1994.1 Todo list
200-------------
201
202Implement Xattr and ACL support. The Squashfs 4.0 filesystem layout has hooks
203for these but the code has not been written. Once the code has been written
204the existing layout should not require modification.
205
2064.2 Squashfs internal cache
207---------------------------
208
209Blocks in Squashfs are compressed. To avoid repeatedly decompressing
210recently accessed data Squashfs uses two small metadata and fragment caches.
211
212The cache is not used for file datablocks, these are decompressed and cached in
213the page-cache in the normal way. The cache is used to temporarily cache
214fragment and metadata blocks which have been read as a result of a metadata
215(i.e. inode or directory) or fragment access. Because metadata and fragments
216are packed together into blocks (to gain greater compression) the read of a
217particular piece of metadata or fragment will retrieve other metadata/fragments
218which have been packed with it, these because of locality-of-reference may be
219read in the near future. Temporarily caching them ensures they are available
220for near future access without requiring an additional read and decompress.
221
222In the future this internal cache may be replaced with an implementation which
223uses the kernel page cache. Because the page cache operates on page sized
224units this may introduce additional complexity in terms of locking and
225associated race conditions.
diff --git a/Documentation/filesystems/ubifs.txt b/Documentation/filesystems/ubifs.txt
index dd84ea3c10da..12fedb7834c6 100644
--- a/Documentation/filesystems/ubifs.txt
+++ b/Documentation/filesystems/ubifs.txt
@@ -79,13 +79,6 @@ Mount options
79 79
80(*) == default. 80(*) == default.
81 81
82norm_unmount (*) commit on unmount; the journal is committed
83 when the file-system is unmounted so that the
84 next mount does not have to replay the journal
85 and it becomes very fast;
86fast_unmount do not commit on unmount; this option makes
87 unmount faster, but the next mount slower
88 because of the need to replay the journal.
89bulk_read read more in one go to take advantage of flash 82bulk_read read more in one go to take advantage of flash
90 media that read faster sequentially 83 media that read faster sequentially
91no_bulk_read (*) do not bulk-read 84no_bulk_read (*) do not bulk-read
@@ -95,6 +88,9 @@ no_chk_data_crc skip checking of CRCs on data nodes in order to
95 of this option is that corruption of the contents 88 of this option is that corruption of the contents
96 of a file can go unnoticed. 89 of a file can go unnoticed.
97chk_data_crc (*) do not skip checking CRCs on data nodes 90chk_data_crc (*) do not skip checking CRCs on data nodes
91compr=none override default compressor and set it to "none"
92compr=lzo override default compressor and set it to "lzo"
93compr=zlib override default compressor and set it to "zlib"
98 94
99 95
100Quick usage instructions 96Quick usage instructions
diff --git a/Documentation/filesystems/vfs.txt b/Documentation/filesystems/vfs.txt
index 5579bda58a6d..deeeed0faa8f 100644
--- a/Documentation/filesystems/vfs.txt
+++ b/Documentation/filesystems/vfs.txt
@@ -210,8 +210,8 @@ struct super_operations {
210 void (*put_super) (struct super_block *); 210 void (*put_super) (struct super_block *);
211 void (*write_super) (struct super_block *); 211 void (*write_super) (struct super_block *);
212 int (*sync_fs)(struct super_block *sb, int wait); 212 int (*sync_fs)(struct super_block *sb, int wait);
213 void (*write_super_lockfs) (struct super_block *); 213 int (*freeze_fs) (struct super_block *);
214 void (*unlockfs) (struct super_block *); 214 int (*unfreeze_fs) (struct super_block *);
215 int (*statfs) (struct dentry *, struct kstatfs *); 215 int (*statfs) (struct dentry *, struct kstatfs *);
216 int (*remount_fs) (struct super_block *, int *, char *); 216 int (*remount_fs) (struct super_block *, int *, char *);
217 void (*clear_inode) (struct inode *); 217 void (*clear_inode) (struct inode *);
@@ -270,11 +270,11 @@ or bottom half).
270 a superblock. The second parameter indicates whether the method 270 a superblock. The second parameter indicates whether the method
271 should wait until the write out has been completed. Optional. 271 should wait until the write out has been completed. Optional.
272 272
273 write_super_lockfs: called when VFS is locking a filesystem and 273 freeze_fs: called when VFS is locking a filesystem and
274 forcing it into a consistent state. This method is currently 274 forcing it into a consistent state. This method is currently
275 used by the Logical Volume Manager (LVM). 275 used by the Logical Volume Manager (LVM).
276 276
277 unlockfs: called when VFS is unlocking a filesystem and making it writable 277 unfreeze_fs: called when VFS is unlocking a filesystem and making it writable
278 again. 278 again.
279 279
280 statfs: called when the VFS needs to get filesystem statistics. This 280 statfs: called when the VFS needs to get filesystem statistics. This
@@ -733,7 +733,6 @@ struct file_operations {
733 ssize_t (*sendpage) (struct file *, struct page *, int, size_t, loff_t *, int); 733 ssize_t (*sendpage) (struct file *, struct page *, int, size_t, loff_t *, int);
734 unsigned long (*get_unmapped_area)(struct file *, unsigned long, unsigned long, unsigned long, unsigned long); 734 unsigned long (*get_unmapped_area)(struct file *, unsigned long, unsigned long, unsigned long, unsigned long);
735 int (*check_flags)(int); 735 int (*check_flags)(int);
736 int (*dir_notify)(struct file *filp, unsigned long arg);
737 int (*flock) (struct file *, int, struct file_lock *); 736 int (*flock) (struct file *, int, struct file_lock *);
738 ssize_t (*splice_write)(struct pipe_inode_info *, struct file *, size_t, unsigned int); 737 ssize_t (*splice_write)(struct pipe_inode_info *, struct file *, size_t, unsigned int);
739 ssize_t (*splice_read)(struct file *, struct pipe_inode_info *, size_t, unsigned int); 738 ssize_t (*splice_read)(struct file *, struct pipe_inode_info *, size_t, unsigned int);
@@ -800,8 +799,6 @@ otherwise noted.
800 799
801 check_flags: called by the fcntl(2) system call for F_SETFL command 800 check_flags: called by the fcntl(2) system call for F_SETFL command
802 801
803 dir_notify: called by the fcntl(2) system call for F_NOTIFY command
804
805 flock: called by the flock(2) system call 802 flock: called by the flock(2) system call
806 803
807 splice_write: called by the VFS to splice data from a pipe to a file. This 804 splice_write: called by the VFS to splice data from a pipe to a file. This
@@ -931,7 +928,7 @@ manipulate dentries:
931 d_lookup: look up a dentry given its parent and path name component 928 d_lookup: look up a dentry given its parent and path name component
932 It looks up the child of that given name from the dcache 929 It looks up the child of that given name from the dcache
933 hash table. If it is found, the reference count is incremented 930 hash table. If it is found, the reference count is incremented
934 and the dentry is returned. The caller must use d_put() 931 and the dentry is returned. The caller must use dput()
935 to free the dentry when it finishes using it. 932 to free the dentry when it finishes using it.
936 933
937For further information on dentry locking, please refer to the document 934For further information on dentry locking, please refer to the document
diff --git a/Documentation/hwmon/abituguru-datasheet b/Documentation/hwmon/abituguru-datasheet
index aef5a9b36846..d9251efdcec7 100644
--- a/Documentation/hwmon/abituguru-datasheet
+++ b/Documentation/hwmon/abituguru-datasheet
@@ -74,7 +74,7 @@ a sensor.
74Notice that some banks have both a read and a write address this is how the 74Notice that some banks have both a read and a write address this is how the
75uGuru determines if a read from or a write to the bank is taking place, thus 75uGuru determines if a read from or a write to the bank is taking place, thus
76when reading you should always use the read address and when writing the 76when reading you should always use the read address and when writing the
77write address. The write address is always one (1) more then the read address. 77write address. The write address is always one (1) more than the read address.
78 78
79 79
80uGuru ready 80uGuru ready
@@ -121,7 +121,7 @@ Once all bytes have been read data will hold 0x09, but there is no reason to
121test for this. Notice that the number of bytes is bank address dependent see 121test for this. Notice that the number of bytes is bank address dependent see
122above and below. 122above and below.
123 123
124After completing a successfull read it is advised to put the uGuru back in 124After completing a successful read it is advised to put the uGuru back in
125ready mode, so that it is ready for the next read / write cycle. This way 125ready mode, so that it is ready for the next read / write cycle. This way
126if your program / driver is unloaded and later loaded again the detection 126if your program / driver is unloaded and later loaded again the detection
127algorithm described above will still work. 127algorithm described above will still work.
@@ -141,7 +141,7 @@ don't ask why this is the way it is.
141 141
142Once DATA holds 0x01 read CMD it should hold 0xAC now. 142Once DATA holds 0x01 read CMD it should hold 0xAC now.
143 143
144After completing a successfull write it is advised to put the uGuru back in 144After completing a successful write it is advised to put the uGuru back in
145ready mode, so that it is ready for the next read / write cycle. This way 145ready mode, so that it is ready for the next read / write cycle. This way
146if your program / driver is unloaded and later loaded again the detection 146if your program / driver is unloaded and later loaded again the detection
147algorithm described above will still work. 147algorithm described above will still work.
@@ -224,7 +224,7 @@ Bit 3: Beep if alarm (RW)
224Bit 4: 1 if alarm cause measured temp is over the warning threshold (R) 224Bit 4: 1 if alarm cause measured temp is over the warning threshold (R)
225Bit 5: 1 if alarm cause measured volt is over the max threshold (R) 225Bit 5: 1 if alarm cause measured volt is over the max threshold (R)
226Bit 6: 1 if alarm cause measured volt is under the min threshold (R) 226Bit 6: 1 if alarm cause measured volt is under the min threshold (R)
227Bit 7: Volt sensor: Shutdown if alarm persist for more then 4 seconds (RW) 227Bit 7: Volt sensor: Shutdown if alarm persist for more than 4 seconds (RW)
228 Temp sensor: Shutdown if temp is over the shutdown threshold (RW) 228 Temp sensor: Shutdown if temp is over the shutdown threshold (RW)
229 229
230* This bit is only honored/used by the uGuru if a temp sensor is connected 230* This bit is only honored/used by the uGuru if a temp sensor is connected
@@ -293,7 +293,7 @@ Byte 0:
293Alarm behaviour for the selected sensor. A 1 enables the described behaviour. 293Alarm behaviour for the selected sensor. A 1 enables the described behaviour.
294Bit 0: Give an alarm if measured rpm is under the min threshold (RW) 294Bit 0: Give an alarm if measured rpm is under the min threshold (RW)
295Bit 3: Beep if alarm (RW) 295Bit 3: Beep if alarm (RW)
296Bit 7: Shutdown if alarm persist for more then 4 seconds (RW) 296Bit 7: Shutdown if alarm persist for more than 4 seconds (RW)
297 297
298Byte 1: 298Byte 1:
299min threshold (scale as bank 0x26) 299min threshold (scale as bank 0x26)
diff --git a/Documentation/hwmon/adt7470 b/Documentation/hwmon/adt7470
index 75d13ca147cc..8ce4aa0a0f55 100644
--- a/Documentation/hwmon/adt7470
+++ b/Documentation/hwmon/adt7470
@@ -31,15 +31,11 @@ Each of the measured inputs (temperature, fan speed) has corresponding high/low
31limit values. The ADT7470 will signal an ALARM if any measured value exceeds 31limit values. The ADT7470 will signal an ALARM if any measured value exceeds
32either limit. 32either limit.
33 33
34The ADT7470 DOES NOT sample all inputs continuously. A single pin on the 34The ADT7470 samples all inputs continuously. A kernel thread is started up for
35ADT7470 is connected to a multitude of thermal diodes, but the chip must be 35the purpose of periodically querying the temperature sensors, thus allowing the
36instructed explicitly to read the multitude of diodes. If you want to use 36automatic fan pwm control to set the fan speed. The driver will not read the
37automatic fan control mode, you must manually read any of the temperature 37registers more often than once every 5 seconds. Further, configuration data is
38sensors or the fan control algorithm will not run. The chip WILL NOT DO THIS 38only read once per minute.
39AUTOMATICALLY; this must be done from userspace. This may be a bug in the chip
40design, given that many other AD chips take care of this. The driver will not
41read the registers more often than once every 5 seconds. Further,
42configuration data is only read once per minute.
43 39
44Special Features 40Special Features
45---------------- 41----------------
@@ -72,5 +68,6 @@ pwm#_auto_point2_temp.
72Notes 68Notes
73----- 69-----
74 70
75As stated above, the temperature inputs must be read periodically from 71The temperature inputs no longer need to be read periodically from userspace in
76userspace in order for the automatic pwm algorithm to run. 72order for the automatic pwm algorithm to run. This was the case for earlier
73versions of the driver.
diff --git a/Documentation/hwmon/adt7475 b/Documentation/hwmon/adt7475
new file mode 100644
index 000000000000..a2b1abec850e
--- /dev/null
+++ b/Documentation/hwmon/adt7475
@@ -0,0 +1,87 @@
1This describes the interface for the ADT7475 driver:
2
3(there are 4 fans, numbered fan1 to fan4):
4
5fanX_input Read the current speed of the fan (in RPMs)
6fanX_min Read/write the minimum speed of the fan. Dropping
7 below this sets an alarm.
8
9(there are three PWMs, numbered pwm1 to pwm3):
10
11pwmX Read/write the current duty cycle of the PWM. Writes
12 only have effect when auto mode is turned off (see
13 below). Range is 0 - 255.
14
15pwmX_enable Fan speed control method:
16
17 0 - No control (fan at full speed)
18 1 - Manual fan speed control (using pwm[1-*])
19 2 - Automatic fan speed control
20
21pwmX_auto_channels_temp Select which channels affect this PWM
22
23 1 - TEMP1 controls PWM
24 2 - TEMP2 controls PWM
25 4 - TEMP3 controls PWM
26 6 - TEMP2 and TEMP3 control PWM
27 7 - All three inputs control PWM
28
29pwmX_freq Read/write the PWM frequency in Hz. The number
30 should be one of the following:
31
32 11 Hz
33 14 Hz
34 22 Hz
35 29 Hz
36 35 Hz
37 44 Hz
38 58 Hz
39 88 Hz
40
41pwmX_auto_point1_pwm Read/write the minimum PWM duty cycle in automatic mode
42
43pwmX_auto_point2_pwm Read/write the maximum PWM duty cycle in automatic mode
44
45(there are three temperature settings numbered temp1 to temp3):
46
47tempX_input Read the current temperature. The value is in milli
48 degrees of Celsius.
49
50tempX_max Read/write the upper temperature limit - exceeding this
51 will cause an alarm.
52
53tempX_min Read/write the lower temperature limit - exceeding this
54 will cause an alarm.
55
56tempX_offset Read/write the temperature adjustment offset
57
58tempX_crit Read/write the THERM limit for remote1.
59
60tempX_crit_hyst Set the temperature value below crit where the
61 fans will stay on - this helps drive the temperature
62 low enough so it doesn't stay near the edge and
63 cause THERM to keep tripping.
64
65tempX_auto_point1_temp Read/write the minimum temperature where the fans will
66 turn on in automatic mode.
67
68tempX_auto_point2_temp Read/write the maximum temperature over which the fans
69 will run in automatic mode. tempX_auto_point1_temp
70 and tempX_auto_point2_temp together define the
71 range of automatic control.
72
73tempX_alarm Read a 1 if the max/min alarm is set
74tempX_fault Read a 1 if either temp1 or temp3 diode has a fault
75
76(There are two voltage settings, in1 and in2):
77
78inX_input Read the current voltage on VCC. Value is in
79 millivolts.
80
81inX_min read/write the minimum voltage limit.
82 Dropping below this causes an alarm.
83
84inX_max read/write the maximum voltage limit.
85 Exceeding this causes an alarm.
86
87inX_alarm Read a 1 if the max/min alarm is set.
diff --git a/Documentation/hwmon/f71882fg b/Documentation/hwmon/f71882fg
new file mode 100644
index 000000000000..a8321267b5b6
--- /dev/null
+++ b/Documentation/hwmon/f71882fg
@@ -0,0 +1,89 @@
1Kernel driver f71882fg
2======================
3
4Supported chips:
5 * Fintek F71882FG and F71883FG
6 Prefix: 'f71882fg'
7 Addresses scanned: none, address read from Super I/O config space
8 Datasheet: Available from the Fintek website
9 * Fintek F71862FG and F71863FG
10 Prefix: 'f71862fg'
11 Addresses scanned: none, address read from Super I/O config space
12 Datasheet: Available from the Fintek website
13 * Fintek F8000
14 Prefix: 'f8000'
15 Addresses scanned: none, address read from Super I/O config space
16 Datasheet: Not public
17
18Author: Hans de Goede <hdegoede@redhat.com>
19
20
21Description
22-----------
23
24Fintek F718xxFG/F8000 Super I/O chips include complete hardware monitoring
25capabilities. They can monitor up to 9 voltages (3 for the F8000), 4 fans and
263 temperature sensors.
27
28These chips also have fan controlling features, using either DC or PWM, in
29three different modes (one manual, two automatic).
30
31The driver assumes that no more than one chip is present, which seems
32reasonable.
33
34
35Monitoring
36----------
37
38The Voltage, Fan and Temperature Monitoring uses the standard sysfs
39interface as documented in sysfs-interface, without any exceptions.
40
41
42Fan Control
43-----------
44
45Both PWM (pulse-width modulation) and DC fan speed control methods are
46supported. The right one to use depends on external circuitry on the
47motherboard, so the driver assumes that the BIOS set the method
48properly.
49
50There are 2 modes to specify the speed of the fan, PWM duty cycle (or DC
51voltage) mode, where 0-100% duty cycle (0-100% of 12V) is specified. And RPM
52mode where the actual RPM of the fan (as measured) is controlled and the speed
53gets specified as 0-100% of the fan#_full_speed file.
54
55Since both modes work in a 0-100% (mapped to 0-255) scale, there isn't a
56whole lot of a difference when modifying fan control settings. The only
57important difference is that in RPM mode the 0-100% controls the fan speed
58between 0-100% of fan#_full_speed. It is assumed that if the BIOS programs
59RPM mode, it will also set fan#_full_speed properly, if it does not then
60fan control will not work properly, unless you set a sane fan#_full_speed
61value yourself.
62
63Switching between these modes requires re-initializing a whole bunch of
64registers, so the mode which the BIOS has set is kept. The mode is
65printed when loading the driver.
66
67Three different fan control modes are supported; the mode number is written
68to the pwm#_enable file. Note that not all modes are supported on all
69chips, and some modes may only be available in RPM / PWM mode on the F8000.
70Writing an unsupported mode will result in an invalid parameter error.
71
72* 1: Manual mode
73 You ask for a specific PWM duty cycle / DC voltage or a specific % of
74 fan#_full_speed by writing to the pwm# file. This mode is only
75 available on the F8000 if the fan channel is in RPM mode.
76
77* 2: Normal auto mode
78 You can define a number of temperature/fan speed trip points, which % the
79 fan should run at at this temp and which temp a fan should follow using the
80 standard sysfs interface. The number and type of trip points is chip
81 depended, see which files are available in sysfs.
82 Fan/PWM channel 3 of the F8000 is always in this mode!
83
84* 3: Thermostat mode (Only available on the F8000 when in duty cycle mode)
85 The fan speed is regulated to keep the temp the fan is mapped to between
86 temp#_auto_point2_temp and temp#_auto_point3_temp.
87
88Both of the automatic modes require that pwm1 corresponds to fan1, pwm2 to
89fan2 and pwm3 to fan3.
diff --git a/Documentation/hwmon/it87 b/Documentation/hwmon/it87
index 042c0415140b..659315d98e00 100644
--- a/Documentation/hwmon/it87
+++ b/Documentation/hwmon/it87
@@ -26,6 +26,10 @@ Supported chips:
26 Datasheet: Publicly available at the ITE website 26 Datasheet: Publicly available at the ITE website
27 http://www.ite.com.tw/product_info/file/pc/IT8718F_V0.2.zip 27 http://www.ite.com.tw/product_info/file/pc/IT8718F_V0.2.zip
28 http://www.ite.com.tw/product_info/file/pc/IT8718F_V0%203_(for%20C%20version).zip 28 http://www.ite.com.tw/product_info/file/pc/IT8718F_V0%203_(for%20C%20version).zip
29 * IT8720F
30 Prefix: 'it8720'
31 Addresses scanned: from Super I/O config space (8 I/O ports)
32 Datasheet: Not yet publicly available.
29 * SiS950 [clone of IT8705F] 33 * SiS950 [clone of IT8705F]
30 Prefix: 'it87' 34 Prefix: 'it87'
31 Addresses scanned: from Super I/O config space (8 I/O ports) 35 Addresses scanned: from Super I/O config space (8 I/O ports)
@@ -71,7 +75,7 @@ Description
71----------- 75-----------
72 76
73This driver implements support for the IT8705F, IT8712F, IT8716F, 77This driver implements support for the IT8705F, IT8712F, IT8716F,
74IT8718F, IT8726F and SiS950 chips. 78IT8718F, IT8720F, IT8726F and SiS950 chips.
75 79
76These chips are 'Super I/O chips', supporting floppy disks, infrared ports, 80These chips are 'Super I/O chips', supporting floppy disks, infrared ports,
77joysticks and other miscellaneous stuff. For hardware monitoring, they 81joysticks and other miscellaneous stuff. For hardware monitoring, they
@@ -84,19 +88,19 @@ the IT8716F and late IT8712F have 6. They are shared with other functions
84though, so the functionality may not be available on a given system. 88though, so the functionality may not be available on a given system.
85The driver dumbly assume it is there. 89The driver dumbly assume it is there.
86 90
87The IT8718F also features VID inputs (up to 8 pins) but the value is 91The IT8718F and IT8720F also features VID inputs (up to 8 pins) but the value
88stored in the Super-I/O configuration space. Due to technical limitations, 92is stored in the Super-I/O configuration space. Due to technical limitations,
89this value can currently only be read once at initialization time, so 93this value can currently only be read once at initialization time, so
90the driver won't notice and report changes in the VID value. The two 94the driver won't notice and report changes in the VID value. The two
91upper VID bits share their pins with voltage inputs (in5 and in6) so you 95upper VID bits share their pins with voltage inputs (in5 and in6) so you
92can't have both on a given board. 96can't have both on a given board.
93 97
94The IT8716F, IT8718F and later IT8712F revisions have support for 98The IT8716F, IT8718F, IT8720F and later IT8712F revisions have support for
952 additional fans. The additional fans are supported by the driver. 992 additional fans. The additional fans are supported by the driver.
96 100
97The IT8716F and IT8718F, and late IT8712F and IT8705F also have optional 101The IT8716F, IT8718F and IT8720F, and late IT8712F and IT8705F also have
9816-bit tachometer counters for fans 1 to 3. This is better (no more fan 102optional 16-bit tachometer counters for fans 1 to 3. This is better (no more
99clock divider mess) but not compatible with the older chips and 103fan clock divider mess) but not compatible with the older chips and
100revisions. The 16-bit tachometer mode is enabled by the driver when one 104revisions. The 16-bit tachometer mode is enabled by the driver when one
101of the above chips is detected. 105of the above chips is detected.
102 106
@@ -122,7 +126,7 @@ zero'; this is important for negative voltage measurements. All voltage
122inputs can measure voltages between 0 and 4.08 volts, with a resolution of 126inputs can measure voltages between 0 and 4.08 volts, with a resolution of
1230.016 volt. The battery voltage in8 does not have limit registers. 1270.016 volt. The battery voltage in8 does not have limit registers.
124 128
125The VID lines (IT8712F/IT8716F/IT8718F) encode the core voltage value: 129The VID lines (IT8712F/IT8716F/IT8718F/IT8720F) encode the core voltage value:
126the voltage level your processor should work with. This is hardcoded by 130the voltage level your processor should work with. This is hardcoded by
127the mainboard and/or processor itself. It is a value in volts. 131the mainboard and/or processor itself. It is a value in volts.
128 132
diff --git a/Documentation/hwmon/lis3lv02d b/Documentation/hwmon/lis3lv02d
index 65dfb0c0fd67..0fcfc4a7ccdc 100644
--- a/Documentation/hwmon/lis3lv02d
+++ b/Documentation/hwmon/lis3lv02d
@@ -13,18 +13,21 @@ Author:
13Description 13Description
14----------- 14-----------
15 15
16This driver provides support for the accelerometer found in various HP laptops 16This driver provides support for the accelerometer found in various HP
17sporting the feature officially called "HP Mobile Data Protection System 3D" or 17laptops sporting the feature officially called "HP Mobile Data
18"HP 3D DriveGuard". It detect automatically laptops with this sensor. Known models 18Protection System 3D" or "HP 3D DriveGuard". It detect automatically
19(for now the HP 2133, nc6420, nc2510, nc8510, nc84x0, nw9440 and nx9420) will 19laptops with this sensor. Known models (for now the HP 2133, nc6420,
20have their axis automatically oriented on standard way (eg: you can directly 20nc2510, nc8510, nc84x0, nw9440 and nx9420) will have their axis
21play neverball). The accelerometer data is readable via 21automatically oriented on standard way (eg: you can directly play
22neverball). The accelerometer data is readable via
22/sys/devices/platform/lis3lv02d. 23/sys/devices/platform/lis3lv02d.
23 24
24Sysfs attributes under /sys/devices/platform/lis3lv02d/: 25Sysfs attributes under /sys/devices/platform/lis3lv02d/:
25position - 3D position that the accelerometer reports. Format: "(x,y,z)" 26position - 3D position that the accelerometer reports. Format: "(x,y,z)"
26calibrate - read: values (x, y, z) that are used as the base for input class device operation. 27calibrate - read: values (x, y, z) that are used as the base for input
27 write: forces the base to be recalibrated with the current position. 28 class device operation.
29 write: forces the base to be recalibrated with the current
30 position.
28rate - reports the sampling rate of the accelerometer device in HZ 31rate - reports the sampling rate of the accelerometer device in HZ
29 32
30This driver also provides an absolute input class device, allowing 33This driver also provides an absolute input class device, allowing
@@ -39,11 +42,12 @@ the accelerometer are converted into a "standard" organisation of the axes
39 * When the laptop is horizontal the position reported is about 0 for X and Y 42 * When the laptop is horizontal the position reported is about 0 for X and Y
40and a positive value for Z 43and a positive value for Z
41 * If the left side is elevated, X increases (becomes positive) 44 * If the left side is elevated, X increases (becomes positive)
42 * If the front side (where the touchpad is) is elevated, Y decreases (becomes negative) 45 * If the front side (where the touchpad is) is elevated, Y decreases
46 (becomes negative)
43 * If the laptop is put upside-down, Z becomes negative 47 * If the laptop is put upside-down, Z becomes negative
44 48
45If your laptop model is not recognized (cf "dmesg"), you can send an email to the 49If your laptop model is not recognized (cf "dmesg"), you can send an
46authors to add it to the database. When reporting a new laptop, please include 50email to the authors to add it to the database. When reporting a new
47the output of "dmidecode" plus the value of /sys/devices/platform/lis3lv02d/position 51laptop, please include the output of "dmidecode" plus the value of
48in these four cases. 52/sys/devices/platform/lis3lv02d/position in these four cases.
49 53
diff --git a/Documentation/hwmon/lm70 b/Documentation/hwmon/lm70
index 2bdd3feebf53..0d240291e3cc 100644
--- a/Documentation/hwmon/lm70
+++ b/Documentation/hwmon/lm70
@@ -1,9 +1,11 @@
1Kernel driver lm70 1Kernel driver lm70
2================== 2==================
3 3
4Supported chip: 4Supported chips:
5 * National Semiconductor LM70 5 * National Semiconductor LM70
6 Datasheet: http://www.national.com/pf/LM/LM70.html 6 Datasheet: http://www.national.com/pf/LM/LM70.html
7 * Texas Instruments TMP121/TMP123
8 Information: http://focus.ti.com/docs/prod/folders/print/tmp121.html
7 9
8Author: 10Author:
9 Kaiwan N Billimoria <kaiwan@designergraphix.com> 11 Kaiwan N Billimoria <kaiwan@designergraphix.com>
@@ -25,6 +27,14 @@ complement digital temperature (sent via the SIO line), is available in the
25driver for interpretation. This driver makes use of the kernel's in-core 27driver for interpretation. This driver makes use of the kernel's in-core
26SPI support. 28SPI support.
27 29
30As a real (in-tree) example of this "SPI protocol driver" interfacing
31with a "SPI master controller driver", see drivers/spi/spi_lm70llp.c
32and its associated documentation.
33
34The TMP121/TMP123 are very similar; main differences are 4 wire SPI inter-
35face (read only) and 13-bit temperature data (0.0625 degrees celsius reso-
36lution).
37
28Thanks to 38Thanks to
29--------- 39---------
30Jean Delvare <khali@linux-fr.org> for mentoring the hwmon-side driver 40Jean Delvare <khali@linux-fr.org> for mentoring the hwmon-side driver
diff --git a/Documentation/hwmon/lm85 b/Documentation/hwmon/lm85
index 400620741290..a13680871bc7 100644
--- a/Documentation/hwmon/lm85
+++ b/Documentation/hwmon/lm85
@@ -164,7 +164,7 @@ configured individually according to the following options.
164 temperature. (PWM value from 0 to 255) 164 temperature. (PWM value from 0 to 255)
165 165
166* pwm#_auto_pwm_minctl - this flags selects for temp#_auto_temp_off temperature 166* pwm#_auto_pwm_minctl - this flags selects for temp#_auto_temp_off temperature
167 the bahaviour of fans. Write 1 to let fans spinning at 167 the behaviour of fans. Write 1 to let fans spinning at
168 pwm#_auto_pwm_min or write 0 to let them off. 168 pwm#_auto_pwm_min or write 0 to let them off.
169 169
170NOTE: It has been reported that there is a bug in the LM85 that causes the flag 170NOTE: It has been reported that there is a bug in the LM85 that causes the flag
diff --git a/Documentation/hwmon/ltc4245 b/Documentation/hwmon/ltc4245
new file mode 100644
index 000000000000..bae7a3adc5d8
--- /dev/null
+++ b/Documentation/hwmon/ltc4245
@@ -0,0 +1,81 @@
1Kernel driver ltc4245
2=====================
3
4Supported chips:
5 * Linear Technology LTC4245
6 Prefix: 'ltc4245'
7 Addresses scanned: 0x20-0x3f
8 Datasheet:
9 http://www.linear.com/pc/downloadDocument.do?navId=H0,C1,C1003,C1006,C1140,P19392,D13517
10
11Author: Ira W. Snyder <iws@ovro.caltech.edu>
12
13
14Description
15-----------
16
17The LTC4245 controller allows a board to be safely inserted and removed
18from a live backplane in multiple supply systems such as CompactPCI and
19PCI Express.
20
21
22Usage Notes
23-----------
24
25This driver does not probe for LTC4245 devices, due to the fact that some
26of the possible addresses are unfriendly to probing. You will need to use
27the "force" parameter to tell the driver where to find the device.
28
29Example: the following will load the driver for an LTC4245 at address 0x23
30on I2C bus #1:
31$ modprobe ltc4245 force=1,0x23
32
33
34Sysfs entries
35-------------
36
37The LTC4245 has built-in limits for over and under current warnings. This
38makes it very likely that the reference circuit will be used.
39
40This driver uses the values in the datasheet to change the register values
41into the values specified in the sysfs-interface document. The current readings
42rely on the sense resistors listed in Table 2: "Sense Resistor Values".
43
44in1_input 12v input voltage (mV)
45in2_input 5v input voltage (mV)
46in3_input 3v input voltage (mV)
47in4_input Vee (-12v) input voltage (mV)
48
49in1_min_alarm 12v input undervoltage alarm
50in2_min_alarm 5v input undervoltage alarm
51in3_min_alarm 3v input undervoltage alarm
52in4_min_alarm Vee (-12v) input undervoltage alarm
53
54curr1_input 12v current (mA)
55curr2_input 5v current (mA)
56curr3_input 3v current (mA)
57curr4_input Vee (-12v) current (mA)
58
59curr1_max_alarm 12v overcurrent alarm
60curr2_max_alarm 5v overcurrent alarm
61curr3_max_alarm 3v overcurrent alarm
62curr4_max_alarm Vee (-12v) overcurrent alarm
63
64in5_input 12v output voltage (mV)
65in6_input 5v output voltage (mV)
66in7_input 3v output voltage (mV)
67in8_input Vee (-12v) output voltage (mV)
68
69in5_min_alarm 12v output undervoltage alarm
70in6_min_alarm 5v output undervoltage alarm
71in7_min_alarm 3v output undervoltage alarm
72in8_min_alarm Vee (-12v) output undervoltage alarm
73
74in9_input GPIO #1 voltage data
75in10_input GPIO #2 voltage data
76in11_input GPIO #3 voltage data
77
78power1_input 12v power usage (mW)
79power2_input 5v power usage (mW)
80power3_input 3v power usage (mW)
81power4_input Vee (-12v) power usage (mW)
diff --git a/Documentation/ide/warm-plug-howto.txt b/Documentation/ide/warm-plug-howto.txt
index d5885468b072..98152bcd515a 100644
--- a/Documentation/ide/warm-plug-howto.txt
+++ b/Documentation/ide/warm-plug-howto.txt
@@ -11,3 +11,8 @@ unplug old device(s) and plug new device(s)
11# echo -n "1" > /sys/class/ide_port/idex/scan 11# echo -n "1" > /sys/class/ide_port/idex/scan
12 12
13done 13done
14
15NOTE: please make sure that partitions are unmounted and that there are
16no other active references to devices before doing "delete_devices" step,
17also do not attempt "scan" step on devices currently in use -- otherwise
18results may be unpredictable and lead to data loss if you're unlucky
diff --git a/Documentation/input/walkera0701.txt b/Documentation/input/walkera0701.txt
new file mode 100644
index 000000000000..8f4289efc5c4
--- /dev/null
+++ b/Documentation/input/walkera0701.txt
@@ -0,0 +1,109 @@
1
2Walkera WK-0701 transmitter is supplied with a ready to fly Walkera
3helicopters such as HM36, HM37, HM60. The walkera0701 module enables to use
4this transmitter as joystick
5
6Devel homepage and download:
7http://zub.fei.tuke.sk/walkera-wk0701/
8
9or use cogito:
10cg-clone http://zub.fei.tuke.sk/GIT/walkera0701-joystick
11
12
13Connecting to PC:
14
15At back side of transmitter S-video connector can be found. Modulation
16pulses from processor to HF part can be found at pin 2 of this connector,
17pin 3 is GND. Between pin 3 and CPU 5k6 resistor can be found. To get
18modulation pulses to PC, signal pulses must be amplified.
19
20Cable: (walkera TX to parport)
21
22Walkera WK-0701 TX S-VIDEO connector:
23 (back side of TX)
24 __ __ S-video: canon25
25 / |_| \ pin 2 (signal) NPN parport
26 / O 4 3 O \ pin 3 (GND) LED ________________ 10 ACK
27 ( O 2 1 O ) | C
28 \ ___ / 2 ________________________|\|_____|/
29 | [___] | |/| B |\
30 ------- 3 __________________________________|________________ 25 GND
31 E
32
33
34I use green LED and BC109 NPN transistor.
35
36Software:
37
38Build kernel with walkera0701 module. Module walkera0701 need exclusive
39access to parport, modules like lp must be unloaded before loading
40walkera0701 module, check dmesg for error messages. Connect TX to PC by
41cable and run jstest /dev/input/js0 to see values from TX. If no value can
42be changed by TX "joystick", check output from /proc/interrupts. Value for
43(usually irq7) parport must increase if TX is on.
44
45
46
47Technical details:
48
49Driver use interrupt from parport ACK input bit to measure pulse length
50using hrtimers.
51
52Frame format:
53Based on walkera WK-0701 PCM Format description by Shaul Eizikovich.
54(downloaded from http://www.smartpropoplus.com/Docs/Walkera_Wk-0701_PCM.pdf)
55
56Signal pulses:
57 (ANALOG)
58 SYNC BIN OCT
59 +---------+ +------+
60 | | | |
61--+ +------+ +---
62
63Frame:
64 SYNC , BIN1, OCT1, BIN2, OCT2 ... BIN24, OCT24, BIN25, next frame SYNC ..
65
66pulse length:
67 Binary values: Analog octal values:
68
69 288 uS Binary 0 318 uS 000
70 438 uS Binary 1 398 uS 001
71 478 uS 010
72 558 uS 011
73 638 uS 100
74 1306 uS SYNC 718 uS 101
75 798 uS 110
76 878 uS 111
77
7824 bin+oct values + 1 bin value = 24*4+1 bits = 97 bits
79
80(Warning, pulses on ACK ar inverted by transistor, irq is rised up on sync
81to bin change or octal value to bin change).
82
83Binary data representations:
84
85One binary and octal value can be grouped to nibble. 24 nibbles + one binary
86values can be sampled between sync pulses.
87
88Values for first four channels (analog joystick values) can be found in
89first 10 nibbles. Analog value is represented by one sign bit and 9 bit
90absolute binary value. (10 bits per channel). Next nibble is checksum for
91first ten nibbles.
92
93Next nibbles 12 .. 21 represents four channels (not all channels can be
94directly controlled from TX). Binary representations ar the same as in first
95four channels. In nibbles 22 and 23 is a special magic number. Nibble 24 is
96checksum for nibbles 12..23.
97
98After last octal value for nibble 24 and next sync pulse one additional
99binary value can be sampled. This bit and magic number is not used in
100software driver. Some details about this magic numbers can be found in
101Walkera_Wk-0701_PCM.pdf.
102
103Checksum calculation:
104
105Summary of octal values in nibbles must be same as octal value in checksum
106nibble (only first 3 bits are used). Binary value for checksum nibble is
107calculated by sum of binary values in checked nibbles + sum of octal values
108in checked nibbles divided by 8. Only bit 0 of this sum is used.
109
diff --git a/Documentation/ioctl/ioctl-number.txt b/Documentation/ioctl/ioctl-number.txt
index b880ce5dbd33..f1d639903325 100644
--- a/Documentation/ioctl/ioctl-number.txt
+++ b/Documentation/ioctl/ioctl-number.txt
@@ -84,7 +84,7 @@ Code Seq# Include File Comments
84'B' C0-FF advanced bbus 84'B' C0-FF advanced bbus
85 <mailto:maassen@uni-freiburg.de> 85 <mailto:maassen@uni-freiburg.de>
86'C' all linux/soundcard.h 86'C' all linux/soundcard.h
87'D' all asm-s390/dasd.h 87'D' all arch/s390/include/asm/dasd.h
88'E' all linux/input.h 88'E' all linux/input.h
89'F' all linux/fb.h 89'F' all linux/fb.h
90'H' all linux/hiddev.h 90'H' all linux/hiddev.h
@@ -97,6 +97,7 @@ Code Seq# Include File Comments
97 <http://linux01.gwdg.de/~alatham/ppdd.html> 97 <http://linux01.gwdg.de/~alatham/ppdd.html>
98'M' all linux/soundcard.h 98'M' all linux/soundcard.h
99'N' 00-1F drivers/usb/scanner.h 99'N' 00-1F drivers/usb/scanner.h
100'O' 00-02 include/mtd/ubi-user.h UBI
100'P' all linux/soundcard.h 101'P' all linux/soundcard.h
101'Q' all linux/soundcard.h 102'Q' all linux/soundcard.h
102'R' 00-1F linux/random.h 103'R' 00-1F linux/random.h
@@ -104,7 +105,7 @@ Code Seq# Include File Comments
104'S' 80-81 scsi/scsi_ioctl.h conflict! 105'S' 80-81 scsi/scsi_ioctl.h conflict!
105'S' 82-FF scsi/scsi.h conflict! 106'S' 82-FF scsi/scsi.h conflict!
106'T' all linux/soundcard.h conflict! 107'T' all linux/soundcard.h conflict!
107'T' all asm-i386/ioctls.h conflict! 108'T' all arch/x86/include/asm/ioctls.h conflict!
108'U' 00-EF linux/drivers/usb/usb.h 109'U' 00-EF linux/drivers/usb/usb.h
109'V' all linux/vt.h 110'V' all linux/vt.h
110'W' 00-1F linux/watchdog.h conflict! 111'W' 00-1F linux/watchdog.h conflict!
@@ -119,7 +120,7 @@ Code Seq# Include File Comments
119 <mailto:natalia@nikhefk.nikhef.nl> 120 <mailto:natalia@nikhefk.nikhef.nl>
120'c' 00-7F linux/comstats.h conflict! 121'c' 00-7F linux/comstats.h conflict!
121'c' 00-7F linux/coda.h conflict! 122'c' 00-7F linux/coda.h conflict!
122'c' 80-9F asm-s390/chsc.h 123'c' 80-9F arch/s390/include/asm/chsc.h
123'd' 00-FF linux/char/drm/drm/h conflict! 124'd' 00-FF linux/char/drm/drm/h conflict!
124'd' 00-DF linux/video_decoder.h conflict! 125'd' 00-DF linux/video_decoder.h conflict!
125'd' F0-FF linux/digi1.h 126'd' F0-FF linux/digi1.h
@@ -142,6 +143,9 @@ Code Seq# Include File Comments
142'n' 00-7F linux/ncp_fs.h 143'n' 00-7F linux/ncp_fs.h
143'n' E0-FF video/matrox.h matroxfb 144'n' E0-FF video/matrox.h matroxfb
144'o' 00-1F fs/ocfs2/ocfs2_fs.h OCFS2 145'o' 00-1F fs/ocfs2/ocfs2_fs.h OCFS2
146'o' 00-03 include/mtd/ubi-user.h conflict! (OCFS2 and UBI overlaps)
147'o' 40-41 include/mtd/ubi-user.h UBI
148'o' 01-A1 include/linux/dvb/*.h DVB
145'p' 00-0F linux/phantom.h conflict! (OpenHaptics needs this) 149'p' 00-0F linux/phantom.h conflict! (OpenHaptics needs this)
146'p' 00-3F linux/mc146818rtc.h conflict! 150'p' 00-3F linux/mc146818rtc.h conflict!
147'p' 40-7F linux/nvram.h 151'p' 40-7F linux/nvram.h
@@ -166,7 +170,7 @@ Code Seq# Include File Comments
166 <mailto:oe@port.de> 170 <mailto:oe@port.de>
1670x80 00-1F linux/fb.h 1710x80 00-1F linux/fb.h
1680x81 00-1F linux/videotext.h 1720x81 00-1F linux/videotext.h
1690x89 00-06 asm-i386/sockios.h 1730x89 00-06 arch/x86/include/asm/sockios.h
1700x89 0B-DF linux/sockios.h 1740x89 0B-DF linux/sockios.h
1710x89 E0-EF linux/sockios.h SIOCPROTOPRIVATE range 1750x89 E0-EF linux/sockios.h SIOCPROTOPRIVATE range
1720x89 F0-FF linux/sockios.h SIOCDEVPRIVATE range 1760x89 F0-FF linux/sockios.h SIOCDEVPRIVATE range
diff --git a/Documentation/ja_JP/stable_kernel_rules.txt b/Documentation/ja_JP/stable_kernel_rules.txt
index b3ffe870de33..14265837c4ce 100644
--- a/Documentation/ja_JP/stable_kernel_rules.txt
+++ b/Documentation/ja_JP/stable_kernel_rules.txt
@@ -12,11 +12,11 @@ file at first.
12 12
13================================== 13==================================
14これは、 14これは、
15linux-2.6.24/Documentation/stable_kernel_rules.txt 15linux-2.6.29/Documentation/stable_kernel_rules.txt
16の和訳です。 16の和訳です。
17 17
18翻訳団体: JF プロジェクト < http://www.linux.or.jp/JF/ > 18翻訳団体: JF プロジェクト < http://www.linux.or.jp/JF/ >
19翻訳日: 2007/12/30 19翻訳日: 2009/1/14
20翻訳者: Tsugikazu Shibata <tshibata at ab dot jp dot nec dot com> 20翻訳者: Tsugikazu Shibata <tshibata at ab dot jp dot nec dot com>
21校正者: 武井伸光さん、<takei at webmasters dot gr dot jp> 21校正者: 武井伸光さん、<takei at webmasters dot gr dot jp>
22 かねこさん (Seiji Kaneko) <skaneko at a2 dot mbn dot or dot jp> 22 かねこさん (Seiji Kaneko) <skaneko at a2 dot mbn dot or dot jp>
@@ -38,12 +38,15 @@ linux-2.6.24/Documentation/stable_kernel_rules.txt
38 - ビルドエラー(CONFIG_BROKENになっているものを除く), oops, ハング、デー 38 - ビルドエラー(CONFIG_BROKENになっているものを除く), oops, ハング、デー
39 タ破壊、現実のセキュリティ問題、その他 "ああ、これはダメだね"という 39 タ破壊、現実のセキュリティ問題、その他 "ああ、これはダメだね"という
40 ようなものを修正しなければならない。短く言えば、重大な問題。 40 ようなものを修正しなければならない。短く言えば、重大な問題。
41 - 新しい device ID とクオークも受け入れられる。
41 - どのように競合状態が発生するかの説明も一緒に書かれていない限り、 42 - どのように競合状態が発生するかの説明も一緒に書かれていない限り、
42 "理論的には競合状態になる"ようなものは不可。 43 "理論的には競合状態になる"ようなものは不可。
43 - いかなる些細な修正も含めることはできない。(スペルの修正、空白のクリー 44 - いかなる些細な修正も含めることはできない。(スペルの修正、空白のクリー
44 ンアップなど) 45 ンアップなど)
45 - 対応するサブシステムメンテナが受け入れたものでなければならない。
46 - Documentation/SubmittingPatches の規則に従ったものでなければならない。 46 - Documentation/SubmittingPatches の規則に従ったものでなければならない。
47 - パッチ自体か同等の修正が Linus のツリーに既に存在しなければならない。
48  Linus のツリーでのコミットID を -stable へのパッチ投稿の際に引用す
49 ること。
47 50
48-stable ツリーにパッチを送付する手続き- 51-stable ツリーにパッチを送付する手続き-
49 52
@@ -52,8 +55,10 @@ linux-2.6.24/Documentation/stable_kernel_rules.txt
52 - 送信者はパッチがキューに受け付けられた際には ACK を、却下された場合 55 - 送信者はパッチがキューに受け付けられた際には ACK を、却下された場合
53 には NAK を受け取る。この反応は開発者たちのスケジュールによって、数 56 には NAK を受け取る。この反応は開発者たちのスケジュールによって、数
54 日かかる場合がある。 57 日かかる場合がある。
55 - もし受け取られたら、パッチは他の開発者たちのレビューのために 58 - もし受け取られたら、パッチは他の開発者たちと関連するサブシステムの
56 -stable キューに追加される。 59 メンテナーによるレビューのために -stable キューに追加される。
60 - パッチに stable@kernel.org のアドレスが付加されているときには、それ
61 が Linus のツリーに入る時に自動的に stable チームに email される。
57 - セキュリティパッチはこのエイリアス (stable@kernel.org) に送られるべ 62 - セキュリティパッチはこのエイリアス (stable@kernel.org) に送られるべ
58 きではなく、代わりに security@kernel.org のアドレスに送られる。 63 きではなく、代わりに security@kernel.org のアドレスに送られる。
59 64
diff --git a/Documentation/kbuild/00-INDEX b/Documentation/kbuild/00-INDEX
index 114644285454..e8d2b6d83a3d 100644
--- a/Documentation/kbuild/00-INDEX
+++ b/Documentation/kbuild/00-INDEX
@@ -1,5 +1,9 @@
100-INDEX 100-INDEX
2 - this file: info on the kernel build process 2 - this file: info on the kernel build process
3kbuild.txt
4 - developer information on kbuild
5kconfig.txt
6 - usage help for make *config
3kconfig-language.txt 7kconfig-language.txt
4 - specification of Config Language, the language in Kconfig files 8 - specification of Config Language, the language in Kconfig files
5makefiles.txt 9makefiles.txt
diff --git a/Documentation/kbuild/kbuild.txt b/Documentation/kbuild/kbuild.txt
new file mode 100644
index 000000000000..f3355b6812df
--- /dev/null
+++ b/Documentation/kbuild/kbuild.txt
@@ -0,0 +1,134 @@
1Environment variables
2
3KCPPFLAGS
4--------------------------------------------------
5Additional options to pass when preprocessing. The preprocessing options
6will be used in all cases where kbuild does preprocessing including
7building C files and assembler files.
8
9KAFLAGS
10--------------------------------------------------
11Additional options to the assembler.
12
13KCFLAGS
14--------------------------------------------------
15Additional options to the C compiler.
16
17KBUILD_VERBOSE
18--------------------------------------------------
19Set the kbuild verbosity. Can be assigned same values as "V=...".
20See make help for the full list.
21Setting "V=..." takes precedence over KBUILD_VERBOSE.
22
23KBUILD_EXTMOD
24--------------------------------------------------
25Set the directory to look for the kernel source when building external
26modules.
27The directory can be specified in several ways:
281) Use "M=..." on the command line
292) Environmnet variable KBUILD_EXTMOD
303) Environmnet variable SUBDIRS
31The possibilities are listed in the order they take precedence.
32Using "M=..." will always override the others.
33
34KBUILD_OUTPUT
35--------------------------------------------------
36Specify the output directory when building the kernel.
37The output directory can also be specificed using "O=...".
38Setting "O=..." takes precedence over KBUILD_OUTPUT.
39
40ARCH
41--------------------------------------------------
42Set ARCH to the architecture to be built.
43In most cases the name of the architecture is the same as the
44directory name found in the arch/ directory.
45But some architectures such as x86 and sparc have aliases.
46x86: i386 for 32 bit, x86_64 for 64 bit
47sparc: sparc for 32 bit, sparc64 for 64 bit
48
49CROSS_COMPILE
50--------------------------------------------------
51Specify an optional fixed part of the binutils filename.
52CROSS_COMPILE can be a part of the filename or the full path.
53
54CROSS_COMPILE is also used for ccache is some setups.
55
56CF
57--------------------------------------------------
58Additional options for sparse.
59CF is often used on the command-line like this:
60
61 make CF=-Wbitwise C=2
62
63INSTALL_PATH
64--------------------------------------------------
65INSTALL_PATH specifies where to place the updated kernel and system map
66images. Default is /boot, but you can set it to other values.
67
68
69MODLIB
70--------------------------------------------------
71Specify where to install modules.
72The default value is:
73
74 $(INSTALL_MOD_PATH)/lib/modules/$(KERNELRELEASE)
75
76The value can be overridden in which case the default value is ignored.
77
78INSTALL_MOD_PATH
79--------------------------------------------------
80INSTALL_MOD_PATH specifies a prefix to MODLIB for module directory
81relocations required by build roots. This is not defined in the
82makefile but the argument can be passed to make if needed.
83
84INSTALL_MOD_STRIP
85--------------------------------------------------
86INSTALL_MOD_STRIP, if defined, will cause modules to be
87stripped after they are installed. If INSTALL_MOD_STRIP is '1', then
88the default option --strip-debug will be used. Otherwise,
89INSTALL_MOD_STRIP will used as the options to the strip command.
90
91INSTALL_FW_PATH
92--------------------------------------------------
93INSTALL_FW_PATH specifies where to install the firmware blobs.
94The default value is:
95
96 $(INSTALL_MOD_PATH)/lib/firmware
97
98The value can be overridden in which case the default value is ignored.
99
100INSTALL_HDR_PATH
101--------------------------------------------------
102INSTALL_HDR_PATH specifies where to install user space headers when
103executing "make headers_*".
104The default value is:
105
106 $(objtree)/usr
107
108$(objtree) is the directory where output files are saved.
109The output directory is often set using "O=..." on the commandline.
110
111The value can be overridden in which case the default value is ignored.
112
113KBUILD_MODPOST_WARN
114--------------------------------------------------
115KBUILD_MODPOST_WARN can be set to avoid errors in case of undefined
116symbols in the final module linking stage. It changes such errors
117into warnings.
118
119KBUILD_MODPOST_NOFINAL
120--------------------------------------------------
121KBUILD_MODPOST_NOFINAL can be set to skip the final link of modules.
122This is solely useful to speed up test compiles.
123
124KBUILD_EXTRA_SYMBOLS
125--------------------------------------------------
126For modules that use symbols from other modules.
127See more details in modules.txt.
128
129ALLSOURCE_ARCHS
130--------------------------------------------------
131For tags/TAGS/cscope targets, you can specify more than one arch
132to be included in the databases, separated by blank space. E.g.:
133
134 $ make ALLSOURCE_ARCHS="x86 mips arm" tags
diff --git a/Documentation/kbuild/kconfig.txt b/Documentation/kbuild/kconfig.txt
new file mode 100644
index 000000000000..26a7c0a93193
--- /dev/null
+++ b/Documentation/kbuild/kconfig.txt
@@ -0,0 +1,188 @@
1This file contains some assistance for using "make *config".
2
3Use "make help" to list all of the possible configuration targets.
4
5The xconfig ('qconf') and menuconfig ('mconf') programs also
6have embedded help text. Be sure to check it for navigation,
7search, and other general help text.
8
9======================================================================
10General
11--------------------------------------------------
12
13New kernel releases often introduce new config symbols. Often more
14important, new kernel releases may rename config symbols. When
15this happens, using a previously working .config file and running
16"make oldconfig" won't necessarily produce a working new kernel
17for you, so you may find that you need to see what NEW kernel
18symbols have been introduced.
19
20To see a list of new config symbols when using "make oldconfig", use
21
22 cp user/some/old.config .config
23 yes "" | make oldconfig >conf.new
24
25and the config program will list as (NEW) any new symbols that have
26unknown values. Of course, the .config file is also updated with
27new (default) values, so you can use:
28
29 grep "(NEW)" conf.new
30
31to see the new config symbols or you can 'diff' the previous and
32new .config files to see the differences:
33
34 diff .config.old .config | less
35
36(Yes, we need something better here.)
37
38
39======================================================================
40menuconfig
41--------------------------------------------------
42
43SEARCHING for CONFIG symbols
44
45Searching in menuconfig:
46
47 The Search function searches for kernel configuration symbol
48 names, so you have to know something close to what you are
49 looking for.
50
51 Example:
52 /hotplug
53 This lists all config symbols that contain "hotplug",
54 e.g., HOTPLUG, HOTPLUG_CPU, MEMORY_HOTPLUG.
55
56 For search help, enter / followed TAB-TAB-TAB (to highlight
57 <Help>) and Enter. This will tell you that you can also use
58 regular expressions (regexes) in the search string, so if you
59 are not interested in MEMORY_HOTPLUG, you could try
60
61 /^hotplug
62
63
64______________________________________________________________________
65Color Themes for 'menuconfig'
66
67It is possible to select different color themes using the variable
68MENUCONFIG_COLOR. To select a theme use:
69
70 make MENUCONFIG_COLOR=<theme> menuconfig
71
72Available themes are:
73 mono => selects colors suitable for monochrome displays
74 blackbg => selects a color scheme with black background
75 classic => theme with blue background. The classic look
76 bluetitle => a LCD friendly version of classic. (default)
77
78______________________________________________________________________
79Environment variables in 'menuconfig'
80
81KCONFIG_ALLCONFIG
82--------------------------------------------------
83(partially based on lkml email from/by Rob Landley, re: miniconfig)
84--------------------------------------------------
85The allyesconfig/allmodconfig/allnoconfig/randconfig variants can
86also use the environment variable KCONFIG_ALLCONFIG as a flag or a
87filename that contains config symbols that the user requires to be
88set to a specific value. If KCONFIG_ALLCONFIG is used without a
89filename, "make *config" checks for a file named
90"all{yes/mod/no/random}.config" (corresponding to the *config command
91that was used) for symbol values that are to be forced. If this file
92is not found, it checks for a file named "all.config" to contain forced
93values.
94
95This enables you to create "miniature" config (miniconfig) or custom
96config files containing just the config symbols that you are interested
97in. Then the kernel config system generates the full .config file,
98including dependencies of your miniconfig file, based on the miniconfig
99file.
100
101This 'KCONFIG_ALLCONFIG' file is a config file which contains
102(usually a subset of all) preset config symbols. These variable
103settings are still subject to normal dependency checks.
104
105Examples:
106 KCONFIG_ALLCONFIG=custom-notebook.config make allnoconfig
107or
108 KCONFIG_ALLCONFIG=mini.config make allnoconfig
109or
110 make KCONFIG_ALLCONFIG=mini.config allnoconfig
111
112These examples will disable most options (allnoconfig) but enable or
113disable the options that are explicitly listed in the specified
114mini-config files.
115
116KCONFIG_NOSILENTUPDATE
117--------------------------------------------------
118If this variable has a non-blank value, it prevents silent kernel
119config udpates (requires explicit updates).
120
121KCONFIG_CONFIG
122--------------------------------------------------
123This environment variable can be used to specify a default kernel config
124file name to override the default name of ".config".
125
126KCONFIG_OVERWRITECONFIG
127--------------------------------------------------
128If you set KCONFIG_OVERWRITECONFIG in the environment, Kconfig will not
129break symlinks when .config is a symlink to somewhere else.
130
131KCONFIG_NOTIMESTAMP
132--------------------------------------------------
133If this environment variable exists and is non-null, the timestamp line
134in generated .config files is omitted.
135
136KCONFIG_AUTOCONFIG
137--------------------------------------------------
138This environment variable can be set to specify the path & name of the
139"auto.conf" file. Its default value is "include/config/auto.conf".
140
141KCONFIG_AUTOHEADER
142--------------------------------------------------
143This environment variable can be set to specify the path & name of the
144"autoconf.h" (header) file. Its default value is "include/linux/autoconf.h".
145
146______________________________________________________________________
147menuconfig User Interface Options
148----------------------------------------------------------------------
149MENUCONFIG_MODE
150--------------------------------------------------
151This mode shows all sub-menus in one large tree.
152
153Example:
154 MENUCONFIG_MODE=single_menu make menuconfig
155
156======================================================================
157xconfig
158--------------------------------------------------
159
160Searching in xconfig:
161
162 The Search function searches for kernel configuration symbol
163 names, so you have to know something close to what you are
164 looking for.
165
166 Example:
167 Ctrl-F hotplug
168 or
169 Menu: File, Search, hotplug
170
171 lists all config symbol entries that contain "hotplug" in
172 the symbol name. In this Search dialog, you may change the
173 config setting for any of the entries that are not grayed out.
174 You can also enter a different search string without having
175 to return to the main menu.
176
177
178======================================================================
179gconfig
180--------------------------------------------------
181
182Searching in gconfig:
183
184 None (gconfig isn't maintained as well as xconfig or menuconfig);
185 however, gconfig does have a few more viewing choices than
186 xconfig does.
187
188###
diff --git a/Documentation/kbuild/modules.txt b/Documentation/kbuild/modules.txt
index 1821c077b435..b1096da953c8 100644
--- a/Documentation/kbuild/modules.txt
+++ b/Documentation/kbuild/modules.txt
@@ -253,7 +253,7 @@ following files:
253 253
254 # Module specific targets 254 # Module specific targets
255 genbin: 255 genbin:
256 echo "X" > 8123_bin_shipped 256 echo "X" > 8123_bin.o_shipped
257 257
258 258
259 In example 2, we are down to two fairly simple files and for simple 259 In example 2, we are down to two fairly simple files and for simple
@@ -279,7 +279,7 @@ following files:
279 279
280 # Module specific targets 280 # Module specific targets
281 genbin: 281 genbin:
282 echo "X" > 8123_bin_shipped 282 echo "X" > 8123_bin.o_shipped
283 283
284 endif 284 endif
285 285
diff --git a/Documentation/kernel-doc-nano-HOWTO.txt b/Documentation/kernel-doc-nano-HOWTO.txt
index c6841eee9598..d73fbd2b2b45 100644
--- a/Documentation/kernel-doc-nano-HOWTO.txt
+++ b/Documentation/kernel-doc-nano-HOWTO.txt
@@ -71,6 +71,11 @@ The @argument descriptions must begin on the very next line following
71this opening short function description line, with no intervening 71this opening short function description line, with no intervening
72empty comment lines. 72empty comment lines.
73 73
74If a function parameter is "..." (varargs), it should be listed in
75kernel-doc notation as:
76 * @...: description
77
78
74Example kernel-doc data structure comment. 79Example kernel-doc data structure comment.
75 80
76/** 81/**
@@ -282,6 +287,32 @@ struct my_struct {
282}; 287};
283 288
284 289
290Including documentation blocks in source files
291----------------------------------------------
292
293To facilitate having source code and comments close together, you can
294include kernel-doc documentation blocks that are free-form comments
295instead of being kernel-doc for functions, structures, unions,
296enums, or typedefs. This could be used for something like a
297theory of operation for a driver or library code, for example.
298
299This is done by using a DOC: section keyword with a section title. E.g.:
300
301/**
302 * DOC: Theory of Operation
303 *
304 * The whizbang foobar is a dilly of a gizmo. It can do whatever you
305 * want it to do, at any time. It reads your mind. Here's how it works.
306 *
307 * foo bar splat
308 *
309 * The only drawback to this gizmo is that is can sometimes damage
310 * hardware, software, or its subject(s).
311 */
312
313DOC: sections are used in SGML templates files as indicated below.
314
315
285How to make new SGML template files 316How to make new SGML template files
286----------------------------------- 317-----------------------------------
287 318
@@ -302,6 +333,9 @@ exported using EXPORT_SYMBOL.
302!F<filename> <function [functions...]> is replaced by the 333!F<filename> <function [functions...]> is replaced by the
303documentation, in <filename>, for the functions listed. 334documentation, in <filename>, for the functions listed.
304 335
336!P<filename> <section title> is replaced by the contents of the DOC:
337section titled <section title> from <filename>.
338Spaces are allowed in <section title>; do not quote the <section title>.
305 339
306Tim. 340Tim.
307*/ <twaugh@redhat.com> 341*/ <twaugh@redhat.com>
diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt
index 31e0c2c3c6e3..8cc40a1bee06 100644
--- a/Documentation/kernel-parameters.txt
+++ b/Documentation/kernel-parameters.txt
@@ -92,6 +92,7 @@ parameter is applicable:
92 SUSPEND System suspend states are enabled. 92 SUSPEND System suspend states are enabled.
93 FTRACE Function tracing enabled. 93 FTRACE Function tracing enabled.
94 TS Appropriate touchscreen support is enabled. 94 TS Appropriate touchscreen support is enabled.
95 UMS USB Mass Storage support is enabled.
95 USB USB support is enabled. 96 USB USB support is enabled.
96 USBHID USB Human Interface Device support is enabled. 97 USBHID USB Human Interface Device support is enabled.
97 V4L Video For Linux support is enabled. 98 V4L Video For Linux support is enabled.
@@ -141,6 +142,7 @@ and is between 256 and 4096 characters. It is defined in the file
141 ht -- run only enough ACPI to enable Hyper Threading 142 ht -- run only enough ACPI to enable Hyper Threading
142 strict -- Be less tolerant of platforms that are not 143 strict -- Be less tolerant of platforms that are not
143 strictly ACPI specification compliant. 144 strictly ACPI specification compliant.
145 rsdt -- prefer RSDT over (default) XSDT
144 146
145 See also Documentation/power/pm.txt, pci=noacpi 147 See also Documentation/power/pm.txt, pci=noacpi
146 148
@@ -151,16 +153,20 @@ and is between 256 and 4096 characters. It is defined in the file
151 default: 0 153 default: 0
152 154
153 acpi_sleep= [HW,ACPI] Sleep options 155 acpi_sleep= [HW,ACPI] Sleep options
154 Format: { s3_bios, s3_mode, s3_beep, s4_nohwsig, old_ordering } 156 Format: { s3_bios, s3_mode, s3_beep, s4_nohwsig,
155 See Documentation/power/video.txt for s3_bios and s3_mode. 157 old_ordering, s4_nonvs }
158 See Documentation/power/video.txt for information on
159 s3_bios and s3_mode.
156 s3_beep is for debugging; it makes the PC's speaker beep 160 s3_beep is for debugging; it makes the PC's speaker beep
157 as soon as the kernel's real-mode entry point is called. 161 as soon as the kernel's real-mode entry point is called.
158 s4_nohwsig prevents ACPI hardware signature from being 162 s4_nohwsig prevents ACPI hardware signature from being
159 used during resume from hibernation. 163 used during resume from hibernation.
160 old_ordering causes the ACPI 1.0 ordering of the _PTS 164 old_ordering causes the ACPI 1.0 ordering of the _PTS
161 control method, wrt putting devices into low power 165 control method, with respect to putting devices into
162 states, to be enforced (the ACPI 2.0 ordering of _PTS is 166 low power states, to be enforced (the ACPI 2.0 ordering
163 used by default). 167 of _PTS is used by default).
168 s4_nonvs prevents the kernel from saving/restoring the
169 ACPI NVS memory during hibernation.
164 170
165 acpi_sci= [HW,ACPI] ACPI System Control Interrupt trigger mode 171 acpi_sci= [HW,ACPI] ACPI System Control Interrupt trigger mode
166 Format: { level | edge | high | low } 172 Format: { level | edge | high | low }
@@ -195,7 +201,7 @@ and is between 256 and 4096 characters. It is defined in the file
195 acpi_skip_timer_override [HW,ACPI] 201 acpi_skip_timer_override [HW,ACPI]
196 Recognize and ignore IRQ0/pin2 Interrupt Override. 202 Recognize and ignore IRQ0/pin2 Interrupt Override.
197 For broken nForce2 BIOS resulting in XT-PIC timer. 203 For broken nForce2 BIOS resulting in XT-PIC timer.
198 acpi_use_timer_override [HW,ACPI} 204 acpi_use_timer_override [HW,ACPI]
199 Use timer override. For some broken Nvidia NF5 boards 205 Use timer override. For some broken Nvidia NF5 boards
200 that require a timer override, but don't have 206 that require a timer override, but don't have
201 HPET 207 HPET
@@ -470,8 +476,8 @@ and is between 256 and 4096 characters. It is defined in the file
470 476
471 clearcpuid=BITNUM [X86] 477 clearcpuid=BITNUM [X86]
472 Disable CPUID feature X for the kernel. See 478 Disable CPUID feature X for the kernel. See
473 include/asm-x86/cpufeature.h for the valid bit numbers. 479 arch/x86/include/asm/cpufeature.h for the valid bit
474 Note the Linux specific bits are not necessarily 480 numbers. Note the Linux specific bits are not necessarily
475 stable over kernel options, but the vendor specific 481 stable over kernel options, but the vendor specific
476 ones should be. 482 ones should be.
477 Also note that user programs calling CPUID directly 483 Also note that user programs calling CPUID directly
@@ -552,6 +558,11 @@ and is between 256 and 4096 characters. It is defined in the file
552 not work reliably with all consoles, but is known 558 not work reliably with all consoles, but is known
553 to work with serial and VGA consoles. 559 to work with serial and VGA consoles.
554 560
561 coredump_filter=
562 [KNL] Change the default value for
563 /proc/<pid>/coredump_filter.
564 See also Documentation/filesystems/proc.txt.
565
555 cpcihp_generic= [HW,PCI] Generic port I/O CompactPCI driver 566 cpcihp_generic= [HW,PCI] Generic port I/O CompactPCI driver
556 Format: 567 Format:
557 <first_slot>,<last_slot>,<port>,<enum_bit>[,<debug>] 568 <first_slot>,<last_slot>,<port>,<enum_bit>[,<debug>]
@@ -567,9 +578,6 @@ and is between 256 and 4096 characters. It is defined in the file
567 a memory unit (amount[KMG]). See also 578 a memory unit (amount[KMG]). See also
568 Documentation/kdump/kdump.txt for a example. 579 Documentation/kdump/kdump.txt for a example.
569 580
570 cs4232= [HW,OSS]
571 Format: <io>,<irq>,<dma>,<dma2>,<mpuio>,<mpuirq>
572
573 cs89x0_dma= [HW,NET] 581 cs89x0_dma= [HW,NET]
574 Format: <dma> 582 Format: <dma>
575 583
@@ -722,10 +730,6 @@ and is between 256 and 4096 characters. It is defined in the file
722 Default value is 0. 730 Default value is 0.
723 Value can be changed at runtime via /selinux/enforce. 731 Value can be changed at runtime via /selinux/enforce.
724 732
725 es1371= [HW,OSS]
726 Format: <spdif>,[<nomix>,[<amplifier>]]
727 See also header of sound/oss/es1371.c.
728
729 ether= [HW,NET] Ethernet cards parameters 733 ether= [HW,NET] Ethernet cards parameters
730 This option is obsoleted by the "netdev=" option, which 734 This option is obsoleted by the "netdev=" option, which
731 has equivalent usage. See its documentation for details. 735 has equivalent usage. See its documentation for details.
@@ -824,8 +828,8 @@ and is between 256 and 4096 characters. It is defined in the file
824 828
825 hlt [BUGS=ARM,SH] 829 hlt [BUGS=ARM,SH]
826 830
827 hvc_iucv= [S390] Number of z/VM IUCV Hypervisor console (HVC) 831 hvc_iucv= [S390] Number of z/VM IUCV hypervisor console (HVC)
828 back-ends. Valid parameters: 0..8 832 terminal devices. Valid values: 0..8
829 833
830 i8042.debug [HW] Toggle i8042 debug mode 834 i8042.debug [HW] Toggle i8042 debug mode
831 i8042.direct [HW] Put keyboard port into non-translated mode 835 i8042.direct [HW] Put keyboard port into non-translated mode
@@ -873,17 +877,19 @@ and is between 256 and 4096 characters. It is defined in the file
873 See Documentation/ide/ide.txt. 877 See Documentation/ide/ide.txt.
874 878
875 idle= [X86] 879 idle= [X86]
876 Format: idle=poll or idle=mwait, idle=halt, idle=nomwait 880 Format: idle=poll, idle=mwait, idle=halt, idle=nomwait
877 Poll forces a polling idle loop that can slightly improves the performance 881 Poll forces a polling idle loop that can slightly
878 of waking up a idle CPU, but will use a lot of power and make the system 882 improve the performance of waking up a idle CPU, but
879 run hot. Not recommended. 883 will use a lot of power and make the system run hot.
880 idle=mwait. On systems which support MONITOR/MWAIT but the kernel chose 884 Not recommended.
881 to not use it because it doesn't save as much power as a normal idle 885 idle=mwait: On systems which support MONITOR/MWAIT but
882 loop use the MONITOR/MWAIT idle loop anyways. Performance should be the same 886 the kernel chose to not use it because it doesn't save
883 as idle=poll. 887 as much power as a normal idle loop, use the
884 idle=halt. Halt is forced to be used for CPU idle. 888 MONITOR/MWAIT idle loop anyways. Performance should be
889 the same as idle=poll.
890 idle=halt: Halt is forced to be used for CPU idle.
885 In such case C2/C3 won't be used again. 891 In such case C2/C3 won't be used again.
886 idle=nomwait. Disable mwait for CPU C-states 892 idle=nomwait: Disable mwait for CPU C-states
887 893
888 ide-pci-generic.all-generic-ide [HW] (E)IDE subsystem 894 ide-pci-generic.all-generic-ide [HW] (E)IDE subsystem
889 Claim all unknown PCI IDE storage controllers. 895 Claim all unknown PCI IDE storage controllers.
@@ -923,6 +929,10 @@ and is between 256 and 4096 characters. It is defined in the file
923 929
924 inttest= [IA64] 930 inttest= [IA64]
925 931
932 iomem= Disable strict checking of access to MMIO memory
933 strict regions from userspace.
934 relaxed
935
926 iommu= [x86] 936 iommu= [x86]
927 off 937 off
928 force 938 force
@@ -1074,8 +1084,8 @@ and is between 256 and 4096 characters. It is defined in the file
1074 lapic [X86-32,APIC] Enable the local APIC even if BIOS 1084 lapic [X86-32,APIC] Enable the local APIC even if BIOS
1075 disabled it. 1085 disabled it.
1076 1086
1077 lapic_timer_c2_ok [X86-32,x86-64,APIC] trust the local apic timer in 1087 lapic_timer_c2_ok [X86-32,x86-64,APIC] trust the local apic timer
1078 C2 power state. 1088 in C2 power state.
1079 1089
1080 libata.dma= [LIBATA] DMA control 1090 libata.dma= [LIBATA] DMA control
1081 libata.dma=0 Disable all PATA and SATA DMA 1091 libata.dma=0 Disable all PATA and SATA DMA
@@ -1127,6 +1137,8 @@ and is between 256 and 4096 characters. It is defined in the file
1127 If there are multiple matching configurations changing 1137 If there are multiple matching configurations changing
1128 the same attribute, the last one is used. 1138 the same attribute, the last one is used.
1129 1139
1140 lmb=debug [KNL] Enable lmb debug messages.
1141
1130 load_ramdisk= [RAM] List of ramdisks to load from floppy 1142 load_ramdisk= [RAM] List of ramdisks to load from floppy
1131 See Documentation/blockdev/ramdisk.txt. 1143 See Documentation/blockdev/ramdisk.txt.
1132 1144
@@ -1560,6 +1572,9 @@ and is between 256 and 4096 characters. It is defined in the file
1560 1572
1561 nosoftlockup [KNL] Disable the soft-lockup detector. 1573 nosoftlockup [KNL] Disable the soft-lockup detector.
1562 1574
1575 noswapaccount [KNL] Disable accounting of swap in memory resource
1576 controller. (See Documentation/controllers/memory.txt)
1577
1563 nosync [HW,M68K] Disables sync negotiation for all devices. 1578 nosync [HW,M68K] Disables sync negotiation for all devices.
1564 1579
1565 notsc [BUGS=X86-32] Disable Time Stamp Counter 1580 notsc [BUGS=X86-32] Disable Time Stamp Counter
@@ -1579,6 +1594,10 @@ and is between 256 and 4096 characters. It is defined in the file
1579 1594
1580 nr_uarts= [SERIAL] maximum number of UARTs to be registered. 1595 nr_uarts= [SERIAL] maximum number of UARTs to be registered.
1581 1596
1597 ohci1394_dma=early [HW] enable debugging via the ohci1394 driver.
1598 See Documentation/debugging-via-ohci1394.txt for more
1599 info.
1600
1582 olpc_ec_timeout= [OLPC] ms delay when issuing EC commands 1601 olpc_ec_timeout= [OLPC] ms delay when issuing EC commands
1583 Rather than timing out after 20 ms if an EC 1602 Rather than timing out after 20 ms if an EC
1584 command is not properly ACKed, override the length 1603 command is not properly ACKed, override the length
@@ -1803,10 +1822,10 @@ and is between 256 and 4096 characters. It is defined in the file
1803 autoconfiguration. 1822 autoconfiguration.
1804 Ranges are in pairs (memory base and size). 1823 Ranges are in pairs (memory base and size).
1805 1824
1806 dynamic_printk 1825 dynamic_printk Enables pr_debug()/dev_dbg() calls if
1807 Enables pr_debug()/dev_dbg() calls if 1826 CONFIG_DYNAMIC_PRINTK_DEBUG has been enabled.
1808 CONFIG_DYNAMIC_PRINTK_DEBUG has been enabled. These can also 1827 These can also be switched on/off via
1809 be switched on/off via <debugfs>/dynamic_printk/modules 1828 <debugfs>/dynamic_printk/modules
1810 1829
1811 print-fatal-signals= 1830 print-fatal-signals=
1812 [KNL] debug: print fatal signals 1831 [KNL] debug: print fatal signals
@@ -1894,7 +1913,7 @@ and is between 256 and 4096 characters. It is defined in the file
1894 1913
1895 reboot= [BUGS=X86-32,BUGS=ARM,BUGS=IA-64] Rebooting mode 1914 reboot= [BUGS=X86-32,BUGS=ARM,BUGS=IA-64] Rebooting mode
1896 Format: <reboot_mode>[,<reboot_mode2>[,...]] 1915 Format: <reboot_mode>[,<reboot_mode2>[,...]]
1897 See arch/*/kernel/reboot.c or arch/*/kernel/process.c 1916 See arch/*/kernel/reboot.c or arch/*/kernel/process.c
1898 1917
1899 relax_domain_level= 1918 relax_domain_level=
1900 [KNL, SMP] Set scheduler's default relax_domain_level. 1919 [KNL, SMP] Set scheduler's default relax_domain_level.
@@ -2294,7 +2313,8 @@ and is between 256 and 4096 characters. It is defined in the file
2294 2313
2295 thermal.psv= [HW,ACPI] 2314 thermal.psv= [HW,ACPI]
2296 -1: disable all passive trip points 2315 -1: disable all passive trip points
2297 <degrees C>: override all passive trip points to this value 2316 <degrees C>: override all passive trip points to this
2317 value
2298 2318
2299 thermal.tzp= [HW,ACPI] 2319 thermal.tzp= [HW,ACPI]
2300 Specify global default ACPI thermal zone polling rate 2320 Specify global default ACPI thermal zone polling rate
@@ -2382,6 +2402,41 @@ and is between 256 and 4096 characters. It is defined in the file
2382 usbhid.mousepoll= 2402 usbhid.mousepoll=
2383 [USBHID] The interval which mice are to be polled at. 2403 [USBHID] The interval which mice are to be polled at.
2384 2404
2405 usb-storage.delay_use=
2406 [UMS] The delay in seconds before a new device is
2407 scanned for Logical Units (default 5).
2408
2409 usb-storage.quirks=
2410 [UMS] A list of quirks entries to supplement or
2411 override the built-in unusual_devs list. List
2412 entries are separated by commas. Each entry has
2413 the form VID:PID:Flags where VID and PID are Vendor
2414 and Product ID values (4-digit hex numbers) and
2415 Flags is a set of characters, each corresponding
2416 to a common usb-storage quirk flag as follows:
2417 a = SANE_SENSE (collect more than 18 bytes
2418 of sense data);
2419 c = FIX_CAPACITY (decrease the reported
2420 device capacity by one sector);
2421 h = CAPACITY_HEURISTICS (decrease the
2422 reported device capacity by one
2423 sector if the number is odd);
2424 i = IGNORE_DEVICE (don't bind to this
2425 device);
2426 l = NOT_LOCKABLE (don't try to lock and
2427 unlock ejectable media);
2428 m = MAX_SECTORS_64 (don't transfer more
2429 than 64 sectors = 32 KB at a time);
2430 o = CAPACITY_OK (accept the capacity
2431 reported by the device);
2432 r = IGNORE_RESIDUE (the device reports
2433 bogus residue values);
2434 s = SINGLE_LUN (the device has only one
2435 Logical Unit);
2436 w = NO_WP_DETECT (don't test whether the
2437 medium is write-protected).
2438 Example: quirks=0419:aaf5:rl,0421:0433:rc
2439
2385 add_efi_memmap [EFI; x86-32,X86-64] Include EFI memory map in 2440 add_efi_memmap [EFI; x86-32,X86-64] Include EFI memory map in
2386 kernel's map of available physical RAM. 2441 kernel's map of available physical RAM.
2387 2442
@@ -2442,8 +2497,8 @@ and is between 256 and 4096 characters. It is defined in the file
2442 Format: 2497 Format:
2443 <irq>,<irq_mask>,<io>,<full_duplex>,<do_sound>,<lockup_hack>[,<irq2>[,<irq3>[,<irq4>]]] 2498 <irq>,<irq_mask>,<io>,<full_duplex>,<do_sound>,<lockup_hack>[,<irq2>[,<irq3>[,<irq4>]]]
2444 2499
2445 norandmaps Don't use address space randomization 2500 norandmaps Don't use address space randomization. Equivalent to
2446 Equivalent to echo 0 > /proc/sys/kernel/randomize_va_space 2501 echo 0 > /proc/sys/kernel/randomize_va_space
2447 2502
2448______________________________________________________________________ 2503______________________________________________________________________
2449 2504
diff --git a/Documentation/kobject.txt b/Documentation/kobject.txt
index f5d2aad65a67..b2e374586bd8 100644
--- a/Documentation/kobject.txt
+++ b/Documentation/kobject.txt
@@ -118,8 +118,8 @@ the name of the kobject, call kobject_rename():
118 118
119 int kobject_rename(struct kobject *kobj, const char *new_name); 119 int kobject_rename(struct kobject *kobj, const char *new_name);
120 120
121Note kobject_rename does perform any locking or have a solid notion of 121kobject_rename does not perform any locking or have a solid notion of
122what names are valid so the provide must provide their own sanity checking 122what names are valid so the caller must provide their own sanity checking
123and serialization. 123and serialization.
124 124
125There is a function called kobject_set_name() but that is legacy cruft and 125There is a function called kobject_set_name() but that is legacy cruft and
diff --git a/Documentation/kprobes.txt b/Documentation/kprobes.txt
index a79633d702bf..48b3de90eb1e 100644
--- a/Documentation/kprobes.txt
+++ b/Documentation/kprobes.txt
@@ -497,7 +497,10 @@ The first column provides the kernel address where the probe is inserted.
497The second column identifies the type of probe (k - kprobe, r - kretprobe 497The second column identifies the type of probe (k - kprobe, r - kretprobe
498and j - jprobe), while the third column specifies the symbol+offset of 498and j - jprobe), while the third column specifies the symbol+offset of
499the probe. If the probed function belongs to a module, the module name 499the probe. If the probed function belongs to a module, the module name
500is also specified. 500is also specified. Following columns show probe status. If the probe is on
501a virtual address that is no longer valid (module init sections, module
502virtual addresses that correspond to modules that've been unloaded),
503such probes are marked with [GONE].
501 504
502/debug/kprobes/enabled: Turn kprobes ON/OFF 505/debug/kprobes/enabled: Turn kprobes ON/OFF
503 506
diff --git a/Documentation/laptops/thinkpad-acpi.txt b/Documentation/laptops/thinkpad-acpi.txt
index 71f0fe1fc1b0..41bc99fa1884 100644
--- a/Documentation/laptops/thinkpad-acpi.txt
+++ b/Documentation/laptops/thinkpad-acpi.txt
@@ -1,7 +1,7 @@
1 ThinkPad ACPI Extras Driver 1 ThinkPad ACPI Extras Driver
2 2
3 Version 0.21 3 Version 0.22
4 May 29th, 2008 4 November 23rd, 2008
5 5
6 Borislav Deianov <borislav@users.sf.net> 6 Borislav Deianov <borislav@users.sf.net>
7 Henrique de Moraes Holschuh <hmh@hmh.eng.br> 7 Henrique de Moraes Holschuh <hmh@hmh.eng.br>
@@ -16,7 +16,8 @@ supported by the generic Linux ACPI drivers.
16This driver used to be named ibm-acpi until kernel 2.6.21 and release 16This driver used to be named ibm-acpi until kernel 2.6.21 and release
170.13-20070314. It used to be in the drivers/acpi tree, but it was 170.13-20070314. It used to be in the drivers/acpi tree, but it was
18moved to the drivers/misc tree and renamed to thinkpad-acpi for kernel 18moved to the drivers/misc tree and renamed to thinkpad-acpi for kernel
192.6.22, and release 0.14. 192.6.22, and release 0.14. It was moved to drivers/platform/x86 for
20kernel 2.6.29 and release 0.22.
20 21
21The driver is named "thinkpad-acpi". In some places, like module 22The driver is named "thinkpad-acpi". In some places, like module
22names, "thinkpad_acpi" is used because of userspace issues. 23names, "thinkpad_acpi" is used because of userspace issues.
@@ -1412,6 +1413,24 @@ Sysfs notes:
1412 rfkill controller switch "tpacpi_wwan_sw": refer to 1413 rfkill controller switch "tpacpi_wwan_sw": refer to
1413 Documentation/rfkill.txt for details. 1414 Documentation/rfkill.txt for details.
1414 1415
1416EXPERIMENTAL: UWB
1417-----------------
1418
1419This feature is marked EXPERIMENTAL because it has not been extensively
1420tested and validated in various ThinkPad models yet. The feature may not
1421work as expected. USE WITH CAUTION! To use this feature, you need to supply
1422the experimental=1 parameter when loading the module.
1423
1424sysfs rfkill class: switch "tpacpi_uwb_sw"
1425
1426This feature exports an rfkill controller for the UWB device, if one is
1427present and enabled in the BIOS.
1428
1429Sysfs notes:
1430
1431 rfkill controller switch "tpacpi_uwb_sw": refer to
1432 Documentation/rfkill.txt for details.
1433
1415Multiple Commands, Module Parameters 1434Multiple Commands, Module Parameters
1416------------------------------------ 1435------------------------------------
1417 1436
@@ -1475,7 +1494,7 @@ Sysfs interface changelog:
1475 1494
14760x020100: Marker for thinkpad-acpi with hot key NVRAM polling 14950x020100: Marker for thinkpad-acpi with hot key NVRAM polling
1477 support. If you must, use it to know you should not 1496 support. If you must, use it to know you should not
1478 start an userspace NVRAM poller (allows to detect when 1497 start a userspace NVRAM poller (allows to detect when
1479 NVRAM is compiled out by the user because it is 1498 NVRAM is compiled out by the user because it is
1480 unneeded/undesired in the first place). 1499 unneeded/undesired in the first place).
14810x020101: Marker for thinkpad-acpi with hot key NVRAM polling 15000x020101: Marker for thinkpad-acpi with hot key NVRAM polling
diff --git a/Documentation/lguest/Makefile b/Documentation/lguest/Makefile
index 725eef81cd48..1f4f9e888bd1 100644
--- a/Documentation/lguest/Makefile
+++ b/Documentation/lguest/Makefile
@@ -1,5 +1,5 @@
1# This creates the demonstration utility "lguest" which runs a Linux guest. 1# This creates the demonstration utility "lguest" which runs a Linux guest.
2CFLAGS:=-Wall -Wmissing-declarations -Wmissing-prototypes -O3 -I../../include -I../../arch/x86/include 2CFLAGS:=-Wall -Wmissing-declarations -Wmissing-prototypes -O3 -I../../include -I../../arch/x86/include -U_FORTIFY_SOURCE
3LDLIBS:=-lz 3LDLIBS:=-lz
4 4
5all: lguest 5all: lguest
diff --git a/Documentation/magic-number.txt b/Documentation/magic-number.txt
index 95070028d15e..505f19607542 100644
--- a/Documentation/magic-number.txt
+++ b/Documentation/magic-number.txt
@@ -125,14 +125,14 @@ TRIDENT_CARD_MAGIC 0x5072696E trident_card sound/oss/trident.c
125ROUTER_MAGIC 0x524d4157 wan_device include/linux/wanrouter.h 125ROUTER_MAGIC 0x524d4157 wan_device include/linux/wanrouter.h
126SCC_MAGIC 0x52696368 gs_port drivers/char/scc.h 126SCC_MAGIC 0x52696368 gs_port drivers/char/scc.h
127SAVEKMSG_MAGIC1 0x53415645 savekmsg arch/*/amiga/config.c 127SAVEKMSG_MAGIC1 0x53415645 savekmsg arch/*/amiga/config.c
128GDA_MAGIC 0x58464552 gda include/asm-mips64/sn/gda.h 128GDA_MAGIC 0x58464552 gda arch/mips/include/asm/sn/gda.h
129RED_MAGIC1 0x5a2cf071 (any) mm/slab.c 129RED_MAGIC1 0x5a2cf071 (any) mm/slab.c
130STL_PORTMAGIC 0x5a7182c9 stlport include/linux/stallion.h 130STL_PORTMAGIC 0x5a7182c9 stlport include/linux/stallion.h
131EEPROM_MAGIC_VALUE 0x5ab478d2 lanai_dev drivers/atm/lanai.c 131EEPROM_MAGIC_VALUE 0x5ab478d2 lanai_dev drivers/atm/lanai.c
132HDLCDRV_MAGIC 0x5ac6e778 hdlcdrv_state include/linux/hdlcdrv.h 132HDLCDRV_MAGIC 0x5ac6e778 hdlcdrv_state include/linux/hdlcdrv.h
133EPCA_MAGIC 0x5c6df104 channel include/linux/epca.h 133EPCA_MAGIC 0x5c6df104 channel include/linux/epca.h
134PCXX_MAGIC 0x5c6df104 channel drivers/char/pcxx.h 134PCXX_MAGIC 0x5c6df104 channel drivers/char/pcxx.h
135KV_MAGIC 0x5f4b565f kernel_vars_s include/asm-mips64/sn/klkernvars.h 135KV_MAGIC 0x5f4b565f kernel_vars_s arch/mips/include/asm/sn/klkernvars.h
136I810_STATE_MAGIC 0x63657373 i810_state sound/oss/i810_audio.c 136I810_STATE_MAGIC 0x63657373 i810_state sound/oss/i810_audio.c
137TRIDENT_STATE_MAGIC 0x63657373 trient_state sound/oss/trident.c 137TRIDENT_STATE_MAGIC 0x63657373 trient_state sound/oss/trident.c
138M3_CARD_MAGIC 0x646e6f50 m3_card sound/oss/maestro3.c 138M3_CARD_MAGIC 0x646e6f50 m3_card sound/oss/maestro3.c
@@ -158,7 +158,7 @@ CCB_MAGIC 0xf2691ad2 ccb drivers/scsi/ncr53c8xx.c
158QUEUE_MAGIC_FREE 0xf7e1c9a3 queue_entry drivers/scsi/arm/queue.c 158QUEUE_MAGIC_FREE 0xf7e1c9a3 queue_entry drivers/scsi/arm/queue.c
159QUEUE_MAGIC_USED 0xf7e1cc33 queue_entry drivers/scsi/arm/queue.c 159QUEUE_MAGIC_USED 0xf7e1cc33 queue_entry drivers/scsi/arm/queue.c
160HTB_CMAGIC 0xFEFAFEF1 htb_class net/sched/sch_htb.c 160HTB_CMAGIC 0xFEFAFEF1 htb_class net/sched/sch_htb.c
161NMI_MAGIC 0x48414d4d455201 nmi_s include/asm-mips64/sn/nmi.h 161NMI_MAGIC 0x48414d4d455201 nmi_s arch/mips/include/asm/sn/nmi.h
162 162
163Note that there are also defined special per-driver magic numbers in sound 163Note that there are also defined special per-driver magic numbers in sound
164memory management. See include/sound/sndmagic.h for complete list of them. Many 164memory management. See include/sound/sndmagic.h for complete list of them. Many
diff --git a/Documentation/memory-hotplug.txt b/Documentation/memory-hotplug.txt
index 168117bd6ee8..4c2ecf537a4a 100644
--- a/Documentation/memory-hotplug.txt
+++ b/Documentation/memory-hotplug.txt
@@ -124,7 +124,7 @@ config options.
124 This option can be kernel module too. 124 This option can be kernel module too.
125 125
126-------------------------------- 126--------------------------------
1273 sysfs files for memory hotplug 1274 sysfs files for memory hotplug
128-------------------------------- 128--------------------------------
129All sections have their device information under /sys/devices/system/memory as 129All sections have their device information under /sys/devices/system/memory as
130 130
@@ -138,11 +138,12 @@ For example, assume 1GiB section size. A device for a memory starting at
138(0x100000000 / 1Gib = 4) 138(0x100000000 / 1Gib = 4)
139This device covers address range [0x100000000 ... 0x140000000) 139This device covers address range [0x100000000 ... 0x140000000)
140 140
141Under each section, you can see 3 files. 141Under each section, you can see 4 files.
142 142
143/sys/devices/system/memory/memoryXXX/phys_index 143/sys/devices/system/memory/memoryXXX/phys_index
144/sys/devices/system/memory/memoryXXX/phys_device 144/sys/devices/system/memory/memoryXXX/phys_device
145/sys/devices/system/memory/memoryXXX/state 145/sys/devices/system/memory/memoryXXX/state
146/sys/devices/system/memory/memoryXXX/removable
146 147
147'phys_index' : read-only and contains section id, same as XXX. 148'phys_index' : read-only and contains section id, same as XXX.
148'state' : read-write 149'state' : read-write
@@ -150,10 +151,20 @@ Under each section, you can see 3 files.
150 at write: user can specify "online", "offline" command 151 at write: user can specify "online", "offline" command
151'phys_device': read-only: designed to show the name of physical memory device. 152'phys_device': read-only: designed to show the name of physical memory device.
152 This is not well implemented now. 153 This is not well implemented now.
154'removable' : read-only: contains an integer value indicating
155 whether the memory section is removable or not
156 removable. A value of 1 indicates that the memory
157 section is removable and a value of 0 indicates that
158 it is not removable.
153 159
154NOTE: 160NOTE:
155 These directories/files appear after physical memory hotplug phase. 161 These directories/files appear after physical memory hotplug phase.
156 162
163If CONFIG_NUMA is enabled the
164/sys/devices/system/memory/memoryXXX memory section
165directories can also be accessed via symbolic links located in
166the /sys/devices/system/node/node* directories. For example:
167/sys/devices/system/node/node0/memory9 -> ../../memory/memory9
157 168
158-------------------------------- 169--------------------------------
1594. Physical memory hot-add phase 1704. Physical memory hot-add phase
@@ -365,7 +376,6 @@ node if necessary.
365 - allowing memory hot-add to ZONE_MOVABLE. maybe we need some switch like 376 - allowing memory hot-add to ZONE_MOVABLE. maybe we need some switch like
366 sysctl or new control file. 377 sysctl or new control file.
367 - showing memory section and physical device relationship. 378 - showing memory section and physical device relationship.
368 - showing memory section and node relationship (maybe good for NUMA)
369 - showing memory section is under ZONE_MOVABLE or not 379 - showing memory section is under ZONE_MOVABLE or not
370 - test and make it better memory offlining. 380 - test and make it better memory offlining.
371 - support HugeTLB page migration and offlining. 381 - support HugeTLB page migration and offlining.
diff --git a/Documentation/mips/AU1xxx_IDE.README b/Documentation/mips/AU1xxx_IDE.README
index 25a6ed1aaa5b..8ace35ebdcd5 100644
--- a/Documentation/mips/AU1xxx_IDE.README
+++ b/Documentation/mips/AU1xxx_IDE.README
@@ -44,7 +44,7 @@ FILES, CONFIGS AND COMPATABILITY
44 44
45Two files are introduced: 45Two files are introduced:
46 46
47 a) 'include/asm-mips/mach-au1x00/au1xxx_ide.h' 47 a) 'arch/mips/include/asm/mach-au1x00/au1xxx_ide.h'
48 containes : struct _auide_hwif 48 containes : struct _auide_hwif
49 timing parameters for PIO mode 0/1/2/3/4 49 timing parameters for PIO mode 0/1/2/3/4
50 timing parameters for MWDMA 0/1/2 50 timing parameters for MWDMA 0/1/2
@@ -52,14 +52,12 @@ Two files are introduced:
52 b) 'drivers/ide/mips/au1xxx-ide.c' 52 b) 'drivers/ide/mips/au1xxx-ide.c'
53 contains the functionality of the AU1XXX IDE driver 53 contains the functionality of the AU1XXX IDE driver
54 54
55Four configs variables are introduced: 55Following extra configs variables are introduced:
56 56
57 CONFIG_BLK_DEV_IDE_AU1XXX_PIO_DBDMA - enable the PIO+DBDMA mode 57 CONFIG_BLK_DEV_IDE_AU1XXX_PIO_DBDMA - enable the PIO+DBDMA mode
58 CONFIG_BLK_DEV_IDE_AU1XXX_MDMA2_DBDMA - enable the MWDMA mode 58 CONFIG_BLK_DEV_IDE_AU1XXX_MDMA2_DBDMA - enable the MWDMA mode
59 CONFIG_BLK_DEV_IDE_AU1XXX_BURSTABLE_ON - set Burstable FIFO in DBDMA 59 CONFIG_BLK_DEV_IDE_AU1XXX_BURSTABLE_ON - set Burstable FIFO in DBDMA
60 controller 60 controller
61 CONFIG_BLK_DEV_IDE_AU1XXX_SEQTS_PER_RQ - maximum transfer size
62 per descriptor
63 61
64 62
65SUPPORTED IDE MODES 63SUPPORTED IDE MODES
@@ -87,7 +85,6 @@ CONFIG_BLK_DEV_IDEDMA_PCI=y
87CONFIG_IDEDMA_PCI_AUTO=y 85CONFIG_IDEDMA_PCI_AUTO=y
88CONFIG_BLK_DEV_IDE_AU1XXX=y 86CONFIG_BLK_DEV_IDE_AU1XXX=y
89CONFIG_BLK_DEV_IDE_AU1XXX_MDMA2_DBDMA=y 87CONFIG_BLK_DEV_IDE_AU1XXX_MDMA2_DBDMA=y
90CONFIG_BLK_DEV_IDE_AU1XXX_SEQTS_PER_RQ=128
91CONFIG_BLK_DEV_IDEDMA=y 88CONFIG_BLK_DEV_IDEDMA=y
92CONFIG_IDEDMA_AUTO=y 89CONFIG_IDEDMA_AUTO=y
93 90
@@ -105,7 +102,6 @@ CONFIG_BLK_DEV_IDEDMA_PCI=y
105CONFIG_IDEDMA_PCI_AUTO=y 102CONFIG_IDEDMA_PCI_AUTO=y
106CONFIG_BLK_DEV_IDE_AU1XXX=y 103CONFIG_BLK_DEV_IDE_AU1XXX=y
107CONFIG_BLK_DEV_IDE_AU1XXX_MDMA2_DBDMA=y 104CONFIG_BLK_DEV_IDE_AU1XXX_MDMA2_DBDMA=y
108CONFIG_BLK_DEV_IDE_AU1XXX_SEQTS_PER_RQ=128
109CONFIG_BLK_DEV_IDEDMA=y 105CONFIG_BLK_DEV_IDEDMA=y
110CONFIG_IDEDMA_AUTO=y 106CONFIG_IDEDMA_AUTO=y
111 107
diff --git a/Documentation/networking/alias.txt b/Documentation/networking/alias.txt
index cd12c2ff518a..85046f53fcfc 100644
--- a/Documentation/networking/alias.txt
+++ b/Documentation/networking/alias.txt
@@ -2,13 +2,13 @@
2IP-Aliasing: 2IP-Aliasing:
3============ 3============
4 4
5IP-aliases are additional IP-addresses/masks hooked up to a base 5IP-aliases are an obsolete way to manage multiple IP-addresses/masks
6interface by adding a colon and a string when running ifconfig. 6per interface. Newer tools such as iproute2 support multiple
7This string is usually numeric, but this is not a must. 7address/prefixes per interface, but aliases are still supported
8 8for backwards compatibility.
9IP-Aliases are avail if CONFIG_INET (`standard' IPv4 networking)
10is configured in the kernel.
11 9
10An alias is formed by adding a colon and a string when running ifconfig.
11This string is usually numeric, but this is not a must.
12 12
13o Alias creation. 13o Alias creation.
14 Alias creation is done by 'magic' interface naming: eg. to create a 14 Alias creation is done by 'magic' interface naming: eg. to create a
@@ -38,16 +38,3 @@ o Relationship with main device
38 38
39 If the base device is shut down the added aliases will be deleted 39 If the base device is shut down the added aliases will be deleted
40 too. 40 too.
41
42
43Contact
44-------
45Please finger or e-mail me:
46 Juan Jose Ciarlante <jjciarla@raiz.uncu.edu.ar>
47
48Updated by Erik Schoenfelder <schoenfr@gaertner.DE>
49
50; local variables:
51; mode: indented-text
52; mode: auto-fill
53; end:
diff --git a/Documentation/networking/netconsole.txt b/Documentation/networking/netconsole.txt
index 3c2f2b328638..8d022073e3ef 100644
--- a/Documentation/networking/netconsole.txt
+++ b/Documentation/networking/netconsole.txt
@@ -51,7 +51,8 @@ Built-in netconsole starts immediately after the TCP stack is
51initialized and attempts to bring up the supplied dev at the supplied 51initialized and attempts to bring up the supplied dev at the supplied
52address. 52address.
53 53
54The remote host can run either 'netcat -u -l -p <port>' or syslogd. 54The remote host can run either 'netcat -u -l -p <port>',
55'nc -l -u <port>' or syslogd.
55 56
56Dynamic reconfiguration: 57Dynamic reconfiguration:
57======================== 58========================
diff --git a/Documentation/networking/rxrpc.txt b/Documentation/networking/rxrpc.txt
index c3669a3fb4af..60d05eb77c64 100644
--- a/Documentation/networking/rxrpc.txt
+++ b/Documentation/networking/rxrpc.txt
@@ -540,7 +540,7 @@ A client would issue an operation by:
540 MSG_MORE should be set in msghdr::msg_flags on all but the last part of 540 MSG_MORE should be set in msghdr::msg_flags on all but the last part of
541 the request. Multiple requests may be made simultaneously. 541 the request. Multiple requests may be made simultaneously.
542 542
543 If a call is intended to go to a destination other then the default 543 If a call is intended to go to a destination other than the default
544 specified through connect(), then msghdr::msg_name should be set on the 544 specified through connect(), then msghdr::msg_name should be set on the
545 first request message of that call. 545 first request message of that call.
546 546
diff --git a/Documentation/networking/tuntap.txt b/Documentation/networking/tuntap.txt
index 839cbb71388b..c0aab985bad9 100644
--- a/Documentation/networking/tuntap.txt
+++ b/Documentation/networking/tuntap.txt
@@ -118,7 +118,7 @@ As mentioned above, main purpose of TUN/TAP driver is tunneling.
118It is used by VTun (http://vtun.sourceforge.net). 118It is used by VTun (http://vtun.sourceforge.net).
119 119
120Another interesting application using TUN/TAP is pipsecd 120Another interesting application using TUN/TAP is pipsecd
121(http://perso.enst.fr/~beyssac/pipsec/), an userspace IPSec 121(http://perso.enst.fr/~beyssac/pipsec/), a userspace IPSec
122implementation that can use complete kernel routing (unlike FreeS/WAN). 122implementation that can use complete kernel routing (unlike FreeS/WAN).
123 123
1243. How does Virtual network device actually work ? 1243. How does Virtual network device actually work ?
diff --git a/Documentation/nommu-mmap.txt b/Documentation/nommu-mmap.txt
index 7714f57caad5..b565e8279d13 100644
--- a/Documentation/nommu-mmap.txt
+++ b/Documentation/nommu-mmap.txt
@@ -109,12 +109,18 @@ and it's also much more restricted in the latter case:
109FURTHER NOTES ON NO-MMU MMAP 109FURTHER NOTES ON NO-MMU MMAP
110============================ 110============================
111 111
112 (*) A request for a private mapping of less than a page in size may not return 112 (*) A request for a private mapping of a file may return a buffer that is not
113 a page-aligned buffer. This is because the kernel calls kmalloc() to 113 page-aligned. This is because XIP may take place, and the data may not be
114 allocate the buffer, not get_free_page(). 114 paged aligned in the backing store.
115 115
116 (*) A list of all the mappings on the system is visible through /proc/maps in 116 (*) A request for an anonymous mapping will always be page aligned. If
117 no-MMU mode. 117 possible the size of the request should be a power of two otherwise some
118 of the space may be wasted as the kernel must allocate a power-of-2
119 granule but will only discard the excess if appropriately configured as
120 this has an effect on fragmentation.
121
122 (*) A list of all the private copy and anonymous mappings on the system is
123 visible through /proc/maps in no-MMU mode.
118 124
119 (*) A list of all the mappings in use by a process is visible through 125 (*) A list of all the mappings in use by a process is visible through
120 /proc/<pid>/maps in no-MMU mode. 126 /proc/<pid>/maps in no-MMU mode.
@@ -242,3 +248,18 @@ PROVIDING SHAREABLE BLOCK DEVICE SUPPORT
242Provision of shared mappings on block device files is exactly the same as for 248Provision of shared mappings on block device files is exactly the same as for
243character devices. If there isn't a real device underneath, then the driver 249character devices. If there isn't a real device underneath, then the driver
244should allocate sufficient contiguous memory to honour any supported mapping. 250should allocate sufficient contiguous memory to honour any supported mapping.
251
252
253=================================
254ADJUSTING PAGE TRIMMING BEHAVIOUR
255=================================
256
257NOMMU mmap automatically rounds up to the nearest power-of-2 number of pages
258when performing an allocation. This can have adverse effects on memory
259fragmentation, and as such, is left configurable. The default behaviour is to
260aggressively trim allocations and discard any excess pages back in to the page
261allocator. In order to retain finer-grained control over fragmentation, this
262behaviour can either be disabled completely, or bumped up to a higher page
263watermark where trimming begins.
264
265Page trimming behaviour is configurable via the sysctl `vm.nr_trim_pages'.
diff --git a/Documentation/powerpc/cpu_features.txt b/Documentation/powerpc/cpu_features.txt
index 472739880e87..ffa4183fdb8b 100644
--- a/Documentation/powerpc/cpu_features.txt
+++ b/Documentation/powerpc/cpu_features.txt
@@ -31,7 +31,7 @@ anyways).
31 31
32After detecting the processor type, the kernel patches out sections of code 32After detecting the processor type, the kernel patches out sections of code
33that shouldn't be used by writing nop's over it. Using cpufeatures requires 33that shouldn't be used by writing nop's over it. Using cpufeatures requires
34just 2 macros (found in include/asm-ppc/cputable.h), as seen in head.S 34just 2 macros (found in arch/powerpc/include/asm/cputable.h), as seen in head.S
35transfer_to_handler: 35transfer_to_handler:
36 36
37 #ifdef CONFIG_ALTIVEC 37 #ifdef CONFIG_ALTIVEC
diff --git a/Documentation/powerpc/dts-bindings/4xx/ndfc.txt b/Documentation/powerpc/dts-bindings/4xx/ndfc.txt
new file mode 100644
index 000000000000..869f0b5f16e8
--- /dev/null
+++ b/Documentation/powerpc/dts-bindings/4xx/ndfc.txt
@@ -0,0 +1,39 @@
1AMCC NDFC (NanD Flash Controller)
2
3Required properties:
4- compatible : "ibm,ndfc".
5- reg : should specify chip select and size used for the chip (0x2000).
6
7Optional properties:
8- ccr : NDFC config and control register value (default 0).
9- bank-settings : NDFC bank configuration register value (default 0).
10
11Notes:
12- partition(s) - follows the OF MTD standard for partitions
13
14Example:
15
16ndfc@1,0 {
17 compatible = "ibm,ndfc";
18 reg = <0x00000001 0x00000000 0x00002000>;
19 ccr = <0x00001000>;
20 bank-settings = <0x80002222>;
21 #address-cells = <1>;
22 #size-cells = <1>;
23
24 nand {
25 #address-cells = <1>;
26 #size-cells = <1>;
27
28 partition@0 {
29 label = "kernel";
30 reg = <0x00000000 0x00200000>;
31 };
32 partition@200000 {
33 label = "root";
34 reg = <0x00200000 0x03E00000>;
35 };
36 };
37};
38
39
diff --git a/Documentation/powerpc/dts-bindings/fsl/board.txt b/Documentation/powerpc/dts-bindings/fsl/board.txt
index 81a917ef96e9..6c974d28eeb4 100644
--- a/Documentation/powerpc/dts-bindings/fsl/board.txt
+++ b/Documentation/powerpc/dts-bindings/fsl/board.txt
@@ -18,7 +18,7 @@ This is the memory-mapped registers for on board FPGA.
18 18
19Required properities: 19Required properities:
20- compatible : should be "fsl,fpga-pixis". 20- compatible : should be "fsl,fpga-pixis".
21- reg : should contain the address and the lenght of the FPPGA register 21- reg : should contain the address and the length of the FPPGA register
22 set. 22 set.
23 23
24Example (MPC8610HPCD): 24Example (MPC8610HPCD):
@@ -27,3 +27,33 @@ Example (MPC8610HPCD):
27 compatible = "fsl,fpga-pixis"; 27 compatible = "fsl,fpga-pixis";
28 reg = <0xe8000000 32>; 28 reg = <0xe8000000 32>;
29 }; 29 };
30
31* Freescale BCSR GPIO banks
32
33Some BCSR registers act as simple GPIO controllers, each such
34register can be represented by the gpio-controller node.
35
36Required properities:
37- compatible : Should be "fsl,<board>-bcsr-gpio".
38- reg : Should contain the address and the length of the GPIO bank
39 register.
40- #gpio-cells : Should be two. The first cell is the pin number and the
41 second cell is used to specify optional paramters (currently unused).
42- gpio-controller : Marks the port as GPIO controller.
43
44Example:
45
46 bcsr@1,0 {
47 #address-cells = <1>;
48 #size-cells = <1>;
49 compatible = "fsl,mpc8360mds-bcsr";
50 reg = <1 0 0x8000>;
51 ranges = <0 1 0 0x8000>;
52
53 bcsr13: gpio-controller@d {
54 #gpio-cells = <2>;
55 compatible = "fsl,mpc8360mds-bcsr-gpio";
56 reg = <0xd 1>;
57 gpio-controller;
58 };
59 };
diff --git a/Documentation/powerpc/dts-bindings/fsl/mpc5200.txt b/Documentation/powerpc/dts-bindings/fsl/mpc5200.txt
new file mode 100644
index 000000000000..8447fd7090d0
--- /dev/null
+++ b/Documentation/powerpc/dts-bindings/fsl/mpc5200.txt
@@ -0,0 +1,180 @@
1MPC5200 Device Tree Bindings
2----------------------------
3
4(c) 2006-2009 Secret Lab Technologies Ltd
5Grant Likely <grant.likely@secretlab.ca>
6
7Naming conventions
8------------------
9For mpc5200 on-chip devices, the format for each compatible value is
10<chip>-<device>[-<mode>]. The OS should be able to match a device driver
11to the device based solely on the compatible value. If two drivers
12match on the compatible list; the 'most compatible' driver should be
13selected.
14
15The split between the MPC5200 and the MPC5200B leaves a bit of a
16conundrum. How should the compatible property be set up to provide
17maximum compatibility information; but still accurately describe the
18chip? For the MPC5200; the answer is easy. Most of the SoC devices
19originally appeared on the MPC5200. Since they didn't exist anywhere
20else; the 5200 compatible properties will contain only one item;
21"fsl,mpc5200-<device>".
22
23The 5200B is almost the same as the 5200, but not quite. It fixes
24silicon bugs and it adds a small number of enhancements. Most of the
25devices either provide exactly the same interface as on the 5200. A few
26devices have extra functions but still have a backwards compatible mode.
27To express this information as completely as possible, 5200B device trees
28should have two items in the compatible list:
29 compatible = "fsl,mpc5200b-<device>","fsl,mpc5200-<device>";
30
31It is *strongly* recommended that 5200B device trees follow this convention
32(instead of only listing the base mpc5200 item).
33
34ie. ethernet on mpc5200: compatible = "fsl,mpc5200-fec";
35 ethernet on mpc5200b: compatible = "fsl,mpc5200b-fec", "fsl,mpc5200-fec";
36
37Modal devices, like PSCs, also append the configured function to the
38end of the compatible field. ie. A PSC in i2s mode would specify
39"fsl,mpc5200-psc-i2s", not "fsl,mpc5200-i2s". This convention is chosen to
40avoid naming conflicts with non-psc devices providing the same
41function. For example, "fsl,mpc5200-spi" and "fsl,mpc5200-psc-spi" describe
42the mpc5200 simple spi device and a PSC spi mode respectively.
43
44At the time of writing, exact chip may be either 'fsl,mpc5200' or
45'fsl,mpc5200b'.
46
47The soc node
48------------
49This node describes the on chip SOC peripherals. Every mpc5200 based
50board will have this node, and as such there is a common naming
51convention for SOC devices.
52
53Required properties:
54name description
55---- -----------
56ranges Memory range of the internal memory mapped registers.
57 Should be <0 [baseaddr] 0xc000>
58reg Should be <[baseaddr] 0x100>
59compatible mpc5200: "fsl,mpc5200-immr"
60 mpc5200b: "fsl,mpc5200b-immr"
61system-frequency 'fsystem' frequency in Hz; XLB, IPB, USB and PCI
62 clocks are derived from the fsystem clock.
63bus-frequency IPB bus frequency in Hz. Clock rate
64 used by most of the soc devices.
65
66soc child nodes
67---------------
68Any on chip SOC devices available to Linux must appear as soc5200 child nodes.
69
70Note: The tables below show the value for the mpc5200. A mpc5200b device
71tree should use the "fsl,mpc5200b-<device>","fsl,mpc5200-<device>" form.
72
73Required soc5200 child nodes:
74name compatible Description
75---- ---------- -----------
76cdm@<addr> fsl,mpc5200-cdm Clock Distribution
77interrupt-controller@<addr> fsl,mpc5200-pic need an interrupt
78 controller to boot
79bestcomm@<addr> fsl,mpc5200-bestcomm Bestcomm DMA controller
80
81Recommended soc5200 child nodes; populate as needed for your board
82name compatible Description
83---- ---------- -----------
84timer@<addr> fsl,mpc5200-gpt General purpose timers
85gpio@<addr> fsl,mpc5200-gpio MPC5200 simple gpio controller
86gpio@<addr> fsl,mpc5200-gpio-wkup MPC5200 wakeup gpio controller
87rtc@<addr> fsl,mpc5200-rtc Real time clock
88mscan@<addr> fsl,mpc5200-mscan CAN bus controller
89pci@<addr> fsl,mpc5200-pci PCI bridge
90serial@<addr> fsl,mpc5200-psc-uart PSC in serial mode
91i2s@<addr> fsl,mpc5200-psc-i2s PSC in i2s mode
92ac97@<addr> fsl,mpc5200-psc-ac97 PSC in ac97 mode
93spi@<addr> fsl,mpc5200-psc-spi PSC in spi mode
94irda@<addr> fsl,mpc5200-psc-irda PSC in IrDA mode
95spi@<addr> fsl,mpc5200-spi MPC5200 spi device
96ethernet@<addr> fsl,mpc5200-fec MPC5200 ethernet device
97ata@<addr> fsl,mpc5200-ata IDE ATA interface
98i2c@<addr> fsl,mpc5200-i2c I2C controller
99usb@<addr> fsl,mpc5200-ohci,ohci-be USB controller
100xlb@<addr> fsl,mpc5200-xlb XLB arbitrator
101
102fsl,mpc5200-gpt nodes
103---------------------
104On the mpc5200 and 5200b, GPT0 has a watchdog timer function. If the board
105design supports the internal wdt, then the device node for GPT0 should
106include the empty property 'fsl,has-wdt'.
107
108An mpc5200-gpt can be used as a single line GPIO controller. To do so,
109add the following properties to the gpt node:
110 gpio-controller;
111 #gpio-cells = <2>;
112When referencing the GPIO line from another node, the first cell must always
113be zero and the second cell represents the gpio flags and described in the
114gpio device tree binding.
115
116An mpc5200-gpt can be used as a single line edge sensitive interrupt
117controller. To do so, add the following properties to the gpt node:
118 interrupt-controller;
119 #interrupt-cells = <1>;
120When referencing the IRQ line from another node, the cell represents the
121sense mode; 1 for edge rising, 2 for edge falling.
122
123fsl,mpc5200-psc nodes
124---------------------
125The PSCs should include a cell-index which is the index of the PSC in
126hardware. cell-index is used to determine which shared SoC registers to
127use when setting up PSC clocking. cell-index number starts at '0'. ie:
128 PSC1 has 'cell-index = <0>'
129 PSC4 has 'cell-index = <3>'
130
131PSC in i2s mode: The mpc5200 and mpc5200b PSCs are not compatible when in
132i2s mode. An 'mpc5200b-psc-i2s' node cannot include 'mpc5200-psc-i2s' in the
133compatible field.
134
135
136fsl,mpc5200-gpio and fsl,mpc5200-gpio-wkup nodes
137------------------------------------------------
138Each GPIO controller node should have the empty property gpio-controller and
139#gpio-cells set to 2. First cell is the GPIO number which is interpreted
140according to the bit numbers in the GPIO control registers. The second cell
141is for flags which is currently unused.
142
143fsl,mpc5200-fec nodes
144---------------------
145The FEC node can specify one of the following properties to configure
146the MII link:
147- fsl,7-wire-mode - An empty property that specifies the link uses 7-wire
148 mode instead of MII
149- current-speed - Specifies that the MII should be configured for a fixed
150 speed. This property should contain two cells. The
151 first cell specifies the speed in Mbps and the second
152 should be '0' for half duplex and '1' for full duplex
153- phy-handle - Contains a phandle to an Ethernet PHY.
154
155Interrupt controller (fsl,mpc5200-pic) node
156-------------------------------------------
157The mpc5200 pic binding splits hardware IRQ numbers into two levels. The
158split reflects the layout of the PIC hardware itself, which groups
159interrupts into one of three groups; CRIT, MAIN or PERP. Also, the
160Bestcomm dma engine has it's own set of interrupt sources which are
161cascaded off of peripheral interrupt 0, which the driver interprets as a
162fourth group, SDMA.
163
164The interrupts property for device nodes using the mpc5200 pic consists
165of three cells; <L1 L2 level>
166
167 L1 := [CRIT=0, MAIN=1, PERP=2, SDMA=3]
168 L2 := interrupt number; directly mapped from the value in the
169 "ICTL PerStat, MainStat, CritStat Encoded Register"
170 level := [LEVEL_HIGH=0, EDGE_RISING=1, EDGE_FALLING=2, LEVEL_LOW=3]
171
172For external IRQs, use the following interrupt property values (how to
173specify external interrupts is a frequently asked question):
174External interrupts:
175 external irq0: interrupts = <0 0 n>;
176 external irq1: interrupts = <1 1 n>;
177 external irq2: interrupts = <1 2 n>;
178 external irq3: interrupts = <1 3 n>;
179'n' is sense (0: level high, 1: edge rising, 2: edge falling 3: level low)
180
diff --git a/Documentation/powerpc/mpc52xx-device-tree-bindings.txt b/Documentation/powerpc/mpc52xx-device-tree-bindings.txt
deleted file mode 100644
index 6f12f1c79c0c..000000000000
--- a/Documentation/powerpc/mpc52xx-device-tree-bindings.txt
+++ /dev/null
@@ -1,277 +0,0 @@
1MPC5200 Device Tree Bindings
2----------------------------
3
4(c) 2006-2007 Secret Lab Technologies Ltd
5Grant Likely <grant.likely at secretlab.ca>
6
7********** DRAFT ***********
8* WARNING: Do not depend on the stability of these bindings just yet.
9* The MPC5200 device tree conventions are still in flux
10* Keep an eye on the linuxppc-dev mailing list for more details
11********** DRAFT ***********
12
13I - Introduction
14================
15Boards supported by the arch/powerpc architecture require device tree be
16passed by the boot loader to the kernel at boot time. The device tree
17describes what devices are present on the board and how they are
18connected. The device tree can either be passed as a binary blob (as
19described in Documentation/powerpc/booting-without-of.txt), or passed
20by Open Firmware (IEEE 1275) compatible firmware using an OF compatible
21client interface API.
22
23This document specifies the requirements on the device-tree for mpc5200
24based boards. These requirements are above and beyond the details
25specified in either the Open Firmware spec or booting-without-of.txt
26
27All new mpc5200-based boards are expected to match this document. In
28cases where this document is not sufficient to support a new board port,
29this document should be updated as part of adding the new board support.
30
31II - Philosophy
32===============
33The core of this document is naming convention. The whole point of
34defining this convention is to reduce or eliminate the number of
35special cases required to support a 5200 board. If all 5200 boards
36follow the same convention, then generic 5200 support code will work
37rather than coding special cases for each new board.
38
39This section tries to capture the thought process behind why the naming
40convention is what it is.
41
421. names
43---------
44There is strong convention/requirements already established for children
45of the root node. 'cpus' describes the processor cores, 'memory'
46describes memory, and 'chosen' provides boot configuration. Other nodes
47are added to describe devices attached to the processor local bus.
48
49Following convention already established with other system-on-chip
50processors, 5200 device trees should use the name 'soc5200' for the
51parent node of on chip devices, and the root node should be its parent.
52
53Child nodes are typically named after the configured function. ie.
54the FEC node is named 'ethernet', and a PSC in uart mode is named 'serial'.
55
562. device_type property
57-----------------------
58similar to the node name convention above; the device_type reflects the
59configured function of a device. ie. 'serial' for a uart and 'spi' for
60an spi controller. However, while node names *should* reflect the
61configured function, device_type *must* match the configured function
62exactly.
63
643. compatible property
65----------------------
66Since device_type isn't enough to match devices to drivers, there also
67needs to be a naming convention for the compatible property. Compatible
68is an list of device descriptions sorted from specific to generic. For
69the mpc5200, the required format for each compatible value is
70<chip>-<device>[-<mode>]. The OS should be able to match a device driver
71to the device based solely on the compatible value. If two drivers
72match on the compatible list; the 'most compatible' driver should be
73selected.
74
75The split between the MPC5200 and the MPC5200B leaves a bit of a
76conundrum. How should the compatible property be set up to provide
77maximum compatibility information; but still accurately describe the
78chip? For the MPC5200; the answer is easy. Most of the SoC devices
79originally appeared on the MPC5200. Since they didn't exist anywhere
80else; the 5200 compatible properties will contain only one item;
81"mpc5200-<device>".
82
83The 5200B is almost the same as the 5200, but not quite. It fixes
84silicon bugs and it adds a small number of enhancements. Most of the
85devices either provide exactly the same interface as on the 5200. A few
86devices have extra functions but still have a backwards compatible mode.
87To express this information as completely as possible, 5200B device trees
88should have two items in the compatible list;
89"mpc5200b-<device>\0mpc5200-<device>". It is *strongly* recommended
90that 5200B device trees follow this convention (instead of only listing
91the base mpc5200 item).
92
93If another chip appear on the market with one of the mpc5200 SoC
94devices, then the compatible list should include mpc5200-<device>.
95
96ie. ethernet on mpc5200: compatible = "mpc5200-ethernet"
97 ethernet on mpc5200b: compatible = "mpc5200b-ethernet\0mpc5200-ethernet"
98
99Modal devices, like PSCs, also append the configured function to the
100end of the compatible field. ie. A PSC in i2s mode would specify
101"mpc5200-psc-i2s", not "mpc5200-i2s". This convention is chosen to
102avoid naming conflicts with non-psc devices providing the same
103function. For example, "mpc5200-spi" and "mpc5200-psc-spi" describe
104the mpc5200 simple spi device and a PSC spi mode respectively.
105
106If the soc device is more generic and present on other SOCs, the
107compatible property can specify the more generic device type also.
108
109ie. mscan: compatible = "mpc5200-mscan\0fsl,mscan";
110
111At the time of writing, exact chip may be either 'mpc5200' or
112'mpc5200b'.
113
114Device drivers should always try to match as generically as possible.
115
116III - Structure
117===============
118The device tree for an mpc5200 board follows the structure defined in
119booting-without-of.txt with the following additional notes:
120
1210) the root node
122----------------
123Typical root description node; see booting-without-of
124
1251) The cpus node
126----------------
127The cpus node follows the basic layout described in booting-without-of.
128The bus-frequency property holds the XLB bus frequency
129The clock-frequency property holds the core frequency
130
1312) The memory node
132------------------
133Typical memory description node; see booting-without-of.
134
1353) The soc5200 node
136-------------------
137This node describes the on chip SOC peripherals. Every mpc5200 based
138board will have this node, and as such there is a common naming
139convention for SOC devices.
140
141Required properties:
142name type description
143---- ---- -----------
144device_type string must be "soc"
145ranges int should be <0 baseaddr baseaddr+10000>
146reg int must be <baseaddr 10000>
147compatible string mpc5200: "mpc5200-soc"
148 mpc5200b: "mpc5200b-soc\0mpc5200-soc"
149system-frequency int Fsystem frequency; source of all
150 other clocks.
151bus-frequency int IPB bus frequency in HZ. Clock rate
152 used by most of the soc devices.
153#interrupt-cells int must be <3>.
154
155Recommended properties:
156name type description
157---- ---- -----------
158model string Exact model of the chip;
159 ie: model="fsl,mpc5200"
160revision string Silicon revision of chip
161 ie: revision="M08A"
162
163The 'model' and 'revision' properties are *strongly* recommended. Having
164them presence acts as a bit of a safety net for working around as yet
165undiscovered bugs on one version of silicon. For example, device drivers
166can use the model and revision properties to decide if a bug fix should
167be turned on.
168
1694) soc5200 child nodes
170----------------------
171Any on chip SOC devices available to Linux must appear as soc5200 child nodes.
172
173Note: The tables below show the value for the mpc5200. A mpc5200b device
174tree should use the "mpc5200b-<device>\0mpc5200-<device> form.
175
176Required soc5200 child nodes:
177name device_type compatible Description
178---- ----------- ---------- -----------
179cdm@<addr> cdm mpc5200-cmd Clock Distribution
180pic@<addr> interrupt-controller mpc5200-pic need an interrupt
181 controller to boot
182bestcomm@<addr> dma-controller mpc5200-bestcomm 5200 pic also requires
183 the bestcomm device
184
185Recommended soc5200 child nodes; populate as needed for your board
186name device_type compatible Description
187---- ----------- ---------- -----------
188gpt@<addr> gpt fsl,mpc5200-gpt General purpose timers
189gpt@<addr> gpt fsl,mpc5200-gpt-gpio General purpose
190 timers in GPIO mode
191gpio@<addr> fsl,mpc5200-gpio MPC5200 simple gpio
192 controller
193gpio@<addr> fsl,mpc5200-gpio-wkup MPC5200 wakeup gpio
194 controller
195rtc@<addr> rtc mpc5200-rtc Real time clock
196mscan@<addr> mscan mpc5200-mscan CAN bus controller
197pci@<addr> pci mpc5200-pci PCI bridge
198serial@<addr> serial mpc5200-psc-uart PSC in serial mode
199i2s@<addr> sound mpc5200-psc-i2s PSC in i2s mode
200ac97@<addr> sound mpc5200-psc-ac97 PSC in ac97 mode
201spi@<addr> spi mpc5200-psc-spi PSC in spi mode
202irda@<addr> irda mpc5200-psc-irda PSC in IrDA mode
203spi@<addr> spi mpc5200-spi MPC5200 spi device
204ethernet@<addr> network mpc5200-fec MPC5200 ethernet device
205ata@<addr> ata mpc5200-ata IDE ATA interface
206i2c@<addr> i2c mpc5200-i2c I2C controller
207usb@<addr> usb-ohci-be mpc5200-ohci,ohci-be USB controller
208xlb@<addr> xlb mpc5200-xlb XLB arbitrator
209
210Important child node properties
211name type description
212---- ---- -----------
213cell-index int When multiple devices are present, is the
214 index of the device in the hardware (ie. There
215 are 6 PSC on the 5200 numbered PSC1 to PSC6)
216 PSC1 has 'cell-index = <0>'
217 PSC4 has 'cell-index = <3>'
218
2195) General Purpose Timer nodes (child of soc5200 node)
220On the mpc5200 and 5200b, GPT0 has a watchdog timer function. If the board
221design supports the internal wdt, then the device node for GPT0 should
222include the empty property 'fsl,has-wdt'.
223
2246) PSC nodes (child of soc5200 node)
225PSC nodes can define the optional 'port-number' property to force assignment
226order of serial ports. For example, PSC5 might be physically connected to
227the port labeled 'COM1' and PSC1 wired to 'COM1'. In this case, PSC5 would
228have a "port-number = <0>" property, and PSC1 would have "port-number = <1>".
229
230PSC in i2s mode: The mpc5200 and mpc5200b PSCs are not compatible when in
231i2s mode. An 'mpc5200b-psc-i2s' node cannot include 'mpc5200-psc-i2s' in the
232compatible field.
233
2347) GPIO controller nodes
235Each GPIO controller node should have the empty property gpio-controller and
236#gpio-cells set to 2. First cell is the GPIO number which is interpreted
237according to the bit numbers in the GPIO control registers. The second cell
238is for flags which is currently unsused.
239
2408) FEC nodes
241The FEC node can specify one of the following properties to configure
242the MII link:
243"fsl,7-wire-mode" - An empty property that specifies the link uses 7-wire
244 mode instead of MII
245"current-speed" - Specifies that the MII should be configured for a fixed
246 speed. This property should contain two cells. The
247 first cell specifies the speed in Mbps and the second
248 should be '0' for half duplex and '1' for full duplex
249"phy-handle" - Contains a phandle to an Ethernet PHY.
250
251IV - Extra Notes
252================
253
2541. Interrupt mapping
255--------------------
256The mpc5200 pic driver splits hardware IRQ numbers into two levels. The
257split reflects the layout of the PIC hardware itself, which groups
258interrupts into one of three groups; CRIT, MAIN or PERP. Also, the
259Bestcomm dma engine has it's own set of interrupt sources which are
260cascaded off of peripheral interrupt 0, which the driver interprets as a
261fourth group, SDMA.
262
263The interrupts property for device nodes using the mpc5200 pic consists
264of three cells; <L1 L2 level>
265
266 L1 := [CRIT=0, MAIN=1, PERP=2, SDMA=3]
267 L2 := interrupt number; directly mapped from the value in the
268 "ICTL PerStat, MainStat, CritStat Encoded Register"
269 level := [LEVEL_HIGH=0, EDGE_RISING=1, EDGE_FALLING=2, LEVEL_LOW=3]
270
2712. Shared registers
272-------------------
273Some SoC devices share registers between them. ie. the i2c devices use
274a single clock control register, and almost all device are affected by
275the port_config register. Devices which need to manipulate shared regs
276should look to the parent SoC node. The soc node is responsible
277for arbitrating all shared register access.
diff --git a/Documentation/s390/Debugging390.txt b/Documentation/s390/Debugging390.txt
index d30a281c570f..10711d9f0788 100644
--- a/Documentation/s390/Debugging390.txt
+++ b/Documentation/s390/Debugging390.txt
@@ -1402,7 +1402,7 @@ Syscalls are implemented on Linux for S390 by the Supervisor call instruction (S
1402possibilities of these as the instruction is made up of a 0xA opcode & the second byte being 1402possibilities of these as the instruction is made up of a 0xA opcode & the second byte being
1403the syscall number. They are traced using the simple command. 1403the syscall number. They are traced using the simple command.
1404TR SVC <Optional value or range> 1404TR SVC <Optional value or range>
1405the syscalls are defined in linux/include/asm-s390/unistd.h 1405the syscalls are defined in linux/arch/s390/include/asm/unistd.h
1406e.g. to trace all file opens just do 1406e.g. to trace all file opens just do
1407TR SVC 5 ( as this is the syscall number of open ) 1407TR SVC 5 ( as this is the syscall number of open )
1408 1408
diff --git a/Documentation/s390/cds.txt b/Documentation/s390/cds.txt
index c4b7b2bd369a..480a78ef5a1e 100644
--- a/Documentation/s390/cds.txt
+++ b/Documentation/s390/cds.txt
@@ -98,7 +98,7 @@ platform. Some of the interface routines are specific to Linux/390 and some
98of them can be found on other Linux platforms implementations too. 98of them can be found on other Linux platforms implementations too.
99Miscellaneous function prototypes, data declarations, and macro definitions 99Miscellaneous function prototypes, data declarations, and macro definitions
100can be found in the architecture specific C header file 100can be found in the architecture specific C header file
101linux/include/asm-s390/irq.h. 101linux/arch/s390/include/asm/irq.h.
102 102
103Overview of CDS interface concepts 103Overview of CDS interface concepts
104 104
diff --git a/Documentation/s390/s390dbf.txt b/Documentation/s390/s390dbf.txt
index e05420973698..2d10053dd97e 100644
--- a/Documentation/s390/s390dbf.txt
+++ b/Documentation/s390/s390dbf.txt
@@ -2,7 +2,7 @@ S390 Debug Feature
2================== 2==================
3 3
4files: arch/s390/kernel/debug.c 4files: arch/s390/kernel/debug.c
5 include/asm-s390/debug.h 5 arch/s390/include/asm/debug.h
6 6
7Description: 7Description:
8------------ 8------------
diff --git a/Documentation/scheduler/sched-design-CFS.txt b/Documentation/scheduler/sched-design-CFS.txt
index 8398ca4ff4ed..6f33593e59e2 100644
--- a/Documentation/scheduler/sched-design-CFS.txt
+++ b/Documentation/scheduler/sched-design-CFS.txt
@@ -231,7 +231,7 @@ CPU bandwidth control purposes:
231 231
232 This options needs CONFIG_CGROUPS to be defined, and lets the administrator 232 This options needs CONFIG_CGROUPS to be defined, and lets the administrator
233 create arbitrary groups of tasks, using the "cgroup" pseudo filesystem. See 233 create arbitrary groups of tasks, using the "cgroup" pseudo filesystem. See
234 Documentation/cgroups.txt for more information about this filesystem. 234 Documentation/cgroups/cgroups.txt for more information about this filesystem.
235 235
236Only one of these options to group tasks can be chosen and not both. 236Only one of these options to group tasks can be chosen and not both.
237 237
diff --git a/Documentation/scsi/ChangeLog.lpfc b/Documentation/scsi/ChangeLog.lpfc
index ae3f962a7cfc..ff19a52fe004 100644
--- a/Documentation/scsi/ChangeLog.lpfc
+++ b/Documentation/scsi/ChangeLog.lpfc
@@ -733,7 +733,7 @@ Changes from 20040920 to 20041018
733 I/O completion path a little more, especially taking care of 733 I/O completion path a little more, especially taking care of
734 fast-pathing the non-error case. Also removes tons of dead 734 fast-pathing the non-error case. Also removes tons of dead
735 members and defines from lpfc_scsi.h - e.g. lpfc_target is down 735 members and defines from lpfc_scsi.h - e.g. lpfc_target is down
736 to nothing more then the lpfc_nodelist pointer. 736 to nothing more than the lpfc_nodelist pointer.
737 * Added binary sysfs file to issue mbox commands 737 * Added binary sysfs file to issue mbox commands
738 * Replaced #if __BIG_ENDIAN with #if __BIG_ENDIAN_BITFIELD for 738 * Replaced #if __BIG_ENDIAN with #if __BIG_ENDIAN_BITFIELD for
739 compatibility with the user space applications. 739 compatibility with the user space applications.
diff --git a/Documentation/scsi/ChangeLog.ncr53c8xx b/Documentation/scsi/ChangeLog.ncr53c8xx
index a9f721aeb11c..8b278c10edfd 100644
--- a/Documentation/scsi/ChangeLog.ncr53c8xx
+++ b/Documentation/scsi/ChangeLog.ncr53c8xx
@@ -19,7 +19,7 @@ Sun Sep 24 21:30 2000 Gerard Roudier (groudier@club-internet.fr)
19 19
20Wed Jul 26 23:30 2000 Gerard Roudier (groudier@club-internet.fr) 20Wed Jul 26 23:30 2000 Gerard Roudier (groudier@club-internet.fr)
21 * version ncr53c8xx-3.4.1 21 * version ncr53c8xx-3.4.1
22 - Provide OpenFirmare path through the proc FS on PPC. 22 - Provide OpenFirmware path through the proc FS on PPC.
23 - Remove trailing argument #2 from a couple of #undefs. 23 - Remove trailing argument #2 from a couple of #undefs.
24 24
25Sun Jul 09 16:30 2000 Gerard Roudier (groudier@club-internet.fr) 25Sun Jul 09 16:30 2000 Gerard Roudier (groudier@club-internet.fr)
diff --git a/Documentation/scsi/ChangeLog.sym53c8xx b/Documentation/scsi/ChangeLog.sym53c8xx
index ef985ec348e6..02ffbc1e8a84 100644
--- a/Documentation/scsi/ChangeLog.sym53c8xx
+++ b/Documentation/scsi/ChangeLog.sym53c8xx
@@ -81,7 +81,7 @@ Sun Sep 24 21:30 2000 Gerard Roudier (groudier@club-internet.fr)
81 81
82Wed Jul 26 23:30 2000 Gerard Roudier (groudier@club-internet.fr) 82Wed Jul 26 23:30 2000 Gerard Roudier (groudier@club-internet.fr)
83 * version sym53c8xx-1.7.1 83 * version sym53c8xx-1.7.1
84 - Provide OpenFirmare path through the proc FS on PPC. 84 - Provide OpenFirmware path through the proc FS on PPC.
85 - Download of on-chip SRAM using memcpy_toio() doesn't work 85 - Download of on-chip SRAM using memcpy_toio() doesn't work
86 on PPC. Restore previous method (MEMORY MOVE from SCRIPTS). 86 on PPC. Restore previous method (MEMORY MOVE from SCRIPTS).
87 - Remove trailing argument #2 from a couple of #undefs. 87 - Remove trailing argument #2 from a couple of #undefs.
diff --git a/Documentation/scsi/scsi_fc_transport.txt b/Documentation/scsi/scsi_fc_transport.txt
index 38d324d62b25..e5b071d46619 100644
--- a/Documentation/scsi/scsi_fc_transport.txt
+++ b/Documentation/scsi/scsi_fc_transport.txt
@@ -191,7 +191,7 @@ Vport States:
191 This is equivalent to a driver "attach" on an adapter, which is 191 This is equivalent to a driver "attach" on an adapter, which is
192 independent of the adapter's link state. 192 independent of the adapter's link state.
193 - Instantiation of the vport on the FC link via ELS traffic, etc. 193 - Instantiation of the vport on the FC link via ELS traffic, etc.
194 This is equivalent to a "link up" and successfull link initialization. 194 This is equivalent to a "link up" and successful link initialization.
195 Further information can be found in the interfaces section below for 195 Further information can be found in the interfaces section below for
196 Vport Creation. 196 Vport Creation.
197 197
@@ -320,7 +320,7 @@ Vport Creation:
320 This is equivalent to a driver "attach" on an adapter, which is 320 This is equivalent to a driver "attach" on an adapter, which is
321 independent of the adapter's link state. 321 independent of the adapter's link state.
322 - Instantiation of the vport on the FC link via ELS traffic, etc. 322 - Instantiation of the vport on the FC link via ELS traffic, etc.
323 This is equivalent to a "link up" and successfull link initialization. 323 This is equivalent to a "link up" and successful link initialization.
324 324
325 The LLDD's vport_create() function will not synchronously wait for both 325 The LLDD's vport_create() function will not synchronously wait for both
326 parts to be fully completed before returning. It must validate that the 326 parts to be fully completed before returning. It must validate that the
diff --git a/Documentation/sound/alsa/HD-Audio-Models.txt b/Documentation/sound/alsa/HD-Audio-Models.txt
index 4b7ac21ea9eb..0f5d26bea80f 100644
--- a/Documentation/sound/alsa/HD-Audio-Models.txt
+++ b/Documentation/sound/alsa/HD-Audio-Models.txt
@@ -275,7 +275,8 @@ STAC9200
275 dell-m25 Dell Inspiron E1505n 275 dell-m25 Dell Inspiron E1505n
276 dell-m26 Dell Inspiron 1501 276 dell-m26 Dell Inspiron 1501
277 dell-m27 Dell Inspiron E1705/9400 277 dell-m27 Dell Inspiron E1705/9400
278 gateway Gateway laptops with EAPD control 278 gateway-m4 Gateway laptops with EAPD control
279 gateway-m4-2 Gateway laptops with EAPD control
279 panasonic Panasonic CF-74 280 panasonic Panasonic CF-74
280 281
281STAC9205/9254 282STAC9205/9254
@@ -302,6 +303,7 @@ STAC9220/9221
302 macbook-pro Intel Mac Book Pro 2nd generation (eq. type 3) 303 macbook-pro Intel Mac Book Pro 2nd generation (eq. type 3)
303 imac-intel Intel iMac (eq. type 2) 304 imac-intel Intel iMac (eq. type 2)
304 imac-intel-20 Intel iMac (newer version) (eq. type 3) 305 imac-intel-20 Intel iMac (newer version) (eq. type 3)
306 ecs202 ECS/PC chips
305 dell-d81 Dell (unknown) 307 dell-d81 Dell (unknown)
306 dell-d82 Dell (unknown) 308 dell-d82 Dell (unknown)
307 dell-m81 Dell (unknown) 309 dell-m81 Dell (unknown)
@@ -310,9 +312,13 @@ STAC9220/9221
310STAC9202/9250/9251 312STAC9202/9250/9251
311================== 313==================
312 ref Reference board, base config 314 ref Reference board, base config
315 m1 Some Gateway MX series laptops (NX560XL)
316 m1-2 Some Gateway MX series laptops (MX6453)
317 m2 Some Gateway MX series laptops (M255)
313 m2-2 Some Gateway MX series laptops 318 m2-2 Some Gateway MX series laptops
319 m3 Some Gateway MX series laptops
320 m5 Some Gateway MX series laptops (MP6954)
314 m6 Some Gateway NX series laptops 321 m6 Some Gateway NX series laptops
315 pa6 Gateway NX860 series
316 322
317STAC9227/9228/9229/927x 323STAC9227/9228/9229/927x
318======================= 324=======================
@@ -329,6 +335,7 @@ STAC92HD71B*
329 dell-m4-1 Dell desktops 335 dell-m4-1 Dell desktops
330 dell-m4-2 Dell desktops 336 dell-m4-2 Dell desktops
331 dell-m4-3 Dell desktops 337 dell-m4-3 Dell desktops
338 hp-m4 HP dv laptops
332 339
333STAC92HD73* 340STAC92HD73*
334=========== 341===========
@@ -337,10 +344,12 @@ STAC92HD73*
337 dell-m6-amic Dell desktops/laptops with analog mics 344 dell-m6-amic Dell desktops/laptops with analog mics
338 dell-m6-dmic Dell desktops/laptops with digital mics 345 dell-m6-dmic Dell desktops/laptops with digital mics
339 dell-m6 Dell desktops/laptops with both type of mics 346 dell-m6 Dell desktops/laptops with both type of mics
347 dell-eq Dell desktops/laptops
340 348
341STAC92HD83* 349STAC92HD83*
342=========== 350===========
343 ref Reference board 351 ref Reference board
352 mic-ref Reference board with power managment for ports
344 353
345STAC9872 354STAC9872
346======== 355========
diff --git a/Documentation/spi/spi-lm70llp b/Documentation/spi/spi-lm70llp
index 154bd02220b9..34a9cfd746bd 100644
--- a/Documentation/spi/spi-lm70llp
+++ b/Documentation/spi/spi-lm70llp
@@ -13,10 +13,20 @@ Description
13This driver provides glue code connecting a National Semiconductor LM70 LLP 13This driver provides glue code connecting a National Semiconductor LM70 LLP
14temperature sensor evaluation board to the kernel's SPI core subsystem. 14temperature sensor evaluation board to the kernel's SPI core subsystem.
15 15
16This is a SPI master controller driver. It can be used in conjunction with
17(layered under) the LM70 logical driver (a "SPI protocol driver").
16In effect, this driver turns the parallel port interface on the eval board 18In effect, this driver turns the parallel port interface on the eval board
17into a SPI bus with a single device, which will be driven by the generic 19into a SPI bus with a single device, which will be driven by the generic
18LM70 driver (drivers/hwmon/lm70.c). 20LM70 driver (drivers/hwmon/lm70.c).
19 21
22
23Hardware Interfacing
24--------------------
25The schematic for this particular board (the LM70EVAL-LLP) is
26available (on page 4) here:
27
28 http://www.national.com/appinfo/tempsensors/files/LM70LLPEVALmanual.pdf
29
20The hardware interfacing on the LM70 LLP eval board is as follows: 30The hardware interfacing on the LM70 LLP eval board is as follows:
21 31
22 Parallel LM70 LLP 32 Parallel LM70 LLP
diff --git a/Documentation/sysctl/vm.txt b/Documentation/sysctl/vm.txt
index d79eeda7a699..3197fc83bc51 100644
--- a/Documentation/sysctl/vm.txt
+++ b/Documentation/sysctl/vm.txt
@@ -1,12 +1,13 @@
1Documentation for /proc/sys/vm/* kernel version 2.2.10 1Documentation for /proc/sys/vm/* kernel version 2.6.29
2 (c) 1998, 1999, Rik van Riel <riel@nl.linux.org> 2 (c) 1998, 1999, Rik van Riel <riel@nl.linux.org>
3 (c) 2008 Peter W. Morreale <pmorreale@novell.com>
3 4
4For general info and legal blurb, please look in README. 5For general info and legal blurb, please look in README.
5 6
6============================================================== 7==============================================================
7 8
8This file contains the documentation for the sysctl files in 9This file contains the documentation for the sysctl files in
9/proc/sys/vm and is valid for Linux kernel version 2.2. 10/proc/sys/vm and is valid for Linux kernel version 2.6.29.
10 11
11The files in this directory can be used to tune the operation 12The files in this directory can be used to tune the operation
12of the virtual memory (VM) subsystem of the Linux kernel and 13of the virtual memory (VM) subsystem of the Linux kernel and
@@ -16,178 +17,274 @@ Default values and initialization routines for most of these
16files can be found in mm/swap.c. 17files can be found in mm/swap.c.
17 18
18Currently, these files are in /proc/sys/vm: 19Currently, these files are in /proc/sys/vm:
19- overcommit_memory 20
20- page-cluster 21- block_dump
21- dirty_ratio 22- dirty_background_bytes
22- dirty_background_ratio 23- dirty_background_ratio
24- dirty_bytes
23- dirty_expire_centisecs 25- dirty_expire_centisecs
26- dirty_ratio
24- dirty_writeback_centisecs 27- dirty_writeback_centisecs
25- highmem_is_dirtyable (only if CONFIG_HIGHMEM set) 28- drop_caches
29- hugepages_treat_as_movable
30- hugetlb_shm_group
31- laptop_mode
32- legacy_va_layout
33- lowmem_reserve_ratio
26- max_map_count 34- max_map_count
27- min_free_kbytes 35- min_free_kbytes
28- laptop_mode
29- block_dump
30- drop-caches
31- zone_reclaim_mode
32- min_unmapped_ratio
33- min_slab_ratio 36- min_slab_ratio
34- panic_on_oom 37- min_unmapped_ratio
35- oom_dump_tasks 38- mmap_min_addr
36- oom_kill_allocating_task
37- mmap_min_address
38- numa_zonelist_order
39- nr_hugepages 39- nr_hugepages
40- nr_overcommit_hugepages 40- nr_overcommit_hugepages
41- nr_pdflush_threads
42- nr_trim_pages (only if CONFIG_MMU=n)
43- numa_zonelist_order
44- oom_dump_tasks
45- oom_kill_allocating_task
46- overcommit_memory
47- overcommit_ratio
48- page-cluster
49- panic_on_oom
50- percpu_pagelist_fraction
51- stat_interval
52- swappiness
53- vfs_cache_pressure
54- zone_reclaim_mode
55
41 56
42============================================================== 57==============================================================
43 58
44dirty_ratio, dirty_background_ratio, dirty_expire_centisecs, 59block_dump
45dirty_writeback_centisecs, highmem_is_dirtyable,
46vfs_cache_pressure, laptop_mode, block_dump, swap_token_timeout,
47drop-caches, hugepages_treat_as_movable:
48 60
49See Documentation/filesystems/proc.txt 61block_dump enables block I/O debugging when set to a nonzero value. More
62information on block I/O debugging is in Documentation/laptops/laptop-mode.txt.
50 63
51============================================================== 64==============================================================
52 65
53overcommit_memory: 66dirty_background_bytes
54 67
55This value contains a flag that enables memory overcommitment. 68Contains the amount of dirty memory at which the pdflush background writeback
69daemon will start writeback.
56 70
57When this flag is 0, the kernel attempts to estimate the amount 71If dirty_background_bytes is written, dirty_background_ratio becomes a function
58of free memory left when userspace requests more memory. 72of its value (dirty_background_bytes / the amount of dirtyable system memory).
59 73
60When this flag is 1, the kernel pretends there is always enough 74==============================================================
61memory until it actually runs out.
62 75
63When this flag is 2, the kernel uses a "never overcommit" 76dirty_background_ratio
64policy that attempts to prevent any overcommit of memory.
65 77
66This feature can be very useful because there are a lot of 78Contains, as a percentage of total system memory, the number of pages at which
67programs that malloc() huge amounts of memory "just-in-case" 79the pdflush background writeback daemon will start writing out dirty data.
68and don't use much of it.
69 80
70The default value is 0. 81==============================================================
71 82
72See Documentation/vm/overcommit-accounting and 83dirty_bytes
73security/commoncap.c::cap_vm_enough_memory() for more information. 84
85Contains the amount of dirty memory at which a process generating disk writes
86will itself start writeback.
87
88If dirty_bytes is written, dirty_ratio becomes a function of its value
89(dirty_bytes / the amount of dirtyable system memory).
74 90
75============================================================== 91==============================================================
76 92
77overcommit_ratio: 93dirty_expire_centisecs
78 94
79When overcommit_memory is set to 2, the committed address 95This tunable is used to define when dirty data is old enough to be eligible
80space is not permitted to exceed swap plus this percentage 96for writeout by the pdflush daemons. It is expressed in 100'ths of a second.
81of physical RAM. See above. 97Data which has been dirty in-memory for longer than this interval will be
98written out next time a pdflush daemon wakes up.
99
100==============================================================
101
102dirty_ratio
103
104Contains, as a percentage of total system memory, the number of pages at which
105a process which is generating disk writes will itself start writing out dirty
106data.
82 107
83============================================================== 108==============================================================
84 109
85page-cluster: 110dirty_writeback_centisecs
86 111
87The Linux VM subsystem avoids excessive disk seeks by reading 112The pdflush writeback daemons will periodically wake up and write `old' data
88multiple pages on a page fault. The number of pages it reads 113out to disk. This tunable expresses the interval between those wakeups, in
89is dependent on the amount of memory in your machine. 114100'ths of a second.
90 115
91The number of pages the kernel reads in at once is equal to 116Setting this to zero disables periodic writeback altogether.
922 ^ page-cluster. Values above 2 ^ 5 don't make much sense
93for swap because we only cluster swap data in 32-page groups.
94 117
95============================================================== 118==============================================================
96 119
97max_map_count: 120drop_caches
98 121
99This file contains the maximum number of memory map areas a process 122Writing to this will cause the kernel to drop clean caches, dentries and
100may have. Memory map areas are used as a side-effect of calling 123inodes from memory, causing that memory to become free.
101malloc, directly by mmap and mprotect, and also when loading shared
102libraries.
103 124
104While most applications need less than a thousand maps, certain 125To free pagecache:
105programs, particularly malloc debuggers, may consume lots of them, 126 echo 1 > /proc/sys/vm/drop_caches
106e.g., up to one or two maps per allocation. 127To free dentries and inodes:
128 echo 2 > /proc/sys/vm/drop_caches
129To free pagecache, dentries and inodes:
130 echo 3 > /proc/sys/vm/drop_caches
107 131
108The default value is 65536. 132As this is a non-destructive operation and dirty objects are not freeable, the
133user should run `sync' first.
109 134
110============================================================== 135==============================================================
111 136
112min_free_kbytes: 137hugepages_treat_as_movable
113 138
114This is used to force the Linux VM to keep a minimum number 139This parameter is only useful when kernelcore= is specified at boot time to
115of kilobytes free. The VM uses this number to compute a pages_min 140create ZONE_MOVABLE for pages that may be reclaimed or migrated. Huge pages
116value for each lowmem zone in the system. Each lowmem zone gets 141are not movable so are not normally allocated from ZONE_MOVABLE. A non-zero
117a number of reserved free pages based proportionally on its size. 142value written to hugepages_treat_as_movable allows huge pages to be allocated
143from ZONE_MOVABLE.
118 144
119Some minimal amount of memory is needed to satisfy PF_MEMALLOC 145Once enabled, the ZONE_MOVABLE is treated as an area of memory the huge
120allocations; if you set this to lower than 1024KB, your system will 146pages pool can easily grow or shrink within. Assuming that applications are
121become subtly broken, and prone to deadlock under high loads. 147not running that mlock() a lot of memory, it is likely the huge pages pool
122 148can grow to the size of ZONE_MOVABLE by repeatedly entering the desired value
123Setting this too high will OOM your machine instantly. 149into nr_hugepages and triggering page reclaim.
124 150
125============================================================== 151==============================================================
126 152
127percpu_pagelist_fraction 153hugetlb_shm_group
128 154
129This is the fraction of pages at most (high mark pcp->high) in each zone that 155hugetlb_shm_group contains group id that is allowed to create SysV
130are allocated for each per cpu page list. The min value for this is 8. It 156shared memory segment using hugetlb page.
131means that we don't allow more than 1/8th of pages in each zone to be
132allocated in any single per_cpu_pagelist. This entry only changes the value
133of hot per cpu pagelists. User can specify a number like 100 to allocate
1341/100th of each zone to each per cpu page list.
135 157
136The batch value of each per cpu pagelist is also updated as a result. It is 158==============================================================
137set to pcp->high/4. The upper limit of batch is (PAGE_SHIFT * 8)
138 159
139The initial value is zero. Kernel does not use this value at boot time to set 160laptop_mode
140the high water marks for each per cpu page list.
141 161
142=============================================================== 162laptop_mode is a knob that controls "laptop mode". All the things that are
163controlled by this knob are discussed in Documentation/laptops/laptop-mode.txt.
143 164
144zone_reclaim_mode: 165==============================================================
145 166
146Zone_reclaim_mode allows someone to set more or less aggressive approaches to 167legacy_va_layout
147reclaim memory when a zone runs out of memory. If it is set to zero then no
148zone reclaim occurs. Allocations will be satisfied from other zones / nodes
149in the system.
150 168
151This is value ORed together of 169If non-zero, this sysctl disables the new 32-bit mmap mmap layout - the kernel
170will use the legacy (2.4) layout for all processes.
152 171
1531 = Zone reclaim on 172==============================================================
1542 = Zone reclaim writes dirty pages out
1554 = Zone reclaim swaps pages
156 173
157zone_reclaim_mode is set during bootup to 1 if it is determined that pages 174lowmem_reserve_ratio
158from remote zones will cause a measurable performance reduction. The 175
159page allocator will then reclaim easily reusable pages (those page 176For some specialised workloads on highmem machines it is dangerous for
160cache pages that are currently not used) before allocating off node pages. 177the kernel to allow process memory to be allocated from the "lowmem"
178zone. This is because that memory could then be pinned via the mlock()
179system call, or by unavailability of swapspace.
180
181And on large highmem machines this lack of reclaimable lowmem memory
182can be fatal.
183
184So the Linux page allocator has a mechanism which prevents allocations
185which _could_ use highmem from using too much lowmem. This means that
186a certain amount of lowmem is defended from the possibility of being
187captured into pinned user memory.
188
189(The same argument applies to the old 16 megabyte ISA DMA region. This
190mechanism will also defend that region from allocations which could use
191highmem or lowmem).
192
193The `lowmem_reserve_ratio' tunable determines how aggressive the kernel is
194in defending these lower zones.
195
196If you have a machine which uses highmem or ISA DMA and your
197applications are using mlock(), or if you are running with no swap then
198you probably should change the lowmem_reserve_ratio setting.
199
200The lowmem_reserve_ratio is an array. You can see them by reading this file.
201-
202% cat /proc/sys/vm/lowmem_reserve_ratio
203256 256 32
204-
205Note: # of this elements is one fewer than number of zones. Because the highest
206 zone's value is not necessary for following calculation.
207
208But, these values are not used directly. The kernel calculates # of protection
209pages for each zones from them. These are shown as array of protection pages
210in /proc/zoneinfo like followings. (This is an example of x86-64 box).
211Each zone has an array of protection pages like this.
212
213-
214Node 0, zone DMA
215 pages free 1355
216 min 3
217 low 3
218 high 4
219 :
220 :
221 numa_other 0
222 protection: (0, 2004, 2004, 2004)
223 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
224 pagesets
225 cpu: 0 pcp: 0
226 :
227-
228These protections are added to score to judge whether this zone should be used
229for page allocation or should be reclaimed.
230
231In this example, if normal pages (index=2) are required to this DMA zone and
232pages_high is used for watermark, the kernel judges this zone should not be
233used because pages_free(1355) is smaller than watermark + protection[2]
234(4 + 2004 = 2008). If this protection value is 0, this zone would be used for
235normal page requirement. If requirement is DMA zone(index=0), protection[0]
236(=0) is used.
237
238zone[i]'s protection[j] is calculated by following expression.
239
240(i < j):
241 zone[i]->protection[j]
242 = (total sums of present_pages from zone[i+1] to zone[j] on the node)
243 / lowmem_reserve_ratio[i];
244(i = j):
245 (should not be protected. = 0;
246(i > j):
247 (not necessary, but looks 0)
248
249The default values of lowmem_reserve_ratio[i] are
250 256 (if zone[i] means DMA or DMA32 zone)
251 32 (others).
252As above expression, they are reciprocal number of ratio.
253256 means 1/256. # of protection pages becomes about "0.39%" of total present
254pages of higher zones on the node.
255
256If you would like to protect more pages, smaller values are effective.
257The minimum value is 1 (1/1 -> 100%).
161 258
162It may be beneficial to switch off zone reclaim if the system is 259==============================================================
163used for a file server and all of memory should be used for caching files
164from disk. In that case the caching effect is more important than
165data locality.
166 260
167Allowing zone reclaim to write out pages stops processes that are 261max_map_count:
168writing large amounts of data from dirtying pages on other nodes. Zone
169reclaim will write out dirty pages if a zone fills up and so effectively
170throttle the process. This may decrease the performance of a single process
171since it cannot use all of system memory to buffer the outgoing writes
172anymore but it preserve the memory on other nodes so that the performance
173of other processes running on other nodes will not be affected.
174 262
175Allowing regular swap effectively restricts allocations to the local 263This file contains the maximum number of memory map areas a process
176node unless explicitly overridden by memory policies or cpuset 264may have. Memory map areas are used as a side-effect of calling
177configurations. 265malloc, directly by mmap and mprotect, and also when loading shared
266libraries.
178 267
179============================================================= 268While most applications need less than a thousand maps, certain
269programs, particularly malloc debuggers, may consume lots of them,
270e.g., up to one or two maps per allocation.
180 271
181min_unmapped_ratio: 272The default value is 65536.
182 273
183This is available only on NUMA kernels. 274==============================================================
184 275
185A percentage of the total pages in each zone. Zone reclaim will only 276min_free_kbytes:
186occur if more than this percentage of pages are file backed and unmapped.
187This is to insure that a minimal amount of local pages is still available for
188file I/O even if the node is overallocated.
189 277
190The default is 1 percent. 278This is used to force the Linux VM to keep a minimum number
279of kilobytes free. The VM uses this number to compute a pages_min
280value for each lowmem zone in the system. Each lowmem zone gets
281a number of reserved free pages based proportionally on its size.
282
283Some minimal amount of memory is needed to satisfy PF_MEMALLOC
284allocations; if you set this to lower than 1024KB, your system will
285become subtly broken, and prone to deadlock under high loads.
286
287Setting this too high will OOM your machine instantly.
191 288
192============================================================= 289=============================================================
193 290
@@ -209,82 +306,73 @@ and may not be fast.
209 306
210============================================================= 307=============================================================
211 308
212panic_on_oom 309min_unmapped_ratio:
213 310
214This enables or disables panic on out-of-memory feature. 311This is available only on NUMA kernels.
215 312
216If this is set to 0, the kernel will kill some rogue process, 313A percentage of the total pages in each zone. Zone reclaim will only
217called oom_killer. Usually, oom_killer can kill rogue processes and 314occur if more than this percentage of pages are file backed and unmapped.
218system will survive. 315This is to insure that a minimal amount of local pages is still available for
316file I/O even if the node is overallocated.
219 317
220If this is set to 1, the kernel panics when out-of-memory happens. 318The default is 1 percent.
221However, if a process limits using nodes by mempolicy/cpusets,
222and those nodes become memory exhaustion status, one process
223may be killed by oom-killer. No panic occurs in this case.
224Because other nodes' memory may be free. This means system total status
225may be not fatal yet.
226 319
227If this is set to 2, the kernel panics compulsorily even on the 320==============================================================
228above-mentioned.
229 321
230The default value is 0. 322mmap_min_addr
2311 and 2 are for failover of clustering. Please select either
232according to your policy of failover.
233 323
234============================================================= 324This file indicates the amount of address space which a user process will
325be restricted from mmaping. Since kernel null dereference bugs could
326accidentally operate based on the information in the first couple of pages
327of memory userspace processes should not be allowed to write to them. By
328default this value is set to 0 and no protections will be enforced by the
329security module. Setting this value to something like 64k will allow the
330vast majority of applications to work correctly and provide defense in depth
331against future potential kernel bugs.
235 332
236oom_dump_tasks 333==============================================================
237 334
238Enables a system-wide task dump (excluding kernel threads) to be 335nr_hugepages
239produced when the kernel performs an OOM-killing and includes such
240information as pid, uid, tgid, vm size, rss, cpu, oom_adj score, and
241name. This is helpful to determine why the OOM killer was invoked
242and to identify the rogue task that caused it.
243 336
244If this is set to zero, this information is suppressed. On very 337Change the minimum size of the hugepage pool.
245large systems with thousands of tasks it may not be feasible to dump
246the memory state information for each one. Such systems should not
247be forced to incur a performance penalty in OOM conditions when the
248information may not be desired.
249 338
250If this is set to non-zero, this information is shown whenever the 339See Documentation/vm/hugetlbpage.txt
251OOM killer actually kills a memory-hogging task.
252 340
253The default value is 0. 341==============================================================
254 342
255============================================================= 343nr_overcommit_hugepages
256 344
257oom_kill_allocating_task 345Change the maximum size of the hugepage pool. The maximum is
346nr_hugepages + nr_overcommit_hugepages.
258 347
259This enables or disables killing the OOM-triggering task in 348See Documentation/vm/hugetlbpage.txt
260out-of-memory situations.
261 349
262If this is set to zero, the OOM killer will scan through the entire 350==============================================================
263tasklist and select a task based on heuristics to kill. This normally
264selects a rogue memory-hogging task that frees up a large amount of
265memory when killed.
266 351
267If this is set to non-zero, the OOM killer simply kills the task that 352nr_pdflush_threads
268triggered the out-of-memory condition. This avoids the expensive
269tasklist scan.
270 353
271If panic_on_oom is selected, it takes precedence over whatever value 354The current number of pdflush threads. This value is read-only.
272is used in oom_kill_allocating_task. 355The value changes according to the number of dirty pages in the system.
273 356
274The default value is 0. 357When neccessary, additional pdflush threads are created, one per second, up to
358nr_pdflush_threads_max.
275 359
276============================================================== 360==============================================================
277 361
278mmap_min_addr 362nr_trim_pages
279 363
280This file indicates the amount of address space which a user process will 364This is available only on NOMMU kernels.
281be restricted from mmaping. Since kernel null dereference bugs could 365
282accidentally operate based on the information in the first couple of pages 366This value adjusts the excess page trimming behaviour of power-of-2 aligned
283of memory userspace processes should not be allowed to write to them. By 367NOMMU mmap allocations.
284default this value is set to 0 and no protections will be enforced by the 368
285security module. Setting this value to something like 64k will allow the 369A value of 0 disables trimming of allocations entirely, while a value of 1
286vast majority of applications to work correctly and provide defense in depth 370trims excess pages aggressively. Any value >= 1 acts as the watermark where
287against future potential kernel bugs. 371trimming of allocations is initiated.
372
373The default value is 1.
374
375See Documentation/nommu-mmap.txt for more information.
288 376
289============================================================== 377==============================================================
290 378
@@ -333,17 +421,199 @@ this is causing problems for your system/application.
333 421
334============================================================== 422==============================================================
335 423
336nr_hugepages 424oom_dump_tasks
337 425
338Change the minimum size of the hugepage pool. 426Enables a system-wide task dump (excluding kernel threads) to be
427produced when the kernel performs an OOM-killing and includes such
428information as pid, uid, tgid, vm size, rss, cpu, oom_adj score, and
429name. This is helpful to determine why the OOM killer was invoked
430and to identify the rogue task that caused it.
339 431
340See Documentation/vm/hugetlbpage.txt 432If this is set to zero, this information is suppressed. On very
433large systems with thousands of tasks it may not be feasible to dump
434the memory state information for each one. Such systems should not
435be forced to incur a performance penalty in OOM conditions when the
436information may not be desired.
437
438If this is set to non-zero, this information is shown whenever the
439OOM killer actually kills a memory-hogging task.
440
441The default value is 0.
341 442
342============================================================== 443==============================================================
343 444
344nr_overcommit_hugepages 445oom_kill_allocating_task
345 446
346Change the maximum size of the hugepage pool. The maximum is 447This enables or disables killing the OOM-triggering task in
347nr_hugepages + nr_overcommit_hugepages. 448out-of-memory situations.
348 449
349See Documentation/vm/hugetlbpage.txt 450If this is set to zero, the OOM killer will scan through the entire
451tasklist and select a task based on heuristics to kill. This normally
452selects a rogue memory-hogging task that frees up a large amount of
453memory when killed.
454
455If this is set to non-zero, the OOM killer simply kills the task that
456triggered the out-of-memory condition. This avoids the expensive
457tasklist scan.
458
459If panic_on_oom is selected, it takes precedence over whatever value
460is used in oom_kill_allocating_task.
461
462The default value is 0.
463
464==============================================================
465
466overcommit_memory:
467
468This value contains a flag that enables memory overcommitment.
469
470When this flag is 0, the kernel attempts to estimate the amount
471of free memory left when userspace requests more memory.
472
473When this flag is 1, the kernel pretends there is always enough
474memory until it actually runs out.
475
476When this flag is 2, the kernel uses a "never overcommit"
477policy that attempts to prevent any overcommit of memory.
478
479This feature can be very useful because there are a lot of
480programs that malloc() huge amounts of memory "just-in-case"
481and don't use much of it.
482
483The default value is 0.
484
485See Documentation/vm/overcommit-accounting and
486security/commoncap.c::cap_vm_enough_memory() for more information.
487
488==============================================================
489
490overcommit_ratio:
491
492When overcommit_memory is set to 2, the committed address
493space is not permitted to exceed swap plus this percentage
494of physical RAM. See above.
495
496==============================================================
497
498page-cluster
499
500page-cluster controls the number of pages which are written to swap in
501a single attempt. The swap I/O size.
502
503It is a logarithmic value - setting it to zero means "1 page", setting
504it to 1 means "2 pages", setting it to 2 means "4 pages", etc.
505
506The default value is three (eight pages at a time). There may be some
507small benefits in tuning this to a different value if your workload is
508swap-intensive.
509
510=============================================================
511
512panic_on_oom
513
514This enables or disables panic on out-of-memory feature.
515
516If this is set to 0, the kernel will kill some rogue process,
517called oom_killer. Usually, oom_killer can kill rogue processes and
518system will survive.
519
520If this is set to 1, the kernel panics when out-of-memory happens.
521However, if a process limits using nodes by mempolicy/cpusets,
522and those nodes become memory exhaustion status, one process
523may be killed by oom-killer. No panic occurs in this case.
524Because other nodes' memory may be free. This means system total status
525may be not fatal yet.
526
527If this is set to 2, the kernel panics compulsorily even on the
528above-mentioned.
529
530The default value is 0.
5311 and 2 are for failover of clustering. Please select either
532according to your policy of failover.
533
534=============================================================
535
536percpu_pagelist_fraction
537
538This is the fraction of pages at most (high mark pcp->high) in each zone that
539are allocated for each per cpu page list. The min value for this is 8. It
540means that we don't allow more than 1/8th of pages in each zone to be
541allocated in any single per_cpu_pagelist. This entry only changes the value
542of hot per cpu pagelists. User can specify a number like 100 to allocate
5431/100th of each zone to each per cpu page list.
544
545The batch value of each per cpu pagelist is also updated as a result. It is
546set to pcp->high/4. The upper limit of batch is (PAGE_SHIFT * 8)
547
548The initial value is zero. Kernel does not use this value at boot time to set
549the high water marks for each per cpu page list.
550
551==============================================================
552
553stat_interval
554
555The time interval between which vm statistics are updated. The default
556is 1 second.
557
558==============================================================
559
560swappiness
561
562This control is used to define how aggressive the kernel will swap
563memory pages. Higher values will increase agressiveness, lower values
564descrease the amount of swap.
565
566The default value is 60.
567
568==============================================================
569
570vfs_cache_pressure
571------------------
572
573Controls the tendency of the kernel to reclaim the memory which is used for
574caching of directory and inode objects.
575
576At the default value of vfs_cache_pressure=100 the kernel will attempt to
577reclaim dentries and inodes at a "fair" rate with respect to pagecache and
578swapcache reclaim. Decreasing vfs_cache_pressure causes the kernel to prefer
579to retain dentry and inode caches. Increasing vfs_cache_pressure beyond 100
580causes the kernel to prefer to reclaim dentries and inodes.
581
582==============================================================
583
584zone_reclaim_mode:
585
586Zone_reclaim_mode allows someone to set more or less aggressive approaches to
587reclaim memory when a zone runs out of memory. If it is set to zero then no
588zone reclaim occurs. Allocations will be satisfied from other zones / nodes
589in the system.
590
591This is value ORed together of
592
5931 = Zone reclaim on
5942 = Zone reclaim writes dirty pages out
5954 = Zone reclaim swaps pages
596
597zone_reclaim_mode is set during bootup to 1 if it is determined that pages
598from remote zones will cause a measurable performance reduction. The
599page allocator will then reclaim easily reusable pages (those page
600cache pages that are currently not used) before allocating off node pages.
601
602It may be beneficial to switch off zone reclaim if the system is
603used for a file server and all of memory should be used for caching files
604from disk. In that case the caching effect is more important than
605data locality.
606
607Allowing zone reclaim to write out pages stops processes that are
608writing large amounts of data from dirtying pages on other nodes. Zone
609reclaim will write out dirty pages if a zone fills up and so effectively
610throttle the process. This may decrease the performance of a single process
611since it cannot use all of system memory to buffer the outgoing writes
612anymore but it preserve the memory on other nodes so that the performance
613of other processes running on other nodes will not be affected.
614
615Allowing regular swap effectively restricts allocations to the local
616node unless explicitly overridden by memory policies or cpuset
617configurations.
618
619============ End of Document =================================
diff --git a/Documentation/sysrq.txt b/Documentation/sysrq.txt
index 10a0263ebb3f..9e592c718afb 100644
--- a/Documentation/sysrq.txt
+++ b/Documentation/sysrq.txt
@@ -1,6 +1,5 @@
1Linux Magic System Request Key Hacks 1Linux Magic System Request Key Hacks
2Documentation for sysrq.c 2Documentation for sysrq.c
3Last update: 2007-AUG-04
4 3
5* What is the magic SysRq key? 4* What is the magic SysRq key?
6~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -211,6 +210,24 @@ within a function called by handle_sysrq, you must be aware that you are in
211a lock (you are also in an interrupt handler, which means don't sleep!), so 210a lock (you are also in an interrupt handler, which means don't sleep!), so
212you must call __handle_sysrq_nolock instead. 211you must call __handle_sysrq_nolock instead.
213 212
213* When I hit a SysRq key combination only the header appears on the console?
214~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
215Sysrq output is subject to the same console loglevel control as all
216other console output. This means that if the kernel was booted 'quiet'
217as is common on distro kernels the output may not appear on the actual
218console, even though it will appear in the dmesg buffer, and be accessible
219via the dmesg command and to the consumers of /proc/kmsg. As a specific
220exception the header line from the sysrq command is passed to all console
221consumers as if the current loglevel was maximum. If only the header
222is emitted it is almost certain that the kernel loglevel is too low.
223Should you require the output on the console channel then you will need
224to temporarily up the console loglevel using alt-sysrq-8 or:
225
226 echo 8 > /proc/sysrq-trigger
227
228Remember to return the loglevel to normal after triggering the sysrq
229command you are interested in.
230
214* I have more questions, who can I ask? 231* I have more questions, who can I ask?
215~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 232~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
216And I'll answer any questions about the registration system you got, also 233And I'll answer any questions about the registration system you got, also
diff --git a/Documentation/usb/dma.txt b/Documentation/usb/dma.txt
index e8b50b7de9d9..cfdcd16e3abf 100644
--- a/Documentation/usb/dma.txt
+++ b/Documentation/usb/dma.txt
@@ -6,8 +6,9 @@ in the kernel usb programming guide (kerneldoc, from the source code).
6API OVERVIEW 6API OVERVIEW
7 7
8The big picture is that USB drivers can continue to ignore most DMA issues, 8The big picture is that USB drivers can continue to ignore most DMA issues,
9though they still must provide DMA-ready buffers (see DMA-mapping.txt). 9though they still must provide DMA-ready buffers (see
10That's how they've worked through the 2.4 (and earlier) kernels. 10Documentation/PCI/PCI-DMA-mapping.txt). That's how they've worked through
11the 2.4 (and earlier) kernels.
11 12
12OR: they can now be DMA-aware. 13OR: they can now be DMA-aware.
13 14
@@ -62,8 +63,8 @@ and effects like cache-trashing can impose subtle penalties.
62 force a consistent memory access ordering by using memory barriers. It's 63 force a consistent memory access ordering by using memory barriers. It's
63 not using a streaming DMA mapping, so it's good for small transfers on 64 not using a streaming DMA mapping, so it's good for small transfers on
64 systems where the I/O would otherwise thrash an IOMMU mapping. (See 65 systems where the I/O would otherwise thrash an IOMMU mapping. (See
65 Documentation/DMA-mapping.txt for definitions of "coherent" and "streaming" 66 Documentation/PCI/PCI-DMA-mapping.txt for definitions of "coherent" and
66 DMA mappings.) 67 "streaming" DMA mappings.)
67 68
68 Asking for 1/Nth of a page (as well as asking for N pages) is reasonably 69 Asking for 1/Nth of a page (as well as asking for N pages) is reasonably
69 space-efficient. 70 space-efficient.
@@ -93,7 +94,7 @@ WORKING WITH EXISTING BUFFERS
93Existing buffers aren't usable for DMA without first being mapped into the 94Existing buffers aren't usable for DMA without first being mapped into the
94DMA address space of the device. However, most buffers passed to your 95DMA address space of the device. However, most buffers passed to your
95driver can safely be used with such DMA mapping. (See the first section 96driver can safely be used with such DMA mapping. (See the first section
96of DMA-mapping.txt, titled "What memory is DMA-able?") 97of Documentation/PCI/PCI-DMA-mapping.txt, titled "What memory is DMA-able?")
97 98
98- When you're using scatterlists, you can map everything at once. On some 99- When you're using scatterlists, you can map everything at once. On some
99 systems, this kicks in an IOMMU and turns the scatterlists into single 100 systems, this kicks in an IOMMU and turns the scatterlists into single
diff --git a/Documentation/usb/power-management.txt b/Documentation/usb/power-management.txt
index e48ea1d51010..ad642615ad4c 100644
--- a/Documentation/usb/power-management.txt
+++ b/Documentation/usb/power-management.txt
@@ -313,11 +313,13 @@ three of the methods listed above. In addition, a driver indicates
313that it supports autosuspend by setting the .supports_autosuspend flag 313that it supports autosuspend by setting the .supports_autosuspend flag
314in its usb_driver structure. It is then responsible for informing the 314in its usb_driver structure. It is then responsible for informing the
315USB core whenever one of its interfaces becomes busy or idle. The 315USB core whenever one of its interfaces becomes busy or idle. The
316driver does so by calling these three functions: 316driver does so by calling these five functions:
317 317
318 int usb_autopm_get_interface(struct usb_interface *intf); 318 int usb_autopm_get_interface(struct usb_interface *intf);
319 void usb_autopm_put_interface(struct usb_interface *intf); 319 void usb_autopm_put_interface(struct usb_interface *intf);
320 int usb_autopm_set_interface(struct usb_interface *intf); 320 int usb_autopm_set_interface(struct usb_interface *intf);
321 int usb_autopm_get_interface_async(struct usb_interface *intf);
322 void usb_autopm_put_interface_async(struct usb_interface *intf);
321 323
322The functions work by maintaining a counter in the usb_interface 324The functions work by maintaining a counter in the usb_interface
323structure. When intf->pm_usage_count is > 0 then the interface is 325structure. When intf->pm_usage_count is > 0 then the interface is
@@ -330,10 +332,12 @@ associated with the device itself rather than any of its interfaces.
330This field is used only by the USB core.) 332This field is used only by the USB core.)
331 333
332The driver owns intf->pm_usage_count; it can modify the value however 334The driver owns intf->pm_usage_count; it can modify the value however
333and whenever it likes. A nice aspect of the usb_autopm_* routines is 335and whenever it likes. A nice aspect of the non-async usb_autopm_*
334that the changes they make are protected by the usb_device structure's 336routines is that the changes they make are protected by the usb_device
335PM mutex (udev->pm_mutex); however drivers may change pm_usage_count 337structure's PM mutex (udev->pm_mutex); however drivers may change
336without holding the mutex. 338pm_usage_count without holding the mutex. Drivers using the async
339routines are responsible for their own synchronization and mutual
340exclusion.
337 341
338 usb_autopm_get_interface() increments pm_usage_count and 342 usb_autopm_get_interface() increments pm_usage_count and
339 attempts an autoresume if the new value is > 0 and the 343 attempts an autoresume if the new value is > 0 and the
@@ -348,6 +352,14 @@ without holding the mutex.
348 is suspended, and it attempts an autosuspend if the value is 352 is suspended, and it attempts an autosuspend if the value is
349 <= 0 and the device isn't suspended. 353 <= 0 and the device isn't suspended.
350 354
355 usb_autopm_get_interface_async() and
356 usb_autopm_put_interface_async() do almost the same things as
357 their non-async counterparts. The differences are: they do
358 not acquire the PM mutex, and they use a workqueue to do their
359 jobs. As a result they can be called in an atomic context,
360 such as an URB's completion handler, but when they return the
361 device will not generally not yet be in the desired state.
362
351There also are a couple of utility routines drivers can use: 363There also are a couple of utility routines drivers can use:
352 364
353 usb_autopm_enable() sets pm_usage_cnt to 0 and then calls 365 usb_autopm_enable() sets pm_usage_cnt to 0 and then calls
diff --git a/Documentation/usb/wusb-cbaf b/Documentation/usb/wusb-cbaf
index 2e78b70f3adc..426ddaaef96f 100644
--- a/Documentation/usb/wusb-cbaf
+++ b/Documentation/usb/wusb-cbaf
@@ -80,12 +80,6 @@ case $1 in
80 start) 80 start)
81 for dev in ${2:-$hdevs} 81 for dev in ${2:-$hdevs}
82 do 82 do
83 uwb_rc=$(readlink -f $dev/uwb_rc)
84 if cat $uwb_rc/beacon | grep -q -- "-1"
85 then
86 echo 13 0 > $uwb_rc/beacon
87 echo I: started beaconing on ch 13 on $(basename $uwb_rc) >&2
88 fi
89 echo $host_CHID > $dev/wusb_chid 83 echo $host_CHID > $dev/wusb_chid
90 echo I: started host $(basename $dev) >&2 84 echo I: started host $(basename $dev) >&2
91 done 85 done
@@ -95,9 +89,6 @@ case $1 in
95 do 89 do
96 echo 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 > $dev/wusb_chid 90 echo 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 > $dev/wusb_chid
97 echo I: stopped host $(basename $dev) >&2 91 echo I: stopped host $(basename $dev) >&2
98 uwb_rc=$(readlink -f $dev/uwb_rc)
99 echo -1 | cat > $uwb_rc/beacon
100 echo I: stopped beaconing on $(basename $uwb_rc) >&2
101 done 92 done
102 ;; 93 ;;
103 set-chid) 94 set-chid)
diff --git a/Documentation/video4linux/CARDLIST.saa7134 b/Documentation/video4linux/CARDLIST.saa7134
index 335aef4dcaeb..b8d470596b0c 100644
--- a/Documentation/video4linux/CARDLIST.saa7134
+++ b/Documentation/video4linux/CARDLIST.saa7134
@@ -152,3 +152,4 @@
152151 -> ADS Tech Instant HDTV [1421:0380] 152151 -> ADS Tech Instant HDTV [1421:0380]
153152 -> Asus Tiger Rev:1.00 [1043:4857] 153152 -> Asus Tiger Rev:1.00 [1043:4857]
154153 -> Kworld Plus TV Analog Lite PCI [17de:7128] 154153 -> Kworld Plus TV Analog Lite PCI [17de:7128]
155154 -> Avermedia AVerTV GO 007 FM Plus [1461:f31d]
diff --git a/Documentation/video4linux/si470x.txt b/Documentation/video4linux/si470x.txt
index 11c5fd22a332..49679e6aaa76 100644
--- a/Documentation/video4linux/si470x.txt
+++ b/Documentation/video4linux/si470x.txt
@@ -41,6 +41,7 @@ chips are known to work:
41- 10c4:818a: Silicon Labs USB FM Radio Reference Design 41- 10c4:818a: Silicon Labs USB FM Radio Reference Design
42- 06e1:a155: ADS/Tech FM Radio Receiver (formerly Instant FM Music) (RDX-155-EF) 42- 06e1:a155: ADS/Tech FM Radio Receiver (formerly Instant FM Music) (RDX-155-EF)
43- 1b80:d700: KWorld USB FM Radio SnapMusic Mobile 700 (FM700) 43- 1b80:d700: KWorld USB FM Radio SnapMusic Mobile 700 (FM700)
44- 10c5:819a: DealExtreme USB Radio
44 45
45 46
46Software 47Software
diff --git a/Documentation/video4linux/v4l2-framework.txt b/Documentation/video4linux/v4l2-framework.txt
index eeae76c22a93..ff124374e9ba 100644
--- a/Documentation/video4linux/v4l2-framework.txt
+++ b/Documentation/video4linux/v4l2-framework.txt
@@ -184,7 +184,7 @@ may be NULL if the subdev driver does not support anything from that category.
184It looks like this: 184It looks like this:
185 185
186struct v4l2_subdev_core_ops { 186struct v4l2_subdev_core_ops {
187 int (*g_chip_ident)(struct v4l2_subdev *sd, struct v4l2_chip_ident *chip); 187 int (*g_chip_ident)(struct v4l2_subdev *sd, struct v4l2_dbg_chip_ident *chip);
188 int (*log_status)(struct v4l2_subdev *sd); 188 int (*log_status)(struct v4l2_subdev *sd);
189 int (*init)(struct v4l2_subdev *sd, u32 val); 189 int (*init)(struct v4l2_subdev *sd, u32 val);
190 ... 190 ...
@@ -390,16 +390,18 @@ allocated memory.
390 390
391You should also set these fields: 391You should also set these fields:
392 392
393- parent: set to the parent device (same device as was used to register 393- v4l2_dev: set to the v4l2_device parent device.
394 v4l2_device).
395- name: set to something descriptive and unique. 394- name: set to something descriptive and unique.
396- fops: set to the file_operations struct. 395- fops: set to the v4l2_file_operations struct.
397- ioctl_ops: if you use the v4l2_ioctl_ops to simplify ioctl maintenance 396- ioctl_ops: if you use the v4l2_ioctl_ops to simplify ioctl maintenance
398 (highly recommended to use this and it might become compulsory in the 397 (highly recommended to use this and it might become compulsory in the
399 future!), then set this to your v4l2_ioctl_ops struct. 398 future!), then set this to your v4l2_ioctl_ops struct.
400 399
401If you use v4l2_ioctl_ops, then you should set .unlocked_ioctl to 400If you use v4l2_ioctl_ops, then you should set either .unlocked_ioctl or
402__video_ioctl2 or .ioctl to video_ioctl2 in your file_operations struct. 401.ioctl to video_ioctl2 in your v4l2_file_operations struct.
402
403The v4l2_file_operations struct is a subset of file_operations. The main
404difference is that the inode argument is omitted since it is never used.
403 405
404 406
405video_device registration 407video_device registration
@@ -410,7 +412,7 @@ for you.
410 412
411 err = video_register_device(vdev, VFL_TYPE_GRABBER, -1); 413 err = video_register_device(vdev, VFL_TYPE_GRABBER, -1);
412 if (err) { 414 if (err) {
413 video_device_release(vdev); // or kfree(my_vdev); 415 video_device_release(vdev); /* or kfree(my_vdev); */
414 return err; 416 return err;
415 } 417 }
416 418
@@ -516,5 +518,4 @@ void *video_drvdata(struct file *file);
516 518
517You can go from a video_device struct to the v4l2_device struct using: 519You can go from a video_device struct to the v4l2_device struct using:
518 520
519struct v4l2_device *v4l2_dev = dev_get_drvdata(vdev->parent); 521struct v4l2_device *v4l2_dev = vdev->v4l2_dev;
520
diff --git a/Documentation/video4linux/v4lgrab.c b/Documentation/video4linux/v4lgrab.c
index 079b628481cf..d6e70bef8ad0 100644
--- a/Documentation/video4linux/v4lgrab.c
+++ b/Documentation/video4linux/v4lgrab.c
@@ -4,12 +4,21 @@
4 * 4 *
5 * Compile with: 5 * Compile with:
6 * gcc -s -Wall -Wstrict-prototypes v4lgrab.c -o v4lgrab 6 * gcc -s -Wall -Wstrict-prototypes v4lgrab.c -o v4lgrab
7 * Use as: 7 * Use as:
8 * v4lgrab >image.ppm 8 * v4lgrab >image.ppm
9 * 9 *
10 * Copyright (C) 1998-05-03, Phil Blundell <philb@gnu.org> 10 * Copyright (C) 1998-05-03, Phil Blundell <philb@gnu.org>
11 * Copied from http://www.tazenda.demon.co.uk/phil/vgrabber.c 11 * Copied from http://www.tazenda.demon.co.uk/phil/vgrabber.c
12 * with minor modifications (Dave Forrest, drf5n@virginia.edu). 12 * with minor modifications (Dave Forrest, drf5n@virginia.edu).
13 *
14 *
15 * For some cameras you may need to pre-load libv4l to perform
16 * the necessary decompression, e.g.:
17 *
18 * export LD_PRELOAD=/usr/lib/libv4l/v4l1compat.so
19 * ./v4lgrab >image.ppm
20 *
21 * see http://hansdegoede.livejournal.com/3636.html for details.
13 * 22 *
14 */ 23 */
15 24
@@ -24,7 +33,7 @@
24#include <linux/types.h> 33#include <linux/types.h>
25#include <linux/videodev.h> 34#include <linux/videodev.h>
26 35
27#define FILE "/dev/video0" 36#define VIDEO_DEV "/dev/video0"
28 37
29/* Stole this from tvset.c */ 38/* Stole this from tvset.c */
30 39
@@ -90,7 +99,7 @@ int get_brightness_adj(unsigned char *image, long size, int *brightness) {
90 99
91int main(int argc, char ** argv) 100int main(int argc, char ** argv)
92{ 101{
93 int fd = open(FILE, O_RDONLY), f; 102 int fd = open(VIDEO_DEV, O_RDONLY), f;
94 struct video_capability cap; 103 struct video_capability cap;
95 struct video_window win; 104 struct video_window win;
96 struct video_picture vpic; 105 struct video_picture vpic;
@@ -100,13 +109,13 @@ int main(int argc, char ** argv)
100 unsigned int i, src_depth; 109 unsigned int i, src_depth;
101 110
102 if (fd < 0) { 111 if (fd < 0) {
103 perror(FILE); 112 perror(VIDEO_DEV);
104 exit(1); 113 exit(1);
105 } 114 }
106 115
107 if (ioctl(fd, VIDIOCGCAP, &cap) < 0) { 116 if (ioctl(fd, VIDIOCGCAP, &cap) < 0) {
108 perror("VIDIOGCAP"); 117 perror("VIDIOGCAP");
109 fprintf(stderr, "(" FILE " not a video4linux device?)\n"); 118 fprintf(stderr, "(" VIDEO_DEV " not a video4linux device?)\n");
110 close(fd); 119 close(fd);
111 exit(1); 120 exit(1);
112 } 121 }
diff --git a/Documentation/vm/unevictable-lru.txt b/Documentation/vm/unevictable-lru.txt
index 125eed560e5a..0706a7282a8c 100644
--- a/Documentation/vm/unevictable-lru.txt
+++ b/Documentation/vm/unevictable-lru.txt
@@ -137,13 +137,6 @@ shrink_page_list() where they will be detected when vmscan walks the reverse
137map in try_to_unmap(). If try_to_unmap() returns SWAP_MLOCK, shrink_page_list() 137map in try_to_unmap(). If try_to_unmap() returns SWAP_MLOCK, shrink_page_list()
138will cull the page at that point. 138will cull the page at that point.
139 139
140Note that for anonymous pages, shrink_page_list() attempts to add the page to
141the swap cache before it tries to unmap the page. To avoid this unnecessary
142consumption of swap space, shrink_page_list() calls try_to_munlock() to check
143whether any VM_LOCKED vmas map the page without attempting to unmap the page.
144If try_to_munlock() returns SWAP_MLOCK, shrink_page_list() will cull the page
145without consuming swap space. try_to_munlock() will be described below.
146
147To "cull" an unevictable page, vmscan simply puts the page back on the lru 140To "cull" an unevictable page, vmscan simply puts the page back on the lru
148list using putback_lru_page()--the inverse operation to isolate_lru_page()-- 141list using putback_lru_page()--the inverse operation to isolate_lru_page()--
149after dropping the page lock. Because the condition which makes the page 142after dropping the page lock. Because the condition which makes the page
@@ -190,8 +183,8 @@ several places:
190 in the VM_LOCKED flag being set for the vma. 183 in the VM_LOCKED flag being set for the vma.
1913) in the fault path, if mlocked pages are "culled" in the fault path, 1843) in the fault path, if mlocked pages are "culled" in the fault path,
192 and when a VM_LOCKED stack segment is expanded. 185 and when a VM_LOCKED stack segment is expanded.
1934) as mentioned above, in vmscan:shrink_page_list() with attempting to 1864) as mentioned above, in vmscan:shrink_page_list() when attempting to
194 reclaim a page in a VM_LOCKED vma--via try_to_unmap() or try_to_munlock(). 187 reclaim a page in a VM_LOCKED vma via try_to_unmap().
195 188
196Mlocked pages become unlocked and rescued from the unevictable list when: 189Mlocked pages become unlocked and rescued from the unevictable list when:
197 190
@@ -260,9 +253,9 @@ mlock_fixup() filters several classes of "special" vmas:
260 253
2612) vmas mapping hugetlbfs page are already effectively pinned into memory. 2542) vmas mapping hugetlbfs page are already effectively pinned into memory.
262 We don't need nor want to mlock() these pages. However, to preserve the 255 We don't need nor want to mlock() these pages. However, to preserve the
263 prior behavior of mlock()--before the unevictable/mlock changes--mlock_fixup() 256 prior behavior of mlock()--before the unevictable/mlock changes--
264 will call make_pages_present() in the hugetlbfs vma range to allocate the 257 mlock_fixup() will call make_pages_present() in the hugetlbfs vma range
265 huge pages and populate the ptes. 258 to allocate the huge pages and populate the ptes.
266 259
2673) vmas with VM_DONTEXPAND|VM_RESERVED are generally user space mappings of 2603) vmas with VM_DONTEXPAND|VM_RESERVED are generally user space mappings of
268 kernel pages, such as the vdso page, relay channel pages, etc. These pages 261 kernel pages, such as the vdso page, relay channel pages, etc. These pages
@@ -322,7 +315,7 @@ __mlock_vma_pages_range()--the same function used to mlock a vma range--
322passing a flag to indicate that munlock() is being performed. 315passing a flag to indicate that munlock() is being performed.
323 316
324Because the vma access protections could have been changed to PROT_NONE after 317Because the vma access protections could have been changed to PROT_NONE after
325faulting in and mlocking some pages, get_user_pages() was unreliable for visiting 318faulting in and mlocking pages, get_user_pages() was unreliable for visiting
326these pages for munlocking. Because we don't want to leave pages mlocked(), 319these pages for munlocking. Because we don't want to leave pages mlocked(),
327get_user_pages() was enhanced to accept a flag to ignore the permissions when 320get_user_pages() was enhanced to accept a flag to ignore the permissions when
328fetching the pages--all of which should be resident as a result of previous 321fetching the pages--all of which should be resident as a result of previous
@@ -416,8 +409,8 @@ Mlocked Pages: munmap()/exit()/exec() System Call Handling
416When unmapping an mlocked region of memory, whether by an explicit call to 409When unmapping an mlocked region of memory, whether by an explicit call to
417munmap() or via an internal unmap from exit() or exec() processing, we must 410munmap() or via an internal unmap from exit() or exec() processing, we must
418munlock the pages if we're removing the last VM_LOCKED vma that maps the pages. 411munlock the pages if we're removing the last VM_LOCKED vma that maps the pages.
419Before the unevictable/mlock changes, mlocking did not mark the pages in any way, 412Before the unevictable/mlock changes, mlocking did not mark the pages in any
420so unmapping them required no processing. 413way, so unmapping them required no processing.
421 414
422To munlock a range of memory under the unevictable/mlock infrastructure, the 415To munlock a range of memory under the unevictable/mlock infrastructure, the
423munmap() hander and task address space tear down function call 416munmap() hander and task address space tear down function call
@@ -517,12 +510,10 @@ couldn't be mlocked.
517Mlocked pages: try_to_munlock() Reverse Map Scan 510Mlocked pages: try_to_munlock() Reverse Map Scan
518 511
519TODO/FIXME: a better name might be page_mlocked()--analogous to the 512TODO/FIXME: a better name might be page_mlocked()--analogous to the
520page_referenced() reverse map walker--especially if we continue to call this 513page_referenced() reverse map walker.
521from shrink_page_list(). See related TODO/FIXME below.
522 514
523When munlock_vma_page()--see "Mlocked Pages: munlock()/munlockall() System 515When munlock_vma_page()--see "Mlocked Pages: munlock()/munlockall()
524Call Handling" above--tries to munlock a page, or when shrink_page_list() 516System Call Handling" above--tries to munlock a page, it needs to
525encounters an anonymous page that is not yet in the swap cache, they need to
526determine whether or not the page is mapped by any VM_LOCKED vma, without 517determine whether or not the page is mapped by any VM_LOCKED vma, without
527actually attempting to unmap all ptes from the page. For this purpose, the 518actually attempting to unmap all ptes from the page. For this purpose, the
528unevictable/mlock infrastructure introduced a variant of try_to_unmap() called 519unevictable/mlock infrastructure introduced a variant of try_to_unmap() called
@@ -535,10 +526,7 @@ for VM_LOCKED vmas. When such a vma is found for anonymous pages and file
535pages mapped in linear VMAs, as in the try_to_unmap() case, the functions 526pages mapped in linear VMAs, as in the try_to_unmap() case, the functions
536attempt to acquire the associated mmap semphore, mlock the page via 527attempt to acquire the associated mmap semphore, mlock the page via
537mlock_vma_page() and return SWAP_MLOCK. This effectively undoes the 528mlock_vma_page() and return SWAP_MLOCK. This effectively undoes the
538pre-clearing of the page's PG_mlocked done by munlock_vma_page() and informs 529pre-clearing of the page's PG_mlocked done by munlock_vma_page.
539shrink_page_list() that the anonymous page should be culled rather than added
540to the swap cache in preparation for a try_to_unmap() that will almost
541certainly fail.
542 530
543If try_to_unmap() is unable to acquire a VM_LOCKED vma's associated mmap 531If try_to_unmap() is unable to acquire a VM_LOCKED vma's associated mmap
544semaphore, it will return SWAP_AGAIN. This will allow shrink_page_list() 532semaphore, it will return SWAP_AGAIN. This will allow shrink_page_list()
@@ -557,10 +545,7 @@ However, the scan can terminate when it encounters a VM_LOCKED vma and can
557successfully acquire the vma's mmap semphore for read and mlock the page. 545successfully acquire the vma's mmap semphore for read and mlock the page.
558Although try_to_munlock() can be called many [very many!] times when 546Although try_to_munlock() can be called many [very many!] times when
559munlock()ing a large region or tearing down a large address space that has been 547munlock()ing a large region or tearing down a large address space that has been
560mlocked via mlockall(), overall this is a fairly rare event. In addition, 548mlocked via mlockall(), overall this is a fairly rare event.
561although shrink_page_list() calls try_to_munlock() for every anonymous page that
562it handles that is not yet in the swap cache, on average anonymous pages will
563have very short reverse map lists.
564 549
565Mlocked Page: Page Reclaim in shrink_*_list() 550Mlocked Page: Page Reclaim in shrink_*_list()
566 551
@@ -588,8 +573,8 @@ Some examples of these unevictable pages on the LRU lists are:
588 munlock_vma_page() was forced to let the page back on to the normal 573 munlock_vma_page() was forced to let the page back on to the normal
589 LRU list for vmscan to handle. 574 LRU list for vmscan to handle.
590 575
591shrink_inactive_list() also culls any unevictable pages that it finds 576shrink_inactive_list() also culls any unevictable pages that it finds on
592on the inactive lists, again diverting them to the appropriate zone's unevictable 577the inactive lists, again diverting them to the appropriate zone's unevictable
593lru list. shrink_inactive_list() should only see SHM_LOCKed pages that became 578lru list. shrink_inactive_list() should only see SHM_LOCKed pages that became
594SHM_LOCKed after shrink_active_list() had moved them to the inactive list, or 579SHM_LOCKed after shrink_active_list() had moved them to the inactive list, or
595pages mapped into VM_LOCKED vmas that munlock_vma_page() couldn't isolate from 580pages mapped into VM_LOCKED vmas that munlock_vma_page() couldn't isolate from
@@ -597,19 +582,7 @@ the lru to recheck via try_to_munlock(). shrink_inactive_list() won't notice
597the latter, but will pass on to shrink_page_list(). 582the latter, but will pass on to shrink_page_list().
598 583
599shrink_page_list() again culls obviously unevictable pages that it could 584shrink_page_list() again culls obviously unevictable pages that it could
600encounter for similar reason to shrink_inactive_list(). As already discussed, 585encounter for similar reason to shrink_inactive_list(). Pages mapped into
601shrink_page_list() proactively looks for anonymous pages that should have
602PG_mlocked set but don't--these would not be detected by page_evictable()--to
603avoid adding them to the swap cache unnecessarily. File pages mapped into
604VM_LOCKED vmas but without PG_mlocked set will make it all the way to 586VM_LOCKED vmas but without PG_mlocked set will make it all the way to
605try_to_unmap(). shrink_page_list() will divert them to the unevictable list when 587try_to_unmap(). shrink_page_list() will divert them to the unevictable list
606try_to_unmap() returns SWAP_MLOCK, as discussed above. 588when try_to_unmap() returns SWAP_MLOCK, as discussed above.
607
608TODO/FIXME: If we can enhance the swap cache to reliably remove entries
609with page_count(page) > 2, as long as all ptes are mapped to the page and
610not the swap entry, we can probably remove the call to try_to_munlock() in
611shrink_page_list() and just remove the page from the swap cache when
612try_to_unmap() returns SWAP_MLOCK. Currently, remove_exclusive_swap_page()
613doesn't seem to allow that.
614
615
diff --git a/Documentation/w1/masters/00-INDEX b/Documentation/w1/masters/00-INDEX
index 7b0ceaaad7af..d63fa024ac05 100644
--- a/Documentation/w1/masters/00-INDEX
+++ b/Documentation/w1/masters/00-INDEX
@@ -4,5 +4,7 @@ ds2482
4 - The Maxim/Dallas Semiconductor DS2482 provides 1-wire busses. 4 - The Maxim/Dallas Semiconductor DS2482 provides 1-wire busses.
5ds2490 5ds2490
6 - The Maxim/Dallas Semiconductor DS2490 builds USB <-> W1 bridges. 6 - The Maxim/Dallas Semiconductor DS2490 builds USB <-> W1 bridges.
7mxc_w1
8 - W1 master controller driver found on Freescale MX2/MX3 SoCs
7w1-gpio 9w1-gpio
8 - GPIO 1-wire bus master driver. 10 - GPIO 1-wire bus master driver.
diff --git a/Documentation/w1/masters/mxc-w1 b/Documentation/w1/masters/mxc-w1
new file mode 100644
index 000000000000..97f6199a7f39
--- /dev/null
+++ b/Documentation/w1/masters/mxc-w1
@@ -0,0 +1,11 @@
1Kernel driver mxc_w1
2====================
3
4Supported chips:
5 * Freescale MX27, MX31 and probably other i.MX SoCs
6 Datasheets:
7 http://www.freescale.com/files/32bit/doc/data_sheet/MCIMX31.pdf?fpsp=1
8 http://www.freescale.com/files/dsp/MCIMX27.pdf?fpsp=1
9
10Author: Originally based on Freescale code, prepared for mainline by
11 Sascha Hauer <s.hauer@pengutronix.de>
diff --git a/Documentation/w1/w1.netlink b/Documentation/w1/w1.netlink
index 3640c7c87d45..804445f745ed 100644
--- a/Documentation/w1/w1.netlink
+++ b/Documentation/w1/w1.netlink
@@ -5,69 +5,157 @@ Message types.
5============= 5=============
6 6
7There are three types of messages between w1 core and userspace: 7There are three types of messages between w1 core and userspace:
81. Events. They are generated each time new master or slave device found 81. Events. They are generated each time new master or slave device
9 either due to automatic or requested search. 9 found either due to automatic or requested search.
102. Userspace commands. Includes read/write and search/alarm search comamnds. 102. Userspace commands.
113. Replies to userspace commands. 113. Replies to userspace commands.
12 12
13 13
14Protocol. 14Protocol.
15======== 15========
16 16
17[struct cn_msg] - connector header. It's length field is equal to size of the attached data. 17[struct cn_msg] - connector header.
18 Its length field is equal to size of the attached data
18[struct w1_netlink_msg] - w1 netlink header. 19[struct w1_netlink_msg] - w1 netlink header.
19 __u8 type - message type. 20 __u8 type - message type.
20 W1_SLAVE_ADD/W1_SLAVE_REMOVE - slave add/remove events. 21 W1_LIST_MASTERS
21 W1_MASTER_ADD/W1_MASTER_REMOVE - master add/remove events. 22 list current bus masters
22 W1_MASTER_CMD - userspace command for bus master device (search/alarm search). 23 W1_SLAVE_ADD/W1_SLAVE_REMOVE
23 W1_SLAVE_CMD - userspace command for slave device (read/write/ search/alarm search 24 slave add/remove events
24 for bus master device where given slave device found). 25 W1_MASTER_ADD/W1_MASTER_REMOVE
26 master add/remove events
27 W1_MASTER_CMD
28 userspace command for bus master
29 device (search/alarm search)
30 W1_SLAVE_CMD
31 userspace command for slave device
32 (read/write/touch)
25 __u8 res - reserved 33 __u8 res - reserved
26 __u16 len - size of attached to this header data. 34 __u16 len - size of data attached to this header data
27 union { 35 union {
28 __u8 id; - slave unique device id 36 __u8 id[8]; - slave unique device id
29 struct w1_mst { 37 struct w1_mst {
30 __u32 id; - master's id. 38 __u32 id; - master's id
31 __u32 res; - reserved 39 __u32 res; - reserved
32 } mst; 40 } mst;
33 } id; 41 } id;
34 42
35[strucrt w1_netlink_cmd] - command for gived master or slave device. 43[struct w1_netlink_cmd] - command for given master or slave device.
36 __u8 cmd - command opcode. 44 __u8 cmd - command opcode.
37 W1_CMD_READ - read command. 45 W1_CMD_READ - read command
38 W1_CMD_WRITE - write command. 46 W1_CMD_WRITE - write command
39 W1_CMD_SEARCH - search command. 47 W1_CMD_TOUCH - touch command
40 W1_CMD_ALARM_SEARCH - alarm search command. 48 (write and sample data back to userspace)
49 W1_CMD_SEARCH - search command
50 W1_CMD_ALARM_SEARCH - alarm search command
41 __u8 res - reserved 51 __u8 res - reserved
42 __u16 len - length of data for this command. 52 __u16 len - length of data for this command
43 For read command data must be allocated like for write command. 53 For read command data must be allocated like for write command
44 __u8 data[0] - data for this command. 54 __u8 data[0] - data for this command
45 55
46 56
47Each connector message can include one or more w1_netlink_msg with zero of more attached w1_netlink_cmd messages. 57Each connector message can include one or more w1_netlink_msg with
58zero or more attached w1_netlink_cmd messages.
48 59
49For event messages there are no w1_netlink_cmd embedded structures, only connector header 60For event messages there are no w1_netlink_cmd embedded structures,
50and w1_netlink_msg strucutre with "len" field being zero and filled type (one of event types) 61only connector header and w1_netlink_msg strucutre with "len" field
51and id - either 8 bytes of slave unique id in host order, or master's id, which is assigned 62being zero and filled type (one of event types) and id:
52to bus master device when it is added to w1 core. 63either 8 bytes of slave unique id in host order,
64or master's id, which is assigned to bus master device
65when it is added to w1 core.
66
67Currently replies to userspace commands are only generated for read
68command request. One reply is generated exactly for one w1_netlink_cmd
69read request. Replies are not combined when sent - i.e. typical reply
70messages looks like the following:
53 71
54Currently replies to userspace commands are only generated for read command request.
55One reply is generated exactly for one w1_netlink_cmd read request.
56Replies are not combined when sent - i.e. typical reply messages looks like the following:
57[cn_msg][w1_netlink_msg][w1_netlink_cmd] 72[cn_msg][w1_netlink_msg][w1_netlink_cmd]
58cn_msg.len = sizeof(struct w1_netlink_msg) + sizeof(struct w1_netlink_cmd) + cmd->len; 73cn_msg.len = sizeof(struct w1_netlink_msg) +
74 sizeof(struct w1_netlink_cmd) +
75 cmd->len;
59w1_netlink_msg.len = sizeof(struct w1_netlink_cmd) + cmd->len; 76w1_netlink_msg.len = sizeof(struct w1_netlink_cmd) + cmd->len;
60w1_netlink_cmd.len = cmd->len; 77w1_netlink_cmd.len = cmd->len;
61 78
79Replies to W1_LIST_MASTERS should send a message back to the userspace
80which will contain list of all registered master ids in the following
81format:
82
83 cn_msg (CN_W1_IDX.CN_W1_VAL as id, len is equal to sizeof(struct
84 w1_netlink_msg) plus number of masters multipled by 4)
85 w1_netlink_msg (type: W1_LIST_MASTERS, len is equal to
86 number of masters multiplied by 4 (u32 size))
87 id0 ... idN
88
89 Each message is at most 4k in size, so if number of master devices
90 exceeds this, it will be split into several messages,
91 cn.seq will be increased for each one.
92
93W1 search and alarm search commands.
94request:
95[cn_msg]
96 [w1_netlink_msg type = W1_MASTER_CMD
97 id is equal to the bus master id to use for searching]
98 [w1_netlink_cmd cmd = W1_CMD_SEARCH or W1_CMD_ALARM_SEARCH]
99
100reply:
101 [cn_msg, ack = 1 and increasing, 0 means the last message,
102 seq is equal to the request seq]
103 [w1_netlink_msg type = W1_MASTER_CMD]
104 [w1_netlink_cmd cmd = W1_CMD_SEARCH or W1_CMD_ALARM_SEARCH
105 len is equal to number of IDs multiplied by 8]
106 [64bit-id0 ... 64bit-idN]
107Length in each header corresponds to the size of the data behind it, so
108w1_netlink_cmd->len = N * 8; where N is number of IDs in this message.
109 Can be zero.
110w1_netlink_msg->len = sizeof(struct w1_netlink_cmd) + N * 8;
111cn_msg->len = sizeof(struct w1_netlink_msg) +
112 sizeof(struct w1_netlink_cmd) +
113 N*8;
114
115W1 reset command.
116[cn_msg]
117 [w1_netlink_msg type = W1_MASTER_CMD
118 id is equal to the bus master id to use for searching]
119 [w1_netlink_cmd cmd = W1_CMD_RESET]
120
121
122Command status replies.
123======================
124
125Each command (either root, master or slave with or without w1_netlink_cmd
126structure) will be 'acked' by the w1 core. Format of the reply is the same
127as request message except that length parameters do not account for data
128requested by the user, i.e. read/write/touch IO requests will not contain
129data, so w1_netlink_cmd.len will be 0, w1_netlink_msg.len will be size
130of the w1_netlink_cmd structure and cn_msg.len will be equal to the sum
131of the sizeof(struct w1_netlink_msg) and sizeof(struct w1_netlink_cmd).
132If reply is generated for master or root command (which do not have
133w1_netlink_cmd attached), reply will contain only cn_msg and w1_netlink_msg
134structires.
135
136w1_netlink_msg.status field will carry positive error value
137(EINVAL for example) or zero in case of success.
138
139All other fields in every structure will mirror the same parameters in the
140request message (except lengths as described above).
141
142Status reply is generated for every w1_netlink_cmd embedded in the
143w1_netlink_msg, if there are no w1_netlink_cmd structures,
144reply will be generated for the w1_netlink_msg.
145
146All w1_netlink_cmd command structures are handled in every w1_netlink_msg,
147even if there were errors, only length mismatch interrupts message processing.
148
62 149
63Operation steps in w1 core when new command is received. 150Operation steps in w1 core when new command is received.
64======================================================= 151=======================================================
65 152
66When new message (w1_netlink_msg) is received w1 core detects if it is master of slave request, 153When new message (w1_netlink_msg) is received w1 core detects if it is
67according to w1_netlink_msg.type field. 154master or slave request, according to w1_netlink_msg.type field.
68Then master or slave device is searched for. 155Then master or slave device is searched for.
69When found, master device (requested or those one on where slave device is found) is locked. 156When found, master device (requested or those one on where slave device
70If slave command is requested, then reset/select procedure is started to select given device. 157is found) is locked. If slave command is requested, then reset/select
158procedure is started to select given device.
71 159
72Then all requested in w1_netlink_msg operations are performed one by one. 160Then all requested in w1_netlink_msg operations are performed one by one.
73If command requires reply (like read command) it is sent on command completion. 161If command requires reply (like read command) it is sent on command completion.
@@ -82,8 +170,8 @@ Connector [1] specific documentation.
82Each connector message includes two u32 fields as "address". 170Each connector message includes two u32 fields as "address".
83w1 uses CN_W1_IDX and CN_W1_VAL defined in include/linux/connector.h header. 171w1 uses CN_W1_IDX and CN_W1_VAL defined in include/linux/connector.h header.
84Each message also includes sequence and acknowledge numbers. 172Each message also includes sequence and acknowledge numbers.
85Sequence number for event messages is appropriate bus master sequence number increased with 173Sequence number for event messages is appropriate bus master sequence number
86each event message sent "through" this master. 174increased with each event message sent "through" this master.
87Sequence number for userspace requests is set by userspace application. 175Sequence number for userspace requests is set by userspace application.
88Sequence number for reply is the same as was in request, and 176Sequence number for reply is the same as was in request, and
89acknowledge number is set to seq+1. 177acknowledge number is set to seq+1.
@@ -93,6 +181,6 @@ Additional documantion, source code examples.
93============================================ 181============================================
94 182
951. Documentation/connector 1831. Documentation/connector
962. http://tservice.net.ru/~s0mbre/archive/w1 1842. http://www.ioremap.net/archive/w1
97This archive includes userspace application w1d.c which 185This archive includes userspace application w1d.c which uses
98uses read/write/search commands for all master/slave devices found on the bus. 186read/write/search commands for all master/slave devices found on the bus.
diff --git a/Documentation/wimax/README.i2400m b/Documentation/wimax/README.i2400m
new file mode 100644
index 000000000000..7dffd8919cb0
--- /dev/null
+++ b/Documentation/wimax/README.i2400m
@@ -0,0 +1,260 @@
1
2 Driver for the Intel Wireless Wimax Connection 2400m
3
4 (C) 2008 Intel Corporation < linux-wimax@intel.com >
5
6 This provides a driver for the Intel Wireless WiMAX Connection 2400m
7 and a basic Linux kernel WiMAX stack.
8
91. Requirements
10
11 * Linux installation with Linux kernel 2.6.22 or newer (if building
12 from a separate tree)
13 * Intel i2400m Echo Peak or Baxter Peak; this includes the Intel
14 Wireless WiMAX/WiFi Link 5x50 series.
15 * build tools:
16 + Linux kernel development package for the target kernel; to
17 build against your currently running kernel, you need to have
18 the kernel development package corresponding to the running
19 image installed (usually if your kernel is named
20 linux-VERSION, the development package is called
21 linux-dev-VERSION or linux-headers-VERSION).
22 + GNU C Compiler, make
23
242. Compilation and installation
25
262.1. Compilation of the drivers included in the kernel
27
28 Configure the kernel; to enable the WiMAX drivers select Drivers >
29 Networking Drivers > WiMAX device support. Enable all of them as
30 modules (easier).
31
32 If USB or SDIO are not enabled in the kernel configuration, the options
33 to build the i2400m USB or SDIO drivers will not show. Enable said
34 subsystems and go back to the WiMAX menu to enable the drivers.
35
36 Compile and install your kernel as usual.
37
382.2. Compilation of the drivers distributed as an standalone module
39
40 To compile
41
42$ cd source/directory
43$ make
44
45 Once built you can load and unload using the provided load.sh script;
46 load.sh will load the modules, load.sh u will unload them.
47
48 To install in the default kernel directories (and enable auto loading
49 when the device is plugged):
50
51$ make install
52$ depmod -a
53
54 If your kernel development files are located in a non standard
55 directory or if you want to build for a kernel that is not the
56 currently running one, set KDIR to the right location:
57
58$ make KDIR=/path/to/kernel/dev/tree
59
60 For more information, please contact linux-wimax@intel.com.
61
623. Installing the firmware
63
64 The firmware can be obtained from http://linuxwimax.org or might have
65 been supplied with your hardware.
66
67 It has to be installed in the target system:
68 *
69$ cp FIRMWAREFILE.sbcf /lib/firmware/i2400m-fw-BUSTYPE-1.3.sbcf
70
71 * NOTE: if your firmware came in an .rpm or .deb file, just install
72 it as normal, with the rpm (rpm -i FIRMWARE.rpm) or dpkg
73 (dpkg -i FIRMWARE.deb) commands. No further action is needed.
74 * BUSTYPE will be usb or sdio, depending on the hardware you have.
75 Each hardware type comes with its own firmware and will not work
76 with other types.
77
784. Design
79
80 This package contains two major parts: a WiMAX kernel stack and a
81 driver for the Intel i2400m.
82
83 The WiMAX stack is designed to provide for common WiMAX control
84 services to current and future WiMAX devices from any vendor; please
85 see README.wimax for details.
86
87 The i2400m kernel driver is broken up in two main parts: the bus
88 generic driver and the bus-specific drivers. The bus generic driver
89 forms the drivercore and contain no knowledge of the actual method we
90 use to connect to the device. The bus specific drivers are just the
91 glue to connect the bus-generic driver and the device. Currently only
92 USB and SDIO are supported. See drivers/net/wimax/i2400m/i2400m.h for
93 more information.
94
95 The bus generic driver is logically broken up in two parts: OS-glue and
96 hardware-glue. The OS-glue interfaces with Linux. The hardware-glue
97 interfaces with the device on using an interface provided by the
98 bus-specific driver. The reason for this breakup is to be able to
99 easily reuse the hardware-glue to write drivers for other OSes; note
100 the hardware glue part is written as a native Linux driver; no
101 abstraction layers are used, so to port to another OS, the Linux kernel
102 API calls should be replaced with the target OS's.
103
1045. Usage
105
106 To load the driver, follow the instructions in the install section;
107 once the driver is loaded, plug in the device (unless it is permanently
108 plugged in). The driver will enumerate the device, upload the firmware
109 and output messages in the kernel log (dmesg, /var/log/messages or
110 /var/log/kern.log) such as:
111
112...
113i2400m_usb 5-4:1.0: firmware interface version 8.0.0
114i2400m_usb 5-4:1.0: WiMAX interface wmx0 (00:1d:e1:01:94:2c) ready
115
116 At this point the device is ready to work.
117
118 Current versions require the Intel WiMAX Network Service in userspace
119 to make things work. See the network service's README for instructions
120 on how to scan, connect and disconnect.
121
1225.1. Module parameters
123
124 Module parameters can be set at kernel or module load time or by
125 echoing values:
126
127$ echo VALUE > /sys/module/MODULENAME/parameters/PARAMETERNAME
128
129 To make changes permanent, for example, for the i2400m module, you can
130 also create a file named /etc/modprobe.d/i2400m containing:
131
132options i2400m idle_mode_disabled=1
133
134 To find which parameters are supported by a module, run:
135
136$ modinfo path/to/module.ko
137
138 During kernel bootup (if the driver is linked in the kernel), specify
139 the following to the kernel command line:
140
141i2400m.PARAMETER=VALUE
142
1435.1.1. i2400m: idle_mode_disabled
144
145 The i2400m module supports a parameter to disable idle mode. This
146 parameter, once set, will take effect only when the device is
147 reinitialized by the driver (eg: following a reset or a reconnect).
148
1495.2. Debug operations: debugfs entries
150
151 The driver will register debugfs entries that allow the user to tweak
152 debug settings. There are three main container directories where
153 entries are placed, which correspond to the three blocks a i2400m WiMAX
154 driver has:
155 * /sys/kernel/debug/wimax:DEVNAME/ for the generic WiMAX stack
156 controls
157 * /sys/kernel/debug/wimax:DEVNAME/i2400m for the i2400m generic
158 driver controls
159 * /sys/kernel/debug/wimax:DEVNAME/i2400m-usb (or -sdio) for the
160 bus-specific i2400m-usb or i2400m-sdio controls).
161
162 Of course, if debugfs is mounted in a directory other than
163 /sys/kernel/debug, those paths will change.
164
1655.2.1. Increasing debug output
166
167 The files named *dl_* indicate knobs for controlling the debug output
168 of different submodules:
169 *
170# find /sys/kernel/debug/wimax\:wmx0 -name \*dl_\*
171/sys/kernel/debug/wimax:wmx0/i2400m-usb/dl_tx
172/sys/kernel/debug/wimax:wmx0/i2400m-usb/dl_rx
173/sys/kernel/debug/wimax:wmx0/i2400m-usb/dl_notif
174/sys/kernel/debug/wimax:wmx0/i2400m-usb/dl_fw
175/sys/kernel/debug/wimax:wmx0/i2400m-usb/dl_usb
176/sys/kernel/debug/wimax:wmx0/i2400m/dl_tx
177/sys/kernel/debug/wimax:wmx0/i2400m/dl_rx
178/sys/kernel/debug/wimax:wmx0/i2400m/dl_rfkill
179/sys/kernel/debug/wimax:wmx0/i2400m/dl_netdev
180/sys/kernel/debug/wimax:wmx0/i2400m/dl_fw
181/sys/kernel/debug/wimax:wmx0/i2400m/dl_debugfs
182/sys/kernel/debug/wimax:wmx0/i2400m/dl_driver
183/sys/kernel/debug/wimax:wmx0/i2400m/dl_control
184/sys/kernel/debug/wimax:wmx0/wimax_dl_stack
185/sys/kernel/debug/wimax:wmx0/wimax_dl_op_rfkill
186/sys/kernel/debug/wimax:wmx0/wimax_dl_op_reset
187/sys/kernel/debug/wimax:wmx0/wimax_dl_op_msg
188/sys/kernel/debug/wimax:wmx0/wimax_dl_id_table
189/sys/kernel/debug/wimax:wmx0/wimax_dl_debugfs
190
191 By reading the file you can obtain the current value of said debug
192 level; by writing to it, you can set it.
193
194 To increase the debug level of, for example, the i2400m's generic TX
195 engine, just write:
196
197$ echo 3 > /sys/kernel/debug/wimax:wmx0/i2400m/dl_tx
198
199 Increasing numbers yield increasing debug information; for details of
200 what is printed and the available levels, check the source. The code
201 uses 0 for disabled and increasing values until 8.
202
2035.2.2. RX and TX statistics
204
205 The i2400m/rx_stats and i2400m/tx_stats provide statistics about the
206 data reception/delivery from the device:
207
208$ cat /sys/kernel/debug/wimax:wmx0/i2400m/rx_stats
20945 1 3 34 3104 48 480
210
211 The numbers reported are
212 * packets/RX-buffer: total, min, max
213 * RX-buffers: total RX buffers received, accumulated RX buffer size
214 in bytes, min size received, max size received
215
216 Thus, to find the average buffer size received, divide accumulated
217 RX-buffer / total RX-buffers.
218
219 To clear the statistics back to 0, write anything to the rx_stats file:
220
221$ echo 1 > /sys/kernel/debug/wimax:wmx0/i2400m_rx_stats
222
223 Likewise for TX.
224
225 Note the packets this debug file refers to are not network packet, but
226 packets in the sense of the device-specific protocol for communication
227 to the host. See drivers/net/wimax/i2400m/tx.c.
228
2295.2.3. Tracing messages received from user space
230
231 To echo messages received from user space into the trace pipe that the
232 i2400m driver creates, set the debug file i2400m/trace_msg_from_user to
233 1:
234 *
235$ echo 1 > /sys/kernel/debug/wimax:wmx0/i2400m/trace_msg_from_user
236
2375.2.4. Performing a device reset
238
239 By writing a 0, a 1 or a 2 to the file
240 /sys/kernel/debug/wimax:wmx0/reset, the driver performs a warm (without
241 disconnecting from the bus), cold (disconnecting from the bus) or bus
242 (bus specific) reset on the device.
243
2445.2.5. Asking the device to enter power saving mode
245
246 By writing any value to the /sys/kernel/debug/wimax:wmx0 file, the
247 device will attempt to enter power saving mode.
248
2496. Troubleshooting
250
2516.1. Driver complains about 'i2400m-fw-usb-1.2.sbcf: request failed'
252
253 If upon connecting the device, the following is output in the kernel
254 log:
255
256i2400m_usb 5-4:1.0: fw i2400m-fw-usb-1.3.sbcf: request failed: -2
257
258 This means that the driver cannot locate the firmware file named
259 /lib/firmware/i2400m-fw-usb-1.2.sbcf. Check that the file is present in
260 the right location.
diff --git a/Documentation/wimax/README.wimax b/Documentation/wimax/README.wimax
new file mode 100644
index 000000000000..b78c4378084e
--- /dev/null
+++ b/Documentation/wimax/README.wimax
@@ -0,0 +1,81 @@
1
2 Linux kernel WiMAX stack
3
4 (C) 2008 Intel Corporation < linux-wimax@intel.com >
5
6 This provides a basic Linux kernel WiMAX stack to provide a common
7 control API for WiMAX devices, usable from kernel and user space.
8
91. Design
10
11 The WiMAX stack is designed to provide for common WiMAX control
12 services to current and future WiMAX devices from any vendor.
13
14 Because currently there is only one and we don't know what would be the
15 common services, the APIs it currently provides are very minimal.
16 However, it is done in such a way that it is easily extensible to
17 accommodate future requirements.
18
19 The stack works by embedding a struct wimax_dev in your device's
20 control structures. This provides a set of callbacks that the WiMAX
21 stack will call in order to implement control operations requested by
22 the user. As well, the stack provides API functions that the driver
23 calls to notify about changes of state in the device.
24
25 The stack exports the API calls needed to control the device to user
26 space using generic netlink as a marshalling mechanism. You can access
27 them using your own code or use the wrappers provided for your
28 convenience in libwimax (in the wimax-tools package).
29
30 For detailed information on the stack, please see
31 include/linux/wimax.h.
32
332. Usage
34
35 For usage in a driver (registration, API, etc) please refer to the
36 instructions in the header file include/linux/wimax.h.
37
38 When a device is registered with the WiMAX stack, a set of debugfs
39 files will appear in /sys/kernel/debug/wimax:wmxX can tweak for
40 control.
41
422.1. Obtaining debug information: debugfs entries
43
44 The WiMAX stack is compiled, by default, with debug messages that can
45 be used to diagnose issues. By default, said messages are disabled.
46
47 The drivers will register debugfs entries that allow the user to tweak
48 debug settings.
49
50 Each driver, when registering with the stack, will cause a debugfs
51 directory named wimax:DEVICENAME to be created; optionally, it might
52 create more subentries below it.
53
542.1.1. Increasing debug output
55
56 The files named *dl_* indicate knobs for controlling the debug output
57 of different submodules of the WiMAX stack:
58 *
59# find /sys/kernel/debug/wimax\:wmx0 -name \*dl_\*
60/sys/kernel/debug/wimax:wmx0/wimax_dl_stack
61/sys/kernel/debug/wimax:wmx0/wimax_dl_op_rfkill
62/sys/kernel/debug/wimax:wmx0/wimax_dl_op_reset
63/sys/kernel/debug/wimax:wmx0/wimax_dl_op_msg
64/sys/kernel/debug/wimax:wmx0/wimax_dl_id_table
65/sys/kernel/debug/wimax:wmx0/wimax_dl_debugfs
66/sys/kernel/debug/wimax:wmx0/.... # other driver specific files
67
68 NOTE: Of course, if debugfs is mounted in a directory other than
69 /sys/kernel/debug, those paths will change.
70
71 By reading the file you can obtain the current value of said debug
72 level; by writing to it, you can set it.
73
74 To increase the debug level of, for example, the id-table submodule,
75 just write:
76
77$ echo 3 > /sys/kernel/debug/wimax:wmx0/wimax_dl_id_table
78
79 Increasing numbers yield increasing debug information; for details of
80 what is printed and the available levels, check the source. The code
81 uses 0 for disabled and increasing values until 8.
diff --git a/Documentation/x86/boot.txt b/Documentation/x86/boot.txt
index fcdc62b3c3d8..7b4596ac4120 100644
--- a/Documentation/x86/boot.txt
+++ b/Documentation/x86/boot.txt
@@ -44,7 +44,7 @@ Protocol 2.07: (Kernel 2.6.24) Added paravirtualised boot protocol.
44 and KEEP_SEGMENTS flag in load_flags. 44 and KEEP_SEGMENTS flag in load_flags.
45 45
46Protocol 2.08: (Kernel 2.6.26) Added crc32 checksum and ELF format 46Protocol 2.08: (Kernel 2.6.26) Added crc32 checksum and ELF format
47 payload. Introduced payload_offset and payload length 47 payload. Introduced payload_offset and payload_length
48 fields to aid in locating the payload. 48 fields to aid in locating the payload.
49 49
50Protocol 2.09: (Kernel 2.6.26) Added a field of 64-bit physical 50Protocol 2.09: (Kernel 2.6.26) Added a field of 64-bit physical
diff --git a/Documentation/x86/zero-page.txt b/Documentation/x86/zero-page.txt
index 169ad423a3d1..4f913857b8a2 100644
--- a/Documentation/x86/zero-page.txt
+++ b/Documentation/x86/zero-page.txt
@@ -3,7 +3,7 @@ protocol of kernel. These should be filled by bootloader or 16-bit
3real-mode setup code of the kernel. References/settings to it mainly 3real-mode setup code of the kernel. References/settings to it mainly
4are in: 4are in:
5 5
6 include/asm-x86/bootparam.h 6 arch/x86/include/asm/bootparam.h
7 7
8 8
9Offset Proto Name Meaning 9Offset Proto Name Meaning