aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation
diff options
context:
space:
mode:
Diffstat (limited to 'Documentation')
-rw-r--r--Documentation/ABI/stable/sysfs-driver-qla2xxx8
-rw-r--r--Documentation/ABI/testing/procfs-diskstats2
-rw-r--r--Documentation/ABI/testing/sysfs-block2
-rw-r--r--Documentation/ABI/testing/sysfs-bus-usb13
-rw-r--r--Documentation/ABI/testing/sysfs-class-uwb_rc-wusbhc13
-rw-r--r--Documentation/ABI/testing/sysfs-devices-cache_disable18
-rw-r--r--Documentation/ABI/testing/sysfs-devices-memory14
-rw-r--r--Documentation/ABI/testing/sysfs-devices-system-cpu203
-rw-r--r--Documentation/ABI/testing/sysfs-kernel-slab109
-rw-r--r--Documentation/DMA-mapping.txt6
-rw-r--r--Documentation/DocBook/device-drivers.tmpl13
-rw-r--r--Documentation/DocBook/dvb/dvbapi.xml13
-rw-r--r--Documentation/DocBook/dvb/dvbproperty.xml (renamed from Documentation/DocBook/dvb/isdbt.xml)4
-rw-r--r--Documentation/DocBook/dvb/frontend.h.xml415
-rw-r--r--Documentation/DocBook/dvb/frontend.xml185
-rw-r--r--Documentation/DocBook/genericirq.tmpl4
-rw-r--r--Documentation/DocBook/kernel-hacking.tmpl2
-rw-r--r--Documentation/DocBook/media-entities.tmpl3
-rw-r--r--Documentation/DocBook/mtdnand.tmpl2
-rw-r--r--Documentation/DocBook/tracepoint.tmpl5
-rw-r--r--Documentation/DocBook/v4l/controls.xml20
-rw-r--r--Documentation/DocBook/v4l/pixfmt.xml5
-rw-r--r--Documentation/DocBook/v4l/videodev2.h.xml9
-rw-r--r--Documentation/DocBook/v4l/vidioc-g-fbuf.xml17
-rw-r--r--Documentation/DocBook/writing-an-alsa-driver.tmpl2
-rw-r--r--Documentation/RCU/trace.txt254
-rw-r--r--Documentation/RCU/whatisRCU.txt2
-rw-r--r--Documentation/arm/OMAP/DSS317
-rw-r--r--Documentation/arm/Samsung-S3C24XX/EB2410ITX.txt2
-rw-r--r--Documentation/arm/Samsung-S3C24XX/GPIO.txt2
-rw-r--r--Documentation/arm/Samsung-S3C24XX/Overview.txt2
-rw-r--r--Documentation/arm/Samsung-S3C24XX/S3C2412.txt2
-rw-r--r--Documentation/arm/Samsung-S3C24XX/S3C2413.txt2
-rw-r--r--Documentation/arm/Samsung-S3C24XX/Suspend.txt2
-rw-r--r--Documentation/arm/Samsung-S3C24XX/USB-Host.txt2
-rw-r--r--Documentation/blockdev/drbd/DRBD-8.3-data-packets.svg588
-rw-r--r--Documentation/blockdev/drbd/DRBD-data-packets.svg459
-rw-r--r--Documentation/blockdev/drbd/README.txt16
-rw-r--r--Documentation/blockdev/drbd/conn-states-8.dot18
-rw-r--r--Documentation/blockdev/drbd/disk-states-8.dot16
-rw-r--r--Documentation/blockdev/drbd/drbd-connection-state-overview.dot85
-rw-r--r--Documentation/blockdev/drbd/node-states-8.dot14
-rw-r--r--Documentation/cgroups/blkio-controller.txt135
-rw-r--r--Documentation/cpu-freq/cpu-drivers.txt6
-rw-r--r--Documentation/cpu-freq/user-guide.txt11
-rw-r--r--Documentation/cpu-hotplug.txt6
-rw-r--r--Documentation/cputopology.txt47
-rw-r--r--Documentation/device-mapper/snapshot.txt60
-rw-r--r--Documentation/dontdiff3
-rw-r--r--Documentation/dvb/README.dvb-usb2
-rw-r--r--Documentation/edac.txt7
-rw-r--r--Documentation/fb/framebuffer.txt6
-rw-r--r--Documentation/feature-removal-schedule.txt86
-rw-r--r--Documentation/filesystems/00-INDEX2
-rw-r--r--Documentation/filesystems/caching/fscache.txt110
-rw-r--r--Documentation/filesystems/caching/netfs-api.txt21
-rw-r--r--Documentation/filesystems/exofs.txt23
-rw-r--r--Documentation/filesystems/ext3.txt4
-rw-r--r--Documentation/filesystems/ext4.txt18
-rw-r--r--Documentation/filesystems/nilfs2.txt7
-rw-r--r--Documentation/filesystems/ocfs2.txt6
-rw-r--r--Documentation/filesystems/proc.txt16
-rw-r--r--Documentation/filesystems/vfs.txt2
-rw-r--r--Documentation/gpio.txt4
-rw-r--r--Documentation/hwmon/adt74732
-rw-r--r--Documentation/hwmon/adt7475204
-rw-r--r--Documentation/hwmon/f71882fg10
-rw-r--r--Documentation/hwmon/it871
-rw-r--r--Documentation/hwmon/lis3lv02d55
-rw-r--r--Documentation/hwmon/mc13783-adc50
-rw-r--r--Documentation/hwmon/sysfs-interface68
-rw-r--r--Documentation/hwmon/w83627ehf10
-rw-r--r--Documentation/hwmon/w83627hf29
-rw-r--r--Documentation/i2c/busses/i2c-piix42
-rw-r--r--Documentation/i2c/busses/i2c-voodoo362
-rw-r--r--Documentation/i2c/i2c-stub16
-rw-r--r--Documentation/i2c/old-module-parameters44
-rw-r--r--Documentation/i2c/writing-clients2
-rw-r--r--Documentation/isdn/README.gigaset146
-rw-r--r--Documentation/kernel-parameters.txt58
-rw-r--r--Documentation/kvm/api.txt109
-rw-r--r--Documentation/lguest/lguest.c3
-rw-r--r--Documentation/lockstat.txt12
-rw-r--r--Documentation/md.txt72
-rw-r--r--Documentation/memory-hotplug.txt11
-rw-r--r--Documentation/misc-devices/ad525x_dpot.txt57
-rw-r--r--Documentation/misc-devices/c2port.txt (renamed from Documentation/c2port.txt)0
-rw-r--r--Documentation/misc-devices/ics932s401 (renamed from Documentation/ics932s401)0
-rw-r--r--Documentation/networking/bonding.txt42
-rw-r--r--Documentation/networking/ip-sysctl.txt36
-rw-r--r--Documentation/nommu-mmap.txt26
-rw-r--r--Documentation/oops-tracing.txt2
-rw-r--r--Documentation/pcmcia/driver-changes.txt12
-rw-r--r--Documentation/power/regulator/consumer.txt2
-rw-r--r--Documentation/power/runtime_pm.txt12
-rw-r--r--Documentation/powerpc/dts-bindings/fsl/board.txt4
-rw-r--r--Documentation/powerpc/dts-bindings/fsl/mpc5200.txt27
-rw-r--r--Documentation/powerpc/dts-bindings/xilinx.txt11
-rw-r--r--Documentation/scsi/ChangeLog.megaraid_sas64
-rw-r--r--Documentation/serial/hayes-esp.txt154
-rw-r--r--Documentation/serial/tty.txt9
-rw-r--r--Documentation/slow-work.txt160
-rw-r--r--Documentation/sound/alsa/ALSA-Configuration.txt15
-rw-r--r--Documentation/sound/alsa/ControlNames.txt3
-rw-r--r--Documentation/sound/alsa/HD-Audio-Models.txt2
-rw-r--r--Documentation/sound/alsa/HD-Audio.txt6
-rw-r--r--Documentation/spi/spi-summary2
-rw-r--r--Documentation/spinlocks.txt184
-rw-r--r--Documentation/sysctl/ctl_unnumbered.txt22
-rw-r--r--Documentation/sysctl/kernel.txt37
-rw-r--r--Documentation/sysctl/vm.txt2
-rw-r--r--Documentation/timers/hpet.txt2
-rw-r--r--Documentation/trace/ftrace-design.txt13
-rw-r--r--Documentation/trace/ftrace.txt2
-rw-r--r--Documentation/trace/kprobetrace.txt149
-rw-r--r--Documentation/usb/power-management.txt69
-rw-r--r--Documentation/video4linux/CARDLIST.cx238852
-rw-r--r--Documentation/video4linux/CARDLIST.cx881
-rw-r--r--Documentation/video4linux/CARDLIST.em28xx3
-rw-r--r--Documentation/video4linux/CARDLIST.saa71342
-rw-r--r--Documentation/video4linux/gspca.txt21
-rw-r--r--Documentation/video4linux/si4713.txt2
-rw-r--r--Documentation/video4linux/zr364xx.txt1
-rw-r--r--Documentation/vm/hugetlbpage.txt262
-rw-r--r--Documentation/vm/hwpoison.txt136
-rw-r--r--Documentation/vm/ksm.txt22
-rw-r--r--Documentation/vm/page-types.c72
-rw-r--r--Documentation/vm/slub.txt2
128 files changed, 4897 insertions, 1173 deletions
diff --git a/Documentation/ABI/stable/sysfs-driver-qla2xxx b/Documentation/ABI/stable/sysfs-driver-qla2xxx
new file mode 100644
index 000000000000..9a59d84497ed
--- /dev/null
+++ b/Documentation/ABI/stable/sysfs-driver-qla2xxx
@@ -0,0 +1,8 @@
1What: /sys/bus/pci/drivers/qla2xxx/.../devices/*
2Date: September 2009
3Contact: QLogic Linux Driver <linux-driver@qlogic.com>
4Description: qla2xxx-udev.sh currently looks for uevent CHANGE events to
5 signal a firmware-dump has been generated by the driver and is
6 ready for retrieval.
7Users: qla2xxx-udev.sh. Proposed changes should be mailed to
8 linux-driver@qlogic.com
diff --git a/Documentation/ABI/testing/procfs-diskstats b/Documentation/ABI/testing/procfs-diskstats
index 99233902e09e..f91a973a37fe 100644
--- a/Documentation/ABI/testing/procfs-diskstats
+++ b/Documentation/ABI/testing/procfs-diskstats
@@ -8,7 +8,7 @@ Description:
8 1 - major number 8 1 - major number
9 2 - minor mumber 9 2 - minor mumber
10 3 - device name 10 3 - device name
11 4 - reads completed succesfully 11 4 - reads completed successfully
12 5 - reads merged 12 5 - reads merged
13 6 - sectors read 13 6 - sectors read
14 7 - time spent reading (ms) 14 7 - time spent reading (ms)
diff --git a/Documentation/ABI/testing/sysfs-block b/Documentation/ABI/testing/sysfs-block
index 5f3bedaf8e35..d2f90334bb93 100644
--- a/Documentation/ABI/testing/sysfs-block
+++ b/Documentation/ABI/testing/sysfs-block
@@ -4,7 +4,7 @@ Contact: Jerome Marchand <jmarchan@redhat.com>
4Description: 4Description:
5 The /sys/block/<disk>/stat files displays the I/O 5 The /sys/block/<disk>/stat files displays the I/O
6 statistics of disk <disk>. They contain 11 fields: 6 statistics of disk <disk>. They contain 11 fields:
7 1 - reads completed succesfully 7 1 - reads completed successfully
8 2 - reads merged 8 2 - reads merged
9 3 - sectors read 9 3 - sectors read
10 4 - time spent reading (ms) 10 4 - time spent reading (ms)
diff --git a/Documentation/ABI/testing/sysfs-bus-usb b/Documentation/ABI/testing/sysfs-bus-usb
index 7772928ee48f..deb6b489e4e5 100644
--- a/Documentation/ABI/testing/sysfs-bus-usb
+++ b/Documentation/ABI/testing/sysfs-bus-usb
@@ -144,3 +144,16 @@ Description:
144 144
145 Write a 1 to force the device to disconnect 145 Write a 1 to force the device to disconnect
146 (equivalent to unplugging a wired USB device). 146 (equivalent to unplugging a wired USB device).
147
148What: /sys/bus/usb/drivers/.../remove_id
149Date: November 2009
150Contact: CHENG Renquan <rqcheng@smu.edu.sg>
151Description:
152 Writing a device ID to this file will remove an ID
153 that was dynamically added via the new_id sysfs entry.
154 The format for the device ID is:
155 idVendor idProduct. After successfully
156 removing an ID, the driver will no longer support the
157 device. This is useful to ensure auto probing won't
158 match the driver to the device. For example:
159 # echo "046d c315" > /sys/bus/usb/drivers/foo/remove_id
diff --git a/Documentation/ABI/testing/sysfs-class-uwb_rc-wusbhc b/Documentation/ABI/testing/sysfs-class-uwb_rc-wusbhc
index 4e8106f7cfd9..25b1e751b777 100644
--- a/Documentation/ABI/testing/sysfs-class-uwb_rc-wusbhc
+++ b/Documentation/ABI/testing/sysfs-class-uwb_rc-wusbhc
@@ -23,3 +23,16 @@ Description:
23 Since this relates to security (specifically, the 23 Since this relates to security (specifically, the
24 lifetime of PTKs and GTKs) it should not be changed 24 lifetime of PTKs and GTKs) it should not be changed
25 from the default. 25 from the default.
26
27What: /sys/class/uwb_rc/uwbN/wusbhc/wusb_phy_rate
28Date: August 2009
29KernelVersion: 2.6.32
30Contact: David Vrabel <david.vrabel@csr.com>
31Description:
32 The maximum PHY rate to use for all connected devices.
33 This is only of limited use for testing and
34 development as the hardware's automatic rate
35 adaptation is better then this simple control.
36
37 Refer to [ECMA-368] section 10.3.1.1 for the value to
38 use.
diff --git a/Documentation/ABI/testing/sysfs-devices-cache_disable b/Documentation/ABI/testing/sysfs-devices-cache_disable
deleted file mode 100644
index 175bb4f70512..000000000000
--- a/Documentation/ABI/testing/sysfs-devices-cache_disable
+++ /dev/null
@@ -1,18 +0,0 @@
1What: /sys/devices/system/cpu/cpu*/cache/index*/cache_disable_X
2Date: August 2008
3KernelVersion: 2.6.27
4Contact: mark.langsdorf@amd.com
5Description: These files exist in every cpu's cache index directories.
6 There are currently 2 cache_disable_# files in each
7 directory. Reading from these files on a supported
8 processor will return that cache disable index value
9 for that processor and node. Writing to one of these
10 files will cause the specificed cache index to be disabled.
11
12 Currently, only AMD Family 10h Processors support cache index
13 disable, and only for their L3 caches. See the BIOS and
14 Kernel Developer's Guide at
15 http://www.amd.com/us-en/assets/content_type/white_papers_and_tech_docs/31116-Public-GH-BKDG_3.20_2-4-09.pdf
16 for formatting information and other details on the
17 cache index disable.
18Users: joachim.deguara@amd.com
diff --git a/Documentation/ABI/testing/sysfs-devices-memory b/Documentation/ABI/testing/sysfs-devices-memory
index 9fe91c02ee40..bf1627b02a03 100644
--- a/Documentation/ABI/testing/sysfs-devices-memory
+++ b/Documentation/ABI/testing/sysfs-devices-memory
@@ -60,6 +60,19 @@ Description:
60Users: hotplug memory remove tools 60Users: hotplug memory remove tools
61 https://w3.opensource.ibm.com/projects/powerpc-utils/ 61 https://w3.opensource.ibm.com/projects/powerpc-utils/
62 62
63
64What: /sys/devices/system/memoryX/nodeY
65Date: October 2009
66Contact: Linux Memory Management list <linux-mm@kvack.org>
67Description:
68 When CONFIG_NUMA is enabled, a symbolic link that
69 points to the corresponding NUMA node directory.
70
71 For example, the following symbolic link is created for
72 memory section 9 on node0:
73 /sys/devices/system/memory/memory9/node0 -> ../../node/node0
74
75
63What: /sys/devices/system/node/nodeX/memoryY 76What: /sys/devices/system/node/nodeX/memoryY
64Date: September 2008 77Date: September 2008
65Contact: Gary Hade <garyhade@us.ibm.com> 78Contact: Gary Hade <garyhade@us.ibm.com>
@@ -70,4 +83,3 @@ Description:
70 memory section directory. For example, the following symbolic 83 memory section directory. For example, the following symbolic
71 link is created for memory section 9 on node0. 84 link is created for memory section 9 on node0.
72 /sys/devices/system/node/node0/memory9 -> ../../memory/memory9 85 /sys/devices/system/node/node0/memory9 -> ../../memory/memory9
73
diff --git a/Documentation/ABI/testing/sysfs-devices-system-cpu b/Documentation/ABI/testing/sysfs-devices-system-cpu
new file mode 100644
index 000000000000..84a710f87c64
--- /dev/null
+++ b/Documentation/ABI/testing/sysfs-devices-system-cpu
@@ -0,0 +1,203 @@
1What: /sys/devices/system/cpu/
2Date: pre-git history
3Contact: Linux kernel mailing list <linux-kernel@vger.kernel.org>
4Description:
5 A collection of both global and individual CPU attributes
6
7 Individual CPU attributes are contained in subdirectories
8 named by the kernel's logical CPU number, e.g.:
9
10 /sys/devices/system/cpu/cpu#/
11
12What: /sys/devices/system/cpu/sched_mc_power_savings
13 /sys/devices/system/cpu/sched_smt_power_savings
14Date: June 2006
15Contact: Linux kernel mailing list <linux-kernel@vger.kernel.org>
16Description: Discover and adjust the kernel's multi-core scheduler support.
17
18 Possible values are:
19
20 0 - No power saving load balance (default value)
21 1 - Fill one thread/core/package first for long running threads
22 2 - Also bias task wakeups to semi-idle cpu package for power
23 savings
24
25 sched_mc_power_savings is dependent upon SCHED_MC, which is
26 itself architecture dependent.
27
28 sched_smt_power_savings is dependent upon SCHED_SMT, which
29 is itself architecture dependent.
30
31 The two files are independent of each other. It is possible
32 that one file may be present without the other.
33
34 Introduced by git commit 5c45bf27.
35
36
37What: /sys/devices/system/cpu/kernel_max
38 /sys/devices/system/cpu/offline
39 /sys/devices/system/cpu/online
40 /sys/devices/system/cpu/possible
41 /sys/devices/system/cpu/present
42Date: December 2008
43Contact: Linux kernel mailing list <linux-kernel@vger.kernel.org>
44Description: CPU topology files that describe kernel limits related to
45 hotplug. Briefly:
46
47 kernel_max: the maximum cpu index allowed by the kernel
48 configuration.
49
50 offline: cpus that are not online because they have been
51 HOTPLUGGED off or exceed the limit of cpus allowed by the
52 kernel configuration (kernel_max above).
53
54 online: cpus that are online and being scheduled.
55
56 possible: cpus that have been allocated resources and can be
57 brought online if they are present.
58
59 present: cpus that have been identified as being present in
60 the system.
61
62 See Documentation/cputopology.txt for more information.
63
64
65What: /sys/devices/system/cpu/probe
66 /sys/devices/system/cpu/release
67Date: November 2009
68Contact: Linux kernel mailing list <linux-kernel@vger.kernel.org>
69Description: Dynamic addition and removal of CPU's. This is not hotplug
70 removal, this is meant complete removal/addition of the CPU
71 from the system.
72
73 probe: writes to this file will dynamically add a CPU to the
74 system. Information written to the file to add CPU's is
75 architecture specific.
76
77 release: writes to this file dynamically remove a CPU from
78 the system. Information writtento the file to remove CPU's
79 is architecture specific.
80
81What: /sys/devices/system/cpu/cpu#/node
82Date: October 2009
83Contact: Linux memory management mailing list <linux-mm@kvack.org>
84Description: Discover NUMA node a CPU belongs to
85
86 When CONFIG_NUMA is enabled, a symbolic link that points
87 to the corresponding NUMA node directory.
88
89 For example, the following symlink is created for cpu42
90 in NUMA node 2:
91
92 /sys/devices/system/cpu/cpu42/node2 -> ../../node/node2
93
94
95What: /sys/devices/system/cpu/cpu#/node
96Date: October 2009
97Contact: Linux memory management mailing list <linux-mm@kvack.org>
98Description: Discover NUMA node a CPU belongs to
99
100 When CONFIG_NUMA is enabled, a symbolic link that points
101 to the corresponding NUMA node directory.
102
103 For example, the following symlink is created for cpu42
104 in NUMA node 2:
105
106 /sys/devices/system/cpu/cpu42/node2 -> ../../node/node2
107
108
109What: /sys/devices/system/cpu/cpu#/topology/core_id
110 /sys/devices/system/cpu/cpu#/topology/core_siblings
111 /sys/devices/system/cpu/cpu#/topology/core_siblings_list
112 /sys/devices/system/cpu/cpu#/topology/physical_package_id
113 /sys/devices/system/cpu/cpu#/topology/thread_siblings
114 /sys/devices/system/cpu/cpu#/topology/thread_siblings_list
115Date: December 2008
116Contact: Linux kernel mailing list <linux-kernel@vger.kernel.org>
117Description: CPU topology files that describe a logical CPU's relationship
118 to other cores and threads in the same physical package.
119
120 One cpu# directory is created per logical CPU in the system,
121 e.g. /sys/devices/system/cpu/cpu42/.
122
123 Briefly, the files above are:
124
125 core_id: the CPU core ID of cpu#. Typically it is the
126 hardware platform's identifier (rather than the kernel's).
127 The actual value is architecture and platform dependent.
128
129 core_siblings: internal kernel map of cpu#'s hardware threads
130 within the same physical_package_id.
131
132 core_siblings_list: human-readable list of the logical CPU
133 numbers within the same physical_package_id as cpu#.
134
135 physical_package_id: physical package id of cpu#. Typically
136 corresponds to a physical socket number, but the actual value
137 is architecture and platform dependent.
138
139 thread_siblings: internel kernel map of cpu#'s hardware
140 threads within the same core as cpu#
141
142 thread_siblings_list: human-readable list of cpu#'s hardware
143 threads within the same core as cpu#
144
145 See Documentation/cputopology.txt for more information.
146
147
148What: /sys/devices/system/cpu/cpuidle/current_driver
149 /sys/devices/system/cpu/cpuidle/current_governer_ro
150Date: September 2007
151Contact: Linux kernel mailing list <linux-kernel@vger.kernel.org>
152Description: Discover cpuidle policy and mechanism
153
154 Various CPUs today support multiple idle levels that are
155 differentiated by varying exit latencies and power
156 consumption during idle.
157
158 Idle policy (governor) is differentiated from idle mechanism
159 (driver)
160
161 current_driver: displays current idle mechanism
162
163 current_governor_ro: displays current idle policy
164
165 See files in Documentation/cpuidle/ for more information.
166
167
168What: /sys/devices/system/cpu/cpu#/cpufreq/*
169Date: pre-git history
170Contact: cpufreq@vger.kernel.org
171Description: Discover and change clock speed of CPUs
172
173 Clock scaling allows you to change the clock speed of the
174 CPUs on the fly. This is a nice method to save battery
175 power, because the lower the clock speed, the less power
176 the CPU consumes.
177
178 There are many knobs to tweak in this directory.
179
180 See files in Documentation/cpu-freq/ for more information.
181
182 In particular, read Documentation/cpu-freq/user-guide.txt
183 to learn how to control the knobs.
184
185
186What: /sys/devices/system/cpu/cpu*/cache/index*/cache_disable_X
187Date: August 2008
188KernelVersion: 2.6.27
189Contact: mark.langsdorf@amd.com
190Description: These files exist in every cpu's cache index directories.
191 There are currently 2 cache_disable_# files in each
192 directory. Reading from these files on a supported
193 processor will return that cache disable index value
194 for that processor and node. Writing to one of these
195 files will cause the specificed cache index to be disabled.
196
197 Currently, only AMD Family 10h Processors support cache index
198 disable, and only for their L3 caches. See the BIOS and
199 Kernel Developer's Guide at
200 http://www.amd.com/us-en/assets/content_type/white_papers_and_tech_docs/31116-Public-GH-BKDG_3.20_2-4-09.pdf
201 for formatting information and other details on the
202 cache index disable.
203Users: joachim.deguara@amd.com
diff --git a/Documentation/ABI/testing/sysfs-kernel-slab b/Documentation/ABI/testing/sysfs-kernel-slab
index 6dcf75e594fb..8b093f8222d3 100644
--- a/Documentation/ABI/testing/sysfs-kernel-slab
+++ b/Documentation/ABI/testing/sysfs-kernel-slab
@@ -45,8 +45,9 @@ KernelVersion: 2.6.25
45Contact: Pekka Enberg <penberg@cs.helsinki.fi>, 45Contact: Pekka Enberg <penberg@cs.helsinki.fi>,
46 Christoph Lameter <cl@linux-foundation.org> 46 Christoph Lameter <cl@linux-foundation.org>
47Description: 47Description:
48 The alloc_fastpath file is read-only and specifies how many 48 The alloc_fastpath file shows how many objects have been
49 objects have been allocated using the fast path. 49 allocated using the fast path. It can be written to clear the
50 current count.
50 Available when CONFIG_SLUB_STATS is enabled. 51 Available when CONFIG_SLUB_STATS is enabled.
51 52
52What: /sys/kernel/slab/cache/alloc_from_partial 53What: /sys/kernel/slab/cache/alloc_from_partial
@@ -55,9 +56,10 @@ KernelVersion: 2.6.25
55Contact: Pekka Enberg <penberg@cs.helsinki.fi>, 56Contact: Pekka Enberg <penberg@cs.helsinki.fi>,
56 Christoph Lameter <cl@linux-foundation.org> 57 Christoph Lameter <cl@linux-foundation.org>
57Description: 58Description:
58 The alloc_from_partial file is read-only and specifies how 59 The alloc_from_partial file shows how many times a cpu slab has
59 many times a cpu slab has been full and it has been refilled 60 been full and it has been refilled by using a slab from the list
60 by using a slab from the list of partially used slabs. 61 of partially used slabs. It can be written to clear the current
62 count.
61 Available when CONFIG_SLUB_STATS is enabled. 63 Available when CONFIG_SLUB_STATS is enabled.
62 64
63What: /sys/kernel/slab/cache/alloc_refill 65What: /sys/kernel/slab/cache/alloc_refill
@@ -66,9 +68,9 @@ KernelVersion: 2.6.25
66Contact: Pekka Enberg <penberg@cs.helsinki.fi>, 68Contact: Pekka Enberg <penberg@cs.helsinki.fi>,
67 Christoph Lameter <cl@linux-foundation.org> 69 Christoph Lameter <cl@linux-foundation.org>
68Description: 70Description:
69 The alloc_refill file is read-only and specifies how many 71 The alloc_refill file shows how many times the per-cpu freelist
70 times the per-cpu freelist was empty but there were objects 72 was empty but there were objects available as the result of
71 available as the result of remote cpu frees. 73 remote cpu frees. It can be written to clear the current count.
72 Available when CONFIG_SLUB_STATS is enabled. 74 Available when CONFIG_SLUB_STATS is enabled.
73 75
74What: /sys/kernel/slab/cache/alloc_slab 76What: /sys/kernel/slab/cache/alloc_slab
@@ -77,8 +79,9 @@ KernelVersion: 2.6.25
77Contact: Pekka Enberg <penberg@cs.helsinki.fi>, 79Contact: Pekka Enberg <penberg@cs.helsinki.fi>,
78 Christoph Lameter <cl@linux-foundation.org> 80 Christoph Lameter <cl@linux-foundation.org>
79Description: 81Description:
80 The alloc_slab file is read-only and specifies how many times 82 The alloc_slab file is shows how many times a new slab had to
81 a new slab had to be allocated from the page allocator. 83 be allocated from the page allocator. It can be written to
84 clear the current count.
82 Available when CONFIG_SLUB_STATS is enabled. 85 Available when CONFIG_SLUB_STATS is enabled.
83 86
84What: /sys/kernel/slab/cache/alloc_slowpath 87What: /sys/kernel/slab/cache/alloc_slowpath
@@ -87,9 +90,10 @@ KernelVersion: 2.6.25
87Contact: Pekka Enberg <penberg@cs.helsinki.fi>, 90Contact: Pekka Enberg <penberg@cs.helsinki.fi>,
88 Christoph Lameter <cl@linux-foundation.org> 91 Christoph Lameter <cl@linux-foundation.org>
89Description: 92Description:
90 The alloc_slowpath file is read-only and specifies how many 93 The alloc_slowpath file shows how many objects have been
91 objects have been allocated using the slow path because of a 94 allocated using the slow path because of a refill or
92 refill or allocation from a partial or new slab. 95 allocation from a partial or new slab. It can be written to
96 clear the current count.
93 Available when CONFIG_SLUB_STATS is enabled. 97 Available when CONFIG_SLUB_STATS is enabled.
94 98
95What: /sys/kernel/slab/cache/cache_dma 99What: /sys/kernel/slab/cache/cache_dma
@@ -117,10 +121,11 @@ KernelVersion: 2.6.31
117Contact: Pekka Enberg <penberg@cs.helsinki.fi>, 121Contact: Pekka Enberg <penberg@cs.helsinki.fi>,
118 Christoph Lameter <cl@linux-foundation.org> 122 Christoph Lameter <cl@linux-foundation.org>
119Description: 123Description:
120 The file cpuslab_flush is read-only and specifies how many 124 The file cpuslab_flush shows how many times a cache's cpu slabs
121 times a cache's cpu slabs have been flushed as the result of 125 have been flushed as the result of destroying or shrinking a
122 destroying or shrinking a cache, a cpu going offline, or as 126 cache, a cpu going offline, or as the result of forcing an
123 the result of forcing an allocation from a certain node. 127 allocation from a certain node. It can be written to clear the
128 current count.
124 Available when CONFIG_SLUB_STATS is enabled. 129 Available when CONFIG_SLUB_STATS is enabled.
125 130
126What: /sys/kernel/slab/cache/ctor 131What: /sys/kernel/slab/cache/ctor
@@ -139,8 +144,8 @@ KernelVersion: 2.6.25
139Contact: Pekka Enberg <penberg@cs.helsinki.fi>, 144Contact: Pekka Enberg <penberg@cs.helsinki.fi>,
140 Christoph Lameter <cl@linux-foundation.org> 145 Christoph Lameter <cl@linux-foundation.org>
141Description: 146Description:
142 The file deactivate_empty is read-only and specifies how many 147 The deactivate_empty file shows how many times an empty cpu slab
143 times an empty cpu slab was deactivated. 148 was deactivated. It can be written to clear the current count.
144 Available when CONFIG_SLUB_STATS is enabled. 149 Available when CONFIG_SLUB_STATS is enabled.
145 150
146What: /sys/kernel/slab/cache/deactivate_full 151What: /sys/kernel/slab/cache/deactivate_full
@@ -149,8 +154,8 @@ KernelVersion: 2.6.25
149Contact: Pekka Enberg <penberg@cs.helsinki.fi>, 154Contact: Pekka Enberg <penberg@cs.helsinki.fi>,
150 Christoph Lameter <cl@linux-foundation.org> 155 Christoph Lameter <cl@linux-foundation.org>
151Description: 156Description:
152 The file deactivate_full is read-only and specifies how many 157 The deactivate_full file shows how many times a full cpu slab
153 times a full cpu slab was deactivated. 158 was deactivated. It can be written to clear the current count.
154 Available when CONFIG_SLUB_STATS is enabled. 159 Available when CONFIG_SLUB_STATS is enabled.
155 160
156What: /sys/kernel/slab/cache/deactivate_remote_frees 161What: /sys/kernel/slab/cache/deactivate_remote_frees
@@ -159,9 +164,9 @@ KernelVersion: 2.6.25
159Contact: Pekka Enberg <penberg@cs.helsinki.fi>, 164Contact: Pekka Enberg <penberg@cs.helsinki.fi>,
160 Christoph Lameter <cl@linux-foundation.org> 165 Christoph Lameter <cl@linux-foundation.org>
161Description: 166Description:
162 The file deactivate_remote_frees is read-only and specifies how 167 The deactivate_remote_frees file shows how many times a cpu slab
163 many times a cpu slab has been deactivated and contained free 168 has been deactivated and contained free objects that were freed
164 objects that were freed remotely. 169 remotely. It can be written to clear the current count.
165 Available when CONFIG_SLUB_STATS is enabled. 170 Available when CONFIG_SLUB_STATS is enabled.
166 171
167What: /sys/kernel/slab/cache/deactivate_to_head 172What: /sys/kernel/slab/cache/deactivate_to_head
@@ -170,9 +175,9 @@ KernelVersion: 2.6.25
170Contact: Pekka Enberg <penberg@cs.helsinki.fi>, 175Contact: Pekka Enberg <penberg@cs.helsinki.fi>,
171 Christoph Lameter <cl@linux-foundation.org> 176 Christoph Lameter <cl@linux-foundation.org>
172Description: 177Description:
173 The file deactivate_to_head is read-only and specifies how 178 The deactivate_to_head file shows how many times a partial cpu
174 many times a partial cpu slab was deactivated and added to the 179 slab was deactivated and added to the head of its node's partial
175 head of its node's partial list. 180 list. It can be written to clear the current count.
176 Available when CONFIG_SLUB_STATS is enabled. 181 Available when CONFIG_SLUB_STATS is enabled.
177 182
178What: /sys/kernel/slab/cache/deactivate_to_tail 183What: /sys/kernel/slab/cache/deactivate_to_tail
@@ -181,9 +186,9 @@ KernelVersion: 2.6.25
181Contact: Pekka Enberg <penberg@cs.helsinki.fi>, 186Contact: Pekka Enberg <penberg@cs.helsinki.fi>,
182 Christoph Lameter <cl@linux-foundation.org> 187 Christoph Lameter <cl@linux-foundation.org>
183Description: 188Description:
184 The file deactivate_to_tail is read-only and specifies how 189 The deactivate_to_tail file shows how many times a partial cpu
185 many times a partial cpu slab was deactivated and added to the 190 slab was deactivated and added to the tail of its node's partial
186 tail of its node's partial list. 191 list. It can be written to clear the current count.
187 Available when CONFIG_SLUB_STATS is enabled. 192 Available when CONFIG_SLUB_STATS is enabled.
188 193
189What: /sys/kernel/slab/cache/destroy_by_rcu 194What: /sys/kernel/slab/cache/destroy_by_rcu
@@ -201,9 +206,9 @@ KernelVersion: 2.6.25
201Contact: Pekka Enberg <penberg@cs.helsinki.fi>, 206Contact: Pekka Enberg <penberg@cs.helsinki.fi>,
202 Christoph Lameter <cl@linux-foundation.org> 207 Christoph Lameter <cl@linux-foundation.org>
203Description: 208Description:
204 The file free_add_partial is read-only and specifies how many 209 The free_add_partial file shows how many times an object has
205 times an object has been freed in a full slab so that it had to 210 been freed in a full slab so that it had to added to its node's
206 added to its node's partial list. 211 partial list. It can be written to clear the current count.
207 Available when CONFIG_SLUB_STATS is enabled. 212 Available when CONFIG_SLUB_STATS is enabled.
208 213
209What: /sys/kernel/slab/cache/free_calls 214What: /sys/kernel/slab/cache/free_calls
@@ -222,9 +227,9 @@ KernelVersion: 2.6.25
222Contact: Pekka Enberg <penberg@cs.helsinki.fi>, 227Contact: Pekka Enberg <penberg@cs.helsinki.fi>,
223 Christoph Lameter <cl@linux-foundation.org> 228 Christoph Lameter <cl@linux-foundation.org>
224Description: 229Description:
225 The free_fastpath file is read-only and specifies how many 230 The free_fastpath file shows how many objects have been freed
226 objects have been freed using the fast path because it was an 231 using the fast path because it was an object from the cpu slab.
227 object from the cpu slab. 232 It can be written to clear the current count.
228 Available when CONFIG_SLUB_STATS is enabled. 233 Available when CONFIG_SLUB_STATS is enabled.
229 234
230What: /sys/kernel/slab/cache/free_frozen 235What: /sys/kernel/slab/cache/free_frozen
@@ -233,9 +238,9 @@ KernelVersion: 2.6.25
233Contact: Pekka Enberg <penberg@cs.helsinki.fi>, 238Contact: Pekka Enberg <penberg@cs.helsinki.fi>,
234 Christoph Lameter <cl@linux-foundation.org> 239 Christoph Lameter <cl@linux-foundation.org>
235Description: 240Description:
236 The free_frozen file is read-only and specifies how many 241 The free_frozen file shows how many objects have been freed to
237 objects have been freed to a frozen slab (i.e. a remote cpu 242 a frozen slab (i.e. a remote cpu slab). It can be written to
238 slab). 243 clear the current count.
239 Available when CONFIG_SLUB_STATS is enabled. 244 Available when CONFIG_SLUB_STATS is enabled.
240 245
241What: /sys/kernel/slab/cache/free_remove_partial 246What: /sys/kernel/slab/cache/free_remove_partial
@@ -244,9 +249,10 @@ KernelVersion: 2.6.25
244Contact: Pekka Enberg <penberg@cs.helsinki.fi>, 249Contact: Pekka Enberg <penberg@cs.helsinki.fi>,
245 Christoph Lameter <cl@linux-foundation.org> 250 Christoph Lameter <cl@linux-foundation.org>
246Description: 251Description:
247 The file free_remove_partial is read-only and specifies how 252 The free_remove_partial file shows how many times an object has
248 many times an object has been freed to a now-empty slab so 253 been freed to a now-empty slab so that it had to be removed from
249 that it had to be removed from its node's partial list. 254 its node's partial list. It can be written to clear the current
255 count.
250 Available when CONFIG_SLUB_STATS is enabled. 256 Available when CONFIG_SLUB_STATS is enabled.
251 257
252What: /sys/kernel/slab/cache/free_slab 258What: /sys/kernel/slab/cache/free_slab
@@ -255,8 +261,9 @@ KernelVersion: 2.6.25
255Contact: Pekka Enberg <penberg@cs.helsinki.fi>, 261Contact: Pekka Enberg <penberg@cs.helsinki.fi>,
256 Christoph Lameter <cl@linux-foundation.org> 262 Christoph Lameter <cl@linux-foundation.org>
257Description: 263Description:
258 The free_slab file is read-only and specifies how many times an 264 The free_slab file shows how many times an empty slab has been
259 empty slab has been freed back to the page allocator. 265 freed back to the page allocator. It can be written to clear
266 the current count.
260 Available when CONFIG_SLUB_STATS is enabled. 267 Available when CONFIG_SLUB_STATS is enabled.
261 268
262What: /sys/kernel/slab/cache/free_slowpath 269What: /sys/kernel/slab/cache/free_slowpath
@@ -265,9 +272,9 @@ KernelVersion: 2.6.25
265Contact: Pekka Enberg <penberg@cs.helsinki.fi>, 272Contact: Pekka Enberg <penberg@cs.helsinki.fi>,
266 Christoph Lameter <cl@linux-foundation.org> 273 Christoph Lameter <cl@linux-foundation.org>
267Description: 274Description:
268 The free_slowpath file is read-only and specifies how many 275 The free_slowpath file shows how many objects have been freed
269 objects have been freed using the slow path (i.e. to a full or 276 using the slow path (i.e. to a full or partial slab). It can
270 partial slab). 277 be written to clear the current count.
271 Available when CONFIG_SLUB_STATS is enabled. 278 Available when CONFIG_SLUB_STATS is enabled.
272 279
273What: /sys/kernel/slab/cache/hwcache_align 280What: /sys/kernel/slab/cache/hwcache_align
@@ -346,10 +353,10 @@ KernelVersion: 2.6.26
346Contact: Pekka Enberg <penberg@cs.helsinki.fi>, 353Contact: Pekka Enberg <penberg@cs.helsinki.fi>,
347 Christoph Lameter <cl@linux-foundation.org> 354 Christoph Lameter <cl@linux-foundation.org>
348Description: 355Description:
349 The file order_fallback is read-only and specifies how many 356 The order_fallback file shows how many times an allocation of a
350 times an allocation of a new slab has not been possible at the 357 new slab has not been possible at the cache's order and instead
351 cache's order and instead fallen back to its minimum possible 358 fallen back to its minimum possible order. It can be written to
352 order. 359 clear the current count.
353 Available when CONFIG_SLUB_STATS is enabled. 360 Available when CONFIG_SLUB_STATS is enabled.
354 361
355What: /sys/kernel/slab/cache/partial 362What: /sys/kernel/slab/cache/partial
diff --git a/Documentation/DMA-mapping.txt b/Documentation/DMA-mapping.txt
index 01f24e94bdb6..ecad88d9fe59 100644
--- a/Documentation/DMA-mapping.txt
+++ b/Documentation/DMA-mapping.txt
@@ -214,7 +214,7 @@ most specific mask.
214Here is pseudo-code showing how this might be done: 214Here is pseudo-code showing how this might be done:
215 215
216 #define PLAYBACK_ADDRESS_BITS DMA_BIT_MASK(32) 216 #define PLAYBACK_ADDRESS_BITS DMA_BIT_MASK(32)
217 #define RECORD_ADDRESS_BITS 0x00ffffff 217 #define RECORD_ADDRESS_BITS DMA_BIT_MASK(24)
218 218
219 struct my_sound_card *card; 219 struct my_sound_card *card;
220 struct pci_dev *pdev; 220 struct pci_dev *pdev;
@@ -224,14 +224,14 @@ Here is pseudo-code showing how this might be done:
224 card->playback_enabled = 1; 224 card->playback_enabled = 1;
225 } else { 225 } else {
226 card->playback_enabled = 0; 226 card->playback_enabled = 0;
227 printk(KERN_WARN "%s: Playback disabled due to DMA limitations.\n", 227 printk(KERN_WARNING "%s: Playback disabled due to DMA limitations.\n",
228 card->name); 228 card->name);
229 } 229 }
230 if (!pci_set_dma_mask(pdev, RECORD_ADDRESS_BITS)) { 230 if (!pci_set_dma_mask(pdev, RECORD_ADDRESS_BITS)) {
231 card->record_enabled = 1; 231 card->record_enabled = 1;
232 } else { 232 } else {
233 card->record_enabled = 0; 233 card->record_enabled = 0;
234 printk(KERN_WARN "%s: Record disabled due to DMA limitations.\n", 234 printk(KERN_WARNING "%s: Record disabled due to DMA limitations.\n",
235 card->name); 235 card->name);
236 } 236 }
237 237
diff --git a/Documentation/DocBook/device-drivers.tmpl b/Documentation/DocBook/device-drivers.tmpl
index 94a20fe8fedf..f9a6e2c75f12 100644
--- a/Documentation/DocBook/device-drivers.tmpl
+++ b/Documentation/DocBook/device-drivers.tmpl
@@ -293,10 +293,23 @@ X!Idrivers/video/console/fonts.c
293 293
294 <chapter id="input_subsystem"> 294 <chapter id="input_subsystem">
295 <title>Input Subsystem</title> 295 <title>Input Subsystem</title>
296 <sect1><title>Input core</title>
296!Iinclude/linux/input.h 297!Iinclude/linux/input.h
297!Edrivers/input/input.c 298!Edrivers/input/input.c
298!Edrivers/input/ff-core.c 299!Edrivers/input/ff-core.c
299!Edrivers/input/ff-memless.c 300!Edrivers/input/ff-memless.c
301 </sect1>
302 <sect1><title>Polled input devices</title>
303!Iinclude/linux/input-polldev.h
304!Edrivers/input/input-polldev.c
305 </sect1>
306 <sect1><title>Matrix keyboars/keypads</title>
307!Iinclude/linux/input/matrix_keypad.h
308 </sect1>
309 <sect1><title>Sparse keymap support</title>
310!Iinclude/linux/input/sparse-keymap.h
311!Edrivers/input/sparse-keymap.c
312 </sect1>
300 </chapter> 313 </chapter>
301 314
302 <chapter id="spi"> 315 <chapter id="spi">
diff --git a/Documentation/DocBook/dvb/dvbapi.xml b/Documentation/DocBook/dvb/dvbapi.xml
index 4fc5b23470a3..63c528fee624 100644
--- a/Documentation/DocBook/dvb/dvbapi.xml
+++ b/Documentation/DocBook/dvb/dvbapi.xml
@@ -30,6 +30,14 @@
30<revhistory> 30<revhistory>
31<!-- Put document revisions here, newest first. --> 31<!-- Put document revisions here, newest first. -->
32<revision> 32<revision>
33 <revnumber>2.0.2</revnumber>
34 <date>2009-10-25</date>
35 <authorinitials>mcc</authorinitials>
36 <revremark>
37 documents FE_SET_FRONTEND_TUNE_MODE and FE_DISHETWORK_SEND_LEGACY_CMD ioctls.
38 </revremark>
39</revision>
40<revision>
33<revnumber>2.0.1</revnumber> 41<revnumber>2.0.1</revnumber>
34<date>2009-09-16</date> 42<date>2009-09-16</date>
35<authorinitials>mcc</authorinitials> 43<authorinitials>mcc</authorinitials>
@@ -85,3 +93,8 @@ Added ISDB-T test originally written by Patrick Boettcher
85 &sub-examples; 93 &sub-examples;
86 </chapter> 94 </chapter>
87<!-- END OF CHAPTERS --> 95<!-- END OF CHAPTERS -->
96 <appendix id="frontend_h">
97 <title>DVB Frontend Header File</title>
98 &sub-frontend-h;
99 </appendix>
100
diff --git a/Documentation/DocBook/dvb/isdbt.xml b/Documentation/DocBook/dvb/dvbproperty.xml
index 92855222fccb..5f57c7ccd4ba 100644
--- a/Documentation/DocBook/dvb/isdbt.xml
+++ b/Documentation/DocBook/dvb/dvbproperty.xml
@@ -1,3 +1,6 @@
1<section id="FE_GET_PROPERTY">
2<title>FE_GET_PROPERTY/FE_SET_PROPERTY</title>
3
1<section id="isdbt"> 4<section id="isdbt">
2 <title>ISDB-T frontend</title> 5 <title>ISDB-T frontend</title>
3 <para>This section describes shortly what are the possible parameters in the Linux 6 <para>This section describes shortly what are the possible parameters in the Linux
@@ -312,3 +315,4 @@
312 </section> 315 </section>
313 </section> 316 </section>
314</section> 317</section>
318</section>
diff --git a/Documentation/DocBook/dvb/frontend.h.xml b/Documentation/DocBook/dvb/frontend.h.xml
new file mode 100644
index 000000000000..b99644f5340a
--- /dev/null
+++ b/Documentation/DocBook/dvb/frontend.h.xml
@@ -0,0 +1,415 @@
1<programlisting>
2/*
3 * frontend.h
4 *
5 * Copyright (C) 2000 Marcus Metzler &lt;marcus@convergence.de&gt;
6 * Ralph Metzler &lt;ralph@convergence.de&gt;
7 * Holger Waechtler &lt;holger@convergence.de&gt;
8 * Andre Draszik &lt;ad@convergence.de&gt;
9 * for convergence integrated media GmbH
10 *
11 * This program is free software; you can redistribute it and/or
12 * modify it under the terms of the GNU Lesser General Public License
13 * as published by the Free Software Foundation; either version 2.1
14 * of the License, or (at your option) any later version.
15 *
16 * This program is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU General Public License for more details.
20 *
21 * You should have received a copy of the GNU Lesser General Public License
22 * along with this program; if not, write to the Free Software
23 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
24 *
25 */
26
27#ifndef _DVBFRONTEND_H_
28#define _DVBFRONTEND_H_
29
30#include &lt;linux/types.h&gt;
31
32typedef enum fe_type {
33 FE_QPSK,
34 FE_QAM,
35 FE_OFDM,
36 FE_ATSC
37} fe_type_t;
38
39
40typedef enum fe_caps {
41 FE_IS_STUPID = 0,
42 FE_CAN_INVERSION_AUTO = 0x1,
43 FE_CAN_FEC_1_2 = 0x2,
44 FE_CAN_FEC_2_3 = 0x4,
45 FE_CAN_FEC_3_4 = 0x8,
46 FE_CAN_FEC_4_5 = 0x10,
47 FE_CAN_FEC_5_6 = 0x20,
48 FE_CAN_FEC_6_7 = 0x40,
49 FE_CAN_FEC_7_8 = 0x80,
50 FE_CAN_FEC_8_9 = 0x100,
51 FE_CAN_FEC_AUTO = 0x200,
52 FE_CAN_QPSK = 0x400,
53 FE_CAN_QAM_16 = 0x800,
54 FE_CAN_QAM_32 = 0x1000,
55 FE_CAN_QAM_64 = 0x2000,
56 FE_CAN_QAM_128 = 0x4000,
57 FE_CAN_QAM_256 = 0x8000,
58 FE_CAN_QAM_AUTO = 0x10000,
59 FE_CAN_TRANSMISSION_MODE_AUTO = 0x20000,
60 FE_CAN_BANDWIDTH_AUTO = 0x40000,
61 FE_CAN_GUARD_INTERVAL_AUTO = 0x80000,
62 FE_CAN_HIERARCHY_AUTO = 0x100000,
63 FE_CAN_8VSB = 0x200000,
64 FE_CAN_16VSB = 0x400000,
65 FE_HAS_EXTENDED_CAPS = 0x800000, /* We need more bitspace for newer APIs, indicate this. */
66 FE_CAN_2G_MODULATION = 0x10000000, /* frontend supports "2nd generation modulation" (DVB-S2) */
67 FE_NEEDS_BENDING = 0x20000000, /* not supported anymore, don't use (frontend requires frequency bending) */
68 FE_CAN_RECOVER = 0x40000000, /* frontend can recover from a cable unplug automatically */
69 FE_CAN_MUTE_TS = 0x80000000 /* frontend can stop spurious TS data output */
70} fe_caps_t;
71
72
73struct dvb_frontend_info {
74 char name[128];
75 fe_type_t type;
76 __u32 frequency_min;
77 __u32 frequency_max;
78 __u32 frequency_stepsize;
79 __u32 frequency_tolerance;
80 __u32 symbol_rate_min;
81 __u32 symbol_rate_max;
82 __u32 symbol_rate_tolerance; /* ppm */
83 __u32 notifier_delay; /* DEPRECATED */
84 fe_caps_t caps;
85};
86
87
88/**
89 * Check out the DiSEqC bus spec available on http://www.eutelsat.org/ for
90 * the meaning of this struct...
91 */
92struct dvb_diseqc_master_cmd {
93 __u8 msg [6]; /* { framing, address, command, data [3] } */
94 __u8 msg_len; /* valid values are 3...6 */
95};
96
97
98struct dvb_diseqc_slave_reply {
99 __u8 msg [4]; /* { framing, data [3] } */
100 __u8 msg_len; /* valid values are 0...4, 0 means no msg */
101 int timeout; /* return from ioctl after timeout ms with */
102}; /* errorcode when no message was received */
103
104
105typedef enum fe_sec_voltage {
106 SEC_VOLTAGE_13,
107 SEC_VOLTAGE_18,
108 SEC_VOLTAGE_OFF
109} fe_sec_voltage_t;
110
111
112typedef enum fe_sec_tone_mode {
113 SEC_TONE_ON,
114 SEC_TONE_OFF
115} fe_sec_tone_mode_t;
116
117
118typedef enum fe_sec_mini_cmd {
119 SEC_MINI_A,
120 SEC_MINI_B
121} fe_sec_mini_cmd_t;
122
123
124typedef enum fe_status {
125 FE_HAS_SIGNAL = 0x01, /* found something above the noise level */
126 FE_HAS_CARRIER = 0x02, /* found a DVB signal */
127 FE_HAS_VITERBI = 0x04, /* FEC is stable */
128 FE_HAS_SYNC = 0x08, /* found sync bytes */
129 FE_HAS_LOCK = 0x10, /* everything's working... */
130 FE_TIMEDOUT = 0x20, /* no lock within the last ~2 seconds */
131 FE_REINIT = 0x40 /* frontend was reinitialized, */
132} fe_status_t; /* application is recommended to reset */
133 /* DiSEqC, tone and parameters */
134
135typedef enum fe_spectral_inversion {
136 INVERSION_OFF,
137 INVERSION_ON,
138 INVERSION_AUTO
139} fe_spectral_inversion_t;
140
141
142typedef enum fe_code_rate {
143 FEC_NONE = 0,
144 FEC_1_2,
145 FEC_2_3,
146 FEC_3_4,
147 FEC_4_5,
148 FEC_5_6,
149 FEC_6_7,
150 FEC_7_8,
151 FEC_8_9,
152 FEC_AUTO,
153 FEC_3_5,
154 FEC_9_10,
155} fe_code_rate_t;
156
157
158typedef enum fe_modulation {
159 QPSK,
160 QAM_16,
161 QAM_32,
162 QAM_64,
163 QAM_128,
164 QAM_256,
165 QAM_AUTO,
166 VSB_8,
167 VSB_16,
168 PSK_8,
169 APSK_16,
170 APSK_32,
171 DQPSK,
172} fe_modulation_t;
173
174typedef enum fe_transmit_mode {
175 TRANSMISSION_MODE_2K,
176 TRANSMISSION_MODE_8K,
177 TRANSMISSION_MODE_AUTO,
178 TRANSMISSION_MODE_4K
179} fe_transmit_mode_t;
180
181typedef enum fe_bandwidth {
182 BANDWIDTH_8_MHZ,
183 BANDWIDTH_7_MHZ,
184 BANDWIDTH_6_MHZ,
185 BANDWIDTH_AUTO
186} fe_bandwidth_t;
187
188
189typedef enum fe_guard_interval {
190 GUARD_INTERVAL_1_32,
191 GUARD_INTERVAL_1_16,
192 GUARD_INTERVAL_1_8,
193 GUARD_INTERVAL_1_4,
194 GUARD_INTERVAL_AUTO
195} fe_guard_interval_t;
196
197
198typedef enum fe_hierarchy {
199 HIERARCHY_NONE,
200 HIERARCHY_1,
201 HIERARCHY_2,
202 HIERARCHY_4,
203 HIERARCHY_AUTO
204} fe_hierarchy_t;
205
206
207struct dvb_qpsk_parameters {
208 __u32 symbol_rate; /* symbol rate in Symbols per second */
209 fe_code_rate_t fec_inner; /* forward error correction (see above) */
210};
211
212struct dvb_qam_parameters {
213 __u32 symbol_rate; /* symbol rate in Symbols per second */
214 fe_code_rate_t fec_inner; /* forward error correction (see above) */
215 fe_modulation_t modulation; /* modulation type (see above) */
216};
217
218struct dvb_vsb_parameters {
219 fe_modulation_t modulation; /* modulation type (see above) */
220};
221
222struct dvb_ofdm_parameters {
223 fe_bandwidth_t bandwidth;
224 fe_code_rate_t code_rate_HP; /* high priority stream code rate */
225 fe_code_rate_t code_rate_LP; /* low priority stream code rate */
226 fe_modulation_t constellation; /* modulation type (see above) */
227 fe_transmit_mode_t transmission_mode;
228 fe_guard_interval_t guard_interval;
229 fe_hierarchy_t hierarchy_information;
230};
231
232
233struct dvb_frontend_parameters {
234 __u32 frequency; /* (absolute) frequency in Hz for QAM/OFDM/ATSC */
235 /* intermediate frequency in kHz for QPSK */
236 fe_spectral_inversion_t inversion;
237 union {
238 struct dvb_qpsk_parameters qpsk;
239 struct dvb_qam_parameters qam;
240 struct dvb_ofdm_parameters ofdm;
241 struct dvb_vsb_parameters vsb;
242 } u;
243};
244
245
246struct dvb_frontend_event {
247 fe_status_t status;
248 struct dvb_frontend_parameters parameters;
249};
250
251/* S2API Commands */
252#define DTV_UNDEFINED 0
253#define DTV_TUNE 1
254#define DTV_CLEAR 2
255#define DTV_FREQUENCY 3
256#define DTV_MODULATION 4
257#define DTV_BANDWIDTH_HZ 5
258#define DTV_INVERSION 6
259#define DTV_DISEQC_MASTER 7
260#define DTV_SYMBOL_RATE 8
261#define DTV_INNER_FEC 9
262#define DTV_VOLTAGE 10
263#define DTV_TONE 11
264#define DTV_PILOT 12
265#define DTV_ROLLOFF 13
266#define DTV_DISEQC_SLAVE_REPLY 14
267
268/* Basic enumeration set for querying unlimited capabilities */
269#define DTV_FE_CAPABILITY_COUNT 15
270#define DTV_FE_CAPABILITY 16
271#define DTV_DELIVERY_SYSTEM 17
272
273/* ISDB-T and ISDB-Tsb */
274#define DTV_ISDBT_PARTIAL_RECEPTION 18
275#define DTV_ISDBT_SOUND_BROADCASTING 19
276
277#define DTV_ISDBT_SB_SUBCHANNEL_ID 20
278#define DTV_ISDBT_SB_SEGMENT_IDX 21
279#define DTV_ISDBT_SB_SEGMENT_COUNT 22
280
281#define DTV_ISDBT_LAYERA_FEC 23
282#define DTV_ISDBT_LAYERA_MODULATION 24
283#define DTV_ISDBT_LAYERA_SEGMENT_COUNT 25
284#define DTV_ISDBT_LAYERA_TIME_INTERLEAVING 26
285
286#define DTV_ISDBT_LAYERB_FEC 27
287#define DTV_ISDBT_LAYERB_MODULATION 28
288#define DTV_ISDBT_LAYERB_SEGMENT_COUNT 29
289#define DTV_ISDBT_LAYERB_TIME_INTERLEAVING 30
290
291#define DTV_ISDBT_LAYERC_FEC 31
292#define DTV_ISDBT_LAYERC_MODULATION 32
293#define DTV_ISDBT_LAYERC_SEGMENT_COUNT 33
294#define DTV_ISDBT_LAYERC_TIME_INTERLEAVING 34
295
296#define DTV_API_VERSION 35
297
298#define DTV_CODE_RATE_HP 36
299#define DTV_CODE_RATE_LP 37
300#define DTV_GUARD_INTERVAL 38
301#define DTV_TRANSMISSION_MODE 39
302#define DTV_HIERARCHY 40
303
304#define DTV_ISDBT_LAYER_ENABLED 41
305
306#define DTV_ISDBS_TS_ID 42
307
308#define DTV_MAX_COMMAND DTV_ISDBS_TS_ID
309
310typedef enum fe_pilot {
311 PILOT_ON,
312 PILOT_OFF,
313 PILOT_AUTO,
314} fe_pilot_t;
315
316typedef enum fe_rolloff {
317 ROLLOFF_35, /* Implied value in DVB-S, default for DVB-S2 */
318 ROLLOFF_20,
319 ROLLOFF_25,
320 ROLLOFF_AUTO,
321} fe_rolloff_t;
322
323typedef enum fe_delivery_system {
324 SYS_UNDEFINED,
325 SYS_DVBC_ANNEX_AC,
326 SYS_DVBC_ANNEX_B,
327 SYS_DVBT,
328 SYS_DSS,
329 SYS_DVBS,
330 SYS_DVBS2,
331 SYS_DVBH,
332 SYS_ISDBT,
333 SYS_ISDBS,
334 SYS_ISDBC,
335 SYS_ATSC,
336 SYS_ATSCMH,
337 SYS_DMBTH,
338 SYS_CMMB,
339 SYS_DAB,
340} fe_delivery_system_t;
341
342struct dtv_cmds_h {
343 char *name; /* A display name for debugging purposes */
344
345 __u32 cmd; /* A unique ID */
346
347 /* Flags */
348 __u32 set:1; /* Either a set or get property */
349 __u32 buffer:1; /* Does this property use the buffer? */
350 __u32 reserved:30; /* Align */
351};
352
353struct dtv_property {
354 __u32 cmd;
355 __u32 reserved[3];
356 union {
357 __u32 data;
358 struct {
359 __u8 data[32];
360 __u32 len;
361 __u32 reserved1[3];
362 void *reserved2;
363 } buffer;
364 } u;
365 int result;
366} __attribute__ ((packed));
367
368/* num of properties cannot exceed DTV_IOCTL_MAX_MSGS per ioctl */
369#define DTV_IOCTL_MAX_MSGS 64
370
371struct dtv_properties {
372 __u32 num;
373 struct dtv_property *props;
374};
375
376#define <link linkend="FE_GET_PROPERTY">FE_SET_PROPERTY</link> _IOW('o', 82, struct dtv_properties)
377#define <link linkend="FE_GET_PROPERTY">FE_GET_PROPERTY</link> _IOR('o', 83, struct dtv_properties)
378
379
380/**
381 * When set, this flag will disable any zigzagging or other "normal" tuning
382 * behaviour. Additionally, there will be no automatic monitoring of the lock
383 * status, and hence no frontend events will be generated. If a frontend device
384 * is closed, this flag will be automatically turned off when the device is
385 * reopened read-write.
386 */
387#define FE_TUNE_MODE_ONESHOT 0x01
388
389
390#define <link linkend="FE_GET_INFO">FE_GET_INFO</link> _IOR('o', 61, struct dvb_frontend_info)
391
392#define <link linkend="FE_DISEQC_RESET_OVERLOAD">FE_DISEQC_RESET_OVERLOAD</link> _IO('o', 62)
393#define <link linkend="FE_DISEQC_SEND_MASTER_CMD">FE_DISEQC_SEND_MASTER_CMD</link> _IOW('o', 63, struct dvb_diseqc_master_cmd)
394#define <link linkend="FE_DISEQC_RECV_SLAVE_REPLY">FE_DISEQC_RECV_SLAVE_REPLY</link> _IOR('o', 64, struct dvb_diseqc_slave_reply)
395#define <link linkend="FE_DISEQC_SEND_BURST">FE_DISEQC_SEND_BURST</link> _IO('o', 65) /* fe_sec_mini_cmd_t */
396
397#define <link linkend="FE_SET_TONE">FE_SET_TONE</link> _IO('o', 66) /* fe_sec_tone_mode_t */
398#define <link linkend="FE_SET_VOLTAGE">FE_SET_VOLTAGE</link> _IO('o', 67) /* fe_sec_voltage_t */
399#define <link linkend="FE_ENABLE_HIGH_LNB_VOLTAGE">FE_ENABLE_HIGH_LNB_VOLTAGE</link> _IO('o', 68) /* int */
400
401#define <link linkend="FE_READ_STATUS">FE_READ_STATUS</link> _IOR('o', 69, fe_status_t)
402#define <link linkend="FE_READ_BER">FE_READ_BER</link> _IOR('o', 70, __u32)
403#define <link linkend="FE_READ_SIGNAL_STRENGTH">FE_READ_SIGNAL_STRENGTH</link> _IOR('o', 71, __u16)
404#define <link linkend="FE_READ_SNR">FE_READ_SNR</link> _IOR('o', 72, __u16)
405#define <link linkend="FE_READ_UNCORRECTED_BLOCKS">FE_READ_UNCORRECTED_BLOCKS</link> _IOR('o', 73, __u32)
406
407#define <link linkend="FE_SET_FRONTEND">FE_SET_FRONTEND</link> _IOW('o', 76, struct dvb_frontend_parameters)
408#define <link linkend="FE_GET_FRONTEND">FE_GET_FRONTEND</link> _IOR('o', 77, struct dvb_frontend_parameters)
409#define <link linkend="FE_SET_FRONTEND_TUNE_MODE">FE_SET_FRONTEND_TUNE_MODE</link> _IO('o', 81) /* unsigned int */
410#define <link linkend="FE_GET_EVENT">FE_GET_EVENT</link> _IOR('o', 78, struct dvb_frontend_event)
411
412#define <link linkend="FE_DISHNETWORK_SEND_LEGACY_CMD">FE_DISHNETWORK_SEND_LEGACY_CMD</link> _IO('o', 80) /* unsigned int */
413
414#endif /*_DVBFRONTEND_H_*/
415</programlisting>
diff --git a/Documentation/DocBook/dvb/frontend.xml b/Documentation/DocBook/dvb/frontend.xml
index 9d89a7b94fd5..300ba1f04177 100644
--- a/Documentation/DocBook/dvb/frontend.xml
+++ b/Documentation/DocBook/dvb/frontend.xml
@@ -73,7 +73,8 @@ a specific frontend type.</para>
73<section id="frontend_info"> 73<section id="frontend_info">
74<title>frontend information</title> 74<title>frontend information</title>
75 75
76<para>Information about the frontend ca be queried with FE_GET_INFO.</para> 76<para>Information about the frontend ca be queried with
77 <link linkend="FE_GET_INFO">FE_GET_INFO</link>.</para>
77 78
78<programlisting> 79<programlisting>
79 struct dvb_frontend_info { 80 struct dvb_frontend_info {
@@ -338,7 +339,7 @@ modulation mode which can be one of the following:
338<entry align="char"> 339<entry align="char">
339<para>This system call opens a named frontend device (/dev/dvb/adapter0/frontend0) 340<para>This system call opens a named frontend device (/dev/dvb/adapter0/frontend0)
340 for subsequent use. Usually the first thing to do after a successful open is to 341 for subsequent use. Usually the first thing to do after a successful open is to
341 find out the frontend type with FE_GET_INFO.</para> 342 find out the frontend type with <link linkend="FE_GET_INFO">FE_GET_INFO</link>.</para>
342<para>The device can be opened in read-only mode, which only allows monitoring of 343<para>The device can be opened in read-only mode, which only allows monitoring of
343 device status and statistics, or read/write mode, which allows any kind of use 344 device status and statistics, or read/write mode, which allows any kind of use
344 (e.g. performing tuning operations.) 345 (e.g. performing tuning operations.)
@@ -478,7 +479,7 @@ modulation mode which can be one of the following:
478 </row></tbody></tgroup></informaltable> 479 </row></tbody></tgroup></informaltable>
479</section> 480</section>
480 481
481<section id="frontend_read_status"> 482<section id="FE_READ_STATUS">
482<title>FE_READ_STATUS</title> 483<title>FE_READ_STATUS</title>
483<para>DESCRIPTION 484<para>DESCRIPTION
484</para> 485</para>
@@ -492,7 +493,7 @@ modulation mode which can be one of the following:
492</para> 493</para>
493<informaltable><tgroup cols="1"><tbody><row><entry 494<informaltable><tgroup cols="1"><tbody><row><entry
494 align="char"> 495 align="char">
495<para>int ioctl(int fd, int request = FE_READ_STATUS, 496<para>int ioctl(int fd, int request = <link linkend="FE_READ_STATUS">FE_READ_STATUS</link>,
496 fe_status_t &#x22C6;status);</para> 497 fe_status_t &#x22C6;status);</para>
497</entry> 498</entry>
498 </row></tbody></tgroup></informaltable> 499 </row></tbody></tgroup></informaltable>
@@ -511,7 +512,7 @@ modulation mode which can be one of the following:
511<para>int request</para> 512<para>int request</para>
512</entry><entry 513</entry><entry
513 align="char"> 514 align="char">
514<para>Equals FE_READ_STATUS for this command.</para> 515<para>Equals <link linkend="FE_READ_STATUS">FE_READ_STATUS</link> for this command.</para>
515</entry> 516</entry>
516 </row><row><entry 517 </row><row><entry
517 align="char"> 518 align="char">
@@ -542,7 +543,7 @@ modulation mode which can be one of the following:
542 </row></tbody></tgroup></informaltable> 543 </row></tbody></tgroup></informaltable>
543</section> 544</section>
544 545
545<section id="frontend_read_ber"> 546<section id="FE_READ_BER">
546<title>FE_READ_BER</title> 547<title>FE_READ_BER</title>
547<para>DESCRIPTION 548<para>DESCRIPTION
548</para> 549</para>
@@ -557,7 +558,7 @@ modulation mode which can be one of the following:
557</para> 558</para>
558<informaltable><tgroup cols="1"><tbody><row><entry 559<informaltable><tgroup cols="1"><tbody><row><entry
559 align="char"> 560 align="char">
560<para>int ioctl(int fd, int request = FE_READ_BER, 561<para>int ioctl(int fd, int request = <link linkend="FE_READ_BER">FE_READ_BER</link>,
561 uint32_t &#x22C6;ber);</para> 562 uint32_t &#x22C6;ber);</para>
562</entry> 563</entry>
563 </row></tbody></tgroup></informaltable> 564 </row></tbody></tgroup></informaltable>
@@ -575,7 +576,7 @@ modulation mode which can be one of the following:
575<para>int request</para> 576<para>int request</para>
576</entry><entry 577</entry><entry
577 align="char"> 578 align="char">
578<para>Equals FE_READ_BER for this command.</para> 579<para>Equals <link linkend="FE_READ_BER">FE_READ_BER</link> for this command.</para>
579</entry> 580</entry>
580 </row><row><entry 581 </row><row><entry
581 align="char"> 582 align="char">
@@ -619,7 +620,7 @@ modulation mode which can be one of the following:
619 </row></tbody></tgroup></informaltable> 620 </row></tbody></tgroup></informaltable>
620</section> 621</section>
621 622
622<section id="frontend_read_snr"> 623<section id="FE_READ_SNR">
623<title>FE_READ_SNR</title> 624<title>FE_READ_SNR</title>
624 625
625<para>DESCRIPTION 626<para>DESCRIPTION
@@ -634,7 +635,7 @@ modulation mode which can be one of the following:
634</para> 635</para>
635<informaltable><tgroup cols="1"><tbody><row><entry 636<informaltable><tgroup cols="1"><tbody><row><entry
636 align="char"> 637 align="char">
637<para>int ioctl(int fd, int request = FE_READ_SNR, int16_t 638<para>int ioctl(int fd, int request = <link linkend="FE_READ_SNR">FE_READ_SNR</link>, int16_t
638 &#x22C6;snr);</para> 639 &#x22C6;snr);</para>
639</entry> 640</entry>
640 </row></tbody></tgroup></informaltable> 641 </row></tbody></tgroup></informaltable>
@@ -652,7 +653,7 @@ modulation mode which can be one of the following:
652<para>int request</para> 653<para>int request</para>
653</entry><entry 654</entry><entry
654 align="char"> 655 align="char">
655<para>Equals FE_READ_SNR for this command.</para> 656<para>Equals <link linkend="FE_READ_SNR">FE_READ_SNR</link> for this command.</para>
656</entry> 657</entry>
657 </row><row><entry 658 </row><row><entry
658 align="char"> 659 align="char">
@@ -697,7 +698,7 @@ modulation mode which can be one of the following:
697 </row></tbody></tgroup></informaltable> 698 </row></tbody></tgroup></informaltable>
698</section> 699</section>
699 700
700<section id="frontend_read_signal_strength"> 701<section id="FE_READ_SIGNAL_STRENGTH">
701<title>FE_READ_SIGNAL_STRENGTH</title> 702<title>FE_READ_SIGNAL_STRENGTH</title>
702<para>DESCRIPTION 703<para>DESCRIPTION
703</para> 704</para>
@@ -712,7 +713,7 @@ modulation mode which can be one of the following:
712<informaltable><tgroup cols="1"><tbody><row><entry 713<informaltable><tgroup cols="1"><tbody><row><entry
713 align="char"> 714 align="char">
714<para>int ioctl( int fd, int request = 715<para>int ioctl( int fd, int request =
715 FE_READ_SIGNAL_STRENGTH, int16_t &#x22C6;strength);</para> 716 <link linkend="FE_READ_SIGNAL_STRENGTH">FE_READ_SIGNAL_STRENGTH</link>, int16_t &#x22C6;strength);</para>
716</entry> 717</entry>
717 </row></tbody></tgroup></informaltable> 718 </row></tbody></tgroup></informaltable>
718 719
@@ -730,7 +731,7 @@ modulation mode which can be one of the following:
730<para>int request</para> 731<para>int request</para>
731</entry><entry 732</entry><entry
732 align="char"> 733 align="char">
733<para>Equals FE_READ_SIGNAL_STRENGTH for this 734<para>Equals <link linkend="FE_READ_SIGNAL_STRENGTH">FE_READ_SIGNAL_STRENGTH</link> for this
734 command.</para> 735 command.</para>
735</entry> 736</entry>
736 </row><row><entry 737 </row><row><entry
@@ -775,7 +776,7 @@ modulation mode which can be one of the following:
775 </row></tbody></tgroup></informaltable> 776 </row></tbody></tgroup></informaltable>
776</section> 777</section>
777 778
778<section id="frontend_read_ub"> 779<section id="FE_READ_UNCORRECTED_BLOCKS">
779<title>FE_READ_UNCORRECTED_BLOCKS</title> 780<title>FE_READ_UNCORRECTED_BLOCKS</title>
780<para>DESCRIPTION 781<para>DESCRIPTION
781</para> 782</para>
@@ -797,7 +798,7 @@ modulation mode which can be one of the following:
797<informaltable><tgroup cols="1"><tbody><row><entry 798<informaltable><tgroup cols="1"><tbody><row><entry
798 align="char"> 799 align="char">
799<para>int ioctl( int fd, int request = 800<para>int ioctl( int fd, int request =
800 FE_READ_UNCORRECTED_BLOCKS, uint32_t &#x22C6;ublocks);</para> 801 <link linkend="FE_READ_UNCORRECTED_BLOCKS">FE_READ_UNCORRECTED_BLOCKS</link>, uint32_t &#x22C6;ublocks);</para>
801</entry> 802</entry>
802 </row></tbody></tgroup></informaltable> 803 </row></tbody></tgroup></informaltable>
803<para>PARAMETERS 804<para>PARAMETERS
@@ -814,7 +815,7 @@ modulation mode which can be one of the following:
814<para>int request</para> 815<para>int request</para>
815</entry><entry 816</entry><entry
816 align="char"> 817 align="char">
817<para>Equals FE_READ_UNCORRECTED_BLOCKS for this 818<para>Equals <link linkend="FE_READ_UNCORRECTED_BLOCKS">FE_READ_UNCORRECTED_BLOCKS</link> for this
818 command.</para> 819 command.</para>
819</entry> 820</entry>
820 </row><row><entry 821 </row><row><entry
@@ -852,7 +853,7 @@ modulation mode which can be one of the following:
852 </row></tbody></tgroup></informaltable> 853 </row></tbody></tgroup></informaltable>
853</section> 854</section>
854 855
855<section id="frontend_set_fe"> 856<section id="FE_SET_FRONTEND">
856<title>FE_SET_FRONTEND</title> 857<title>FE_SET_FRONTEND</title>
857<para>DESCRIPTION 858<para>DESCRIPTION
858</para> 859</para>
@@ -861,8 +862,8 @@ modulation mode which can be one of the following:
861<para>This ioctl call starts a tuning operation using specified parameters. The result 862<para>This ioctl call starts a tuning operation using specified parameters. The result
862 of this call will be successful if the parameters were valid and the tuning could 863 of this call will be successful if the parameters were valid and the tuning could
863 be initiated. The result of the tuning operation in itself, however, will arrive 864 be initiated. The result of the tuning operation in itself, however, will arrive
864 asynchronously as an event (see documentation for FE_GET_EVENT and 865 asynchronously as an event (see documentation for <link linkend="FE_GET_EVENT">FE_GET_EVENT</link> and
865 FrontendEvent.) If a new FE_SET_FRONTEND operation is initiated before 866 FrontendEvent.) If a new <link linkend="FE_SET_FRONTEND">FE_SET_FRONTEND</link> operation is initiated before
866 the previous one was completed, the previous operation will be aborted in favor 867 the previous one was completed, the previous operation will be aborted in favor
867 of the new one. This command requires read/write access to the device.</para> 868 of the new one. This command requires read/write access to the device.</para>
868</entry> 869</entry>
@@ -872,7 +873,7 @@ modulation mode which can be one of the following:
872</para> 873</para>
873<informaltable><tgroup cols="1"><tbody><row><entry 874<informaltable><tgroup cols="1"><tbody><row><entry
874 align="char"> 875 align="char">
875<para>int ioctl(int fd, int request = FE_SET_FRONTEND, 876<para>int ioctl(int fd, int request = <link linkend="FE_SET_FRONTEND">FE_SET_FRONTEND</link>,
876 struct dvb_frontend_parameters &#x22C6;p);</para> 877 struct dvb_frontend_parameters &#x22C6;p);</para>
877</entry> 878</entry>
878 </row></tbody></tgroup></informaltable> 879 </row></tbody></tgroup></informaltable>
@@ -890,7 +891,7 @@ modulation mode which can be one of the following:
890<para>int request</para> 891<para>int request</para>
891</entry><entry 892</entry><entry
892 align="char"> 893 align="char">
893<para>Equals FE_SET_FRONTEND for this command.</para> 894<para>Equals <link linkend="FE_SET_FRONTEND">FE_SET_FRONTEND</link> for this command.</para>
894</entry> 895</entry>
895 </row><row><entry 896 </row><row><entry
896 align="char"> 897 align="char">
@@ -928,7 +929,7 @@ modulation mode which can be one of the following:
928</row></tbody></tgroup></informaltable> 929</row></tbody></tgroup></informaltable>
929</section> 930</section>
930 931
931<section id="frontend_get_fe"> 932<section id="FE_GET_FRONTEND">
932<title>FE_GET_FRONTEND</title> 933<title>FE_GET_FRONTEND</title>
933<para>DESCRIPTION 934<para>DESCRIPTION
934</para> 935</para>
@@ -943,7 +944,7 @@ modulation mode which can be one of the following:
943</para> 944</para>
944<informaltable><tgroup cols="1"><tbody><row><entry 945<informaltable><tgroup cols="1"><tbody><row><entry
945 align="char"> 946 align="char">
946<para>int ioctl(int fd, int request = FE_GET_FRONTEND, 947<para>int ioctl(int fd, int request = <link linkend="FE_GET_FRONTEND">FE_GET_FRONTEND</link>,
947 struct dvb_frontend_parameters &#x22C6;p);</para> 948 struct dvb_frontend_parameters &#x22C6;p);</para>
948</entry> 949</entry>
949 </row></tbody></tgroup></informaltable> 950 </row></tbody></tgroup></informaltable>
@@ -962,7 +963,7 @@ modulation mode which can be one of the following:
962<para>int request</para> 963<para>int request</para>
963</entry><entry 964</entry><entry
964 align="char"> 965 align="char">
965<para>Equals FE_SET_FRONTEND for this command.</para> 966<para>Equals <link linkend="FE_SET_FRONTEND">FE_SET_FRONTEND</link> for this command.</para>
966</entry> 967</entry>
967 </row><row><entry 968 </row><row><entry
968 align="char"> 969 align="char">
@@ -1003,7 +1004,7 @@ modulation mode which can be one of the following:
1003 1004
1004</section> 1005</section>
1005 1006
1006<section id="frontend_get_event"> 1007<section id="FE_GET_EVENT">
1007<title>FE_GET_EVENT</title> 1008<title>FE_GET_EVENT</title>
1008<para>DESCRIPTION 1009<para>DESCRIPTION
1009</para> 1010</para>
@@ -1024,7 +1025,8 @@ modulation mode which can be one of the following:
1024 rather small (room for 8 events), the queue must be serviced regularly to avoid 1025 rather small (room for 8 events), the queue must be serviced regularly to avoid
1025 overflow. If an overflow happens, the oldest event is discarded from the queue, 1026 overflow. If an overflow happens, the oldest event is discarded from the queue,
1026 and an error (EOVERFLOW) occurs the next time the queue is read. After 1027 and an error (EOVERFLOW) occurs the next time the queue is read. After
1027 reporting the error condition in this fashion, subsequent FE_GET_EVENT 1028 reporting the error condition in this fashion, subsequent
1029 <link linkend="FE_GET_EVENT">FE_GET_EVENT</link>
1028 calls will return events from the queue as usual.</para> 1030 calls will return events from the queue as usual.</para>
1029</entry> 1031</entry>
1030 </row><row><entry 1032 </row><row><entry
@@ -1057,7 +1059,7 @@ modulation mode which can be one of the following:
1057<para>int request</para> 1059<para>int request</para>
1058</entry><entry 1060</entry><entry
1059 align="char"> 1061 align="char">
1060<para>Equals FE_GET_EVENT for this command.</para> 1062<para>Equals <link linkend="FE_GET_EVENT">FE_GET_EVENT</link> for this command.</para>
1061</entry> 1063</entry>
1062 </row><row><entry 1064 </row><row><entry
1063 align="char"> 1065 align="char">
@@ -1115,7 +1117,7 @@ modulation mode which can be one of the following:
1115</row></tbody></tgroup></informaltable> 1117</row></tbody></tgroup></informaltable>
1116</section> 1118</section>
1117 1119
1118<section id="frontend_get_info"> 1120<section id="FE_GET_INFO">
1119<title>FE_GET_INFO</title> 1121<title>FE_GET_INFO</title>
1120<para>DESCRIPTION 1122<para>DESCRIPTION
1121</para> 1123</para>
@@ -1130,7 +1132,7 @@ modulation mode which can be one of the following:
1130 1132
1131<informaltable><tgroup cols="1"><tbody><row><entry 1133<informaltable><tgroup cols="1"><tbody><row><entry
1132 align="char"> 1134 align="char">
1133<para> int ioctl(int fd, int request = FE_GET_INFO, struct 1135<para> int ioctl(int fd, int request = <link linkend="FE_GET_INFO">FE_GET_INFO</link>, struct
1134 dvb_frontend_info &#x22C6;info);</para> 1136 dvb_frontend_info &#x22C6;info);</para>
1135</entry> 1137</entry>
1136 </row></tbody></tgroup></informaltable> 1138 </row></tbody></tgroup></informaltable>
@@ -1149,7 +1151,7 @@ modulation mode which can be one of the following:
1149<para>int request</para> 1151<para>int request</para>
1150</entry><entry 1152</entry><entry
1151 align="char"> 1153 align="char">
1152<para>Equals FE_GET_INFO for this command.</para> 1154<para>Equals <link linkend="FE_GET_INFO">FE_GET_INFO</link> for this command.</para>
1153</entry> 1155</entry>
1154 </row><row><entry 1156 </row><row><entry
1155 align="char"> 1157 align="char">
@@ -1181,7 +1183,7 @@ modulation mode which can be one of the following:
1181</row></tbody></tgroup></informaltable> 1183</row></tbody></tgroup></informaltable>
1182</section> 1184</section>
1183 1185
1184<section id="frontend_diseqc_reset_overload"> 1186<section id="FE_DISEQC_RESET_OVERLOAD">
1185<title>FE_DISEQC_RESET_OVERLOAD</title> 1187<title>FE_DISEQC_RESET_OVERLOAD</title>
1186<para>DESCRIPTION 1188<para>DESCRIPTION
1187</para> 1189</para>
@@ -1199,7 +1201,7 @@ modulation mode which can be one of the following:
1199<informaltable><tgroup cols="1"><tbody><row><entry 1201<informaltable><tgroup cols="1"><tbody><row><entry
1200 align="char"> 1202 align="char">
1201<para>int ioctl(int fd, int request = 1203<para>int ioctl(int fd, int request =
1202 FE_DISEQC_RESET_OVERLOAD);</para> 1204 <link linkend="FE_DISEQC_RESET_OVERLOAD">FE_DISEQC_RESET_OVERLOAD</link>);</para>
1203</entry> 1205</entry>
1204 </row></tbody></tgroup></informaltable> 1206 </row></tbody></tgroup></informaltable>
1205<para>PARAMETERS 1207<para>PARAMETERS
@@ -1216,7 +1218,7 @@ modulation mode which can be one of the following:
1216<para>int request</para> 1218<para>int request</para>
1217</entry><entry 1219</entry><entry
1218 align="char"> 1220 align="char">
1219<para>Equals FE_DISEQC_RESET_OVERLOAD for this 1221<para>Equals <link linkend="FE_DISEQC_RESET_OVERLOAD">FE_DISEQC_RESET_OVERLOAD</link> for this
1220 command.</para> 1222 command.</para>
1221</entry> 1223</entry>
1222 </row></tbody></tgroup></informaltable> 1224 </row></tbody></tgroup></informaltable>
@@ -1247,7 +1249,7 @@ modulation mode which can be one of the following:
1247</row></tbody></tgroup></informaltable> 1249</row></tbody></tgroup></informaltable>
1248</section> 1250</section>
1249 1251
1250<section id="frontend_diseqc_send_master_cmd"> 1252<section id="FE_DISEQC_SEND_MASTER_CMD">
1251<title>FE_DISEQC_SEND_MASTER_CMD</title> 1253<title>FE_DISEQC_SEND_MASTER_CMD</title>
1252<para>DESCRIPTION 1254<para>DESCRIPTION
1253</para> 1255</para>
@@ -1261,7 +1263,7 @@ modulation mode which can be one of the following:
1261<informaltable><tgroup cols="1"><tbody><row><entry 1263<informaltable><tgroup cols="1"><tbody><row><entry
1262 align="char"> 1264 align="char">
1263<para>int ioctl(int fd, int request = 1265<para>int ioctl(int fd, int request =
1264 FE_DISEQC_SEND_MASTER_CMD, struct 1266 <link linkend="FE_DISEQC_SEND_MASTER_CMD">FE_DISEQC_SEND_MASTER_CMD</link>, struct
1265 dvb_diseqc_master_cmd &#x22C6;cmd);</para> 1267 dvb_diseqc_master_cmd &#x22C6;cmd);</para>
1266</entry> 1268</entry>
1267 </row></tbody></tgroup></informaltable> 1269 </row></tbody></tgroup></informaltable>
@@ -1280,7 +1282,7 @@ modulation mode which can be one of the following:
1280<para>int request</para> 1282<para>int request</para>
1281</entry><entry 1283</entry><entry
1282 align="char"> 1284 align="char">
1283<para>Equals FE_DISEQC_SEND_MASTER_CMD for this 1285<para>Equals <link linkend="FE_DISEQC_SEND_MASTER_CMD">FE_DISEQC_SEND_MASTER_CMD</link> for this
1284 command.</para> 1286 command.</para>
1285</entry> 1287</entry>
1286 </row><row><entry 1288 </row><row><entry
@@ -1335,7 +1337,7 @@ modulation mode which can be one of the following:
1335</row></tbody></tgroup></informaltable> 1337</row></tbody></tgroup></informaltable>
1336</section> 1338</section>
1337 1339
1338<section id="frontend_diseqc_recv_slave_reply"> 1340<section id="FE_DISEQC_RECV_SLAVE_REPLY">
1339<title>FE_DISEQC_RECV_SLAVE_REPLY</title> 1341<title>FE_DISEQC_RECV_SLAVE_REPLY</title>
1340<para>DESCRIPTION 1342<para>DESCRIPTION
1341</para> 1343</para>
@@ -1350,7 +1352,7 @@ modulation mode which can be one of the following:
1350<informaltable><tgroup cols="1"><tbody><row><entry 1352<informaltable><tgroup cols="1"><tbody><row><entry
1351 align="char"> 1353 align="char">
1352<para>int ioctl(int fd, int request = 1354<para>int ioctl(int fd, int request =
1353 FE_DISEQC_RECV_SLAVE_REPLY, struct 1355 <link linkend="FE_DISEQC_RECV_SLAVE_REPLY">FE_DISEQC_RECV_SLAVE_REPLY</link>, struct
1354 dvb_diseqc_slave_reply &#x22C6;reply);</para> 1356 dvb_diseqc_slave_reply &#x22C6;reply);</para>
1355</entry> 1357</entry>
1356 </row></tbody></tgroup></informaltable> 1358 </row></tbody></tgroup></informaltable>
@@ -1369,7 +1371,7 @@ modulation mode which can be one of the following:
1369<para>int request</para> 1371<para>int request</para>
1370</entry><entry 1372</entry><entry
1371 align="char"> 1373 align="char">
1372<para>Equals FE_DISEQC_RECV_SLAVE_REPLY for this 1374<para>Equals <link linkend="FE_DISEQC_RECV_SLAVE_REPLY">FE_DISEQC_RECV_SLAVE_REPLY</link> for this
1373 command.</para> 1375 command.</para>
1374</entry> 1376</entry>
1375 </row><row><entry 1377 </row><row><entry
@@ -1423,7 +1425,7 @@ modulation mode which can be one of the following:
1423 </row></tbody></tgroup></informaltable> 1425 </row></tbody></tgroup></informaltable>
1424</section> 1426</section>
1425 1427
1426<section id="frontend_diseqc_send_burst"> 1428<section id="FE_DISEQC_SEND_BURST">
1427<title>FE_DISEQC_SEND_BURST</title> 1429<title>FE_DISEQC_SEND_BURST</title>
1428<para>DESCRIPTION 1430<para>DESCRIPTION
1429</para> 1431</para>
@@ -1438,7 +1440,7 @@ modulation mode which can be one of the following:
1438<informaltable><tgroup cols="1"><tbody><row><entry 1440<informaltable><tgroup cols="1"><tbody><row><entry
1439 align="char"> 1441 align="char">
1440<para>int ioctl(int fd, int request = 1442<para>int ioctl(int fd, int request =
1441 FE_DISEQC_SEND_BURST, fe_sec_mini_cmd_t burst);</para> 1443 <link linkend="FE_DISEQC_SEND_BURST">FE_DISEQC_SEND_BURST</link>, fe_sec_mini_cmd_t burst);</para>
1442</entry> 1444</entry>
1443 </row></tbody></tgroup></informaltable> 1445 </row></tbody></tgroup></informaltable>
1444 1446
@@ -1456,7 +1458,7 @@ modulation mode which can be one of the following:
1456<para>int request</para> 1458<para>int request</para>
1457</entry><entry 1459</entry><entry
1458 align="char"> 1460 align="char">
1459<para>Equals FE_DISEQC_SEND_BURST for this command.</para> 1461<para>Equals <link linkend="FE_DISEQC_SEND_BURST">FE_DISEQC_SEND_BURST</link> for this command.</para>
1460</entry> 1462</entry>
1461 </row><row><entry 1463 </row><row><entry
1462 align="char"> 1464 align="char">
@@ -1509,7 +1511,7 @@ modulation mode which can be one of the following:
1509</row></tbody></tgroup></informaltable> 1511</row></tbody></tgroup></informaltable>
1510</section> 1512</section>
1511 1513
1512<section id="frontend_set_tone"> 1514<section id="FE_SET_TONE">
1513<title>FE_SET_TONE</title> 1515<title>FE_SET_TONE</title>
1514<para>DESCRIPTION 1516<para>DESCRIPTION
1515</para> 1517</para>
@@ -1523,7 +1525,7 @@ modulation mode which can be one of the following:
1523</para> 1525</para>
1524<informaltable><tgroup cols="1"><tbody><row><entry 1526<informaltable><tgroup cols="1"><tbody><row><entry
1525 align="char"> 1527 align="char">
1526<para>int ioctl(int fd, int request = FE_SET_TONE, 1528<para>int ioctl(int fd, int request = <link linkend="FE_SET_TONE">FE_SET_TONE</link>,
1527 fe_sec_tone_mode_t tone);</para> 1529 fe_sec_tone_mode_t tone);</para>
1528</entry> 1530</entry>
1529 </row></tbody></tgroup></informaltable> 1531 </row></tbody></tgroup></informaltable>
@@ -1541,7 +1543,7 @@ modulation mode which can be one of the following:
1541<para>int request</para> 1543<para>int request</para>
1542</entry><entry 1544</entry><entry
1543 align="char"> 1545 align="char">
1544<para>Equals FE_SET_TONE for this command.</para> 1546<para>Equals <link linkend="FE_SET_TONE">FE_SET_TONE</link> for this command.</para>
1545</entry> 1547</entry>
1546 </row><row><entry 1548 </row><row><entry
1547 align="char"> 1549 align="char">
@@ -1592,7 +1594,7 @@ modulation mode which can be one of the following:
1592</row></tbody></tgroup></informaltable> 1594</row></tbody></tgroup></informaltable>
1593</section> 1595</section>
1594 1596
1595<section id="fe_set_voltage"> 1597<section id="FE_SET_VOLTAGE">
1596<title>FE_SET_VOLTAGE</title> 1598<title>FE_SET_VOLTAGE</title>
1597<para>DESCRIPTION 1599<para>DESCRIPTION
1598</para> 1600</para>
@@ -1606,7 +1608,7 @@ modulation mode which can be one of the following:
1606</para> 1608</para>
1607<informaltable><tgroup cols="1"><tbody><row><entry 1609<informaltable><tgroup cols="1"><tbody><row><entry
1608 align="char"> 1610 align="char">
1609<para>int ioctl(int fd, int request = FE_SET_VOLTAGE, 1611<para>int ioctl(int fd, int request = <link linkend="FE_SET_VOLTAGE">FE_SET_VOLTAGE</link>,
1610 fe_sec_voltage_t voltage);</para> 1612 fe_sec_voltage_t voltage);</para>
1611</entry> 1613</entry>
1612 </row></tbody></tgroup></informaltable> 1614 </row></tbody></tgroup></informaltable>
@@ -1625,7 +1627,7 @@ modulation mode which can be one of the following:
1625<para>int request</para> 1627<para>int request</para>
1626</entry><entry 1628</entry><entry
1627 align="char"> 1629 align="char">
1628<para>Equals FE_SET_VOLTAGE for this command.</para> 1630<para>Equals <link linkend="FE_SET_VOLTAGE">FE_SET_VOLTAGE</link> for this command.</para>
1629</entry> 1631</entry>
1630 </row><row><entry 1632 </row><row><entry
1631 align="char"> 1633 align="char">
@@ -1677,7 +1679,7 @@ modulation mode which can be one of the following:
1677 </row></tbody></tgroup></informaltable> 1679 </row></tbody></tgroup></informaltable>
1678</section> 1680</section>
1679 1681
1680<section id="frontend_enable_high_lnb_volt"> 1682<section id="FE_ENABLE_HIGH_LNB_VOLTAGE">
1681<title>FE_ENABLE_HIGH_LNB_VOLTAGE</title> 1683<title>FE_ENABLE_HIGH_LNB_VOLTAGE</title>
1682<para>DESCRIPTION 1684<para>DESCRIPTION
1683</para> 1685</para>
@@ -1694,7 +1696,7 @@ modulation mode which can be one of the following:
1694<informaltable><tgroup cols="1"><tbody><row><entry 1696<informaltable><tgroup cols="1"><tbody><row><entry
1695 align="char"> 1697 align="char">
1696<para>int ioctl(int fd, int request = 1698<para>int ioctl(int fd, int request =
1697 FE_ENABLE_HIGH_LNB_VOLTAGE, int high);</para> 1699 <link linkend="FE_ENABLE_HIGH_LNB_VOLTAGE">FE_ENABLE_HIGH_LNB_VOLTAGE</link>, int high);</para>
1698</entry> 1700</entry>
1699 </row></tbody></tgroup></informaltable> 1701 </row></tbody></tgroup></informaltable>
1700 1702
@@ -1712,7 +1714,7 @@ modulation mode which can be one of the following:
1712<para>int request</para> 1714<para>int request</para>
1713</entry><entry 1715</entry><entry
1714 align="char"> 1716 align="char">
1715<para>Equals FE_SET_VOLTAGE for this command.</para> 1717<para>Equals <link linkend="FE_SET_VOLTAGE">FE_SET_VOLTAGE</link> for this command.</para>
1716</entry> 1718</entry>
1717 </row><row><entry 1719 </row><row><entry
1718 align="char"> 1720 align="char">
@@ -1762,5 +1764,82 @@ modulation mode which can be one of the following:
1762</entry> 1764</entry>
1763 </row></tbody></tgroup></informaltable> 1765 </row></tbody></tgroup></informaltable>
1764</section> 1766</section>
1767
1768<section id="FE_SET_FRONTEND_TUNE_MODE">
1769<title>FE_SET_FRONTEND_TUNE_MODE</title>
1770<para>DESCRIPTION</para>
1771<informaltable><tgroup cols="1"><tbody><row>
1772<entry align="char">
1773<para>Allow setting tuner mode flags to the frontend.</para>
1774</entry>
1775</row></tbody></tgroup></informaltable>
1776
1777<para>SYNOPSIS</para>
1778<informaltable><tgroup cols="1"><tbody><row>
1779<entry align="char">
1780<para>int ioctl(int fd, int request =
1781<link linkend="FE_SET_FRONTEND_TUNE_MODE">FE_SET_FRONTEND_TUNE_MODE</link>, unsigned int flags);</para>
1782</entry>
1783</row></tbody></tgroup></informaltable>
1784
1785<para>PARAMETERS</para>
1786<informaltable><tgroup cols="2"><tbody><row>
1787<entry align="char">
1788 <para>unsigned int flags</para>
1789</entry>
1790<entry align="char">
1791<para>
1792FE_TUNE_MODE_ONESHOT When set, this flag will disable any zigzagging or other "normal" tuning behaviour. Additionally, there will be no automatic monitoring of the lock status, and hence no frontend events will be generated. If a frontend device is closed, this flag will be automatically turned off when the device is reopened read-write.
1793</para>
1794</entry>
1795 </row></tbody></tgroup></informaltable>
1796
1797<para>ERRORS</para>
1798<informaltable><tgroup cols="2"><tbody><row>
1799<entry align="char"><para>EINVAL</para></entry>
1800<entry align="char"><para>Invalid argument.</para></entry>
1801 </row></tbody></tgroup></informaltable>
1765</section> 1802</section>
1766&sub-isdbt; 1803
1804<section id="FE_DISHNETWORK_SEND_LEGACY_CMD">
1805 <title>FE_DISHNETWORK_SEND_LEGACY_CMD</title>
1806<para>DESCRIPTION</para>
1807<informaltable><tgroup cols="1"><tbody><row>
1808<entry align="char">
1809<para>WARNING: This is a very obscure legacy command, used only at stv0299 driver. Should not be used on newer drivers.</para>
1810<para>It provides a non-standard method for selecting Diseqc voltage on the frontend, for Dish Network legacy switches.</para>
1811<para>As support for this ioctl were added in 2004, this means that such dishes were already legacy in 2004.</para>
1812</entry>
1813</row></tbody></tgroup></informaltable>
1814
1815<para>SYNOPSIS</para>
1816<informaltable><tgroup cols="1"><tbody><row>
1817<entry align="char">
1818<para>int ioctl(int fd, int request =
1819 <link linkend="FE_DISHNETWORK_SEND_LEGACY_CMD">FE_DISHNETWORK_SEND_LEGACY_CMD</link>, unsigned long cmd);</para>
1820</entry>
1821</row></tbody></tgroup></informaltable>
1822
1823<para>PARAMETERS</para>
1824<informaltable><tgroup cols="2"><tbody><row>
1825<entry align="char">
1826 <para>unsigned long cmd</para>
1827</entry>
1828<entry align="char">
1829<para>
1830sends the specified raw cmd to the dish via DISEqC.
1831</para>
1832</entry>
1833 </row></tbody></tgroup></informaltable>
1834
1835<para>ERRORS</para>
1836<informaltable><tgroup cols="1"><tbody><row>
1837<entry align="char">
1838 <para>There are no errors in use for this call</para>
1839</entry>
1840</row></tbody></tgroup></informaltable>
1841</section>
1842
1843</section>
1844
1845&sub-dvbproperty;
diff --git a/Documentation/DocBook/genericirq.tmpl b/Documentation/DocBook/genericirq.tmpl
index c671a0168096..1448b33fd222 100644
--- a/Documentation/DocBook/genericirq.tmpl
+++ b/Documentation/DocBook/genericirq.tmpl
@@ -417,8 +417,8 @@ desc->chip->end();
417 </para> 417 </para>
418 <para> 418 <para>
419 To make use of the split implementation, replace the call to 419 To make use of the split implementation, replace the call to
420 __do_IRQ by a call to desc->chip->handle_irq() and associate 420 __do_IRQ by a call to desc->handle_irq() and associate
421 the appropriate handler function to desc->chip->handle_irq(). 421 the appropriate handler function to desc->handle_irq().
422 In most cases the generic handler implementations should 422 In most cases the generic handler implementations should
423 be sufficient. 423 be sufficient.
424 </para> 424 </para>
diff --git a/Documentation/DocBook/kernel-hacking.tmpl b/Documentation/DocBook/kernel-hacking.tmpl
index 992e67e6be7f..7b3f49363413 100644
--- a/Documentation/DocBook/kernel-hacking.tmpl
+++ b/Documentation/DocBook/kernel-hacking.tmpl
@@ -352,7 +352,7 @@ asmlinkage long sys_mycall(int arg)
352 </para> 352 </para>
353 353
354 <programlisting> 354 <programlisting>
355if (signal_pending()) 355if (signal_pending(current))
356 return -ERESTARTSYS; 356 return -ERESTARTSYS;
357 </programlisting> 357 </programlisting>
358 358
diff --git a/Documentation/DocBook/media-entities.tmpl b/Documentation/DocBook/media-entities.tmpl
index 0eb43c1970bb..bb5ab741220e 100644
--- a/Documentation/DocBook/media-entities.tmpl
+++ b/Documentation/DocBook/media-entities.tmpl
@@ -280,7 +280,7 @@
280<!ENTITY sub-v4l2 SYSTEM "v4l/v4l2.xml"> 280<!ENTITY sub-v4l2 SYSTEM "v4l/v4l2.xml">
281<!ENTITY sub-intro SYSTEM "dvb/intro.xml"> 281<!ENTITY sub-intro SYSTEM "dvb/intro.xml">
282<!ENTITY sub-frontend SYSTEM "dvb/frontend.xml"> 282<!ENTITY sub-frontend SYSTEM "dvb/frontend.xml">
283<!ENTITY sub-isdbt SYSTEM "dvb/isdbt.xml"> 283<!ENTITY sub-dvbproperty SYSTEM "dvb/dvbproperty.xml">
284<!ENTITY sub-demux SYSTEM "dvb/demux.xml"> 284<!ENTITY sub-demux SYSTEM "dvb/demux.xml">
285<!ENTITY sub-video SYSTEM "dvb/video.xml"> 285<!ENTITY sub-video SYSTEM "dvb/video.xml">
286<!ENTITY sub-audio SYSTEM "dvb/audio.xml"> 286<!ENTITY sub-audio SYSTEM "dvb/audio.xml">
@@ -288,6 +288,7 @@
288<!ENTITY sub-net SYSTEM "dvb/net.xml"> 288<!ENTITY sub-net SYSTEM "dvb/net.xml">
289<!ENTITY sub-kdapi SYSTEM "dvb/kdapi.xml"> 289<!ENTITY sub-kdapi SYSTEM "dvb/kdapi.xml">
290<!ENTITY sub-examples SYSTEM "dvb/examples.xml"> 290<!ENTITY sub-examples SYSTEM "dvb/examples.xml">
291<!ENTITY sub-frontend-h SYSTEM "dvb/frontend.h.xml">
291<!ENTITY sub-dvbapi SYSTEM "dvb/dvbapi.xml"> 292<!ENTITY sub-dvbapi SYSTEM "dvb/dvbapi.xml">
292<!ENTITY sub-media SYSTEM "media.xml"> 293<!ENTITY sub-media SYSTEM "media.xml">
293<!ENTITY sub-media-entities SYSTEM "media-entities.tmpl"> 294<!ENTITY sub-media-entities SYSTEM "media-entities.tmpl">
diff --git a/Documentation/DocBook/mtdnand.tmpl b/Documentation/DocBook/mtdnand.tmpl
index df0d089d0fb9..f508a8a27fea 100644
--- a/Documentation/DocBook/mtdnand.tmpl
+++ b/Documentation/DocBook/mtdnand.tmpl
@@ -362,7 +362,7 @@ module_exit(board_cleanup);
362 <sect1 id="Multiple_chip_control"> 362 <sect1 id="Multiple_chip_control">
363 <title>Multiple chip control</title> 363 <title>Multiple chip control</title>
364 <para> 364 <para>
365 The nand driver can control chip arrays. Therefor the 365 The nand driver can control chip arrays. Therefore the
366 board driver must provide an own select_chip function. This 366 board driver must provide an own select_chip function. This
367 function must (de)select the requested chip. 367 function must (de)select the requested chip.
368 The function pointer in the nand_chip structure must 368 The function pointer in the nand_chip structure must
diff --git a/Documentation/DocBook/tracepoint.tmpl b/Documentation/DocBook/tracepoint.tmpl
index b0756d0fd579..8bca1d5cec09 100644
--- a/Documentation/DocBook/tracepoint.tmpl
+++ b/Documentation/DocBook/tracepoint.tmpl
@@ -86,4 +86,9 @@
86!Iinclude/trace/events/irq.h 86!Iinclude/trace/events/irq.h
87 </chapter> 87 </chapter>
88 88
89 <chapter id="signal">
90 <title>SIGNAL</title>
91!Iinclude/trace/events/signal.h
92 </chapter>
93
89</book> 94</book>
diff --git a/Documentation/DocBook/v4l/controls.xml b/Documentation/DocBook/v4l/controls.xml
index f492accb691d..f46450610412 100644
--- a/Documentation/DocBook/v4l/controls.xml
+++ b/Documentation/DocBook/v4l/controls.xml
@@ -281,10 +281,28 @@ minimum value disables backlight compensation.</entry>
281<constant>V4L2_COLORFX_SEPIA</constant> (2).</entry> 281<constant>V4L2_COLORFX_SEPIA</constant> (2).</entry>
282 </row> 282 </row>
283 <row> 283 <row>
284 <entry><constant>V4L2_CID_ROTATE</constant></entry>
285 <entry>integer</entry>
286 <entry>Rotates the image by specified angle. Common angles are 90,
287 270 and 180. Rotating the image to 90 and 270 will reverse the height
288 and width of the display window. It is necessary to set the new height and
289 width of the picture using the &VIDIOC-S-FMT; ioctl according to
290 the rotation angle selected.</entry>
291 </row>
292 <row>
293 <entry><constant>V4L2_CID_BG_COLOR</constant></entry>
294 <entry>integer</entry>
295 <entry>Sets the background color on the current output device.
296 Background color needs to be specified in the RGB24 format. The
297 supplied 32 bit value is interpreted as bits 0-7 Red color information,
298 bits 8-15 Green color information, bits 16-23 Blue color
299 information and bits 24-31 must be zero.</entry>
300 </row>
301 <row>
284 <entry><constant>V4L2_CID_LASTP1</constant></entry> 302 <entry><constant>V4L2_CID_LASTP1</constant></entry>
285 <entry></entry> 303 <entry></entry>
286 <entry>End of the predefined control IDs (currently 304 <entry>End of the predefined control IDs (currently
287<constant>V4L2_CID_COLORFX</constant> + 1).</entry> 305<constant>V4L2_CID_BG_COLOR</constant> + 1).</entry>
288 </row> 306 </row>
289 <row> 307 <row>
290 <entry><constant>V4L2_CID_PRIVATE_BASE</constant></entry> 308 <entry><constant>V4L2_CID_PRIVATE_BASE</constant></entry>
diff --git a/Documentation/DocBook/v4l/pixfmt.xml b/Documentation/DocBook/v4l/pixfmt.xml
index 7d396a3785f5..885968d6a2fc 100644
--- a/Documentation/DocBook/v4l/pixfmt.xml
+++ b/Documentation/DocBook/v4l/pixfmt.xml
@@ -770,6 +770,11 @@ kernel sources in the file <filename>Documentation/video4linux/cx2341x/README.hm
770 <entry>'S920'</entry> 770 <entry>'S920'</entry>
771 <entry>YUV 4:2:0 format of the gspca sn9c20x driver.</entry> 771 <entry>YUV 4:2:0 format of the gspca sn9c20x driver.</entry>
772 </row> 772 </row>
773 <row id="V4L2-PIX-FMT-STV0680">
774 <entry><constant>V4L2_PIX_FMT_STV0680</constant></entry>
775 <entry>'S680'</entry>
776 <entry>Bayer format of the gspca stv0680 driver.</entry>
777 </row>
773 <row id="V4L2-PIX-FMT-WNVA"> 778 <row id="V4L2-PIX-FMT-WNVA">
774 <entry><constant>V4L2_PIX_FMT_WNVA</constant></entry> 779 <entry><constant>V4L2_PIX_FMT_WNVA</constant></entry>
775 <entry>'WNVA'</entry> 780 <entry>'WNVA'</entry>
diff --git a/Documentation/DocBook/v4l/videodev2.h.xml b/Documentation/DocBook/v4l/videodev2.h.xml
index 97002060ac4f..3e282ed9f593 100644
--- a/Documentation/DocBook/v4l/videodev2.h.xml
+++ b/Documentation/DocBook/v4l/videodev2.h.xml
@@ -363,6 +363,7 @@ struct <link linkend="v4l2-pix-format">v4l2_pix_format</link> {
363#define <link linkend="V4L2-PIX-FMT-OV511">V4L2_PIX_FMT_OV511</link> v4l2_fourcc('O', '5', '1', '1') /* ov511 JPEG */ 363#define <link linkend="V4L2-PIX-FMT-OV511">V4L2_PIX_FMT_OV511</link> v4l2_fourcc('O', '5', '1', '1') /* ov511 JPEG */
364#define <link linkend="V4L2-PIX-FMT-OV518">V4L2_PIX_FMT_OV518</link> v4l2_fourcc('O', '5', '1', '8') /* ov518 JPEG */ 364#define <link linkend="V4L2-PIX-FMT-OV518">V4L2_PIX_FMT_OV518</link> v4l2_fourcc('O', '5', '1', '8') /* ov518 JPEG */
365#define <link linkend="V4L2-PIX-FMT-TM6000">V4L2_PIX_FMT_TM6000</link> v4l2_fourcc('T', 'M', '6', '0') /* tm5600/tm60x0 */ 365#define <link linkend="V4L2-PIX-FMT-TM6000">V4L2_PIX_FMT_TM6000</link> v4l2_fourcc('T', 'M', '6', '0') /* tm5600/tm60x0 */
366#define <link linkend="V4L2-PIX-FMT-STV0680">V4L2_PIX_FMT_STV0680</link> v4l2_fourcc('S', '6', '8', '0') /* stv0680 bayer */
366 367
367/* 368/*
368 * F O R M A T E N U M E R A T I O N 369 * F O R M A T E N U M E R A T I O N
@@ -492,7 +493,7 @@ struct <link linkend="v4l2-jpegcompression">v4l2_jpegcompression</link> {
492 * you do, leave them untouched. 493 * you do, leave them untouched.
493 * Inluding less markers will make the 494 * Inluding less markers will make the
494 * resulting code smaller, but there will 495 * resulting code smaller, but there will
495 * be fewer aplications which can read it. 496 * be fewer applications which can read it.
496 * The presence of the APP and COM marker 497 * The presence of the APP and COM marker
497 * is influenced by APP_len and COM_len 498 * is influenced by APP_len and COM_len
498 * ONLY, not by this property! */ 499 * ONLY, not by this property! */
@@ -565,6 +566,7 @@ struct <link linkend="v4l2-framebuffer">v4l2_framebuffer</link> {
565#define V4L2_FBUF_CAP_LOCAL_ALPHA 0x0010 566#define V4L2_FBUF_CAP_LOCAL_ALPHA 0x0010
566#define V4L2_FBUF_CAP_GLOBAL_ALPHA 0x0020 567#define V4L2_FBUF_CAP_GLOBAL_ALPHA 0x0020
567#define V4L2_FBUF_CAP_LOCAL_INV_ALPHA 0x0040 568#define V4L2_FBUF_CAP_LOCAL_INV_ALPHA 0x0040
569#define V4L2_FBUF_CAP_SRC_CHROMAKEY 0x0080
568/* Flags for the 'flags' field. */ 570/* Flags for the 'flags' field. */
569#define V4L2_FBUF_FLAG_PRIMARY 0x0001 571#define V4L2_FBUF_FLAG_PRIMARY 0x0001
570#define V4L2_FBUF_FLAG_OVERLAY 0x0002 572#define V4L2_FBUF_FLAG_OVERLAY 0x0002
@@ -572,6 +574,7 @@ struct <link linkend="v4l2-framebuffer">v4l2_framebuffer</link> {
572#define V4L2_FBUF_FLAG_LOCAL_ALPHA 0x0008 574#define V4L2_FBUF_FLAG_LOCAL_ALPHA 0x0008
573#define V4L2_FBUF_FLAG_GLOBAL_ALPHA 0x0010 575#define V4L2_FBUF_FLAG_GLOBAL_ALPHA 0x0010
574#define V4L2_FBUF_FLAG_LOCAL_INV_ALPHA 0x0020 576#define V4L2_FBUF_FLAG_LOCAL_INV_ALPHA 0x0020
577#define V4L2_FBUF_FLAG_SRC_CHROMAKEY 0x0040
575 578
576struct <link linkend="v4l2-clip">v4l2_clip</link> { 579struct <link linkend="v4l2-clip">v4l2_clip</link> {
577 struct <link linkend="v4l2-rect">v4l2_rect</link> c; 580 struct <link linkend="v4l2-rect">v4l2_rect</link> c;
@@ -914,8 +917,10 @@ enum <link linkend="v4l2-colorfx">v4l2_colorfx</link> {
914#define V4L2_CID_AUTOBRIGHTNESS (V4L2_CID_BASE+32) 917#define V4L2_CID_AUTOBRIGHTNESS (V4L2_CID_BASE+32)
915#define V4L2_CID_BAND_STOP_FILTER (V4L2_CID_BASE+33) 918#define V4L2_CID_BAND_STOP_FILTER (V4L2_CID_BASE+33)
916 919
920#define V4L2_CID_ROTATE (V4L2_CID_BASE+34)
921#define V4L2_CID_BG_COLOR (V4L2_CID_BASE+35)
917/* last CID + 1 */ 922/* last CID + 1 */
918#define V4L2_CID_LASTP1 (V4L2_CID_BASE+34) 923#define V4L2_CID_LASTP1 (V4L2_CID_BASE+36)
919 924
920/* MPEG-class control IDs defined by V4L2 */ 925/* MPEG-class control IDs defined by V4L2 */
921#define V4L2_CID_MPEG_BASE (V4L2_CTRL_CLASS_MPEG | 0x900) 926#define V4L2_CID_MPEG_BASE (V4L2_CTRL_CLASS_MPEG | 0x900)
diff --git a/Documentation/DocBook/v4l/vidioc-g-fbuf.xml b/Documentation/DocBook/v4l/vidioc-g-fbuf.xml
index f7017062656e..e7dda4822f04 100644
--- a/Documentation/DocBook/v4l/vidioc-g-fbuf.xml
+++ b/Documentation/DocBook/v4l/vidioc-g-fbuf.xml
@@ -336,6 +336,13 @@ alpha value. Alpha blending makes no sense for destructive overlays.</entry>
336inverted alpha channel of the framebuffer or VGA signal. Alpha 336inverted alpha channel of the framebuffer or VGA signal. Alpha
337blending makes no sense for destructive overlays.</entry> 337blending makes no sense for destructive overlays.</entry>
338 </row> 338 </row>
339 <row>
340 <entry><constant>V4L2_FBUF_CAP_SRC_CHROMAKEY</constant></entry>
341 <entry>0x0080</entry>
342 <entry>The device supports Source Chroma-keying. Framebuffer pixels
343with the chroma-key colors are replaced by video pixels, which is exactly opposite of
344<constant>V4L2_FBUF_CAP_CHROMAKEY</constant></entry>
345 </row>
339 </tbody> 346 </tbody>
340 </tgroup> 347 </tgroup>
341 </table> 348 </table>
@@ -411,6 +418,16 @@ images, but with an inverted alpha value. The blend function is:
411output = framebuffer pixel * (1 - alpha) + video pixel * alpha. The 418output = framebuffer pixel * (1 - alpha) + video pixel * alpha. The
412actual alpha depth depends on the framebuffer pixel format.</entry> 419actual alpha depth depends on the framebuffer pixel format.</entry>
413 </row> 420 </row>
421 <row>
422 <entry><constant>V4L2_FBUF_FLAG_SRC_CHROMAKEY</constant></entry>
423 <entry>0x0040</entry>
424 <entry>Use source chroma-keying. The source chroma-key color is
425determined by the <structfield>chromakey</structfield> field of
426&v4l2-window; and negotiated with the &VIDIOC-S-FMT; ioctl, see <xref
427linkend="overlay" /> and <xref linkend="osd" />.
428Both chroma-keying are mutual exclusive to each other, so same
429<structfield>chromakey</structfield> field of &v4l2-window; is being used.</entry>
430 </row>
414 </tbody> 431 </tbody>
415 </tgroup> 432 </tgroup>
416 </table> 433 </table>
diff --git a/Documentation/DocBook/writing-an-alsa-driver.tmpl b/Documentation/DocBook/writing-an-alsa-driver.tmpl
index 7a2e0e98986a..0d0f7b4d4b1a 100644
--- a/Documentation/DocBook/writing-an-alsa-driver.tmpl
+++ b/Documentation/DocBook/writing-an-alsa-driver.tmpl
@@ -5318,7 +5318,7 @@ struct _snd_pcm_runtime {
5318 pages of the given size and map them onto the virtually contiguous 5318 pages of the given size and map them onto the virtually contiguous
5319 memory. The virtual pointer is addressed in runtime-&gt;dma_area. 5319 memory. The virtual pointer is addressed in runtime-&gt;dma_area.
5320 The physical address (runtime-&gt;dma_addr) is set to zero, 5320 The physical address (runtime-&gt;dma_addr) is set to zero,
5321 because the buffer is physically non-contigous. 5321 because the buffer is physically non-contiguous.
5322 The physical address table is set up in sgbuf-&gt;table. 5322 The physical address table is set up in sgbuf-&gt;table.
5323 You can get the physical address at a certain offset via 5323 You can get the physical address at a certain offset via
5324 <function>snd_pcm_sgbuf_get_addr()</function>. 5324 <function>snd_pcm_sgbuf_get_addr()</function>.
diff --git a/Documentation/RCU/trace.txt b/Documentation/RCU/trace.txt
index 187bbf10c923..8608fd85e921 100644
--- a/Documentation/RCU/trace.txt
+++ b/Documentation/RCU/trace.txt
@@ -1,185 +1,10 @@
1CONFIG_RCU_TRACE debugfs Files and Formats 1CONFIG_RCU_TRACE debugfs Files and Formats
2 2
3 3
4The rcupreempt and rcutree implementations of RCU provide debugfs trace 4The rcutree implementation of RCU provides debugfs trace output that
5output that summarizes counters and state. This information is useful for 5summarizes counters and state. This information is useful for debugging
6debugging RCU itself, and can sometimes also help to debug abuses of RCU. 6RCU itself, and can sometimes also help to debug abuses of RCU.
7Note that the rcuclassic implementation of RCU does not provide debugfs 7The following sections describe the debugfs files and formats.
8trace output.
9
10The following sections describe the debugfs files and formats for
11preemptable RCU (rcupreempt) and hierarchical RCU (rcutree).
12
13
14Preemptable RCU debugfs Files and Formats
15
16This implementation of RCU provides three debugfs files under the
17top-level directory RCU: rcu/rcuctrs (which displays the per-CPU
18counters used by preemptable RCU) rcu/rcugp (which displays grace-period
19counters), and rcu/rcustats (which internal counters for debugging RCU).
20
21The output of "cat rcu/rcuctrs" looks as follows:
22
23CPU last cur F M
24 0 5 -5 0 0
25 1 -1 0 0 0
26 2 0 1 0 0
27 3 0 1 0 0
28 4 0 1 0 0
29 5 0 1 0 0
30 6 0 2 0 0
31 7 0 -1 0 0
32 8 0 1 0 0
33ggp = 26226, state = waitzero
34
35The per-CPU fields are as follows:
36
37o "CPU" gives the CPU number. Offline CPUs are not displayed.
38
39o "last" gives the value of the counter that is being decremented
40 for the current grace period phase. In the example above,
41 the counters sum to 4, indicating that there are still four
42 RCU read-side critical sections still running that started
43 before the last counter flip.
44
45o "cur" gives the value of the counter that is currently being
46 both incremented (by rcu_read_lock()) and decremented (by
47 rcu_read_unlock()). In the example above, the counters sum to
48 1, indicating that there is only one RCU read-side critical section
49 still running that started after the last counter flip.
50
51o "F" indicates whether RCU is waiting for this CPU to acknowledge
52 a counter flip. In the above example, RCU is not waiting on any,
53 which is consistent with the state being "waitzero" rather than
54 "waitack".
55
56o "M" indicates whether RCU is waiting for this CPU to execute a
57 memory barrier. In the above example, RCU is not waiting on any,
58 which is consistent with the state being "waitzero" rather than
59 "waitmb".
60
61o "ggp" is the global grace-period counter.
62
63o "state" is the RCU state, which can be one of the following:
64
65 o "idle": there is no grace period in progress.
66
67 o "waitack": RCU just incremented the global grace-period
68 counter, which has the effect of reversing the roles of
69 the "last" and "cur" counters above, and is waiting for
70 all the CPUs to acknowledge the flip. Once the flip has
71 been acknowledged, CPUs will no longer be incrementing
72 what are now the "last" counters, so that their sum will
73 decrease monotonically down to zero.
74
75 o "waitzero": RCU is waiting for the sum of the "last" counters
76 to decrease to zero.
77
78 o "waitmb": RCU is waiting for each CPU to execute a memory
79 barrier, which ensures that instructions from a given CPU's
80 last RCU read-side critical section cannot be reordered
81 with instructions following the memory-barrier instruction.
82
83The output of "cat rcu/rcugp" looks as follows:
84
85oldggp=48870 newggp=48873
86
87Note that reading from this file provokes a synchronize_rcu(). The
88"oldggp" value is that of "ggp" from rcu/rcuctrs above, taken before
89executing the synchronize_rcu(), and the "newggp" value is also the
90"ggp" value, but taken after the synchronize_rcu() command returns.
91
92
93The output of "cat rcu/rcugp" looks as follows:
94
95na=1337955 nl=40 wa=1337915 wl=44 da=1337871 dl=0 dr=1337871 di=1337871
961=50989 e1=6138 i1=49722 ie1=82 g1=49640 a1=315203 ae1=265563 a2=49640
97z1=1401244 ze1=1351605 z2=49639 m1=5661253 me1=5611614 m2=49639
98
99These are counters tracking internal preemptable-RCU events, however,
100some of them may be useful for debugging algorithms using RCU. In
101particular, the "nl", "wl", and "dl" values track the number of RCU
102callbacks in various states. The fields are as follows:
103
104o "na" is the total number of RCU callbacks that have been enqueued
105 since boot.
106
107o "nl" is the number of RCU callbacks waiting for the previous
108 grace period to end so that they can start waiting on the next
109 grace period.
110
111o "wa" is the total number of RCU callbacks that have started waiting
112 for a grace period since boot. "na" should be roughly equal to
113 "nl" plus "wa".
114
115o "wl" is the number of RCU callbacks currently waiting for their
116 grace period to end.
117
118o "da" is the total number of RCU callbacks whose grace periods
119 have completed since boot. "wa" should be roughly equal to
120 "wl" plus "da".
121
122o "dr" is the total number of RCU callbacks that have been removed
123 from the list of callbacks ready to invoke. "dr" should be roughly
124 equal to "da".
125
126o "di" is the total number of RCU callbacks that have been invoked
127 since boot. "di" should be roughly equal to "da", though some
128 early versions of preemptable RCU had a bug so that only the
129 last CPU's count of invocations was displayed, rather than the
130 sum of all CPU's counts.
131
132o "1" is the number of calls to rcu_try_flip(). This should be
133 roughly equal to the sum of "e1", "i1", "a1", "z1", and "m1"
134 described below. In other words, the number of times that
135 the state machine is visited should be equal to the sum of the
136 number of times that each state is visited plus the number of
137 times that the state-machine lock acquisition failed.
138
139o "e1" is the number of times that rcu_try_flip() was unable to
140 acquire the fliplock.
141
142o "i1" is the number of calls to rcu_try_flip_idle().
143
144o "ie1" is the number of times rcu_try_flip_idle() exited early
145 due to the calling CPU having no work for RCU.
146
147o "g1" is the number of times that rcu_try_flip_idle() decided
148 to start a new grace period. "i1" should be roughly equal to
149 "ie1" plus "g1".
150
151o "a1" is the number of calls to rcu_try_flip_waitack().
152
153o "ae1" is the number of times that rcu_try_flip_waitack() found
154 that at least one CPU had not yet acknowledge the new grace period
155 (AKA "counter flip").
156
157o "a2" is the number of time rcu_try_flip_waitack() found that
158 all CPUs had acknowledged. "a1" should be roughly equal to
159 "ae1" plus "a2". (This particular output was collected on
160 a 128-CPU machine, hence the smaller-than-usual fraction of
161 calls to rcu_try_flip_waitack() finding all CPUs having already
162 acknowledged.)
163
164o "z1" is the number of calls to rcu_try_flip_waitzero().
165
166o "ze1" is the number of times that rcu_try_flip_waitzero() found
167 that not all of the old RCU read-side critical sections had
168 completed.
169
170o "z2" is the number of times that rcu_try_flip_waitzero() finds
171 the sum of the counters equal to zero, in other words, that
172 all of the old RCU read-side critical sections had completed.
173 The value of "z1" should be roughly equal to "ze1" plus
174 "z2".
175
176o "m1" is the number of calls to rcu_try_flip_waitmb().
177
178o "me1" is the number of times that rcu_try_flip_waitmb() finds
179 that at least one CPU has not yet executed a memory barrier.
180
181o "m2" is the number of times that rcu_try_flip_waitmb() finds that
182 all CPUs have executed a memory barrier.
183 8
184 9
185Hierarchical RCU debugfs Files and Formats 10Hierarchical RCU debugfs Files and Formats
@@ -210,9 +35,10 @@ rcu_bh:
210 6 c=-275 g=-275 pq=1 pqc=-275 qp=0 dt=859/1 dn=0 df=15 of=0 ri=0 ql=0 b=10 35 6 c=-275 g=-275 pq=1 pqc=-275 qp=0 dt=859/1 dn=0 df=15 of=0 ri=0 ql=0 b=10
211 7 c=-275 g=-275 pq=1 pqc=-275 qp=0 dt=3761/1 dn=0 df=15 of=0 ri=0 ql=0 b=10 36 7 c=-275 g=-275 pq=1 pqc=-275 qp=0 dt=3761/1 dn=0 df=15 of=0 ri=0 ql=0 b=10
212 37
213The first section lists the rcu_data structures for rcu, the second for 38The first section lists the rcu_data structures for rcu_sched, the second
214rcu_bh. Each section has one line per CPU, or eight for this 8-CPU system. 39for rcu_bh. Note that CONFIG_TREE_PREEMPT_RCU kernels will have an
215The fields are as follows: 40additional section for rcu_preempt. Each section has one line per CPU,
41or eight for this 8-CPU system. The fields are as follows:
216 42
217o The number at the beginning of each line is the CPU number. 43o The number at the beginning of each line is the CPU number.
218 CPUs numbers followed by an exclamation mark are offline, 44 CPUs numbers followed by an exclamation mark are offline,
@@ -223,9 +49,9 @@ o The number at the beginning of each line is the CPU number.
223 49
224o "c" is the count of grace periods that this CPU believes have 50o "c" is the count of grace periods that this CPU believes have
225 completed. CPUs in dynticks idle mode may lag quite a ways 51 completed. CPUs in dynticks idle mode may lag quite a ways
226 behind, for example, CPU 4 under "rcu" above, which has slept 52 behind, for example, CPU 4 under "rcu_sched" above, which has
227 through the past 25 RCU grace periods. It is not unusual to 53 slept through the past 25 RCU grace periods. It is not unusual
228 see CPUs lagging by thousands of grace periods. 54 to see CPUs lagging by thousands of grace periods.
229 55
230o "g" is the count of grace periods that this CPU believes have 56o "g" is the count of grace periods that this CPU believes have
231 started. Again, CPUs in dynticks idle mode may lag behind. 57 started. Again, CPUs in dynticks idle mode may lag behind.
@@ -308,8 +134,10 @@ The output of "cat rcu/rcugp" looks as follows:
308rcu_sched: completed=33062 gpnum=33063 134rcu_sched: completed=33062 gpnum=33063
309rcu_bh: completed=464 gpnum=464 135rcu_bh: completed=464 gpnum=464
310 136
311Again, this output is for both "rcu" and "rcu_bh". The fields are 137Again, this output is for both "rcu_sched" and "rcu_bh". Note that
312taken from the rcu_state structure, and are as follows: 138kernels built with CONFIG_TREE_PREEMPT_RCU will have an additional
139"rcu_preempt" line. The fields are taken from the rcu_state structure,
140and are as follows:
313 141
314o "completed" is the number of grace periods that have completed. 142o "completed" is the number of grace periods that have completed.
315 It is comparable to the "c" field from rcu/rcudata in that a 143 It is comparable to the "c" field from rcu/rcudata in that a
@@ -324,23 +152,24 @@ o "gpnum" is the number of grace periods that have started. It is
324 If these two fields are equal (as they are for "rcu_bh" above), 152 If these two fields are equal (as they are for "rcu_bh" above),
325 then there is no grace period in progress, in other words, RCU 153 then there is no grace period in progress, in other words, RCU
326 is idle. On the other hand, if the two fields differ (as they 154 is idle. On the other hand, if the two fields differ (as they
327 do for "rcu" above), then an RCU grace period is in progress. 155 do for "rcu_sched" above), then an RCU grace period is in progress.
328 156
329 157
330The output of "cat rcu/rcuhier" looks as follows, with very long lines: 158The output of "cat rcu/rcuhier" looks as follows, with very long lines:
331 159
332c=6902 g=6903 s=2 jfq=3 j=72c7 nfqs=13142/nfqsng=0(13142) fqlh=6 160c=6902 g=6903 s=2 jfq=3 j=72c7 nfqs=13142/nfqsng=0(13142) fqlh=6 oqlen=0
3331/1 0:127 ^0 1611/1 .>. 0:127 ^0
3343/3 0:35 ^0 0/0 36:71 ^1 0/0 72:107 ^2 0/0 108:127 ^3 1623/3 .>. 0:35 ^0 0/0 .>. 36:71 ^1 0/0 .>. 72:107 ^2 0/0 .>. 108:127 ^3
3353/3f 0:5 ^0 2/3 6:11 ^1 0/0 12:17 ^2 0/0 18:23 ^3 0/0 24:29 ^4 0/0 30:35 ^5 0/0 36:41 ^0 0/0 42:47 ^1 0/0 48:53 ^2 0/0 54:59 ^3 0/0 60:65 ^4 0/0 66:71 ^5 0/0 72:77 ^0 0/0 78:83 ^1 0/0 84:89 ^2 0/0 90:95 ^3 0/0 96:101 ^4 0/0 102:107 ^5 0/0 108:113 ^0 0/0 114:119 ^1 0/0 120:125 ^2 0/0 126:127 ^3 1633/3f .>. 0:5 ^0 2/3 .>. 6:11 ^1 0/0 .>. 12:17 ^2 0/0 .>. 18:23 ^3 0/0 .>. 24:29 ^4 0/0 .>. 30:35 ^5 0/0 .>. 36:41 ^0 0/0 .>. 42:47 ^1 0/0 .>. 48:53 ^2 0/0 .>. 54:59 ^3 0/0 .>. 60:65 ^4 0/0 .>. 66:71 ^5 0/0 .>. 72:77 ^0 0/0 .>. 78:83 ^1 0/0 .>. 84:89 ^2 0/0 .>. 90:95 ^3 0/0 .>. 96:101 ^4 0/0 .>. 102:107 ^5 0/0 .>. 108:113 ^0 0/0 .>. 114:119 ^1 0/0 .>. 120:125 ^2 0/0 .>. 126:127 ^3
336rcu_bh: 164rcu_bh:
337c=-226 g=-226 s=1 jfq=-5701 j=72c7 nfqs=88/nfqsng=0(88) fqlh=0 165c=-226 g=-226 s=1 jfq=-5701 j=72c7 nfqs=88/nfqsng=0(88) fqlh=0 oqlen=0
3380/1 0:127 ^0 1660/1 .>. 0:127 ^0
3390/3 0:35 ^0 0/0 36:71 ^1 0/0 72:107 ^2 0/0 108:127 ^3 1670/3 .>. 0:35 ^0 0/0 .>. 36:71 ^1 0/0 .>. 72:107 ^2 0/0 .>. 108:127 ^3
3400/3f 0:5 ^0 0/3 6:11 ^1 0/0 12:17 ^2 0/0 18:23 ^3 0/0 24:29 ^4 0/0 30:35 ^5 0/0 36:41 ^0 0/0 42:47 ^1 0/0 48:53 ^2 0/0 54:59 ^3 0/0 60:65 ^4 0/0 66:71 ^5 0/0 72:77 ^0 0/0 78:83 ^1 0/0 84:89 ^2 0/0 90:95 ^3 0/0 96:101 ^4 0/0 102:107 ^5 0/0 108:113 ^0 0/0 114:119 ^1 0/0 120:125 ^2 0/0 126:127 ^3 1680/3f .>. 0:5 ^0 0/3 .>. 6:11 ^1 0/0 .>. 12:17 ^2 0/0 .>. 18:23 ^3 0/0 .>. 24:29 ^4 0/0 .>. 30:35 ^5 0/0 .>. 36:41 ^0 0/0 .>. 42:47 ^1 0/0 .>. 48:53 ^2 0/0 .>. 54:59 ^3 0/0 .>. 60:65 ^4 0/0 .>. 66:71 ^5 0/0 .>. 72:77 ^0 0/0 .>. 78:83 ^1 0/0 .>. 84:89 ^2 0/0 .>. 90:95 ^3 0/0 .>. 96:101 ^4 0/0 .>. 102:107 ^5 0/0 .>. 108:113 ^0 0/0 .>. 114:119 ^1 0/0 .>. 120:125 ^2 0/0 .>. 126:127 ^3
341 169
342This is once again split into "rcu" and "rcu_bh" portions. The fields are 170This is once again split into "rcu_sched" and "rcu_bh" portions,
343as follows: 171and CONFIG_TREE_PREEMPT_RCU kernels will again have an additional
172"rcu_preempt" section. The fields are as follows:
344 173
345o "c" is exactly the same as "completed" under rcu/rcugp. 174o "c" is exactly the same as "completed" under rcu/rcugp.
346 175
@@ -372,6 +201,11 @@ o "fqlh" is the number of calls to force_quiescent_state() that
372 exited immediately (without even being counted in nfqs above) 201 exited immediately (without even being counted in nfqs above)
373 due to contention on ->fqslock. 202 due to contention on ->fqslock.
374 203
204o "oqlen" is the number of callbacks on the "orphan" callback
205 list. RCU callbacks are placed on this list by CPUs going
206 offline, and are "adopted" either by the CPU helping the outgoing
207 CPU or by the next rcu_barrier*() call, whichever comes first.
208
375o Each element of the form "1/1 0:127 ^0" represents one struct 209o Each element of the form "1/1 0:127 ^0" represents one struct
376 rcu_node. Each line represents one level of the hierarchy, from 210 rcu_node. Each line represents one level of the hierarchy, from
377 root to leaves. It is best to think of the rcu_data structures 211 root to leaves. It is best to think of the rcu_data structures
@@ -379,7 +213,7 @@ o Each element of the form "1/1 0:127 ^0" represents one struct
379 might be either one, two, or three levels of rcu_node structures, 213 might be either one, two, or three levels of rcu_node structures,
380 depending on the relationship between CONFIG_RCU_FANOUT and 214 depending on the relationship between CONFIG_RCU_FANOUT and
381 CONFIG_NR_CPUS. 215 CONFIG_NR_CPUS.
382 216
383 o The numbers separated by the "/" are the qsmask followed 217 o The numbers separated by the "/" are the qsmask followed
384 by the qsmaskinit. The qsmask will have one bit 218 by the qsmaskinit. The qsmask will have one bit
385 set for each entity in the next lower level that 219 set for each entity in the next lower level that
@@ -389,10 +223,19 @@ o Each element of the form "1/1 0:127 ^0" represents one struct
389 The value of qsmaskinit is assigned to that of qsmask 223 The value of qsmaskinit is assigned to that of qsmask
390 at the beginning of each grace period. 224 at the beginning of each grace period.
391 225
392 For example, for "rcu", the qsmask of the first entry 226 For example, for "rcu_sched", the qsmask of the first
393 of the lowest level is 0x14, meaning that we are still 227 entry of the lowest level is 0x14, meaning that we
394 waiting for CPUs 2 and 4 to check in for the current 228 are still waiting for CPUs 2 and 4 to check in for the
395 grace period. 229 current grace period.
230
231 o The characters separated by the ">" indicate the state
232 of the blocked-tasks lists. A "T" preceding the ">"
233 indicates that at least one task blocked in an RCU
234 read-side critical section blocks the current grace
235 period, while a "." preceding the ">" indicates otherwise.
236 The character following the ">" indicates similarly for
237 the next grace period. A "T" should appear in this
238 field only for rcu-preempt.
396 239
397 o The numbers separated by the ":" are the range of CPUs 240 o The numbers separated by the ":" are the range of CPUs
398 served by this struct rcu_node. This can be helpful 241 served by this struct rcu_node. This can be helpful
@@ -431,8 +274,9 @@ rcu_bh:
431 6 np=120834 qsp=9902 cbr=0 cng=0 gpc=6 gps=3 nf=2 nn=110921 274 6 np=120834 qsp=9902 cbr=0 cng=0 gpc=6 gps=3 nf=2 nn=110921
432 7 np=144888 qsp=26336 cbr=0 cng=0 gpc=8 gps=2 nf=0 nn=118542 275 7 np=144888 qsp=26336 cbr=0 cng=0 gpc=8 gps=2 nf=0 nn=118542
433 276
434As always, this is once again split into "rcu" and "rcu_bh" portions. 277As always, this is once again split into "rcu_sched" and "rcu_bh"
435The fields are as follows: 278portions, with CONFIG_TREE_PREEMPT_RCU kernels having an additional
279"rcu_preempt" section. The fields are as follows:
436 280
437o "np" is the number of times that __rcu_pending() has been invoked 281o "np" is the number of times that __rcu_pending() has been invoked
438 for the corresponding flavor of RCU. 282 for the corresponding flavor of RCU.
diff --git a/Documentation/RCU/whatisRCU.txt b/Documentation/RCU/whatisRCU.txt
index e41a7fecf0d3..d542ca243b80 100644
--- a/Documentation/RCU/whatisRCU.txt
+++ b/Documentation/RCU/whatisRCU.txt
@@ -830,7 +830,7 @@ sched: Critical sections Grace period Barrier
830SRCU: Critical sections Grace period Barrier 830SRCU: Critical sections Grace period Barrier
831 831
832 srcu_read_lock synchronize_srcu N/A 832 srcu_read_lock synchronize_srcu N/A
833 srcu_read_unlock 833 srcu_read_unlock synchronize_srcu_expedited
834 834
835SRCU: Initialization/cleanup 835SRCU: Initialization/cleanup
836 init_srcu_struct 836 init_srcu_struct
diff --git a/Documentation/arm/OMAP/DSS b/Documentation/arm/OMAP/DSS
new file mode 100644
index 000000000000..0af0e9eed5d6
--- /dev/null
+++ b/Documentation/arm/OMAP/DSS
@@ -0,0 +1,317 @@
1OMAP2/3 Display Subsystem
2-------------------------
3
4This is an almost total rewrite of the OMAP FB driver in drivers/video/omap
5(let's call it DSS1). The main differences between DSS1 and DSS2 are DSI,
6TV-out and multiple display support, but there are lots of small improvements
7also.
8
9The DSS2 driver (omapdss module) is in arch/arm/plat-omap/dss/, and the FB,
10panel and controller drivers are in drivers/video/omap2/. DSS1 and DSS2 live
11currently side by side, you can choose which one to use.
12
13Features
14--------
15
16Working and tested features include:
17
18- MIPI DPI (parallel) output
19- MIPI DSI output in command mode
20- MIPI DBI (RFBI) output
21- SDI output
22- TV output
23- All pieces can be compiled as a module or inside kernel
24- Use DISPC to update any of the outputs
25- Use CPU to update RFBI or DSI output
26- OMAP DISPC planes
27- RGB16, RGB24 packed, RGB24 unpacked
28- YUV2, UYVY
29- Scaling
30- Adjusting DSS FCK to find a good pixel clock
31- Use DSI DPLL to create DSS FCK
32
33Tested boards include:
34- OMAP3 SDP board
35- Beagle board
36- N810
37
38omapdss driver
39--------------
40
41The DSS driver does not itself have any support for Linux framebuffer, V4L or
42such like the current ones, but it has an internal kernel API that upper level
43drivers can use.
44
45The DSS driver models OMAP's overlays, overlay managers and displays in a
46flexible way to enable non-common multi-display configuration. In addition to
47modelling the hardware overlays, omapdss supports virtual overlays and overlay
48managers. These can be used when updating a display with CPU or system DMA.
49
50Panel and controller drivers
51----------------------------
52
53The drivers implement panel or controller specific functionality and are not
54usually visible to users except through omapfb driver. They register
55themselves to the DSS driver.
56
57omapfb driver
58-------------
59
60The omapfb driver implements arbitrary number of standard linux framebuffers.
61These framebuffers can be routed flexibly to any overlays, thus allowing very
62dynamic display architecture.
63
64The driver exports some omapfb specific ioctls, which are compatible with the
65ioctls in the old driver.
66
67The rest of the non standard features are exported via sysfs. Whether the final
68implementation will use sysfs, or ioctls, is still open.
69
70V4L2 drivers
71------------
72
73V4L2 is being implemented in TI.
74
75From omapdss point of view the V4L2 drivers should be similar to framebuffer
76driver.
77
78Architecture
79--------------------
80
81Some clarification what the different components do:
82
83 - Framebuffer is a memory area inside OMAP's SRAM/SDRAM that contains the
84 pixel data for the image. Framebuffer has width and height and color
85 depth.
86 - Overlay defines where the pixels are read from and where they go on the
87 screen. The overlay may be smaller than framebuffer, thus displaying only
88 part of the framebuffer. The position of the overlay may be changed if
89 the overlay is smaller than the display.
90 - Overlay manager combines the overlays in to one image and feeds them to
91 display.
92 - Display is the actual physical display device.
93
94A framebuffer can be connected to multiple overlays to show the same pixel data
95on all of the overlays. Note that in this case the overlay input sizes must be
96the same, but, in case of video overlays, the output size can be different. Any
97framebuffer can be connected to any overlay.
98
99An overlay can be connected to one overlay manager. Also DISPC overlays can be
100connected only to DISPC overlay managers, and virtual overlays can be only
101connected to virtual overlays.
102
103An overlay manager can be connected to one display. There are certain
104restrictions which kinds of displays an overlay manager can be connected:
105
106 - DISPC TV overlay manager can be only connected to TV display.
107 - Virtual overlay managers can only be connected to DBI or DSI displays.
108 - DISPC LCD overlay manager can be connected to all displays, except TV
109 display.
110
111Sysfs
112-----
113The sysfs interface is mainly used for testing. I don't think sysfs
114interface is the best for this in the final version, but I don't quite know
115what would be the best interfaces for these things.
116
117The sysfs interface is divided to two parts: DSS and FB.
118
119/sys/class/graphics/fb? directory:
120mirror 0=off, 1=on
121rotate Rotation 0-3 for 0, 90, 180, 270 degrees
122rotate_type 0 = DMA rotation, 1 = VRFB rotation
123overlays List of overlay numbers to which framebuffer pixels go
124phys_addr Physical address of the framebuffer
125virt_addr Virtual address of the framebuffer
126size Size of the framebuffer
127
128/sys/devices/platform/omapdss/overlay? directory:
129enabled 0=off, 1=on
130input_size width,height (ie. the framebuffer size)
131manager Destination overlay manager name
132name
133output_size width,height
134position x,y
135screen_width width
136global_alpha global alpha 0-255 0=transparent 255=opaque
137
138/sys/devices/platform/omapdss/manager? directory:
139display Destination display
140name
141alpha_blending_enabled 0=off, 1=on
142trans_key_enabled 0=off, 1=on
143trans_key_type gfx-destination, video-source
144trans_key_value transparency color key (RGB24)
145default_color default background color (RGB24)
146
147/sys/devices/platform/omapdss/display? directory:
148ctrl_name Controller name
149mirror 0=off, 1=on
150update_mode 0=off, 1=auto, 2=manual
151enabled 0=off, 1=on
152name
153rotate Rotation 0-3 for 0, 90, 180, 270 degrees
154timings Display timings (pixclock,xres/hfp/hbp/hsw,yres/vfp/vbp/vsw)
155 When writing, two special timings are accepted for tv-out:
156 "pal" and "ntsc"
157panel_name
158tear_elim Tearing elimination 0=off, 1=on
159
160There are also some debugfs files at <debugfs>/omapdss/ which show information
161about clocks and registers.
162
163Examples
164--------
165
166The following definitions have been made for the examples below:
167
168ovl0=/sys/devices/platform/omapdss/overlay0
169ovl1=/sys/devices/platform/omapdss/overlay1
170ovl2=/sys/devices/platform/omapdss/overlay2
171
172mgr0=/sys/devices/platform/omapdss/manager0
173mgr1=/sys/devices/platform/omapdss/manager1
174
175lcd=/sys/devices/platform/omapdss/display0
176dvi=/sys/devices/platform/omapdss/display1
177tv=/sys/devices/platform/omapdss/display2
178
179fb0=/sys/class/graphics/fb0
180fb1=/sys/class/graphics/fb1
181fb2=/sys/class/graphics/fb2
182
183Default setup on OMAP3 SDP
184--------------------------
185
186Here's the default setup on OMAP3 SDP board. All planes go to LCD. DVI
187and TV-out are not in use. The columns from left to right are:
188framebuffers, overlays, overlay managers, displays. Framebuffers are
189handled by omapfb, and the rest by the DSS.
190
191FB0 --- GFX -\ DVI
192FB1 --- VID1 --+- LCD ---- LCD
193FB2 --- VID2 -/ TV ----- TV
194
195Example: Switch from LCD to DVI
196----------------------
197
198w=`cat $dvi/timings | cut -d "," -f 2 | cut -d "/" -f 1`
199h=`cat $dvi/timings | cut -d "," -f 3 | cut -d "/" -f 1`
200
201echo "0" > $lcd/enabled
202echo "" > $mgr0/display
203fbset -fb /dev/fb0 -xres $w -yres $h -vxres $w -vyres $h
204# at this point you have to switch the dvi/lcd dip-switch from the omap board
205echo "dvi" > $mgr0/display
206echo "1" > $dvi/enabled
207
208After this the configuration looks like:
209
210FB0 --- GFX -\ -- DVI
211FB1 --- VID1 --+- LCD -/ LCD
212FB2 --- VID2 -/ TV ----- TV
213
214Example: Clone GFX overlay to LCD and TV
215-------------------------------
216
217w=`cat $tv/timings | cut -d "," -f 2 | cut -d "/" -f 1`
218h=`cat $tv/timings | cut -d "," -f 3 | cut -d "/" -f 1`
219
220echo "0" > $ovl0/enabled
221echo "0" > $ovl1/enabled
222
223echo "" > $fb1/overlays
224echo "0,1" > $fb0/overlays
225
226echo "$w,$h" > $ovl1/output_size
227echo "tv" > $ovl1/manager
228
229echo "1" > $ovl0/enabled
230echo "1" > $ovl1/enabled
231
232echo "1" > $tv/enabled
233
234After this the configuration looks like (only relevant parts shown):
235
236FB0 +-- GFX ---- LCD ---- LCD
237 \- VID1 ---- TV ---- TV
238
239Misc notes
240----------
241
242OMAP FB allocates the framebuffer memory using the OMAP VRAM allocator.
243
244Using DSI DPLL to generate pixel clock it is possible produce the pixel clock
245of 86.5MHz (max possible), and with that you get 1280x1024@57 output from DVI.
246
247Rotation and mirroring currently only supports RGB565 and RGB8888 modes. VRFB
248does not support mirroring.
249
250VRFB rotation requires much more memory than non-rotated framebuffer, so you
251probably need to increase your vram setting before using VRFB rotation. Also,
252many applications may not work with VRFB if they do not pay attention to all
253framebuffer parameters.
254
255Kernel boot arguments
256---------------------
257
258vram=<size>
259 - Amount of total VRAM to preallocate. For example, "10M". omapfb
260 allocates memory for framebuffers from VRAM.
261
262omapfb.mode=<display>:<mode>[,...]
263 - Default video mode for specified displays. For example,
264 "dvi:800x400MR-24@60". See drivers/video/modedb.c.
265 There are also two special modes: "pal" and "ntsc" that
266 can be used to tv out.
267
268omapfb.vram=<fbnum>:<size>[@<physaddr>][,...]
269 - VRAM allocated for a framebuffer. Normally omapfb allocates vram
270 depending on the display size. With this you can manually allocate
271 more or define the physical address of each framebuffer. For example,
272 "1:4M" to allocate 4M for fb1.
273
274omapfb.debug=<y|n>
275 - Enable debug printing. You have to have OMAPFB debug support enabled
276 in kernel config.
277
278omapfb.test=<y|n>
279 - Draw test pattern to framebuffer whenever framebuffer settings change.
280 You need to have OMAPFB debug support enabled in kernel config.
281
282omapfb.vrfb=<y|n>
283 - Use VRFB rotation for all framebuffers.
284
285omapfb.rotate=<angle>
286 - Default rotation applied to all framebuffers.
287 0 - 0 degree rotation
288 1 - 90 degree rotation
289 2 - 180 degree rotation
290 3 - 270 degree rotation
291
292omapfb.mirror=<y|n>
293 - Default mirror for all framebuffers. Only works with DMA rotation.
294
295omapdss.def_disp=<display>
296 - Name of default display, to which all overlays will be connected.
297 Common examples are "lcd" or "tv".
298
299omapdss.debug=<y|n>
300 - Enable debug printing. You have to have DSS debug support enabled in
301 kernel config.
302
303TODO
304----
305
306DSS locking
307
308Error checking
309- Lots of checks are missing or implemented just as BUG()
310
311System DMA update for DSI
312- Can be used for RGB16 and RGB24P modes. Probably not for RGB24U (how
313 to skip the empty byte?)
314
315OMAP1 support
316- Not sure if needed
317
diff --git a/Documentation/arm/Samsung-S3C24XX/EB2410ITX.txt b/Documentation/arm/Samsung-S3C24XX/EB2410ITX.txt
index 26422f0f9080..b87292e05f2f 100644
--- a/Documentation/arm/Samsung-S3C24XX/EB2410ITX.txt
+++ b/Documentation/arm/Samsung-S3C24XX/EB2410ITX.txt
@@ -55,4 +55,4 @@ Maintainers
55 This board is maintained by Simtec Electronics. 55 This board is maintained by Simtec Electronics.
56 56
57 57
58(c) 2004 Ben Dooks, Simtec Electronics 58Copyright 2004 Ben Dooks, Simtec Electronics
diff --git a/Documentation/arm/Samsung-S3C24XX/GPIO.txt b/Documentation/arm/Samsung-S3C24XX/GPIO.txt
index 948c8718d967..2af2cf39915f 100644
--- a/Documentation/arm/Samsung-S3C24XX/GPIO.txt
+++ b/Documentation/arm/Samsung-S3C24XX/GPIO.txt
@@ -134,4 +134,4 @@ Authour
134 134
135 135
136Ben Dooks, 03 October 2004 136Ben Dooks, 03 October 2004
137(c) 2004 Ben Dooks, Simtec Electronics 137Copyright 2004 Ben Dooks, Simtec Electronics
diff --git a/Documentation/arm/Samsung-S3C24XX/Overview.txt b/Documentation/arm/Samsung-S3C24XX/Overview.txt
index cff6227b4484..081892df4fda 100644
--- a/Documentation/arm/Samsung-S3C24XX/Overview.txt
+++ b/Documentation/arm/Samsung-S3C24XX/Overview.txt
@@ -299,4 +299,4 @@ Port Contributors
299Document Author 299Document Author
300--------------- 300---------------
301 301
302Ben Dooks, (c) 2004-2005,2006 Simtec Electronics 302Ben Dooks, Copyright 2004-2006 Simtec Electronics
diff --git a/Documentation/arm/Samsung-S3C24XX/S3C2412.txt b/Documentation/arm/Samsung-S3C24XX/S3C2412.txt
index 295d971a15ed..f057876b920b 100644
--- a/Documentation/arm/Samsung-S3C24XX/S3C2412.txt
+++ b/Documentation/arm/Samsung-S3C24XX/S3C2412.txt
@@ -117,4 +117,4 @@ ATA
117Document Author 117Document Author
118--------------- 118---------------
119 119
120Ben Dooks, (c) 2006 Simtec Electronics 120Ben Dooks, Copyright 2006 Simtec Electronics
diff --git a/Documentation/arm/Samsung-S3C24XX/S3C2413.txt b/Documentation/arm/Samsung-S3C24XX/S3C2413.txt
index ab2a88858f12..909bdc7dd7b5 100644
--- a/Documentation/arm/Samsung-S3C24XX/S3C2413.txt
+++ b/Documentation/arm/Samsung-S3C24XX/S3C2413.txt
@@ -18,4 +18,4 @@ Camera Interface
18Document Author 18Document Author
19--------------- 19---------------
20 20
21Ben Dooks, (c) 2006 Simtec Electronics 21Ben Dooks, Copyright 2006 Simtec Electronics
diff --git a/Documentation/arm/Samsung-S3C24XX/Suspend.txt b/Documentation/arm/Samsung-S3C24XX/Suspend.txt
index a30fe510572b..7edd0e2e6c5b 100644
--- a/Documentation/arm/Samsung-S3C24XX/Suspend.txt
+++ b/Documentation/arm/Samsung-S3C24XX/Suspend.txt
@@ -133,5 +133,5 @@ Configuration
133Document Author 133Document Author
134--------------- 134---------------
135 135
136Ben Dooks, (c) 2004 Simtec Electronics 136Ben Dooks, Copyright 2004 Simtec Electronics
137 137
diff --git a/Documentation/arm/Samsung-S3C24XX/USB-Host.txt b/Documentation/arm/Samsung-S3C24XX/USB-Host.txt
index 67671eba4231..f82b1faefad5 100644
--- a/Documentation/arm/Samsung-S3C24XX/USB-Host.txt
+++ b/Documentation/arm/Samsung-S3C24XX/USB-Host.txt
@@ -90,4 +90,4 @@ Platform Data
90Document Author 90Document Author
91--------------- 91---------------
92 92
93Ben Dooks, (c) 2005 Simtec Electronics 93Ben Dooks, Copyright 2005 Simtec Electronics
diff --git a/Documentation/blockdev/drbd/DRBD-8.3-data-packets.svg b/Documentation/blockdev/drbd/DRBD-8.3-data-packets.svg
new file mode 100644
index 000000000000..f87cfa0dc2fb
--- /dev/null
+++ b/Documentation/blockdev/drbd/DRBD-8.3-data-packets.svg
@@ -0,0 +1,588 @@
1<?xml version="1.0" encoding="UTF-8" standalone="no"?>
2<!-- Created with Inkscape (http://www.inkscape.org/) -->
3<svg
4 xmlns:svg="http://www.w3.org/2000/svg"
5 xmlns="http://www.w3.org/2000/svg"
6 version="1.0"
7 width="210mm"
8 height="297mm"
9 viewBox="0 0 21000 29700"
10 id="svg2"
11 style="fill-rule:evenodd">
12 <defs
13 id="defs4" />
14 <g
15 id="Default"
16 style="visibility:visible">
17 <desc
18 id="desc180">Master slide</desc>
19 </g>
20 <path
21 d="M 11999,8601 L 11899,8301 L 12099,8301 L 11999,8601 z"
22 id="path193"
23 style="fill:#008000;visibility:visible" />
24 <path
25 d="M 11999,7801 L 11999,8361"
26 id="path197"
27 style="fill:none;stroke:#008000;visibility:visible" />
28 <path
29 d="M 7999,10401 L 7899,10101 L 8099,10101 L 7999,10401 z"
30 id="path209"
31 style="fill:#008000;visibility:visible" />
32 <path
33 d="M 7999,9601 L 7999,10161"
34 id="path213"
35 style="fill:none;stroke:#008000;visibility:visible" />
36 <path
37 d="M 11999,7801 L 11685,7840 L 11724,7644 L 11999,7801 z"
38 id="path225"
39 style="fill:#008000;visibility:visible" />
40 <path
41 d="M 7999,7001 L 11764,7754"
42 id="path229"
43 style="fill:none;stroke:#008000;visibility:visible" />
44 <g
45 transform="matrix(0.9895258,-0.1443562,0.1443562,0.9895258,-1244.4792,1416.5139)"
46 id="g245"
47 style="font-size:318px;font-weight:400;fill:#008000;visibility:visible;font-family:Helvetica embedded">
48 <text
49 id="text247">
50 <tspan
51 x="9139 9368 9579 9808 9986 10075 10252 10481 10659 10837 10909"
52 y="9284"
53 id="tspan249">RSDataReply</tspan>
54 </text>
55 </g>
56 <path
57 d="M 7999,9601 L 8281,9458 L 8311,9655 L 7999,9601 z"
58 id="path259"
59 style="fill:#008000;visibility:visible" />
60 <path
61 d="M 11999,9001 L 8236,9565"
62 id="path263"
63 style="fill:none;stroke:#008000;visibility:visible" />
64 <g
65 transform="matrix(0.9788674,0.2044961,-0.2044961,0.9788674,1620.9382,-1639.4947)"
66 id="g279"
67 style="font-size:318px;font-weight:400;fill:#008000;visibility:visible;font-family:Helvetica embedded">
68 <text
69 id="text281">
70 <tspan
71 x="8743 8972 9132 9310 9573 9801 10013 10242 10419 10597 10775 10953 11114"
72 y="7023"
73 id="tspan283">CsumRSRequest</tspan>
74 </text>
75 </g>
76 <text
77 id="text297"
78 style="font-size:318px;font-weight:400;fill:#008000;visibility:visible;font-family:Helvetica embedded">
79 <tspan
80 x="4034 4263 4440 4703 4881 5042 5219 5397 5503 5681 5842 6003 6180 6341 6519 6625 6803 6980 7158 7336 7497 7586 7692"
81 y="5707"
82 id="tspan299">w_make_resync_request()</tspan>
83 </text>
84 <text
85 id="text313"
86 style="font-size:318px;font-weight:400;fill:#008000;visibility:visible;font-family:Helvetica embedded">
87 <tspan
88 x="12199 12305 12483 12644 12821 12893 13054 13232 13410 13638 13816 13905 14083 14311 14489 14667 14845 15023 15184 15272 15378"
89 y="7806"
90 id="tspan315">receive_DataRequest()</tspan>
91 </text>
92 <text
93 id="text329"
94 style="font-size:318px;font-weight:400;fill:#008000;visibility:visible;font-family:Helvetica embedded">
95 <tspan
96 x="12199 12377 12483 12660 12838 13016 13194 13372 13549 13621 13799 13977 14083 14261 14438 14616 14794 14955 15133 15294 15399"
97 y="8606"
98 id="tspan331">drbd_endio_read_sec()</tspan>
99 </text>
100 <text
101 id="text345"
102 style="font-size:318px;font-weight:400;fill:#008000;visibility:visible;font-family:Helvetica embedded">
103 <tspan
104 x="12191 12420 12597 12775 12953 13131 13309 13486 13664 13825 13986 14164 14426 14604 14710 14871 15049 15154 15332 15510 15616"
105 y="9007"
106 id="tspan347">w_e_end_csum_rs_req()</tspan>
107 </text>
108 <text
109 id="text361"
110 style="font-size:318px;font-weight:400;fill:#008000;visibility:visible;font-family:Helvetica embedded">
111 <tspan
112 x="4444 4550 4728 4889 5066 5138 5299 5477 5655 5883 6095 6324 6501 6590 6768 6997 7175 7352 7424 7585 7691"
113 y="9507"
114 id="tspan363">receive_RSDataReply()</tspan>
115 </text>
116 <text
117 id="text377"
118 style="font-size:318px;font-weight:400;fill:#008000;visibility:visible;font-family:Helvetica embedded">
119 <tspan
120 x="4457 4635 4741 4918 5096 5274 5452 5630 5807 5879 6057 6235 6464 6569 6641 6730 6908 7086 7247 7425 7585 7691"
121 y="10407"
122 id="tspan379">drbd_endio_write_sec()</tspan>
123 </text>
124 <text
125 id="text393"
126 style="font-size:318px;font-weight:400;fill:#008000;visibility:visible;font-family:Helvetica embedded">
127 <tspan
128 x="4647 4825 5003 5180 5358 5536 5714 5820 5997 6158 6319 6497 6658 6836 7013 7085 7263 7424 7585 7691"
129 y="10907"
130 id="tspan395">e_end_resync_block()</tspan>
131 </text>
132 <path
133 d="M 11999,11601 L 11685,11640 L 11724,11444 L 11999,11601 z"
134 id="path405"
135 style="fill:#000080;visibility:visible" />
136 <path
137 d="M 7999,10801 L 11764,11554"
138 id="path409"
139 style="fill:none;stroke:#000080;visibility:visible" />
140 <g
141 transform="matrix(0.9788674,0.2044961,-0.2044961,0.9788674,2434.7562,-1674.649)"
142 id="g425"
143 style="font-size:318px;font-weight:400;fill:#000080;visibility:visible;font-family:Helvetica embedded">
144 <text
145 id="text427">
146 <tspan
147 x="9320 9621 9726 9798 9887 10065 10277 10438"
148 y="10943"
149 id="tspan429">WriteAck</tspan>
150 </text>
151 </g>
152 <text
153 id="text443"
154 style="font-size:318px;font-weight:400;fill:#000080;visibility:visible;font-family:Helvetica embedded">
155 <tspan
156 x="12199 12377 12555 12644 12821 13033 13105 13283 13444 13604 13816 13977 14138 14244"
157 y="11559"
158 id="tspan445">got_BlockAck()</tspan>
159 </text>
160 <text
161 id="text459"
162 style="font-size:423px;font-weight:400;fill:#000000;visibility:visible;font-family:Helvetica embedded">
163 <tspan
164 x="7999 8304 8541 8778 8990 9201 9413 9650 10001 10120 10357 10594 10806 11043 11280 11398 11703 11940 12152 12364 12601 12812 12931 13049 13261 13498 13710 13947 14065 14302 14540 14658 14777 14870 15107 15225 15437 15649 15886"
165 y="4877"
166 id="tspan461">Checksum based Resync, case not in sync</tspan>
167 </text>
168 <text
169 id="text475"
170 style="font-size:423px;font-weight:400;fill:#000000;visibility:visible;font-family:Helvetica embedded">
171 <tspan
172 x="6961 7266 7571 7854 8159 8299 8536 8654 8891 9010 9247 9484 9603 9840 9958 10077 10170 10407"
173 y="2806"
174 id="tspan477">DRBD-8.3 data flow</tspan>
175 </text>
176 <text
177 id="text491"
178 style="font-size:318px;font-weight:400;fill:#008000;visibility:visible;font-family:Helvetica embedded">
179 <tspan
180 x="5190 5419 5596 5774 5952 6113 6291 6468 6646 6824 6985 7146 7324 7586 7692"
181 y="7005"
182 id="tspan493">w_e_send_csum()</tspan>
183 </text>
184 <path
185 d="M 11999,17601 L 11899,17301 L 12099,17301 L 11999,17601 z"
186 id="path503"
187 style="fill:#008000;visibility:visible" />
188 <path
189 d="M 11999,16801 L 11999,17361"
190 id="path507"
191 style="fill:none;stroke:#008000;visibility:visible" />
192 <path
193 d="M 11999,16801 L 11685,16840 L 11724,16644 L 11999,16801 z"
194 id="path519"
195 style="fill:#008000;visibility:visible" />
196 <path
197 d="M 7999,16001 L 11764,16754"
198 id="path523"
199 style="fill:none;stroke:#008000;visibility:visible" />
200 <g
201 transform="matrix(0.9895258,-0.1443562,0.1443562,0.9895258,-2539.5806,1529.3491)"
202 id="g539"
203 style="font-size:318px;font-weight:400;fill:#000080;visibility:visible;font-family:Helvetica embedded">
204 <text
205 id="text541">
206 <tspan
207 x="9269 9498 9709 9798 9959 10048 10226 10437 10598 10776"
208 y="18265"
209 id="tspan543">RSIsInSync</tspan>
210 </text>
211 </g>
212 <path
213 d="M 7999,18601 L 8281,18458 L 8311,18655 L 7999,18601 z"
214 id="path553"
215 style="fill:#000080;visibility:visible" />
216 <path
217 d="M 11999,18001 L 8236,18565"
218 id="path557"
219 style="fill:none;stroke:#000080;visibility:visible" />
220 <g
221 transform="matrix(0.9788674,0.2044961,-0.2044961,0.9788674,3461.4027,-1449.3012)"
222 id="g573"
223 style="font-size:318px;font-weight:400;fill:#008000;visibility:visible;font-family:Helvetica embedded">
224 <text
225 id="text575">
226 <tspan
227 x="8743 8972 9132 9310 9573 9801 10013 10242 10419 10597 10775 10953 11114"
228 y="16023"
229 id="tspan577">CsumRSRequest</tspan>
230 </text>
231 </g>
232 <text
233 id="text591"
234 style="font-size:318px;font-weight:400;fill:#008000;visibility:visible;font-family:Helvetica embedded">
235 <tspan
236 x="12199 12305 12483 12644 12821 12893 13054 13232 13410 13638 13816 13905 14083 14311 14489 14667 14845 15023 15184 15272 15378"
237 y="16806"
238 id="tspan593">receive_DataRequest()</tspan>
239 </text>
240 <text
241 id="text607"
242 style="font-size:318px;font-weight:400;fill:#008000;visibility:visible;font-family:Helvetica embedded">
243 <tspan
244 x="12199 12377 12483 12660 12838 13016 13194 13372 13549 13621 13799 13977 14083 14261 14438 14616 14794 14955 15133 15294 15399"
245 y="17606"
246 id="tspan609">drbd_endio_read_sec()</tspan>
247 </text>
248 <text
249 id="text623"
250 style="font-size:318px;font-weight:400;fill:#008000;visibility:visible;font-family:Helvetica embedded">
251 <tspan
252 x="12191 12420 12597 12775 12953 13131 13309 13486 13664 13825 13986 14164 14426 14604 14710 14871 15049 15154 15332 15510 15616"
253 y="18007"
254 id="tspan625">w_e_end_csum_rs_req()</tspan>
255 </text>
256 <text
257 id="text639"
258 style="font-size:318px;font-weight:400;fill:#000080;visibility:visible;font-family:Helvetica embedded">
259 <tspan
260 x="5735 5913 6091 6180 6357 6446 6607 6696 6874 7085 7246 7424 7585 7691"
261 y="18507"
262 id="tspan641">got_IsInSync()</tspan>
263 </text>
264 <text
265 id="text655"
266 style="font-size:423px;font-weight:400;fill:#000000;visibility:visible;font-family:Helvetica embedded">
267 <tspan
268 x="7999 8304 8541 8778 8990 9201 9413 9650 10001 10120 10357 10594 10806 11043 11280 11398 11703 11940 12152 12364 12601 12812 12931 13049 13261 13498 13710 13947 14065 14159 14396 14514 14726 14937 15175"
269 y="13877"
270 id="tspan657">Checksum based Resync, case in sync</tspan>
271 </text>
272 <path
273 d="M 12000,24601 L 11900,24301 L 12100,24301 L 12000,24601 z"
274 id="path667"
275 style="fill:#008000;visibility:visible" />
276 <path
277 d="M 12000,23801 L 12000,24361"
278 id="path671"
279 style="fill:none;stroke:#008000;visibility:visible" />
280 <path
281 d="M 8000,26401 L 7900,26101 L 8100,26101 L 8000,26401 z"
282 id="path683"
283 style="fill:#008000;visibility:visible" />
284 <path
285 d="M 8000,25601 L 8000,26161"
286 id="path687"
287 style="fill:none;stroke:#008000;visibility:visible" />
288 <path
289 d="M 12000,23801 L 11686,23840 L 11725,23644 L 12000,23801 z"
290 id="path699"
291 style="fill:#008000;visibility:visible" />
292 <path
293 d="M 8000,23001 L 11765,23754"
294 id="path703"
295 style="fill:none;stroke:#008000;visibility:visible" />
296 <g
297 transform="matrix(0.9895258,-0.1443562,0.1443562,0.9895258,-3543.8452,1630.5143)"
298 id="g719"
299 style="font-size:318px;font-weight:400;fill:#008000;visibility:visible;font-family:Helvetica embedded">
300 <text
301 id="text721">
302 <tspan
303 x="9464 9710 9921 10150 10328 10505 10577"
304 y="25236"
305 id="tspan723">OVReply</tspan>
306 </text>
307 </g>
308 <path
309 d="M 8000,25601 L 8282,25458 L 8312,25655 L 8000,25601 z"
310 id="path733"
311 style="fill:#008000;visibility:visible" />
312 <path
313 d="M 12000,25001 L 8237,25565"
314 id="path737"
315 style="fill:none;stroke:#008000;visibility:visible" />
316 <g
317 transform="matrix(0.9788674,0.2044961,-0.2044961,0.9788674,4918.2801,-1381.2128)"
318 id="g753"
319 style="font-size:318px;font-weight:400;fill:#008000;visibility:visible;font-family:Helvetica embedded">
320 <text
321 id="text755">
322 <tspan
323 x="9142 9388 9599 9828 10006 10183 10361 10539 10700"
324 y="23106"
325 id="tspan757">OVRequest</tspan>
326 </text>
327 </g>
328 <text
329 id="text771"
330 style="font-size:318px;font-weight:400;fill:#008000;visibility:visible;font-family:Helvetica embedded">
331 <tspan
332 x="12200 12306 12484 12645 12822 12894 13055 13233 13411 13656 13868 14097 14274 14452 14630 14808 14969 15058 15163"
333 y="23806"
334 id="tspan773">receive_OVRequest()</tspan>
335 </text>
336 <text
337 id="text787"
338 style="font-size:318px;font-weight:400;fill:#008000;visibility:visible;font-family:Helvetica embedded">
339 <tspan
340 x="12200 12378 12484 12661 12839 13017 13195 13373 13550 13622 13800 13978 14084 14262 14439 14617 14795 14956 15134 15295 15400"
341 y="24606"
342 id="tspan789">drbd_endio_read_sec()</tspan>
343 </text>
344 <text
345 id="text803"
346 style="font-size:318px;font-weight:400;fill:#008000;visibility:visible;font-family:Helvetica embedded">
347 <tspan
348 x="12192 12421 12598 12776 12954 13132 13310 13487 13665 13843 14004 14182 14288 14465 14643 14749"
349 y="25007"
350 id="tspan805">w_e_end_ov_req()</tspan>
351 </text>
352 <text
353 id="text819"
354 style="font-size:318px;font-weight:400;fill:#008000;visibility:visible;font-family:Helvetica embedded">
355 <tspan
356 x="5101 5207 5385 5546 5723 5795 5956 6134 6312 6557 6769 6998 7175 7353 7425 7586 7692"
357 y="25507"
358 id="tspan821">receive_OVReply()</tspan>
359 </text>
360 <text
361 id="text835"
362 style="font-size:318px;font-weight:400;fill:#008000;visibility:visible;font-family:Helvetica embedded">
363 <tspan
364 x="4492 4670 4776 4953 5131 5309 5487 5665 5842 5914 6092 6270 6376 6554 6731 6909 7087 7248 7426 7587 7692"
365 y="26407"
366 id="tspan837">drbd_endio_read_sec()</tspan>
367 </text>
368 <text
369 id="text851"
370 style="font-size:318px;font-weight:400;fill:#008000;visibility:visible;font-family:Helvetica embedded">
371 <tspan
372 x="4902 5131 5308 5486 5664 5842 6020 6197 6375 6553 6714 6892 6998 7175 7353 7425 7586 7692"
373 y="26907"
374 id="tspan853">w_e_end_ov_reply()</tspan>
375 </text>
376 <path
377 d="M 12000,27601 L 11686,27640 L 11725,27444 L 12000,27601 z"
378 id="path863"
379 style="fill:#000080;visibility:visible" />
380 <path
381 d="M 8000,26801 L 11765,27554"
382 id="path867"
383 style="fill:none;stroke:#000080;visibility:visible" />
384 <g
385 transform="matrix(0.9788674,0.2044961,-0.2044961,0.9788674,5704.1907,-1328.312)"
386 id="g883"
387 style="font-size:318px;font-weight:400;fill:#000080;visibility:visible;font-family:Helvetica embedded">
388 <text
389 id="text885">
390 <tspan
391 x="9279 9525 9736 9965 10143 10303 10481 10553"
392 y="26935"
393 id="tspan887">OVResult</tspan>
394 </text>
395 </g>
396 <text
397 id="text901"
398 style="font-size:318px;font-weight:400;fill:#000080;visibility:visible;font-family:Helvetica embedded">
399 <tspan
400 x="12200 12378 12556 12645 12822 13068 13280 13508 13686 13847 14025 14097 14185 14291"
401 y="27559"
402 id="tspan903">got_OVResult()</tspan>
403 </text>
404 <text
405 id="text917"
406 style="font-size:423px;font-weight:400;fill:#000000;visibility:visible;font-family:Helvetica embedded">
407 <tspan
408 x="8000 8330 8567 8660 8754 8991 9228 9346 9558 9795 9935 10028 10146"
409 y="21877"
410 id="tspan919">Online verify</tspan>
411 </text>
412 <text
413 id="text933"
414 style="font-size:318px;font-weight:400;fill:#008000;visibility:visible;font-family:Helvetica embedded">
415 <tspan
416 x="4641 4870 5047 5310 5488 5649 5826 6004 6182 6343 6521 6626 6804 6982 7160 7338 7499 7587 7693"
417 y="23005"
418 id="tspan935">w_make_ov_request()</tspan>
419 </text>
420 <path
421 d="M 8000,6500 L 7900,6200 L 8100,6200 L 8000,6500 z"
422 id="path945"
423 style="fill:#008000;visibility:visible" />
424 <path
425 d="M 8000,5700 L 8000,6260"
426 id="path949"
427 style="fill:none;stroke:#008000;visibility:visible" />
428 <path
429 d="M 3900,5500 L 3700,5500 L 3700,11000 L 3900,11000"
430 id="path961"
431 style="fill:none;stroke:#000000;visibility:visible" />
432 <path
433 d="M 3900,14500 L 3700,14500 L 3700,18600 L 3900,18600"
434 id="path973"
435 style="fill:none;stroke:#000000;visibility:visible" />
436 <path
437 d="M 3900,22800 L 3700,22800 L 3700,26900 L 3900,26900"
438 id="path985"
439 style="fill:none;stroke:#000000;visibility:visible" />
440 <text
441 id="text1001"
442 style="font-size:318px;font-weight:400;fill:#008000;visibility:visible;font-family:Helvetica embedded">
443 <tspan
444 x="4492 4670 4776 4953 5131 5309 5487 5665 5842 5914 6092 6270 6376 6554 6731 6909 7087 7248 7426 7587 7692"
445 y="6506"
446 id="tspan1003">drbd_endio_read_sec()</tspan>
447 </text>
448 <text
449 id="text1017"
450 style="font-size:318px;font-weight:400;fill:#008000;visibility:visible;font-family:Helvetica embedded">
451 <tspan
452 x="4034 4263 4440 4703 4881 5042 5219 5397 5503 5681 5842 6003 6180 6341 6519 6625 6803 6980 7158 7336 7497 7586 7692"
453 y="14708"
454 id="tspan1019">w_make_resync_request()</tspan>
455 </text>
456 <text
457 id="text1033"
458 style="font-size:318px;font-weight:400;fill:#008000;visibility:visible;font-family:Helvetica embedded">
459 <tspan
460 x="5190 5419 5596 5774 5952 6113 6291 6468 6646 6824 6985 7146 7324 7586 7692"
461 y="16006"
462 id="tspan1035">w_e_send_csum()</tspan>
463 </text>
464 <path
465 d="M 8000,15501 L 7900,15201 L 8100,15201 L 8000,15501 z"
466 id="path1045"
467 style="fill:#008000;visibility:visible" />
468 <path
469 d="M 8000,14701 L 8000,15261"
470 id="path1049"
471 style="fill:none;stroke:#008000;visibility:visible" />
472 <text
473 id="text1065"
474 style="font-size:318px;font-weight:400;fill:#008000;visibility:visible;font-family:Helvetica embedded">
475 <tspan
476 x="4492 4670 4776 4953 5131 5309 5487 5665 5842 5914 6092 6270 6376 6554 6731 6909 7087 7248 7426 7587 7692"
477 y="15507"
478 id="tspan1067">drbd_endio_read_sec()</tspan>
479 </text>
480 <path
481 d="M 16100,9000 L 16300,9000 L 16300,7500 L 16100,7500"
482 id="path1077"
483 style="fill:none;stroke:#000000;visibility:visible" />
484 <path
485 d="M 16100,18000 L 16300,18000 L 16300,16500 L 16100,16500"
486 id="path1089"
487 style="fill:none;stroke:#000000;visibility:visible" />
488 <path
489 d="M 16100,25000 L 16300,25000 L 16300,23500 L 16100,23500"
490 id="path1101"
491 style="fill:none;stroke:#000000;visibility:visible" />
492 <text
493 id="text1117"
494 style="font-size:318px;font-weight:400;fill:#000000;visibility:visible;font-family:Helvetica embedded">
495 <tspan
496 x="2026 2132 2293 2471 2648 2826 3004 3076 3254 3431 3503 3681 3787"
497 y="5402"
498 id="tspan1119">rs_begin_io()</tspan>
499 </text>
500 <text
501 id="text1133"
502 style="font-size:318px;font-weight:400;fill:#000000;visibility:visible;font-family:Helvetica embedded">
503 <tspan
504 x="2027 2133 2294 2472 2649 2827 3005 3077 3255 3432 3504 3682 3788"
505 y="14402"
506 id="tspan1135">rs_begin_io()</tspan>
507 </text>
508 <text
509 id="text1149"
510 style="font-size:318px;font-weight:400;fill:#000000;visibility:visible;font-family:Helvetica embedded">
511 <tspan
512 x="2026 2132 2293 2471 2648 2826 3004 3076 3254 3431 3503 3681 3787"
513 y="22602"
514 id="tspan1151">rs_begin_io()</tspan>
515 </text>
516 <text
517 id="text1165"
518 style="font-size:318px;font-weight:400;fill:#000000;visibility:visible;font-family:Helvetica embedded">
519 <tspan
520 x="1426 1532 1693 1871 2031 2209 2472 2649 2721 2899 2988 3166 3344 3416 3593 3699"
521 y="11302"
522 id="tspan1167">rs_complete_io()</tspan>
523 </text>
524 <text
525 id="text1181"
526 style="font-size:318px;font-weight:400;fill:#000000;visibility:visible;font-family:Helvetica embedded">
527 <tspan
528 x="1526 1632 1793 1971 2131 2309 2572 2749 2821 2999 3088 3266 3444 3516 3693 3799"
529 y="18931"
530 id="tspan1183">rs_complete_io()</tspan>
531 </text>
532 <text
533 id="text1197"
534 style="font-size:318px;font-weight:400;fill:#000000;visibility:visible;font-family:Helvetica embedded">
535 <tspan
536 x="1526 1632 1793 1971 2131 2309 2572 2749 2821 2999 3088 3266 3444 3516 3693 3799"
537 y="27231"
538 id="tspan1199">rs_complete_io()</tspan>
539 </text>
540 <text
541 id="text1213"
542 style="font-size:318px;font-weight:400;fill:#000000;visibility:visible;font-family:Helvetica embedded">
543 <tspan
544 x="16126 16232 16393 16571 16748 16926 17104 17176 17354 17531 17603 17781 17887"
545 y="7402"
546 id="tspan1215">rs_begin_io()</tspan>
547 </text>
548 <text
549 id="text1229"
550 style="font-size:318px;font-weight:400;fill:#000000;visibility:visible;font-family:Helvetica embedded">
551 <tspan
552 x="16127 16233 16394 16572 16749 16927 17105 17177 17355 17532 17604 17782 17888"
553 y="16331"
554 id="tspan1231">rs_begin_io()</tspan>
555 </text>
556 <text
557 id="text1245"
558 style="font-size:318px;font-weight:400;fill:#000000;visibility:visible;font-family:Helvetica embedded">
559 <tspan
560 x="16127 16233 16394 16572 16749 16927 17105 17177 17355 17532 17604 17782 17888"
561 y="23302"
562 id="tspan1247">rs_begin_io()</tspan>
563 </text>
564 <text
565 id="text1261"
566 style="font-size:318px;font-weight:400;fill:#000000;visibility:visible;font-family:Helvetica embedded">
567 <tspan
568 x="16115 16221 16382 16560 16720 16898 17161 17338 17410 17588 17677 17855 18033 18105 18282 18388"
569 y="9302"
570 id="tspan1263">rs_complete_io()</tspan>
571 </text>
572 <text
573 id="text1277"
574 style="font-size:318px;font-weight:400;fill:#000000;visibility:visible;font-family:Helvetica embedded">
575 <tspan
576 x="16115 16221 16382 16560 16720 16898 17161 17338 17410 17588 17677 17855 18033 18105 18282 18388"
577 y="18331"
578 id="tspan1279">rs_complete_io()</tspan>
579 </text>
580 <text
581 id="text1293"
582 style="font-size:318px;font-weight:400;fill:#000000;visibility:visible;font-family:Helvetica embedded">
583 <tspan
584 x="16126 16232 16393 16571 16731 16909 17172 17349 17421 17599 17688 17866 18044 18116 18293 18399"
585 y="25302"
586 id="tspan1295">rs_complete_io()</tspan>
587 </text>
588</svg>
diff --git a/Documentation/blockdev/drbd/DRBD-data-packets.svg b/Documentation/blockdev/drbd/DRBD-data-packets.svg
new file mode 100644
index 000000000000..48a1e2165fec
--- /dev/null
+++ b/Documentation/blockdev/drbd/DRBD-data-packets.svg
@@ -0,0 +1,459 @@
1<?xml version="1.0" encoding="UTF-8" standalone="no"?>
2<!-- Created with Inkscape (http://www.inkscape.org/) -->
3<svg
4 xmlns:svg="http://www.w3.org/2000/svg"
5 xmlns="http://www.w3.org/2000/svg"
6 version="1.0"
7 width="210mm"
8 height="297mm"
9 viewBox="0 0 21000 29700"
10 id="svg2"
11 style="fill-rule:evenodd">
12 <defs
13 id="defs4" />
14 <g
15 id="Default"
16 style="visibility:visible">
17 <desc
18 id="desc176">Master slide</desc>
19 </g>
20 <path
21 d="M 11999,19601 L 11899,19301 L 12099,19301 L 11999,19601 z"
22 id="path189"
23 style="fill:#008000;visibility:visible" />
24 <path
25 d="M 11999,18801 L 11999,19361"
26 id="path193"
27 style="fill:none;stroke:#008000;visibility:visible" />
28 <path
29 d="M 7999,21401 L 7899,21101 L 8099,21101 L 7999,21401 z"
30 id="path205"
31 style="fill:#008000;visibility:visible" />
32 <path
33 d="M 7999,20601 L 7999,21161"
34 id="path209"
35 style="fill:none;stroke:#008000;visibility:visible" />
36 <path
37 d="M 11999,18801 L 11685,18840 L 11724,18644 L 11999,18801 z"
38 id="path221"
39 style="fill:#008000;visibility:visible" />
40 <path
41 d="M 7999,18001 L 11764,18754"
42 id="path225"
43 style="fill:none;stroke:#008000;visibility:visible" />
44 <text
45 x="-3023.845"
46 y="1106.8124"
47 transform="matrix(0.9895258,-0.1443562,0.1443562,0.9895258,0,0)"
48 id="text243"
49 style="font-size:318px;font-weight:400;fill:#008000;visibility:visible;font-family:Helvetica embedded">
50 <tspan
51 x="6115.1553 6344.1553 6555.1553 6784.1553 6962.1553 7051.1553 7228.1553 7457.1553 7635.1553 7813.1553 7885.1553"
52 y="21390.812"
53 id="tspan245">RSDataReply</tspan>
54 </text>
55 <path
56 d="M 7999,20601 L 8281,20458 L 8311,20655 L 7999,20601 z"
57 id="path255"
58 style="fill:#008000;visibility:visible" />
59 <path
60 d="M 11999,20001 L 8236,20565"
61 id="path259"
62 style="fill:none;stroke:#008000;visibility:visible" />
63 <text
64 x="3502.5356"
65 y="-2184.6621"
66 transform="matrix(0.9788674,0.2044961,-0.2044961,0.9788674,0,0)"
67 id="text277"
68 style="font-size:318px;font-weight:400;fill:#008000;visibility:visible;font-family:Helvetica embedded">
69 <tspan
70 x="12321.536 12550.536 12761.536 12990.536 13168.536 13257.536 13434.536 13663.536 13841.536 14019.536 14196.536 14374.536 14535.536"
71 y="15854.338"
72 id="tspan279">RSDataRequest</tspan>
73 </text>
74 <text
75 id="text293"
76 style="font-size:318px;font-weight:400;fill:#008000;visibility:visible;font-family:Helvetica embedded">
77 <tspan
78 x="4034 4263 4440 4703 4881 5042 5219 5397 5503 5681 5842 6003 6180 6341 6519 6625 6803 6980 7158 7336 7497 7586 7692"
79 y="17807"
80 id="tspan295">w_make_resync_request()</tspan>
81 </text>
82 <text
83 id="text309"
84 style="font-size:318px;font-weight:400;fill:#008000;visibility:visible;font-family:Helvetica embedded">
85 <tspan
86 x="12199 12305 12483 12644 12821 12893 13054 13232 13410 13638 13816 13905 14083 14311 14489 14667 14845 15023 15184 15272 15378"
87 y="18806"
88 id="tspan311">receive_DataRequest()</tspan>
89 </text>
90 <text
91 id="text325"
92 style="font-size:318px;font-weight:400;fill:#008000;visibility:visible;font-family:Helvetica embedded">
93 <tspan
94 x="12199 12377 12483 12660 12838 13016 13194 13372 13549 13621 13799 13977 14083 14261 14438 14616 14794 14955 15133 15294 15399"
95 y="19606"
96 id="tspan327">drbd_endio_read_sec()</tspan>
97 </text>
98 <text
99 id="text341"
100 style="font-size:318px;font-weight:400;fill:#008000;visibility:visible;font-family:Helvetica embedded">
101 <tspan
102 x="12191 12420 12597 12775 12953 13131 13309 13486 13664 13770 13931 14109 14287 14375 14553 14731 14837 15015 15192 15298"
103 y="20007"
104 id="tspan343">w_e_end_rsdata_req()</tspan>
105 </text>
106 <text
107 id="text357"
108 style="font-size:318px;font-weight:400;fill:#008000;visibility:visible;font-family:Helvetica embedded">
109 <tspan
110 x="4444 4550 4728 4889 5066 5138 5299 5477 5655 5883 6095 6324 6501 6590 6768 6997 7175 7352 7424 7585 7691"
111 y="20507"
112 id="tspan359">receive_RSDataReply()</tspan>
113 </text>
114 <text
115 id="text373"
116 style="font-size:318px;font-weight:400;fill:#008000;visibility:visible;font-family:Helvetica embedded">
117 <tspan
118 x="4457 4635 4741 4918 5096 5274 5452 5630 5807 5879 6057 6235 6464 6569 6641 6730 6908 7086 7247 7425 7585 7691"
119 y="21407"
120 id="tspan375">drbd_endio_write_sec()</tspan>
121 </text>
122 <text
123 id="text389"
124 style="font-size:318px;font-weight:400;fill:#008000;visibility:visible;font-family:Helvetica embedded">
125 <tspan
126 x="4647 4825 5003 5180 5358 5536 5714 5820 5997 6158 6319 6497 6658 6836 7013 7085 7263 7424 7585 7691"
127 y="21907"
128 id="tspan391">e_end_resync_block()</tspan>
129 </text>
130 <path
131 d="M 11999,22601 L 11685,22640 L 11724,22444 L 11999,22601 z"
132 id="path401"
133 style="fill:#000080;visibility:visible" />
134 <path
135 d="M 7999,21801 L 11764,22554"
136 id="path405"
137 style="fill:none;stroke:#000080;visibility:visible" />
138 <text
139 x="4290.3008"
140 y="-2369.6162"
141 transform="matrix(0.9788674,0.2044961,-0.2044961,0.9788674,0,0)"
142 id="text423"
143 style="font-size:318px;font-weight:400;fill:#000080;visibility:visible;font-family:Helvetica embedded">
144 <tspan
145 x="13610.301 13911.301 14016.301 14088.301 14177.301 14355.301 14567.301 14728.301"
146 y="19573.385"
147 id="tspan425">WriteAck</tspan>
148 </text>
149 <text
150 id="text439"
151 style="font-size:318px;font-weight:400;fill:#000080;visibility:visible;font-family:Helvetica embedded">
152 <tspan
153 x="12199 12377 12555 12644 12821 13033 13105 13283 13444 13604 13816 13977 14138 14244"
154 y="22559"
155 id="tspan441">got_BlockAck()</tspan>
156 </text>
157 <text
158 id="text455"
159 style="font-size:423px;font-weight:400;fill:#000000;visibility:visible;font-family:Helvetica embedded">
160 <tspan
161 x="7999 8304 8541 8753 8964 9201 9413 9531 9769 9862 10099 10310 10522 10734 10852 10971 11208 11348 11585 11822"
162 y="16877"
163 id="tspan457">Resync blocks, 4-32K</tspan>
164 </text>
165 <path
166 d="M 12000,7601 L 11900,7301 L 12100,7301 L 12000,7601 z"
167 id="path467"
168 style="fill:#008000;visibility:visible" />
169 <path
170 d="M 12000,6801 L 12000,7361"
171 id="path471"
172 style="fill:none;stroke:#008000;visibility:visible" />
173 <path
174 d="M 12000,6801 L 11686,6840 L 11725,6644 L 12000,6801 z"
175 id="path483"
176 style="fill:#008000;visibility:visible" />
177 <path
178 d="M 8000,6001 L 11765,6754"
179 id="path487"
180 style="fill:none;stroke:#008000;visibility:visible" />
181 <text
182 x="-1288.1796"
183 y="1279.7666"
184 transform="matrix(0.9895258,-0.1443562,0.1443562,0.9895258,0,0)"
185 id="text505"
186 style="font-size:318px;font-weight:400;fill:#000080;visibility:visible;font-family:Helvetica embedded">
187 <tspan
188 x="8174.8208 8475.8203 8580.8203 8652.8203 8741.8203 8919.8203 9131.8203 9292.8203"
189 y="9516.7666"
190 id="tspan507">WriteAck</tspan>
191 </text>
192 <path
193 d="M 8000,8601 L 8282,8458 L 8312,8655 L 8000,8601 z"
194 id="path517"
195 style="fill:#000080;visibility:visible" />
196 <path
197 d="M 12000,8001 L 8237,8565"
198 id="path521"
199 style="fill:none;stroke:#000080;visibility:visible" />
200 <text
201 x="1065.6655"
202 y="-2097.7664"
203 transform="matrix(0.9788674,0.2044961,-0.2044961,0.9788674,0,0)"
204 id="text539"
205 style="font-size:318px;font-weight:400;fill:#008000;visibility:visible;font-family:Helvetica embedded">
206 <tspan
207 x="10682.666 10911.666 11088.666 11177.666"
208 y="4107.2339"
209 id="tspan541">Data</tspan>
210 </text>
211 <text
212 id="text555"
213 style="font-size:318px;font-weight:400;fill:#008000;visibility:visible;font-family:Helvetica embedded">
214 <tspan
215 x="4746 4924 5030 5207 5385 5563 5826 6003 6164 6342 6520 6626 6803 6981 7159 7337 7498 7587 7692"
216 y="5505"
217 id="tspan557">drbd_make_request()</tspan>
218 </text>
219 <text
220 id="text571"
221 style="font-size:318px;font-weight:400;fill:#008000;visibility:visible;font-family:Helvetica embedded">
222 <tspan
223 x="12200 12306 12484 12645 12822 12894 13055 13233 13411 13639 13817 13906 14084 14190"
224 y="6806"
225 id="tspan573">receive_Data()</tspan>
226 </text>
227 <text
228 id="text587"
229 style="font-size:318px;font-weight:400;fill:#008000;visibility:visible;font-family:Helvetica embedded">
230 <tspan
231 x="12200 12378 12484 12661 12839 13017 13195 13373 13550 13622 13800 13978 14207 14312 14384 14473 14651 14829 14990 15168 15328 15434"
232 y="7606"
233 id="tspan589">drbd_endio_write_sec()</tspan>
234 </text>
235 <text
236 id="text603"
237 style="font-size:318px;font-weight:400;fill:#008000;visibility:visible;font-family:Helvetica embedded">
238 <tspan
239 x="12192 12370 12548 12725 12903 13081 13259 13437 13509 13686 13847 14008 14114"
240 y="8007"
241 id="tspan605">e_end_block()</tspan>
242 </text>
243 <text
244 id="text619"
245 style="font-size:318px;font-weight:400;fill:#000080;visibility:visible;font-family:Helvetica embedded">
246 <tspan
247 x="5647 5825 6003 6092 6269 6481 6553 6731 6892 7052 7264 7425 7586 7692"
248 y="8606"
249 id="tspan621">got_BlockAck()</tspan>
250 </text>
251 <text
252 id="text635"
253 style="font-size:423px;font-weight:400;fill:#000000;visibility:visible;font-family:Helvetica embedded">
254 <tspan
255 x="8000 8305 8542 8779 9016 9109 9346 9486 9604 9956 10049 10189 10328 10565 10705 10942 11179 11298 11603 11742 11835 11954 12191 12310 12428 12665 12902 13139 13279 13516 13753"
256 y="4877"
257 id="tspan637">Regular mirrored write, 512-32K</tspan>
258 </text>
259 <text
260 id="text651"
261 style="font-size:318px;font-weight:400;fill:#008000;visibility:visible;font-family:Helvetica embedded">
262 <tspan
263 x="5381 5610 5787 5948 6126 6304 6482 6659 6837 7015 7087 7265 7426 7587 7692"
264 y="6003"
265 id="tspan653">w_send_dblock()</tspan>
266 </text>
267 <path
268 d="M 8000,6800 L 7900,6500 L 8100,6500 L 8000,6800 z"
269 id="path663"
270 style="fill:#008000;visibility:visible" />
271 <path
272 d="M 8000,6000 L 8000,6560"
273 id="path667"
274 style="fill:none;stroke:#008000;visibility:visible" />
275 <text
276 id="text683"
277 style="font-size:318px;font-weight:400;fill:#008000;visibility:visible;font-family:Helvetica embedded">
278 <tspan
279 x="4602 4780 4886 5063 5241 5419 5597 5775 5952 6024 6202 6380 6609 6714 6786 6875 7053 7231 7409 7515 7587 7692"
280 y="6905"
281 id="tspan685">drbd_endio_write_pri()</tspan>
282 </text>
283 <path
284 d="M 12000,13602 L 11900,13302 L 12100,13302 L 12000,13602 z"
285 id="path695"
286 style="fill:#008000;visibility:visible" />
287 <path
288 d="M 12000,12802 L 12000,13362"
289 id="path699"
290 style="fill:none;stroke:#008000;visibility:visible" />
291 <path
292 d="M 12000,12802 L 11686,12841 L 11725,12645 L 12000,12802 z"
293 id="path711"
294 style="fill:#008000;visibility:visible" />
295 <path
296 d="M 8000,12002 L 11765,12755"
297 id="path715"
298 style="fill:none;stroke:#008000;visibility:visible" />
299 <text
300 x="-2155.5266"
301 y="1201.5964"
302 transform="matrix(0.9895258,-0.1443562,0.1443562,0.9895258,0,0)"
303 id="text733"
304 style="font-size:318px;font-weight:400;fill:#008000;visibility:visible;font-family:Helvetica embedded">
305 <tspan
306 x="7202.4736 7431.4736 7608.4736 7697.4736 7875.4736 8104.4736 8282.4736 8459.4736 8531.4736"
307 y="15454.597"
308 id="tspan735">DataReply</tspan>
309 </text>
310 <path
311 d="M 8000,14602 L 8282,14459 L 8312,14656 L 8000,14602 z"
312 id="path745"
313 style="fill:#008000;visibility:visible" />
314 <path
315 d="M 12000,14002 L 8237,14566"
316 id="path749"
317 style="fill:none;stroke:#008000;visibility:visible" />
318 <text
319 x="2280.3804"
320 y="-2103.2141"
321 transform="matrix(0.9788674,0.2044961,-0.2044961,0.9788674,0,0)"
322 id="text767"
323 style="font-size:318px;font-weight:400;fill:#008000;visibility:visible;font-family:Helvetica embedded">
324 <tspan
325 x="11316.381 11545.381 11722.381 11811.381 11989.381 12218.381 12396.381 12573.381 12751.381 12929.381 13090.381"
326 y="9981.7861"
327 id="tspan769">DataRequest</tspan>
328 </text>
329 <text
330 id="text783"
331 style="font-size:318px;font-weight:400;fill:#008000;visibility:visible;font-family:Helvetica embedded">
332 <tspan
333 x="4746 4924 5030 5207 5385 5563 5826 6003 6164 6342 6520 6626 6803 6981 7159 7337 7498 7587 7692"
334 y="11506"
335 id="tspan785">drbd_make_request()</tspan>
336 </text>
337 <text
338 id="text799"
339 style="font-size:318px;font-weight:400;fill:#008000;visibility:visible;font-family:Helvetica embedded">
340 <tspan
341 x="12200 12306 12484 12645 12822 12894 13055 13233 13411 13639 13817 13906 14084 14312 14490 14668 14846 15024 15185 15273 15379"
342 y="12807"
343 id="tspan801">receive_DataRequest()</tspan>
344 </text>
345 <text
346 id="text815"
347 style="font-size:318px;font-weight:400;fill:#008000;visibility:visible;font-family:Helvetica embedded">
348 <tspan
349 x="12200 12378 12484 12661 12839 13017 13195 13373 13550 13622 13800 13978 14084 14262 14439 14617 14795 14956 15134 15295 15400"
350 y="13607"
351 id="tspan817">drbd_endio_read_sec()</tspan>
352 </text>
353 <text
354 id="text831"
355 style="font-size:318px;font-weight:400;fill:#008000;visibility:visible;font-family:Helvetica embedded">
356 <tspan
357 x="12192 12421 12598 12776 12954 13132 13310 13487 13665 13843 14021 14110 14288 14465 14571 14749 14927 15033"
358 y="14008"
359 id="tspan833">w_e_end_data_req()</tspan>
360 </text>
361 <g
362 id="g835"
363 style="visibility:visible">
364 <desc
365 id="desc837">Drawing</desc>
366 <text
367 id="text847"
368 style="font-size:318px;font-weight:400;fill:#008000;font-family:Helvetica embedded">
369 <tspan
370 x="4885 4991 5169 5330 5507 5579 5740 5918 6096 6324 6502 6591 6769 6997 7175 7353 7425 7586 7692"
371 y="14607"
372 id="tspan849">receive_DataReply()</tspan>
373 </text>
374 </g>
375 <text
376 id="text863"
377 style="font-size:423px;font-weight:400;fill:#000000;visibility:visible;font-family:Helvetica embedded">
378 <tspan
379 x="8000 8305 8398 8610 8821 8914 9151 9363 9575 9693 9833 10070 10307 10544 10663 10781 11018 11255 11493 11632 11869 12106"
380 y="10878"
381 id="tspan865">Diskless read, 512-32K</tspan>
382 </text>
383 <text
384 id="text879"
385 style="font-size:318px;font-weight:400;fill:#008000;visibility:visible;font-family:Helvetica embedded">
386 <tspan
387 x="5029 5258 5435 5596 5774 5952 6130 6307 6413 6591 6769 6947 7125 7230 7408 7586 7692"
388 y="12004"
389 id="tspan881">w_send_read_req()</tspan>
390 </text>
391 <text
392 id="text895"
393 style="font-size:423px;font-weight:400;fill:#000000;visibility:visible;font-family:Helvetica embedded">
394 <tspan
395 x="6961 7266 7571 7854 8159 8278 8515 8633 8870 9107 9226 9463 9581 9700 9793 10030"
396 y="2806"
397 id="tspan897">DRBD 8 data flow</tspan>
398 </text>
399 <path
400 d="M 3900,5300 L 3700,5300 L 3700,7000 L 3900,7000"
401 id="path907"
402 style="fill:none;stroke:#000000;visibility:visible" />
403 <path
404 d="M 3900,17600 L 3700,17600 L 3700,22000 L 3900,22000"
405 id="path919"
406 style="fill:none;stroke:#000000;visibility:visible" />
407 <path
408 d="M 16100,20000 L 16300,20000 L 16300,18500 L 16100,18500"
409 id="path931"
410 style="fill:none;stroke:#000000;visibility:visible" />
411 <text
412 id="text947"
413 style="font-size:318px;font-weight:400;fill:#000000;visibility:visible;font-family:Helvetica embedded">
414 <tspan
415 x="2126 2304 2376 2554 2731 2909 3087 3159 3337 3515 3587 3764 3870"
416 y="5202"
417 id="tspan949">al_begin_io()</tspan>
418 </text>
419 <text
420 id="text963"
421 style="font-size:318px;font-weight:400;fill:#000000;visibility:visible;font-family:Helvetica embedded">
422 <tspan
423 x="1632 1810 1882 2060 2220 2398 2661 2839 2910 3088 3177 3355 3533 3605 3783 3888"
424 y="7331"
425 id="tspan965">al_complete_io()</tspan>
426 </text>
427 <text
428 id="text979"
429 style="font-size:318px;font-weight:400;fill:#000000;visibility:visible;font-family:Helvetica embedded">
430 <tspan
431 x="2126 2232 2393 2571 2748 2926 3104 3176 3354 3531 3603 3781 3887"
432 y="17431"
433 id="tspan981">rs_begin_io()</tspan>
434 </text>
435 <text
436 id="text995"
437 style="font-size:318px;font-weight:400;fill:#000000;visibility:visible;font-family:Helvetica embedded">
438 <tspan
439 x="1626 1732 1893 2071 2231 2409 2672 2849 2921 3099 3188 3366 3544 3616 3793 3899"
440 y="22331"
441 id="tspan997">rs_complete_io()</tspan>
442 </text>
443 <text
444 id="text1011"
445 style="font-size:318px;font-weight:400;fill:#000000;visibility:visible;font-family:Helvetica embedded">
446 <tspan
447 x="16027 16133 16294 16472 16649 16827 17005 17077 17255 17432 17504 17682 17788"
448 y="18402"
449 id="tspan1013">rs_begin_io()</tspan>
450 </text>
451 <text
452 id="text1027"
453 style="font-size:318px;font-weight:400;fill:#000000;visibility:visible;font-family:Helvetica embedded">
454 <tspan
455 x="16115 16221 16382 16560 16720 16898 17161 17338 17410 17588 17677 17855 18033 18105 18282 18388"
456 y="20331"
457 id="tspan1029">rs_complete_io()</tspan>
458 </text>
459</svg>
diff --git a/Documentation/blockdev/drbd/README.txt b/Documentation/blockdev/drbd/README.txt
new file mode 100644
index 000000000000..627b0a1bf35e
--- /dev/null
+++ b/Documentation/blockdev/drbd/README.txt
@@ -0,0 +1,16 @@
1Description
2
3 DRBD is a shared-nothing, synchronously replicated block device. It
4 is designed to serve as a building block for high availability
5 clusters and in this context, is a "drop-in" replacement for shared
6 storage. Simplistically, you could see it as a network RAID 1.
7
8 Please visit http://www.drbd.org to find out more.
9
10The here included files are intended to help understand the implementation
11
12DRBD-8.3-data-packets.svg, DRBD-data-packets.svg
13 relates some functions, and write packets.
14
15conn-states-8.dot, disk-states-8.dot, node-states-8.dot
16 The sub graphs of DRBD's state transitions
diff --git a/Documentation/blockdev/drbd/conn-states-8.dot b/Documentation/blockdev/drbd/conn-states-8.dot
new file mode 100644
index 000000000000..025e8cf5e64a
--- /dev/null
+++ b/Documentation/blockdev/drbd/conn-states-8.dot
@@ -0,0 +1,18 @@
1digraph conn_states {
2 StandAllone -> WFConnection [ label = "ioctl_set_net()" ]
3 WFConnection -> Unconnected [ label = "unable to bind()" ]
4 WFConnection -> WFReportParams [ label = "in connect() after accept" ]
5 WFReportParams -> StandAllone [ label = "checks in receive_param()" ]
6 WFReportParams -> Connected [ label = "in receive_param()" ]
7 WFReportParams -> WFBitMapS [ label = "sync_handshake()" ]
8 WFReportParams -> WFBitMapT [ label = "sync_handshake()" ]
9 WFBitMapS -> SyncSource [ label = "receive_bitmap()" ]
10 WFBitMapT -> SyncTarget [ label = "receive_bitmap()" ]
11 SyncSource -> Connected
12 SyncTarget -> Connected
13 SyncSource -> PausedSyncS
14 SyncTarget -> PausedSyncT
15 PausedSyncS -> SyncSource
16 PausedSyncT -> SyncTarget
17 Connected -> WFConnection [ label = "* on network error" ]
18}
diff --git a/Documentation/blockdev/drbd/disk-states-8.dot b/Documentation/blockdev/drbd/disk-states-8.dot
new file mode 100644
index 000000000000..d06cfb46fb98
--- /dev/null
+++ b/Documentation/blockdev/drbd/disk-states-8.dot
@@ -0,0 +1,16 @@
1digraph disk_states {
2 Diskless -> Inconsistent [ label = "ioctl_set_disk()" ]
3 Diskless -> Consistent [ label = "ioctl_set_disk()" ]
4 Diskless -> Outdated [ label = "ioctl_set_disk()" ]
5 Consistent -> Outdated [ label = "receive_param()" ]
6 Consistent -> UpToDate [ label = "receive_param()" ]
7 Consistent -> Inconsistent [ label = "start resync" ]
8 Outdated -> Inconsistent [ label = "start resync" ]
9 UpToDate -> Inconsistent [ label = "ioctl_replicate" ]
10 Inconsistent -> UpToDate [ label = "resync completed" ]
11 Consistent -> Failed [ label = "io completion error" ]
12 Outdated -> Failed [ label = "io completion error" ]
13 UpToDate -> Failed [ label = "io completion error" ]
14 Inconsistent -> Failed [ label = "io completion error" ]
15 Failed -> Diskless [ label = "sending notify to peer" ]
16}
diff --git a/Documentation/blockdev/drbd/drbd-connection-state-overview.dot b/Documentation/blockdev/drbd/drbd-connection-state-overview.dot
new file mode 100644
index 000000000000..6d9cf0a7b11d
--- /dev/null
+++ b/Documentation/blockdev/drbd/drbd-connection-state-overview.dot
@@ -0,0 +1,85 @@
1// vim: set sw=2 sts=2 :
2digraph {
3 rankdir=BT
4 bgcolor=white
5
6 node [shape=plaintext]
7 node [fontcolor=black]
8
9 StandAlone [ style=filled,fillcolor=gray,label=StandAlone ]
10
11 node [fontcolor=lightgray]
12
13 Unconnected [ label=Unconnected ]
14
15 CommTrouble [ shape=record,
16 label="{communication loss|{Timeout|BrokenPipe|NetworkFailure}}" ]
17
18 node [fontcolor=gray]
19
20 subgraph cluster_try_connect {
21 label="try to connect, handshake"
22 rank=max
23 WFConnection [ label=WFConnection ]
24 WFReportParams [ label=WFReportParams ]
25 }
26
27 TearDown [ label=TearDown ]
28
29 Connected [ label=Connected,style=filled,fillcolor=green,fontcolor=black ]
30
31 node [fontcolor=lightblue]
32
33 StartingSyncS [ label=StartingSyncS ]
34 StartingSyncT [ label=StartingSyncT ]
35
36 subgraph cluster_bitmap_exchange {
37 node [fontcolor=red]
38 fontcolor=red
39 label="new application (WRITE?) requests blocked\lwhile bitmap is exchanged"
40
41 WFBitMapT [ label=WFBitMapT ]
42 WFSyncUUID [ label=WFSyncUUID ]
43 WFBitMapS [ label=WFBitMapS ]
44 }
45
46 node [fontcolor=blue]
47
48 cluster_resync [ shape=record,label="{<any>resynchronisation process running\l'concurrent' application requests allowed|{{<T>PausedSyncT\nSyncTarget}|{<S>PausedSyncS\nSyncSource}}}" ]
49
50 node [shape=box,fontcolor=black]
51
52 // drbdadm [label="drbdadm connect"]
53 // handshake [label="drbd_connect()\ndrbd_do_handshake\ndrbd_sync_handshake() etc."]
54 // comm_error [label="communication trouble"]
55
56 //
57 // edges
58 // --------------------------------------
59
60 StandAlone -> Unconnected [ label="drbdadm connect" ]
61 Unconnected -> StandAlone [ label="drbdadm disconnect\lor serious communication trouble" ]
62 Unconnected -> WFConnection [ label="receiver thread is started" ]
63 WFConnection -> WFReportParams [ headlabel="accept()\land/or \lconnect()\l" ]
64
65 WFReportParams -> StandAlone [ label="during handshake\lpeers do not agree\labout something essential" ]
66 WFReportParams -> Connected [ label="data identical\lno sync needed",color=green,fontcolor=green ]
67
68 WFReportParams -> WFBitMapS
69 WFReportParams -> WFBitMapT
70 WFBitMapT -> WFSyncUUID [minlen=0.1,constraint=false]
71
72 WFBitMapS -> cluster_resync:S
73 WFSyncUUID -> cluster_resync:T
74
75 edge [color=green]
76 cluster_resync:any -> Connected [ label="resnyc done",fontcolor=green ]
77
78 edge [color=red]
79 WFReportParams -> CommTrouble
80 Connected -> CommTrouble
81 cluster_resync:any -> CommTrouble
82 edge [color=black]
83 CommTrouble -> Unconnected [label="receiver thread is stopped" ]
84
85}
diff --git a/Documentation/blockdev/drbd/node-states-8.dot b/Documentation/blockdev/drbd/node-states-8.dot
new file mode 100644
index 000000000000..4a2b00c23547
--- /dev/null
+++ b/Documentation/blockdev/drbd/node-states-8.dot
@@ -0,0 +1,14 @@
1digraph node_states {
2 Secondary -> Primary [ label = "ioctl_set_state()" ]
3 Primary -> Secondary [ label = "ioctl_set_state()" ]
4}
5
6digraph peer_states {
7 Secondary -> Primary [ label = "recv state packet" ]
8 Primary -> Secondary [ label = "recv state packet" ]
9 Primary -> Unknown [ label = "connection lost" ]
10 Secondary -> Unknown [ label = "connection lost" ]
11 Unknown -> Primary [ label = "connected" ]
12 Unknown -> Secondary [ label = "connected" ]
13}
14
diff --git a/Documentation/cgroups/blkio-controller.txt b/Documentation/cgroups/blkio-controller.txt
new file mode 100644
index 000000000000..630879cd9a42
--- /dev/null
+++ b/Documentation/cgroups/blkio-controller.txt
@@ -0,0 +1,135 @@
1 Block IO Controller
2 ===================
3Overview
4========
5cgroup subsys "blkio" implements the block io controller. There seems to be
6a need of various kinds of IO control policies (like proportional BW, max BW)
7both at leaf nodes as well as at intermediate nodes in a storage hierarchy.
8Plan is to use the same cgroup based management interface for blkio controller
9and based on user options switch IO policies in the background.
10
11In the first phase, this patchset implements proportional weight time based
12division of disk policy. It is implemented in CFQ. Hence this policy takes
13effect only on leaf nodes when CFQ is being used.
14
15HOWTO
16=====
17You can do a very simple testing of running two dd threads in two different
18cgroups. Here is what you can do.
19
20- Enable group scheduling in CFQ
21 CONFIG_CFQ_GROUP_IOSCHED=y
22
23- Compile and boot into kernel and mount IO controller (blkio).
24
25 mount -t cgroup -o blkio none /cgroup
26
27- Create two cgroups
28 mkdir -p /cgroup/test1/ /cgroup/test2
29
30- Set weights of group test1 and test2
31 echo 1000 > /cgroup/test1/blkio.weight
32 echo 500 > /cgroup/test2/blkio.weight
33
34- Create two same size files (say 512MB each) on same disk (file1, file2) and
35 launch two dd threads in different cgroup to read those files.
36
37 sync
38 echo 3 > /proc/sys/vm/drop_caches
39
40 dd if=/mnt/sdb/zerofile1 of=/dev/null &
41 echo $! > /cgroup/test1/tasks
42 cat /cgroup/test1/tasks
43
44 dd if=/mnt/sdb/zerofile2 of=/dev/null &
45 echo $! > /cgroup/test2/tasks
46 cat /cgroup/test2/tasks
47
48- At macro level, first dd should finish first. To get more precise data, keep
49 on looking at (with the help of script), at blkio.disk_time and
50 blkio.disk_sectors files of both test1 and test2 groups. This will tell how
51 much disk time (in milli seconds), each group got and how many secotors each
52 group dispatched to the disk. We provide fairness in terms of disk time, so
53 ideally io.disk_time of cgroups should be in proportion to the weight.
54
55Various user visible config options
56===================================
57CONFIG_CFQ_GROUP_IOSCHED
58 - Enables group scheduling in CFQ. Currently only 1 level of group
59 creation is allowed.
60
61CONFIG_DEBUG_CFQ_IOSCHED
62 - Enables some debugging messages in blktrace. Also creates extra
63 cgroup file blkio.dequeue.
64
65Config options selected automatically
66=====================================
67These config options are not user visible and are selected/deselected
68automatically based on IO scheduler configuration.
69
70CONFIG_BLK_CGROUP
71 - Block IO controller. Selected by CONFIG_CFQ_GROUP_IOSCHED.
72
73CONFIG_DEBUG_BLK_CGROUP
74 - Debug help. Selected by CONFIG_DEBUG_CFQ_IOSCHED.
75
76Details of cgroup files
77=======================
78- blkio.weight
79 - Specifies per cgroup weight.
80
81 Currently allowed range of weights is from 100 to 1000.
82
83- blkio.time
84 - disk time allocated to cgroup per device in milliseconds. First
85 two fields specify the major and minor number of the device and
86 third field specifies the disk time allocated to group in
87 milliseconds.
88
89- blkio.sectors
90 - number of sectors transferred to/from disk by the group. First
91 two fields specify the major and minor number of the device and
92 third field specifies the number of sectors transferred by the
93 group to/from the device.
94
95- blkio.dequeue
96 - Debugging aid only enabled if CONFIG_DEBUG_CFQ_IOSCHED=y. This
97 gives the statistics about how many a times a group was dequeued
98 from service tree of the device. First two fields specify the major
99 and minor number of the device and third field specifies the number
100 of times a group was dequeued from a particular device.
101
102CFQ sysfs tunable
103=================
104/sys/block/<disk>/queue/iosched/group_isolation
105
106If group_isolation=1, it provides stronger isolation between groups at the
107expense of throughput. By default group_isolation is 0. In general that
108means that if group_isolation=0, expect fairness for sequential workload
109only. Set group_isolation=1 to see fairness for random IO workload also.
110
111Generally CFQ will put random seeky workload in sync-noidle category. CFQ
112will disable idling on these queues and it does a collective idling on group
113of such queues. Generally these are slow moving queues and if there is a
114sync-noidle service tree in each group, that group gets exclusive access to
115disk for certain period. That means it will bring the throughput down if
116group does not have enough IO to drive deeper queue depths and utilize disk
117capacity to the fullest in the slice allocated to it. But the flip side is
118that even a random reader should get better latencies and overall throughput
119if there are lots of sequential readers/sync-idle workload running in the
120system.
121
122If group_isolation=0, then CFQ automatically moves all the random seeky queues
123in the root group. That means there will be no service differentiation for
124that kind of workload. This leads to better throughput as we do collective
125idling on root sync-noidle tree.
126
127By default one should run with group_isolation=0. If that is not sufficient
128and one wants stronger isolation between groups, then set group_isolation=1
129but this will come at cost of reduced throughput.
130
131What works
132==========
133- Currently only sync IO queues are support. All the buffered writes are
134 still system wide and not per group. Hence we will not see service
135 differentiation between buffered writes between groups.
diff --git a/Documentation/cpu-freq/cpu-drivers.txt b/Documentation/cpu-freq/cpu-drivers.txt
index 75a58d14d3cf..6c30e930c122 100644
--- a/Documentation/cpu-freq/cpu-drivers.txt
+++ b/Documentation/cpu-freq/cpu-drivers.txt
@@ -92,9 +92,9 @@ policy->cpuinfo.max_freq - the minimum and maximum frequency
92 (in kHz) which is supported by 92 (in kHz) which is supported by
93 this CPU 93 this CPU
94policy->cpuinfo.transition_latency the time it takes on this CPU to 94policy->cpuinfo.transition_latency the time it takes on this CPU to
95 switch between two frequencies (if 95 switch between two frequencies in
96 appropriate, else specify 96 nanoseconds (if appropriate, else
97 CPUFREQ_ETERNAL) 97 specify CPUFREQ_ETERNAL)
98 98
99policy->cur The current operating frequency of 99policy->cur The current operating frequency of
100 this CPU (if appropriate) 100 this CPU (if appropriate)
diff --git a/Documentation/cpu-freq/user-guide.txt b/Documentation/cpu-freq/user-guide.txt
index 2a5b850847c0..04f6b32993e6 100644
--- a/Documentation/cpu-freq/user-guide.txt
+++ b/Documentation/cpu-freq/user-guide.txt
@@ -203,6 +203,17 @@ scaling_cur_freq : Current frequency of the CPU as determined by
203 the frequency the kernel thinks the CPU runs 203 the frequency the kernel thinks the CPU runs
204 at. 204 at.
205 205
206bios_limit : If the BIOS tells the OS to limit a CPU to
207 lower frequencies, the user can read out the
208 maximum available frequency from this file.
209 This typically can happen through (often not
210 intended) BIOS settings, restrictions
211 triggered through a service processor or other
212 BIOS/HW based implementations.
213 This does not cover thermal ACPI limitations
214 which can be detected through the generic
215 thermal driver.
216
206If you have selected the "userspace" governor which allows you to 217If you have selected the "userspace" governor which allows you to
207set the CPU operating frequency to a specific value, you can read out 218set the CPU operating frequency to a specific value, you can read out
208the current frequency in 219the current frequency in
diff --git a/Documentation/cpu-hotplug.txt b/Documentation/cpu-hotplug.txt
index 9d620c153b04..4d4a644b505e 100644
--- a/Documentation/cpu-hotplug.txt
+++ b/Documentation/cpu-hotplug.txt
@@ -49,6 +49,12 @@ maxcpus=n Restrict boot time cpus to n. Say if you have 4 cpus, using
49additional_cpus=n (*) Use this to limit hotpluggable cpus. This option sets 49additional_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
52cede_offline={"off","on"} Use this option to disable/enable putting offlined
53 processors to an extended H_CEDE state on
54 supported pseries platforms.
55 If nothing is specified,
56 cede_offline is set to "on".
57
52(*) Option valid only for following architectures 58(*) Option valid only for following architectures
53- ia64 59- ia64
54 60
diff --git a/Documentation/cputopology.txt b/Documentation/cputopology.txt
index b41f3e58aefa..f1c5c4bccd3e 100644
--- a/Documentation/cputopology.txt
+++ b/Documentation/cputopology.txt
@@ -1,15 +1,28 @@
1 1
2Export cpu topology info via sysfs. Items (attributes) are similar 2Export CPU topology info via sysfs. Items (attributes) are similar
3to /proc/cpuinfo. 3to /proc/cpuinfo.
4 4
51) /sys/devices/system/cpu/cpuX/topology/physical_package_id: 51) /sys/devices/system/cpu/cpuX/topology/physical_package_id:
6represent the physical package id of cpu X; 6
7 physical package id of cpuX. Typically corresponds to a physical
8 socket number, but the actual value is architecture and platform
9 dependent.
10
72) /sys/devices/system/cpu/cpuX/topology/core_id: 112) /sys/devices/system/cpu/cpuX/topology/core_id:
8represent the cpu core id to cpu X; 12
13 the CPU core ID of cpuX. Typically it is the hardware platform's
14 identifier (rather than the kernel's). The actual value is
15 architecture and platform dependent.
16
93) /sys/devices/system/cpu/cpuX/topology/thread_siblings: 173) /sys/devices/system/cpu/cpuX/topology/thread_siblings:
10represent the thread siblings to cpu X in the same core; 18
19 internel kernel map of cpuX's hardware threads within the same
20 core as cpuX
21
114) /sys/devices/system/cpu/cpuX/topology/core_siblings: 224) /sys/devices/system/cpu/cpuX/topology/core_siblings:
12represent the thread siblings to cpu X in the same physical package; 23
24 internal kernel map of cpuX's hardware threads within the same
25 physical_package_id.
13 26
14To implement it in an architecture-neutral way, a new source file, 27To implement it in an architecture-neutral way, a new source file,
15drivers/base/topology.c, is to export the 4 attributes. 28drivers/base/topology.c, is to export the 4 attributes.
@@ -32,32 +45,32 @@ not defined by include/asm-XXX/topology.h:
323) thread_siblings: just the given CPU 453) thread_siblings: just the given CPU
334) core_siblings: just the given CPU 464) core_siblings: just the given CPU
34 47
35Additionally, cpu topology information is provided under 48Additionally, CPU topology information is provided under
36/sys/devices/system/cpu and includes these files. The internal 49/sys/devices/system/cpu and includes these files. The internal
37source for the output is in brackets ("[]"). 50source for the output is in brackets ("[]").
38 51
39 kernel_max: the maximum cpu index allowed by the kernel configuration. 52 kernel_max: the maximum CPU index allowed by the kernel configuration.
40 [NR_CPUS-1] 53 [NR_CPUS-1]
41 54
42 offline: cpus that are not online because they have been 55 offline: CPUs that are not online because they have been
43 HOTPLUGGED off (see cpu-hotplug.txt) or exceed the limit 56 HOTPLUGGED off (see cpu-hotplug.txt) or exceed the limit
44 of cpus allowed by the kernel configuration (kernel_max 57 of CPUs allowed by the kernel configuration (kernel_max
45 above). [~cpu_online_mask + cpus >= NR_CPUS] 58 above). [~cpu_online_mask + cpus >= NR_CPUS]
46 59
47 online: cpus that are online and being scheduled [cpu_online_mask] 60 online: CPUs that are online and being scheduled [cpu_online_mask]
48 61
49 possible: cpus that have been allocated resources and can be 62 possible: CPUs that have been allocated resources and can be
50 brought online if they are present. [cpu_possible_mask] 63 brought online if they are present. [cpu_possible_mask]
51 64
52 present: cpus that have been identified as being present in the 65 present: CPUs that have been identified as being present in the
53 system. [cpu_present_mask] 66 system. [cpu_present_mask]
54 67
55The format for the above output is compatible with cpulist_parse() 68The format for the above output is compatible with cpulist_parse()
56[see <linux/cpumask.h>]. Some examples follow. 69[see <linux/cpumask.h>]. Some examples follow.
57 70
58In this example, there are 64 cpus in the system but cpus 32-63 exceed 71In 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 72the 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 73being 32. Note also that CPUs 2 and 4-31 are not online but could be
61brought online as they are both present and possible. 74brought online as they are both present and possible.
62 75
63 kernel_max: 31 76 kernel_max: 31
@@ -67,8 +80,8 @@ brought online as they are both present and possible.
67 present: 0-31 80 present: 0-31
68 81
69In this example, the NR_CPUS config option is 128, but the kernel was 82In 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 83started 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 84was manually taken offline (and is the only CPU that can be brought
72online.) 85online.)
73 86
74 kernel_max: 127 87 kernel_max: 127
@@ -78,4 +91,4 @@ online.)
78 present: 0-3 91 present: 0-3
79 92
80See cpu-hotplug.txt for the possible_cpus=NUM kernel start parameter 93See cpu-hotplug.txt for the possible_cpus=NUM kernel start parameter
81as well as more information on the various cpumask's. 94as well as more information on the various cpumasks.
diff --git a/Documentation/device-mapper/snapshot.txt b/Documentation/device-mapper/snapshot.txt
index a5009c8300f3..e3a77b215135 100644
--- a/Documentation/device-mapper/snapshot.txt
+++ b/Documentation/device-mapper/snapshot.txt
@@ -8,13 +8,19 @@ the block device which are also writable without interfering with the
8original content; 8original content;
9*) To create device "forks", i.e. multiple different versions of the 9*) To create device "forks", i.e. multiple different versions of the
10same data stream. 10same data stream.
11*) To merge a snapshot of a block device back into the snapshot's origin
12device.
11 13
14In the first two cases, dm copies only the chunks of data that get
15changed and uses a separate copy-on-write (COW) block device for
16storage.
12 17
13In both cases, dm copies only the chunks of data that get changed and 18For snapshot merge the contents of the COW storage are merged back into
14uses a separate copy-on-write (COW) block device for storage. 19the origin device.
15 20
16 21
17There are two dm targets available: snapshot and snapshot-origin. 22There are three dm targets available:
23snapshot, snapshot-origin, and snapshot-merge.
18 24
19*) snapshot-origin <origin> 25*) snapshot-origin <origin>
20 26
@@ -40,8 +46,25 @@ The difference is that for transient snapshots less metadata must be
40saved on disk - they can be kept in memory by the kernel. 46saved on disk - they can be kept in memory by the kernel.
41 47
42 48
43How this is used by LVM2 49* snapshot-merge <origin> <COW device> <persistent> <chunksize>
44======================== 50
51takes the same table arguments as the snapshot target except it only
52works with persistent snapshots. This target assumes the role of the
53"snapshot-origin" target and must not be loaded if the "snapshot-origin"
54is still present for <origin>.
55
56Creates a merging snapshot that takes control of the changed chunks
57stored in the <COW device> of an existing snapshot, through a handover
58procedure, and merges these chunks back into the <origin>. Once merging
59has started (in the background) the <origin> may be opened and the merge
60will continue while I/O is flowing to it. Changes to the <origin> are
61deferred until the merging snapshot's corresponding chunk(s) have been
62merged. Once merging has started the snapshot device, associated with
63the "snapshot" target, will return -EIO when accessed.
64
65
66How snapshot is used by LVM2
67============================
45When you create the first LVM2 snapshot of a volume, four dm devices are used: 68When you create the first LVM2 snapshot of a volume, four dm devices are used:
46 69
471) a device containing the original mapping table of the source volume; 701) a device containing the original mapping table of the source volume;
@@ -72,3 +95,30 @@ brw------- 1 root root 254, 12 29 ago 18:15 /dev/mapper/volumeGroup-snap-cow
72brw------- 1 root root 254, 13 29 ago 18:15 /dev/mapper/volumeGroup-snap 95brw------- 1 root root 254, 13 29 ago 18:15 /dev/mapper/volumeGroup-snap
73brw------- 1 root root 254, 10 29 ago 18:14 /dev/mapper/volumeGroup-base 96brw------- 1 root root 254, 10 29 ago 18:14 /dev/mapper/volumeGroup-base
74 97
98
99How snapshot-merge is used by LVM2
100==================================
101A merging snapshot assumes the role of the "snapshot-origin" while
102merging. As such the "snapshot-origin" is replaced with
103"snapshot-merge". The "-real" device is not changed and the "-cow"
104device is renamed to <origin name>-cow to aid LVM2's cleanup of the
105merging snapshot after it completes. The "snapshot" that hands over its
106COW device to the "snapshot-merge" is deactivated (unless using lvchange
107--refresh); but if it is left active it will simply return I/O errors.
108
109A snapshot will merge into its origin with the following command:
110
111lvconvert --merge volumeGroup/snap
112
113we'll now have this situation:
114
115# dmsetup table|grep volumeGroup
116
117volumeGroup-base-real: 0 2097152 linear 8:19 384
118volumeGroup-base-cow: 0 204800 linear 8:19 2097536
119volumeGroup-base: 0 2097152 snapshot-merge 254:11 254:12 P 16
120
121# ls -lL /dev/mapper/volumeGroup-*
122brw------- 1 root root 254, 11 29 ago 18:15 /dev/mapper/volumeGroup-base-real
123brw------- 1 root root 254, 12 29 ago 18:16 /dev/mapper/volumeGroup-base-cow
124brw------- 1 root root 254, 10 29 ago 18:16 /dev/mapper/volumeGroup-base
diff --git a/Documentation/dontdiff b/Documentation/dontdiff
index e1efc400bed6..e151b2a36267 100644
--- a/Documentation/dontdiff
+++ b/Documentation/dontdiff
@@ -65,6 +65,7 @@ aicdb.h*
65asm-offsets.h 65asm-offsets.h
66asm_offsets.h 66asm_offsets.h
67autoconf.h* 67autoconf.h*
68av_permissions.h
68bbootsect 69bbootsect
69bin2c 70bin2c
70binkernel.spec 71binkernel.spec
@@ -95,12 +96,14 @@ docproc
95elf2ecoff 96elf2ecoff
96elfconfig.h* 97elfconfig.h*
97fixdep 98fixdep
99flask.h
98fore200e_mkfirm 100fore200e_mkfirm
99fore200e_pca_fw.c* 101fore200e_pca_fw.c*
100gconf 102gconf
101gen-devlist 103gen-devlist
102gen_crc32table 104gen_crc32table
103gen_init_cpio 105gen_init_cpio
106genheaders
104genksyms 107genksyms
105*_gray256.c 108*_gray256.c
106ihex2fw 109ihex2fw
diff --git a/Documentation/dvb/README.dvb-usb b/Documentation/dvb/README.dvb-usb
index bf2a9cdfe7bb..c8238e44ed6b 100644
--- a/Documentation/dvb/README.dvb-usb
+++ b/Documentation/dvb/README.dvb-usb
@@ -85,7 +85,7 @@ http://www.linuxtv.org/wiki/index.php/DVB_USB
85 - moved transfer control (pid filter, fifo control) from usb driver to frontend, it seems 85 - moved transfer control (pid filter, fifo control) from usb driver to frontend, it seems
86 better settled there (added xfer_ops-struct) 86 better settled there (added xfer_ops-struct)
87 - created a common files for frontends (mc/p/mb) 87 - created a common files for frontends (mc/p/mb)
88 2004-09-28 - added support for a new device (Unkown, vendor ID is Hyper-Paltek) 88 2004-09-28 - added support for a new device (Unknown, vendor ID is Hyper-Paltek)
89 2004-09-20 - added support for a new device (Compro DVB-U2000), thanks 89 2004-09-20 - added support for a new device (Compro DVB-U2000), thanks
90 to Amaury Demol for reporting 90 to Amaury Demol for reporting
91 - changed usb TS transfer method (several urbs, stopping transfer 91 - changed usb TS transfer method (several urbs, stopping transfer
diff --git a/Documentation/edac.txt b/Documentation/edac.txt
index 06f8f46692dc..79c533223762 100644
--- a/Documentation/edac.txt
+++ b/Documentation/edac.txt
@@ -80,7 +80,7 @@ is:
80 80
81 broken_parity_status 81 broken_parity_status
82 82
83as is located in /sys/devices/pci<XXX>/0000:XX:YY.Z directorys for 83as is located in /sys/devices/pci<XXX>/0000:XX:YY.Z directories for
84PCI devices. 84PCI devices.
85 85
86FUTURE HARDWARE SCANNING 86FUTURE HARDWARE SCANNING
@@ -288,9 +288,8 @@ Total UE count that had no information attribute fileY:
288 288
289 'ue_noinfo_count' 289 'ue_noinfo_count'
290 290
291 This attribute file displays the number of UEs that 291 This attribute file displays the number of UEs that have occurred
292 have occurred have occurred with no informations as to which DIMM 292 with no information as to which DIMM slot is having errors.
293 slot is having errors.
294 293
295 294
296Total Correctable Errors count attribute file: 295Total Correctable Errors count attribute file:
diff --git a/Documentation/fb/framebuffer.txt b/Documentation/fb/framebuffer.txt
index b3e3a0356839..fe79e3c8847d 100644
--- a/Documentation/fb/framebuffer.txt
+++ b/Documentation/fb/framebuffer.txt
@@ -312,10 +312,8 @@ and to the following documentation:
3128. Mailing list 3128. Mailing list
313--------------- 313---------------
314 314
315There are several frame buffer device related mailing lists at SourceForge: 315There is a frame buffer device related mailing list at kernel.org:
316 - linux-fbdev-announce@lists.sourceforge.net, for announcements, 316linux-fbdev@vger.kernel.org.
317 - linux-fbdev-user@lists.sourceforge.net, for generic user support,
318 - linux-fbdev-devel@lists.sourceforge.net, for project developers.
319 317
320Point your web browser to http://sourceforge.net/projects/linux-fbdev/ for 318Point your web browser to http://sourceforge.net/projects/linux-fbdev/ for
321subscription information and archive browsing. 319subscription information and archive browsing.
diff --git a/Documentation/feature-removal-schedule.txt b/Documentation/feature-removal-schedule.txt
index 04e6c819b28a..870d190fe617 100644
--- a/Documentation/feature-removal-schedule.txt
+++ b/Documentation/feature-removal-schedule.txt
@@ -6,6 +6,21 @@ be removed from this file.
6 6
7--------------------------- 7---------------------------
8 8
9What: USER_SCHED
10When: 2.6.34
11
12Why: USER_SCHED was implemented as a proof of concept for group scheduling.
13 The effect of USER_SCHED can already be achieved from userspace with
14 the help of libcgroup. The removal of USER_SCHED will also simplify
15 the scheduler code with the removal of one major ifdef. There are also
16 issues USER_SCHED has with USER_NS. A decision was taken not to fix
17 those and instead remove USER_SCHED. Also new group scheduling
18 features will not be implemented for USER_SCHED.
19
20Who: Dhaval Giani <dhaval@linux.vnet.ibm.com>
21
22---------------------------
23
9What: PRISM54 24What: PRISM54
10When: 2.6.34 25When: 2.6.34
11 26
@@ -276,22 +291,6 @@ Who: Michael Buesch <mb@bu3sch.de>
276 291
277--------------------------- 292---------------------------
278 293
279What: usedac i386 kernel parameter
280When: 2.6.27
281Why: replaced by allowdac and no dac combination
282Who: Glauber Costa <gcosta@redhat.com>
283
284---------------------------
285
286What: print_fn_descriptor_symbol()
287When: October 2009
288Why: The %pF vsprintf format provides the same functionality in a
289 simpler way. print_fn_descriptor_symbol() is deprecated but
290 still present to give out-of-tree modules time to change.
291Who: Bjorn Helgaas <bjorn.helgaas@hp.com>
292
293---------------------------
294
295What: /sys/o2cb symlink 294What: /sys/o2cb symlink
296When: January 2010 295When: January 2010
297Why: /sys/fs/o2cb is the proper location for this information - /sys/o2cb 296Why: /sys/fs/o2cb is the proper location for this information - /sys/o2cb
@@ -302,18 +301,6 @@ Who: ocfs2-devel@oss.oracle.com
302 301
303--------------------------- 302---------------------------
304 303
305What: SCTP_GET_PEER_ADDRS_NUM_OLD, SCTP_GET_PEER_ADDRS_OLD,
306 SCTP_GET_LOCAL_ADDRS_NUM_OLD, SCTP_GET_LOCAL_ADDRS_OLD
307When: June 2009
308Why: A newer version of the options have been introduced in 2005 that
309 removes the limitions of the old API. The sctp library has been
310 converted to use these new options at the same time. Any user
311 space app that directly uses the old options should convert to using
312 the new options.
313Who: Vlad Yasevich <vladislav.yasevich@hp.com>
314
315---------------------------
316
317What: Ability for non root users to shm_get hugetlb pages based on mlock 304What: Ability for non root users to shm_get hugetlb pages based on mlock
318 resource limits 305 resource limits
319When: 2.6.31 306When: 2.6.31
@@ -404,20 +391,19 @@ Who: Alex Chiang <achiang@hp.com>
404 391
405--------------------------- 392---------------------------
406 393
407What: i2c-voodoo3 driver
408When: October 2009
409Why: Superseded by tdfxfb. I2C/DDC support used to live in a separate
410 driver but this caused driver conflicts.
411Who: Jean Delvare <khali@linux-fr.org>
412 Krzysztof Helt <krzysztof.h1@wp.pl>
413
414---------------------------
415
416What: CONFIG_RFKILL_INPUT 394What: CONFIG_RFKILL_INPUT
417When: 2.6.33 395When: 2.6.33
418Why: Should be implemented in userspace, policy daemon. 396Why: Should be implemented in userspace, policy daemon.
419Who: Johannes Berg <johannes@sipsolutions.net> 397Who: Johannes Berg <johannes@sipsolutions.net>
420 398
399---------------------------
400
401What: CONFIG_INOTIFY
402When: 2.6.33
403Why: last user (audit) will be converted to the newer more generic
404 and more easily maintained fsnotify subsystem
405Who: Eric Paris <eparis@redhat.com>
406
421---------------------------- 407----------------------------
422 408
423What: lock_policy_rwsem_* and unlock_policy_rwsem_* will not be 409What: lock_policy_rwsem_* and unlock_policy_rwsem_* will not be
@@ -481,3 +467,29 @@ Why: With the recent innovations in CPU hardware acceleration technologies
481Who: Alok N Kataria <akataria@vmware.com> 467Who: Alok N Kataria <akataria@vmware.com>
482 468
483---------------------------- 469----------------------------
470
471What: adt7473 hardware monitoring driver
472When: February 2010
473Why: Obsoleted by the adt7475 driver.
474Who: Jean Delvare <khali@linux-fr.org>
475
476---------------------------
477What: Support for lcd_switch and display_get in asus-laptop driver
478When: March 2010
479Why: These two features use non-standard interfaces. There are the
480 only features that really need multiple path to guess what's
481 the right method name on a specific laptop.
482
483 Removing them will allow to remove a lot of code an significantly
484 clean the drivers.
485
486 This will affect the backlight code which won't be able to know
487 if the backlight is on or off. The platform display file will also be
488 write only (like the one in eeepc-laptop).
489
490 This should'nt affect a lot of user because they usually know
491 when their display is on or off.
492
493Who: Corentin Chary <corentin.chary@gmail.com>
494
495----------------------------
diff --git a/Documentation/filesystems/00-INDEX b/Documentation/filesystems/00-INDEX
index f15621ee5599..7001782ab932 100644
--- a/Documentation/filesystems/00-INDEX
+++ b/Documentation/filesystems/00-INDEX
@@ -36,6 +36,8 @@ dnotify.txt
36 - info about directory notification in Linux. 36 - info about directory notification in Linux.
37ecryptfs.txt 37ecryptfs.txt
38 - docs on eCryptfs: stacked cryptographic filesystem for Linux. 38 - docs on eCryptfs: stacked cryptographic filesystem for Linux.
39exofs.txt
40 - info, usage, mount options, design about EXOFS.
39ext2.txt 41ext2.txt
40 - info, mount options and specifications for the Ext2 filesystem. 42 - info, mount options and specifications for the Ext2 filesystem.
41ext3.txt 43ext3.txt
diff --git a/Documentation/filesystems/caching/fscache.txt b/Documentation/filesystems/caching/fscache.txt
index 9e94b9491d89..a91e2e2095b0 100644
--- a/Documentation/filesystems/caching/fscache.txt
+++ b/Documentation/filesystems/caching/fscache.txt
@@ -235,6 +235,7 @@ proc files.
235 neg=N Number of negative lookups made 235 neg=N Number of negative lookups made
236 pos=N Number of positive lookups made 236 pos=N Number of positive lookups made
237 crt=N Number of objects created by lookup 237 crt=N Number of objects created by lookup
238 tmo=N Number of lookups timed out and requeued
238 Updates n=N Number of update cookie requests seen 239 Updates n=N Number of update cookie requests seen
239 nul=N Number of upd reqs given a NULL parent 240 nul=N Number of upd reqs given a NULL parent
240 run=N Number of upd reqs granted CPU time 241 run=N Number of upd reqs granted CPU time
@@ -250,8 +251,10 @@ proc files.
250 ok=N Number of successful alloc reqs 251 ok=N Number of successful alloc reqs
251 wt=N Number of alloc reqs that waited on lookup completion 252 wt=N Number of alloc reqs that waited on lookup completion
252 nbf=N Number of alloc reqs rejected -ENOBUFS 253 nbf=N Number of alloc reqs rejected -ENOBUFS
254 int=N Number of alloc reqs aborted -ERESTARTSYS
253 ops=N Number of alloc reqs submitted 255 ops=N Number of alloc reqs submitted
254 owt=N Number of alloc reqs waited for CPU time 256 owt=N Number of alloc reqs waited for CPU time
257 abt=N Number of alloc reqs aborted due to object death
255 Retrvls n=N Number of retrieval (read) requests seen 258 Retrvls n=N Number of retrieval (read) requests seen
256 ok=N Number of successful retr reqs 259 ok=N Number of successful retr reqs
257 wt=N Number of retr reqs that waited on lookup completion 260 wt=N Number of retr reqs that waited on lookup completion
@@ -261,6 +264,7 @@ proc files.
261 oom=N Number of retr reqs failed -ENOMEM 264 oom=N Number of retr reqs failed -ENOMEM
262 ops=N Number of retr reqs submitted 265 ops=N Number of retr reqs submitted
263 owt=N Number of retr reqs waited for CPU time 266 owt=N Number of retr reqs waited for CPU time
267 abt=N Number of retr reqs aborted due to object death
264 Stores n=N Number of storage (write) requests seen 268 Stores n=N Number of storage (write) requests seen
265 ok=N Number of successful store reqs 269 ok=N Number of successful store reqs
266 agn=N Number of store reqs on a page already pending storage 270 agn=N Number of store reqs on a page already pending storage
@@ -268,12 +272,37 @@ proc files.
268 oom=N Number of store reqs failed -ENOMEM 272 oom=N Number of store reqs failed -ENOMEM
269 ops=N Number of store reqs submitted 273 ops=N Number of store reqs submitted
270 run=N Number of store reqs granted CPU time 274 run=N Number of store reqs granted CPU time
275 pgs=N Number of pages given store req processing time
276 rxd=N Number of store reqs deleted from tracking tree
277 olm=N Number of store reqs over store limit
278 VmScan nos=N Number of release reqs against pages with no pending store
279 gon=N Number of release reqs against pages stored by time lock granted
280 bsy=N Number of release reqs ignored due to in-progress store
281 can=N Number of page stores cancelled due to release req
271 Ops pend=N Number of times async ops added to pending queues 282 Ops pend=N Number of times async ops added to pending queues
272 run=N Number of times async ops given CPU time 283 run=N Number of times async ops given CPU time
273 enq=N Number of times async ops queued for processing 284 enq=N Number of times async ops queued for processing
285 can=N Number of async ops cancelled
286 rej=N Number of async ops rejected due to object lookup/create failure
274 dfr=N Number of async ops queued for deferred release 287 dfr=N Number of async ops queued for deferred release
275 rel=N Number of async ops released 288 rel=N Number of async ops released
276 gc=N Number of deferred-release async ops garbage collected 289 gc=N Number of deferred-release async ops garbage collected
290 CacheOp alo=N Number of in-progress alloc_object() cache ops
291 luo=N Number of in-progress lookup_object() cache ops
292 luc=N Number of in-progress lookup_complete() cache ops
293 gro=N Number of in-progress grab_object() cache ops
294 upo=N Number of in-progress update_object() cache ops
295 dro=N Number of in-progress drop_object() cache ops
296 pto=N Number of in-progress put_object() cache ops
297 syn=N Number of in-progress sync_cache() cache ops
298 atc=N Number of in-progress attr_changed() cache ops
299 rap=N Number of in-progress read_or_alloc_page() cache ops
300 ras=N Number of in-progress read_or_alloc_pages() cache ops
301 alp=N Number of in-progress allocate_page() cache ops
302 als=N Number of in-progress allocate_pages() cache ops
303 wrp=N Number of in-progress write_page() cache ops
304 ucp=N Number of in-progress uncache_page() cache ops
305 dsp=N Number of in-progress dissociate_pages() cache ops
277 306
278 307
279 (*) /proc/fs/fscache/histogram 308 (*) /proc/fs/fscache/histogram
@@ -299,6 +328,87 @@ proc files.
299 jiffy range covered, and the SECS field the equivalent number of seconds. 328 jiffy range covered, and the SECS field the equivalent number of seconds.
300 329
301 330
331===========
332OBJECT LIST
333===========
334
335If CONFIG_FSCACHE_OBJECT_LIST is enabled, the FS-Cache facility will maintain a
336list of all the objects currently allocated and allow them to be viewed
337through:
338
339 /proc/fs/fscache/objects
340
341This will look something like:
342
343 [root@andromeda ~]# head /proc/fs/fscache/objects
344 OBJECT PARENT STAT CHLDN OPS OOP IPR EX READS EM EV F S | NETFS_COOKIE_DEF TY FL NETFS_DATA OBJECT_KEY, AUX_DATA
345 ======== ======== ==== ===== === === === == ===== == == = = | ================ == == ================ ================
346 17e4b 2 ACTV 0 0 0 0 0 0 7b 4 0 8 | NFS.fh DT 0 ffff88001dd82820 010006017edcf8bbc93b43298fdfbe71e50b57b13a172c0117f38472, e567634700000000000000000000000063f2404a000000000000000000000000c9030000000000000000000063f2404a
347 1693a 2 ACTV 0 0 0 0 0 0 7b 4 0 8 | NFS.fh DT 0 ffff88002db23380 010006017edcf8bbc93b43298fdfbe71e50b57b1e0162c01a2df0ea6, 420ebc4a000000000000000000000000420ebc4a0000000000000000000000000e1801000000000000000000420ebc4a
348
349where the first set of columns before the '|' describe the object:
350
351 COLUMN DESCRIPTION
352 ======= ===============================================================
353 OBJECT Object debugging ID (appears as OBJ%x in some debug messages)
354 PARENT Debugging ID of parent object
355 STAT Object state
356 CHLDN Number of child objects of this object
357 OPS Number of outstanding operations on this object
358 OOP Number of outstanding child object management operations
359 IPR
360 EX Number of outstanding exclusive operations
361 READS Number of outstanding read operations
362 EM Object's event mask
363 EV Events raised on this object
364 F Object flags
365 S Object slow-work work item flags
366
367and the second set of columns describe the object's cookie, if present:
368
369 COLUMN DESCRIPTION
370 =============== =======================================================
371 NETFS_COOKIE_DEF Name of netfs cookie definition
372 TY Cookie type (IX - index, DT - data, hex - special)
373 FL Cookie flags
374 NETFS_DATA Netfs private data stored in the cookie
375 OBJECT_KEY Object key } 1 column, with separating comma
376 AUX_DATA Object aux data } presence may be configured
377
378The data shown may be filtered by attaching the a key to an appropriate keyring
379before viewing the file. Something like:
380
381 keyctl add user fscache:objlist <restrictions> @s
382
383where <restrictions> are a selection of the following letters:
384
385 K Show hexdump of object key (don't show if not given)
386 A Show hexdump of object aux data (don't show if not given)
387
388and the following paired letters:
389
390 C Show objects that have a cookie
391 c Show objects that don't have a cookie
392 B Show objects that are busy
393 b Show objects that aren't busy
394 W Show objects that have pending writes
395 w Show objects that don't have pending writes
396 R Show objects that have outstanding reads
397 r Show objects that don't have outstanding reads
398 S Show objects that have slow work queued
399 s Show objects that don't have slow work queued
400
401If neither side of a letter pair is given, then both are implied. For example:
402
403 keyctl add user fscache:objlist KB @s
404
405shows objects that are busy, and lists their object keys, but does not dump
406their auxiliary data. It also implies "CcWwRrSs", but as 'B' is given, 'b' is
407not implied.
408
409By default all objects and all fields will be shown.
410
411
302========= 412=========
303DEBUGGING 413DEBUGGING
304========= 414=========
diff --git a/Documentation/filesystems/caching/netfs-api.txt b/Documentation/filesystems/caching/netfs-api.txt
index 2666b1ed5e9e..1902c57b72ef 100644
--- a/Documentation/filesystems/caching/netfs-api.txt
+++ b/Documentation/filesystems/caching/netfs-api.txt
@@ -641,7 +641,7 @@ data file must be retired (see the relinquish cookie function below).
641 641
642Furthermore, note that this does not cancel the asynchronous read or write 642Furthermore, note that this does not cancel the asynchronous read or write
643operation started by the read/alloc and write functions, so the page 643operation started by the read/alloc and write functions, so the page
644invalidation and release functions must use: 644invalidation functions must use:
645 645
646 bool fscache_check_page_write(struct fscache_cookie *cookie, 646 bool fscache_check_page_write(struct fscache_cookie *cookie,
647 struct page *page); 647 struct page *page);
@@ -654,6 +654,25 @@ to see if a page is being written to the cache, and:
654to wait for it to finish if it is. 654to wait for it to finish if it is.
655 655
656 656
657When releasepage() is being implemented, a special FS-Cache function exists to
658manage the heuristics of coping with vmscan trying to eject pages, which may
659conflict with the cache trying to write pages to the cache (which may itself
660need to allocate memory):
661
662 bool fscache_maybe_release_page(struct fscache_cookie *cookie,
663 struct page *page,
664 gfp_t gfp);
665
666This takes the netfs cookie, and the page and gfp arguments as supplied to
667releasepage(). It will return false if the page cannot be released yet for
668some reason and if it returns true, the page has been uncached and can now be
669released.
670
671To make a page available for release, this function may wait for an outstanding
672storage request to complete, or it may attempt to cancel the storage request -
673in which case the page will not be stored in the cache this time.
674
675
657========================== 676==========================
658INDEX AND DATA FILE UPDATE 677INDEX AND DATA FILE UPDATE
659========================== 678==========================
diff --git a/Documentation/filesystems/exofs.txt b/Documentation/filesystems/exofs.txt
index 0ced74c2f73c..abd2a9b5b787 100644
--- a/Documentation/filesystems/exofs.txt
+++ b/Documentation/filesystems/exofs.txt
@@ -60,13 +60,13 @@ USAGE
60 60
61 mkfs.exofs --pid=65536 --format /dev/osd0 61 mkfs.exofs --pid=65536 --format /dev/osd0
62 62
63 The --format is optional if not specified no OSD_FORMAT will be 63 The --format is optional. If not specified, no OSD_FORMAT will be
64 preformed and a clean file system will be created in the specified pid, 64 performed and a clean file system will be created in the specified pid,
65 in the available space of the target. (Use --format=size_in_meg to limit 65 in the available space of the target. (Use --format=size_in_meg to limit
66 the total LUN space available) 66 the total LUN space available)
67 67
68 If pid already exist it will be deleted and a new one will be created in it's 68 If pid already exists, it will be deleted and a new one will be created in
69 place. Be careful. 69 its place. Be careful.
70 70
71 An exofs lives inside a single OSD partition. You can create multiple exofs 71 An exofs lives inside a single OSD partition. You can create multiple exofs
72 filesystems on the same device using multiple pids. 72 filesystems on the same device using multiple pids.
@@ -81,7 +81,7 @@ USAGE
81 81
827. For reference (See do-exofs example script): 827. For reference (See do-exofs example script):
83 do-exofs start - an example of how to perform the above steps. 83 do-exofs start - an example of how to perform the above steps.
84 do-exofs stop - an example of how to unmount the file system. 84 do-exofs stop - an example of how to unmount the file system.
85 do-exofs format - an example of how to format and mkfs a new exofs. 85 do-exofs format - an example of how to format and mkfs a new exofs.
86 86
878. Extra compilation flags (uncomment in fs/exofs/Kbuild): 878. Extra compilation flags (uncomment in fs/exofs/Kbuild):
@@ -104,8 +104,8 @@ Where:
104 exofs specific options: Options are separated by commas (,) 104 exofs specific options: Options are separated by commas (,)
105 pid=<integer> - The partition number to mount/create as 105 pid=<integer> - The partition number to mount/create as
106 container of the filesystem. 106 container of the filesystem.
107 This option is mandatory 107 This option is mandatory.
108 to=<integer> - Timeout in ticks for a single command 108 to=<integer> - Timeout in ticks for a single command.
109 default is (60 * HZ) [for debugging only] 109 default is (60 * HZ) [for debugging only]
110 110
111=============================================================================== 111===============================================================================
@@ -116,7 +116,7 @@ DESIGN
116 with a special ID (defined in common.h). 116 with a special ID (defined in common.h).
117 Information included in the file system control block is used to fill the 117 Information included in the file system control block is used to fill the
118 in-memory superblock structure at mount time. This object is created before 118 in-memory superblock structure at mount time. This object is created before
119 the file system is used by mkexofs.c It contains information such as: 119 the file system is used by mkexofs.c. It contains information such as:
120 - The file system's magic number 120 - The file system's magic number
121 - The next inode number to be allocated 121 - The next inode number to be allocated
122 122
@@ -134,8 +134,8 @@ DESIGN
134 attributes. This applies to both regular files and other types (directories, 134 attributes. This applies to both regular files and other types (directories,
135 device files, symlinks, etc.). 135 device files, symlinks, etc.).
136 136
137* Credentials are generated per object (inode and superblock) when they is 137* Credentials are generated per object (inode and superblock) when they are
138 created in memory (read off disk or created). The credential works for all 138 created in memory (read from disk or created). The credential works for all
139 operations and is used as long as the object remains in memory. 139 operations and is used as long as the object remains in memory.
140 140
141* Async OSD operations are used whenever possible, but the target may execute 141* Async OSD operations are used whenever possible, but the target may execute
@@ -145,7 +145,8 @@ DESIGN
145 from executing in reverse order: 145 from executing in reverse order:
146 - The following are handled with the OBJ_CREATED and OBJ_2BCREATED 146 - The following are handled with the OBJ_CREATED and OBJ_2BCREATED
147 flags. OBJ_CREATED is set when we know the object exists on the OSD - 147 flags. OBJ_CREATED is set when we know the object exists on the OSD -
148 in create's callback function, and when we successfully do a read_inode. 148 in create's callback function, and when we successfully do a
149 read_inode.
149 OBJ_2BCREATED is set in the beginning of the create function, so we 150 OBJ_2BCREATED is set in the beginning of the create function, so we
150 know that we should wait. 151 know that we should wait.
151 - create/delete: delete should wait until the object is created 152 - create/delete: delete should wait until the object is created
diff --git a/Documentation/filesystems/ext3.txt b/Documentation/filesystems/ext3.txt
index 05d5cf1d743f..867c5b50cb42 100644
--- a/Documentation/filesystems/ext3.txt
+++ b/Documentation/filesystems/ext3.txt
@@ -32,8 +32,8 @@ journal_dev=devnum When the external journal device's major/minor numbers
32 identified through its new major/minor numbers encoded 32 identified through its new major/minor numbers encoded
33 in devnum. 33 in devnum.
34 34
35noload Don't load the journal on mounting. Note that this forces 35norecovery Don't load the journal on mounting. Note that this forces
36 mount of inconsistent filesystem, which can lead to 36noload mount of inconsistent filesystem, which can lead to
37 various problems. 37 various problems.
38 38
39data=journal All data are committed into the journal prior to being 39data=journal All data are committed into the journal prior to being
diff --git a/Documentation/filesystems/ext4.txt b/Documentation/filesystems/ext4.txt
index bf4f4b7e11b3..af6885c3c821 100644
--- a/Documentation/filesystems/ext4.txt
+++ b/Documentation/filesystems/ext4.txt
@@ -134,9 +134,15 @@ ro Mount filesystem read only. Note that ext4 will
134 mount options "ro,noload" can be used to prevent 134 mount options "ro,noload" can be used to prevent
135 writes to the filesystem. 135 writes to the filesystem.
136 136
137journal_checksum Enable checksumming of the journal transactions.
138 This will allow the recovery code in e2fsck and the
139 kernel to detect corruption in the kernel. It is a
140 compatible change and will be ignored by older kernels.
141
137journal_async_commit Commit block can be written to disk without waiting 142journal_async_commit Commit block can be written to disk without waiting
138 for descriptor blocks. If enabled older kernels cannot 143 for descriptor blocks. If enabled older kernels cannot
139 mount the device. 144 mount the device. This will enable 'journal_checksum'
145 internally.
140 146
141journal=update Update the ext4 file system's journal to the current 147journal=update Update the ext4 file system's journal to the current
142 format. 148 format.
@@ -147,8 +153,8 @@ journal_dev=devnum When the external journal device's major/minor numbers
147 identified through its new major/minor numbers encoded 153 identified through its new major/minor numbers encoded
148 in devnum. 154 in devnum.
149 155
150noload Don't load the journal on mounting. Note that 156norecovery Don't load the journal on mounting. Note that
151 if the filesystem was not unmounted cleanly, 157noload if the filesystem was not unmounted cleanly,
152 skipping the journal replay will lead to the 158 skipping the journal replay will lead to the
153 filesystem containing inconsistencies that can 159 filesystem containing inconsistencies that can
154 lead to any number of problems. 160 lead to any number of problems.
@@ -347,6 +353,12 @@ noauto_da_alloc replacing existing files via patterns such as
347 system crashes before the delayed allocation 353 system crashes before the delayed allocation
348 blocks are forced to disk. 354 blocks are forced to disk.
349 355
356discard Controls whether ext4 should issue discard/TRIM
357nodiscard(*) commands to the underlying block device when
358 blocks are freed. This is useful for SSD devices
359 and sparse/thinly-provisioned LUNs, but it is off
360 by default until sufficient testing has been done.
361
350Data Mode 362Data Mode
351========= 363=========
352There are 3 different data modes: 364There are 3 different data modes:
diff --git a/Documentation/filesystems/nilfs2.txt b/Documentation/filesystems/nilfs2.txt
index 01539f410676..4949fcaa6b6a 100644
--- a/Documentation/filesystems/nilfs2.txt
+++ b/Documentation/filesystems/nilfs2.txt
@@ -49,8 +49,7 @@ Mount options
49NILFS2 supports the following mount options: 49NILFS2 supports the following mount options:
50(*) == default 50(*) == default
51 51
52barrier=on(*) This enables/disables barriers. barrier=off disables 52nobarrier Disables barriers.
53 it, barrier=on enables it.
54errors=continue(*) Keep going on a filesystem error. 53errors=continue(*) Keep going on a filesystem error.
55errors=remount-ro Remount the filesystem read-only on an error. 54errors=remount-ro Remount the filesystem read-only on an error.
56errors=panic Panic and halt the machine if an error occurs. 55errors=panic Panic and halt the machine if an error occurs.
@@ -71,6 +70,10 @@ order=strict Apply strict in-order semantics that preserves sequence
71 blocks. That means, it is guaranteed that no 70 blocks. That means, it is guaranteed that no
72 overtaking of events occurs in the recovered file 71 overtaking of events occurs in the recovered file
73 system after a crash. 72 system after a crash.
73norecovery Disable recovery of the filesystem on mount.
74 This disables every write access on the device for
75 read-only mounts or snapshots. This option will fail
76 for r/w mounts on an unclean volume.
74 77
75NILFS2 usage 78NILFS2 usage
76============ 79============
diff --git a/Documentation/filesystems/ocfs2.txt b/Documentation/filesystems/ocfs2.txt
index c2a0871280a0..c58b9f5ba002 100644
--- a/Documentation/filesystems/ocfs2.txt
+++ b/Documentation/filesystems/ocfs2.txt
@@ -20,15 +20,16 @@ Lots of code taken from ext3 and other projects.
20Authors in alphabetical order: 20Authors in alphabetical order:
21Joel Becker <joel.becker@oracle.com> 21Joel Becker <joel.becker@oracle.com>
22Zach Brown <zach.brown@oracle.com> 22Zach Brown <zach.brown@oracle.com>
23Mark Fasheh <mark.fasheh@oracle.com> 23Mark Fasheh <mfasheh@suse.com>
24Kurt Hackel <kurt.hackel@oracle.com> 24Kurt Hackel <kurt.hackel@oracle.com>
25Tao Ma <tao.ma@oracle.com>
25Sunil Mushran <sunil.mushran@oracle.com> 26Sunil Mushran <sunil.mushran@oracle.com>
26Manish Singh <manish.singh@oracle.com> 27Manish Singh <manish.singh@oracle.com>
28Tiger Yang <tiger.yang@oracle.com>
27 29
28Caveats 30Caveats
29======= 31=======
30Features which OCFS2 does not support yet: 32Features which OCFS2 does not support yet:
31 - quotas
32 - Directory change notification (F_NOTIFY) 33 - Directory change notification (F_NOTIFY)
33 - Distributed Caching (F_SETLEASE/F_GETLEASE/break_lease) 34 - Distributed Caching (F_SETLEASE/F_GETLEASE/break_lease)
34 35
@@ -70,7 +71,6 @@ commit=nrsec (*) Ocfs2 can be told to sync all its data and metadata
70 performance. 71 performance.
71localalloc=8(*) Allows custom localalloc size in MB. If the value is too 72localalloc=8(*) Allows custom localalloc size in MB. If the value is too
72 large, the fs will silently revert it to the default. 73 large, the fs will silently revert it to the default.
73 Localalloc is not enabled for local mounts.
74localflocks This disables cluster aware flock. 74localflocks This disables cluster aware flock.
75inode64 Indicates that Ocfs2 is allowed to create inodes at 75inode64 Indicates that Ocfs2 is allowed to create inodes at
76 any location in the filesystem, including those which 76 any location in the filesystem, including those which
diff --git a/Documentation/filesystems/proc.txt b/Documentation/filesystems/proc.txt
index 2c48f945546b..220cc6376ef8 100644
--- a/Documentation/filesystems/proc.txt
+++ b/Documentation/filesystems/proc.txt
@@ -38,6 +38,7 @@ Table of Contents
38 3.3 /proc/<pid>/io - Display the IO accounting fields 38 3.3 /proc/<pid>/io - Display the IO accounting fields
39 3.4 /proc/<pid>/coredump_filter - Core dump filtering settings 39 3.4 /proc/<pid>/coredump_filter - Core dump filtering settings
40 3.5 /proc/<pid>/mountinfo - Information about mounts 40 3.5 /proc/<pid>/mountinfo - Information about mounts
41 3.6 /proc/<pid>/comm & /proc/<pid>/task/<tid>/comm
41 42
42 43
43------------------------------------------------------------------------------ 44------------------------------------------------------------------------------
@@ -1072,7 +1073,8 @@ second). The meanings of the columns are as follows, from left to right:
1072- irq: servicing interrupts 1073- irq: servicing interrupts
1073- softirq: servicing softirqs 1074- softirq: servicing softirqs
1074- steal: involuntary wait 1075- steal: involuntary wait
1075- guest: running a guest 1076- guest: running a normal guest
1077- guest_nice: running a niced guest
1076 1078
1077The "intr" line gives counts of interrupts serviced since boot time, for each 1079The "intr" line gives counts of interrupts serviced since boot time, for each
1078of the possible system interrupts. The first column is the total of all 1080of the possible system interrupts. The first column is the total of all
@@ -1088,8 +1090,8 @@ The "processes" line gives the number of processes and threads created, which
1088includes (but is not limited to) those created by calls to the fork() and 1090includes (but is not limited to) those created by calls to the fork() and
1089clone() system calls. 1091clone() system calls.
1090 1092
1091The "procs_running" line gives the number of processes currently running on 1093The "procs_running" line gives the total number of threads that are
1092CPUs. 1094running or ready to run (i.e., the total number of runnable threads).
1093 1095
1094The "procs_blocked" line gives the number of processes currently blocked, 1096The "procs_blocked" line gives the number of processes currently blocked,
1095waiting for I/O to complete. 1097waiting for I/O to complete.
@@ -1408,3 +1410,11 @@ For more information on mount propagation see:
1408 1410
1409 Documentation/filesystems/sharedsubtree.txt 1411 Documentation/filesystems/sharedsubtree.txt
1410 1412
1413
14143.6 /proc/<pid>/comm & /proc/<pid>/task/<tid>/comm
1415--------------------------------------------------------
1416These files provide a method to access a tasks comm value. It also allows for
1417a task to set its own or one of its thread siblings comm value. The comm value
1418is limited in size compared to the cmdline value, so writing anything longer
1419then the kernel's TASK_COMM_LEN (currently 16 chars) will result in a truncated
1420comm value.
diff --git a/Documentation/filesystems/vfs.txt b/Documentation/filesystems/vfs.txt
index 623f094c9d8d..3de2f32edd90 100644
--- a/Documentation/filesystems/vfs.txt
+++ b/Documentation/filesystems/vfs.txt
@@ -472,7 +472,7 @@ __sync_single_inode) to check if ->writepages has been successful in
472writing out the whole address_space. 472writing out the whole address_space.
473 473
474The Writeback tag is used by filemap*wait* and sync_page* functions, 474The Writeback tag is used by filemap*wait* and sync_page* functions,
475via wait_on_page_writeback_range, to wait for all writeback to 475via filemap_fdatawait_range, to wait for all writeback to
476complete. While waiting ->sync_page (if defined) will be called on 476complete. While waiting ->sync_page (if defined) will be called on
477each page that is found to require writeback. 477each page that is found to require writeback.
478 478
diff --git a/Documentation/gpio.txt b/Documentation/gpio.txt
index fa4dc077ae0e..e4e7daed2ba8 100644
--- a/Documentation/gpio.txt
+++ b/Documentation/gpio.txt
@@ -380,7 +380,7 @@ rare; use gpiochip_remove() when it is unavoidable.
380 380
381Most often a gpio_chip is part of an instance-specific structure with state 381Most often a gpio_chip is part of an instance-specific structure with state
382not exposed by the GPIO interfaces, such as addressing, power management, 382not exposed by the GPIO interfaces, such as addressing, power management,
383and more. Chips such as codecs will have complex non-GPIO state, 383and more. Chips such as codecs will have complex non-GPIO state.
384 384
385Any debugfs dump method should normally ignore signals which haven't been 385Any debugfs dump method should normally ignore signals which haven't been
386requested as GPIOs. They can use gpiochip_is_requested(), which returns 386requested as GPIOs. They can use gpiochip_is_requested(), which returns
@@ -531,7 +531,7 @@ and have the following read/write attributes:
531 This file exists only if the pin can be configured as an 531 This file exists only if the pin can be configured as an
532 interrupt generating input pin. 532 interrupt generating input pin.
533 533
534GPIO controllers have paths like /sys/class/gpio/chipchip42/ (for the 534GPIO controllers have paths like /sys/class/gpio/gpiochip42/ (for the
535controller implementing GPIOs starting at #42) and have the following 535controller implementing GPIOs starting at #42) and have the following
536read-only attributes: 536read-only attributes:
537 537
diff --git a/Documentation/hwmon/adt7473 b/Documentation/hwmon/adt7473
index 1cbf671822e2..446612bd1fb9 100644
--- a/Documentation/hwmon/adt7473
+++ b/Documentation/hwmon/adt7473
@@ -9,6 +9,8 @@ Supported chips:
9 9
10Author: Darrick J. Wong 10Author: Darrick J. Wong
11 11
12This driver is depreacted, please use the adt7475 driver instead.
13
12Description 14Description
13----------- 15-----------
14 16
diff --git a/Documentation/hwmon/adt7475 b/Documentation/hwmon/adt7475
index a2b1abec850e..0502f2b464e1 100644
--- a/Documentation/hwmon/adt7475
+++ b/Documentation/hwmon/adt7475
@@ -1,87 +1,117 @@
1This describes the interface for the ADT7475 driver: 1Kernel driver adt7475
2 2=====================
3(there are 4 fans, numbered fan1 to fan4): 3
4 4Supported chips:
5fanX_input Read the current speed of the fan (in RPMs) 5 * Analog Devices ADT7473
6fanX_min Read/write the minimum speed of the fan. Dropping 6 Prefix: 'adt7473'
7 below this sets an alarm. 7 Addresses scanned: I2C 0x2C, 0x2D, 0x2E
8 8 Datasheet: Publicly available at the On Semiconductors website
9(there are three PWMs, numbered pwm1 to pwm3): 9 * Analog Devices ADT7475
10 10 Prefix: 'adt7475'
11pwmX Read/write the current duty cycle of the PWM. Writes 11 Addresses scanned: I2C 0x2E
12 only have effect when auto mode is turned off (see 12 Datasheet: Publicly available at the On Semiconductors website
13 below). Range is 0 - 255. 13 * Analog Devices ADT7476
14 14 Prefix: 'adt7476'
15pwmX_enable Fan speed control method: 15 Addresses scanned: I2C 0x2C, 0x2D, 0x2E
16 16 Datasheet: Publicly available at the On Semiconductors website
17 0 - No control (fan at full speed) 17 * Analog Devices ADT7490
18 1 - Manual fan speed control (using pwm[1-*]) 18 Prefix: 'adt7490'
19 2 - Automatic fan speed control 19 Addresses scanned: I2C 0x2C, 0x2D, 0x2E
20 20 Datasheet: Publicly available at the On Semiconductors website
21pwmX_auto_channels_temp Select which channels affect this PWM 21
22 22Authors:
23 1 - TEMP1 controls PWM 23 Jordan Crouse
24 2 - TEMP2 controls PWM 24 Hans de Goede
25 4 - TEMP3 controls PWM 25 Darrick J. Wong (documentation)
26 6 - TEMP2 and TEMP3 control PWM 26 Jean Delvare
27 7 - All three inputs control PWM 27
28 28
29pwmX_freq Read/write the PWM frequency in Hz. The number 29Description
30 should be one of the following: 30-----------
31 31
32 11 Hz 32This driver implements support for the Analog Devices ADT7473, ADT7475,
33 14 Hz 33ADT7476 and ADT7490 chip family. The ADT7473 and ADT7475 differ only in
34 22 Hz 34minor details. The ADT7476 has additional features, including extra voltage
35 29 Hz 35measurement inputs and VID support. The ADT7490 also has additional
36 35 Hz 36features, including extra voltage measurement inputs and PECI support. All
37 44 Hz 37the supported chips will be collectively designed by the name "ADT747x" in
38 58 Hz 38the rest of this document.
39 88 Hz 39
40 40The ADT747x uses the 2-wire interface compatible with the SMBus 2.0
41pwmX_auto_point1_pwm Read/write the minimum PWM duty cycle in automatic mode 41specification. Using an analog to digital converter it measures three (3)
42 42temperatures and two (2) or more voltages. It has four (4) 16-bit counters
43pwmX_auto_point2_pwm Read/write the maximum PWM duty cycle in automatic mode 43for measuring fan speed. There are three (3) PWM outputs that can be used
44 44to control fan speed.
45(there are three temperature settings numbered temp1 to temp3): 45
46 46A sophisticated control system for the PWM outputs is designed into the
47tempX_input Read the current temperature. The value is in milli 47ADT747x that allows fan speed to be adjusted automatically based on any of the
48 degrees of Celsius. 48three temperature sensors. Each PWM output is individually adjustable and
49 49programmable. Once configured, the ADT747x will adjust the PWM outputs in
50tempX_max Read/write the upper temperature limit - exceeding this 50response to the measured temperatures without further host intervention.
51 will cause an alarm. 51This feature can also be disabled for manual control of the PWM's.
52 52
53tempX_min Read/write the lower temperature limit - exceeding this 53Each of the measured inputs (voltage, temperature, fan speed) has
54 will cause an alarm. 54corresponding high/low limit values. The ADT747x will signal an ALARM if
55 55any measured value exceeds either limit.
56tempX_offset Read/write the temperature adjustment offset 56
57 57The ADT747x samples all inputs continuously. The driver will not read
58tempX_crit Read/write the THERM limit for remote1. 58the registers more often than once every other second. Further,
59 59configuration data is only read once per minute.
60tempX_crit_hyst Set the temperature value below crit where the 60
61 fans will stay on - this helps drive the temperature 61Chip Differences Summary
62 low enough so it doesn't stay near the edge and 62------------------------
63 cause THERM to keep tripping. 63
64 64ADT7473:
65tempX_auto_point1_temp Read/write the minimum temperature where the fans will 65 * 2 voltage inputs
66 turn on in automatic mode. 66 * system acoustics optimizations (not implemented)
67 67
68tempX_auto_point2_temp Read/write the maximum temperature over which the fans 68ADT7475:
69 will run in automatic mode. tempX_auto_point1_temp 69 * 2 voltage inputs
70 and tempX_auto_point2_temp together define the 70
71 range of automatic control. 71ADT7476:
72 72 * 5 voltage inputs
73tempX_alarm Read a 1 if the max/min alarm is set 73 * VID support
74tempX_fault Read a 1 if either temp1 or temp3 diode has a fault 74
75 75ADT7490:
76(There are two voltage settings, in1 and in2): 76 * 6 voltage inputs
77 77 * 1 Imon input (not implemented)
78inX_input Read the current voltage on VCC. Value is in 78 * PECI support (not implemented)
79 millivolts. 79 * 2 GPIO pins (not implemented)
80 80 * system acoustics optimizations (not implemented)
81inX_min read/write the minimum voltage limit. 81
82 Dropping below this causes an alarm. 82Special Features
83 83----------------
84inX_max read/write the maximum voltage limit. 84
85 Exceeding this causes an alarm. 85The ADT747x has a 10-bit ADC and can therefore measure temperatures
86 86with a resolution of 0.25 degree Celsius. Temperature readings can be
87inX_alarm Read a 1 if the max/min alarm is set. 87configured either for two's complement format or "Offset 64" format,
88wherein 64 is subtracted from the raw value to get the temperature value.
89
90The datasheet is very detailed and describes a procedure for determining
91an optimal configuration for the automatic PWM control.
92
93Fan Speed Control
94-----------------
95
96The driver exposes two trip points per PWM channel.
97
98point1: Set the PWM speed at the lower temperature bound
99point2: Set the PWM speed at the higher temperature bound
100
101The ADT747x will scale the PWM linearly between the lower and higher PWM
102speed when the temperature is between the two temperature boundaries.
103Temperature boundaries are associated to temperature channels rather than
104PWM outputs, and a given PWM output can be controlled by several temperature
105channels. As a result, the ADT747x may compute more than one PWM value
106for a channel at a given time, in which case the maximum value (fastest
107fan speed) is applied. PWM values range from 0 (off) to 255 (full speed).
108
109Fan speed may be set to maximum when the temperature sensor associated with
110the PWM control exceeds temp#_max.
111
112Notes
113-----
114
115The nVidia binary driver presents an ADT7473 chip via an on-card i2c bus.
116Unfortunately, they fail to set the i2c adapter class, so this driver may
117fail to find the chip until the nvidia driver is patched.
diff --git a/Documentation/hwmon/f71882fg b/Documentation/hwmon/f71882fg
index bee4c30bc1e2..a7952c2bd959 100644
--- a/Documentation/hwmon/f71882fg
+++ b/Documentation/hwmon/f71882fg
@@ -14,6 +14,10 @@ Supported chips:
14 Prefix: 'f71882fg' 14 Prefix: 'f71882fg'
15 Addresses scanned: none, address read from Super I/O config space 15 Addresses scanned: none, address read from Super I/O config space
16 Datasheet: Available from the Fintek website 16 Datasheet: Available from the Fintek website
17 * Fintek F71889FG
18 Prefix: 'f71889fg'
19 Addresses scanned: none, address read from Super I/O config space
20 Datasheet: Should become available on the Fintek website soon
17 * Fintek F8000 21 * Fintek F8000
18 Prefix: 'f8000' 22 Prefix: 'f8000'
19 Addresses scanned: none, address read from Super I/O config space 23 Addresses scanned: none, address read from Super I/O config space
@@ -51,6 +55,12 @@ supported. The right one to use depends on external circuitry on the
51motherboard, so the driver assumes that the BIOS set the method 55motherboard, so the driver assumes that the BIOS set the method
52properly. 56properly.
53 57
58Note that the lowest numbered temperature zone trip point corresponds to
59to the border between the highest and one but highest temperature zones, and
60vica versa. So the temperature zone trip points 1-4 (or 1-2) go from high temp
61to low temp! This is how things are implemented in the IC, and the driver
62mimicks this.
63
54There are 2 modes to specify the speed of the fan, PWM duty cycle (or DC 64There are 2 modes to specify the speed of the fan, PWM duty cycle (or DC
55voltage) mode, where 0-100% duty cycle (0-100% of 12V) is specified. And RPM 65voltage) mode, where 0-100% duty cycle (0-100% of 12V) is specified. And RPM
56mode where the actual RPM of the fan (as measured) is controlled and the speed 66mode where the actual RPM of the fan (as measured) is controlled and the speed
diff --git a/Documentation/hwmon/it87 b/Documentation/hwmon/it87
index 659315d98e00..f9ba96c0ac4a 100644
--- a/Documentation/hwmon/it87
+++ b/Documentation/hwmon/it87
@@ -86,7 +86,6 @@ The IT8712F and IT8716F additionally feature VID inputs, used to report
86the Vcore voltage of the processor. The early IT8712F have 5 VID pins, 86the Vcore voltage of the processor. The early IT8712F have 5 VID pins,
87the IT8716F and late IT8712F have 6. They are shared with other functions 87the IT8716F and late IT8712F have 6. They are shared with other functions
88though, so the functionality may not be available on a given system. 88though, so the functionality may not be available on a given system.
89The driver dumbly assume it is there.
90 89
91The IT8718F and IT8720F also features VID inputs (up to 8 pins) but the value 90The IT8718F and IT8720F also features VID inputs (up to 8 pins) but the value
92is stored in the Super-I/O configuration space. Due to technical limitations, 91is stored in the Super-I/O configuration space. Due to technical limitations,
diff --git a/Documentation/hwmon/lis3lv02d b/Documentation/hwmon/lis3lv02d
index effe949a7282..06534f25e643 100644
--- a/Documentation/hwmon/lis3lv02d
+++ b/Documentation/hwmon/lis3lv02d
@@ -3,7 +3,8 @@ Kernel driver lis3lv02d
3 3
4Supported chips: 4Supported chips:
5 5
6 * STMicroelectronics LIS3LV02DL and LIS3LV02DQ 6 * STMicroelectronics LIS3LV02DL, LIS3LV02DQ (12 bits precision)
7 * STMicroelectronics LIS302DL, LIS3L02DQ, LIS331DL (8 bits)
7 8
8Authors: 9Authors:
9 Yan Burman <burman.yan@gmail.com> 10 Yan Burman <burman.yan@gmail.com>
@@ -13,32 +14,52 @@ Authors:
13Description 14Description
14----------- 15-----------
15 16
16This driver provides support for the accelerometer found in various HP 17This driver provides support for the accelerometer found in various HP laptops
17laptops sporting the feature officially called "HP Mobile Data 18sporting the feature officially called "HP Mobile Data Protection System 3D" or
18Protection System 3D" or "HP 3D DriveGuard". It detects automatically 19"HP 3D DriveGuard". It detects automatically laptops with this sensor. Known
19laptops with this sensor. Known models (for now the HP 2133, nc6420, 20models (full list can be found in drivers/hwmon/hp_accel.c) will have their
20nc2510, nc8510, nc84x0, nw9440 and nx9420) will have their axis 21axis automatically oriented on standard way (eg: you can directly play
21automatically oriented on standard way (eg: you can directly play 22neverball). The accelerometer data is readable via
22neverball). The accelerometer data is readable via 23/sys/devices/platform/lis3lv02d. Reported values are scaled
23/sys/devices/platform/lis3lv02d. 24to mg values (1/1000th of earth gravity).
24 25
25Sysfs attributes under /sys/devices/platform/lis3lv02d/: 26Sysfs attributes under /sys/devices/platform/lis3lv02d/:
26position - 3D position that the accelerometer reports. Format: "(x,y,z)" 27position - 3D position that the accelerometer reports. Format: "(x,y,z)"
27calibrate - read: values (x, y, z) that are used as the base for input 28rate - read reports the sampling rate of the accelerometer device in HZ.
28 class device operation. 29 write changes sampling rate of the accelerometer device.
29 write: forces the base to be recalibrated with the current 30 Only values which are supported by HW are accepted.
30 position. 31selftest - performs selftest for the chip as specified by chip manufacturer.
31rate - reports the sampling rate of the accelerometer device in HZ
32 32
33This driver also provides an absolute input class device, allowing 33This driver also provides an absolute input class device, allowing
34the laptop to act as a pinball machine-esque joystick. 34the laptop to act as a pinball machine-esque joystick. Joystick device can be
35calibrated. Joystick device can be in two different modes.
36By default output values are scaled between -32768 .. 32767. In joystick raw
37mode, joystick and sysfs position entry have the same scale. There can be
38small difference due to input system fuzziness feature.
39Events are also available as input event device.
40
41Selftest is meant only for hardware diagnostic purposes. It is not meant to be
42used during normal operations. Position data is not corrupted during selftest
43but interrupt behaviour is not guaranteed to work reliably. In test mode, the
44sensing element is internally moved little bit. Selftest measures difference
45between normal mode and test mode. Chip specifications tell the acceptance
46limit for each type of the chip. Limits are provided via platform data
47to allow adjustment of the limits without a change to the actual driver.
48Seltest returns either "OK x y z" or "FAIL x y z" where x, y and z are
49measured difference between modes. Axes are not remapped in selftest mode.
50Measurement values are provided to help HW diagnostic applications to make
51final decision.
52
53On HP laptops, if the led infrastructure is activated, support for a led
54indicating disk protection will be provided as /sys/class/leds/hp::hddprotect.
35 55
36Another feature of the driver is misc device called "freefall" that 56Another feature of the driver is misc device called "freefall" that
37acts similar to /dev/rtc and reacts on free-fall interrupts received 57acts similar to /dev/rtc and reacts on free-fall interrupts received
38from the device. It supports blocking operations, poll/select and 58from the device. It supports blocking operations, poll/select and
39fasync operation modes. You must read 1 bytes from the device. The 59fasync operation modes. You must read 1 bytes from the device. The
40result is number of free-fall interrupts since the last successful 60result is number of free-fall interrupts since the last successful
41read (or 255 if number of interrupts would not fit). 61read (or 255 if number of interrupts would not fit). See the hpfall.c
62file for an example on using the device.
42 63
43 64
44Axes orientation 65Axes orientation
@@ -55,7 +76,7 @@ the accelerometer are converted into a "standard" organisation of the axes
55 * If the laptop is put upside-down, Z becomes negative 76 * If the laptop is put upside-down, Z becomes negative
56 77
57If your laptop model is not recognized (cf "dmesg"), you can send an 78If your laptop model is not recognized (cf "dmesg"), you can send an
58email to the authors to add it to the database. When reporting a new 79email to the maintainer to add it to the database. When reporting a new
59laptop, please include the output of "dmidecode" plus the value of 80laptop, please include the output of "dmidecode" plus the value of
60/sys/devices/platform/lis3lv02d/position in these four cases. 81/sys/devices/platform/lis3lv02d/position in these four cases.
61 82
diff --git a/Documentation/hwmon/mc13783-adc b/Documentation/hwmon/mc13783-adc
new file mode 100644
index 000000000000..044531a86405
--- /dev/null
+++ b/Documentation/hwmon/mc13783-adc
@@ -0,0 +1,50 @@
1Kernel driver mc13783-adc
2=========================
3
4Supported chips:
5 * Freescale Atlas MC13783
6 Prefix: 'mc13783_adc'
7 Datasheet: http://www.freescale.com/files/rf_if/doc/data_sheet/MC13783.pdf?fsrch=1
8
9Authors:
10 Sascha Hauer <s.hauer@pengutronix.de>
11 Luotao Fu <l.fu@pengutronix.de>
12
13Description
14-----------
15
16The Freescale MC13783 is a Power Management and Audio Circuit. Among
17other things it contains a 10-bit A/D converter. The converter has 16
18channels which can be used in different modes.
19The A/D converter has a resolution of 2.25mV. Channels 0-4 have
20a dedicated meaning with chip internal scaling applied. Channels 5-7
21can be used as general purpose inputs or alternatively in a dedicated
22mode. Channels 12-15 are occupied by the touchscreen if it's active.
23
24Currently the driver only supports channels 2 and 5-15 with no alternative
25modes for channels 5-7.
26
27See this table for the meaning of the different channels and their chip
28internal scaling:
29
30Channel Signal Input Range Scaling
31-------------------------------------------------------------------------------
320 Battery Voltage (BATT) 2.50 - 4.65V -2.40V
331 Battery Current (BATT - BATTISNS) -50 - 50 mV x20
342 Application Supply (BP) 2.50 - 4.65V -2.40V
353 Charger Voltage (CHRGRAW) 0 - 10V / /5
36 0 - 20V /10
374 Charger Current (CHRGISNSP-CHRGISNSN) -0.25V - 0.25V x4
385 General Purpose ADIN5 / Battery Pack Thermistor 0 - 2.30V No
396 General Purpose ADIN6 / Backup Voltage (LICELL) 0 - 2.30V / No /
40 1.50 - 3.50V -1.20V
417 General Purpose ADIN7 / UID / Die Temperature 0 - 2.30V / No /
42 0 - 2.55V / x0.9 / No
438 General Purpose ADIN8 0 - 2.30V No
449 General Purpose ADIN9 0 - 2.30V No
4510 General Purpose ADIN10 0 - 2.30V No
4611 General Purpose ADIN11 0 - 2.30V No
4712 General Purpose TSX1 / Touchscreen X-plate 1 0 - 2.30V No
4813 General Purpose TSX2 / Touchscreen X-plate 2 0 - 2.30V No
4914 General Purpose TSY1 / Touchscreen Y-plate 1 0 - 2.30V No
5015 General Purpose TSY2 / Touchscreen Y-plate 2 0 - 2.30V No
diff --git a/Documentation/hwmon/sysfs-interface b/Documentation/hwmon/sysfs-interface
index dcbd502c8792..3de6b0bcb147 100644
--- a/Documentation/hwmon/sysfs-interface
+++ b/Documentation/hwmon/sysfs-interface
@@ -225,8 +225,6 @@ pwm[1-*]_auto_point[1-*]_temp_hyst
225 to PWM output channels. 225 to PWM output channels.
226 RW 226 RW
227 227
228OR
229
230temp[1-*]_auto_point[1-*]_pwm 228temp[1-*]_auto_point[1-*]_pwm
231temp[1-*]_auto_point[1-*]_temp 229temp[1-*]_auto_point[1-*]_temp
232temp[1-*]_auto_point[1-*]_temp_hyst 230temp[1-*]_auto_point[1-*]_temp_hyst
@@ -235,6 +233,15 @@ temp[1-*]_auto_point[1-*]_temp_hyst
235 to temperature channels. 233 to temperature channels.
236 RW 234 RW
237 235
236There is a third case where trip points are associated to both PWM output
237channels and temperature channels: the PWM values are associated to PWM
238output channels while the temperature values are associated to temperature
239channels. In that case, the result is determined by the mapping between
240temperature inputs and PWM outputs. When several temperature inputs are
241mapped to a given PWM output, this leads to several candidate PWM values.
242The actual result is up to the chip, but in general the highest candidate
243value (fastest fan speed) wins.
244
238 245
239**************** 246****************
240* Temperatures * 247* Temperatures *
@@ -353,10 +360,20 @@ power[1-*]_average Average power use
353 Unit: microWatt 360 Unit: microWatt
354 RO 361 RO
355 362
356power[1-*]_average_interval Power use averaging interval 363power[1-*]_average_interval Power use averaging interval. A poll
364 notification is sent to this file if the
365 hardware changes the averaging interval.
357 Unit: milliseconds 366 Unit: milliseconds
358 RW 367 RW
359 368
369power[1-*]_average_interval_max Maximum power use averaging interval
370 Unit: milliseconds
371 RO
372
373power[1-*]_average_interval_min Minimum power use averaging interval
374 Unit: milliseconds
375 RO
376
360power[1-*]_average_highest Historical average maximum power use 377power[1-*]_average_highest Historical average maximum power use
361 Unit: microWatt 378 Unit: microWatt
362 RO 379 RO
@@ -365,6 +382,18 @@ power[1-*]_average_lowest Historical average minimum power use
365 Unit: microWatt 382 Unit: microWatt
366 RO 383 RO
367 384
385power[1-*]_average_max A poll notification is sent to
386 power[1-*]_average when power use
387 rises above this value.
388 Unit: microWatt
389 RW
390
391power[1-*]_average_min A poll notification is sent to
392 power[1-*]_average when power use
393 sinks below this value.
394 Unit: microWatt
395 RW
396
368power[1-*]_input Instantaneous power use 397power[1-*]_input Instantaneous power use
369 Unit: microWatt 398 Unit: microWatt
370 RO 399 RO
@@ -381,6 +410,39 @@ power[1-*]_reset_history Reset input_highest, input_lowest,
381 average_highest and average_lowest. 410 average_highest and average_lowest.
382 WO 411 WO
383 412
413power[1-*]_accuracy Accuracy of the power meter.
414 Unit: Percent
415 RO
416
417power[1-*]_alarm 1 if the system is drawing more power than the
418 cap allows; 0 otherwise. A poll notification is
419 sent to this file when the power use exceeds the
420 cap. This file only appears if the cap is known
421 to be enforced by hardware.
422 RO
423
424power[1-*]_cap If power use rises above this limit, the
425 system should take action to reduce power use.
426 A poll notification is sent to this file if the
427 cap is changed by the hardware. The *_cap
428 files only appear if the cap is known to be
429 enforced by hardware.
430 Unit: microWatt
431 RW
432
433power[1-*]_cap_hyst Margin of hysteresis built around capping and
434 notification.
435 Unit: microWatt
436 RW
437
438power[1-*]_cap_max Maximum cap that can be set.
439 Unit: microWatt
440 RO
441
442power[1-*]_cap_min Minimum cap that can be set.
443 Unit: microWatt
444 RO
445
384********** 446**********
385* Energy * 447* Energy *
386********** 448**********
diff --git a/Documentation/hwmon/w83627ehf b/Documentation/hwmon/w83627ehf
index 02b74899edaf..b7e42ec4b26b 100644
--- a/Documentation/hwmon/w83627ehf
+++ b/Documentation/hwmon/w83627ehf
@@ -81,8 +81,14 @@ pwm[1-4] - this file stores PWM duty cycle or DC value (fan speed) in range:
81 0 (stop) to 255 (full) 81 0 (stop) to 255 (full)
82 82
83pwm[1-4]_enable - this file controls mode of fan/temperature control: 83pwm[1-4]_enable - this file controls mode of fan/temperature control:
84 * 1 Manual Mode, write to pwm file any value 0-255 (full speed) 84 * 1 Manual mode, write to pwm file any value 0-255 (full speed)
85 * 2 Thermal Cruise 85 * 2 "Thermal Cruise" mode
86 * 3 "Fan Speed Cruise" mode
87 * 4 "Smart Fan III" mode
88
89pwm[1-4]_mode - controls if output is PWM or DC level
90 * 0 DC output (0 - 12v)
91 * 1 PWM output
86 92
87Thermal Cruise mode 93Thermal Cruise mode
88------------------- 94-------------------
diff --git a/Documentation/hwmon/w83627hf b/Documentation/hwmon/w83627hf
index 6ee36dbafd64..44dd2bcc72bd 100644
--- a/Documentation/hwmon/w83627hf
+++ b/Documentation/hwmon/w83627hf
@@ -32,8 +32,6 @@ Authors:
32Module Parameters 32Module Parameters
33----------------- 33-----------------
34 34
35* force_addr: int
36 Initialize the ISA address of the sensors
37* force_i2c: int 35* force_i2c: int
38 Initialize the I2C address of the sensors 36 Initialize the I2C address of the sensors
39* init: int 37* init: int
@@ -70,3 +68,30 @@ doesn't help, you may just ignore the bogus VID reading with no harm done.
70For further information on this driver see the w83781d driver documentation. 68For further information on this driver see the w83781d driver documentation.
71 69
72[1] http://www.lm-sensors.org/browser/lm-sensors/trunk/doc/vid 70[1] http://www.lm-sensors.org/browser/lm-sensors/trunk/doc/vid
71
72Forcing the address
73-------------------
74
75The driver used to have a module parameter named force_addr, which could
76be used to force the base I/O address of the hardware monitoring block.
77This was meant as a workaround for mainboards with a broken BIOS. This
78module parameter is gone for technical reasons. If you need this feature,
79you can obtain the same result by using the isaset tool (part of
80lm-sensors) before loading the driver:
81
82# Enter the Super I/O config space
83isaset -y -f 0x2e 0x87
84isaset -y -f 0x2e 0x87
85
86# Select the hwmon logical device
87isaset -y 0x2e 0x2f 0x07 0x0b
88
89# Set the base I/O address (to 0x290 in this example)
90isaset -y 0x2e 0x2f 0x60 0x02
91isaset -y 0x2e 0x2f 0x61 0x90
92
93# Exit the Super-I/O config space
94isaset -y -f 0x2e 0xaa
95
96The above sequence assumes a Super-I/O config space at 0x2e/0x2f, but
970x4e/0x4f is also possible.
diff --git a/Documentation/i2c/busses/i2c-piix4 b/Documentation/i2c/busses/i2c-piix4
index c5b37c570554..ac540c71c7eb 100644
--- a/Documentation/i2c/busses/i2c-piix4
+++ b/Documentation/i2c/busses/i2c-piix4
@@ -8,7 +8,7 @@ Supported adapters:
8 Datasheet: Only available via NDA from ServerWorks 8 Datasheet: Only available via NDA from ServerWorks
9 * ATI IXP200, IXP300, IXP400, SB600, SB700 and SB800 southbridges 9 * ATI IXP200, IXP300, IXP400, SB600, SB700 and SB800 southbridges
10 Datasheet: Not publicly available 10 Datasheet: Not publicly available
11 * AMD SB900 11 * AMD Hudson-2
12 Datasheet: Not publicly available 12 Datasheet: Not publicly available
13 * Standard Microsystems (SMSC) SLC90E66 (Victory66) southbridge 13 * Standard Microsystems (SMSC) SLC90E66 (Victory66) southbridge
14 Datasheet: Publicly available at the SMSC website http://www.smsc.com 14 Datasheet: Publicly available at the SMSC website http://www.smsc.com
diff --git a/Documentation/i2c/busses/i2c-voodoo3 b/Documentation/i2c/busses/i2c-voodoo3
deleted file mode 100644
index 62d90a454d39..000000000000
--- a/Documentation/i2c/busses/i2c-voodoo3
+++ /dev/null
@@ -1,62 +0,0 @@
1Kernel driver i2c-voodoo3
2
3Supported adapters:
4 * 3dfx Voodoo3 based cards
5 * Voodoo Banshee based cards
6
7Authors:
8 Frodo Looijaard <frodol@dds.nl>,
9 Philip Edelbrock <phil@netroedge.com>,
10 Ralph Metzler <rjkm@thp.uni-koeln.de>,
11 Mark D. Studebaker <mdsxyz123@yahoo.com>
12
13Main contact: Philip Edelbrock <phil@netroedge.com>
14
15The code is based upon Ralph's test code (he did the hard stuff ;')
16
17Description
18-----------
19
20The 3dfx Voodoo3 chip contains two I2C interfaces (aka a I2C 'master' or
21'host').
22
23The first interface is used for DDC (Data Display Channel) which is a
24serial channel through the VGA monitor connector to a DDC-compliant
25monitor. This interface is defined by the Video Electronics Standards
26Association (VESA). The standards are available for purchase at
27http://www.vesa.org .
28
29The second interface is a general-purpose I2C bus. The intent by 3dfx was
30to allow manufacturers to add extra chips to the video card such as a
31TV-out chip such as the BT869 or possibly even I2C based temperature
32sensors like the ADM1021 or LM75.
33
34Stability
35---------
36
37Seems to be stable on the test machine, but needs more testing on other
38machines. Simultaneous accesses of the DDC and I2C busses may cause errors.
39
40Supported Devices
41-----------------
42
43Specifically, this driver was written and tested on the '3dfx Voodoo3 AGP
443000' which has a tv-out feature (s-video or composite). According to the
45docs and discussions, this code should work for any Voodoo3 based cards as
46well as Voodoo Banshee based cards. The DDC interface has been tested on a
47Voodoo Banshee card.
48
49Issues
50------
51
52Probably many, but it seems to work OK on my system. :')
53
54
55External Device Connection
56--------------------------
57
58The digital video input jumpers give availability to the I2C bus.
59Specifically, pins 13 and 25 (bottom row middle, and bottom right-end) are
60the I2C clock and I2C data lines, respectively. +5V and GND are probably
61also easily available making the addition of extra I2C/SMBus devices easy
62to implement.
diff --git a/Documentation/i2c/i2c-stub b/Documentation/i2c/i2c-stub
index 0d8be1c20c16..fa4b669c166b 100644
--- a/Documentation/i2c/i2c-stub
+++ b/Documentation/i2c/i2c-stub
@@ -2,9 +2,9 @@ MODULE: i2c-stub
2 2
3DESCRIPTION: 3DESCRIPTION:
4 4
5This module is a very simple fake I2C/SMBus driver. It implements four 5This module is a very simple fake I2C/SMBus driver. It implements five
6types of SMBus commands: write quick, (r/w) byte, (r/w) byte data, and 6types of SMBus commands: write quick, (r/w) byte, (r/w) byte data, (r/w)
7(r/w) word data. 7word data, and (r/w) I2C block data.
8 8
9You need to provide chip addresses as a module parameter when loading this 9You need to provide chip addresses as a module parameter when loading this
10driver, which will then only react to SMBus commands to these addresses. 10driver, which will then only react to SMBus commands to these addresses.
@@ -21,8 +21,8 @@ EEPROMs, among others.
21 21
22The typical use-case is like this: 22The typical use-case is like this:
23 1. load this module 23 1. load this module
24 2. use i2cset (from lm_sensors project) to pre-load some data 24 2. use i2cset (from the i2c-tools project) to pre-load some data
25 3. load the target sensors chip driver module 25 3. load the target chip driver module
26 4. observe its behavior in the kernel log 26 4. observe its behavior in the kernel log
27 27
28There's a script named i2c-stub-from-dump in the i2c-tools package which 28There's a script named i2c-stub-from-dump in the i2c-tools package which
@@ -33,6 +33,12 @@ PARAMETERS:
33int chip_addr[10]: 33int chip_addr[10]:
34 The SMBus addresses to emulate chips at. 34 The SMBus addresses to emulate chips at.
35 35
36unsigned long functionality:
37 Functionality override, to disable some commands. See I2C_FUNC_*
38 constants in <linux/i2c.h> for the suitable values. For example,
39 value 0x1f0000 would only enable the quick, byte and byte data
40 commands.
41
36CAVEATS: 42CAVEATS:
37 43
38If your target driver polls some byte or word waiting for it to change, the 44If your target driver polls some byte or word waiting for it to change, the
diff --git a/Documentation/i2c/old-module-parameters b/Documentation/i2c/old-module-parameters
new file mode 100644
index 000000000000..8e2b629d533c
--- /dev/null
+++ b/Documentation/i2c/old-module-parameters
@@ -0,0 +1,44 @@
1I2C device driver binding control from user-space
2=================================================
3
4Up to kernel 2.6.32, many i2c drivers used helper macros provided by
5<linux/i2c.h> which created standard module parameters to let the user
6control how the driver would probe i2c buses and attach to devices. These
7parameters were known as "probe" (to let the driver probe for an extra
8address), "force" (to forcibly attach the driver to a given device) and
9"ignore" (to prevent a driver from probing a given address).
10
11With the conversion of the i2c subsystem to the standard device driver
12binding model, it became clear that these per-module parameters were no
13longer needed, and that a centralized implementation was possible. The new,
14sysfs-based interface is described in the documentation file
15"instantiating-devices", section "Method 4: Instantiate from user-space".
16
17Below is a mapping from the old module parameters to the new interface.
18
19Attaching a driver to an I2C device
20-----------------------------------
21
22Old method (module parameters):
23# modprobe <driver> probe=1,0x2d
24# modprobe <driver> force=1,0x2d
25# modprobe <driver> force_<device>=1,0x2d
26
27New method (sysfs interface):
28# echo <device> 0x2d > /sys/bus/i2c/devices/i2c-1/new_device
29
30Preventing a driver from attaching to an I2C device
31---------------------------------------------------
32
33Old method (module parameters):
34# modprobe <driver> ignore=1,0x2f
35
36New method (sysfs interface):
37# echo dummy 0x2f > /sys/bus/i2c/devices/i2c-1/new_device
38# modprobe <driver>
39
40Of course, it is important to instantiate the "dummy" device before loading
41the driver. The dummy device will be handled by i2c-core itself, preventing
42other drivers from binding to it later on. If there is a real device at the
43problematic address, and you want another driver to bind to it, then simply
44pass the name of the device in question instead of "dummy".
diff --git a/Documentation/i2c/writing-clients b/Documentation/i2c/writing-clients
index 7860aafb483d..0a74603eb671 100644
--- a/Documentation/i2c/writing-clients
+++ b/Documentation/i2c/writing-clients
@@ -44,7 +44,7 @@ static struct i2c_driver foo_driver = {
44 /* if device autodetection is needed: */ 44 /* if device autodetection is needed: */
45 .class = I2C_CLASS_SOMETHING, 45 .class = I2C_CLASS_SOMETHING,
46 .detect = foo_detect, 46 .detect = foo_detect,
47 .address_data = &addr_data, 47 .address_list = normal_i2c,
48 48
49 .shutdown = foo_shutdown, /* optional */ 49 .shutdown = foo_shutdown, /* optional */
50 .suspend = foo_suspend, /* optional */ 50 .suspend = foo_suspend, /* optional */
diff --git a/Documentation/isdn/README.gigaset b/Documentation/isdn/README.gigaset
index f9963103ae3d..794941fc9493 100644
--- a/Documentation/isdn/README.gigaset
+++ b/Documentation/isdn/README.gigaset
@@ -5,7 +5,7 @@ GigaSet 307x Device Driver
5 ------------ 5 ------------
61.1. Hardware 61.1. Hardware
7 -------- 7 --------
8 This release supports the connection of the Gigaset 307x/417x family of 8 This driver supports the connection of the Gigaset 307x/417x family of
9 ISDN DECT bases via Gigaset M101 Data, Gigaset M105 Data or direct USB 9 ISDN DECT bases via Gigaset M101 Data, Gigaset M105 Data or direct USB
10 connection. The following devices are reported to be compatible: 10 connection. The following devices are reported to be compatible:
11 11
@@ -33,7 +33,7 @@ GigaSet 307x Device Driver
33 http://gigaset307x.sourceforge.net/ 33 http://gigaset307x.sourceforge.net/
34 34
35 We had also reports from users of Gigaset M105 who could use the drivers 35 We had also reports from users of Gigaset M105 who could use the drivers
36 with SX 100 and CX 100 ISDN bases (only in unimodem mode, see section 2.4.) 36 with SX 100 and CX 100 ISDN bases (only in unimodem mode, see section 2.5.)
37 If you have another device that works with our driver, please let us know. 37 If you have another device that works with our driver, please let us know.
38 38
39 Chances of getting an USB device to work are good if the output of 39 Chances of getting an USB device to work are good if the output of
@@ -49,7 +49,7 @@ GigaSet 307x Device Driver
49 -------- 49 --------
50 The driver works with ISDN4linux and so can be used with any software 50 The driver works with ISDN4linux and so can be used with any software
51 which is able to use ISDN4linux for ISDN connections (voice or data). 51 which is able to use ISDN4linux for ISDN connections (voice or data).
52 CAPI4Linux support is planned but not yet available. 52 Experimental Kernel CAPI support is available as a compilation option.
53 53
54 There are some user space tools available at 54 There are some user space tools available at
55 http://sourceforge.net/projects/gigaset307x/ 55 http://sourceforge.net/projects/gigaset307x/
@@ -68,22 +68,38 @@ GigaSet 307x Device Driver
68 for troubleshooting or to pass module parameters. 68 for troubleshooting or to pass module parameters.
69 69
70 The module ser_gigaset provides a serial line discipline N_GIGASET_M101 70 The module ser_gigaset provides a serial line discipline N_GIGASET_M101
71 which drives the device through the regular serial line driver. It must 71 which uses the regular serial port driver to access the device, and must
72 be attached to the serial line to which the M101 is connected with the 72 therefore be attached to the serial device to which the M101 is connected.
73 ldattach(8) command (requires util-linux-ng release 2.14 or later), for 73 The ldattach(8) command (included in util-linux-ng release 2.14 or later)
74 example: 74 can be used for that purpose, for example:
75 ldattach GIGASET_M101 /dev/ttyS1 75 ldattach GIGASET_M101 /dev/ttyS1
76 This will open the device file, attach the line discipline to it, and 76 This will open the device file, attach the line discipline to it, and
77 then sleep in the background, keeping the device open so that the line 77 then sleep in the background, keeping the device open so that the line
78 discipline remains active. To deactivate it, kill the daemon, for example 78 discipline remains active. To deactivate it, kill the daemon, for example
79 with 79 with
80 killall ldattach 80 killall ldattach
81 before disconnecting the device. To have this happen automatically at 81 before disconnecting the device. To have this happen automatically at
82 system startup/shutdown on an LSB compatible system, create and activate 82 system startup/shutdown on an LSB compatible system, create and activate
83 an appropriate LSB startup script /etc/init.d/gigaset. (The init name 83 an appropriate LSB startup script /etc/init.d/gigaset. (The init name
84 'gigaset' is officially assigned to this project by LANANA.) 84 'gigaset' is officially assigned to this project by LANANA.)
85 Alternatively, just add the 'ldattach' command line to /etc/rc.local. 85 Alternatively, just add the 'ldattach' command line to /etc/rc.local.
86 86
87 The modules accept the following parameters:
88
89 Module Parameter Meaning
90
91 gigaset debug debug level (see section 3.2.)
92
93 startmode initial operation mode (see section 2.5.):
94 bas_gigaset ) 1=ISDN4linux/CAPI (default), 0=Unimodem
95 ser_gigaset )
96 usb_gigaset ) cidmode initial Call-ID mode setting (see section
97 2.5.): 1=on (default), 0=off
98
99 Depending on your distribution you may want to create a separate module
100 configuration file /etc/modprobe.d/gigaset for these, or add them to a
101 custom file like /etc/modprobe.conf.local.
102
872.2. Device nodes for user space programs 1032.2. Device nodes for user space programs
88 ------------------------------------ 104 ------------------------------------
89 The device can be accessed from user space (eg. by the user space tools 105 The device can be accessed from user space (eg. by the user space tools
@@ -93,29 +109,83 @@ GigaSet 307x Device Driver
93 - /dev/ttyGU0 for M105 (USB data boxes) 109 - /dev/ttyGU0 for M105 (USB data boxes)
94 - /dev/ttyGB0 for the base driver (direct USB connection) 110 - /dev/ttyGB0 for the base driver (direct USB connection)
95 111
96 You can also select a "default device" which is used by the frontends when 112 If you connect more than one device of a type, they will get consecutive
113 device nodes, eg. /dev/ttyGU1 for a second M105.
114
115 You can also set a "default device" for the user space tools to use when
97 no device node is given as parameter, by creating a symlink /dev/ttyG to 116 no device node is given as parameter, by creating a symlink /dev/ttyG to
98 one of them, eg.: 117 one of them, eg.:
99 118
100 ln -s /dev/ttyGB0 /dev/ttyG 119 ln -s /dev/ttyGB0 /dev/ttyG
120
121 The devices accept the following device specific ioctl calls
122 (defined in gigaset_dev.h):
123
124 ioctl(int fd, GIGASET_REDIR, int *cmd);
125 If cmd==1, the device is set to be controlled exclusively through the
126 character device node; access from the ISDN subsystem is blocked.
127 If cmd==0, the device is set to be used from the ISDN subsystem and does
128 not communicate through the character device node.
129
130 ioctl(int fd, GIGASET_CONFIG, int *cmd);
131 (ser_gigaset and usb_gigaset only)
132 If cmd==1, the device is set to adapter configuration mode where commands
133 are interpreted by the M10x DECT adapter itself instead of being
134 forwarded to the base station. In this mode, the device accepts the
135 commands described in Siemens document "AT-Kommando Alignment M10x Data"
136 for setting the operation mode, associating with a base station and
137 querying parameters like field strengh and signal quality.
138 Note that there is no ioctl command for leaving adapter configuration
139 mode and returning to regular operation. In order to leave adapter
140 configuration mode, write the command ATO to the device.
141
142 ioctl(int fd, GIGASET_BRKCHARS, unsigned char brkchars[6]);
143 (usb_gigaset only)
144 Set the break characters on an M105's internal serial adapter to the six
145 bytes stored in brkchars[]. Unused bytes should be set to zero.
146
147 ioctl(int fd, GIGASET_VERSION, unsigned version[4]);
148 Retrieve version information from the driver. version[0] must be set to
149 one of:
150 - GIGVER_DRIVER: retrieve driver version
151 - GIGVER_COMPAT: retrieve interface compatibility version
152 - GIGVER_FWBASE: retrieve the firmware version of the base
153 Upon return, version[] is filled with the requested version information.
101 154
1022.3. ISDN4linux 1552.3. ISDN4linux
103 ---------- 156 ----------
104 This is the "normal" mode of operation. After loading the module you can 157 This is the "normal" mode of operation. After loading the module you can
105 set up the ISDN system just as you'd do with any ISDN card. 158 set up the ISDN system just as you'd do with any ISDN card supported by
106 Your distribution should provide some configuration utility. 159 the ISDN4Linux subsystem. Most distributions provide some configuration
107 If not, you can use some HOWTOs like 160 utility. If not, you can use some HOWTOs like
108 http://www.linuxhaven.de/dlhp/HOWTO/DE-ISDN-HOWTO-5.html 161 http://www.linuxhaven.de/dlhp/HOWTO/DE-ISDN-HOWTO-5.html
109 If this doesn't work, because you have some recent device like SX100 where 162 If this doesn't work, because you have some device like SX100 where
110 debug output (see section 3.2.) shows something like this when dialing 163 debug output (see section 3.2.) shows something like this when dialing
111 CMD Received: ERROR 164 CMD Received: ERROR
112 Available Params: 0 165 Available Params: 0
113 Connection State: 0, Response: -1 166 Connection State: 0, Response: -1
114 gigaset_process_response: resp_code -1 in ConState 0 ! 167 gigaset_process_response: resp_code -1 in ConState 0 !
115 Timeout occurred 168 Timeout occurred
116 you might need to use unimodem mode: 169 you probably need to use unimodem mode. (see section 2.5.)
117 170
1182.4. Unimodem mode 1712.4. CAPI
172 ----
173 If the driver is compiled with CAPI support (kernel configuration option
174 GIGASET_CAPI, experimental) it can also be used with CAPI 2.0 kernel and
175 user space applications. For user space access, the module capi.ko must
176 be loaded. The capiinit command (included in the capi4k-utils package)
177 does this for you.
178
179 The CAPI variant of the driver supports legacy ISDN4Linux applications
180 via the capidrv compatibility driver. The kernel module capidrv.ko must
181 be loaded explicitly with the command
182 modprobe capidrv
183 if needed, and cannot be unloaded again without unloading the driver
184 first. (These are limitations of capidrv.)
185
186 The note about unimodem mode in the preceding section applies here, too.
187
1882.5. Unimodem mode
119 ------------- 189 -------------
120 This is needed for some devices [e.g. SX100] as they have problems with 190 This is needed for some devices [e.g. SX100] as they have problems with
121 the "normal" commands. 191 the "normal" commands.
@@ -126,9 +196,14 @@ GigaSet 307x Device Driver
126 You can switch back using 196 You can switch back using
127 gigacontr --mode isdn 197 gigacontr --mode isdn
128 198
129 You can also load the driver using e.g. 199 You can also put the driver directly into Unimodem mode when it's loaded,
130 modprobe usb_gigaset startmode=0 200 by passing the module parameter startmode=0 to the hardware specific
131 to prevent the driver from starting in "isdn4linux mode". 201 module, e.g.
202 modprobe usb_gigaset startmode=0
203 or by adding a line like
204 options usb_gigaset startmode=0
205 to an appropriate module configuration file, like /etc/modprobe.d/gigaset
206 or /etc/modprobe.conf.local.
132 207
133 In this mode the device works like a modem connected to a serial port 208 In this mode the device works like a modem connected to a serial port
134 (the /dev/ttyGU0, ... mentioned above) which understands the commands 209 (the /dev/ttyGU0, ... mentioned above) which understands the commands
@@ -156,11 +231,10 @@ GigaSet 307x Device Driver
156 231
157 options ppp_async flag_time=0 232 options ppp_async flag_time=0
158 233
159 to /etc/modprobe.conf. If your distribution has some local module 234 to an appropriate module configuration file, like /etc/modprobe.d/gigaset
160 configuration file like /etc/modprobe.conf.local, 235 or /etc/modprobe.conf.local.
161 using that should be preferred.
162 236
1632.5. Call-ID (CID) mode 2372.6. Call-ID (CID) mode
164 ------------------ 238 ------------------
165 Call-IDs are numbers used to tag commands to, and responses from, the 239 Call-IDs are numbers used to tag commands to, and responses from, the
166 Gigaset base in order to support the simultaneous handling of multiple 240 Gigaset base in order to support the simultaneous handling of multiple
@@ -181,14 +255,15 @@ GigaSet 307x Device Driver
181 settings (CID mode). 255 settings (CID mode).
182 - If you have several DECT data devices (M10x) which you want to use 256 - If you have several DECT data devices (M10x) which you want to use
183 in turn, select Unimodem mode by passing the parameter "cidmode=0" to 257 in turn, select Unimodem mode by passing the parameter "cidmode=0" to
184 the driver ("modprobe usb_gigaset cidmode=0" or modprobe.conf). 258 the appropriate driver module (ser_gigaset or usb_gigaset).
185 259
186 If you want both of these at once, you are out of luck. 260 If you want both of these at once, you are out of luck.
187 261
188 You can also use /sys/class/tty/ttyGxy/cidmode for changing the CID mode 262 You can also use the tty class parameter "cidmode" of the device to
189 setting (ttyGxy is ttyGU0 or ttyGB0). 263 change its CID mode while the driver is loaded, eg.
264 echo 0 > /sys/class/tty/ttyGU0/cidmode
190 265
1912.6. Unregistered Wireless Devices (M101/M105) 2662.7. Unregistered Wireless Devices (M101/M105)
192 ----------------------------------------- 267 -----------------------------------------
193 The main purpose of the ser_gigaset and usb_gigaset drivers is to allow 268 The main purpose of the ser_gigaset and usb_gigaset drivers is to allow
194 the M101 and M105 wireless devices to be used as ISDN devices for ISDN 269 the M101 and M105 wireless devices to be used as ISDN devices for ISDN
@@ -200,7 +275,7 @@ GigaSet 307x Device Driver
200 driver. In that situation, a restricted set of functions is available 275 driver. In that situation, a restricted set of functions is available
201 which includes, in particular, those necessary for registering the device 276 which includes, in particular, those necessary for registering the device
202 to a base or for switching it between Fixed Part and Portable Part 277 to a base or for switching it between Fixed Part and Portable Part
203 modes. 278 modes. See the gigacontr(8) manpage for details.
204 279
2053. Troubleshooting 2803. Troubleshooting
206 --------------- 281 ---------------
@@ -214,9 +289,7 @@ GigaSet 307x Device Driver
214 289
215 options isdn dialtimeout=15 290 options isdn dialtimeout=15
216 291
217 to /etc/modprobe.conf. If your distribution has some local module 292 to /etc/modprobe.d/gigaset, /etc/modprobe.conf.local or a similar file.
218 configuration file like /etc/modprobe.conf.local,
219 using that should be preferred.
220 293
221 Problem: 294 Problem:
222 Your isdn script aborts with a message about isdnlog. 295 Your isdn script aborts with a message about isdnlog.
@@ -228,7 +301,7 @@ GigaSet 307x Device Driver
228 You have two or more DECT data adapters (M101/M105) and only the 301 You have two or more DECT data adapters (M101/M105) and only the
229 first one you turn on works. 302 first one you turn on works.
230 Solution: 303 Solution:
231 Select Unimodem mode for all DECT data adapters. (see section 2.4.) 304 Select Unimodem mode for all DECT data adapters. (see section 2.5.)
232 305
233 Problem: 306 Problem:
234 Messages like this: 307 Messages like this:
@@ -236,7 +309,7 @@ GigaSet 307x Device Driver
236 appear in your syslog. 309 appear in your syslog.
237 Solution: 310 Solution:
238 Check whether your M10x wireless device is correctly registered to the 311 Check whether your M10x wireless device is correctly registered to the
239 Gigaset base. (see section 2.6.) 312 Gigaset base. (see section 2.7.)
240 313
2413.2. Telling the driver to provide more information 3143.2. Telling the driver to provide more information
242 ---------------------------------------------- 315 ----------------------------------------------
@@ -256,7 +329,8 @@ GigaSet 307x Device Driver
256 The initial value can be set using the debug parameter when loading the 329 The initial value can be set using the debug parameter when loading the
257 module "gigaset", e.g. by adding a line 330 module "gigaset", e.g. by adding a line
258 options gigaset debug=0 331 options gigaset debug=0
259 to /etc/modprobe.conf, ... 332 to your module configuration file, eg. /etc/modprobe.d/gigaset or
333 /etc/modprobe.conf.local.
260 334
261 Generated debugging information can be found 335 Generated debugging information can be found
262 - as output of the command 336 - as output of the command
diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt
index 9107b387e91f..ab95d3ada5c7 100644
--- a/Documentation/kernel-parameters.txt
+++ b/Documentation/kernel-parameters.txt
@@ -85,7 +85,6 @@ parameter is applicable:
85 PPT Parallel port support is enabled. 85 PPT Parallel port support is enabled.
86 PS2 Appropriate PS/2 support is enabled. 86 PS2 Appropriate PS/2 support is enabled.
87 RAM RAM disk support is enabled. 87 RAM RAM disk support is enabled.
88 ROOTPLUG The example Root Plug LSM is enabled.
89 S390 S390 architecture is enabled. 88 S390 S390 architecture is enabled.
90 SCSI Appropriate SCSI support is enabled. 89 SCSI Appropriate SCSI support is enabled.
91 A lot of drivers has their options described inside of 90 A lot of drivers has their options described inside of
@@ -345,6 +344,15 @@ and is between 256 and 4096 characters. It is defined in the file
345 Change the amount of debugging information output 344 Change the amount of debugging information output
346 when initialising the APIC and IO-APIC components. 345 when initialising the APIC and IO-APIC components.
347 346
347 show_lapic= [APIC,X86] Advanced Programmable Interrupt Controller
348 Limit apic dumping. The parameter defines the maximal
349 number of local apics being dumped. Also it is possible
350 to set it to "all" by meaning -- no limit here.
351 Format: { 1 (default) | 2 | ... | all }.
352 The parameter valid if only apic=debug or
353 apic=verbose is specified.
354 Example: apic=debug show_lapic=all
355
348 apm= [APM] Advanced Power Management 356 apm= [APM] Advanced Power Management
349 See header of arch/x86/kernel/apm_32.c. 357 See header of arch/x86/kernel/apm_32.c.
350 358
@@ -779,6 +787,13 @@ and is between 256 and 4096 characters. It is defined in the file
779 by the set_ftrace_notrace file in the debugfs 787 by the set_ftrace_notrace file in the debugfs
780 tracing directory. 788 tracing directory.
781 789
790 ftrace_graph_filter=[function-list]
791 [FTRACE] Limit the top level callers functions traced
792 by the function graph tracer at boot up.
793 function-list is a comma separated list of functions
794 that can be changed at run time by the
795 set_graph_function file in the debugfs tracing directory.
796
782 gamecon.map[2|3]= 797 gamecon.map[2|3]=
783 [HW,JOY] Multisystem joystick and NES/SNES/PSX pad 798 [HW,JOY] Multisystem joystick and NES/SNES/PSX pad
784 support via parallel port (up to 5 devices per port) 799 support via parallel port (up to 5 devices per port)
@@ -1772,6 +1787,11 @@ and is between 256 and 4096 characters. It is defined in the file
1772 waiting for the ACK, so if this is set too high 1787 waiting for the ACK, so if this is set too high
1773 interrupts *may* be lost! 1788 interrupts *may* be lost!
1774 1789
1790 omap_mux= [OMAP] Override bootloader pin multiplexing.
1791 Format: <mux_mode0.mode_name=value>...
1792 For example, to override I2C bus2:
1793 omap_mux=i2c2_scl.i2c2_scl=0x100,i2c2_sda.i2c2_sda=0x100
1794
1775 opl3= [HW,OSS] 1795 opl3= [HW,OSS]
1776 Format: <io> 1796 Format: <io>
1777 1797
@@ -2032,8 +2052,15 @@ and is between 256 and 4096 characters. It is defined in the file
2032 2052
2033 print-fatal-signals= 2053 print-fatal-signals=
2034 [KNL] debug: print fatal signals 2054 [KNL] debug: print fatal signals
2035 print-fatal-signals=1: print segfault info to 2055
2036 the kernel console. 2056 If enabled, warn about various signal handling
2057 related application anomalies: too many signals,
2058 too many POSIX.1 timers, fatal signals causing a
2059 coredump - etc.
2060
2061 If you hit the warning due to signal overflow,
2062 you might want to try "ulimit -i unlimited".
2063
2037 default: off. 2064 default: off.
2038 2065
2039 printk.time= Show timing data prefixed to each printk message line 2066 printk.time= Show timing data prefixed to each printk message line
@@ -2164,15 +2191,6 @@ and is between 256 and 4096 characters. It is defined in the file
2164 Useful for devices that are detected asynchronously 2191 Useful for devices that are detected asynchronously
2165 (e.g. USB and MMC devices). 2192 (e.g. USB and MMC devices).
2166 2193
2167 root_plug.vendor_id=
2168 [ROOTPLUG] Override the default vendor ID
2169
2170 root_plug.product_id=
2171 [ROOTPLUG] Override the default product ID
2172
2173 root_plug.debug=
2174 [ROOTPLUG] Enable debugging output
2175
2176 rw [KNL] Mount root device read-write on boot 2194 rw [KNL] Mount root device read-write on boot
2177 2195
2178 S [KNL] Run init in single mode 2196 S [KNL] Run init in single mode
@@ -2182,6 +2200,8 @@ and is between 256 and 4096 characters. It is defined in the file
2182 2200
2183 sbni= [NET] Granch SBNI12 leased line adapter 2201 sbni= [NET] Granch SBNI12 leased line adapter
2184 2202
2203 sched_debug [KNL] Enables verbose scheduler debug messages.
2204
2185 sc1200wdt= [HW,WDT] SC1200 WDT (watchdog) driver 2205 sc1200wdt= [HW,WDT] SC1200 WDT (watchdog) driver
2186 Format: <io>[,<timeout>[,<isapnp>]] 2206 Format: <io>[,<timeout>[,<isapnp>]]
2187 2207
@@ -2590,6 +2610,9 @@ and is between 256 and 4096 characters. It is defined in the file
2590 uart6850= [HW,OSS] 2610 uart6850= [HW,OSS]
2591 Format: <io>,<irq> 2611 Format: <io>,<irq>
2592 2612
2613 uhash_entries= [KNL,NET]
2614 Set number of hash buckets for UDP/UDP-Lite connections
2615
2593 uhci-hcd.ignore_oc= 2616 uhci-hcd.ignore_oc=
2594 [USB] Ignore overcurrent events (default N). 2617 [USB] Ignore overcurrent events (default N).
2595 Some badly-designed motherboards generate lots of 2618 Some badly-designed motherboards generate lots of
@@ -2645,6 +2668,8 @@ and is between 256 and 4096 characters. It is defined in the file
2645 to a common usb-storage quirk flag as follows: 2668 to a common usb-storage quirk flag as follows:
2646 a = SANE_SENSE (collect more than 18 bytes 2669 a = SANE_SENSE (collect more than 18 bytes
2647 of sense data); 2670 of sense data);
2671 b = BAD_SENSE (don't collect more than 18
2672 bytes of sense data);
2648 c = FIX_CAPACITY (decrease the reported 2673 c = FIX_CAPACITY (decrease the reported
2649 device capacity by one sector); 2674 device capacity by one sector);
2650 h = CAPACITY_HEURISTICS (decrease the 2675 h = CAPACITY_HEURISTICS (decrease the
@@ -2729,6 +2754,15 @@ and is between 256 and 4096 characters. It is defined in the file
2729 Default is 1, i.e. UTF-8 mode is enabled for all 2754 Default is 1, i.e. UTF-8 mode is enabled for all
2730 newly opened terminals. 2755 newly opened terminals.
2731 2756
2757 vt.global_cursor_default=
2758 [VT]
2759 Format=<-1|0|1>
2760 Set system-wide default for whether a cursor
2761 is shown on new VTs. Default is -1,
2762 i.e. cursors will be created by default unless
2763 overridden by individual drivers. 0 will hide
2764 cursors, 1 will display them.
2765
2732 waveartist= [HW,OSS] 2766 waveartist= [HW,OSS]
2733 Format: <io>,<irq>,<dma>,<dma2> 2767 Format: <io>,<irq>,<dma>,<dma2>
2734 2768
diff --git a/Documentation/kvm/api.txt b/Documentation/kvm/api.txt
index 5a4bc8cf6d04..e1a114161027 100644
--- a/Documentation/kvm/api.txt
+++ b/Documentation/kvm/api.txt
@@ -593,6 +593,115 @@ struct kvm_irqchip {
593 } chip; 593 } chip;
594}; 594};
595 595
5964.27 KVM_XEN_HVM_CONFIG
597
598Capability: KVM_CAP_XEN_HVM
599Architectures: x86
600Type: vm ioctl
601Parameters: struct kvm_xen_hvm_config (in)
602Returns: 0 on success, -1 on error
603
604Sets the MSR that the Xen HVM guest uses to initialize its hypercall
605page, and provides the starting address and size of the hypercall
606blobs in userspace. When the guest writes the MSR, kvm copies one
607page of a blob (32- or 64-bit, depending on the vcpu mode) to guest
608memory.
609
610struct kvm_xen_hvm_config {
611 __u32 flags;
612 __u32 msr;
613 __u64 blob_addr_32;
614 __u64 blob_addr_64;
615 __u8 blob_size_32;
616 __u8 blob_size_64;
617 __u8 pad2[30];
618};
619
6204.27 KVM_GET_CLOCK
621
622Capability: KVM_CAP_ADJUST_CLOCK
623Architectures: x86
624Type: vm ioctl
625Parameters: struct kvm_clock_data (out)
626Returns: 0 on success, -1 on error
627
628Gets the current timestamp of kvmclock as seen by the current guest. In
629conjunction with KVM_SET_CLOCK, it is used to ensure monotonicity on scenarios
630such as migration.
631
632struct kvm_clock_data {
633 __u64 clock; /* kvmclock current value */
634 __u32 flags;
635 __u32 pad[9];
636};
637
6384.28 KVM_SET_CLOCK
639
640Capability: KVM_CAP_ADJUST_CLOCK
641Architectures: x86
642Type: vm ioctl
643Parameters: struct kvm_clock_data (in)
644Returns: 0 on success, -1 on error
645
646Sets the current timestamp of kvmclock to the valued specific in its parameter.
647In conjunction with KVM_GET_CLOCK, it is used to ensure monotonicity on scenarios
648such as migration.
649
650struct kvm_clock_data {
651 __u64 clock; /* kvmclock current value */
652 __u32 flags;
653 __u32 pad[9];
654};
655
6564.29 KVM_GET_VCPU_EVENTS
657
658Capability: KVM_CAP_VCPU_EVENTS
659Architectures: x86
660Type: vm ioctl
661Parameters: struct kvm_vcpu_event (out)
662Returns: 0 on success, -1 on error
663
664Gets currently pending exceptions, interrupts, and NMIs as well as related
665states of the vcpu.
666
667struct kvm_vcpu_events {
668 struct {
669 __u8 injected;
670 __u8 nr;
671 __u8 has_error_code;
672 __u8 pad;
673 __u32 error_code;
674 } exception;
675 struct {
676 __u8 injected;
677 __u8 nr;
678 __u8 soft;
679 __u8 pad;
680 } interrupt;
681 struct {
682 __u8 injected;
683 __u8 pending;
684 __u8 masked;
685 __u8 pad;
686 } nmi;
687 __u32 sipi_vector;
688 __u32 flags; /* must be zero */
689};
690
6914.30 KVM_SET_VCPU_EVENTS
692
693Capability: KVM_CAP_VCPU_EVENTS
694Architectures: x86
695Type: vm ioctl
696Parameters: struct kvm_vcpu_event (in)
697Returns: 0 on success, -1 on error
698
699Set pending exceptions, interrupts, and NMIs as well as related states of the
700vcpu.
701
702See KVM_GET_VCPU_EVENTS for the data structure.
703
704
5965. The kvm_run structure 7055. The kvm_run structure
597 706
598Application code obtains a pointer to the kvm_run structure by 707Application code obtains a pointer to the kvm_run structure by
diff --git a/Documentation/lguest/lguest.c b/Documentation/lguest/lguest.c
index ba9373f82ab5..42208511b5c0 100644
--- a/Documentation/lguest/lguest.c
+++ b/Documentation/lguest/lguest.c
@@ -42,7 +42,6 @@
42#include <signal.h> 42#include <signal.h>
43#include "linux/lguest_launcher.h" 43#include "linux/lguest_launcher.h"
44#include "linux/virtio_config.h" 44#include "linux/virtio_config.h"
45#include <linux/virtio_ids.h>
46#include "linux/virtio_net.h" 45#include "linux/virtio_net.h"
47#include "linux/virtio_blk.h" 46#include "linux/virtio_blk.h"
48#include "linux/virtio_console.h" 47#include "linux/virtio_console.h"
@@ -305,7 +304,7 @@ static void *map_zeroed_pages(unsigned int num)
305 addr = mmap(NULL, getpagesize() * num, 304 addr = mmap(NULL, getpagesize() * num,
306 PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE, fd, 0); 305 PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE, fd, 0);
307 if (addr == MAP_FAILED) 306 if (addr == MAP_FAILED)
308 err(1, "Mmaping %u pages of /dev/zero", num); 307 err(1, "Mmapping %u pages of /dev/zero", num);
309 308
310 /* 309 /*
311 * One neat mmap feature is that you can close the fd, and it 310 * One neat mmap feature is that you can close the fd, and it
diff --git a/Documentation/lockstat.txt b/Documentation/lockstat.txt
index 9cb9138f7a79..65f4c795015d 100644
--- a/Documentation/lockstat.txt
+++ b/Documentation/lockstat.txt
@@ -62,8 +62,20 @@ applicable).
62It also tracks 4 contention points per class. A contention point is a call site 62It also tracks 4 contention points per class. A contention point is a call site
63that had to wait on lock acquisition. 63that had to wait on lock acquisition.
64 64
65 - CONFIGURATION
66
67Lock statistics are enabled via CONFIG_LOCK_STATS.
68
65 - USAGE 69 - USAGE
66 70
71Enable collection of statistics:
72
73# echo 1 >/proc/sys/kernel/lock_stat
74
75Disable collection of statistics:
76
77# echo 0 >/proc/sys/kernel/lock_stat
78
67Look at the current lock statistics: 79Look at the current lock statistics:
68 80
69( line numbers not part of actual output, done for clarity in the explanation 81( line numbers not part of actual output, done for clarity in the explanation
diff --git a/Documentation/md.txt b/Documentation/md.txt
index 4edd39ec7db9..188f4768f1d5 100644
--- a/Documentation/md.txt
+++ b/Documentation/md.txt
@@ -233,9 +233,9 @@ All md devices contain:
233 233
234 resync_start 234 resync_start
235 The point at which resync should start. If no resync is needed, 235 The point at which resync should start. If no resync is needed,
236 this will be a very large number. At array creation it will 236 this will be a very large number (or 'none' since 2.6.30-rc1). At
237 default to 0, though starting the array as 'clean' will 237 array creation it will default to 0, though starting the array as
238 set it much larger. 238 'clean' will set it much larger.
239 239
240 new_dev 240 new_dev
241 This file can be written but not read. The value written should 241 This file can be written but not read. The value written should
@@ -296,6 +296,51 @@ All md devices contain:
296 active-idle 296 active-idle
297 like active, but no writes have been seen for a while (safe_mode_delay). 297 like active, but no writes have been seen for a while (safe_mode_delay).
298 298
299 bitmap/location
300 This indicates where the write-intent bitmap for the array is
301 stored.
302 It can be one of "none", "file" or "[+-]N".
303 "file" may later be extended to "file:/file/name"
304 "[+-]N" means that many sectors from the start of the metadata.
305 This is replicated on all devices. For arrays with externally
306 managed metadata, the offset is from the beginning of the
307 device.
308 bitmap/chunksize
309 The size, in bytes, of the chunk which will be represented by a
310 single bit. For RAID456, it is a portion of an individual
311 device. For RAID10, it is a portion of the array. For RAID1, it
312 is both (they come to the same thing).
313 bitmap/time_base
314 The time, in seconds, between looking for bits in the bitmap to
315 be cleared. In the current implementation, a bit will be cleared
316 between 2 and 3 times "time_base" after all the covered blocks
317 are known to be in-sync.
318 bitmap/backlog
319 When write-mostly devices are active in a RAID1, write requests
320 to those devices proceed in the background - the filesystem (or
321 other user of the device) does not have to wait for them.
322 'backlog' sets a limit on the number of concurrent background
323 writes. If there are more than this, new writes will by
324 synchronous.
325 bitmap/metadata
326 This can be either 'internal' or 'external'.
327 'internal' is the default and means the metadata for the bitmap
328 is stored in the first 256 bytes of the allocated space and is
329 managed by the md module.
330 'external' means that bitmap metadata is managed externally to
331 the kernel (i.e. by some userspace program)
332 bitmap/can_clear
333 This is either 'true' or 'false'. If 'true', then bits in the
334 bitmap will be cleared when the corresponding blocks are thought
335 to be in-sync. If 'false', bits will never be cleared.
336 This is automatically set to 'false' if a write happens on a
337 degraded array, or if the array becomes degraded during a write.
338 When metadata is managed externally, it should be set to true
339 once the array becomes non-degraded, and this fact has been
340 recorded in the metadata.
341
342
343
299 344
300As component devices are added to an md array, they appear in the 'md' 345As component devices are added to an md array, they appear in the 'md'
301directory as new directories named 346directory as new directories named
@@ -334,8 +379,9 @@ Each directory contains:
334 Writing "writemostly" sets the writemostly flag. 379 Writing "writemostly" sets the writemostly flag.
335 Writing "-writemostly" clears the writemostly flag. 380 Writing "-writemostly" clears the writemostly flag.
336 Writing "blocked" sets the "blocked" flag. 381 Writing "blocked" sets the "blocked" flag.
337 Writing "-blocked" clear the "blocked" flag and allows writes 382 Writing "-blocked" clears the "blocked" flag and allows writes
338 to complete. 383 to complete.
384 Writing "in_sync" sets the in_sync flag.
339 385
340 This file responds to select/poll. Any change to 'faulty' 386 This file responds to select/poll. Any change to 'faulty'
341 or 'blocked' causes an event. 387 or 'blocked' causes an event.
@@ -372,6 +418,24 @@ Each directory contains:
372 array. If a value less than the current component_size is 418 array. If a value less than the current component_size is
373 written, it will be rejected. 419 written, it will be rejected.
374 420
421 recovery_start
422
423 When the device is not 'in_sync', this records the number of
424 sectors from the start of the device which are known to be
425 correct. This is normally zero, but during a recovery
426 operation is will steadily increase, and if the recovery is
427 interrupted, restoring this value can cause recovery to
428 avoid repeating the earlier blocks. With v1.x metadata, this
429 value is saved and restored automatically.
430
431 This can be set whenever the device is not an active member of
432 the array, either before the array is activated, or before
433 the 'slot' is set.
434
435 Setting this to 'none' is equivalent to setting 'in_sync'.
436 Setting to any other value also clears the 'in_sync' flag.
437
438
375 439
376An active md device will also contain and entry for each active device 440An active md device will also contain and entry for each active device
377in the array. These are named 441in the array. These are named
diff --git a/Documentation/memory-hotplug.txt b/Documentation/memory-hotplug.txt
index bbc8a6a36921..57e7e9cc1870 100644
--- a/Documentation/memory-hotplug.txt
+++ b/Documentation/memory-hotplug.txt
@@ -160,12 +160,15 @@ Under each section, you can see 4 files.
160NOTE: 160NOTE:
161 These directories/files appear after physical memory hotplug phase. 161 These directories/files appear after physical memory hotplug phase.
162 162
163If CONFIG_NUMA is enabled the 163If CONFIG_NUMA is enabled the memoryXXX/ directories can also be accessed
164/sys/devices/system/memory/memoryXXX memory section 164via symbolic links located in the /sys/devices/system/node/node* directories.
165directories can also be accessed via symbolic links located in 165
166the /sys/devices/system/node/node* directories. For example: 166For example:
167/sys/devices/system/node/node0/memory9 -> ../../memory/memory9 167/sys/devices/system/node/node0/memory9 -> ../../memory/memory9
168 168
169A backlink will also be created:
170/sys/devices/system/memory/memory9/node0 -> ../../node/node0
171
169-------------------------------- 172--------------------------------
1704. Physical memory hot-add phase 1734. Physical memory hot-add phase
171-------------------------------- 174--------------------------------
diff --git a/Documentation/misc-devices/ad525x_dpot.txt b/Documentation/misc-devices/ad525x_dpot.txt
new file mode 100644
index 000000000000..0c9413b1cbf3
--- /dev/null
+++ b/Documentation/misc-devices/ad525x_dpot.txt
@@ -0,0 +1,57 @@
1---------------------------------
2 AD525x Digital Potentiometers
3---------------------------------
4
5The ad525x_dpot driver exports a simple sysfs interface. This allows you to
6work with the immediate resistance settings as well as update the saved startup
7settings. Access to the factory programmed tolerance is also provided, but
8interpretation of this settings is required by the end application according to
9the specific part in use.
10
11---------
12 Files
13---------
14
15Each dpot device will have a set of eeprom, rdac, and tolerance files. How
16many depends on the actual part you have, as will the range of allowed values.
17
18The eeprom files are used to program the startup value of the device.
19
20The rdac files are used to program the immediate value of the device.
21
22The tolerance files are the read-only factory programmed tolerance settings
23and may vary greatly on a part-by-part basis. For exact interpretation of
24this field, please consult the datasheet for your part. This is presented
25as a hex file for easier parsing.
26
27-----------
28 Example
29-----------
30
31Locate the device in your sysfs tree. This is probably easiest by going into
32the common i2c directory and locating the device by the i2c slave address.
33
34 # ls /sys/bus/i2c/devices/
35 0-0022 0-0027 0-002f
36
37So assuming the device in question is on the first i2c bus and has the slave
38address of 0x2f, we descend (unrelated sysfs entries have been trimmed).
39
40 # ls /sys/bus/i2c/devices/0-002f/
41 eeprom0 rdac0 tolerance0
42
43You can use simple reads/writes to access these files:
44
45 # cd /sys/bus/i2c/devices/0-002f/
46
47 # cat eeprom0
48 0
49 # echo 10 > eeprom0
50 # cat eeprom0
51 10
52
53 # cat rdac0
54 5
55 # echo 3 > rdac0
56 # cat rdac0
57 3
diff --git a/Documentation/c2port.txt b/Documentation/misc-devices/c2port.txt
index d9bf93ea4398..d9bf93ea4398 100644
--- a/Documentation/c2port.txt
+++ b/Documentation/misc-devices/c2port.txt
diff --git a/Documentation/ics932s401 b/Documentation/misc-devices/ics932s401
index 07a739f406d8..07a739f406d8 100644
--- a/Documentation/ics932s401
+++ b/Documentation/misc-devices/ics932s401
diff --git a/Documentation/networking/bonding.txt b/Documentation/networking/bonding.txt
index d5181ce9ff62..61f516b135b4 100644
--- a/Documentation/networking/bonding.txt
+++ b/Documentation/networking/bonding.txt
@@ -1,7 +1,7 @@
1 1
2 Linux Ethernet Bonding Driver HOWTO 2 Linux Ethernet Bonding Driver HOWTO
3 3
4 Latest update: 12 November 2007 4 Latest update: 23 September 2009
5 5
6Initial release : Thomas Davis <tadavis at lbl.gov> 6Initial release : Thomas Davis <tadavis at lbl.gov>
7Corrections, HA extensions : 2000/10/03-15 : 7Corrections, HA extensions : 2000/10/03-15 :
@@ -614,6 +614,46 @@ primary
614 614
615 The primary option is only valid for active-backup mode. 615 The primary option is only valid for active-backup mode.
616 616
617primary_reselect
618
619 Specifies the reselection policy for the primary slave. This
620 affects how the primary slave is chosen to become the active slave
621 when failure of the active slave or recovery of the primary slave
622 occurs. This option is designed to prevent flip-flopping between
623 the primary slave and other slaves. Possible values are:
624
625 always or 0 (default)
626
627 The primary slave becomes the active slave whenever it
628 comes back up.
629
630 better or 1
631
632 The primary slave becomes the active slave when it comes
633 back up, if the speed and duplex of the primary slave is
634 better than the speed and duplex of the current active
635 slave.
636
637 failure or 2
638
639 The primary slave becomes the active slave only if the
640 current active slave fails and the primary slave is up.
641
642 The primary_reselect setting is ignored in two cases:
643
644 If no slaves are active, the first slave to recover is
645 made the active slave.
646
647 When initially enslaved, the primary slave is always made
648 the active slave.
649
650 Changing the primary_reselect policy via sysfs will cause an
651 immediate selection of the best active slave according to the new
652 policy. This may or may not result in a change of the active
653 slave, depending upon the circumstances.
654
655 This option was added for bonding version 3.6.0.
656
617updelay 657updelay
618 658
619 Specifies the time, in milliseconds, to wait before enabling a 659 Specifies the time, in milliseconds, to wait before enabling a
diff --git a/Documentation/networking/ip-sysctl.txt b/Documentation/networking/ip-sysctl.txt
index fbe427a6580c..006b39dec87d 100644
--- a/Documentation/networking/ip-sysctl.txt
+++ b/Documentation/networking/ip-sysctl.txt
@@ -164,6 +164,14 @@ tcp_congestion_control - STRING
164 additional choices may be available based on kernel configuration. 164 additional choices may be available based on kernel configuration.
165 Default is set as part of kernel configuration. 165 Default is set as part of kernel configuration.
166 166
167tcp_cookie_size - INTEGER
168 Default size of TCP Cookie Transactions (TCPCT) option, that may be
169 overridden on a per socket basis by the TCPCT socket option.
170 Values greater than the maximum (16) are interpreted as the maximum.
171 Values greater than zero and less than the minimum (8) are interpreted
172 as the minimum. Odd values are interpreted as the next even value.
173 Default: 0 (off).
174
167tcp_dsack - BOOLEAN 175tcp_dsack - BOOLEAN
168 Allows TCP to send "duplicate" SACKs. 176 Allows TCP to send "duplicate" SACKs.
169 177
@@ -723,6 +731,12 @@ accept_source_route - BOOLEAN
723 default TRUE (router) 731 default TRUE (router)
724 FALSE (host) 732 FALSE (host)
725 733
734accept_local - BOOLEAN
735 Accept packets with local source addresses. In combination with
736 suitable routing, this can be used to direct packets between two
737 local interfaces over the wire and have them accepted properly.
738 default FALSE
739
726rp_filter - INTEGER 740rp_filter - INTEGER
727 0 - No source validation. 741 0 - No source validation.
728 1 - Strict mode as defined in RFC3704 Strict Reverse Path 742 1 - Strict mode as defined in RFC3704 Strict Reverse Path
@@ -738,8 +752,8 @@ rp_filter - INTEGER
738 to prevent IP spoofing from DDos attacks. If using asymmetric routing 752 to prevent IP spoofing from DDos attacks. If using asymmetric routing
739 or other complicated routing, then loose mode is recommended. 753 or other complicated routing, then loose mode is recommended.
740 754
741 conf/all/rp_filter must also be set to non-zero to do source validation 755 The max value from conf/{all,interface}/rp_filter is used
742 on the interface 756 when doing source validation on the {interface}.
743 757
744 Default value is 0. Note that some distributions enable it 758 Default value is 0. Note that some distributions enable it
745 in startup scripts. 759 in startup scripts.
@@ -1086,6 +1100,24 @@ accept_dad - INTEGER
1086 2: Enable DAD, and disable IPv6 operation if MAC-based duplicate 1100 2: Enable DAD, and disable IPv6 operation if MAC-based duplicate
1087 link-local address has been found. 1101 link-local address has been found.
1088 1102
1103force_tllao - BOOLEAN
1104 Enable sending the target link-layer address option even when
1105 responding to a unicast neighbor solicitation.
1106 Default: FALSE
1107
1108 Quoting from RFC 2461, section 4.4, Target link-layer address:
1109
1110 "The option MUST be included for multicast solicitations in order to
1111 avoid infinite Neighbor Solicitation "recursion" when the peer node
1112 does not have a cache entry to return a Neighbor Advertisements
1113 message. When responding to unicast solicitations, the option can be
1114 omitted since the sender of the solicitation has the correct link-
1115 layer address; otherwise it would not have be able to send the unicast
1116 solicitation in the first place. However, including the link-layer
1117 address in this case adds little overhead and eliminates a potential
1118 race condition where the sender deletes the cached link-layer address
1119 prior to receiving a response to a previous solicitation."
1120
1089icmp/*: 1121icmp/*:
1090ratelimit - INTEGER 1122ratelimit - INTEGER
1091 Limit the maximal rates for sending ICMPv6 packets. 1123 Limit the maximal rates for sending ICMPv6 packets.
diff --git a/Documentation/nommu-mmap.txt b/Documentation/nommu-mmap.txt
index b565e8279d13..8e1ddec2c78a 100644
--- a/Documentation/nommu-mmap.txt
+++ b/Documentation/nommu-mmap.txt
@@ -119,6 +119,32 @@ FURTHER NOTES ON NO-MMU MMAP
119 granule but will only discard the excess if appropriately configured as 119 granule but will only discard the excess if appropriately configured as
120 this has an effect on fragmentation. 120 this has an effect on fragmentation.
121 121
122 (*) The memory allocated by a request for an anonymous mapping will normally
123 be cleared by the kernel before being returned in accordance with the
124 Linux man pages (ver 2.22 or later).
125
126 In the MMU case this can be achieved with reasonable performance as
127 regions are backed by virtual pages, with the contents only being mapped
128 to cleared physical pages when a write happens on that specific page
129 (prior to which, the pages are effectively mapped to the global zero page
130 from which reads can take place). This spreads out the time it takes to
131 initialize the contents of a page - depending on the write-usage of the
132 mapping.
133
134 In the no-MMU case, however, anonymous mappings are backed by physical
135 pages, and the entire map is cleared at allocation time. This can cause
136 significant delays during a userspace malloc() as the C library does an
137 anonymous mapping and the kernel then does a memset for the entire map.
138
139 However, for memory that isn't required to be precleared - such as that
140 returned by malloc() - mmap() can take a MAP_UNINITIALIZED flag to
141 indicate to the kernel that it shouldn't bother clearing the memory before
142 returning it. Note that CONFIG_MMAP_ALLOW_UNINITIALIZED must be enabled
143 to permit this, otherwise the flag will be ignored.
144
145 uClibc uses this to speed up malloc(), and the ELF-FDPIC binfmt uses this
146 to allocate the brk and stack region.
147
122 (*) A list of all the private copy and anonymous mappings on the system is 148 (*) A list of all the private copy and anonymous mappings on the system is
123 visible through /proc/maps in no-MMU mode. 149 visible through /proc/maps in no-MMU mode.
124 150
diff --git a/Documentation/oops-tracing.txt b/Documentation/oops-tracing.txt
index b152e81da592..c10c022b911c 100644
--- a/Documentation/oops-tracing.txt
+++ b/Documentation/oops-tracing.txt
@@ -257,6 +257,8 @@ characters, each representing a particular tainted value.
257 257
258 10: 'W' if a warning has previously been issued by the kernel. 258 10: 'W' if a warning has previously been issued by the kernel.
259 259
260 11: 'C' if a staging driver has been loaded.
261
260The primary reason for the 'Tainted: ' string is to tell kernel 262The primary reason for the 'Tainted: ' string is to tell kernel
261debuggers if this is a clean kernel or if anything unusual has 263debuggers if this is a clean kernel or if anything unusual has
262occurred. Tainting is permanent: even if an offending module is 264occurred. Tainting is permanent: even if an offending module is
diff --git a/Documentation/pcmcia/driver-changes.txt b/Documentation/pcmcia/driver-changes.txt
index 059934363caf..446f43b309df 100644
--- a/Documentation/pcmcia/driver-changes.txt
+++ b/Documentation/pcmcia/driver-changes.txt
@@ -1,5 +1,17 @@
1This file details changes in 2.6 which affect PCMCIA card driver authors: 1This file details changes in 2.6 which affect PCMCIA card driver authors:
2 2
3* no cs_error / CS_CHECK / CONFIG_PCMCIA_DEBUG (as of 2.6.33)
4 Instead of the cs_error() callback or the CS_CHECK() macro, please use
5 Linux-style checking of return values, and -- if necessary -- debug
6 messages using "dev_dbg()" or "pr_debug()".
7
8* New CIS tuple access (as of 2.6.33)
9 Instead of pcmcia_get_{first,next}_tuple(), pcmcia_get_tuple_data() and
10 pcmcia_parse_tuple(), a driver shall use "pcmcia_get_tuple()" if it is
11 only interested in one (raw) tuple, or "pcmcia_loop_tuple()" if it is
12 interested in all tuples of one type. To decode the MAC from CISTPL_FUNCE,
13 a new helper "pcmcia_get_mac_from_cis()" was added.
14
3* New configuration loop helper (as of 2.6.28) 15* New configuration loop helper (as of 2.6.28)
4 By calling pcmcia_loop_config(), a driver can iterate over all available 16 By calling pcmcia_loop_config(), a driver can iterate over all available
5 configuration options. During a driver's probe() phase, one doesn't need 17 configuration options. During a driver's probe() phase, one doesn't need
diff --git a/Documentation/power/regulator/consumer.txt b/Documentation/power/regulator/consumer.txt
index 5f83fd24ea84..cdebb5145c25 100644
--- a/Documentation/power/regulator/consumer.txt
+++ b/Documentation/power/regulator/consumer.txt
@@ -104,7 +104,7 @@ to set the limit to 500mA when supplying power.
104 104
105Consumers can control their supply current limit by calling :- 105Consumers can control their supply current limit by calling :-
106 106
107int regulator_set_current_limit(regulator, min_uV, max_uV); 107int regulator_set_current_limit(regulator, min_uA, max_uA);
108 108
109Where min_uA and max_uA are the minimum and maximum acceptable current limit in 109Where min_uA and max_uA are the minimum and maximum acceptable current limit in
110microamps. 110microamps.
diff --git a/Documentation/power/runtime_pm.txt b/Documentation/power/runtime_pm.txt
index f49a33b704d2..4a3109b28847 100644
--- a/Documentation/power/runtime_pm.txt
+++ b/Documentation/power/runtime_pm.txt
@@ -38,7 +38,7 @@ struct dev_pm_ops {
38 ... 38 ...
39 int (*runtime_suspend)(struct device *dev); 39 int (*runtime_suspend)(struct device *dev);
40 int (*runtime_resume)(struct device *dev); 40 int (*runtime_resume)(struct device *dev);
41 void (*runtime_idle)(struct device *dev); 41 int (*runtime_idle)(struct device *dev);
42 ... 42 ...
43}; 43};
44 44
@@ -71,9 +71,9 @@ what to do to handle the device).
71 purpose). 71 purpose).
72 72
73In particular, if the driver requires remote wakeup capability for proper 73In particular, if the driver requires remote wakeup capability for proper
74functioning and device_may_wakeup() returns 'false' for the device, then 74functioning and device_run_wake() returns 'false' for the device, then
75->runtime_suspend() should return -EBUSY. On the other hand, if 75->runtime_suspend() should return -EBUSY. On the other hand, if
76device_may_wakeup() returns 'true' for the device and the device is put 76device_run_wake() returns 'true' for the device and the device is put
77into a low power state during the execution of its bus type's 77into a low power state during the execution of its bus type's
78->runtime_suspend(), it is expected that remote wake-up (i.e. hardware mechanism 78->runtime_suspend(), it is expected that remote wake-up (i.e. hardware mechanism
79allowing the device to request a change of its power state, such as PCI PME) 79allowing the device to request a change of its power state, such as PCI PME)
@@ -114,7 +114,8 @@ The action performed by a bus type's ->runtime_idle() callback is totally
114dependent on the bus type in question, but the expected and recommended action 114dependent on the bus type in question, but the expected and recommended action
115is to check if the device can be suspended (i.e. if all of the conditions 115is to check if the device can be suspended (i.e. if all of the conditions
116necessary for suspending the device are satisfied) and to queue up a suspend 116necessary for suspending the device are satisfied) and to queue up a suspend
117request for the device in that case. 117request for the device in that case. The value returned by this callback is
118ignored by the PM core.
118 119
119The helper functions provided by the PM core, described in Section 4, guarantee 120The helper functions provided by the PM core, described in Section 4, guarantee
120that the following constraints are met with respect to the bus type's run-time 121that the following constraints are met with respect to the bus type's run-time
@@ -214,6 +215,9 @@ defined in include/linux/pm.h:
214 being executed for that device and it is not practical to wait for the 215 being executed for that device and it is not practical to wait for the
215 suspend to complete; means "start a resume as soon as you've suspended" 216 suspend to complete; means "start a resume as soon as you've suspended"
216 217
218 unsigned int run_wake;
219 - set if the device is capable of generating run-time wake-up events
220
217 enum rpm_status runtime_status; 221 enum rpm_status runtime_status;
218 - the run-time PM status of the device; this field's initial value is 222 - the run-time PM status of the device; this field's initial value is
219 RPM_SUSPENDED, which means that each device is initially regarded by the 223 RPM_SUSPENDED, which means that each device is initially regarded by the
diff --git a/Documentation/powerpc/dts-bindings/fsl/board.txt b/Documentation/powerpc/dts-bindings/fsl/board.txt
index e8b5bc24d0ac..39e941515a36 100644
--- a/Documentation/powerpc/dts-bindings/fsl/board.txt
+++ b/Documentation/powerpc/dts-bindings/fsl/board.txt
@@ -20,12 +20,16 @@ Required properities:
20- compatible : should be "fsl,fpga-pixis". 20- compatible : should be "fsl,fpga-pixis".
21- reg : should contain the address and the length of the FPPGA register 21- reg : should contain the address and the length of the FPPGA register
22 set. 22 set.
23- interrupt-parent: should specify phandle for the interrupt controller.
24- interrupts : should specify event (wakeup) IRQ.
23 25
24Example (MPC8610HPCD): 26Example (MPC8610HPCD):
25 27
26 board-control@e8000000 { 28 board-control@e8000000 {
27 compatible = "fsl,fpga-pixis"; 29 compatible = "fsl,fpga-pixis";
28 reg = <0xe8000000 32>; 30 reg = <0xe8000000 32>;
31 interrupt-parent = <&mpic>;
32 interrupts = <8 8>;
29 }; 33 };
30 34
31* Freescale BCSR GPIO banks 35* Freescale BCSR GPIO banks
diff --git a/Documentation/powerpc/dts-bindings/fsl/mpc5200.txt b/Documentation/powerpc/dts-bindings/fsl/mpc5200.txt
index 8447fd7090d0..5c6602dbfdc2 100644
--- a/Documentation/powerpc/dts-bindings/fsl/mpc5200.txt
+++ b/Documentation/powerpc/dts-bindings/fsl/mpc5200.txt
@@ -103,7 +103,22 @@ fsl,mpc5200-gpt nodes
103--------------------- 103---------------------
104On the mpc5200 and 5200b, GPT0 has a watchdog timer function. If the board 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 105design supports the internal wdt, then the device node for GPT0 should
106include the empty property 'fsl,has-wdt'. 106include the empty property 'fsl,has-wdt'. Note that this does not activate
107the watchdog. The timer will function as a GPT if the timer api is used, and
108it will function as watchdog if the watchdog device is used. The watchdog
109mode has priority over the gpt mode, i.e. if the watchdog is activated, any
110gpt api call to this timer will fail with -EBUSY.
111
112If you add the property
113 fsl,wdt-on-boot = <n>;
114GPT0 will be marked as in-use watchdog, i.e. blocking every gpt access to it.
115If n>0, the watchdog is started with a timeout of n seconds. If n=0, the
116configuration of the watchdog is not touched. This is useful in two cases:
117- just mark GPT0 as watchdog, blocking gpt accesses, and configure it later;
118- do not touch a configuration assigned by the boot loader which supervises
119 the boot process itself.
120
121The watchdog will respect the CONFIG_WATCHDOG_NOWAYOUT option.
107 122
108An mpc5200-gpt can be used as a single line GPIO controller. To do so, 123An mpc5200-gpt can be used as a single line GPIO controller. To do so,
109add the following properties to the gpt node: 124add the following properties to the gpt node:
@@ -178,3 +193,13 @@ External interrupts:
178 external irq3: interrupts = <1 3 n>; 193 external irq3: interrupts = <1 3 n>;
179'n' is sense (0: level high, 1: edge rising, 2: edge falling 3: level low) 194'n' is sense (0: level high, 1: edge rising, 2: edge falling 3: level low)
180 195
196fsl,mpc5200-mscan nodes
197-----------------------
198In addition to the required compatible-, reg- and interrupt-properites, you can
199also specify which clock source shall be used for the controller:
200
201- fsl,mscan-clock-source- a string describing the clock source. Valid values
202 are: "ip" for ip bus clock
203 "ref" for reference clock (XTAL)
204 "ref" is default in case this property is not
205 present.
diff --git a/Documentation/powerpc/dts-bindings/xilinx.txt b/Documentation/powerpc/dts-bindings/xilinx.txt
index 80339fe4300b..ea68046bb9cb 100644
--- a/Documentation/powerpc/dts-bindings/xilinx.txt
+++ b/Documentation/powerpc/dts-bindings/xilinx.txt
@@ -292,4 +292,15 @@
292 - reg-offset : A value of 3 is required 292 - reg-offset : A value of 3 is required
293 - reg-shift : A value of 2 is required 293 - reg-shift : A value of 2 is required
294 294
295 vii) Xilinx USB Host controller
296
297 The Xilinx USB host controller is EHCI compatible but with a different
298 base address for the EHCI registers, and it is always a big-endian
299 USB Host controller. The hardware can be configured as high speed only,
300 or high speed/full speed hybrid.
301
302 Required properties:
303 - xlnx,support-usb-fs: A value 0 means the core is built as high speed
304 only. A value 1 means the core also supports
305 full speed devices.
295 306
diff --git a/Documentation/scsi/ChangeLog.megaraid_sas b/Documentation/scsi/ChangeLog.megaraid_sas
index c851ef497795..17ffa0607712 100644
--- a/Documentation/scsi/ChangeLog.megaraid_sas
+++ b/Documentation/scsi/ChangeLog.megaraid_sas
@@ -1,3 +1,65 @@
11 Release Date : Tues. July 28, 2009 10:12:45 PST 2009 -
2 (emaild-id:megaraidlinux@lsi.com)
3 Bo Yang
4
52 Current Version : 00.00.04.12
63 Older Version : 00.00.04.10
7
81. Change the AEN sys PD update from scsi_scan to
9 scsi_add_device and scsi_remove_device.
102. Takeoff the debug print-out in aen_polling routine.
11
121 Release Date : Thur. July 02, 2009 10:12:45 PST 2009 -
13 (emaild-id:megaraidlinux@lsi.com)
14 Bo Yang
15
162 Current Version : 00.00.04.10
173 Older Version : 00.00.04.08
18
191. Add the 3 mins timeout during the controller initialize.
202. Add the fix for 64bit sense date errors.
21
221 Release Date : Tues. May 05, 2009 10:12:45 PST 2009 -
23 (emaild-id:megaraidlinux@lsi.com)
24 Bo Yang
25
262 Current Version : 00.00.04.08
273 Older Version : 00.00.04.06
28
291. Add the fix of pending in FW after deleted the logic drives.
302. Add the fix of deallocating memory after get pdlist.
31
321 Release Date : Tues. March 26, 2009 10:12:45 PST 2009 -
33 (emaild-id:megaraidlinux@lsi.com)
34 Bo Yang
35
362 Current Version : 00.00.04.06
373 Older Version : 00.00.04.04
38
391. Add the fix of the driver cmd empty fix of the driver cmd empty.
402. Add the fix of the driver MSM AEN CMD cause the system slow.
41
421 Release Date : Tues. March 03, 2009 10:12:45 PST 2009 -
43 (emaild-id:megaraidlinux@lsi.com)
44 Bo Yang
45
462 Current Version : 00.00.04.04
473 Older Version : 00.00.04.01
48
491. Add the Tape drive fix to the driver: If the command is for
50 the tape device, set the pthru timeout to the os layer timeout value.
51
522. Add Poll_wait mechanism to Gen-2 Linux driv.
53 In the aen handler, driver needs to wakeup poll handler similar to
54 the way it raises SIGIO.
55
563. Add new controller new SAS2 support to the driver.
57
584. Report the unconfigured PD (system PD) to OS.
59
605. Add the IEEE SGL support to the driver
61
626. Reasign the Application cmds to SAS2 controller
1 63
21 Release Date : Thur.July. 24 11:41:51 PST 2008 - 641 Release Date : Thur.July. 24 11:41:51 PST 2008 -
3 (emaild-id:megaraidlinux@lsi.com) 65 (emaild-id:megaraidlinux@lsi.com)
@@ -185,7 +247,7 @@ ii. FW enables WCE bit in Mode Sense cmd for drives that are configured
185 Disks are exposed with WCE=1. User is advised to enable Write Back 247 Disks are exposed with WCE=1. User is advised to enable Write Back
186 mode only when the controller has battery backup. At this time 248 mode only when the controller has battery backup. At this time
187 Synhronize cache is not supported by the FW. Driver will short-cycle 249 Synhronize cache is not supported by the FW. Driver will short-cycle
188 the cmd and return sucess without sending down to FW. 250 the cmd and return success without sending down to FW.
189 251
1901 Release Date : Sun Jan. 14 11:21:32 PDT 2007 - 2521 Release Date : Sun Jan. 14 11:21:32 PDT 2007 -
191 Sumant Patro <Sumant.Patro@lsil.com>/Bo Yang 253 Sumant Patro <Sumant.Patro@lsil.com>/Bo Yang
diff --git a/Documentation/serial/hayes-esp.txt b/Documentation/serial/hayes-esp.txt
deleted file mode 100644
index 09b5d5856758..000000000000
--- a/Documentation/serial/hayes-esp.txt
+++ /dev/null
@@ -1,154 +0,0 @@
1HAYES ESP DRIVER VERSION 2.1
2
3A big thanks to the people at Hayes, especially Alan Adamson. Their support
4has enabled me to provide enhancements to the driver.
5
6Please report your experiences with this driver to me (arobinso@nyx.net). I
7am looking for both positive and negative feedback.
8
9*** IMPORTANT CHANGES FOR 2.1 ***
10Support for PIO mode. Five situations will cause PIO mode to be used:
111) A multiport card is detected. PIO mode will always be used. (8 port cards
12do not support DMA).
132) The DMA channel is set to an invalid value (anything other than 1 or 3).
143) The DMA buffer/channel could not be allocated. The port will revert to PIO
15mode until it is reopened.
164) Less than a specified number of bytes need to be transferred to/from the
17FIFOs. PIO mode will be used for that transfer only.
185) A port needs to do a DMA transfer and another port is already using the
19DMA channel. PIO mode will be used for that transfer only.
20
21Since the Hayes ESP seems to conflict with other cards (notably sound cards)
22when using DMA, DMA is turned off by default. To use DMA, it must be turned
23on explicitly, either with the "dma=" option described below or with
24setserial. A multiport card can be forced into DMA mode by using setserial;
25however, most multiport cards don't support DMA.
26
27The latest version of setserial allows the enhanced configuration of the ESP
28card to be viewed and modified.
29***
30
31This package contains the files needed to compile a module to support the Hayes
32ESP card. The drivers are basically a modified version of the serial drivers.
33
34Features:
35
36- Uses the enhanced mode of the ESP card, allowing a wider range of
37 interrupts and features than compatibility mode
38- Uses DMA and 16 bit PIO mode to transfer data to and from the ESP's FIFOs,
39 reducing CPU load
40- Supports primary and secondary ports
41
42
43If the driver is compiled as a module, the IRQs to use can be specified by
44using the irq= option. The format is:
45
46irq=[0x100],[0x140],[0x180],[0x200],[0x240],[0x280],[0x300],[0x380]
47
48The address in brackets is the base address of the card. The IRQ of
49nonexistent cards can be set to 0. If an IRQ of a card that does exist is set
50to 0, the driver will attempt to guess at the correct IRQ. For example, to set
51the IRQ of the card at address 0x300 to 12, the insmod command would be:
52
53insmod esp irq=0,0,0,0,0,0,12,0
54
55The custom divisor can be set by using the divisor= option. The format is the
56same as for the irq= option. Each divisor value is a series of hex digits,
57with each digit representing the divisor to use for a corresponding port. The
58divisor value is constructed RIGHT TO LEFT. Specifying a nonzero divisor value
59will automatically set the spd_cust flag. To calculate the divisor to use for
60a certain baud rate, divide the port's base baud (generally 921600) by the
61desired rate. For example, to set the divisor of the primary port at 0x300 to
624 and the divisor of the secondary port at 0x308 to 8, the insmod command would
63be:
64
65insmod esp divisor=0,0,0,0,0,0,0x84,0
66
67The dma= option can be used to set the DMA channel. The channel can be either
681 or 3. Specifying any other value will force the driver to use PIO mode.
69For example, to set the DMA channel to 3, the insmod command would be:
70
71insmod esp dma=3
72
73The rx_trigger= and tx_trigger= options can be used to set the FIFO trigger
74levels. They specify when the ESP card should send an interrupt. Larger
75values will decrease the number of interrupts; however, a value too high may
76result in data loss. Valid values are 1 through 1023, with 768 being the
77default. For example, to set the receive trigger level to 512 bytes and the
78transmit trigger level to 700 bytes, the insmod command would be:
79
80insmod esp rx_trigger=512 tx_trigger=700
81
82The flow_off= and flow_on= options can be used to set the hardware flow off/
83flow on levels. The flow on level must be lower than the flow off level, and
84the flow off level should be higher than rx_trigger. Valid values are 1
85through 1023, with 1016 being the default flow off level and 944 being the
86default flow on level. For example, to set the flow off level to 1000 bytes
87and the flow on level to 935 bytes, the insmod command would be:
88
89insmod esp flow_off=1000 flow_on=935
90
91The rx_timeout= option can be used to set the receive timeout value. This
92value indicates how long after receiving the last character that the ESP card
93should wait before signalling an interrupt. Valid values are 0 though 255,
94with 128 being the default. A value too high will increase latency, and a
95value too low will cause unnecessary interrupts. For example, to set the
96receive timeout to 255, the insmod command would be:
97
98insmod esp rx_timeout=255
99
100The pio_threshold= option sets the threshold (in number of characters) for
101using PIO mode instead of DMA mode. For example, if this value is 32,
102transfers of 32 bytes or less will always use PIO mode.
103
104insmod esp pio_threshold=32
105
106Multiple options can be listed on the insmod command line by separating each
107option with a space. For example:
108
109insmod esp dma=3 trigger=512
110
111The esp module can be automatically loaded when needed. To cause this to
112happen, add the following lines to /etc/modprobe.conf (replacing the last line
113with options for your configuration):
114
115alias char-major-57 esp
116alias char-major-58 esp
117options esp irq=0,0,0,0,0,0,3,0 divisor=0,0,0,0,0,0,0x4,0
118
119You may also need to run 'depmod -a'.
120
121Devices must be created manually. To create the devices, note the output from
122the module after it is inserted. The output will appear in the location where
123kernel messages usually appear (usually /var/adm/messages). Create two devices
124for each 'tty' mentioned, one with major of 57 and the other with major of 58.
125The minor number should be the same as the tty number reported. The commands
126would be (replace ? with the tty number):
127
128mknod /dev/ttyP? c 57 ?
129mknod /dev/cup? c 58 ?
130
131For example, if the following line appears:
132
133Oct 24 18:17:23 techno kernel: ttyP8 at 0x0140 (irq = 3) is an ESP primary port
134
135...two devices should be created:
136
137mknod /dev/ttyP8 c 57 8
138mknod /dev/cup8 c 58 8
139
140You may need to set the permissions on the devices:
141
142chmod 666 /dev/ttyP*
143chmod 666 /dev/cup*
144
145The ESP module and the serial module should not conflict (they can be used at
146the same time). After the ESP module has been loaded the ports on the ESP card
147will no longer be accessible by the serial driver.
148
149If I/O errors are experienced when accessing the port, check for IRQ and DMA
150conflicts ('cat /proc/interrupts' and 'cat /proc/dma' for a list of IRQs and
151DMAs currently in use).
152
153Enjoy!
154Andrew J. Robinson <arobinso@nyx.net>
diff --git a/Documentation/serial/tty.txt b/Documentation/serial/tty.txt
index 8e65c4498c52..5e5349a4fcd2 100644
--- a/Documentation/serial/tty.txt
+++ b/Documentation/serial/tty.txt
@@ -42,7 +42,8 @@ TTY side interfaces:
42open() - Called when the line discipline is attached to 42open() - Called when the line discipline is attached to
43 the terminal. No other call into the line 43 the terminal. No other call into the line
44 discipline for this tty will occur until it 44 discipline for this tty will occur until it
45 completes successfully. Can sleep. 45 completes successfully. Returning an error will
46 prevent the ldisc from being attached. Can sleep.
46 47
47close() - This is called on a terminal when the line 48close() - This is called on a terminal when the line
48 discipline is being unplugged. At the point of 49 discipline is being unplugged. At the point of
@@ -52,7 +53,7 @@ close() - This is called on a terminal when the line
52hangup() - Called when the tty line is hung up. 53hangup() - Called when the tty line is hung up.
53 The line discipline should cease I/O to the tty. 54 The line discipline should cease I/O to the tty.
54 No further calls into the ldisc code will occur. 55 No further calls into the ldisc code will occur.
55 Can sleep. 56 The return value is ignored. Can sleep.
56 57
57write() - A process is writing data through the line 58write() - A process is writing data through the line
58 discipline. Multiple write calls are serialized 59 discipline. Multiple write calls are serialized
@@ -83,6 +84,10 @@ ioctl() - Called when an ioctl is handed to the tty layer
83 that might be for the ldisc. Multiple ioctl calls 84 that might be for the ldisc. Multiple ioctl calls
84 may occur in parallel. May sleep. 85 may occur in parallel. May sleep.
85 86
87compat_ioctl() - Called when a 32 bit ioctl is handed to the tty layer
88 that might be for the ldisc. Multiple ioctl calls
89 may occur in parallel. May sleep.
90
86Driver Side Interfaces: 91Driver Side Interfaces:
87 92
88receive_buf() - Hand buffers of bytes from the driver to the ldisc 93receive_buf() - Hand buffers of bytes from the driver to the ldisc
diff --git a/Documentation/slow-work.txt b/Documentation/slow-work.txt
index ebc50f808ea4..9dbf4470c7e1 100644
--- a/Documentation/slow-work.txt
+++ b/Documentation/slow-work.txt
@@ -41,6 +41,13 @@ expand files, provided the time taken to do so isn't too long.
41Operations of both types may sleep during execution, thus tying up the thread 41Operations of both types may sleep during execution, thus tying up the thread
42loaned to it. 42loaned to it.
43 43
44A further class of work item is available, based on the slow work item class:
45
46 (*) Delayed slow work items.
47
48These are slow work items that have a timer to defer queueing of the item for
49a while.
50
44 51
45THREAD-TO-CLASS ALLOCATION 52THREAD-TO-CLASS ALLOCATION
46-------------------------- 53--------------------------
@@ -64,9 +71,11 @@ USING SLOW WORK ITEMS
64Firstly, a module or subsystem wanting to make use of slow work items must 71Firstly, a module or subsystem wanting to make use of slow work items must
65register its interest: 72register its interest:
66 73
67 int ret = slow_work_register_user(); 74 int ret = slow_work_register_user(struct module *module);
68 75
69This will return 0 if successful, or a -ve error upon failure. 76This will return 0 if successful, or a -ve error upon failure. The module
77pointer should be the module interested in using this facility (almost
78certainly THIS_MODULE).
70 79
71 80
72Slow work items may then be set up by: 81Slow work items may then be set up by:
@@ -93,6 +102,10 @@ Slow work items may then be set up by:
93 102
94 or: 103 or:
95 104
105 delayed_slow_work_init(&myitem, &myitem_ops);
106
107 or:
108
96 vslow_work_init(&myitem, &myitem_ops); 109 vslow_work_init(&myitem, &myitem_ops);
97 110
98 depending on its class. 111 depending on its class.
@@ -102,15 +115,92 @@ A suitably set up work item can then be enqueued for processing:
102 int ret = slow_work_enqueue(&myitem); 115 int ret = slow_work_enqueue(&myitem);
103 116
104This will return a -ve error if the thread pool is unable to gain a reference 117This will return a -ve error if the thread pool is unable to gain a reference
105on the item, 0 otherwise. 118on the item, 0 otherwise, or (for delayed work):
119
120 int ret = delayed_slow_work_enqueue(&myitem, my_jiffy_delay);
106 121
107 122
108The items are reference counted, so there ought to be no need for a flush 123The items are reference counted, so there ought to be no need for a flush
109operation. When all a module's slow work items have been processed, and the 124operation. But as the reference counting is optional, means to cancel
125existing work items are also included:
126
127 cancel_slow_work(&myitem);
128 cancel_delayed_slow_work(&myitem);
129
130can be used to cancel pending work. The above cancel function waits for
131existing work to have been executed (or prevent execution of them, depending
132on timing).
133
134
135When all a module's slow work items have been processed, and the
110module has no further interest in the facility, it should unregister its 136module has no further interest in the facility, it should unregister its
111interest: 137interest:
112 138
113 slow_work_unregister_user(); 139 slow_work_unregister_user(struct module *module);
140
141The module pointer is used to wait for all outstanding work items for that
142module before completing the unregistration. This prevents the put_ref() code
143from being taken away before it completes. module should almost certainly be
144THIS_MODULE.
145
146
147================
148HELPER FUNCTIONS
149================
150
151The slow-work facility provides a function by which it can be determined
152whether or not an item is queued for later execution:
153
154 bool queued = slow_work_is_queued(struct slow_work *work);
155
156If it returns false, then the item is not on the queue (it may be executing
157with a requeue pending). This can be used to work out whether an item on which
158another depends is on the queue, thus allowing a dependent item to be queued
159after it.
160
161If the above shows an item on which another depends not to be queued, then the
162owner of the dependent item might need to wait. However, to avoid locking up
163the threads unnecessarily be sleeping in them, it can make sense under some
164circumstances to return the work item to the queue, thus deferring it until
165some other items have had a chance to make use of the yielded thread.
166
167To yield a thread and defer an item, the work function should simply enqueue
168the work item again and return. However, this doesn't work if there's nothing
169actually on the queue, as the thread just vacated will jump straight back into
170the item's work function, thus busy waiting on a CPU.
171
172Instead, the item should use the thread to wait for the dependency to go away,
173but rather than using schedule() or schedule_timeout() to sleep, it should use
174the following function:
175
176 bool requeue = slow_work_sleep_till_thread_needed(
177 struct slow_work *work,
178 signed long *_timeout);
179
180This will add a second wait and then sleep, such that it will be woken up if
181either something appears on the queue that could usefully make use of the
182thread - and behind which this item can be queued, or if the event the caller
183set up to wait for happens. True will be returned if something else appeared
184on the queue and this work function should perhaps return, of false if
185something else woke it up. The timeout is as for schedule_timeout().
186
187For example:
188
189 wq = bit_waitqueue(&my_flags, MY_BIT);
190 init_wait(&wait);
191 requeue = false;
192 do {
193 prepare_to_wait(wq, &wait, TASK_UNINTERRUPTIBLE);
194 if (!test_bit(MY_BIT, &my_flags))
195 break;
196 requeue = slow_work_sleep_till_thread_needed(&my_work,
197 &timeout);
198 } while (timeout > 0 && !requeue);
199 finish_wait(wq, &wait);
200 if (!test_bit(MY_BIT, &my_flags)
201 goto do_my_thing;
202 if (requeue)
203 return; // to slow_work
114 204
115 205
116=============== 206===============
@@ -118,7 +208,8 @@ ITEM OPERATIONS
118=============== 208===============
119 209
120Each work item requires a table of operations of type struct slow_work_ops. 210Each work item requires a table of operations of type struct slow_work_ops.
121All members are required: 211Only ->execute() is required; the getting and putting of a reference and the
212describing of an item are all optional.
122 213
123 (*) Get a reference on an item: 214 (*) Get a reference on an item:
124 215
@@ -148,6 +239,16 @@ All members are required:
148 This should perform the work required of the item. It may sleep, it may 239 This should perform the work required of the item. It may sleep, it may
149 perform disk I/O and it may wait for locks. 240 perform disk I/O and it may wait for locks.
150 241
242 (*) View an item through /proc:
243
244 void (*desc)(struct slow_work *work, struct seq_file *m);
245
246 If supplied, this should print to 'm' a small string describing the work
247 the item is to do. This should be no more than about 40 characters, and
248 shouldn't include a newline character.
249
250 See the 'Viewing executing and queued items' section below.
251
151 252
152================== 253==================
153POOL CONFIGURATION 254POOL CONFIGURATION
@@ -172,3 +273,50 @@ The slow-work thread pool has a number of configurables:
172 is bounded to between 1 and one fewer than the number of active threads. 273 is bounded to between 1 and one fewer than the number of active threads.
173 This ensures there is always at least one thread that can process very 274 This ensures there is always at least one thread that can process very
174 slow work items, and always at least one thread that won't. 275 slow work items, and always at least one thread that won't.
276
277
278==================================
279VIEWING EXECUTING AND QUEUED ITEMS
280==================================
281
282If CONFIG_SLOW_WORK_DEBUG is enabled, a debugfs file is made available:
283
284 /sys/kernel/debug/slow_work/runqueue
285
286through which the list of work items being executed and the queues of items to
287be executed may be viewed. The owner of a work item is given the chance to
288add some information of its own.
289
290The contents look something like the following:
291
292 THR PID ITEM ADDR FL MARK DESC
293 === ===== ================ == ===== ==========
294 0 3005 ffff880023f52348 a 952ms FSC: OBJ17d3: LOOK
295 1 3006 ffff880024e33668 2 160ms FSC: OBJ17e5 OP60d3b: Write1/Store fl=2
296 2 3165 ffff8800296dd180 a 424ms FSC: OBJ17e4: LOOK
297 3 4089 ffff8800262c8d78 a 212ms FSC: OBJ17ea: CRTN
298 4 4090 ffff88002792bed8 2 388ms FSC: OBJ17e8 OP60d36: Write1/Store fl=2
299 5 4092 ffff88002a0ef308 2 388ms FSC: OBJ17e7 OP60d2e: Write1/Store fl=2
300 6 4094 ffff88002abaf4b8 2 132ms FSC: OBJ17e2 OP60d4e: Write1/Store fl=2
301 7 4095 ffff88002bb188e0 a 388ms FSC: OBJ17e9: CRTN
302 vsq - ffff880023d99668 1 308ms FSC: OBJ17e0 OP60f91: Write1/EnQ fl=2
303 vsq - ffff8800295d1740 1 212ms FSC: OBJ16be OP4d4b6: Write1/EnQ fl=2
304 vsq - ffff880025ba3308 1 160ms FSC: OBJ179a OP58dec: Write1/EnQ fl=2
305 vsq - ffff880024ec83e0 1 160ms FSC: OBJ17ae OP599f2: Write1/EnQ fl=2
306 vsq - ffff880026618e00 1 160ms FSC: OBJ17e6 OP60d33: Write1/EnQ fl=2
307 vsq - ffff880025a2a4b8 1 132ms FSC: OBJ16a2 OP4d583: Write1/EnQ fl=2
308 vsq - ffff880023cbe6d8 9 212ms FSC: OBJ17eb: LOOK
309 vsq - ffff880024d37590 9 212ms FSC: OBJ17ec: LOOK
310 vsq - ffff880027746cb0 9 212ms FSC: OBJ17ed: LOOK
311 vsq - ffff880024d37ae8 9 212ms FSC: OBJ17ee: LOOK
312 vsq - ffff880024d37cb0 9 212ms FSC: OBJ17ef: LOOK
313 vsq - ffff880025036550 9 212ms FSC: OBJ17f0: LOOK
314 vsq - ffff8800250368e0 9 212ms FSC: OBJ17f1: LOOK
315 vsq - ffff880025036aa8 9 212ms FSC: OBJ17f2: LOOK
316
317In the 'THR' column, executing items show the thread they're occupying and
318queued threads indicate which queue they're on. 'PID' shows the process ID of
319a slow-work thread that's executing something. 'FL' shows the work item flags.
320'MARK' indicates how long since an item was queued or began executing. Lastly,
321the 'DESC' column permits the owner of an item to give some information.
322
diff --git a/Documentation/sound/alsa/ALSA-Configuration.txt b/Documentation/sound/alsa/ALSA-Configuration.txt
index 1c8eb4518ce0..8923597bd2bd 100644
--- a/Documentation/sound/alsa/ALSA-Configuration.txt
+++ b/Documentation/sound/alsa/ALSA-Configuration.txt
@@ -522,7 +522,7 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed.
522 pcm_devs - Number of PCM devices assigned to each card 522 pcm_devs - Number of PCM devices assigned to each card
523 (default = 1, up to 4) 523 (default = 1, up to 4)
524 pcm_substreams - Number of PCM substreams assigned to each PCM 524 pcm_substreams - Number of PCM substreams assigned to each PCM
525 (default = 8, up to 16) 525 (default = 8, up to 128)
526 hrtimer - Use hrtimer (=1, default) or system timer (=0) 526 hrtimer - Use hrtimer (=1, default) or system timer (=0)
527 fake_buffer - Fake buffer allocations (default = 1) 527 fake_buffer - Fake buffer allocations (default = 1)
528 528
@@ -798,6 +798,9 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed.
798 setup before initializing the codecs. This option is 798 setup before initializing the codecs. This option is
799 available only when CONFIG_SND_HDA_PATCH_LOADER=y is set. 799 available only when CONFIG_SND_HDA_PATCH_LOADER=y is set.
800 See HD-Audio.txt for details. 800 See HD-Audio.txt for details.
801 beep_mode - Selects the beep registration mode (0=off, 1=on, 2=
802 dynamic registration via mute switch on/off); the default
803 value is set via CONFIG_SND_HDA_INPUT_BEEP_MODE kconfig.
801 804
802 [Single (global) options] 805 [Single (global) options]
803 single_cmd - Use single immediate commands to communicate with 806 single_cmd - Use single immediate commands to communicate with
@@ -1454,6 +1457,7 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed.
1454 1457
1455 Module for internal PC-Speaker. 1458 Module for internal PC-Speaker.
1456 1459
1460 nopcm - Disable PC-Speaker PCM sound. Only beeps remain.
1457 nforce_wa - enable NForce chipset workaround. Expect bad sound. 1461 nforce_wa - enable NForce chipset workaround. Expect bad sound.
1458 1462
1459 This module supports system beeps, some kind of PCM playback and 1463 This module supports system beeps, some kind of PCM playback and
@@ -1631,7 +1635,7 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed.
1631 Module snd-sscape 1635 Module snd-sscape
1632 ----------------- 1636 -----------------
1633 1637
1634 Module for ENSONIQ SoundScape PnP cards. 1638 Module for ENSONIQ SoundScape cards.
1635 1639
1636 port - Port # (PnP setup) 1640 port - Port # (PnP setup)
1637 wss_port - WSS Port # (PnP setup) 1641 wss_port - WSS Port # (PnP setup)
@@ -1639,10 +1643,11 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed.
1639 mpu_irq - MPU-401 IRQ # (PnP setup) 1643 mpu_irq - MPU-401 IRQ # (PnP setup)
1640 dma - DMA # (PnP setup) 1644 dma - DMA # (PnP setup)
1641 dma2 - 2nd DMA # (PnP setup, -1 to disable) 1645 dma2 - 2nd DMA # (PnP setup, -1 to disable)
1646 joystick - Enable gameport - 0 = disable (default), 1 = enable
1647
1648 This module supports multiple cards.
1642 1649
1643 This module supports multiple cards. ISA PnP must be enabled. 1650 The driver requires the firmware loader support on kernel.
1644 You need sscape_ctl tool in alsa-tools package for loading
1645 the microcode.
1646 1651
1647 Module snd-sun-amd7930 (on sparc only) 1652 Module snd-sun-amd7930 (on sparc only)
1648 -------------------------------------- 1653 --------------------------------------
diff --git a/Documentation/sound/alsa/ControlNames.txt b/Documentation/sound/alsa/ControlNames.txt
index 5b18298e9495..fea65bb6269e 100644
--- a/Documentation/sound/alsa/ControlNames.txt
+++ b/Documentation/sound/alsa/ControlNames.txt
@@ -18,8 +18,9 @@ SOURCE:
18 Master 18 Master
19 Master Mono 19 Master Mono
20 Hardware Master 20 Hardware Master
21 Speaker (internal speaker)
21 Headphone 22 Headphone
22 PC Speaker 23 Beep (beep generator)
23 Phone 24 Phone
24 Phone Input 25 Phone Input
25 Phone Output 26 Phone Output
diff --git a/Documentation/sound/alsa/HD-Audio-Models.txt b/Documentation/sound/alsa/HD-Audio-Models.txt
index 4c7f9aee5c4e..e93affff3af8 100644
--- a/Documentation/sound/alsa/HD-Audio-Models.txt
+++ b/Documentation/sound/alsa/HD-Audio-Models.txt
@@ -126,6 +126,7 @@ ALC882/883/885/888/889
126 mb5 Macbook 5,1 126 mb5 Macbook 5,1
127 mbp3 Macbook Pro rev3 127 mbp3 Macbook Pro rev3
128 imac24 iMac 24'' with jack detection 128 imac24 iMac 24'' with jack detection
129 imac91 iMac 9,1
129 w2jc ASUS W2JC 130 w2jc ASUS W2JC
130 3stack-2ch-dig 3-jack with SPDIF I/O (ALC883) 131 3stack-2ch-dig 3-jack with SPDIF I/O (ALC883)
131 alc883-6stack-dig 6-jack digital with SPDIF I/O (ALC883) 132 alc883-6stack-dig 6-jack digital with SPDIF I/O (ALC883)
@@ -391,6 +392,7 @@ STAC92HD83*
391 ref Reference board 392 ref Reference board
392 mic-ref Reference board with power management for ports 393 mic-ref Reference board with power management for ports
393 dell-s14 Dell laptop 394 dell-s14 Dell laptop
395 hp HP laptops with (inverted) mute-LED
394 auto BIOS setup (default) 396 auto BIOS setup (default)
395 397
396STAC9872 398STAC9872
diff --git a/Documentation/sound/alsa/HD-Audio.txt b/Documentation/sound/alsa/HD-Audio.txt
index 7b8a5f947d1d..6325bec06a72 100644
--- a/Documentation/sound/alsa/HD-Audio.txt
+++ b/Documentation/sound/alsa/HD-Audio.txt
@@ -624,11 +624,13 @@ hda-verb. The program gives you an easy-to-use GUI stuff for showing
624the widget information and adjusting the amp values, as well as the 624the widget information and adjusting the amp values, as well as the
625proc-compatible output. 625proc-compatible output.
626 626
627The hda-analyzer is a part of alsa.git repository in 627The hda-analyzer:
628alsa-project.org:
629 628
630- http://git.alsa-project.org/?p=alsa.git;a=tree;f=hda-analyzer 629- http://git.alsa-project.org/?p=alsa.git;a=tree;f=hda-analyzer
631 630
631is a part of alsa.git repository in alsa-project.org:
632
633- git://git.alsa-project.org/alsa.git
632 634
633Codecgraph 635Codecgraph
634~~~~~~~~~~ 636~~~~~~~~~~
diff --git a/Documentation/spi/spi-summary b/Documentation/spi/spi-summary
index deab51ddc33e..4884cb33845d 100644
--- a/Documentation/spi/spi-summary
+++ b/Documentation/spi/spi-summary
@@ -538,7 +538,7 @@ SPI MESSAGE QUEUE
538The bulk of the driver will be managing the I/O queue fed by transfer(). 538The bulk of the driver will be managing the I/O queue fed by transfer().
539 539
540That queue could be purely conceptual. For example, a driver used only 540That queue could be purely conceptual. For example, a driver used only
541for low-frequency sensor acess might be fine using synchronous PIO. 541for low-frequency sensor access might be fine using synchronous PIO.
542 542
543But the queue will probably be very real, using message->queue, PIO, 543But the queue will probably be very real, using message->queue, PIO,
544often DMA (especially if the root filesystem is in SPI flash), and 544often DMA (especially if the root filesystem is in SPI flash), and
diff --git a/Documentation/spinlocks.txt b/Documentation/spinlocks.txt
index 619699dde593..178c831b907d 100644
--- a/Documentation/spinlocks.txt
+++ b/Documentation/spinlocks.txt
@@ -1,73 +1,8 @@
1SPIN_LOCK_UNLOCKED and RW_LOCK_UNLOCKED defeat lockdep state tracking and 1Lesson 1: Spin locks
2are hence deprecated.
3 2
4Please use DEFINE_SPINLOCK()/DEFINE_RWLOCK() or 3The most basic primitive for locking is spinlock.
5__SPIN_LOCK_UNLOCKED()/__RW_LOCK_UNLOCKED() as appropriate for static
6initialization.
7
8Most of the time, you can simply turn:
9
10 static spinlock_t xxx_lock = SPIN_LOCK_UNLOCKED;
11
12into:
13
14 static DEFINE_SPINLOCK(xxx_lock);
15
16Static structure member variables go from:
17
18 struct foo bar {
19 .lock = SPIN_LOCK_UNLOCKED;
20 };
21
22to:
23
24 struct foo bar {
25 .lock = __SPIN_LOCK_UNLOCKED(bar.lock);
26 };
27
28Declaration of static rw_locks undergo a similar transformation.
29
30Dynamic initialization, when necessary, may be performed as
31demonstrated below.
32
33 spinlock_t xxx_lock;
34 rwlock_t xxx_rw_lock;
35
36 static int __init xxx_init(void)
37 {
38 spin_lock_init(&xxx_lock);
39 rwlock_init(&xxx_rw_lock);
40 ...
41 }
42
43 module_init(xxx_init);
44
45The following discussion is still valid, however, with the dynamic
46initialization of spinlocks or with DEFINE_SPINLOCK, etc., used
47instead of SPIN_LOCK_UNLOCKED.
48
49-----------------------
50
51On Fri, 2 Jan 1998, Doug Ledford wrote:
52>
53> I'm working on making the aic7xxx driver more SMP friendly (as well as
54> importing the latest FreeBSD sequencer code to have 7895 support) and wanted
55> to get some info from you. The goal here is to make the various routines
56> SMP safe as well as UP safe during interrupts and other manipulating
57> routines. So far, I've added a spin_lock variable to things like my queue
58> structs. Now, from what I recall, there are some spin lock functions I can
59> use to lock these spin locks from other use as opposed to a (nasty)
60> save_flags(); cli(); stuff; restore_flags(); construct. Where do I find
61> these routines and go about making use of them? Do they only lock on a
62> per-processor basis or can they also lock say an interrupt routine from
63> mucking with a queue if the queue routine was manipulating it when the
64> interrupt occurred, or should I still use a cli(); based construct on that
65> one?
66
67See <asm/spinlock.h>. The basic version is:
68
69 spinlock_t xxx_lock = SPIN_LOCK_UNLOCKED;
70 4
5static DEFINE_SPINLOCK(xxx_lock);
71 6
72 unsigned long flags; 7 unsigned long flags;
73 8
@@ -75,13 +10,11 @@ See <asm/spinlock.h>. The basic version is:
75 ... critical section here .. 10 ... critical section here ..
76 spin_unlock_irqrestore(&xxx_lock, flags); 11 spin_unlock_irqrestore(&xxx_lock, flags);
77 12
78and the above is always safe. It will disable interrupts _locally_, but the 13The above is always safe. It will disable interrupts _locally_, but the
79spinlock itself will guarantee the global lock, so it will guarantee that 14spinlock itself will guarantee the global lock, so it will guarantee that
80there is only one thread-of-control within the region(s) protected by that 15there is only one thread-of-control within the region(s) protected by that
81lock. 16lock. This works well even under UP. The above sequence under UP
82 17essentially is just the same as doing
83Note that it works well even under UP - the above sequence under UP
84essentially is just the same as doing a
85 18
86 unsigned long flags; 19 unsigned long flags;
87 20
@@ -91,15 +24,13 @@ essentially is just the same as doing a
91 24
92so the code does _not_ need to worry about UP vs SMP issues: the spinlocks 25so the code does _not_ need to worry about UP vs SMP issues: the spinlocks
93work correctly under both (and spinlocks are actually more efficient on 26work correctly under both (and spinlocks are actually more efficient on
94architectures that allow doing the "save_flags + cli" in one go because I 27architectures that allow doing the "save_flags + cli" in one operation).
95don't export that interface normally). 28
29 NOTE! Implications of spin_locks for memory are further described in:
96 30
97NOTE NOTE NOTE! The reason the spinlock is so much faster than a global 31 Documentation/memory-barriers.txt
98interrupt lock under SMP is exactly because it disables interrupts only on 32 (5) LOCK operations.
99the local CPU. The spin-lock is safe only when you _also_ use the lock 33 (6) UNLOCK operations.
100itself to do locking across CPU's, which implies that EVERYTHING that
101touches a shared variable has to agree about the spinlock they want to
102use.
103 34
104The above is usually pretty simple (you usually need and want only one 35The above is usually pretty simple (you usually need and want only one
105spinlock for most things - using more than one spinlock can make things a 36spinlock for most things - using more than one spinlock can make things a
@@ -120,20 +51,24 @@ and another sequence that does
120then they are NOT mutually exclusive, and the critical regions can happen 51then they are NOT mutually exclusive, and the critical regions can happen
121at the same time on two different CPU's. That's fine per se, but the 52at the same time on two different CPU's. That's fine per se, but the
122critical regions had better be critical for different things (ie they 53critical regions had better be critical for different things (ie they
123can't stomp on each other). 54can't stomp on each other).
124 55
125The above is a problem mainly if you end up mixing code - for example the 56The above is a problem mainly if you end up mixing code - for example the
126routines in ll_rw_block() tend to use cli/sti to protect the atomicity of 57routines in ll_rw_block() tend to use cli/sti to protect the atomicity of
127their actions, and if a driver uses spinlocks instead then you should 58their actions, and if a driver uses spinlocks instead then you should
128think about issues like the above.. 59think about issues like the above.
129 60
130This is really the only really hard part about spinlocks: once you start 61This is really the only really hard part about spinlocks: once you start
131using spinlocks they tend to expand to areas you might not have noticed 62using spinlocks they tend to expand to areas you might not have noticed
132before, because you have to make sure the spinlocks correctly protect the 63before, because you have to make sure the spinlocks correctly protect the
133shared data structures _everywhere_ they are used. The spinlocks are most 64shared data structures _everywhere_ they are used. The spinlocks are most
134easily added to places that are completely independent of other code (ie 65easily added to places that are completely independent of other code (for
135internal driver data structures that nobody else ever touches, for 66example, internal driver data structures that nobody else ever touches).
136example). 67
68 NOTE! The spin-lock is safe only when you _also_ use the lock itself
69 to do locking across CPU's, which implies that EVERYTHING that
70 touches a shared variable has to agree about the spinlock they want
71 to use.
137 72
138---- 73----
139 74
@@ -141,13 +76,17 @@ Lesson 2: reader-writer spinlocks.
141 76
142If your data accesses have a very natural pattern where you usually tend 77If your data accesses have a very natural pattern where you usually tend
143to mostly read from the shared variables, the reader-writer locks 78to mostly read from the shared variables, the reader-writer locks
144(rw_lock) versions of the spinlocks are often nicer. They allow multiple 79(rw_lock) versions of the spinlocks are sometimes useful. They allow multiple
145readers to be in the same critical region at once, but if somebody wants 80readers to be in the same critical region at once, but if somebody wants
146to change the variables it has to get an exclusive write lock. The 81to change the variables it has to get an exclusive write lock.
147routines look the same as above:
148 82
149 rwlock_t xxx_lock = RW_LOCK_UNLOCKED; 83 NOTE! reader-writer locks require more atomic memory operations than
84 simple spinlocks. Unless the reader critical section is long, you
85 are better off just using spinlocks.
150 86
87The routines look the same as above:
88
89 rwlock_t xxx_lock = RW_LOCK_UNLOCKED;
151 90
152 unsigned long flags; 91 unsigned long flags;
153 92
@@ -159,18 +98,21 @@ routines look the same as above:
159 .. read and write exclusive access to the info ... 98 .. read and write exclusive access to the info ...
160 write_unlock_irqrestore(&xxx_lock, flags); 99 write_unlock_irqrestore(&xxx_lock, flags);
161 100
162The above kind of lock is useful for complex data structures like linked 101The above kind of lock may be useful for complex data structures like
163lists etc, especially when you know that most of the work is to just 102linked lists, especially searching for entries without changing the list
164traverse the list searching for entries without changing the list itself, 103itself. The read lock allows many concurrent readers. Anything that
165for example. Then you can use the read lock for that kind of list 104_changes_ the list will have to get the write lock.
166traversal, which allows many concurrent readers. Anything that _changes_ 105
167the list will have to get the write lock. 106 NOTE! RCU is better for list traversal, but requires careful
107 attention to design detail (see Documentation/RCU/listRCU.txt).
168 108
169Note: you cannot "upgrade" a read-lock to a write-lock, so if you at _any_ 109Also, you cannot "upgrade" a read-lock to a write-lock, so if you at _any_
170time need to do any changes (even if you don't do it every time), you have 110time need to do any changes (even if you don't do it every time), you have
171to get the write-lock at the very beginning. I could fairly easily add a 111to get the write-lock at the very beginning.
172primitive to create a "upgradeable" read-lock, but it hasn't been an issue 112
173yet. Tell me if you'd want one. 113 NOTE! We are working hard to remove reader-writer spinlocks in most
114 cases, so please don't add a new one without consensus. (Instead, see
115 Documentation/RCU/rcu.txt for complete information.)
174 116
175---- 117----
176 118
@@ -233,4 +175,46 @@ indeed), while write-locks need to protect themselves against interrupts.
233 175
234 Linus 176 Linus
235 177
178----
179
180Reference information:
181
182For dynamic initialization, use spin_lock_init() or rwlock_init() as
183appropriate:
184
185 spinlock_t xxx_lock;
186 rwlock_t xxx_rw_lock;
187
188 static int __init xxx_init(void)
189 {
190 spin_lock_init(&xxx_lock);
191 rwlock_init(&xxx_rw_lock);
192 ...
193 }
194
195 module_init(xxx_init);
196
197For static initialization, use DEFINE_SPINLOCK() / DEFINE_RWLOCK() or
198__SPIN_LOCK_UNLOCKED() / __RW_LOCK_UNLOCKED() as appropriate.
199
200SPIN_LOCK_UNLOCKED and RW_LOCK_UNLOCKED are deprecated. These interfere
201with lockdep state tracking.
202
203Most of the time, you can simply turn:
204 static spinlock_t xxx_lock = SPIN_LOCK_UNLOCKED;
205into:
206 static DEFINE_SPINLOCK(xxx_lock);
207
208Static structure member variables go from:
209
210 struct foo bar {
211 .lock = SPIN_LOCK_UNLOCKED;
212 };
213
214to:
236 215
216 struct foo bar {
217 .lock = __SPIN_LOCK_UNLOCKED(bar.lock);
218 };
219
220Declaration of static rw_locks undergo a similar transformation.
diff --git a/Documentation/sysctl/ctl_unnumbered.txt b/Documentation/sysctl/ctl_unnumbered.txt
deleted file mode 100644
index 23003a8ea3e7..000000000000
--- a/Documentation/sysctl/ctl_unnumbered.txt
+++ /dev/null
@@ -1,22 +0,0 @@
1
2Except for a few extremely rare exceptions user space applications do not use
3the binary sysctl interface. Instead everyone uses /proc/sys/... with
4readable ascii names.
5
6Recently the kernel has started supporting setting the binary sysctl value to
7CTL_UNNUMBERED so we no longer need to assign a binary sysctl path to allow
8sysctls to show up in /proc/sys.
9
10Assigning binary sysctl numbers is an endless source of conflicts in sysctl.h,
11breaking of the user space ABI (because of those conflicts), and maintenance
12problems. A complete pass through all of the sysctl users revealed multiple
13instances where the sysctl binary interface was broken and had gone undetected
14for years.
15
16So please do not add new binary sysctl numbers. They are unneeded and
17problematic.
18
19If you really need a new binary sysctl number please first merge your sysctl
20into the kernel and then as a separate patch allocate a binary sysctl number.
21
22(ebiederm@xmission.com, June 2007)
diff --git a/Documentation/sysctl/kernel.txt b/Documentation/sysctl/kernel.txt
index a028b92001ed..3894eaa23486 100644
--- a/Documentation/sysctl/kernel.txt
+++ b/Documentation/sysctl/kernel.txt
@@ -19,6 +19,8 @@ Currently, these files might (depending on your configuration)
19show up in /proc/sys/kernel: 19show up in /proc/sys/kernel:
20- acpi_video_flags 20- acpi_video_flags
21- acct 21- acct
22- bootloader_type [ X86 only ]
23- bootloader_version [ X86 only ]
22- callhome [ S390 only ] 24- callhome [ S390 only ]
23- auto_msgmni 25- auto_msgmni
24- core_pattern 26- core_pattern
@@ -93,6 +95,35 @@ valid for 30 seconds.
93 95
94============================================================== 96==============================================================
95 97
98bootloader_type:
99
100x86 bootloader identification
101
102This gives the bootloader type number as indicated by the bootloader,
103shifted left by 4, and OR'd with the low four bits of the bootloader
104version. The reason for this encoding is that this used to match the
105type_of_loader field in the kernel header; the encoding is kept for
106backwards compatibility. That is, if the full bootloader type number
107is 0x15 and the full version number is 0x234, this file will contain
108the value 340 = 0x154.
109
110See the type_of_loader and ext_loader_type fields in
111Documentation/x86/boot.txt for additional information.
112
113==============================================================
114
115bootloader_version:
116
117x86 bootloader version
118
119The complete bootloader version number. In the example above, this
120file will contain the value 564 = 0x234.
121
122See the type_of_loader and ext_loader_ver fields in
123Documentation/x86/boot.txt for additional information.
124
125==============================================================
126
96callhome: 127callhome:
97 128
98Controls the kernel's callhome behavior in case of a kernel panic. 129Controls the kernel's callhome behavior in case of a kernel panic.
@@ -139,9 +170,9 @@ core_pattern is used to specify a core dumpfile pattern name.
139core_pipe_limit: 170core_pipe_limit:
140 171
141This sysctl is only applicable when core_pattern is configured to pipe core 172This sysctl is only applicable when core_pattern is configured to pipe core
142files to user space helper a (when the first character of core_pattern is a '|', 173files to a user space helper (when the first character of core_pattern is a '|',
143see above). When collecting cores via a pipe to an application, it is 174see above). When collecting cores via a pipe to an application, it is
144occasionally usefull for the collecting application to gather data about the 175occasionally useful for the collecting application to gather data about the
145crashing process from its /proc/pid directory. In order to do this safely, the 176crashing process from its /proc/pid directory. In order to do this safely, the
146kernel must wait for the collecting process to exit, so as not to remove the 177kernel must wait for the collecting process to exit, so as not to remove the
147crashing processes proc files prematurely. This in turn creates the possibility 178crashing processes proc files prematurely. This in turn creates the possibility
@@ -152,7 +183,7 @@ applications in parallel. If this value is exceeded, then those crashing
152processes above that value are noted via the kernel log and their cores are 183processes above that value are noted via the kernel log and their cores are
153skipped. 0 is a special value, indicating that unlimited processes may be 184skipped. 0 is a special value, indicating that unlimited processes may be
154captured in parallel, but that no waiting will take place (i.e. the collecting 185captured in parallel, but that no waiting will take place (i.e. the collecting
155process is not guaranteed access to /proc/<crahing pid>/). This value defaults 186process is not guaranteed access to /proc/<crashing pid>/). This value defaults
156to 0. 187to 0.
157 188
158============================================================== 189==============================================================
diff --git a/Documentation/sysctl/vm.txt b/Documentation/sysctl/vm.txt
index a6e360d2055c..fc5790d36cd9 100644
--- a/Documentation/sysctl/vm.txt
+++ b/Documentation/sysctl/vm.txt
@@ -370,7 +370,7 @@ The default is 1 percent.
370mmap_min_addr 370mmap_min_addr
371 371
372This file indicates the amount of address space which a user process will 372This file indicates the amount of address space which a user process will
373be restricted from mmaping. Since kernel null dereference bugs could 373be restricted from mmapping. Since kernel null dereference bugs could
374accidentally operate based on the information in the first couple of pages 374accidentally operate based on the information in the first couple of pages
375of memory userspace processes should not be allowed to write to them. By 375of memory userspace processes should not be allowed to write to them. By
376default this value is set to 0 and no protections will be enforced by the 376default this value is set to 0 and no protections will be enforced by the
diff --git a/Documentation/timers/hpet.txt b/Documentation/timers/hpet.txt
index 04763a325520..16d25e6b5a00 100644
--- a/Documentation/timers/hpet.txt
+++ b/Documentation/timers/hpet.txt
@@ -3,7 +3,7 @@
3The High Precision Event Timer (HPET) hardware follows a specification 3The High Precision Event Timer (HPET) hardware follows a specification
4by Intel and Microsoft which can be found at 4by Intel and Microsoft which can be found at
5 5
6 http://www.intel.com/technology/architecture/hpetspec.htm 6 http://www.intel.com/hardwaredesign/hpetspec_1.pdf
7 7
8Each HPET has one fixed-rate counter (at 10+ MHz, hence "High Precision") 8Each HPET has one fixed-rate counter (at 10+ MHz, hence "High Precision")
9and up to 32 comparators. Normally three or more comparators are provided, 9and up to 32 comparators. Normally three or more comparators are provided,
diff --git a/Documentation/trace/ftrace-design.txt b/Documentation/trace/ftrace-design.txt
index 7003e10f10f5..641a1ef2a7ff 100644
--- a/Documentation/trace/ftrace-design.txt
+++ b/Documentation/trace/ftrace-design.txt
@@ -213,10 +213,19 @@ If you can't trace NMI functions, then skip this option.
213<details to be filled> 213<details to be filled>
214 214
215 215
216HAVE_FTRACE_SYSCALLS 216HAVE_SYSCALL_TRACEPOINTS
217--------------------- 217---------------------
218 218
219<details to be filled> 219You need very few things to get the syscalls tracing in an arch.
220
221- Have a NR_syscalls variable in <asm/unistd.h> that provides the number
222 of syscalls supported by the arch.
223- Implement arch_syscall_addr() that resolves a syscall address from a
224 syscall number.
225- Support the TIF_SYSCALL_TRACEPOINT thread flags
226- Put the trace_sys_enter() and trace_sys_exit() tracepoints calls from ptrace
227 in the ptrace syscalls tracing path.
228- Tag this arch as HAVE_SYSCALL_TRACEPOINTS.
220 229
221 230
222HAVE_FTRACE_MCOUNT_RECORD 231HAVE_FTRACE_MCOUNT_RECORD
diff --git a/Documentation/trace/ftrace.txt b/Documentation/trace/ftrace.txt
index 957b22fde2df..8179692fbb90 100644
--- a/Documentation/trace/ftrace.txt
+++ b/Documentation/trace/ftrace.txt
@@ -1231,6 +1231,7 @@ something like this simple program:
1231#include <sys/stat.h> 1231#include <sys/stat.h>
1232#include <fcntl.h> 1232#include <fcntl.h>
1233#include <unistd.h> 1233#include <unistd.h>
1234#include <string.h>
1234 1235
1235#define _STR(x) #x 1236#define _STR(x) #x
1236#define STR(x) _STR(x) 1237#define STR(x) _STR(x)
@@ -1265,6 +1266,7 @@ const char *find_debugfs(void)
1265 return NULL; 1266 return NULL;
1266 } 1267 }
1267 1268
1269 strcat(debugfs, "/tracing/");
1268 debugfs_found = 1; 1270 debugfs_found = 1;
1269 1271
1270 return debugfs; 1272 return debugfs;
diff --git a/Documentation/trace/kprobetrace.txt b/Documentation/trace/kprobetrace.txt
new file mode 100644
index 000000000000..47aabeebbdf6
--- /dev/null
+++ b/Documentation/trace/kprobetrace.txt
@@ -0,0 +1,149 @@
1 Kprobe-based Event Tracing
2 ==========================
3
4 Documentation is written by Masami Hiramatsu
5
6
7Overview
8--------
9These events are similar to tracepoint based events. Instead of Tracepoint,
10this is based on kprobes (kprobe and kretprobe). So it can probe wherever
11kprobes can probe (this means, all functions body except for __kprobes
12functions). Unlike the Tracepoint based event, this can be added and removed
13dynamically, on the fly.
14
15To enable this feature, build your kernel with CONFIG_KPROBE_TRACING=y.
16
17Similar to the events tracer, this doesn't need to be activated via
18current_tracer. Instead of that, add probe points via
19/sys/kernel/debug/tracing/kprobe_events, and enable it via
20/sys/kernel/debug/tracing/events/kprobes/<EVENT>/enabled.
21
22
23Synopsis of kprobe_events
24-------------------------
25 p[:[GRP/]EVENT] SYMBOL[+offs]|MEMADDR [FETCHARGS] : Set a probe
26 r[:[GRP/]EVENT] SYMBOL[+0] [FETCHARGS] : Set a return probe
27
28 GRP : Group name. If omitted, use "kprobes" for it.
29 EVENT : Event name. If omitted, the event name is generated
30 based on SYMBOL+offs or MEMADDR.
31 SYMBOL[+offs] : Symbol+offset where the probe is inserted.
32 MEMADDR : Address where the probe is inserted.
33
34 FETCHARGS : Arguments. Each probe can have up to 128 args.
35 %REG : Fetch register REG
36 @ADDR : Fetch memory at ADDR (ADDR should be in kernel)
37 @SYM[+|-offs] : Fetch memory at SYM +|- offs (SYM should be a data symbol)
38 $stackN : Fetch Nth entry of stack (N >= 0)
39 $stack : Fetch stack address.
40 $argN : Fetch function argument. (N >= 0)(*)
41 $retval : Fetch return value.(**)
42 +|-offs(FETCHARG) : Fetch memory at FETCHARG +|- offs address.(***)
43 NAME=FETCHARG: Set NAME as the argument name of FETCHARG.
44
45 (*) aN may not correct on asmlinkaged functions and at the middle of
46 function body.
47 (**) only for return probe.
48 (***) this is useful for fetching a field of data structures.
49
50
51Per-Probe Event Filtering
52-------------------------
53 Per-probe event filtering feature allows you to set different filter on each
54probe and gives you what arguments will be shown in trace buffer. If an event
55name is specified right after 'p:' or 'r:' in kprobe_events, it adds an event
56under tracing/events/kprobes/<EVENT>, at the directory you can see 'id',
57'enabled', 'format' and 'filter'.
58
59enabled:
60 You can enable/disable the probe by writing 1 or 0 on it.
61
62format:
63 This shows the format of this probe event.
64
65filter:
66 You can write filtering rules of this event.
67
68id:
69 This shows the id of this probe event.
70
71
72Event Profiling
73---------------
74 You can check the total number of probe hits and probe miss-hits via
75/sys/kernel/debug/tracing/kprobe_profile.
76 The first column is event name, the second is the number of probe hits,
77the third is the number of probe miss-hits.
78
79
80Usage examples
81--------------
82To add a probe as a new event, write a new definition to kprobe_events
83as below.
84
85 echo p:myprobe do_sys_open dfd=$arg0 filename=$arg1 flags=$arg2 mode=$arg3 > /sys/kernel/debug/tracing/kprobe_events
86
87 This sets a kprobe on the top of do_sys_open() function with recording
881st to 4th arguments as "myprobe" event. As this example shows, users can
89choose more familiar names for each arguments.
90
91 echo r:myretprobe do_sys_open $retval >> /sys/kernel/debug/tracing/kprobe_events
92
93 This sets a kretprobe on the return point of do_sys_open() function with
94recording return value as "myretprobe" event.
95 You can see the format of these events via
96/sys/kernel/debug/tracing/events/kprobes/<EVENT>/format.
97
98 cat /sys/kernel/debug/tracing/events/kprobes/myprobe/format
99name: myprobe
100ID: 75
101format:
102 field:unsigned short common_type; offset:0; size:2;
103 field:unsigned char common_flags; offset:2; size:1;
104 field:unsigned char common_preempt_count; offset:3; size:1;
105 field:int common_pid; offset:4; size:4;
106 field:int common_tgid; offset:8; size:4;
107
108 field: unsigned long ip; offset:16;tsize:8;
109 field: int nargs; offset:24;tsize:4;
110 field: unsigned long dfd; offset:32;tsize:8;
111 field: unsigned long filename; offset:40;tsize:8;
112 field: unsigned long flags; offset:48;tsize:8;
113 field: unsigned long mode; offset:56;tsize:8;
114
115print fmt: "(%lx) dfd=%lx filename=%lx flags=%lx mode=%lx", REC->ip, REC->dfd, REC->filename, REC->flags, REC->mode
116
117
118 You can see that the event has 4 arguments as in the expressions you specified.
119
120 echo > /sys/kernel/debug/tracing/kprobe_events
121
122 This clears all probe points.
123
124 Right after definition, each event is disabled by default. For tracing these
125events, you need to enable it.
126
127 echo 1 > /sys/kernel/debug/tracing/events/kprobes/myprobe/enable
128 echo 1 > /sys/kernel/debug/tracing/events/kprobes/myretprobe/enable
129
130 And you can see the traced information via /sys/kernel/debug/tracing/trace.
131
132 cat /sys/kernel/debug/tracing/trace
133# tracer: nop
134#
135# TASK-PID CPU# TIMESTAMP FUNCTION
136# | | | | |
137 <...>-1447 [001] 1038282.286875: myprobe: (do_sys_open+0x0/0xd6) dfd=3 filename=7fffd1ec4440 flags=8000 mode=0
138 <...>-1447 [001] 1038282.286878: myretprobe: (sys_openat+0xc/0xe <- do_sys_open) $retval=fffffffffffffffe
139 <...>-1447 [001] 1038282.286885: myprobe: (do_sys_open+0x0/0xd6) dfd=ffffff9c filename=40413c flags=8000 mode=1b6
140 <...>-1447 [001] 1038282.286915: myretprobe: (sys_open+0x1b/0x1d <- do_sys_open) $retval=3
141 <...>-1447 [001] 1038282.286969: myprobe: (do_sys_open+0x0/0xd6) dfd=ffffff9c filename=4041c6 flags=98800 mode=10
142 <...>-1447 [001] 1038282.286976: myretprobe: (sys_open+0x1b/0x1d <- do_sys_open) $retval=3
143
144
145 Each line shows when the kernel hits an event, and <- SYMBOL means kernel
146returns from SYMBOL(e.g. "sys_open+0x1b/0x1d <- do_sys_open" means kernel
147returns from do_sys_open to sys_open+0x1b).
148
149
diff --git a/Documentation/usb/power-management.txt b/Documentation/usb/power-management.txt
index ad642615ad4c..c7c1dc2f8017 100644
--- a/Documentation/usb/power-management.txt
+++ b/Documentation/usb/power-management.txt
@@ -2,7 +2,7 @@
2 2
3 Alan Stern <stern@rowland.harvard.edu> 3 Alan Stern <stern@rowland.harvard.edu>
4 4
5 October 5, 2007 5 November 10, 2009
6 6
7 7
8 8
@@ -123,9 +123,9 @@ relevant attribute files are: wakeup, level, and autosuspend.
123 123
124 power/level 124 power/level
125 125
126 This file contains one of three words: "on", "auto", 126 This file contains one of two words: "on" or "auto".
127 or "suspend". You can write those words to the file 127 You can write those words to the file to change the
128 to change the device's setting. 128 device's setting.
129 129
130 "on" means that the device should be resumed and 130 "on" means that the device should be resumed and
131 autosuspend is not allowed. (Of course, system 131 autosuspend is not allowed. (Of course, system
@@ -134,10 +134,10 @@ relevant attribute files are: wakeup, level, and autosuspend.
134 "auto" is the normal state in which the kernel is 134 "auto" is the normal state in which the kernel is
135 allowed to autosuspend and autoresume the device. 135 allowed to autosuspend and autoresume the device.
136 136
137 "suspend" means that the device should remain 137 (In kernels up to 2.6.32, you could also specify
138 suspended, and autoresume is not allowed. (But remote 138 "suspend", meaning that the device should remain
139 wakeup may still be allowed, since it is controlled 139 suspended and autoresume was not allowed. This
140 separately by the power/wakeup attribute.) 140 setting is no longer supported.)
141 141
142 power/autosuspend 142 power/autosuspend
143 143
@@ -313,13 +313,14 @@ 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 five functions: 316driver does so by calling these six 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);
321 int usb_autopm_get_interface_async(struct usb_interface *intf); 320 int usb_autopm_get_interface_async(struct usb_interface *intf);
322 void usb_autopm_put_interface_async(struct usb_interface *intf); 321 void usb_autopm_put_interface_async(struct usb_interface *intf);
322 void usb_autopm_get_interface_no_resume(struct usb_interface *intf);
323 void usb_autopm_put_interface_no_suspend(struct usb_interface *intf);
323 324
324The functions work by maintaining a counter in the usb_interface 325The functions work by maintaining a counter in the usb_interface
325structure. When intf->pm_usage_count is > 0 then the interface is 326structure. When intf->pm_usage_count is > 0 then the interface is
@@ -331,11 +332,13 @@ considered to be idle, and the kernel may autosuspend the device.
331associated with the device itself rather than any of its interfaces. 332associated with the device itself rather than any of its interfaces.
332This field is used only by the USB core.) 333This field is used only by the USB core.)
333 334
334The driver owns intf->pm_usage_count; it can modify the value however 335Drivers must not modify intf->pm_usage_count directly; its value
335and whenever it likes. A nice aspect of the non-async usb_autopm_* 336should be changed only be using the functions listed above. Drivers
336routines is that the changes they make are protected by the usb_device 337are responsible for insuring that the overall change to pm_usage_count
337structure's PM mutex (udev->pm_mutex); however drivers may change 338during their lifetime balances out to 0 (it may be necessary for the
338pm_usage_count without holding the mutex. Drivers using the async 339disconnect method to call usb_autopm_put_interface() one or more times
340to fulfill this requirement). The first two routines use the PM mutex
341in struct usb_device for mutual exclusion; drivers using the async
339routines are responsible for their own synchronization and mutual 342routines are responsible for their own synchronization and mutual
340exclusion. 343exclusion.
341 344
@@ -347,11 +350,6 @@ exclusion.
347 attempts an autosuspend if the new value is <= 0 and the 350 attempts an autosuspend if the new value is <= 0 and the
348 device isn't suspended. 351 device isn't suspended.
349 352
350 usb_autopm_set_interface() leaves pm_usage_count alone.
351 It attempts an autoresume if the value is > 0 and the device
352 is suspended, and it attempts an autosuspend if the value is
353 <= 0 and the device isn't suspended.
354
355 usb_autopm_get_interface_async() and 353 usb_autopm_get_interface_async() and
356 usb_autopm_put_interface_async() do almost the same things as 354 usb_autopm_put_interface_async() do almost the same things as
357 their non-async counterparts. The differences are: they do 355 their non-async counterparts. The differences are: they do
@@ -360,13 +358,11 @@ exclusion.
360 such as an URB's completion handler, but when they return the 358 such as an URB's completion handler, but when they return the
361 device will not generally not yet be in the desired state. 359 device will not generally not yet be in the desired state.
362 360
363There also are a couple of utility routines drivers can use: 361 usb_autopm_get_interface_no_resume() and
364 362 usb_autopm_put_interface_no_suspend() merely increment or
365 usb_autopm_enable() sets pm_usage_cnt to 0 and then calls 363 decrement the pm_usage_count value; they do not attempt to
366 usb_autopm_set_interface(), which will attempt an autosuspend. 364 carry out an autoresume or an autosuspend. Hence they can be
367 365 called in an atomic context.
368 usb_autopm_disable() sets pm_usage_cnt to 1 and then calls
369 usb_autopm_set_interface(), which will attempt an autoresume.
370 366
371The conventional usage pattern is that a driver calls 367The conventional usage pattern is that a driver calls
372usb_autopm_get_interface() in its open routine and 368usb_autopm_get_interface() in its open routine and
@@ -400,11 +396,11 @@ though, setting this flag won't cause the kernel to autoresume it.
400Normally a driver would set this flag in its probe method, at which 396Normally a driver would set this flag in its probe method, at which
401time the device is guaranteed not to be autosuspended.) 397time the device is guaranteed not to be autosuspended.)
402 398
403The usb_autopm_* routines have to run in a sleepable process context; 399The synchronous usb_autopm_* routines have to run in a sleepable
404they must not be called from an interrupt handler or while holding a 400process context; they must not be called from an interrupt handler or
405spinlock. In fact, the entire autosuspend mechanism is not well geared 401while holding a spinlock. In fact, the entire autosuspend mechanism
406toward interrupt-driven operation. However there is one thing a 402is not well geared toward interrupt-driven operation. However there
407driver can do in an interrupt handler: 403is one thing a driver can do in an interrupt handler:
408 404
409 usb_mark_last_busy(struct usb_device *udev); 405 usb_mark_last_busy(struct usb_device *udev);
410 406
@@ -423,15 +419,16 @@ an URB had completed too recently.
423 419
424External suspend calls should never be allowed to fail in this way, 420External suspend calls should never be allowed to fail in this way,
425only autosuspend calls. The driver can tell them apart by checking 421only autosuspend calls. The driver can tell them apart by checking
426udev->auto_pm; this flag will be set to 1 for internal PM events 422the PM_EVENT_AUTO bit in the message.event argument to the suspend
427(autosuspend or autoresume) and 0 for external PM events. 423method; this bit will be set for internal PM events (autosuspend) and
424clear for external PM events.
428 425
429Many of the ingredients in the autosuspend framework are oriented 426Many of the ingredients in the autosuspend framework are oriented
430towards interfaces: The usb_interface structure contains the 427towards interfaces: The usb_interface structure contains the
431pm_usage_cnt field, and the usb_autopm_* routines take an interface 428pm_usage_cnt field, and the usb_autopm_* routines take an interface
432pointer as their argument. But somewhat confusingly, a few of the 429pointer as their argument. But somewhat confusingly, a few of the
433pieces (usb_mark_last_busy() and udev->auto_pm) use the usb_device 430pieces (i.e., usb_mark_last_busy()) use the usb_device structure
434structure instead. Drivers need to keep this straight; they can call 431instead. Drivers need to keep this straight; they can call
435interface_to_usbdev() to find the device structure for a given 432interface_to_usbdev() to find the device structure for a given
436interface. 433interface.
437 434
diff --git a/Documentation/video4linux/CARDLIST.cx23885 b/Documentation/video4linux/CARDLIST.cx23885
index 5f33d8486102..7539e8fa1ffd 100644
--- a/Documentation/video4linux/CARDLIST.cx23885
+++ b/Documentation/video4linux/CARDLIST.cx23885
@@ -24,3 +24,5 @@
24 23 -> Magic-Pro ProHDTV Extreme 2 [14f1:8657] 24 23 -> Magic-Pro ProHDTV Extreme 2 [14f1:8657]
25 24 -> Hauppauge WinTV-HVR1850 [0070:8541] 25 24 -> Hauppauge WinTV-HVR1850 [0070:8541]
26 25 -> Compro VideoMate E800 [1858:e800] 26 25 -> Compro VideoMate E800 [1858:e800]
27 26 -> Hauppauge WinTV-HVR1290 [0070:8551]
28 27 -> Mygica X8558 PRO DMB-TH [14f1:8578]
diff --git a/Documentation/video4linux/CARDLIST.cx88 b/Documentation/video4linux/CARDLIST.cx88
index 3385f8b094a5..7ec3c4e4b60f 100644
--- a/Documentation/video4linux/CARDLIST.cx88
+++ b/Documentation/video4linux/CARDLIST.cx88
@@ -81,3 +81,4 @@
81 80 -> Hauppauge WinTV-IR Only [0070:9290] 81 80 -> Hauppauge WinTV-IR Only [0070:9290]
82 81 -> Leadtek WinFast DTV1800 Hybrid [107d:6654] 82 81 -> Leadtek WinFast DTV1800 Hybrid [107d:6654]
83 82 -> WinFast DTV2000 H rev. J [107d:6f2b] 83 82 -> WinFast DTV2000 H rev. J [107d:6f2b]
84 83 -> Prof 7301 DVB-S/S2 [b034:3034]
diff --git a/Documentation/video4linux/CARDLIST.em28xx b/Documentation/video4linux/CARDLIST.em28xx
index b8afef4c0e01..0c166ff003a0 100644
--- a/Documentation/video4linux/CARDLIST.em28xx
+++ b/Documentation/video4linux/CARDLIST.em28xx
@@ -1,5 +1,5 @@
1 0 -> Unknown EM2800 video grabber (em2800) [eb1a:2800] 1 0 -> Unknown EM2800 video grabber (em2800) [eb1a:2800]
2 1 -> Unknown EM2750/28xx video grabber (em2820/em2840) [eb1a:2710,eb1a:2820,eb1a:2821,eb1a:2860,eb1a:2861,eb1a:2870,eb1a:2881,eb1a:2883,eb1a:2868] 2 1 -> Unknown EM2750/28xx video grabber (em2820/em2840) [eb1a:2710,eb1a:2820,eb1a:2821,eb1a:2860,eb1a:2861,eb1a:2862,eb1a:2870,eb1a:2881,eb1a:2883,eb1a:2868]
3 2 -> Terratec Cinergy 250 USB (em2820/em2840) [0ccd:0036] 3 2 -> Terratec Cinergy 250 USB (em2820/em2840) [0ccd:0036]
4 3 -> Pinnacle PCTV USB 2 (em2820/em2840) [2304:0208] 4 3 -> Pinnacle PCTV USB 2 (em2820/em2840) [2304:0208]
5 4 -> Hauppauge WinTV USB 2 (em2820/em2840) [2040:4200,2040:4201] 5 4 -> Hauppauge WinTV USB 2 (em2820/em2840) [2040:4200,2040:4201]
@@ -69,3 +69,4 @@
69 71 -> Silvercrest Webcam 1.3mpix (em2820/em2840) 69 71 -> Silvercrest Webcam 1.3mpix (em2820/em2840)
70 72 -> Gadmei UTV330+ (em2861) 70 72 -> Gadmei UTV330+ (em2861)
71 73 -> Reddo DVB-C USB TV Box (em2870) 71 73 -> Reddo DVB-C USB TV Box (em2870)
72 74 -> Actionmaster/LinXcel/Digitus VC211A (em2800)
diff --git a/Documentation/video4linux/CARDLIST.saa7134 b/Documentation/video4linux/CARDLIST.saa7134
index 2620d60341ee..fce1e7eb0474 100644
--- a/Documentation/video4linux/CARDLIST.saa7134
+++ b/Documentation/video4linux/CARDLIST.saa7134
@@ -172,3 +172,5 @@
172171 -> Beholder BeholdTV X7 [5ace:7595] 172171 -> Beholder BeholdTV X7 [5ace:7595]
173172 -> RoverMedia TV Link Pro FM [19d1:0138] 173172 -> RoverMedia TV Link Pro FM [19d1:0138]
174173 -> Zolid Hybrid TV Tuner PCI [1131:2004] 174173 -> Zolid Hybrid TV Tuner PCI [1131:2004]
175174 -> Asus Europa Hybrid OEM [1043:4847]
176175 -> Leadtek Winfast DTV1000S [107d:6655]
diff --git a/Documentation/video4linux/gspca.txt b/Documentation/video4linux/gspca.txt
index 3f61825be499..319d9838e87e 100644
--- a/Documentation/video4linux/gspca.txt
+++ b/Documentation/video4linux/gspca.txt
@@ -6,7 +6,8 @@ The modules are:
6 6
7xxxx vend:prod 7xxxx vend:prod
8---- 8----
9spca501 0000:0000 MystFromOri Unknow Camera 9spca501 0000:0000 MystFromOri Unknown Camera
10spca508 0130:0130 Clone Digital Webcam 11043
10m5602 0402:5602 ALi Video Camera Controller 11m5602 0402:5602 ALi Video Camera Controller
11spca501 040a:0002 Kodak DVC-325 12spca501 040a:0002 Kodak DVC-325
12spca500 040a:0300 Kodak EZ200 13spca500 040a:0300 Kodak EZ200
@@ -37,6 +38,7 @@ ov519 041e:405f Creative Live! VISTA VF0330
37ov519 041e:4060 Creative Live! VISTA VF0350 38ov519 041e:4060 Creative Live! VISTA VF0350
38ov519 041e:4061 Creative Live! VISTA VF0400 39ov519 041e:4061 Creative Live! VISTA VF0400
39ov519 041e:4064 Creative Live! VISTA VF0420 40ov519 041e:4064 Creative Live! VISTA VF0420
41ov519 041e:4067 Creative Live! Cam Video IM (VF0350)
40ov519 041e:4068 Creative Live! VISTA VF0470 42ov519 041e:4068 Creative Live! VISTA VF0470
41spca561 0458:7004 Genius VideoCAM Express V2 43spca561 0458:7004 Genius VideoCAM Express V2
42sunplus 0458:7006 Genius Dsc 1.3 Smart 44sunplus 0458:7006 Genius Dsc 1.3 Smart
@@ -68,12 +70,12 @@ zc3xx 046d:08a3 Logitech QC Chat
68zc3xx 046d:08a6 Logitech QCim 70zc3xx 046d:08a6 Logitech QCim
69zc3xx 046d:08a7 Logitech QuickCam Image 71zc3xx 046d:08a7 Logitech QuickCam Image
70zc3xx 046d:08a9 Logitech Notebook Deluxe 72zc3xx 046d:08a9 Logitech Notebook Deluxe
71zc3xx 046d:08aa Labtec Webcam Notebook 73zc3xx 046d:08aa Labtec Webcam Notebook
72zc3xx 046d:08ac Logitech QuickCam Cool 74zc3xx 046d:08ac Logitech QuickCam Cool
73zc3xx 046d:08ad Logitech QCCommunicate STX 75zc3xx 046d:08ad Logitech QCCommunicate STX
74zc3xx 046d:08ae Logitech QuickCam for Notebooks 76zc3xx 046d:08ae Logitech QuickCam for Notebooks
75zc3xx 046d:08af Logitech QuickCam Cool 77zc3xx 046d:08af Logitech QuickCam Cool
76zc3xx 046d:08b9 Logitech QC IM ??? 78zc3xx 046d:08b9 Logitech QuickCam Express
77zc3xx 046d:08d7 Logitech QCam STX 79zc3xx 046d:08d7 Logitech QCam STX
78zc3xx 046d:08d9 Logitech QuickCam IM/Connect 80zc3xx 046d:08d9 Logitech QuickCam IM/Connect
79zc3xx 046d:08d8 Logitech Notebook Deluxe 81zc3xx 046d:08d8 Logitech Notebook Deluxe
@@ -82,7 +84,7 @@ zc3xx 046d:08dd Logitech QuickCam for Notebooks
82spca500 046d:0900 Logitech Inc. ClickSmart 310 84spca500 046d:0900 Logitech Inc. ClickSmart 310
83spca500 046d:0901 Logitech Inc. ClickSmart 510 85spca500 046d:0901 Logitech Inc. ClickSmart 510
84sunplus 046d:0905 Logitech ClickSmart 820 86sunplus 046d:0905 Logitech ClickSmart 820
85tv8532 046d:0920 QC Express 87tv8532 046d:0920 Logitech QuickCam Express
86tv8532 046d:0921 Labtec Webcam 88tv8532 046d:0921 Labtec Webcam
87spca561 046d:0928 Logitech QC Express Etch2 89spca561 046d:0928 Logitech QC Express Etch2
88spca561 046d:0929 Labtec Webcam Elch2 90spca561 046d:0929 Labtec Webcam Elch2
@@ -91,7 +93,7 @@ spca561 046d:092b Labtec Webcam Plus
91spca561 046d:092c Logitech QC chat Elch2 93spca561 046d:092c Logitech QC chat Elch2
92spca561 046d:092d Logitech QC Elch2 94spca561 046d:092d Logitech QC Elch2
93spca561 046d:092e Logitech QC Elch2 95spca561 046d:092e Logitech QC Elch2
94spca561 046d:092f Logitech QuickCam Express Plus 96spca561 046d:092f Logitech QuickCam Express Plus
95sunplus 046d:0960 Logitech ClickSmart 420 97sunplus 046d:0960 Logitech ClickSmart 420
96sunplus 0471:0322 Philips DMVC1300K 98sunplus 0471:0322 Philips DMVC1300K
97zc3xx 0471:0325 Philips SPC 200 NC 99zc3xx 0471:0325 Philips SPC 200 NC
@@ -187,7 +189,6 @@ sonixj 06f8:3004 Hercules Classic Silver
187sonixj 06f8:3008 Hercules Deluxe Optical Glass 189sonixj 06f8:3008 Hercules Deluxe Optical Glass
188pac7311 06f8:3009 Hercules Classic Link 190pac7311 06f8:3009 Hercules Classic Link
189spca508 0733:0110 ViewQuest VQ110 191spca508 0733:0110 ViewQuest VQ110
190spca508 0130:0130 Clone Digital Webcam 11043
191spca501 0733:0401 Intel Create and Share 192spca501 0733:0401 Intel Create and Share
192spca501 0733:0402 ViewQuest M318B 193spca501 0733:0402 ViewQuest M318B
193spca505 0733:0430 Intel PC Camera Pro 194spca505 0733:0430 Intel PC Camera Pro
@@ -202,6 +203,7 @@ spca500 084d:0003 D-Link DSC-350
202spca500 08ca:0103 Aiptek PocketDV 203spca500 08ca:0103 Aiptek PocketDV
203sunplus 08ca:0104 Aiptek PocketDVII 1.3 204sunplus 08ca:0104 Aiptek PocketDVII 1.3
204sunplus 08ca:0106 Aiptek Pocket DV3100+ 205sunplus 08ca:0106 Aiptek Pocket DV3100+
206mr97310a 08ca:0110 Trust Spyc@m 100
205mr97310a 08ca:0111 Aiptek PenCam VGA+ 207mr97310a 08ca:0111 Aiptek PenCam VGA+
206sunplus 08ca:2008 Aiptek Mini PenCam 2 M 208sunplus 08ca:2008 Aiptek Mini PenCam 2 M
207sunplus 08ca:2010 Aiptek PocketCam 3M 209sunplus 08ca:2010 Aiptek PocketCam 3M
@@ -222,7 +224,7 @@ pac207 093a:2460 Qtec Webcam 100
222pac207 093a:2461 HP Webcam 224pac207 093a:2461 HP Webcam
223pac207 093a:2463 Philips SPC 220 NC 225pac207 093a:2463 Philips SPC 220 NC
224pac207 093a:2464 Labtec Webcam 1200 226pac207 093a:2464 Labtec Webcam 1200
225pac207 093a:2468 PAC207 227pac207 093a:2468 Webcam WB-1400T
226pac207 093a:2470 Genius GF112 228pac207 093a:2470 Genius GF112
227pac207 093a:2471 Genius VideoCam ge111 229pac207 093a:2471 Genius VideoCam ge111
228pac207 093a:2472 Genius VideoCam ge110 230pac207 093a:2472 Genius VideoCam ge110
@@ -230,7 +232,7 @@ pac207 093a:2474 Genius iLook 111
230pac207 093a:2476 Genius e-Messenger 112 232pac207 093a:2476 Genius e-Messenger 112
231pac7311 093a:2600 PAC7311 Typhoon 233pac7311 093a:2600 PAC7311 Typhoon
232pac7311 093a:2601 Philips SPC 610 NC 234pac7311 093a:2601 Philips SPC 610 NC
233pac7311 093a:2603 PAC7312 235pac7311 093a:2603 Philips SPC 500 NC
234pac7311 093a:2608 Trust WB-3300p 236pac7311 093a:2608 Trust WB-3300p
235pac7311 093a:260e Gigaware VGA PC Camera, Trust WB-3350p, SIGMA cam 2350 237pac7311 093a:260e Gigaware VGA PC Camera, Trust WB-3350p, SIGMA cam 2350
236pac7311 093a:260f SnakeCam 238pac7311 093a:260f SnakeCam
@@ -239,6 +241,7 @@ pac7311 093a:2621 PAC731x
239pac7311 093a:2622 Genius Eye 312 241pac7311 093a:2622 Genius Eye 312
240pac7311 093a:2624 PAC7302 242pac7311 093a:2624 PAC7302
241pac7311 093a:2626 Labtec 2200 243pac7311 093a:2626 Labtec 2200
244pac7311 093a:2628 Genius iLook 300
242pac7311 093a:2629 Genious iSlim 300 245pac7311 093a:2629 Genious iSlim 300
243pac7311 093a:262a Webcam 300k 246pac7311 093a:262a Webcam 300k
244pac7311 093a:262c Philips SPC 230 NC 247pac7311 093a:262c Philips SPC 230 NC
@@ -250,7 +253,7 @@ vc032x 0ac8:0328 A4Tech PK-130MG
250zc3xx 0ac8:301b Z-Star zc301b 253zc3xx 0ac8:301b Z-Star zc301b
251zc3xx 0ac8:303b Vimicro 0x303b 254zc3xx 0ac8:303b Vimicro 0x303b
252zc3xx 0ac8:305b Z-star Vimicro zc0305b 255zc3xx 0ac8:305b Z-star Vimicro zc0305b
253zc3xx 0ac8:307b Ldlc VC302+Ov7620 256zc3xx 0ac8:307b PC Camera (ZS0211)
254vc032x 0ac8:c001 Sony embedded vimicro 257vc032x 0ac8:c001 Sony embedded vimicro
255vc032x 0ac8:c002 Sony embedded vimicro 258vc032x 0ac8:c002 Sony embedded vimicro
256vc032x 0ac8:c301 Samsung Q1 Ultra Premium 259vc032x 0ac8:c301 Samsung Q1 Ultra Premium
diff --git a/Documentation/video4linux/si4713.txt b/Documentation/video4linux/si4713.txt
index 25abdb78209d..2e7392a4fee1 100644
--- a/Documentation/video4linux/si4713.txt
+++ b/Documentation/video4linux/si4713.txt
@@ -164,7 +164,7 @@ Stereo/Mono and RDS subchannels
164 164
165The device can also be configured using the available sub channels for 165The device can also be configured using the available sub channels for
166transmission. To do that use S/G_MODULATOR ioctl and configure txsubchans properly. 166transmission. To do that use S/G_MODULATOR ioctl and configure txsubchans properly.
167Refer to v4l2-spec for proper use of this ioctl. 167Refer to the V4L2 API specification for proper use of this ioctl.
168 168
169Testing 169Testing
170======= 170=======
diff --git a/Documentation/video4linux/zr364xx.txt b/Documentation/video4linux/zr364xx.txt
index 7f3d1955d214..d98e4d302977 100644
--- a/Documentation/video4linux/zr364xx.txt
+++ b/Documentation/video4linux/zr364xx.txt
@@ -66,3 +66,4 @@ Vendor Product Distributor Model
660x0a17 0x004e Pentax Optio 50 660x0a17 0x004e Pentax Optio 50
670x041e 0x405d Creative DiVi CAM 516 670x041e 0x405d Creative DiVi CAM 516
680x08ca 0x2102 Aiptek DV T300 680x08ca 0x2102 Aiptek DV T300
690x06d6 0x003d Trust Powerc@m 910Z
diff --git a/Documentation/vm/hugetlbpage.txt b/Documentation/vm/hugetlbpage.txt
index 82a7bd1800b2..bc31636973e3 100644
--- a/Documentation/vm/hugetlbpage.txt
+++ b/Documentation/vm/hugetlbpage.txt
@@ -11,23 +11,21 @@ This optimization is more critical now as bigger and bigger physical memories
11(several GBs) are more readily available. 11(several GBs) are more readily available.
12 12
13Users can use the huge page support in Linux kernel by either using the mmap 13Users can use the huge page support in Linux kernel by either using the mmap
14system call or standard SYSv shared memory system calls (shmget, shmat). 14system call or standard SYSV shared memory system calls (shmget, shmat).
15 15
16First the Linux kernel needs to be built with the CONFIG_HUGETLBFS 16First the Linux kernel needs to be built with the CONFIG_HUGETLBFS
17(present under "File systems") and CONFIG_HUGETLB_PAGE (selected 17(present under "File systems") and CONFIG_HUGETLB_PAGE (selected
18automatically when CONFIG_HUGETLBFS is selected) configuration 18automatically when CONFIG_HUGETLBFS is selected) configuration
19options. 19options.
20 20
21The kernel built with huge page support should show the number of configured 21The /proc/meminfo file provides information about the total number of
22huge pages in the system by running the "cat /proc/meminfo" command. 22persistent hugetlb pages in the kernel's huge page pool. It also displays
23information about the number of free, reserved and surplus huge pages and the
24default huge page size. The huge page size is needed for generating the
25proper alignment and size of the arguments to system calls that map huge page
26regions.
23 27
24/proc/meminfo also provides information about the total number of hugetlb 28The output of "cat /proc/meminfo" will include lines like:
25pages configured in the kernel. It also displays information about the
26number of free hugetlb pages at any time. It also displays information about
27the configured huge page size - this is needed for generating the proper
28alignment and size of the arguments to the above system calls.
29
30The output of "cat /proc/meminfo" will have lines like:
31 29
32..... 30.....
33HugePages_Total: vvv 31HugePages_Total: vvv
@@ -53,59 +51,63 @@ HugePages_Surp is short for "surplus," and is the number of huge pages in
53/proc/filesystems should also show a filesystem of type "hugetlbfs" configured 51/proc/filesystems should also show a filesystem of type "hugetlbfs" configured
54in the kernel. 52in the kernel.
55 53
56/proc/sys/vm/nr_hugepages indicates the current number of configured hugetlb 54/proc/sys/vm/nr_hugepages indicates the current number of "persistent" huge
57pages in the kernel. Super user can dynamically request more (or free some 55pages in the kernel's huge page pool. "Persistent" huge pages will be
58pre-configured) huge pages. 56returned to the huge page pool when freed by a task. A user with root
59The allocation (or deallocation) of hugetlb pages is possible only if there are 57privileges can dynamically allocate more or free some persistent huge pages
60enough physically contiguous free pages in system (freeing of huge pages is 58by increasing or decreasing the value of 'nr_hugepages'.
61possible only if there are enough hugetlb pages free that can be transferred
62back to regular memory pool).
63 59
64Pages that are used as hugetlb pages are reserved inside the kernel and cannot 60Pages that are used as huge pages are reserved inside the kernel and cannot
65be used for other purposes. 61be used for other purposes. Huge pages cannot be swapped out under
62memory pressure.
66 63
67Once the kernel with Hugetlb page support is built and running, a user can 64Once a number of huge pages have been pre-allocated to the kernel huge page
68use either the mmap system call or shared memory system calls to start using 65pool, a user with appropriate privilege can use either the mmap system call
69the huge pages. It is required that the system administrator preallocate 66or shared memory system calls to use the huge pages. See the discussion of
70enough memory for huge page purposes. 67Using Huge Pages, below.
71 68
72The administrator can preallocate huge pages on the kernel boot command line by 69The administrator can allocate persistent huge pages on the kernel boot
73specifying the "hugepages=N" parameter, where 'N' = the number of huge pages 70command line by specifying the "hugepages=N" parameter, where 'N' = the
74requested. This is the most reliable method for preallocating huge pages as 71number of huge pages requested. This is the most reliable method of
75memory has not yet become fragmented. 72allocating huge pages as memory has not yet become fragmented.
76 73
77Some platforms support multiple huge page sizes. To preallocate huge pages 74Some platforms support multiple huge page sizes. To allocate huge pages
78of a specific size, one must preceed the huge pages boot command parameters 75of a specific size, one must preceed the huge pages boot command parameters
79with a huge page size selection parameter "hugepagesz=<size>". <size> must 76with a huge page size selection parameter "hugepagesz=<size>". <size> must
80be specified in bytes with optional scale suffix [kKmMgG]. The default huge 77be specified in bytes with optional scale suffix [kKmMgG]. The default huge
81page size may be selected with the "default_hugepagesz=<size>" boot parameter. 78page size may be selected with the "default_hugepagesz=<size>" boot parameter.
82 79
83/proc/sys/vm/nr_hugepages indicates the current number of configured [default 80When multiple huge page sizes are supported, /proc/sys/vm/nr_hugepages
84size] hugetlb pages in the kernel. Super user can dynamically request more 81indicates the current number of pre-allocated huge pages of the default size.
85(or free some pre-configured) huge pages. 82Thus, one can use the following command to dynamically allocate/deallocate
86 83default sized persistent huge pages:
87Use the following command to dynamically allocate/deallocate default sized
88huge pages:
89 84
90 echo 20 > /proc/sys/vm/nr_hugepages 85 echo 20 > /proc/sys/vm/nr_hugepages
91 86
92This command will try to configure 20 default sized huge pages in the system. 87This command will try to adjust the number of default sized huge pages in the
88huge page pool to 20, allocating or freeing huge pages, as required.
89
93On a NUMA platform, the kernel will attempt to distribute the huge page pool 90On a NUMA platform, the kernel will attempt to distribute the huge page pool
94over the all on-line nodes. These huge pages, allocated when nr_hugepages 91over all the set of allowed nodes specified by the NUMA memory policy of the
95is increased, are called "persistent huge pages". 92task that modifies nr_hugepages. The default for the allowed nodes--when the
93task has default memory policy--is all on-line nodes with memory. Allowed
94nodes with insufficient available, contiguous memory for a huge page will be
95silently skipped when allocating persistent huge pages. See the discussion
96below of the interaction of task memory policy, cpusets and per node attributes
97with the allocation and freeing of persistent huge pages.
96 98
97The success or failure of huge page allocation depends on the amount of 99The success or failure of huge page allocation depends on the amount of
98physically contiguous memory that is preset in system at the time of the 100physically contiguous memory that is present in system at the time of the
99allocation attempt. If the kernel is unable to allocate huge pages from 101allocation attempt. If the kernel is unable to allocate huge pages from
100some nodes in a NUMA system, it will attempt to make up the difference by 102some nodes in a NUMA system, it will attempt to make up the difference by
101allocating extra pages on other nodes with sufficient available contiguous 103allocating extra pages on other nodes with sufficient available contiguous
102memory, if any. 104memory, if any.
103 105
104System administrators may want to put this command in one of the local rc init 106System administrators may want to put this command in one of the local rc
105files. This will enable the kernel to request huge pages early in the boot 107init files. This will enable the kernel to allocate huge pages early in
106process when the possibility of getting physical contiguous pages is still 108the boot process when the possibility of getting physical contiguous pages
107very high. Administrators can verify the number of huge pages actually 109is still very high. Administrators can verify the number of huge pages
108allocated by checking the sysctl or meminfo. To check the per node 110actually allocated by checking the sysctl or meminfo. To check the per node
109distribution of huge pages in a NUMA system, use: 111distribution of huge pages in a NUMA system, use:
110 112
111 cat /sys/devices/system/node/node*/meminfo | fgrep Huge 113 cat /sys/devices/system/node/node*/meminfo | fgrep Huge
@@ -113,45 +115,47 @@ distribution of huge pages in a NUMA system, use:
113/proc/sys/vm/nr_overcommit_hugepages specifies how large the pool of 115/proc/sys/vm/nr_overcommit_hugepages specifies how large the pool of
114huge pages can grow, if more huge pages than /proc/sys/vm/nr_hugepages are 116huge pages can grow, if more huge pages than /proc/sys/vm/nr_hugepages are
115requested by applications. Writing any non-zero value into this file 117requested by applications. Writing any non-zero value into this file
116indicates that the hugetlb subsystem is allowed to try to obtain "surplus" 118indicates that the hugetlb subsystem is allowed to try to obtain that
117huge pages from the buddy allocator, when the normal pool is exhausted. As 119number of "surplus" huge pages from the kernel's normal page pool, when the
118these surplus huge pages go out of use, they are freed back to the buddy 120persistent huge page pool is exhausted. As these surplus huge pages become
119allocator. 121unused, they are freed back to the kernel's normal page pool.
120 122
121When increasing the huge page pool size via nr_hugepages, any surplus 123When increasing the huge page pool size via nr_hugepages, any existing surplus
122pages will first be promoted to persistent huge pages. Then, additional 124pages will first be promoted to persistent huge pages. Then, additional
123huge pages will be allocated, if necessary and if possible, to fulfill 125huge pages will be allocated, if necessary and if possible, to fulfill
124the new huge page pool size. 126the new persistent huge page pool size.
125 127
126The administrator may shrink the pool of preallocated huge pages for 128The administrator may shrink the pool of persistent huge pages for
127the default huge page size by setting the nr_hugepages sysctl to a 129the default huge page size by setting the nr_hugepages sysctl to a
128smaller value. The kernel will attempt to balance the freeing of huge pages 130smaller value. The kernel will attempt to balance the freeing of huge pages
129across all on-line nodes. Any free huge pages on the selected nodes will 131across all nodes in the memory policy of the task modifying nr_hugepages.
130be freed back to the buddy allocator. 132Any free huge pages on the selected nodes will be freed back to the kernel's
131 133normal page pool.
132Caveat: Shrinking the pool via nr_hugepages such that it becomes less 134
133than the number of huge pages in use will convert the balance to surplus 135Caveat: Shrinking the persistent huge page pool via nr_hugepages such that
134huge pages even if it would exceed the overcommit value. As long as 136it becomes less than the number of huge pages in use will convert the balance
135this condition holds, however, no more surplus huge pages will be 137of the in-use huge pages to surplus huge pages. This will occur even if
136allowed on the system until one of the two sysctls are increased 138the number of surplus pages it would exceed the overcommit value. As long as
137sufficiently, or the surplus huge pages go out of use and are freed. 139this condition holds--that is, until nr_hugepages+nr_overcommit_hugepages is
140increased sufficiently, or the surplus huge pages go out of use and are freed--
141no more surplus huge pages will be allowed to be allocated.
138 142
139With support for multiple huge page pools at run-time available, much of 143With support for multiple huge page pools at run-time available, much of
140the huge page userspace interface has been duplicated in sysfs. The above 144the huge page userspace interface in /proc/sys/vm has been duplicated in sysfs.
141information applies to the default huge page size which will be 145The /proc interfaces discussed above have been retained for backwards
142controlled by the /proc interfaces for backwards compatibility. The root 146compatibility. The root huge page control directory in sysfs is:
143huge page control directory in sysfs is:
144 147
145 /sys/kernel/mm/hugepages 148 /sys/kernel/mm/hugepages
146 149
147For each huge page size supported by the running kernel, a subdirectory 150For each huge page size supported by the running kernel, a subdirectory
148will exist, of the form 151will exist, of the form:
149 152
150 hugepages-${size}kB 153 hugepages-${size}kB
151 154
152Inside each of these directories, the same set of files will exist: 155Inside each of these directories, the same set of files will exist:
153 156
154 nr_hugepages 157 nr_hugepages
158 nr_hugepages_mempolicy
155 nr_overcommit_hugepages 159 nr_overcommit_hugepages
156 free_hugepages 160 free_hugepages
157 resv_hugepages 161 resv_hugepages
@@ -159,6 +163,102 @@ Inside each of these directories, the same set of files will exist:
159 163
160which function as described above for the default huge page-sized case. 164which function as described above for the default huge page-sized case.
161 165
166
167Interaction of Task Memory Policy with Huge Page Allocation/Freeing
168
169Whether huge pages are allocated and freed via the /proc interface or
170the /sysfs interface using the nr_hugepages_mempolicy attribute, the NUMA
171nodes from which huge pages are allocated or freed are controlled by the
172NUMA memory policy of the task that modifies the nr_hugepages_mempolicy
173sysctl or attribute. When the nr_hugepages attribute is used, mempolicy
174is ignored.
175
176The recommended method to allocate or free huge pages to/from the kernel
177huge page pool, using the nr_hugepages example above, is:
178
179 numactl --interleave <node-list> echo 20 \
180 >/proc/sys/vm/nr_hugepages_mempolicy
181
182or, more succinctly:
183
184 numactl -m <node-list> echo 20 >/proc/sys/vm/nr_hugepages_mempolicy
185
186This will allocate or free abs(20 - nr_hugepages) to or from the nodes
187specified in <node-list>, depending on whether number of persistent huge pages
188is initially less than or greater than 20, respectively. No huge pages will be
189allocated nor freed on any node not included in the specified <node-list>.
190
191When adjusting the persistent hugepage count via nr_hugepages_mempolicy, any
192memory policy mode--bind, preferred, local or interleave--may be used. The
193resulting effect on persistent huge page allocation is as follows:
194
1951) Regardless of mempolicy mode [see Documentation/vm/numa_memory_policy.txt],
196 persistent huge pages will be distributed across the node or nodes
197 specified in the mempolicy as if "interleave" had been specified.
198 However, if a node in the policy does not contain sufficient contiguous
199 memory for a huge page, the allocation will not "fallback" to the nearest
200 neighbor node with sufficient contiguous memory. To do this would cause
201 undesirable imbalance in the distribution of the huge page pool, or
202 possibly, allocation of persistent huge pages on nodes not allowed by
203 the task's memory policy.
204
2052) One or more nodes may be specified with the bind or interleave policy.
206 If more than one node is specified with the preferred policy, only the
207 lowest numeric id will be used. Local policy will select the node where
208 the task is running at the time the nodes_allowed mask is constructed.
209 For local policy to be deterministic, the task must be bound to a cpu or
210 cpus in a single node. Otherwise, the task could be migrated to some
211 other node at any time after launch and the resulting node will be
212 indeterminate. Thus, local policy is not very useful for this purpose.
213 Any of the other mempolicy modes may be used to specify a single node.
214
2153) The nodes allowed mask will be derived from any non-default task mempolicy,
216 whether this policy was set explicitly by the task itself or one of its
217 ancestors, such as numactl. This means that if the task is invoked from a
218 shell with non-default policy, that policy will be used. One can specify a
219 node list of "all" with numactl --interleave or --membind [-m] to achieve
220 interleaving over all nodes in the system or cpuset.
221
2224) Any task mempolicy specifed--e.g., using numactl--will be constrained by
223 the resource limits of any cpuset in which the task runs. Thus, there will
224 be no way for a task with non-default policy running in a cpuset with a
225 subset of the system nodes to allocate huge pages outside the cpuset
226 without first moving to a cpuset that contains all of the desired nodes.
227
2285) Boot-time huge page allocation attempts to distribute the requested number
229 of huge pages over all on-lines nodes with memory.
230
231Per Node Hugepages Attributes
232
233A subset of the contents of the root huge page control directory in sysfs,
234described above, will be replicated under each the system device of each
235NUMA node with memory in:
236
237 /sys/devices/system/node/node[0-9]*/hugepages/
238
239Under this directory, the subdirectory for each supported huge page size
240contains the following attribute files:
241
242 nr_hugepages
243 free_hugepages
244 surplus_hugepages
245
246The free_' and surplus_' attribute files are read-only. They return the number
247of free and surplus [overcommitted] huge pages, respectively, on the parent
248node.
249
250The nr_hugepages attribute returns the total number of huge pages on the
251specified node. When this attribute is written, the number of persistent huge
252pages on the parent node will be adjusted to the specified value, if sufficient
253resources exist, regardless of the task's mempolicy or cpuset constraints.
254
255Note that the number of overcommit and reserve pages remain global quantities,
256as we don't know until fault time, when the faulting task's mempolicy is
257applied, from which node the huge page allocation will be attempted.
258
259
260Using Huge Pages
261
162If the user applications are going to request huge pages using mmap system 262If the user applications are going to request huge pages using mmap system
163call, then it is required that system administrator mount a file system of 263call, then it is required that system administrator mount a file system of
164type hugetlbfs: 264type hugetlbfs:
@@ -206,9 +306,11 @@ map_hugetlb.c.
206 * requesting huge pages. 306 * requesting huge pages.
207 * 307 *
208 * For the ia64 architecture, the Linux kernel reserves Region number 4 for 308 * For the ia64 architecture, the Linux kernel reserves Region number 4 for
209 * huge pages. That means the addresses starting with 0x800000... will need 309 * huge pages. That means that if one requires a fixed address, a huge page
210 * to be specified. Specifying a fixed address is not required on ppc64, 310 * aligned address starting with 0x800000... will be required. If a fixed
211 * i386 or x86_64. 311 * address is not required, the kernel will select an address in the proper
312 * range.
313 * Other architectures, such as ppc64, i386 or x86_64 are not so constrained.
212 * 314 *
213 * Note: The default shared memory limit is quite low on many kernels, 315 * Note: The default shared memory limit is quite low on many kernels,
214 * you may need to increase it via: 316 * you may need to increase it via:
@@ -237,14 +339,8 @@ map_hugetlb.c.
237 339
238#define dprintf(x) printf(x) 340#define dprintf(x) printf(x)
239 341
240/* Only ia64 requires this */ 342#define ADDR (void *)(0x0UL) /* let kernel choose address */
241#ifdef __ia64__
242#define ADDR (void *)(0x8000000000000000UL)
243#define SHMAT_FLAGS (SHM_RND)
244#else
245#define ADDR (void *)(0x0UL)
246#define SHMAT_FLAGS (0) 343#define SHMAT_FLAGS (0)
247#endif
248 344
249int main(void) 345int main(void)
250{ 346{
@@ -302,10 +398,12 @@ int main(void)
302 * example, the app is requesting memory of size 256MB that is backed by 398 * example, the app is requesting memory of size 256MB that is backed by
303 * huge pages. 399 * huge pages.
304 * 400 *
305 * For ia64 architecture, Linux kernel reserves Region number 4 for huge pages. 401 * For the ia64 architecture, the Linux kernel reserves Region number 4 for
306 * That means the addresses starting with 0x800000... will need to be 402 * huge pages. That means that if one requires a fixed address, a huge page
307 * specified. Specifying a fixed address is not required on ppc64, i386 403 * aligned address starting with 0x800000... will be required. If a fixed
308 * or x86_64. 404 * address is not required, the kernel will select an address in the proper
405 * range.
406 * Other architectures, such as ppc64, i386 or x86_64 are not so constrained.
309 */ 407 */
310#include <stdlib.h> 408#include <stdlib.h>
311#include <stdio.h> 409#include <stdio.h>
@@ -317,14 +415,8 @@ int main(void)
317#define LENGTH (256UL*1024*1024) 415#define LENGTH (256UL*1024*1024)
318#define PROTECTION (PROT_READ | PROT_WRITE) 416#define PROTECTION (PROT_READ | PROT_WRITE)
319 417
320/* Only ia64 requires this */ 418#define ADDR (void *)(0x0UL) /* let kernel choose address */
321#ifdef __ia64__
322#define ADDR (void *)(0x8000000000000000UL)
323#define FLAGS (MAP_SHARED | MAP_FIXED)
324#else
325#define ADDR (void *)(0x0UL)
326#define FLAGS (MAP_SHARED) 419#define FLAGS (MAP_SHARED)
327#endif
328 420
329void check_bytes(char *addr) 421void check_bytes(char *addr)
330{ 422{
diff --git a/Documentation/vm/hwpoison.txt b/Documentation/vm/hwpoison.txt
new file mode 100644
index 000000000000..3ffadf8da61f
--- /dev/null
+++ b/Documentation/vm/hwpoison.txt
@@ -0,0 +1,136 @@
1What is hwpoison?
2
3Upcoming Intel CPUs have support for recovering from some memory errors
4(``MCA recovery''). This requires the OS to declare a page "poisoned",
5kill the processes associated with it and avoid using it in the future.
6
7This patchkit implements the necessary infrastructure in the VM.
8
9To quote the overview comment:
10
11 * High level machine check handler. Handles pages reported by the
12 * hardware as being corrupted usually due to a 2bit ECC memory or cache
13 * failure.
14 *
15 * This focusses on pages detected as corrupted in the background.
16 * When the current CPU tries to consume corruption the currently
17 * running process can just be killed directly instead. This implies
18 * that if the error cannot be handled for some reason it's safe to
19 * just ignore it because no corruption has been consumed yet. Instead
20 * when that happens another machine check will happen.
21 *
22 * Handles page cache pages in various states. The tricky part
23 * here is that we can access any page asynchronous to other VM
24 * users, because memory failures could happen anytime and anywhere,
25 * possibly violating some of their assumptions. This is why this code
26 * has to be extremely careful. Generally it tries to use normal locking
27 * rules, as in get the standard locks, even if that means the
28 * error handling takes potentially a long time.
29 *
30 * Some of the operations here are somewhat inefficient and have non
31 * linear algorithmic complexity, because the data structures have not
32 * been optimized for this case. This is in particular the case
33 * for the mapping from a vma to a process. Since this case is expected
34 * to be rare we hope we can get away with this.
35
36The code consists of a the high level handler in mm/memory-failure.c,
37a new page poison bit and various checks in the VM to handle poisoned
38pages.
39
40The main target right now is KVM guests, but it works for all kinds
41of applications. KVM support requires a recent qemu-kvm release.
42
43For the KVM use there was need for a new signal type so that
44KVM can inject the machine check into the guest with the proper
45address. This in theory allows other applications to handle
46memory failures too. The expection is that near all applications
47won't do that, but some very specialized ones might.
48
49---
50
51There are two (actually three) modi memory failure recovery can be in:
52
53vm.memory_failure_recovery sysctl set to zero:
54 All memory failures cause a panic. Do not attempt recovery.
55 (on x86 this can be also affected by the tolerant level of the
56 MCE subsystem)
57
58early kill
59 (can be controlled globally and per process)
60 Send SIGBUS to the application as soon as the error is detected
61 This allows applications who can process memory errors in a gentle
62 way (e.g. drop affected object)
63 This is the mode used by KVM qemu.
64
65late kill
66 Send SIGBUS when the application runs into the corrupted page.
67 This is best for memory error unaware applications and default
68 Note some pages are always handled as late kill.
69
70---
71
72User control:
73
74vm.memory_failure_recovery
75 See sysctl.txt
76
77vm.memory_failure_early_kill
78 Enable early kill mode globally
79
80PR_MCE_KILL
81 Set early/late kill mode/revert to system default
82 arg1: PR_MCE_KILL_CLEAR: Revert to system default
83 arg1: PR_MCE_KILL_SET: arg2 defines thread specific mode
84 PR_MCE_KILL_EARLY: Early kill
85 PR_MCE_KILL_LATE: Late kill
86 PR_MCE_KILL_DEFAULT: Use system global default
87PR_MCE_KILL_GET
88 return current mode
89
90
91---
92
93Testing:
94
95madvise(MADV_POISON, ....)
96 (as root)
97 Poison a page in the process for testing
98
99
100hwpoison-inject module through debugfs
101 /sys/debug/hwpoison/corrupt-pfn
102
103Inject hwpoison fault at PFN echoed into this file
104
105
106Architecture specific MCE injector
107
108x86 has mce-inject, mce-test
109
110Some portable hwpoison test programs in mce-test, see blow.
111
112---
113
114References:
115
116http://halobates.de/mce-lc09-2.pdf
117 Overview presentation from LinuxCon 09
118
119git://git.kernel.org/pub/scm/utils/cpu/mce/mce-test.git
120 Test suite (hwpoison specific portable tests in tsrc)
121
122git://git.kernel.org/pub/scm/utils/cpu/mce/mce-inject.git
123 x86 specific injector
124
125
126---
127
128Limitations:
129
130- Not all page types are supported and never will. Most kernel internal
131objects cannot be recovered, only LRU pages for now.
132- Right now hugepage support is missing.
133
134---
135Andi Kleen, Oct 2009
136
diff --git a/Documentation/vm/ksm.txt b/Documentation/vm/ksm.txt
index 262d8e6793a3..b392e496f816 100644
--- a/Documentation/vm/ksm.txt
+++ b/Documentation/vm/ksm.txt
@@ -16,9 +16,9 @@ by sharing the data common between them. But it can be useful to any
16application which generates many instances of the same data. 16application which generates many instances of the same data.
17 17
18KSM only merges anonymous (private) pages, never pagecache (file) pages. 18KSM only merges anonymous (private) pages, never pagecache (file) pages.
19KSM's merged pages are at present locked into kernel memory for as long 19KSM's merged pages were originally locked into kernel memory, but can now
20as they are shared: so cannot be swapped out like the user pages they 20be swapped out just like other user pages (but sharing is broken when they
21replace (but swapping KSM pages should follow soon in a later release). 21are swapped back in: ksmd must rediscover their identity and merge again).
22 22
23KSM only operates on those areas of address space which an application 23KSM only operates on those areas of address space which an application
24has advised to be likely candidates for merging, by using the madvise(2) 24has advised to be likely candidates for merging, by using the madvise(2)
@@ -44,20 +44,12 @@ includes unmapped gaps (though working on the intervening mapped areas),
44and might fail with EAGAIN if not enough memory for internal structures. 44and might fail with EAGAIN if not enough memory for internal structures.
45 45
46Applications should be considerate in their use of MADV_MERGEABLE, 46Applications should be considerate in their use of MADV_MERGEABLE,
47restricting its use to areas likely to benefit. KSM's scans may use 47restricting its use to areas likely to benefit. KSM's scans may use a lot
48a lot of processing power, and its kernel-resident pages are a limited 48of processing power: some installations will disable KSM for that reason.
49resource. Some installations will disable KSM for these reasons.
50 49
51The KSM daemon is controlled by sysfs files in /sys/kernel/mm/ksm/, 50The KSM daemon is controlled by sysfs files in /sys/kernel/mm/ksm/,
52readable by all but writable only by root: 51readable by all but writable only by root:
53 52
54max_kernel_pages - set to maximum number of kernel pages that KSM may use
55 e.g. "echo 100000 > /sys/kernel/mm/ksm/max_kernel_pages"
56 Value 0 imposes no limit on the kernel pages KSM may use;
57 but note that any process using MADV_MERGEABLE can cause
58 KSM to allocate these pages, unswappable until it exits.
59 Default: quarter of memory (chosen to not pin too much)
60
61pages_to_scan - how many present pages to scan before ksmd goes to sleep 53pages_to_scan - how many present pages to scan before ksmd goes to sleep
62 e.g. "echo 100 > /sys/kernel/mm/ksm/pages_to_scan" 54 e.g. "echo 100 > /sys/kernel/mm/ksm/pages_to_scan"
63 Default: 100 (chosen for demonstration purposes) 55 Default: 100 (chosen for demonstration purposes)
@@ -75,7 +67,7 @@ run - set 0 to stop ksmd from running but keep merged pages,
75 67
76The effectiveness of KSM and MADV_MERGEABLE is shown in /sys/kernel/mm/ksm/: 68The effectiveness of KSM and MADV_MERGEABLE is shown in /sys/kernel/mm/ksm/:
77 69
78pages_shared - how many shared unswappable kernel pages KSM is using 70pages_shared - how many shared pages are being used
79pages_sharing - how many more sites are sharing them i.e. how much saved 71pages_sharing - how many more sites are sharing them i.e. how much saved
80pages_unshared - how many pages unique but repeatedly checked for merging 72pages_unshared - how many pages unique but repeatedly checked for merging
81pages_volatile - how many pages changing too fast to be placed in a tree 73pages_volatile - how many pages changing too fast to be placed in a tree
@@ -87,4 +79,4 @@ pages_volatile embraces several different kinds of activity, but a high
87proportion there would also indicate poor use of madvise MADV_MERGEABLE. 79proportion there would also indicate poor use of madvise MADV_MERGEABLE.
88 80
89Izik Eidus, 81Izik Eidus,
90Hugh Dickins, 24 Sept 2009 82Hugh Dickins, 17 Nov 2009
diff --git a/Documentation/vm/page-types.c b/Documentation/vm/page-types.c
index 3ec4f2a22585..7a7d9bab32ef 100644
--- a/Documentation/vm/page-types.c
+++ b/Documentation/vm/page-types.c
@@ -100,7 +100,7 @@
100#define BIT(name) (1ULL << KPF_##name) 100#define BIT(name) (1ULL << KPF_##name)
101#define BITS_COMPOUND (BIT(COMPOUND_HEAD) | BIT(COMPOUND_TAIL)) 101#define BITS_COMPOUND (BIT(COMPOUND_HEAD) | BIT(COMPOUND_TAIL))
102 102
103static char *page_flag_names[] = { 103static const char *page_flag_names[] = {
104 [KPF_LOCKED] = "L:locked", 104 [KPF_LOCKED] = "L:locked",
105 [KPF_ERROR] = "E:error", 105 [KPF_ERROR] = "E:error",
106 [KPF_REFERENCED] = "R:referenced", 106 [KPF_REFERENCED] = "R:referenced",
@@ -173,7 +173,7 @@ static int kpageflags_fd;
173static int opt_hwpoison; 173static int opt_hwpoison;
174static int opt_unpoison; 174static int opt_unpoison;
175 175
176static char *hwpoison_debug_fs = "/debug/hwpoison"; 176static const char hwpoison_debug_fs[] = "/debug/hwpoison";
177static int hwpoison_inject_fd; 177static int hwpoison_inject_fd;
178static int hwpoison_forget_fd; 178static int hwpoison_forget_fd;
179 179
@@ -218,7 +218,7 @@ static void fatal(const char *x, ...)
218 exit(EXIT_FAILURE); 218 exit(EXIT_FAILURE);
219} 219}
220 220
221int checked_open(const char *pathname, int flags) 221static int checked_open(const char *pathname, int flags)
222{ 222{
223 int fd = open(pathname, flags); 223 int fd = open(pathname, flags);
224 224
@@ -301,7 +301,7 @@ static char *page_flag_name(uint64_t flags)
301 present = (flags >> i) & 1; 301 present = (flags >> i) & 1;
302 if (!page_flag_names[i]) { 302 if (!page_flag_names[i]) {
303 if (present) 303 if (present)
304 fatal("unkown flag bit %d\n", i); 304 fatal("unknown flag bit %d\n", i);
305 continue; 305 continue;
306 } 306 }
307 buf[j++] = present ? page_flag_names[i][0] : '_'; 307 buf[j++] = present ? page_flag_names[i][0] : '_';
@@ -560,7 +560,7 @@ static void walk_pfn(unsigned long voffset,
560{ 560{
561 uint64_t buf[KPAGEFLAGS_BATCH]; 561 uint64_t buf[KPAGEFLAGS_BATCH];
562 unsigned long batch; 562 unsigned long batch;
563 unsigned long pages; 563 long pages;
564 unsigned long i; 564 unsigned long i;
565 565
566 while (count) { 566 while (count) {
@@ -673,30 +673,35 @@ static void usage(void)
673 673
674 printf( 674 printf(
675"page-types [options]\n" 675"page-types [options]\n"
676" -r|--raw Raw mode, for kernel developers\n" 676" -r|--raw Raw mode, for kernel developers\n"
677" -a|--addr addr-spec Walk a range of pages\n" 677" -d|--describe flags Describe flags\n"
678" -b|--bits bits-spec Walk pages with specified bits\n" 678" -a|--addr addr-spec Walk a range of pages\n"
679" -p|--pid pid Walk process address space\n" 679" -b|--bits bits-spec Walk pages with specified bits\n"
680" -p|--pid pid Walk process address space\n"
680#if 0 /* planned features */ 681#if 0 /* planned features */
681" -f|--file filename Walk file address space\n" 682" -f|--file filename Walk file address space\n"
682#endif 683#endif
683" -l|--list Show page details in ranges\n" 684" -l|--list Show page details in ranges\n"
684" -L|--list-each Show page details one by one\n" 685" -L|--list-each Show page details one by one\n"
685" -N|--no-summary Don't show summay info\n" 686" -N|--no-summary Don't show summay info\n"
686" -X|--hwpoison hwpoison pages\n" 687" -X|--hwpoison hwpoison pages\n"
687" -x|--unpoison unpoison pages\n" 688" -x|--unpoison unpoison pages\n"
688" -h|--help Show this usage message\n" 689" -h|--help Show this usage message\n"
690"flags:\n"
691" 0x10 bitfield format, e.g.\n"
692" anon bit-name, e.g.\n"
693" 0x10,anon comma-separated list, e.g.\n"
689"addr-spec:\n" 694"addr-spec:\n"
690" N one page at offset N (unit: pages)\n" 695" N one page at offset N (unit: pages)\n"
691" N+M pages range from N to N+M-1\n" 696" N+M pages range from N to N+M-1\n"
692" N,M pages range from N to M-1\n" 697" N,M pages range from N to M-1\n"
693" N, pages range from N to end\n" 698" N, pages range from N to end\n"
694" ,M pages range from 0 to M-1\n" 699" ,M pages range from 0 to M-1\n"
695"bits-spec:\n" 700"bits-spec:\n"
696" bit1,bit2 (flags & (bit1|bit2)) != 0\n" 701" bit1,bit2 (flags & (bit1|bit2)) != 0\n"
697" bit1,bit2=bit1 (flags & (bit1|bit2)) == bit1\n" 702" bit1,bit2=bit1 (flags & (bit1|bit2)) == bit1\n"
698" bit1,~bit2 (flags & (bit1|bit2)) == bit1\n" 703" bit1,~bit2 (flags & (bit1|bit2)) == bit1\n"
699" =bit1,bit2 flags == (bit1|bit2)\n" 704" =bit1,bit2 flags == (bit1|bit2)\n"
700"bit-names:\n" 705"bit-names:\n"
701 ); 706 );
702 707
@@ -884,13 +889,23 @@ static void parse_bits_mask(const char *optarg)
884 add_bits_filter(mask, bits); 889 add_bits_filter(mask, bits);
885} 890}
886 891
892static void describe_flags(const char *optarg)
893{
894 uint64_t flags = parse_flag_names(optarg, 0);
887 895
888static struct option opts[] = { 896 printf("0x%016llx\t%s\t%s\n",
897 (unsigned long long)flags,
898 page_flag_name(flags),
899 page_flag_longname(flags));
900}
901
902static const struct option opts[] = {
889 { "raw" , 0, NULL, 'r' }, 903 { "raw" , 0, NULL, 'r' },
890 { "pid" , 1, NULL, 'p' }, 904 { "pid" , 1, NULL, 'p' },
891 { "file" , 1, NULL, 'f' }, 905 { "file" , 1, NULL, 'f' },
892 { "addr" , 1, NULL, 'a' }, 906 { "addr" , 1, NULL, 'a' },
893 { "bits" , 1, NULL, 'b' }, 907 { "bits" , 1, NULL, 'b' },
908 { "describe" , 1, NULL, 'd' },
894 { "list" , 0, NULL, 'l' }, 909 { "list" , 0, NULL, 'l' },
895 { "list-each" , 0, NULL, 'L' }, 910 { "list-each" , 0, NULL, 'L' },
896 { "no-summary", 0, NULL, 'N' }, 911 { "no-summary", 0, NULL, 'N' },
@@ -907,7 +922,7 @@ int main(int argc, char *argv[])
907 page_size = getpagesize(); 922 page_size = getpagesize();
908 923
909 while ((c = getopt_long(argc, argv, 924 while ((c = getopt_long(argc, argv,
910 "rp:f:a:b:lLNXxh", opts, NULL)) != -1) { 925 "rp:f:a:b:d:lLNXxh", opts, NULL)) != -1) {
911 switch (c) { 926 switch (c) {
912 case 'r': 927 case 'r':
913 opt_raw = 1; 928 opt_raw = 1;
@@ -924,6 +939,9 @@ int main(int argc, char *argv[])
924 case 'b': 939 case 'b':
925 parse_bits_mask(optarg); 940 parse_bits_mask(optarg);
926 break; 941 break;
942 case 'd':
943 describe_flags(optarg);
944 exit(0);
927 case 'l': 945 case 'l':
928 opt_list = 1; 946 opt_list = 1;
929 break; 947 break;
diff --git a/Documentation/vm/slub.txt b/Documentation/vm/slub.txt
index 510917ff59ed..b37300edf27c 100644
--- a/Documentation/vm/slub.txt
+++ b/Documentation/vm/slub.txt
@@ -245,7 +245,7 @@ been overwritten. Here a string of 8 characters was written into a slab that
245has the length of 8 characters. However, a 8 character string needs a 245has the length of 8 characters. However, a 8 character string needs a
246terminating 0. That zero has overwritten the first byte of the Redzone field. 246terminating 0. That zero has overwritten the first byte of the Redzone field.
247After reporting the details of the issue encountered the FIX SLUB message 247After reporting the details of the issue encountered the FIX SLUB message
248tell us that SLUB has restored the Redzone to its proper value and then 248tells us that SLUB has restored the Redzone to its proper value and then
249system operations continue. 249system operations continue.
250 250
251Emergency operations: 251Emergency operations: