diff options
author | Jiri Kosina <jkosina@suse.cz> | 2012-04-08 15:48:52 -0400 |
---|---|---|
committer | Jiri Kosina <jkosina@suse.cz> | 2012-04-08 15:48:52 -0400 |
commit | e75d660672ddd11704b7f0fdb8ff21968587b266 (patch) | |
tree | ccb9c107744c10b553c0373e450bee3971d16c00 /Documentation | |
parent | 61282f37927143e45b03153f3e7b48d6b702147a (diff) | |
parent | 0034102808e0dbbf3a2394b82b1bb40b5778de9e (diff) |
Merge branch 'master' into for-next
Merge with latest Linus' tree, as I have incoming patches
that fix code that is newer than current HEAD of for-next.
Conflicts:
drivers/net/ethernet/realtek/r8169.c
Diffstat (limited to 'Documentation')
256 files changed, 9989 insertions, 2648 deletions
diff --git a/Documentation/00-INDEX b/Documentation/00-INDEX index a1a643272883..2214f123a976 100644 --- a/Documentation/00-INDEX +++ b/Documentation/00-INDEX | |||
@@ -104,6 +104,8 @@ cpuidle/ | |||
104 | - info on CPU_IDLE, CPU idle state management subsystem. | 104 | - info on CPU_IDLE, CPU idle state management subsystem. |
105 | cputopology.txt | 105 | cputopology.txt |
106 | - documentation on how CPU topology info is exported via sysfs. | 106 | - documentation on how CPU topology info is exported via sysfs. |
107 | crc32.txt | ||
108 | - brief tutorial on CRC computation | ||
107 | cris/ | 109 | cris/ |
108 | - directory with info about Linux on CRIS architecture. | 110 | - directory with info about Linux on CRIS architecture. |
109 | crypto/ | 111 | crypto/ |
diff --git a/Documentation/ABI/removed/devfs b/Documentation/ABI/removed/devfs index 8ffd28bf6598..0020c49933c4 100644 --- a/Documentation/ABI/removed/devfs +++ b/Documentation/ABI/removed/devfs | |||
@@ -1,6 +1,6 @@ | |||
1 | What: devfs | 1 | What: devfs |
2 | Date: July 2005 (scheduled), finally removed in kernel v2.6.18 | 2 | Date: July 2005 (scheduled), finally removed in kernel v2.6.18 |
3 | Contact: Greg Kroah-Hartman <gregkh@suse.de> | 3 | Contact: Greg Kroah-Hartman <gregkh@linuxfoundation.org> |
4 | Description: | 4 | Description: |
5 | devfs has been unmaintained for a number of years, has unfixable | 5 | devfs has been unmaintained for a number of years, has unfixable |
6 | races, contains a naming policy within the kernel that is | 6 | races, contains a naming policy within the kernel that is |
diff --git a/Documentation/ABI/stable/sysfs-driver-usb-usbtmc b/Documentation/ABI/stable/sysfs-driver-usb-usbtmc index 9a75fb22187d..2a7f9a00cb0a 100644 --- a/Documentation/ABI/stable/sysfs-driver-usb-usbtmc +++ b/Documentation/ABI/stable/sysfs-driver-usb-usbtmc | |||
@@ -1,7 +1,7 @@ | |||
1 | What: /sys/bus/usb/drivers/usbtmc/devices/*/interface_capabilities | 1 | What: /sys/bus/usb/drivers/usbtmc/devices/*/interface_capabilities |
2 | What: /sys/bus/usb/drivers/usbtmc/devices/*/device_capabilities | 2 | What: /sys/bus/usb/drivers/usbtmc/devices/*/device_capabilities |
3 | Date: August 2008 | 3 | Date: August 2008 |
4 | Contact: Greg Kroah-Hartman <gregkh@suse.de> | 4 | Contact: Greg Kroah-Hartman <gregkh@linuxfoundation.org> |
5 | Description: | 5 | Description: |
6 | These files show the various USB TMC capabilities as described | 6 | These files show the various USB TMC capabilities as described |
7 | by the device itself. The full description of the bitfields | 7 | by the device itself. The full description of the bitfields |
@@ -15,7 +15,7 @@ Description: | |||
15 | What: /sys/bus/usb/drivers/usbtmc/devices/*/usb488_interface_capabilities | 15 | What: /sys/bus/usb/drivers/usbtmc/devices/*/usb488_interface_capabilities |
16 | What: /sys/bus/usb/drivers/usbtmc/devices/*/usb488_device_capabilities | 16 | What: /sys/bus/usb/drivers/usbtmc/devices/*/usb488_device_capabilities |
17 | Date: August 2008 | 17 | Date: August 2008 |
18 | Contact: Greg Kroah-Hartman <gregkh@suse.de> | 18 | Contact: Greg Kroah-Hartman <gregkh@linuxfoundation.org> |
19 | Description: | 19 | Description: |
20 | These files show the various USB TMC capabilities as described | 20 | These files show the various USB TMC capabilities as described |
21 | by the device itself. The full description of the bitfields | 21 | by the device itself. The full description of the bitfields |
@@ -29,7 +29,7 @@ Description: | |||
29 | 29 | ||
30 | What: /sys/bus/usb/drivers/usbtmc/devices/*/TermChar | 30 | What: /sys/bus/usb/drivers/usbtmc/devices/*/TermChar |
31 | Date: August 2008 | 31 | Date: August 2008 |
32 | Contact: Greg Kroah-Hartman <gregkh@suse.de> | 32 | Contact: Greg Kroah-Hartman <gregkh@linuxfoundation.org> |
33 | Description: | 33 | Description: |
34 | This file is the TermChar value to be sent to the USB TMC | 34 | This file is the TermChar value to be sent to the USB TMC |
35 | device as described by the document, "Universal Serial Bus Test | 35 | device as described by the document, "Universal Serial Bus Test |
@@ -42,7 +42,7 @@ Description: | |||
42 | 42 | ||
43 | What: /sys/bus/usb/drivers/usbtmc/devices/*/TermCharEnabled | 43 | What: /sys/bus/usb/drivers/usbtmc/devices/*/TermCharEnabled |
44 | Date: August 2008 | 44 | Date: August 2008 |
45 | Contact: Greg Kroah-Hartman <gregkh@suse.de> | 45 | Contact: Greg Kroah-Hartman <gregkh@linuxfoundation.org> |
46 | Description: | 46 | Description: |
47 | This file determines if the TermChar is to be sent to the | 47 | This file determines if the TermChar is to be sent to the |
48 | device on every transaction or not. For more details about | 48 | device on every transaction or not. For more details about |
@@ -53,9 +53,9 @@ Description: | |||
53 | 53 | ||
54 | What: /sys/bus/usb/drivers/usbtmc/devices/*/auto_abort | 54 | What: /sys/bus/usb/drivers/usbtmc/devices/*/auto_abort |
55 | Date: August 2008 | 55 | Date: August 2008 |
56 | Contact: Greg Kroah-Hartman <gregkh@suse.de> | 56 | Contact: Greg Kroah-Hartman <gregkh@linuxfoundation.org> |
57 | Description: | 57 | Description: |
58 | This file determines if the the transaction of the USB TMC | 58 | This file determines if the transaction of the USB TMC |
59 | device is to be automatically aborted if there is any error. | 59 | device is to be automatically aborted if there is any error. |
60 | For more details about this, please see the document, | 60 | For more details about this, please see the document, |
61 | "Universal Serial Bus Test and Measurement Class Specification | 61 | "Universal Serial Bus Test and Measurement Class Specification |
diff --git a/Documentation/ABI/testing/debugfs-olpc b/Documentation/ABI/testing/debugfs-olpc new file mode 100644 index 000000000000..bd76cc6d55f9 --- /dev/null +++ b/Documentation/ABI/testing/debugfs-olpc | |||
@@ -0,0 +1,16 @@ | |||
1 | What: /sys/kernel/debug/olpc-ec/cmd | ||
2 | Date: Dec 2011 | ||
3 | KernelVersion: 3.4 | ||
4 | Contact: devel@lists.laptop.org | ||
5 | Description: | ||
6 | |||
7 | A generic interface for executing OLPC Embedded Controller commands and | ||
8 | reading their responses. | ||
9 | |||
10 | To execute a command, write data with the format: CC:N A A A A | ||
11 | CC is the (hex) command, N is the count of expected reply bytes, and A A A A | ||
12 | are optional (hex) arguments. | ||
13 | |||
14 | To read the response (if any), read from the generic node after executing | ||
15 | a command. Hex reply bytes will be returned, *whether or not* they came from | ||
16 | the immediately previous command. | ||
diff --git a/Documentation/ABI/testing/sysfs-block-dm b/Documentation/ABI/testing/sysfs-block-dm new file mode 100644 index 000000000000..87ca5691e29b --- /dev/null +++ b/Documentation/ABI/testing/sysfs-block-dm | |||
@@ -0,0 +1,25 @@ | |||
1 | What: /sys/block/dm-<num>/dm/name | ||
2 | Date: January 2009 | ||
3 | KernelVersion: 2.6.29 | ||
4 | Contact: dm-devel@redhat.com | ||
5 | Description: Device-mapper device name. | ||
6 | Read-only string containing mapped device name. | ||
7 | Users: util-linux, device-mapper udev rules | ||
8 | |||
9 | What: /sys/block/dm-<num>/dm/uuid | ||
10 | Date: January 2009 | ||
11 | KernelVersion: 2.6.29 | ||
12 | Contact: dm-devel@redhat.com | ||
13 | Description: Device-mapper device UUID. | ||
14 | Read-only string containing DM-UUID or empty string | ||
15 | if DM-UUID is not set. | ||
16 | Users: util-linux, device-mapper udev rules | ||
17 | |||
18 | What: /sys/block/dm-<num>/dm/suspended | ||
19 | Date: June 2009 | ||
20 | KernelVersion: 2.6.31 | ||
21 | Contact: dm-devel@redhat.com | ||
22 | Description: Device-mapper device suspend state. | ||
23 | Contains the value 1 while the device is suspended. | ||
24 | Otherwise it contains 0. Read-only attribute. | ||
25 | Users: util-linux, device-mapper udev rules | ||
diff --git a/Documentation/ABI/testing/sysfs-bus-event_source-devices-format b/Documentation/ABI/testing/sysfs-bus-event_source-devices-format new file mode 100644 index 000000000000..079afc71363d --- /dev/null +++ b/Documentation/ABI/testing/sysfs-bus-event_source-devices-format | |||
@@ -0,0 +1,14 @@ | |||
1 | Where: /sys/bus/event_source/devices/<dev>/format | ||
2 | Date: January 2012 | ||
3 | Kernel Version: 3.3 | ||
4 | Contact: Jiri Olsa <jolsa@redhat.com> | ||
5 | Description: | ||
6 | Attribute group to describe the magic bits that go into | ||
7 | perf_event_attr::config[012] for a particular pmu. | ||
8 | Each attribute of this group defines the 'hardware' bitmask | ||
9 | we want to export, so that userspace can deal with sane | ||
10 | name/value pairs. | ||
11 | |||
12 | Example: 'config1:1,6-10,44' | ||
13 | Defines contents of attribute that occupies bits 1,6-10,44 of | ||
14 | perf_event_attr::config1. | ||
diff --git a/Documentation/ABI/testing/sysfs-bus-rpmsg b/Documentation/ABI/testing/sysfs-bus-rpmsg new file mode 100644 index 000000000000..189e419a5a2d --- /dev/null +++ b/Documentation/ABI/testing/sysfs-bus-rpmsg | |||
@@ -0,0 +1,75 @@ | |||
1 | What: /sys/bus/rpmsg/devices/.../name | ||
2 | Date: June 2011 | ||
3 | KernelVersion: 3.3 | ||
4 | Contact: Ohad Ben-Cohen <ohad@wizery.com> | ||
5 | Description: | ||
6 | Every rpmsg device is a communication channel with a remote | ||
7 | processor. Channels are identified with a (textual) name, | ||
8 | which is maximum 32 bytes long (defined as RPMSG_NAME_SIZE in | ||
9 | rpmsg.h). | ||
10 | |||
11 | This sysfs entry contains the name of this channel. | ||
12 | |||
13 | What: /sys/bus/rpmsg/devices/.../src | ||
14 | Date: June 2011 | ||
15 | KernelVersion: 3.3 | ||
16 | Contact: Ohad Ben-Cohen <ohad@wizery.com> | ||
17 | Description: | ||
18 | Every rpmsg device is a communication channel with a remote | ||
19 | processor. Channels have a local ("source") rpmsg address, | ||
20 | and remote ("destination") rpmsg address. When an entity | ||
21 | starts listening on one end of a channel, it assigns it with | ||
22 | a unique rpmsg address (a 32 bits integer). This way when | ||
23 | inbound messages arrive to this address, the rpmsg core | ||
24 | dispatches them to the listening entity (a kernel driver). | ||
25 | |||
26 | This sysfs entry contains the src (local) rpmsg address | ||
27 | of this channel. If it contains 0xffffffff, then an address | ||
28 | wasn't assigned (can happen if no driver exists for this | ||
29 | channel). | ||
30 | |||
31 | What: /sys/bus/rpmsg/devices/.../dst | ||
32 | Date: June 2011 | ||
33 | KernelVersion: 3.3 | ||
34 | Contact: Ohad Ben-Cohen <ohad@wizery.com> | ||
35 | Description: | ||
36 | Every rpmsg device is a communication channel with a remote | ||
37 | processor. Channels have a local ("source") rpmsg address, | ||
38 | and remote ("destination") rpmsg address. When an entity | ||
39 | starts listening on one end of a channel, it assigns it with | ||
40 | a unique rpmsg address (a 32 bits integer). This way when | ||
41 | inbound messages arrive to this address, the rpmsg core | ||
42 | dispatches them to the listening entity. | ||
43 | |||
44 | This sysfs entry contains the dst (remote) rpmsg address | ||
45 | of this channel. If it contains 0xffffffff, then an address | ||
46 | wasn't assigned (can happen if the kernel driver that | ||
47 | is attached to this channel is exposing a service to the | ||
48 | remote processor. This make it a local rpmsg server, | ||
49 | and it is listening for inbound messages that may be sent | ||
50 | from any remote rpmsg client; it is not bound to a single | ||
51 | remote entity). | ||
52 | |||
53 | What: /sys/bus/rpmsg/devices/.../announce | ||
54 | Date: June 2011 | ||
55 | KernelVersion: 3.3 | ||
56 | Contact: Ohad Ben-Cohen <ohad@wizery.com> | ||
57 | Description: | ||
58 | Every rpmsg device is a communication channel with a remote | ||
59 | processor. Channels are identified by a textual name (see | ||
60 | /sys/bus/rpmsg/devices/.../name above) and have a local | ||
61 | ("source") rpmsg address, and remote ("destination") rpmsg | ||
62 | address. | ||
63 | |||
64 | A channel is first created when an entity, whether local | ||
65 | or remote, starts listening on it for messages (and is thus | ||
66 | called an rpmsg server). | ||
67 | |||
68 | When that happens, a "name service" announcement is sent | ||
69 | to the other processor, in order to let it know about the | ||
70 | creation of the channel (this way remote clients know they | ||
71 | can start sending messages). | ||
72 | |||
73 | This sysfs entry tells us whether the channel is a local | ||
74 | server channel that is announced (values are either | ||
75 | true or false). | ||
diff --git a/Documentation/ABI/testing/sysfs-bus-usb b/Documentation/ABI/testing/sysfs-bus-usb index b4f548792e32..7c22a532fdfb 100644 --- a/Documentation/ABI/testing/sysfs-bus-usb +++ b/Documentation/ABI/testing/sysfs-bus-usb | |||
@@ -182,3 +182,14 @@ Description: | |||
182 | USB2 hardware LPM is enabled for the device. Developer can | 182 | USB2 hardware LPM is enabled for the device. Developer can |
183 | write y/Y/1 or n/N/0 to the file to enable/disable the | 183 | write y/Y/1 or n/N/0 to the file to enable/disable the |
184 | feature. | 184 | feature. |
185 | |||
186 | What: /sys/bus/usb/devices/.../removable | ||
187 | Date: February 2012 | ||
188 | Contact: Matthew Garrett <mjg@redhat.com> | ||
189 | Description: | ||
190 | Some information about whether a given USB device is | ||
191 | physically fixed to the platform can be inferred from a | ||
192 | combination of hub decriptor bits and platform-specific data | ||
193 | such as ACPI. This file will read either "removable" or | ||
194 | "fixed" if the information is available, and "unknown" | ||
195 | otherwise. \ No newline at end of file | ||
diff --git a/Documentation/ABI/testing/sysfs-class b/Documentation/ABI/testing/sysfs-class index 4b0cb891e46e..676530fcf747 100644 --- a/Documentation/ABI/testing/sysfs-class +++ b/Documentation/ABI/testing/sysfs-class | |||
@@ -1,6 +1,6 @@ | |||
1 | What: /sys/class/ | 1 | What: /sys/class/ |
2 | Date: Febuary 2006 | 2 | Date: Febuary 2006 |
3 | Contact: Greg Kroah-Hartman <gregkh@suse.de> | 3 | Contact: Greg Kroah-Hartman <gregkh@linuxfoundation.org> |
4 | Description: | 4 | Description: |
5 | The /sys/class directory will consist of a group of | 5 | The /sys/class directory will consist of a group of |
6 | subdirectories describing individual classes of devices | 6 | subdirectories describing individual classes of devices |
diff --git a/Documentation/ABI/testing/sysfs-class-net-mesh b/Documentation/ABI/testing/sysfs-class-net-mesh index b02001488eef..b218e0f8bdb3 100644 --- a/Documentation/ABI/testing/sysfs-class-net-mesh +++ b/Documentation/ABI/testing/sysfs-class-net-mesh | |||
@@ -65,6 +65,13 @@ Description: | |||
65 | Defines the penalty which will be applied to an | 65 | Defines the penalty which will be applied to an |
66 | originator message's tq-field on every hop. | 66 | originator message's tq-field on every hop. |
67 | 67 | ||
68 | What: /sys/class/net/<mesh_iface>/mesh/routing_algo | ||
69 | Date: Dec 2011 | ||
70 | Contact: Marek Lindner <lindner_marek@yahoo.de> | ||
71 | Description: | ||
72 | Defines the routing procotol this mesh instance | ||
73 | uses to find the optimal paths through the mesh. | ||
74 | |||
68 | What: /sys/class/net/<mesh_iface>/mesh/vis_mode | 75 | What: /sys/class/net/<mesh_iface>/mesh/vis_mode |
69 | Date: May 2010 | 76 | Date: May 2010 |
70 | Contact: Marek Lindner <lindner_marek@yahoo.de> | 77 | Contact: Marek Lindner <lindner_marek@yahoo.de> |
diff --git a/Documentation/ABI/testing/sysfs-devices b/Documentation/ABI/testing/sysfs-devices index 6a25671ee5f6..5fcc94358b8d 100644 --- a/Documentation/ABI/testing/sysfs-devices +++ b/Documentation/ABI/testing/sysfs-devices | |||
@@ -1,6 +1,6 @@ | |||
1 | What: /sys/devices | 1 | What: /sys/devices |
2 | Date: February 2006 | 2 | Date: February 2006 |
3 | Contact: Greg Kroah-Hartman <gregkh@suse.de> | 3 | Contact: Greg Kroah-Hartman <gregkh@linuxfoundation.org> |
4 | Description: | 4 | Description: |
5 | The /sys/devices tree contains a snapshot of the | 5 | The /sys/devices tree contains a snapshot of the |
6 | internal state of the kernel device tree. Devices will | 6 | internal state of the kernel device tree. Devices will |
diff --git a/Documentation/ABI/testing/sysfs-devices-power b/Documentation/ABI/testing/sysfs-devices-power index 8ffbc25376a0..840f7d64d483 100644 --- a/Documentation/ABI/testing/sysfs-devices-power +++ b/Documentation/ABI/testing/sysfs-devices-power | |||
@@ -165,3 +165,21 @@ Description: | |||
165 | 165 | ||
166 | Not all drivers support this attribute. If it isn't supported, | 166 | Not all drivers support this attribute. If it isn't supported, |
167 | attempts to read or write it will yield I/O errors. | 167 | attempts to read or write it will yield I/O errors. |
168 | |||
169 | What: /sys/devices/.../power/pm_qos_latency_us | ||
170 | Date: March 2012 | ||
171 | Contact: Rafael J. Wysocki <rjw@sisk.pl> | ||
172 | Description: | ||
173 | The /sys/devices/.../power/pm_qos_resume_latency_us attribute | ||
174 | contains the PM QoS resume latency limit for the given device, | ||
175 | which is the maximum allowed time it can take to resume the | ||
176 | device, after it has been suspended at run time, from a resume | ||
177 | request to the moment the device will be ready to process I/O, | ||
178 | in microseconds. If it is equal to 0, however, this means that | ||
179 | the PM QoS resume latency may be arbitrary. | ||
180 | |||
181 | Not all drivers support this attribute. If it isn't supported, | ||
182 | it is not present. | ||
183 | |||
184 | This attribute has no effect on system-wide suspend/resume and | ||
185 | hibernation. | ||
diff --git a/Documentation/ABI/testing/sysfs-devices-soc b/Documentation/ABI/testing/sysfs-devices-soc new file mode 100644 index 000000000000..6d9cc253f2b2 --- /dev/null +++ b/Documentation/ABI/testing/sysfs-devices-soc | |||
@@ -0,0 +1,58 @@ | |||
1 | What: /sys/devices/socX | ||
2 | Date: January 2012 | ||
3 | contact: Lee Jones <lee.jones@linaro.org> | ||
4 | Description: | ||
5 | The /sys/devices/ directory contains a sub-directory for each | ||
6 | System-on-Chip (SoC) device on a running platform. Information | ||
7 | regarding each SoC can be obtained by reading sysfs files. This | ||
8 | functionality is only available if implemented by the platform. | ||
9 | |||
10 | The directory created for each SoC will also house information | ||
11 | about devices which are commonly contained in /sys/devices/platform. | ||
12 | It has been agreed that if an SoC device exists, its supported | ||
13 | devices would be better suited to appear as children of that SoC. | ||
14 | |||
15 | What: /sys/devices/socX/machine | ||
16 | Date: January 2012 | ||
17 | contact: Lee Jones <lee.jones@linaro.org> | ||
18 | Description: | ||
19 | Read-only attribute common to all SoCs. Contains the SoC machine | ||
20 | name (e.g. Ux500). | ||
21 | |||
22 | What: /sys/devices/socX/family | ||
23 | Date: January 2012 | ||
24 | contact: Lee Jones <lee.jones@linaro.org> | ||
25 | Description: | ||
26 | Read-only attribute common to all SoCs. Contains SoC family name | ||
27 | (e.g. DB8500). | ||
28 | |||
29 | What: /sys/devices/socX/soc_id | ||
30 | Date: January 2012 | ||
31 | contact: Lee Jones <lee.jones@linaro.org> | ||
32 | Description: | ||
33 | Read-only attribute supported by most SoCs. In the case of | ||
34 | ST-Ericsson's chips this contains the SoC serial number. | ||
35 | |||
36 | What: /sys/devices/socX/revision | ||
37 | Date: January 2012 | ||
38 | contact: Lee Jones <lee.jones@linaro.org> | ||
39 | Description: | ||
40 | Read-only attribute supported by most SoCs. Contains the SoC's | ||
41 | manufacturing revision number. | ||
42 | |||
43 | What: /sys/devices/socX/process | ||
44 | Date: January 2012 | ||
45 | contact: Lee Jones <lee.jones@linaro.org> | ||
46 | Description: | ||
47 | Read-only attribute supported ST-Ericsson's silicon. Contains the | ||
48 | the process by which the silicon chip was manufactured. | ||
49 | |||
50 | What: /sys/bus/soc | ||
51 | Date: January 2012 | ||
52 | contact: Lee Jones <lee.jones@linaro.org> | ||
53 | Description: | ||
54 | The /sys/bus/soc/ directory contains the usual sub-folders | ||
55 | expected under most buses. /sys/bus/soc/devices is of particular | ||
56 | interest, as it contains a symlink for each SoC device found on | ||
57 | the system. Each symlink points back into the aforementioned | ||
58 | /sys/devices/socX devices. | ||
diff --git a/Documentation/ABI/testing/sysfs-driver-samsung-laptop b/Documentation/ABI/testing/sysfs-driver-samsung-laptop index 0a810231aad4..678819a3f8bf 100644 --- a/Documentation/ABI/testing/sysfs-driver-samsung-laptop +++ b/Documentation/ABI/testing/sysfs-driver-samsung-laptop | |||
@@ -1,7 +1,7 @@ | |||
1 | What: /sys/devices/platform/samsung/performance_level | 1 | What: /sys/devices/platform/samsung/performance_level |
2 | Date: January 1, 2010 | 2 | Date: January 1, 2010 |
3 | KernelVersion: 2.6.33 | 3 | KernelVersion: 2.6.33 |
4 | Contact: Greg Kroah-Hartman <gregkh@suse.de> | 4 | Contact: Greg Kroah-Hartman <gregkh@linuxfoundation.org> |
5 | Description: Some Samsung laptops have different "performance levels" | 5 | Description: Some Samsung laptops have different "performance levels" |
6 | that are can be modified by a function key, and by this | 6 | that are can be modified by a function key, and by this |
7 | sysfs file. These values don't always make a whole lot | 7 | sysfs file. These values don't always make a whole lot |
@@ -17,3 +17,21 @@ Description: Some Samsung laptops have different "performance levels" | |||
17 | Specifically, not all support the "overclock" option, | 17 | Specifically, not all support the "overclock" option, |
18 | and it's still unknown if this value even changes | 18 | and it's still unknown if this value even changes |
19 | anything, other than making the user feel a bit better. | 19 | anything, other than making the user feel a bit better. |
20 | |||
21 | What: /sys/devices/platform/samsung/battery_life_extender | ||
22 | Date: December 1, 2011 | ||
23 | KernelVersion: 3.3 | ||
24 | Contact: Corentin Chary <corentin.chary@gmail.com> | ||
25 | Description: Max battery charge level can be modified, battery cycle | ||
26 | life can be extended by reducing the max battery charge | ||
27 | level. | ||
28 | 0 means normal battery mode (100% charge) | ||
29 | 1 means battery life extender mode (80% charge) | ||
30 | |||
31 | What: /sys/devices/platform/samsung/usb_charge | ||
32 | Date: December 1, 2011 | ||
33 | KernelVersion: 3.3 | ||
34 | Contact: Corentin Chary <corentin.chary@gmail.com> | ||
35 | Description: Use your USB ports to charge devices, even | ||
36 | when your laptop is powered off. | ||
37 | 1 means enabled, 0 means disabled. | ||
diff --git a/Documentation/ABI/testing/sysfs-firmware-acpi b/Documentation/ABI/testing/sysfs-firmware-acpi index 4f9ba3c2fca7..dd930c8db41f 100644 --- a/Documentation/ABI/testing/sysfs-firmware-acpi +++ b/Documentation/ABI/testing/sysfs-firmware-acpi | |||
@@ -1,3 +1,23 @@ | |||
1 | What: /sys/firmware/acpi/bgrt/ | ||
2 | Date: January 2012 | ||
3 | Contact: Matthew Garrett <mjg@redhat.com> | ||
4 | Description: | ||
5 | The BGRT is an ACPI 5.0 feature that allows the OS | ||
6 | to obtain a copy of the firmware boot splash and | ||
7 | some associated metadata. This is intended to be used | ||
8 | by boot splash applications in order to interact with | ||
9 | the firmware boot splash in order to avoid jarring | ||
10 | transitions. | ||
11 | |||
12 | image: The image bitmap. Currently a 32-bit BMP. | ||
13 | status: 1 if the image is valid, 0 if firmware invalidated it. | ||
14 | type: 0 indicates image is in BMP format. | ||
15 | version: The version of the BGRT. Currently 1. | ||
16 | xoffset: The number of pixels between the left of the screen | ||
17 | and the left edge of the image. | ||
18 | yoffset: The number of pixels between the top of the screen | ||
19 | and the top edge of the image. | ||
20 | |||
1 | What: /sys/firmware/acpi/interrupts/ | 21 | What: /sys/firmware/acpi/interrupts/ |
2 | Date: February 2008 | 22 | Date: February 2008 |
3 | Contact: Len Brown <lenb@kernel.org> | 23 | Contact: Len Brown <lenb@kernel.org> |
diff --git a/Documentation/ABI/testing/sysfs-kernel-mm-cleancache b/Documentation/ABI/testing/sysfs-kernel-mm-cleancache deleted file mode 100644 index 662ae646ea12..000000000000 --- a/Documentation/ABI/testing/sysfs-kernel-mm-cleancache +++ /dev/null | |||
@@ -1,11 +0,0 @@ | |||
1 | What: /sys/kernel/mm/cleancache/ | ||
2 | Date: April 2011 | ||
3 | Contact: Dan Magenheimer <dan.magenheimer@oracle.com> | ||
4 | Description: | ||
5 | /sys/kernel/mm/cleancache/ contains a number of files which | ||
6 | record a count of various cleancache operations | ||
7 | (sum across all filesystems): | ||
8 | succ_gets | ||
9 | failed_gets | ||
10 | puts | ||
11 | flushes | ||
diff --git a/Documentation/CodingStyle b/Documentation/CodingStyle index 2b90d328b3ba..c58b236bbe04 100644 --- a/Documentation/CodingStyle +++ b/Documentation/CodingStyle | |||
@@ -793,6 +793,35 @@ own custom mode, or may have some other magic method for making indentation | |||
793 | work correctly. | 793 | work correctly. |
794 | 794 | ||
795 | 795 | ||
796 | Chapter 19: Inline assembly | ||
797 | |||
798 | In architecture-specific code, you may need to use inline assembly to interface | ||
799 | with CPU or platform functionality. Don't hesitate to do so when necessary. | ||
800 | However, don't use inline assembly gratuitously when C can do the job. You can | ||
801 | and should poke hardware from C when possible. | ||
802 | |||
803 | Consider writing simple helper functions that wrap common bits of inline | ||
804 | assembly, rather than repeatedly writing them with slight variations. Remember | ||
805 | that inline assembly can use C parameters. | ||
806 | |||
807 | Large, non-trivial assembly functions should go in .S files, with corresponding | ||
808 | C prototypes defined in C header files. The C prototypes for assembly | ||
809 | functions should use "asmlinkage". | ||
810 | |||
811 | You may need to mark your asm statement as volatile, to prevent GCC from | ||
812 | removing it if GCC doesn't notice any side effects. You don't always need to | ||
813 | do so, though, and doing so unnecessarily can limit optimization. | ||
814 | |||
815 | When writing a single inline assembly statement containing multiple | ||
816 | instructions, put each instruction on a separate line in a separate quoted | ||
817 | string, and end each string except the last with \n\t to properly indent the | ||
818 | next instruction in the assembly output: | ||
819 | |||
820 | asm ("magic %reg1, #42\n\t" | ||
821 | "more_magic %reg2, %reg3" | ||
822 | : /* outputs */ : /* inputs */ : /* clobbers */); | ||
823 | |||
824 | |||
796 | 825 | ||
797 | Appendix I: References | 826 | Appendix I: References |
798 | 827 | ||
diff --git a/Documentation/DMA-attributes.txt b/Documentation/DMA-attributes.txt index b768cc0e402b..5c72eed89563 100644 --- a/Documentation/DMA-attributes.txt +++ b/Documentation/DMA-attributes.txt | |||
@@ -31,3 +31,21 @@ may be weakly ordered, that is that reads and writes may pass each other. | |||
31 | Since it is optional for platforms to implement DMA_ATTR_WEAK_ORDERING, | 31 | Since it is optional for platforms to implement DMA_ATTR_WEAK_ORDERING, |
32 | those that do not will simply ignore the attribute and exhibit default | 32 | those that do not will simply ignore the attribute and exhibit default |
33 | behavior. | 33 | behavior. |
34 | |||
35 | DMA_ATTR_WRITE_COMBINE | ||
36 | ---------------------- | ||
37 | |||
38 | DMA_ATTR_WRITE_COMBINE specifies that writes to the mapping may be | ||
39 | buffered to improve performance. | ||
40 | |||
41 | Since it is optional for platforms to implement DMA_ATTR_WRITE_COMBINE, | ||
42 | those that do not will simply ignore the attribute and exhibit default | ||
43 | behavior. | ||
44 | |||
45 | DMA_ATTR_NON_CONSISTENT | ||
46 | ----------------------- | ||
47 | |||
48 | DMA_ATTR_NON_CONSISTENT lets the platform to choose to return either | ||
49 | consistent or non-consistent memory as it sees fit. By using this API, | ||
50 | you are guaranteeing to the platform that you have all the correct and | ||
51 | necessary sync points for this memory in the driver. | ||
diff --git a/Documentation/DocBook/80211.tmpl b/Documentation/DocBook/80211.tmpl index 2014155c899d..c5ac6929c41c 100644 --- a/Documentation/DocBook/80211.tmpl +++ b/Documentation/DocBook/80211.tmpl | |||
@@ -129,7 +129,6 @@ | |||
129 | !Finclude/net/cfg80211.h cfg80211_pmksa | 129 | !Finclude/net/cfg80211.h cfg80211_pmksa |
130 | !Finclude/net/cfg80211.h cfg80211_send_rx_auth | 130 | !Finclude/net/cfg80211.h cfg80211_send_rx_auth |
131 | !Finclude/net/cfg80211.h cfg80211_send_auth_timeout | 131 | !Finclude/net/cfg80211.h cfg80211_send_auth_timeout |
132 | !Finclude/net/cfg80211.h __cfg80211_auth_canceled | ||
133 | !Finclude/net/cfg80211.h cfg80211_send_rx_assoc | 132 | !Finclude/net/cfg80211.h cfg80211_send_rx_assoc |
134 | !Finclude/net/cfg80211.h cfg80211_send_assoc_timeout | 133 | !Finclude/net/cfg80211.h cfg80211_send_assoc_timeout |
135 | !Finclude/net/cfg80211.h cfg80211_send_deauth | 134 | !Finclude/net/cfg80211.h cfg80211_send_deauth |
diff --git a/Documentation/DocBook/device-drivers.tmpl b/Documentation/DocBook/device-drivers.tmpl index 9c27e5125dd2..7514dbf0a679 100644 --- a/Documentation/DocBook/device-drivers.tmpl +++ b/Documentation/DocBook/device-drivers.tmpl | |||
@@ -446,4 +446,21 @@ X!Idrivers/video/console/fonts.c | |||
446 | !Edrivers/i2c/i2c-core.c | 446 | !Edrivers/i2c/i2c-core.c |
447 | </chapter> | 447 | </chapter> |
448 | 448 | ||
449 | <chapter id="hsi"> | ||
450 | <title>High Speed Synchronous Serial Interface (HSI)</title> | ||
451 | |||
452 | <para> | ||
453 | High Speed Synchronous Serial Interface (HSI) is a | ||
454 | serial interface mainly used for connecting application | ||
455 | engines (APE) with cellular modem engines (CMT) in cellular | ||
456 | handsets. | ||
457 | |||
458 | HSI provides multiplexing for up to 16 logical channels, | ||
459 | low-latency and full duplex communication. | ||
460 | </para> | ||
461 | |||
462 | !Iinclude/linux/hsi/hsi.h | ||
463 | !Edrivers/hsi/hsi.c | ||
464 | </chapter> | ||
465 | |||
449 | </book> | 466 | </book> |
diff --git a/Documentation/DocBook/kgdb.tmpl b/Documentation/DocBook/kgdb.tmpl index d71b57fcf116..4ee4ba3509fc 100644 --- a/Documentation/DocBook/kgdb.tmpl +++ b/Documentation/DocBook/kgdb.tmpl | |||
@@ -362,6 +362,23 @@ | |||
362 | </para> | 362 | </para> |
363 | </para> | 363 | </para> |
364 | </sect1> | 364 | </sect1> |
365 | <sect1 id="kgdbreboot"> | ||
366 | <title>Run time parameter: kgdbreboot</title> | ||
367 | <para> The kgdbreboot feature allows you to change how the debugger | ||
368 | deals with the reboot notification. You have 3 choices for the | ||
369 | behavior. The default behavior is always set to 0.</para> | ||
370 | <orderedlist> | ||
371 | <listitem><para>echo -1 > /sys/module/debug_core/parameters/kgdbreboot</para> | ||
372 | <para>Ignore the reboot notification entirely.</para> | ||
373 | </listitem> | ||
374 | <listitem><para>echo 0 > /sys/module/debug_core/parameters/kgdbreboot</para> | ||
375 | <para>Send the detach message to any attached debugger client.</para> | ||
376 | </listitem> | ||
377 | <listitem><para>echo 1 > /sys/module/debug_core/parameters/kgdbreboot</para> | ||
378 | <para>Enter the debugger on reboot notify.</para> | ||
379 | </listitem> | ||
380 | </orderedlist> | ||
381 | </sect1> | ||
365 | </chapter> | 382 | </chapter> |
366 | <chapter id="usingKDB"> | 383 | <chapter id="usingKDB"> |
367 | <title>Using kdb</title> | 384 | <title>Using kdb</title> |
diff --git a/Documentation/DocBook/media/v4l/biblio.xml b/Documentation/DocBook/media/v4l/biblio.xml index cea6fd3ed428..7dc65c592a87 100644 --- a/Documentation/DocBook/media/v4l/biblio.xml +++ b/Documentation/DocBook/media/v4l/biblio.xml | |||
@@ -128,6 +128,26 @@ url="http://www.ijg.org">http://www.ijg.org</ulink>)</corpauthor> | |||
128 | <subtitle>Version 1.02</subtitle> | 128 | <subtitle>Version 1.02</subtitle> |
129 | </biblioentry> | 129 | </biblioentry> |
130 | 130 | ||
131 | <biblioentry id="itu-t81"> | ||
132 | <abbrev>ITU-T.81</abbrev> | ||
133 | <authorgroup> | ||
134 | <corpauthor>International Telecommunication Union | ||
135 | (<ulink url="http://www.itu.int">http://www.itu.int</ulink>)</corpauthor> | ||
136 | </authorgroup> | ||
137 | <title>ITU-T Recommendation T.81 | ||
138 | "Information Technology — Digital Compression and Coding of Continous-Tone | ||
139 | Still Images — Requirements and Guidelines"</title> | ||
140 | </biblioentry> | ||
141 | |||
142 | <biblioentry id="w3c-jpeg-jfif"> | ||
143 | <abbrev>W3C JPEG JFIF</abbrev> | ||
144 | <authorgroup> | ||
145 | <corpauthor>The World Wide Web Consortium (<ulink | ||
146 | url="http://www.w3.org/Graphics/JPEG">http://www.w3.org</ulink>)</corpauthor> | ||
147 | </authorgroup> | ||
148 | <title>JPEG JFIF</title> | ||
149 | </biblioentry> | ||
150 | |||
131 | <biblioentry id="smpte12m"> | 151 | <biblioentry id="smpte12m"> |
132 | <abbrev>SMPTE 12M</abbrev> | 152 | <abbrev>SMPTE 12M</abbrev> |
133 | <authorgroup> | 153 | <authorgroup> |
diff --git a/Documentation/DocBook/media/v4l/compat.xml b/Documentation/DocBook/media/v4l/compat.xml index a2485b3ff3d2..bce97c50391b 100644 --- a/Documentation/DocBook/media/v4l/compat.xml +++ b/Documentation/DocBook/media/v4l/compat.xml | |||
@@ -2393,6 +2393,20 @@ details.</para> | |||
2393 | to the <link linkend="control">User controls class</link>. | 2393 | to the <link linkend="control">User controls class</link>. |
2394 | </para> | 2394 | </para> |
2395 | </listitem> | 2395 | </listitem> |
2396 | <listitem> | ||
2397 | <para>Added the device_caps field to struct v4l2_capabilities and added the new | ||
2398 | V4L2_CAP_DEVICE_CAPS capability.</para> | ||
2399 | </listitem> | ||
2400 | </orderedlist> | ||
2401 | </section> | ||
2402 | |||
2403 | <section> | ||
2404 | <title>V4L2 in Linux 3.4</title> | ||
2405 | <orderedlist> | ||
2406 | <listitem> | ||
2407 | <para>Added <link linkend="jpeg-controls">JPEG compression control | ||
2408 | class</link>.</para> | ||
2409 | </listitem> | ||
2396 | </orderedlist> | 2410 | </orderedlist> |
2397 | </section> | 2411 | </section> |
2398 | 2412 | ||
diff --git a/Documentation/DocBook/media/v4l/controls.xml b/Documentation/DocBook/media/v4l/controls.xml index a1be37897ad7..b84f25e9cc87 100644 --- a/Documentation/DocBook/media/v4l/controls.xml +++ b/Documentation/DocBook/media/v4l/controls.xml | |||
@@ -1286,6 +1286,49 @@ produce a slight hiss, but in the encoder itself, guaranteeing a fixed | |||
1286 | and reproducible audio bitstream. 0 = unmuted, 1 = muted.</entry> | 1286 | and reproducible audio bitstream. 0 = unmuted, 1 = muted.</entry> |
1287 | </row> | 1287 | </row> |
1288 | <row><entry></entry></row> | 1288 | <row><entry></entry></row> |
1289 | <row id="v4l2-mpeg-audio-dec-playback"> | ||
1290 | <entry spanname="id"><constant>V4L2_CID_MPEG_AUDIO_DEC_PLAYBACK</constant> </entry> | ||
1291 | <entry>enum v4l2_mpeg_audio_dec_playback</entry> | ||
1292 | </row><row><entry spanname="descr">Determines how monolingual audio should be played back. | ||
1293 | Possible values are:</entry> | ||
1294 | </row> | ||
1295 | <row> | ||
1296 | <entrytbl spanname="descr" cols="2"> | ||
1297 | <tbody valign="top"> | ||
1298 | <row> | ||
1299 | <entry><constant>V4L2_MPEG_AUDIO_DEC_PLAYBACK_AUTO</constant> </entry> | ||
1300 | <entry>Automatically determines the best playback mode.</entry> | ||
1301 | </row> | ||
1302 | <row> | ||
1303 | <entry><constant>V4L2_MPEG_AUDIO_DEC_PLAYBACK_STEREO</constant> </entry> | ||
1304 | <entry>Stereo playback.</entry> | ||
1305 | </row> | ||
1306 | <row> | ||
1307 | <entry><constant>V4L2_MPEG_AUDIO_DEC_PLAYBACK_LEFT</constant> </entry> | ||
1308 | <entry>Left channel playback.</entry> | ||
1309 | </row> | ||
1310 | <row> | ||
1311 | <entry><constant>V4L2_MPEG_AUDIO_DEC_PLAYBACK_RIGHT</constant> </entry> | ||
1312 | <entry>Right channel playback.</entry> | ||
1313 | </row> | ||
1314 | <row> | ||
1315 | <entry><constant>V4L2_MPEG_AUDIO_DEC_PLAYBACK_MONO</constant> </entry> | ||
1316 | <entry>Mono playback.</entry> | ||
1317 | </row> | ||
1318 | <row> | ||
1319 | <entry><constant>V4L2_MPEG_AUDIO_DEC_PLAYBACK_SWAPPED_STEREO</constant> </entry> | ||
1320 | <entry>Stereo playback with swapped left and right channels.</entry> | ||
1321 | </row> | ||
1322 | </tbody> | ||
1323 | </entrytbl> | ||
1324 | </row> | ||
1325 | <row><entry></entry></row> | ||
1326 | <row id="v4l2-mpeg-audio-dec-multilingual-playback"> | ||
1327 | <entry spanname="id"><constant>V4L2_CID_MPEG_AUDIO_DEC_MULTILINGUAL_PLAYBACK</constant> </entry> | ||
1328 | <entry>enum v4l2_mpeg_audio_dec_playback</entry> | ||
1329 | </row><row><entry spanname="descr">Determines how multilingual audio should be played back.</entry> | ||
1330 | </row> | ||
1331 | <row><entry></entry></row> | ||
1289 | <row id="v4l2-mpeg-video-encoding"> | 1332 | <row id="v4l2-mpeg-video-encoding"> |
1290 | <entry spanname="id"><constant>V4L2_CID_MPEG_VIDEO_ENCODING</constant> </entry> | 1333 | <entry spanname="id"><constant>V4L2_CID_MPEG_VIDEO_ENCODING</constant> </entry> |
1291 | <entry>enum v4l2_mpeg_video_encoding</entry> | 1334 | <entry>enum v4l2_mpeg_video_encoding</entry> |
@@ -1447,6 +1490,22 @@ of the video. The supplied 32-bit integer is interpreted as follows (bit | |||
1447 | </tbody> | 1490 | </tbody> |
1448 | </entrytbl> | 1491 | </entrytbl> |
1449 | </row> | 1492 | </row> |
1493 | <row><entry></entry></row> | ||
1494 | <row id="v4l2-mpeg-video-dec-pts"> | ||
1495 | <entry spanname="id"><constant>V4L2_CID_MPEG_VIDEO_DEC_PTS</constant> </entry> | ||
1496 | <entry>integer64</entry> | ||
1497 | </row><row><entry spanname="descr">This read-only control returns the | ||
1498 | 33-bit video Presentation Time Stamp as defined in ITU T-REC-H.222.0 and ISO/IEC 13818-1 of | ||
1499 | the currently displayed frame. This is the same PTS as is used in &VIDIOC-DECODER-CMD;.</entry> | ||
1500 | </row> | ||
1501 | <row><entry></entry></row> | ||
1502 | <row id="v4l2-mpeg-video-dec-frame"> | ||
1503 | <entry spanname="id"><constant>V4L2_CID_MPEG_VIDEO_DEC_FRAME</constant> </entry> | ||
1504 | <entry>integer64</entry> | ||
1505 | </row><row><entry spanname="descr">This read-only control returns the | ||
1506 | frame counter of the frame that is currently displayed (decoded). This value is reset to 0 whenever | ||
1507 | the decoder is started.</entry> | ||
1508 | </row> | ||
1450 | 1509 | ||
1451 | 1510 | ||
1452 | <row><entry></entry></row> | 1511 | <row><entry></entry></row> |
@@ -3377,6 +3436,167 @@ interface and may change in the future.</para> | |||
3377 | </tbody> | 3436 | </tbody> |
3378 | </tgroup> | 3437 | </tgroup> |
3379 | </table> | 3438 | </table> |
3439 | </section> | ||
3440 | |||
3441 | <section id="jpeg-controls"> | ||
3442 | <title>JPEG Control Reference</title> | ||
3443 | <para>The JPEG class includes controls for common features of JPEG | ||
3444 | encoders and decoders. Currently it includes features for codecs | ||
3445 | implementing progressive baseline DCT compression process with | ||
3446 | Huffman entrophy coding.</para> | ||
3447 | <table pgwide="1" frame="none" id="jpeg-control-id"> | ||
3448 | <title>JPEG Control IDs</title> | ||
3380 | 3449 | ||
3450 | <tgroup cols="4"> | ||
3451 | <colspec colname="c1" colwidth="1*" /> | ||
3452 | <colspec colname="c2" colwidth="6*" /> | ||
3453 | <colspec colname="c3" colwidth="2*" /> | ||
3454 | <colspec colname="c4" colwidth="6*" /> | ||
3455 | <spanspec namest="c1" nameend="c2" spanname="id" /> | ||
3456 | <spanspec namest="c2" nameend="c4" spanname="descr" /> | ||
3457 | <thead> | ||
3458 | <row> | ||
3459 | <entry spanname="id" align="left">ID</entry> | ||
3460 | <entry align="left">Type</entry> | ||
3461 | </row><row rowsep="1"><entry spanname="descr" align="left">Description</entry> | ||
3462 | </row> | ||
3463 | </thead> | ||
3464 | <tbody valign="top"> | ||
3465 | <row><entry></entry></row> | ||
3466 | <row> | ||
3467 | <entry spanname="id"><constant>V4L2_CID_JPEG_CLASS</constant> </entry> | ||
3468 | <entry>class</entry> | ||
3469 | </row><row><entry spanname="descr">The JPEG class descriptor. Calling | ||
3470 | &VIDIOC-QUERYCTRL; for this control will return a description of this | ||
3471 | control class. | ||
3472 | |||
3473 | </entry> | ||
3474 | </row> | ||
3475 | <row> | ||
3476 | <entry spanname="id"><constant>V4L2_CID_JPEG_CHROMA_SUBSAMPLING</constant></entry> | ||
3477 | <entry>menu</entry> | ||
3478 | </row> | ||
3479 | <row id="jpeg-chroma-subsampling-control"> | ||
3480 | <entry spanname="descr">The chroma subsampling factors describe how | ||
3481 | each component of an input image is sampled, in respect to maximum | ||
3482 | sample rate in each spatial dimension. See <xref linkend="itu-t81"/>, | ||
3483 | clause A.1.1. for more details. The <constant> | ||
3484 | V4L2_CID_JPEG_CHROMA_SUBSAMPLING</constant> control determines how | ||
3485 | Cb and Cr components are downsampled after coverting an input image | ||
3486 | from RGB to Y'CbCr color space. | ||
3487 | </entry> | ||
3488 | </row> | ||
3489 | <row> | ||
3490 | <entrytbl spanname="descr" cols="2"> | ||
3491 | <tbody valign="top"> | ||
3492 | <row> | ||
3493 | <entry><constant>V4L2_JPEG_CHROMA_SUBSAMPLING_444</constant> | ||
3494 | </entry><entry>No chroma subsampling, each pixel has | ||
3495 | Y, Cr and Cb values.</entry> | ||
3496 | </row> | ||
3497 | <row> | ||
3498 | <entry><constant>V4L2_JPEG_CHROMA_SUBSAMPLING_422</constant> | ||
3499 | </entry><entry>Horizontally subsample Cr, Cb components | ||
3500 | by a factor of 2.</entry> | ||
3501 | </row> | ||
3502 | <row> | ||
3503 | <entry><constant>V4L2_JPEG_CHROMA_SUBSAMPLING_420</constant> | ||
3504 | </entry><entry>Subsample Cr, Cb components horizontally | ||
3505 | and vertically by 2.</entry> | ||
3506 | </row> | ||
3507 | <row> | ||
3508 | <entry><constant>V4L2_JPEG_CHROMA_SUBSAMPLING_411</constant> | ||
3509 | </entry><entry>Horizontally subsample Cr, Cb components | ||
3510 | by a factor of 4.</entry> | ||
3511 | </row> | ||
3512 | <row> | ||
3513 | <entry><constant>V4L2_JPEG_CHROMA_SUBSAMPLING_410</constant> | ||
3514 | </entry><entry>Subsample Cr, Cb components horizontally | ||
3515 | by 4 and vertically by 2.</entry> | ||
3516 | </row> | ||
3517 | <row> | ||
3518 | <entry><constant>V4L2_JPEG_CHROMA_SUBSAMPLING_GRAY</constant> | ||
3519 | </entry><entry>Use only luminance component.</entry> | ||
3520 | </row> | ||
3521 | </tbody> | ||
3522 | </entrytbl> | ||
3523 | </row> | ||
3524 | <row> | ||
3525 | <entry spanname="id"><constant>V4L2_CID_JPEG_RESTART_INTERVAL</constant> | ||
3526 | </entry><entry>integer</entry> | ||
3527 | </row> | ||
3528 | <row><entry spanname="descr"> | ||
3529 | The restart interval determines an interval of inserting RSTm | ||
3530 | markers (m = 0..7). The purpose of these markers is to additionally | ||
3531 | reinitialize the encoder process, in order to process blocks of | ||
3532 | an image independently. | ||
3533 | For the lossy compression processes the restart interval unit is | ||
3534 | MCU (Minimum Coded Unit) and its value is contained in DRI | ||
3535 | (Define Restart Interval) marker. If <constant> | ||
3536 | V4L2_CID_JPEG_RESTART_INTERVAL</constant> control is set to 0, | ||
3537 | DRI and RSTm markers will not be inserted. | ||
3538 | </entry> | ||
3539 | </row> | ||
3540 | <row id="jpeg-quality-control"> | ||
3541 | <entry spanname="id"><constant>V4L2_CID_JPEG_COMPRESION_QUALITY</constant></entry> | ||
3542 | <entry>integer</entry> | ||
3543 | </row> | ||
3544 | <row> | ||
3545 | <entry spanname="descr"> | ||
3546 | <constant>V4L2_CID_JPEG_COMPRESION_QUALITY</constant> control | ||
3547 | determines trade-off between image quality and size. | ||
3548 | It provides simpler method for applications to control image quality, | ||
3549 | without a need for direct reconfiguration of luminance and chrominance | ||
3550 | quantization tables. | ||
3551 | |||
3552 | In cases where a driver uses quantization tables configured directly | ||
3553 | by an application, using interfaces defined elsewhere, <constant> | ||
3554 | V4L2_CID_JPEG_COMPRESION_QUALITY</constant> control should be set | ||
3555 | by driver to 0. | ||
3556 | |||
3557 | <para>The value range of this control is driver-specific. Only | ||
3558 | positive, non-zero values are meaningful. The recommended range | ||
3559 | is 1 - 100, where larger values correspond to better image quality. | ||
3560 | </para> | ||
3561 | </entry> | ||
3562 | </row> | ||
3563 | <row id="jpeg-active-marker-control"> | ||
3564 | <entry spanname="id"><constant>V4L2_CID_JPEG_ACTIVE_MARKER</constant></entry> | ||
3565 | <entry>bitmask</entry> | ||
3566 | </row> | ||
3567 | <row> | ||
3568 | <entry spanname="descr">Specify which JPEG markers are included | ||
3569 | in compressed stream. This control is valid only for encoders. | ||
3570 | </entry> | ||
3571 | </row> | ||
3572 | <row> | ||
3573 | <entrytbl spanname="descr" cols="2"> | ||
3574 | <tbody valign="top"> | ||
3575 | <row> | ||
3576 | <entry><constant>V4L2_JPEG_ACTIVE_MARKER_APP0</constant></entry> | ||
3577 | <entry>Application data segment APP<subscript>0</subscript>.</entry> | ||
3578 | </row><row> | ||
3579 | <entry><constant>V4L2_JPEG_ACTIVE_MARKER_APP1</constant></entry> | ||
3580 | <entry>Application data segment APP<subscript>1</subscript>.</entry> | ||
3581 | </row><row> | ||
3582 | <entry><constant>V4L2_JPEG_ACTIVE_MARKER_COM</constant></entry> | ||
3583 | <entry>Comment segment.</entry> | ||
3584 | </row><row> | ||
3585 | <entry><constant>V4L2_JPEG_ACTIVE_MARKER_DQT</constant></entry> | ||
3586 | <entry>Quantization tables segment.</entry> | ||
3587 | </row><row> | ||
3588 | <entry><constant>V4L2_JPEG_ACTIVE_MARKER_DHT</constant></entry> | ||
3589 | <entry>Huffman tables segment.</entry> | ||
3590 | </row> | ||
3591 | </tbody> | ||
3592 | </entrytbl> | ||
3593 | </row> | ||
3594 | <row><entry></entry></row> | ||
3595 | </tbody> | ||
3596 | </tgroup> | ||
3597 | </table> | ||
3598 | <para>For more details about JPEG specification, refer | ||
3599 | to <xref linkend="itu-t81"/>, <xref linkend="jfif"/>, | ||
3600 | <xref linkend="w3c-jpeg-jfif"/>.</para> | ||
3381 | </section> | 3601 | </section> |
3382 | </section> | 3602 | </section> |
diff --git a/Documentation/DocBook/media/v4l/selection-api.xml b/Documentation/DocBook/media/v4l/selection-api.xml index 2f0bdb4d5551..b299e4779354 100644 --- a/Documentation/DocBook/media/v4l/selection-api.xml +++ b/Documentation/DocBook/media/v4l/selection-api.xml | |||
@@ -52,6 +52,10 @@ cropping and composing rectangles have the same size.</para> | |||
52 | </textobject> | 52 | </textobject> |
53 | </mediaobject> | 53 | </mediaobject> |
54 | </figure> | 54 | </figure> |
55 | |||
56 | For complete list of the available selection targets see table <xref | ||
57 | linkend="v4l2-sel-target"/> | ||
58 | |||
55 | </section> | 59 | </section> |
56 | 60 | ||
57 | <section> | 61 | <section> |
@@ -186,7 +190,7 @@ V4L2_SEL_TGT_COMPOSE_ACTIVE </constant> target.</para> | |||
186 | 190 | ||
187 | <section> | 191 | <section> |
188 | 192 | ||
189 | <title>Scaling control.</title> | 193 | <title>Scaling control</title> |
190 | 194 | ||
191 | <para>An application can detect if scaling is performed by comparing the width | 195 | <para>An application can detect if scaling is performed by comparing the width |
192 | and the height of rectangles obtained using <constant> V4L2_SEL_TGT_CROP_ACTIVE | 196 | and the height of rectangles obtained using <constant> V4L2_SEL_TGT_CROP_ACTIVE |
@@ -200,7 +204,7 @@ the scaling ratios using these values.</para> | |||
200 | 204 | ||
201 | <section> | 205 | <section> |
202 | 206 | ||
203 | <title>Comparison with old cropping API.</title> | 207 | <title>Comparison with old cropping API</title> |
204 | 208 | ||
205 | <para>The selection API was introduced to cope with deficiencies of previous | 209 | <para>The selection API was introduced to cope with deficiencies of previous |
206 | <link linkend="crop"> API </link>, that was designed to control simple capture | 210 | <link linkend="crop"> API </link>, that was designed to control simple capture |
diff --git a/Documentation/DocBook/media/v4l/v4l2.xml b/Documentation/DocBook/media/v4l/v4l2.xml index e97c512861bb..8ae38876172e 100644 --- a/Documentation/DocBook/media/v4l/v4l2.xml +++ b/Documentation/DocBook/media/v4l/v4l2.xml | |||
@@ -128,6 +128,22 @@ structs, ioctls) must be noted in more detail in the history chapter | |||
128 | applications. --> | 128 | applications. --> |
129 | 129 | ||
130 | <revision> | 130 | <revision> |
131 | <revnumber>3.4</revnumber> | ||
132 | <date>2012-01-25</date> | ||
133 | <authorinitials>sn</authorinitials> | ||
134 | <revremark>Added <link linkend="jpeg-controls">JPEG compression | ||
135 | control class.</link> | ||
136 | </revremark> | ||
137 | </revision> | ||
138 | |||
139 | <revision> | ||
140 | <revnumber>3.3</revnumber> | ||
141 | <date>2012-01-11</date> | ||
142 | <authorinitials>hv</authorinitials> | ||
143 | <revremark>Added device_caps field to struct v4l2_capabilities.</revremark> | ||
144 | </revision> | ||
145 | |||
146 | <revision> | ||
131 | <revnumber>3.2</revnumber> | 147 | <revnumber>3.2</revnumber> |
132 | <date>2011-08-26</date> | 148 | <date>2011-08-26</date> |
133 | <authorinitials>hv</authorinitials> | 149 | <authorinitials>hv</authorinitials> |
@@ -417,7 +433,7 @@ and discussions on the V4L mailing list.</revremark> | |||
417 | </partinfo> | 433 | </partinfo> |
418 | 434 | ||
419 | <title>Video for Linux Two API Specification</title> | 435 | <title>Video for Linux Two API Specification</title> |
420 | <subtitle>Revision 3.2</subtitle> | 436 | <subtitle>Revision 3.3</subtitle> |
421 | 437 | ||
422 | <chapter id="common"> | 438 | <chapter id="common"> |
423 | &sub-common; | 439 | &sub-common; |
@@ -473,6 +489,7 @@ and discussions on the V4L mailing list.</revremark> | |||
473 | &sub-cropcap; | 489 | &sub-cropcap; |
474 | &sub-dbg-g-chip-ident; | 490 | &sub-dbg-g-chip-ident; |
475 | &sub-dbg-g-register; | 491 | &sub-dbg-g-register; |
492 | &sub-decoder-cmd; | ||
476 | &sub-dqevent; | 493 | &sub-dqevent; |
477 | &sub-encoder-cmd; | 494 | &sub-encoder-cmd; |
478 | &sub-enumaudio; | 495 | &sub-enumaudio; |
diff --git a/Documentation/DocBook/media/v4l/vidioc-decoder-cmd.xml b/Documentation/DocBook/media/v4l/vidioc-decoder-cmd.xml new file mode 100644 index 000000000000..74b87f6e480a --- /dev/null +++ b/Documentation/DocBook/media/v4l/vidioc-decoder-cmd.xml | |||
@@ -0,0 +1,256 @@ | |||
1 | <refentry id="vidioc-decoder-cmd"> | ||
2 | <refmeta> | ||
3 | <refentrytitle>ioctl VIDIOC_DECODER_CMD, VIDIOC_TRY_DECODER_CMD</refentrytitle> | ||
4 | &manvol; | ||
5 | </refmeta> | ||
6 | |||
7 | <refnamediv> | ||
8 | <refname>VIDIOC_DECODER_CMD</refname> | ||
9 | <refname>VIDIOC_TRY_DECODER_CMD</refname> | ||
10 | <refpurpose>Execute an decoder command</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>struct v4l2_decoder_cmd *<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_DECODER_CMD, VIDIOC_TRY_DECODER_CMD</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 | <note> | ||
53 | <title>Experimental</title> | ||
54 | |||
55 | <para>This is an <link linkend="experimental">experimental</link> | ||
56 | interface and may change in the future.</para> | ||
57 | </note> | ||
58 | |||
59 | <para>These ioctls control an audio/video (usually MPEG-) decoder. | ||
60 | <constant>VIDIOC_DECODER_CMD</constant> sends a command to the | ||
61 | decoder, <constant>VIDIOC_TRY_DECODER_CMD</constant> can be used to | ||
62 | try a command without actually executing it. To send a command applications | ||
63 | must initialize all fields of a &v4l2-decoder-cmd; and call | ||
64 | <constant>VIDIOC_DECODER_CMD</constant> or <constant>VIDIOC_TRY_DECODER_CMD</constant> | ||
65 | with a pointer to this structure.</para> | ||
66 | |||
67 | <para>The <structfield>cmd</structfield> field must contain the | ||
68 | command code. Some commands use the <structfield>flags</structfield> field for | ||
69 | additional information. | ||
70 | </para> | ||
71 | |||
72 | <para>A <function>write</function>() or &VIDIOC-STREAMON; call sends an implicit | ||
73 | START command to the decoder if it has not been started yet. | ||
74 | </para> | ||
75 | |||
76 | <para>A <function>close</function>() or &VIDIOC-STREAMOFF; call of a streaming | ||
77 | file descriptor sends an implicit immediate STOP command to the decoder, and all | ||
78 | buffered data is discarded.</para> | ||
79 | |||
80 | <para>These ioctls are optional, not all drivers may support | ||
81 | them. They were introduced in Linux 3.3.</para> | ||
82 | |||
83 | <table pgwide="1" frame="none" id="v4l2-decoder-cmd"> | ||
84 | <title>struct <structname>v4l2_decoder_cmd</structname></title> | ||
85 | <tgroup cols="5"> | ||
86 | &cs-str; | ||
87 | <tbody valign="top"> | ||
88 | <row> | ||
89 | <entry>__u32</entry> | ||
90 | <entry><structfield>cmd</structfield></entry> | ||
91 | <entry></entry> | ||
92 | <entry></entry> | ||
93 | <entry>The decoder command, see <xref linkend="decoder-cmds" />.</entry> | ||
94 | </row> | ||
95 | <row> | ||
96 | <entry>__u32</entry> | ||
97 | <entry><structfield>flags</structfield></entry> | ||
98 | <entry></entry> | ||
99 | <entry></entry> | ||
100 | <entry>Flags to go with the command. If no flags are defined for | ||
101 | this command, drivers and applications must set this field to zero.</entry> | ||
102 | </row> | ||
103 | <row> | ||
104 | <entry>union</entry> | ||
105 | <entry>(anonymous)</entry> | ||
106 | <entry></entry> | ||
107 | <entry></entry> | ||
108 | <entry></entry> | ||
109 | </row> | ||
110 | <row> | ||
111 | <entry></entry> | ||
112 | <entry>struct</entry> | ||
113 | <entry><structfield>start</structfield></entry> | ||
114 | <entry></entry> | ||
115 | <entry>Structure containing additional data for the | ||
116 | <constant>V4L2_DEC_CMD_START</constant> command.</entry> | ||
117 | </row> | ||
118 | <row> | ||
119 | <entry></entry> | ||
120 | <entry></entry> | ||
121 | <entry>__s32</entry> | ||
122 | <entry><structfield>speed</structfield></entry> | ||
123 | <entry>Playback speed and direction. The playback speed is defined as | ||
124 | <structfield>speed</structfield>/1000 of the normal speed. So 1000 is normal playback. | ||
125 | Negative numbers denote reverse playback, so -1000 does reverse playback at normal | ||
126 | speed. Speeds -1, 0 and 1 have special meanings: speed 0 is shorthand for 1000 | ||
127 | (normal playback). A speed of 1 steps just one frame forward, a speed of -1 steps | ||
128 | just one frame back. | ||
129 | </entry> | ||
130 | </row> | ||
131 | <row> | ||
132 | <entry></entry> | ||
133 | <entry></entry> | ||
134 | <entry>__u32</entry> | ||
135 | <entry><structfield>format</structfield></entry> | ||
136 | <entry>Format restrictions. This field is set by the driver, not the | ||
137 | application. Possible values are <constant>V4L2_DEC_START_FMT_NONE</constant> if | ||
138 | there are no format restrictions or <constant>V4L2_DEC_START_FMT_GOP</constant> | ||
139 | if the decoder operates on full GOPs (<wordasword>Group Of Pictures</wordasword>). | ||
140 | This is usually the case for reverse playback: the decoder needs full GOPs, which | ||
141 | it can then play in reverse order. So to implement reverse playback the application | ||
142 | must feed the decoder the last GOP in the video file, then the GOP before that, etc. etc. | ||
143 | </entry> | ||
144 | </row> | ||
145 | <row> | ||
146 | <entry></entry> | ||
147 | <entry>struct</entry> | ||
148 | <entry><structfield>stop</structfield></entry> | ||
149 | <entry></entry> | ||
150 | <entry>Structure containing additional data for the | ||
151 | <constant>V4L2_DEC_CMD_STOP</constant> command.</entry> | ||
152 | </row> | ||
153 | <row> | ||
154 | <entry></entry> | ||
155 | <entry></entry> | ||
156 | <entry>__u64</entry> | ||
157 | <entry><structfield>pts</structfield></entry> | ||
158 | <entry>Stop playback at this <structfield>pts</structfield> or immediately | ||
159 | if the playback is already past that timestamp. Leave to 0 if you want to stop after the | ||
160 | last frame was decoded. | ||
161 | </entry> | ||
162 | </row> | ||
163 | <row> | ||
164 | <entry></entry> | ||
165 | <entry>struct</entry> | ||
166 | <entry><structfield>raw</structfield></entry> | ||
167 | <entry></entry> | ||
168 | <entry></entry> | ||
169 | </row> | ||
170 | <row> | ||
171 | <entry></entry> | ||
172 | <entry></entry> | ||
173 | <entry>__u32</entry> | ||
174 | <entry><structfield>data</structfield>[16]</entry> | ||
175 | <entry>Reserved for future extensions. Drivers and | ||
176 | applications must set the array to zero.</entry> | ||
177 | </row> | ||
178 | </tbody> | ||
179 | </tgroup> | ||
180 | </table> | ||
181 | |||
182 | <table pgwide="1" frame="none" id="decoder-cmds"> | ||
183 | <title>Decoder Commands</title> | ||
184 | <tgroup cols="3"> | ||
185 | &cs-def; | ||
186 | <tbody valign="top"> | ||
187 | <row> | ||
188 | <entry><constant>V4L2_DEC_CMD_START</constant></entry> | ||
189 | <entry>0</entry> | ||
190 | <entry>Start the decoder. When the decoder is already | ||
191 | running or paused, this command will just change the playback speed. | ||
192 | That means that calling <constant>V4L2_DEC_CMD_START</constant> when | ||
193 | the decoder was paused will <emphasis>not</emphasis> resume the decoder. | ||
194 | You have to explicitly call <constant>V4L2_DEC_CMD_RESUME</constant> for that. | ||
195 | This command has one flag: | ||
196 | <constant>V4L2_DEC_CMD_START_MUTE_AUDIO</constant>. If set, then audio will | ||
197 | be muted when playing back at a non-standard speed. | ||
198 | </entry> | ||
199 | </row> | ||
200 | <row> | ||
201 | <entry><constant>V4L2_DEC_CMD_STOP</constant></entry> | ||
202 | <entry>1</entry> | ||
203 | <entry>Stop the decoder. When the decoder is already stopped, | ||
204 | this command does nothing. This command has two flags: | ||
205 | if <constant>V4L2_DEC_CMD_STOP_TO_BLACK</constant> is set, then the decoder will | ||
206 | set the picture to black after it stopped decoding. Otherwise the last image will | ||
207 | repeat. If <constant>V4L2_DEC_CMD_STOP_IMMEDIATELY</constant> is set, then the decoder | ||
208 | stops immediately (ignoring the <structfield>pts</structfield> value), otherwise it | ||
209 | will keep decoding until timestamp >= pts or until the last of the pending data from | ||
210 | its internal buffers was decoded. | ||
211 | </entry> | ||
212 | </row> | ||
213 | <row> | ||
214 | <entry><constant>V4L2_DEC_CMD_PAUSE</constant></entry> | ||
215 | <entry>2</entry> | ||
216 | <entry>Pause the decoder. When the decoder has not been | ||
217 | started yet, the driver will return an &EPERM;. When the decoder is | ||
218 | already paused, this command does nothing. This command has one flag: | ||
219 | if <constant>V4L2_DEC_CMD_PAUSE_TO_BLACK</constant> is set, then set the | ||
220 | decoder output to black when paused. | ||
221 | </entry> | ||
222 | </row> | ||
223 | <row> | ||
224 | <entry><constant>V4L2_DEC_CMD_RESUME</constant></entry> | ||
225 | <entry>3</entry> | ||
226 | <entry>Resume decoding after a PAUSE command. When the | ||
227 | decoder has not been started yet, the driver will return an &EPERM;. | ||
228 | When the decoder is already running, this command does nothing. No | ||
229 | flags are defined for this command.</entry> | ||
230 | </row> | ||
231 | </tbody> | ||
232 | </tgroup> | ||
233 | </table> | ||
234 | |||
235 | </refsect1> | ||
236 | |||
237 | <refsect1> | ||
238 | &return-value; | ||
239 | |||
240 | <variablelist> | ||
241 | <varlistentry> | ||
242 | <term><errorcode>EINVAL</errorcode></term> | ||
243 | <listitem> | ||
244 | <para>The <structfield>cmd</structfield> field is invalid.</para> | ||
245 | </listitem> | ||
246 | </varlistentry> | ||
247 | <varlistentry> | ||
248 | <term><errorcode>EPERM</errorcode></term> | ||
249 | <listitem> | ||
250 | <para>The application sent a PAUSE or RESUME command when | ||
251 | the decoder was not running.</para> | ||
252 | </listitem> | ||
253 | </varlistentry> | ||
254 | </variablelist> | ||
255 | </refsect1> | ||
256 | </refentry> | ||
diff --git a/Documentation/DocBook/media/v4l/vidioc-encoder-cmd.xml b/Documentation/DocBook/media/v4l/vidioc-encoder-cmd.xml index af7f3f2a36dd..f431b3ba79bd 100644 --- a/Documentation/DocBook/media/v4l/vidioc-encoder-cmd.xml +++ b/Documentation/DocBook/media/v4l/vidioc-encoder-cmd.xml | |||
@@ -74,15 +74,16 @@ only used by the STOP command and contains one bit: If the | |||
74 | encoding will continue until the end of the current <wordasword>Group | 74 | encoding will continue until the end of the current <wordasword>Group |
75 | Of Pictures</wordasword>, otherwise it will stop immediately.</para> | 75 | Of Pictures</wordasword>, otherwise it will stop immediately.</para> |
76 | 76 | ||
77 | <para>A <function>read</function>() call sends a START command to | 77 | <para>A <function>read</function>() or &VIDIOC-STREAMON; call sends an implicit |
78 | the encoder if it has not been started yet. After a STOP command, | 78 | START command to the encoder if it has not been started yet. After a STOP command, |
79 | <function>read</function>() calls will read the remaining data | 79 | <function>read</function>() calls will read the remaining data |
80 | buffered by the driver. When the buffer is empty, | 80 | buffered by the driver. When the buffer is empty, |
81 | <function>read</function>() will return zero and the next | 81 | <function>read</function>() will return zero and the next |
82 | <function>read</function>() call will restart the encoder.</para> | 82 | <function>read</function>() call will restart the encoder.</para> |
83 | 83 | ||
84 | <para>A <function>close</function>() call sends an immediate STOP | 84 | <para>A <function>close</function>() or &VIDIOC-STREAMOFF; call of a streaming |
85 | to the encoder, and all buffered data is discarded.</para> | 85 | file descriptor sends an implicit immediate STOP to the encoder, and all buffered |
86 | data is discarded.</para> | ||
86 | 87 | ||
87 | <para>These ioctls are optional, not all drivers may support | 88 | <para>These ioctls are optional, not all drivers may support |
88 | them. They were introduced in Linux 2.6.21.</para> | 89 | them. They were introduced in Linux 2.6.21.</para> |
diff --git a/Documentation/DocBook/media/v4l/vidioc-g-jpegcomp.xml b/Documentation/DocBook/media/v4l/vidioc-g-jpegcomp.xml index 01ea24b84385..48748499c097 100644 --- a/Documentation/DocBook/media/v4l/vidioc-g-jpegcomp.xml +++ b/Documentation/DocBook/media/v4l/vidioc-g-jpegcomp.xml | |||
@@ -57,6 +57,11 @@ | |||
57 | <refsect1> | 57 | <refsect1> |
58 | <title>Description</title> | 58 | <title>Description</title> |
59 | 59 | ||
60 | <para>These ioctls are <emphasis role="bold">deprecated</emphasis>. | ||
61 | New drivers and applications should use <link linkend="jpeg-controls"> | ||
62 | JPEG class controls</link> for image quality and JPEG markers control. | ||
63 | </para> | ||
64 | |||
60 | <para>[to do]</para> | 65 | <para>[to do]</para> |
61 | 66 | ||
62 | <para>Ronald Bultje elaborates:</para> | 67 | <para>Ronald Bultje elaborates:</para> |
@@ -86,7 +91,10 @@ to add them.</para> | |||
86 | <row> | 91 | <row> |
87 | <entry>int</entry> | 92 | <entry>int</entry> |
88 | <entry><structfield>quality</structfield></entry> | 93 | <entry><structfield>quality</structfield></entry> |
89 | <entry></entry> | 94 | <entry>Deprecated. If <link linkend="jpeg-quality-control"><constant> |
95 | V4L2_CID_JPEG_IMAGE_QUALITY</constant></link> control is exposed by | ||
96 | a driver applications should use it instead and ignore this field. | ||
97 | </entry> | ||
90 | </row> | 98 | </row> |
91 | <row> | 99 | <row> |
92 | <entry>int</entry> | 100 | <entry>int</entry> |
@@ -116,7 +124,11 @@ to add them.</para> | |||
116 | <row> | 124 | <row> |
117 | <entry>__u32</entry> | 125 | <entry>__u32</entry> |
118 | <entry><structfield>jpeg_markers</structfield></entry> | 126 | <entry><structfield>jpeg_markers</structfield></entry> |
119 | <entry>See <xref linkend="jpeg-markers" />.</entry> | 127 | <entry>See <xref linkend="jpeg-markers"/>. Deprecated. |
128 | If <link linkend="jpeg-active-marker-control"><constant> | ||
129 | V4L2_CID_JPEG_ACTIVE_MARKER</constant></link> control | ||
130 | is exposed by a driver applications should use it instead | ||
131 | and ignore this field.</entry> | ||
120 | </row> | 132 | </row> |
121 | </tbody> | 133 | </tbody> |
122 | </tgroup> | 134 | </tgroup> |
diff --git a/Documentation/DocBook/media/v4l/vidioc-g-selection.xml b/Documentation/DocBook/media/v4l/vidioc-g-selection.xml index a9d36e0c090e..bb04eff75f45 100644 --- a/Documentation/DocBook/media/v4l/vidioc-g-selection.xml +++ b/Documentation/DocBook/media/v4l/vidioc-g-selection.xml | |||
@@ -58,43 +58,43 @@ | |||
58 | 58 | ||
59 | <para>The ioctls are used to query and configure selection rectangles.</para> | 59 | <para>The ioctls are used to query and configure selection rectangles.</para> |
60 | 60 | ||
61 | <para> To query the cropping (composing) rectangle set <structfield> | 61 | <para> To query the cropping (composing) rectangle set &v4l2-selection; |
62 | &v4l2-selection;::type </structfield> to the respective buffer type. Do not | 62 | <structfield> type </structfield> field to the respective buffer type. |
63 | use multiplanar buffers. Use <constant> V4L2_BUF_TYPE_VIDEO_CAPTURE | 63 | Do not use multiplanar buffers. Use <constant> V4L2_BUF_TYPE_VIDEO_CAPTURE |
64 | </constant> instead of <constant> V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE | 64 | </constant> instead of <constant> V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE |
65 | </constant>. Use <constant> V4L2_BUF_TYPE_VIDEO_OUTPUT </constant> instead of | 65 | </constant>. Use <constant> V4L2_BUF_TYPE_VIDEO_OUTPUT </constant> instead of |
66 | <constant> V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE </constant>. The next step is | 66 | <constant> V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE </constant>. The next step is |
67 | setting <structfield> &v4l2-selection;::target </structfield> to value | 67 | setting the value of &v4l2-selection; <structfield>target</structfield> field |
68 | <constant> V4L2_SEL_TGT_CROP_ACTIVE </constant> (<constant> | 68 | to <constant> V4L2_SEL_TGT_CROP_ACTIVE </constant> (<constant> |
69 | V4L2_SEL_TGT_COMPOSE_ACTIVE </constant>). Please refer to table <xref | 69 | V4L2_SEL_TGT_COMPOSE_ACTIVE </constant>). Please refer to table <xref |
70 | linkend="v4l2-sel-target" /> or <xref linkend="selection-api" /> for additional | 70 | linkend="v4l2-sel-target" /> or <xref linkend="selection-api" /> for additional |
71 | targets. Fields <structfield> &v4l2-selection;::flags </structfield> and | 71 | targets. The <structfield>flags</structfield> and <structfield>reserved |
72 | <structfield> &v4l2-selection;::reserved </structfield> are ignored and they | 72 | </structfield> fields of &v4l2-selection; are ignored and they must be filled |
73 | must be filled with zeros. The driver fills the rest of the structure or | 73 | with zeros. The driver fills the rest of the structure or |
74 | returns &EINVAL; if incorrect buffer type or target was used. If cropping | 74 | returns &EINVAL; if incorrect buffer type or target was used. If cropping |
75 | (composing) is not supported then the active rectangle is not mutable and it is | 75 | (composing) is not supported then the active rectangle is not mutable and it is |
76 | always equal to the bounds rectangle. Finally, structure <structfield> | 76 | always equal to the bounds rectangle. Finally, the &v4l2-rect; |
77 | &v4l2-selection;::r </structfield> is filled with the current cropping | 77 | <structfield>r</structfield> rectangle is filled with the current cropping |
78 | (composing) coordinates. The coordinates are expressed in driver-dependent | 78 | (composing) coordinates. The coordinates are expressed in driver-dependent |
79 | units. The only exception are rectangles for images in raw formats, whose | 79 | units. The only exception are rectangles for images in raw formats, whose |
80 | coordinates are always expressed in pixels. </para> | 80 | coordinates are always expressed in pixels. </para> |
81 | 81 | ||
82 | <para> To change the cropping (composing) rectangle set <structfield> | 82 | <para> To change the cropping (composing) rectangle set the &v4l2-selection; |
83 | &v4l2-selection;::type </structfield> to the respective buffer type. Do not | 83 | <structfield>type</structfield> field to the respective buffer type. Do not |
84 | use multiplanar buffers. Use <constant> V4L2_BUF_TYPE_VIDEO_CAPTURE | 84 | use multiplanar buffers. Use <constant> V4L2_BUF_TYPE_VIDEO_CAPTURE |
85 | </constant> instead of <constant> V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE | 85 | </constant> instead of <constant> V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE |
86 | </constant>. Use <constant> V4L2_BUF_TYPE_VIDEO_OUTPUT </constant> instead of | 86 | </constant>. Use <constant> V4L2_BUF_TYPE_VIDEO_OUTPUT </constant> instead of |
87 | <constant> V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE </constant>. The next step is | 87 | <constant> V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE </constant>. The next step is |
88 | setting <structfield> &v4l2-selection;::target </structfield> to value | 88 | setting the value of &v4l2-selection; <structfield>target</structfield> to |
89 | <constant> V4L2_SEL_TGT_CROP_ACTIVE </constant> (<constant> | 89 | <constant>V4L2_SEL_TGT_CROP_ACTIVE</constant> (<constant> |
90 | V4L2_SEL_TGT_COMPOSE_ACTIVE </constant>). Please refer to table <xref | 90 | V4L2_SEL_TGT_COMPOSE_ACTIVE </constant>). Please refer to table <xref |
91 | linkend="v4l2-sel-target" /> or <xref linkend="selection-api" /> for additional | 91 | linkend="v4l2-sel-target" /> or <xref linkend="selection-api" /> for additional |
92 | targets. Set desired active area into the field <structfield> | 92 | targets. The &v4l2-rect; <structfield>r</structfield> rectangle need to be |
93 | &v4l2-selection;::r </structfield>. Field <structfield> | 93 | set to the desired active area. Field &v4l2-selection; <structfield> reserved |
94 | &v4l2-selection;::reserved </structfield> is ignored and must be filled with | 94 | </structfield> is ignored and must be filled with zeros. The driver may adjust |
95 | zeros. The driver may adjust the rectangle coordinates. An application may | 95 | coordinates of the requested rectangle. An application may |
96 | introduce constraints to control rounding behaviour. Set the field | 96 | introduce constraints to control rounding behaviour. The &v4l2-selection; |
97 | <structfield> &v4l2-selection;::flags </structfield> to one of values: | 97 | <structfield>flags</structfield> field must be set to one of the following: |
98 | 98 | ||
99 | <itemizedlist> | 99 | <itemizedlist> |
100 | <listitem> | 100 | <listitem> |
@@ -129,7 +129,7 @@ and vertical offset and sizes are chosen according to following priority: | |||
129 | 129 | ||
130 | <orderedlist> | 130 | <orderedlist> |
131 | <listitem> | 131 | <listitem> |
132 | <para>Satisfy constraints from <structfield>&v4l2-selection;::flags</structfield>.</para> | 132 | <para>Satisfy constraints from &v4l2-selection; <structfield>flags</structfield>.</para> |
133 | </listitem> | 133 | </listitem> |
134 | <listitem> | 134 | <listitem> |
135 | <para>Adjust width, height, left, and top to hardware limits and alignments.</para> | 135 | <para>Adjust width, height, left, and top to hardware limits and alignments.</para> |
@@ -145,7 +145,7 @@ and vertical offset and sizes are chosen according to following priority: | |||
145 | </listitem> | 145 | </listitem> |
146 | </orderedlist> | 146 | </orderedlist> |
147 | 147 | ||
148 | On success the field <structfield> &v4l2-selection;::r </structfield> contains | 148 | On success the &v4l2-rect; <structfield>r</structfield> field contains |
149 | the adjusted rectangle. When the parameters are unsuitable the application may | 149 | the adjusted rectangle. When the parameters are unsuitable the application may |
150 | modify the cropping (composing) or image parameters and repeat the cycle until | 150 | modify the cropping (composing) or image parameters and repeat the cycle until |
151 | satisfactory parameters have been negotiated. If constraints flags have to be | 151 | satisfactory parameters have been negotiated. If constraints flags have to be |
@@ -162,38 +162,38 @@ exist no rectangle </emphasis> that satisfies the constraints.</para> | |||
162 | <tbody valign="top"> | 162 | <tbody valign="top"> |
163 | <row> | 163 | <row> |
164 | <entry><constant>V4L2_SEL_TGT_CROP_ACTIVE</constant></entry> | 164 | <entry><constant>V4L2_SEL_TGT_CROP_ACTIVE</constant></entry> |
165 | <entry>0</entry> | 165 | <entry>0x0000</entry> |
166 | <entry>area that is currently cropped by hardware</entry> | 166 | <entry>The area that is currently cropped by hardware.</entry> |
167 | </row> | 167 | </row> |
168 | <row> | 168 | <row> |
169 | <entry><constant>V4L2_SEL_TGT_CROP_DEFAULT</constant></entry> | 169 | <entry><constant>V4L2_SEL_TGT_CROP_DEFAULT</constant></entry> |
170 | <entry>1</entry> | 170 | <entry>0x0001</entry> |
171 | <entry>suggested cropping rectangle that covers the "whole picture"</entry> | 171 | <entry>Suggested cropping rectangle that covers the "whole picture".</entry> |
172 | </row> | 172 | </row> |
173 | <row> | 173 | <row> |
174 | <entry><constant>V4L2_SEL_TGT_CROP_BOUNDS</constant></entry> | 174 | <entry><constant>V4L2_SEL_TGT_CROP_BOUNDS</constant></entry> |
175 | <entry>2</entry> | 175 | <entry>0x0002</entry> |
176 | <entry>limits for the cropping rectangle</entry> | 176 | <entry>Limits for the cropping rectangle.</entry> |
177 | </row> | 177 | </row> |
178 | <row> | 178 | <row> |
179 | <entry><constant>V4L2_SEL_TGT_COMPOSE_ACTIVE</constant></entry> | 179 | <entry><constant>V4L2_SEL_TGT_COMPOSE_ACTIVE</constant></entry> |
180 | <entry>256</entry> | 180 | <entry>0x0100</entry> |
181 | <entry>area to which data are composed by hardware</entry> | 181 | <entry>The area to which data is composed by hardware.</entry> |
182 | </row> | 182 | </row> |
183 | <row> | 183 | <row> |
184 | <entry><constant>V4L2_SEL_TGT_COMPOSE_DEFAULT</constant></entry> | 184 | <entry><constant>V4L2_SEL_TGT_COMPOSE_DEFAULT</constant></entry> |
185 | <entry>257</entry> | 185 | <entry>0x0101</entry> |
186 | <entry>suggested composing rectangle that covers the "whole picture"</entry> | 186 | <entry>Suggested composing rectangle that covers the "whole picture".</entry> |
187 | </row> | 187 | </row> |
188 | <row> | 188 | <row> |
189 | <entry><constant>V4L2_SEL_TGT_COMPOSE_BOUNDS</constant></entry> | 189 | <entry><constant>V4L2_SEL_TGT_COMPOSE_BOUNDS</constant></entry> |
190 | <entry>258</entry> | 190 | <entry>0x0102</entry> |
191 | <entry>limits for the composing rectangle</entry> | 191 | <entry>Limits for the composing rectangle.</entry> |
192 | </row> | 192 | </row> |
193 | <row> | 193 | <row> |
194 | <entry><constant>V4L2_SEL_TGT_COMPOSE_PADDED</constant></entry> | 194 | <entry><constant>V4L2_SEL_TGT_COMPOSE_PADDED</constant></entry> |
195 | <entry>259</entry> | 195 | <entry>0x0103</entry> |
196 | <entry>the active area and all padding pixels that are inserted or modified by the hardware</entry> | 196 | <entry>The active area and all padding pixels that are inserted or modified by hardware.</entry> |
197 | </row> | 197 | </row> |
198 | </tbody> | 198 | </tbody> |
199 | </tgroup> | 199 | </tgroup> |
@@ -209,12 +209,14 @@ exist no rectangle </emphasis> that satisfies the constraints.</para> | |||
209 | <row> | 209 | <row> |
210 | <entry><constant>V4L2_SEL_FLAG_GE</constant></entry> | 210 | <entry><constant>V4L2_SEL_FLAG_GE</constant></entry> |
211 | <entry>0x00000001</entry> | 211 | <entry>0x00000001</entry> |
212 | <entry>indicate that adjusted rectangle must contain a rectangle from <structfield>&v4l2-selection;::r</structfield></entry> | 212 | <entry>Indicates that the adjusted rectangle must contain the original |
213 | &v4l2-selection; <structfield>r</structfield> rectangle.</entry> | ||
213 | </row> | 214 | </row> |
214 | <row> | 215 | <row> |
215 | <entry><constant>V4L2_SEL_FLAG_LE</constant></entry> | 216 | <entry><constant>V4L2_SEL_FLAG_LE</constant></entry> |
216 | <entry>0x00000002</entry> | 217 | <entry>0x00000002</entry> |
217 | <entry>indicate that adjusted rectangle must be inside a rectangle from <structfield>&v4l2-selection;::r</structfield></entry> | 218 | <entry>Indicates that the adjusted rectangle must be inside the original |
219 | &v4l2-rect; <structfield>r</structfield> rectangle.</entry> | ||
218 | </row> | 220 | </row> |
219 | </tbody> | 221 | </tbody> |
220 | </tgroup> | 222 | </tgroup> |
@@ -245,27 +247,29 @@ exist no rectangle </emphasis> that satisfies the constraints.</para> | |||
245 | <row> | 247 | <row> |
246 | <entry>__u32</entry> | 248 | <entry>__u32</entry> |
247 | <entry><structfield>type</structfield></entry> | 249 | <entry><structfield>type</structfield></entry> |
248 | <entry>Type of the buffer (from &v4l2-buf-type;)</entry> | 250 | <entry>Type of the buffer (from &v4l2-buf-type;).</entry> |
249 | </row> | 251 | </row> |
250 | <row> | 252 | <row> |
251 | <entry>__u32</entry> | 253 | <entry>__u32</entry> |
252 | <entry><structfield>target</structfield></entry> | 254 | <entry><structfield>target</structfield></entry> |
253 | <entry>used to select between <link linkend="v4l2-sel-target"> cropping and composing rectangles </link></entry> | 255 | <entry>Used to select between <link linkend="v4l2-sel-target"> cropping |
256 | and composing rectangles</link>.</entry> | ||
254 | </row> | 257 | </row> |
255 | <row> | 258 | <row> |
256 | <entry>__u32</entry> | 259 | <entry>__u32</entry> |
257 | <entry><structfield>flags</structfield></entry> | 260 | <entry><structfield>flags</structfield></entry> |
258 | <entry>control over coordinates adjustments, refer to <link linkend="v4l2-sel-flags">selection flags</link></entry> | 261 | <entry>Flags controlling the selection rectangle adjustments, refer to |
262 | <link linkend="v4l2-sel-flags">selection flags</link>.</entry> | ||
259 | </row> | 263 | </row> |
260 | <row> | 264 | <row> |
261 | <entry>&v4l2-rect;</entry> | 265 | <entry>&v4l2-rect;</entry> |
262 | <entry><structfield>r</structfield></entry> | 266 | <entry><structfield>r</structfield></entry> |
263 | <entry>selection rectangle</entry> | 267 | <entry>The selection rectangle.</entry> |
264 | </row> | 268 | </row> |
265 | <row> | 269 | <row> |
266 | <entry>__u32</entry> | 270 | <entry>__u32</entry> |
267 | <entry><structfield>reserved[9]</structfield></entry> | 271 | <entry><structfield>reserved[9]</structfield></entry> |
268 | <entry>Reserved fields for future use</entry> | 272 | <entry>Reserved fields for future use.</entry> |
269 | </row> | 273 | </row> |
270 | </tbody> | 274 | </tbody> |
271 | </tgroup> | 275 | </tgroup> |
@@ -278,24 +282,24 @@ exist no rectangle </emphasis> that satisfies the constraints.</para> | |||
278 | <varlistentry> | 282 | <varlistentry> |
279 | <term><errorcode>EINVAL</errorcode></term> | 283 | <term><errorcode>EINVAL</errorcode></term> |
280 | <listitem> | 284 | <listitem> |
281 | <para>The buffer <structfield> &v4l2-selection;::type </structfield> | 285 | <para>Given buffer type <structfield>type</structfield> or |
282 | or <structfield> &v4l2-selection;::target </structfield> is not supported, or | 286 | the selection target <structfield>target</structfield> is not supported, |
283 | the <structfield> &v4l2-selection;::flags </structfield> are invalid.</para> | 287 | or the <structfield>flags</structfield> argument is not valid.</para> |
284 | </listitem> | 288 | </listitem> |
285 | </varlistentry> | 289 | </varlistentry> |
286 | <varlistentry> | 290 | <varlistentry> |
287 | <term><errorcode>ERANGE</errorcode></term> | 291 | <term><errorcode>ERANGE</errorcode></term> |
288 | <listitem> | 292 | <listitem> |
289 | <para>it is not possible to adjust a rectangle <structfield> | 293 | <para>It is not possible to adjust &v4l2-rect; <structfield> |
290 | &v4l2-selection;::r </structfield> that satisfies all contraints from | 294 | r</structfield> rectangle to satisfy all contraints given in the |
291 | <structfield> &v4l2-selection;::flags </structfield>.</para> | 295 | <structfield>flags</structfield> argument.</para> |
292 | </listitem> | 296 | </listitem> |
293 | </varlistentry> | 297 | </varlistentry> |
294 | <varlistentry> | 298 | <varlistentry> |
295 | <term><errorcode>EBUSY</errorcode></term> | 299 | <term><errorcode>EBUSY</errorcode></term> |
296 | <listitem> | 300 | <listitem> |
297 | <para>it is not possible to apply change of selection rectangle at the moment. | 301 | <para>It is not possible to apply change of the selection rectangle |
298 | Usually because streaming is in progress.</para> | 302 | at the moment. Usually because streaming is in progress.</para> |
299 | </listitem> | 303 | </listitem> |
300 | </varlistentry> | 304 | </varlistentry> |
301 | </variablelist> | 305 | </variablelist> |
diff --git a/Documentation/DocBook/media/v4l/vidioc-querycap.xml b/Documentation/DocBook/media/v4l/vidioc-querycap.xml index e3664d6f2de4..4643505cd4ca 100644 --- a/Documentation/DocBook/media/v4l/vidioc-querycap.xml +++ b/Documentation/DocBook/media/v4l/vidioc-querycap.xml | |||
@@ -124,12 +124,35 @@ printf ("Version: %u.%u.%u\n", | |||
124 | <row> | 124 | <row> |
125 | <entry>__u32</entry> | 125 | <entry>__u32</entry> |
126 | <entry><structfield>capabilities</structfield></entry> | 126 | <entry><structfield>capabilities</structfield></entry> |
127 | <entry>Device capabilities, see <xref | 127 | <entry>Available capabilities of the physical device as a whole, see <xref |
128 | linkend="device-capabilities" />.</entry> | 128 | linkend="device-capabilities" />. The same physical device can export |
129 | multiple devices in /dev (e.g. /dev/videoX, /dev/vbiY and /dev/radioZ). | ||
130 | The <structfield>capabilities</structfield> field should contain a union | ||
131 | of all capabilities available around the several V4L2 devices exported | ||
132 | to userspace. | ||
133 | For all those devices the <structfield>capabilities</structfield> field | ||
134 | returns the same set of capabilities. This allows applications to open | ||
135 | just one of the devices (typically the video device) and discover whether | ||
136 | video, vbi and/or radio are also supported. | ||
137 | </entry> | ||
129 | </row> | 138 | </row> |
130 | <row> | 139 | <row> |
131 | <entry>__u32</entry> | 140 | <entry>__u32</entry> |
132 | <entry><structfield>reserved</structfield>[4]</entry> | 141 | <entry><structfield>device_caps</structfield></entry> |
142 | <entry>Device capabilities of the opened device, see <xref | ||
143 | linkend="device-capabilities" />. Should contain the available capabilities | ||
144 | of that specific device node. So, for example, <structfield>device_caps</structfield> | ||
145 | of a radio device will only contain radio related capabilities and | ||
146 | no video or vbi capabilities. This field is only set if the <structfield>capabilities</structfield> | ||
147 | field contains the <constant>V4L2_CAP_DEVICE_CAPS</constant> capability. | ||
148 | Only the <structfield>capabilities</structfield> field can have the | ||
149 | <constant>V4L2_CAP_DEVICE_CAPS</constant> capability, <structfield>device_caps</structfield> | ||
150 | will never set <constant>V4L2_CAP_DEVICE_CAPS</constant>. | ||
151 | </entry> | ||
152 | </row> | ||
153 | <row> | ||
154 | <entry>__u32</entry> | ||
155 | <entry><structfield>reserved</structfield>[3]</entry> | ||
133 | <entry>Reserved for future extensions. Drivers must set | 156 | <entry>Reserved for future extensions. Drivers must set |
134 | this array to zero.</entry> | 157 | this array to zero.</entry> |
135 | </row> | 158 | </row> |
@@ -276,6 +299,13 @@ linkend="async">asynchronous</link> I/O methods.</entry> | |||
276 | <entry>The device supports the <link | 299 | <entry>The device supports the <link |
277 | linkend="mmap">streaming</link> I/O method.</entry> | 300 | linkend="mmap">streaming</link> I/O method.</entry> |
278 | </row> | 301 | </row> |
302 | <row> | ||
303 | <entry><constant>V4L2_CAP_DEVICE_CAPS</constant></entry> | ||
304 | <entry>0x80000000</entry> | ||
305 | <entry>The driver fills the <structfield>device_caps</structfield> | ||
306 | field. This capability can only appear in the <structfield>capabilities</structfield> | ||
307 | field and never in the <structfield>device_caps</structfield> field.</entry> | ||
308 | </row> | ||
279 | </tbody> | 309 | </tbody> |
280 | </tgroup> | 310 | </tgroup> |
281 | </table> | 311 | </table> |
diff --git a/Documentation/DocBook/media/v4l/vidioc-s-hw-freq-seek.xml b/Documentation/DocBook/media/v4l/vidioc-s-hw-freq-seek.xml index e013da845b11..18b1a8266f7c 100644 --- a/Documentation/DocBook/media/v4l/vidioc-s-hw-freq-seek.xml +++ b/Documentation/DocBook/media/v4l/vidioc-s-hw-freq-seek.xml | |||
@@ -96,8 +96,8 @@ field and the &v4l2-tuner; <structfield>index</structfield> field.</entry> | |||
96 | <row> | 96 | <row> |
97 | <entry>__u32</entry> | 97 | <entry>__u32</entry> |
98 | <entry><structfield>reserved</structfield>[7]</entry> | 98 | <entry><structfield>reserved</structfield>[7]</entry> |
99 | <entry>Reserved for future extensions. Drivers and | 99 | <entry>Reserved for future extensions. Applications |
100 | applications must set the array to zero.</entry> | 100 | must set the array to zero.</entry> |
101 | </row> | 101 | </row> |
102 | </tbody> | 102 | </tbody> |
103 | </tgroup> | 103 | </tgroup> |
@@ -112,7 +112,7 @@ field and the &v4l2-tuner; <structfield>index</structfield> field.</entry> | |||
112 | <term><errorcode>EINVAL</errorcode></term> | 112 | <term><errorcode>EINVAL</errorcode></term> |
113 | <listitem> | 113 | <listitem> |
114 | <para>The <structfield>tuner</structfield> index is out of | 114 | <para>The <structfield>tuner</structfield> index is out of |
115 | bounds or the value in the <structfield>type</structfield> field is | 115 | bounds, the wrap_around value is not supported or the value in the <structfield>type</structfield> field is |
116 | wrong.</para> | 116 | wrong.</para> |
117 | </listitem> | 117 | </listitem> |
118 | </varlistentry> | 118 | </varlistentry> |
diff --git a/Documentation/EDID/1024x768.S b/Documentation/EDID/1024x768.S new file mode 100644 index 000000000000..4b486fe31b32 --- /dev/null +++ b/Documentation/EDID/1024x768.S | |||
@@ -0,0 +1,44 @@ | |||
1 | /* | ||
2 | 1024x768.S: EDID data set for standard 1024x768 60 Hz monitor | ||
3 | |||
4 | Copyright (C) 2011 Carsten Emde <C.Emde@osadl.org> | ||
5 | |||
6 | This program is free software; you can redistribute it and/or | ||
7 | modify it under the terms of the GNU General Public License | ||
8 | as published by the Free Software Foundation; either version 2 | ||
9 | of the License, or (at your option) any later version. | ||
10 | |||
11 | This program is distributed in the hope that it will be useful, | ||
12 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
14 | GNU General Public License for more details. | ||
15 | |||
16 | You should have received a copy of the GNU General Public License | ||
17 | along with this program; if not, write to the Free Software | ||
18 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. | ||
19 | */ | ||
20 | |||
21 | /* EDID */ | ||
22 | #define VERSION 1 | ||
23 | #define REVISION 3 | ||
24 | |||
25 | /* Display */ | ||
26 | #define CLOCK 65000 /* kHz */ | ||
27 | #define XPIX 1024 | ||
28 | #define YPIX 768 | ||
29 | #define XY_RATIO XY_RATIO_4_3 | ||
30 | #define XBLANK 320 | ||
31 | #define YBLANK 38 | ||
32 | #define XOFFSET 8 | ||
33 | #define XPULSE 144 | ||
34 | #define YOFFSET (63+3) | ||
35 | #define YPULSE (63+6) | ||
36 | #define DPI 72 | ||
37 | #define VFREQ 60 /* Hz */ | ||
38 | #define TIMING_NAME "Linux XGA" | ||
39 | #define ESTABLISHED_TIMINGS_BITS 0x08 /* Bit 3 -> 1024x768 @60 Hz */ | ||
40 | #define HSYNC_POL 0 | ||
41 | #define VSYNC_POL 0 | ||
42 | #define CRC 0x55 | ||
43 | |||
44 | #include "edid.S" | ||
diff --git a/Documentation/EDID/1280x1024.S b/Documentation/EDID/1280x1024.S new file mode 100644 index 000000000000..a2799fe33a4d --- /dev/null +++ b/Documentation/EDID/1280x1024.S | |||
@@ -0,0 +1,44 @@ | |||
1 | /* | ||
2 | 1280x1024.S: EDID data set for standard 1280x1024 60 Hz monitor | ||
3 | |||
4 | Copyright (C) 2011 Carsten Emde <C.Emde@osadl.org> | ||
5 | |||
6 | This program is free software; you can redistribute it and/or | ||
7 | modify it under the terms of the GNU General Public License | ||
8 | as published by the Free Software Foundation; either version 2 | ||
9 | of the License, or (at your option) any later version. | ||
10 | |||
11 | This program is distributed in the hope that it will be useful, | ||
12 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
14 | GNU General Public License for more details. | ||
15 | |||
16 | You should have received a copy of the GNU General Public License | ||
17 | along with this program; if not, write to the Free Software | ||
18 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. | ||
19 | */ | ||
20 | |||
21 | /* EDID */ | ||
22 | #define VERSION 1 | ||
23 | #define REVISION 3 | ||
24 | |||
25 | /* Display */ | ||
26 | #define CLOCK 108000 /* kHz */ | ||
27 | #define XPIX 1280 | ||
28 | #define YPIX 1024 | ||
29 | #define XY_RATIO XY_RATIO_5_4 | ||
30 | #define XBLANK 408 | ||
31 | #define YBLANK 42 | ||
32 | #define XOFFSET 48 | ||
33 | #define XPULSE 112 | ||
34 | #define YOFFSET (63+1) | ||
35 | #define YPULSE (63+3) | ||
36 | #define DPI 72 | ||
37 | #define VFREQ 60 /* Hz */ | ||
38 | #define TIMING_NAME "Linux SXGA" | ||
39 | #define ESTABLISHED_TIMINGS_BITS 0x00 /* none */ | ||
40 | #define HSYNC_POL 1 | ||
41 | #define VSYNC_POL 1 | ||
42 | #define CRC 0xa0 | ||
43 | |||
44 | #include "edid.S" | ||
diff --git a/Documentation/EDID/1680x1050.S b/Documentation/EDID/1680x1050.S new file mode 100644 index 000000000000..96f67cafcf2e --- /dev/null +++ b/Documentation/EDID/1680x1050.S | |||
@@ -0,0 +1,44 @@ | |||
1 | /* | ||
2 | 1680x1050.S: EDID data set for standard 1680x1050 60 Hz monitor | ||
3 | |||
4 | Copyright (C) 2012 Carsten Emde <C.Emde@osadl.org> | ||
5 | |||
6 | This program is free software; you can redistribute it and/or | ||
7 | modify it under the terms of the GNU General Public License | ||
8 | as published by the Free Software Foundation; either version 2 | ||
9 | of the License, or (at your option) any later version. | ||
10 | |||
11 | This program is distributed in the hope that it will be useful, | ||
12 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
14 | GNU General Public License for more details. | ||
15 | |||
16 | You should have received a copy of the GNU General Public License | ||
17 | along with this program; if not, write to the Free Software | ||
18 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. | ||
19 | */ | ||
20 | |||
21 | /* EDID */ | ||
22 | #define VERSION 1 | ||
23 | #define REVISION 3 | ||
24 | |||
25 | /* Display */ | ||
26 | #define CLOCK 146250 /* kHz */ | ||
27 | #define XPIX 1680 | ||
28 | #define YPIX 1050 | ||
29 | #define XY_RATIO XY_RATIO_16_10 | ||
30 | #define XBLANK 560 | ||
31 | #define YBLANK 39 | ||
32 | #define XOFFSET 104 | ||
33 | #define XPULSE 176 | ||
34 | #define YOFFSET (63+3) | ||
35 | #define YPULSE (63+6) | ||
36 | #define DPI 96 | ||
37 | #define VFREQ 60 /* Hz */ | ||
38 | #define TIMING_NAME "Linux WSXGA" | ||
39 | #define ESTABLISHED_TIMINGS_BITS 0x00 /* none */ | ||
40 | #define HSYNC_POL 1 | ||
41 | #define VSYNC_POL 1 | ||
42 | #define CRC 0x26 | ||
43 | |||
44 | #include "edid.S" | ||
diff --git a/Documentation/EDID/1920x1080.S b/Documentation/EDID/1920x1080.S new file mode 100644 index 000000000000..36ed5d571d0a --- /dev/null +++ b/Documentation/EDID/1920x1080.S | |||
@@ -0,0 +1,44 @@ | |||
1 | /* | ||
2 | 1920x1080.S: EDID data set for standard 1920x1080 60 Hz monitor | ||
3 | |||
4 | Copyright (C) 2012 Carsten Emde <C.Emde@osadl.org> | ||
5 | |||
6 | This program is free software; you can redistribute it and/or | ||
7 | modify it under the terms of the GNU General Public License | ||
8 | as published by the Free Software Foundation; either version 2 | ||
9 | of the License, or (at your option) any later version. | ||
10 | |||
11 | This program is distributed in the hope that it will be useful, | ||
12 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
14 | GNU General Public License for more details. | ||
15 | |||
16 | You should have received a copy of the GNU General Public License | ||
17 | along with this program; if not, write to the Free Software | ||
18 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. | ||
19 | */ | ||
20 | |||
21 | /* EDID */ | ||
22 | #define VERSION 1 | ||
23 | #define REVISION 3 | ||
24 | |||
25 | /* Display */ | ||
26 | #define CLOCK 148500 /* kHz */ | ||
27 | #define XPIX 1920 | ||
28 | #define YPIX 1080 | ||
29 | #define XY_RATIO XY_RATIO_16_9 | ||
30 | #define XBLANK 280 | ||
31 | #define YBLANK 45 | ||
32 | #define XOFFSET 88 | ||
33 | #define XPULSE 44 | ||
34 | #define YOFFSET (63+4) | ||
35 | #define YPULSE (63+5) | ||
36 | #define DPI 96 | ||
37 | #define VFREQ 60 /* Hz */ | ||
38 | #define TIMING_NAME "Linux FHD" | ||
39 | #define ESTABLISHED_TIMINGS_BITS 0x00 /* none */ | ||
40 | #define HSYNC_POL 1 | ||
41 | #define VSYNC_POL 1 | ||
42 | #define CRC 0x05 | ||
43 | |||
44 | #include "edid.S" | ||
diff --git a/Documentation/EDID/HOWTO.txt b/Documentation/EDID/HOWTO.txt new file mode 100644 index 000000000000..75a9f2a0c43d --- /dev/null +++ b/Documentation/EDID/HOWTO.txt | |||
@@ -0,0 +1,39 @@ | |||
1 | In the good old days when graphics parameters were configured explicitly | ||
2 | in a file called xorg.conf, even broken hardware could be managed. | ||
3 | |||
4 | Today, with the advent of Kernel Mode Setting, a graphics board is | ||
5 | either correctly working because all components follow the standards - | ||
6 | or the computer is unusable, because the screen remains dark after | ||
7 | booting or it displays the wrong area. Cases when this happens are: | ||
8 | - The graphics board does not recognize the monitor. | ||
9 | - The graphics board is unable to detect any EDID data. | ||
10 | - The graphics board incorrectly forwards EDID data to the driver. | ||
11 | - The monitor sends no or bogus EDID data. | ||
12 | - A KVM sends its own EDID data instead of querying the connected monitor. | ||
13 | Adding the kernel parameter "nomodeset" helps in most cases, but causes | ||
14 | restrictions later on. | ||
15 | |||
16 | As a remedy for such situations, the kernel configuration item | ||
17 | CONFIG_DRM_LOAD_EDID_FIRMWARE was introduced. It allows to provide an | ||
18 | individually prepared or corrected EDID data set in the /lib/firmware | ||
19 | directory from where it is loaded via the firmware interface. The code | ||
20 | (see drivers/gpu/drm/drm_edid_load.c) contains built-in data sets for | ||
21 | commonly used screen resolutions (1024x768, 1280x1024, 1680x1050, | ||
22 | 1920x1080) as binary blobs, but the kernel source tree does not contain | ||
23 | code to create these data. In order to elucidate the origin of the | ||
24 | built-in binary EDID blobs and to facilitate the creation of individual | ||
25 | data for a specific misbehaving monitor, commented sources and a | ||
26 | Makefile environment are given here. | ||
27 | |||
28 | To create binary EDID and C source code files from the existing data | ||
29 | material, simply type "make". | ||
30 | |||
31 | If you want to create your own EDID file, copy the file 1024x768.S and | ||
32 | replace the settings with your own data. The CRC value in the last line | ||
33 | #define CRC 0x55 | ||
34 | is a bit tricky. After a first version of the binary data set is | ||
35 | created, it must be be checked with the "edid-decode" utility which will | ||
36 | most probably complain about a wrong CRC. Fortunately, the utility also | ||
37 | displays the correct CRC which must then be inserted into the source | ||
38 | file. After the make procedure is repeated, the EDID data set is ready | ||
39 | to be used. | ||
diff --git a/Documentation/EDID/Makefile b/Documentation/EDID/Makefile new file mode 100644 index 000000000000..17763ca3f12b --- /dev/null +++ b/Documentation/EDID/Makefile | |||
@@ -0,0 +1,26 @@ | |||
1 | |||
2 | SOURCES := $(wildcard [0-9]*x[0-9]*.S) | ||
3 | |||
4 | BIN := $(patsubst %.S, %.bin, $(SOURCES)) | ||
5 | |||
6 | IHEX := $(patsubst %.S, %.bin.ihex, $(SOURCES)) | ||
7 | |||
8 | CODE := $(patsubst %.S, %.c, $(SOURCES)) | ||
9 | |||
10 | all: $(BIN) $(IHEX) $(CODE) | ||
11 | |||
12 | clean: | ||
13 | @rm -f *.o *.bin.ihex *.bin *.c | ||
14 | |||
15 | %.o: %.S | ||
16 | @cc -c $^ | ||
17 | |||
18 | %.bin: %.o | ||
19 | @objcopy -Obinary $^ $@ | ||
20 | |||
21 | %.bin.ihex: %.o | ||
22 | @objcopy -Oihex $^ $@ | ||
23 | @dos2unix $@ 2>/dev/null | ||
24 | |||
25 | %.c: %.bin | ||
26 | @echo "{" >$@; hexdump -f hex $^ >>$@; echo "};" >>$@ | ||
diff --git a/Documentation/EDID/edid.S b/Documentation/EDID/edid.S new file mode 100644 index 000000000000..ea97ae275fca --- /dev/null +++ b/Documentation/EDID/edid.S | |||
@@ -0,0 +1,261 @@ | |||
1 | /* | ||
2 | edid.S: EDID data template | ||
3 | |||
4 | Copyright (C) 2012 Carsten Emde <C.Emde@osadl.org> | ||
5 | |||
6 | This program is free software; you can redistribute it and/or | ||
7 | modify it under the terms of the GNU General Public License | ||
8 | as published by the Free Software Foundation; either version 2 | ||
9 | of the License, or (at your option) any later version. | ||
10 | |||
11 | This program is distributed in the hope that it will be useful, | ||
12 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
14 | GNU General Public License for more details. | ||
15 | |||
16 | You should have received a copy of the GNU General Public License | ||
17 | along with this program; if not, write to the Free Software | ||
18 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. | ||
19 | */ | ||
20 | |||
21 | |||
22 | /* Manufacturer */ | ||
23 | #define MFG_LNX1 'L' | ||
24 | #define MFG_LNX2 'N' | ||
25 | #define MFG_LNX3 'X' | ||
26 | #define SERIAL 0 | ||
27 | #define YEAR 2012 | ||
28 | #define WEEK 5 | ||
29 | |||
30 | /* EDID 1.3 standard definitions */ | ||
31 | #define XY_RATIO_16_10 0b00 | ||
32 | #define XY_RATIO_4_3 0b01 | ||
33 | #define XY_RATIO_5_4 0b10 | ||
34 | #define XY_RATIO_16_9 0b11 | ||
35 | |||
36 | #define mfgname2id(v1,v2,v3) \ | ||
37 | ((((v1-'@')&0x1f)<<10)+(((v2-'@')&0x1f)<<5)+((v3-'@')&0x1f)) | ||
38 | #define swap16(v1) ((v1>>8)+((v1&0xff)<<8)) | ||
39 | #define msbs2(v1,v2) ((((v1>>8)&0x0f)<<4)+((v2>>8)&0x0f)) | ||
40 | #define msbs4(v1,v2,v3,v4) \ | ||
41 | (((v1&0x03)>>2)+((v2&0x03)>>4)+((v3&0x03)>>6)+((v4&0x03)>>8)) | ||
42 | #define pixdpi2mm(pix,dpi) ((pix*25)/dpi) | ||
43 | #define xsize pixdpi2mm(XPIX,DPI) | ||
44 | #define ysize pixdpi2mm(YPIX,DPI) | ||
45 | |||
46 | .data | ||
47 | |||
48 | /* Fixed header pattern */ | ||
49 | header: .byte 0x00,0xff,0xff,0xff,0xff,0xff,0xff,0x00 | ||
50 | |||
51 | mfg_id: .word swap16(mfgname2id(MFG_LNX1, MFG_LNX2, MFG_LNX3)) | ||
52 | |||
53 | prod_code: .word 0 | ||
54 | |||
55 | /* Serial number. 32 bits, little endian. */ | ||
56 | serial_number: .long SERIAL | ||
57 | |||
58 | /* Week of manufacture */ | ||
59 | week: .byte WEEK | ||
60 | |||
61 | /* Year of manufacture, less 1990. (1990-2245) | ||
62 | If week=255, it is the model year instead */ | ||
63 | year: .byte YEAR-1990 | ||
64 | |||
65 | version: .byte VERSION /* EDID version, usually 1 (for 1.3) */ | ||
66 | revision: .byte REVISION /* EDID revision, usually 3 (for 1.3) */ | ||
67 | |||
68 | /* If Bit 7=1 Digital input. If set, the following bit definitions apply: | ||
69 | Bits 6-1 Reserved, must be 0 | ||
70 | Bit 0 Signal is compatible with VESA DFP 1.x TMDS CRGB, | ||
71 | 1 pixel per clock, up to 8 bits per color, MSB aligned, | ||
72 | If Bit 7=0 Analog input. If clear, the following bit definitions apply: | ||
73 | Bits 6-5 Video white and sync levels, relative to blank | ||
74 | 00=+0.7/-0.3 V; 01=+0.714/-0.286 V; | ||
75 | 10=+1.0/-0.4 V; 11=+0.7/0 V | ||
76 | Bit 4 Blank-to-black setup (pedestal) expected | ||
77 | Bit 3 Separate sync supported | ||
78 | Bit 2 Composite sync (on HSync) supported | ||
79 | Bit 1 Sync on green supported | ||
80 | Bit 0 VSync pulse must be serrated when somposite or | ||
81 | sync-on-green is used. */ | ||
82 | video_parms: .byte 0x6d | ||
83 | |||
84 | /* Maximum horizontal image size, in centimetres | ||
85 | (max 292 cm/115 in at 16:9 aspect ratio) */ | ||
86 | max_hor_size: .byte xsize/10 | ||
87 | |||
88 | /* Maximum vertical image size, in centimetres. | ||
89 | If either byte is 0, undefined (e.g. projector) */ | ||
90 | max_vert_size: .byte ysize/10 | ||
91 | |||
92 | /* Display gamma, minus 1, times 100 (range 1.00-3.5 */ | ||
93 | gamma: .byte 120 | ||
94 | |||
95 | /* Bit 7 DPMS standby supported | ||
96 | Bit 6 DPMS suspend supported | ||
97 | Bit 5 DPMS active-off supported | ||
98 | Bits 4-3 Display type: 00=monochrome; 01=RGB colour; | ||
99 | 10=non-RGB multicolour; 11=undefined | ||
100 | Bit 2 Standard sRGB colour space. Bytes 25-34 must contain | ||
101 | sRGB standard values. | ||
102 | Bit 1 Preferred timing mode specified in descriptor block 1. | ||
103 | Bit 0 GTF supported with default parameter values. */ | ||
104 | dsp_features: .byte 0xea | ||
105 | |||
106 | /* Chromaticity coordinates. */ | ||
107 | /* Red and green least-significant bits | ||
108 | Bits 7-6 Red x value least-significant 2 bits | ||
109 | Bits 5-4 Red y value least-significant 2 bits | ||
110 | Bits 3-2 Green x value lst-significant 2 bits | ||
111 | Bits 1-0 Green y value least-significant 2 bits */ | ||
112 | red_green_lsb: .byte 0x5e | ||
113 | |||
114 | /* Blue and white least-significant 2 bits */ | ||
115 | blue_white_lsb: .byte 0xc0 | ||
116 | |||
117 | /* Red x value most significant 8 bits. | ||
118 | 0-255 encodes 0-0.996 (255/256); 0-0.999 (1023/1024) with lsbits */ | ||
119 | red_x_msb: .byte 0xa4 | ||
120 | |||
121 | /* Red y value most significant 8 bits */ | ||
122 | red_y_msb: .byte 0x59 | ||
123 | |||
124 | /* Green x and y value most significant 8 bits */ | ||
125 | green_x_y_msb: .byte 0x4a,0x98 | ||
126 | |||
127 | /* Blue x and y value most significant 8 bits */ | ||
128 | blue_x_y_msb: .byte 0x25,0x20 | ||
129 | |||
130 | /* Default white point x and y value most significant 8 bits */ | ||
131 | white_x_y_msb: .byte 0x50,0x54 | ||
132 | |||
133 | /* Established timings */ | ||
134 | /* Bit 7 720x400 @ 70 Hz | ||
135 | Bit 6 720x400 @ 88 Hz | ||
136 | Bit 5 640x480 @ 60 Hz | ||
137 | Bit 4 640x480 @ 67 Hz | ||
138 | Bit 3 640x480 @ 72 Hz | ||
139 | Bit 2 640x480 @ 75 Hz | ||
140 | Bit 1 800x600 @ 56 Hz | ||
141 | Bit 0 800x600 @ 60 Hz */ | ||
142 | estbl_timing1: .byte 0x00 | ||
143 | |||
144 | /* Bit 7 800x600 @ 72 Hz | ||
145 | Bit 6 800x600 @ 75 Hz | ||
146 | Bit 5 832x624 @ 75 Hz | ||
147 | Bit 4 1024x768 @ 87 Hz, interlaced (1024x768) | ||
148 | Bit 3 1024x768 @ 60 Hz | ||
149 | Bit 2 1024x768 @ 72 Hz | ||
150 | Bit 1 1024x768 @ 75 Hz | ||
151 | Bit 0 1280x1024 @ 75 Hz */ | ||
152 | estbl_timing2: .byte ESTABLISHED_TIMINGS_BITS | ||
153 | |||
154 | /* Bit 7 1152x870 @ 75 Hz (Apple Macintosh II) | ||
155 | Bits 6-0 Other manufacturer-specific display mod */ | ||
156 | estbl_timing3: .byte 0x00 | ||
157 | |||
158 | /* Standard timing */ | ||
159 | /* X resolution, less 31, divided by 8 (256-2288 pixels) */ | ||
160 | std_xres: .byte (XPIX/8)-31 | ||
161 | /* Y resolution, X:Y pixel ratio | ||
162 | Bits 7-6 X:Y pixel ratio: 00=16:10; 01=4:3; 10=5:4; 11=16:9. | ||
163 | Bits 5-0 Vertical frequency, less 60 (60-123 Hz) */ | ||
164 | std_vres: .byte (XY_RATIO<<6)+VFREQ-60 | ||
165 | .fill 7,2,0x0101 /* Unused */ | ||
166 | |||
167 | descriptor1: | ||
168 | /* Pixel clock in 10 kHz units. (0.-655.35 MHz, little-endian) */ | ||
169 | clock: .word CLOCK/10 | ||
170 | |||
171 | /* Horizontal active pixels 8 lsbits (0-4095) */ | ||
172 | x_act_lsb: .byte XPIX&0xff | ||
173 | /* Horizontal blanking pixels 8 lsbits (0-4095) | ||
174 | End of active to start of next active. */ | ||
175 | x_blk_lsb: .byte XBLANK&0xff | ||
176 | /* Bits 7-4 Horizontal active pixels 4 msbits | ||
177 | Bits 3-0 Horizontal blanking pixels 4 msbits */ | ||
178 | x_msbs: .byte msbs2(XPIX,XBLANK) | ||
179 | |||
180 | /* Vertical active lines 8 lsbits (0-4095) */ | ||
181 | y_act_lsb: .byte YPIX&0xff | ||
182 | /* Vertical blanking lines 8 lsbits (0-4095) */ | ||
183 | y_blk_lsb: .byte YBLANK&0xff | ||
184 | /* Bits 7-4 Vertical active lines 4 msbits | ||
185 | Bits 3-0 Vertical blanking lines 4 msbits */ | ||
186 | y_msbs: .byte msbs2(YPIX,YBLANK) | ||
187 | |||
188 | /* Horizontal sync offset pixels 8 lsbits (0-1023) From blanking start */ | ||
189 | x_snc_off_lsb: .byte XOFFSET&0xff | ||
190 | /* Horizontal sync pulse width pixels 8 lsbits (0-1023) */ | ||
191 | x_snc_pls_lsb: .byte XPULSE&0xff | ||
192 | /* Bits 7-4 Vertical sync offset lines 4 lsbits -63) | ||
193 | Bits 3-0 Vertical sync pulse width lines 4 lsbits -63) */ | ||
194 | y_snc_lsb: .byte ((YOFFSET-63)<<4)+(YPULSE-63) | ||
195 | /* Bits 7-6 Horizontal sync offset pixels 2 msbits | ||
196 | Bits 5-4 Horizontal sync pulse width pixels 2 msbits | ||
197 | Bits 3-2 Vertical sync offset lines 2 msbits | ||
198 | Bits 1-0 Vertical sync pulse width lines 2 msbits */ | ||
199 | xy_snc_msbs: .byte msbs4(XOFFSET,XPULSE,YOFFSET,YPULSE) | ||
200 | |||
201 | /* Horizontal display size, mm, 8 lsbits (0-4095 mm, 161 in) */ | ||
202 | x_dsp_size: .byte xsize&0xff | ||
203 | |||
204 | /* Vertical display size, mm, 8 lsbits (0-4095 mm, 161 in) */ | ||
205 | y_dsp_size: .byte ysize&0xff | ||
206 | |||
207 | /* Bits 7-4 Horizontal display size, mm, 4 msbits | ||
208 | Bits 3-0 Vertical display size, mm, 4 msbits */ | ||
209 | dsp_size_mbsb: .byte msbs2(xsize,ysize) | ||
210 | |||
211 | /* Horizontal border pixels (each side; total is twice this) */ | ||
212 | x_border: .byte 0 | ||
213 | /* Vertical border lines (each side; total is twice this) */ | ||
214 | y_border: .byte 0 | ||
215 | |||
216 | /* Bit 7 Interlaced | ||
217 | Bits 6-5 Stereo mode: 00=No stereo; other values depend on bit 0: | ||
218 | Bit 0=0: 01=Field sequential, sync=1 during right; 10=similar, | ||
219 | sync=1 during left; 11=4-way interleaved stereo | ||
220 | Bit 0=1 2-way interleaved stereo: 01=Right image on even lines; | ||
221 | 10=Left image on even lines; 11=side-by-side | ||
222 | Bits 4-3 Sync type: 00=Analog composite; 01=Bipolar analog composite; | ||
223 | 10=Digital composite (on HSync); 11=Digital separate | ||
224 | Bit 2 If digital separate: Vertical sync polarity (1=positive) | ||
225 | Other types: VSync serrated (HSync during VSync) | ||
226 | Bit 1 If analog sync: Sync on all 3 RGB lines (else green only) | ||
227 | Digital: HSync polarity (1=positive) | ||
228 | Bit 0 2-way line-interleaved stereo, if bits 4-3 are not 00. */ | ||
229 | features: .byte 0x18+(VSYNC_POL<<2)+(HSYNC_POL<<1) | ||
230 | |||
231 | descriptor2: .byte 0,0 /* Not a detailed timing descriptor */ | ||
232 | .byte 0 /* Must be zero */ | ||
233 | .byte 0xff /* Descriptor is monitor serial number (text) */ | ||
234 | .byte 0 /* Must be zero */ | ||
235 | start1: .ascii "Linux #0" | ||
236 | end1: .byte 0x0a /* End marker */ | ||
237 | .fill 12-(end1-start1), 1, 0x20 /* Padded spaces */ | ||
238 | descriptor3: .byte 0,0 /* Not a detailed timing descriptor */ | ||
239 | .byte 0 /* Must be zero */ | ||
240 | .byte 0xfd /* Descriptor is monitor range limits */ | ||
241 | .byte 0 /* Must be zero */ | ||
242 | start2: .byte VFREQ-1 /* Minimum vertical field rate (1-255 Hz) */ | ||
243 | .byte VFREQ+1 /* Maximum vertical field rate (1-255 Hz) */ | ||
244 | .byte (CLOCK/(XPIX+XBLANK))-1 /* Minimum horizontal line rate | ||
245 | (1-255 kHz) */ | ||
246 | .byte (CLOCK/(XPIX+XBLANK))+1 /* Maximum horizontal line rate | ||
247 | (1-255 kHz) */ | ||
248 | .byte (CLOCK/10000)+1 /* Maximum pixel clock rate, rounded up | ||
249 | to 10 MHz multiple (10-2550 MHz) */ | ||
250 | .byte 0 /* No extended timing information type */ | ||
251 | end2: .byte 0x0a /* End marker */ | ||
252 | .fill 12-(end2-start2), 1, 0x20 /* Padded spaces */ | ||
253 | descriptor4: .byte 0,0 /* Not a detailed timing descriptor */ | ||
254 | .byte 0 /* Must be zero */ | ||
255 | .byte 0xfc /* Descriptor is text */ | ||
256 | .byte 0 /* Must be zero */ | ||
257 | start3: .ascii TIMING_NAME | ||
258 | end3: .byte 0x0a /* End marker */ | ||
259 | .fill 12-(end3-start3), 1, 0x20 /* Padded spaces */ | ||
260 | extensions: .byte 0 /* Number of extensions to follow */ | ||
261 | checksum: .byte CRC /* Sum of all bytes must be 0 */ | ||
diff --git a/Documentation/EDID/hex b/Documentation/EDID/hex new file mode 100644 index 000000000000..8873ebb618af --- /dev/null +++ b/Documentation/EDID/hex | |||
@@ -0,0 +1 @@ | |||
"\t" 8/1 "0x%02x, " "\n" | |||
diff --git a/Documentation/IRQ-domain.txt b/Documentation/IRQ-domain.txt new file mode 100644 index 000000000000..27dcaabfb4db --- /dev/null +++ b/Documentation/IRQ-domain.txt | |||
@@ -0,0 +1,117 @@ | |||
1 | irq_domain interrupt number mapping library | ||
2 | |||
3 | The current design of the Linux kernel uses a single large number | ||
4 | space where each separate IRQ source is assigned a different number. | ||
5 | This is simple when there is only one interrupt controller, but in | ||
6 | systems with multiple interrupt controllers the kernel must ensure | ||
7 | that each one gets assigned non-overlapping allocations of Linux | ||
8 | IRQ numbers. | ||
9 | |||
10 | The irq_alloc_desc*() and irq_free_desc*() APIs provide allocation of | ||
11 | irq numbers, but they don't provide any support for reverse mapping of | ||
12 | the controller-local IRQ (hwirq) number into the Linux IRQ number | ||
13 | space. | ||
14 | |||
15 | The irq_domain library adds mapping between hwirq and IRQ numbers on | ||
16 | top of the irq_alloc_desc*() API. An irq_domain to manage mapping is | ||
17 | preferred over interrupt controller drivers open coding their own | ||
18 | reverse mapping scheme. | ||
19 | |||
20 | irq_domain also implements translation from Device Tree interrupt | ||
21 | specifiers to hwirq numbers, and can be easily extended to support | ||
22 | other IRQ topology data sources. | ||
23 | |||
24 | === irq_domain usage === | ||
25 | An interrupt controller driver creates and registers an irq_domain by | ||
26 | calling one of the irq_domain_add_*() functions (each mapping method | ||
27 | has a different allocator function, more on that later). The function | ||
28 | will return a pointer to the irq_domain on success. The caller must | ||
29 | provide the allocator function with an irq_domain_ops structure with | ||
30 | the .map callback populated as a minimum. | ||
31 | |||
32 | In most cases, the irq_domain will begin empty without any mappings | ||
33 | between hwirq and IRQ numbers. Mappings are added to the irq_domain | ||
34 | by calling irq_create_mapping() which accepts the irq_domain and a | ||
35 | hwirq number as arguments. If a mapping for the hwirq doesn't already | ||
36 | exist then it will allocate a new Linux irq_desc, associate it with | ||
37 | the hwirq, and call the .map() callback so the driver can perform any | ||
38 | required hardware setup. | ||
39 | |||
40 | When an interrupt is received, irq_find_mapping() function should | ||
41 | be used to find the Linux IRQ number from the hwirq number. | ||
42 | |||
43 | If the driver has the Linux IRQ number or the irq_data pointer, and | ||
44 | needs to know the associated hwirq number (such as in the irq_chip | ||
45 | callbacks) then it can be directly obtained from irq_data->hwirq. | ||
46 | |||
47 | === Types of irq_domain mappings === | ||
48 | There are several mechanisms available for reverse mapping from hwirq | ||
49 | to Linux irq, and each mechanism uses a different allocation function. | ||
50 | Which reverse map type should be used depends on the use case. Each | ||
51 | of the reverse map types are described below: | ||
52 | |||
53 | ==== Linear ==== | ||
54 | irq_domain_add_linear() | ||
55 | |||
56 | The linear reverse map maintains a fixed size table indexed by the | ||
57 | hwirq number. When a hwirq is mapped, an irq_desc is allocated for | ||
58 | the hwirq, and the IRQ number is stored in the table. | ||
59 | |||
60 | The Linear map is a good choice when the maximum number of hwirqs is | ||
61 | fixed and a relatively small number (~ < 256). The advantages of this | ||
62 | map are fixed time lookup for IRQ numbers, and irq_descs are only | ||
63 | allocated for in-use IRQs. The disadvantage is that the table must be | ||
64 | as large as the largest possible hwirq number. | ||
65 | |||
66 | The majority of drivers should use the linear map. | ||
67 | |||
68 | ==== Tree ==== | ||
69 | irq_domain_add_tree() | ||
70 | |||
71 | The irq_domain maintains a radix tree map from hwirq numbers to Linux | ||
72 | IRQs. When an hwirq is mapped, an irq_desc is allocated and the | ||
73 | hwirq is used as the lookup key for the radix tree. | ||
74 | |||
75 | The tree map is a good choice if the hwirq number can be very large | ||
76 | since it doesn't need to allocate a table as large as the largest | ||
77 | hwirq number. The disadvantage is that hwirq to IRQ number lookup is | ||
78 | dependent on how many entries are in the table. | ||
79 | |||
80 | Very few drivers should need this mapping. At the moment, powerpc | ||
81 | iseries is the only user. | ||
82 | |||
83 | ==== No Map ===- | ||
84 | irq_domain_add_nomap() | ||
85 | |||
86 | The No Map mapping is to be used when the hwirq number is | ||
87 | programmable in the hardware. In this case it is best to program the | ||
88 | Linux IRQ number into the hardware itself so that no mapping is | ||
89 | required. Calling irq_create_direct_mapping() will allocate a Linux | ||
90 | IRQ number and call the .map() callback so that driver can program the | ||
91 | Linux IRQ number into the hardware. | ||
92 | |||
93 | Most drivers cannot use this mapping. | ||
94 | |||
95 | ==== Legacy ==== | ||
96 | irq_domain_add_legacy() | ||
97 | irq_domain_add_legacy_isa() | ||
98 | |||
99 | The Legacy mapping is a special case for drivers that already have a | ||
100 | range of irq_descs allocated for the hwirqs. It is used when the | ||
101 | driver cannot be immediately converted to use the linear mapping. For | ||
102 | example, many embedded system board support files use a set of #defines | ||
103 | for IRQ numbers that are passed to struct device registrations. In that | ||
104 | case the Linux IRQ numbers cannot be dynamically assigned and the legacy | ||
105 | mapping should be used. | ||
106 | |||
107 | The legacy map assumes a contiguous range of IRQ numbers has already | ||
108 | been allocated for the controller and that the IRQ number can be | ||
109 | calculated by adding a fixed offset to the hwirq number, and | ||
110 | visa-versa. The disadvantage is that it requires the interrupt | ||
111 | controller to manage IRQ allocations and it requires an irq_desc to be | ||
112 | allocated for every hwirq, even if it is unused. | ||
113 | |||
114 | The legacy map should only be used if fixed IRQ mappings must be | ||
115 | supported. For example, ISA controllers would use the legacy map for | ||
116 | mapping Linux IRQs 0-15 so that existing ISA drivers get the correct IRQ | ||
117 | numbers. | ||
diff --git a/Documentation/Makefile b/Documentation/Makefile index 9b4bc5c76f33..30b656ece7aa 100644 --- a/Documentation/Makefile +++ b/Documentation/Makefile | |||
@@ -1,3 +1,3 @@ | |||
1 | obj-m := DocBook/ accounting/ auxdisplay/ connector/ \ | 1 | obj-m := DocBook/ accounting/ auxdisplay/ connector/ \ |
2 | filesystems/ filesystems/configfs/ ia64/ laptops/ networking/ \ | 2 | filesystems/ filesystems/configfs/ ia64/ laptops/ networking/ \ |
3 | pcmcia/ spi/ timers/ vm/ watchdog/src/ | 3 | pcmcia/ spi/ timers/ watchdog/src/ |
diff --git a/Documentation/RCU/RTFP.txt b/Documentation/RCU/RTFP.txt index c43460dade0f..7c1dfb19fc40 100644 --- a/Documentation/RCU/RTFP.txt +++ b/Documentation/RCU/RTFP.txt | |||
@@ -1,9 +1,10 @@ | |||
1 | Read the F-ing Papers! | 1 | Read the Fscking Papers! |
2 | 2 | ||
3 | 3 | ||
4 | This document describes RCU-related publications, and is followed by | 4 | This document describes RCU-related publications, and is followed by |
5 | the corresponding bibtex entries. A number of the publications may | 5 | the corresponding bibtex entries. A number of the publications may |
6 | be found at http://www.rdrop.com/users/paulmck/RCU/. | 6 | be found at http://www.rdrop.com/users/paulmck/RCU/. For others, browsers |
7 | and search engines will usually find what you are looking for. | ||
7 | 8 | ||
8 | The first thing resembling RCU was published in 1980, when Kung and Lehman | 9 | The first thing resembling RCU was published in 1980, when Kung and Lehman |
9 | [Kung80] recommended use of a garbage collector to defer destruction | 10 | [Kung80] recommended use of a garbage collector to defer destruction |
@@ -160,7 +161,26 @@ which Mathieu Desnoyers is now maintaining [MathieuDesnoyers2009URCU] | |||
160 | [MathieuDesnoyersPhD]. TINY_RCU [PaulEMcKenney2009BloatWatchRCU] made | 161 | [MathieuDesnoyersPhD]. TINY_RCU [PaulEMcKenney2009BloatWatchRCU] made |
161 | its appearance, as did expedited RCU [PaulEMcKenney2009expeditedRCU]. | 162 | its appearance, as did expedited RCU [PaulEMcKenney2009expeditedRCU]. |
162 | The problem of resizeable RCU-protected hash tables may now be on a path | 163 | The problem of resizeable RCU-protected hash tables may now be on a path |
163 | to a solution [JoshTriplett2009RPHash]. | 164 | to a solution [JoshTriplett2009RPHash]. A few academic researchers are now |
165 | using RCU to solve their parallel problems [HariKannan2009DynamicAnalysisRCU]. | ||
166 | |||
167 | 2010 produced a simpler preemptible-RCU implementation | ||
168 | based on TREE_RCU [PaulEMcKenney2010SimpleOptRCU], lockdep-RCU | ||
169 | [PaulEMcKenney2010LockdepRCU], another resizeable RCU-protected hash | ||
170 | table [HerbertXu2010RCUResizeHash] (this one consuming more memory, | ||
171 | but allowing arbitrary changes in hash function, as required for DoS | ||
172 | avoidance in the networking code), realization of the 2009 RCU-protected | ||
173 | hash table with atomic node move [JoshTriplett2010RPHash], an update on | ||
174 | the RCU API [PaulEMcKenney2010RCUAPI]. | ||
175 | |||
176 | 2011 marked the inclusion of Nick Piggin's fully lockless dentry search | ||
177 | [LinusTorvalds2011Linux2:6:38:rc1:NPigginVFS], an RCU-protected red-black | ||
178 | tree using software transactional memory to protect concurrent updates | ||
179 | (strange, but true!) [PhilHoward2011RCUTMRBTree], yet another variant of | ||
180 | RCU-protected resizeable hash tables [Triplett:2011:RPHash], the 3.0 RCU | ||
181 | trainwreck [PaulEMcKenney2011RCU3.0trainwreck], and Neil Brown's "Meet the | ||
182 | Lockers" LWN article [NeilBrown2011MeetTheLockers]. | ||
183 | |||
164 | 184 | ||
165 | Bibtex Entries | 185 | Bibtex Entries |
166 | 186 | ||
@@ -173,6 +193,14 @@ Bibtex Entries | |||
173 | ,volume="5" | 193 | ,volume="5" |
174 | ,number="3" | 194 | ,number="3" |
175 | ,pages="354-382" | 195 | ,pages="354-382" |
196 | ,note="Available: | ||
197 | \url{http://portal.acm.org/citation.cfm?id=320619&dl=GUIDE,} | ||
198 | [Viewed December 3, 2007]" | ||
199 | ,annotation={ | ||
200 | Use garbage collector to clean up data after everyone is done with it. | ||
201 | . | ||
202 | Oldest use of something vaguely resembling RCU that I have found. | ||
203 | } | ||
176 | } | 204 | } |
177 | 205 | ||
178 | @techreport{Manber82 | 206 | @techreport{Manber82 |
@@ -184,6 +212,31 @@ Bibtex Entries | |||
184 | ,number="82-01-01" | 212 | ,number="82-01-01" |
185 | ,month="January" | 213 | ,month="January" |
186 | ,pages="28" | 214 | ,pages="28" |
215 | ,annotation={ | ||
216 | . | ||
217 | Superseded by Manber84. | ||
218 | . | ||
219 | Describes concurrent AVL tree implementation. Uses a | ||
220 | garbage-collection mechanism to handle concurrent use and deletion | ||
221 | of nodes in the tree, but lacks the summary-of-execution-history | ||
222 | concept of read-copy locking. | ||
223 | . | ||
224 | Keeps full list of processes that were active when a given | ||
225 | node was to be deleted, and waits until all such processes have | ||
226 | -terminated- before allowing this node to be reused. This is | ||
227 | not described in great detail -- one could imagine using process | ||
228 | IDs for this if the ID space was large enough that overlapping | ||
229 | never occurred. | ||
230 | . | ||
231 | This restriction makes this algorithm unsuitable for use in | ||
232 | systems comprised of long-lived processes. It also produces | ||
233 | completely unacceptable overhead in systems with large numbers | ||
234 | of processes. Finally, it is specific to AVL trees. | ||
235 | . | ||
236 | Cites Kung80, so not an independent invention, but the first | ||
237 | RCU-like usage that does not rely on an automatic garbage | ||
238 | collector. | ||
239 | } | ||
187 | } | 240 | } |
188 | 241 | ||
189 | @article{Manber84 | 242 | @article{Manber84 |
@@ -195,6 +248,74 @@ Bibtex Entries | |||
195 | ,volume="9" | 248 | ,volume="9" |
196 | ,number="3" | 249 | ,number="3" |
197 | ,pages="439-455" | 250 | ,pages="439-455" |
251 | ,annotation={ | ||
252 | Describes concurrent AVL tree implementation. Uses a | ||
253 | garbage-collection mechanism to handle concurrent use and deletion | ||
254 | of nodes in the tree, but lacks the summary-of-execution-history | ||
255 | concept of read-copy locking. | ||
256 | . | ||
257 | Keeps full list of processes that were active when a given | ||
258 | node was to be deleted, and waits until all such processes have | ||
259 | -terminated- before allowing this node to be reused. This is | ||
260 | not described in great detail -- one could imagine using process | ||
261 | IDs for this if the ID space was large enough that overlapping | ||
262 | never occurred. | ||
263 | . | ||
264 | This restriction makes this algorithm unsuitable for use in | ||
265 | systems comprised of long-lived processes. It also produces | ||
266 | completely unacceptable overhead in systems with large numbers | ||
267 | of processes. Finally, it is specific to AVL trees. | ||
268 | } | ||
269 | } | ||
270 | |||
271 | @Conference{RichardRashid87a | ||
272 | ,Author="Richard Rashid and Avadis Tevanian and Michael Young and | ||
273 | David Golub and Robert Baron and David Black and William Bolosky and | ||
274 | Jonathan Chew" | ||
275 | ,Title="Machine-Independent Virtual Memory Management for Paged | ||
276 | Uniprocessor and Multiprocessor Architectures" | ||
277 | ,Booktitle="{2\textsuperscript{nd} Symposium on Architectural Support | ||
278 | for Programming Languages and Operating Systems}" | ||
279 | ,Publisher="Association for Computing Machinery" | ||
280 | ,Month="October" | ||
281 | ,Year="1987" | ||
282 | ,pages="31-39" | ||
283 | ,Address="Palo Alto, CA" | ||
284 | ,note="Available: | ||
285 | \url{http://www.cse.ucsc.edu/~randal/221/rashid-machvm.pdf} | ||
286 | [Viewed February 17, 2005]" | ||
287 | ,annotation={ | ||
288 | Describes lazy TLB flush, where one waits for each CPU to pass | ||
289 | through a scheduling-clock interrupt before reusing a given range | ||
290 | of virtual address. Does not describe how one determines that | ||
291 | all CPUs have in fact taken such an interrupt, though there are | ||
292 | no shortage of straightforward methods for accomplishing this. | ||
293 | . | ||
294 | Note that it does not make sense to just wait a fixed amount of | ||
295 | time, since a given CPU might have interrupts disabled for an | ||
296 | extended amount of time. | ||
297 | } | ||
298 | } | ||
299 | |||
300 | @article{BarbaraLiskov1988ArgusCACM | ||
301 | ,author = {Barbara Liskov} | ||
302 | ,title = {Distributed programming in {Argus}} | ||
303 | ,journal = {Commun. ACM} | ||
304 | ,volume = {31} | ||
305 | ,number = {3} | ||
306 | ,year = {1988} | ||
307 | ,issn = {0001-0782} | ||
308 | ,pages = {300--312} | ||
309 | ,doi = {http://doi.acm.org/10.1145/42392.42399} | ||
310 | ,publisher = {ACM} | ||
311 | ,address = {New York, NY, USA} | ||
312 | ,annotation= { | ||
313 | At the top of page 307: "Conflicts with deposits and withdrawals | ||
314 | are necessary if the reported total is to be up to date. They | ||
315 | could be avoided by having total return a sum that is slightly | ||
316 | out of date." Relies on semantics -- approximate numerical | ||
317 | values sometimes OK. | ||
318 | } | ||
198 | } | 319 | } |
199 | 320 | ||
200 | @techreport{Hennessy89 | 321 | @techreport{Hennessy89 |
@@ -216,6 +337,13 @@ Bibtex Entries | |||
216 | ,year="1990" | 337 | ,year="1990" |
217 | ,number="CS-TR-2222.1" | 338 | ,number="CS-TR-2222.1" |
218 | ,month="June" | 339 | ,month="June" |
340 | ,annotation={ | ||
341 | Concurrent access to skip lists. Has both weak and strong search. | ||
342 | Uses concept of ``garbage queue'', but has no real way of cleaning | ||
343 | the garbage efficiently. | ||
344 | . | ||
345 | Appears to be an independent invention of an RCU-like mechanism. | ||
346 | } | ||
219 | } | 347 | } |
220 | 348 | ||
221 | @Book{Adams91 | 349 | @Book{Adams91 |
@@ -223,20 +351,15 @@ Bibtex Entries | |||
223 | ,title="Concurrent Programming, Principles, and Practices" | 351 | ,title="Concurrent Programming, Principles, and Practices" |
224 | ,Publisher="Benjamin Cummins" | 352 | ,Publisher="Benjamin Cummins" |
225 | ,Year="1991" | 353 | ,Year="1991" |
354 | ,annotation={ | ||
355 | Has a few paragraphs describing ``chaotic relaxation'', a | ||
356 | numerical analysis technique that allows multiprocessors to | ||
357 | avoid synchronization overhead by using possibly-stale data. | ||
358 | . | ||
359 | Seems like this is descended from yet another independent | ||
360 | invention of RCU-like function -- but this is restricted | ||
361 | in that reclamation is not necessary. | ||
226 | } | 362 | } |
227 | |||
228 | @phdthesis{HMassalinPhD | ||
229 | ,author="H. Massalin" | ||
230 | ,title="Synthesis: An Efficient Implementation of Fundamental Operating | ||
231 | System Services" | ||
232 | ,school="Columbia University" | ||
233 | ,address="New York, NY" | ||
234 | ,year="1992" | ||
235 | ,annotation=" | ||
236 | Mondo optimizing compiler. | ||
237 | Wait-free stuff. | ||
238 | Good advice: defer work to avoid synchronization. | ||
239 | " | ||
240 | } | 363 | } |
241 | 364 | ||
242 | @unpublished{Jacobson93 | 365 | @unpublished{Jacobson93 |
@@ -244,7 +367,13 @@ System Services" | |||
244 | ,title="Avoid Read-Side Locking Via Delayed Free" | 367 | ,title="Avoid Read-Side Locking Via Delayed Free" |
245 | ,year="1993" | 368 | ,year="1993" |
246 | ,month="September" | 369 | ,month="September" |
247 | ,note="Verbal discussion" | 370 | ,note="private communication" |
371 | ,annotation={ | ||
372 | Use fixed time delay to approximate grace period. Very simple, | ||
373 | but subject to random memory corruption under heavy load. | ||
374 | . | ||
375 | Independent invention of RCU-like mechanism. | ||
376 | } | ||
248 | } | 377 | } |
249 | 378 | ||
250 | @Conference{AjuJohn95 | 379 | @Conference{AjuJohn95 |
@@ -256,6 +385,17 @@ System Services" | |||
256 | ,Year="1995" | 385 | ,Year="1995" |
257 | ,pages="11-23" | 386 | ,pages="11-23" |
258 | ,Address="New Orleans, LA" | 387 | ,Address="New Orleans, LA" |
388 | ,note="Available: | ||
389 | \url{https://www.usenix.org/publications/library/proceedings/neworl/full_papers/john.a} | ||
390 | [Viewed October 1, 2010]" | ||
391 | ,annotation={ | ||
392 | Age vnodes out of the cache, and have a fixed time set by a kernel | ||
393 | parameter. Not clear that all races were in fact correctly handled. | ||
394 | Used a 20-minute time by default, which would most definitely not | ||
395 | be suitable during DoS attacks or virus scans. | ||
396 | . | ||
397 | Apparently independent invention of RCU-like mechanism. | ||
398 | } | ||
259 | } | 399 | } |
260 | 400 | ||
261 | @conference{Pu95a, | 401 | @conference{Pu95a, |
@@ -301,31 +441,47 @@ Utilizing Execution History and Thread Monitoring" | |||
301 | ,institution="US Patent and Trademark Office" | 441 | ,institution="US Patent and Trademark Office" |
302 | ,address="Washington, DC" | 442 | ,address="Washington, DC" |
303 | ,year="1995" | 443 | ,year="1995" |
304 | ,number="US Patent 5,442,758 (contributed under GPL)" | 444 | ,number="US Patent 5,442,758" |
305 | ,month="August" | 445 | ,month="August" |
446 | ,annotation={ | ||
447 | Describes the parallel RCU infrastructure. Includes NUMA aspect | ||
448 | (structure of bitmap can reflect bus structure of computer system). | ||
449 | . | ||
450 | Another independent invention of an RCU-like mechanism, but the | ||
451 | "real" RCU this time! | ||
452 | } | ||
306 | } | 453 | } |
307 | 454 | ||
308 | @techreport{Slingwine97 | 455 | @techreport{Slingwine97 |
309 | ,author="John D. Slingwine and Paul E. McKenney" | 456 | ,author="John D. Slingwine and Paul E. McKenney" |
310 | ,title="Method for maintaining data coherency using thread | 457 | ,title="Method for Maintaining Data Coherency Using Thread Activity |
311 | activity summaries in a multicomputer system" | 458 | Summaries in a Multicomputer System" |
312 | ,institution="US Patent and Trademark Office" | 459 | ,institution="US Patent and Trademark Office" |
313 | ,address="Washington, DC" | 460 | ,address="Washington, DC" |
314 | ,year="1997" | 461 | ,year="1997" |
315 | ,number="US Patent 5,608,893 (contributed under GPL)" | 462 | ,number="US Patent 5,608,893" |
316 | ,month="March" | 463 | ,month="March" |
464 | ,pages="19" | ||
465 | ,annotation={ | ||
466 | Describes use of RCU to synchronize data between a pair of | ||
467 | SMP/NUMA computer systems. | ||
468 | } | ||
317 | } | 469 | } |
318 | 470 | ||
319 | @techreport{Slingwine98 | 471 | @techreport{Slingwine98 |
320 | ,author="John D. Slingwine and Paul E. McKenney" | 472 | ,author="John D. Slingwine and Paul E. McKenney" |
321 | ,title="Apparatus and method for achieving reduced overhead | 473 | ,title="Apparatus and Method for Achieving Reduced Overhead Mutual |
322 | mutual exclusion and maintaining coherency in a multiprocessor | 474 | Exclusion and Maintaining Coherency in a Multiprocessor System |
323 | system utilizing execution history and thread monitoring" | 475 | Utilizing Execution History and Thread Monitoring" |
324 | ,institution="US Patent and Trademark Office" | 476 | ,institution="US Patent and Trademark Office" |
325 | ,address="Washington, DC" | 477 | ,address="Washington, DC" |
326 | ,year="1998" | 478 | ,year="1998" |
327 | ,number="US Patent 5,727,209 (contributed under GPL)" | 479 | ,number="US Patent 5,727,209" |
328 | ,month="March" | 480 | ,month="March" |
481 | ,annotation={ | ||
482 | Describes doing an atomic update by copying the data item and | ||
483 | then substituting it into the data structure. | ||
484 | } | ||
329 | } | 485 | } |
330 | 486 | ||
331 | @Conference{McKenney98 | 487 | @Conference{McKenney98 |
@@ -337,6 +493,15 @@ Problems" | |||
337 | ,Year="1998" | 493 | ,Year="1998" |
338 | ,pages="509-518" | 494 | ,pages="509-518" |
339 | ,Address="Las Vegas, NV" | 495 | ,Address="Las Vegas, NV" |
496 | ,note="Available: | ||
497 | \url{http://www.rdrop.com/users/paulmck/RCU/rclockpdcsproof.pdf} | ||
498 | [Viewed December 3, 2007]" | ||
499 | ,annotation={ | ||
500 | Describes and analyzes RCU mechanism in DYNIX/ptx. Describes | ||
501 | application to linked list update and log-buffer flushing. | ||
502 | Defines 'quiescent state'. Includes both measured and analytic | ||
503 | evaluation. | ||
504 | } | ||
340 | } | 505 | } |
341 | 506 | ||
342 | @Conference{Gamsa99 | 507 | @Conference{Gamsa99 |
@@ -349,18 +514,76 @@ Operating System Design and Implementation}" | |||
349 | ,Year="1999" | 514 | ,Year="1999" |
350 | ,pages="87-100" | 515 | ,pages="87-100" |
351 | ,Address="New Orleans, LA" | 516 | ,Address="New Orleans, LA" |
517 | ,note="Available: | ||
518 | \url{http://www.usenix.org/events/osdi99/full_papers/gamsa/gamsa.pdf} | ||
519 | [Viewed August 30, 2006]" | ||
520 | ,annotation={ | ||
521 | Use of RCU-like facility in K42/Tornado. Another independent | ||
522 | invention of RCU. | ||
523 | See especially pages 7-9 (Section 5). | ||
524 | } | ||
525 | } | ||
526 | |||
527 | @unpublished{RustyRussell2000a | ||
528 | ,Author="Rusty Russell" | ||
529 | ,Title="Re: modular net drivers" | ||
530 | ,month="June" | ||
531 | ,year="2000" | ||
532 | ,day="23" | ||
533 | ,note="Available: | ||
534 | \url{http://oss.sgi.com/projects/netdev/archive/2000-06/msg00250.html} | ||
535 | [Viewed April 10, 2006]" | ||
536 | ,annotation={ | ||
537 | Proto-RCU proposal from Phil Rumpf and Rusty Russell. | ||
538 | Yet another independent invention of RCU. | ||
539 | Outline of algorithm to unload modules... | ||
540 | . | ||
541 | Appeared on net-dev mailing list. | ||
542 | } | ||
543 | } | ||
544 | |||
545 | @unpublished{RustyRussell2000b | ||
546 | ,Author="Rusty Russell" | ||
547 | ,Title="Re: modular net drivers" | ||
548 | ,month="June" | ||
549 | ,year="2000" | ||
550 | ,day="24" | ||
551 | ,note="Available: | ||
552 | \url{http://oss.sgi.com/projects/netdev/archive/2000-06/msg00254.html} | ||
553 | [Viewed April 10, 2006]" | ||
554 | ,annotation={ | ||
555 | Proto-RCU proposal from Phil Rumpf and Rusty Russell. | ||
556 | . | ||
557 | Appeared on net-dev mailing list. | ||
558 | } | ||
559 | } | ||
560 | |||
561 | @unpublished{McKenney01b | ||
562 | ,Author="Paul E. McKenney and Dipankar Sarma" | ||
563 | ,Title="Read-Copy Update Mutual Exclusion in {Linux}" | ||
564 | ,month="February" | ||
565 | ,year="2001" | ||
566 | ,note="Available: | ||
567 | \url{http://lse.sourceforge.net/locking/rcu/rcupdate_doc.html} | ||
568 | [Viewed October 18, 2004]" | ||
569 | ,annotation={ | ||
570 | Prototypical Linux documentation for RCU. | ||
571 | } | ||
352 | } | 572 | } |
353 | 573 | ||
354 | @techreport{Slingwine01 | 574 | @techreport{Slingwine01 |
355 | ,author="John D. Slingwine and Paul E. McKenney" | 575 | ,author="John D. Slingwine and Paul E. McKenney" |
356 | ,title="Apparatus and method for achieving reduced overhead | 576 | ,title="Apparatus and Method for Achieving Reduced Overhead Mutual |
357 | mutual exclusion and maintaining coherency in a multiprocessor | 577 | Exclusion and Maintaining Coherency in a Multiprocessor System |
358 | system utilizing execution history and thread monitoring" | 578 | Utilizing Execution History and Thread Monitoring" |
359 | ,institution="US Patent and Trademark Office" | 579 | ,institution="US Patent and Trademark Office" |
360 | ,address="Washington, DC" | 580 | ,address="Washington, DC" |
361 | ,year="2001" | 581 | ,year="2001" |
362 | ,number="US Patent 5,219,690 (contributed under GPL)" | 582 | ,number="US Patent 6,219,690" |
363 | ,month="April" | 583 | ,month="April" |
584 | ,annotation={ | ||
585 | 'Change in mode' aspect of RCU. Can be thought of as a lazy barrier. | ||
586 | } | ||
364 | } | 587 | } |
365 | 588 | ||
366 | @Conference{McKenney01a | 589 | @Conference{McKenney01a |
@@ -372,14 +595,61 @@ Orran Krieger and Rusty Russell and Dipankar Sarma and Maneesh Soni" | |||
372 | ,Year="2001" | 595 | ,Year="2001" |
373 | ,note="Available: | 596 | ,note="Available: |
374 | \url{http://www.linuxsymposium.org/2001/abstracts/readcopy.php} | 597 | \url{http://www.linuxsymposium.org/2001/abstracts/readcopy.php} |
375 | \url{http://www.rdrop.com/users/paulmck/rclock/rclock_OLS.2001.05.01c.pdf} | 598 | \url{http://www.rdrop.com/users/paulmck/RCU/rclock_OLS.2001.05.01c.pdf} |
376 | [Viewed June 23, 2004]" | 599 | [Viewed June 23, 2004]" |
377 | annotation=" | 600 | ,annotation={ |
378 | Described RCU, and presented some patches implementing and using it in | 601 | Described RCU, and presented some patches implementing and using |
379 | the Linux kernel. | 602 | it in the Linux kernel. |
603 | } | ||
604 | } | ||
605 | |||
606 | @unpublished{McKenney01f | ||
607 | ,Author="Paul E. McKenney" | ||
608 | ,Title="{RFC:} patch to allow lock-free traversal of lists with insertion" | ||
609 | ,month="October" | ||
610 | ,year="2001" | ||
611 | ,note="Available: | ||
612 | \url{http://marc.theaimsgroup.com/?l=linux-kernel&m=100259266316456&w=2} | ||
613 | [Viewed June 23, 2004]" | ||
614 | ,annotation=" | ||
615 | Memory-barrier and Alpha thread. 100 messages, not too bad... | ||
616 | " | ||
617 | } | ||
618 | |||
619 | @unpublished{Spraul01 | ||
620 | ,Author="Manfred Spraul" | ||
621 | ,Title="Re: {RFC:} patch to allow lock-free traversal of lists with insertion" | ||
622 | ,month="October" | ||
623 | ,year="2001" | ||
624 | ,note="Available: | ||
625 | \url{http://marc.theaimsgroup.com/?l=linux-kernel&m=100264675012867&w=2} | ||
626 | [Viewed June 23, 2004]" | ||
627 | ,annotation=" | ||
628 | Suggested burying memory barriers in Linux's list-manipulation | ||
629 | primitives. | ||
380 | " | 630 | " |
381 | } | 631 | } |
382 | 632 | ||
633 | @unpublished{LinusTorvalds2001a | ||
634 | ,Author="Linus Torvalds" | ||
635 | ,Title="{Re:} {[Lse-tech]} {Re:} {RFC:} patch to allow lock-free traversal of lists with insertion" | ||
636 | ,month="October" | ||
637 | ,year="2001" | ||
638 | ,note="Available: | ||
639 | \url{http://lkml.org/lkml/2001/10/13/105} | ||
640 | [Viewed August 21, 2004]" | ||
641 | } | ||
642 | |||
643 | @unpublished{Blanchard02a | ||
644 | ,Author="Anton Blanchard" | ||
645 | ,Title="some RCU dcache and ratcache results" | ||
646 | ,month="March" | ||
647 | ,year="2002" | ||
648 | ,note="Available: | ||
649 | \url{http://marc.theaimsgroup.com/?l=linux-kernel&m=101637107412972&w=2} | ||
650 | [Viewed October 18, 2004]" | ||
651 | } | ||
652 | |||
383 | @Conference{Linder02a | 653 | @Conference{Linder02a |
384 | ,Author="Hanna Linder and Dipankar Sarma and Maneesh Soni" | 654 | ,Author="Hanna Linder and Dipankar Sarma and Maneesh Soni" |
385 | ,Title="Scalability of the Directory Entry Cache" | 655 | ,Title="Scalability of the Directory Entry Cache" |
@@ -387,6 +657,10 @@ the Linux kernel. | |||
387 | ,Month="June" | 657 | ,Month="June" |
388 | ,Year="2002" | 658 | ,Year="2002" |
389 | ,pages="289-300" | 659 | ,pages="289-300" |
660 | ,annotation=" | ||
661 | Measured scalability of Linux 2.4 kernel's directory-entry cache | ||
662 | (dcache), and measured some scalability enhancements. | ||
663 | " | ||
390 | } | 664 | } |
391 | 665 | ||
392 | @Conference{McKenney02a | 666 | @Conference{McKenney02a |
@@ -400,49 +674,76 @@ Andrea Arcangeli and Andi Kleen and Orran Krieger and Rusty Russell" | |||
400 | ,note="Available: | 674 | ,note="Available: |
401 | \url{http://www.linux.org.uk/~ajh/ols2002_proceedings.pdf.gz} | 675 | \url{http://www.linux.org.uk/~ajh/ols2002_proceedings.pdf.gz} |
402 | [Viewed June 23, 2004]" | 676 | [Viewed June 23, 2004]" |
677 | ,annotation=" | ||
678 | Presented and compared a number of RCU implementations for the | ||
679 | Linux kernel. | ||
680 | " | ||
403 | } | 681 | } |
404 | 682 | ||
405 | @conference{Michael02a | 683 | @unpublished{Sarma02a |
406 | ,author="Maged M. Michael" | 684 | ,Author="Dipankar Sarma" |
407 | ,title="Safe Memory Reclamation for Dynamic Lock-Free Objects Using Atomic | 685 | ,Title="specweb99: dcache scalability results" |
408 | Reads and Writes" | 686 | ,month="July" |
409 | ,Year="2002" | 687 | ,year="2002" |
410 | ,Month="August" | 688 | ,note="Available: |
411 | ,booktitle="{Proceedings of the 21\textsuperscript{st} Annual ACM | 689 | \url{http://marc.theaimsgroup.com/?l=linux-kernel&m=102645767914212&w=2} |
412 | Symposium on Principles of Distributed Computing}" | 690 | [Viewed June 23, 2004]" |
413 | ,pages="21-30" | ||
414 | ,annotation=" | 691 | ,annotation=" |
415 | Each thread keeps an array of pointers to items that it is | 692 | Compare fastwalk and RCU for dcache. RCU won. |
416 | currently referencing. Sort of an inside-out garbage collection | ||
417 | mechanism, but one that requires the accessing code to explicitly | ||
418 | state its needs. Also requires read-side memory barriers on | ||
419 | most architectures. | ||
420 | " | 693 | " |
421 | } | 694 | } |
422 | 695 | ||
423 | @conference{Michael02b | 696 | @unpublished{Barbieri02 |
424 | ,author="Maged M. Michael" | 697 | ,Author="Luca Barbieri" |
425 | ,title="High Performance Dynamic Lock-Free Hash Tables and List-Based Sets" | 698 | ,Title="Re: {[PATCH]} Initial support for struct {vfs\_cred}" |
426 | ,Year="2002" | 699 | ,month="August" |
427 | ,Month="August" | 700 | ,year="2002" |
428 | ,booktitle="{Proceedings of the 14\textsuperscript{th} Annual ACM | 701 | ,note="Available: |
429 | Symposium on Parallel | 702 | \url{http://marc.theaimsgroup.com/?l=linux-kernel&m=103082050621241&w=2} |
430 | Algorithms and Architecture}" | 703 | [Viewed: June 23, 2004]" |
431 | ,pages="73-82" | ||
432 | ,annotation=" | 704 | ,annotation=" |
433 | Like the title says... | 705 | Suggested RCU for vfs\_shared\_cred. |
434 | " | 706 | " |
435 | } | 707 | } |
436 | 708 | ||
437 | @InProceedings{HerlihyLM02 | 709 | @unpublished{Dickins02a |
438 | ,author={Maurice Herlihy and Victor Luchangco and Mark Moir} | 710 | ,author="Hugh Dickins" |
439 | ,title="The Repeat Offender Problem: A Mechanism for Supporting Dynamic-Sized, | 711 | ,title="Use RCU for System-V IPC" |
440 | Lock-Free Data Structures" | 712 | ,year="2002" |
441 | ,booktitle={Proceedings of 16\textsuperscript{th} International | 713 | ,month="October" |
442 | Symposium on Distributed Computing} | 714 | ,note="private communication" |
443 | ,year=2002 | 715 | } |
716 | |||
717 | @unpublished{Sarma02b | ||
718 | ,Author="Dipankar Sarma" | ||
719 | ,Title="Some dcache\_rcu benchmark numbers" | ||
444 | ,month="October" | 720 | ,month="October" |
445 | ,pages="339-353" | 721 | ,year="2002" |
722 | ,note="Available: | ||
723 | \url{http://marc.theaimsgroup.com/?l=linux-kernel&m=103462075416638&w=2} | ||
724 | [Viewed June 23, 2004]" | ||
725 | ,annotation=" | ||
726 | Performance of dcache RCU on kernbench for 16x NUMA-Q and 1x, | ||
727 | 2x, and 4x systems. RCU does no harm, and helps on 16x. | ||
728 | " | ||
729 | } | ||
730 | |||
731 | @unpublished{LinusTorvalds2003a | ||
732 | ,Author="Linus Torvalds" | ||
733 | ,Title="Re: {[PATCH]} small fixes in brlock.h" | ||
734 | ,month="March" | ||
735 | ,year="2003" | ||
736 | ,note="Available: | ||
737 | \url{http://lkml.org/lkml/2003/3/9/205} | ||
738 | [Viewed March 13, 2006]" | ||
739 | ,annotation=" | ||
740 | Linus suggests replacing brlock with RCU and/or seqlocks: | ||
741 | . | ||
742 | 'It's entirely possible that the current user could be replaced | ||
743 | by RCU and/or seqlocks, and we could get rid of brlocks entirely.' | ||
744 | . | ||
745 | Steve Hemminger responds by replacing them with RCU. | ||
746 | " | ||
446 | } | 747 | } |
447 | 748 | ||
448 | @article{Appavoo03a | 749 | @article{Appavoo03a |
@@ -457,6 +758,20 @@ B. Rosenburg and M. Stumm and J. Xenidis" | |||
457 | ,volume="42" | 758 | ,volume="42" |
458 | ,number="1" | 759 | ,number="1" |
459 | ,pages="60-76" | 760 | ,pages="60-76" |
761 | ,annotation=" | ||
762 | Use of RCU to enable hot-swapping for autonomic behavior in K42. | ||
763 | " | ||
764 | } | ||
765 | |||
766 | @unpublished{Seigh03 | ||
767 | ,author="Joseph W. {Seigh II}" | ||
768 | ,title="Read Copy Update" | ||
769 | ,Year="2003" | ||
770 | ,Month="March" | ||
771 | ,note="email correspondence" | ||
772 | ,annotation=" | ||
773 | Described the relationship of the VM/XA passive serialization to RCU. | ||
774 | " | ||
460 | } | 775 | } |
461 | 776 | ||
462 | @Conference{Arcangeli03 | 777 | @Conference{Arcangeli03 |
@@ -470,6 +785,27 @@ Dipankar Sarma" | |||
470 | ,year="2003" | 785 | ,year="2003" |
471 | ,month="June" | 786 | ,month="June" |
472 | ,pages="297-310" | 787 | ,pages="297-310" |
788 | ,note="Available: | ||
789 | \url{http://www.rdrop.com/users/paulmck/RCU/rcu.FREENIX.2003.06.14.pdf} | ||
790 | [Viewed November 21, 2007]" | ||
791 | ,annotation=" | ||
792 | Compared updated RCU implementations for the Linux kernel, and | ||
793 | described System V IPC use of RCU, including order-of-magnitude | ||
794 | performance improvements. | ||
795 | " | ||
796 | } | ||
797 | |||
798 | @Conference{Soules03a | ||
799 | ,Author="Craig A. N. Soules and Jonathan Appavoo and Kevin Hui and | ||
800 | Dilma {Da Silva} and Gregory R. Ganger and Orran Krieger and | ||
801 | Michael Stumm and Robert W. Wisniewski and Marc Auslander and | ||
802 | Michal Ostrowski and Bryan Rosenburg and Jimi Xenidis" | ||
803 | ,Title="System Support for Online Reconfiguration" | ||
804 | ,Booktitle="Proceedings of the 2003 USENIX Annual Technical Conference" | ||
805 | ,Publisher="USENIX Association" | ||
806 | ,year="2003" | ||
807 | ,month="June" | ||
808 | ,pages="141-154" | ||
473 | } | 809 | } |
474 | 810 | ||
475 | @article{McKenney03a | 811 | @article{McKenney03a |
@@ -481,6 +817,22 @@ Dipankar Sarma" | |||
481 | ,volume="1" | 817 | ,volume="1" |
482 | ,number="114" | 818 | ,number="114" |
483 | ,pages="18-26" | 819 | ,pages="18-26" |
820 | ,note="Available: | ||
821 | \url{http://www.linuxjournal.com/article/6993} | ||
822 | [Viewed November 14, 2007]" | ||
823 | ,annotation=" | ||
824 | Reader-friendly intro to RCU, with the infamous old-man-and-brat | ||
825 | cartoon. | ||
826 | " | ||
827 | } | ||
828 | |||
829 | @unpublished{Sarma03a | ||
830 | ,Author="Dipankar Sarma" | ||
831 | ,Title="RCU low latency patches" | ||
832 | ,month="December" | ||
833 | ,year="2003" | ||
834 | ,note="Message ID: 20031222180114.GA2248@in.ibm.com" | ||
835 | ,annotation="dipankar/ct.2004.03.27/RCUll.2003.12.22.patch" | ||
484 | } | 836 | } |
485 | 837 | ||
486 | @techreport{Friedberg03a | 838 | @techreport{Friedberg03a |
@@ -489,9 +841,14 @@ Dipankar Sarma" | |||
489 | ,institution="US Patent and Trademark Office" | 841 | ,institution="US Patent and Trademark Office" |
490 | ,address="Washington, DC" | 842 | ,address="Washington, DC" |
491 | ,year="2003" | 843 | ,year="2003" |
492 | ,number="US Patent 6,662,184 (contributed under GPL)" | 844 | ,number="US Patent 6,662,184" |
493 | ,month="December" | 845 | ,month="December" |
494 | ,pages="112" | 846 | ,pages="112" |
847 | ,annotation=" | ||
848 | Applies RCU to a wildcard-search Patricia tree in order to permit | ||
849 | synchronization-free lookup. RCU is used to retain removed nodes | ||
850 | for a grace period before freeing them. | ||
851 | " | ||
495 | } | 852 | } |
496 | 853 | ||
497 | @article{McKenney04a | 854 | @article{McKenney04a |
@@ -503,6 +860,12 @@ Dipankar Sarma" | |||
503 | ,volume="1" | 860 | ,volume="1" |
504 | ,number="118" | 861 | ,number="118" |
505 | ,pages="38-46" | 862 | ,pages="38-46" |
863 | ,note="Available: | ||
864 | \url{http://www.linuxjournal.com/node/7124} | ||
865 | [Viewed December 26, 2010]" | ||
866 | ,annotation=" | ||
867 | Reader friendly intro to dcache and RCU. | ||
868 | " | ||
506 | } | 869 | } |
507 | 870 | ||
508 | @Conference{McKenney04b | 871 | @Conference{McKenney04b |
@@ -514,8 +877,83 @@ Dipankar Sarma" | |||
514 | ,Address="Adelaide, Australia" | 877 | ,Address="Adelaide, Australia" |
515 | ,note="Available: | 878 | ,note="Available: |
516 | \url{http://www.linux.org.au/conf/2004/abstracts.html#90} | 879 | \url{http://www.linux.org.au/conf/2004/abstracts.html#90} |
517 | \url{http://www.rdrop.com/users/paulmck/rclock/lockperf.2004.01.17a.pdf} | 880 | \url{http://www.rdrop.com/users/paulmck/RCU/lockperf.2004.01.17a.pdf} |
518 | [Viewed June 23, 2004]" | 881 | [Viewed June 23, 2004]" |
882 | ,annotation=" | ||
883 | Compares performance of RCU to that of other locking primitives | ||
884 | over a number of CPUs (x86, Opteron, Itanium, and PPC). | ||
885 | " | ||
886 | } | ||
887 | |||
888 | @unpublished{Sarma04a | ||
889 | ,Author="Dipankar Sarma" | ||
890 | ,Title="{[PATCH]} {RCU} for low latency (experimental)" | ||
891 | ,month="March" | ||
892 | ,year="2004" | ||
893 | ,note="\url{http://marc.theaimsgroup.com/?l=linux-kernel&m=108003746402892&w=2}" | ||
894 | ,annotation="Head of thread: dipankar/2004.03.23/rcu-low-lat.1.patch" | ||
895 | } | ||
896 | |||
897 | @unpublished{Sarma04b | ||
898 | ,Author="Dipankar Sarma" | ||
899 | ,Title="Re: {[PATCH]} {RCU} for low latency (experimental)" | ||
900 | ,month="March" | ||
901 | ,year="2004" | ||
902 | ,note="\url{http://marc.theaimsgroup.com/?l=linux-kernel&m=108016474829546&w=2}" | ||
903 | ,annotation="dipankar/rcuth.2004.03.24/rcu-throttle.patch" | ||
904 | } | ||
905 | |||
906 | @unpublished{Spraul04a | ||
907 | ,Author="Manfred Spraul" | ||
908 | ,Title="[RFC] 0/5 rcu lock update" | ||
909 | ,month="May" | ||
910 | ,year="2004" | ||
911 | ,note="Available: | ||
912 | \url{http://marc.theaimsgroup.com/?l=linux-kernel&m=108546407726602&w=2} | ||
913 | [Viewed June 23, 2004]" | ||
914 | ,annotation=" | ||
915 | Hierarchical-bitmap patch for RCU infrastructure. | ||
916 | " | ||
917 | } | ||
918 | |||
919 | @unpublished{Steiner04a | ||
920 | ,Author="Jack Steiner" | ||
921 | ,Title="Re: [Lse-tech] [RFC, PATCH] 1/5 rcu lock update: | ||
922 | Add per-cpu batch counter" | ||
923 | ,month="May" | ||
924 | ,year="2004" | ||
925 | ,note="Available: | ||
926 | \url{http://marc.theaimsgroup.com/?l=linux-kernel&m=108551764515332&w=2} | ||
927 | [Viewed June 23, 2004]" | ||
928 | ,annotation={ | ||
929 | RCU runs reasonably on a 512-CPU SGI using Manfred Spraul's patches, | ||
930 | which may be found at: | ||
931 | https://lkml.org/lkml/2004/5/20/49 (split vars into cachelines) | ||
932 | https://lkml.org/lkml/2004/5/22/114 (cpu_quiet() patch) | ||
933 | https://lkml.org/lkml/2004/5/25/24 (0/5) | ||
934 | https://lkml.org/lkml/2004/5/25/23 (1/5) | ||
935 | https://lkml.org/lkml/2004/5/25/265 (works for Jack) | ||
936 | https://lkml.org/lkml/2004/5/25/20 (2/5) | ||
937 | https://lkml.org/lkml/2004/5/25/22 (3/5) | ||
938 | https://lkml.org/lkml/2004/5/25/19 (4/5) | ||
939 | https://lkml.org/lkml/2004/5/25/21 (5/5) | ||
940 | } | ||
941 | } | ||
942 | |||
943 | @Conference{Sarma04c | ||
944 | ,Author="Dipankar Sarma and Paul E. McKenney" | ||
945 | ,Title="Making {RCU} Safe for Deep Sub-Millisecond Response | ||
946 | Realtime Applications" | ||
947 | ,Booktitle="Proceedings of the 2004 USENIX Annual Technical Conference | ||
948 | (FREENIX Track)" | ||
949 | ,Publisher="USENIX Association" | ||
950 | ,year="2004" | ||
951 | ,month="June" | ||
952 | ,pages="182-191" | ||
953 | ,annotation=" | ||
954 | Describes and compares a number of modifications to the Linux RCU | ||
955 | implementation that make it friendly to realtime applications. | ||
956 | " | ||
519 | } | 957 | } |
520 | 958 | ||
521 | @phdthesis{PaulEdwardMcKenneyPhD | 959 | @phdthesis{PaulEdwardMcKenneyPhD |
@@ -529,17 +967,118 @@ Oregon Health and Sciences University" | |||
529 | ,note="Available: | 967 | ,note="Available: |
530 | \url{http://www.rdrop.com/users/paulmck/RCU/RCUdissertation.2004.07.14e1.pdf} | 968 | \url{http://www.rdrop.com/users/paulmck/RCU/RCUdissertation.2004.07.14e1.pdf} |
531 | [Viewed October 15, 2004]" | 969 | [Viewed October 15, 2004]" |
970 | ,annotation=" | ||
971 | Describes RCU implementations and presents design patterns | ||
972 | corresponding to common uses of RCU in several operating-system | ||
973 | kernels. | ||
974 | " | ||
532 | } | 975 | } |
533 | 976 | ||
534 | @Conference{Sarma04c | 977 | @unpublished{PaulEMcKenney2004rcu:dereference |
535 | ,Author="Dipankar Sarma and Paul E. McKenney" | 978 | ,Author="Dipankar Sarma" |
536 | ,Title="Making RCU Safe for Deep Sub-Millisecond Response Realtime Applications" | 979 | ,Title="{Re: RCU : Abstracted RCU dereferencing [5/5]}" |
537 | ,Booktitle="Proceedings of the 2004 USENIX Annual Technical Conference | 980 | ,month="August" |
538 | (FREENIX Track)" | ||
539 | ,Publisher="USENIX Association" | ||
540 | ,year="2004" | 981 | ,year="2004" |
541 | ,month="June" | 982 | ,note="Available: |
542 | ,pages="182-191" | 983 | \url{http://lkml.org/lkml/2004/8/6/237} |
984 | [Viewed June 8, 2010]" | ||
985 | ,annotation=" | ||
986 | Introduce rcu_dereference(). | ||
987 | " | ||
988 | } | ||
989 | |||
990 | @unpublished{JimHouston04a | ||
991 | ,Author="Jim Houston" | ||
992 | ,Title="{[RFC\&PATCH] Alternative {RCU} implementation}" | ||
993 | ,month="August" | ||
994 | ,year="2004" | ||
995 | ,note="Available: | ||
996 | \url{http://lkml.org/lkml/2004/8/30/87} | ||
997 | [Viewed February 17, 2005]" | ||
998 | ,annotation=" | ||
999 | Uses active code in rcu_read_lock() and rcu_read_unlock() to | ||
1000 | make RCU happen, allowing RCU to function on CPUs that do not | ||
1001 | receive a scheduling-clock interrupt. | ||
1002 | " | ||
1003 | } | ||
1004 | |||
1005 | @unpublished{TomHart04a | ||
1006 | ,Author="Thomas E. Hart" | ||
1007 | ,Title="Master's Thesis: Applying Lock-free Techniques to the {Linux} Kernel" | ||
1008 | ,month="October" | ||
1009 | ,year="2004" | ||
1010 | ,note="Available: | ||
1011 | \url{http://www.cs.toronto.edu/~tomhart/masters_thesis.html} | ||
1012 | [Viewed October 15, 2004]" | ||
1013 | ,annotation=" | ||
1014 | Proposes comparing RCU to lock-free methods for the Linux kernel. | ||
1015 | " | ||
1016 | } | ||
1017 | |||
1018 | @unpublished{Vaddagiri04a | ||
1019 | ,Author="Srivatsa Vaddagiri" | ||
1020 | ,Title="Subject: [RFC] Use RCU for tcp\_ehash lookup" | ||
1021 | ,month="October" | ||
1022 | ,year="2004" | ||
1023 | ,note="Available: | ||
1024 | \url{http://marc.theaimsgroup.com/?t=109395731700004&r=1&w=2} | ||
1025 | [Viewed October 18, 2004]" | ||
1026 | ,annotation=" | ||
1027 | Srivatsa's RCU patch for tcp_ehash lookup. | ||
1028 | " | ||
1029 | } | ||
1030 | |||
1031 | @unpublished{Thirumalai04a | ||
1032 | ,Author="Ravikiran Thirumalai" | ||
1033 | ,Title="Subject: [patchset] Lockfree fd lookup 0 of 5" | ||
1034 | ,month="October" | ||
1035 | ,year="2004" | ||
1036 | ,note="Available: | ||
1037 | \url{http://marc.theaimsgroup.com/?t=109144217400003&r=1&w=2} | ||
1038 | [Viewed October 18, 2004]" | ||
1039 | ,annotation=" | ||
1040 | Ravikiran's lockfree FD patch. | ||
1041 | " | ||
1042 | } | ||
1043 | |||
1044 | @unpublished{Thirumalai04b | ||
1045 | ,Author="Ravikiran Thirumalai" | ||
1046 | ,Title="Subject: Re: [patchset] Lockfree fd lookup 0 of 5" | ||
1047 | ,month="October" | ||
1048 | ,year="2004" | ||
1049 | ,note="Available: | ||
1050 | \url{http://marc.theaimsgroup.com/?l=linux-kernel&m=109152521410459&w=2} | ||
1051 | [Viewed October 18, 2004]" | ||
1052 | ,annotation=" | ||
1053 | Ravikiran's lockfree FD patch. | ||
1054 | " | ||
1055 | } | ||
1056 | |||
1057 | @unpublished{PaulEMcKenney2004rcu:assign:pointer | ||
1058 | ,Author="Paul E. McKenney" | ||
1059 | ,Title="{[PATCH 1/3] RCU: \url{rcu_assign_pointer()} removal of memory barriers}" | ||
1060 | ,month="October" | ||
1061 | ,year="2004" | ||
1062 | ,note="Available: | ||
1063 | \url{http://lkml.org/lkml/2004/10/23/241} | ||
1064 | [Viewed June 8, 2010]" | ||
1065 | ,annotation=" | ||
1066 | Introduce rcu_assign_pointer(). | ||
1067 | " | ||
1068 | } | ||
1069 | |||
1070 | @unpublished{JamesMorris04a | ||
1071 | ,Author="James Morris" | ||
1072 | ,Title="{[PATCH 2/3] SELinux} scalability - convert {AVC} to {RCU}" | ||
1073 | ,day="15" | ||
1074 | ,month="November" | ||
1075 | ,year="2004" | ||
1076 | ,note="Available: | ||
1077 | \url{http://marc.theaimsgroup.com/?l=linux-kernel&m=110054979416004&w=2} | ||
1078 | [Viewed December 10, 2004]" | ||
1079 | ,annotation=" | ||
1080 | James Morris posts Kaigai Kohei's patch to LKML. | ||
1081 | " | ||
543 | } | 1082 | } |
544 | 1083 | ||
545 | @unpublished{JamesMorris04b | 1084 | @unpublished{JamesMorris04b |
@@ -550,6 +1089,85 @@ Oregon Health and Sciences University" | |||
550 | ,note="Available: | 1089 | ,note="Available: |
551 | \url{http://www.livejournal.com/users/james_morris/2153.html} | 1090 | \url{http://www.livejournal.com/users/james_morris/2153.html} |
552 | [Viewed December 10, 2004]" | 1091 | [Viewed December 10, 2004]" |
1092 | ,annotation=" | ||
1093 | RCU helps SELinux performance. ;-) Made LWN. | ||
1094 | " | ||
1095 | } | ||
1096 | |||
1097 | @unpublished{PaulMcKenney2005RCUSemantics | ||
1098 | ,Author="Paul E. McKenney and Jonathan Walpole" | ||
1099 | ,Title="{RCU} Semantics: A First Attempt" | ||
1100 | ,month="January" | ||
1101 | ,year="2005" | ||
1102 | ,day="30" | ||
1103 | ,note="Available: | ||
1104 | \url{http://www.rdrop.com/users/paulmck/RCU/rcu-semantics.2005.01.30a.pdf} | ||
1105 | [Viewed December 6, 2009]" | ||
1106 | ,annotation=" | ||
1107 | Early derivation of RCU semantics. | ||
1108 | " | ||
1109 | } | ||
1110 | |||
1111 | @unpublished{PaulMcKenney2005e | ||
1112 | ,Author="Paul E. McKenney" | ||
1113 | ,Title="Real-Time Preemption and {RCU}" | ||
1114 | ,month="March" | ||
1115 | ,year="2005" | ||
1116 | ,day="17" | ||
1117 | ,note="Available: | ||
1118 | \url{http://lkml.org/lkml/2005/3/17/199} | ||
1119 | [Viewed September 5, 2005]" | ||
1120 | ,annotation=" | ||
1121 | First posting showing how RCU can be safely adapted for | ||
1122 | preemptable RCU read side critical sections. | ||
1123 | " | ||
1124 | } | ||
1125 | |||
1126 | @unpublished{EsbenNeilsen2005a | ||
1127 | ,Author="Esben Neilsen" | ||
1128 | ,Title="Re: Real-Time Preemption and {RCU}" | ||
1129 | ,month="March" | ||
1130 | ,year="2005" | ||
1131 | ,day="18" | ||
1132 | ,note="Available: | ||
1133 | \url{http://lkml.org/lkml/2005/3/18/122} | ||
1134 | [Viewed March 30, 2006]" | ||
1135 | ,annotation=" | ||
1136 | Esben Neilsen suggests read-side suppression of grace-period | ||
1137 | processing for crude-but-workable realtime RCU. The downside | ||
1138 | is indefinite grace periods...But this is OK for experimentation | ||
1139 | and testing. | ||
1140 | " | ||
1141 | } | ||
1142 | |||
1143 | @unpublished{TomHart05a | ||
1144 | ,Author="Thomas E. Hart and Paul E. McKenney and Angela Demke Brown" | ||
1145 | ,Title="Efficient Memory Reclamation is Necessary for Fast Lock-Free | ||
1146 | Data Structures" | ||
1147 | ,month="March" | ||
1148 | ,year="2005" | ||
1149 | ,note="Available: | ||
1150 | \url{ftp://ftp.cs.toronto.edu/csrg-technical-reports/515/} | ||
1151 | [Viewed March 4, 2005]" | ||
1152 | ,annotation=" | ||
1153 | Comparison of RCU, QBSR, and EBSR. RCU wins for read-mostly | ||
1154 | workloads. ;-) | ||
1155 | " | ||
1156 | } | ||
1157 | |||
1158 | @unpublished{JonCorbet2005DeprecateSyncKernel | ||
1159 | ,Author="Jonathan Corbet" | ||
1160 | ,Title="API change: synchronize_kernel() deprecated" | ||
1161 | ,month="May" | ||
1162 | ,day="3" | ||
1163 | ,year="2005" | ||
1164 | ,note="Available: | ||
1165 | \url{http://lwn.net/Articles/134484/} | ||
1166 | [Viewed May 3, 2005]" | ||
1167 | ,annotation=" | ||
1168 | Jon Corbet describes deprecation of synchronize_kernel() | ||
1169 | in favor of synchronize_rcu() and synchronize_sched(). | ||
1170 | " | ||
553 | } | 1171 | } |
554 | 1172 | ||
555 | @unpublished{PaulMcKenney05a | 1173 | @unpublished{PaulMcKenney05a |
@@ -568,7 +1186,7 @@ Oregon Health and Sciences University" | |||
568 | 1186 | ||
569 | @conference{PaulMcKenney05b | 1187 | @conference{PaulMcKenney05b |
570 | ,Author="Paul E. McKenney and Dipankar Sarma" | 1188 | ,Author="Paul E. McKenney and Dipankar Sarma" |
571 | ,Title="Towards Hard Realtime Response from the Linux Kernel on SMP Hardware" | 1189 | ,Title="Towards Hard Realtime Response from the {Linux} Kernel on {SMP} Hardware" |
572 | ,Booktitle="linux.conf.au 2005" | 1190 | ,Booktitle="linux.conf.au 2005" |
573 | ,month="April" | 1191 | ,month="April" |
574 | ,year="2005" | 1192 | ,year="2005" |
@@ -578,6 +1196,103 @@ Oregon Health and Sciences University" | |||
578 | [Viewed May 13, 2005]" | 1196 | [Viewed May 13, 2005]" |
579 | ,annotation=" | 1197 | ,annotation=" |
580 | Realtime turns into making RCU yet more realtime friendly. | 1198 | Realtime turns into making RCU yet more realtime friendly. |
1199 | http://lca2005.linux.org.au/Papers/Paul%20McKenney/Towards%20Hard%20Realtime%20Response%20from%20the%20Linux%20Kernel/LKS.2005.04.22a.pdf | ||
1200 | " | ||
1201 | } | ||
1202 | |||
1203 | @unpublished{PaulEMcKenneyHomePage | ||
1204 | ,Author="Paul E. McKenney" | ||
1205 | ,Title="{Paul} {E.} {McKenney}" | ||
1206 | ,month="May" | ||
1207 | ,year="2005" | ||
1208 | ,note="Available: | ||
1209 | \url{http://www.rdrop.com/users/paulmck/} | ||
1210 | [Viewed May 25, 2005]" | ||
1211 | ,annotation=" | ||
1212 | Paul McKenney's home page. | ||
1213 | " | ||
1214 | } | ||
1215 | |||
1216 | @unpublished{PaulEMcKenneyRCUPage | ||
1217 | ,Author="Paul E. McKenney" | ||
1218 | ,Title="Read-Copy Update {(RCU)}" | ||
1219 | ,month="May" | ||
1220 | ,year="2005" | ||
1221 | ,note="Available: | ||
1222 | \url{http://www.rdrop.com/users/paulmck/RCU} | ||
1223 | [Viewed May 25, 2005]" | ||
1224 | ,annotation=" | ||
1225 | Paul McKenney's RCU page. | ||
1226 | " | ||
1227 | } | ||
1228 | |||
1229 | @unpublished{JosephSeigh2005a | ||
1230 | ,Author="Joseph Seigh" | ||
1231 | ,Title="{RCU}+{SMR} (hazard pointers)" | ||
1232 | ,month="July" | ||
1233 | ,year="2005" | ||
1234 | ,note="Personal communication" | ||
1235 | ,annotation=" | ||
1236 | Joe Seigh announcing his atomic-ptr-plus project. | ||
1237 | http://sourceforge.net/projects/atomic-ptr-plus/ | ||
1238 | " | ||
1239 | } | ||
1240 | |||
1241 | @unpublished{JosephSeigh2005b | ||
1242 | ,Author="Joseph Seigh" | ||
1243 | ,Title="Lock-free synchronization primitives" | ||
1244 | ,month="July" | ||
1245 | ,day="6" | ||
1246 | ,year="2005" | ||
1247 | ,note="Available: | ||
1248 | \url{http://sourceforge.net/projects/atomic-ptr-plus/} | ||
1249 | [Viewed August 8, 2005]" | ||
1250 | ,annotation=" | ||
1251 | Joe Seigh's atomic-ptr-plus project. | ||
1252 | " | ||
1253 | } | ||
1254 | |||
1255 | @unpublished{PaulMcKenney2005c | ||
1256 | ,Author="Paul E.McKenney" | ||
1257 | ,Title="{[RFC,PATCH] RCU} and {CONFIG\_PREEMPT\_RT} sane patch" | ||
1258 | ,month="August" | ||
1259 | ,day="1" | ||
1260 | ,year="2005" | ||
1261 | ,note="Available: | ||
1262 | \url{http://lkml.org/lkml/2005/8/1/155} | ||
1263 | [Viewed March 14, 2006]" | ||
1264 | ,annotation=" | ||
1265 | First operating counter-based realtime RCU patch posted to LKML. | ||
1266 | " | ||
1267 | } | ||
1268 | |||
1269 | @unpublished{PaulMcKenney2005d | ||
1270 | ,Author="Paul E. McKenney" | ||
1271 | ,Title="Re: [Fwd: Re: [patch] Real-Time Preemption, -RT-2.6.13-rc4-V0.7.52-01]" | ||
1272 | ,month="August" | ||
1273 | ,day="8" | ||
1274 | ,year="2005" | ||
1275 | ,note="Available: | ||
1276 | \url{http://lkml.org/lkml/2005/8/8/108} | ||
1277 | [Viewed March 14, 2006]" | ||
1278 | ,annotation=" | ||
1279 | First operating counter-based realtime RCU patch posted to LKML, | ||
1280 | but fixed so that various unusual combinations of configuration | ||
1281 | parameters all function properly. | ||
1282 | " | ||
1283 | } | ||
1284 | |||
1285 | @unpublished{PaulMcKenney2005rcutorture | ||
1286 | ,Author="Paul E. McKenney" | ||
1287 | ,Title="{[PATCH]} {RCU} torture testing" | ||
1288 | ,month="October" | ||
1289 | ,day="1" | ||
1290 | ,year="2005" | ||
1291 | ,note="Available: | ||
1292 | \url{http://lkml.org/lkml/2005/10/1/70} | ||
1293 | [Viewed March 14, 2006]" | ||
1294 | ,annotation=" | ||
1295 | First rcutorture patch. | ||
581 | " | 1296 | " |
582 | } | 1297 | } |
583 | 1298 | ||
@@ -591,22 +1306,39 @@ Distributed Processing Symposium" | |||
591 | ,year="2006" | 1306 | ,year="2006" |
592 | ,day="25-29" | 1307 | ,day="25-29" |
593 | ,address="Rhodes, Greece" | 1308 | ,address="Rhodes, Greece" |
1309 | ,note="Available: | ||
1310 | \url{http://www.rdrop.com/users/paulmck/RCU/hart_ipdps06.pdf} | ||
1311 | [Viewed April 28, 2008]" | ||
1312 | ,annotation=" | ||
1313 | Compares QSBR, HPBR, EBR, and lock-free reference counting. | ||
1314 | http://www.cs.toronto.edu/~tomhart/perflab/ipdps06.tgz | ||
1315 | " | ||
1316 | } | ||
1317 | |||
1318 | @unpublished{NickPiggin2006radixtree | ||
1319 | ,Author="Nick Piggin" | ||
1320 | ,Title="[patch 3/3] radix-tree: {RCU} lockless readside" | ||
1321 | ,month="June" | ||
1322 | ,day="20" | ||
1323 | ,year="2006" | ||
1324 | ,note="Available: | ||
1325 | \url{http://lkml.org/lkml/2006/6/20/238} | ||
1326 | [Viewed March 25, 2008]" | ||
594 | ,annotation=" | 1327 | ,annotation=" |
595 | Compares QSBR (AKA "classic RCU"), HPBR, EBR, and lock-free | 1328 | RCU-protected radix tree. |
596 | reference counting. | ||
597 | " | 1329 | " |
598 | } | 1330 | } |
599 | 1331 | ||
600 | @Conference{PaulEMcKenney2006b | 1332 | @Conference{PaulEMcKenney2006b |
601 | ,Author="Paul E. McKenney and Dipankar Sarma and Ingo Molnar and | 1333 | ,Author="Paul E. McKenney and Dipankar Sarma and Ingo Molnar and |
602 | Suparna Bhattacharya" | 1334 | Suparna Bhattacharya" |
603 | ,Title="Extending RCU for Realtime and Embedded Workloads" | 1335 | ,Title="Extending {RCU} for Realtime and Embedded Workloads" |
604 | ,Booktitle="{Ottawa Linux Symposium}" | 1336 | ,Booktitle="{Ottawa Linux Symposium}" |
605 | ,Month="July" | 1337 | ,Month="July" |
606 | ,Year="2006" | 1338 | ,Year="2006" |
607 | ,pages="v2 123-138" | 1339 | ,pages="v2 123-138" |
608 | ,note="Available: | 1340 | ,note="Available: |
609 | \url{http://www.linuxsymposium.org/2006/index_2006.php} | 1341 | \url{http://www.linuxsymposium.org/2006/view_abstract.php?content_key=184} |
610 | \url{http://www.rdrop.com/users/paulmck/RCU/OLSrtRCU.2006.08.11a.pdf} | 1342 | \url{http://www.rdrop.com/users/paulmck/RCU/OLSrtRCU.2006.08.11a.pdf} |
611 | [Viewed January 1, 2007]" | 1343 | [Viewed January 1, 2007]" |
612 | ,annotation=" | 1344 | ,annotation=" |
@@ -614,6 +1346,37 @@ Suparna Bhattacharya" | |||
614 | " | 1346 | " |
615 | } | 1347 | } |
616 | 1348 | ||
1349 | @unpublished{WikipediaRCU | ||
1350 | ,Author="Paul E. McKenney and Chris Purcell and Algae and Ben Schumin and | ||
1351 | Gaius Cornelius and Qwertyus and Neil Conway and Sbw and Blainster and | ||
1352 | Canis Rufus and Zoicon5 and Anome and Hal Eisen" | ||
1353 | ,Title="Read-Copy Update" | ||
1354 | ,month="July" | ||
1355 | ,day="8" | ||
1356 | ,year="2006" | ||
1357 | ,note="Available: | ||
1358 | \url{http://en.wikipedia.org/wiki/Read-copy-update} | ||
1359 | [Viewed August 21, 2006]" | ||
1360 | ,annotation=" | ||
1361 | Wikipedia RCU page as of July 8 2006. | ||
1362 | " | ||
1363 | } | ||
1364 | |||
1365 | @Conference{NickPiggin2006LocklessPageCache | ||
1366 | ,Author="Nick Piggin" | ||
1367 | ,Title="A Lockless Pagecache in Linux---Introduction, Progress, Performance" | ||
1368 | ,Booktitle="{Ottawa Linux Symposium}" | ||
1369 | ,Month="July" | ||
1370 | ,Year="2006" | ||
1371 | ,pages="v2 249-254" | ||
1372 | ,note="Available: | ||
1373 | \url{http://www.linuxsymposium.org/2006/view_abstract.php?content_key=184} | ||
1374 | [Viewed January 11, 2009]" | ||
1375 | ,annotation=" | ||
1376 | Uses RCU-protected radix tree for a lockless page cache. | ||
1377 | " | ||
1378 | } | ||
1379 | |||
617 | @unpublished{PaulEMcKenney2006c | 1380 | @unpublished{PaulEMcKenney2006c |
618 | ,Author="Paul E. McKenney" | 1381 | ,Author="Paul E. McKenney" |
619 | ,Title="Sleepable {RCU}" | 1382 | ,Title="Sleepable {RCU}" |
@@ -637,29 +1400,301 @@ Revised: | |||
637 | ,day="18" | 1400 | ,day="18" |
638 | ,year="2006" | 1401 | ,year="2006" |
639 | ,note="Available: | 1402 | ,note="Available: |
640 | \url{http://www.nada.kth.se/~snilsson/public/papers/trash/trash.pdf} | 1403 | \url{http://www.nada.kth.se/~snilsson/publications/TRASH/trash.pdf} |
641 | [Viewed February 24, 2007]" | 1404 | [Viewed March 4, 2011]" |
642 | ,annotation=" | 1405 | ,annotation=" |
643 | RCU-protected dynamic trie-hash combination. | 1406 | RCU-protected dynamic trie-hash combination. |
644 | " | 1407 | " |
645 | } | 1408 | } |
646 | 1409 | ||
647 | @unpublished{ThomasEHart2007a | 1410 | @unpublished{ChristophHellwig2006RCU2SRCU |
648 | ,Author="Thomas E. Hart and Paul E. McKenney and Angela Demke Brown and Jonathan Walpole" | 1411 | ,Author="Christoph Hellwig" |
649 | ,Title="Performance of memory reclamation for lockless synchronization" | 1412 | ,Title="Re: {[-mm PATCH 1/4]} {RCU}: split classic rcu" |
650 | ,journal="J. Parallel Distrib. Comput." | 1413 | ,month="September" |
1414 | ,day="28" | ||
1415 | ,year="2006" | ||
1416 | ,note="Available: | ||
1417 | \url{http://lkml.org/lkml/2006/9/28/160} | ||
1418 | [Viewed March 27, 2008]" | ||
1419 | } | ||
1420 | |||
1421 | @unpublished{PaulEMcKenneyRCUusagePage | ||
1422 | ,Author="Paul E. McKenney" | ||
1423 | ,Title="{RCU} {Linux} Usage" | ||
1424 | ,month="October" | ||
1425 | ,year="2006" | ||
1426 | ,note="Available: | ||
1427 | \url{http://www.rdrop.com/users/paulmck/RCU/linuxusage.html} | ||
1428 | [Viewed January 14, 2007]" | ||
1429 | ,annotation=" | ||
1430 | Paul McKenney's RCU page showing graphs plotting Linux-kernel | ||
1431 | usage of RCU. | ||
1432 | " | ||
1433 | } | ||
1434 | |||
1435 | @unpublished{PaulEMcKenneyRCUusageRawDataPage | ||
1436 | ,Author="Paul E. McKenney" | ||
1437 | ,Title="Read-Copy Update {(RCU)} Usage in {Linux} Kernel" | ||
1438 | ,month="October" | ||
1439 | ,year="2006" | ||
1440 | ,note="Available: | ||
1441 | \url{http://www.rdrop.com/users/paulmck/RCU/linuxusage/rculocktab.html} | ||
1442 | [Viewed January 14, 2007]" | ||
1443 | ,annotation=" | ||
1444 | Paul McKenney's RCU page showing Linux usage of RCU in tabular | ||
1445 | form, with links to corresponding cscope databases. | ||
1446 | " | ||
1447 | } | ||
1448 | |||
1449 | @unpublished{GauthamShenoy2006RCUrwlock | ||
1450 | ,Author="Gautham R. Shenoy" | ||
1451 | ,Title="[PATCH 4/5] lock\_cpu\_hotplug: Redesign - Lightweight implementation of lock\_cpu\_hotplug" | ||
1452 | ,month="October" | ||
1453 | ,year="2006" | ||
1454 | ,day=26 | ||
1455 | ,note="Available: | ||
1456 | \url{http://lkml.org/lkml/2006/10/26/73} | ||
1457 | [Viewed January 26, 2009]" | ||
1458 | ,annotation=" | ||
1459 | RCU-based reader-writer lock that allows readers to proceed with | ||
1460 | no memory barriers or atomic instruction in absence of writers. | ||
1461 | If writer do show up, readers must of course wait as required by | ||
1462 | the semantics of reader-writer locking. This is a recursive | ||
1463 | lock. | ||
1464 | " | ||
1465 | } | ||
1466 | |||
1467 | @unpublished{JensAxboe2006SlowSRCU | ||
1468 | ,Author="Jens Axboe" | ||
1469 | ,Title="Re: [patch] cpufreq: mark \url{cpufreq_tsc()} as | ||
1470 | \url{core_initcall_sync}" | ||
1471 | ,month="November" | ||
1472 | ,year="2006" | ||
1473 | ,day=17 | ||
1474 | ,note="Available: | ||
1475 | \url{http://lkml.org/lkml/2006/11/17/56} | ||
1476 | [Viewed May 28, 2007]" | ||
1477 | ,annotation=" | ||
1478 | SRCU's grace periods are too slow for Jens, even after a | ||
1479 | factor-of-three speedup. | ||
1480 | Sped-up version of SRCU at http://lkml.org/lkml/2006/11/17/359. | ||
1481 | " | ||
1482 | } | ||
1483 | |||
1484 | @unpublished{OlegNesterov2006QRCU | ||
1485 | ,Author="Oleg Nesterov" | ||
1486 | ,Title="Re: [patch] cpufreq: mark {\tt cpufreq\_tsc()} as | ||
1487 | {\tt core\_initcall\_sync}" | ||
1488 | ,month="November" | ||
1489 | ,year="2006" | ||
1490 | ,day=19 | ||
1491 | ,note="Available: | ||
1492 | \url{http://lkml.org/lkml/2006/11/19/69} | ||
1493 | [Viewed May 28, 2007]" | ||
1494 | ,annotation=" | ||
1495 | First cut of QRCU. Expanded/corrected versions followed. | ||
1496 | Used to be OlegNesterov2007QRCU, now time-corrected. | ||
1497 | " | ||
1498 | } | ||
1499 | |||
1500 | @unpublished{OlegNesterov2006aQRCU | ||
1501 | ,Author="Oleg Nesterov" | ||
1502 | ,Title="Re: [RFC, PATCH 1/2] qrcu: {"quick"} srcu implementation" | ||
1503 | ,month="November" | ||
1504 | ,year="2006" | ||
1505 | ,day=30 | ||
1506 | ,note="Available: | ||
1507 | \url{http://lkml.org/lkml/2006/11/29/330} | ||
1508 | [Viewed November 26, 2008]" | ||
1509 | ,annotation=" | ||
1510 | Expanded/corrected version of QRCU. | ||
1511 | Used to be OlegNesterov2007aQRCU, now time-corrected. | ||
1512 | " | ||
1513 | } | ||
1514 | |||
1515 | @unpublished{EvgeniyPolyakov2006RCUslowdown | ||
1516 | ,Author="Evgeniy Polyakov" | ||
1517 | ,Title="Badness in postponing work" | ||
1518 | ,month="December" | ||
1519 | ,year="2006" | ||
1520 | ,day=05 | ||
1521 | ,note="Available: | ||
1522 | \url{http://www.ioremap.net/node/41} | ||
1523 | [Viewed October 28, 2008]" | ||
1524 | ,annotation=" | ||
1525 | Using RCU as a pure delay leads to a 2.5x slowdown in skbs in | ||
1526 | the Linux kernel. | ||
1527 | " | ||
1528 | } | ||
1529 | |||
1530 | @inproceedings{ChrisMatthews2006ClusteredObjectsRCU | ||
1531 | ,author = {Matthews, Chris and Coady, Yvonne and Appavoo, Jonathan} | ||
1532 | ,title = {Portability events: a programming model for scalable system infrastructures} | ||
1533 | ,booktitle = {PLOS '06: Proceedings of the 3rd workshop on Programming languages and operating systems} | ||
1534 | ,year = {2006} | ||
1535 | ,isbn = {1-59593-577-0} | ||
1536 | ,pages = {11} | ||
1537 | ,location = {San Jose, California} | ||
1538 | ,doi = {http://doi.acm.org/10.1145/1215995.1216006} | ||
1539 | ,publisher = {ACM} | ||
1540 | ,address = {New York, NY, USA} | ||
1541 | ,annotation={ | ||
1542 | Uses K42's RCU-like functionality to manage clustered-object | ||
1543 | lifetimes. | ||
1544 | }} | ||
1545 | |||
1546 | @article{DilmaDaSilva2006K42 | ||
1547 | ,author = {Silva, Dilma Da and Krieger, Orran and Wisniewski, Robert W. and Waterland, Amos and Tam, David and Baumann, Andrew} | ||
1548 | ,title = {K42: an infrastructure for operating system research} | ||
1549 | ,journal = {SIGOPS Oper. Syst. Rev.} | ||
1550 | ,volume = {40} | ||
1551 | ,number = {2} | ||
1552 | ,year = {2006} | ||
1553 | ,issn = {0163-5980} | ||
1554 | ,pages = {34--42} | ||
1555 | ,doi = {http://doi.acm.org/10.1145/1131322.1131333} | ||
1556 | ,publisher = {ACM} | ||
1557 | ,address = {New York, NY, USA} | ||
1558 | ,annotation={ | ||
1559 | Describes relationship of K42 generations to RCU. | ||
1560 | }} | ||
1561 | |||
1562 | # CoreyMinyard2007list_splice_rcu | ||
1563 | @unpublished{CoreyMinyard2007list:splice:rcu | ||
1564 | ,Author="Corey Minyard and Paul E. McKenney" | ||
1565 | ,Title="{[PATCH]} add an {RCU} version of list splicing" | ||
1566 | ,month="January" | ||
1567 | ,year="2007" | ||
1568 | ,day=3 | ||
1569 | ,note="Available: | ||
1570 | \url{http://lkml.org/lkml/2007/1/3/112} | ||
1571 | [Viewed May 28, 2007]" | ||
1572 | ,annotation=" | ||
1573 | Patch for list_splice_rcu(). | ||
1574 | " | ||
1575 | } | ||
1576 | |||
1577 | @unpublished{PaulEMcKenney2007rcubarrier | ||
1578 | ,Author="Paul E. McKenney" | ||
1579 | ,Title="{RCU} and Unloadable Modules" | ||
1580 | ,month="January" | ||
1581 | ,day="14" | ||
1582 | ,year="2007" | ||
1583 | ,note="Available: | ||
1584 | \url{http://lwn.net/Articles/217484/} | ||
1585 | [Viewed November 22, 2007]" | ||
1586 | ,annotation=" | ||
1587 | LWN article introducing the rcu_barrier() primitive. | ||
1588 | " | ||
1589 | } | ||
1590 | |||
1591 | @unpublished{PeterZijlstra2007SyncBarrier | ||
1592 | ,Author="Peter Zijlstra and Ingo Molnar" | ||
1593 | ,Title="{[PATCH 3/7]} barrier: a scalable synchonisation barrier" | ||
1594 | ,month="January" | ||
1595 | ,year="2007" | ||
1596 | ,day=28 | ||
1597 | ,note="Available: | ||
1598 | \url{http://lkml.org/lkml/2007/1/28/34} | ||
1599 | [Viewed March 27, 2008]" | ||
1600 | ,annotation=" | ||
1601 | RCU-like implementation for frequent updaters and rare readers(!). | ||
1602 | Subsumed into QRCU. Maybe... | ||
1603 | " | ||
1604 | } | ||
1605 | |||
1606 | @unpublished{PaulEMcKenney2007BoostRCU | ||
1607 | ,Author="Paul E. McKenney" | ||
1608 | ,Title="Priority-Boosting {RCU} Read-Side Critical Sections" | ||
1609 | ,month="February" | ||
1610 | ,day="5" | ||
1611 | ,year="2007" | ||
1612 | ,note="Available: | ||
1613 | \url{http://lwn.net/Articles/220677/} | ||
1614 | Revised: | ||
1615 | \url{http://www.rdrop.com/users/paulmck/RCU/RCUbooststate.2007.04.16a.pdf} | ||
1616 | [Viewed September 7, 2007]" | ||
1617 | ,annotation=" | ||
1618 | LWN article introducing RCU priority boosting. | ||
1619 | " | ||
1620 | } | ||
1621 | |||
1622 | @unpublished{PaulMcKenney2007QRCUpatch | ||
1623 | ,Author="Paul E. McKenney" | ||
1624 | ,Title="{[PATCH]} {QRCU} with lockless fastpath" | ||
1625 | ,month="February" | ||
1626 | ,year="2007" | ||
1627 | ,day=24 | ||
1628 | ,note="Available: | ||
1629 | \url{http://lkml.org/lkml/2007/2/25/18} | ||
1630 | [Viewed March 27, 2008]" | ||
1631 | ,annotation=" | ||
1632 | Patch for QRCU supplying lock-free fast path. | ||
1633 | " | ||
1634 | } | ||
1635 | |||
1636 | @article{JonathanAppavoo2007K42RCU | ||
1637 | ,author = {Appavoo, Jonathan and Silva, Dilma Da and Krieger, Orran and Auslander, Marc and Ostrowski, Michal and Rosenburg, Bryan and Waterland, Amos and Wisniewski, Robert W. and Xenidis, Jimi and Stumm, Michael and Soares, Livio} | ||
1638 | ,title = {Experience distributing objects in an SMMP OS} | ||
1639 | ,journal = {ACM Trans. Comput. Syst.} | ||
1640 | ,volume = {25} | ||
1641 | ,number = {3} | ||
1642 | ,year = {2007} | ||
1643 | ,issn = {0734-2071} | ||
1644 | ,pages = {6/1--6/52} | ||
1645 | ,doi = {http://doi.acm.org/10.1145/1275517.1275518} | ||
1646 | ,publisher = {ACM} | ||
1647 | ,address = {New York, NY, USA} | ||
1648 | ,annotation={ | ||
1649 | Role of RCU in K42. | ||
1650 | }} | ||
1651 | |||
1652 | @conference{RobertOlsson2007Trash | ||
1653 | ,Author="Robert Olsson and Stefan Nilsson" | ||
1654 | ,Title="{TRASH}: A dynamic {LC}-trie and hash data structure" | ||
1655 | ,booktitle="Workshop on High Performance Switching and Routing (HPSR'07)" | ||
1656 | ,month="May" | ||
1657 | ,year="2007" | ||
1658 | ,note="Available: | ||
1659 | \url{http://ieeexplore.ieee.org/xpl/freeabs_all.jsp?arnumber=4281239} | ||
1660 | [Viewed October 1, 2010]" | ||
1661 | ,annotation=" | ||
1662 | RCU-protected dynamic trie-hash combination. | ||
1663 | " | ||
1664 | } | ||
1665 | |||
1666 | @conference{PeterZijlstra2007ConcurrentPagecacheRCU | ||
1667 | ,Author="Peter Zijlstra" | ||
1668 | ,Title="Concurrent Pagecache" | ||
1669 | ,Booktitle="Linux Symposium" | ||
1670 | ,month="June" | ||
651 | ,year="2007" | 1671 | ,year="2007" |
652 | ,note="To appear in J. Parallel Distrib. Comput. | 1672 | ,address="Ottawa, Canada" |
653 | \url{doi=10.1016/j.jpdc.2007.04.010}" | 1673 | ,note="Available: |
1674 | \url{http://ols.108.redhat.com/2007/Reprints/zijlstra-Reprint.pdf} | ||
1675 | [Viewed April 14, 2008]" | ||
1676 | ,annotation=" | ||
1677 | Page-cache modifications permitting RCU readers and concurrent | ||
1678 | updates. | ||
1679 | " | ||
1680 | } | ||
1681 | |||
1682 | @unpublished{PaulEMcKenney2007whatisRCU | ||
1683 | ,Author="Paul E. McKenney" | ||
1684 | ,Title="What is {RCU}?" | ||
1685 | ,year="2007" | ||
1686 | ,month="07" | ||
1687 | ,note="Available: | ||
1688 | \url{http://www.rdrop.com/users/paulmck/RCU/whatisRCU.html} | ||
1689 | [Viewed July 6, 2007]" | ||
654 | ,annotation={ | 1690 | ,annotation={ |
655 | Compares QSBR (AKA "classic RCU"), HPBR, EBR, and lock-free | 1691 | Describes RCU in Linux kernel. |
656 | reference counting. Journal version of ThomasEHart2006a. | ||
657 | } | 1692 | } |
658 | } | 1693 | } |
659 | 1694 | ||
660 | @unpublished{PaulEMcKenney2007QRCUspin | 1695 | @unpublished{PaulEMcKenney2007QRCUspin |
661 | ,Author="Paul E. McKenney" | 1696 | ,Author="Paul E. McKenney" |
662 | ,Title="Using Promela and Spin to verify parallel algorithms" | 1697 | ,Title="Using {Promela} and {Spin} to verify parallel algorithms" |
663 | ,month="August" | 1698 | ,month="August" |
664 | ,day="1" | 1699 | ,day="1" |
665 | ,year="2007" | 1700 | ,year="2007" |
@@ -669,6 +1704,50 @@ Revised: | |||
669 | ,annotation=" | 1704 | ,annotation=" |
670 | LWN article describing Promela and spin, and also using Oleg | 1705 | LWN article describing Promela and spin, and also using Oleg |
671 | Nesterov's QRCU as an example (with Paul McKenney's fastpath). | 1706 | Nesterov's QRCU as an example (with Paul McKenney's fastpath). |
1707 | Merged patch at: http://lkml.org/lkml/2007/2/25/18 | ||
1708 | " | ||
1709 | } | ||
1710 | |||
1711 | @unpublished{PaulEMcKenney2007WG21DDOatomics | ||
1712 | ,Author="Paul E. McKenney and Hans-J. Boehm and Lawrence Crowl" | ||
1713 | ,Title="C++ Data-Dependency Ordering: Atomics and Memory Model" | ||
1714 | ,month="August" | ||
1715 | ,day="3" | ||
1716 | ,year="2007" | ||
1717 | ,note="Preprint: | ||
1718 | \url{http://open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2664.htm} | ||
1719 | [Viewed December 7, 2009]" | ||
1720 | ,annotation=" | ||
1721 | RCU for C++, parts 1 and 2. | ||
1722 | " | ||
1723 | } | ||
1724 | |||
1725 | @unpublished{PaulEMcKenney2007WG21DDOannotation | ||
1726 | ,Author="Paul E. McKenney and Lawrence Crowl" | ||
1727 | ,Title="C++ Data-Dependency Ordering: Function Annotation" | ||
1728 | ,month="September" | ||
1729 | ,day="18" | ||
1730 | ,year="2008" | ||
1731 | ,note="Preprint: | ||
1732 | \url{http://open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2782.htm} | ||
1733 | [Viewed December 7, 2009]" | ||
1734 | ,annotation=" | ||
1735 | RCU for C++, part 2, updated many times. | ||
1736 | " | ||
1737 | } | ||
1738 | |||
1739 | @unpublished{PaulEMcKenney2007PreemptibleRCUPatch | ||
1740 | ,Author="Paul E. McKenney" | ||
1741 | ,Title="[PATCH RFC 0/9] {RCU}: Preemptible {RCU}" | ||
1742 | ,month="September" | ||
1743 | ,day="10" | ||
1744 | ,year="2007" | ||
1745 | ,note="Available: | ||
1746 | \url{http://lkml.org/lkml/2007/9/10/213} | ||
1747 | [Viewed October 25, 2007]" | ||
1748 | ,annotation=" | ||
1749 | Final patch for preemptable RCU to -rt. (Later patches were | ||
1750 | to mainline, eventually incorporated.) | ||
672 | " | 1751 | " |
673 | } | 1752 | } |
674 | 1753 | ||
@@ -686,10 +1765,46 @@ Revised: | |||
686 | " | 1765 | " |
687 | } | 1766 | } |
688 | 1767 | ||
1768 | @article{ThomasEHart2007a | ||
1769 | ,Author="Thomas E. Hart and Paul E. McKenney and Angela Demke Brown and Jonathan Walpole" | ||
1770 | ,Title="Performance of memory reclamation for lockless synchronization" | ||
1771 | ,journal="J. Parallel Distrib. Comput." | ||
1772 | ,volume={67} | ||
1773 | ,number="12" | ||
1774 | ,year="2007" | ||
1775 | ,issn="0743-7315" | ||
1776 | ,pages="1270--1285" | ||
1777 | ,doi="http://dx.doi.org/10.1016/j.jpdc.2007.04.010" | ||
1778 | ,publisher="Academic Press, Inc." | ||
1779 | ,address="Orlando, FL, USA" | ||
1780 | ,annotation={ | ||
1781 | Compares QSBR, HPBR, EBR, and lock-free reference counting. | ||
1782 | Journal version of ThomasEHart2006a. | ||
1783 | } | ||
1784 | } | ||
1785 | |||
1786 | @unpublished{MathieuDesnoyers2007call:rcu:schedNeeded | ||
1787 | ,Author="Mathieu Desnoyers" | ||
1788 | ,Title="Re: [patch 1/2] {Linux} Kernel Markers - Support Multiple Probes" | ||
1789 | ,month="December" | ||
1790 | ,day="20" | ||
1791 | ,year="2007" | ||
1792 | ,note="Available: | ||
1793 | \url{http://lkml.org/lkml/2007/12/20/244} | ||
1794 | [Viewed March 27, 2008]" | ||
1795 | ,annotation=" | ||
1796 | Request for call_rcu_sched() and rcu_barrier_sched(). | ||
1797 | " | ||
1798 | } | ||
1799 | |||
1800 | |||
689 | ######################################################################## | 1801 | ######################################################################## |
690 | # | 1802 | # |
691 | # "What is RCU?" LWN series. | 1803 | # "What is RCU?" LWN series. |
692 | # | 1804 | # |
1805 | # http://lwn.net/Articles/262464/ (What is RCU, Fundamentally?) | ||
1806 | # http://lwn.net/Articles/263130/ (What is RCU's Usage?) | ||
1807 | # http://lwn.net/Articles/264090/ (What is RCU's API?) | ||
693 | 1808 | ||
694 | @unpublished{PaulEMcKenney2007WhatIsRCUFundamentally | 1809 | @unpublished{PaulEMcKenney2007WhatIsRCUFundamentally |
695 | ,Author="Paul E. McKenney and Jonathan Walpole" | 1810 | ,Author="Paul E. McKenney and Jonathan Walpole" |
@@ -723,7 +1838,7 @@ Revised: | |||
723 | 3. RCU is a Bulk Reference-Counting Mechanism | 1838 | 3. RCU is a Bulk Reference-Counting Mechanism |
724 | 4. RCU is a Poor Man's Garbage Collector | 1839 | 4. RCU is a Poor Man's Garbage Collector |
725 | 5. RCU is a Way of Providing Existence Guarantees | 1840 | 5. RCU is a Way of Providing Existence Guarantees |
726 | 6. RCU is a Way of Waiting for Things to Finish | 1841 | 6. RCU is a Way of Waiting for Things to Finish |
727 | " | 1842 | " |
728 | } | 1843 | } |
729 | 1844 | ||
@@ -747,20 +1862,96 @@ Revised: | |||
747 | # | 1862 | # |
748 | ######################################################################## | 1863 | ######################################################################## |
749 | 1864 | ||
1865 | |||
1866 | @unpublished{SteveRostedt2008dyntickRCUpatch | ||
1867 | ,Author="Steven Rostedt and Paul E. McKenney" | ||
1868 | ,Title="{[PATCH]} add support for dynamic ticks and preempt rcu" | ||
1869 | ,month="January" | ||
1870 | ,day="29" | ||
1871 | ,year="2008" | ||
1872 | ,note="Available: | ||
1873 | \url{http://lkml.org/lkml/2008/1/29/208} | ||
1874 | [Viewed March 27, 2008]" | ||
1875 | ,annotation=" | ||
1876 | Patch that prevents preemptible RCU from unnecessarily waking | ||
1877 | up dynticks-idle CPUs. | ||
1878 | " | ||
1879 | } | ||
1880 | |||
1881 | @unpublished{PaulEMcKenney2008LKMLDependencyOrdering | ||
1882 | ,Author="Paul E. McKenney" | ||
1883 | ,Title="Re: [PATCH 02/22 -v7] Add basic support for gcc profiler instrumentation" | ||
1884 | ,month="February" | ||
1885 | ,day="1" | ||
1886 | ,year="2008" | ||
1887 | ,note="Available: | ||
1888 | \url{http://lkml.org/lkml/2008/2/2/255} | ||
1889 | [Viewed October 18, 2008]" | ||
1890 | ,annotation=" | ||
1891 | Explanation of compilers violating dependency ordering. | ||
1892 | " | ||
1893 | } | ||
1894 | |||
1895 | @Conference{PaulEMcKenney2008Beijing | ||
1896 | ,Author="Paul E. McKenney" | ||
1897 | ,Title="Introducing Technology Into {Linux} Or: | ||
1898 | Introducing your technology Into {Linux} will require introducing a | ||
1899 | lot of {Linux} into your technology!!!" | ||
1900 | ,Booktitle="2008 Linux Developer Symposium - China" | ||
1901 | ,Publisher="OSS China" | ||
1902 | ,Month="February" | ||
1903 | ,Year="2008" | ||
1904 | ,Address="Beijing, China" | ||
1905 | ,note="Available: | ||
1906 | \url{http://www.rdrop.com/users/paulmck/RCU/TechIntroLinux.2008.02.19a.pdf} | ||
1907 | [Viewed August 12, 2008]" | ||
1908 | } | ||
1909 | |||
1910 | @unpublished{PaulEMcKenney2008dynticksRCU | ||
1911 | ,Author="Paul E. McKenney and Steven Rostedt" | ||
1912 | ,Title="Integrating and Validating dynticks and Preemptable RCU" | ||
1913 | ,month="April" | ||
1914 | ,day="24" | ||
1915 | ,year="2008" | ||
1916 | ,note="Available: | ||
1917 | \url{http://lwn.net/Articles/279077/} | ||
1918 | [Viewed April 24, 2008]" | ||
1919 | ,annotation=" | ||
1920 | Describes use of Promela and Spin to validate (and fix!) the | ||
1921 | dynticks/RCU interface. | ||
1922 | " | ||
1923 | } | ||
1924 | |||
750 | @article{DinakarGuniguntala2008IBMSysJ | 1925 | @article{DinakarGuniguntala2008IBMSysJ |
751 | ,author="D. Guniguntala and P. E. McKenney and J. Triplett and J. Walpole" | 1926 | ,author="D. Guniguntala and P. E. McKenney and J. Triplett and J. Walpole" |
752 | ,title="The read-copy-update mechanism for supporting real-time applications on shared-memory multiprocessor systems with {Linux}" | 1927 | ,title="The read-copy-update mechanism for supporting real-time applications on shared-memory multiprocessor systems with {Linux}" |
753 | ,Year="2008" | 1928 | ,Year="2008" |
754 | ,Month="April" | 1929 | ,Month="April-June" |
755 | ,journal="IBM Systems Journal" | 1930 | ,journal="IBM Systems Journal" |
756 | ,volume="47" | 1931 | ,volume="47" |
757 | ,number="2" | 1932 | ,number="2" |
758 | ,pages="@@-@@" | 1933 | ,pages="221-236" |
759 | ,annotation=" | 1934 | ,annotation=" |
760 | RCU, realtime RCU, sleepable RCU, performance. | 1935 | RCU, realtime RCU, sleepable RCU, performance. |
761 | " | 1936 | " |
762 | } | 1937 | } |
763 | 1938 | ||
1939 | @unpublished{LaiJiangshan2008NewClassicAlgorithm | ||
1940 | ,Author="Lai Jiangshan" | ||
1941 | ,Title="[{RFC}][{PATCH}] rcu classic: new algorithm for callbacks-processing" | ||
1942 | ,month="June" | ||
1943 | ,day="3" | ||
1944 | ,year="2008" | ||
1945 | ,note="Available: | ||
1946 | \url{http://lkml.org/lkml/2008/6/2/539} | ||
1947 | [Viewed December 10, 2008]" | ||
1948 | ,annotation=" | ||
1949 | Updated RCU classic algorithm. Introduced multi-tailed list | ||
1950 | for RCU callbacks and also pulling common code into | ||
1951 | __call_rcu(). | ||
1952 | " | ||
1953 | } | ||
1954 | |||
764 | @article{PaulEMcKenney2008RCUOSR | 1955 | @article{PaulEMcKenney2008RCUOSR |
765 | ,author="Paul E. McKenney and Jonathan Walpole" | 1956 | ,author="Paul E. McKenney and Jonathan Walpole" |
766 | ,title="Introducing technology into the {Linux} kernel: a case study" | 1957 | ,title="Introducing technology into the {Linux} kernel: a case study" |
@@ -778,6 +1969,52 @@ Revised: | |||
778 | } | 1969 | } |
779 | } | 1970 | } |
780 | 1971 | ||
1972 | @unpublished{ManfredSpraul2008StateMachineRCU | ||
1973 | ,Author="Manfred Spraul" | ||
1974 | ,Title="[{RFC}, {PATCH}] state machine based rcu" | ||
1975 | ,month="August" | ||
1976 | ,day="21" | ||
1977 | ,year="2008" | ||
1978 | ,note="Available: | ||
1979 | \url{http://lkml.org/lkml/2008/8/21/336} | ||
1980 | [Viewed December 8, 2008]" | ||
1981 | ,annotation=" | ||
1982 | State-based RCU. One key thing that this patch does is to | ||
1983 | separate the dynticks handling of NMIs and IRQs. | ||
1984 | " | ||
1985 | } | ||
1986 | |||
1987 | @unpublished{ManfredSpraul2008dyntickIRQNMI | ||
1988 | ,Author="Manfred Spraul" | ||
1989 | ,Title="Re: [{RFC}, {PATCH}] v4 scalable classic {RCU} implementation" | ||
1990 | ,month="September" | ||
1991 | ,day="6" | ||
1992 | ,year="2008" | ||
1993 | ,note="Available: | ||
1994 | \url{http://lkml.org/lkml/2008/9/6/86} | ||
1995 | [Viewed December 8, 2008]" | ||
1996 | ,annotation=" | ||
1997 | Manfred notes a fix required to my attempt to separate irq | ||
1998 | and NMI processing for hierarchical RCU's dynticks interface. | ||
1999 | " | ||
2000 | } | ||
2001 | |||
2002 | @techreport{PaulEMcKenney2008cyclicRCU | ||
2003 | ,author="Paul E. McKenney" | ||
2004 | ,title="Efficient Support of Consistent Cyclic Search With Read-Copy Update" | ||
2005 | ,institution="US Patent and Trademark Office" | ||
2006 | ,address="Washington, DC" | ||
2007 | ,year="2008" | ||
2008 | ,number="US Patent 7,426,511" | ||
2009 | ,month="September" | ||
2010 | ,pages="23" | ||
2011 | ,annotation=" | ||
2012 | Maintains an additional level of indirection to allow | ||
2013 | readers to confine themselves to the desired snapshot of the | ||
2014 | data structure. Only permits one update at a time. | ||
2015 | " | ||
2016 | } | ||
2017 | |||
781 | @unpublished{PaulEMcKenney2008HierarchicalRCU | 2018 | @unpublished{PaulEMcKenney2008HierarchicalRCU |
782 | ,Author="Paul E. McKenney" | 2019 | ,Author="Paul E. McKenney" |
783 | ,Title="Hierarchical {RCU}" | 2020 | ,Title="Hierarchical {RCU}" |
@@ -793,6 +2030,21 @@ Revised: | |||
793 | " | 2030 | " |
794 | } | 2031 | } |
795 | 2032 | ||
2033 | @unpublished{PaulEMcKenney2009BloatwatchRCU | ||
2034 | ,Author="Paul E. McKenney" | ||
2035 | ,Title="Re: [PATCH fyi] RCU: the bloatwatch edition" | ||
2036 | ,month="January" | ||
2037 | ,day="14" | ||
2038 | ,year="2009" | ||
2039 | ,note="Available: | ||
2040 | \url{http://lkml.org/lkml/2009/1/14/449} | ||
2041 | [Viewed January 15, 2009]" | ||
2042 | ,annotation=" | ||
2043 | Small-footprint implementation of RCU for uniprocessor | ||
2044 | embedded applications -- and also for exposition purposes. | ||
2045 | " | ||
2046 | } | ||
2047 | |||
796 | @conference{PaulEMcKenney2009MaliciousURCU | 2048 | @conference{PaulEMcKenney2009MaliciousURCU |
797 | ,Author="Paul E. McKenney" | 2049 | ,Author="Paul E. McKenney" |
798 | ,Title="Using a Malicious User-Level {RCU} to Torture {RCU}-Based Algorithms" | 2050 | ,Title="Using a Malicious User-Level {RCU} to Torture {RCU}-Based Algorithms" |
@@ -816,15 +2068,17 @@ Revised: | |||
816 | ,year="2009" | 2068 | ,year="2009" |
817 | ,note="Available: | 2069 | ,note="Available: |
818 | \url{http://lkml.org/lkml/2009/2/5/572} | 2070 | \url{http://lkml.org/lkml/2009/2/5/572} |
819 | \url{git://lttng.org/userspace-rcu.git} | 2071 | \url{http://lttng.org/urcu} |
820 | [Viewed February 20, 2009]" | 2072 | [Viewed February 20, 2009]" |
821 | ,annotation=" | 2073 | ,annotation=" |
822 | Mathieu Desnoyers's user-space RCU implementation. | 2074 | Mathieu Desnoyers's user-space RCU implementation. |
823 | git://lttng.org/userspace-rcu.git | 2075 | git://lttng.org/userspace-rcu.git |
2076 | http://lttng.org/cgi-bin/gitweb.cgi?p=userspace-rcu.git | ||
2077 | http://lttng.org/urcu | ||
824 | " | 2078 | " |
825 | } | 2079 | } |
826 | 2080 | ||
827 | @unpublished{PaulEMcKenney2009BloatWatchRCU | 2081 | @unpublished{PaulEMcKenney2009LWNBloatWatchRCU |
828 | ,Author="Paul E. McKenney" | 2082 | ,Author="Paul E. McKenney" |
829 | ,Title="{RCU}: The {Bloatwatch} Edition" | 2083 | ,Title="{RCU}: The {Bloatwatch} Edition" |
830 | ,month="March" | 2084 | ,month="March" |
@@ -852,14 +2106,29 @@ Revised: | |||
852 | " | 2106 | " |
853 | } | 2107 | } |
854 | 2108 | ||
855 | @unpublished{JoshTriplett2009RPHash | 2109 | @unpublished{PaulEMcKenney2009fastRTRCU |
2110 | ,Author="Paul E. McKenney" | ||
2111 | ,Title="[{PATCH} {RFC} -tip 0/4] {RCU} cleanups and simplified preemptable {RCU}" | ||
2112 | ,month="July" | ||
2113 | ,day="23" | ||
2114 | ,year="2009" | ||
2115 | ,note="Available: | ||
2116 | \url{http://lkml.org/lkml/2009/7/23/294} | ||
2117 | [Viewed August 15, 2009]" | ||
2118 | ,annotation=" | ||
2119 | First posting of simple and fast preemptable RCU. | ||
2120 | " | ||
2121 | } | ||
2122 | |||
2123 | @InProceedings{JoshTriplett2009RPHash | ||
856 | ,Author="Josh Triplett" | 2124 | ,Author="Josh Triplett" |
857 | ,Title="Scalable concurrent hash tables via relativistic programming" | 2125 | ,Title="Scalable concurrent hash tables via relativistic programming" |
858 | ,month="September" | 2126 | ,month="September" |
859 | ,year="2009" | 2127 | ,year="2009" |
860 | ,note="Linux Plumbers Conference presentation" | 2128 | ,booktitle="Linux Plumbers Conference 2009" |
861 | ,annotation=" | 2129 | ,annotation=" |
862 | RP fun with hash tables. | 2130 | RP fun with hash tables. |
2131 | See also JoshTriplett2010RPHash | ||
863 | " | 2132 | " |
864 | } | 2133 | } |
865 | 2134 | ||
@@ -872,4 +2141,323 @@ Revised: | |||
872 | ,note="Available: | 2141 | ,note="Available: |
873 | \url{http://www.lttng.org/pub/thesis/desnoyers-dissertation-2009-12.pdf} | 2142 | \url{http://www.lttng.org/pub/thesis/desnoyers-dissertation-2009-12.pdf} |
874 | [Viewed December 9, 2009]" | 2143 | [Viewed December 9, 2009]" |
2144 | ,annotation={ | ||
2145 | Chapter 6 (page 97) covers user-level RCU. | ||
2146 | } | ||
2147 | } | ||
2148 | |||
2149 | @unpublished{RelativisticProgrammingWiki | ||
2150 | ,Author="Josh Triplett and Paul E. McKenney and Jonathan Walpole" | ||
2151 | ,Title="Relativistic Programming" | ||
2152 | ,month="September" | ||
2153 | ,year="2009" | ||
2154 | ,note="Available: | ||
2155 | \url{http://wiki.cs.pdx.edu/rp/} | ||
2156 | [Viewed December 9, 2009]" | ||
2157 | ,annotation=" | ||
2158 | Main Relativistic Programming Wiki. | ||
2159 | " | ||
2160 | } | ||
2161 | |||
2162 | @conference{PaulEMcKenney2009DeterministicRCU | ||
2163 | ,Author="Paul E. McKenney" | ||
2164 | ,Title="Deterministic Synchronization in Multicore Systems: the Role of {RCU}" | ||
2165 | ,Booktitle="Eleventh Real Time Linux Workshop" | ||
2166 | ,month="September" | ||
2167 | ,year="2009" | ||
2168 | ,address="Dresden, Germany" | ||
2169 | ,note="Available: | ||
2170 | \url{http://www.rdrop.com/users/paulmck/realtime/paper/DetSyncRCU.2009.08.18a.pdf} | ||
2171 | [Viewed January 14, 2009]" | ||
2172 | } | ||
2173 | |||
2174 | @unpublished{PaulEMcKenney2009HuntingHeisenbugs | ||
2175 | ,Author="Paul E. McKenney" | ||
2176 | ,Title="Hunting Heisenbugs" | ||
2177 | ,month="November" | ||
2178 | ,year="2009" | ||
2179 | ,day="1" | ||
2180 | ,note="Available: | ||
2181 | \url{http://paulmck.livejournal.com/14639.html} | ||
2182 | [Viewed June 4, 2010]" | ||
2183 | ,annotation=" | ||
2184 | Day-one bug in Tree RCU that took forever to track down. | ||
2185 | " | ||
2186 | } | ||
2187 | |||
2188 | @unpublished{MathieuDesnoyers2009defer:rcu | ||
2189 | ,Author="Mathieu Desnoyers" | ||
2190 | ,Title="Kernel RCU: shrink the size of the struct rcu\_head" | ||
2191 | ,month="December" | ||
2192 | ,year="2009" | ||
2193 | ,note="Available: | ||
2194 | \url{http://lkml.org/lkml/2009/10/18/129} | ||
2195 | [Viewed December 29, 2009]" | ||
2196 | ,annotation=" | ||
2197 | Mathieu proposed defer_rcu() with fixed-size per-thread pool | ||
2198 | of RCU callbacks. | ||
2199 | " | ||
2200 | } | ||
2201 | |||
2202 | @unpublished{MathieuDesnoyers2009VerifPrePub | ||
2203 | ,Author="Mathieu Desnoyers and Paul E. McKenney and Michel R. Dagenais" | ||
2204 | ,Title="Multi-Core Systems Modeling for Formal Verification of Parallel Algorithms" | ||
2205 | ,month="December" | ||
2206 | ,year="2009" | ||
2207 | ,note="Submitted to IEEE TPDS" | ||
2208 | ,annotation=" | ||
2209 | OOMem model for Mathieu's user-level RCU mechanical proof of | ||
2210 | correctness. | ||
2211 | " | ||
2212 | } | ||
2213 | |||
2214 | @unpublished{MathieuDesnoyers2009URCUPrePub | ||
2215 | ,Author="Mathieu Desnoyers and Paul E. McKenney and Alan Stern and Michel R. Dagenais and Jonathan Walpole" | ||
2216 | ,Title="User-Level Implementations of Read-Copy Update" | ||
2217 | ,month="December" | ||
2218 | ,year="2010" | ||
2219 | ,url=\url{http://www.computer.org/csdl/trans/td/2012/02/ttd2012020375-abs.html} | ||
2220 | ,annotation=" | ||
2221 | RCU overview, desiderata, semi-formal semantics, user-level RCU | ||
2222 | usage scenarios, three classes of RCU implementation, wait-free | ||
2223 | RCU updates, RCU grace-period batching, update overhead, | ||
2224 | http://www.rdrop.com/users/paulmck/RCU/urcu-main-accepted.2011.08.30a.pdf | ||
2225 | http://www.rdrop.com/users/paulmck/RCU/urcu-supp-accepted.2011.08.30a.pdf | ||
2226 | Superseded by MathieuDesnoyers2012URCU. | ||
2227 | " | ||
2228 | } | ||
2229 | |||
2230 | @inproceedings{HariKannan2009DynamicAnalysisRCU | ||
2231 | ,author = {Kannan, Hari} | ||
2232 | ,title = {Ordering decoupled metadata accesses in multiprocessors} | ||
2233 | ,booktitle = {MICRO 42: Proceedings of the 42nd Annual IEEE/ACM International Symposium on Microarchitecture} | ||
2234 | ,year = {2009} | ||
2235 | ,isbn = {978-1-60558-798-1} | ||
2236 | ,pages = {381--390} | ||
2237 | ,location = {New York, New York} | ||
2238 | ,doi = {http://doi.acm.org/10.1145/1669112.1669161} | ||
2239 | ,publisher = {ACM} | ||
2240 | ,address = {New York, NY, USA} | ||
2241 | ,annotation={ | ||
2242 | Uses RCU to protect metadata used in dynamic analysis. | ||
2243 | }} | ||
2244 | |||
2245 | @conference{PaulEMcKenney2010SimpleOptRCU | ||
2246 | ,Author="Paul E. McKenney" | ||
2247 | ,Title="Simplicity Through Optimization" | ||
2248 | ,Booktitle="linux.conf.au 2010" | ||
2249 | ,month="January" | ||
2250 | ,year="2010" | ||
2251 | ,address="Wellington, New Zealand" | ||
2252 | ,note="Available: | ||
2253 | \url{http://www.rdrop.com/users/paulmck/RCU/SimplicityThruOptimization.2010.01.21f.pdf} | ||
2254 | [Viewed October 10, 2010]" | ||
2255 | ,annotation=" | ||
2256 | TREE_PREEMPT_RCU optimizations greatly simplified the old | ||
2257 | PREEMPT_RCU implementation. | ||
2258 | " | ||
2259 | } | ||
2260 | |||
2261 | @unpublished{PaulEMcKenney2010LockdepRCU | ||
2262 | ,Author="Paul E. McKenney" | ||
2263 | ,Title="Lockdep-{RCU}" | ||
2264 | ,month="February" | ||
2265 | ,year="2010" | ||
2266 | ,day="1" | ||
2267 | ,note="Available: | ||
2268 | \url{https://lwn.net/Articles/371986/} | ||
2269 | [Viewed June 4, 2010]" | ||
2270 | ,annotation=" | ||
2271 | CONFIG_PROVE_RCU, or at least an early version. | ||
2272 | " | ||
2273 | } | ||
2274 | |||
2275 | @unpublished{AviKivity2010KVM2RCU | ||
2276 | ,Author="Avi Kivity" | ||
2277 | ,Title="[{PATCH} 37/40] {KVM}: Bump maximum vcpu count to 64" | ||
2278 | ,month="February" | ||
2279 | ,year="2010" | ||
2280 | ,note="Available: | ||
2281 | \url{http://www.mail-archive.com/kvm@vger.kernel.org/msg28640.html} | ||
2282 | [Viewed March 20, 2010]" | ||
2283 | ,annotation=" | ||
2284 | Use of RCU permits KVM to increase the size of guest OSes from | ||
2285 | 16 CPUs to 64 CPUs. | ||
2286 | " | ||
2287 | } | ||
2288 | |||
2289 | @unpublished{HerbertXu2010RCUResizeHash | ||
2290 | ,Author="Herbert Xu" | ||
2291 | ,Title="bridge: Add core IGMP snooping support" | ||
2292 | ,month="February" | ||
2293 | ,year="2010" | ||
2294 | ,note="Available: | ||
2295 | \url{http://kerneltrap.com/mailarchive/linux-netdev/2010/2/26/6270589} | ||
2296 | [Viewed March 20, 2011]" | ||
2297 | ,annotation={ | ||
2298 | Use a pair of list_head structures to support RCU-protected | ||
2299 | resizable hash tables. | ||
2300 | }} | ||
2301 | |||
2302 | @article{JoshTriplett2010RPHash | ||
2303 | ,author="Josh Triplett and Paul E. McKenney and Jonathan Walpole" | ||
2304 | ,title="Scalable Concurrent Hash Tables via Relativistic Programming" | ||
2305 | ,journal="ACM Operating Systems Review" | ||
2306 | ,year=2010 | ||
2307 | ,volume=44 | ||
2308 | ,number=3 | ||
2309 | ,month="July" | ||
2310 | ,annotation={ | ||
2311 | RP fun with hash tables. | ||
2312 | http://portal.acm.org/citation.cfm?id=1842733.1842750 | ||
2313 | }} | ||
2314 | |||
2315 | @unpublished{PaulEMcKenney2010RCUAPI | ||
2316 | ,Author="Paul E. McKenney" | ||
2317 | ,Title="The {RCU} {API}, 2010 Edition" | ||
2318 | ,month="December" | ||
2319 | ,day="8" | ||
2320 | ,year="2010" | ||
2321 | ,note="Available: | ||
2322 | \url{http://lwn.net/Articles/418853/} | ||
2323 | [Viewed December 8, 2010]" | ||
2324 | ,annotation=" | ||
2325 | Includes updated software-engineering features. | ||
2326 | " | ||
2327 | } | ||
2328 | |||
2329 | @mastersthesis{AndrejPodzimek2010masters | ||
2330 | ,author="Andrej Podzimek" | ||
2331 | ,title="Read-Copy-Update for OpenSolaris" | ||
2332 | ,school="Charles University in Prague" | ||
2333 | ,year="2010" | ||
2334 | ,note="Available: | ||
2335 | \url{https://andrej.podzimek.org/thesis.pdf} | ||
2336 | [Viewed January 31, 2011]" | ||
2337 | ,annotation={ | ||
2338 | Reviews RCU implementations and creates a few for OpenSolaris. | ||
2339 | Drives quiescent-state detection from RCU read-side primitives, | ||
2340 | in a manner roughly similar to that of Jim Houston. | ||
2341 | }} | ||
2342 | |||
2343 | @unpublished{LinusTorvalds2011Linux2:6:38:rc1:NPigginVFS | ||
2344 | ,Author="Linus Torvalds" | ||
2345 | ,Title="Linux 2.6.38-rc1" | ||
2346 | ,month="January" | ||
2347 | ,year="2011" | ||
2348 | ,note="Available: | ||
2349 | \url{https://lkml.org/lkml/2011/1/18/322} | ||
2350 | [Viewed March 4, 2011]" | ||
2351 | ,annotation={ | ||
2352 | "The RCU-based name lookup is at the other end of the spectrum - the | ||
2353 | absolute anti-gimmick. It's some seriously good stuff, and gets rid of | ||
2354 | the last main global lock that really tends to hurt some kernel loads. | ||
2355 | The dentry lock is no longer a big serializing issue. What's really | ||
2356 | nice about it is that it actually improves performance a lot even for | ||
2357 | single-threaded loads (on an SMP kernel), because it gets rid of some | ||
2358 | of the most expensive parts of path component lookup, which was the | ||
2359 | d_lock on every component lookup. So I'm seeing improvements of 30-50% | ||
2360 | on some seriously pathname-lookup intensive loads." | ||
2361 | }} | ||
2362 | |||
2363 | @techreport{JoshTriplett2011RPScalableCorrectOrdering | ||
2364 | ,author = {Josh Triplett and Philip W. Howard and Paul E. McKenney and Jonathan Walpole} | ||
2365 | ,title = {Scalable Correct Memory Ordering via Relativistic Programming} | ||
2366 | ,year = {2011} | ||
2367 | ,number = {11-03} | ||
2368 | ,institution = {Portland State University} | ||
2369 | ,note = {\url{http://www.cs.pdx.edu/pdfs/tr1103.pdf}} | ||
2370 | } | ||
2371 | |||
2372 | @inproceedings{PhilHoward2011RCUTMRBTree | ||
2373 | ,author = {Philip W. Howard and Jonathan Walpole} | ||
2374 | ,title = {A Relativistic Enhancement to Software Transactional Memory} | ||
2375 | ,booktitle = {Proceedings of the 3rd USENIX conference on Hot topics in parallelism} | ||
2376 | ,series = {HotPar'11} | ||
2377 | ,year = {2011} | ||
2378 | ,location = {Berkeley, CA} | ||
2379 | ,pages = {1--6} | ||
2380 | ,numpages = {6} | ||
2381 | ,url = {http://www.usenix.org/event/hotpar11/tech/final_files/Howard.pdf} | ||
2382 | ,publisher = {USENIX Association} | ||
2383 | ,address = {Berkeley, CA, USA} | ||
2384 | } | ||
2385 | |||
2386 | @techreport{PaulEMcKenney2011cyclicparallelRCU | ||
2387 | ,author="Paul E. McKenney and Jonathan Walpole" | ||
2388 | ,title="Efficient Support of Consistent Cyclic Search With Read-Copy Update and Parallel Updates" | ||
2389 | ,institution="US Patent and Trademark Office" | ||
2390 | ,address="Washington, DC" | ||
2391 | ,year="2011" | ||
2392 | ,number="US Patent 7,953,778" | ||
2393 | ,month="May" | ||
2394 | ,pages="34" | ||
2395 | ,annotation=" | ||
2396 | Maintains an array of generation numbers to track in-flight | ||
2397 | updates and keeps an additional level of indirection to allow | ||
2398 | readers to confine themselves to the desired snapshot of the | ||
2399 | data structure. | ||
2400 | " | ||
2401 | } | ||
2402 | |||
2403 | @inproceedings{Triplett:2011:RPHash | ||
2404 | ,author = {Triplett, Josh and McKenney, Paul E. and Walpole, Jonathan} | ||
2405 | ,title = {Resizable, Scalable, Concurrent Hash Tables via Relativistic Programming} | ||
2406 | ,booktitle = {Proceedings of the 2011 USENIX Annual Technical Conference} | ||
2407 | ,month = {June} | ||
2408 | ,year = {2011} | ||
2409 | ,pages = {145--158} | ||
2410 | ,numpages = {14} | ||
2411 | ,url={http://www.usenix.org/event/atc11/tech/final_files/atc11_proceedings.pdf} | ||
2412 | ,publisher = {The USENIX Association} | ||
2413 | ,address = {Portland, OR USA} | ||
2414 | } | ||
2415 | |||
2416 | @unpublished{PaulEMcKenney2011RCU3.0trainwreck | ||
2417 | ,Author="Paul E. McKenney" | ||
2418 | ,Title="3.0 and {RCU:} what went wrong" | ||
2419 | ,month="July" | ||
2420 | ,day="27" | ||
2421 | ,year="2011" | ||
2422 | ,note="Available: | ||
2423 | \url{http://lwn.net/Articles/453002/} | ||
2424 | [Viewed July 27, 2011]" | ||
2425 | ,annotation=" | ||
2426 | Analysis of the RCU trainwreck in Linux kernel 3.0. | ||
2427 | " | ||
2428 | } | ||
2429 | |||
2430 | @unpublished{NeilBrown2011MeetTheLockers | ||
2431 | ,Author="Neil Brown" | ||
2432 | ,Title="Meet the Lockers" | ||
2433 | ,month="August" | ||
2434 | ,day="3" | ||
2435 | ,year="2011" | ||
2436 | ,note="Available: | ||
2437 | \url{http://lwn.net/Articles/453685/} | ||
2438 | [Viewed September 2, 2011]" | ||
2439 | ,annotation=" | ||
2440 | The Locker family as an analogy for locking, reference counting, | ||
2441 | RCU, and seqlock. | ||
2442 | " | ||
2443 | } | ||
2444 | |||
2445 | @article{MathieuDesnoyers2012URCU | ||
2446 | ,Author="Mathieu Desnoyers and Paul E. McKenney and Alan Stern and Michel R. Dagenais and Jonathan Walpole" | ||
2447 | ,Title="User-Level Implementations of Read-Copy Update" | ||
2448 | ,journal="IEEE Transactions on Parallel and Distributed Systems" | ||
2449 | ,volume={23} | ||
2450 | ,year="2012" | ||
2451 | ,issn="1045-9219" | ||
2452 | ,pages="375-382" | ||
2453 | ,doi="http://doi.ieeecomputersociety.org/10.1109/TPDS.2011.159" | ||
2454 | ,publisher="IEEE Computer Society" | ||
2455 | ,address="Los Alamitos, CA, USA" | ||
2456 | ,annotation={ | ||
2457 | RCU overview, desiderata, semi-formal semantics, user-level RCU | ||
2458 | usage scenarios, three classes of RCU implementation, wait-free | ||
2459 | RCU updates, RCU grace-period batching, update overhead, | ||
2460 | http://www.rdrop.com/users/paulmck/RCU/urcu-main-accepted.2011.08.30a.pdf | ||
2461 | http://www.rdrop.com/users/paulmck/RCU/urcu-supp-accepted.2011.08.30a.pdf | ||
2462 | } | ||
875 | } | 2463 | } |
diff --git a/Documentation/RCU/checklist.txt b/Documentation/RCU/checklist.txt index bff2d8be1e18..5c8d74968090 100644 --- a/Documentation/RCU/checklist.txt +++ b/Documentation/RCU/checklist.txt | |||
@@ -180,6 +180,20 @@ over a rather long period of time, but improvements are always welcome! | |||
180 | operations that would not normally be undertaken while a real-time | 180 | operations that would not normally be undertaken while a real-time |
181 | workload is running. | 181 | workload is running. |
182 | 182 | ||
183 | In particular, if you find yourself invoking one of the expedited | ||
184 | primitives repeatedly in a loop, please do everyone a favor: | ||
185 | Restructure your code so that it batches the updates, allowing | ||
186 | a single non-expedited primitive to cover the entire batch. | ||
187 | This will very likely be faster than the loop containing the | ||
188 | expedited primitive, and will be much much easier on the rest | ||
189 | of the system, especially to real-time workloads running on | ||
190 | the rest of the system. | ||
191 | |||
192 | In addition, it is illegal to call the expedited forms from | ||
193 | a CPU-hotplug notifier, or while holding a lock that is acquired | ||
194 | by a CPU-hotplug notifier. Failing to observe this restriction | ||
195 | will result in deadlock. | ||
196 | |||
183 | 7. If the updater uses call_rcu() or synchronize_rcu(), then the | 197 | 7. If the updater uses call_rcu() or synchronize_rcu(), then the |
184 | corresponding readers must use rcu_read_lock() and | 198 | corresponding readers must use rcu_read_lock() and |
185 | rcu_read_unlock(). If the updater uses call_rcu_bh() or | 199 | rcu_read_unlock(). If the updater uses call_rcu_bh() or |
diff --git a/Documentation/RCU/stallwarn.txt b/Documentation/RCU/stallwarn.txt index 083d88cbc089..523364e4e1f1 100644 --- a/Documentation/RCU/stallwarn.txt +++ b/Documentation/RCU/stallwarn.txt | |||
@@ -12,14 +12,38 @@ CONFIG_RCU_CPU_STALL_TIMEOUT | |||
12 | This kernel configuration parameter defines the period of time | 12 | This kernel configuration parameter defines the period of time |
13 | that RCU will wait from the beginning of a grace period until it | 13 | that RCU will wait from the beginning of a grace period until it |
14 | issues an RCU CPU stall warning. This time period is normally | 14 | issues an RCU CPU stall warning. This time period is normally |
15 | ten seconds. | 15 | sixty seconds. |
16 | 16 | ||
17 | RCU_SECONDS_TILL_STALL_RECHECK | 17 | This configuration parameter may be changed at runtime via the |
18 | /sys/module/rcutree/parameters/rcu_cpu_stall_timeout, however | ||
19 | this parameter is checked only at the beginning of a cycle. | ||
20 | So if you are 30 seconds into a 70-second stall, setting this | ||
21 | sysfs parameter to (say) five will shorten the timeout for the | ||
22 | -next- stall, or the following warning for the current stall | ||
23 | (assuming the stall lasts long enough). It will not affect the | ||
24 | timing of the next warning for the current stall. | ||
18 | 25 | ||
19 | This macro defines the period of time that RCU will wait after | 26 | Stall-warning messages may be enabled and disabled completely via |
20 | issuing a stall warning until it issues another stall warning | 27 | /sys/module/rcutree/parameters/rcu_cpu_stall_suppress. |
21 | for the same stall. This time period is normally set to three | 28 | |
22 | times the check interval plus thirty seconds. | 29 | CONFIG_RCU_CPU_STALL_VERBOSE |
30 | |||
31 | This kernel configuration parameter causes the stall warning to | ||
32 | also dump the stacks of any tasks that are blocking the current | ||
33 | RCU-preempt grace period. | ||
34 | |||
35 | RCU_CPU_STALL_INFO | ||
36 | |||
37 | This kernel configuration parameter causes the stall warning to | ||
38 | print out additional per-CPU diagnostic information, including | ||
39 | information on scheduling-clock ticks and RCU's idle-CPU tracking. | ||
40 | |||
41 | RCU_STALL_DELAY_DELTA | ||
42 | |||
43 | Although the lockdep facility is extremely useful, it does add | ||
44 | some overhead. Therefore, under CONFIG_PROVE_RCU, the | ||
45 | RCU_STALL_DELAY_DELTA macro allows five extra seconds before | ||
46 | giving an RCU CPU stall warning message. | ||
23 | 47 | ||
24 | RCU_STALL_RAT_DELAY | 48 | RCU_STALL_RAT_DELAY |
25 | 49 | ||
@@ -64,6 +88,54 @@ INFO: rcu_bh_state detected stalls on CPUs/tasks: { } (detected by 4, 2502 jiffi | |||
64 | 88 | ||
65 | This is rare, but does happen from time to time in real life. | 89 | This is rare, but does happen from time to time in real life. |
66 | 90 | ||
91 | If the CONFIG_RCU_CPU_STALL_INFO kernel configuration parameter is set, | ||
92 | more information is printed with the stall-warning message, for example: | ||
93 | |||
94 | INFO: rcu_preempt detected stall on CPU | ||
95 | 0: (63959 ticks this GP) idle=241/3fffffffffffffff/0 | ||
96 | (t=65000 jiffies) | ||
97 | |||
98 | In kernels with CONFIG_RCU_FAST_NO_HZ, even more information is | ||
99 | printed: | ||
100 | |||
101 | INFO: rcu_preempt detected stall on CPU | ||
102 | 0: (64628 ticks this GP) idle=dd5/3fffffffffffffff/0 drain=0 . timer=-1 | ||
103 | (t=65000 jiffies) | ||
104 | |||
105 | The "(64628 ticks this GP)" indicates that this CPU has taken more | ||
106 | than 64,000 scheduling-clock interrupts during the current stalled | ||
107 | grace period. If the CPU was not yet aware of the current grace | ||
108 | period (for example, if it was offline), then this part of the message | ||
109 | indicates how many grace periods behind the CPU is. | ||
110 | |||
111 | The "idle=" portion of the message prints the dyntick-idle state. | ||
112 | The hex number before the first "/" is the low-order 12 bits of the | ||
113 | dynticks counter, which will have an even-numbered value if the CPU is | ||
114 | in dyntick-idle mode and an odd-numbered value otherwise. The hex | ||
115 | number between the two "/"s is the value of the nesting, which will | ||
116 | be a small positive number if in the idle loop and a very large positive | ||
117 | number (as shown above) otherwise. | ||
118 | |||
119 | For CONFIG_RCU_FAST_NO_HZ kernels, the "drain=0" indicates that the | ||
120 | CPU is not in the process of trying to force itself into dyntick-idle | ||
121 | state, the "." indicates that the CPU has not given up forcing RCU | ||
122 | into dyntick-idle mode (it would be "H" otherwise), and the "timer=-1" | ||
123 | indicates that the CPU has not recented forced RCU into dyntick-idle | ||
124 | mode (it would otherwise indicate the number of microseconds remaining | ||
125 | in this forced state). | ||
126 | |||
127 | |||
128 | Multiple Warnings From One Stall | ||
129 | |||
130 | If a stall lasts long enough, multiple stall-warning messages will be | ||
131 | printed for it. The second and subsequent messages are printed at | ||
132 | longer intervals, so that the time between (say) the first and second | ||
133 | message will be about three times the interval between the beginning | ||
134 | of the stall and the first message. | ||
135 | |||
136 | |||
137 | What Causes RCU CPU Stall Warnings? | ||
138 | |||
67 | So your kernel printed an RCU CPU stall warning. The next question is | 139 | So your kernel printed an RCU CPU stall warning. The next question is |
68 | "What caused it?" The following problems can result in RCU CPU stall | 140 | "What caused it?" The following problems can result in RCU CPU stall |
69 | warnings: | 141 | warnings: |
@@ -128,4 +200,5 @@ is occurring, which will usually be in the function nearest the top of | |||
128 | that portion of the stack which remains the same from trace to trace. | 200 | that portion of the stack which remains the same from trace to trace. |
129 | If you can reliably trigger the stall, ftrace can be quite helpful. | 201 | If you can reliably trigger the stall, ftrace can be quite helpful. |
130 | 202 | ||
131 | RCU bugs can often be debugged with the help of CONFIG_RCU_TRACE. | 203 | RCU bugs can often be debugged with the help of CONFIG_RCU_TRACE |
204 | and with RCU's event tracing. | ||
diff --git a/Documentation/RCU/torture.txt b/Documentation/RCU/torture.txt index d67068d0d2b9..375d3fb71437 100644 --- a/Documentation/RCU/torture.txt +++ b/Documentation/RCU/torture.txt | |||
@@ -69,6 +69,13 @@ onoff_interval | |||
69 | CPU-hotplug operations regardless of what value is | 69 | CPU-hotplug operations regardless of what value is |
70 | specified for onoff_interval. | 70 | specified for onoff_interval. |
71 | 71 | ||
72 | onoff_holdoff The number of seconds to wait until starting CPU-hotplug | ||
73 | operations. This would normally only be used when | ||
74 | rcutorture was built into the kernel and started | ||
75 | automatically at boot time, in which case it is useful | ||
76 | in order to avoid confusing boot-time code with CPUs | ||
77 | coming and going. | ||
78 | |||
72 | shuffle_interval | 79 | shuffle_interval |
73 | The number of seconds to keep the test threads affinitied | 80 | The number of seconds to keep the test threads affinitied |
74 | to a particular subset of the CPUs, defaults to 3 seconds. | 81 | to a particular subset of the CPUs, defaults to 3 seconds. |
@@ -79,6 +86,24 @@ shutdown_secs The number of seconds to run the test before terminating | |||
79 | zero, which disables test termination and system shutdown. | 86 | zero, which disables test termination and system shutdown. |
80 | This capability is useful for automated testing. | 87 | This capability is useful for automated testing. |
81 | 88 | ||
89 | stall_cpu The number of seconds that a CPU should be stalled while | ||
90 | within both an rcu_read_lock() and a preempt_disable(). | ||
91 | This stall happens only once per rcutorture run. | ||
92 | If you need multiple stalls, use modprobe and rmmod to | ||
93 | repeatedly run rcutorture. The default for stall_cpu | ||
94 | is zero, which prevents rcutorture from stalling a CPU. | ||
95 | |||
96 | Note that attempts to rmmod rcutorture while the stall | ||
97 | is ongoing will hang, so be careful what value you | ||
98 | choose for this module parameter! In addition, too-large | ||
99 | values for stall_cpu might well induce failures and | ||
100 | warnings in other parts of the kernel. You have been | ||
101 | warned! | ||
102 | |||
103 | stall_cpu_holdoff | ||
104 | The number of seconds to wait after rcutorture starts | ||
105 | before stalling a CPU. Defaults to 10 seconds. | ||
106 | |||
82 | stat_interval The number of seconds between output of torture | 107 | stat_interval The number of seconds between output of torture |
83 | statistics (via printk()). Regardless of the interval, | 108 | statistics (via printk()). Regardless of the interval, |
84 | statistics are printed when the module is unloaded. | 109 | statistics are printed when the module is unloaded. |
@@ -271,11 +296,13 @@ The following script may be used to torture RCU: | |||
271 | #!/bin/sh | 296 | #!/bin/sh |
272 | 297 | ||
273 | modprobe rcutorture | 298 | modprobe rcutorture |
274 | sleep 100 | 299 | sleep 3600 |
275 | rmmod rcutorture | 300 | rmmod rcutorture |
276 | dmesg | grep torture: | 301 | dmesg | grep torture: |
277 | 302 | ||
278 | The output can be manually inspected for the error flag of "!!!". | 303 | The output can be manually inspected for the error flag of "!!!". |
279 | One could of course create a more elaborate script that automatically | 304 | One could of course create a more elaborate script that automatically |
280 | checked for such errors. The "rmmod" command forces a "SUCCESS" or | 305 | checked for such errors. The "rmmod" command forces a "SUCCESS", |
281 | "FAILURE" indication to be printk()ed. | 306 | "FAILURE", or "RCU_HOTPLUG" indication to be printk()ed. The first |
307 | two are self-explanatory, while the last indicates that while there | ||
308 | were no RCU failures, CPU-hotplug problems were detected. | ||
diff --git a/Documentation/RCU/trace.txt b/Documentation/RCU/trace.txt index 49587abfc2f7..f6f15ce39903 100644 --- a/Documentation/RCU/trace.txt +++ b/Documentation/RCU/trace.txt | |||
@@ -33,23 +33,23 @@ rcu/rcuboost: | |||
33 | The output of "cat rcu/rcudata" looks as follows: | 33 | The output of "cat rcu/rcudata" looks as follows: |
34 | 34 | ||
35 | rcu_sched: | 35 | rcu_sched: |
36 | 0 c=20972 g=20973 pq=1 pgp=20973 qp=0 dt=545/1/0 df=50 of=0 ri=0 ql=163 qs=NRW. kt=0/W/0 ktl=ebc3 b=10 ci=153737 co=0 ca=0 | 36 | 0 c=20972 g=20973 pq=1 pgp=20973 qp=0 dt=545/1/0 df=50 of=0 ql=163 qs=NRW. kt=0/W/0 ktl=ebc3 b=10 ci=153737 co=0 ca=0 |
37 | 1 c=20972 g=20973 pq=1 pgp=20973 qp=0 dt=967/1/0 df=58 of=0 ri=0 ql=634 qs=NRW. kt=0/W/1 ktl=58c b=10 ci=191037 co=0 ca=0 | 37 | 1 c=20972 g=20973 pq=1 pgp=20973 qp=0 dt=967/1/0 df=58 of=0 ql=634 qs=NRW. kt=0/W/1 ktl=58c b=10 ci=191037 co=0 ca=0 |
38 | 2 c=20972 g=20973 pq=1 pgp=20973 qp=0 dt=1081/1/0 df=175 of=0 ri=0 ql=74 qs=N.W. kt=0/W/2 ktl=da94 b=10 ci=75991 co=0 ca=0 | 38 | 2 c=20972 g=20973 pq=1 pgp=20973 qp=0 dt=1081/1/0 df=175 of=0 ql=74 qs=N.W. kt=0/W/2 ktl=da94 b=10 ci=75991 co=0 ca=0 |
39 | 3 c=20942 g=20943 pq=1 pgp=20942 qp=1 dt=1846/0/0 df=404 of=0 ri=0 ql=0 qs=.... kt=0/W/3 ktl=d1cd b=10 ci=72261 co=0 ca=0 | 39 | 3 c=20942 g=20943 pq=1 pgp=20942 qp=1 dt=1846/0/0 df=404 of=0 ql=0 qs=.... kt=0/W/3 ktl=d1cd b=10 ci=72261 co=0 ca=0 |
40 | 4 c=20972 g=20973 pq=1 pgp=20973 qp=0 dt=369/1/0 df=83 of=0 ri=0 ql=48 qs=N.W. kt=0/W/4 ktl=e0e7 b=10 ci=128365 co=0 ca=0 | 40 | 4 c=20972 g=20973 pq=1 pgp=20973 qp=0 dt=369/1/0 df=83 of=0 ql=48 qs=N.W. kt=0/W/4 ktl=e0e7 b=10 ci=128365 co=0 ca=0 |
41 | 5 c=20972 g=20973 pq=1 pgp=20973 qp=0 dt=381/1/0 df=64 of=0 ri=0 ql=169 qs=NRW. kt=0/W/5 ktl=fb2f b=10 ci=164360 co=0 ca=0 | 41 | 5 c=20972 g=20973 pq=1 pgp=20973 qp=0 dt=381/1/0 df=64 of=0 ql=169 qs=NRW. kt=0/W/5 ktl=fb2f b=10 ci=164360 co=0 ca=0 |
42 | 6 c=20972 g=20973 pq=1 pgp=20973 qp=0 dt=1037/1/0 df=183 of=0 ri=0 ql=62 qs=N.W. kt=0/W/6 ktl=d2ad b=10 ci=65663 co=0 ca=0 | 42 | 6 c=20972 g=20973 pq=1 pgp=20973 qp=0 dt=1037/1/0 df=183 of=0 ql=62 qs=N.W. kt=0/W/6 ktl=d2ad b=10 ci=65663 co=0 ca=0 |
43 | 7 c=20897 g=20897 pq=1 pgp=20896 qp=0 dt=1572/0/0 df=382 of=0 ri=0 ql=0 qs=.... kt=0/W/7 ktl=cf15 b=10 ci=75006 co=0 ca=0 | 43 | 7 c=20897 g=20897 pq=1 pgp=20896 qp=0 dt=1572/0/0 df=382 of=0 ql=0 qs=.... kt=0/W/7 ktl=cf15 b=10 ci=75006 co=0 ca=0 |
44 | rcu_bh: | 44 | rcu_bh: |
45 | 0 c=1480 g=1480 pq=1 pgp=1480 qp=0 dt=545/1/0 df=6 of=0 ri=1 ql=0 qs=.... kt=0/W/0 ktl=ebc3 b=10 ci=0 co=0 ca=0 | 45 | 0 c=1480 g=1480 pq=1 pgp=1480 qp=0 dt=545/1/0 df=6 of=0 ql=0 qs=.... kt=0/W/0 ktl=ebc3 b=10 ci=0 co=0 ca=0 |
46 | 1 c=1480 g=1480 pq=1 pgp=1480 qp=0 dt=967/1/0 df=3 of=0 ri=1 ql=0 qs=.... kt=0/W/1 ktl=58c b=10 ci=151 co=0 ca=0 | 46 | 1 c=1480 g=1480 pq=1 pgp=1480 qp=0 dt=967/1/0 df=3 of=0 ql=0 qs=.... kt=0/W/1 ktl=58c b=10 ci=151 co=0 ca=0 |
47 | 2 c=1480 g=1480 pq=1 pgp=1480 qp=0 dt=1081/1/0 df=6 of=0 ri=1 ql=0 qs=.... kt=0/W/2 ktl=da94 b=10 ci=0 co=0 ca=0 | 47 | 2 c=1480 g=1480 pq=1 pgp=1480 qp=0 dt=1081/1/0 df=6 of=0 ql=0 qs=.... kt=0/W/2 ktl=da94 b=10 ci=0 co=0 ca=0 |
48 | 3 c=1480 g=1480 pq=1 pgp=1480 qp=0 dt=1846/0/0 df=8 of=0 ri=1 ql=0 qs=.... kt=0/W/3 ktl=d1cd b=10 ci=0 co=0 ca=0 | 48 | 3 c=1480 g=1480 pq=1 pgp=1480 qp=0 dt=1846/0/0 df=8 of=0 ql=0 qs=.... kt=0/W/3 ktl=d1cd b=10 ci=0 co=0 ca=0 |
49 | 4 c=1480 g=1480 pq=1 pgp=1480 qp=0 dt=369/1/0 df=6 of=0 ri=1 ql=0 qs=.... kt=0/W/4 ktl=e0e7 b=10 ci=0 co=0 ca=0 | 49 | 4 c=1480 g=1480 pq=1 pgp=1480 qp=0 dt=369/1/0 df=6 of=0 ql=0 qs=.... kt=0/W/4 ktl=e0e7 b=10 ci=0 co=0 ca=0 |
50 | 5 c=1480 g=1480 pq=1 pgp=1480 qp=0 dt=381/1/0 df=4 of=0 ri=1 ql=0 qs=.... kt=0/W/5 ktl=fb2f b=10 ci=0 co=0 ca=0 | 50 | 5 c=1480 g=1480 pq=1 pgp=1480 qp=0 dt=381/1/0 df=4 of=0 ql=0 qs=.... kt=0/W/5 ktl=fb2f b=10 ci=0 co=0 ca=0 |
51 | 6 c=1480 g=1480 pq=1 pgp=1480 qp=0 dt=1037/1/0 df=6 of=0 ri=1 ql=0 qs=.... kt=0/W/6 ktl=d2ad b=10 ci=0 co=0 ca=0 | 51 | 6 c=1480 g=1480 pq=1 pgp=1480 qp=0 dt=1037/1/0 df=6 of=0 ql=0 qs=.... kt=0/W/6 ktl=d2ad b=10 ci=0 co=0 ca=0 |
52 | 7 c=1474 g=1474 pq=1 pgp=1473 qp=0 dt=1572/0/0 df=8 of=0 ri=1 ql=0 qs=.... kt=0/W/7 ktl=cf15 b=10 ci=0 co=0 ca=0 | 52 | 7 c=1474 g=1474 pq=1 pgp=1473 qp=0 dt=1572/0/0 df=8 of=0 ql=0 qs=.... kt=0/W/7 ktl=cf15 b=10 ci=0 co=0 ca=0 |
53 | 53 | ||
54 | The first section lists the rcu_data structures for rcu_sched, the second | 54 | The first section lists the rcu_data structures for rcu_sched, the second |
55 | for rcu_bh. Note that CONFIG_TREE_PREEMPT_RCU kernels will have an | 55 | for rcu_bh. Note that CONFIG_TREE_PREEMPT_RCU kernels will have an |
@@ -119,10 +119,6 @@ o "of" is the number of times that some other CPU has forced a | |||
119 | CPU is offline when it is really alive and kicking) is a fatal | 119 | CPU is offline when it is really alive and kicking) is a fatal |
120 | error, so it makes sense to err conservatively. | 120 | error, so it makes sense to err conservatively. |
121 | 121 | ||
122 | o "ri" is the number of times that RCU has seen fit to send a | ||
123 | reschedule IPI to this CPU in order to get it to report a | ||
124 | quiescent state. | ||
125 | |||
126 | o "ql" is the number of RCU callbacks currently residing on | 122 | o "ql" is the number of RCU callbacks currently residing on |
127 | this CPU. This is the total number of callbacks, regardless | 123 | this CPU. This is the total number of callbacks, regardless |
128 | of what state they are in (new, waiting for grace period to | 124 | of what state they are in (new, waiting for grace period to |
diff --git a/Documentation/acpi/apei/einj.txt b/Documentation/acpi/apei/einj.txt index e7cc36397217..e20b6daaced4 100644 --- a/Documentation/acpi/apei/einj.txt +++ b/Documentation/acpi/apei/einj.txt | |||
@@ -53,6 +53,14 @@ directory apei/einj. The following files are provided. | |||
53 | This file is used to set the second error parameter value. Effect of | 53 | This file is used to set the second error parameter value. Effect of |
54 | parameter depends on error_type specified. | 54 | parameter depends on error_type specified. |
55 | 55 | ||
56 | - notrigger | ||
57 | The EINJ mechanism is a two step process. First inject the error, then | ||
58 | perform some actions to trigger it. Setting "notrigger" to 1 skips the | ||
59 | trigger phase, which *may* allow the user to cause the error in some other | ||
60 | context by a simple access to the cpu, memory location, or device that is | ||
61 | the target of the error injection. Whether this actually works depends | ||
62 | on what operations the BIOS actually includes in the trigger phase. | ||
63 | |||
56 | BIOS versions based in the ACPI 4.0 specification have limited options | 64 | BIOS versions based in the ACPI 4.0 specification have limited options |
57 | to control where the errors are injected. Your BIOS may support an | 65 | to control where the errors are injected. Your BIOS may support an |
58 | extension (enabled with the param_extension=1 module parameter, or | 66 | extension (enabled with the param_extension=1 module parameter, or |
diff --git a/Documentation/aoe/aoe.txt b/Documentation/aoe/aoe.txt index b5aada9f20cc..5f5aa16047ff 100644 --- a/Documentation/aoe/aoe.txt +++ b/Documentation/aoe/aoe.txt | |||
@@ -35,7 +35,7 @@ CREATING DEVICE NODES | |||
35 | sh Documentation/aoe/mkshelf.sh /dev/etherd 0 | 35 | sh Documentation/aoe/mkshelf.sh /dev/etherd 0 |
36 | 36 | ||
37 | There is also an autoload script that shows how to edit | 37 | There is also an autoload script that shows how to edit |
38 | /etc/modprobe.conf to ensure that the aoe module is loaded when | 38 | /etc/modprobe.d/aoe.conf to ensure that the aoe module is loaded when |
39 | necessary. | 39 | necessary. |
40 | 40 | ||
41 | USING DEVICE NODES | 41 | USING DEVICE NODES |
diff --git a/Documentation/aoe/autoload.sh b/Documentation/aoe/autoload.sh index 78dad1334c6f..815dff4691c9 100644 --- a/Documentation/aoe/autoload.sh +++ b/Documentation/aoe/autoload.sh | |||
@@ -1,8 +1,8 @@ | |||
1 | #!/bin/sh | 1 | #!/bin/sh |
2 | # set aoe to autoload by installing the | 2 | # set aoe to autoload by installing the |
3 | # aliases in /etc/modprobe.conf | 3 | # aliases in /etc/modprobe.d/ |
4 | 4 | ||
5 | f=/etc/modprobe.conf | 5 | f=/etc/modprobe.d/aoe.conf |
6 | 6 | ||
7 | if test ! -r $f || test ! -w $f; then | 7 | if test ! -r $f || test ! -w $f; then |
8 | echo "cannot configure $f for module autoloading" 1>&2 | 8 | echo "cannot configure $f for module autoloading" 1>&2 |
diff --git a/Documentation/backlight/lp855x-driver.txt b/Documentation/backlight/lp855x-driver.txt new file mode 100644 index 000000000000..f5e4caafab7d --- /dev/null +++ b/Documentation/backlight/lp855x-driver.txt | |||
@@ -0,0 +1,78 @@ | |||
1 | Kernel driver lp855x | ||
2 | ==================== | ||
3 | |||
4 | Backlight driver for LP855x ICs | ||
5 | |||
6 | Supported chips: | ||
7 | Texas Instruments LP8550, LP8551, LP8552, LP8553 and LP8556 | ||
8 | |||
9 | Author: Milo(Woogyom) Kim <milo.kim@ti.com> | ||
10 | |||
11 | Description | ||
12 | ----------- | ||
13 | |||
14 | * Brightness control | ||
15 | |||
16 | Brightness can be controlled by the pwm input or the i2c command. | ||
17 | The lp855x driver supports both cases. | ||
18 | |||
19 | * Device attributes | ||
20 | |||
21 | 1) bl_ctl_mode | ||
22 | Backlight control mode. | ||
23 | Value : pwm based or register based | ||
24 | |||
25 | 2) chip_id | ||
26 | The lp855x chip id. | ||
27 | Value : lp8550/lp8551/lp8552/lp8553/lp8556 | ||
28 | |||
29 | Platform data for lp855x | ||
30 | ------------------------ | ||
31 | |||
32 | For supporting platform specific data, the lp855x platform data can be used. | ||
33 | |||
34 | * name : Backlight driver name. If it is not defined, default name is set. | ||
35 | * mode : Brightness control mode. PWM or register based. | ||
36 | * device_control : Value of DEVICE CONTROL register. | ||
37 | * initial_brightness : Initial value of backlight brightness. | ||
38 | * pwm_data : Platform specific pwm generation functions. | ||
39 | Only valid when brightness is pwm input mode. | ||
40 | Functions should be implemented by PWM driver. | ||
41 | - pwm_set_intensity() : set duty of PWM | ||
42 | - pwm_get_intensity() : get current duty of PWM | ||
43 | * load_new_rom_data : | ||
44 | 0 : use default configuration data | ||
45 | 1 : update values of eeprom or eprom registers on loading driver | ||
46 | * size_program : Total size of lp855x_rom_data. | ||
47 | * rom_data : List of new eeprom/eprom registers. | ||
48 | |||
49 | example 1) lp8552 platform data : i2c register mode with new eeprom data | ||
50 | |||
51 | #define EEPROM_A5_ADDR 0xA5 | ||
52 | #define EEPROM_A5_VAL 0x4f /* EN_VSYNC=0 */ | ||
53 | |||
54 | static struct lp855x_rom_data lp8552_eeprom_arr[] = { | ||
55 | {EEPROM_A5_ADDR, EEPROM_A5_VAL}, | ||
56 | }; | ||
57 | |||
58 | static struct lp855x_platform_data lp8552_pdata = { | ||
59 | .name = "lcd-bl", | ||
60 | .mode = REGISTER_BASED, | ||
61 | .device_control = I2C_CONFIG(LP8552), | ||
62 | .initial_brightness = INITIAL_BRT, | ||
63 | .load_new_rom_data = 1, | ||
64 | .size_program = ARRAY_SIZE(lp8552_eeprom_arr), | ||
65 | .rom_data = lp8552_eeprom_arr, | ||
66 | }; | ||
67 | |||
68 | example 2) lp8556 platform data : pwm input mode with default rom data | ||
69 | |||
70 | static struct lp855x_platform_data lp8556_pdata = { | ||
71 | .mode = PWM_BASED, | ||
72 | .device_control = PWM_CONFIG(LP8556), | ||
73 | .initial_brightness = INITIAL_BRT, | ||
74 | .pwm_data = { | ||
75 | .pwm_set_intensity = platform_pwm_set_intensity, | ||
76 | .pwm_get_intensity = platform_pwm_get_intensity, | ||
77 | }, | ||
78 | }; | ||
diff --git a/Documentation/blockdev/floppy.txt b/Documentation/blockdev/floppy.txt index 6ccab88705cb..470fe4b5e379 100644 --- a/Documentation/blockdev/floppy.txt +++ b/Documentation/blockdev/floppy.txt | |||
@@ -49,7 +49,7 @@ you can put: | |||
49 | 49 | ||
50 | options floppy omnibook messages | 50 | options floppy omnibook messages |
51 | 51 | ||
52 | in /etc/modprobe.conf. | 52 | in a configuration file in /etc/modprobe.d/. |
53 | 53 | ||
54 | 54 | ||
55 | The floppy driver related options are: | 55 | The floppy driver related options are: |
diff --git a/Documentation/cgroups/cgroups.txt b/Documentation/cgroups/cgroups.txt index a7c96ae5557c..8e74980ab385 100644 --- a/Documentation/cgroups/cgroups.txt +++ b/Documentation/cgroups/cgroups.txt | |||
@@ -558,8 +558,7 @@ Each subsystem may export the following methods. The only mandatory | |||
558 | methods are create/destroy. Any others that are null are presumed to | 558 | methods are create/destroy. Any others that are null are presumed to |
559 | be successful no-ops. | 559 | be successful no-ops. |
560 | 560 | ||
561 | struct cgroup_subsys_state *create(struct cgroup_subsys *ss, | 561 | struct cgroup_subsys_state *create(struct cgroup *cgrp) |
562 | struct cgroup *cgrp) | ||
563 | (cgroup_mutex held by caller) | 562 | (cgroup_mutex held by caller) |
564 | 563 | ||
565 | Called to create a subsystem state object for a cgroup. The | 564 | Called to create a subsystem state object for a cgroup. The |
@@ -574,7 +573,7 @@ identified by the passed cgroup object having a NULL parent (since | |||
574 | it's the root of the hierarchy) and may be an appropriate place for | 573 | it's the root of the hierarchy) and may be an appropriate place for |
575 | initialization code. | 574 | initialization code. |
576 | 575 | ||
577 | void destroy(struct cgroup_subsys *ss, struct cgroup *cgrp) | 576 | void destroy(struct cgroup *cgrp) |
578 | (cgroup_mutex held by caller) | 577 | (cgroup_mutex held by caller) |
579 | 578 | ||
580 | The cgroup system is about to destroy the passed cgroup; the subsystem | 579 | The cgroup system is about to destroy the passed cgroup; the subsystem |
@@ -585,7 +584,7 @@ cgroup->parent is still valid. (Note - can also be called for a | |||
585 | newly-created cgroup if an error occurs after this subsystem's | 584 | newly-created cgroup if an error occurs after this subsystem's |
586 | create() method has been called for the new cgroup). | 585 | create() method has been called for the new cgroup). |
587 | 586 | ||
588 | int pre_destroy(struct cgroup_subsys *ss, struct cgroup *cgrp); | 587 | int pre_destroy(struct cgroup *cgrp); |
589 | 588 | ||
590 | Called before checking the reference count on each subsystem. This may | 589 | Called before checking the reference count on each subsystem. This may |
591 | be useful for subsystems which have some extra references even if | 590 | be useful for subsystems which have some extra references even if |
@@ -593,8 +592,7 @@ there are not tasks in the cgroup. If pre_destroy() returns error code, | |||
593 | rmdir() will fail with it. From this behavior, pre_destroy() can be | 592 | rmdir() will fail with it. From this behavior, pre_destroy() can be |
594 | called multiple times against a cgroup. | 593 | called multiple times against a cgroup. |
595 | 594 | ||
596 | int can_attach(struct cgroup_subsys *ss, struct cgroup *cgrp, | 595 | int can_attach(struct cgroup *cgrp, struct cgroup_taskset *tset) |
597 | struct cgroup_taskset *tset) | ||
598 | (cgroup_mutex held by caller) | 596 | (cgroup_mutex held by caller) |
599 | 597 | ||
600 | Called prior to moving one or more tasks into a cgroup; if the | 598 | Called prior to moving one or more tasks into a cgroup; if the |
@@ -615,8 +613,7 @@ fork. If this method returns 0 (success) then this should remain valid | |||
615 | while the caller holds cgroup_mutex and it is ensured that either | 613 | while the caller holds cgroup_mutex and it is ensured that either |
616 | attach() or cancel_attach() will be called in future. | 614 | attach() or cancel_attach() will be called in future. |
617 | 615 | ||
618 | void cancel_attach(struct cgroup_subsys *ss, struct cgroup *cgrp, | 616 | void cancel_attach(struct cgroup *cgrp, struct cgroup_taskset *tset) |
619 | struct cgroup_taskset *tset) | ||
620 | (cgroup_mutex held by caller) | 617 | (cgroup_mutex held by caller) |
621 | 618 | ||
622 | Called when a task attach operation has failed after can_attach() has succeeded. | 619 | Called when a task attach operation has failed after can_attach() has succeeded. |
@@ -625,23 +622,22 @@ function, so that the subsystem can implement a rollback. If not, not necessary. | |||
625 | This will be called only about subsystems whose can_attach() operation have | 622 | This will be called only about subsystems whose can_attach() operation have |
626 | succeeded. The parameters are identical to can_attach(). | 623 | succeeded. The parameters are identical to can_attach(). |
627 | 624 | ||
628 | void attach(struct cgroup_subsys *ss, struct cgroup *cgrp, | 625 | void attach(struct cgroup *cgrp, struct cgroup_taskset *tset) |
629 | struct cgroup_taskset *tset) | ||
630 | (cgroup_mutex held by caller) | 626 | (cgroup_mutex held by caller) |
631 | 627 | ||
632 | Called after the task has been attached to the cgroup, to allow any | 628 | Called after the task has been attached to the cgroup, to allow any |
633 | post-attachment activity that requires memory allocations or blocking. | 629 | post-attachment activity that requires memory allocations or blocking. |
634 | The parameters are identical to can_attach(). | 630 | The parameters are identical to can_attach(). |
635 | 631 | ||
636 | void fork(struct cgroup_subsy *ss, struct task_struct *task) | 632 | void fork(struct task_struct *task) |
637 | 633 | ||
638 | Called when a task is forked into a cgroup. | 634 | Called when a task is forked into a cgroup. |
639 | 635 | ||
640 | void exit(struct cgroup_subsys *ss, struct task_struct *task) | 636 | void exit(struct task_struct *task) |
641 | 637 | ||
642 | Called during task exit. | 638 | Called during task exit. |
643 | 639 | ||
644 | int populate(struct cgroup_subsys *ss, struct cgroup *cgrp) | 640 | int populate(struct cgroup *cgrp) |
645 | (cgroup_mutex held by caller) | 641 | (cgroup_mutex held by caller) |
646 | 642 | ||
647 | Called after creation of a cgroup to allow a subsystem to populate | 643 | Called after creation of a cgroup to allow a subsystem to populate |
@@ -651,7 +647,7 @@ include/linux/cgroup.h for details). Note that although this | |||
651 | method can return an error code, the error code is currently not | 647 | method can return an error code, the error code is currently not |
652 | always handled well. | 648 | always handled well. |
653 | 649 | ||
654 | void post_clone(struct cgroup_subsys *ss, struct cgroup *cgrp) | 650 | void post_clone(struct cgroup *cgrp) |
655 | (cgroup_mutex held by caller) | 651 | (cgroup_mutex held by caller) |
656 | 652 | ||
657 | Called during cgroup_create() to do any parameter | 653 | Called during cgroup_create() to do any parameter |
@@ -659,7 +655,7 @@ initialization which might be required before a task could attach. For | |||
659 | example in cpusets, no task may attach before 'cpus' and 'mems' are set | 655 | example in cpusets, no task may attach before 'cpus' and 'mems' are set |
660 | up. | 656 | up. |
661 | 657 | ||
662 | void bind(struct cgroup_subsys *ss, struct cgroup *root) | 658 | void bind(struct cgroup *root) |
663 | (cgroup_mutex and ss->hierarchy_mutex held by caller) | 659 | (cgroup_mutex and ss->hierarchy_mutex held by caller) |
664 | 660 | ||
665 | Called when a cgroup subsystem is rebound to a different hierarchy | 661 | Called when a cgroup subsystem is rebound to a different hierarchy |
diff --git a/Documentation/cgroups/cpusets.txt b/Documentation/cgroups/cpusets.txt index 5c51ed406d1d..cefd3d8bbd11 100644 --- a/Documentation/cgroups/cpusets.txt +++ b/Documentation/cgroups/cpusets.txt | |||
@@ -217,7 +217,7 @@ and name space for cpusets, with a minimum of additional kernel code. | |||
217 | 217 | ||
218 | The cpus and mems files in the root (top_cpuset) cpuset are | 218 | The cpus and mems files in the root (top_cpuset) cpuset are |
219 | read-only. The cpus file automatically tracks the value of | 219 | read-only. The cpus file automatically tracks the value of |
220 | cpu_online_map using a CPU hotplug notifier, and the mems file | 220 | cpu_online_mask using a CPU hotplug notifier, and the mems file |
221 | automatically tracks the value of node_states[N_HIGH_MEMORY]--i.e., | 221 | automatically tracks the value of node_states[N_HIGH_MEMORY]--i.e., |
222 | nodes with memory--using the cpuset_track_online_nodes() hook. | 222 | nodes with memory--using the cpuset_track_online_nodes() hook. |
223 | 223 | ||
diff --git a/Documentation/clk.txt b/Documentation/clk.txt new file mode 100644 index 000000000000..1943fae014fd --- /dev/null +++ b/Documentation/clk.txt | |||
@@ -0,0 +1,233 @@ | |||
1 | The Common Clk Framework | ||
2 | Mike Turquette <mturquette@ti.com> | ||
3 | |||
4 | This document endeavours to explain the common clk framework details, | ||
5 | and how to port a platform over to this framework. It is not yet a | ||
6 | detailed explanation of the clock api in include/linux/clk.h, but | ||
7 | perhaps someday it will include that information. | ||
8 | |||
9 | Part 1 - introduction and interface split | ||
10 | |||
11 | The common clk framework is an interface to control the clock nodes | ||
12 | available on various devices today. This may come in the form of clock | ||
13 | gating, rate adjustment, muxing or other operations. This framework is | ||
14 | enabled with the CONFIG_COMMON_CLK option. | ||
15 | |||
16 | The interface itself is divided into two halves, each shielded from the | ||
17 | details of its counterpart. First is the common definition of struct | ||
18 | clk which unifies the framework-level accounting and infrastructure that | ||
19 | has traditionally been duplicated across a variety of platforms. Second | ||
20 | is a common implementation of the clk.h api, defined in | ||
21 | drivers/clk/clk.c. Finally there is struct clk_ops, whose operations | ||
22 | are invoked by the clk api implementation. | ||
23 | |||
24 | The second half of the interface is comprised of the hardware-specific | ||
25 | callbacks registered with struct clk_ops and the corresponding | ||
26 | hardware-specific structures needed to model a particular clock. For | ||
27 | the remainder of this document any reference to a callback in struct | ||
28 | clk_ops, such as .enable or .set_rate, implies the hardware-specific | ||
29 | implementation of that code. Likewise, references to struct clk_foo | ||
30 | serve as a convenient shorthand for the implementation of the | ||
31 | hardware-specific bits for the hypothetical "foo" hardware. | ||
32 | |||
33 | Tying the two halves of this interface together is struct clk_hw, which | ||
34 | is defined in struct clk_foo and pointed to within struct clk. This | ||
35 | allows easy for navigation between the two discrete halves of the common | ||
36 | clock interface. | ||
37 | |||
38 | Part 2 - common data structures and api | ||
39 | |||
40 | Below is the common struct clk definition from | ||
41 | include/linux/clk-private.h, modified for brevity: | ||
42 | |||
43 | struct clk { | ||
44 | const char *name; | ||
45 | const struct clk_ops *ops; | ||
46 | struct clk_hw *hw; | ||
47 | char **parent_names; | ||
48 | struct clk **parents; | ||
49 | struct clk *parent; | ||
50 | struct hlist_head children; | ||
51 | struct hlist_node child_node; | ||
52 | ... | ||
53 | }; | ||
54 | |||
55 | The members above make up the core of the clk tree topology. The clk | ||
56 | api itself defines several driver-facing functions which operate on | ||
57 | struct clk. That api is documented in include/linux/clk.h. | ||
58 | |||
59 | Platforms and devices utilizing the common struct clk use the struct | ||
60 | clk_ops pointer in struct clk to perform the hardware-specific parts of | ||
61 | the operations defined in clk.h: | ||
62 | |||
63 | struct clk_ops { | ||
64 | int (*prepare)(struct clk_hw *hw); | ||
65 | void (*unprepare)(struct clk_hw *hw); | ||
66 | int (*enable)(struct clk_hw *hw); | ||
67 | void (*disable)(struct clk_hw *hw); | ||
68 | int (*is_enabled)(struct clk_hw *hw); | ||
69 | unsigned long (*recalc_rate)(struct clk_hw *hw, | ||
70 | unsigned long parent_rate); | ||
71 | long (*round_rate)(struct clk_hw *hw, unsigned long, | ||
72 | unsigned long *); | ||
73 | int (*set_parent)(struct clk_hw *hw, u8 index); | ||
74 | u8 (*get_parent)(struct clk_hw *hw); | ||
75 | int (*set_rate)(struct clk_hw *hw, unsigned long); | ||
76 | void (*init)(struct clk_hw *hw); | ||
77 | }; | ||
78 | |||
79 | Part 3 - hardware clk implementations | ||
80 | |||
81 | The strength of the common struct clk comes from its .ops and .hw pointers | ||
82 | which abstract the details of struct clk from the hardware-specific bits, and | ||
83 | vice versa. To illustrate consider the simple gateable clk implementation in | ||
84 | drivers/clk/clk-gate.c: | ||
85 | |||
86 | struct clk_gate { | ||
87 | struct clk_hw hw; | ||
88 | void __iomem *reg; | ||
89 | u8 bit_idx; | ||
90 | ... | ||
91 | }; | ||
92 | |||
93 | struct clk_gate contains struct clk_hw hw as well as hardware-specific | ||
94 | knowledge about which register and bit controls this clk's gating. | ||
95 | Nothing about clock topology or accounting, such as enable_count or | ||
96 | notifier_count, is needed here. That is all handled by the common | ||
97 | framework code and struct clk. | ||
98 | |||
99 | Let's walk through enabling this clk from driver code: | ||
100 | |||
101 | struct clk *clk; | ||
102 | clk = clk_get(NULL, "my_gateable_clk"); | ||
103 | |||
104 | clk_prepare(clk); | ||
105 | clk_enable(clk); | ||
106 | |||
107 | The call graph for clk_enable is very simple: | ||
108 | |||
109 | clk_enable(clk); | ||
110 | clk->ops->enable(clk->hw); | ||
111 | [resolves to...] | ||
112 | clk_gate_enable(hw); | ||
113 | [resolves struct clk gate with to_clk_gate(hw)] | ||
114 | clk_gate_set_bit(gate); | ||
115 | |||
116 | And the definition of clk_gate_set_bit: | ||
117 | |||
118 | static void clk_gate_set_bit(struct clk_gate *gate) | ||
119 | { | ||
120 | u32 reg; | ||
121 | |||
122 | reg = __raw_readl(gate->reg); | ||
123 | reg |= BIT(gate->bit_idx); | ||
124 | writel(reg, gate->reg); | ||
125 | } | ||
126 | |||
127 | Note that to_clk_gate is defined as: | ||
128 | |||
129 | #define to_clk_gate(_hw) container_of(_hw, struct clk_gate, clk) | ||
130 | |||
131 | This pattern of abstraction is used for every clock hardware | ||
132 | representation. | ||
133 | |||
134 | Part 4 - supporting your own clk hardware | ||
135 | |||
136 | When implementing support for a new type of clock it only necessary to | ||
137 | include the following header: | ||
138 | |||
139 | #include <linux/clk-provider.h> | ||
140 | |||
141 | include/linux/clk.h is included within that header and clk-private.h | ||
142 | must never be included from the code which implements the operations for | ||
143 | a clock. More on that below in Part 5. | ||
144 | |||
145 | To construct a clk hardware structure for your platform you must define | ||
146 | the following: | ||
147 | |||
148 | struct clk_foo { | ||
149 | struct clk_hw hw; | ||
150 | ... hardware specific data goes here ... | ||
151 | }; | ||
152 | |||
153 | To take advantage of your data you'll need to support valid operations | ||
154 | for your clk: | ||
155 | |||
156 | struct clk_ops clk_foo_ops { | ||
157 | .enable = &clk_foo_enable; | ||
158 | .disable = &clk_foo_disable; | ||
159 | }; | ||
160 | |||
161 | Implement the above functions using container_of: | ||
162 | |||
163 | #define to_clk_foo(_hw) container_of(_hw, struct clk_foo, hw) | ||
164 | |||
165 | int clk_foo_enable(struct clk_hw *hw) | ||
166 | { | ||
167 | struct clk_foo *foo; | ||
168 | |||
169 | foo = to_clk_foo(hw); | ||
170 | |||
171 | ... perform magic on foo ... | ||
172 | |||
173 | return 0; | ||
174 | }; | ||
175 | |||
176 | Below is a matrix detailing which clk_ops are mandatory based upon the | ||
177 | hardware capbilities of that clock. A cell marked as "y" means | ||
178 | mandatory, a cell marked as "n" implies that either including that | ||
179 | callback is invalid or otherwise uneccesary. Empty cells are either | ||
180 | optional or must be evaluated on a case-by-case basis. | ||
181 | |||
182 | clock hardware characteristics | ||
183 | ----------------------------------------------------------- | ||
184 | | gate | change rate | single parent | multiplexer | root | | ||
185 | |------|-------------|---------------|-------------|------| | ||
186 | .prepare | | | | | | | ||
187 | .unprepare | | | | | | | ||
188 | | | | | | | | ||
189 | .enable | y | | | | | | ||
190 | .disable | y | | | | | | ||
191 | .is_enabled | y | | | | | | ||
192 | | | | | | | | ||
193 | .recalc_rate | | y | | | | | ||
194 | .round_rate | | y | | | | | ||
195 | .set_rate | | y | | | | | ||
196 | | | | | | | | ||
197 | .set_parent | | | n | y | n | | ||
198 | .get_parent | | | n | y | n | | ||
199 | | | | | | | | ||
200 | .init | | | | | | | ||
201 | ----------------------------------------------------------- | ||
202 | |||
203 | Finally, register your clock at run-time with a hardware-specific | ||
204 | registration function. This function simply populates struct clk_foo's | ||
205 | data and then passes the common struct clk parameters to the framework | ||
206 | with a call to: | ||
207 | |||
208 | clk_register(...) | ||
209 | |||
210 | See the basic clock types in drivers/clk/clk-*.c for examples. | ||
211 | |||
212 | Part 5 - static initialization of clock data | ||
213 | |||
214 | For platforms with many clocks (often numbering into the hundreds) it | ||
215 | may be desirable to statically initialize some clock data. This | ||
216 | presents a problem since the definition of struct clk should be hidden | ||
217 | from everyone except for the clock core in drivers/clk/clk.c. | ||
218 | |||
219 | To get around this problem struct clk's definition is exposed in | ||
220 | include/linux/clk-private.h along with some macros for more easily | ||
221 | initializing instances of the basic clock types. These clocks must | ||
222 | still be initialized with the common clock framework via a call to | ||
223 | __clk_init. | ||
224 | |||
225 | clk-private.h must NEVER be included by code which implements struct | ||
226 | clk_ops callbacks, nor must it be included by any logic which pokes | ||
227 | around inside of struct clk at run-time. To do so is a layering | ||
228 | violation. | ||
229 | |||
230 | To better enforce this policy, always follow this simple rule: any | ||
231 | statically initialized clock data MUST be defined in a separate file | ||
232 | from the logic that implements its ops. Basically separate the logic | ||
233 | from the data and all is well. | ||
diff --git a/Documentation/cpu-hotplug.txt b/Documentation/cpu-hotplug.txt index a20bfd415e41..66ef8f35613d 100644 --- a/Documentation/cpu-hotplug.txt +++ b/Documentation/cpu-hotplug.txt | |||
@@ -47,7 +47,7 @@ maxcpus=n Restrict boot time cpus to n. Say if you have 4 cpus, using | |||
47 | other cpus later online, read FAQ's for more info. | 47 | other cpus later online, read FAQ's for more info. |
48 | 48 | ||
49 | additional_cpus=n (*) Use this to limit hotpluggable cpus. This option sets | 49 | additional_cpus=n (*) Use this to limit hotpluggable cpus. This option sets |
50 | cpu_possible_map = cpu_present_map + additional_cpus | 50 | cpu_possible_mask = cpu_present_mask + additional_cpus |
51 | 51 | ||
52 | cede_offline={"off","on"} Use this option to disable/enable putting offlined | 52 | cede_offline={"off","on"} Use this option to disable/enable putting offlined |
53 | processors to an extended H_CEDE state on | 53 | processors to an extended H_CEDE state on |
@@ -64,11 +64,11 @@ should only rely on this to count the # of cpus, but *MUST* not rely | |||
64 | on the apicid values in those tables for disabled apics. In the event | 64 | on the apicid values in those tables for disabled apics. In the event |
65 | BIOS doesn't mark such hot-pluggable cpus as disabled entries, one could | 65 | BIOS doesn't mark such hot-pluggable cpus as disabled entries, one could |
66 | use this parameter "additional_cpus=x" to represent those cpus in the | 66 | use this parameter "additional_cpus=x" to represent those cpus in the |
67 | cpu_possible_map. | 67 | cpu_possible_mask. |
68 | 68 | ||
69 | possible_cpus=n [s390,x86_64] use this to set hotpluggable cpus. | 69 | possible_cpus=n [s390,x86_64] use this to set hotpluggable cpus. |
70 | This option sets possible_cpus bits in | 70 | This option sets possible_cpus bits in |
71 | cpu_possible_map. Thus keeping the numbers of bits set | 71 | cpu_possible_mask. Thus keeping the numbers of bits set |
72 | constant even if the machine gets rebooted. | 72 | constant even if the machine gets rebooted. |
73 | 73 | ||
74 | CPU maps and such | 74 | CPU maps and such |
@@ -76,7 +76,7 @@ CPU maps and such | |||
76 | [More on cpumaps and primitive to manipulate, please check | 76 | [More on cpumaps and primitive to manipulate, please check |
77 | include/linux/cpumask.h that has more descriptive text.] | 77 | include/linux/cpumask.h that has more descriptive text.] |
78 | 78 | ||
79 | cpu_possible_map: Bitmap of possible CPUs that can ever be available in the | 79 | cpu_possible_mask: Bitmap of possible CPUs that can ever be available in the |
80 | system. This is used to allocate some boot time memory for per_cpu variables | 80 | system. This is used to allocate some boot time memory for per_cpu variables |
81 | that aren't designed to grow/shrink as CPUs are made available or removed. | 81 | that aren't designed to grow/shrink as CPUs are made available or removed. |
82 | Once set during boot time discovery phase, the map is static, i.e no bits | 82 | Once set during boot time discovery phase, the map is static, i.e no bits |
@@ -84,13 +84,13 @@ are added or removed anytime. Trimming it accurately for your system needs | |||
84 | upfront can save some boot time memory. See below for how we use heuristics | 84 | upfront can save some boot time memory. See below for how we use heuristics |
85 | in x86_64 case to keep this under check. | 85 | in x86_64 case to keep this under check. |
86 | 86 | ||
87 | cpu_online_map: Bitmap of all CPUs currently online. Its set in __cpu_up() | 87 | cpu_online_mask: Bitmap of all CPUs currently online. Its set in __cpu_up() |
88 | after a cpu is available for kernel scheduling and ready to receive | 88 | after a cpu is available for kernel scheduling and ready to receive |
89 | interrupts from devices. Its cleared when a cpu is brought down using | 89 | interrupts from devices. Its cleared when a cpu is brought down using |
90 | __cpu_disable(), before which all OS services including interrupts are | 90 | __cpu_disable(), before which all OS services including interrupts are |
91 | migrated to another target CPU. | 91 | migrated to another target CPU. |
92 | 92 | ||
93 | cpu_present_map: Bitmap of CPUs currently present in the system. Not all | 93 | cpu_present_mask: Bitmap of CPUs currently present in the system. Not all |
94 | of them may be online. When physical hotplug is processed by the relevant | 94 | of them may be online. When physical hotplug is processed by the relevant |
95 | subsystem (e.g ACPI) can change and new bit either be added or removed | 95 | subsystem (e.g ACPI) can change and new bit either be added or removed |
96 | from the map depending on the event is hot-add/hot-remove. There are currently | 96 | from the map depending on the event is hot-add/hot-remove. There are currently |
@@ -99,22 +99,22 @@ at which time hotplug is disabled. | |||
99 | 99 | ||
100 | You really dont need to manipulate any of the system cpu maps. They should | 100 | You really dont need to manipulate any of the system cpu maps. They should |
101 | be read-only for most use. When setting up per-cpu resources almost always use | 101 | be read-only for most use. When setting up per-cpu resources almost always use |
102 | cpu_possible_map/for_each_possible_cpu() to iterate. | 102 | cpu_possible_mask/for_each_possible_cpu() to iterate. |
103 | 103 | ||
104 | Never use anything other than cpumask_t to represent bitmap of CPUs. | 104 | Never use anything other than cpumask_t to represent bitmap of CPUs. |
105 | 105 | ||
106 | #include <linux/cpumask.h> | 106 | #include <linux/cpumask.h> |
107 | 107 | ||
108 | for_each_possible_cpu - Iterate over cpu_possible_map | 108 | for_each_possible_cpu - Iterate over cpu_possible_mask |
109 | for_each_online_cpu - Iterate over cpu_online_map | 109 | for_each_online_cpu - Iterate over cpu_online_mask |
110 | for_each_present_cpu - Iterate over cpu_present_map | 110 | for_each_present_cpu - Iterate over cpu_present_mask |
111 | for_each_cpu_mask(x,mask) - Iterate over some random collection of cpu mask. | 111 | for_each_cpu_mask(x,mask) - Iterate over some random collection of cpu mask. |
112 | 112 | ||
113 | #include <linux/cpu.h> | 113 | #include <linux/cpu.h> |
114 | get_online_cpus() and put_online_cpus(): | 114 | get_online_cpus() and put_online_cpus(): |
115 | 115 | ||
116 | The above calls are used to inhibit cpu hotplug operations. While the | 116 | The above calls are used to inhibit cpu hotplug operations. While the |
117 | cpu_hotplug.refcount is non zero, the cpu_online_map will not change. | 117 | cpu_hotplug.refcount is non zero, the cpu_online_mask will not change. |
118 | If you merely need to avoid cpus going away, you could also use | 118 | If you merely need to avoid cpus going away, you could also use |
119 | preempt_disable() and preempt_enable() for those sections. | 119 | preempt_disable() and preempt_enable() for those sections. |
120 | Just remember the critical section cannot call any | 120 | Just remember the critical section cannot call any |
diff --git a/Documentation/cpuidle/sysfs.txt b/Documentation/cpuidle/sysfs.txt index 50d7b1642759..9d28a3406e74 100644 --- a/Documentation/cpuidle/sysfs.txt +++ b/Documentation/cpuidle/sysfs.txt | |||
@@ -36,6 +36,7 @@ drwxr-xr-x 2 root root 0 Feb 8 10:42 state3 | |||
36 | /sys/devices/system/cpu/cpu0/cpuidle/state0: | 36 | /sys/devices/system/cpu/cpu0/cpuidle/state0: |
37 | total 0 | 37 | total 0 |
38 | -r--r--r-- 1 root root 4096 Feb 8 10:42 desc | 38 | -r--r--r-- 1 root root 4096 Feb 8 10:42 desc |
39 | -rw-r--r-- 1 root root 4096 Feb 8 10:42 disable | ||
39 | -r--r--r-- 1 root root 4096 Feb 8 10:42 latency | 40 | -r--r--r-- 1 root root 4096 Feb 8 10:42 latency |
40 | -r--r--r-- 1 root root 4096 Feb 8 10:42 name | 41 | -r--r--r-- 1 root root 4096 Feb 8 10:42 name |
41 | -r--r--r-- 1 root root 4096 Feb 8 10:42 power | 42 | -r--r--r-- 1 root root 4096 Feb 8 10:42 power |
@@ -45,6 +46,7 @@ total 0 | |||
45 | /sys/devices/system/cpu/cpu0/cpuidle/state1: | 46 | /sys/devices/system/cpu/cpu0/cpuidle/state1: |
46 | total 0 | 47 | total 0 |
47 | -r--r--r-- 1 root root 4096 Feb 8 10:42 desc | 48 | -r--r--r-- 1 root root 4096 Feb 8 10:42 desc |
49 | -rw-r--r-- 1 root root 4096 Feb 8 10:42 disable | ||
48 | -r--r--r-- 1 root root 4096 Feb 8 10:42 latency | 50 | -r--r--r-- 1 root root 4096 Feb 8 10:42 latency |
49 | -r--r--r-- 1 root root 4096 Feb 8 10:42 name | 51 | -r--r--r-- 1 root root 4096 Feb 8 10:42 name |
50 | -r--r--r-- 1 root root 4096 Feb 8 10:42 power | 52 | -r--r--r-- 1 root root 4096 Feb 8 10:42 power |
@@ -54,6 +56,7 @@ total 0 | |||
54 | /sys/devices/system/cpu/cpu0/cpuidle/state2: | 56 | /sys/devices/system/cpu/cpu0/cpuidle/state2: |
55 | total 0 | 57 | total 0 |
56 | -r--r--r-- 1 root root 4096 Feb 8 10:42 desc | 58 | -r--r--r-- 1 root root 4096 Feb 8 10:42 desc |
59 | -rw-r--r-- 1 root root 4096 Feb 8 10:42 disable | ||
57 | -r--r--r-- 1 root root 4096 Feb 8 10:42 latency | 60 | -r--r--r-- 1 root root 4096 Feb 8 10:42 latency |
58 | -r--r--r-- 1 root root 4096 Feb 8 10:42 name | 61 | -r--r--r-- 1 root root 4096 Feb 8 10:42 name |
59 | -r--r--r-- 1 root root 4096 Feb 8 10:42 power | 62 | -r--r--r-- 1 root root 4096 Feb 8 10:42 power |
@@ -63,6 +66,7 @@ total 0 | |||
63 | /sys/devices/system/cpu/cpu0/cpuidle/state3: | 66 | /sys/devices/system/cpu/cpu0/cpuidle/state3: |
64 | total 0 | 67 | total 0 |
65 | -r--r--r-- 1 root root 4096 Feb 8 10:42 desc | 68 | -r--r--r-- 1 root root 4096 Feb 8 10:42 desc |
69 | -rw-r--r-- 1 root root 4096 Feb 8 10:42 disable | ||
66 | -r--r--r-- 1 root root 4096 Feb 8 10:42 latency | 70 | -r--r--r-- 1 root root 4096 Feb 8 10:42 latency |
67 | -r--r--r-- 1 root root 4096 Feb 8 10:42 name | 71 | -r--r--r-- 1 root root 4096 Feb 8 10:42 name |
68 | -r--r--r-- 1 root root 4096 Feb 8 10:42 power | 72 | -r--r--r-- 1 root root 4096 Feb 8 10:42 power |
@@ -72,6 +76,7 @@ total 0 | |||
72 | 76 | ||
73 | 77 | ||
74 | * desc : Small description about the idle state (string) | 78 | * desc : Small description about the idle state (string) |
79 | * disable : Option to disable this idle state (bool) | ||
75 | * latency : Latency to exit out of this idle state (in microseconds) | 80 | * latency : Latency to exit out of this idle state (in microseconds) |
76 | * name : Name of the idle state (string) | 81 | * name : Name of the idle state (string) |
77 | * power : Power consumed while in this idle state (in milliwatts) | 82 | * power : Power consumed while in this idle state (in milliwatts) |
diff --git a/Documentation/crc32.txt b/Documentation/crc32.txt new file mode 100644 index 000000000000..a08a7dd9d625 --- /dev/null +++ b/Documentation/crc32.txt | |||
@@ -0,0 +1,182 @@ | |||
1 | A brief CRC tutorial. | ||
2 | |||
3 | A CRC is a long-division remainder. You add the CRC to the message, | ||
4 | and the whole thing (message+CRC) is a multiple of the given | ||
5 | CRC polynomial. To check the CRC, you can either check that the | ||
6 | CRC matches the recomputed value, *or* you can check that the | ||
7 | remainder computed on the message+CRC is 0. This latter approach | ||
8 | is used by a lot of hardware implementations, and is why so many | ||
9 | protocols put the end-of-frame flag after the CRC. | ||
10 | |||
11 | It's actually the same long division you learned in school, except that | ||
12 | - We're working in binary, so the digits are only 0 and 1, and | ||
13 | - When dividing polynomials, there are no carries. Rather than add and | ||
14 | subtract, we just xor. Thus, we tend to get a bit sloppy about | ||
15 | the difference between adding and subtracting. | ||
16 | |||
17 | Like all division, the remainder is always smaller than the divisor. | ||
18 | To produce a 32-bit CRC, the divisor is actually a 33-bit CRC polynomial. | ||
19 | Since it's 33 bits long, bit 32 is always going to be set, so usually the | ||
20 | CRC is written in hex with the most significant bit omitted. (If you're | ||
21 | familiar with the IEEE 754 floating-point format, it's the same idea.) | ||
22 | |||
23 | Note that a CRC is computed over a string of *bits*, so you have | ||
24 | to decide on the endianness of the bits within each byte. To get | ||
25 | the best error-detecting properties, this should correspond to the | ||
26 | order they're actually sent. For example, standard RS-232 serial is | ||
27 | little-endian; the most significant bit (sometimes used for parity) | ||
28 | is sent last. And when appending a CRC word to a message, you should | ||
29 | do it in the right order, matching the endianness. | ||
30 | |||
31 | Just like with ordinary division, you proceed one digit (bit) at a time. | ||
32 | Each step of the division you take one more digit (bit) of the dividend | ||
33 | and append it to the current remainder. Then you figure out the | ||
34 | appropriate multiple of the divisor to subtract to being the remainder | ||
35 | back into range. In binary, this is easy - it has to be either 0 or 1, | ||
36 | and to make the XOR cancel, it's just a copy of bit 32 of the remainder. | ||
37 | |||
38 | When computing a CRC, we don't care about the quotient, so we can | ||
39 | throw the quotient bit away, but subtract the appropriate multiple of | ||
40 | the polynomial from the remainder and we're back to where we started, | ||
41 | ready to process the next bit. | ||
42 | |||
43 | A big-endian CRC written this way would be coded like: | ||
44 | for (i = 0; i < input_bits; i++) { | ||
45 | multiple = remainder & 0x80000000 ? CRCPOLY : 0; | ||
46 | remainder = (remainder << 1 | next_input_bit()) ^ multiple; | ||
47 | } | ||
48 | |||
49 | Notice how, to get at bit 32 of the shifted remainder, we look | ||
50 | at bit 31 of the remainder *before* shifting it. | ||
51 | |||
52 | But also notice how the next_input_bit() bits we're shifting into | ||
53 | the remainder don't actually affect any decision-making until | ||
54 | 32 bits later. Thus, the first 32 cycles of this are pretty boring. | ||
55 | Also, to add the CRC to a message, we need a 32-bit-long hole for it at | ||
56 | the end, so we have to add 32 extra cycles shifting in zeros at the | ||
57 | end of every message, | ||
58 | |||
59 | These details lead to a standard trick: rearrange merging in the | ||
60 | next_input_bit() until the moment it's needed. Then the first 32 cycles | ||
61 | can be precomputed, and merging in the final 32 zero bits to make room | ||
62 | for the CRC can be skipped entirely. This changes the code to: | ||
63 | |||
64 | for (i = 0; i < input_bits; i++) { | ||
65 | remainder ^= next_input_bit() << 31; | ||
66 | multiple = (remainder & 0x80000000) ? CRCPOLY : 0; | ||
67 | remainder = (remainder << 1) ^ multiple; | ||
68 | } | ||
69 | |||
70 | With this optimization, the little-endian code is particularly simple: | ||
71 | for (i = 0; i < input_bits; i++) { | ||
72 | remainder ^= next_input_bit(); | ||
73 | multiple = (remainder & 1) ? CRCPOLY : 0; | ||
74 | remainder = (remainder >> 1) ^ multiple; | ||
75 | } | ||
76 | |||
77 | The most significant coefficient of the remainder polynomial is stored | ||
78 | in the least significant bit of the binary "remainder" variable. | ||
79 | The other details of endianness have been hidden in CRCPOLY (which must | ||
80 | be bit-reversed) and next_input_bit(). | ||
81 | |||
82 | As long as next_input_bit is returning the bits in a sensible order, we don't | ||
83 | *have* to wait until the last possible moment to merge in additional bits. | ||
84 | We can do it 8 bits at a time rather than 1 bit at a time: | ||
85 | for (i = 0; i < input_bytes; i++) { | ||
86 | remainder ^= next_input_byte() << 24; | ||
87 | for (j = 0; j < 8; j++) { | ||
88 | multiple = (remainder & 0x80000000) ? CRCPOLY : 0; | ||
89 | remainder = (remainder << 1) ^ multiple; | ||
90 | } | ||
91 | } | ||
92 | |||
93 | Or in little-endian: | ||
94 | for (i = 0; i < input_bytes; i++) { | ||
95 | remainder ^= next_input_byte(); | ||
96 | for (j = 0; j < 8; j++) { | ||
97 | multiple = (remainder & 1) ? CRCPOLY : 0; | ||
98 | remainder = (remainder >> 1) ^ multiple; | ||
99 | } | ||
100 | } | ||
101 | |||
102 | If the input is a multiple of 32 bits, you can even XOR in a 32-bit | ||
103 | word at a time and increase the inner loop count to 32. | ||
104 | |||
105 | You can also mix and match the two loop styles, for example doing the | ||
106 | bulk of a message byte-at-a-time and adding bit-at-a-time processing | ||
107 | for any fractional bytes at the end. | ||
108 | |||
109 | To reduce the number of conditional branches, software commonly uses | ||
110 | the byte-at-a-time table method, popularized by Dilip V. Sarwate, | ||
111 | "Computation of Cyclic Redundancy Checks via Table Look-Up", Comm. ACM | ||
112 | v.31 no.8 (August 1998) p. 1008-1013. | ||
113 | |||
114 | Here, rather than just shifting one bit of the remainder to decide | ||
115 | in the correct multiple to subtract, we can shift a byte at a time. | ||
116 | This produces a 40-bit (rather than a 33-bit) intermediate remainder, | ||
117 | and the correct multiple of the polynomial to subtract is found using | ||
118 | a 256-entry lookup table indexed by the high 8 bits. | ||
119 | |||
120 | (The table entries are simply the CRC-32 of the given one-byte messages.) | ||
121 | |||
122 | When space is more constrained, smaller tables can be used, e.g. two | ||
123 | 4-bit shifts followed by a lookup in a 16-entry table. | ||
124 | |||
125 | It is not practical to process much more than 8 bits at a time using this | ||
126 | technique, because tables larger than 256 entries use too much memory and, | ||
127 | more importantly, too much of the L1 cache. | ||
128 | |||
129 | To get higher software performance, a "slicing" technique can be used. | ||
130 | See "High Octane CRC Generation with the Intel Slicing-by-8 Algorithm", | ||
131 | ftp://download.intel.com/technology/comms/perfnet/download/slicing-by-8.pdf | ||
132 | |||
133 | This does not change the number of table lookups, but does increase | ||
134 | the parallelism. With the classic Sarwate algorithm, each table lookup | ||
135 | must be completed before the index of the next can be computed. | ||
136 | |||
137 | A "slicing by 2" technique would shift the remainder 16 bits at a time, | ||
138 | producing a 48-bit intermediate remainder. Rather than doing a single | ||
139 | lookup in a 65536-entry table, the two high bytes are looked up in | ||
140 | two different 256-entry tables. Each contains the remainder required | ||
141 | to cancel out the corresponding byte. The tables are different because the | ||
142 | polynomials to cancel are different. One has non-zero coefficients from | ||
143 | x^32 to x^39, while the other goes from x^40 to x^47. | ||
144 | |||
145 | Since modern processors can handle many parallel memory operations, this | ||
146 | takes barely longer than a single table look-up and thus performs almost | ||
147 | twice as fast as the basic Sarwate algorithm. | ||
148 | |||
149 | This can be extended to "slicing by 4" using 4 256-entry tables. | ||
150 | Each step, 32 bits of data is fetched, XORed with the CRC, and the result | ||
151 | broken into bytes and looked up in the tables. Because the 32-bit shift | ||
152 | leaves the low-order bits of the intermediate remainder zero, the | ||
153 | final CRC is simply the XOR of the 4 table look-ups. | ||
154 | |||
155 | But this still enforces sequential execution: a second group of table | ||
156 | look-ups cannot begin until the previous groups 4 table look-ups have all | ||
157 | been completed. Thus, the processor's load/store unit is sometimes idle. | ||
158 | |||
159 | To make maximum use of the processor, "slicing by 8" performs 8 look-ups | ||
160 | in parallel. Each step, the 32-bit CRC is shifted 64 bits and XORed | ||
161 | with 64 bits of input data. What is important to note is that 4 of | ||
162 | those 8 bytes are simply copies of the input data; they do not depend | ||
163 | on the previous CRC at all. Thus, those 4 table look-ups may commence | ||
164 | immediately, without waiting for the previous loop iteration. | ||
165 | |||
166 | By always having 4 loads in flight, a modern superscalar processor can | ||
167 | be kept busy and make full use of its L1 cache. | ||
168 | |||
169 | Two more details about CRC implementation in the real world: | ||
170 | |||
171 | Normally, appending zero bits to a message which is already a multiple | ||
172 | of a polynomial produces a larger multiple of that polynomial. Thus, | ||
173 | a basic CRC will not detect appended zero bits (or bytes). To enable | ||
174 | a CRC to detect this condition, it's common to invert the CRC before | ||
175 | appending it. This makes the remainder of the message+crc come out not | ||
176 | as zero, but some fixed non-zero value. (The CRC of the inversion | ||
177 | pattern, 0xffffffff.) | ||
178 | |||
179 | The same problem applies to zero bits prepended to the message, and a | ||
180 | similar solution is used. Instead of starting the CRC computation with | ||
181 | a remainder of 0, an initial remainder of all ones is used. As long as | ||
182 | you start the same way on decoding, it doesn't make a difference. | ||
diff --git a/Documentation/device-mapper/thin-provisioning.txt b/Documentation/device-mapper/thin-provisioning.txt index 1ff044d87ca4..3370bc4d7b98 100644 --- a/Documentation/device-mapper/thin-provisioning.txt +++ b/Documentation/device-mapper/thin-provisioning.txt | |||
@@ -75,10 +75,12 @@ less sharing than average you'll need a larger-than-average metadata device. | |||
75 | 75 | ||
76 | As a guide, we suggest you calculate the number of bytes to use in the | 76 | As a guide, we suggest you calculate the number of bytes to use in the |
77 | metadata device as 48 * $data_dev_size / $data_block_size but round it up | 77 | metadata device as 48 * $data_dev_size / $data_block_size but round it up |
78 | to 2MB if the answer is smaller. The largest size supported is 16GB. | 78 | to 2MB if the answer is smaller. If you're creating large numbers of |
79 | snapshots which are recording large amounts of change, you may find you | ||
80 | need to increase this. | ||
79 | 81 | ||
80 | If you're creating large numbers of snapshots which are recording large | 82 | The largest size supported is 16GB: If the device is larger, |
81 | amounts of change, you may need find you need to increase this. | 83 | a warning will be issued and the excess space will not be used. |
82 | 84 | ||
83 | Reloading a pool table | 85 | Reloading a pool table |
84 | ---------------------- | 86 | ---------------------- |
@@ -167,6 +169,38 @@ ii) Using an internal snapshot. | |||
167 | 169 | ||
168 | dmsetup create snap --table "0 2097152 thin /dev/mapper/pool 1" | 170 | dmsetup create snap --table "0 2097152 thin /dev/mapper/pool 1" |
169 | 171 | ||
172 | External snapshots | ||
173 | ------------------ | ||
174 | |||
175 | You can use an external _read only_ device as an origin for a | ||
176 | thinly-provisioned volume. Any read to an unprovisioned area of the | ||
177 | thin device will be passed through to the origin. Writes trigger | ||
178 | the allocation of new blocks as usual. | ||
179 | |||
180 | One use case for this is VM hosts that want to run guests on | ||
181 | thinly-provisioned volumes but have the base image on another device | ||
182 | (possibly shared between many VMs). | ||
183 | |||
184 | You must not write to the origin device if you use this technique! | ||
185 | Of course, you may write to the thin device and take internal snapshots | ||
186 | of the thin volume. | ||
187 | |||
188 | i) Creating a snapshot of an external device | ||
189 | |||
190 | This is the same as creating a thin device. | ||
191 | You don't mention the origin at this stage. | ||
192 | |||
193 | dmsetup message /dev/mapper/pool 0 "create_thin 0" | ||
194 | |||
195 | ii) Using a snapshot of an external device. | ||
196 | |||
197 | Append an extra parameter to the thin target specifying the origin: | ||
198 | |||
199 | dmsetup create snap --table "0 2097152 thin /dev/mapper/pool 0 /dev/image" | ||
200 | |||
201 | N.B. All descendants (internal snapshots) of this snapshot require the | ||
202 | same extra origin parameter. | ||
203 | |||
170 | Deactivation | 204 | Deactivation |
171 | ------------ | 205 | ------------ |
172 | 206 | ||
@@ -189,7 +223,13 @@ i) Constructor | |||
189 | <low water mark (blocks)> [<number of feature args> [<arg>]*] | 223 | <low water mark (blocks)> [<number of feature args> [<arg>]*] |
190 | 224 | ||
191 | Optional feature arguments: | 225 | Optional feature arguments: |
192 | - 'skip_block_zeroing': skips the zeroing of newly-provisioned blocks. | 226 | |
227 | skip_block_zeroing: Skip the zeroing of newly-provisioned blocks. | ||
228 | |||
229 | ignore_discard: Disable discard support. | ||
230 | |||
231 | no_discard_passdown: Don't pass discards down to the underlying | ||
232 | data device, but just remove the mapping. | ||
193 | 233 | ||
194 | Data block size must be between 64KB (128 sectors) and 1GB | 234 | Data block size must be between 64KB (128 sectors) and 1GB |
195 | (2097152 sectors) inclusive. | 235 | (2097152 sectors) inclusive. |
@@ -237,16 +277,6 @@ iii) Messages | |||
237 | 277 | ||
238 | Deletes a thin device. Irreversible. | 278 | Deletes a thin device. Irreversible. |
239 | 279 | ||
240 | trim <dev id> <new size in sectors> | ||
241 | |||
242 | Delete mappings from the end of a thin device. Irreversible. | ||
243 | You might want to use this if you're reducing the size of | ||
244 | your thinly-provisioned device. In many cases, due to the | ||
245 | sharing of blocks between devices, it is not possible to | ||
246 | determine in advance how much space 'trim' will release. (In | ||
247 | future a userspace tool might be able to perform this | ||
248 | calculation.) | ||
249 | |||
250 | set_transaction_id <current id> <new id> | 280 | set_transaction_id <current id> <new id> |
251 | 281 | ||
252 | Userland volume managers, such as LVM, need a way to | 282 | Userland volume managers, such as LVM, need a way to |
@@ -262,7 +292,7 @@ iii) Messages | |||
262 | 292 | ||
263 | i) Constructor | 293 | i) Constructor |
264 | 294 | ||
265 | thin <pool dev> <dev id> | 295 | thin <pool dev> <dev id> [<external origin dev>] |
266 | 296 | ||
267 | pool dev: | 297 | pool dev: |
268 | the thin-pool device, e.g. /dev/mapper/my_pool or 253:0 | 298 | the thin-pool device, e.g. /dev/mapper/my_pool or 253:0 |
@@ -271,6 +301,11 @@ i) Constructor | |||
271 | the internal device identifier of the device to be | 301 | the internal device identifier of the device to be |
272 | activated. | 302 | activated. |
273 | 303 | ||
304 | external origin dev: | ||
305 | an optional block device outside the pool to be treated as a | ||
306 | read-only snapshot origin: reads to unprovisioned areas of the | ||
307 | thin target will be mapped to this device. | ||
308 | |||
274 | The pool doesn't store any size against the thin devices. If you | 309 | The pool doesn't store any size against the thin devices. If you |
275 | load a thin target that is smaller than you've been using previously, | 310 | load a thin target that is smaller than you've been using previously, |
276 | then you'll have no access to blocks mapped beyond the end. If you | 311 | then you'll have no access to blocks mapped beyond the end. If you |
diff --git a/Documentation/device-mapper/verity.txt b/Documentation/device-mapper/verity.txt new file mode 100644 index 000000000000..32e48797a14f --- /dev/null +++ b/Documentation/device-mapper/verity.txt | |||
@@ -0,0 +1,194 @@ | |||
1 | dm-verity | ||
2 | ========== | ||
3 | |||
4 | Device-Mapper's "verity" target provides transparent integrity checking of | ||
5 | block devices using a cryptographic digest provided by the kernel crypto API. | ||
6 | This target is read-only. | ||
7 | |||
8 | Construction Parameters | ||
9 | ======================= | ||
10 | <version> <dev> <hash_dev> <hash_start> | ||
11 | <data_block_size> <hash_block_size> | ||
12 | <num_data_blocks> <hash_start_block> | ||
13 | <algorithm> <digest> <salt> | ||
14 | |||
15 | <version> | ||
16 | This is the version number of the on-disk format. | ||
17 | |||
18 | 0 is the original format used in the Chromium OS. | ||
19 | The salt is appended when hashing, digests are stored continuously and | ||
20 | the rest of the block is padded with zeros. | ||
21 | |||
22 | 1 is the current format that should be used for new devices. | ||
23 | The salt is prepended when hashing and each digest is | ||
24 | padded with zeros to the power of two. | ||
25 | |||
26 | <dev> | ||
27 | This is the device containing the data the integrity of which needs to be | ||
28 | checked. It may be specified as a path, like /dev/sdaX, or a device number, | ||
29 | <major>:<minor>. | ||
30 | |||
31 | <hash_dev> | ||
32 | This is the device that that supplies the hash tree data. It may be | ||
33 | specified similarly to the device path and may be the same device. If the | ||
34 | same device is used, the hash_start should be outside of the dm-verity | ||
35 | configured device size. | ||
36 | |||
37 | <data_block_size> | ||
38 | The block size on a data device. Each block corresponds to one digest on | ||
39 | the hash device. | ||
40 | |||
41 | <hash_block_size> | ||
42 | The size of a hash block. | ||
43 | |||
44 | <num_data_blocks> | ||
45 | The number of data blocks on the data device. Additional blocks are | ||
46 | inaccessible. You can place hashes to the same partition as data, in this | ||
47 | case hashes are placed after <num_data_blocks>. | ||
48 | |||
49 | <hash_start_block> | ||
50 | This is the offset, in <hash_block_size>-blocks, from the start of hash_dev | ||
51 | to the root block of the hash tree. | ||
52 | |||
53 | <algorithm> | ||
54 | The cryptographic hash algorithm used for this device. This should | ||
55 | be the name of the algorithm, like "sha1". | ||
56 | |||
57 | <digest> | ||
58 | The hexadecimal encoding of the cryptographic hash of the root hash block | ||
59 | and the salt. This hash should be trusted as there is no other authenticity | ||
60 | beyond this point. | ||
61 | |||
62 | <salt> | ||
63 | The hexadecimal encoding of the salt value. | ||
64 | |||
65 | Theory of operation | ||
66 | =================== | ||
67 | |||
68 | dm-verity is meant to be setup as part of a verified boot path. This | ||
69 | may be anything ranging from a boot using tboot or trustedgrub to just | ||
70 | booting from a known-good device (like a USB drive or CD). | ||
71 | |||
72 | When a dm-verity device is configured, it is expected that the caller | ||
73 | has been authenticated in some way (cryptographic signatures, etc). | ||
74 | After instantiation, all hashes will be verified on-demand during | ||
75 | disk access. If they cannot be verified up to the root node of the | ||
76 | tree, the root hash, then the I/O will fail. This should identify | ||
77 | tampering with any data on the device and the hash data. | ||
78 | |||
79 | Cryptographic hashes are used to assert the integrity of the device on a | ||
80 | per-block basis. This allows for a lightweight hash computation on first read | ||
81 | into the page cache. Block hashes are stored linearly-aligned to the nearest | ||
82 | block the size of a page. | ||
83 | |||
84 | Hash Tree | ||
85 | --------- | ||
86 | |||
87 | Each node in the tree is a cryptographic hash. If it is a leaf node, the hash | ||
88 | is of some block data on disk. If it is an intermediary node, then the hash is | ||
89 | of a number of child nodes. | ||
90 | |||
91 | Each entry in the tree is a collection of neighboring nodes that fit in one | ||
92 | block. The number is determined based on block_size and the size of the | ||
93 | selected cryptographic digest algorithm. The hashes are linearly-ordered in | ||
94 | this entry and any unaligned trailing space is ignored but included when | ||
95 | calculating the parent node. | ||
96 | |||
97 | The tree looks something like: | ||
98 | |||
99 | alg = sha256, num_blocks = 32768, block_size = 4096 | ||
100 | |||
101 | [ root ] | ||
102 | / . . . \ | ||
103 | [entry_0] [entry_1] | ||
104 | / . . . \ . . . \ | ||
105 | [entry_0_0] . . . [entry_0_127] . . . . [entry_1_127] | ||
106 | / ... \ / . . . \ / \ | ||
107 | blk_0 ... blk_127 blk_16256 blk_16383 blk_32640 . . . blk_32767 | ||
108 | |||
109 | |||
110 | On-disk format | ||
111 | ============== | ||
112 | |||
113 | Below is the recommended on-disk format. The verity kernel code does not | ||
114 | read the on-disk header. It only reads the hash blocks which directly | ||
115 | follow the header. It is expected that a user-space tool will verify the | ||
116 | integrity of the verity_header and then call dmsetup with the correct | ||
117 | parameters. Alternatively, the header can be omitted and the dmsetup | ||
118 | parameters can be passed via the kernel command-line in a rooted chain | ||
119 | of trust where the command-line is verified. | ||
120 | |||
121 | The on-disk format is especially useful in cases where the hash blocks | ||
122 | are on a separate partition. The magic number allows easy identification | ||
123 | of the partition contents. Alternatively, the hash blocks can be stored | ||
124 | in the same partition as the data to be verified. In such a configuration | ||
125 | the filesystem on the partition would be sized a little smaller than | ||
126 | the full-partition, leaving room for the hash blocks. | ||
127 | |||
128 | struct superblock { | ||
129 | uint8_t signature[8] | ||
130 | "verity\0\0"; | ||
131 | |||
132 | uint8_t version; | ||
133 | 1 - current format | ||
134 | |||
135 | uint8_t data_block_bits; | ||
136 | log2(data block size) | ||
137 | |||
138 | uint8_t hash_block_bits; | ||
139 | log2(hash block size) | ||
140 | |||
141 | uint8_t pad1[1]; | ||
142 | zero padding | ||
143 | |||
144 | uint16_t salt_size; | ||
145 | big-endian salt size | ||
146 | |||
147 | uint8_t pad2[2]; | ||
148 | zero padding | ||
149 | |||
150 | uint32_t data_blocks_hi; | ||
151 | big-endian high 32 bits of the 64-bit number of data blocks | ||
152 | |||
153 | uint32_t data_blocks_lo; | ||
154 | big-endian low 32 bits of the 64-bit number of data blocks | ||
155 | |||
156 | uint8_t algorithm[16]; | ||
157 | cryptographic algorithm | ||
158 | |||
159 | uint8_t salt[384]; | ||
160 | salt (the salt size is specified above) | ||
161 | |||
162 | uint8_t pad3[88]; | ||
163 | zero padding to 512-byte boundary | ||
164 | } | ||
165 | |||
166 | Directly following the header (and with sector number padded to the next hash | ||
167 | block boundary) are the hash blocks which are stored a depth at a time | ||
168 | (starting from the root), sorted in order of increasing index. | ||
169 | |||
170 | Status | ||
171 | ====== | ||
172 | V (for Valid) is returned if every check performed so far was valid. | ||
173 | If any check failed, C (for Corruption) is returned. | ||
174 | |||
175 | Example | ||
176 | ======= | ||
177 | |||
178 | Setup a device: | ||
179 | dmsetup create vroot --table \ | ||
180 | "0 2097152 "\ | ||
181 | "verity 1 /dev/sda1 /dev/sda2 4096 4096 2097152 1 "\ | ||
182 | "4392712ba01368efdf14b05c76f9e4df0d53664630b5d48632ed17a137f39076 "\ | ||
183 | "1234000000000000000000000000000000000000000000000000000000000000" | ||
184 | |||
185 | A command line tool veritysetup is available to compute or verify | ||
186 | the hash tree or activate the kernel driver. This is available from | ||
187 | the LVM2 upstream repository and may be supplied as a package called | ||
188 | device-mapper-verity-tools: | ||
189 | git://sources.redhat.com/git/lvm2 | ||
190 | http://sourceware.org/git/?p=lvm2.git | ||
191 | http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/verity?cvsroot=lvm2 | ||
192 | |||
193 | veritysetup -a vroot /dev/sda1 /dev/sda2 \ | ||
194 | 4392712ba01368efdf14b05c76f9e4df0d53664630b5d48632ed17a137f39076 | ||
diff --git a/Documentation/devicetree/bindings/arm/atmel-aic.txt b/Documentation/devicetree/bindings/arm/atmel-aic.txt new file mode 100644 index 000000000000..aabca4f83402 --- /dev/null +++ b/Documentation/devicetree/bindings/arm/atmel-aic.txt | |||
@@ -0,0 +1,38 @@ | |||
1 | * Advanced Interrupt Controller (AIC) | ||
2 | |||
3 | Required properties: | ||
4 | - compatible: Should be "atmel,<chip>-aic" | ||
5 | - interrupt-controller: Identifies the node as an interrupt controller. | ||
6 | - interrupt-parent: For single AIC system, it is an empty property. | ||
7 | - #interrupt-cells: The number of cells to define the interrupts. It sould be 2. | ||
8 | The first cell is the IRQ number (aka "Peripheral IDentifier" on datasheet). | ||
9 | The second cell is used to specify flags: | ||
10 | bits[3:0] trigger type and level flags: | ||
11 | 1 = low-to-high edge triggered. | ||
12 | 2 = high-to-low edge triggered. | ||
13 | 4 = active high level-sensitive. | ||
14 | 8 = active low level-sensitive. | ||
15 | Valid combinations are 1, 2, 3, 4, 8. | ||
16 | Default flag for internal sources should be set to 4 (active high). | ||
17 | - reg: Should contain AIC registers location and length | ||
18 | |||
19 | Examples: | ||
20 | /* | ||
21 | * AIC | ||
22 | */ | ||
23 | aic: interrupt-controller@fffff000 { | ||
24 | compatible = "atmel,at91rm9200-aic"; | ||
25 | interrupt-controller; | ||
26 | interrupt-parent; | ||
27 | #interrupt-cells = <2>; | ||
28 | reg = <0xfffff000 0x200>; | ||
29 | }; | ||
30 | |||
31 | /* | ||
32 | * An interrupt generating device that is wired to an AIC. | ||
33 | */ | ||
34 | dma: dma-controller@ffffec00 { | ||
35 | compatible = "atmel,at91sam9g45-dma"; | ||
36 | reg = <0xffffec00 0x200>; | ||
37 | interrupts = <21 4>; | ||
38 | }; | ||
diff --git a/Documentation/devicetree/bindings/arm/atmel-at91.txt b/Documentation/devicetree/bindings/arm/atmel-at91.txt new file mode 100644 index 000000000000..ecc81e368715 --- /dev/null +++ b/Documentation/devicetree/bindings/arm/atmel-at91.txt | |||
@@ -0,0 +1,92 @@ | |||
1 | Atmel AT91 device tree bindings. | ||
2 | ================================ | ||
3 | |||
4 | PIT Timer required properties: | ||
5 | - compatible: Should be "atmel,at91sam9260-pit" | ||
6 | - reg: Should contain registers location and length | ||
7 | - interrupts: Should contain interrupt for the PIT which is the IRQ line | ||
8 | shared across all System Controller members. | ||
9 | |||
10 | TC/TCLIB Timer required properties: | ||
11 | - compatible: Should be "atmel,<chip>-pit". | ||
12 | <chip> can be "at91rm9200" or "at91sam9x5" | ||
13 | - reg: Should contain registers location and length | ||
14 | - interrupts: Should contain all interrupts for the TC block | ||
15 | Note that you can specify several interrupt cells if the TC | ||
16 | block has one interrupt per channel. | ||
17 | |||
18 | Examples: | ||
19 | |||
20 | One interrupt per TC block: | ||
21 | tcb0: timer@fff7c000 { | ||
22 | compatible = "atmel,at91rm9200-tcb"; | ||
23 | reg = <0xfff7c000 0x100>; | ||
24 | interrupts = <18 4>; | ||
25 | }; | ||
26 | |||
27 | One interrupt per TC channel in a TC block: | ||
28 | tcb1: timer@fffdc000 { | ||
29 | compatible = "atmel,at91rm9200-tcb"; | ||
30 | reg = <0xfffdc000 0x100>; | ||
31 | interrupts = <26 4 27 4 28 4>; | ||
32 | }; | ||
33 | |||
34 | RSTC Reset Controller required properties: | ||
35 | - compatible: Should be "atmel,<chip>-rstc". | ||
36 | <chip> can be "at91sam9260" or "at91sam9g45" | ||
37 | - reg: Should contain registers location and length | ||
38 | |||
39 | Example: | ||
40 | |||
41 | rstc@fffffd00 { | ||
42 | compatible = "atmel,at91sam9260-rstc"; | ||
43 | reg = <0xfffffd00 0x10>; | ||
44 | }; | ||
45 | |||
46 | RAMC SDRAM/DDR Controller required properties: | ||
47 | - compatible: Should be "atmel,at91sam9260-sdramc", | ||
48 | "atmel,at91sam9g45-ddramc", | ||
49 | - reg: Should contain registers location and length | ||
50 | For at91sam9263 and at91sam9g45 you must specify 2 entries. | ||
51 | |||
52 | Examples: | ||
53 | |||
54 | ramc0: ramc@ffffe800 { | ||
55 | compatible = "atmel,at91sam9g45-ddramc"; | ||
56 | reg = <0xffffe800 0x200>; | ||
57 | }; | ||
58 | |||
59 | ramc0: ramc@ffffe400 { | ||
60 | compatible = "atmel,at91sam9g45-ddramc"; | ||
61 | reg = <0xffffe400 0x200 | ||
62 | 0xffffe600 0x200>; | ||
63 | }; | ||
64 | |||
65 | SHDWC Shutdown Controller | ||
66 | |||
67 | required properties: | ||
68 | - compatible: Should be "atmel,<chip>-shdwc". | ||
69 | <chip> can be "at91sam9260", "at91sam9rl" or "at91sam9x5". | ||
70 | - reg: Should contain registers location and length | ||
71 | |||
72 | optional properties: | ||
73 | - atmel,wakeup-mode: String, operation mode of the wakeup mode. | ||
74 | Supported values are: "none", "high", "low", "any". | ||
75 | - atmel,wakeup-counter: Counter on Wake-up 0 (between 0x0 and 0xf). | ||
76 | |||
77 | optional at91sam9260 properties: | ||
78 | - atmel,wakeup-rtt-timer: boolean to enable Real-time Timer Wake-up. | ||
79 | |||
80 | optional at91sam9rl properties: | ||
81 | - atmel,wakeup-rtc-timer: boolean to enable Real-time Clock Wake-up. | ||
82 | - atmel,wakeup-rtt-timer: boolean to enable Real-time Timer Wake-up. | ||
83 | |||
84 | optional at91sam9x5 properties: | ||
85 | - atmel,wakeup-rtc-timer: boolean to enable Real-time Clock Wake-up. | ||
86 | |||
87 | Example: | ||
88 | |||
89 | rstc@fffffd00 { | ||
90 | compatible = "atmel,at91sam9260-rstc"; | ||
91 | reg = <0xfffffd00 0x10>; | ||
92 | }; | ||
diff --git a/Documentation/devicetree/bindings/arm/atmel-pmc.txt b/Documentation/devicetree/bindings/arm/atmel-pmc.txt new file mode 100644 index 000000000000..389bed5056e8 --- /dev/null +++ b/Documentation/devicetree/bindings/arm/atmel-pmc.txt | |||
@@ -0,0 +1,11 @@ | |||
1 | * Power Management Controller (PMC) | ||
2 | |||
3 | Required properties: | ||
4 | - compatible: Should be "atmel,at91rm9200-pmc" | ||
5 | - reg: Should contain PMC registers location and length | ||
6 | |||
7 | Examples: | ||
8 | pmc: pmc@fffffc00 { | ||
9 | compatible = "atmel,at91rm9200-pmc"; | ||
10 | reg = <0xfffffc00 0x100>; | ||
11 | }; | ||
diff --git a/Documentation/devicetree/bindings/arm/exynos/power_domain.txt b/Documentation/devicetree/bindings/arm/exynos/power_domain.txt new file mode 100644 index 000000000000..6528e215c5fe --- /dev/null +++ b/Documentation/devicetree/bindings/arm/exynos/power_domain.txt | |||
@@ -0,0 +1,21 @@ | |||
1 | * Samsung Exynos Power Domains | ||
2 | |||
3 | Exynos processors include support for multiple power domains which are used | ||
4 | to gate power to one or more peripherals on the processor. | ||
5 | |||
6 | Required Properties: | ||
7 | - compatiable: should be one of the following. | ||
8 | * samsung,exynos4210-pd - for exynos4210 type power domain. | ||
9 | - reg: physical base address of the controller and length of memory mapped | ||
10 | region. | ||
11 | |||
12 | Optional Properties: | ||
13 | - samsung,exynos4210-pd-off: Specifies that the power domain is in turned-off | ||
14 | state during boot and remains to be turned-off until explicitly turned-on. | ||
15 | |||
16 | Example: | ||
17 | |||
18 | lcd0: power-domain-lcd0 { | ||
19 | compatible = "samsung,exynos4210-pd"; | ||
20 | reg = <0x10023C00 0x10>; | ||
21 | }; | ||
diff --git a/Documentation/devicetree/bindings/arm/fsl.txt b/Documentation/devicetree/bindings/arm/fsl.txt index 54bdddadf1cf..bfbc771a65f8 100644 --- a/Documentation/devicetree/bindings/arm/fsl.txt +++ b/Documentation/devicetree/bindings/arm/fsl.txt | |||
@@ -28,3 +28,25 @@ Required root node properties: | |||
28 | i.MX6 Quad SABRE Lite Board | 28 | i.MX6 Quad SABRE Lite Board |
29 | Required root node properties: | 29 | Required root node properties: |
30 | - compatible = "fsl,imx6q-sabrelite", "fsl,imx6q"; | 30 | - compatible = "fsl,imx6q-sabrelite", "fsl,imx6q"; |
31 | |||
32 | Generic i.MX boards | ||
33 | ------------------- | ||
34 | |||
35 | No iomux setup is done for these boards, so this must have been configured | ||
36 | by the bootloader for boards to work with the generic bindings. | ||
37 | |||
38 | i.MX27 generic board | ||
39 | Required root node properties: | ||
40 | - compatible = "fsl,imx27"; | ||
41 | |||
42 | i.MX51 generic board | ||
43 | Required root node properties: | ||
44 | - compatible = "fsl,imx51"; | ||
45 | |||
46 | i.MX53 generic board | ||
47 | Required root node properties: | ||
48 | - compatible = "fsl,imx53"; | ||
49 | |||
50 | i.MX6q generic board | ||
51 | Required root node properties: | ||
52 | - compatible = "fsl,imx6q"; | ||
diff --git a/Documentation/devicetree/bindings/arm/mrvl.txt b/Documentation/devicetree/bindings/arm/mrvl.txt new file mode 100644 index 000000000000..d8de933e9d81 --- /dev/null +++ b/Documentation/devicetree/bindings/arm/mrvl.txt | |||
@@ -0,0 +1,6 @@ | |||
1 | Marvell Platforms Device Tree Bindings | ||
2 | ---------------------------------------------------- | ||
3 | |||
4 | PXA168 Aspenite Board | ||
5 | Required root node properties: | ||
6 | - compatible = "mrvl,pxa168-aspenite", "mrvl,pxa168"; | ||
diff --git a/Documentation/devicetree/bindings/arm/omap/intc.txt b/Documentation/devicetree/bindings/arm/omap/intc.txt new file mode 100644 index 000000000000..f2583e6ec060 --- /dev/null +++ b/Documentation/devicetree/bindings/arm/omap/intc.txt | |||
@@ -0,0 +1,27 @@ | |||
1 | * OMAP Interrupt Controller | ||
2 | |||
3 | OMAP2/3 are using a TI interrupt controller that can support several | ||
4 | configurable number of interrupts. | ||
5 | |||
6 | Main node required properties: | ||
7 | |||
8 | - compatible : should be: | ||
9 | "ti,omap2-intc" | ||
10 | - interrupt-controller : Identifies the node as an interrupt controller | ||
11 | - #interrupt-cells : Specifies the number of cells needed to encode an | ||
12 | interrupt source. The type shall be a <u32> and the value shall be 1. | ||
13 | |||
14 | The cell contains the interrupt number in the range [0-128]. | ||
15 | - ti,intc-size: Number of interrupts handled by the interrupt controller. | ||
16 | - reg: physical base address and size of the intc registers map. | ||
17 | |||
18 | Example: | ||
19 | |||
20 | intc: interrupt-controller@1 { | ||
21 | compatible = "ti,omap2-intc"; | ||
22 | interrupt-controller; | ||
23 | #interrupt-cells = <1>; | ||
24 | ti,intc-size = <96>; | ||
25 | reg = <0x48200000 0x1000>; | ||
26 | }; | ||
27 | |||
diff --git a/Documentation/devicetree/bindings/arm/omap/omap.txt b/Documentation/devicetree/bindings/arm/omap/omap.txt index edc618a8aab2..e78e8bccac30 100644 --- a/Documentation/devicetree/bindings/arm/omap/omap.txt +++ b/Documentation/devicetree/bindings/arm/omap/omap.txt | |||
@@ -41,3 +41,9 @@ Boards: | |||
41 | 41 | ||
42 | - OMAP4 PandaBoard : Low cost community board | 42 | - OMAP4 PandaBoard : Low cost community board |
43 | compatible = "ti,omap4-panda", "ti,omap4430" | 43 | compatible = "ti,omap4-panda", "ti,omap4430" |
44 | |||
45 | - OMAP3 EVM : Software Developement Board for OMAP35x, AM/DM37x | ||
46 | compatible = "ti,omap3-evm", "ti,omap3" | ||
47 | |||
48 | - AM335X EVM : Software Developement Board for AM335x | ||
49 | compatible = "ti,am335x-evm", "ti,am33xx", "ti,omap3" | ||
diff --git a/Documentation/devicetree/bindings/arm/spear.txt b/Documentation/devicetree/bindings/arm/spear.txt new file mode 100644 index 000000000000..f8e54f092328 --- /dev/null +++ b/Documentation/devicetree/bindings/arm/spear.txt | |||
@@ -0,0 +1,8 @@ | |||
1 | ST SPEAr Platforms Device Tree Bindings | ||
2 | --------------------------------------- | ||
3 | |||
4 | Boards with the ST SPEAr600 SoC shall have the following properties: | ||
5 | |||
6 | Required root node property: | ||
7 | |||
8 | compatible = "st,spear600"; | ||
diff --git a/Documentation/devicetree/bindings/arm/tegra/emc.txt b/Documentation/devicetree/bindings/arm/tegra/emc.txt new file mode 100644 index 000000000000..09335f8eee00 --- /dev/null +++ b/Documentation/devicetree/bindings/arm/tegra/emc.txt | |||
@@ -0,0 +1,100 @@ | |||
1 | Embedded Memory Controller | ||
2 | |||
3 | Properties: | ||
4 | - name : Should be emc | ||
5 | - #address-cells : Should be 1 | ||
6 | - #size-cells : Should be 0 | ||
7 | - compatible : Should contain "nvidia,tegra20-emc". | ||
8 | - reg : Offset and length of the register set for the device | ||
9 | - nvidia,use-ram-code : If present, the sub-nodes will be addressed | ||
10 | and chosen using the ramcode board selector. If omitted, only one | ||
11 | set of tables can be present and said tables will be used | ||
12 | irrespective of ram-code configuration. | ||
13 | |||
14 | Child device nodes describe the memory settings for different configurations and clock rates. | ||
15 | |||
16 | Example: | ||
17 | |||
18 | emc@7000f400 { | ||
19 | #address-cells = < 1 >; | ||
20 | #size-cells = < 0 >; | ||
21 | compatible = "nvidia,tegra20-emc"; | ||
22 | reg = <0x7000f4000 0x200>; | ||
23 | } | ||
24 | |||
25 | |||
26 | Embedded Memory Controller ram-code table | ||
27 | |||
28 | If the emc node has the nvidia,use-ram-code property present, then the | ||
29 | next level of nodes below the emc table are used to specify which settings | ||
30 | apply for which ram-code settings. | ||
31 | |||
32 | If the emc node lacks the nvidia,use-ram-code property, this level is omitted | ||
33 | and the tables are stored directly under the emc node (see below). | ||
34 | |||
35 | Properties: | ||
36 | |||
37 | - name : Should be emc-tables | ||
38 | - nvidia,ram-code : the binary representation of the ram-code board strappings | ||
39 | for which this node (and children) are valid. | ||
40 | |||
41 | |||
42 | |||
43 | Embedded Memory Controller configuration table | ||
44 | |||
45 | This is a table containing the EMC register settings for the various | ||
46 | operating speeds of the memory controller. They are always located as | ||
47 | subnodes of the emc controller node. | ||
48 | |||
49 | There are two ways of specifying which tables to use: | ||
50 | |||
51 | * The simplest is if there is just one set of tables in the device tree, | ||
52 | and they will always be used (based on which frequency is used). | ||
53 | This is the preferred method, especially when firmware can fill in | ||
54 | this information based on the specific system information and just | ||
55 | pass it on to the kernel. | ||
56 | |||
57 | * The slightly more complex one is when more than one memory configuration | ||
58 | might exist on the system. The Tegra20 platform handles this during | ||
59 | early boot by selecting one out of possible 4 memory settings based | ||
60 | on a 2-pin "ram code" bootstrap setting on the board. The values of | ||
61 | these strappings can be read through a register in the SoC, and thus | ||
62 | used to select which tables to use. | ||
63 | |||
64 | Properties: | ||
65 | - name : Should be emc-table | ||
66 | - compatible : Should contain "nvidia,tegra20-emc-table". | ||
67 | - reg : either an opaque enumerator to tell different tables apart, or | ||
68 | the valid frequency for which the table should be used (in kHz). | ||
69 | - clock-frequency : the clock frequency for the EMC at which this | ||
70 | table should be used (in kHz). | ||
71 | - nvidia,emc-registers : a 46 word array of EMC registers to be programmed | ||
72 | for operation at the 'clock-frequency' setting. | ||
73 | The order and contents of the registers are: | ||
74 | RC, RFC, RAS, RP, R2W, W2R, R2P, W2P, RD_RCD, WR_RCD, RRD, REXT, | ||
75 | WDV, QUSE, QRST, QSAFE, RDV, REFRESH, BURST_REFRESH_NUM, PDEX2WR, | ||
76 | PDEX2RD, PCHG2PDEN, ACT2PDEN, AR2PDEN, RW2PDEN, TXSR, TCKE, TFAW, | ||
77 | TRPAB, TCLKSTABLE, TCLKSTOP, TREFBW, QUSE_EXTRA, FBIO_CFG6, ODT_WRITE, | ||
78 | ODT_READ, FBIO_CFG5, CFG_DIG_DLL, DLL_XFORM_DQS, DLL_XFORM_QUSE, | ||
79 | ZCAL_REF_CNT, ZCAL_WAIT_CNT, AUTO_CAL_INTERVAL, CFG_CLKTRIM_0, | ||
80 | CFG_CLKTRIM_1, CFG_CLKTRIM_2 | ||
81 | |||
82 | emc-table@166000 { | ||
83 | reg = <166000>; | ||
84 | compatible = "nvidia,tegra20-emc-table"; | ||
85 | clock-frequency = < 166000 >; | ||
86 | nvidia,emc-registers = < 0 0 0 0 0 0 0 0 0 0 0 0 0 0 | ||
87 | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 | ||
88 | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 | ||
89 | 0 0 0 0 >; | ||
90 | }; | ||
91 | |||
92 | emc-table@333000 { | ||
93 | reg = <333000>; | ||
94 | compatible = "nvidia,tegra20-emc-table"; | ||
95 | clock-frequency = < 333000 >; | ||
96 | nvidia,emc-registers = < 0 0 0 0 0 0 0 0 0 0 0 0 0 0 | ||
97 | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 | ||
98 | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 | ||
99 | 0 0 0 0 >; | ||
100 | }; | ||
diff --git a/Documentation/devicetree/bindings/arm/tegra/nvidia,tegra20-pmc.txt b/Documentation/devicetree/bindings/arm/tegra/nvidia,tegra20-pmc.txt new file mode 100644 index 000000000000..b5846e21cc2e --- /dev/null +++ b/Documentation/devicetree/bindings/arm/tegra/nvidia,tegra20-pmc.txt | |||
@@ -0,0 +1,19 @@ | |||
1 | NVIDIA Tegra Power Management Controller (PMC) | ||
2 | |||
3 | Properties: | ||
4 | - name : Should be pmc | ||
5 | - compatible : Should contain "nvidia,tegra<chip>-pmc". | ||
6 | - reg : Offset and length of the register set for the device | ||
7 | - nvidia,invert-interrupt : If present, inverts the PMU interrupt signal. | ||
8 | The PMU is an external Power Management Unit, whose interrupt output | ||
9 | signal is fed into the PMC. This signal is optionally inverted, and then | ||
10 | fed into the ARM GIC. The PMC is not involved in the detection or | ||
11 | handling of this interrupt signal, merely its inversion. | ||
12 | |||
13 | Example: | ||
14 | |||
15 | pmc@7000f400 { | ||
16 | compatible = "nvidia,tegra20-pmc"; | ||
17 | reg = <0x7000e400 0x400>; | ||
18 | nvidia,invert-interrupt; | ||
19 | }; | ||
diff --git a/Documentation/devicetree/bindings/arm/twd.txt b/Documentation/devicetree/bindings/arm/twd.txt new file mode 100644 index 000000000000..75b8610939fa --- /dev/null +++ b/Documentation/devicetree/bindings/arm/twd.txt | |||
@@ -0,0 +1,48 @@ | |||
1 | * ARM Timer Watchdog | ||
2 | |||
3 | ARM 11MP, Cortex-A5 and Cortex-A9 are often associated with a per-core | ||
4 | Timer-Watchdog (aka TWD), which provides both a per-cpu local timer | ||
5 | and watchdog. | ||
6 | |||
7 | The TWD is usually attached to a GIC to deliver its two per-processor | ||
8 | interrupts. | ||
9 | |||
10 | ** Timer node required properties: | ||
11 | |||
12 | - compatible : Should be one of: | ||
13 | "arm,cortex-a9-twd-timer" | ||
14 | "arm,cortex-a5-twd-timer" | ||
15 | "arm,arm11mp-twd-timer" | ||
16 | |||
17 | - interrupts : One interrupt to each core | ||
18 | |||
19 | - reg : Specify the base address and the size of the TWD timer | ||
20 | register window. | ||
21 | |||
22 | Example: | ||
23 | |||
24 | twd-timer@2c000600 { | ||
25 | compatible = "arm,arm11mp-twd-timer""; | ||
26 | reg = <0x2c000600 0x20>; | ||
27 | interrupts = <1 13 0xf01>; | ||
28 | }; | ||
29 | |||
30 | ** Watchdog node properties: | ||
31 | |||
32 | - compatible : Should be one of: | ||
33 | "arm,cortex-a9-twd-wdt" | ||
34 | "arm,cortex-a5-twd-wdt" | ||
35 | "arm,arm11mp-twd-wdt" | ||
36 | |||
37 | - interrupts : One interrupt to each core | ||
38 | |||
39 | - reg : Specify the base address and the size of the TWD watchdog | ||
40 | register window. | ||
41 | |||
42 | Example: | ||
43 | |||
44 | twd-watchdog@2c000620 { | ||
45 | compatible = "arm,arm11mp-twd-wdt"; | ||
46 | reg = <0x2c000620 0x20>; | ||
47 | interrupts = <1 14 0xf01>; | ||
48 | }; | ||
diff --git a/Documentation/devicetree/bindings/arm/vexpress.txt b/Documentation/devicetree/bindings/arm/vexpress.txt new file mode 100644 index 000000000000..ec8b50cbb2e8 --- /dev/null +++ b/Documentation/devicetree/bindings/arm/vexpress.txt | |||
@@ -0,0 +1,146 @@ | |||
1 | ARM Versatile Express boards family | ||
2 | ----------------------------------- | ||
3 | |||
4 | ARM's Versatile Express platform consists of a motherboard and one | ||
5 | or more daughterboards (tiles). The motherboard provides a set of | ||
6 | peripherals. Processor and RAM "live" on the tiles. | ||
7 | |||
8 | The motherboard and each core tile should be described by a separate | ||
9 | Device Tree source file, with the tile's description including | ||
10 | the motherboard file using a /include/ directive. As the motherboard | ||
11 | can be initialized in one of two different configurations ("memory | ||
12 | maps"), care must be taken to include the correct one. | ||
13 | |||
14 | Required properties in the root node: | ||
15 | - compatible value: | ||
16 | compatible = "arm,vexpress,<model>", "arm,vexpress"; | ||
17 | where <model> is the full tile model name (as used in the tile's | ||
18 | Technical Reference Manual), eg.: | ||
19 | - for Coretile Express A5x2 (V2P-CA5s): | ||
20 | compatible = "arm,vexpress,v2p-ca5s", "arm,vexpress"; | ||
21 | - for Coretile Express A9x4 (V2P-CA9): | ||
22 | compatible = "arm,vexpress,v2p-ca9", "arm,vexpress"; | ||
23 | If a tile comes in several variants or can be used in more then one | ||
24 | configuration, the compatible value should be: | ||
25 | compatible = "arm,vexpress,<model>,<variant>", \ | ||
26 | "arm,vexpress,<model>", "arm,vexpress"; | ||
27 | eg: | ||
28 | - Coretile Express A15x2 (V2P-CA15) with Tech Chip 1: | ||
29 | compatible = "arm,vexpress,v2p-ca15,tc1", \ | ||
30 | "arm,vexpress,v2p-ca15", "arm,vexpress"; | ||
31 | - LogicTile Express 13MG (V2F-2XV6) running Cortex-A7 (3 cores) SMM: | ||
32 | compatible = "arm,vexpress,v2f-2xv6,ca7x3", \ | ||
33 | "arm,vexpress,v2f-2xv6", "arm,vexpress"; | ||
34 | |||
35 | Optional properties in the root node: | ||
36 | - tile model name (use name from the tile's Technical Reference | ||
37 | Manual, eg. "V2P-CA5s") | ||
38 | model = "<model>"; | ||
39 | - tile's HBI number (unique ARM's board model ID, visible on the | ||
40 | PCB's silkscreen) in hexadecimal transcription: | ||
41 | arm,hbi = <0xhbi> | ||
42 | eg: | ||
43 | - for Coretile Express A5x2 (V2P-CA5s) HBI-0191: | ||
44 | arm,hbi = <0x191>; | ||
45 | - Coretile Express A9x4 (V2P-CA9) HBI-0225: | ||
46 | arm,hbi = <0x225>; | ||
47 | |||
48 | Top-level standard "cpus" node is required. It must contain a node | ||
49 | with device_type = "cpu" property for every available core, eg.: | ||
50 | |||
51 | cpus { | ||
52 | #address-cells = <1>; | ||
53 | #size-cells = <0>; | ||
54 | |||
55 | cpu@0 { | ||
56 | device_type = "cpu"; | ||
57 | compatible = "arm,cortex-a5"; | ||
58 | reg = <0>; | ||
59 | }; | ||
60 | }; | ||
61 | |||
62 | The motherboard description file provides a single "motherboard" node | ||
63 | using 2 address cells corresponding to the Static Memory Bus used | ||
64 | between the motherboard and the tile. The first cell defines the Chip | ||
65 | Select (CS) line number, the second cell address offset within the CS. | ||
66 | All interrupt lines between the motherboard and the tile are active | ||
67 | high and are described using single cell. | ||
68 | |||
69 | Optional properties of the "motherboard" node: | ||
70 | - motherboard's memory map variant: | ||
71 | arm,v2m-memory-map = "<name>"; | ||
72 | where name is one of: | ||
73 | - "rs1" - for RS1 map (i.a. peripherals on CS3); this map is also | ||
74 | referred to as "ARM Cortex-A Series memory map": | ||
75 | arm,v2m-memory-map = "rs1"; | ||
76 | When this property is missing, the motherboard is using the original | ||
77 | memory map (also known as the "Legacy memory map", primarily used | ||
78 | with the original CoreTile Express A9x4) with peripherals on CS7. | ||
79 | |||
80 | Motherboard .dtsi files provide a set of labelled peripherals that | ||
81 | can be used to obtain required phandle in the tile's "aliases" node: | ||
82 | - UARTs, note that the numbers correspond to the physical connectors | ||
83 | on the motherboard's back panel: | ||
84 | v2m_serial0, v2m_serial1, v2m_serial2 and v2m_serial3 | ||
85 | - I2C controllers: | ||
86 | v2m_i2c_dvi and v2m_i2c_pcie | ||
87 | - SP804 timers: | ||
88 | v2m_timer01 and v2m_timer23 | ||
89 | |||
90 | Current Linux implementation requires a "arm,v2m_timer" alias | ||
91 | pointing at one of the motherboard's SP804 timers, if it is to be | ||
92 | used as the system timer. This alias should be defined in the | ||
93 | motherboard files. | ||
94 | |||
95 | The tile description must define "ranges", "interrupt-map-mask" and | ||
96 | "interrupt-map" properties to translate the motherboard's address | ||
97 | and interrupt space into one used by the tile's processor. | ||
98 | |||
99 | Abbreviated example: | ||
100 | |||
101 | /dts-v1/; | ||
102 | |||
103 | / { | ||
104 | model = "V2P-CA5s"; | ||
105 | arm,hbi = <0x225>; | ||
106 | compatible = "arm,vexpress-v2p-ca5s", "arm,vexpress"; | ||
107 | interrupt-parent = <&gic>; | ||
108 | #address-cells = <1>; | ||
109 | #size-cells = <1>; | ||
110 | |||
111 | chosen { }; | ||
112 | |||
113 | aliases { | ||
114 | serial0 = &v2m_serial0; | ||
115 | }; | ||
116 | |||
117 | cpus { | ||
118 | #address-cells = <1>; | ||
119 | #size-cells = <0>; | ||
120 | |||
121 | cpu@0 { | ||
122 | device_type = "cpu"; | ||
123 | compatible = "arm,cortex-a5"; | ||
124 | reg = <0>; | ||
125 | }; | ||
126 | }; | ||
127 | |||
128 | gic: interrupt-controller@2c001000 { | ||
129 | compatible = "arm,cortex-a9-gic"; | ||
130 | #interrupt-cells = <3>; | ||
131 | #address-cells = <0>; | ||
132 | interrupt-controller; | ||
133 | reg = <0x2c001000 0x1000>, | ||
134 | <0x2c000100 0x100>; | ||
135 | }; | ||
136 | |||
137 | motherboard { | ||
138 | /* CS0 is visible at 0x08000000 */ | ||
139 | ranges = <0 0 0x08000000 0x04000000>; | ||
140 | interrupt-map-mask = <0 0 63>; | ||
141 | /* Active high IRQ 0 is connected to GIC's SPI0 */ | ||
142 | interrupt-map = <0 0 0 &gic 0 0 4>; | ||
143 | }; | ||
144 | }; | ||
145 | |||
146 | /include/ "vexpress-v2m-rs1.dtsi" | ||
diff --git a/Documentation/devicetree/bindings/dma/tegra20-apbdma.txt b/Documentation/devicetree/bindings/dma/tegra20-apbdma.txt new file mode 100644 index 000000000000..90fa7da525b8 --- /dev/null +++ b/Documentation/devicetree/bindings/dma/tegra20-apbdma.txt | |||
@@ -0,0 +1,30 @@ | |||
1 | * NVIDIA Tegra APB DMA controller | ||
2 | |||
3 | Required properties: | ||
4 | - compatible: Should be "nvidia,<chip>-apbdma" | ||
5 | - reg: Should contain DMA registers location and length. This shuld include | ||
6 | all of the per-channel registers. | ||
7 | - interrupts: Should contain all of the per-channel DMA interrupts. | ||
8 | |||
9 | Examples: | ||
10 | |||
11 | apbdma: dma@6000a000 { | ||
12 | compatible = "nvidia,tegra20-apbdma"; | ||
13 | reg = <0x6000a000 0x1200>; | ||
14 | interrupts = < 0 136 0x04 | ||
15 | 0 137 0x04 | ||
16 | 0 138 0x04 | ||
17 | 0 139 0x04 | ||
18 | 0 140 0x04 | ||
19 | 0 141 0x04 | ||
20 | 0 142 0x04 | ||
21 | 0 143 0x04 | ||
22 | 0 144 0x04 | ||
23 | 0 145 0x04 | ||
24 | 0 146 0x04 | ||
25 | 0 147 0x04 | ||
26 | 0 148 0x04 | ||
27 | 0 149 0x04 | ||
28 | 0 150 0x04 | ||
29 | 0 151 0x04 >; | ||
30 | }; | ||
diff --git a/Documentation/devicetree/bindings/gpio/gpio-omap.txt b/Documentation/devicetree/bindings/gpio/gpio-omap.txt new file mode 100644 index 000000000000..bff51a2fee1e --- /dev/null +++ b/Documentation/devicetree/bindings/gpio/gpio-omap.txt | |||
@@ -0,0 +1,36 @@ | |||
1 | OMAP GPIO controller bindings | ||
2 | |||
3 | Required properties: | ||
4 | - compatible: | ||
5 | - "ti,omap2-gpio" for OMAP2 controllers | ||
6 | - "ti,omap3-gpio" for OMAP3 controllers | ||
7 | - "ti,omap4-gpio" for OMAP4 controllers | ||
8 | - #gpio-cells : Should be two. | ||
9 | - first cell is the pin number | ||
10 | - second cell is used to specify optional parameters (unused) | ||
11 | - gpio-controller : Marks the device node as a GPIO controller. | ||
12 | - #interrupt-cells : Should be 2. | ||
13 | - interrupt-controller: Mark the device node as an interrupt controller | ||
14 | The first cell is the GPIO number. | ||
15 | The second cell is used to specify flags: | ||
16 | bits[3:0] trigger type and level flags: | ||
17 | 1 = low-to-high edge triggered. | ||
18 | 2 = high-to-low edge triggered. | ||
19 | 4 = active high level-sensitive. | ||
20 | 8 = active low level-sensitive. | ||
21 | |||
22 | OMAP specific properties: | ||
23 | - ti,hwmods: Name of the hwmod associated to the GPIO: | ||
24 | "gpio<X>", <X> being the 1-based instance number from the HW spec | ||
25 | |||
26 | |||
27 | Example: | ||
28 | |||
29 | gpio4: gpio4 { | ||
30 | compatible = "ti,omap4-gpio"; | ||
31 | ti,hwmods = "gpio4"; | ||
32 | #gpio-cells = <2>; | ||
33 | gpio-controller; | ||
34 | #interrupt-cells = <2>; | ||
35 | interrupt-controller; | ||
36 | }; | ||
diff --git a/Documentation/devicetree/bindings/gpio/gpio-twl4030.txt b/Documentation/devicetree/bindings/gpio/gpio-twl4030.txt new file mode 100644 index 000000000000..16695d9cf1e8 --- /dev/null +++ b/Documentation/devicetree/bindings/gpio/gpio-twl4030.txt | |||
@@ -0,0 +1,23 @@ | |||
1 | twl4030 GPIO controller bindings | ||
2 | |||
3 | Required properties: | ||
4 | - compatible: | ||
5 | - "ti,twl4030-gpio" for twl4030 GPIO controller | ||
6 | - #gpio-cells : Should be two. | ||
7 | - first cell is the pin number | ||
8 | - second cell is used to specify optional parameters (unused) | ||
9 | - gpio-controller : Marks the device node as a GPIO controller. | ||
10 | - #interrupt-cells : Should be 2. | ||
11 | - interrupt-controller: Mark the device node as an interrupt controller | ||
12 | The first cell is the GPIO number. | ||
13 | The second cell is not used. | ||
14 | |||
15 | Example: | ||
16 | |||
17 | twl_gpio: gpio { | ||
18 | compatible = "ti,twl4030-gpio"; | ||
19 | #gpio-cells = <2>; | ||
20 | gpio-controller; | ||
21 | #interrupt-cells = <2>; | ||
22 | interrupt-controller; | ||
23 | }; | ||
diff --git a/Documentation/devicetree/bindings/gpio/gpio_atmel.txt b/Documentation/devicetree/bindings/gpio/gpio_atmel.txt new file mode 100644 index 000000000000..66efc804806a --- /dev/null +++ b/Documentation/devicetree/bindings/gpio/gpio_atmel.txt | |||
@@ -0,0 +1,20 @@ | |||
1 | * Atmel GPIO controller (PIO) | ||
2 | |||
3 | Required properties: | ||
4 | - compatible: "atmel,<chip>-gpio", where <chip> is at91rm9200 or at91sam9x5. | ||
5 | - reg: Should contain GPIO controller registers location and length | ||
6 | - interrupts: Should be the port interrupt shared by all the pins. | ||
7 | - #gpio-cells: Should be two. The first cell is the pin number and | ||
8 | the second cell is used to specify optional parameters (currently | ||
9 | unused). | ||
10 | - gpio-controller: Marks the device node as a GPIO controller. | ||
11 | |||
12 | Example: | ||
13 | pioA: gpio@fffff200 { | ||
14 | compatible = "atmel,at91rm9200-gpio"; | ||
15 | reg = <0xfffff200 0x100>; | ||
16 | interrupts = <2 4>; | ||
17 | #gpio-cells = <2>; | ||
18 | gpio-controller; | ||
19 | }; | ||
20 | |||
diff --git a/Documentation/devicetree/bindings/gpio/gpio_i2c.txt b/Documentation/devicetree/bindings/gpio/gpio_i2c.txt new file mode 100644 index 000000000000..4f8ec947c6bd --- /dev/null +++ b/Documentation/devicetree/bindings/gpio/gpio_i2c.txt | |||
@@ -0,0 +1,32 @@ | |||
1 | Device-Tree bindings for i2c gpio driver | ||
2 | |||
3 | Required properties: | ||
4 | - compatible = "i2c-gpio"; | ||
5 | - gpios: sda and scl gpio | ||
6 | |||
7 | |||
8 | Optional properties: | ||
9 | - i2c-gpio,sda-open-drain: sda as open drain | ||
10 | - i2c-gpio,scl-open-drain: scl as open drain | ||
11 | - i2c-gpio,scl-output-only: scl as output only | ||
12 | - i2c-gpio,delay-us: delay between GPIO operations (may depend on each platform) | ||
13 | - i2c-gpio,timeout-ms: timeout to get data | ||
14 | |||
15 | Example nodes: | ||
16 | |||
17 | i2c@0 { | ||
18 | compatible = "i2c-gpio"; | ||
19 | gpios = <&pioA 23 0 /* sda */ | ||
20 | &pioA 24 0 /* scl */ | ||
21 | >; | ||
22 | i2c-gpio,sda-open-drain; | ||
23 | i2c-gpio,scl-open-drain; | ||
24 | i2c-gpio,delay-us = <2>; /* ~100 kHz */ | ||
25 | #address-cells = <1>; | ||
26 | #size-cells = <0>; | ||
27 | |||
28 | rv3029c2@56 { | ||
29 | compatible = "rv3029c2"; | ||
30 | reg = <0x56>; | ||
31 | }; | ||
32 | }; | ||
diff --git a/Documentation/devicetree/bindings/gpio/gpio_nvidia.txt b/Documentation/devicetree/bindings/gpio/gpio_nvidia.txt index eb4b530d64e1..023c9526e5f8 100644 --- a/Documentation/devicetree/bindings/gpio/gpio_nvidia.txt +++ b/Documentation/devicetree/bindings/gpio/gpio_nvidia.txt | |||
@@ -1,8 +1,40 @@ | |||
1 | NVIDIA Tegra 2 GPIO controller | 1 | NVIDIA Tegra GPIO controller |
2 | 2 | ||
3 | Required properties: | 3 | Required properties: |
4 | - compatible : "nvidia,tegra20-gpio" | 4 | - compatible : "nvidia,tegra<chip>-gpio" |
5 | - reg : Physical base address and length of the controller's registers. | ||
6 | - interrupts : The interrupt outputs from the controller. For Tegra20, | ||
7 | there should be 7 interrupts specified, and for Tegra30, there should | ||
8 | be 8 interrupts specified. | ||
5 | - #gpio-cells : Should be two. The first cell is the pin number and the | 9 | - #gpio-cells : Should be two. The first cell is the pin number and the |
6 | second cell is used to specify optional parameters: | 10 | second cell is used to specify optional parameters: |
7 | - bit 0 specifies polarity (0 for normal, 1 for inverted) | 11 | - bit 0 specifies polarity (0 for normal, 1 for inverted) |
8 | - gpio-controller : Marks the device node as a GPIO controller. | 12 | - gpio-controller : Marks the device node as a GPIO controller. |
13 | - #interrupt-cells : Should be 2. | ||
14 | The first cell is the GPIO number. | ||
15 | The second cell is used to specify flags: | ||
16 | bits[3:0] trigger type and level flags: | ||
17 | 1 = low-to-high edge triggered. | ||
18 | 2 = high-to-low edge triggered. | ||
19 | 4 = active high level-sensitive. | ||
20 | 8 = active low level-sensitive. | ||
21 | Valid combinations are 1, 2, 3, 4, 8. | ||
22 | - interrupt-controller : Marks the device node as an interrupt controller. | ||
23 | |||
24 | Example: | ||
25 | |||
26 | gpio: gpio@6000d000 { | ||
27 | compatible = "nvidia,tegra20-gpio"; | ||
28 | reg = < 0x6000d000 0x1000 >; | ||
29 | interrupts = < 0 32 0x04 | ||
30 | 0 33 0x04 | ||
31 | 0 34 0x04 | ||
32 | 0 35 0x04 | ||
33 | 0 55 0x04 | ||
34 | 0 87 0x04 | ||
35 | 0 89 0x04 >; | ||
36 | #gpio-cells = <2>; | ||
37 | gpio-controller; | ||
38 | #interrupt-cells = <2>; | ||
39 | interrupt-controller; | ||
40 | }; | ||
diff --git a/Documentation/devicetree/bindings/gpio/led.txt b/Documentation/devicetree/bindings/gpio/led.txt index 141087cf3107..fd2bd56e7195 100644 --- a/Documentation/devicetree/bindings/gpio/led.txt +++ b/Documentation/devicetree/bindings/gpio/led.txt | |||
@@ -7,9 +7,9 @@ Each LED is represented as a sub-node of the gpio-leds device. Each | |||
7 | node's name represents the name of the corresponding LED. | 7 | node's name represents the name of the corresponding LED. |
8 | 8 | ||
9 | LED sub-node properties: | 9 | LED sub-node properties: |
10 | - gpios : Should specify the LED's GPIO, see "Specifying GPIO information | 10 | - gpios : Should specify the LED's GPIO, see "gpios property" in |
11 | for devices" in Documentation/devicetree/booting-without-of.txt. Active | 11 | Documentation/devicetree/gpio.txt. Active low LEDs should be |
12 | low LEDs should be indicated using flags in the GPIO specifier. | 12 | indicated using flags in the GPIO specifier. |
13 | - label : (optional) The label for this LED. If omitted, the label is | 13 | - label : (optional) The label for this LED. If omitted, the label is |
14 | taken from the node name (excluding the unit address). | 14 | taken from the node name (excluding the unit address). |
15 | - linux,default-trigger : (optional) This parameter, if present, is a | 15 | - linux,default-trigger : (optional) This parameter, if present, is a |
diff --git a/Documentation/devicetree/bindings/gpio/mrvl-gpio.txt b/Documentation/devicetree/bindings/gpio/mrvl-gpio.txt new file mode 100644 index 000000000000..1e34cfe5ebea --- /dev/null +++ b/Documentation/devicetree/bindings/gpio/mrvl-gpio.txt | |||
@@ -0,0 +1,23 @@ | |||
1 | * Marvell PXA GPIO controller | ||
2 | |||
3 | Required properties: | ||
4 | - compatible : Should be "mrvl,pxa-gpio" or "mrvl,mmp-gpio" | ||
5 | - reg : Address and length of the register set for the device | ||
6 | - interrupts : Should be the port interrupt shared by all gpio pins, if | ||
7 | - interrupt-name : Should be the name of irq resource. | ||
8 | one number. | ||
9 | - gpio-controller : Marks the device node as a gpio controller. | ||
10 | - #gpio-cells : Should be one. It is the pin number. | ||
11 | |||
12 | Example: | ||
13 | |||
14 | gpio: gpio@d4019000 { | ||
15 | compatible = "mrvl,mmp-gpio", "mrvl,pxa-gpio"; | ||
16 | reg = <0xd4019000 0x1000>; | ||
17 | interrupts = <49>, <17>, <18>; | ||
18 | interrupt-name = "gpio_mux", "gpio0", "gpio1"; | ||
19 | gpio-controller; | ||
20 | #gpio-cells = <1>; | ||
21 | interrupt-controller; | ||
22 | #interrupt-cells = <1>; | ||
23 | }; | ||
diff --git a/Documentation/devicetree/bindings/gpio/sodaville.txt b/Documentation/devicetree/bindings/gpio/sodaville.txt new file mode 100644 index 000000000000..563eff22b975 --- /dev/null +++ b/Documentation/devicetree/bindings/gpio/sodaville.txt | |||
@@ -0,0 +1,48 @@ | |||
1 | GPIO controller on CE4100 / Sodaville SoCs | ||
2 | ========================================== | ||
3 | |||
4 | The bindings for CE4100's GPIO controller match the generic description | ||
5 | which is covered by the gpio.txt file in this folder. | ||
6 | |||
7 | The only additional property is the intel,muxctl property which holds the | ||
8 | value which is written into the MUXCNTL register. | ||
9 | |||
10 | There is no compatible property for now because the driver is probed via | ||
11 | PCI id (vendor 0x8086 device 0x2e67). | ||
12 | |||
13 | The interrupt specifier consists of two cells encoded as follows: | ||
14 | - <1st cell>: The interrupt-number that identifies the interrupt source. | ||
15 | - <2nd cell>: The level-sense information, encoded as follows: | ||
16 | 4 - active high level-sensitive | ||
17 | 8 - active low level-sensitive | ||
18 | |||
19 | Example of the GPIO device and one user: | ||
20 | |||
21 | pcigpio: gpio@b,1 { | ||
22 | /* two cells for GPIO and interrupt */ | ||
23 | #gpio-cells = <2>; | ||
24 | #interrupt-cells = <2>; | ||
25 | compatible = "pci8086,2e67.2", | ||
26 | "pci8086,2e67", | ||
27 | "pciclassff0000", | ||
28 | "pciclassff00"; | ||
29 | |||
30 | reg = <0x15900 0x0 0x0 0x0 0x0>; | ||
31 | /* Interrupt line of the gpio device */ | ||
32 | interrupts = <15 1>; | ||
33 | /* It is an interrupt and GPIO controller itself */ | ||
34 | interrupt-controller; | ||
35 | gpio-controller; | ||
36 | intel,muxctl = <0>; | ||
37 | }; | ||
38 | |||
39 | testuser@20 { | ||
40 | compatible = "example,testuser"; | ||
41 | /* User the 11th GPIO line as an active high triggered | ||
42 | * level interrupt | ||
43 | */ | ||
44 | interrupts = <11 8>; | ||
45 | interrupt-parent = <&pcigpio>; | ||
46 | /* Use this GPIO also with the gpio functions */ | ||
47 | gpios = <&pcigpio 11 0>; | ||
48 | }; | ||
diff --git a/Documentation/devicetree/bindings/i2c/mrvl-i2c.txt b/Documentation/devicetree/bindings/i2c/mrvl-i2c.txt new file mode 100644 index 000000000000..071eb3caae91 --- /dev/null +++ b/Documentation/devicetree/bindings/i2c/mrvl-i2c.txt | |||
@@ -0,0 +1,37 @@ | |||
1 | * I2C | ||
2 | |||
3 | Required properties : | ||
4 | |||
5 | - reg : Offset and length of the register set for the device | ||
6 | - compatible : should be "mrvl,mmp-twsi" where CHIP is the name of a | ||
7 | compatible processor, e.g. pxa168, pxa910, mmp2, mmp3. | ||
8 | For the pxa2xx/pxa3xx, an additional node "mrvl,pxa-i2c" is required | ||
9 | as shown in the example below. | ||
10 | |||
11 | Recommended properties : | ||
12 | |||
13 | - interrupts : <a b> where a is the interrupt number and b is a | ||
14 | field that represents an encoding of the sense and level | ||
15 | information for the interrupt. This should be encoded based on | ||
16 | the information in section 2) depending on the type of interrupt | ||
17 | controller you have. | ||
18 | - interrupt-parent : the phandle for the interrupt controller that | ||
19 | services interrupts for this device. | ||
20 | - mrvl,i2c-polling : Disable interrupt of i2c controller. Polling | ||
21 | status register of i2c controller instead. | ||
22 | - mrvl,i2c-fast-mode : Enable fast mode of i2c controller. | ||
23 | |||
24 | Examples: | ||
25 | twsi1: i2c@d4011000 { | ||
26 | compatible = "mrvl,mmp-twsi", "mrvl,pxa-i2c"; | ||
27 | reg = <0xd4011000 0x1000>; | ||
28 | interrupts = <7>; | ||
29 | mrvl,i2c-fast-mode; | ||
30 | }; | ||
31 | |||
32 | twsi2: i2c@d4025000 { | ||
33 | compatible = "mrvl,mmp-twsi", "mrvl,pxa-i2c"; | ||
34 | reg = <0xd4025000 0x1000>; | ||
35 | interrupts = <58>; | ||
36 | }; | ||
37 | |||
diff --git a/Documentation/devicetree/bindings/i2c/sirf-i2c.txt b/Documentation/devicetree/bindings/i2c/sirf-i2c.txt new file mode 100644 index 000000000000..7baf9e133fa8 --- /dev/null +++ b/Documentation/devicetree/bindings/i2c/sirf-i2c.txt | |||
@@ -0,0 +1,19 @@ | |||
1 | I2C for SiRFprimaII platforms | ||
2 | |||
3 | Required properties : | ||
4 | - compatible : Must be "sirf,prima2-i2c" | ||
5 | - reg: physical base address of the controller and length of memory mapped | ||
6 | region. | ||
7 | - interrupts: interrupt number to the cpu. | ||
8 | |||
9 | Optional properties: | ||
10 | - clock-frequency : Constains desired I2C/HS-I2C bus clock frequency in Hz. | ||
11 | The absence of the propoerty indicates the default frequency 100 kHz. | ||
12 | |||
13 | Examples : | ||
14 | |||
15 | i2c0: i2c@b00e0000 { | ||
16 | compatible = "sirf,prima2-i2c"; | ||
17 | reg = <0xb00e0000 0x10000>; | ||
18 | interrupts = <24>; | ||
19 | }; | ||
diff --git a/Documentation/devicetree/bindings/input/matrix-keymap.txt b/Documentation/devicetree/bindings/input/matrix-keymap.txt new file mode 100644 index 000000000000..3cd8b98ccd2d --- /dev/null +++ b/Documentation/devicetree/bindings/input/matrix-keymap.txt | |||
@@ -0,0 +1,19 @@ | |||
1 | A simple common binding for matrix-connected key boards. Currently targeted at | ||
2 | defining the keys in the scope of linux key codes since that is a stable and | ||
3 | standardized interface at this time. | ||
4 | |||
5 | Required properties: | ||
6 | - linux,keymap: an array of packed 1-cell entries containing the equivalent | ||
7 | of row, column and linux key-code. The 32-bit big endian cell is packed | ||
8 | as: | ||
9 | row << 24 | column << 16 | key-code | ||
10 | |||
11 | Optional properties: | ||
12 | Some users of this binding might choose to specify secondary keymaps for | ||
13 | cases where there is a modifier key such as a Fn key. Proposed names | ||
14 | for said properties are "linux,fn-keymap" or with another descriptive | ||
15 | word for the modifier other from "Fn". | ||
16 | |||
17 | Example: | ||
18 | linux,keymap = < 0x00030012 | ||
19 | 0x0102003a >; | ||
diff --git a/Documentation/devicetree/bindings/input/tegra-kbc.txt b/Documentation/devicetree/bindings/input/tegra-kbc.txt index 5ecfa99089b4..72683be6de35 100644 --- a/Documentation/devicetree/bindings/input/tegra-kbc.txt +++ b/Documentation/devicetree/bindings/input/tegra-kbc.txt | |||
@@ -3,16 +3,21 @@ | |||
3 | Required properties: | 3 | Required properties: |
4 | - compatible: "nvidia,tegra20-kbc" | 4 | - compatible: "nvidia,tegra20-kbc" |
5 | 5 | ||
6 | Optional properties: | 6 | Optional properties, in addition to those specified by the shared |
7 | - debounce-delay: delay in milliseconds per row scan for debouncing | 7 | matrix-keyboard bindings: |
8 | - repeat-delay: delay in milliseconds before repeat starts | 8 | |
9 | - ghost-filter: enable ghost filtering for this device | 9 | - linux,fn-keymap: a second keymap, same specification as the |
10 | - wakeup-source: configure keyboard as a wakeup source for suspend/resume | 10 | matrix-keyboard-controller spec but to be used when the KEY_FN modifier |
11 | key is pressed. | ||
12 | - nvidia,debounce-delay-ms: delay in milliseconds per row scan for debouncing | ||
13 | - nvidia,repeat-delay-ms: delay in milliseconds before repeat starts | ||
14 | - nvidia,ghost-filter: enable ghost filtering for this device | ||
15 | - nvidia,wakeup-source: configure keyboard as a wakeup source for suspend/resume | ||
11 | 16 | ||
12 | Example: | 17 | Example: |
13 | 18 | ||
14 | keyboard: keyboard { | 19 | keyboard: keyboard { |
15 | compatible = "nvidia,tegra20-kbc"; | 20 | compatible = "nvidia,tegra20-kbc"; |
16 | reg = <0x7000e200 0x100>; | 21 | reg = <0x7000e200 0x100>; |
17 | ghost-filter; | 22 | nvidia,ghost-filter; |
18 | }; | 23 | }; |
diff --git a/Documentation/devicetree/bindings/mmc/ti-omap-hsmmc.txt b/Documentation/devicetree/bindings/mmc/ti-omap-hsmmc.txt new file mode 100644 index 000000000000..dbd4368ab8cc --- /dev/null +++ b/Documentation/devicetree/bindings/mmc/ti-omap-hsmmc.txt | |||
@@ -0,0 +1,33 @@ | |||
1 | * TI Highspeed MMC host controller for OMAP | ||
2 | |||
3 | The Highspeed MMC Host Controller on TI OMAP family | ||
4 | provides an interface for MMC, SD, and SDIO types of memory cards. | ||
5 | |||
6 | Required properties: | ||
7 | - compatible: | ||
8 | Should be "ti,omap2-hsmmc", for OMAP2 controllers | ||
9 | Should be "ti,omap3-hsmmc", for OMAP3 controllers | ||
10 | Should be "ti,omap4-hsmmc", for OMAP4 controllers | ||
11 | - ti,hwmods: Must be "mmc<n>", n is controller instance starting 1 | ||
12 | - reg : should contain hsmmc registers location and length | ||
13 | |||
14 | Optional properties: | ||
15 | ti,dual-volt: boolean, supports dual voltage cards | ||
16 | <supply-name>-supply: phandle to the regulator device tree node | ||
17 | "supply-name" examples are "vmmc", "vmmc_aux" etc | ||
18 | ti,bus-width: Number of data lines, default assumed is 1 if the property is missing. | ||
19 | cd-gpios: GPIOs for card detection | ||
20 | wp-gpios: GPIOs for write protection | ||
21 | ti,non-removable: non-removable slot (like eMMC) | ||
22 | ti,needs-special-reset: Requires a special softreset sequence | ||
23 | |||
24 | Example: | ||
25 | mmc1: mmc@0x4809c000 { | ||
26 | compatible = "ti,omap4-hsmmc"; | ||
27 | reg = <0x4809c000 0x400>; | ||
28 | ti,hwmods = "mmc1"; | ||
29 | ti,dual-volt; | ||
30 | ti,bus-width = <4>; | ||
31 | vmmc-supply = <&vmmc>; /* phandle to regulator node */ | ||
32 | ti,non-removable; | ||
33 | }; | ||
diff --git a/Documentation/devicetree/bindings/mtd/arm-versatile.txt b/Documentation/devicetree/bindings/mtd/arm-versatile.txt index 476845db94d0..beace4b89daa 100644 --- a/Documentation/devicetree/bindings/mtd/arm-versatile.txt +++ b/Documentation/devicetree/bindings/mtd/arm-versatile.txt | |||
@@ -4,5 +4,5 @@ Required properties: | |||
4 | - compatible : must be "arm,versatile-flash"; | 4 | - compatible : must be "arm,versatile-flash"; |
5 | - bank-width : width in bytes of flash interface. | 5 | - bank-width : width in bytes of flash interface. |
6 | 6 | ||
7 | Optional properties: | 7 | The device tree may optionally contain sub-nodes describing partitions of the |
8 | - Subnode partition map from mtd flash binding | 8 | address space. See partition.txt for more detail. |
diff --git a/Documentation/devicetree/bindings/mtd/atmel-dataflash.txt b/Documentation/devicetree/bindings/mtd/atmel-dataflash.txt index ef66ddd01da0..1889a4db5b7c 100644 --- a/Documentation/devicetree/bindings/mtd/atmel-dataflash.txt +++ b/Documentation/devicetree/bindings/mtd/atmel-dataflash.txt | |||
@@ -3,6 +3,9 @@ | |||
3 | Required properties: | 3 | Required properties: |
4 | - compatible : "atmel,<model>", "atmel,<series>", "atmel,dataflash". | 4 | - compatible : "atmel,<model>", "atmel,<series>", "atmel,dataflash". |
5 | 5 | ||
6 | The device tree may optionally contain sub-nodes describing partitions of the | ||
7 | address space. See partition.txt for more detail. | ||
8 | |||
6 | Example: | 9 | Example: |
7 | 10 | ||
8 | flash@1 { | 11 | flash@1 { |
diff --git a/Documentation/devicetree/bindings/mtd/atmel-nand.txt b/Documentation/devicetree/bindings/mtd/atmel-nand.txt new file mode 100644 index 000000000000..a20069502f5a --- /dev/null +++ b/Documentation/devicetree/bindings/mtd/atmel-nand.txt | |||
@@ -0,0 +1,41 @@ | |||
1 | Atmel NAND flash | ||
2 | |||
3 | Required properties: | ||
4 | - compatible : "atmel,at91rm9200-nand". | ||
5 | - reg : should specify localbus address and size used for the chip, | ||
6 | and if availlable the ECC. | ||
7 | - atmel,nand-addr-offset : offset for the address latch. | ||
8 | - atmel,nand-cmd-offset : offset for the command latch. | ||
9 | - #address-cells, #size-cells : Must be present if the device has sub-nodes | ||
10 | representing partitions. | ||
11 | |||
12 | - gpios : specifies the gpio pins to control the NAND device. detect is an | ||
13 | optional gpio and may be set to 0 if not present. | ||
14 | |||
15 | Optional properties: | ||
16 | - nand-ecc-mode : String, operation mode of the NAND ecc mode, soft by default. | ||
17 | Supported values are: "none", "soft", "hw", "hw_syndrome", "hw_oob_first", | ||
18 | "soft_bch". | ||
19 | - nand-bus-width : 8 or 16 bus width if not present 8 | ||
20 | - nand-on-flash-bbt: boolean to enable on flash bbt option if not present false | ||
21 | |||
22 | Examples: | ||
23 | nand0: nand@40000000,0 { | ||
24 | compatible = "atmel,at91rm9200-nand"; | ||
25 | #address-cells = <1>; | ||
26 | #size-cells = <1>; | ||
27 | reg = <0x40000000 0x10000000 | ||
28 | 0xffffe800 0x200 | ||
29 | >; | ||
30 | atmel,nand-addr-offset = <21>; /* ale */ | ||
31 | atmel,nand-cmd-offset = <22>; /* cle */ | ||
32 | nand-on-flash-bbt; | ||
33 | nand-ecc-mode = "soft"; | ||
34 | gpios = <&pioC 13 0 /* rdy */ | ||
35 | &pioC 14 0 /* nce */ | ||
36 | 0 /* cd */ | ||
37 | >; | ||
38 | partition@0 { | ||
39 | ... | ||
40 | }; | ||
41 | }; | ||
diff --git a/Documentation/devicetree/bindings/mtd/fsl-upm-nand.txt b/Documentation/devicetree/bindings/mtd/fsl-upm-nand.txt index 00f1f546b32e..fce4894f5a98 100644 --- a/Documentation/devicetree/bindings/mtd/fsl-upm-nand.txt +++ b/Documentation/devicetree/bindings/mtd/fsl-upm-nand.txt | |||
@@ -19,6 +19,10 @@ Optional properties: | |||
19 | read registers (tR). Required if property "gpios" is not used | 19 | read registers (tR). Required if property "gpios" is not used |
20 | (R/B# pins not connected). | 20 | (R/B# pins not connected). |
21 | 21 | ||
22 | Each flash chip described may optionally contain additional sub-nodes | ||
23 | describing partitions of the address space. See partition.txt for more | ||
24 | detail. | ||
25 | |||
22 | Examples: | 26 | Examples: |
23 | 27 | ||
24 | upm@1,0 { | 28 | upm@1,0 { |
diff --git a/Documentation/devicetree/bindings/mtd/fsmc-nand.txt b/Documentation/devicetree/bindings/mtd/fsmc-nand.txt new file mode 100644 index 000000000000..e2c663b354d2 --- /dev/null +++ b/Documentation/devicetree/bindings/mtd/fsmc-nand.txt | |||
@@ -0,0 +1,33 @@ | |||
1 | * FSMC NAND | ||
2 | |||
3 | Required properties: | ||
4 | - compatible : "st,spear600-fsmc-nand" | ||
5 | - reg : Address range of the mtd chip | ||
6 | - reg-names: Should contain the reg names "fsmc_regs" and "nand_data" | ||
7 | - st,ale-off : Chip specific offset to ALE | ||
8 | - st,cle-off : Chip specific offset to CLE | ||
9 | |||
10 | Optional properties: | ||
11 | - bank-width : Width (in bytes) of the device. If not present, the width | ||
12 | defaults to 1 byte | ||
13 | - nand-skip-bbtscan: Indicates the the BBT scanning should be skipped | ||
14 | |||
15 | Example: | ||
16 | |||
17 | fsmc: flash@d1800000 { | ||
18 | compatible = "st,spear600-fsmc-nand"; | ||
19 | #address-cells = <1>; | ||
20 | #size-cells = <1>; | ||
21 | reg = <0xd1800000 0x1000 /* FSMC Register */ | ||
22 | 0xd2000000 0x4000>; /* NAND Base */ | ||
23 | reg-names = "fsmc_regs", "nand_data"; | ||
24 | st,ale-off = <0x20000>; | ||
25 | st,cle-off = <0x10000>; | ||
26 | |||
27 | bank-width = <1>; | ||
28 | nand-skip-bbtscan; | ||
29 | |||
30 | partition@0 { | ||
31 | ... | ||
32 | }; | ||
33 | }; | ||
diff --git a/Documentation/devicetree/bindings/mtd/gpio-control-nand.txt b/Documentation/devicetree/bindings/mtd/gpio-control-nand.txt index 719f4dc58df7..36ef07d3c90f 100644 --- a/Documentation/devicetree/bindings/mtd/gpio-control-nand.txt +++ b/Documentation/devicetree/bindings/mtd/gpio-control-nand.txt | |||
@@ -25,6 +25,9 @@ Optional properties: | |||
25 | GPIO state and before and after command byte writes, this register will be | 25 | GPIO state and before and after command byte writes, this register will be |
26 | read to ensure that the GPIO accesses have completed. | 26 | read to ensure that the GPIO accesses have completed. |
27 | 27 | ||
28 | The device tree may optionally contain sub-nodes describing partitions of the | ||
29 | address space. See partition.txt for more detail. | ||
30 | |||
28 | Examples: | 31 | Examples: |
29 | 32 | ||
30 | gpio-nand@1,0 { | 33 | gpio-nand@1,0 { |
diff --git a/Documentation/devicetree/bindings/mtd/mtd-physmap.txt b/Documentation/devicetree/bindings/mtd/mtd-physmap.txt index 80152cb567d9..a63c2bd7de2b 100644 --- a/Documentation/devicetree/bindings/mtd/mtd-physmap.txt +++ b/Documentation/devicetree/bindings/mtd/mtd-physmap.txt | |||
@@ -23,27 +23,8 @@ are defined: | |||
23 | - vendor-id : Contains the flash chip's vendor id (1 byte). | 23 | - vendor-id : Contains the flash chip's vendor id (1 byte). |
24 | - device-id : Contains the flash chip's device id (1 byte). | 24 | - device-id : Contains the flash chip's device id (1 byte). |
25 | 25 | ||
26 | In addition to the information on the mtd bank itself, the | 26 | The device tree may optionally contain sub-nodes describing partitions of the |
27 | device tree may optionally contain additional information | 27 | address space. See partition.txt for more detail. |
28 | describing partitions of the address space. This can be | ||
29 | used on platforms which have strong conventions about which | ||
30 | portions of a flash are used for what purposes, but which don't | ||
31 | use an on-flash partition table such as RedBoot. | ||
32 | |||
33 | Each partition is represented as a sub-node of the mtd device. | ||
34 | Each node's name represents the name of the corresponding | ||
35 | partition of the mtd device. | ||
36 | |||
37 | Flash partitions | ||
38 | - reg : The partition's offset and size within the mtd bank. | ||
39 | - label : (optional) The label / name for this partition. | ||
40 | If omitted, the label is taken from the node name (excluding | ||
41 | the unit address). | ||
42 | - read-only : (optional) This parameter, if present, is a hint to | ||
43 | Linux that this partition should only be mounted | ||
44 | read-only. This is usually used for flash partitions | ||
45 | containing early-boot firmware images or data which should not | ||
46 | be clobbered. | ||
47 | 28 | ||
48 | Example: | 29 | Example: |
49 | 30 | ||
diff --git a/Documentation/devicetree/bindings/mtd/nand.txt b/Documentation/devicetree/bindings/mtd/nand.txt new file mode 100644 index 000000000000..03855c8c492a --- /dev/null +++ b/Documentation/devicetree/bindings/mtd/nand.txt | |||
@@ -0,0 +1,7 @@ | |||
1 | * MTD generic binding | ||
2 | |||
3 | - nand-ecc-mode : String, operation mode of the NAND ecc mode. | ||
4 | Supported values are: "none", "soft", "hw", "hw_syndrome", "hw_oob_first", | ||
5 | "soft_bch". | ||
6 | - nand-bus-width : 8 or 16 bus width if not present 8 | ||
7 | - nand-on-flash-bbt: boolean to enable on flash bbt option if not present false | ||
diff --git a/Documentation/devicetree/bindings/mtd/partition.txt b/Documentation/devicetree/bindings/mtd/partition.txt new file mode 100644 index 000000000000..f114ce1657c2 --- /dev/null +++ b/Documentation/devicetree/bindings/mtd/partition.txt | |||
@@ -0,0 +1,38 @@ | |||
1 | Representing flash partitions in devicetree | ||
2 | |||
3 | Partitions can be represented by sub-nodes of an mtd device. This can be used | ||
4 | on platforms which have strong conventions about which portions of a flash are | ||
5 | used for what purposes, but which don't use an on-flash partition table such | ||
6 | as RedBoot. | ||
7 | |||
8 | #address-cells & #size-cells must both be present in the mtd device and be | ||
9 | equal to 1. | ||
10 | |||
11 | Required properties: | ||
12 | - reg : The partition's offset and size within the mtd bank. | ||
13 | |||
14 | Optional properties: | ||
15 | - label : The label / name for this partition. If omitted, the label is taken | ||
16 | from the node name (excluding the unit address). | ||
17 | - read-only : This parameter, if present, is a hint to Linux that this | ||
18 | partition should only be mounted read-only. This is usually used for flash | ||
19 | partitions containing early-boot firmware images or data which should not be | ||
20 | clobbered. | ||
21 | |||
22 | Examples: | ||
23 | |||
24 | |||
25 | flash@0 { | ||
26 | #address-cells = <1>; | ||
27 | #size-cells = <1>; | ||
28 | |||
29 | partition@0 { | ||
30 | label = "u-boot"; | ||
31 | reg = <0x0000000 0x100000>; | ||
32 | read-only; | ||
33 | }; | ||
34 | |||
35 | uimage@100000 { | ||
36 | reg = <0x0100000 0x200000>; | ||
37 | }; | ||
38 | ]; | ||
diff --git a/Documentation/devicetree/bindings/mtd/spear_smi.txt b/Documentation/devicetree/bindings/mtd/spear_smi.txt new file mode 100644 index 000000000000..7248aadd89e4 --- /dev/null +++ b/Documentation/devicetree/bindings/mtd/spear_smi.txt | |||
@@ -0,0 +1,31 @@ | |||
1 | * SPEAr SMI | ||
2 | |||
3 | Required properties: | ||
4 | - compatible : "st,spear600-smi" | ||
5 | - reg : Address range of the mtd chip | ||
6 | - #address-cells, #size-cells : Must be present if the device has sub-nodes | ||
7 | representing partitions. | ||
8 | - interrupt-parent: Should be the phandle for the interrupt controller | ||
9 | that services interrupts for this device | ||
10 | - interrupts: Should contain the STMMAC interrupts | ||
11 | - clock-rate : Functional clock rate of SMI in Hz | ||
12 | |||
13 | Optional properties: | ||
14 | - st,smi-fast-mode : Flash supports read in fast mode | ||
15 | |||
16 | Example: | ||
17 | |||
18 | smi: flash@fc000000 { | ||
19 | compatible = "st,spear600-smi"; | ||
20 | #address-cells = <1>; | ||
21 | #size-cells = <1>; | ||
22 | reg = <0xfc000000 0x1000>; | ||
23 | interrupt-parent = <&vic1>; | ||
24 | interrupts = <12>; | ||
25 | clock-rate = <50000000>; /* 50MHz */ | ||
26 | |||
27 | flash@f8000000 { | ||
28 | st,smi-fast-mode; | ||
29 | ... | ||
30 | }; | ||
31 | }; | ||
diff --git a/Documentation/devicetree/bindings/net/stmmac.txt b/Documentation/devicetree/bindings/net/stmmac.txt new file mode 100644 index 000000000000..1f62623f8c3f --- /dev/null +++ b/Documentation/devicetree/bindings/net/stmmac.txt | |||
@@ -0,0 +1,28 @@ | |||
1 | * STMicroelectronics 10/100/1000 Ethernet driver (GMAC) | ||
2 | |||
3 | Required properties: | ||
4 | - compatible: Should be "st,spear600-gmac" | ||
5 | - reg: Address and length of the register set for the device | ||
6 | - interrupt-parent: Should be the phandle for the interrupt controller | ||
7 | that services interrupts for this device | ||
8 | - interrupts: Should contain the STMMAC interrupts | ||
9 | - interrupt-names: Should contain the interrupt names "macirq" | ||
10 | "eth_wake_irq" if this interrupt is supported in the "interrupts" | ||
11 | property | ||
12 | - phy-mode: String, operation mode of the PHY interface. | ||
13 | Supported values are: "mii", "rmii", "gmii", "rgmii". | ||
14 | |||
15 | Optional properties: | ||
16 | - mac-address: 6 bytes, mac address | ||
17 | |||
18 | Examples: | ||
19 | |||
20 | gmac0: ethernet@e0800000 { | ||
21 | compatible = "st,spear600-gmac"; | ||
22 | reg = <0xe0800000 0x8000>; | ||
23 | interrupt-parent = <&vic1>; | ||
24 | interrupts = <24 23>; | ||
25 | interrupt-names = "macirq", "eth_wake_irq"; | ||
26 | mac-address = [000000000000]; /* Filled in by U-Boot */ | ||
27 | phy-mode = "gmii"; | ||
28 | }; | ||
diff --git a/Documentation/devicetree/bindings/power_supply/max17042_battery.txt b/Documentation/devicetree/bindings/power_supply/max17042_battery.txt new file mode 100644 index 000000000000..5bc9b685cf8a --- /dev/null +++ b/Documentation/devicetree/bindings/power_supply/max17042_battery.txt | |||
@@ -0,0 +1,18 @@ | |||
1 | max17042_battery | ||
2 | ~~~~~~~~~~~~~~~~ | ||
3 | |||
4 | Required properties : | ||
5 | - compatible : "maxim,max17042" | ||
6 | |||
7 | Optional properties : | ||
8 | - maxim,rsns-microohm : Resistance of rsns resistor in micro Ohms | ||
9 | (datasheet-recommended value is 10000). | ||
10 | Defining this property enables current-sense functionality. | ||
11 | |||
12 | Example: | ||
13 | |||
14 | battery-charger@36 { | ||
15 | compatible = "maxim,max17042"; | ||
16 | reg = <0x36>; | ||
17 | maxim,rsns-microohm = <10000>; | ||
18 | }; | ||
diff --git a/Documentation/devicetree/bindings/powerpc/fsl/mpic-msgr.txt b/Documentation/devicetree/bindings/powerpc/fsl/mpic-msgr.txt new file mode 100644 index 000000000000..bc8ded641ab6 --- /dev/null +++ b/Documentation/devicetree/bindings/powerpc/fsl/mpic-msgr.txt | |||
@@ -0,0 +1,63 @@ | |||
1 | * FSL MPIC Message Registers | ||
2 | |||
3 | This binding specifies what properties must be available in the device tree | ||
4 | representation of the message register blocks found in some FSL MPIC | ||
5 | implementations. | ||
6 | |||
7 | Required properties: | ||
8 | |||
9 | - compatible: Specifies the compatibility list for the message register | ||
10 | block. The type shall be <string-list> and the value shall be of the form | ||
11 | "fsl,mpic-v<version>-msgr", where <version> is the version number of | ||
12 | the MPIC containing the message registers. | ||
13 | |||
14 | - reg: Specifies the base physical address(s) and size(s) of the | ||
15 | message register block's addressable register space. The type shall be | ||
16 | <prop-encoded-array>. | ||
17 | |||
18 | - interrupts: Specifies a list of interrupt-specifiers which are available | ||
19 | for receiving interrupts. Interrupt-specifier consists of two cells: first | ||
20 | cell is interrupt-number and second cell is level-sense. The type shall be | ||
21 | <prop-encoded-array>. | ||
22 | |||
23 | Optional properties: | ||
24 | |||
25 | - mpic-msgr-receive-mask: Specifies what registers in the containing block | ||
26 | are allowed to receive interrupts. The value is a bit mask where a set | ||
27 | bit at bit 'n' indicates that message register 'n' can receive interrupts. | ||
28 | Note that "bit 'n'" is numbered from LSB for PPC hardware. The type shall | ||
29 | be <u32>. If not present, then all of the message registers in the block | ||
30 | are available. | ||
31 | |||
32 | Aliases: | ||
33 | |||
34 | An alias should be created for every message register block. They are not | ||
35 | required, though. However, a particular implementation of this binding | ||
36 | may require aliases to be present. Aliases are of the form | ||
37 | 'mpic-msgr-block<n>', where <n> is an integer specifying the block's number. | ||
38 | Numbers shall start at 0. | ||
39 | |||
40 | Example: | ||
41 | |||
42 | aliases { | ||
43 | mpic-msgr-block0 = &mpic_msgr_block0; | ||
44 | mpic-msgr-block1 = &mpic_msgr_block1; | ||
45 | }; | ||
46 | |||
47 | mpic_msgr_block0: mpic-msgr-block@41400 { | ||
48 | compatible = "fsl,mpic-v3.1-msgr"; | ||
49 | reg = <0x41400 0x200>; | ||
50 | // Message registers 0 and 2 in this block can receive interrupts on | ||
51 | // sources 0xb0 and 0xb2, respectively. | ||
52 | interrupts = <0xb0 2 0xb2 2>; | ||
53 | mpic-msgr-receive-mask = <0x5>; | ||
54 | }; | ||
55 | |||
56 | mpic_msgr_block1: mpic-msgr-block@42400 { | ||
57 | compatible = "fsl,mpic-v3.1-msgr"; | ||
58 | reg = <0x42400 0x200>; | ||
59 | // Message registers 0 and 2 in this block can receive interrupts on | ||
60 | // sources 0xb4 and 0xb6, respectively. | ||
61 | interrupts = <0xb4 2 0xb6 2>; | ||
62 | mpic-msgr-receive-mask = <0x5>; | ||
63 | }; | ||
diff --git a/Documentation/devicetree/bindings/powerpc/fsl/mpic.txt b/Documentation/devicetree/bindings/powerpc/fsl/mpic.txt index 2cf38bd841fd..dc5744636a57 100644 --- a/Documentation/devicetree/bindings/powerpc/fsl/mpic.txt +++ b/Documentation/devicetree/bindings/powerpc/fsl/mpic.txt | |||
@@ -56,7 +56,27 @@ PROPERTIES | |||
56 | to the client. The presence of this property also mandates | 56 | to the client. The presence of this property also mandates |
57 | that any initialization related to interrupt sources shall | 57 | that any initialization related to interrupt sources shall |
58 | be limited to sources explicitly referenced in the device tree. | 58 | be limited to sources explicitly referenced in the device tree. |
59 | 59 | ||
60 | - big-endian | ||
61 | Usage: optional | ||
62 | Value type: <empty> | ||
63 | If present the MPIC will be assumed to be big-endian. Some | ||
64 | device-trees omit this property on MPIC nodes even when the MPIC is | ||
65 | in fact big-endian, so certain boards override this property. | ||
66 | |||
67 | - single-cpu-affinity | ||
68 | Usage: optional | ||
69 | Value type: <empty> | ||
70 | If present the MPIC will be assumed to only be able to route | ||
71 | non-IPI interrupts to a single CPU at a time (EG: Freescale MPIC). | ||
72 | |||
73 | - last-interrupt-source | ||
74 | Usage: optional | ||
75 | Value type: <u32> | ||
76 | Some MPICs do not correctly report the number of hardware sources | ||
77 | in the global feature registers. If specified, this field will | ||
78 | override the value read from MPIC_GREG_FEATURE_LAST_SRC. | ||
79 | |||
60 | INTERRUPT SPECIFIER DEFINITION | 80 | INTERRUPT SPECIFIER DEFINITION |
61 | 81 | ||
62 | Interrupt specifiers consists of 4 cells encoded as | 82 | Interrupt specifiers consists of 4 cells encoded as |
diff --git a/Documentation/devicetree/bindings/powerpc/fsl/msi-pic.txt b/Documentation/devicetree/bindings/powerpc/fsl/msi-pic.txt index 5d586e1ccaf5..5693877ab377 100644 --- a/Documentation/devicetree/bindings/powerpc/fsl/msi-pic.txt +++ b/Documentation/devicetree/bindings/powerpc/fsl/msi-pic.txt | |||
@@ -6,8 +6,10 @@ Required properties: | |||
6 | etc.) and the second is "fsl,mpic-msi" or "fsl,ipic-msi" depending on | 6 | etc.) and the second is "fsl,mpic-msi" or "fsl,ipic-msi" depending on |
7 | the parent type. | 7 | the parent type. |
8 | 8 | ||
9 | - reg : should contain the address and the length of the shared message | 9 | - reg : It may contain one or two regions. The first region should contain |
10 | interrupt register set. | 10 | the address and the length of the shared message interrupt register set. |
11 | The second region should contain the address of aliased MSIIR register for | ||
12 | platforms that have such an alias. | ||
11 | 13 | ||
12 | - msi-available-ranges: use <start count> style section to define which | 14 | - msi-available-ranges: use <start count> style section to define which |
13 | msi interrupt can be used in the 256 msi interrupts. This property is | 15 | msi interrupt can be used in the 256 msi interrupts. This property is |
diff --git a/Documentation/devicetree/bindings/regulator/anatop-regulator.txt b/Documentation/devicetree/bindings/regulator/anatop-regulator.txt new file mode 100644 index 000000000000..357758cb6e92 --- /dev/null +++ b/Documentation/devicetree/bindings/regulator/anatop-regulator.txt | |||
@@ -0,0 +1,29 @@ | |||
1 | Anatop Voltage regulators | ||
2 | |||
3 | Required properties: | ||
4 | - compatible: Must be "fsl,anatop-regulator" | ||
5 | - anatop-reg-offset: Anatop MFD register offset | ||
6 | - anatop-vol-bit-shift: Bit shift for the register | ||
7 | - anatop-vol-bit-width: Number of bits used in the register | ||
8 | - anatop-min-bit-val: Minimum value of this register | ||
9 | - anatop-min-voltage: Minimum voltage of this regulator | ||
10 | - anatop-max-voltage: Maximum voltage of this regulator | ||
11 | |||
12 | Any property defined as part of the core regulator | ||
13 | binding, defined in regulator.txt, can also be used. | ||
14 | |||
15 | Example: | ||
16 | |||
17 | regulator-vddpu { | ||
18 | compatible = "fsl,anatop-regulator"; | ||
19 | regulator-name = "vddpu"; | ||
20 | regulator-min-microvolt = <725000>; | ||
21 | regulator-max-microvolt = <1300000>; | ||
22 | regulator-always-on; | ||
23 | anatop-reg-offset = <0x140>; | ||
24 | anatop-vol-bit-shift = <9>; | ||
25 | anatop-vol-bit-width = <5>; | ||
26 | anatop-min-bit-val = <1>; | ||
27 | anatop-min-voltage = <725000>; | ||
28 | anatop-max-voltage = <1300000>; | ||
29 | }; | ||
diff --git a/Documentation/devicetree/bindings/regulator/twl-regulator.txt b/Documentation/devicetree/bindings/regulator/twl-regulator.txt new file mode 100644 index 000000000000..0c3395d55ac1 --- /dev/null +++ b/Documentation/devicetree/bindings/regulator/twl-regulator.txt | |||
@@ -0,0 +1,68 @@ | |||
1 | TWL family of regulators | ||
2 | |||
3 | Required properties: | ||
4 | For twl6030 regulators/LDOs | ||
5 | - compatible: | ||
6 | - "ti,twl6030-vaux1" for VAUX1 LDO | ||
7 | - "ti,twl6030-vaux2" for VAUX2 LDO | ||
8 | - "ti,twl6030-vaux3" for VAUX3 LDO | ||
9 | - "ti,twl6030-vmmc" for VMMC LDO | ||
10 | - "ti,twl6030-vpp" for VPP LDO | ||
11 | - "ti,twl6030-vusim" for VUSIM LDO | ||
12 | - "ti,twl6030-vana" for VANA LDO | ||
13 | - "ti,twl6030-vcxio" for VCXIO LDO | ||
14 | - "ti,twl6030-vdac" for VDAC LDO | ||
15 | - "ti,twl6030-vusb" for VUSB LDO | ||
16 | - "ti,twl6030-v1v8" for V1V8 LDO | ||
17 | - "ti,twl6030-v2v1" for V2V1 LDO | ||
18 | - "ti,twl6030-clk32kg" for CLK32KG RESOURCE | ||
19 | - "ti,twl6030-vdd1" for VDD1 SMPS | ||
20 | - "ti,twl6030-vdd2" for VDD2 SMPS | ||
21 | - "ti,twl6030-vdd3" for VDD3 SMPS | ||
22 | For twl6025 regulators/LDOs | ||
23 | - compatible: | ||
24 | - "ti,twl6025-ldo1" for LDO1 LDO | ||
25 | - "ti,twl6025-ldo2" for LDO2 LDO | ||
26 | - "ti,twl6025-ldo3" for LDO3 LDO | ||
27 | - "ti,twl6025-ldo4" for LDO4 LDO | ||
28 | - "ti,twl6025-ldo5" for LDO5 LDO | ||
29 | - "ti,twl6025-ldo6" for LDO6 LDO | ||
30 | - "ti,twl6025-ldo7" for LDO7 LDO | ||
31 | - "ti,twl6025-ldoln" for LDOLN LDO | ||
32 | - "ti,twl6025-ldousb" for LDOUSB LDO | ||
33 | - "ti,twl6025-smps3" for SMPS3 SMPS | ||
34 | - "ti,twl6025-smps4" for SMPS4 SMPS | ||
35 | - "ti,twl6025-vio" for VIO SMPS | ||
36 | For twl4030 regulators/LDOs | ||
37 | - compatible: | ||
38 | - "ti,twl4030-vaux1" for VAUX1 LDO | ||
39 | - "ti,twl4030-vaux2" for VAUX2 LDO | ||
40 | - "ti,twl5030-vaux2" for VAUX2 LDO | ||
41 | - "ti,twl4030-vaux3" for VAUX3 LDO | ||
42 | - "ti,twl4030-vaux4" for VAUX4 LDO | ||
43 | - "ti,twl4030-vmmc1" for VMMC1 LDO | ||
44 | - "ti,twl4030-vmmc2" for VMMC2 LDO | ||
45 | - "ti,twl4030-vpll1" for VPLL1 LDO | ||
46 | - "ti,twl4030-vpll2" for VPLL2 LDO | ||
47 | - "ti,twl4030-vsim" for VSIM LDO | ||
48 | - "ti,twl4030-vdac" for VDAC LDO | ||
49 | - "ti,twl4030-vintana2" for VINTANA2 LDO | ||
50 | - "ti,twl4030-vio" for VIO LDO | ||
51 | - "ti,twl4030-vdd1" for VDD1 SMPS | ||
52 | - "ti,twl4030-vdd2" for VDD2 SMPS | ||
53 | - "ti,twl4030-vintana1" for VINTANA1 LDO | ||
54 | - "ti,twl4030-vintdig" for VINTDIG LDO | ||
55 | - "ti,twl4030-vusb1v5" for VUSB1V5 LDO | ||
56 | - "ti,twl4030-vusb1v8" for VUSB1V8 LDO | ||
57 | - "ti,twl4030-vusb3v1" for VUSB3V1 LDO | ||
58 | |||
59 | Optional properties: | ||
60 | - Any optional property defined in bindings/regulator/regulator.txt | ||
61 | |||
62 | Example: | ||
63 | |||
64 | xyz: regulator@0 { | ||
65 | compatible = "ti,twl6030-vaux1"; | ||
66 | regulator-min-microvolt = <1000000>; | ||
67 | regulator-max-microvolt = <3000000>; | ||
68 | }; | ||
diff --git a/Documentation/devicetree/bindings/rtc/sa1100-rtc.txt b/Documentation/devicetree/bindings/rtc/sa1100-rtc.txt new file mode 100644 index 000000000000..0cda19ad4859 --- /dev/null +++ b/Documentation/devicetree/bindings/rtc/sa1100-rtc.txt | |||
@@ -0,0 +1,17 @@ | |||
1 | * Marvell Real Time Clock controller | ||
2 | |||
3 | Required properties: | ||
4 | - compatible: should be "mrvl,sa1100-rtc" | ||
5 | - reg: physical base address of the controller and length of memory mapped | ||
6 | region. | ||
7 | - interrupts: Should be two. The first interrupt number is the rtc alarm | ||
8 | interrupt and the second interrupt number is the rtc hz interrupt. | ||
9 | - interrupt-names: Assign name of irq resource. | ||
10 | |||
11 | Example: | ||
12 | rtc: rtc@d4010000 { | ||
13 | compatible = "mrvl,mmp-rtc"; | ||
14 | reg = <0xd4010000 0x1000>; | ||
15 | interrupts = <5>, <6>; | ||
16 | interrupt-name = "rtc 1Hz", "rtc alarm"; | ||
17 | }; | ||
diff --git a/Documentation/devicetree/bindings/serial/mrvl-serial.txt b/Documentation/devicetree/bindings/serial/mrvl-serial.txt new file mode 100644 index 000000000000..d744340de887 --- /dev/null +++ b/Documentation/devicetree/bindings/serial/mrvl-serial.txt | |||
@@ -0,0 +1,4 @@ | |||
1 | PXA UART controller | ||
2 | |||
3 | Required properties: | ||
4 | - compatible : should be "mrvl,mmp-uart" or "mrvl,pxa-uart". | ||
diff --git a/Documentation/devicetree/bindings/sound/alc5632.txt b/Documentation/devicetree/bindings/sound/alc5632.txt new file mode 100644 index 000000000000..8608f747dcfe --- /dev/null +++ b/Documentation/devicetree/bindings/sound/alc5632.txt | |||
@@ -0,0 +1,24 @@ | |||
1 | ALC5632 audio CODEC | ||
2 | |||
3 | This device supports I2C only. | ||
4 | |||
5 | Required properties: | ||
6 | |||
7 | - compatible : "realtek,alc5632" | ||
8 | |||
9 | - reg : the I2C address of the device. | ||
10 | |||
11 | - gpio-controller : Indicates this device is a GPIO controller. | ||
12 | |||
13 | - #gpio-cells : Should be two. The first cell is the pin number and the | ||
14 | second cell is used to specify optional parameters (currently unused). | ||
15 | |||
16 | Example: | ||
17 | |||
18 | alc5632: alc5632@1e { | ||
19 | compatible = "realtek,alc5632"; | ||
20 | reg = <0x1a>; | ||
21 | |||
22 | gpio-controller; | ||
23 | #gpio-cells = <2>; | ||
24 | }; | ||
diff --git a/Documentation/devicetree/bindings/sound/imx-audmux.txt b/Documentation/devicetree/bindings/sound/imx-audmux.txt new file mode 100644 index 000000000000..215aa9817213 --- /dev/null +++ b/Documentation/devicetree/bindings/sound/imx-audmux.txt | |||
@@ -0,0 +1,13 @@ | |||
1 | Freescale Digital Audio Mux (AUDMUX) device | ||
2 | |||
3 | Required properties: | ||
4 | - compatible : "fsl,imx21-audmux" for AUDMUX version firstly used on i.MX21, | ||
5 | or "fsl,imx31-audmux" for the version firstly used on i.MX31. | ||
6 | - reg : Should contain AUDMUX registers location and length | ||
7 | |||
8 | Example: | ||
9 | |||
10 | audmux@021d8000 { | ||
11 | compatible = "fsl,imx6q-audmux", "fsl,imx31-audmux"; | ||
12 | reg = <0x021d8000 0x4000>; | ||
13 | }; | ||
diff --git a/Documentation/devicetree/bindings/sound/soc/codecs/fsl-sgtl5000.txt b/Documentation/devicetree/bindings/sound/sgtl5000.txt index 2c3cd413f042..2c3cd413f042 100644 --- a/Documentation/devicetree/bindings/sound/soc/codecs/fsl-sgtl5000.txt +++ b/Documentation/devicetree/bindings/sound/sgtl5000.txt | |||
diff --git a/Documentation/devicetree/bindings/sound/tegra-audio-alc5632.txt b/Documentation/devicetree/bindings/sound/tegra-audio-alc5632.txt new file mode 100644 index 000000000000..b77a97c9101e --- /dev/null +++ b/Documentation/devicetree/bindings/sound/tegra-audio-alc5632.txt | |||
@@ -0,0 +1,59 @@ | |||
1 | NVIDIA Tegra audio complex | ||
2 | |||
3 | Required properties: | ||
4 | - compatible : "nvidia,tegra-audio-alc5632" | ||
5 | - nvidia,model : The user-visible name of this sound complex. | ||
6 | - nvidia,audio-routing : A list of the connections between audio components. | ||
7 | Each entry is a pair of strings, the first being the connection's sink, | ||
8 | the second being the connection's source. Valid names for sources and | ||
9 | sinks are the ALC5632's pins: | ||
10 | |||
11 | ALC5632 pins: | ||
12 | |||
13 | * SPK_OUTP | ||
14 | * SPK_OUTN | ||
15 | * HP_OUT_L | ||
16 | * HP_OUT_R | ||
17 | * AUX_OUT_P | ||
18 | * AUX_OUT_N | ||
19 | * LINE_IN_L | ||
20 | * LINE_IN_R | ||
21 | * PHONE_P | ||
22 | * PHONE_N | ||
23 | * MIC1_P | ||
24 | * MIC1_N | ||
25 | * MIC2_P | ||
26 | * MIC2_N | ||
27 | * MICBIAS1 | ||
28 | * DMICDAT | ||
29 | |||
30 | Board connectors: | ||
31 | |||
32 | * Headset Stereophone | ||
33 | * Int Spk | ||
34 | * Headset Mic | ||
35 | * Digital Mic | ||
36 | |||
37 | - nvidia,i2s-controller : The phandle of the Tegra I2S controller | ||
38 | - nvidia,audio-codec : The phandle of the ALC5632 audio codec | ||
39 | |||
40 | Example: | ||
41 | |||
42 | sound { | ||
43 | compatible = "nvidia,tegra-audio-alc5632-paz00", | ||
44 | "nvidia,tegra-audio-alc5632"; | ||
45 | |||
46 | nvidia,model = "Compal PAZ00"; | ||
47 | |||
48 | nvidia,audio-routing = | ||
49 | "Int Spk", "SPK_OUTP", | ||
50 | "Int Spk", "SPK_OUTN", | ||
51 | "Headset Mic","MICBIAS1", | ||
52 | "MIC1_N", "Headset Mic", | ||
53 | "MIC1_P", "Headset Mic", | ||
54 | "Headset Stereophone", "HP_OUT_R", | ||
55 | "Headset Stereophone", "HP_OUT_L"; | ||
56 | |||
57 | nvidia,i2s-controller = <&tegra_i2s1>; | ||
58 | nvidia,audio-codec = <&alc5632>; | ||
59 | }; | ||
diff --git a/Documentation/devicetree/bindings/spi/omap-spi.txt b/Documentation/devicetree/bindings/spi/omap-spi.txt new file mode 100644 index 000000000000..81df374adbb9 --- /dev/null +++ b/Documentation/devicetree/bindings/spi/omap-spi.txt | |||
@@ -0,0 +1,20 @@ | |||
1 | OMAP2+ McSPI device | ||
2 | |||
3 | Required properties: | ||
4 | - compatible : | ||
5 | - "ti,omap2-spi" for OMAP2 & OMAP3. | ||
6 | - "ti,omap4-spi" for OMAP4+. | ||
7 | - ti,spi-num-cs : Number of chipselect supported by the instance. | ||
8 | - ti,hwmods: Name of the hwmod associated to the McSPI | ||
9 | |||
10 | |||
11 | Example: | ||
12 | |||
13 | mcspi1: mcspi@1 { | ||
14 | #address-cells = <1>; | ||
15 | #size-cells = <0>; | ||
16 | compatible = "ti,omap4-mcspi"; | ||
17 | ti,hwmods = "mcspi1"; | ||
18 | ti,spi-num-cs = <4>; | ||
19 | }; | ||
20 | |||
diff --git a/Documentation/devicetree/bindings/tty/serial/efm32-uart.txt b/Documentation/devicetree/bindings/tty/serial/efm32-uart.txt new file mode 100644 index 000000000000..6588b6950a7f --- /dev/null +++ b/Documentation/devicetree/bindings/tty/serial/efm32-uart.txt | |||
@@ -0,0 +1,14 @@ | |||
1 | * Energymicro efm32 UART | ||
2 | |||
3 | Required properties: | ||
4 | - compatible : Should be "efm32,uart" | ||
5 | - reg : Address and length of the register set | ||
6 | - interrupts : Should contain uart interrupt | ||
7 | |||
8 | Example: | ||
9 | |||
10 | uart@0x4000c400 { | ||
11 | compatible = "efm32,uart"; | ||
12 | reg = <0x4000c400 0x400>; | ||
13 | interrupts = <15>; | ||
14 | }; | ||
diff --git a/Documentation/devicetree/bindings/usb/atmel-usb.txt b/Documentation/devicetree/bindings/usb/atmel-usb.txt new file mode 100644 index 000000000000..60bd2150a3e6 --- /dev/null +++ b/Documentation/devicetree/bindings/usb/atmel-usb.txt | |||
@@ -0,0 +1,49 @@ | |||
1 | Atmel SOC USB controllers | ||
2 | |||
3 | OHCI | ||
4 | |||
5 | Required properties: | ||
6 | - compatible: Should be "atmel,at91rm9200-ohci" for USB controllers | ||
7 | used in host mode. | ||
8 | - num-ports: Number of ports. | ||
9 | - atmel,vbus-gpio: If present, specifies a gpio that needs to be | ||
10 | activated for the bus to be powered. | ||
11 | - atmel,oc-gpio: If present, specifies a gpio that needs to be | ||
12 | activated for the overcurrent detection. | ||
13 | |||
14 | usb0: ohci@00500000 { | ||
15 | compatible = "atmel,at91rm9200-ohci", "usb-ohci"; | ||
16 | reg = <0x00500000 0x100000>; | ||
17 | interrupts = <20 4>; | ||
18 | num-ports = <2>; | ||
19 | }; | ||
20 | |||
21 | EHCI | ||
22 | |||
23 | Required properties: | ||
24 | - compatible: Should be "atmel,at91sam9g45-ehci" for USB controllers | ||
25 | used in host mode. | ||
26 | |||
27 | usb1: ehci@00800000 { | ||
28 | compatible = "atmel,at91sam9g45-ehci", "usb-ehci"; | ||
29 | reg = <0x00800000 0x100000>; | ||
30 | interrupts = <22 4>; | ||
31 | }; | ||
32 | |||
33 | AT91 USB device controller | ||
34 | |||
35 | Required properties: | ||
36 | - compatible: Should be "atmel,at91rm9200-udc" | ||
37 | - reg: Address and length of the register set for the device | ||
38 | - interrupts: Should contain macb interrupt | ||
39 | |||
40 | Optional properties: | ||
41 | - atmel,vbus-gpio: If present, specifies a gpio that needs to be | ||
42 | activated for the bus to be powered. | ||
43 | |||
44 | usb1: gadget@fffa4000 { | ||
45 | compatible = "atmel,at91rm9200-udc"; | ||
46 | reg = <0xfffa4000 0x4000>; | ||
47 | interrupts = <10 4>; | ||
48 | atmel,vbus-gpio = <&pioC 5 0>; | ||
49 | }; | ||
diff --git a/Documentation/devicetree/bindings/usb/tegra-usb.txt b/Documentation/devicetree/bindings/usb/tegra-usb.txt index 035d63d5646d..007005ddbe12 100644 --- a/Documentation/devicetree/bindings/usb/tegra-usb.txt +++ b/Documentation/devicetree/bindings/usb/tegra-usb.txt | |||
@@ -11,3 +11,16 @@ Required properties : | |||
11 | - phy_type : Should be one of "ulpi" or "utmi". | 11 | - phy_type : Should be one of "ulpi" or "utmi". |
12 | - nvidia,vbus-gpio : If present, specifies a gpio that needs to be | 12 | - nvidia,vbus-gpio : If present, specifies a gpio that needs to be |
13 | activated for the bus to be powered. | 13 | activated for the bus to be powered. |
14 | |||
15 | Optional properties: | ||
16 | - dr_mode : dual role mode. Indicates the working mode for | ||
17 | nvidia,tegra20-ehci compatible controllers. Can be "host", "peripheral", | ||
18 | or "otg". Default to "host" if not defined for backward compatibility. | ||
19 | host means this is a host controller | ||
20 | peripheral means it is device controller | ||
21 | otg means it can operate as either ("on the go") | ||
22 | - nvidia,has-legacy-mode : boolean indicates whether this controller can | ||
23 | operate in legacy mode (as APX 2500 / 2600). In legacy mode some | ||
24 | registers are accessed through the APB_MISC base address instead of | ||
25 | the USB controller. Since this is a legacy issue it probably does not | ||
26 | warrant a compatible string of its own. | ||
diff --git a/Documentation/devicetree/bindings/vendor-prefixes.txt b/Documentation/devicetree/bindings/vendor-prefixes.txt index ecc6a6cd26c1..82ac057a24a9 100644 --- a/Documentation/devicetree/bindings/vendor-prefixes.txt +++ b/Documentation/devicetree/bindings/vendor-prefixes.txt | |||
@@ -30,9 +30,11 @@ national National Semiconductor | |||
30 | nintendo Nintendo | 30 | nintendo Nintendo |
31 | nvidia NVIDIA | 31 | nvidia NVIDIA |
32 | nxp NXP Semiconductors | 32 | nxp NXP Semiconductors |
33 | picochip Picochip Ltd | ||
33 | powervr Imagination Technologies | 34 | powervr Imagination Technologies |
34 | qcom Qualcomm, Inc. | 35 | qcom Qualcomm, Inc. |
35 | ramtron Ramtron International | 36 | ramtron Ramtron International |
37 | realtek Realtek Semiconductor Corp. | ||
36 | samsung Samsung Semiconductor | 38 | samsung Samsung Semiconductor |
37 | sbs Smart Battery System | 39 | sbs Smart Battery System |
38 | schindler Schindler | 40 | schindler Schindler |
diff --git a/Documentation/devicetree/usage-model.txt b/Documentation/devicetree/usage-model.txt new file mode 100644 index 000000000000..c5a80099b71c --- /dev/null +++ b/Documentation/devicetree/usage-model.txt | |||
@@ -0,0 +1,412 @@ | |||
1 | Linux and the Device Tree | ||
2 | ------------------------- | ||
3 | The Linux usage model for device tree data | ||
4 | |||
5 | Author: Grant Likely <grant.likely@secretlab.ca> | ||
6 | |||
7 | This article describes how Linux uses the device tree. An overview of | ||
8 | the device tree data format can be found on the device tree usage page | ||
9 | at devicetree.org[1]. | ||
10 | |||
11 | [1] http://devicetree.org/Device_Tree_Usage | ||
12 | |||
13 | The "Open Firmware Device Tree", or simply Device Tree (DT), is a data | ||
14 | structure and language for describing hardware. More specifically, it | ||
15 | is a description of hardware that is readable by an operating system | ||
16 | so that the operating system doesn't need to hard code details of the | ||
17 | machine. | ||
18 | |||
19 | Structurally, the DT is a tree, or acyclic graph with named nodes, and | ||
20 | nodes may have an arbitrary number of named properties encapsulating | ||
21 | arbitrary data. A mechanism also exists to create arbitrary | ||
22 | links from one node to another outside of the natural tree structure. | ||
23 | |||
24 | Conceptually, a common set of usage conventions, called 'bindings', | ||
25 | is defined for how data should appear in the tree to describe typical | ||
26 | hardware characteristics including data busses, interrupt lines, GPIO | ||
27 | connections, and peripheral devices. | ||
28 | |||
29 | As much as possible, hardware is described using existing bindings to | ||
30 | maximize use of existing support code, but since property and node | ||
31 | names are simply text strings, it is easy to extend existing bindings | ||
32 | or create new ones by defining new nodes and properties. Be wary, | ||
33 | however, of creating a new binding without first doing some homework | ||
34 | about what already exists. There are currently two different, | ||
35 | incompatible, bindings for i2c busses that came about because the new | ||
36 | binding was created without first investigating how i2c devices were | ||
37 | already being enumerated in existing systems. | ||
38 | |||
39 | 1. History | ||
40 | ---------- | ||
41 | The DT was originally created by Open Firmware as part of the | ||
42 | communication method for passing data from Open Firmware to a client | ||
43 | program (like to an operating system). An operating system used the | ||
44 | Device Tree to discover the topology of the hardware at runtime, and | ||
45 | thereby support a majority of available hardware without hard coded | ||
46 | information (assuming drivers were available for all devices). | ||
47 | |||
48 | Since Open Firmware is commonly used on PowerPC and SPARC platforms, | ||
49 | the Linux support for those architectures has for a long time used the | ||
50 | Device Tree. | ||
51 | |||
52 | In 2005, when PowerPC Linux began a major cleanup and to merge 32-bit | ||
53 | and 64-bit support, the decision was made to require DT support on all | ||
54 | powerpc platforms, regardless of whether or not they used Open | ||
55 | Firmware. To do this, a DT representation called the Flattened Device | ||
56 | Tree (FDT) was created which could be passed to the kernel as a binary | ||
57 | blob without requiring a real Open Firmware implementation. U-Boot, | ||
58 | kexec, and other bootloaders were modified to support both passing a | ||
59 | Device Tree Binary (dtb) and to modify a dtb at boot time. DT was | ||
60 | also added to the PowerPC boot wrapper (arch/powerpc/boot/*) so that | ||
61 | a dtb could be wrapped up with the kernel image to support booting | ||
62 | existing non-DT aware firmware. | ||
63 | |||
64 | Some time later, FDT infrastructure was generalized to be usable by | ||
65 | all architectures. At the time of this writing, 6 mainlined | ||
66 | architectures (arm, microblaze, mips, powerpc, sparc, and x86) and 1 | ||
67 | out of mainline (nios) have some level of DT support. | ||
68 | |||
69 | 2. Data Model | ||
70 | ------------- | ||
71 | If you haven't already read the Device Tree Usage[1] page, | ||
72 | then go read it now. It's okay, I'll wait.... | ||
73 | |||
74 | 2.1 High Level View | ||
75 | ------------------- | ||
76 | The most important thing to understand is that the DT is simply a data | ||
77 | structure that describes the hardware. There is nothing magical about | ||
78 | it, and it doesn't magically make all hardware configuration problems | ||
79 | go away. What it does do is provide a language for decoupling the | ||
80 | hardware configuration from the board and device driver support in the | ||
81 | Linux kernel (or any other operating system for that matter). Using | ||
82 | it allows board and device support to become data driven; to make | ||
83 | setup decisions based on data passed into the kernel instead of on | ||
84 | per-machine hard coded selections. | ||
85 | |||
86 | Ideally, data driven platform setup should result in less code | ||
87 | duplication and make it easier to support a wide range of hardware | ||
88 | with a single kernel image. | ||
89 | |||
90 | Linux uses DT data for three major purposes: | ||
91 | 1) platform identification, | ||
92 | 2) runtime configuration, and | ||
93 | 3) device population. | ||
94 | |||
95 | 2.2 Platform Identification | ||
96 | --------------------------- | ||
97 | First and foremost, the kernel will use data in the DT to identify the | ||
98 | specific machine. In a perfect world, the specific platform shouldn't | ||
99 | matter to the kernel because all platform details would be described | ||
100 | perfectly by the device tree in a consistent and reliable manner. | ||
101 | Hardware is not perfect though, and so the kernel must identify the | ||
102 | machine during early boot so that it has the opportunity to run | ||
103 | machine-specific fixups. | ||
104 | |||
105 | In the majority of cases, the machine identity is irrelevant, and the | ||
106 | kernel will instead select setup code based on the machine's core | ||
107 | CPU or SoC. On ARM for example, setup_arch() in | ||
108 | arch/arm/kernel/setup.c will call setup_machine_fdt() in | ||
109 | arch/arm/kernel/devicetree.c which searches through the machine_desc | ||
110 | table and selects the machine_desc which best matches the device tree | ||
111 | data. It determines the best match by looking at the 'compatible' | ||
112 | property in the root device tree node, and comparing it with the | ||
113 | dt_compat list in struct machine_desc. | ||
114 | |||
115 | The 'compatible' property contains a sorted list of strings starting | ||
116 | with the exact name of the machine, followed by an optional list of | ||
117 | boards it is compatible with sorted from most compatible to least. For | ||
118 | example, the root compatible properties for the TI BeagleBoard and its | ||
119 | successor, the BeagleBoard xM board might look like: | ||
120 | |||
121 | compatible = "ti,omap3-beagleboard", "ti,omap3450", "ti,omap3"; | ||
122 | compatible = "ti,omap3-beagleboard-xm", "ti,omap3450", "ti,omap3"; | ||
123 | |||
124 | Where "ti,omap3-beagleboard-xm" specifies the exact model, it also | ||
125 | claims that it compatible with the OMAP 3450 SoC, and the omap3 family | ||
126 | of SoCs in general. You'll notice that the list is sorted from most | ||
127 | specific (exact board) to least specific (SoC family). | ||
128 | |||
129 | Astute readers might point out that the Beagle xM could also claim | ||
130 | compatibility with the original Beagle board. However, one should be | ||
131 | cautioned about doing so at the board level since there is typically a | ||
132 | high level of change from one board to another, even within the same | ||
133 | product line, and it is hard to nail down exactly what is meant when one | ||
134 | board claims to be compatible with another. For the top level, it is | ||
135 | better to err on the side of caution and not claim one board is | ||
136 | compatible with another. The notable exception would be when one | ||
137 | board is a carrier for another, such as a CPU module attached to a | ||
138 | carrier board. | ||
139 | |||
140 | One more note on compatible values. Any string used in a compatible | ||
141 | property must be documented as to what it indicates. Add | ||
142 | documentation for compatible strings in Documentation/devicetree/bindings. | ||
143 | |||
144 | Again on ARM, for each machine_desc, the kernel looks to see if | ||
145 | any of the dt_compat list entries appear in the compatible property. | ||
146 | If one does, then that machine_desc is a candidate for driving the | ||
147 | machine. After searching the entire table of machine_descs, | ||
148 | setup_machine_fdt() returns the 'most compatible' machine_desc based | ||
149 | on which entry in the compatible property each machine_desc matches | ||
150 | against. If no matching machine_desc is found, then it returns NULL. | ||
151 | |||
152 | The reasoning behind this scheme is the observation that in the majority | ||
153 | of cases, a single machine_desc can support a large number of boards | ||
154 | if they all use the same SoC, or same family of SoCs. However, | ||
155 | invariably there will be some exceptions where a specific board will | ||
156 | require special setup code that is not useful in the generic case. | ||
157 | Special cases could be handled by explicitly checking for the | ||
158 | troublesome board(s) in generic setup code, but doing so very quickly | ||
159 | becomes ugly and/or unmaintainable if it is more than just a couple of | ||
160 | cases. | ||
161 | |||
162 | Instead, the compatible list allows a generic machine_desc to provide | ||
163 | support for a wide common set of boards by specifying "less | ||
164 | compatible" value in the dt_compat list. In the example above, | ||
165 | generic board support can claim compatibility with "ti,omap3" or | ||
166 | "ti,omap3450". If a bug was discovered on the original beagleboard | ||
167 | that required special workaround code during early boot, then a new | ||
168 | machine_desc could be added which implements the workarounds and only | ||
169 | matches on "ti,omap3-beagleboard". | ||
170 | |||
171 | PowerPC uses a slightly different scheme where it calls the .probe() | ||
172 | hook from each machine_desc, and the first one returning TRUE is used. | ||
173 | However, this approach does not take into account the priority of the | ||
174 | compatible list, and probably should be avoided for new architecture | ||
175 | support. | ||
176 | |||
177 | 2.3 Runtime configuration | ||
178 | ------------------------- | ||
179 | In most cases, a DT will be the sole method of communicating data from | ||
180 | firmware to the kernel, so also gets used to pass in runtime and | ||
181 | configuration data like the kernel parameters string and the location | ||
182 | of an initrd image. | ||
183 | |||
184 | Most of this data is contained in the /chosen node, and when booting | ||
185 | Linux it will look something like this: | ||
186 | |||
187 | chosen { | ||
188 | bootargs = "console=ttyS0,115200 loglevel=8"; | ||
189 | initrd-start = <0xc8000000>; | ||
190 | initrd-end = <0xc8200000>; | ||
191 | }; | ||
192 | |||
193 | The bootargs property contains the kernel arguments, and the initrd-* | ||
194 | properties define the address and size of an initrd blob. The | ||
195 | chosen node may also optionally contain an arbitrary number of | ||
196 | additional properties for platform-specific configuration data. | ||
197 | |||
198 | During early boot, the architecture setup code calls of_scan_flat_dt() | ||
199 | several times with different helper callbacks to parse device tree | ||
200 | data before paging is setup. The of_scan_flat_dt() code scans through | ||
201 | the device tree and uses the helpers to extract information required | ||
202 | during early boot. Typically the early_init_dt_scan_chosen() helper | ||
203 | is used to parse the chosen node including kernel parameters, | ||
204 | early_init_dt_scan_root() to initialize the DT address space model, | ||
205 | and early_init_dt_scan_memory() to determine the size and | ||
206 | location of usable RAM. | ||
207 | |||
208 | On ARM, the function setup_machine_fdt() is responsible for early | ||
209 | scanning of the device tree after selecting the correct machine_desc | ||
210 | that supports the board. | ||
211 | |||
212 | 2.4 Device population | ||
213 | --------------------- | ||
214 | After the board has been identified, and after the early configuration data | ||
215 | has been parsed, then kernel initialization can proceed in the normal | ||
216 | way. At some point in this process, unflatten_device_tree() is called | ||
217 | to convert the data into a more efficient runtime representation. | ||
218 | This is also when machine-specific setup hooks will get called, like | ||
219 | the machine_desc .init_early(), .init_irq() and .init_machine() hooks | ||
220 | on ARM. The remainder of this section uses examples from the ARM | ||
221 | implementation, but all architectures will do pretty much the same | ||
222 | thing when using a DT. | ||
223 | |||
224 | As can be guessed by the names, .init_early() is used for any machine- | ||
225 | specific setup that needs to be executed early in the boot process, | ||
226 | and .init_irq() is used to set up interrupt handling. Using a DT | ||
227 | doesn't materially change the behaviour of either of these functions. | ||
228 | If a DT is provided, then both .init_early() and .init_irq() are able | ||
229 | to call any of the DT query functions (of_* in include/linux/of*.h) to | ||
230 | get additional data about the platform. | ||
231 | |||
232 | The most interesting hook in the DT context is .init_machine() which | ||
233 | is primarily responsible for populating the Linux device model with | ||
234 | data about the platform. Historically this has been implemented on | ||
235 | embedded platforms by defining a set of static clock structures, | ||
236 | platform_devices, and other data in the board support .c file, and | ||
237 | registering it en-masse in .init_machine(). When DT is used, then | ||
238 | instead of hard coding static devices for each platform, the list of | ||
239 | devices can be obtained by parsing the DT, and allocating device | ||
240 | structures dynamically. | ||
241 | |||
242 | The simplest case is when .init_machine() is only responsible for | ||
243 | registering a block of platform_devices. A platform_device is a concept | ||
244 | used by Linux for memory or I/O mapped devices which cannot be detected | ||
245 | by hardware, and for 'composite' or 'virtual' devices (more on those | ||
246 | later). While there is no 'platform device' terminology for the DT, | ||
247 | platform devices roughly correspond to device nodes at the root of the | ||
248 | tree and children of simple memory mapped bus nodes. | ||
249 | |||
250 | About now is a good time to lay out an example. Here is part of the | ||
251 | device tree for the NVIDIA Tegra board. | ||
252 | |||
253 | /{ | ||
254 | compatible = "nvidia,harmony", "nvidia,tegra20"; | ||
255 | #address-cells = <1>; | ||
256 | #size-cells = <1>; | ||
257 | interrupt-parent = <&intc>; | ||
258 | |||
259 | chosen { }; | ||
260 | aliases { }; | ||
261 | |||
262 | memory { | ||
263 | device_type = "memory"; | ||
264 | reg = <0x00000000 0x40000000>; | ||
265 | }; | ||
266 | |||
267 | soc { | ||
268 | compatible = "nvidia,tegra20-soc", "simple-bus"; | ||
269 | #address-cells = <1>; | ||
270 | #size-cells = <1>; | ||
271 | ranges; | ||
272 | |||
273 | intc: interrupt-controller@50041000 { | ||
274 | compatible = "nvidia,tegra20-gic"; | ||
275 | interrupt-controller; | ||
276 | #interrupt-cells = <1>; | ||
277 | reg = <0x50041000 0x1000>, < 0x50040100 0x0100 >; | ||
278 | }; | ||
279 | |||
280 | serial@70006300 { | ||
281 | compatible = "nvidia,tegra20-uart"; | ||
282 | reg = <0x70006300 0x100>; | ||
283 | interrupts = <122>; | ||
284 | }; | ||
285 | |||
286 | i2s1: i2s@70002800 { | ||
287 | compatible = "nvidia,tegra20-i2s"; | ||
288 | reg = <0x70002800 0x100>; | ||
289 | interrupts = <77>; | ||
290 | codec = <&wm8903>; | ||
291 | }; | ||
292 | |||
293 | i2c@7000c000 { | ||
294 | compatible = "nvidia,tegra20-i2c"; | ||
295 | #address-cells = <1>; | ||
296 | #size-cells = <0>; | ||
297 | reg = <0x7000c000 0x100>; | ||
298 | interrupts = <70>; | ||
299 | |||
300 | wm8903: codec@1a { | ||
301 | compatible = "wlf,wm8903"; | ||
302 | reg = <0x1a>; | ||
303 | interrupts = <347>; | ||
304 | }; | ||
305 | }; | ||
306 | }; | ||
307 | |||
308 | sound { | ||
309 | compatible = "nvidia,harmony-sound"; | ||
310 | i2s-controller = <&i2s1>; | ||
311 | i2s-codec = <&wm8903>; | ||
312 | }; | ||
313 | }; | ||
314 | |||
315 | At .machine_init() time, Tegra board support code will need to look at | ||
316 | this DT and decide which nodes to create platform_devices for. | ||
317 | However, looking at the tree, it is not immediately obvious what kind | ||
318 | of device each node represents, or even if a node represents a device | ||
319 | at all. The /chosen, /aliases, and /memory nodes are informational | ||
320 | nodes that don't describe devices (although arguably memory could be | ||
321 | considered a device). The children of the /soc node are memory mapped | ||
322 | devices, but the codec@1a is an i2c device, and the sound node | ||
323 | represents not a device, but rather how other devices are connected | ||
324 | together to create the audio subsystem. I know what each device is | ||
325 | because I'm familiar with the board design, but how does the kernel | ||
326 | know what to do with each node? | ||
327 | |||
328 | The trick is that the kernel starts at the root of the tree and looks | ||
329 | for nodes that have a 'compatible' property. First, it is generally | ||
330 | assumed that any node with a 'compatible' property represents a device | ||
331 | of some kind, and second, it can be assumed that any node at the root | ||
332 | of the tree is either directly attached to the processor bus, or is a | ||
333 | miscellaneous system device that cannot be described any other way. | ||
334 | For each of these nodes, Linux allocates and registers a | ||
335 | platform_device, which in turn may get bound to a platform_driver. | ||
336 | |||
337 | Why is using a platform_device for these nodes a safe assumption? | ||
338 | Well, for the way that Linux models devices, just about all bus_types | ||
339 | assume that its devices are children of a bus controller. For | ||
340 | example, each i2c_client is a child of an i2c_master. Each spi_device | ||
341 | is a child of an SPI bus. Similarly for USB, PCI, MDIO, etc. The | ||
342 | same hierarchy is also found in the DT, where I2C device nodes only | ||
343 | ever appear as children of an I2C bus node. Ditto for SPI, MDIO, USB, | ||
344 | etc. The only devices which do not require a specific type of parent | ||
345 | device are platform_devices (and amba_devices, but more on that | ||
346 | later), which will happily live at the base of the Linux /sys/devices | ||
347 | tree. Therefore, if a DT node is at the root of the tree, then it | ||
348 | really probably is best registered as a platform_device. | ||
349 | |||
350 | Linux board support code calls of_platform_populate(NULL, NULL, NULL) | ||
351 | to kick off discovery of devices at the root of the tree. The | ||
352 | parameters are all NULL because when starting from the root of the | ||
353 | tree, there is no need to provide a starting node (the first NULL), a | ||
354 | parent struct device (the last NULL), and we're not using a match | ||
355 | table (yet). For a board that only needs to register devices, | ||
356 | .init_machine() can be completely empty except for the | ||
357 | of_platform_populate() call. | ||
358 | |||
359 | In the Tegra example, this accounts for the /soc and /sound nodes, but | ||
360 | what about the children of the SoC node? Shouldn't they be registered | ||
361 | as platform devices too? For Linux DT support, the generic behaviour | ||
362 | is for child devices to be registered by the parent's device driver at | ||
363 | driver .probe() time. So, an i2c bus device driver will register a | ||
364 | i2c_client for each child node, an SPI bus driver will register | ||
365 | its spi_device children, and similarly for other bus_types. | ||
366 | According to that model, a driver could be written that binds to the | ||
367 | SoC node and simply registers platform_devices for each of its | ||
368 | children. The board support code would allocate and register an SoC | ||
369 | device, a (theoretical) SoC device driver could bind to the SoC device, | ||
370 | and register platform_devices for /soc/interrupt-controller, /soc/serial, | ||
371 | /soc/i2s, and /soc/i2c in its .probe() hook. Easy, right? | ||
372 | |||
373 | Actually, it turns out that registering children of some | ||
374 | platform_devices as more platform_devices is a common pattern, and the | ||
375 | device tree support code reflects that and makes the above example | ||
376 | simpler. The second argument to of_platform_populate() is an | ||
377 | of_device_id table, and any node that matches an entry in that table | ||
378 | will also get its child nodes registered. In the tegra case, the code | ||
379 | can look something like this: | ||
380 | |||
381 | static void __init harmony_init_machine(void) | ||
382 | { | ||
383 | /* ... */ | ||
384 | of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); | ||
385 | } | ||
386 | |||
387 | "simple-bus" is defined in the ePAPR 1.0 specification as a property | ||
388 | meaning a simple memory mapped bus, so the of_platform_populate() code | ||
389 | could be written to just assume simple-bus compatible nodes will | ||
390 | always be traversed. However, we pass it in as an argument so that | ||
391 | board support code can always override the default behaviour. | ||
392 | |||
393 | [Need to add discussion of adding i2c/spi/etc child devices] | ||
394 | |||
395 | Appendix A: AMBA devices | ||
396 | ------------------------ | ||
397 | |||
398 | ARM Primecells are a certain kind of device attached to the ARM AMBA | ||
399 | bus which include some support for hardware detection and power | ||
400 | management. In Linux, struct amba_device and the amba_bus_type is | ||
401 | used to represent Primecell devices. However, the fiddly bit is that | ||
402 | not all devices on an AMBA bus are Primecells, and for Linux it is | ||
403 | typical for both amba_device and platform_device instances to be | ||
404 | siblings of the same bus segment. | ||
405 | |||
406 | When using the DT, this creates problems for of_platform_populate() | ||
407 | because it must decide whether to register each node as either a | ||
408 | platform_device or an amba_device. This unfortunately complicates the | ||
409 | device creation model a little bit, but the solution turns out not to | ||
410 | be too invasive. If a node is compatible with "arm,amba-primecell", then | ||
411 | of_platform_populate() will register it as an amba_device instead of a | ||
412 | platform_device. | ||
diff --git a/Documentation/dma-buf-sharing.txt b/Documentation/dma-buf-sharing.txt index 225f96d88f55..3bbd5c51605a 100644 --- a/Documentation/dma-buf-sharing.txt +++ b/Documentation/dma-buf-sharing.txt | |||
@@ -32,8 +32,12 @@ The buffer-user | |||
32 | *IMPORTANT*: [see https://lkml.org/lkml/2011/12/20/211 for more details] | 32 | *IMPORTANT*: [see https://lkml.org/lkml/2011/12/20/211 for more details] |
33 | For this first version, A buffer shared using the dma_buf sharing API: | 33 | For this first version, A buffer shared using the dma_buf sharing API: |
34 | - *may* be exported to user space using "mmap" *ONLY* by exporter, outside of | 34 | - *may* be exported to user space using "mmap" *ONLY* by exporter, outside of |
35 | this framework. | 35 | this framework. |
36 | - may be used *ONLY* by importers that do not need CPU access to the buffer. | 36 | - with this new iteration of the dma-buf api cpu access from the kernel has been |
37 | enable, see below for the details. | ||
38 | |||
39 | dma-buf operations for device dma only | ||
40 | -------------------------------------- | ||
37 | 41 | ||
38 | The dma_buf buffer sharing API usage contains the following steps: | 42 | The dma_buf buffer sharing API usage contains the following steps: |
39 | 43 | ||
@@ -219,10 +223,120 @@ NOTES: | |||
219 | If the exporter chooses not to allow an attach() operation once a | 223 | If the exporter chooses not to allow an attach() operation once a |
220 | map_dma_buf() API has been called, it simply returns an error. | 224 | map_dma_buf() API has been called, it simply returns an error. |
221 | 225 | ||
222 | Miscellaneous notes: | 226 | Kernel cpu access to a dma-buf buffer object |
227 | -------------------------------------------- | ||
228 | |||
229 | The motivation to allow cpu access from the kernel to a dma-buf object from the | ||
230 | importers side are: | ||
231 | - fallback operations, e.g. if the devices is connected to a usb bus and the | ||
232 | kernel needs to shuffle the data around first before sending it away. | ||
233 | - full transparency for existing users on the importer side, i.e. userspace | ||
234 | should not notice the difference between a normal object from that subsystem | ||
235 | and an imported one backed by a dma-buf. This is really important for drm | ||
236 | opengl drivers that expect to still use all the existing upload/download | ||
237 | paths. | ||
238 | |||
239 | Access to a dma_buf from the kernel context involves three steps: | ||
240 | |||
241 | 1. Prepare access, which invalidate any necessary caches and make the object | ||
242 | available for cpu access. | ||
243 | 2. Access the object page-by-page with the dma_buf map apis | ||
244 | 3. Finish access, which will flush any necessary cpu caches and free reserved | ||
245 | resources. | ||
246 | |||
247 | 1. Prepare access | ||
248 | |||
249 | Before an importer can access a dma_buf object with the cpu from the kernel | ||
250 | context, it needs to notify the exporter of the access that is about to | ||
251 | happen. | ||
252 | |||
253 | Interface: | ||
254 | int dma_buf_begin_cpu_access(struct dma_buf *dmabuf, | ||
255 | size_t start, size_t len, | ||
256 | enum dma_data_direction direction) | ||
257 | |||
258 | This allows the exporter to ensure that the memory is actually available for | ||
259 | cpu access - the exporter might need to allocate or swap-in and pin the | ||
260 | backing storage. The exporter also needs to ensure that cpu access is | ||
261 | coherent for the given range and access direction. The range and access | ||
262 | direction can be used by the exporter to optimize the cache flushing, i.e. | ||
263 | access outside of the range or with a different direction (read instead of | ||
264 | write) might return stale or even bogus data (e.g. when the exporter needs to | ||
265 | copy the data to temporary storage). | ||
266 | |||
267 | This step might fail, e.g. in oom conditions. | ||
268 | |||
269 | 2. Accessing the buffer | ||
270 | |||
271 | To support dma_buf objects residing in highmem cpu access is page-based using | ||
272 | an api similar to kmap. Accessing a dma_buf is done in aligned chunks of | ||
273 | PAGE_SIZE size. Before accessing a chunk it needs to be mapped, which returns | ||
274 | a pointer in kernel virtual address space. Afterwards the chunk needs to be | ||
275 | unmapped again. There is no limit on how often a given chunk can be mapped | ||
276 | and unmapped, i.e. the importer does not need to call begin_cpu_access again | ||
277 | before mapping the same chunk again. | ||
278 | |||
279 | Interfaces: | ||
280 | void *dma_buf_kmap(struct dma_buf *, unsigned long); | ||
281 | void dma_buf_kunmap(struct dma_buf *, unsigned long, void *); | ||
282 | |||
283 | There are also atomic variants of these interfaces. Like for kmap they | ||
284 | facilitate non-blocking fast-paths. Neither the importer nor the exporter (in | ||
285 | the callback) is allowed to block when using these. | ||
286 | |||
287 | Interfaces: | ||
288 | void *dma_buf_kmap_atomic(struct dma_buf *, unsigned long); | ||
289 | void dma_buf_kunmap_atomic(struct dma_buf *, unsigned long, void *); | ||
290 | |||
291 | For importers all the restrictions of using kmap apply, like the limited | ||
292 | supply of kmap_atomic slots. Hence an importer shall only hold onto at most 2 | ||
293 | atomic dma_buf kmaps at the same time (in any given process context). | ||
294 | |||
295 | dma_buf kmap calls outside of the range specified in begin_cpu_access are | ||
296 | undefined. If the range is not PAGE_SIZE aligned, kmap needs to succeed on | ||
297 | the partial chunks at the beginning and end but may return stale or bogus | ||
298 | data outside of the range (in these partial chunks). | ||
299 | |||
300 | Note that these calls need to always succeed. The exporter needs to complete | ||
301 | any preparations that might fail in begin_cpu_access. | ||
302 | |||
303 | 3. Finish access | ||
304 | |||
305 | When the importer is done accessing the range specified in begin_cpu_access, | ||
306 | it needs to announce this to the exporter (to facilitate cache flushing and | ||
307 | unpinning of any pinned resources). The result of of any dma_buf kmap calls | ||
308 | after end_cpu_access is undefined. | ||
309 | |||
310 | Interface: | ||
311 | void dma_buf_end_cpu_access(struct dma_buf *dma_buf, | ||
312 | size_t start, size_t len, | ||
313 | enum dma_data_direction dir); | ||
314 | |||
315 | |||
316 | Miscellaneous notes | ||
317 | ------------------- | ||
318 | |||
223 | - Any exporters or users of the dma-buf buffer sharing framework must have | 319 | - Any exporters or users of the dma-buf buffer sharing framework must have |
224 | a 'select DMA_SHARED_BUFFER' in their respective Kconfigs. | 320 | a 'select DMA_SHARED_BUFFER' in their respective Kconfigs. |
225 | 321 | ||
322 | - In order to avoid fd leaks on exec, the FD_CLOEXEC flag must be set | ||
323 | on the file descriptor. This is not just a resource leak, but a | ||
324 | potential security hole. It could give the newly exec'd application | ||
325 | access to buffers, via the leaked fd, to which it should otherwise | ||
326 | not be permitted access. | ||
327 | |||
328 | The problem with doing this via a separate fcntl() call, versus doing it | ||
329 | atomically when the fd is created, is that this is inherently racy in a | ||
330 | multi-threaded app[3]. The issue is made worse when it is library code | ||
331 | opening/creating the file descriptor, as the application may not even be | ||
332 | aware of the fd's. | ||
333 | |||
334 | To avoid this problem, userspace must have a way to request O_CLOEXEC | ||
335 | flag be set when the dma-buf fd is created. So any API provided by | ||
336 | the exporting driver to create a dmabuf fd must provide a way to let | ||
337 | userspace control setting of O_CLOEXEC flag passed in to dma_buf_fd(). | ||
338 | |||
226 | References: | 339 | References: |
227 | [1] struct dma_buf_ops in include/linux/dma-buf.h | 340 | [1] struct dma_buf_ops in include/linux/dma-buf.h |
228 | [2] All interfaces mentioned above defined in include/linux/dma-buf.h | 341 | [2] All interfaces mentioned above defined in include/linux/dma-buf.h |
342 | [3] https://lwn.net/Articles/236486/ | ||
diff --git a/Documentation/dontdiff b/Documentation/dontdiff index 0c083c5c2faa..b4a898f43c37 100644 --- a/Documentation/dontdiff +++ b/Documentation/dontdiff | |||
@@ -158,7 +158,6 @@ logo_*.c | |||
158 | logo_*_clut224.c | 158 | logo_*_clut224.c |
159 | logo_*_mono.c | 159 | logo_*_mono.c |
160 | lxdialog | 160 | lxdialog |
161 | mach | ||
162 | mach-types | 161 | mach-types |
163 | mach-types.h | 162 | mach-types.h |
164 | machtypes.h | 163 | machtypes.h |
diff --git a/Documentation/driver-model/devres.txt b/Documentation/driver-model/devres.txt index 41c0c5d1ba14..2a596a4fc23e 100644 --- a/Documentation/driver-model/devres.txt +++ b/Documentation/driver-model/devres.txt | |||
@@ -271,3 +271,8 @@ IOMAP | |||
271 | pcim_iounmap() | 271 | pcim_iounmap() |
272 | pcim_iomap_table() : array of mapped addresses indexed by BAR | 272 | pcim_iomap_table() : array of mapped addresses indexed by BAR |
273 | pcim_iomap_regions() : do request_region() and iomap() on multiple BARs | 273 | pcim_iomap_regions() : do request_region() and iomap() on multiple BARs |
274 | |||
275 | REGULATOR | ||
276 | devm_regulator_get() | ||
277 | devm_regulator_put() | ||
278 | devm_regulator_bulk_get() | ||
diff --git a/Documentation/dvb/cards.txt b/Documentation/dvb/cards.txt index cc09187a5db7..97709e9a3076 100644 --- a/Documentation/dvb/cards.txt +++ b/Documentation/dvb/cards.txt | |||
@@ -119,4 +119,5 @@ o Cards based on the Phillips saa7134 PCI bridge: | |||
119 | - Compro Videomate DVB-T300 | 119 | - Compro Videomate DVB-T300 |
120 | - Compro Videomate DVB-T200 | 120 | - Compro Videomate DVB-T200 |
121 | - AVerMedia AVerTVHD MCE A180 | 121 | - AVerMedia AVerTVHD MCE A180 |
122 | - KWorld PC150-U ATSC Hybrid | ||
122 | 123 | ||
diff --git a/Documentation/dvb/lmedm04.txt b/Documentation/dvb/lmedm04.txt index 10b5f0411386..f4b720a14675 100644 --- a/Documentation/dvb/lmedm04.txt +++ b/Documentation/dvb/lmedm04.txt | |||
@@ -66,5 +66,16 @@ dd if=US290D.sys ibs=1 skip=36856 count=3976 of=dvb-usb-lme2510-s0194.fw | |||
66 | For LME2510C | 66 | For LME2510C |
67 | dd if=US290D.sys ibs=1 skip=33152 count=3697 of=dvb-usb-lme2510c-s0194.fw | 67 | dd if=US290D.sys ibs=1 skip=33152 count=3697 of=dvb-usb-lme2510c-s0194.fw |
68 | 68 | ||
69 | --------------------------------------------------------------------- | ||
70 | |||
71 | The m88rs2000 tuner driver can be found in windows/system32/drivers | ||
72 | |||
73 | US2B0D.sys (dated 29 Jun 2010) | ||
74 | |||
75 | dd if=US2B0D.sys ibs=1 skip=34432 count=3871 of=dvb-usb-lme2510c-rs2000.fw | ||
76 | |||
77 | We need to modify id of rs2000 firmware or it will warm boot id 3344:1120. | ||
78 | |||
79 | echo -ne \\xF0\\x22 | dd conv=notrunc bs=1 count=2 seek=266 of=dvb-usb-lme2510c-rs2000.fw | ||
69 | 80 | ||
70 | Copy the firmware file(s) to /lib/firmware | 81 | Copy the firmware file(s) to /lib/firmware |
diff --git a/Documentation/dynamic-debug-howto.txt b/Documentation/dynamic-debug-howto.txt index f959909d7154..74e6c7782678 100644 --- a/Documentation/dynamic-debug-howto.txt +++ b/Documentation/dynamic-debug-howto.txt | |||
@@ -12,7 +12,7 @@ dynamically enabled per-callsite. | |||
12 | Dynamic debug has even more useful features: | 12 | Dynamic debug has even more useful features: |
13 | 13 | ||
14 | * Simple query language allows turning on and off debugging statements by | 14 | * Simple query language allows turning on and off debugging statements by |
15 | matching any combination of: | 15 | matching any combination of 0 or 1 of: |
16 | 16 | ||
17 | - source filename | 17 | - source filename |
18 | - function name | 18 | - function name |
@@ -79,31 +79,24 @@ Command Language Reference | |||
79 | ========================== | 79 | ========================== |
80 | 80 | ||
81 | At the lexical level, a command comprises a sequence of words separated | 81 | At the lexical level, a command comprises a sequence of words separated |
82 | by whitespace characters. Note that newlines are treated as word | 82 | by spaces or tabs. So these are all equivalent: |
83 | separators and do *not* end a command or allow multiple commands to | ||
84 | be done together. So these are all equivalent: | ||
85 | 83 | ||
86 | nullarbor:~ # echo -c 'file svcsock.c line 1603 +p' > | 84 | nullarbor:~ # echo -c 'file svcsock.c line 1603 +p' > |
87 | <debugfs>/dynamic_debug/control | 85 | <debugfs>/dynamic_debug/control |
88 | nullarbor:~ # echo -c ' file svcsock.c line 1603 +p ' > | 86 | nullarbor:~ # echo -c ' file svcsock.c line 1603 +p ' > |
89 | <debugfs>/dynamic_debug/control | 87 | <debugfs>/dynamic_debug/control |
90 | nullarbor:~ # echo -c 'file svcsock.c\nline 1603 +p' > | ||
91 | <debugfs>/dynamic_debug/control | ||
92 | nullarbor:~ # echo -n 'file svcsock.c line 1603 +p' > | 88 | nullarbor:~ # echo -n 'file svcsock.c line 1603 +p' > |
93 | <debugfs>/dynamic_debug/control | 89 | <debugfs>/dynamic_debug/control |
94 | 90 | ||
95 | Commands are bounded by a write() system call. If you want to do | 91 | Command submissions are bounded by a write() system call. |
96 | multiple commands you need to do a separate "echo" for each, like: | 92 | Multiple commands can be written together, separated by ';' or '\n'. |
97 | 93 | ||
98 | nullarbor:~ # echo 'file svcsock.c line 1603 +p' > /proc/dprintk ;\ | 94 | ~# echo "func pnpacpi_get_resources +p; func pnp_assign_mem +p" \ |
99 | > echo 'file svcsock.c line 1563 +p' > /proc/dprintk | 95 | > <debugfs>/dynamic_debug/control |
100 | 96 | ||
101 | or even like: | 97 | If your query set is big, you can batch them too: |
102 | 98 | ||
103 | nullarbor:~ # ( | 99 | ~# cat query-batch-file > <debugfs>/dynamic_debug/control |
104 | > echo 'file svcsock.c line 1603 +p' ;\ | ||
105 | > echo 'file svcsock.c line 1563 +p' ;\ | ||
106 | > ) > /proc/dprintk | ||
107 | 100 | ||
108 | At the syntactical level, a command comprises a sequence of match | 101 | At the syntactical level, a command comprises a sequence of match |
109 | specifications, followed by a flags change specification. | 102 | specifications, followed by a flags change specification. |
@@ -144,11 +137,12 @@ func | |||
144 | func svc_tcp_accept | 137 | func svc_tcp_accept |
145 | 138 | ||
146 | file | 139 | file |
147 | The given string is compared against either the full | 140 | The given string is compared against either the full pathname, the |
148 | pathname or the basename of the source file of each | 141 | src-root relative pathname, or the basename of the source file of |
149 | callsite. Examples: | 142 | each callsite. Examples: |
150 | 143 | ||
151 | file svcsock.c | 144 | file svcsock.c |
145 | file kernel/freezer.c | ||
152 | file /usr/src/packages/BUILD/sgi-enhancednfs-1.4/default/net/sunrpc/svcsock.c | 146 | file /usr/src/packages/BUILD/sgi-enhancednfs-1.4/default/net/sunrpc/svcsock.c |
153 | 147 | ||
154 | module | 148 | module |
diff --git a/Documentation/edac.txt b/Documentation/edac.txt index 249822cde82b..fdcc49fad8e1 100644 --- a/Documentation/edac.txt +++ b/Documentation/edac.txt | |||
@@ -334,8 +334,8 @@ Sdram memory scrubbing rate: | |||
334 | 334 | ||
335 | Reading the file will return the actual scrubbing rate employed. | 335 | Reading the file will return the actual scrubbing rate employed. |
336 | 336 | ||
337 | If configuration fails or memory scrubbing is not implemented, the value | 337 | If configuration fails or memory scrubbing is not implemented, accessing |
338 | of the attribute file will be -1. | 338 | that attribute will fail. |
339 | 339 | ||
340 | 340 | ||
341 | 341 | ||
diff --git a/Documentation/fb/intel810.txt b/Documentation/fb/intel810.txt index be3e7836abef..a8e9f5bca6f3 100644 --- a/Documentation/fb/intel810.txt +++ b/Documentation/fb/intel810.txt | |||
@@ -211,7 +211,7 @@ Using the same setup as described above, load the module like this: | |||
211 | modprobe i810fb vram=2 xres=1024 bpp=8 hsync1=30 hsync2=55 vsync1=50 \ | 211 | modprobe i810fb vram=2 xres=1024 bpp=8 hsync1=30 hsync2=55 vsync1=50 \ |
212 | vsync2=85 accel=1 mtrr=1 | 212 | vsync2=85 accel=1 mtrr=1 |
213 | 213 | ||
214 | Or just add the following to /etc/modprobe.conf | 214 | Or just add the following to a configuration file in /etc/modprobe.d/ |
215 | 215 | ||
216 | options i810fb vram=2 xres=1024 bpp=16 hsync1=30 hsync2=55 vsync1=50 \ | 216 | options i810fb vram=2 xres=1024 bpp=16 hsync1=30 hsync2=55 vsync1=50 \ |
217 | vsync2=85 accel=1 mtrr=1 | 217 | vsync2=85 accel=1 mtrr=1 |
diff --git a/Documentation/fb/intelfb.txt b/Documentation/fb/intelfb.txt index dd9e944ea628..feac4e4d6968 100644 --- a/Documentation/fb/intelfb.txt +++ b/Documentation/fb/intelfb.txt | |||
@@ -120,7 +120,7 @@ Using the same setup as described above, load the module like this: | |||
120 | 120 | ||
121 | modprobe intelfb mode=800x600-32@75 vram=8 accel=1 hwcursor=1 | 121 | modprobe intelfb mode=800x600-32@75 vram=8 accel=1 hwcursor=1 |
122 | 122 | ||
123 | Or just add the following to /etc/modprobe.conf | 123 | Or just add the following to a configuration file in /etc/modprobe.d/ |
124 | 124 | ||
125 | options intelfb mode=800x600-32@75 vram=8 accel=1 hwcursor=1 | 125 | options intelfb mode=800x600-32@75 vram=8 accel=1 hwcursor=1 |
126 | 126 | ||
diff --git a/Documentation/feature-removal-schedule.txt b/Documentation/feature-removal-schedule.txt index a0ffac029a0d..709e08e9a222 100644 --- a/Documentation/feature-removal-schedule.txt +++ b/Documentation/feature-removal-schedule.txt | |||
@@ -6,14 +6,6 @@ be removed from this file. | |||
6 | 6 | ||
7 | --------------------------- | 7 | --------------------------- |
8 | 8 | ||
9 | What: x86 floppy disable_hlt | ||
10 | When: 2012 | ||
11 | Why: ancient workaround of dubious utility clutters the | ||
12 | code used by everybody else. | ||
13 | Who: Len Brown <len.brown@intel.com> | ||
14 | |||
15 | --------------------------- | ||
16 | |||
17 | What: CONFIG_APM_CPU_IDLE, and its ability to call APM BIOS in idle | 9 | What: CONFIG_APM_CPU_IDLE, and its ability to call APM BIOS in idle |
18 | When: 2012 | 10 | When: 2012 |
19 | Why: This optional sub-feature of APM is of dubious reliability, | 11 | Why: This optional sub-feature of APM is of dubious reliability, |
@@ -513,14 +505,29 @@ Who: Bjorn Helgaas <bhelgaas@google.com> | |||
513 | 505 | ||
514 | ---------------------------- | 506 | ---------------------------- |
515 | 507 | ||
516 | What: The CAP9 SoC family will be removed | 508 | What: Low Performance USB Block driver ("CONFIG_BLK_DEV_UB") |
517 | When: 3.4 | 509 | When: 3.6 |
518 | Files: arch/arm/mach-at91/at91cap9.c | 510 | Why: This driver provides support for USB storage devices like "USB |
519 | arch/arm/mach-at91/at91cap9_devices.c | 511 | sticks". As of now, it is deactivated in Debian, Fedora and |
520 | arch/arm/mach-at91/include/mach/at91cap9.h | 512 | Ubuntu. All current users can switch over to usb-storage |
521 | arch/arm/mach-at91/include/mach/at91cap9_matrix.h | 513 | (CONFIG_USB_STORAGE) which only drawback is the additional SCSI |
522 | arch/arm/mach-at91/include/mach/at91cap9_ddrsdr.h | 514 | stack. |
523 | arch/arm/mach-at91/board-cap9adk.c | 515 | Who: Sebastian Andrzej Siewior <sebastian@breakpoint.cc> |
524 | Why: The code is not actively maintained and platforms are now hard to find. | 516 | |
525 | Who: Nicolas Ferre <nicolas.ferre@atmel.com> | 517 | ---------------------------- |
526 | Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> | 518 | |
519 | What: kmap_atomic(page, km_type) | ||
520 | When: 3.5 | ||
521 | Why: The old kmap_atomic() with two arguments is deprecated, we only | ||
522 | keep it for backward compatibility for few cycles and then drop it. | ||
523 | Who: Cong Wang <amwang@redhat.com> | ||
524 | |||
525 | ---------------------------- | ||
526 | |||
527 | What: get_robust_list syscall | ||
528 | When: 2013 | ||
529 | Why: There appear to be no production users of the get_robust_list syscall, | ||
530 | and it runs the risk of leaking address locations, allowing the bypass | ||
531 | of ASLR. It was only ever intended for debugging, so it should be | ||
532 | removed. | ||
533 | Who: Kees Cook <keescook@chromium.org> | ||
diff --git a/Documentation/filesystems/debugfs.txt b/Documentation/filesystems/debugfs.txt index 6872c91bce35..7a34f827989c 100644 --- a/Documentation/filesystems/debugfs.txt +++ b/Documentation/filesystems/debugfs.txt | |||
@@ -14,7 +14,10 @@ Debugfs is typically mounted with a command like: | |||
14 | 14 | ||
15 | mount -t debugfs none /sys/kernel/debug | 15 | mount -t debugfs none /sys/kernel/debug |
16 | 16 | ||
17 | (Or an equivalent /etc/fstab line). | 17 | (Or an equivalent /etc/fstab line). |
18 | The debugfs root directory is accessible by anyone by default. To | ||
19 | restrict access to the tree the "uid", "gid" and "mode" mount | ||
20 | options can be used. | ||
18 | 21 | ||
19 | Note that the debugfs API is exported GPL-only to modules. | 22 | Note that the debugfs API is exported GPL-only to modules. |
20 | 23 | ||
@@ -133,7 +136,7 @@ file. | |||
133 | void __iomem *base; | 136 | void __iomem *base; |
134 | }; | 137 | }; |
135 | 138 | ||
136 | struct dentry *debugfs_create_regset32(const char *name, mode_t mode, | 139 | struct dentry *debugfs_create_regset32(const char *name, umode_t mode, |
137 | struct dentry *parent, | 140 | struct dentry *parent, |
138 | struct debugfs_regset32 *regset); | 141 | struct debugfs_regset32 *regset); |
139 | 142 | ||
diff --git a/Documentation/filesystems/ext4.txt b/Documentation/filesystems/ext4.txt index 8c10bf375c73..1b7f9acbcbbe 100644 --- a/Documentation/filesystems/ext4.txt +++ b/Documentation/filesystems/ext4.txt | |||
@@ -144,9 +144,6 @@ journal_async_commit Commit block can be written to disk without waiting | |||
144 | mount the device. This will enable 'journal_checksum' | 144 | mount the device. This will enable 'journal_checksum' |
145 | internally. | 145 | internally. |
146 | 146 | ||
147 | journal=update Update the ext4 file system's journal to the current | ||
148 | format. | ||
149 | |||
150 | journal_dev=devnum When the external journal device's major/minor numbers | 147 | journal_dev=devnum When the external journal device's major/minor numbers |
151 | have changed, this option allows the user to specify | 148 | have changed, this option allows the user to specify |
152 | the new journal location. The journal device is | 149 | the new journal location. The journal device is |
@@ -356,11 +353,6 @@ nouid32 Disables 32-bit UIDs and GIDs. This is for | |||
356 | interoperability with older kernels which only | 353 | interoperability with older kernels which only |
357 | store and expect 16-bit values. | 354 | store and expect 16-bit values. |
358 | 355 | ||
359 | resize Allows to resize filesystem to the end of the last | ||
360 | existing block group, further resize has to be done | ||
361 | with resize2fs either online, or offline. It can be | ||
362 | used only with conjunction with remount. | ||
363 | |||
364 | block_validity This options allows to enables/disables the in-kernel | 356 | block_validity This options allows to enables/disables the in-kernel |
365 | noblock_validity facility for tracking filesystem metadata blocks | 357 | noblock_validity facility for tracking filesystem metadata blocks |
366 | within internal data structures. This allows multi- | 358 | within internal data structures. This allows multi- |
diff --git a/Documentation/filesystems/files.txt b/Documentation/filesystems/files.txt index ac2facc50d2a..46dfc6b038c3 100644 --- a/Documentation/filesystems/files.txt +++ b/Documentation/filesystems/files.txt | |||
@@ -113,8 +113,8 @@ the fdtable structure - | |||
113 | if (fd >= 0) { | 113 | if (fd >= 0) { |
114 | /* locate_fd() may have expanded fdtable, load the ptr */ | 114 | /* locate_fd() may have expanded fdtable, load the ptr */ |
115 | fdt = files_fdtable(files); | 115 | fdt = files_fdtable(files); |
116 | FD_SET(fd, fdt->open_fds); | 116 | __set_open_fd(fd, fdt); |
117 | FD_CLR(fd, fdt->close_on_exec); | 117 | __clear_close_on_exec(fd, fdt); |
118 | spin_unlock(&files->file_lock); | 118 | spin_unlock(&files->file_lock); |
119 | ..... | 119 | ..... |
120 | 120 | ||
diff --git a/Documentation/filesystems/nfs/idmapper.txt b/Documentation/filesystems/nfs/idmapper.txt index 120fd3cf7fd9..fe03d10bb79a 100644 --- a/Documentation/filesystems/nfs/idmapper.txt +++ b/Documentation/filesystems/nfs/idmapper.txt | |||
@@ -4,13 +4,21 @@ ID Mapper | |||
4 | ========= | 4 | ========= |
5 | Id mapper is used by NFS to translate user and group ids into names, and to | 5 | Id mapper is used by NFS to translate user and group ids into names, and to |
6 | translate user and group names into ids. Part of this translation involves | 6 | translate user and group names into ids. Part of this translation involves |
7 | performing an upcall to userspace to request the information. Id mapper will | 7 | performing an upcall to userspace to request the information. There are two |
8 | user request-key to perform this upcall and cache the result. The program | 8 | ways NFS could obtain this information: placing a call to /sbin/request-key |
9 | /usr/sbin/nfs.idmap should be called by request-key, and will perform the | 9 | or by placing a call to the rpc.idmap daemon. |
10 | translation and initialize a key with the resulting information. | 10 | |
11 | NFS will attempt to call /sbin/request-key first. If this succeeds, the | ||
12 | result will be cached using the generic request-key cache. This call should | ||
13 | only fail if /etc/request-key.conf is not configured for the id_resolver key | ||
14 | type, see the "Configuring" section below if you wish to use the request-key | ||
15 | method. | ||
16 | |||
17 | If the call to /sbin/request-key fails (if /etc/request-key.conf is not | ||
18 | configured with the id_resolver key type), then the idmapper will ask the | ||
19 | legacy rpc.idmap daemon for the id mapping. This result will be stored | ||
20 | in a custom NFS idmap cache. | ||
11 | 21 | ||
12 | NFS_USE_NEW_IDMAPPER must be selected when configuring the kernel to use this | ||
13 | feature. | ||
14 | 22 | ||
15 | =========== | 23 | =========== |
16 | Configuring | 24 | Configuring |
diff --git a/Documentation/filesystems/nfs/pnfs.txt b/Documentation/filesystems/nfs/pnfs.txt index 983e14abe7e9..c7919c6e3bea 100644 --- a/Documentation/filesystems/nfs/pnfs.txt +++ b/Documentation/filesystems/nfs/pnfs.txt | |||
@@ -53,3 +53,57 @@ lseg maintains an extra reference corresponding to the NFS_LSEG_VALID | |||
53 | bit which holds it in the pnfs_layout_hdr's list. When the final lseg | 53 | bit which holds it in the pnfs_layout_hdr's list. When the final lseg |
54 | is removed from the pnfs_layout_hdr's list, the NFS_LAYOUT_DESTROYED | 54 | is removed from the pnfs_layout_hdr's list, the NFS_LAYOUT_DESTROYED |
55 | bit is set, preventing any new lsegs from being added. | 55 | bit is set, preventing any new lsegs from being added. |
56 | |||
57 | layout drivers | ||
58 | -------------- | ||
59 | |||
60 | PNFS utilizes what is called layout drivers. The STD defines 3 basic | ||
61 | layout types: "files" "objects" and "blocks". For each of these types | ||
62 | there is a layout-driver with a common function-vectors table which | ||
63 | are called by the nfs-client pnfs-core to implement the different layout | ||
64 | types. | ||
65 | |||
66 | Files-layout-driver code is in: fs/nfs/nfs4filelayout.c && nfs4filelayoutdev.c | ||
67 | Objects-layout-deriver code is in: fs/nfs/objlayout/.. directory | ||
68 | Blocks-layout-deriver code is in: fs/nfs/blocklayout/.. directory | ||
69 | |||
70 | objects-layout setup | ||
71 | -------------------- | ||
72 | |||
73 | As part of the full STD implementation the objlayoutdriver.ko needs, at times, | ||
74 | to automatically login to yet undiscovered iscsi/osd devices. For this the | ||
75 | driver makes up-calles to a user-mode script called *osd_login* | ||
76 | |||
77 | The path_name of the script to use is by default: | ||
78 | /sbin/osd_login. | ||
79 | This name can be overridden by the Kernel module parameter: | ||
80 | objlayoutdriver.osd_login_prog | ||
81 | |||
82 | If Kernel does not find the osd_login_prog path it will zero it out | ||
83 | and will not attempt farther logins. An admin can then write new value | ||
84 | to the objlayoutdriver.osd_login_prog Kernel parameter to re-enable it. | ||
85 | |||
86 | The /sbin/osd_login is part of the nfs-utils package, and should usually | ||
87 | be installed on distributions that support this Kernel version. | ||
88 | |||
89 | The API to the login script is as follows: | ||
90 | Usage: $0 -u <URI> -o <OSDNAME> -s <SYSTEMID> | ||
91 | Options: | ||
92 | -u target uri e.g. iscsi://<ip>:<port> | ||
93 | (allways exists) | ||
94 | (More protocols can be defined in the future. | ||
95 | The client does not interpret this string it is | ||
96 | passed unchanged as recieved from the Server) | ||
97 | -o osdname of the requested target OSD | ||
98 | (Might be empty) | ||
99 | (A string which denotes the OSD name, there is a | ||
100 | limit of 64 chars on this string) | ||
101 | -s systemid of the requested target OSD | ||
102 | (Might be empty) | ||
103 | (This string, if not empty is always an hex | ||
104 | representation of the 20 bytes osd_system_id) | ||
105 | |||
106 | blocks-layout setup | ||
107 | ------------------- | ||
108 | |||
109 | TODO: Document the setup needs of the blocks layout driver | ||
diff --git a/Documentation/filesystems/porting b/Documentation/filesystems/porting index b4a3d765ff9a..74acd9618819 100644 --- a/Documentation/filesystems/porting +++ b/Documentation/filesystems/porting | |||
@@ -429,3 +429,9 @@ filemap_write_and_wait_range() so that all dirty pages are synced out properly. | |||
429 | You must also keep in mind that ->fsync() is not called with i_mutex held | 429 | You must also keep in mind that ->fsync() is not called with i_mutex held |
430 | anymore, so if you require i_mutex locking you must make sure to take it and | 430 | anymore, so if you require i_mutex locking you must make sure to take it and |
431 | release it yourself. | 431 | release it yourself. |
432 | |||
433 | -- | ||
434 | [mandatory] | ||
435 | d_alloc_root() is gone, along with a lot of bugs caused by code | ||
436 | misusing it. Replacement: d_make_root(inode). The difference is, | ||
437 | d_make_root() drops the reference to inode if dentry allocation fails. | ||
diff --git a/Documentation/filesystems/proc.txt b/Documentation/filesystems/proc.txt index a76a26a1db8a..b7413cb46dcb 100644 --- a/Documentation/filesystems/proc.txt +++ b/Documentation/filesystems/proc.txt | |||
@@ -290,7 +290,7 @@ Table 1-4: Contents of the stat files (as of 2.6.30-rc7) | |||
290 | rsslim current limit in bytes on the rss | 290 | rsslim current limit in bytes on the rss |
291 | start_code address above which program text can run | 291 | start_code address above which program text can run |
292 | end_code address below which program text can run | 292 | end_code address below which program text can run |
293 | start_stack address of the start of the stack | 293 | start_stack address of the start of the main process stack |
294 | esp current value of ESP | 294 | esp current value of ESP |
295 | eip current value of EIP | 295 | eip current value of EIP |
296 | pending bitmap of pending signals | 296 | pending bitmap of pending signals |
@@ -325,7 +325,7 @@ address perms offset dev inode pathname | |||
325 | a7cb1000-a7cb2000 ---p 00000000 00:00 0 | 325 | a7cb1000-a7cb2000 ---p 00000000 00:00 0 |
326 | a7cb2000-a7eb2000 rw-p 00000000 00:00 0 | 326 | a7cb2000-a7eb2000 rw-p 00000000 00:00 0 |
327 | a7eb2000-a7eb3000 ---p 00000000 00:00 0 | 327 | a7eb2000-a7eb3000 ---p 00000000 00:00 0 |
328 | a7eb3000-a7ed5000 rw-p 00000000 00:00 0 | 328 | a7eb3000-a7ed5000 rw-p 00000000 00:00 0 [stack:1001] |
329 | a7ed5000-a8008000 r-xp 00000000 03:00 4222 /lib/libc.so.6 | 329 | a7ed5000-a8008000 r-xp 00000000 03:00 4222 /lib/libc.so.6 |
330 | a8008000-a800a000 r--p 00133000 03:00 4222 /lib/libc.so.6 | 330 | a8008000-a800a000 r--p 00133000 03:00 4222 /lib/libc.so.6 |
331 | a800a000-a800b000 rw-p 00135000 03:00 4222 /lib/libc.so.6 | 331 | a800a000-a800b000 rw-p 00135000 03:00 4222 /lib/libc.so.6 |
@@ -357,11 +357,39 @@ is not associated with a file: | |||
357 | 357 | ||
358 | [heap] = the heap of the program | 358 | [heap] = the heap of the program |
359 | [stack] = the stack of the main process | 359 | [stack] = the stack of the main process |
360 | [stack:1001] = the stack of the thread with tid 1001 | ||
360 | [vdso] = the "virtual dynamic shared object", | 361 | [vdso] = the "virtual dynamic shared object", |
361 | the kernel system call handler | 362 | the kernel system call handler |
362 | 363 | ||
363 | or if empty, the mapping is anonymous. | 364 | or if empty, the mapping is anonymous. |
364 | 365 | ||
366 | The /proc/PID/task/TID/maps is a view of the virtual memory from the viewpoint | ||
367 | of the individual tasks of a process. In this file you will see a mapping marked | ||
368 | as [stack] if that task sees it as a stack. This is a key difference from the | ||
369 | content of /proc/PID/maps, where you will see all mappings that are being used | ||
370 | as stack by all of those tasks. Hence, for the example above, the task-level | ||
371 | map, i.e. /proc/PID/task/TID/maps for thread 1001 will look like this: | ||
372 | |||
373 | 08048000-08049000 r-xp 00000000 03:00 8312 /opt/test | ||
374 | 08049000-0804a000 rw-p 00001000 03:00 8312 /opt/test | ||
375 | 0804a000-0806b000 rw-p 00000000 00:00 0 [heap] | ||
376 | a7cb1000-a7cb2000 ---p 00000000 00:00 0 | ||
377 | a7cb2000-a7eb2000 rw-p 00000000 00:00 0 | ||
378 | a7eb2000-a7eb3000 ---p 00000000 00:00 0 | ||
379 | a7eb3000-a7ed5000 rw-p 00000000 00:00 0 [stack] | ||
380 | a7ed5000-a8008000 r-xp 00000000 03:00 4222 /lib/libc.so.6 | ||
381 | a8008000-a800a000 r--p 00133000 03:00 4222 /lib/libc.so.6 | ||
382 | a800a000-a800b000 rw-p 00135000 03:00 4222 /lib/libc.so.6 | ||
383 | a800b000-a800e000 rw-p 00000000 00:00 0 | ||
384 | a800e000-a8022000 r-xp 00000000 03:00 14462 /lib/libpthread.so.0 | ||
385 | a8022000-a8023000 r--p 00013000 03:00 14462 /lib/libpthread.so.0 | ||
386 | a8023000-a8024000 rw-p 00014000 03:00 14462 /lib/libpthread.so.0 | ||
387 | a8024000-a8027000 rw-p 00000000 00:00 0 | ||
388 | a8027000-a8043000 r-xp 00000000 03:00 8317 /lib/ld-linux.so.2 | ||
389 | a8043000-a8044000 r--p 0001b000 03:00 8317 /lib/ld-linux.so.2 | ||
390 | a8044000-a8045000 rw-p 0001c000 03:00 8317 /lib/ld-linux.so.2 | ||
391 | aff35000-aff4a000 rw-p 00000000 00:00 0 | ||
392 | ffffe000-fffff000 r-xp 00000000 00:00 0 [vdso] | ||
365 | 393 | ||
366 | The /proc/PID/smaps is an extension based on maps, showing the memory | 394 | The /proc/PID/smaps is an extension based on maps, showing the memory |
367 | consumption for each of the process's mappings. For each of mappings there | 395 | consumption for each of the process's mappings. For each of mappings there |
diff --git a/Documentation/filesystems/qnx6.txt b/Documentation/filesystems/qnx6.txt new file mode 100644 index 000000000000..050223ea03c7 --- /dev/null +++ b/Documentation/filesystems/qnx6.txt | |||
@@ -0,0 +1,174 @@ | |||
1 | The QNX6 Filesystem | ||
2 | =================== | ||
3 | |||
4 | The qnx6fs is used by newer QNX operating system versions. (e.g. Neutrino) | ||
5 | It got introduced in QNX 6.4.0 and is used default since 6.4.1. | ||
6 | |||
7 | Option | ||
8 | ====== | ||
9 | |||
10 | mmi_fs Mount filesystem as used for example by Audi MMI 3G system | ||
11 | |||
12 | Specification | ||
13 | ============= | ||
14 | |||
15 | qnx6fs shares many properties with traditional Unix filesystems. It has the | ||
16 | concepts of blocks, inodes and directories. | ||
17 | On QNX it is possible to create little endian and big endian qnx6 filesystems. | ||
18 | This feature makes it possible to create and use a different endianness fs | ||
19 | for the target (QNX is used on quite a range of embedded systems) plattform | ||
20 | running on a different endianess. | ||
21 | The Linux driver handles endianness transparently. (LE and BE) | ||
22 | |||
23 | Blocks | ||
24 | ------ | ||
25 | |||
26 | The space in the device or file is split up into blocks. These are a fixed | ||
27 | size of 512, 1024, 2048 or 4096, which is decided when the filesystem is | ||
28 | created. | ||
29 | Blockpointers are 32bit, so the maximum space that can be adressed is | ||
30 | 2^32 * 4096 bytes or 16TB | ||
31 | |||
32 | The superblocks | ||
33 | --------------- | ||
34 | |||
35 | The superblock contains all global information about the filesystem. | ||
36 | Each qnx6fs got two superblocks, each one having a 64bit serial number. | ||
37 | That serial number is used to identify the "active" superblock. | ||
38 | In write mode with reach new snapshot (after each synchronous write), the | ||
39 | serial of the new master superblock is increased (old superblock serial + 1) | ||
40 | |||
41 | So basically the snapshot functionality is realized by an atomic final | ||
42 | update of the serial number. Before updating that serial, all modifications | ||
43 | are done by copying all modified blocks during that specific write request | ||
44 | (or period) and building up a new (stable) filesystem structure under the | ||
45 | inactive superblock. | ||
46 | |||
47 | Each superblock holds a set of root inodes for the different filesystem | ||
48 | parts. (Inode, Bitmap and Longfilenames) | ||
49 | Each of these root nodes holds information like total size of the stored | ||
50 | data and the adressing levels in that specific tree. | ||
51 | If the level value is 0, up to 16 direct blocks can be adressed by each | ||
52 | node. | ||
53 | Level 1 adds an additional indirect adressing level where each indirect | ||
54 | adressing block holds up to blocksize / 4 bytes pointers to data blocks. | ||
55 | Level 2 adds an additional indirect adressig block level (so, already up | ||
56 | to 16 * 256 * 256 = 1048576 blocks that can be adressed by such a tree)a | ||
57 | |||
58 | Unused block pointers are always set to ~0 - regardless of root node, | ||
59 | indirect adressing blocks or inodes. | ||
60 | Data leaves are always on the lowest level. So no data is stored on upper | ||
61 | tree levels. | ||
62 | |||
63 | The first Superblock is located at 0x2000. (0x2000 is the bootblock size) | ||
64 | The Audi MMI 3G first superblock directly starts at byte 0. | ||
65 | Second superblock position can either be calculated from the superblock | ||
66 | information (total number of filesystem blocks) or by taking the highest | ||
67 | device address, zeroing the last 3 bytes and then substracting 0x1000 from | ||
68 | that address. | ||
69 | |||
70 | 0x1000 is the size reserved for each superblock - regardless of the | ||
71 | blocksize of the filesystem. | ||
72 | |||
73 | Inodes | ||
74 | ------ | ||
75 | |||
76 | Each object in the filesystem is represented by an inode. (index node) | ||
77 | The inode structure contains pointers to the filesystem blocks which contain | ||
78 | the data held in the object and all of the metadata about an object except | ||
79 | its longname. (filenames longer than 27 characters) | ||
80 | The metadata about an object includes the permissions, owner, group, flags, | ||
81 | size, number of blocks used, access time, change time and modification time. | ||
82 | |||
83 | Object mode field is POSIX format. (which makes things easier) | ||
84 | |||
85 | There are also pointers to the first 16 blocks, if the object data can be | ||
86 | adressed with 16 direct blocks. | ||
87 | For more than 16 blocks an indirect adressing in form of another tree is | ||
88 | used. (scheme is the same as the one used for the superblock root nodes) | ||
89 | |||
90 | The filesize is stored 64bit. Inode counting starts with 1. (whilst long | ||
91 | filename inodes start with 0) | ||
92 | |||
93 | Directories | ||
94 | ----------- | ||
95 | |||
96 | A directory is a filesystem object and has an inode just like a file. | ||
97 | It is a specially formatted file containing records which associate each | ||
98 | name with an inode number. | ||
99 | '.' inode number points to the directory inode | ||
100 | '..' inode number points to the parent directory inode | ||
101 | Eeach filename record additionally got a filename length field. | ||
102 | |||
103 | One special case are long filenames or subdirectory names. | ||
104 | These got set a filename length field of 0xff in the corresponding directory | ||
105 | record plus the longfile inode number also stored in that record. | ||
106 | With that longfilename inode number, the longfilename tree can be walked | ||
107 | starting with the superblock longfilename root node pointers. | ||
108 | |||
109 | Special files | ||
110 | ------------- | ||
111 | |||
112 | Symbolic links are also filesystem objects with inodes. They got a specific | ||
113 | bit in the inode mode field identifying them as symbolic link. | ||
114 | The directory entry file inode pointer points to the target file inode. | ||
115 | |||
116 | Hard links got an inode, a directory entry, but a specific mode bit set, | ||
117 | no block pointers and the directory file record pointing to the target file | ||
118 | inode. | ||
119 | |||
120 | Character and block special devices do not exist in QNX as those files | ||
121 | are handled by the QNX kernel/drivers and created in /dev independant of the | ||
122 | underlaying filesystem. | ||
123 | |||
124 | Long filenames | ||
125 | -------------- | ||
126 | |||
127 | Long filenames are stored in a seperate adressing tree. The staring point | ||
128 | is the longfilename root node in the active superblock. | ||
129 | Each data block (tree leaves) holds one long filename. That filename is | ||
130 | limited to 510 bytes. The first two starting bytes are used as length field | ||
131 | for the actual filename. | ||
132 | If that structure shall fit for all allowed blocksizes, it is clear why there | ||
133 | is a limit of 510 bytes for the actual filename stored. | ||
134 | |||
135 | Bitmap | ||
136 | ------ | ||
137 | |||
138 | The qnx6fs filesystem allocation bitmap is stored in a tree under bitmap | ||
139 | root node in the superblock and each bit in the bitmap represents one | ||
140 | filesystem block. | ||
141 | The first block is block 0, which starts 0x1000 after superblock start. | ||
142 | So for a normal qnx6fs 0x3000 (bootblock + superblock) is the physical | ||
143 | address at which block 0 is located. | ||
144 | |||
145 | Bits at the end of the last bitmap block are set to 1, if the device is | ||
146 | smaller than addressing space in the bitmap. | ||
147 | |||
148 | Bitmap system area | ||
149 | ------------------ | ||
150 | |||
151 | The bitmap itself is devided into three parts. | ||
152 | First the system area, that is split into two halfs. | ||
153 | Then userspace. | ||
154 | |||
155 | The requirement for a static, fixed preallocated system area comes from how | ||
156 | qnx6fs deals with writes. | ||
157 | Each superblock got it's own half of the system area. So superblock #1 | ||
158 | always uses blocks from the lower half whilst superblock #2 just writes to | ||
159 | blocks represented by the upper half bitmap system area bits. | ||
160 | |||
161 | Bitmap blocks, Inode blocks and indirect addressing blocks for those two | ||
162 | tree structures are treated as system blocks. | ||
163 | |||
164 | The rational behind that is that a write request can work on a new snapshot | ||
165 | (system area of the inactive - resp. lower serial numbered superblock) while | ||
166 | at the same time there is still a complete stable filesystem structer in the | ||
167 | other half of the system area. | ||
168 | |||
169 | When finished with writing (a sync write is completed, the maximum sync leap | ||
170 | time or a filesystem sync is requested), serial of the previously inactive | ||
171 | superblock atomically is increased and the fs switches over to that - then | ||
172 | stable declared - superblock. | ||
173 | |||
174 | For all data outside the system area, blocks are just copied while writing. | ||
diff --git a/Documentation/gpio.txt b/Documentation/gpio.txt index 792faa3c06cf..620a07844e8c 100644 --- a/Documentation/gpio.txt +++ b/Documentation/gpio.txt | |||
@@ -271,9 +271,26 @@ Some platforms may also use knowledge about what GPIOs are active for | |||
271 | power management, such as by powering down unused chip sectors and, more | 271 | power management, such as by powering down unused chip sectors and, more |
272 | easily, gating off unused clocks. | 272 | easily, gating off unused clocks. |
273 | 273 | ||
274 | Note that requesting a GPIO does NOT cause it to be configured in any | 274 | For GPIOs that use pins known to the pinctrl subsystem, that subsystem should |
275 | way; it just marks that GPIO as in use. Separate code must handle any | 275 | be informed of their use; a gpiolib driver's .request() operation may call |
276 | pin setup (e.g. controlling which pin the GPIO uses, pullup/pulldown). | 276 | pinctrl_request_gpio(), and a gpiolib driver's .free() operation may call |
277 | pinctrl_free_gpio(). The pinctrl subsystem allows a pinctrl_request_gpio() | ||
278 | to succeed concurrently with a pin or pingroup being "owned" by a device for | ||
279 | pin multiplexing. | ||
280 | |||
281 | Any programming of pin multiplexing hardware that is needed to route the | ||
282 | GPIO signal to the appropriate pin should occur within a GPIO driver's | ||
283 | .direction_input() or .direction_output() operations, and occur after any | ||
284 | setup of an output GPIO's value. This allows a glitch-free migration from a | ||
285 | pin's special function to GPIO. This is sometimes required when using a GPIO | ||
286 | to implement a workaround on signals typically driven by a non-GPIO HW block. | ||
287 | |||
288 | Some platforms allow some or all GPIO signals to be routed to different pins. | ||
289 | Similarly, other aspects of the GPIO or pin may need to be configured, such as | ||
290 | pullup/pulldown. Platform software should arrange that any such details are | ||
291 | configured prior to gpio_request() being called for those GPIOs, e.g. using | ||
292 | the pinctrl subsystem's mapping table, so that GPIO users need not be aware | ||
293 | of these details. | ||
277 | 294 | ||
278 | Also note that it's your responsibility to have stopped using a GPIO | 295 | Also note that it's your responsibility to have stopped using a GPIO |
279 | before you free it. | 296 | before you free it. |
@@ -302,6 +319,8 @@ where 'flags' is currently defined to specify the following properties: | |||
302 | 319 | ||
303 | * GPIOF_INIT_LOW - as output, set initial level to LOW | 320 | * GPIOF_INIT_LOW - as output, set initial level to LOW |
304 | * GPIOF_INIT_HIGH - as output, set initial level to HIGH | 321 | * GPIOF_INIT_HIGH - as output, set initial level to HIGH |
322 | * GPIOF_OPEN_DRAIN - gpio pin is open drain type. | ||
323 | * GPIOF_OPEN_SOURCE - gpio pin is open source type. | ||
305 | 324 | ||
306 | since GPIOF_INIT_* are only valid when configured as output, so group valid | 325 | since GPIOF_INIT_* are only valid when configured as output, so group valid |
307 | combinations as: | 326 | combinations as: |
@@ -310,8 +329,19 @@ combinations as: | |||
310 | * GPIOF_OUT_INIT_LOW - configured as output, initial level LOW | 329 | * GPIOF_OUT_INIT_LOW - configured as output, initial level LOW |
311 | * GPIOF_OUT_INIT_HIGH - configured as output, initial level HIGH | 330 | * GPIOF_OUT_INIT_HIGH - configured as output, initial level HIGH |
312 | 331 | ||
313 | In the future, these flags can be extended to support more properties such | 332 | When setting the flag as GPIOF_OPEN_DRAIN then it will assume that pins is |
314 | as open-drain status. | 333 | open drain type. Such pins will not be driven to 1 in output mode. It is |
334 | require to connect pull-up on such pins. By enabling this flag, gpio lib will | ||
335 | make the direction to input when it is asked to set value of 1 in output mode | ||
336 | to make the pin HIGH. The pin is make to LOW by driving value 0 in output mode. | ||
337 | |||
338 | When setting the flag as GPIOF_OPEN_SOURCE then it will assume that pins is | ||
339 | open source type. Such pins will not be driven to 0 in output mode. It is | ||
340 | require to connect pull-down on such pin. By enabling this flag, gpio lib will | ||
341 | make the direction to input when it is asked to set value of 0 in output mode | ||
342 | to make the pin LOW. The pin is make to HIGH by driving value 1 in output mode. | ||
343 | |||
344 | In the future, these flags can be extended to support more properties. | ||
315 | 345 | ||
316 | Further more, to ease the claim/release of multiple GPIOs, 'struct gpio' is | 346 | Further more, to ease the claim/release of multiple GPIOs, 'struct gpio' is |
317 | introduced to encapsulate all three fields as: | 347 | introduced to encapsulate all three fields as: |
diff --git a/Documentation/hwmon/adm1275 b/Documentation/hwmon/adm1275 index e5f982c845fd..2cfa25667123 100644 --- a/Documentation/hwmon/adm1275 +++ b/Documentation/hwmon/adm1275 | |||
@@ -2,6 +2,10 @@ Kernel driver adm1275 | |||
2 | ===================== | 2 | ===================== |
3 | 3 | ||
4 | Supported chips: | 4 | Supported chips: |
5 | * Analog Devices ADM1075 | ||
6 | Prefix: 'adm1075' | ||
7 | Addresses scanned: - | ||
8 | Datasheet: www.analog.com/static/imported-files/data_sheets/ADM1075.pdf | ||
5 | * Analog Devices ADM1275 | 9 | * Analog Devices ADM1275 |
6 | Prefix: 'adm1275' | 10 | Prefix: 'adm1275' |
7 | Addresses scanned: - | 11 | Addresses scanned: - |
@@ -17,13 +21,13 @@ Author: Guenter Roeck <guenter.roeck@ericsson.com> | |||
17 | Description | 21 | Description |
18 | ----------- | 22 | ----------- |
19 | 23 | ||
20 | This driver supports hardware montoring for Analog Devices ADM1275 and ADM1276 | 24 | This driver supports hardware montoring for Analog Devices ADM1075, ADM1275, |
21 | Hot-Swap Controller and Digital Power Monitor. | 25 | and ADM1276 Hot-Swap Controller and Digital Power Monitor. |
22 | 26 | ||
23 | ADM1275 and ADM1276 are hot-swap controllers that allow a circuit board to be | 27 | ADM1075, ADM1275, and ADM1276 are hot-swap controllers that allow a circuit |
24 | removed from or inserted into a live backplane. They also feature current and | 28 | board to be removed from or inserted into a live backplane. They also feature |
25 | voltage readback via an integrated 12-bit analog-to-digital converter (ADC), | 29 | current and voltage readback via an integrated 12-bit analog-to-digital |
26 | accessed using a PMBus interface. | 30 | converter (ADC), accessed using a PMBus interface. |
27 | 31 | ||
28 | The driver is a client driver to the core PMBus driver. Please see | 32 | The driver is a client driver to the core PMBus driver. Please see |
29 | Documentation/hwmon/pmbus for details on PMBus client drivers. | 33 | Documentation/hwmon/pmbus for details on PMBus client drivers. |
@@ -36,6 +40,10 @@ This driver does not auto-detect devices. You will have to instantiate the | |||
36 | devices explicitly. Please see Documentation/i2c/instantiating-devices for | 40 | devices explicitly. Please see Documentation/i2c/instantiating-devices for |
37 | details. | 41 | details. |
38 | 42 | ||
43 | The ADM1075, unlike many other PMBus devices, does not support internal voltage | ||
44 | or current scaling. Reported voltages, currents, and power are raw measurements, | ||
45 | and will typically have to be scaled. | ||
46 | |||
39 | 47 | ||
40 | Platform data support | 48 | Platform data support |
41 | --------------------- | 49 | --------------------- |
@@ -51,7 +59,8 @@ The following attributes are supported. Limits are read-write, history reset | |||
51 | attributes are write-only, all other attributes are read-only. | 59 | attributes are write-only, all other attributes are read-only. |
52 | 60 | ||
53 | in1_label "vin1" or "vout1" depending on chip variant and | 61 | in1_label "vin1" or "vout1" depending on chip variant and |
54 | configuration. | 62 | configuration. On ADM1075, vout1 reports the voltage on |
63 | the VAUX pin. | ||
55 | in1_input Measured voltage. | 64 | in1_input Measured voltage. |
56 | in1_min Minimum Voltage. | 65 | in1_min Minimum Voltage. |
57 | in1_max Maximum voltage. | 66 | in1_max Maximum voltage. |
@@ -74,3 +83,10 @@ curr1_crit Critical maximum current. Depending on the chip | |||
74 | curr1_crit_alarm Critical current high alarm. | 83 | curr1_crit_alarm Critical current high alarm. |
75 | curr1_highest Historical maximum current. | 84 | curr1_highest Historical maximum current. |
76 | curr1_reset_history Write any value to reset history. | 85 | curr1_reset_history Write any value to reset history. |
86 | |||
87 | power1_label "pin1" | ||
88 | power1_input Input power. | ||
89 | power1_reset_history Write any value to reset history. | ||
90 | |||
91 | Power attributes are supported on ADM1075 and ADM1276 | ||
92 | only. | ||
diff --git a/Documentation/hwmon/jc42 b/Documentation/hwmon/jc42 index a22ecf48f255..66ecb9fc8246 100644 --- a/Documentation/hwmon/jc42 +++ b/Documentation/hwmon/jc42 | |||
@@ -3,57 +3,50 @@ Kernel driver jc42 | |||
3 | 3 | ||
4 | Supported chips: | 4 | Supported chips: |
5 | * Analog Devices ADT7408 | 5 | * Analog Devices ADT7408 |
6 | Prefix: 'adt7408' | ||
7 | Addresses scanned: I2C 0x18 - 0x1f | ||
8 | Datasheets: | 6 | Datasheets: |
9 | http://www.analog.com/static/imported-files/data_sheets/ADT7408.pdf | 7 | http://www.analog.com/static/imported-files/data_sheets/ADT7408.pdf |
10 | * IDT TSE2002B3, TS3000B3 | 8 | * Atmel AT30TS00 |
11 | Prefix: 'tse2002b3', 'ts3000b3' | ||
12 | Addresses scanned: I2C 0x18 - 0x1f | ||
13 | Datasheets: | 9 | Datasheets: |
14 | http://www.idt.com/products/getdoc.cfm?docid=18715691 | 10 | http://www.atmel.com/Images/doc8585.pdf |
15 | http://www.idt.com/products/getdoc.cfm?docid=18715692 | 11 | * IDT TSE2002B3, TSE2002GB2, TS3000B3, TS3000GB2 |
12 | Datasheets: | ||
13 | http://www.idt.com/sites/default/files/documents/IDT_TSE2002B3C_DST_20100512_120303152056.pdf | ||
14 | http://www.idt.com/sites/default/files/documents/IDT_TSE2002GB2A1_DST_20111107_120303145914.pdf | ||
15 | http://www.idt.com/sites/default/files/documents/IDT_TS3000B3A_DST_20101129_120303152013.pdf | ||
16 | http://www.idt.com/sites/default/files/documents/IDT_TS3000GB2A1_DST_20111104_120303151012.pdf | ||
16 | * Maxim MAX6604 | 17 | * Maxim MAX6604 |
17 | Prefix: 'max6604' | ||
18 | Addresses scanned: I2C 0x18 - 0x1f | ||
19 | Datasheets: | 18 | Datasheets: |
20 | http://datasheets.maxim-ic.com/en/ds/MAX6604.pdf | 19 | http://datasheets.maxim-ic.com/en/ds/MAX6604.pdf |
21 | * Microchip MCP9805, MCP98242, MCP98243, MCP9843 | 20 | * Microchip MCP9804, MCP9805, MCP98242, MCP98243, MCP9843 |
22 | Prefixes: 'mcp9805', 'mcp98242', 'mcp98243', 'mcp9843' | ||
23 | Addresses scanned: I2C 0x18 - 0x1f | ||
24 | Datasheets: | 21 | Datasheets: |
22 | http://ww1.microchip.com/downloads/en/DeviceDoc/22203C.pdf | ||
25 | http://ww1.microchip.com/downloads/en/DeviceDoc/21977b.pdf | 23 | http://ww1.microchip.com/downloads/en/DeviceDoc/21977b.pdf |
26 | http://ww1.microchip.com/downloads/en/DeviceDoc/21996a.pdf | 24 | http://ww1.microchip.com/downloads/en/DeviceDoc/21996a.pdf |
27 | http://ww1.microchip.com/downloads/en/DeviceDoc/22153c.pdf | 25 | http://ww1.microchip.com/downloads/en/DeviceDoc/22153c.pdf |
28 | * NXP Semiconductors SE97, SE97B | 26 | * NXP Semiconductors SE97, SE97B, SE98, SE98A |
29 | Prefix: 'se97' | ||
30 | Addresses scanned: I2C 0x18 - 0x1f | ||
31 | Datasheets: | 27 | Datasheets: |
32 | http://www.nxp.com/documents/data_sheet/SE97.pdf | 28 | http://www.nxp.com/documents/data_sheet/SE97.pdf |
33 | http://www.nxp.com/documents/data_sheet/SE97B.pdf | 29 | http://www.nxp.com/documents/data_sheet/SE97B.pdf |
34 | * NXP Semiconductors SE98 | ||
35 | Prefix: 'se98' | ||
36 | Addresses scanned: I2C 0x18 - 0x1f | ||
37 | Datasheets: | ||
38 | http://www.nxp.com/documents/data_sheet/SE98.pdf | 30 | http://www.nxp.com/documents/data_sheet/SE98.pdf |
31 | http://www.nxp.com/documents/data_sheet/SE98A.pdf | ||
39 | * ON Semiconductor CAT34TS02, CAT6095 | 32 | * ON Semiconductor CAT34TS02, CAT6095 |
40 | Prefix: 'cat34ts02', 'cat6095' | ||
41 | Addresses scanned: I2C 0x18 - 0x1f | ||
42 | Datasheet: | 33 | Datasheet: |
43 | http://www.onsemi.com/pub_link/Collateral/CAT34TS02-D.PDF | 34 | http://www.onsemi.com/pub_link/Collateral/CAT34TS02-D.PDF |
44 | http://www.onsemi.com/pub/Collateral/CAT6095-D.PDF | 35 | http://www.onsemi.com/pub/Collateral/CAT6095-D.PDF |
45 | * ST Microelectronics STTS424, STTS424E02 | 36 | * ST Microelectronics STTS424, STTS424E02, STTS2002, STTS3000 |
46 | Prefix: 'stts424' | ||
47 | Addresses scanned: I2C 0x18 - 0x1f | ||
48 | Datasheets: | 37 | Datasheets: |
49 | http://www.st.com/stonline/products/literature/ds/13447/stts424.pdf | 38 | http://www.st.com/internet/com/TECHNICAL_RESOURCES/TECHNICAL_LITERATURE/DATASHEET/CD00157556.pdf |
50 | http://www.st.com/stonline/products/literature/ds/13448/stts424e02.pdf | 39 | http://www.st.com/internet/com/TECHNICAL_RESOURCES/TECHNICAL_LITERATURE/DATASHEET/CD00157558.pdf |
40 | http://www.st.com/internet/com/TECHNICAL_RESOURCES/TECHNICAL_LITERATURE/DATASHEET/CD00225278.pdf | ||
41 | http://www.st.com/internet/com/TECHNICAL_RESOURCES/TECHNICAL_LITERATURE/DATA_BRIEF/CD00270920.pdf | ||
51 | * JEDEC JC 42.4 compliant temperature sensor chips | 42 | * JEDEC JC 42.4 compliant temperature sensor chips |
52 | Prefix: 'jc42' | ||
53 | Addresses scanned: I2C 0x18 - 0x1f | ||
54 | Datasheet: | 43 | Datasheet: |
55 | http://www.jedec.org/sites/default/files/docs/4_01_04R19.pdf | 44 | http://www.jedec.org/sites/default/files/docs/4_01_04R19.pdf |
56 | 45 | ||
46 | Common for all chips: | ||
47 | Prefix: 'jc42' | ||
48 | Addresses scanned: I2C 0x18 - 0x1f | ||
49 | |||
57 | Author: | 50 | Author: |
58 | Guenter Roeck <guenter.roeck@ericsson.com> | 51 | Guenter Roeck <guenter.roeck@ericsson.com> |
59 | 52 | ||
diff --git a/Documentation/hwmon/k10temp b/Documentation/hwmon/k10temp index a10f73624ad3..90956b618025 100644 --- a/Documentation/hwmon/k10temp +++ b/Documentation/hwmon/k10temp | |||
@@ -11,7 +11,7 @@ Supported chips: | |||
11 | Socket S1G2: Athlon (X2), Sempron (X2), Turion X2 (Ultra) | 11 | Socket S1G2: Athlon (X2), Sempron (X2), Turion X2 (Ultra) |
12 | * AMD Family 12h processors: "Llano" (E2/A4/A6/A8-Series) | 12 | * AMD Family 12h processors: "Llano" (E2/A4/A6/A8-Series) |
13 | * AMD Family 14h processors: "Brazos" (C/E/G/Z-Series) | 13 | * AMD Family 14h processors: "Brazos" (C/E/G/Z-Series) |
14 | * AMD Family 15h processors: "Bulldozer" | 14 | * AMD Family 15h processors: "Bulldozer" (FX-Series), "Trinity" |
15 | 15 | ||
16 | Prefix: 'k10temp' | 16 | Prefix: 'k10temp' |
17 | Addresses scanned: PCI space | 17 | Addresses scanned: PCI space |
diff --git a/Documentation/hwmon/lm80 b/Documentation/hwmon/lm80 index cb5b407ba3e6..a60b43efc32b 100644 --- a/Documentation/hwmon/lm80 +++ b/Documentation/hwmon/lm80 | |||
@@ -7,6 +7,11 @@ Supported chips: | |||
7 | Addresses scanned: I2C 0x28 - 0x2f | 7 | Addresses scanned: I2C 0x28 - 0x2f |
8 | Datasheet: Publicly available at the National Semiconductor website | 8 | Datasheet: Publicly available at the National Semiconductor website |
9 | http://www.national.com/ | 9 | http://www.national.com/ |
10 | * National Semiconductor LM96080 | ||
11 | Prefix: 'lm96080' | ||
12 | Addresses scanned: I2C 0x28 - 0x2f | ||
13 | Datasheet: Publicly available at the National Semiconductor website | ||
14 | http://www.national.com/ | ||
10 | 15 | ||
11 | Authors: | 16 | Authors: |
12 | Frodo Looijaard <frodol@dds.nl>, | 17 | Frodo Looijaard <frodol@dds.nl>, |
@@ -17,7 +22,9 @@ Description | |||
17 | 22 | ||
18 | This driver implements support for the National Semiconductor LM80. | 23 | This driver implements support for the National Semiconductor LM80. |
19 | It is described as a 'Serial Interface ACPI-Compatible Microprocessor | 24 | It is described as a 'Serial Interface ACPI-Compatible Microprocessor |
20 | System Hardware Monitor'. | 25 | System Hardware Monitor'. The LM96080 is a more recent incarnation, |
26 | it is pin and register compatible, with a few additional features not | ||
27 | yet supported by the driver. | ||
21 | 28 | ||
22 | The LM80 implements one temperature sensor, two fan rotation speed sensors, | 29 | The LM80 implements one temperature sensor, two fan rotation speed sensors, |
23 | seven voltage sensors, alarms, and some miscellaneous stuff. | 30 | seven voltage sensors, alarms, and some miscellaneous stuff. |
diff --git a/Documentation/hwmon/lm90 b/Documentation/hwmon/lm90 index 9cd14cfe6515..b466974e142f 100644 --- a/Documentation/hwmon/lm90 +++ b/Documentation/hwmon/lm90 | |||
@@ -118,6 +118,10 @@ Supported chips: | |||
118 | Addresses scanned: I2C 0x48 through 0x4F | 118 | Addresses scanned: I2C 0x48 through 0x4F |
119 | Datasheet: Publicly available at NXP website | 119 | Datasheet: Publicly available at NXP website |
120 | http://ics.nxp.com/products/interface/datasheet/sa56004x.pdf | 120 | http://ics.nxp.com/products/interface/datasheet/sa56004x.pdf |
121 | * GMT G781 | ||
122 | Prefix: 'g781' | ||
123 | Addresses scanned: I2C 0x4c, 0x4d | ||
124 | Datasheet: Not publicly available from GMT | ||
121 | 125 | ||
122 | Author: Jean Delvare <khali@linux-fr.org> | 126 | Author: Jean Delvare <khali@linux-fr.org> |
123 | 127 | ||
diff --git a/Documentation/hwmon/max34440 b/Documentation/hwmon/max34440 index 19743919ea56..04482226db20 100644 --- a/Documentation/hwmon/max34440 +++ b/Documentation/hwmon/max34440 | |||
@@ -11,6 +11,11 @@ Supported chips: | |||
11 | Prefixes: 'max34441' | 11 | Prefixes: 'max34441' |
12 | Addresses scanned: - | 12 | Addresses scanned: - |
13 | Datasheet: http://datasheets.maxim-ic.com/en/ds/MAX34441.pdf | 13 | Datasheet: http://datasheets.maxim-ic.com/en/ds/MAX34441.pdf |
14 | * Maxim MAX34446 | ||
15 | PMBus Power-Supply Data Logger | ||
16 | Prefixes: 'max34446' | ||
17 | Addresses scanned: - | ||
18 | Datasheet: http://datasheets.maxim-ic.com/en/ds/MAX34446.pdf | ||
14 | 19 | ||
15 | Author: Guenter Roeck <guenter.roeck@ericsson.com> | 20 | Author: Guenter Roeck <guenter.roeck@ericsson.com> |
16 | 21 | ||
@@ -19,8 +24,8 @@ Description | |||
19 | ----------- | 24 | ----------- |
20 | 25 | ||
21 | This driver supports hardware montoring for Maxim MAX34440 PMBus 6-Channel | 26 | This driver supports hardware montoring for Maxim MAX34440 PMBus 6-Channel |
22 | Power-Supply Manager and MAX34441 PMBus 5-Channel Power-Supply Manager | 27 | Power-Supply Manager, MAX34441 PMBus 5-Channel Power-Supply Manager |
23 | and Intelligent Fan Controller. | 28 | and Intelligent Fan Controller, and MAX34446 PMBus Power-Supply Data Logger. |
24 | 29 | ||
25 | The driver is a client driver to the core PMBus driver. Please see | 30 | The driver is a client driver to the core PMBus driver. Please see |
26 | Documentation/hwmon/pmbus for details on PMBus client drivers. | 31 | Documentation/hwmon/pmbus for details on PMBus client drivers. |
@@ -33,6 +38,13 @@ This driver does not auto-detect devices. You will have to instantiate the | |||
33 | devices explicitly. Please see Documentation/i2c/instantiating-devices for | 38 | devices explicitly. Please see Documentation/i2c/instantiating-devices for |
34 | details. | 39 | details. |
35 | 40 | ||
41 | For MAX34446, the value of the currX_crit attribute determines if current or | ||
42 | voltage measurement is enabled for a given channel. Voltage measurement is | ||
43 | enabled if currX_crit is set to 0; current measurement is enabled if the | ||
44 | attribute is set to a positive value. Power measurement is only enabled if | ||
45 | channel 1 (3) is configured for voltage measurement, and channel 2 (4) is | ||
46 | configured for current measurement. | ||
47 | |||
36 | 48 | ||
37 | Platform data support | 49 | Platform data support |
38 | --------------------- | 50 | --------------------- |
@@ -56,19 +68,31 @@ in[1-6]_min_alarm Voltage low alarm. From VOLTAGE_UV_WARNING status. | |||
56 | in[1-6]_max_alarm Voltage high alarm. From VOLTAGE_OV_WARNING status. | 68 | in[1-6]_max_alarm Voltage high alarm. From VOLTAGE_OV_WARNING status. |
57 | in[1-6]_lcrit_alarm Voltage critical low alarm. From VOLTAGE_UV_FAULT status. | 69 | in[1-6]_lcrit_alarm Voltage critical low alarm. From VOLTAGE_UV_FAULT status. |
58 | in[1-6]_crit_alarm Voltage critical high alarm. From VOLTAGE_OV_FAULT status. | 70 | in[1-6]_crit_alarm Voltage critical high alarm. From VOLTAGE_OV_FAULT status. |
71 | in[1-6]_lowest Historical minimum voltage. | ||
59 | in[1-6]_highest Historical maximum voltage. | 72 | in[1-6]_highest Historical maximum voltage. |
60 | in[1-6]_reset_history Write any value to reset history. | 73 | in[1-6]_reset_history Write any value to reset history. |
61 | 74 | ||
75 | MAX34446 only supports in[1-4]. | ||
76 | |||
62 | curr[1-6]_label "iout[1-6]". | 77 | curr[1-6]_label "iout[1-6]". |
63 | curr[1-6]_input Measured current. From READ_IOUT register. | 78 | curr[1-6]_input Measured current. From READ_IOUT register. |
64 | curr[1-6]_max Maximum current. From IOUT_OC_WARN_LIMIT register. | 79 | curr[1-6]_max Maximum current. From IOUT_OC_WARN_LIMIT register. |
65 | curr[1-6]_crit Critical maximum current. From IOUT_OC_FAULT_LIMIT register. | 80 | curr[1-6]_crit Critical maximum current. From IOUT_OC_FAULT_LIMIT register. |
66 | curr[1-6]_max_alarm Current high alarm. From IOUT_OC_WARNING status. | 81 | curr[1-6]_max_alarm Current high alarm. From IOUT_OC_WARNING status. |
67 | curr[1-6]_crit_alarm Current critical high alarm. From IOUT_OC_FAULT status. | 82 | curr[1-6]_crit_alarm Current critical high alarm. From IOUT_OC_FAULT status. |
83 | curr[1-4]_average Historical average current (MAX34446 only). | ||
68 | curr[1-6]_highest Historical maximum current. | 84 | curr[1-6]_highest Historical maximum current. |
69 | curr[1-6]_reset_history Write any value to reset history. | 85 | curr[1-6]_reset_history Write any value to reset history. |
70 | 86 | ||
71 | in6 and curr6 attributes only exist for MAX34440. | 87 | in6 and curr6 attributes only exist for MAX34440. |
88 | MAX34446 only supports curr[1-4]. | ||
89 | |||
90 | power[1,3]_label "pout[1,3]" | ||
91 | power[1,3]_input Measured power. | ||
92 | power[1,3]_average Historical average power. | ||
93 | power[1,3]_highest Historical maximum power. | ||
94 | |||
95 | Power attributes only exist for MAX34446. | ||
72 | 96 | ||
73 | temp[1-8]_input Measured temperatures. From READ_TEMPERATURE_1 register. | 97 | temp[1-8]_input Measured temperatures. From READ_TEMPERATURE_1 register. |
74 | temp1 is the chip's internal temperature. temp2..temp5 | 98 | temp1 is the chip's internal temperature. temp2..temp5 |
@@ -79,7 +103,9 @@ temp[1-8]_max Maximum temperature. From OT_WARN_LIMIT register. | |||
79 | temp[1-8]_crit Critical high temperature. From OT_FAULT_LIMIT register. | 103 | temp[1-8]_crit Critical high temperature. From OT_FAULT_LIMIT register. |
80 | temp[1-8]_max_alarm Temperature high alarm. | 104 | temp[1-8]_max_alarm Temperature high alarm. |
81 | temp[1-8]_crit_alarm Temperature critical high alarm. | 105 | temp[1-8]_crit_alarm Temperature critical high alarm. |
106 | temp[1-8]_average Historical average temperature (MAX34446 only). | ||
82 | temp[1-8]_highest Historical maximum temperature. | 107 | temp[1-8]_highest Historical maximum temperature. |
83 | temp[1-8]_reset_history Write any value to reset history. | 108 | temp[1-8]_reset_history Write any value to reset history. |
84 | 109 | ||
85 | temp7 and temp8 attributes only exist for MAX34440. | 110 | temp7 and temp8 attributes only exist for MAX34440. |
111 | MAX34446 only supports temp[1-3]. | ||
diff --git a/Documentation/hwmon/mc13783-adc b/Documentation/hwmon/mc13783-adc index 044531a86405..d0e7b3fa9e75 100644 --- a/Documentation/hwmon/mc13783-adc +++ b/Documentation/hwmon/mc13783-adc | |||
@@ -3,8 +3,11 @@ Kernel driver mc13783-adc | |||
3 | 3 | ||
4 | Supported chips: | 4 | Supported chips: |
5 | * Freescale Atlas MC13783 | 5 | * Freescale Atlas MC13783 |
6 | Prefix: 'mc13783_adc' | 6 | Prefix: 'mc13783' |
7 | Datasheet: http://www.freescale.com/files/rf_if/doc/data_sheet/MC13783.pdf?fsrch=1 | 7 | Datasheet: http://www.freescale.com/files/rf_if/doc/data_sheet/MC13783.pdf?fsrch=1 |
8 | * Freescale Atlas MC13892 | ||
9 | Prefix: 'mc13892' | ||
10 | Datasheet: http://cache.freescale.com/files/analog/doc/data_sheet/MC13892.pdf?fsrch=1&sr=1 | ||
8 | 11 | ||
9 | Authors: | 12 | Authors: |
10 | Sascha Hauer <s.hauer@pengutronix.de> | 13 | Sascha Hauer <s.hauer@pengutronix.de> |
@@ -13,20 +16,21 @@ Authors: | |||
13 | Description | 16 | Description |
14 | ----------- | 17 | ----------- |
15 | 18 | ||
16 | The Freescale MC13783 is a Power Management and Audio Circuit. Among | 19 | The Freescale MC13783 and MC13892 are Power Management and Audio Circuits. |
17 | other things it contains a 10-bit A/D converter. The converter has 16 | 20 | Among other things they contain a 10-bit A/D converter. The converter has 16 |
18 | channels which can be used in different modes. | 21 | (MC13783) resp. 12 (MC13892) channels which can be used in different modes. The |
19 | The A/D converter has a resolution of 2.25mV. Channels 0-4 have | 22 | A/D converter has a resolution of 2.25mV. |
20 | a dedicated meaning with chip internal scaling applied. Channels 5-7 | ||
21 | can be used as general purpose inputs or alternatively in a dedicated | ||
22 | mode. Channels 12-15 are occupied by the touchscreen if it's active. | ||
23 | 23 | ||
24 | Currently the driver only supports channels 2 and 5-15 with no alternative | 24 | Some channels can be used as General Purpose inputs or in a dedicated mode with |
25 | modes for channels 5-7. | 25 | a chip internal scaling applied . |
26 | 26 | ||
27 | See this table for the meaning of the different channels and their chip | 27 | Currently the driver only supports the Application Supply channel (BP / BPSNS), |
28 | internal scaling: | 28 | the General Purpose inputs and touchscreen. |
29 | 29 | ||
30 | See the following tables for the meaning of the different channels and their | ||
31 | chip internal scaling: | ||
32 | |||
33 | MC13783: | ||
30 | Channel Signal Input Range Scaling | 34 | Channel Signal Input Range Scaling |
31 | ------------------------------------------------------------------------------- | 35 | ------------------------------------------------------------------------------- |
32 | 0 Battery Voltage (BATT) 2.50 - 4.65V -2.40V | 36 | 0 Battery Voltage (BATT) 2.50 - 4.65V -2.40V |
@@ -34,7 +38,7 @@ Channel Signal Input Range Scaling | |||
34 | 2 Application Supply (BP) 2.50 - 4.65V -2.40V | 38 | 2 Application Supply (BP) 2.50 - 4.65V -2.40V |
35 | 3 Charger Voltage (CHRGRAW) 0 - 10V / /5 | 39 | 3 Charger Voltage (CHRGRAW) 0 - 10V / /5 |
36 | 0 - 20V /10 | 40 | 0 - 20V /10 |
37 | 4 Charger Current (CHRGISNSP-CHRGISNSN) -0.25V - 0.25V x4 | 41 | 4 Charger Current (CHRGISNSP-CHRGISNSN) -0.25 - 0.25V x4 |
38 | 5 General Purpose ADIN5 / Battery Pack Thermistor 0 - 2.30V No | 42 | 5 General Purpose ADIN5 / Battery Pack Thermistor 0 - 2.30V No |
39 | 6 General Purpose ADIN6 / Backup Voltage (LICELL) 0 - 2.30V / No / | 43 | 6 General Purpose ADIN6 / Backup Voltage (LICELL) 0 - 2.30V / No / |
40 | 1.50 - 3.50V -1.20V | 44 | 1.50 - 3.50V -1.20V |
@@ -48,3 +52,23 @@ Channel Signal Input Range Scaling | |||
48 | 13 General Purpose TSX2 / Touchscreen X-plate 2 0 - 2.30V No | 52 | 13 General Purpose TSX2 / Touchscreen X-plate 2 0 - 2.30V No |
49 | 14 General Purpose TSY1 / Touchscreen Y-plate 1 0 - 2.30V No | 53 | 14 General Purpose TSY1 / Touchscreen Y-plate 1 0 - 2.30V No |
50 | 15 General Purpose TSY2 / Touchscreen Y-plate 2 0 - 2.30V No | 54 | 15 General Purpose TSY2 / Touchscreen Y-plate 2 0 - 2.30V No |
55 | |||
56 | MC13892: | ||
57 | Channel Signal Input Range Scaling | ||
58 | ------------------------------------------------------------------------------- | ||
59 | 0 Battery Voltage (BATT) 0 - 4.8V /2 | ||
60 | 1 Battery Current (BATT - BATTISNSCC) -60 - 60 mV x20 | ||
61 | 2 Application Supply (BPSNS) 0 - 4.8V /2 | ||
62 | 3 Charger Voltage (CHRGRAW) 0 - 12V / /5 | ||
63 | 0 - 20V /10 | ||
64 | 4 Charger Current (CHRGISNS-BPSNS) / -0.3 - 0.3V / x4 / | ||
65 | Touchscreen X-plate 1 0 - 2.4V No | ||
66 | 5 General Purpose ADIN5 / Battery Pack Thermistor 0 - 2.4V No | ||
67 | 6 General Purpose ADIN6 / Backup Voltage (LICELL) 0 - 2.4V / No | ||
68 | Backup Voltage (LICELL) 0 - 3.6V x2/3 | ||
69 | 7 General Purpose ADIN7 / UID / Die Temperature 0 - 2.4V / No / | ||
70 | 0 - 4.8V /2 | ||
71 | 12 General Purpose TSX1 / Touchscreen X-plate 1 0 - 2.4V No | ||
72 | 13 General Purpose TSX2 / Touchscreen X-plate 2 0 - 2.4V No | ||
73 | 14 General Purpose TSY1 / Touchscreen Y-plate 1 0 - 2.4V No | ||
74 | 15 General Purpose TSY2 / Touchscreen Y-plate 2 0 - 2.4V No | ||
diff --git a/Documentation/hwmon/mcp3021 b/Documentation/hwmon/mcp3021 new file mode 100644 index 000000000000..325fd87e81b2 --- /dev/null +++ b/Documentation/hwmon/mcp3021 | |||
@@ -0,0 +1,22 @@ | |||
1 | Kernel driver MCP3021 | ||
2 | ====================== | ||
3 | |||
4 | Supported chips: | ||
5 | * Microchip Technology MCP3021 | ||
6 | Prefix: 'mcp3021' | ||
7 | Datasheet: http://ww1.microchip.com/downloads/en/DeviceDoc/21805a.pdf | ||
8 | |||
9 | Author: Mingkai Hu | ||
10 | |||
11 | Description | ||
12 | ----------- | ||
13 | |||
14 | This driver implements support for the Microchip Technology MCP3021 chip. | ||
15 | |||
16 | The Microchip Technology Inc. MCP3021 is a successive approximation A/D | ||
17 | converter (ADC) with 10-bit resolution. | ||
18 | This device provides one single-ended input with very low power consumption. | ||
19 | Communication to the MCP3021 is performed using a 2-wire I2C compatible | ||
20 | interface. Standard (100 kHz) and Fast (400 kHz) I2C modes are available. | ||
21 | The default I2C device address is 0x4d (contact the Microchip factory for | ||
22 | additional address options). | ||
diff --git a/Documentation/hwmon/pmbus b/Documentation/hwmon/pmbus index d28b591753d1..f90f99920cc5 100644 --- a/Documentation/hwmon/pmbus +++ b/Documentation/hwmon/pmbus | |||
@@ -15,13 +15,20 @@ Supported chips: | |||
15 | http://www.onsemi.com/pub_link/Collateral/NCP4200-D.PDF | 15 | http://www.onsemi.com/pub_link/Collateral/NCP4200-D.PDF |
16 | http://www.onsemi.com/pub_link/Collateral/JUNE%202009-%20REV.%200.PDF | 16 | http://www.onsemi.com/pub_link/Collateral/JUNE%202009-%20REV.%200.PDF |
17 | * Lineage Power | 17 | * Lineage Power |
18 | Prefixes: 'pdt003', 'pdt006', 'pdt012', 'udt020' | 18 | Prefixes: 'mdt040', 'pdt003', 'pdt006', 'pdt012', 'udt020' |
19 | Addresses scanned: - | 19 | Addresses scanned: - |
20 | Datasheets: | 20 | Datasheets: |
21 | http://www.lineagepower.com/oem/pdf/PDT003A0X.pdf | 21 | http://www.lineagepower.com/oem/pdf/PDT003A0X.pdf |
22 | http://www.lineagepower.com/oem/pdf/PDT006A0X.pdf | 22 | http://www.lineagepower.com/oem/pdf/PDT006A0X.pdf |
23 | http://www.lineagepower.com/oem/pdf/PDT012A0X.pdf | 23 | http://www.lineagepower.com/oem/pdf/PDT012A0X.pdf |
24 | http://www.lineagepower.com/oem/pdf/UDT020A0X.pdf | 24 | http://www.lineagepower.com/oem/pdf/UDT020A0X.pdf |
25 | http://www.lineagepower.com/oem/pdf/MDT040A0X.pdf | ||
26 | * Texas Instruments TPS40400, TPS40422 | ||
27 | Prefixes: 'tps40400', 'tps40422' | ||
28 | Addresses scanned: - | ||
29 | Datasheets: | ||
30 | http://www.ti.com/lit/gpn/tps40400 | ||
31 | http://www.ti.com/lit/gpn/tps40422 | ||
25 | * Generic PMBus devices | 32 | * Generic PMBus devices |
26 | Prefix: 'pmbus' | 33 | Prefix: 'pmbus' |
27 | Addresses scanned: - | 34 | Addresses scanned: - |
diff --git a/Documentation/hwmon/sch5627 b/Documentation/hwmon/sch5627 index 446a054e4912..0551d266c51c 100644 --- a/Documentation/hwmon/sch5627 +++ b/Documentation/hwmon/sch5627 | |||
@@ -16,6 +16,11 @@ Description | |||
16 | SMSC SCH5627 Super I/O chips include complete hardware monitoring | 16 | SMSC SCH5627 Super I/O chips include complete hardware monitoring |
17 | capabilities. They can monitor up to 5 voltages, 4 fans and 8 temperatures. | 17 | capabilities. They can monitor up to 5 voltages, 4 fans and 8 temperatures. |
18 | 18 | ||
19 | The SMSC SCH5627 hardware monitoring part also contains an integrated | ||
20 | watchdog. In order for this watchdog to function some motherboard specific | ||
21 | initialization most be done by the BIOS, so if the watchdog is not enabled | ||
22 | by the BIOS the sch5627 driver will not register a watchdog device. | ||
23 | |||
19 | The hardware monitoring part of the SMSC SCH5627 is accessed by talking | 24 | The hardware monitoring part of the SMSC SCH5627 is accessed by talking |
20 | through an embedded microcontroller. An application note describing the | 25 | through an embedded microcontroller. An application note describing the |
21 | protocol for communicating with the microcontroller is available upon | 26 | protocol for communicating with the microcontroller is available upon |
diff --git a/Documentation/hwmon/sch5636 b/Documentation/hwmon/sch5636 index f83bd1c260f0..7b0a01da0717 100644 --- a/Documentation/hwmon/sch5636 +++ b/Documentation/hwmon/sch5636 | |||
@@ -26,6 +26,9 @@ temperatures. Note that the driver detects how many fan headers / | |||
26 | temperature sensors are actually implemented on the motherboard, so you will | 26 | temperature sensors are actually implemented on the motherboard, so you will |
27 | likely see fewer temperature and fan inputs. | 27 | likely see fewer temperature and fan inputs. |
28 | 28 | ||
29 | The Fujitsu Theseus hwmon solution also contains an integrated watchdog. | ||
30 | This watchdog is fully supported by the sch5636 driver. | ||
31 | |||
29 | An application note describing the Theseus' registers, as well as an | 32 | An application note describing the Theseus' registers, as well as an |
30 | application note describing the protocol for communicating with the | 33 | application note describing the protocol for communicating with the |
31 | microcontroller is available upon request. Please mail me if you want a copy. | 34 | microcontroller is available upon request. Please mail me if you want a copy. |
diff --git a/Documentation/hwmon/w83627ehf b/Documentation/hwmon/w83627ehf index 3f44dbdfda70..ceaf6f652b00 100644 --- a/Documentation/hwmon/w83627ehf +++ b/Documentation/hwmon/w83627ehf | |||
@@ -50,7 +50,7 @@ W83627DHG, W83627DHG-P, W83627UHG, W83667HG, W83667HG-B, W83667HG-I | |||
50 | (NCT6775F), and NCT6776F super I/O chips. We will refer to them collectively | 50 | (NCT6775F), and NCT6776F super I/O chips. We will refer to them collectively |
51 | as Winbond chips. | 51 | as Winbond chips. |
52 | 52 | ||
53 | The chips implement 2 to 4 temperature sensors (9 for NCT6775F and NCT6776F), | 53 | The chips implement 3 to 4 temperature sensors (9 for NCT6775F and NCT6776F), |
54 | 2 to 5 fan rotation speed sensors, 8 to 10 analog voltage sensors, one VID | 54 | 2 to 5 fan rotation speed sensors, 8 to 10 analog voltage sensors, one VID |
55 | (except for 627UHG), alarms with beep warnings (control unimplemented), | 55 | (except for 627UHG), alarms with beep warnings (control unimplemented), |
56 | and some automatic fan regulation strategies (plus manual fan control mode). | 56 | and some automatic fan regulation strategies (plus manual fan control mode). |
@@ -143,8 +143,13 @@ pwm[1-4]_min_output - minimum fan speed (range 1 - 255), when the temperature | |||
143 | pwm[1-4]_stop_time - how many milliseconds [ms] must elapse to switch | 143 | pwm[1-4]_stop_time - how many milliseconds [ms] must elapse to switch |
144 | corresponding fan off. (when the temperature was below | 144 | corresponding fan off. (when the temperature was below |
145 | defined range). | 145 | defined range). |
146 | pwm[1-4]_start_output-minimum fan speed (range 1 - 255) when spinning up | ||
147 | pwm[1-4]_step_output- rate of fan speed change (1 - 255) | ||
148 | pwm[1-4]_stop_output- minimum fan speed (range 1 - 255) when spinning down | ||
149 | pwm[1-4]_max_output - maximum fan speed (range 1 - 255), when the temperature | ||
150 | is above defined range. | ||
146 | 151 | ||
147 | Note: last two functions are influenced by other control bits, not yet exported | 152 | Note: last six functions are influenced by other control bits, not yet exported |
148 | by the driver, so a change might not have any effect. | 153 | by the driver, so a change might not have any effect. |
149 | 154 | ||
150 | Implementation Details | 155 | Implementation Details |
diff --git a/Documentation/hwmon/zl6100 b/Documentation/hwmon/zl6100 index 5865a2470d4a..a995b41724fd 100644 --- a/Documentation/hwmon/zl6100 +++ b/Documentation/hwmon/zl6100 | |||
@@ -34,6 +34,14 @@ Supported chips: | |||
34 | Prefix: 'zl6105' | 34 | Prefix: 'zl6105' |
35 | Addresses scanned: - | 35 | Addresses scanned: - |
36 | Datasheet: http://www.intersil.com/data/fn/fn6906.pdf | 36 | Datasheet: http://www.intersil.com/data/fn/fn6906.pdf |
37 | * Intersil / Zilker Labs ZL9101M | ||
38 | Prefix: 'zl9101' | ||
39 | Addresses scanned: - | ||
40 | Datasheet: http://www.intersil.com/data/fn/fn7669.pdf | ||
41 | * Intersil / Zilker Labs ZL9117M | ||
42 | Prefix: 'zl9117' | ||
43 | Addresses scanned: - | ||
44 | Datasheet: http://www.intersil.com/data/fn/fn7914.pdf | ||
37 | * Ericsson BMR450, BMR451 | 45 | * Ericsson BMR450, BMR451 |
38 | Prefix: 'bmr450', 'bmr451' | 46 | Prefix: 'bmr450', 'bmr451' |
39 | Addresses scanned: - | 47 | Addresses scanned: - |
@@ -88,14 +96,12 @@ Module parameters | |||
88 | delay | 96 | delay |
89 | ----- | 97 | ----- |
90 | 98 | ||
91 | Some Intersil/Zilker Labs DC-DC controllers require a minimum interval between | 99 | Intersil/Zilker Labs DC-DC controllers require a minimum interval between I2C |
92 | I2C bus accesses. According to Intersil, the minimum interval is 2 ms, though | 100 | bus accesses. According to Intersil, the minimum interval is 2 ms, though 1 ms |
93 | 1 ms appears to be sufficient and has not caused any problems in testing. | 101 | appears to be sufficient and has not caused any problems in testing. The problem |
94 | The problem is known to affect ZL6100, ZL2105, and ZL2008. It is known not to | 102 | is known to affect all currently supported chips. For manual override, the |
95 | affect ZL2004 and ZL6105. The driver automatically sets the interval to 1 ms | 103 | driver provides a writeable module parameter, 'delay', which can be used to set |
96 | except for ZL2004 and ZL6105. To enable manual override, the driver provides a | 104 | the interval to a value between 0 and 65,535 microseconds. |
97 | writeable module parameter, 'delay', which can be used to set the interval to | ||
98 | a value between 0 and 65,535 microseconds. | ||
99 | 105 | ||
100 | 106 | ||
101 | Sysfs entries | 107 | Sysfs entries |
diff --git a/Documentation/i2c/busses/i2c-i801 b/Documentation/i2c/busses/i2c-i801 index 2871fd500349..71f55bbcefc8 100644 --- a/Documentation/i2c/busses/i2c-i801 +++ b/Documentation/i2c/busses/i2c-i801 | |||
@@ -20,6 +20,7 @@ Supported adapters: | |||
20 | * Intel Patsburg (PCH) | 20 | * Intel Patsburg (PCH) |
21 | * Intel DH89xxCC (PCH) | 21 | * Intel DH89xxCC (PCH) |
22 | * Intel Panther Point (PCH) | 22 | * Intel Panther Point (PCH) |
23 | * Intel Lynx Point (PCH) | ||
23 | Datasheets: Publicly available at the Intel website | 24 | Datasheets: Publicly available at the Intel website |
24 | 25 | ||
25 | On Intel Patsburg and later chipsets, both the normal host SMBus controller | 26 | On Intel Patsburg and later chipsets, both the normal host SMBus controller |
diff --git a/Documentation/i2c/busses/scx200_acb b/Documentation/i2c/busses/scx200_acb index 7c07883d4dfc..ce83c871fe95 100644 --- a/Documentation/i2c/busses/scx200_acb +++ b/Documentation/i2c/busses/scx200_acb | |||
@@ -28,5 +28,5 @@ If the scx200_acb driver is built into the kernel, add the following | |||
28 | parameter to your boot command line: | 28 | parameter to your boot command line: |
29 | scx200_acb.base=0x810,0x820 | 29 | scx200_acb.base=0x810,0x820 |
30 | If the scx200_acb driver is built as a module, add the following line to | 30 | If the scx200_acb driver is built as a module, add the following line to |
31 | the file /etc/modprobe.conf instead: | 31 | a configuration file in /etc/modprobe.d/ instead: |
32 | options scx200_acb base=0x810,0x820 | 32 | options scx200_acb base=0x810,0x820 |
diff --git a/Documentation/i2c/instantiating-devices b/Documentation/i2c/instantiating-devices index 9edb75d8c9b9..abf63615ee05 100644 --- a/Documentation/i2c/instantiating-devices +++ b/Documentation/i2c/instantiating-devices | |||
@@ -87,11 +87,11 @@ it may have different addresses from one board to the next (manufacturer | |||
87 | changing its design without notice). In this case, you can call | 87 | changing its design without notice). In this case, you can call |
88 | i2c_new_probed_device() instead of i2c_new_device(). | 88 | i2c_new_probed_device() instead of i2c_new_device(). |
89 | 89 | ||
90 | Example (from the pnx4008 OHCI driver): | 90 | Example (from the nxp OHCI driver): |
91 | 91 | ||
92 | static const unsigned short normal_i2c[] = { 0x2c, 0x2d, I2C_CLIENT_END }; | 92 | static const unsigned short normal_i2c[] = { 0x2c, 0x2d, I2C_CLIENT_END }; |
93 | 93 | ||
94 | static int __devinit usb_hcd_pnx4008_probe(struct platform_device *pdev) | 94 | static int __devinit usb_hcd_nxp_probe(struct platform_device *pdev) |
95 | { | 95 | { |
96 | (...) | 96 | (...) |
97 | struct i2c_adapter *i2c_adap; | 97 | struct i2c_adapter *i2c_adap; |
@@ -100,7 +100,7 @@ static int __devinit usb_hcd_pnx4008_probe(struct platform_device *pdev) | |||
100 | (...) | 100 | (...) |
101 | i2c_adap = i2c_get_adapter(2); | 101 | i2c_adap = i2c_get_adapter(2); |
102 | memset(&i2c_info, 0, sizeof(struct i2c_board_info)); | 102 | memset(&i2c_info, 0, sizeof(struct i2c_board_info)); |
103 | strlcpy(i2c_info.type, "isp1301_pnx", I2C_NAME_SIZE); | 103 | strlcpy(i2c_info.type, "isp1301_nxp", I2C_NAME_SIZE); |
104 | isp1301_i2c_client = i2c_new_probed_device(i2c_adap, &i2c_info, | 104 | isp1301_i2c_client = i2c_new_probed_device(i2c_adap, &i2c_info, |
105 | normal_i2c, NULL); | 105 | normal_i2c, NULL); |
106 | i2c_put_adapter(i2c_adap); | 106 | i2c_put_adapter(i2c_adap); |
diff --git a/Documentation/ide/ide.txt b/Documentation/ide/ide.txt index e77bebfa7b0d..7aca987c23d9 100644 --- a/Documentation/ide/ide.txt +++ b/Documentation/ide/ide.txt | |||
@@ -169,7 +169,7 @@ When using ide.c as a module in combination with kmod, add: | |||
169 | 169 | ||
170 | alias block-major-3 ide-probe | 170 | alias block-major-3 ide-probe |
171 | 171 | ||
172 | to /etc/modprobe.conf. | 172 | to a configuration file in /etc/modprobe.d/. |
173 | 173 | ||
174 | When ide.c is used as a module, you can pass command line parameters to the | 174 | When ide.c is used as a module, you can pass command line parameters to the |
175 | driver using the "options=" keyword to insmod, while replacing any ',' with | 175 | driver using the "options=" keyword to insmod, while replacing any ',' with |
diff --git a/Documentation/input/alps.txt b/Documentation/input/alps.txt index 9c407f01d74f..ae8ba9a74ce1 100644 --- a/Documentation/input/alps.txt +++ b/Documentation/input/alps.txt | |||
@@ -13,7 +13,8 @@ Detection | |||
13 | 13 | ||
14 | All ALPS touchpads should respond to the "E6 report" command sequence: | 14 | All ALPS touchpads should respond to the "E6 report" command sequence: |
15 | E8-E6-E6-E6-E9. An ALPS touchpad should respond with either 00-00-0A or | 15 | E8-E6-E6-E6-E9. An ALPS touchpad should respond with either 00-00-0A or |
16 | 00-00-64. | 16 | 00-00-64 if no buttons are pressed. The bits 0-2 of the first byte will be 1s |
17 | if some buttons are pressed. | ||
17 | 18 | ||
18 | If the E6 report is successful, the touchpad model is identified using the "E7 | 19 | If the E6 report is successful, the touchpad model is identified using the "E7 |
19 | report" sequence: E8-E7-E7-E7-E9. The response is the model signature and is | 20 | report" sequence: E8-E7-E7-E7-E9. The response is the model signature and is |
diff --git a/Documentation/input/event-codes.txt b/Documentation/input/event-codes.txt index 23fcb05175be..53305bd08182 100644 --- a/Documentation/input/event-codes.txt +++ b/Documentation/input/event-codes.txt | |||
@@ -17,11 +17,11 @@ reports supported by a device are also provided by sysfs in | |||
17 | class/input/event*/device/capabilities/, and the properties of a device are | 17 | class/input/event*/device/capabilities/, and the properties of a device are |
18 | provided in class/input/event*/device/properties. | 18 | provided in class/input/event*/device/properties. |
19 | 19 | ||
20 | Types: | 20 | Event types: |
21 | ========== | 21 | =========== |
22 | Types are groupings of codes under a logical input construct. Each type has a | 22 | Event types are groupings of codes under a logical input construct. Each |
23 | set of applicable codes to be used in generating events. See the Codes section | 23 | type has a set of applicable codes to be used in generating events. See the |
24 | for details on valid codes for each type. | 24 | Codes section for details on valid codes for each type. |
25 | 25 | ||
26 | * EV_SYN: | 26 | * EV_SYN: |
27 | - Used as markers to separate events. Events may be separated in time or in | 27 | - Used as markers to separate events. Events may be separated in time or in |
@@ -63,9 +63,9 @@ for details on valid codes for each type. | |||
63 | * EV_FF_STATUS: | 63 | * EV_FF_STATUS: |
64 | - Used to receive force feedback device status. | 64 | - Used to receive force feedback device status. |
65 | 65 | ||
66 | Codes: | 66 | Event codes: |
67 | ========== | 67 | =========== |
68 | Codes define the precise type of event. | 68 | Event codes define the precise type of event. |
69 | 69 | ||
70 | EV_SYN: | 70 | EV_SYN: |
71 | ---------- | 71 | ---------- |
@@ -220,6 +220,56 @@ EV_PWR: | |||
220 | EV_PWR events are a special type of event used specifically for power | 220 | EV_PWR events are a special type of event used specifically for power |
221 | mangement. Its usage is not well defined. To be addressed later. | 221 | mangement. Its usage is not well defined. To be addressed later. |
222 | 222 | ||
223 | Device properties: | ||
224 | ================= | ||
225 | Normally, userspace sets up an input device based on the data it emits, | ||
226 | i.e., the event types. In the case of two devices emitting the same event | ||
227 | types, additional information can be provided in the form of device | ||
228 | properties. | ||
229 | |||
230 | INPUT_PROP_DIRECT + INPUT_PROP_POINTER: | ||
231 | -------------------------------------- | ||
232 | The INPUT_PROP_DIRECT property indicates that device coordinates should be | ||
233 | directly mapped to screen coordinates (not taking into account trivial | ||
234 | transformations, such as scaling, flipping and rotating). Non-direct input | ||
235 | devices require non-trivial transformation, such as absolute to relative | ||
236 | transformation for touchpads. Typical direct input devices: touchscreens, | ||
237 | drawing tablets; non-direct devices: touchpads, mice. | ||
238 | |||
239 | The INPUT_PROP_POINTER property indicates that the device is not transposed | ||
240 | on the screen and thus requires use of an on-screen pointer to trace user's | ||
241 | movements. Typical pointer devices: touchpads, tablets, mice; non-pointer | ||
242 | device: touchscreen. | ||
243 | |||
244 | If neither INPUT_PROP_DIRECT or INPUT_PROP_POINTER are set, the property is | ||
245 | considered undefined and the device type should be deduced in the | ||
246 | traditional way, using emitted event types. | ||
247 | |||
248 | INPUT_PROP_BUTTONPAD: | ||
249 | -------------------- | ||
250 | For touchpads where the button is placed beneath the surface, such that | ||
251 | pressing down on the pad causes a button click, this property should be | ||
252 | set. Common in clickpad notebooks and macbooks from 2009 and onwards. | ||
253 | |||
254 | Originally, the buttonpad property was coded into the bcm5974 driver | ||
255 | version field under the name integrated button. For backwards | ||
256 | compatibility, both methods need to be checked in userspace. | ||
257 | |||
258 | INPUT_PROP_SEMI_MT: | ||
259 | ------------------ | ||
260 | Some touchpads, most common between 2008 and 2011, can detect the presence | ||
261 | of multiple contacts without resolving the individual positions; only the | ||
262 | number of contacts and a rectangular shape is known. For such | ||
263 | touchpads, the semi-mt property should be set. | ||
264 | |||
265 | Depending on the device, the rectangle may enclose all touches, like a | ||
266 | bounding box, or just some of them, for instance the two most recent | ||
267 | touches. The diversity makes the rectangle of limited use, but some | ||
268 | gestures can normally be extracted from it. | ||
269 | |||
270 | If INPUT_PROP_SEMI_MT is not set, the device is assumed to be a true MT | ||
271 | device. | ||
272 | |||
223 | Guidelines: | 273 | Guidelines: |
224 | ========== | 274 | ========== |
225 | The guidelines below ensure proper single-touch and multi-finger functionality. | 275 | The guidelines below ensure proper single-touch and multi-finger functionality. |
@@ -240,6 +290,8 @@ used to report when a touch is active on the screen. | |||
240 | BTN_{MOUSE,LEFT,MIDDLE,RIGHT} must not be reported as the result of touch | 290 | BTN_{MOUSE,LEFT,MIDDLE,RIGHT} must not be reported as the result of touch |
241 | contact. BTN_TOOL_<name> events should be reported where possible. | 291 | contact. BTN_TOOL_<name> events should be reported where possible. |
242 | 292 | ||
293 | For new hardware, INPUT_PROP_DIRECT should be set. | ||
294 | |||
243 | Trackpads: | 295 | Trackpads: |
244 | ---------- | 296 | ---------- |
245 | Legacy trackpads that only provide relative position information must report | 297 | Legacy trackpads that only provide relative position information must report |
@@ -250,6 +302,8 @@ location of the touch. BTN_TOUCH should be used to report when a touch is active | |||
250 | on the trackpad. Where multi-finger support is available, BTN_TOOL_<name> should | 302 | on the trackpad. Where multi-finger support is available, BTN_TOOL_<name> should |
251 | be used to report the number of touches active on the trackpad. | 303 | be used to report the number of touches active on the trackpad. |
252 | 304 | ||
305 | For new hardware, INPUT_PROP_POINTER should be set. | ||
306 | |||
253 | Tablets: | 307 | Tablets: |
254 | ---------- | 308 | ---------- |
255 | BTN_TOOL_<name> events must be reported when a stylus or other tool is active on | 309 | BTN_TOOL_<name> events must be reported when a stylus or other tool is active on |
@@ -260,3 +314,5 @@ button may be used for buttons on the tablet except BTN_{MOUSE,LEFT}. | |||
260 | BTN_{0,1,2,etc} are good generic codes for unlabeled buttons. Do not use | 314 | BTN_{0,1,2,etc} are good generic codes for unlabeled buttons. Do not use |
261 | meaningful buttons, like BTN_FORWARD, unless the button is labeled for that | 315 | meaningful buttons, like BTN_FORWARD, unless the button is labeled for that |
262 | purpose on the device. | 316 | purpose on the device. |
317 | |||
318 | For new hardware, both INPUT_PROP_DIRECT and INPUT_PROP_POINTER should be set. | ||
diff --git a/Documentation/input/input.txt b/Documentation/input/input.txt index b3d6787b4fb1..666c06c5ab0c 100644 --- a/Documentation/input/input.txt +++ b/Documentation/input/input.txt | |||
@@ -250,8 +250,8 @@ And so on up to event31. | |||
250 | a USB keyboard works and is correctly connected to the kernel keyboard | 250 | a USB keyboard works and is correctly connected to the kernel keyboard |
251 | driver. | 251 | driver. |
252 | 252 | ||
253 | Doing a cat /dev/input/mouse0 (c, 13, 32) will verify that a mouse | 253 | Doing a "cat /dev/input/mouse0" (c, 13, 32) will verify that a mouse |
254 | is also emulated, characters should appear if you move it. | 254 | is also emulated; characters should appear if you move it. |
255 | 255 | ||
256 | You can test the joystick emulation with the 'jstest' utility, | 256 | You can test the joystick emulation with the 'jstest' utility, |
257 | available in the joystick package (see Documentation/input/joystick.txt). | 257 | available in the joystick package (see Documentation/input/joystick.txt). |
diff --git a/Documentation/ioctl/ioctl-number.txt b/Documentation/ioctl/ioctl-number.txt index 4840334ea97b..e34b531dc316 100644 --- a/Documentation/ioctl/ioctl-number.txt +++ b/Documentation/ioctl/ioctl-number.txt | |||
@@ -189,7 +189,7 @@ Code Seq#(hex) Include File Comments | |||
189 | 'Y' all linux/cyclades.h | 189 | 'Y' all linux/cyclades.h |
190 | 'Z' 14-15 drivers/message/fusion/mptctl.h | 190 | 'Z' 14-15 drivers/message/fusion/mptctl.h |
191 | '[' 00-07 linux/usb/tmc.h USB Test and Measurement Devices | 191 | '[' 00-07 linux/usb/tmc.h USB Test and Measurement Devices |
192 | <mailto:gregkh@suse.de> | 192 | <mailto:gregkh@linuxfoundation.org> |
193 | 'a' all linux/atm*.h, linux/sonet.h ATM on linux | 193 | 'a' all linux/atm*.h, linux/sonet.h ATM on linux |
194 | <http://lrcwww.epfl.ch/> | 194 | <http://lrcwww.epfl.ch/> |
195 | 'b' 00-FF conflict! bit3 vme host bridge | 195 | 'b' 00-FF conflict! bit3 vme host bridge |
@@ -218,12 +218,14 @@ Code Seq#(hex) Include File Comments | |||
218 | 'h' 00-7F conflict! Charon filesystem | 218 | 'h' 00-7F conflict! Charon filesystem |
219 | <mailto:zapman@interlan.net> | 219 | <mailto:zapman@interlan.net> |
220 | 'h' 00-1F linux/hpet.h conflict! | 220 | 'h' 00-1F linux/hpet.h conflict! |
221 | 'h' 80-8F fs/hfsplus/ioctl.c | ||
221 | 'i' 00-3F linux/i2o-dev.h conflict! | 222 | 'i' 00-3F linux/i2o-dev.h conflict! |
222 | 'i' 0B-1F linux/ipmi.h conflict! | 223 | 'i' 0B-1F linux/ipmi.h conflict! |
223 | 'i' 80-8F linux/i8k.h | 224 | 'i' 80-8F linux/i8k.h |
224 | 'j' 00-3F linux/joystick.h | 225 | 'j' 00-3F linux/joystick.h |
225 | 'k' 00-0F linux/spi/spidev.h conflict! | 226 | 'k' 00-0F linux/spi/spidev.h conflict! |
226 | 'k' 00-05 video/kyro.h conflict! | 227 | 'k' 00-05 video/kyro.h conflict! |
228 | 'k' 10-17 linux/hsi/hsi_char.h HSI character device | ||
227 | 'l' 00-3F linux/tcfs_fs.h transparent cryptographic file system | 229 | 'l' 00-3F linux/tcfs_fs.h transparent cryptographic file system |
228 | <http://web.archive.org/web/*/http://mikonos.dia.unisa.it/tcfs> | 230 | <http://web.archive.org/web/*/http://mikonos.dia.unisa.it/tcfs> |
229 | 'l' 40-7F linux/udf_fs_i.h in development: | 231 | 'l' 40-7F linux/udf_fs_i.h in development: |
@@ -255,7 +257,7 @@ Code Seq#(hex) Include File Comments | |||
255 | linux/ixjuser.h <http://web.archive.org/web/*/http://www.quicknet.net> | 257 | linux/ixjuser.h <http://web.archive.org/web/*/http://www.quicknet.net> |
256 | 'r' 00-1F linux/msdos_fs.h and fs/fat/dir.c | 258 | 'r' 00-1F linux/msdos_fs.h and fs/fat/dir.c |
257 | 's' all linux/cdk.h | 259 | 's' all linux/cdk.h |
258 | 't' 00-7F linux/if_ppp.h | 260 | 't' 00-7F linux/ppp-ioctl.h |
259 | 't' 80-8F linux/isdn_ppp.h | 261 | 't' 80-8F linux/isdn_ppp.h |
260 | 't' 90 linux/toshiba.h | 262 | 't' 90 linux/toshiba.h |
261 | 'u' 00-1F linux/smb_fs.h gone | 263 | 'u' 00-1F linux/smb_fs.h gone |
diff --git a/Documentation/isdn/README.gigaset b/Documentation/isdn/README.gigaset index ef3343eaa002..7534c6039adc 100644 --- a/Documentation/isdn/README.gigaset +++ b/Documentation/isdn/README.gigaset | |||
@@ -97,8 +97,7 @@ GigaSet 307x Device Driver | |||
97 | 2.5.): 1=on (default), 0=off | 97 | 2.5.): 1=on (default), 0=off |
98 | 98 | ||
99 | Depending on your distribution you may want to create a separate module | 99 | Depending on your distribution you may want to create a separate module |
100 | configuration file /etc/modprobe.d/gigaset for these, or add them to a | 100 | configuration file like /etc/modprobe.d/gigaset.conf for these. |
101 | custom file like /etc/modprobe.conf.local. | ||
102 | 101 | ||
103 | 2.2. Device nodes for user space programs | 102 | 2.2. Device nodes for user space programs |
104 | ------------------------------------ | 103 | ------------------------------------ |
@@ -212,8 +211,8 @@ GigaSet 307x Device Driver | |||
212 | 211 | ||
213 | options ppp_async flag_time=0 | 212 | options ppp_async flag_time=0 |
214 | 213 | ||
215 | to an appropriate module configuration file, like /etc/modprobe.d/gigaset | 214 | to an appropriate module configuration file, like |
216 | or /etc/modprobe.conf.local. | 215 | /etc/modprobe.d/gigaset.conf. |
217 | 216 | ||
218 | Unimodem mode is needed for making some devices [e.g. SX100] work which | 217 | Unimodem mode is needed for making some devices [e.g. SX100] work which |
219 | do not support the regular Gigaset command set. If debug output (see | 218 | do not support the regular Gigaset command set. If debug output (see |
@@ -237,8 +236,8 @@ GigaSet 307x Device Driver | |||
237 | modprobe usb_gigaset startmode=0 | 236 | modprobe usb_gigaset startmode=0 |
238 | or by adding a line like | 237 | or by adding a line like |
239 | options usb_gigaset startmode=0 | 238 | options usb_gigaset startmode=0 |
240 | to an appropriate module configuration file, like /etc/modprobe.d/gigaset | 239 | to an appropriate module configuration file, like |
241 | or /etc/modprobe.conf.local. | 240 | /etc/modprobe.d/gigaset.conf |
242 | 241 | ||
243 | 2.6. Call-ID (CID) mode | 242 | 2.6. Call-ID (CID) mode |
244 | ------------------ | 243 | ------------------ |
@@ -310,7 +309,7 @@ GigaSet 307x Device Driver | |||
310 | 309 | ||
311 | options isdn dialtimeout=15 | 310 | options isdn dialtimeout=15 |
312 | 311 | ||
313 | to /etc/modprobe.d/gigaset, /etc/modprobe.conf.local or a similar file. | 312 | to /etc/modprobe.d/gigaset.conf or a similar file. |
314 | 313 | ||
315 | Problem: | 314 | Problem: |
316 | The isdnlog program emits error messages or just doesn't work. | 315 | The isdnlog program emits error messages or just doesn't work. |
@@ -350,8 +349,7 @@ GigaSet 307x Device Driver | |||
350 | The initial value can be set using the debug parameter when loading the | 349 | The initial value can be set using the debug parameter when loading the |
351 | module "gigaset", e.g. by adding a line | 350 | module "gigaset", e.g. by adding a line |
352 | options gigaset debug=0 | 351 | options gigaset debug=0 |
353 | to your module configuration file, eg. /etc/modprobe.d/gigaset or | 352 | to your module configuration file, eg. /etc/modprobe.d/gigaset.conf |
354 | /etc/modprobe.conf.local. | ||
355 | 353 | ||
356 | Generated debugging information can be found | 354 | Generated debugging information can be found |
357 | - as output of the command | 355 | - as output of the command |
diff --git a/Documentation/kbuild/kconfig.txt b/Documentation/kbuild/kconfig.txt index c313d71324b4..9d5f2a90dca9 100644 --- a/Documentation/kbuild/kconfig.txt +++ b/Documentation/kbuild/kconfig.txt | |||
@@ -28,12 +28,10 @@ new (default) values, so you can use: | |||
28 | 28 | ||
29 | grep "(NEW)" conf.new | 29 | grep "(NEW)" conf.new |
30 | 30 | ||
31 | to see the new config symbols or you can 'diff' the previous and | 31 | to see the new config symbols or you can use diffconfig to see the |
32 | new .config files to see the differences: | 32 | differences between the previous and new .config files: |
33 | 33 | ||
34 | diff .config.old .config | less | 34 | scripts/diffconfig .config.old .config | less |
35 | |||
36 | (Yes, we need something better here.) | ||
37 | 35 | ||
38 | ______________________________________________________________________ | 36 | ______________________________________________________________________ |
39 | Environment variables for '*config' | 37 | Environment variables for '*config' |
diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt index cfcc73f2b822..c1601e5a8b71 100644 --- a/Documentation/kernel-parameters.txt +++ b/Documentation/kernel-parameters.txt | |||
@@ -713,6 +713,21 @@ bytes respectively. Such letter suffixes can also be entirely omitted. | |||
713 | The filter can be disabled or changed to another | 713 | The filter can be disabled or changed to another |
714 | driver later using sysfs. | 714 | driver later using sysfs. |
715 | 715 | ||
716 | drm_kms_helper.edid_firmware=[<connector>:]<file> | ||
717 | Broken monitors, graphic adapters and KVMs may | ||
718 | send no or incorrect EDID data sets. This parameter | ||
719 | allows to specify an EDID data set in the | ||
720 | /lib/firmware directory that is used instead. | ||
721 | Generic built-in EDID data sets are used, if one of | ||
722 | edid/1024x768.bin, edid/1280x1024.bin, | ||
723 | edid/1680x1050.bin, or edid/1920x1080.bin is given | ||
724 | and no file with the same name exists. Details and | ||
725 | instructions how to build your own EDID data are | ||
726 | available in Documentation/EDID/HOWTO.txt. An EDID | ||
727 | data set will only be used for a particular connector, | ||
728 | if its name and a colon are prepended to the EDID | ||
729 | name. | ||
730 | |||
716 | dscc4.setup= [NET] | 731 | dscc4.setup= [NET] |
717 | 732 | ||
718 | earlycon= [KNL] Output early console device and options. | 733 | earlycon= [KNL] Output early console device and options. |
@@ -1071,8 +1086,6 @@ bytes respectively. Such letter suffixes can also be entirely omitted. | |||
1071 | no_x2apic_optout | 1086 | no_x2apic_optout |
1072 | BIOS x2APIC opt-out request will be ignored | 1087 | BIOS x2APIC opt-out request will be ignored |
1073 | 1088 | ||
1074 | inttest= [IA-64] | ||
1075 | |||
1076 | iomem= Disable strict checking of access to MMIO memory | 1089 | iomem= Disable strict checking of access to MMIO memory |
1077 | strict regions from userspace. | 1090 | strict regions from userspace. |
1078 | relaxed | 1091 | relaxed |
@@ -1657,6 +1670,14 @@ bytes respectively. Such letter suffixes can also be entirely omitted. | |||
1657 | of returning the full 64-bit number. | 1670 | of returning the full 64-bit number. |
1658 | The default is to return 64-bit inode numbers. | 1671 | The default is to return 64-bit inode numbers. |
1659 | 1672 | ||
1673 | nfs.max_session_slots= | ||
1674 | [NFSv4.1] Sets the maximum number of session slots | ||
1675 | the client will attempt to negotiate with the server. | ||
1676 | This limits the number of simultaneous RPC requests | ||
1677 | that the client can send to the NFSv4.1 server. | ||
1678 | Note that there is little point in setting this | ||
1679 | value higher than the max_tcp_slot_table_limit. | ||
1680 | |||
1660 | nfs.nfs4_disable_idmapping= | 1681 | nfs.nfs4_disable_idmapping= |
1661 | [NFSv4] When set to the default of '1', this option | 1682 | [NFSv4] When set to the default of '1', this option |
1662 | ensures that both the RPC level authentication | 1683 | ensures that both the RPC level authentication |
@@ -1670,6 +1691,27 @@ bytes respectively. Such letter suffixes can also be entirely omitted. | |||
1670 | back to using the idmapper. | 1691 | back to using the idmapper. |
1671 | To turn off this behaviour, set the value to '0'. | 1692 | To turn off this behaviour, set the value to '0'. |
1672 | 1693 | ||
1694 | nfs.send_implementation_id = | ||
1695 | [NFSv4.1] Send client implementation identification | ||
1696 | information in exchange_id requests. | ||
1697 | If zero, no implementation identification information | ||
1698 | will be sent. | ||
1699 | The default is to send the implementation identification | ||
1700 | information. | ||
1701 | |||
1702 | nfsd.nfs4_disable_idmapping= | ||
1703 | [NFSv4] When set to the default of '1', the NFSv4 | ||
1704 | server will return only numeric uids and gids to | ||
1705 | clients using auth_sys, and will accept numeric uids | ||
1706 | and gids from such clients. This is intended to ease | ||
1707 | migration from NFSv2/v3. | ||
1708 | |||
1709 | objlayoutdriver.osd_login_prog= | ||
1710 | [NFS] [OBJLAYOUT] sets the pathname to the program which | ||
1711 | is used to automatically discover and login into new | ||
1712 | osd-targets. Please see: | ||
1713 | Documentation/filesystems/pnfs.txt for more explanations | ||
1714 | |||
1673 | nmi_debug= [KNL,AVR32,SH] Specify one or more actions to take | 1715 | nmi_debug= [KNL,AVR32,SH] Specify one or more actions to take |
1674 | when a NMI is triggered. | 1716 | when a NMI is triggered. |
1675 | Format: [state][,regs][,debounce][,die] | 1717 | Format: [state][,regs][,debounce][,die] |
@@ -1833,6 +1875,8 @@ bytes respectively. Such letter suffixes can also be entirely omitted. | |||
1833 | shutdown the other cpus. Instead use the REBOOT_VECTOR | 1875 | shutdown the other cpus. Instead use the REBOOT_VECTOR |
1834 | irq. | 1876 | irq. |
1835 | 1877 | ||
1878 | nomodule Disable module load | ||
1879 | |||
1836 | nopat [X86] Disable PAT (page attribute table extension of | 1880 | nopat [X86] Disable PAT (page attribute table extension of |
1837 | pagetables) support. | 1881 | pagetables) support. |
1838 | 1882 | ||
@@ -2109,8 +2153,14 @@ bytes respectively. Such letter suffixes can also be entirely omitted. | |||
2109 | the default. | 2153 | the default. |
2110 | off: Turn ECRC off | 2154 | off: Turn ECRC off |
2111 | on: Turn ECRC on. | 2155 | on: Turn ECRC on. |
2112 | realloc reallocate PCI resources if allocations done by BIOS | 2156 | realloc= Enable/disable reallocating PCI bridge resources |
2113 | are erroneous. | 2157 | if allocations done by BIOS are too small to |
2158 | accommodate resources required by all child | ||
2159 | devices. | ||
2160 | off: Turn realloc off | ||
2161 | on: Turn realloc on | ||
2162 | realloc same as realloc=on | ||
2163 | noari do not use PCIe ARI. | ||
2114 | 2164 | ||
2115 | pcie_aspm= [PCIE] Forcibly enable or disable PCIe Active State Power | 2165 | pcie_aspm= [PCIE] Forcibly enable or disable PCIe Active State Power |
2116 | Management. | 2166 | Management. |
@@ -2118,6 +2168,10 @@ bytes respectively. Such letter suffixes can also be entirely omitted. | |||
2118 | force Enable ASPM even on devices that claim not to support it. | 2168 | force Enable ASPM even on devices that claim not to support it. |
2119 | WARNING: Forcing ASPM on may cause system lockups. | 2169 | WARNING: Forcing ASPM on may cause system lockups. |
2120 | 2170 | ||
2171 | pcie_hp= [PCIE] PCI Express Hotplug driver options: | ||
2172 | nomsi Do not use MSI for PCI Express Native Hotplug (this | ||
2173 | makes all PCIe ports use INTx for hotplug services). | ||
2174 | |||
2121 | pcie_ports= [PCIE] PCIe ports handling: | 2175 | pcie_ports= [PCIE] PCIe ports handling: |
2122 | auto Ask the BIOS whether or not to use native PCIe services | 2176 | auto Ask the BIOS whether or not to use native PCIe services |
2123 | associated with PCIe ports (PME, hot-plug, AER). Use | 2177 | associated with PCIe ports (PME, hot-plug, AER). Use |
@@ -2211,6 +2265,12 @@ bytes respectively. Such letter suffixes can also be entirely omitted. | |||
2211 | 2265 | ||
2212 | default: off. | 2266 | default: off. |
2213 | 2267 | ||
2268 | printk.always_kmsg_dump= | ||
2269 | Trigger kmsg_dump for cases other than kernel oops or | ||
2270 | panics | ||
2271 | Format: <bool> (1/Y/y=enable, 0/N/n=disable) | ||
2272 | default: disabled | ||
2273 | |||
2214 | printk.time= Show timing data prefixed to each printk message line | 2274 | printk.time= Show timing data prefixed to each printk message line |
2215 | Format: <bool> (1/Y/y=enable, 0/N/n=disable) | 2275 | Format: <bool> (1/Y/y=enable, 0/N/n=disable) |
2216 | 2276 | ||
@@ -2629,6 +2689,13 @@ bytes respectively. Such letter suffixes can also be entirely omitted. | |||
2629 | to facilitate early boot debugging. | 2689 | to facilitate early boot debugging. |
2630 | See also Documentation/trace/events.txt | 2690 | See also Documentation/trace/events.txt |
2631 | 2691 | ||
2692 | transparent_hugepage= | ||
2693 | [KNL] | ||
2694 | Format: [always|madvise|never] | ||
2695 | Can be used to control the default behavior of the system | ||
2696 | with respect to transparent hugepages. | ||
2697 | See Documentation/vm/transhuge.txt for more details. | ||
2698 | |||
2632 | tsc= Disable clocksource stability checks for TSC. | 2699 | tsc= Disable clocksource stability checks for TSC. |
2633 | Format: <string> | 2700 | Format: <string> |
2634 | [x86] reliable: mark tsc clocksource as reliable, this | 2701 | [x86] reliable: mark tsc clocksource as reliable, this |
diff --git a/Documentation/ko_KR/HOWTO b/Documentation/ko_KR/HOWTO index ab5189ae3428..2f48f205fedc 100644 --- a/Documentation/ko_KR/HOWTO +++ b/Documentation/ko_KR/HOWTO | |||
@@ -354,7 +354,7 @@ Andrew Morton에 의해 배포된 실험적인 커널 패치들이다. Andrew는 | |||
354 | git.kernel.org:/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6.git | 354 | git.kernel.org:/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6.git |
355 | 355 | ||
356 | quilt trees: | 356 | quilt trees: |
357 | - USB, PCI, Driver Core, and I2C, Greg Kroah-Hartman < gregkh@suse.de> | 357 | - USB, PCI, Driver Core, and I2C, Greg Kroah-Hartman < gregkh@linuxfoundation.org> |
358 | kernel.org/pub/linux/kernel/people/gregkh/gregkh-2.6/ | 358 | kernel.org/pub/linux/kernel/people/gregkh/gregkh-2.6/ |
359 | - x86-64, partly i386, Andi Kleen < ak@suse.de> | 359 | - x86-64, partly i386, Andi Kleen < ak@suse.de> |
360 | ftp.firstfloor.org:/pub/ak/x86_64/quilt/ | 360 | ftp.firstfloor.org:/pub/ak/x86_64/quilt/ |
diff --git a/Documentation/kobject.txt b/Documentation/kobject.txt index 3ab2472509cb..49578cf1aea5 100644 --- a/Documentation/kobject.txt +++ b/Documentation/kobject.txt | |||
@@ -1,6 +1,6 @@ | |||
1 | Everything you never wanted to know about kobjects, ksets, and ktypes | 1 | Everything you never wanted to know about kobjects, ksets, and ktypes |
2 | 2 | ||
3 | Greg Kroah-Hartman <gregkh@suse.de> | 3 | Greg Kroah-Hartman <gregkh@linuxfoundation.org> |
4 | 4 | ||
5 | Based on an original article by Jon Corbet for lwn.net written October 1, | 5 | Based on an original article by Jon Corbet for lwn.net written October 1, |
6 | 2003 and located at http://lwn.net/Articles/51437/ | 6 | 2003 and located at http://lwn.net/Articles/51437/ |
diff --git a/Documentation/laptops/asus-laptop.txt b/Documentation/laptops/asus-laptop.txt index 803e51f6768b..a1e04d679289 100644 --- a/Documentation/laptops/asus-laptop.txt +++ b/Documentation/laptops/asus-laptop.txt | |||
@@ -45,7 +45,7 @@ Status | |||
45 | Usage | 45 | Usage |
46 | ----- | 46 | ----- |
47 | 47 | ||
48 | Try "modprobe asus_acpi". Check your dmesg (simply type dmesg). You should | 48 | Try "modprobe asus-laptop". Check your dmesg (simply type dmesg). You should |
49 | see some lines like this : | 49 | see some lines like this : |
50 | 50 | ||
51 | Asus Laptop Extras version 0.42 | 51 | Asus Laptop Extras version 0.42 |
diff --git a/Documentation/laptops/sony-laptop.txt b/Documentation/laptops/sony-laptop.txt index 2bd4e82e5d9f..0d5ac7f5287e 100644 --- a/Documentation/laptops/sony-laptop.txt +++ b/Documentation/laptops/sony-laptop.txt | |||
@@ -17,6 +17,11 @@ subsystem. See the logs of acpid or /proc/acpi/event and | |||
17 | devices are created by the driver. Additionally, loading the driver with the | 17 | devices are created by the driver. Additionally, loading the driver with the |
18 | debug option will report all events in the kernel log. | 18 | debug option will report all events in the kernel log. |
19 | 19 | ||
20 | The "scancodes" passed to the input system (that can be remapped with udev) | ||
21 | are indexes to the table "sony_laptop_input_keycode_map" in the sony-laptop.c | ||
22 | module. For example the "FN/E" key combination (EJECTCD on some models) | ||
23 | generates the scancode 20 (0x14). | ||
24 | |||
20 | Backlight control: | 25 | Backlight control: |
21 | ------------------ | 26 | ------------------ |
22 | If your laptop model supports it, you will find sysfs files in the | 27 | If your laptop model supports it, you will find sysfs files in the |
diff --git a/Documentation/laptops/sonypi.txt b/Documentation/laptops/sonypi.txt index 4857acfc50f1..606bdb9ce036 100644 --- a/Documentation/laptops/sonypi.txt +++ b/Documentation/laptops/sonypi.txt | |||
@@ -110,7 +110,7 @@ Module use: | |||
110 | ----------- | 110 | ----------- |
111 | 111 | ||
112 | In order to automatically load the sonypi module on use, you can put those | 112 | In order to automatically load the sonypi module on use, you can put those |
113 | lines in your /etc/modprobe.conf file: | 113 | lines a configuration file in /etc/modprobe.d/: |
114 | 114 | ||
115 | alias char-major-10-250 sonypi | 115 | alias char-major-10-250 sonypi |
116 | options sonypi minor=250 | 116 | options sonypi minor=250 |
diff --git a/Documentation/leds/leds-lp5521.txt b/Documentation/leds/leds-lp5521.txt index c4d8d151e0fe..0e542ab3d4a0 100644 --- a/Documentation/leds/leds-lp5521.txt +++ b/Documentation/leds/leds-lp5521.txt | |||
@@ -43,17 +43,23 @@ Format: 10x mA i.e 10 means 1.0 mA | |||
43 | example platform data: | 43 | example platform data: |
44 | 44 | ||
45 | Note: chan_nr can have values between 0 and 2. | 45 | Note: chan_nr can have values between 0 and 2. |
46 | The name of each channel can be configurable. | ||
47 | If the name field is not defined, the default name will be set to 'xxxx:channelN' | ||
48 | (XXXX : pdata->label or i2c client name, N : channel number) | ||
46 | 49 | ||
47 | static struct lp5521_led_config lp5521_led_config[] = { | 50 | static struct lp5521_led_config lp5521_led_config[] = { |
48 | { | 51 | { |
52 | .name = "red", | ||
49 | .chan_nr = 0, | 53 | .chan_nr = 0, |
50 | .led_current = 50, | 54 | .led_current = 50, |
51 | .max_current = 130, | 55 | .max_current = 130, |
52 | }, { | 56 | }, { |
57 | .name = "green", | ||
53 | .chan_nr = 1, | 58 | .chan_nr = 1, |
54 | .led_current = 0, | 59 | .led_current = 0, |
55 | .max_current = 130, | 60 | .max_current = 130, |
56 | }, { | 61 | }, { |
62 | .name = "blue", | ||
57 | .chan_nr = 2, | 63 | .chan_nr = 2, |
58 | .led_current = 0, | 64 | .led_current = 0, |
59 | .max_current = 130, | 65 | .max_current = 130, |
@@ -86,3 +92,60 @@ static struct lp5521_platform_data lp5521_platform_data = { | |||
86 | 92 | ||
87 | If the current is set to 0 in the platform data, that channel is | 93 | If the current is set to 0 in the platform data, that channel is |
88 | disabled and it is not visible in the sysfs. | 94 | disabled and it is not visible in the sysfs. |
95 | |||
96 | The 'update_config' : CONFIG register (ADDR 08h) | ||
97 | This value is platform-specific data. | ||
98 | If update_config is not defined, the CONFIG register is set with | ||
99 | 'LP5521_PWRSAVE_EN | LP5521_CP_MODE_AUTO | LP5521_R_TO_BATT'. | ||
100 | (Enable auto-powersave, set charge pump to auto, red to battery) | ||
101 | |||
102 | example of update_config : | ||
103 | |||
104 | #define LP5521_CONFIGS (LP5521_PWM_HF | LP5521_PWRSAVE_EN | \ | ||
105 | LP5521_CP_MODE_AUTO | LP5521_R_TO_BATT | \ | ||
106 | LP5521_CLK_INT) | ||
107 | |||
108 | static struct lp5521_platform_data lp5521_pdata = { | ||
109 | .led_config = lp5521_led_config, | ||
110 | .num_channels = ARRAY_SIZE(lp5521_led_config), | ||
111 | .clock_mode = LP5521_CLOCK_INT, | ||
112 | .update_config = LP5521_CONFIGS, | ||
113 | }; | ||
114 | |||
115 | LED patterns : LP5521 has autonomous operation without external control. | ||
116 | Pattern data can be defined in the platform data. | ||
117 | |||
118 | example of led pattern data : | ||
119 | |||
120 | /* RGB(50,5,0) 500ms on, 500ms off, infinite loop */ | ||
121 | static u8 pattern_red[] = { | ||
122 | 0x40, 0x32, 0x60, 0x00, 0x40, 0x00, 0x60, 0x00, | ||
123 | }; | ||
124 | |||
125 | static u8 pattern_green[] = { | ||
126 | 0x40, 0x05, 0x60, 0x00, 0x40, 0x00, 0x60, 0x00, | ||
127 | }; | ||
128 | |||
129 | static struct lp5521_led_pattern board_led_patterns[] = { | ||
130 | { | ||
131 | .r = pattern_red, | ||
132 | .g = pattern_green, | ||
133 | .size_r = ARRAY_SIZE(pattern_red), | ||
134 | .size_g = ARRAY_SIZE(pattern_green), | ||
135 | }, | ||
136 | }; | ||
137 | |||
138 | static struct lp5521_platform_data lp5521_platform_data = { | ||
139 | .led_config = lp5521_led_config, | ||
140 | .num_channels = ARRAY_SIZE(lp5521_led_config), | ||
141 | .clock_mode = LP5521_CLOCK_EXT, | ||
142 | .patterns = board_led_patterns, | ||
143 | .num_patterns = ARRAY_SIZE(board_led_patterns), | ||
144 | }; | ||
145 | |||
146 | Then predefined led pattern(s) can be executed via the sysfs. | ||
147 | To start the pattern #1, | ||
148 | # echo 1 > /sys/bus/i2c/devices/xxxx/led_pattern | ||
149 | (xxxx : i2c bus & slave address) | ||
150 | To end the pattern, | ||
151 | # echo 0 > /sys/bus/i2c/devices/xxxx/led_pattern | ||
diff --git a/Documentation/lockup-watchdogs.txt b/Documentation/lockup-watchdogs.txt new file mode 100644 index 000000000000..d2a36602ca8d --- /dev/null +++ b/Documentation/lockup-watchdogs.txt | |||
@@ -0,0 +1,63 @@ | |||
1 | =============================================================== | ||
2 | Softlockup detector and hardlockup detector (aka nmi_watchdog) | ||
3 | =============================================================== | ||
4 | |||
5 | The Linux kernel can act as a watchdog to detect both soft and hard | ||
6 | lockups. | ||
7 | |||
8 | A 'softlockup' is defined as a bug that causes the kernel to loop in | ||
9 | kernel mode for more than 20 seconds (see "Implementation" below for | ||
10 | details), without giving other tasks a chance to run. The current | ||
11 | stack trace is displayed upon detection and, by default, the system | ||
12 | will stay locked up. Alternatively, the kernel can be configured to | ||
13 | panic; a sysctl, "kernel.softlockup_panic", a kernel parameter, | ||
14 | "softlockup_panic" (see "Documentation/kernel-parameters.txt" for | ||
15 | details), and a compile option, "BOOTPARAM_HARDLOCKUP_PANIC", are | ||
16 | provided for this. | ||
17 | |||
18 | A 'hardlockup' is defined as a bug that causes the CPU to loop in | ||
19 | kernel mode for more than 10 seconds (see "Implementation" below for | ||
20 | details), without letting other interrupts have a chance to run. | ||
21 | Similarly to the softlockup case, the current stack trace is displayed | ||
22 | upon detection and the system will stay locked up unless the default | ||
23 | behavior is changed, which can be done through a compile time knob, | ||
24 | "BOOTPARAM_HARDLOCKUP_PANIC", and a kernel parameter, "nmi_watchdog" | ||
25 | (see "Documentation/kernel-parameters.txt" for details). | ||
26 | |||
27 | The panic option can be used in combination with panic_timeout (this | ||
28 | timeout is set through the confusingly named "kernel.panic" sysctl), | ||
29 | to cause the system to reboot automatically after a specified amount | ||
30 | of time. | ||
31 | |||
32 | === Implementation === | ||
33 | |||
34 | The soft and hard lockup detectors are built on top of the hrtimer and | ||
35 | perf subsystems, respectively. A direct consequence of this is that, | ||
36 | in principle, they should work in any architecture where these | ||
37 | subsystems are present. | ||
38 | |||
39 | A periodic hrtimer runs to generate interrupts and kick the watchdog | ||
40 | task. An NMI perf event is generated every "watchdog_thresh" | ||
41 | (compile-time initialized to 10 and configurable through sysctl of the | ||
42 | same name) seconds to check for hardlockups. If any CPU in the system | ||
43 | does not receive any hrtimer interrupt during that time the | ||
44 | 'hardlockup detector' (the handler for the NMI perf event) will | ||
45 | generate a kernel warning or call panic, depending on the | ||
46 | configuration. | ||
47 | |||
48 | The watchdog task is a high priority kernel thread that updates a | ||
49 | timestamp every time it is scheduled. If that timestamp is not updated | ||
50 | for 2*watchdog_thresh seconds (the softlockup threshold) the | ||
51 | 'softlockup detector' (coded inside the hrtimer callback function) | ||
52 | will dump useful debug information to the system log, after which it | ||
53 | will call panic if it was instructed to do so or resume execution of | ||
54 | other kernel code. | ||
55 | |||
56 | The period of the hrtimer is 2*watchdog_thresh/5, which means it has | ||
57 | two or three chances to generate an interrupt before the hardlockup | ||
58 | detector kicks in. | ||
59 | |||
60 | As explained above, a kernel knob is provided that allows | ||
61 | administrators to configure the period of the hrtimer and the perf | ||
62 | event. The right value for a particular environment is a trade-off | ||
63 | between fast response to lockups and detection overhead. | ||
diff --git a/Documentation/magic-number.txt b/Documentation/magic-number.txt index abf481f780ec..82761a31d64d 100644 --- a/Documentation/magic-number.txt +++ b/Documentation/magic-number.txt | |||
@@ -89,7 +89,7 @@ TTY_DRIVER_MAGIC 0x5402 tty_driver include/linux/tty_driver.h | |||
89 | MGSLPC_MAGIC 0x5402 mgslpc_info drivers/char/pcmcia/synclink_cs.c | 89 | MGSLPC_MAGIC 0x5402 mgslpc_info drivers/char/pcmcia/synclink_cs.c |
90 | TTY_LDISC_MAGIC 0x5403 tty_ldisc include/linux/tty_ldisc.h | 90 | TTY_LDISC_MAGIC 0x5403 tty_ldisc include/linux/tty_ldisc.h |
91 | USB_SERIAL_MAGIC 0x6702 usb_serial drivers/usb/serial/usb-serial.h | 91 | USB_SERIAL_MAGIC 0x6702 usb_serial drivers/usb/serial/usb-serial.h |
92 | FULL_DUPLEX_MAGIC 0x6969 drivers/net/tulip/de2104x.c | 92 | FULL_DUPLEX_MAGIC 0x6969 drivers/net/ethernet/dec/tulip/de2104x.c |
93 | USB_BLUETOOTH_MAGIC 0x6d02 usb_bluetooth drivers/usb/class/bluetty.c | 93 | USB_BLUETOOTH_MAGIC 0x6d02 usb_bluetooth drivers/usb/class/bluetty.c |
94 | RFCOMM_TTY_MAGIC 0x6d02 net/bluetooth/rfcomm/tty.c | 94 | RFCOMM_TTY_MAGIC 0x6d02 net/bluetooth/rfcomm/tty.c |
95 | USB_SERIAL_PORT_MAGIC 0x7301 usb_serial_port drivers/usb/serial/usb-serial.h | 95 | USB_SERIAL_PORT_MAGIC 0x7301 usb_serial_port drivers/usb/serial/usb-serial.h |
diff --git a/Documentation/mono.txt b/Documentation/mono.txt index e8e1758e87da..d01ac6052194 100644 --- a/Documentation/mono.txt +++ b/Documentation/mono.txt | |||
@@ -38,11 +38,11 @@ if [ ! -e /proc/sys/fs/binfmt_misc/register ]; then | |||
38 | /sbin/modprobe binfmt_misc | 38 | /sbin/modprobe binfmt_misc |
39 | # Some distributions, like Fedora Core, perform | 39 | # Some distributions, like Fedora Core, perform |
40 | # the following command automatically when the | 40 | # the following command automatically when the |
41 | # binfmt_misc module is loaded into the kernel. | 41 | # binfmt_misc module is loaded into the kernel |
42 | # or during normal boot up (systemd-based systems). | ||
42 | # Thus, it is possible that the following line | 43 | # Thus, it is possible that the following line |
43 | # is not needed at all. Look at /etc/modprobe.conf | 44 | # is not needed at all. |
44 | # to check whether this is applicable or not. | 45 | mount -t binfmt_misc none /proc/sys/fs/binfmt_misc |
45 | mount -t binfmt_misc none /proc/sys/fs/binfmt_misc | ||
46 | fi | 46 | fi |
47 | 47 | ||
48 | # Register support for .NET CLR binaries | 48 | # Register support for .NET CLR binaries |
diff --git a/Documentation/networking/LICENSE.qlge b/Documentation/networking/LICENSE.qlge index 123b6edd7f18..ce64e4d15b21 100644 --- a/Documentation/networking/LICENSE.qlge +++ b/Documentation/networking/LICENSE.qlge | |||
@@ -1,46 +1,288 @@ | |||
1 | Copyright (c) 2003-2008 QLogic Corporation | 1 | Copyright (c) 2003-2011 QLogic Corporation |
2 | QLogic Linux Networking HBA Driver | 2 | QLogic Linux qlge NIC Driver |
3 | 3 | ||
4 | This program includes a device driver for Linux 2.6 that may be | ||
5 | distributed with QLogic hardware specific firmware binary file. | ||
6 | You may modify and redistribute the device driver code under the | 4 | You may modify and redistribute the device driver code under the |
7 | GNU General Public License as published by the Free Software | 5 | GNU General Public License (a copy of which is attached hereto as |
8 | Foundation (version 2 or a later version). | 6 | Exhibit A) published by the Free Software Foundation (version 2). |
9 | |||
10 | You may redistribute the hardware specific firmware binary file | ||
11 | under the following terms: | ||
12 | |||
13 | 1. Redistribution of source code (only if applicable), | ||
14 | must retain the above copyright notice, this list of | ||
15 | conditions and the following disclaimer. | ||
16 | |||
17 | 2. Redistribution in binary form must reproduce the above | ||
18 | copyright notice, this list of conditions and the | ||
19 | following disclaimer in the documentation and/or other | ||
20 | materials provided with the distribution. | ||
21 | |||
22 | 3. The name of QLogic Corporation may not be used to | ||
23 | endorse or promote products derived from this software | ||
24 | without specific prior written permission | ||
25 | |||
26 | REGARDLESS OF WHAT LICENSING MECHANISM IS USED OR APPLICABLE, | ||
27 | THIS PROGRAM IS PROVIDED BY QLOGIC CORPORATION "AS IS'' AND ANY | ||
28 | EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
29 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A | ||
30 | PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR | ||
31 | BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, | ||
32 | EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED | ||
33 | TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | ||
34 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON | ||
35 | ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, | ||
36 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||
37 | OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | ||
38 | POSSIBILITY OF SUCH DAMAGE. | ||
39 | |||
40 | USER ACKNOWLEDGES AND AGREES THAT USE OF THIS PROGRAM WILL NOT | ||
41 | CREATE OR GIVE GROUNDS FOR A LICENSE BY IMPLICATION, ESTOPPEL, OR | ||
42 | OTHERWISE IN ANY INTELLECTUAL PROPERTY RIGHTS (PATENT, COPYRIGHT, | ||
43 | TRADE SECRET, MASK WORK, OR OTHER PROPRIETARY RIGHT) EMBODIED IN | ||
44 | ANY OTHER QLOGIC HARDWARE OR SOFTWARE EITHER SOLELY OR IN | ||
45 | COMBINATION WITH THIS PROGRAM. | ||
46 | 7 | ||
8 | |||
9 | EXHIBIT A | ||
10 | |||
11 | GNU GENERAL PUBLIC LICENSE | ||
12 | Version 2, June 1991 | ||
13 | |||
14 | Copyright (C) 1989, 1991 Free Software Foundation, Inc. | ||
15 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA | ||
16 | Everyone is permitted to copy and distribute verbatim copies | ||
17 | of this license document, but changing it is not allowed. | ||
18 | |||
19 | Preamble | ||
20 | |||
21 | The licenses for most software are designed to take away your | ||
22 | freedom to share and change it. By contrast, the GNU General Public | ||
23 | License is intended to guarantee your freedom to share and change free | ||
24 | software--to make sure the software is free for all its users. This | ||
25 | General Public License applies to most of the Free Software | ||
26 | Foundation's software and to any other program whose authors commit to | ||
27 | using it. (Some other Free Software Foundation software is covered by | ||
28 | the GNU Lesser General Public License instead.) You can apply it to | ||
29 | your programs, too. | ||
30 | |||
31 | When we speak of free software, we are referring to freedom, not | ||
32 | price. Our General Public Licenses are designed to make sure that you | ||
33 | have the freedom to distribute copies of free software (and charge for | ||
34 | this service if you wish), that you receive source code or can get it | ||
35 | if you want it, that you can change the software or use pieces of it | ||
36 | in new free programs; and that you know you can do these things. | ||
37 | |||
38 | To protect your rights, we need to make restrictions that forbid | ||
39 | anyone to deny you these rights or to ask you to surrender the rights. | ||
40 | These restrictions translate to certain responsibilities for you if you | ||
41 | distribute copies of the software, or if you modify it. | ||
42 | |||
43 | For example, if you distribute copies of such a program, whether | ||
44 | gratis or for a fee, you must give the recipients all the rights that | ||
45 | you have. You must make sure that they, too, receive or can get the | ||
46 | source code. And you must show them these terms so they know their | ||
47 | rights. | ||
48 | |||
49 | We protect your rights with two steps: (1) copyright the software, and | ||
50 | (2) offer you this license which gives you legal permission to copy, | ||
51 | distribute and/or modify the software. | ||
52 | |||
53 | Also, for each author's protection and ours, we want to make certain | ||
54 | that everyone understands that there is no warranty for this free | ||
55 | software. If the software is modified by someone else and passed on, we | ||
56 | want its recipients to know that what they have is not the original, so | ||
57 | that any problems introduced by others will not reflect on the original | ||
58 | authors' reputations. | ||
59 | |||
60 | Finally, any free program is threatened constantly by software | ||
61 | patents. We wish to avoid the danger that redistributors of a free | ||
62 | program will individually obtain patent licenses, in effect making the | ||
63 | program proprietary. To prevent this, we have made it clear that any | ||
64 | patent must be licensed for everyone's free use or not licensed at all. | ||
65 | |||
66 | The precise terms and conditions for copying, distribution and | ||
67 | modification follow. | ||
68 | |||
69 | GNU GENERAL PUBLIC LICENSE | ||
70 | TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION | ||
71 | |||
72 | 0. This License applies to any program or other work which contains | ||
73 | a notice placed by the copyright holder saying it may be distributed | ||
74 | under the terms of this General Public License. The "Program", below, | ||
75 | refers to any such program or work, and a "work based on the Program" | ||
76 | means either the Program or any derivative work under copyright law: | ||
77 | that is to say, a work containing the Program or a portion of it, | ||
78 | either verbatim or with modifications and/or translated into another | ||
79 | language. (Hereinafter, translation is included without limitation in | ||
80 | the term "modification".) Each licensee is addressed as "you". | ||
81 | |||
82 | Activities other than copying, distribution and modification are not | ||
83 | covered by this License; they are outside its scope. The act of | ||
84 | running the Program is not restricted, and the output from the Program | ||
85 | is covered only if its contents constitute a work based on the | ||
86 | Program (independent of having been made by running the Program). | ||
87 | Whether that is true depends on what the Program does. | ||
88 | |||
89 | 1. You may copy and distribute verbatim copies of the Program's | ||
90 | source code as you receive it, in any medium, provided that you | ||
91 | conspicuously and appropriately publish on each copy an appropriate | ||
92 | copyright notice and disclaimer of warranty; keep intact all the | ||
93 | notices that refer to this License and to the absence of any warranty; | ||
94 | and give any other recipients of the Program a copy of this License | ||
95 | along with the Program. | ||
96 | |||
97 | You may charge a fee for the physical act of transferring a copy, and | ||
98 | you may at your option offer warranty protection in exchange for a fee. | ||
99 | |||
100 | 2. You may modify your copy or copies of the Program or any portion | ||
101 | of it, thus forming a work based on the Program, and copy and | ||
102 | distribute such modifications or work under the terms of Section 1 | ||
103 | above, provided that you also meet all of these conditions: | ||
104 | |||
105 | a) You must cause the modified files to carry prominent notices | ||
106 | stating that you changed the files and the date of any change. | ||
107 | |||
108 | b) You must cause any work that you distribute or publish, that in | ||
109 | whole or in part contains or is derived from the Program or any | ||
110 | part thereof, to be licensed as a whole at no charge to all third | ||
111 | parties under the terms of this License. | ||
112 | |||
113 | c) If the modified program normally reads commands interactively | ||
114 | when run, you must cause it, when started running for such | ||
115 | interactive use in the most ordinary way, to print or display an | ||
116 | announcement including an appropriate copyright notice and a | ||
117 | notice that there is no warranty (or else, saying that you provide | ||
118 | a warranty) and that users may redistribute the program under | ||
119 | these conditions, and telling the user how to view a copy of this | ||
120 | License. (Exception: if the Program itself is interactive but | ||
121 | does not normally print such an announcement, your work based on | ||
122 | the Program is not required to print an announcement.) | ||
123 | |||
124 | These requirements apply to the modified work as a whole. If | ||
125 | identifiable sections of that work are not derived from the Program, | ||
126 | and can be reasonably considered independent and separate works in | ||
127 | themselves, then this License, and its terms, do not apply to those | ||
128 | sections when you distribute them as separate works. But when you | ||
129 | distribute the same sections as part of a whole which is a work based | ||
130 | on the Program, the distribution of the whole must be on the terms of | ||
131 | this License, whose permissions for other licensees extend to the | ||
132 | entire whole, and thus to each and every part regardless of who wrote it. | ||
133 | |||
134 | Thus, it is not the intent of this section to claim rights or contest | ||
135 | your rights to work written entirely by you; rather, the intent is to | ||
136 | exercise the right to control the distribution of derivative or | ||
137 | collective works based on the Program. | ||
138 | |||
139 | In addition, mere aggregation of another work not based on the Program | ||
140 | with the Program (or with a work based on the Program) on a volume of | ||
141 | a storage or distribution medium does not bring the other work under | ||
142 | the scope of this License. | ||
143 | |||
144 | 3. You may copy and distribute the Program (or a work based on it, | ||
145 | under Section 2) in object code or executable form under the terms of | ||
146 | Sections 1 and 2 above provided that you also do one of the following: | ||
147 | |||
148 | a) Accompany it with the complete corresponding machine-readable | ||
149 | source code, which must be distributed under the terms of Sections | ||
150 | 1 and 2 above on a medium customarily used for software interchange; or, | ||
151 | |||
152 | b) Accompany it with a written offer, valid for at least three | ||
153 | years, to give any third party, for a charge no more than your | ||
154 | cost of physically performing source distribution, a complete | ||
155 | machine-readable copy of the corresponding source code, to be | ||
156 | distributed under the terms of Sections 1 and 2 above on a medium | ||
157 | customarily used for software interchange; or, | ||
158 | |||
159 | c) Accompany it with the information you received as to the offer | ||
160 | to distribute corresponding source code. (This alternative is | ||
161 | allowed only for noncommercial distribution and only if you | ||
162 | received the program in object code or executable form with such | ||
163 | an offer, in accord with Subsection b above.) | ||
164 | |||
165 | The source code for a work means the preferred form of the work for | ||
166 | making modifications to it. For an executable work, complete source | ||
167 | code means all the source code for all modules it contains, plus any | ||
168 | associated interface definition files, plus the scripts used to | ||
169 | control compilation and installation of the executable. However, as a | ||
170 | special exception, the source code distributed need not include | ||
171 | anything that is normally distributed (in either source or binary | ||
172 | form) with the major components (compiler, kernel, and so on) of the | ||
173 | operating system on which the executable runs, unless that component | ||
174 | itself accompanies the executable. | ||
175 | |||
176 | If distribution of executable or object code is made by offering | ||
177 | access to copy from a designated place, then offering equivalent | ||
178 | access to copy the source code from the same place counts as | ||
179 | distribution of the source code, even though third parties are not | ||
180 | compelled to copy the source along with the object code. | ||
181 | |||
182 | 4. You may not copy, modify, sublicense, or distribute the Program | ||
183 | except as expressly provided under this License. Any attempt | ||
184 | otherwise to copy, modify, sublicense or distribute the Program is | ||
185 | void, and will automatically terminate your rights under this License. | ||
186 | However, parties who have received copies, or rights, from you under | ||
187 | this License will not have their licenses terminated so long as such | ||
188 | parties remain in full compliance. | ||
189 | |||
190 | 5. You are not required to accept this License, since you have not | ||
191 | signed it. However, nothing else grants you permission to modify or | ||
192 | distribute the Program or its derivative works. These actions are | ||
193 | prohibited by law if you do not accept this License. Therefore, by | ||
194 | modifying or distributing the Program (or any work based on the | ||
195 | Program), you indicate your acceptance of this License to do so, and | ||
196 | all its terms and conditions for copying, distributing or modifying | ||
197 | the Program or works based on it. | ||
198 | |||
199 | 6. Each time you redistribute the Program (or any work based on the | ||
200 | Program), the recipient automatically receives a license from the | ||
201 | original licensor to copy, distribute or modify the Program subject to | ||
202 | these terms and conditions. You may not impose any further | ||
203 | restrictions on the recipients' exercise of the rights granted herein. | ||
204 | You are not responsible for enforcing compliance by third parties to | ||
205 | this License. | ||
206 | |||
207 | 7. If, as a consequence of a court judgment or allegation of patent | ||
208 | infringement or for any other reason (not limited to patent issues), | ||
209 | conditions are imposed on you (whether by court order, agreement or | ||
210 | otherwise) that contradict the conditions of this License, they do not | ||
211 | excuse you from the conditions of this License. If you cannot | ||
212 | distribute so as to satisfy simultaneously your obligations under this | ||
213 | License and any other pertinent obligations, then as a consequence you | ||
214 | may not distribute the Program at all. For example, if a patent | ||
215 | license would not permit royalty-free redistribution of the Program by | ||
216 | all those who receive copies directly or indirectly through you, then | ||
217 | the only way you could satisfy both it and this License would be to | ||
218 | refrain entirely from distribution of the Program. | ||
219 | |||
220 | If any portion of this section is held invalid or unenforceable under | ||
221 | any particular circumstance, the balance of the section is intended to | ||
222 | apply and the section as a whole is intended to apply in other | ||
223 | circumstances. | ||
224 | |||
225 | It is not the purpose of this section to induce you to infringe any | ||
226 | patents or other property right claims or to contest validity of any | ||
227 | such claims; this section has the sole purpose of protecting the | ||
228 | integrity of the free software distribution system, which is | ||
229 | implemented by public license practices. Many people have made | ||
230 | generous contributions to the wide range of software distributed | ||
231 | through that system in reliance on consistent application of that | ||
232 | system; it is up to the author/donor to decide if he or she is willing | ||
233 | to distribute software through any other system and a licensee cannot | ||
234 | impose that choice. | ||
235 | |||
236 | This section is intended to make thoroughly clear what is believed to | ||
237 | be a consequence of the rest of this License. | ||
238 | |||
239 | 8. If the distribution and/or use of the Program is restricted in | ||
240 | certain countries either by patents or by copyrighted interfaces, the | ||
241 | original copyright holder who places the Program under this License | ||
242 | may add an explicit geographical distribution limitation excluding | ||
243 | those countries, so that distribution is permitted only in or among | ||
244 | countries not thus excluded. In such case, this License incorporates | ||
245 | the limitation as if written in the body of this License. | ||
246 | |||
247 | 9. The Free Software Foundation may publish revised and/or new versions | ||
248 | of the General Public License from time to time. Such new versions will | ||
249 | be similar in spirit to the present version, but may differ in detail to | ||
250 | address new problems or concerns. | ||
251 | |||
252 | Each version is given a distinguishing version number. If the Program | ||
253 | specifies a version number of this License which applies to it and "any | ||
254 | later version", you have the option of following the terms and conditions | ||
255 | either of that version or of any later version published by the Free | ||
256 | Software Foundation. If the Program does not specify a version number of | ||
257 | this License, you may choose any version ever published by the Free Software | ||
258 | Foundation. | ||
259 | |||
260 | 10. If you wish to incorporate parts of the Program into other free | ||
261 | programs whose distribution conditions are different, write to the author | ||
262 | to ask for permission. For software which is copyrighted by the Free | ||
263 | Software Foundation, write to the Free Software Foundation; we sometimes | ||
264 | make exceptions for this. Our decision will be guided by the two goals | ||
265 | of preserving the free status of all derivatives of our free software and | ||
266 | of promoting the sharing and reuse of software generally. | ||
267 | |||
268 | NO WARRANTY | ||
269 | |||
270 | 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY | ||
271 | FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN | ||
272 | OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES | ||
273 | PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED | ||
274 | OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF | ||
275 | MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS | ||
276 | TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE | ||
277 | PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, | ||
278 | REPAIR OR CORRECTION. | ||
279 | |||
280 | 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING | ||
281 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR | ||
282 | REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, | ||
283 | INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING | ||
284 | OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED | ||
285 | TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY | ||
286 | YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER | ||
287 | PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE | ||
288 | POSSIBILITY OF SUCH DAMAGES. | ||
diff --git a/Documentation/networking/baycom.txt b/Documentation/networking/baycom.txt index 4e68849d5639..688f18fd4467 100644 --- a/Documentation/networking/baycom.txt +++ b/Documentation/networking/baycom.txt | |||
@@ -93,7 +93,7 @@ Every time a driver is inserted into the kernel, it has to know which | |||
93 | modems it should access at which ports. This can be done with the setbaycom | 93 | modems it should access at which ports. This can be done with the setbaycom |
94 | utility. If you are only using one modem, you can also configure the | 94 | utility. If you are only using one modem, you can also configure the |
95 | driver from the insmod command line (or by means of an option line in | 95 | driver from the insmod command line (or by means of an option line in |
96 | /etc/modprobe.conf). | 96 | /etc/modprobe.d/*.conf). |
97 | 97 | ||
98 | Examples: | 98 | Examples: |
99 | modprobe baycom_ser_fdx mode="ser12*" iobase=0x3f8 irq=4 | 99 | modprobe baycom_ser_fdx mode="ser12*" iobase=0x3f8 irq=4 |
diff --git a/Documentation/networking/bonding.txt b/Documentation/networking/bonding.txt index 080ad26690ae..bfea8a338901 100644 --- a/Documentation/networking/bonding.txt +++ b/Documentation/networking/bonding.txt | |||
@@ -173,9 +173,8 @@ bonding module at load time, or are specified via sysfs. | |||
173 | 173 | ||
174 | Module options may be given as command line arguments to the | 174 | Module options may be given as command line arguments to the |
175 | insmod or modprobe command, but are usually specified in either the | 175 | insmod or modprobe command, but are usually specified in either the |
176 | /etc/modules.conf or /etc/modprobe.conf configuration file, or in a | 176 | /etc/modrobe.d/*.conf configuration files, or in a distro-specific |
177 | distro-specific configuration file (some of which are detailed in the next | 177 | configuration file (some of which are detailed in the next section). |
178 | section). | ||
179 | 178 | ||
180 | Details on bonding support for sysfs is provided in the | 179 | Details on bonding support for sysfs is provided in the |
181 | "Configuring Bonding Manually via Sysfs" section, below. | 180 | "Configuring Bonding Manually via Sysfs" section, below. |
@@ -1021,7 +1020,7 @@ ifcfg-bondX files. | |||
1021 | 1020 | ||
1022 | Because the sysconfig scripts supply the bonding module | 1021 | Because the sysconfig scripts supply the bonding module |
1023 | options in the ifcfg-bondX file, it is not necessary to add them to | 1022 | options in the ifcfg-bondX file, it is not necessary to add them to |
1024 | the system /etc/modules.conf or /etc/modprobe.conf configuration file. | 1023 | the system /etc/modules.d/*.conf configuration files. |
1025 | 1024 | ||
1026 | 3.2 Configuration with Initscripts Support | 1025 | 3.2 Configuration with Initscripts Support |
1027 | ------------------------------------------ | 1026 | ------------------------------------------ |
@@ -1098,15 +1097,13 @@ queried targets, e.g., | |||
1098 | arp_ip_target=+192.168.1.1 arp_ip_target=+192.168.1.2 | 1097 | arp_ip_target=+192.168.1.1 arp_ip_target=+192.168.1.2 |
1099 | 1098 | ||
1100 | is the proper syntax to specify multiple targets. When specifying | 1099 | is the proper syntax to specify multiple targets. When specifying |
1101 | options via BONDING_OPTS, it is not necessary to edit /etc/modules.conf or | 1100 | options via BONDING_OPTS, it is not necessary to edit /etc/modprobe.d/*.conf. |
1102 | /etc/modprobe.conf. | ||
1103 | 1101 | ||
1104 | For even older versions of initscripts that do not support | 1102 | For even older versions of initscripts that do not support |
1105 | BONDING_OPTS, it is necessary to edit /etc/modules.conf (or | 1103 | BONDING_OPTS, it is necessary to edit /etc/modprobe.d/*.conf, depending upon |
1106 | /etc/modprobe.conf, depending upon your distro) to load the bonding module | 1104 | your distro) to load the bonding module with your desired options when the |
1107 | with your desired options when the bond0 interface is brought up. The | 1105 | bond0 interface is brought up. The following lines in /etc/modprobe.d/*.conf |
1108 | following lines in /etc/modules.conf (or modprobe.conf) will load the | 1106 | will load the bonding module, and select its options: |
1109 | bonding module, and select its options: | ||
1110 | 1107 | ||
1111 | alias bond0 bonding | 1108 | alias bond0 bonding |
1112 | options bond0 mode=balance-alb miimon=100 | 1109 | options bond0 mode=balance-alb miimon=100 |
@@ -1152,7 +1149,7 @@ knowledge of bonding. One such distro is SuSE Linux Enterprise Server | |||
1152 | version 8. | 1149 | version 8. |
1153 | 1150 | ||
1154 | The general method for these systems is to place the bonding | 1151 | The general method for these systems is to place the bonding |
1155 | module parameters into /etc/modules.conf or /etc/modprobe.conf (as | 1152 | module parameters into a config file in /etc/modprobe.d/ (as |
1156 | appropriate for the installed distro), then add modprobe and/or | 1153 | appropriate for the installed distro), then add modprobe and/or |
1157 | ifenslave commands to the system's global init script. The name of | 1154 | ifenslave commands to the system's global init script. The name of |
1158 | the global init script differs; for sysconfig, it is | 1155 | the global init script differs; for sysconfig, it is |
@@ -1228,7 +1225,7 @@ network initialization scripts. | |||
1228 | specify a different name for each instance (the module loading system | 1225 | specify a different name for each instance (the module loading system |
1229 | requires that every loaded module, even multiple instances of the same | 1226 | requires that every loaded module, even multiple instances of the same |
1230 | module, have a unique name). This is accomplished by supplying multiple | 1227 | module, have a unique name). This is accomplished by supplying multiple |
1231 | sets of bonding options in /etc/modprobe.conf, for example: | 1228 | sets of bonding options in /etc/modprobe.d/*.conf, for example: |
1232 | 1229 | ||
1233 | alias bond0 bonding | 1230 | alias bond0 bonding |
1234 | options bond0 -o bond0 mode=balance-rr miimon=100 | 1231 | options bond0 -o bond0 mode=balance-rr miimon=100 |
@@ -1793,8 +1790,8 @@ route additions may cause trouble. | |||
1793 | On systems with network configuration scripts that do not | 1790 | On systems with network configuration scripts that do not |
1794 | associate physical devices directly with network interface names (so | 1791 | associate physical devices directly with network interface names (so |
1795 | that the same physical device always has the same "ethX" name), it may | 1792 | that the same physical device always has the same "ethX" name), it may |
1796 | be necessary to add some special logic to either /etc/modules.conf or | 1793 | be necessary to add some special logic to config files in |
1797 | /etc/modprobe.conf (depending upon which is installed on the system). | 1794 | /etc/modprobe.d/. |
1798 | 1795 | ||
1799 | For example, given a modules.conf containing the following: | 1796 | For example, given a modules.conf containing the following: |
1800 | 1797 | ||
@@ -1821,20 +1818,15 @@ add above bonding e1000 tg3 | |||
1821 | bonding is loaded. This command is fully documented in the | 1818 | bonding is loaded. This command is fully documented in the |
1822 | modules.conf manual page. | 1819 | modules.conf manual page. |
1823 | 1820 | ||
1824 | On systems utilizing modprobe.conf (or modprobe.conf.local), | 1821 | On systems utilizing modprobe an equivalent problem can occur. |
1825 | an equivalent problem can occur. In this case, the following can be | 1822 | In this case, the following can be added to config files in |
1826 | added to modprobe.conf (or modprobe.conf.local, as appropriate), as | 1823 | /etc/modprobe.d/ as: |
1827 | follows (all on one line; it has been split here for clarity): | ||
1828 | 1824 | ||
1829 | install bonding /sbin/modprobe tg3; /sbin/modprobe e1000; | 1825 | softdep bonding pre: tg3 e1000 |
1830 | /sbin/modprobe --ignore-install bonding | ||
1831 | 1826 | ||
1832 | This will, when loading the bonding module, rather than | 1827 | This will load tg3 and e1000 modules before loading the bonding one. |
1833 | performing the normal action, instead execute the provided command. | 1828 | Full documentation on this can be found in the modprobe.d and modprobe |
1834 | This command loads the device drivers in the order needed, then calls | 1829 | manual pages. |
1835 | modprobe with --ignore-install to cause the normal action to then take | ||
1836 | place. Full documentation on this can be found in the modprobe.conf | ||
1837 | and modprobe manual pages. | ||
1838 | 1830 | ||
1839 | 8.3. Painfully Slow Or No Failed Link Detection By Miimon | 1831 | 8.3. Painfully Slow Or No Failed Link Detection By Miimon |
1840 | --------------------------------------------------------- | 1832 | --------------------------------------------------------- |
diff --git a/Documentation/networking/dl2k.txt b/Documentation/networking/dl2k.txt index 10e8490fa406..cba74f7a3abc 100644 --- a/Documentation/networking/dl2k.txt +++ b/Documentation/networking/dl2k.txt | |||
@@ -45,12 +45,13 @@ Now eth0 should active, you can test it by "ping" or get more information by | |||
45 | "ifconfig". If tested ok, continue the next step. | 45 | "ifconfig". If tested ok, continue the next step. |
46 | 46 | ||
47 | 4. cp dl2k.ko /lib/modules/`uname -r`/kernel/drivers/net | 47 | 4. cp dl2k.ko /lib/modules/`uname -r`/kernel/drivers/net |
48 | 5. Add the following line to /etc/modprobe.conf: | 48 | 5. Add the following line to /etc/modprobe.d/dl2k.conf: |
49 | alias eth0 dl2k | 49 | alias eth0 dl2k |
50 | 6. Run "netconfig" or "netconf" to create configuration script ifcfg-eth0 | 50 | 6. Run depmod to updated module indexes. |
51 | 7. Run "netconfig" or "netconf" to create configuration script ifcfg-eth0 | ||
51 | located at /etc/sysconfig/network-scripts or create it manually. | 52 | located at /etc/sysconfig/network-scripts or create it manually. |
52 | [see - Configuration Script Sample] | 53 | [see - Configuration Script Sample] |
53 | 7. Driver will automatically load and configure at next boot time. | 54 | 8. Driver will automatically load and configure at next boot time. |
54 | 55 | ||
55 | Compiling the Driver | 56 | Compiling the Driver |
56 | ==================== | 57 | ==================== |
@@ -154,8 +155,8 @@ Installing the Driver | |||
154 | ----------------- | 155 | ----------------- |
155 | 1. Copy dl2k.o to the network modules directory, typically | 156 | 1. Copy dl2k.o to the network modules directory, typically |
156 | /lib/modules/2.x.x-xx/net or /lib/modules/2.x.x/kernel/drivers/net. | 157 | /lib/modules/2.x.x-xx/net or /lib/modules/2.x.x/kernel/drivers/net. |
157 | 2. Locate the boot module configuration file, most commonly modprobe.conf | 158 | 2. Locate the boot module configuration file, most commonly in the |
158 | or modules.conf (for 2.4) in the /etc directory. Add the following lines: | 159 | /etc/modprobe.d/ directory. Add the following lines: |
159 | 160 | ||
160 | alias ethx dl2k | 161 | alias ethx dl2k |
161 | options dl2k <optional parameters> | 162 | options dl2k <optional parameters> |
diff --git a/Documentation/networking/dns_resolver.txt b/Documentation/networking/dns_resolver.txt index 7f531ad83285..d86adcdae420 100644 --- a/Documentation/networking/dns_resolver.txt +++ b/Documentation/networking/dns_resolver.txt | |||
@@ -102,6 +102,10 @@ implemented in the module can be called after doing: | |||
102 | If _expiry is non-NULL, the expiry time (TTL) of the result will be | 102 | If _expiry is non-NULL, the expiry time (TTL) of the result will be |
103 | returned also. | 103 | returned also. |
104 | 104 | ||
105 | The kernel maintains an internal keyring in which it caches looked up keys. | ||
106 | This can be cleared by any process that has the CAP_SYS_ADMIN capability by | ||
107 | the use of KEYCTL_KEYRING_CLEAR on the keyring ID. | ||
108 | |||
105 | 109 | ||
106 | =============================== | 110 | =============================== |
107 | READING DNS KEYS FROM USERSPACE | 111 | READING DNS KEYS FROM USERSPACE |
diff --git a/Documentation/networking/driver.txt b/Documentation/networking/driver.txt index 03283daa64fe..da59e2884130 100644 --- a/Documentation/networking/driver.txt +++ b/Documentation/networking/driver.txt | |||
@@ -2,16 +2,16 @@ Document about softnet driver issues | |||
2 | 2 | ||
3 | Transmit path guidelines: | 3 | Transmit path guidelines: |
4 | 4 | ||
5 | 1) The hard_start_xmit method must never return '1' under any | 5 | 1) The ndo_start_xmit method must not return NETDEV_TX_BUSY under |
6 | normal circumstances. It is considered a hard error unless | 6 | any normal circumstances. It is considered a hard error unless |
7 | there is no way your device can tell ahead of time when it's | 7 | there is no way your device can tell ahead of time when it's |
8 | transmit function will become busy. | 8 | transmit function will become busy. |
9 | 9 | ||
10 | Instead it must maintain the queue properly. For example, | 10 | Instead it must maintain the queue properly. For example, |
11 | for a driver implementing scatter-gather this means: | 11 | for a driver implementing scatter-gather this means: |
12 | 12 | ||
13 | static int drv_hard_start_xmit(struct sk_buff *skb, | 13 | static netdev_tx_t drv_hard_start_xmit(struct sk_buff *skb, |
14 | struct net_device *dev) | 14 | struct net_device *dev) |
15 | { | 15 | { |
16 | struct drv *dp = netdev_priv(dev); | 16 | struct drv *dp = netdev_priv(dev); |
17 | 17 | ||
@@ -23,7 +23,7 @@ Transmit path guidelines: | |||
23 | unlock_tx(dp); | 23 | unlock_tx(dp); |
24 | printk(KERN_ERR PFX "%s: BUG! Tx Ring full when queue awake!\n", | 24 | printk(KERN_ERR PFX "%s: BUG! Tx Ring full when queue awake!\n", |
25 | dev->name); | 25 | dev->name); |
26 | return 1; | 26 | return NETDEV_TX_BUSY; |
27 | } | 27 | } |
28 | 28 | ||
29 | ... queue packet to card ... | 29 | ... queue packet to card ... |
@@ -35,6 +35,7 @@ Transmit path guidelines: | |||
35 | ... | 35 | ... |
36 | unlock_tx(dp); | 36 | unlock_tx(dp); |
37 | ... | 37 | ... |
38 | return NETDEV_TX_OK; | ||
38 | } | 39 | } |
39 | 40 | ||
40 | And then at the end of your TX reclamation event handling: | 41 | And then at the end of your TX reclamation event handling: |
@@ -58,15 +59,12 @@ Transmit path guidelines: | |||
58 | TX_BUFFS_AVAIL(dp) > 0) | 59 | TX_BUFFS_AVAIL(dp) > 0) |
59 | netif_wake_queue(dp->dev); | 60 | netif_wake_queue(dp->dev); |
60 | 61 | ||
61 | 2) Do not forget to update netdev->trans_start to jiffies after | 62 | 2) An ndo_start_xmit method must not modify the shared parts of a |
62 | each new tx packet is given to the hardware. | ||
63 | |||
64 | 3) A hard_start_xmit method must not modify the shared parts of a | ||
65 | cloned SKB. | 63 | cloned SKB. |
66 | 64 | ||
67 | 4) Do not forget that once you return 0 from your hard_start_xmit | 65 | 3) Do not forget that once you return NETDEV_TX_OK from your |
68 | method, it is your driver's responsibility to free up the SKB | 66 | ndo_start_xmit method, it is your driver's responsibility to free |
69 | and in some finite amount of time. | 67 | up the SKB and in some finite amount of time. |
70 | 68 | ||
71 | For example, this means that it is not allowed for your TX | 69 | For example, this means that it is not allowed for your TX |
72 | mitigation scheme to let TX packets "hang out" in the TX | 70 | mitigation scheme to let TX packets "hang out" in the TX |
@@ -74,8 +72,9 @@ Transmit path guidelines: | |||
74 | This error can deadlock sockets waiting for send buffer room | 72 | This error can deadlock sockets waiting for send buffer room |
75 | to be freed up. | 73 | to be freed up. |
76 | 74 | ||
77 | If you return 1 from the hard_start_xmit method, you must not keep | 75 | If you return NETDEV_TX_BUSY from the ndo_start_xmit method, you |
78 | any reference to that SKB and you must not attempt to free it up. | 76 | must not keep any reference to that SKB and you must not attempt |
77 | to free it up. | ||
79 | 78 | ||
80 | Probing guidelines: | 79 | Probing guidelines: |
81 | 80 | ||
@@ -85,10 +84,10 @@ Probing guidelines: | |||
85 | 84 | ||
86 | Close/stop guidelines: | 85 | Close/stop guidelines: |
87 | 86 | ||
88 | 1) After the dev->stop routine has been called, the hardware must | 87 | 1) After the ndo_stop routine has been called, the hardware must |
89 | not receive or transmit any data. All in flight packets must | 88 | not receive or transmit any data. All in flight packets must |
90 | be aborted. If necessary, poll or wait for completion of | 89 | be aborted. If necessary, poll or wait for completion of |
91 | any reset commands. | 90 | any reset commands. |
92 | 91 | ||
93 | 2) The dev->stop routine will be called by unregister_netdevice | 92 | 2) The ndo_stop routine will be called by unregister_netdevice |
94 | if device is still UP. | 93 | if device is still UP. |
diff --git a/Documentation/networking/e100.txt b/Documentation/networking/e100.txt index 162f323a7a1f..fcb6c71cdb69 100644 --- a/Documentation/networking/e100.txt +++ b/Documentation/networking/e100.txt | |||
@@ -94,8 +94,8 @@ Additional Configurations | |||
94 | 94 | ||
95 | Configuring a network driver to load properly when the system is started is | 95 | Configuring a network driver to load properly when the system is started is |
96 | distribution dependent. Typically, the configuration process involves adding | 96 | distribution dependent. Typically, the configuration process involves adding |
97 | an alias line to /etc/modules.conf or /etc/modprobe.conf as well as editing | 97 | an alias line to /etc/modprobe.d/*.conf as well as editing other system |
98 | other system startup scripts and/or configuration files. Many popular Linux | 98 | startup scripts and/or configuration files. Many popular Linux |
99 | distributions ship with tools to make these changes for you. To learn the | 99 | distributions ship with tools to make these changes for you. To learn the |
100 | proper way to configure a network device for your system, refer to your | 100 | proper way to configure a network device for your system, refer to your |
101 | distribution documentation. If during this process you are asked for the | 101 | distribution documentation. If during this process you are asked for the |
@@ -103,7 +103,7 @@ Additional Configurations | |||
103 | PRO/100 Family of Adapters is e100. | 103 | PRO/100 Family of Adapters is e100. |
104 | 104 | ||
105 | As an example, if you install the e100 driver for two PRO/100 adapters | 105 | As an example, if you install the e100 driver for two PRO/100 adapters |
106 | (eth0 and eth1), add the following to modules.conf or modprobe.conf: | 106 | (eth0 and eth1), add the following to a configuraton file in /etc/modprobe.d/ |
107 | 107 | ||
108 | alias eth0 e100 | 108 | alias eth0 e100 |
109 | alias eth1 e100 | 109 | alias eth1 e100 |
diff --git a/Documentation/networking/ip-sysctl.txt b/Documentation/networking/ip-sysctl.txt index ad3e80e17b4f..bd80ba5847d2 100644 --- a/Documentation/networking/ip-sysctl.txt +++ b/Documentation/networking/ip-sysctl.txt | |||
@@ -604,15 +604,8 @@ IP Variables: | |||
604 | ip_local_port_range - 2 INTEGERS | 604 | ip_local_port_range - 2 INTEGERS |
605 | Defines the local port range that is used by TCP and UDP to | 605 | Defines the local port range that is used by TCP and UDP to |
606 | choose the local port. The first number is the first, the | 606 | choose the local port. The first number is the first, the |
607 | second the last local port number. Default value depends on | 607 | second the last local port number. The default values are |
608 | amount of memory available on the system: | 608 | 32768 and 61000 respectively. |
609 | > 128Mb 32768-61000 | ||
610 | < 128Mb 1024-4999 or even less. | ||
611 | This number defines number of active connections, which this | ||
612 | system can issue simultaneously to systems not supporting | ||
613 | TCP extensions (timestamps). With tcp_tw_recycle enabled | ||
614 | (i.e. by default) range 1024-4999 is enough to issue up to | ||
615 | 2000 connections per second to systems supporting timestamps. | ||
616 | 609 | ||
617 | ip_local_reserved_ports - list of comma separated ranges | 610 | ip_local_reserved_ports - list of comma separated ranges |
618 | Specify the ports which are reserved for known third-party | 611 | Specify the ports which are reserved for known third-party |
diff --git a/Documentation/networking/ipv6.txt b/Documentation/networking/ipv6.txt index 9fd7e21296c8..6cd74fa55358 100644 --- a/Documentation/networking/ipv6.txt +++ b/Documentation/networking/ipv6.txt | |||
@@ -2,9 +2,9 @@ | |||
2 | Options for the ipv6 module are supplied as parameters at load time. | 2 | Options for the ipv6 module are supplied as parameters at load time. |
3 | 3 | ||
4 | Module options may be given as command line arguments to the insmod | 4 | Module options may be given as command line arguments to the insmod |
5 | or modprobe command, but are usually specified in either the | 5 | or modprobe command, but are usually specified in either |
6 | /etc/modules.conf or /etc/modprobe.conf configuration file, or in a | 6 | /etc/modules.d/*.conf configuration files, or in a distro-specific |
7 | distro-specific configuration file. | 7 | configuration file. |
8 | 8 | ||
9 | The available ipv6 module parameters are listed below. If a parameter | 9 | The available ipv6 module parameters are listed below. If a parameter |
10 | is not specified the default value is used. | 10 | is not specified the default value is used. |
diff --git a/Documentation/networking/ixgb.txt b/Documentation/networking/ixgb.txt index e196f16df313..d75a1f9565bb 100644 --- a/Documentation/networking/ixgb.txt +++ b/Documentation/networking/ixgb.txt | |||
@@ -274,9 +274,9 @@ Additional Configurations | |||
274 | ------------------------------------------------- | 274 | ------------------------------------------------- |
275 | Configuring a network driver to load properly when the system is started is | 275 | Configuring a network driver to load properly when the system is started is |
276 | distribution dependent. Typically, the configuration process involves adding | 276 | distribution dependent. Typically, the configuration process involves adding |
277 | an alias line to /etc/modprobe.conf as well as editing other system startup | 277 | an alias line to files in /etc/modprobe.d/ as well as editing other system |
278 | scripts and/or configuration files. Many popular Linux distributions ship | 278 | startup scripts and/or configuration files. Many popular Linux distributions |
279 | with tools to make these changes for you. To learn the proper way to | 279 | ship with tools to make these changes for you. To learn the proper way to |
280 | configure a network device for your system, refer to your distribution | 280 | configure a network device for your system, refer to your distribution |
281 | documentation. If during this process you are asked for the driver or module | 281 | documentation. If during this process you are asked for the driver or module |
282 | name, the name for the Linux Base Driver for the Intel 10GbE Family of | 282 | name, the name for the Linux Base Driver for the Intel 10GbE Family of |
diff --git a/Documentation/networking/l2tp.txt b/Documentation/networking/l2tp.txt index e7bf3979facb..e63fc1f7bf87 100644 --- a/Documentation/networking/l2tp.txt +++ b/Documentation/networking/l2tp.txt | |||
@@ -111,7 +111,7 @@ When creating PPPoL2TP sockets, the application provides information | |||
111 | to the driver about the socket in a socket connect() call. Source and | 111 | to the driver about the socket in a socket connect() call. Source and |
112 | destination tunnel and session ids are provided, as well as the file | 112 | destination tunnel and session ids are provided, as well as the file |
113 | descriptor of a UDP socket. See struct pppol2tp_addr in | 113 | descriptor of a UDP socket. See struct pppol2tp_addr in |
114 | include/linux/if_ppp.h. Note that zero tunnel / session ids are | 114 | include/linux/if_pppol2tp.h. Note that zero tunnel / session ids are |
115 | treated specially. When creating the per-tunnel PPPoL2TP management | 115 | treated specially. When creating the per-tunnel PPPoL2TP management |
116 | socket in Step 2 above, zero source and destination session ids are | 116 | socket in Step 2 above, zero source and destination session ids are |
117 | specified, which tells the driver to prepare the supplied UDP file | 117 | specified, which tells the driver to prepare the supplied UDP file |
diff --git a/Documentation/networking/ltpc.txt b/Documentation/networking/ltpc.txt index fe2a9129d959..0bf3220c715b 100644 --- a/Documentation/networking/ltpc.txt +++ b/Documentation/networking/ltpc.txt | |||
@@ -25,7 +25,7 @@ the driver will try to determine them itself. | |||
25 | 25 | ||
26 | If you load the driver as a module, you can pass the parameters "io=", | 26 | If you load the driver as a module, you can pass the parameters "io=", |
27 | "irq=", and "dma=" on the command line with insmod or modprobe, or add | 27 | "irq=", and "dma=" on the command line with insmod or modprobe, or add |
28 | them as options in /etc/modprobe.conf: | 28 | them as options in a configuration file in /etc/modprobe.d/ directory: |
29 | 29 | ||
30 | alias lt0 ltpc # autoload the module when the interface is configured | 30 | alias lt0 ltpc # autoload the module when the interface is configured |
31 | options ltpc io=0x240 irq=9 dma=1 | 31 | options ltpc io=0x240 irq=9 dma=1 |
diff --git a/Documentation/networking/mac80211-auth-assoc-deauth.txt b/Documentation/networking/mac80211-auth-assoc-deauth.txt new file mode 100644 index 000000000000..e0a2aa585ca3 --- /dev/null +++ b/Documentation/networking/mac80211-auth-assoc-deauth.txt | |||
@@ -0,0 +1,99 @@ | |||
1 | # | ||
2 | # This outlines the Linux authentication/association and | ||
3 | # deauthentication/disassociation flows. | ||
4 | # | ||
5 | # This can be converted into a diagram using the service | ||
6 | # at http://www.websequencediagrams.com/ | ||
7 | # | ||
8 | |||
9 | participant userspace | ||
10 | participant mac80211 | ||
11 | participant driver | ||
12 | |||
13 | alt authentication needed (not FT) | ||
14 | userspace->mac80211: authenticate | ||
15 | |||
16 | alt authenticated/authenticating already | ||
17 | mac80211->driver: sta_state(AP, not-exists) | ||
18 | mac80211->driver: bss_info_changed(clear BSSID) | ||
19 | else associated | ||
20 | note over mac80211,driver | ||
21 | like deauth/disassoc, without sending the | ||
22 | BA session stop & deauth/disassoc frames | ||
23 | end note | ||
24 | end | ||
25 | |||
26 | mac80211->driver: config(channel, non-HT) | ||
27 | mac80211->driver: bss_info_changed(set BSSID, basic rate bitmap) | ||
28 | mac80211->driver: sta_state(AP, exists) | ||
29 | |||
30 | alt no probe request data known | ||
31 | mac80211->driver: TX directed probe request | ||
32 | driver->mac80211: RX probe response | ||
33 | end | ||
34 | |||
35 | mac80211->driver: TX auth frame | ||
36 | driver->mac80211: RX auth frame | ||
37 | |||
38 | alt WEP shared key auth | ||
39 | mac80211->driver: TX auth frame | ||
40 | driver->mac80211: RX auth frame | ||
41 | end | ||
42 | |||
43 | mac80211->driver: sta_state(AP, authenticated) | ||
44 | mac80211->userspace: RX auth frame | ||
45 | |||
46 | end | ||
47 | |||
48 | userspace->mac80211: associate | ||
49 | alt authenticated or associated | ||
50 | note over mac80211,driver: cleanup like for authenticate | ||
51 | end | ||
52 | |||
53 | alt not previously authenticated (FT) | ||
54 | mac80211->driver: config(channel, non-HT) | ||
55 | mac80211->driver: bss_info_changed(set BSSID, basic rate bitmap) | ||
56 | mac80211->driver: sta_state(AP, exists) | ||
57 | mac80211->driver: sta_state(AP, authenticated) | ||
58 | end | ||
59 | mac80211->driver: TX assoc | ||
60 | driver->mac80211: RX assoc response | ||
61 | note over mac80211: init rate control | ||
62 | mac80211->driver: sta_state(AP, associated) | ||
63 | |||
64 | alt not using WPA | ||
65 | mac80211->driver: sta_state(AP, authorized) | ||
66 | end | ||
67 | |||
68 | mac80211->driver: set up QoS parameters | ||
69 | |||
70 | alt is HT channel | ||
71 | mac80211->driver: config(channel, HT params) | ||
72 | end | ||
73 | |||
74 | mac80211->driver: bss_info_changed(QoS, HT, associated with AID) | ||
75 | mac80211->userspace: associated | ||
76 | |||
77 | note left of userspace: associated now | ||
78 | |||
79 | alt using WPA | ||
80 | note over userspace | ||
81 | do 4-way-handshake | ||
82 | (data frames) | ||
83 | end note | ||
84 | userspace->mac80211: authorized | ||
85 | mac80211->driver: sta_state(AP, authorized) | ||
86 | end | ||
87 | |||
88 | userspace->mac80211: deauthenticate/disassociate | ||
89 | mac80211->driver: stop BA sessions | ||
90 | mac80211->driver: TX deauth/disassoc | ||
91 | mac80211->driver: flush frames | ||
92 | mac80211->driver: sta_state(AP,associated) | ||
93 | mac80211->driver: sta_state(AP,authenticated) | ||
94 | mac80211->driver: sta_state(AP,exists) | ||
95 | mac80211->driver: sta_state(AP,not-exists) | ||
96 | mac80211->driver: turn off powersave | ||
97 | mac80211->driver: bss_info_changed(clear BSSID, not associated, no QoS, ...) | ||
98 | mac80211->driver: config(non-HT channel type) | ||
99 | mac80211->userspace: disconnected | ||
diff --git a/Documentation/networking/netdev-features.txt b/Documentation/networking/netdev-features.txt index 4b1c0dcef84c..4164f5c02e4b 100644 --- a/Documentation/networking/netdev-features.txt +++ b/Documentation/networking/netdev-features.txt | |||
@@ -152,3 +152,16 @@ NETIF_F_VLAN_CHALLENGED should be set for devices which can't cope with VLAN | |||
152 | headers. Some drivers set this because the cards can't handle the bigger MTU. | 152 | headers. Some drivers set this because the cards can't handle the bigger MTU. |
153 | [FIXME: Those cases could be fixed in VLAN code by allowing only reduced-MTU | 153 | [FIXME: Those cases could be fixed in VLAN code by allowing only reduced-MTU |
154 | VLANs. This may be not useful, though.] | 154 | VLANs. This may be not useful, though.] |
155 | |||
156 | * rx-fcs | ||
157 | |||
158 | This requests that the NIC append the Ethernet Frame Checksum (FCS) | ||
159 | to the end of the skb data. This allows sniffers and other tools to | ||
160 | read the CRC recorded by the NIC on receipt of the packet. | ||
161 | |||
162 | * rx-all | ||
163 | |||
164 | This requests that the NIC receive all possible frames, including errored | ||
165 | frames (such as bad FCS, etc). This can be helpful when sniffing a link with | ||
166 | bad packets on it. Some NICs may receive more packets if also put into normal | ||
167 | PROMISC mdoe. | ||
diff --git a/Documentation/networking/netdevices.txt b/Documentation/networking/netdevices.txt index 89358341682a..c7ecc7080494 100644 --- a/Documentation/networking/netdevices.txt +++ b/Documentation/networking/netdevices.txt | |||
@@ -47,26 +47,25 @@ packets is preferred. | |||
47 | 47 | ||
48 | struct net_device synchronization rules | 48 | struct net_device synchronization rules |
49 | ======================================= | 49 | ======================================= |
50 | dev->open: | 50 | ndo_open: |
51 | Synchronization: rtnl_lock() semaphore. | 51 | Synchronization: rtnl_lock() semaphore. |
52 | Context: process | 52 | Context: process |
53 | 53 | ||
54 | dev->stop: | 54 | ndo_stop: |
55 | Synchronization: rtnl_lock() semaphore. | 55 | Synchronization: rtnl_lock() semaphore. |
56 | Context: process | 56 | Context: process |
57 | Note1: netif_running() is guaranteed false | 57 | Note: netif_running() is guaranteed false |
58 | Note2: dev->poll() is guaranteed to be stopped | ||
59 | 58 | ||
60 | dev->do_ioctl: | 59 | ndo_do_ioctl: |
61 | Synchronization: rtnl_lock() semaphore. | 60 | Synchronization: rtnl_lock() semaphore. |
62 | Context: process | 61 | Context: process |
63 | 62 | ||
64 | dev->get_stats: | 63 | ndo_get_stats: |
65 | Synchronization: dev_base_lock rwlock. | 64 | Synchronization: dev_base_lock rwlock. |
66 | Context: nominally process, but don't sleep inside an rwlock | 65 | Context: nominally process, but don't sleep inside an rwlock |
67 | 66 | ||
68 | dev->hard_start_xmit: | 67 | ndo_start_xmit: |
69 | Synchronization: netif_tx_lock spinlock. | 68 | Synchronization: __netif_tx_lock spinlock. |
70 | 69 | ||
71 | When the driver sets NETIF_F_LLTX in dev->features this will be | 70 | When the driver sets NETIF_F_LLTX in dev->features this will be |
72 | called without holding netif_tx_lock. In this case the driver | 71 | called without holding netif_tx_lock. In this case the driver |
@@ -87,20 +86,20 @@ dev->hard_start_xmit: | |||
87 | o NETDEV_TX_LOCKED Locking failed, please retry quickly. | 86 | o NETDEV_TX_LOCKED Locking failed, please retry quickly. |
88 | Only valid when NETIF_F_LLTX is set. | 87 | Only valid when NETIF_F_LLTX is set. |
89 | 88 | ||
90 | dev->tx_timeout: | 89 | ndo_tx_timeout: |
91 | Synchronization: netif_tx_lock spinlock. | 90 | Synchronization: netif_tx_lock spinlock; all TX queues frozen. |
92 | Context: BHs disabled | 91 | Context: BHs disabled |
93 | Notes: netif_queue_stopped() is guaranteed true | 92 | Notes: netif_queue_stopped() is guaranteed true |
94 | 93 | ||
95 | dev->set_rx_mode: | 94 | ndo_set_rx_mode: |
96 | Synchronization: netif_tx_lock spinlock. | 95 | Synchronization: netif_addr_lock spinlock. |
97 | Context: BHs disabled | 96 | Context: BHs disabled |
98 | 97 | ||
99 | struct napi_struct synchronization rules | 98 | struct napi_struct synchronization rules |
100 | ======================================== | 99 | ======================================== |
101 | napi->poll: | 100 | napi->poll: |
102 | Synchronization: NAPI_STATE_SCHED bit in napi->state. Device | 101 | Synchronization: NAPI_STATE_SCHED bit in napi->state. Device |
103 | driver's dev->close method will invoke napi_disable() on | 102 | driver's ndo_stop method will invoke napi_disable() on |
104 | all NAPI instances which will do a sleeping poll on the | 103 | all NAPI instances which will do a sleeping poll on the |
105 | NAPI_STATE_SCHED napi->state bit, waiting for all pending | 104 | NAPI_STATE_SCHED napi->state bit, waiting for all pending |
106 | NAPI activity to cease. | 105 | NAPI activity to cease. |
diff --git a/Documentation/networking/phy.txt b/Documentation/networking/phy.txt index 9eb1ba52013d..95e5f5985a2a 100644 --- a/Documentation/networking/phy.txt +++ b/Documentation/networking/phy.txt | |||
@@ -62,7 +62,8 @@ The MDIO bus | |||
62 | 5) The bus must also be declared somewhere as a device, and registered. | 62 | 5) The bus must also be declared somewhere as a device, and registered. |
63 | 63 | ||
64 | As an example for how one driver implemented an mdio bus driver, see | 64 | As an example for how one driver implemented an mdio bus driver, see |
65 | drivers/net/gianfar_mii.c and arch/ppc/syslib/mpc85xx_devices.c | 65 | drivers/net/ethernet/freescale/fsl_pq_mdio.c and an associated DTS file |
66 | for one of the users. (e.g. "git grep fsl,.*-mdio arch/powerpc/boot/dts/") | ||
66 | 67 | ||
67 | Connecting to a PHY | 68 | Connecting to a PHY |
68 | 69 | ||
diff --git a/Documentation/networking/ppp_generic.txt b/Documentation/networking/ppp_generic.txt index 15b5172fbb98..091d20273dcb 100644 --- a/Documentation/networking/ppp_generic.txt +++ b/Documentation/networking/ppp_generic.txt | |||
@@ -342,7 +342,7 @@ an interface unit are: | |||
342 | numbers on received multilink fragments | 342 | numbers on received multilink fragments |
343 | SC_MP_XSHORTSEQ transmit short multilink sequence nos. | 343 | SC_MP_XSHORTSEQ transmit short multilink sequence nos. |
344 | 344 | ||
345 | The values of these flags are defined in <linux/if_ppp.h>. Note | 345 | The values of these flags are defined in <linux/ppp-ioctl.h>. Note |
346 | that the values of the SC_MULTILINK, SC_MP_SHORTSEQ and | 346 | that the values of the SC_MULTILINK, SC_MP_SHORTSEQ and |
347 | SC_MP_XSHORTSEQ bits are ignored if the CONFIG_PPP_MULTILINK option | 347 | SC_MP_XSHORTSEQ bits are ignored if the CONFIG_PPP_MULTILINK option |
348 | is not selected. | 348 | is not selected. |
@@ -358,7 +358,7 @@ an interface unit are: | |||
358 | 358 | ||
359 | * PPPIOCSCOMPRESS sets the parameters for packet compression or | 359 | * PPPIOCSCOMPRESS sets the parameters for packet compression or |
360 | decompression. The argument should point to a ppp_option_data | 360 | decompression. The argument should point to a ppp_option_data |
361 | structure (defined in <linux/if_ppp.h>), which contains a | 361 | structure (defined in <linux/ppp-ioctl.h>), which contains a |
362 | pointer/length pair which should describe a block of memory | 362 | pointer/length pair which should describe a block of memory |
363 | containing a CCP option specifying a compression method and its | 363 | containing a CCP option specifying a compression method and its |
364 | parameters. The ppp_option_data struct also contains a `transmit' | 364 | parameters. The ppp_option_data struct also contains a `transmit' |
@@ -395,7 +395,7 @@ an interface unit are: | |||
395 | 395 | ||
396 | * PPPIOCSNPMODE sets the network-protocol mode for a given network | 396 | * PPPIOCSNPMODE sets the network-protocol mode for a given network |
397 | protocol. The argument should point to an npioctl struct (defined | 397 | protocol. The argument should point to an npioctl struct (defined |
398 | in <linux/if_ppp.h>). The `protocol' field gives the PPP protocol | 398 | in <linux/ppp-ioctl.h>). The `protocol' field gives the PPP protocol |
399 | number for the protocol to be affected, and the `mode' field | 399 | number for the protocol to be affected, and the `mode' field |
400 | specifies what to do with packets for that protocol: | 400 | specifies what to do with packets for that protocol: |
401 | 401 | ||
diff --git a/Documentation/networking/vortex.txt b/Documentation/networking/vortex.txt index bd70976b8160..b4038ffb3bc5 100644 --- a/Documentation/networking/vortex.txt +++ b/Documentation/networking/vortex.txt | |||
@@ -67,8 +67,8 @@ Module parameters | |||
67 | ================= | 67 | ================= |
68 | 68 | ||
69 | There are several parameters which may be provided to the driver when | 69 | There are several parameters which may be provided to the driver when |
70 | its module is loaded. These are usually placed in /etc/modprobe.conf | 70 | its module is loaded. These are usually placed in /etc/modprobe.d/*.conf |
71 | (/etc/modules.conf in 2.4). Example: | 71 | configuretion files. Example: |
72 | 72 | ||
73 | options 3c59x debug=3 rx_copybreak=300 | 73 | options 3c59x debug=3 rx_copybreak=300 |
74 | 74 | ||
@@ -425,7 +425,7 @@ steps you should take: | |||
425 | 1) Increase the debug level. Usually this is done via: | 425 | 1) Increase the debug level. Usually this is done via: |
426 | 426 | ||
427 | a) modprobe driver debug=7 | 427 | a) modprobe driver debug=7 |
428 | b) In /etc/modprobe.conf (or /etc/modules.conf for 2.4): | 428 | b) In /etc/modprobe.d/driver.conf: |
429 | options driver debug=7 | 429 | options driver debug=7 |
430 | 430 | ||
431 | 2) Recreate the problem with the higher debug level, | 431 | 2) Recreate the problem with the higher debug level, |
diff --git a/Documentation/nmi_watchdog.txt b/Documentation/nmi_watchdog.txt deleted file mode 100644 index bf9f80a98282..000000000000 --- a/Documentation/nmi_watchdog.txt +++ /dev/null | |||
@@ -1,83 +0,0 @@ | |||
1 | |||
2 | [NMI watchdog is available for x86 and x86-64 architectures] | ||
3 | |||
4 | Is your system locking up unpredictably? No keyboard activity, just | ||
5 | a frustrating complete hard lockup? Do you want to help us debugging | ||
6 | such lockups? If all yes then this document is definitely for you. | ||
7 | |||
8 | On many x86/x86-64 type hardware there is a feature that enables | ||
9 | us to generate 'watchdog NMI interrupts'. (NMI: Non Maskable Interrupt | ||
10 | which get executed even if the system is otherwise locked up hard). | ||
11 | This can be used to debug hard kernel lockups. By executing periodic | ||
12 | NMI interrupts, the kernel can monitor whether any CPU has locked up, | ||
13 | and print out debugging messages if so. | ||
14 | |||
15 | In order to use the NMI watchdog, you need to have APIC support in your | ||
16 | kernel. For SMP kernels, APIC support gets compiled in automatically. For | ||
17 | UP, enable either CONFIG_X86_UP_APIC (Processor type and features -> Local | ||
18 | APIC support on uniprocessors) or CONFIG_X86_UP_IOAPIC (Processor type and | ||
19 | features -> IO-APIC support on uniprocessors) in your kernel config. | ||
20 | CONFIG_X86_UP_APIC is for uniprocessor machines without an IO-APIC. | ||
21 | CONFIG_X86_UP_IOAPIC is for uniprocessor with an IO-APIC. [Note: certain | ||
22 | kernel debugging options, such as Kernel Stack Meter or Kernel Tracer, | ||
23 | may implicitly disable the NMI watchdog.] | ||
24 | |||
25 | For x86-64, the needed APIC is always compiled in. | ||
26 | |||
27 | Using local APIC (nmi_watchdog=2) needs the first performance register, so | ||
28 | you can't use it for other purposes (such as high precision performance | ||
29 | profiling.) However, at least oprofile and the perfctr driver disable the | ||
30 | local APIC NMI watchdog automatically. | ||
31 | |||
32 | To actually enable the NMI watchdog, use the 'nmi_watchdog=N' boot | ||
33 | parameter. Eg. the relevant lilo.conf entry: | ||
34 | |||
35 | append="nmi_watchdog=1" | ||
36 | |||
37 | For SMP machines and UP machines with an IO-APIC use nmi_watchdog=1. | ||
38 | For UP machines without an IO-APIC use nmi_watchdog=2, this only works | ||
39 | for some processor types. If in doubt, boot with nmi_watchdog=1 and | ||
40 | check the NMI count in /proc/interrupts; if the count is zero then | ||
41 | reboot with nmi_watchdog=2 and check the NMI count. If it is still | ||
42 | zero then log a problem, you probably have a processor that needs to be | ||
43 | added to the nmi code. | ||
44 | |||
45 | A 'lockup' is the following scenario: if any CPU in the system does not | ||
46 | execute the period local timer interrupt for more than 5 seconds, then | ||
47 | the NMI handler generates an oops and kills the process. This | ||
48 | 'controlled crash' (and the resulting kernel messages) can be used to | ||
49 | debug the lockup. Thus whenever the lockup happens, wait 5 seconds and | ||
50 | the oops will show up automatically. If the kernel produces no messages | ||
51 | then the system has crashed so hard (eg. hardware-wise) that either it | ||
52 | cannot even accept NMI interrupts, or the crash has made the kernel | ||
53 | unable to print messages. | ||
54 | |||
55 | Be aware that when using local APIC, the frequency of NMI interrupts | ||
56 | it generates, depends on the system load. The local APIC NMI watchdog, | ||
57 | lacking a better source, uses the "cycles unhalted" event. As you may | ||
58 | guess it doesn't tick when the CPU is in the halted state (which happens | ||
59 | when the system is idle), but if your system locks up on anything but the | ||
60 | "hlt" processor instruction, the watchdog will trigger very soon as the | ||
61 | "cycles unhalted" event will happen every clock tick. If it locks up on | ||
62 | "hlt", then you are out of luck -- the event will not happen at all and the | ||
63 | watchdog won't trigger. This is a shortcoming of the local APIC watchdog | ||
64 | -- unfortunately there is no "clock ticks" event that would work all the | ||
65 | time. The I/O APIC watchdog is driven externally and has no such shortcoming. | ||
66 | But its NMI frequency is much higher, resulting in a more significant hit | ||
67 | to the overall system performance. | ||
68 | |||
69 | On x86 nmi_watchdog is disabled by default so you have to enable it with | ||
70 | a boot time parameter. | ||
71 | |||
72 | It's possible to disable the NMI watchdog in run-time by writing "0" to | ||
73 | /proc/sys/kernel/nmi_watchdog. Writing "1" to the same file will re-enable | ||
74 | the NMI watchdog. Notice that you still need to use "nmi_watchdog=" parameter | ||
75 | at boot time. | ||
76 | |||
77 | NOTE: In kernels prior to 2.4.2-ac18 the NMI-oopser is enabled unconditionally | ||
78 | on x86 SMP boxes. | ||
79 | |||
80 | [ feel free to send bug reports, suggestions and patches to | ||
81 | Ingo Molnar <mingo@redhat.com> or the Linux SMP mailing | ||
82 | list at <linux-smp@vger.kernel.org> ] | ||
83 | |||
diff --git a/Documentation/parport.txt b/Documentation/parport.txt index 93a7ceef398d..c208e4366c03 100644 --- a/Documentation/parport.txt +++ b/Documentation/parport.txt | |||
@@ -36,18 +36,17 @@ addresses should not be specified for supported PCI cards since they | |||
36 | are automatically detected. | 36 | are automatically detected. |
37 | 37 | ||
38 | 38 | ||
39 | KMod | 39 | modprobe |
40 | ---- | 40 | -------- |
41 | 41 | ||
42 | If you use kmod, you will find it useful to edit /etc/modprobe.conf. | 42 | If you use modprobe , you will find it useful to add lines as below to a |
43 | Here is an example of the lines that need to be added: | 43 | configuration file in /etc/modprobe.d/ directory:. |
44 | 44 | ||
45 | alias parport_lowlevel parport_pc | 45 | alias parport_lowlevel parport_pc |
46 | options parport_pc io=0x378,0x278 irq=7,auto | 46 | options parport_pc io=0x378,0x278 irq=7,auto |
47 | 47 | ||
48 | KMod will then automatically load parport_pc (with the options | 48 | modprobe will load parport_pc (with the options "io=0x378,0x278 irq=7,auto") |
49 | "io=0x378,0x278 irq=7,auto") whenever a parallel port device driver | 49 | whenever a parallel port device driver (such as lp) is loaded. |
50 | (such as lp) is loaded. | ||
51 | 50 | ||
52 | Note that these are example lines only! You shouldn't in general need | 51 | Note that these are example lines only! You shouldn't in general need |
53 | to specify any options to parport_pc in order to be able to use a | 52 | to specify any options to parport_pc in order to be able to use a |
diff --git a/Documentation/pinctrl.txt b/Documentation/pinctrl.txt index 150fd3833d0b..d97bccf46147 100644 --- a/Documentation/pinctrl.txt +++ b/Documentation/pinctrl.txt | |||
@@ -206,12 +206,21 @@ using a certain resistor value - pull up and pull down - so that the pin has a | |||
206 | stable value when nothing is driving the rail it is connected to, or when it's | 206 | stable value when nothing is driving the rail it is connected to, or when it's |
207 | unconnected. | 207 | unconnected. |
208 | 208 | ||
209 | For example, a platform may do this: | 209 | Pin configuration can be programmed either using the explicit APIs described |
210 | immediately below, or by adding configuration entries into the mapping table; | ||
211 | see section "Board/machine configuration" below. | ||
212 | |||
213 | For example, a platform may do the following to pull up a pin to VDD: | ||
214 | |||
215 | #include <linux/pinctrl/consumer.h> | ||
210 | 216 | ||
211 | ret = pin_config_set("foo-dev", "FOO_GPIO_PIN", PLATFORM_X_PULL_UP); | 217 | ret = pin_config_set("foo-dev", "FOO_GPIO_PIN", PLATFORM_X_PULL_UP); |
212 | 218 | ||
213 | To pull up a pin to VDD. The pin configuration driver implements callbacks for | 219 | The format and meaning of the configuration parameter, PLATFORM_X_PULL_UP |
214 | changing pin configuration in the pin controller ops like this: | 220 | above, is entirely defined by the pin controller driver. |
221 | |||
222 | The pin configuration driver implements callbacks for changing pin | ||
223 | configuration in the pin controller ops like this: | ||
215 | 224 | ||
216 | #include <linux/pinctrl/pinctrl.h> | 225 | #include <linux/pinctrl/pinctrl.h> |
217 | #include <linux/pinctrl/pinconf.h> | 226 | #include <linux/pinctrl/pinconf.h> |
@@ -492,14 +501,10 @@ Definitions: | |||
492 | {"map-i2c0", i2c0, pinctrl0, fi2c0, gi2c0} | 501 | {"map-i2c0", i2c0, pinctrl0, fi2c0, gi2c0} |
493 | } | 502 | } |
494 | 503 | ||
495 | Every map must be assigned a symbolic name, pin controller and function. | 504 | Every map must be assigned a state name, pin controller, device and |
496 | The group is not compulsory - if it is omitted the first group presented by | 505 | function. The group is not compulsory - if it is omitted the first group |
497 | the driver as applicable for the function will be selected, which is | 506 | presented by the driver as applicable for the function will be selected, |
498 | useful for simple cases. | 507 | which is useful for simple cases. |
499 | |||
500 | The device name is present in map entries tied to specific devices. Maps | ||
501 | without device names are referred to as SYSTEM pinmuxes, such as can be taken | ||
502 | by the machine implementation on boot and not tied to any specific device. | ||
503 | 508 | ||
504 | It is possible to map several groups to the same combination of device, | 509 | It is possible to map several groups to the same combination of device, |
505 | pin controller and function. This is for cases where a certain function on | 510 | pin controller and function. This is for cases where a certain function on |
@@ -726,19 +731,19 @@ same time. | |||
726 | All the above functions are mandatory to implement for a pinmux driver. | 731 | All the above functions are mandatory to implement for a pinmux driver. |
727 | 732 | ||
728 | 733 | ||
729 | Pinmux interaction with the GPIO subsystem | 734 | Pin control interaction with the GPIO subsystem |
730 | ========================================== | 735 | =============================================== |
731 | 736 | ||
732 | The public pinmux API contains two functions named pinmux_request_gpio() | 737 | The public pinmux API contains two functions named pinctrl_request_gpio() |
733 | and pinmux_free_gpio(). These two functions shall *ONLY* be called from | 738 | and pinctrl_free_gpio(). These two functions shall *ONLY* be called from |
734 | gpiolib-based drivers as part of their gpio_request() and | 739 | gpiolib-based drivers as part of their gpio_request() and |
735 | gpio_free() semantics. Likewise the pinmux_gpio_direction_[input|output] | 740 | gpio_free() semantics. Likewise the pinctrl_gpio_direction_[input|output] |
736 | shall only be called from within respective gpio_direction_[input|output] | 741 | shall only be called from within respective gpio_direction_[input|output] |
737 | gpiolib implementation. | 742 | gpiolib implementation. |
738 | 743 | ||
739 | NOTE that platforms and individual drivers shall *NOT* request GPIO pins to be | 744 | NOTE that platforms and individual drivers shall *NOT* request GPIO pins to be |
740 | muxed in. Instead, implement a proper gpiolib driver and have that driver | 745 | controlled e.g. muxed in. Instead, implement a proper gpiolib driver and have |
741 | request proper muxing for its pins. | 746 | that driver request proper muxing and other control for its pins. |
742 | 747 | ||
743 | The function list could become long, especially if you can convert every | 748 | The function list could become long, especially if you can convert every |
744 | individual pin into a GPIO pin independent of any other pins, and then try | 749 | individual pin into a GPIO pin independent of any other pins, and then try |
@@ -747,7 +752,7 @@ the approach to define every pin as a function. | |||
747 | In this case, the function array would become 64 entries for each GPIO | 752 | In this case, the function array would become 64 entries for each GPIO |
748 | setting and then the device functions. | 753 | setting and then the device functions. |
749 | 754 | ||
750 | For this reason there are two functions a pinmux driver can implement | 755 | For this reason there are two functions a pin control driver can implement |
751 | to enable only GPIO on an individual pin: .gpio_request_enable() and | 756 | to enable only GPIO on an individual pin: .gpio_request_enable() and |
752 | .gpio_disable_free(). | 757 | .gpio_disable_free(). |
753 | 758 | ||
@@ -762,12 +767,12 @@ gpiolib driver and the affected GPIO range, pin offset and desired direction | |||
762 | will be passed along to this function. | 767 | will be passed along to this function. |
763 | 768 | ||
764 | Alternatively to using these special functions, it is fully allowed to use | 769 | Alternatively to using these special functions, it is fully allowed to use |
765 | named functions for each GPIO pin, the pinmux_request_gpio() will attempt to | 770 | named functions for each GPIO pin, the pinctrl_request_gpio() will attempt to |
766 | obtain the function "gpioN" where "N" is the global GPIO pin number if no | 771 | obtain the function "gpioN" where "N" is the global GPIO pin number if no |
767 | special GPIO-handler is registered. | 772 | special GPIO-handler is registered. |
768 | 773 | ||
769 | 774 | ||
770 | Pinmux board/machine configuration | 775 | Board/machine configuration |
771 | ================================== | 776 | ================================== |
772 | 777 | ||
773 | Boards and machines define how a certain complete running system is put | 778 | Boards and machines define how a certain complete running system is put |
@@ -775,27 +780,33 @@ together, including how GPIOs and devices are muxed, how regulators are | |||
775 | constrained and how the clock tree looks. Of course pinmux settings are also | 780 | constrained and how the clock tree looks. Of course pinmux settings are also |
776 | part of this. | 781 | part of this. |
777 | 782 | ||
778 | A pinmux config for a machine looks pretty much like a simple regulator | 783 | A pin controller configuration for a machine looks pretty much like a simple |
779 | configuration, so for the example array above we want to enable i2c and | 784 | regulator configuration, so for the example array above we want to enable i2c |
780 | spi on the second function mapping: | 785 | and spi on the second function mapping: |
781 | 786 | ||
782 | #include <linux/pinctrl/machine.h> | 787 | #include <linux/pinctrl/machine.h> |
783 | 788 | ||
784 | static const struct pinmux_map __initdata pmx_mapping[] = { | 789 | static const struct pinctrl_map __initdata mapping[] = { |
785 | { | 790 | { |
786 | .ctrl_dev_name = "pinctrl-foo", | ||
787 | .function = "spi0", | ||
788 | .dev_name = "foo-spi.0", | 791 | .dev_name = "foo-spi.0", |
792 | .name = PINCTRL_STATE_DEFAULT, | ||
793 | .type = PIN_MAP_TYPE_MUX_GROUP, | ||
794 | .ctrl_dev_name = "pinctrl-foo", | ||
795 | .data.mux.function = "spi0", | ||
789 | }, | 796 | }, |
790 | { | 797 | { |
791 | .ctrl_dev_name = "pinctrl-foo", | ||
792 | .function = "i2c0", | ||
793 | .dev_name = "foo-i2c.0", | 798 | .dev_name = "foo-i2c.0", |
799 | .name = PINCTRL_STATE_DEFAULT, | ||
800 | .type = PIN_MAP_TYPE_MUX_GROUP, | ||
801 | .ctrl_dev_name = "pinctrl-foo", | ||
802 | .data.mux.function = "i2c0", | ||
794 | }, | 803 | }, |
795 | { | 804 | { |
796 | .ctrl_dev_name = "pinctrl-foo", | ||
797 | .function = "mmc0", | ||
798 | .dev_name = "foo-mmc.0", | 805 | .dev_name = "foo-mmc.0", |
806 | .name = PINCTRL_STATE_DEFAULT, | ||
807 | .type = PIN_MAP_TYPE_MUX_GROUP, | ||
808 | .ctrl_dev_name = "pinctrl-foo", | ||
809 | .data.mux.function = "mmc0", | ||
799 | }, | 810 | }, |
800 | }; | 811 | }; |
801 | 812 | ||
@@ -805,21 +816,51 @@ must match a function provided by the pinmux driver handling this pin range. | |||
805 | 816 | ||
806 | As you can see we may have several pin controllers on the system and thus | 817 | As you can see we may have several pin controllers on the system and thus |
807 | we need to specify which one of them that contain the functions we wish | 818 | we need to specify which one of them that contain the functions we wish |
808 | to map. The map can also use struct device * directly, so there is no | 819 | to map. |
809 | inherent need to use strings to specify .dev_name or .ctrl_dev_name, these | ||
810 | are for the situation where you do not have a handle to the struct device *, | ||
811 | for example if they are not yet instantiated or cumbersome to obtain. | ||
812 | 820 | ||
813 | You register this pinmux mapping to the pinmux subsystem by simply: | 821 | You register this pinmux mapping to the pinmux subsystem by simply: |
814 | 822 | ||
815 | ret = pinmux_register_mappings(pmx_mapping, ARRAY_SIZE(pmx_mapping)); | 823 | ret = pinctrl_register_mappings(mapping, ARRAY_SIZE(mapping)); |
816 | 824 | ||
817 | Since the above construct is pretty common there is a helper macro to make | 825 | Since the above construct is pretty common there is a helper macro to make |
818 | it even more compact which assumes you want to use pinctrl-foo and position | 826 | it even more compact which assumes you want to use pinctrl-foo and position |
819 | 0 for mapping, for example: | 827 | 0 for mapping, for example: |
820 | 828 | ||
821 | static struct pinmux_map __initdata pmx_mapping[] = { | 829 | static struct pinctrl_map __initdata mapping[] = { |
822 | PINMUX_MAP("I2CMAP", "pinctrl-foo", "i2c0", "foo-i2c.0"), | 830 | PIN_MAP_MUX_GROUP("foo-i2c.o", PINCTRL_STATE_DEFAULT, "pinctrl-foo", NULL, "i2c0"), |
831 | }; | ||
832 | |||
833 | The mapping table may also contain pin configuration entries. It's common for | ||
834 | each pin/group to have a number of configuration entries that affect it, so | ||
835 | the table entries for configuration reference an array of config parameters | ||
836 | and values. An example using the convenience macros is shown below: | ||
837 | |||
838 | static unsigned long i2c_grp_configs[] = { | ||
839 | FOO_PIN_DRIVEN, | ||
840 | FOO_PIN_PULLUP, | ||
841 | }; | ||
842 | |||
843 | static unsigned long i2c_pin_configs[] = { | ||
844 | FOO_OPEN_COLLECTOR, | ||
845 | FOO_SLEW_RATE_SLOW, | ||
846 | }; | ||
847 | |||
848 | static struct pinctrl_map __initdata mapping[] = { | ||
849 | PIN_MAP_MUX_GROUP("foo-i2c.0", PINCTRL_STATE_DEFAULT, "pinctrl-foo", "i2c0", "i2c0"), | ||
850 | PIN_MAP_MUX_CONFIGS_GROUP("foo-i2c.0", PINCTRL_STATE_DEFAULT, "pinctrl-foo", "i2c0", i2c_grp_configs), | ||
851 | PIN_MAP_MUX_CONFIGS_PIN("foo-i2c.0", PINCTRL_STATE_DEFAULT, "pinctrl-foo", "i2c0scl", i2c_pin_configs), | ||
852 | PIN_MAP_MUX_CONFIGS_PIN("foo-i2c.0", PINCTRL_STATE_DEFAULT, "pinctrl-foo", "i2c0sda", i2c_pin_configs), | ||
853 | }; | ||
854 | |||
855 | Finally, some devices expect the mapping table to contain certain specific | ||
856 | named states. When running on hardware that doesn't need any pin controller | ||
857 | configuration, the mapping table must still contain those named states, in | ||
858 | order to explicitly indicate that the states were provided and intended to | ||
859 | be empty. Table entry macro PIN_MAP_DUMMY_STATE serves the purpose of defining | ||
860 | a named state without causing any pin controller to be programmed: | ||
861 | |||
862 | static struct pinctrl_map __initdata mapping[] = { | ||
863 | PIN_MAP_DUMMY_STATE("foo-i2c.0", PINCTRL_STATE_DEFAULT), | ||
823 | }; | 864 | }; |
824 | 865 | ||
825 | 866 | ||
@@ -831,81 +872,96 @@ As it is possible to map a function to different groups of pins an optional | |||
831 | 872 | ||
832 | ... | 873 | ... |
833 | { | 874 | { |
875 | .dev_name = "foo-spi.0", | ||
834 | .name = "spi0-pos-A", | 876 | .name = "spi0-pos-A", |
877 | .type = PIN_MAP_TYPE_MUX_GROUP, | ||
835 | .ctrl_dev_name = "pinctrl-foo", | 878 | .ctrl_dev_name = "pinctrl-foo", |
836 | .function = "spi0", | 879 | .function = "spi0", |
837 | .group = "spi0_0_grp", | 880 | .group = "spi0_0_grp", |
838 | .dev_name = "foo-spi.0", | ||
839 | }, | 881 | }, |
840 | { | 882 | { |
883 | .dev_name = "foo-spi.0", | ||
841 | .name = "spi0-pos-B", | 884 | .name = "spi0-pos-B", |
885 | .type = PIN_MAP_TYPE_MUX_GROUP, | ||
842 | .ctrl_dev_name = "pinctrl-foo", | 886 | .ctrl_dev_name = "pinctrl-foo", |
843 | .function = "spi0", | 887 | .function = "spi0", |
844 | .group = "spi0_1_grp", | 888 | .group = "spi0_1_grp", |
845 | .dev_name = "foo-spi.0", | ||
846 | }, | 889 | }, |
847 | ... | 890 | ... |
848 | 891 | ||
849 | This example mapping is used to switch between two positions for spi0 at | 892 | This example mapping is used to switch between two positions for spi0 at |
850 | runtime, as described further below under the heading "Runtime pinmuxing". | 893 | runtime, as described further below under the heading "Runtime pinmuxing". |
851 | 894 | ||
852 | Further it is possible to match several groups of pins to the same function | 895 | Further it is possible for one named state to affect the muxing of several |
853 | for a single device, say for example in the mmc0 example above, where you can | 896 | groups of pins, say for example in the mmc0 example above, where you can |
854 | additively expand the mmc0 bus from 2 to 4 to 8 pins. If we want to use all | 897 | additively expand the mmc0 bus from 2 to 4 to 8 pins. If we want to use all |
855 | three groups for a total of 2+2+4 = 8 pins (for an 8-bit MMC bus as is the | 898 | three groups for a total of 2+2+4 = 8 pins (for an 8-bit MMC bus as is the |
856 | case), we define a mapping like this: | 899 | case), we define a mapping like this: |
857 | 900 | ||
858 | ... | 901 | ... |
859 | { | 902 | { |
903 | .dev_name = "foo-mmc.0", | ||
860 | .name = "2bit" | 904 | .name = "2bit" |
905 | .type = PIN_MAP_TYPE_MUX_GROUP, | ||
861 | .ctrl_dev_name = "pinctrl-foo", | 906 | .ctrl_dev_name = "pinctrl-foo", |
862 | .function = "mmc0", | 907 | .function = "mmc0", |
863 | .group = "mmc0_1_grp", | 908 | .group = "mmc0_1_grp", |
864 | .dev_name = "foo-mmc.0", | ||
865 | }, | 909 | }, |
866 | { | 910 | { |
911 | .dev_name = "foo-mmc.0", | ||
867 | .name = "4bit" | 912 | .name = "4bit" |
913 | .type = PIN_MAP_TYPE_MUX_GROUP, | ||
868 | .ctrl_dev_name = "pinctrl-foo", | 914 | .ctrl_dev_name = "pinctrl-foo", |
869 | .function = "mmc0", | 915 | .function = "mmc0", |
870 | .group = "mmc0_1_grp", | 916 | .group = "mmc0_1_grp", |
871 | .dev_name = "foo-mmc.0", | ||
872 | }, | 917 | }, |
873 | { | 918 | { |
919 | .dev_name = "foo-mmc.0", | ||
874 | .name = "4bit" | 920 | .name = "4bit" |
921 | .type = PIN_MAP_TYPE_MUX_GROUP, | ||
875 | .ctrl_dev_name = "pinctrl-foo", | 922 | .ctrl_dev_name = "pinctrl-foo", |
876 | .function = "mmc0", | 923 | .function = "mmc0", |
877 | .group = "mmc0_2_grp", | 924 | .group = "mmc0_2_grp", |
878 | .dev_name = "foo-mmc.0", | ||
879 | }, | 925 | }, |
880 | { | 926 | { |
927 | .dev_name = "foo-mmc.0", | ||
881 | .name = "8bit" | 928 | .name = "8bit" |
929 | .type = PIN_MAP_TYPE_MUX_GROUP, | ||
882 | .ctrl_dev_name = "pinctrl-foo", | 930 | .ctrl_dev_name = "pinctrl-foo", |
931 | .function = "mmc0", | ||
883 | .group = "mmc0_1_grp", | 932 | .group = "mmc0_1_grp", |
884 | .dev_name = "foo-mmc.0", | ||
885 | }, | 933 | }, |
886 | { | 934 | { |
935 | .dev_name = "foo-mmc.0", | ||
887 | .name = "8bit" | 936 | .name = "8bit" |
937 | .type = PIN_MAP_TYPE_MUX_GROUP, | ||
888 | .ctrl_dev_name = "pinctrl-foo", | 938 | .ctrl_dev_name = "pinctrl-foo", |
889 | .function = "mmc0", | 939 | .function = "mmc0", |
890 | .group = "mmc0_2_grp", | 940 | .group = "mmc0_2_grp", |
891 | .dev_name = "foo-mmc.0", | ||
892 | }, | 941 | }, |
893 | { | 942 | { |
943 | .dev_name = "foo-mmc.0", | ||
894 | .name = "8bit" | 944 | .name = "8bit" |
945 | .type = PIN_MAP_TYPE_MUX_GROUP, | ||
895 | .ctrl_dev_name = "pinctrl-foo", | 946 | .ctrl_dev_name = "pinctrl-foo", |
896 | .function = "mmc0", | 947 | .function = "mmc0", |
897 | .group = "mmc0_3_grp", | 948 | .group = "mmc0_3_grp", |
898 | .dev_name = "foo-mmc.0", | ||
899 | }, | 949 | }, |
900 | ... | 950 | ... |
901 | 951 | ||
902 | The result of grabbing this mapping from the device with something like | 952 | The result of grabbing this mapping from the device with something like |
903 | this (see next paragraph): | 953 | this (see next paragraph): |
904 | 954 | ||
905 | pmx = pinmux_get(&device, "8bit"); | 955 | p = pinctrl_get(dev); |
956 | s = pinctrl_lookup_state(p, "8bit"); | ||
957 | ret = pinctrl_select_state(p, s); | ||
958 | |||
959 | or more simply: | ||
960 | |||
961 | p = pinctrl_get_select(dev, "8bit"); | ||
906 | 962 | ||
907 | Will be that you activate all the three bottom records in the mapping at | 963 | Will be that you activate all the three bottom records in the mapping at |
908 | once. Since they share the same name, pin controller device, funcion and | 964 | once. Since they share the same name, pin controller device, function and |
909 | device, and since we allow multiple groups to match to a single device, they | 965 | device, and since we allow multiple groups to match to a single device, they |
910 | all get selected, and they all get enabled and disable simultaneously by the | 966 | all get selected, and they all get enabled and disable simultaneously by the |
911 | pinmux core. | 967 | pinmux core. |
@@ -914,97 +970,111 @@ pinmux core. | |||
914 | Pinmux requests from drivers | 970 | Pinmux requests from drivers |
915 | ============================ | 971 | ============================ |
916 | 972 | ||
917 | Generally it is discouraged to let individual drivers get and enable pinmuxes. | 973 | Generally it is discouraged to let individual drivers get and enable pin |
918 | So if possible, handle the pinmuxes in platform code or some other place where | 974 | control. So if possible, handle the pin control in platform code or some other |
919 | you have access to all the affected struct device * pointers. In some cases | 975 | place where you have access to all the affected struct device * pointers. In |
920 | where a driver needs to switch between different mux mappings at runtime | 976 | some cases where a driver needs to e.g. switch between different mux mappings |
921 | this is not possible. | 977 | at runtime this is not possible. |
922 | 978 | ||
923 | A driver may request a certain mux to be activated, usually just the default | 979 | A driver may request a certain control state to be activated, usually just the |
924 | mux like this: | 980 | default state like this: |
925 | 981 | ||
926 | #include <linux/pinctrl/pinmux.h> | 982 | #include <linux/pinctrl/consumer.h> |
927 | 983 | ||
928 | struct foo_state { | 984 | struct foo_state { |
929 | struct pinmux *pmx; | 985 | struct pinctrl *p; |
986 | struct pinctrl_state *s; | ||
930 | ... | 987 | ... |
931 | }; | 988 | }; |
932 | 989 | ||
933 | foo_probe() | 990 | foo_probe() |
934 | { | 991 | { |
935 | /* Allocate a state holder named "state" etc */ | 992 | /* Allocate a state holder named "foo" etc */ |
936 | struct pinmux pmx; | 993 | struct foo_state *foo = ...; |
994 | |||
995 | foo->p = pinctrl_get(&device); | ||
996 | if (IS_ERR(foo->p)) { | ||
997 | /* FIXME: clean up "foo" here */ | ||
998 | return PTR_ERR(foo->p); | ||
999 | } | ||
937 | 1000 | ||
938 | pmx = pinmux_get(&device, NULL); | 1001 | foo->s = pinctrl_lookup_state(foo->p, PINCTRL_STATE_DEFAULT); |
939 | if IS_ERR(pmx) | 1002 | if (IS_ERR(foo->s)) { |
940 | return PTR_ERR(pmx); | 1003 | pinctrl_put(foo->p); |
941 | pinmux_enable(pmx); | 1004 | /* FIXME: clean up "foo" here */ |
1005 | return PTR_ERR(s); | ||
1006 | } | ||
942 | 1007 | ||
943 | state->pmx = pmx; | 1008 | ret = pinctrl_select_state(foo->s); |
1009 | if (ret < 0) { | ||
1010 | pinctrl_put(foo->p); | ||
1011 | /* FIXME: clean up "foo" here */ | ||
1012 | return ret; | ||
1013 | } | ||
944 | } | 1014 | } |
945 | 1015 | ||
946 | foo_remove() | 1016 | foo_remove() |
947 | { | 1017 | { |
948 | pinmux_disable(state->pmx); | 1018 | pinctrl_put(state->p); |
949 | pinmux_put(state->pmx); | ||
950 | } | 1019 | } |
951 | 1020 | ||
952 | If you want to grab a specific mux mapping and not just the first one found for | 1021 | This get/lookup/select/put sequence can just as well be handled by bus drivers |
953 | this device you can specify a specific mapping name, for example in the above | ||
954 | example the second i2c0 setting: pinmux_get(&device, "spi0-pos-B"); | ||
955 | |||
956 | This get/enable/disable/put sequence can just as well be handled by bus drivers | ||
957 | if you don't want each and every driver to handle it and you know the | 1022 | if you don't want each and every driver to handle it and you know the |
958 | arrangement on your bus. | 1023 | arrangement on your bus. |
959 | 1024 | ||
960 | The semantics of the get/enable respective disable/put is as follows: | 1025 | The semantics of the pinctrl APIs are: |
1026 | |||
1027 | - pinctrl_get() is called in process context to obtain a handle to all pinctrl | ||
1028 | information for a given client device. It will allocate a struct from the | ||
1029 | kernel memory to hold the pinmux state. All mapping table parsing or similar | ||
1030 | slow operations take place within this API. | ||
961 | 1031 | ||
962 | - pinmux_get() is called in process context to reserve the pins affected with | 1032 | - pinctrl_lookup_state() is called in process context to obtain a handle to a |
963 | a certain mapping and set up the pinmux core and the driver. It will allocate | 1033 | specific state for a the client device. This operation may be slow too. |
964 | a struct from the kernel memory to hold the pinmux state. | ||
965 | 1034 | ||
966 | - pinmux_enable()/pinmux_disable() is quick and can be called from fastpath | 1035 | - pinctrl_select_state() programs pin controller hardware according to the |
967 | (irq context) when you quickly want to set up/tear down the hardware muxing | 1036 | definition of the state as given by the mapping table. In theory this is a |
968 | when running a device driver. Usually it will just poke some values into a | 1037 | fast-path operation, since it only involved blasting some register settings |
969 | register. | 1038 | into hardware. However, note that some pin controllers may have their |
1039 | registers on a slow/IRQ-based bus, so client devices should not assume they | ||
1040 | can call pinctrl_select_state() from non-blocking contexts. | ||
970 | 1041 | ||
971 | - pinmux_disable() is called in process context to tear down the pin requests | 1042 | - pinctrl_put() frees all information associated with a pinctrl handle. |
972 | and release the state holder struct for the mux setting. | ||
973 | 1043 | ||
974 | Usually the pinmux core handled the get/put pair and call out to the device | 1044 | Usually the pin control core handled the get/put pair and call out to the |
975 | drivers bookkeeping operations, like checking available functions and the | 1045 | device drivers bookkeeping operations, like checking available functions and |
976 | associated pins, whereas the enable/disable pass on to the pin controller | 1046 | the associated pins, whereas the enable/disable pass on to the pin controller |
977 | driver which takes care of activating and/or deactivating the mux setting by | 1047 | driver which takes care of activating and/or deactivating the mux setting by |
978 | quickly poking some registers. | 1048 | quickly poking some registers. |
979 | 1049 | ||
980 | The pins are allocated for your device when you issue the pinmux_get() call, | 1050 | The pins are allocated for your device when you issue the pinctrl_get() call, |
981 | after this you should be able to see this in the debugfs listing of all pins. | 1051 | after this you should be able to see this in the debugfs listing of all pins. |
982 | 1052 | ||
983 | 1053 | ||
984 | System pinmux hogging | 1054 | System pin control hogging |
985 | ===================== | 1055 | ========================== |
986 | 1056 | ||
987 | A system pinmux map entry, i.e. a pinmux setting that does not have a device | 1057 | Pin control map entries can be hogged by the core when the pin controller |
988 | associated with it, can be hogged by the core when the pin controller is | 1058 | is registered. This means that the core will attempt to call pinctrl_get(), |
989 | registered. This means that the core will attempt to call pinmux_get() and | 1059 | lookup_state() and select_state() on it immediately after the pin control |
990 | pinmux_enable() on it immediately after the pin control device has been | 1060 | device has been registered. |
991 | registered. | ||
992 | 1061 | ||
993 | This is enabled by simply setting the .hog_on_boot field in the map to true, | 1062 | This occurs for mapping table entries where the client device name is equal |
994 | like this: | 1063 | to the pin controller device name, and the state name is PINCTRL_STATE_DEFAULT. |
995 | 1064 | ||
996 | { | 1065 | { |
997 | .name = "POWERMAP" | 1066 | .dev_name = "pinctrl-foo", |
1067 | .name = PINCTRL_STATE_DEFAULT, | ||
1068 | .type = PIN_MAP_TYPE_MUX_GROUP, | ||
998 | .ctrl_dev_name = "pinctrl-foo", | 1069 | .ctrl_dev_name = "pinctrl-foo", |
999 | .function = "power_func", | 1070 | .function = "power_func", |
1000 | .hog_on_boot = true, | ||
1001 | }, | 1071 | }, |
1002 | 1072 | ||
1003 | Since it may be common to request the core to hog a few always-applicable | 1073 | Since it may be common to request the core to hog a few always-applicable |
1004 | mux settings on the primary pin controller, there is a convenience macro for | 1074 | mux settings on the primary pin controller, there is a convenience macro for |
1005 | this: | 1075 | this: |
1006 | 1076 | ||
1007 | PINMUX_MAP_PRIMARY_SYS_HOG("POWERMAP", "power_func") | 1077 | PIN_MAP_MUX_GROUP_HOG_DEFAULT("pinctrl-foo", NULL /* group */, "power_func") |
1008 | 1078 | ||
1009 | This gives the exact same result as the above construction. | 1079 | This gives the exact same result as the above construction. |
1010 | 1080 | ||
@@ -1016,32 +1086,47 @@ It is possible to mux a certain function in and out at runtime, say to move | |||
1016 | an SPI port from one set of pins to another set of pins. Say for example for | 1086 | an SPI port from one set of pins to another set of pins. Say for example for |
1017 | spi0 in the example above, we expose two different groups of pins for the same | 1087 | spi0 in the example above, we expose two different groups of pins for the same |
1018 | function, but with different named in the mapping as described under | 1088 | function, but with different named in the mapping as described under |
1019 | "Advanced mapping" above. So we have two mappings named "spi0-pos-A" and | 1089 | "Advanced mapping" above. So that for an SPI device, we have two states named |
1020 | "spi0-pos-B". | 1090 | "pos-A" and "pos-B". |
1021 | 1091 | ||
1022 | This snippet first muxes the function in the pins defined by group A, enables | 1092 | This snippet first muxes the function in the pins defined by group A, enables |
1023 | it, disables and releases it, and muxes it in on the pins defined by group B: | 1093 | it, disables and releases it, and muxes it in on the pins defined by group B: |
1024 | 1094 | ||
1095 | #include <linux/pinctrl/consumer.h> | ||
1096 | |||
1025 | foo_switch() | 1097 | foo_switch() |
1026 | { | 1098 | { |
1027 | struct pinmux *pmx; | 1099 | struct pinctrl *p; |
1100 | struct pinctrl_state *s1, *s2; | ||
1101 | |||
1102 | /* Setup */ | ||
1103 | p = pinctrl_get(&device); | ||
1104 | if (IS_ERR(p)) | ||
1105 | ... | ||
1106 | |||
1107 | s1 = pinctrl_lookup_state(foo->p, "pos-A"); | ||
1108 | if (IS_ERR(s1)) | ||
1109 | ... | ||
1110 | |||
1111 | s2 = pinctrl_lookup_state(foo->p, "pos-B"); | ||
1112 | if (IS_ERR(s2)) | ||
1113 | ... | ||
1028 | 1114 | ||
1029 | /* Enable on position A */ | 1115 | /* Enable on position A */ |
1030 | pmx = pinmux_get(&device, "spi0-pos-A"); | 1116 | ret = pinctrl_select_state(s1); |
1031 | if IS_ERR(pmx) | 1117 | if (ret < 0) |
1032 | return PTR_ERR(pmx); | 1118 | ... |
1033 | pinmux_enable(pmx); | ||
1034 | 1119 | ||
1035 | /* This releases the pins again */ | 1120 | ... |
1036 | pinmux_disable(pmx); | ||
1037 | pinmux_put(pmx); | ||
1038 | 1121 | ||
1039 | /* Enable on position B */ | 1122 | /* Enable on position B */ |
1040 | pmx = pinmux_get(&device, "spi0-pos-B"); | 1123 | ret = pinctrl_select_state(s2); |
1041 | if IS_ERR(pmx) | 1124 | if (ret < 0) |
1042 | return PTR_ERR(pmx); | 1125 | ... |
1043 | pinmux_enable(pmx); | 1126 | |
1044 | ... | 1127 | ... |
1128 | |||
1129 | pinctrl_put(p); | ||
1045 | } | 1130 | } |
1046 | 1131 | ||
1047 | The above has to be done from process context. | 1132 | The above has to be done from process context. |
diff --git a/Documentation/power/devices.txt b/Documentation/power/devices.txt index 20af7def23c8..872815cd41d3 100644 --- a/Documentation/power/devices.txt +++ b/Documentation/power/devices.txt | |||
@@ -96,6 +96,12 @@ struct dev_pm_ops { | |||
96 | int (*thaw)(struct device *dev); | 96 | int (*thaw)(struct device *dev); |
97 | int (*poweroff)(struct device *dev); | 97 | int (*poweroff)(struct device *dev); |
98 | int (*restore)(struct device *dev); | 98 | int (*restore)(struct device *dev); |
99 | int (*suspend_late)(struct device *dev); | ||
100 | int (*resume_early)(struct device *dev); | ||
101 | int (*freeze_late)(struct device *dev); | ||
102 | int (*thaw_early)(struct device *dev); | ||
103 | int (*poweroff_late)(struct device *dev); | ||
104 | int (*restore_early)(struct device *dev); | ||
99 | int (*suspend_noirq)(struct device *dev); | 105 | int (*suspend_noirq)(struct device *dev); |
100 | int (*resume_noirq)(struct device *dev); | 106 | int (*resume_noirq)(struct device *dev); |
101 | int (*freeze_noirq)(struct device *dev); | 107 | int (*freeze_noirq)(struct device *dev); |
@@ -305,7 +311,7 @@ Entering System Suspend | |||
305 | ----------------------- | 311 | ----------------------- |
306 | When the system goes into the standby or memory sleep state, the phases are: | 312 | When the system goes into the standby or memory sleep state, the phases are: |
307 | 313 | ||
308 | prepare, suspend, suspend_noirq. | 314 | prepare, suspend, suspend_late, suspend_noirq. |
309 | 315 | ||
310 | 1. The prepare phase is meant to prevent races by preventing new devices | 316 | 1. The prepare phase is meant to prevent races by preventing new devices |
311 | from being registered; the PM core would never know that all the | 317 | from being registered; the PM core would never know that all the |
@@ -324,7 +330,12 @@ When the system goes into the standby or memory sleep state, the phases are: | |||
324 | appropriate low-power state, depending on the bus type the device is on, | 330 | appropriate low-power state, depending on the bus type the device is on, |
325 | and they may enable wakeup events. | 331 | and they may enable wakeup events. |
326 | 332 | ||
327 | 3. The suspend_noirq phase occurs after IRQ handlers have been disabled, | 333 | 3 For a number of devices it is convenient to split suspend into the |
334 | "quiesce device" and "save device state" phases, in which cases | ||
335 | suspend_late is meant to do the latter. It is always executed after | ||
336 | runtime power management has been disabled for all devices. | ||
337 | |||
338 | 4. The suspend_noirq phase occurs after IRQ handlers have been disabled, | ||
328 | which means that the driver's interrupt handler will not be called while | 339 | which means that the driver's interrupt handler will not be called while |
329 | the callback method is running. The methods should save the values of | 340 | the callback method is running. The methods should save the values of |
330 | the device's registers that weren't saved previously and finally put the | 341 | the device's registers that weren't saved previously and finally put the |
@@ -359,7 +370,7 @@ Leaving System Suspend | |||
359 | ---------------------- | 370 | ---------------------- |
360 | When resuming from standby or memory sleep, the phases are: | 371 | When resuming from standby or memory sleep, the phases are: |
361 | 372 | ||
362 | resume_noirq, resume, complete. | 373 | resume_noirq, resume_early, resume, complete. |
363 | 374 | ||
364 | 1. The resume_noirq callback methods should perform any actions needed | 375 | 1. The resume_noirq callback methods should perform any actions needed |
365 | before the driver's interrupt handlers are invoked. This generally | 376 | before the driver's interrupt handlers are invoked. This generally |
@@ -375,14 +386,18 @@ When resuming from standby or memory sleep, the phases are: | |||
375 | device driver's ->pm.resume_noirq() method to perform device-specific | 386 | device driver's ->pm.resume_noirq() method to perform device-specific |
376 | actions. | 387 | actions. |
377 | 388 | ||
378 | 2. The resume methods should bring the the device back to its operating | 389 | 2. The resume_early methods should prepare devices for the execution of |
390 | the resume methods. This generally involves undoing the actions of the | ||
391 | preceding suspend_late phase. | ||
392 | |||
393 | 3 The resume methods should bring the the device back to its operating | ||
379 | state, so that it can perform normal I/O. This generally involves | 394 | state, so that it can perform normal I/O. This generally involves |
380 | undoing the actions of the suspend phase. | 395 | undoing the actions of the suspend phase. |
381 | 396 | ||
382 | 3. The complete phase uses only a bus callback. The method should undo the | 397 | 4. The complete phase should undo the actions of the prepare phase. Note, |
383 | actions of the prepare phase. Note, however, that new children may be | 398 | however, that new children may be registered below the device as soon as |
384 | registered below the device as soon as the resume callbacks occur; it's | 399 | the resume callbacks occur; it's not necessary to wait until the |
385 | not necessary to wait until the complete phase. | 400 | complete phase. |
386 | 401 | ||
387 | At the end of these phases, drivers should be as functional as they were before | 402 | At the end of these phases, drivers should be as functional as they were before |
388 | suspending: I/O can be performed using DMA and IRQs, and the relevant clocks are | 403 | suspending: I/O can be performed using DMA and IRQs, and the relevant clocks are |
@@ -429,8 +444,8 @@ an image of the system memory while everything is stable, reactivate all | |||
429 | devices (thaw), write the image to permanent storage, and finally shut down the | 444 | devices (thaw), write the image to permanent storage, and finally shut down the |
430 | system (poweroff). The phases used to accomplish this are: | 445 | system (poweroff). The phases used to accomplish this are: |
431 | 446 | ||
432 | prepare, freeze, freeze_noirq, thaw_noirq, thaw, complete, | 447 | prepare, freeze, freeze_late, freeze_noirq, thaw_noirq, thaw_early, |
433 | prepare, poweroff, poweroff_noirq | 448 | thaw, complete, prepare, poweroff, poweroff_late, poweroff_noirq |
434 | 449 | ||
435 | 1. The prepare phase is discussed in the "Entering System Suspend" section | 450 | 1. The prepare phase is discussed in the "Entering System Suspend" section |
436 | above. | 451 | above. |
@@ -441,7 +456,11 @@ system (poweroff). The phases used to accomplish this are: | |||
441 | save time it's best not to do so. Also, the device should not be | 456 | save time it's best not to do so. Also, the device should not be |
442 | prepared to generate wakeup events. | 457 | prepared to generate wakeup events. |
443 | 458 | ||
444 | 3. The freeze_noirq phase is analogous to the suspend_noirq phase discussed | 459 | 3. The freeze_late phase is analogous to the suspend_late phase described |
460 | above, except that the device should not be put in a low-power state and | ||
461 | should not be allowed to generate wakeup events by it. | ||
462 | |||
463 | 4. The freeze_noirq phase is analogous to the suspend_noirq phase discussed | ||
445 | above, except again that the device should not be put in a low-power | 464 | above, except again that the device should not be put in a low-power |
446 | state and should not be allowed to generate wakeup events. | 465 | state and should not be allowed to generate wakeup events. |
447 | 466 | ||
@@ -449,15 +468,19 @@ At this point the system image is created. All devices should be inactive and | |||
449 | the contents of memory should remain undisturbed while this happens, so that the | 468 | the contents of memory should remain undisturbed while this happens, so that the |
450 | image forms an atomic snapshot of the system state. | 469 | image forms an atomic snapshot of the system state. |
451 | 470 | ||
452 | 4. The thaw_noirq phase is analogous to the resume_noirq phase discussed | 471 | 5. The thaw_noirq phase is analogous to the resume_noirq phase discussed |
453 | above. The main difference is that its methods can assume the device is | 472 | above. The main difference is that its methods can assume the device is |
454 | in the same state as at the end of the freeze_noirq phase. | 473 | in the same state as at the end of the freeze_noirq phase. |
455 | 474 | ||
456 | 5. The thaw phase is analogous to the resume phase discussed above. Its | 475 | 6. The thaw_early phase is analogous to the resume_early phase described |
476 | above. Its methods should undo the actions of the preceding | ||
477 | freeze_late, if necessary. | ||
478 | |||
479 | 7. The thaw phase is analogous to the resume phase discussed above. Its | ||
457 | methods should bring the device back to an operating state, so that it | 480 | methods should bring the device back to an operating state, so that it |
458 | can be used for saving the image if necessary. | 481 | can be used for saving the image if necessary. |
459 | 482 | ||
460 | 6. The complete phase is discussed in the "Leaving System Suspend" section | 483 | 8. The complete phase is discussed in the "Leaving System Suspend" section |
461 | above. | 484 | above. |
462 | 485 | ||
463 | At this point the system image is saved, and the devices then need to be | 486 | At this point the system image is saved, and the devices then need to be |
@@ -465,16 +488,19 @@ prepared for the upcoming system shutdown. This is much like suspending them | |||
465 | before putting the system into the standby or memory sleep state, and the phases | 488 | before putting the system into the standby or memory sleep state, and the phases |
466 | are similar. | 489 | are similar. |
467 | 490 | ||
468 | 7. The prepare phase is discussed above. | 491 | 9. The prepare phase is discussed above. |
492 | |||
493 | 10. The poweroff phase is analogous to the suspend phase. | ||
469 | 494 | ||
470 | 8. The poweroff phase is analogous to the suspend phase. | 495 | 11. The poweroff_late phase is analogous to the suspend_late phase. |
471 | 496 | ||
472 | 9. The poweroff_noirq phase is analogous to the suspend_noirq phase. | 497 | 12. The poweroff_noirq phase is analogous to the suspend_noirq phase. |
473 | 498 | ||
474 | The poweroff and poweroff_noirq callbacks should do essentially the same things | 499 | The poweroff, poweroff_late and poweroff_noirq callbacks should do essentially |
475 | as the suspend and suspend_noirq callbacks. The only notable difference is that | 500 | the same things as the suspend, suspend_late and suspend_noirq callbacks, |
476 | they need not store the device register values, because the registers should | 501 | respectively. The only notable difference is that they need not store the |
477 | already have been stored during the freeze or freeze_noirq phases. | 502 | device register values, because the registers should already have been stored |
503 | during the freeze, freeze_late or freeze_noirq phases. | ||
478 | 504 | ||
479 | 505 | ||
480 | Leaving Hibernation | 506 | Leaving Hibernation |
@@ -518,22 +544,25 @@ To achieve this, the image kernel must restore the devices' pre-hibernation | |||
518 | functionality. The operation is much like waking up from the memory sleep | 544 | functionality. The operation is much like waking up from the memory sleep |
519 | state, although it involves different phases: | 545 | state, although it involves different phases: |
520 | 546 | ||
521 | restore_noirq, restore, complete | 547 | restore_noirq, restore_early, restore, complete |
522 | 548 | ||
523 | 1. The restore_noirq phase is analogous to the resume_noirq phase. | 549 | 1. The restore_noirq phase is analogous to the resume_noirq phase. |
524 | 550 | ||
525 | 2. The restore phase is analogous to the resume phase. | 551 | 2. The restore_early phase is analogous to the resume_early phase. |
552 | |||
553 | 3. The restore phase is analogous to the resume phase. | ||
526 | 554 | ||
527 | 3. The complete phase is discussed above. | 555 | 4. The complete phase is discussed above. |
528 | 556 | ||
529 | The main difference from resume[_noirq] is that restore[_noirq] must assume the | 557 | The main difference from resume[_early|_noirq] is that restore[_early|_noirq] |
530 | device has been accessed and reconfigured by the boot loader or the boot kernel. | 558 | must assume the device has been accessed and reconfigured by the boot loader or |
531 | Consequently the state of the device may be different from the state remembered | 559 | the boot kernel. Consequently the state of the device may be different from the |
532 | from the freeze and freeze_noirq phases. The device may even need to be reset | 560 | state remembered from the freeze, freeze_late and freeze_noirq phases. The |
533 | and completely re-initialized. In many cases this difference doesn't matter, so | 561 | device may even need to be reset and completely re-initialized. In many cases |
534 | the resume[_noirq] and restore[_norq] method pointers can be set to the same | 562 | this difference doesn't matter, so the resume[_early|_noirq] and |
535 | routines. Nevertheless, different callback pointers are used in case there is a | 563 | restore[_early|_norq] method pointers can be set to the same routines. |
536 | situation where it actually matters. | 564 | Nevertheless, different callback pointers are used in case there is a situation |
565 | where it actually does matter. | ||
537 | 566 | ||
538 | 567 | ||
539 | Device Power Management Domains | 568 | Device Power Management Domains |
diff --git a/Documentation/power/freezing-of-tasks.txt b/Documentation/power/freezing-of-tasks.txt index ebd7490ef1df..ec715cd78fbb 100644 --- a/Documentation/power/freezing-of-tasks.txt +++ b/Documentation/power/freezing-of-tasks.txt | |||
@@ -63,6 +63,27 @@ devices have been reinitialized, the function thaw_processes() is called in | |||
63 | order to clear the PF_FROZEN flag for each frozen task. Then, the tasks that | 63 | order to clear the PF_FROZEN flag for each frozen task. Then, the tasks that |
64 | have been frozen leave __refrigerator() and continue running. | 64 | have been frozen leave __refrigerator() and continue running. |
65 | 65 | ||
66 | |||
67 | Rationale behind the functions dealing with freezing and thawing of tasks: | ||
68 | ------------------------------------------------------------------------- | ||
69 | |||
70 | freeze_processes(): | ||
71 | - freezes only userspace tasks | ||
72 | |||
73 | freeze_kernel_threads(): | ||
74 | - freezes all tasks (including kernel threads) because we can't freeze | ||
75 | kernel threads without freezing userspace tasks | ||
76 | |||
77 | thaw_kernel_threads(): | ||
78 | - thaws only kernel threads; this is particularly useful if we need to do | ||
79 | anything special in between thawing of kernel threads and thawing of | ||
80 | userspace tasks, or if we want to postpone the thawing of userspace tasks | ||
81 | |||
82 | thaw_processes(): | ||
83 | - thaws all tasks (including kernel threads) because we can't thaw userspace | ||
84 | tasks without thawing kernel threads | ||
85 | |||
86 | |||
66 | III. Which kernel threads are freezable? | 87 | III. Which kernel threads are freezable? |
67 | 88 | ||
68 | Kernel threads are not freezable by default. However, a kernel thread may clear | 89 | Kernel threads are not freezable by default. However, a kernel thread may clear |
diff --git a/Documentation/powerpc/firmware-assisted-dump.txt b/Documentation/powerpc/firmware-assisted-dump.txt new file mode 100644 index 000000000000..3007bc98af28 --- /dev/null +++ b/Documentation/powerpc/firmware-assisted-dump.txt | |||
@@ -0,0 +1,270 @@ | |||
1 | |||
2 | Firmware-Assisted Dump | ||
3 | ------------------------ | ||
4 | July 2011 | ||
5 | |||
6 | The goal of firmware-assisted dump is to enable the dump of | ||
7 | a crashed system, and to do so from a fully-reset system, and | ||
8 | to minimize the total elapsed time until the system is back | ||
9 | in production use. | ||
10 | |||
11 | - Firmware assisted dump (fadump) infrastructure is intended to replace | ||
12 | the existing phyp assisted dump. | ||
13 | - Fadump uses the same firmware interfaces and memory reservation model | ||
14 | as phyp assisted dump. | ||
15 | - Unlike phyp dump, fadump exports the memory dump through /proc/vmcore | ||
16 | in the ELF format in the same way as kdump. This helps us reuse the | ||
17 | kdump infrastructure for dump capture and filtering. | ||
18 | - Unlike phyp dump, userspace tool does not need to refer any sysfs | ||
19 | interface while reading /proc/vmcore. | ||
20 | - Unlike phyp dump, fadump allows user to release all the memory reserved | ||
21 | for dump, with a single operation of echo 1 > /sys/kernel/fadump_release_mem. | ||
22 | - Once enabled through kernel boot parameter, fadump can be | ||
23 | started/stopped through /sys/kernel/fadump_registered interface (see | ||
24 | sysfs files section below) and can be easily integrated with kdump | ||
25 | service start/stop init scripts. | ||
26 | |||
27 | Comparing with kdump or other strategies, firmware-assisted | ||
28 | dump offers several strong, practical advantages: | ||
29 | |||
30 | -- Unlike kdump, the system has been reset, and loaded | ||
31 | with a fresh copy of the kernel. In particular, | ||
32 | PCI and I/O devices have been reinitialized and are | ||
33 | in a clean, consistent state. | ||
34 | -- Once the dump is copied out, the memory that held the dump | ||
35 | is immediately available to the running kernel. And therefore, | ||
36 | unlike kdump, fadump doesn't need a 2nd reboot to get back | ||
37 | the system to the production configuration. | ||
38 | |||
39 | The above can only be accomplished by coordination with, | ||
40 | and assistance from the Power firmware. The procedure is | ||
41 | as follows: | ||
42 | |||
43 | -- The first kernel registers the sections of memory with the | ||
44 | Power firmware for dump preservation during OS initialization. | ||
45 | These registered sections of memory are reserved by the first | ||
46 | kernel during early boot. | ||
47 | |||
48 | -- When a system crashes, the Power firmware will save | ||
49 | the low memory (boot memory of size larger of 5% of system RAM | ||
50 | or 256MB) of RAM to the previous registered region. It will | ||
51 | also save system registers, and hardware PTE's. | ||
52 | |||
53 | NOTE: The term 'boot memory' means size of the low memory chunk | ||
54 | that is required for a kernel to boot successfully when | ||
55 | booted with restricted memory. By default, the boot memory | ||
56 | size will be the larger of 5% of system RAM or 256MB. | ||
57 | Alternatively, user can also specify boot memory size | ||
58 | through boot parameter 'fadump_reserve_mem=' which will | ||
59 | override the default calculated size. Use this option | ||
60 | if default boot memory size is not sufficient for second | ||
61 | kernel to boot successfully. | ||
62 | |||
63 | -- After the low memory (boot memory) area has been saved, the | ||
64 | firmware will reset PCI and other hardware state. It will | ||
65 | *not* clear the RAM. It will then launch the bootloader, as | ||
66 | normal. | ||
67 | |||
68 | -- The freshly booted kernel will notice that there is a new | ||
69 | node (ibm,dump-kernel) in the device tree, indicating that | ||
70 | there is crash data available from a previous boot. During | ||
71 | the early boot OS will reserve rest of the memory above | ||
72 | boot memory size effectively booting with restricted memory | ||
73 | size. This will make sure that the second kernel will not | ||
74 | touch any of the dump memory area. | ||
75 | |||
76 | -- User-space tools will read /proc/vmcore to obtain the contents | ||
77 | of memory, which holds the previous crashed kernel dump in ELF | ||
78 | format. The userspace tools may copy this info to disk, or | ||
79 | network, nas, san, iscsi, etc. as desired. | ||
80 | |||
81 | -- Once the userspace tool is done saving dump, it will echo | ||
82 | '1' to /sys/kernel/fadump_release_mem to release the reserved | ||
83 | memory back to general use, except the memory required for | ||
84 | next firmware-assisted dump registration. | ||
85 | |||
86 | e.g. | ||
87 | # echo 1 > /sys/kernel/fadump_release_mem | ||
88 | |||
89 | Please note that the firmware-assisted dump feature | ||
90 | is only available on Power6 and above systems with recent | ||
91 | firmware versions. | ||
92 | |||
93 | Implementation details: | ||
94 | ---------------------- | ||
95 | |||
96 | During boot, a check is made to see if firmware supports | ||
97 | this feature on that particular machine. If it does, then | ||
98 | we check to see if an active dump is waiting for us. If yes | ||
99 | then everything but boot memory size of RAM is reserved during | ||
100 | early boot (See Fig. 2). This area is released once we finish | ||
101 | collecting the dump from user land scripts (e.g. kdump scripts) | ||
102 | that are run. If there is dump data, then the | ||
103 | /sys/kernel/fadump_release_mem file is created, and the reserved | ||
104 | memory is held. | ||
105 | |||
106 | If there is no waiting dump data, then only the memory required | ||
107 | to hold CPU state, HPTE region, boot memory dump and elfcore | ||
108 | header, is reserved at the top of memory (see Fig. 1). This area | ||
109 | is *not* released: this region will be kept permanently reserved, | ||
110 | so that it can act as a receptacle for a copy of the boot memory | ||
111 | content in addition to CPU state and HPTE region, in the case a | ||
112 | crash does occur. | ||
113 | |||
114 | o Memory Reservation during first kernel | ||
115 | |||
116 | Low memory Top of memory | ||
117 | 0 boot memory size | | ||
118 | | | |<--Reserved dump area -->| | ||
119 | V V | Permanent Reservation V | ||
120 | +-----------+----------/ /----------+---+----+-----------+----+ | ||
121 | | | |CPU|HPTE| DUMP |ELF | | ||
122 | +-----------+----------/ /----------+---+----+-----------+----+ | ||
123 | | ^ | ||
124 | | | | ||
125 | \ / | ||
126 | ------------------------------------------- | ||
127 | Boot memory content gets transferred to | ||
128 | reserved area by firmware at the time of | ||
129 | crash | ||
130 | Fig. 1 | ||
131 | |||
132 | o Memory Reservation during second kernel after crash | ||
133 | |||
134 | Low memory Top of memory | ||
135 | 0 boot memory size | | ||
136 | | |<------------- Reserved dump area ----------- -->| | ||
137 | V V V | ||
138 | +-----------+----------/ /----------+---+----+-----------+----+ | ||
139 | | | |CPU|HPTE| DUMP |ELF | | ||
140 | +-----------+----------/ /----------+---+----+-----------+----+ | ||
141 | | | | ||
142 | V V | ||
143 | Used by second /proc/vmcore | ||
144 | kernel to boot | ||
145 | Fig. 2 | ||
146 | |||
147 | Currently the dump will be copied from /proc/vmcore to a | ||
148 | a new file upon user intervention. The dump data available through | ||
149 | /proc/vmcore will be in ELF format. Hence the existing kdump | ||
150 | infrastructure (kdump scripts) to save the dump works fine with | ||
151 | minor modifications. | ||
152 | |||
153 | The tools to examine the dump will be same as the ones | ||
154 | used for kdump. | ||
155 | |||
156 | How to enable firmware-assisted dump (fadump): | ||
157 | ------------------------------------- | ||
158 | |||
159 | 1. Set config option CONFIG_FA_DUMP=y and build kernel. | ||
160 | 2. Boot into linux kernel with 'fadump=on' kernel cmdline option. | ||
161 | 3. Optionally, user can also set 'fadump_reserve_mem=' kernel cmdline | ||
162 | to specify size of the memory to reserve for boot memory dump | ||
163 | preservation. | ||
164 | |||
165 | NOTE: If firmware-assisted dump fails to reserve memory then it will | ||
166 | fallback to existing kdump mechanism if 'crashkernel=' option | ||
167 | is set at kernel cmdline. | ||
168 | |||
169 | Sysfs/debugfs files: | ||
170 | ------------ | ||
171 | |||
172 | Firmware-assisted dump feature uses sysfs file system to hold | ||
173 | the control files and debugfs file to display memory reserved region. | ||
174 | |||
175 | Here is the list of files under kernel sysfs: | ||
176 | |||
177 | /sys/kernel/fadump_enabled | ||
178 | |||
179 | This is used to display the fadump status. | ||
180 | 0 = fadump is disabled | ||
181 | 1 = fadump is enabled | ||
182 | |||
183 | This interface can be used by kdump init scripts to identify if | ||
184 | fadump is enabled in the kernel and act accordingly. | ||
185 | |||
186 | /sys/kernel/fadump_registered | ||
187 | |||
188 | This is used to display the fadump registration status as well | ||
189 | as to control (start/stop) the fadump registration. | ||
190 | 0 = fadump is not registered. | ||
191 | 1 = fadump is registered and ready to handle system crash. | ||
192 | |||
193 | To register fadump echo 1 > /sys/kernel/fadump_registered and | ||
194 | echo 0 > /sys/kernel/fadump_registered for un-register and stop the | ||
195 | fadump. Once the fadump is un-registered, the system crash will not | ||
196 | be handled and vmcore will not be captured. This interface can be | ||
197 | easily integrated with kdump service start/stop. | ||
198 | |||
199 | /sys/kernel/fadump_release_mem | ||
200 | |||
201 | This file is available only when fadump is active during | ||
202 | second kernel. This is used to release the reserved memory | ||
203 | region that are held for saving crash dump. To release the | ||
204 | reserved memory echo 1 to it: | ||
205 | |||
206 | echo 1 > /sys/kernel/fadump_release_mem | ||
207 | |||
208 | After echo 1, the content of the /sys/kernel/debug/powerpc/fadump_region | ||
209 | file will change to reflect the new memory reservations. | ||
210 | |||
211 | The existing userspace tools (kdump infrastructure) can be easily | ||
212 | enhanced to use this interface to release the memory reserved for | ||
213 | dump and continue without 2nd reboot. | ||
214 | |||
215 | Here is the list of files under powerpc debugfs: | ||
216 | (Assuming debugfs is mounted on /sys/kernel/debug directory.) | ||
217 | |||
218 | /sys/kernel/debug/powerpc/fadump_region | ||
219 | |||
220 | This file shows the reserved memory regions if fadump is | ||
221 | enabled otherwise this file is empty. The output format | ||
222 | is: | ||
223 | <region>: [<start>-<end>] <reserved-size> bytes, Dumped: <dump-size> | ||
224 | |||
225 | e.g. | ||
226 | Contents when fadump is registered during first kernel | ||
227 | |||
228 | # cat /sys/kernel/debug/powerpc/fadump_region | ||
229 | CPU : [0x0000006ffb0000-0x0000006fff001f] 0x40020 bytes, Dumped: 0x0 | ||
230 | HPTE: [0x0000006fff0020-0x0000006fff101f] 0x1000 bytes, Dumped: 0x0 | ||
231 | DUMP: [0x0000006fff1020-0x0000007fff101f] 0x10000000 bytes, Dumped: 0x0 | ||
232 | |||
233 | Contents when fadump is active during second kernel | ||
234 | |||
235 | # cat /sys/kernel/debug/powerpc/fadump_region | ||
236 | CPU : [0x0000006ffb0000-0x0000006fff001f] 0x40020 bytes, Dumped: 0x40020 | ||
237 | HPTE: [0x0000006fff0020-0x0000006fff101f] 0x1000 bytes, Dumped: 0x1000 | ||
238 | DUMP: [0x0000006fff1020-0x0000007fff101f] 0x10000000 bytes, Dumped: 0x10000000 | ||
239 | : [0x00000010000000-0x0000006ffaffff] 0x5ffb0000 bytes, Dumped: 0x5ffb0000 | ||
240 | |||
241 | NOTE: Please refer to Documentation/filesystems/debugfs.txt on | ||
242 | how to mount the debugfs filesystem. | ||
243 | |||
244 | |||
245 | TODO: | ||
246 | ----- | ||
247 | o Need to come up with the better approach to find out more | ||
248 | accurate boot memory size that is required for a kernel to | ||
249 | boot successfully when booted with restricted memory. | ||
250 | o The fadump implementation introduces a fadump crash info structure | ||
251 | in the scratch area before the ELF core header. The idea of introducing | ||
252 | this structure is to pass some important crash info data to the second | ||
253 | kernel which will help second kernel to populate ELF core header with | ||
254 | correct data before it gets exported through /proc/vmcore. The current | ||
255 | design implementation does not address a possibility of introducing | ||
256 | additional fields (in future) to this structure without affecting | ||
257 | compatibility. Need to come up with the better approach to address this. | ||
258 | The possible approaches are: | ||
259 | 1. Introduce version field for version tracking, bump up the version | ||
260 | whenever a new field is added to the structure in future. The version | ||
261 | field can be used to find out what fields are valid for the current | ||
262 | version of the structure. | ||
263 | 2. Reserve the area of predefined size (say PAGE_SIZE) for this | ||
264 | structure and have unused area as reserved (initialized to zero) | ||
265 | for future field additions. | ||
266 | The advantage of approach 1 over 2 is we don't need to reserve extra space. | ||
267 | --- | ||
268 | Author: Mahesh Salgaonkar <mahesh@linux.vnet.ibm.com> | ||
269 | This document is based on the original documentation written for phyp | ||
270 | assisted dump by Linas Vepstas and Manish Ahuja. | ||
diff --git a/Documentation/powerpc/mpc52xx.txt b/Documentation/powerpc/mpc52xx.txt index 10dd4ab93b85..0d540a31ea1a 100644 --- a/Documentation/powerpc/mpc52xx.txt +++ b/Documentation/powerpc/mpc52xx.txt | |||
@@ -2,7 +2,7 @@ Linux 2.6.x on MPC52xx family | |||
2 | ----------------------------- | 2 | ----------------------------- |
3 | 3 | ||
4 | For the latest info, go to http://www.246tNt.com/mpc52xx/ | 4 | For the latest info, go to http://www.246tNt.com/mpc52xx/ |
5 | 5 | ||
6 | To compile/use : | 6 | To compile/use : |
7 | 7 | ||
8 | - U-Boot: | 8 | - U-Boot: |
@@ -10,23 +10,23 @@ To compile/use : | |||
10 | if you wish to ). | 10 | if you wish to ). |
11 | # make lite5200_defconfig | 11 | # make lite5200_defconfig |
12 | # make uImage | 12 | # make uImage |
13 | 13 | ||
14 | then, on U-boot: | 14 | then, on U-boot: |
15 | => tftpboot 200000 uImage | 15 | => tftpboot 200000 uImage |
16 | => tftpboot 400000 pRamdisk | 16 | => tftpboot 400000 pRamdisk |
17 | => bootm 200000 400000 | 17 | => bootm 200000 400000 |
18 | 18 | ||
19 | - DBug: | 19 | - DBug: |
20 | # <edit Makefile to set ARCH=ppc & CROSS_COMPILE=... ( also EXTRAVERSION | 20 | # <edit Makefile to set ARCH=ppc & CROSS_COMPILE=... ( also EXTRAVERSION |
21 | if you wish to ). | 21 | if you wish to ). |
22 | # make lite5200_defconfig | 22 | # make lite5200_defconfig |
23 | # cp your_initrd.gz arch/ppc/boot/images/ramdisk.image.gz | 23 | # cp your_initrd.gz arch/ppc/boot/images/ramdisk.image.gz |
24 | # make zImage.initrd | 24 | # make zImage.initrd |
25 | # make | 25 | # make |
26 | 26 | ||
27 | then in DBug: | 27 | then in DBug: |
28 | DBug> dn -i zImage.initrd.lite5200 | 28 | DBug> dn -i zImage.initrd.lite5200 |
29 | 29 | ||
30 | 30 | ||
31 | Some remarks : | 31 | Some remarks : |
32 | - The port is named mpc52xxx, and config options are PPC_MPC52xx. The MGT5100 | 32 | - The port is named mpc52xxx, and config options are PPC_MPC52xx. The MGT5100 |
diff --git a/Documentation/powerpc/phyp-assisted-dump.txt b/Documentation/powerpc/phyp-assisted-dump.txt deleted file mode 100644 index ad340205d96a..000000000000 --- a/Documentation/powerpc/phyp-assisted-dump.txt +++ /dev/null | |||
@@ -1,127 +0,0 @@ | |||
1 | |||
2 | Hypervisor-Assisted Dump | ||
3 | ------------------------ | ||
4 | November 2007 | ||
5 | |||
6 | The goal of hypervisor-assisted dump is to enable the dump of | ||
7 | a crashed system, and to do so from a fully-reset system, and | ||
8 | to minimize the total elapsed time until the system is back | ||
9 | in production use. | ||
10 | |||
11 | As compared to kdump or other strategies, hypervisor-assisted | ||
12 | dump offers several strong, practical advantages: | ||
13 | |||
14 | -- Unlike kdump, the system has been reset, and loaded | ||
15 | with a fresh copy of the kernel. In particular, | ||
16 | PCI and I/O devices have been reinitialized and are | ||
17 | in a clean, consistent state. | ||
18 | -- As the dump is performed, the dumped memory becomes | ||
19 | immediately available to the system for normal use. | ||
20 | -- After the dump is completed, no further reboots are | ||
21 | required; the system will be fully usable, and running | ||
22 | in its normal, production mode on its normal kernel. | ||
23 | |||
24 | The above can only be accomplished by coordination with, | ||
25 | and assistance from the hypervisor. The procedure is | ||
26 | as follows: | ||
27 | |||
28 | -- When a system crashes, the hypervisor will save | ||
29 | the low 256MB of RAM to a previously registered | ||
30 | save region. It will also save system state, system | ||
31 | registers, and hardware PTE's. | ||
32 | |||
33 | -- After the low 256MB area has been saved, the | ||
34 | hypervisor will reset PCI and other hardware state. | ||
35 | It will *not* clear RAM. It will then launch the | ||
36 | bootloader, as normal. | ||
37 | |||
38 | -- The freshly booted kernel will notice that there | ||
39 | is a new node (ibm,dump-kernel) in the device tree, | ||
40 | indicating that there is crash data available from | ||
41 | a previous boot. It will boot into only 256MB of RAM, | ||
42 | reserving the rest of system memory. | ||
43 | |||
44 | -- Userspace tools will parse /sys/kernel/release_region | ||
45 | and read /proc/vmcore to obtain the contents of memory, | ||
46 | which holds the previous crashed kernel. The userspace | ||
47 | tools may copy this info to disk, or network, nas, san, | ||
48 | iscsi, etc. as desired. | ||
49 | |||
50 | For Example: the values in /sys/kernel/release-region | ||
51 | would look something like this (address-range pairs). | ||
52 | CPU:0x177fee000-0x10000: HPTE:0x177ffe020-0x1000: / | ||
53 | DUMP:0x177fff020-0x10000000, 0x10000000-0x16F1D370A | ||
54 | |||
55 | -- As the userspace tools complete saving a portion of | ||
56 | dump, they echo an offset and size to | ||
57 | /sys/kernel/release_region to release the reserved | ||
58 | memory back to general use. | ||
59 | |||
60 | An example of this is: | ||
61 | "echo 0x40000000 0x10000000 > /sys/kernel/release_region" | ||
62 | which will release 256MB at the 1GB boundary. | ||
63 | |||
64 | Please note that the hypervisor-assisted dump feature | ||
65 | is only available on Power6-based systems with recent | ||
66 | firmware versions. | ||
67 | |||
68 | Implementation details: | ||
69 | ---------------------- | ||
70 | |||
71 | During boot, a check is made to see if firmware supports | ||
72 | this feature on this particular machine. If it does, then | ||
73 | we check to see if a active dump is waiting for us. If yes | ||
74 | then everything but 256 MB of RAM is reserved during early | ||
75 | boot. This area is released once we collect a dump from user | ||
76 | land scripts that are run. If there is dump data, then | ||
77 | the /sys/kernel/release_region file is created, and | ||
78 | the reserved memory is held. | ||
79 | |||
80 | If there is no waiting dump data, then only the highest | ||
81 | 256MB of the ram is reserved as a scratch area. This area | ||
82 | is *not* released: this region will be kept permanently | ||
83 | reserved, so that it can act as a receptacle for a copy | ||
84 | of the low 256MB in the case a crash does occur. See, | ||
85 | however, "open issues" below, as to whether | ||
86 | such a reserved region is really needed. | ||
87 | |||
88 | Currently the dump will be copied from /proc/vmcore to a | ||
89 | a new file upon user intervention. The starting address | ||
90 | to be read and the range for each data point in provided | ||
91 | in /sys/kernel/release_region. | ||
92 | |||
93 | The tools to examine the dump will be same as the ones | ||
94 | used for kdump. | ||
95 | |||
96 | General notes: | ||
97 | -------------- | ||
98 | Security: please note that there are potential security issues | ||
99 | with any sort of dump mechanism. In particular, plaintext | ||
100 | (unencrypted) data, and possibly passwords, may be present in | ||
101 | the dump data. Userspace tools must take adequate precautions to | ||
102 | preserve security. | ||
103 | |||
104 | Open issues/ToDo: | ||
105 | ------------ | ||
106 | o The various code paths that tell the hypervisor that a crash | ||
107 | occurred, vs. it simply being a normal reboot, should be | ||
108 | reviewed, and possibly clarified/fixed. | ||
109 | |||
110 | o Instead of using /sys/kernel, should there be a /sys/dump | ||
111 | instead? There is a dump_subsys being created by the s390 code, | ||
112 | perhaps the pseries code should use a similar layout as well. | ||
113 | |||
114 | o Is reserving a 256MB region really required? The goal of | ||
115 | reserving a 256MB scratch area is to make sure that no | ||
116 | important crash data is clobbered when the hypervisor | ||
117 | save low mem to the scratch area. But, if one could assure | ||
118 | that nothing important is located in some 256MB area, then | ||
119 | it would not need to be reserved. Something that can be | ||
120 | improved in subsequent versions. | ||
121 | |||
122 | o Still working the kdump team to integrate this with kdump, | ||
123 | some work remains but this would not affect the current | ||
124 | patches. | ||
125 | |||
126 | o Still need to write a shell script, to copy the dump away. | ||
127 | Currently I am parsing it manually. | ||
diff --git a/Documentation/remoteproc.txt b/Documentation/remoteproc.txt new file mode 100644 index 000000000000..70a048cd3fa3 --- /dev/null +++ b/Documentation/remoteproc.txt | |||
@@ -0,0 +1,322 @@ | |||
1 | Remote Processor Framework | ||
2 | |||
3 | 1. Introduction | ||
4 | |||
5 | Modern SoCs typically have heterogeneous remote processor devices in asymmetric | ||
6 | multiprocessing (AMP) configurations, which may be running different instances | ||
7 | of operating system, whether it's Linux or any other flavor of real-time OS. | ||
8 | |||
9 | OMAP4, for example, has dual Cortex-A9, dual Cortex-M3 and a C64x+ DSP. | ||
10 | In a typical configuration, the dual cortex-A9 is running Linux in a SMP | ||
11 | configuration, and each of the other three cores (two M3 cores and a DSP) | ||
12 | is running its own instance of RTOS in an AMP configuration. | ||
13 | |||
14 | The remoteproc framework allows different platforms/architectures to | ||
15 | control (power on, load firmware, power off) those remote processors while | ||
16 | abstracting the hardware differences, so the entire driver doesn't need to be | ||
17 | duplicated. In addition, this framework also adds rpmsg virtio devices | ||
18 | for remote processors that supports this kind of communication. This way, | ||
19 | platform-specific remoteproc drivers only need to provide a few low-level | ||
20 | handlers, and then all rpmsg drivers will then just work | ||
21 | (for more information about the virtio-based rpmsg bus and its drivers, | ||
22 | please read Documentation/rpmsg.txt). | ||
23 | Registration of other types of virtio devices is now also possible. Firmwares | ||
24 | just need to publish what kind of virtio devices do they support, and then | ||
25 | remoteproc will add those devices. This makes it possible to reuse the | ||
26 | existing virtio drivers with remote processor backends at a minimal development | ||
27 | cost. | ||
28 | |||
29 | 2. User API | ||
30 | |||
31 | int rproc_boot(struct rproc *rproc) | ||
32 | - Boot a remote processor (i.e. load its firmware, power it on, ...). | ||
33 | If the remote processor is already powered on, this function immediately | ||
34 | returns (successfully). | ||
35 | Returns 0 on success, and an appropriate error value otherwise. | ||
36 | Note: to use this function you should already have a valid rproc | ||
37 | handle. There are several ways to achieve that cleanly (devres, pdata, | ||
38 | the way remoteproc_rpmsg.c does this, or, if this becomes prevalent, we | ||
39 | might also consider using dev_archdata for this). See also | ||
40 | rproc_get_by_name() below. | ||
41 | |||
42 | void rproc_shutdown(struct rproc *rproc) | ||
43 | - Power off a remote processor (previously booted with rproc_boot()). | ||
44 | In case @rproc is still being used by an additional user(s), then | ||
45 | this function will just decrement the power refcount and exit, | ||
46 | without really powering off the device. | ||
47 | Every call to rproc_boot() must (eventually) be accompanied by a call | ||
48 | to rproc_shutdown(). Calling rproc_shutdown() redundantly is a bug. | ||
49 | Notes: | ||
50 | - we're not decrementing the rproc's refcount, only the power refcount. | ||
51 | which means that the @rproc handle stays valid even after | ||
52 | rproc_shutdown() returns, and users can still use it with a subsequent | ||
53 | rproc_boot(), if needed. | ||
54 | - don't call rproc_shutdown() to unroll rproc_get_by_name(), exactly | ||
55 | because rproc_shutdown() _does not_ decrement the refcount of @rproc. | ||
56 | To decrement the refcount of @rproc, use rproc_put() (but _only_ if | ||
57 | you acquired @rproc using rproc_get_by_name()). | ||
58 | |||
59 | struct rproc *rproc_get_by_name(const char *name) | ||
60 | - Find an rproc handle using the remote processor's name, and then | ||
61 | boot it. If it's already powered on, then just immediately return | ||
62 | (successfully). Returns the rproc handle on success, and NULL on failure. | ||
63 | This function increments the remote processor's refcount, so always | ||
64 | use rproc_put() to decrement it back once rproc isn't needed anymore. | ||
65 | Note: currently rproc_get_by_name() and rproc_put() are not used anymore | ||
66 | by the rpmsg bus and its drivers. We need to scrutinize the use cases | ||
67 | that still need them, and see if we can migrate them to use the non | ||
68 | name-based boot/shutdown interface. | ||
69 | |||
70 | void rproc_put(struct rproc *rproc) | ||
71 | - Decrement @rproc's power refcount and shut it down if it reaches zero | ||
72 | (essentially by just calling rproc_shutdown), and then decrement @rproc's | ||
73 | validity refcount too. | ||
74 | After this function returns, @rproc may _not_ be used anymore, and its | ||
75 | handle should be considered invalid. | ||
76 | This function should be called _iff_ the @rproc handle was grabbed by | ||
77 | calling rproc_get_by_name(). | ||
78 | |||
79 | 3. Typical usage | ||
80 | |||
81 | #include <linux/remoteproc.h> | ||
82 | |||
83 | /* in case we were given a valid 'rproc' handle */ | ||
84 | int dummy_rproc_example(struct rproc *my_rproc) | ||
85 | { | ||
86 | int ret; | ||
87 | |||
88 | /* let's power on and boot our remote processor */ | ||
89 | ret = rproc_boot(my_rproc); | ||
90 | if (ret) { | ||
91 | /* | ||
92 | * something went wrong. handle it and leave. | ||
93 | */ | ||
94 | } | ||
95 | |||
96 | /* | ||
97 | * our remote processor is now powered on... give it some work | ||
98 | */ | ||
99 | |||
100 | /* let's shut it down now */ | ||
101 | rproc_shutdown(my_rproc); | ||
102 | } | ||
103 | |||
104 | 4. API for implementors | ||
105 | |||
106 | struct rproc *rproc_alloc(struct device *dev, const char *name, | ||
107 | const struct rproc_ops *ops, | ||
108 | const char *firmware, int len) | ||
109 | - Allocate a new remote processor handle, but don't register | ||
110 | it yet. Required parameters are the underlying device, the | ||
111 | name of this remote processor, platform-specific ops handlers, | ||
112 | the name of the firmware to boot this rproc with, and the | ||
113 | length of private data needed by the allocating rproc driver (in bytes). | ||
114 | |||
115 | This function should be used by rproc implementations during | ||
116 | initialization of the remote processor. | ||
117 | After creating an rproc handle using this function, and when ready, | ||
118 | implementations should then call rproc_register() to complete | ||
119 | the registration of the remote processor. | ||
120 | On success, the new rproc is returned, and on failure, NULL. | ||
121 | |||
122 | Note: _never_ directly deallocate @rproc, even if it was not registered | ||
123 | yet. Instead, if you just need to unroll rproc_alloc(), use rproc_free(). | ||
124 | |||
125 | void rproc_free(struct rproc *rproc) | ||
126 | - Free an rproc handle that was allocated by rproc_alloc. | ||
127 | This function should _only_ be used if @rproc was only allocated, | ||
128 | but not registered yet. | ||
129 | If @rproc was already successfully registered (by calling | ||
130 | rproc_register()), then use rproc_unregister() instead. | ||
131 | |||
132 | int rproc_register(struct rproc *rproc) | ||
133 | - Register @rproc with the remoteproc framework, after it has been | ||
134 | allocated with rproc_alloc(). | ||
135 | This is called by the platform-specific rproc implementation, whenever | ||
136 | a new remote processor device is probed. | ||
137 | Returns 0 on success and an appropriate error code otherwise. | ||
138 | Note: this function initiates an asynchronous firmware loading | ||
139 | context, which will look for virtio devices supported by the rproc's | ||
140 | firmware. | ||
141 | If found, those virtio devices will be created and added, so as a result | ||
142 | of registering this remote processor, additional virtio drivers might get | ||
143 | probed. | ||
144 | |||
145 | int rproc_unregister(struct rproc *rproc) | ||
146 | - Unregister a remote processor, and decrement its refcount. | ||
147 | If its refcount drops to zero, then @rproc will be freed. If not, | ||
148 | it will be freed later once the last reference is dropped. | ||
149 | |||
150 | This function should be called when the platform specific rproc | ||
151 | implementation decides to remove the rproc device. it should | ||
152 | _only_ be called if a previous invocation of rproc_register() | ||
153 | has completed successfully. | ||
154 | |||
155 | After rproc_unregister() returns, @rproc is _not_ valid anymore and | ||
156 | it shouldn't be used. More specifically, don't call rproc_free() | ||
157 | or try to directly free @rproc after rproc_unregister() returns; | ||
158 | none of these are needed, and calling them is a bug. | ||
159 | |||
160 | Returns 0 on success and -EINVAL if @rproc isn't valid. | ||
161 | |||
162 | 5. Implementation callbacks | ||
163 | |||
164 | These callbacks should be provided by platform-specific remoteproc | ||
165 | drivers: | ||
166 | |||
167 | /** | ||
168 | * struct rproc_ops - platform-specific device handlers | ||
169 | * @start: power on the device and boot it | ||
170 | * @stop: power off the device | ||
171 | * @kick: kick a virtqueue (virtqueue id given as a parameter) | ||
172 | */ | ||
173 | struct rproc_ops { | ||
174 | int (*start)(struct rproc *rproc); | ||
175 | int (*stop)(struct rproc *rproc); | ||
176 | void (*kick)(struct rproc *rproc, int vqid); | ||
177 | }; | ||
178 | |||
179 | Every remoteproc implementation should at least provide the ->start and ->stop | ||
180 | handlers. If rpmsg/virtio functionality is also desired, then the ->kick handler | ||
181 | should be provided as well. | ||
182 | |||
183 | The ->start() handler takes an rproc handle and should then power on the | ||
184 | device and boot it (use rproc->priv to access platform-specific private data). | ||
185 | The boot address, in case needed, can be found in rproc->bootaddr (remoteproc | ||
186 | core puts there the ELF entry point). | ||
187 | On success, 0 should be returned, and on failure, an appropriate error code. | ||
188 | |||
189 | The ->stop() handler takes an rproc handle and powers the device down. | ||
190 | On success, 0 is returned, and on failure, an appropriate error code. | ||
191 | |||
192 | The ->kick() handler takes an rproc handle, and an index of a virtqueue | ||
193 | where new message was placed in. Implementations should interrupt the remote | ||
194 | processor and let it know it has pending messages. Notifying remote processors | ||
195 | the exact virtqueue index to look in is optional: it is easy (and not | ||
196 | too expensive) to go through the existing virtqueues and look for new buffers | ||
197 | in the used rings. | ||
198 | |||
199 | 6. Binary Firmware Structure | ||
200 | |||
201 | At this point remoteproc only supports ELF32 firmware binaries. However, | ||
202 | it is quite expected that other platforms/devices which we'd want to | ||
203 | support with this framework will be based on different binary formats. | ||
204 | |||
205 | When those use cases show up, we will have to decouple the binary format | ||
206 | from the framework core, so we can support several binary formats without | ||
207 | duplicating common code. | ||
208 | |||
209 | When the firmware is parsed, its various segments are loaded to memory | ||
210 | according to the specified device address (might be a physical address | ||
211 | if the remote processor is accessing memory directly). | ||
212 | |||
213 | In addition to the standard ELF segments, most remote processors would | ||
214 | also include a special section which we call "the resource table". | ||
215 | |||
216 | The resource table contains system resources that the remote processor | ||
217 | requires before it should be powered on, such as allocation of physically | ||
218 | contiguous memory, or iommu mapping of certain on-chip peripherals. | ||
219 | Remotecore will only power up the device after all the resource table's | ||
220 | requirement are met. | ||
221 | |||
222 | In addition to system resources, the resource table may also contain | ||
223 | resource entries that publish the existence of supported features | ||
224 | or configurations by the remote processor, such as trace buffers and | ||
225 | supported virtio devices (and their configurations). | ||
226 | |||
227 | The resource table begins with this header: | ||
228 | |||
229 | /** | ||
230 | * struct resource_table - firmware resource table header | ||
231 | * @ver: version number | ||
232 | * @num: number of resource entries | ||
233 | * @reserved: reserved (must be zero) | ||
234 | * @offset: array of offsets pointing at the various resource entries | ||
235 | * | ||
236 | * The header of the resource table, as expressed by this structure, | ||
237 | * contains a version number (should we need to change this format in the | ||
238 | * future), the number of available resource entries, and their offsets | ||
239 | * in the table. | ||
240 | */ | ||
241 | struct resource_table { | ||
242 | u32 ver; | ||
243 | u32 num; | ||
244 | u32 reserved[2]; | ||
245 | u32 offset[0]; | ||
246 | } __packed; | ||
247 | |||
248 | Immediately following this header are the resource entries themselves, | ||
249 | each of which begins with the following resource entry header: | ||
250 | |||
251 | /** | ||
252 | * struct fw_rsc_hdr - firmware resource entry header | ||
253 | * @type: resource type | ||
254 | * @data: resource data | ||
255 | * | ||
256 | * Every resource entry begins with a 'struct fw_rsc_hdr' header providing | ||
257 | * its @type. The content of the entry itself will immediately follow | ||
258 | * this header, and it should be parsed according to the resource type. | ||
259 | */ | ||
260 | struct fw_rsc_hdr { | ||
261 | u32 type; | ||
262 | u8 data[0]; | ||
263 | } __packed; | ||
264 | |||
265 | Some resources entries are mere announcements, where the host is informed | ||
266 | of specific remoteproc configuration. Other entries require the host to | ||
267 | do something (e.g. allocate a system resource). Sometimes a negotiation | ||
268 | is expected, where the firmware requests a resource, and once allocated, | ||
269 | the host should provide back its details (e.g. address of an allocated | ||
270 | memory region). | ||
271 | |||
272 | Here are the various resource types that are currently supported: | ||
273 | |||
274 | /** | ||
275 | * enum fw_resource_type - types of resource entries | ||
276 | * | ||
277 | * @RSC_CARVEOUT: request for allocation of a physically contiguous | ||
278 | * memory region. | ||
279 | * @RSC_DEVMEM: request to iommu_map a memory-based peripheral. | ||
280 | * @RSC_TRACE: announces the availability of a trace buffer into which | ||
281 | * the remote processor will be writing logs. | ||
282 | * @RSC_VDEV: declare support for a virtio device, and serve as its | ||
283 | * virtio header. | ||
284 | * @RSC_LAST: just keep this one at the end | ||
285 | * | ||
286 | * Please note that these values are used as indices to the rproc_handle_rsc | ||
287 | * lookup table, so please keep them sane. Moreover, @RSC_LAST is used to | ||
288 | * check the validity of an index before the lookup table is accessed, so | ||
289 | * please update it as needed. | ||
290 | */ | ||
291 | enum fw_resource_type { | ||
292 | RSC_CARVEOUT = 0, | ||
293 | RSC_DEVMEM = 1, | ||
294 | RSC_TRACE = 2, | ||
295 | RSC_VDEV = 3, | ||
296 | RSC_LAST = 4, | ||
297 | }; | ||
298 | |||
299 | For more details regarding a specific resource type, please see its | ||
300 | dedicated structure in include/linux/remoteproc.h. | ||
301 | |||
302 | We also expect that platform-specific resource entries will show up | ||
303 | at some point. When that happens, we could easily add a new RSC_PLATFORM | ||
304 | type, and hand those resources to the platform-specific rproc driver to handle. | ||
305 | |||
306 | 7. Virtio and remoteproc | ||
307 | |||
308 | The firmware should provide remoteproc information about virtio devices | ||
309 | that it supports, and their configurations: a RSC_VDEV resource entry | ||
310 | should specify the virtio device id (as in virtio_ids.h), virtio features, | ||
311 | virtio config space, vrings information, etc. | ||
312 | |||
313 | When a new remote processor is registered, the remoteproc framework | ||
314 | will look for its resource table and will register the virtio devices | ||
315 | it supports. A firmware may support any number of virtio devices, and | ||
316 | of any type (a single remote processor can also easily support several | ||
317 | rpmsg virtio devices this way, if desired). | ||
318 | |||
319 | Of course, RSC_VDEV resource entries are only good enough for static | ||
320 | allocation of virtio devices. Dynamic allocations will also be made possible | ||
321 | using the rpmsg bus (similar to how we already do dynamic allocations of | ||
322 | rpmsg channels; read more about it in rpmsg.txt). | ||
diff --git a/Documentation/rpmsg.txt b/Documentation/rpmsg.txt new file mode 100644 index 000000000000..409d9f964c5b --- /dev/null +++ b/Documentation/rpmsg.txt | |||
@@ -0,0 +1,293 @@ | |||
1 | Remote Processor Messaging (rpmsg) Framework | ||
2 | |||
3 | Note: this document describes the rpmsg bus and how to write rpmsg drivers. | ||
4 | To learn how to add rpmsg support for new platforms, check out remoteproc.txt | ||
5 | (also a resident of Documentation/). | ||
6 | |||
7 | 1. Introduction | ||
8 | |||
9 | Modern SoCs typically employ heterogeneous remote processor devices in | ||
10 | asymmetric multiprocessing (AMP) configurations, which may be running | ||
11 | different instances of operating system, whether it's Linux or any other | ||
12 | flavor of real-time OS. | ||
13 | |||
14 | OMAP4, for example, has dual Cortex-A9, dual Cortex-M3 and a C64x+ DSP. | ||
15 | Typically, the dual cortex-A9 is running Linux in a SMP configuration, | ||
16 | and each of the other three cores (two M3 cores and a DSP) is running | ||
17 | its own instance of RTOS in an AMP configuration. | ||
18 | |||
19 | Typically AMP remote processors employ dedicated DSP codecs and multimedia | ||
20 | hardware accelerators, and therefore are often used to offload CPU-intensive | ||
21 | multimedia tasks from the main application processor. | ||
22 | |||
23 | These remote processors could also be used to control latency-sensitive | ||
24 | sensors, drive random hardware blocks, or just perform background tasks | ||
25 | while the main CPU is idling. | ||
26 | |||
27 | Users of those remote processors can either be userland apps (e.g. multimedia | ||
28 | frameworks talking with remote OMX components) or kernel drivers (controlling | ||
29 | hardware accessible only by the remote processor, reserving kernel-controlled | ||
30 | resources on behalf of the remote processor, etc..). | ||
31 | |||
32 | Rpmsg is a virtio-based messaging bus that allows kernel drivers to communicate | ||
33 | with remote processors available on the system. In turn, drivers could then | ||
34 | expose appropriate user space interfaces, if needed. | ||
35 | |||
36 | When writing a driver that exposes rpmsg communication to userland, please | ||
37 | keep in mind that remote processors might have direct access to the | ||
38 | system's physical memory and other sensitive hardware resources (e.g. on | ||
39 | OMAP4, remote cores and hardware accelerators may have direct access to the | ||
40 | physical memory, gpio banks, dma controllers, i2c bus, gptimers, mailbox | ||
41 | devices, hwspinlocks, etc..). Moreover, those remote processors might be | ||
42 | running RTOS where every task can access the entire memory/devices exposed | ||
43 | to the processor. To minimize the risks of rogue (or buggy) userland code | ||
44 | exploiting remote bugs, and by that taking over the system, it is often | ||
45 | desired to limit userland to specific rpmsg channels (see definition below) | ||
46 | it can send messages on, and if possible, minimize how much control | ||
47 | it has over the content of the messages. | ||
48 | |||
49 | Every rpmsg device is a communication channel with a remote processor (thus | ||
50 | rpmsg devices are called channels). Channels are identified by a textual name | ||
51 | and have a local ("source") rpmsg address, and remote ("destination") rpmsg | ||
52 | address. | ||
53 | |||
54 | When a driver starts listening on a channel, its rx callback is bound with | ||
55 | a unique rpmsg local address (a 32-bit integer). This way when inbound messages | ||
56 | arrive, the rpmsg core dispatches them to the appropriate driver according | ||
57 | to their destination address (this is done by invoking the driver's rx handler | ||
58 | with the payload of the inbound message). | ||
59 | |||
60 | |||
61 | 2. User API | ||
62 | |||
63 | int rpmsg_send(struct rpmsg_channel *rpdev, void *data, int len); | ||
64 | - sends a message across to the remote processor on a given channel. | ||
65 | The caller should specify the channel, the data it wants to send, | ||
66 | and its length (in bytes). The message will be sent on the specified | ||
67 | channel, i.e. its source and destination address fields will be | ||
68 | set to the channel's src and dst addresses. | ||
69 | |||
70 | In case there are no TX buffers available, the function will block until | ||
71 | one becomes available (i.e. until the remote processor consumes | ||
72 | a tx buffer and puts it back on virtio's used descriptor ring), | ||
73 | or a timeout of 15 seconds elapses. When the latter happens, | ||
74 | -ERESTARTSYS is returned. | ||
75 | The function can only be called from a process context (for now). | ||
76 | Returns 0 on success and an appropriate error value on failure. | ||
77 | |||
78 | int rpmsg_sendto(struct rpmsg_channel *rpdev, void *data, int len, u32 dst); | ||
79 | - sends a message across to the remote processor on a given channel, | ||
80 | to a destination address provided by the caller. | ||
81 | The caller should specify the channel, the data it wants to send, | ||
82 | its length (in bytes), and an explicit destination address. | ||
83 | The message will then be sent to the remote processor to which the | ||
84 | channel belongs, using the channel's src address, and the user-provided | ||
85 | dst address (thus the channel's dst address will be ignored). | ||
86 | |||
87 | In case there are no TX buffers available, the function will block until | ||
88 | one becomes available (i.e. until the remote processor consumes | ||
89 | a tx buffer and puts it back on virtio's used descriptor ring), | ||
90 | or a timeout of 15 seconds elapses. When the latter happens, | ||
91 | -ERESTARTSYS is returned. | ||
92 | The function can only be called from a process context (for now). | ||
93 | Returns 0 on success and an appropriate error value on failure. | ||
94 | |||
95 | int rpmsg_send_offchannel(struct rpmsg_channel *rpdev, u32 src, u32 dst, | ||
96 | void *data, int len); | ||
97 | - sends a message across to the remote processor, using the src and dst | ||
98 | addresses provided by the user. | ||
99 | The caller should specify the channel, the data it wants to send, | ||
100 | its length (in bytes), and explicit source and destination addresses. | ||
101 | The message will then be sent to the remote processor to which the | ||
102 | channel belongs, but the channel's src and dst addresses will be | ||
103 | ignored (and the user-provided addresses will be used instead). | ||
104 | |||
105 | In case there are no TX buffers available, the function will block until | ||
106 | one becomes available (i.e. until the remote processor consumes | ||
107 | a tx buffer and puts it back on virtio's used descriptor ring), | ||
108 | or a timeout of 15 seconds elapses. When the latter happens, | ||
109 | -ERESTARTSYS is returned. | ||
110 | The function can only be called from a process context (for now). | ||
111 | Returns 0 on success and an appropriate error value on failure. | ||
112 | |||
113 | int rpmsg_trysend(struct rpmsg_channel *rpdev, void *data, int len); | ||
114 | - sends a message across to the remote processor on a given channel. | ||
115 | The caller should specify the channel, the data it wants to send, | ||
116 | and its length (in bytes). The message will be sent on the specified | ||
117 | channel, i.e. its source and destination address fields will be | ||
118 | set to the channel's src and dst addresses. | ||
119 | |||
120 | In case there are no TX buffers available, the function will immediately | ||
121 | return -ENOMEM without waiting until one becomes available. | ||
122 | The function can only be called from a process context (for now). | ||
123 | Returns 0 on success and an appropriate error value on failure. | ||
124 | |||
125 | int rpmsg_trysendto(struct rpmsg_channel *rpdev, void *data, int len, u32 dst) | ||
126 | - sends a message across to the remote processor on a given channel, | ||
127 | to a destination address provided by the user. | ||
128 | The user should specify the channel, the data it wants to send, | ||
129 | its length (in bytes), and an explicit destination address. | ||
130 | The message will then be sent to the remote processor to which the | ||
131 | channel belongs, using the channel's src address, and the user-provided | ||
132 | dst address (thus the channel's dst address will be ignored). | ||
133 | |||
134 | In case there are no TX buffers available, the function will immediately | ||
135 | return -ENOMEM without waiting until one becomes available. | ||
136 | The function can only be called from a process context (for now). | ||
137 | Returns 0 on success and an appropriate error value on failure. | ||
138 | |||
139 | int rpmsg_trysend_offchannel(struct rpmsg_channel *rpdev, u32 src, u32 dst, | ||
140 | void *data, int len); | ||
141 | - sends a message across to the remote processor, using source and | ||
142 | destination addresses provided by the user. | ||
143 | The user should specify the channel, the data it wants to send, | ||
144 | its length (in bytes), and explicit source and destination addresses. | ||
145 | The message will then be sent to the remote processor to which the | ||
146 | channel belongs, but the channel's src and dst addresses will be | ||
147 | ignored (and the user-provided addresses will be used instead). | ||
148 | |||
149 | In case there are no TX buffers available, the function will immediately | ||
150 | return -ENOMEM without waiting until one becomes available. | ||
151 | The function can only be called from a process context (for now). | ||
152 | Returns 0 on success and an appropriate error value on failure. | ||
153 | |||
154 | struct rpmsg_endpoint *rpmsg_create_ept(struct rpmsg_channel *rpdev, | ||
155 | void (*cb)(struct rpmsg_channel *, void *, int, void *, u32), | ||
156 | void *priv, u32 addr); | ||
157 | - every rpmsg address in the system is bound to an rx callback (so when | ||
158 | inbound messages arrive, they are dispatched by the rpmsg bus using the | ||
159 | appropriate callback handler) by means of an rpmsg_endpoint struct. | ||
160 | |||
161 | This function allows drivers to create such an endpoint, and by that, | ||
162 | bind a callback, and possibly some private data too, to an rpmsg address | ||
163 | (either one that is known in advance, or one that will be dynamically | ||
164 | assigned for them). | ||
165 | |||
166 | Simple rpmsg drivers need not call rpmsg_create_ept, because an endpoint | ||
167 | is already created for them when they are probed by the rpmsg bus | ||
168 | (using the rx callback they provide when they registered to the rpmsg bus). | ||
169 | |||
170 | So things should just work for simple drivers: they already have an | ||
171 | endpoint, their rx callback is bound to their rpmsg address, and when | ||
172 | relevant inbound messages arrive (i.e. messages which their dst address | ||
173 | equals to the src address of their rpmsg channel), the driver's handler | ||
174 | is invoked to process it. | ||
175 | |||
176 | That said, more complicated drivers might do need to allocate | ||
177 | additional rpmsg addresses, and bind them to different rx callbacks. | ||
178 | To accomplish that, those drivers need to call this function. | ||
179 | Drivers should provide their channel (so the new endpoint would bind | ||
180 | to the same remote processor their channel belongs to), an rx callback | ||
181 | function, an optional private data (which is provided back when the | ||
182 | rx callback is invoked), and an address they want to bind with the | ||
183 | callback. If addr is RPMSG_ADDR_ANY, then rpmsg_create_ept will | ||
184 | dynamically assign them an available rpmsg address (drivers should have | ||
185 | a very good reason why not to always use RPMSG_ADDR_ANY here). | ||
186 | |||
187 | Returns a pointer to the endpoint on success, or NULL on error. | ||
188 | |||
189 | void rpmsg_destroy_ept(struct rpmsg_endpoint *ept); | ||
190 | - destroys an existing rpmsg endpoint. user should provide a pointer | ||
191 | to an rpmsg endpoint that was previously created with rpmsg_create_ept(). | ||
192 | |||
193 | int register_rpmsg_driver(struct rpmsg_driver *rpdrv); | ||
194 | - registers an rpmsg driver with the rpmsg bus. user should provide | ||
195 | a pointer to an rpmsg_driver struct, which contains the driver's | ||
196 | ->probe() and ->remove() functions, an rx callback, and an id_table | ||
197 | specifying the names of the channels this driver is interested to | ||
198 | be probed with. | ||
199 | |||
200 | void unregister_rpmsg_driver(struct rpmsg_driver *rpdrv); | ||
201 | - unregisters an rpmsg driver from the rpmsg bus. user should provide | ||
202 | a pointer to a previously-registered rpmsg_driver struct. | ||
203 | Returns 0 on success, and an appropriate error value on failure. | ||
204 | |||
205 | |||
206 | 3. Typical usage | ||
207 | |||
208 | The following is a simple rpmsg driver, that sends an "hello!" message | ||
209 | on probe(), and whenever it receives an incoming message, it dumps its | ||
210 | content to the console. | ||
211 | |||
212 | #include <linux/kernel.h> | ||
213 | #include <linux/module.h> | ||
214 | #include <linux/rpmsg.h> | ||
215 | |||
216 | static void rpmsg_sample_cb(struct rpmsg_channel *rpdev, void *data, int len, | ||
217 | void *priv, u32 src) | ||
218 | { | ||
219 | print_hex_dump(KERN_INFO, "incoming message:", DUMP_PREFIX_NONE, | ||
220 | 16, 1, data, len, true); | ||
221 | } | ||
222 | |||
223 | static int rpmsg_sample_probe(struct rpmsg_channel *rpdev) | ||
224 | { | ||
225 | int err; | ||
226 | |||
227 | dev_info(&rpdev->dev, "chnl: 0x%x -> 0x%x\n", rpdev->src, rpdev->dst); | ||
228 | |||
229 | /* send a message on our channel */ | ||
230 | err = rpmsg_send(rpdev, "hello!", 6); | ||
231 | if (err) { | ||
232 | pr_err("rpmsg_send failed: %d\n", err); | ||
233 | return err; | ||
234 | } | ||
235 | |||
236 | return 0; | ||
237 | } | ||
238 | |||
239 | static void __devexit rpmsg_sample_remove(struct rpmsg_channel *rpdev) | ||
240 | { | ||
241 | dev_info(&rpdev->dev, "rpmsg sample client driver is removed\n"); | ||
242 | } | ||
243 | |||
244 | static struct rpmsg_device_id rpmsg_driver_sample_id_table[] = { | ||
245 | { .name = "rpmsg-client-sample" }, | ||
246 | { }, | ||
247 | }; | ||
248 | MODULE_DEVICE_TABLE(rpmsg, rpmsg_driver_sample_id_table); | ||
249 | |||
250 | static struct rpmsg_driver rpmsg_sample_client = { | ||
251 | .drv.name = KBUILD_MODNAME, | ||
252 | .drv.owner = THIS_MODULE, | ||
253 | .id_table = rpmsg_driver_sample_id_table, | ||
254 | .probe = rpmsg_sample_probe, | ||
255 | .callback = rpmsg_sample_cb, | ||
256 | .remove = __devexit_p(rpmsg_sample_remove), | ||
257 | }; | ||
258 | |||
259 | static int __init init(void) | ||
260 | { | ||
261 | return register_rpmsg_driver(&rpmsg_sample_client); | ||
262 | } | ||
263 | module_init(init); | ||
264 | |||
265 | static void __exit fini(void) | ||
266 | { | ||
267 | unregister_rpmsg_driver(&rpmsg_sample_client); | ||
268 | } | ||
269 | module_exit(fini); | ||
270 | |||
271 | Note: a similar sample which can be built and loaded can be found | ||
272 | in samples/rpmsg/. | ||
273 | |||
274 | 4. Allocations of rpmsg channels: | ||
275 | |||
276 | At this point we only support dynamic allocations of rpmsg channels. | ||
277 | |||
278 | This is possible only with remote processors that have the VIRTIO_RPMSG_F_NS | ||
279 | virtio device feature set. This feature bit means that the remote | ||
280 | processor supports dynamic name service announcement messages. | ||
281 | |||
282 | When this feature is enabled, creation of rpmsg devices (i.e. channels) | ||
283 | is completely dynamic: the remote processor announces the existence of a | ||
284 | remote rpmsg service by sending a name service message (which contains | ||
285 | the name and rpmsg addr of the remote service, see struct rpmsg_ns_msg). | ||
286 | |||
287 | This message is then handled by the rpmsg bus, which in turn dynamically | ||
288 | creates and registers an rpmsg channel (which represents the remote service). | ||
289 | If/when a relevant rpmsg driver is registered, it will be immediately probed | ||
290 | by the bus, and can then start sending messages to the remote service. | ||
291 | |||
292 | The plan is also to add static creation of rpmsg channels via the virtio | ||
293 | config space, but it's not implemented yet. | ||
diff --git a/Documentation/s390/3270.txt b/Documentation/s390/3270.txt index 7a5c73a7ed7f..7c715de99774 100644 --- a/Documentation/s390/3270.txt +++ b/Documentation/s390/3270.txt | |||
@@ -47,9 +47,9 @@ including the console 3270, changes subchannel identifier relative to | |||
47 | one another. ReIPL as soon as possible after running the configuration | 47 | one another. ReIPL as soon as possible after running the configuration |
48 | script and the resulting /tmp/mkdev3270. | 48 | script and the resulting /tmp/mkdev3270. |
49 | 49 | ||
50 | If you have chosen to make tub3270 a module, you add a line to | 50 | If you have chosen to make tub3270 a module, you add a line to a |
51 | /etc/modprobe.conf. If you are working on a VM virtual machine, you | 51 | configuration file under /etc/modprobe.d/. If you are working on a VM |
52 | can use DEF GRAF to define virtual 3270 devices. | 52 | virtual machine, you can use DEF GRAF to define virtual 3270 devices. |
53 | 53 | ||
54 | You may generate both 3270 and 3215 console support, or one or the | 54 | You may generate both 3270 and 3215 console support, or one or the |
55 | other, or neither. If you generate both, the console type under VM is | 55 | other, or neither. If you generate both, the console type under VM is |
@@ -60,7 +60,7 @@ at boot time to a 3270 if it is a 3215. | |||
60 | 60 | ||
61 | In brief, these are the steps: | 61 | In brief, these are the steps: |
62 | 1. Install the tub3270 patch | 62 | 1. Install the tub3270 patch |
63 | 2. (If a module) add a line to /etc/modprobe.conf | 63 | 2. (If a module) add a line to a file in /etc/modprobe.d/*.conf |
64 | 3. (If VM) define devices with DEF GRAF | 64 | 3. (If VM) define devices with DEF GRAF |
65 | 4. Reboot | 65 | 4. Reboot |
66 | 5. Configure | 66 | 5. Configure |
@@ -84,13 +84,12 @@ Here are the installation steps in detail: | |||
84 | make modules_install | 84 | make modules_install |
85 | 85 | ||
86 | 2. (Perform this step only if you have configured tub3270 as a | 86 | 2. (Perform this step only if you have configured tub3270 as a |
87 | module.) Add a line to /etc/modprobe.conf to automatically | 87 | module.) Add a line to a file /etc/modprobe.d/*.conf to automatically |
88 | load the driver when it's needed. With this line added, | 88 | load the driver when it's needed. With this line added, you will see |
89 | you will see login prompts appear on your 3270s as soon as | 89 | login prompts appear on your 3270s as soon as boot is complete (or |
90 | boot is complete (or with emulated 3270s, as soon as you dial | 90 | with emulated 3270s, as soon as you dial into your vm guest using the |
91 | into your vm guest using the command "DIAL <vmguestname>"). | 91 | command "DIAL <vmguestname>"). Since the line-mode major number is |
92 | Since the line-mode major number is 227, the line to add to | 92 | 227, the line to add should be: |
93 | /etc/modprobe.conf should be: | ||
94 | alias char-major-227 tub3270 | 93 | alias char-major-227 tub3270 |
95 | 94 | ||
96 | 3. Define graphic devices to your vm guest machine, if you | 95 | 3. Define graphic devices to your vm guest machine, if you |
diff --git a/Documentation/scheduler/sched-stats.txt b/Documentation/scheduler/sched-stats.txt index 1cd5d51bc761..8259b34a66ae 100644 --- a/Documentation/scheduler/sched-stats.txt +++ b/Documentation/scheduler/sched-stats.txt | |||
@@ -38,7 +38,8 @@ First field is a sched_yield() statistic: | |||
38 | 1) # of times sched_yield() was called | 38 | 1) # of times sched_yield() was called |
39 | 39 | ||
40 | Next three are schedule() statistics: | 40 | Next three are schedule() statistics: |
41 | 2) # of times we switched to the expired queue and reused it | 41 | 2) This field is a legacy array expiration count field used in the O(1) |
42 | scheduler. We kept it for ABI compatibility, but it is always set to zero. | ||
42 | 3) # of times schedule() was called | 43 | 3) # of times schedule() was called |
43 | 4) # of times schedule() left the processor idle | 44 | 4) # of times schedule() left the processor idle |
44 | 45 | ||
diff --git a/Documentation/scsi/00-INDEX b/Documentation/scsi/00-INDEX index b48ded55b555..b7dd6502bec5 100644 --- a/Documentation/scsi/00-INDEX +++ b/Documentation/scsi/00-INDEX | |||
@@ -94,3 +94,5 @@ sym53c8xx_2.txt | |||
94 | - info on second generation driver for sym53c8xx based adapters | 94 | - info on second generation driver for sym53c8xx based adapters |
95 | tmscsim.txt | 95 | tmscsim.txt |
96 | - info on driver for AM53c974 based adapters | 96 | - info on driver for AM53c974 based adapters |
97 | ufs.txt | ||
98 | - info on Universal Flash Storage(UFS) and UFS host controller driver. | ||
diff --git a/Documentation/scsi/LICENSE.qla2xxx b/Documentation/scsi/LICENSE.qla2xxx index 19e7cd4bba66..ce0fdf349a81 100644 --- a/Documentation/scsi/LICENSE.qla2xxx +++ b/Documentation/scsi/LICENSE.qla2xxx | |||
@@ -1,48 +1,11 @@ | |||
1 | Copyright (c) 2003-2011 QLogic Corporation | 1 | Copyright (c) 2003-2011 QLogic Corporation |
2 | QLogic Linux/ESX Fibre Channel HBA Driver | 2 | QLogic Linux FC-FCoE Driver |
3 | 3 | ||
4 | This program includes a device driver for Linux 2.6/ESX that may be | 4 | This program includes a device driver for Linux 3.x. |
5 | distributed with QLogic hardware specific firmware binary file. | ||
6 | You may modify and redistribute the device driver code under the | 5 | You may modify and redistribute the device driver code under the |
7 | GNU General Public License (a copy of which is attached hereto as | 6 | GNU General Public License (a copy of which is attached hereto as |
8 | Exhibit A) published by the Free Software Foundation (version 2). | 7 | Exhibit A) published by the Free Software Foundation (version 2). |
9 | 8 | ||
10 | You may redistribute the hardware specific firmware binary file | ||
11 | under the following terms: | ||
12 | |||
13 | 1. Redistribution of source code (only if applicable), | ||
14 | must retain the above copyright notice, this list of | ||
15 | conditions and the following disclaimer. | ||
16 | |||
17 | 2. Redistribution in binary form must reproduce the above | ||
18 | copyright notice, this list of conditions and the | ||
19 | following disclaimer in the documentation and/or other | ||
20 | materials provided with the distribution. | ||
21 | |||
22 | 3. The name of QLogic Corporation may not be used to | ||
23 | endorse or promote products derived from this software | ||
24 | without specific prior written permission | ||
25 | |||
26 | REGARDLESS OF WHAT LICENSING MECHANISM IS USED OR APPLICABLE, | ||
27 | THIS PROGRAM IS PROVIDED BY QLOGIC CORPORATION "AS IS'' AND ANY | ||
28 | EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
29 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A | ||
30 | PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR | ||
31 | BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, | ||
32 | EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED | ||
33 | TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | ||
34 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON | ||
35 | ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, | ||
36 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||
37 | OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | ||
38 | POSSIBILITY OF SUCH DAMAGE. | ||
39 | |||
40 | USER ACKNOWLEDGES AND AGREES THAT USE OF THIS PROGRAM WILL NOT | ||
41 | CREATE OR GIVE GROUNDS FOR A LICENSE BY IMPLICATION, ESTOPPEL, OR | ||
42 | OTHERWISE IN ANY INTELLECTUAL PROPERTY RIGHTS (PATENT, COPYRIGHT, | ||
43 | TRADE SECRET, MASK WORK, OR OTHER PROPRIETARY RIGHT) EMBODIED IN | ||
44 | ANY OTHER QLOGIC HARDWARE OR SOFTWARE EITHER SOLELY OR IN | ||
45 | COMBINATION WITH THIS PROGRAM. | ||
46 | 9 | ||
47 | 10 | ||
48 | EXHIBIT A | 11 | EXHIBIT A |
diff --git a/Documentation/scsi/aic79xx.txt b/Documentation/scsi/aic79xx.txt index 64ac7093c872..e2d3273000d4 100644 --- a/Documentation/scsi/aic79xx.txt +++ b/Documentation/scsi/aic79xx.txt | |||
@@ -215,7 +215,7 @@ The following information is available in this file: | |||
215 | INCORRECTLY CAN RENDER YOUR SYSTEM INOPERABLE. | 215 | INCORRECTLY CAN RENDER YOUR SYSTEM INOPERABLE. |
216 | USE THEM WITH CAUTION. | 216 | USE THEM WITH CAUTION. |
217 | 217 | ||
218 | Edit the file "modprobe.conf" in the directory /etc and add/edit a | 218 | Put a .conf file in the /etc/modprobe.d/ directory and add/edit a |
219 | line containing 'options aic79xx aic79xx=[command[,command...]]' where | 219 | line containing 'options aic79xx aic79xx=[command[,command...]]' where |
220 | 'command' is one or more of the following: | 220 | 'command' is one or more of the following: |
221 | ----------------------------------------------------------------- | 221 | ----------------------------------------------------------------- |
diff --git a/Documentation/scsi/aic7xxx.txt b/Documentation/scsi/aic7xxx.txt index 18f8d1905e6a..7c5d0223d444 100644 --- a/Documentation/scsi/aic7xxx.txt +++ b/Documentation/scsi/aic7xxx.txt | |||
@@ -190,7 +190,7 @@ The following information is available in this file: | |||
190 | INCORRECTLY CAN RENDER YOUR SYSTEM INOPERABLE. | 190 | INCORRECTLY CAN RENDER YOUR SYSTEM INOPERABLE. |
191 | USE THEM WITH CAUTION. | 191 | USE THEM WITH CAUTION. |
192 | 192 | ||
193 | Edit the file "modprobe.conf" in the directory /etc and add/edit a | 193 | Put a .conf file in the /etc/modprobe.d directory and add/edit a |
194 | line containing 'options aic7xxx aic7xxx=[command[,command...]]' where | 194 | line containing 'options aic7xxx aic7xxx=[command[,command...]]' where |
195 | 'command' is one or more of the following: | 195 | 'command' is one or more of the following: |
196 | ----------------------------------------------------------------- | 196 | ----------------------------------------------------------------- |
diff --git a/Documentation/scsi/bfa.txt b/Documentation/scsi/bfa.txt new file mode 100644 index 000000000000..f2d6e9d1791e --- /dev/null +++ b/Documentation/scsi/bfa.txt | |||
@@ -0,0 +1,82 @@ | |||
1 | Linux driver for Brocade FC/FCOE adapters | ||
2 | |||
3 | |||
4 | Supported Hardware | ||
5 | ------------------ | ||
6 | |||
7 | bfa 3.0.2.2 driver supports all Brocade FC/FCOE adapters. Below is a list of | ||
8 | adapter models with corresponding PCIIDs. | ||
9 | |||
10 | PCIID Model | ||
11 | |||
12 | 1657:0013:1657:0014 425 4Gbps dual port FC HBA | ||
13 | 1657:0013:1657:0014 825 8Gbps PCIe dual port FC HBA | ||
14 | 1657:0013:103c:1742 HP 82B 8Gbps PCIedual port FC HBA | ||
15 | 1657:0013:103c:1744 HP 42B 4Gbps dual port FC HBA | ||
16 | 1657:0017:1657:0014 415 4Gbps single port FC HBA | ||
17 | 1657:0017:1657:0014 815 8Gbps single port FC HBA | ||
18 | 1657:0017:103c:1741 HP 41B 4Gbps single port FC HBA | ||
19 | 1657:0017:103c 1743 HP 81B 8Gbps single port FC HBA | ||
20 | 1657:0021:103c:1779 804 8Gbps FC HBA for HP Bladesystem c-class | ||
21 | |||
22 | 1657:0014:1657:0014 1010 10Gbps single port CNA - FCOE | ||
23 | 1657:0014:1657:0014 1020 10Gbps dual port CNA - FCOE | ||
24 | 1657:0014:1657:0014 1007 10Gbps dual port CNA - FCOE | ||
25 | 1657:0014:1657:0014 1741 10Gbps dual port CNA - FCOE | ||
26 | |||
27 | 1657:0022:1657:0024 1860 16Gbps FC HBA | ||
28 | 1657:0022:1657:0022 1860 10Gbps CNA - FCOE | ||
29 | |||
30 | |||
31 | Firmware download | ||
32 | ----------------- | ||
33 | |||
34 | The latest Firmware package for 3.0.2.2 bfa driver can be found at: | ||
35 | |||
36 | http://www.brocade.com/services-support/drivers-downloads/adapters/Linux.page | ||
37 | |||
38 | and then click following respective util package link: | ||
39 | |||
40 | Version Link | ||
41 | |||
42 | v3.0.0.0 Linux Adapter Firmware package for RHEL 6.2, SLES 11SP2 | ||
43 | |||
44 | |||
45 | Configuration & Management utility download | ||
46 | ------------------------------------------- | ||
47 | |||
48 | The latest driver configuration & management utility for 3.0.2.2 bfa driver can | ||
49 | be found at: | ||
50 | |||
51 | http://www.brocade.com/services-support/drivers-downloads/adapters/Linux.page | ||
52 | |||
53 | and then click following respective util pacakge link | ||
54 | |||
55 | Version Link | ||
56 | |||
57 | v3.0.2.0 Linux Adapter Firmware package for RHEL 6.2, SLES 11SP2 | ||
58 | |||
59 | |||
60 | Documentation | ||
61 | ------------- | ||
62 | |||
63 | The latest Administration's Guide, Installation and Reference Manual, | ||
64 | Troubleshooting Guide, and Release Notes for the corresponding out-of-box | ||
65 | driver can be found at: | ||
66 | |||
67 | http://www.brocade.com/services-support/drivers-downloads/adapters/Linux.page | ||
68 | |||
69 | and use the following inbox and out-of-box driver version mapping to find | ||
70 | the corresponding documentation: | ||
71 | |||
72 | Inbox Version Out-of-box Version | ||
73 | |||
74 | v3.0.2.2 v3.0.0.0 | ||
75 | |||
76 | |||
77 | Support | ||
78 | ------- | ||
79 | |||
80 | For general product and support info, go to the Brocade website at: | ||
81 | |||
82 | http://www.brocade.com/services-support/index.page | ||
diff --git a/Documentation/scsi/libsas.txt b/Documentation/scsi/libsas.txt index aa54f54c4a50..3cc9c7843e15 100644 --- a/Documentation/scsi/libsas.txt +++ b/Documentation/scsi/libsas.txt | |||
@@ -398,21 +398,6 @@ struct sas_task { | |||
398 | task_done -- callback when the task has finished execution | 398 | task_done -- callback when the task has finished execution |
399 | }; | 399 | }; |
400 | 400 | ||
401 | When an external entity, entity other than the LLDD or the | ||
402 | SAS Layer, wants to work with a struct domain_device, it | ||
403 | _must_ call kobject_get() when getting a handle on the | ||
404 | device and kobject_put() when it is done with the device. | ||
405 | |||
406 | This does two things: | ||
407 | A) implements proper kfree() for the device; | ||
408 | B) increments/decrements the kref for all players: | ||
409 | domain_device | ||
410 | all domain_device's ... (if past an expander) | ||
411 | port | ||
412 | host adapter | ||
413 | pci device | ||
414 | and up the ladder, etc. | ||
415 | |||
416 | DISCOVERY | 401 | DISCOVERY |
417 | --------- | 402 | --------- |
418 | 403 | ||
diff --git a/Documentation/scsi/osst.txt b/Documentation/scsi/osst.txt index ad86c6d1e898..00c8ebb2fd18 100644 --- a/Documentation/scsi/osst.txt +++ b/Documentation/scsi/osst.txt | |||
@@ -66,7 +66,7 @@ recognized. | |||
66 | If you want to have the module autoloaded on access to /dev/osst, you may | 66 | If you want to have the module autoloaded on access to /dev/osst, you may |
67 | add something like | 67 | add something like |
68 | alias char-major-206 osst | 68 | alias char-major-206 osst |
69 | to your /etc/modprobe.conf (before 2.6: modules.conf). | 69 | to a file under /etc/modprobe.d/ directory. |
70 | 70 | ||
71 | You may find it convenient to create a symbolic link | 71 | You may find it convenient to create a symbolic link |
72 | ln -s nosst0 /dev/tape | 72 | ln -s nosst0 /dev/tape |
diff --git a/Documentation/scsi/st.txt b/Documentation/scsi/st.txt index 691ca292c24d..685bf3582abe 100644 --- a/Documentation/scsi/st.txt +++ b/Documentation/scsi/st.txt | |||
@@ -390,6 +390,10 @@ MTSETDRVBUFFER | |||
390 | MT_ST_SYSV sets the SYSV semantics (mode) | 390 | MT_ST_SYSV sets the SYSV semantics (mode) |
391 | MT_ST_NOWAIT enables immediate mode (i.e., don't wait for | 391 | MT_ST_NOWAIT enables immediate mode (i.e., don't wait for |
392 | the command to finish) for some commands (e.g., rewind) | 392 | the command to finish) for some commands (e.g., rewind) |
393 | MT_ST_NOWAIT_EOF enables immediate filemark mode (i.e. when | ||
394 | writing a filemark, don't wait for it to complete). Please | ||
395 | see the BASICS note about MTWEOFI with respect to the | ||
396 | possible dangers of writing immediate filemarks. | ||
393 | MT_ST_SILI enables setting the SILI bit in SCSI commands when | 397 | MT_ST_SILI enables setting the SILI bit in SCSI commands when |
394 | reading in variable block mode to enhance performance when | 398 | reading in variable block mode to enhance performance when |
395 | reading blocks shorter than the byte count; set this only | 399 | reading blocks shorter than the byte count; set this only |
diff --git a/Documentation/scsi/ufs.txt b/Documentation/scsi/ufs.txt new file mode 100644 index 000000000000..41a6164592aa --- /dev/null +++ b/Documentation/scsi/ufs.txt | |||
@@ -0,0 +1,133 @@ | |||
1 | Universal Flash Storage | ||
2 | ======================= | ||
3 | |||
4 | |||
5 | Contents | ||
6 | -------- | ||
7 | |||
8 | 1. Overview | ||
9 | 2. UFS Architecture Overview | ||
10 | 2.1 Application Layer | ||
11 | 2.2 UFS Transport Protocol(UTP) layer | ||
12 | 2.3 UFS Interconnect(UIC) Layer | ||
13 | 3. UFSHCD Overview | ||
14 | 3.1 UFS controller initialization | ||
15 | 3.2 UTP Transfer requests | ||
16 | 3.3 UFS error handling | ||
17 | 3.4 SCSI Error handling | ||
18 | |||
19 | |||
20 | 1. Overview | ||
21 | ----------- | ||
22 | |||
23 | Universal Flash Storage(UFS) is a storage specification for flash devices. | ||
24 | It is aimed to provide a universal storage interface for both | ||
25 | embedded and removable flash memory based storage in mobile | ||
26 | devices such as smart phones and tablet computers. The specification | ||
27 | is defined by JEDEC Solid State Technology Association. UFS is based | ||
28 | on MIPI M-PHY physical layer standard. UFS uses MIPI M-PHY as the | ||
29 | physical layer and MIPI Unipro as the link layer. | ||
30 | |||
31 | The main goals of UFS is to provide, | ||
32 | * Optimized performance: | ||
33 | For UFS version 1.0 and 1.1 the target performance is as follows, | ||
34 | Support for Gear1 is mandatory (rate A: 1248Mbps, rate B: 1457.6Mbps) | ||
35 | Support for Gear2 is optional (rate A: 2496Mbps, rate B: 2915.2Mbps) | ||
36 | Future version of the standard, | ||
37 | Gear3 (rate A: 4992Mbps, rate B: 5830.4Mbps) | ||
38 | * Low power consumption | ||
39 | * High random IOPs and low latency | ||
40 | |||
41 | |||
42 | 2. UFS Architecture Overview | ||
43 | ---------------------------- | ||
44 | |||
45 | UFS has a layered communication architecture which is based on SCSI | ||
46 | SAM-5 architectural model. | ||
47 | |||
48 | UFS communication architecture consists of following layers, | ||
49 | |||
50 | 2.1 Application Layer | ||
51 | |||
52 | The Application layer is composed of UFS command set layer(UCS), | ||
53 | Task Manager and Device manager. The UFS interface is designed to be | ||
54 | protocol agnostic, however SCSI has been selected as a baseline | ||
55 | protocol for versions 1.0 and 1.1 of UFS protocol layer. | ||
56 | UFS supports subset of SCSI commands defined by SPC-4 and SBC-3. | ||
57 | * UCS: It handles SCSI commands supported by UFS specification. | ||
58 | * Task manager: It handles task management functions defined by the | ||
59 | UFS which are meant for command queue control. | ||
60 | * Device manager: It handles device level operations and device | ||
61 | configuration operations. Device level operations mainly involve | ||
62 | device power management operations and commands to Interconnect | ||
63 | layers. Device level configurations involve handling of query | ||
64 | requests which are used to modify and retrieve configuration | ||
65 | information of the device. | ||
66 | |||
67 | 2.2 UFS Transport Protocol(UTP) layer | ||
68 | |||
69 | UTP layer provides services for | ||
70 | the higher layers through Service Access Points. UTP defines 3 | ||
71 | service access points for higher layers. | ||
72 | * UDM_SAP: Device manager service access point is exposed to device | ||
73 | manager for device level operations. These device level operations | ||
74 | are done through query requests. | ||
75 | * UTP_CMD_SAP: Command service access point is exposed to UFS command | ||
76 | set layer(UCS) to transport commands. | ||
77 | * UTP_TM_SAP: Task management service access point is exposed to task | ||
78 | manager to transport task management functions. | ||
79 | UTP transports messages through UFS protocol information unit(UPIU). | ||
80 | |||
81 | 2.3 UFS Interconnect(UIC) Layer | ||
82 | |||
83 | UIC is the lowest layer of UFS layered architecture. It handles | ||
84 | connection between UFS host and UFS device. UIC consists of | ||
85 | MIPI UniPro and MIPI M-PHY. UIC provides 2 service access points | ||
86 | to upper layer, | ||
87 | * UIC_SAP: To transport UPIU between UFS host and UFS device. | ||
88 | * UIO_SAP: To issue commands to Unipro layers. | ||
89 | |||
90 | |||
91 | 3. UFSHCD Overview | ||
92 | ------------------ | ||
93 | |||
94 | The UFS host controller driver is based on Linux SCSI Framework. | ||
95 | UFSHCD is a low level device driver which acts as an interface between | ||
96 | SCSI Midlayer and PCIe based UFS host controllers. | ||
97 | |||
98 | The current UFSHCD implementation supports following functionality, | ||
99 | |||
100 | 3.1 UFS controller initialization | ||
101 | |||
102 | The initialization module brings UFS host controller to active state | ||
103 | and prepares the controller to transfer commands/response between | ||
104 | UFSHCD and UFS device. | ||
105 | |||
106 | 3.2 UTP Transfer requests | ||
107 | |||
108 | Transfer request handling module of UFSHCD receives SCSI commands | ||
109 | from SCSI Midlayer, forms UPIUs and issues the UPIUs to UFS Host | ||
110 | controller. Also, the module decodes, responses received from UFS | ||
111 | host controller in the form of UPIUs and intimates the SCSI Midlayer | ||
112 | of the status of the command. | ||
113 | |||
114 | 3.3 UFS error handling | ||
115 | |||
116 | Error handling module handles Host controller fatal errors, | ||
117 | Device fatal errors and UIC interconnect layer related errors. | ||
118 | |||
119 | 3.4 SCSI Error handling | ||
120 | |||
121 | This is done through UFSHCD SCSI error handling routines registered | ||
122 | with SCSI Midlayer. Examples of some of the error handling commands | ||
123 | issues by SCSI Midlayer are Abort task, Lun reset and host reset. | ||
124 | UFSHCD Routines to perform these tasks are registered with | ||
125 | SCSI Midlayer through .eh_abort_handler, .eh_device_reset_handler and | ||
126 | .eh_host_reset_handler. | ||
127 | |||
128 | In this version of UFSHCD Query requests and power management | ||
129 | functionality are not implemented. | ||
130 | |||
131 | UFS Specifications can be found at, | ||
132 | UFS - http://www.jedec.org/sites/default/files/docs/JESD220.pdf | ||
133 | UFSHCI - http://www.jedec.org/sites/default/files/docs/JESD223.pdf | ||
diff --git a/Documentation/security/00-INDEX b/Documentation/security/00-INDEX index 99b85d39751c..eeed1de546d4 100644 --- a/Documentation/security/00-INDEX +++ b/Documentation/security/00-INDEX | |||
@@ -6,6 +6,8 @@ SELinux.txt | |||
6 | - how to get started with the SELinux security enhancement. | 6 | - how to get started with the SELinux security enhancement. |
7 | Smack.txt | 7 | Smack.txt |
8 | - documentation on the Smack Linux Security Module. | 8 | - documentation on the Smack Linux Security Module. |
9 | Yama.txt | ||
10 | - documentation on the Yama Linux Security Module. | ||
9 | apparmor.txt | 11 | apparmor.txt |
10 | - documentation on the AppArmor security extension. | 12 | - documentation on the AppArmor security extension. |
11 | credentials.txt | 13 | credentials.txt |
diff --git a/Documentation/security/Yama.txt b/Documentation/security/Yama.txt new file mode 100644 index 000000000000..a9511f179069 --- /dev/null +++ b/Documentation/security/Yama.txt | |||
@@ -0,0 +1,65 @@ | |||
1 | Yama is a Linux Security Module that collects a number of system-wide DAC | ||
2 | security protections that are not handled by the core kernel itself. To | ||
3 | select it at boot time, specify "security=yama" (though this will disable | ||
4 | any other LSM). | ||
5 | |||
6 | Yama is controlled through sysctl in /proc/sys/kernel/yama: | ||
7 | |||
8 | - ptrace_scope | ||
9 | |||
10 | ============================================================== | ||
11 | |||
12 | ptrace_scope: | ||
13 | |||
14 | As Linux grows in popularity, it will become a larger target for | ||
15 | malware. One particularly troubling weakness of the Linux process | ||
16 | interfaces is that a single user is able to examine the memory and | ||
17 | running state of any of their processes. For example, if one application | ||
18 | (e.g. Pidgin) was compromised, it would be possible for an attacker to | ||
19 | attach to other running processes (e.g. Firefox, SSH sessions, GPG agent, | ||
20 | etc) to extract additional credentials and continue to expand the scope | ||
21 | of their attack without resorting to user-assisted phishing. | ||
22 | |||
23 | This is not a theoretical problem. SSH session hijacking | ||
24 | (http://www.storm.net.nz/projects/7) and arbitrary code injection | ||
25 | (http://c-skills.blogspot.com/2007/05/injectso.html) attacks already | ||
26 | exist and remain possible if ptrace is allowed to operate as before. | ||
27 | Since ptrace is not commonly used by non-developers and non-admins, system | ||
28 | builders should be allowed the option to disable this debugging system. | ||
29 | |||
30 | For a solution, some applications use prctl(PR_SET_DUMPABLE, ...) to | ||
31 | specifically disallow such ptrace attachment (e.g. ssh-agent), but many | ||
32 | do not. A more general solution is to only allow ptrace directly from a | ||
33 | parent to a child process (i.e. direct "gdb EXE" and "strace EXE" still | ||
34 | work), or with CAP_SYS_PTRACE (i.e. "gdb --pid=PID", and "strace -p PID" | ||
35 | still work as root). | ||
36 | |||
37 | For software that has defined application-specific relationships | ||
38 | between a debugging process and its inferior (crash handlers, etc), | ||
39 | prctl(PR_SET_PTRACER, pid, ...) can be used. An inferior can declare which | ||
40 | other process (and its descendents) are allowed to call PTRACE_ATTACH | ||
41 | against it. Only one such declared debugging process can exists for | ||
42 | each inferior at a time. For example, this is used by KDE, Chromium, and | ||
43 | Firefox's crash handlers, and by Wine for allowing only Wine processes | ||
44 | to ptrace each other. If a process wishes to entirely disable these ptrace | ||
45 | restrictions, it can call prctl(PR_SET_PTRACER, PR_SET_PTRACER_ANY, ...) | ||
46 | so that any otherwise allowed process (even those in external pid namespaces) | ||
47 | may attach. | ||
48 | |||
49 | The sysctl settings are: | ||
50 | |||
51 | 0 - classic ptrace permissions: a process can PTRACE_ATTACH to any other | ||
52 | process running under the same uid, as long as it is dumpable (i.e. | ||
53 | did not transition uids, start privileged, or have called | ||
54 | prctl(PR_SET_DUMPABLE...) already). | ||
55 | |||
56 | 1 - restricted ptrace: a process must have a predefined relationship | ||
57 | with the inferior it wants to call PTRACE_ATTACH on. By default, | ||
58 | this relationship is that of only its descendants when the above | ||
59 | classic criteria is also met. To change the relationship, an | ||
60 | inferior can call prctl(PR_SET_PTRACER, debugger, ...) to declare | ||
61 | an allowed debugger PID to call PTRACE_ATTACH on the inferior. | ||
62 | |||
63 | The original children-only logic was based on the restrictions in grsecurity. | ||
64 | |||
65 | ============================================================== | ||
diff --git a/Documentation/security/keys.txt b/Documentation/security/keys.txt index fcbe7a703405..787717091421 100644 --- a/Documentation/security/keys.txt +++ b/Documentation/security/keys.txt | |||
@@ -554,6 +554,10 @@ The keyctl syscall functions are: | |||
554 | process must have write permission on the keyring, and it must be a | 554 | process must have write permission on the keyring, and it must be a |
555 | keyring (or else error ENOTDIR will result). | 555 | keyring (or else error ENOTDIR will result). |
556 | 556 | ||
557 | This function can also be used to clear special kernel keyrings if they | ||
558 | are appropriately marked if the user has CAP_SYS_ADMIN capability. The | ||
559 | DNS resolver cache keyring is an example of this. | ||
560 | |||
557 | 561 | ||
558 | (*) Link a key into a keyring: | 562 | (*) Link a key into a keyring: |
559 | 563 | ||
diff --git a/Documentation/serial/computone.txt b/Documentation/serial/computone.txt index 39ddcdbeeb85..a6a1158ea2ba 100644 --- a/Documentation/serial/computone.txt +++ b/Documentation/serial/computone.txt | |||
@@ -49,7 +49,7 @@ Hardware - If you have an ISA card, find a free interrupt and io port. | |||
49 | 49 | ||
50 | Note the hardware address from the Computone ISA cards installed into | 50 | Note the hardware address from the Computone ISA cards installed into |
51 | the system. These are required for editing ip2.c or editing | 51 | the system. These are required for editing ip2.c or editing |
52 | /etc/modprobe.conf, or for specification on the modprobe | 52 | /etc/modprobe.d/*.conf, or for specification on the modprobe |
53 | command line. | 53 | command line. |
54 | 54 | ||
55 | Note that the /etc/modules.conf should be used for older (pre-2.6) | 55 | Note that the /etc/modules.conf should be used for older (pre-2.6) |
@@ -66,7 +66,7 @@ b) Run "make config" or "make menuconfig" or "make xconfig" | |||
66 | c) Set address on ISA cards then: | 66 | c) Set address on ISA cards then: |
67 | edit /usr/src/linux/drivers/char/ip2.c if needed | 67 | edit /usr/src/linux/drivers/char/ip2.c if needed |
68 | or | 68 | or |
69 | edit /etc/modprobe.conf if needed (module). | 69 | edit config file in /etc/modprobe.d/ if needed (module). |
70 | or both to match this setting. | 70 | or both to match this setting. |
71 | d) Run "make modules" | 71 | d) Run "make modules" |
72 | e) Run "make modules_install" | 72 | e) Run "make modules_install" |
@@ -153,11 +153,11 @@ the irqs are not specified the driver uses the default in ip2.c (which | |||
153 | selects polled mode). If no base addresses are specified the defaults in | 153 | selects polled mode). If no base addresses are specified the defaults in |
154 | ip2.c are used. If you are autoloading the driver module with kerneld or | 154 | ip2.c are used. If you are autoloading the driver module with kerneld or |
155 | kmod the base addresses and interrupt number must also be set in ip2.c | 155 | kmod the base addresses and interrupt number must also be set in ip2.c |
156 | and recompile or just insert and options line in /etc/modprobe.conf or both. | 156 | and recompile or just insert and options line in /etc/modprobe.d/*.conf or both. |
157 | The options line is equivalent to the command line and takes precedence over | 157 | The options line is equivalent to the command line and takes precedence over |
158 | what is in ip2.c. | 158 | what is in ip2.c. |
159 | 159 | ||
160 | /etc/modprobe.conf sample: | 160 | config sample to put /etc/modprobe.d/*.conf: |
161 | options ip2 io=1,0x328 irq=1,10 | 161 | options ip2 io=1,0x328 irq=1,10 |
162 | alias char-major-71 ip2 | 162 | alias char-major-71 ip2 |
163 | alias char-major-72 ip2 | 163 | alias char-major-72 ip2 |
diff --git a/Documentation/serial/rocket.txt b/Documentation/serial/rocket.txt index 1d8582990435..60b039891057 100644 --- a/Documentation/serial/rocket.txt +++ b/Documentation/serial/rocket.txt | |||
@@ -62,7 +62,7 @@ in the system log at /var/log/messages. | |||
62 | 62 | ||
63 | If installed as a module, the module must be loaded. This can be done | 63 | If installed as a module, the module must be loaded. This can be done |
64 | manually by entering "modprobe rocket". To have the module loaded automatically | 64 | manually by entering "modprobe rocket". To have the module loaded automatically |
65 | upon system boot, edit the /etc/modprobe.conf file and add the line | 65 | upon system boot, edit a /etc/modprobe.d/*.conf file and add the line |
66 | "alias char-major-46 rocket". | 66 | "alias char-major-46 rocket". |
67 | 67 | ||
68 | In order to use the ports, their device names (nodes) must be created with mknod. | 68 | In order to use the ports, their device names (nodes) must be created with mknod. |
diff --git a/Documentation/serial/stallion.txt b/Documentation/serial/stallion.txt index 5c4902d9a5be..55090914a9c5 100644 --- a/Documentation/serial/stallion.txt +++ b/Documentation/serial/stallion.txt | |||
@@ -139,8 +139,8 @@ secondary address 0x280 and IRQ 10. | |||
139 | 139 | ||
140 | You will probably want to enter this module load and configuration information | 140 | You will probably want to enter this module load and configuration information |
141 | into your system startup scripts so that the drivers are loaded and configured | 141 | into your system startup scripts so that the drivers are loaded and configured |
142 | on each system boot. Typically the start up script would be something like | 142 | on each system boot. Typically configuration files are put in the |
143 | /etc/modprobe.conf. | 143 | /etc/modprobe.d/ directory. |
144 | 144 | ||
145 | 145 | ||
146 | 2.2 STATIC DRIVER CONFIGURATION: | 146 | 2.2 STATIC DRIVER CONFIGURATION: |
diff --git a/Documentation/sound/alsa/ALSA-Configuration.txt b/Documentation/sound/alsa/ALSA-Configuration.txt index 12e3a0fb9bec..8c16d50f6cb6 100644 --- a/Documentation/sound/alsa/ALSA-Configuration.txt +++ b/Documentation/sound/alsa/ALSA-Configuration.txt | |||
@@ -860,7 +860,8 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed. | |||
860 | 860 | ||
861 | [Multiple options for each card instance] | 861 | [Multiple options for each card instance] |
862 | model - force the model name | 862 | model - force the model name |
863 | position_fix - Fix DMA pointer (0 = auto, 1 = use LPIB, 2 = POSBUF) | 863 | position_fix - Fix DMA pointer (0 = auto, 1 = use LPIB, 2 = POSBUF, |
864 | 3 = VIACOMBO, 4 = COMBO) | ||
864 | probe_mask - Bitmask to probe codecs (default = -1, meaning all slots) | 865 | probe_mask - Bitmask to probe codecs (default = -1, meaning all slots) |
865 | When the bit 8 (0x100) is set, the lower 8 bits are used | 866 | When the bit 8 (0x100) is set, the lower 8 bits are used |
866 | as the "fixed" codec slots; i.e. the driver probes the | 867 | as the "fixed" codec slots; i.e. the driver probes the |
@@ -925,6 +926,11 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed. | |||
925 | (Usually SD_LPIB register is more accurate than the | 926 | (Usually SD_LPIB register is more accurate than the |
926 | position buffer.) | 927 | position buffer.) |
927 | 928 | ||
929 | position_fix=3 is specific to VIA devices. The position | ||
930 | of the capture stream is checked from both LPIB and POSBUF | ||
931 | values. position_fix=4 is a combination mode, using LPIB | ||
932 | for playback and POSBUF for capture. | ||
933 | |||
928 | NB: If you get many "azx_get_response timeout" messages at | 934 | NB: If you get many "azx_get_response timeout" messages at |
929 | loading, it's likely a problem of interrupts (e.g. ACPI irq | 935 | loading, it's likely a problem of interrupts (e.g. ACPI irq |
930 | routing). Try to boot with options like "pci=noacpi". Also, you | 936 | routing). Try to boot with options like "pci=noacpi". Also, you |
@@ -2038,7 +2044,7 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed. | |||
2038 | Install the necessary firmware files in alsa-firmware package. | 2044 | Install the necessary firmware files in alsa-firmware package. |
2039 | When no hotplug fw loader is available, you need to load the | 2045 | When no hotplug fw loader is available, you need to load the |
2040 | firmware via vxloader utility in alsa-tools package. To invoke | 2046 | firmware via vxloader utility in alsa-tools package. To invoke |
2041 | vxloader automatically, add the following to /etc/modprobe.conf | 2047 | vxloader automatically, add the following to /etc/modprobe.d/alsa.conf |
2042 | 2048 | ||
2043 | install snd-vx222 /sbin/modprobe --first-time -i snd-vx222 && /usr/bin/vxloader | 2049 | install snd-vx222 /sbin/modprobe --first-time -i snd-vx222 && /usr/bin/vxloader |
2044 | 2050 | ||
@@ -2162,10 +2168,10 @@ corresponds to the card index of ALSA. Usually, define this | |||
2162 | as the same card module. | 2168 | as the same card module. |
2163 | 2169 | ||
2164 | An example configuration for a single emu10k1 card is like below: | 2170 | An example configuration for a single emu10k1 card is like below: |
2165 | ----- /etc/modprobe.conf | 2171 | ----- /etc/modprobe.d/alsa.conf |
2166 | alias snd-card-0 snd-emu10k1 | 2172 | alias snd-card-0 snd-emu10k1 |
2167 | alias sound-slot-0 snd-emu10k1 | 2173 | alias sound-slot-0 snd-emu10k1 |
2168 | ----- /etc/modprobe.conf | 2174 | ----- /etc/modprobe.d/alsa.conf |
2169 | 2175 | ||
2170 | The available number of auto-loaded sound cards depends on the module | 2176 | The available number of auto-loaded sound cards depends on the module |
2171 | option "cards_limit" of snd module. As default it's set to 1. | 2177 | option "cards_limit" of snd module. As default it's set to 1. |
@@ -2178,7 +2184,7 @@ cards is kept consistent. | |||
2178 | 2184 | ||
2179 | An example configuration for two sound cards is like below: | 2185 | An example configuration for two sound cards is like below: |
2180 | 2186 | ||
2181 | ----- /etc/modprobe.conf | 2187 | ----- /etc/modprobe.d/alsa.conf |
2182 | # ALSA portion | 2188 | # ALSA portion |
2183 | options snd cards_limit=2 | 2189 | options snd cards_limit=2 |
2184 | alias snd-card-0 snd-interwave | 2190 | alias snd-card-0 snd-interwave |
@@ -2188,7 +2194,7 @@ options snd-ens1371 index=1 | |||
2188 | # OSS/Free portion | 2194 | # OSS/Free portion |
2189 | alias sound-slot-0 snd-interwave | 2195 | alias sound-slot-0 snd-interwave |
2190 | alias sound-slot-1 snd-ens1371 | 2196 | alias sound-slot-1 snd-ens1371 |
2191 | ----- /etc/modprobe.conf | 2197 | ----- /etc/modprobe.d/alsa.conf |
2192 | 2198 | ||
2193 | In this example, the interwave card is always loaded as the first card | 2199 | In this example, the interwave card is always loaded as the first card |
2194 | (index 0) and ens1371 as the second (index 1). | 2200 | (index 0) and ens1371 as the second (index 1). |
diff --git a/Documentation/sound/alsa/Audiophile-Usb.txt b/Documentation/sound/alsa/Audiophile-Usb.txt index a4c53d8961e1..654dd3b694a8 100644 --- a/Documentation/sound/alsa/Audiophile-Usb.txt +++ b/Documentation/sound/alsa/Audiophile-Usb.txt | |||
@@ -232,7 +232,7 @@ The parameter can be given: | |||
232 | # modprobe snd-usb-audio index=1 device_setup=0x09 | 232 | # modprobe snd-usb-audio index=1 device_setup=0x09 |
233 | 233 | ||
234 | * Or while configuring the modules options in your modules configuration file | 234 | * Or while configuring the modules options in your modules configuration file |
235 | - For Fedora distributions, edit the /etc/modprobe.conf file: | 235 | (tipically a .conf file in /etc/modprobe.d/ directory: |
236 | alias snd-card-1 snd-usb-audio | 236 | alias snd-card-1 snd-usb-audio |
237 | options snd-usb-audio index=1 device_setup=0x09 | 237 | options snd-usb-audio index=1 device_setup=0x09 |
238 | 238 | ||
@@ -253,7 +253,7 @@ CAUTION when initializing the device | |||
253 | - first turn off the device | 253 | - first turn off the device |
254 | - de-register the snd-usb-audio module (modprobe -r) | 254 | - de-register the snd-usb-audio module (modprobe -r) |
255 | - change the device_setup parameter by changing the device_setup | 255 | - change the device_setup parameter by changing the device_setup |
256 | option in /etc/modprobe.conf | 256 | option in /etc/modprobe.d/*.conf |
257 | - turn on the device | 257 | - turn on the device |
258 | * A workaround for this last issue has been applied to kernel 2.6.23, but it may not | 258 | * A workaround for this last issue has been applied to kernel 2.6.23, but it may not |
259 | be enough to ensure the 'stability' of the device initialization. | 259 | be enough to ensure the 'stability' of the device initialization. |
diff --git a/Documentation/sound/alsa/HD-Audio-Models.txt b/Documentation/sound/alsa/HD-Audio-Models.txt index c8c54544abc5..d97d992ced14 100644 --- a/Documentation/sound/alsa/HD-Audio-Models.txt +++ b/Documentation/sound/alsa/HD-Audio-Models.txt | |||
@@ -8,37 +8,10 @@ ALC880 | |||
8 | 5stack-digout 5-jack in back, 2-jack in front, a SPDIF out | 8 | 5stack-digout 5-jack in back, 2-jack in front, a SPDIF out |
9 | 6stack 6-jack in back, 2-jack in front | 9 | 6stack 6-jack in back, 2-jack in front |
10 | 6stack-digout 6-jack with a SPDIF out | 10 | 6stack-digout 6-jack with a SPDIF out |
11 | w810 3-jack | ||
12 | z71v 3-jack (HP shared SPDIF) | ||
13 | asus 3-jack (ASUS Mobo) | ||
14 | asus-w1v ASUS W1V | ||
15 | asus-dig ASUS with SPDIF out | ||
16 | asus-dig2 ASUS with SPDIF out (using GPIO2) | ||
17 | uniwill 3-jack | ||
18 | fujitsu Fujitsu Laptops (Pi1536) | ||
19 | F1734 2-jack | ||
20 | lg LG laptop (m1 express dual) | ||
21 | lg-lw LG LW20/LW25 laptop | ||
22 | tcl TCL S700 | ||
23 | clevo Clevo laptops (m520G, m665n) | ||
24 | medion Medion Rim 2150 | ||
25 | test for testing/debugging purpose, almost all controls can be | ||
26 | adjusted. Appearing only when compiled with | ||
27 | $CONFIG_SND_DEBUG=y | ||
28 | auto auto-config reading BIOS (default) | ||
29 | 11 | ||
30 | ALC260 | 12 | ALC260 |
31 | ====== | 13 | ====== |
32 | fujitsu Fujitsu S7020 | 14 | N/A |
33 | acer Acer TravelMate | ||
34 | will Will laptops (PB V7900) | ||
35 | replacer Replacer 672V | ||
36 | favorit100 Maxdata Favorit 100XS | ||
37 | basic fixed pin assignment (old default model) | ||
38 | test for testing/debugging purpose, almost all controls can | ||
39 | adjusted. Appearing only when compiled with | ||
40 | $CONFIG_SND_DEBUG=y | ||
41 | auto auto-config reading BIOS (default) | ||
42 | 15 | ||
43 | ALC262 | 16 | ALC262 |
44 | ====== | 17 | ====== |
@@ -70,55 +43,7 @@ ALC680 | |||
70 | 43 | ||
71 | ALC882/883/885/888/889 | 44 | ALC882/883/885/888/889 |
72 | ====================== | 45 | ====================== |
73 | 3stack-dig 3-jack with SPDIF I/O | 46 | N/A |
74 | 6stack-dig 6-jack digital with SPDIF I/O | ||
75 | arima Arima W820Di1 | ||
76 | targa Targa T8, MSI-1049 T8 | ||
77 | asus-a7j ASUS A7J | ||
78 | asus-a7m ASUS A7M | ||
79 | macpro MacPro support | ||
80 | mb5 Macbook 5,1 | ||
81 | macmini3 Macmini 3,1 | ||
82 | mba21 Macbook Air 2,1 | ||
83 | mbp3 Macbook Pro rev3 | ||
84 | imac24 iMac 24'' with jack detection | ||
85 | imac91 iMac 9,1 | ||
86 | w2jc ASUS W2JC | ||
87 | 3stack-2ch-dig 3-jack with SPDIF I/O (ALC883) | ||
88 | alc883-6stack-dig 6-jack digital with SPDIF I/O (ALC883) | ||
89 | 3stack-6ch 3-jack 6-channel | ||
90 | 3stack-6ch-dig 3-jack 6-channel with SPDIF I/O | ||
91 | 6stack-dig-demo 6-jack digital for Intel demo board | ||
92 | acer Acer laptops (Travelmate 3012WTMi, Aspire 5600, etc) | ||
93 | acer-aspire Acer Aspire 9810 | ||
94 | acer-aspire-4930g Acer Aspire 4930G | ||
95 | acer-aspire-6530g Acer Aspire 6530G | ||
96 | acer-aspire-7730g Acer Aspire 7730G | ||
97 | acer-aspire-8930g Acer Aspire 8930G | ||
98 | medion Medion Laptops | ||
99 | targa-dig Targa/MSI | ||
100 | targa-2ch-dig Targa/MSI with 2-channel | ||
101 | targa-8ch-dig Targa/MSI with 8-channel (MSI GX620) | ||
102 | laptop-eapd 3-jack with SPDIF I/O and EAPD (Clevo M540JE, M550JE) | ||
103 | lenovo-101e Lenovo 101E | ||
104 | lenovo-nb0763 Lenovo NB0763 | ||
105 | lenovo-ms7195-dig Lenovo MS7195 | ||
106 | lenovo-sky Lenovo Sky | ||
107 | haier-w66 Haier W66 | ||
108 | 3stack-hp HP machines with 3stack (Lucknow, Samba boards) | ||
109 | 6stack-dell Dell machines with 6stack (Inspiron 530) | ||
110 | mitac Mitac 8252D | ||
111 | clevo-m540r Clevo M540R (6ch + digital) | ||
112 | clevo-m720 Clevo M720 laptop series | ||
113 | fujitsu-pi2515 Fujitsu AMILO Pi2515 | ||
114 | fujitsu-xa3530 Fujitsu AMILO XA3530 | ||
115 | 3stack-6ch-intel Intel DG33* boards | ||
116 | intel-alc889a Intel IbexPeak with ALC889A | ||
117 | intel-x58 Intel DX58 with ALC889 | ||
118 | asus-p5q ASUS P5Q-EM boards | ||
119 | mb31 MacBook 3,1 | ||
120 | sony-vaio-tt Sony VAIO TT | ||
121 | auto auto-config reading BIOS (default) | ||
122 | 47 | ||
123 | ALC861/660 | 48 | ALC861/660 |
124 | ========== | 49 | ========== |
diff --git a/Documentation/sound/alsa/HD-Audio.txt b/Documentation/sound/alsa/HD-Audio.txt index 91fee3b45fb8..7813c06a5c71 100644 --- a/Documentation/sound/alsa/HD-Audio.txt +++ b/Documentation/sound/alsa/HD-Audio.txt | |||
@@ -59,7 +59,12 @@ a case, you can change the default method via `position_fix` option. | |||
59 | `position_fix=1` means to use LPIB method explicitly. | 59 | `position_fix=1` means to use LPIB method explicitly. |
60 | `position_fix=2` means to use the position-buffer. | 60 | `position_fix=2` means to use the position-buffer. |
61 | `position_fix=3` means to use a combination of both methods, needed | 61 | `position_fix=3` means to use a combination of both methods, needed |
62 | for some VIA and ATI controllers. 0 is the default value for all other | 62 | for some VIA controllers. The capture stream position is corrected |
63 | by comparing both LPIB and position-buffer values. | ||
64 | `position_fix=4` is another combination available for all controllers, | ||
65 | and uses LPIB for the playback and the position-buffer for the capture | ||
66 | streams. | ||
67 | 0 is the default value for all other | ||
63 | controllers, the automatic check and fallback to LPIB as described in | 68 | controllers, the automatic check and fallback to LPIB as described in |
64 | the above. If you get a problem of repeated sounds, this option might | 69 | the above. If you get a problem of repeated sounds, this option might |
65 | help. | 70 | help. |
diff --git a/Documentation/sound/alsa/MIXART.txt b/Documentation/sound/alsa/MIXART.txt index ef42c44fa1f2..4ee35b4fbe4a 100644 --- a/Documentation/sound/alsa/MIXART.txt +++ b/Documentation/sound/alsa/MIXART.txt | |||
@@ -76,9 +76,9 @@ FIRMWARE | |||
76 | when CONFIG_FW_LOADER is set. The mixartloader is necessary only | 76 | when CONFIG_FW_LOADER is set. The mixartloader is necessary only |
77 | for older versions or when you build the driver into kernel.] | 77 | for older versions or when you build the driver into kernel.] |
78 | 78 | ||
79 | For loading the firmware automatically after the module is loaded, use | 79 | For loading the firmware automatically after the module is loaded, use a |
80 | the post-install command. For example, add the following entry to | 80 | install command. For example, add the following entry to |
81 | /etc/modprobe.conf for miXart driver: | 81 | /etc/modprobe.d/mixart.conf for miXart driver: |
82 | 82 | ||
83 | install snd-mixart /sbin/modprobe --first-time -i snd-mixart && \ | 83 | install snd-mixart /sbin/modprobe --first-time -i snd-mixart && \ |
84 | /usr/bin/mixartloader | 84 | /usr/bin/mixartloader |
diff --git a/Documentation/sound/alsa/OSS-Emulation.txt b/Documentation/sound/alsa/OSS-Emulation.txt index 022aaeb0e9dd..152ca2a3f1bd 100644 --- a/Documentation/sound/alsa/OSS-Emulation.txt +++ b/Documentation/sound/alsa/OSS-Emulation.txt | |||
@@ -19,7 +19,7 @@ the card number and the minor unit number. Usually you don't have to | |||
19 | define these aliases by yourself. | 19 | define these aliases by yourself. |
20 | 20 | ||
21 | Only necessary step for auto-loading of OSS modules is to define the | 21 | Only necessary step for auto-loading of OSS modules is to define the |
22 | card alias in /etc/modprobe.conf, such as | 22 | card alias in /etc/modprobe.d/alsa.conf, such as |
23 | 23 | ||
24 | alias sound-slot-0 snd-emu10k1 | 24 | alias sound-slot-0 snd-emu10k1 |
25 | 25 | ||
diff --git a/Documentation/sound/oss/AudioExcelDSP16 b/Documentation/sound/oss/AudioExcelDSP16 index e0dc0641b480..ea8549faede9 100644 --- a/Documentation/sound/oss/AudioExcelDSP16 +++ b/Documentation/sound/oss/AudioExcelDSP16 | |||
@@ -41,7 +41,7 @@ mpu_base I/O base address for activate MPU-401 mode | |||
41 | (0x300, 0x310, 0x320 or 0x330) | 41 | (0x300, 0x310, 0x320 or 0x330) |
42 | mpu_irq MPU-401 irq line (5, 7, 9, 10 or 0) | 42 | mpu_irq MPU-401 irq line (5, 7, 9, 10 or 0) |
43 | 43 | ||
44 | The /etc/modprobe.conf will have lines like this: | 44 | A configuration file in /etc/modprobe.d/ directory will have lines like this: |
45 | 45 | ||
46 | options opl3 io=0x388 | 46 | options opl3 io=0x388 |
47 | options ad1848 io=0x530 irq=11 dma=3 | 47 | options ad1848 io=0x530 irq=11 dma=3 |
@@ -51,11 +51,11 @@ Where the aedsp16 options are the options for this driver while opl3 and | |||
51 | ad1848 are the corresponding options for the MSS and OPL3 modules. | 51 | ad1848 are the corresponding options for the MSS and OPL3 modules. |
52 | 52 | ||
53 | Loading MSS and OPL3 needs to pre load the aedsp16 module to set up correctly | 53 | Loading MSS and OPL3 needs to pre load the aedsp16 module to set up correctly |
54 | the sound card. Installation dependencies must be written in the modprobe.conf | 54 | the sound card. Installation dependencies must be written in configuration |
55 | file: | 55 | files under /etc/modprobe.d/ directory: |
56 | 56 | ||
57 | install ad1848 /sbin/modprobe aedsp16 && /sbin/modprobe -i ad1848 | 57 | softdep ad1848 pre: aedsp16 |
58 | install opl3 /sbin/modprobe aedsp16 && /sbin/modprobe -i opl3 | 58 | softdep opl3 pre: aedsp16 |
59 | 59 | ||
60 | Then you must load the sound modules stack in this order: | 60 | Then you must load the sound modules stack in this order: |
61 | sound -> aedsp16 -> [ ad1848, opl3 ] | 61 | sound -> aedsp16 -> [ ad1848, opl3 ] |
diff --git a/Documentation/sound/oss/CMI8330 b/Documentation/sound/oss/CMI8330 index 9c439f1a6dba..8a5fd1611c6f 100644 --- a/Documentation/sound/oss/CMI8330 +++ b/Documentation/sound/oss/CMI8330 | |||
@@ -143,11 +143,10 @@ CONFIG_SOUND_MSS=m | |||
143 | 143 | ||
144 | 144 | ||
145 | 145 | ||
146 | Alma Chao <elysian@ethereal.torsion.org> suggests the following /etc/modprobe.conf: | 146 | Alma Chao <elysian@ethereal.torsion.org> suggests the following in |
147 | a /etc/modprobe.d/*conf file: | ||
147 | 148 | ||
148 | alias sound ad1848 | 149 | alias sound ad1848 |
149 | alias synth0 opl3 | 150 | alias synth0 opl3 |
150 | options ad1848 io=0x530 irq=7 dma=0 soundpro=1 | 151 | options ad1848 io=0x530 irq=7 dma=0 soundpro=1 |
151 | options opl3 io=0x388 | 152 | options opl3 io=0x388 |
152 | |||
153 | |||
diff --git a/Documentation/sound/oss/Introduction b/Documentation/sound/oss/Introduction index 75d967ff9266..42da2d8fa372 100644 --- a/Documentation/sound/oss/Introduction +++ b/Documentation/sound/oss/Introduction | |||
@@ -167,8 +167,8 @@ in a file such as /root/soundon.sh. | |||
167 | MODPROBE: | 167 | MODPROBE: |
168 | ========= | 168 | ========= |
169 | 169 | ||
170 | If loading via modprobe, these common files are automatically loaded | 170 | If loading via modprobe, these common files are automatically loaded when |
171 | when requested by modprobe. For example, my /etc/modprobe.conf contains: | 171 | requested by modprobe. For example, my /etc/modprobe.d/oss.conf contains: |
172 | 172 | ||
173 | alias sound sb | 173 | alias sound sb |
174 | options sb io=0x240 irq=9 dma=3 dma16=5 mpu_io=0x300 | 174 | options sb io=0x240 irq=9 dma=3 dma16=5 mpu_io=0x300 |
@@ -228,7 +228,7 @@ http://www.opensound.com. Before loading the commercial sound | |||
228 | driver, you should do the following: | 228 | driver, you should do the following: |
229 | 229 | ||
230 | 1. remove sound modules (detailed above) | 230 | 1. remove sound modules (detailed above) |
231 | 2. remove the sound modules from /etc/modprobe.conf | 231 | 2. remove the sound modules from /etc/modprobe.d/*.conf |
232 | 3. move the sound modules from /lib/modules/<kernel>/misc | 232 | 3. move the sound modules from /lib/modules/<kernel>/misc |
233 | (for example, I make a /lib/modules/<kernel>/misc/tmp | 233 | (for example, I make a /lib/modules/<kernel>/misc/tmp |
234 | directory and copy the sound module files to that | 234 | directory and copy the sound module files to that |
@@ -265,7 +265,7 @@ twice, you need to do the following: | |||
265 | sb.o could be copied (or symlinked) to sb1.o for the | 265 | sb.o could be copied (or symlinked) to sb1.o for the |
266 | second SoundBlaster. | 266 | second SoundBlaster. |
267 | 267 | ||
268 | 2. Make a second entry in /etc/modprobe.conf, for example, | 268 | 2. Make a second entry in /etc/modprobe.d/*conf, for example, |
269 | sound1 or sb1. This second entry should refer to the | 269 | sound1 or sb1. This second entry should refer to the |
270 | new module names for example sb1, and should include | 270 | new module names for example sb1, and should include |
271 | the I/O, etc. for the second sound card. | 271 | the I/O, etc. for the second sound card. |
@@ -369,7 +369,7 @@ There are several ways of configuring your sound: | |||
369 | 2) On the command line when using insmod or in a bash script | 369 | 2) On the command line when using insmod or in a bash script |
370 | using command line calls to load sound. | 370 | using command line calls to load sound. |
371 | 371 | ||
372 | 3) In /etc/modprobe.conf when using modprobe. | 372 | 3) In /etc/modprobe.d/*conf when using modprobe. |
373 | 373 | ||
374 | 4) Via Red Hat's GPL'd /usr/sbin/sndconfig program (text based). | 374 | 4) Via Red Hat's GPL'd /usr/sbin/sndconfig program (text based). |
375 | 375 | ||
diff --git a/Documentation/sound/oss/Opti b/Documentation/sound/oss/Opti index c15af3c07d46..4cd5d9ab3580 100644 --- a/Documentation/sound/oss/Opti +++ b/Documentation/sound/oss/Opti | |||
@@ -18,7 +18,7 @@ force the card into a mode in which it can be programmed. | |||
18 | If you have another OS installed on your computer it is recommended | 18 | If you have another OS installed on your computer it is recommended |
19 | that Linux and the other OS use the same resources. | 19 | that Linux and the other OS use the same resources. |
20 | 20 | ||
21 | Also, it is recommended that resources specified in /etc/modprobe.conf | 21 | Also, it is recommended that resources specified in /etc/modprobe.d/*.conf |
22 | and resources specified in /etc/isapnp.conf agree. | 22 | and resources specified in /etc/isapnp.conf agree. |
23 | 23 | ||
24 | Compiling the sound driver | 24 | Compiling the sound driver |
@@ -67,11 +67,7 @@ address is hard-coded into the driver. | |||
67 | 67 | ||
68 | Using kmod and autoloading the sound driver | 68 | Using kmod and autoloading the sound driver |
69 | ------------------------------------------- | 69 | ------------------------------------------- |
70 | Comment: as of linux-2.1.90 kmod is replacing kerneld. | 70 | Config files in '/etc/modprobe.d/' are used as below: |
71 | The config file '/etc/modprobe.conf' is used as before. | ||
72 | |||
73 | This is the sound part of my /etc/modprobe.conf file. | ||
74 | Following that I will explain each line. | ||
75 | 71 | ||
76 | alias mixer0 mad16 | 72 | alias mixer0 mad16 |
77 | alias audio0 mad16 | 73 | alias audio0 mad16 |
diff --git a/Documentation/sound/oss/PAS16 b/Documentation/sound/oss/PAS16 index 3dca4b75988e..5c27229eec8c 100644 --- a/Documentation/sound/oss/PAS16 +++ b/Documentation/sound/oss/PAS16 | |||
@@ -128,7 +128,7 @@ CONFIG_SOUND_YM3812 | |||
128 | You can then get OPL3 functionality by issuing the command: | 128 | You can then get OPL3 functionality by issuing the command: |
129 | insmod opl3 | 129 | insmod opl3 |
130 | In addition, you must either add the following line to | 130 | In addition, you must either add the following line to |
131 | /etc/modprobe.conf: | 131 | /etc/modprobe.d/*.conf: |
132 | options opl3 io=0x388 | 132 | options opl3 io=0x388 |
133 | or else add the following line to /etc/lilo.conf: | 133 | or else add the following line to /etc/lilo.conf: |
134 | opl3=0x388 | 134 | opl3=0x388 |
@@ -158,5 +158,5 @@ following line would be appropriate: | |||
158 | append="pas2=0x388,10,3,-1,0,-1,-1,-1 opl3=0x388" | 158 | append="pas2=0x388,10,3,-1,0,-1,-1,-1 opl3=0x388" |
159 | 159 | ||
160 | If sound is built totally modular, the above options may be | 160 | If sound is built totally modular, the above options may be |
161 | specified in /etc/modprobe.conf for pas2, sb and opl3 | 161 | specified in /etc/modprobe.d/*.conf for pas2, sb and opl3 |
162 | respectively. | 162 | respectively. |
diff --git a/Documentation/sound/oss/README.modules b/Documentation/sound/oss/README.modules index e691d74e1e5e..cdc039421a46 100644 --- a/Documentation/sound/oss/README.modules +++ b/Documentation/sound/oss/README.modules | |||
@@ -26,7 +26,7 @@ Note that it is no longer necessary or possible to configure sound in the | |||
26 | drivers/sound dir. Now one simply configures and makes one's kernel and | 26 | drivers/sound dir. Now one simply configures and makes one's kernel and |
27 | modules in the usual way. | 27 | modules in the usual way. |
28 | 28 | ||
29 | Then, add to your /etc/modprobe.conf something like: | 29 | Then, add to your /etc/modprobe.d/oss.conf something like: |
30 | 30 | ||
31 | alias char-major-14-* sb | 31 | alias char-major-14-* sb |
32 | install sb /sbin/modprobe -i sb && /sbin/modprobe adlib_card | 32 | install sb /sbin/modprobe -i sb && /sbin/modprobe adlib_card |
@@ -36,7 +36,7 @@ options adlib_card io=0x388 # FM synthesizer | |||
36 | Alternatively, if you have compiled in kernel level ISAPnP support: | 36 | Alternatively, if you have compiled in kernel level ISAPnP support: |
37 | 37 | ||
38 | alias char-major-14 sb | 38 | alias char-major-14 sb |
39 | post-install sb /sbin/modprobe "-k" "adlib_card" | 39 | softdep sb post: adlib_card |
40 | options adlib_card io=0x388 | 40 | options adlib_card io=0x388 |
41 | 41 | ||
42 | The effect of this is that the sound driver and all necessary bits and | 42 | The effect of this is that the sound driver and all necessary bits and |
@@ -66,12 +66,12 @@ args are expected. | |||
66 | Note that at present there is no way to configure the io, irq and other | 66 | Note that at present there is no way to configure the io, irq and other |
67 | parameters for the modular drivers as one does for the wired drivers.. One | 67 | parameters for the modular drivers as one does for the wired drivers.. One |
68 | needs to pass the modules the necessary parameters as arguments, either | 68 | needs to pass the modules the necessary parameters as arguments, either |
69 | with /etc/modprobe.conf or with command-line args to modprobe, e.g. | 69 | with /etc/modprobe.d/*.conf or with command-line args to modprobe, e.g. |
70 | 70 | ||
71 | modprobe sb io=0x220 irq=7 dma=1 dma16=5 mpu_io=0x330 | 71 | modprobe sb io=0x220 irq=7 dma=1 dma16=5 mpu_io=0x330 |
72 | modprobe adlib_card io=0x388 | 72 | modprobe adlib_card io=0x388 |
73 | 73 | ||
74 | recommend using /etc/modprobe.conf. | 74 | recommend using /etc/modprobe.d/*.conf. |
75 | 75 | ||
76 | Persistent DMA Buffers: | 76 | Persistent DMA Buffers: |
77 | 77 | ||
@@ -89,7 +89,7 @@ wasteful of RAM, but it guarantees that sound always works. | |||
89 | 89 | ||
90 | To make the sound driver use persistent DMA buffers we need to pass the | 90 | To make the sound driver use persistent DMA buffers we need to pass the |
91 | sound.o module a "dmabuf=1" command-line argument. This is normally done | 91 | sound.o module a "dmabuf=1" command-line argument. This is normally done |
92 | in /etc/modprobe.conf like so: | 92 | in /etc/modprobe.d/*.conf files like so: |
93 | 93 | ||
94 | options sound dmabuf=1 | 94 | options sound dmabuf=1 |
95 | 95 | ||
diff --git a/Documentation/spi/spi-summary b/Documentation/spi/spi-summary index 4884cb33845d..7312ec14dd89 100644 --- a/Documentation/spi/spi-summary +++ b/Documentation/spi/spi-summary | |||
@@ -1,7 +1,7 @@ | |||
1 | Overview of Linux kernel SPI support | 1 | Overview of Linux kernel SPI support |
2 | ==================================== | 2 | ==================================== |
3 | 3 | ||
4 | 21-May-2007 | 4 | 02-Feb-2012 |
5 | 5 | ||
6 | What is SPI? | 6 | What is SPI? |
7 | ------------ | 7 | ------------ |
@@ -483,9 +483,9 @@ also initialize its own internal state. (See below about bus numbering | |||
483 | and those methods.) | 483 | and those methods.) |
484 | 484 | ||
485 | After you initialize the spi_master, then use spi_register_master() to | 485 | After you initialize the spi_master, then use spi_register_master() to |
486 | publish it to the rest of the system. At that time, device nodes for | 486 | publish it to the rest of the system. At that time, device nodes for the |
487 | the controller and any predeclared spi devices will be made available, | 487 | controller and any predeclared spi devices will be made available, and |
488 | and the driver model core will take care of binding them to drivers. | 488 | the driver model core will take care of binding them to drivers. |
489 | 489 | ||
490 | If you need to remove your SPI controller driver, spi_unregister_master() | 490 | If you need to remove your SPI controller driver, spi_unregister_master() |
491 | will reverse the effect of spi_register_master(). | 491 | will reverse the effect of spi_register_master(). |
@@ -521,21 +521,53 @@ SPI MASTER METHODS | |||
521 | ** When you code setup(), ASSUME that the controller | 521 | ** When you code setup(), ASSUME that the controller |
522 | ** is actively processing transfers for another device. | 522 | ** is actively processing transfers for another device. |
523 | 523 | ||
524 | master->transfer(struct spi_device *spi, struct spi_message *message) | ||
525 | This must not sleep. Its responsibility is arrange that the | ||
526 | transfer happens and its complete() callback is issued. The two | ||
527 | will normally happen later, after other transfers complete, and | ||
528 | if the controller is idle it will need to be kickstarted. | ||
529 | |||
530 | master->cleanup(struct spi_device *spi) | 524 | master->cleanup(struct spi_device *spi) |
531 | Your controller driver may use spi_device.controller_state to hold | 525 | Your controller driver may use spi_device.controller_state to hold |
532 | state it dynamically associates with that device. If you do that, | 526 | state it dynamically associates with that device. If you do that, |
533 | be sure to provide the cleanup() method to free that state. | 527 | be sure to provide the cleanup() method to free that state. |
534 | 528 | ||
529 | master->prepare_transfer_hardware(struct spi_master *master) | ||
530 | This will be called by the queue mechanism to signal to the driver | ||
531 | that a message is coming in soon, so the subsystem requests the | ||
532 | driver to prepare the transfer hardware by issuing this call. | ||
533 | This may sleep. | ||
534 | |||
535 | master->unprepare_transfer_hardware(struct spi_master *master) | ||
536 | This will be called by the queue mechanism to signal to the driver | ||
537 | that there are no more messages pending in the queue and it may | ||
538 | relax the hardware (e.g. by power management calls). This may sleep. | ||
539 | |||
540 | master->transfer_one_message(struct spi_master *master, | ||
541 | struct spi_message *mesg) | ||
542 | The subsystem calls the driver to transfer a single message while | ||
543 | queuing transfers that arrive in the meantime. When the driver is | ||
544 | finished with this message, it must call | ||
545 | spi_finalize_current_message() so the subsystem can issue the next | ||
546 | transfer. This may sleep. | ||
547 | |||
548 | DEPRECATED METHODS | ||
549 | |||
550 | master->transfer(struct spi_device *spi, struct spi_message *message) | ||
551 | This must not sleep. Its responsibility is arrange that the | ||
552 | transfer happens and its complete() callback is issued. The two | ||
553 | will normally happen later, after other transfers complete, and | ||
554 | if the controller is idle it will need to be kickstarted. This | ||
555 | method is not used on queued controllers and must be NULL if | ||
556 | transfer_one_message() and (un)prepare_transfer_hardware() are | ||
557 | implemented. | ||
558 | |||
535 | 559 | ||
536 | SPI MESSAGE QUEUE | 560 | SPI MESSAGE QUEUE |
537 | 561 | ||
538 | The bulk of the driver will be managing the I/O queue fed by transfer(). | 562 | If you are happy with the standard queueing mechanism provided by the |
563 | SPI subsystem, just implement the queued methods specified above. Using | ||
564 | the message queue has the upside of centralizing a lot of code and | ||
565 | providing pure process-context execution of methods. The message queue | ||
566 | can also be elevated to realtime priority on high-priority SPI traffic. | ||
567 | |||
568 | Unless the queueing mechanism in the SPI subsystem is selected, the bulk | ||
569 | of the driver will be managing the I/O queue fed by the now deprecated | ||
570 | function transfer(). | ||
539 | 571 | ||
540 | That queue could be purely conceptual. For example, a driver used only | 572 | That queue could be purely conceptual. For example, a driver used only |
541 | for low-frequency sensor access might be fine using synchronous PIO. | 573 | for low-frequency sensor access might be fine using synchronous PIO. |
@@ -561,4 +593,6 @@ Stephen Street | |||
561 | Mark Underwood | 593 | Mark Underwood |
562 | Andrew Victor | 594 | Andrew Victor |
563 | Vitaly Wool | 595 | Vitaly Wool |
564 | 596 | Grant Likely | |
597 | Mark Brown | ||
598 | Linus Walleij | ||
diff --git a/Documentation/static-keys.txt b/Documentation/static-keys.txt new file mode 100644 index 000000000000..d93f3c00f245 --- /dev/null +++ b/Documentation/static-keys.txt | |||
@@ -0,0 +1,286 @@ | |||
1 | Static Keys | ||
2 | ----------- | ||
3 | |||
4 | By: Jason Baron <jbaron@redhat.com> | ||
5 | |||
6 | 0) Abstract | ||
7 | |||
8 | Static keys allows the inclusion of seldom used features in | ||
9 | performance-sensitive fast-path kernel code, via a GCC feature and a code | ||
10 | patching technique. A quick example: | ||
11 | |||
12 | struct static_key key = STATIC_KEY_INIT_FALSE; | ||
13 | |||
14 | ... | ||
15 | |||
16 | if (static_key_false(&key)) | ||
17 | do unlikely code | ||
18 | else | ||
19 | do likely code | ||
20 | |||
21 | ... | ||
22 | static_key_slow_inc(); | ||
23 | ... | ||
24 | static_key_slow_inc(); | ||
25 | ... | ||
26 | |||
27 | The static_key_false() branch will be generated into the code with as little | ||
28 | impact to the likely code path as possible. | ||
29 | |||
30 | |||
31 | 1) Motivation | ||
32 | |||
33 | |||
34 | Currently, tracepoints are implemented using a conditional branch. The | ||
35 | conditional check requires checking a global variable for each tracepoint. | ||
36 | Although the overhead of this check is small, it increases when the memory | ||
37 | cache comes under pressure (memory cache lines for these global variables may | ||
38 | be shared with other memory accesses). As we increase the number of tracepoints | ||
39 | in the kernel this overhead may become more of an issue. In addition, | ||
40 | tracepoints are often dormant (disabled) and provide no direct kernel | ||
41 | functionality. Thus, it is highly desirable to reduce their impact as much as | ||
42 | possible. Although tracepoints are the original motivation for this work, other | ||
43 | kernel code paths should be able to make use of the static keys facility. | ||
44 | |||
45 | |||
46 | 2) Solution | ||
47 | |||
48 | |||
49 | gcc (v4.5) adds a new 'asm goto' statement that allows branching to a label: | ||
50 | |||
51 | http://gcc.gnu.org/ml/gcc-patches/2009-07/msg01556.html | ||
52 | |||
53 | Using the 'asm goto', we can create branches that are either taken or not taken | ||
54 | by default, without the need to check memory. Then, at run-time, we can patch | ||
55 | the branch site to change the branch direction. | ||
56 | |||
57 | For example, if we have a simple branch that is disabled by default: | ||
58 | |||
59 | if (static_key_false(&key)) | ||
60 | printk("I am the true branch\n"); | ||
61 | |||
62 | Thus, by default the 'printk' will not be emitted. And the code generated will | ||
63 | consist of a single atomic 'no-op' instruction (5 bytes on x86), in the | ||
64 | straight-line code path. When the branch is 'flipped', we will patch the | ||
65 | 'no-op' in the straight-line codepath with a 'jump' instruction to the | ||
66 | out-of-line true branch. Thus, changing branch direction is expensive but | ||
67 | branch selection is basically 'free'. That is the basic tradeoff of this | ||
68 | optimization. | ||
69 | |||
70 | This lowlevel patching mechanism is called 'jump label patching', and it gives | ||
71 | the basis for the static keys facility. | ||
72 | |||
73 | 3) Static key label API, usage and examples: | ||
74 | |||
75 | |||
76 | In order to make use of this optimization you must first define a key: | ||
77 | |||
78 | struct static_key key; | ||
79 | |||
80 | Which is initialized as: | ||
81 | |||
82 | struct static_key key = STATIC_KEY_INIT_TRUE; | ||
83 | |||
84 | or: | ||
85 | |||
86 | struct static_key key = STATIC_KEY_INIT_FALSE; | ||
87 | |||
88 | If the key is not initialized, it is default false. The 'struct static_key', | ||
89 | must be a 'global'. That is, it can't be allocated on the stack or dynamically | ||
90 | allocated at run-time. | ||
91 | |||
92 | The key is then used in code as: | ||
93 | |||
94 | if (static_key_false(&key)) | ||
95 | do unlikely code | ||
96 | else | ||
97 | do likely code | ||
98 | |||
99 | Or: | ||
100 | |||
101 | if (static_key_true(&key)) | ||
102 | do likely code | ||
103 | else | ||
104 | do unlikely code | ||
105 | |||
106 | A key that is initialized via 'STATIC_KEY_INIT_FALSE', must be used in a | ||
107 | 'static_key_false()' construct. Likewise, a key initialized via | ||
108 | 'STATIC_KEY_INIT_TRUE' must be used in a 'static_key_true()' construct. A | ||
109 | single key can be used in many branches, but all the branches must match the | ||
110 | way that the key has been initialized. | ||
111 | |||
112 | The branch(es) can then be switched via: | ||
113 | |||
114 | static_key_slow_inc(&key); | ||
115 | ... | ||
116 | static_key_slow_dec(&key); | ||
117 | |||
118 | Thus, 'static_key_slow_inc()' means 'make the branch true', and | ||
119 | 'static_key_slow_dec()' means 'make the the branch false' with appropriate | ||
120 | reference counting. For example, if the key is initialized true, a | ||
121 | static_key_slow_dec(), will switch the branch to false. And a subsequent | ||
122 | static_key_slow_inc(), will change the branch back to true. Likewise, if the | ||
123 | key is initialized false, a 'static_key_slow_inc()', will change the branch to | ||
124 | true. And then a 'static_key_slow_dec()', will again make the branch false. | ||
125 | |||
126 | An example usage in the kernel is the implementation of tracepoints: | ||
127 | |||
128 | static inline void trace_##name(proto) \ | ||
129 | { \ | ||
130 | if (static_key_false(&__tracepoint_##name.key)) \ | ||
131 | __DO_TRACE(&__tracepoint_##name, \ | ||
132 | TP_PROTO(data_proto), \ | ||
133 | TP_ARGS(data_args), \ | ||
134 | TP_CONDITION(cond)); \ | ||
135 | } | ||
136 | |||
137 | Tracepoints are disabled by default, and can be placed in performance critical | ||
138 | pieces of the kernel. Thus, by using a static key, the tracepoints can have | ||
139 | absolutely minimal impact when not in use. | ||
140 | |||
141 | |||
142 | 4) Architecture level code patching interface, 'jump labels' | ||
143 | |||
144 | |||
145 | There are a few functions and macros that architectures must implement in order | ||
146 | to take advantage of this optimization. If there is no architecture support, we | ||
147 | simply fall back to a traditional, load, test, and jump sequence. | ||
148 | |||
149 | * select HAVE_ARCH_JUMP_LABEL, see: arch/x86/Kconfig | ||
150 | |||
151 | * #define JUMP_LABEL_NOP_SIZE, see: arch/x86/include/asm/jump_label.h | ||
152 | |||
153 | * __always_inline bool arch_static_branch(struct static_key *key), see: | ||
154 | arch/x86/include/asm/jump_label.h | ||
155 | |||
156 | * void arch_jump_label_transform(struct jump_entry *entry, enum jump_label_type type), | ||
157 | see: arch/x86/kernel/jump_label.c | ||
158 | |||
159 | * __init_or_module void arch_jump_label_transform_static(struct jump_entry *entry, enum jump_label_type type), | ||
160 | see: arch/x86/kernel/jump_label.c | ||
161 | |||
162 | |||
163 | * struct jump_entry, see: arch/x86/include/asm/jump_label.h | ||
164 | |||
165 | |||
166 | 5) Static keys / jump label analysis, results (x86_64): | ||
167 | |||
168 | |||
169 | As an example, let's add the following branch to 'getppid()', such that the | ||
170 | system call now looks like: | ||
171 | |||
172 | SYSCALL_DEFINE0(getppid) | ||
173 | { | ||
174 | int pid; | ||
175 | |||
176 | + if (static_key_false(&key)) | ||
177 | + printk("I am the true branch\n"); | ||
178 | |||
179 | rcu_read_lock(); | ||
180 | pid = task_tgid_vnr(rcu_dereference(current->real_parent)); | ||
181 | rcu_read_unlock(); | ||
182 | |||
183 | return pid; | ||
184 | } | ||
185 | |||
186 | The resulting instructions with jump labels generated by GCC is: | ||
187 | |||
188 | ffffffff81044290 <sys_getppid>: | ||
189 | ffffffff81044290: 55 push %rbp | ||
190 | ffffffff81044291: 48 89 e5 mov %rsp,%rbp | ||
191 | ffffffff81044294: e9 00 00 00 00 jmpq ffffffff81044299 <sys_getppid+0x9> | ||
192 | ffffffff81044299: 65 48 8b 04 25 c0 b6 mov %gs:0xb6c0,%rax | ||
193 | ffffffff810442a0: 00 00 | ||
194 | ffffffff810442a2: 48 8b 80 80 02 00 00 mov 0x280(%rax),%rax | ||
195 | ffffffff810442a9: 48 8b 80 b0 02 00 00 mov 0x2b0(%rax),%rax | ||
196 | ffffffff810442b0: 48 8b b8 e8 02 00 00 mov 0x2e8(%rax),%rdi | ||
197 | ffffffff810442b7: e8 f4 d9 00 00 callq ffffffff81051cb0 <pid_vnr> | ||
198 | ffffffff810442bc: 5d pop %rbp | ||
199 | ffffffff810442bd: 48 98 cltq | ||
200 | ffffffff810442bf: c3 retq | ||
201 | ffffffff810442c0: 48 c7 c7 e3 54 98 81 mov $0xffffffff819854e3,%rdi | ||
202 | ffffffff810442c7: 31 c0 xor %eax,%eax | ||
203 | ffffffff810442c9: e8 71 13 6d 00 callq ffffffff8171563f <printk> | ||
204 | ffffffff810442ce: eb c9 jmp ffffffff81044299 <sys_getppid+0x9> | ||
205 | |||
206 | Without the jump label optimization it looks like: | ||
207 | |||
208 | ffffffff810441f0 <sys_getppid>: | ||
209 | ffffffff810441f0: 8b 05 8a 52 d8 00 mov 0xd8528a(%rip),%eax # ffffffff81dc9480 <key> | ||
210 | ffffffff810441f6: 55 push %rbp | ||
211 | ffffffff810441f7: 48 89 e5 mov %rsp,%rbp | ||
212 | ffffffff810441fa: 85 c0 test %eax,%eax | ||
213 | ffffffff810441fc: 75 27 jne ffffffff81044225 <sys_getppid+0x35> | ||
214 | ffffffff810441fe: 65 48 8b 04 25 c0 b6 mov %gs:0xb6c0,%rax | ||
215 | ffffffff81044205: 00 00 | ||
216 | ffffffff81044207: 48 8b 80 80 02 00 00 mov 0x280(%rax),%rax | ||
217 | ffffffff8104420e: 48 8b 80 b0 02 00 00 mov 0x2b0(%rax),%rax | ||
218 | ffffffff81044215: 48 8b b8 e8 02 00 00 mov 0x2e8(%rax),%rdi | ||
219 | ffffffff8104421c: e8 2f da 00 00 callq ffffffff81051c50 <pid_vnr> | ||
220 | ffffffff81044221: 5d pop %rbp | ||
221 | ffffffff81044222: 48 98 cltq | ||
222 | ffffffff81044224: c3 retq | ||
223 | ffffffff81044225: 48 c7 c7 13 53 98 81 mov $0xffffffff81985313,%rdi | ||
224 | ffffffff8104422c: 31 c0 xor %eax,%eax | ||
225 | ffffffff8104422e: e8 60 0f 6d 00 callq ffffffff81715193 <printk> | ||
226 | ffffffff81044233: eb c9 jmp ffffffff810441fe <sys_getppid+0xe> | ||
227 | ffffffff81044235: 66 66 2e 0f 1f 84 00 data32 nopw %cs:0x0(%rax,%rax,1) | ||
228 | ffffffff8104423c: 00 00 00 00 | ||
229 | |||
230 | Thus, the disable jump label case adds a 'mov', 'test' and 'jne' instruction | ||
231 | vs. the jump label case just has a 'no-op' or 'jmp 0'. (The jmp 0, is patched | ||
232 | to a 5 byte atomic no-op instruction at boot-time.) Thus, the disabled jump | ||
233 | label case adds: | ||
234 | |||
235 | 6 (mov) + 2 (test) + 2 (jne) = 10 - 5 (5 byte jump 0) = 5 addition bytes. | ||
236 | |||
237 | If we then include the padding bytes, the jump label code saves, 16 total bytes | ||
238 | of instruction memory for this small fucntion. In this case the non-jump label | ||
239 | function is 80 bytes long. Thus, we have have saved 20% of the instruction | ||
240 | footprint. We can in fact improve this even further, since the 5-byte no-op | ||
241 | really can be a 2-byte no-op since we can reach the branch with a 2-byte jmp. | ||
242 | However, we have not yet implemented optimal no-op sizes (they are currently | ||
243 | hard-coded). | ||
244 | |||
245 | Since there are a number of static key API uses in the scheduler paths, | ||
246 | 'pipe-test' (also known as 'perf bench sched pipe') can be used to show the | ||
247 | performance improvement. Testing done on 3.3.0-rc2: | ||
248 | |||
249 | jump label disabled: | ||
250 | |||
251 | Performance counter stats for 'bash -c /tmp/pipe-test' (50 runs): | ||
252 | |||
253 | 855.700314 task-clock # 0.534 CPUs utilized ( +- 0.11% ) | ||
254 | 200,003 context-switches # 0.234 M/sec ( +- 0.00% ) | ||
255 | 0 CPU-migrations # 0.000 M/sec ( +- 39.58% ) | ||
256 | 487 page-faults # 0.001 M/sec ( +- 0.02% ) | ||
257 | 1,474,374,262 cycles # 1.723 GHz ( +- 0.17% ) | ||
258 | <not supported> stalled-cycles-frontend | ||
259 | <not supported> stalled-cycles-backend | ||
260 | 1,178,049,567 instructions # 0.80 insns per cycle ( +- 0.06% ) | ||
261 | 208,368,926 branches # 243.507 M/sec ( +- 0.06% ) | ||
262 | 5,569,188 branch-misses # 2.67% of all branches ( +- 0.54% ) | ||
263 | |||
264 | 1.601607384 seconds time elapsed ( +- 0.07% ) | ||
265 | |||
266 | jump label enabled: | ||
267 | |||
268 | Performance counter stats for 'bash -c /tmp/pipe-test' (50 runs): | ||
269 | |||
270 | 841.043185 task-clock # 0.533 CPUs utilized ( +- 0.12% ) | ||
271 | 200,004 context-switches # 0.238 M/sec ( +- 0.00% ) | ||
272 | 0 CPU-migrations # 0.000 M/sec ( +- 40.87% ) | ||
273 | 487 page-faults # 0.001 M/sec ( +- 0.05% ) | ||
274 | 1,432,559,428 cycles # 1.703 GHz ( +- 0.18% ) | ||
275 | <not supported> stalled-cycles-frontend | ||
276 | <not supported> stalled-cycles-backend | ||
277 | 1,175,363,994 instructions # 0.82 insns per cycle ( +- 0.04% ) | ||
278 | 206,859,359 branches # 245.956 M/sec ( +- 0.04% ) | ||
279 | 4,884,119 branch-misses # 2.36% of all branches ( +- 0.85% ) | ||
280 | |||
281 | 1.579384366 seconds time elapsed | ||
282 | |||
283 | The percentage of saved branches is .7%, and we've saved 12% on | ||
284 | 'branch-misses'. This is where we would expect to get the most savings, since | ||
285 | this optimization is about reducing the number of branches. In addition, we've | ||
286 | saved .2% on instructions, and 2.8% on cycles and 1.4% on elapsed time. | ||
diff --git a/Documentation/sysctl/kernel.txt b/Documentation/sysctl/kernel.txt index 8c20fbd8b42d..6d78841fd416 100644 --- a/Documentation/sysctl/kernel.txt +++ b/Documentation/sysctl/kernel.txt | |||
@@ -601,6 +601,8 @@ can be ORed together: | |||
601 | instead of using the one provided by the hardware. | 601 | instead of using the one provided by the hardware. |
602 | 512 - A kernel warning has occurred. | 602 | 512 - A kernel warning has occurred. |
603 | 1024 - A module from drivers/staging was loaded. | 603 | 1024 - A module from drivers/staging was loaded. |
604 | 2048 - The system is working around a severe firmware bug. | ||
605 | 4096 - An out-of-tree module has been loaded. | ||
604 | 606 | ||
605 | ============================================================== | 607 | ============================================================== |
606 | 608 | ||
diff --git a/Documentation/sysrq.txt b/Documentation/sysrq.txt index 312e3754e8c5..642f84495b29 100644 --- a/Documentation/sysrq.txt +++ b/Documentation/sysrq.txt | |||
@@ -241,9 +241,8 @@ command you are interested in. | |||
241 | 241 | ||
242 | * I have more questions, who can I ask? | 242 | * I have more questions, who can I ask? |
243 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | 243 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
244 | And I'll answer any questions about the registration system you got, also | 244 | Just ask them on the linux-kernel mailing list: |
245 | responding as soon as possible. | 245 | linux-kernel@vger.kernel.org |
246 | -Crutcher | ||
247 | 246 | ||
248 | * Credits | 247 | * Credits |
249 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | 248 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
diff --git a/Documentation/trace/ftrace.txt b/Documentation/trace/ftrace.txt index 1ebc24cf9a55..6f51fed45f2d 100644 --- a/Documentation/trace/ftrace.txt +++ b/Documentation/trace/ftrace.txt | |||
@@ -226,6 +226,13 @@ Here is the list of current tracers that may be configured. | |||
226 | Traces and records the max latency that it takes for | 226 | Traces and records the max latency that it takes for |
227 | the highest priority task to get scheduled after | 227 | the highest priority task to get scheduled after |
228 | it has been woken up. | 228 | it has been woken up. |
229 | Traces all tasks as an average developer would expect. | ||
230 | |||
231 | "wakeup_rt" | ||
232 | |||
233 | Traces and records the max latency that it takes for just | ||
234 | RT tasks (as the current "wakeup" does). This is useful | ||
235 | for those interested in wake up timings of RT tasks. | ||
229 | 236 | ||
230 | "hw-branch-tracer" | 237 | "hw-branch-tracer" |
231 | 238 | ||
diff --git a/Documentation/usb/power-management.txt b/Documentation/usb/power-management.txt index 817df299ea07..4204eb01fd38 100644 --- a/Documentation/usb/power-management.txt +++ b/Documentation/usb/power-management.txt | |||
@@ -179,7 +179,8 @@ do: | |||
179 | 179 | ||
180 | modprobe usbcore autosuspend=5 | 180 | modprobe usbcore autosuspend=5 |
181 | 181 | ||
182 | Equivalently, you could add to /etc/modprobe.conf a line saying: | 182 | Equivalently, you could add to a configuration file in /etc/modprobe.d |
183 | a line saying: | ||
183 | 184 | ||
184 | options usbcore autosuspend=5 | 185 | options usbcore autosuspend=5 |
185 | 186 | ||
diff --git a/Documentation/video4linux/CARDLIST.cx23885 b/Documentation/video4linux/CARDLIST.cx23885 index 23584d0c6a75..f316d1816fcd 100644 --- a/Documentation/video4linux/CARDLIST.cx23885 +++ b/Documentation/video4linux/CARDLIST.cx23885 | |||
@@ -32,3 +32,4 @@ | |||
32 | 31 -> Leadtek Winfast PxDVR3200 H XC4000 [107d:6f39] | 32 | 31 -> Leadtek Winfast PxDVR3200 H XC4000 [107d:6f39] |
33 | 32 -> MPX-885 | 33 | 32 -> MPX-885 |
34 | 33 -> Mygica X8507 [14f1:8502] | 34 | 33 -> Mygica X8507 [14f1:8502] |
35 | 34 -> TerraTec Cinergy T PCIe Dual [153b:117e] | ||
diff --git a/Documentation/video4linux/CARDLIST.cx88 b/Documentation/video4linux/CARDLIST.cx88 index eee18e6962b6..fa4b3f947468 100644 --- a/Documentation/video4linux/CARDLIST.cx88 +++ b/Documentation/video4linux/CARDLIST.cx88 | |||
@@ -59,7 +59,7 @@ | |||
59 | 58 -> Pinnacle PCTV HD 800i [11bd:0051] | 59 | 58 -> Pinnacle PCTV HD 800i [11bd:0051] |
60 | 59 -> DViCO FusionHDTV 5 PCI nano [18ac:d530] | 60 | 59 -> DViCO FusionHDTV 5 PCI nano [18ac:d530] |
61 | 60 -> Pinnacle Hybrid PCTV [12ab:1788] | 61 | 60 -> Pinnacle Hybrid PCTV [12ab:1788] |
62 | 61 -> Leadtek TV2000 XP Global [107d:6f18,107d:6618] | 62 | 61 -> Leadtek TV2000 XP Global [107d:6f18,107d:6618,107d:6619] |
63 | 62 -> PowerColor RA330 [14f1:ea3d] | 63 | 62 -> PowerColor RA330 [14f1:ea3d] |
64 | 63 -> Geniatech X8000-MT DVBT [14f1:8852] | 64 | 63 -> Geniatech X8000-MT DVBT [14f1:8852] |
65 | 64 -> DViCO FusionHDTV DVB-T PRO [18ac:db30] | 65 | 64 -> DViCO FusionHDTV DVB-T PRO [18ac:db30] |
@@ -87,3 +87,5 @@ | |||
87 | 86 -> TeVii S464 DVB-S/S2 [d464:9022] | 87 | 86 -> TeVii S464 DVB-S/S2 [d464:9022] |
88 | 87 -> Leadtek WinFast DTV2000 H PLUS [107d:6f42] | 88 | 87 -> Leadtek WinFast DTV2000 H PLUS [107d:6f42] |
89 | 88 -> Leadtek WinFast DTV1800 H (XC4000) [107d:6f38] | 89 | 88 -> Leadtek WinFast DTV1800 H (XC4000) [107d:6f38] |
90 | 89 -> Leadtek TV2000 XP Global (SC4100) [107d:6f36] | ||
91 | 90 -> Leadtek TV2000 XP Global (XC4100) [107d:6f43] | ||
diff --git a/Documentation/video4linux/CARDLIST.em28xx b/Documentation/video4linux/CARDLIST.em28xx index e7be3ac49ead..d99262dda533 100644 --- a/Documentation/video4linux/CARDLIST.em28xx +++ b/Documentation/video4linux/CARDLIST.em28xx | |||
@@ -7,7 +7,7 @@ | |||
7 | 6 -> Terratec Cinergy 200 USB (em2800) | 7 | 6 -> Terratec Cinergy 200 USB (em2800) |
8 | 7 -> Leadtek Winfast USB II (em2800) [0413:6023] | 8 | 7 -> Leadtek Winfast USB II (em2800) [0413:6023] |
9 | 8 -> Kworld USB2800 (em2800) | 9 | 8 -> Kworld USB2800 (em2800) |
10 | 9 -> Pinnacle Dazzle DVC 90/100/101/107 / Kaiser Baas Video to DVD maker (em2820/em2840) [1b80:e302,1b80:e304,2304:0207,2304:021a] | 10 | 9 -> Pinnacle Dazzle DVC 90/100/101/107 / Kaiser Baas Video to DVD maker (em2820/em2840) [1b80:e302,1b80:e304,2304:0207,2304:021a,093b:a003] |
11 | 10 -> Hauppauge WinTV HVR 900 (em2880) [2040:6500] | 11 | 10 -> Hauppauge WinTV HVR 900 (em2880) [2040:6500] |
12 | 11 -> Terratec Hybrid XS (em2880) | 12 | 11 -> Terratec Hybrid XS (em2880) |
13 | 12 -> Kworld PVR TV 2800 RF (em2820/em2840) | 13 | 12 -> Kworld PVR TV 2800 RF (em2820/em2840) |
@@ -61,7 +61,7 @@ | |||
61 | 61 -> Pixelview PlayTV Box 4 USB 2.0 (em2820/em2840) | 61 | 61 -> Pixelview PlayTV Box 4 USB 2.0 (em2820/em2840) |
62 | 62 -> Gadmei TVR200 (em2820/em2840) | 62 | 62 -> Gadmei TVR200 (em2820/em2840) |
63 | 63 -> Kaiomy TVnPC U2 (em2860) [eb1a:e303] | 63 | 63 -> Kaiomy TVnPC U2 (em2860) [eb1a:e303] |
64 | 64 -> Easy Cap Capture DC-60 (em2860) | 64 | 64 -> Easy Cap Capture DC-60 (em2860) [1b80:e309] |
65 | 65 -> IO-DATA GV-MVP/SZ (em2820/em2840) [04bb:0515] | 65 | 65 -> IO-DATA GV-MVP/SZ (em2820/em2840) [04bb:0515] |
66 | 66 -> Empire dual TV (em2880) | 66 | 66 -> Empire dual TV (em2880) |
67 | 67 -> Terratec Grabby (em2860) [0ccd:0096,0ccd:10AF] | 67 | 67 -> Terratec Grabby (em2860) [0ccd:0096,0ccd:10AF] |
@@ -76,7 +76,11 @@ | |||
76 | 76 -> KWorld PlusTV 340U or UB435-Q (ATSC) (em2870) [1b80:a340] | 76 | 76 -> KWorld PlusTV 340U or UB435-Q (ATSC) (em2870) [1b80:a340] |
77 | 77 -> EM2874 Leadership ISDBT (em2874) | 77 | 77 -> EM2874 Leadership ISDBT (em2874) |
78 | 78 -> PCTV nanoStick T2 290e (em28174) | 78 | 78 -> PCTV nanoStick T2 290e (em28174) |
79 | 79 -> Terratec Cinergy H5 (em2884) [0ccd:10a2,0ccd:10ad] | 79 | 79 -> Terratec Cinergy H5 (em2884) [0ccd:008e,0ccd:00ac,0ccd:10a2,0ccd:10ad] |
80 | 80 -> PCTV DVB-S2 Stick (460e) (em28174) | 80 | 80 -> PCTV DVB-S2 Stick (460e) (em28174) |
81 | 81 -> Hauppauge WinTV HVR 930C (em2884) [2040:1605] | 81 | 81 -> Hauppauge WinTV HVR 930C (em2884) [2040:1605] |
82 | 82 -> Terratec Cinergy HTC Stick (em2884) [0ccd:00b2] | 82 | 82 -> Terratec Cinergy HTC Stick (em2884) [0ccd:00b2] |
83 | 83 -> Honestech Vidbox NW03 (em2860) [eb1a:5006] | ||
84 | 84 -> MaxMedia UB425-TC (em2874) [1b80:e425] | ||
85 | 85 -> PCTV QuatroStick (510e) (em2884) [2304:0242] | ||
86 | 86 -> PCTV QuatroStick nano (520e) (em2884) [2013:0251] | ||
diff --git a/Documentation/video4linux/CARDLIST.saa7134 b/Documentation/video4linux/CARDLIST.saa7134 index e7ef38a19859..34f3b330e5f4 100644 --- a/Documentation/video4linux/CARDLIST.saa7134 +++ b/Documentation/video4linux/CARDLIST.saa7134 | |||
@@ -187,3 +187,4 @@ | |||
187 | 186 -> Beholder BeholdTV 501 [5ace:5010] | 187 | 186 -> Beholder BeholdTV 501 [5ace:5010] |
188 | 187 -> Beholder BeholdTV 503 FM [5ace:5030] | 188 | 187 -> Beholder BeholdTV 503 FM [5ace:5030] |
189 | 188 -> Sensoray 811/911 [6000:0811,6000:0911] | 189 | 188 -> Sensoray 811/911 [6000:0811,6000:0911] |
190 | 189 -> Kworld PC150-U [17de:a134] | ||
diff --git a/Documentation/video4linux/CARDLIST.tuner b/Documentation/video4linux/CARDLIST.tuner index 6323b7a20719..c83f6e418879 100644 --- a/Documentation/video4linux/CARDLIST.tuner +++ b/Documentation/video4linux/CARDLIST.tuner | |||
@@ -78,10 +78,11 @@ tuner=77 - TCL tuner MF02GIP-5N-E | |||
78 | tuner=78 - Philips FMD1216MEX MK3 Hybrid Tuner | 78 | tuner=78 - Philips FMD1216MEX MK3 Hybrid Tuner |
79 | tuner=79 - Philips PAL/SECAM multi (FM1216 MK5) | 79 | tuner=79 - Philips PAL/SECAM multi (FM1216 MK5) |
80 | tuner=80 - Philips FQ1216LME MK3 PAL/SECAM w/active loopthrough | 80 | tuner=80 - Philips FQ1216LME MK3 PAL/SECAM w/active loopthrough |
81 | tuner=81 - Xceive 4000 tuner | ||
82 | tuner=81 - Partsnic (Daewoo) PTI-5NF05 | 81 | tuner=81 - Partsnic (Daewoo) PTI-5NF05 |
83 | tuner=82 - Philips CU1216L | 82 | tuner=82 - Philips CU1216L |
84 | tuner=83 - NXP TDA18271 | 83 | tuner=83 - NXP TDA18271 |
85 | tuner=84 - Sony BTF-Pxn01Z | 84 | tuner=84 - Sony BTF-Pxn01Z |
86 | tuner=85 - Philips FQ1236 MK5 | 85 | tuner=85 - Philips FQ1236 MK5 |
87 | tuner=86 - Tena TNF5337 MFD | 86 | tuner=86 - Tena TNF5337 MFD |
87 | tuner=87 - Xceive 4000 tuner | ||
88 | tuner=88 - Xceive 5000C tuner | ||
diff --git a/Documentation/video4linux/CQcam.txt b/Documentation/video4linux/CQcam.txt index 8977e7ce4dab..6e680fec1e9c 100644 --- a/Documentation/video4linux/CQcam.txt +++ b/Documentation/video4linux/CQcam.txt | |||
@@ -61,29 +61,19 @@ But that is my personal preference. | |||
61 | 2.2 Configuration | 61 | 2.2 Configuration |
62 | 62 | ||
63 | The configuration requires module configuration and device | 63 | The configuration requires module configuration and device |
64 | configuration. I like kmod or kerneld process with the | 64 | configuration. The following sections detail these procedures. |
65 | /etc/modprobe.conf file so the modules can automatically load/unload as | ||
66 | they are used. The video devices could already exist, be generated | ||
67 | using MAKEDEV, or need to be created. The following sections detail | ||
68 | these procedures. | ||
69 | 65 | ||
70 | 66 | ||
71 | 2.1 Module Configuration | 67 | 2.1 Module Configuration |
72 | 68 | ||
73 | Using modules requires a bit of work to install and pass the | 69 | Using modules requires a bit of work to install and pass the |
74 | parameters. Understand that entries in /etc/modprobe.conf of: | 70 | parameters. Understand that entries in /etc/modprobe.d/*.conf of: |
75 | 71 | ||
76 | alias parport_lowlevel parport_pc | 72 | alias parport_lowlevel parport_pc |
77 | options parport_pc io=0x378 irq=none | 73 | options parport_pc io=0x378 irq=none |
78 | alias char-major-81 videodev | 74 | alias char-major-81 videodev |
79 | alias char-major-81-0 c-qcam | 75 | alias char-major-81-0 c-qcam |
80 | 76 | ||
81 | will cause the kmod/modprobe to do certain things. If you are | ||
82 | using kmod, then a request for a 'char-major-81-0' will cause | ||
83 | the 'c-qcam' module to load. If you have other video sources with | ||
84 | modules, you might want to assign the different minor numbers to | ||
85 | different modules. | ||
86 | |||
87 | 2.2 Device Configuration | 77 | 2.2 Device Configuration |
88 | 78 | ||
89 | At this point, we need to ensure that the device files exist. | 79 | At this point, we need to ensure that the device files exist. |
diff --git a/Documentation/video4linux/Zoran b/Documentation/video4linux/Zoran index 9ed629d4874b..b5a911fd0602 100644 --- a/Documentation/video4linux/Zoran +++ b/Documentation/video4linux/Zoran | |||
@@ -255,7 +255,7 @@ Load zr36067.o. If it can't autodetect your card, use the card=X insmod | |||
255 | option with X being the card number as given in the previous section. | 255 | option with X being the card number as given in the previous section. |
256 | To have more than one card, use card=X1[,X2[,X3,[X4[..]]]] | 256 | To have more than one card, use card=X1[,X2[,X3,[X4[..]]]] |
257 | 257 | ||
258 | To automate this, add the following to your /etc/modprobe.conf: | 258 | To automate this, add the following to your /etc/modprobe.d/zoran.conf: |
259 | 259 | ||
260 | options zr36067 card=X1[,X2[,X3[,X4[..]]]] | 260 | options zr36067 card=X1[,X2[,X3[,X4[..]]]] |
261 | alias char-major-81-0 zr36067 | 261 | alias char-major-81-0 zr36067 |
diff --git a/Documentation/video4linux/bttv/Modules.conf b/Documentation/video4linux/bttv/Modules.conf index 753f15956eb8..8f258faf18f1 100644 --- a/Documentation/video4linux/bttv/Modules.conf +++ b/Documentation/video4linux/bttv/Modules.conf | |||
@@ -1,4 +1,4 @@ | |||
1 | # For modern kernels (2.6 or above), this belongs in /etc/modprobe.conf | 1 | # For modern kernels (2.6 or above), this belongs in /etc/modprobe.d/*.conf |
2 | # For for 2.4 kernels or earlier, this belongs in /etc/modules.conf. | 2 | # For for 2.4 kernels or earlier, this belongs in /etc/modules.conf. |
3 | 3 | ||
4 | # i2c | 4 | # i2c |
diff --git a/Documentation/video4linux/fimc.txt b/Documentation/video4linux/fimc.txt new file mode 100644 index 000000000000..eb049708f3e4 --- /dev/null +++ b/Documentation/video4linux/fimc.txt | |||
@@ -0,0 +1,178 @@ | |||
1 | Samsung S5P/EXYNOS4 FIMC driver | ||
2 | |||
3 | Copyright (C) 2012 Samsung Electronics Co., Ltd. | ||
4 | --------------------------------------------------------------------------- | ||
5 | |||
6 | The FIMC (Fully Interactive Mobile Camera) device available in Samsung | ||
7 | SoC Application Processors is an integrated camera host interface, color | ||
8 | space converter, image resizer and rotator. It's also capable of capturing | ||
9 | data from LCD controller (FIMD) through the SoC internal writeback data | ||
10 | path. There are multiple FIMC instances in the SoCs (up to 4), having | ||
11 | slightly different capabilities, like pixel alignment constraints, rotator | ||
12 | availability, LCD writeback support, etc. The driver is located at | ||
13 | drivers/media/video/s5p-fimc directory. | ||
14 | |||
15 | 1. Supported SoCs | ||
16 | ================= | ||
17 | |||
18 | S5PC100 (mem-to-mem only), S5PV210, EXYNOS4210 | ||
19 | |||
20 | 2. Supported features | ||
21 | ===================== | ||
22 | |||
23 | - camera parallel interface capture (ITU-R.BT601/565); | ||
24 | - camera serial interface capture (MIPI-CSI2); | ||
25 | - memory-to-memory processing (color space conversion, scaling, mirror | ||
26 | and rotation); | ||
27 | - dynamic pipeline re-configuration at runtime (re-attachment of any FIMC | ||
28 | instance to any parallel video input or any MIPI-CSI front-end); | ||
29 | - runtime PM and system wide suspend/resume | ||
30 | |||
31 | Not currently supported: | ||
32 | - LCD writeback input | ||
33 | - per frame clock gating (mem-to-mem) | ||
34 | |||
35 | 3. Files partitioning | ||
36 | ===================== | ||
37 | |||
38 | - media device driver | ||
39 | drivers/media/video/s5p-fimc/fimc-mdevice.[ch] | ||
40 | |||
41 | - camera capture video device driver | ||
42 | drivers/media/video/s5p-fimc/fimc-capture.c | ||
43 | |||
44 | - MIPI-CSI2 receiver subdev | ||
45 | drivers/media/video/s5p-fimc/mipi-csis.[ch] | ||
46 | |||
47 | - video post-processor (mem-to-mem) | ||
48 | drivers/media/video/s5p-fimc/fimc-core.c | ||
49 | |||
50 | - common files | ||
51 | drivers/media/video/s5p-fimc/fimc-core.h | ||
52 | drivers/media/video/s5p-fimc/fimc-reg.h | ||
53 | drivers/media/video/s5p-fimc/regs-fimc.h | ||
54 | |||
55 | 4. User space interfaces | ||
56 | ======================== | ||
57 | |||
58 | 4.1. Media device interface | ||
59 | |||
60 | The driver supports Media Controller API as defined at | ||
61 | http://http://linuxtv.org/downloads/v4l-dvb-apis/media_common.html | ||
62 | The media device driver name is "SAMSUNG S5P FIMC". | ||
63 | |||
64 | The purpose of this interface is to allow changing assignment of FIMC instances | ||
65 | to the SoC peripheral camera input at runtime and optionally to control internal | ||
66 | connections of the MIPI-CSIS device(s) to the FIMC entities. | ||
67 | |||
68 | The media device interface allows to configure the SoC for capturing image | ||
69 | data from the sensor through more than one FIMC instance (e.g. for simultaneous | ||
70 | viewfinder and still capture setup). | ||
71 | Reconfiguration is done by enabling/disabling media links created by the driver | ||
72 | during initialization. The internal device topology can be easily discovered | ||
73 | through media entity and links enumeration. | ||
74 | |||
75 | 4.2. Memory-to-memory video node | ||
76 | |||
77 | V4L2 memory-to-memory interface at /dev/video? device node. This is standalone | ||
78 | video device, it has no media pads. However please note the mem-to-mem and | ||
79 | capture video node operation on same FIMC instance is not allowed. The driver | ||
80 | detects such cases but the applications should prevent them to avoid an | ||
81 | undefined behaviour. | ||
82 | |||
83 | 4.3. Capture video node | ||
84 | |||
85 | The driver supports V4L2 Video Capture Interface as defined at: | ||
86 | http://linuxtv.org/downloads/v4l-dvb-apis/devices.html | ||
87 | |||
88 | At the capture and mem-to-mem video nodes only the multi-planar API is | ||
89 | supported. For more details see: | ||
90 | http://linuxtv.org/downloads/v4l-dvb-apis/planar-apis.html | ||
91 | |||
92 | 4.4. Camera capture subdevs | ||
93 | |||
94 | Each FIMC instance exports a sub-device node (/dev/v4l-subdev?), a sub-device | ||
95 | node is also created per each available and enabled at the platform level | ||
96 | MIPI-CSI receiver device (currently up to two). | ||
97 | |||
98 | 4.5. sysfs | ||
99 | |||
100 | In order to enable more precise camera pipeline control through the sub-device | ||
101 | API the driver creates a sysfs entry associated with "s5p-fimc-md" platform | ||
102 | device. The entry path is: /sys/platform/devices/s5p-fimc-md/subdev_conf_mode. | ||
103 | |||
104 | In typical use case there could be a following capture pipeline configuration: | ||
105 | sensor subdev -> mipi-csi subdev -> fimc subdev -> video node | ||
106 | |||
107 | When we configure these devices through sub-device API at user space, the | ||
108 | configuration flow must be from left to right, and the video node is | ||
109 | configured as last one. | ||
110 | When we don't use sub-device user space API the whole configuration of all | ||
111 | devices belonging to the pipeline is done at the video node driver. | ||
112 | The sysfs entry allows to instruct the capture node driver not to configure | ||
113 | the sub-devices (format, crop), to avoid resetting the subdevs' configuration | ||
114 | when the last configuration steps at the video node is performed. | ||
115 | |||
116 | For full sub-device control support (subdevs configured at user space before | ||
117 | starting streaming): | ||
118 | # echo "sub-dev" > /sys/platform/devices/s5p-fimc-md/subdev_conf_mode | ||
119 | |||
120 | For V4L2 video node control only (subdevs configured internally by the host | ||
121 | driver): | ||
122 | # echo "vid-dev" > /sys/platform/devices/s5p-fimc-md/subdev_conf_mode | ||
123 | This is a default option. | ||
124 | |||
125 | 5. Device mapping to video and subdev device nodes | ||
126 | ================================================== | ||
127 | |||
128 | There are associated two video device nodes with each device instance in | ||
129 | hardware - video capture and mem-to-mem and additionally a subdev node for | ||
130 | more precise FIMC capture subsystem control. In addition a separate v4l2 | ||
131 | sub-device node is created per each MIPI-CSIS device. | ||
132 | |||
133 | How to find out which /dev/video? or /dev/v4l-subdev? is assigned to which | ||
134 | device? | ||
135 | |||
136 | You can either grep through the kernel log to find relevant information, i.e. | ||
137 | # dmesg | grep -i fimc | ||
138 | (note that udev, if present, might still have rearranged the video nodes), | ||
139 | |||
140 | or retrieve the information from /dev/media? with help of the media-ctl tool: | ||
141 | # media-ctl -p | ||
142 | |||
143 | 6. Platform support | ||
144 | =================== | ||
145 | |||
146 | The machine code (plat-s5p and arch/arm/mach-*) must select following options | ||
147 | |||
148 | CONFIG_S5P_DEV_FIMC0 mandatory | ||
149 | CONFIG_S5P_DEV_FIMC1 \ | ||
150 | CONFIG_S5P_DEV_FIMC2 | optional | ||
151 | CONFIG_S5P_DEV_FIMC3 | | ||
152 | CONFIG_S5P_SETUP_FIMC / | ||
153 | CONFIG_S5P_SETUP_MIPIPHY \ | ||
154 | CONFIG_S5P_DEV_CSIS0 | optional for MIPI-CSI interface | ||
155 | CONFIG_S5P_DEV_CSIS1 / | ||
156 | |||
157 | Except that, relevant s5p_device_fimc? should be registered in the machine code | ||
158 | in addition to a "s5p-fimc-md" platform device to which the media device driver | ||
159 | is bound. The "s5p-fimc-md" device instance is required even if only mem-to-mem | ||
160 | operation is used. | ||
161 | |||
162 | The description of sensor(s) attached to FIMC/MIPI-CSIS camera inputs should be | ||
163 | passed as the "s5p-fimc-md" device platform_data. The platform data structure | ||
164 | is defined in file include/media/s5p_fimc.h. | ||
165 | |||
166 | 7. Build | ||
167 | ======== | ||
168 | |||
169 | This driver depends on following config options: | ||
170 | PLAT_S5P, | ||
171 | PM_RUNTIME, | ||
172 | I2C, | ||
173 | REGULATOR, | ||
174 | VIDEO_V4L2_SUBDEV_API, | ||
175 | |||
176 | If the driver is built as a loadable kernel module (CONFIG_VIDEO_SAMSUNG_S5P_FIMC=m) | ||
177 | two modules are created (in addition to the core v4l2 modules): s5p-fimc.ko and | ||
178 | optional s5p-csis.ko (MIPI-CSI receiver subdev). | ||
diff --git a/Documentation/video4linux/gspca.txt b/Documentation/video4linux/gspca.txt index f2060f0dc02c..e6c2842407a4 100644 --- a/Documentation/video4linux/gspca.txt +++ b/Documentation/video4linux/gspca.txt | |||
@@ -217,6 +217,7 @@ ov534_9 06f8:3003 Hercules Dualpix HD Weblog | |||
217 | sonixj 06f8:3004 Hercules Classic Silver | 217 | sonixj 06f8:3004 Hercules Classic Silver |
218 | sonixj 06f8:3008 Hercules Deluxe Optical Glass | 218 | sonixj 06f8:3008 Hercules Deluxe Optical Glass |
219 | pac7302 06f8:3009 Hercules Classic Link | 219 | pac7302 06f8:3009 Hercules Classic Link |
220 | pac7302 06f8:301b Hercules Link | ||
220 | nw80x 0728:d001 AVerMedia Camguard | 221 | nw80x 0728:d001 AVerMedia Camguard |
221 | spca508 0733:0110 ViewQuest VQ110 | 222 | spca508 0733:0110 ViewQuest VQ110 |
222 | spca501 0733:0401 Intel Create and Share | 223 | spca501 0733:0401 Intel Create and Share |
diff --git a/Documentation/video4linux/meye.txt b/Documentation/video4linux/meye.txt index 34e2842c70ae..a051152ea99c 100644 --- a/Documentation/video4linux/meye.txt +++ b/Documentation/video4linux/meye.txt | |||
@@ -55,7 +55,7 @@ Module use: | |||
55 | ----------- | 55 | ----------- |
56 | 56 | ||
57 | In order to automatically load the meye module on use, you can put those lines | 57 | In order to automatically load the meye module on use, you can put those lines |
58 | in your /etc/modprobe.conf file: | 58 | in your /etc/modprobe.d/meye.conf file: |
59 | 59 | ||
60 | alias char-major-81 videodev | 60 | alias char-major-81 videodev |
61 | alias char-major-81-0 meye | 61 | alias char-major-81-0 meye |
diff --git a/Documentation/virtual/kvm/api.txt b/Documentation/virtual/kvm/api.txt index e1d94bf4056e..6386f8c0482e 100644 --- a/Documentation/virtual/kvm/api.txt +++ b/Documentation/virtual/kvm/api.txt | |||
@@ -95,7 +95,7 @@ described as 'basic' will be available. | |||
95 | Capability: basic | 95 | Capability: basic |
96 | Architectures: all | 96 | Architectures: all |
97 | Type: system ioctl | 97 | Type: system ioctl |
98 | Parameters: none | 98 | Parameters: machine type identifier (KVM_VM_*) |
99 | Returns: a VM fd that can be used to control the new virtual machine. | 99 | Returns: a VM fd that can be used to control the new virtual machine. |
100 | 100 | ||
101 | The new VM has no virtual cpus and no memory. An mmap() of a VM fd | 101 | The new VM has no virtual cpus and no memory. An mmap() of a VM fd |
@@ -103,6 +103,11 @@ will access the virtual machine's physical address space; offset zero | |||
103 | corresponds to guest physical address zero. Use of mmap() on a VM fd | 103 | corresponds to guest physical address zero. Use of mmap() on a VM fd |
104 | is discouraged if userspace memory allocation (KVM_CAP_USER_MEMORY) is | 104 | is discouraged if userspace memory allocation (KVM_CAP_USER_MEMORY) is |
105 | available. | 105 | available. |
106 | You most certainly want to use 0 as machine type. | ||
107 | |||
108 | In order to create user controlled virtual machines on S390, check | ||
109 | KVM_CAP_S390_UCONTROL and use the flag KVM_VM_S390_UCONTROL as | ||
110 | privileged user (CAP_SYS_ADMIN). | ||
106 | 111 | ||
107 | 4.3 KVM_GET_MSR_INDEX_LIST | 112 | 4.3 KVM_GET_MSR_INDEX_LIST |
108 | 113 | ||
@@ -213,6 +218,11 @@ allocation of vcpu ids. For example, if userspace wants | |||
213 | single-threaded guest vcpus, it should make all vcpu ids be a multiple | 218 | single-threaded guest vcpus, it should make all vcpu ids be a multiple |
214 | of the number of vcpus per vcore. | 219 | of the number of vcpus per vcore. |
215 | 220 | ||
221 | For virtual cpus that have been created with S390 user controlled virtual | ||
222 | machines, the resulting vcpu fd can be memory mapped at page offset | ||
223 | KVM_S390_SIE_PAGE_OFFSET in order to obtain a memory map of the virtual | ||
224 | cpu's hardware control block. | ||
225 | |||
216 | 4.8 KVM_GET_DIRTY_LOG (vm ioctl) | 226 | 4.8 KVM_GET_DIRTY_LOG (vm ioctl) |
217 | 227 | ||
218 | Capability: basic | 228 | Capability: basic |
@@ -1159,6 +1169,14 @@ following flags are specified: | |||
1159 | 1169 | ||
1160 | /* Depends on KVM_CAP_IOMMU */ | 1170 | /* Depends on KVM_CAP_IOMMU */ |
1161 | #define KVM_DEV_ASSIGN_ENABLE_IOMMU (1 << 0) | 1171 | #define KVM_DEV_ASSIGN_ENABLE_IOMMU (1 << 0) |
1172 | /* The following two depend on KVM_CAP_PCI_2_3 */ | ||
1173 | #define KVM_DEV_ASSIGN_PCI_2_3 (1 << 1) | ||
1174 | #define KVM_DEV_ASSIGN_MASK_INTX (1 << 2) | ||
1175 | |||
1176 | If KVM_DEV_ASSIGN_PCI_2_3 is set, the kernel will manage legacy INTx interrupts | ||
1177 | via the PCI-2.3-compliant device-level mask, thus enable IRQ sharing with other | ||
1178 | assigned devices or host devices. KVM_DEV_ASSIGN_MASK_INTX specifies the | ||
1179 | guest's view on the INTx mask, see KVM_ASSIGN_SET_INTX_MASK for details. | ||
1162 | 1180 | ||
1163 | The KVM_DEV_ASSIGN_ENABLE_IOMMU flag is a mandatory option to ensure | 1181 | The KVM_DEV_ASSIGN_ENABLE_IOMMU flag is a mandatory option to ensure |
1164 | isolation of the device. Usages not specifying this flag are deprecated. | 1182 | isolation of the device. Usages not specifying this flag are deprecated. |
@@ -1399,6 +1417,71 @@ The following flags are defined: | |||
1399 | If datamatch flag is set, the event will be signaled only if the written value | 1417 | If datamatch flag is set, the event will be signaled only if the written value |
1400 | to the registered address is equal to datamatch in struct kvm_ioeventfd. | 1418 | to the registered address is equal to datamatch in struct kvm_ioeventfd. |
1401 | 1419 | ||
1420 | 4.59 KVM_DIRTY_TLB | ||
1421 | |||
1422 | Capability: KVM_CAP_SW_TLB | ||
1423 | Architectures: ppc | ||
1424 | Type: vcpu ioctl | ||
1425 | Parameters: struct kvm_dirty_tlb (in) | ||
1426 | Returns: 0 on success, -1 on error | ||
1427 | |||
1428 | struct kvm_dirty_tlb { | ||
1429 | __u64 bitmap; | ||
1430 | __u32 num_dirty; | ||
1431 | }; | ||
1432 | |||
1433 | This must be called whenever userspace has changed an entry in the shared | ||
1434 | TLB, prior to calling KVM_RUN on the associated vcpu. | ||
1435 | |||
1436 | The "bitmap" field is the userspace address of an array. This array | ||
1437 | consists of a number of bits, equal to the total number of TLB entries as | ||
1438 | determined by the last successful call to KVM_CONFIG_TLB, rounded up to the | ||
1439 | nearest multiple of 64. | ||
1440 | |||
1441 | Each bit corresponds to one TLB entry, ordered the same as in the shared TLB | ||
1442 | array. | ||
1443 | |||
1444 | The array is little-endian: the bit 0 is the least significant bit of the | ||
1445 | first byte, bit 8 is the least significant bit of the second byte, etc. | ||
1446 | This avoids any complications with differing word sizes. | ||
1447 | |||
1448 | The "num_dirty" field is a performance hint for KVM to determine whether it | ||
1449 | should skip processing the bitmap and just invalidate everything. It must | ||
1450 | be set to the number of set bits in the bitmap. | ||
1451 | |||
1452 | 4.60 KVM_ASSIGN_SET_INTX_MASK | ||
1453 | |||
1454 | Capability: KVM_CAP_PCI_2_3 | ||
1455 | Architectures: x86 | ||
1456 | Type: vm ioctl | ||
1457 | Parameters: struct kvm_assigned_pci_dev (in) | ||
1458 | Returns: 0 on success, -1 on error | ||
1459 | |||
1460 | Allows userspace to mask PCI INTx interrupts from the assigned device. The | ||
1461 | kernel will not deliver INTx interrupts to the guest between setting and | ||
1462 | clearing of KVM_ASSIGN_SET_INTX_MASK via this interface. This enables use of | ||
1463 | and emulation of PCI 2.3 INTx disable command register behavior. | ||
1464 | |||
1465 | This may be used for both PCI 2.3 devices supporting INTx disable natively and | ||
1466 | older devices lacking this support. Userspace is responsible for emulating the | ||
1467 | read value of the INTx disable bit in the guest visible PCI command register. | ||
1468 | When modifying the INTx disable state, userspace should precede updating the | ||
1469 | physical device command register by calling this ioctl to inform the kernel of | ||
1470 | the new intended INTx mask state. | ||
1471 | |||
1472 | Note that the kernel uses the device INTx disable bit to internally manage the | ||
1473 | device interrupt state for PCI 2.3 devices. Reads of this register may | ||
1474 | therefore not match the expected value. Writes should always use the guest | ||
1475 | intended INTx disable value rather than attempting to read-copy-update the | ||
1476 | current physical device state. Races between user and kernel updates to the | ||
1477 | INTx disable bit are handled lazily in the kernel. It's possible the device | ||
1478 | may generate unintended interrupts, but they will not be injected into the | ||
1479 | guest. | ||
1480 | |||
1481 | See KVM_ASSIGN_DEV_IRQ for the data structure. The target device is specified | ||
1482 | by assigned_dev_id. In the flags field, only KVM_DEV_ASSIGN_MASK_INTX is | ||
1483 | evaluated. | ||
1484 | |||
1402 | 4.62 KVM_CREATE_SPAPR_TCE | 1485 | 4.62 KVM_CREATE_SPAPR_TCE |
1403 | 1486 | ||
1404 | Capability: KVM_CAP_SPAPR_TCE | 1487 | Capability: KVM_CAP_SPAPR_TCE |
@@ -1491,6 +1574,101 @@ following algorithm: | |||
1491 | Some guests configure the LINT1 NMI input to cause a panic, aiding in | 1574 | Some guests configure the LINT1 NMI input to cause a panic, aiding in |
1492 | debugging. | 1575 | debugging. |
1493 | 1576 | ||
1577 | 4.65 KVM_S390_UCAS_MAP | ||
1578 | |||
1579 | Capability: KVM_CAP_S390_UCONTROL | ||
1580 | Architectures: s390 | ||
1581 | Type: vcpu ioctl | ||
1582 | Parameters: struct kvm_s390_ucas_mapping (in) | ||
1583 | Returns: 0 in case of success | ||
1584 | |||
1585 | The parameter is defined like this: | ||
1586 | struct kvm_s390_ucas_mapping { | ||
1587 | __u64 user_addr; | ||
1588 | __u64 vcpu_addr; | ||
1589 | __u64 length; | ||
1590 | }; | ||
1591 | |||
1592 | This ioctl maps the memory at "user_addr" with the length "length" to | ||
1593 | the vcpu's address space starting at "vcpu_addr". All parameters need to | ||
1594 | be alligned by 1 megabyte. | ||
1595 | |||
1596 | 4.66 KVM_S390_UCAS_UNMAP | ||
1597 | |||
1598 | Capability: KVM_CAP_S390_UCONTROL | ||
1599 | Architectures: s390 | ||
1600 | Type: vcpu ioctl | ||
1601 | Parameters: struct kvm_s390_ucas_mapping (in) | ||
1602 | Returns: 0 in case of success | ||
1603 | |||
1604 | The parameter is defined like this: | ||
1605 | struct kvm_s390_ucas_mapping { | ||
1606 | __u64 user_addr; | ||
1607 | __u64 vcpu_addr; | ||
1608 | __u64 length; | ||
1609 | }; | ||
1610 | |||
1611 | This ioctl unmaps the memory in the vcpu's address space starting at | ||
1612 | "vcpu_addr" with the length "length". The field "user_addr" is ignored. | ||
1613 | All parameters need to be alligned by 1 megabyte. | ||
1614 | |||
1615 | 4.67 KVM_S390_VCPU_FAULT | ||
1616 | |||
1617 | Capability: KVM_CAP_S390_UCONTROL | ||
1618 | Architectures: s390 | ||
1619 | Type: vcpu ioctl | ||
1620 | Parameters: vcpu absolute address (in) | ||
1621 | Returns: 0 in case of success | ||
1622 | |||
1623 | This call creates a page table entry on the virtual cpu's address space | ||
1624 | (for user controlled virtual machines) or the virtual machine's address | ||
1625 | space (for regular virtual machines). This only works for minor faults, | ||
1626 | thus it's recommended to access subject memory page via the user page | ||
1627 | table upfront. This is useful to handle validity intercepts for user | ||
1628 | controlled virtual machines to fault in the virtual cpu's lowcore pages | ||
1629 | prior to calling the KVM_RUN ioctl. | ||
1630 | |||
1631 | 4.68 KVM_SET_ONE_REG | ||
1632 | |||
1633 | Capability: KVM_CAP_ONE_REG | ||
1634 | Architectures: all | ||
1635 | Type: vcpu ioctl | ||
1636 | Parameters: struct kvm_one_reg (in) | ||
1637 | Returns: 0 on success, negative value on failure | ||
1638 | |||
1639 | struct kvm_one_reg { | ||
1640 | __u64 id; | ||
1641 | __u64 addr; | ||
1642 | }; | ||
1643 | |||
1644 | Using this ioctl, a single vcpu register can be set to a specific value | ||
1645 | defined by user space with the passed in struct kvm_one_reg, where id | ||
1646 | refers to the register identifier as described below and addr is a pointer | ||
1647 | to a variable with the respective size. There can be architecture agnostic | ||
1648 | and architecture specific registers. Each have their own range of operation | ||
1649 | and their own constants and width. To keep track of the implemented | ||
1650 | registers, find a list below: | ||
1651 | |||
1652 | Arch | Register | Width (bits) | ||
1653 | | | | ||
1654 | PPC | KVM_REG_PPC_HIOR | 64 | ||
1655 | |||
1656 | 4.69 KVM_GET_ONE_REG | ||
1657 | |||
1658 | Capability: KVM_CAP_ONE_REG | ||
1659 | Architectures: all | ||
1660 | Type: vcpu ioctl | ||
1661 | Parameters: struct kvm_one_reg (in and out) | ||
1662 | Returns: 0 on success, negative value on failure | ||
1663 | |||
1664 | This ioctl allows to receive the value of a single register implemented | ||
1665 | in a vcpu. The register to read is indicated by the "id" field of the | ||
1666 | kvm_one_reg struct passed in. On success, the register value can be found | ||
1667 | at the memory location pointed to by "addr". | ||
1668 | |||
1669 | The list of registers accessible using this interface is identical to the | ||
1670 | list in 4.64. | ||
1671 | |||
1494 | 5. The kvm_run structure | 1672 | 5. The kvm_run structure |
1495 | 1673 | ||
1496 | Application code obtains a pointer to the kvm_run structure by | 1674 | Application code obtains a pointer to the kvm_run structure by |
@@ -1651,6 +1829,20 @@ s390 specific. | |||
1651 | 1829 | ||
1652 | s390 specific. | 1830 | s390 specific. |
1653 | 1831 | ||
1832 | /* KVM_EXIT_S390_UCONTROL */ | ||
1833 | struct { | ||
1834 | __u64 trans_exc_code; | ||
1835 | __u32 pgm_code; | ||
1836 | } s390_ucontrol; | ||
1837 | |||
1838 | s390 specific. A page fault has occurred for a user controlled virtual | ||
1839 | machine (KVM_VM_S390_UNCONTROL) on it's host page table that cannot be | ||
1840 | resolved by the kernel. | ||
1841 | The program code and the translation exception code that were placed | ||
1842 | in the cpu's lowcore are presented here as defined by the z Architecture | ||
1843 | Principles of Operation Book in the Chapter for Dynamic Address Translation | ||
1844 | (DAT) | ||
1845 | |||
1654 | /* KVM_EXIT_DCR */ | 1846 | /* KVM_EXIT_DCR */ |
1655 | struct { | 1847 | struct { |
1656 | __u32 dcrn; | 1848 | __u32 dcrn; |
@@ -1693,6 +1885,29 @@ developer registration required to access it). | |||
1693 | /* Fix the size of the union. */ | 1885 | /* Fix the size of the union. */ |
1694 | char padding[256]; | 1886 | char padding[256]; |
1695 | }; | 1887 | }; |
1888 | |||
1889 | /* | ||
1890 | * shared registers between kvm and userspace. | ||
1891 | * kvm_valid_regs specifies the register classes set by the host | ||
1892 | * kvm_dirty_regs specified the register classes dirtied by userspace | ||
1893 | * struct kvm_sync_regs is architecture specific, as well as the | ||
1894 | * bits for kvm_valid_regs and kvm_dirty_regs | ||
1895 | */ | ||
1896 | __u64 kvm_valid_regs; | ||
1897 | __u64 kvm_dirty_regs; | ||
1898 | union { | ||
1899 | struct kvm_sync_regs regs; | ||
1900 | char padding[1024]; | ||
1901 | } s; | ||
1902 | |||
1903 | If KVM_CAP_SYNC_REGS is defined, these fields allow userspace to access | ||
1904 | certain guest registers without having to call SET/GET_*REGS. Thus we can | ||
1905 | avoid some system call overhead if userspace has to handle the exit. | ||
1906 | Userspace can query the validity of the structure by checking | ||
1907 | kvm_valid_regs for specific bits. These bits are architecture specific | ||
1908 | and usually define the validity of a groups of registers. (e.g. one bit | ||
1909 | for general purpose registers) | ||
1910 | |||
1696 | }; | 1911 | }; |
1697 | 1912 | ||
1698 | 6. Capabilities that can be enabled | 1913 | 6. Capabilities that can be enabled |
@@ -1741,3 +1956,45 @@ HTAB address part of SDR1 contains an HVA instead of a GPA, as PAPR keeps the | |||
1741 | HTAB invisible to the guest. | 1956 | HTAB invisible to the guest. |
1742 | 1957 | ||
1743 | When this capability is enabled, KVM_EXIT_PAPR_HCALL can occur. | 1958 | When this capability is enabled, KVM_EXIT_PAPR_HCALL can occur. |
1959 | |||
1960 | 6.3 KVM_CAP_SW_TLB | ||
1961 | |||
1962 | Architectures: ppc | ||
1963 | Parameters: args[0] is the address of a struct kvm_config_tlb | ||
1964 | Returns: 0 on success; -1 on error | ||
1965 | |||
1966 | struct kvm_config_tlb { | ||
1967 | __u64 params; | ||
1968 | __u64 array; | ||
1969 | __u32 mmu_type; | ||
1970 | __u32 array_len; | ||
1971 | }; | ||
1972 | |||
1973 | Configures the virtual CPU's TLB array, establishing a shared memory area | ||
1974 | between userspace and KVM. The "params" and "array" fields are userspace | ||
1975 | addresses of mmu-type-specific data structures. The "array_len" field is an | ||
1976 | safety mechanism, and should be set to the size in bytes of the memory that | ||
1977 | userspace has reserved for the array. It must be at least the size dictated | ||
1978 | by "mmu_type" and "params". | ||
1979 | |||
1980 | While KVM_RUN is active, the shared region is under control of KVM. Its | ||
1981 | contents are undefined, and any modification by userspace results in | ||
1982 | boundedly undefined behavior. | ||
1983 | |||
1984 | On return from KVM_RUN, the shared region will reflect the current state of | ||
1985 | the guest's TLB. If userspace makes any changes, it must call KVM_DIRTY_TLB | ||
1986 | to tell KVM which entries have been changed, prior to calling KVM_RUN again | ||
1987 | on this vcpu. | ||
1988 | |||
1989 | For mmu types KVM_MMU_FSL_BOOKE_NOHV and KVM_MMU_FSL_BOOKE_HV: | ||
1990 | - The "params" field is of type "struct kvm_book3e_206_tlb_params". | ||
1991 | - The "array" field points to an array of type "struct | ||
1992 | kvm_book3e_206_tlb_entry". | ||
1993 | - The array consists of all entries in the first TLB, followed by all | ||
1994 | entries in the second TLB. | ||
1995 | - Within a TLB, entries are ordered first by increasing set number. Within a | ||
1996 | set, entries are ordered by way (increasing ESEL). | ||
1997 | - The hash for determining set number in TLB0 is: (MAS2 >> 12) & (num_sets - 1) | ||
1998 | where "num_sets" is the tlb_sizes[] value divided by the tlb_ways[] value. | ||
1999 | - The tsize field of mas1 shall be set to 4K on TLB0, even though the | ||
2000 | hardware ignores this value for TLB0. | ||
diff --git a/Documentation/virtual/kvm/ppc-pv.txt b/Documentation/virtual/kvm/ppc-pv.txt index 2b7ce190cde4..6e7c37050930 100644 --- a/Documentation/virtual/kvm/ppc-pv.txt +++ b/Documentation/virtual/kvm/ppc-pv.txt | |||
@@ -81,28 +81,8 @@ additional registers to the magic page. If you add fields to the magic page, | |||
81 | also define a new hypercall feature to indicate that the host can give you more | 81 | also define a new hypercall feature to indicate that the host can give you more |
82 | registers. Only if the host supports the additional features, make use of them. | 82 | registers. Only if the host supports the additional features, make use of them. |
83 | 83 | ||
84 | The magic page has the following layout as described in | 84 | The magic page layout is described by struct kvm_vcpu_arch_shared |
85 | arch/powerpc/include/asm/kvm_para.h: | 85 | in arch/powerpc/include/asm/kvm_para.h. |
86 | |||
87 | struct kvm_vcpu_arch_shared { | ||
88 | __u64 scratch1; | ||
89 | __u64 scratch2; | ||
90 | __u64 scratch3; | ||
91 | __u64 critical; /* Guest may not get interrupts if == r1 */ | ||
92 | __u64 sprg0; | ||
93 | __u64 sprg1; | ||
94 | __u64 sprg2; | ||
95 | __u64 sprg3; | ||
96 | __u64 srr0; | ||
97 | __u64 srr1; | ||
98 | __u64 dar; | ||
99 | __u64 msr; | ||
100 | __u32 dsisr; | ||
101 | __u32 int_pending; /* Tells the guest if we have an interrupt */ | ||
102 | }; | ||
103 | |||
104 | Additions to the page must only occur at the end. Struct fields are always 32 | ||
105 | or 64 bit aligned, depending on them being 32 or 64 bit wide respectively. | ||
106 | 86 | ||
107 | Magic page features | 87 | Magic page features |
108 | =================== | 88 | =================== |
diff --git a/Documentation/vm/Makefile b/Documentation/vm/Makefile deleted file mode 100644 index 3fa4d0668864..000000000000 --- a/Documentation/vm/Makefile +++ /dev/null | |||
@@ -1,8 +0,0 @@ | |||
1 | # kbuild trick to avoid linker error. Can be omitted if a module is built. | ||
2 | obj- := dummy.o | ||
3 | |||
4 | # List of programs to build | ||
5 | hostprogs-y := page-types hugepage-mmap hugepage-shm map_hugetlb | ||
6 | |||
7 | # Tell kbuild to always build the programs | ||
8 | always := $(hostprogs-y) | ||
diff --git a/Documentation/vm/cleancache.txt b/Documentation/vm/cleancache.txt index d5c615af10ba..142fbb0f325a 100644 --- a/Documentation/vm/cleancache.txt +++ b/Documentation/vm/cleancache.txt | |||
@@ -46,10 +46,11 @@ a negative return value indicates failure. A "put_page" will copy a | |||
46 | the pool id, a file key, and a page index into the file. (The combination | 46 | the pool id, a file key, and a page index into the file. (The combination |
47 | of a pool id, a file key, and an index is sometimes called a "handle".) | 47 | of a pool id, a file key, and an index is sometimes called a "handle".) |
48 | A "get_page" will copy the page, if found, from cleancache into kernel memory. | 48 | A "get_page" will copy the page, if found, from cleancache into kernel memory. |
49 | A "flush_page" will ensure the page no longer is present in cleancache; | 49 | An "invalidate_page" will ensure the page no longer is present in cleancache; |
50 | a "flush_inode" will flush all pages associated with the specified file; | 50 | an "invalidate_inode" will invalidate all pages associated with the specified |
51 | and, when a filesystem is unmounted, a "flush_fs" will flush all pages in | 51 | file; and, when a filesystem is unmounted, an "invalidate_fs" will invalidate |
52 | all files specified by the given pool id and also surrender the pool id. | 52 | all pages in all files specified by the given pool id and also surrender |
53 | the pool id. | ||
53 | 54 | ||
54 | An "init_shared_fs", like init_fs, obtains a pool id but tells cleancache | 55 | An "init_shared_fs", like init_fs, obtains a pool id but tells cleancache |
55 | to treat the pool as shared using a 128-bit UUID as a key. On systems | 56 | to treat the pool as shared using a 128-bit UUID as a key. On systems |
@@ -62,12 +63,12 @@ of the kernel (e.g. by "tools" that control cleancache). Or a | |||
62 | cleancache implementation can simply disable shared_init by always | 63 | cleancache implementation can simply disable shared_init by always |
63 | returning a negative value. | 64 | returning a negative value. |
64 | 65 | ||
65 | If a get_page is successful on a non-shared pool, the page is flushed (thus | 66 | If a get_page is successful on a non-shared pool, the page is invalidated |
66 | making cleancache an "exclusive" cache). On a shared pool, the page | 67 | (thus making cleancache an "exclusive" cache). On a shared pool, the page |
67 | is NOT flushed on a successful get_page so that it remains accessible to | 68 | is NOT invalidated on a successful get_page so that it remains accessible to |
68 | other sharers. The kernel is responsible for ensuring coherency between | 69 | other sharers. The kernel is responsible for ensuring coherency between |
69 | cleancache (shared or not), the page cache, and the filesystem, using | 70 | cleancache (shared or not), the page cache, and the filesystem, using |
70 | cleancache flush operations as required. | 71 | cleancache invalidate operations as required. |
71 | 72 | ||
72 | Note that cleancache must enforce put-put-get coherency and get-get | 73 | Note that cleancache must enforce put-put-get coherency and get-get |
73 | coherency. For the former, if two puts are made to the same handle but | 74 | coherency. For the former, if two puts are made to the same handle but |
@@ -77,20 +78,20 @@ if a get for a given handle fails, subsequent gets for that handle will | |||
77 | never succeed unless preceded by a successful put with that handle. | 78 | never succeed unless preceded by a successful put with that handle. |
78 | 79 | ||
79 | Last, cleancache provides no SMP serialization guarantees; if two | 80 | Last, cleancache provides no SMP serialization guarantees; if two |
80 | different Linux threads are simultaneously putting and flushing a page | 81 | different Linux threads are simultaneously putting and invalidating a page |
81 | with the same handle, the results are indeterminate. Callers must | 82 | with the same handle, the results are indeterminate. Callers must |
82 | lock the page to ensure serial behavior. | 83 | lock the page to ensure serial behavior. |
83 | 84 | ||
84 | CLEANCACHE PERFORMANCE METRICS | 85 | CLEANCACHE PERFORMANCE METRICS |
85 | 86 | ||
86 | Cleancache monitoring is done by sysfs files in the | 87 | If properly configured, monitoring of cleancache is done via debugfs in |
87 | /sys/kernel/mm/cleancache directory. The effectiveness of cleancache | 88 | the /sys/kernel/debug/mm/cleancache directory. The effectiveness of cleancache |
88 | can be measured (across all filesystems) with: | 89 | can be measured (across all filesystems) with: |
89 | 90 | ||
90 | succ_gets - number of gets that were successful | 91 | succ_gets - number of gets that were successful |
91 | failed_gets - number of gets that failed | 92 | failed_gets - number of gets that failed |
92 | puts - number of puts attempted (all "succeed") | 93 | puts - number of puts attempted (all "succeed") |
93 | flushes - number of flushes attempted | 94 | invalidates - number of invalidates attempted |
94 | 95 | ||
95 | A backend implementation may provide additional metrics. | 96 | A backend implementation may provide additional metrics. |
96 | 97 | ||
@@ -143,7 +144,7 @@ systems. | |||
143 | 144 | ||
144 | The core hooks for cleancache in VFS are in most cases a single line | 145 | The core hooks for cleancache in VFS are in most cases a single line |
145 | and the minimum set are placed precisely where needed to maintain | 146 | and the minimum set are placed precisely where needed to maintain |
146 | coherency (via cleancache_flush operations) between cleancache, | 147 | coherency (via cleancache_invalidate operations) between cleancache, |
147 | the page cache, and disk. All hooks compile into nothingness if | 148 | the page cache, and disk. All hooks compile into nothingness if |
148 | cleancache is config'ed off and turn into a function-pointer- | 149 | cleancache is config'ed off and turn into a function-pointer- |
149 | compare-to-NULL if config'ed on but no backend claims the ops | 150 | compare-to-NULL if config'ed on but no backend claims the ops |
@@ -184,15 +185,15 @@ or for real kernel-addressable RAM, it makes perfect sense for | |||
184 | transcendent memory. | 185 | transcendent memory. |
185 | 186 | ||
186 | 4) Why is non-shared cleancache "exclusive"? And where is the | 187 | 4) Why is non-shared cleancache "exclusive"? And where is the |
187 | page "flushed" after a "get"? (Minchan Kim) | 188 | page "invalidated" after a "get"? (Minchan Kim) |
188 | 189 | ||
189 | The main reason is to free up space in transcendent memory and | 190 | The main reason is to free up space in transcendent memory and |
190 | to avoid unnecessary cleancache_flush calls. If you want inclusive, | 191 | to avoid unnecessary cleancache_invalidate calls. If you want inclusive, |
191 | the page can be "put" immediately following the "get". If | 192 | the page can be "put" immediately following the "get". If |
192 | put-after-get for inclusive becomes common, the interface could | 193 | put-after-get for inclusive becomes common, the interface could |
193 | be easily extended to add a "get_no_flush" call. | 194 | be easily extended to add a "get_no_invalidate" call. |
194 | 195 | ||
195 | The flush is done by the cleancache backend implementation. | 196 | The invalidate is done by the cleancache backend implementation. |
196 | 197 | ||
197 | 5) What's the performance impact? | 198 | 5) What's the performance impact? |
198 | 199 | ||
@@ -222,7 +223,7 @@ Some points for a filesystem to consider: | |||
222 | as tmpfs should not enable cleancache) | 223 | as tmpfs should not enable cleancache) |
223 | - To ensure coherency/correctness, the FS must ensure that all | 224 | - To ensure coherency/correctness, the FS must ensure that all |
224 | file removal or truncation operations either go through VFS or | 225 | file removal or truncation operations either go through VFS or |
225 | add hooks to do the equivalent cleancache "flush" operations | 226 | add hooks to do the equivalent cleancache "invalidate" operations |
226 | - To ensure coherency/correctness, either inode numbers must | 227 | - To ensure coherency/correctness, either inode numbers must |
227 | be unique across the lifetime of the on-disk file OR the | 228 | be unique across the lifetime of the on-disk file OR the |
228 | FS must provide an "encode_fh" function. | 229 | FS must provide an "encode_fh" function. |
@@ -243,11 +244,11 @@ If cleancache would use the inode virtual address instead of | |||
243 | inode/filehandle, the pool id could be eliminated. But, this | 244 | inode/filehandle, the pool id could be eliminated. But, this |
244 | won't work because cleancache retains pagecache data pages | 245 | won't work because cleancache retains pagecache data pages |
245 | persistently even when the inode has been pruned from the | 246 | persistently even when the inode has been pruned from the |
246 | inode unused list, and only flushes the data page if the file | 247 | inode unused list, and only invalidates the data page if the file |
247 | gets removed/truncated. So if cleancache used the inode kva, | 248 | gets removed/truncated. So if cleancache used the inode kva, |
248 | there would be potential coherency issues if/when the inode | 249 | there would be potential coherency issues if/when the inode |
249 | kva is reused for a different file. Alternately, if cleancache | 250 | kva is reused for a different file. Alternately, if cleancache |
250 | flushed the pages when the inode kva was freed, much of the value | 251 | invalidated the pages when the inode kva was freed, much of the value |
251 | of cleancache would be lost because the cache of pages in cleanache | 252 | of cleancache would be lost because the cache of pages in cleanache |
252 | is potentially much larger than the kernel pagecache and is most | 253 | is potentially much larger than the kernel pagecache and is most |
253 | useful if the pages survive inode cache removal. | 254 | useful if the pages survive inode cache removal. |
diff --git a/Documentation/vm/hugepage-mmap.c b/Documentation/vm/hugepage-mmap.c deleted file mode 100644 index db0dd9a33d54..000000000000 --- a/Documentation/vm/hugepage-mmap.c +++ /dev/null | |||
@@ -1,91 +0,0 @@ | |||
1 | /* | ||
2 | * hugepage-mmap: | ||
3 | * | ||
4 | * Example of using huge page memory in a user application using the mmap | ||
5 | * system call. Before running this application, make sure that the | ||
6 | * administrator has mounted the hugetlbfs filesystem (on some directory | ||
7 | * like /mnt) using the command mount -t hugetlbfs nodev /mnt. In this | ||
8 | * example, the app is requesting memory of size 256MB that is backed by | ||
9 | * huge pages. | ||
10 | * | ||
11 | * For the ia64 architecture, the Linux kernel reserves Region number 4 for | ||
12 | * huge pages. That means that if one requires a fixed address, a huge page | ||
13 | * aligned address starting with 0x800000... will be required. If a fixed | ||
14 | * address is not required, the kernel will select an address in the proper | ||
15 | * range. | ||
16 | * Other architectures, such as ppc64, i386 or x86_64 are not so constrained. | ||
17 | */ | ||
18 | |||
19 | #include <stdlib.h> | ||
20 | #include <stdio.h> | ||
21 | #include <unistd.h> | ||
22 | #include <sys/mman.h> | ||
23 | #include <fcntl.h> | ||
24 | |||
25 | #define FILE_NAME "/mnt/hugepagefile" | ||
26 | #define LENGTH (256UL*1024*1024) | ||
27 | #define PROTECTION (PROT_READ | PROT_WRITE) | ||
28 | |||
29 | /* Only ia64 requires this */ | ||
30 | #ifdef __ia64__ | ||
31 | #define ADDR (void *)(0x8000000000000000UL) | ||
32 | #define FLAGS (MAP_SHARED | MAP_FIXED) | ||
33 | #else | ||
34 | #define ADDR (void *)(0x0UL) | ||
35 | #define FLAGS (MAP_SHARED) | ||
36 | #endif | ||
37 | |||
38 | static void check_bytes(char *addr) | ||
39 | { | ||
40 | printf("First hex is %x\n", *((unsigned int *)addr)); | ||
41 | } | ||
42 | |||
43 | static void write_bytes(char *addr) | ||
44 | { | ||
45 | unsigned long i; | ||
46 | |||
47 | for (i = 0; i < LENGTH; i++) | ||
48 | *(addr + i) = (char)i; | ||
49 | } | ||
50 | |||
51 | static void read_bytes(char *addr) | ||
52 | { | ||
53 | unsigned long i; | ||
54 | |||
55 | check_bytes(addr); | ||
56 | for (i = 0; i < LENGTH; i++) | ||
57 | if (*(addr + i) != (char)i) { | ||
58 | printf("Mismatch at %lu\n", i); | ||
59 | break; | ||
60 | } | ||
61 | } | ||
62 | |||
63 | int main(void) | ||
64 | { | ||
65 | void *addr; | ||
66 | int fd; | ||
67 | |||
68 | fd = open(FILE_NAME, O_CREAT | O_RDWR, 0755); | ||
69 | if (fd < 0) { | ||
70 | perror("Open failed"); | ||
71 | exit(1); | ||
72 | } | ||
73 | |||
74 | addr = mmap(ADDR, LENGTH, PROTECTION, FLAGS, fd, 0); | ||
75 | if (addr == MAP_FAILED) { | ||
76 | perror("mmap"); | ||
77 | unlink(FILE_NAME); | ||
78 | exit(1); | ||
79 | } | ||
80 | |||
81 | printf("Returned address is %p\n", addr); | ||
82 | check_bytes(addr); | ||
83 | write_bytes(addr); | ||
84 | read_bytes(addr); | ||
85 | |||
86 | munmap(addr, LENGTH); | ||
87 | close(fd); | ||
88 | unlink(FILE_NAME); | ||
89 | |||
90 | return 0; | ||
91 | } | ||
diff --git a/Documentation/vm/hugepage-shm.c b/Documentation/vm/hugepage-shm.c deleted file mode 100644 index 07956d8592c9..000000000000 --- a/Documentation/vm/hugepage-shm.c +++ /dev/null | |||
@@ -1,98 +0,0 @@ | |||
1 | /* | ||
2 | * hugepage-shm: | ||
3 | * | ||
4 | * Example of using huge page memory in a user application using Sys V shared | ||
5 | * memory system calls. In this example the app is requesting 256MB of | ||
6 | * memory that is backed by huge pages. The application uses the flag | ||
7 | * SHM_HUGETLB in the shmget system call to inform the kernel that it is | ||
8 | * requesting huge pages. | ||
9 | * | ||
10 | * For the ia64 architecture, the Linux kernel reserves Region number 4 for | ||
11 | * huge pages. That means that if one requires a fixed address, a huge page | ||
12 | * aligned address starting with 0x800000... will be required. If a fixed | ||
13 | * address is not required, the kernel will select an address in the proper | ||
14 | * range. | ||
15 | * Other architectures, such as ppc64, i386 or x86_64 are not so constrained. | ||
16 | * | ||
17 | * Note: The default shared memory limit is quite low on many kernels, | ||
18 | * you may need to increase it via: | ||
19 | * | ||
20 | * echo 268435456 > /proc/sys/kernel/shmmax | ||
21 | * | ||
22 | * This will increase the maximum size per shared memory segment to 256MB. | ||
23 | * The other limit that you will hit eventually is shmall which is the | ||
24 | * total amount of shared memory in pages. To set it to 16GB on a system | ||
25 | * with a 4kB pagesize do: | ||
26 | * | ||
27 | * echo 4194304 > /proc/sys/kernel/shmall | ||
28 | */ | ||
29 | |||
30 | #include <stdlib.h> | ||
31 | #include <stdio.h> | ||
32 | #include <sys/types.h> | ||
33 | #include <sys/ipc.h> | ||
34 | #include <sys/shm.h> | ||
35 | #include <sys/mman.h> | ||
36 | |||
37 | #ifndef SHM_HUGETLB | ||
38 | #define SHM_HUGETLB 04000 | ||
39 | #endif | ||
40 | |||
41 | #define LENGTH (256UL*1024*1024) | ||
42 | |||
43 | #define dprintf(x) printf(x) | ||
44 | |||
45 | /* Only ia64 requires this */ | ||
46 | #ifdef __ia64__ | ||
47 | #define ADDR (void *)(0x8000000000000000UL) | ||
48 | #define SHMAT_FLAGS (SHM_RND) | ||
49 | #else | ||
50 | #define ADDR (void *)(0x0UL) | ||
51 | #define SHMAT_FLAGS (0) | ||
52 | #endif | ||
53 | |||
54 | int main(void) | ||
55 | { | ||
56 | int shmid; | ||
57 | unsigned long i; | ||
58 | char *shmaddr; | ||
59 | |||
60 | if ((shmid = shmget(2, LENGTH, | ||
61 | SHM_HUGETLB | IPC_CREAT | SHM_R | SHM_W)) < 0) { | ||
62 | perror("shmget"); | ||
63 | exit(1); | ||
64 | } | ||
65 | printf("shmid: 0x%x\n", shmid); | ||
66 | |||
67 | shmaddr = shmat(shmid, ADDR, SHMAT_FLAGS); | ||
68 | if (shmaddr == (char *)-1) { | ||
69 | perror("Shared memory attach failure"); | ||
70 | shmctl(shmid, IPC_RMID, NULL); | ||
71 | exit(2); | ||
72 | } | ||
73 | printf("shmaddr: %p\n", shmaddr); | ||
74 | |||
75 | dprintf("Starting the writes:\n"); | ||
76 | for (i = 0; i < LENGTH; i++) { | ||
77 | shmaddr[i] = (char)(i); | ||
78 | if (!(i % (1024 * 1024))) | ||
79 | dprintf("."); | ||
80 | } | ||
81 | dprintf("\n"); | ||
82 | |||
83 | dprintf("Starting the Check..."); | ||
84 | for (i = 0; i < LENGTH; i++) | ||
85 | if (shmaddr[i] != (char)i) | ||
86 | printf("\nIndex %lu mismatched\n", i); | ||
87 | dprintf("Done.\n"); | ||
88 | |||
89 | if (shmdt((const void *)shmaddr) != 0) { | ||
90 | perror("Detach failure"); | ||
91 | shmctl(shmid, IPC_RMID, NULL); | ||
92 | exit(3); | ||
93 | } | ||
94 | |||
95 | shmctl(shmid, IPC_RMID, NULL); | ||
96 | |||
97 | return 0; | ||
98 | } | ||
diff --git a/Documentation/vm/map_hugetlb.c b/Documentation/vm/map_hugetlb.c deleted file mode 100644 index eda1a6d3578a..000000000000 --- a/Documentation/vm/map_hugetlb.c +++ /dev/null | |||
@@ -1,77 +0,0 @@ | |||
1 | /* | ||
2 | * Example of using hugepage memory in a user application using the mmap | ||
3 | * system call with MAP_HUGETLB flag. Before running this program make | ||
4 | * sure the administrator has allocated enough default sized huge pages | ||
5 | * to cover the 256 MB allocation. | ||
6 | * | ||
7 | * For ia64 architecture, Linux kernel reserves Region number 4 for hugepages. | ||
8 | * That means the addresses starting with 0x800000... will need to be | ||
9 | * specified. Specifying a fixed address is not required on ppc64, i386 | ||
10 | * or x86_64. | ||
11 | */ | ||
12 | #include <stdlib.h> | ||
13 | #include <stdio.h> | ||
14 | #include <unistd.h> | ||
15 | #include <sys/mman.h> | ||
16 | #include <fcntl.h> | ||
17 | |||
18 | #define LENGTH (256UL*1024*1024) | ||
19 | #define PROTECTION (PROT_READ | PROT_WRITE) | ||
20 | |||
21 | #ifndef MAP_HUGETLB | ||
22 | #define MAP_HUGETLB 0x40000 /* arch specific */ | ||
23 | #endif | ||
24 | |||
25 | /* Only ia64 requires this */ | ||
26 | #ifdef __ia64__ | ||
27 | #define ADDR (void *)(0x8000000000000000UL) | ||
28 | #define FLAGS (MAP_PRIVATE | MAP_ANONYMOUS | MAP_HUGETLB | MAP_FIXED) | ||
29 | #else | ||
30 | #define ADDR (void *)(0x0UL) | ||
31 | #define FLAGS (MAP_PRIVATE | MAP_ANONYMOUS | MAP_HUGETLB) | ||
32 | #endif | ||
33 | |||
34 | static void check_bytes(char *addr) | ||
35 | { | ||
36 | printf("First hex is %x\n", *((unsigned int *)addr)); | ||
37 | } | ||
38 | |||
39 | static void write_bytes(char *addr) | ||
40 | { | ||
41 | unsigned long i; | ||
42 | |||
43 | for (i = 0; i < LENGTH; i++) | ||
44 | *(addr + i) = (char)i; | ||
45 | } | ||
46 | |||
47 | static void read_bytes(char *addr) | ||
48 | { | ||
49 | unsigned long i; | ||
50 | |||
51 | check_bytes(addr); | ||
52 | for (i = 0; i < LENGTH; i++) | ||
53 | if (*(addr + i) != (char)i) { | ||
54 | printf("Mismatch at %lu\n", i); | ||
55 | break; | ||
56 | } | ||
57 | } | ||
58 | |||
59 | int main(void) | ||
60 | { | ||
61 | void *addr; | ||
62 | |||
63 | addr = mmap(ADDR, LENGTH, PROTECTION, FLAGS, 0, 0); | ||
64 | if (addr == MAP_FAILED) { | ||
65 | perror("mmap"); | ||
66 | exit(1); | ||
67 | } | ||
68 | |||
69 | printf("Returned address is %p\n", addr); | ||
70 | check_bytes(addr); | ||
71 | write_bytes(addr); | ||
72 | read_bytes(addr); | ||
73 | |||
74 | munmap(addr, LENGTH); | ||
75 | |||
76 | return 0; | ||
77 | } | ||
diff --git a/Documentation/vm/page-types.c b/Documentation/vm/page-types.c deleted file mode 100644 index 7445caa26d05..000000000000 --- a/Documentation/vm/page-types.c +++ /dev/null | |||
@@ -1,1100 +0,0 @@ | |||
1 | /* | ||
2 | * page-types: Tool for querying page flags | ||
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 | * | ||
17 | * Copyright (C) 2009 Intel corporation | ||
18 | * | ||
19 | * Authors: Wu Fengguang <fengguang.wu@intel.com> | ||
20 | */ | ||
21 | |||
22 | #define _LARGEFILE64_SOURCE | ||
23 | #include <stdio.h> | ||
24 | #include <stdlib.h> | ||
25 | #include <unistd.h> | ||
26 | #include <stdint.h> | ||
27 | #include <stdarg.h> | ||
28 | #include <string.h> | ||
29 | #include <getopt.h> | ||
30 | #include <limits.h> | ||
31 | #include <assert.h> | ||
32 | #include <sys/types.h> | ||
33 | #include <sys/errno.h> | ||
34 | #include <sys/fcntl.h> | ||
35 | #include <sys/mount.h> | ||
36 | #include <sys/statfs.h> | ||
37 | #include "../../include/linux/magic.h" | ||
38 | |||
39 | |||
40 | #ifndef MAX_PATH | ||
41 | # define MAX_PATH 256 | ||
42 | #endif | ||
43 | |||
44 | #ifndef STR | ||
45 | # define _STR(x) #x | ||
46 | # define STR(x) _STR(x) | ||
47 | #endif | ||
48 | |||
49 | /* | ||
50 | * pagemap kernel ABI bits | ||
51 | */ | ||
52 | |||
53 | #define PM_ENTRY_BYTES sizeof(uint64_t) | ||
54 | #define PM_STATUS_BITS 3 | ||
55 | #define PM_STATUS_OFFSET (64 - PM_STATUS_BITS) | ||
56 | #define PM_STATUS_MASK (((1LL << PM_STATUS_BITS) - 1) << PM_STATUS_OFFSET) | ||
57 | #define PM_STATUS(nr) (((nr) << PM_STATUS_OFFSET) & PM_STATUS_MASK) | ||
58 | #define PM_PSHIFT_BITS 6 | ||
59 | #define PM_PSHIFT_OFFSET (PM_STATUS_OFFSET - PM_PSHIFT_BITS) | ||
60 | #define PM_PSHIFT_MASK (((1LL << PM_PSHIFT_BITS) - 1) << PM_PSHIFT_OFFSET) | ||
61 | #define PM_PSHIFT(x) (((u64) (x) << PM_PSHIFT_OFFSET) & PM_PSHIFT_MASK) | ||
62 | #define PM_PFRAME_MASK ((1LL << PM_PSHIFT_OFFSET) - 1) | ||
63 | #define PM_PFRAME(x) ((x) & PM_PFRAME_MASK) | ||
64 | |||
65 | #define PM_PRESENT PM_STATUS(4LL) | ||
66 | #define PM_SWAP PM_STATUS(2LL) | ||
67 | |||
68 | |||
69 | /* | ||
70 | * kernel page flags | ||
71 | */ | ||
72 | |||
73 | #define KPF_BYTES 8 | ||
74 | #define PROC_KPAGEFLAGS "/proc/kpageflags" | ||
75 | |||
76 | /* copied from kpageflags_read() */ | ||
77 | #define KPF_LOCKED 0 | ||
78 | #define KPF_ERROR 1 | ||
79 | #define KPF_REFERENCED 2 | ||
80 | #define KPF_UPTODATE 3 | ||
81 | #define KPF_DIRTY 4 | ||
82 | #define KPF_LRU 5 | ||
83 | #define KPF_ACTIVE 6 | ||
84 | #define KPF_SLAB 7 | ||
85 | #define KPF_WRITEBACK 8 | ||
86 | #define KPF_RECLAIM 9 | ||
87 | #define KPF_BUDDY 10 | ||
88 | |||
89 | /* [11-20] new additions in 2.6.31 */ | ||
90 | #define KPF_MMAP 11 | ||
91 | #define KPF_ANON 12 | ||
92 | #define KPF_SWAPCACHE 13 | ||
93 | #define KPF_SWAPBACKED 14 | ||
94 | #define KPF_COMPOUND_HEAD 15 | ||
95 | #define KPF_COMPOUND_TAIL 16 | ||
96 | #define KPF_HUGE 17 | ||
97 | #define KPF_UNEVICTABLE 18 | ||
98 | #define KPF_HWPOISON 19 | ||
99 | #define KPF_NOPAGE 20 | ||
100 | #define KPF_KSM 21 | ||
101 | |||
102 | /* [32-] kernel hacking assistances */ | ||
103 | #define KPF_RESERVED 32 | ||
104 | #define KPF_MLOCKED 33 | ||
105 | #define KPF_MAPPEDTODISK 34 | ||
106 | #define KPF_PRIVATE 35 | ||
107 | #define KPF_PRIVATE_2 36 | ||
108 | #define KPF_OWNER_PRIVATE 37 | ||
109 | #define KPF_ARCH 38 | ||
110 | #define KPF_UNCACHED 39 | ||
111 | |||
112 | /* [48-] take some arbitrary free slots for expanding overloaded flags | ||
113 | * not part of kernel API | ||
114 | */ | ||
115 | #define KPF_READAHEAD 48 | ||
116 | #define KPF_SLOB_FREE 49 | ||
117 | #define KPF_SLUB_FROZEN 50 | ||
118 | #define KPF_SLUB_DEBUG 51 | ||
119 | |||
120 | #define KPF_ALL_BITS ((uint64_t)~0ULL) | ||
121 | #define KPF_HACKERS_BITS (0xffffULL << 32) | ||
122 | #define KPF_OVERLOADED_BITS (0xffffULL << 48) | ||
123 | #define BIT(name) (1ULL << KPF_##name) | ||
124 | #define BITS_COMPOUND (BIT(COMPOUND_HEAD) | BIT(COMPOUND_TAIL)) | ||
125 | |||
126 | static const char *page_flag_names[] = { | ||
127 | [KPF_LOCKED] = "L:locked", | ||
128 | [KPF_ERROR] = "E:error", | ||
129 | [KPF_REFERENCED] = "R:referenced", | ||
130 | [KPF_UPTODATE] = "U:uptodate", | ||
131 | [KPF_DIRTY] = "D:dirty", | ||
132 | [KPF_LRU] = "l:lru", | ||
133 | [KPF_ACTIVE] = "A:active", | ||
134 | [KPF_SLAB] = "S:slab", | ||
135 | [KPF_WRITEBACK] = "W:writeback", | ||
136 | [KPF_RECLAIM] = "I:reclaim", | ||
137 | [KPF_BUDDY] = "B:buddy", | ||
138 | |||
139 | [KPF_MMAP] = "M:mmap", | ||
140 | [KPF_ANON] = "a:anonymous", | ||
141 | [KPF_SWAPCACHE] = "s:swapcache", | ||
142 | [KPF_SWAPBACKED] = "b:swapbacked", | ||
143 | [KPF_COMPOUND_HEAD] = "H:compound_head", | ||
144 | [KPF_COMPOUND_TAIL] = "T:compound_tail", | ||
145 | [KPF_HUGE] = "G:huge", | ||
146 | [KPF_UNEVICTABLE] = "u:unevictable", | ||
147 | [KPF_HWPOISON] = "X:hwpoison", | ||
148 | [KPF_NOPAGE] = "n:nopage", | ||
149 | [KPF_KSM] = "x:ksm", | ||
150 | |||
151 | [KPF_RESERVED] = "r:reserved", | ||
152 | [KPF_MLOCKED] = "m:mlocked", | ||
153 | [KPF_MAPPEDTODISK] = "d:mappedtodisk", | ||
154 | [KPF_PRIVATE] = "P:private", | ||
155 | [KPF_PRIVATE_2] = "p:private_2", | ||
156 | [KPF_OWNER_PRIVATE] = "O:owner_private", | ||
157 | [KPF_ARCH] = "h:arch", | ||
158 | [KPF_UNCACHED] = "c:uncached", | ||
159 | |||
160 | [KPF_READAHEAD] = "I:readahead", | ||
161 | [KPF_SLOB_FREE] = "P:slob_free", | ||
162 | [KPF_SLUB_FROZEN] = "A:slub_frozen", | ||
163 | [KPF_SLUB_DEBUG] = "E:slub_debug", | ||
164 | }; | ||
165 | |||
166 | |||
167 | static const char *debugfs_known_mountpoints[] = { | ||
168 | "/sys/kernel/debug", | ||
169 | "/debug", | ||
170 | 0, | ||
171 | }; | ||
172 | |||
173 | /* | ||
174 | * data structures | ||
175 | */ | ||
176 | |||
177 | static int opt_raw; /* for kernel developers */ | ||
178 | static int opt_list; /* list pages (in ranges) */ | ||
179 | static int opt_no_summary; /* don't show summary */ | ||
180 | static pid_t opt_pid; /* process to walk */ | ||
181 | |||
182 | #define MAX_ADDR_RANGES 1024 | ||
183 | static int nr_addr_ranges; | ||
184 | static unsigned long opt_offset[MAX_ADDR_RANGES]; | ||
185 | static unsigned long opt_size[MAX_ADDR_RANGES]; | ||
186 | |||
187 | #define MAX_VMAS 10240 | ||
188 | static int nr_vmas; | ||
189 | static unsigned long pg_start[MAX_VMAS]; | ||
190 | static unsigned long pg_end[MAX_VMAS]; | ||
191 | |||
192 | #define MAX_BIT_FILTERS 64 | ||
193 | static int nr_bit_filters; | ||
194 | static uint64_t opt_mask[MAX_BIT_FILTERS]; | ||
195 | static uint64_t opt_bits[MAX_BIT_FILTERS]; | ||
196 | |||
197 | static int page_size; | ||
198 | |||
199 | static int pagemap_fd; | ||
200 | static int kpageflags_fd; | ||
201 | |||
202 | static int opt_hwpoison; | ||
203 | static int opt_unpoison; | ||
204 | |||
205 | static char hwpoison_debug_fs[MAX_PATH+1]; | ||
206 | static int hwpoison_inject_fd; | ||
207 | static int hwpoison_forget_fd; | ||
208 | |||
209 | #define HASH_SHIFT 13 | ||
210 | #define HASH_SIZE (1 << HASH_SHIFT) | ||
211 | #define HASH_MASK (HASH_SIZE - 1) | ||
212 | #define HASH_KEY(flags) (flags & HASH_MASK) | ||
213 | |||
214 | static unsigned long total_pages; | ||
215 | static unsigned long nr_pages[HASH_SIZE]; | ||
216 | static uint64_t page_flags[HASH_SIZE]; | ||
217 | |||
218 | |||
219 | /* | ||
220 | * helper functions | ||
221 | */ | ||
222 | |||
223 | #define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0])) | ||
224 | |||
225 | #define min_t(type, x, y) ({ \ | ||
226 | type __min1 = (x); \ | ||
227 | type __min2 = (y); \ | ||
228 | __min1 < __min2 ? __min1 : __min2; }) | ||
229 | |||
230 | #define max_t(type, x, y) ({ \ | ||
231 | type __max1 = (x); \ | ||
232 | type __max2 = (y); \ | ||
233 | __max1 > __max2 ? __max1 : __max2; }) | ||
234 | |||
235 | static unsigned long pages2mb(unsigned long pages) | ||
236 | { | ||
237 | return (pages * page_size) >> 20; | ||
238 | } | ||
239 | |||
240 | static void fatal(const char *x, ...) | ||
241 | { | ||
242 | va_list ap; | ||
243 | |||
244 | va_start(ap, x); | ||
245 | vfprintf(stderr, x, ap); | ||
246 | va_end(ap); | ||
247 | exit(EXIT_FAILURE); | ||
248 | } | ||
249 | |||
250 | static int checked_open(const char *pathname, int flags) | ||
251 | { | ||
252 | int fd = open(pathname, flags); | ||
253 | |||
254 | if (fd < 0) { | ||
255 | perror(pathname); | ||
256 | exit(EXIT_FAILURE); | ||
257 | } | ||
258 | |||
259 | return fd; | ||
260 | } | ||
261 | |||
262 | /* | ||
263 | * pagemap/kpageflags routines | ||
264 | */ | ||
265 | |||
266 | static unsigned long do_u64_read(int fd, char *name, | ||
267 | uint64_t *buf, | ||
268 | unsigned long index, | ||
269 | unsigned long count) | ||
270 | { | ||
271 | long bytes; | ||
272 | |||
273 | if (index > ULONG_MAX / 8) | ||
274 | fatal("index overflow: %lu\n", index); | ||
275 | |||
276 | if (lseek(fd, index * 8, SEEK_SET) < 0) { | ||
277 | perror(name); | ||
278 | exit(EXIT_FAILURE); | ||
279 | } | ||
280 | |||
281 | bytes = read(fd, buf, count * 8); | ||
282 | if (bytes < 0) { | ||
283 | perror(name); | ||
284 | exit(EXIT_FAILURE); | ||
285 | } | ||
286 | if (bytes % 8) | ||
287 | fatal("partial read: %lu bytes\n", bytes); | ||
288 | |||
289 | return bytes / 8; | ||
290 | } | ||
291 | |||
292 | static unsigned long kpageflags_read(uint64_t *buf, | ||
293 | unsigned long index, | ||
294 | unsigned long pages) | ||
295 | { | ||
296 | return do_u64_read(kpageflags_fd, PROC_KPAGEFLAGS, buf, index, pages); | ||
297 | } | ||
298 | |||
299 | static unsigned long pagemap_read(uint64_t *buf, | ||
300 | unsigned long index, | ||
301 | unsigned long pages) | ||
302 | { | ||
303 | return do_u64_read(pagemap_fd, "/proc/pid/pagemap", buf, index, pages); | ||
304 | } | ||
305 | |||
306 | static unsigned long pagemap_pfn(uint64_t val) | ||
307 | { | ||
308 | unsigned long pfn; | ||
309 | |||
310 | if (val & PM_PRESENT) | ||
311 | pfn = PM_PFRAME(val); | ||
312 | else | ||
313 | pfn = 0; | ||
314 | |||
315 | return pfn; | ||
316 | } | ||
317 | |||
318 | |||
319 | /* | ||
320 | * page flag names | ||
321 | */ | ||
322 | |||
323 | static char *page_flag_name(uint64_t flags) | ||
324 | { | ||
325 | static char buf[65]; | ||
326 | int present; | ||
327 | int i, j; | ||
328 | |||
329 | for (i = 0, j = 0; i < ARRAY_SIZE(page_flag_names); i++) { | ||
330 | present = (flags >> i) & 1; | ||
331 | if (!page_flag_names[i]) { | ||
332 | if (present) | ||
333 | fatal("unknown flag bit %d\n", i); | ||
334 | continue; | ||
335 | } | ||
336 | buf[j++] = present ? page_flag_names[i][0] : '_'; | ||
337 | } | ||
338 | |||
339 | return buf; | ||
340 | } | ||
341 | |||
342 | static char *page_flag_longname(uint64_t flags) | ||
343 | { | ||
344 | static char buf[1024]; | ||
345 | int i, n; | ||
346 | |||
347 | for (i = 0, n = 0; i < ARRAY_SIZE(page_flag_names); i++) { | ||
348 | if (!page_flag_names[i]) | ||
349 | continue; | ||
350 | if ((flags >> i) & 1) | ||
351 | n += snprintf(buf + n, sizeof(buf) - n, "%s,", | ||
352 | page_flag_names[i] + 2); | ||
353 | } | ||
354 | if (n) | ||
355 | n--; | ||
356 | buf[n] = '\0'; | ||
357 | |||
358 | return buf; | ||
359 | } | ||
360 | |||
361 | |||
362 | /* | ||
363 | * page list and summary | ||
364 | */ | ||
365 | |||
366 | static void show_page_range(unsigned long voffset, | ||
367 | unsigned long offset, uint64_t flags) | ||
368 | { | ||
369 | static uint64_t flags0; | ||
370 | static unsigned long voff; | ||
371 | static unsigned long index; | ||
372 | static unsigned long count; | ||
373 | |||
374 | if (flags == flags0 && offset == index + count && | ||
375 | (!opt_pid || voffset == voff + count)) { | ||
376 | count++; | ||
377 | return; | ||
378 | } | ||
379 | |||
380 | if (count) { | ||
381 | if (opt_pid) | ||
382 | printf("%lx\t", voff); | ||
383 | printf("%lx\t%lx\t%s\n", | ||
384 | index, count, page_flag_name(flags0)); | ||
385 | } | ||
386 | |||
387 | flags0 = flags; | ||
388 | index = offset; | ||
389 | voff = voffset; | ||
390 | count = 1; | ||
391 | } | ||
392 | |||
393 | static void show_page(unsigned long voffset, | ||
394 | unsigned long offset, uint64_t flags) | ||
395 | { | ||
396 | if (opt_pid) | ||
397 | printf("%lx\t", voffset); | ||
398 | printf("%lx\t%s\n", offset, page_flag_name(flags)); | ||
399 | } | ||
400 | |||
401 | static void show_summary(void) | ||
402 | { | ||
403 | int i; | ||
404 | |||
405 | printf(" flags\tpage-count MB" | ||
406 | " symbolic-flags\t\t\tlong-symbolic-flags\n"); | ||
407 | |||
408 | for (i = 0; i < ARRAY_SIZE(nr_pages); i++) { | ||
409 | if (nr_pages[i]) | ||
410 | printf("0x%016llx\t%10lu %8lu %s\t%s\n", | ||
411 | (unsigned long long)page_flags[i], | ||
412 | nr_pages[i], | ||
413 | pages2mb(nr_pages[i]), | ||
414 | page_flag_name(page_flags[i]), | ||
415 | page_flag_longname(page_flags[i])); | ||
416 | } | ||
417 | |||
418 | printf(" total\t%10lu %8lu\n", | ||
419 | total_pages, pages2mb(total_pages)); | ||
420 | } | ||
421 | |||
422 | |||
423 | /* | ||
424 | * page flag filters | ||
425 | */ | ||
426 | |||
427 | static int bit_mask_ok(uint64_t flags) | ||
428 | { | ||
429 | int i; | ||
430 | |||
431 | for (i = 0; i < nr_bit_filters; i++) { | ||
432 | if (opt_bits[i] == KPF_ALL_BITS) { | ||
433 | if ((flags & opt_mask[i]) == 0) | ||
434 | return 0; | ||
435 | } else { | ||
436 | if ((flags & opt_mask[i]) != opt_bits[i]) | ||
437 | return 0; | ||
438 | } | ||
439 | } | ||
440 | |||
441 | return 1; | ||
442 | } | ||
443 | |||
444 | static uint64_t expand_overloaded_flags(uint64_t flags) | ||
445 | { | ||
446 | /* SLOB/SLUB overload several page flags */ | ||
447 | if (flags & BIT(SLAB)) { | ||
448 | if (flags & BIT(PRIVATE)) | ||
449 | flags ^= BIT(PRIVATE) | BIT(SLOB_FREE); | ||
450 | if (flags & BIT(ACTIVE)) | ||
451 | flags ^= BIT(ACTIVE) | BIT(SLUB_FROZEN); | ||
452 | if (flags & BIT(ERROR)) | ||
453 | flags ^= BIT(ERROR) | BIT(SLUB_DEBUG); | ||
454 | } | ||
455 | |||
456 | /* PG_reclaim is overloaded as PG_readahead in the read path */ | ||
457 | if ((flags & (BIT(RECLAIM) | BIT(WRITEBACK))) == BIT(RECLAIM)) | ||
458 | flags ^= BIT(RECLAIM) | BIT(READAHEAD); | ||
459 | |||
460 | return flags; | ||
461 | } | ||
462 | |||
463 | static uint64_t well_known_flags(uint64_t flags) | ||
464 | { | ||
465 | /* hide flags intended only for kernel hacker */ | ||
466 | flags &= ~KPF_HACKERS_BITS; | ||
467 | |||
468 | /* hide non-hugeTLB compound pages */ | ||
469 | if ((flags & BITS_COMPOUND) && !(flags & BIT(HUGE))) | ||
470 | flags &= ~BITS_COMPOUND; | ||
471 | |||
472 | return flags; | ||
473 | } | ||
474 | |||
475 | static uint64_t kpageflags_flags(uint64_t flags) | ||
476 | { | ||
477 | flags = expand_overloaded_flags(flags); | ||
478 | |||
479 | if (!opt_raw) | ||
480 | flags = well_known_flags(flags); | ||
481 | |||
482 | return flags; | ||
483 | } | ||
484 | |||
485 | /* verify that a mountpoint is actually a debugfs instance */ | ||
486 | static int debugfs_valid_mountpoint(const char *debugfs) | ||
487 | { | ||
488 | struct statfs st_fs; | ||
489 | |||
490 | if (statfs(debugfs, &st_fs) < 0) | ||
491 | return -ENOENT; | ||
492 | else if (st_fs.f_type != (long) DEBUGFS_MAGIC) | ||
493 | return -ENOENT; | ||
494 | |||
495 | return 0; | ||
496 | } | ||
497 | |||
498 | /* find the path to the mounted debugfs */ | ||
499 | static const char *debugfs_find_mountpoint(void) | ||
500 | { | ||
501 | const char **ptr; | ||
502 | char type[100]; | ||
503 | FILE *fp; | ||
504 | |||
505 | ptr = debugfs_known_mountpoints; | ||
506 | while (*ptr) { | ||
507 | if (debugfs_valid_mountpoint(*ptr) == 0) { | ||
508 | strcpy(hwpoison_debug_fs, *ptr); | ||
509 | return hwpoison_debug_fs; | ||
510 | } | ||
511 | ptr++; | ||
512 | } | ||
513 | |||
514 | /* give up and parse /proc/mounts */ | ||
515 | fp = fopen("/proc/mounts", "r"); | ||
516 | if (fp == NULL) | ||
517 | perror("Can't open /proc/mounts for read"); | ||
518 | |||
519 | while (fscanf(fp, "%*s %" | ||
520 | STR(MAX_PATH) | ||
521 | "s %99s %*s %*d %*d\n", | ||
522 | hwpoison_debug_fs, type) == 2) { | ||
523 | if (strcmp(type, "debugfs") == 0) | ||
524 | break; | ||
525 | } | ||
526 | fclose(fp); | ||
527 | |||
528 | if (strcmp(type, "debugfs") != 0) | ||
529 | return NULL; | ||
530 | |||
531 | return hwpoison_debug_fs; | ||
532 | } | ||
533 | |||
534 | /* mount the debugfs somewhere if it's not mounted */ | ||
535 | |||
536 | static void debugfs_mount(void) | ||
537 | { | ||
538 | const char **ptr; | ||
539 | |||
540 | /* see if it's already mounted */ | ||
541 | if (debugfs_find_mountpoint()) | ||
542 | return; | ||
543 | |||
544 | ptr = debugfs_known_mountpoints; | ||
545 | while (*ptr) { | ||
546 | if (mount(NULL, *ptr, "debugfs", 0, NULL) == 0) { | ||
547 | /* save the mountpoint */ | ||
548 | strcpy(hwpoison_debug_fs, *ptr); | ||
549 | break; | ||
550 | } | ||
551 | ptr++; | ||
552 | } | ||
553 | |||
554 | if (*ptr == NULL) { | ||
555 | perror("mount debugfs"); | ||
556 | exit(EXIT_FAILURE); | ||
557 | } | ||
558 | } | ||
559 | |||
560 | /* | ||
561 | * page actions | ||
562 | */ | ||
563 | |||
564 | static void prepare_hwpoison_fd(void) | ||
565 | { | ||
566 | char buf[MAX_PATH + 1]; | ||
567 | |||
568 | debugfs_mount(); | ||
569 | |||
570 | if (opt_hwpoison && !hwpoison_inject_fd) { | ||
571 | snprintf(buf, MAX_PATH, "%s/hwpoison/corrupt-pfn", | ||
572 | hwpoison_debug_fs); | ||
573 | hwpoison_inject_fd = checked_open(buf, O_WRONLY); | ||
574 | } | ||
575 | |||
576 | if (opt_unpoison && !hwpoison_forget_fd) { | ||
577 | snprintf(buf, MAX_PATH, "%s/hwpoison/unpoison-pfn", | ||
578 | hwpoison_debug_fs); | ||
579 | hwpoison_forget_fd = checked_open(buf, O_WRONLY); | ||
580 | } | ||
581 | } | ||
582 | |||
583 | static int hwpoison_page(unsigned long offset) | ||
584 | { | ||
585 | char buf[100]; | ||
586 | int len; | ||
587 | |||
588 | len = sprintf(buf, "0x%lx\n", offset); | ||
589 | len = write(hwpoison_inject_fd, buf, len); | ||
590 | if (len < 0) { | ||
591 | perror("hwpoison inject"); | ||
592 | return len; | ||
593 | } | ||
594 | return 0; | ||
595 | } | ||
596 | |||
597 | static int unpoison_page(unsigned long offset) | ||
598 | { | ||
599 | char buf[100]; | ||
600 | int len; | ||
601 | |||
602 | len = sprintf(buf, "0x%lx\n", offset); | ||
603 | len = write(hwpoison_forget_fd, buf, len); | ||
604 | if (len < 0) { | ||
605 | perror("hwpoison forget"); | ||
606 | return len; | ||
607 | } | ||
608 | return 0; | ||
609 | } | ||
610 | |||
611 | /* | ||
612 | * page frame walker | ||
613 | */ | ||
614 | |||
615 | static int hash_slot(uint64_t flags) | ||
616 | { | ||
617 | int k = HASH_KEY(flags); | ||
618 | int i; | ||
619 | |||
620 | /* Explicitly reserve slot 0 for flags 0: the following logic | ||
621 | * cannot distinguish an unoccupied slot from slot (flags==0). | ||
622 | */ | ||
623 | if (flags == 0) | ||
624 | return 0; | ||
625 | |||
626 | /* search through the remaining (HASH_SIZE-1) slots */ | ||
627 | for (i = 1; i < ARRAY_SIZE(page_flags); i++, k++) { | ||
628 | if (!k || k >= ARRAY_SIZE(page_flags)) | ||
629 | k = 1; | ||
630 | if (page_flags[k] == 0) { | ||
631 | page_flags[k] = flags; | ||
632 | return k; | ||
633 | } | ||
634 | if (page_flags[k] == flags) | ||
635 | return k; | ||
636 | } | ||
637 | |||
638 | fatal("hash table full: bump up HASH_SHIFT?\n"); | ||
639 | exit(EXIT_FAILURE); | ||
640 | } | ||
641 | |||
642 | static void add_page(unsigned long voffset, | ||
643 | unsigned long offset, uint64_t flags) | ||
644 | { | ||
645 | flags = kpageflags_flags(flags); | ||
646 | |||
647 | if (!bit_mask_ok(flags)) | ||
648 | return; | ||
649 | |||
650 | if (opt_hwpoison) | ||
651 | hwpoison_page(offset); | ||
652 | if (opt_unpoison) | ||
653 | unpoison_page(offset); | ||
654 | |||
655 | if (opt_list == 1) | ||
656 | show_page_range(voffset, offset, flags); | ||
657 | else if (opt_list == 2) | ||
658 | show_page(voffset, offset, flags); | ||
659 | |||
660 | nr_pages[hash_slot(flags)]++; | ||
661 | total_pages++; | ||
662 | } | ||
663 | |||
664 | #define KPAGEFLAGS_BATCH (64 << 10) /* 64k pages */ | ||
665 | static void walk_pfn(unsigned long voffset, | ||
666 | unsigned long index, | ||
667 | unsigned long count) | ||
668 | { | ||
669 | uint64_t buf[KPAGEFLAGS_BATCH]; | ||
670 | unsigned long batch; | ||
671 | long pages; | ||
672 | unsigned long i; | ||
673 | |||
674 | while (count) { | ||
675 | batch = min_t(unsigned long, count, KPAGEFLAGS_BATCH); | ||
676 | pages = kpageflags_read(buf, index, batch); | ||
677 | if (pages == 0) | ||
678 | break; | ||
679 | |||
680 | for (i = 0; i < pages; i++) | ||
681 | add_page(voffset + i, index + i, buf[i]); | ||
682 | |||
683 | index += pages; | ||
684 | count -= pages; | ||
685 | } | ||
686 | } | ||
687 | |||
688 | #define PAGEMAP_BATCH (64 << 10) | ||
689 | static void walk_vma(unsigned long index, unsigned long count) | ||
690 | { | ||
691 | uint64_t buf[PAGEMAP_BATCH]; | ||
692 | unsigned long batch; | ||
693 | unsigned long pages; | ||
694 | unsigned long pfn; | ||
695 | unsigned long i; | ||
696 | |||
697 | while (count) { | ||
698 | batch = min_t(unsigned long, count, PAGEMAP_BATCH); | ||
699 | pages = pagemap_read(buf, index, batch); | ||
700 | if (pages == 0) | ||
701 | break; | ||
702 | |||
703 | for (i = 0; i < pages; i++) { | ||
704 | pfn = pagemap_pfn(buf[i]); | ||
705 | if (pfn) | ||
706 | walk_pfn(index + i, pfn, 1); | ||
707 | } | ||
708 | |||
709 | index += pages; | ||
710 | count -= pages; | ||
711 | } | ||
712 | } | ||
713 | |||
714 | static void walk_task(unsigned long index, unsigned long count) | ||
715 | { | ||
716 | const unsigned long end = index + count; | ||
717 | unsigned long start; | ||
718 | int i = 0; | ||
719 | |||
720 | while (index < end) { | ||
721 | |||
722 | while (pg_end[i] <= index) | ||
723 | if (++i >= nr_vmas) | ||
724 | return; | ||
725 | if (pg_start[i] >= end) | ||
726 | return; | ||
727 | |||
728 | start = max_t(unsigned long, pg_start[i], index); | ||
729 | index = min_t(unsigned long, pg_end[i], end); | ||
730 | |||
731 | assert(start < index); | ||
732 | walk_vma(start, index - start); | ||
733 | } | ||
734 | } | ||
735 | |||
736 | static void add_addr_range(unsigned long offset, unsigned long size) | ||
737 | { | ||
738 | if (nr_addr_ranges >= MAX_ADDR_RANGES) | ||
739 | fatal("too many addr ranges\n"); | ||
740 | |||
741 | opt_offset[nr_addr_ranges] = offset; | ||
742 | opt_size[nr_addr_ranges] = min_t(unsigned long, size, ULONG_MAX-offset); | ||
743 | nr_addr_ranges++; | ||
744 | } | ||
745 | |||
746 | static void walk_addr_ranges(void) | ||
747 | { | ||
748 | int i; | ||
749 | |||
750 | kpageflags_fd = checked_open(PROC_KPAGEFLAGS, O_RDONLY); | ||
751 | |||
752 | if (!nr_addr_ranges) | ||
753 | add_addr_range(0, ULONG_MAX); | ||
754 | |||
755 | for (i = 0; i < nr_addr_ranges; i++) | ||
756 | if (!opt_pid) | ||
757 | walk_pfn(0, opt_offset[i], opt_size[i]); | ||
758 | else | ||
759 | walk_task(opt_offset[i], opt_size[i]); | ||
760 | |||
761 | close(kpageflags_fd); | ||
762 | } | ||
763 | |||
764 | |||
765 | /* | ||
766 | * user interface | ||
767 | */ | ||
768 | |||
769 | static const char *page_flag_type(uint64_t flag) | ||
770 | { | ||
771 | if (flag & KPF_HACKERS_BITS) | ||
772 | return "(r)"; | ||
773 | if (flag & KPF_OVERLOADED_BITS) | ||
774 | return "(o)"; | ||
775 | return " "; | ||
776 | } | ||
777 | |||
778 | static void usage(void) | ||
779 | { | ||
780 | int i, j; | ||
781 | |||
782 | printf( | ||
783 | "page-types [options]\n" | ||
784 | " -r|--raw Raw mode, for kernel developers\n" | ||
785 | " -d|--describe flags Describe flags\n" | ||
786 | " -a|--addr addr-spec Walk a range of pages\n" | ||
787 | " -b|--bits bits-spec Walk pages with specified bits\n" | ||
788 | " -p|--pid pid Walk process address space\n" | ||
789 | #if 0 /* planned features */ | ||
790 | " -f|--file filename Walk file address space\n" | ||
791 | #endif | ||
792 | " -l|--list Show page details in ranges\n" | ||
793 | " -L|--list-each Show page details one by one\n" | ||
794 | " -N|--no-summary Don't show summary info\n" | ||
795 | " -X|--hwpoison hwpoison pages\n" | ||
796 | " -x|--unpoison unpoison pages\n" | ||
797 | " -h|--help Show this usage message\n" | ||
798 | "flags:\n" | ||
799 | " 0x10 bitfield format, e.g.\n" | ||
800 | " anon bit-name, e.g.\n" | ||
801 | " 0x10,anon comma-separated list, e.g.\n" | ||
802 | "addr-spec:\n" | ||
803 | " N one page at offset N (unit: pages)\n" | ||
804 | " N+M pages range from N to N+M-1\n" | ||
805 | " N,M pages range from N to M-1\n" | ||
806 | " N, pages range from N to end\n" | ||
807 | " ,M pages range from 0 to M-1\n" | ||
808 | "bits-spec:\n" | ||
809 | " bit1,bit2 (flags & (bit1|bit2)) != 0\n" | ||
810 | " bit1,bit2=bit1 (flags & (bit1|bit2)) == bit1\n" | ||
811 | " bit1,~bit2 (flags & (bit1|bit2)) == bit1\n" | ||
812 | " =bit1,bit2 flags == (bit1|bit2)\n" | ||
813 | "bit-names:\n" | ||
814 | ); | ||
815 | |||
816 | for (i = 0, j = 0; i < ARRAY_SIZE(page_flag_names); i++) { | ||
817 | if (!page_flag_names[i]) | ||
818 | continue; | ||
819 | printf("%16s%s", page_flag_names[i] + 2, | ||
820 | page_flag_type(1ULL << i)); | ||
821 | if (++j > 3) { | ||
822 | j = 0; | ||
823 | putchar('\n'); | ||
824 | } | ||
825 | } | ||
826 | printf("\n " | ||
827 | "(r) raw mode bits (o) overloaded bits\n"); | ||
828 | } | ||
829 | |||
830 | static unsigned long long parse_number(const char *str) | ||
831 | { | ||
832 | unsigned long long n; | ||
833 | |||
834 | n = strtoll(str, NULL, 0); | ||
835 | |||
836 | if (n == 0 && str[0] != '0') | ||
837 | fatal("invalid name or number: %s\n", str); | ||
838 | |||
839 | return n; | ||
840 | } | ||
841 | |||
842 | static void parse_pid(const char *str) | ||
843 | { | ||
844 | FILE *file; | ||
845 | char buf[5000]; | ||
846 | |||
847 | opt_pid = parse_number(str); | ||
848 | |||
849 | sprintf(buf, "/proc/%d/pagemap", opt_pid); | ||
850 | pagemap_fd = checked_open(buf, O_RDONLY); | ||
851 | |||
852 | sprintf(buf, "/proc/%d/maps", opt_pid); | ||
853 | file = fopen(buf, "r"); | ||
854 | if (!file) { | ||
855 | perror(buf); | ||
856 | exit(EXIT_FAILURE); | ||
857 | } | ||
858 | |||
859 | while (fgets(buf, sizeof(buf), file) != NULL) { | ||
860 | unsigned long vm_start; | ||
861 | unsigned long vm_end; | ||
862 | unsigned long long pgoff; | ||
863 | int major, minor; | ||
864 | char r, w, x, s; | ||
865 | unsigned long ino; | ||
866 | int n; | ||
867 | |||
868 | n = sscanf(buf, "%lx-%lx %c%c%c%c %llx %x:%x %lu", | ||
869 | &vm_start, | ||
870 | &vm_end, | ||
871 | &r, &w, &x, &s, | ||
872 | &pgoff, | ||
873 | &major, &minor, | ||
874 | &ino); | ||
875 | if (n < 10) { | ||
876 | fprintf(stderr, "unexpected line: %s\n", buf); | ||
877 | continue; | ||
878 | } | ||
879 | pg_start[nr_vmas] = vm_start / page_size; | ||
880 | pg_end[nr_vmas] = vm_end / page_size; | ||
881 | if (++nr_vmas >= MAX_VMAS) { | ||
882 | fprintf(stderr, "too many VMAs\n"); | ||
883 | break; | ||
884 | } | ||
885 | } | ||
886 | fclose(file); | ||
887 | } | ||
888 | |||
889 | static void parse_file(const char *name) | ||
890 | { | ||
891 | } | ||
892 | |||
893 | static void parse_addr_range(const char *optarg) | ||
894 | { | ||
895 | unsigned long offset; | ||
896 | unsigned long size; | ||
897 | char *p; | ||
898 | |||
899 | p = strchr(optarg, ','); | ||
900 | if (!p) | ||
901 | p = strchr(optarg, '+'); | ||
902 | |||
903 | if (p == optarg) { | ||
904 | offset = 0; | ||
905 | size = parse_number(p + 1); | ||
906 | } else if (p) { | ||
907 | offset = parse_number(optarg); | ||
908 | if (p[1] == '\0') | ||
909 | size = ULONG_MAX; | ||
910 | else { | ||
911 | size = parse_number(p + 1); | ||
912 | if (*p == ',') { | ||
913 | if (size < offset) | ||
914 | fatal("invalid range: %lu,%lu\n", | ||
915 | offset, size); | ||
916 | size -= offset; | ||
917 | } | ||
918 | } | ||
919 | } else { | ||
920 | offset = parse_number(optarg); | ||
921 | size = 1; | ||
922 | } | ||
923 | |||
924 | add_addr_range(offset, size); | ||
925 | } | ||
926 | |||
927 | static void add_bits_filter(uint64_t mask, uint64_t bits) | ||
928 | { | ||
929 | if (nr_bit_filters >= MAX_BIT_FILTERS) | ||
930 | fatal("too much bit filters\n"); | ||
931 | |||
932 | opt_mask[nr_bit_filters] = mask; | ||
933 | opt_bits[nr_bit_filters] = bits; | ||
934 | nr_bit_filters++; | ||
935 | } | ||
936 | |||
937 | static uint64_t parse_flag_name(const char *str, int len) | ||
938 | { | ||
939 | int i; | ||
940 | |||
941 | if (!*str || !len) | ||
942 | return 0; | ||
943 | |||
944 | if (len <= 8 && !strncmp(str, "compound", len)) | ||
945 | return BITS_COMPOUND; | ||
946 | |||
947 | for (i = 0; i < ARRAY_SIZE(page_flag_names); i++) { | ||
948 | if (!page_flag_names[i]) | ||
949 | continue; | ||
950 | if (!strncmp(str, page_flag_names[i] + 2, len)) | ||
951 | return 1ULL << i; | ||
952 | } | ||
953 | |||
954 | return parse_number(str); | ||
955 | } | ||
956 | |||
957 | static uint64_t parse_flag_names(const char *str, int all) | ||
958 | { | ||
959 | const char *p = str; | ||
960 | uint64_t flags = 0; | ||
961 | |||
962 | while (1) { | ||
963 | if (*p == ',' || *p == '=' || *p == '\0') { | ||
964 | if ((*str != '~') || (*str == '~' && all && *++str)) | ||
965 | flags |= parse_flag_name(str, p - str); | ||
966 | if (*p != ',') | ||
967 | break; | ||
968 | str = p + 1; | ||
969 | } | ||
970 | p++; | ||
971 | } | ||
972 | |||
973 | return flags; | ||
974 | } | ||
975 | |||
976 | static void parse_bits_mask(const char *optarg) | ||
977 | { | ||
978 | uint64_t mask; | ||
979 | uint64_t bits; | ||
980 | const char *p; | ||
981 | |||
982 | p = strchr(optarg, '='); | ||
983 | if (p == optarg) { | ||
984 | mask = KPF_ALL_BITS; | ||
985 | bits = parse_flag_names(p + 1, 0); | ||
986 | } else if (p) { | ||
987 | mask = parse_flag_names(optarg, 0); | ||
988 | bits = parse_flag_names(p + 1, 0); | ||
989 | } else if (strchr(optarg, '~')) { | ||
990 | mask = parse_flag_names(optarg, 1); | ||
991 | bits = parse_flag_names(optarg, 0); | ||
992 | } else { | ||
993 | mask = parse_flag_names(optarg, 0); | ||
994 | bits = KPF_ALL_BITS; | ||
995 | } | ||
996 | |||
997 | add_bits_filter(mask, bits); | ||
998 | } | ||
999 | |||
1000 | static void describe_flags(const char *optarg) | ||
1001 | { | ||
1002 | uint64_t flags = parse_flag_names(optarg, 0); | ||
1003 | |||
1004 | printf("0x%016llx\t%s\t%s\n", | ||
1005 | (unsigned long long)flags, | ||
1006 | page_flag_name(flags), | ||
1007 | page_flag_longname(flags)); | ||
1008 | } | ||
1009 | |||
1010 | static const struct option opts[] = { | ||
1011 | { "raw" , 0, NULL, 'r' }, | ||
1012 | { "pid" , 1, NULL, 'p' }, | ||
1013 | { "file" , 1, NULL, 'f' }, | ||
1014 | { "addr" , 1, NULL, 'a' }, | ||
1015 | { "bits" , 1, NULL, 'b' }, | ||
1016 | { "describe" , 1, NULL, 'd' }, | ||
1017 | { "list" , 0, NULL, 'l' }, | ||
1018 | { "list-each" , 0, NULL, 'L' }, | ||
1019 | { "no-summary", 0, NULL, 'N' }, | ||
1020 | { "hwpoison" , 0, NULL, 'X' }, | ||
1021 | { "unpoison" , 0, NULL, 'x' }, | ||
1022 | { "help" , 0, NULL, 'h' }, | ||
1023 | { NULL , 0, NULL, 0 } | ||
1024 | }; | ||
1025 | |||
1026 | int main(int argc, char *argv[]) | ||
1027 | { | ||
1028 | int c; | ||
1029 | |||
1030 | page_size = getpagesize(); | ||
1031 | |||
1032 | while ((c = getopt_long(argc, argv, | ||
1033 | "rp:f:a:b:d:lLNXxh", opts, NULL)) != -1) { | ||
1034 | switch (c) { | ||
1035 | case 'r': | ||
1036 | opt_raw = 1; | ||
1037 | break; | ||
1038 | case 'p': | ||
1039 | parse_pid(optarg); | ||
1040 | break; | ||
1041 | case 'f': | ||
1042 | parse_file(optarg); | ||
1043 | break; | ||
1044 | case 'a': | ||
1045 | parse_addr_range(optarg); | ||
1046 | break; | ||
1047 | case 'b': | ||
1048 | parse_bits_mask(optarg); | ||
1049 | break; | ||
1050 | case 'd': | ||
1051 | describe_flags(optarg); | ||
1052 | exit(0); | ||
1053 | case 'l': | ||
1054 | opt_list = 1; | ||
1055 | break; | ||
1056 | case 'L': | ||
1057 | opt_list = 2; | ||
1058 | break; | ||
1059 | case 'N': | ||
1060 | opt_no_summary = 1; | ||
1061 | break; | ||
1062 | case 'X': | ||
1063 | opt_hwpoison = 1; | ||
1064 | prepare_hwpoison_fd(); | ||
1065 | break; | ||
1066 | case 'x': | ||
1067 | opt_unpoison = 1; | ||
1068 | prepare_hwpoison_fd(); | ||
1069 | break; | ||
1070 | case 'h': | ||
1071 | usage(); | ||
1072 | exit(0); | ||
1073 | default: | ||
1074 | usage(); | ||
1075 | exit(1); | ||
1076 | } | ||
1077 | } | ||
1078 | |||
1079 | if (opt_list && opt_pid) | ||
1080 | printf("voffset\t"); | ||
1081 | if (opt_list == 1) | ||
1082 | printf("offset\tlen\tflags\n"); | ||
1083 | if (opt_list == 2) | ||
1084 | printf("offset\tflags\n"); | ||
1085 | |||
1086 | walk_addr_ranges(); | ||
1087 | |||
1088 | if (opt_list == 1) | ||
1089 | show_page_range(0, 0, 0); /* drain the buffer */ | ||
1090 | |||
1091 | if (opt_no_summary) | ||
1092 | return 0; | ||
1093 | |||
1094 | if (opt_list) | ||
1095 | printf("\n\n"); | ||
1096 | |||
1097 | show_summary(); | ||
1098 | |||
1099 | return 0; | ||
1100 | } | ||
diff --git a/Documentation/vm/pagemap.txt b/Documentation/vm/pagemap.txt index df09b9650a81..4600cbe3d6be 100644 --- a/Documentation/vm/pagemap.txt +++ b/Documentation/vm/pagemap.txt | |||
@@ -60,6 +60,7 @@ There are three components to pagemap: | |||
60 | 19. HWPOISON | 60 | 19. HWPOISON |
61 | 20. NOPAGE | 61 | 20. NOPAGE |
62 | 21. KSM | 62 | 21. KSM |
63 | 22. THP | ||
63 | 64 | ||
64 | Short descriptions to the page flags: | 65 | Short descriptions to the page flags: |
65 | 66 | ||
@@ -97,6 +98,9 @@ Short descriptions to the page flags: | |||
97 | 21. KSM | 98 | 21. KSM |
98 | identical memory pages dynamically shared between one or more processes | 99 | identical memory pages dynamically shared between one or more processes |
99 | 100 | ||
101 | 22. THP | ||
102 | contiguous pages which construct transparent hugepages | ||
103 | |||
100 | [IO related page flags] | 104 | [IO related page flags] |
101 | 1. ERROR IO error occurred | 105 | 1. ERROR IO error occurred |
102 | 3. UPTODATE page has up-to-date data | 106 | 3. UPTODATE page has up-to-date data |
diff --git a/Documentation/watchdog/00-INDEX b/Documentation/watchdog/00-INDEX deleted file mode 100644 index fc9082a1477a..000000000000 --- a/Documentation/watchdog/00-INDEX +++ /dev/null | |||
@@ -1,19 +0,0 @@ | |||
1 | 00-INDEX | ||
2 | - this file. | ||
3 | convert_drivers_to_kernel_api.txt | ||
4 | - how-to for converting old watchdog drivers to the new kernel API. | ||
5 | hpwdt.txt | ||
6 | - information on the HP iLO2 NMI watchdog | ||
7 | pcwd-watchdog.txt | ||
8 | - documentation for Berkshire Products PC Watchdog ISA cards. | ||
9 | src/ | ||
10 | - directory holding watchdog related example programs. | ||
11 | watchdog-api.txt | ||
12 | - description of the Linux Watchdog driver API. | ||
13 | watchdog-kernel-api.txt | ||
14 | - description of the Linux WatchDog Timer Driver Core kernel API. | ||
15 | watchdog-parameters.txt | ||
16 | - information on driver parameters (for drivers other than | ||
17 | the ones that have driver-specific files here) | ||
18 | wdt.txt | ||
19 | - description of the Watchdog Timer Interfaces for Linux. | ||
diff --git a/Documentation/watchdog/convert_drivers_to_kernel_api.txt b/Documentation/watchdog/convert_drivers_to_kernel_api.txt index be8119bb15d2..271b8850dde7 100644 --- a/Documentation/watchdog/convert_drivers_to_kernel_api.txt +++ b/Documentation/watchdog/convert_drivers_to_kernel_api.txt | |||
@@ -59,6 +59,10 @@ Here is a overview of the functions and probably needed actions: | |||
59 | WDIOC_GETTIMEOUT: | 59 | WDIOC_GETTIMEOUT: |
60 | No preparations needed | 60 | No preparations needed |
61 | 61 | ||
62 | WDIOC_GETTIMELEFT: | ||
63 | It needs get_timeleft() callback to be defined. Otherwise it | ||
64 | will return EOPNOTSUPP | ||
65 | |||
62 | Other IOCTLs can be served using the ioctl-callback. Note that this is mainly | 66 | Other IOCTLs can be served using the ioctl-callback. Note that this is mainly |
63 | intended for porting old drivers; new drivers should not invent private IOCTLs. | 67 | intended for porting old drivers; new drivers should not invent private IOCTLs. |
64 | Private IOCTLs are processed first. When the callback returns with | 68 | Private IOCTLs are processed first. When the callback returns with |
diff --git a/Documentation/watchdog/watchdog-kernel-api.txt b/Documentation/watchdog/watchdog-kernel-api.txt index 9e162465b0cf..227f6cd0e5fa 100644 --- a/Documentation/watchdog/watchdog-kernel-api.txt +++ b/Documentation/watchdog/watchdog-kernel-api.txt | |||
@@ -1,6 +1,6 @@ | |||
1 | The Linux WatchDog Timer Driver Core kernel API. | 1 | The Linux WatchDog Timer Driver Core kernel API. |
2 | =============================================== | 2 | =============================================== |
3 | Last reviewed: 29-Nov-2011 | 3 | Last reviewed: 16-Mar-2012 |
4 | 4 | ||
5 | Wim Van Sebroeck <wim@iguana.be> | 5 | Wim Van Sebroeck <wim@iguana.be> |
6 | 6 | ||
@@ -77,6 +77,7 @@ struct watchdog_ops { | |||
77 | int (*ping)(struct watchdog_device *); | 77 | int (*ping)(struct watchdog_device *); |
78 | unsigned int (*status)(struct watchdog_device *); | 78 | unsigned int (*status)(struct watchdog_device *); |
79 | int (*set_timeout)(struct watchdog_device *, unsigned int); | 79 | int (*set_timeout)(struct watchdog_device *, unsigned int); |
80 | unsigned int (*get_timeleft)(struct watchdog_device *); | ||
80 | long (*ioctl)(struct watchdog_device *, unsigned int, unsigned long); | 81 | long (*ioctl)(struct watchdog_device *, unsigned int, unsigned long); |
81 | }; | 82 | }; |
82 | 83 | ||
@@ -117,11 +118,13 @@ they are supported. These optional routines/operations are: | |||
117 | status of the device is reported with watchdog WDIOF_* status flags/bits. | 118 | status of the device is reported with watchdog WDIOF_* status flags/bits. |
118 | * set_timeout: this routine checks and changes the timeout of the watchdog | 119 | * set_timeout: this routine checks and changes the timeout of the watchdog |
119 | timer device. It returns 0 on success, -EINVAL for "parameter out of range" | 120 | timer device. It returns 0 on success, -EINVAL for "parameter out of range" |
120 | and -EIO for "could not write value to the watchdog". On success the timeout | 121 | and -EIO for "could not write value to the watchdog". On success this |
121 | value of the watchdog_device will be changed to the value that was just used | 122 | routine should set the timeout value of the watchdog_device to the |
122 | to re-program the watchdog timer device. | 123 | achieved timeout value (which may be different from the requested one |
124 | because the watchdog does not necessarily has a 1 second resolution). | ||
123 | (Note: the WDIOF_SETTIMEOUT needs to be set in the options field of the | 125 | (Note: the WDIOF_SETTIMEOUT needs to be set in the options field of the |
124 | watchdog's info structure). | 126 | watchdog's info structure). |
127 | * get_timeleft: this routines returns the time that's left before a reset. | ||
125 | * ioctl: if this routine is present then it will be called first before we do | 128 | * ioctl: if this routine is present then it will be called first before we do |
126 | our own internal ioctl call handling. This routine should return -ENOIOCTLCMD | 129 | our own internal ioctl call handling. This routine should return -ENOIOCTLCMD |
127 | if a command is not supported. The parameters that are passed to the ioctl | 130 | if a command is not supported. The parameters that are passed to the ioctl |
diff --git a/Documentation/zh_CN/HOWTO b/Documentation/zh_CN/HOWTO index faf976c0c731..7fba5aab9ef9 100644 --- a/Documentation/zh_CN/HOWTO +++ b/Documentation/zh_CN/HOWTO | |||
@@ -316,7 +316,7 @@ linux-kernel邮件列表中提供反馈,告诉大家你遇到了问题还是 | |||
316 | git.kernel.org:/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6.git | 316 | git.kernel.org:/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6.git |
317 | 317 | ||
318 | 使用quilt管理的补丁集: | 318 | 使用quilt管理的补丁集: |
319 | - USB, PCI, 驱动程序核心和I2C, Greg Kroah-Hartman <gregkh@suse.de> | 319 | - USB, PCI, 驱动程序核心和I2C, Greg Kroah-Hartman <gregkh@linuxfoundation.org> |
320 | kernel.org/pub/linux/kernel/people/gregkh/gregkh-2.6/ | 320 | kernel.org/pub/linux/kernel/people/gregkh/gregkh-2.6/ |
321 | - x86-64, 部分i386, Andi Kleen <ak@suse.de> | 321 | - x86-64, 部分i386, Andi Kleen <ak@suse.de> |
322 | ftp.firstfloor.org:/pub/ak/x86_64/quilt/ | 322 | ftp.firstfloor.org:/pub/ak/x86_64/quilt/ |
diff --git a/Documentation/zh_CN/magic-number.txt b/Documentation/zh_CN/magic-number.txt index c278f412dc65..f606ba8598cf 100644 --- a/Documentation/zh_CN/magic-number.txt +++ b/Documentation/zh_CN/magic-number.txt | |||
@@ -89,7 +89,7 @@ TTY_DRIVER_MAGIC 0x5402 tty_driver include/linux/tty_driver.h | |||
89 | MGSLPC_MAGIC 0x5402 mgslpc_info drivers/char/pcmcia/synclink_cs.c | 89 | MGSLPC_MAGIC 0x5402 mgslpc_info drivers/char/pcmcia/synclink_cs.c |
90 | TTY_LDISC_MAGIC 0x5403 tty_ldisc include/linux/tty_ldisc.h | 90 | TTY_LDISC_MAGIC 0x5403 tty_ldisc include/linux/tty_ldisc.h |
91 | USB_SERIAL_MAGIC 0x6702 usb_serial drivers/usb/serial/usb-serial.h | 91 | USB_SERIAL_MAGIC 0x6702 usb_serial drivers/usb/serial/usb-serial.h |
92 | FULL_DUPLEX_MAGIC 0x6969 drivers/net/tulip/de2104x.c | 92 | FULL_DUPLEX_MAGIC 0x6969 drivers/net/ethernet/dec/tulip/de2104x.c |
93 | USB_BLUETOOTH_MAGIC 0x6d02 usb_bluetooth drivers/usb/class/bluetty.c | 93 | USB_BLUETOOTH_MAGIC 0x6d02 usb_bluetooth drivers/usb/class/bluetty.c |
94 | RFCOMM_TTY_MAGIC 0x6d02 net/bluetooth/rfcomm/tty.c | 94 | RFCOMM_TTY_MAGIC 0x6d02 net/bluetooth/rfcomm/tty.c |
95 | USB_SERIAL_PORT_MAGIC 0x7301 usb_serial_port drivers/usb/serial/usb-serial.h | 95 | USB_SERIAL_PORT_MAGIC 0x7301 usb_serial_port drivers/usb/serial/usb-serial.h |