aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2010-01-23 03:31:06 -0500
committerDavid S. Miller <davem@davemloft.net>2010-01-23 03:31:06 -0500
commit51c24aaacaea90c8e87f1dec75a2ac7622b593f8 (patch)
tree9f54936c87764bef75e97395cb56b7d1e0df24c6 /Documentation
parent4276e47e2d1c85a2477caf0d22b91c4f2377fba8 (diff)
parent6be325719b3e54624397e413efd4b33a997e55a3 (diff)
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Diffstat (limited to 'Documentation')
-rw-r--r--Documentation/DocBook/mtdnand.tmpl12
-rw-r--r--Documentation/IO-mapping.txt2
-rw-r--r--Documentation/PCI/PCI-DMA-mapping.txt (renamed from Documentation/DMA-mapping.txt)0
-rw-r--r--Documentation/block/00-INDEX2
-rw-r--r--Documentation/block/as-iosched.txt172
-rw-r--r--Documentation/block/biodoc.txt2
-rw-r--r--Documentation/feature-removal-schedule.txt49
-rw-r--r--Documentation/filesystems/ext4.txt2
-rw-r--r--Documentation/filesystems/nilfs2.txt2
-rw-r--r--Documentation/filesystems/proc.txt2
-rw-r--r--Documentation/hwmon/amc6821102
-rw-r--r--Documentation/hwmon/k10temp17
-rw-r--r--Documentation/ioctl/ioctl-number.txt203
-rw-r--r--Documentation/kernel-doc-nano-HOWTO.txt12
-rw-r--r--Documentation/kernel-parameters.txt5
-rw-r--r--Documentation/kvm/api.txt10
-rw-r--r--Documentation/laptops/thinkpad-acpi.txt58
-rw-r--r--Documentation/networking/3c509.txt12
-rw-r--r--Documentation/sound/alsa/Procfile.txt2
-rw-r--r--Documentation/trace/ftrace-design.txt14
-rw-r--r--Documentation/trace/mmiotrace.txt15
-rw-r--r--Documentation/trace/ring-buffer-design.txt56
-rw-r--r--Documentation/trace/tracepoint-analysis.txt60
-rw-r--r--Documentation/vgaarbiter.txt2
24 files changed, 484 insertions, 329 deletions
diff --git a/Documentation/DocBook/mtdnand.tmpl b/Documentation/DocBook/mtdnand.tmpl
index f508a8a27fea..5e7d84b48505 100644
--- a/Documentation/DocBook/mtdnand.tmpl
+++ b/Documentation/DocBook/mtdnand.tmpl
@@ -174,7 +174,7 @@
174 </para> 174 </para>
175 <programlisting> 175 <programlisting>
176static struct mtd_info *board_mtd; 176static struct mtd_info *board_mtd;
177static unsigned long baseaddr; 177static void __iomem *baseaddr;
178 </programlisting> 178 </programlisting>
179 <para> 179 <para>
180 Static example 180 Static example
@@ -182,7 +182,7 @@ static unsigned long baseaddr;
182 <programlisting> 182 <programlisting>
183static struct mtd_info board_mtd; 183static struct mtd_info board_mtd;
184static struct nand_chip board_chip; 184static struct nand_chip board_chip;
185static unsigned long baseaddr; 185static void __iomem *baseaddr;
186 </programlisting> 186 </programlisting>
187 </sect1> 187 </sect1>
188 <sect1 id="Partition_defines"> 188 <sect1 id="Partition_defines">
@@ -283,8 +283,8 @@ int __init board_init (void)
283 } 283 }
284 284
285 /* map physical address */ 285 /* map physical address */
286 baseaddr = (unsigned long)ioremap(CHIP_PHYSICAL_ADDRESS, 1024); 286 baseaddr = ioremap(CHIP_PHYSICAL_ADDRESS, 1024);
287 if(!baseaddr){ 287 if (!baseaddr) {
288 printk("Ioremap to access NAND chip failed\n"); 288 printk("Ioremap to access NAND chip failed\n");
289 err = -EIO; 289 err = -EIO;
290 goto out_mtd; 290 goto out_mtd;
@@ -316,7 +316,7 @@ int __init board_init (void)
316 goto out; 316 goto out;
317 317
318out_ior: 318out_ior:
319 iounmap((void *)baseaddr); 319 iounmap(baseaddr);
320out_mtd: 320out_mtd:
321 kfree (board_mtd); 321 kfree (board_mtd);
322out: 322out:
@@ -341,7 +341,7 @@ static void __exit board_cleanup (void)
341 nand_release (board_mtd); 341 nand_release (board_mtd);
342 342
343 /* unmap physical address */ 343 /* unmap physical address */
344 iounmap((void *)baseaddr); 344 iounmap(baseaddr);
345 345
346 /* Free the MTD device structure */ 346 /* Free the MTD device structure */
347 kfree (board_mtd); 347 kfree (board_mtd);
diff --git a/Documentation/IO-mapping.txt b/Documentation/IO-mapping.txt
index 78a440695e11..1b5aa10df845 100644
--- a/Documentation/IO-mapping.txt
+++ b/Documentation/IO-mapping.txt
@@ -157,7 +157,7 @@ For such memory, you can do things like
157 * access only the 640k-1MB area, so anything else 157 * access only the 640k-1MB area, so anything else
158 * has to be remapped. 158 * has to be remapped.
159 */ 159 */
160 char * baseptr = ioremap(0xFC000000, 1024*1024); 160 void __iomem *baseptr = ioremap(0xFC000000, 1024*1024);
161 161
162 /* write a 'A' to the offset 10 of the area */ 162 /* write a 'A' to the offset 10 of the area */
163 writeb('A',baseptr+10); 163 writeb('A',baseptr+10);
diff --git a/Documentation/DMA-mapping.txt b/Documentation/PCI/PCI-DMA-mapping.txt
index ecad88d9fe59..ecad88d9fe59 100644
--- a/Documentation/DMA-mapping.txt
+++ b/Documentation/PCI/PCI-DMA-mapping.txt
diff --git a/Documentation/block/00-INDEX b/Documentation/block/00-INDEX
index 961a0513f8c3..a406286f6f3e 100644
--- a/Documentation/block/00-INDEX
+++ b/Documentation/block/00-INDEX
@@ -1,7 +1,5 @@
100-INDEX 100-INDEX
2 - This file 2 - This file
3as-iosched.txt
4 - Anticipatory IO scheduler
5barrier.txt 3barrier.txt
6 - I/O Barriers 4 - I/O Barriers
7biodoc.txt 5biodoc.txt
diff --git a/Documentation/block/as-iosched.txt b/Documentation/block/as-iosched.txt
deleted file mode 100644
index 738b72be128e..000000000000
--- a/Documentation/block/as-iosched.txt
+++ /dev/null
@@ -1,172 +0,0 @@
1Anticipatory IO scheduler
2-------------------------
3Nick Piggin <piggin@cyberone.com.au> 13 Sep 2003
4
5Attention! Database servers, especially those using "TCQ" disks should
6investigate performance with the 'deadline' IO scheduler. Any system with high
7disk performance requirements should do so, in fact.
8
9If you see unusual performance characteristics of your disk systems, or you
10see big performance regressions versus the deadline scheduler, please email
11me. Database users don't bother unless you're willing to test a lot of patches
12from me ;) its a known issue.
13
14Also, users with hardware RAID controllers, doing striping, may find
15highly variable performance results with using the as-iosched. The
16as-iosched anticipatory implementation is based on the notion that a disk
17device has only one physical seeking head. A striped RAID controller
18actually has a head for each physical device in the logical RAID device.
19
20However, setting the antic_expire (see tunable parameters below) produces
21very similar behavior to the deadline IO scheduler.
22
23Selecting IO schedulers
24-----------------------
25Refer to Documentation/block/switching-sched.txt for information on
26selecting an io scheduler on a per-device basis.
27
28Anticipatory IO scheduler Policies
29----------------------------------
30The as-iosched implementation implements several layers of policies
31to determine when an IO request is dispatched to the disk controller.
32Here are the policies outlined, in order of application.
33
341. one-way Elevator algorithm.
35
36The elevator algorithm is similar to that used in deadline scheduler, with
37the addition that it allows limited backward movement of the elevator
38(i.e. seeks backwards). A seek backwards can occur when choosing between
39two IO requests where one is behind the elevator's current position, and
40the other is in front of the elevator's position. If the seek distance to
41the request in back of the elevator is less than half the seek distance to
42the request in front of the elevator, then the request in back can be chosen.
43Backward seeks are also limited to a maximum of MAXBACK (1024*1024) sectors.
44This favors forward movement of the elevator, while allowing opportunistic
45"short" backward seeks.
46
472. FIFO expiration times for reads and for writes.
48
49This is again very similar to the deadline IO scheduler. The expiration
50times for requests on these lists is tunable using the parameters read_expire
51and write_expire discussed below. When a read or a write expires in this way,
52the IO scheduler will interrupt its current elevator sweep or read anticipation
53to service the expired request.
54
553. Read and write request batching
56
57A batch is a collection of read requests or a collection of write
58requests. The as scheduler alternates dispatching read and write batches
59to the driver. In the case a read batch, the scheduler submits read
60requests to the driver as long as there are read requests to submit, and
61the read batch time limit has not been exceeded (read_batch_expire).
62The read batch time limit begins counting down only when there are
63competing write requests pending.
64
65In the case of a write batch, the scheduler submits write requests to
66the driver as long as there are write requests available, and the
67write batch time limit has not been exceeded (write_batch_expire).
68However, the length of write batches will be gradually shortened
69when read batches frequently exceed their time limit.
70
71When changing between batch types, the scheduler waits for all requests
72from the previous batch to complete before scheduling requests for the
73next batch.
74
75The read and write fifo expiration times described in policy 2 above
76are checked only when in scheduling IO of a batch for the corresponding
77(read/write) type. So for example, the read FIFO timeout values are
78tested only during read batches. Likewise, the write FIFO timeout
79values are tested only during write batches. For this reason,
80it is generally not recommended for the read batch time
81to be longer than the write expiration time, nor for the write batch
82time to exceed the read expiration time (see tunable parameters below).
83
84When the IO scheduler changes from a read to a write batch,
85it begins the elevator from the request that is on the head of the
86write expiration FIFO. Likewise, when changing from a write batch to
87a read batch, scheduler begins the elevator from the first entry
88on the read expiration FIFO.
89
904. Read anticipation.
91
92Read anticipation occurs only when scheduling a read batch.
93This implementation of read anticipation allows only one read request
94to be dispatched to the disk controller at a time. In
95contrast, many write requests may be dispatched to the disk controller
96at a time during a write batch. It is this characteristic that can make
97the anticipatory scheduler perform anomalously with controllers supporting
98TCQ, or with hardware striped RAID devices. Setting the antic_expire
99queue parameter (see below) to zero disables this behavior, and the
100anticipatory scheduler behaves essentially like the deadline scheduler.
101
102When read anticipation is enabled (antic_expire is not zero), reads
103are dispatched to the disk controller one at a time.
104At the end of each read request, the IO scheduler examines its next
105candidate read request from its sorted read list. If that next request
106is from the same process as the request that just completed,
107or if the next request in the queue is "very close" to the
108just completed request, it is dispatched immediately. Otherwise,
109statistics (average think time, average seek distance) on the process
110that submitted the just completed request are examined. If it seems
111likely that that process will submit another request soon, and that
112request is likely to be near the just completed request, then the IO
113scheduler will stop dispatching more read requests for up to (antic_expire)
114milliseconds, hoping that process will submit a new request near the one
115that just completed. If such a request is made, then it is dispatched
116immediately. If the antic_expire wait time expires, then the IO scheduler
117will dispatch the next read request from the sorted read queue.
118
119To decide whether an anticipatory wait is worthwhile, the scheduler
120maintains statistics for each process that can be used to compute
121mean "think time" (the time between read requests), and mean seek
122distance for that process. One observation is that these statistics
123are associated with each process, but those statistics are not associated
124with a specific IO device. So for example, if a process is doing IO
125on several file systems on separate devices, the statistics will be
126a combination of IO behavior from all those devices.
127
128
129Tuning the anticipatory IO scheduler
130------------------------------------
131When using 'as', the anticipatory IO scheduler there are 5 parameters under
132/sys/block/*/queue/iosched/. All are units of milliseconds.
133
134The parameters are:
135* read_expire
136 Controls how long until a read request becomes "expired". It also controls the
137 interval between which expired requests are served, so set to 50, a request
138 might take anywhere < 100ms to be serviced _if_ it is the next on the
139 expired list. Obviously request expiration strategies won't make the disk
140 go faster. The result basically equates to the timeslice a single reader
141 gets in the presence of other IO. 100*((seek time / read_expire) + 1) is
142 very roughly the % streaming read efficiency your disk should get with
143 multiple readers.
144
145* read_batch_expire
146 Controls how much time a batch of reads is given before pending writes are
147 served. A higher value is more efficient. This might be set below read_expire
148 if writes are to be given higher priority than reads, but reads are to be
149 as efficient as possible when there are no writes. Generally though, it
150 should be some multiple of read_expire.
151
152* write_expire, and
153* write_batch_expire are equivalent to the above, for writes.
154
155* antic_expire
156 Controls the maximum amount of time we can anticipate a good read (one
157 with a short seek distance from the most recently completed request) before
158 giving up. Many other factors may cause anticipation to be stopped early,
159 or some processes will not be "anticipated" at all. Should be a bit higher
160 for big seek time devices though not a linear correspondence - most
161 processes have only a few ms thinktime.
162
163In addition to the tunables above there is a read-only file named est_time
164which, when read, will show:
165
166 - The probability of a task exiting without a cooperating task
167 submitting an anticipated IO.
168
169 - The current mean think time.
170
171 - The seek distance used to determine if an incoming IO is better.
172
diff --git a/Documentation/block/biodoc.txt b/Documentation/block/biodoc.txt
index 8d2158a1c6aa..6fab97ea7e6b 100644
--- a/Documentation/block/biodoc.txt
+++ b/Documentation/block/biodoc.txt
@@ -186,7 +186,7 @@ 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 Documentation/DMA-mapping.txt for a discussion 189Note: Please refer to Documentation/PCI/PCI-DMA-mapping.txt for a discussion
190on PCI high mem DMA aspects and mapping of scatter gather lists, and support 190on PCI high mem DMA aspects and mapping of scatter gather lists, and support
191for 64 bit PCI. 191for 64 bit PCI.
192 192
diff --git a/Documentation/feature-removal-schedule.txt b/Documentation/feature-removal-schedule.txt
index 5b5db085fbf0..2f93ac06c414 100644
--- a/Documentation/feature-removal-schedule.txt
+++ b/Documentation/feature-removal-schedule.txt
@@ -472,3 +472,52 @@ Why: These two features use non-standard interfaces. There are the
472Who: Corentin Chary <corentin.chary@gmail.com> 472Who: Corentin Chary <corentin.chary@gmail.com>
473 473
474---------------------------- 474----------------------------
475
476What: usbvideo quickcam_messenger driver
477When: 2.6.35
478Files: drivers/media/video/usbvideo/quickcam_messenger.[ch]
479Why: obsolete v4l1 driver replaced by gspca_stv06xx
480Who: Hans de Goede <hdegoede@redhat.com>
481
482----------------------------
483
484What: ov511 v4l1 driver
485When: 2.6.35
486Files: drivers/media/video/ov511.[ch]
487Why: obsolete v4l1 driver replaced by gspca_ov519
488Who: Hans de Goede <hdegoede@redhat.com>
489
490----------------------------
491
492What: w9968cf v4l1 driver
493When: 2.6.35
494Files: drivers/media/video/w9968cf*.[ch]
495Why: obsolete v4l1 driver replaced by gspca_ov519
496Who: Hans de Goede <hdegoede@redhat.com>
497
498----------------------------
499
500What: ovcamchip sensor framework
501When: 2.6.35
502Files: drivers/media/video/ovcamchip/*
503Why: Only used by obsoleted v4l1 drivers
504Who: Hans de Goede <hdegoede@redhat.com>
505
506----------------------------
507
508What: stv680 v4l1 driver
509When: 2.6.35
510Files: drivers/media/video/stv680.[ch]
511Why: obsolete v4l1 driver replaced by gspca_stv0680
512Who: Hans de Goede <hdegoede@redhat.com>
513
514----------------------------
515
516What: zc0301 v4l driver
517When: 2.6.35
518Files: drivers/media/video/zc0301/*
519Why: Duplicate functionality with the gspca_zc3xx driver, zc0301 only
520 supports 2 USB-ID's (because it only supports a limited set of
521 sensors) wich are also supported by the gspca_zc3xx driver
522 (which supports 53 USB-ID's in total)
523Who: Hans de Goede <hdegoede@redhat.com>
diff --git a/Documentation/filesystems/ext4.txt b/Documentation/filesystems/ext4.txt
index af6885c3c821..e1def1786e50 100644
--- a/Documentation/filesystems/ext4.txt
+++ b/Documentation/filesystems/ext4.txt
@@ -196,7 +196,7 @@ nobarrier This also requires an IO stack which can support
196 also be used to enable or disable barriers, for 196 also be used to enable or disable barriers, for
197 consistency with other ext4 mount options. 197 consistency with other ext4 mount options.
198 198
199inode_readahead=n This tuning parameter controls the maximum 199inode_readahead_blks=n This tuning parameter controls the maximum
200 number of inode table blocks that ext4's inode 200 number of inode table blocks that ext4's inode
201 table readahead algorithm will pre-read into 201 table readahead algorithm will pre-read into
202 the buffer cache. The default value is 32 blocks. 202 the buffer cache. The default value is 32 blocks.
diff --git a/Documentation/filesystems/nilfs2.txt b/Documentation/filesystems/nilfs2.txt
index 4949fcaa6b6a..839efd8a8a8c 100644
--- a/Documentation/filesystems/nilfs2.txt
+++ b/Documentation/filesystems/nilfs2.txt
@@ -28,7 +28,7 @@ described in the man pages included in the package.
28Project web page: http://www.nilfs.org/en/ 28Project web page: http://www.nilfs.org/en/
29Download page: http://www.nilfs.org/en/download.html 29Download page: http://www.nilfs.org/en/download.html
30Git tree web page: http://www.nilfs.org/git/ 30Git tree web page: http://www.nilfs.org/git/
31NILFS mailing lists: http://www.nilfs.org/mailman/listinfo/users 31List info: http://vger.kernel.org/vger-lists.html#linux-nilfs
32 32
33Caveats 33Caveats
34======= 34=======
diff --git a/Documentation/filesystems/proc.txt b/Documentation/filesystems/proc.txt
index 220cc6376ef8..0d07513a67a6 100644
--- a/Documentation/filesystems/proc.txt
+++ b/Documentation/filesystems/proc.txt
@@ -177,7 +177,6 @@ read the file /proc/PID/status:
177 CapBnd: ffffffffffffffff 177 CapBnd: ffffffffffffffff
178 voluntary_ctxt_switches: 0 178 voluntary_ctxt_switches: 0
179 nonvoluntary_ctxt_switches: 1 179 nonvoluntary_ctxt_switches: 1
180 Stack usage: 12 kB
181 180
182This shows you nearly the same information you would get if you viewed it with 181This shows you nearly the same information you would get if you viewed it with
183the ps command. In fact, ps uses the proc file system to obtain its 182the ps command. In fact, ps uses the proc file system to obtain its
@@ -231,7 +230,6 @@ Table 1-2: Contents of the statm files (as of 2.6.30-rc7)
231 Mems_allowed_list Same as previous, but in "list format" 230 Mems_allowed_list Same as previous, but in "list format"
232 voluntary_ctxt_switches number of voluntary context switches 231 voluntary_ctxt_switches number of voluntary context switches
233 nonvoluntary_ctxt_switches number of non voluntary context switches 232 nonvoluntary_ctxt_switches number of non voluntary context switches
234 Stack usage: stack usage high water mark (round up to page size)
235.............................................................................. 233..............................................................................
236 234
237Table 1-3: Contents of the statm files (as of 2.6.8-rc3) 235Table 1-3: Contents of the statm files (as of 2.6.8-rc3)
diff --git a/Documentation/hwmon/amc6821 b/Documentation/hwmon/amc6821
new file mode 100644
index 000000000000..ced8359c50f8
--- /dev/null
+++ b/Documentation/hwmon/amc6821
@@ -0,0 +1,102 @@
1Kernel driver amc6821
2=====================
3
4Supported chips:
5 Texas Instruments AMC6821
6 Prefix: 'amc6821'
7 Addresses scanned: 0x18, 0x19, 0x1a, 0x2c, 0x2d, 0x2e, 0x4c, 0x4d, 0x4e
8 Datasheet: http://focus.ti.com/docs/prod/folders/print/amc6821.html
9
10Authors:
11 Tomaz Mertelj <tomaz.mertelj@guest.arnes.si>
12
13
14Description
15-----------
16
17This driver implements support for the Texas Instruments amc6821 chip.
18The chip has one on-chip and one remote temperature sensor and one pwm fan
19regulator.
20The pwm can be controlled either from software or automatically.
21
22The driver provides the following sensor accesses in sysfs:
23
24temp1_input ro on-chip temperature
25temp1_min rw "
26temp1_max rw "
27temp1_crit rw "
28temp1_min_alarm ro "
29temp1_max_alarm ro "
30temp1_crit_alarm ro "
31
32temp2_input ro remote temperature
33temp2_min rw "
34temp2_max rw "
35temp2_crit rw "
36temp2_min_alarm ro "
37temp2_max_alarm ro "
38temp2_crit_alarm ro "
39temp2_fault ro "
40
41fan1_input ro tachometer speed
42fan1_min rw "
43fan1_max rw "
44fan1_fault ro "
45fan1_div rw Fan divisor can be either 2 or 4.
46
47pwm1 rw pwm1
48pwm1_enable rw regulator mode, 1=open loop, 2=fan controlled
49 by remote temperature, 3=fan controlled by
50 combination of the on-chip temperature and
51 remote-sensor temperature,
52pwm1_auto_channels_temp ro 1 if pwm_enable==2, 3 if pwm_enable==3
53pwm1_auto_point1_pwm ro Hardwired to 0, shared for both
54 temperature channels.
55pwm1_auto_point2_pwm rw This value is shared for both temperature
56 channels.
57pwm1_auto_point3_pwm rw Hardwired to 255, shared for both
58 temperature channels.
59
60temp1_auto_point1_temp ro Hardwired to temp2_auto_point1_temp
61 which is rw. Below this temperature fan stops.
62temp1_auto_point2_temp rw The low-temperature limit of the proportional
63 range. Below this temperature
64 pwm1 = pwm1_auto_point2_pwm. It can go from
65 0 degree C to 124 degree C in steps of
66 4 degree C. Read it out after writing to get
67 the actual value.
68temp1_auto_point3_temp rw Above this temperature fan runs at maximum
69 speed. It can go from temp1_auto_point2_temp.
70 It can only have certain discrete values
71 which depend on temp1_auto_point2_temp and
72 pwm1_auto_point2_pwm. Read it out after
73 writing to get the actual value.
74
75temp2_auto_point1_temp rw Must be between 0 degree C and 63 degree C and
76 it defines the passive cooling temperature.
77 Below this temperature the fan stops in
78 the closed loop mode.
79temp2_auto_point2_temp rw The low-temperature limit of the proportional
80 range. Below this temperature
81 pwm1 = pwm1_auto_point2_pwm. It can go from
82 0 degree C to 124 degree C in steps
83 of 4 degree C.
84
85temp2_auto_point3_temp rw Above this temperature fan runs at maximum
86 speed. It can only have certain discrete
87 values which depend on temp2_auto_point2_temp
88 and pwm1_auto_point2_pwm. Read it out after
89 writing to get actual value.
90
91
92Module parameters
93-----------------
94
95If your board has a BIOS that initializes the amc6821 correctly, you should
96load the module with: init=0.
97
98If your board BIOS doesn't initialize the chip, or you want
99different settings, you can set the following parameters:
100init=1,
101pwminv: 0 default pwm output, 1 inverts pwm output.
102
diff --git a/Documentation/hwmon/k10temp b/Documentation/hwmon/k10temp
index a7a18d453a51..6526eee525a6 100644
--- a/Documentation/hwmon/k10temp
+++ b/Documentation/hwmon/k10temp
@@ -3,8 +3,8 @@ Kernel driver k10temp
3 3
4Supported chips: 4Supported chips:
5* AMD Family 10h processors: 5* AMD Family 10h processors:
6 Socket F: Quad-Core/Six-Core/Embedded Opteron 6 Socket F: Quad-Core/Six-Core/Embedded Opteron (but see below)
7 Socket AM2+: Opteron, Phenom (II) X3/X4 7 Socket AM2+: Quad-Core Opteron, Phenom (II) X3/X4, Athlon X2 (but see below)
8 Socket AM3: Quad-Core Opteron, Athlon/Phenom II X2/X3/X4, Sempron II 8 Socket AM3: Quad-Core Opteron, Athlon/Phenom II X2/X3/X4, Sempron II
9 Socket S1G3: Athlon II, Sempron, Turion II 9 Socket S1G3: Athlon II, Sempron, Turion II
10* AMD Family 11h processors: 10* AMD Family 11h processors:
@@ -36,10 +36,15 @@ Description
36This driver permits reading of the internal temperature sensor of AMD 36This driver permits reading of the internal temperature sensor of AMD
37Family 10h and 11h processors. 37Family 10h and 11h processors.
38 38
39All these processors have a sensor, but on older revisions of Family 10h 39All these processors have a sensor, but on those for Socket F or AM2+,
40processors, the sensor may return inconsistent values (erratum 319). The 40the sensor may return inconsistent values (erratum 319). The driver
41driver will refuse to load on these revisions unless you specify the 41will refuse to load on these revisions unless you specify the "force=1"
42"force=1" module parameter. 42module parameter.
43
44Due to technical reasons, the driver can detect only the mainboard's
45socket type, not the processor's actual capabilities. Therefore, if you
46are using an AM3 processor on an AM2+ mainboard, you can safely use the
47"force=1" parameter.
43 48
44There is one temperature measurement value, available as temp1_input in 49There is one temperature measurement value, available as temp1_input in
45sysfs. It is measured in degrees Celsius with a resolution of 1/8th degree. 50sysfs. It is measured in degrees Celsius with a resolution of 1/8th degree.
diff --git a/Documentation/ioctl/ioctl-number.txt b/Documentation/ioctl/ioctl-number.txt
index 947374977ca5..35cf64d4436d 100644
--- a/Documentation/ioctl/ioctl-number.txt
+++ b/Documentation/ioctl/ioctl-number.txt
@@ -56,10 +56,11 @@ Following this convention is good because:
56(5) When following the convention, the driver code can use generic 56(5) When following the convention, the driver code can use generic
57 code to copy the parameters between user and kernel space. 57 code to copy the parameters between user and kernel space.
58 58
59This table lists ioctls visible from user land for Linux/i386. It contains 59This table lists ioctls visible from user land for Linux/x86. It contains
60most drivers up to 2.3.14, but I know I am missing some. 60most drivers up to 2.6.31, but I know I am missing some. There has been
61no attempt to list non-X86 architectures or ioctls from drivers/staging/.
61 62
62Code Seq# Include File Comments 63Code Seq#(hex) Include File Comments
63======================================================== 64========================================================
640x00 00-1F linux/fs.h conflict! 650x00 00-1F linux/fs.h conflict!
650x00 00-1F scsi/scsi_ioctl.h conflict! 660x00 00-1F scsi/scsi_ioctl.h conflict!
@@ -69,119 +70,228 @@ Code Seq# Include File Comments
690x03 all linux/hdreg.h 700x03 all linux/hdreg.h
700x04 D2-DC linux/umsdos_fs.h Dead since 2.6.11, but don't reuse these. 710x04 D2-DC linux/umsdos_fs.h Dead since 2.6.11, but don't reuse these.
710x06 all linux/lp.h 720x06 all linux/lp.h
720x09 all linux/md.h 730x09 all linux/raid/md_u.h
740x10 00-0F drivers/char/s390/vmcp.h
730x12 all linux/fs.h 750x12 all linux/fs.h
74 linux/blkpg.h 76 linux/blkpg.h
750x1b all InfiniBand Subsystem <http://www.openib.org/> 770x1b all InfiniBand Subsystem <http://www.openib.org/>
760x20 all drivers/cdrom/cm206.h 780x20 all drivers/cdrom/cm206.h
770x22 all scsi/sg.h 790x22 all scsi/sg.h
78'#' 00-3F IEEE 1394 Subsystem Block for the entire subsystem 80'#' 00-3F IEEE 1394 Subsystem Block for the entire subsystem
81'$' 00-0F linux/perf_counter.h, linux/perf_event.h
79'1' 00-1F <linux/timepps.h> PPS kit from Ulrich Windl 82'1' 00-1F <linux/timepps.h> PPS kit from Ulrich Windl
80 <ftp://ftp.de.kernel.org/pub/linux/daemons/ntp/PPS/> 83 <ftp://ftp.de.kernel.org/pub/linux/daemons/ntp/PPS/>
84'2' 01-04 linux/i2o.h
85'3' 00-0F drivers/s390/char/raw3270.h conflict!
86'3' 00-1F linux/suspend_ioctls.h conflict!
87 and kernel/power/user.c
81'8' all SNP8023 advanced NIC card 88'8' all SNP8023 advanced NIC card
82 <mailto:mcr@solidum.com> 89 <mailto:mcr@solidum.com>
83'A' 00-1F linux/apm_bios.h 90'@' 00-0F linux/radeonfb.h conflict!
91'@' 00-0F drivers/video/aty/aty128fb.c conflict!
92'A' 00-1F linux/apm_bios.h conflict!
93'A' 00-0F linux/agpgart.h conflict!
94 and drivers/char/agp/compat_ioctl.h
95'A' 00-7F sound/asound.h conflict!
96'B' 00-1F linux/cciss_ioctl.h conflict!
97'B' 00-0F include/linux/pmu.h conflict!
84'B' C0-FF advanced bbus 98'B' C0-FF advanced bbus
85 <mailto:maassen@uni-freiburg.de> 99 <mailto:maassen@uni-freiburg.de>
86'C' all linux/soundcard.h 100'C' all linux/soundcard.h conflict!
101'C' 01-2F linux/capi.h conflict!
102'C' F0-FF drivers/net/wan/cosa.h conflict!
87'D' all arch/s390/include/asm/dasd.h 103'D' all arch/s390/include/asm/dasd.h
88'E' all linux/input.h 104'D' 40-5F drivers/scsi/dpt/dtpi_ioctl.h
89'F' all linux/fb.h 105'D' 05 drivers/scsi/pmcraid.h
90'H' all linux/hiddev.h 106'E' all linux/input.h conflict!
91'I' all linux/isdn.h 107'E' 00-0F xen/evtchn.h conflict!
108'F' all linux/fb.h conflict!
109'F' 01-02 drivers/scsi/pmcraid.h conflict!
110'F' 20 drivers/video/fsl-diu-fb.h conflict!
111'F' 20 drivers/video/intelfb/intelfb.h conflict!
112'F' 20 linux/ivtvfb.h conflict!
113'F' 20 linux/matroxfb.h conflict!
114'F' 20 drivers/video/aty/atyfb_base.c conflict!
115'F' 00-0F video/da8xx-fb.h conflict!
116'F' 80-8F linux/arcfb.h conflict!
117'F' DD video/sstfb.h conflict!
118'G' 00-3F drivers/misc/sgi-gru/grulib.h conflict!
119'G' 00-0F linux/gigaset_dev.h conflict!
120'H' 00-7F linux/hiddev.h conflict!
121'H' 00-0F linux/hidraw.h conflict!
122'H' 00-0F sound/asound.h conflict!
123'H' 20-40 sound/asound_fm.h conflict!
124'H' 80-8F sound/sfnt_info.h conflict!
125'H' 10-8F sound/emu10k1.h conflict!
126'H' 10-1F sound/sb16_csp.h conflict!
127'H' 10-1F sound/hda_hwdep.h conflict!
128'H' 40-4F sound/hdspm.h conflict!
129'H' 40-4F sound/hdsp.h conflict!
130'H' 90 sound/usb/usx2y/usb_stream.h
131'H' C0-F0 net/bluetooth/hci.h conflict!
132'H' C0-DF net/bluetooth/hidp/hidp.h conflict!
133'H' C0-DF net/bluetooth/cmtp/cmtp.h conflict!
134'H' C0-DF net/bluetooth/bnep/bnep.h conflict!
135'I' all linux/isdn.h conflict!
136'I' 00-0F drivers/isdn/divert/isdn_divert.h conflict!
137'I' 40-4F linux/mISDNif.h conflict!
92'J' 00-1F drivers/scsi/gdth_ioctl.h 138'J' 00-1F drivers/scsi/gdth_ioctl.h
93'K' all linux/kd.h 139'K' all linux/kd.h
94'L' 00-1F linux/loop.h 140'L' 00-1F linux/loop.h conflict!
95'L' 20-2F driver/usb/misc/vstusb.h 141'L' 10-1F drivers/scsi/mpt2sas/mpt2sas_ctl.h conflict!
142'L' 20-2F linux/usb/vstusb.h
96'L' E0-FF linux/ppdd.h encrypted disk device driver 143'L' E0-FF linux/ppdd.h encrypted disk device driver
97 <http://linux01.gwdg.de/~alatham/ppdd.html> 144 <http://linux01.gwdg.de/~alatham/ppdd.html>
98'M' all linux/soundcard.h 145'M' all linux/soundcard.h conflict!
146'M' 01-16 mtd/mtd-abi.h conflict!
147 and drivers/mtd/mtdchar.c
148'M' 01-03 drivers/scsi/megaraid/megaraid_sas.h
149'M' 00-0F drivers/video/fsl-diu-fb.h conflict!
99'N' 00-1F drivers/usb/scanner.h 150'N' 00-1F drivers/usb/scanner.h
100'O' 00-02 include/mtd/ubi-user.h UBI 151'O' 00-06 mtd/ubi-user.h UBI
101'P' all linux/soundcard.h 152'P' all linux/soundcard.h conflict!
153'P' 60-6F sound/sscape_ioctl.h conflict!
154'P' 00-0F drivers/usb/class/usblp.c conflict!
102'Q' all linux/soundcard.h 155'Q' all linux/soundcard.h
103'R' 00-1F linux/random.h 156'R' 00-1F linux/random.h conflict!
157'R' 01 linux/rfkill.h conflict!
158'R' 01-0F media/rds.h conflict!
159'R' C0-DF net/bluetooth/rfcomm.h
104'S' all linux/cdrom.h conflict! 160'S' all linux/cdrom.h conflict!
105'S' 80-81 scsi/scsi_ioctl.h conflict! 161'S' 80-81 scsi/scsi_ioctl.h conflict!
106'S' 82-FF scsi/scsi.h conflict! 162'S' 82-FF scsi/scsi.h conflict!
163'S' 00-7F sound/asequencer.h conflict!
107'T' all linux/soundcard.h conflict! 164'T' all linux/soundcard.h conflict!
165'T' 00-AF sound/asound.h conflict!
108'T' all arch/x86/include/asm/ioctls.h conflict! 166'T' all arch/x86/include/asm/ioctls.h conflict!
109'U' 00-EF linux/drivers/usb/usb.h 167'T' C0-DF linux/if_tun.h conflict!
110'V' all linux/vt.h 168'U' all sound/asound.h conflict!
169'U' 00-0F drivers/media/video/uvc/uvcvideo.h conflict!
170'U' 00-CF linux/uinput.h conflict!
171'U' 00-EF linux/usbdevice_fs.h
172'U' C0-CF drivers/bluetooth/hci_uart.h
173'V' all linux/vt.h conflict!
174'V' all linux/videodev2.h conflict!
175'V' C0 linux/ivtvfb.h conflict!
176'V' C0 linux/ivtv.h conflict!
177'V' C0 media/davinci/vpfe_capture.h conflict!
178'V' C0 media/si4713.h conflict!
179'V' C0-CF drivers/media/video/mxb.h conflict!
111'W' 00-1F linux/watchdog.h conflict! 180'W' 00-1F linux/watchdog.h conflict!
112'W' 00-1F linux/wanrouter.h conflict! 181'W' 00-1F linux/wanrouter.h conflict!
113'X' all linux/xfs_fs.h 182'W' 00-3F sound/asound.h conflict!
183'X' all fs/xfs/xfs_fs.h conflict!
184 and fs/xfs/linux-2.6/xfs_ioctl32.h
185 and include/linux/falloc.h
186 and linux/fs.h
187'X' all fs/ocfs2/ocfs_fs.h conflict!
188'X' 01 linux/pktcdvd.h conflict!
114'Y' all linux/cyclades.h 189'Y' all linux/cyclades.h
115'[' 00-07 linux/usb/usbtmc.h USB Test and Measurement Devices 190'Z' 14-15 drivers/message/fusion/mptctl.h
191'[' 00-07 linux/usb/tmc.h USB Test and Measurement Devices
116 <mailto:gregkh@suse.de> 192 <mailto:gregkh@suse.de>
117'a' all ATM on linux 193'a' all linux/atm*.h, linux/sonet.h ATM on linux
118 <http://lrcwww.epfl.ch/linux-atm/magic.html> 194 <http://lrcwww.epfl.ch/linux-atm/magic.html>
119'b' 00-FF bit3 vme host bridge 195'b' 00-FF conflict! bit3 vme host bridge
120 <mailto:natalia@nikhefk.nikhef.nl> 196 <mailto:natalia@nikhefk.nikhef.nl>
197'b' 00-0F media/bt819.h conflict!
198'c' all linux/cm4000_cs.h conflict!
121'c' 00-7F linux/comstats.h conflict! 199'c' 00-7F linux/comstats.h conflict!
122'c' 00-7F linux/coda.h conflict! 200'c' 00-7F linux/coda.h conflict!
123'c' 80-9F arch/s390/include/asm/chsc.h 201'c' 00-1F linux/chio.h conflict!
124'c' A0-AF arch/x86/include/asm/msr.h 202'c' 80-9F arch/s390/include/asm/chsc.h conflict!
203'c' A0-AF arch/x86/include/asm/msr.h conflict!
125'd' 00-FF linux/char/drm/drm/h conflict! 204'd' 00-FF linux/char/drm/drm/h conflict!
205'd' 02-40 pcmcia/ds.h conflict!
206'd' 10-3F drivers/media/video/dabusb.h conflict!
207'd' C0-CF drivers/media/video/saa7191.h conflict!
126'd' F0-FF linux/digi1.h 208'd' F0-FF linux/digi1.h
127'e' all linux/digi1.h conflict! 209'e' all linux/digi1.h conflict!
128'e' 00-1F net/irda/irtty.h conflict! 210'e' 00-1F drivers/net/irda/irtty-sir.h conflict!
129'f' 00-1F linux/ext2_fs.h 211'f' 00-1F linux/ext2_fs.h conflict!
130'h' 00-7F Charon filesystem 212'f' 00-1F linux/ext3_fs.h conflict!
213'f' 00-0F fs/jfs/jfs_dinode.h conflict!
214'f' 00-0F fs/ext4/ext4.h conflict!
215'f' 00-0F linux/fs.h conflict!
216'f' 00-0F fs/ocfs2/ocfs2_fs.h conflict!
217'g' 00-0F linux/usb/gadgetfs.h
218'g' 20-2F linux/usb/g_printer.h
219'h' 00-7F conflict! Charon filesystem
131 <mailto:zapman@interlan.net> 220 <mailto:zapman@interlan.net>
132'i' 00-3F linux/i2o.h 221'h' 00-1F linux/hpet.h conflict!
222'i' 00-3F linux/i2o-dev.h conflict!
223'i' 0B-1F linux/ipmi.h conflict!
224'i' 80-8F linux/i8k.h
133'j' 00-3F linux/joystick.h 225'j' 00-3F linux/joystick.h
226'k' 00-0F linux/spi/spidev.h conflict!
227'k' 00-05 video/kyro.h conflict!
134'l' 00-3F linux/tcfs_fs.h transparent cryptographic file system 228'l' 00-3F linux/tcfs_fs.h transparent cryptographic file system
135 <http://mikonos.dia.unisa.it/tcfs> 229 <http://mikonos.dia.unisa.it/tcfs>
136'l' 40-7F linux/udf_fs_i.h in development: 230'l' 40-7F linux/udf_fs_i.h in development:
137 <http://sourceforge.net/projects/linux-udf/> 231 <http://sourceforge.net/projects/linux-udf/>
138'm' 00-09 linux/mmtimer.h 232'm' 00-09 linux/mmtimer.h conflict!
139'm' all linux/mtio.h conflict! 233'm' all linux/mtio.h conflict!
140'm' all linux/soundcard.h conflict! 234'm' all linux/soundcard.h conflict!
141'm' all linux/synclink.h conflict! 235'm' all linux/synclink.h conflict!
236'm' 00-19 drivers/message/fusion/mptctl.h conflict!
237'm' 00 drivers/scsi/megaraid/megaraid_ioctl.h conflict!
142'm' 00-1F net/irda/irmod.h conflict! 238'm' 00-1F net/irda/irmod.h conflict!
143'n' 00-7F linux/ncp_fs.h 239'n' 00-7F linux/ncp_fs.h and fs/ncpfs/ioctl.c
144'n' 80-8F linux/nilfs2_fs.h NILFS2 240'n' 80-8F linux/nilfs2_fs.h NILFS2
145'n' E0-FF video/matrox.h matroxfb 241'n' E0-FF linux/matroxfb.h matroxfb
146'o' 00-1F fs/ocfs2/ocfs2_fs.h OCFS2 242'o' 00-1F fs/ocfs2/ocfs2_fs.h OCFS2
147'o' 00-03 include/mtd/ubi-user.h conflict! (OCFS2 and UBI overlaps) 243'o' 00-03 mtd/ubi-user.h conflict! (OCFS2 and UBI overlaps)
148'o' 40-41 include/mtd/ubi-user.h UBI 244'o' 40-41 mtd/ubi-user.h UBI
149'o' 01-A1 include/linux/dvb/*.h DVB 245'o' 01-A1 linux/dvb/*.h DVB
150'p' 00-0F linux/phantom.h conflict! (OpenHaptics needs this) 246'p' 00-0F linux/phantom.h conflict! (OpenHaptics needs this)
247'p' 00-1F linux/rtc.h conflict!
151'p' 00-3F linux/mc146818rtc.h conflict! 248'p' 00-3F linux/mc146818rtc.h conflict!
152'p' 40-7F linux/nvram.h 249'p' 40-7F linux/nvram.h
153'p' 80-9F user-space parport 250'p' 80-9F linux/ppdev.h user-space parport
154 <mailto:tim@cyberelk.net> 251 <mailto:tim@cyberelk.net>
155'p' a1-a4 linux/pps.h LinuxPPS 252'p' A1-A4 linux/pps.h LinuxPPS
156 <mailto:giometti@linux.it> 253 <mailto:giometti@linux.it>
157'q' 00-1F linux/serio.h 254'q' 00-1F linux/serio.h
158'q' 80-FF Internet PhoneJACK, Internet LineJACK 255'q' 80-FF linux/telephony.h Internet PhoneJACK, Internet LineJACK
159 <http://www.quicknet.net> 256 linux/ixjuser.h <http://www.quicknet.net>
160'r' 00-1F linux/msdos_fs.h 257'r' 00-1F linux/msdos_fs.h and fs/fat/dir.c
161's' all linux/cdk.h 258's' all linux/cdk.h
162't' 00-7F linux/if_ppp.h 259't' 00-7F linux/if_ppp.h
163't' 80-8F linux/isdn_ppp.h 260't' 80-8F linux/isdn_ppp.h
261't' 90 linux/toshiba.h
164'u' 00-1F linux/smb_fs.h 262'u' 00-1F linux/smb_fs.h
165'v' 00-1F linux/ext2_fs.h conflict!
166'v' all linux/videodev.h conflict! 263'v' all linux/videodev.h conflict!
264'v' 00-1F linux/ext2_fs.h conflict!
265'v' 00-1F linux/fs.h conflict!
266'v' 00-0F linux/sonypi.h conflict!
267'v' C0-CF drivers/media/video/ov511.h conflict!
268'v' C0-DF media/pwc-ioctl.h conflict!
269'v' C0-FF linux/meye.h conflict!
270'v' C0-CF drivers/media/video/zoran/zoran.h conflict!
271'v' D0-DF drivers/media/video/cpia2/cpia2dev.h conflict!
167'w' all CERN SCI driver 272'w' all CERN SCI driver
168'y' 00-1F packet based user level communications 273'y' 00-1F packet based user level communications
169 <mailto:zapman@interlan.net> 274 <mailto:zapman@interlan.net>
170'z' 00-3F CAN bus card 275'z' 00-3F CAN bus card conflict!
171 <mailto:hdstich@connectu.ulm.circular.de> 276 <mailto:hdstich@connectu.ulm.circular.de>
172'z' 40-7F CAN bus card 277'z' 40-7F CAN bus card conflict!
173 <mailto:oe@port.de> 278 <mailto:oe@port.de>
279'z' 10-4F drivers/s390/crypto/zcrypt_api.h conflict!
1740x80 00-1F linux/fb.h 2800x80 00-1F linux/fb.h
1750x81 00-1F linux/videotext.h 2810x81 00-1F linux/videotext.h
2820x88 00-3F media/ovcamchip.h
1760x89 00-06 arch/x86/include/asm/sockios.h 2830x89 00-06 arch/x86/include/asm/sockios.h
1770x89 0B-DF linux/sockios.h 2840x89 0B-DF linux/sockios.h
1780x89 E0-EF linux/sockios.h SIOCPROTOPRIVATE range 2850x89 E0-EF linux/sockios.h SIOCPROTOPRIVATE range
2860x89 E0-EF linux/dn.h PROTOPRIVATE range
1790x89 F0-FF linux/sockios.h SIOCDEVPRIVATE range 2870x89 F0-FF linux/sockios.h SIOCDEVPRIVATE range
1800x8B all linux/wireless.h 2880x8B all linux/wireless.h
1810x8C 00-3F WiNRADiO driver 2890x8C 00-3F WiNRADiO driver
182 <http://www.proximity.com.au/~brian/winradio/> 290 <http://www.proximity.com.au/~brian/winradio/>
1830x90 00 drivers/cdrom/sbpcd.h 2910x90 00 drivers/cdrom/sbpcd.h
2920x92 00-0F drivers/usb/mon/mon_bin.c
1840x93 60-7F linux/auto_fs.h 2930x93 60-7F linux/auto_fs.h
2940x94 all fs/btrfs/ioctl.h
1850x99 00-0F 537-Addinboard driver 2950x99 00-0F 537-Addinboard driver
186 <mailto:buk@buks.ipn.de> 296 <mailto:buk@buks.ipn.de>
1870xA0 all linux/sdp/sdp.h Industrial Device Project 2970xA0 all linux/sdp/sdp.h Industrial Device Project
@@ -192,17 +302,22 @@ Code Seq# Include File Comments
1920xAB 00-1F linux/nbd.h 3020xAB 00-1F linux/nbd.h
1930xAC 00-1F linux/raw.h 3030xAC 00-1F linux/raw.h
1940xAD 00 Netfilter device in development: 3040xAD 00 Netfilter device in development:
195 <mailto:rusty@rustcorp.com.au> 305 <mailto:rusty@rustcorp.com.au>
1960xAE all linux/kvm.h Kernel-based Virtual Machine 3060xAE all linux/kvm.h Kernel-based Virtual Machine
197 <mailto:kvm@vger.kernel.org> 307 <mailto:kvm@vger.kernel.org>
1980xB0 all RATIO devices in development: 3080xB0 all RATIO devices in development:
199 <mailto:vgo@ratio.de> 309 <mailto:vgo@ratio.de>
2000xB1 00-1F PPPoX <mailto:mostrows@styx.uwaterloo.ca> 3100xB1 00-1F PPPoX <mailto:mostrows@styx.uwaterloo.ca>
3110xC0 00-0F linux/usb/iowarrior.h
2010xCB 00-1F CBM serial IEC bus in development: 3120xCB 00-1F CBM serial IEC bus in development:
202 <mailto:michael.klein@puffin.lb.shuttle.de> 313 <mailto:michael.klein@puffin.lb.shuttle.de>
3140xCD 01 linux/reiserfs_fs.h
3150xCF 02 fs/cifs/ioctl.c
3160xDB 00-0F drivers/char/mwave/mwavepub.h
2030xDD 00-3F ZFCP device driver see drivers/s390/scsi/ 3170xDD 00-3F ZFCP device driver see drivers/s390/scsi/
204 <mailto:aherrman@de.ibm.com> 318 <mailto:aherrman@de.ibm.com>
2050xF3 00-3F video/sisfb.h sisfb (in development) 3190xF3 00-3F drivers/usb/misc/sisusbvga/sisusb.h sisfb (in development)
206 <mailto:thomas@winischhofer.net> 320 <mailto:thomas@winischhofer.net>
2070xF4 00-1F video/mbxfb.h mbxfb 3210xF4 00-1F video/mbxfb.h mbxfb
208 <mailto:raph@8d.com> 322 <mailto:raph@8d.com>
3230xFD all linux/dm-ioctl.h
diff --git a/Documentation/kernel-doc-nano-HOWTO.txt b/Documentation/kernel-doc-nano-HOWTO.txt
index 348b9e5e28fc..27a52b35d55b 100644
--- a/Documentation/kernel-doc-nano-HOWTO.txt
+++ b/Documentation/kernel-doc-nano-HOWTO.txt
@@ -214,11 +214,13 @@ The format of the block comment is like this:
214 * (section header: (section description)? )* 214 * (section header: (section description)? )*
215(*)?*/ 215(*)?*/
216 216
217The short function description ***cannot be multiline***, but the other 217All "description" text can span multiple lines, although the
218descriptions can be (and they can contain blank lines). If you continue 218function_name & its short description are traditionally on a single line.
219that initial short description onto a second line, that second line will 219Description text may also contain blank lines (i.e., lines that contain
220appear further down at the beginning of the description section, which is 220only a "*").
221almost certainly not what you had in mind. 221
222"section header:" names must be unique per function (or struct,
223union, typedef, enum).
222 224
223Avoid putting a spurious blank line after the function name, or else the 225Avoid putting a spurious blank line after the function name, or else the
224description will be repeated! 226description will be repeated!
diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt
index 5ba4d9dff113..736d45602886 100644
--- a/Documentation/kernel-parameters.txt
+++ b/Documentation/kernel-parameters.txt
@@ -240,7 +240,7 @@ and is between 256 and 4096 characters. It is defined in the file
240 240
241 acpi_sleep= [HW,ACPI] Sleep options 241 acpi_sleep= [HW,ACPI] Sleep options
242 Format: { s3_bios, s3_mode, s3_beep, s4_nohwsig, 242 Format: { s3_bios, s3_mode, s3_beep, s4_nohwsig,
243 old_ordering, s4_nonvs } 243 old_ordering, s4_nonvs, sci_force_enable }
244 See Documentation/power/video.txt for information on 244 See Documentation/power/video.txt for information on
245 s3_bios and s3_mode. 245 s3_bios and s3_mode.
246 s3_beep is for debugging; it makes the PC's speaker beep 246 s3_beep is for debugging; it makes the PC's speaker beep
@@ -253,6 +253,9 @@ and is between 256 and 4096 characters. It is defined in the file
253 of _PTS is used by default). 253 of _PTS is used by default).
254 s4_nonvs prevents the kernel from saving/restoring the 254 s4_nonvs prevents the kernel from saving/restoring the
255 ACPI NVS memory during hibernation. 255 ACPI NVS memory during hibernation.
256 sci_force_enable causes the kernel to set SCI_EN directly
257 on resume from S1/S3 (which is against the ACPI spec,
258 but some broken systems don't work without it).
256 259
257 acpi_use_timer_override [HW,ACPI] 260 acpi_use_timer_override [HW,ACPI]
258 Use timer override. For some broken Nvidia NF5 boards 261 Use timer override. For some broken Nvidia NF5 boards
diff --git a/Documentation/kvm/api.txt b/Documentation/kvm/api.txt
index e1a114161027..2811e452f756 100644
--- a/Documentation/kvm/api.txt
+++ b/Documentation/kvm/api.txt
@@ -685,7 +685,7 @@ struct kvm_vcpu_events {
685 __u8 pad; 685 __u8 pad;
686 } nmi; 686 } nmi;
687 __u32 sipi_vector; 687 __u32 sipi_vector;
688 __u32 flags; /* must be zero */ 688 __u32 flags;
689}; 689};
690 690
6914.30 KVM_SET_VCPU_EVENTS 6914.30 KVM_SET_VCPU_EVENTS
@@ -701,6 +701,14 @@ vcpu.
701 701
702See KVM_GET_VCPU_EVENTS for the data structure. 702See KVM_GET_VCPU_EVENTS for the data structure.
703 703
704Fields that may be modified asynchronously by running VCPUs can be excluded
705from the update. These fields are nmi.pending and sipi_vector. Keep the
706corresponding bits in the flags field cleared to suppress overwriting the
707current in-kernel state. The bits are:
708
709KVM_VCPUEVENT_VALID_NMI_PENDING - transfer nmi.pending to the kernel
710KVM_VCPUEVENT_VALID_SIPI_VECTOR - transfer sipi_vector
711
704 712
7055. The kvm_run structure 7135. The kvm_run structure
706 714
diff --git a/Documentation/laptops/thinkpad-acpi.txt b/Documentation/laptops/thinkpad-acpi.txt
index 169091f75e6d..75afa1229fd7 100644
--- a/Documentation/laptops/thinkpad-acpi.txt
+++ b/Documentation/laptops/thinkpad-acpi.txt
@@ -1092,8 +1092,8 @@ WARNING:
1092 its level up and down at every change. 1092 its level up and down at every change.
1093 1093
1094 1094
1095Volume control 1095Volume control (Console Audio control)
1096-------------- 1096--------------------------------------
1097 1097
1098procfs: /proc/acpi/ibm/volume 1098procfs: /proc/acpi/ibm/volume
1099ALSA: "ThinkPad Console Audio Control", default ID: "ThinkPadEC" 1099ALSA: "ThinkPad Console Audio Control", default ID: "ThinkPadEC"
@@ -1110,9 +1110,53 @@ the desktop environment to just provide on-screen-display feedback.
1110Software volume control should be done only in the main AC97/HDA 1110Software volume control should be done only in the main AC97/HDA
1111mixer. 1111mixer.
1112 1112
1113This feature allows volume control on ThinkPad models with a digital 1113
1114volume knob (when available, not all models have it), as well as 1114About the ThinkPad Console Audio control:
1115mute/unmute control. The available commands are: 1115
1116ThinkPads have a built-in amplifier and muting circuit that drives the
1117console headphone and speakers. This circuit is after the main AC97
1118or HDA mixer in the audio path, and under exclusive control of the
1119firmware.
1120
1121ThinkPads have three special hotkeys to interact with the console
1122audio control: volume up, volume down and mute.
1123
1124It is worth noting that the normal way the mute function works (on
1125ThinkPads that do not have a "mute LED") is:
1126
11271. Press mute to mute. It will *always* mute, you can press it as
1128 many times as you want, and the sound will remain mute.
1129
11302. Press either volume key to unmute the ThinkPad (it will _not_
1131 change the volume, it will just unmute).
1132
1133This is a very superior design when compared to the cheap software-only
1134mute-toggle solution found on normal consumer laptops: you can be
1135absolutely sure the ThinkPad will not make noise if you press the mute
1136button, no matter the previous state.
1137
1138The IBM ThinkPads, and the earlier Lenovo ThinkPads have variable-gain
1139amplifiers driving the speakers and headphone output, and the firmware
1140also handles volume control for the headphone and speakers on these
1141ThinkPads without any help from the operating system (this volume
1142control stage exists after the main AC97 or HDA mixer in the audio
1143path).
1144
1145The newer Lenovo models only have firmware mute control, and depend on
1146the main HDA mixer to do volume control (which is done by the operating
1147system). In this case, the volume keys are filtered out for unmute
1148key press (there are some firmware bugs in this area) and delivered as
1149normal key presses to the operating system (thinkpad-acpi is not
1150involved).
1151
1152
1153The ThinkPad-ACPI volume control:
1154
1155The preferred way to interact with the Console Audio control is the
1156ALSA interface.
1157
1158The legacy procfs interface allows one to read the current state,
1159and if volume control is enabled, accepts the following commands:
1116 1160
1117 echo up >/proc/acpi/ibm/volume 1161 echo up >/proc/acpi/ibm/volume
1118 echo down >/proc/acpi/ibm/volume 1162 echo down >/proc/acpi/ibm/volume
@@ -1121,12 +1165,10 @@ mute/unmute control. The available commands are:
1121 echo 'level <level>' >/proc/acpi/ibm/volume 1165 echo 'level <level>' >/proc/acpi/ibm/volume
1122 1166
1123The <level> number range is 0 to 14 although not all of them may be 1167The <level> number range is 0 to 14 although not all of them may be
1124distinct. The unmute the volume after the mute command, use either the 1168distinct. To unmute the volume after the mute command, use either the
1125up or down command (the level command will not unmute the volume), or 1169up or down command (the level command will not unmute the volume), or
1126the unmute command. 1170the unmute command.
1127 1171
1128The current volume level and mute state is shown in the file.
1129
1130You can use the volume_capabilities parameter to tell the driver 1172You can use the volume_capabilities parameter to tell the driver
1131whether your thinkpad has volume control or mute-only control: 1173whether your thinkpad has volume control or mute-only control:
1132volume_capabilities=1 for mixers with mute and volume control, 1174volume_capabilities=1 for mixers with mute and volume control,
diff --git a/Documentation/networking/3c509.txt b/Documentation/networking/3c509.txt
index 0643e3b7168c..3c45d5dcd63b 100644
--- a/Documentation/networking/3c509.txt
+++ b/Documentation/networking/3c509.txt
@@ -48,11 +48,11 @@ for LILO parameters for doing this:
48This configures the first found 3c509 card for IRQ 10, base I/O 0x310, and 48This configures the first found 3c509 card for IRQ 10, base I/O 0x310, and
49transceiver type 3 (10base2). The flag "0x3c509" must be set to avoid conflicts 49transceiver type 3 (10base2). The flag "0x3c509" must be set to avoid conflicts
50with other card types when overriding the I/O address. When the driver is 50with other card types when overriding the I/O address. When the driver is
51loaded as a module, only the IRQ and transceiver setting may be overridden. 51loaded as a module, only the IRQ may be overridden. For example,
52For example, setting two cards to 10base2/IRQ10 and AUI/IRQ11 is done by using 52setting two cards to IRQ10 and IRQ11 is done by using the irq module
53the xcvr and irq module options: 53option:
54 54
55 options 3c509 xcvr=3,1 irq=10,11 55 options 3c509 irq=10,11
56 56
57 57
58(2) Full-duplex mode 58(2) Full-duplex mode
@@ -77,6 +77,8 @@ operation.
77itself full-duplex capable. This is almost certainly one of two things: a full- 77itself full-duplex capable. This is almost certainly one of two things: a full-
78duplex-capable Ethernet switch (*not* a hub), or a full-duplex-capable NIC on 78duplex-capable Ethernet switch (*not* a hub), or a full-duplex-capable NIC on
79another system that's connected directly to the 3c509B via a crossover cable. 79another system that's connected directly to the 3c509B via a crossover cable.
80
81Full-duplex mode can be enabled using 'ethtool'.
80 82
81/////Extremely important caution concerning full-duplex mode///// 83/////Extremely important caution concerning full-duplex mode/////
82Understand that the 3c509B's hardware's full-duplex support is much more 84Understand that the 3c509B's hardware's full-duplex support is much more
@@ -113,6 +115,8 @@ This insured that merely upgrading the driver from an earlier version would
113never automatically enable full-duplex mode in an existing installation; 115never automatically enable full-duplex mode in an existing installation;
114it must always be explicitly enabled via one of these code in order to be 116it must always be explicitly enabled via one of these code in order to be
115activated. 117activated.
118
119The transceiver type can be changed using 'ethtool'.
116 120
117 121
118(4a) Interpretation of error messages and common problems 122(4a) Interpretation of error messages and common problems
diff --git a/Documentation/sound/alsa/Procfile.txt b/Documentation/sound/alsa/Procfile.txt
index 719a819f8cc2..07301de12cc4 100644
--- a/Documentation/sound/alsa/Procfile.txt
+++ b/Documentation/sound/alsa/Procfile.txt
@@ -95,7 +95,7 @@ card*/pcm*/xrun_debug
95 It takes an integer value, can be changed by writing to this 95 It takes an integer value, can be changed by writing to this
96 file, such as 96 file, such as
97 97
98 # cat 5 > /proc/asound/card0/pcm0p/xrun_debug 98 # echo 5 > /proc/asound/card0/pcm0p/xrun_debug
99 99
100 The value consists of the following bit flags: 100 The value consists of the following bit flags:
101 bit 0 = Enable XRUN/jiffies debug messages 101 bit 0 = Enable XRUN/jiffies debug messages
diff --git a/Documentation/trace/ftrace-design.txt b/Documentation/trace/ftrace-design.txt
index 641a1ef2a7ff..239f14b2b55a 100644
--- a/Documentation/trace/ftrace-design.txt
+++ b/Documentation/trace/ftrace-design.txt
@@ -53,14 +53,14 @@ size of the mcount call that is embedded in the function).
53For example, if the function foo() calls bar(), when the bar() function calls 53For example, if the function foo() calls bar(), when the bar() function calls
54mcount(), the arguments mcount() will pass to the tracer are: 54mcount(), the arguments mcount() will pass to the tracer are:
55 "frompc" - the address bar() will use to return to foo() 55 "frompc" - the address bar() will use to return to foo()
56 "selfpc" - the address bar() (with _mcount() size adjustment) 56 "selfpc" - the address bar() (with mcount() size adjustment)
57 57
58Also keep in mind that this mcount function will be called *a lot*, so 58Also keep in mind that this mcount function will be called *a lot*, so
59optimizing for the default case of no tracer will help the smooth running of 59optimizing for the default case of no tracer will help the smooth running of
60your system when tracing is disabled. So the start of the mcount function is 60your system when tracing is disabled. So the start of the mcount function is
61typically the bare min with checking things before returning. That also means 61typically the bare minimum with checking things before returning. That also
62the code flow should usually kept linear (i.e. no branching in the nop case). 62means the code flow should usually be kept linear (i.e. no branching in the nop
63This is of course an optimization and not a hard requirement. 63case). This is of course an optimization and not a hard requirement.
64 64
65Here is some pseudo code that should help (these functions should actually be 65Here is some pseudo code that should help (these functions should actually be
66implemented in assembly): 66implemented in assembly):
@@ -131,10 +131,10 @@ some functions to save (hijack) and restore the return address.
131 131
132The mcount function should check the function pointers ftrace_graph_return 132The mcount function should check the function pointers ftrace_graph_return
133(compare to ftrace_stub) and ftrace_graph_entry (compare to 133(compare to ftrace_stub) and ftrace_graph_entry (compare to
134ftrace_graph_entry_stub). If either of those are not set to the relevant stub 134ftrace_graph_entry_stub). If either of those is not set to the relevant stub
135function, call the arch-specific function ftrace_graph_caller which in turn 135function, call the arch-specific function ftrace_graph_caller which in turn
136calls the arch-specific function prepare_ftrace_return. Neither of these 136calls the arch-specific function prepare_ftrace_return. Neither of these
137function names are strictly required, but you should use them anyways to stay 137function names is strictly required, but you should use them anyway to stay
138consistent across the architecture ports -- easier to compare & contrast 138consistent across the architecture ports -- easier to compare & contrast
139things. 139things.
140 140
@@ -144,7 +144,7 @@ but the first argument should be a pointer to the "frompc". Typically this is
144located on the stack. This allows the function to hijack the return address 144located on the stack. This allows the function to hijack the return address
145temporarily to have it point to the arch-specific function return_to_handler. 145temporarily to have it point to the arch-specific function return_to_handler.
146That function will simply call the common ftrace_return_to_handler function and 146That function will simply call the common ftrace_return_to_handler function and
147that will return the original return address with which, you can return to the 147that will return the original return address with which you can return to the
148original call site. 148original call site.
149 149
150Here is the updated mcount pseudo code: 150Here is the updated mcount pseudo code:
diff --git a/Documentation/trace/mmiotrace.txt b/Documentation/trace/mmiotrace.txt
index 162effbfbdec..664e7386d89e 100644
--- a/Documentation/trace/mmiotrace.txt
+++ b/Documentation/trace/mmiotrace.txt
@@ -44,7 +44,8 @@ Check for lost events.
44Usage 44Usage
45----- 45-----
46 46
47Make sure debugfs is mounted to /sys/kernel/debug. If not, (requires root privileges) 47Make sure debugfs is mounted to /sys/kernel/debug.
48If not (requires root privileges):
48$ mount -t debugfs debugfs /sys/kernel/debug 49$ mount -t debugfs debugfs /sys/kernel/debug
49 50
50Check that the driver you are about to trace is not loaded. 51Check that the driver you are about to trace is not loaded.
@@ -91,7 +92,7 @@ $ dmesg > dmesg.txt
91$ tar zcf pciid-nick-mmiotrace.tar.gz mydump.txt lspci.txt dmesg.txt 92$ tar zcf pciid-nick-mmiotrace.tar.gz mydump.txt lspci.txt dmesg.txt
92and then send the .tar.gz file. The trace compresses considerably. Replace 93and then send the .tar.gz file. The trace compresses considerably. Replace
93"pciid" and "nick" with the PCI ID or model name of your piece of hardware 94"pciid" and "nick" with the PCI ID or model name of your piece of hardware
94under investigation and your nick name. 95under investigation and your nickname.
95 96
96 97
97How Mmiotrace Works 98How Mmiotrace Works
@@ -100,7 +101,7 @@ How Mmiotrace Works
100Access to hardware IO-memory is gained by mapping addresses from PCI bus by 101Access to hardware IO-memory is gained by mapping addresses from PCI bus by
101calling one of the ioremap_*() functions. Mmiotrace is hooked into the 102calling one of the ioremap_*() functions. Mmiotrace is hooked into the
102__ioremap() function and gets called whenever a mapping is created. Mapping is 103__ioremap() function and gets called whenever a mapping is created. Mapping is
103an event that is recorded into the trace log. Note, that ISA range mappings 104an event that is recorded into the trace log. Note that ISA range mappings
104are not caught, since the mapping always exists and is returned directly. 105are not caught, since the mapping always exists and is returned directly.
105 106
106MMIO accesses are recorded via page faults. Just before __ioremap() returns, 107MMIO accesses are recorded via page faults. Just before __ioremap() returns,
@@ -122,11 +123,11 @@ Trace Log Format
122---------------- 123----------------
123 124
124The raw log is text and easily filtered with e.g. grep and awk. One record is 125The raw log is text and easily filtered with e.g. grep and awk. One record is
125one line in the log. A record starts with a keyword, followed by keyword 126one line in the log. A record starts with a keyword, followed by keyword-
126dependant arguments. Arguments are separated by a space, or continue until the 127dependent arguments. Arguments are separated by a space, or continue until the
127end of line. The format for version 20070824 is as follows: 128end of line. The format for version 20070824 is as follows:
128 129
129Explanation Keyword Space separated arguments 130Explanation Keyword Space-separated arguments
130--------------------------------------------------------------------------- 131---------------------------------------------------------------------------
131 132
132read event R width, timestamp, map id, physical, value, PC, PID 133read event R width, timestamp, map id, physical, value, PC, PID
@@ -136,7 +137,7 @@ iounmap event UNMAP timestamp, map id, PC, PID
136marker MARK timestamp, text 137marker MARK timestamp, text
137version VERSION the string "20070824" 138version VERSION the string "20070824"
138info for reader LSPCI one line from lspci -v 139info for reader LSPCI one line from lspci -v
139PCI address map PCIDEV space separated /proc/bus/pci/devices data 140PCI address map PCIDEV space-separated /proc/bus/pci/devices data
140unk. opcode UNKNOWN timestamp, map id, physical, data, PC, PID 141unk. opcode UNKNOWN timestamp, map id, physical, data, PC, PID
141 142
142Timestamp is in seconds with decimals. Physical is a PCI bus address, virtual 143Timestamp is in seconds with decimals. Physical is a PCI bus address, virtual
diff --git a/Documentation/trace/ring-buffer-design.txt b/Documentation/trace/ring-buffer-design.txt
index 5b1d23d604c5..d299ff31df57 100644
--- a/Documentation/trace/ring-buffer-design.txt
+++ b/Documentation/trace/ring-buffer-design.txt
@@ -33,9 +33,9 @@ head_page - a pointer to the page that the reader will use next
33 33
34tail_page - a pointer to the page that will be written to next 34tail_page - a pointer to the page that will be written to next
35 35
36commit_page - a pointer to the page with the last finished non nested write. 36commit_page - a pointer to the page with the last finished non-nested write.
37 37
38cmpxchg - hardware assisted atomic transaction that performs the following: 38cmpxchg - hardware-assisted atomic transaction that performs the following:
39 39
40 A = B iff previous A == C 40 A = B iff previous A == C
41 41
@@ -52,15 +52,15 @@ The Generic Ring Buffer
52The ring buffer can be used in either an overwrite mode or in 52The ring buffer can be used in either an overwrite mode or in
53producer/consumer mode. 53producer/consumer mode.
54 54
55Producer/consumer mode is where the producer were to fill up the 55Producer/consumer mode is where if the producer were to fill up the
56buffer before the consumer could free up anything, the producer 56buffer before the consumer could free up anything, the producer
57will stop writing to the buffer. This will lose most recent events. 57will stop writing to the buffer. This will lose most recent events.
58 58
59Overwrite mode is where the produce were to fill up the buffer 59Overwrite mode is where if the producer were to fill up the buffer
60before the consumer could free up anything, the producer will 60before the consumer could free up anything, the producer will
61overwrite the older data. This will lose the oldest events. 61overwrite the older data. This will lose the oldest events.
62 62
63No two writers can write at the same time (on the same per cpu buffer), 63No two writers can write at the same time (on the same per-cpu buffer),
64but a writer may interrupt another writer, but it must finish writing 64but a writer may interrupt another writer, but it must finish writing
65before the previous writer may continue. This is very important to the 65before the previous writer may continue. This is very important to the
66algorithm. The writers act like a "stack". The way interrupts works 66algorithm. The writers act like a "stack". The way interrupts works
@@ -79,16 +79,16 @@ the interrupt doing a write as well.
79 79
80Readers can happen at any time. But no two readers may run at the 80Readers can happen at any time. But no two readers may run at the
81same time, nor can a reader preempt/interrupt another reader. A reader 81same time, nor can a reader preempt/interrupt another reader. A reader
82can not preempt/interrupt a writer, but it may read/consume from the 82cannot preempt/interrupt a writer, but it may read/consume from the
83buffer at the same time as a writer is writing, but the reader must be 83buffer at the same time as a writer is writing, but the reader must be
84on another processor to do so. A reader may read on its own processor 84on another processor to do so. A reader may read on its own processor
85and can be preempted by a writer. 85and can be preempted by a writer.
86 86
87A writer can preempt a reader, but a reader can not preempt a writer. 87A writer can preempt a reader, but a reader cannot preempt a writer.
88But a reader can read the buffer at the same time (on another processor) 88But a reader can read the buffer at the same time (on another processor)
89as a writer. 89as a writer.
90 90
91The ring buffer is made up of a list of pages held together by a link list. 91The ring buffer is made up of a list of pages held together by a linked list.
92 92
93At initialization a reader page is allocated for the reader that is not 93At initialization a reader page is allocated for the reader that is not
94part of the ring buffer. 94part of the ring buffer.
@@ -102,7 +102,7 @@ the head page.
102 102
103The reader has its own page to use. At start up time, this page is 103The reader has its own page to use. At start up time, this page is
104allocated but is not attached to the list. When the reader wants 104allocated but is not attached to the list. When the reader wants
105to read from the buffer, if its page is empty (like it is on start up) 105to read from the buffer, if its page is empty (like it is on start-up),
106it will swap its page with the head_page. The old reader page will 106it will swap its page with the head_page. The old reader page will
107become part of the ring buffer and the head_page will be removed. 107become part of the ring buffer and the head_page will be removed.
108The page after the inserted page (old reader_page) will become the 108The page after the inserted page (old reader_page) will become the
@@ -206,7 +206,7 @@ The main pointers:
206 206
207 commit page - the page that last finished a write. 207 commit page - the page that last finished a write.
208 208
209The commit page only is updated by the outer most writer in the 209The commit page only is updated by the outermost writer in the
210writer stack. A writer that preempts another writer will not move the 210writer stack. A writer that preempts another writer will not move the
211commit page. 211commit page.
212 212
@@ -281,7 +281,7 @@ with the previous write.
281The commit pointer points to the last write location that was 281The commit pointer points to the last write location that was
282committed without preempting another write. When a write that 282committed without preempting another write. When a write that
283preempted another write is committed, it only becomes a pending commit 283preempted another write is committed, it only becomes a pending commit
284and will not be a full commit till all writes have been committed. 284and will not be a full commit until all writes have been committed.
285 285
286The commit page points to the page that has the last full commit. 286The commit page points to the page that has the last full commit.
287The tail page points to the page with the last write (before 287The tail page points to the page with the last write (before
@@ -292,7 +292,7 @@ be several pages ahead. If the tail page catches up to the commit
292page then no more writes may take place (regardless of the mode 292page then no more writes may take place (regardless of the mode
293of the ring buffer: overwrite and produce/consumer). 293of the ring buffer: overwrite and produce/consumer).
294 294
295The order of pages are: 295The order of pages is:
296 296
297 head page 297 head page
298 commit page 298 commit page
@@ -311,7 +311,7 @@ Possible scenario:
311There is a special case that the head page is after either the commit page 311There is a special case that the head page is after either the commit page
312and possibly the tail page. That is when the commit (and tail) page has been 312and possibly the tail page. That is when the commit (and tail) page has been
313swapped with the reader page. This is because the head page is always 313swapped with the reader page. This is because the head page is always
314part of the ring buffer, but the reader page is not. When ever there 314part of the ring buffer, but the reader page is not. Whenever there
315has been less than a full page that has been committed inside the ring buffer, 315has been less than a full page that has been committed inside the ring buffer,
316and a reader swaps out a page, it will be swapping out the commit page. 316and a reader swaps out a page, it will be swapping out the commit page.
317 317
@@ -338,7 +338,7 @@ and a reader swaps out a page, it will be swapping out the commit page.
338In this case, the head page will not move when the tail and commit 338In this case, the head page will not move when the tail and commit
339move back into the ring buffer. 339move back into the ring buffer.
340 340
341The reader can not swap a page into the ring buffer if the commit page 341The reader cannot swap a page into the ring buffer if the commit page
342is still on that page. If the read meets the last commit (real commit 342is still on that page. If the read meets the last commit (real commit
343not pending or reserved), then there is nothing more to read. 343not pending or reserved), then there is nothing more to read.
344The buffer is considered empty until another full commit finishes. 344The buffer is considered empty until another full commit finishes.
@@ -395,7 +395,7 @@ The main idea behind the lockless algorithm is to combine the moving
395of the head_page pointer with the swapping of pages with the reader. 395of the head_page pointer with the swapping of pages with the reader.
396State flags are placed inside the pointer to the page. To do this, 396State flags are placed inside the pointer to the page. To do this,
397each page must be aligned in memory by 4 bytes. This will allow the 2 397each page must be aligned in memory by 4 bytes. This will allow the 2
398least significant bits of the address to be used as flags. Since 398least significant bits of the address to be used as flags, since
399they will always be zero for the address. To get the address, 399they will always be zero for the address. To get the address,
400simply mask out the flags. 400simply mask out the flags.
401 401
@@ -460,7 +460,7 @@ When the reader tries to swap the page with the ring buffer, it
460will also use cmpxchg. If the flag bit in the pointer to the 460will also use cmpxchg. If the flag bit in the pointer to the
461head page does not have the HEADER flag set, the compare will fail 461head page does not have the HEADER flag set, the compare will fail
462and the reader will need to look for the new head page and try again. 462and the reader will need to look for the new head page and try again.
463Note, the flag UPDATE and HEADER are never set at the same time. 463Note, the flags UPDATE and HEADER are never set at the same time.
464 464
465The reader swaps the reader page as follows: 465The reader swaps the reader page as follows:
466 466
@@ -539,7 +539,7 @@ updated to the reader page.
539 | +-----------------------------+ | 539 | +-----------------------------+ |
540 +------------------------------------+ 540 +------------------------------------+
541 541
542Another important point. The page that the reader page points back to 542Another important point: The page that the reader page points back to
543by its previous pointer (the one that now points to the new head page) 543by its previous pointer (the one that now points to the new head page)
544never points back to the reader page. That is because the reader page is 544never points back to the reader page. That is because the reader page is
545not part of the ring buffer. Traversing the ring buffer via the next pointers 545not part of the ring buffer. Traversing the ring buffer via the next pointers
@@ -572,7 +572,7 @@ not be able to swap the head page from the buffer, nor will it be able to
572move the head page, until the writer is finished with the move. 572move the head page, until the writer is finished with the move.
573 573
574This eliminates any races that the reader can have on the writer. The reader 574This eliminates any races that the reader can have on the writer. The reader
575must spin, and this is why the reader can not preempt the writer. 575must spin, and this is why the reader cannot preempt the writer.
576 576
577 tail page 577 tail page
578 | 578 |
@@ -659,9 +659,9 @@ before pushing the head page. If it is, then it can be assumed that the
659tail page wrapped the buffer, and we must drop new writes. 659tail page wrapped the buffer, and we must drop new writes.
660 660
661This is not a race condition, because the commit page can only be moved 661This is not a race condition, because the commit page can only be moved
662by the outter most writer (the writer that was preempted). 662by the outermost writer (the writer that was preempted).
663This means that the commit will not move while a writer is moving the 663This means that the commit will not move while a writer is moving the
664tail page. The reader can not swap the reader page if it is also being 664tail page. The reader cannot swap the reader page if it is also being
665used as the commit page. The reader can simply check that the commit 665used as the commit page. The reader can simply check that the commit
666is off the reader page. Once the commit page leaves the reader page 666is off the reader page. Once the commit page leaves the reader page
667it will never go back on it unless a reader does another swap with the 667it will never go back on it unless a reader does another swap with the
@@ -733,7 +733,7 @@ The write converts the head page pointer to UPDATE.
733--->| |<---| |<---| |<---| |<--- 733--->| |<---| |<---| |<---| |<---
734 +---+ +---+ +---+ +---+ 734 +---+ +---+ +---+ +---+
735 735
736But if a nested writer preempts here. It will see that the next 736But if a nested writer preempts here, it will see that the next
737page is a head page, but it is also nested. It will detect that 737page is a head page, but it is also nested. It will detect that
738it is nested and will save that information. The detection is the 738it is nested and will save that information. The detection is the
739fact that it sees the UPDATE flag instead of a HEADER or NORMAL 739fact that it sees the UPDATE flag instead of a HEADER or NORMAL
@@ -761,7 +761,7 @@ to NORMAL.
761--->| |<---| |<---| |<---| |<--- 761--->| |<---| |<---| |<---| |<---
762 +---+ +---+ +---+ +---+ 762 +---+ +---+ +---+ +---+
763 763
764After the nested writer finishes, the outer most writer will convert 764After the nested writer finishes, the outermost writer will convert
765the UPDATE pointer to NORMAL. 765the UPDATE pointer to NORMAL.
766 766
767 767
@@ -812,7 +812,7 @@ head page.
812 +---+ +---+ +---+ +---+ 812 +---+ +---+ +---+ +---+
813 813
814The nested writer moves the tail page forward. But does not set the old 814The nested writer moves the tail page forward. But does not set the old
815update page to NORMAL because it is not the outer most writer. 815update page to NORMAL because it is not the outermost writer.
816 816
817 tail page 817 tail page
818 | 818 |
@@ -892,7 +892,7 @@ It will return to the first writer.
892--->| |<---| |<---| |<---| |<--- 892--->| |<---| |<---| |<---| |<---
893 +---+ +---+ +---+ +---+ 893 +---+ +---+ +---+ +---+
894 894
895The first writer can not know atomically test if the tail page moved 895The first writer cannot know atomically if the tail page moved
896while it updates the HEAD page. It will then update the head page to 896while it updates the HEAD page. It will then update the head page to
897what it thinks is the new head page. 897what it thinks is the new head page.
898 898
@@ -923,9 +923,9 @@ if the tail page is either where it use to be or on the next page:
923--->| |<---| |<---| |<---| |<--- 923--->| |<---| |<---| |<---| |<---
924 +---+ +---+ +---+ +---+ 924 +---+ +---+ +---+ +---+
925 925
926If tail page != A and tail page does not equal B, then it must reset the 926If tail page != A and tail page != B, then it must reset the pointer
927pointer back to NORMAL. The fact that it only needs to worry about 927back to NORMAL. The fact that it only needs to worry about nested
928nested writers, it only needs to check this after setting the HEAD page. 928writers means that it only needs to check this after setting the HEAD page.
929 929
930 930
931(first writer) 931(first writer)
@@ -939,7 +939,7 @@ nested writers, it only needs to check this after setting the HEAD page.
939 +---+ +---+ +---+ +---+ 939 +---+ +---+ +---+ +---+
940 940
941Now the writer can update the head page. This is also why the head page must 941Now the writer can update the head page. This is also why the head page must
942remain in UPDATE and only reset by the outer most writer. This prevents 942remain in UPDATE and only reset by the outermost writer. This prevents
943the reader from seeing the incorrect head page. 943the reader from seeing the incorrect head page.
944 944
945 945
diff --git a/Documentation/trace/tracepoint-analysis.txt b/Documentation/trace/tracepoint-analysis.txt
index 5eb4e487e667..87bee3c129ba 100644
--- a/Documentation/trace/tracepoint-analysis.txt
+++ b/Documentation/trace/tracepoint-analysis.txt
@@ -10,8 +10,8 @@ Tracepoints (see Documentation/trace/tracepoints.txt) can be used without
10creating custom kernel modules to register probe functions using the event 10creating custom kernel modules to register probe functions using the event
11tracing infrastructure. 11tracing infrastructure.
12 12
13Simplistically, tracepoints will represent an important event that when can 13Simplistically, tracepoints represent important events that can be
14be taken in conjunction with other tracepoints to build a "Big Picture" of 14taken in conjunction with other tracepoints to build a "Big Picture" of
15what is going on within the system. There are a large number of methods for 15what is going on within the system. There are a large number of methods for
16gathering and interpreting these events. Lacking any current Best Practises, 16gathering and interpreting these events. Lacking any current Best Practises,
17this document describes some of the methods that can be used. 17this document describes some of the methods that can be used.
@@ -33,12 +33,12 @@ calling
33 33
34will give a fair indication of the number of events available. 34will give a fair indication of the number of events available.
35 35
362.2 PCL 362.2 PCL (Performance Counters for Linux)
37------- 37-------
38 38
39Discovery and enumeration of all counters and events, including tracepoints 39Discovery and enumeration of all counters and events, including tracepoints,
40are available with the perf tool. Getting a list of available events is a 40are available with the perf tool. Getting a list of available events is a
41simple case of 41simple case of:
42 42
43 $ perf list 2>&1 | grep Tracepoint 43 $ perf list 2>&1 | grep Tracepoint
44 ext4:ext4_free_inode [Tracepoint event] 44 ext4:ext4_free_inode [Tracepoint event]
@@ -49,19 +49,19 @@ simple case of
49 [ .... remaining output snipped .... ] 49 [ .... remaining output snipped .... ]
50 50
51 51
522. Enabling Events 523. Enabling Events
53================== 53==================
54 54
552.1 System-Wide Event Enabling 553.1 System-Wide Event Enabling
56------------------------------ 56------------------------------
57 57
58See Documentation/trace/events.txt for a proper description on how events 58See Documentation/trace/events.txt for a proper description on how events
59can be enabled system-wide. A short example of enabling all events related 59can be enabled system-wide. A short example of enabling all events related
60to page allocation would look something like 60to page allocation would look something like:
61 61
62 $ for i in `find /sys/kernel/debug/tracing/events -name "enable" | grep mm_`; do echo 1 > $i; done 62 $ for i in `find /sys/kernel/debug/tracing/events -name "enable" | grep mm_`; do echo 1 > $i; done
63 63
642.2 System-Wide Event Enabling with SystemTap 643.2 System-Wide Event Enabling with SystemTap
65--------------------------------------------- 65---------------------------------------------
66 66
67In SystemTap, tracepoints are accessible using the kernel.trace() function 67In SystemTap, tracepoints are accessible using the kernel.trace() function
@@ -86,7 +86,7 @@ were allocating the pages.
86 print_count() 86 print_count()
87 } 87 }
88 88
892.3 System-Wide Event Enabling with PCL 893.3 System-Wide Event Enabling with PCL
90--------------------------------------- 90---------------------------------------
91 91
92By specifying the -a switch and analysing sleep, the system-wide events 92By specifying the -a switch and analysing sleep, the system-wide events
@@ -107,16 +107,16 @@ for a duration of time can be examined.
107Similarly, one could execute a shell and exit it as desired to get a report 107Similarly, one could execute a shell and exit it as desired to get a report
108at that point. 108at that point.
109 109
1102.4 Local Event Enabling 1103.4 Local Event Enabling
111------------------------ 111------------------------
112 112
113Documentation/trace/ftrace.txt describes how to enable events on a per-thread 113Documentation/trace/ftrace.txt describes how to enable events on a per-thread
114basis using set_ftrace_pid. 114basis using set_ftrace_pid.
115 115
1162.5 Local Event Enablement with PCL 1163.5 Local Event Enablement with PCL
117----------------------------------- 117-----------------------------------
118 118
119Events can be activate and tracked for the duration of a process on a local 119Events can be activated and tracked for the duration of a process on a local
120basis using PCL such as follows. 120basis using PCL such as follows.
121 121
122 $ perf stat -e kmem:mm_page_alloc -e kmem:mm_page_free_direct \ 122 $ perf stat -e kmem:mm_page_alloc -e kmem:mm_page_free_direct \
@@ -131,18 +131,18 @@ basis using PCL such as follows.
131 131
132 0.973913387 seconds time elapsed 132 0.973913387 seconds time elapsed
133 133
1343. Event Filtering 1344. Event Filtering
135================== 135==================
136 136
137Documentation/trace/ftrace.txt covers in-depth how to filter events in 137Documentation/trace/ftrace.txt covers in-depth how to filter events in
138ftrace. Obviously using grep and awk of trace_pipe is an option as well 138ftrace. Obviously using grep and awk of trace_pipe is an option as well
139as any script reading trace_pipe. 139as any script reading trace_pipe.
140 140
1414. Analysing Event Variances with PCL 1415. Analysing Event Variances with PCL
142===================================== 142=====================================
143 143
144Any workload can exhibit variances between runs and it can be important 144Any workload can exhibit variances between runs and it can be important
145to know what the standard deviation in. By and large, this is left to the 145to know what the standard deviation is. By and large, this is left to the
146performance analyst to do it by hand. In the event that the discrete event 146performance analyst to do it by hand. In the event that the discrete event
147occurrences are useful to the performance analyst, then perf can be used. 147occurrences are useful to the performance analyst, then perf can be used.
148 148
@@ -166,7 +166,7 @@ In the event that some higher-level event is required that depends on some
166aggregation of discrete events, then a script would need to be developed. 166aggregation of discrete events, then a script would need to be developed.
167 167
168Using --repeat, it is also possible to view how events are fluctuating over 168Using --repeat, it is also possible to view how events are fluctuating over
169time on a system wide basis using -a and sleep. 169time on a system-wide basis using -a and sleep.
170 170
171 $ perf stat -e kmem:mm_page_alloc -e kmem:mm_page_free_direct \ 171 $ perf stat -e kmem:mm_page_alloc -e kmem:mm_page_free_direct \
172 -e kmem:mm_pagevec_free \ 172 -e kmem:mm_pagevec_free \
@@ -180,7 +180,7 @@ time on a system wide basis using -a and sleep.
180 180
181 1.002251757 seconds time elapsed ( +- 0.005% ) 181 1.002251757 seconds time elapsed ( +- 0.005% )
182 182
1835. Higher-Level Analysis with Helper Scripts 1836. Higher-Level Analysis with Helper Scripts
184============================================ 184============================================
185 185
186When events are enabled the events that are triggering can be read from 186When events are enabled the events that are triggering can be read from
@@ -190,11 +190,11 @@ be gathered on-line as appropriate. Examples of post-processing might include
190 190
191 o Reading information from /proc for the PID that triggered the event 191 o Reading information from /proc for the PID that triggered the event
192 o Deriving a higher-level event from a series of lower-level events. 192 o Deriving a higher-level event from a series of lower-level events.
193 o Calculate latencies between two events 193 o Calculating latencies between two events
194 194
195Documentation/trace/postprocess/trace-pagealloc-postprocess.pl is an example 195Documentation/trace/postprocess/trace-pagealloc-postprocess.pl is an example
196script that can read trace_pipe from STDIN or a copy of a trace. When used 196script that can read trace_pipe from STDIN or a copy of a trace. When used
197on-line, it can be interrupted once to generate a report without existing 197on-line, it can be interrupted once to generate a report without exiting
198and twice to exit. 198and twice to exit.
199 199
200Simplistically, the script just reads STDIN and counts up events but it 200Simplistically, the script just reads STDIN and counts up events but it
@@ -212,12 +212,12 @@ also can do more such as
212 processes, the parent process responsible for creating all the helpers 212 processes, the parent process responsible for creating all the helpers
213 can be identified 213 can be identified
214 214
2156. Lower-Level Analysis with PCL 2157. Lower-Level Analysis with PCL
216================================ 216================================
217 217
218There may also be a requirement to identify what functions with a program 218There may also be a requirement to identify what functions within a program
219were generating events within the kernel. To begin this sort of analysis, the 219were generating events within the kernel. To begin this sort of analysis, the
220data must be recorded. At the time of writing, this required root 220data must be recorded. At the time of writing, this required root:
221 221
222 $ perf record -c 1 \ 222 $ perf record -c 1 \
223 -e kmem:mm_page_alloc -e kmem:mm_page_free_direct \ 223 -e kmem:mm_page_alloc -e kmem:mm_page_free_direct \
@@ -253,11 +253,11 @@ perf report.
253 # (For more details, try: perf report --sort comm,dso,symbol) 253 # (For more details, try: perf report --sort comm,dso,symbol)
254 # 254 #
255 255
256According to this, the vast majority of events occured triggered on events 256According to this, the vast majority of events triggered on events
257within the VDSO. With simple binaries, this will often be the case so lets 257within the VDSO. With simple binaries, this will often be the case so let's
258take a slightly different example. In the course of writing this, it was 258take a slightly different example. In the course of writing this, it was
259noticed that X was generating an insane amount of page allocations so lets look 259noticed that X was generating an insane amount of page allocations so let's look
260at it 260at it:
261 261
262 $ perf record -c 1 -f \ 262 $ perf record -c 1 -f \
263 -e kmem:mm_page_alloc -e kmem:mm_page_free_direct \ 263 -e kmem:mm_page_alloc -e kmem:mm_page_free_direct \
@@ -280,8 +280,8 @@ This was interrupted after a few seconds and
280 # (For more details, try: perf report --sort comm,dso,symbol) 280 # (For more details, try: perf report --sort comm,dso,symbol)
281 # 281 #
282 282
283So, almost half of the events are occuring in a library. To get an idea which 283So, almost half of the events are occurring in a library. To get an idea which
284symbol. 284symbol:
285 285
286 $ perf report --sort comm,dso,symbol 286 $ perf report --sort comm,dso,symbol
287 # Samples: 27666 287 # Samples: 27666
@@ -297,7 +297,7 @@ symbol.
297 0.01% Xorg /opt/gfx-test/lib/libpixman-1.so.0.13.1 [.] get_fast_path 297 0.01% Xorg /opt/gfx-test/lib/libpixman-1.so.0.13.1 [.] get_fast_path
298 0.00% Xorg [kernel] [k] ftrace_trace_userstack 298 0.00% Xorg [kernel] [k] ftrace_trace_userstack
299 299
300To see where within the function pixmanFillsse2 things are going wrong 300To see where within the function pixmanFillsse2 things are going wrong:
301 301
302 $ perf annotate pixmanFillsse2 302 $ perf annotate pixmanFillsse2
303 [ ... ] 303 [ ... ]
diff --git a/Documentation/vgaarbiter.txt b/Documentation/vgaarbiter.txt
index 987f9b0a5ece..43a9b0694fdd 100644
--- a/Documentation/vgaarbiter.txt
+++ b/Documentation/vgaarbiter.txt
@@ -103,7 +103,7 @@ I.2 libpciaccess
103---------------- 103----------------
104 104
105To use the vga arbiter char device it was implemented an API inside the 105To use the vga arbiter char device it was implemented an API inside the
106libpciaccess library. One fieldd was added to struct pci_device (each device 106libpciaccess library. One field was added to struct pci_device (each device
107on the system): 107on the system):
108 108
109 /* the type of resource decoded by the device */ 109 /* the type of resource decoded by the device */