aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation
diff options
context:
space:
mode:
authorDmitry Torokhov <dmitry.torokhov@gmail.com>2010-01-22 02:55:25 -0500
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2010-01-22 02:55:25 -0500
commit7755726fe90a8b253659756e6de68c1a55aa427f (patch)
treea3523fa77e07854db3b8089e3066a55ea997060c /Documentation
parent3bf127637e22ddf95e67e10a23c339cee3d52429 (diff)
parent92dcffb916d309aa01778bf8963a6932e4014d07 (diff)
Merge commit 'v2.6.33-rc5' into next
Diffstat (limited to 'Documentation')
-rw-r--r--Documentation/ABI/testing/sysfs-bus-usb18
-rw-r--r--Documentation/ABI/testing/sysfs-devices-memory14
-rw-r--r--Documentation/ABI/testing/sysfs-devices-system-cpu14
-rw-r--r--Documentation/ABI/testing/sysfs-memory-page-offline44
-rw-r--r--Documentation/Changes2
-rw-r--r--Documentation/DocBook/Makefile38
-rw-r--r--Documentation/DocBook/media-entities.tmpl18
-rw-r--r--Documentation/DocBook/media-indices.tmpl4
-rw-r--r--Documentation/DocBook/mtdnand.tmpl12
-rw-r--r--Documentation/DocBook/procfs-guide.tmpl626
-rw-r--r--Documentation/DocBook/procfs_example.c201
-rw-r--r--Documentation/DocBook/v4l/common.xml35
-rw-r--r--Documentation/DocBook/v4l/compat.xml16
-rw-r--r--Documentation/DocBook/v4l/v4l2.xml26
-rw-r--r--Documentation/DocBook/v4l/videodev2.h.xml116
-rw-r--r--Documentation/DocBook/v4l/vidioc-enum-dv-presets.xml238
-rw-r--r--Documentation/DocBook/v4l/vidioc-enuminput.xml36
-rw-r--r--Documentation/DocBook/v4l/vidioc-enumoutput.xml36
-rw-r--r--Documentation/DocBook/v4l/vidioc-g-dv-preset.xml111
-rw-r--r--Documentation/DocBook/v4l/vidioc-g-dv-timings.xml224
-rw-r--r--Documentation/DocBook/v4l/vidioc-g-std.xml6
-rw-r--r--Documentation/DocBook/v4l/vidioc-query-dv-preset.xml85
-rw-r--r--Documentation/DocBook/v4l/vidioc-querystd.xml6
-rw-r--r--Documentation/IO-mapping.txt2
-rw-r--r--Documentation/PCI/PCI-DMA-mapping.txt (renamed from Documentation/DMA-mapping.txt)0
-rw-r--r--Documentation/SubmitChecklist5
-rw-r--r--Documentation/acpi/method-customizing.txt66
-rw-r--r--Documentation/blackfin/00-INDEX3
-rw-r--r--Documentation/blackfin/Makefile6
-rw-r--r--Documentation/blackfin/cache-lock.txt48
-rw-r--r--Documentation/blackfin/cachefeatures.txt10
-rw-r--r--Documentation/blackfin/gptimers-example.c83
-rw-r--r--Documentation/block/00-INDEX2
-rw-r--r--Documentation/block/as-iosched.txt172
-rw-r--r--Documentation/block/biodoc.txt2
-rw-r--r--Documentation/cpu-hotplug.txt49
-rw-r--r--Documentation/device-mapper/snapshot.txt60
-rw-r--r--Documentation/dontdiff1
-rw-r--r--Documentation/driver-model/driver.txt4
-rw-r--r--Documentation/fb/viafb.txt12
-rw-r--r--Documentation/feature-removal-schedule.txt77
-rw-r--r--Documentation/filesystems/00-INDEX12
-rw-r--r--Documentation/filesystems/ext4.txt2
-rw-r--r--Documentation/filesystems/nfs/00-INDEX16
-rw-r--r--Documentation/filesystems/nfs/Exporting (renamed from Documentation/filesystems/Exporting)0
-rw-r--r--Documentation/filesystems/nfs/knfsd-stats.txt (renamed from Documentation/filesystems/knfsd-stats.txt)0
-rw-r--r--Documentation/filesystems/nfs/nfs-rdma.txt (renamed from Documentation/filesystems/nfs-rdma.txt)0
-rw-r--r--Documentation/filesystems/nfs/nfs.txt (renamed from Documentation/filesystems/nfs.txt)0
-rw-r--r--Documentation/filesystems/nfs/nfs41-server.txt (renamed from Documentation/filesystems/nfs41-server.txt)9
-rw-r--r--Documentation/filesystems/nfs/nfsroot.txt (renamed from Documentation/filesystems/nfsroot.txt)0
-rw-r--r--Documentation/filesystems/nfs/rpc-cache.txt (renamed from Documentation/filesystems/rpc-cache.txt)0
-rw-r--r--Documentation/filesystems/nilfs2.txt2
-rw-r--r--Documentation/filesystems/porting2
-rw-r--r--Documentation/filesystems/proc.txt11
-rw-r--r--Documentation/filesystems/seq_file.txt4
-rw-r--r--Documentation/filesystems/sysfs.txt12
-rw-r--r--Documentation/gpio.txt15
-rw-r--r--Documentation/hwmon/amc6821102
-rw-r--r--Documentation/hwmon/k10temp65
-rw-r--r--Documentation/hwmon/lis3lv02d55
-rw-r--r--Documentation/hwmon/w83627ehf10
-rw-r--r--Documentation/i2c/writing-clients2
-rw-r--r--Documentation/infiniband/ipoib.txt10
-rw-r--r--Documentation/ioctl/ioctl-number.txt203
-rw-r--r--Documentation/kbuild/kbuild.txt14
-rw-r--r--Documentation/kbuild/kconfig.txt8
-rw-r--r--Documentation/kernel-doc-nano-HOWTO.txt12
-rw-r--r--Documentation/kernel-parameters.txt16
-rw-r--r--Documentation/kvm/api.txt10
-rw-r--r--Documentation/laptops/thinkpad-acpi.txt160
-rw-r--r--Documentation/memory-hotplug.txt11
-rw-r--r--Documentation/misc-devices/ad525x_dpot.txt57
-rw-r--r--Documentation/networking/3c509.txt12
-rw-r--r--Documentation/nommu-mmap.txt26
-rw-r--r--Documentation/power/runtime_pm.txt223
-rw-r--r--Documentation/powerpc/dts-bindings/4xx/ppc440spe-adma.txt93
-rw-r--r--Documentation/powerpc/dts-bindings/fsl/mpic.txt42
-rw-r--r--Documentation/powerpc/dts-bindings/nintendo/gamecube.txt109
-rw-r--r--Documentation/powerpc/dts-bindings/nintendo/wii.txt184
-rw-r--r--Documentation/sound/alsa/HD-Audio-Models.txt1
-rw-r--r--Documentation/sound/alsa/Procfile.txt2
-rw-r--r--Documentation/stable_kernel_rules.txt24
-rw-r--r--Documentation/thermal/sysfs-api.txt1
-rw-r--r--Documentation/trace/events-kmem.txt14
-rw-r--r--Documentation/trace/ftrace-design.txt14
-rw-r--r--Documentation/trace/mmiotrace.txt15
-rw-r--r--Documentation/trace/ring-buffer-design.txt56
-rw-r--r--Documentation/trace/tracepoint-analysis.txt60
-rw-r--r--Documentation/usb/power-management.txt41
-rw-r--r--Documentation/vgaarbiter.txt2
-rw-r--r--Documentation/video4linux/gspca.txt34
-rw-r--r--Documentation/video4linux/sh_mobile_ceu_camera.txt157
-rw-r--r--Documentation/video4linux/v4l2-framework.txt16
-rw-r--r--Documentation/vm/hugetlbpage.txt262
-rw-r--r--Documentation/vm/hwpoison.txt52
-rw-r--r--Documentation/vm/ksm.txt22
-rw-r--r--Documentation/vm/page-types.c83
97 files changed, 3222 insertions, 1671 deletions
diff --git a/Documentation/ABI/testing/sysfs-bus-usb b/Documentation/ABI/testing/sysfs-bus-usb
index deb6b489e4e5..a07c0f366f91 100644
--- a/Documentation/ABI/testing/sysfs-bus-usb
+++ b/Documentation/ABI/testing/sysfs-bus-usb
@@ -21,25 +21,27 @@ Contact: Alan Stern <stern@rowland.harvard.edu>
21Description: 21Description:
22 Each USB device directory will contain a file named 22 Each USB device directory will contain a file named
23 power/level. This file holds a power-level setting for 23 power/level. This file holds a power-level setting for
24 the device, one of "on", "auto", or "suspend". 24 the device, either "on" or "auto".
25 25
26 "on" means that the device is not allowed to autosuspend, 26 "on" means that the device is not allowed to autosuspend,
27 although normal suspends for system sleep will still 27 although normal suspends for system sleep will still
28 be honored. "auto" means the device will autosuspend 28 be honored. "auto" means the device will autosuspend
29 and autoresume in the usual manner, according to the 29 and autoresume in the usual manner, according to the
30 capabilities of its driver. "suspend" means the device 30 capabilities of its driver.
31 is forced into a suspended state and it will not autoresume
32 in response to I/O requests. However remote-wakeup requests
33 from the device may still be enabled (the remote-wakeup
34 setting is controlled separately by the power/wakeup
35 attribute).
36 31
37 During normal use, devices should be left in the "auto" 32 During normal use, devices should be left in the "auto"
38 level. The other levels are meant for administrative uses. 33 level. The "on" level is meant for administrative uses.
39 If you want to suspend a device immediately but leave it 34 If you want to suspend a device immediately but leave it
40 free to wake up in response to I/O requests, you should 35 free to wake up in response to I/O requests, you should
41 write "0" to power/autosuspend. 36 write "0" to power/autosuspend.
42 37
38 Device not capable of proper suspend and resume should be
39 left in the "on" level. Although the USB spec requires
40 devices to support suspend/resume, many of them do not.
41 In fact so many don't that by default, the USB core
42 initializes all non-hub devices in the "on" level. Some
43 drivers may change this setting when they are bound.
44
43What: /sys/bus/usb/devices/.../power/persist 45What: /sys/bus/usb/devices/.../power/persist
44Date: May 2007 46Date: May 2007
45KernelVersion: 2.6.23 47KernelVersion: 2.6.23
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
index 2aae06fcbed7..84a710f87c64 100644
--- a/Documentation/ABI/testing/sysfs-devices-system-cpu
+++ b/Documentation/ABI/testing/sysfs-devices-system-cpu
@@ -92,6 +92,20 @@ Description: Discover NUMA node a CPU belongs to
92 /sys/devices/system/cpu/cpu42/node2 -> ../../node/node2 92 /sys/devices/system/cpu/cpu42/node2 -> ../../node/node2
93 93
94 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
95What: /sys/devices/system/cpu/cpu#/topology/core_id 109What: /sys/devices/system/cpu/cpu#/topology/core_id
96 /sys/devices/system/cpu/cpu#/topology/core_siblings 110 /sys/devices/system/cpu/cpu#/topology/core_siblings
97 /sys/devices/system/cpu/cpu#/topology/core_siblings_list 111 /sys/devices/system/cpu/cpu#/topology/core_siblings_list
diff --git a/Documentation/ABI/testing/sysfs-memory-page-offline b/Documentation/ABI/testing/sysfs-memory-page-offline
new file mode 100644
index 000000000000..e14703f12fdf
--- /dev/null
+++ b/Documentation/ABI/testing/sysfs-memory-page-offline
@@ -0,0 +1,44 @@
1What: /sys/devices/system/memory/soft_offline_page
2Date: Sep 2009
3KernelVersion: 2.6.33
4Contact: andi@firstfloor.org
5Description:
6 Soft-offline the memory page containing the physical address
7 written into this file. Input is a hex number specifying the
8 physical address of the page. The kernel will then attempt
9 to soft-offline it, by moving the contents elsewhere or
10 dropping it if possible. The kernel will then be placed
11 on the bad page list and never be reused.
12
13 The offlining is done in kernel specific granuality.
14 Normally it's the base page size of the kernel, but
15 this might change.
16
17 The page must be still accessible, not poisoned. The
18 kernel will never kill anything for this, but rather
19 fail the offline. Return value is the size of the
20 number, or a error when the offlining failed. Reading
21 the file is not allowed.
22
23What: /sys/devices/system/memory/hard_offline_page
24Date: Sep 2009
25KernelVersion: 2.6.33
26Contact: andi@firstfloor.org
27Description:
28 Hard-offline the memory page containing the physical
29 address written into this file. Input is a hex number
30 specifying the physical address of the page. The
31 kernel will then attempt to hard-offline the page, by
32 trying to drop the page or killing any owner or
33 triggering IO errors if needed. Note this may kill
34 any processes owning the page. The kernel will avoid
35 to access this page assuming it's poisoned by the
36 hardware.
37
38 The offlining is done in kernel specific granuality.
39 Normally it's the base page size of the kernel, but
40 this might change.
41
42 Return value is the size of the number, or a error when
43 the offlining failed.
44 Reading the file is not allowed.
diff --git a/Documentation/Changes b/Documentation/Changes
index 6d0f1efc5bf6..f08b313cd235 100644
--- a/Documentation/Changes
+++ b/Documentation/Changes
@@ -49,6 +49,8 @@ o oprofile 0.9 # oprofiled --version
49o udev 081 # udevinfo -V 49o udev 081 # udevinfo -V
50o grub 0.93 # grub --version 50o grub 0.93 # grub --version
51o mcelog 0.6 51o mcelog 0.6
52o iptables 1.4.1 # iptables -V
53
52 54
53Kernel compilation 55Kernel compilation
54================== 56==================
diff --git a/Documentation/DocBook/Makefile b/Documentation/DocBook/Makefile
index ab8300f67182..325cfd1d6d99 100644
--- a/Documentation/DocBook/Makefile
+++ b/Documentation/DocBook/Makefile
@@ -8,7 +8,7 @@
8 8
9DOCBOOKS := z8530book.xml mcabook.xml device-drivers.xml \ 9DOCBOOKS := z8530book.xml mcabook.xml device-drivers.xml \
10 kernel-hacking.xml kernel-locking.xml deviceiobook.xml \ 10 kernel-hacking.xml kernel-locking.xml deviceiobook.xml \
11 procfs-guide.xml writing_usb_driver.xml networking.xml \ 11 writing_usb_driver.xml networking.xml \
12 kernel-api.xml filesystems.xml lsm.xml usb.xml kgdb.xml \ 12 kernel-api.xml filesystems.xml lsm.xml usb.xml kgdb.xml \
13 gadget.xml libata.xml mtdnand.xml librs.xml rapidio.xml \ 13 gadget.xml libata.xml mtdnand.xml librs.xml rapidio.xml \
14 genericirq.xml s390-drivers.xml uio-howto.xml scsi.xml \ 14 genericirq.xml s390-drivers.xml uio-howto.xml scsi.xml \
@@ -32,10 +32,10 @@ PS_METHOD = $(prefer-db2x)
32 32
33### 33###
34# The targets that may be used. 34# The targets that may be used.
35PHONY += xmldocs sgmldocs psdocs pdfdocs htmldocs mandocs installmandocs cleandocs media 35PHONY += xmldocs sgmldocs psdocs pdfdocs htmldocs mandocs installmandocs cleandocs xmldoclinks
36 36
37BOOKS := $(addprefix $(obj)/,$(DOCBOOKS)) 37BOOKS := $(addprefix $(obj)/,$(DOCBOOKS))
38xmldocs: $(BOOKS) 38xmldocs: $(BOOKS) xmldoclinks
39sgmldocs: xmldocs 39sgmldocs: xmldocs
40 40
41PS := $(patsubst %.xml, %.ps, $(BOOKS)) 41PS := $(patsubst %.xml, %.ps, $(BOOKS))
@@ -45,15 +45,24 @@ PDF := $(patsubst %.xml, %.pdf, $(BOOKS))
45pdfdocs: $(PDF) 45pdfdocs: $(PDF)
46 46
47HTML := $(sort $(patsubst %.xml, %.html, $(BOOKS))) 47HTML := $(sort $(patsubst %.xml, %.html, $(BOOKS)))
48htmldocs: media $(HTML) 48htmldocs: $(HTML)
49 $(call build_main_index) 49 $(call build_main_index)
50 $(call build_images)
50 51
51MAN := $(patsubst %.xml, %.9, $(BOOKS)) 52MAN := $(patsubst %.xml, %.9, $(BOOKS))
52mandocs: $(MAN) 53mandocs: $(MAN)
53 54
54media: 55build_images = mkdir -p $(objtree)/Documentation/DocBook/media/ && \
55 mkdir -p $(srctree)/Documentation/DocBook/media/ 56 cp $(srctree)/Documentation/DocBook/dvb/*.png $(srctree)/Documentation/DocBook/v4l/*.gif $(objtree)/Documentation/DocBook/media/
56 cp $(srctree)/Documentation/DocBook/dvb/*.png $(srctree)/Documentation/DocBook/v4l/*.gif $(srctree)/Documentation/DocBook/media/ 57
58xmldoclinks:
59ifneq ($(objtree),$(srctree))
60 for dep in dvb media-entities.tmpl media-indices.tmpl v4l; do \
61 rm -f $(objtree)/Documentation/DocBook/$$dep \
62 && ln -s $(srctree)/Documentation/DocBook/$$dep $(objtree)/Documentation/DocBook/ \
63 || exit; \
64 done
65endif
57 66
58installmandocs: mandocs 67installmandocs: mandocs
59 mkdir -p /usr/local/man/man9/ 68 mkdir -p /usr/local/man/man9/
@@ -65,7 +74,7 @@ KERNELDOC = $(srctree)/scripts/kernel-doc
65DOCPROC = $(objtree)/scripts/basic/docproc 74DOCPROC = $(objtree)/scripts/basic/docproc
66 75
67XMLTOFLAGS = -m $(srctree)/Documentation/DocBook/stylesheet.xsl 76XMLTOFLAGS = -m $(srctree)/Documentation/DocBook/stylesheet.xsl
68#XMLTOFLAGS += --skip-validation 77XMLTOFLAGS += --skip-validation
69 78
70### 79###
71# DOCPROC is used for two purposes: 80# DOCPROC is used for two purposes:
@@ -101,17 +110,6 @@ endif
101# Changes in kernel-doc force a rebuild of all documentation 110# Changes in kernel-doc force a rebuild of all documentation
102$(BOOKS): $(KERNELDOC) 111$(BOOKS): $(KERNELDOC)
103 112
104###
105# procfs guide uses a .c file as example code.
106# This requires an explicit dependency
107C-procfs-example = procfs_example.xml
108C-procfs-example2 = $(addprefix $(obj)/,$(C-procfs-example))
109$(obj)/procfs-guide.xml: $(C-procfs-example2)
110
111# List of programs to build
112##oops, this is a kernel module::hostprogs-y := procfs_example
113obj-m += procfs_example.o
114
115# Tell kbuild to always build the programs 113# Tell kbuild to always build the programs
116always := $(hostprogs-y) 114always := $(hostprogs-y)
117 115
@@ -238,7 +236,7 @@ clean-files := $(DOCBOOKS) \
238 $(patsubst %.xml, %.pdf, $(DOCBOOKS)) \ 236 $(patsubst %.xml, %.pdf, $(DOCBOOKS)) \
239 $(patsubst %.xml, %.html, $(DOCBOOKS)) \ 237 $(patsubst %.xml, %.html, $(DOCBOOKS)) \
240 $(patsubst %.xml, %.9, $(DOCBOOKS)) \ 238 $(patsubst %.xml, %.9, $(DOCBOOKS)) \
241 $(C-procfs-example) $(index) 239 $(index)
242 240
243clean-dirs := $(patsubst %.xml,%,$(DOCBOOKS)) man 241clean-dirs := $(patsubst %.xml,%,$(DOCBOOKS)) man
244 242
diff --git a/Documentation/DocBook/media-entities.tmpl b/Documentation/DocBook/media-entities.tmpl
index bb5ab741220e..c725cb852c54 100644
--- a/Documentation/DocBook/media-entities.tmpl
+++ b/Documentation/DocBook/media-entities.tmpl
@@ -23,6 +23,7 @@
23<!ENTITY VIDIOC-ENUMINPUT "<link linkend='vidioc-enuminput'><constant>VIDIOC_ENUMINPUT</constant></link>"> 23<!ENTITY VIDIOC-ENUMINPUT "<link linkend='vidioc-enuminput'><constant>VIDIOC_ENUMINPUT</constant></link>">
24<!ENTITY VIDIOC-ENUMOUTPUT "<link linkend='vidioc-enumoutput'><constant>VIDIOC_ENUMOUTPUT</constant></link>"> 24<!ENTITY VIDIOC-ENUMOUTPUT "<link linkend='vidioc-enumoutput'><constant>VIDIOC_ENUMOUTPUT</constant></link>">
25<!ENTITY VIDIOC-ENUMSTD "<link linkend='vidioc-enumstd'><constant>VIDIOC_ENUMSTD</constant></link>"> 25<!ENTITY VIDIOC-ENUMSTD "<link linkend='vidioc-enumstd'><constant>VIDIOC_ENUMSTD</constant></link>">
26<!ENTITY VIDIOC-ENUM-DV-PRESETS "<link linkend='vidioc-enum-dv-presets'><constant>VIDIOC_ENUM_DV_PRESETS</constant></link>">
26<!ENTITY VIDIOC-ENUM-FMT "<link linkend='vidioc-enum-fmt'><constant>VIDIOC_ENUM_FMT</constant></link>"> 27<!ENTITY VIDIOC-ENUM-FMT "<link linkend='vidioc-enum-fmt'><constant>VIDIOC_ENUM_FMT</constant></link>">
27<!ENTITY VIDIOC-ENUM-FRAMEINTERVALS "<link linkend='vidioc-enum-frameintervals'><constant>VIDIOC_ENUM_FRAMEINTERVALS</constant></link>"> 28<!ENTITY VIDIOC-ENUM-FRAMEINTERVALS "<link linkend='vidioc-enum-frameintervals'><constant>VIDIOC_ENUM_FRAMEINTERVALS</constant></link>">
28<!ENTITY VIDIOC-ENUM-FRAMESIZES "<link linkend='vidioc-enum-framesizes'><constant>VIDIOC_ENUM_FRAMESIZES</constant></link>"> 29<!ENTITY VIDIOC-ENUM-FRAMESIZES "<link linkend='vidioc-enum-framesizes'><constant>VIDIOC_ENUM_FRAMESIZES</constant></link>">
@@ -30,6 +31,8 @@
30<!ENTITY VIDIOC-G-AUDOUT "<link linkend='vidioc-g-audioout'><constant>VIDIOC_G_AUDOUT</constant></link>"> 31<!ENTITY VIDIOC-G-AUDOUT "<link linkend='vidioc-g-audioout'><constant>VIDIOC_G_AUDOUT</constant></link>">
31<!ENTITY VIDIOC-G-CROP "<link linkend='vidioc-g-crop'><constant>VIDIOC_G_CROP</constant></link>"> 32<!ENTITY VIDIOC-G-CROP "<link linkend='vidioc-g-crop'><constant>VIDIOC_G_CROP</constant></link>">
32<!ENTITY VIDIOC-G-CTRL "<link linkend='vidioc-g-ctrl'><constant>VIDIOC_G_CTRL</constant></link>"> 33<!ENTITY VIDIOC-G-CTRL "<link linkend='vidioc-g-ctrl'><constant>VIDIOC_G_CTRL</constant></link>">
34<!ENTITY VIDIOC-G-DV-PRESET "<link linkend='vidioc-g-dv-preset'><constant>VIDIOC_G_DV_PRESET</constant></link>">
35<!ENTITY VIDIOC-G-DV-TIMINGS "<link linkend='vidioc-g-dv-timings'><constant>VIDIOC_G_DV_TIMINGS</constant></link>">
33<!ENTITY VIDIOC-G-ENC-INDEX "<link linkend='vidioc-g-enc-index'><constant>VIDIOC_G_ENC_INDEX</constant></link>"> 36<!ENTITY VIDIOC-G-ENC-INDEX "<link linkend='vidioc-g-enc-index'><constant>VIDIOC_G_ENC_INDEX</constant></link>">
34<!ENTITY VIDIOC-G-EXT-CTRLS "<link linkend='vidioc-g-ext-ctrls'><constant>VIDIOC_G_EXT_CTRLS</constant></link>"> 37<!ENTITY VIDIOC-G-EXT-CTRLS "<link linkend='vidioc-g-ext-ctrls'><constant>VIDIOC_G_EXT_CTRLS</constant></link>">
35<!ENTITY VIDIOC-G-FBUF "<link linkend='vidioc-g-fbuf'><constant>VIDIOC_G_FBUF</constant></link>"> 38<!ENTITY VIDIOC-G-FBUF "<link linkend='vidioc-g-fbuf'><constant>VIDIOC_G_FBUF</constant></link>">
@@ -53,6 +56,7 @@
53<!ENTITY VIDIOC-QUERYCTRL "<link linkend='vidioc-queryctrl'><constant>VIDIOC_QUERYCTRL</constant></link>"> 56<!ENTITY VIDIOC-QUERYCTRL "<link linkend='vidioc-queryctrl'><constant>VIDIOC_QUERYCTRL</constant></link>">
54<!ENTITY VIDIOC-QUERYMENU "<link linkend='vidioc-queryctrl'><constant>VIDIOC_QUERYMENU</constant></link>"> 57<!ENTITY VIDIOC-QUERYMENU "<link linkend='vidioc-queryctrl'><constant>VIDIOC_QUERYMENU</constant></link>">
55<!ENTITY VIDIOC-QUERYSTD "<link linkend='vidioc-querystd'><constant>VIDIOC_QUERYSTD</constant></link>"> 58<!ENTITY VIDIOC-QUERYSTD "<link linkend='vidioc-querystd'><constant>VIDIOC_QUERYSTD</constant></link>">
59<!ENTITY VIDIOC-QUERY-DV-PRESET "<link linkend='vidioc-query-dv-preset'><constant>VIDIOC_QUERY_DV_PRESET</constant></link>">
56<!ENTITY VIDIOC-REQBUFS "<link linkend='vidioc-reqbufs'><constant>VIDIOC_REQBUFS</constant></link>"> 60<!ENTITY VIDIOC-REQBUFS "<link linkend='vidioc-reqbufs'><constant>VIDIOC_REQBUFS</constant></link>">
57<!ENTITY VIDIOC-STREAMOFF "<link linkend='vidioc-streamon'><constant>VIDIOC_STREAMOFF</constant></link>"> 61<!ENTITY VIDIOC-STREAMOFF "<link linkend='vidioc-streamon'><constant>VIDIOC_STREAMOFF</constant></link>">
58<!ENTITY VIDIOC-STREAMON "<link linkend='vidioc-streamon'><constant>VIDIOC_STREAMON</constant></link>"> 62<!ENTITY VIDIOC-STREAMON "<link linkend='vidioc-streamon'><constant>VIDIOC_STREAMON</constant></link>">
@@ -60,6 +64,8 @@
60<!ENTITY VIDIOC-S-AUDOUT "<link linkend='vidioc-g-audioout'><constant>VIDIOC_S_AUDOUT</constant></link>"> 64<!ENTITY VIDIOC-S-AUDOUT "<link linkend='vidioc-g-audioout'><constant>VIDIOC_S_AUDOUT</constant></link>">
61<!ENTITY VIDIOC-S-CROP "<link linkend='vidioc-g-crop'><constant>VIDIOC_S_CROP</constant></link>"> 65<!ENTITY VIDIOC-S-CROP "<link linkend='vidioc-g-crop'><constant>VIDIOC_S_CROP</constant></link>">
62<!ENTITY VIDIOC-S-CTRL "<link linkend='vidioc-g-ctrl'><constant>VIDIOC_S_CTRL</constant></link>"> 66<!ENTITY VIDIOC-S-CTRL "<link linkend='vidioc-g-ctrl'><constant>VIDIOC_S_CTRL</constant></link>">
67<!ENTITY VIDIOC-S-DV-PRESET "<link linkend='vidioc-g-dv-preset'><constant>VIDIOC_S_DV_PRESET</constant></link>">
68<!ENTITY VIDIOC-S-DV-TIMINGS "<link linkend='vidioc-g-dv-timings'><constant>VIDIOC_S_DV_TIMINGS</constant></link>">
63<!ENTITY VIDIOC-S-EXT-CTRLS "<link linkend='vidioc-g-ext-ctrls'><constant>VIDIOC_S_EXT_CTRLS</constant></link>"> 69<!ENTITY VIDIOC-S-EXT-CTRLS "<link linkend='vidioc-g-ext-ctrls'><constant>VIDIOC_S_EXT_CTRLS</constant></link>">
64<!ENTITY VIDIOC-S-FBUF "<link linkend='vidioc-g-fbuf'><constant>VIDIOC_S_FBUF</constant></link>"> 70<!ENTITY VIDIOC-S-FBUF "<link linkend='vidioc-g-fbuf'><constant>VIDIOC_S_FBUF</constant></link>">
65<!ENTITY VIDIOC-S-FMT "<link linkend='vidioc-g-fmt'><constant>VIDIOC_S_FMT</constant></link>"> 71<!ENTITY VIDIOC-S-FMT "<link linkend='vidioc-g-fmt'><constant>VIDIOC_S_FMT</constant></link>">
@@ -118,6 +124,7 @@
118<!-- Structures --> 124<!-- Structures -->
119<!ENTITY v4l2-audio "struct&nbsp;<link linkend='v4l2-audio'>v4l2_audio</link>"> 125<!ENTITY v4l2-audio "struct&nbsp;<link linkend='v4l2-audio'>v4l2_audio</link>">
120<!ENTITY v4l2-audioout "struct&nbsp;<link linkend='v4l2-audioout'>v4l2_audioout</link>"> 126<!ENTITY v4l2-audioout "struct&nbsp;<link linkend='v4l2-audioout'>v4l2_audioout</link>">
127<!ENTITY v4l2-bt-timings "struct&nbsp;<link linkend='v4l2-bt-timings'>v4l2_bt_timings</link>">
121<!ENTITY v4l2-buffer "struct&nbsp;<link linkend='v4l2-buffer'>v4l2_buffer</link>"> 128<!ENTITY v4l2-buffer "struct&nbsp;<link linkend='v4l2-buffer'>v4l2_buffer</link>">
122<!ENTITY v4l2-capability "struct&nbsp;<link linkend='v4l2-capability'>v4l2_capability</link>"> 129<!ENTITY v4l2-capability "struct&nbsp;<link linkend='v4l2-capability'>v4l2_capability</link>">
123<!ENTITY v4l2-captureparm "struct&nbsp;<link linkend='v4l2-captureparm'>v4l2_captureparm</link>"> 130<!ENTITY v4l2-captureparm "struct&nbsp;<link linkend='v4l2-captureparm'>v4l2_captureparm</link>">
@@ -128,6 +135,9 @@
128<!ENTITY v4l2-dbg-chip-ident "struct&nbsp;<link linkend='v4l2-dbg-chip-ident'>v4l2_dbg_chip_ident</link>"> 135<!ENTITY v4l2-dbg-chip-ident "struct&nbsp;<link linkend='v4l2-dbg-chip-ident'>v4l2_dbg_chip_ident</link>">
129<!ENTITY v4l2-dbg-match "struct&nbsp;<link linkend='v4l2-dbg-match'>v4l2_dbg_match</link>"> 136<!ENTITY v4l2-dbg-match "struct&nbsp;<link linkend='v4l2-dbg-match'>v4l2_dbg_match</link>">
130<!ENTITY v4l2-dbg-register "struct&nbsp;<link linkend='v4l2-dbg-register'>v4l2_dbg_register</link>"> 137<!ENTITY v4l2-dbg-register "struct&nbsp;<link linkend='v4l2-dbg-register'>v4l2_dbg_register</link>">
138<!ENTITY v4l2-dv-enum-preset "struct&nbsp;<link linkend='v4l2-dv-enum-preset'>v4l2_dv_enum_preset</link>">
139<!ENTITY v4l2-dv-preset "struct&nbsp;<link linkend='v4l2-dv-preset'>v4l2_dv_preset</link>">
140<!ENTITY v4l2-dv-timings "struct&nbsp;<link linkend='v4l2-dv-timings'>v4l2_dv_timings</link>">
131<!ENTITY v4l2-enc-idx "struct&nbsp;<link linkend='v4l2-enc-idx'>v4l2_enc_idx</link>"> 141<!ENTITY v4l2-enc-idx "struct&nbsp;<link linkend='v4l2-enc-idx'>v4l2_enc_idx</link>">
132<!ENTITY v4l2-enc-idx-entry "struct&nbsp;<link linkend='v4l2-enc-idx-entry'>v4l2_enc_idx_entry</link>"> 142<!ENTITY v4l2-enc-idx-entry "struct&nbsp;<link linkend='v4l2-enc-idx-entry'>v4l2_enc_idx_entry</link>">
133<!ENTITY v4l2-encoder-cmd "struct&nbsp;<link linkend='v4l2-encoder-cmd'>v4l2_encoder_cmd</link>"> 143<!ENTITY v4l2-encoder-cmd "struct&nbsp;<link linkend='v4l2-encoder-cmd'>v4l2_encoder_cmd</link>">
@@ -243,6 +253,10 @@
243<!ENTITY sub-enumaudioout SYSTEM "v4l/vidioc-enumaudioout.xml"> 253<!ENTITY sub-enumaudioout SYSTEM "v4l/vidioc-enumaudioout.xml">
244<!ENTITY sub-enuminput SYSTEM "v4l/vidioc-enuminput.xml"> 254<!ENTITY sub-enuminput SYSTEM "v4l/vidioc-enuminput.xml">
245<!ENTITY sub-enumoutput SYSTEM "v4l/vidioc-enumoutput.xml"> 255<!ENTITY sub-enumoutput SYSTEM "v4l/vidioc-enumoutput.xml">
256<!ENTITY sub-enum-dv-presets SYSTEM "v4l/vidioc-enum-dv-presets.xml">
257<!ENTITY sub-g-dv-preset SYSTEM "v4l/vidioc-g-dv-preset.xml">
258<!ENTITY sub-query-dv-preset SYSTEM "v4l/vidioc-query-dv-preset.xml">
259<!ENTITY sub-g-dv-timings SYSTEM "v4l/vidioc-g-dv-timings.xml">
246<!ENTITY sub-enumstd SYSTEM "v4l/vidioc-enumstd.xml"> 260<!ENTITY sub-enumstd SYSTEM "v4l/vidioc-enumstd.xml">
247<!ENTITY sub-g-audio SYSTEM "v4l/vidioc-g-audio.xml"> 261<!ENTITY sub-g-audio SYSTEM "v4l/vidioc-g-audio.xml">
248<!ENTITY sub-g-audioout SYSTEM "v4l/vidioc-g-audioout.xml"> 262<!ENTITY sub-g-audioout SYSTEM "v4l/vidioc-g-audioout.xml">
@@ -333,6 +347,10 @@
333<!ENTITY enumaudioout SYSTEM "v4l/vidioc-enumaudioout.xml"> 347<!ENTITY enumaudioout SYSTEM "v4l/vidioc-enumaudioout.xml">
334<!ENTITY enuminput SYSTEM "v4l/vidioc-enuminput.xml"> 348<!ENTITY enuminput SYSTEM "v4l/vidioc-enuminput.xml">
335<!ENTITY enumoutput SYSTEM "v4l/vidioc-enumoutput.xml"> 349<!ENTITY enumoutput SYSTEM "v4l/vidioc-enumoutput.xml">
350<!ENTITY enum-dv-presets SYSTEM "v4l/vidioc-enum-dv-presets.xml">
351<!ENTITY g-dv-preset SYSTEM "v4l/vidioc-g-dv-preset.xml">
352<!ENTITY query-dv-preset SYSTEM "v4l/vidioc-query-dv-preset.xml">
353<!ENTITY g-dv-timings SYSTEM "v4l/vidioc-g-dv-timings.xml">
336<!ENTITY enumstd SYSTEM "v4l/vidioc-enumstd.xml"> 354<!ENTITY enumstd SYSTEM "v4l/vidioc-enumstd.xml">
337<!ENTITY g-audio SYSTEM "v4l/vidioc-g-audio.xml"> 355<!ENTITY g-audio SYSTEM "v4l/vidioc-g-audio.xml">
338<!ENTITY g-audioout SYSTEM "v4l/vidioc-g-audioout.xml"> 356<!ENTITY g-audioout SYSTEM "v4l/vidioc-g-audioout.xml">
diff --git a/Documentation/DocBook/media-indices.tmpl b/Documentation/DocBook/media-indices.tmpl
index 9e30a236d74f..78d6031de001 100644
--- a/Documentation/DocBook/media-indices.tmpl
+++ b/Documentation/DocBook/media-indices.tmpl
@@ -36,6 +36,7 @@
36<indexentry><primaryie>enum&nbsp;<link linkend='v4l2-preemphasis'>v4l2_preemphasis</link></primaryie></indexentry> 36<indexentry><primaryie>enum&nbsp;<link linkend='v4l2-preemphasis'>v4l2_preemphasis</link></primaryie></indexentry>
37<indexentry><primaryie>struct&nbsp;<link linkend='v4l2-audio'>v4l2_audio</link></primaryie></indexentry> 37<indexentry><primaryie>struct&nbsp;<link linkend='v4l2-audio'>v4l2_audio</link></primaryie></indexentry>
38<indexentry><primaryie>struct&nbsp;<link linkend='v4l2-audioout'>v4l2_audioout</link></primaryie></indexentry> 38<indexentry><primaryie>struct&nbsp;<link linkend='v4l2-audioout'>v4l2_audioout</link></primaryie></indexentry>
39<indexentry><primaryie>struct&nbsp;<link linkend='v4l2-bt-timings'>v4l2_bt_timings</link></primaryie></indexentry>
39<indexentry><primaryie>struct&nbsp;<link linkend='v4l2-buffer'>v4l2_buffer</link></primaryie></indexentry> 40<indexentry><primaryie>struct&nbsp;<link linkend='v4l2-buffer'>v4l2_buffer</link></primaryie></indexentry>
40<indexentry><primaryie>struct&nbsp;<link linkend='v4l2-capability'>v4l2_capability</link></primaryie></indexentry> 41<indexentry><primaryie>struct&nbsp;<link linkend='v4l2-capability'>v4l2_capability</link></primaryie></indexentry>
41<indexentry><primaryie>struct&nbsp;<link linkend='v4l2-captureparm'>v4l2_captureparm</link></primaryie></indexentry> 42<indexentry><primaryie>struct&nbsp;<link linkend='v4l2-captureparm'>v4l2_captureparm</link></primaryie></indexentry>
@@ -46,6 +47,9 @@
46<indexentry><primaryie>struct&nbsp;<link linkend='v4l2-dbg-chip-ident'>v4l2_dbg_chip_ident</link></primaryie></indexentry> 47<indexentry><primaryie>struct&nbsp;<link linkend='v4l2-dbg-chip-ident'>v4l2_dbg_chip_ident</link></primaryie></indexentry>
47<indexentry><primaryie>struct&nbsp;<link linkend='v4l2-dbg-match'>v4l2_dbg_match</link></primaryie></indexentry> 48<indexentry><primaryie>struct&nbsp;<link linkend='v4l2-dbg-match'>v4l2_dbg_match</link></primaryie></indexentry>
48<indexentry><primaryie>struct&nbsp;<link linkend='v4l2-dbg-register'>v4l2_dbg_register</link></primaryie></indexentry> 49<indexentry><primaryie>struct&nbsp;<link linkend='v4l2-dbg-register'>v4l2_dbg_register</link></primaryie></indexentry>
50<indexentry><primaryie>struct&nbsp;<link linkend='v4l2-dv-enum-preset'>v4l2_dv_enum_preset</link></primaryie></indexentry>
51<indexentry><primaryie>struct&nbsp;<link linkend='v4l2-dv-preset'>v4l2_dv_preset</link></primaryie></indexentry>
52<indexentry><primaryie>struct&nbsp;<link linkend='v4l2-dv-timings'>v4l2_dv_timings</link></primaryie></indexentry>
49<indexentry><primaryie>struct&nbsp;<link linkend='v4l2-enc-idx'>v4l2_enc_idx</link></primaryie></indexentry> 53<indexentry><primaryie>struct&nbsp;<link linkend='v4l2-enc-idx'>v4l2_enc_idx</link></primaryie></indexentry>
50<indexentry><primaryie>struct&nbsp;<link linkend='v4l2-enc-idx-entry'>v4l2_enc_idx_entry</link></primaryie></indexentry> 54<indexentry><primaryie>struct&nbsp;<link linkend='v4l2-enc-idx-entry'>v4l2_enc_idx_entry</link></primaryie></indexentry>
51<indexentry><primaryie>struct&nbsp;<link linkend='v4l2-encoder-cmd'>v4l2_encoder_cmd</link></primaryie></indexentry> 55<indexentry><primaryie>struct&nbsp;<link linkend='v4l2-encoder-cmd'>v4l2_encoder_cmd</link></primaryie></indexentry>
diff --git a/Documentation/DocBook/mtdnand.tmpl b/Documentation/DocBook/mtdnand.tmpl
index f508a8a27fea..5e7d84b48505 100644
--- a/Documentation/DocBook/mtdnand.tmpl
+++ b/Documentation/DocBook/mtdnand.tmpl
@@ -174,7 +174,7 @@
174 </para> 174 </para>
175 <programlisting> 175 <programlisting>
176static struct mtd_info *board_mtd; 176static struct mtd_info *board_mtd;
177static unsigned long baseaddr; 177static void __iomem *baseaddr;
178 </programlisting> 178 </programlisting>
179 <para> 179 <para>
180 Static example 180 Static example
@@ -182,7 +182,7 @@ static unsigned long baseaddr;
182 <programlisting> 182 <programlisting>
183static struct mtd_info board_mtd; 183static struct mtd_info board_mtd;
184static struct nand_chip board_chip; 184static struct nand_chip board_chip;
185static unsigned long baseaddr; 185static void __iomem *baseaddr;
186 </programlisting> 186 </programlisting>
187 </sect1> 187 </sect1>
188 <sect1 id="Partition_defines"> 188 <sect1 id="Partition_defines">
@@ -283,8 +283,8 @@ int __init board_init (void)
283 } 283 }
284 284
285 /* map physical address */ 285 /* map physical address */
286 baseaddr = (unsigned long)ioremap(CHIP_PHYSICAL_ADDRESS, 1024); 286 baseaddr = ioremap(CHIP_PHYSICAL_ADDRESS, 1024);
287 if(!baseaddr){ 287 if (!baseaddr) {
288 printk("Ioremap to access NAND chip failed\n"); 288 printk("Ioremap to access NAND chip failed\n");
289 err = -EIO; 289 err = -EIO;
290 goto out_mtd; 290 goto out_mtd;
@@ -316,7 +316,7 @@ int __init board_init (void)
316 goto out; 316 goto out;
317 317
318out_ior: 318out_ior:
319 iounmap((void *)baseaddr); 319 iounmap(baseaddr);
320out_mtd: 320out_mtd:
321 kfree (board_mtd); 321 kfree (board_mtd);
322out: 322out:
@@ -341,7 +341,7 @@ static void __exit board_cleanup (void)
341 nand_release (board_mtd); 341 nand_release (board_mtd);
342 342
343 /* unmap physical address */ 343 /* unmap physical address */
344 iounmap((void *)baseaddr); 344 iounmap(baseaddr);
345 345
346 /* Free the MTD device structure */ 346 /* Free the MTD device structure */
347 kfree (board_mtd); 347 kfree (board_mtd);
diff --git a/Documentation/DocBook/procfs-guide.tmpl b/Documentation/DocBook/procfs-guide.tmpl
deleted file mode 100644
index 9eba4b7af73d..000000000000
--- a/Documentation/DocBook/procfs-guide.tmpl
+++ /dev/null
@@ -1,626 +0,0 @@
1<?xml version="1.0" encoding="UTF-8"?>
2<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
3 "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd" [
4<!ENTITY procfsexample SYSTEM "procfs_example.xml">
5]>
6
7<book id="LKProcfsGuide">
8 <bookinfo>
9 <title>Linux Kernel Procfs Guide</title>
10
11 <authorgroup>
12 <author>
13 <firstname>Erik</firstname>
14 <othername>(J.A.K.)</othername>
15 <surname>Mouw</surname>
16 <affiliation>
17 <address>
18 <email>mouw@nl.linux.org</email>
19 </address>
20 </affiliation>
21 </author>
22 <othercredit>
23 <contrib>
24 This software and documentation were written while working on the
25 LART computing board
26 (<ulink url="http://www.lartmaker.nl/">http://www.lartmaker.nl/</ulink>),
27 which was sponsored by the Delt University of Technology projects
28 Mobile Multi-media Communications and Ubiquitous Communications.
29 </contrib>
30 </othercredit>
31 </authorgroup>
32
33 <revhistory>
34 <revision>
35 <revnumber>1.0</revnumber>
36 <date>May 30, 2001</date>
37 <revremark>Initial revision posted to linux-kernel</revremark>
38 </revision>
39 <revision>
40 <revnumber>1.1</revnumber>
41 <date>June 3, 2001</date>
42 <revremark>Revised after comments from linux-kernel</revremark>
43 </revision>
44 </revhistory>
45
46 <copyright>
47 <year>2001</year>
48 <holder>Erik Mouw</holder>
49 </copyright>
50
51
52 <legalnotice>
53 <para>
54 This documentation is free software; you can redistribute it
55 and/or modify it under the terms of the GNU General Public
56 License as published by the Free Software Foundation; either
57 version 2 of the License, or (at your option) any later
58 version.
59 </para>
60
61 <para>
62 This documentation is distributed in the hope that it will be
63 useful, but WITHOUT ANY WARRANTY; without even the implied
64 warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
65 PURPOSE. See the GNU General Public License for more details.
66 </para>
67
68 <para>
69 You should have received a copy of the GNU General Public
70 License along with this program; if not, write to the Free
71 Software Foundation, Inc., 59 Temple Place, Suite 330, Boston,
72 MA 02111-1307 USA
73 </para>
74
75 <para>
76 For more details see the file COPYING in the source
77 distribution of Linux.
78 </para>
79 </legalnotice>
80 </bookinfo>
81
82
83
84
85 <toc>
86 </toc>
87
88
89
90
91 <preface id="Preface">
92 <title>Preface</title>
93
94 <para>
95 This guide describes the use of the procfs file system from
96 within the Linux kernel. The idea to write this guide came up on
97 the #kernelnewbies IRC channel (see <ulink
98 url="http://www.kernelnewbies.org/">http://www.kernelnewbies.org/</ulink>),
99 when Jeff Garzik explained the use of procfs and forwarded me a
100 message Alexander Viro wrote to the linux-kernel mailing list. I
101 agreed to write it up nicely, so here it is.
102 </para>
103
104 <para>
105 I'd like to thank Jeff Garzik
106 <email>jgarzik@pobox.com</email> and Alexander Viro
107 <email>viro@parcelfarce.linux.theplanet.co.uk</email> for their input,
108 Tim Waugh <email>twaugh@redhat.com</email> for his <ulink
109 url="http://people.redhat.com/twaugh/docbook/selfdocbook/">Selfdocbook</ulink>,
110 and Marc Joosen <email>marcj@historia.et.tudelft.nl</email> for
111 proofreading.
112 </para>
113
114 <para>
115 Erik
116 </para>
117 </preface>
118
119
120
121
122 <chapter id="intro">
123 <title>Introduction</title>
124
125 <para>
126 The <filename class="directory">/proc</filename> file system
127 (procfs) is a special file system in the linux kernel. It's a
128 virtual file system: it is not associated with a block device
129 but exists only in memory. The files in the procfs are there to
130 allow userland programs access to certain information from the
131 kernel (like process information in <filename
132 class="directory">/proc/[0-9]+/</filename>), but also for debug
133 purposes (like <filename>/proc/ksyms</filename>).
134 </para>
135
136 <para>
137 This guide describes the use of the procfs file system from
138 within the Linux kernel. It starts by introducing all relevant
139 functions to manage the files within the file system. After that
140 it shows how to communicate with userland, and some tips and
141 tricks will be pointed out. Finally a complete example will be
142 shown.
143 </para>
144
145 <para>
146 Note that the files in <filename
147 class="directory">/proc/sys</filename> are sysctl files: they
148 don't belong to procfs and are governed by a completely
149 different API described in the Kernel API book.
150 </para>
151 </chapter>
152
153
154
155
156 <chapter id="managing">
157 <title>Managing procfs entries</title>
158
159 <para>
160 This chapter describes the functions that various kernel
161 components use to populate the procfs with files, symlinks,
162 device nodes, and directories.
163 </para>
164
165 <para>
166 A minor note before we start: if you want to use any of the
167 procfs functions, be sure to include the correct header file!
168 This should be one of the first lines in your code:
169 </para>
170
171 <programlisting>
172#include &lt;linux/proc_fs.h&gt;
173 </programlisting>
174
175
176
177
178 <sect1 id="regularfile">
179 <title>Creating a regular file</title>
180
181 <funcsynopsis>
182 <funcprototype>
183 <funcdef>struct proc_dir_entry* <function>create_proc_entry</function></funcdef>
184 <paramdef>const char* <parameter>name</parameter></paramdef>
185 <paramdef>mode_t <parameter>mode</parameter></paramdef>
186 <paramdef>struct proc_dir_entry* <parameter>parent</parameter></paramdef>
187 </funcprototype>
188 </funcsynopsis>
189
190 <para>
191 This function creates a regular file with the name
192 <parameter>name</parameter>, file mode
193 <parameter>mode</parameter> in the directory
194 <parameter>parent</parameter>. To create a file in the root of
195 the procfs, use <constant>NULL</constant> as
196 <parameter>parent</parameter> parameter. When successful, the
197 function will return a pointer to the freshly created
198 <structname>struct proc_dir_entry</structname>; otherwise it
199 will return <constant>NULL</constant>. <xref
200 linkend="userland"/> describes how to do something useful with
201 regular files.
202 </para>
203
204 <para>
205 Note that it is specifically supported that you can pass a
206 path that spans multiple directories. For example
207 <function>create_proc_entry</function>(<parameter>"drivers/via0/info"</parameter>)
208 will create the <filename class="directory">via0</filename>
209 directory if necessary, with standard
210 <constant>0755</constant> permissions.
211 </para>
212
213 <para>
214 If you only want to be able to read the file, the function
215 <function>create_proc_read_entry</function> described in <xref
216 linkend="convenience"/> may be used to create and initialise
217 the procfs entry in one single call.
218 </para>
219 </sect1>
220
221
222
223
224 <sect1 id="Creating_a_symlink">
225 <title>Creating a symlink</title>
226
227 <funcsynopsis>
228 <funcprototype>
229 <funcdef>struct proc_dir_entry*
230 <function>proc_symlink</function></funcdef> <paramdef>const
231 char* <parameter>name</parameter></paramdef>
232 <paramdef>struct proc_dir_entry*
233 <parameter>parent</parameter></paramdef> <paramdef>const
234 char* <parameter>dest</parameter></paramdef>
235 </funcprototype>
236 </funcsynopsis>
237
238 <para>
239 This creates a symlink in the procfs directory
240 <parameter>parent</parameter> that points from
241 <parameter>name</parameter> to
242 <parameter>dest</parameter>. This translates in userland to
243 <literal>ln -s</literal> <parameter>dest</parameter>
244 <parameter>name</parameter>.
245 </para>
246 </sect1>
247
248 <sect1 id="Creating_a_directory">
249 <title>Creating a directory</title>
250
251 <funcsynopsis>
252 <funcprototype>
253 <funcdef>struct proc_dir_entry* <function>proc_mkdir</function></funcdef>
254 <paramdef>const char* <parameter>name</parameter></paramdef>
255 <paramdef>struct proc_dir_entry* <parameter>parent</parameter></paramdef>
256 </funcprototype>
257 </funcsynopsis>
258
259 <para>
260 Create a directory <parameter>name</parameter> in the procfs
261 directory <parameter>parent</parameter>.
262 </para>
263 </sect1>
264
265
266
267
268 <sect1 id="Removing_an_entry">
269 <title>Removing an entry</title>
270
271 <funcsynopsis>
272 <funcprototype>
273 <funcdef>void <function>remove_proc_entry</function></funcdef>
274 <paramdef>const char* <parameter>name</parameter></paramdef>
275 <paramdef>struct proc_dir_entry* <parameter>parent</parameter></paramdef>
276 </funcprototype>
277 </funcsynopsis>
278
279 <para>
280 Removes the entry <parameter>name</parameter> in the directory
281 <parameter>parent</parameter> from the procfs. Entries are
282 removed by their <emphasis>name</emphasis>, not by the
283 <structname>struct proc_dir_entry</structname> returned by the
284 various create functions. Note that this function doesn't
285 recursively remove entries.
286 </para>
287
288 <para>
289 Be sure to free the <structfield>data</structfield> entry from
290 the <structname>struct proc_dir_entry</structname> before
291 <function>remove_proc_entry</function> is called (that is: if
292 there was some <structfield>data</structfield> allocated, of
293 course). See <xref linkend="usingdata"/> for more information
294 on using the <structfield>data</structfield> entry.
295 </para>
296 </sect1>
297 </chapter>
298
299
300
301
302 <chapter id="userland">
303 <title>Communicating with userland</title>
304
305 <para>
306 Instead of reading (or writing) information directly from
307 kernel memory, procfs works with <emphasis>call back
308 functions</emphasis> for files: functions that are called when
309 a specific file is being read or written. Such functions have
310 to be initialised after the procfs file is created by setting
311 the <structfield>read_proc</structfield> and/or
312 <structfield>write_proc</structfield> fields in the
313 <structname>struct proc_dir_entry*</structname> that the
314 function <function>create_proc_entry</function> returned:
315 </para>
316
317 <programlisting>
318struct proc_dir_entry* entry;
319
320entry->read_proc = read_proc_foo;
321entry->write_proc = write_proc_foo;
322 </programlisting>
323
324 <para>
325 If you only want to use a the
326 <structfield>read_proc</structfield>, the function
327 <function>create_proc_read_entry</function> described in <xref
328 linkend="convenience"/> may be used to create and initialise the
329 procfs entry in one single call.
330 </para>
331
332
333
334 <sect1 id="Reading_data">
335 <title>Reading data</title>
336
337 <para>
338 The read function is a call back function that allows userland
339 processes to read data from the kernel. The read function
340 should have the following format:
341 </para>
342
343 <funcsynopsis>
344 <funcprototype>
345 <funcdef>int <function>read_func</function></funcdef>
346 <paramdef>char* <parameter>buffer</parameter></paramdef>
347 <paramdef>char** <parameter>start</parameter></paramdef>
348 <paramdef>off_t <parameter>off</parameter></paramdef>
349 <paramdef>int <parameter>count</parameter></paramdef>
350 <paramdef>int* <parameter>peof</parameter></paramdef>
351 <paramdef>void* <parameter>data</parameter></paramdef>
352 </funcprototype>
353 </funcsynopsis>
354
355 <para>
356 The read function should write its information into the
357 <parameter>buffer</parameter>, which will be exactly
358 <literal>PAGE_SIZE</literal> bytes long.
359 </para>
360
361 <para>
362 The parameter
363 <parameter>peof</parameter> should be used to signal that the
364 end of the file has been reached by writing
365 <literal>1</literal> to the memory location
366 <parameter>peof</parameter> points to.
367 </para>
368
369 <para>
370 The <parameter>data</parameter>
371 parameter can be used to create a single call back function for
372 several files, see <xref linkend="usingdata"/>.
373 </para>
374
375 <para>
376 The rest of the parameters and the return value are described
377 by a comment in <filename>fs/proc/generic.c</filename> as follows:
378 </para>
379
380 <blockquote>
381 <para>
382 You have three ways to return data:
383 </para>
384 <orderedlist>
385 <listitem>
386 <para>
387 Leave <literal>*start = NULL</literal>. (This is the default.)
388 Put the data of the requested offset at that
389 offset within the buffer. Return the number (<literal>n</literal>)
390 of bytes there are from the beginning of the
391 buffer up to the last byte of data. If the
392 number of supplied bytes (<literal>= n - offset</literal>) is
393 greater than zero and you didn't signal eof
394 and the reader is prepared to take more data
395 you will be called again with the requested
396 offset advanced by the number of bytes
397 absorbed. This interface is useful for files
398 no larger than the buffer.
399 </para>
400 </listitem>
401 <listitem>
402 <para>
403 Set <literal>*start</literal> to an unsigned long value less than
404 the buffer address but greater than zero.
405 Put the data of the requested offset at the
406 beginning of the buffer. Return the number of
407 bytes of data placed there. If this number is
408 greater than zero and you didn't signal eof
409 and the reader is prepared to take more data
410 you will be called again with the requested
411 offset advanced by <literal>*start</literal>. This interface is
412 useful when you have a large file consisting
413 of a series of blocks which you want to count
414 and return as wholes.
415 (Hack by Paul.Russell@rustcorp.com.au)
416 </para>
417 </listitem>
418 <listitem>
419 <para>
420 Set <literal>*start</literal> to an address within the buffer.
421 Put the data of the requested offset at <literal>*start</literal>.
422 Return the number of bytes of data placed there.
423 If this number is greater than zero and you
424 didn't signal eof and the reader is prepared to
425 take more data you will be called again with the
426 requested offset advanced by the number of bytes
427 absorbed.
428 </para>
429 </listitem>
430 </orderedlist>
431 </blockquote>
432
433 <para>
434 <xref linkend="example"/> shows how to use a read call back
435 function.
436 </para>
437 </sect1>
438
439
440
441
442 <sect1 id="Writing_data">
443 <title>Writing data</title>
444
445 <para>
446 The write call back function allows a userland process to write
447 data to the kernel, so it has some kind of control over the
448 kernel. The write function should have the following format:
449 </para>
450
451 <funcsynopsis>
452 <funcprototype>
453 <funcdef>int <function>write_func</function></funcdef>
454 <paramdef>struct file* <parameter>file</parameter></paramdef>
455 <paramdef>const char* <parameter>buffer</parameter></paramdef>
456 <paramdef>unsigned long <parameter>count</parameter></paramdef>
457 <paramdef>void* <parameter>data</parameter></paramdef>
458 </funcprototype>
459 </funcsynopsis>
460
461 <para>
462 The write function should read <parameter>count</parameter>
463 bytes at maximum from the <parameter>buffer</parameter>. Note
464 that the <parameter>buffer</parameter> doesn't live in the
465 kernel's memory space, so it should first be copied to kernel
466 space with <function>copy_from_user</function>. The
467 <parameter>file</parameter> parameter is usually
468 ignored. <xref linkend="usingdata"/> shows how to use the
469 <parameter>data</parameter> parameter.
470 </para>
471
472 <para>
473 Again, <xref linkend="example"/> shows how to use this call back
474 function.
475 </para>
476 </sect1>
477
478
479
480
481 <sect1 id="usingdata">
482 <title>A single call back for many files</title>
483
484 <para>
485 When a large number of almost identical files is used, it's
486 quite inconvenient to use a separate call back function for
487 each file. A better approach is to have a single call back
488 function that distinguishes between the files by using the
489 <structfield>data</structfield> field in <structname>struct
490 proc_dir_entry</structname>. First of all, the
491 <structfield>data</structfield> field has to be initialised:
492 </para>
493
494 <programlisting>
495struct proc_dir_entry* entry;
496struct my_file_data *file_data;
497
498file_data = kmalloc(sizeof(struct my_file_data), GFP_KERNEL);
499entry->data = file_data;
500 </programlisting>
501
502 <para>
503 The <structfield>data</structfield> field is a <type>void
504 *</type>, so it can be initialised with anything.
505 </para>
506
507 <para>
508 Now that the <structfield>data</structfield> field is set, the
509 <function>read_proc</function> and
510 <function>write_proc</function> can use it to distinguish
511 between files because they get it passed into their
512 <parameter>data</parameter> parameter:
513 </para>
514
515 <programlisting>
516int foo_read_func(char *page, char **start, off_t off,
517 int count, int *eof, void *data)
518{
519 int len;
520
521 if(data == file_data) {
522 /* special case for this file */
523 } else {
524 /* normal processing */
525 }
526
527 return len;
528}
529 </programlisting>
530
531 <para>
532 Be sure to free the <structfield>data</structfield> data field
533 when removing the procfs entry.
534 </para>
535 </sect1>
536 </chapter>
537
538
539
540
541 <chapter id="tips">
542 <title>Tips and tricks</title>
543
544
545
546
547 <sect1 id="convenience">
548 <title>Convenience functions</title>
549
550 <funcsynopsis>
551 <funcprototype>
552 <funcdef>struct proc_dir_entry* <function>create_proc_read_entry</function></funcdef>
553 <paramdef>const char* <parameter>name</parameter></paramdef>
554 <paramdef>mode_t <parameter>mode</parameter></paramdef>
555 <paramdef>struct proc_dir_entry* <parameter>parent</parameter></paramdef>
556 <paramdef>read_proc_t* <parameter>read_proc</parameter></paramdef>
557 <paramdef>void* <parameter>data</parameter></paramdef>
558 </funcprototype>
559 </funcsynopsis>
560
561 <para>
562 This function creates a regular file in exactly the same way
563 as <function>create_proc_entry</function> from <xref
564 linkend="regularfile"/> does, but also allows to set the read
565 function <parameter>read_proc</parameter> in one call. This
566 function can set the <parameter>data</parameter> as well, like
567 explained in <xref linkend="usingdata"/>.
568 </para>
569 </sect1>
570
571
572
573 <sect1 id="Modules">
574 <title>Modules</title>
575
576 <para>
577 If procfs is being used from within a module, be sure to set
578 the <structfield>owner</structfield> field in the
579 <structname>struct proc_dir_entry</structname> to
580 <constant>THIS_MODULE</constant>.
581 </para>
582
583 <programlisting>
584struct proc_dir_entry* entry;
585
586entry->owner = THIS_MODULE;
587 </programlisting>
588 </sect1>
589
590
591
592
593 <sect1 id="Mode_and_ownership">
594 <title>Mode and ownership</title>
595
596 <para>
597 Sometimes it is useful to change the mode and/or ownership of
598 a procfs entry. Here is an example that shows how to achieve
599 that:
600 </para>
601
602 <programlisting>
603struct proc_dir_entry* entry;
604
605entry->mode = S_IWUSR |S_IRUSR | S_IRGRP | S_IROTH;
606entry->uid = 0;
607entry->gid = 100;
608 </programlisting>
609
610 </sect1>
611 </chapter>
612
613
614
615
616 <chapter id="example">
617 <title>Example</title>
618
619 <!-- be careful with the example code: it shouldn't be wider than
620 approx. 60 columns, or otherwise it won't fit properly on a page
621 -->
622
623&procfsexample;
624
625 </chapter>
626</book>
diff --git a/Documentation/DocBook/procfs_example.c b/Documentation/DocBook/procfs_example.c
deleted file mode 100644
index a5b11793b1e0..000000000000
--- a/Documentation/DocBook/procfs_example.c
+++ /dev/null
@@ -1,201 +0,0 @@
1/*
2 * procfs_example.c: an example proc interface
3 *
4 * Copyright (C) 2001, Erik Mouw (mouw@nl.linux.org)
5 *
6 * This file accompanies the procfs-guide in the Linux kernel
7 * source. Its main use is to demonstrate the concepts and
8 * functions described in the guide.
9 *
10 * This software has been developed while working on the LART
11 * computing board (http://www.lartmaker.nl), which was sponsored
12 * by the Delt University of Technology projects Mobile Multi-media
13 * Communications and Ubiquitous Communications.
14 *
15 * This program is free software; you can redistribute
16 * it and/or modify it under the terms of the GNU General
17 * Public License as published by the Free Software
18 * Foundation; either version 2 of the License, or (at your
19 * option) any later version.
20 *
21 * This program is distributed in the hope that it will be
22 * useful, but WITHOUT ANY WARRANTY; without even the implied
23 * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
24 * PURPOSE. See the GNU General Public License for more
25 * details.
26 *
27 * You should have received a copy of the GNU General Public
28 * License along with this program; if not, write to the
29 * Free Software Foundation, Inc., 59 Temple Place,
30 * Suite 330, Boston, MA 02111-1307 USA
31 *
32 */
33
34#include <linux/module.h>
35#include <linux/kernel.h>
36#include <linux/init.h>
37#include <linux/proc_fs.h>
38#include <linux/jiffies.h>
39#include <asm/uaccess.h>
40
41
42#define MODULE_VERS "1.0"
43#define MODULE_NAME "procfs_example"
44
45#define FOOBAR_LEN 8
46
47struct fb_data_t {
48 char name[FOOBAR_LEN + 1];
49 char value[FOOBAR_LEN + 1];
50};
51
52
53static struct proc_dir_entry *example_dir, *foo_file,
54 *bar_file, *jiffies_file, *symlink;
55
56
57struct fb_data_t foo_data, bar_data;
58
59
60static int proc_read_jiffies(char *page, char **start,
61 off_t off, int count,
62 int *eof, void *data)
63{
64 int len;
65
66 len = sprintf(page, "jiffies = %ld\n",
67 jiffies);
68
69 return len;
70}
71
72
73static int proc_read_foobar(char *page, char **start,
74 off_t off, int count,
75 int *eof, void *data)
76{
77 int len;
78 struct fb_data_t *fb_data = (struct fb_data_t *)data;
79
80 /* DON'T DO THAT - buffer overruns are bad */
81 len = sprintf(page, "%s = '%s'\n",
82 fb_data->name, fb_data->value);
83
84 return len;
85}
86
87
88static int proc_write_foobar(struct file *file,
89 const char *buffer,
90 unsigned long count,
91 void *data)
92{
93 int len;
94 struct fb_data_t *fb_data = (struct fb_data_t *)data;
95
96 if(count > FOOBAR_LEN)
97 len = FOOBAR_LEN;
98 else
99 len = count;
100
101 if(copy_from_user(fb_data->value, buffer, len))
102 return -EFAULT;
103
104 fb_data->value[len] = '\0';
105
106 return len;
107}
108
109
110static int __init init_procfs_example(void)
111{
112 int rv = 0;
113
114 /* create directory */
115 example_dir = proc_mkdir(MODULE_NAME, NULL);
116 if(example_dir == NULL) {
117 rv = -ENOMEM;
118 goto out;
119 }
120 /* create jiffies using convenience function */
121 jiffies_file = create_proc_read_entry("jiffies",
122 0444, example_dir,
123 proc_read_jiffies,
124 NULL);
125 if(jiffies_file == NULL) {
126 rv = -ENOMEM;
127 goto no_jiffies;
128 }
129
130 /* create foo and bar files using same callback
131 * functions
132 */
133 foo_file = create_proc_entry("foo", 0644, example_dir);
134 if(foo_file == NULL) {
135 rv = -ENOMEM;
136 goto no_foo;
137 }
138
139 strcpy(foo_data.name, "foo");
140 strcpy(foo_data.value, "foo");
141 foo_file->data = &foo_data;
142 foo_file->read_proc = proc_read_foobar;
143 foo_file->write_proc = proc_write_foobar;
144
145 bar_file = create_proc_entry("bar", 0644, example_dir);
146 if(bar_file == NULL) {
147 rv = -ENOMEM;
148 goto no_bar;
149 }
150
151 strcpy(bar_data.name, "bar");
152 strcpy(bar_data.value, "bar");
153 bar_file->data = &bar_data;
154 bar_file->read_proc = proc_read_foobar;
155 bar_file->write_proc = proc_write_foobar;
156
157 /* create symlink */
158 symlink = proc_symlink("jiffies_too", example_dir,
159 "jiffies");
160 if(symlink == NULL) {
161 rv = -ENOMEM;
162 goto no_symlink;
163 }
164
165 /* everything OK */
166 printk(KERN_INFO "%s %s initialised\n",
167 MODULE_NAME, MODULE_VERS);
168 return 0;
169
170no_symlink:
171 remove_proc_entry("bar", example_dir);
172no_bar:
173 remove_proc_entry("foo", example_dir);
174no_foo:
175 remove_proc_entry("jiffies", example_dir);
176no_jiffies:
177 remove_proc_entry(MODULE_NAME, NULL);
178out:
179 return rv;
180}
181
182
183static void __exit cleanup_procfs_example(void)
184{
185 remove_proc_entry("jiffies_too", example_dir);
186 remove_proc_entry("bar", example_dir);
187 remove_proc_entry("foo", example_dir);
188 remove_proc_entry("jiffies", example_dir);
189 remove_proc_entry(MODULE_NAME, NULL);
190
191 printk(KERN_INFO "%s %s removed\n",
192 MODULE_NAME, MODULE_VERS);
193}
194
195
196module_init(init_procfs_example);
197module_exit(cleanup_procfs_example);
198
199MODULE_AUTHOR("Erik Mouw");
200MODULE_DESCRIPTION("procfs examples");
201MODULE_LICENSE("GPL");
diff --git a/Documentation/DocBook/v4l/common.xml b/Documentation/DocBook/v4l/common.xml
index b1a81d246d58..c65f0ac9b6ee 100644
--- a/Documentation/DocBook/v4l/common.xml
+++ b/Documentation/DocBook/v4l/common.xml
@@ -716,6 +716,41 @@ if (-1 == ioctl (fd, &VIDIOC-S-STD;, &amp;std_id)) {
716} 716}
717 </programlisting> 717 </programlisting>
718 </example> 718 </example>
719 <section id="dv-timings">
720 <title>Digital Video (DV) Timings</title>
721 <para>
722 The video standards discussed so far has been dealing with Analog TV and the
723corresponding video timings. Today there are many more different hardware interfaces
724such as High Definition TV interfaces (HDMI), VGA, DVI connectors etc., that carry
725video signals and there is a need to extend the API to select the video timings
726for these interfaces. Since it is not possible to extend the &v4l2-std-id; due to
727the limited bits available, a new set of IOCTLs is added to set/get video timings at
728the input and output: </para><itemizedlist>
729 <listitem>
730 <para>DV Presets: Digital Video (DV) presets. These are IDs representing a
731video timing at the input/output. Presets are pre-defined timings implemented
732by the hardware according to video standards. A __u32 data type is used to represent
733a preset unlike the bit mask that is used in &v4l2-std-id; allowing future extensions
734to support as many different presets as needed.</para>
735 </listitem>
736 <listitem>
737 <para>Custom DV Timings: This will allow applications to define more detailed
738custom video timings for the interface. This includes parameters such as width, height,
739polarities, frontporch, backporch etc.
740 </para>
741 </listitem>
742 </itemizedlist>
743 <para>To enumerate and query the attributes of DV presets supported by a device,
744applications use the &VIDIOC-ENUM-DV-PRESETS; ioctl. To get the current DV preset,
745applications use the &VIDIOC-G-DV-PRESET; ioctl and to set a preset they use the
746&VIDIOC-S-DV-PRESET; ioctl.</para>
747 <para>To set custom DV timings for the device, applications use the
748&VIDIOC-S-DV-TIMINGS; ioctl and to get current custom DV timings they use the
749&VIDIOC-G-DV-TIMINGS; ioctl.</para>
750 <para>Applications can make use of the <xref linkend="input-capabilities" /> and
751<xref linkend="output-capabilities"/> flags to decide what ioctls are available to set the
752video timings for the device.</para>
753 </section>
719 </section> 754 </section>
720 755
721 &sub-controls; 756 &sub-controls;
diff --git a/Documentation/DocBook/v4l/compat.xml b/Documentation/DocBook/v4l/compat.xml
index 4d1902a54d61..b9dbdf9e6d29 100644
--- a/Documentation/DocBook/v4l/compat.xml
+++ b/Documentation/DocBook/v4l/compat.xml
@@ -2291,8 +2291,8 @@ was renamed to <structname id="v4l2-chip-ident-old">v4l2_chip_ident_old</structn
2291 <listitem> 2291 <listitem>
2292 <para>New control <constant>V4L2_CID_COLORFX</constant> was added.</para> 2292 <para>New control <constant>V4L2_CID_COLORFX</constant> was added.</para>
2293 </listitem> 2293 </listitem>
2294 </orderedlist> 2294 </orderedlist>
2295 </section> 2295 </section>
2296 <section> 2296 <section>
2297 <title>V4L2 in Linux 2.6.32</title> 2297 <title>V4L2 in Linux 2.6.32</title>
2298 <orderedlist> 2298 <orderedlist>
@@ -2322,8 +2322,16 @@ more information.</para>
2322 <listitem> 2322 <listitem>
2323 <para>Added Remote Controller chapter, describing the default Remote Controller mapping for media devices.</para> 2323 <para>Added Remote Controller chapter, describing the default Remote Controller mapping for media devices.</para>
2324 </listitem> 2324 </listitem>
2325 </orderedlist> 2325 </orderedlist>
2326 </section> 2326 </section>
2327 <section>
2328 <title>V4L2 in Linux 2.6.33</title>
2329 <orderedlist>
2330 <listitem>
2331 <para>Added support for Digital Video timings in order to support HDTV receivers and transmitters.</para>
2332 </listitem>
2333 </orderedlist>
2334 </section>
2327 </section> 2335 </section>
2328 2336
2329 <section id="other"> 2337 <section id="other">
diff --git a/Documentation/DocBook/v4l/v4l2.xml b/Documentation/DocBook/v4l/v4l2.xml
index 937b4157a5d0..060105af49e5 100644
--- a/Documentation/DocBook/v4l/v4l2.xml
+++ b/Documentation/DocBook/v4l/v4l2.xml
@@ -74,6 +74,17 @@ Remote Controller chapter.</contrib>
74 </address> 74 </address>
75 </affiliation> 75 </affiliation>
76 </author> 76 </author>
77
78 <author>
79 <firstname>Muralidharan</firstname>
80 <surname>Karicheri</surname>
81 <contrib>Documented the Digital Video timings API.</contrib>
82 <affiliation>
83 <address>
84 <email>m-karicheri2@ti.com</email>
85 </address>
86 </affiliation>
87 </author>
77 </authorgroup> 88 </authorgroup>
78 89
79 <copyright> 90 <copyright>
@@ -89,7 +100,7 @@ Remote Controller chapter.</contrib>
89 <year>2008</year> 100 <year>2008</year>
90 <year>2009</year> 101 <year>2009</year>
91 <holder>Bill Dirks, Michael H. Schimek, Hans Verkuil, Martin 102 <holder>Bill Dirks, Michael H. Schimek, Hans Verkuil, Martin
92Rubli, Andy Walls, Mauro Carvalho Chehab</holder> 103Rubli, Andy Walls, Muralidharan Karicheri, Mauro Carvalho Chehab</holder>
93 </copyright> 104 </copyright>
94 <legalnotice> 105 <legalnotice>
95 <para>Except when explicitly stated as GPL, programming examples within 106 <para>Except when explicitly stated as GPL, programming examples within
@@ -103,6 +114,13 @@ structs, ioctls) must be noted in more detail in the history chapter
103applications. --> 114applications. -->
104 115
105 <revision> 116 <revision>
117 <revnumber>2.6.33</revnumber>
118 <date>2009-12-03</date>
119 <authorinitials>mk</authorinitials>
120 <revremark>Added documentation for the Digital Video timings API.</revremark>
121 </revision>
122
123 <revision>
106 <revnumber>2.6.32</revnumber> 124 <revnumber>2.6.32</revnumber>
107 <date>2009-08-31</date> 125 <date>2009-08-31</date>
108 <authorinitials>mcc</authorinitials> 126 <authorinitials>mcc</authorinitials>
@@ -355,7 +373,7 @@ and discussions on the V4L mailing list.</revremark>
355</partinfo> 373</partinfo>
356 374
357<title>Video for Linux Two API Specification</title> 375<title>Video for Linux Two API Specification</title>
358 <subtitle>Revision 2.6.32</subtitle> 376 <subtitle>Revision 2.6.33</subtitle>
359 377
360 <chapter id="common"> 378 <chapter id="common">
361 &sub-common; 379 &sub-common;
@@ -411,6 +429,7 @@ and discussions on the V4L mailing list.</revremark>
411 &sub-encoder-cmd; 429 &sub-encoder-cmd;
412 &sub-enumaudio; 430 &sub-enumaudio;
413 &sub-enumaudioout; 431 &sub-enumaudioout;
432 &sub-enum-dv-presets;
414 &sub-enum-fmt; 433 &sub-enum-fmt;
415 &sub-enum-framesizes; 434 &sub-enum-framesizes;
416 &sub-enum-frameintervals; 435 &sub-enum-frameintervals;
@@ -421,6 +440,8 @@ and discussions on the V4L mailing list.</revremark>
421 &sub-g-audioout; 440 &sub-g-audioout;
422 &sub-g-crop; 441 &sub-g-crop;
423 &sub-g-ctrl; 442 &sub-g-ctrl;
443 &sub-g-dv-preset;
444 &sub-g-dv-timings;
424 &sub-g-enc-index; 445 &sub-g-enc-index;
425 &sub-g-ext-ctrls; 446 &sub-g-ext-ctrls;
426 &sub-g-fbuf; 447 &sub-g-fbuf;
@@ -441,6 +462,7 @@ and discussions on the V4L mailing list.</revremark>
441 &sub-querybuf; 462 &sub-querybuf;
442 &sub-querycap; 463 &sub-querycap;
443 &sub-queryctrl; 464 &sub-queryctrl;
465 &sub-query-dv-preset;
444 &sub-querystd; 466 &sub-querystd;
445 &sub-reqbufs; 467 &sub-reqbufs;
446 &sub-s-hw-freq-seek; 468 &sub-s-hw-freq-seek;
diff --git a/Documentation/DocBook/v4l/videodev2.h.xml b/Documentation/DocBook/v4l/videodev2.h.xml
index 3e282ed9f593..068325940658 100644
--- a/Documentation/DocBook/v4l/videodev2.h.xml
+++ b/Documentation/DocBook/v4l/videodev2.h.xml
@@ -734,6 +734,99 @@ struct <link linkend="v4l2-standard">v4l2_standard</link> {
734}; 734};
735 735
736/* 736/*
737 * V I D E O T I M I N G S D V P R E S E T
738 */
739struct <link linkend="v4l2-dv-preset">v4l2_dv_preset</link> {
740 __u32 preset;
741 __u32 reserved[4];
742};
743
744/*
745 * D V P R E S E T S E N U M E R A T I O N
746 */
747struct <link linkend="v4l2-dv-enum-preset">v4l2_dv_enum_preset</link> {
748 __u32 index;
749 __u32 preset;
750 __u8 name[32]; /* Name of the preset timing */
751 __u32 width;
752 __u32 height;
753 __u32 reserved[4];
754};
755
756/*
757 * D V P R E S E T V A L U E S
758 */
759#define V4L2_DV_INVALID 0
760#define V4L2_DV_480P59_94 1 /* BT.1362 */
761#define V4L2_DV_576P50 2 /* BT.1362 */
762#define V4L2_DV_720P24 3 /* SMPTE 296M */
763#define V4L2_DV_720P25 4 /* SMPTE 296M */
764#define V4L2_DV_720P30 5 /* SMPTE 296M */
765#define V4L2_DV_720P50 6 /* SMPTE 296M */
766#define V4L2_DV_720P59_94 7 /* SMPTE 274M */
767#define V4L2_DV_720P60 8 /* SMPTE 274M/296M */
768#define V4L2_DV_1080I29_97 9 /* BT.1120/ SMPTE 274M */
769#define V4L2_DV_1080I30 10 /* BT.1120/ SMPTE 274M */
770#define V4L2_DV_1080I25 11 /* BT.1120 */
771#define V4L2_DV_1080I50 12 /* SMPTE 296M */
772#define V4L2_DV_1080I60 13 /* SMPTE 296M */
773#define V4L2_DV_1080P24 14 /* SMPTE 296M */
774#define V4L2_DV_1080P25 15 /* SMPTE 296M */
775#define V4L2_DV_1080P30 16 /* SMPTE 296M */
776#define V4L2_DV_1080P50 17 /* BT.1120 */
777#define V4L2_DV_1080P60 18 /* BT.1120 */
778
779/*
780 * D V B T T I M I N G S
781 */
782
783/* BT.656/BT.1120 timing data */
784struct <link linkend="v4l2-bt-timings">v4l2_bt_timings</link> {
785 __u32 width; /* width in pixels */
786 __u32 height; /* height in lines */
787 __u32 interlaced; /* Interlaced or progressive */
788 __u32 polarities; /* Positive or negative polarity */
789 __u64 pixelclock; /* Pixel clock in HZ. Ex. 74.25MHz-&gt;74250000 */
790 __u32 hfrontporch; /* Horizpontal front porch in pixels */
791 __u32 hsync; /* Horizontal Sync length in pixels */
792 __u32 hbackporch; /* Horizontal back porch in pixels */
793 __u32 vfrontporch; /* Vertical front porch in pixels */
794 __u32 vsync; /* Vertical Sync length in lines */
795 __u32 vbackporch; /* Vertical back porch in lines */
796 __u32 il_vfrontporch; /* Vertical front porch for bottom field of
797 * interlaced field formats
798 */
799 __u32 il_vsync; /* Vertical sync length for bottom field of
800 * interlaced field formats
801 */
802 __u32 il_vbackporch; /* Vertical back porch for bottom field of
803 * interlaced field formats
804 */
805 __u32 reserved[16];
806} __attribute__ ((packed));
807
808/* Interlaced or progressive format */
809#define V4L2_DV_PROGRESSIVE 0
810#define V4L2_DV_INTERLACED 1
811
812/* Polarities. If bit is not set, it is assumed to be negative polarity */
813#define V4L2_DV_VSYNC_POS_POL 0x00000001
814#define V4L2_DV_HSYNC_POS_POL 0x00000002
815
816
817/* DV timings */
818struct <link linkend="v4l2-dv-timings">v4l2_dv_timings</link> {
819 __u32 type;
820 union {
821 struct <link linkend="v4l2-bt-timings">v4l2_bt_timings</link> bt;
822 __u32 reserved[32];
823 };
824} __attribute__ ((packed));
825
826/* Values for the type field */
827#define V4L2_DV_BT_656_1120 0 /* BT.656/1120 timing type */
828
829/*
737 * V I D E O I N P U T S 830 * V I D E O I N P U T S
738 */ 831 */
739struct <link linkend="v4l2-input">v4l2_input</link> { 832struct <link linkend="v4l2-input">v4l2_input</link> {
@@ -744,7 +837,8 @@ struct <link linkend="v4l2-input">v4l2_input</link> {
744 __u32 tuner; /* Associated tuner */ 837 __u32 tuner; /* Associated tuner */
745 v4l2_std_id std; 838 v4l2_std_id std;
746 __u32 status; 839 __u32 status;
747 __u32 reserved[4]; 840 __u32 capabilities;
841 __u32 reserved[3];
748}; 842};
749 843
750/* Values for the 'type' field */ 844/* Values for the 'type' field */
@@ -775,6 +869,11 @@ struct <link linkend="v4l2-input">v4l2_input</link> {
775#define V4L2_IN_ST_NO_ACCESS 0x02000000 /* Conditional access denied */ 869#define V4L2_IN_ST_NO_ACCESS 0x02000000 /* Conditional access denied */
776#define V4L2_IN_ST_VTR 0x04000000 /* VTR time constant */ 870#define V4L2_IN_ST_VTR 0x04000000 /* VTR time constant */
777 871
872/* capabilities flags */
873#define V4L2_IN_CAP_PRESETS 0x00000001 /* Supports S_DV_PRESET */
874#define V4L2_IN_CAP_CUSTOM_TIMINGS 0x00000002 /* Supports S_DV_TIMINGS */
875#define V4L2_IN_CAP_STD 0x00000004 /* Supports S_STD */
876
778/* 877/*
779 * V I D E O O U T P U T S 878 * V I D E O O U T P U T S
780 */ 879 */
@@ -785,13 +884,19 @@ struct <link linkend="v4l2-output">v4l2_output</link> {
785 __u32 audioset; /* Associated audios (bitfield) */ 884 __u32 audioset; /* Associated audios (bitfield) */
786 __u32 modulator; /* Associated modulator */ 885 __u32 modulator; /* Associated modulator */
787 v4l2_std_id std; 886 v4l2_std_id std;
788 __u32 reserved[4]; 887 __u32 capabilities;
888 __u32 reserved[3];
789}; 889};
790/* Values for the 'type' field */ 890/* Values for the 'type' field */
791#define V4L2_OUTPUT_TYPE_MODULATOR 1 891#define V4L2_OUTPUT_TYPE_MODULATOR 1
792#define V4L2_OUTPUT_TYPE_ANALOG 2 892#define V4L2_OUTPUT_TYPE_ANALOG 2
793#define V4L2_OUTPUT_TYPE_ANALOGVGAOVERLAY 3 893#define V4L2_OUTPUT_TYPE_ANALOGVGAOVERLAY 3
794 894
895/* capabilities flags */
896#define V4L2_OUT_CAP_PRESETS 0x00000001 /* Supports S_DV_PRESET */
897#define V4L2_OUT_CAP_CUSTOM_TIMINGS 0x00000002 /* Supports S_DV_TIMINGS */
898#define V4L2_OUT_CAP_STD 0x00000004 /* Supports S_STD */
899
795/* 900/*
796 * C O N T R O L S 901 * C O N T R O L S
797 */ 902 */
@@ -1626,6 +1731,13 @@ struct <link linkend="v4l2-dbg-chip-ident">v4l2_dbg_chip_ident</link> {
1626#endif 1731#endif
1627 1732
1628#define VIDIOC_S_HW_FREQ_SEEK _IOW('V', 82, struct <link linkend="v4l2-hw-freq-seek">v4l2_hw_freq_seek</link>) 1733#define VIDIOC_S_HW_FREQ_SEEK _IOW('V', 82, struct <link linkend="v4l2-hw-freq-seek">v4l2_hw_freq_seek</link>)
1734#define VIDIOC_ENUM_DV_PRESETS _IOWR('V', 83, struct <link linkend="v4l2-dv-enum-preset">v4l2_dv_enum_preset</link>)
1735#define VIDIOC_S_DV_PRESET _IOWR('V', 84, struct <link linkend="v4l2-dv-preset">v4l2_dv_preset</link>)
1736#define VIDIOC_G_DV_PRESET _IOWR('V', 85, struct <link linkend="v4l2-dv-preset">v4l2_dv_preset</link>)
1737#define VIDIOC_QUERY_DV_PRESET _IOR('V', 86, struct <link linkend="v4l2-dv-preset">v4l2_dv_preset</link>)
1738#define VIDIOC_S_DV_TIMINGS _IOWR('V', 87, struct <link linkend="v4l2-dv-timings">v4l2_dv_timings</link>)
1739#define VIDIOC_G_DV_TIMINGS _IOWR('V', 88, struct <link linkend="v4l2-dv-timings">v4l2_dv_timings</link>)
1740
1629/* Reminder: when adding new ioctls please add support for them to 1741/* Reminder: when adding new ioctls please add support for them to
1630 drivers/media/video/v4l2-compat-ioctl32.c as well! */ 1742 drivers/media/video/v4l2-compat-ioctl32.c as well! */
1631 1743
diff --git a/Documentation/DocBook/v4l/vidioc-enum-dv-presets.xml b/Documentation/DocBook/v4l/vidioc-enum-dv-presets.xml
new file mode 100644
index 000000000000..1d31427edd1b
--- /dev/null
+++ b/Documentation/DocBook/v4l/vidioc-enum-dv-presets.xml
@@ -0,0 +1,238 @@
1<refentry id="vidioc-enum-dv-presets">
2 <refmeta>
3 <refentrytitle>ioctl VIDIOC_ENUM_DV_PRESETS</refentrytitle>
4 &manvol;
5 </refmeta>
6
7 <refnamediv>
8 <refname>VIDIOC_ENUM_DV_PRESETS</refname>
9 <refpurpose>Enumerate supported Digital Video presets</refpurpose>
10 </refnamediv>
11
12 <refsynopsisdiv>
13 <funcsynopsis>
14 <funcprototype>
15 <funcdef>int <function>ioctl</function></funcdef>
16 <paramdef>int <parameter>fd</parameter></paramdef>
17 <paramdef>int <parameter>request</parameter></paramdef>
18 <paramdef>struct v4l2_dv_enum_preset *<parameter>argp</parameter></paramdef>
19 </funcprototype>
20 </funcsynopsis>
21 </refsynopsisdiv>
22
23 <refsect1>
24 <title>Arguments</title>
25
26 <variablelist>
27 <varlistentry>
28 <term><parameter>fd</parameter></term>
29 <listitem>
30 <para>&fd;</para>
31 </listitem>
32 </varlistentry>
33 <varlistentry>
34 <term><parameter>request</parameter></term>
35 <listitem>
36 <para>VIDIOC_ENUM_DV_PRESETS</para>
37 </listitem>
38 </varlistentry>
39 <varlistentry>
40 <term><parameter>argp</parameter></term>
41 <listitem>
42 <para></para>
43 </listitem>
44 </varlistentry>
45 </variablelist>
46 </refsect1>
47
48 <refsect1>
49 <title>Description</title>
50
51 <para>To query the attributes of a DV preset, applications initialize the
52<structfield>index</structfield> field and zero the reserved array of &v4l2-dv-enum-preset;
53and call the <constant>VIDIOC_ENUM_DV_PRESETS</constant> ioctl with a pointer to this
54structure. Drivers fill the rest of the structure or return an
55&EINVAL; when the index is out of bounds. To enumerate all DV Presets supported,
56applications shall begin at index zero, incrementing by one until the
57driver returns <errorcode>EINVAL</errorcode>. Drivers may enumerate a
58different set of DV presets after switching the video input or
59output.</para>
60
61 <table pgwide="1" frame="none" id="v4l2-dv-enum-preset">
62 <title>struct <structname>v4l2_dv_enum_presets</structname></title>
63 <tgroup cols="3">
64 &cs-str;
65 <tbody valign="top">
66 <row>
67 <entry>__u32</entry>
68 <entry><structfield>index</structfield></entry>
69 <entry>Number of the DV preset, set by the
70application.</entry>
71 </row>
72 <row>
73 <entry>__u32</entry>
74 <entry><structfield>preset</structfield></entry>
75 <entry>This field identifies one of the DV preset values listed in <xref linkend="v4l2-dv-presets-vals"/>.</entry>
76 </row>
77 <row>
78 <entry>__u8</entry>
79 <entry><structfield>name</structfield>[24]</entry>
80 <entry>Name of the preset, a NUL-terminated ASCII string, for example: "720P-60", "1080I-60". This information is
81intended for the user.</entry>
82 </row>
83 <row>
84 <entry>__u32</entry>
85 <entry><structfield>width</structfield></entry>
86 <entry>Width of the active video in pixels for the DV preset.</entry>
87 </row>
88 <row>
89 <entry>__u32</entry>
90 <entry><structfield>height</structfield></entry>
91 <entry>Height of the active video in lines for the DV preset.</entry>
92 </row>
93 <row>
94 <entry>__u32</entry>
95 <entry><structfield>reserved</structfield>[4]</entry>
96 <entry>Reserved for future extensions. Drivers must set the array to zero.</entry>
97 </row>
98 </tbody>
99 </tgroup>
100 </table>
101
102 <table pgwide="1" frame="none" id="v4l2-dv-presets-vals">
103 <title>struct <structname>DV Presets</structname></title>
104 <tgroup cols="3">
105 &cs-str;
106 <tbody valign="top">
107 <row>
108 <entry>Preset</entry>
109 <entry>Preset value</entry>
110 <entry>Description</entry>
111 </row>
112 <row>
113 <entry></entry>
114 <entry></entry>
115 <entry></entry>
116 </row>
117 <row>
118 <entry>V4L2_DV_INVALID</entry>
119 <entry>0</entry>
120 <entry>Invalid preset value.</entry>
121 </row>
122 <row>
123 <entry>V4L2_DV_480P59_94</entry>
124 <entry>1</entry>
125 <entry>720x480 progressive video at 59.94 fps as per BT.1362.</entry>
126 </row>
127 <row>
128 <entry>V4L2_DV_576P50</entry>
129 <entry>2</entry>
130 <entry>720x576 progressive video at 50 fps as per BT.1362.</entry>
131 </row>
132 <row>
133 <entry>V4L2_DV_720P24</entry>
134 <entry>3</entry>
135 <entry>1280x720 progressive video at 24 fps as per SMPTE 296M.</entry>
136 </row>
137 <row>
138 <entry>V4L2_DV_720P25</entry>
139 <entry>4</entry>
140 <entry>1280x720 progressive video at 25 fps as per SMPTE 296M.</entry>
141 </row>
142 <row>
143 <entry>V4L2_DV_720P30</entry>
144 <entry>5</entry>
145 <entry>1280x720 progressive video at 30 fps as per SMPTE 296M.</entry>
146 </row>
147 <row>
148 <entry>V4L2_DV_720P50</entry>
149 <entry>6</entry>
150 <entry>1280x720 progressive video at 50 fps as per SMPTE 296M.</entry>
151 </row>
152 <row>
153 <entry>V4L2_DV_720P59_94</entry>
154 <entry>7</entry>
155 <entry>1280x720 progressive video at 59.94 fps as per SMPTE 274M.</entry>
156 </row>
157 <row>
158 <entry>V4L2_DV_720P60</entry>
159 <entry>8</entry>
160 <entry>1280x720 progressive video at 60 fps as per SMPTE 274M/296M.</entry>
161 </row>
162 <row>
163 <entry>V4L2_DV_1080I29_97</entry>
164 <entry>9</entry>
165 <entry>1920x1080 interlaced video at 29.97 fps as per BT.1120/SMPTE 274M.</entry>
166 </row>
167 <row>
168 <entry>V4L2_DV_1080I30</entry>
169 <entry>10</entry>
170 <entry>1920x1080 interlaced video at 30 fps as per BT.1120/SMPTE 274M.</entry>
171 </row>
172 <row>
173 <entry>V4L2_DV_1080I25</entry>
174 <entry>11</entry>
175 <entry>1920x1080 interlaced video at 25 fps as per BT.1120.</entry>
176 </row>
177 <row>
178 <entry>V4L2_DV_1080I50</entry>
179 <entry>12</entry>
180 <entry>1920x1080 interlaced video at 50 fps as per SMPTE 296M.</entry>
181 </row>
182 <row>
183 <entry>V4L2_DV_1080I60</entry>
184 <entry>13</entry>
185 <entry>1920x1080 interlaced video at 60 fps as per SMPTE 296M.</entry>
186 </row>
187 <row>
188 <entry>V4L2_DV_1080P24</entry>
189 <entry>14</entry>
190 <entry>1920x1080 progressive video at 24 fps as per SMPTE 296M.</entry>
191 </row>
192 <row>
193 <entry>V4L2_DV_1080P25</entry>
194 <entry>15</entry>
195 <entry>1920x1080 progressive video at 25 fps as per SMPTE 296M.</entry>
196 </row>
197 <row>
198 <entry>V4L2_DV_1080P30</entry>
199 <entry>16</entry>
200 <entry>1920x1080 progressive video at 30 fps as per SMPTE 296M.</entry>
201 </row>
202 <row>
203 <entry>V4L2_DV_1080P50</entry>
204 <entry>17</entry>
205 <entry>1920x1080 progressive video at 50 fps as per BT.1120.</entry>
206 </row>
207 <row>
208 <entry>V4L2_DV_1080P60</entry>
209 <entry>18</entry>
210 <entry>1920x1080 progressive video at 60 fps as per BT.1120.</entry>
211 </row>
212 </tbody>
213 </tgroup>
214 </table>
215 </refsect1>
216
217 <refsect1>
218 &return-value;
219
220 <variablelist>
221 <varlistentry>
222 <term><errorcode>EINVAL</errorcode></term>
223 <listitem>
224 <para>The &v4l2-dv-enum-preset; <structfield>index</structfield>
225is out of bounds.</para>
226 </listitem>
227 </varlistentry>
228 </variablelist>
229 </refsect1>
230</refentry>
231
232<!--
233Local Variables:
234mode: sgml
235sgml-parent-document: "v4l2.sgml"
236indent-tabs-mode: nil
237End:
238-->
diff --git a/Documentation/DocBook/v4l/vidioc-enuminput.xml b/Documentation/DocBook/v4l/vidioc-enuminput.xml
index 414856b82473..71b868e2fb8f 100644
--- a/Documentation/DocBook/v4l/vidioc-enuminput.xml
+++ b/Documentation/DocBook/v4l/vidioc-enuminput.xml
@@ -124,7 +124,13 @@ current input.</entry>
124 </row> 124 </row>
125 <row> 125 <row>
126 <entry>__u32</entry> 126 <entry>__u32</entry>
127 <entry><structfield>reserved</structfield>[4]</entry> 127 <entry><structfield>capabilities</structfield></entry>
128 <entry>This field provides capabilities for the
129input. See <xref linkend="input-capabilities" /> for flags.</entry>
130 </row>
131 <row>
132 <entry>__u32</entry>
133 <entry><structfield>reserved</structfield>[3]</entry>
128 <entry>Reserved for future extensions. Drivers must set 134 <entry>Reserved for future extensions. Drivers must set
129the array to zero.</entry> 135the array to zero.</entry>
130 </row> 136 </row>
@@ -261,6 +267,34 @@ flag is set Macrovision has been detected.</entry>
261 </tbody> 267 </tbody>
262 </tgroup> 268 </tgroup>
263 </table> 269 </table>
270
271 <!-- Capability flags based on video timings RFC by Muralidharan
272Karicheri, titled RFC (v1.2): V4L - Support for video timings at the
273input/output interface to linux-media@vger.kernel.org on 19 Oct 2009.
274 -->
275 <table frame="none" pgwide="1" id="input-capabilities">
276 <title>Input capabilities</title>
277 <tgroup cols="3">
278 &cs-def;
279 <tbody valign="top">
280 <row>
281 <entry><constant>V4L2_IN_CAP_PRESETS</constant></entry>
282 <entry>0x00000001</entry>
283 <entry>This input supports setting DV presets by using VIDIOC_S_DV_PRESET.</entry>
284 </row>
285 <row>
286 <entry><constant>V4L2_OUT_CAP_CUSTOM_TIMINGS</constant></entry>
287 <entry>0x00000002</entry>
288 <entry>This input supports setting custom video timings by using VIDIOC_S_DV_TIMINGS.</entry>
289 </row>
290 <row>
291 <entry><constant>V4L2_IN_CAP_STD</constant></entry>
292 <entry>0x00000004</entry>
293 <entry>This input supports setting the TV standard by using VIDIOC_S_STD.</entry>
294 </row>
295 </tbody>
296 </tgroup>
297 </table>
264 </refsect1> 298 </refsect1>
265 299
266 <refsect1> 300 <refsect1>
diff --git a/Documentation/DocBook/v4l/vidioc-enumoutput.xml b/Documentation/DocBook/v4l/vidioc-enumoutput.xml
index e8d16dcd50cf..a281d26a195f 100644
--- a/Documentation/DocBook/v4l/vidioc-enumoutput.xml
+++ b/Documentation/DocBook/v4l/vidioc-enumoutput.xml
@@ -114,7 +114,13 @@ details on video standards and how to switch see <xref
114 </row> 114 </row>
115 <row> 115 <row>
116 <entry>__u32</entry> 116 <entry>__u32</entry>
117 <entry><structfield>reserved</structfield>[4]</entry> 117 <entry><structfield>capabilities</structfield></entry>
118 <entry>This field provides capabilities for the
119output. See <xref linkend="output-capabilities" /> for flags.</entry>
120 </row>
121 <row>
122 <entry>__u32</entry>
123 <entry><structfield>reserved</structfield>[3]</entry>
118 <entry>Reserved for future extensions. Drivers must set 124 <entry>Reserved for future extensions. Drivers must set
119the array to zero.</entry> 125the array to zero.</entry>
120 </row> 126 </row>
@@ -147,6 +153,34 @@ CVBS, S-Video, RGB.</entry>
147 </tgroup> 153 </tgroup>
148 </table> 154 </table>
149 155
156 <!-- Capabilities flags based on video timings RFC by Muralidharan
157Karicheri, titled RFC (v1.2): V4L - Support for video timings at the
158input/output interface to linux-media@vger.kernel.org on 19 Oct 2009.
159 -->
160 <table frame="none" pgwide="1" id="output-capabilities">
161 <title>Output capabilities</title>
162 <tgroup cols="3">
163 &cs-def;
164 <tbody valign="top">
165 <row>
166 <entry><constant>V4L2_OUT_CAP_PRESETS</constant></entry>
167 <entry>0x00000001</entry>
168 <entry>This output supports setting DV presets by using VIDIOC_S_DV_PRESET.</entry>
169 </row>
170 <row>
171 <entry><constant>V4L2_OUT_CAP_CUSTOM_TIMINGS</constant></entry>
172 <entry>0x00000002</entry>
173 <entry>This output supports setting custom video timings by using VIDIOC_S_DV_TIMINGS.</entry>
174 </row>
175 <row>
176 <entry><constant>V4L2_OUT_CAP_STD</constant></entry>
177 <entry>0x00000004</entry>
178 <entry>This output supports setting the TV standard by using VIDIOC_S_STD.</entry>
179 </row>
180 </tbody>
181 </tgroup>
182 </table>
183
150 </refsect1> 184 </refsect1>
151 <refsect1> 185 <refsect1>
152 &return-value; 186 &return-value;
diff --git a/Documentation/DocBook/v4l/vidioc-g-dv-preset.xml b/Documentation/DocBook/v4l/vidioc-g-dv-preset.xml
new file mode 100644
index 000000000000..3c6784e132f3
--- /dev/null
+++ b/Documentation/DocBook/v4l/vidioc-g-dv-preset.xml
@@ -0,0 +1,111 @@
1<refentry id="vidioc-g-dv-preset">
2 <refmeta>
3 <refentrytitle>ioctl VIDIOC_G_DV_PRESET, VIDIOC_S_DV_PRESET</refentrytitle>
4 &manvol;
5 </refmeta>
6
7 <refnamediv>
8 <refname>VIDIOC_G_DV_PRESET</refname>
9 <refname>VIDIOC_S_DV_PRESET</refname>
10 <refpurpose>Query or select the DV preset of the current input or output</refpurpose>
11 </refnamediv>
12
13 <refsynopsisdiv>
14 <funcsynopsis>
15 <funcprototype>
16 <funcdef>int <function>ioctl</function></funcdef>
17 <paramdef>int <parameter>fd</parameter></paramdef>
18 <paramdef>int <parameter>request</parameter></paramdef>
19 <paramdef>&v4l2-dv-preset;
20*<parameter>argp</parameter></paramdef>
21 </funcprototype>
22 </funcsynopsis>
23 </refsynopsisdiv>
24
25 <refsect1>
26 <title>Arguments</title>
27
28 <variablelist>
29 <varlistentry>
30 <term><parameter>fd</parameter></term>
31 <listitem>
32 <para>&fd;</para>
33 </listitem>
34 </varlistentry>
35 <varlistentry>
36 <term><parameter>request</parameter></term>
37 <listitem>
38 <para>VIDIOC_G_DV_PRESET, VIDIOC_S_DV_PRESET</para>
39 </listitem>
40 </varlistentry>
41 <varlistentry>
42 <term><parameter>argp</parameter></term>
43 <listitem>
44 <para></para>
45 </listitem>
46 </varlistentry>
47 </variablelist>
48 </refsect1>
49
50 <refsect1>
51 <title>Description</title>
52 <para>To query and select the current DV preset, applications
53use the <constant>VIDIOC_G_DV_PRESET</constant> and <constant>VIDIOC_S_DV_PRESET</constant>
54ioctls which take a pointer to a &v4l2-dv-preset; type as argument.
55Applications must zero the reserved array in &v4l2-dv-preset;.
56<constant>VIDIOC_G_DV_PRESET</constant> returns a dv preset in the field
57<structfield>preset</structfield> of &v4l2-dv-preset;.</para>
58
59 <para><constant>VIDIOC_S_DV_PRESET</constant> accepts a pointer to a &v4l2-dv-preset;
60that has the preset value to be set. Applications must zero the reserved array in &v4l2-dv-preset;.
61If the preset is not supported, it returns an &EINVAL; </para>
62 </refsect1>
63
64 <refsect1>
65 &return-value;
66
67 <variablelist>
68 <varlistentry>
69 <term><errorcode>EINVAL</errorcode></term>
70 <listitem>
71 <para>This ioctl is not supported, or the
72<constant>VIDIOC_S_DV_PRESET</constant>,<constant>VIDIOC_S_DV_PRESET</constant> parameter was unsuitable.</para>
73 </listitem>
74 </varlistentry>
75 <varlistentry>
76 <term><errorcode>EBUSY</errorcode></term>
77 <listitem>
78 <para>The device is busy and therefore can not change the preset.</para>
79 </listitem>
80 </varlistentry>
81 </variablelist>
82
83 <table pgwide="1" frame="none" id="v4l2-dv-preset">
84 <title>struct <structname>v4l2_dv_preset</structname></title>
85 <tgroup cols="3">
86 &cs-str;
87 <tbody valign="top">
88 <row>
89 <entry>__u32</entry>
90 <entry><structfield>preset</structfield></entry>
91 <entry>Preset value to represent the digital video timings</entry>
92 </row>
93 <row>
94 <entry>__u32</entry>
95 <entry><structfield>reserved[4]</structfield></entry>
96 <entry>Reserved fields for future use</entry>
97 </row>
98 </tbody>
99 </tgroup>
100 </table>
101
102 </refsect1>
103</refentry>
104
105<!--
106Local Variables:
107mode: sgml
108sgml-parent-document: "v4l2.sgml"
109indent-tabs-mode: nil
110End:
111-->
diff --git a/Documentation/DocBook/v4l/vidioc-g-dv-timings.xml b/Documentation/DocBook/v4l/vidioc-g-dv-timings.xml
new file mode 100644
index 000000000000..ecc19576bb8f
--- /dev/null
+++ b/Documentation/DocBook/v4l/vidioc-g-dv-timings.xml
@@ -0,0 +1,224 @@
1<refentry id="vidioc-g-dv-timings">
2 <refmeta>
3 <refentrytitle>ioctl VIDIOC_G_DV_TIMINGS, VIDIOC_S_DV_TIMINGS</refentrytitle>
4 &manvol;
5 </refmeta>
6
7 <refnamediv>
8 <refname>VIDIOC_G_DV_TIMINGS</refname>
9 <refname>VIDIOC_S_DV_TIMINGS</refname>
10 <refpurpose>Get or set custom DV timings for input or output</refpurpose>
11 </refnamediv>
12
13 <refsynopsisdiv>
14 <funcsynopsis>
15 <funcprototype>
16 <funcdef>int <function>ioctl</function></funcdef>
17 <paramdef>int <parameter>fd</parameter></paramdef>
18 <paramdef>int <parameter>request</parameter></paramdef>
19 <paramdef>&v4l2-dv-timings;
20*<parameter>argp</parameter></paramdef>
21 </funcprototype>
22 </funcsynopsis>
23 </refsynopsisdiv>
24
25 <refsect1>
26 <title>Arguments</title>
27
28 <variablelist>
29 <varlistentry>
30 <term><parameter>fd</parameter></term>
31 <listitem>
32 <para>&fd;</para>
33 </listitem>
34 </varlistentry>
35 <varlistentry>
36 <term><parameter>request</parameter></term>
37 <listitem>
38 <para>VIDIOC_G_DV_TIMINGS, VIDIOC_S_DV_TIMINGS</para>
39 </listitem>
40 </varlistentry>
41 <varlistentry>
42 <term><parameter>argp</parameter></term>
43 <listitem>
44 <para></para>
45 </listitem>
46 </varlistentry>
47 </variablelist>
48 </refsect1>
49
50 <refsect1>
51 <title>Description</title>
52 <para>To set custom DV timings for the input or output, applications use the
53<constant>VIDIOC_S_DV_TIMINGS</constant> ioctl and to get the current custom timings,
54applications use the <constant>VIDIOC_G_DV_TIMINGS</constant> ioctl. The detailed timing
55information is filled in using the structure &v4l2-dv-timings;. These ioctls take
56a pointer to the &v4l2-dv-timings; structure as argument. If the ioctl is not supported
57or the timing values are not correct, the driver returns &EINVAL;.</para>
58 </refsect1>
59
60 <refsect1>
61 &return-value;
62
63 <variablelist>
64 <varlistentry>
65 <term><errorcode>EINVAL</errorcode></term>
66 <listitem>
67 <para>This ioctl is not supported, or the
68<constant>VIDIOC_S_DV_TIMINGS</constant> parameter was unsuitable.</para>
69 </listitem>
70 </varlistentry>
71 <varlistentry>
72 <term><errorcode>EBUSY</errorcode></term>
73 <listitem>
74 <para>The device is busy and therefore can not change the timings.</para>
75 </listitem>
76 </varlistentry>
77 </variablelist>
78
79 <table pgwide="1" frame="none" id="v4l2-bt-timings">
80 <title>struct <structname>v4l2_bt_timings</structname></title>
81 <tgroup cols="3">
82 &cs-str;
83 <tbody valign="top">
84 <row>
85 <entry>__u32</entry>
86 <entry><structfield>width</structfield></entry>
87 <entry>Width of the active video in pixels</entry>
88 </row>
89 <row>
90 <entry>__u32</entry>
91 <entry><structfield>height</structfield></entry>
92 <entry>Height of the active video in lines</entry>
93 </row>
94 <row>
95 <entry>__u32</entry>
96 <entry><structfield>interlaced</structfield></entry>
97 <entry>Progressive (0) or interlaced (1)</entry>
98 </row>
99 <row>
100 <entry>__u32</entry>
101 <entry><structfield>polarities</structfield></entry>
102 <entry>This is a bit mask that defines polarities of sync signals.
103bit 0 (V4L2_DV_VSYNC_POS_POL) is for vertical sync polarity and bit 1 (V4L2_DV_HSYNC_POS_POL) is for horizontal sync polarity. If the bit is set
104(1) it is positive polarity and if is cleared (0), it is negative polarity.</entry>
105 </row>
106 <row>
107 <entry>__u64</entry>
108 <entry><structfield>pixelclock</structfield></entry>
109 <entry>Pixel clock in Hz. Ex. 74.25MHz->74250000</entry>
110 </row>
111 <row>
112 <entry>__u32</entry>
113 <entry><structfield>hfrontporch</structfield></entry>
114 <entry>Horizontal front porch in pixels</entry>
115 </row>
116 <row>
117 <entry>__u32</entry>
118 <entry><structfield>hsync</structfield></entry>
119 <entry>Horizontal sync length in pixels</entry>
120 </row>
121 <row>
122 <entry>__u32</entry>
123 <entry><structfield>hbackporch</structfield></entry>
124 <entry>Horizontal back porch in pixels</entry>
125 </row>
126 <row>
127 <entry>__u32</entry>
128 <entry><structfield>vfrontporch</structfield></entry>
129 <entry>Vertical front porch in lines</entry>
130 </row>
131 <row>
132 <entry>__u32</entry>
133 <entry><structfield>vsync</structfield></entry>
134 <entry>Vertical sync length in lines</entry>
135 </row>
136 <row>
137 <entry>__u32</entry>
138 <entry><structfield>vbackporch</structfield></entry>
139 <entry>Vertical back porch in lines</entry>
140 </row>
141 <row>
142 <entry>__u32</entry>
143 <entry><structfield>il_vfrontporch</structfield></entry>
144 <entry>Vertical front porch in lines for bottom field of interlaced field formats</entry>
145 </row>
146 <row>
147 <entry>__u32</entry>
148 <entry><structfield>il_vsync</structfield></entry>
149 <entry>Vertical sync length in lines for bottom field of interlaced field formats</entry>
150 </row>
151 <row>
152 <entry>__u32</entry>
153 <entry><structfield>il_vbackporch</structfield></entry>
154 <entry>Vertical back porch in lines for bottom field of interlaced field formats</entry>
155 </row>
156 </tbody>
157 </tgroup>
158 </table>
159
160 <table pgwide="1" frame="none" id="v4l2-dv-timings">
161 <title>struct <structname>v4l2_dv_timings</structname></title>
162 <tgroup cols="4">
163 &cs-str;
164 <tbody valign="top">
165 <row>
166 <entry>__u32</entry>
167 <entry><structfield>type</structfield></entry>
168 <entry></entry>
169 <entry>Type of DV timings as listed in <xref linkend="dv-timing-types"/>.</entry>
170 </row>
171 <row>
172 <entry>union</entry>
173 <entry><structfield></structfield></entry>
174 <entry></entry>
175 </row>
176 <row>
177 <entry></entry>
178 <entry>&v4l2-bt-timings;</entry>
179 <entry><structfield>bt</structfield></entry>
180 <entry>Timings defined by BT.656/1120 specifications</entry>
181 </row>
182 <row>
183 <entry></entry>
184 <entry>__u32</entry>
185 <entry><structfield>reserved</structfield>[32]</entry>
186 <entry></entry>
187 </row>
188 </tbody>
189 </tgroup>
190 </table>
191
192 <table pgwide="1" frame="none" id="dv-timing-types">
193 <title>DV Timing types</title>
194 <tgroup cols="3">
195 &cs-str;
196 <tbody valign="top">
197 <row>
198 <entry>Timing type</entry>
199 <entry>value</entry>
200 <entry>Description</entry>
201 </row>
202 <row>
203 <entry></entry>
204 <entry></entry>
205 <entry></entry>
206 </row>
207 <row>
208 <entry>V4L2_DV_BT_656_1120</entry>
209 <entry>0</entry>
210 <entry>BT.656/1120 timings</entry>
211 </row>
212 </tbody>
213 </tgroup>
214 </table>
215 </refsect1>
216</refentry>
217
218<!--
219Local Variables:
220mode: sgml
221sgml-parent-document: "v4l2.sgml"
222indent-tabs-mode: nil
223End:
224-->
diff --git a/Documentation/DocBook/v4l/vidioc-g-std.xml b/Documentation/DocBook/v4l/vidioc-g-std.xml
index b6f5d267e856..912f8513e5da 100644
--- a/Documentation/DocBook/v4l/vidioc-g-std.xml
+++ b/Documentation/DocBook/v4l/vidioc-g-std.xml
@@ -86,6 +86,12 @@ standards.</para>
86<constant>VIDIOC_S_STD</constant> parameter was unsuitable.</para> 86<constant>VIDIOC_S_STD</constant> parameter was unsuitable.</para>
87 </listitem> 87 </listitem>
88 </varlistentry> 88 </varlistentry>
89 <varlistentry>
90 <term><errorcode>EBUSY</errorcode></term>
91 <listitem>
92 <para>The device is busy and therefore can not change the standard</para>
93 </listitem>
94 </varlistentry>
89 </variablelist> 95 </variablelist>
90 </refsect1> 96 </refsect1>
91</refentry> 97</refentry>
diff --git a/Documentation/DocBook/v4l/vidioc-query-dv-preset.xml b/Documentation/DocBook/v4l/vidioc-query-dv-preset.xml
new file mode 100644
index 000000000000..87e4f0f6151c
--- /dev/null
+++ b/Documentation/DocBook/v4l/vidioc-query-dv-preset.xml
@@ -0,0 +1,85 @@
1<refentry id="vidioc-query-dv-preset">
2 <refmeta>
3 <refentrytitle>ioctl VIDIOC_QUERY_DV_PRESET</refentrytitle>
4 &manvol;
5 </refmeta>
6
7 <refnamediv>
8 <refname>VIDIOC_QUERY_DV_PRESET</refname>
9 <refpurpose>Sense the DV preset received by the current
10input</refpurpose>
11 </refnamediv>
12
13 <refsynopsisdiv>
14 <funcsynopsis>
15 <funcprototype>
16 <funcdef>int <function>ioctl</function></funcdef>
17 <paramdef>int <parameter>fd</parameter></paramdef>
18 <paramdef>int <parameter>request</parameter></paramdef>
19 <paramdef>&v4l2-dv-preset; *<parameter>argp</parameter></paramdef>
20 </funcprototype>
21 </funcsynopsis>
22 </refsynopsisdiv>
23
24 <refsect1>
25 <title>Arguments</title>
26
27 <variablelist>
28 <varlistentry>
29 <term><parameter>fd</parameter></term>
30 <listitem>
31 <para>&fd;</para>
32 </listitem>
33 </varlistentry>
34 <varlistentry>
35 <term><parameter>request</parameter></term>
36 <listitem>
37 <para>VIDIOC_QUERY_DV_PRESET</para>
38 </listitem>
39 </varlistentry>
40 <varlistentry>
41 <term><parameter>argp</parameter></term>
42 <listitem>
43 <para></para>
44 </listitem>
45 </varlistentry>
46 </variablelist>
47 </refsect1>
48
49 <refsect1>
50 <title>Description</title>
51
52 <para>The hardware may be able to detect the current DV preset
53automatically, similar to sensing the video standard. To do so, applications
54call <constant> VIDIOC_QUERY_DV_PRESET</constant> with a pointer to a
55&v4l2-dv-preset; type. Once the hardware detects a preset, that preset is
56returned in the preset field of &v4l2-dv-preset;. When detection is not
57possible or fails, the value V4L2_DV_INVALID is returned.</para>
58 </refsect1>
59
60 <refsect1>
61 &return-value;
62 <variablelist>
63 <varlistentry>
64 <term><errorcode>EINVAL</errorcode></term>
65 <listitem>
66 <para>This ioctl is not supported.</para>
67 </listitem>
68 </varlistentry>
69 <varlistentry>
70 <term><errorcode>EBUSY</errorcode></term>
71 <listitem>
72 <para>The device is busy and therefore can not sense the preset</para>
73 </listitem>
74 </varlistentry>
75 </variablelist>
76 </refsect1>
77</refentry>
78
79<!--
80Local Variables:
81mode: sgml
82sgml-parent-document: "v4l2.sgml"
83indent-tabs-mode: nil
84End:
85-->
diff --git a/Documentation/DocBook/v4l/vidioc-querystd.xml b/Documentation/DocBook/v4l/vidioc-querystd.xml
index b5a7ff934486..1a9e60393091 100644
--- a/Documentation/DocBook/v4l/vidioc-querystd.xml
+++ b/Documentation/DocBook/v4l/vidioc-querystd.xml
@@ -70,6 +70,12 @@ current video input or output.</para>
70 <para>This ioctl is not supported.</para> 70 <para>This ioctl is not supported.</para>
71 </listitem> 71 </listitem>
72 </varlistentry> 72 </varlistentry>
73 <varlistentry>
74 <term><errorcode>EBUSY</errorcode></term>
75 <listitem>
76 <para>The device is busy and therefore can not detect the standard</para>
77 </listitem>
78 </varlistentry>
73 </variablelist> 79 </variablelist>
74 </refsect1> 80 </refsect1>
75</refentry> 81</refentry>
diff --git a/Documentation/IO-mapping.txt b/Documentation/IO-mapping.txt
index 78a440695e11..1b5aa10df845 100644
--- a/Documentation/IO-mapping.txt
+++ b/Documentation/IO-mapping.txt
@@ -157,7 +157,7 @@ For such memory, you can do things like
157 * access only the 640k-1MB area, so anything else 157 * access only the 640k-1MB area, so anything else
158 * has to be remapped. 158 * has to be remapped.
159 */ 159 */
160 char * baseptr = ioremap(0xFC000000, 1024*1024); 160 void __iomem *baseptr = ioremap(0xFC000000, 1024*1024);
161 161
162 /* write a 'A' to the offset 10 of the area */ 162 /* write a 'A' to the offset 10 of the area */
163 writeb('A',baseptr+10); 163 writeb('A',baseptr+10);
diff --git a/Documentation/DMA-mapping.txt b/Documentation/PCI/PCI-DMA-mapping.txt
index ecad88d9fe59..ecad88d9fe59 100644
--- a/Documentation/DMA-mapping.txt
+++ b/Documentation/PCI/PCI-DMA-mapping.txt
diff --git a/Documentation/SubmitChecklist b/Documentation/SubmitChecklist
index 78a9168ff377..1053a56be3b1 100644
--- a/Documentation/SubmitChecklist
+++ b/Documentation/SubmitChecklist
@@ -15,7 +15,7 @@ kernel patches.
152: Passes allnoconfig, allmodconfig 152: Passes allnoconfig, allmodconfig
16 16
173: Builds on multiple CPU architectures by using local cross-compile tools 173: Builds on multiple CPU architectures by using local cross-compile tools
18 or something like PLM at OSDL. 18 or some other build farm.
19 19
204: ppc64 is a good architecture for cross-compilation checking because it 204: ppc64 is a good architecture for cross-compilation checking because it
21 tends to use `unsigned long' for 64-bit quantities. 21 tends to use `unsigned long' for 64-bit quantities.
@@ -88,3 +88,6 @@ kernel patches.
88 88
8924: All memory barriers {e.g., barrier(), rmb(), wmb()} need a comment in the 8924: All memory barriers {e.g., barrier(), rmb(), wmb()} need a comment in the
90 source code that explains the logic of what they are doing and why. 90 source code that explains the logic of what they are doing and why.
91
9225: If any ioctl's are added by the patch, then also update
93 Documentation/ioctl/ioctl-number.txt.
diff --git a/Documentation/acpi/method-customizing.txt b/Documentation/acpi/method-customizing.txt
new file mode 100644
index 000000000000..e628cd23ca80
--- /dev/null
+++ b/Documentation/acpi/method-customizing.txt
@@ -0,0 +1,66 @@
1Linux ACPI Custom Control Method How To
2=======================================
3
4Written by Zhang Rui <rui.zhang@intel.com>
5
6
7Linux supports customizing ACPI control methods at runtime.
8
9Users can use this to
101. override an existing method which may not work correctly,
11 or just for debugging purposes.
122. insert a completely new method in order to create a missing
13 method such as _OFF, _ON, _STA, _INI, etc.
14For these cases, it is far simpler to dynamically install a single
15control method rather than override the entire DSDT, because kernel
16rebuild/reboot is not needed and test result can be got in minutes.
17
18Note: Only ACPI METHOD can be overridden, any other object types like
19 "Device", "OperationRegion", are not recognized.
20Note: The same ACPI control method can be overridden for many times,
21 and it's always the latest one that used by Linux/kernel.
22
231. override an existing method
24 a) get the ACPI table via ACPI sysfs I/F. e.g. to get the DSDT,
25 just run "cat /sys/firmware/acpi/tables/DSDT > /tmp/dsdt.dat"
26 b) disassemble the table by running "iasl -d dsdt.dat".
27 c) rewrite the ASL code of the method and save it in a new file,
28 d) package the new file (psr.asl) to an ACPI table format.
29 Here is an example of a customized \_SB._AC._PSR method,
30
31 DefinitionBlock ("", "SSDT", 1, "", "", 0x20080715)
32 {
33 External (ACON)
34
35 Method (\_SB_.AC._PSR, 0, NotSerialized)
36 {
37 Store ("In AC _PSR", Debug)
38 Return (ACON)
39 }
40 }
41 Note that the full pathname of the method in ACPI namespace
42 should be used.
43 And remember to use "External" to declare external objects.
44 e) assemble the file to generate the AML code of the method.
45 e.g. "iasl psr.asl" (psr.aml is generated as a result)
46 f) mount debugfs by "mount -t debugfs none /sys/kernel/debug"
47 g) override the old method via the debugfs by running
48 "cat /tmp/psr.aml > /sys/kernel/debug/acpi/custom_method"
49
502. insert a new method
51 This is easier than overriding an existing method.
52 We just need to create the ASL code of the method we want to
53 insert and then follow the step c) ~ g) in section 1.
54
553. undo your changes
56 The "undo" operation is not supported for a new inserted method
57 right now, i.e. we can not remove a method currently.
58 For an overrided method, in order to undo your changes, please
59 save a copy of the method original ASL code in step c) section 1,
60 and redo step c) ~ g) to override the method with the original one.
61
62
63Note: We can use a kernel with multiple custom ACPI method running,
64 But each individual write to debugfs can implement a SINGLE
65 method override. i.e. if we want to insert/override multiple
66 ACPI methods, we need to redo step c) ~ g) for multiple times.
diff --git a/Documentation/blackfin/00-INDEX b/Documentation/blackfin/00-INDEX
index d6840a91e1e1..c34e12440fec 100644
--- a/Documentation/blackfin/00-INDEX
+++ b/Documentation/blackfin/00-INDEX
@@ -1,9 +1,6 @@
100-INDEX 100-INDEX
2 - This file 2 - This file
3 3
4cache-lock.txt
5 - HOWTO for blackfin cache locking.
6
7cachefeatures.txt 4cachefeatures.txt
8 - Supported cache features. 5 - Supported cache features.
9 6
diff --git a/Documentation/blackfin/Makefile b/Documentation/blackfin/Makefile
new file mode 100644
index 000000000000..773dbb103f1c
--- /dev/null
+++ b/Documentation/blackfin/Makefile
@@ -0,0 +1,6 @@
1obj-m := gptimers-example.o
2
3all: modules
4
5modules clean:
6 $(MAKE) -C ../.. SUBDIRS=$(PWD) $@
diff --git a/Documentation/blackfin/cache-lock.txt b/Documentation/blackfin/cache-lock.txt
deleted file mode 100644
index 88ba1e6c31c3..000000000000
--- a/Documentation/blackfin/cache-lock.txt
+++ /dev/null
@@ -1,48 +0,0 @@
1/*
2 * File: Documentation/blackfin/cache-lock.txt
3 * Based on:
4 * Author:
5 *
6 * Created:
7 * Description: This file contains the simple DMA Implementation for Blackfin
8 *
9 * Rev: $Id: cache-lock.txt 2384 2006-11-01 04:12:43Z magicyang $
10 *
11 * Modified:
12 * Copyright 2004-2006 Analog Devices Inc.
13 *
14 * Bugs: Enter bugs at http://blackfin.uclinux.org/
15 *
16 */
17
18How to lock your code in cache in uClinux/blackfin
19--------------------------------------------------
20
21There are only a few steps required to lock your code into the cache.
22Currently you can lock the code by Way.
23
24Below are the interface provided for locking the cache.
25
26
271. cache_grab_lock(int Ways);
28
29This function grab the lock for locking your code into the cache specified
30by Ways.
31
32
332. cache_lock(int Ways);
34
35This function should be called after your critical code has been executed.
36Once the critical code exits, the code is now loaded into the cache. This
37function locks the code into the cache.
38
39
40So, the example sequence will be:
41
42 cache_grab_lock(WAY0_L); /* Grab the lock */
43
44 critical_code(); /* Execute the code of interest */
45
46 cache_lock(WAY0_L); /* Lock the cache */
47
48Where WAY0_L signifies WAY0 locking.
diff --git a/Documentation/blackfin/cachefeatures.txt b/Documentation/blackfin/cachefeatures.txt
index 0fbec23becb5..75de51f94515 100644
--- a/Documentation/blackfin/cachefeatures.txt
+++ b/Documentation/blackfin/cachefeatures.txt
@@ -41,16 +41,6 @@
41 icplb_flush(); 41 icplb_flush();
42 dcplb_flush(); 42 dcplb_flush();
43 43
44 - Locking the cache.
45
46 cache_grab_lock();
47 cache_lock();
48
49 Please refer linux-2.6.x/Documentation/blackfin/cache-lock.txt for how to
50 lock the cache.
51
52 Locking the cache is optional feature.
53
54 - Miscellaneous cache functions. 44 - Miscellaneous cache functions.
55 45
56 flush_cache_all(); 46 flush_cache_all();
diff --git a/Documentation/blackfin/gptimers-example.c b/Documentation/blackfin/gptimers-example.c
new file mode 100644
index 000000000000..b1bd6340e748
--- /dev/null
+++ b/Documentation/blackfin/gptimers-example.c
@@ -0,0 +1,83 @@
1/*
2 * Simple gptimers example
3 * http://docs.blackfin.uclinux.org/doku.php?id=linux-kernel:drivers:gptimers
4 *
5 * Copyright 2007-2009 Analog Devices Inc.
6 *
7 * Licensed under the GPL-2 or later.
8 */
9
10#include <linux/interrupt.h>
11#include <linux/module.h>
12
13#include <asm/gptimers.h>
14#include <asm/portmux.h>
15
16/* ... random driver includes ... */
17
18#define DRIVER_NAME "gptimer_example"
19
20struct gptimer_data {
21 uint32_t period, width;
22};
23static struct gptimer_data data;
24
25/* ... random driver state ... */
26
27static irqreturn_t gptimer_example_irq(int irq, void *dev_id)
28{
29 struct gptimer_data *data = dev_id;
30
31 /* make sure it was our timer which caused the interrupt */
32 if (!get_gptimer_intr(TIMER5_id))
33 return IRQ_NONE;
34
35 /* read the width/period values that were captured for the waveform */
36 data->width = get_gptimer_pwidth(TIMER5_id);
37 data->period = get_gptimer_period(TIMER5_id);
38
39 /* acknowledge the interrupt */
40 clear_gptimer_intr(TIMER5_id);
41
42 /* tell the upper layers we took care of things */
43 return IRQ_HANDLED;
44}
45
46/* ... random driver code ... */
47
48static int __init gptimer_example_init(void)
49{
50 int ret;
51
52 /* grab the peripheral pins */
53 ret = peripheral_request(P_TMR5, DRIVER_NAME);
54 if (ret) {
55 printk(KERN_NOTICE DRIVER_NAME ": peripheral request failed\n");
56 return ret;
57 }
58
59 /* grab the IRQ for the timer */
60 ret = request_irq(IRQ_TIMER5, gptimer_example_irq, IRQF_SHARED, DRIVER_NAME, &data);
61 if (ret) {
62 printk(KERN_NOTICE DRIVER_NAME ": IRQ request failed\n");
63 peripheral_free(P_TMR5);
64 return ret;
65 }
66
67 /* setup the timer and enable it */
68 set_gptimer_config(TIMER5_id, WDTH_CAP | PULSE_HI | PERIOD_CNT | IRQ_ENA);
69 enable_gptimers(TIMER5bit);
70
71 return 0;
72}
73module_init(gptimer_example_init);
74
75static void __exit gptimer_example_exit(void)
76{
77 disable_gptimers(TIMER5bit);
78 free_irq(IRQ_TIMER5, &data);
79 peripheral_free(P_TMR5);
80}
81module_exit(gptimer_example_exit);
82
83MODULE_LICENSE("BSD");
diff --git a/Documentation/block/00-INDEX b/Documentation/block/00-INDEX
index 961a0513f8c3..a406286f6f3e 100644
--- a/Documentation/block/00-INDEX
+++ b/Documentation/block/00-INDEX
@@ -1,7 +1,5 @@
100-INDEX 100-INDEX
2 - This file 2 - This file
3as-iosched.txt
4 - Anticipatory IO scheduler
5barrier.txt 3barrier.txt
6 - I/O Barriers 4 - I/O Barriers
7biodoc.txt 5biodoc.txt
diff --git a/Documentation/block/as-iosched.txt b/Documentation/block/as-iosched.txt
deleted file mode 100644
index 738b72be128e..000000000000
--- a/Documentation/block/as-iosched.txt
+++ /dev/null
@@ -1,172 +0,0 @@
1Anticipatory IO scheduler
2-------------------------
3Nick Piggin <piggin@cyberone.com.au> 13 Sep 2003
4
5Attention! Database servers, especially those using "TCQ" disks should
6investigate performance with the 'deadline' IO scheduler. Any system with high
7disk performance requirements should do so, in fact.
8
9If you see unusual performance characteristics of your disk systems, or you
10see big performance regressions versus the deadline scheduler, please email
11me. Database users don't bother unless you're willing to test a lot of patches
12from me ;) its a known issue.
13
14Also, users with hardware RAID controllers, doing striping, may find
15highly variable performance results with using the as-iosched. The
16as-iosched anticipatory implementation is based on the notion that a disk
17device has only one physical seeking head. A striped RAID controller
18actually has a head for each physical device in the logical RAID device.
19
20However, setting the antic_expire (see tunable parameters below) produces
21very similar behavior to the deadline IO scheduler.
22
23Selecting IO schedulers
24-----------------------
25Refer to Documentation/block/switching-sched.txt for information on
26selecting an io scheduler on a per-device basis.
27
28Anticipatory IO scheduler Policies
29----------------------------------
30The as-iosched implementation implements several layers of policies
31to determine when an IO request is dispatched to the disk controller.
32Here are the policies outlined, in order of application.
33
341. one-way Elevator algorithm.
35
36The elevator algorithm is similar to that used in deadline scheduler, with
37the addition that it allows limited backward movement of the elevator
38(i.e. seeks backwards). A seek backwards can occur when choosing between
39two IO requests where one is behind the elevator's current position, and
40the other is in front of the elevator's position. If the seek distance to
41the request in back of the elevator is less than half the seek distance to
42the request in front of the elevator, then the request in back can be chosen.
43Backward seeks are also limited to a maximum of MAXBACK (1024*1024) sectors.
44This favors forward movement of the elevator, while allowing opportunistic
45"short" backward seeks.
46
472. FIFO expiration times for reads and for writes.
48
49This is again very similar to the deadline IO scheduler. The expiration
50times for requests on these lists is tunable using the parameters read_expire
51and write_expire discussed below. When a read or a write expires in this way,
52the IO scheduler will interrupt its current elevator sweep or read anticipation
53to service the expired request.
54
553. Read and write request batching
56
57A batch is a collection of read requests or a collection of write
58requests. The as scheduler alternates dispatching read and write batches
59to the driver. In the case a read batch, the scheduler submits read
60requests to the driver as long as there are read requests to submit, and
61the read batch time limit has not been exceeded (read_batch_expire).
62The read batch time limit begins counting down only when there are
63competing write requests pending.
64
65In the case of a write batch, the scheduler submits write requests to
66the driver as long as there are write requests available, and the
67write batch time limit has not been exceeded (write_batch_expire).
68However, the length of write batches will be gradually shortened
69when read batches frequently exceed their time limit.
70
71When changing between batch types, the scheduler waits for all requests
72from the previous batch to complete before scheduling requests for the
73next batch.
74
75The read and write fifo expiration times described in policy 2 above
76are checked only when in scheduling IO of a batch for the corresponding
77(read/write) type. So for example, the read FIFO timeout values are
78tested only during read batches. Likewise, the write FIFO timeout
79values are tested only during write batches. For this reason,
80it is generally not recommended for the read batch time
81to be longer than the write expiration time, nor for the write batch
82time to exceed the read expiration time (see tunable parameters below).
83
84When the IO scheduler changes from a read to a write batch,
85it begins the elevator from the request that is on the head of the
86write expiration FIFO. Likewise, when changing from a write batch to
87a read batch, scheduler begins the elevator from the first entry
88on the read expiration FIFO.
89
904. Read anticipation.
91
92Read anticipation occurs only when scheduling a read batch.
93This implementation of read anticipation allows only one read request
94to be dispatched to the disk controller at a time. In
95contrast, many write requests may be dispatched to the disk controller
96at a time during a write batch. It is this characteristic that can make
97the anticipatory scheduler perform anomalously with controllers supporting
98TCQ, or with hardware striped RAID devices. Setting the antic_expire
99queue parameter (see below) to zero disables this behavior, and the
100anticipatory scheduler behaves essentially like the deadline scheduler.
101
102When read anticipation is enabled (antic_expire is not zero), reads
103are dispatched to the disk controller one at a time.
104At the end of each read request, the IO scheduler examines its next
105candidate read request from its sorted read list. If that next request
106is from the same process as the request that just completed,
107or if the next request in the queue is "very close" to the
108just completed request, it is dispatched immediately. Otherwise,
109statistics (average think time, average seek distance) on the process
110that submitted the just completed request are examined. If it seems
111likely that that process will submit another request soon, and that
112request is likely to be near the just completed request, then the IO
113scheduler will stop dispatching more read requests for up to (antic_expire)
114milliseconds, hoping that process will submit a new request near the one
115that just completed. If such a request is made, then it is dispatched
116immediately. If the antic_expire wait time expires, then the IO scheduler
117will dispatch the next read request from the sorted read queue.
118
119To decide whether an anticipatory wait is worthwhile, the scheduler
120maintains statistics for each process that can be used to compute
121mean "think time" (the time between read requests), and mean seek
122distance for that process. One observation is that these statistics
123are associated with each process, but those statistics are not associated
124with a specific IO device. So for example, if a process is doing IO
125on several file systems on separate devices, the statistics will be
126a combination of IO behavior from all those devices.
127
128
129Tuning the anticipatory IO scheduler
130------------------------------------
131When using 'as', the anticipatory IO scheduler there are 5 parameters under
132/sys/block/*/queue/iosched/. All are units of milliseconds.
133
134The parameters are:
135* read_expire
136 Controls how long until a read request becomes "expired". It also controls the
137 interval between which expired requests are served, so set to 50, a request
138 might take anywhere < 100ms to be serviced _if_ it is the next on the
139 expired list. Obviously request expiration strategies won't make the disk
140 go faster. The result basically equates to the timeslice a single reader
141 gets in the presence of other IO. 100*((seek time / read_expire) + 1) is
142 very roughly the % streaming read efficiency your disk should get with
143 multiple readers.
144
145* read_batch_expire
146 Controls how much time a batch of reads is given before pending writes are
147 served. A higher value is more efficient. This might be set below read_expire
148 if writes are to be given higher priority than reads, but reads are to be
149 as efficient as possible when there are no writes. Generally though, it
150 should be some multiple of read_expire.
151
152* write_expire, and
153* write_batch_expire are equivalent to the above, for writes.
154
155* antic_expire
156 Controls the maximum amount of time we can anticipate a good read (one
157 with a short seek distance from the most recently completed request) before
158 giving up. Many other factors may cause anticipation to be stopped early,
159 or some processes will not be "anticipated" at all. Should be a bit higher
160 for big seek time devices though not a linear correspondence - most
161 processes have only a few ms thinktime.
162
163In addition to the tunables above there is a read-only file named est_time
164which, when read, will show:
165
166 - The probability of a task exiting without a cooperating task
167 submitting an anticipated IO.
168
169 - The current mean think time.
170
171 - The seek distance used to determine if an incoming IO is better.
172
diff --git a/Documentation/block/biodoc.txt b/Documentation/block/biodoc.txt
index 8d2158a1c6aa..6fab97ea7e6b 100644
--- a/Documentation/block/biodoc.txt
+++ b/Documentation/block/biodoc.txt
@@ -186,7 +186,7 @@ a virtual address mapping (unlike the earlier scheme of virtual address
186do not have a corresponding kernel virtual address space mapping) and 186do not have a corresponding kernel virtual address space mapping) and
187low-memory pages. 187low-memory pages.
188 188
189Note: Please refer to Documentation/DMA-mapping.txt for a discussion 189Note: Please refer to Documentation/PCI/PCI-DMA-mapping.txt for a discussion
190on PCI high mem DMA aspects and mapping of scatter gather lists, and support 190on PCI high mem DMA aspects and mapping of scatter gather lists, and support
191for 64 bit PCI. 191for 64 bit PCI.
192 192
diff --git a/Documentation/cpu-hotplug.txt b/Documentation/cpu-hotplug.txt
index 4d4a644b505e..a99d7031cdf9 100644
--- a/Documentation/cpu-hotplug.txt
+++ b/Documentation/cpu-hotplug.txt
@@ -315,41 +315,26 @@ A: The following are what is required for CPU hotplug infrastructure to work
315 315
316Q: I need to ensure that a particular cpu is not removed when there is some 316Q: I need to ensure that a particular cpu is not removed when there is some
317 work specific to this cpu is in progress. 317 work specific to this cpu is in progress.
318A: First switch the current thread context to preferred cpu 318A: There are two ways. If your code can be run in interrupt context, use
319 smp_call_function_single(), otherwise use work_on_cpu(). Note that
320 work_on_cpu() is slow, and can fail due to out of memory:
319 321
320 int my_func_on_cpu(int cpu) 322 int my_func_on_cpu(int cpu)
321 { 323 {
322 cpumask_t saved_mask, new_mask = CPU_MASK_NONE; 324 int err;
323 int curr_cpu, err = 0; 325 get_online_cpus();
324 326 if (!cpu_online(cpu))
325 saved_mask = current->cpus_allowed; 327 err = -EINVAL;
326 cpu_set(cpu, new_mask); 328 else
327 err = set_cpus_allowed(current, new_mask); 329#if NEEDS_BLOCKING
328 330 err = work_on_cpu(cpu, __my_func_on_cpu, NULL);
329 if (err) 331#else
330 return err; 332 smp_call_function_single(cpu, __my_func_on_cpu, &err,
331 333 true);
332 /* 334#endif
333 * If we got scheduled out just after the return from 335 put_online_cpus();
334 * set_cpus_allowed() before running the work, this ensures 336 return err;
335 * we stay locked. 337 }
336 */
337 curr_cpu = get_cpu();
338
339 if (curr_cpu != cpu) {
340 err = -EAGAIN;
341 goto ret;
342 } else {
343 /*
344 * Do work : But cant sleep, since get_cpu() disables preempt
345 */
346 }
347 ret:
348 put_cpu();
349 set_cpus_allowed(current, saved_mask);
350 return err;
351 }
352
353 338
354Q: How do we determine how many CPUs are available for hotplug. 339Q: How do we determine how many CPUs are available for hotplug.
355A: There is no clear spec defined way from ACPI that can give us that 340A: There is no clear spec defined way from ACPI that can give us that
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 e151b2a36267..3ad6acead949 100644
--- a/Documentation/dontdiff
+++ b/Documentation/dontdiff
@@ -103,6 +103,7 @@ gconf
103gen-devlist 103gen-devlist
104gen_crc32table 104gen_crc32table
105gen_init_cpio 105gen_init_cpio
106generated
106genheaders 107genheaders
107genksyms 108genksyms
108*_gray256.c 109*_gray256.c
diff --git a/Documentation/driver-model/driver.txt b/Documentation/driver-model/driver.txt
index 60120fb3b961..d2cd6fb8ba9e 100644
--- a/Documentation/driver-model/driver.txt
+++ b/Documentation/driver-model/driver.txt
@@ -226,5 +226,5 @@ struct driver_attribute driver_attr_debug;
226This can then be used to add and remove the attribute from the 226This can then be used to add and remove the attribute from the
227driver's directory using: 227driver's directory using:
228 228
229int driver_create_file(struct device_driver *, struct driver_attribute *); 229int driver_create_file(struct device_driver *, const struct driver_attribute *);
230void driver_remove_file(struct device_driver *, struct driver_attribute *); 230void driver_remove_file(struct device_driver *, const struct driver_attribute *);
diff --git a/Documentation/fb/viafb.txt b/Documentation/fb/viafb.txt
index 67dbf442b0b6..f3e046a6a987 100644
--- a/Documentation/fb/viafb.txt
+++ b/Documentation/fb/viafb.txt
@@ -7,7 +7,7 @@
7 VIA UniChrome Family(CLE266, PM800 / CN400 / CN300, 7 VIA UniChrome Family(CLE266, PM800 / CN400 / CN300,
8 P4M800CE / P4M800Pro / CN700 / VN800, 8 P4M800CE / P4M800Pro / CN700 / VN800,
9 CX700 / VX700, K8M890, P4M890, 9 CX700 / VX700, K8M890, P4M890,
10 CN896 / P4M900, VX800) 10 CN896 / P4M900, VX800, VX855)
11 11
12[Driver features] 12[Driver features]
13------------------------ 13------------------------
@@ -154,13 +154,6 @@
154 0 : No Dual Edge Panel (default) 154 0 : No Dual Edge Panel (default)
155 1 : Dual Edge Panel 155 1 : Dual Edge Panel
156 156
157 viafb_video_dev:
158 This option is used to specify video output devices(CRT, DVI, LCD) for
159 duoview case.
160 For example:
161 To output video on DVI, we should use:
162 modprobe viafb viafb_video_dev=DVI...
163
164 viafb_lcd_port: 157 viafb_lcd_port:
165 This option is used to specify LCD output port, 158 This option is used to specify LCD output port,
166 available values are "DVP0" "DVP1" "DFP_HIGHLOW" "DFP_HIGH" "DFP_LOW". 159 available values are "DVP0" "DVP1" "DFP_HIGHLOW" "DFP_HIGH" "DFP_LOW".
@@ -181,9 +174,6 @@ Notes:
181 and bpp, need to call VIAFB specified ioctl interface VIAFB_SET_DEVICE 174 and bpp, need to call VIAFB specified ioctl interface VIAFB_SET_DEVICE
182 instead of calling common ioctl function FBIOPUT_VSCREENINFO since 175 instead of calling common ioctl function FBIOPUT_VSCREENINFO since
183 viafb doesn't support multi-head well, or it will cause screen crush. 176 viafb doesn't support multi-head well, or it will cause screen crush.
184 4. VX800 2D accelerator hasn't been supported in this driver yet. When
185 using driver on VX800, the driver will disable the acceleration
186 function as default.
187 177
188 178
189[Configure viafb with "fbset" tool] 179[Configure viafb with "fbset" tool]
diff --git a/Documentation/feature-removal-schedule.txt b/Documentation/feature-removal-schedule.txt
index eb2c138c277c..0a46833c1b76 100644
--- a/Documentation/feature-removal-schedule.txt
+++ b/Documentation/feature-removal-schedule.txt
@@ -291,15 +291,6 @@ Who: Michael Buesch <mb@bu3sch.de>
291 291
292--------------------------- 292---------------------------
293 293
294What: print_fn_descriptor_symbol()
295When: October 2009
296Why: The %pF vsprintf format provides the same functionality in a
297 simpler way. print_fn_descriptor_symbol() is deprecated but
298 still present to give out-of-tree modules time to change.
299Who: Bjorn Helgaas <bjorn.helgaas@hp.com>
300
301---------------------------
302
303What: /sys/o2cb symlink 294What: /sys/o2cb symlink
304When: January 2010 295When: January 2010
305Why: /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
@@ -483,3 +474,71 @@ Why: Obsoleted by the adt7475 driver.
483Who: Jean Delvare <khali@linux-fr.org> 474Who: Jean Delvare <khali@linux-fr.org>
484 475
485--------------------------- 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----------------------------
496
497What: usbvideo quickcam_messenger driver
498When: 2.6.35
499Files: drivers/media/video/usbvideo/quickcam_messenger.[ch]
500Why: obsolete v4l1 driver replaced by gspca_stv06xx
501Who: Hans de Goede <hdegoede@redhat.com>
502
503----------------------------
504
505What: ov511 v4l1 driver
506When: 2.6.35
507Files: drivers/media/video/ov511.[ch]
508Why: obsolete v4l1 driver replaced by gspca_ov519
509Who: Hans de Goede <hdegoede@redhat.com>
510
511----------------------------
512
513What: w9968cf v4l1 driver
514When: 2.6.35
515Files: drivers/media/video/w9968cf*.[ch]
516Why: obsolete v4l1 driver replaced by gspca_ov519
517Who: Hans de Goede <hdegoede@redhat.com>
518
519----------------------------
520
521What: ovcamchip sensor framework
522When: 2.6.35
523Files: drivers/media/video/ovcamchip/*
524Why: Only used by obsoleted v4l1 drivers
525Who: Hans de Goede <hdegoede@redhat.com>
526
527----------------------------
528
529What: stv680 v4l1 driver
530When: 2.6.35
531Files: drivers/media/video/stv680.[ch]
532Why: obsolete v4l1 driver replaced by gspca_stv0680
533Who: Hans de Goede <hdegoede@redhat.com>
534
535----------------------------
536
537What: zc0301 v4l driver
538When: 2.6.35
539Files: drivers/media/video/zc0301/*
540Why: Duplicate functionality with the gspca_zc3xx driver, zc0301 only
541 supports 2 USB-ID's (because it only supports a limited set of
542 sensors) wich are also supported by the gspca_zc3xx driver
543 (which supports 53 USB-ID's in total)
544Who: Hans de Goede <hdegoede@redhat.com>
diff --git a/Documentation/filesystems/00-INDEX b/Documentation/filesystems/00-INDEX
index 7001782ab932..875d49696b6e 100644
--- a/Documentation/filesystems/00-INDEX
+++ b/Documentation/filesystems/00-INDEX
@@ -1,7 +1,5 @@
100-INDEX 100-INDEX
2 - this file (info on some of the filesystems supported by linux). 2 - this file (info on some of the filesystems supported by linux).
3Exporting
4 - explanation of how to make filesystems exportable.
5Locking 3Locking
6 - info on locking rules as they pertain to Linux VFS. 4 - info on locking rules as they pertain to Linux VFS.
79p.txt 59p.txt
@@ -68,12 +66,8 @@ mandatory-locking.txt
68 - info on the Linux implementation of Sys V mandatory file locking. 66 - info on the Linux implementation of Sys V mandatory file locking.
69ncpfs.txt 67ncpfs.txt
70 - info on Novell Netware(tm) filesystem using NCP protocol. 68 - info on Novell Netware(tm) filesystem using NCP protocol.
71nfs41-server.txt 69nfs/
72 - info on the Linux server implementation of NFSv4 minor version 1. 70 - nfs-related documentation.
73nfs-rdma.txt
74 - how to install and setup the Linux NFS/RDMA client and server software.
75nfsroot.txt
76 - short guide on setting up a diskless box with NFS root filesystem.
77nilfs2.txt 71nilfs2.txt
78 - info and mount options for the NILFS2 filesystem. 72 - info and mount options for the NILFS2 filesystem.
79ntfs.txt 73ntfs.txt
@@ -92,8 +86,6 @@ relay.txt
92 - info on relay, for efficient streaming from kernel to user space. 86 - info on relay, for efficient streaming from kernel to user space.
93romfs.txt 87romfs.txt
94 - description of the ROMFS filesystem. 88 - description of the ROMFS filesystem.
95rpc-cache.txt
96 - introduction to the caching mechanisms in the sunrpc layer.
97seq_file.txt 89seq_file.txt
98 - how to use the seq_file API 90 - how to use the seq_file API
99sharedsubtree.txt 91sharedsubtree.txt
diff --git a/Documentation/filesystems/ext4.txt b/Documentation/filesystems/ext4.txt
index af6885c3c821..e1def1786e50 100644
--- a/Documentation/filesystems/ext4.txt
+++ b/Documentation/filesystems/ext4.txt
@@ -196,7 +196,7 @@ nobarrier This also requires an IO stack which can support
196 also be used to enable or disable barriers, for 196 also be used to enable or disable barriers, for
197 consistency with other ext4 mount options. 197 consistency with other ext4 mount options.
198 198
199inode_readahead=n This tuning parameter controls the maximum 199inode_readahead_blks=n This tuning parameter controls the maximum
200 number of inode table blocks that ext4's inode 200 number of inode table blocks that ext4's inode
201 table readahead algorithm will pre-read into 201 table readahead algorithm will pre-read into
202 the buffer cache. The default value is 32 blocks. 202 the buffer cache. The default value is 32 blocks.
diff --git a/Documentation/filesystems/nfs/00-INDEX b/Documentation/filesystems/nfs/00-INDEX
new file mode 100644
index 000000000000..2f68cd688769
--- /dev/null
+++ b/Documentation/filesystems/nfs/00-INDEX
@@ -0,0 +1,16 @@
100-INDEX
2 - this file (nfs-related documentation).
3Exporting
4 - explanation of how to make filesystems exportable.
5knfsd-stats.txt
6 - statistics which the NFS server makes available to user space.
7nfs.txt
8 - nfs client, and DNS resolution for fs_locations.
9nfs41-server.txt
10 - info on the Linux server implementation of NFSv4 minor version 1.
11nfs-rdma.txt
12 - how to install and setup the Linux NFS/RDMA client and server software
13nfsroot.txt
14 - short guide on setting up a diskless box with NFS root filesystem.
15rpc-cache.txt
16 - introduction to the caching mechanisms in the sunrpc layer.
diff --git a/Documentation/filesystems/Exporting b/Documentation/filesystems/nfs/Exporting
index 87019d2b5981..87019d2b5981 100644
--- a/Documentation/filesystems/Exporting
+++ b/Documentation/filesystems/nfs/Exporting
diff --git a/Documentation/filesystems/knfsd-stats.txt b/Documentation/filesystems/nfs/knfsd-stats.txt
index 64ced5149d37..64ced5149d37 100644
--- a/Documentation/filesystems/knfsd-stats.txt
+++ b/Documentation/filesystems/nfs/knfsd-stats.txt
diff --git a/Documentation/filesystems/nfs-rdma.txt b/Documentation/filesystems/nfs/nfs-rdma.txt
index e386f7e4bcee..e386f7e4bcee 100644
--- a/Documentation/filesystems/nfs-rdma.txt
+++ b/Documentation/filesystems/nfs/nfs-rdma.txt
diff --git a/Documentation/filesystems/nfs.txt b/Documentation/filesystems/nfs/nfs.txt
index f50f26ce6cd0..f50f26ce6cd0 100644
--- a/Documentation/filesystems/nfs.txt
+++ b/Documentation/filesystems/nfs/nfs.txt
diff --git a/Documentation/filesystems/nfs41-server.txt b/Documentation/filesystems/nfs/nfs41-server.txt
index 5920fe26e6ff..1bd0d0c05171 100644
--- a/Documentation/filesystems/nfs41-server.txt
+++ b/Documentation/filesystems/nfs/nfs41-server.txt
@@ -41,7 +41,7 @@ interoperability problems with future clients. Known issues:
41 conformant with the spec (for example, we don't use kerberos 41 conformant with the spec (for example, we don't use kerberos
42 on the backchannel correctly). 42 on the backchannel correctly).
43 - no trunking support: no clients currently take advantage of 43 - no trunking support: no clients currently take advantage of
44 trunking, but this is a mandatory failure, and its use is 44 trunking, but this is a mandatory feature, and its use is
45 recommended to clients in a number of places. (E.g. to ensure 45 recommended to clients in a number of places. (E.g. to ensure
46 timely renewal in case an existing connection's retry timeouts 46 timely renewal in case an existing connection's retry timeouts
47 have gotten too long; see section 8.3 of the draft.) 47 have gotten too long; see section 8.3 of the draft.)
@@ -213,3 +213,10 @@ The following cases aren't supported yet:
213 DESTROY_CLIENTID, DESTROY_SESSION, EXCHANGE_ID. 213 DESTROY_CLIENTID, DESTROY_SESSION, EXCHANGE_ID.
214* DESTROY_SESSION MUST be the final operation in the COMPOUND request. 214* DESTROY_SESSION MUST be the final operation in the COMPOUND request.
215 215
216Nonstandard compound limitations:
217* No support for a sessions fore channel RPC compound that requires both a
218 ca_maxrequestsize request and a ca_maxresponsesize reply, so we may
219 fail to live up to the promise we made in CREATE_SESSION fore channel
220 negotiation.
221* No more than one IO operation (read, write, readdir) allowed per
222 compound.
diff --git a/Documentation/filesystems/nfsroot.txt b/Documentation/filesystems/nfs/nfsroot.txt
index 3ba0b945aaf8..3ba0b945aaf8 100644
--- a/Documentation/filesystems/nfsroot.txt
+++ b/Documentation/filesystems/nfs/nfsroot.txt
diff --git a/Documentation/filesystems/rpc-cache.txt b/Documentation/filesystems/nfs/rpc-cache.txt
index 8a382bea6808..8a382bea6808 100644
--- a/Documentation/filesystems/rpc-cache.txt
+++ b/Documentation/filesystems/nfs/rpc-cache.txt
diff --git a/Documentation/filesystems/nilfs2.txt b/Documentation/filesystems/nilfs2.txt
index 4949fcaa6b6a..839efd8a8a8c 100644
--- a/Documentation/filesystems/nilfs2.txt
+++ b/Documentation/filesystems/nilfs2.txt
@@ -28,7 +28,7 @@ described in the man pages included in the package.
28Project web page: http://www.nilfs.org/en/ 28Project web page: http://www.nilfs.org/en/
29Download page: http://www.nilfs.org/en/download.html 29Download page: http://www.nilfs.org/en/download.html
30Git tree web page: http://www.nilfs.org/git/ 30Git tree web page: http://www.nilfs.org/git/
31NILFS mailing lists: http://www.nilfs.org/mailman/listinfo/users 31List info: http://vger.kernel.org/vger-lists.html#linux-nilfs
32 32
33Caveats 33Caveats
34======= 34=======
diff --git a/Documentation/filesystems/porting b/Documentation/filesystems/porting
index 92b888d540a6..a7e9746ee7ea 100644
--- a/Documentation/filesystems/porting
+++ b/Documentation/filesystems/porting
@@ -140,7 +140,7 @@ Callers of notify_change() need ->i_mutex now.
140New super_block field "struct export_operations *s_export_op" for 140New super_block field "struct export_operations *s_export_op" for
141explicit support for exporting, e.g. via NFS. The structure is fully 141explicit support for exporting, e.g. via NFS. The structure is fully
142documented at its declaration in include/linux/fs.h, and in 142documented at its declaration in include/linux/fs.h, and in
143Documentation/filesystems/Exporting. 143Documentation/filesystems/nfs/Exporting.
144 144
145Briefly it allows for the definition of decode_fh and encode_fh operations 145Briefly it allows for the definition of decode_fh and encode_fh operations
146to encode and decode filehandles, and allows the filesystem to use 146to encode and decode filehandles, and allows the filesystem to use
diff --git a/Documentation/filesystems/proc.txt b/Documentation/filesystems/proc.txt
index 94b9f2056f4c..0d07513a67a6 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------------------------------------------------------------------------------
@@ -176,7 +177,6 @@ read the file /proc/PID/status:
176 CapBnd: ffffffffffffffff 177 CapBnd: ffffffffffffffff
177 voluntary_ctxt_switches: 0 178 voluntary_ctxt_switches: 0
178 nonvoluntary_ctxt_switches: 1 179 nonvoluntary_ctxt_switches: 1
179 Stack usage: 12 kB
180 180
181This shows you nearly the same information you would get if you viewed it with 181This shows you nearly the same information you would get if you viewed it with
182the ps command. In fact, ps uses the proc file system to obtain its 182the ps command. In fact, ps uses the proc file system to obtain its
@@ -230,7 +230,6 @@ Table 1-2: Contents of the statm files (as of 2.6.30-rc7)
230 Mems_allowed_list Same as previous, but in "list format" 230 Mems_allowed_list Same as previous, but in "list format"
231 voluntary_ctxt_switches number of voluntary context switches 231 voluntary_ctxt_switches number of voluntary context switches
232 nonvoluntary_ctxt_switches number of non voluntary context switches 232 nonvoluntary_ctxt_switches number of non voluntary context switches
233 Stack usage: stack usage high water mark (round up to page size)
234.............................................................................. 233..............................................................................
235 234
236Table 1-3: Contents of the statm files (as of 2.6.8-rc3) 235Table 1-3: Contents of the statm files (as of 2.6.8-rc3)
@@ -1409,3 +1408,11 @@ For more information on mount propagation see:
1409 1408
1410 Documentation/filesystems/sharedsubtree.txt 1409 Documentation/filesystems/sharedsubtree.txt
1411 1410
1411
14123.6 /proc/<pid>/comm & /proc/<pid>/task/<tid>/comm
1413--------------------------------------------------------
1414These files provide a method to access a tasks comm value. It also allows for
1415a task to set its own or one of its thread siblings comm value. The comm value
1416is limited in size compared to the cmdline value, so writing anything longer
1417then the kernel's TASK_COMM_LEN (currently 16 chars) will result in a truncated
1418comm value.
diff --git a/Documentation/filesystems/seq_file.txt b/Documentation/filesystems/seq_file.txt
index 0d15ebccf5b0..a1e2e0dda907 100644
--- a/Documentation/filesystems/seq_file.txt
+++ b/Documentation/filesystems/seq_file.txt
@@ -248,9 +248,7 @@ code, that is done in the initialization code in the usual way:
248 { 248 {
249 struct proc_dir_entry *entry; 249 struct proc_dir_entry *entry;
250 250
251 entry = create_proc_entry("sequence", 0, NULL); 251 proc_create("sequence", 0, NULL, &ct_file_ops);
252 if (entry)
253 entry->proc_fops = &ct_file_ops;
254 return 0; 252 return 0;
255 } 253 }
256 254
diff --git a/Documentation/filesystems/sysfs.txt b/Documentation/filesystems/sysfs.txt
index b245d524d568..931c806642c5 100644
--- a/Documentation/filesystems/sysfs.txt
+++ b/Documentation/filesystems/sysfs.txt
@@ -91,8 +91,8 @@ struct device_attribute {
91 const char *buf, size_t count); 91 const char *buf, size_t count);
92}; 92};
93 93
94int device_create_file(struct device *, struct device_attribute *); 94int device_create_file(struct device *, const struct device_attribute *);
95void device_remove_file(struct device *, struct device_attribute *); 95void device_remove_file(struct device *, const struct device_attribute *);
96 96
97It also defines this helper for defining device attributes: 97It also defines this helper for defining device attributes:
98 98
@@ -316,8 +316,8 @@ DEVICE_ATTR(_name, _mode, _show, _store);
316 316
317Creation/Removal: 317Creation/Removal:
318 318
319int device_create_file(struct device *device, struct device_attribute * attr); 319int device_create_file(struct device *dev, const struct device_attribute * attr);
320void device_remove_file(struct device * dev, struct device_attribute * attr); 320void device_remove_file(struct device *dev, const struct device_attribute * attr);
321 321
322 322
323- bus drivers (include/linux/device.h) 323- bus drivers (include/linux/device.h)
@@ -358,7 +358,7 @@ DRIVER_ATTR(_name, _mode, _show, _store)
358 358
359Creation/Removal: 359Creation/Removal:
360 360
361int driver_create_file(struct device_driver *, struct driver_attribute *); 361int driver_create_file(struct device_driver *, const struct driver_attribute *);
362void driver_remove_file(struct device_driver *, struct driver_attribute *); 362void driver_remove_file(struct device_driver *, const struct driver_attribute *);
363 363
364 364
diff --git a/Documentation/gpio.txt b/Documentation/gpio.txt
index e4e7daed2ba8..1866c27eec69 100644
--- a/Documentation/gpio.txt
+++ b/Documentation/gpio.txt
@@ -531,6 +531,13 @@ 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
534 "active_low" ... reads as either 0 (false) or 1 (true). Write
535 any nonzero value to invert the value attribute both
536 for reading and writing. Existing and subsequent
537 poll(2) support configuration via the edge attribute
538 for "rising" and "falling" edges will follow this
539 setting.
540
534GPIO controllers have paths like /sys/class/gpio/gpiochip42/ (for the 541GPIO controllers have paths like /sys/class/gpio/gpiochip42/ (for the
535controller implementing GPIOs starting at #42) and have the following 542controller implementing GPIOs starting at #42) and have the following
536read-only attributes: 543read-only attributes:
@@ -566,6 +573,8 @@ requested using gpio_request():
566 int gpio_export_link(struct device *dev, const char *name, 573 int gpio_export_link(struct device *dev, const char *name,
567 unsigned gpio) 574 unsigned gpio)
568 575
576 /* change the polarity of a GPIO node in sysfs */
577 int gpio_sysfs_set_active_low(unsigned gpio, int value);
569 578
570After a kernel driver requests a GPIO, it may only be made available in 579After a kernel driver requests a GPIO, it may only be made available in
571the sysfs interface by gpio_export(). The driver can control whether the 580the sysfs interface by gpio_export(). The driver can control whether the
@@ -580,3 +589,9 @@ After the GPIO has been exported, gpio_export_link() allows creating
580symlinks from elsewhere in sysfs to the GPIO sysfs node. Drivers can 589symlinks from elsewhere in sysfs to the GPIO sysfs node. Drivers can
581use this to provide the interface under their own device in sysfs with 590use this to provide the interface under their own device in sysfs with
582a descriptive name. 591a descriptive name.
592
593Drivers can use gpio_sysfs_set_active_low() to hide GPIO line polarity
594differences between boards from user space. This only affects the
595sysfs interface. Polarity change can be done both before and after
596gpio_export(), and previously enabled poll(2) support for either
597rising or falling edge will be reconfigured to follow this setting.
diff --git a/Documentation/hwmon/amc6821 b/Documentation/hwmon/amc6821
new file mode 100644
index 000000000000..ced8359c50f8
--- /dev/null
+++ b/Documentation/hwmon/amc6821
@@ -0,0 +1,102 @@
1Kernel driver amc6821
2=====================
3
4Supported chips:
5 Texas Instruments AMC6821
6 Prefix: 'amc6821'
7 Addresses scanned: 0x18, 0x19, 0x1a, 0x2c, 0x2d, 0x2e, 0x4c, 0x4d, 0x4e
8 Datasheet: http://focus.ti.com/docs/prod/folders/print/amc6821.html
9
10Authors:
11 Tomaz Mertelj <tomaz.mertelj@guest.arnes.si>
12
13
14Description
15-----------
16
17This driver implements support for the Texas Instruments amc6821 chip.
18The chip has one on-chip and one remote temperature sensor and one pwm fan
19regulator.
20The pwm can be controlled either from software or automatically.
21
22The driver provides the following sensor accesses in sysfs:
23
24temp1_input ro on-chip temperature
25temp1_min rw "
26temp1_max rw "
27temp1_crit rw "
28temp1_min_alarm ro "
29temp1_max_alarm ro "
30temp1_crit_alarm ro "
31
32temp2_input ro remote temperature
33temp2_min rw "
34temp2_max rw "
35temp2_crit rw "
36temp2_min_alarm ro "
37temp2_max_alarm ro "
38temp2_crit_alarm ro "
39temp2_fault ro "
40
41fan1_input ro tachometer speed
42fan1_min rw "
43fan1_max rw "
44fan1_fault ro "
45fan1_div rw Fan divisor can be either 2 or 4.
46
47pwm1 rw pwm1
48pwm1_enable rw regulator mode, 1=open loop, 2=fan controlled
49 by remote temperature, 3=fan controlled by
50 combination of the on-chip temperature and
51 remote-sensor temperature,
52pwm1_auto_channels_temp ro 1 if pwm_enable==2, 3 if pwm_enable==3
53pwm1_auto_point1_pwm ro Hardwired to 0, shared for both
54 temperature channels.
55pwm1_auto_point2_pwm rw This value is shared for both temperature
56 channels.
57pwm1_auto_point3_pwm rw Hardwired to 255, shared for both
58 temperature channels.
59
60temp1_auto_point1_temp ro Hardwired to temp2_auto_point1_temp
61 which is rw. Below this temperature fan stops.
62temp1_auto_point2_temp rw The low-temperature limit of the proportional
63 range. Below this temperature
64 pwm1 = pwm1_auto_point2_pwm. It can go from
65 0 degree C to 124 degree C in steps of
66 4 degree C. Read it out after writing to get
67 the actual value.
68temp1_auto_point3_temp rw Above this temperature fan runs at maximum
69 speed. It can go from temp1_auto_point2_temp.
70 It can only have certain discrete values
71 which depend on temp1_auto_point2_temp and
72 pwm1_auto_point2_pwm. Read it out after
73 writing to get the actual value.
74
75temp2_auto_point1_temp rw Must be between 0 degree C and 63 degree C and
76 it defines the passive cooling temperature.
77 Below this temperature the fan stops in
78 the closed loop mode.
79temp2_auto_point2_temp rw The low-temperature limit of the proportional
80 range. Below this temperature
81 pwm1 = pwm1_auto_point2_pwm. It can go from
82 0 degree C to 124 degree C in steps
83 of 4 degree C.
84
85temp2_auto_point3_temp rw Above this temperature fan runs at maximum
86 speed. It can only have certain discrete
87 values which depend on temp2_auto_point2_temp
88 and pwm1_auto_point2_pwm. Read it out after
89 writing to get actual value.
90
91
92Module parameters
93-----------------
94
95If your board has a BIOS that initializes the amc6821 correctly, you should
96load the module with: init=0.
97
98If your board BIOS doesn't initialize the chip, or you want
99different settings, you can set the following parameters:
100init=1,
101pwminv: 0 default pwm output, 1 inverts pwm output.
102
diff --git a/Documentation/hwmon/k10temp b/Documentation/hwmon/k10temp
new file mode 100644
index 000000000000..6526eee525a6
--- /dev/null
+++ b/Documentation/hwmon/k10temp
@@ -0,0 +1,65 @@
1Kernel driver k10temp
2=====================
3
4Supported chips:
5* AMD Family 10h processors:
6 Socket F: Quad-Core/Six-Core/Embedded Opteron (but see below)
7 Socket AM2+: Quad-Core Opteron, Phenom (II) X3/X4, Athlon X2 (but see below)
8 Socket AM3: Quad-Core Opteron, Athlon/Phenom II X2/X3/X4, Sempron II
9 Socket S1G3: Athlon II, Sempron, Turion II
10* AMD Family 11h processors:
11 Socket S1G2: Athlon (X2), Sempron (X2), Turion X2 (Ultra)
12
13 Prefix: 'k10temp'
14 Addresses scanned: PCI space
15 Datasheets:
16 BIOS and Kernel Developer's Guide (BKDG) For AMD Family 10h Processors:
17 http://support.amd.com/us/Processor_TechDocs/31116.pdf
18 BIOS and Kernel Developer's Guide (BKDG) for AMD Family 11h Processors:
19 http://support.amd.com/us/Processor_TechDocs/41256.pdf
20 Revision Guide for AMD Family 10h Processors:
21 http://support.amd.com/us/Processor_TechDocs/41322.pdf
22 Revision Guide for AMD Family 11h Processors:
23 http://support.amd.com/us/Processor_TechDocs/41788.pdf
24 AMD Family 11h Processor Power and Thermal Data Sheet for Notebooks:
25 http://support.amd.com/us/Processor_TechDocs/43373.pdf
26 AMD Family 10h Server and Workstation Processor Power and Thermal Data Sheet:
27 http://support.amd.com/us/Processor_TechDocs/43374.pdf
28 AMD Family 10h Desktop Processor Power and Thermal Data Sheet:
29 http://support.amd.com/us/Processor_TechDocs/43375.pdf
30
31Author: Clemens Ladisch <clemens@ladisch.de>
32
33Description
34-----------
35
36This driver permits reading of the internal temperature sensor of AMD
37Family 10h and 11h processors.
38
39All these processors have a sensor, but on those for Socket F or AM2+,
40the sensor may return inconsistent values (erratum 319). The driver
41will refuse to load on these revisions unless you specify the "force=1"
42module parameter.
43
44Due to technical reasons, the driver can detect only the mainboard's
45socket type, not the processor's actual capabilities. Therefore, if you
46are using an AM3 processor on an AM2+ mainboard, you can safely use the
47"force=1" parameter.
48
49There is one temperature measurement value, available as temp1_input in
50sysfs. It is measured in degrees Celsius with a resolution of 1/8th degree.
51Please note that it is defined as a relative value; to quote the AMD manual:
52
53 Tctl is the processor temperature control value, used by the platform to
54 control cooling systems. Tctl is a non-physical temperature on an
55 arbitrary scale measured in degrees. It does _not_ represent an actual
56 physical temperature like die or case temperature. Instead, it specifies
57 the processor temperature relative to the point at which the system must
58 supply the maximum cooling for the processor's specified maximum case
59 temperature and maximum thermal power dissipation.
60
61The maximum value for Tctl is available in the file temp1_max.
62
63If the BIOS has enabled hardware temperature control, the threshold at
64which the processor will throttle itself to avoid damage is available in
65temp1_crit and temp1_crit_hyst.
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/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/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/infiniband/ipoib.txt b/Documentation/infiniband/ipoib.txt
index 6d40f00b358c..64eeb55d0c09 100644
--- a/Documentation/infiniband/ipoib.txt
+++ b/Documentation/infiniband/ipoib.txt
@@ -36,11 +36,11 @@ Datagram vs Connected modes
36 fabric with a 2K MTU, the IPoIB MTU will be 2048 - 4 = 2044 bytes. 36 fabric with a 2K MTU, the IPoIB MTU will be 2048 - 4 = 2044 bytes.
37 37
38 In connected mode, the IB RC (Reliable Connected) transport is used. 38 In connected mode, the IB RC (Reliable Connected) transport is used.
39 Connected mode is to takes advantage of the connected nature of the 39 Connected mode takes advantage of the connected nature of the IB
40 IB transport and allows an MTU up to the maximal IP packet size of 40 transport and allows an MTU up to the maximal IP packet size of 64K,
41 64K, which reduces the number of IP packets needed for handling 41 which reduces the number of IP packets needed for handling large UDP
42 large UDP datagrams, TCP segments, etc and increases the performance 42 datagrams, TCP segments, etc and increases the performance for large
43 for large messages. 43 messages.
44 44
45 In connected mode, the interface's UD QP is still used for multicast 45 In connected mode, the interface's UD QP is still used for multicast
46 and communication with peers that don't support connected mode. In 46 and communication with peers that don't support connected mode. In
diff --git a/Documentation/ioctl/ioctl-number.txt b/Documentation/ioctl/ioctl-number.txt
index 947374977ca5..35cf64d4436d 100644
--- a/Documentation/ioctl/ioctl-number.txt
+++ b/Documentation/ioctl/ioctl-number.txt
@@ -56,10 +56,11 @@ Following this convention is good because:
56(5) When following the convention, the driver code can use generic 56(5) When following the convention, the driver code can use generic
57 code to copy the parameters between user and kernel space. 57 code to copy the parameters between user and kernel space.
58 58
59This table lists ioctls visible from user land for Linux/i386. It contains 59This table lists ioctls visible from user land for Linux/x86. It contains
60most drivers up to 2.3.14, but I know I am missing some. 60most drivers up to 2.6.31, but I know I am missing some. There has been
61no attempt to list non-X86 architectures or ioctls from drivers/staging/.
61 62
62Code Seq# Include File Comments 63Code Seq#(hex) Include File Comments
63======================================================== 64========================================================
640x00 00-1F linux/fs.h conflict! 650x00 00-1F linux/fs.h conflict!
650x00 00-1F scsi/scsi_ioctl.h conflict! 660x00 00-1F scsi/scsi_ioctl.h conflict!
@@ -69,119 +70,228 @@ Code Seq# Include File Comments
690x03 all linux/hdreg.h 700x03 all linux/hdreg.h
700x04 D2-DC linux/umsdos_fs.h Dead since 2.6.11, but don't reuse these. 710x04 D2-DC linux/umsdos_fs.h Dead since 2.6.11, but don't reuse these.
710x06 all linux/lp.h 720x06 all linux/lp.h
720x09 all linux/md.h 730x09 all linux/raid/md_u.h
740x10 00-0F drivers/char/s390/vmcp.h
730x12 all linux/fs.h 750x12 all linux/fs.h
74 linux/blkpg.h 76 linux/blkpg.h
750x1b all InfiniBand Subsystem <http://www.openib.org/> 770x1b all InfiniBand Subsystem <http://www.openib.org/>
760x20 all drivers/cdrom/cm206.h 780x20 all drivers/cdrom/cm206.h
770x22 all scsi/sg.h 790x22 all scsi/sg.h
78'#' 00-3F IEEE 1394 Subsystem Block for the entire subsystem 80'#' 00-3F IEEE 1394 Subsystem Block for the entire subsystem
81'$' 00-0F linux/perf_counter.h, linux/perf_event.h
79'1' 00-1F <linux/timepps.h> PPS kit from Ulrich Windl 82'1' 00-1F <linux/timepps.h> PPS kit from Ulrich Windl
80 <ftp://ftp.de.kernel.org/pub/linux/daemons/ntp/PPS/> 83 <ftp://ftp.de.kernel.org/pub/linux/daemons/ntp/PPS/>
84'2' 01-04 linux/i2o.h
85'3' 00-0F drivers/s390/char/raw3270.h conflict!
86'3' 00-1F linux/suspend_ioctls.h conflict!
87 and kernel/power/user.c
81'8' all SNP8023 advanced NIC card 88'8' all SNP8023 advanced NIC card
82 <mailto:mcr@solidum.com> 89 <mailto:mcr@solidum.com>
83'A' 00-1F linux/apm_bios.h 90'@' 00-0F linux/radeonfb.h conflict!
91'@' 00-0F drivers/video/aty/aty128fb.c conflict!
92'A' 00-1F linux/apm_bios.h conflict!
93'A' 00-0F linux/agpgart.h conflict!
94 and drivers/char/agp/compat_ioctl.h
95'A' 00-7F sound/asound.h conflict!
96'B' 00-1F linux/cciss_ioctl.h conflict!
97'B' 00-0F include/linux/pmu.h conflict!
84'B' C0-FF advanced bbus 98'B' C0-FF advanced bbus
85 <mailto:maassen@uni-freiburg.de> 99 <mailto:maassen@uni-freiburg.de>
86'C' all linux/soundcard.h 100'C' all linux/soundcard.h conflict!
101'C' 01-2F linux/capi.h conflict!
102'C' F0-FF drivers/net/wan/cosa.h conflict!
87'D' all arch/s390/include/asm/dasd.h 103'D' all arch/s390/include/asm/dasd.h
88'E' all linux/input.h 104'D' 40-5F drivers/scsi/dpt/dtpi_ioctl.h
89'F' all linux/fb.h 105'D' 05 drivers/scsi/pmcraid.h
90'H' all linux/hiddev.h 106'E' all linux/input.h conflict!
91'I' all linux/isdn.h 107'E' 00-0F xen/evtchn.h conflict!
108'F' all linux/fb.h conflict!
109'F' 01-02 drivers/scsi/pmcraid.h conflict!
110'F' 20 drivers/video/fsl-diu-fb.h conflict!
111'F' 20 drivers/video/intelfb/intelfb.h conflict!
112'F' 20 linux/ivtvfb.h conflict!
113'F' 20 linux/matroxfb.h conflict!
114'F' 20 drivers/video/aty/atyfb_base.c conflict!
115'F' 00-0F video/da8xx-fb.h conflict!
116'F' 80-8F linux/arcfb.h conflict!
117'F' DD video/sstfb.h conflict!
118'G' 00-3F drivers/misc/sgi-gru/grulib.h conflict!
119'G' 00-0F linux/gigaset_dev.h conflict!
120'H' 00-7F linux/hiddev.h conflict!
121'H' 00-0F linux/hidraw.h conflict!
122'H' 00-0F sound/asound.h conflict!
123'H' 20-40 sound/asound_fm.h conflict!
124'H' 80-8F sound/sfnt_info.h conflict!
125'H' 10-8F sound/emu10k1.h conflict!
126'H' 10-1F sound/sb16_csp.h conflict!
127'H' 10-1F sound/hda_hwdep.h conflict!
128'H' 40-4F sound/hdspm.h conflict!
129'H' 40-4F sound/hdsp.h conflict!
130'H' 90 sound/usb/usx2y/usb_stream.h
131'H' C0-F0 net/bluetooth/hci.h conflict!
132'H' C0-DF net/bluetooth/hidp/hidp.h conflict!
133'H' C0-DF net/bluetooth/cmtp/cmtp.h conflict!
134'H' C0-DF net/bluetooth/bnep/bnep.h conflict!
135'I' all linux/isdn.h conflict!
136'I' 00-0F drivers/isdn/divert/isdn_divert.h conflict!
137'I' 40-4F linux/mISDNif.h conflict!
92'J' 00-1F drivers/scsi/gdth_ioctl.h 138'J' 00-1F drivers/scsi/gdth_ioctl.h
93'K' all linux/kd.h 139'K' all linux/kd.h
94'L' 00-1F linux/loop.h 140'L' 00-1F linux/loop.h conflict!
95'L' 20-2F driver/usb/misc/vstusb.h 141'L' 10-1F drivers/scsi/mpt2sas/mpt2sas_ctl.h conflict!
142'L' 20-2F linux/usb/vstusb.h
96'L' E0-FF linux/ppdd.h encrypted disk device driver 143'L' E0-FF linux/ppdd.h encrypted disk device driver
97 <http://linux01.gwdg.de/~alatham/ppdd.html> 144 <http://linux01.gwdg.de/~alatham/ppdd.html>
98'M' all linux/soundcard.h 145'M' all linux/soundcard.h conflict!
146'M' 01-16 mtd/mtd-abi.h conflict!
147 and drivers/mtd/mtdchar.c
148'M' 01-03 drivers/scsi/megaraid/megaraid_sas.h
149'M' 00-0F drivers/video/fsl-diu-fb.h conflict!
99'N' 00-1F drivers/usb/scanner.h 150'N' 00-1F drivers/usb/scanner.h
100'O' 00-02 include/mtd/ubi-user.h UBI 151'O' 00-06 mtd/ubi-user.h UBI
101'P' all linux/soundcard.h 152'P' all linux/soundcard.h conflict!
153'P' 60-6F sound/sscape_ioctl.h conflict!
154'P' 00-0F drivers/usb/class/usblp.c conflict!
102'Q' all linux/soundcard.h 155'Q' all linux/soundcard.h
103'R' 00-1F linux/random.h 156'R' 00-1F linux/random.h conflict!
157'R' 01 linux/rfkill.h conflict!
158'R' 01-0F media/rds.h conflict!
159'R' C0-DF net/bluetooth/rfcomm.h
104'S' all linux/cdrom.h conflict! 160'S' all linux/cdrom.h conflict!
105'S' 80-81 scsi/scsi_ioctl.h conflict! 161'S' 80-81 scsi/scsi_ioctl.h conflict!
106'S' 82-FF scsi/scsi.h conflict! 162'S' 82-FF scsi/scsi.h conflict!
163'S' 00-7F sound/asequencer.h conflict!
107'T' all linux/soundcard.h conflict! 164'T' all linux/soundcard.h conflict!
165'T' 00-AF sound/asound.h conflict!
108'T' all arch/x86/include/asm/ioctls.h conflict! 166'T' all arch/x86/include/asm/ioctls.h conflict!
109'U' 00-EF linux/drivers/usb/usb.h 167'T' C0-DF linux/if_tun.h conflict!
110'V' all linux/vt.h 168'U' all sound/asound.h conflict!
169'U' 00-0F drivers/media/video/uvc/uvcvideo.h conflict!
170'U' 00-CF linux/uinput.h conflict!
171'U' 00-EF linux/usbdevice_fs.h
172'U' C0-CF drivers/bluetooth/hci_uart.h
173'V' all linux/vt.h conflict!
174'V' all linux/videodev2.h conflict!
175'V' C0 linux/ivtvfb.h conflict!
176'V' C0 linux/ivtv.h conflict!
177'V' C0 media/davinci/vpfe_capture.h conflict!
178'V' C0 media/si4713.h conflict!
179'V' C0-CF drivers/media/video/mxb.h conflict!
111'W' 00-1F linux/watchdog.h conflict! 180'W' 00-1F linux/watchdog.h conflict!
112'W' 00-1F linux/wanrouter.h conflict! 181'W' 00-1F linux/wanrouter.h conflict!
113'X' all linux/xfs_fs.h 182'W' 00-3F sound/asound.h conflict!
183'X' all fs/xfs/xfs_fs.h conflict!
184 and fs/xfs/linux-2.6/xfs_ioctl32.h
185 and include/linux/falloc.h
186 and linux/fs.h
187'X' all fs/ocfs2/ocfs_fs.h conflict!
188'X' 01 linux/pktcdvd.h conflict!
114'Y' all linux/cyclades.h 189'Y' all linux/cyclades.h
115'[' 00-07 linux/usb/usbtmc.h USB Test and Measurement Devices 190'Z' 14-15 drivers/message/fusion/mptctl.h
191'[' 00-07 linux/usb/tmc.h USB Test and Measurement Devices
116 <mailto:gregkh@suse.de> 192 <mailto:gregkh@suse.de>
117'a' all ATM on linux 193'a' all linux/atm*.h, linux/sonet.h ATM on linux
118 <http://lrcwww.epfl.ch/linux-atm/magic.html> 194 <http://lrcwww.epfl.ch/linux-atm/magic.html>
119'b' 00-FF bit3 vme host bridge 195'b' 00-FF conflict! bit3 vme host bridge
120 <mailto:natalia@nikhefk.nikhef.nl> 196 <mailto:natalia@nikhefk.nikhef.nl>
197'b' 00-0F media/bt819.h conflict!
198'c' all linux/cm4000_cs.h conflict!
121'c' 00-7F linux/comstats.h conflict! 199'c' 00-7F linux/comstats.h conflict!
122'c' 00-7F linux/coda.h conflict! 200'c' 00-7F linux/coda.h conflict!
123'c' 80-9F arch/s390/include/asm/chsc.h 201'c' 00-1F linux/chio.h conflict!
124'c' A0-AF arch/x86/include/asm/msr.h 202'c' 80-9F arch/s390/include/asm/chsc.h conflict!
203'c' A0-AF arch/x86/include/asm/msr.h conflict!
125'd' 00-FF linux/char/drm/drm/h conflict! 204'd' 00-FF linux/char/drm/drm/h conflict!
205'd' 02-40 pcmcia/ds.h conflict!
206'd' 10-3F drivers/media/video/dabusb.h conflict!
207'd' C0-CF drivers/media/video/saa7191.h conflict!
126'd' F0-FF linux/digi1.h 208'd' F0-FF linux/digi1.h
127'e' all linux/digi1.h conflict! 209'e' all linux/digi1.h conflict!
128'e' 00-1F net/irda/irtty.h conflict! 210'e' 00-1F drivers/net/irda/irtty-sir.h conflict!
129'f' 00-1F linux/ext2_fs.h 211'f' 00-1F linux/ext2_fs.h conflict!
130'h' 00-7F Charon filesystem 212'f' 00-1F linux/ext3_fs.h conflict!
213'f' 00-0F fs/jfs/jfs_dinode.h conflict!
214'f' 00-0F fs/ext4/ext4.h conflict!
215'f' 00-0F linux/fs.h conflict!
216'f' 00-0F fs/ocfs2/ocfs2_fs.h conflict!
217'g' 00-0F linux/usb/gadgetfs.h
218'g' 20-2F linux/usb/g_printer.h
219'h' 00-7F conflict! Charon filesystem
131 <mailto:zapman@interlan.net> 220 <mailto:zapman@interlan.net>
132'i' 00-3F linux/i2o.h 221'h' 00-1F linux/hpet.h conflict!
222'i' 00-3F linux/i2o-dev.h conflict!
223'i' 0B-1F linux/ipmi.h conflict!
224'i' 80-8F linux/i8k.h
133'j' 00-3F linux/joystick.h 225'j' 00-3F linux/joystick.h
226'k' 00-0F linux/spi/spidev.h conflict!
227'k' 00-05 video/kyro.h conflict!
134'l' 00-3F linux/tcfs_fs.h transparent cryptographic file system 228'l' 00-3F linux/tcfs_fs.h transparent cryptographic file system
135 <http://mikonos.dia.unisa.it/tcfs> 229 <http://mikonos.dia.unisa.it/tcfs>
136'l' 40-7F linux/udf_fs_i.h in development: 230'l' 40-7F linux/udf_fs_i.h in development:
137 <http://sourceforge.net/projects/linux-udf/> 231 <http://sourceforge.net/projects/linux-udf/>
138'm' 00-09 linux/mmtimer.h 232'm' 00-09 linux/mmtimer.h conflict!
139'm' all linux/mtio.h conflict! 233'm' all linux/mtio.h conflict!
140'm' all linux/soundcard.h conflict! 234'm' all linux/soundcard.h conflict!
141'm' all linux/synclink.h conflict! 235'm' all linux/synclink.h conflict!
236'm' 00-19 drivers/message/fusion/mptctl.h conflict!
237'm' 00 drivers/scsi/megaraid/megaraid_ioctl.h conflict!
142'm' 00-1F net/irda/irmod.h conflict! 238'm' 00-1F net/irda/irmod.h conflict!
143'n' 00-7F linux/ncp_fs.h 239'n' 00-7F linux/ncp_fs.h and fs/ncpfs/ioctl.c
144'n' 80-8F linux/nilfs2_fs.h NILFS2 240'n' 80-8F linux/nilfs2_fs.h NILFS2
145'n' E0-FF video/matrox.h matroxfb 241'n' E0-FF linux/matroxfb.h matroxfb
146'o' 00-1F fs/ocfs2/ocfs2_fs.h OCFS2 242'o' 00-1F fs/ocfs2/ocfs2_fs.h OCFS2
147'o' 00-03 include/mtd/ubi-user.h conflict! (OCFS2 and UBI overlaps) 243'o' 00-03 mtd/ubi-user.h conflict! (OCFS2 and UBI overlaps)
148'o' 40-41 include/mtd/ubi-user.h UBI 244'o' 40-41 mtd/ubi-user.h UBI
149'o' 01-A1 include/linux/dvb/*.h DVB 245'o' 01-A1 linux/dvb/*.h DVB
150'p' 00-0F linux/phantom.h conflict! (OpenHaptics needs this) 246'p' 00-0F linux/phantom.h conflict! (OpenHaptics needs this)
247'p' 00-1F linux/rtc.h conflict!
151'p' 00-3F linux/mc146818rtc.h conflict! 248'p' 00-3F linux/mc146818rtc.h conflict!
152'p' 40-7F linux/nvram.h 249'p' 40-7F linux/nvram.h
153'p' 80-9F user-space parport 250'p' 80-9F linux/ppdev.h user-space parport
154 <mailto:tim@cyberelk.net> 251 <mailto:tim@cyberelk.net>
155'p' a1-a4 linux/pps.h LinuxPPS 252'p' A1-A4 linux/pps.h LinuxPPS
156 <mailto:giometti@linux.it> 253 <mailto:giometti@linux.it>
157'q' 00-1F linux/serio.h 254'q' 00-1F linux/serio.h
158'q' 80-FF Internet PhoneJACK, Internet LineJACK 255'q' 80-FF linux/telephony.h Internet PhoneJACK, Internet LineJACK
159 <http://www.quicknet.net> 256 linux/ixjuser.h <http://www.quicknet.net>
160'r' 00-1F linux/msdos_fs.h 257'r' 00-1F linux/msdos_fs.h and fs/fat/dir.c
161's' all linux/cdk.h 258's' all linux/cdk.h
162't' 00-7F linux/if_ppp.h 259't' 00-7F linux/if_ppp.h
163't' 80-8F linux/isdn_ppp.h 260't' 80-8F linux/isdn_ppp.h
261't' 90 linux/toshiba.h
164'u' 00-1F linux/smb_fs.h 262'u' 00-1F linux/smb_fs.h
165'v' 00-1F linux/ext2_fs.h conflict!
166'v' all linux/videodev.h conflict! 263'v' all linux/videodev.h conflict!
264'v' 00-1F linux/ext2_fs.h conflict!
265'v' 00-1F linux/fs.h conflict!
266'v' 00-0F linux/sonypi.h conflict!
267'v' C0-CF drivers/media/video/ov511.h conflict!
268'v' C0-DF media/pwc-ioctl.h conflict!
269'v' C0-FF linux/meye.h conflict!
270'v' C0-CF drivers/media/video/zoran/zoran.h conflict!
271'v' D0-DF drivers/media/video/cpia2/cpia2dev.h conflict!
167'w' all CERN SCI driver 272'w' all CERN SCI driver
168'y' 00-1F packet based user level communications 273'y' 00-1F packet based user level communications
169 <mailto:zapman@interlan.net> 274 <mailto:zapman@interlan.net>
170'z' 00-3F CAN bus card 275'z' 00-3F CAN bus card conflict!
171 <mailto:hdstich@connectu.ulm.circular.de> 276 <mailto:hdstich@connectu.ulm.circular.de>
172'z' 40-7F CAN bus card 277'z' 40-7F CAN bus card conflict!
173 <mailto:oe@port.de> 278 <mailto:oe@port.de>
279'z' 10-4F drivers/s390/crypto/zcrypt_api.h conflict!
1740x80 00-1F linux/fb.h 2800x80 00-1F linux/fb.h
1750x81 00-1F linux/videotext.h 2810x81 00-1F linux/videotext.h
2820x88 00-3F media/ovcamchip.h
1760x89 00-06 arch/x86/include/asm/sockios.h 2830x89 00-06 arch/x86/include/asm/sockios.h
1770x89 0B-DF linux/sockios.h 2840x89 0B-DF linux/sockios.h
1780x89 E0-EF linux/sockios.h SIOCPROTOPRIVATE range 2850x89 E0-EF linux/sockios.h SIOCPROTOPRIVATE range
2860x89 E0-EF linux/dn.h PROTOPRIVATE range
1790x89 F0-FF linux/sockios.h SIOCDEVPRIVATE range 2870x89 F0-FF linux/sockios.h SIOCDEVPRIVATE range
1800x8B all linux/wireless.h 2880x8B all linux/wireless.h
1810x8C 00-3F WiNRADiO driver 2890x8C 00-3F WiNRADiO driver
182 <http://www.proximity.com.au/~brian/winradio/> 290 <http://www.proximity.com.au/~brian/winradio/>
1830x90 00 drivers/cdrom/sbpcd.h 2910x90 00 drivers/cdrom/sbpcd.h
2920x92 00-0F drivers/usb/mon/mon_bin.c
1840x93 60-7F linux/auto_fs.h 2930x93 60-7F linux/auto_fs.h
2940x94 all fs/btrfs/ioctl.h
1850x99 00-0F 537-Addinboard driver 2950x99 00-0F 537-Addinboard driver
186 <mailto:buk@buks.ipn.de> 296 <mailto:buk@buks.ipn.de>
1870xA0 all linux/sdp/sdp.h Industrial Device Project 2970xA0 all linux/sdp/sdp.h Industrial Device Project
@@ -192,17 +302,22 @@ Code Seq# Include File Comments
1920xAB 00-1F linux/nbd.h 3020xAB 00-1F linux/nbd.h
1930xAC 00-1F linux/raw.h 3030xAC 00-1F linux/raw.h
1940xAD 00 Netfilter device in development: 3040xAD 00 Netfilter device in development:
195 <mailto:rusty@rustcorp.com.au> 305 <mailto:rusty@rustcorp.com.au>
1960xAE all linux/kvm.h Kernel-based Virtual Machine 3060xAE all linux/kvm.h Kernel-based Virtual Machine
197 <mailto:kvm@vger.kernel.org> 307 <mailto:kvm@vger.kernel.org>
1980xB0 all RATIO devices in development: 3080xB0 all RATIO devices in development:
199 <mailto:vgo@ratio.de> 309 <mailto:vgo@ratio.de>
2000xB1 00-1F PPPoX <mailto:mostrows@styx.uwaterloo.ca> 3100xB1 00-1F PPPoX <mailto:mostrows@styx.uwaterloo.ca>
3110xC0 00-0F linux/usb/iowarrior.h
2010xCB 00-1F CBM serial IEC bus in development: 3120xCB 00-1F CBM serial IEC bus in development:
202 <mailto:michael.klein@puffin.lb.shuttle.de> 313 <mailto:michael.klein@puffin.lb.shuttle.de>
3140xCD 01 linux/reiserfs_fs.h
3150xCF 02 fs/cifs/ioctl.c
3160xDB 00-0F drivers/char/mwave/mwavepub.h
2030xDD 00-3F ZFCP device driver see drivers/s390/scsi/ 3170xDD 00-3F ZFCP device driver see drivers/s390/scsi/
204 <mailto:aherrman@de.ibm.com> 318 <mailto:aherrman@de.ibm.com>
2050xF3 00-3F video/sisfb.h sisfb (in development) 3190xF3 00-3F drivers/usb/misc/sisusbvga/sisusb.h sisfb (in development)
206 <mailto:thomas@winischhofer.net> 320 <mailto:thomas@winischhofer.net>
2070xF4 00-1F video/mbxfb.h mbxfb 3210xF4 00-1F video/mbxfb.h mbxfb
208 <mailto:raph@8d.com> 322 <mailto:raph@8d.com>
3230xFD all linux/dm-ioctl.h
diff --git a/Documentation/kbuild/kbuild.txt b/Documentation/kbuild/kbuild.txt
index bb3bf38f03da..6f8c1cabbc5d 100644
--- a/Documentation/kbuild/kbuild.txt
+++ b/Documentation/kbuild/kbuild.txt
@@ -1,3 +1,17 @@
1Output files
2
3modules.order
4--------------------------------------------------
5This file records the order in which modules appear in Makefiles. This
6is used by modprobe to deterministically resolve aliases that match
7multiple modules.
8
9modules.builtin
10--------------------------------------------------
11This file lists all modules that are built into the kernel. This is used
12by modprobe to not fail when trying to load something builtin.
13
14
1Environment variables 15Environment variables
2 16
3KCPPFLAGS 17KCPPFLAGS
diff --git a/Documentation/kbuild/kconfig.txt b/Documentation/kbuild/kconfig.txt
index 849b5e56d06f..49efae703979 100644
--- a/Documentation/kbuild/kconfig.txt
+++ b/Documentation/kbuild/kconfig.txt
@@ -103,10 +103,16 @@ KCONFIG_AUTOCONFIG
103This environment variable can be set to specify the path & name of the 103This environment variable can be set to specify the path & name of the
104"auto.conf" file. Its default value is "include/config/auto.conf". 104"auto.conf" file. Its default value is "include/config/auto.conf".
105 105
106KCONFIG_TRISTATE
107--------------------------------------------------
108This environment variable can be set to specify the path & name of the
109"tristate.conf" file. Its default value is "include/config/tristate.conf".
110
106KCONFIG_AUTOHEADER 111KCONFIG_AUTOHEADER
107-------------------------------------------------- 112--------------------------------------------------
108This environment variable can be set to specify the path & name of the 113This environment variable can be set to specify the path & name of the
109"autoconf.h" (header) file. Its default value is "include/linux/autoconf.h". 114"autoconf.h" (header) file.
115Its default value is "include/generated/autoconf.h".
110 116
111 117
112====================================================================== 118======================================================================
diff --git a/Documentation/kernel-doc-nano-HOWTO.txt b/Documentation/kernel-doc-nano-HOWTO.txt
index 348b9e5e28fc..27a52b35d55b 100644
--- a/Documentation/kernel-doc-nano-HOWTO.txt
+++ b/Documentation/kernel-doc-nano-HOWTO.txt
@@ -214,11 +214,13 @@ The format of the block comment is like this:
214 * (section header: (section description)? )* 214 * (section header: (section description)? )*
215(*)?*/ 215(*)?*/
216 216
217The short function description ***cannot be multiline***, but the other 217All "description" text can span multiple lines, although the
218descriptions can be (and they can contain blank lines). If you continue 218function_name & its short description are traditionally on a single line.
219that initial short description onto a second line, that second line will 219Description text may also contain blank lines (i.e., lines that contain
220appear further down at the beginning of the description section, which is 220only a "*").
221almost certainly not what you had in mind. 221
222"section header:" names must be unique per function (or struct,
223union, typedef, enum).
222 224
223Avoid putting a spurious blank line after the function name, or else the 225Avoid putting a spurious blank line after the function name, or else the
224description will be repeated! 226description will be repeated!
diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt
index ab95d3ada5c7..736d45602886 100644
--- a/Documentation/kernel-parameters.txt
+++ b/Documentation/kernel-parameters.txt
@@ -240,7 +240,7 @@ and is between 256 and 4096 characters. It is defined in the file
240 240
241 acpi_sleep= [HW,ACPI] Sleep options 241 acpi_sleep= [HW,ACPI] Sleep options
242 Format: { s3_bios, s3_mode, s3_beep, s4_nohwsig, 242 Format: { s3_bios, s3_mode, s3_beep, s4_nohwsig,
243 old_ordering, s4_nonvs } 243 old_ordering, s4_nonvs, sci_force_enable }
244 See Documentation/power/video.txt for information on 244 See Documentation/power/video.txt for information on
245 s3_bios and s3_mode. 245 s3_bios and s3_mode.
246 s3_beep is for debugging; it makes the PC's speaker beep 246 s3_beep is for debugging; it makes the PC's speaker beep
@@ -253,6 +253,9 @@ and is between 256 and 4096 characters. It is defined in the file
253 of _PTS is used by default). 253 of _PTS is used by default).
254 s4_nonvs prevents the kernel from saving/restoring the 254 s4_nonvs prevents the kernel from saving/restoring the
255 ACPI NVS memory during hibernation. 255 ACPI NVS memory during hibernation.
256 sci_force_enable causes the kernel to set SCI_EN directly
257 on resume from S1/S3 (which is against the ACPI spec,
258 but some broken systems don't work without it).
256 259
257 acpi_use_timer_override [HW,ACPI] 260 acpi_use_timer_override [HW,ACPI]
258 Use timer override. For some broken Nvidia NF5 boards 261 Use timer override. For some broken Nvidia NF5 boards
@@ -1032,7 +1035,7 @@ and is between 256 and 4096 characters. It is defined in the file
1032 No delay 1035 No delay
1033 1036
1034 ip= [IP_PNP] 1037 ip= [IP_PNP]
1035 See Documentation/filesystems/nfsroot.txt. 1038 See Documentation/filesystems/nfs/nfsroot.txt.
1036 1039
1037 ip2= [HW] Set IO/IRQ pairs for up to 4 IntelliPort boards 1040 ip2= [HW] Set IO/IRQ pairs for up to 4 IntelliPort boards
1038 See comment before ip2_setup() in 1041 See comment before ip2_setup() in
@@ -1553,10 +1556,10 @@ and is between 256 and 4096 characters. It is defined in the file
1553 going to be removed in 2.6.29. 1556 going to be removed in 2.6.29.
1554 1557
1555 nfsaddrs= [NFS] 1558 nfsaddrs= [NFS]
1556 See Documentation/filesystems/nfsroot.txt. 1559 See Documentation/filesystems/nfs/nfsroot.txt.
1557 1560
1558 nfsroot= [NFS] nfs root filesystem for disk-less boxes. 1561 nfsroot= [NFS] nfs root filesystem for disk-less boxes.
1559 See Documentation/filesystems/nfsroot.txt. 1562 See Documentation/filesystems/nfs/nfsroot.txt.
1560 1563
1561 nfs.callback_tcpport= 1564 nfs.callback_tcpport=
1562 [NFS] set the TCP port on which the NFSv4 callback 1565 [NFS] set the TCP port on which the NFSv4 callback
@@ -2729,6 +2732,11 @@ and is between 256 and 4096 characters. It is defined in the file
2729 vmpoff= [KNL,S390] Perform z/VM CP command after power off. 2732 vmpoff= [KNL,S390] Perform z/VM CP command after power off.
2730 Format: <command> 2733 Format: <command>
2731 2734
2735 vt.cur_default= [VT] Default cursor shape.
2736 Format: 0xCCBBAA, where AA, BB, and CC are the same as
2737 the parameters of the <Esc>[?A;B;Cc escape sequence;
2738 see VGA-softcursor.txt. Default: 2 = underline.
2739
2732 vt.default_blu= [VT] 2740 vt.default_blu= [VT]
2733 Format: <blue0>,<blue1>,<blue2>,...,<blue15> 2741 Format: <blue0>,<blue1>,<blue2>,...,<blue15>
2734 Change the default blue palette of the console. 2742 Change the default blue palette of the console.
diff --git a/Documentation/kvm/api.txt b/Documentation/kvm/api.txt
index e1a114161027..2811e452f756 100644
--- a/Documentation/kvm/api.txt
+++ b/Documentation/kvm/api.txt
@@ -685,7 +685,7 @@ struct kvm_vcpu_events {
685 __u8 pad; 685 __u8 pad;
686 } nmi; 686 } nmi;
687 __u32 sipi_vector; 687 __u32 sipi_vector;
688 __u32 flags; /* must be zero */ 688 __u32 flags;
689}; 689};
690 690
6914.30 KVM_SET_VCPU_EVENTS 6914.30 KVM_SET_VCPU_EVENTS
@@ -701,6 +701,14 @@ vcpu.
701 701
702See KVM_GET_VCPU_EVENTS for the data structure. 702See KVM_GET_VCPU_EVENTS for the data structure.
703 703
704Fields that may be modified asynchronously by running VCPUs can be excluded
705from the update. These fields are nmi.pending and sipi_vector. Keep the
706corresponding bits in the flags field cleared to suppress overwriting the
707current in-kernel state. The bits are:
708
709KVM_VCPUEVENT_VALID_NMI_PENDING - transfer nmi.pending to the kernel
710KVM_VCPUEVENT_VALID_SIPI_VECTOR - transfer sipi_vector
711
704 712
7055. The kvm_run structure 7135. The kvm_run structure
706 714
diff --git a/Documentation/laptops/thinkpad-acpi.txt b/Documentation/laptops/thinkpad-acpi.txt
index aafcaa634191..75afa1229fd7 100644
--- a/Documentation/laptops/thinkpad-acpi.txt
+++ b/Documentation/laptops/thinkpad-acpi.txt
@@ -1,7 +1,7 @@
1 ThinkPad ACPI Extras Driver 1 ThinkPad ACPI Extras Driver
2 2
3 Version 0.23 3 Version 0.24
4 April 10th, 2009 4 December 11th, 2009
5 5
6 Borislav Deianov <borislav@users.sf.net> 6 Borislav Deianov <borislav@users.sf.net>
7 Henrique de Moraes Holschuh <hmh@hmh.eng.br> 7 Henrique de Moraes Holschuh <hmh@hmh.eng.br>
@@ -460,6 +460,8 @@ event code Key Notes
460 For Lenovo ThinkPads with a new 460 For Lenovo ThinkPads with a new
461 BIOS, it has to be handled either 461 BIOS, it has to be handled either
462 by the ACPI OSI, or by userspace. 462 by the ACPI OSI, or by userspace.
463 The driver does the right thing,
464 never mess with this.
4630x1011 0x10 FN+END Brightness down. See brightness 4650x1011 0x10 FN+END Brightness down. See brightness
464 up for details. 466 up for details.
465 467
@@ -582,46 +584,15 @@ with hotkey_report_mode.
582 584
583Brightness hotkey notes: 585Brightness hotkey notes:
584 586
585These are the current sane choices for brightness key mapping in 587Don't mess with the brightness hotkeys in a Thinkpad. If you want
586thinkpad-acpi: 588notifications for OSD, use the sysfs backlight class event support.
587 589
588For IBM and Lenovo models *without* ACPI backlight control (the ones on 590The driver will issue KEY_BRIGHTNESS_UP and KEY_BRIGHTNESS_DOWN events
589which thinkpad-acpi will autoload its backlight interface by default, 591automatically for the cases were userspace has to do something to
590and on which ACPI video does not export a backlight interface): 592implement brightness changes. When you override these events, you will
591 593either fail to handle properly the ThinkPads that require explicit
5921. Don't enable or map the brightness hotkeys in thinkpad-acpi, as 594action to change backlight brightness, or the ThinkPads that require
593 these older firmware versions unfortunately won't respect the hotkey 595that no action be taken to work properly.
594 mask for brightness keys anyway, and always reacts to them. This
595 usually work fine, unless X.org drivers are doing something to block
596 the BIOS. In that case, use (3) below. This is the default mode of
597 operation.
598
5992. Enable the hotkeys, but map them to something else that is NOT
600 KEY_BRIGHTNESS_UP/DOWN or any other keycode that would cause
601 userspace to try to change the backlight level, and use that as an
602 on-screen-display hint.
603
6043. IF AND ONLY IF X.org drivers find a way to block the firmware from
605 automatically changing the brightness, enable the hotkeys and map
606 them to KEY_BRIGHTNESS_UP and KEY_BRIGHTNESS_DOWN, and feed that to
607 something that calls xbacklight. thinkpad-acpi will not be able to
608 change brightness in that case either, so you should disable its
609 backlight interface.
610
611For Lenovo models *with* ACPI backlight control:
612
6131. Load up ACPI video and use that. ACPI video will report ACPI
614 events for brightness change keys. Do not mess with thinkpad-acpi
615 defaults in this case. thinkpad-acpi should not have anything to do
616 with backlight events in a scenario where ACPI video is loaded:
617 brightness hotkeys must be disabled, and the backlight interface is
618 to be kept disabled as well. This is the default mode of operation.
619
6202. Do *NOT* load up ACPI video, enable the hotkeys in thinkpad-acpi,
621 and map them to KEY_BRIGHTNESS_UP and KEY_BRIGHTNESS_DOWN. Process
622 these keys on userspace somehow (e.g. by calling xbacklight).
623 The driver will do this automatically if it detects that ACPI video
624 has been disabled.
625 596
626 597
627Bluetooth 598Bluetooth
@@ -1121,25 +1092,103 @@ WARNING:
1121 its level up and down at every change. 1092 its level up and down at every change.
1122 1093
1123 1094
1124Volume control -- /proc/acpi/ibm/volume 1095Volume control (Console Audio control)
1125--------------------------------------- 1096--------------------------------------
1097
1098procfs: /proc/acpi/ibm/volume
1099ALSA: "ThinkPad Console Audio Control", default ID: "ThinkPadEC"
1100
1101NOTE: by default, the volume control interface operates in read-only
1102mode, as it is supposed to be used for on-screen-display purposes.
1103The read/write mode can be enabled through the use of the
1104"volume_control=1" module parameter.
1105
1106NOTE: distros are urged to not enable volume_control by default, this
1107should be done by the local admin only. The ThinkPad UI is for the
1108console audio control to be done through the volume keys only, and for
1109the desktop environment to just provide on-screen-display feedback.
1110Software volume control should be done only in the main AC97/HDA
1111mixer.
1112
1113
1114About the ThinkPad Console Audio control:
1115
1116ThinkPads have a built-in amplifier and muting circuit that drives the
1117console headphone and speakers. This circuit is after the main AC97
1118or HDA mixer in the audio path, and under exclusive control of the
1119firmware.
1120
1121ThinkPads have three special hotkeys to interact with the console
1122audio control: volume up, volume down and mute.
1123
1124It is worth noting that the normal way the mute function works (on
1125ThinkPads that do not have a "mute LED") is:
1126 1126
1127This feature allows volume control on ThinkPad models which don't have 11271. Press mute to mute. It will *always* mute, you can press it as
1128a hardware volume knob. The available commands are: 1128 many times as you want, and the sound will remain mute.
1129
11302. Press either volume key to unmute the ThinkPad (it will _not_
1131 change the volume, it will just unmute).
1132
1133This is a very superior design when compared to the cheap software-only
1134mute-toggle solution found on normal consumer laptops: you can be
1135absolutely sure the ThinkPad will not make noise if you press the mute
1136button, no matter the previous state.
1137
1138The IBM ThinkPads, and the earlier Lenovo ThinkPads have variable-gain
1139amplifiers driving the speakers and headphone output, and the firmware
1140also handles volume control for the headphone and speakers on these
1141ThinkPads without any help from the operating system (this volume
1142control stage exists after the main AC97 or HDA mixer in the audio
1143path).
1144
1145The newer Lenovo models only have firmware mute control, and depend on
1146the main HDA mixer to do volume control (which is done by the operating
1147system). In this case, the volume keys are filtered out for unmute
1148key press (there are some firmware bugs in this area) and delivered as
1149normal key presses to the operating system (thinkpad-acpi is not
1150involved).
1151
1152
1153The ThinkPad-ACPI volume control:
1154
1155The preferred way to interact with the Console Audio control is the
1156ALSA interface.
1157
1158The legacy procfs interface allows one to read the current state,
1159and if volume control is enabled, accepts the following commands:
1129 1160
1130 echo up >/proc/acpi/ibm/volume 1161 echo up >/proc/acpi/ibm/volume
1131 echo down >/proc/acpi/ibm/volume 1162 echo down >/proc/acpi/ibm/volume
1132 echo mute >/proc/acpi/ibm/volume 1163 echo mute >/proc/acpi/ibm/volume
1164 echo unmute >/proc/acpi/ibm/volume
1133 echo 'level <level>' >/proc/acpi/ibm/volume 1165 echo 'level <level>' >/proc/acpi/ibm/volume
1134 1166
1135The <level> number range is 0 to 15 although not all of them may be 1167The <level> number range is 0 to 14 although not all of them may be
1136distinct. The unmute the volume after the mute command, use either the 1168distinct. To unmute the volume after the mute command, use either the
1137up or down command (the level command will not unmute the volume). 1169up or down command (the level command will not unmute the volume), or
1138The current volume level and mute state is shown in the file. 1170the unmute command.
1171
1172You can use the volume_capabilities parameter to tell the driver
1173whether your thinkpad has volume control or mute-only control:
1174volume_capabilities=1 for mixers with mute and volume control,
1175volume_capabilities=2 for mixers with only mute control.
1176
1177If the driver misdetects the capabilities for your ThinkPad model,
1178please report this to ibm-acpi-devel@lists.sourceforge.net, so that we
1179can update the driver.
1180
1181There are two strategies for volume control. To select which one
1182should be used, use the volume_mode module parameter: volume_mode=1
1183selects EC mode, and volume_mode=3 selects EC mode with NVRAM backing
1184(so that volume/mute changes are remembered across shutdown/reboot).
1139 1185
1140The ALSA mixer interface to this feature is still missing, but patches 1186The driver will operate in volume_mode=3 by default. If that does not
1141to add it exist. That problem should be addressed in the not so 1187work well on your ThinkPad model, please report this to
1142distant future. 1188ibm-acpi-devel@lists.sourceforge.net.
1189
1190The driver supports the standard ALSA module parameters. If the ALSA
1191mixer is disabled, the driver will disable all volume functionality.
1143 1192
1144 1193
1145Fan control and monitoring: fan speed, fan enable/disable 1194Fan control and monitoring: fan speed, fan enable/disable
@@ -1405,6 +1454,7 @@ to enable more than one output class, just add their values.
1405 0x0008 HKEY event interface, hotkeys 1454 0x0008 HKEY event interface, hotkeys
1406 0x0010 Fan control 1455 0x0010 Fan control
1407 0x0020 Backlight brightness 1456 0x0020 Backlight brightness
1457 0x0040 Audio mixer/volume control
1408 1458
1409There is also a kernel build option to enable more debugging 1459There is also a kernel build option to enable more debugging
1410information, which may be necessary to debug driver problems. 1460information, which may be necessary to debug driver problems.
@@ -1465,3 +1515,9 @@ Sysfs interface changelog:
1465 and it is always able to disable hot keys. Very old 1515 and it is always able to disable hot keys. Very old
1466 thinkpads are properly supported. hotkey_bios_mask 1516 thinkpads are properly supported. hotkey_bios_mask
1467 is deprecated and marked for removal. 1517 is deprecated and marked for removal.
1518
15190x020600: Marker for backlight change event support.
1520
15210x020700: Support for mute-only mixers.
1522 Volume control in read-only mode by default.
1523 Marker for ALSA mixer support.
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/networking/3c509.txt b/Documentation/networking/3c509.txt
index 0643e3b7168c..3c45d5dcd63b 100644
--- a/Documentation/networking/3c509.txt
+++ b/Documentation/networking/3c509.txt
@@ -48,11 +48,11 @@ for LILO parameters for doing this:
48This configures the first found 3c509 card for IRQ 10, base I/O 0x310, and 48This configures the first found 3c509 card for IRQ 10, base I/O 0x310, and
49transceiver type 3 (10base2). The flag "0x3c509" must be set to avoid conflicts 49transceiver type 3 (10base2). The flag "0x3c509" must be set to avoid conflicts
50with other card types when overriding the I/O address. When the driver is 50with other card types when overriding the I/O address. When the driver is
51loaded as a module, only the IRQ and transceiver setting may be overridden. 51loaded as a module, only the IRQ may be overridden. For example,
52For example, setting two cards to 10base2/IRQ10 and AUI/IRQ11 is done by using 52setting two cards to IRQ10 and IRQ11 is done by using the irq module
53the xcvr and irq module options: 53option:
54 54
55 options 3c509 xcvr=3,1 irq=10,11 55 options 3c509 irq=10,11
56 56
57 57
58(2) Full-duplex mode 58(2) Full-duplex mode
@@ -77,6 +77,8 @@ operation.
77itself full-duplex capable. This is almost certainly one of two things: a full- 77itself full-duplex capable. This is almost certainly one of two things: a full-
78duplex-capable Ethernet switch (*not* a hub), or a full-duplex-capable NIC on 78duplex-capable Ethernet switch (*not* a hub), or a full-duplex-capable NIC on
79another system that's connected directly to the 3c509B via a crossover cable. 79another system that's connected directly to the 3c509B via a crossover cable.
80
81Full-duplex mode can be enabled using 'ethtool'.
80 82
81/////Extremely important caution concerning full-duplex mode///// 83/////Extremely important caution concerning full-duplex mode/////
82Understand that the 3c509B's hardware's full-duplex support is much more 84Understand that the 3c509B's hardware's full-duplex support is much more
@@ -113,6 +115,8 @@ This insured that merely upgrading the driver from an earlier version would
113never automatically enable full-duplex mode in an existing installation; 115never automatically enable full-duplex mode in an existing installation;
114it must always be explicitly enabled via one of these code in order to be 116it must always be explicitly enabled via one of these code in order to be
115activated. 117activated.
118
119The transceiver type can be changed using 'ethtool'.
116 120
117 121
118(4a) Interpretation of error messages and common problems 122(4a) Interpretation of error messages and common problems
diff --git a/Documentation/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/power/runtime_pm.txt b/Documentation/power/runtime_pm.txt
index 4a3109b28847..356fd86f4ea8 100644
--- a/Documentation/power/runtime_pm.txt
+++ b/Documentation/power/runtime_pm.txt
@@ -42,80 +42,81 @@ struct dev_pm_ops {
42 ... 42 ...
43}; 43};
44 44
45The ->runtime_suspend() callback is executed by the PM core for the bus type of 45The ->runtime_suspend(), ->runtime_resume() and ->runtime_idle() callbacks are
46the device being suspended. The bus type's callback is then _entirely_ 46executed by the PM core for either the bus type, or device type (if the bus
47_responsible_ for handling the device as appropriate, which may, but need not 47type's callback is not defined), or device class (if the bus type's and device
48include executing the device driver's own ->runtime_suspend() callback (from the 48type's callbacks are not defined) of given device. The bus type, device type
49and device class callbacks are referred to as subsystem-level callbacks in what
50follows.
51
52The subsystem-level suspend callback is _entirely_ _responsible_ for handling
53the suspend of the device as appropriate, which may, but need not include
54executing the device driver's own ->runtime_suspend() callback (from the
49PM core's point of view it is not necessary to implement a ->runtime_suspend() 55PM core's point of view it is not necessary to implement a ->runtime_suspend()
50callback in a device driver as long as the bus type's ->runtime_suspend() knows 56callback in a device driver as long as the subsystem-level suspend callback
51what to do to handle the device). 57knows what to do to handle the device).
52 58
53 * Once the bus type's ->runtime_suspend() callback has completed successfully 59 * Once the subsystem-level suspend callback has completed successfully
54 for given device, the PM core regards the device as suspended, which need 60 for given device, the PM core regards the device as suspended, which need
55 not mean that the device has been put into a low power state. It is 61 not mean that the device has been put into a low power state. It is
56 supposed to mean, however, that the device will not process data and will 62 supposed to mean, however, that the device will not process data and will
57 not communicate with the CPU(s) and RAM until its bus type's 63 not communicate with the CPU(s) and RAM until the subsystem-level resume
58 ->runtime_resume() callback is executed for it. The run-time PM status of 64 callback is executed for it. The run-time PM status of a device after
59 a device after successful execution of its bus type's ->runtime_suspend() 65 successful execution of the subsystem-level suspend callback is 'suspended'.
60 callback is 'suspended'. 66
61 67 * If the subsystem-level suspend callback returns -EBUSY or -EAGAIN,
62 * If the bus type's ->runtime_suspend() callback returns -EBUSY or -EAGAIN, 68 the device's run-time PM status is 'active', which means that the device
63 the device's run-time PM status is supposed to be 'active', which means that 69 _must_ be fully operational afterwards.
64 the device _must_ be fully operational afterwards. 70
65 71 * If the subsystem-level suspend callback returns an error code different
66 * If the bus type's ->runtime_suspend() callback returns an error code 72 from -EBUSY or -EAGAIN, the PM core regards this as a fatal error and will
67 different from -EBUSY or -EAGAIN, the PM core regards this as a fatal 73 refuse to run the helper functions described in Section 4 for the device,
68 error and will refuse to run the helper functions described in Section 4 74 until the status of it is directly set either to 'active', or to 'suspended'
69 for the device, until the status of it is directly set either to 'active' 75 (the PM core provides special helper functions for this purpose).
70 or to 'suspended' (the PM core provides special helper functions for this 76
71 purpose). 77In particular, if the driver requires remote wake-up capability (i.e. hardware
72 78mechanism allowing the device to request a change of its power state, such as
73In particular, if the driver requires remote wakeup capability for proper 79PCI PME) for proper functioning and device_run_wake() returns 'false' for the
74functioning and device_run_wake() returns 'false' for the device, then 80device, then ->runtime_suspend() should return -EBUSY. On the other hand, if
75->runtime_suspend() should return -EBUSY. On the other hand, if 81device_run_wake() returns 'true' for the device and the device is put into a low
76device_run_wake() returns 'true' for the device and the device is put 82power state during the execution of the subsystem-level suspend callback, it is
77into a low power state during the execution of its bus type's 83expected that remote wake-up will be enabled for the device. Generally, remote
78->runtime_suspend(), it is expected that remote wake-up (i.e. hardware mechanism 84wake-up should be enabled for all input devices put into a low power state at
79allowing the device to request a change of its power state, such as PCI PME) 85run time.
80will be enabled for the device. Generally, remote wake-up should be enabled 86
81for all input devices put into a low power state at run time. 87The subsystem-level resume callback is _entirely_ _responsible_ for handling the
82 88resume of the device as appropriate, which may, but need not include executing
83The ->runtime_resume() callback is executed by the PM core for the bus type of 89the device driver's own ->runtime_resume() callback (from the PM core's point of
84the device being woken up. The bus type's callback is then _entirely_ 90view it is not necessary to implement a ->runtime_resume() callback in a device
85_responsible_ for handling the device as appropriate, which may, but need not 91driver as long as the subsystem-level resume callback knows what to do to handle
86include executing the device driver's own ->runtime_resume() callback (from the 92the device).
87PM core's point of view it is not necessary to implement a ->runtime_resume() 93
88callback in a device driver as long as the bus type's ->runtime_resume() knows 94 * Once the subsystem-level resume callback has completed successfully, the PM
89what to do to handle the device). 95 core regards the device as fully operational, which means that the device
90 96 _must_ be able to complete I/O operations as needed. The run-time PM status
91 * Once the bus type's ->runtime_resume() callback has completed successfully, 97 of the device is then 'active'.
92 the PM core regards the device as fully operational, which means that the 98
93 device _must_ be able to complete I/O operations as needed. The run-time 99 * If the subsystem-level resume callback returns an error code, the PM core
94 PM status of the device is then 'active'. 100 regards this as a fatal error and will refuse to run the helper functions
95 101 described in Section 4 for the device, until its status is directly set
96 * If the bus type's ->runtime_resume() callback returns an error code, the PM 102 either to 'active' or to 'suspended' (the PM core provides special helper
97 core regards this as a fatal error and will refuse to run the helper 103 functions for this purpose).
98 functions described in Section 4 for the device, until its status is 104
99 directly set either to 'active' or to 'suspended' (the PM core provides 105The subsystem-level idle callback is executed by the PM core whenever the device
100 special helper functions for this purpose). 106appears to be idle, which is indicated to the PM core by two counters, the
101 107device's usage counter and the counter of 'active' children of the device.
102The ->runtime_idle() callback is executed by the PM core for the bus type of
103given device whenever the device appears to be idle, which is indicated to the
104PM core by two counters, the device's usage counter and the counter of 'active'
105children of the device.
106 108
107 * If any of these counters is decreased using a helper function provided by 109 * If any of these counters is decreased using a helper function provided by
108 the PM core and it turns out to be equal to zero, the other counter is 110 the PM core and it turns out to be equal to zero, the other counter is
109 checked. If that counter also is equal to zero, the PM core executes the 111 checked. If that counter also is equal to zero, the PM core executes the
110 device bus type's ->runtime_idle() callback (with the device as an 112 subsystem-level idle callback with the device as an argument.
111 argument).
112 113
113The action performed by a bus type's ->runtime_idle() callback is totally 114The action performed by a subsystem-level idle callback is totally dependent on
114dependent on the bus type in question, but the expected and recommended action 115the subsystem in question, but the expected and recommended action is to check
115is to check if the device can be suspended (i.e. if all of the conditions 116if the device can be suspended (i.e. if all of the conditions necessary for
116necessary for suspending the device are satisfied) and to queue up a suspend 117suspending the device are satisfied) and to queue up a suspend request for the
117request for the device in that case. The value returned by this callback is 118device in that case. The value returned by this callback is ignored by the PM
118ignored by the PM core. 119core.
119 120
120The helper functions provided by the PM core, described in Section 4, guarantee 121The helper functions provided by the PM core, described in Section 4, guarantee
121that the following constraints are met with respect to the bus type's run-time 122that the following constraints are met with respect to the bus type's run-time
@@ -238,41 +239,41 @@ drivers/base/power/runtime.c and include/linux/pm_runtime.h:
238 removing the device from device hierarchy 239 removing the device from device hierarchy
239 240
240 int pm_runtime_idle(struct device *dev); 241 int pm_runtime_idle(struct device *dev);
241 - execute ->runtime_idle() for the device's bus type; returns 0 on success 242 - execute the subsystem-level idle callback for the device; returns 0 on
242 or error code on failure, where -EINPROGRESS means that ->runtime_idle() 243 success or error code on failure, where -EINPROGRESS means that
243 is already being executed 244 ->runtime_idle() is already being executed
244 245
245 int pm_runtime_suspend(struct device *dev); 246 int pm_runtime_suspend(struct device *dev);
246 - execute ->runtime_suspend() for the device's bus type; returns 0 on 247 - execute the subsystem-level suspend callback for the device; returns 0 on
247 success, 1 if the device's run-time PM status was already 'suspended', or 248 success, 1 if the device's run-time PM status was already 'suspended', or
248 error code on failure, where -EAGAIN or -EBUSY means it is safe to attempt 249 error code on failure, where -EAGAIN or -EBUSY means it is safe to attempt
249 to suspend the device again in future 250 to suspend the device again in future
250 251
251 int pm_runtime_resume(struct device *dev); 252 int pm_runtime_resume(struct device *dev);
252 - execute ->runtime_resume() for the device's bus type; returns 0 on 253 - execute the subsystem-leve resume callback for the device; returns 0 on
253 success, 1 if the device's run-time PM status was already 'active' or 254 success, 1 if the device's run-time PM status was already 'active' or
254 error code on failure, where -EAGAIN means it may be safe to attempt to 255 error code on failure, where -EAGAIN means it may be safe to attempt to
255 resume the device again in future, but 'power.runtime_error' should be 256 resume the device again in future, but 'power.runtime_error' should be
256 checked additionally 257 checked additionally
257 258
258 int pm_request_idle(struct device *dev); 259 int pm_request_idle(struct device *dev);
259 - submit a request to execute ->runtime_idle() for the device's bus type 260 - submit a request to execute the subsystem-level idle callback for the
260 (the request is represented by a work item in pm_wq); returns 0 on success 261 device (the request is represented by a work item in pm_wq); returns 0 on
261 or error code if the request has not been queued up 262 success or error code if the request has not been queued up
262 263
263 int pm_schedule_suspend(struct device *dev, unsigned int delay); 264 int pm_schedule_suspend(struct device *dev, unsigned int delay);
264 - schedule the execution of ->runtime_suspend() for the device's bus type 265 - schedule the execution of the subsystem-level suspend callback for the
265 in future, where 'delay' is the time to wait before queuing up a suspend 266 device in future, where 'delay' is the time to wait before queuing up a
266 work item in pm_wq, in milliseconds (if 'delay' is zero, the work item is 267 suspend work item in pm_wq, in milliseconds (if 'delay' is zero, the work
267 queued up immediately); returns 0 on success, 1 if the device's PM 268 item is queued up immediately); returns 0 on success, 1 if the device's PM
268 run-time status was already 'suspended', or error code if the request 269 run-time status was already 'suspended', or error code if the request
269 hasn't been scheduled (or queued up if 'delay' is 0); if the execution of 270 hasn't been scheduled (or queued up if 'delay' is 0); if the execution of
270 ->runtime_suspend() is already scheduled and not yet expired, the new 271 ->runtime_suspend() is already scheduled and not yet expired, the new
271 value of 'delay' will be used as the time to wait 272 value of 'delay' will be used as the time to wait
272 273
273 int pm_request_resume(struct device *dev); 274 int pm_request_resume(struct device *dev);
274 - submit a request to execute ->runtime_resume() for the device's bus type 275 - submit a request to execute the subsystem-level resume callback for the
275 (the request is represented by a work item in pm_wq); returns 0 on 276 device (the request is represented by a work item in pm_wq); returns 0 on
276 success, 1 if the device's run-time PM status was already 'active', or 277 success, 1 if the device's run-time PM status was already 'active', or
277 error code if the request hasn't been queued up 278 error code if the request hasn't been queued up
278 279
@@ -303,12 +304,12 @@ drivers/base/power/runtime.c and include/linux/pm_runtime.h:
303 run-time PM callbacks described in Section 2 304 run-time PM callbacks described in Section 2
304 305
305 int pm_runtime_disable(struct device *dev); 306 int pm_runtime_disable(struct device *dev);
306 - prevent the run-time PM helper functions from running the device bus 307 - prevent the run-time PM helper functions from running subsystem-level
307 type's run-time PM callbacks, make sure that all of the pending run-time 308 run-time PM callbacks for the device, make sure that all of the pending
308 PM operations on the device are either completed or canceled; returns 309 run-time PM operations on the device are either completed or canceled;
309 1 if there was a resume request pending and it was necessary to execute 310 returns 1 if there was a resume request pending and it was necessary to
310 ->runtime_resume() for the device's bus type to satisfy that request, 311 execute the subsystem-level resume callback for the device to satisfy that
311 otherwise 0 is returned 312 request, otherwise 0 is returned
312 313
313 void pm_suspend_ignore_children(struct device *dev, bool enable); 314 void pm_suspend_ignore_children(struct device *dev, bool enable);
314 - set/unset the power.ignore_children flag of the device 315 - set/unset the power.ignore_children flag of the device
@@ -378,5 +379,55 @@ pm_runtime_suspend() or pm_runtime_idle() or their asynchronous counterparts,
378they will fail returning -EAGAIN, because the device's usage counter is 379they will fail returning -EAGAIN, because the device's usage counter is
379incremented by the core before executing ->probe() and ->remove(). Still, it 380incremented by the core before executing ->probe() and ->remove(). Still, it
380may be desirable to suspend the device as soon as ->probe() or ->remove() has 381may be desirable to suspend the device as soon as ->probe() or ->remove() has
381finished, so the PM core uses pm_runtime_idle_sync() to invoke the device bus 382finished, so the PM core uses pm_runtime_idle_sync() to invoke the
382type's ->runtime_idle() callback at that time. 383subsystem-level idle callback for the device at that time.
384
3856. Run-time PM and System Sleep
386
387Run-time PM and system sleep (i.e., system suspend and hibernation, also known
388as suspend-to-RAM and suspend-to-disk) interact with each other in a couple of
389ways. If a device is active when a system sleep starts, everything is
390straightforward. But what should happen if the device is already suspended?
391
392The device may have different wake-up settings for run-time PM and system sleep.
393For example, remote wake-up may be enabled for run-time suspend but disallowed
394for system sleep (device_may_wakeup(dev) returns 'false'). When this happens,
395the subsystem-level system suspend callback is responsible for changing the
396device's wake-up setting (it may leave that to the device driver's system
397suspend routine). It may be necessary to resume the device and suspend it again
398in order to do so. The same is true if the driver uses different power levels
399or other settings for run-time suspend and system sleep.
400
401During system resume, devices generally should be brought back to full power,
402even if they were suspended before the system sleep began. There are several
403reasons for this, including:
404
405 * The device might need to switch power levels, wake-up settings, etc.
406
407 * Remote wake-up events might have been lost by the firmware.
408
409 * The device's children may need the device to be at full power in order
410 to resume themselves.
411
412 * The driver's idea of the device state may not agree with the device's
413 physical state. This can happen during resume from hibernation.
414
415 * The device might need to be reset.
416
417 * Even though the device was suspended, if its usage counter was > 0 then most
418 likely it would need a run-time resume in the near future anyway.
419
420 * Always going back to full power is simplest.
421
422If the device was suspended before the sleep began, then its run-time PM status
423will have to be updated to reflect the actual post-system sleep status. The way
424to do this is:
425
426 pm_runtime_disable(dev);
427 pm_runtime_set_active(dev);
428 pm_runtime_enable(dev);
429
430The PM core always increments the run-time usage counter before calling the
431->prepare() callback and decrements it after calling the ->complete() callback.
432Hence disabling run-time PM temporarily like this will not cause any run-time
433suspend callbacks to be lost.
diff --git a/Documentation/powerpc/dts-bindings/4xx/ppc440spe-adma.txt b/Documentation/powerpc/dts-bindings/4xx/ppc440spe-adma.txt
new file mode 100644
index 000000000000..515ebcf1b97d
--- /dev/null
+++ b/Documentation/powerpc/dts-bindings/4xx/ppc440spe-adma.txt
@@ -0,0 +1,93 @@
1PPC440SPe DMA/XOR (DMA Controller and XOR Accelerator)
2
3Device nodes needed for operation of the ppc440spe-adma driver
4are specified hereby. These are I2O/DMA, DMA and XOR nodes
5for DMA engines and Memory Queue Module node. The latter is used
6by ADMA driver for configuration of RAID-6 H/W capabilities of
7the PPC440SPe. In addition to the nodes and properties described
8below, the ranges property of PLB node must specify ranges for
9DMA devices.
10
11 i) The I2O node
12
13 Required properties:
14
15 - compatible : "ibm,i2o-440spe";
16 - reg : <registers mapping>
17 - dcr-reg : <DCR registers range>
18
19 Example:
20
21 I2O: i2o@400100000 {
22 compatible = "ibm,i2o-440spe";
23 reg = <0x00000004 0x00100000 0x100>;
24 dcr-reg = <0x060 0x020>;
25 };
26
27
28 ii) The DMA node
29
30 Required properties:
31
32 - compatible : "ibm,dma-440spe";
33 - cell-index : 1 cell, hardware index of the DMA engine
34 (typically 0x0 and 0x1 for DMA0 and DMA1)
35 - reg : <registers mapping>
36 - dcr-reg : <DCR registers range>
37 - interrupts : <interrupt mapping for DMA0/1 interrupts sources:
38 2 sources: DMAx CS FIFO Needs Service IRQ (on UIC0)
39 and DMA Error IRQ (on UIC1). The latter is common
40 for both DMA engines>.
41 - interrupt-parent : needed for interrupt mapping
42
43 Example:
44
45 DMA0: dma0@400100100 {
46 compatible = "ibm,dma-440spe";
47 cell-index = <0>;
48 reg = <0x00000004 0x00100100 0x100>;
49 dcr-reg = <0x060 0x020>;
50 interrupt-parent = <&DMA0>;
51 interrupts = <0 1>;
52 #interrupt-cells = <1>;
53 #address-cells = <0>;
54 #size-cells = <0>;
55 interrupt-map = <
56 0 &UIC0 0x14 4
57 1 &UIC1 0x16 4>;
58 };
59
60
61 iii) XOR Accelerator node
62
63 Required properties:
64
65 - compatible : "amcc,xor-accelerator";
66 - reg : <registers mapping>
67 - interrupts : <interrupt mapping for XOR interrupt source>
68 - interrupt-parent : for interrupt mapping
69
70 Example:
71
72 xor-accel@400200000 {
73 compatible = "amcc,xor-accelerator";
74 reg = <0x00000004 0x00200000 0x400>;
75 interrupt-parent = <&UIC1>;
76 interrupts = <0x1f 4>;
77 };
78
79
80 iv) Memory Queue Module node
81
82 Required properties:
83
84 - compatible : "ibm,mq-440spe";
85 - dcr-reg : <DCR registers range>
86
87 Example:
88
89 MQ0: mq {
90 compatible = "ibm,mq-440spe";
91 dcr-reg = <0x040 0x020>;
92 };
93
diff --git a/Documentation/powerpc/dts-bindings/fsl/mpic.txt b/Documentation/powerpc/dts-bindings/fsl/mpic.txt
new file mode 100644
index 000000000000..71e39cf3215b
--- /dev/null
+++ b/Documentation/powerpc/dts-bindings/fsl/mpic.txt
@@ -0,0 +1,42 @@
1* OpenPIC and its interrupt numbers on Freescale's e500/e600 cores
2
3The OpenPIC specification does not specify which interrupt source has to
4become which interrupt number. This is up to the software implementation
5of the interrupt controller. The only requirement is that every
6interrupt source has to have an unique interrupt number / vector number.
7To accomplish this the current implementation assigns the number zero to
8the first source, the number one to the second source and so on until
9all interrupt sources have their unique number.
10Usually the assigned vector number equals the interrupt number mentioned
11in the documentation for a given core / CPU. This is however not true
12for the e500 cores (MPC85XX CPUs) where the documentation distinguishes
13between internal and external interrupt sources and starts counting at
14zero for both of them.
15
16So what to write for external interrupt source X or internal interrupt
17source Y into the device tree? Here is an example:
18
19The memory map for the interrupt controller in the MPC8544[0] shows,
20that the first interrupt source starts at 0x5_0000 (PIC Register Address
21Map-Interrupt Source Configuration Registers). This source becomes the
22number zero therefore:
23 External interrupt 0 = interrupt number 0
24 External interrupt 1 = interrupt number 1
25 External interrupt 2 = interrupt number 2
26 ...
27Every interrupt number allocates 0x20 bytes register space. So to get
28its number it is sufficient to shift the lower 16bits to right by five.
29So for the external interrupt 10 we have:
30 0x0140 >> 5 = 10
31
32After the external sources, the internal sources follow. The in core I2C
33controller on the MPC8544 for instance has the internal source number
3427. Oo obtain its interrupt number we take the lower 16bits of its memory
35address (0x5_0560) and shift it right:
36 0x0560 >> 5 = 43
37
38Therefore the I2C device node for the MPC8544 CPU has to have the
39interrupt number 43 specified in the device tree.
40
41[0] MPC8544E PowerQUICCTM III, Integrated Host Processor Family Reference Manual
42 MPC8544ERM Rev. 1 10/2007
diff --git a/Documentation/powerpc/dts-bindings/nintendo/gamecube.txt b/Documentation/powerpc/dts-bindings/nintendo/gamecube.txt
new file mode 100644
index 000000000000..b558585b1aaf
--- /dev/null
+++ b/Documentation/powerpc/dts-bindings/nintendo/gamecube.txt
@@ -0,0 +1,109 @@
1
2Nintendo GameCube device tree
3=============================
4
51) The "flipper" node
6
7 This node represents the multi-function "Flipper" chip, which packages
8 many of the devices found in the Nintendo GameCube.
9
10 Required properties:
11
12 - compatible : Should be "nintendo,flipper"
13
141.a) The Video Interface (VI) node
15
16 Represents the interface between the graphics processor and a external
17 video encoder.
18
19 Required properties:
20
21 - compatible : should be "nintendo,flipper-vi"
22 - reg : should contain the VI registers location and length
23 - interrupts : should contain the VI interrupt
24
251.b) The Processor Interface (PI) node
26
27 Represents the data and control interface between the main processor
28 and graphics and audio processor.
29
30 Required properties:
31
32 - compatible : should be "nintendo,flipper-pi"
33 - reg : should contain the PI registers location and length
34
351.b.i) The "Flipper" interrupt controller node
36
37 Represents the interrupt controller within the "Flipper" chip.
38 The node for the "Flipper" interrupt controller must be placed under
39 the PI node.
40
41 Required properties:
42
43 - compatible : should be "nintendo,flipper-pic"
44
451.c) The Digital Signal Procesor (DSP) node
46
47 Represents the digital signal processor interface, designed to offload
48 audio related tasks.
49
50 Required properties:
51
52 - compatible : should be "nintendo,flipper-dsp"
53 - reg : should contain the DSP registers location and length
54 - interrupts : should contain the DSP interrupt
55
561.c.i) The Auxiliary RAM (ARAM) node
57
58 Represents the non cpu-addressable ram designed mainly to store audio
59 related information.
60 The ARAM node must be placed under the DSP node.
61
62 Required properties:
63
64 - compatible : should be "nintendo,flipper-aram"
65 - reg : should contain the ARAM start (zero-based) and length
66
671.d) The Disk Interface (DI) node
68
69 Represents the interface used to communicate with mass storage devices.
70
71 Required properties:
72
73 - compatible : should be "nintendo,flipper-di"
74 - reg : should contain the DI registers location and length
75 - interrupts : should contain the DI interrupt
76
771.e) The Audio Interface (AI) node
78
79 Represents the interface to the external 16-bit stereo digital-to-analog
80 converter.
81
82 Required properties:
83
84 - compatible : should be "nintendo,flipper-ai"
85 - reg : should contain the AI registers location and length
86 - interrupts : should contain the AI interrupt
87
881.f) The Serial Interface (SI) node
89
90 Represents the interface to the four single bit serial interfaces.
91 The SI is a proprietary serial interface used normally to control gamepads.
92 It's NOT a RS232-type interface.
93
94 Required properties:
95
96 - compatible : should be "nintendo,flipper-si"
97 - reg : should contain the SI registers location and length
98 - interrupts : should contain the SI interrupt
99
1001.g) The External Interface (EXI) node
101
102 Represents the multi-channel SPI-like interface.
103
104 Required properties:
105
106 - compatible : should be "nintendo,flipper-exi"
107 - reg : should contain the EXI registers location and length
108 - interrupts : should contain the EXI interrupt
109
diff --git a/Documentation/powerpc/dts-bindings/nintendo/wii.txt b/Documentation/powerpc/dts-bindings/nintendo/wii.txt
new file mode 100644
index 000000000000..a7e155a023b8
--- /dev/null
+++ b/Documentation/powerpc/dts-bindings/nintendo/wii.txt
@@ -0,0 +1,184 @@
1
2Nintendo Wii device tree
3========================
4
50) The root node
6
7 This node represents the Nintendo Wii video game console.
8
9 Required properties:
10
11 - model : Should be "nintendo,wii"
12 - compatible : Should be "nintendo,wii"
13
141) The "hollywood" node
15
16 This node represents the multi-function "Hollywood" chip, which packages
17 many of the devices found in the Nintendo Wii.
18
19 Required properties:
20
21 - compatible : Should be "nintendo,hollywood"
22
231.a) The Video Interface (VI) node
24
25 Represents the interface between the graphics processor and a external
26 video encoder.
27
28 Required properties:
29
30 - compatible : should be "nintendo,hollywood-vi","nintendo,flipper-vi"
31 - reg : should contain the VI registers location and length
32 - interrupts : should contain the VI interrupt
33
341.b) The Processor Interface (PI) node
35
36 Represents the data and control interface between the main processor
37 and graphics and audio processor.
38
39 Required properties:
40
41 - compatible : should be "nintendo,hollywood-pi","nintendo,flipper-pi"
42 - reg : should contain the PI registers location and length
43
441.b.i) The "Flipper" interrupt controller node
45
46 Represents the "Flipper" interrupt controller within the "Hollywood" chip.
47 The node for the "Flipper" interrupt controller must be placed under
48 the PI node.
49
50 Required properties:
51
52 - #interrupt-cells : <1>
53 - compatible : should be "nintendo,flipper-pic"
54 - interrupt-controller
55
561.c) The Digital Signal Procesor (DSP) node
57
58 Represents the digital signal processor interface, designed to offload
59 audio related tasks.
60
61 Required properties:
62
63 - compatible : should be "nintendo,hollywood-dsp","nintendo,flipper-dsp"
64 - reg : should contain the DSP registers location and length
65 - interrupts : should contain the DSP interrupt
66
671.d) The Serial Interface (SI) node
68
69 Represents the interface to the four single bit serial interfaces.
70 The SI is a proprietary serial interface used normally to control gamepads.
71 It's NOT a RS232-type interface.
72
73 Required properties:
74
75 - compatible : should be "nintendo,hollywood-si","nintendo,flipper-si"
76 - reg : should contain the SI registers location and length
77 - interrupts : should contain the SI interrupt
78
791.e) The Audio Interface (AI) node
80
81 Represents the interface to the external 16-bit stereo digital-to-analog
82 converter.
83
84 Required properties:
85
86 - compatible : should be "nintendo,hollywood-ai","nintendo,flipper-ai"
87 - reg : should contain the AI registers location and length
88 - interrupts : should contain the AI interrupt
89
901.f) The External Interface (EXI) node
91
92 Represents the multi-channel SPI-like interface.
93
94 Required properties:
95
96 - compatible : should be "nintendo,hollywood-exi","nintendo,flipper-exi"
97 - reg : should contain the EXI registers location and length
98 - interrupts : should contain the EXI interrupt
99
1001.g) The Open Host Controller Interface (OHCI) nodes
101
102 Represent the USB 1.x Open Host Controller Interfaces.
103
104 Required properties:
105
106 - compatible : should be "nintendo,hollywood-usb-ohci","usb-ohci"
107 - reg : should contain the OHCI registers location and length
108 - interrupts : should contain the OHCI interrupt
109
1101.h) The Enhanced Host Controller Interface (EHCI) node
111
112 Represents the USB 2.0 Enhanced Host Controller Interface.
113
114 Required properties:
115
116 - compatible : should be "nintendo,hollywood-usb-ehci","usb-ehci"
117 - reg : should contain the EHCI registers location and length
118 - interrupts : should contain the EHCI interrupt
119
1201.i) The Secure Digital Host Controller Interface (SDHCI) nodes
121
122 Represent the Secure Digital Host Controller Interfaces.
123
124 Required properties:
125
126 - compatible : should be "nintendo,hollywood-sdhci","sdhci"
127 - reg : should contain the SDHCI registers location and length
128 - interrupts : should contain the SDHCI interrupt
129
1301.j) The Inter-Processsor Communication (IPC) node
131
132 Represent the Inter-Processor Communication interface. This interface
133 enables communications between the Broadway and the Starlet processors.
134
135 - compatible : should be "nintendo,hollywood-ipc"
136 - reg : should contain the IPC registers location and length
137 - interrupts : should contain the IPC interrupt
138
1391.k) The "Hollywood" interrupt controller node
140
141 Represents the "Hollywood" interrupt controller within the
142 "Hollywood" chip.
143
144 Required properties:
145
146 - #interrupt-cells : <1>
147 - compatible : should be "nintendo,hollywood-pic"
148 - reg : should contain the controller registers location and length
149 - interrupt-controller
150 - interrupts : should contain the cascade interrupt of the "flipper" pic
151 - interrupt-parent: should contain the phandle of the "flipper" pic
152
1531.l) The General Purpose I/O (GPIO) controller node
154
155 Represents the dual access 32 GPIO controller interface.
156
157 Required properties:
158
159 - #gpio-cells : <2>
160 - compatible : should be "nintendo,hollywood-gpio"
161 - reg : should contain the IPC registers location and length
162 - gpio-controller
163
1641.m) The control node
165
166 Represents the control interface used to setup several miscellaneous
167 settings of the "Hollywood" chip like boot memory mappings, resets,
168 disk interface mode, etc.
169
170 Required properties:
171
172 - compatible : should be "nintendo,hollywood-control"
173 - reg : should contain the control registers location and length
174
1751.n) The Disk Interface (DI) node
176
177 Represents the interface used to communicate with mass storage devices.
178
179 Required properties:
180
181 - compatible : should be "nintendo,hollywood-di"
182 - reg : should contain the DI registers location and length
183 - interrupts : should contain the DI interrupt
184
diff --git a/Documentation/sound/alsa/HD-Audio-Models.txt b/Documentation/sound/alsa/HD-Audio-Models.txt
index e93affff3af8..e72cee9e2a71 100644
--- a/Documentation/sound/alsa/HD-Audio-Models.txt
+++ b/Documentation/sound/alsa/HD-Audio-Models.txt
@@ -403,4 +403,5 @@ STAC9872
403Cirrus Logic CS4206/4207 403Cirrus Logic CS4206/4207
404======================== 404========================
405 mbp55 MacBook Pro 5,5 405 mbp55 MacBook Pro 5,5
406 imac27 IMac 27 Inch
406 auto BIOS setup (default) 407 auto BIOS setup (default)
diff --git a/Documentation/sound/alsa/Procfile.txt b/Documentation/sound/alsa/Procfile.txt
index 719a819f8cc2..07301de12cc4 100644
--- a/Documentation/sound/alsa/Procfile.txt
+++ b/Documentation/sound/alsa/Procfile.txt
@@ -95,7 +95,7 @@ card*/pcm*/xrun_debug
95 It takes an integer value, can be changed by writing to this 95 It takes an integer value, can be changed by writing to this
96 file, such as 96 file, such as
97 97
98 # cat 5 > /proc/asound/card0/pcm0p/xrun_debug 98 # echo 5 > /proc/asound/card0/pcm0p/xrun_debug
99 99
100 The value consists of the following bit flags: 100 The value consists of the following bit flags:
101 bit 0 = Enable XRUN/jiffies debug messages 101 bit 0 = Enable XRUN/jiffies debug messages
diff --git a/Documentation/stable_kernel_rules.txt b/Documentation/stable_kernel_rules.txt
index a452227361b1..5effa5bd993b 100644
--- a/Documentation/stable_kernel_rules.txt
+++ b/Documentation/stable_kernel_rules.txt
@@ -26,13 +26,33 @@ Procedure for submitting patches to the -stable tree:
26 26
27 - Send the patch, after verifying that it follows the above rules, to 27 - Send the patch, after verifying that it follows the above rules, to
28 stable@kernel.org. 28 stable@kernel.org.
29 - To have the patch automatically included in the stable tree, add the
30 the tag
31 Cc: stable@kernel.org
32 in the sign-off area. Once the patch is merged it will be applied to
33 the stable tree without anything else needing to be done by the author
34 or subsystem maintainer.
35 - If the patch requires other patches as prerequisites which can be
36 cherry-picked than this can be specified in the following format in
37 the sign-off area:
38
39 Cc: <stable@kernel.org> # .32.x: a1f84a3: sched: Check for idle
40 Cc: <stable@kernel.org> # .32.x: 1b9508f: sched: Rate-limit newidle
41 Cc: <stable@kernel.org> # .32.x: fd21073: sched: Fix affinity logic
42 Cc: <stable@kernel.org> # .32.x
43 Signed-off-by: Ingo Molnar <mingo@elte.hu>
44
45 The tag sequence has the meaning of:
46 git cherry-pick a1f84a3
47 git cherry-pick 1b9508f
48 git cherry-pick fd21073
49 git cherry-pick <this commit>
50
29 - The sender will receive an ACK when the patch has been accepted into the 51 - The sender will receive an ACK when the patch has been accepted into the
30 queue, or a NAK if the patch is rejected. This response might take a few 52 queue, or a NAK if the patch is rejected. This response might take a few
31 days, according to the developer's schedules. 53 days, according to the developer's schedules.
32 - If accepted, the patch will be added to the -stable queue, for review by 54 - If accepted, the patch will be added to the -stable queue, for review by
33 other developers and by the relevant subsystem maintainer. 55 other developers and by the relevant subsystem maintainer.
34 - If the stable@kernel.org address is added to a patch, when it goes into
35 Linus's tree it will automatically be emailed to the stable team.
36 - Security patches should not be sent to this alias, but instead to the 56 - Security patches should not be sent to this alias, but instead to the
37 documented security@kernel.org address. 57 documented security@kernel.org address.
38 58
diff --git a/Documentation/thermal/sysfs-api.txt b/Documentation/thermal/sysfs-api.txt
index a87dc277a5ca..cb3d15bc1aeb 100644
--- a/Documentation/thermal/sysfs-api.txt
+++ b/Documentation/thermal/sysfs-api.txt
@@ -206,6 +206,7 @@ passive
206 passive trip point for the zone. Activation is done by polling with 206 passive trip point for the zone. Activation is done by polling with
207 an interval of 1 second. 207 an interval of 1 second.
208 Unit: millidegrees Celsius 208 Unit: millidegrees Celsius
209 Valid values: 0 (disabled) or greater than 1000
209 RW, Optional 210 RW, Optional
210 211
211***************************** 212*****************************
diff --git a/Documentation/trace/events-kmem.txt b/Documentation/trace/events-kmem.txt
index 6ef2a8652e17..aa82ee4a5a87 100644
--- a/Documentation/trace/events-kmem.txt
+++ b/Documentation/trace/events-kmem.txt
@@ -1,7 +1,7 @@
1 Subsystem Trace Points: kmem 1 Subsystem Trace Points: kmem
2 2
3The tracing system kmem captures events related to object and page allocation 3The kmem tracing system captures events related to object and page allocation
4within the kernel. Broadly speaking there are four major subheadings. 4within the kernel. Broadly speaking there are five major subheadings.
5 5
6 o Slab allocation of small objects of unknown type (kmalloc) 6 o Slab allocation of small objects of unknown type (kmalloc)
7 o Slab allocation of small objects of known type 7 o Slab allocation of small objects of known type
@@ -9,7 +9,7 @@ within the kernel. Broadly speaking there are four major subheadings.
9 o Per-CPU Allocator Activity 9 o Per-CPU Allocator Activity
10 o External Fragmentation 10 o External Fragmentation
11 11
12This document will describe what each of the tracepoints are and why they 12This document describes what each of the tracepoints is and why they
13might be useful. 13might be useful.
14 14
151. Slab allocation of small objects of unknown type 151. Slab allocation of small objects of unknown type
@@ -34,7 +34,7 @@ kmem_cache_free call_site=%lx ptr=%p
34These events are similar in usage to the kmalloc-related events except that 34These events are similar in usage to the kmalloc-related events except that
35it is likely easier to pin the event down to a specific cache. At the time 35it is likely easier to pin the event down to a specific cache. At the time
36of writing, no information is available on what slab is being allocated from, 36of writing, no information is available on what slab is being allocated from,
37but the call_site can usually be used to extrapolate that information 37but the call_site can usually be used to extrapolate that information.
38 38
393. Page allocation 393. Page allocation
40================== 40==================
@@ -80,9 +80,9 @@ event indicating whether it is for a percpu_refill or not.
80When the per-CPU list is too full, a number of pages are freed, each one 80When the per-CPU list is too full, a number of pages are freed, each one
81which triggers a mm_page_pcpu_drain event. 81which triggers a mm_page_pcpu_drain event.
82 82
83The individual nature of the events are so that pages can be tracked 83The individual nature of the events is so that pages can be tracked
84between allocation and freeing. A number of drain or refill pages that occur 84between allocation and freeing. A number of drain or refill pages that occur
85consecutively imply the zone->lock being taken once. Large amounts of PCP 85consecutively imply the zone->lock being taken once. Large amounts of per-CPU
86refills and drains could imply an imbalance between CPUs where too much work 86refills and drains could imply an imbalance between CPUs where too much work
87is being concentrated in one place. It could also indicate that the per-CPU 87is being concentrated in one place. It could also indicate that the per-CPU
88lists should be a larger size. Finally, large amounts of refills on one CPU 88lists should be a larger size. Finally, large amounts of refills on one CPU
@@ -102,6 +102,6 @@ is important.
102 102
103Large numbers of this event implies that memory is fragmenting and 103Large numbers of this event implies that memory is fragmenting and
104high-order allocations will start failing at some time in the future. One 104high-order allocations will start failing at some time in the future. One
105means of reducing the occurange of this event is to increase the size of 105means of reducing the occurrence of this event is to increase the size of
106min_free_kbytes in increments of 3*pageblock_size*nr_online_nodes where 106min_free_kbytes in increments of 3*pageblock_size*nr_online_nodes where
107pageblock_size is usually the size of the default hugepage size. 107pageblock_size is usually the size of the default hugepage size.
diff --git a/Documentation/trace/ftrace-design.txt b/Documentation/trace/ftrace-design.txt
index 641a1ef2a7ff..239f14b2b55a 100644
--- a/Documentation/trace/ftrace-design.txt
+++ b/Documentation/trace/ftrace-design.txt
@@ -53,14 +53,14 @@ size of the mcount call that is embedded in the function).
53For example, if the function foo() calls bar(), when the bar() function calls 53For example, if the function foo() calls bar(), when the bar() function calls
54mcount(), the arguments mcount() will pass to the tracer are: 54mcount(), the arguments mcount() will pass to the tracer are:
55 "frompc" - the address bar() will use to return to foo() 55 "frompc" - the address bar() will use to return to foo()
56 "selfpc" - the address bar() (with _mcount() size adjustment) 56 "selfpc" - the address bar() (with mcount() size adjustment)
57 57
58Also keep in mind that this mcount function will be called *a lot*, so 58Also keep in mind that this mcount function will be called *a lot*, so
59optimizing for the default case of no tracer will help the smooth running of 59optimizing for the default case of no tracer will help the smooth running of
60your system when tracing is disabled. So the start of the mcount function is 60your system when tracing is disabled. So the start of the mcount function is
61typically the bare min with checking things before returning. That also means 61typically the bare minimum with checking things before returning. That also
62the code flow should usually kept linear (i.e. no branching in the nop case). 62means the code flow should usually be kept linear (i.e. no branching in the nop
63This is of course an optimization and not a hard requirement. 63case). This is of course an optimization and not a hard requirement.
64 64
65Here is some pseudo code that should help (these functions should actually be 65Here is some pseudo code that should help (these functions should actually be
66implemented in assembly): 66implemented in assembly):
@@ -131,10 +131,10 @@ some functions to save (hijack) and restore the return address.
131 131
132The mcount function should check the function pointers ftrace_graph_return 132The mcount function should check the function pointers ftrace_graph_return
133(compare to ftrace_stub) and ftrace_graph_entry (compare to 133(compare to ftrace_stub) and ftrace_graph_entry (compare to
134ftrace_graph_entry_stub). If either of those are not set to the relevant stub 134ftrace_graph_entry_stub). If either of those is not set to the relevant stub
135function, call the arch-specific function ftrace_graph_caller which in turn 135function, call the arch-specific function ftrace_graph_caller which in turn
136calls the arch-specific function prepare_ftrace_return. Neither of these 136calls the arch-specific function prepare_ftrace_return. Neither of these
137function names are strictly required, but you should use them anyways to stay 137function names is strictly required, but you should use them anyway to stay
138consistent across the architecture ports -- easier to compare & contrast 138consistent across the architecture ports -- easier to compare & contrast
139things. 139things.
140 140
@@ -144,7 +144,7 @@ but the first argument should be a pointer to the "frompc". Typically this is
144located on the stack. This allows the function to hijack the return address 144located on the stack. This allows the function to hijack the return address
145temporarily to have it point to the arch-specific function return_to_handler. 145temporarily to have it point to the arch-specific function return_to_handler.
146That function will simply call the common ftrace_return_to_handler function and 146That function will simply call the common ftrace_return_to_handler function and
147that will return the original return address with which, you can return to the 147that will return the original return address with which you can return to the
148original call site. 148original call site.
149 149
150Here is the updated mcount pseudo code: 150Here is the updated mcount pseudo code:
diff --git a/Documentation/trace/mmiotrace.txt b/Documentation/trace/mmiotrace.txt
index 162effbfbdec..664e7386d89e 100644
--- a/Documentation/trace/mmiotrace.txt
+++ b/Documentation/trace/mmiotrace.txt
@@ -44,7 +44,8 @@ Check for lost events.
44Usage 44Usage
45----- 45-----
46 46
47Make sure debugfs is mounted to /sys/kernel/debug. If not, (requires root privileges) 47Make sure debugfs is mounted to /sys/kernel/debug.
48If not (requires root privileges):
48$ mount -t debugfs debugfs /sys/kernel/debug 49$ mount -t debugfs debugfs /sys/kernel/debug
49 50
50Check that the driver you are about to trace is not loaded. 51Check that the driver you are about to trace is not loaded.
@@ -91,7 +92,7 @@ $ dmesg > dmesg.txt
91$ tar zcf pciid-nick-mmiotrace.tar.gz mydump.txt lspci.txt dmesg.txt 92$ tar zcf pciid-nick-mmiotrace.tar.gz mydump.txt lspci.txt dmesg.txt
92and then send the .tar.gz file. The trace compresses considerably. Replace 93and then send the .tar.gz file. The trace compresses considerably. Replace
93"pciid" and "nick" with the PCI ID or model name of your piece of hardware 94"pciid" and "nick" with the PCI ID or model name of your piece of hardware
94under investigation and your nick name. 95under investigation and your nickname.
95 96
96 97
97How Mmiotrace Works 98How Mmiotrace Works
@@ -100,7 +101,7 @@ How Mmiotrace Works
100Access to hardware IO-memory is gained by mapping addresses from PCI bus by 101Access to hardware IO-memory is gained by mapping addresses from PCI bus by
101calling one of the ioremap_*() functions. Mmiotrace is hooked into the 102calling one of the ioremap_*() functions. Mmiotrace is hooked into the
102__ioremap() function and gets called whenever a mapping is created. Mapping is 103__ioremap() function and gets called whenever a mapping is created. Mapping is
103an event that is recorded into the trace log. Note, that ISA range mappings 104an event that is recorded into the trace log. Note that ISA range mappings
104are not caught, since the mapping always exists and is returned directly. 105are not caught, since the mapping always exists and is returned directly.
105 106
106MMIO accesses are recorded via page faults. Just before __ioremap() returns, 107MMIO accesses are recorded via page faults. Just before __ioremap() returns,
@@ -122,11 +123,11 @@ Trace Log Format
122---------------- 123----------------
123 124
124The raw log is text and easily filtered with e.g. grep and awk. One record is 125The raw log is text and easily filtered with e.g. grep and awk. One record is
125one line in the log. A record starts with a keyword, followed by keyword 126one line in the log. A record starts with a keyword, followed by keyword-
126dependant arguments. Arguments are separated by a space, or continue until the 127dependent arguments. Arguments are separated by a space, or continue until the
127end of line. The format for version 20070824 is as follows: 128end of line. The format for version 20070824 is as follows:
128 129
129Explanation Keyword Space separated arguments 130Explanation Keyword Space-separated arguments
130--------------------------------------------------------------------------- 131---------------------------------------------------------------------------
131 132
132read event R width, timestamp, map id, physical, value, PC, PID 133read event R width, timestamp, map id, physical, value, PC, PID
@@ -136,7 +137,7 @@ iounmap event UNMAP timestamp, map id, PC, PID
136marker MARK timestamp, text 137marker MARK timestamp, text
137version VERSION the string "20070824" 138version VERSION the string "20070824"
138info for reader LSPCI one line from lspci -v 139info for reader LSPCI one line from lspci -v
139PCI address map PCIDEV space separated /proc/bus/pci/devices data 140PCI address map PCIDEV space-separated /proc/bus/pci/devices data
140unk. opcode UNKNOWN timestamp, map id, physical, data, PC, PID 141unk. opcode UNKNOWN timestamp, map id, physical, data, PC, PID
141 142
142Timestamp is in seconds with decimals. Physical is a PCI bus address, virtual 143Timestamp is in seconds with decimals. Physical is a PCI bus address, virtual
diff --git a/Documentation/trace/ring-buffer-design.txt b/Documentation/trace/ring-buffer-design.txt
index 5b1d23d604c5..d299ff31df57 100644
--- a/Documentation/trace/ring-buffer-design.txt
+++ b/Documentation/trace/ring-buffer-design.txt
@@ -33,9 +33,9 @@ head_page - a pointer to the page that the reader will use next
33 33
34tail_page - a pointer to the page that will be written to next 34tail_page - a pointer to the page that will be written to next
35 35
36commit_page - a pointer to the page with the last finished non nested write. 36commit_page - a pointer to the page with the last finished non-nested write.
37 37
38cmpxchg - hardware assisted atomic transaction that performs the following: 38cmpxchg - hardware-assisted atomic transaction that performs the following:
39 39
40 A = B iff previous A == C 40 A = B iff previous A == C
41 41
@@ -52,15 +52,15 @@ The Generic Ring Buffer
52The ring buffer can be used in either an overwrite mode or in 52The ring buffer can be used in either an overwrite mode or in
53producer/consumer mode. 53producer/consumer mode.
54 54
55Producer/consumer mode is where the producer were to fill up the 55Producer/consumer mode is where if the producer were to fill up the
56buffer before the consumer could free up anything, the producer 56buffer before the consumer could free up anything, the producer
57will stop writing to the buffer. This will lose most recent events. 57will stop writing to the buffer. This will lose most recent events.
58 58
59Overwrite mode is where the produce were to fill up the buffer 59Overwrite mode is where if the producer were to fill up the buffer
60before the consumer could free up anything, the producer will 60before the consumer could free up anything, the producer will
61overwrite the older data. This will lose the oldest events. 61overwrite the older data. This will lose the oldest events.
62 62
63No two writers can write at the same time (on the same per cpu buffer), 63No two writers can write at the same time (on the same per-cpu buffer),
64but a writer may interrupt another writer, but it must finish writing 64but a writer may interrupt another writer, but it must finish writing
65before the previous writer may continue. This is very important to the 65before the previous writer may continue. This is very important to the
66algorithm. The writers act like a "stack". The way interrupts works 66algorithm. The writers act like a "stack". The way interrupts works
@@ -79,16 +79,16 @@ the interrupt doing a write as well.
79 79
80Readers can happen at any time. But no two readers may run at the 80Readers can happen at any time. But no two readers may run at the
81same time, nor can a reader preempt/interrupt another reader. A reader 81same time, nor can a reader preempt/interrupt another reader. A reader
82can not preempt/interrupt a writer, but it may read/consume from the 82cannot preempt/interrupt a writer, but it may read/consume from the
83buffer at the same time as a writer is writing, but the reader must be 83buffer at the same time as a writer is writing, but the reader must be
84on another processor to do so. A reader may read on its own processor 84on another processor to do so. A reader may read on its own processor
85and can be preempted by a writer. 85and can be preempted by a writer.
86 86
87A writer can preempt a reader, but a reader can not preempt a writer. 87A writer can preempt a reader, but a reader cannot preempt a writer.
88But a reader can read the buffer at the same time (on another processor) 88But a reader can read the buffer at the same time (on another processor)
89as a writer. 89as a writer.
90 90
91The ring buffer is made up of a list of pages held together by a link list. 91The ring buffer is made up of a list of pages held together by a linked list.
92 92
93At initialization a reader page is allocated for the reader that is not 93At initialization a reader page is allocated for the reader that is not
94part of the ring buffer. 94part of the ring buffer.
@@ -102,7 +102,7 @@ the head page.
102 102
103The reader has its own page to use. At start up time, this page is 103The reader has its own page to use. At start up time, this page is
104allocated but is not attached to the list. When the reader wants 104allocated but is not attached to the list. When the reader wants
105to read from the buffer, if its page is empty (like it is on start up) 105to read from the buffer, if its page is empty (like it is on start-up),
106it will swap its page with the head_page. The old reader page will 106it will swap its page with the head_page. The old reader page will
107become part of the ring buffer and the head_page will be removed. 107become part of the ring buffer and the head_page will be removed.
108The page after the inserted page (old reader_page) will become the 108The page after the inserted page (old reader_page) will become the
@@ -206,7 +206,7 @@ The main pointers:
206 206
207 commit page - the page that last finished a write. 207 commit page - the page that last finished a write.
208 208
209The commit page only is updated by the outer most writer in the 209The commit page only is updated by the outermost writer in the
210writer stack. A writer that preempts another writer will not move the 210writer stack. A writer that preempts another writer will not move the
211commit page. 211commit page.
212 212
@@ -281,7 +281,7 @@ with the previous write.
281The commit pointer points to the last write location that was 281The commit pointer points to the last write location that was
282committed without preempting another write. When a write that 282committed without preempting another write. When a write that
283preempted another write is committed, it only becomes a pending commit 283preempted another write is committed, it only becomes a pending commit
284and will not be a full commit till all writes have been committed. 284and will not be a full commit until all writes have been committed.
285 285
286The commit page points to the page that has the last full commit. 286The commit page points to the page that has the last full commit.
287The tail page points to the page with the last write (before 287The tail page points to the page with the last write (before
@@ -292,7 +292,7 @@ be several pages ahead. If the tail page catches up to the commit
292page then no more writes may take place (regardless of the mode 292page then no more writes may take place (regardless of the mode
293of the ring buffer: overwrite and produce/consumer). 293of the ring buffer: overwrite and produce/consumer).
294 294
295The order of pages are: 295The order of pages is:
296 296
297 head page 297 head page
298 commit page 298 commit page
@@ -311,7 +311,7 @@ Possible scenario:
311There is a special case that the head page is after either the commit page 311There is a special case that the head page is after either the commit page
312and possibly the tail page. That is when the commit (and tail) page has been 312and possibly the tail page. That is when the commit (and tail) page has been
313swapped with the reader page. This is because the head page is always 313swapped with the reader page. This is because the head page is always
314part of the ring buffer, but the reader page is not. When ever there 314part of the ring buffer, but the reader page is not. Whenever there
315has been less than a full page that has been committed inside the ring buffer, 315has been less than a full page that has been committed inside the ring buffer,
316and a reader swaps out a page, it will be swapping out the commit page. 316and a reader swaps out a page, it will be swapping out the commit page.
317 317
@@ -338,7 +338,7 @@ and a reader swaps out a page, it will be swapping out the commit page.
338In this case, the head page will not move when the tail and commit 338In this case, the head page will not move when the tail and commit
339move back into the ring buffer. 339move back into the ring buffer.
340 340
341The reader can not swap a page into the ring buffer if the commit page 341The reader cannot swap a page into the ring buffer if the commit page
342is still on that page. If the read meets the last commit (real commit 342is still on that page. If the read meets the last commit (real commit
343not pending or reserved), then there is nothing more to read. 343not pending or reserved), then there is nothing more to read.
344The buffer is considered empty until another full commit finishes. 344The buffer is considered empty until another full commit finishes.
@@ -395,7 +395,7 @@ The main idea behind the lockless algorithm is to combine the moving
395of the head_page pointer with the swapping of pages with the reader. 395of the head_page pointer with the swapping of pages with the reader.
396State flags are placed inside the pointer to the page. To do this, 396State flags are placed inside the pointer to the page. To do this,
397each page must be aligned in memory by 4 bytes. This will allow the 2 397each page must be aligned in memory by 4 bytes. This will allow the 2
398least significant bits of the address to be used as flags. Since 398least significant bits of the address to be used as flags, since
399they will always be zero for the address. To get the address, 399they will always be zero for the address. To get the address,
400simply mask out the flags. 400simply mask out the flags.
401 401
@@ -460,7 +460,7 @@ When the reader tries to swap the page with the ring buffer, it
460will also use cmpxchg. If the flag bit in the pointer to the 460will also use cmpxchg. If the flag bit in the pointer to the
461head page does not have the HEADER flag set, the compare will fail 461head page does not have the HEADER flag set, the compare will fail
462and the reader will need to look for the new head page and try again. 462and the reader will need to look for the new head page and try again.
463Note, the flag UPDATE and HEADER are never set at the same time. 463Note, the flags UPDATE and HEADER are never set at the same time.
464 464
465The reader swaps the reader page as follows: 465The reader swaps the reader page as follows:
466 466
@@ -539,7 +539,7 @@ updated to the reader page.
539 | +-----------------------------+ | 539 | +-----------------------------+ |
540 +------------------------------------+ 540 +------------------------------------+
541 541
542Another important point. The page that the reader page points back to 542Another important point: The page that the reader page points back to
543by its previous pointer (the one that now points to the new head page) 543by its previous pointer (the one that now points to the new head page)
544never points back to the reader page. That is because the reader page is 544never points back to the reader page. That is because the reader page is
545not part of the ring buffer. Traversing the ring buffer via the next pointers 545not part of the ring buffer. Traversing the ring buffer via the next pointers
@@ -572,7 +572,7 @@ not be able to swap the head page from the buffer, nor will it be able to
572move the head page, until the writer is finished with the move. 572move the head page, until the writer is finished with the move.
573 573
574This eliminates any races that the reader can have on the writer. The reader 574This eliminates any races that the reader can have on the writer. The reader
575must spin, and this is why the reader can not preempt the writer. 575must spin, and this is why the reader cannot preempt the writer.
576 576
577 tail page 577 tail page
578 | 578 |
@@ -659,9 +659,9 @@ before pushing the head page. If it is, then it can be assumed that the
659tail page wrapped the buffer, and we must drop new writes. 659tail page wrapped the buffer, and we must drop new writes.
660 660
661This is not a race condition, because the commit page can only be moved 661This is not a race condition, because the commit page can only be moved
662by the outter most writer (the writer that was preempted). 662by the outermost writer (the writer that was preempted).
663This means that the commit will not move while a writer is moving the 663This means that the commit will not move while a writer is moving the
664tail page. The reader can not swap the reader page if it is also being 664tail page. The reader cannot swap the reader page if it is also being
665used as the commit page. The reader can simply check that the commit 665used as the commit page. The reader can simply check that the commit
666is off the reader page. Once the commit page leaves the reader page 666is off the reader page. Once the commit page leaves the reader page
667it will never go back on it unless a reader does another swap with the 667it will never go back on it unless a reader does another swap with the
@@ -733,7 +733,7 @@ The write converts the head page pointer to UPDATE.
733--->| |<---| |<---| |<---| |<--- 733--->| |<---| |<---| |<---| |<---
734 +---+ +---+ +---+ +---+ 734 +---+ +---+ +---+ +---+
735 735
736But if a nested writer preempts here. It will see that the next 736But if a nested writer preempts here, it will see that the next
737page is a head page, but it is also nested. It will detect that 737page is a head page, but it is also nested. It will detect that
738it is nested and will save that information. The detection is the 738it is nested and will save that information. The detection is the
739fact that it sees the UPDATE flag instead of a HEADER or NORMAL 739fact that it sees the UPDATE flag instead of a HEADER or NORMAL
@@ -761,7 +761,7 @@ to NORMAL.
761--->| |<---| |<---| |<---| |<--- 761--->| |<---| |<---| |<---| |<---
762 +---+ +---+ +---+ +---+ 762 +---+ +---+ +---+ +---+
763 763
764After the nested writer finishes, the outer most writer will convert 764After the nested writer finishes, the outermost writer will convert
765the UPDATE pointer to NORMAL. 765the UPDATE pointer to NORMAL.
766 766
767 767
@@ -812,7 +812,7 @@ head page.
812 +---+ +---+ +---+ +---+ 812 +---+ +---+ +---+ +---+
813 813
814The nested writer moves the tail page forward. But does not set the old 814The nested writer moves the tail page forward. But does not set the old
815update page to NORMAL because it is not the outer most writer. 815update page to NORMAL because it is not the outermost writer.
816 816
817 tail page 817 tail page
818 | 818 |
@@ -892,7 +892,7 @@ It will return to the first writer.
892--->| |<---| |<---| |<---| |<--- 892--->| |<---| |<---| |<---| |<---
893 +---+ +---+ +---+ +---+ 893 +---+ +---+ +---+ +---+
894 894
895The first writer can not know atomically test if the tail page moved 895The first writer cannot know atomically if the tail page moved
896while it updates the HEAD page. It will then update the head page to 896while it updates the HEAD page. It will then update the head page to
897what it thinks is the new head page. 897what it thinks is the new head page.
898 898
@@ -923,9 +923,9 @@ if the tail page is either where it use to be or on the next page:
923--->| |<---| |<---| |<---| |<--- 923--->| |<---| |<---| |<---| |<---
924 +---+ +---+ +---+ +---+ 924 +---+ +---+ +---+ +---+
925 925
926If tail page != A and tail page does not equal B, then it must reset the 926If tail page != A and tail page != B, then it must reset the pointer
927pointer back to NORMAL. The fact that it only needs to worry about 927back to NORMAL. The fact that it only needs to worry about nested
928nested writers, it only needs to check this after setting the HEAD page. 928writers means that it only needs to check this after setting the HEAD page.
929 929
930 930
931(first writer) 931(first writer)
@@ -939,7 +939,7 @@ nested writers, it only needs to check this after setting the HEAD page.
939 +---+ +---+ +---+ +---+ 939 +---+ +---+ +---+ +---+
940 940
941Now the writer can update the head page. This is also why the head page must 941Now the writer can update the head page. This is also why the head page must
942remain in UPDATE and only reset by the outer most writer. This prevents 942remain in UPDATE and only reset by the outermost writer. This prevents
943the reader from seeing the incorrect head page. 943the reader from seeing the incorrect head page.
944 944
945 945
diff --git a/Documentation/trace/tracepoint-analysis.txt b/Documentation/trace/tracepoint-analysis.txt
index 5eb4e487e667..87bee3c129ba 100644
--- a/Documentation/trace/tracepoint-analysis.txt
+++ b/Documentation/trace/tracepoint-analysis.txt
@@ -10,8 +10,8 @@ Tracepoints (see Documentation/trace/tracepoints.txt) can be used without
10creating custom kernel modules to register probe functions using the event 10creating custom kernel modules to register probe functions using the event
11tracing infrastructure. 11tracing infrastructure.
12 12
13Simplistically, tracepoints will represent an important event that when can 13Simplistically, tracepoints represent important events that can be
14be taken in conjunction with other tracepoints to build a "Big Picture" of 14taken in conjunction with other tracepoints to build a "Big Picture" of
15what is going on within the system. There are a large number of methods for 15what is going on within the system. There are a large number of methods for
16gathering and interpreting these events. Lacking any current Best Practises, 16gathering and interpreting these events. Lacking any current Best Practises,
17this document describes some of the methods that can be used. 17this document describes some of the methods that can be used.
@@ -33,12 +33,12 @@ calling
33 33
34will give a fair indication of the number of events available. 34will give a fair indication of the number of events available.
35 35
362.2 PCL 362.2 PCL (Performance Counters for Linux)
37------- 37-------
38 38
39Discovery and enumeration of all counters and events, including tracepoints 39Discovery and enumeration of all counters and events, including tracepoints,
40are available with the perf tool. Getting a list of available events is a 40are available with the perf tool. Getting a list of available events is a
41simple case of 41simple case of:
42 42
43 $ perf list 2>&1 | grep Tracepoint 43 $ perf list 2>&1 | grep Tracepoint
44 ext4:ext4_free_inode [Tracepoint event] 44 ext4:ext4_free_inode [Tracepoint event]
@@ -49,19 +49,19 @@ simple case of
49 [ .... remaining output snipped .... ] 49 [ .... remaining output snipped .... ]
50 50
51 51
522. Enabling Events 523. Enabling Events
53================== 53==================
54 54
552.1 System-Wide Event Enabling 553.1 System-Wide Event Enabling
56------------------------------ 56------------------------------
57 57
58See Documentation/trace/events.txt for a proper description on how events 58See Documentation/trace/events.txt for a proper description on how events
59can be enabled system-wide. A short example of enabling all events related 59can be enabled system-wide. A short example of enabling all events related
60to page allocation would look something like 60to page allocation would look something like:
61 61
62 $ for i in `find /sys/kernel/debug/tracing/events -name "enable" | grep mm_`; do echo 1 > $i; done 62 $ for i in `find /sys/kernel/debug/tracing/events -name "enable" | grep mm_`; do echo 1 > $i; done
63 63
642.2 System-Wide Event Enabling with SystemTap 643.2 System-Wide Event Enabling with SystemTap
65--------------------------------------------- 65---------------------------------------------
66 66
67In SystemTap, tracepoints are accessible using the kernel.trace() function 67In SystemTap, tracepoints are accessible using the kernel.trace() function
@@ -86,7 +86,7 @@ were allocating the pages.
86 print_count() 86 print_count()
87 } 87 }
88 88
892.3 System-Wide Event Enabling with PCL 893.3 System-Wide Event Enabling with PCL
90--------------------------------------- 90---------------------------------------
91 91
92By specifying the -a switch and analysing sleep, the system-wide events 92By specifying the -a switch and analysing sleep, the system-wide events
@@ -107,16 +107,16 @@ for a duration of time can be examined.
107Similarly, one could execute a shell and exit it as desired to get a report 107Similarly, one could execute a shell and exit it as desired to get a report
108at that point. 108at that point.
109 109
1102.4 Local Event Enabling 1103.4 Local Event Enabling
111------------------------ 111------------------------
112 112
113Documentation/trace/ftrace.txt describes how to enable events on a per-thread 113Documentation/trace/ftrace.txt describes how to enable events on a per-thread
114basis using set_ftrace_pid. 114basis using set_ftrace_pid.
115 115
1162.5 Local Event Enablement with PCL 1163.5 Local Event Enablement with PCL
117----------------------------------- 117-----------------------------------
118 118
119Events can be activate and tracked for the duration of a process on a local 119Events can be activated and tracked for the duration of a process on a local
120basis using PCL such as follows. 120basis using PCL such as follows.
121 121
122 $ perf stat -e kmem:mm_page_alloc -e kmem:mm_page_free_direct \ 122 $ perf stat -e kmem:mm_page_alloc -e kmem:mm_page_free_direct \
@@ -131,18 +131,18 @@ basis using PCL such as follows.
131 131
132 0.973913387 seconds time elapsed 132 0.973913387 seconds time elapsed
133 133
1343. Event Filtering 1344. Event Filtering
135================== 135==================
136 136
137Documentation/trace/ftrace.txt covers in-depth how to filter events in 137Documentation/trace/ftrace.txt covers in-depth how to filter events in
138ftrace. Obviously using grep and awk of trace_pipe is an option as well 138ftrace. Obviously using grep and awk of trace_pipe is an option as well
139as any script reading trace_pipe. 139as any script reading trace_pipe.
140 140
1414. Analysing Event Variances with PCL 1415. Analysing Event Variances with PCL
142===================================== 142=====================================
143 143
144Any workload can exhibit variances between runs and it can be important 144Any workload can exhibit variances between runs and it can be important
145to know what the standard deviation in. By and large, this is left to the 145to know what the standard deviation is. By and large, this is left to the
146performance analyst to do it by hand. In the event that the discrete event 146performance analyst to do it by hand. In the event that the discrete event
147occurrences are useful to the performance analyst, then perf can be used. 147occurrences are useful to the performance analyst, then perf can be used.
148 148
@@ -166,7 +166,7 @@ In the event that some higher-level event is required that depends on some
166aggregation of discrete events, then a script would need to be developed. 166aggregation of discrete events, then a script would need to be developed.
167 167
168Using --repeat, it is also possible to view how events are fluctuating over 168Using --repeat, it is also possible to view how events are fluctuating over
169time on a system wide basis using -a and sleep. 169time on a system-wide basis using -a and sleep.
170 170
171 $ perf stat -e kmem:mm_page_alloc -e kmem:mm_page_free_direct \ 171 $ perf stat -e kmem:mm_page_alloc -e kmem:mm_page_free_direct \
172 -e kmem:mm_pagevec_free \ 172 -e kmem:mm_pagevec_free \
@@ -180,7 +180,7 @@ time on a system wide basis using -a and sleep.
180 180
181 1.002251757 seconds time elapsed ( +- 0.005% ) 181 1.002251757 seconds time elapsed ( +- 0.005% )
182 182
1835. Higher-Level Analysis with Helper Scripts 1836. Higher-Level Analysis with Helper Scripts
184============================================ 184============================================
185 185
186When events are enabled the events that are triggering can be read from 186When events are enabled the events that are triggering can be read from
@@ -190,11 +190,11 @@ be gathered on-line as appropriate. Examples of post-processing might include
190 190
191 o Reading information from /proc for the PID that triggered the event 191 o Reading information from /proc for the PID that triggered the event
192 o Deriving a higher-level event from a series of lower-level events. 192 o Deriving a higher-level event from a series of lower-level events.
193 o Calculate latencies between two events 193 o Calculating latencies between two events
194 194
195Documentation/trace/postprocess/trace-pagealloc-postprocess.pl is an example 195Documentation/trace/postprocess/trace-pagealloc-postprocess.pl is an example
196script that can read trace_pipe from STDIN or a copy of a trace. When used 196script that can read trace_pipe from STDIN or a copy of a trace. When used
197on-line, it can be interrupted once to generate a report without existing 197on-line, it can be interrupted once to generate a report without exiting
198and twice to exit. 198and twice to exit.
199 199
200Simplistically, the script just reads STDIN and counts up events but it 200Simplistically, the script just reads STDIN and counts up events but it
@@ -212,12 +212,12 @@ also can do more such as
212 processes, the parent process responsible for creating all the helpers 212 processes, the parent process responsible for creating all the helpers
213 can be identified 213 can be identified
214 214
2156. Lower-Level Analysis with PCL 2157. Lower-Level Analysis with PCL
216================================ 216================================
217 217
218There may also be a requirement to identify what functions with a program 218There may also be a requirement to identify what functions within a program
219were generating events within the kernel. To begin this sort of analysis, the 219were generating events within the kernel. To begin this sort of analysis, the
220data must be recorded. At the time of writing, this required root 220data must be recorded. At the time of writing, this required root:
221 221
222 $ perf record -c 1 \ 222 $ perf record -c 1 \
223 -e kmem:mm_page_alloc -e kmem:mm_page_free_direct \ 223 -e kmem:mm_page_alloc -e kmem:mm_page_free_direct \
@@ -253,11 +253,11 @@ perf report.
253 # (For more details, try: perf report --sort comm,dso,symbol) 253 # (For more details, try: perf report --sort comm,dso,symbol)
254 # 254 #
255 255
256According to this, the vast majority of events occured triggered on events 256According to this, the vast majority of events triggered on events
257within the VDSO. With simple binaries, this will often be the case so lets 257within the VDSO. With simple binaries, this will often be the case so let's
258take a slightly different example. In the course of writing this, it was 258take a slightly different example. In the course of writing this, it was
259noticed that X was generating an insane amount of page allocations so lets look 259noticed that X was generating an insane amount of page allocations so let's look
260at it 260at it:
261 261
262 $ perf record -c 1 -f \ 262 $ perf record -c 1 -f \
263 -e kmem:mm_page_alloc -e kmem:mm_page_free_direct \ 263 -e kmem:mm_page_alloc -e kmem:mm_page_free_direct \
@@ -280,8 +280,8 @@ This was interrupted after a few seconds and
280 # (For more details, try: perf report --sort comm,dso,symbol) 280 # (For more details, try: perf report --sort comm,dso,symbol)
281 # 281 #
282 282
283So, almost half of the events are occuring in a library. To get an idea which 283So, almost half of the events are occurring in a library. To get an idea which
284symbol. 284symbol:
285 285
286 $ perf report --sort comm,dso,symbol 286 $ perf report --sort comm,dso,symbol
287 # Samples: 27666 287 # Samples: 27666
@@ -297,7 +297,7 @@ symbol.
297 0.01% Xorg /opt/gfx-test/lib/libpixman-1.so.0.13.1 [.] get_fast_path 297 0.01% Xorg /opt/gfx-test/lib/libpixman-1.so.0.13.1 [.] get_fast_path
298 0.00% Xorg [kernel] [k] ftrace_trace_userstack 298 0.00% Xorg [kernel] [k] ftrace_trace_userstack
299 299
300To see where within the function pixmanFillsse2 things are going wrong 300To see where within the function pixmanFillsse2 things are going wrong:
301 301
302 $ perf annotate pixmanFillsse2 302 $ perf annotate pixmanFillsse2
303 [ ... ] 303 [ ... ]
diff --git a/Documentation/usb/power-management.txt b/Documentation/usb/power-management.txt
index c7c1dc2f8017..3bf6818c8cf5 100644
--- a/Documentation/usb/power-management.txt
+++ b/Documentation/usb/power-management.txt
@@ -71,12 +71,10 @@ being accessed through sysfs, then it definitely is idle.
71 Forms of dynamic PM 71 Forms of dynamic PM
72 ------------------- 72 -------------------
73 73
74Dynamic suspends can occur in two ways: manual and automatic. 74Dynamic suspends occur when the kernel decides to suspend an idle
75"Manual" means that the user has told the kernel to suspend a device, 75device. This is called "autosuspend" for short. In general, a device
76whereas "automatic" means that the kernel has decided all by itself to 76won't be autosuspended unless it has been idle for some minimum period
77suspend a device. Automatic suspend is called "autosuspend" for 77of time, the so-called idle-delay time.
78short. In general, a device won't be autosuspended unless it has been
79idle for some minimum period of time, the so-called idle-delay time.
80 78
81Of course, nothing the kernel does on its own initiative should 79Of course, nothing the kernel does on its own initiative should
82prevent the computer or its devices from working properly. If a 80prevent the computer or its devices from working properly. If a
@@ -96,10 +94,11 @@ idle.
96We can categorize power management events in two broad classes: 94We can categorize power management events in two broad classes:
97external and internal. External events are those triggered by some 95external and internal. External events are those triggered by some
98agent outside the USB stack: system suspend/resume (triggered by 96agent outside the USB stack: system suspend/resume (triggered by
99userspace), manual dynamic suspend/resume (also triggered by 97userspace), manual dynamic resume (also triggered by userspace), and
100userspace), and remote wakeup (triggered by the device). Internal 98remote wakeup (triggered by the device). Internal events are those
101events are those triggered within the USB stack: autosuspend and 99triggered within the USB stack: autosuspend and autoresume. Note that
102autoresume. 100all dynamic suspend events are internal; external agents are not
101allowed to issue dynamic suspends.
103 102
104 103
105 The user interface for dynamic PM 104 The user interface for dynamic PM
@@ -145,9 +144,9 @@ relevant attribute files are: wakeup, level, and autosuspend.
145 number of seconds the device should remain idle before 144 number of seconds the device should remain idle before
146 the kernel will autosuspend it (the idle-delay time). 145 the kernel will autosuspend it (the idle-delay time).
147 The default is 2. 0 means to autosuspend as soon as 146 The default is 2. 0 means to autosuspend as soon as
148 the device becomes idle, and -1 means never to 147 the device becomes idle, and negative values mean
149 autosuspend. You can write a number to the file to 148 never to autosuspend. You can write a number to the
150 change the autosuspend idle-delay time. 149 file to change the autosuspend idle-delay time.
151 150
152Writing "-1" to power/autosuspend and writing "on" to power/level do 151Writing "-1" to power/autosuspend and writing "on" to power/level do
153essentially the same thing -- they both prevent the device from being 152essentially the same thing -- they both prevent the device from being
@@ -377,9 +376,9 @@ the device hasn't been idle for long enough, a delayed workqueue
377routine is automatically set up to carry out the operation when the 376routine is automatically set up to carry out the operation when the
378autosuspend idle-delay has expired. 377autosuspend idle-delay has expired.
379 378
380Autoresume attempts also can fail. This will happen if power/level is 379Autoresume attempts also can fail, although failure would mean that
381set to "suspend" or if the device doesn't manage to resume properly. 380the device is no longer present or operating properly. Unlike
382Unlike autosuspend, there's no delay for an autoresume. 381autosuspend, there's no delay for an autoresume.
383 382
384 383
385 Other parts of the driver interface 384 Other parts of the driver interface
@@ -527,13 +526,3 @@ succeed, it may still remain active and thus cause the system to
527resume as soon as the system suspend is complete. Or the remote 526resume as soon as the system suspend is complete. Or the remote
528wakeup may fail and get lost. Which outcome occurs depends on timing 527wakeup may fail and get lost. Which outcome occurs depends on timing
529and on the hardware and firmware design. 528and on the hardware and firmware design.
530
531More interestingly, a device might undergo a manual resume or
532autoresume during system suspend. With current kernels this shouldn't
533happen, because manual resumes must be initiated by userspace and
534autoresumes happen in response to I/O requests, but all user processes
535and I/O should be quiescent during a system suspend -- thanks to the
536freezer. However there are plans to do away with the freezer, which
537would mean these things would become possible. If and when this comes
538about, the USB core will carefully arrange matters so that either type
539of resume will block until the entire system has resumed.
diff --git a/Documentation/vgaarbiter.txt b/Documentation/vgaarbiter.txt
index 987f9b0a5ece..43a9b0694fdd 100644
--- a/Documentation/vgaarbiter.txt
+++ b/Documentation/vgaarbiter.txt
@@ -103,7 +103,7 @@ I.2 libpciaccess
103---------------- 103----------------
104 104
105To use the vga arbiter char device it was implemented an API inside the 105To use the vga arbiter char device it was implemented an API inside the
106libpciaccess library. One fieldd was added to struct pci_device (each device 106libpciaccess library. One field was added to struct pci_device (each device
107on the system): 107on the system):
108 108
109 /* the type of resource decoded by the device */ 109 /* the type of resource decoded by the device */
diff --git a/Documentation/video4linux/gspca.txt b/Documentation/video4linux/gspca.txt
index 319d9838e87e..1800a62cf135 100644
--- a/Documentation/video4linux/gspca.txt
+++ b/Documentation/video4linux/gspca.txt
@@ -12,6 +12,7 @@ m5602 0402:5602 ALi Video Camera Controller
12spca501 040a:0002 Kodak DVC-325 12spca501 040a:0002 Kodak DVC-325
13spca500 040a:0300 Kodak EZ200 13spca500 040a:0300 Kodak EZ200
14zc3xx 041e:041e Creative WebCam Live! 14zc3xx 041e:041e Creative WebCam Live!
15ov519 041e:4003 Video Blaster WebCam Go Plus
15spca500 041e:400a Creative PC-CAM 300 16spca500 041e:400a Creative PC-CAM 300
16sunplus 041e:400b Creative PC-CAM 600 17sunplus 041e:400b Creative PC-CAM 600
17sunplus 041e:4012 PC-Cam350 18sunplus 041e:4012 PC-Cam350
@@ -168,10 +169,14 @@ sunplus 055f:c650 Mustek MDC5500Z
168zc3xx 055f:d003 Mustek WCam300A 169zc3xx 055f:d003 Mustek WCam300A
169zc3xx 055f:d004 Mustek WCam300 AN 170zc3xx 055f:d004 Mustek WCam300 AN
170conex 0572:0041 Creative Notebook cx11646 171conex 0572:0041 Creative Notebook cx11646
172ov519 05a9:0511 Video Blaster WebCam 3/WebCam Plus, D-Link USB Digital Video Camera
173ov519 05a9:0518 Creative WebCam
171ov519 05a9:0519 OV519 Microphone 174ov519 05a9:0519 OV519 Microphone
172ov519 05a9:0530 OmniVision 175ov519 05a9:0530 OmniVision
176ov519 05a9:2800 OmniVision SuperCAM
173ov519 05a9:4519 Webcam Classic 177ov519 05a9:4519 Webcam Classic
174ov519 05a9:8519 OmniVision 178ov519 05a9:8519 OmniVision
179ov519 05a9:a511 D-Link USB Digital Video Camera
175ov519 05a9:a518 D-Link DSB-C310 Webcam 180ov519 05a9:a518 D-Link DSB-C310 Webcam
176sunplus 05da:1018 Digital Dream Enigma 1.3 181sunplus 05da:1018 Digital Dream Enigma 1.3
177stk014 05e1:0893 Syntek DV4000 182stk014 05e1:0893 Syntek DV4000
@@ -187,7 +192,7 @@ ov534 06f8:3002 Hercules Blog Webcam
187ov534 06f8:3003 Hercules Dualpix HD Weblog 192ov534 06f8:3003 Hercules Dualpix HD Weblog
188sonixj 06f8:3004 Hercules Classic Silver 193sonixj 06f8:3004 Hercules Classic Silver
189sonixj 06f8:3008 Hercules Deluxe Optical Glass 194sonixj 06f8:3008 Hercules Deluxe Optical Glass
190pac7311 06f8:3009 Hercules Classic Link 195pac7302 06f8:3009 Hercules Classic Link
191spca508 0733:0110 ViewQuest VQ110 196spca508 0733:0110 ViewQuest VQ110
192spca501 0733:0401 Intel Create and Share 197spca501 0733:0401 Intel Create and Share
193spca501 0733:0402 ViewQuest M318B 198spca501 0733:0402 ViewQuest M318B
@@ -199,6 +204,7 @@ sunplus 0733:2221 Mercury Digital Pro 3.1p
199sunplus 0733:3261 Concord 3045 spca536a 204sunplus 0733:3261 Concord 3045 spca536a
200sunplus 0733:3281 Cyberpix S550V 205sunplus 0733:3281 Cyberpix S550V
201spca506 0734:043b 3DeMon USB Capture aka 206spca506 0734:043b 3DeMon USB Capture aka
207ov519 0813:0002 Dual Mode USB Camera Plus
202spca500 084d:0003 D-Link DSC-350 208spca500 084d:0003 D-Link DSC-350
203spca500 08ca:0103 Aiptek PocketDV 209spca500 08ca:0103 Aiptek PocketDV
204sunplus 08ca:0104 Aiptek PocketDVII 1.3 210sunplus 08ca:0104 Aiptek PocketDVII 1.3
@@ -236,15 +242,15 @@ pac7311 093a:2603 Philips SPC 500 NC
236pac7311 093a:2608 Trust WB-3300p 242pac7311 093a:2608 Trust WB-3300p
237pac7311 093a:260e Gigaware VGA PC Camera, Trust WB-3350p, SIGMA cam 2350 243pac7311 093a:260e Gigaware VGA PC Camera, Trust WB-3350p, SIGMA cam 2350
238pac7311 093a:260f SnakeCam 244pac7311 093a:260f SnakeCam
239pac7311 093a:2620 Apollo AC-905 245pac7302 093a:2620 Apollo AC-905
240pac7311 093a:2621 PAC731x 246pac7302 093a:2621 PAC731x
241pac7311 093a:2622 Genius Eye 312 247pac7302 093a:2622 Genius Eye 312
242pac7311 093a:2624 PAC7302 248pac7302 093a:2624 PAC7302
243pac7311 093a:2626 Labtec 2200 249pac7302 093a:2626 Labtec 2200
244pac7311 093a:2628 Genius iLook 300 250pac7302 093a:2628 Genius iLook 300
245pac7311 093a:2629 Genious iSlim 300 251pac7302 093a:2629 Genious iSlim 300
246pac7311 093a:262a Webcam 300k 252pac7302 093a:262a Webcam 300k
247pac7311 093a:262c Philips SPC 230 NC 253pac7302 093a:262c Philips SPC 230 NC
248jeilinj 0979:0280 Sakar 57379 254jeilinj 0979:0280 Sakar 57379
249zc3xx 0ac8:0302 Z-star Vimicro zc0302 255zc3xx 0ac8:0302 Z-star Vimicro zc0302
250vc032x 0ac8:0321 Vimicro generic vc0321 256vc032x 0ac8:0321 Vimicro generic vc0321
@@ -259,6 +265,7 @@ vc032x 0ac8:c002 Sony embedded vimicro
259vc032x 0ac8:c301 Samsung Q1 Ultra Premium 265vc032x 0ac8:c301 Samsung Q1 Ultra Premium
260spca508 0af9:0010 Hama USB Sightcam 100 266spca508 0af9:0010 Hama USB Sightcam 100
261spca508 0af9:0011 Hama USB Sightcam 100 267spca508 0af9:0011 Hama USB Sightcam 100
268ov519 0b62:0059 iBOT2 Webcam
262sonixb 0c45:6001 Genius VideoCAM NB 269sonixb 0c45:6001 Genius VideoCAM NB
263sonixb 0c45:6005 Microdia Sweex Mini Webcam 270sonixb 0c45:6005 Microdia Sweex Mini Webcam
264sonixb 0c45:6007 Sonix sn9c101 + Tas5110D 271sonixb 0c45:6007 Sonix sn9c101 + Tas5110D
@@ -318,8 +325,10 @@ sn9c20x 0c45:62b3 PC Camera (SN9C202 + OV9655)
318sn9c20x 0c45:62bb PC Camera (SN9C202 + OV7660) 325sn9c20x 0c45:62bb PC Camera (SN9C202 + OV7660)
319sn9c20x 0c45:62bc PC Camera (SN9C202 + HV7131R) 326sn9c20x 0c45:62bc PC Camera (SN9C202 + HV7131R)
320sunplus 0d64:0303 Sunplus FashionCam DXG 327sunplus 0d64:0303 Sunplus FashionCam DXG
328ov519 0e96:c001 TRUST 380 USB2 SPACEC@M
321etoms 102c:6151 Qcam Sangha CIF 329etoms 102c:6151 Qcam Sangha CIF
322etoms 102c:6251 Qcam xxxxxx VGA 330etoms 102c:6251 Qcam xxxxxx VGA
331ov519 1046:9967 W9967CF/W9968CF WebCam IC, Video Blaster WebCam Go
323zc3xx 10fd:0128 Typhoon Webshot II USB 300k 0x0128 332zc3xx 10fd:0128 Typhoon Webshot II USB 300k 0x0128
324spca561 10fd:7e50 FlyCam Usb 100 333spca561 10fd:7e50 FlyCam Usb 100
325zc3xx 10fd:8050 Typhoon Webshot II USB 300k 334zc3xx 10fd:8050 Typhoon Webshot II USB 300k
@@ -332,7 +341,12 @@ spca501 1776:501c Arowana 300K CMOS Camera
332t613 17a1:0128 TASCORP JPEG Webcam, NGS Cyclops 341t613 17a1:0128 TASCORP JPEG Webcam, NGS Cyclops
333vc032x 17ef:4802 Lenovo Vc0323+MI1310_SOC 342vc032x 17ef:4802 Lenovo Vc0323+MI1310_SOC
334pac207 2001:f115 D-Link DSB-C120 343pac207 2001:f115 D-Link DSB-C120
344sq905c 2770:9050 sq905c
345sq905c 2770:905c DualCamera
346sq905 2770:9120 Argus Digital Camera DC1512
347sq905c 2770:913d sq905c
335spca500 2899:012c Toptro Industrial 348spca500 2899:012c Toptro Industrial
349ov519 8020:ef04 ov519
336spca508 8086:0110 Intel Easy PC Camera 350spca508 8086:0110 Intel Easy PC Camera
337spca500 8086:0630 Intel Pocket PC Camera 351spca500 8086:0630 Intel Pocket PC Camera
338spca506 99fa:8988 Grandtec V.cap 352spca506 99fa:8988 Grandtec V.cap
diff --git a/Documentation/video4linux/sh_mobile_ceu_camera.txt b/Documentation/video4linux/sh_mobile_ceu_camera.txt
new file mode 100644
index 000000000000..2ae16349a78d
--- /dev/null
+++ b/Documentation/video4linux/sh_mobile_ceu_camera.txt
@@ -0,0 +1,157 @@
1 Cropping and Scaling algorithm, used in the sh_mobile_ceu_camera driver
2 =======================================================================
3
4Terminology
5-----------
6
7sensor scales: horizontal and vertical scales, configured by the sensor driver
8host scales: -"- host driver
9combined scales: sensor_scale * host_scale
10
11
12Generic scaling / cropping scheme
13---------------------------------
14
15-1--
16|
17-2-- -\
18| --\
19| --\
20+-5-- -\ -- -3--
21| ---\
22| --- -4-- -\
23| -\
24| - -6--
25|
26| - -6'-
27| -/
28| --- -4'- -/
29| ---/
30+-5'- -/
31| -- -3'-
32| --/
33| --/
34-2'- -/
35|
36|
37-1'-
38
39Produced by user requests:
40
41S_CROP(left / top = (5) - (1), width / height = (5') - (5))
42S_FMT(width / height = (6') - (6))
43
44Here:
45
46(1) to (1') - whole max width or height
47(1) to (2) - sensor cropped left or top
48(2) to (2') - sensor cropped width or height
49(3) to (3') - sensor scale
50(3) to (4) - CEU cropped left or top
51(4) to (4') - CEU cropped width or height
52(5) to (5') - reverse sensor scale applied to CEU cropped width or height
53(2) to (5) - reverse sensor scale applied to CEU cropped left or top
54(6) to (6') - CEU scale - user window
55
56
57S_FMT
58-----
59
60Do not touch input rectangle - it is already optimal.
61
621. Calculate current sensor scales:
63
64 scale_s = ((3') - (3)) / ((2') - (2))
65
662. Calculate "effective" input crop (sensor subwindow) - CEU crop scaled back at
67current sensor scales onto input window - this is user S_CROP:
68
69 width_u = (5') - (5) = ((4') - (4)) * scale_s
70
713. Calculate new combined scales from "effective" input window to requested user
72window:
73
74 scale_comb = width_u / ((6') - (6))
75
764. Calculate sensor output window by applying combined scales to real input
77window:
78
79 width_s_out = ((2') - (2)) / scale_comb
80
815. Apply iterative sensor S_FMT for sensor output window.
82
83 subdev->video_ops->s_fmt(.width = width_s_out)
84
856. Retrieve sensor output window (g_fmt)
86
877. Calculate new sensor scales:
88
89 scale_s_new = ((3')_new - (3)_new) / ((2') - (2))
90
918. Calculate new CEU crop - apply sensor scales to previously calculated
92"effective" crop:
93
94 width_ceu = (4')_new - (4)_new = width_u / scale_s_new
95 left_ceu = (4)_new - (3)_new = ((5) - (2)) / scale_s_new
96
979. Use CEU cropping to crop to the new window:
98
99 ceu_crop(.width = width_ceu, .left = left_ceu)
100
10110. Use CEU scaling to scale to the requested user window:
102
103 scale_ceu = width_ceu / width
104
105
106S_CROP
107------
108
109If old scale applied to new crop is invalid produce nearest new scale possible
110
1111. Calculate current combined scales.
112
113 scale_comb = (((4') - (4)) / ((6') - (6))) * (((2') - (2)) / ((3') - (3)))
114
1152. Apply iterative sensor S_CROP for new input window.
116
1173. If old combined scales applied to new crop produce an impossible user window,
118adjust scales to produce nearest possible window.
119
120 width_u_out = ((5') - (5)) / scale_comb
121
122 if (width_u_out > max)
123 scale_comb = ((5') - (5)) / max;
124 else if (width_u_out < min)
125 scale_comb = ((5') - (5)) / min;
126
1274. Issue G_CROP to retrieve actual input window.
128
1295. Using actual input window and calculated combined scales calculate sensor
130target output window.
131
132 width_s_out = ((3') - (3)) = ((2') - (2)) / scale_comb
133
1346. Apply iterative S_FMT for new sensor target output window.
135
1367. Issue G_FMT to retrieve the actual sensor output window.
137
1388. Calculate sensor scales.
139
140 scale_s = ((3') - (3)) / ((2') - (2))
141
1429. Calculate sensor output subwindow to be cropped on CEU by applying sensor
143scales to the requested window.
144
145 width_ceu = ((5') - (5)) / scale_s
146
14710. Use CEU cropping for above calculated window.
148
14911. Calculate CEU scales from sensor scales from results of (10) and user window
150from (3)
151
152 scale_ceu = calc_scale(((5') - (5)), &width_u_out)
153
15412. Apply CEU scales.
155
156--
157Author: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
diff --git a/Documentation/video4linux/v4l2-framework.txt b/Documentation/video4linux/v4l2-framework.txt
index b806edaf3e75..74d677c8b036 100644
--- a/Documentation/video4linux/v4l2-framework.txt
+++ b/Documentation/video4linux/v4l2-framework.txt
@@ -561,6 +561,8 @@ video_device helper functions
561 561
562There are a few useful helper functions: 562There are a few useful helper functions:
563 563
564- file/video_device private data
565
564You can set/get driver private data in the video_device struct using: 566You can set/get driver private data in the video_device struct using:
565 567
566void *video_get_drvdata(struct video_device *vdev); 568void *video_get_drvdata(struct video_device *vdev);
@@ -575,8 +577,7 @@ struct video_device *video_devdata(struct file *file);
575 577
576returns the video_device belonging to the file struct. 578returns the video_device belonging to the file struct.
577 579
578The final helper function combines video_get_drvdata with 580The video_drvdata function combines video_get_drvdata with video_devdata:
579video_devdata:
580 581
581void *video_drvdata(struct file *file); 582void *video_drvdata(struct file *file);
582 583
@@ -584,6 +585,17 @@ You can go from a video_device struct to the v4l2_device struct using:
584 585
585struct v4l2_device *v4l2_dev = vdev->v4l2_dev; 586struct v4l2_device *v4l2_dev = vdev->v4l2_dev;
586 587
588- Device node name
589
590The video_device node kernel name can be retrieved using
591
592const char *video_device_node_name(struct video_device *vdev);
593
594The name is used as a hint by userspace tools such as udev. The function
595should be used where possible instead of accessing the video_device::num and
596video_device::minor fields.
597
598
587video buffer helper functions 599video buffer helper functions
588----------------------------- 600-----------------------------
589 601
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
index 3ffadf8da61f..12f9ba20ccb7 100644
--- a/Documentation/vm/hwpoison.txt
+++ b/Documentation/vm/hwpoison.txt
@@ -92,16 +92,62 @@ PR_MCE_KILL_GET
92 92
93Testing: 93Testing:
94 94
95madvise(MADV_POISON, ....) 95madvise(MADV_HWPOISON, ....)
96 (as root) 96 (as root)
97 Poison a page in the process for testing 97 Poison a page in the process for testing
98 98
99 99
100hwpoison-inject module through debugfs 100hwpoison-inject module through debugfs
101 /sys/debug/hwpoison/corrupt-pfn
102 101
103Inject hwpoison fault at PFN echoed into this file 102/sys/debug/hwpoison/
104 103
104corrupt-pfn
105
106Inject hwpoison fault at PFN echoed into this file. This does
107some early filtering to avoid corrupted unintended pages in test suites.
108
109unpoison-pfn
110
111Software-unpoison page at PFN echoed into this file. This
112way a page can be reused again.
113This only works for Linux injected failures, not for real
114memory failures.
115
116Note these injection interfaces are not stable and might change between
117kernel versions
118
119corrupt-filter-dev-major
120corrupt-filter-dev-minor
121
122Only handle memory failures to pages associated with the file system defined
123by block device major/minor. -1U is the wildcard value.
124This should be only used for testing with artificial injection.
125
126corrupt-filter-memcg
127
128Limit injection to pages owned by memgroup. Specified by inode number
129of the memcg.
130
131Example:
132 mkdir /cgroup/hwpoison
133
134 usemem -m 100 -s 1000 &
135 echo `jobs -p` > /cgroup/hwpoison/tasks
136
137 memcg_ino=$(ls -id /cgroup/hwpoison | cut -f1 -d' ')
138 echo $memcg_ino > /debug/hwpoison/corrupt-filter-memcg
139
140 page-types -p `pidof init` --hwpoison # shall do nothing
141 page-types -p `pidof usemem` --hwpoison # poison its pages
142
143corrupt-filter-flags-mask
144corrupt-filter-flags-value
145
146When specified, only poison pages if ((page_flags & mask) == value).
147This allows stress testing of many kinds of pages. The page_flags
148are the same as in /proc/kpageflags. The flag bits are defined in
149include/linux/kernel-page-flags.h and documented in
150Documentation/vm/pagemap.txt
105 151
106Architecture specific MCE injector 152Architecture specific MCE injector
107 153
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 ea44ea502da1..66e9358e2144 100644
--- a/Documentation/vm/page-types.c
+++ b/Documentation/vm/page-types.c
@@ -1,11 +1,22 @@
1/* 1/*
2 * page-types: Tool for querying page flags 2 * page-types: Tool for querying page flags
3 * 3 *
4 * This program is free software; you can redistribute it and/or modify it
5 * under the terms of the GNU General Public License as published by the Free
6 * Software Foundation; version 2.
7 *
8 * This program is distributed in the hope that it will be useful, but WITHOUT
9 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
10 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
11 * more details.
12 *
13 * You should find a copy of v2 of the GNU General Public License somewhere on
14 * your Linux system; if not, write to the Free Software Foundation, Inc., 59
15 * Temple Place, Suite 330, Boston, MA 02111-1307 USA.
16 *
4 * Copyright (C) 2009 Intel corporation 17 * Copyright (C) 2009 Intel corporation
5 * 18 *
6 * Authors: Wu Fengguang <fengguang.wu@intel.com> 19 * Authors: Wu Fengguang <fengguang.wu@intel.com>
7 *
8 * Released under the General Public License (GPL).
9 */ 20 */
10 21
11#define _LARGEFILE64_SOURCE 22#define _LARGEFILE64_SOURCE
@@ -100,7 +111,7 @@
100#define BIT(name) (1ULL << KPF_##name) 111#define BIT(name) (1ULL << KPF_##name)
101#define BITS_COMPOUND (BIT(COMPOUND_HEAD) | BIT(COMPOUND_TAIL)) 112#define BITS_COMPOUND (BIT(COMPOUND_HEAD) | BIT(COMPOUND_TAIL))
102 113
103static char *page_flag_names[] = { 114static const char *page_flag_names[] = {
104 [KPF_LOCKED] = "L:locked", 115 [KPF_LOCKED] = "L:locked",
105 [KPF_ERROR] = "E:error", 116 [KPF_ERROR] = "E:error",
106 [KPF_REFERENCED] = "R:referenced", 117 [KPF_REFERENCED] = "R:referenced",
@@ -173,7 +184,7 @@ static int kpageflags_fd;
173static int opt_hwpoison; 184static int opt_hwpoison;
174static int opt_unpoison; 185static int opt_unpoison;
175 186
176static char *hwpoison_debug_fs = "/debug/hwpoison"; 187static const char hwpoison_debug_fs[] = "/debug/hwpoison";
177static int hwpoison_inject_fd; 188static int hwpoison_inject_fd;
178static int hwpoison_forget_fd; 189static int hwpoison_forget_fd;
179 190
@@ -560,7 +571,7 @@ static void walk_pfn(unsigned long voffset,
560{ 571{
561 uint64_t buf[KPAGEFLAGS_BATCH]; 572 uint64_t buf[KPAGEFLAGS_BATCH];
562 unsigned long batch; 573 unsigned long batch;
563 unsigned long pages; 574 long pages;
564 unsigned long i; 575 unsigned long i;
565 576
566 while (count) { 577 while (count) {
@@ -673,30 +684,35 @@ static void usage(void)
673 684
674 printf( 685 printf(
675"page-types [options]\n" 686"page-types [options]\n"
676" -r|--raw Raw mode, for kernel developers\n" 687" -r|--raw Raw mode, for kernel developers\n"
677" -a|--addr addr-spec Walk a range of pages\n" 688" -d|--describe flags Describe flags\n"
678" -b|--bits bits-spec Walk pages with specified bits\n" 689" -a|--addr addr-spec Walk a range of pages\n"
679" -p|--pid pid Walk process address space\n" 690" -b|--bits bits-spec Walk pages with specified bits\n"
691" -p|--pid pid Walk process address space\n"
680#if 0 /* planned features */ 692#if 0 /* planned features */
681" -f|--file filename Walk file address space\n" 693" -f|--file filename Walk file address space\n"
682#endif 694#endif
683" -l|--list Show page details in ranges\n" 695" -l|--list Show page details in ranges\n"
684" -L|--list-each Show page details one by one\n" 696" -L|--list-each Show page details one by one\n"
685" -N|--no-summary Don't show summay info\n" 697" -N|--no-summary Don't show summay info\n"
686" -X|--hwpoison hwpoison pages\n" 698" -X|--hwpoison hwpoison pages\n"
687" -x|--unpoison unpoison pages\n" 699" -x|--unpoison unpoison pages\n"
688" -h|--help Show this usage message\n" 700" -h|--help Show this usage message\n"
701"flags:\n"
702" 0x10 bitfield format, e.g.\n"
703" anon bit-name, e.g.\n"
704" 0x10,anon comma-separated list, e.g.\n"
689"addr-spec:\n" 705"addr-spec:\n"
690" N one page at offset N (unit: pages)\n" 706" N one page at offset N (unit: pages)\n"
691" N+M pages range from N to N+M-1\n" 707" N+M pages range from N to N+M-1\n"
692" N,M pages range from N to M-1\n" 708" N,M pages range from N to M-1\n"
693" N, pages range from N to end\n" 709" N, pages range from N to end\n"
694" ,M pages range from 0 to M-1\n" 710" ,M pages range from 0 to M-1\n"
695"bits-spec:\n" 711"bits-spec:\n"
696" bit1,bit2 (flags & (bit1|bit2)) != 0\n" 712" bit1,bit2 (flags & (bit1|bit2)) != 0\n"
697" bit1,bit2=bit1 (flags & (bit1|bit2)) == bit1\n" 713" bit1,bit2=bit1 (flags & (bit1|bit2)) == bit1\n"
698" bit1,~bit2 (flags & (bit1|bit2)) == bit1\n" 714" bit1,~bit2 (flags & (bit1|bit2)) == bit1\n"
699" =bit1,bit2 flags == (bit1|bit2)\n" 715" =bit1,bit2 flags == (bit1|bit2)\n"
700"bit-names:\n" 716"bit-names:\n"
701 ); 717 );
702 718
@@ -884,13 +900,23 @@ static void parse_bits_mask(const char *optarg)
884 add_bits_filter(mask, bits); 900 add_bits_filter(mask, bits);
885} 901}
886 902
903static void describe_flags(const char *optarg)
904{
905 uint64_t flags = parse_flag_names(optarg, 0);
906
907 printf("0x%016llx\t%s\t%s\n",
908 (unsigned long long)flags,
909 page_flag_name(flags),
910 page_flag_longname(flags));
911}
887 912
888static struct option opts[] = { 913static const struct option opts[] = {
889 { "raw" , 0, NULL, 'r' }, 914 { "raw" , 0, NULL, 'r' },
890 { "pid" , 1, NULL, 'p' }, 915 { "pid" , 1, NULL, 'p' },
891 { "file" , 1, NULL, 'f' }, 916 { "file" , 1, NULL, 'f' },
892 { "addr" , 1, NULL, 'a' }, 917 { "addr" , 1, NULL, 'a' },
893 { "bits" , 1, NULL, 'b' }, 918 { "bits" , 1, NULL, 'b' },
919 { "describe" , 1, NULL, 'd' },
894 { "list" , 0, NULL, 'l' }, 920 { "list" , 0, NULL, 'l' },
895 { "list-each" , 0, NULL, 'L' }, 921 { "list-each" , 0, NULL, 'L' },
896 { "no-summary", 0, NULL, 'N' }, 922 { "no-summary", 0, NULL, 'N' },
@@ -907,7 +933,7 @@ int main(int argc, char *argv[])
907 page_size = getpagesize(); 933 page_size = getpagesize();
908 934
909 while ((c = getopt_long(argc, argv, 935 while ((c = getopt_long(argc, argv,
910 "rp:f:a:b:lLNXxh", opts, NULL)) != -1) { 936 "rp:f:a:b:d:lLNXxh", opts, NULL)) != -1) {
911 switch (c) { 937 switch (c) {
912 case 'r': 938 case 'r':
913 opt_raw = 1; 939 opt_raw = 1;
@@ -924,6 +950,9 @@ int main(int argc, char *argv[])
924 case 'b': 950 case 'b':
925 parse_bits_mask(optarg); 951 parse_bits_mask(optarg);
926 break; 952 break;
953 case 'd':
954 describe_flags(optarg);
955 exit(0);
927 case 'l': 956 case 'l':
928 opt_list = 1; 957 opt_list = 1;
929 break; 958 break;