diff options
author | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2010-03-01 02:55:20 -0500 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2010-03-01 02:55:20 -0500 |
commit | 35858adbfca13678af99fb31618ef4428d6dedb0 (patch) | |
tree | 3336feaa61324486945816cb52c347733e7c0821 /Documentation | |
parent | 197d4db752e67160d79fed09968c2140376a80a3 (diff) | |
parent | 4b70858ba8d4537daf782defebe5f2ff80ccef2b (diff) |
Merge branch 'next' into for-linus
Diffstat (limited to 'Documentation')
98 files changed, 3355 insertions, 1685 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> | |||
21 | Description: | 21 | Description: |
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 | |||
43 | What: /sys/bus/usb/devices/.../power/persist | 45 | What: /sys/bus/usb/devices/.../power/persist |
44 | Date: May 2007 | 46 | Date: May 2007 |
45 | KernelVersion: 2.6.23 | 47 | KernelVersion: 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: | |||
60 | Users: hotplug memory remove tools | 60 | Users: 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 | |||
64 | What: /sys/devices/system/memoryX/nodeY | ||
65 | Date: October 2009 | ||
66 | Contact: Linux Memory Management list <linux-mm@kvack.org> | ||
67 | Description: | ||
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 | |||
63 | What: /sys/devices/system/node/nodeX/memoryY | 76 | What: /sys/devices/system/node/nodeX/memoryY |
64 | Date: September 2008 | 77 | Date: September 2008 |
65 | Contact: Gary Hade <garyhade@us.ibm.com> | 78 | Contact: 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 | ||
95 | What: /sys/devices/system/cpu/cpu#/node | ||
96 | Date: October 2009 | ||
97 | Contact: Linux memory management mailing list <linux-mm@kvack.org> | ||
98 | Description: 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 | |||
95 | What: /sys/devices/system/cpu/cpu#/topology/core_id | 109 | What: /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 @@ | |||
1 | What: /sys/devices/system/memory/soft_offline_page | ||
2 | Date: Sep 2009 | ||
3 | KernelVersion: 2.6.33 | ||
4 | Contact: andi@firstfloor.org | ||
5 | Description: | ||
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 | |||
23 | What: /sys/devices/system/memory/hard_offline_page | ||
24 | Date: Sep 2009 | ||
25 | KernelVersion: 2.6.33 | ||
26 | Contact: andi@firstfloor.org | ||
27 | Description: | ||
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 | |||
49 | o udev 081 # udevinfo -V | 49 | o udev 081 # udevinfo -V |
50 | o grub 0.93 # grub --version | 50 | o grub 0.93 # grub --version |
51 | o mcelog 0.6 | 51 | o mcelog 0.6 |
52 | o iptables 1.4.1 # iptables -V | ||
53 | |||
52 | 54 | ||
53 | Kernel compilation | 55 | Kernel 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 | ||
9 | DOCBOOKS := z8530book.xml mcabook.xml device-drivers.xml \ | 9 | DOCBOOKS := 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. |
35 | PHONY += xmldocs sgmldocs psdocs pdfdocs htmldocs mandocs installmandocs cleandocs media | 35 | PHONY += xmldocs sgmldocs psdocs pdfdocs htmldocs mandocs installmandocs cleandocs xmldoclinks |
36 | 36 | ||
37 | BOOKS := $(addprefix $(obj)/,$(DOCBOOKS)) | 37 | BOOKS := $(addprefix $(obj)/,$(DOCBOOKS)) |
38 | xmldocs: $(BOOKS) | 38 | xmldocs: $(BOOKS) xmldoclinks |
39 | sgmldocs: xmldocs | 39 | sgmldocs: xmldocs |
40 | 40 | ||
41 | PS := $(patsubst %.xml, %.ps, $(BOOKS)) | 41 | PS := $(patsubst %.xml, %.ps, $(BOOKS)) |
@@ -45,15 +45,24 @@ PDF := $(patsubst %.xml, %.pdf, $(BOOKS)) | |||
45 | pdfdocs: $(PDF) | 45 | pdfdocs: $(PDF) |
46 | 46 | ||
47 | HTML := $(sort $(patsubst %.xml, %.html, $(BOOKS))) | 47 | HTML := $(sort $(patsubst %.xml, %.html, $(BOOKS))) |
48 | htmldocs: media $(HTML) | 48 | htmldocs: $(HTML) |
49 | $(call build_main_index) | 49 | $(call build_main_index) |
50 | $(call build_images) | ||
50 | 51 | ||
51 | MAN := $(patsubst %.xml, %.9, $(BOOKS)) | 52 | MAN := $(patsubst %.xml, %.9, $(BOOKS)) |
52 | mandocs: $(MAN) | 53 | mandocs: $(MAN) |
53 | 54 | ||
54 | media: | 55 | build_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 | |
58 | xmldoclinks: | ||
59 | ifneq ($(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 | ||
65 | endif | ||
57 | 66 | ||
58 | installmandocs: mandocs | 67 | installmandocs: mandocs |
59 | mkdir -p /usr/local/man/man9/ | 68 | mkdir -p /usr/local/man/man9/ |
@@ -65,7 +74,7 @@ KERNELDOC = $(srctree)/scripts/kernel-doc | |||
65 | DOCPROC = $(objtree)/scripts/basic/docproc | 74 | DOCPROC = $(objtree)/scripts/basic/docproc |
66 | 75 | ||
67 | XMLTOFLAGS = -m $(srctree)/Documentation/DocBook/stylesheet.xsl | 76 | XMLTOFLAGS = -m $(srctree)/Documentation/DocBook/stylesheet.xsl |
68 | #XMLTOFLAGS += --skip-validation | 77 | XMLTOFLAGS += --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 | ||
107 | C-procfs-example = procfs_example.xml | ||
108 | C-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 | ||
113 | obj-m += procfs_example.o | ||
114 | |||
115 | # Tell kbuild to always build the programs | 113 | # Tell kbuild to always build the programs |
116 | always := $(hostprogs-y) | 114 | always := $(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 | ||
243 | clean-dirs := $(patsubst %.xml,%,$(DOCBOOKS)) man | 241 | clean-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 <link linkend='v4l2-audio'>v4l2_audio</link>"> | 125 | <!ENTITY v4l2-audio "struct <link linkend='v4l2-audio'>v4l2_audio</link>"> |
120 | <!ENTITY v4l2-audioout "struct <link linkend='v4l2-audioout'>v4l2_audioout</link>"> | 126 | <!ENTITY v4l2-audioout "struct <link linkend='v4l2-audioout'>v4l2_audioout</link>"> |
127 | <!ENTITY v4l2-bt-timings "struct <link linkend='v4l2-bt-timings'>v4l2_bt_timings</link>"> | ||
121 | <!ENTITY v4l2-buffer "struct <link linkend='v4l2-buffer'>v4l2_buffer</link>"> | 128 | <!ENTITY v4l2-buffer "struct <link linkend='v4l2-buffer'>v4l2_buffer</link>"> |
122 | <!ENTITY v4l2-capability "struct <link linkend='v4l2-capability'>v4l2_capability</link>"> | 129 | <!ENTITY v4l2-capability "struct <link linkend='v4l2-capability'>v4l2_capability</link>"> |
123 | <!ENTITY v4l2-captureparm "struct <link linkend='v4l2-captureparm'>v4l2_captureparm</link>"> | 130 | <!ENTITY v4l2-captureparm "struct <link linkend='v4l2-captureparm'>v4l2_captureparm</link>"> |
@@ -128,6 +135,9 @@ | |||
128 | <!ENTITY v4l2-dbg-chip-ident "struct <link linkend='v4l2-dbg-chip-ident'>v4l2_dbg_chip_ident</link>"> | 135 | <!ENTITY v4l2-dbg-chip-ident "struct <link linkend='v4l2-dbg-chip-ident'>v4l2_dbg_chip_ident</link>"> |
129 | <!ENTITY v4l2-dbg-match "struct <link linkend='v4l2-dbg-match'>v4l2_dbg_match</link>"> | 136 | <!ENTITY v4l2-dbg-match "struct <link linkend='v4l2-dbg-match'>v4l2_dbg_match</link>"> |
130 | <!ENTITY v4l2-dbg-register "struct <link linkend='v4l2-dbg-register'>v4l2_dbg_register</link>"> | 137 | <!ENTITY v4l2-dbg-register "struct <link linkend='v4l2-dbg-register'>v4l2_dbg_register</link>"> |
138 | <!ENTITY v4l2-dv-enum-preset "struct <link linkend='v4l2-dv-enum-preset'>v4l2_dv_enum_preset</link>"> | ||
139 | <!ENTITY v4l2-dv-preset "struct <link linkend='v4l2-dv-preset'>v4l2_dv_preset</link>"> | ||
140 | <!ENTITY v4l2-dv-timings "struct <link linkend='v4l2-dv-timings'>v4l2_dv_timings</link>"> | ||
131 | <!ENTITY v4l2-enc-idx "struct <link linkend='v4l2-enc-idx'>v4l2_enc_idx</link>"> | 141 | <!ENTITY v4l2-enc-idx "struct <link linkend='v4l2-enc-idx'>v4l2_enc_idx</link>"> |
132 | <!ENTITY v4l2-enc-idx-entry "struct <link linkend='v4l2-enc-idx-entry'>v4l2_enc_idx_entry</link>"> | 142 | <!ENTITY v4l2-enc-idx-entry "struct <link linkend='v4l2-enc-idx-entry'>v4l2_enc_idx_entry</link>"> |
133 | <!ENTITY v4l2-encoder-cmd "struct <link linkend='v4l2-encoder-cmd'>v4l2_encoder_cmd</link>"> | 143 | <!ENTITY v4l2-encoder-cmd "struct <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 <link linkend='v4l2-preemphasis'>v4l2_preemphasis</link></primaryie></indexentry> | 36 | <indexentry><primaryie>enum <link linkend='v4l2-preemphasis'>v4l2_preemphasis</link></primaryie></indexentry> |
37 | <indexentry><primaryie>struct <link linkend='v4l2-audio'>v4l2_audio</link></primaryie></indexentry> | 37 | <indexentry><primaryie>struct <link linkend='v4l2-audio'>v4l2_audio</link></primaryie></indexentry> |
38 | <indexentry><primaryie>struct <link linkend='v4l2-audioout'>v4l2_audioout</link></primaryie></indexentry> | 38 | <indexentry><primaryie>struct <link linkend='v4l2-audioout'>v4l2_audioout</link></primaryie></indexentry> |
39 | <indexentry><primaryie>struct <link linkend='v4l2-bt-timings'>v4l2_bt_timings</link></primaryie></indexentry> | ||
39 | <indexentry><primaryie>struct <link linkend='v4l2-buffer'>v4l2_buffer</link></primaryie></indexentry> | 40 | <indexentry><primaryie>struct <link linkend='v4l2-buffer'>v4l2_buffer</link></primaryie></indexentry> |
40 | <indexentry><primaryie>struct <link linkend='v4l2-capability'>v4l2_capability</link></primaryie></indexentry> | 41 | <indexentry><primaryie>struct <link linkend='v4l2-capability'>v4l2_capability</link></primaryie></indexentry> |
41 | <indexentry><primaryie>struct <link linkend='v4l2-captureparm'>v4l2_captureparm</link></primaryie></indexentry> | 42 | <indexentry><primaryie>struct <link linkend='v4l2-captureparm'>v4l2_captureparm</link></primaryie></indexentry> |
@@ -46,6 +47,9 @@ | |||
46 | <indexentry><primaryie>struct <link linkend='v4l2-dbg-chip-ident'>v4l2_dbg_chip_ident</link></primaryie></indexentry> | 47 | <indexentry><primaryie>struct <link linkend='v4l2-dbg-chip-ident'>v4l2_dbg_chip_ident</link></primaryie></indexentry> |
47 | <indexentry><primaryie>struct <link linkend='v4l2-dbg-match'>v4l2_dbg_match</link></primaryie></indexentry> | 48 | <indexentry><primaryie>struct <link linkend='v4l2-dbg-match'>v4l2_dbg_match</link></primaryie></indexentry> |
48 | <indexentry><primaryie>struct <link linkend='v4l2-dbg-register'>v4l2_dbg_register</link></primaryie></indexentry> | 49 | <indexentry><primaryie>struct <link linkend='v4l2-dbg-register'>v4l2_dbg_register</link></primaryie></indexentry> |
50 | <indexentry><primaryie>struct <link linkend='v4l2-dv-enum-preset'>v4l2_dv_enum_preset</link></primaryie></indexentry> | ||
51 | <indexentry><primaryie>struct <link linkend='v4l2-dv-preset'>v4l2_dv_preset</link></primaryie></indexentry> | ||
52 | <indexentry><primaryie>struct <link linkend='v4l2-dv-timings'>v4l2_dv_timings</link></primaryie></indexentry> | ||
49 | <indexentry><primaryie>struct <link linkend='v4l2-enc-idx'>v4l2_enc_idx</link></primaryie></indexentry> | 53 | <indexentry><primaryie>struct <link linkend='v4l2-enc-idx'>v4l2_enc_idx</link></primaryie></indexentry> |
50 | <indexentry><primaryie>struct <link linkend='v4l2-enc-idx-entry'>v4l2_enc_idx_entry</link></primaryie></indexentry> | 54 | <indexentry><primaryie>struct <link linkend='v4l2-enc-idx-entry'>v4l2_enc_idx_entry</link></primaryie></indexentry> |
51 | <indexentry><primaryie>struct <link linkend='v4l2-encoder-cmd'>v4l2_encoder_cmd</link></primaryie></indexentry> | 55 | <indexentry><primaryie>struct <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> |
176 | static struct mtd_info *board_mtd; | 176 | static struct mtd_info *board_mtd; |
177 | static unsigned long baseaddr; | 177 | static 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> |
183 | static struct mtd_info board_mtd; | 183 | static struct mtd_info board_mtd; |
184 | static struct nand_chip board_chip; | 184 | static struct nand_chip board_chip; |
185 | static unsigned long baseaddr; | 185 | static 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 | ||
318 | out_ior: | 318 | out_ior: |
319 | iounmap((void *)baseaddr); | 319 | iounmap(baseaddr); |
320 | out_mtd: | 320 | out_mtd: |
321 | kfree (board_mtd); | 321 | kfree (board_mtd); |
322 | out: | 322 | out: |
@@ -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 <linux/proc_fs.h> | ||
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> | ||
318 | struct proc_dir_entry* entry; | ||
319 | |||
320 | entry->read_proc = read_proc_foo; | ||
321 | entry->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> | ||
495 | struct proc_dir_entry* entry; | ||
496 | struct my_file_data *file_data; | ||
497 | |||
498 | file_data = kmalloc(sizeof(struct my_file_data), GFP_KERNEL); | ||
499 | entry->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> | ||
516 | int 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> | ||
584 | struct proc_dir_entry* entry; | ||
585 | |||
586 | entry->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> | ||
603 | struct proc_dir_entry* entry; | ||
604 | |||
605 | entry->mode = S_IWUSR |S_IRUSR | S_IRGRP | S_IROTH; | ||
606 | entry->uid = 0; | ||
607 | entry->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 | |||
47 | struct fb_data_t { | ||
48 | char name[FOOBAR_LEN + 1]; | ||
49 | char value[FOOBAR_LEN + 1]; | ||
50 | }; | ||
51 | |||
52 | |||
53 | static struct proc_dir_entry *example_dir, *foo_file, | ||
54 | *bar_file, *jiffies_file, *symlink; | ||
55 | |||
56 | |||
57 | struct fb_data_t foo_data, bar_data; | ||
58 | |||
59 | |||
60 | static 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 | |||
73 | static 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 | |||
88 | static 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 | |||
110 | static 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 | |||
170 | no_symlink: | ||
171 | remove_proc_entry("bar", example_dir); | ||
172 | no_bar: | ||
173 | remove_proc_entry("foo", example_dir); | ||
174 | no_foo: | ||
175 | remove_proc_entry("jiffies", example_dir); | ||
176 | no_jiffies: | ||
177 | remove_proc_entry(MODULE_NAME, NULL); | ||
178 | out: | ||
179 | return rv; | ||
180 | } | ||
181 | |||
182 | |||
183 | static 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 | |||
196 | module_init(init_procfs_example); | ||
197 | module_exit(cleanup_procfs_example); | ||
198 | |||
199 | MODULE_AUTHOR("Erik Mouw"); | ||
200 | MODULE_DESCRIPTION("procfs examples"); | ||
201 | MODULE_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;, &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 | ||
723 | corresponding video timings. Today there are many more different hardware interfaces | ||
724 | such as High Definition TV interfaces (HDMI), VGA, DVI connectors etc., that carry | ||
725 | video signals and there is a need to extend the API to select the video timings | ||
726 | for these interfaces. Since it is not possible to extend the &v4l2-std-id; due to | ||
727 | the limited bits available, a new set of IOCTLs is added to set/get video timings at | ||
728 | the input and output: </para><itemizedlist> | ||
729 | <listitem> | ||
730 | <para>DV Presets: Digital Video (DV) presets. These are IDs representing a | ||
731 | video timing at the input/output. Presets are pre-defined timings implemented | ||
732 | by the hardware according to video standards. A __u32 data type is used to represent | ||
733 | a preset unlike the bit mask that is used in &v4l2-std-id; allowing future extensions | ||
734 | to 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 | ||
738 | custom video timings for the interface. This includes parameters such as width, height, | ||
739 | polarities, frontporch, backporch etc. | ||
740 | </para> | ||
741 | </listitem> | ||
742 | </itemizedlist> | ||
743 | <para>To enumerate and query the attributes of DV presets supported by a device, | ||
744 | applications use the &VIDIOC-ENUM-DV-PRESETS; ioctl. To get the current DV preset, | ||
745 | applications 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 | ||
752 | video 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 |
92 | Rubli, Andy Walls, Mauro Carvalho Chehab</holder> | 103 | Rubli, 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 | |||
103 | applications. --> | 114 | applications. --> |
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 | */ | ||
739 | struct <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 | */ | ||
747 | struct <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 */ | ||
784 | struct <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->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 */ | ||
818 | struct <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 | */ |
739 | struct <link linkend="v4l2-input">v4l2_input</link> { | 832 | struct <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; | ||
53 | and call the <constant>VIDIOC_ENUM_DV_PRESETS</constant> ioctl with a pointer to this | ||
54 | structure. 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, | ||
56 | applications shall begin at index zero, incrementing by one until the | ||
57 | driver returns <errorcode>EINVAL</errorcode>. Drivers may enumerate a | ||
58 | different set of DV presets after switching the video input or | ||
59 | output.</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 | ||
70 | application.</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 | ||
81 | intended 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> | ||
225 | is out of bounds.</para> | ||
226 | </listitem> | ||
227 | </varlistentry> | ||
228 | </variablelist> | ||
229 | </refsect1> | ||
230 | </refentry> | ||
231 | |||
232 | <!-- | ||
233 | Local Variables: | ||
234 | mode: sgml | ||
235 | sgml-parent-document: "v4l2.sgml" | ||
236 | indent-tabs-mode: nil | ||
237 | End: | ||
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 | ||
129 | input. 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 |
129 | the array to zero.</entry> | 135 | the 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 | ||
272 | Karicheri, titled RFC (v1.2): V4L - Support for video timings at the | ||
273 | input/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 | ||
119 | output. 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 |
119 | the array to zero.</entry> | 125 | the 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 | ||
157 | Karicheri, titled RFC (v1.2): V4L - Support for video timings at the | ||
158 | input/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 | ||
53 | use the <constant>VIDIOC_G_DV_PRESET</constant> and <constant>VIDIOC_S_DV_PRESET</constant> | ||
54 | ioctls which take a pointer to a &v4l2-dv-preset; type as argument. | ||
55 | Applications 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; | ||
60 | that has the preset value to be set. Applications must zero the reserved array in &v4l2-dv-preset;. | ||
61 | If 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 | <!-- | ||
106 | Local Variables: | ||
107 | mode: sgml | ||
108 | sgml-parent-document: "v4l2.sgml" | ||
109 | indent-tabs-mode: nil | ||
110 | End: | ||
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, | ||
54 | applications use the <constant>VIDIOC_G_DV_TIMINGS</constant> ioctl. The detailed timing | ||
55 | information is filled in using the structure &v4l2-dv-timings;. These ioctls take | ||
56 | a pointer to the &v4l2-dv-timings; structure as argument. If the ioctl is not supported | ||
57 | or 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. | ||
103 | bit 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 | <!-- | ||
219 | Local Variables: | ||
220 | mode: sgml | ||
221 | sgml-parent-document: "v4l2.sgml" | ||
222 | indent-tabs-mode: nil | ||
223 | End: | ||
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 | ||
10 | input</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 | ||
53 | automatically, similar to sensing the video standard. To do so, applications | ||
54 | call <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 | ||
56 | returned in the preset field of &v4l2-dv-preset;. When detection is not | ||
57 | possible 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 | <!-- | ||
80 | Local Variables: | ||
81 | mode: sgml | ||
82 | sgml-parent-document: "v4l2.sgml" | ||
83 | indent-tabs-mode: nil | ||
84 | End: | ||
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. | |||
15 | 2: Passes allnoconfig, allmodconfig | 15 | 2: Passes allnoconfig, allmodconfig |
16 | 16 | ||
17 | 3: Builds on multiple CPU architectures by using local cross-compile tools | 17 | 3: 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 | ||
20 | 4: ppc64 is a good architecture for cross-compilation checking because it | 20 | 4: 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 | ||
89 | 24: All memory barriers {e.g., barrier(), rmb(), wmb()} need a comment in the | 89 | 24: 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 | |||
92 | 25: 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 @@ | |||
1 | Linux ACPI Custom Control Method How To | ||
2 | ======================================= | ||
3 | |||
4 | Written by Zhang Rui <rui.zhang@intel.com> | ||
5 | |||
6 | |||
7 | Linux supports customizing ACPI control methods at runtime. | ||
8 | |||
9 | Users can use this to | ||
10 | 1. override an existing method which may not work correctly, | ||
11 | or just for debugging purposes. | ||
12 | 2. insert a completely new method in order to create a missing | ||
13 | method such as _OFF, _ON, _STA, _INI, etc. | ||
14 | For these cases, it is far simpler to dynamically install a single | ||
15 | control method rather than override the entire DSDT, because kernel | ||
16 | rebuild/reboot is not needed and test result can be got in minutes. | ||
17 | |||
18 | Note: Only ACPI METHOD can be overridden, any other object types like | ||
19 | "Device", "OperationRegion", are not recognized. | ||
20 | Note: 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 | |||
23 | 1. 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 | |||
50 | 2. 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 | |||
55 | 3. 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 | |||
63 | Note: 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 @@ | |||
1 | 00-INDEX | 1 | 00-INDEX |
2 | - This file | 2 | - This file |
3 | 3 | ||
4 | cache-lock.txt | ||
5 | - HOWTO for blackfin cache locking. | ||
6 | |||
7 | cachefeatures.txt | 4 | cachefeatures.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 @@ | |||
1 | obj-m := gptimers-example.o | ||
2 | |||
3 | all: modules | ||
4 | |||
5 | modules 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 | |||
18 | How to lock your code in cache in uClinux/blackfin | ||
19 | -------------------------------------------------- | ||
20 | |||
21 | There are only a few steps required to lock your code into the cache. | ||
22 | Currently you can lock the code by Way. | ||
23 | |||
24 | Below are the interface provided for locking the cache. | ||
25 | |||
26 | |||
27 | 1. cache_grab_lock(int Ways); | ||
28 | |||
29 | This function grab the lock for locking your code into the cache specified | ||
30 | by Ways. | ||
31 | |||
32 | |||
33 | 2. cache_lock(int Ways); | ||
34 | |||
35 | This function should be called after your critical code has been executed. | ||
36 | Once the critical code exits, the code is now loaded into the cache. This | ||
37 | function locks the code into the cache. | ||
38 | |||
39 | |||
40 | So, 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 | |||
48 | Where 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 | |||
20 | struct gptimer_data { | ||
21 | uint32_t period, width; | ||
22 | }; | ||
23 | static struct gptimer_data data; | ||
24 | |||
25 | /* ... random driver state ... */ | ||
26 | |||
27 | static 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 | |||
48 | static 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 | } | ||
73 | module_init(gptimer_example_init); | ||
74 | |||
75 | static void __exit gptimer_example_exit(void) | ||
76 | { | ||
77 | disable_gptimers(TIMER5bit); | ||
78 | free_irq(IRQ_TIMER5, &data); | ||
79 | peripheral_free(P_TMR5); | ||
80 | } | ||
81 | module_exit(gptimer_example_exit); | ||
82 | |||
83 | MODULE_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 @@ | |||
1 | 00-INDEX | 1 | 00-INDEX |
2 | - This file | 2 | - This file |
3 | as-iosched.txt | ||
4 | - Anticipatory IO scheduler | ||
5 | barrier.txt | 3 | barrier.txt |
6 | - I/O Barriers | 4 | - I/O Barriers |
7 | biodoc.txt | 5 | biodoc.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 @@ | |||
1 | Anticipatory IO scheduler | ||
2 | ------------------------- | ||
3 | Nick Piggin <piggin@cyberone.com.au> 13 Sep 2003 | ||
4 | |||
5 | Attention! Database servers, especially those using "TCQ" disks should | ||
6 | investigate performance with the 'deadline' IO scheduler. Any system with high | ||
7 | disk performance requirements should do so, in fact. | ||
8 | |||
9 | If you see unusual performance characteristics of your disk systems, or you | ||
10 | see big performance regressions versus the deadline scheduler, please email | ||
11 | me. Database users don't bother unless you're willing to test a lot of patches | ||
12 | from me ;) its a known issue. | ||
13 | |||
14 | Also, users with hardware RAID controllers, doing striping, may find | ||
15 | highly variable performance results with using the as-iosched. The | ||
16 | as-iosched anticipatory implementation is based on the notion that a disk | ||
17 | device has only one physical seeking head. A striped RAID controller | ||
18 | actually has a head for each physical device in the logical RAID device. | ||
19 | |||
20 | However, setting the antic_expire (see tunable parameters below) produces | ||
21 | very similar behavior to the deadline IO scheduler. | ||
22 | |||
23 | Selecting IO schedulers | ||
24 | ----------------------- | ||
25 | Refer to Documentation/block/switching-sched.txt for information on | ||
26 | selecting an io scheduler on a per-device basis. | ||
27 | |||
28 | Anticipatory IO scheduler Policies | ||
29 | ---------------------------------- | ||
30 | The as-iosched implementation implements several layers of policies | ||
31 | to determine when an IO request is dispatched to the disk controller. | ||
32 | Here are the policies outlined, in order of application. | ||
33 | |||
34 | 1. one-way Elevator algorithm. | ||
35 | |||
36 | The elevator algorithm is similar to that used in deadline scheduler, with | ||
37 | the addition that it allows limited backward movement of the elevator | ||
38 | (i.e. seeks backwards). A seek backwards can occur when choosing between | ||
39 | two IO requests where one is behind the elevator's current position, and | ||
40 | the other is in front of the elevator's position. If the seek distance to | ||
41 | the request in back of the elevator is less than half the seek distance to | ||
42 | the request in front of the elevator, then the request in back can be chosen. | ||
43 | Backward seeks are also limited to a maximum of MAXBACK (1024*1024) sectors. | ||
44 | This favors forward movement of the elevator, while allowing opportunistic | ||
45 | "short" backward seeks. | ||
46 | |||
47 | 2. FIFO expiration times for reads and for writes. | ||
48 | |||
49 | This is again very similar to the deadline IO scheduler. The expiration | ||
50 | times for requests on these lists is tunable using the parameters read_expire | ||
51 | and write_expire discussed below. When a read or a write expires in this way, | ||
52 | the IO scheduler will interrupt its current elevator sweep or read anticipation | ||
53 | to service the expired request. | ||
54 | |||
55 | 3. Read and write request batching | ||
56 | |||
57 | A batch is a collection of read requests or a collection of write | ||
58 | requests. The as scheduler alternates dispatching read and write batches | ||
59 | to the driver. In the case a read batch, the scheduler submits read | ||
60 | requests to the driver as long as there are read requests to submit, and | ||
61 | the read batch time limit has not been exceeded (read_batch_expire). | ||
62 | The read batch time limit begins counting down only when there are | ||
63 | competing write requests pending. | ||
64 | |||
65 | In the case of a write batch, the scheduler submits write requests to | ||
66 | the driver as long as there are write requests available, and the | ||
67 | write batch time limit has not been exceeded (write_batch_expire). | ||
68 | However, the length of write batches will be gradually shortened | ||
69 | when read batches frequently exceed their time limit. | ||
70 | |||
71 | When changing between batch types, the scheduler waits for all requests | ||
72 | from the previous batch to complete before scheduling requests for the | ||
73 | next batch. | ||
74 | |||
75 | The read and write fifo expiration times described in policy 2 above | ||
76 | are 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 | ||
78 | tested only during read batches. Likewise, the write FIFO timeout | ||
79 | values are tested only during write batches. For this reason, | ||
80 | it is generally not recommended for the read batch time | ||
81 | to be longer than the write expiration time, nor for the write batch | ||
82 | time to exceed the read expiration time (see tunable parameters below). | ||
83 | |||
84 | When the IO scheduler changes from a read to a write batch, | ||
85 | it begins the elevator from the request that is on the head of the | ||
86 | write expiration FIFO. Likewise, when changing from a write batch to | ||
87 | a read batch, scheduler begins the elevator from the first entry | ||
88 | on the read expiration FIFO. | ||
89 | |||
90 | 4. Read anticipation. | ||
91 | |||
92 | Read anticipation occurs only when scheduling a read batch. | ||
93 | This implementation of read anticipation allows only one read request | ||
94 | to be dispatched to the disk controller at a time. In | ||
95 | contrast, many write requests may be dispatched to the disk controller | ||
96 | at a time during a write batch. It is this characteristic that can make | ||
97 | the anticipatory scheduler perform anomalously with controllers supporting | ||
98 | TCQ, or with hardware striped RAID devices. Setting the antic_expire | ||
99 | queue parameter (see below) to zero disables this behavior, and the | ||
100 | anticipatory scheduler behaves essentially like the deadline scheduler. | ||
101 | |||
102 | When read anticipation is enabled (antic_expire is not zero), reads | ||
103 | are dispatched to the disk controller one at a time. | ||
104 | At the end of each read request, the IO scheduler examines its next | ||
105 | candidate read request from its sorted read list. If that next request | ||
106 | is from the same process as the request that just completed, | ||
107 | or if the next request in the queue is "very close" to the | ||
108 | just completed request, it is dispatched immediately. Otherwise, | ||
109 | statistics (average think time, average seek distance) on the process | ||
110 | that submitted the just completed request are examined. If it seems | ||
111 | likely that that process will submit another request soon, and that | ||
112 | request is likely to be near the just completed request, then the IO | ||
113 | scheduler will stop dispatching more read requests for up to (antic_expire) | ||
114 | milliseconds, hoping that process will submit a new request near the one | ||
115 | that just completed. If such a request is made, then it is dispatched | ||
116 | immediately. If the antic_expire wait time expires, then the IO scheduler | ||
117 | will dispatch the next read request from the sorted read queue. | ||
118 | |||
119 | To decide whether an anticipatory wait is worthwhile, the scheduler | ||
120 | maintains statistics for each process that can be used to compute | ||
121 | mean "think time" (the time between read requests), and mean seek | ||
122 | distance for that process. One observation is that these statistics | ||
123 | are associated with each process, but those statistics are not associated | ||
124 | with a specific IO device. So for example, if a process is doing IO | ||
125 | on several file systems on separate devices, the statistics will be | ||
126 | a combination of IO behavior from all those devices. | ||
127 | |||
128 | |||
129 | Tuning the anticipatory IO scheduler | ||
130 | ------------------------------------ | ||
131 | When using 'as', the anticipatory IO scheduler there are 5 parameters under | ||
132 | /sys/block/*/queue/iosched/. All are units of milliseconds. | ||
133 | |||
134 | The 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 | |||
163 | In addition to the tunables above there is a read-only file named est_time | ||
164 | which, 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 | |||
186 | do not have a corresponding kernel virtual address space mapping) and | 186 | do not have a corresponding kernel virtual address space mapping) and |
187 | low-memory pages. | 187 | low-memory pages. |
188 | 188 | ||
189 | Note: Please refer to Documentation/DMA-mapping.txt for a discussion | 189 | Note: Please refer to Documentation/PCI/PCI-DMA-mapping.txt for a discussion |
190 | on PCI high mem DMA aspects and mapping of scatter gather lists, and support | 190 | on PCI high mem DMA aspects and mapping of scatter gather lists, and support |
191 | for 64 bit PCI. | 191 | for 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 | ||
316 | Q: I need to ensure that a particular cpu is not removed when there is some | 316 | Q: 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. |
318 | A: First switch the current thread context to preferred cpu | 318 | A: 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 | ||
354 | Q: How do we determine how many CPUs are available for hotplug. | 339 | Q: How do we determine how many CPUs are available for hotplug. |
355 | A: There is no clear spec defined way from ACPI that can give us that | 340 | A: 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 | |||
8 | original content; | 8 | original 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 |
10 | same data stream. | 10 | same data stream. |
11 | *) To merge a snapshot of a block device back into the snapshot's origin | ||
12 | device. | ||
11 | 13 | ||
14 | In the first two cases, dm copies only the chunks of data that get | ||
15 | changed and uses a separate copy-on-write (COW) block device for | ||
16 | storage. | ||
12 | 17 | ||
13 | In both cases, dm copies only the chunks of data that get changed and | 18 | For snapshot merge the contents of the COW storage are merged back into |
14 | uses a separate copy-on-write (COW) block device for storage. | 19 | the origin device. |
15 | 20 | ||
16 | 21 | ||
17 | There are two dm targets available: snapshot and snapshot-origin. | 22 | There are three dm targets available: |
23 | snapshot, 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 | |||
40 | saved on disk - they can be kept in memory by the kernel. | 46 | saved on disk - they can be kept in memory by the kernel. |
41 | 47 | ||
42 | 48 | ||
43 | How this is used by LVM2 | 49 | * snapshot-merge <origin> <COW device> <persistent> <chunksize> |
44 | ======================== | 50 | |
51 | takes the same table arguments as the snapshot target except it only | ||
52 | works with persistent snapshots. This target assumes the role of the | ||
53 | "snapshot-origin" target and must not be loaded if the "snapshot-origin" | ||
54 | is still present for <origin>. | ||
55 | |||
56 | Creates a merging snapshot that takes control of the changed chunks | ||
57 | stored in the <COW device> of an existing snapshot, through a handover | ||
58 | procedure, and merges these chunks back into the <origin>. Once merging | ||
59 | has started (in the background) the <origin> may be opened and the merge | ||
60 | will continue while I/O is flowing to it. Changes to the <origin> are | ||
61 | deferred until the merging snapshot's corresponding chunk(s) have been | ||
62 | merged. Once merging has started the snapshot device, associated with | ||
63 | the "snapshot" target, will return -EIO when accessed. | ||
64 | |||
65 | |||
66 | How snapshot is used by LVM2 | ||
67 | ============================ | ||
45 | When you create the first LVM2 snapshot of a volume, four dm devices are used: | 68 | When you create the first LVM2 snapshot of a volume, four dm devices are used: |
46 | 69 | ||
47 | 1) a device containing the original mapping table of the source volume; | 70 | 1) 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 | |||
72 | brw------- 1 root root 254, 13 29 ago 18:15 /dev/mapper/volumeGroup-snap | 95 | brw------- 1 root root 254, 13 29 ago 18:15 /dev/mapper/volumeGroup-snap |
73 | brw------- 1 root root 254, 10 29 ago 18:14 /dev/mapper/volumeGroup-base | 96 | brw------- 1 root root 254, 10 29 ago 18:14 /dev/mapper/volumeGroup-base |
74 | 97 | ||
98 | |||
99 | How snapshot-merge is used by LVM2 | ||
100 | ================================== | ||
101 | A merging snapshot assumes the role of the "snapshot-origin" while | ||
102 | merging. As such the "snapshot-origin" is replaced with | ||
103 | "snapshot-merge". The "-real" device is not changed and the "-cow" | ||
104 | device is renamed to <origin name>-cow to aid LVM2's cleanup of the | ||
105 | merging snapshot after it completes. The "snapshot" that hands over its | ||
106 | COW 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 | |||
109 | A snapshot will merge into its origin with the following command: | ||
110 | |||
111 | lvconvert --merge volumeGroup/snap | ||
112 | |||
113 | we'll now have this situation: | ||
114 | |||
115 | # dmsetup table|grep volumeGroup | ||
116 | |||
117 | volumeGroup-base-real: 0 2097152 linear 8:19 384 | ||
118 | volumeGroup-base-cow: 0 204800 linear 8:19 2097536 | ||
119 | volumeGroup-base: 0 2097152 snapshot-merge 254:11 254:12 P 16 | ||
120 | |||
121 | # ls -lL /dev/mapper/volumeGroup-* | ||
122 | brw------- 1 root root 254, 11 29 ago 18:15 /dev/mapper/volumeGroup-base-real | ||
123 | brw------- 1 root root 254, 12 29 ago 18:16 /dev/mapper/volumeGroup-base-cow | ||
124 | brw------- 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 | |||
103 | gen-devlist | 103 | gen-devlist |
104 | gen_crc32table | 104 | gen_crc32table |
105 | gen_init_cpio | 105 | gen_init_cpio |
106 | generated | ||
106 | genheaders | 107 | genheaders |
107 | genksyms | 108 | genksyms |
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; | |||
226 | This can then be used to add and remove the attribute from the | 226 | This can then be used to add and remove the attribute from the |
227 | driver's directory using: | 227 | driver's directory using: |
228 | 228 | ||
229 | int driver_create_file(struct device_driver *, struct driver_attribute *); | 229 | int driver_create_file(struct device_driver *, const struct driver_attribute *); |
230 | void driver_remove_file(struct device_driver *, struct driver_attribute *); | 230 | void 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..54d2d7795544 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 | ||
294 | What: print_fn_descriptor_symbol() | ||
295 | When: October 2009 | ||
296 | Why: 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. | ||
299 | Who: Bjorn Helgaas <bjorn.helgaas@hp.com> | ||
300 | |||
301 | --------------------------- | ||
302 | |||
303 | What: /sys/o2cb symlink | 294 | What: /sys/o2cb symlink |
304 | When: January 2010 | 295 | When: January 2010 |
305 | Why: /sys/fs/o2cb is the proper location for this information - /sys/o2cb | 296 | Why: /sys/fs/o2cb is the proper location for this information - /sys/o2cb |
@@ -483,3 +474,94 @@ Why: Obsoleted by the adt7475 driver. | |||
483 | Who: Jean Delvare <khali@linux-fr.org> | 474 | Who: Jean Delvare <khali@linux-fr.org> |
484 | 475 | ||
485 | --------------------------- | 476 | --------------------------- |
477 | What: Support for lcd_switch and display_get in asus-laptop driver | ||
478 | When: March 2010 | ||
479 | Why: 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 | |||
493 | Who: Corentin Chary <corentin.chary@gmail.com> | ||
494 | |||
495 | ---------------------------- | ||
496 | |||
497 | What: usbvideo quickcam_messenger driver | ||
498 | When: 2.6.35 | ||
499 | Files: drivers/media/video/usbvideo/quickcam_messenger.[ch] | ||
500 | Why: obsolete v4l1 driver replaced by gspca_stv06xx | ||
501 | Who: Hans de Goede <hdegoede@redhat.com> | ||
502 | |||
503 | ---------------------------- | ||
504 | |||
505 | What: ov511 v4l1 driver | ||
506 | When: 2.6.35 | ||
507 | Files: drivers/media/video/ov511.[ch] | ||
508 | Why: obsolete v4l1 driver replaced by gspca_ov519 | ||
509 | Who: Hans de Goede <hdegoede@redhat.com> | ||
510 | |||
511 | ---------------------------- | ||
512 | |||
513 | What: w9968cf v4l1 driver | ||
514 | When: 2.6.35 | ||
515 | Files: drivers/media/video/w9968cf*.[ch] | ||
516 | Why: obsolete v4l1 driver replaced by gspca_ov519 | ||
517 | Who: Hans de Goede <hdegoede@redhat.com> | ||
518 | |||
519 | ---------------------------- | ||
520 | |||
521 | What: ovcamchip sensor framework | ||
522 | When: 2.6.35 | ||
523 | Files: drivers/media/video/ovcamchip/* | ||
524 | Why: Only used by obsoleted v4l1 drivers | ||
525 | Who: Hans de Goede <hdegoede@redhat.com> | ||
526 | |||
527 | ---------------------------- | ||
528 | |||
529 | What: stv680 v4l1 driver | ||
530 | When: 2.6.35 | ||
531 | Files: drivers/media/video/stv680.[ch] | ||
532 | Why: obsolete v4l1 driver replaced by gspca_stv0680 | ||
533 | Who: Hans de Goede <hdegoede@redhat.com> | ||
534 | |||
535 | ---------------------------- | ||
536 | |||
537 | What: zc0301 v4l driver | ||
538 | When: 2.6.35 | ||
539 | Files: drivers/media/video/zc0301/* | ||
540 | Why: 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) | ||
544 | Who: Hans de Goede <hdegoede@redhat.com> | ||
545 | |||
546 | ---------------------------- | ||
547 | |||
548 | What: corgikbd, spitzkbd, tosakbd driver | ||
549 | When: 2.6.35 | ||
550 | Files: drivers/input/keyboard/{corgi,spitz,tosa}kbd.c | ||
551 | Why: We now have a generic GPIO based matrix keyboard driver that | ||
552 | are fully capable of handling all the keys on these devices. | ||
553 | The original drivers manipulate the GPIO registers directly | ||
554 | and so are difficult to maintain. | ||
555 | Who: Eric Miao <eric.y.miao@gmail.com> | ||
556 | |||
557 | ---------------------------- | ||
558 | |||
559 | What: corgi_ssp and corgi_ts driver | ||
560 | When: 2.6.35 | ||
561 | Files: arch/arm/mach-pxa/corgi_ssp.c, drivers/input/touchscreen/corgi_ts.c | ||
562 | Why: The corgi touchscreen is now deprecated in favour of the generic | ||
563 | ads7846.c driver. The noise reduction technique used in corgi_ts.c, | ||
564 | that's to wait till vsync before ADC sampling, is also integrated into | ||
565 | ads7846 driver now. Provided that the original driver is not generic | ||
566 | and is difficult to maintain, it will be removed later. | ||
567 | Who: Eric Miao <eric.y.miao@gmail.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 @@ | |||
1 | 00-INDEX | 1 | 00-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). |
3 | Exporting | ||
4 | - explanation of how to make filesystems exportable. | ||
5 | Locking | 3 | Locking |
6 | - info on locking rules as they pertain to Linux VFS. | 4 | - info on locking rules as they pertain to Linux VFS. |
7 | 9p.txt | 5 | 9p.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. |
69 | ncpfs.txt | 67 | ncpfs.txt |
70 | - info on Novell Netware(tm) filesystem using NCP protocol. | 68 | - info on Novell Netware(tm) filesystem using NCP protocol. |
71 | nfs41-server.txt | 69 | nfs/ |
72 | - info on the Linux server implementation of NFSv4 minor version 1. | 70 | - nfs-related documentation. |
73 | nfs-rdma.txt | ||
74 | - how to install and setup the Linux NFS/RDMA client and server software. | ||
75 | nfsroot.txt | ||
76 | - short guide on setting up a diskless box with NFS root filesystem. | ||
77 | nilfs2.txt | 71 | nilfs2.txt |
78 | - info and mount options for the NILFS2 filesystem. | 72 | - info and mount options for the NILFS2 filesystem. |
79 | ntfs.txt | 73 | ntfs.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. |
93 | romfs.txt | 87 | romfs.txt |
94 | - description of the ROMFS filesystem. | 88 | - description of the ROMFS filesystem. |
95 | rpc-cache.txt | ||
96 | - introduction to the caching mechanisms in the sunrpc layer. | ||
97 | seq_file.txt | 89 | seq_file.txt |
98 | - how to use the seq_file API | 90 | - how to use the seq_file API |
99 | sharedsubtree.txt | 91 | sharedsubtree.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 | ||
199 | inode_readahead=n This tuning parameter controls the maximum | 199 | inode_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 @@ | |||
1 | 00-INDEX | ||
2 | - this file (nfs-related documentation). | ||
3 | Exporting | ||
4 | - explanation of how to make filesystems exportable. | ||
5 | knfsd-stats.txt | ||
6 | - statistics which the NFS server makes available to user space. | ||
7 | nfs.txt | ||
8 | - nfs client, and DNS resolution for fs_locations. | ||
9 | nfs41-server.txt | ||
10 | - info on the Linux server implementation of NFSv4 minor version 1. | ||
11 | nfs-rdma.txt | ||
12 | - how to install and setup the Linux NFS/RDMA client and server software | ||
13 | nfsroot.txt | ||
14 | - short guide on setting up a diskless box with NFS root filesystem. | ||
15 | rpc-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 | ||
216 | Nonstandard 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. | |||
28 | Project web page: http://www.nilfs.org/en/ | 28 | Project web page: http://www.nilfs.org/en/ |
29 | Download page: http://www.nilfs.org/en/download.html | 29 | Download page: http://www.nilfs.org/en/download.html |
30 | Git tree web page: http://www.nilfs.org/git/ | 30 | Git tree web page: http://www.nilfs.org/git/ |
31 | NILFS mailing lists: http://www.nilfs.org/mailman/listinfo/users | 31 | List info: http://vger.kernel.org/vger-lists.html#linux-nilfs |
32 | 32 | ||
33 | Caveats | 33 | Caveats |
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. | |||
140 | New super_block field "struct export_operations *s_export_op" for | 140 | New super_block field "struct export_operations *s_export_op" for |
141 | explicit support for exporting, e.g. via NFS. The structure is fully | 141 | explicit support for exporting, e.g. via NFS. The structure is fully |
142 | documented at its declaration in include/linux/fs.h, and in | 142 | documented at its declaration in include/linux/fs.h, and in |
143 | Documentation/filesystems/Exporting. | 143 | Documentation/filesystems/nfs/Exporting. |
144 | 144 | ||
145 | Briefly it allows for the definition of decode_fh and encode_fh operations | 145 | Briefly it allows for the definition of decode_fh and encode_fh operations |
146 | to encode and decode filehandles, and allows the filesystem to use | 146 | to 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 | ||
181 | This shows you nearly the same information you would get if you viewed it with | 181 | This shows you nearly the same information you would get if you viewed it with |
182 | the ps command. In fact, ps uses the proc file system to obtain its | 182 | the 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 | ||
236 | Table 1-3: Contents of the statm files (as of 2.6.8-rc3) | 235 | Table 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 | |||
1412 | 3.6 /proc/<pid>/comm & /proc/<pid>/task/<tid>/comm | ||
1413 | -------------------------------------------------------- | ||
1414 | These files provide a method to access a tasks comm value. It also allows for | ||
1415 | a task to set its own or one of its thread siblings comm value. The comm value | ||
1416 | is limited in size compared to the cmdline value, so writing anything longer | ||
1417 | then the kernel's TASK_COMM_LEN (currently 16 chars) will result in a truncated | ||
1418 | comm 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 | ||
94 | int device_create_file(struct device *, struct device_attribute *); | 94 | int device_create_file(struct device *, const struct device_attribute *); |
95 | void device_remove_file(struct device *, struct device_attribute *); | 95 | void device_remove_file(struct device *, const struct device_attribute *); |
96 | 96 | ||
97 | It also defines this helper for defining device attributes: | 97 | It also defines this helper for defining device attributes: |
98 | 98 | ||
@@ -316,8 +316,8 @@ DEVICE_ATTR(_name, _mode, _show, _store); | |||
316 | 316 | ||
317 | Creation/Removal: | 317 | Creation/Removal: |
318 | 318 | ||
319 | int device_create_file(struct device *device, struct device_attribute * attr); | 319 | int device_create_file(struct device *dev, const struct device_attribute * attr); |
320 | void device_remove_file(struct device * dev, struct device_attribute * attr); | 320 | void 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 | ||
359 | Creation/Removal: | 359 | Creation/Removal: |
360 | 360 | ||
361 | int driver_create_file(struct device_driver *, struct driver_attribute *); | 361 | int driver_create_file(struct device_driver *, const struct driver_attribute *); |
362 | void driver_remove_file(struct device_driver *, struct driver_attribute *); | 362 | void 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 | |||
534 | GPIO controllers have paths like /sys/class/gpio/gpiochip42/ (for the | 541 | GPIO controllers have paths like /sys/class/gpio/gpiochip42/ (for the |
535 | controller implementing GPIOs starting at #42) and have the following | 542 | controller implementing GPIOs starting at #42) and have the following |
536 | read-only attributes: | 543 | read-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 | ||
570 | After a kernel driver requests a GPIO, it may only be made available in | 579 | After a kernel driver requests a GPIO, it may only be made available in |
571 | the sysfs interface by gpio_export(). The driver can control whether the | 580 | the 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 | |||
580 | symlinks from elsewhere in sysfs to the GPIO sysfs node. Drivers can | 589 | symlinks from elsewhere in sysfs to the GPIO sysfs node. Drivers can |
581 | use this to provide the interface under their own device in sysfs with | 590 | use this to provide the interface under their own device in sysfs with |
582 | a descriptive name. | 591 | a descriptive name. |
592 | |||
593 | Drivers can use gpio_sysfs_set_active_low() to hide GPIO line polarity | ||
594 | differences between boards from user space. This only affects the | ||
595 | sysfs interface. Polarity change can be done both before and after | ||
596 | gpio_export(), and previously enabled poll(2) support for either | ||
597 | rising 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 @@ | |||
1 | Kernel driver amc6821 | ||
2 | ===================== | ||
3 | |||
4 | Supported 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 | |||
10 | Authors: | ||
11 | Tomaz Mertelj <tomaz.mertelj@guest.arnes.si> | ||
12 | |||
13 | |||
14 | Description | ||
15 | ----------- | ||
16 | |||
17 | This driver implements support for the Texas Instruments amc6821 chip. | ||
18 | The chip has one on-chip and one remote temperature sensor and one pwm fan | ||
19 | regulator. | ||
20 | The pwm can be controlled either from software or automatically. | ||
21 | |||
22 | The driver provides the following sensor accesses in sysfs: | ||
23 | |||
24 | temp1_input ro on-chip temperature | ||
25 | temp1_min rw " | ||
26 | temp1_max rw " | ||
27 | temp1_crit rw " | ||
28 | temp1_min_alarm ro " | ||
29 | temp1_max_alarm ro " | ||
30 | temp1_crit_alarm ro " | ||
31 | |||
32 | temp2_input ro remote temperature | ||
33 | temp2_min rw " | ||
34 | temp2_max rw " | ||
35 | temp2_crit rw " | ||
36 | temp2_min_alarm ro " | ||
37 | temp2_max_alarm ro " | ||
38 | temp2_crit_alarm ro " | ||
39 | temp2_fault ro " | ||
40 | |||
41 | fan1_input ro tachometer speed | ||
42 | fan1_min rw " | ||
43 | fan1_max rw " | ||
44 | fan1_fault ro " | ||
45 | fan1_div rw Fan divisor can be either 2 or 4. | ||
46 | |||
47 | pwm1 rw pwm1 | ||
48 | pwm1_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, | ||
52 | pwm1_auto_channels_temp ro 1 if pwm_enable==2, 3 if pwm_enable==3 | ||
53 | pwm1_auto_point1_pwm ro Hardwired to 0, shared for both | ||
54 | temperature channels. | ||
55 | pwm1_auto_point2_pwm rw This value is shared for both temperature | ||
56 | channels. | ||
57 | pwm1_auto_point3_pwm rw Hardwired to 255, shared for both | ||
58 | temperature channels. | ||
59 | |||
60 | temp1_auto_point1_temp ro Hardwired to temp2_auto_point1_temp | ||
61 | which is rw. Below this temperature fan stops. | ||
62 | temp1_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. | ||
68 | temp1_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 | |||
75 | temp2_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. | ||
79 | temp2_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 | |||
85 | temp2_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 | |||
92 | Module parameters | ||
93 | ----------------- | ||
94 | |||
95 | If your board has a BIOS that initializes the amc6821 correctly, you should | ||
96 | load the module with: init=0. | ||
97 | |||
98 | If your board BIOS doesn't initialize the chip, or you want | ||
99 | different settings, you can set the following parameters: | ||
100 | init=1, | ||
101 | pwminv: 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 @@ | |||
1 | Kernel driver k10temp | ||
2 | ===================== | ||
3 | |||
4 | Supported 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 | |||
31 | Author: Clemens Ladisch <clemens@ladisch.de> | ||
32 | |||
33 | Description | ||
34 | ----------- | ||
35 | |||
36 | This driver permits reading of the internal temperature sensor of AMD | ||
37 | Family 10h and 11h processors. | ||
38 | |||
39 | All these processors have a sensor, but on those for Socket F or AM2+, | ||
40 | the sensor may return inconsistent values (erratum 319). The driver | ||
41 | will refuse to load on these revisions unless you specify the "force=1" | ||
42 | module parameter. | ||
43 | |||
44 | Due to technical reasons, the driver can detect only the mainboard's | ||
45 | socket type, not the processor's actual capabilities. Therefore, if you | ||
46 | are using an AM3 processor on an AM2+ mainboard, you can safely use the | ||
47 | "force=1" parameter. | ||
48 | |||
49 | There is one temperature measurement value, available as temp1_input in | ||
50 | sysfs. It is measured in degrees Celsius with a resolution of 1/8th degree. | ||
51 | Please 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 | |||
61 | The maximum value for Tctl is available in the file temp1_max. | ||
62 | |||
63 | If the BIOS has enabled hardware temperature control, the threshold at | ||
64 | which the processor will throttle itself to avoid damage is available in | ||
65 | temp1_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 | ||
4 | Supported chips: | 4 | Supported chips: |
5 | 5 | ||
6 | * STMicroelectronics LIS3LV02DL and LIS3LV02DQ | 6 | * STMicroelectronics LIS3LV02DL, LIS3LV02DQ (12 bits precision) |
7 | * STMicroelectronics LIS302DL, LIS3L02DQ, LIS331DL (8 bits) | ||
7 | 8 | ||
8 | Authors: | 9 | Authors: |
9 | Yan Burman <burman.yan@gmail.com> | 10 | Yan Burman <burman.yan@gmail.com> |
@@ -13,32 +14,52 @@ Authors: | |||
13 | Description | 14 | Description |
14 | ----------- | 15 | ----------- |
15 | 16 | ||
16 | This driver provides support for the accelerometer found in various HP | 17 | This driver provides support for the accelerometer found in various HP laptops |
17 | laptops sporting the feature officially called "HP Mobile Data | 18 | sporting the feature officially called "HP Mobile Data Protection System 3D" or |
18 | Protection System 3D" or "HP 3D DriveGuard". It detects automatically | 19 | "HP 3D DriveGuard". It detects automatically laptops with this sensor. Known |
19 | laptops with this sensor. Known models (for now the HP 2133, nc6420, | 20 | models (full list can be found in drivers/hwmon/hp_accel.c) will have their |
20 | nc2510, nc8510, nc84x0, nw9440 and nx9420) will have their axis | 21 | axis automatically oriented on standard way (eg: you can directly play |
21 | automatically oriented on standard way (eg: you can directly play | 22 | neverball). The accelerometer data is readable via |
22 | neverball). The accelerometer data is readable via | 23 | /sys/devices/platform/lis3lv02d. Reported values are scaled |
23 | /sys/devices/platform/lis3lv02d. | 24 | to mg values (1/1000th of earth gravity). |
24 | 25 | ||
25 | Sysfs attributes under /sys/devices/platform/lis3lv02d/: | 26 | Sysfs attributes under /sys/devices/platform/lis3lv02d/: |
26 | position - 3D position that the accelerometer reports. Format: "(x,y,z)" | 27 | position - 3D position that the accelerometer reports. Format: "(x,y,z)" |
27 | calibrate - read: values (x, y, z) that are used as the base for input | 28 | rate - 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. | 31 | selftest - performs selftest for the chip as specified by chip manufacturer. |
31 | rate - reports the sampling rate of the accelerometer device in HZ | ||
32 | 32 | ||
33 | This driver also provides an absolute input class device, allowing | 33 | This driver also provides an absolute input class device, allowing |
34 | the laptop to act as a pinball machine-esque joystick. | 34 | the laptop to act as a pinball machine-esque joystick. Joystick device can be |
35 | calibrated. Joystick device can be in two different modes. | ||
36 | By default output values are scaled between -32768 .. 32767. In joystick raw | ||
37 | mode, joystick and sysfs position entry have the same scale. There can be | ||
38 | small difference due to input system fuzziness feature. | ||
39 | Events are also available as input event device. | ||
40 | |||
41 | Selftest is meant only for hardware diagnostic purposes. It is not meant to be | ||
42 | used during normal operations. Position data is not corrupted during selftest | ||
43 | but interrupt behaviour is not guaranteed to work reliably. In test mode, the | ||
44 | sensing element is internally moved little bit. Selftest measures difference | ||
45 | between normal mode and test mode. Chip specifications tell the acceptance | ||
46 | limit for each type of the chip. Limits are provided via platform data | ||
47 | to allow adjustment of the limits without a change to the actual driver. | ||
48 | Seltest returns either "OK x y z" or "FAIL x y z" where x, y and z are | ||
49 | measured difference between modes. Axes are not remapped in selftest mode. | ||
50 | Measurement values are provided to help HW diagnostic applications to make | ||
51 | final decision. | ||
52 | |||
53 | On HP laptops, if the led infrastructure is activated, support for a led | ||
54 | indicating disk protection will be provided as /sys/class/leds/hp::hddprotect. | ||
35 | 55 | ||
36 | Another feature of the driver is misc device called "freefall" that | 56 | Another feature of the driver is misc device called "freefall" that |
37 | acts similar to /dev/rtc and reacts on free-fall interrupts received | 57 | acts similar to /dev/rtc and reacts on free-fall interrupts received |
38 | from the device. It supports blocking operations, poll/select and | 58 | from the device. It supports blocking operations, poll/select and |
39 | fasync operation modes. You must read 1 bytes from the device. The | 59 | fasync operation modes. You must read 1 bytes from the device. The |
40 | result is number of free-fall interrupts since the last successful | 60 | result is number of free-fall interrupts since the last successful |
41 | read (or 255 if number of interrupts would not fit). | 61 | read (or 255 if number of interrupts would not fit). See the hpfall.c |
62 | file for an example on using the device. | ||
42 | 63 | ||
43 | 64 | ||
44 | Axes orientation | 65 | Axes 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 | ||
57 | If your laptop model is not recognized (cf "dmesg"), you can send an | 78 | If your laptop model is not recognized (cf "dmesg"), you can send an |
58 | email to the authors to add it to the database. When reporting a new | 79 | email to the maintainer to add it to the database. When reporting a new |
59 | laptop, please include the output of "dmidecode" plus the value of | 80 | laptop, 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 | ||
83 | pwm[1-4]_enable - this file controls mode of fan/temperature control: | 83 | pwm[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 | |||
89 | pwm[1-4]_mode - controls if output is PWM or DC level | ||
90 | * 0 DC output (0 - 12v) | ||
91 | * 1 PWM output | ||
86 | 92 | ||
87 | Thermal Cruise mode | 93 | Thermal 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/input/sentelic.txt b/Documentation/input/sentelic.txt index f7160a2fb6a2..b35affd5c649 100644 --- a/Documentation/input/sentelic.txt +++ b/Documentation/input/sentelic.txt | |||
@@ -1,5 +1,5 @@ | |||
1 | Copyright (C) 2002-2008 Sentelic Corporation. | 1 | Copyright (C) 2002-2010 Sentelic Corporation. |
2 | Last update: Oct-31-2008 | 2 | Last update: Jan-13-2010 |
3 | 3 | ||
4 | ============================================================================== | 4 | ============================================================================== |
5 | * Finger Sensing Pad Intellimouse Mode(scrolling wheel, 4th and 5th buttons) | 5 | * Finger Sensing Pad Intellimouse Mode(scrolling wheel, 4th and 5th buttons) |
@@ -44,7 +44,7 @@ B) MSID 6: Horizontal and Vertical scrolling. | |||
44 | Packet 1 | 44 | Packet 1 |
45 | Bit 7 6 5 4 3 2 1 0 7 6 5 4 3 2 1 0 7 6 5 4 3 2 1 0 7 6 5 4 3 2 1 0 | 45 | Bit 7 6 5 4 3 2 1 0 7 6 5 4 3 2 1 0 7 6 5 4 3 2 1 0 7 6 5 4 3 2 1 0 |
46 | BYTE |---------------|BYTE |---------------|BYTE|---------------|BYTE|---------------| | 46 | BYTE |---------------|BYTE |---------------|BYTE|---------------|BYTE|---------------| |
47 | 1 |Y|X|y|x|1|M|R|L| 2 |X|X|X|X|X|X|X|X| 3 |Y|Y|Y|Y|Y|Y|Y|Y| 4 | | |B|F|l|r|u|d| | 47 | 1 |Y|X|y|x|1|M|R|L| 2 |X|X|X|X|X|X|X|X| 3 |Y|Y|Y|Y|Y|Y|Y|Y| 4 | | |B|F|r|l|u|d| |
48 | |---------------| |---------------| |---------------| |---------------| | 48 | |---------------| |---------------| |---------------| |---------------| |
49 | 49 | ||
50 | Byte 1: Bit7 => Y overflow | 50 | Byte 1: Bit7 => Y overflow |
@@ -59,15 +59,15 @@ Byte 2: X Movement(9-bit 2's complement integers) | |||
59 | Byte 3: Y Movement(9-bit 2's complement integers) | 59 | Byte 3: Y Movement(9-bit 2's complement integers) |
60 | Byte 4: Bit0 => the Vertical scrolling movement downward. | 60 | Byte 4: Bit0 => the Vertical scrolling movement downward. |
61 | Bit1 => the Vertical scrolling movement upward. | 61 | Bit1 => the Vertical scrolling movement upward. |
62 | Bit2 => the Vertical scrolling movement rightward. | 62 | Bit2 => the Horizontal scrolling movement leftward. |
63 | Bit3 => the Vertical scrolling movement leftward. | 63 | Bit3 => the Horizontal scrolling movement rightward. |
64 | Bit4 => 1 = 4th mouse button is pressed, Forward one page. | 64 | Bit4 => 1 = 4th mouse button is pressed, Forward one page. |
65 | 0 = 4th mouse button is not pressed. | 65 | 0 = 4th mouse button is not pressed. |
66 | Bit5 => 1 = 5th mouse button is pressed, Backward one page. | 66 | Bit5 => 1 = 5th mouse button is pressed, Backward one page. |
67 | 0 = 5th mouse button is not pressed. | 67 | 0 = 5th mouse button is not pressed. |
68 | 68 | ||
69 | C) MSID 7: | 69 | C) MSID 7: |
70 | # FSP uses 2 packets(8 Bytes) data to represent Absolute Position | 70 | # FSP uses 2 packets (8 Bytes) to represent Absolute Position. |
71 | so we have PACKET NUMBER to identify packets. | 71 | so we have PACKET NUMBER to identify packets. |
72 | If PACKET NUMBER is 0, the packet is Packet 1. | 72 | If PACKET NUMBER is 0, the packet is Packet 1. |
73 | If PACKET NUMBER is 1, the packet is Packet 2. | 73 | If PACKET NUMBER is 1, the packet is Packet 2. |
@@ -129,7 +129,7 @@ Byte 3: Message Type => 0x00 (Disabled) | |||
129 | Byte 4: Bit7~Bit0 => Don't Care | 129 | Byte 4: Bit7~Bit0 => Don't Care |
130 | 130 | ||
131 | ============================================================================== | 131 | ============================================================================== |
132 | * Absolute position for STL3888-A0. | 132 | * Absolute position for STL3888-Ax. |
133 | ============================================================================== | 133 | ============================================================================== |
134 | Packet 1 (ABSOLUTE POSITION) | 134 | Packet 1 (ABSOLUTE POSITION) |
135 | Bit 7 6 5 4 3 2 1 0 7 6 5 4 3 2 1 0 7 6 5 4 3 2 1 0 7 6 5 4 3 2 1 0 | 135 | Bit 7 6 5 4 3 2 1 0 7 6 5 4 3 2 1 0 7 6 5 4 3 2 1 0 7 6 5 4 3 2 1 0 |
@@ -179,14 +179,14 @@ Byte 4: Bit1~Bit0 => Y coordinate (xpos[1:0]) | |||
179 | Bit5~Bit4 => y2_g | 179 | Bit5~Bit4 => y2_g |
180 | Bit7~Bit6 => x2_g | 180 | Bit7~Bit6 => x2_g |
181 | 181 | ||
182 | Notify Packet for STL3888-A0 | 182 | Notify Packet for STL3888-Ax |
183 | Bit 7 6 5 4 3 2 1 0 7 6 5 4 3 2 1 0 7 6 5 4 3 2 1 0 7 6 5 4 3 2 1 0 | 183 | Bit 7 6 5 4 3 2 1 0 7 6 5 4 3 2 1 0 7 6 5 4 3 2 1 0 7 6 5 4 3 2 1 0 |
184 | BYTE |---------------|BYTE |---------------|BYTE|---------------|BYTE|---------------| | 184 | BYTE |---------------|BYTE |---------------|BYTE|---------------|BYTE|---------------| |
185 | 1 |1|0|1|P|1|M|R|L| 2 |C|C|C|C|C|C|C|C| 3 |0|0|F|F|0|0|0|i| 4 |r|l|d|u|0|0|0|0| | 185 | 1 |1|0|1|P|1|M|R|L| 2 |C|C|C|C|C|C|C|C| 3 |0|0|F|F|0|0|0|i| 4 |r|l|d|u|0|0|0|0| |
186 | |---------------| |---------------| |---------------| |---------------| | 186 | |---------------| |---------------| |---------------| |---------------| |
187 | 187 | ||
188 | Byte 1: Bit7~Bit6 => 00, Normal data packet | 188 | Byte 1: Bit7~Bit6 => 00, Normal data packet |
189 | => 01, Absolute coordination packet | 189 | => 01, Absolute coordinates packet |
190 | => 10, Notify packet | 190 | => 10, Notify packet |
191 | Bit5 => 1 | 191 | Bit5 => 1 |
192 | Bit4 => when in absolute coordinates mode (valid when EN_PKT_GO is 1): | 192 | Bit4 => when in absolute coordinates mode (valid when EN_PKT_GO is 1): |
@@ -205,15 +205,106 @@ Byte 4: Bit7 => scroll right button | |||
205 | Bit6 => scroll left button | 205 | Bit6 => scroll left button |
206 | Bit5 => scroll down button | 206 | Bit5 => scroll down button |
207 | Bit4 => scroll up button | 207 | Bit4 => scroll up button |
208 | * Note that if gesture and additional button (Bit4~Bit7) | 208 | * Note that if gesture and additional buttoni (Bit4~Bit7) |
209 | happen at the same time, the button information will not | 209 | happen at the same time, the button information will not |
210 | be sent. | 210 | be sent. |
211 | Bit3~Bit0 => Reserved | ||
212 | |||
213 | Sample sequence of Multi-finger, Multi-coordinate mode: | ||
214 | |||
215 | notify packet (valid bit == 1), abs pkt 1, abs pkt 2, abs pkt 1, | ||
216 | abs pkt 2, ..., notify packet (valid bit == 0) | ||
217 | |||
218 | ============================================================================== | ||
219 | * Absolute position for STL3888-B0. | ||
220 | ============================================================================== | ||
221 | Packet 1(ABSOLUTE POSITION) | ||
222 | Bit 7 6 5 4 3 2 1 0 7 6 5 4 3 2 1 0 7 6 5 4 3 2 1 0 7 6 5 4 3 2 1 0 | ||
223 | BYTE |---------------|BYTE |---------------|BYTE|---------------|BYTE|---------------| | ||
224 | 1 |0|1|V|F|1|0|R|L| 2 |X|X|X|X|X|X|X|X| 3 |Y|Y|Y|Y|Y|Y|Y|Y| 4 |r|l|u|d|X|X|Y|Y| | ||
225 | |---------------| |---------------| |---------------| |---------------| | ||
226 | |||
227 | Byte 1: Bit7~Bit6 => 00, Normal data packet | ||
228 | => 01, Absolute coordinates packet | ||
229 | => 10, Notify packet | ||
230 | Bit5 => Valid bit, 0 means that the coordinate is invalid or finger up. | ||
231 | When both fingers are up, the last two reports have zero valid | ||
232 | bit. | ||
233 | Bit4 => finger up/down information. 1: finger down, 0: finger up. | ||
234 | Bit3 => 1 | ||
235 | Bit2 => finger index, 0 is the first finger, 1 is the second finger. | ||
236 | Bit1 => Right Button, 1 is pressed, 0 is not pressed. | ||
237 | Bit0 => Left Button, 1 is pressed, 0 is not pressed. | ||
238 | Byte 2: X coordinate (xpos[9:2]) | ||
239 | Byte 3: Y coordinate (ypos[9:2]) | ||
240 | Byte 4: Bit1~Bit0 => Y coordinate (xpos[1:0]) | ||
241 | Bit3~Bit2 => X coordinate (ypos[1:0]) | ||
242 | Bit4 => scroll down button | ||
243 | Bit5 => scroll up button | ||
244 | Bit6 => scroll left button | ||
245 | Bit7 => scroll right button | ||
246 | |||
247 | Packet 2 (ABSOLUTE POSITION) | ||
248 | Bit 7 6 5 4 3 2 1 0 7 6 5 4 3 2 1 0 7 6 5 4 3 2 1 0 7 6 5 4 3 2 1 0 | ||
249 | BYTE |---------------|BYTE |---------------|BYTE|---------------|BYTE|---------------| | ||
250 | 1 |0|1|V|F|1|1|R|L| 2 |X|X|X|X|X|X|X|X| 3 |Y|Y|Y|Y|Y|Y|Y|Y| 4 |r|l|u|d|X|X|Y|Y| | ||
251 | |---------------| |---------------| |---------------| |---------------| | ||
252 | |||
253 | Byte 1: Bit7~Bit6 => 00, Normal data packet | ||
254 | => 01, Absolute coordination packet | ||
255 | => 10, Notify packet | ||
256 | Bit5 => Valid bit, 0 means that the coordinate is invalid or finger up. | ||
257 | When both fingers are up, the last two reports have zero valid | ||
258 | bit. | ||
259 | Bit4 => finger up/down information. 1: finger down, 0: finger up. | ||
260 | Bit3 => 1 | ||
261 | Bit2 => finger index, 0 is the first finger, 1 is the second finger. | ||
262 | Bit1 => Right Button, 1 is pressed, 0 is not pressed. | ||
263 | Bit0 => Left Button, 1 is pressed, 0 is not pressed. | ||
264 | Byte 2: X coordinate (xpos[9:2]) | ||
265 | Byte 3: Y coordinate (ypos[9:2]) | ||
266 | Byte 4: Bit1~Bit0 => Y coordinate (xpos[1:0]) | ||
267 | Bit3~Bit2 => X coordinate (ypos[1:0]) | ||
268 | Bit4 => scroll down button | ||
269 | Bit5 => scroll up button | ||
270 | Bit6 => scroll left button | ||
271 | Bit7 => scroll right button | ||
272 | |||
273 | Notify Packet for STL3888-B0 | ||
274 | Bit 7 6 5 4 3 2 1 0 7 6 5 4 3 2 1 0 7 6 5 4 3 2 1 0 7 6 5 4 3 2 1 0 | ||
275 | BYTE |---------------|BYTE |---------------|BYTE|---------------|BYTE|---------------| | ||
276 | 1 |1|0|1|P|1|M|R|L| 2 |C|C|C|C|C|C|C|C| 3 |0|0|F|F|0|0|0|i| 4 |r|l|u|d|0|0|0|0| | ||
277 | |---------------| |---------------| |---------------| |---------------| | ||
278 | |||
279 | Byte 1: Bit7~Bit6 => 00, Normal data packet | ||
280 | => 01, Absolute coordination packet | ||
281 | => 10, Notify packet | ||
282 | Bit5 => 1 | ||
283 | Bit4 => when in absolute coordinate mode (valid when EN_PKT_GO is 1): | ||
284 | 0: left button is generated by the on-pad command | ||
285 | 1: left button is generated by the external button | ||
286 | Bit3 => 1 | ||
287 | Bit2 => Middle Button, 1 is pressed, 0 is not pressed. | ||
288 | Bit1 => Right Button, 1 is pressed, 0 is not pressed. | ||
289 | Bit0 => Left Button, 1 is pressed, 0 is not pressed. | ||
290 | Byte 2: Message Type => 0xB7 (Multi Finger, Multi Coordinate mode) | ||
291 | Byte 3: Bit7~Bit6 => Don't care | ||
292 | Bit5~Bit4 => Number of fingers | ||
293 | Bit3~Bit1 => Reserved | ||
294 | Bit0 => 1: enter gesture mode; 0: leaving gesture mode | ||
295 | Byte 4: Bit7 => scroll right button | ||
296 | Bit6 => scroll left button | ||
297 | Bit5 => scroll up button | ||
298 | Bit4 => scroll down button | ||
299 | * Note that if gesture and additional button(Bit4~Bit7) | ||
300 | happen at the same time, the button information will not | ||
301 | be sent. | ||
211 | Bit3~Bit0 => Reserved | 302 | Bit3~Bit0 => Reserved |
212 | 303 | ||
213 | Sample sequence of Multi-finger, Multi-coordinate mode: | 304 | Sample sequence of Multi-finger, Multi-coordinate mode: |
214 | 305 | ||
215 | notify packet (valid bit == 1), abs pkt 1, abs pkt 2, abs pkt 1, | 306 | notify packet (valid bit == 1), abs pkt 1, abs pkt 2, abs pkt 1, |
216 | abs pkt 2, ..., notify packet(valid bit == 0) | 307 | abs pkt 2, ..., notify packet (valid bit == 0) |
217 | 308 | ||
218 | ============================================================================== | 309 | ============================================================================== |
219 | * FSP Enable/Disable packet | 310 | * FSP Enable/Disable packet |
@@ -409,7 +500,8 @@ offset width default r/w name | |||
409 | 0: read only, 1: read/write enable | 500 | 0: read only, 1: read/write enable |
410 | (Note that following registers does not require clock gating being | 501 | (Note that following registers does not require clock gating being |
411 | enabled prior to write: 05 06 07 08 09 0c 0f 10 11 12 16 17 18 23 2e | 502 | enabled prior to write: 05 06 07 08 09 0c 0f 10 11 12 16 17 18 23 2e |
412 | 40 41 42 43.) | 503 | 40 41 42 43. In addition to that, this bit must be 1 when gesture |
504 | mode is enabled) | ||
413 | 505 | ||
414 | 0x31 RW on-pad command detection | 506 | 0x31 RW on-pad command detection |
415 | bit7 0 RW on-pad command left button down tag | 507 | bit7 0 RW on-pad command left button down tag |
@@ -463,6 +555,10 @@ offset width default r/w name | |||
463 | absolute coordinates; otherwise, host only receives packets with | 555 | absolute coordinates; otherwise, host only receives packets with |
464 | relative coordinate.) | 556 | relative coordinate.) |
465 | 557 | ||
558 | bit7 0 RW EN_PS2_F2: PS/2 gesture mode 2nd | ||
559 | finger packet enable | ||
560 | 0: disable, 1: enable | ||
561 | |||
466 | 0x43 RW on-pad control | 562 | 0x43 RW on-pad control |
467 | bit0 0 RW on-pad control enable | 563 | bit0 0 RW on-pad control enable |
468 | 0: disable, 1: enable | 564 | 0: disable, 1: enable |
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 | ||
59 | This table lists ioctls visible from user land for Linux/i386. It contains | 59 | This table lists ioctls visible from user land for Linux/x86. It contains |
60 | most drivers up to 2.3.14, but I know I am missing some. | 60 | most drivers up to 2.6.31, but I know I am missing some. There has been |
61 | no attempt to list non-X86 architectures or ioctls from drivers/staging/. | ||
61 | 62 | ||
62 | Code Seq# Include File Comments | 63 | Code Seq#(hex) Include File Comments |
63 | ======================================================== | 64 | ======================================================== |
64 | 0x00 00-1F linux/fs.h conflict! | 65 | 0x00 00-1F linux/fs.h conflict! |
65 | 0x00 00-1F scsi/scsi_ioctl.h conflict! | 66 | 0x00 00-1F scsi/scsi_ioctl.h conflict! |
@@ -69,119 +70,228 @@ Code Seq# Include File Comments | |||
69 | 0x03 all linux/hdreg.h | 70 | 0x03 all linux/hdreg.h |
70 | 0x04 D2-DC linux/umsdos_fs.h Dead since 2.6.11, but don't reuse these. | 71 | 0x04 D2-DC linux/umsdos_fs.h Dead since 2.6.11, but don't reuse these. |
71 | 0x06 all linux/lp.h | 72 | 0x06 all linux/lp.h |
72 | 0x09 all linux/md.h | 73 | 0x09 all linux/raid/md_u.h |
74 | 0x10 00-0F drivers/char/s390/vmcp.h | ||
73 | 0x12 all linux/fs.h | 75 | 0x12 all linux/fs.h |
74 | linux/blkpg.h | 76 | linux/blkpg.h |
75 | 0x1b all InfiniBand Subsystem <http://www.openib.org/> | 77 | 0x1b all InfiniBand Subsystem <http://www.openib.org/> |
76 | 0x20 all drivers/cdrom/cm206.h | 78 | 0x20 all drivers/cdrom/cm206.h |
77 | 0x22 all scsi/sg.h | 79 | 0x22 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! | ||
174 | 0x80 00-1F linux/fb.h | 280 | 0x80 00-1F linux/fb.h |
175 | 0x81 00-1F linux/videotext.h | 281 | 0x81 00-1F linux/videotext.h |
282 | 0x88 00-3F media/ovcamchip.h | ||
176 | 0x89 00-06 arch/x86/include/asm/sockios.h | 283 | 0x89 00-06 arch/x86/include/asm/sockios.h |
177 | 0x89 0B-DF linux/sockios.h | 284 | 0x89 0B-DF linux/sockios.h |
178 | 0x89 E0-EF linux/sockios.h SIOCPROTOPRIVATE range | 285 | 0x89 E0-EF linux/sockios.h SIOCPROTOPRIVATE range |
286 | 0x89 E0-EF linux/dn.h PROTOPRIVATE range | ||
179 | 0x89 F0-FF linux/sockios.h SIOCDEVPRIVATE range | 287 | 0x89 F0-FF linux/sockios.h SIOCDEVPRIVATE range |
180 | 0x8B all linux/wireless.h | 288 | 0x8B all linux/wireless.h |
181 | 0x8C 00-3F WiNRADiO driver | 289 | 0x8C 00-3F WiNRADiO driver |
182 | <http://www.proximity.com.au/~brian/winradio/> | 290 | <http://www.proximity.com.au/~brian/winradio/> |
183 | 0x90 00 drivers/cdrom/sbpcd.h | 291 | 0x90 00 drivers/cdrom/sbpcd.h |
292 | 0x92 00-0F drivers/usb/mon/mon_bin.c | ||
184 | 0x93 60-7F linux/auto_fs.h | 293 | 0x93 60-7F linux/auto_fs.h |
294 | 0x94 all fs/btrfs/ioctl.h | ||
185 | 0x99 00-0F 537-Addinboard driver | 295 | 0x99 00-0F 537-Addinboard driver |
186 | <mailto:buk@buks.ipn.de> | 296 | <mailto:buk@buks.ipn.de> |
187 | 0xA0 all linux/sdp/sdp.h Industrial Device Project | 297 | 0xA0 all linux/sdp/sdp.h Industrial Device Project |
@@ -192,17 +302,22 @@ Code Seq# Include File Comments | |||
192 | 0xAB 00-1F linux/nbd.h | 302 | 0xAB 00-1F linux/nbd.h |
193 | 0xAC 00-1F linux/raw.h | 303 | 0xAC 00-1F linux/raw.h |
194 | 0xAD 00 Netfilter device in development: | 304 | 0xAD 00 Netfilter device in development: |
195 | <mailto:rusty@rustcorp.com.au> | 305 | <mailto:rusty@rustcorp.com.au> |
196 | 0xAE all linux/kvm.h Kernel-based Virtual Machine | 306 | 0xAE all linux/kvm.h Kernel-based Virtual Machine |
197 | <mailto:kvm@vger.kernel.org> | 307 | <mailto:kvm@vger.kernel.org> |
198 | 0xB0 all RATIO devices in development: | 308 | 0xB0 all RATIO devices in development: |
199 | <mailto:vgo@ratio.de> | 309 | <mailto:vgo@ratio.de> |
200 | 0xB1 00-1F PPPoX <mailto:mostrows@styx.uwaterloo.ca> | 310 | 0xB1 00-1F PPPoX <mailto:mostrows@styx.uwaterloo.ca> |
311 | 0xC0 00-0F linux/usb/iowarrior.h | ||
201 | 0xCB 00-1F CBM serial IEC bus in development: | 312 | 0xCB 00-1F CBM serial IEC bus in development: |
202 | <mailto:michael.klein@puffin.lb.shuttle.de> | 313 | <mailto:michael.klein@puffin.lb.shuttle.de> |
314 | 0xCD 01 linux/reiserfs_fs.h | ||
315 | 0xCF 02 fs/cifs/ioctl.c | ||
316 | 0xDB 00-0F drivers/char/mwave/mwavepub.h | ||
203 | 0xDD 00-3F ZFCP device driver see drivers/s390/scsi/ | 317 | 0xDD 00-3F ZFCP device driver see drivers/s390/scsi/ |
204 | <mailto:aherrman@de.ibm.com> | 318 | <mailto:aherrman@de.ibm.com> |
205 | 0xF3 00-3F video/sisfb.h sisfb (in development) | 319 | 0xF3 00-3F drivers/usb/misc/sisusbvga/sisusb.h sisfb (in development) |
206 | <mailto:thomas@winischhofer.net> | 320 | <mailto:thomas@winischhofer.net> |
207 | 0xF4 00-1F video/mbxfb.h mbxfb | 321 | 0xF4 00-1F video/mbxfb.h mbxfb |
208 | <mailto:raph@8d.com> | 322 | <mailto:raph@8d.com> |
323 | 0xFD 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 @@ | |||
1 | Output files | ||
2 | |||
3 | modules.order | ||
4 | -------------------------------------------------- | ||
5 | This file records the order in which modules appear in Makefiles. This | ||
6 | is used by modprobe to deterministically resolve aliases that match | ||
7 | multiple modules. | ||
8 | |||
9 | modules.builtin | ||
10 | -------------------------------------------------- | ||
11 | This file lists all modules that are built into the kernel. This is used | ||
12 | by modprobe to not fail when trying to load something builtin. | ||
13 | |||
14 | |||
1 | Environment variables | 15 | Environment variables |
2 | 16 | ||
3 | KCPPFLAGS | 17 | KCPPFLAGS |
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 | |||
103 | This environment variable can be set to specify the path & name of the | 103 | This 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 | ||
106 | KCONFIG_TRISTATE | ||
107 | -------------------------------------------------- | ||
108 | This 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 | |||
106 | KCONFIG_AUTOHEADER | 111 | KCONFIG_AUTOHEADER |
107 | -------------------------------------------------- | 112 | -------------------------------------------------- |
108 | This environment variable can be set to specify the path & name of the | 113 | This 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. |
115 | Its 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 | ||
217 | The short function description ***cannot be multiline***, but the other | 217 | All "description" text can span multiple lines, although the |
218 | descriptions can be (and they can contain blank lines). If you continue | 218 | function_name & its short description are traditionally on a single line. |
219 | that initial short description onto a second line, that second line will | 219 | Description text may also contain blank lines (i.e., lines that contain |
220 | appear further down at the beginning of the description section, which is | 220 | only a "*"). |
221 | almost certainly not what you had in mind. | 221 | |
222 | "section header:" names must be unique per function (or struct, | ||
223 | union, typedef, enum). | ||
222 | 224 | ||
223 | Avoid putting a spurious blank line after the function name, or else the | 225 | Avoid putting a spurious blank line after the function name, or else the |
224 | description will be repeated! | 226 | description 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 | ||
691 | 4.30 KVM_SET_VCPU_EVENTS | 691 | 4.30 KVM_SET_VCPU_EVENTS |
@@ -701,6 +701,14 @@ vcpu. | |||
701 | 701 | ||
702 | See KVM_GET_VCPU_EVENTS for the data structure. | 702 | See KVM_GET_VCPU_EVENTS for the data structure. |
703 | 703 | ||
704 | Fields that may be modified asynchronously by running VCPUs can be excluded | ||
705 | from the update. These fields are nmi.pending and sipi_vector. Keep the | ||
706 | corresponding bits in the flags field cleared to suppress overwriting the | ||
707 | current in-kernel state. The bits are: | ||
708 | |||
709 | KVM_VCPUEVENT_VALID_NMI_PENDING - transfer nmi.pending to the kernel | ||
710 | KVM_VCPUEVENT_VALID_SIPI_VECTOR - transfer sipi_vector | ||
711 | |||
704 | 712 | ||
705 | 5. The kvm_run structure | 713 | 5. 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. | ||
463 | 0x1011 0x10 FN+END Brightness down. See brightness | 465 | 0x1011 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 | ||
583 | Brightness hotkey notes: | 585 | Brightness hotkey notes: |
584 | 586 | ||
585 | These are the current sane choices for brightness key mapping in | 587 | Don't mess with the brightness hotkeys in a Thinkpad. If you want |
586 | thinkpad-acpi: | 588 | notifications for OSD, use the sysfs backlight class event support. |
587 | 589 | ||
588 | For IBM and Lenovo models *without* ACPI backlight control (the ones on | 590 | The driver will issue KEY_BRIGHTNESS_UP and KEY_BRIGHTNESS_DOWN events |
589 | which thinkpad-acpi will autoload its backlight interface by default, | 591 | automatically for the cases were userspace has to do something to |
590 | and on which ACPI video does not export a backlight interface): | 592 | implement brightness changes. When you override these events, you will |
591 | 593 | either fail to handle properly the ThinkPads that require explicit | |
592 | 1. Don't enable or map the brightness hotkeys in thinkpad-acpi, as | 594 | action to change backlight brightness, or the ThinkPads that require |
593 | these older firmware versions unfortunately won't respect the hotkey | 595 | that 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 | |||
599 | 2. 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 | |||
604 | 3. 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 | |||
611 | For Lenovo models *with* ACPI backlight control: | ||
612 | |||
613 | 1. 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 | |||
620 | 2. 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 | ||
627 | Bluetooth | 598 | Bluetooth |
@@ -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 | ||
1124 | Volume control -- /proc/acpi/ibm/volume | 1095 | Volume control (Console Audio control) |
1125 | --------------------------------------- | 1096 | -------------------------------------- |
1097 | |||
1098 | procfs: /proc/acpi/ibm/volume | ||
1099 | ALSA: "ThinkPad Console Audio Control", default ID: "ThinkPadEC" | ||
1100 | |||
1101 | NOTE: by default, the volume control interface operates in read-only | ||
1102 | mode, as it is supposed to be used for on-screen-display purposes. | ||
1103 | The read/write mode can be enabled through the use of the | ||
1104 | "volume_control=1" module parameter. | ||
1105 | |||
1106 | NOTE: distros are urged to not enable volume_control by default, this | ||
1107 | should be done by the local admin only. The ThinkPad UI is for the | ||
1108 | console audio control to be done through the volume keys only, and for | ||
1109 | the desktop environment to just provide on-screen-display feedback. | ||
1110 | Software volume control should be done only in the main AC97/HDA | ||
1111 | mixer. | ||
1112 | |||
1113 | |||
1114 | About the ThinkPad Console Audio control: | ||
1115 | |||
1116 | ThinkPads have a built-in amplifier and muting circuit that drives the | ||
1117 | console headphone and speakers. This circuit is after the main AC97 | ||
1118 | or HDA mixer in the audio path, and under exclusive control of the | ||
1119 | firmware. | ||
1120 | |||
1121 | ThinkPads have three special hotkeys to interact with the console | ||
1122 | audio control: volume up, volume down and mute. | ||
1123 | |||
1124 | It is worth noting that the normal way the mute function works (on | ||
1125 | ThinkPads that do not have a "mute LED") is: | ||
1126 | 1126 | ||
1127 | This feature allows volume control on ThinkPad models which don't have | 1127 | 1. Press mute to mute. It will *always* mute, you can press it as |
1128 | a hardware volume knob. The available commands are: | 1128 | many times as you want, and the sound will remain mute. |
1129 | |||
1130 | 2. Press either volume key to unmute the ThinkPad (it will _not_ | ||
1131 | change the volume, it will just unmute). | ||
1132 | |||
1133 | This is a very superior design when compared to the cheap software-only | ||
1134 | mute-toggle solution found on normal consumer laptops: you can be | ||
1135 | absolutely sure the ThinkPad will not make noise if you press the mute | ||
1136 | button, no matter the previous state. | ||
1137 | |||
1138 | The IBM ThinkPads, and the earlier Lenovo ThinkPads have variable-gain | ||
1139 | amplifiers driving the speakers and headphone output, and the firmware | ||
1140 | also handles volume control for the headphone and speakers on these | ||
1141 | ThinkPads without any help from the operating system (this volume | ||
1142 | control stage exists after the main AC97 or HDA mixer in the audio | ||
1143 | path). | ||
1144 | |||
1145 | The newer Lenovo models only have firmware mute control, and depend on | ||
1146 | the main HDA mixer to do volume control (which is done by the operating | ||
1147 | system). In this case, the volume keys are filtered out for unmute | ||
1148 | key press (there are some firmware bugs in this area) and delivered as | ||
1149 | normal key presses to the operating system (thinkpad-acpi is not | ||
1150 | involved). | ||
1151 | |||
1152 | |||
1153 | The ThinkPad-ACPI volume control: | ||
1154 | |||
1155 | The preferred way to interact with the Console Audio control is the | ||
1156 | ALSA interface. | ||
1157 | |||
1158 | The legacy procfs interface allows one to read the current state, | ||
1159 | and 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 | ||
1135 | The <level> number range is 0 to 15 although not all of them may be | 1167 | The <level> number range is 0 to 14 although not all of them may be |
1136 | distinct. The unmute the volume after the mute command, use either the | 1168 | distinct. To unmute the volume after the mute command, use either the |
1137 | up or down command (the level command will not unmute the volume). | 1169 | up or down command (the level command will not unmute the volume), or |
1138 | The current volume level and mute state is shown in the file. | 1170 | the unmute command. |
1171 | |||
1172 | You can use the volume_capabilities parameter to tell the driver | ||
1173 | whether your thinkpad has volume control or mute-only control: | ||
1174 | volume_capabilities=1 for mixers with mute and volume control, | ||
1175 | volume_capabilities=2 for mixers with only mute control. | ||
1176 | |||
1177 | If the driver misdetects the capabilities for your ThinkPad model, | ||
1178 | please report this to ibm-acpi-devel@lists.sourceforge.net, so that we | ||
1179 | can update the driver. | ||
1180 | |||
1181 | There are two strategies for volume control. To select which one | ||
1182 | should be used, use the volume_mode module parameter: volume_mode=1 | ||
1183 | selects 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 | ||
1140 | The ALSA mixer interface to this feature is still missing, but patches | 1186 | The driver will operate in volume_mode=3 by default. If that does not |
1141 | to add it exist. That problem should be addressed in the not so | 1187 | work well on your ThinkPad model, please report this to |
1142 | distant future. | 1188 | ibm-acpi-devel@lists.sourceforge.net. |
1189 | |||
1190 | The driver supports the standard ALSA module parameters. If the ALSA | ||
1191 | mixer is disabled, the driver will disable all volume functionality. | ||
1143 | 1192 | ||
1144 | 1193 | ||
1145 | Fan control and monitoring: fan speed, fan enable/disable | 1194 | Fan 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 | ||
1409 | There is also a kernel build option to enable more debugging | 1459 | There is also a kernel build option to enable more debugging |
1410 | information, which may be necessary to debug driver problems. | 1460 | information, 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 | |||
1519 | 0x020600: Marker for backlight change event support. | ||
1520 | |||
1521 | 0x020700: 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. | |||
160 | NOTE: | 160 | NOTE: |
161 | These directories/files appear after physical memory hotplug phase. | 161 | These directories/files appear after physical memory hotplug phase. |
162 | 162 | ||
163 | If CONFIG_NUMA is enabled the | 163 | If CONFIG_NUMA is enabled the memoryXXX/ directories can also be accessed |
164 | /sys/devices/system/memory/memoryXXX memory section | 164 | via symbolic links located in the /sys/devices/system/node/node* directories. |
165 | directories can also be accessed via symbolic links located in | 165 | |
166 | the /sys/devices/system/node/node* directories. For example: | 166 | For example: |
167 | /sys/devices/system/node/node0/memory9 -> ../../memory/memory9 | 167 | /sys/devices/system/node/node0/memory9 -> ../../memory/memory9 |
168 | 168 | ||
169 | A backlink will also be created: | ||
170 | /sys/devices/system/memory/memory9/node0 -> ../../node/node0 | ||
171 | |||
169 | -------------------------------- | 172 | -------------------------------- |
170 | 4. Physical memory hot-add phase | 173 | 4. 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 | |||
5 | The ad525x_dpot driver exports a simple sysfs interface. This allows you to | ||
6 | work with the immediate resistance settings as well as update the saved startup | ||
7 | settings. Access to the factory programmed tolerance is also provided, but | ||
8 | interpretation of this settings is required by the end application according to | ||
9 | the specific part in use. | ||
10 | |||
11 | --------- | ||
12 | Files | ||
13 | --------- | ||
14 | |||
15 | Each dpot device will have a set of eeprom, rdac, and tolerance files. How | ||
16 | many depends on the actual part you have, as will the range of allowed values. | ||
17 | |||
18 | The eeprom files are used to program the startup value of the device. | ||
19 | |||
20 | The rdac files are used to program the immediate value of the device. | ||
21 | |||
22 | The tolerance files are the read-only factory programmed tolerance settings | ||
23 | and may vary greatly on a part-by-part basis. For exact interpretation of | ||
24 | this field, please consult the datasheet for your part. This is presented | ||
25 | as a hex file for easier parsing. | ||
26 | |||
27 | ----------- | ||
28 | Example | ||
29 | ----------- | ||
30 | |||
31 | Locate the device in your sysfs tree. This is probably easiest by going into | ||
32 | the 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 | |||
37 | So assuming the device in question is on the first i2c bus and has the slave | ||
38 | address of 0x2f, we descend (unrelated sysfs entries have been trimmed). | ||
39 | |||
40 | # ls /sys/bus/i2c/devices/0-002f/ | ||
41 | eeprom0 rdac0 tolerance0 | ||
42 | |||
43 | You 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: | |||
48 | This configures the first found 3c509 card for IRQ 10, base I/O 0x310, and | 48 | This configures the first found 3c509 card for IRQ 10, base I/O 0x310, and |
49 | transceiver type 3 (10base2). The flag "0x3c509" must be set to avoid conflicts | 49 | transceiver type 3 (10base2). The flag "0x3c509" must be set to avoid conflicts |
50 | with other card types when overriding the I/O address. When the driver is | 50 | with other card types when overriding the I/O address. When the driver is |
51 | loaded as a module, only the IRQ and transceiver setting may be overridden. | 51 | loaded as a module, only the IRQ may be overridden. For example, |
52 | For example, setting two cards to 10base2/IRQ10 and AUI/IRQ11 is done by using | 52 | setting two cards to IRQ10 and IRQ11 is done by using the irq module |
53 | the xcvr and irq module options: | 53 | option: |
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. | |||
77 | itself full-duplex capable. This is almost certainly one of two things: a full- | 77 | itself full-duplex capable. This is almost certainly one of two things: a full- |
78 | duplex-capable Ethernet switch (*not* a hub), or a full-duplex-capable NIC on | 78 | duplex-capable Ethernet switch (*not* a hub), or a full-duplex-capable NIC on |
79 | another system that's connected directly to the 3c509B via a crossover cable. | 79 | another system that's connected directly to the 3c509B via a crossover cable. |
80 | |||
81 | Full-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///// |
82 | Understand that the 3c509B's hardware's full-duplex support is much more | 84 | Understand 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 | |||
113 | never automatically enable full-duplex mode in an existing installation; | 115 | never automatically enable full-duplex mode in an existing installation; |
114 | it must always be explicitly enabled via one of these code in order to be | 116 | it must always be explicitly enabled via one of these code in order to be |
115 | activated. | 117 | activated. |
118 | |||
119 | The 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 | ||
45 | The ->runtime_suspend() callback is executed by the PM core for the bus type of | 45 | The ->runtime_suspend(), ->runtime_resume() and ->runtime_idle() callbacks are |
46 | the device being suspended. The bus type's callback is then _entirely_ | 46 | executed 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 | 47 | type's callback is not defined), or device class (if the bus type's and device |
48 | include executing the device driver's own ->runtime_suspend() callback (from the | 48 | type's callbacks are not defined) of given device. The bus type, device type |
49 | and device class callbacks are referred to as subsystem-level callbacks in what | ||
50 | follows. | ||
51 | |||
52 | The subsystem-level suspend callback is _entirely_ _responsible_ for handling | ||
53 | the suspend of the device as appropriate, which may, but need not include | ||
54 | executing the device driver's own ->runtime_suspend() callback (from the | ||
49 | PM core's point of view it is not necessary to implement a ->runtime_suspend() | 55 | PM core's point of view it is not necessary to implement a ->runtime_suspend() |
50 | callback in a device driver as long as the bus type's ->runtime_suspend() knows | 56 | callback in a device driver as long as the subsystem-level suspend callback |
51 | what to do to handle the device). | 57 | knows 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). | 77 | In particular, if the driver requires remote wake-up capability (i.e. hardware |
72 | 78 | mechanism allowing the device to request a change of its power state, such as | |
73 | In particular, if the driver requires remote wakeup capability for proper | 79 | PCI PME) for proper functioning and device_run_wake() returns 'false' for the |
74 | functioning and device_run_wake() returns 'false' for the device, then | 80 | device, then ->runtime_suspend() should return -EBUSY. On the other hand, if |
75 | ->runtime_suspend() should return -EBUSY. On the other hand, if | 81 | device_run_wake() returns 'true' for the device and the device is put into a low |
76 | device_run_wake() returns 'true' for the device and the device is put | 82 | power state during the execution of the subsystem-level suspend callback, it is |
77 | into a low power state during the execution of its bus type's | 83 | expected 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 | 84 | wake-up should be enabled for all input devices put into a low power state at |
79 | allowing the device to request a change of its power state, such as PCI PME) | 85 | run time. |
80 | will be enabled for the device. Generally, remote wake-up should be enabled | 86 | |
81 | for all input devices put into a low power state at run time. | 87 | The subsystem-level resume callback is _entirely_ _responsible_ for handling the |
82 | 88 | resume of the device as appropriate, which may, but need not include executing | |
83 | The ->runtime_resume() callback is executed by the PM core for the bus type of | 89 | the device driver's own ->runtime_resume() callback (from the PM core's point of |
84 | the device being woken up. The bus type's callback is then _entirely_ | 90 | view 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 | 91 | driver as long as the subsystem-level resume callback knows what to do to handle |
86 | include executing the device driver's own ->runtime_resume() callback (from the | 92 | the device). |
87 | PM core's point of view it is not necessary to implement a ->runtime_resume() | 93 | |
88 | callback 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 |
89 | what 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 | 105 | The subsystem-level idle callback is executed by the PM core whenever the device |
100 | special helper functions for this purpose). | 106 | appears to be idle, which is indicated to the PM core by two counters, the |
101 | 107 | device's usage counter and the counter of 'active' children of the device. | |
102 | The ->runtime_idle() callback is executed by the PM core for the bus type of | ||
103 | given device whenever the device appears to be idle, which is indicated to the | ||
104 | PM core by two counters, the device's usage counter and the counter of 'active' | ||
105 | children 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 | ||
113 | The action performed by a bus type's ->runtime_idle() callback is totally | 114 | The action performed by a subsystem-level idle callback is totally dependent on |
114 | dependent on the bus type in question, but the expected and recommended action | 115 | the subsystem in question, but the expected and recommended action is to check |
115 | is to check if the device can be suspended (i.e. if all of the conditions | 116 | if the device can be suspended (i.e. if all of the conditions necessary for |
116 | necessary for suspending the device are satisfied) and to queue up a suspend | 117 | suspending the device are satisfied) and to queue up a suspend request for the |
117 | request for the device in that case. The value returned by this callback is | 118 | device in that case. The value returned by this callback is ignored by the PM |
118 | ignored by the PM core. | 119 | core. |
119 | 120 | ||
120 | The helper functions provided by the PM core, described in Section 4, guarantee | 121 | The helper functions provided by the PM core, described in Section 4, guarantee |
121 | that the following constraints are met with respect to the bus type's run-time | 122 | that 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, | |||
378 | they will fail returning -EAGAIN, because the device's usage counter is | 379 | they will fail returning -EAGAIN, because the device's usage counter is |
379 | incremented by the core before executing ->probe() and ->remove(). Still, it | 380 | incremented by the core before executing ->probe() and ->remove(). Still, it |
380 | may be desirable to suspend the device as soon as ->probe() or ->remove() has | 381 | may be desirable to suspend the device as soon as ->probe() or ->remove() has |
381 | finished, so the PM core uses pm_runtime_idle_sync() to invoke the device bus | 382 | finished, so the PM core uses pm_runtime_idle_sync() to invoke the |
382 | type's ->runtime_idle() callback at that time. | 383 | subsystem-level idle callback for the device at that time. |
384 | |||
385 | 6. Run-time PM and System Sleep | ||
386 | |||
387 | Run-time PM and system sleep (i.e., system suspend and hibernation, also known | ||
388 | as suspend-to-RAM and suspend-to-disk) interact with each other in a couple of | ||
389 | ways. If a device is active when a system sleep starts, everything is | ||
390 | straightforward. But what should happen if the device is already suspended? | ||
391 | |||
392 | The device may have different wake-up settings for run-time PM and system sleep. | ||
393 | For example, remote wake-up may be enabled for run-time suspend but disallowed | ||
394 | for system sleep (device_may_wakeup(dev) returns 'false'). When this happens, | ||
395 | the subsystem-level system suspend callback is responsible for changing the | ||
396 | device's wake-up setting (it may leave that to the device driver's system | ||
397 | suspend routine). It may be necessary to resume the device and suspend it again | ||
398 | in order to do so. The same is true if the driver uses different power levels | ||
399 | or other settings for run-time suspend and system sleep. | ||
400 | |||
401 | During system resume, devices generally should be brought back to full power, | ||
402 | even if they were suspended before the system sleep began. There are several | ||
403 | reasons 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 | |||
422 | If the device was suspended before the sleep began, then its run-time PM status | ||
423 | will have to be updated to reflect the actual post-system sleep status. The way | ||
424 | to do this is: | ||
425 | |||
426 | pm_runtime_disable(dev); | ||
427 | pm_runtime_set_active(dev); | ||
428 | pm_runtime_enable(dev); | ||
429 | |||
430 | The PM core always increments the run-time usage counter before calling the | ||
431 | ->prepare() callback and decrements it after calling the ->complete() callback. | ||
432 | Hence disabling run-time PM temporarily like this will not cause any run-time | ||
433 | suspend 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 @@ | |||
1 | PPC440SPe DMA/XOR (DMA Controller and XOR Accelerator) | ||
2 | |||
3 | Device nodes needed for operation of the ppc440spe-adma driver | ||
4 | are specified hereby. These are I2O/DMA, DMA and XOR nodes | ||
5 | for DMA engines and Memory Queue Module node. The latter is used | ||
6 | by ADMA driver for configuration of RAID-6 H/W capabilities of | ||
7 | the PPC440SPe. In addition to the nodes and properties described | ||
8 | below, the ranges property of PLB node must specify ranges for | ||
9 | DMA 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 | |||
3 | The OpenPIC specification does not specify which interrupt source has to | ||
4 | become which interrupt number. This is up to the software implementation | ||
5 | of the interrupt controller. The only requirement is that every | ||
6 | interrupt source has to have an unique interrupt number / vector number. | ||
7 | To accomplish this the current implementation assigns the number zero to | ||
8 | the first source, the number one to the second source and so on until | ||
9 | all interrupt sources have their unique number. | ||
10 | Usually the assigned vector number equals the interrupt number mentioned | ||
11 | in the documentation for a given core / CPU. This is however not true | ||
12 | for the e500 cores (MPC85XX CPUs) where the documentation distinguishes | ||
13 | between internal and external interrupt sources and starts counting at | ||
14 | zero for both of them. | ||
15 | |||
16 | So what to write for external interrupt source X or internal interrupt | ||
17 | source Y into the device tree? Here is an example: | ||
18 | |||
19 | The memory map for the interrupt controller in the MPC8544[0] shows, | ||
20 | that the first interrupt source starts at 0x5_0000 (PIC Register Address | ||
21 | Map-Interrupt Source Configuration Registers). This source becomes the | ||
22 | number zero therefore: | ||
23 | External interrupt 0 = interrupt number 0 | ||
24 | External interrupt 1 = interrupt number 1 | ||
25 | External interrupt 2 = interrupt number 2 | ||
26 | ... | ||
27 | Every interrupt number allocates 0x20 bytes register space. So to get | ||
28 | its number it is sufficient to shift the lower 16bits to right by five. | ||
29 | So for the external interrupt 10 we have: | ||
30 | 0x0140 >> 5 = 10 | ||
31 | |||
32 | After the external sources, the internal sources follow. The in core I2C | ||
33 | controller on the MPC8544 for instance has the internal source number | ||
34 | 27. Oo obtain its interrupt number we take the lower 16bits of its memory | ||
35 | address (0x5_0560) and shift it right: | ||
36 | 0x0560 >> 5 = 43 | ||
37 | |||
38 | Therefore the I2C device node for the MPC8544 CPU has to have the | ||
39 | interrupt 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 | |||
2 | Nintendo GameCube device tree | ||
3 | ============================= | ||
4 | |||
5 | 1) 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 | |||
14 | 1.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 | |||
25 | 1.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 | |||
35 | 1.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 | |||
45 | 1.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 | |||
56 | 1.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 | |||
67 | 1.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 | |||
77 | 1.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 | |||
88 | 1.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 | |||
100 | 1.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 | |||
2 | Nintendo Wii device tree | ||
3 | ======================== | ||
4 | |||
5 | 0) 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 | |||
14 | 1) 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 | |||
23 | 1.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 | |||
34 | 1.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 | |||
44 | 1.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 | |||
56 | 1.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 | |||
67 | 1.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 | |||
79 | 1.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 | |||
90 | 1.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 | |||
100 | 1.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 | |||
110 | 1.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 | |||
120 | 1.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 | |||
130 | 1.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 | |||
139 | 1.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 | |||
153 | 1.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 | |||
164 | 1.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 | |||
175 | 1.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 | |||
403 | Cirrus Logic CS4206/4207 | 403 | Cirrus 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 | ||
3 | The tracing system kmem captures events related to object and page allocation | 3 | The kmem tracing system captures events related to object and page allocation |
4 | within the kernel. Broadly speaking there are four major subheadings. | 4 | within 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 | ||
12 | This document will describe what each of the tracepoints are and why they | 12 | This document describes what each of the tracepoints is and why they |
13 | might be useful. | 13 | might be useful. |
14 | 14 | ||
15 | 1. Slab allocation of small objects of unknown type | 15 | 1. Slab allocation of small objects of unknown type |
@@ -34,7 +34,7 @@ kmem_cache_free call_site=%lx ptr=%p | |||
34 | These events are similar in usage to the kmalloc-related events except that | 34 | These events are similar in usage to the kmalloc-related events except that |
35 | it is likely easier to pin the event down to a specific cache. At the time | 35 | it is likely easier to pin the event down to a specific cache. At the time |
36 | of writing, no information is available on what slab is being allocated from, | 36 | of writing, no information is available on what slab is being allocated from, |
37 | but the call_site can usually be used to extrapolate that information | 37 | but the call_site can usually be used to extrapolate that information. |
38 | 38 | ||
39 | 3. Page allocation | 39 | 3. Page allocation |
40 | ================== | 40 | ================== |
@@ -80,9 +80,9 @@ event indicating whether it is for a percpu_refill or not. | |||
80 | When the per-CPU list is too full, a number of pages are freed, each one | 80 | When the per-CPU list is too full, a number of pages are freed, each one |
81 | which triggers a mm_page_pcpu_drain event. | 81 | which triggers a mm_page_pcpu_drain event. |
82 | 82 | ||
83 | The individual nature of the events are so that pages can be tracked | 83 | The individual nature of the events is so that pages can be tracked |
84 | between allocation and freeing. A number of drain or refill pages that occur | 84 | between allocation and freeing. A number of drain or refill pages that occur |
85 | consecutively imply the zone->lock being taken once. Large amounts of PCP | 85 | consecutively imply the zone->lock being taken once. Large amounts of per-CPU |
86 | refills and drains could imply an imbalance between CPUs where too much work | 86 | refills and drains could imply an imbalance between CPUs where too much work |
87 | is being concentrated in one place. It could also indicate that the per-CPU | 87 | is being concentrated in one place. It could also indicate that the per-CPU |
88 | lists should be a larger size. Finally, large amounts of refills on one CPU | 88 | lists should be a larger size. Finally, large amounts of refills on one CPU |
@@ -102,6 +102,6 @@ is important. | |||
102 | 102 | ||
103 | Large numbers of this event implies that memory is fragmenting and | 103 | Large numbers of this event implies that memory is fragmenting and |
104 | high-order allocations will start failing at some time in the future. One | 104 | high-order allocations will start failing at some time in the future. One |
105 | means of reducing the occurange of this event is to increase the size of | 105 | means of reducing the occurrence of this event is to increase the size of |
106 | min_free_kbytes in increments of 3*pageblock_size*nr_online_nodes where | 106 | min_free_kbytes in increments of 3*pageblock_size*nr_online_nodes where |
107 | pageblock_size is usually the size of the default hugepage size. | 107 | pageblock_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). | |||
53 | For example, if the function foo() calls bar(), when the bar() function calls | 53 | For example, if the function foo() calls bar(), when the bar() function calls |
54 | mcount(), the arguments mcount() will pass to the tracer are: | 54 | mcount(), 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 | ||
58 | Also keep in mind that this mcount function will be called *a lot*, so | 58 | Also keep in mind that this mcount function will be called *a lot*, so |
59 | optimizing for the default case of no tracer will help the smooth running of | 59 | optimizing for the default case of no tracer will help the smooth running of |
60 | your system when tracing is disabled. So the start of the mcount function is | 60 | your system when tracing is disabled. So the start of the mcount function is |
61 | typically the bare min with checking things before returning. That also means | 61 | typically the bare minimum with checking things before returning. That also |
62 | the code flow should usually kept linear (i.e. no branching in the nop case). | 62 | means the code flow should usually be kept linear (i.e. no branching in the nop |
63 | This is of course an optimization and not a hard requirement. | 63 | case). This is of course an optimization and not a hard requirement. |
64 | 64 | ||
65 | Here is some pseudo code that should help (these functions should actually be | 65 | Here is some pseudo code that should help (these functions should actually be |
66 | implemented in assembly): | 66 | implemented in assembly): |
@@ -131,10 +131,10 @@ some functions to save (hijack) and restore the return address. | |||
131 | 131 | ||
132 | The mcount function should check the function pointers ftrace_graph_return | 132 | The 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 |
134 | ftrace_graph_entry_stub). If either of those are not set to the relevant stub | 134 | ftrace_graph_entry_stub). If either of those is not set to the relevant stub |
135 | function, call the arch-specific function ftrace_graph_caller which in turn | 135 | function, call the arch-specific function ftrace_graph_caller which in turn |
136 | calls the arch-specific function prepare_ftrace_return. Neither of these | 136 | calls the arch-specific function prepare_ftrace_return. Neither of these |
137 | function names are strictly required, but you should use them anyways to stay | 137 | function names is strictly required, but you should use them anyway to stay |
138 | consistent across the architecture ports -- easier to compare & contrast | 138 | consistent across the architecture ports -- easier to compare & contrast |
139 | things. | 139 | things. |
140 | 140 | ||
@@ -144,7 +144,7 @@ but the first argument should be a pointer to the "frompc". Typically this is | |||
144 | located on the stack. This allows the function to hijack the return address | 144 | located on the stack. This allows the function to hijack the return address |
145 | temporarily to have it point to the arch-specific function return_to_handler. | 145 | temporarily to have it point to the arch-specific function return_to_handler. |
146 | That function will simply call the common ftrace_return_to_handler function and | 146 | That function will simply call the common ftrace_return_to_handler function and |
147 | that will return the original return address with which, you can return to the | 147 | that will return the original return address with which you can return to the |
148 | original call site. | 148 | original call site. |
149 | 149 | ||
150 | Here is the updated mcount pseudo code: | 150 | Here 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. | |||
44 | Usage | 44 | Usage |
45 | ----- | 45 | ----- |
46 | 46 | ||
47 | Make sure debugfs is mounted to /sys/kernel/debug. If not, (requires root privileges) | 47 | Make sure debugfs is mounted to /sys/kernel/debug. |
48 | If not (requires root privileges): | ||
48 | $ mount -t debugfs debugfs /sys/kernel/debug | 49 | $ mount -t debugfs debugfs /sys/kernel/debug |
49 | 50 | ||
50 | Check that the driver you are about to trace is not loaded. | 51 | Check 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 |
92 | and then send the .tar.gz file. The trace compresses considerably. Replace | 93 | and 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 |
94 | under investigation and your nick name. | 95 | under investigation and your nickname. |
95 | 96 | ||
96 | 97 | ||
97 | How Mmiotrace Works | 98 | How Mmiotrace Works |
@@ -100,7 +101,7 @@ How Mmiotrace Works | |||
100 | Access to hardware IO-memory is gained by mapping addresses from PCI bus by | 101 | Access to hardware IO-memory is gained by mapping addresses from PCI bus by |
101 | calling one of the ioremap_*() functions. Mmiotrace is hooked into the | 102 | calling 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 |
103 | an event that is recorded into the trace log. Note, that ISA range mappings | 104 | an event that is recorded into the trace log. Note that ISA range mappings |
104 | are not caught, since the mapping always exists and is returned directly. | 105 | are not caught, since the mapping always exists and is returned directly. |
105 | 106 | ||
106 | MMIO accesses are recorded via page faults. Just before __ioremap() returns, | 107 | MMIO accesses are recorded via page faults. Just before __ioremap() returns, |
@@ -122,11 +123,11 @@ Trace Log Format | |||
122 | ---------------- | 123 | ---------------- |
123 | 124 | ||
124 | The raw log is text and easily filtered with e.g. grep and awk. One record is | 125 | The raw log is text and easily filtered with e.g. grep and awk. One record is |
125 | one line in the log. A record starts with a keyword, followed by keyword | 126 | one line in the log. A record starts with a keyword, followed by keyword- |
126 | dependant arguments. Arguments are separated by a space, or continue until the | 127 | dependent arguments. Arguments are separated by a space, or continue until the |
127 | end of line. The format for version 20070824 is as follows: | 128 | end of line. The format for version 20070824 is as follows: |
128 | 129 | ||
129 | Explanation Keyword Space separated arguments | 130 | Explanation Keyword Space-separated arguments |
130 | --------------------------------------------------------------------------- | 131 | --------------------------------------------------------------------------- |
131 | 132 | ||
132 | read event R width, timestamp, map id, physical, value, PC, PID | 133 | read event R width, timestamp, map id, physical, value, PC, PID |
@@ -136,7 +137,7 @@ iounmap event UNMAP timestamp, map id, PC, PID | |||
136 | marker MARK timestamp, text | 137 | marker MARK timestamp, text |
137 | version VERSION the string "20070824" | 138 | version VERSION the string "20070824" |
138 | info for reader LSPCI one line from lspci -v | 139 | info for reader LSPCI one line from lspci -v |
139 | PCI address map PCIDEV space separated /proc/bus/pci/devices data | 140 | PCI address map PCIDEV space-separated /proc/bus/pci/devices data |
140 | unk. opcode UNKNOWN timestamp, map id, physical, data, PC, PID | 141 | unk. opcode UNKNOWN timestamp, map id, physical, data, PC, PID |
141 | 142 | ||
142 | Timestamp is in seconds with decimals. Physical is a PCI bus address, virtual | 143 | Timestamp 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 | ||
34 | tail_page - a pointer to the page that will be written to next | 34 | tail_page - a pointer to the page that will be written to next |
35 | 35 | ||
36 | commit_page - a pointer to the page with the last finished non nested write. | 36 | commit_page - a pointer to the page with the last finished non-nested write. |
37 | 37 | ||
38 | cmpxchg - hardware assisted atomic transaction that performs the following: | 38 | cmpxchg - 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 | |||
52 | The ring buffer can be used in either an overwrite mode or in | 52 | The ring buffer can be used in either an overwrite mode or in |
53 | producer/consumer mode. | 53 | producer/consumer mode. |
54 | 54 | ||
55 | Producer/consumer mode is where the producer were to fill up the | 55 | Producer/consumer mode is where if the producer were to fill up the |
56 | buffer before the consumer could free up anything, the producer | 56 | buffer before the consumer could free up anything, the producer |
57 | will stop writing to the buffer. This will lose most recent events. | 57 | will stop writing to the buffer. This will lose most recent events. |
58 | 58 | ||
59 | Overwrite mode is where the produce were to fill up the buffer | 59 | Overwrite mode is where if the producer were to fill up the buffer |
60 | before the consumer could free up anything, the producer will | 60 | before the consumer could free up anything, the producer will |
61 | overwrite the older data. This will lose the oldest events. | 61 | overwrite the older data. This will lose the oldest events. |
62 | 62 | ||
63 | No two writers can write at the same time (on the same per cpu buffer), | 63 | No two writers can write at the same time (on the same per-cpu buffer), |
64 | but a writer may interrupt another writer, but it must finish writing | 64 | but a writer may interrupt another writer, but it must finish writing |
65 | before the previous writer may continue. This is very important to the | 65 | before the previous writer may continue. This is very important to the |
66 | algorithm. The writers act like a "stack". The way interrupts works | 66 | algorithm. The writers act like a "stack". The way interrupts works |
@@ -79,16 +79,16 @@ the interrupt doing a write as well. | |||
79 | 79 | ||
80 | Readers can happen at any time. But no two readers may run at the | 80 | Readers can happen at any time. But no two readers may run at the |
81 | same time, nor can a reader preempt/interrupt another reader. A reader | 81 | same time, nor can a reader preempt/interrupt another reader. A reader |
82 | can not preempt/interrupt a writer, but it may read/consume from the | 82 | cannot preempt/interrupt a writer, but it may read/consume from the |
83 | buffer at the same time as a writer is writing, but the reader must be | 83 | buffer at the same time as a writer is writing, but the reader must be |
84 | on another processor to do so. A reader may read on its own processor | 84 | on another processor to do so. A reader may read on its own processor |
85 | and can be preempted by a writer. | 85 | and can be preempted by a writer. |
86 | 86 | ||
87 | A writer can preempt a reader, but a reader can not preempt a writer. | 87 | A writer can preempt a reader, but a reader cannot preempt a writer. |
88 | But a reader can read the buffer at the same time (on another processor) | 88 | But a reader can read the buffer at the same time (on another processor) |
89 | as a writer. | 89 | as a writer. |
90 | 90 | ||
91 | The ring buffer is made up of a list of pages held together by a link list. | 91 | The ring buffer is made up of a list of pages held together by a linked list. |
92 | 92 | ||
93 | At initialization a reader page is allocated for the reader that is not | 93 | At initialization a reader page is allocated for the reader that is not |
94 | part of the ring buffer. | 94 | part of the ring buffer. |
@@ -102,7 +102,7 @@ the head page. | |||
102 | 102 | ||
103 | The reader has its own page to use. At start up time, this page is | 103 | The reader has its own page to use. At start up time, this page is |
104 | allocated but is not attached to the list. When the reader wants | 104 | allocated but is not attached to the list. When the reader wants |
105 | to read from the buffer, if its page is empty (like it is on start up) | 105 | to read from the buffer, if its page is empty (like it is on start-up), |
106 | it will swap its page with the head_page. The old reader page will | 106 | it will swap its page with the head_page. The old reader page will |
107 | become part of the ring buffer and the head_page will be removed. | 107 | become part of the ring buffer and the head_page will be removed. |
108 | The page after the inserted page (old reader_page) will become the | 108 | The 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 | ||
209 | The commit page only is updated by the outer most writer in the | 209 | The commit page only is updated by the outermost writer in the |
210 | writer stack. A writer that preempts another writer will not move the | 210 | writer stack. A writer that preempts another writer will not move the |
211 | commit page. | 211 | commit page. |
212 | 212 | ||
@@ -281,7 +281,7 @@ with the previous write. | |||
281 | The commit pointer points to the last write location that was | 281 | The commit pointer points to the last write location that was |
282 | committed without preempting another write. When a write that | 282 | committed without preempting another write. When a write that |
283 | preempted another write is committed, it only becomes a pending commit | 283 | preempted another write is committed, it only becomes a pending commit |
284 | and will not be a full commit till all writes have been committed. | 284 | and will not be a full commit until all writes have been committed. |
285 | 285 | ||
286 | The commit page points to the page that has the last full commit. | 286 | The commit page points to the page that has the last full commit. |
287 | The tail page points to the page with the last write (before | 287 | The 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 | |||
292 | page then no more writes may take place (regardless of the mode | 292 | page then no more writes may take place (regardless of the mode |
293 | of the ring buffer: overwrite and produce/consumer). | 293 | of the ring buffer: overwrite and produce/consumer). |
294 | 294 | ||
295 | The order of pages are: | 295 | The order of pages is: |
296 | 296 | ||
297 | head page | 297 | head page |
298 | commit page | 298 | commit page |
@@ -311,7 +311,7 @@ Possible scenario: | |||
311 | There is a special case that the head page is after either the commit page | 311 | There is a special case that the head page is after either the commit page |
312 | and possibly the tail page. That is when the commit (and tail) page has been | 312 | and possibly the tail page. That is when the commit (and tail) page has been |
313 | swapped with the reader page. This is because the head page is always | 313 | swapped with the reader page. This is because the head page is always |
314 | part of the ring buffer, but the reader page is not. When ever there | 314 | part of the ring buffer, but the reader page is not. Whenever there |
315 | has been less than a full page that has been committed inside the ring buffer, | 315 | has been less than a full page that has been committed inside the ring buffer, |
316 | and a reader swaps out a page, it will be swapping out the commit page. | 316 | and 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. | |||
338 | In this case, the head page will not move when the tail and commit | 338 | In this case, the head page will not move when the tail and commit |
339 | move back into the ring buffer. | 339 | move back into the ring buffer. |
340 | 340 | ||
341 | The reader can not swap a page into the ring buffer if the commit page | 341 | The reader cannot swap a page into the ring buffer if the commit page |
342 | is still on that page. If the read meets the last commit (real commit | 342 | is still on that page. If the read meets the last commit (real commit |
343 | not pending or reserved), then there is nothing more to read. | 343 | not pending or reserved), then there is nothing more to read. |
344 | The buffer is considered empty until another full commit finishes. | 344 | The 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 | |||
395 | of the head_page pointer with the swapping of pages with the reader. | 395 | of the head_page pointer with the swapping of pages with the reader. |
396 | State flags are placed inside the pointer to the page. To do this, | 396 | State flags are placed inside the pointer to the page. To do this, |
397 | each page must be aligned in memory by 4 bytes. This will allow the 2 | 397 | each page must be aligned in memory by 4 bytes. This will allow the 2 |
398 | least significant bits of the address to be used as flags. Since | 398 | least significant bits of the address to be used as flags, since |
399 | they will always be zero for the address. To get the address, | 399 | they will always be zero for the address. To get the address, |
400 | simply mask out the flags. | 400 | simply mask out the flags. |
401 | 401 | ||
@@ -460,7 +460,7 @@ When the reader tries to swap the page with the ring buffer, it | |||
460 | will also use cmpxchg. If the flag bit in the pointer to the | 460 | will also use cmpxchg. If the flag bit in the pointer to the |
461 | head page does not have the HEADER flag set, the compare will fail | 461 | head page does not have the HEADER flag set, the compare will fail |
462 | and the reader will need to look for the new head page and try again. | 462 | and the reader will need to look for the new head page and try again. |
463 | Note, the flag UPDATE and HEADER are never set at the same time. | 463 | Note, the flags UPDATE and HEADER are never set at the same time. |
464 | 464 | ||
465 | The reader swaps the reader page as follows: | 465 | The reader swaps the reader page as follows: |
466 | 466 | ||
@@ -539,7 +539,7 @@ updated to the reader page. | |||
539 | | +-----------------------------+ | | 539 | | +-----------------------------+ | |
540 | +------------------------------------+ | 540 | +------------------------------------+ |
541 | 541 | ||
542 | Another important point. The page that the reader page points back to | 542 | Another important point: The page that the reader page points back to |
543 | by its previous pointer (the one that now points to the new head page) | 543 | by its previous pointer (the one that now points to the new head page) |
544 | never points back to the reader page. That is because the reader page is | 544 | never points back to the reader page. That is because the reader page is |
545 | not part of the ring buffer. Traversing the ring buffer via the next pointers | 545 | not 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 | |||
572 | move the head page, until the writer is finished with the move. | 572 | move the head page, until the writer is finished with the move. |
573 | 573 | ||
574 | This eliminates any races that the reader can have on the writer. The reader | 574 | This eliminates any races that the reader can have on the writer. The reader |
575 | must spin, and this is why the reader can not preempt the writer. | 575 | must 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 | |||
659 | tail page wrapped the buffer, and we must drop new writes. | 659 | tail page wrapped the buffer, and we must drop new writes. |
660 | 660 | ||
661 | This is not a race condition, because the commit page can only be moved | 661 | This is not a race condition, because the commit page can only be moved |
662 | by the outter most writer (the writer that was preempted). | 662 | by the outermost writer (the writer that was preempted). |
663 | This means that the commit will not move while a writer is moving the | 663 | This means that the commit will not move while a writer is moving the |
664 | tail page. The reader can not swap the reader page if it is also being | 664 | tail page. The reader cannot swap the reader page if it is also being |
665 | used as the commit page. The reader can simply check that the commit | 665 | used as the commit page. The reader can simply check that the commit |
666 | is off the reader page. Once the commit page leaves the reader page | 666 | is off the reader page. Once the commit page leaves the reader page |
667 | it will never go back on it unless a reader does another swap with the | 667 | it 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 | ||
736 | But if a nested writer preempts here. It will see that the next | 736 | But if a nested writer preempts here, it will see that the next |
737 | page is a head page, but it is also nested. It will detect that | 737 | page is a head page, but it is also nested. It will detect that |
738 | it is nested and will save that information. The detection is the | 738 | it is nested and will save that information. The detection is the |
739 | fact that it sees the UPDATE flag instead of a HEADER or NORMAL | 739 | fact that it sees the UPDATE flag instead of a HEADER or NORMAL |
@@ -761,7 +761,7 @@ to NORMAL. | |||
761 | --->| |<---| |<---| |<---| |<--- | 761 | --->| |<---| |<---| |<---| |<--- |
762 | +---+ +---+ +---+ +---+ | 762 | +---+ +---+ +---+ +---+ |
763 | 763 | ||
764 | After the nested writer finishes, the outer most writer will convert | 764 | After the nested writer finishes, the outermost writer will convert |
765 | the UPDATE pointer to NORMAL. | 765 | the UPDATE pointer to NORMAL. |
766 | 766 | ||
767 | 767 | ||
@@ -812,7 +812,7 @@ head page. | |||
812 | +---+ +---+ +---+ +---+ | 812 | +---+ +---+ +---+ +---+ |
813 | 813 | ||
814 | The nested writer moves the tail page forward. But does not set the old | 814 | The nested writer moves the tail page forward. But does not set the old |
815 | update page to NORMAL because it is not the outer most writer. | 815 | update 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 | ||
895 | The first writer can not know atomically test if the tail page moved | 895 | The first writer cannot know atomically if the tail page moved |
896 | while it updates the HEAD page. It will then update the head page to | 896 | while it updates the HEAD page. It will then update the head page to |
897 | what it thinks is the new head page. | 897 | what 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 | ||
926 | If tail page != A and tail page does not equal B, then it must reset the | 926 | If tail page != A and tail page != B, then it must reset the pointer |
927 | pointer back to NORMAL. The fact that it only needs to worry about | 927 | back to NORMAL. The fact that it only needs to worry about nested |
928 | nested writers, it only needs to check this after setting the HEAD page. | 928 | writers 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 | ||
941 | Now the writer can update the head page. This is also why the head page must | 941 | Now the writer can update the head page. This is also why the head page must |
942 | remain in UPDATE and only reset by the outer most writer. This prevents | 942 | remain in UPDATE and only reset by the outermost writer. This prevents |
943 | the reader from seeing the incorrect head page. | 943 | the 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 | |||
10 | creating custom kernel modules to register probe functions using the event | 10 | creating custom kernel modules to register probe functions using the event |
11 | tracing infrastructure. | 11 | tracing infrastructure. |
12 | 12 | ||
13 | Simplistically, tracepoints will represent an important event that when can | 13 | Simplistically, tracepoints represent important events that can be |
14 | be taken in conjunction with other tracepoints to build a "Big Picture" of | 14 | taken in conjunction with other tracepoints to build a "Big Picture" of |
15 | what is going on within the system. There are a large number of methods for | 15 | what is going on within the system. There are a large number of methods for |
16 | gathering and interpreting these events. Lacking any current Best Practises, | 16 | gathering and interpreting these events. Lacking any current Best Practises, |
17 | this document describes some of the methods that can be used. | 17 | this document describes some of the methods that can be used. |
@@ -33,12 +33,12 @@ calling | |||
33 | 33 | ||
34 | will give a fair indication of the number of events available. | 34 | will give a fair indication of the number of events available. |
35 | 35 | ||
36 | 2.2 PCL | 36 | 2.2 PCL (Performance Counters for Linux) |
37 | ------- | 37 | ------- |
38 | 38 | ||
39 | Discovery and enumeration of all counters and events, including tracepoints | 39 | Discovery and enumeration of all counters and events, including tracepoints, |
40 | are available with the perf tool. Getting a list of available events is a | 40 | are available with the perf tool. Getting a list of available events is a |
41 | simple case of | 41 | simple 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 | ||
52 | 2. Enabling Events | 52 | 3. Enabling Events |
53 | ================== | 53 | ================== |
54 | 54 | ||
55 | 2.1 System-Wide Event Enabling | 55 | 3.1 System-Wide Event Enabling |
56 | ------------------------------ | 56 | ------------------------------ |
57 | 57 | ||
58 | See Documentation/trace/events.txt for a proper description on how events | 58 | See Documentation/trace/events.txt for a proper description on how events |
59 | can be enabled system-wide. A short example of enabling all events related | 59 | can be enabled system-wide. A short example of enabling all events related |
60 | to page allocation would look something like | 60 | to 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 | ||
64 | 2.2 System-Wide Event Enabling with SystemTap | 64 | 3.2 System-Wide Event Enabling with SystemTap |
65 | --------------------------------------------- | 65 | --------------------------------------------- |
66 | 66 | ||
67 | In SystemTap, tracepoints are accessible using the kernel.trace() function | 67 | In 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 | ||
89 | 2.3 System-Wide Event Enabling with PCL | 89 | 3.3 System-Wide Event Enabling with PCL |
90 | --------------------------------------- | 90 | --------------------------------------- |
91 | 91 | ||
92 | By specifying the -a switch and analysing sleep, the system-wide events | 92 | By specifying the -a switch and analysing sleep, the system-wide events |
@@ -107,16 +107,16 @@ for a duration of time can be examined. | |||
107 | Similarly, one could execute a shell and exit it as desired to get a report | 107 | Similarly, one could execute a shell and exit it as desired to get a report |
108 | at that point. | 108 | at that point. |
109 | 109 | ||
110 | 2.4 Local Event Enabling | 110 | 3.4 Local Event Enabling |
111 | ------------------------ | 111 | ------------------------ |
112 | 112 | ||
113 | Documentation/trace/ftrace.txt describes how to enable events on a per-thread | 113 | Documentation/trace/ftrace.txt describes how to enable events on a per-thread |
114 | basis using set_ftrace_pid. | 114 | basis using set_ftrace_pid. |
115 | 115 | ||
116 | 2.5 Local Event Enablement with PCL | 116 | 3.5 Local Event Enablement with PCL |
117 | ----------------------------------- | 117 | ----------------------------------- |
118 | 118 | ||
119 | Events can be activate and tracked for the duration of a process on a local | 119 | Events can be activated and tracked for the duration of a process on a local |
120 | basis using PCL such as follows. | 120 | basis 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 | ||
134 | 3. Event Filtering | 134 | 4. Event Filtering |
135 | ================== | 135 | ================== |
136 | 136 | ||
137 | Documentation/trace/ftrace.txt covers in-depth how to filter events in | 137 | Documentation/trace/ftrace.txt covers in-depth how to filter events in |
138 | ftrace. Obviously using grep and awk of trace_pipe is an option as well | 138 | ftrace. Obviously using grep and awk of trace_pipe is an option as well |
139 | as any script reading trace_pipe. | 139 | as any script reading trace_pipe. |
140 | 140 | ||
141 | 4. Analysing Event Variances with PCL | 141 | 5. Analysing Event Variances with PCL |
142 | ===================================== | 142 | ===================================== |
143 | 143 | ||
144 | Any workload can exhibit variances between runs and it can be important | 144 | Any workload can exhibit variances between runs and it can be important |
145 | to know what the standard deviation in. By and large, this is left to the | 145 | to know what the standard deviation is. By and large, this is left to the |
146 | performance analyst to do it by hand. In the event that the discrete event | 146 | performance analyst to do it by hand. In the event that the discrete event |
147 | occurrences are useful to the performance analyst, then perf can be used. | 147 | occurrences 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 | |||
166 | aggregation of discrete events, then a script would need to be developed. | 166 | aggregation of discrete events, then a script would need to be developed. |
167 | 167 | ||
168 | Using --repeat, it is also possible to view how events are fluctuating over | 168 | Using --repeat, it is also possible to view how events are fluctuating over |
169 | time on a system wide basis using -a and sleep. | 169 | time 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 | ||
183 | 5. Higher-Level Analysis with Helper Scripts | 183 | 6. Higher-Level Analysis with Helper Scripts |
184 | ============================================ | 184 | ============================================ |
185 | 185 | ||
186 | When events are enabled the events that are triggering can be read from | 186 | When 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 | ||
195 | Documentation/trace/postprocess/trace-pagealloc-postprocess.pl is an example | 195 | Documentation/trace/postprocess/trace-pagealloc-postprocess.pl is an example |
196 | script that can read trace_pipe from STDIN or a copy of a trace. When used | 196 | script that can read trace_pipe from STDIN or a copy of a trace. When used |
197 | on-line, it can be interrupted once to generate a report without existing | 197 | on-line, it can be interrupted once to generate a report without exiting |
198 | and twice to exit. | 198 | and twice to exit. |
199 | 199 | ||
200 | Simplistically, the script just reads STDIN and counts up events but it | 200 | Simplistically, 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 | ||
215 | 6. Lower-Level Analysis with PCL | 215 | 7. Lower-Level Analysis with PCL |
216 | ================================ | 216 | ================================ |
217 | 217 | ||
218 | There may also be a requirement to identify what functions with a program | 218 | There may also be a requirement to identify what functions within a program |
219 | were generating events within the kernel. To begin this sort of analysis, the | 219 | were generating events within the kernel. To begin this sort of analysis, the |
220 | data must be recorded. At the time of writing, this required root | 220 | data 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 | ||
256 | According to this, the vast majority of events occured triggered on events | 256 | According to this, the vast majority of events triggered on events |
257 | within the VDSO. With simple binaries, this will often be the case so lets | 257 | within the VDSO. With simple binaries, this will often be the case so let's |
258 | take a slightly different example. In the course of writing this, it was | 258 | take a slightly different example. In the course of writing this, it was |
259 | noticed that X was generating an insane amount of page allocations so lets look | 259 | noticed that X was generating an insane amount of page allocations so let's look |
260 | at it | 260 | at 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 | ||
283 | So, almost half of the events are occuring in a library. To get an idea which | 283 | So, almost half of the events are occurring in a library. To get an idea which |
284 | symbol. | 284 | symbol: |
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 | ||
300 | To see where within the function pixmanFillsse2 things are going wrong | 300 | To 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 | ||
74 | Dynamic suspends can occur in two ways: manual and automatic. | 74 | Dynamic suspends occur when the kernel decides to suspend an idle |
75 | "Manual" means that the user has told the kernel to suspend a device, | 75 | device. This is called "autosuspend" for short. In general, a device |
76 | whereas "automatic" means that the kernel has decided all by itself to | 76 | won't be autosuspended unless it has been idle for some minimum period |
77 | suspend a device. Automatic suspend is called "autosuspend" for | 77 | of time, the so-called idle-delay time. |
78 | short. In general, a device won't be autosuspended unless it has been | ||
79 | idle for some minimum period of time, the so-called idle-delay time. | ||
80 | 78 | ||
81 | Of course, nothing the kernel does on its own initiative should | 79 | Of course, nothing the kernel does on its own initiative should |
82 | prevent the computer or its devices from working properly. If a | 80 | prevent the computer or its devices from working properly. If a |
@@ -96,10 +94,11 @@ idle. | |||
96 | We can categorize power management events in two broad classes: | 94 | We can categorize power management events in two broad classes: |
97 | external and internal. External events are those triggered by some | 95 | external and internal. External events are those triggered by some |
98 | agent outside the USB stack: system suspend/resume (triggered by | 96 | agent outside the USB stack: system suspend/resume (triggered by |
99 | userspace), manual dynamic suspend/resume (also triggered by | 97 | userspace), manual dynamic resume (also triggered by userspace), and |
100 | userspace), and remote wakeup (triggered by the device). Internal | 98 | remote wakeup (triggered by the device). Internal events are those |
101 | events are those triggered within the USB stack: autosuspend and | 99 | triggered within the USB stack: autosuspend and autoresume. Note that |
102 | autoresume. | 100 | all dynamic suspend events are internal; external agents are not |
101 | allowed 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 | ||
152 | Writing "-1" to power/autosuspend and writing "on" to power/level do | 151 | Writing "-1" to power/autosuspend and writing "on" to power/level do |
153 | essentially the same thing -- they both prevent the device from being | 152 | essentially 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 | |||
377 | routine is automatically set up to carry out the operation when the | 376 | routine is automatically set up to carry out the operation when the |
378 | autosuspend idle-delay has expired. | 377 | autosuspend idle-delay has expired. |
379 | 378 | ||
380 | Autoresume attempts also can fail. This will happen if power/level is | 379 | Autoresume attempts also can fail, although failure would mean that |
381 | set to "suspend" or if the device doesn't manage to resume properly. | 380 | the device is no longer present or operating properly. Unlike |
382 | Unlike autosuspend, there's no delay for an autoresume. | 381 | autosuspend, 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 | |||
527 | resume as soon as the system suspend is complete. Or the remote | 526 | resume as soon as the system suspend is complete. Or the remote |
528 | wakeup may fail and get lost. Which outcome occurs depends on timing | 527 | wakeup may fail and get lost. Which outcome occurs depends on timing |
529 | and on the hardware and firmware design. | 528 | and on the hardware and firmware design. |
530 | |||
531 | More interestingly, a device might undergo a manual resume or | ||
532 | autoresume during system suspend. With current kernels this shouldn't | ||
533 | happen, because manual resumes must be initiated by userspace and | ||
534 | autoresumes happen in response to I/O requests, but all user processes | ||
535 | and I/O should be quiescent during a system suspend -- thanks to the | ||
536 | freezer. However there are plans to do away with the freezer, which | ||
537 | would mean these things would become possible. If and when this comes | ||
538 | about, the USB core will carefully arrange matters so that either type | ||
539 | of 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 | ||
105 | To use the vga arbiter char device it was implemented an API inside the | 105 | To use the vga arbiter char device it was implemented an API inside the |
106 | libpciaccess library. One fieldd was added to struct pci_device (each device | 106 | libpciaccess library. One field was added to struct pci_device (each device |
107 | on the system): | 107 | on 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 | |||
12 | spca501 040a:0002 Kodak DVC-325 | 12 | spca501 040a:0002 Kodak DVC-325 |
13 | spca500 040a:0300 Kodak EZ200 | 13 | spca500 040a:0300 Kodak EZ200 |
14 | zc3xx 041e:041e Creative WebCam Live! | 14 | zc3xx 041e:041e Creative WebCam Live! |
15 | ov519 041e:4003 Video Blaster WebCam Go Plus | ||
15 | spca500 041e:400a Creative PC-CAM 300 | 16 | spca500 041e:400a Creative PC-CAM 300 |
16 | sunplus 041e:400b Creative PC-CAM 600 | 17 | sunplus 041e:400b Creative PC-CAM 600 |
17 | sunplus 041e:4012 PC-Cam350 | 18 | sunplus 041e:4012 PC-Cam350 |
@@ -168,10 +169,14 @@ sunplus 055f:c650 Mustek MDC5500Z | |||
168 | zc3xx 055f:d003 Mustek WCam300A | 169 | zc3xx 055f:d003 Mustek WCam300A |
169 | zc3xx 055f:d004 Mustek WCam300 AN | 170 | zc3xx 055f:d004 Mustek WCam300 AN |
170 | conex 0572:0041 Creative Notebook cx11646 | 171 | conex 0572:0041 Creative Notebook cx11646 |
172 | ov519 05a9:0511 Video Blaster WebCam 3/WebCam Plus, D-Link USB Digital Video Camera | ||
173 | ov519 05a9:0518 Creative WebCam | ||
171 | ov519 05a9:0519 OV519 Microphone | 174 | ov519 05a9:0519 OV519 Microphone |
172 | ov519 05a9:0530 OmniVision | 175 | ov519 05a9:0530 OmniVision |
176 | ov519 05a9:2800 OmniVision SuperCAM | ||
173 | ov519 05a9:4519 Webcam Classic | 177 | ov519 05a9:4519 Webcam Classic |
174 | ov519 05a9:8519 OmniVision | 178 | ov519 05a9:8519 OmniVision |
179 | ov519 05a9:a511 D-Link USB Digital Video Camera | ||
175 | ov519 05a9:a518 D-Link DSB-C310 Webcam | 180 | ov519 05a9:a518 D-Link DSB-C310 Webcam |
176 | sunplus 05da:1018 Digital Dream Enigma 1.3 | 181 | sunplus 05da:1018 Digital Dream Enigma 1.3 |
177 | stk014 05e1:0893 Syntek DV4000 | 182 | stk014 05e1:0893 Syntek DV4000 |
@@ -187,7 +192,7 @@ ov534 06f8:3002 Hercules Blog Webcam | |||
187 | ov534 06f8:3003 Hercules Dualpix HD Weblog | 192 | ov534 06f8:3003 Hercules Dualpix HD Weblog |
188 | sonixj 06f8:3004 Hercules Classic Silver | 193 | sonixj 06f8:3004 Hercules Classic Silver |
189 | sonixj 06f8:3008 Hercules Deluxe Optical Glass | 194 | sonixj 06f8:3008 Hercules Deluxe Optical Glass |
190 | pac7311 06f8:3009 Hercules Classic Link | 195 | pac7302 06f8:3009 Hercules Classic Link |
191 | spca508 0733:0110 ViewQuest VQ110 | 196 | spca508 0733:0110 ViewQuest VQ110 |
192 | spca501 0733:0401 Intel Create and Share | 197 | spca501 0733:0401 Intel Create and Share |
193 | spca501 0733:0402 ViewQuest M318B | 198 | spca501 0733:0402 ViewQuest M318B |
@@ -199,6 +204,7 @@ sunplus 0733:2221 Mercury Digital Pro 3.1p | |||
199 | sunplus 0733:3261 Concord 3045 spca536a | 204 | sunplus 0733:3261 Concord 3045 spca536a |
200 | sunplus 0733:3281 Cyberpix S550V | 205 | sunplus 0733:3281 Cyberpix S550V |
201 | spca506 0734:043b 3DeMon USB Capture aka | 206 | spca506 0734:043b 3DeMon USB Capture aka |
207 | ov519 0813:0002 Dual Mode USB Camera Plus | ||
202 | spca500 084d:0003 D-Link DSC-350 | 208 | spca500 084d:0003 D-Link DSC-350 |
203 | spca500 08ca:0103 Aiptek PocketDV | 209 | spca500 08ca:0103 Aiptek PocketDV |
204 | sunplus 08ca:0104 Aiptek PocketDVII 1.3 | 210 | sunplus 08ca:0104 Aiptek PocketDVII 1.3 |
@@ -236,15 +242,15 @@ pac7311 093a:2603 Philips SPC 500 NC | |||
236 | pac7311 093a:2608 Trust WB-3300p | 242 | pac7311 093a:2608 Trust WB-3300p |
237 | pac7311 093a:260e Gigaware VGA PC Camera, Trust WB-3350p, SIGMA cam 2350 | 243 | pac7311 093a:260e Gigaware VGA PC Camera, Trust WB-3350p, SIGMA cam 2350 |
238 | pac7311 093a:260f SnakeCam | 244 | pac7311 093a:260f SnakeCam |
239 | pac7311 093a:2620 Apollo AC-905 | 245 | pac7302 093a:2620 Apollo AC-905 |
240 | pac7311 093a:2621 PAC731x | 246 | pac7302 093a:2621 PAC731x |
241 | pac7311 093a:2622 Genius Eye 312 | 247 | pac7302 093a:2622 Genius Eye 312 |
242 | pac7311 093a:2624 PAC7302 | 248 | pac7302 093a:2624 PAC7302 |
243 | pac7311 093a:2626 Labtec 2200 | 249 | pac7302 093a:2626 Labtec 2200 |
244 | pac7311 093a:2628 Genius iLook 300 | 250 | pac7302 093a:2628 Genius iLook 300 |
245 | pac7311 093a:2629 Genious iSlim 300 | 251 | pac7302 093a:2629 Genious iSlim 300 |
246 | pac7311 093a:262a Webcam 300k | 252 | pac7302 093a:262a Webcam 300k |
247 | pac7311 093a:262c Philips SPC 230 NC | 253 | pac7302 093a:262c Philips SPC 230 NC |
248 | jeilinj 0979:0280 Sakar 57379 | 254 | jeilinj 0979:0280 Sakar 57379 |
249 | zc3xx 0ac8:0302 Z-star Vimicro zc0302 | 255 | zc3xx 0ac8:0302 Z-star Vimicro zc0302 |
250 | vc032x 0ac8:0321 Vimicro generic vc0321 | 256 | vc032x 0ac8:0321 Vimicro generic vc0321 |
@@ -259,6 +265,7 @@ vc032x 0ac8:c002 Sony embedded vimicro | |||
259 | vc032x 0ac8:c301 Samsung Q1 Ultra Premium | 265 | vc032x 0ac8:c301 Samsung Q1 Ultra Premium |
260 | spca508 0af9:0010 Hama USB Sightcam 100 | 266 | spca508 0af9:0010 Hama USB Sightcam 100 |
261 | spca508 0af9:0011 Hama USB Sightcam 100 | 267 | spca508 0af9:0011 Hama USB Sightcam 100 |
268 | ov519 0b62:0059 iBOT2 Webcam | ||
262 | sonixb 0c45:6001 Genius VideoCAM NB | 269 | sonixb 0c45:6001 Genius VideoCAM NB |
263 | sonixb 0c45:6005 Microdia Sweex Mini Webcam | 270 | sonixb 0c45:6005 Microdia Sweex Mini Webcam |
264 | sonixb 0c45:6007 Sonix sn9c101 + Tas5110D | 271 | sonixb 0c45:6007 Sonix sn9c101 + Tas5110D |
@@ -318,8 +325,10 @@ sn9c20x 0c45:62b3 PC Camera (SN9C202 + OV9655) | |||
318 | sn9c20x 0c45:62bb PC Camera (SN9C202 + OV7660) | 325 | sn9c20x 0c45:62bb PC Camera (SN9C202 + OV7660) |
319 | sn9c20x 0c45:62bc PC Camera (SN9C202 + HV7131R) | 326 | sn9c20x 0c45:62bc PC Camera (SN9C202 + HV7131R) |
320 | sunplus 0d64:0303 Sunplus FashionCam DXG | 327 | sunplus 0d64:0303 Sunplus FashionCam DXG |
328 | ov519 0e96:c001 TRUST 380 USB2 SPACEC@M | ||
321 | etoms 102c:6151 Qcam Sangha CIF | 329 | etoms 102c:6151 Qcam Sangha CIF |
322 | etoms 102c:6251 Qcam xxxxxx VGA | 330 | etoms 102c:6251 Qcam xxxxxx VGA |
331 | ov519 1046:9967 W9967CF/W9968CF WebCam IC, Video Blaster WebCam Go | ||
323 | zc3xx 10fd:0128 Typhoon Webshot II USB 300k 0x0128 | 332 | zc3xx 10fd:0128 Typhoon Webshot II USB 300k 0x0128 |
324 | spca561 10fd:7e50 FlyCam Usb 100 | 333 | spca561 10fd:7e50 FlyCam Usb 100 |
325 | zc3xx 10fd:8050 Typhoon Webshot II USB 300k | 334 | zc3xx 10fd:8050 Typhoon Webshot II USB 300k |
@@ -332,7 +341,12 @@ spca501 1776:501c Arowana 300K CMOS Camera | |||
332 | t613 17a1:0128 TASCORP JPEG Webcam, NGS Cyclops | 341 | t613 17a1:0128 TASCORP JPEG Webcam, NGS Cyclops |
333 | vc032x 17ef:4802 Lenovo Vc0323+MI1310_SOC | 342 | vc032x 17ef:4802 Lenovo Vc0323+MI1310_SOC |
334 | pac207 2001:f115 D-Link DSB-C120 | 343 | pac207 2001:f115 D-Link DSB-C120 |
344 | sq905c 2770:9050 sq905c | ||
345 | sq905c 2770:905c DualCamera | ||
346 | sq905 2770:9120 Argus Digital Camera DC1512 | ||
347 | sq905c 2770:913d sq905c | ||
335 | spca500 2899:012c Toptro Industrial | 348 | spca500 2899:012c Toptro Industrial |
349 | ov519 8020:ef04 ov519 | ||
336 | spca508 8086:0110 Intel Easy PC Camera | 350 | spca508 8086:0110 Intel Easy PC Camera |
337 | spca500 8086:0630 Intel Pocket PC Camera | 351 | spca500 8086:0630 Intel Pocket PC Camera |
338 | spca506 99fa:8988 Grandtec V.cap | 352 | spca506 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 | |||
4 | Terminology | ||
5 | ----------- | ||
6 | |||
7 | sensor scales: horizontal and vertical scales, configured by the sensor driver | ||
8 | host scales: -"- host driver | ||
9 | combined scales: sensor_scale * host_scale | ||
10 | |||
11 | |||
12 | Generic 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 | |||
39 | Produced by user requests: | ||
40 | |||
41 | S_CROP(left / top = (5) - (1), width / height = (5') - (5)) | ||
42 | S_FMT(width / height = (6') - (6)) | ||
43 | |||
44 | Here: | ||
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 | |||
57 | S_FMT | ||
58 | ----- | ||
59 | |||
60 | Do not touch input rectangle - it is already optimal. | ||
61 | |||
62 | 1. Calculate current sensor scales: | ||
63 | |||
64 | scale_s = ((3') - (3)) / ((2') - (2)) | ||
65 | |||
66 | 2. Calculate "effective" input crop (sensor subwindow) - CEU crop scaled back at | ||
67 | current sensor scales onto input window - this is user S_CROP: | ||
68 | |||
69 | width_u = (5') - (5) = ((4') - (4)) * scale_s | ||
70 | |||
71 | 3. Calculate new combined scales from "effective" input window to requested user | ||
72 | window: | ||
73 | |||
74 | scale_comb = width_u / ((6') - (6)) | ||
75 | |||
76 | 4. Calculate sensor output window by applying combined scales to real input | ||
77 | window: | ||
78 | |||
79 | width_s_out = ((2') - (2)) / scale_comb | ||
80 | |||
81 | 5. Apply iterative sensor S_FMT for sensor output window. | ||
82 | |||
83 | subdev->video_ops->s_fmt(.width = width_s_out) | ||
84 | |||
85 | 6. Retrieve sensor output window (g_fmt) | ||
86 | |||
87 | 7. Calculate new sensor scales: | ||
88 | |||
89 | scale_s_new = ((3')_new - (3)_new) / ((2') - (2)) | ||
90 | |||
91 | 8. 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 | |||
97 | 9. Use CEU cropping to crop to the new window: | ||
98 | |||
99 | ceu_crop(.width = width_ceu, .left = left_ceu) | ||
100 | |||
101 | 10. Use CEU scaling to scale to the requested user window: | ||
102 | |||
103 | scale_ceu = width_ceu / width | ||
104 | |||
105 | |||
106 | S_CROP | ||
107 | ------ | ||
108 | |||
109 | If old scale applied to new crop is invalid produce nearest new scale possible | ||
110 | |||
111 | 1. Calculate current combined scales. | ||
112 | |||
113 | scale_comb = (((4') - (4)) / ((6') - (6))) * (((2') - (2)) / ((3') - (3))) | ||
114 | |||
115 | 2. Apply iterative sensor S_CROP for new input window. | ||
116 | |||
117 | 3. If old combined scales applied to new crop produce an impossible user window, | ||
118 | adjust 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 | |||
127 | 4. Issue G_CROP to retrieve actual input window. | ||
128 | |||
129 | 5. Using actual input window and calculated combined scales calculate sensor | ||
130 | target output window. | ||
131 | |||
132 | width_s_out = ((3') - (3)) = ((2') - (2)) / scale_comb | ||
133 | |||
134 | 6. Apply iterative S_FMT for new sensor target output window. | ||
135 | |||
136 | 7. Issue G_FMT to retrieve the actual sensor output window. | ||
137 | |||
138 | 8. Calculate sensor scales. | ||
139 | |||
140 | scale_s = ((3') - (3)) / ((2') - (2)) | ||
141 | |||
142 | 9. Calculate sensor output subwindow to be cropped on CEU by applying sensor | ||
143 | scales to the requested window. | ||
144 | |||
145 | width_ceu = ((5') - (5)) / scale_s | ||
146 | |||
147 | 10. Use CEU cropping for above calculated window. | ||
148 | |||
149 | 11. Calculate CEU scales from sensor scales from results of (10) and user window | ||
150 | from (3) | ||
151 | |||
152 | scale_ceu = calc_scale(((5') - (5)), &width_u_out) | ||
153 | |||
154 | 12. Apply CEU scales. | ||
155 | |||
156 | -- | ||
157 | Author: 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 | ||
562 | There are a few useful helper functions: | 562 | There are a few useful helper functions: |
563 | 563 | ||
564 | - file/video_device private data | ||
565 | |||
564 | You can set/get driver private data in the video_device struct using: | 566 | You can set/get driver private data in the video_device struct using: |
565 | 567 | ||
566 | void *video_get_drvdata(struct video_device *vdev); | 568 | void *video_get_drvdata(struct video_device *vdev); |
@@ -575,8 +577,7 @@ struct video_device *video_devdata(struct file *file); | |||
575 | 577 | ||
576 | returns the video_device belonging to the file struct. | 578 | returns the video_device belonging to the file struct. |
577 | 579 | ||
578 | The final helper function combines video_get_drvdata with | 580 | The video_drvdata function combines video_get_drvdata with video_devdata: |
579 | video_devdata: | ||
580 | 581 | ||
581 | void *video_drvdata(struct file *file); | 582 | void *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 | ||
585 | struct v4l2_device *v4l2_dev = vdev->v4l2_dev; | 586 | struct v4l2_device *v4l2_dev = vdev->v4l2_dev; |
586 | 587 | ||
588 | - Device node name | ||
589 | |||
590 | The video_device node kernel name can be retrieved using | ||
591 | |||
592 | const char *video_device_node_name(struct video_device *vdev); | ||
593 | |||
594 | The name is used as a hint by userspace tools such as udev. The function | ||
595 | should be used where possible instead of accessing the video_device::num and | ||
596 | video_device::minor fields. | ||
597 | |||
598 | |||
587 | video buffer helper functions | 599 | video 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 | ||
13 | Users can use the huge page support in Linux kernel by either using the mmap | 13 | Users can use the huge page support in Linux kernel by either using the mmap |
14 | system call or standard SYSv shared memory system calls (shmget, shmat). | 14 | system call or standard SYSV shared memory system calls (shmget, shmat). |
15 | 15 | ||
16 | First the Linux kernel needs to be built with the CONFIG_HUGETLBFS | 16 | First 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 |
18 | automatically when CONFIG_HUGETLBFS is selected) configuration | 18 | automatically when CONFIG_HUGETLBFS is selected) configuration |
19 | options. | 19 | options. |
20 | 20 | ||
21 | The kernel built with huge page support should show the number of configured | 21 | The /proc/meminfo file provides information about the total number of |
22 | huge pages in the system by running the "cat /proc/meminfo" command. | 22 | persistent hugetlb pages in the kernel's huge page pool. It also displays |
23 | information about the number of free, reserved and surplus huge pages and the | ||
24 | default huge page size. The huge page size is needed for generating the | ||
25 | proper alignment and size of the arguments to system calls that map huge page | ||
26 | regions. | ||
23 | 27 | ||
24 | /proc/meminfo also provides information about the total number of hugetlb | 28 | The output of "cat /proc/meminfo" will include lines like: |
25 | pages configured in the kernel. It also displays information about the | ||
26 | number of free hugetlb pages at any time. It also displays information about | ||
27 | the configured huge page size - this is needed for generating the proper | ||
28 | alignment and size of the arguments to the above system calls. | ||
29 | |||
30 | The output of "cat /proc/meminfo" will have lines like: | ||
31 | 29 | ||
32 | ..... | 30 | ..... |
33 | HugePages_Total: vvv | 31 | HugePages_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 |
54 | in the kernel. | 52 | in 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 |
57 | pages in the kernel. Super user can dynamically request more (or free some | 55 | pages in the kernel's huge page pool. "Persistent" huge pages will be |
58 | pre-configured) huge pages. | 56 | returned to the huge page pool when freed by a task. A user with root |
59 | The allocation (or deallocation) of hugetlb pages is possible only if there are | 57 | privileges can dynamically allocate more or free some persistent huge pages |
60 | enough physically contiguous free pages in system (freeing of huge pages is | 58 | by increasing or decreasing the value of 'nr_hugepages'. |
61 | possible only if there are enough hugetlb pages free that can be transferred | ||
62 | back to regular memory pool). | ||
63 | 59 | ||
64 | Pages that are used as hugetlb pages are reserved inside the kernel and cannot | 60 | Pages that are used as huge pages are reserved inside the kernel and cannot |
65 | be used for other purposes. | 61 | be used for other purposes. Huge pages cannot be swapped out under |
62 | memory pressure. | ||
66 | 63 | ||
67 | Once the kernel with Hugetlb page support is built and running, a user can | 64 | Once a number of huge pages have been pre-allocated to the kernel huge page |
68 | use either the mmap system call or shared memory system calls to start using | 65 | pool, a user with appropriate privilege can use either the mmap system call |
69 | the huge pages. It is required that the system administrator preallocate | 66 | or shared memory system calls to use the huge pages. See the discussion of |
70 | enough memory for huge page purposes. | 67 | Using Huge Pages, below. |
71 | 68 | ||
72 | The administrator can preallocate huge pages on the kernel boot command line by | 69 | The administrator can allocate persistent huge pages on the kernel boot |
73 | specifying the "hugepages=N" parameter, where 'N' = the number of huge pages | 70 | command line by specifying the "hugepages=N" parameter, where 'N' = the |
74 | requested. This is the most reliable method for preallocating huge pages as | 71 | number of huge pages requested. This is the most reliable method of |
75 | memory has not yet become fragmented. | 72 | allocating huge pages as memory has not yet become fragmented. |
76 | 73 | ||
77 | Some platforms support multiple huge page sizes. To preallocate huge pages | 74 | Some platforms support multiple huge page sizes. To allocate huge pages |
78 | of a specific size, one must preceed the huge pages boot command parameters | 75 | of a specific size, one must preceed the huge pages boot command parameters |
79 | with a huge page size selection parameter "hugepagesz=<size>". <size> must | 76 | with a huge page size selection parameter "hugepagesz=<size>". <size> must |
80 | be specified in bytes with optional scale suffix [kKmMgG]. The default huge | 77 | be specified in bytes with optional scale suffix [kKmMgG]. The default huge |
81 | page size may be selected with the "default_hugepagesz=<size>" boot parameter. | 78 | page 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 | 80 | When multiple huge page sizes are supported, /proc/sys/vm/nr_hugepages |
84 | size] hugetlb pages in the kernel. Super user can dynamically request more | 81 | indicates the current number of pre-allocated huge pages of the default size. |
85 | (or free some pre-configured) huge pages. | 82 | Thus, one can use the following command to dynamically allocate/deallocate |
86 | 83 | default sized persistent huge pages: | |
87 | Use the following command to dynamically allocate/deallocate default sized | ||
88 | huge pages: | ||
89 | 84 | ||
90 | echo 20 > /proc/sys/vm/nr_hugepages | 85 | echo 20 > /proc/sys/vm/nr_hugepages |
91 | 86 | ||
92 | This command will try to configure 20 default sized huge pages in the system. | 87 | This command will try to adjust the number of default sized huge pages in the |
88 | huge page pool to 20, allocating or freeing huge pages, as required. | ||
89 | |||
93 | On a NUMA platform, the kernel will attempt to distribute the huge page pool | 90 | On a NUMA platform, the kernel will attempt to distribute the huge page pool |
94 | over the all on-line nodes. These huge pages, allocated when nr_hugepages | 91 | over all the set of allowed nodes specified by the NUMA memory policy of the |
95 | is increased, are called "persistent huge pages". | 92 | task that modifies nr_hugepages. The default for the allowed nodes--when the |
93 | task has default memory policy--is all on-line nodes with memory. Allowed | ||
94 | nodes with insufficient available, contiguous memory for a huge page will be | ||
95 | silently skipped when allocating persistent huge pages. See the discussion | ||
96 | below of the interaction of task memory policy, cpusets and per node attributes | ||
97 | with the allocation and freeing of persistent huge pages. | ||
96 | 98 | ||
97 | The success or failure of huge page allocation depends on the amount of | 99 | The success or failure of huge page allocation depends on the amount of |
98 | physically contiguous memory that is preset in system at the time of the | 100 | physically contiguous memory that is present in system at the time of the |
99 | allocation attempt. If the kernel is unable to allocate huge pages from | 101 | allocation attempt. If the kernel is unable to allocate huge pages from |
100 | some nodes in a NUMA system, it will attempt to make up the difference by | 102 | some nodes in a NUMA system, it will attempt to make up the difference by |
101 | allocating extra pages on other nodes with sufficient available contiguous | 103 | allocating extra pages on other nodes with sufficient available contiguous |
102 | memory, if any. | 104 | memory, if any. |
103 | 105 | ||
104 | System administrators may want to put this command in one of the local rc init | 106 | System administrators may want to put this command in one of the local rc |
105 | files. This will enable the kernel to request huge pages early in the boot | 107 | init files. This will enable the kernel to allocate huge pages early in |
106 | process when the possibility of getting physical contiguous pages is still | 108 | the boot process when the possibility of getting physical contiguous pages |
107 | very high. Administrators can verify the number of huge pages actually | 109 | is still very high. Administrators can verify the number of huge pages |
108 | allocated by checking the sysctl or meminfo. To check the per node | 110 | actually allocated by checking the sysctl or meminfo. To check the per node |
109 | distribution of huge pages in a NUMA system, use: | 111 | distribution 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 |
114 | huge pages can grow, if more huge pages than /proc/sys/vm/nr_hugepages are | 116 | huge pages can grow, if more huge pages than /proc/sys/vm/nr_hugepages are |
115 | requested by applications. Writing any non-zero value into this file | 117 | requested by applications. Writing any non-zero value into this file |
116 | indicates that the hugetlb subsystem is allowed to try to obtain "surplus" | 118 | indicates that the hugetlb subsystem is allowed to try to obtain that |
117 | huge pages from the buddy allocator, when the normal pool is exhausted. As | 119 | number of "surplus" huge pages from the kernel's normal page pool, when the |
118 | these surplus huge pages go out of use, they are freed back to the buddy | 120 | persistent huge page pool is exhausted. As these surplus huge pages become |
119 | allocator. | 121 | unused, they are freed back to the kernel's normal page pool. |
120 | 122 | ||
121 | When increasing the huge page pool size via nr_hugepages, any surplus | 123 | When increasing the huge page pool size via nr_hugepages, any existing surplus |
122 | pages will first be promoted to persistent huge pages. Then, additional | 124 | pages will first be promoted to persistent huge pages. Then, additional |
123 | huge pages will be allocated, if necessary and if possible, to fulfill | 125 | huge pages will be allocated, if necessary and if possible, to fulfill |
124 | the new huge page pool size. | 126 | the new persistent huge page pool size. |
125 | 127 | ||
126 | The administrator may shrink the pool of preallocated huge pages for | 128 | The administrator may shrink the pool of persistent huge pages for |
127 | the default huge page size by setting the nr_hugepages sysctl to a | 129 | the default huge page size by setting the nr_hugepages sysctl to a |
128 | smaller value. The kernel will attempt to balance the freeing of huge pages | 130 | smaller value. The kernel will attempt to balance the freeing of huge pages |
129 | across all on-line nodes. Any free huge pages on the selected nodes will | 131 | across all nodes in the memory policy of the task modifying nr_hugepages. |
130 | be freed back to the buddy allocator. | 132 | Any free huge pages on the selected nodes will be freed back to the kernel's |
131 | 133 | normal page pool. | |
132 | Caveat: Shrinking the pool via nr_hugepages such that it becomes less | 134 | |
133 | than the number of huge pages in use will convert the balance to surplus | 135 | Caveat: Shrinking the persistent huge page pool via nr_hugepages such that |
134 | huge pages even if it would exceed the overcommit value. As long as | 136 | it becomes less than the number of huge pages in use will convert the balance |
135 | this condition holds, however, no more surplus huge pages will be | 137 | of the in-use huge pages to surplus huge pages. This will occur even if |
136 | allowed on the system until one of the two sysctls are increased | 138 | the number of surplus pages it would exceed the overcommit value. As long as |
137 | sufficiently, or the surplus huge pages go out of use and are freed. | 139 | this condition holds--that is, until nr_hugepages+nr_overcommit_hugepages is |
140 | increased sufficiently, or the surplus huge pages go out of use and are freed-- | ||
141 | no more surplus huge pages will be allowed to be allocated. | ||
138 | 142 | ||
139 | With support for multiple huge page pools at run-time available, much of | 143 | With support for multiple huge page pools at run-time available, much of |
140 | the huge page userspace interface has been duplicated in sysfs. The above | 144 | the huge page userspace interface in /proc/sys/vm has been duplicated in sysfs. |
141 | information applies to the default huge page size which will be | 145 | The /proc interfaces discussed above have been retained for backwards |
142 | controlled by the /proc interfaces for backwards compatibility. The root | 146 | compatibility. The root huge page control directory in sysfs is: |
143 | huge page control directory in sysfs is: | ||
144 | 147 | ||
145 | /sys/kernel/mm/hugepages | 148 | /sys/kernel/mm/hugepages |
146 | 149 | ||
147 | For each huge page size supported by the running kernel, a subdirectory | 150 | For each huge page size supported by the running kernel, a subdirectory |
148 | will exist, of the form | 151 | will exist, of the form: |
149 | 152 | ||
150 | hugepages-${size}kB | 153 | hugepages-${size}kB |
151 | 154 | ||
152 | Inside each of these directories, the same set of files will exist: | 155 | Inside 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 | ||
160 | which function as described above for the default huge page-sized case. | 164 | which function as described above for the default huge page-sized case. |
161 | 165 | ||
166 | |||
167 | Interaction of Task Memory Policy with Huge Page Allocation/Freeing | ||
168 | |||
169 | Whether huge pages are allocated and freed via the /proc interface or | ||
170 | the /sysfs interface using the nr_hugepages_mempolicy attribute, the NUMA | ||
171 | nodes from which huge pages are allocated or freed are controlled by the | ||
172 | NUMA memory policy of the task that modifies the nr_hugepages_mempolicy | ||
173 | sysctl or attribute. When the nr_hugepages attribute is used, mempolicy | ||
174 | is ignored. | ||
175 | |||
176 | The recommended method to allocate or free huge pages to/from the kernel | ||
177 | huge 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 | |||
182 | or, more succinctly: | ||
183 | |||
184 | numactl -m <node-list> echo 20 >/proc/sys/vm/nr_hugepages_mempolicy | ||
185 | |||
186 | This will allocate or free abs(20 - nr_hugepages) to or from the nodes | ||
187 | specified in <node-list>, depending on whether number of persistent huge pages | ||
188 | is initially less than or greater than 20, respectively. No huge pages will be | ||
189 | allocated nor freed on any node not included in the specified <node-list>. | ||
190 | |||
191 | When adjusting the persistent hugepage count via nr_hugepages_mempolicy, any | ||
192 | memory policy mode--bind, preferred, local or interleave--may be used. The | ||
193 | resulting effect on persistent huge page allocation is as follows: | ||
194 | |||
195 | 1) 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 | |||
205 | 2) 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 | |||
215 | 3) 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 | |||
222 | 4) 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 | |||
228 | 5) Boot-time huge page allocation attempts to distribute the requested number | ||
229 | of huge pages over all on-lines nodes with memory. | ||
230 | |||
231 | Per Node Hugepages Attributes | ||
232 | |||
233 | A subset of the contents of the root huge page control directory in sysfs, | ||
234 | described above, will be replicated under each the system device of each | ||
235 | NUMA node with memory in: | ||
236 | |||
237 | /sys/devices/system/node/node[0-9]*/hugepages/ | ||
238 | |||
239 | Under this directory, the subdirectory for each supported huge page size | ||
240 | contains the following attribute files: | ||
241 | |||
242 | nr_hugepages | ||
243 | free_hugepages | ||
244 | surplus_hugepages | ||
245 | |||
246 | The free_' and surplus_' attribute files are read-only. They return the number | ||
247 | of free and surplus [overcommitted] huge pages, respectively, on the parent | ||
248 | node. | ||
249 | |||
250 | The nr_hugepages attribute returns the total number of huge pages on the | ||
251 | specified node. When this attribute is written, the number of persistent huge | ||
252 | pages on the parent node will be adjusted to the specified value, if sufficient | ||
253 | resources exist, regardless of the task's mempolicy or cpuset constraints. | ||
254 | |||
255 | Note that the number of overcommit and reserve pages remain global quantities, | ||
256 | as we don't know until fault time, when the faulting task's mempolicy is | ||
257 | applied, from which node the huge page allocation will be attempted. | ||
258 | |||
259 | |||
260 | Using Huge Pages | ||
261 | |||
162 | If the user applications are going to request huge pages using mmap system | 262 | If the user applications are going to request huge pages using mmap system |
163 | call, then it is required that system administrator mount a file system of | 263 | call, then it is required that system administrator mount a file system of |
164 | type hugetlbfs: | 264 | type 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 | ||
249 | int main(void) | 345 | int 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 | ||
329 | void check_bytes(char *addr) | 421 | void 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 | ||
93 | Testing: | 93 | Testing: |
94 | 94 | ||
95 | madvise(MADV_POISON, ....) | 95 | madvise(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 | ||
100 | hwpoison-inject module through debugfs | 100 | hwpoison-inject module through debugfs |
101 | /sys/debug/hwpoison/corrupt-pfn | ||
102 | 101 | ||
103 | Inject hwpoison fault at PFN echoed into this file | 102 | /sys/debug/hwpoison/ |
104 | 103 | ||
104 | corrupt-pfn | ||
105 | |||
106 | Inject hwpoison fault at PFN echoed into this file. This does | ||
107 | some early filtering to avoid corrupted unintended pages in test suites. | ||
108 | |||
109 | unpoison-pfn | ||
110 | |||
111 | Software-unpoison page at PFN echoed into this file. This | ||
112 | way a page can be reused again. | ||
113 | This only works for Linux injected failures, not for real | ||
114 | memory failures. | ||
115 | |||
116 | Note these injection interfaces are not stable and might change between | ||
117 | kernel versions | ||
118 | |||
119 | corrupt-filter-dev-major | ||
120 | corrupt-filter-dev-minor | ||
121 | |||
122 | Only handle memory failures to pages associated with the file system defined | ||
123 | by block device major/minor. -1U is the wildcard value. | ||
124 | This should be only used for testing with artificial injection. | ||
125 | |||
126 | corrupt-filter-memcg | ||
127 | |||
128 | Limit injection to pages owned by memgroup. Specified by inode number | ||
129 | of the memcg. | ||
130 | |||
131 | Example: | ||
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 | |||
143 | corrupt-filter-flags-mask | ||
144 | corrupt-filter-flags-value | ||
145 | |||
146 | When specified, only poison pages if ((page_flags & mask) == value). | ||
147 | This allows stress testing of many kinds of pages. The page_flags | ||
148 | are the same as in /proc/kpageflags. The flag bits are defined in | ||
149 | include/linux/kernel-page-flags.h and documented in | ||
150 | Documentation/vm/pagemap.txt | ||
105 | 151 | ||
106 | Architecture specific MCE injector | 152 | Architecture 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 | |||
16 | application which generates many instances of the same data. | 16 | application which generates many instances of the same data. |
17 | 17 | ||
18 | KSM only merges anonymous (private) pages, never pagecache (file) pages. | 18 | KSM only merges anonymous (private) pages, never pagecache (file) pages. |
19 | KSM's merged pages are at present locked into kernel memory for as long | 19 | KSM's merged pages were originally locked into kernel memory, but can now |
20 | as they are shared: so cannot be swapped out like the user pages they | 20 | be swapped out just like other user pages (but sharing is broken when they |
21 | replace (but swapping KSM pages should follow soon in a later release). | 21 | are swapped back in: ksmd must rediscover their identity and merge again). |
22 | 22 | ||
23 | KSM only operates on those areas of address space which an application | 23 | KSM only operates on those areas of address space which an application |
24 | has advised to be likely candidates for merging, by using the madvise(2) | 24 | has 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), | |||
44 | and might fail with EAGAIN if not enough memory for internal structures. | 44 | and might fail with EAGAIN if not enough memory for internal structures. |
45 | 45 | ||
46 | Applications should be considerate in their use of MADV_MERGEABLE, | 46 | Applications should be considerate in their use of MADV_MERGEABLE, |
47 | restricting its use to areas likely to benefit. KSM's scans may use | 47 | restricting its use to areas likely to benefit. KSM's scans may use a lot |
48 | a lot of processing power, and its kernel-resident pages are a limited | 48 | of processing power: some installations will disable KSM for that reason. |
49 | resource. Some installations will disable KSM for these reasons. | ||
50 | 49 | ||
51 | The KSM daemon is controlled by sysfs files in /sys/kernel/mm/ksm/, | 50 | The KSM daemon is controlled by sysfs files in /sys/kernel/mm/ksm/, |
52 | readable by all but writable only by root: | 51 | readable by all but writable only by root: |
53 | 52 | ||
54 | max_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 | |||
61 | pages_to_scan - how many present pages to scan before ksmd goes to sleep | 53 | pages_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 | ||
76 | The effectiveness of KSM and MADV_MERGEABLE is shown in /sys/kernel/mm/ksm/: | 68 | The effectiveness of KSM and MADV_MERGEABLE is shown in /sys/kernel/mm/ksm/: |
77 | 69 | ||
78 | pages_shared - how many shared unswappable kernel pages KSM is using | 70 | pages_shared - how many shared pages are being used |
79 | pages_sharing - how many more sites are sharing them i.e. how much saved | 71 | pages_sharing - how many more sites are sharing them i.e. how much saved |
80 | pages_unshared - how many pages unique but repeatedly checked for merging | 72 | pages_unshared - how many pages unique but repeatedly checked for merging |
81 | pages_volatile - how many pages changing too fast to be placed in a tree | 73 | pages_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 | |||
87 | proportion there would also indicate poor use of madvise MADV_MERGEABLE. | 79 | proportion there would also indicate poor use of madvise MADV_MERGEABLE. |
88 | 80 | ||
89 | Izik Eidus, | 81 | Izik Eidus, |
90 | Hugh Dickins, 24 Sept 2009 | 82 | Hugh 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 | ||
103 | static char *page_flag_names[] = { | 114 | static 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; | |||
173 | static int opt_hwpoison; | 184 | static int opt_hwpoison; |
174 | static int opt_unpoison; | 185 | static int opt_unpoison; |
175 | 186 | ||
176 | static char *hwpoison_debug_fs = "/debug/hwpoison"; | 187 | static const char hwpoison_debug_fs[] = "/debug/hwpoison"; |
177 | static int hwpoison_inject_fd; | 188 | static int hwpoison_inject_fd; |
178 | static int hwpoison_forget_fd; | 189 | static 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 | ||
903 | static 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 | ||
888 | static struct option opts[] = { | 913 | static 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; |