diff options
author | Michal Marek <mmarek@suse.cz> | 2013-02-25 15:50:05 -0500 |
---|---|---|
committer | Michal Marek <mmarek@suse.cz> | 2013-02-25 15:51:57 -0500 |
commit | e3900e74f26fc924c8e9e2a922bd40369b0bb517 (patch) | |
tree | 6e868575d346032ba9408f350c6e5369e0e52b0d /Documentation | |
parent | 62dc989921df2a98d1a73aacd085abe941cb9828 (diff) | |
parent | 02f3e53a131c8aa3fe3c954058f1add5beeae621 (diff) |
Merge branch 'kbuild/rc-fixes' into kbuild/kconfig
There is one kconfig fix in the rc-fixes branch that I forgot to submit
for 3.8, so let's add it to the kconfig branch for 3.9-rc1.
Diffstat (limited to 'Documentation')
301 files changed, 9081 insertions, 1528 deletions
diff --git a/Documentation/00-INDEX b/Documentation/00-INDEX index f54273e2ac97..8afe64fb2009 100644 --- a/Documentation/00-INDEX +++ b/Documentation/00-INDEX | |||
@@ -136,8 +136,6 @@ fault-injection/ | |||
136 | - dir with docs about the fault injection capabilities infrastructure. | 136 | - dir with docs about the fault injection capabilities infrastructure. |
137 | fb/ | 137 | fb/ |
138 | - directory with info on the frame buffer graphics abstraction layer. | 138 | - directory with info on the frame buffer graphics abstraction layer. |
139 | feature-removal-schedule.txt | ||
140 | - list of files and features that are going to be removed. | ||
141 | filesystems/ | 139 | filesystems/ |
142 | - info on the vfs and the various filesystems that Linux supports. | 140 | - info on the vfs and the various filesystems that Linux supports. |
143 | firmware_class/ | 141 | firmware_class/ |
@@ -210,6 +208,8 @@ local_ops.txt | |||
210 | - semantics and behavior of local atomic operations. | 208 | - semantics and behavior of local atomic operations. |
211 | lockdep-design.txt | 209 | lockdep-design.txt |
212 | - documentation on the runtime locking correctness validator. | 210 | - documentation on the runtime locking correctness validator. |
211 | lockup-watchdogs.txt | ||
212 | - info on soft and hard lockup detectors (aka nmi_watchdog). | ||
213 | logo.gif | 213 | logo.gif |
214 | - full colour GIF image of Linux logo (penguin - Tux). | 214 | - full colour GIF image of Linux logo (penguin - Tux). |
215 | logo.txt | 215 | logo.txt |
@@ -240,8 +240,6 @@ netlabel/ | |||
240 | - directory with information on the NetLabel subsystem. | 240 | - directory with information on the NetLabel subsystem. |
241 | networking/ | 241 | networking/ |
242 | - directory with info on various aspects of networking with Linux. | 242 | - directory with info on various aspects of networking with Linux. |
243 | nmi_watchdog.txt | ||
244 | - info on NMI watchdog for SMP systems. | ||
245 | nommu-mmap.txt | 243 | nommu-mmap.txt |
246 | - documentation about no-mmu memory mapping support. | 244 | - documentation about no-mmu memory mapping support. |
247 | numastat.txt | 245 | numastat.txt |
diff --git a/Documentation/ABI/README b/Documentation/ABI/README index 9feaf16f1617..10069828568b 100644 --- a/Documentation/ABI/README +++ b/Documentation/ABI/README | |||
@@ -36,9 +36,6 @@ The different levels of stability are: | |||
36 | the kernel, but are marked to be removed at some later point in | 36 | the kernel, but are marked to be removed at some later point in |
37 | time. The description of the interface will document the reason | 37 | time. The description of the interface will document the reason |
38 | why it is obsolete and when it can be expected to be removed. | 38 | why it is obsolete and when it can be expected to be removed. |
39 | The file Documentation/feature-removal-schedule.txt may describe | ||
40 | some of these interfaces, giving a schedule for when they will | ||
41 | be removed. | ||
42 | 39 | ||
43 | removed/ | 40 | removed/ |
44 | This directory contains a list of the old interfaces that have | 41 | This directory contains a list of the old interfaces that have |
diff --git a/Documentation/ABI/obsolete/sysfs-driver-hid-roccat-koneplus b/Documentation/ABI/obsolete/sysfs-driver-hid-roccat-koneplus index c2a270b45b03..833fd59926a7 100644 --- a/Documentation/ABI/obsolete/sysfs-driver-hid-roccat-koneplus +++ b/Documentation/ABI/obsolete/sysfs-driver-hid-roccat-koneplus | |||
@@ -8,3 +8,41 @@ Description: The integer value of this attribute ranges from 0-4. | |||
8 | When written, this file sets the number of the startup profile | 8 | When written, this file sets the number of the startup profile |
9 | and the mouse activates this profile immediately. | 9 | and the mouse activates this profile immediately. |
10 | Please use actual_profile, it does the same thing. | 10 | Please use actual_profile, it does the same thing. |
11 | Users: http://roccat.sourceforge.net | ||
12 | |||
13 | What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/koneplus/roccatkoneplus<minor>/firmware_version | ||
14 | Date: October 2010 | ||
15 | Contact: Stefan Achatz <erazor_de@users.sourceforge.net> | ||
16 | Description: When read, this file returns the raw integer version number of the | ||
17 | firmware reported by the mouse. Using the integer value eases | ||
18 | further usage in other programs. To receive the real version | ||
19 | number the decimal point has to be shifted 2 positions to the | ||
20 | left. E.g. a returned value of 121 means 1.21 | ||
21 | This file is readonly. | ||
22 | Please read binary attribute info which contains firmware version. | ||
23 | Users: http://roccat.sourceforge.net | ||
24 | |||
25 | What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/koneplus/roccatkoneplus<minor>/profile[1-5]_buttons | ||
26 | Date: August 2010 | ||
27 | Contact: Stefan Achatz <erazor_de@users.sourceforge.net> | ||
28 | Description: The mouse can store 5 profiles which can be switched by the | ||
29 | press of a button. A profile is split in settings and buttons. | ||
30 | profile_buttons holds information about button layout. | ||
31 | When read, these files return the respective profile buttons. | ||
32 | The returned data is 77 bytes in size. | ||
33 | This file is readonly. | ||
34 | Write control to select profile and read profile_buttons instead. | ||
35 | Users: http://roccat.sourceforge.net | ||
36 | |||
37 | What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/koneplus/roccatkoneplus<minor>/profile[1-5]_settings | ||
38 | Date: August 2010 | ||
39 | Contact: Stefan Achatz <erazor_de@users.sourceforge.net> | ||
40 | Description: The mouse can store 5 profiles which can be switched by the | ||
41 | press of a button. A profile is split in settings and buttons. | ||
42 | profile_settings holds information like resolution, sensitivity | ||
43 | and light effects. | ||
44 | When read, these files return the respective profile settings. | ||
45 | The returned data is 43 bytes in size. | ||
46 | This file is readonly. | ||
47 | Write control to select profile and read profile_settings instead. | ||
48 | Users: http://roccat.sourceforge.net \ No newline at end of file | ||
diff --git a/Documentation/ABI/obsolete/sysfs-driver-hid-roccat-kovaplus b/Documentation/ABI/obsolete/sysfs-driver-hid-roccat-kovaplus new file mode 100644 index 000000000000..4a98e02b6c6a --- /dev/null +++ b/Documentation/ABI/obsolete/sysfs-driver-hid-roccat-kovaplus | |||
@@ -0,0 +1,66 @@ | |||
1 | What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/kovaplus/roccatkovaplus<minor>/actual_cpi | ||
2 | Date: January 2011 | ||
3 | Contact: Stefan Achatz <erazor_de@users.sourceforge.net> | ||
4 | Description: The integer value of this attribute ranges from 1-4. | ||
5 | When read, this attribute returns the number of the active | ||
6 | cpi level. | ||
7 | This file is readonly. | ||
8 | Has never been used. If bookkeeping is done, it's done in userland tools. | ||
9 | Users: http://roccat.sourceforge.net | ||
10 | |||
11 | What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/kovaplus/roccatkovaplus<minor>/actual_sensitivity_x | ||
12 | Date: January 2011 | ||
13 | Contact: Stefan Achatz <erazor_de@users.sourceforge.net> | ||
14 | Description: The integer value of this attribute ranges from 1-10. | ||
15 | When read, this attribute returns the number of the actual | ||
16 | sensitivity in x direction. | ||
17 | This file is readonly. | ||
18 | Has never been used. If bookkeeping is done, it's done in userland tools. | ||
19 | Users: http://roccat.sourceforge.net | ||
20 | |||
21 | What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/kovaplus/roccatkovaplus<minor>/actual_sensitivity_y | ||
22 | Date: January 2011 | ||
23 | Contact: Stefan Achatz <erazor_de@users.sourceforge.net> | ||
24 | Description: The integer value of this attribute ranges from 1-10. | ||
25 | When read, this attribute returns the number of the actual | ||
26 | sensitivity in y direction. | ||
27 | This file is readonly. | ||
28 | Has never been used. If bookkeeping is done, it's done in userland tools. | ||
29 | Users: http://roccat.sourceforge.net | ||
30 | |||
31 | What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/kovaplus/roccatkovaplus<minor>/firmware_version | ||
32 | Date: January 2011 | ||
33 | Contact: Stefan Achatz <erazor_de@users.sourceforge.net> | ||
34 | Description: When read, this file returns the raw integer version number of the | ||
35 | firmware reported by the mouse. Using the integer value eases | ||
36 | further usage in other programs. To receive the real version | ||
37 | number the decimal point has to be shifted 2 positions to the | ||
38 | left. E.g. a returned value of 121 means 1.21 | ||
39 | This file is readonly. | ||
40 | Obsoleted by binary sysfs attribute "info". | ||
41 | Users: http://roccat.sourceforge.net | ||
42 | |||
43 | What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/kovaplus/roccatkovaplus<minor>/profile[1-5]_buttons | ||
44 | Date: January 2011 | ||
45 | Contact: Stefan Achatz <erazor_de@users.sourceforge.net> | ||
46 | Description: The mouse can store 5 profiles which can be switched by the | ||
47 | press of a button. A profile is split in settings and buttons. | ||
48 | profile_buttons holds information about button layout. | ||
49 | When read, these files return the respective profile buttons. | ||
50 | The returned data is 23 bytes in size. | ||
51 | This file is readonly. | ||
52 | Write control to select profile and read profile_buttons instead. | ||
53 | Users: http://roccat.sourceforge.net | ||
54 | |||
55 | What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/kovaplus/roccatkovaplus<minor>/profile[1-5]_settings | ||
56 | Date: January 2011 | ||
57 | Contact: Stefan Achatz <erazor_de@users.sourceforge.net> | ||
58 | Description: The mouse can store 5 profiles which can be switched by the | ||
59 | press of a button. A profile is split in settings and buttons. | ||
60 | profile_settings holds information like resolution, sensitivity | ||
61 | and light effects. | ||
62 | When read, these files return the respective profile settings. | ||
63 | The returned data is 16 bytes in size. | ||
64 | This file is readonly. | ||
65 | Write control to select profile and read profile_settings instead. | ||
66 | Users: http://roccat.sourceforge.net | ||
diff --git a/Documentation/ABI/obsolete/sysfs-driver-hid-roccat-pyra b/Documentation/ABI/obsolete/sysfs-driver-hid-roccat-pyra new file mode 100644 index 000000000000..87ac87e9556d --- /dev/null +++ b/Documentation/ABI/obsolete/sysfs-driver-hid-roccat-pyra | |||
@@ -0,0 +1,73 @@ | |||
1 | What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/pyra/roccatpyra<minor>/actual_cpi | ||
2 | Date: August 2010 | ||
3 | Contact: Stefan Achatz <erazor_de@users.sourceforge.net> | ||
4 | Description: It is possible to switch the cpi setting of the mouse with the | ||
5 | press of a button. | ||
6 | When read, this file returns the raw number of the actual cpi | ||
7 | setting reported by the mouse. This number has to be further | ||
8 | processed to receive the real dpi value. | ||
9 | |||
10 | VALUE DPI | ||
11 | 1 400 | ||
12 | 2 800 | ||
13 | 4 1600 | ||
14 | |||
15 | This file is readonly. | ||
16 | Has never been used. If bookkeeping is done, it's done in userland tools. | ||
17 | Users: http://roccat.sourceforge.net | ||
18 | |||
19 | What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/pyra/roccatpyra<minor>/actual_profile | ||
20 | Date: August 2010 | ||
21 | Contact: Stefan Achatz <erazor_de@users.sourceforge.net> | ||
22 | Description: When read, this file returns the number of the actual profile in | ||
23 | range 0-4. | ||
24 | This file is readonly. | ||
25 | Please use binary attribute "settings" which provides this information. | ||
26 | Users: http://roccat.sourceforge.net | ||
27 | |||
28 | What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/pyra/roccatpyra<minor>/firmware_version | ||
29 | Date: August 2010 | ||
30 | Contact: Stefan Achatz <erazor_de@users.sourceforge.net> | ||
31 | Description: When read, this file returns the raw integer version number of the | ||
32 | firmware reported by the mouse. Using the integer value eases | ||
33 | further usage in other programs. To receive the real version | ||
34 | number the decimal point has to be shifted 2 positions to the | ||
35 | left. E.g. a returned value of 138 means 1.38 | ||
36 | This file is readonly. | ||
37 | Please use binary attribute "info" which provides this information. | ||
38 | Users: http://roccat.sourceforge.net | ||
39 | |||
40 | What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/pyra/roccatpyra<minor>/profile[1-5]_buttons | ||
41 | Date: August 2010 | ||
42 | Contact: Stefan Achatz <erazor_de@users.sourceforge.net> | ||
43 | Description: The mouse can store 5 profiles which can be switched by the | ||
44 | press of a button. A profile is split in settings and buttons. | ||
45 | profile_buttons holds information about button layout. | ||
46 | When read, these files return the respective profile buttons. | ||
47 | The returned data is 19 bytes in size. | ||
48 | This file is readonly. | ||
49 | Write control to select profile and read profile_buttons instead. | ||
50 | Users: http://roccat.sourceforge.net | ||
51 | |||
52 | What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/pyra/roccatpyra<minor>/profile[1-5]_settings | ||
53 | Date: August 2010 | ||
54 | Contact: Stefan Achatz <erazor_de@users.sourceforge.net> | ||
55 | Description: The mouse can store 5 profiles which can be switched by the | ||
56 | press of a button. A profile is split in settings and buttons. | ||
57 | profile_settings holds information like resolution, sensitivity | ||
58 | and light effects. | ||
59 | When read, these files return the respective profile settings. | ||
60 | The returned data is 13 bytes in size. | ||
61 | This file is readonly. | ||
62 | Write control to select profile and read profile_settings instead. | ||
63 | Users: http://roccat.sourceforge.net | ||
64 | |||
65 | What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/pyra/roccatpyra<minor>/startup_profile | ||
66 | Date: August 2010 | ||
67 | Contact: Stefan Achatz <erazor_de@users.sourceforge.net> | ||
68 | Description: The integer value of this attribute ranges from 0-4. | ||
69 | When read, this attribute returns the number of the profile | ||
70 | that's active when the mouse is powered on. | ||
71 | This file is readonly. | ||
72 | Please use binary attribute "settings" which provides this information. | ||
73 | Users: http://roccat.sourceforge.net | ||
diff --git a/Documentation/ABI/stable/sysfs-devices-node b/Documentation/ABI/stable/sysfs-devices-node index 49b82cad7003..ce259c13c36a 100644 --- a/Documentation/ABI/stable/sysfs-devices-node +++ b/Documentation/ABI/stable/sysfs-devices-node | |||
@@ -1,7 +1,101 @@ | |||
1 | What: /sys/devices/system/node/possible | ||
2 | Date: October 2002 | ||
3 | Contact: Linux Memory Management list <linux-mm@kvack.org> | ||
4 | Description: | ||
5 | Nodes that could be possibly become online at some point. | ||
6 | |||
7 | What: /sys/devices/system/node/online | ||
8 | Date: October 2002 | ||
9 | Contact: Linux Memory Management list <linux-mm@kvack.org> | ||
10 | Description: | ||
11 | Nodes that are online. | ||
12 | |||
13 | What: /sys/devices/system/node/has_normal_memory | ||
14 | Date: October 2002 | ||
15 | Contact: Linux Memory Management list <linux-mm@kvack.org> | ||
16 | Description: | ||
17 | Nodes that have regular memory. | ||
18 | |||
19 | What: /sys/devices/system/node/has_cpu | ||
20 | Date: October 2002 | ||
21 | Contact: Linux Memory Management list <linux-mm@kvack.org> | ||
22 | Description: | ||
23 | Nodes that have one or more CPUs. | ||
24 | |||
25 | What: /sys/devices/system/node/has_high_memory | ||
26 | Date: October 2002 | ||
27 | Contact: Linux Memory Management list <linux-mm@kvack.org> | ||
28 | Description: | ||
29 | Nodes that have regular or high memory. | ||
30 | Depends on CONFIG_HIGHMEM. | ||
31 | |||
1 | What: /sys/devices/system/node/nodeX | 32 | What: /sys/devices/system/node/nodeX |
2 | Date: October 2002 | 33 | Date: October 2002 |
3 | Contact: Linux Memory Management list <linux-mm@kvack.org> | 34 | Contact: Linux Memory Management list <linux-mm@kvack.org> |
4 | Description: | 35 | Description: |
5 | When CONFIG_NUMA is enabled, this is a directory containing | 36 | When CONFIG_NUMA is enabled, this is a directory containing |
6 | information on node X such as what CPUs are local to the | 37 | information on node X such as what CPUs are local to the |
7 | node. | 38 | node. Each file is detailed next. |
39 | |||
40 | What: /sys/devices/system/node/nodeX/cpumap | ||
41 | Date: October 2002 | ||
42 | Contact: Linux Memory Management list <linux-mm@kvack.org> | ||
43 | Description: | ||
44 | The node's cpumap. | ||
45 | |||
46 | What: /sys/devices/system/node/nodeX/cpulist | ||
47 | Date: October 2002 | ||
48 | Contact: Linux Memory Management list <linux-mm@kvack.org> | ||
49 | Description: | ||
50 | The CPUs associated to the node. | ||
51 | |||
52 | What: /sys/devices/system/node/nodeX/meminfo | ||
53 | Date: October 2002 | ||
54 | Contact: Linux Memory Management list <linux-mm@kvack.org> | ||
55 | Description: | ||
56 | Provides information about the node's distribution and memory | ||
57 | utilization. Similar to /proc/meminfo, see Documentation/filesystems/proc.txt | ||
58 | |||
59 | What: /sys/devices/system/node/nodeX/numastat | ||
60 | Date: October 2002 | ||
61 | Contact: Linux Memory Management list <linux-mm@kvack.org> | ||
62 | Description: | ||
63 | The node's hit/miss statistics, in units of pages. | ||
64 | See Documentation/numastat.txt | ||
65 | |||
66 | What: /sys/devices/system/node/nodeX/distance | ||
67 | Date: October 2002 | ||
68 | Contact: Linux Memory Management list <linux-mm@kvack.org> | ||
69 | Description: | ||
70 | Distance between the node and all the other nodes | ||
71 | in the system. | ||
72 | |||
73 | What: /sys/devices/system/node/nodeX/vmstat | ||
74 | Date: October 2002 | ||
75 | Contact: Linux Memory Management list <linux-mm@kvack.org> | ||
76 | Description: | ||
77 | The node's zoned virtual memory statistics. | ||
78 | This is a superset of numastat. | ||
79 | |||
80 | What: /sys/devices/system/node/nodeX/compact | ||
81 | Date: February 2010 | ||
82 | Contact: Mel Gorman <mel@csn.ul.ie> | ||
83 | Description: | ||
84 | When this file is written to, all memory within that node | ||
85 | will be compacted. When it completes, memory will be freed | ||
86 | into blocks which have as many contiguous pages as possible | ||
87 | |||
88 | What: /sys/devices/system/node/nodeX/scan_unevictable_pages | ||
89 | Date: October 2008 | ||
90 | Contact: Lee Schermerhorn <lee.schermerhorn@hp.com> | ||
91 | Description: | ||
92 | When set, it triggers scanning the node's unevictable lists | ||
93 | and move any pages that have become evictable onto the respective | ||
94 | zone's inactive list. See mm/vmscan.c | ||
95 | |||
96 | What: /sys/devices/system/node/nodeX/hugepages/hugepages-<size>/ | ||
97 | Date: December 2009 | ||
98 | Contact: Lee Schermerhorn <lee.schermerhorn@hp.com> | ||
99 | Description: | ||
100 | The node's huge page size control/query attributes. | ||
101 | See Documentation/vm/hugetlbpage.txt \ No newline at end of file | ||
diff --git a/Documentation/ABI/stable/sysfs-driver-ib_srp b/Documentation/ABI/stable/sysfs-driver-ib_srp new file mode 100644 index 000000000000..481aae95c7d1 --- /dev/null +++ b/Documentation/ABI/stable/sysfs-driver-ib_srp | |||
@@ -0,0 +1,156 @@ | |||
1 | What: /sys/class/infiniband_srp/srp-<hca>-<port_number>/add_target | ||
2 | Date: January 2, 2006 | ||
3 | KernelVersion: 2.6.15 | ||
4 | Contact: linux-rdma@vger.kernel.org | ||
5 | Description: Interface for making ib_srp connect to a new target. | ||
6 | One can request ib_srp to connect to a new target by writing | ||
7 | a comma-separated list of login parameters to this sysfs | ||
8 | attribute. The supported parameters are: | ||
9 | * id_ext, a 16-digit hexadecimal number specifying the eight | ||
10 | byte identifier extension in the 16-byte SRP target port | ||
11 | identifier. The target port identifier is sent by ib_srp | ||
12 | to the target in the SRP_LOGIN_REQ request. | ||
13 | * ioc_guid, a 16-digit hexadecimal number specifying the eight | ||
14 | byte I/O controller GUID portion of the 16-byte target port | ||
15 | identifier. | ||
16 | * dgid, a 32-digit hexadecimal number specifying the | ||
17 | destination GID. | ||
18 | * pkey, a four-digit hexadecimal number specifying the | ||
19 | InfiniBand partition key. | ||
20 | * service_id, a 16-digit hexadecimal number specifying the | ||
21 | InfiniBand service ID used to establish communication with | ||
22 | the SRP target. How to find out the value of the service ID | ||
23 | is specified in the documentation of the SRP target. | ||
24 | * max_sect, a decimal number specifying the maximum number of | ||
25 | 512-byte sectors to be transferred via a single SCSI command. | ||
26 | * max_cmd_per_lun, a decimal number specifying the maximum | ||
27 | number of outstanding commands for a single LUN. | ||
28 | * io_class, a hexadecimal number specifying the SRP I/O class. | ||
29 | Must be either 0xff00 (rev 10) or 0x0100 (rev 16a). The I/O | ||
30 | class defines the format of the SRP initiator and target | ||
31 | port identifiers. | ||
32 | * initiator_ext, a 16-digit hexadecimal number specifying the | ||
33 | identifier extension portion of the SRP initiator port | ||
34 | identifier. This data is sent by the initiator to the target | ||
35 | in the SRP_LOGIN_REQ request. | ||
36 | * cmd_sg_entries, a number in the range 1..255 that specifies | ||
37 | the maximum number of data buffer descriptors stored in the | ||
38 | SRP_CMD information unit itself. With allow_ext_sg=0 the | ||
39 | parameter cmd_sg_entries defines the maximum S/G list length | ||
40 | for a single SRP_CMD, and commands whose S/G list length | ||
41 | exceeds this limit after S/G list collapsing will fail. | ||
42 | * allow_ext_sg, whether ib_srp is allowed to include a partial | ||
43 | memory descriptor list in an SRP_CMD instead of the entire | ||
44 | list. If a partial memory descriptor list has been included | ||
45 | in an SRP_CMD the remaining memory descriptors are | ||
46 | communicated from initiator to target via an additional RDMA | ||
47 | transfer. Setting allow_ext_sg to 1 increases the maximum | ||
48 | amount of data that can be transferred between initiator and | ||
49 | target via a single SCSI command. Since not all SRP target | ||
50 | implementations support partial memory descriptor lists the | ||
51 | default value for this option is 0. | ||
52 | * sg_tablesize, a number in the range 1..2048 specifying the | ||
53 | maximum S/G list length the SCSI layer is allowed to pass to | ||
54 | ib_srp. Specifying a value that exceeds cmd_sg_entries is | ||
55 | only safe with partial memory descriptor list support enabled | ||
56 | (allow_ext_sg=1). | ||
57 | |||
58 | What: /sys/class/infiniband_srp/srp-<hca>-<port_number>/ibdev | ||
59 | Date: January 2, 2006 | ||
60 | KernelVersion: 2.6.15 | ||
61 | Contact: linux-rdma@vger.kernel.org | ||
62 | Description: HCA name (<hca>). | ||
63 | |||
64 | What: /sys/class/infiniband_srp/srp-<hca>-<port_number>/port | ||
65 | Date: January 2, 2006 | ||
66 | KernelVersion: 2.6.15 | ||
67 | Contact: linux-rdma@vger.kernel.org | ||
68 | Description: HCA port number (<port_number>). | ||
69 | |||
70 | What: /sys/class/scsi_host/host<n>/allow_ext_sg | ||
71 | Date: May 19, 2011 | ||
72 | KernelVersion: 2.6.39 | ||
73 | Contact: linux-rdma@vger.kernel.org | ||
74 | Description: Whether ib_srp is allowed to include a partial memory | ||
75 | descriptor list in an SRP_CMD when communicating with an SRP | ||
76 | target. | ||
77 | |||
78 | What: /sys/class/scsi_host/host<n>/cmd_sg_entries | ||
79 | Date: May 19, 2011 | ||
80 | KernelVersion: 2.6.39 | ||
81 | Contact: linux-rdma@vger.kernel.org | ||
82 | Description: Maximum number of data buffer descriptors that may be sent to | ||
83 | the target in a single SRP_CMD request. | ||
84 | |||
85 | What: /sys/class/scsi_host/host<n>/dgid | ||
86 | Date: June 17, 2006 | ||
87 | KernelVersion: 2.6.17 | ||
88 | Contact: linux-rdma@vger.kernel.org | ||
89 | Description: InfiniBand destination GID used for communication with the SRP | ||
90 | target. Differs from orig_dgid if port redirection has happened. | ||
91 | |||
92 | What: /sys/class/scsi_host/host<n>/id_ext | ||
93 | Date: June 17, 2006 | ||
94 | KernelVersion: 2.6.17 | ||
95 | Contact: linux-rdma@vger.kernel.org | ||
96 | Description: Eight-byte identifier extension portion of the 16-byte target | ||
97 | port identifier. | ||
98 | |||
99 | What: /sys/class/scsi_host/host<n>/ioc_guid | ||
100 | Date: June 17, 2006 | ||
101 | KernelVersion: 2.6.17 | ||
102 | Contact: linux-rdma@vger.kernel.org | ||
103 | Description: Eight-byte I/O controller GUID portion of the 16-byte target | ||
104 | port identifier. | ||
105 | |||
106 | What: /sys/class/scsi_host/host<n>/local_ib_device | ||
107 | Date: November 29, 2006 | ||
108 | KernelVersion: 2.6.19 | ||
109 | Contact: linux-rdma@vger.kernel.org | ||
110 | Description: Name of the InfiniBand HCA used for communicating with the | ||
111 | SRP target. | ||
112 | |||
113 | What: /sys/class/scsi_host/host<n>/local_ib_port | ||
114 | Date: November 29, 2006 | ||
115 | KernelVersion: 2.6.19 | ||
116 | Contact: linux-rdma@vger.kernel.org | ||
117 | Description: Number of the HCA port used for communicating with the | ||
118 | SRP target. | ||
119 | |||
120 | What: /sys/class/scsi_host/host<n>/orig_dgid | ||
121 | Date: June 17, 2006 | ||
122 | KernelVersion: 2.6.17 | ||
123 | Contact: linux-rdma@vger.kernel.org | ||
124 | Description: InfiniBand destination GID specified in the parameters | ||
125 | written to the add_target sysfs attribute. | ||
126 | |||
127 | What: /sys/class/scsi_host/host<n>/pkey | ||
128 | Date: June 17, 2006 | ||
129 | KernelVersion: 2.6.17 | ||
130 | Contact: linux-rdma@vger.kernel.org | ||
131 | Description: A 16-bit number representing the InfiniBand partition key used | ||
132 | for communication with the SRP target. | ||
133 | |||
134 | What: /sys/class/scsi_host/host<n>/req_lim | ||
135 | Date: October 20, 2010 | ||
136 | KernelVersion: 2.6.36 | ||
137 | Contact: linux-rdma@vger.kernel.org | ||
138 | Description: Number of requests ib_srp can send to the target before it has | ||
139 | to wait for more credits. For more information see also the | ||
140 | SRP credit algorithm in the SRP specification. | ||
141 | |||
142 | What: /sys/class/scsi_host/host<n>/service_id | ||
143 | Date: June 17, 2006 | ||
144 | KernelVersion: 2.6.17 | ||
145 | Contact: linux-rdma@vger.kernel.org | ||
146 | Description: InfiniBand service ID used for establishing communication with | ||
147 | the SRP target. | ||
148 | |||
149 | What: /sys/class/scsi_host/host<n>/zero_req_lim | ||
150 | Date: September 20, 2006 | ||
151 | KernelVersion: 2.6.18 | ||
152 | Contact: linux-rdma@vger.kernel.org | ||
153 | Description: Number of times the initiator had to wait before sending a | ||
154 | request to the target because it ran out of credits. For more | ||
155 | information see also the SRP credit algorithm in the SRP | ||
156 | specification. | ||
diff --git a/Documentation/ABI/stable/sysfs-transport-srp b/Documentation/ABI/stable/sysfs-transport-srp new file mode 100644 index 000000000000..b36fb0dc13c8 --- /dev/null +++ b/Documentation/ABI/stable/sysfs-transport-srp | |||
@@ -0,0 +1,19 @@ | |||
1 | What: /sys/class/srp_remote_ports/port-<h>:<n>/delete | ||
2 | Date: June 1, 2012 | ||
3 | KernelVersion: 3.7 | ||
4 | Contact: linux-scsi@vger.kernel.org, linux-rdma@vger.kernel.org | ||
5 | Description: Instructs an SRP initiator to disconnect from a target and to | ||
6 | remove all LUNs imported from that target. | ||
7 | |||
8 | What: /sys/class/srp_remote_ports/port-<h>:<n>/port_id | ||
9 | Date: June 27, 2007 | ||
10 | KernelVersion: 2.6.24 | ||
11 | Contact: linux-scsi@vger.kernel.org | ||
12 | Description: 16-byte local SRP port identifier in hexadecimal format. An | ||
13 | example: 4c:49:4e:55:58:20:56:49:4f:00:00:00:00:00:00:00. | ||
14 | |||
15 | What: /sys/class/srp_remote_ports/port-<h>:<n>/roles | ||
16 | Date: June 27, 2007 | ||
17 | KernelVersion: 2.6.24 | ||
18 | Contact: linux-scsi@vger.kernel.org | ||
19 | Description: Role of the remote port. Either "SRP Initiator" or "SRP Target". | ||
diff --git a/Documentation/ABI/testing/dev-kmsg b/Documentation/ABI/testing/dev-kmsg index 7e7e07a82e0e..bb820be48179 100644 --- a/Documentation/ABI/testing/dev-kmsg +++ b/Documentation/ABI/testing/dev-kmsg | |||
@@ -92,7 +92,7 @@ Description: The /dev/kmsg character device node provides userspace access | |||
92 | The flags field carries '-' by default. A 'c' indicates a | 92 | The flags field carries '-' by default. A 'c' indicates a |
93 | fragment of a line. All following fragments are flagged with | 93 | fragment of a line. All following fragments are flagged with |
94 | '+'. Note, that these hints about continuation lines are not | 94 | '+'. Note, that these hints about continuation lines are not |
95 | neccessarily correct, and the stream could be interleaved with | 95 | necessarily correct, and the stream could be interleaved with |
96 | unrelated messages, but merging the lines in the output | 96 | unrelated messages, but merging the lines in the output |
97 | usually produces better human readable results. A similar | 97 | usually produces better human readable results. A similar |
98 | logic is used internally when messages are printed to the | 98 | logic is used internally when messages are printed to the |
diff --git a/Documentation/ABI/testing/ima_policy b/Documentation/ABI/testing/ima_policy index 986946613542..ec0a38ef3145 100644 --- a/Documentation/ABI/testing/ima_policy +++ b/Documentation/ABI/testing/ima_policy | |||
@@ -23,7 +23,7 @@ Description: | |||
23 | lsm: [[subj_user=] [subj_role=] [subj_type=] | 23 | lsm: [[subj_user=] [subj_role=] [subj_type=] |
24 | [obj_user=] [obj_role=] [obj_type=]] | 24 | [obj_user=] [obj_role=] [obj_type=]] |
25 | 25 | ||
26 | base: func:= [BPRM_CHECK][FILE_MMAP][FILE_CHECK] | 26 | base: func:= [BPRM_CHECK][FILE_MMAP][FILE_CHECK][MODULE_CHECK] |
27 | mask:= [MAY_READ] [MAY_WRITE] [MAY_APPEND] [MAY_EXEC] | 27 | mask:= [MAY_READ] [MAY_WRITE] [MAY_APPEND] [MAY_EXEC] |
28 | fsmagic:= hex value | 28 | fsmagic:= hex value |
29 | uid:= decimal value | 29 | uid:= decimal value |
@@ -53,6 +53,7 @@ Description: | |||
53 | measure func=BPRM_CHECK | 53 | measure func=BPRM_CHECK |
54 | measure func=FILE_MMAP mask=MAY_EXEC | 54 | measure func=FILE_MMAP mask=MAY_EXEC |
55 | measure func=FILE_CHECK mask=MAY_READ uid=0 | 55 | measure func=FILE_CHECK mask=MAY_READ uid=0 |
56 | measure func=MODULE_CHECK uid=0 | ||
56 | appraise fowner=0 | 57 | appraise fowner=0 |
57 | 58 | ||
58 | The default policy measures all executables in bprm_check, | 59 | The default policy measures all executables in bprm_check, |
diff --git a/Documentation/ABI/testing/sysfs-bus-iio b/Documentation/ABI/testing/sysfs-bus-iio index 2f06d40fe07d..2e33dc6b2346 100644 --- a/Documentation/ABI/testing/sysfs-bus-iio +++ b/Documentation/ABI/testing/sysfs-bus-iio | |||
@@ -189,6 +189,14 @@ Description: | |||
189 | A computed peak value based on the sum squared magnitude of | 189 | A computed peak value based on the sum squared magnitude of |
190 | the underlying value in the specified directions. | 190 | the underlying value in the specified directions. |
191 | 191 | ||
192 | What: /sys/bus/iio/devices/iio:deviceX/in_pressureY_raw | ||
193 | What: /sys/bus/iio/devices/iio:deviceX/in_pressure_raw | ||
194 | KernelVersion: 3.8 | ||
195 | Contact: linux-iio@vger.kernel.org | ||
196 | Description: | ||
197 | Raw pressure measurement from channel Y. Units after | ||
198 | application of scale and offset are kilopascal. | ||
199 | |||
192 | What: /sys/bus/iio/devices/iio:deviceX/in_accel_offset | 200 | What: /sys/bus/iio/devices/iio:deviceX/in_accel_offset |
193 | What: /sys/bus/iio/devices/iio:deviceX/in_accel_x_offset | 201 | What: /sys/bus/iio/devices/iio:deviceX/in_accel_x_offset |
194 | What: /sys/bus/iio/devices/iio:deviceX/in_accel_y_offset | 202 | What: /sys/bus/iio/devices/iio:deviceX/in_accel_y_offset |
@@ -197,6 +205,8 @@ What: /sys/bus/iio/devices/iio:deviceX/in_voltageY_offset | |||
197 | What: /sys/bus/iio/devices/iio:deviceX/in_voltage_offset | 205 | What: /sys/bus/iio/devices/iio:deviceX/in_voltage_offset |
198 | What: /sys/bus/iio/devices/iio:deviceX/in_tempY_offset | 206 | What: /sys/bus/iio/devices/iio:deviceX/in_tempY_offset |
199 | What: /sys/bus/iio/devices/iio:deviceX/in_temp_offset | 207 | What: /sys/bus/iio/devices/iio:deviceX/in_temp_offset |
208 | What: /sys/bus/iio/devices/iio:deviceX/in_pressureY_offset | ||
209 | What: /sys/bus/iio/devices/iio:deviceX/in_pressure_offset | ||
200 | KernelVersion: 2.6.35 | 210 | KernelVersion: 2.6.35 |
201 | Contact: linux-iio@vger.kernel.org | 211 | Contact: linux-iio@vger.kernel.org |
202 | Description: | 212 | Description: |
@@ -226,6 +236,8 @@ What: /sys/bus/iio/devices/iio:deviceX/in_magn_scale | |||
226 | What: /sys/bus/iio/devices/iio:deviceX/in_magn_x_scale | 236 | What: /sys/bus/iio/devices/iio:deviceX/in_magn_x_scale |
227 | What: /sys/bus/iio/devices/iio:deviceX/in_magn_y_scale | 237 | What: /sys/bus/iio/devices/iio:deviceX/in_magn_y_scale |
228 | What: /sys/bus/iio/devices/iio:deviceX/in_magn_z_scale | 238 | What: /sys/bus/iio/devices/iio:deviceX/in_magn_z_scale |
239 | What: /sys/bus/iio/devices/iio:deviceX/in_pressureY_scale | ||
240 | What: /sys/bus/iio/devices/iio:deviceX/in_pressure_scale | ||
229 | KernelVersion: 2.6.35 | 241 | KernelVersion: 2.6.35 |
230 | Contact: linux-iio@vger.kernel.org | 242 | Contact: linux-iio@vger.kernel.org |
231 | Description: | 243 | Description: |
@@ -245,6 +257,8 @@ What: /sys/bus/iio/devices/iio:deviceX/in_anglvel_y_calibbias | |||
245 | What: /sys/bus/iio/devices/iio:deviceX/in_anglvel_z_calibbias | 257 | What: /sys/bus/iio/devices/iio:deviceX/in_anglvel_z_calibbias |
246 | What: /sys/bus/iio/devices/iio:deviceX/in_illuminance0_calibbias | 258 | What: /sys/bus/iio/devices/iio:deviceX/in_illuminance0_calibbias |
247 | What: /sys/bus/iio/devices/iio:deviceX/in_proximity0_calibbias | 259 | What: /sys/bus/iio/devices/iio:deviceX/in_proximity0_calibbias |
260 | What: /sys/bus/iio/devices/iio:deviceX/in_pressureY_calibbias | ||
261 | What: /sys/bus/iio/devices/iio:deviceX/in_pressure_calibbias | ||
248 | KernelVersion: 2.6.35 | 262 | KernelVersion: 2.6.35 |
249 | Contact: linux-iio@vger.kernel.org | 263 | Contact: linux-iio@vger.kernel.org |
250 | Description: | 264 | Description: |
@@ -262,6 +276,8 @@ What /sys/bus/iio/devices/iio:deviceX/in_anglvel_y_calibscale | |||
262 | What /sys/bus/iio/devices/iio:deviceX/in_anglvel_z_calibscale | 276 | What /sys/bus/iio/devices/iio:deviceX/in_anglvel_z_calibscale |
263 | what /sys/bus/iio/devices/iio:deviceX/in_illuminance0_calibscale | 277 | what /sys/bus/iio/devices/iio:deviceX/in_illuminance0_calibscale |
264 | what /sys/bus/iio/devices/iio:deviceX/in_proximity0_calibscale | 278 | what /sys/bus/iio/devices/iio:deviceX/in_proximity0_calibscale |
279 | What: /sys/bus/iio/devices/iio:deviceX/in_pressureY_calibscale | ||
280 | What: /sys/bus/iio/devices/iio:deviceX/in_pressure_calibscale | ||
265 | KernelVersion: 2.6.35 | 281 | KernelVersion: 2.6.35 |
266 | Contact: linux-iio@vger.kernel.org | 282 | Contact: linux-iio@vger.kernel.org |
267 | Description: | 283 | Description: |
@@ -275,6 +291,8 @@ What: /sys/.../iio:deviceX/in_voltage-voltage_scale_available | |||
275 | What: /sys/.../iio:deviceX/out_voltageX_scale_available | 291 | What: /sys/.../iio:deviceX/out_voltageX_scale_available |
276 | What: /sys/.../iio:deviceX/out_altvoltageX_scale_available | 292 | What: /sys/.../iio:deviceX/out_altvoltageX_scale_available |
277 | What: /sys/.../iio:deviceX/in_capacitance_scale_available | 293 | What: /sys/.../iio:deviceX/in_capacitance_scale_available |
294 | What: /sys/.../iio:deviceX/in_pressure_scale_available | ||
295 | What: /sys/.../iio:deviceX/in_pressureY_scale_available | ||
278 | KernelVersion: 2.6.35 | 296 | KernelVersion: 2.6.35 |
279 | Contact: linux-iio@vger.kernel.org | 297 | Contact: linux-iio@vger.kernel.org |
280 | Description: | 298 | Description: |
@@ -694,6 +712,8 @@ What: /sys/.../buffer/scan_elements/in_voltageY_en | |||
694 | What: /sys/.../buffer/scan_elements/in_voltageY-voltageZ_en | 712 | What: /sys/.../buffer/scan_elements/in_voltageY-voltageZ_en |
695 | What: /sys/.../buffer/scan_elements/in_incli_x_en | 713 | What: /sys/.../buffer/scan_elements/in_incli_x_en |
696 | What: /sys/.../buffer/scan_elements/in_incli_y_en | 714 | What: /sys/.../buffer/scan_elements/in_incli_y_en |
715 | What: /sys/.../buffer/scan_elements/in_pressureY_en | ||
716 | What: /sys/.../buffer/scan_elements/in_pressure_en | ||
697 | KernelVersion: 2.6.37 | 717 | KernelVersion: 2.6.37 |
698 | Contact: linux-iio@vger.kernel.org | 718 | Contact: linux-iio@vger.kernel.org |
699 | Description: | 719 | Description: |
@@ -707,6 +727,8 @@ What: /sys/.../buffer/scan_elements/in_voltageY_type | |||
707 | What: /sys/.../buffer/scan_elements/in_voltage_type | 727 | What: /sys/.../buffer/scan_elements/in_voltage_type |
708 | What: /sys/.../buffer/scan_elements/in_voltageY_supply_type | 728 | What: /sys/.../buffer/scan_elements/in_voltageY_supply_type |
709 | What: /sys/.../buffer/scan_elements/in_timestamp_type | 729 | What: /sys/.../buffer/scan_elements/in_timestamp_type |
730 | What: /sys/.../buffer/scan_elements/in_pressureY_type | ||
731 | What: /sys/.../buffer/scan_elements/in_pressure_type | ||
710 | KernelVersion: 2.6.37 | 732 | KernelVersion: 2.6.37 |
711 | Contact: linux-iio@vger.kernel.org | 733 | Contact: linux-iio@vger.kernel.org |
712 | Description: | 734 | Description: |
@@ -751,6 +773,8 @@ What: /sys/.../buffer/scan_elements/in_magn_z_index | |||
751 | What: /sys/.../buffer/scan_elements/in_incli_x_index | 773 | What: /sys/.../buffer/scan_elements/in_incli_x_index |
752 | What: /sys/.../buffer/scan_elements/in_incli_y_index | 774 | What: /sys/.../buffer/scan_elements/in_incli_y_index |
753 | What: /sys/.../buffer/scan_elements/in_timestamp_index | 775 | What: /sys/.../buffer/scan_elements/in_timestamp_index |
776 | What: /sys/.../buffer/scan_elements/in_pressureY_index | ||
777 | What: /sys/.../buffer/scan_elements/in_pressure_index | ||
754 | KernelVersion: 2.6.37 | 778 | KernelVersion: 2.6.37 |
755 | Contact: linux-iio@vger.kernel.org | 779 | Contact: linux-iio@vger.kernel.org |
756 | Description: | 780 | Description: |
diff --git a/Documentation/ABI/testing/sysfs-bus-mdio b/Documentation/ABI/testing/sysfs-bus-mdio new file mode 100644 index 000000000000..6349749ebc29 --- /dev/null +++ b/Documentation/ABI/testing/sysfs-bus-mdio | |||
@@ -0,0 +1,9 @@ | |||
1 | What: /sys/bus/mdio_bus/devices/.../phy_id | ||
2 | Date: November 2012 | ||
3 | KernelVersion: 3.8 | ||
4 | Contact: netdev@vger.kernel.org | ||
5 | Description: | ||
6 | This attribute contains the 32-bit PHY Identifier as reported | ||
7 | by the device during bus enumeration, encoded in hexadecimal. | ||
8 | This ID is used to match the device with the appropriate | ||
9 | driver. | ||
diff --git a/Documentation/ABI/testing/sysfs-bus-pci b/Documentation/ABI/testing/sysfs-bus-pci index dff1f48d252d..1ce5ae329c04 100644 --- a/Documentation/ABI/testing/sysfs-bus-pci +++ b/Documentation/ABI/testing/sysfs-bus-pci | |||
@@ -222,3 +222,37 @@ Description: | |||
222 | satisfied too. Reading this attribute will show the current | 222 | satisfied too. Reading this attribute will show the current |
223 | value of d3cold_allowed bit. Writing this attribute will set | 223 | value of d3cold_allowed bit. Writing this attribute will set |
224 | the value of d3cold_allowed bit. | 224 | the value of d3cold_allowed bit. |
225 | |||
226 | What: /sys/bus/pci/devices/.../sriov_totalvfs | ||
227 | Date: November 2012 | ||
228 | Contact: Donald Dutile <ddutile@redhat.com> | ||
229 | Description: | ||
230 | This file appears when a physical PCIe device supports SR-IOV. | ||
231 | Userspace applications can read this file to determine the | ||
232 | maximum number of Virtual Functions (VFs) a PCIe physical | ||
233 | function (PF) can support. Typically, this is the value reported | ||
234 | in the PF's SR-IOV extended capability structure's TotalVFs | ||
235 | element. Drivers have the ability at probe time to reduce the | ||
236 | value read from this file via the pci_sriov_set_totalvfs() | ||
237 | function. | ||
238 | |||
239 | What: /sys/bus/pci/devices/.../sriov_numvfs | ||
240 | Date: November 2012 | ||
241 | Contact: Donald Dutile <ddutile@redhat.com> | ||
242 | Description: | ||
243 | This file appears when a physical PCIe device supports SR-IOV. | ||
244 | Userspace applications can read and write to this file to | ||
245 | determine and control the enablement or disablement of Virtual | ||
246 | Functions (VFs) on the physical function (PF). A read of this | ||
247 | file will return the number of VFs that are enabled on this PF. | ||
248 | A number written to this file will enable the specified | ||
249 | number of VFs. A userspace application would typically read the | ||
250 | file and check that the value is zero, and then write the number | ||
251 | of VFs that should be enabled on the PF; the value written | ||
252 | should be less than or equal to the value in the sriov_totalvfs | ||
253 | file. A userspace application wanting to disable the VFs would | ||
254 | write a zero to this file. The core ensures that valid values | ||
255 | are written to this file, and returns errors when values are not | ||
256 | valid. For example, writing a 2 to this file when sriov_numvfs | ||
257 | is not 0 and not 2 already will return an error. Writing a 10 | ||
258 | when the value of sriov_totalvfs is 8 will return an error. | ||
diff --git a/Documentation/ABI/testing/sysfs-bus-rbd b/Documentation/ABI/testing/sysfs-bus-rbd index 1cf2adf46b11..cd9213ccf3dc 100644 --- a/Documentation/ABI/testing/sysfs-bus-rbd +++ b/Documentation/ABI/testing/sysfs-bus-rbd | |||
@@ -70,6 +70,10 @@ snap_* | |||
70 | 70 | ||
71 | A directory per each snapshot | 71 | A directory per each snapshot |
72 | 72 | ||
73 | parent | ||
74 | |||
75 | Information identifying the pool, image, and snapshot id for | ||
76 | the parent image in a layered rbd image (format 2 only). | ||
73 | 77 | ||
74 | Entries under /sys/bus/rbd/devices/<dev-id>/snap_<snap-name> | 78 | Entries under /sys/bus/rbd/devices/<dev-id>/snap_<snap-name> |
75 | ------------------------------------------------------------- | 79 | ------------------------------------------------------------- |
diff --git a/Documentation/ABI/testing/sysfs-class-devfreq b/Documentation/ABI/testing/sysfs-class-devfreq index 23d78b5aab11..0ba6ea2f89d9 100644 --- a/Documentation/ABI/testing/sysfs-class-devfreq +++ b/Documentation/ABI/testing/sysfs-class-devfreq | |||
@@ -11,7 +11,7 @@ What: /sys/class/devfreq/.../governor | |||
11 | Date: September 2011 | 11 | Date: September 2011 |
12 | Contact: MyungJoo Ham <myungjoo.ham@samsung.com> | 12 | Contact: MyungJoo Ham <myungjoo.ham@samsung.com> |
13 | Description: | 13 | Description: |
14 | The /sys/class/devfreq/.../governor shows the name of the | 14 | The /sys/class/devfreq/.../governor show or set the name of the |
15 | governor used by the corresponding devfreq object. | 15 | governor used by the corresponding devfreq object. |
16 | 16 | ||
17 | What: /sys/class/devfreq/.../cur_freq | 17 | What: /sys/class/devfreq/.../cur_freq |
@@ -19,15 +19,16 @@ Date: September 2011 | |||
19 | Contact: MyungJoo Ham <myungjoo.ham@samsung.com> | 19 | Contact: MyungJoo Ham <myungjoo.ham@samsung.com> |
20 | Description: | 20 | Description: |
21 | The /sys/class/devfreq/.../cur_freq shows the current | 21 | The /sys/class/devfreq/.../cur_freq shows the current |
22 | frequency of the corresponding devfreq object. | 22 | frequency of the corresponding devfreq object. Same as |
23 | target_freq when get_cur_freq() is not implemented by | ||
24 | devfreq driver. | ||
23 | 25 | ||
24 | What: /sys/class/devfreq/.../central_polling | 26 | What: /sys/class/devfreq/.../target_freq |
25 | Date: September 2011 | 27 | Date: September 2012 |
26 | Contact: MyungJoo Ham <myungjoo.ham@samsung.com> | 28 | Contact: Rajagopal Venkat <rajagopal.venkat@linaro.org> |
27 | Description: | 29 | Description: |
28 | The /sys/class/devfreq/.../central_polling shows whether | 30 | The /sys/class/devfreq/.../target_freq shows the next governor |
29 | the devfreq ojbect is using devfreq-provided central | 31 | predicted target frequency of the corresponding devfreq object. |
30 | polling mechanism or not. | ||
31 | 32 | ||
32 | What: /sys/class/devfreq/.../polling_interval | 33 | What: /sys/class/devfreq/.../polling_interval |
33 | Date: September 2011 | 34 | Date: September 2011 |
@@ -43,6 +44,17 @@ Description: | |||
43 | (/sys/class/devfreq/.../central_polling is 0), this value | 44 | (/sys/class/devfreq/.../central_polling is 0), this value |
44 | may be useless. | 45 | may be useless. |
45 | 46 | ||
47 | What: /sys/class/devfreq/.../trans_stat | ||
48 | Date: October 2012 | ||
49 | Contact: MyungJoo Ham <myungjoo.ham@samsung.com> | ||
50 | Descrtiption: | ||
51 | This ABI shows the statistics of devfreq behavior on a | ||
52 | specific device. It shows the time spent in each state and | ||
53 | the number of transitions between states. | ||
54 | In order to activate this ABI, the devfreq target device | ||
55 | driver should provide the list of available frequencies | ||
56 | with its profile. | ||
57 | |||
46 | What: /sys/class/devfreq/.../userspace/set_freq | 58 | What: /sys/class/devfreq/.../userspace/set_freq |
47 | Date: September 2011 | 59 | Date: September 2011 |
48 | Contact: MyungJoo Ham <myungjoo.ham@samsung.com> | 60 | Contact: MyungJoo Ham <myungjoo.ham@samsung.com> |
@@ -50,3 +62,19 @@ Description: | |||
50 | The /sys/class/devfreq/.../userspace/set_freq shows and | 62 | The /sys/class/devfreq/.../userspace/set_freq shows and |
51 | sets the requested frequency for the devfreq object if | 63 | sets the requested frequency for the devfreq object if |
52 | userspace governor is in effect. | 64 | userspace governor is in effect. |
65 | |||
66 | What: /sys/class/devfreq/.../available_frequencies | ||
67 | Date: October 2012 | ||
68 | Contact: Nishanth Menon <nm@ti.com> | ||
69 | Description: | ||
70 | The /sys/class/devfreq/.../available_frequencies shows | ||
71 | the available frequencies of the corresponding devfreq object. | ||
72 | This is a snapshot of available frequencies and not limited | ||
73 | by the min/max frequency restrictions. | ||
74 | |||
75 | What: /sys/class/devfreq/.../available_governors | ||
76 | Date: October 2012 | ||
77 | Contact: Nishanth Menon <nm@ti.com> | ||
78 | Description: | ||
79 | The /sys/class/devfreq/.../available_governors shows | ||
80 | currently available governors in the system. | ||
diff --git a/Documentation/ABI/testing/sysfs-class-net-batman-adv b/Documentation/ABI/testing/sysfs-class-net-batman-adv index 38dd762def4b..bdc00707c751 100644 --- a/Documentation/ABI/testing/sysfs-class-net-batman-adv +++ b/Documentation/ABI/testing/sysfs-class-net-batman-adv | |||
@@ -1,4 +1,10 @@ | |||
1 | 1 | ||
2 | What: /sys/class/net/<iface>/batman-adv/iface_status | ||
3 | Date: May 2010 | ||
4 | Contact: Marek Lindner <lindner_marek@yahoo.de> | ||
5 | Description: | ||
6 | Indicates the status of <iface> as it is seen by batman. | ||
7 | |||
2 | What: /sys/class/net/<iface>/batman-adv/mesh_iface | 8 | What: /sys/class/net/<iface>/batman-adv/mesh_iface |
3 | Date: May 2010 | 9 | Date: May 2010 |
4 | Contact: Marek Lindner <lindner_marek@yahoo.de> | 10 | Contact: Marek Lindner <lindner_marek@yahoo.de> |
@@ -7,8 +13,3 @@ Description: | |||
7 | displays the batman mesh interface this <iface> | 13 | displays the batman mesh interface this <iface> |
8 | currently is associated with. | 14 | currently is associated with. |
9 | 15 | ||
10 | What: /sys/class/net/<iface>/batman-adv/iface_status | ||
11 | Date: May 2010 | ||
12 | Contact: Marek Lindner <lindner_marek@yahoo.de> | ||
13 | Description: | ||
14 | Indicates the status of <iface> as it is seen by batman. | ||
diff --git a/Documentation/ABI/testing/sysfs-class-net-grcan b/Documentation/ABI/testing/sysfs-class-net-grcan new file mode 100644 index 000000000000..f418c92ca555 --- /dev/null +++ b/Documentation/ABI/testing/sysfs-class-net-grcan | |||
@@ -0,0 +1,35 @@ | |||
1 | |||
2 | What: /sys/class/net/<iface>/grcan/enable0 | ||
3 | Date: October 2012 | ||
4 | KernelVersion: 3.8 | ||
5 | Contact: Andreas Larsson <andreas@gaisler.com> | ||
6 | Description: | ||
7 | Hardware configuration of physical interface 0. This file reads | ||
8 | and writes the "Enable 0" bit of the configuration register. | ||
9 | Possible values: 0 or 1. See the GRCAN chapter of the GRLIB IP | ||
10 | core library documentation for details. The default value is 0 | ||
11 | or set by the module parameter grcan.enable0 and can be read at | ||
12 | /sys/module/grcan/parameters/enable0. | ||
13 | |||
14 | What: /sys/class/net/<iface>/grcan/enable1 | ||
15 | Date: October 2012 | ||
16 | KernelVersion: 3.8 | ||
17 | Contact: Andreas Larsson <andreas@gaisler.com> | ||
18 | Description: | ||
19 | Hardware configuration of physical interface 1. This file reads | ||
20 | and writes the "Enable 1" bit of the configuration register. | ||
21 | Possible values: 0 or 1. See the GRCAN chapter of the GRLIB IP | ||
22 | core library documentation for details. The default value is 0 | ||
23 | or set by the module parameter grcan.enable1 and can be read at | ||
24 | /sys/module/grcan/parameters/enable1. | ||
25 | |||
26 | What: /sys/class/net/<iface>/grcan/select | ||
27 | Date: October 2012 | ||
28 | KernelVersion: 3.8 | ||
29 | Contact: Andreas Larsson <andreas@gaisler.com> | ||
30 | Description: | ||
31 | Configuration of which physical interface to be used. Possible | ||
32 | values: 0 or 1. See the GRCAN chapter of the GRLIB IP core | ||
33 | library documentation for details. The default value is 0 or is | ||
34 | set by the module parameter grcan.select and can be read at | ||
35 | /sys/module/grcan/parameters/select. | ||
diff --git a/Documentation/ABI/testing/sysfs-class-net-mesh b/Documentation/ABI/testing/sysfs-class-net-mesh index c81fe89c4c46..bc41da61608d 100644 --- a/Documentation/ABI/testing/sysfs-class-net-mesh +++ b/Documentation/ABI/testing/sysfs-class-net-mesh | |||
@@ -6,6 +6,14 @@ Description: | |||
6 | Indicates whether the batman protocol messages of the | 6 | Indicates whether the batman protocol messages of the |
7 | mesh <mesh_iface> shall be aggregated or not. | 7 | mesh <mesh_iface> shall be aggregated or not. |
8 | 8 | ||
9 | What: /sys/class/net/<mesh_iface>/mesh/ap_isolation | ||
10 | Date: May 2011 | ||
11 | Contact: Antonio Quartulli <ordex@autistici.org> | ||
12 | Description: | ||
13 | Indicates whether the data traffic going from a | ||
14 | wireless client to another wireless client will be | ||
15 | silently dropped. | ||
16 | |||
9 | What: /sys/class/net/<mesh_iface>/mesh/bonding | 17 | What: /sys/class/net/<mesh_iface>/mesh/bonding |
10 | Date: June 2010 | 18 | Date: June 2010 |
11 | Contact: Simon Wunderlich <siwu@hrz.tu-chemnitz.de> | 19 | Contact: Simon Wunderlich <siwu@hrz.tu-chemnitz.de> |
@@ -31,14 +39,6 @@ Description: | |||
31 | mesh will be fragmented or silently discarded if the | 39 | mesh will be fragmented or silently discarded if the |
32 | packet size exceeds the outgoing interface MTU. | 40 | packet size exceeds the outgoing interface MTU. |
33 | 41 | ||
34 | What: /sys/class/net/<mesh_iface>/mesh/ap_isolation | ||
35 | Date: May 2011 | ||
36 | Contact: Antonio Quartulli <ordex@autistici.org> | ||
37 | Description: | ||
38 | Indicates whether the data traffic going from a | ||
39 | wireless client to another wireless client will be | ||
40 | silently dropped. | ||
41 | |||
42 | What: /sys/class/net/<mesh_iface>/mesh/gw_bandwidth | 42 | What: /sys/class/net/<mesh_iface>/mesh/gw_bandwidth |
43 | Date: October 2010 | 43 | Date: October 2010 |
44 | Contact: Marek Lindner <lindner_marek@yahoo.de> | 44 | Contact: Marek Lindner <lindner_marek@yahoo.de> |
@@ -60,6 +60,13 @@ Description: | |||
60 | Defines the selection criteria this node will use | 60 | Defines the selection criteria this node will use |
61 | to choose a gateway if gw_mode was set to 'client'. | 61 | to choose a gateway if gw_mode was set to 'client'. |
62 | 62 | ||
63 | What: /sys/class/net/<mesh_iface>/mesh/hop_penalty | ||
64 | Date: Oct 2010 | ||
65 | Contact: Linus Lüssing <linus.luessing@web.de> | ||
66 | Description: | ||
67 | Defines the penalty which will be applied to an | ||
68 | originator message's tq-field on every hop. | ||
69 | |||
63 | What: /sys/class/net/<mesh_iface>/mesh/orig_interval | 70 | What: /sys/class/net/<mesh_iface>/mesh/orig_interval |
64 | Date: May 2010 | 71 | Date: May 2010 |
65 | Contact: Marek Lindner <lindner_marek@yahoo.de> | 72 | Contact: Marek Lindner <lindner_marek@yahoo.de> |
@@ -67,19 +74,12 @@ Description: | |||
67 | Defines the interval in milliseconds in which batman | 74 | Defines the interval in milliseconds in which batman |
68 | sends its protocol messages. | 75 | sends its protocol messages. |
69 | 76 | ||
70 | What: /sys/class/net/<mesh_iface>/mesh/hop_penalty | 77 | What: /sys/class/net/<mesh_iface>/mesh/routing_algo |
71 | Date: Oct 2010 | 78 | Date: Dec 2011 |
72 | Contact: Linus Lüssing <linus.luessing@web.de> | 79 | Contact: Marek Lindner <lindner_marek@yahoo.de> |
73 | Description: | ||
74 | Defines the penalty which will be applied to an | ||
75 | originator message's tq-field on every hop. | ||
76 | |||
77 | What: /sys/class/net/<mesh_iface>/mesh/routing_algo | ||
78 | Date: Dec 2011 | ||
79 | Contact: Marek Lindner <lindner_marek@yahoo.de> | ||
80 | Description: | 80 | Description: |
81 | Defines the routing procotol this mesh instance | 81 | Defines the routing procotol this mesh instance |
82 | uses to find the optimal paths through the mesh. | 82 | uses to find the optimal paths through the mesh. |
83 | 83 | ||
84 | What: /sys/class/net/<mesh_iface>/mesh/vis_mode | 84 | What: /sys/class/net/<mesh_iface>/mesh/vis_mode |
85 | Date: May 2010 | 85 | Date: May 2010 |
diff --git a/Documentation/ABI/testing/sysfs-devices-node b/Documentation/ABI/testing/sysfs-devices-node deleted file mode 100644 index 453a210c3ceb..000000000000 --- a/Documentation/ABI/testing/sysfs-devices-node +++ /dev/null | |||
@@ -1,7 +0,0 @@ | |||
1 | What: /sys/devices/system/node/nodeX/compact | ||
2 | Date: February 2010 | ||
3 | Contact: Mel Gorman <mel@csn.ul.ie> | ||
4 | Description: | ||
5 | When this file is written to, all memory within that node | ||
6 | will be compacted. When it completes, memory will be freed | ||
7 | into blocks which have as many contiguous pages as possible | ||
diff --git a/Documentation/ABI/testing/sysfs-devices-power b/Documentation/ABI/testing/sysfs-devices-power index 45000f0db4d4..9d43e7670841 100644 --- a/Documentation/ABI/testing/sysfs-devices-power +++ b/Documentation/ABI/testing/sysfs-devices-power | |||
@@ -164,7 +164,7 @@ Contact: Rafael J. Wysocki <rjw@sisk.pl> | |||
164 | Description: | 164 | Description: |
165 | The /sys/devices/.../wakeup_prevent_sleep_time_ms attribute | 165 | The /sys/devices/.../wakeup_prevent_sleep_time_ms attribute |
166 | contains the total time the device has been preventing | 166 | contains the total time the device has been preventing |
167 | opportunistic transitions to sleep states from occuring. | 167 | opportunistic transitions to sleep states from occurring. |
168 | This attribute is read-only. If the device is not enabled to | 168 | This attribute is read-only. If the device is not enabled to |
169 | wake up the system from sleep states, this attribute is not | 169 | wake up the system from sleep states, this attribute is not |
170 | present. | 170 | present. |
@@ -204,3 +204,34 @@ Description: | |||
204 | 204 | ||
205 | This attribute has no effect on system-wide suspend/resume and | 205 | This attribute has no effect on system-wide suspend/resume and |
206 | hibernation. | 206 | hibernation. |
207 | |||
208 | What: /sys/devices/.../power/pm_qos_no_power_off | ||
209 | Date: September 2012 | ||
210 | Contact: Rafael J. Wysocki <rjw@sisk.pl> | ||
211 | Description: | ||
212 | The /sys/devices/.../power/pm_qos_no_power_off attribute | ||
213 | is used for manipulating the PM QoS "no power off" flag. If | ||
214 | set, this flag indicates to the kernel that power should not | ||
215 | be removed entirely from the device. | ||
216 | |||
217 | Not all drivers support this attribute. If it isn't supported, | ||
218 | it is not present. | ||
219 | |||
220 | This attribute has no effect on system-wide suspend/resume and | ||
221 | hibernation. | ||
222 | |||
223 | What: /sys/devices/.../power/pm_qos_remote_wakeup | ||
224 | Date: September 2012 | ||
225 | Contact: Rafael J. Wysocki <rjw@sisk.pl> | ||
226 | Description: | ||
227 | The /sys/devices/.../power/pm_qos_remote_wakeup attribute | ||
228 | is used for manipulating the PM QoS "remote wakeup required" | ||
229 | flag. If set, this flag indicates to the kernel that the | ||
230 | device is a source of user events that have to be signaled from | ||
231 | its low-power states. | ||
232 | |||
233 | Not all drivers support this attribute. If it isn't supported, | ||
234 | it is not present. | ||
235 | |||
236 | This attribute has no effect on system-wide suspend/resume and | ||
237 | hibernation. | ||
diff --git a/Documentation/ABI/testing/sysfs-devices-sun b/Documentation/ABI/testing/sysfs-devices-sun new file mode 100644 index 000000000000..86be9848a77e --- /dev/null +++ b/Documentation/ABI/testing/sysfs-devices-sun | |||
@@ -0,0 +1,14 @@ | |||
1 | Whatt: /sys/devices/.../sun | ||
2 | Date: October 2012 | ||
3 | Contact: Yasuaki Ishimatsu <isimatu.yasuaki@jp.fujitsu.com> | ||
4 | Description: | ||
5 | The file contains a Slot-unique ID which provided by the _SUN | ||
6 | method in the ACPI namespace. The value is written in Advanced | ||
7 | Configuration and Power Interface Specification as follows: | ||
8 | |||
9 | "The _SUN value is required to be unique among the slots of | ||
10 | the same type. It is also recommended that this number match | ||
11 | the slot number printed on the physical slot whenever possible." | ||
12 | |||
13 | So reading the sysfs file, we can identify a physical position | ||
14 | of the slot in the system. | ||
diff --git a/Documentation/ABI/testing/sysfs-driver-hid-roccat-isku b/Documentation/ABI/testing/sysfs-driver-hid-roccat-isku index 189dc43891bf..9eca5a182e64 100644 --- a/Documentation/ABI/testing/sysfs-driver-hid-roccat-isku +++ b/Documentation/ABI/testing/sysfs-driver-hid-roccat-isku | |||
@@ -117,6 +117,14 @@ Description: When written, this file lets one store macros with max 500 | |||
117 | which profile and key to read. | 117 | which profile and key to read. |
118 | Users: http://roccat.sourceforge.net | 118 | Users: http://roccat.sourceforge.net |
119 | 119 | ||
120 | What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/isku/roccatisku<minor>/reset | ||
121 | Date: November 2012 | ||
122 | Contact: Stefan Achatz <erazor_de@users.sourceforge.net> | ||
123 | Description: When written, this file lets one reset the device. | ||
124 | The data has to be 3 bytes long. | ||
125 | This file is writeonly. | ||
126 | Users: http://roccat.sourceforge.net | ||
127 | |||
120 | What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/isku/roccatisku<minor>/control | 128 | What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/isku/roccatisku<minor>/control |
121 | Date: June 2011 | 129 | Date: June 2011 |
122 | Contact: Stefan Achatz <erazor_de@users.sourceforge.net> | 130 | Contact: Stefan Achatz <erazor_de@users.sourceforge.net> |
diff --git a/Documentation/ABI/testing/sysfs-driver-hid-roccat-koneplus b/Documentation/ABI/testing/sysfs-driver-hid-roccat-koneplus index 65e6e5dd67e8..7bd776f9c3c7 100644 --- a/Documentation/ABI/testing/sysfs-driver-hid-roccat-koneplus +++ b/Documentation/ABI/testing/sysfs-driver-hid-roccat-koneplus | |||
@@ -9,15 +9,12 @@ Description: The integer value of this attribute ranges from 0-4. | |||
9 | and the mouse activates this profile immediately. | 9 | and the mouse activates this profile immediately. |
10 | Users: http://roccat.sourceforge.net | 10 | Users: http://roccat.sourceforge.net |
11 | 11 | ||
12 | What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/koneplus/roccatkoneplus<minor>/firmware_version | 12 | What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/koneplus/roccatkoneplus<minor>/info |
13 | Date: October 2010 | 13 | Date: November 2012 |
14 | Contact: Stefan Achatz <erazor_de@users.sourceforge.net> | 14 | Contact: Stefan Achatz <erazor_de@users.sourceforge.net> |
15 | Description: When read, this file returns the raw integer version number of the | 15 | Description: When read, this file returns general data like firmware version. |
16 | firmware reported by the mouse. Using the integer value eases | 16 | When written, the device can be reset. |
17 | further usage in other programs. To receive the real version | 17 | The data is 8 bytes long. |
18 | number the decimal point has to be shifted 2 positions to the | ||
19 | left. E.g. a returned value of 121 means 1.21 | ||
20 | This file is readonly. | ||
21 | Users: http://roccat.sourceforge.net | 18 | Users: http://roccat.sourceforge.net |
22 | 19 | ||
23 | What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/koneplus/roccatkoneplus<minor>/macro | 20 | What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/koneplus/roccatkoneplus<minor>/macro |
@@ -42,18 +39,8 @@ Description: The mouse can store 5 profiles which can be switched by the | |||
42 | The mouse will reject invalid data. | 39 | The mouse will reject invalid data. |
43 | Which profile to write is determined by the profile number | 40 | Which profile to write is determined by the profile number |
44 | contained in the data. | 41 | contained in the data. |
45 | This file is writeonly. | 42 | Before reading this file, control has to be written to select |
46 | Users: http://roccat.sourceforge.net | 43 | which profile to read. |
47 | |||
48 | What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/koneplus/roccatkoneplus<minor>/profile[1-5]_buttons | ||
49 | Date: August 2010 | ||
50 | Contact: Stefan Achatz <erazor_de@users.sourceforge.net> | ||
51 | Description: The mouse can store 5 profiles which can be switched by the | ||
52 | press of a button. A profile is split in settings and buttons. | ||
53 | profile_buttons holds information about button layout. | ||
54 | When read, these files return the respective profile buttons. | ||
55 | The returned data is 77 bytes in size. | ||
56 | This file is readonly. | ||
57 | Users: http://roccat.sourceforge.net | 44 | Users: http://roccat.sourceforge.net |
58 | 45 | ||
59 | What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/koneplus/roccatkoneplus<minor>/profile_settings | 46 | What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/koneplus/roccatkoneplus<minor>/profile_settings |
@@ -68,19 +55,8 @@ Description: The mouse can store 5 profiles which can be switched by the | |||
68 | The mouse will reject invalid data. | 55 | The mouse will reject invalid data. |
69 | Which profile to write is determined by the profile number | 56 | Which profile to write is determined by the profile number |
70 | contained in the data. | 57 | contained in the data. |
71 | This file is writeonly. | 58 | Before reading this file, control has to be written to select |
72 | Users: http://roccat.sourceforge.net | 59 | which profile to read. |
73 | |||
74 | What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/koneplus/roccatkoneplus<minor>/profile[1-5]_settings | ||
75 | Date: August 2010 | ||
76 | Contact: Stefan Achatz <erazor_de@users.sourceforge.net> | ||
77 | Description: The mouse can store 5 profiles which can be switched by the | ||
78 | press of a button. A profile is split in settings and buttons. | ||
79 | profile_settings holds information like resolution, sensitivity | ||
80 | and light effects. | ||
81 | When read, these files return the respective profile settings. | ||
82 | The returned data is 43 bytes in size. | ||
83 | This file is readonly. | ||
84 | Users: http://roccat.sourceforge.net | 60 | Users: http://roccat.sourceforge.net |
85 | 61 | ||
86 | What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/koneplus/roccatkoneplus<minor>/sensor | 62 | What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/koneplus/roccatkoneplus<minor>/sensor |
@@ -104,9 +80,9 @@ What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid- | |||
104 | Date: October 2010 | 80 | Date: October 2010 |
105 | Contact: Stefan Achatz <erazor_de@users.sourceforge.net> | 81 | Contact: Stefan Achatz <erazor_de@users.sourceforge.net> |
106 | Description: When written a calibration process for the tracking control unit | 82 | Description: When written a calibration process for the tracking control unit |
107 | can be initiated/cancelled. | 83 | can be initiated/cancelled. Also lets one read/write sensor |
108 | The data has to be 3 bytes long. | 84 | registers. |
109 | This file is writeonly. | 85 | The data has to be 4 bytes long. |
110 | Users: http://roccat.sourceforge.net | 86 | Users: http://roccat.sourceforge.net |
111 | 87 | ||
112 | What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/koneplus/roccatkoneplus<minor>/tcu_image | 88 | What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/koneplus/roccatkoneplus<minor>/tcu_image |
diff --git a/Documentation/ABI/testing/sysfs-driver-hid-roccat-kovaplus b/Documentation/ABI/testing/sysfs-driver-hid-roccat-kovaplus index 20f937c9d84f..a10404f15a54 100644 --- a/Documentation/ABI/testing/sysfs-driver-hid-roccat-kovaplus +++ b/Documentation/ABI/testing/sysfs-driver-hid-roccat-kovaplus | |||
@@ -1,12 +1,3 @@ | |||
1 | What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/kovaplus/roccatkovaplus<minor>/actual_cpi | ||
2 | Date: January 2011 | ||
3 | Contact: Stefan Achatz <erazor_de@users.sourceforge.net> | ||
4 | Description: The integer value of this attribute ranges from 1-4. | ||
5 | When read, this attribute returns the number of the active | ||
6 | cpi level. | ||
7 | This file is readonly. | ||
8 | Users: http://roccat.sourceforge.net | ||
9 | |||
10 | What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/kovaplus/roccatkovaplus<minor>/actual_profile | 1 | What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/kovaplus/roccatkovaplus<minor>/actual_profile |
11 | Date: January 2011 | 2 | Date: January 2011 |
12 | Contact: Stefan Achatz <erazor_de@users.sourceforge.net> | 3 | Contact: Stefan Achatz <erazor_de@users.sourceforge.net> |
@@ -18,33 +9,12 @@ Description: The integer value of this attribute ranges from 0-4. | |||
18 | active when the mouse is powered on. | 9 | active when the mouse is powered on. |
19 | Users: http://roccat.sourceforge.net | 10 | Users: http://roccat.sourceforge.net |
20 | 11 | ||
21 | What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/kovaplus/roccatkovaplus<minor>/actual_sensitivity_x | 12 | What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/kovaplus/roccatkovaplus<minor>/info |
22 | Date: January 2011 | 13 | Date: November 2012 |
23 | Contact: Stefan Achatz <erazor_de@users.sourceforge.net> | 14 | Contact: Stefan Achatz <erazor_de@users.sourceforge.net> |
24 | Description: The integer value of this attribute ranges from 1-10. | 15 | Description: When read, this file returns general data like firmware version. |
25 | When read, this attribute returns the number of the actual | 16 | When written, the device can be reset. |
26 | sensitivity in x direction. | 17 | The data is 6 bytes long. |
27 | This file is readonly. | ||
28 | Users: http://roccat.sourceforge.net | ||
29 | |||
30 | What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/kovaplus/roccatkovaplus<minor>/actual_sensitivity_y | ||
31 | Date: January 2011 | ||
32 | Contact: Stefan Achatz <erazor_de@users.sourceforge.net> | ||
33 | Description: The integer value of this attribute ranges from 1-10. | ||
34 | When read, this attribute returns the number of the actual | ||
35 | sensitivity in y direction. | ||
36 | This file is readonly. | ||
37 | Users: http://roccat.sourceforge.net | ||
38 | |||
39 | What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/kovaplus/roccatkovaplus<minor>/firmware_version | ||
40 | Date: January 2011 | ||
41 | Contact: Stefan Achatz <erazor_de@users.sourceforge.net> | ||
42 | Description: When read, this file returns the raw integer version number of the | ||
43 | firmware reported by the mouse. Using the integer value eases | ||
44 | further usage in other programs. To receive the real version | ||
45 | number the decimal point has to be shifted 2 positions to the | ||
46 | left. E.g. a returned value of 121 means 1.21 | ||
47 | This file is readonly. | ||
48 | Users: http://roccat.sourceforge.net | 18 | Users: http://roccat.sourceforge.net |
49 | 19 | ||
50 | What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/kovaplus/roccatkovaplus<minor>/profile_buttons | 20 | What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/kovaplus/roccatkovaplus<minor>/profile_buttons |
@@ -58,18 +28,8 @@ Description: The mouse can store 5 profiles which can be switched by the | |||
58 | The mouse will reject invalid data. | 28 | The mouse will reject invalid data. |
59 | Which profile to write is determined by the profile number | 29 | Which profile to write is determined by the profile number |
60 | contained in the data. | 30 | contained in the data. |
61 | This file is writeonly. | 31 | Before reading this file, control has to be written to select |
62 | Users: http://roccat.sourceforge.net | 32 | which profile to read. |
63 | |||
64 | What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/kovaplus/roccatkovaplus<minor>/profile[1-5]_buttons | ||
65 | Date: January 2011 | ||
66 | Contact: Stefan Achatz <erazor_de@users.sourceforge.net> | ||
67 | Description: The mouse can store 5 profiles which can be switched by the | ||
68 | press of a button. A profile is split in settings and buttons. | ||
69 | profile_buttons holds information about button layout. | ||
70 | When read, these files return the respective profile buttons. | ||
71 | The returned data is 23 bytes in size. | ||
72 | This file is readonly. | ||
73 | Users: http://roccat.sourceforge.net | 33 | Users: http://roccat.sourceforge.net |
74 | 34 | ||
75 | What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/kovaplus/roccatkovaplus<minor>/profile_settings | 35 | What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/kovaplus/roccatkovaplus<minor>/profile_settings |
@@ -84,17 +44,6 @@ Description: The mouse can store 5 profiles which can be switched by the | |||
84 | The mouse will reject invalid data. | 44 | The mouse will reject invalid data. |
85 | Which profile to write is determined by the profile number | 45 | Which profile to write is determined by the profile number |
86 | contained in the data. | 46 | contained in the data. |
87 | This file is writeonly. | 47 | Before reading this file, control has to be written to select |
88 | Users: http://roccat.sourceforge.net | 48 | which profile to read. |
89 | |||
90 | What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/kovaplus/roccatkovaplus<minor>/profile[1-5]_settings | ||
91 | Date: January 2011 | ||
92 | Contact: Stefan Achatz <erazor_de@users.sourceforge.net> | ||
93 | Description: The mouse can store 5 profiles which can be switched by the | ||
94 | press of a button. A profile is split in settings and buttons. | ||
95 | profile_settings holds information like resolution, sensitivity | ||
96 | and light effects. | ||
97 | When read, these files return the respective profile settings. | ||
98 | The returned data is 16 bytes in size. | ||
99 | This file is readonly. | ||
100 | Users: http://roccat.sourceforge.net | 49 | Users: http://roccat.sourceforge.net |
diff --git a/Documentation/ABI/testing/sysfs-driver-hid-roccat-lua b/Documentation/ABI/testing/sysfs-driver-hid-roccat-lua new file mode 100644 index 000000000000..31c6c4c8ba2b --- /dev/null +++ b/Documentation/ABI/testing/sysfs-driver-hid-roccat-lua | |||
@@ -0,0 +1,7 @@ | |||
1 | What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/control | ||
2 | Date: October 2012 | ||
3 | Contact: Stefan Achatz <erazor_de@users.sourceforge.net> | ||
4 | Description: When written, cpi, button and light settings can be configured. | ||
5 | When read, actual cpi setting and sensor data are returned. | ||
6 | The data has to be 8 bytes long. | ||
7 | Users: http://roccat.sourceforge.net | ||
diff --git a/Documentation/ABI/testing/sysfs-driver-hid-roccat-pyra b/Documentation/ABI/testing/sysfs-driver-hid-roccat-pyra index 3f8de50e4ff1..9fa9de30d14b 100644 --- a/Documentation/ABI/testing/sysfs-driver-hid-roccat-pyra +++ b/Documentation/ABI/testing/sysfs-driver-hid-roccat-pyra | |||
@@ -1,37 +1,9 @@ | |||
1 | What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/pyra/roccatpyra<minor>/actual_cpi | 1 | What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/pyra/roccatpyra<minor>/info |
2 | Date: August 2010 | 2 | Date: November 2012 |
3 | Contact: Stefan Achatz <erazor_de@users.sourceforge.net> | ||
4 | Description: It is possible to switch the cpi setting of the mouse with the | ||
5 | press of a button. | ||
6 | When read, this file returns the raw number of the actual cpi | ||
7 | setting reported by the mouse. This number has to be further | ||
8 | processed to receive the real dpi value. | ||
9 | |||
10 | VALUE DPI | ||
11 | 1 400 | ||
12 | 2 800 | ||
13 | 4 1600 | ||
14 | |||
15 | This file is readonly. | ||
16 | Users: http://roccat.sourceforge.net | ||
17 | |||
18 | What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/pyra/roccatpyra<minor>/actual_profile | ||
19 | Date: August 2010 | ||
20 | Contact: Stefan Achatz <erazor_de@users.sourceforge.net> | 3 | Contact: Stefan Achatz <erazor_de@users.sourceforge.net> |
21 | Description: When read, this file returns the number of the actual profile in | 4 | Description: When read, this file returns general data like firmware version. |
22 | range 0-4. | 5 | When written, the device can be reset. |
23 | This file is readonly. | 6 | The data is 6 bytes long. |
24 | Users: http://roccat.sourceforge.net | ||
25 | |||
26 | What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/pyra/roccatpyra<minor>/firmware_version | ||
27 | Date: August 2010 | ||
28 | Contact: Stefan Achatz <erazor_de@users.sourceforge.net> | ||
29 | Description: When read, this file returns the raw integer version number of the | ||
30 | firmware reported by the mouse. Using the integer value eases | ||
31 | further usage in other programs. To receive the real version | ||
32 | number the decimal point has to be shifted 2 positions to the | ||
33 | left. E.g. a returned value of 138 means 1.38 | ||
34 | This file is readonly. | ||
35 | Users: http://roccat.sourceforge.net | 7 | Users: http://roccat.sourceforge.net |
36 | 8 | ||
37 | What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/pyra/roccatpyra<minor>/profile_settings | 9 | What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/pyra/roccatpyra<minor>/profile_settings |
@@ -46,19 +18,8 @@ Description: The mouse can store 5 profiles which can be switched by the | |||
46 | The mouse will reject invalid data. | 18 | The mouse will reject invalid data. |
47 | Which profile to write is determined by the profile number | 19 | Which profile to write is determined by the profile number |
48 | contained in the data. | 20 | contained in the data. |
49 | This file is writeonly. | 21 | Before reading this file, control has to be written to select |
50 | Users: http://roccat.sourceforge.net | 22 | which profile to read. |
51 | |||
52 | What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/pyra/roccatpyra<minor>/profile[1-5]_settings | ||
53 | Date: August 2010 | ||
54 | Contact: Stefan Achatz <erazor_de@users.sourceforge.net> | ||
55 | Description: The mouse can store 5 profiles which can be switched by the | ||
56 | press of a button. A profile is split in settings and buttons. | ||
57 | profile_settings holds information like resolution, sensitivity | ||
58 | and light effects. | ||
59 | When read, these files return the respective profile settings. | ||
60 | The returned data is 13 bytes in size. | ||
61 | This file is readonly. | ||
62 | Users: http://roccat.sourceforge.net | 23 | Users: http://roccat.sourceforge.net |
63 | 24 | ||
64 | What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/pyra/roccatpyra<minor>/profile_buttons | 25 | What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/pyra/roccatpyra<minor>/profile_buttons |
@@ -72,27 +33,8 @@ Description: The mouse can store 5 profiles which can be switched by the | |||
72 | The mouse will reject invalid data. | 33 | The mouse will reject invalid data. |
73 | Which profile to write is determined by the profile number | 34 | Which profile to write is determined by the profile number |
74 | contained in the data. | 35 | contained in the data. |
75 | This file is writeonly. | 36 | Before reading this file, control has to be written to select |
76 | Users: http://roccat.sourceforge.net | 37 | which profile to read. |
77 | |||
78 | What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/pyra/roccatpyra<minor>/profile[1-5]_buttons | ||
79 | Date: August 2010 | ||
80 | Contact: Stefan Achatz <erazor_de@users.sourceforge.net> | ||
81 | Description: The mouse can store 5 profiles which can be switched by the | ||
82 | press of a button. A profile is split in settings and buttons. | ||
83 | profile_buttons holds information about button layout. | ||
84 | When read, these files return the respective profile buttons. | ||
85 | The returned data is 19 bytes in size. | ||
86 | This file is readonly. | ||
87 | Users: http://roccat.sourceforge.net | ||
88 | |||
89 | What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/pyra/roccatpyra<minor>/startup_profile | ||
90 | Date: August 2010 | ||
91 | Contact: Stefan Achatz <erazor_de@users.sourceforge.net> | ||
92 | Description: The integer value of this attribute ranges from 0-4. | ||
93 | When read, this attribute returns the number of the profile | ||
94 | that's active when the mouse is powered on. | ||
95 | This file is readonly. | ||
96 | Users: http://roccat.sourceforge.net | 38 | Users: http://roccat.sourceforge.net |
97 | 39 | ||
98 | What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/pyra/roccatpyra<minor>/settings | 40 | What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/pyra/roccatpyra<minor>/settings |
diff --git a/Documentation/ABI/testing/sysfs-driver-hid-roccat-savu b/Documentation/ABI/testing/sysfs-driver-hid-roccat-savu index b42922cf6b1f..f1e02a98bd9d 100644 --- a/Documentation/ABI/testing/sysfs-driver-hid-roccat-savu +++ b/Documentation/ABI/testing/sysfs-driver-hid-roccat-savu | |||
@@ -40,8 +40,8 @@ What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid- | |||
40 | Date: Mai 2012 | 40 | Date: Mai 2012 |
41 | Contact: Stefan Achatz <erazor_de@users.sourceforge.net> | 41 | Contact: Stefan Achatz <erazor_de@users.sourceforge.net> |
42 | Description: When read, this file returns general data like firmware version. | 42 | Description: When read, this file returns general data like firmware version. |
43 | When written, the device can be reset. | ||
43 | The data is 8 bytes long. | 44 | The data is 8 bytes long. |
44 | This file is readonly. | ||
45 | Users: http://roccat.sourceforge.net | 45 | Users: http://roccat.sourceforge.net |
46 | 46 | ||
47 | What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/savu/roccatsavu<minor>/macro | 47 | What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/savu/roccatsavu<minor>/macro |
@@ -74,4 +74,3 @@ Description: The mouse has a Avago ADNS-3090 sensor. | |||
74 | This file allows reading and writing of the mouse sensors registers. | 74 | This file allows reading and writing of the mouse sensors registers. |
75 | The data has to be 4 bytes long. | 75 | The data has to be 4 bytes long. |
76 | Users: http://roccat.sourceforge.net | 76 | Users: http://roccat.sourceforge.net |
77 | |||
diff --git a/Documentation/ABI/testing/sysfs-driver-ppi b/Documentation/ABI/testing/sysfs-driver-ppi index 97a003ee058b..7d1435bc976c 100644 --- a/Documentation/ABI/testing/sysfs-driver-ppi +++ b/Documentation/ABI/testing/sysfs-driver-ppi | |||
@@ -5,7 +5,7 @@ Contact: xiaoyan.zhang@intel.com | |||
5 | Description: | 5 | Description: |
6 | This folder includes the attributes related with PPI (Physical | 6 | This folder includes the attributes related with PPI (Physical |
7 | Presence Interface). Only if TPM is supported by BIOS, this | 7 | Presence Interface). Only if TPM is supported by BIOS, this |
8 | folder makes sence. The folder path can be got by command | 8 | folder makes sense. The folder path can be got by command |
9 | 'find /sys/ -name 'pcrs''. For the detail information of PPI, | 9 | 'find /sys/ -name 'pcrs''. For the detail information of PPI, |
10 | please refer to the PPI specification from | 10 | please refer to the PPI specification from |
11 | http://www.trustedcomputinggroup.org/ | 11 | http://www.trustedcomputinggroup.org/ |
diff --git a/Documentation/ABI/testing/sysfs-profiling b/Documentation/ABI/testing/sysfs-profiling index b02d8b8c173a..8a8e466eb2c0 100644 --- a/Documentation/ABI/testing/sysfs-profiling +++ b/Documentation/ABI/testing/sysfs-profiling | |||
@@ -1,13 +1,13 @@ | |||
1 | What: /sys/kernel/profile | 1 | What: /sys/kernel/profiling |
2 | Date: September 2008 | 2 | Date: September 2008 |
3 | Contact: Dave Hansen <dave@linux.vnet.ibm.com> | 3 | Contact: Dave Hansen <dave@linux.vnet.ibm.com> |
4 | Description: | 4 | Description: |
5 | /sys/kernel/profile is the runtime equivalent | 5 | /sys/kernel/profiling is the runtime equivalent |
6 | of the boot-time profile= option. | 6 | of the boot-time profile= option. |
7 | 7 | ||
8 | You can get the same effect running: | 8 | You can get the same effect running: |
9 | 9 | ||
10 | echo 2 > /sys/kernel/profile | 10 | echo 2 > /sys/kernel/profiling |
11 | 11 | ||
12 | as you would by issuing profile=2 on the boot | 12 | as you would by issuing profile=2 on the boot |
13 | command line. | 13 | command line. |
diff --git a/Documentation/ABI/testing/sysfs-tty b/Documentation/ABI/testing/sysfs-tty index 0c430150d929..ad22fb0ee765 100644 --- a/Documentation/ABI/testing/sysfs-tty +++ b/Documentation/ABI/testing/sysfs-tty | |||
@@ -26,3 +26,115 @@ Description: | |||
26 | UART port in serial_core, that is bound to TTY like ttyS0. | 26 | UART port in serial_core, that is bound to TTY like ttyS0. |
27 | uartclk = 16 * baud_base | 27 | uartclk = 16 * baud_base |
28 | 28 | ||
29 | These sysfs values expose the TIOCGSERIAL interface via | ||
30 | sysfs rather than via ioctls. | ||
31 | |||
32 | What: /sys/class/tty/ttyS0/type | ||
33 | Date: October 2012 | ||
34 | Contact: Alan Cox <alan@linux.intel.com> | ||
35 | Description: | ||
36 | Shows the current tty type for this port. | ||
37 | |||
38 | These sysfs values expose the TIOCGSERIAL interface via | ||
39 | sysfs rather than via ioctls. | ||
40 | |||
41 | What: /sys/class/tty/ttyS0/line | ||
42 | Date: October 2012 | ||
43 | Contact: Alan Cox <alan@linux.intel.com> | ||
44 | Description: | ||
45 | Shows the current tty line number for this port. | ||
46 | |||
47 | These sysfs values expose the TIOCGSERIAL interface via | ||
48 | sysfs rather than via ioctls. | ||
49 | |||
50 | What: /sys/class/tty/ttyS0/port | ||
51 | Date: October 2012 | ||
52 | Contact: Alan Cox <alan@linux.intel.com> | ||
53 | Description: | ||
54 | Shows the current tty port I/O address for this port. | ||
55 | |||
56 | These sysfs values expose the TIOCGSERIAL interface via | ||
57 | sysfs rather than via ioctls. | ||
58 | |||
59 | What: /sys/class/tty/ttyS0/irq | ||
60 | Date: October 2012 | ||
61 | Contact: Alan Cox <alan@linux.intel.com> | ||
62 | Description: | ||
63 | Shows the current primary interrupt for this port. | ||
64 | |||
65 | These sysfs values expose the TIOCGSERIAL interface via | ||
66 | sysfs rather than via ioctls. | ||
67 | |||
68 | What: /sys/class/tty/ttyS0/flags | ||
69 | Date: October 2012 | ||
70 | Contact: Alan Cox <alan@linux.intel.com> | ||
71 | Description: | ||
72 | Show the tty port status flags for this port. | ||
73 | |||
74 | These sysfs values expose the TIOCGSERIAL interface via | ||
75 | sysfs rather than via ioctls. | ||
76 | |||
77 | What: /sys/class/tty/ttyS0/xmit_fifo_size | ||
78 | Date: October 2012 | ||
79 | Contact: Alan Cox <alan@linux.intel.com> | ||
80 | Description: | ||
81 | Show the transmit FIFO size for this port. | ||
82 | |||
83 | These sysfs values expose the TIOCGSERIAL interface via | ||
84 | sysfs rather than via ioctls. | ||
85 | |||
86 | What: /sys/class/tty/ttyS0/close_delay | ||
87 | Date: October 2012 | ||
88 | Contact: Alan Cox <alan@linux.intel.com> | ||
89 | Description: | ||
90 | Show the closing delay time for this port in ms. | ||
91 | |||
92 | These sysfs values expose the TIOCGSERIAL interface via | ||
93 | sysfs rather than via ioctls. | ||
94 | |||
95 | What: /sys/class/tty/ttyS0/closing_wait | ||
96 | Date: October 2012 | ||
97 | Contact: Alan Cox <alan@linux.intel.com> | ||
98 | Description: | ||
99 | Show the close wait time for this port in ms. | ||
100 | |||
101 | These sysfs values expose the TIOCGSERIAL interface via | ||
102 | sysfs rather than via ioctls. | ||
103 | |||
104 | What: /sys/class/tty/ttyS0/custom_divisor | ||
105 | Date: October 2012 | ||
106 | Contact: Alan Cox <alan@linux.intel.com> | ||
107 | Description: | ||
108 | Show the custom divisor if any that is set on this port. | ||
109 | |||
110 | These sysfs values expose the TIOCGSERIAL interface via | ||
111 | sysfs rather than via ioctls. | ||
112 | |||
113 | What: /sys/class/tty/ttyS0/io_type | ||
114 | Date: October 2012 | ||
115 | Contact: Alan Cox <alan@linux.intel.com> | ||
116 | Description: | ||
117 | Show the I/O type that is to be used with the iomem base | ||
118 | address. | ||
119 | |||
120 | These sysfs values expose the TIOCGSERIAL interface via | ||
121 | sysfs rather than via ioctls. | ||
122 | |||
123 | What: /sys/class/tty/ttyS0/iomem_base | ||
124 | Date: October 2012 | ||
125 | Contact: Alan Cox <alan@linux.intel.com> | ||
126 | Description: | ||
127 | The I/O memory base for this port. | ||
128 | |||
129 | These sysfs values expose the TIOCGSERIAL interface via | ||
130 | sysfs rather than via ioctls. | ||
131 | |||
132 | What: /sys/class/tty/ttyS0/iomem_reg_shift | ||
133 | Date: October 2012 | ||
134 | Contact: Alan Cox <alan@linux.intel.com> | ||
135 | Description: | ||
136 | Show the register shift indicating the spacing to be used | ||
137 | for accesses on this iomem address. | ||
138 | |||
139 | These sysfs values expose the TIOCGSERIAL interface via | ||
140 | sysfs rather than via ioctls. | ||
diff --git a/Documentation/DMA-API-HOWTO.txt b/Documentation/DMA-API-HOWTO.txt index a0b6250add79..4a4fb295ceef 100644 --- a/Documentation/DMA-API-HOWTO.txt +++ b/Documentation/DMA-API-HOWTO.txt | |||
@@ -468,11 +468,46 @@ To map a single region, you do: | |||
468 | size_t size = buffer->len; | 468 | size_t size = buffer->len; |
469 | 469 | ||
470 | dma_handle = dma_map_single(dev, addr, size, direction); | 470 | dma_handle = dma_map_single(dev, addr, size, direction); |
471 | if (dma_mapping_error(dma_handle)) { | ||
472 | /* | ||
473 | * reduce current DMA mapping usage, | ||
474 | * delay and try again later or | ||
475 | * reset driver. | ||
476 | */ | ||
477 | goto map_error_handling; | ||
478 | } | ||
471 | 479 | ||
472 | and to unmap it: | 480 | and to unmap it: |
473 | 481 | ||
474 | dma_unmap_single(dev, dma_handle, size, direction); | 482 | dma_unmap_single(dev, dma_handle, size, direction); |
475 | 483 | ||
484 | You should call dma_mapping_error() as dma_map_single() could fail and return | ||
485 | error. Not all dma implementations support dma_mapping_error() interface. | ||
486 | However, it is a good practice to call dma_mapping_error() interface, which | ||
487 | will invoke the generic mapping error check interface. Doing so will ensure | ||
488 | that the mapping code will work correctly on all dma implementations without | ||
489 | any dependency on the specifics of the underlying implementation. Using the | ||
490 | returned address without checking for errors could result in failures ranging | ||
491 | from panics to silent data corruption. Couple of example of incorrect ways to | ||
492 | check for errors that make assumptions about the underlying dma implementation | ||
493 | are as follows and these are applicable to dma_map_page() as well. | ||
494 | |||
495 | Incorrect example 1: | ||
496 | dma_addr_t dma_handle; | ||
497 | |||
498 | dma_handle = dma_map_single(dev, addr, size, direction); | ||
499 | if ((dma_handle & 0xffff != 0) || (dma_handle >= 0x1000000)) { | ||
500 | goto map_error; | ||
501 | } | ||
502 | |||
503 | Incorrect example 2: | ||
504 | dma_addr_t dma_handle; | ||
505 | |||
506 | dma_handle = dma_map_single(dev, addr, size, direction); | ||
507 | if (dma_handle == DMA_ERROR_CODE) { | ||
508 | goto map_error; | ||
509 | } | ||
510 | |||
476 | You should call dma_unmap_single when the DMA activity is finished, e.g. | 511 | You should call dma_unmap_single when the DMA activity is finished, e.g. |
477 | from the interrupt which told you that the DMA transfer is done. | 512 | from the interrupt which told you that the DMA transfer is done. |
478 | 513 | ||
@@ -489,6 +524,14 @@ Specifically: | |||
489 | size_t size = buffer->len; | 524 | size_t size = buffer->len; |
490 | 525 | ||
491 | dma_handle = dma_map_page(dev, page, offset, size, direction); | 526 | dma_handle = dma_map_page(dev, page, offset, size, direction); |
527 | if (dma_mapping_error(dma_handle)) { | ||
528 | /* | ||
529 | * reduce current DMA mapping usage, | ||
530 | * delay and try again later or | ||
531 | * reset driver. | ||
532 | */ | ||
533 | goto map_error_handling; | ||
534 | } | ||
492 | 535 | ||
493 | ... | 536 | ... |
494 | 537 | ||
@@ -496,6 +539,12 @@ Specifically: | |||
496 | 539 | ||
497 | Here, "offset" means byte offset within the given page. | 540 | Here, "offset" means byte offset within the given page. |
498 | 541 | ||
542 | You should call dma_mapping_error() as dma_map_page() could fail and return | ||
543 | error as outlined under the dma_map_single() discussion. | ||
544 | |||
545 | You should call dma_unmap_page when the DMA activity is finished, e.g. | ||
546 | from the interrupt which told you that the DMA transfer is done. | ||
547 | |||
499 | With scatterlists, you map a region gathered from several regions by: | 548 | With scatterlists, you map a region gathered from several regions by: |
500 | 549 | ||
501 | int i, count = dma_map_sg(dev, sglist, nents, direction); | 550 | int i, count = dma_map_sg(dev, sglist, nents, direction); |
@@ -578,6 +627,14 @@ to use the dma_sync_*() interfaces. | |||
578 | dma_addr_t mapping; | 627 | dma_addr_t mapping; |
579 | 628 | ||
580 | mapping = dma_map_single(cp->dev, buffer, len, DMA_FROM_DEVICE); | 629 | mapping = dma_map_single(cp->dev, buffer, len, DMA_FROM_DEVICE); |
630 | if (dma_mapping_error(dma_handle)) { | ||
631 | /* | ||
632 | * reduce current DMA mapping usage, | ||
633 | * delay and try again later or | ||
634 | * reset driver. | ||
635 | */ | ||
636 | goto map_error_handling; | ||
637 | } | ||
581 | 638 | ||
582 | cp->rx_buf = buffer; | 639 | cp->rx_buf = buffer; |
583 | cp->rx_len = len; | 640 | cp->rx_len = len; |
@@ -658,6 +715,75 @@ failure can be determined by: | |||
658 | * delay and try again later or | 715 | * delay and try again later or |
659 | * reset driver. | 716 | * reset driver. |
660 | */ | 717 | */ |
718 | goto map_error_handling; | ||
719 | } | ||
720 | |||
721 | - unmap pages that are already mapped, when mapping error occurs in the middle | ||
722 | of a multiple page mapping attempt. These example are applicable to | ||
723 | dma_map_page() as well. | ||
724 | |||
725 | Example 1: | ||
726 | dma_addr_t dma_handle1; | ||
727 | dma_addr_t dma_handle2; | ||
728 | |||
729 | dma_handle1 = dma_map_single(dev, addr, size, direction); | ||
730 | if (dma_mapping_error(dev, dma_handle1)) { | ||
731 | /* | ||
732 | * reduce current DMA mapping usage, | ||
733 | * delay and try again later or | ||
734 | * reset driver. | ||
735 | */ | ||
736 | goto map_error_handling1; | ||
737 | } | ||
738 | dma_handle2 = dma_map_single(dev, addr, size, direction); | ||
739 | if (dma_mapping_error(dev, dma_handle2)) { | ||
740 | /* | ||
741 | * reduce current DMA mapping usage, | ||
742 | * delay and try again later or | ||
743 | * reset driver. | ||
744 | */ | ||
745 | goto map_error_handling2; | ||
746 | } | ||
747 | |||
748 | ... | ||
749 | |||
750 | map_error_handling2: | ||
751 | dma_unmap_single(dma_handle1); | ||
752 | map_error_handling1: | ||
753 | |||
754 | Example 2: (if buffers are allocated a loop, unmap all mapped buffers when | ||
755 | mapping error is detected in the middle) | ||
756 | |||
757 | dma_addr_t dma_addr; | ||
758 | dma_addr_t array[DMA_BUFFERS]; | ||
759 | int save_index = 0; | ||
760 | |||
761 | for (i = 0; i < DMA_BUFFERS; i++) { | ||
762 | |||
763 | ... | ||
764 | |||
765 | dma_addr = dma_map_single(dev, addr, size, direction); | ||
766 | if (dma_mapping_error(dev, dma_addr)) { | ||
767 | /* | ||
768 | * reduce current DMA mapping usage, | ||
769 | * delay and try again later or | ||
770 | * reset driver. | ||
771 | */ | ||
772 | goto map_error_handling; | ||
773 | } | ||
774 | array[i].dma_addr = dma_addr; | ||
775 | save_index++; | ||
776 | } | ||
777 | |||
778 | ... | ||
779 | |||
780 | map_error_handling: | ||
781 | |||
782 | for (i = 0; i < save_index; i++) { | ||
783 | |||
784 | ... | ||
785 | |||
786 | dma_unmap_single(array[i].dma_addr); | ||
661 | } | 787 | } |
662 | 788 | ||
663 | Networking drivers must call dev_kfree_skb to free the socket buffer | 789 | Networking drivers must call dev_kfree_skb to free the socket buffer |
diff --git a/Documentation/DMA-API.txt b/Documentation/DMA-API.txt index 66bd97a95f10..78a6c569d204 100644 --- a/Documentation/DMA-API.txt +++ b/Documentation/DMA-API.txt | |||
@@ -678,3 +678,15 @@ out of dma_debug_entries. These entries are preallocated at boot. The number | |||
678 | of preallocated entries is defined per architecture. If it is too low for you | 678 | of preallocated entries is defined per architecture. If it is too low for you |
679 | boot with 'dma_debug_entries=<your_desired_number>' to overwrite the | 679 | boot with 'dma_debug_entries=<your_desired_number>' to overwrite the |
680 | architectural default. | 680 | architectural default. |
681 | |||
682 | void debug_dmap_mapping_error(struct device *dev, dma_addr_t dma_addr); | ||
683 | |||
684 | dma-debug interface debug_dma_mapping_error() to debug drivers that fail | ||
685 | to check dma mapping errors on addresses returned by dma_map_single() and | ||
686 | dma_map_page() interfaces. This interface clears a flag set by | ||
687 | debug_dma_map_page() to indicate that dma_mapping_error() has been called by | ||
688 | the driver. When driver does unmap, debug_dma_unmap() checks the flag and if | ||
689 | this flag is still set, prints warning message that includes call trace that | ||
690 | leads up to the unmap. This interface can be called from dma_mapping_error() | ||
691 | routines to enable dma mapping error check debugging. | ||
692 | |||
diff --git a/Documentation/DMA-attributes.txt b/Documentation/DMA-attributes.txt index f50309081ac7..e59480db9ee0 100644 --- a/Documentation/DMA-attributes.txt +++ b/Documentation/DMA-attributes.txt | |||
@@ -91,3 +91,12 @@ transferred to 'device' domain. This attribute can be also used for | |||
91 | dma_unmap_{single,page,sg} functions family to force buffer to stay in | 91 | dma_unmap_{single,page,sg} functions family to force buffer to stay in |
92 | device domain after releasing a mapping for it. Use this attribute with | 92 | device domain after releasing a mapping for it. Use this attribute with |
93 | care! | 93 | care! |
94 | |||
95 | DMA_ATTR_FORCE_CONTIGUOUS | ||
96 | ------------------------- | ||
97 | |||
98 | By default DMA-mapping subsystem is allowed to assemble the buffer | ||
99 | allocated by dma_alloc_attrs() function from individual pages if it can | ||
100 | be mapped as contiguous chunk into device dma address space. By | ||
101 | specifing this attribute the allocated buffer is forced to be contiguous | ||
102 | also in physical memory. | ||
diff --git a/Documentation/DocBook/drm.tmpl b/Documentation/DocBook/drm.tmpl index b0300529ab13..4ee2304f82f9 100644 --- a/Documentation/DocBook/drm.tmpl +++ b/Documentation/DocBook/drm.tmpl | |||
@@ -1141,23 +1141,13 @@ int max_width, max_height;</synopsis> | |||
1141 | the <methodname>page_flip</methodname> operation will be called with a | 1141 | the <methodname>page_flip</methodname> operation will be called with a |
1142 | non-NULL <parameter>event</parameter> argument pointing to a | 1142 | non-NULL <parameter>event</parameter> argument pointing to a |
1143 | <structname>drm_pending_vblank_event</structname> instance. Upon page | 1143 | <structname>drm_pending_vblank_event</structname> instance. Upon page |
1144 | flip completion the driver must fill the | 1144 | flip completion the driver must call <methodname>drm_send_vblank_event</methodname> |
1145 | <parameter>event</parameter>::<structfield>event</structfield> | 1145 | to fill in the event and send to wake up any waiting processes. |
1146 | <structfield>sequence</structfield>, <structfield>tv_sec</structfield> | 1146 | This can be performed with |
1147 | and <structfield>tv_usec</structfield> fields with the associated | ||
1148 | vertical blanking count and timestamp, add the event to the | ||
1149 | <parameter>drm_file</parameter> list of events to be signaled, and wake | ||
1150 | up any waiting process. This can be performed with | ||
1151 | <programlisting><![CDATA[ | 1147 | <programlisting><![CDATA[ |
1152 | struct timeval now; | ||
1153 | |||
1154 | event->event.sequence = drm_vblank_count_and_time(..., &now); | ||
1155 | event->event.tv_sec = now.tv_sec; | ||
1156 | event->event.tv_usec = now.tv_usec; | ||
1157 | |||
1158 | spin_lock_irqsave(&dev->event_lock, flags); | 1148 | spin_lock_irqsave(&dev->event_lock, flags); |
1159 | list_add_tail(&event->base.link, &event->base.file_priv->event_list); | 1149 | ... |
1160 | wake_up_interruptible(&event->base.file_priv->event_wait); | 1150 | drm_send_vblank_event(dev, pipe, event); |
1161 | spin_unlock_irqrestore(&dev->event_lock, flags); | 1151 | spin_unlock_irqrestore(&dev->event_lock, flags); |
1162 | ]]></programlisting> | 1152 | ]]></programlisting> |
1163 | </para> | 1153 | </para> |
@@ -1621,10 +1611,10 @@ void intel_crt_init(struct drm_device *dev) | |||
1621 | </sect2> | 1611 | </sect2> |
1622 | </sect1> | 1612 | </sect1> |
1623 | 1613 | ||
1624 | <!-- Internals: mid-layer helper functions --> | 1614 | <!-- Internals: kms helper functions --> |
1625 | 1615 | ||
1626 | <sect1> | 1616 | <sect1> |
1627 | <title>Mid-layer Helper Functions</title> | 1617 | <title>Mode Setting Helper Functions</title> |
1628 | <para> | 1618 | <para> |
1629 | The CRTC, encoder and connector functions provided by the drivers | 1619 | The CRTC, encoder and connector functions provided by the drivers |
1630 | implement the DRM API. They're called by the DRM core and ioctl handlers | 1620 | implement the DRM API. They're called by the DRM core and ioctl handlers |
@@ -2106,6 +2096,21 @@ void intel_crt_init(struct drm_device *dev) | |||
2106 | </listitem> | 2096 | </listitem> |
2107 | </itemizedlist> | 2097 | </itemizedlist> |
2108 | </sect2> | 2098 | </sect2> |
2099 | <sect2> | ||
2100 | <title>Modeset Helper Functions Reference</title> | ||
2101 | !Edrivers/gpu/drm/drm_crtc_helper.c | ||
2102 | </sect2> | ||
2103 | <sect2> | ||
2104 | <title>fbdev Helper Functions Reference</title> | ||
2105 | !Pdrivers/gpu/drm/drm_fb_helper.c fbdev helpers | ||
2106 | !Edrivers/gpu/drm/drm_fb_helper.c | ||
2107 | </sect2> | ||
2108 | <sect2> | ||
2109 | <title>Display Port Helper Functions Reference</title> | ||
2110 | !Pdrivers/gpu/drm/drm_dp_helper.c dp helpers | ||
2111 | !Iinclude/drm/drm_dp_helper.h | ||
2112 | !Edrivers/gpu/drm/drm_dp_helper.c | ||
2113 | </sect2> | ||
2109 | </sect1> | 2114 | </sect1> |
2110 | 2115 | ||
2111 | <!-- Internals: vertical blanking --> | 2116 | <!-- Internals: vertical blanking --> |
diff --git a/Documentation/DocBook/gadget.tmpl b/Documentation/DocBook/gadget.tmpl index 6ef2f0073e5a..4017f147ba2f 100644 --- a/Documentation/DocBook/gadget.tmpl +++ b/Documentation/DocBook/gadget.tmpl | |||
@@ -671,7 +671,7 @@ than a kernel driver. | |||
671 | <para>There's a USB Mass Storage class driver, which provides | 671 | <para>There's a USB Mass Storage class driver, which provides |
672 | a different solution for interoperability with systems such | 672 | a different solution for interoperability with systems such |
673 | as MS-Windows and MacOS. | 673 | as MS-Windows and MacOS. |
674 | That <emphasis>File-backed Storage</emphasis> driver uses a | 674 | That <emphasis>Mass Storage</emphasis> driver uses a |
675 | file or block device as backing store for a drive, | 675 | file or block device as backing store for a drive, |
676 | like the <filename>loop</filename> driver. | 676 | like the <filename>loop</filename> driver. |
677 | The USB host uses the BBB, CB, or CBI versions of the mass | 677 | The USB host uses the BBB, CB, or CBI versions of the mass |
diff --git a/Documentation/DocBook/kernel-api.tmpl b/Documentation/DocBook/kernel-api.tmpl index 00687ee9d363..f75ab4c1b281 100644 --- a/Documentation/DocBook/kernel-api.tmpl +++ b/Documentation/DocBook/kernel-api.tmpl | |||
@@ -58,6 +58,9 @@ | |||
58 | 58 | ||
59 | <sect1><title>String Conversions</title> | 59 | <sect1><title>String Conversions</title> |
60 | !Elib/vsprintf.c | 60 | !Elib/vsprintf.c |
61 | !Finclude/linux/kernel.h kstrtol | ||
62 | !Finclude/linux/kernel.h kstrtoul | ||
63 | !Elib/kstrtox.c | ||
61 | </sect1> | 64 | </sect1> |
62 | <sect1><title>String Manipulation</title> | 65 | <sect1><title>String Manipulation</title> |
63 | <!-- All functions are exported at now | 66 | <!-- All functions are exported at now |
diff --git a/Documentation/DocBook/media/Makefile b/Documentation/DocBook/media/Makefile index 9b7e4c557928..f9fd615427fb 100644 --- a/Documentation/DocBook/media/Makefile +++ b/Documentation/DocBook/media/Makefile | |||
@@ -56,15 +56,15 @@ FUNCS = \ | |||
56 | write \ | 56 | write \ |
57 | 57 | ||
58 | IOCTLS = \ | 58 | IOCTLS = \ |
59 | $(shell perl -ne 'print "$$1 " if /\#define\s+([^\s]+)\s+_IO/' $(srctree)/include/linux/videodev2.h) \ | 59 | $(shell perl -ne 'print "$$1 " if /\#define\s+([^\s]+)\s+_IO/' $(srctree)/include/uapi/linux/videodev2.h) \ |
60 | $(shell perl -ne 'print "$$1 " if /\#define\s+([^\s]+)\s+_IO/' $(srctree)/include/linux/dvb/audio.h) \ | 60 | $(shell perl -ne 'print "$$1 " if /\#define\s+([^\s]+)\s+_IO/' $(srctree)/include/uapi/linux/dvb/audio.h) \ |
61 | $(shell perl -ne 'print "$$1 " if /\#define\s+([^\s]+)\s+_IO/' $(srctree)/include/linux/dvb/ca.h) \ | 61 | $(shell perl -ne 'print "$$1 " if /\#define\s+([^\s]+)\s+_IO/' $(srctree)/include/uapi/linux/dvb/ca.h) \ |
62 | $(shell perl -ne 'print "$$1 " if /\#define\s+([^\s]+)\s+_IO/' $(srctree)/include/linux/dvb/dmx.h) \ | 62 | $(shell perl -ne 'print "$$1 " if /\#define\s+([^\s]+)\s+_IO/' $(srctree)/include/uapi/linux/dvb/dmx.h) \ |
63 | $(shell perl -ne 'print "$$1 " if /\#define\s+([^\s]+)\s+_IO/' $(srctree)/include/linux/dvb/frontend.h) \ | 63 | $(shell perl -ne 'print "$$1 " if /\#define\s+([^\s]+)\s+_IO/' $(srctree)/include/uapi/linux/dvb/frontend.h) \ |
64 | $(shell perl -ne 'print "$$1 " if /\#define\s+([A-Z][^\s]+)\s+_IO/' $(srctree)/include/linux/dvb/net.h) \ | 64 | $(shell perl -ne 'print "$$1 " if /\#define\s+([A-Z][^\s]+)\s+_IO/' $(srctree)/include/uapi/linux/dvb/net.h) \ |
65 | $(shell perl -ne 'print "$$1 " if /\#define\s+([^\s]+)\s+_IO/' $(srctree)/include/linux/dvb/video.h) \ | 65 | $(shell perl -ne 'print "$$1 " if /\#define\s+([^\s]+)\s+_IO/' $(srctree)/include/uapi/linux/dvb/video.h) \ |
66 | $(shell perl -ne 'print "$$1 " if /\#define\s+([^\s]+)\s+_IO/' $(srctree)/include/linux/media.h) \ | 66 | $(shell perl -ne 'print "$$1 " if /\#define\s+([^\s]+)\s+_IO/' $(srctree)/include/uapi/linux/media.h) \ |
67 | $(shell perl -ne 'print "$$1 " if /\#define\s+([^\s]+)\s+_IO/' $(srctree)/include/linux/v4l2-subdev.h) \ | 67 | $(shell perl -ne 'print "$$1 " if /\#define\s+([^\s]+)\s+_IO/' $(srctree)/include/uapi/linux/v4l2-subdev.h) \ |
68 | VIDIOC_SUBDEV_G_FRAME_INTERVAL \ | 68 | VIDIOC_SUBDEV_G_FRAME_INTERVAL \ |
69 | VIDIOC_SUBDEV_S_FRAME_INTERVAL \ | 69 | VIDIOC_SUBDEV_S_FRAME_INTERVAL \ |
70 | VIDIOC_SUBDEV_ENUM_MBUS_CODE \ | 70 | VIDIOC_SUBDEV_ENUM_MBUS_CODE \ |
@@ -74,32 +74,32 @@ IOCTLS = \ | |||
74 | VIDIOC_SUBDEV_S_SELECTION \ | 74 | VIDIOC_SUBDEV_S_SELECTION \ |
75 | 75 | ||
76 | TYPES = \ | 76 | TYPES = \ |
77 | $(shell perl -ne 'print "$$1 " if /^typedef\s+[^\s]+\s+([^\s]+)\;/' $(srctree)/include/linux/videodev2.h) \ | 77 | $(shell perl -ne 'print "$$1 " if /^typedef\s+[^\s]+\s+([^\s]+)\;/' $(srctree)/include/uapi/linux/videodev2.h) \ |
78 | $(shell perl -ne 'print "$$1 " if /^}\s+([a-z0-9_]+_t)/' $(srctree)/include/linux/dvb/frontend.h) | 78 | $(shell perl -ne 'print "$$1 " if /^}\s+([a-z0-9_]+_t)/' $(srctree)/include/uapi/linux/dvb/frontend.h) |
79 | 79 | ||
80 | ENUMS = \ | 80 | ENUMS = \ |
81 | $(shell perl -ne 'print "$$1 " if /^enum\s+([^\s]+)\s+/' $(srctree)/include/linux/videodev2.h) \ | 81 | $(shell perl -ne 'print "$$1 " if /^enum\s+([^\s]+)\s+/' $(srctree)/include/uapi/linux/videodev2.h) \ |
82 | $(shell perl -ne 'print "$$1 " if /^enum\s+([^\s]+)\s+/' $(srctree)/include/linux/dvb/audio.h) \ | 82 | $(shell perl -ne 'print "$$1 " if /^enum\s+([^\s]+)\s+/' $(srctree)/include/uapi/linux/dvb/audio.h) \ |
83 | $(shell perl -ne 'print "$$1 " if /^enum\s+([^\s]+)\s+/' $(srctree)/include/linux/dvb/ca.h) \ | 83 | $(shell perl -ne 'print "$$1 " if /^enum\s+([^\s]+)\s+/' $(srctree)/include/uapi/linux/dvb/ca.h) \ |
84 | $(shell perl -ne 'print "$$1 " if /^enum\s+([^\s]+)\s+/' $(srctree)/include/linux/dvb/dmx.h) \ | 84 | $(shell perl -ne 'print "$$1 " if /^enum\s+([^\s]+)\s+/' $(srctree)/include/uapi/linux/dvb/dmx.h) \ |
85 | $(shell perl -ne 'print "$$1 " if /^enum\s+([^\s]+)\s+/' $(srctree)/include/linux/dvb/frontend.h) \ | 85 | $(shell perl -ne 'print "$$1 " if /^enum\s+([^\s]+)\s+/' $(srctree)/include/uapi/linux/dvb/frontend.h) \ |
86 | $(shell perl -ne 'print "$$1 " if /^enum\s+([^\s]+)\s+/' $(srctree)/include/linux/dvb/net.h) \ | 86 | $(shell perl -ne 'print "$$1 " if /^enum\s+([^\s]+)\s+/' $(srctree)/include/uapi/linux/dvb/net.h) \ |
87 | $(shell perl -ne 'print "$$1 " if /^enum\s+([^\s]+)\s+/' $(srctree)/include/linux/dvb/video.h) \ | 87 | $(shell perl -ne 'print "$$1 " if /^enum\s+([^\s]+)\s+/' $(srctree)/include/uapi/linux/dvb/video.h) \ |
88 | $(shell perl -ne 'print "$$1 " if /^enum\s+([^\s]+)\s+/' $(srctree)/include/linux/media.h) \ | 88 | $(shell perl -ne 'print "$$1 " if /^enum\s+([^\s]+)\s+/' $(srctree)/include/uapi/linux/media.h) \ |
89 | $(shell perl -ne 'print "$$1 " if /^enum\s+([^\s]+)\s+/' $(srctree)/include/linux/v4l2-mediabus.h) \ | 89 | $(shell perl -ne 'print "$$1 " if /^enum\s+([^\s]+)\s+/' $(srctree)/include/uapi/linux/v4l2-mediabus.h) \ |
90 | $(shell perl -ne 'print "$$1 " if /^enum\s+([^\s]+)\s+/' $(srctree)/include/linux/v4l2-subdev.h) | 90 | $(shell perl -ne 'print "$$1 " if /^enum\s+([^\s]+)\s+/' $(srctree)/include/uapi/linux/v4l2-subdev.h) |
91 | 91 | ||
92 | STRUCTS = \ | 92 | STRUCTS = \ |
93 | $(shell perl -ne 'print "$$1 " if /^struct\s+([^\s]+)\s+/' $(srctree)/include/linux/videodev2.h) \ | 93 | $(shell perl -ne 'print "$$1 " if /^struct\s+([^\s]+)\s+/' $(srctree)/include/uapi/linux/videodev2.h) \ |
94 | $(shell perl -ne 'print "$$1 " if (/^struct\s+([^\s\{]+)\s*/)' $(srctree)/include/linux/dvb/audio.h) \ | 94 | $(shell perl -ne 'print "$$1 " if (/^struct\s+([^\s\{]+)\s*/)' $(srctree)/include/uapi/linux/dvb/audio.h) \ |
95 | $(shell perl -ne 'print "$$1 " if (/^struct\s+([^\s]+)\s+/)' $(srctree)/include/linux/dvb/ca.h) \ | 95 | $(shell perl -ne 'print "$$1 " if (/^struct\s+([^\s]+)\s+/)' $(srctree)/include/uapi/linux/dvb/ca.h) \ |
96 | $(shell perl -ne 'print "$$1 " if (/^struct\s+([^\s]+)\s+/)' $(srctree)/include/linux/dvb/dmx.h) \ | 96 | $(shell perl -ne 'print "$$1 " if (/^struct\s+([^\s]+)\s+/)' $(srctree)/include/uapi/linux/dvb/dmx.h) \ |
97 | $(shell perl -ne 'print "$$1 " if (!/dtv\_cmds\_h/ && /^struct\s+([^\s]+)\s+/)' $(srctree)/include/linux/dvb/frontend.h) \ | 97 | $(shell perl -ne 'print "$$1 " if (!/dtv\_cmds\_h/ && /^struct\s+([^\s]+)\s+/)' $(srctree)/include/uapi/linux/dvb/frontend.h) \ |
98 | $(shell perl -ne 'print "$$1 " if (/^struct\s+([A-Z][^\s]+)\s+/)' $(srctree)/include/linux/dvb/net.h) \ | 98 | $(shell perl -ne 'print "$$1 " if (/^struct\s+([A-Z][^\s]+)\s+/)' $(srctree)/include/uapi/linux/dvb/net.h) \ |
99 | $(shell perl -ne 'print "$$1 " if (/^struct\s+([^\s]+)\s+/)' $(srctree)/include/linux/dvb/video.h) \ | 99 | $(shell perl -ne 'print "$$1 " if (/^struct\s+([^\s]+)\s+/)' $(srctree)/include/uapi/linux/dvb/video.h) \ |
100 | $(shell perl -ne 'print "$$1 " if /^struct\s+([^\s]+)\s+/' $(srctree)/include/linux/media.h) \ | 100 | $(shell perl -ne 'print "$$1 " if /^struct\s+([^\s]+)\s+/' $(srctree)/include/uapi/linux/media.h) \ |
101 | $(shell perl -ne 'print "$$1 " if /^struct\s+([^\s]+)\s+/' $(srctree)/include/linux/v4l2-subdev.h) \ | 101 | $(shell perl -ne 'print "$$1 " if /^struct\s+([^\s]+)\s+/' $(srctree)/include/uapi/linux/v4l2-subdev.h) \ |
102 | $(shell perl -ne 'print "$$1 " if /^struct\s+([^\s]+)\s+/' $(srctree)/include/linux/v4l2-mediabus.h) | 102 | $(shell perl -ne 'print "$$1 " if /^struct\s+([^\s]+)\s+/' $(srctree)/include/uapi/linux/v4l2-mediabus.h) |
103 | 103 | ||
104 | ERRORS = \ | 104 | ERRORS = \ |
105 | E2BIG \ | 105 | E2BIG \ |
@@ -205,7 +205,7 @@ $(MEDIA_OBJ_DIR)/v4l2.xml: $(OBJIMGFILES) | |||
205 | @(ln -sf $(MEDIA_SRC_DIR)/v4l/*xml $(MEDIA_OBJ_DIR)/) | 205 | @(ln -sf $(MEDIA_SRC_DIR)/v4l/*xml $(MEDIA_OBJ_DIR)/) |
206 | @(ln -sf $(MEDIA_SRC_DIR)/dvb/*xml $(MEDIA_OBJ_DIR)/) | 206 | @(ln -sf $(MEDIA_SRC_DIR)/dvb/*xml $(MEDIA_OBJ_DIR)/) |
207 | 207 | ||
208 | $(MEDIA_OBJ_DIR)/videodev2.h.xml: $(srctree)/include/linux/videodev2.h $(MEDIA_OBJ_DIR)/v4l2.xml | 208 | $(MEDIA_OBJ_DIR)/videodev2.h.xml: $(srctree)/include/uapi/linux/videodev2.h $(MEDIA_OBJ_DIR)/v4l2.xml |
209 | @$($(quiet)gen_xml) | 209 | @$($(quiet)gen_xml) |
210 | @( \ | 210 | @( \ |
211 | echo "<programlisting>") > $@ | 211 | echo "<programlisting>") > $@ |
@@ -216,7 +216,7 @@ $(MEDIA_OBJ_DIR)/videodev2.h.xml: $(srctree)/include/linux/videodev2.h $(MEDIA_O | |||
216 | @( \ | 216 | @( \ |
217 | echo "</programlisting>") >> $@ | 217 | echo "</programlisting>") >> $@ |
218 | 218 | ||
219 | $(MEDIA_OBJ_DIR)/audio.h.xml: $(srctree)/include/linux/dvb/audio.h $(MEDIA_OBJ_DIR)/v4l2.xml | 219 | $(MEDIA_OBJ_DIR)/audio.h.xml: $(srctree)/include/uapi/linux/dvb/audio.h $(MEDIA_OBJ_DIR)/v4l2.xml |
220 | @$($(quiet)gen_xml) | 220 | @$($(quiet)gen_xml) |
221 | @( \ | 221 | @( \ |
222 | echo "<programlisting>") > $@ | 222 | echo "<programlisting>") > $@ |
@@ -227,7 +227,7 @@ $(MEDIA_OBJ_DIR)/audio.h.xml: $(srctree)/include/linux/dvb/audio.h $(MEDIA_OBJ_D | |||
227 | @( \ | 227 | @( \ |
228 | echo "</programlisting>") >> $@ | 228 | echo "</programlisting>") >> $@ |
229 | 229 | ||
230 | $(MEDIA_OBJ_DIR)/ca.h.xml: $(srctree)/include/linux/dvb/ca.h $(MEDIA_OBJ_DIR)/v4l2.xml | 230 | $(MEDIA_OBJ_DIR)/ca.h.xml: $(srctree)/include/uapi/linux/dvb/ca.h $(MEDIA_OBJ_DIR)/v4l2.xml |
231 | @$($(quiet)gen_xml) | 231 | @$($(quiet)gen_xml) |
232 | @( \ | 232 | @( \ |
233 | echo "<programlisting>") > $@ | 233 | echo "<programlisting>") > $@ |
@@ -238,7 +238,7 @@ $(MEDIA_OBJ_DIR)/ca.h.xml: $(srctree)/include/linux/dvb/ca.h $(MEDIA_OBJ_DIR)/v4 | |||
238 | @( \ | 238 | @( \ |
239 | echo "</programlisting>") >> $@ | 239 | echo "</programlisting>") >> $@ |
240 | 240 | ||
241 | $(MEDIA_OBJ_DIR)/dmx.h.xml: $(srctree)/include/linux/dvb/dmx.h $(MEDIA_OBJ_DIR)/v4l2.xml | 241 | $(MEDIA_OBJ_DIR)/dmx.h.xml: $(srctree)/include/uapi/linux/dvb/dmx.h $(MEDIA_OBJ_DIR)/v4l2.xml |
242 | @$($(quiet)gen_xml) | 242 | @$($(quiet)gen_xml) |
243 | @( \ | 243 | @( \ |
244 | echo "<programlisting>") > $@ | 244 | echo "<programlisting>") > $@ |
@@ -249,7 +249,7 @@ $(MEDIA_OBJ_DIR)/dmx.h.xml: $(srctree)/include/linux/dvb/dmx.h $(MEDIA_OBJ_DIR)/ | |||
249 | @( \ | 249 | @( \ |
250 | echo "</programlisting>") >> $@ | 250 | echo "</programlisting>") >> $@ |
251 | 251 | ||
252 | $(MEDIA_OBJ_DIR)/frontend.h.xml: $(srctree)/include/linux/dvb/frontend.h $(MEDIA_OBJ_DIR)/v4l2.xml | 252 | $(MEDIA_OBJ_DIR)/frontend.h.xml: $(srctree)/include/uapi/linux/dvb/frontend.h $(MEDIA_OBJ_DIR)/v4l2.xml |
253 | @$($(quiet)gen_xml) | 253 | @$($(quiet)gen_xml) |
254 | @( \ | 254 | @( \ |
255 | echo "<programlisting>") > $@ | 255 | echo "<programlisting>") > $@ |
@@ -260,7 +260,7 @@ $(MEDIA_OBJ_DIR)/frontend.h.xml: $(srctree)/include/linux/dvb/frontend.h $(MEDIA | |||
260 | @( \ | 260 | @( \ |
261 | echo "</programlisting>") >> $@ | 261 | echo "</programlisting>") >> $@ |
262 | 262 | ||
263 | $(MEDIA_OBJ_DIR)/net.h.xml: $(srctree)/include/linux/dvb/net.h $(MEDIA_OBJ_DIR)/v4l2.xml | 263 | $(MEDIA_OBJ_DIR)/net.h.xml: $(srctree)/include/uapi/linux/dvb/net.h $(MEDIA_OBJ_DIR)/v4l2.xml |
264 | @$($(quiet)gen_xml) | 264 | @$($(quiet)gen_xml) |
265 | @( \ | 265 | @( \ |
266 | echo "<programlisting>") > $@ | 266 | echo "<programlisting>") > $@ |
@@ -271,7 +271,7 @@ $(MEDIA_OBJ_DIR)/net.h.xml: $(srctree)/include/linux/dvb/net.h $(MEDIA_OBJ_DIR)/ | |||
271 | @( \ | 271 | @( \ |
272 | echo "</programlisting>") >> $@ | 272 | echo "</programlisting>") >> $@ |
273 | 273 | ||
274 | $(MEDIA_OBJ_DIR)/video.h.xml: $(srctree)/include/linux/dvb/video.h $(MEDIA_OBJ_DIR)/v4l2.xml | 274 | $(MEDIA_OBJ_DIR)/video.h.xml: $(srctree)/include/uapi/linux/dvb/video.h $(MEDIA_OBJ_DIR)/v4l2.xml |
275 | @$($(quiet)gen_xml) | 275 | @$($(quiet)gen_xml) |
276 | @( \ | 276 | @( \ |
277 | echo "<programlisting>") > $@ | 277 | echo "<programlisting>") > $@ |
diff --git a/Documentation/DocBook/media/v4l/compat.xml b/Documentation/DocBook/media/v4l/compat.xml index 4fdf6b562d1c..3dd9e78815d1 100644 --- a/Documentation/DocBook/media/v4l/compat.xml +++ b/Documentation/DocBook/media/v4l/compat.xml | |||
@@ -2586,6 +2586,13 @@ ioctls.</para> | |||
2586 | <para>Vendor and device specific media bus pixel formats. | 2586 | <para>Vendor and device specific media bus pixel formats. |
2587 | <xref linkend="v4l2-mbus-vendor-spec-fmts" />.</para> | 2587 | <xref linkend="v4l2-mbus-vendor-spec-fmts" />.</para> |
2588 | </listitem> | 2588 | </listitem> |
2589 | <listitem> | ||
2590 | <para>Importing DMABUF file descriptors as a new IO method described | ||
2591 | in <xref linkend="dmabuf" />.</para> | ||
2592 | </listitem> | ||
2593 | <listitem> | ||
2594 | <para>Exporting DMABUF files using &VIDIOC-EXPBUF; ioctl.</para> | ||
2595 | </listitem> | ||
2589 | </itemizedlist> | 2596 | </itemizedlist> |
2590 | </section> | 2597 | </section> |
2591 | 2598 | ||
diff --git a/Documentation/DocBook/media/v4l/io.xml b/Documentation/DocBook/media/v4l/io.xml index b5d1cbdc558b..388a34032653 100644 --- a/Documentation/DocBook/media/v4l/io.xml +++ b/Documentation/DocBook/media/v4l/io.xml | |||
@@ -331,7 +331,7 @@ application until one or more buffers can be dequeued. By default | |||
331 | outgoing queue. When the <constant>O_NONBLOCK</constant> flag was | 331 | outgoing queue. When the <constant>O_NONBLOCK</constant> flag was |
332 | given to the &func-open; function, <constant>VIDIOC_DQBUF</constant> | 332 | given to the &func-open; function, <constant>VIDIOC_DQBUF</constant> |
333 | returns immediately with an &EAGAIN; when no buffer is available. The | 333 | returns immediately with an &EAGAIN; when no buffer is available. The |
334 | &func-select; or &func-poll; function are always available.</para> | 334 | &func-select; or &func-poll; functions are always available.</para> |
335 | 335 | ||
336 | <para>To start and stop capturing or output applications call the | 336 | <para>To start and stop capturing or output applications call the |
337 | &VIDIOC-STREAMON; and &VIDIOC-STREAMOFF; ioctl. Note | 337 | &VIDIOC-STREAMON; and &VIDIOC-STREAMOFF; ioctl. Note |
@@ -472,6 +472,165 @@ rest should be evident.</para> | |||
472 | </footnote></para> | 472 | </footnote></para> |
473 | </section> | 473 | </section> |
474 | 474 | ||
475 | <section id="dmabuf"> | ||
476 | <title>Streaming I/O (DMA buffer importing)</title> | ||
477 | |||
478 | <note> | ||
479 | <title>Experimental</title> | ||
480 | <para>This is an <link linkend="experimental"> experimental </link> | ||
481 | interface and may change in the future.</para> | ||
482 | </note> | ||
483 | |||
484 | <para>The DMABUF framework provides a generic method for sharing buffers | ||
485 | between multiple devices. Device drivers that support DMABUF can export a DMA | ||
486 | buffer to userspace as a file descriptor (known as the exporter role), import a | ||
487 | DMA buffer from userspace using a file descriptor previously exported for a | ||
488 | different or the same device (known as the importer role), or both. This | ||
489 | section describes the DMABUF importer role API in V4L2.</para> | ||
490 | |||
491 | <para>Refer to <link linked="vidioc-expbuf"> DMABUF exporting </link> for | ||
492 | details about exporting V4L2 buffers as DMABUF file descriptors.</para> | ||
493 | |||
494 | <para>Input and output devices support the streaming I/O method when the | ||
495 | <constant>V4L2_CAP_STREAMING</constant> flag in the | ||
496 | <structfield>capabilities</structfield> field of &v4l2-capability; returned by | ||
497 | the &VIDIOC-QUERYCAP; ioctl is set. Whether importing DMA buffers through | ||
498 | DMABUF file descriptors is supported is determined by calling the | ||
499 | &VIDIOC-REQBUFS; ioctl with the memory type set to | ||
500 | <constant>V4L2_MEMORY_DMABUF</constant>.</para> | ||
501 | |||
502 | <para>This I/O method is dedicated to sharing DMA buffers between different | ||
503 | devices, which may be V4L devices or other video-related devices (e.g. DRM). | ||
504 | Buffers (planes) are allocated by a driver on behalf of an application. Next, | ||
505 | these buffers are exported to the application as file descriptors using an API | ||
506 | which is specific for an allocator driver. Only such file descriptor are | ||
507 | exchanged. The descriptors and meta-information are passed in &v4l2-buffer; (or | ||
508 | in &v4l2-plane; in the multi-planar API case). The driver must be switched | ||
509 | into DMABUF I/O mode by calling the &VIDIOC-REQBUFS; with the desired buffer | ||
510 | type.</para> | ||
511 | |||
512 | <example> | ||
513 | <title>Initiating streaming I/O with DMABUF file descriptors</title> | ||
514 | |||
515 | <programlisting> | ||
516 | &v4l2-requestbuffers; reqbuf; | ||
517 | |||
518 | memset(&reqbuf, 0, sizeof (reqbuf)); | ||
519 | reqbuf.type = V4L2_BUF_TYPE_VIDEO_CAPTURE; | ||
520 | reqbuf.memory = V4L2_MEMORY_DMABUF; | ||
521 | reqbuf.count = 1; | ||
522 | |||
523 | if (ioctl(fd, &VIDIOC-REQBUFS;, &reqbuf) == -1) { | ||
524 | if (errno == EINVAL) | ||
525 | printf("Video capturing or DMABUF streaming is not supported\n"); | ||
526 | else | ||
527 | perror("VIDIOC_REQBUFS"); | ||
528 | |||
529 | exit(EXIT_FAILURE); | ||
530 | } | ||
531 | </programlisting> | ||
532 | </example> | ||
533 | |||
534 | <para>The buffer (plane) file descriptor is passed on the fly with the | ||
535 | &VIDIOC-QBUF; ioctl. In case of multiplanar buffers, every plane can be | ||
536 | associated with a different DMABUF descriptor. Although buffers are commonly | ||
537 | cycled, applications can pass a different DMABUF descriptor at each | ||
538 | <constant>VIDIOC_QBUF</constant> call.</para> | ||
539 | |||
540 | <example> | ||
541 | <title>Queueing DMABUF using single plane API</title> | ||
542 | |||
543 | <programlisting> | ||
544 | int buffer_queue(int v4lfd, int index, int dmafd) | ||
545 | { | ||
546 | &v4l2-buffer; buf; | ||
547 | |||
548 | memset(&buf, 0, sizeof buf); | ||
549 | buf.type = V4L2_BUF_TYPE_VIDEO_CAPTURE; | ||
550 | buf.memory = V4L2_MEMORY_DMABUF; | ||
551 | buf.index = index; | ||
552 | buf.m.fd = dmafd; | ||
553 | |||
554 | if (ioctl(v4lfd, &VIDIOC-QBUF;, &buf) == -1) { | ||
555 | perror("VIDIOC_QBUF"); | ||
556 | return -1; | ||
557 | } | ||
558 | |||
559 | return 0; | ||
560 | } | ||
561 | </programlisting> | ||
562 | </example> | ||
563 | |||
564 | <example> | ||
565 | <title>Queueing DMABUF using multi plane API</title> | ||
566 | |||
567 | <programlisting> | ||
568 | int buffer_queue_mp(int v4lfd, int index, int dmafd[], int n_planes) | ||
569 | { | ||
570 | &v4l2-buffer; buf; | ||
571 | &v4l2-plane; planes[VIDEO_MAX_PLANES]; | ||
572 | int i; | ||
573 | |||
574 | memset(&buf, 0, sizeof buf); | ||
575 | buf.type = V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE; | ||
576 | buf.memory = V4L2_MEMORY_DMABUF; | ||
577 | buf.index = index; | ||
578 | buf.m.planes = planes; | ||
579 | buf.length = n_planes; | ||
580 | |||
581 | memset(&planes, 0, sizeof planes); | ||
582 | |||
583 | for (i = 0; i < n_planes; ++i) | ||
584 | buf.m.planes[i].m.fd = dmafd[i]; | ||
585 | |||
586 | if (ioctl(v4lfd, &VIDIOC-QBUF;, &buf) == -1) { | ||
587 | perror("VIDIOC_QBUF"); | ||
588 | return -1; | ||
589 | } | ||
590 | |||
591 | return 0; | ||
592 | } | ||
593 | </programlisting> | ||
594 | </example> | ||
595 | |||
596 | <para>Captured or displayed buffers are dequeued with the | ||
597 | &VIDIOC-DQBUF; ioctl. The driver can unlock the buffer at any | ||
598 | time between the completion of the DMA and this ioctl. The memory is | ||
599 | also unlocked when &VIDIOC-STREAMOFF; is called, &VIDIOC-REQBUFS;, or | ||
600 | when the device is closed.</para> | ||
601 | |||
602 | <para>For capturing applications it is customary to enqueue a | ||
603 | number of empty buffers, to start capturing and enter the read loop. | ||
604 | Here the application waits until a filled buffer can be dequeued, and | ||
605 | re-enqueues the buffer when the data is no longer needed. Output | ||
606 | applications fill and enqueue buffers, when enough buffers are stacked | ||
607 | up output is started. In the write loop, when the application | ||
608 | runs out of free buffers it must wait until an empty buffer can be | ||
609 | dequeued and reused. Two methods exist to suspend execution of the | ||
610 | application until one or more buffers can be dequeued. By default | ||
611 | <constant>VIDIOC_DQBUF</constant> blocks when no buffer is in the | ||
612 | outgoing queue. When the <constant>O_NONBLOCK</constant> flag was | ||
613 | given to the &func-open; function, <constant>VIDIOC_DQBUF</constant> | ||
614 | returns immediately with an &EAGAIN; when no buffer is available. The | ||
615 | &func-select; and &func-poll; functions are always available.</para> | ||
616 | |||
617 | <para>To start and stop capturing or displaying applications call the | ||
618 | &VIDIOC-STREAMON; and &VIDIOC-STREAMOFF; ioctls. Note that | ||
619 | <constant>VIDIOC_STREAMOFF</constant> removes all buffers from both queues and | ||
620 | unlocks all buffers as a side effect. Since there is no notion of doing | ||
621 | anything "now" on a multitasking system, if an application needs to synchronize | ||
622 | with another event it should examine the &v4l2-buffer; | ||
623 | <structfield>timestamp</structfield> of captured buffers, or set the field | ||
624 | before enqueuing buffers for output.</para> | ||
625 | |||
626 | <para>Drivers implementing DMABUF importing I/O must support the | ||
627 | <constant>VIDIOC_REQBUFS</constant>, <constant>VIDIOC_QBUF</constant>, | ||
628 | <constant>VIDIOC_DQBUF</constant>, <constant>VIDIOC_STREAMON</constant> and | ||
629 | <constant>VIDIOC_STREAMOFF</constant> ioctls, and the | ||
630 | <function>select()</function> and <function>poll()</function> functions.</para> | ||
631 | |||
632 | </section> | ||
633 | |||
475 | <section id="async"> | 634 | <section id="async"> |
476 | <title>Asynchronous I/O</title> | 635 | <title>Asynchronous I/O</title> |
477 | 636 | ||
@@ -673,6 +832,14 @@ memory, set by the application. See <xref linkend="userp" /> for details. | |||
673 | <structname>v4l2_buffer</structname> structure.</entry> | 832 | <structname>v4l2_buffer</structname> structure.</entry> |
674 | </row> | 833 | </row> |
675 | <row> | 834 | <row> |
835 | <entry></entry> | ||
836 | <entry>int</entry> | ||
837 | <entry><structfield>fd</structfield></entry> | ||
838 | <entry>For the single-plane API and when | ||
839 | <structfield>memory</structfield> is <constant>V4L2_MEMORY_DMABUF</constant> this | ||
840 | is the file descriptor associated with a DMABUF buffer.</entry> | ||
841 | </row> | ||
842 | <row> | ||
676 | <entry>__u32</entry> | 843 | <entry>__u32</entry> |
677 | <entry><structfield>length</structfield></entry> | 844 | <entry><structfield>length</structfield></entry> |
678 | <entry></entry> | 845 | <entry></entry> |
@@ -744,6 +911,15 @@ should set this to 0.</entry> | |||
744 | </entry> | 911 | </entry> |
745 | </row> | 912 | </row> |
746 | <row> | 913 | <row> |
914 | <entry></entry> | ||
915 | <entry>int</entry> | ||
916 | <entry><structfield>fd</structfield></entry> | ||
917 | <entry>When the memory type in the containing &v4l2-buffer; is | ||
918 | <constant>V4L2_MEMORY_DMABUF</constant>, this is a file | ||
919 | descriptor associated with a DMABUF buffer, similar to the | ||
920 | <structfield>fd</structfield> field in &v4l2-buffer;.</entry> | ||
921 | </row> | ||
922 | <row> | ||
747 | <entry>__u32</entry> | 923 | <entry>__u32</entry> |
748 | <entry><structfield>data_offset</structfield></entry> | 924 | <entry><structfield>data_offset</structfield></entry> |
749 | <entry></entry> | 925 | <entry></entry> |
@@ -923,7 +1099,7 @@ application. Drivers set or clear this flag when the | |||
923 | </row> | 1099 | </row> |
924 | <row> | 1100 | <row> |
925 | <entry><constant>V4L2_BUF_FLAG_NO_CACHE_INVALIDATE</constant></entry> | 1101 | <entry><constant>V4L2_BUF_FLAG_NO_CACHE_INVALIDATE</constant></entry> |
926 | <entry>0x0400</entry> | 1102 | <entry>0x0800</entry> |
927 | <entry>Caches do not have to be invalidated for this buffer. | 1103 | <entry>Caches do not have to be invalidated for this buffer. |
928 | Typically applications shall use this flag if the data captured in the buffer | 1104 | Typically applications shall use this flag if the data captured in the buffer |
929 | is not going to be touched by the CPU, instead the buffer will, probably, be | 1105 | is not going to be touched by the CPU, instead the buffer will, probably, be |
@@ -932,7 +1108,7 @@ passed on to a DMA-capable hardware unit for further processing or output. | |||
932 | </row> | 1108 | </row> |
933 | <row> | 1109 | <row> |
934 | <entry><constant>V4L2_BUF_FLAG_NO_CACHE_CLEAN</constant></entry> | 1110 | <entry><constant>V4L2_BUF_FLAG_NO_CACHE_CLEAN</constant></entry> |
935 | <entry>0x0800</entry> | 1111 | <entry>0x1000</entry> |
936 | <entry>Caches do not have to be cleaned for this buffer. | 1112 | <entry>Caches do not have to be cleaned for this buffer. |
937 | Typically applications shall use this flag for output buffers if the data | 1113 | Typically applications shall use this flag for output buffers if the data |
938 | in this buffer has not been created by the CPU but by some DMA-capable unit, | 1114 | in this buffer has not been created by the CPU but by some DMA-capable unit, |
@@ -964,6 +1140,12 @@ pointer</link> I/O.</entry> | |||
964 | <entry>3</entry> | 1140 | <entry>3</entry> |
965 | <entry>[to do]</entry> | 1141 | <entry>[to do]</entry> |
966 | </row> | 1142 | </row> |
1143 | <row> | ||
1144 | <entry><constant>V4L2_MEMORY_DMABUF</constant></entry> | ||
1145 | <entry>4</entry> | ||
1146 | <entry>The buffer is used for <link linkend="dmabuf">DMA shared | ||
1147 | buffer</link> I/O.</entry> | ||
1148 | </row> | ||
967 | </tbody> | 1149 | </tbody> |
968 | </tgroup> | 1150 | </tgroup> |
969 | </table> | 1151 | </table> |
diff --git a/Documentation/DocBook/media/v4l/v4l2.xml b/Documentation/DocBook/media/v4l/v4l2.xml index 10ccde9d16d0..4d110b1ad3e9 100644 --- a/Documentation/DocBook/media/v4l/v4l2.xml +++ b/Documentation/DocBook/media/v4l/v4l2.xml | |||
@@ -543,6 +543,7 @@ and discussions on the V4L mailing list.</revremark> | |||
543 | &sub-enuminput; | 543 | &sub-enuminput; |
544 | &sub-enumoutput; | 544 | &sub-enumoutput; |
545 | &sub-enumstd; | 545 | &sub-enumstd; |
546 | &sub-expbuf; | ||
546 | &sub-g-audio; | 547 | &sub-g-audio; |
547 | &sub-g-audioout; | 548 | &sub-g-audioout; |
548 | &sub-g-crop; | 549 | &sub-g-crop; |
diff --git a/Documentation/DocBook/media/v4l/vidioc-create-bufs.xml b/Documentation/DocBook/media/v4l/vidioc-create-bufs.xml index a8cda1acacd9..cd9943672434 100644 --- a/Documentation/DocBook/media/v4l/vidioc-create-bufs.xml +++ b/Documentation/DocBook/media/v4l/vidioc-create-bufs.xml | |||
@@ -6,7 +6,8 @@ | |||
6 | 6 | ||
7 | <refnamediv> | 7 | <refnamediv> |
8 | <refname>VIDIOC_CREATE_BUFS</refname> | 8 | <refname>VIDIOC_CREATE_BUFS</refname> |
9 | <refpurpose>Create buffers for Memory Mapped or User Pointer I/O</refpurpose> | 9 | <refpurpose>Create buffers for Memory Mapped or User Pointer or DMA Buffer |
10 | I/O</refpurpose> | ||
10 | </refnamediv> | 11 | </refnamediv> |
11 | 12 | ||
12 | <refsynopsisdiv> | 13 | <refsynopsisdiv> |
@@ -55,11 +56,11 @@ | |||
55 | </note> | 56 | </note> |
56 | 57 | ||
57 | <para>This ioctl is used to create buffers for <link linkend="mmap">memory | 58 | <para>This ioctl is used to create buffers for <link linkend="mmap">memory |
58 | mapped</link> or <link linkend="userp">user pointer</link> | 59 | mapped</link> or <link linkend="userp">user pointer</link> or <link |
59 | I/O. It can be used as an alternative or in addition to the | 60 | linkend="dmabuf">DMA buffer</link> I/O. It can be used as an alternative or in |
60 | <constant>VIDIOC_REQBUFS</constant> ioctl, when a tighter control over buffers | 61 | addition to the <constant>VIDIOC_REQBUFS</constant> ioctl, when a tighter |
61 | is required. This ioctl can be called multiple times to create buffers of | 62 | control over buffers is required. This ioctl can be called multiple times to |
62 | different sizes.</para> | 63 | create buffers of different sizes.</para> |
63 | 64 | ||
64 | <para>To allocate device buffers applications initialize relevant fields of | 65 | <para>To allocate device buffers applications initialize relevant fields of |
65 | the <structname>v4l2_create_buffers</structname> structure. They set the | 66 | the <structname>v4l2_create_buffers</structname> structure. They set the |
@@ -109,7 +110,8 @@ information.</para> | |||
109 | <entry>__u32</entry> | 110 | <entry>__u32</entry> |
110 | <entry><structfield>memory</structfield></entry> | 111 | <entry><structfield>memory</structfield></entry> |
111 | <entry>Applications set this field to | 112 | <entry>Applications set this field to |
112 | <constant>V4L2_MEMORY_MMAP</constant> or | 113 | <constant>V4L2_MEMORY_MMAP</constant>, |
114 | <constant>V4L2_MEMORY_DMABUF</constant> or | ||
113 | <constant>V4L2_MEMORY_USERPTR</constant>. See <xref linkend="v4l2-memory" | 115 | <constant>V4L2_MEMORY_USERPTR</constant>. See <xref linkend="v4l2-memory" |
114 | /></entry> | 116 | /></entry> |
115 | </row> | 117 | </row> |
diff --git a/Documentation/DocBook/media/v4l/vidioc-expbuf.xml b/Documentation/DocBook/media/v4l/vidioc-expbuf.xml new file mode 100644 index 000000000000..72dfbd20a802 --- /dev/null +++ b/Documentation/DocBook/media/v4l/vidioc-expbuf.xml | |||
@@ -0,0 +1,212 @@ | |||
1 | <refentry id="vidioc-expbuf"> | ||
2 | |||
3 | <refmeta> | ||
4 | <refentrytitle>ioctl VIDIOC_EXPBUF</refentrytitle> | ||
5 | &manvol; | ||
6 | </refmeta> | ||
7 | |||
8 | <refnamediv> | ||
9 | <refname>VIDIOC_EXPBUF</refname> | ||
10 | <refpurpose>Export a buffer as a DMABUF file descriptor.</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_exportbuffer *<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_EXPBUF</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 | <para>This is an <link linkend="experimental"> experimental </link> | ||
55 | interface and may change in the future.</para> | ||
56 | </note> | ||
57 | |||
58 | <para>This ioctl is an extension to the <link linkend="mmap">memory | ||
59 | mapping</link> I/O method, therefore it is available only for | ||
60 | <constant>V4L2_MEMORY_MMAP</constant> buffers. It can be used to export a | ||
61 | buffer as a DMABUF file at any time after buffers have been allocated with the | ||
62 | &VIDIOC-REQBUFS; ioctl.</para> | ||
63 | |||
64 | <para> To export a buffer, applications fill &v4l2-exportbuffer;. The | ||
65 | <structfield> type </structfield> field is set to the same buffer type as was | ||
66 | previously used with &v4l2-requestbuffers;<structfield> type </structfield>. | ||
67 | Applications must also set the <structfield> index </structfield> field. Valid | ||
68 | index numbers range from zero to the number of buffers allocated with | ||
69 | &VIDIOC-REQBUFS; (&v4l2-requestbuffers;<structfield> count </structfield>) | ||
70 | minus one. For the multi-planar API, applications set the <structfield> plane | ||
71 | </structfield> field to the index of the plane to be exported. Valid planes | ||
72 | range from zero to the maximal number of valid planes for the currently active | ||
73 | format. For the single-planar API, applications must set <structfield> plane | ||
74 | </structfield> to zero. Additional flags may be posted in the <structfield> | ||
75 | flags </structfield> field. Refer to a manual for open() for details. | ||
76 | Currently only O_CLOEXEC is supported. All other fields must be set to zero. | ||
77 | In the case of multi-planar API, every plane is exported separately using | ||
78 | multiple <constant> VIDIOC_EXPBUF </constant> calls. </para> | ||
79 | |||
80 | <para> After calling <constant>VIDIOC_EXPBUF</constant> the <structfield> fd | ||
81 | </structfield> field will be set by a driver. This is a DMABUF file | ||
82 | descriptor. The application may pass it to other DMABUF-aware devices. Refer to | ||
83 | <link linkend="dmabuf">DMABUF importing</link> for details about importing | ||
84 | DMABUF files into V4L2 nodes. It is recommended to close a DMABUF file when it | ||
85 | is no longer used to allow the associated memory to be reclaimed. </para> | ||
86 | |||
87 | </refsect1> | ||
88 | <refsect1> | ||
89 | <section> | ||
90 | <title>Examples</title> | ||
91 | |||
92 | <example> | ||
93 | <title>Exporting a buffer.</title> | ||
94 | <programlisting> | ||
95 | int buffer_export(int v4lfd, &v4l2-buf-type; bt, int index, int *dmafd) | ||
96 | { | ||
97 | &v4l2-exportbuffer; expbuf; | ||
98 | |||
99 | memset(&expbuf, 0, sizeof(expbuf)); | ||
100 | expbuf.type = bt; | ||
101 | expbuf.index = index; | ||
102 | if (ioctl(v4lfd, &VIDIOC-EXPBUF;, &expbuf) == -1) { | ||
103 | perror("VIDIOC_EXPBUF"); | ||
104 | return -1; | ||
105 | } | ||
106 | |||
107 | *dmafd = expbuf.fd; | ||
108 | |||
109 | return 0; | ||
110 | } | ||
111 | </programlisting> | ||
112 | </example> | ||
113 | |||
114 | <example> | ||
115 | <title>Exporting a buffer using the multi-planar API.</title> | ||
116 | <programlisting> | ||
117 | int buffer_export_mp(int v4lfd, &v4l2-buf-type; bt, int index, | ||
118 | int dmafd[], int n_planes) | ||
119 | { | ||
120 | int i; | ||
121 | |||
122 | for (i = 0; i < n_planes; ++i) { | ||
123 | &v4l2-exportbuffer; expbuf; | ||
124 | |||
125 | memset(&expbuf, 0, sizeof(expbuf)); | ||
126 | expbuf.type = bt; | ||
127 | expbuf.index = index; | ||
128 | expbuf.plane = i; | ||
129 | if (ioctl(v4lfd, &VIDIOC-EXPBUF;, &expbuf) == -1) { | ||
130 | perror("VIDIOC_EXPBUF"); | ||
131 | while (i) | ||
132 | close(dmafd[--i]); | ||
133 | return -1; | ||
134 | } | ||
135 | dmafd[i] = expbuf.fd; | ||
136 | } | ||
137 | |||
138 | return 0; | ||
139 | } | ||
140 | </programlisting> | ||
141 | </example> | ||
142 | </section> | ||
143 | </refsect1> | ||
144 | |||
145 | <refsect1> | ||
146 | <table pgwide="1" frame="none" id="v4l2-exportbuffer"> | ||
147 | <title>struct <structname>v4l2_exportbuffer</structname></title> | ||
148 | <tgroup cols="3"> | ||
149 | &cs-str; | ||
150 | <tbody valign="top"> | ||
151 | <row> | ||
152 | <entry>__u32</entry> | ||
153 | <entry><structfield>type</structfield></entry> | ||
154 | <entry>Type of the buffer, same as &v4l2-format; | ||
155 | <structfield>type</structfield> or &v4l2-requestbuffers; | ||
156 | <structfield>type</structfield>, set by the application. See <xref | ||
157 | linkend="v4l2-buf-type" /></entry> | ||
158 | </row> | ||
159 | <row> | ||
160 | <entry>__u32</entry> | ||
161 | <entry><structfield>index</structfield></entry> | ||
162 | <entry>Number of the buffer, set by the application. This field is | ||
163 | only used for <link linkend="mmap">memory mapping</link> I/O and can range from | ||
164 | zero to the number of buffers allocated with the &VIDIOC-REQBUFS; and/or | ||
165 | &VIDIOC-CREATE-BUFS; ioctls. </entry> | ||
166 | </row> | ||
167 | <row> | ||
168 | <entry>__u32</entry> | ||
169 | <entry><structfield>plane</structfield></entry> | ||
170 | <entry>Index of the plane to be exported when using the | ||
171 | multi-planar API. Otherwise this value must be set to zero. </entry> | ||
172 | </row> | ||
173 | <row> | ||
174 | <entry>__u32</entry> | ||
175 | <entry><structfield>flags</structfield></entry> | ||
176 | <entry>Flags for the newly created file, currently only <constant> | ||
177 | O_CLOEXEC </constant> is supported, refer to the manual of open() for more | ||
178 | details.</entry> | ||
179 | </row> | ||
180 | <row> | ||
181 | <entry>__s32</entry> | ||
182 | <entry><structfield>fd</structfield></entry> | ||
183 | <entry>The DMABUF file descriptor associated with a buffer. Set by | ||
184 | the driver.</entry> | ||
185 | </row> | ||
186 | <row> | ||
187 | <entry>__u32</entry> | ||
188 | <entry><structfield>reserved[11]</structfield></entry> | ||
189 | <entry>Reserved field for future use. Must be set to zero.</entry> | ||
190 | </row> | ||
191 | </tbody> | ||
192 | </tgroup> | ||
193 | </table> | ||
194 | |||
195 | </refsect1> | ||
196 | |||
197 | <refsect1> | ||
198 | &return-value; | ||
199 | <variablelist> | ||
200 | <varlistentry> | ||
201 | <term><errorcode>EINVAL</errorcode></term> | ||
202 | <listitem> | ||
203 | <para>A queue is not in MMAP mode or DMABUF exporting is not | ||
204 | supported or <structfield> flags </structfield> or <structfield> type | ||
205 | </structfield> or <structfield> index </structfield> or <structfield> plane | ||
206 | </structfield> fields are invalid.</para> | ||
207 | </listitem> | ||
208 | </varlistentry> | ||
209 | </variablelist> | ||
210 | </refsect1> | ||
211 | |||
212 | </refentry> | ||
diff --git a/Documentation/DocBook/media/v4l/vidioc-qbuf.xml b/Documentation/DocBook/media/v4l/vidioc-qbuf.xml index 2d37abefce13..3504a7f2f382 100644 --- a/Documentation/DocBook/media/v4l/vidioc-qbuf.xml +++ b/Documentation/DocBook/media/v4l/vidioc-qbuf.xml | |||
@@ -109,6 +109,23 @@ they cannot be swapped out to disk. Buffers remain locked until | |||
109 | dequeued, until the &VIDIOC-STREAMOFF; or &VIDIOC-REQBUFS; ioctl is | 109 | dequeued, until the &VIDIOC-STREAMOFF; or &VIDIOC-REQBUFS; ioctl is |
110 | called, or until the device is closed.</para> | 110 | called, or until the device is closed.</para> |
111 | 111 | ||
112 | <para>To enqueue a <link linkend="dmabuf">DMABUF</link> buffer applications | ||
113 | set the <structfield>memory</structfield> field to | ||
114 | <constant>V4L2_MEMORY_DMABUF</constant> and the <structfield>m.fd</structfield> | ||
115 | field to a file descriptor associated with a DMABUF buffer. When the | ||
116 | multi-planar API is used the <structfield>m.fd</structfield> fields of the | ||
117 | passed array of &v4l2-plane; have to be used instead. When | ||
118 | <constant>VIDIOC_QBUF</constant> is called with a pointer to this structure the | ||
119 | driver sets the <constant>V4L2_BUF_FLAG_QUEUED</constant> flag and clears the | ||
120 | <constant>V4L2_BUF_FLAG_MAPPED</constant> and | ||
121 | <constant>V4L2_BUF_FLAG_DONE</constant> flags in the | ||
122 | <structfield>flags</structfield> field, or it returns an error code. This | ||
123 | ioctl locks the buffer. Locking a buffer means passing it to a driver for a | ||
124 | hardware access (usually DMA). If an application accesses (reads/writes) a | ||
125 | locked buffer then the result is undefined. Buffers remain locked until | ||
126 | dequeued, until the &VIDIOC-STREAMOFF; or &VIDIOC-REQBUFS; ioctl is called, or | ||
127 | until the device is closed.</para> | ||
128 | |||
112 | <para>Applications call the <constant>VIDIOC_DQBUF</constant> | 129 | <para>Applications call the <constant>VIDIOC_DQBUF</constant> |
113 | ioctl to dequeue a filled (capturing) or displayed (output) buffer | 130 | ioctl to dequeue a filled (capturing) or displayed (output) buffer |
114 | from the driver's outgoing queue. They just set the | 131 | from the driver's outgoing queue. They just set the |
diff --git a/Documentation/DocBook/media/v4l/vidioc-reqbufs.xml b/Documentation/DocBook/media/v4l/vidioc-reqbufs.xml index 2b50ef2007f3..78a06a9a5ece 100644 --- a/Documentation/DocBook/media/v4l/vidioc-reqbufs.xml +++ b/Documentation/DocBook/media/v4l/vidioc-reqbufs.xml | |||
@@ -48,28 +48,30 @@ | |||
48 | <refsect1> | 48 | <refsect1> |
49 | <title>Description</title> | 49 | <title>Description</title> |
50 | 50 | ||
51 | <para>This ioctl is used to initiate <link linkend="mmap">memory | 51 | <para>This ioctl is used to initiate <link linkend="mmap">memory mapped</link>, |
52 | mapped</link> or <link linkend="userp">user pointer</link> | 52 | <link linkend="userp">user pointer</link> or <link |
53 | I/O. Memory mapped buffers are located in device memory and must be | 53 | linkend="dmabuf">DMABUF</link> based I/O. Memory mapped buffers are located in |
54 | allocated with this ioctl before they can be mapped into the | 54 | device memory and must be allocated with this ioctl before they can be mapped |
55 | application's address space. User buffers are allocated by | 55 | into the application's address space. User buffers are allocated by |
56 | applications themselves, and this ioctl is merely used to switch the | 56 | applications themselves, and this ioctl is merely used to switch the driver |
57 | driver into user pointer I/O mode and to setup some internal structures.</para> | 57 | into user pointer I/O mode and to setup some internal structures. |
58 | Similarly, DMABUF buffers are allocated by applications through a device | ||
59 | driver, and this ioctl only configures the driver into DMABUF I/O mode without | ||
60 | performing any direct allocation.</para> | ||
58 | 61 | ||
59 | <para>To allocate device buffers applications initialize all | 62 | <para>To allocate device buffers applications initialize all fields of the |
60 | fields of the <structname>v4l2_requestbuffers</structname> structure. | 63 | <structname>v4l2_requestbuffers</structname> structure. They set the |
61 | They set the <structfield>type</structfield> field to the respective | 64 | <structfield>type</structfield> field to the respective stream or buffer type, |
62 | stream or buffer type, the <structfield>count</structfield> field to | 65 | the <structfield>count</structfield> field to the desired number of buffers, |
63 | the desired number of buffers, <structfield>memory</structfield> | 66 | <structfield>memory</structfield> must be set to the requested I/O method and |
64 | must be set to the requested I/O method and the <structfield>reserved</structfield> array | 67 | the <structfield>reserved</structfield> array must be zeroed. When the ioctl is |
65 | must be zeroed. When the ioctl | 68 | called with a pointer to this structure the driver will attempt to allocate the |
66 | is called with a pointer to this structure the driver will attempt to allocate | 69 | requested number of buffers and it stores the actual number allocated in the |
67 | the requested number of buffers and it stores the actual number | 70 | <structfield>count</structfield> field. It can be smaller than the number |
68 | allocated in the <structfield>count</structfield> field. It can be | 71 | requested, even zero, when the driver runs out of free memory. A larger number |
69 | smaller than the number requested, even zero, when the driver runs out | 72 | is also possible when the driver requires more buffers to function correctly. |
70 | of free memory. A larger number is also possible when the driver requires | 73 | For example video output requires at least two buffers, one displayed and one |
71 | more buffers to function correctly. For example video output requires at least two buffers, | 74 | filled by the application.</para> |
72 | one displayed and one filled by the application.</para> | ||
73 | <para>When the I/O method is not supported the ioctl | 75 | <para>When the I/O method is not supported the ioctl |
74 | returns an &EINVAL;.</para> | 76 | returns an &EINVAL;.</para> |
75 | 77 | ||
@@ -102,7 +104,8 @@ as the &v4l2-format; <structfield>type</structfield> field. See <xref | |||
102 | <entry>__u32</entry> | 104 | <entry>__u32</entry> |
103 | <entry><structfield>memory</structfield></entry> | 105 | <entry><structfield>memory</structfield></entry> |
104 | <entry>Applications set this field to | 106 | <entry>Applications set this field to |
105 | <constant>V4L2_MEMORY_MMAP</constant> or | 107 | <constant>V4L2_MEMORY_MMAP</constant>, |
108 | <constant>V4L2_MEMORY_DMABUF</constant> or | ||
106 | <constant>V4L2_MEMORY_USERPTR</constant>. See <xref linkend="v4l2-memory" | 109 | <constant>V4L2_MEMORY_USERPTR</constant>. See <xref linkend="v4l2-memory" |
107 | />.</entry> | 110 | />.</entry> |
108 | </row> | 111 | </row> |
diff --git a/Documentation/DocBook/networking.tmpl b/Documentation/DocBook/networking.tmpl index 59ad69a9d777..29df25016c7c 100644 --- a/Documentation/DocBook/networking.tmpl +++ b/Documentation/DocBook/networking.tmpl | |||
@@ -56,7 +56,7 @@ | |||
56 | !Enet/core/filter.c | 56 | !Enet/core/filter.c |
57 | </sect1> | 57 | </sect1> |
58 | <sect1><title>Generic Network Statistics</title> | 58 | <sect1><title>Generic Network Statistics</title> |
59 | !Iinclude/linux/gen_stats.h | 59 | !Iinclude/uapi/linux/gen_stats.h |
60 | !Enet/core/gen_stats.c | 60 | !Enet/core/gen_stats.c |
61 | !Enet/core/gen_estimator.c | 61 | !Enet/core/gen_estimator.c |
62 | </sect1> | 62 | </sect1> |
@@ -80,7 +80,7 @@ | |||
80 | !Enet/wimax/op-rfkill.c | 80 | !Enet/wimax/op-rfkill.c |
81 | !Enet/wimax/stack.c | 81 | !Enet/wimax/stack.c |
82 | !Iinclude/net/wimax.h | 82 | !Iinclude/net/wimax.h |
83 | !Iinclude/linux/wimax.h | 83 | !Iinclude/uapi/linux/wimax.h |
84 | </sect1> | 84 | </sect1> |
85 | </chapter> | 85 | </chapter> |
86 | 86 | ||
diff --git a/Documentation/DocBook/uio-howto.tmpl b/Documentation/DocBook/uio-howto.tmpl index ac3d0018140c..ddb05e98af0d 100644 --- a/Documentation/DocBook/uio-howto.tmpl +++ b/Documentation/DocBook/uio-howto.tmpl | |||
@@ -719,6 +719,62 @@ framework to set up sysfs files for this region. Simply leave it alone. | |||
719 | </para> | 719 | </para> |
720 | </sect1> | 720 | </sect1> |
721 | 721 | ||
722 | <sect1 id="using uio_dmem_genirq"> | ||
723 | <title>Using uio_dmem_genirq for platform devices</title> | ||
724 | <para> | ||
725 | In addition to statically allocated memory ranges, they may also be | ||
726 | a desire to use dynamically allocated regions in a user space driver. | ||
727 | In particular, being able to access memory made available through the | ||
728 | dma-mapping API, may be particularly useful. The | ||
729 | <varname>uio_dmem_genirq</varname> driver provides a way to accomplish | ||
730 | this. | ||
731 | </para> | ||
732 | <para> | ||
733 | This driver is used in a similar manner to the | ||
734 | <varname>"uio_pdrv_genirq"</varname> driver with respect to interrupt | ||
735 | configuration and handling. | ||
736 | </para> | ||
737 | <para> | ||
738 | Set the <varname>.name</varname> element of | ||
739 | <varname>struct platform_device</varname> to | ||
740 | <varname>"uio_dmem_genirq"</varname> to use this driver. | ||
741 | </para> | ||
742 | <para> | ||
743 | When using this driver, fill in the <varname>.platform_data</varname> | ||
744 | element of <varname>struct platform_device</varname>, which is of type | ||
745 | <varname>struct uio_dmem_genirq_pdata</varname> and which contains the | ||
746 | following elements: | ||
747 | </para> | ||
748 | <itemizedlist> | ||
749 | <listitem><varname>struct uio_info uioinfo</varname>: The same | ||
750 | structure used as the <varname>uio_pdrv_genirq</varname> platform | ||
751 | data</listitem> | ||
752 | <listitem><varname>unsigned int *dynamic_region_sizes</varname>: | ||
753 | Pointer to list of sizes of dynamic memory regions to be mapped into | ||
754 | user space. | ||
755 | </listitem> | ||
756 | <listitem><varname>unsigned int num_dynamic_regions</varname>: | ||
757 | Number of elements in <varname>dynamic_region_sizes</varname> array. | ||
758 | </listitem> | ||
759 | </itemizedlist> | ||
760 | <para> | ||
761 | The dynamic regions defined in the platform data will be appended to | ||
762 | the <varname> mem[] </varname> array after the platform device | ||
763 | resources, which implies that the total number of static and dynamic | ||
764 | memory regions cannot exceed <varname>MAX_UIO_MAPS</varname>. | ||
765 | </para> | ||
766 | <para> | ||
767 | The dynamic memory regions will be allocated when the UIO device file, | ||
768 | <varname>/dev/uioX</varname> is opened. | ||
769 | Simiar to static memory resources, the memory region information for | ||
770 | dynamic regions is then visible via sysfs at | ||
771 | <varname>/sys/class/uio/uioX/maps/mapY/*</varname>. | ||
772 | The dynmaic memory regions will be freed when the UIO device file is | ||
773 | closed. When no processes are holding the device file open, the address | ||
774 | returned to userspace is ~0. | ||
775 | </para> | ||
776 | </sect1> | ||
777 | |||
722 | </chapter> | 778 | </chapter> |
723 | 779 | ||
724 | <chapter id="userspace_driver" xreflabel="Writing a driver in user space"> | 780 | <chapter id="userspace_driver" xreflabel="Writing a driver in user space"> |
diff --git a/Documentation/DocBook/writing-an-alsa-driver.tmpl b/Documentation/DocBook/writing-an-alsa-driver.tmpl index cab4ec58e46e..fb32aead5a0b 100644 --- a/Documentation/DocBook/writing-an-alsa-driver.tmpl +++ b/Documentation/DocBook/writing-an-alsa-driver.tmpl | |||
@@ -433,9 +433,9 @@ | |||
433 | /* chip-specific constructor | 433 | /* chip-specific constructor |
434 | * (see "Management of Cards and Components") | 434 | * (see "Management of Cards and Components") |
435 | */ | 435 | */ |
436 | static int __devinit snd_mychip_create(struct snd_card *card, | 436 | static int snd_mychip_create(struct snd_card *card, |
437 | struct pci_dev *pci, | 437 | struct pci_dev *pci, |
438 | struct mychip **rchip) | 438 | struct mychip **rchip) |
439 | { | 439 | { |
440 | struct mychip *chip; | 440 | struct mychip *chip; |
441 | int err; | 441 | int err; |
@@ -475,8 +475,8 @@ | |||
475 | } | 475 | } |
476 | 476 | ||
477 | /* constructor -- see "Constructor" sub-section */ | 477 | /* constructor -- see "Constructor" sub-section */ |
478 | static int __devinit snd_mychip_probe(struct pci_dev *pci, | 478 | static int snd_mychip_probe(struct pci_dev *pci, |
479 | const struct pci_device_id *pci_id) | 479 | const struct pci_device_id *pci_id) |
480 | { | 480 | { |
481 | static int dev; | 481 | static int dev; |
482 | struct snd_card *card; | 482 | struct snd_card *card; |
@@ -526,7 +526,7 @@ | |||
526 | } | 526 | } |
527 | 527 | ||
528 | /* destructor -- see the "Destructor" sub-section */ | 528 | /* destructor -- see the "Destructor" sub-section */ |
529 | static void __devexit snd_mychip_remove(struct pci_dev *pci) | 529 | static void snd_mychip_remove(struct pci_dev *pci) |
530 | { | 530 | { |
531 | snd_card_free(pci_get_drvdata(pci)); | 531 | snd_card_free(pci_get_drvdata(pci)); |
532 | pci_set_drvdata(pci, NULL); | 532 | pci_set_drvdata(pci, NULL); |
@@ -542,9 +542,8 @@ | |||
542 | <para> | 542 | <para> |
543 | The real constructor of PCI drivers is the <function>probe</function> callback. | 543 | The real constructor of PCI drivers is the <function>probe</function> callback. |
544 | The <function>probe</function> callback and other component-constructors which are called | 544 | The <function>probe</function> callback and other component-constructors which are called |
545 | from the <function>probe</function> callback should be defined with | 545 | from the <function>probe</function> callback cannot be used with |
546 | the <parameter>__devinit</parameter> prefix. You | 546 | the <parameter>__init</parameter> prefix |
547 | cannot use the <parameter>__init</parameter> prefix for them, | ||
548 | because any PCI device could be a hotplug device. | 547 | because any PCI device could be a hotplug device. |
549 | </para> | 548 | </para> |
550 | 549 | ||
@@ -728,7 +727,7 @@ | |||
728 | <informalexample> | 727 | <informalexample> |
729 | <programlisting> | 728 | <programlisting> |
730 | <![CDATA[ | 729 | <![CDATA[ |
731 | static void __devexit snd_mychip_remove(struct pci_dev *pci) | 730 | static void snd_mychip_remove(struct pci_dev *pci) |
732 | { | 731 | { |
733 | snd_card_free(pci_get_drvdata(pci)); | 732 | snd_card_free(pci_get_drvdata(pci)); |
734 | pci_set_drvdata(pci, NULL); | 733 | pci_set_drvdata(pci, NULL); |
@@ -1059,14 +1058,6 @@ | |||
1059 | </para> | 1058 | </para> |
1060 | 1059 | ||
1061 | <para> | 1060 | <para> |
1062 | As further notes, the destructors (both | ||
1063 | <function>snd_mychip_dev_free</function> and | ||
1064 | <function>snd_mychip_free</function>) cannot be defined with | ||
1065 | the <parameter>__devexit</parameter> prefix, because they may be | ||
1066 | called from the constructor, too, at the false path. | ||
1067 | </para> | ||
1068 | |||
1069 | <para> | ||
1070 | For a device which allows hotplugging, you can use | 1061 | For a device which allows hotplugging, you can use |
1071 | <function>snd_card_free_when_closed</function>. This one will | 1062 | <function>snd_card_free_when_closed</function>. This one will |
1072 | postpone the destruction until all devices are closed. | 1063 | postpone the destruction until all devices are closed. |
@@ -1120,9 +1111,9 @@ | |||
1120 | } | 1111 | } |
1121 | 1112 | ||
1122 | /* chip-specific constructor */ | 1113 | /* chip-specific constructor */ |
1123 | static int __devinit snd_mychip_create(struct snd_card *card, | 1114 | static int snd_mychip_create(struct snd_card *card, |
1124 | struct pci_dev *pci, | 1115 | struct pci_dev *pci, |
1125 | struct mychip **rchip) | 1116 | struct mychip **rchip) |
1126 | { | 1117 | { |
1127 | struct mychip *chip; | 1118 | struct mychip *chip; |
1128 | int err; | 1119 | int err; |
@@ -1200,7 +1191,7 @@ | |||
1200 | .name = KBUILD_MODNAME, | 1191 | .name = KBUILD_MODNAME, |
1201 | .id_table = snd_mychip_ids, | 1192 | .id_table = snd_mychip_ids, |
1202 | .probe = snd_mychip_probe, | 1193 | .probe = snd_mychip_probe, |
1203 | .remove = __devexit_p(snd_mychip_remove), | 1194 | .remove = snd_mychip_remove, |
1204 | }; | 1195 | }; |
1205 | 1196 | ||
1206 | /* module initialization */ | 1197 | /* module initialization */ |
@@ -1465,11 +1456,6 @@ | |||
1465 | </para> | 1456 | </para> |
1466 | 1457 | ||
1467 | <para> | 1458 | <para> |
1468 | Again, remember that you cannot | ||
1469 | use the <parameter>__devexit</parameter> prefix for this destructor. | ||
1470 | </para> | ||
1471 | |||
1472 | <para> | ||
1473 | We didn't implement the hardware disabling part in the above. | 1459 | We didn't implement the hardware disabling part in the above. |
1474 | If you need to do this, please note that the destructor may be | 1460 | If you need to do this, please note that the destructor may be |
1475 | called even before the initialization of the chip is completed. | 1461 | called even before the initialization of the chip is completed. |
@@ -1619,7 +1605,7 @@ | |||
1619 | .name = KBUILD_MODNAME, | 1605 | .name = KBUILD_MODNAME, |
1620 | .id_table = snd_mychip_ids, | 1606 | .id_table = snd_mychip_ids, |
1621 | .probe = snd_mychip_probe, | 1607 | .probe = snd_mychip_probe, |
1622 | .remove = __devexit_p(snd_mychip_remove), | 1608 | .remove = snd_mychip_remove, |
1623 | }; | 1609 | }; |
1624 | ]]> | 1610 | ]]> |
1625 | </programlisting> | 1611 | </programlisting> |
@@ -1630,11 +1616,7 @@ | |||
1630 | The <structfield>probe</structfield> and | 1616 | The <structfield>probe</structfield> and |
1631 | <structfield>remove</structfield> functions have already | 1617 | <structfield>remove</structfield> functions have already |
1632 | been defined in the previous sections. | 1618 | been defined in the previous sections. |
1633 | The <structfield>remove</structfield> function should | 1619 | The <structfield>name</structfield> |
1634 | be defined with the | ||
1635 | <function>__devexit_p()</function> macro, so that it's not | ||
1636 | defined for built-in (and non-hot-pluggable) case. The | ||
1637 | <structfield>name</structfield> | ||
1638 | field is the name string of this device. Note that you must not | 1620 | field is the name string of this device. Note that you must not |
1639 | use a slash <quote>/</quote> in this string. | 1621 | use a slash <quote>/</quote> in this string. |
1640 | </para> | 1622 | </para> |
@@ -1665,9 +1647,7 @@ | |||
1665 | <para> | 1647 | <para> |
1666 | Note that these module entries are tagged with | 1648 | Note that these module entries are tagged with |
1667 | <parameter>__init</parameter> and | 1649 | <parameter>__init</parameter> and |
1668 | <parameter>__exit</parameter> prefixes, not | 1650 | <parameter>__exit</parameter> prefixes. |
1669 | <parameter>__devinit</parameter> nor | ||
1670 | <parameter>__devexit</parameter>. | ||
1671 | </para> | 1651 | </para> |
1672 | 1652 | ||
1673 | <para> | 1653 | <para> |
@@ -1918,7 +1898,7 @@ | |||
1918 | */ | 1898 | */ |
1919 | 1899 | ||
1920 | /* create a pcm device */ | 1900 | /* create a pcm device */ |
1921 | static int __devinit snd_mychip_new_pcm(struct mychip *chip) | 1901 | static int snd_mychip_new_pcm(struct mychip *chip) |
1922 | { | 1902 | { |
1923 | struct snd_pcm *pcm; | 1903 | struct snd_pcm *pcm; |
1924 | int err; | 1904 | int err; |
@@ -1957,7 +1937,7 @@ | |||
1957 | <informalexample> | 1937 | <informalexample> |
1958 | <programlisting> | 1938 | <programlisting> |
1959 | <![CDATA[ | 1939 | <![CDATA[ |
1960 | static int __devinit snd_mychip_new_pcm(struct mychip *chip) | 1940 | static int snd_mychip_new_pcm(struct mychip *chip) |
1961 | { | 1941 | { |
1962 | struct snd_pcm *pcm; | 1942 | struct snd_pcm *pcm; |
1963 | int err; | 1943 | int err; |
@@ -2124,7 +2104,7 @@ | |||
2124 | .... | 2104 | .... |
2125 | } | 2105 | } |
2126 | 2106 | ||
2127 | static int __devinit snd_mychip_new_pcm(struct mychip *chip) | 2107 | static int snd_mychip_new_pcm(struct mychip *chip) |
2128 | { | 2108 | { |
2129 | struct snd_pcm *pcm; | 2109 | struct snd_pcm *pcm; |
2130 | .... | 2110 | .... |
@@ -3399,7 +3379,7 @@ struct _snd_pcm_runtime { | |||
3399 | <title>Definition of a Control</title> | 3379 | <title>Definition of a Control</title> |
3400 | <programlisting> | 3380 | <programlisting> |
3401 | <![CDATA[ | 3381 | <![CDATA[ |
3402 | static struct snd_kcontrol_new my_control __devinitdata = { | 3382 | static struct snd_kcontrol_new my_control = { |
3403 | .iface = SNDRV_CTL_ELEM_IFACE_MIXER, | 3383 | .iface = SNDRV_CTL_ELEM_IFACE_MIXER, |
3404 | .name = "PCM Playback Switch", | 3384 | .name = "PCM Playback Switch", |
3405 | .index = 0, | 3385 | .index = 0, |
@@ -3415,13 +3395,6 @@ struct _snd_pcm_runtime { | |||
3415 | </para> | 3395 | </para> |
3416 | 3396 | ||
3417 | <para> | 3397 | <para> |
3418 | Most likely the control is created via | ||
3419 | <function>snd_ctl_new1()</function>, and in such a case, you can | ||
3420 | add the <parameter>__devinitdata</parameter> prefix to the | ||
3421 | definition as above. | ||
3422 | </para> | ||
3423 | |||
3424 | <para> | ||
3425 | The <structfield>iface</structfield> field specifies the control | 3398 | The <structfield>iface</structfield> field specifies the control |
3426 | type, <constant>SNDRV_CTL_ELEM_IFACE_XXX</constant>, which | 3399 | type, <constant>SNDRV_CTL_ELEM_IFACE_XXX</constant>, which |
3427 | is usually <constant>MIXER</constant>. | 3400 | is usually <constant>MIXER</constant>. |
@@ -3847,10 +3820,8 @@ struct _snd_pcm_runtime { | |||
3847 | 3820 | ||
3848 | <para> | 3821 | <para> |
3849 | <function>snd_ctl_new1()</function> allocates a new | 3822 | <function>snd_ctl_new1()</function> allocates a new |
3850 | <structname>snd_kcontrol</structname> instance (that's why the definition | 3823 | <structname>snd_kcontrol</structname> instance, |
3851 | of <parameter>my_control</parameter> can be with | 3824 | and <function>snd_ctl_add</function> assigns the given |
3852 | the <parameter>__devinitdata</parameter> | ||
3853 | prefix), and <function>snd_ctl_add</function> assigns the given | ||
3854 | control component to the card. | 3825 | control component to the card. |
3855 | </para> | 3826 | </para> |
3856 | </section> | 3827 | </section> |
@@ -3896,7 +3867,7 @@ struct _snd_pcm_runtime { | |||
3896 | <![CDATA[ | 3867 | <![CDATA[ |
3897 | static DECLARE_TLV_DB_SCALE(db_scale_my_control, -4050, 150, 0); | 3868 | static DECLARE_TLV_DB_SCALE(db_scale_my_control, -4050, 150, 0); |
3898 | 3869 | ||
3899 | static struct snd_kcontrol_new my_control __devinitdata = { | 3870 | static struct snd_kcontrol_new my_control = { |
3900 | ... | 3871 | ... |
3901 | .access = SNDRV_CTL_ELEM_ACCESS_READWRITE | | 3872 | .access = SNDRV_CTL_ELEM_ACCESS_READWRITE | |
3902 | SNDRV_CTL_ELEM_ACCESS_TLV_READ, | 3873 | SNDRV_CTL_ELEM_ACCESS_TLV_READ, |
@@ -5761,8 +5732,8 @@ struct _snd_pcm_runtime { | |||
5761 | <informalexample> | 5732 | <informalexample> |
5762 | <programlisting> | 5733 | <programlisting> |
5763 | <![CDATA[ | 5734 | <![CDATA[ |
5764 | static int __devinit snd_mychip_probe(struct pci_dev *pci, | 5735 | static int snd_mychip_probe(struct pci_dev *pci, |
5765 | const struct pci_device_id *pci_id) | 5736 | const struct pci_device_id *pci_id) |
5766 | { | 5737 | { |
5767 | .... | 5738 | .... |
5768 | struct snd_card *card; | 5739 | struct snd_card *card; |
@@ -5787,8 +5758,8 @@ struct _snd_pcm_runtime { | |||
5787 | <informalexample> | 5758 | <informalexample> |
5788 | <programlisting> | 5759 | <programlisting> |
5789 | <![CDATA[ | 5760 | <![CDATA[ |
5790 | static int __devinit snd_mychip_probe(struct pci_dev *pci, | 5761 | static int snd_mychip_probe(struct pci_dev *pci, |
5791 | const struct pci_device_id *pci_id) | 5762 | const struct pci_device_id *pci_id) |
5792 | { | 5763 | { |
5793 | .... | 5764 | .... |
5794 | struct snd_card *card; | 5765 | struct snd_card *card; |
@@ -5825,7 +5796,7 @@ struct _snd_pcm_runtime { | |||
5825 | .name = KBUILD_MODNAME, | 5796 | .name = KBUILD_MODNAME, |
5826 | .id_table = snd_my_ids, | 5797 | .id_table = snd_my_ids, |
5827 | .probe = snd_my_probe, | 5798 | .probe = snd_my_probe, |
5828 | .remove = __devexit_p(snd_my_remove), | 5799 | .remove = snd_my_remove, |
5829 | #ifdef CONFIG_PM | 5800 | #ifdef CONFIG_PM |
5830 | .suspend = snd_my_suspend, | 5801 | .suspend = snd_my_suspend, |
5831 | .resume = snd_my_resume, | 5802 | .resume = snd_my_resume, |
diff --git a/Documentation/HOWTO b/Documentation/HOWTO index 59c080f084ef..a9f288ff54f9 100644 --- a/Documentation/HOWTO +++ b/Documentation/HOWTO | |||
@@ -462,7 +462,7 @@ Differences between the kernel community and corporate structures | |||
462 | 462 | ||
463 | The kernel community works differently than most traditional corporate | 463 | The kernel community works differently than most traditional corporate |
464 | development environments. Here are a list of things that you can try to | 464 | development environments. Here are a list of things that you can try to |
465 | do to try to avoid problems: | 465 | do to avoid problems: |
466 | Good things to say regarding your proposed changes: | 466 | Good things to say regarding your proposed changes: |
467 | - "This solves multiple problems." | 467 | - "This solves multiple problems." |
468 | - "This deletes 2000 lines of code." | 468 | - "This deletes 2000 lines of code." |
diff --git a/Documentation/IPMI.txt b/Documentation/IPMI.txt index b2bea15137d2..16eb4c9e9233 100644 --- a/Documentation/IPMI.txt +++ b/Documentation/IPMI.txt | |||
@@ -42,13 +42,7 @@ The driver interface depends on your hardware. If your system | |||
42 | properly provides the SMBIOS info for IPMI, the driver will detect it | 42 | properly provides the SMBIOS info for IPMI, the driver will detect it |
43 | and just work. If you have a board with a standard interface (These | 43 | and just work. If you have a board with a standard interface (These |
44 | will generally be either "KCS", "SMIC", or "BT", consult your hardware | 44 | will generally be either "KCS", "SMIC", or "BT", consult your hardware |
45 | manual), choose the 'IPMI SI handler' option. A driver also exists | 45 | manual), choose the 'IPMI SI handler' option. |
46 | for direct I2C access to the IPMI management controller. Some boards | ||
47 | support this, but it is unknown if it will work on every board. For | ||
48 | this, choose 'IPMI SMBus handler', but be ready to try to do some | ||
49 | figuring to see if it will work on your system if the SMBIOS/APCI | ||
50 | information is wrong or not present. It is fairly safe to have both | ||
51 | these enabled and let the drivers auto-detect what is present. | ||
52 | 46 | ||
53 | You should generally enable ACPI on your system, as systems with IPMI | 47 | You should generally enable ACPI on your system, as systems with IPMI |
54 | can have ACPI tables describing them. | 48 | can have ACPI tables describing them. |
@@ -58,8 +52,7 @@ their job correctly, the IPMI controller should be automatically | |||
58 | detected (via ACPI or SMBIOS tables) and should just work. Sadly, | 52 | detected (via ACPI or SMBIOS tables) and should just work. Sadly, |
59 | many boards do not have this information. The driver attempts | 53 | many boards do not have this information. The driver attempts |
60 | standard defaults, but they may not work. If you fall into this | 54 | standard defaults, but they may not work. If you fall into this |
61 | situation, you need to read the section below named 'The SI Driver' or | 55 | situation, you need to read the section below named 'The SI Driver'. |
62 | "The SMBus Driver" on how to hand-configure your system. | ||
63 | 56 | ||
64 | IPMI defines a standard watchdog timer. You can enable this with the | 57 | IPMI defines a standard watchdog timer. You can enable this with the |
65 | 'IPMI Watchdog Timer' config option. If you compile the driver into | 58 | 'IPMI Watchdog Timer' config option. If you compile the driver into |
@@ -104,12 +97,7 @@ driver, each open file for this device ties in to the message handler | |||
104 | as an IPMI user. | 97 | as an IPMI user. |
105 | 98 | ||
106 | ipmi_si - A driver for various system interfaces. This supports KCS, | 99 | ipmi_si - A driver for various system interfaces. This supports KCS, |
107 | SMIC, and BT interfaces. Unless you have an SMBus interface or your | 100 | SMIC, and BT interfaces. |
108 | own custom interface, you probably need to use this. | ||
109 | |||
110 | ipmi_smb - A driver for accessing BMCs on the SMBus. It uses the | ||
111 | I2C kernel driver's SMBus interfaces to send and receive IPMI messages | ||
112 | over the SMBus. | ||
113 | 101 | ||
114 | ipmi_watchdog - IPMI requires systems to have a very capable watchdog | 102 | ipmi_watchdog - IPMI requires systems to have a very capable watchdog |
115 | timer. This driver implements the standard Linux watchdog timer | 103 | timer. This driver implements the standard Linux watchdog timer |
@@ -482,53 +470,6 @@ for specifying an interface. Note that when removing an interface, | |||
482 | only the first three parameters (si type, address type, and address) | 470 | only the first three parameters (si type, address type, and address) |
483 | are used for the comparison. Any options are ignored for removing. | 471 | are used for the comparison. Any options are ignored for removing. |
484 | 472 | ||
485 | The SMBus Driver | ||
486 | ---------------- | ||
487 | |||
488 | The SMBus driver allows up to 4 SMBus devices to be configured in the | ||
489 | system. By default, the driver will register any SMBus interfaces it finds | ||
490 | in the I2C address range of 0x20 to 0x4f on any adapter. You can change this | ||
491 | at module load time (for a module) with: | ||
492 | |||
493 | modprobe ipmi_smb.o | ||
494 | addr=<adapter1>,<i2caddr1>[,<adapter2>,<i2caddr2>[,...]] | ||
495 | dbg=<flags1>,<flags2>... | ||
496 | [defaultprobe=1] [dbg_probe=1] | ||
497 | |||
498 | The addresses are specified in pairs, the first is the adapter ID and the | ||
499 | second is the I2C address on that adapter. | ||
500 | |||
501 | The debug flags are bit flags for each BMC found, they are: | ||
502 | IPMI messages: 1, driver state: 2, timing: 4, I2C probe: 8 | ||
503 | |||
504 | Setting smb_defaultprobe to zero disabled the default probing of SMBus | ||
505 | interfaces at address range 0x20 to 0x4f. This means that only the | ||
506 | BMCs specified on the smb_addr line will be detected. | ||
507 | |||
508 | Setting smb_dbg_probe to 1 will enable debugging of the probing and | ||
509 | detection process for BMCs on the SMBusses. | ||
510 | |||
511 | Discovering the IPMI compliant BMC on the SMBus can cause devices | ||
512 | on the I2C bus to fail. The SMBus driver writes a "Get Device ID" IPMI | ||
513 | message as a block write to the I2C bus and waits for a response. | ||
514 | This action can be detrimental to some I2C devices. It is highly recommended | ||
515 | that the known I2c address be given to the SMBus driver in the smb_addr | ||
516 | parameter. The default address range will not be used when a smb_addr | ||
517 | parameter is provided. | ||
518 | |||
519 | When compiled into the kernel, the addresses can be specified on the | ||
520 | kernel command line as: | ||
521 | |||
522 | ipmb_smb.addr=<adapter1>,<i2caddr1>[,<adapter2>,<i2caddr2>[,...]] | ||
523 | ipmi_smb.dbg=<flags1>,<flags2>... | ||
524 | ipmi_smb.defaultprobe=0 ipmi_smb.dbg_probe=1 | ||
525 | |||
526 | These are the same options as on the module command line. | ||
527 | |||
528 | Note that you might need some I2C changes if CONFIG_IPMI_PANIC_EVENT | ||
529 | is enabled along with this, so the I2C driver knows to run to | ||
530 | completion during sending a panic event. | ||
531 | |||
532 | 473 | ||
533 | Other Pieces | 474 | Other Pieces |
534 | ------------ | 475 | ------------ |
diff --git a/Documentation/IRQ-domain.txt b/Documentation/IRQ-domain.txt index 1401cece745a..9bc95942ec22 100644 --- a/Documentation/IRQ-domain.txt +++ b/Documentation/IRQ-domain.txt | |||
@@ -7,6 +7,21 @@ systems with multiple interrupt controllers the kernel must ensure | |||
7 | that each one gets assigned non-overlapping allocations of Linux | 7 | that each one gets assigned non-overlapping allocations of Linux |
8 | IRQ numbers. | 8 | IRQ numbers. |
9 | 9 | ||
10 | The number of interrupt controllers registered as unique irqchips | ||
11 | show a rising tendency: for example subdrivers of different kinds | ||
12 | such as GPIO controllers avoid reimplementing identical callback | ||
13 | mechanisms as the IRQ core system by modelling their interrupt | ||
14 | handlers as irqchips, i.e. in effect cascading interrupt controllers. | ||
15 | |||
16 | Here the interrupt number loose all kind of correspondence to | ||
17 | hardware interrupt numbers: whereas in the past, IRQ numbers could | ||
18 | be chosen so they matched the hardware IRQ line into the root | ||
19 | interrupt controller (i.e. the component actually fireing the | ||
20 | interrupt line to the CPU) nowadays this number is just a number. | ||
21 | |||
22 | For this reason we need a mechanism to separate controller-local | ||
23 | interrupt numbers, called hardware irq's, from Linux IRQ numbers. | ||
24 | |||
10 | The irq_alloc_desc*() and irq_free_desc*() APIs provide allocation of | 25 | 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 | 26 | 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 | 27 | the controller-local IRQ (hwirq) number into the Linux IRQ number |
@@ -40,6 +55,10 @@ required hardware setup. | |||
40 | When an interrupt is received, irq_find_mapping() function should | 55 | When an interrupt is received, irq_find_mapping() function should |
41 | be used to find the Linux IRQ number from the hwirq number. | 56 | be used to find the Linux IRQ number from the hwirq number. |
42 | 57 | ||
58 | The irq_create_mapping() function must be called *atleast once* | ||
59 | before any call to irq_find_mapping(), lest the descriptor will not | ||
60 | be allocated. | ||
61 | |||
43 | If the driver has the Linux IRQ number or the irq_data pointer, and | 62 | 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 | 63 | 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. | 64 | callbacks) then it can be directly obtained from irq_data->hwirq. |
@@ -119,4 +138,17 @@ numbers. | |||
119 | 138 | ||
120 | Most users of legacy mappings should use irq_domain_add_simple() which | 139 | Most users of legacy mappings should use irq_domain_add_simple() which |
121 | will use a legacy domain only if an IRQ range is supplied by the | 140 | will use a legacy domain only if an IRQ range is supplied by the |
122 | system and will otherwise use a linear domain mapping. | 141 | system and will otherwise use a linear domain mapping. The semantics |
142 | of this call are such that if an IRQ range is specified then | ||
143 | descriptors will be allocated on-the-fly for it, and if no range is | ||
144 | specified it will fall through to irq_domain_add_linear() which meand | ||
145 | *no* irq descriptors will be allocated. | ||
146 | |||
147 | A typical use case for simple domains is where an irqchip provider | ||
148 | is supporting both dynamic and static IRQ assignments. | ||
149 | |||
150 | In order to avoid ending up in a situation where a linear domain is | ||
151 | used and no descriptor gets allocated it is very important to make sure | ||
152 | that the driver using the simple domain call irq_create_mapping() | ||
153 | before any irq_find_mapping() since the latter will actually work | ||
154 | for the static IRQ assignment case. | ||
diff --git a/Documentation/PCI/pci-iov-howto.txt b/Documentation/PCI/pci-iov-howto.txt index fc73ef5d65b8..cfaca7e69893 100644 --- a/Documentation/PCI/pci-iov-howto.txt +++ b/Documentation/PCI/pci-iov-howto.txt | |||
@@ -2,6 +2,9 @@ | |||
2 | Copyright (C) 2009 Intel Corporation | 2 | Copyright (C) 2009 Intel Corporation |
3 | Yu Zhao <yu.zhao@intel.com> | 3 | Yu Zhao <yu.zhao@intel.com> |
4 | 4 | ||
5 | Update: November 2012 | ||
6 | -- sysfs-based SRIOV enable-/disable-ment | ||
7 | Donald Dutile <ddutile@redhat.com> | ||
5 | 8 | ||
6 | 1. Overview | 9 | 1. Overview |
7 | 10 | ||
@@ -24,10 +27,21 @@ real existing PCI device. | |||
24 | 27 | ||
25 | 2.1 How can I enable SR-IOV capability | 28 | 2.1 How can I enable SR-IOV capability |
26 | 29 | ||
27 | The device driver (PF driver) will control the enabling and disabling | 30 | Multiple methods are available for SR-IOV enablement. |
28 | of the capability via API provided by SR-IOV core. If the hardware | 31 | In the first method, the device driver (PF driver) will control the |
29 | has SR-IOV capability, loading its PF driver would enable it and all | 32 | enabling and disabling of the capability via API provided by SR-IOV core. |
30 | VFs associated with the PF. | 33 | If the hardware has SR-IOV capability, loading its PF driver would |
34 | enable it and all VFs associated with the PF. Some PF drivers require | ||
35 | a module parameter to be set to determine the number of VFs to enable. | ||
36 | In the second method, a write to the sysfs file sriov_numvfs will | ||
37 | enable and disable the VFs associated with a PCIe PF. This method | ||
38 | enables per-PF, VF enable/disable values versus the first method, | ||
39 | which applies to all PFs of the same device. Additionally, the | ||
40 | PCI SRIOV core support ensures that enable/disable operations are | ||
41 | valid to reduce duplication in multiple drivers for the same | ||
42 | checks, e.g., check numvfs == 0 if enabling VFs, ensure | ||
43 | numvfs <= totalvfs. | ||
44 | The second method is the recommended method for new/future VF devices. | ||
31 | 45 | ||
32 | 2.2 How can I use the Virtual Functions | 46 | 2.2 How can I use the Virtual Functions |
33 | 47 | ||
@@ -40,13 +54,22 @@ requires device driver that is same as a normal PCI device's. | |||
40 | 3.1 SR-IOV API | 54 | 3.1 SR-IOV API |
41 | 55 | ||
42 | To enable SR-IOV capability: | 56 | To enable SR-IOV capability: |
57 | (a) For the first method, in the driver: | ||
43 | int pci_enable_sriov(struct pci_dev *dev, int nr_virtfn); | 58 | int pci_enable_sriov(struct pci_dev *dev, int nr_virtfn); |
44 | 'nr_virtfn' is number of VFs to be enabled. | 59 | 'nr_virtfn' is number of VFs to be enabled. |
60 | (b) For the second method, from sysfs: | ||
61 | echo 'nr_virtfn' > \ | ||
62 | /sys/bus/pci/devices/<DOMAIN:BUS:DEVICE.FUNCTION>/sriov_numvfs | ||
45 | 63 | ||
46 | To disable SR-IOV capability: | 64 | To disable SR-IOV capability: |
65 | (a) For the first method, in the driver: | ||
47 | void pci_disable_sriov(struct pci_dev *dev); | 66 | void pci_disable_sriov(struct pci_dev *dev); |
67 | (b) For the second method, from sysfs: | ||
68 | echo 0 > \ | ||
69 | /sys/bus/pci/devices/<DOMAIN:BUS:DEVICE.FUNCTION>/sriov_numvfs | ||
48 | 70 | ||
49 | To notify SR-IOV core of Virtual Function Migration: | 71 | To notify SR-IOV core of Virtual Function Migration: |
72 | (a) In the driver: | ||
50 | irqreturn_t pci_sriov_migration(struct pci_dev *dev); | 73 | irqreturn_t pci_sriov_migration(struct pci_dev *dev); |
51 | 74 | ||
52 | 3.2 Usage example | 75 | 3.2 Usage example |
@@ -88,6 +111,22 @@ static void dev_shutdown(struct pci_dev *dev) | |||
88 | ... | 111 | ... |
89 | } | 112 | } |
90 | 113 | ||
114 | static int dev_sriov_configure(struct pci_dev *dev, int numvfs) | ||
115 | { | ||
116 | if (numvfs > 0) { | ||
117 | ... | ||
118 | pci_enable_sriov(dev, numvfs); | ||
119 | ... | ||
120 | return numvfs; | ||
121 | } | ||
122 | if (numvfs == 0) { | ||
123 | .... | ||
124 | pci_disable_sriov(dev); | ||
125 | ... | ||
126 | return 0; | ||
127 | } | ||
128 | } | ||
129 | |||
91 | static struct pci_driver dev_driver = { | 130 | static struct pci_driver dev_driver = { |
92 | .name = "SR-IOV Physical Function driver", | 131 | .name = "SR-IOV Physical Function driver", |
93 | .id_table = dev_id_table, | 132 | .id_table = dev_id_table, |
@@ -96,4 +135,5 @@ static struct pci_driver dev_driver = { | |||
96 | .suspend = dev_suspend, | 135 | .suspend = dev_suspend, |
97 | .resume = dev_resume, | 136 | .resume = dev_resume, |
98 | .shutdown = dev_shutdown, | 137 | .shutdown = dev_shutdown, |
138 | .sriov_configure = dev_sriov_configure, | ||
99 | }; | 139 | }; |
diff --git a/Documentation/RCU/RTFP.txt b/Documentation/RCU/RTFP.txt index 7c1dfb19fc40..7f40c72a9c51 100644 --- a/Documentation/RCU/RTFP.txt +++ b/Documentation/RCU/RTFP.txt | |||
@@ -186,7 +186,7 @@ Bibtex Entries | |||
186 | 186 | ||
187 | @article{Kung80 | 187 | @article{Kung80 |
188 | ,author="H. T. Kung and Q. Lehman" | 188 | ,author="H. T. Kung and Q. Lehman" |
189 | ,title="Concurrent Maintenance of Binary Search Trees" | 189 | ,title="Concurrent Manipulation of Binary Search Trees" |
190 | ,Year="1980" | 190 | ,Year="1980" |
191 | ,Month="September" | 191 | ,Month="September" |
192 | ,journal="ACM Transactions on Database Systems" | 192 | ,journal="ACM Transactions on Database Systems" |
diff --git a/Documentation/RCU/checklist.txt b/Documentation/RCU/checklist.txt index cdb20d41a44a..31ef8fe07f82 100644 --- a/Documentation/RCU/checklist.txt +++ b/Documentation/RCU/checklist.txt | |||
@@ -271,15 +271,14 @@ over a rather long period of time, but improvements are always welcome! | |||
271 | The same cautions apply to call_rcu_bh() and call_rcu_sched(). | 271 | The same cautions apply to call_rcu_bh() and call_rcu_sched(). |
272 | 272 | ||
273 | 9. All RCU list-traversal primitives, which include | 273 | 9. All RCU list-traversal primitives, which include |
274 | rcu_dereference(), list_for_each_entry_rcu(), | 274 | rcu_dereference(), list_for_each_entry_rcu(), and |
275 | list_for_each_continue_rcu(), and list_for_each_safe_rcu(), | 275 | list_for_each_safe_rcu(), must be either within an RCU read-side |
276 | must be either within an RCU read-side critical section or | 276 | critical section or must be protected by appropriate update-side |
277 | must be protected by appropriate update-side locks. RCU | 277 | locks. RCU read-side critical sections are delimited by |
278 | read-side critical sections are delimited by rcu_read_lock() | 278 | rcu_read_lock() and rcu_read_unlock(), or by similar primitives |
279 | and rcu_read_unlock(), or by similar primitives such as | 279 | such as rcu_read_lock_bh() and rcu_read_unlock_bh(), in which |
280 | rcu_read_lock_bh() and rcu_read_unlock_bh(), in which case | 280 | case the matching rcu_dereference() primitive must be used in |
281 | the matching rcu_dereference() primitive must be used in order | 281 | order to keep lockdep happy, in this case, rcu_dereference_bh(). |
282 | to keep lockdep happy, in this case, rcu_dereference_bh(). | ||
283 | 282 | ||
284 | The reason that it is permissible to use RCU list-traversal | 283 | The reason that it is permissible to use RCU list-traversal |
285 | primitives when the update-side lock is held is that doing so | 284 | primitives when the update-side lock is held is that doing so |
diff --git a/Documentation/RCU/listRCU.txt b/Documentation/RCU/listRCU.txt index 4349c1487e91..adb5a3782846 100644 --- a/Documentation/RCU/listRCU.txt +++ b/Documentation/RCU/listRCU.txt | |||
@@ -205,7 +205,7 @@ RCU ("read-copy update") its name. The RCU code is as follows: | |||
205 | audit_copy_rule(&ne->rule, &e->rule); | 205 | audit_copy_rule(&ne->rule, &e->rule); |
206 | ne->rule.action = newaction; | 206 | ne->rule.action = newaction; |
207 | ne->rule.file_count = newfield_count; | 207 | ne->rule.file_count = newfield_count; |
208 | list_replace_rcu(e, ne); | 208 | list_replace_rcu(&e->list, &ne->list); |
209 | call_rcu(&e->rcu, audit_free_rule); | 209 | call_rcu(&e->rcu, audit_free_rule); |
210 | return 0; | 210 | return 0; |
211 | } | 211 | } |
diff --git a/Documentation/RCU/rcuref.txt b/Documentation/RCU/rcuref.txt index 4202ad093130..141d531aa14b 100644 --- a/Documentation/RCU/rcuref.txt +++ b/Documentation/RCU/rcuref.txt | |||
@@ -20,7 +20,7 @@ release_referenced() delete() | |||
20 | { { | 20 | { { |
21 | ... write_lock(&list_lock); | 21 | ... write_lock(&list_lock); |
22 | atomic_dec(&el->rc, relfunc) ... | 22 | atomic_dec(&el->rc, relfunc) ... |
23 | ... delete_element | 23 | ... remove_element |
24 | } write_unlock(&list_lock); | 24 | } write_unlock(&list_lock); |
25 | ... | 25 | ... |
26 | if (atomic_dec_and_test(&el->rc)) | 26 | if (atomic_dec_and_test(&el->rc)) |
@@ -52,7 +52,7 @@ release_referenced() delete() | |||
52 | { { | 52 | { { |
53 | ... spin_lock(&list_lock); | 53 | ... spin_lock(&list_lock); |
54 | if (atomic_dec_and_test(&el->rc)) ... | 54 | if (atomic_dec_and_test(&el->rc)) ... |
55 | call_rcu(&el->head, el_free); delete_element | 55 | call_rcu(&el->head, el_free); remove_element |
56 | ... spin_unlock(&list_lock); | 56 | ... spin_unlock(&list_lock); |
57 | } ... | 57 | } ... |
58 | if (atomic_dec_and_test(&el->rc)) | 58 | if (atomic_dec_and_test(&el->rc)) |
@@ -64,3 +64,60 @@ Sometimes, a reference to the element needs to be obtained in the | |||
64 | update (write) stream. In such cases, atomic_inc_not_zero() might be | 64 | update (write) stream. In such cases, atomic_inc_not_zero() might be |
65 | overkill, since we hold the update-side spinlock. One might instead | 65 | overkill, since we hold the update-side spinlock. One might instead |
66 | use atomic_inc() in such cases. | 66 | use atomic_inc() in such cases. |
67 | |||
68 | It is not always convenient to deal with "FAIL" in the | ||
69 | search_and_reference() code path. In such cases, the | ||
70 | atomic_dec_and_test() may be moved from delete() to el_free() | ||
71 | as follows: | ||
72 | |||
73 | 1. 2. | ||
74 | add() search_and_reference() | ||
75 | { { | ||
76 | alloc_object rcu_read_lock(); | ||
77 | ... search_for_element | ||
78 | atomic_set(&el->rc, 1); atomic_inc(&el->rc); | ||
79 | spin_lock(&list_lock); ... | ||
80 | |||
81 | add_element rcu_read_unlock(); | ||
82 | ... } | ||
83 | spin_unlock(&list_lock); 4. | ||
84 | } delete() | ||
85 | 3. { | ||
86 | release_referenced() spin_lock(&list_lock); | ||
87 | { ... | ||
88 | ... remove_element | ||
89 | if (atomic_dec_and_test(&el->rc)) spin_unlock(&list_lock); | ||
90 | kfree(el); ... | ||
91 | ... call_rcu(&el->head, el_free); | ||
92 | } ... | ||
93 | 5. } | ||
94 | void el_free(struct rcu_head *rhp) | ||
95 | { | ||
96 | release_referenced(); | ||
97 | } | ||
98 | |||
99 | The key point is that the initial reference added by add() is not removed | ||
100 | until after a grace period has elapsed following removal. This means that | ||
101 | search_and_reference() cannot find this element, which means that the value | ||
102 | of el->rc cannot increase. Thus, once it reaches zero, there are no | ||
103 | readers that can or ever will be able to reference the element. The | ||
104 | element can therefore safely be freed. This in turn guarantees that if | ||
105 | any reader finds the element, that reader may safely acquire a reference | ||
106 | without checking the value of the reference counter. | ||
107 | |||
108 | In cases where delete() can sleep, synchronize_rcu() can be called from | ||
109 | delete(), so that el_free() can be subsumed into delete as follows: | ||
110 | |||
111 | 4. | ||
112 | delete() | ||
113 | { | ||
114 | spin_lock(&list_lock); | ||
115 | ... | ||
116 | remove_element | ||
117 | spin_unlock(&list_lock); | ||
118 | ... | ||
119 | synchronize_rcu(); | ||
120 | if (atomic_dec_and_test(&el->rc)) | ||
121 | kfree(el); | ||
122 | ... | ||
123 | } | ||
diff --git a/Documentation/RCU/trace.txt b/Documentation/RCU/trace.txt index 672d19083252..c776968f4463 100644 --- a/Documentation/RCU/trace.txt +++ b/Documentation/RCU/trace.txt | |||
@@ -10,51 +10,63 @@ for rcutree and next for rcutiny. | |||
10 | 10 | ||
11 | CONFIG_TREE_RCU and CONFIG_TREE_PREEMPT_RCU debugfs Files and Formats | 11 | CONFIG_TREE_RCU and CONFIG_TREE_PREEMPT_RCU debugfs Files and Formats |
12 | 12 | ||
13 | These implementations of RCU provides several debugfs files under the | 13 | These implementations of RCU provide several debugfs directories under the |
14 | top-level directory "rcu": | 14 | top-level directory "rcu": |
15 | 15 | ||
16 | rcu/rcudata: | 16 | rcu/rcu_bh |
17 | rcu/rcu_preempt | ||
18 | rcu/rcu_sched | ||
19 | |||
20 | Each directory contains files for the corresponding flavor of RCU. | ||
21 | Note that rcu/rcu_preempt is only present for CONFIG_TREE_PREEMPT_RCU. | ||
22 | For CONFIG_TREE_RCU, the RCU flavor maps onto the RCU-sched flavor, | ||
23 | so that activity for both appears in rcu/rcu_sched. | ||
24 | |||
25 | In addition, the following file appears in the top-level directory: | ||
26 | rcu/rcutorture. This file displays rcutorture test progress. The output | ||
27 | of "cat rcu/rcutorture" looks as follows: | ||
28 | |||
29 | rcutorture test sequence: 0 (test in progress) | ||
30 | rcutorture update version number: 615 | ||
31 | |||
32 | The first line shows the number of rcutorture tests that have completed | ||
33 | since boot. If a test is currently running, the "(test in progress)" | ||
34 | string will appear as shown above. The second line shows the number of | ||
35 | update cycles that the current test has started, or zero if there is | ||
36 | no test in progress. | ||
37 | |||
38 | |||
39 | Within each flavor directory (rcu/rcu_bh, rcu/rcu_sched, and possibly | ||
40 | also rcu/rcu_preempt) the following files will be present: | ||
41 | |||
42 | rcudata: | ||
17 | Displays fields in struct rcu_data. | 43 | Displays fields in struct rcu_data. |
18 | rcu/rcudata.csv: | 44 | rcuexp: |
19 | Comma-separated values spreadsheet version of rcudata. | 45 | Displays statistics for expedited grace periods. |
20 | rcu/rcugp: | 46 | rcugp: |
21 | Displays grace-period counters. | 47 | Displays grace-period counters. |
22 | rcu/rcuhier: | 48 | rcuhier: |
23 | Displays the struct rcu_node hierarchy. | 49 | Displays the struct rcu_node hierarchy. |
24 | rcu/rcu_pending: | 50 | rcu_pending: |
25 | Displays counts of the reasons rcu_pending() decided that RCU had | 51 | Displays counts of the reasons rcu_pending() decided that RCU had |
26 | work to do. | 52 | work to do. |
27 | rcu/rcutorture: | 53 | rcuboost: |
28 | Displays rcutorture test progress. | ||
29 | rcu/rcuboost: | ||
30 | Displays RCU boosting statistics. Only present if | 54 | Displays RCU boosting statistics. Only present if |
31 | CONFIG_RCU_BOOST=y. | 55 | CONFIG_RCU_BOOST=y. |
32 | 56 | ||
33 | The output of "cat rcu/rcudata" looks as follows: | 57 | The output of "cat rcu/rcu_preempt/rcudata" looks as follows: |
34 | 58 | ||
35 | rcu_sched: | 59 | 0!c=30455 g=30456 pq=1 qp=1 dt=126535/140000000000000/0 df=2002 of=4 ql=0/0 qs=N... b=10 ci=74572 nci=0 co=1131 ca=716 |
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 | 60 | 1!c=30719 g=30720 pq=1 qp=0 dt=132007/140000000000000/0 df=1874 of=10 ql=0/0 qs=N... b=10 ci=123209 nci=0 co=685 ca=982 |
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 | 61 | 2!c=30150 g=30151 pq=1 qp=1 dt=138537/140000000000000/0 df=1707 of=8 ql=0/0 qs=N... b=10 ci=80132 nci=0 co=1328 ca=1458 |
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 | 62 | 3 c=31249 g=31250 pq=1 qp=0 dt=107255/140000000000000/0 df=1749 of=6 ql=0/450 qs=NRW. b=10 ci=151700 nci=0 co=509 ca=622 |
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 | 63 | 4!c=29502 g=29503 pq=1 qp=1 dt=83647/140000000000000/0 df=965 of=5 ql=0/0 qs=N... b=10 ci=65643 nci=0 co=1373 ca=1521 |
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 | 64 | 5 c=31201 g=31202 pq=1 qp=1 dt=70422/0/0 df=535 of=7 ql=0/0 qs=.... b=10 ci=58500 nci=0 co=764 ca=698 |
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 | 65 | 6!c=30253 g=30254 pq=1 qp=1 dt=95363/140000000000000/0 df=780 of=5 ql=0/0 qs=N... b=10 ci=100607 nci=0 co=1414 ca=1353 |
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 | 66 | 7 c=31178 g=31178 pq=1 qp=0 dt=91536/0/0 df=547 of=4 ql=0/0 qs=.... b=10 ci=109819 nci=0 co=1115 ca=969 |
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 | 67 | |
44 | rcu_bh: | 68 | This file has one line per CPU, or eight for this 8-CPU system. |
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 | 69 | The fields are as follows: |
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 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 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 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 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 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 ql=0 qs=.... kt=0/W/7 ktl=cf15 b=10 ci=0 co=0 ca=0 | ||
53 | |||
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 | ||
56 | additional section for rcu_preempt. Each section has one line per CPU, | ||
57 | or eight for this 8-CPU system. The fields are as follows: | ||
58 | 70 | ||
59 | o The number at the beginning of each line is the CPU number. | 71 | o The number at the beginning of each line is the CPU number. |
60 | CPUs numbers followed by an exclamation mark are offline, | 72 | CPUs numbers followed by an exclamation mark are offline, |
@@ -64,11 +76,13 @@ o The number at the beginning of each line is the CPU number. | |||
64 | substantially larger than the number of actual CPUs. | 76 | substantially larger than the number of actual CPUs. |
65 | 77 | ||
66 | o "c" is the count of grace periods that this CPU believes have | 78 | o "c" is the count of grace periods that this CPU believes have |
67 | completed. Offlined CPUs and CPUs in dynticks idle mode may | 79 | completed. Offlined CPUs and CPUs in dynticks idle mode may lag |
68 | lag quite a ways behind, for example, CPU 6 under "rcu_sched" | 80 | quite a ways behind, for example, CPU 4 under "rcu_sched" above, |
69 | above, which has been offline through not quite 40,000 RCU grace | 81 | which has been offline through 16 RCU grace periods. It is not |
70 | periods. It is not unusual to see CPUs lagging by thousands of | 82 | unusual to see offline CPUs lagging by thousands of grace periods. |
71 | grace periods. | 83 | Note that although the grace-period number is an unsigned long, |
84 | it is printed out as a signed long to allow more human-friendly | ||
85 | representation near boot time. | ||
72 | 86 | ||
73 | o "g" is the count of grace periods that this CPU believes have | 87 | o "g" is the count of grace periods that this CPU believes have |
74 | started. Again, offlined CPUs and CPUs in dynticks idle mode | 88 | started. Again, offlined CPUs and CPUs in dynticks idle mode |
@@ -84,30 +98,25 @@ o "pq" indicates that this CPU has passed through a quiescent state | |||
84 | CPU has not yet reported that fact, (2) some other CPU has not | 98 | CPU has not yet reported that fact, (2) some other CPU has not |
85 | yet reported for this grace period, or (3) both. | 99 | yet reported for this grace period, or (3) both. |
86 | 100 | ||
87 | o "pgp" indicates which grace period the last-observed quiescent | ||
88 | state for this CPU corresponds to. This is important for handling | ||
89 | the race between CPU 0 reporting an extended dynticks-idle | ||
90 | quiescent state for CPU 1 and CPU 1 suddenly waking up and | ||
91 | reporting its own quiescent state. If CPU 1 was the last CPU | ||
92 | for the current grace period, then the CPU that loses this race | ||
93 | will attempt to incorrectly mark CPU 1 as having checked in for | ||
94 | the next grace period! | ||
95 | |||
96 | o "qp" indicates that RCU still expects a quiescent state from | 101 | o "qp" indicates that RCU still expects a quiescent state from |
97 | this CPU. Offlined CPUs and CPUs in dyntick idle mode might | 102 | this CPU. Offlined CPUs and CPUs in dyntick idle mode might |
98 | well have qp=1, which is OK: RCU is still ignoring them. | 103 | well have qp=1, which is OK: RCU is still ignoring them. |
99 | 104 | ||
100 | o "dt" is the current value of the dyntick counter that is incremented | 105 | o "dt" is the current value of the dyntick counter that is incremented |
101 | when entering or leaving dynticks idle state, either by the | 106 | when entering or leaving idle, either due to a context switch or |
102 | scheduler or by irq. This number is even if the CPU is in | 107 | due to an interrupt. This number is even if the CPU is in idle |
103 | dyntick idle mode and odd otherwise. The number after the first | 108 | from RCU's viewpoint and odd otherwise. The number after the |
104 | "/" is the interrupt nesting depth when in dyntick-idle state, | 109 | first "/" is the interrupt nesting depth when in idle state, |
105 | or one greater than the interrupt-nesting depth otherwise. | 110 | or a large number added to the interrupt-nesting depth when |
106 | The number after the second "/" is the NMI nesting depth. | 111 | running a non-idle task. Some architectures do not accurately |
112 | count interrupt nesting when running in non-idle kernel context, | ||
113 | which can result in interesting anomalies such as negative | ||
114 | interrupt-nesting levels. The number after the second "/" | ||
115 | is the NMI nesting depth. | ||
107 | 116 | ||
108 | o "df" is the number of times that some other CPU has forced a | 117 | o "df" is the number of times that some other CPU has forced a |
109 | quiescent state on behalf of this CPU due to this CPU being in | 118 | quiescent state on behalf of this CPU due to this CPU being in |
110 | dynticks-idle state. | 119 | idle state. |
111 | 120 | ||
112 | o "of" is the number of times that some other CPU has forced a | 121 | o "of" is the number of times that some other CPU has forced a |
113 | quiescent state on behalf of this CPU due to this CPU being | 122 | quiescent state on behalf of this CPU due to this CPU being |
@@ -120,9 +129,13 @@ o "of" is the number of times that some other CPU has forced a | |||
120 | error, so it makes sense to err conservatively. | 129 | error, so it makes sense to err conservatively. |
121 | 130 | ||
122 | o "ql" is the number of RCU callbacks currently residing on | 131 | o "ql" is the number of RCU callbacks currently residing on |
123 | this CPU. This is the total number of callbacks, regardless | 132 | this CPU. The first number is the number of "lazy" callbacks |
124 | of what state they are in (new, waiting for grace period to | 133 | that are known to RCU to only be freeing memory, and the number |
125 | start, waiting for grace period to end, ready to invoke). | 134 | after the "/" is the total number of callbacks, lazy or not. |
135 | These counters count callbacks regardless of what phase of | ||
136 | grace-period processing that they are in (new, waiting for | ||
137 | grace period to start, waiting for grace period to end, ready | ||
138 | to invoke). | ||
126 | 139 | ||
127 | o "qs" gives an indication of the state of the callback queue | 140 | o "qs" gives an indication of the state of the callback queue |
128 | with four characters: | 141 | with four characters: |
@@ -150,6 +163,43 @@ o "qs" gives an indication of the state of the callback queue | |||
150 | If there are no callbacks in a given one of the above states, | 163 | If there are no callbacks in a given one of the above states, |
151 | the corresponding character is replaced by ".". | 164 | the corresponding character is replaced by ".". |
152 | 165 | ||
166 | o "b" is the batch limit for this CPU. If more than this number | ||
167 | of RCU callbacks is ready to invoke, then the remainder will | ||
168 | be deferred. | ||
169 | |||
170 | o "ci" is the number of RCU callbacks that have been invoked for | ||
171 | this CPU. Note that ci+nci+ql is the number of callbacks that have | ||
172 | been registered in absence of CPU-hotplug activity. | ||
173 | |||
174 | o "nci" is the number of RCU callbacks that have been offloaded from | ||
175 | this CPU. This will always be zero unless the kernel was built | ||
176 | with CONFIG_RCU_NOCB_CPU=y and the "rcu_nocbs=" kernel boot | ||
177 | parameter was specified. | ||
178 | |||
179 | o "co" is the number of RCU callbacks that have been orphaned due to | ||
180 | this CPU going offline. These orphaned callbacks have been moved | ||
181 | to an arbitrarily chosen online CPU. | ||
182 | |||
183 | o "ca" is the number of RCU callbacks that have been adopted by this | ||
184 | CPU due to other CPUs going offline. Note that ci+co-ca+ql is | ||
185 | the number of RCU callbacks registered on this CPU. | ||
186 | |||
187 | |||
188 | Kernels compiled with CONFIG_RCU_BOOST=y display the following from | ||
189 | /debug/rcu/rcu_preempt/rcudata: | ||
190 | |||
191 | 0!c=12865 g=12866 pq=1 qp=1 dt=83113/140000000000000/0 df=288 of=11 ql=0/0 qs=N... kt=0/O ktl=944 b=10 ci=60709 nci=0 co=748 ca=871 | ||
192 | 1 c=14407 g=14408 pq=1 qp=0 dt=100679/140000000000000/0 df=378 of=7 ql=0/119 qs=NRW. kt=0/W ktl=9b6 b=10 ci=109740 nci=0 co=589 ca=485 | ||
193 | 2 c=14407 g=14408 pq=1 qp=0 dt=105486/0/0 df=90 of=9 ql=0/89 qs=NRW. kt=0/W ktl=c0c b=10 ci=83113 nci=0 co=533 ca=490 | ||
194 | 3 c=14407 g=14408 pq=1 qp=0 dt=107138/0/0 df=142 of=8 ql=0/188 qs=NRW. kt=0/W ktl=b96 b=10 ci=121114 nci=0 co=426 ca=290 | ||
195 | 4 c=14405 g=14406 pq=1 qp=1 dt=50238/0/0 df=706 of=7 ql=0/0 qs=.... kt=0/W ktl=812 b=10 ci=34929 nci=0 co=643 ca=114 | ||
196 | 5!c=14168 g=14169 pq=1 qp=0 dt=45465/140000000000000/0 df=161 of=11 ql=0/0 qs=N... kt=0/O ktl=b4d b=10 ci=47712 nci=0 co=677 ca=722 | ||
197 | 6 c=14404 g=14405 pq=1 qp=0 dt=59454/0/0 df=94 of=6 ql=0/0 qs=.... kt=0/W ktl=e57 b=10 ci=55597 nci=0 co=701 ca=811 | ||
198 | 7 c=14407 g=14408 pq=1 qp=1 dt=68850/0/0 df=31 of=8 ql=0/0 qs=.... kt=0/W ktl=14bd b=10 ci=77475 nci=0 co=508 ca=1042 | ||
199 | |||
200 | This is similar to the output discussed above, but contains the following | ||
201 | additional fields: | ||
202 | |||
153 | o "kt" is the per-CPU kernel-thread state. The digit preceding | 203 | o "kt" is the per-CPU kernel-thread state. The digit preceding |
154 | the first slash is zero if there is no work pending and 1 | 204 | the first slash is zero if there is no work pending and 1 |
155 | otherwise. The character between the first pair of slashes is | 205 | otherwise. The character between the first pair of slashes is |
@@ -184,35 +234,51 @@ o "ktl" is the low-order 16 bits (in hexadecimal) of the count of | |||
184 | 234 | ||
185 | This field is displayed only for CONFIG_RCU_BOOST kernels. | 235 | This field is displayed only for CONFIG_RCU_BOOST kernels. |
186 | 236 | ||
187 | o "b" is the batch limit for this CPU. If more than this number | ||
188 | of RCU callbacks is ready to invoke, then the remainder will | ||
189 | be deferred. | ||
190 | 237 | ||
191 | o "ci" is the number of RCU callbacks that have been invoked for | 238 | The output of "cat rcu/rcu_preempt/rcuexp" looks as follows: |
192 | this CPU. Note that ci+ql is the number of callbacks that have | ||
193 | been registered in absence of CPU-hotplug activity. | ||
194 | 239 | ||
195 | o "co" is the number of RCU callbacks that have been orphaned due to | 240 | s=21872 d=21872 w=0 tf=0 wd1=0 wd2=0 n=0 sc=21872 dt=21872 dl=0 dx=21872 |
196 | this CPU going offline. These orphaned callbacks have been moved | 241 | |
197 | to an arbitrarily chosen online CPU. | 242 | These fields are as follows: |
243 | |||
244 | o "s" is the starting sequence number. | ||
198 | 245 | ||
199 | o "ca" is the number of RCU callbacks that have been adopted due to | 246 | o "d" is the ending sequence number. When the starting and ending |
200 | other CPUs going offline. Note that ci+co-ca+ql is the number of | 247 | numbers differ, there is an expedited grace period in progress. |
201 | RCU callbacks registered on this CPU. | ||
202 | 248 | ||
203 | There is also an rcu/rcudata.csv file with the same information in | 249 | o "w" is the number of times that the sequence numbers have been |
204 | comma-separated-variable spreadsheet format. | 250 | in danger of wrapping. |
205 | 251 | ||
252 | o "tf" is the number of times that contention has resulted in a | ||
253 | failure to begin an expedited grace period. | ||
206 | 254 | ||
207 | The output of "cat rcu/rcugp" looks as follows: | 255 | o "wd1" and "wd2" are the number of times that an attempt to |
256 | start an expedited grace period found that someone else had | ||
257 | completed an expedited grace period that satisfies the | ||
258 | attempted request. "Our work is done." | ||
208 | 259 | ||
209 | rcu_sched: completed=33062 gpnum=33063 | 260 | o "n" is number of times that contention was so great that |
210 | rcu_bh: completed=464 gpnum=464 | 261 | the request was demoted from an expedited grace period to |
262 | a normal grace period. | ||
263 | |||
264 | o "sc" is the number of times that the attempt to start a | ||
265 | new expedited grace period succeeded. | ||
266 | |||
267 | o "dt" is the number of times that we attempted to update | ||
268 | the "d" counter. | ||
269 | |||
270 | o "dl" is the number of times that we failed to update the "d" | ||
271 | counter. | ||
272 | |||
273 | o "dx" is the number of times that we succeeded in updating | ||
274 | the "d" counter. | ||
211 | 275 | ||
212 | Again, this output is for both "rcu_sched" and "rcu_bh". Note that | 276 | |
213 | kernels built with CONFIG_TREE_PREEMPT_RCU will have an additional | 277 | The output of "cat rcu/rcu_preempt/rcugp" looks as follows: |
214 | "rcu_preempt" line. The fields are taken from the rcu_state structure, | 278 | |
215 | and are as follows: | 279 | completed=31249 gpnum=31250 age=1 max=18 |
280 | |||
281 | These fields are taken from the rcu_state structure, and are as follows: | ||
216 | 282 | ||
217 | o "completed" is the number of grace periods that have completed. | 283 | o "completed" is the number of grace periods that have completed. |
218 | It is comparable to the "c" field from rcu/rcudata in that a | 284 | It is comparable to the "c" field from rcu/rcudata in that a |
@@ -220,44 +286,42 @@ o "completed" is the number of grace periods that have completed. | |||
220 | that the corresponding RCU grace period has completed. | 286 | that the corresponding RCU grace period has completed. |
221 | 287 | ||
222 | o "gpnum" is the number of grace periods that have started. It is | 288 | o "gpnum" is the number of grace periods that have started. It is |
223 | comparable to the "g" field from rcu/rcudata in that a CPU | 289 | similarly comparable to the "g" field from rcu/rcudata in that |
224 | whose "g" field matches the value of "gpnum" is aware that the | 290 | a CPU whose "g" field matches the value of "gpnum" is aware that |
225 | corresponding RCU grace period has started. | 291 | the corresponding RCU grace period has started. |
292 | |||
293 | If these two fields are equal, then there is no grace period | ||
294 | in progress, in other words, RCU is idle. On the other hand, | ||
295 | if the two fields differ (as they are above), then an RCU grace | ||
296 | period is in progress. | ||
226 | 297 | ||
227 | If these two fields are equal (as they are for "rcu_bh" above), | 298 | o "age" is the number of jiffies that the current grace period |
228 | then there is no grace period in progress, in other words, RCU | 299 | has extended for, or zero if there is no grace period currently |
229 | is idle. On the other hand, if the two fields differ (as they | 300 | in effect. |
230 | do for "rcu_sched" above), then an RCU grace period is in progress. | ||
231 | 301 | ||
302 | o "max" is the age in jiffies of the longest-duration grace period | ||
303 | thus far. | ||
232 | 304 | ||
233 | The output of "cat rcu/rcuhier" looks as follows, with very long lines: | 305 | The output of "cat rcu/rcu_preempt/rcuhier" looks as follows: |
234 | 306 | ||
235 | c=6902 g=6903 s=2 jfq=3 j=72c7 nfqs=13142/nfqsng=0(13142) fqlh=6 | 307 | c=14407 g=14408 s=0 jfq=2 j=c863 nfqs=12040/nfqsng=0(12040) fqlh=1051 oqlen=0/0 |
236 | 1/1 ..>. 0:127 ^0 | 308 | 3/3 ..>. 0:7 ^0 |
237 | 3/3 ..>. 0:35 ^0 0/0 ..>. 36:71 ^1 0/0 ..>. 72:107 ^2 0/0 ..>. 108:127 ^3 | 309 | e/e ..>. 0:3 ^0 d/d ..>. 4:7 ^1 |
238 | 3/3f ..>. 0:5 ^0 2/3 ..>. 6:11 ^1 0/0 ..>. 12:17 ^2 0/0 ..>. 18:23 ^3 0/0 ..>. 24:29 ^4 0/0 ..>. 30:35 ^5 0/0 ..>. 36:41 ^0 0/0 ..>. 42:47 ^1 0/0 ..>. 48:53 ^2 0/0 ..>. 54:59 ^3 0/0 ..>. 60:65 ^4 0/0 ..>. 66:71 ^5 0/0 ..>. 72:77 ^0 0/0 ..>. 78:83 ^1 0/0 ..>. 84:89 ^2 0/0 ..>. 90:95 ^3 0/0 ..>. 96:101 ^4 0/0 ..>. 102:107 ^5 0/0 ..>. 108:113 ^0 0/0 ..>. 114:119 ^1 0/0 ..>. 120:125 ^2 0/0 ..>. 126:127 ^3 | ||
239 | rcu_bh: | ||
240 | c=-226 g=-226 s=1 jfq=-5701 j=72c7 nfqs=88/nfqsng=0(88) fqlh=0 | ||
241 | 0/1 ..>. 0:127 ^0 | ||
242 | 0/3 ..>. 0:35 ^0 0/0 ..>. 36:71 ^1 0/0 ..>. 72:107 ^2 0/0 ..>. 108:127 ^3 | ||
243 | 0/3f ..>. 0:5 ^0 0/3 ..>. 6:11 ^1 0/0 ..>. 12:17 ^2 0/0 ..>. 18:23 ^3 0/0 ..>. 24:29 ^4 0/0 ..>. 30:35 ^5 0/0 ..>. 36:41 ^0 0/0 ..>. 42:47 ^1 0/0 ..>. 48:53 ^2 0/0 ..>. 54:59 ^3 0/0 ..>. 60:65 ^4 0/0 ..>. 66:71 ^5 0/0 ..>. 72:77 ^0 0/0 ..>. 78:83 ^1 0/0 ..>. 84:89 ^2 0/0 ..>. 90:95 ^3 0/0 ..>. 96:101 ^4 0/0 ..>. 102:107 ^5 0/0 ..>. 108:113 ^0 0/0 ..>. 114:119 ^1 0/0 ..>. 120:125 ^2 0/0 ..>. 126:127 ^3 | ||
244 | 310 | ||
245 | This is once again split into "rcu_sched" and "rcu_bh" portions, | 311 | The fields are as follows: |
246 | and CONFIG_TREE_PREEMPT_RCU kernels will again have an additional | ||
247 | "rcu_preempt" section. The fields are as follows: | ||
248 | 312 | ||
249 | o "c" is exactly the same as "completed" under rcu/rcugp. | 313 | o "c" is exactly the same as "completed" under rcu/rcu_preempt/rcugp. |
250 | 314 | ||
251 | o "g" is exactly the same as "gpnum" under rcu/rcugp. | 315 | o "g" is exactly the same as "gpnum" under rcu/rcu_preempt/rcugp. |
252 | 316 | ||
253 | o "s" is the "signaled" state that drives force_quiescent_state()'s | 317 | o "s" is the current state of the force_quiescent_state() |
254 | state machine. | 318 | state machine. |
255 | 319 | ||
256 | o "jfq" is the number of jiffies remaining for this grace period | 320 | o "jfq" is the number of jiffies remaining for this grace period |
257 | before force_quiescent_state() is invoked to help push things | 321 | before force_quiescent_state() is invoked to help push things |
258 | along. Note that CPUs in dyntick-idle mode throughout the grace | 322 | along. Note that CPUs in idle mode throughout the grace period |
259 | period will not report on their own, but rather must be check by | 323 | will not report on their own, but rather must be check by some |
260 | some other CPU via force_quiescent_state(). | 324 | other CPU via force_quiescent_state(). |
261 | 325 | ||
262 | o "j" is the low-order four hex digits of the jiffies counter. | 326 | o "j" is the low-order four hex digits of the jiffies counter. |
263 | Yes, Paul did run into a number of problems that turned out to | 327 | Yes, Paul did run into a number of problems that turned out to |
@@ -268,7 +332,8 @@ o "nfqs" is the number of calls to force_quiescent_state() since | |||
268 | 332 | ||
269 | o "nfqsng" is the number of useless calls to force_quiescent_state(), | 333 | o "nfqsng" is the number of useless calls to force_quiescent_state(), |
270 | where there wasn't actually a grace period active. This can | 334 | where there wasn't actually a grace period active. This can |
271 | happen due to races. The number in parentheses is the difference | 335 | no longer happen due to grace-period processing being pushed |
336 | into a kthread. The number in parentheses is the difference | ||
272 | between "nfqs" and "nfqsng", or the number of times that | 337 | between "nfqs" and "nfqsng", or the number of times that |
273 | force_quiescent_state() actually did some real work. | 338 | force_quiescent_state() actually did some real work. |
274 | 339 | ||
@@ -276,28 +341,27 @@ o "fqlh" is the number of calls to force_quiescent_state() that | |||
276 | exited immediately (without even being counted in nfqs above) | 341 | exited immediately (without even being counted in nfqs above) |
277 | due to contention on ->fqslock. | 342 | due to contention on ->fqslock. |
278 | 343 | ||
279 | o Each element of the form "1/1 0:127 ^0" represents one struct | 344 | o Each element of the form "3/3 ..>. 0:7 ^0" represents one rcu_node |
280 | rcu_node. Each line represents one level of the hierarchy, from | 345 | structure. Each line represents one level of the hierarchy, |
281 | root to leaves. It is best to think of the rcu_data structures | 346 | from root to leaves. It is best to think of the rcu_data |
282 | as forming yet another level after the leaves. Note that there | 347 | structures as forming yet another level after the leaves. |
283 | might be either one, two, or three levels of rcu_node structures, | 348 | Note that there might be either one, two, three, or even four |
284 | depending on the relationship between CONFIG_RCU_FANOUT and | 349 | levels of rcu_node structures, depending on the relationship |
285 | CONFIG_NR_CPUS. | 350 | between CONFIG_RCU_FANOUT, CONFIG_RCU_FANOUT_LEAF (possibly |
351 | adjusted using the rcu_fanout_leaf kernel boot parameter), and | ||
352 | CONFIG_NR_CPUS (possibly adjusted using the nr_cpu_ids count of | ||
353 | possible CPUs for the booting hardware). | ||
286 | 354 | ||
287 | o The numbers separated by the "/" are the qsmask followed | 355 | o The numbers separated by the "/" are the qsmask followed |
288 | by the qsmaskinit. The qsmask will have one bit | 356 | by the qsmaskinit. The qsmask will have one bit |
289 | set for each entity in the next lower level that | 357 | set for each entity in the next lower level that has |
290 | has not yet checked in for the current grace period. | 358 | not yet checked in for the current grace period ("e" |
359 | indicating CPUs 5, 6, and 7 in the example above). | ||
291 | The qsmaskinit will have one bit for each entity that is | 360 | The qsmaskinit will have one bit for each entity that is |
292 | currently expected to check in during each grace period. | 361 | currently expected to check in during each grace period. |
293 | The value of qsmaskinit is assigned to that of qsmask | 362 | The value of qsmaskinit is assigned to that of qsmask |
294 | at the beginning of each grace period. | 363 | at the beginning of each grace period. |
295 | 364 | ||
296 | For example, for "rcu_sched", the qsmask of the first | ||
297 | entry of the lowest level is 0x14, meaning that we | ||
298 | are still waiting for CPUs 2 and 4 to check in for the | ||
299 | current grace period. | ||
300 | |||
301 | o The characters separated by the ">" indicate the state | 365 | o The characters separated by the ">" indicate the state |
302 | of the blocked-tasks lists. A "G" preceding the ">" | 366 | of the blocked-tasks lists. A "G" preceding the ">" |
303 | indicates that at least one task blocked in an RCU | 367 | indicates that at least one task blocked in an RCU |
@@ -312,48 +376,39 @@ o Each element of the form "1/1 0:127 ^0" represents one struct | |||
312 | A "." character appears if the corresponding condition | 376 | A "." character appears if the corresponding condition |
313 | does not hold, so that "..>." indicates that no tasks | 377 | does not hold, so that "..>." indicates that no tasks |
314 | are blocked. In contrast, "GE>T" indicates maximal | 378 | are blocked. In contrast, "GE>T" indicates maximal |
315 | inconvenience from blocked tasks. | 379 | inconvenience from blocked tasks. CONFIG_TREE_RCU |
380 | builds of the kernel will always show "..>.". | ||
316 | 381 | ||
317 | o The numbers separated by the ":" are the range of CPUs | 382 | o The numbers separated by the ":" are the range of CPUs |
318 | served by this struct rcu_node. This can be helpful | 383 | served by this struct rcu_node. This can be helpful |
319 | in working out how the hierarchy is wired together. | 384 | in working out how the hierarchy is wired together. |
320 | 385 | ||
321 | For example, the first entry at the lowest level shows | 386 | For example, the example rcu_node structure shown above |
322 | "0:5", indicating that it covers CPUs 0 through 5. | 387 | has "0:7", indicating that it covers CPUs 0 through 7. |
323 | 388 | ||
324 | o The number after the "^" indicates the bit in the | 389 | o The number after the "^" indicates the bit in the |
325 | next higher level rcu_node structure that this | 390 | next higher level rcu_node structure that this rcu_node |
326 | rcu_node structure corresponds to. | 391 | structure corresponds to. For example, the "d/d ..>. 4:7 |
327 | 392 | ^1" has a "1" in this position, indicating that it | |
328 | For example, the first entry at the lowest level shows | 393 | corresponds to the "1" bit in the "3" shown in the |
329 | "^0", indicating that it corresponds to bit zero in | 394 | "3/3 ..>. 0:7 ^0" entry on the next level up. |
330 | the first entry at the middle level. | 395 | |
331 | 396 | ||
332 | 397 | The output of "cat rcu/rcu_sched/rcu_pending" looks as follows: | |
333 | The output of "cat rcu/rcu_pending" looks as follows: | 398 | |
334 | 399 | 0!np=26111 qsp=29 rpq=5386 cbr=1 cng=570 gpc=3674 gps=577 nn=15903 | |
335 | rcu_sched: | 400 | 1!np=28913 qsp=35 rpq=6097 cbr=1 cng=448 gpc=3700 gps=554 nn=18113 |
336 | 0 np=255892 qsp=53936 rpq=85 cbr=0 cng=14417 gpc=10033 gps=24320 nn=146741 | 401 | 2!np=32740 qsp=37 rpq=6202 cbr=0 cng=476 gpc=4627 gps=546 nn=20889 |
337 | 1 np=261224 qsp=54638 rpq=33 cbr=0 cng=25723 gpc=16310 gps=2849 nn=155792 | 402 | 3 np=23679 qsp=22 rpq=5044 cbr=1 cng=415 gpc=3403 gps=347 nn=14469 |
338 | 2 np=237496 qsp=49664 rpq=23 cbr=0 cng=2762 gpc=45478 gps=1762 nn=136629 | 403 | 4!np=30714 qsp=4 rpq=5574 cbr=0 cng=528 gpc=3931 gps=639 nn=20042 |
339 | 3 np=236249 qsp=48766 rpq=98 cbr=0 cng=286 gpc=48049 gps=1218 nn=137723 | 404 | 5 np=28910 qsp=2 rpq=5246 cbr=0 cng=428 gpc=4105 gps=709 nn=18422 |
340 | 4 np=221310 qsp=46850 rpq=7 cbr=0 cng=26 gpc=43161 gps=4634 nn=123110 | 405 | 6!np=38648 qsp=5 rpq=7076 cbr=0 cng=840 gpc=4072 gps=961 nn=25699 |
341 | 5 np=237332 qsp=48449 rpq=9 cbr=0 cng=54 gpc=47920 gps=3252 nn=137456 | 406 | 7 np=37275 qsp=2 rpq=6873 cbr=0 cng=868 gpc=3416 gps=971 nn=25147 |
342 | 6 np=219995 qsp=46718 rpq=12 cbr=0 cng=50 gpc=42098 gps=6093 nn=120834 | 407 | |
343 | 7 np=249893 qsp=49390 rpq=42 cbr=0 cng=72 gpc=38400 gps=17102 nn=144888 | 408 | The fields are as follows: |
344 | rcu_bh: | 409 | |
345 | 0 np=146741 qsp=1419 rpq=6 cbr=0 cng=6 gpc=0 gps=0 nn=145314 | 410 | o The leading number is the CPU number, with "!" indicating |
346 | 1 np=155792 qsp=12597 rpq=3 cbr=0 cng=0 gpc=4 gps=8 nn=143180 | 411 | an offline CPU. |
347 | 2 np=136629 qsp=18680 rpq=1 cbr=0 cng=0 gpc=7 gps=6 nn=117936 | ||
348 | 3 np=137723 qsp=2843 rpq=0 cbr=0 cng=0 gpc=10 gps=7 nn=134863 | ||
349 | 4 np=123110 qsp=12433 rpq=0 cbr=0 cng=0 gpc=4 gps=2 nn=110671 | ||
350 | 5 np=137456 qsp=4210 rpq=1 cbr=0 cng=0 gpc=6 gps=5 nn=133235 | ||
351 | 6 np=120834 qsp=9902 rpq=2 cbr=0 cng=0 gpc=6 gps=3 nn=110921 | ||
352 | 7 np=144888 qsp=26336 rpq=0 cbr=0 cng=0 gpc=8 gps=2 nn=118542 | ||
353 | |||
354 | As always, this is once again split into "rcu_sched" and "rcu_bh" | ||
355 | portions, with CONFIG_TREE_PREEMPT_RCU kernels having an additional | ||
356 | "rcu_preempt" section. The fields are as follows: | ||
357 | 412 | ||
358 | o "np" is the number of times that __rcu_pending() has been invoked | 413 | o "np" is the number of times that __rcu_pending() has been invoked |
359 | for the corresponding flavor of RCU. | 414 | for the corresponding flavor of RCU. |
@@ -377,38 +432,23 @@ o "gpc" is the number of times that an old grace period had | |||
377 | o "gps" is the number of times that a new grace period had started, | 432 | o "gps" is the number of times that a new grace period had started, |
378 | but this CPU was not yet aware of it. | 433 | but this CPU was not yet aware of it. |
379 | 434 | ||
380 | o "nn" is the number of times that this CPU needed nothing. Alert | 435 | o "nn" is the number of times that this CPU needed nothing. |
381 | readers will note that the rcu "nn" number for a given CPU very | ||
382 | closely matches the rcu_bh "np" number for that same CPU. This | ||
383 | is due to short-circuit evaluation in rcu_pending(). | ||
384 | |||
385 | |||
386 | The output of "cat rcu/rcutorture" looks as follows: | ||
387 | |||
388 | rcutorture test sequence: 0 (test in progress) | ||
389 | rcutorture update version number: 615 | ||
390 | |||
391 | The first line shows the number of rcutorture tests that have completed | ||
392 | since boot. If a test is currently running, the "(test in progress)" | ||
393 | string will appear as shown above. The second line shows the number of | ||
394 | update cycles that the current test has started, or zero if there is | ||
395 | no test in progress. | ||
396 | 436 | ||
397 | 437 | ||
398 | The output of "cat rcu/rcuboost" looks as follows: | 438 | The output of "cat rcu/rcuboost" looks as follows: |
399 | 439 | ||
400 | 0:5 tasks=.... kt=W ntb=0 neb=0 nnb=0 j=2f95 bt=300f | 440 | 0:3 tasks=.... kt=W ntb=0 neb=0 nnb=0 j=c864 bt=c894 |
401 | balk: nt=0 egt=989 bt=0 nb=0 ny=0 nos=16 | 441 | balk: nt=0 egt=4695 bt=0 nb=0 ny=56 nos=0 |
402 | 6:7 tasks=.... kt=W ntb=0 neb=0 nnb=0 j=2f95 bt=300f | 442 | 4:7 tasks=.... kt=W ntb=0 neb=0 nnb=0 j=c864 bt=c894 |
403 | balk: nt=0 egt=225 bt=0 nb=0 ny=0 nos=6 | 443 | balk: nt=0 egt=6541 bt=0 nb=0 ny=126 nos=0 |
404 | 444 | ||
405 | This information is output only for rcu_preempt. Each two-line entry | 445 | This information is output only for rcu_preempt. Each two-line entry |
406 | corresponds to a leaf rcu_node strcuture. The fields are as follows: | 446 | corresponds to a leaf rcu_node strcuture. The fields are as follows: |
407 | 447 | ||
408 | o "n:m" is the CPU-number range for the corresponding two-line | 448 | o "n:m" is the CPU-number range for the corresponding two-line |
409 | entry. In the sample output above, the first entry covers | 449 | entry. In the sample output above, the first entry covers |
410 | CPUs zero through five and the second entry covers CPUs 6 | 450 | CPUs zero through three and the second entry covers CPUs four |
411 | and 7. | 451 | through seven. |
412 | 452 | ||
413 | o "tasks=TNEB" gives the state of the various segments of the | 453 | o "tasks=TNEB" gives the state of the various segments of the |
414 | rnp->blocked_tasks list: | 454 | rnp->blocked_tasks list: |
diff --git a/Documentation/RCU/whatisRCU.txt b/Documentation/RCU/whatisRCU.txt index bf0f6de2aa00..0cc7820967f4 100644 --- a/Documentation/RCU/whatisRCU.txt +++ b/Documentation/RCU/whatisRCU.txt | |||
@@ -499,6 +499,8 @@ The foo_reclaim() function might appear as follows: | |||
499 | { | 499 | { |
500 | struct foo *fp = container_of(rp, struct foo, rcu); | 500 | struct foo *fp = container_of(rp, struct foo, rcu); |
501 | 501 | ||
502 | foo_cleanup(fp->a); | ||
503 | |||
502 | kfree(fp); | 504 | kfree(fp); |
503 | } | 505 | } |
504 | 506 | ||
@@ -521,6 +523,12 @@ o Use call_rcu() -after- removing a data element from an | |||
521 | read-side critical sections that might be referencing that | 523 | read-side critical sections that might be referencing that |
522 | data item. | 524 | data item. |
523 | 525 | ||
526 | If the callback for call_rcu() is not doing anything more than calling | ||
527 | kfree() on the structure, you can use kfree_rcu() instead of call_rcu() | ||
528 | to avoid having to write your own callback: | ||
529 | |||
530 | kfree_rcu(old_fp, rcu); | ||
531 | |||
524 | Again, see checklist.txt for additional rules governing the use of RCU. | 532 | Again, see checklist.txt for additional rules governing the use of RCU. |
525 | 533 | ||
526 | 534 | ||
@@ -773,8 +781,8 @@ a single atomic update, converting to RCU will require special care. | |||
773 | 781 | ||
774 | Also, the presence of synchronize_rcu() means that the RCU version of | 782 | Also, the presence of synchronize_rcu() means that the RCU version of |
775 | delete() can now block. If this is a problem, there is a callback-based | 783 | delete() can now block. If this is a problem, there is a callback-based |
776 | mechanism that never blocks, namely call_rcu(), that can be used in | 784 | mechanism that never blocks, namely call_rcu() or kfree_rcu(), that can |
777 | place of synchronize_rcu(). | 785 | be used in place of synchronize_rcu(). |
778 | 786 | ||
779 | 787 | ||
780 | 7. FULL LIST OF RCU APIs | 788 | 7. FULL LIST OF RCU APIs |
@@ -789,9 +797,7 @@ RCU list traversal: | |||
789 | list_for_each_entry_rcu | 797 | list_for_each_entry_rcu |
790 | hlist_for_each_entry_rcu | 798 | hlist_for_each_entry_rcu |
791 | hlist_nulls_for_each_entry_rcu | 799 | hlist_nulls_for_each_entry_rcu |
792 | 800 | list_for_each_entry_continue_rcu | |
793 | list_for_each_continue_rcu (to be deprecated in favor of new | ||
794 | list_for_each_entry_continue_rcu) | ||
795 | 801 | ||
796 | RCU pointer/list update: | 802 | RCU pointer/list update: |
797 | 803 | ||
@@ -813,6 +819,7 @@ RCU: Critical sections Grace period Barrier | |||
813 | rcu_read_unlock synchronize_rcu | 819 | rcu_read_unlock synchronize_rcu |
814 | rcu_dereference synchronize_rcu_expedited | 820 | rcu_dereference synchronize_rcu_expedited |
815 | call_rcu | 821 | call_rcu |
822 | kfree_rcu | ||
816 | 823 | ||
817 | 824 | ||
818 | bh: Critical sections Grace period Barrier | 825 | bh: Critical sections Grace period Barrier |
diff --git a/Documentation/accounting/getdelays.c b/Documentation/accounting/getdelays.c index 6f706aca2049..f8ebcde43b17 100644 --- a/Documentation/accounting/getdelays.c +++ b/Documentation/accounting/getdelays.c | |||
@@ -51,7 +51,6 @@ int dbg; | |||
51 | int print_delays; | 51 | int print_delays; |
52 | int print_io_accounting; | 52 | int print_io_accounting; |
53 | int print_task_context_switch_counts; | 53 | int print_task_context_switch_counts; |
54 | __u64 stime, utime; | ||
55 | 54 | ||
56 | #define PRINTF(fmt, arg...) { \ | 55 | #define PRINTF(fmt, arg...) { \ |
57 | if (dbg) { \ | 56 | if (dbg) { \ |
diff --git a/Documentation/acpi/enumeration.txt b/Documentation/acpi/enumeration.txt new file mode 100644 index 000000000000..4f27785ca0c8 --- /dev/null +++ b/Documentation/acpi/enumeration.txt | |||
@@ -0,0 +1,227 @@ | |||
1 | ACPI based device enumeration | ||
2 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
3 | ACPI 5 introduced a set of new resources (UartTSerialBus, I2cSerialBus, | ||
4 | SpiSerialBus, GpioIo and GpioInt) which can be used in enumerating slave | ||
5 | devices behind serial bus controllers. | ||
6 | |||
7 | In addition we are starting to see peripherals integrated in the | ||
8 | SoC/Chipset to appear only in ACPI namespace. These are typically devices | ||
9 | that are accessed through memory-mapped registers. | ||
10 | |||
11 | In order to support this and re-use the existing drivers as much as | ||
12 | possible we decided to do following: | ||
13 | |||
14 | o Devices that have no bus connector resource are represented as | ||
15 | platform devices. | ||
16 | |||
17 | o Devices behind real busses where there is a connector resource | ||
18 | are represented as struct spi_device or struct i2c_device | ||
19 | (standard UARTs are not busses so there is no struct uart_device). | ||
20 | |||
21 | As both ACPI and Device Tree represent a tree of devices (and their | ||
22 | resources) this implementation follows the Device Tree way as much as | ||
23 | possible. | ||
24 | |||
25 | The ACPI implementation enumerates devices behind busses (platform, SPI and | ||
26 | I2C), creates the physical devices and binds them to their ACPI handle in | ||
27 | the ACPI namespace. | ||
28 | |||
29 | This means that when ACPI_HANDLE(dev) returns non-NULL the device was | ||
30 | enumerated from ACPI namespace. This handle can be used to extract other | ||
31 | device-specific configuration. There is an example of this below. | ||
32 | |||
33 | Platform bus support | ||
34 | ~~~~~~~~~~~~~~~~~~~~ | ||
35 | Since we are using platform devices to represent devices that are not | ||
36 | connected to any physical bus we only need to implement a platform driver | ||
37 | for the device and add supported ACPI IDs. If this same IP-block is used on | ||
38 | some other non-ACPI platform, the driver might work out of the box or needs | ||
39 | some minor changes. | ||
40 | |||
41 | Adding ACPI support for an existing driver should be pretty | ||
42 | straightforward. Here is the simplest example: | ||
43 | |||
44 | #ifdef CONFIG_ACPI | ||
45 | static struct acpi_device_id mydrv_acpi_match[] = { | ||
46 | /* ACPI IDs here */ | ||
47 | { } | ||
48 | }; | ||
49 | MODULE_DEVICE_TABLE(acpi, mydrv_acpi_match); | ||
50 | #endif | ||
51 | |||
52 | static struct platform_driver my_driver = { | ||
53 | ... | ||
54 | .driver = { | ||
55 | .acpi_match_table = ACPI_PTR(mydrv_acpi_match), | ||
56 | }, | ||
57 | }; | ||
58 | |||
59 | If the driver needs to perform more complex initialization like getting and | ||
60 | configuring GPIOs it can get its ACPI handle and extract this information | ||
61 | from ACPI tables. | ||
62 | |||
63 | Currently the kernel is not able to automatically determine from which ACPI | ||
64 | device it should make the corresponding platform device so we need to add | ||
65 | the ACPI device explicitly to acpi_platform_device_ids list defined in | ||
66 | drivers/acpi/scan.c. This limitation is only for the platform devices, SPI | ||
67 | and I2C devices are created automatically as described below. | ||
68 | |||
69 | SPI serial bus support | ||
70 | ~~~~~~~~~~~~~~~~~~~~~~ | ||
71 | Slave devices behind SPI bus have SpiSerialBus resource attached to them. | ||
72 | This is extracted automatically by the SPI core and the slave devices are | ||
73 | enumerated once spi_register_master() is called by the bus driver. | ||
74 | |||
75 | Here is what the ACPI namespace for a SPI slave might look like: | ||
76 | |||
77 | Device (EEP0) | ||
78 | { | ||
79 | Name (_ADR, 1) | ||
80 | Name (_CID, Package() { | ||
81 | "ATML0025", | ||
82 | "AT25", | ||
83 | }) | ||
84 | ... | ||
85 | Method (_CRS, 0, NotSerialized) | ||
86 | { | ||
87 | SPISerialBus(1, PolarityLow, FourWireMode, 8, | ||
88 | ControllerInitiated, 1000000, ClockPolarityLow, | ||
89 | ClockPhaseFirst, "\\_SB.PCI0.SPI1",) | ||
90 | } | ||
91 | ... | ||
92 | |||
93 | The SPI device drivers only need to add ACPI IDs in a similar way than with | ||
94 | the platform device drivers. Below is an example where we add ACPI support | ||
95 | to at25 SPI eeprom driver (this is meant for the above ACPI snippet): | ||
96 | |||
97 | #ifdef CONFIG_ACPI | ||
98 | static struct acpi_device_id at25_acpi_match[] = { | ||
99 | { "AT25", 0 }, | ||
100 | { }, | ||
101 | }; | ||
102 | MODULE_DEVICE_TABLE(acpi, at25_acpi_match); | ||
103 | #endif | ||
104 | |||
105 | static struct spi_driver at25_driver = { | ||
106 | .driver = { | ||
107 | ... | ||
108 | .acpi_match_table = ACPI_PTR(at25_acpi_match), | ||
109 | }, | ||
110 | }; | ||
111 | |||
112 | Note that this driver actually needs more information like page size of the | ||
113 | eeprom etc. but at the time writing this there is no standard way of | ||
114 | passing those. One idea is to return this in _DSM method like: | ||
115 | |||
116 | Device (EEP0) | ||
117 | { | ||
118 | ... | ||
119 | Method (_DSM, 4, NotSerialized) | ||
120 | { | ||
121 | Store (Package (6) | ||
122 | { | ||
123 | "byte-len", 1024, | ||
124 | "addr-mode", 2, | ||
125 | "page-size, 32 | ||
126 | }, Local0) | ||
127 | |||
128 | // Check UUIDs etc. | ||
129 | |||
130 | Return (Local0) | ||
131 | } | ||
132 | |||
133 | Then the at25 SPI driver can get this configation by calling _DSM on its | ||
134 | ACPI handle like: | ||
135 | |||
136 | struct acpi_buffer output = { ACPI_ALLOCATE_BUFFER, NULL }; | ||
137 | struct acpi_object_list input; | ||
138 | acpi_status status; | ||
139 | |||
140 | /* Fill in the input buffer */ | ||
141 | |||
142 | status = acpi_evaluate_object(ACPI_HANDLE(&spi->dev), "_DSM", | ||
143 | &input, &output); | ||
144 | if (ACPI_FAILURE(status)) | ||
145 | /* Handle the error */ | ||
146 | |||
147 | /* Extract the data here */ | ||
148 | |||
149 | kfree(output.pointer); | ||
150 | |||
151 | I2C serial bus support | ||
152 | ~~~~~~~~~~~~~~~~~~~~~~ | ||
153 | The slaves behind I2C bus controller only need to add the ACPI IDs like | ||
154 | with the platform and SPI drivers. However the I2C bus controller driver | ||
155 | needs to call acpi_i2c_register_devices() after it has added the adapter. | ||
156 | |||
157 | An I2C bus (controller) driver does: | ||
158 | |||
159 | ... | ||
160 | ret = i2c_add_numbered_adapter(adapter); | ||
161 | if (ret) | ||
162 | /* handle error */ | ||
163 | |||
164 | of_i2c_register_devices(adapter); | ||
165 | /* Enumerate the slave devices behind this bus via ACPI */ | ||
166 | acpi_i2c_register_devices(adapter); | ||
167 | |||
168 | Below is an example of how to add ACPI support to the existing mpu3050 | ||
169 | input driver: | ||
170 | |||
171 | #ifdef CONFIG_ACPI | ||
172 | static struct acpi_device_id mpu3050_acpi_match[] = { | ||
173 | { "MPU3050", 0 }, | ||
174 | { }, | ||
175 | }; | ||
176 | MODULE_DEVICE_TABLE(acpi, mpu3050_acpi_match); | ||
177 | #endif | ||
178 | |||
179 | static struct i2c_driver mpu3050_i2c_driver = { | ||
180 | .driver = { | ||
181 | .name = "mpu3050", | ||
182 | .owner = THIS_MODULE, | ||
183 | .pm = &mpu3050_pm, | ||
184 | .of_match_table = mpu3050_of_match, | ||
185 | .acpi_match_table ACPI_PTR(mpu3050_acpi_match), | ||
186 | }, | ||
187 | .probe = mpu3050_probe, | ||
188 | .remove = __devexit_p(mpu3050_remove), | ||
189 | .id_table = mpu3050_ids, | ||
190 | }; | ||
191 | |||
192 | GPIO support | ||
193 | ~~~~~~~~~~~~ | ||
194 | ACPI 5 introduced two new resources to describe GPIO connections: GpioIo | ||
195 | and GpioInt. These resources are used be used to pass GPIO numbers used by | ||
196 | the device to the driver. For example: | ||
197 | |||
198 | Method (_CRS, 0, NotSerialized) | ||
199 | { | ||
200 | Name (SBUF, ResourceTemplate() | ||
201 | { | ||
202 | GpioIo (Exclusive, PullDefault, 0x0000, 0x0000, | ||
203 | IoRestrictionOutputOnly, "\\_SB.PCI0.GPI0", | ||
204 | 0x00, ResourceConsumer,,) | ||
205 | { | ||
206 | // Pin List | ||
207 | 0x0055 | ||
208 | } | ||
209 | ... | ||
210 | |||
211 | Return (SBUF) | ||
212 | } | ||
213 | } | ||
214 | |||
215 | These GPIO numbers are controller relative and path "\\_SB.PCI0.GPI0" | ||
216 | specifies the path to the controller. In order to use these GPIOs in Linux | ||
217 | we need to translate them to the Linux GPIO numbers. | ||
218 | |||
219 | The driver can do this by including <linux/acpi_gpio.h> and then calling | ||
220 | acpi_get_gpio(path, gpio). This will return the Linux GPIO number or | ||
221 | negative errno if there was no translation found. | ||
222 | |||
223 | Other GpioIo parameters must be converted first by the driver to be | ||
224 | suitable to the gpiolib before passing them. | ||
225 | |||
226 | In case of GpioInt resource an additional call to gpio_to_irq() must be | ||
227 | done before calling request_irq(). | ||
diff --git a/Documentation/acpi/initrd_table_override.txt b/Documentation/acpi/initrd_table_override.txt new file mode 100644 index 000000000000..35c3f5415476 --- /dev/null +++ b/Documentation/acpi/initrd_table_override.txt | |||
@@ -0,0 +1,94 @@ | |||
1 | Overriding ACPI tables via initrd | ||
2 | ================================= | ||
3 | |||
4 | 1) Introduction (What is this about) | ||
5 | 2) What is this for | ||
6 | 3) How does it work | ||
7 | 4) References (Where to retrieve userspace tools) | ||
8 | |||
9 | 1) What is this about | ||
10 | --------------------- | ||
11 | |||
12 | If the ACPI_INITRD_TABLE_OVERRIDE compile option is true, it is possible to | ||
13 | override nearly any ACPI table provided by the BIOS with an instrumented, | ||
14 | modified one. | ||
15 | |||
16 | For a full list of ACPI tables that can be overridden, take a look at | ||
17 | the char *table_sigs[MAX_ACPI_SIGNATURE]; definition in drivers/acpi/osl.c | ||
18 | All ACPI tables iasl (Intel's ACPI compiler and disassembler) knows should | ||
19 | be overridable, except: | ||
20 | - ACPI_SIG_RSDP (has a signature of 6 bytes) | ||
21 | - ACPI_SIG_FACS (does not have an ordinary ACPI table header) | ||
22 | Both could get implemented as well. | ||
23 | |||
24 | |||
25 | 2) What is this for | ||
26 | ------------------- | ||
27 | |||
28 | Please keep in mind that this is a debug option. | ||
29 | ACPI tables should not get overridden for productive use. | ||
30 | If BIOS ACPI tables are overridden the kernel will get tainted with the | ||
31 | TAINT_OVERRIDDEN_ACPI_TABLE flag. | ||
32 | Complain to your platform/BIOS vendor if you find a bug which is so sever | ||
33 | that a workaround is not accepted in the Linux kernel. | ||
34 | |||
35 | Still, it can and should be enabled in any kernel, because: | ||
36 | - There is no functional change with not instrumented initrds | ||
37 | - It provides a powerful feature to easily debug and test ACPI BIOS table | ||
38 | compatibility with the Linux kernel. | ||
39 | |||
40 | |||
41 | 3) How does it work | ||
42 | ------------------- | ||
43 | |||
44 | # Extract the machine's ACPI tables: | ||
45 | cd /tmp | ||
46 | acpidump >acpidump | ||
47 | acpixtract -a acpidump | ||
48 | # Disassemble, modify and recompile them: | ||
49 | iasl -d *.dat | ||
50 | # For example add this statement into a _PRT (PCI Routing Table) function | ||
51 | # of the DSDT: | ||
52 | Store("HELLO WORLD", debug) | ||
53 | iasl -sa dsdt.dsl | ||
54 | # Add the raw ACPI tables to an uncompressed cpio archive. | ||
55 | # They must be put into a /kernel/firmware/acpi directory inside the | ||
56 | # cpio archive. | ||
57 | # The uncompressed cpio archive must be the first. | ||
58 | # Other, typically compressed cpio archives, must be | ||
59 | # concatenated on top of the uncompressed one. | ||
60 | mkdir -p kernel/firmware/acpi | ||
61 | cp dsdt.aml kernel/firmware/acpi | ||
62 | # A maximum of: #define ACPI_OVERRIDE_TABLES 10 | ||
63 | # tables are currently allowed (see osl.c): | ||
64 | iasl -sa facp.dsl | ||
65 | iasl -sa ssdt1.dsl | ||
66 | cp facp.aml kernel/firmware/acpi | ||
67 | cp ssdt1.aml kernel/firmware/acpi | ||
68 | # Create the uncompressed cpio archive and concatenate the original initrd | ||
69 | # on top: | ||
70 | find kernel | cpio -H newc --create > /boot/instrumented_initrd | ||
71 | cat /boot/initrd >>/boot/instrumented_initrd | ||
72 | # reboot with increased acpi debug level, e.g. boot params: | ||
73 | acpi.debug_level=0x2 acpi.debug_layer=0xFFFFFFFF | ||
74 | # and check your syslog: | ||
75 | [ 1.268089] ACPI: PCI Interrupt Routing Table [\_SB_.PCI0._PRT] | ||
76 | [ 1.272091] [ACPI Debug] String [0x0B] "HELLO WORLD" | ||
77 | |||
78 | iasl is able to disassemble and recompile quite a lot different, | ||
79 | also static ACPI tables. | ||
80 | |||
81 | |||
82 | 4) Where to retrieve userspace tools | ||
83 | ------------------------------------ | ||
84 | |||
85 | iasl and acpixtract are part of Intel's ACPICA project: | ||
86 | http://acpica.org/ | ||
87 | and should be packaged by distributions (for example in the acpica package | ||
88 | on SUSE). | ||
89 | |||
90 | acpidump can be found in Len Browns pmtools: | ||
91 | ftp://kernel.org/pub/linux/kernel/people/lenb/acpi/utils/pmtools/acpidump | ||
92 | This tool is also part of the acpica package on SUSE. | ||
93 | Alternatively, used ACPI tables can be retrieved via sysfs in latest kernels: | ||
94 | /sys/firmware/acpi/tables | ||
diff --git a/Documentation/aoe/aoe.txt b/Documentation/aoe/aoe.txt index bfc9cb19abcd..c71487d399d1 100644 --- a/Documentation/aoe/aoe.txt +++ b/Documentation/aoe/aoe.txt | |||
@@ -125,7 +125,9 @@ DRIVER OPTIONS | |||
125 | The aoe_deadsecs module parameter determines the maximum number of | 125 | The aoe_deadsecs module parameter determines the maximum number of |
126 | seconds that the driver will wait for an AoE device to provide a | 126 | seconds that the driver will wait for an AoE device to provide a |
127 | response to an AoE command. After aoe_deadsecs seconds have | 127 | response to an AoE command. After aoe_deadsecs seconds have |
128 | elapsed, the AoE device will be marked as "down". | 128 | elapsed, the AoE device will be marked as "down". A value of zero |
129 | is supported for testing purposes and makes the aoe driver keep | ||
130 | trying AoE commands forever. | ||
129 | 131 | ||
130 | The aoe_maxout module parameter has a default of 128. This is the | 132 | The aoe_maxout module parameter has a default of 128. This is the |
131 | maximum number of unresponded packets that will be sent to an AoE | 133 | maximum number of unresponded packets that will be sent to an AoE |
diff --git a/Documentation/arm/OMAP/DSS b/Documentation/arm/OMAP/DSS index a564ceea9e98..4484e021290e 100644 --- a/Documentation/arm/OMAP/DSS +++ b/Documentation/arm/OMAP/DSS | |||
@@ -285,7 +285,10 @@ FB0 +-- GFX ---- LCD ---- LCD | |||
285 | Misc notes | 285 | Misc notes |
286 | ---------- | 286 | ---------- |
287 | 287 | ||
288 | OMAP FB allocates the framebuffer memory using the OMAP VRAM allocator. | 288 | OMAP FB allocates the framebuffer memory using the standard dma allocator. You |
289 | can enable Contiguous Memory Allocator (CONFIG_CMA) to improve the dma | ||
290 | allocator, and if CMA is enabled, you use "cma=" kernel parameter to increase | ||
291 | the global memory area for CMA. | ||
289 | 292 | ||
290 | Using DSI DPLL to generate pixel clock it is possible produce the pixel clock | 293 | Using DSI DPLL to generate pixel clock it is possible produce the pixel clock |
291 | of 86.5MHz (max possible), and with that you get 1280x1024@57 output from DVI. | 294 | of 86.5MHz (max possible), and with that you get 1280x1024@57 output from DVI. |
@@ -301,11 +304,6 @@ framebuffer parameters. | |||
301 | Kernel boot arguments | 304 | Kernel boot arguments |
302 | --------------------- | 305 | --------------------- |
303 | 306 | ||
304 | vram=<size>[,<physaddr>] | ||
305 | - Amount of total VRAM to preallocate and optionally a physical start | ||
306 | memory address. For example, "10M". omapfb allocates memory for | ||
307 | framebuffers from VRAM. | ||
308 | |||
309 | omapfb.mode=<display>:<mode>[,...] | 307 | omapfb.mode=<display>:<mode>[,...] |
310 | - Default video mode for specified displays. For example, | 308 | - Default video mode for specified displays. For example, |
311 | "dvi:800x400MR-24@60". See drivers/video/modedb.c. | 309 | "dvi:800x400MR-24@60". See drivers/video/modedb.c. |
diff --git a/Documentation/arm/sunxi/README b/Documentation/arm/sunxi/README new file mode 100644 index 000000000000..87a1e8fb6242 --- /dev/null +++ b/Documentation/arm/sunxi/README | |||
@@ -0,0 +1,19 @@ | |||
1 | ARM Allwinner SoCs | ||
2 | ================== | ||
3 | |||
4 | This document lists all the ARM Allwinner SoCs that are currently | ||
5 | supported in mainline by the Linux kernel. This document will also | ||
6 | provide links to documentation and or datasheet for these SoCs. | ||
7 | |||
8 | SunXi family | ||
9 | ------------ | ||
10 | |||
11 | Flavors: | ||
12 | Allwinner A10 (sun4i) | ||
13 | Datasheet : http://dl.linux-sunxi.org/A10/A10%20Datasheet%20-%20v1.21%20%282012-04-06%29.pdf | ||
14 | |||
15 | Allwinner A13 (sun5i) | ||
16 | Datasheet : http://dl.linux-sunxi.org/A13/A13%20Datasheet%20-%20v1.12%20%282012-03-29%29.pdf | ||
17 | |||
18 | Core: Cortex A8 | ||
19 | Linux kernel mach directory: arch/arm/mach-sunxi \ No newline at end of file | ||
diff --git a/Documentation/arm64/memory.txt b/Documentation/arm64/memory.txt index dbbdcbba75a3..d758702fc03c 100644 --- a/Documentation/arm64/memory.txt +++ b/Documentation/arm64/memory.txt | |||
@@ -27,21 +27,21 @@ Start End Size Use | |||
27 | ----------------------------------------------------------------------- | 27 | ----------------------------------------------------------------------- |
28 | 0000000000000000 0000007fffffffff 512GB user | 28 | 0000000000000000 0000007fffffffff 512GB user |
29 | 29 | ||
30 | ffffff8000000000 ffffffbbfffcffff ~240GB vmalloc | 30 | ffffff8000000000 ffffffbbfffeffff ~240GB vmalloc |
31 | 31 | ||
32 | ffffffbbfffd0000 ffffffbcfffdffff 64KB [guard page] | 32 | ffffffbbffff0000 ffffffbbffffffff 64KB [guard page] |
33 | 33 | ||
34 | ffffffbbfffe0000 ffffffbcfffeffff 64KB PCI I/O space | 34 | ffffffbc00000000 ffffffbdffffffff 8GB vmemmap |
35 | 35 | ||
36 | ffffffbbffff0000 ffffffbcffffffff 64KB [guard page] | 36 | ffffffbe00000000 ffffffbffbbfffff ~8GB [guard, future vmmemap] |
37 | 37 | ||
38 | ffffffbc00000000 ffffffbdffffffff 8GB vmemmap | 38 | ffffffbffbe00000 ffffffbffbe0ffff 64KB PCI I/O space |
39 | 39 | ||
40 | ffffffbe00000000 ffffffbffbffffff ~8GB [guard, future vmmemap] | 40 | ffffffbbffff0000 ffffffbcffffffff ~2MB [guard] |
41 | 41 | ||
42 | ffffffbffc000000 ffffffbfffffffff 64MB modules | 42 | ffffffbffc000000 ffffffbfffffffff 64MB modules |
43 | 43 | ||
44 | ffffffc000000000 ffffffffffffffff 256GB memory | 44 | ffffffc000000000 ffffffffffffffff 256GB kernel logical memory map |
45 | 45 | ||
46 | 46 | ||
47 | Translation table lookup with 4KB pages: | 47 | Translation table lookup with 4KB pages: |
diff --git a/Documentation/backlight/lp855x-driver.txt b/Documentation/backlight/lp855x-driver.txt index f5e4caafab7d..1529394cfe8b 100644 --- a/Documentation/backlight/lp855x-driver.txt +++ b/Documentation/backlight/lp855x-driver.txt | |||
@@ -35,11 +35,8 @@ For supporting platform specific data, the lp855x platform data can be used. | |||
35 | * mode : Brightness control mode. PWM or register based. | 35 | * mode : Brightness control mode. PWM or register based. |
36 | * device_control : Value of DEVICE CONTROL register. | 36 | * device_control : Value of DEVICE CONTROL register. |
37 | * initial_brightness : Initial value of backlight brightness. | 37 | * initial_brightness : Initial value of backlight brightness. |
38 | * pwm_data : Platform specific pwm generation functions. | 38 | * period_ns : Platform specific PWM period value. unit is nano. |
39 | Only valid when brightness is pwm input mode. | 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 : | 40 | * load_new_rom_data : |
44 | 0 : use default configuration data | 41 | 0 : use default configuration data |
45 | 1 : update values of eeprom or eprom registers on loading driver | 42 | 1 : update values of eeprom or eprom registers on loading driver |
@@ -71,8 +68,5 @@ static struct lp855x_platform_data lp8556_pdata = { | |||
71 | .mode = PWM_BASED, | 68 | .mode = PWM_BASED, |
72 | .device_control = PWM_CONFIG(LP8556), | 69 | .device_control = PWM_CONFIG(LP8556), |
73 | .initial_brightness = INITIAL_BRT, | 70 | .initial_brightness = INITIAL_BRT, |
74 | .pwm_data = { | 71 | .period_ns = 1000000, |
75 | .pwm_set_intensity = platform_pwm_set_intensity, | ||
76 | .pwm_get_intensity = platform_pwm_get_intensity, | ||
77 | }, | ||
78 | }; | 72 | }; |
diff --git a/Documentation/bus-devices/ti-gpmc.txt b/Documentation/bus-devices/ti-gpmc.txt new file mode 100644 index 000000000000..cc9ce57e0a26 --- /dev/null +++ b/Documentation/bus-devices/ti-gpmc.txt | |||
@@ -0,0 +1,122 @@ | |||
1 | GPMC (General Purpose Memory Controller): | ||
2 | ========================================= | ||
3 | |||
4 | GPMC is an unified memory controller dedicated to interfacing external | ||
5 | memory devices like | ||
6 | * Asynchronous SRAM like memories and application specific integrated | ||
7 | circuit devices. | ||
8 | * Asynchronous, synchronous, and page mode burst NOR flash devices | ||
9 | NAND flash | ||
10 | * Pseudo-SRAM devices | ||
11 | |||
12 | GPMC is found on Texas Instruments SoC's (OMAP based) | ||
13 | IP details: http://www.ti.com/lit/pdf/spruh73 section 7.1 | ||
14 | |||
15 | |||
16 | GPMC generic timing calculation: | ||
17 | ================================ | ||
18 | |||
19 | GPMC has certain timings that has to be programmed for proper | ||
20 | functioning of the peripheral, while peripheral has another set of | ||
21 | timings. To have peripheral work with gpmc, peripheral timings has to | ||
22 | be translated to the form gpmc can understand. The way it has to be | ||
23 | translated depends on the connected peripheral. Also there is a | ||
24 | dependency for certain gpmc timings on gpmc clock frequency. Hence a | ||
25 | generic timing routine was developed to achieve above requirements. | ||
26 | |||
27 | Generic routine provides a generic method to calculate gpmc timings | ||
28 | from gpmc peripheral timings. struct gpmc_device_timings fields has to | ||
29 | be updated with timings from the datasheet of the peripheral that is | ||
30 | connected to gpmc. A few of the peripheral timings can be fed either | ||
31 | in time or in cycles, provision to handle this scenario has been | ||
32 | provided (refer struct gpmc_device_timings definition). It may so | ||
33 | happen that timing as specified by peripheral datasheet is not present | ||
34 | in timing structure, in this scenario, try to correlate peripheral | ||
35 | timing to the one available. If that doesn't work, try to add a new | ||
36 | field as required by peripheral, educate generic timing routine to | ||
37 | handle it, make sure that it does not break any of the existing. | ||
38 | Then there may be cases where peripheral datasheet doesn't mention | ||
39 | certain fields of struct gpmc_device_timings, zero those entries. | ||
40 | |||
41 | Generic timing routine has been verified to work properly on | ||
42 | multiple onenand's and tusb6010 peripherals. | ||
43 | |||
44 | A word of caution: generic timing routine has been developed based | ||
45 | on understanding of gpmc timings, peripheral timings, available | ||
46 | custom timing routines, a kind of reverse engineering without | ||
47 | most of the datasheets & hardware (to be exact none of those supported | ||
48 | in mainline having custom timing routine) and by simulation. | ||
49 | |||
50 | gpmc timing dependency on peripheral timings: | ||
51 | [<gpmc_timing>: <peripheral timing1>, <peripheral timing2> ...] | ||
52 | |||
53 | 1. common | ||
54 | cs_on: t_ceasu | ||
55 | adv_on: t_avdasu, t_ceavd | ||
56 | |||
57 | 2. sync common | ||
58 | sync_clk: clk | ||
59 | page_burst_access: t_bacc | ||
60 | clk_activation: t_ces, t_avds | ||
61 | |||
62 | 3. read async muxed | ||
63 | adv_rd_off: t_avdp_r | ||
64 | oe_on: t_oeasu, t_aavdh | ||
65 | access: t_iaa, t_oe, t_ce, t_aa | ||
66 | rd_cycle: t_rd_cycle, t_cez_r, t_oez | ||
67 | |||
68 | 4. read async non-muxed | ||
69 | adv_rd_off: t_avdp_r | ||
70 | oe_on: t_oeasu | ||
71 | access: t_iaa, t_oe, t_ce, t_aa | ||
72 | rd_cycle: t_rd_cycle, t_cez_r, t_oez | ||
73 | |||
74 | 5. read sync muxed | ||
75 | adv_rd_off: t_avdp_r, t_avdh | ||
76 | oe_on: t_oeasu, t_ach, cyc_aavdh_oe | ||
77 | access: t_iaa, cyc_iaa, cyc_oe | ||
78 | rd_cycle: t_cez_r, t_oez, t_ce_rdyz | ||
79 | |||
80 | 6. read sync non-muxed | ||
81 | adv_rd_off: t_avdp_r | ||
82 | oe_on: t_oeasu | ||
83 | access: t_iaa, cyc_iaa, cyc_oe | ||
84 | rd_cycle: t_cez_r, t_oez, t_ce_rdyz | ||
85 | |||
86 | 7. write async muxed | ||
87 | adv_wr_off: t_avdp_w | ||
88 | we_on, wr_data_mux_bus: t_weasu, t_aavdh, cyc_aavhd_we | ||
89 | we_off: t_wpl | ||
90 | cs_wr_off: t_wph | ||
91 | wr_cycle: t_cez_w, t_wr_cycle | ||
92 | |||
93 | 8. write async non-muxed | ||
94 | adv_wr_off: t_avdp_w | ||
95 | we_on, wr_data_mux_bus: t_weasu | ||
96 | we_off: t_wpl | ||
97 | cs_wr_off: t_wph | ||
98 | wr_cycle: t_cez_w, t_wr_cycle | ||
99 | |||
100 | 9. write sync muxed | ||
101 | adv_wr_off: t_avdp_w, t_avdh | ||
102 | we_on, wr_data_mux_bus: t_weasu, t_rdyo, t_aavdh, cyc_aavhd_we | ||
103 | we_off: t_wpl, cyc_wpl | ||
104 | cs_wr_off: t_wph | ||
105 | wr_cycle: t_cez_w, t_ce_rdyz | ||
106 | |||
107 | 10. write sync non-muxed | ||
108 | adv_wr_off: t_avdp_w | ||
109 | we_on, wr_data_mux_bus: t_weasu, t_rdyo | ||
110 | we_off: t_wpl, cyc_wpl | ||
111 | cs_wr_off: t_wph | ||
112 | wr_cycle: t_cez_w, t_ce_rdyz | ||
113 | |||
114 | |||
115 | Note: Many of gpmc timings are dependent on other gpmc timings (a few | ||
116 | gpmc timings purely dependent on other gpmc timings, a reason that | ||
117 | some of the gpmc timings are missing above), and it will result in | ||
118 | indirect dependency of peripheral timings to gpmc timings other than | ||
119 | mentioned above, refer timing routine for more details. To know what | ||
120 | these peripheral timings correspond to, please see explanations in | ||
121 | struct gpmc_device_timings definition. And for gpmc timings refer | ||
122 | IP details (link above). | ||
diff --git a/Documentation/cgroups/00-INDEX b/Documentation/cgroups/00-INDEX index 3f58fa3d6d00..f78b90a35ad0 100644 --- a/Documentation/cgroups/00-INDEX +++ b/Documentation/cgroups/00-INDEX | |||
@@ -1,7 +1,11 @@ | |||
1 | 00-INDEX | 1 | 00-INDEX |
2 | - this file | 2 | - this file |
3 | blkio-controller.txt | ||
4 | - Description for Block IO Controller, implementation and usage details. | ||
3 | cgroups.txt | 5 | cgroups.txt |
4 | - Control Groups definition, implementation details, examples and API. | 6 | - Control Groups definition, implementation details, examples and API. |
7 | cgroup_event_listener.c | ||
8 | - A user program for cgroup listener. | ||
5 | cpuacct.txt | 9 | cpuacct.txt |
6 | - CPU Accounting Controller; account CPU usage for groups of tasks. | 10 | - CPU Accounting Controller; account CPU usage for groups of tasks. |
7 | cpusets.txt | 11 | cpusets.txt |
@@ -10,9 +14,13 @@ devices.txt | |||
10 | - Device Whitelist Controller; description, interface and security. | 14 | - Device Whitelist Controller; description, interface and security. |
11 | freezer-subsystem.txt | 15 | freezer-subsystem.txt |
12 | - checkpointing; rationale to not use signals, interface. | 16 | - checkpointing; rationale to not use signals, interface. |
17 | hugetlb.txt | ||
18 | - HugeTLB Controller implementation and usage details. | ||
13 | memcg_test.txt | 19 | memcg_test.txt |
14 | - Memory Resource Controller; implementation details. | 20 | - Memory Resource Controller; implementation details. |
15 | memory.txt | 21 | memory.txt |
16 | - Memory Resource Controller; design, accounting, interface, testing. | 22 | - Memory Resource Controller; design, accounting, interface, testing. |
23 | net_prio.txt | ||
24 | - Network priority cgroups details and usages. | ||
17 | resource_counter.txt | 25 | resource_counter.txt |
18 | - Resource Counter API. | 26 | - Resource Counter API. |
diff --git a/Documentation/cgroups/cgroups.txt b/Documentation/cgroups/cgroups.txt index 9e04196c4d78..bcf1a00b06a1 100644 --- a/Documentation/cgroups/cgroups.txt +++ b/Documentation/cgroups/cgroups.txt | |||
@@ -299,11 +299,9 @@ a cgroup hierarchy's release_agent path is empty. | |||
299 | 1.5 What does clone_children do ? | 299 | 1.5 What does clone_children do ? |
300 | --------------------------------- | 300 | --------------------------------- |
301 | 301 | ||
302 | If the clone_children flag is enabled (1) in a cgroup, then all | 302 | This flag only affects the cpuset controller. If the clone_children |
303 | cgroups created beneath will call the post_clone callbacks for each | 303 | flag is enabled (1) in a cgroup, a new cpuset cgroup will copy its |
304 | subsystem of the newly created cgroup. Usually when this callback is | 304 | configuration from the parent during initialization. |
305 | implemented for a subsystem, it copies the values of the parent | ||
306 | subsystem, this is the case for the cpuset. | ||
307 | 305 | ||
308 | 1.6 How do I use cgroups ? | 306 | 1.6 How do I use cgroups ? |
309 | -------------------------- | 307 | -------------------------- |
@@ -553,16 +551,16 @@ call to cgroup_unload_subsys(). It should also set its_subsys.module = | |||
553 | THIS_MODULE in its .c file. | 551 | THIS_MODULE in its .c file. |
554 | 552 | ||
555 | Each subsystem may export the following methods. The only mandatory | 553 | Each subsystem may export the following methods. The only mandatory |
556 | methods are create/destroy. Any others that are null are presumed to | 554 | methods are css_alloc/free. Any others that are null are presumed to |
557 | be successful no-ops. | 555 | be successful no-ops. |
558 | 556 | ||
559 | struct cgroup_subsys_state *create(struct cgroup *cgrp) | 557 | struct cgroup_subsys_state *css_alloc(struct cgroup *cgrp) |
560 | (cgroup_mutex held by caller) | 558 | (cgroup_mutex held by caller) |
561 | 559 | ||
562 | Called to create a subsystem state object for a cgroup. The | 560 | Called to allocate a subsystem state object for a cgroup. The |
563 | subsystem should allocate its subsystem state object for the passed | 561 | subsystem should allocate its subsystem state object for the passed |
564 | cgroup, returning a pointer to the new object on success or a | 562 | cgroup, returning a pointer to the new object on success or a |
565 | negative error code. On success, the subsystem pointer should point to | 563 | ERR_PTR() value. On success, the subsystem pointer should point to |
566 | a structure of type cgroup_subsys_state (typically embedded in a | 564 | a structure of type cgroup_subsys_state (typically embedded in a |
567 | larger subsystem-specific object), which will be initialized by the | 565 | larger subsystem-specific object), which will be initialized by the |
568 | cgroup system. Note that this will be called at initialization to | 566 | cgroup system. Note that this will be called at initialization to |
@@ -571,24 +569,33 @@ identified by the passed cgroup object having a NULL parent (since | |||
571 | it's the root of the hierarchy) and may be an appropriate place for | 569 | it's the root of the hierarchy) and may be an appropriate place for |
572 | initialization code. | 570 | initialization code. |
573 | 571 | ||
574 | void destroy(struct cgroup *cgrp) | 572 | int css_online(struct cgroup *cgrp) |
575 | (cgroup_mutex held by caller) | 573 | (cgroup_mutex held by caller) |
576 | 574 | ||
577 | The cgroup system is about to destroy the passed cgroup; the subsystem | 575 | Called after @cgrp successfully completed all allocations and made |
578 | should do any necessary cleanup and free its subsystem state | 576 | visible to cgroup_for_each_child/descendant_*() iterators. The |
579 | object. By the time this method is called, the cgroup has already been | 577 | subsystem may choose to fail creation by returning -errno. This |
580 | unlinked from the file system and from the child list of its parent; | 578 | callback can be used to implement reliable state sharing and |
581 | cgroup->parent is still valid. (Note - can also be called for a | 579 | propagation along the hierarchy. See the comment on |
582 | newly-created cgroup if an error occurs after this subsystem's | 580 | cgroup_for_each_descendant_pre() for details. |
583 | create() method has been called for the new cgroup). | ||
584 | 581 | ||
585 | int pre_destroy(struct cgroup *cgrp); | 582 | void css_offline(struct cgroup *cgrp); |
586 | 583 | ||
587 | Called before checking the reference count on each subsystem. This may | 584 | This is the counterpart of css_online() and called iff css_online() |
588 | be useful for subsystems which have some extra references even if | 585 | has succeeded on @cgrp. This signifies the beginning of the end of |
589 | there are not tasks in the cgroup. If pre_destroy() returns error code, | 586 | @cgrp. @cgrp is being removed and the subsystem should start dropping |
590 | rmdir() will fail with it. From this behavior, pre_destroy() can be | 587 | all references it's holding on @cgrp. When all references are dropped, |
591 | called multiple times against a cgroup. | 588 | cgroup removal will proceed to the next step - css_free(). After this |
589 | callback, @cgrp should be considered dead to the subsystem. | ||
590 | |||
591 | void css_free(struct cgroup *cgrp) | ||
592 | (cgroup_mutex held by caller) | ||
593 | |||
594 | The cgroup system is about to free @cgrp; the subsystem should free | ||
595 | its subsystem state object. By the time this method is called, @cgrp | ||
596 | is completely unused; @cgrp->parent is still valid. (Note - can also | ||
597 | be called for a newly-created cgroup if an error occurs after this | ||
598 | subsystem's create() method has been called for the new cgroup). | ||
592 | 599 | ||
593 | int can_attach(struct cgroup *cgrp, struct cgroup_taskset *tset) | 600 | int can_attach(struct cgroup *cgrp, struct cgroup_taskset *tset) |
594 | (cgroup_mutex held by caller) | 601 | (cgroup_mutex held by caller) |
@@ -635,14 +642,6 @@ void exit(struct task_struct *task) | |||
635 | 642 | ||
636 | Called during task exit. | 643 | Called during task exit. |
637 | 644 | ||
638 | void post_clone(struct cgroup *cgrp) | ||
639 | (cgroup_mutex held by caller) | ||
640 | |||
641 | Called during cgroup_create() to do any parameter | ||
642 | initialization which might be required before a task could attach. For | ||
643 | example, in cpusets, no task may attach before 'cpus' and 'mems' are set | ||
644 | up. | ||
645 | |||
646 | void bind(struct cgroup *root) | 645 | void bind(struct cgroup *root) |
647 | (cgroup_mutex held by caller) | 646 | (cgroup_mutex held by caller) |
648 | 647 | ||
diff --git a/Documentation/cgroups/cpusets.txt b/Documentation/cgroups/cpusets.txt index cefd3d8bbd11..12e01d432bfe 100644 --- a/Documentation/cgroups/cpusets.txt +++ b/Documentation/cgroups/cpusets.txt | |||
@@ -218,7 +218,7 @@ and name space for cpusets, with a minimum of additional kernel code. | |||
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_mask 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_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 | ||
224 | 224 | ||
diff --git a/Documentation/cgroups/freezer-subsystem.txt b/Documentation/cgroups/freezer-subsystem.txt index 7e62de1e59ff..c96a72cbb30a 100644 --- a/Documentation/cgroups/freezer-subsystem.txt +++ b/Documentation/cgroups/freezer-subsystem.txt | |||
@@ -49,13 +49,49 @@ prevent the freeze/unfreeze cycle from becoming visible to the tasks | |||
49 | being frozen. This allows the bash example above and gdb to run as | 49 | being frozen. This allows the bash example above and gdb to run as |
50 | expected. | 50 | expected. |
51 | 51 | ||
52 | The freezer subsystem in the container filesystem defines a file named | 52 | The cgroup freezer is hierarchical. Freezing a cgroup freezes all |
53 | freezer.state. Writing "FROZEN" to the state file will freeze all tasks in the | 53 | tasks beloning to the cgroup and all its descendant cgroups. Each |
54 | cgroup. Subsequently writing "THAWED" will unfreeze the tasks in the cgroup. | 54 | cgroup has its own state (self-state) and the state inherited from the |
55 | Reading will return the current state. | 55 | parent (parent-state). Iff both states are THAWED, the cgroup is |
56 | THAWED. | ||
56 | 57 | ||
57 | Note freezer.state doesn't exist in root cgroup, which means root cgroup | 58 | The following cgroupfs files are created by cgroup freezer. |
58 | is non-freezable. | 59 | |
60 | * freezer.state: Read-write. | ||
61 | |||
62 | When read, returns the effective state of the cgroup - "THAWED", | ||
63 | "FREEZING" or "FROZEN". This is the combined self and parent-states. | ||
64 | If any is freezing, the cgroup is freezing (FREEZING or FROZEN). | ||
65 | |||
66 | FREEZING cgroup transitions into FROZEN state when all tasks | ||
67 | belonging to the cgroup and its descendants become frozen. Note that | ||
68 | a cgroup reverts to FREEZING from FROZEN after a new task is added | ||
69 | to the cgroup or one of its descendant cgroups until the new task is | ||
70 | frozen. | ||
71 | |||
72 | When written, sets the self-state of the cgroup. Two values are | ||
73 | allowed - "FROZEN" and "THAWED". If FROZEN is written, the cgroup, | ||
74 | if not already freezing, enters FREEZING state along with all its | ||
75 | descendant cgroups. | ||
76 | |||
77 | If THAWED is written, the self-state of the cgroup is changed to | ||
78 | THAWED. Note that the effective state may not change to THAWED if | ||
79 | the parent-state is still freezing. If a cgroup's effective state | ||
80 | becomes THAWED, all its descendants which are freezing because of | ||
81 | the cgroup also leave the freezing state. | ||
82 | |||
83 | * freezer.self_freezing: Read only. | ||
84 | |||
85 | Shows the self-state. 0 if the self-state is THAWED; otherwise, 1. | ||
86 | This value is 1 iff the last write to freezer.state was "FROZEN". | ||
87 | |||
88 | * freezer.parent_freezing: Read only. | ||
89 | |||
90 | Shows the parent-state. 0 if none of the cgroup's ancestors is | ||
91 | frozen; otherwise, 1. | ||
92 | |||
93 | The root cgroup is non-freezable and the above interface files don't | ||
94 | exist. | ||
59 | 95 | ||
60 | * Examples of usage : | 96 | * Examples of usage : |
61 | 97 | ||
@@ -85,18 +121,3 @@ to unfreeze all tasks in the container : | |||
85 | 121 | ||
86 | This is the basic mechanism which should do the right thing for user space task | 122 | This is the basic mechanism which should do the right thing for user space task |
87 | in a simple scenario. | 123 | in a simple scenario. |
88 | |||
89 | It's important to note that freezing can be incomplete. In that case we return | ||
90 | EBUSY. This means that some tasks in the cgroup are busy doing something that | ||
91 | prevents us from completely freezing the cgroup at this time. After EBUSY, | ||
92 | the cgroup will remain partially frozen -- reflected by freezer.state reporting | ||
93 | "FREEZING" when read. The state will remain "FREEZING" until one of these | ||
94 | things happens: | ||
95 | |||
96 | 1) Userspace cancels the freezing operation by writing "THAWED" to | ||
97 | the freezer.state file | ||
98 | 2) Userspace retries the freezing operation by writing "FROZEN" to | ||
99 | the freezer.state file (writing "FREEZING" is not legal | ||
100 | and returns EINVAL) | ||
101 | 3) The tasks that blocked the cgroup from entering the "FROZEN" | ||
102 | state disappear from the cgroup's set of tasks. | ||
diff --git a/Documentation/cgroups/memory.txt b/Documentation/cgroups/memory.txt index c07f7b4fb88d..8b8c28b9864c 100644 --- a/Documentation/cgroups/memory.txt +++ b/Documentation/cgroups/memory.txt | |||
@@ -71,6 +71,11 @@ Brief summary of control files. | |||
71 | memory.oom_control # set/show oom controls. | 71 | memory.oom_control # set/show oom controls. |
72 | memory.numa_stat # show the number of memory usage per numa node | 72 | memory.numa_stat # show the number of memory usage per numa node |
73 | 73 | ||
74 | memory.kmem.limit_in_bytes # set/show hard limit for kernel memory | ||
75 | memory.kmem.usage_in_bytes # show current kernel memory allocation | ||
76 | memory.kmem.failcnt # show the number of kernel memory usage hits limits | ||
77 | memory.kmem.max_usage_in_bytes # show max kernel memory usage recorded | ||
78 | |||
74 | memory.kmem.tcp.limit_in_bytes # set/show hard limit for tcp buf memory | 79 | memory.kmem.tcp.limit_in_bytes # set/show hard limit for tcp buf memory |
75 | memory.kmem.tcp.usage_in_bytes # show current tcp buf memory allocation | 80 | memory.kmem.tcp.usage_in_bytes # show current tcp buf memory allocation |
76 | memory.kmem.tcp.failcnt # show the number of tcp buf memory usage hits limits | 81 | memory.kmem.tcp.failcnt # show the number of tcp buf memory usage hits limits |
@@ -144,9 +149,9 @@ Figure 1 shows the important aspects of the controller | |||
144 | 3. Each page has a pointer to the page_cgroup, which in turn knows the | 149 | 3. Each page has a pointer to the page_cgroup, which in turn knows the |
145 | cgroup it belongs to | 150 | cgroup it belongs to |
146 | 151 | ||
147 | The accounting is done as follows: mem_cgroup_charge() is invoked to set up | 152 | The accounting is done as follows: mem_cgroup_charge_common() is invoked to |
148 | the necessary data structures and check if the cgroup that is being charged | 153 | set up the necessary data structures and check if the cgroup that is being |
149 | is over its limit. If it is, then reclaim is invoked on the cgroup. | 154 | charged is over its limit. If it is, then reclaim is invoked on the cgroup. |
150 | More details can be found in the reclaim section of this document. | 155 | More details can be found in the reclaim section of this document. |
151 | If everything goes well, a page meta-data-structure called page_cgroup is | 156 | If everything goes well, a page meta-data-structure called page_cgroup is |
152 | updated. page_cgroup has its own LRU on cgroup. | 157 | updated. page_cgroup has its own LRU on cgroup. |
@@ -268,20 +273,73 @@ the amount of kernel memory used by the system. Kernel memory is fundamentally | |||
268 | different than user memory, since it can't be swapped out, which makes it | 273 | different than user memory, since it can't be swapped out, which makes it |
269 | possible to DoS the system by consuming too much of this precious resource. | 274 | possible to DoS the system by consuming too much of this precious resource. |
270 | 275 | ||
276 | Kernel memory won't be accounted at all until limit on a group is set. This | ||
277 | allows for existing setups to continue working without disruption. The limit | ||
278 | cannot be set if the cgroup have children, or if there are already tasks in the | ||
279 | cgroup. Attempting to set the limit under those conditions will return -EBUSY. | ||
280 | When use_hierarchy == 1 and a group is accounted, its children will | ||
281 | automatically be accounted regardless of their limit value. | ||
282 | |||
283 | After a group is first limited, it will be kept being accounted until it | ||
284 | is removed. The memory limitation itself, can of course be removed by writing | ||
285 | -1 to memory.kmem.limit_in_bytes. In this case, kmem will be accounted, but not | ||
286 | limited. | ||
287 | |||
271 | Kernel memory limits are not imposed for the root cgroup. Usage for the root | 288 | Kernel memory limits are not imposed for the root cgroup. Usage for the root |
272 | cgroup may or may not be accounted. | 289 | cgroup may or may not be accounted. The memory used is accumulated into |
290 | memory.kmem.usage_in_bytes, or in a separate counter when it makes sense. | ||
291 | (currently only for tcp). | ||
292 | The main "kmem" counter is fed into the main counter, so kmem charges will | ||
293 | also be visible from the user counter. | ||
273 | 294 | ||
274 | Currently no soft limit is implemented for kernel memory. It is future work | 295 | Currently no soft limit is implemented for kernel memory. It is future work |
275 | to trigger slab reclaim when those limits are reached. | 296 | to trigger slab reclaim when those limits are reached. |
276 | 297 | ||
277 | 2.7.1 Current Kernel Memory resources accounted | 298 | 2.7.1 Current Kernel Memory resources accounted |
278 | 299 | ||
300 | * stack pages: every process consumes some stack pages. By accounting into | ||
301 | kernel memory, we prevent new processes from being created when the kernel | ||
302 | memory usage is too high. | ||
303 | |||
304 | * slab pages: pages allocated by the SLAB or SLUB allocator are tracked. A copy | ||
305 | of each kmem_cache is created everytime the cache is touched by the first time | ||
306 | from inside the memcg. The creation is done lazily, so some objects can still be | ||
307 | skipped while the cache is being created. All objects in a slab page should | ||
308 | belong to the same memcg. This only fails to hold when a task is migrated to a | ||
309 | different memcg during the page allocation by the cache. | ||
310 | |||
279 | * sockets memory pressure: some sockets protocols have memory pressure | 311 | * sockets memory pressure: some sockets protocols have memory pressure |
280 | thresholds. The Memory Controller allows them to be controlled individually | 312 | thresholds. The Memory Controller allows them to be controlled individually |
281 | per cgroup, instead of globally. | 313 | per cgroup, instead of globally. |
282 | 314 | ||
283 | * tcp memory pressure: sockets memory pressure for the tcp protocol. | 315 | * tcp memory pressure: sockets memory pressure for the tcp protocol. |
284 | 316 | ||
317 | 2.7.3 Common use cases | ||
318 | |||
319 | Because the "kmem" counter is fed to the main user counter, kernel memory can | ||
320 | never be limited completely independently of user memory. Say "U" is the user | ||
321 | limit, and "K" the kernel limit. There are three possible ways limits can be | ||
322 | set: | ||
323 | |||
324 | U != 0, K = unlimited: | ||
325 | This is the standard memcg limitation mechanism already present before kmem | ||
326 | accounting. Kernel memory is completely ignored. | ||
327 | |||
328 | U != 0, K < U: | ||
329 | Kernel memory is a subset of the user memory. This setup is useful in | ||
330 | deployments where the total amount of memory per-cgroup is overcommited. | ||
331 | Overcommiting kernel memory limits is definitely not recommended, since the | ||
332 | box can still run out of non-reclaimable memory. | ||
333 | In this case, the admin could set up K so that the sum of all groups is | ||
334 | never greater than the total memory, and freely set U at the cost of his | ||
335 | QoS. | ||
336 | |||
337 | U != 0, K >= U: | ||
338 | Since kmem charges will also be fed to the user counter and reclaim will be | ||
339 | triggered for the cgroup for both kinds of memory. This setup gives the | ||
340 | admin a unified view of memory, and it is also useful for people who just | ||
341 | want to track kernel memory usage. | ||
342 | |||
285 | 3. User Interface | 343 | 3. User Interface |
286 | 344 | ||
287 | 0. Configuration | 345 | 0. Configuration |
@@ -290,6 +348,7 @@ a. Enable CONFIG_CGROUPS | |||
290 | b. Enable CONFIG_RESOURCE_COUNTERS | 348 | b. Enable CONFIG_RESOURCE_COUNTERS |
291 | c. Enable CONFIG_MEMCG | 349 | c. Enable CONFIG_MEMCG |
292 | d. Enable CONFIG_MEMCG_SWAP (to use swap extension) | 350 | d. Enable CONFIG_MEMCG_SWAP (to use swap extension) |
351 | d. Enable CONFIG_MEMCG_KMEM (to use kmem extension) | ||
293 | 352 | ||
294 | 1. Prepare the cgroups (see cgroups.txt, Why are cgroups needed?) | 353 | 1. Prepare the cgroups (see cgroups.txt, Why are cgroups needed?) |
295 | # mount -t tmpfs none /sys/fs/cgroup | 354 | # mount -t tmpfs none /sys/fs/cgroup |
@@ -406,6 +465,11 @@ About use_hierarchy, see Section 6. | |||
406 | Because rmdir() moves all pages to parent, some out-of-use page caches can be | 465 | Because rmdir() moves all pages to parent, some out-of-use page caches can be |
407 | moved to the parent. If you want to avoid that, force_empty will be useful. | 466 | moved to the parent. If you want to avoid that, force_empty will be useful. |
408 | 467 | ||
468 | Also, note that when memory.kmem.limit_in_bytes is set the charges due to | ||
469 | kernel pages will still be seen. This is not considered a failure and the | ||
470 | write will still return success. In this case, it is expected that | ||
471 | memory.kmem.usage_in_bytes == memory.usage_in_bytes. | ||
472 | |||
409 | About use_hierarchy, see Section 6. | 473 | About use_hierarchy, see Section 6. |
410 | 474 | ||
411 | 5.2 stat file | 475 | 5.2 stat file |
@@ -466,6 +530,10 @@ Note: | |||
466 | 5.3 swappiness | 530 | 5.3 swappiness |
467 | 531 | ||
468 | Similar to /proc/sys/vm/swappiness, but affecting a hierarchy of groups only. | 532 | Similar to /proc/sys/vm/swappiness, but affecting a hierarchy of groups only. |
533 | Please note that unlike the global swappiness, memcg knob set to 0 | ||
534 | really prevents from any swapping even if there is a swap storage | ||
535 | available. This might lead to memcg OOM killer if there are no file | ||
536 | pages to reclaim. | ||
469 | 537 | ||
470 | Following cgroups' swappiness can't be changed. | 538 | Following cgroups' swappiness can't be changed. |
471 | - root cgroup (uses /proc/sys/vm/swappiness). | 539 | - root cgroup (uses /proc/sys/vm/swappiness). |
diff --git a/Documentation/cgroups/net_prio.txt b/Documentation/cgroups/net_prio.txt index 01b322635591..a82cbd28ea8a 100644 --- a/Documentation/cgroups/net_prio.txt +++ b/Documentation/cgroups/net_prio.txt | |||
@@ -51,3 +51,5 @@ One usage for the net_prio cgroup is with mqprio qdisc allowing application | |||
51 | traffic to be steered to hardware/driver based traffic classes. These mappings | 51 | traffic to be steered to hardware/driver based traffic classes. These mappings |
52 | can then be managed by administrators or other networking protocols such as | 52 | can then be managed by administrators or other networking protocols such as |
53 | DCBX. | 53 | DCBX. |
54 | |||
55 | A new net_prio cgroup inherits the parent's configuration. | ||
diff --git a/Documentation/cgroups/resource_counter.txt b/Documentation/cgroups/resource_counter.txt index 0c4a344e78fa..c4d99ed0b418 100644 --- a/Documentation/cgroups/resource_counter.txt +++ b/Documentation/cgroups/resource_counter.txt | |||
@@ -83,16 +83,17 @@ to work with it. | |||
83 | res_counter->lock internally (it must be called with res_counter->lock | 83 | res_counter->lock internally (it must be called with res_counter->lock |
84 | held). The force parameter indicates whether we can bypass the limit. | 84 | held). The force parameter indicates whether we can bypass the limit. |
85 | 85 | ||
86 | e. void res_counter_uncharge[_locked] | 86 | e. u64 res_counter_uncharge[_locked] |
87 | (struct res_counter *rc, unsigned long val) | 87 | (struct res_counter *rc, unsigned long val) |
88 | 88 | ||
89 | When a resource is released (freed) it should be de-accounted | 89 | When a resource is released (freed) it should be de-accounted |
90 | from the resource counter it was accounted to. This is called | 90 | from the resource counter it was accounted to. This is called |
91 | "uncharging". | 91 | "uncharging". The return value of this function indicate the amount |
92 | of charges still present in the counter. | ||
92 | 93 | ||
93 | The _locked routines imply that the res_counter->lock is taken. | 94 | The _locked routines imply that the res_counter->lock is taken. |
94 | 95 | ||
95 | f. void res_counter_uncharge_until | 96 | f. u64 res_counter_uncharge_until |
96 | (struct res_counter *rc, struct res_counter *top, | 97 | (struct res_counter *rc, struct res_counter *top, |
97 | unsinged long val) | 98 | unsinged long val) |
98 | 99 | ||
diff --git a/Documentation/cpu-hotplug.txt b/Documentation/cpu-hotplug.txt index 66ef8f35613d..9f401350f502 100644 --- a/Documentation/cpu-hotplug.txt +++ b/Documentation/cpu-hotplug.txt | |||
@@ -207,6 +207,30 @@ by making it not-removable. | |||
207 | 207 | ||
208 | In such cases you will also notice that the online file is missing under cpu0. | 208 | In such cases you will also notice that the online file is missing under cpu0. |
209 | 209 | ||
210 | Q: Is CPU0 removable on X86? | ||
211 | A: Yes. If kernel is compiled with CONFIG_BOOTPARAM_HOTPLUG_CPU0=y, CPU0 is | ||
212 | removable by default. Otherwise, CPU0 is also removable by kernel option | ||
213 | cpu0_hotplug. | ||
214 | |||
215 | But some features depend on CPU0. Two known dependencies are: | ||
216 | |||
217 | 1. Resume from hibernate/suspend depends on CPU0. Hibernate/suspend will fail if | ||
218 | CPU0 is offline and you need to online CPU0 before hibernate/suspend can | ||
219 | continue. | ||
220 | 2. PIC interrupts also depend on CPU0. CPU0 can't be removed if a PIC interrupt | ||
221 | is detected. | ||
222 | |||
223 | It's said poweroff/reboot may depend on CPU0 on some machines although I haven't | ||
224 | seen any poweroff/reboot failure so far after CPU0 is offline on a few tested | ||
225 | machines. | ||
226 | |||
227 | Please let me know if you know or see any other dependencies of CPU0. | ||
228 | |||
229 | If the dependencies are under your control, you can turn on CPU0 hotplug feature | ||
230 | either by CONFIG_BOOTPARAM_HOTPLUG_CPU0 or by kernel parameter cpu0_hotplug. | ||
231 | |||
232 | --Fenghua Yu <fenghua.yu@intel.com> | ||
233 | |||
210 | Q: How do i find out if a particular CPU is not removable? | 234 | Q: How do i find out if a particular CPU is not removable? |
211 | A: Depending on the implementation, some architectures may show this by the | 235 | A: Depending on the implementation, some architectures may show this by the |
212 | absence of the "online" file. This is done if it can be determined ahead of | 236 | absence of the "online" file. This is done if it can be determined ahead of |
diff --git a/Documentation/devices.txt b/Documentation/devices.txt index b6251cca9263..08f01e79c41a 100644 --- a/Documentation/devices.txt +++ b/Documentation/devices.txt | |||
@@ -2561,9 +2561,6 @@ Your cooperation is appreciated. | |||
2561 | 192 = /dev/usb/yurex1 First USB Yurex device | 2561 | 192 = /dev/usb/yurex1 First USB Yurex device |
2562 | ... | 2562 | ... |
2563 | 209 = /dev/usb/yurex16 16th USB Yurex device | 2563 | 209 = /dev/usb/yurex16 16th USB Yurex device |
2564 | 240 = /dev/usb/dabusb0 First daubusb device | ||
2565 | ... | ||
2566 | 243 = /dev/usb/dabusb3 Fourth dabusb device | ||
2567 | 2564 | ||
2568 | 180 block USB block devices | 2565 | 180 block USB block devices |
2569 | 0 = /dev/uba First USB block device | 2566 | 0 = /dev/uba First USB block device |
diff --git a/Documentation/devicetree/bindings/arm/altera/socfpga-reset.txt b/Documentation/devicetree/bindings/arm/altera/socfpga-reset.txt new file mode 100644 index 000000000000..ecdb57d69dbf --- /dev/null +++ b/Documentation/devicetree/bindings/arm/altera/socfpga-reset.txt | |||
@@ -0,0 +1,11 @@ | |||
1 | Altera SOCFPGA Reset Manager | ||
2 | |||
3 | Required properties: | ||
4 | - compatible : "altr,rst-mgr" | ||
5 | - reg : Should contain 1 register ranges(address and length) | ||
6 | |||
7 | Example: | ||
8 | rstmgr@ffd05000 { | ||
9 | compatible = "altr,rst-mgr"; | ||
10 | reg = <0xffd05000 0x1000>; | ||
11 | }; | ||
diff --git a/Documentation/devicetree/bindings/arm/altera/socfpga-system.txt b/Documentation/devicetree/bindings/arm/altera/socfpga-system.txt new file mode 100644 index 000000000000..07c65e3cdcbe --- /dev/null +++ b/Documentation/devicetree/bindings/arm/altera/socfpga-system.txt | |||
@@ -0,0 +1,11 @@ | |||
1 | Altera SOCFPGA System Manager | ||
2 | |||
3 | Required properties: | ||
4 | - compatible : "altr,sys-mgr" | ||
5 | - reg : Should contain 1 register ranges(address and length) | ||
6 | |||
7 | Example: | ||
8 | sysmgr@ffd08000 { | ||
9 | compatible = "altr,sys-mgr"; | ||
10 | reg = <0xffd08000 0x1000>; | ||
11 | }; | ||
diff --git a/Documentation/devicetree/bindings/arm/arm-boards b/Documentation/devicetree/bindings/arm/arm-boards index fc81a7d6b0f1..db5858e32d3f 100644 --- a/Documentation/devicetree/bindings/arm/arm-boards +++ b/Documentation/devicetree/bindings/arm/arm-boards | |||
@@ -9,6 +9,10 @@ Required properties (in root node): | |||
9 | 9 | ||
10 | FPGA type interrupt controllers, see the versatile-fpga-irq binding doc. | 10 | FPGA type interrupt controllers, see the versatile-fpga-irq binding doc. |
11 | 11 | ||
12 | In the root node the Integrator/CP must have a /cpcon node pointing | ||
13 | to the CP control registers, and the Integrator/AP must have a | ||
14 | /syscon node pointing to the Integrator/AP system controller. | ||
15 | |||
12 | 16 | ||
13 | ARM Versatile Application and Platform Baseboards | 17 | ARM Versatile Application and Platform Baseboards |
14 | ------------------------------------------------- | 18 | ------------------------------------------------- |
diff --git a/Documentation/devicetree/bindings/arm/armada-370-xp-mpic.txt b/Documentation/devicetree/bindings/arm/armada-370-xp-mpic.txt index 70c0dc5f00ed..61df564c0d23 100644 --- a/Documentation/devicetree/bindings/arm/armada-370-xp-mpic.txt +++ b/Documentation/devicetree/bindings/arm/armada-370-xp-mpic.txt | |||
@@ -6,9 +6,15 @@ Required properties: | |||
6 | - interrupt-controller: Identifies the node as an interrupt controller. | 6 | - interrupt-controller: Identifies the node as an interrupt controller. |
7 | - #interrupt-cells: The number of cells to define the interrupts. Should be 1. | 7 | - #interrupt-cells: The number of cells to define the interrupts. Should be 1. |
8 | The cell is the IRQ number | 8 | The cell is the IRQ number |
9 | |||
9 | - reg: Should contain PMIC registers location and length. First pair | 10 | - reg: Should contain PMIC registers location and length. First pair |
10 | for the main interrupt registers, second pair for the per-CPU | 11 | for the main interrupt registers, second pair for the per-CPU |
11 | interrupt registers | 12 | interrupt registers. For this last pair, to be compliant with SMP |
13 | support, the "virtual" must be use (For the record, these registers | ||
14 | automatically map to the interrupt controller registers of the | ||
15 | current CPU) | ||
16 | |||
17 | |||
12 | 18 | ||
13 | Example: | 19 | Example: |
14 | 20 | ||
@@ -18,6 +24,6 @@ Example: | |||
18 | #address-cells = <1>; | 24 | #address-cells = <1>; |
19 | #size-cells = <1>; | 25 | #size-cells = <1>; |
20 | interrupt-controller; | 26 | interrupt-controller; |
21 | reg = <0xd0020000 0x1000>, | 27 | reg = <0xd0020a00 0x1d0>, |
22 | <0xd0021000 0x1000>; | 28 | <0xd0021070 0x58>; |
23 | }; | 29 | }; |
diff --git a/Documentation/devicetree/bindings/arm/armada-370-xp-pmsu.txt b/Documentation/devicetree/bindings/arm/armada-370-xp-pmsu.txt new file mode 100644 index 000000000000..926b4d6aae7e --- /dev/null +++ b/Documentation/devicetree/bindings/arm/armada-370-xp-pmsu.txt | |||
@@ -0,0 +1,20 @@ | |||
1 | Power Management Service Unit(PMSU) | ||
2 | ----------------------------------- | ||
3 | Available on Marvell SOCs: Armada 370 and Armada XP | ||
4 | |||
5 | Required properties: | ||
6 | |||
7 | - compatible: "marvell,armada-370-xp-pmsu" | ||
8 | |||
9 | - reg: Should contain PMSU registers location and length. First pair | ||
10 | for the per-CPU SW Reset Control registers, second pair for the | ||
11 | Power Management Service Unit. | ||
12 | |||
13 | Example: | ||
14 | |||
15 | armada-370-xp-pmsu@d0022000 { | ||
16 | compatible = "marvell,armada-370-xp-pmsu"; | ||
17 | reg = <0xd0022100 0x430>, | ||
18 | <0xd0020800 0x20>; | ||
19 | }; | ||
20 | |||
diff --git a/Documentation/devicetree/bindings/arm/armada-370-xp-timer.txt b/Documentation/devicetree/bindings/arm/armada-370-xp-timer.txt index 8b6ea2267c94..64830118b013 100644 --- a/Documentation/devicetree/bindings/arm/armada-370-xp-timer.txt +++ b/Documentation/devicetree/bindings/arm/armada-370-xp-timer.txt | |||
@@ -5,6 +5,7 @@ Required properties: | |||
5 | - compatible: Should be "marvell,armada-370-xp-timer" | 5 | - compatible: Should be "marvell,armada-370-xp-timer" |
6 | - interrupts: Should contain the list of Global Timer interrupts | 6 | - interrupts: Should contain the list of Global Timer interrupts |
7 | - reg: Should contain the base address of the Global Timer registers | 7 | - reg: Should contain the base address of the Global Timer registers |
8 | - clocks: clock driving the timer hardware | ||
8 | 9 | ||
9 | Optional properties: | 10 | Optional properties: |
10 | - marvell,timer-25Mhz: Tells whether the Global timer supports the 25 | 11 | - marvell,timer-25Mhz: Tells whether the Global timer supports the 25 |
diff --git a/Documentation/devicetree/bindings/arm/atmel-at91.txt b/Documentation/devicetree/bindings/arm/atmel-at91.txt index ecc81e368715..1196290082d1 100644 --- a/Documentation/devicetree/bindings/arm/atmel-at91.txt +++ b/Documentation/devicetree/bindings/arm/atmel-at91.txt | |||
@@ -7,8 +7,14 @@ PIT Timer required properties: | |||
7 | - interrupts: Should contain interrupt for the PIT which is the IRQ line | 7 | - interrupts: Should contain interrupt for the PIT which is the IRQ line |
8 | shared across all System Controller members. | 8 | shared across all System Controller members. |
9 | 9 | ||
10 | System Timer (ST) required properties: | ||
11 | - compatible: Should be "atmel,at91rm9200-st" | ||
12 | - reg: Should contain registers location and length | ||
13 | - interrupts: Should contain interrupt for the ST which is the IRQ line | ||
14 | shared across all System Controller members. | ||
15 | |||
10 | TC/TCLIB Timer required properties: | 16 | TC/TCLIB Timer required properties: |
11 | - compatible: Should be "atmel,<chip>-pit". | 17 | - compatible: Should be "atmel,<chip>-tcb". |
12 | <chip> can be "at91rm9200" or "at91sam9x5" | 18 | <chip> can be "at91rm9200" or "at91sam9x5" |
13 | - reg: Should contain registers location and length | 19 | - reg: Should contain registers location and length |
14 | - interrupts: Should contain all interrupts for the TC block | 20 | - interrupts: Should contain all interrupts for the TC block |
diff --git a/Documentation/devicetree/bindings/arm/bcm/bcm11351.txt b/Documentation/devicetree/bindings/arm/bcm/bcm11351.txt new file mode 100644 index 000000000000..fb7b5cd2652f --- /dev/null +++ b/Documentation/devicetree/bindings/arm/bcm/bcm11351.txt | |||
@@ -0,0 +1,9 @@ | |||
1 | Broadcom BCM11351 device tree bindings | ||
2 | ------------------------------------------- | ||
3 | |||
4 | Boards with the bcm281xx SoC family (which includes bcm11130, bcm11140, | ||
5 | bcm11351, bcm28145, bcm28155 SoCs) shall have the following properties: | ||
6 | |||
7 | Required root node property: | ||
8 | |||
9 | compatible = "bcm,bcm11351"; | ||
diff --git a/Documentation/devicetree/bindings/arm/calxeda.txt b/Documentation/devicetree/bindings/arm/calxeda.txt index 4755caaccba6..25fcf96795ca 100644 --- a/Documentation/devicetree/bindings/arm/calxeda.txt +++ b/Documentation/devicetree/bindings/arm/calxeda.txt | |||
@@ -1,8 +1,15 @@ | |||
1 | Calxeda Highbank Platforms Device Tree Bindings | 1 | Calxeda Platforms Device Tree Bindings |
2 | ----------------------------------------------- | 2 | ----------------------------------------------- |
3 | 3 | ||
4 | Boards with Calxeda Cortex-A9 based Highbank SOC shall have the following | 4 | Boards with Calxeda Cortex-A9 based ECX-1000 (Highbank) SOC shall have the |
5 | properties. | 5 | following properties. |
6 | 6 | ||
7 | Required root node properties: | 7 | Required root node properties: |
8 | - compatible = "calxeda,highbank"; | 8 | - compatible = "calxeda,highbank"; |
9 | |||
10 | |||
11 | Boards with Calxeda Cortex-A15 based ECX-2000 SOC shall have the following | ||
12 | properties. | ||
13 | |||
14 | Required root node properties: | ||
15 | - compatible = "calxeda,ecx-2000"; | ||
diff --git a/Documentation/devicetree/bindings/arm/coherency-fabric.txt b/Documentation/devicetree/bindings/arm/coherency-fabric.txt new file mode 100644 index 000000000000..17d8cd107559 --- /dev/null +++ b/Documentation/devicetree/bindings/arm/coherency-fabric.txt | |||
@@ -0,0 +1,21 @@ | |||
1 | Coherency fabric | ||
2 | ---------------- | ||
3 | Available on Marvell SOCs: Armada 370 and Armada XP | ||
4 | |||
5 | Required properties: | ||
6 | |||
7 | - compatible: "marvell,coherency-fabric" | ||
8 | |||
9 | - reg: Should contain coherency fabric registers location and | ||
10 | length. First pair for the coherency fabric registers, second pair | ||
11 | for the per-CPU fabric registers registers. | ||
12 | |||
13 | Example: | ||
14 | |||
15 | coherency-fabric@d0020200 { | ||
16 | compatible = "marvell,coherency-fabric"; | ||
17 | reg = <0xd0020200 0xb0>, | ||
18 | <0xd0021810 0x1c>; | ||
19 | |||
20 | }; | ||
21 | |||
diff --git a/Documentation/devicetree/bindings/arm/cpus.txt b/Documentation/devicetree/bindings/arm/cpus.txt new file mode 100644 index 000000000000..f32494dbfe19 --- /dev/null +++ b/Documentation/devicetree/bindings/arm/cpus.txt | |||
@@ -0,0 +1,77 @@ | |||
1 | * ARM CPUs binding description | ||
2 | |||
3 | The device tree allows to describe the layout of CPUs in a system through | ||
4 | the "cpus" node, which in turn contains a number of subnodes (ie "cpu") | ||
5 | defining properties for every cpu. | ||
6 | |||
7 | Bindings for CPU nodes follow the ePAPR standard, available from: | ||
8 | |||
9 | http://devicetree.org | ||
10 | |||
11 | For the ARM architecture every CPU node must contain the following properties: | ||
12 | |||
13 | - device_type: must be "cpu" | ||
14 | - reg: property matching the CPU MPIDR[23:0] register bits | ||
15 | reg[31:24] bits must be set to 0 | ||
16 | - compatible: should be one of: | ||
17 | "arm,arm1020" | ||
18 | "arm,arm1020e" | ||
19 | "arm,arm1022" | ||
20 | "arm,arm1026" | ||
21 | "arm,arm720" | ||
22 | "arm,arm740" | ||
23 | "arm,arm7tdmi" | ||
24 | "arm,arm920" | ||
25 | "arm,arm922" | ||
26 | "arm,arm925" | ||
27 | "arm,arm926" | ||
28 | "arm,arm940" | ||
29 | "arm,arm946" | ||
30 | "arm,arm9tdmi" | ||
31 | "arm,cortex-a5" | ||
32 | "arm,cortex-a7" | ||
33 | "arm,cortex-a8" | ||
34 | "arm,cortex-a9" | ||
35 | "arm,cortex-a15" | ||
36 | "arm,arm1136" | ||
37 | "arm,arm1156" | ||
38 | "arm,arm1176" | ||
39 | "arm,arm11mpcore" | ||
40 | "faraday,fa526" | ||
41 | "intel,sa110" | ||
42 | "intel,sa1100" | ||
43 | "marvell,feroceon" | ||
44 | "marvell,mohawk" | ||
45 | "marvell,xsc3" | ||
46 | "marvell,xscale" | ||
47 | |||
48 | Example: | ||
49 | |||
50 | cpus { | ||
51 | #size-cells = <0>; | ||
52 | #address-cells = <1>; | ||
53 | |||
54 | CPU0: cpu@0 { | ||
55 | device_type = "cpu"; | ||
56 | compatible = "arm,cortex-a15"; | ||
57 | reg = <0x0>; | ||
58 | }; | ||
59 | |||
60 | CPU1: cpu@1 { | ||
61 | device_type = "cpu"; | ||
62 | compatible = "arm,cortex-a15"; | ||
63 | reg = <0x1>; | ||
64 | }; | ||
65 | |||
66 | CPU2: cpu@100 { | ||
67 | device_type = "cpu"; | ||
68 | compatible = "arm,cortex-a7"; | ||
69 | reg = <0x100>; | ||
70 | }; | ||
71 | |||
72 | CPU3: cpu@101 { | ||
73 | device_type = "cpu"; | ||
74 | compatible = "arm,cortex-a7"; | ||
75 | reg = <0x101>; | ||
76 | }; | ||
77 | }; | ||
diff --git a/Documentation/devicetree/bindings/arm/davinci.txt b/Documentation/devicetree/bindings/arm/davinci.txt new file mode 100644 index 000000000000..cfaeda4274e6 --- /dev/null +++ b/Documentation/devicetree/bindings/arm/davinci.txt | |||
@@ -0,0 +1,17 @@ | |||
1 | Texas Instruments DaVinci Platforms Device Tree Bindings | ||
2 | -------------------------------------------------------- | ||
3 | |||
4 | DA850/OMAP-L138/AM18x Evaluation Module (EVM) board | ||
5 | Required root node properties: | ||
6 | - compatible = "ti,da850-evm", "ti,da850"; | ||
7 | |||
8 | EnBW AM1808 based CMC board | ||
9 | Required root node properties: | ||
10 | - compatible = "enbw,cmc", "ti,da850; | ||
11 | |||
12 | Generic DaVinci Boards | ||
13 | ---------------------- | ||
14 | |||
15 | DA850/OMAP-L138/AM18x generic board | ||
16 | Required root node properties: | ||
17 | - compatible = "ti,da850"; | ||
diff --git a/Documentation/devicetree/bindings/arm/davinci/nand.txt b/Documentation/devicetree/bindings/arm/davinci/nand.txt index e37241f1fdd8..3545ea704b50 100644 --- a/Documentation/devicetree/bindings/arm/davinci/nand.txt +++ b/Documentation/devicetree/bindings/arm/davinci/nand.txt | |||
@@ -23,29 +23,24 @@ Recommended properties : | |||
23 | - ti,davinci-nand-buswidth: buswidth 8 or 16 | 23 | - ti,davinci-nand-buswidth: buswidth 8 or 16 |
24 | - ti,davinci-nand-use-bbt: use flash based bad block table support. | 24 | - ti,davinci-nand-use-bbt: use flash based bad block table support. |
25 | 25 | ||
26 | Example (enbw_cmc board): | 26 | nand device bindings may contain additional sub-nodes describing |
27 | aemif@60000000 { | 27 | partitions of the address space. See partition.txt for more detail. |
28 | compatible = "ti,davinci-aemif"; | 28 | |
29 | #address-cells = <2>; | 29 | Example(da850 EVM ): |
30 | #size-cells = <1>; | 30 | nand_cs3@62000000 { |
31 | reg = <0x68000000 0x80000>; | 31 | compatible = "ti,davinci-nand"; |
32 | ranges = <2 0 0x60000000 0x02000000 | 32 | reg = <0x62000000 0x807ff |
33 | 3 0 0x62000000 0x02000000 | 33 | 0x68000000 0x8000>; |
34 | 4 0 0x64000000 0x02000000 | 34 | ti,davinci-chipselect = <1>; |
35 | 5 0 0x66000000 0x02000000 | 35 | ti,davinci-mask-ale = <0>; |
36 | 6 0 0x68000000 0x02000000>; | 36 | ti,davinci-mask-cle = <0>; |
37 | nand@3,0 { | 37 | ti,davinci-mask-chipsel = <0>; |
38 | compatible = "ti,davinci-nand"; | 38 | ti,davinci-ecc-mode = "hw"; |
39 | reg = <3 0x0 0x807ff | 39 | ti,davinci-ecc-bits = <4>; |
40 | 6 0x0 0x8000>; | 40 | ti,davinci-nand-use-bbt; |
41 | #address-cells = <1>; | 41 | |
42 | #size-cells = <1>; | 42 | partition@180000 { |
43 | ti,davinci-chipselect = <1>; | 43 | label = "ubifs"; |
44 | ti,davinci-mask-ale = <0>; | 44 | reg = <0x180000 0x7e80000>; |
45 | ti,davinci-mask-cle = <0>; | ||
46 | ti,davinci-mask-chipsel = <0>; | ||
47 | ti,davinci-ecc-mode = "hw"; | ||
48 | ti,davinci-ecc-bits = <4>; | ||
49 | ti,davinci-nand-use-bbt; | ||
50 | }; | 45 | }; |
51 | }; | 46 | }; |
diff --git a/Documentation/devicetree/bindings/arm/exynos/power_domain.txt b/Documentation/devicetree/bindings/arm/exynos/power_domain.txt index 6528e215c5fe..5216b419016a 100644 --- a/Documentation/devicetree/bindings/arm/exynos/power_domain.txt +++ b/Documentation/devicetree/bindings/arm/exynos/power_domain.txt | |||
@@ -4,14 +4,13 @@ Exynos processors include support for multiple power domains which are used | |||
4 | to gate power to one or more peripherals on the processor. | 4 | to gate power to one or more peripherals on the processor. |
5 | 5 | ||
6 | Required Properties: | 6 | Required Properties: |
7 | - compatiable: should be one of the following. | 7 | - compatible: should be one of the following. |
8 | * samsung,exynos4210-pd - for exynos4210 type power domain. | 8 | * samsung,exynos4210-pd - for exynos4210 type power domain. |
9 | - reg: physical base address of the controller and length of memory mapped | 9 | - reg: physical base address of the controller and length of memory mapped |
10 | region. | 10 | region. |
11 | 11 | ||
12 | Optional Properties: | 12 | Node of a device using power domains must have a samsung,power-domain property |
13 | - samsung,exynos4210-pd-off: Specifies that the power domain is in turned-off | 13 | defined with a phandle to respective power domain. |
14 | state during boot and remains to be turned-off until explicitly turned-on. | ||
15 | 14 | ||
16 | Example: | 15 | Example: |
17 | 16 | ||
@@ -19,3 +18,11 @@ Example: | |||
19 | compatible = "samsung,exynos4210-pd"; | 18 | compatible = "samsung,exynos4210-pd"; |
20 | reg = <0x10023C00 0x10>; | 19 | reg = <0x10023C00 0x10>; |
21 | }; | 20 | }; |
21 | |||
22 | Example of the node using power domain: | ||
23 | |||
24 | node { | ||
25 | /* ... */ | ||
26 | samsung,power-domain = <&lcd0>; | ||
27 | /* ... */ | ||
28 | }; | ||
diff --git a/Documentation/devicetree/bindings/arm/fsl.txt b/Documentation/devicetree/bindings/arm/fsl.txt index ac9e7516756e..f79818711e83 100644 --- a/Documentation/devicetree/bindings/arm/fsl.txt +++ b/Documentation/devicetree/bindings/arm/fsl.txt | |||
@@ -41,6 +41,10 @@ i.MX6 Quad SABRE Smart Device Board | |||
41 | Required root node properties: | 41 | Required root node properties: |
42 | - compatible = "fsl,imx6q-sabresd", "fsl,imx6q"; | 42 | - compatible = "fsl,imx6q-sabresd", "fsl,imx6q"; |
43 | 43 | ||
44 | i.MX6 Quad SABRE Automotive Board | ||
45 | Required root node properties: | ||
46 | - compatible = "fsl,imx6q-sabreauto", "fsl,imx6q"; | ||
47 | |||
44 | Generic i.MX boards | 48 | Generic i.MX boards |
45 | ------------------- | 49 | ------------------- |
46 | 50 | ||
diff --git a/Documentation/devicetree/bindings/arm/l2cc.txt b/Documentation/devicetree/bindings/arm/l2cc.txt index 7ca52161e7ab..cbef09b5c8a7 100644 --- a/Documentation/devicetree/bindings/arm/l2cc.txt +++ b/Documentation/devicetree/bindings/arm/l2cc.txt | |||
@@ -10,6 +10,12 @@ Required properties: | |||
10 | "arm,pl310-cache" | 10 | "arm,pl310-cache" |
11 | "arm,l220-cache" | 11 | "arm,l220-cache" |
12 | "arm,l210-cache" | 12 | "arm,l210-cache" |
13 | "marvell,aurora-system-cache": Marvell Controller designed to be | ||
14 | compatible with the ARM one, with system cache mode (meaning | ||
15 | maintenance operations on L1 are broadcasted to the L2 and L2 | ||
16 | performs the same operation). | ||
17 | "marvell,"aurora-outer-cache: Marvell Controller designed to be | ||
18 | compatible with the ARM one with outer cache mode. | ||
13 | - cache-unified : Specifies the cache is a unified cache. | 19 | - cache-unified : Specifies the cache is a unified cache. |
14 | - cache-level : Should be set to 2 for a level 2 cache. | 20 | - cache-level : Should be set to 2 for a level 2 cache. |
15 | - reg : Physical base address and size of cache controller's memory mapped | 21 | - reg : Physical base address and size of cache controller's memory mapped |
@@ -29,6 +35,9 @@ Optional properties: | |||
29 | filter. Addresses in the filter window are directed to the M1 port. Other | 35 | filter. Addresses in the filter window are directed to the M1 port. Other |
30 | addresses will go to the M0 port. | 36 | addresses will go to the M0 port. |
31 | - interrupts : 1 combined interrupt. | 37 | - interrupts : 1 combined interrupt. |
38 | - cache-id-part: cache id part number to be used if it is not present | ||
39 | on hardware | ||
40 | - wt-override: If present then L2 is forced to Write through mode | ||
32 | 41 | ||
33 | Example: | 42 | Example: |
34 | 43 | ||
@@ -37,7 +46,7 @@ L2: cache-controller { | |||
37 | reg = <0xfff12000 0x1000>; | 46 | reg = <0xfff12000 0x1000>; |
38 | arm,data-latency = <1 1 1>; | 47 | arm,data-latency = <1 1 1>; |
39 | arm,tag-latency = <2 2 2>; | 48 | arm,tag-latency = <2 2 2>; |
40 | arm,filter-latency = <0x80000000 0x8000000>; | 49 | arm,filter-ranges = <0x80000000 0x8000000>; |
41 | cache-unified; | 50 | cache-unified; |
42 | cache-level = <2>; | 51 | cache-level = <2>; |
43 | interrupts = <45>; | 52 | interrupts = <45>; |
diff --git a/Documentation/devicetree/bindings/arm/omap/counter.txt b/Documentation/devicetree/bindings/arm/omap/counter.txt new file mode 100644 index 000000000000..5bd8aa091315 --- /dev/null +++ b/Documentation/devicetree/bindings/arm/omap/counter.txt | |||
@@ -0,0 +1,15 @@ | |||
1 | OMAP Counter-32K bindings | ||
2 | |||
3 | Required properties: | ||
4 | - compatible: Must be "ti,omap-counter32k" for OMAP controllers | ||
5 | - reg: Contains timer register address range (base address and length) | ||
6 | - ti,hwmods: Name of the hwmod associated to the counter, which is typically | ||
7 | "counter_32k" | ||
8 | |||
9 | Example: | ||
10 | |||
11 | counter32k: counter@4a304000 { | ||
12 | compatible = "ti,omap-counter32k"; | ||
13 | reg = <0x4a304000 0x20>; | ||
14 | ti,hwmods = "counter_32k"; | ||
15 | }; | ||
diff --git a/Documentation/devicetree/bindings/arm/omap/timer.txt b/Documentation/devicetree/bindings/arm/omap/timer.txt new file mode 100644 index 000000000000..8732d4d41f8b --- /dev/null +++ b/Documentation/devicetree/bindings/arm/omap/timer.txt | |||
@@ -0,0 +1,31 @@ | |||
1 | OMAP Timer bindings | ||
2 | |||
3 | Required properties: | ||
4 | - compatible: Must be "ti,omap2-timer" for OMAP2+ controllers. | ||
5 | - reg: Contains timer register address range (base address and | ||
6 | length). | ||
7 | - interrupts: Contains the interrupt information for the timer. The | ||
8 | format is being dependent on which interrupt controller | ||
9 | the OMAP device uses. | ||
10 | - ti,hwmods: Name of the hwmod associated to the timer, "timer<X>", | ||
11 | where <X> is the instance number of the timer from the | ||
12 | HW spec. | ||
13 | |||
14 | Optional properties: | ||
15 | - ti,timer-alwon: Indicates the timer is in an alway-on power domain. | ||
16 | - ti,timer-dsp: Indicates the timer can interrupt the on-chip DSP in | ||
17 | addition to the ARM CPU. | ||
18 | - ti,timer-pwm: Indicates the timer can generate a PWM output. | ||
19 | - ti,timer-secure: Indicates the timer is reserved on a secure OMAP device | ||
20 | and therefore cannot be used by the kernel. | ||
21 | |||
22 | Example: | ||
23 | |||
24 | timer12: timer@48304000 { | ||
25 | compatible = "ti,omap2-timer"; | ||
26 | reg = <0x48304000 0x400>; | ||
27 | interrupts = <95>; | ||
28 | ti,hwmods = "timer12" | ||
29 | ti,timer-alwon; | ||
30 | ti,timer-secure; | ||
31 | }; | ||
diff --git a/Documentation/devicetree/bindings/arm/spear/shirq.txt b/Documentation/devicetree/bindings/arm/spear/shirq.txt new file mode 100644 index 000000000000..13fbb8866bd6 --- /dev/null +++ b/Documentation/devicetree/bindings/arm/spear/shirq.txt | |||
@@ -0,0 +1,48 @@ | |||
1 | * SPEAr Shared IRQ layer (shirq) | ||
2 | |||
3 | SPEAr3xx architecture includes shared/multiplexed irqs for certain set | ||
4 | of devices. The multiplexor provides a single interrupt to parent | ||
5 | interrupt controller (VIC) on behalf of a group of devices. | ||
6 | |||
7 | There can be multiple groups available on SPEAr3xx variants but not | ||
8 | exceeding 4. The number of devices in a group can differ, further they | ||
9 | may share same set of status/mask registers spanning across different | ||
10 | bit masks. Also in some cases the group may not have enable or other | ||
11 | registers. This makes software little complex. | ||
12 | |||
13 | A single node in the device tree is used to describe the shared | ||
14 | interrupt multiplexor (one node for all groups). A group in the | ||
15 | interrupt controller shares config/control registers with other groups. | ||
16 | For example, a 32-bit interrupt enable/disable config register can | ||
17 | accommodate upto 4 interrupt groups. | ||
18 | |||
19 | Required properties: | ||
20 | - compatible: should be, either of | ||
21 | - "st,spear300-shirq" | ||
22 | - "st,spear310-shirq" | ||
23 | - "st,spear320-shirq" | ||
24 | - interrupt-controller: Identifies the node as an interrupt controller. | ||
25 | - #interrupt-cells: should be <1> which basically contains the offset | ||
26 | (starting from 0) of interrupts for all the groups. | ||
27 | - reg: Base address and size of shirq registers. | ||
28 | - interrupts: The list of interrupts generated by the groups which are | ||
29 | then connected to a parent interrupt controller. Each group is | ||
30 | associated with one of the interrupts, hence number of interrupts (to | ||
31 | parent) is equal to number of groups. The format of the interrupt | ||
32 | specifier depends in the interrupt parent controller. | ||
33 | |||
34 | Optional properties: | ||
35 | - interrupt-parent: pHandle of the parent interrupt controller, if not | ||
36 | inherited from the parent node. | ||
37 | |||
38 | Example: | ||
39 | |||
40 | The following is an example from the SPEAr320 SoC dtsi file. | ||
41 | |||
42 | shirq: interrupt-controller@0xb3000000 { | ||
43 | compatible = "st,spear320-shirq"; | ||
44 | reg = <0xb3000000 0x1000>; | ||
45 | interrupts = <28 29 30 1>; | ||
46 | #interrupt-cells = <1>; | ||
47 | interrupt-controller; | ||
48 | }; | ||
diff --git a/Documentation/devicetree/bindings/arm/vexpress-sysreg.txt b/Documentation/devicetree/bindings/arm/vexpress-sysreg.txt new file mode 100644 index 000000000000..9cf3f25544c7 --- /dev/null +++ b/Documentation/devicetree/bindings/arm/vexpress-sysreg.txt | |||
@@ -0,0 +1,50 @@ | |||
1 | ARM Versatile Express system registers | ||
2 | -------------------------------------- | ||
3 | |||
4 | This is a system control registers block, providing multiple low level | ||
5 | platform functions like board detection and identification, software | ||
6 | interrupt generation, MMC and NOR Flash control etc. | ||
7 | |||
8 | Required node properties: | ||
9 | - compatible value : = "arm,vexpress,sysreg"; | ||
10 | - reg : physical base address and the size of the registers window | ||
11 | - gpio-controller : specifies that the node is a GPIO controller | ||
12 | - #gpio-cells : size of the GPIO specifier, should be 2: | ||
13 | - first cell is the pseudo-GPIO line number: | ||
14 | 0 - MMC CARDIN | ||
15 | 1 - MMC WPROT | ||
16 | 2 - NOR FLASH WPn | ||
17 | - second cell can take standard GPIO flags (currently ignored). | ||
18 | |||
19 | Example: | ||
20 | v2m_sysreg: sysreg@10000000 { | ||
21 | compatible = "arm,vexpress-sysreg"; | ||
22 | reg = <0x10000000 0x1000>; | ||
23 | gpio-controller; | ||
24 | #gpio-cells = <2>; | ||
25 | }; | ||
26 | |||
27 | This block also can also act a bridge to the platform's configuration | ||
28 | bus via "system control" interface, addressing devices with site number, | ||
29 | position in the board stack, config controller, function and device | ||
30 | numbers - see motherboard's TRM for more details. | ||
31 | |||
32 | The node describing a config device must refer to the sysreg node via | ||
33 | "arm,vexpress,config-bridge" phandle (can be also defined in the node's | ||
34 | parent) and relies on the board topology properties - see main vexpress | ||
35 | node documentation for more details. It must must also define the | ||
36 | following property: | ||
37 | - arm,vexpress-sysreg,func : must contain two cells: | ||
38 | - first cell defines function number (eg. 1 for clock generator, | ||
39 | 2 for voltage regulators etc.) | ||
40 | - device number (eg. osc 0, osc 1 etc.) | ||
41 | |||
42 | Example: | ||
43 | mcc { | ||
44 | arm,vexpress,config-bridge = <&v2m_sysreg>; | ||
45 | |||
46 | osc@0 { | ||
47 | compatible = "arm,vexpress-osc"; | ||
48 | arm,vexpress-sysreg,func = <1 0>; | ||
49 | }; | ||
50 | }; | ||
diff --git a/Documentation/devicetree/bindings/arm/vexpress.txt b/Documentation/devicetree/bindings/arm/vexpress.txt index ec8b50cbb2e8..ae49161e478a 100644 --- a/Documentation/devicetree/bindings/arm/vexpress.txt +++ b/Documentation/devicetree/bindings/arm/vexpress.txt | |||
@@ -11,6 +11,10 @@ the motherboard file using a /include/ directive. As the motherboard | |||
11 | can be initialized in one of two different configurations ("memory | 11 | can be initialized in one of two different configurations ("memory |
12 | maps"), care must be taken to include the correct one. | 12 | maps"), care must be taken to include the correct one. |
13 | 13 | ||
14 | |||
15 | Root node | ||
16 | --------- | ||
17 | |||
14 | Required properties in the root node: | 18 | Required properties in the root node: |
15 | - compatible value: | 19 | - compatible value: |
16 | compatible = "arm,vexpress,<model>", "arm,vexpress"; | 20 | compatible = "arm,vexpress,<model>", "arm,vexpress"; |
@@ -45,6 +49,10 @@ Optional properties in the root node: | |||
45 | - Coretile Express A9x4 (V2P-CA9) HBI-0225: | 49 | - Coretile Express A9x4 (V2P-CA9) HBI-0225: |
46 | arm,hbi = <0x225>; | 50 | arm,hbi = <0x225>; |
47 | 51 | ||
52 | |||
53 | CPU nodes | ||
54 | --------- | ||
55 | |||
48 | Top-level standard "cpus" node is required. It must contain a node | 56 | Top-level standard "cpus" node is required. It must contain a node |
49 | with device_type = "cpu" property for every available core, eg.: | 57 | with device_type = "cpu" property for every available core, eg.: |
50 | 58 | ||
@@ -59,6 +67,52 @@ with device_type = "cpu" property for every available core, eg.: | |||
59 | }; | 67 | }; |
60 | }; | 68 | }; |
61 | 69 | ||
70 | |||
71 | Configuration infrastructure | ||
72 | ---------------------------- | ||
73 | |||
74 | The platform has an elaborated configuration system, consisting of | ||
75 | microcontrollers residing on the mother- and daughterboards known | ||
76 | as Motherboard/Daughterboard Configuration Controller (MCC and DCC). | ||
77 | The controllers are responsible for the platform initialization | ||
78 | (reset generation, flash programming, FPGA bitfiles loading etc.) | ||
79 | but also control clock generators, voltage regulators, gather | ||
80 | environmental data like temperature, power consumption etc. Even | ||
81 | the video output switch (FPGA) is controlled that way. | ||
82 | |||
83 | Nodes describing devices controlled by this infrastructure should | ||
84 | point at the bridge device node: | ||
85 | - bridge phandle: | ||
86 | arm,vexpress,config-bridge = <phandle>; | ||
87 | This property can be also defined in a parent node (eg. for a DCC) | ||
88 | and is effective for all children. | ||
89 | |||
90 | |||
91 | Platform topology | ||
92 | ----------------- | ||
93 | |||
94 | As Versatile Express can be configured in number of physically | ||
95 | different setups, the device tree should describe platform topology. | ||
96 | Root node and main motherboard node must define the following | ||
97 | property, describing physical location of the children nodes: | ||
98 | - site number: | ||
99 | arm,vexpress,site = <number>; | ||
100 | where 0 means motherboard, 1 or 2 are daugtherboard sites, | ||
101 | 0xf means "master" site (site containing main CPU tile) | ||
102 | - when daughterboards are stacked on one site, their position | ||
103 | in the stack be be described with: | ||
104 | arm,vexpress,position = <number>; | ||
105 | - when describing tiles consisting more than one DCC, its number | ||
106 | can be described with: | ||
107 | arm,vexpress,dcc = <number>; | ||
108 | |||
109 | Any of the numbers above defaults to zero if not defined in | ||
110 | the node or any of its parent. | ||
111 | |||
112 | |||
113 | Motherboard | ||
114 | ----------- | ||
115 | |||
62 | The motherboard description file provides a single "motherboard" node | 116 | The motherboard description file provides a single "motherboard" node |
63 | using 2 address cells corresponding to the Static Memory Bus used | 117 | using 2 address cells corresponding to the Static Memory Bus used |
64 | between the motherboard and the tile. The first cell defines the Chip | 118 | between the motherboard and the tile. The first cell defines the Chip |
@@ -87,22 +141,30 @@ can be used to obtain required phandle in the tile's "aliases" node: | |||
87 | - SP804 timers: | 141 | - SP804 timers: |
88 | v2m_timer01 and v2m_timer23 | 142 | v2m_timer01 and v2m_timer23 |
89 | 143 | ||
90 | Current Linux implementation requires a "arm,v2m_timer" alias | 144 | The tile description should define a "smb" node, describing the |
91 | pointing at one of the motherboard's SP804 timers, if it is to be | 145 | Static Memory Bus between the tile and motherboard. It must define |
92 | used as the system timer. This alias should be defined in the | 146 | the following properties: |
93 | motherboard files. | 147 | - "simple-bus" compatible value (to ensure creation of the children) |
148 | compatible = "simple-bus"; | ||
149 | - mapping of the SMB CS/offset addresses into main address space: | ||
150 | #address-cells = <2>; | ||
151 | #size-cells = <1>; | ||
152 | ranges = <...>; | ||
153 | - interrupts mapping: | ||
154 | #interrupt-cells = <1>; | ||
155 | interrupt-map-mask = <0 0 63>; | ||
156 | interrupt-map = <...>; | ||
94 | 157 | ||
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 | 158 | ||
99 | Abbreviated example: | 159 | Example of a VE tile description (simplified) |
160 | --------------------------------------------- | ||
100 | 161 | ||
101 | /dts-v1/; | 162 | /dts-v1/; |
102 | 163 | ||
103 | / { | 164 | / { |
104 | model = "V2P-CA5s"; | 165 | model = "V2P-CA5s"; |
105 | arm,hbi = <0x225>; | 166 | arm,hbi = <0x225>; |
167 | arm,vexpress,site = <0xf>; | ||
106 | compatible = "arm,vexpress-v2p-ca5s", "arm,vexpress"; | 168 | compatible = "arm,vexpress-v2p-ca5s", "arm,vexpress"; |
107 | interrupt-parent = <&gic>; | 169 | interrupt-parent = <&gic>; |
108 | #address-cells = <1>; | 170 | #address-cells = <1>; |
@@ -134,13 +196,29 @@ Abbreviated example: | |||
134 | <0x2c000100 0x100>; | 196 | <0x2c000100 0x100>; |
135 | }; | 197 | }; |
136 | 198 | ||
137 | motherboard { | 199 | dcc { |
200 | compatible = "simple-bus"; | ||
201 | arm,vexpress,config-bridge = <&v2m_sysreg>; | ||
202 | |||
203 | osc@0 { | ||
204 | compatible = "arm,vexpress-osc"; | ||
205 | }; | ||
206 | }; | ||
207 | |||
208 | smb { | ||
209 | compatible = "simple-bus"; | ||
210 | |||
211 | #address-cells = <2>; | ||
212 | #size-cells = <1>; | ||
138 | /* CS0 is visible at 0x08000000 */ | 213 | /* CS0 is visible at 0x08000000 */ |
139 | ranges = <0 0 0x08000000 0x04000000>; | 214 | ranges = <0 0 0x08000000 0x04000000>; |
215 | |||
216 | #interrupt-cells = <1>; | ||
140 | interrupt-map-mask = <0 0 63>; | 217 | interrupt-map-mask = <0 0 63>; |
141 | /* Active high IRQ 0 is connected to GIC's SPI0 */ | 218 | /* Active high IRQ 0 is connected to GIC's SPI0 */ |
142 | interrupt-map = <0 0 0 &gic 0 0 4>; | 219 | interrupt-map = <0 0 0 &gic 0 0 4>; |
220 | |||
221 | /include/ "vexpress-v2m-rs1.dtsi" | ||
143 | }; | 222 | }; |
144 | }; | 223 | }; |
145 | 224 | ||
146 | /include/ "vexpress-v2m-rs1.dtsi" | ||
diff --git a/Documentation/devicetree/bindings/ata/exynos-sata-phy.txt b/Documentation/devicetree/bindings/ata/exynos-sata-phy.txt new file mode 100644 index 000000000000..37824fac688e --- /dev/null +++ b/Documentation/devicetree/bindings/ata/exynos-sata-phy.txt | |||
@@ -0,0 +1,14 @@ | |||
1 | * Samsung SATA PHY Controller | ||
2 | |||
3 | SATA PHY nodes are defined to describe on-chip SATA Physical layer controllers. | ||
4 | Each SATA PHY controller should have its own node. | ||
5 | |||
6 | Required properties: | ||
7 | - compatible : compatible list, contains "samsung,exynos5-sata-phy" | ||
8 | - reg : <registers mapping> | ||
9 | |||
10 | Example: | ||
11 | sata@ffe07000 { | ||
12 | compatible = "samsung,exynos5-sata-phy"; | ||
13 | reg = <0xffe07000 0x1000>; | ||
14 | }; | ||
diff --git a/Documentation/devicetree/bindings/ata/exynos-sata.txt b/Documentation/devicetree/bindings/ata/exynos-sata.txt new file mode 100644 index 000000000000..0849f1025e34 --- /dev/null +++ b/Documentation/devicetree/bindings/ata/exynos-sata.txt | |||
@@ -0,0 +1,17 @@ | |||
1 | * Samsung AHCI SATA Controller | ||
2 | |||
3 | SATA nodes are defined to describe on-chip Serial ATA controllers. | ||
4 | Each SATA controller should have its own node. | ||
5 | |||
6 | Required properties: | ||
7 | - compatible : compatible list, contains "samsung,exynos5-sata" | ||
8 | - interrupts : <interrupt mapping for SATA IRQ> | ||
9 | - reg : <registers mapping> | ||
10 | - samsung,sata-freq : <frequency in MHz> | ||
11 | |||
12 | Example: | ||
13 | sata@ffe08000 { | ||
14 | compatible = "samsung,exynos5-sata"; | ||
15 | reg = <0xffe08000 0x1000>; | ||
16 | interrupts = <115>; | ||
17 | }; | ||
diff --git a/Documentation/devicetree/bindings/bus/omap-ocp2scp.txt b/Documentation/devicetree/bindings/bus/omap-ocp2scp.txt index d2fe064a828b..63dd8051521c 100644 --- a/Documentation/devicetree/bindings/bus/omap-ocp2scp.txt +++ b/Documentation/devicetree/bindings/bus/omap-ocp2scp.txt | |||
@@ -2,9 +2,27 @@ | |||
2 | 2 | ||
3 | properties: | 3 | properties: |
4 | - compatible : Should be "ti,omap-ocp2scp" | 4 | - compatible : Should be "ti,omap-ocp2scp" |
5 | - reg : Address and length of the register set for the device | ||
5 | - #address-cells, #size-cells : Must be present if the device has sub-nodes | 6 | - #address-cells, #size-cells : Must be present if the device has sub-nodes |
6 | - ranges : the child address space are mapped 1:1 onto the parent address space | 7 | - ranges : the child address space are mapped 1:1 onto the parent address space |
7 | - ti,hwmods : must be "ocp2scp_usb_phy" | 8 | - ti,hwmods : must be "ocp2scp_usb_phy" |
8 | 9 | ||
9 | Sub-nodes: | 10 | Sub-nodes: |
10 | All the devices connected to ocp2scp are described using sub-node to ocp2scp | 11 | All the devices connected to ocp2scp are described using sub-node to ocp2scp |
12 | |||
13 | ocp2scp@4a0ad000 { | ||
14 | compatible = "ti,omap-ocp2scp"; | ||
15 | reg = <0x4a0ad000 0x1f>; | ||
16 | #address-cells = <1>; | ||
17 | #size-cells = <1>; | ||
18 | ranges; | ||
19 | ti,hwmods = "ocp2scp_usb_phy"; | ||
20 | |||
21 | subnode1 { | ||
22 | ... | ||
23 | }; | ||
24 | |||
25 | subnode2 { | ||
26 | ... | ||
27 | }; | ||
28 | }; | ||
diff --git a/Documentation/devicetree/bindings/clock/imx23-clock.txt b/Documentation/devicetree/bindings/clock/imx23-clock.txt index a0b867ef8d96..baadbb11fe98 100644 --- a/Documentation/devicetree/bindings/clock/imx23-clock.txt +++ b/Documentation/devicetree/bindings/clock/imx23-clock.txt | |||
@@ -52,7 +52,7 @@ clocks and IDs. | |||
52 | lcdif 38 | 52 | lcdif 38 |
53 | etm 39 | 53 | etm 39 |
54 | usb 40 | 54 | usb 40 |
55 | usb_pwr 41 | 55 | usb_phy 41 |
56 | 56 | ||
57 | Examples: | 57 | Examples: |
58 | 58 | ||
diff --git a/Documentation/devicetree/bindings/clock/imx25-clock.txt b/Documentation/devicetree/bindings/clock/imx25-clock.txt new file mode 100644 index 000000000000..c2a3525ecb4e --- /dev/null +++ b/Documentation/devicetree/bindings/clock/imx25-clock.txt | |||
@@ -0,0 +1,162 @@ | |||
1 | * Clock bindings for Freescale i.MX25 | ||
2 | |||
3 | Required properties: | ||
4 | - compatible: Should be "fsl,imx25-ccm" | ||
5 | - reg: Address and length of the register set | ||
6 | - interrupts: Should contain CCM interrupt | ||
7 | - #clock-cells: Should be <1> | ||
8 | |||
9 | The clock consumer should specify the desired clock by having the clock | ||
10 | ID in its "clocks" phandle cell. The following is a full list of i.MX25 | ||
11 | clocks and IDs. | ||
12 | |||
13 | Clock ID | ||
14 | --------------------------- | ||
15 | dummy 0 | ||
16 | osc 1 | ||
17 | mpll 2 | ||
18 | upll 3 | ||
19 | mpll_cpu_3_4 4 | ||
20 | cpu_sel 5 | ||
21 | cpu 6 | ||
22 | ahb 7 | ||
23 | usb_div 8 | ||
24 | ipg 9 | ||
25 | per0_sel 10 | ||
26 | per1_sel 11 | ||
27 | per2_sel 12 | ||
28 | per3_sel 13 | ||
29 | per4_sel 14 | ||
30 | per5_sel 15 | ||
31 | per6_sel 16 | ||
32 | per7_sel 17 | ||
33 | per8_sel 18 | ||
34 | per9_sel 19 | ||
35 | per10_sel 20 | ||
36 | per11_sel 21 | ||
37 | per12_sel 22 | ||
38 | per13_sel 23 | ||
39 | per14_sel 24 | ||
40 | per15_sel 25 | ||
41 | per0 26 | ||
42 | per1 27 | ||
43 | per2 28 | ||
44 | per3 29 | ||
45 | per4 30 | ||
46 | per5 31 | ||
47 | per6 32 | ||
48 | per7 33 | ||
49 | per8 34 | ||
50 | per9 35 | ||
51 | per10 36 | ||
52 | per11 37 | ||
53 | per12 38 | ||
54 | per13 39 | ||
55 | per14 40 | ||
56 | per15 41 | ||
57 | csi_ipg_per 42 | ||
58 | epit_ipg_per 43 | ||
59 | esai_ipg_per 44 | ||
60 | esdhc1_ipg_per 45 | ||
61 | esdhc2_ipg_per 46 | ||
62 | gpt_ipg_per 47 | ||
63 | i2c_ipg_per 48 | ||
64 | lcdc_ipg_per 49 | ||
65 | nfc_ipg_per 50 | ||
66 | owire_ipg_per 51 | ||
67 | pwm_ipg_per 52 | ||
68 | sim1_ipg_per 53 | ||
69 | sim2_ipg_per 54 | ||
70 | ssi1_ipg_per 55 | ||
71 | ssi2_ipg_per 56 | ||
72 | uart_ipg_per 57 | ||
73 | ata_ahb 58 | ||
74 | reserved 59 | ||
75 | csi_ahb 60 | ||
76 | emi_ahb 61 | ||
77 | esai_ahb 62 | ||
78 | esdhc1_ahb 63 | ||
79 | esdhc2_ahb 64 | ||
80 | fec_ahb 65 | ||
81 | lcdc_ahb 66 | ||
82 | rtic_ahb 67 | ||
83 | sdma_ahb 68 | ||
84 | slcdc_ahb 69 | ||
85 | usbotg_ahb 70 | ||
86 | reserved 71 | ||
87 | reserved 72 | ||
88 | reserved 73 | ||
89 | reserved 74 | ||
90 | can1_ipg 75 | ||
91 | can2_ipg 76 | ||
92 | csi_ipg 77 | ||
93 | cspi1_ipg 78 | ||
94 | cspi2_ipg 79 | ||
95 | cspi3_ipg 80 | ||
96 | dryice_ipg 81 | ||
97 | ect_ipg 82 | ||
98 | epit1_ipg 83 | ||
99 | epit2_ipg 84 | ||
100 | reserved 85 | ||
101 | esdhc1_ipg 86 | ||
102 | esdhc2_ipg 87 | ||
103 | fec_ipg 88 | ||
104 | reserved 89 | ||
105 | reserved 90 | ||
106 | reserved 91 | ||
107 | gpt1_ipg 92 | ||
108 | gpt2_ipg 93 | ||
109 | gpt3_ipg 94 | ||
110 | gpt4_ipg 95 | ||
111 | reserved 96 | ||
112 | reserved 97 | ||
113 | reserved 98 | ||
114 | iim_ipg 99 | ||
115 | reserved 100 | ||
116 | reserved 101 | ||
117 | kpp_ipg 102 | ||
118 | lcdc_ipg 103 | ||
119 | reserved 104 | ||
120 | pwm1_ipg 105 | ||
121 | pwm2_ipg 106 | ||
122 | pwm3_ipg 107 | ||
123 | pwm4_ipg 108 | ||
124 | rngb_ipg 109 | ||
125 | reserved 110 | ||
126 | scc_ipg 111 | ||
127 | sdma_ipg 112 | ||
128 | sim1_ipg 113 | ||
129 | sim2_ipg 114 | ||
130 | slcdc_ipg 115 | ||
131 | spba_ipg 116 | ||
132 | ssi1_ipg 117 | ||
133 | ssi2_ipg 118 | ||
134 | tsc_ipg 119 | ||
135 | uart1_ipg 120 | ||
136 | uart2_ipg 121 | ||
137 | uart3_ipg 122 | ||
138 | uart4_ipg 123 | ||
139 | uart5_ipg 124 | ||
140 | reserved 125 | ||
141 | wdt_ipg 126 | ||
142 | |||
143 | Examples: | ||
144 | |||
145 | clks: ccm@53f80000 { | ||
146 | compatible = "fsl,imx25-ccm"; | ||
147 | reg = <0x53f80000 0x4000>; | ||
148 | interrupts = <31>; | ||
149 | clock-output-names = ... | ||
150 | "uart_ipg", | ||
151 | "uart_serial", | ||
152 | ...; | ||
153 | }; | ||
154 | |||
155 | uart1: serial@43f90000 { | ||
156 | compatible = "fsl,imx25-uart", "fsl,imx21-uart"; | ||
157 | reg = <0x43f90000 0x4000>; | ||
158 | interrupts = <45>; | ||
159 | clocks = <&clks 79>, <&clks 50>; | ||
160 | clock-names = "ipg", "per"; | ||
161 | status = "disabled"; | ||
162 | }; | ||
diff --git a/Documentation/devicetree/bindings/clock/imx28-clock.txt b/Documentation/devicetree/bindings/clock/imx28-clock.txt index aa2af2866fe8..52a49a4a50b3 100644 --- a/Documentation/devicetree/bindings/clock/imx28-clock.txt +++ b/Documentation/devicetree/bindings/clock/imx28-clock.txt | |||
@@ -73,8 +73,8 @@ clocks and IDs. | |||
73 | can1 59 | 73 | can1 59 |
74 | usb0 60 | 74 | usb0 60 |
75 | usb1 61 | 75 | usb1 61 |
76 | usb0_pwr 62 | 76 | usb0_phy 62 |
77 | usb1_pwr 63 | 77 | usb1_phy 63 |
78 | enet_out 64 | 78 | enet_out 64 |
79 | 79 | ||
80 | Examples: | 80 | Examples: |
diff --git a/Documentation/devicetree/bindings/clock/imx5-clock.txt b/Documentation/devicetree/bindings/clock/imx5-clock.txt new file mode 100644 index 000000000000..04ad47876be0 --- /dev/null +++ b/Documentation/devicetree/bindings/clock/imx5-clock.txt | |||
@@ -0,0 +1,191 @@ | |||
1 | * Clock bindings for Freescale i.MX5 | ||
2 | |||
3 | Required properties: | ||
4 | - compatible: Should be "fsl,<soc>-ccm" , where <soc> can be imx51 or imx53 | ||
5 | - reg: Address and length of the register set | ||
6 | - interrupts: Should contain CCM interrupt | ||
7 | - #clock-cells: Should be <1> | ||
8 | |||
9 | The clock consumer should specify the desired clock by having the clock | ||
10 | ID in its "clocks" phandle cell. The following is a full list of i.MX5 | ||
11 | clocks and IDs. | ||
12 | |||
13 | Clock ID | ||
14 | --------------------------- | ||
15 | dummy 0 | ||
16 | ckil 1 | ||
17 | osc 2 | ||
18 | ckih1 3 | ||
19 | ckih2 4 | ||
20 | ahb 5 | ||
21 | ipg 6 | ||
22 | axi_a 7 | ||
23 | axi_b 8 | ||
24 | uart_pred 9 | ||
25 | uart_root 10 | ||
26 | esdhc_a_pred 11 | ||
27 | esdhc_b_pred 12 | ||
28 | esdhc_c_s 13 | ||
29 | esdhc_d_s 14 | ||
30 | emi_sel 15 | ||
31 | emi_slow_podf 16 | ||
32 | nfc_podf 17 | ||
33 | ecspi_pred 18 | ||
34 | ecspi_podf 19 | ||
35 | usboh3_pred 20 | ||
36 | usboh3_podf 21 | ||
37 | usb_phy_pred 22 | ||
38 | usb_phy_podf 23 | ||
39 | cpu_podf 24 | ||
40 | di_pred 25 | ||
41 | tve_di 26 | ||
42 | tve_s 27 | ||
43 | uart1_ipg_gate 28 | ||
44 | uart1_per_gate 29 | ||
45 | uart2_ipg_gate 30 | ||
46 | uart2_per_gate 31 | ||
47 | uart3_ipg_gate 32 | ||
48 | uart3_per_gate 33 | ||
49 | i2c1_gate 34 | ||
50 | i2c2_gate 35 | ||
51 | gpt_ipg_gate 36 | ||
52 | pwm1_ipg_gate 37 | ||
53 | pwm1_hf_gate 38 | ||
54 | pwm2_ipg_gate 39 | ||
55 | pwm2_hf_gate 40 | ||
56 | gpt_hf_gate 41 | ||
57 | fec_gate 42 | ||
58 | usboh3_per_gate 43 | ||
59 | esdhc1_ipg_gate 44 | ||
60 | esdhc2_ipg_gate 45 | ||
61 | esdhc3_ipg_gate 46 | ||
62 | esdhc4_ipg_gate 47 | ||
63 | ssi1_ipg_gate 48 | ||
64 | ssi2_ipg_gate 49 | ||
65 | ssi3_ipg_gate 50 | ||
66 | ecspi1_ipg_gate 51 | ||
67 | ecspi1_per_gate 52 | ||
68 | ecspi2_ipg_gate 53 | ||
69 | ecspi2_per_gate 54 | ||
70 | cspi_ipg_gate 55 | ||
71 | sdma_gate 56 | ||
72 | emi_slow_gate 57 | ||
73 | ipu_s 58 | ||
74 | ipu_gate 59 | ||
75 | nfc_gate 60 | ||
76 | ipu_di1_gate 61 | ||
77 | vpu_s 62 | ||
78 | vpu_gate 63 | ||
79 | vpu_reference_gate 64 | ||
80 | uart4_ipg_gate 65 | ||
81 | uart4_per_gate 66 | ||
82 | uart5_ipg_gate 67 | ||
83 | uart5_per_gate 68 | ||
84 | tve_gate 69 | ||
85 | tve_pred 70 | ||
86 | esdhc1_per_gate 71 | ||
87 | esdhc2_per_gate 72 | ||
88 | esdhc3_per_gate 73 | ||
89 | esdhc4_per_gate 74 | ||
90 | usb_phy_gate 75 | ||
91 | hsi2c_gate 76 | ||
92 | mipi_hsc1_gate 77 | ||
93 | mipi_hsc2_gate 78 | ||
94 | mipi_esc_gate 79 | ||
95 | mipi_hsp_gate 80 | ||
96 | ldb_di1_div_3_5 81 | ||
97 | ldb_di1_div 82 | ||
98 | ldb_di0_div_3_5 83 | ||
99 | ldb_di0_div 84 | ||
100 | ldb_di1_gate 85 | ||
101 | can2_serial_gate 86 | ||
102 | can2_ipg_gate 87 | ||
103 | i2c3_gate 88 | ||
104 | lp_apm 89 | ||
105 | periph_apm 90 | ||
106 | main_bus 91 | ||
107 | ahb_max 92 | ||
108 | aips_tz1 93 | ||
109 | aips_tz2 94 | ||
110 | tmax1 95 | ||
111 | tmax2 96 | ||
112 | tmax3 97 | ||
113 | spba 98 | ||
114 | uart_sel 99 | ||
115 | esdhc_a_sel 100 | ||
116 | esdhc_b_sel 101 | ||
117 | esdhc_a_podf 102 | ||
118 | esdhc_b_podf 103 | ||
119 | ecspi_sel 104 | ||
120 | usboh3_sel 105 | ||
121 | usb_phy_sel 106 | ||
122 | iim_gate 107 | ||
123 | usboh3_gate 108 | ||
124 | emi_fast_gate 109 | ||
125 | ipu_di0_gate 110 | ||
126 | gpc_dvfs 111 | ||
127 | pll1_sw 112 | ||
128 | pll2_sw 113 | ||
129 | pll3_sw 114 | ||
130 | ipu_di0_sel 115 | ||
131 | ipu_di1_sel 116 | ||
132 | tve_ext_sel 117 | ||
133 | mx51_mipi 118 | ||
134 | pll4_sw 119 | ||
135 | ldb_di1_sel 120 | ||
136 | di_pll4_podf 121 | ||
137 | ldb_di0_sel 122 | ||
138 | ldb_di0_gate 123 | ||
139 | usb_phy1_gate 124 | ||
140 | usb_phy2_gate 125 | ||
141 | per_lp_apm 126 | ||
142 | per_pred1 127 | ||
143 | per_pred2 128 | ||
144 | per_podf 129 | ||
145 | per_root 130 | ||
146 | ssi_apm 131 | ||
147 | ssi1_root_sel 132 | ||
148 | ssi2_root_sel 133 | ||
149 | ssi3_root_sel 134 | ||
150 | ssi_ext1_sel 135 | ||
151 | ssi_ext2_sel 136 | ||
152 | ssi_ext1_com_sel 137 | ||
153 | ssi_ext2_com_sel 138 | ||
154 | ssi1_root_pred 139 | ||
155 | ssi1_root_podf 140 | ||
156 | ssi2_root_pred 141 | ||
157 | ssi2_root_podf 142 | ||
158 | ssi_ext1_pred 143 | ||
159 | ssi_ext1_podf 144 | ||
160 | ssi_ext2_pred 145 | ||
161 | ssi_ext2_podf 146 | ||
162 | ssi1_root_gate 147 | ||
163 | ssi2_root_gate 148 | ||
164 | ssi3_root_gate 149 | ||
165 | ssi_ext1_gate 150 | ||
166 | ssi_ext2_gate 151 | ||
167 | epit1_ipg_gate 152 | ||
168 | epit1_hf_gate 153 | ||
169 | epit2_ipg_gate 154 | ||
170 | epit2_hf_gate 155 | ||
171 | can_sel 156 | ||
172 | can1_serial_gate 157 | ||
173 | can1_ipg_gate 158 | ||
174 | |||
175 | Examples (for mx53): | ||
176 | |||
177 | clks: ccm@53fd4000{ | ||
178 | compatible = "fsl,imx53-ccm"; | ||
179 | reg = <0x53fd4000 0x4000>; | ||
180 | interrupts = <0 71 0x04 0 72 0x04>; | ||
181 | #clock-cells = <1>; | ||
182 | }; | ||
183 | |||
184 | can1: can@53fc8000 { | ||
185 | compatible = "fsl,imx53-flexcan", "fsl,p1010-flexcan"; | ||
186 | reg = <0x53fc8000 0x4000>; | ||
187 | interrupts = <82>; | ||
188 | clocks = <&clks 158>, <&clks 157>; | ||
189 | clock-names = "ipg", "per"; | ||
190 | status = "disabled"; | ||
191 | }; | ||
diff --git a/Documentation/devicetree/bindings/clock/imx6q-clock.txt b/Documentation/devicetree/bindings/clock/imx6q-clock.txt index 492bd991d52a..d77b4e68dc42 100644 --- a/Documentation/devicetree/bindings/clock/imx6q-clock.txt +++ b/Documentation/devicetree/bindings/clock/imx6q-clock.txt | |||
@@ -187,9 +187,9 @@ clocks and IDs. | |||
187 | pll3_usb_otg 172 | 187 | pll3_usb_otg 172 |
188 | pll4_audio 173 | 188 | pll4_audio 173 |
189 | pll5_video 174 | 189 | pll5_video 174 |
190 | pll6_mlb 175 | 190 | pll8_mlb 175 |
191 | pll7_usb_host 176 | 191 | pll7_usb_host 176 |
192 | pll8_enet 177 | 192 | pll6_enet 177 |
193 | ssi1_ipg 178 | 193 | ssi1_ipg 178 |
194 | ssi2_ipg 179 | 194 | ssi2_ipg 179 |
195 | ssi3_ipg 180 | 195 | ssi3_ipg 180 |
@@ -198,6 +198,11 @@ clocks and IDs. | |||
198 | usbphy2 183 | 198 | usbphy2 183 |
199 | ldb_di0_div_3_5 184 | 199 | ldb_di0_div_3_5 184 |
200 | ldb_di1_div_3_5 185 | 200 | ldb_di1_div_3_5 185 |
201 | sata_ref 186 | ||
202 | sata_ref_100m 187 | ||
203 | pcie_ref 188 | ||
204 | pcie_ref_125m 189 | ||
205 | enet_ref 190 | ||
201 | 206 | ||
202 | Examples: | 207 | Examples: |
203 | 208 | ||
diff --git a/Documentation/devicetree/bindings/clock/mvebu-core-clock.txt b/Documentation/devicetree/bindings/clock/mvebu-core-clock.txt new file mode 100644 index 000000000000..1e662948661e --- /dev/null +++ b/Documentation/devicetree/bindings/clock/mvebu-core-clock.txt | |||
@@ -0,0 +1,47 @@ | |||
1 | * Core Clock bindings for Marvell MVEBU SoCs | ||
2 | |||
3 | Marvell MVEBU SoCs usually allow to determine core clock frequencies by | ||
4 | reading the Sample-At-Reset (SAR) register. The core clock consumer should | ||
5 | specify the desired clock by having the clock ID in its "clocks" phandle cell. | ||
6 | |||
7 | The following is a list of provided IDs and clock names on Armada 370/XP: | ||
8 | 0 = tclk (Internal Bus clock) | ||
9 | 1 = cpuclk (CPU clock) | ||
10 | 2 = nbclk (L2 Cache clock) | ||
11 | 3 = hclk (DRAM control clock) | ||
12 | 4 = dramclk (DDR clock) | ||
13 | |||
14 | The following is a list of provided IDs and clock names on Kirkwood and Dove: | ||
15 | 0 = tclk (Internal Bus clock) | ||
16 | 1 = cpuclk (CPU0 clock) | ||
17 | 2 = l2clk (L2 Cache clock derived from CPU0 clock) | ||
18 | 3 = ddrclk (DDR controller clock derived from CPU0 clock) | ||
19 | |||
20 | Required properties: | ||
21 | - compatible : shall be one of the following: | ||
22 | "marvell,armada-370-core-clock" - For Armada 370 SoC core clocks | ||
23 | "marvell,armada-xp-core-clock" - For Armada XP SoC core clocks | ||
24 | "marvell,dove-core-clock" - for Dove SoC core clocks | ||
25 | "marvell,kirkwood-core-clock" - for Kirkwood SoC (except mv88f6180) | ||
26 | "marvell,mv88f6180-core-clock" - for Kirkwood MV88f6180 SoC | ||
27 | - reg : shall be the register address of the Sample-At-Reset (SAR) register | ||
28 | - #clock-cells : from common clock binding; shall be set to 1 | ||
29 | |||
30 | Optional properties: | ||
31 | - clock-output-names : from common clock binding; allows overwrite default clock | ||
32 | output names ("tclk", "cpuclk", "l2clk", "ddrclk") | ||
33 | |||
34 | Example: | ||
35 | |||
36 | core_clk: core-clocks@d0214 { | ||
37 | compatible = "marvell,dove-core-clock"; | ||
38 | reg = <0xd0214 0x4>; | ||
39 | #clock-cells = <1>; | ||
40 | }; | ||
41 | |||
42 | spi0: spi@10600 { | ||
43 | compatible = "marvell,orion-spi"; | ||
44 | /* ... */ | ||
45 | /* get tclk from core clock provider */ | ||
46 | clocks = <&core_clk 0>; | ||
47 | }; | ||
diff --git a/Documentation/devicetree/bindings/clock/mvebu-cpu-clock.txt b/Documentation/devicetree/bindings/clock/mvebu-cpu-clock.txt new file mode 100644 index 000000000000..feb830130714 --- /dev/null +++ b/Documentation/devicetree/bindings/clock/mvebu-cpu-clock.txt | |||
@@ -0,0 +1,21 @@ | |||
1 | Device Tree Clock bindings for cpu clock of Marvell EBU platforms | ||
2 | |||
3 | Required properties: | ||
4 | - compatible : shall be one of the following: | ||
5 | "marvell,armada-xp-cpu-clock" - cpu clocks for Armada XP | ||
6 | - reg : Address and length of the clock complex register set | ||
7 | - #clock-cells : should be set to 1. | ||
8 | - clocks : shall be the input parent clock phandle for the clock. | ||
9 | |||
10 | cpuclk: clock-complex@d0018700 { | ||
11 | #clock-cells = <1>; | ||
12 | compatible = "marvell,armada-xp-cpu-clock"; | ||
13 | reg = <0xd0018700 0xA0>; | ||
14 | clocks = <&coreclk 1>; | ||
15 | } | ||
16 | |||
17 | cpu@0 { | ||
18 | compatible = "marvell,sheeva-v7"; | ||
19 | reg = <0>; | ||
20 | clocks = <&cpuclk 0>; | ||
21 | }; | ||
diff --git a/Documentation/devicetree/bindings/clock/mvebu-gated-clock.txt b/Documentation/devicetree/bindings/clock/mvebu-gated-clock.txt new file mode 100644 index 000000000000..7337005ef5e1 --- /dev/null +++ b/Documentation/devicetree/bindings/clock/mvebu-gated-clock.txt | |||
@@ -0,0 +1,119 @@ | |||
1 | * Gated Clock bindings for Marvell Orion SoCs | ||
2 | |||
3 | Marvell Dove and Kirkwood allow some peripheral clocks to be gated to save | ||
4 | some power. The clock consumer should specify the desired clock by having | ||
5 | the clock ID in its "clocks" phandle cell. The clock ID is directly mapped to | ||
6 | the corresponding clock gating control bit in HW to ease manual clock lookup | ||
7 | in datasheet. | ||
8 | |||
9 | The following is a list of provided IDs for Armada 370: | ||
10 | ID Clock Peripheral | ||
11 | ----------------------------------- | ||
12 | 0 Audio AC97 Cntrl | ||
13 | 1 pex0_en PCIe 0 Clock out | ||
14 | 2 pex1_en PCIe 1 Clock out | ||
15 | 3 ge1 Gigabit Ethernet 1 | ||
16 | 4 ge0 Gigabit Ethernet 0 | ||
17 | 5 pex0 PCIe Cntrl 0 | ||
18 | 9 pex1 PCIe Cntrl 1 | ||
19 | 15 sata0 SATA Host 0 | ||
20 | 17 sdio SDHCI Host | ||
21 | 25 tdm Time Division Mplx | ||
22 | 28 ddr DDR Cntrl | ||
23 | 30 sata1 SATA Host 0 | ||
24 | |||
25 | The following is a list of provided IDs for Armada XP: | ||
26 | ID Clock Peripheral | ||
27 | ----------------------------------- | ||
28 | 0 audio Audio Cntrl | ||
29 | 1 ge3 Gigabit Ethernet 3 | ||
30 | 2 ge2 Gigabit Ethernet 2 | ||
31 | 3 ge1 Gigabit Ethernet 1 | ||
32 | 4 ge0 Gigabit Ethernet 0 | ||
33 | 5 pex0 PCIe Cntrl 0 | ||
34 | 6 pex1 PCIe Cntrl 1 | ||
35 | 7 pex2 PCIe Cntrl 2 | ||
36 | 8 pex3 PCIe Cntrl 3 | ||
37 | 13 bp | ||
38 | 14 sata0lnk | ||
39 | 15 sata0 SATA Host 0 | ||
40 | 16 lcd LCD Cntrl | ||
41 | 17 sdio SDHCI Host | ||
42 | 18 usb0 USB Host 0 | ||
43 | 19 usb1 USB Host 1 | ||
44 | 20 usb2 USB Host 2 | ||
45 | 22 xor0 XOR DMA 0 | ||
46 | 23 crypto CESA engine | ||
47 | 25 tdm Time Division Mplx | ||
48 | 28 xor1 XOR DMA 1 | ||
49 | 29 sata1lnk | ||
50 | 30 sata1 SATA Host 0 | ||
51 | |||
52 | The following is a list of provided IDs for Dove: | ||
53 | ID Clock Peripheral | ||
54 | ----------------------------------- | ||
55 | 0 usb0 USB Host 0 | ||
56 | 1 usb1 USB Host 1 | ||
57 | 2 ge Gigabit Ethernet | ||
58 | 3 sata SATA Host | ||
59 | 4 pex0 PCIe Cntrl 0 | ||
60 | 5 pex1 PCIe Cntrl 1 | ||
61 | 8 sdio0 SDHCI Host 0 | ||
62 | 9 sdio1 SDHCI Host 1 | ||
63 | 10 nand NAND Cntrl | ||
64 | 11 camera Camera Cntrl | ||
65 | 12 i2s0 I2S Cntrl 0 | ||
66 | 13 i2s1 I2S Cntrl 1 | ||
67 | 15 crypto CESA engine | ||
68 | 21 ac97 AC97 Cntrl | ||
69 | 22 pdma Peripheral DMA | ||
70 | 23 xor0 XOR DMA 0 | ||
71 | 24 xor1 XOR DMA 1 | ||
72 | 30 gephy Gigabit Ethernel PHY | ||
73 | Note: gephy(30) is implemented as a parent clock of ge(2) | ||
74 | |||
75 | The following is a list of provided IDs for Kirkwood: | ||
76 | ID Clock Peripheral | ||
77 | ----------------------------------- | ||
78 | 0 ge0 Gigabit Ethernet 0 | ||
79 | 2 pex0 PCIe Cntrl 0 | ||
80 | 3 usb0 USB Host 0 | ||
81 | 4 sdio SDIO Cntrl | ||
82 | 5 tsu Transp. Stream Unit | ||
83 | 6 dunit SDRAM Cntrl | ||
84 | 7 runit Runit | ||
85 | 8 xor0 XOR DMA 0 | ||
86 | 9 audio I2S Cntrl 0 | ||
87 | 14 sata0 SATA Host 0 | ||
88 | 15 sata1 SATA Host 1 | ||
89 | 16 xor1 XOR DMA 1 | ||
90 | 17 crypto CESA engine | ||
91 | 18 pex1 PCIe Cntrl 1 | ||
92 | 19 ge1 Gigabit Ethernet 0 | ||
93 | 20 tdm Time Division Mplx | ||
94 | |||
95 | Required properties: | ||
96 | - compatible : shall be one of the following: | ||
97 | "marvell,dove-gating-clock" - for Dove SoC clock gating | ||
98 | "marvell,kirkwood-gating-clock" - for Kirkwood SoC clock gating | ||
99 | - reg : shall be the register address of the Clock Gating Control register | ||
100 | - #clock-cells : from common clock binding; shall be set to 1 | ||
101 | |||
102 | Optional properties: | ||
103 | - clocks : default parent clock phandle (e.g. tclk) | ||
104 | |||
105 | Example: | ||
106 | |||
107 | gate_clk: clock-gating-control@d0038 { | ||
108 | compatible = "marvell,dove-gating-clock"; | ||
109 | reg = <0xd0038 0x4>; | ||
110 | /* default parent clock is tclk */ | ||
111 | clocks = <&core_clk 0>; | ||
112 | #clock-cells = <1>; | ||
113 | }; | ||
114 | |||
115 | sdio0: sdio@92000 { | ||
116 | compatible = "marvell,dove-sdhci"; | ||
117 | /* get clk gate bit 8 (sdio0) */ | ||
118 | clocks = <&gate_clk 8>; | ||
119 | }; | ||
diff --git a/Documentation/devicetree/bindings/clock/zynq-7000.txt b/Documentation/devicetree/bindings/clock/zynq-7000.txt new file mode 100644 index 000000000000..23ae1db1bc13 --- /dev/null +++ b/Documentation/devicetree/bindings/clock/zynq-7000.txt | |||
@@ -0,0 +1,55 @@ | |||
1 | Device Tree Clock bindings for the Zynq 7000 EPP | ||
2 | |||
3 | The Zynq EPP has several different clk providers, each with there own bindings. | ||
4 | The purpose of this document is to document their usage. | ||
5 | |||
6 | See clock_bindings.txt for more information on the generic clock bindings. | ||
7 | See Chapter 25 of Zynq TRM for more information about Zynq clocks. | ||
8 | |||
9 | == PLLs == | ||
10 | |||
11 | Used to describe the ARM_PLL, DDR_PLL, and IO_PLL. | ||
12 | |||
13 | Required properties: | ||
14 | - #clock-cells : shall be 0 (only one clock is output from this node) | ||
15 | - compatible : "xlnx,zynq-pll" | ||
16 | - reg : pair of u32 values, which are the address offsets within the SLCR | ||
17 | of the relevant PLL_CTRL register and PLL_CFG register respectively | ||
18 | - clocks : phandle for parent clock. should be the phandle for ps_clk | ||
19 | |||
20 | Optional properties: | ||
21 | - clock-output-names : name of the output clock | ||
22 | |||
23 | Example: | ||
24 | armpll: armpll { | ||
25 | #clock-cells = <0>; | ||
26 | compatible = "xlnx,zynq-pll"; | ||
27 | clocks = <&ps_clk>; | ||
28 | reg = <0x100 0x110>; | ||
29 | clock-output-names = "armpll"; | ||
30 | }; | ||
31 | |||
32 | == Peripheral clocks == | ||
33 | |||
34 | Describes clock node for the SDIO, SMC, SPI, QSPI, and UART clocks. | ||
35 | |||
36 | Required properties: | ||
37 | - #clock-cells : shall be 1 | ||
38 | - compatible : "xlnx,zynq-periph-clock" | ||
39 | - reg : a single u32 value, describing the offset within the SLCR where | ||
40 | the CLK_CTRL register is found for this peripheral | ||
41 | - clocks : phandle for parent clocks. should hold phandles for | ||
42 | the IO_PLL, ARM_PLL, and DDR_PLL in order | ||
43 | - clock-output-names : names of the output clock(s). For peripherals that have | ||
44 | two output clocks (for example, the UART), two clocks | ||
45 | should be listed. | ||
46 | |||
47 | Example: | ||
48 | uart_clk: uart_clk { | ||
49 | #clock-cells = <1>; | ||
50 | compatible = "xlnx,zynq-periph-clock"; | ||
51 | clocks = <&iopll &armpll &ddrpll>; | ||
52 | reg = <0x154>; | ||
53 | clock-output-names = "uart0_ref_clk", | ||
54 | "uart1_ref_clk"; | ||
55 | }; | ||
diff --git a/Documentation/devicetree/bindings/cpufreq/cpufreq-spear.txt b/Documentation/devicetree/bindings/cpufreq/cpufreq-spear.txt new file mode 100644 index 000000000000..f3d44984d91c --- /dev/null +++ b/Documentation/devicetree/bindings/cpufreq/cpufreq-spear.txt | |||
@@ -0,0 +1,42 @@ | |||
1 | SPEAr cpufreq driver | ||
2 | ------------------- | ||
3 | |||
4 | SPEAr SoC cpufreq driver for CPU frequency scaling. | ||
5 | It supports both uniprocessor (UP) and symmetric multiprocessor (SMP) systems | ||
6 | which share clock across all CPUs. | ||
7 | |||
8 | Required properties: | ||
9 | - cpufreq_tbl: Table of frequencies CPU could be transitioned into, in the | ||
10 | increasing order. | ||
11 | |||
12 | Optional properties: | ||
13 | - clock-latency: Specify the possible maximum transition latency for clock, in | ||
14 | unit of nanoseconds. | ||
15 | |||
16 | Both required and optional properties listed above must be defined under node | ||
17 | /cpus/cpu@0. | ||
18 | |||
19 | Examples: | ||
20 | -------- | ||
21 | cpus { | ||
22 | |||
23 | <...> | ||
24 | |||
25 | cpu@0 { | ||
26 | compatible = "arm,cortex-a9"; | ||
27 | reg = <0>; | ||
28 | |||
29 | <...> | ||
30 | |||
31 | cpufreq_tbl = < 166000 | ||
32 | 200000 | ||
33 | 250000 | ||
34 | 300000 | ||
35 | 400000 | ||
36 | 500000 | ||
37 | 600000 >; | ||
38 | }; | ||
39 | |||
40 | <...> | ||
41 | |||
42 | }; | ||
diff --git a/Documentation/devicetree/bindings/crypto/fsl-sec4.txt b/Documentation/devicetree/bindings/crypto/fsl-sec4.txt index bd7ce120bc13..fc9ce6f1688c 100644 --- a/Documentation/devicetree/bindings/crypto/fsl-sec4.txt +++ b/Documentation/devicetree/bindings/crypto/fsl-sec4.txt | |||
@@ -54,7 +54,8 @@ PROPERTIES | |||
54 | - compatible | 54 | - compatible |
55 | Usage: required | 55 | Usage: required |
56 | Value type: <string> | 56 | Value type: <string> |
57 | Definition: Must include "fsl,sec-v4.0" | 57 | Definition: Must include "fsl,sec-v4.0". Also includes SEC |
58 | ERA versions (optional) with which the device is compatible. | ||
58 | 59 | ||
59 | - #address-cells | 60 | - #address-cells |
60 | Usage: required | 61 | Usage: required |
@@ -106,7 +107,7 @@ PROPERTIES | |||
106 | 107 | ||
107 | EXAMPLE | 108 | EXAMPLE |
108 | crypto@300000 { | 109 | crypto@300000 { |
109 | compatible = "fsl,sec-v4.0"; | 110 | compatible = "fsl,sec-v4.0", "fsl,sec-era-v2.0"; |
110 | #address-cells = <1>; | 111 | #address-cells = <1>; |
111 | #size-cells = <1>; | 112 | #size-cells = <1>; |
112 | reg = <0x300000 0x10000>; | 113 | reg = <0x300000 0x10000>; |
diff --git a/Documentation/devicetree/bindings/dma/mv-xor.txt b/Documentation/devicetree/bindings/dma/mv-xor.txt new file mode 100644 index 000000000000..7c6cb7fcecd2 --- /dev/null +++ b/Documentation/devicetree/bindings/dma/mv-xor.txt | |||
@@ -0,0 +1,40 @@ | |||
1 | * Marvell XOR engines | ||
2 | |||
3 | Required properties: | ||
4 | - compatible: Should be "marvell,orion-xor" | ||
5 | - reg: Should contain registers location and length (two sets) | ||
6 | the first set is the low registers, the second set the high | ||
7 | registers for the XOR engine. | ||
8 | - clocks: pointer to the reference clock | ||
9 | |||
10 | The DT node must also contains sub-nodes for each XOR channel that the | ||
11 | XOR engine has. Those sub-nodes have the following required | ||
12 | properties: | ||
13 | - interrupts: interrupt of the XOR channel | ||
14 | |||
15 | And the following optional properties: | ||
16 | - dmacap,memcpy to indicate that the XOR channel is capable of memcpy operations | ||
17 | - dmacap,memset to indicate that the XOR channel is capable of memset operations | ||
18 | - dmacap,xor to indicate that the XOR channel is capable of xor operations | ||
19 | |||
20 | Example: | ||
21 | |||
22 | xor@d0060900 { | ||
23 | compatible = "marvell,orion-xor"; | ||
24 | reg = <0xd0060900 0x100 | ||
25 | 0xd0060b00 0x100>; | ||
26 | clocks = <&coreclk 0>; | ||
27 | status = "okay"; | ||
28 | |||
29 | xor00 { | ||
30 | interrupts = <51>; | ||
31 | dmacap,memcpy; | ||
32 | dmacap,xor; | ||
33 | }; | ||
34 | xor01 { | ||
35 | interrupts = <52>; | ||
36 | dmacap,memcpy; | ||
37 | dmacap,xor; | ||
38 | dmacap,memset; | ||
39 | }; | ||
40 | }; | ||
diff --git a/Documentation/devicetree/bindings/drm/exynos/hdmi.txt b/Documentation/devicetree/bindings/drm/exynos/hdmi.txt new file mode 100644 index 000000000000..589edee37394 --- /dev/null +++ b/Documentation/devicetree/bindings/drm/exynos/hdmi.txt | |||
@@ -0,0 +1,22 @@ | |||
1 | Device-Tree bindings for drm hdmi driver | ||
2 | |||
3 | Required properties: | ||
4 | - compatible: value should be "samsung,exynos5-hdmi". | ||
5 | - reg: physical base address of the hdmi and length of memory mapped | ||
6 | region. | ||
7 | - interrupts: interrupt number to the cpu. | ||
8 | - hpd-gpio: following information about the hotplug gpio pin. | ||
9 | a) phandle of the gpio controller node. | ||
10 | b) pin number within the gpio controller. | ||
11 | c) pin function mode. | ||
12 | d) optional flags and pull up/down. | ||
13 | e) drive strength. | ||
14 | |||
15 | Example: | ||
16 | |||
17 | hdmi { | ||
18 | compatible = "samsung,exynos5-hdmi"; | ||
19 | reg = <0x14530000 0x100000>; | ||
20 | interrupts = <0 95 0>; | ||
21 | hpd-gpio = <&gpx3 7 0xf 1 3>; | ||
22 | }; | ||
diff --git a/Documentation/devicetree/bindings/drm/exynos/hdmiddc.txt b/Documentation/devicetree/bindings/drm/exynos/hdmiddc.txt new file mode 100644 index 000000000000..fa166d945809 --- /dev/null +++ b/Documentation/devicetree/bindings/drm/exynos/hdmiddc.txt | |||
@@ -0,0 +1,12 @@ | |||
1 | Device-Tree bindings for hdmiddc driver | ||
2 | |||
3 | Required properties: | ||
4 | - compatible: value should be "samsung,exynos5-hdmiddc". | ||
5 | - reg: I2C address of the hdmiddc device. | ||
6 | |||
7 | Example: | ||
8 | |||
9 | hdmiddc { | ||
10 | compatible = "samsung,exynos5-hdmiddc"; | ||
11 | reg = <0x50>; | ||
12 | }; | ||
diff --git a/Documentation/devicetree/bindings/drm/exynos/hdmiphy.txt b/Documentation/devicetree/bindings/drm/exynos/hdmiphy.txt new file mode 100644 index 000000000000..858f4f9b902f --- /dev/null +++ b/Documentation/devicetree/bindings/drm/exynos/hdmiphy.txt | |||
@@ -0,0 +1,12 @@ | |||
1 | Device-Tree bindings for hdmiphy driver | ||
2 | |||
3 | Required properties: | ||
4 | - compatible: value should be "samsung,exynos5-hdmiphy". | ||
5 | - reg: I2C address of the hdmiphy device. | ||
6 | |||
7 | Example: | ||
8 | |||
9 | hdmiphy { | ||
10 | compatible = "samsung,exynos5-hdmiphy"; | ||
11 | reg = <0x38>; | ||
12 | }; | ||
diff --git a/Documentation/devicetree/bindings/drm/exynos/mixer.txt b/Documentation/devicetree/bindings/drm/exynos/mixer.txt new file mode 100644 index 000000000000..9b2ea0343566 --- /dev/null +++ b/Documentation/devicetree/bindings/drm/exynos/mixer.txt | |||
@@ -0,0 +1,15 @@ | |||
1 | Device-Tree bindings for mixer driver | ||
2 | |||
3 | Required properties: | ||
4 | - compatible: value should be "samsung,exynos5-mixer". | ||
5 | - reg: physical base address of the mixer and length of memory mapped | ||
6 | region. | ||
7 | - interrupts: interrupt number to the cpu. | ||
8 | |||
9 | Example: | ||
10 | |||
11 | mixer { | ||
12 | compatible = "samsung,exynos5-mixer"; | ||
13 | reg = <0x14450000 0x10000>; | ||
14 | interrupts = <0 94 0>; | ||
15 | }; | ||
diff --git a/Documentation/devicetree/bindings/gpio/gpio-poweroff.txt b/Documentation/devicetree/bindings/gpio/gpio-poweroff.txt new file mode 100644 index 000000000000..558cdf3c9abc --- /dev/null +++ b/Documentation/devicetree/bindings/gpio/gpio-poweroff.txt | |||
@@ -0,0 +1,22 @@ | |||
1 | GPIO line that should be set high/low to power off a device | ||
2 | |||
3 | Required properties: | ||
4 | - compatible : should be "gpio-poweroff". | ||
5 | - gpios : The GPIO to set high/low, see "gpios property" in | ||
6 | Documentation/devicetree/bindings/gpio/gpio.txt. If the pin should be | ||
7 | low to power down the board set it to "Active Low", otherwise set | ||
8 | gpio to "Active High". | ||
9 | |||
10 | Optional properties: | ||
11 | - input : Initially configure the GPIO line as an input. Only reconfigure | ||
12 | it to an output when the pm_power_off function is called. If this optional | ||
13 | property is not specified, the GPIO is initialized as an output in its | ||
14 | inactive state. | ||
15 | |||
16 | |||
17 | Examples: | ||
18 | |||
19 | gpio-poweroff { | ||
20 | compatible = "gpio-poweroff"; | ||
21 | gpios = <&gpio 4 0>; /* GPIO 4 Active Low */ | ||
22 | }; | ||
diff --git a/Documentation/devicetree/bindings/gpio/gpio-stmpe.txt b/Documentation/devicetree/bindings/gpio/gpio-stmpe.txt new file mode 100644 index 000000000000..a0e4cf885213 --- /dev/null +++ b/Documentation/devicetree/bindings/gpio/gpio-stmpe.txt | |||
@@ -0,0 +1,18 @@ | |||
1 | STMPE gpio | ||
2 | ---------- | ||
3 | |||
4 | Required properties: | ||
5 | - compatible: "st,stmpe-gpio" | ||
6 | |||
7 | Optional properties: | ||
8 | - st,norequest-mask: bitmask specifying which GPIOs should _not_ be requestable | ||
9 | due to different usage (e.g. touch, keypad) | ||
10 | |||
11 | Node name must be stmpe_gpio and should be child node of stmpe node to which it | ||
12 | belongs. | ||
13 | |||
14 | Example: | ||
15 | stmpe_gpio { | ||
16 | compatible = "st,stmpe-gpio"; | ||
17 | st,norequest-mask = <0x20>; //gpio 5 can't be used | ||
18 | }; | ||
diff --git a/Documentation/devicetree/bindings/gpio/gpio.txt b/Documentation/devicetree/bindings/gpio/gpio.txt index 4e16ba4feab0..a33628759d36 100644 --- a/Documentation/devicetree/bindings/gpio/gpio.txt +++ b/Documentation/devicetree/bindings/gpio/gpio.txt | |||
@@ -75,4 +75,40 @@ Example of two SOC GPIO banks defined as gpio-controller nodes: | |||
75 | gpio-controller; | 75 | gpio-controller; |
76 | }; | 76 | }; |
77 | 77 | ||
78 | 2.1) gpio-controller and pinctrl subsystem | ||
79 | ------------------------------------------ | ||
78 | 80 | ||
81 | gpio-controller on a SOC might be tightly coupled with the pinctrl | ||
82 | subsystem, in the sense that the pins can be used by other functions | ||
83 | together with optional gpio feature. | ||
84 | |||
85 | While the pin allocation is totally managed by the pin ctrl subsystem, | ||
86 | gpio (under gpiolib) is still maintained by gpio drivers. It may happen | ||
87 | that different pin ranges in a SoC is managed by different gpio drivers. | ||
88 | |||
89 | This makes it logical to let gpio drivers announce their pin ranges to | ||
90 | the pin ctrl subsystem and call 'pinctrl_request_gpio' in order to | ||
91 | request the corresponding pin before any gpio usage. | ||
92 | |||
93 | For this, the gpio controller can use a pinctrl phandle and pins to | ||
94 | announce the pinrange to the pin ctrl subsystem. For example, | ||
95 | |||
96 | qe_pio_e: gpio-controller@1460 { | ||
97 | #gpio-cells = <2>; | ||
98 | compatible = "fsl,qe-pario-bank-e", "fsl,qe-pario-bank"; | ||
99 | reg = <0x1460 0x18>; | ||
100 | gpio-controller; | ||
101 | gpio-ranges = <&pinctrl1 20 10>, <&pinctrl2 50 20>; | ||
102 | |||
103 | } | ||
104 | |||
105 | where, | ||
106 | &pinctrl1 and &pinctrl2 is the phandle to the pinctrl DT node. | ||
107 | |||
108 | Next values specify the base pin and number of pins for the range | ||
109 | handled by 'qe_pio_e' gpio. In the given example from base pin 20 to | ||
110 | pin 29 under pinctrl1 and pin 50 to pin 69 under pinctrl2 is handled | ||
111 | by this gpio controller. | ||
112 | |||
113 | The pinctrl node must have "#gpio-range-cells" property to show number of | ||
114 | arguments to pass with phandle from gpio controllers node. | ||
diff --git a/Documentation/devicetree/bindings/gpio/gpio_atmel.txt b/Documentation/devicetree/bindings/gpio/gpio_atmel.txt index 66efc804806a..85f8c0d084fa 100644 --- a/Documentation/devicetree/bindings/gpio/gpio_atmel.txt +++ b/Documentation/devicetree/bindings/gpio/gpio_atmel.txt | |||
@@ -9,6 +9,10 @@ Required properties: | |||
9 | unused). | 9 | unused). |
10 | - gpio-controller: Marks the device node as a GPIO controller. | 10 | - gpio-controller: Marks the device node as a GPIO controller. |
11 | 11 | ||
12 | optional properties: | ||
13 | - #gpio-lines: Number of gpio if absent 32. | ||
14 | |||
15 | |||
12 | Example: | 16 | Example: |
13 | pioA: gpio@fffff200 { | 17 | pioA: gpio@fffff200 { |
14 | compatible = "atmel,at91rm9200-gpio"; | 18 | compatible = "atmel,at91rm9200-gpio"; |
@@ -16,5 +20,6 @@ Example: | |||
16 | interrupts = <2 4>; | 20 | interrupts = <2 4>; |
17 | #gpio-cells = <2>; | 21 | #gpio-cells = <2>; |
18 | gpio-controller; | 22 | gpio-controller; |
23 | #gpio-lines = <19>; | ||
19 | }; | 24 | }; |
20 | 25 | ||
diff --git a/Documentation/devicetree/bindings/gpio/leds-ns2.txt b/Documentation/devicetree/bindings/gpio/leds-ns2.txt new file mode 100644 index 000000000000..aef3aca34d2d --- /dev/null +++ b/Documentation/devicetree/bindings/gpio/leds-ns2.txt | |||
@@ -0,0 +1,26 @@ | |||
1 | Binding for dual-GPIO LED found on Network Space v2 (and parents). | ||
2 | |||
3 | Required properties: | ||
4 | - compatible: "lacie,ns2-leds". | ||
5 | |||
6 | Each LED is represented as a sub-node of the ns2-leds device. | ||
7 | |||
8 | Required sub-node properties: | ||
9 | - cmd-gpio: Command LED GPIO. See OF device-tree GPIO specification. | ||
10 | - slow-gpio: Slow LED GPIO. See OF device-tree GPIO specification. | ||
11 | |||
12 | Optional sub-node properties: | ||
13 | - label: Name for this LED. If omitted, the label is taken from the node name. | ||
14 | - linux,default-trigger: Trigger assigned to the LED. | ||
15 | |||
16 | Example: | ||
17 | |||
18 | ns2-leds { | ||
19 | compatible = "lacie,ns2-leds"; | ||
20 | |||
21 | blue-sata { | ||
22 | label = "ns2:blue:sata"; | ||
23 | slow-gpio = <&gpio0 29 0>; | ||
24 | cmd-gpio = <&gpio0 30 0>; | ||
25 | }; | ||
26 | }; | ||
diff --git a/Documentation/devicetree/bindings/gpio/spear_spics.txt b/Documentation/devicetree/bindings/gpio/spear_spics.txt new file mode 100644 index 000000000000..96c37eb15075 --- /dev/null +++ b/Documentation/devicetree/bindings/gpio/spear_spics.txt | |||
@@ -0,0 +1,50 @@ | |||
1 | === ST Microelectronics SPEAr SPI CS Driver === | ||
2 | |||
3 | SPEAr platform provides a provision to control chipselects of ARM PL022 Prime | ||
4 | Cell spi controller through its system registers, which otherwise remains under | ||
5 | PL022 control. If chipselect remain under PL022 control then they would be | ||
6 | released as soon as transfer is over and TxFIFO becomes empty. This is not | ||
7 | desired by some of the device protocols above spi which expect (multiple) | ||
8 | transfers without releasing their chipselects. | ||
9 | |||
10 | Chipselects can be controlled by software by turning them as GPIOs. SPEAr | ||
11 | provides another interface through system registers through which software can | ||
12 | directly control each PL022 chipselect. Hence, it is natural for SPEAr to export | ||
13 | the control of this interface as gpio. | ||
14 | |||
15 | Required properties: | ||
16 | |||
17 | * compatible: should be defined as "st,spear-spics-gpio" | ||
18 | * reg: mentioning address range of spics controller | ||
19 | * st-spics,peripcfg-reg: peripheral configuration register offset | ||
20 | * st-spics,sw-enable-bit: bit offset to enable sw control | ||
21 | * st-spics,cs-value-bit: bit offset to drive chipselect low or high | ||
22 | * st-spics,cs-enable-mask: chip select number bit mask | ||
23 | * st-spics,cs-enable-shift: chip select number program offset | ||
24 | * gpio-controller: Marks the device node as gpio controller | ||
25 | * #gpio-cells: should be 1 and will mention chip select number | ||
26 | |||
27 | All the above bit offsets are within peripcfg register. | ||
28 | |||
29 | Example: | ||
30 | ------- | ||
31 | spics: spics@e0700000{ | ||
32 | compatible = "st,spear-spics-gpio"; | ||
33 | reg = <0xe0700000 0x1000>; | ||
34 | st-spics,peripcfg-reg = <0x3b0>; | ||
35 | st-spics,sw-enable-bit = <12>; | ||
36 | st-spics,cs-value-bit = <11>; | ||
37 | st-spics,cs-enable-mask = <3>; | ||
38 | st-spics,cs-enable-shift = <8>; | ||
39 | gpio-controller; | ||
40 | #gpio-cells = <2>; | ||
41 | }; | ||
42 | |||
43 | |||
44 | spi0: spi@e0100000 { | ||
45 | status = "okay"; | ||
46 | num-cs = <3>; | ||
47 | cs-gpios = <&gpio1 7 0>, <&spics 0>, | ||
48 | <&spics 1>; | ||
49 | ... | ||
50 | } | ||
diff --git a/Documentation/devicetree/bindings/gpu/nvidia,tegra20-host1x.txt b/Documentation/devicetree/bindings/gpu/nvidia,tegra20-host1x.txt new file mode 100644 index 000000000000..b4fa934ae3a2 --- /dev/null +++ b/Documentation/devicetree/bindings/gpu/nvidia,tegra20-host1x.txt | |||
@@ -0,0 +1,191 @@ | |||
1 | NVIDIA Tegra host1x | ||
2 | |||
3 | Required properties: | ||
4 | - compatible: "nvidia,tegra<chip>-host1x" | ||
5 | - reg: Physical base address and length of the controller's registers. | ||
6 | - interrupts: The interrupt outputs from the controller. | ||
7 | - #address-cells: The number of cells used to represent physical base addresses | ||
8 | in the host1x address space. Should be 1. | ||
9 | - #size-cells: The number of cells used to represent the size of an address | ||
10 | range in the host1x address space. Should be 1. | ||
11 | - ranges: The mapping of the host1x address space to the CPU address space. | ||
12 | |||
13 | The host1x top-level node defines a number of children, each representing one | ||
14 | of the following host1x client modules: | ||
15 | |||
16 | - mpe: video encoder | ||
17 | |||
18 | Required properties: | ||
19 | - compatible: "nvidia,tegra<chip>-mpe" | ||
20 | - reg: Physical base address and length of the controller's registers. | ||
21 | - interrupts: The interrupt outputs from the controller. | ||
22 | |||
23 | - vi: video input | ||
24 | |||
25 | Required properties: | ||
26 | - compatible: "nvidia,tegra<chip>-vi" | ||
27 | - reg: Physical base address and length of the controller's registers. | ||
28 | - interrupts: The interrupt outputs from the controller. | ||
29 | |||
30 | - epp: encoder pre-processor | ||
31 | |||
32 | Required properties: | ||
33 | - compatible: "nvidia,tegra<chip>-epp" | ||
34 | - reg: Physical base address and length of the controller's registers. | ||
35 | - interrupts: The interrupt outputs from the controller. | ||
36 | |||
37 | - isp: image signal processor | ||
38 | |||
39 | Required properties: | ||
40 | - compatible: "nvidia,tegra<chip>-isp" | ||
41 | - reg: Physical base address and length of the controller's registers. | ||
42 | - interrupts: The interrupt outputs from the controller. | ||
43 | |||
44 | - gr2d: 2D graphics engine | ||
45 | |||
46 | Required properties: | ||
47 | - compatible: "nvidia,tegra<chip>-gr2d" | ||
48 | - reg: Physical base address and length of the controller's registers. | ||
49 | - interrupts: The interrupt outputs from the controller. | ||
50 | |||
51 | - gr3d: 3D graphics engine | ||
52 | |||
53 | Required properties: | ||
54 | - compatible: "nvidia,tegra<chip>-gr3d" | ||
55 | - reg: Physical base address and length of the controller's registers. | ||
56 | |||
57 | - dc: display controller | ||
58 | |||
59 | Required properties: | ||
60 | - compatible: "nvidia,tegra<chip>-dc" | ||
61 | - reg: Physical base address and length of the controller's registers. | ||
62 | - interrupts: The interrupt outputs from the controller. | ||
63 | |||
64 | Each display controller node has a child node, named "rgb", that represents | ||
65 | the RGB output associated with the controller. It can take the following | ||
66 | optional properties: | ||
67 | - nvidia,ddc-i2c-bus: phandle of an I2C controller used for DDC EDID probing | ||
68 | - nvidia,hpd-gpio: specifies a GPIO used for hotplug detection | ||
69 | - nvidia,edid: supplies a binary EDID blob | ||
70 | |||
71 | - hdmi: High Definition Multimedia Interface | ||
72 | |||
73 | Required properties: | ||
74 | - compatible: "nvidia,tegra<chip>-hdmi" | ||
75 | - reg: Physical base address and length of the controller's registers. | ||
76 | - interrupts: The interrupt outputs from the controller. | ||
77 | - vdd-supply: regulator for supply voltage | ||
78 | - pll-supply: regulator for PLL | ||
79 | |||
80 | Optional properties: | ||
81 | - nvidia,ddc-i2c-bus: phandle of an I2C controller used for DDC EDID probing | ||
82 | - nvidia,hpd-gpio: specifies a GPIO used for hotplug detection | ||
83 | - nvidia,edid: supplies a binary EDID blob | ||
84 | |||
85 | - tvo: TV encoder output | ||
86 | |||
87 | Required properties: | ||
88 | - compatible: "nvidia,tegra<chip>-tvo" | ||
89 | - reg: Physical base address and length of the controller's registers. | ||
90 | - interrupts: The interrupt outputs from the controller. | ||
91 | |||
92 | - dsi: display serial interface | ||
93 | |||
94 | Required properties: | ||
95 | - compatible: "nvidia,tegra<chip>-dsi" | ||
96 | - reg: Physical base address and length of the controller's registers. | ||
97 | |||
98 | Example: | ||
99 | |||
100 | / { | ||
101 | ... | ||
102 | |||
103 | host1x { | ||
104 | compatible = "nvidia,tegra20-host1x", "simple-bus"; | ||
105 | reg = <0x50000000 0x00024000>; | ||
106 | interrupts = <0 65 0x04 /* mpcore syncpt */ | ||
107 | 0 67 0x04>; /* mpcore general */ | ||
108 | |||
109 | #address-cells = <1>; | ||
110 | #size-cells = <1>; | ||
111 | |||
112 | ranges = <0x54000000 0x54000000 0x04000000>; | ||
113 | |||
114 | mpe { | ||
115 | compatible = "nvidia,tegra20-mpe"; | ||
116 | reg = <0x54040000 0x00040000>; | ||
117 | interrupts = <0 68 0x04>; | ||
118 | }; | ||
119 | |||
120 | vi { | ||
121 | compatible = "nvidia,tegra20-vi"; | ||
122 | reg = <0x54080000 0x00040000>; | ||
123 | interrupts = <0 69 0x04>; | ||
124 | }; | ||
125 | |||
126 | epp { | ||
127 | compatible = "nvidia,tegra20-epp"; | ||
128 | reg = <0x540c0000 0x00040000>; | ||
129 | interrupts = <0 70 0x04>; | ||
130 | }; | ||
131 | |||
132 | isp { | ||
133 | compatible = "nvidia,tegra20-isp"; | ||
134 | reg = <0x54100000 0x00040000>; | ||
135 | interrupts = <0 71 0x04>; | ||
136 | }; | ||
137 | |||
138 | gr2d { | ||
139 | compatible = "nvidia,tegra20-gr2d"; | ||
140 | reg = <0x54140000 0x00040000>; | ||
141 | interrupts = <0 72 0x04>; | ||
142 | }; | ||
143 | |||
144 | gr3d { | ||
145 | compatible = "nvidia,tegra20-gr3d"; | ||
146 | reg = <0x54180000 0x00040000>; | ||
147 | }; | ||
148 | |||
149 | dc@54200000 { | ||
150 | compatible = "nvidia,tegra20-dc"; | ||
151 | reg = <0x54200000 0x00040000>; | ||
152 | interrupts = <0 73 0x04>; | ||
153 | |||
154 | rgb { | ||
155 | status = "disabled"; | ||
156 | }; | ||
157 | }; | ||
158 | |||
159 | dc@54240000 { | ||
160 | compatible = "nvidia,tegra20-dc"; | ||
161 | reg = <0x54240000 0x00040000>; | ||
162 | interrupts = <0 74 0x04>; | ||
163 | |||
164 | rgb { | ||
165 | status = "disabled"; | ||
166 | }; | ||
167 | }; | ||
168 | |||
169 | hdmi { | ||
170 | compatible = "nvidia,tegra20-hdmi"; | ||
171 | reg = <0x54280000 0x00040000>; | ||
172 | interrupts = <0 75 0x04>; | ||
173 | status = "disabled"; | ||
174 | }; | ||
175 | |||
176 | tvo { | ||
177 | compatible = "nvidia,tegra20-tvo"; | ||
178 | reg = <0x542c0000 0x00040000>; | ||
179 | interrupts = <0 76 0x04>; | ||
180 | status = "disabled"; | ||
181 | }; | ||
182 | |||
183 | dsi { | ||
184 | compatible = "nvidia,tegra20-dsi"; | ||
185 | reg = <0x54300000 0x00040000>; | ||
186 | status = "disabled"; | ||
187 | }; | ||
188 | }; | ||
189 | |||
190 | ... | ||
191 | }; | ||
diff --git a/Documentation/devicetree/bindings/hwmon/vexpress.txt b/Documentation/devicetree/bindings/hwmon/vexpress.txt new file mode 100644 index 000000000000..9c27ed694bbb --- /dev/null +++ b/Documentation/devicetree/bindings/hwmon/vexpress.txt | |||
@@ -0,0 +1,23 @@ | |||
1 | Versatile Express hwmon sensors | ||
2 | ------------------------------- | ||
3 | |||
4 | Requires node properties: | ||
5 | - "compatible" value : one of | ||
6 | "arm,vexpress-volt" | ||
7 | "arm,vexpress-amp" | ||
8 | "arm,vexpress-temp" | ||
9 | "arm,vexpress-power" | ||
10 | "arm,vexpress-energy" | ||
11 | - "arm,vexpress-sysreg,func" when controlled via vexpress-sysreg | ||
12 | (see Documentation/devicetree/bindings/arm/vexpress-sysreg.txt | ||
13 | for more details) | ||
14 | |||
15 | Optional node properties: | ||
16 | - label : string describing the monitored value | ||
17 | |||
18 | Example: | ||
19 | energy@0 { | ||
20 | compatible = "arm,vexpress-energy"; | ||
21 | arm,vexpress-sysreg,func = <13 0>; | ||
22 | label = "A15 Jcore"; | ||
23 | }; | ||
diff --git a/Documentation/devicetree/bindings/i2c/atmel-i2c.txt b/Documentation/devicetree/bindings/i2c/i2c-at91.txt index b689a0d9441c..b689a0d9441c 100644 --- a/Documentation/devicetree/bindings/i2c/atmel-i2c.txt +++ b/Documentation/devicetree/bindings/i2c/i2c-at91.txt | |||
diff --git a/Documentation/devicetree/bindings/i2c/i2c-cbus-gpio.txt b/Documentation/devicetree/bindings/i2c/i2c-cbus-gpio.txt new file mode 100644 index 000000000000..8ce9cd2855b5 --- /dev/null +++ b/Documentation/devicetree/bindings/i2c/i2c-cbus-gpio.txt | |||
@@ -0,0 +1,27 @@ | |||
1 | Device tree bindings for i2c-cbus-gpio driver | ||
2 | |||
3 | Required properties: | ||
4 | - compatible = "i2c-cbus-gpio"; | ||
5 | - gpios: clk, dat, sel | ||
6 | - #address-cells = <1>; | ||
7 | - #size-cells = <0>; | ||
8 | |||
9 | Optional properties: | ||
10 | - child nodes conforming to i2c bus binding | ||
11 | |||
12 | Example: | ||
13 | |||
14 | i2c@0 { | ||
15 | compatible = "i2c-cbus-gpio"; | ||
16 | gpios = <&gpio 66 0 /* clk */ | ||
17 | &gpio 65 0 /* dat */ | ||
18 | &gpio 64 0 /* sel */ | ||
19 | >; | ||
20 | #address-cells = <1>; | ||
21 | #size-cells = <0>; | ||
22 | |||
23 | retu-mfd: retu@1 { | ||
24 | compatible = "retu-mfd"; | ||
25 | reg = <0x1>; | ||
26 | }; | ||
27 | }; | ||
diff --git a/Documentation/devicetree/bindings/i2c/davinci.txt b/Documentation/devicetree/bindings/i2c/i2c-davinci.txt index 2dc935b4113d..2dc935b4113d 100644 --- a/Documentation/devicetree/bindings/i2c/davinci.txt +++ b/Documentation/devicetree/bindings/i2c/i2c-davinci.txt | |||
diff --git a/Documentation/devicetree/bindings/i2c/gpio-i2c.txt b/Documentation/devicetree/bindings/i2c/i2c-gpio.txt index 4f8ec947c6bd..4f8ec947c6bd 100644 --- a/Documentation/devicetree/bindings/i2c/gpio-i2c.txt +++ b/Documentation/devicetree/bindings/i2c/i2c-gpio.txt | |||
diff --git a/Documentation/devicetree/bindings/i2c/fsl-imx-i2c.txt b/Documentation/devicetree/bindings/i2c/i2c-imx.txt index f3cf43b66f7e..3614242e7732 100644 --- a/Documentation/devicetree/bindings/i2c/fsl-imx-i2c.txt +++ b/Documentation/devicetree/bindings/i2c/i2c-imx.txt | |||
@@ -12,13 +12,13 @@ Optional properties: | |||
12 | Examples: | 12 | Examples: |
13 | 13 | ||
14 | i2c@83fc4000 { /* I2C2 on i.MX51 */ | 14 | i2c@83fc4000 { /* I2C2 on i.MX51 */ |
15 | compatible = "fsl,imx51-i2c", "fsl,imx1-i2c"; | 15 | compatible = "fsl,imx51-i2c", "fsl,imx21-i2c"; |
16 | reg = <0x83fc4000 0x4000>; | 16 | reg = <0x83fc4000 0x4000>; |
17 | interrupts = <63>; | 17 | interrupts = <63>; |
18 | }; | 18 | }; |
19 | 19 | ||
20 | i2c@70038000 { /* HS-I2C on i.MX51 */ | 20 | i2c@70038000 { /* HS-I2C on i.MX51 */ |
21 | compatible = "fsl,imx51-i2c", "fsl,imx1-i2c"; | 21 | compatible = "fsl,imx51-i2c", "fsl,imx21-i2c"; |
22 | reg = <0x70038000 0x4000>; | 22 | reg = <0x70038000 0x4000>; |
23 | interrupts = <64>; | 23 | interrupts = <64>; |
24 | clock-frequency = <400000>; | 24 | clock-frequency = <400000>; |
diff --git a/Documentation/devicetree/bindings/i2c/fsl-i2c.txt b/Documentation/devicetree/bindings/i2c/i2c-mpc.txt index 1eacd6b20ed5..1eacd6b20ed5 100644 --- a/Documentation/devicetree/bindings/i2c/fsl-i2c.txt +++ b/Documentation/devicetree/bindings/i2c/i2c-mpc.txt | |||
diff --git a/Documentation/devicetree/bindings/i2c/i2c-mux-gpio.txt b/Documentation/devicetree/bindings/i2c/i2c-mux-gpio.txt new file mode 100644 index 000000000000..66709a825541 --- /dev/null +++ b/Documentation/devicetree/bindings/i2c/i2c-mux-gpio.txt | |||
@@ -0,0 +1,81 @@ | |||
1 | GPIO-based I2C Bus Mux | ||
2 | |||
3 | This binding describes an I2C bus multiplexer that uses GPIOs to | ||
4 | route the I2C signals. | ||
5 | |||
6 | +-----+ +-----+ | ||
7 | | dev | | dev | | ||
8 | +------------+ +-----+ +-----+ | ||
9 | | SoC | | | | ||
10 | | | /--------+--------+ | ||
11 | | +------+ | +------+ child bus A, on GPIO value set to 0 | ||
12 | | | I2C |-|--| Mux | | ||
13 | | +------+ | +--+---+ child bus B, on GPIO value set to 1 | ||
14 | | | | \----------+--------+--------+ | ||
15 | | +------+ | | | | | | ||
16 | | | GPIO |-|-----+ +-----+ +-----+ +-----+ | ||
17 | | +------+ | | dev | | dev | | dev | | ||
18 | +------------+ +-----+ +-----+ +-----+ | ||
19 | |||
20 | Required properties: | ||
21 | - compatible: i2c-mux-gpio | ||
22 | - i2c-parent: The phandle of the I2C bus that this multiplexer's master-side | ||
23 | port is connected to. | ||
24 | - mux-gpios: list of gpios used to control the muxer | ||
25 | * Standard I2C mux properties. See mux.txt in this directory. | ||
26 | * I2C child bus nodes. See mux.txt in this directory. | ||
27 | |||
28 | Optional properties: | ||
29 | - idle-state: value to set the muxer to when idle. When no value is | ||
30 | given, it defaults to the last value used. | ||
31 | |||
32 | For each i2c child node, an I2C child bus will be created. They will | ||
33 | be numbered based on their order in the device tree. | ||
34 | |||
35 | Whenever an access is made to a device on a child bus, the value set | ||
36 | in the revelant node's reg property will be output using the list of | ||
37 | GPIOs, the first in the list holding the least-significant value. | ||
38 | |||
39 | If an idle state is defined, using the idle-state (optional) property, | ||
40 | whenever an access is not being made to a device on a child bus, the | ||
41 | GPIOs will be set according to the idle value. | ||
42 | |||
43 | If an idle state is not defined, the most recently used value will be | ||
44 | left programmed into hardware whenever no access is being made to a | ||
45 | device on a child bus. | ||
46 | |||
47 | Example: | ||
48 | i2cmux { | ||
49 | compatible = "i2c-mux-gpio"; | ||
50 | #address-cells = <1>; | ||
51 | #size-cells = <0>; | ||
52 | mux-gpios = <&gpio1 22 0 &gpio1 23 0>; | ||
53 | i2c-parent = <&i2c1>; | ||
54 | |||
55 | i2c@1 { | ||
56 | reg = <1>; | ||
57 | #address-cells = <1>; | ||
58 | #size-cells = <0>; | ||
59 | |||
60 | ssd1307: oled@3c { | ||
61 | compatible = "solomon,ssd1307fb-i2c"; | ||
62 | reg = <0x3c>; | ||
63 | pwms = <&pwm 4 3000>; | ||
64 | reset-gpios = <&gpio2 7 1>; | ||
65 | reset-active-low; | ||
66 | }; | ||
67 | }; | ||
68 | |||
69 | i2c@3 { | ||
70 | reg = <3>; | ||
71 | #address-cells = <1>; | ||
72 | #size-cells = <0>; | ||
73 | |||
74 | pca9555: pca9555@20 { | ||
75 | compatible = "nxp,pca9555"; | ||
76 | gpio-controller; | ||
77 | #gpio-cells = <2>; | ||
78 | reg = <0x20>; | ||
79 | }; | ||
80 | }; | ||
81 | }; | ||
diff --git a/Documentation/devicetree/bindings/i2c/mux.txt b/Documentation/devicetree/bindings/i2c/i2c-mux.txt index af84cce5cd7b..af84cce5cd7b 100644 --- a/Documentation/devicetree/bindings/i2c/mux.txt +++ b/Documentation/devicetree/bindings/i2c/i2c-mux.txt | |||
diff --git a/Documentation/devicetree/bindings/i2c/i2c-mv64xxx.txt b/Documentation/devicetree/bindings/i2c/i2c-mv64xxx.txt new file mode 100644 index 000000000000..f46d928aa73d --- /dev/null +++ b/Documentation/devicetree/bindings/i2c/i2c-mv64xxx.txt | |||
@@ -0,0 +1,18 @@ | |||
1 | |||
2 | * Marvell MV64XXX I2C controller | ||
3 | |||
4 | Required properties : | ||
5 | |||
6 | - reg : Offset and length of the register set for the device | ||
7 | - compatible : Should be "marvell,mv64xxx-i2c" | ||
8 | - interrupts : The interrupt number | ||
9 | - clock-frequency : Desired I2C bus clock frequency in Hz. | ||
10 | |||
11 | Examples: | ||
12 | |||
13 | i2c@11000 { | ||
14 | compatible = "marvell,mv64xxx-i2c"; | ||
15 | reg = <0x11000 0x20>; | ||
16 | interrupts = <29>; | ||
17 | clock-frequency = <100000>; | ||
18 | }; | ||
diff --git a/Documentation/devicetree/bindings/i2c/nomadik.txt b/Documentation/devicetree/bindings/i2c/i2c-nomadik.txt index 72065b0ff680..72065b0ff680 100644 --- a/Documentation/devicetree/bindings/i2c/nomadik.txt +++ b/Documentation/devicetree/bindings/i2c/i2c-nomadik.txt | |||
diff --git a/Documentation/devicetree/bindings/i2c/i2c-ocores.txt b/Documentation/devicetree/bindings/i2c/i2c-ocores.txt index c15781f4dc8c..1637c298a1b3 100644 --- a/Documentation/devicetree/bindings/i2c/i2c-ocores.txt +++ b/Documentation/devicetree/bindings/i2c/i2c-ocores.txt | |||
@@ -1,7 +1,7 @@ | |||
1 | Device tree configuration for i2c-ocores | 1 | Device tree configuration for i2c-ocores |
2 | 2 | ||
3 | Required properties: | 3 | Required properties: |
4 | - compatible : "opencores,i2c-ocores" | 4 | - compatible : "opencores,i2c-ocores" or "aeroflexgaisler,i2cmst" |
5 | - reg : bus address start and address range size of device | 5 | - reg : bus address start and address range size of device |
6 | - interrupts : interrupt number | 6 | - interrupts : interrupt number |
7 | - clock-frequency : frequency of bus clock in Hz | 7 | - clock-frequency : frequency of bus clock in Hz |
diff --git a/Documentation/devicetree/bindings/i2c/cavium-i2c.txt b/Documentation/devicetree/bindings/i2c/i2c-octeon.txt index dced82ebe31d..dced82ebe31d 100644 --- a/Documentation/devicetree/bindings/i2c/cavium-i2c.txt +++ b/Documentation/devicetree/bindings/i2c/i2c-octeon.txt | |||
diff --git a/Documentation/devicetree/bindings/i2c/omap-i2c.txt b/Documentation/devicetree/bindings/i2c/i2c-omap.txt index 56564aa4b444..56564aa4b444 100644 --- a/Documentation/devicetree/bindings/i2c/omap-i2c.txt +++ b/Documentation/devicetree/bindings/i2c/i2c-omap.txt | |||
diff --git a/Documentation/devicetree/bindings/i2c/pnx.txt b/Documentation/devicetree/bindings/i2c/i2c-pnx.txt index fe98ada33ee4..fe98ada33ee4 100644 --- a/Documentation/devicetree/bindings/i2c/pnx.txt +++ b/Documentation/devicetree/bindings/i2c/i2c-pnx.txt | |||
diff --git a/Documentation/devicetree/bindings/i2c/ce4100-i2c.txt b/Documentation/devicetree/bindings/i2c/i2c-pxa-pci-ce4100.txt index 569b16248514..569b16248514 100644 --- a/Documentation/devicetree/bindings/i2c/ce4100-i2c.txt +++ b/Documentation/devicetree/bindings/i2c/i2c-pxa-pci-ce4100.txt | |||
diff --git a/Documentation/devicetree/bindings/i2c/mrvl-i2c.txt b/Documentation/devicetree/bindings/i2c/i2c-pxa.txt index 0f7945019f6f..12b78ac507e9 100644 --- a/Documentation/devicetree/bindings/i2c/mrvl-i2c.txt +++ b/Documentation/devicetree/bindings/i2c/i2c-pxa.txt | |||
@@ -31,21 +31,3 @@ Examples: | |||
31 | reg = <0xd4025000 0x1000>; | 31 | reg = <0xd4025000 0x1000>; |
32 | interrupts = <58>; | 32 | interrupts = <58>; |
33 | }; | 33 | }; |
34 | |||
35 | * Marvell MV64XXX I2C controller | ||
36 | |||
37 | Required properties : | ||
38 | |||
39 | - reg : Offset and length of the register set for the device | ||
40 | - compatible : Should be "marvell,mv64xxx-i2c" | ||
41 | - interrupts : The interrupt number | ||
42 | - clock-frequency : Desired I2C bus clock frequency in Hz. | ||
43 | |||
44 | Examples: | ||
45 | |||
46 | i2c@11000 { | ||
47 | compatible = "marvell,mv64xxx-i2c"; | ||
48 | reg = <0x11000 0x20>; | ||
49 | interrupts = <29>; | ||
50 | clock-frequency = <100000>; | ||
51 | }; | ||
diff --git a/Documentation/devicetree/bindings/i2c/samsung-i2c.txt b/Documentation/devicetree/bindings/i2c/i2c-s3c2410.txt index b6cb5a12c672..e9611ace8792 100644 --- a/Documentation/devicetree/bindings/i2c/samsung-i2c.txt +++ b/Documentation/devicetree/bindings/i2c/i2c-s3c2410.txt | |||
@@ -13,11 +13,17 @@ Required properties: | |||
13 | - interrupts: interrupt number to the cpu. | 13 | - interrupts: interrupt number to the cpu. |
14 | - samsung,i2c-sda-delay: Delay (in ns) applied to data line (SDA) edges. | 14 | - samsung,i2c-sda-delay: Delay (in ns) applied to data line (SDA) edges. |
15 | 15 | ||
16 | Required for all cases except "samsung,s3c2440-hdmiphy-i2c": | ||
17 | - Samsung GPIO variant (deprecated): | ||
18 | - gpios: The order of the gpios should be the following: <SDA, SCL>. | ||
19 | The gpio specifier depends on the gpio controller. Required in all | ||
20 | cases except for "samsung,s3c2440-hdmiphy-i2c" whose input/output | ||
21 | lines are permanently wired to the respective clienta | ||
22 | - Pinctrl variant (preferred, if available): | ||
23 | - pinctrl-0: Pin control group to be used for this controller. | ||
24 | - pinctrl-names: Should contain only one value - "default". | ||
25 | |||
16 | Optional properties: | 26 | Optional properties: |
17 | - gpios: The order of the gpios should be the following: <SDA, SCL>. | ||
18 | The gpio specifier depends on the gpio controller. Required in all | ||
19 | cases except for "samsung,s3c2440-hdmiphy-i2c" whose input/output | ||
20 | lines are permanently wired to the respective client | ||
21 | - samsung,i2c-slave-addr: Slave address in multi-master enviroment. If not | 27 | - samsung,i2c-slave-addr: Slave address in multi-master enviroment. If not |
22 | specified, default value is 0. | 28 | specified, default value is 0. |
23 | - samsung,i2c-max-bus-freq: Desired frequency in Hz of the bus. If not | 29 | - samsung,i2c-max-bus-freq: Desired frequency in Hz of the bus. If not |
@@ -31,8 +37,14 @@ Example: | |||
31 | interrupts = <345>; | 37 | interrupts = <345>; |
32 | samsung,i2c-sda-delay = <100>; | 38 | samsung,i2c-sda-delay = <100>; |
33 | samsung,i2c-max-bus-freq = <100000>; | 39 | samsung,i2c-max-bus-freq = <100000>; |
40 | /* Samsung GPIO variant begins here */ | ||
34 | gpios = <&gpd1 2 0 /* SDA */ | 41 | gpios = <&gpd1 2 0 /* SDA */ |
35 | &gpd1 3 0 /* SCL */>; | 42 | &gpd1 3 0 /* SCL */>; |
43 | /* Samsung GPIO variant ends here */ | ||
44 | /* Pinctrl variant begins here */ | ||
45 | pinctrl-0 = <&i2c3_bus>; | ||
46 | pinctrl-names = "default"; | ||
47 | /* Pinctrl variant ends here */ | ||
36 | #address-cells = <1>; | 48 | #address-cells = <1>; |
37 | #size-cells = <0>; | 49 | #size-cells = <0>; |
38 | 50 | ||
diff --git a/Documentation/devicetree/bindings/i2c/sirf-i2c.txt b/Documentation/devicetree/bindings/i2c/i2c-sirf.txt index 7baf9e133fa8..7baf9e133fa8 100644 --- a/Documentation/devicetree/bindings/i2c/sirf-i2c.txt +++ b/Documentation/devicetree/bindings/i2c/i2c-sirf.txt | |||
diff --git a/Documentation/devicetree/bindings/i2c/arm-versatile.txt b/Documentation/devicetree/bindings/i2c/i2c-versatile.txt index 361d31c51b6f..361d31c51b6f 100644 --- a/Documentation/devicetree/bindings/i2c/arm-versatile.txt +++ b/Documentation/devicetree/bindings/i2c/i2c-versatile.txt | |||
diff --git a/Documentation/devicetree/bindings/i2c/xiic.txt b/Documentation/devicetree/bindings/i2c/i2c-xiic.txt index ceabbe91ae44..ceabbe91ae44 100644 --- a/Documentation/devicetree/bindings/i2c/xiic.txt +++ b/Documentation/devicetree/bindings/i2c/i2c-xiic.txt | |||
diff --git a/Documentation/devicetree/bindings/i2c/trivial-devices.txt b/Documentation/devicetree/bindings/i2c/trivial-devices.txt index 2f5322b119eb..446859fcdca4 100644 --- a/Documentation/devicetree/bindings/i2c/trivial-devices.txt +++ b/Documentation/devicetree/bindings/i2c/trivial-devices.txt | |||
@@ -55,5 +55,7 @@ st-micro,24c256 i2c serial eeprom (24cxx) | |||
55 | stm,m41t00 Serial Access TIMEKEEPER | 55 | stm,m41t00 Serial Access TIMEKEEPER |
56 | stm,m41t62 Serial real-time clock (RTC) with alarm | 56 | stm,m41t62 Serial real-time clock (RTC) with alarm |
57 | stm,m41t80 M41T80 - SERIAL ACCESS RTC WITH ALARMS | 57 | stm,m41t80 M41T80 - SERIAL ACCESS RTC WITH ALARMS |
58 | taos,tsl2550 Ambient Light Sensor with SMBUS/Two Wire Serial Interface | ||
58 | ti,tsc2003 I2C Touch-Screen Controller | 59 | ti,tsc2003 I2C Touch-Screen Controller |
59 | ti,tmp102 Low Power Digital Temperature Sensor with SMBUS/Two Wire Serial Interface | 60 | ti,tmp102 Low Power Digital Temperature Sensor with SMBUS/Two Wire Serial Interface |
61 | ti,tmp275 Digital Temperature Sensor | ||
diff --git a/Documentation/devicetree/bindings/input/gpio-matrix-keypad.txt b/Documentation/devicetree/bindings/input/gpio-matrix-keypad.txt new file mode 100644 index 000000000000..ead641c65e0a --- /dev/null +++ b/Documentation/devicetree/bindings/input/gpio-matrix-keypad.txt | |||
@@ -0,0 +1,46 @@ | |||
1 | * GPIO driven matrix keypad device tree bindings | ||
2 | |||
3 | GPIO driven matrix keypad is used to interface a SoC with a matrix keypad. | ||
4 | The matrix keypad supports multiple row and column lines, a key can be | ||
5 | placed at each intersection of a unique row and a unique column. The matrix | ||
6 | keypad can sense a key-press and key-release by means of GPIO lines and | ||
7 | report the event using GPIO interrupts to the cpu. | ||
8 | |||
9 | Required Properties: | ||
10 | - compatible: Should be "gpio-matrix-keypad" | ||
11 | - row-gpios: List of gpios used as row lines. The gpio specifier | ||
12 | for this property depends on the gpio controller to | ||
13 | which these row lines are connected. | ||
14 | - col-gpios: List of gpios used as column lines. The gpio specifier | ||
15 | for this property depends on the gpio controller to | ||
16 | which these column lines are connected. | ||
17 | - linux,keymap: The definition can be found at | ||
18 | bindings/input/matrix-keymap.txt | ||
19 | |||
20 | Optional Properties: | ||
21 | - linux,no-autorepeat: do no enable autorepeat feature. | ||
22 | - linux,wakeup: use any event on keypad as wakeup event. | ||
23 | - debounce-delay-ms: debounce interval in milliseconds | ||
24 | - col-scan-delay-us: delay, measured in microseconds, that is needed | ||
25 | before we can scan keypad after activating column gpio | ||
26 | |||
27 | Example: | ||
28 | matrix-keypad { | ||
29 | compatible = "gpio-matrix-keypad"; | ||
30 | debounce-delay-ms = <5>; | ||
31 | col-scan-delay-us = <2>; | ||
32 | |||
33 | row-gpios = <&gpio2 25 0 | ||
34 | &gpio2 26 0 | ||
35 | &gpio2 27 0>; | ||
36 | |||
37 | col-gpios = <&gpio2 21 0 | ||
38 | &gpio2 22 0>; | ||
39 | |||
40 | linux,keymap = <0x0000008B | ||
41 | 0x0100009E | ||
42 | 0x02000069 | ||
43 | 0x0001006A | ||
44 | 0x0101001C | ||
45 | 0x0201006C>; | ||
46 | }; | ||
diff --git a/Documentation/devicetree/bindings/input/pwm-beeper.txt b/Documentation/devicetree/bindings/input/pwm-beeper.txt new file mode 100644 index 000000000000..be332ae4f2d6 --- /dev/null +++ b/Documentation/devicetree/bindings/input/pwm-beeper.txt | |||
@@ -0,0 +1,7 @@ | |||
1 | * PWM beeper device tree bindings | ||
2 | |||
3 | Registers a PWM device as beeper. | ||
4 | |||
5 | Required properties: | ||
6 | - compatible: should be "pwm-beeper" | ||
7 | - pwms: phandle to the physical PWM device | ||
diff --git a/Documentation/devicetree/bindings/input/stmpe-keypad.txt b/Documentation/devicetree/bindings/input/stmpe-keypad.txt new file mode 100644 index 000000000000..1b97222e8a0b --- /dev/null +++ b/Documentation/devicetree/bindings/input/stmpe-keypad.txt | |||
@@ -0,0 +1,39 @@ | |||
1 | * STMPE Keypad | ||
2 | |||
3 | Required properties: | ||
4 | - compatible : "st,stmpe-keypad" | ||
5 | - linux,keymap : See ./matrix-keymap.txt | ||
6 | |||
7 | Optional properties: | ||
8 | - debounce-interval : Debouncing interval time in milliseconds | ||
9 | - st,scan-count : Scanning cycles elapsed before key data is updated | ||
10 | - st,no-autorepeat : If specified device will not autorepeat | ||
11 | |||
12 | Example: | ||
13 | |||
14 | stmpe_keypad { | ||
15 | compatible = "st,stmpe-keypad"; | ||
16 | |||
17 | debounce-interval = <64>; | ||
18 | st,scan-count = <8>; | ||
19 | st,no-autorepeat; | ||
20 | |||
21 | linux,keymap = <0x205006b | ||
22 | 0x4010074 | ||
23 | 0x3050072 | ||
24 | 0x1030004 | ||
25 | 0x502006a | ||
26 | 0x500000a | ||
27 | 0x5008b | ||
28 | 0x706001c | ||
29 | 0x405000b | ||
30 | 0x6070003 | ||
31 | 0x3040067 | ||
32 | 0x303006c | ||
33 | 0x60400e7 | ||
34 | 0x602009e | ||
35 | 0x4020073 | ||
36 | 0x5050002 | ||
37 | 0x4030069 | ||
38 | 0x3020008>; | ||
39 | }; | ||
diff --git a/Documentation/devicetree/bindings/input/tca8418_keypad.txt b/Documentation/devicetree/bindings/input/tca8418_keypad.txt new file mode 100644 index 000000000000..2a1538f0053f --- /dev/null +++ b/Documentation/devicetree/bindings/input/tca8418_keypad.txt | |||
@@ -0,0 +1,8 @@ | |||
1 | |||
2 | Required properties: | ||
3 | - compatible: "ti,tca8418" | ||
4 | - reg: the I2C address | ||
5 | - interrupts: IRQ line number, should trigger on falling edge | ||
6 | - keypad,num-rows: The number of rows | ||
7 | - keypad,num-columns: The number of columns | ||
8 | - linux,keymap: Keys definitions, see keypad-matrix. | ||
diff --git a/Documentation/devicetree/bindings/input/touchscreen/bu21013.txt b/Documentation/devicetree/bindings/input/touchscreen/bu21013.txt new file mode 100644 index 000000000000..ca5a2c86480c --- /dev/null +++ b/Documentation/devicetree/bindings/input/touchscreen/bu21013.txt | |||
@@ -0,0 +1,28 @@ | |||
1 | * Rohm BU21013 Touch Screen | ||
2 | |||
3 | Required properties: | ||
4 | - compatible : "rohm,bu21013_tp" | ||
5 | - reg : I2C device address | ||
6 | |||
7 | Optional properties: | ||
8 | - touch-gpio : GPIO pin registering a touch event | ||
9 | - <supply_name>-supply : Phandle to a regulator supply | ||
10 | - rohm,touch-max-x : Maximum outward permitted limit in the X axis | ||
11 | - rohm,touch-max-y : Maximum outward permitted limit in the Y axis | ||
12 | - rohm,flip-x : Flip touch coordinates on the X axis | ||
13 | - rohm,flip-y : Flip touch coordinates on the Y axis | ||
14 | |||
15 | Example: | ||
16 | |||
17 | i2c@80110000 { | ||
18 | bu21013_tp@0x5c { | ||
19 | compatible = "rohm,bu21013_tp"; | ||
20 | reg = <0x5c>; | ||
21 | touch-gpio = <&gpio2 20 0x4>; | ||
22 | avdd-supply = <&ab8500_ldo_aux1_reg>; | ||
23 | |||
24 | rohm,touch-max-x = <384>; | ||
25 | rohm,touch-max-y = <704>; | ||
26 | rohm,flip-y; | ||
27 | }; | ||
28 | }; | ||
diff --git a/Documentation/devicetree/bindings/input/touchscreen/egalax-ts.txt b/Documentation/devicetree/bindings/input/touchscreen/egalax-ts.txt new file mode 100644 index 000000000000..df70318a617f --- /dev/null +++ b/Documentation/devicetree/bindings/input/touchscreen/egalax-ts.txt | |||
@@ -0,0 +1,19 @@ | |||
1 | * EETI eGalax Multiple Touch Controller | ||
2 | |||
3 | Required properties: | ||
4 | - compatible: must be "eeti,egalax_ts" | ||
5 | - reg: i2c slave address | ||
6 | - interrupt-parent: the phandle for the interrupt controller | ||
7 | - interrupts: touch controller interrupt | ||
8 | - wakeup-gpios: the gpio pin to be used for waking up the controller | ||
9 | as well as uased as irq pin | ||
10 | |||
11 | Example: | ||
12 | |||
13 | egalax_ts@04 { | ||
14 | compatible = "eeti,egalax_ts"; | ||
15 | reg = <0x04>; | ||
16 | interrupt-parent = <&gpio1>; | ||
17 | interrupts = <9 2>; | ||
18 | wakeup-gpios = <&gpio1 9 0>; | ||
19 | }; | ||
diff --git a/Documentation/devicetree/bindings/input/touchscreen/mms114.txt b/Documentation/devicetree/bindings/input/touchscreen/mms114.txt new file mode 100644 index 000000000000..89d4c56c5671 --- /dev/null +++ b/Documentation/devicetree/bindings/input/touchscreen/mms114.txt | |||
@@ -0,0 +1,34 @@ | |||
1 | * MELFAS MMS114 touchscreen controller | ||
2 | |||
3 | Required properties: | ||
4 | - compatible: must be "melfas,mms114" | ||
5 | - reg: I2C address of the chip | ||
6 | - interrupts: interrupt to which the chip is connected | ||
7 | - x-size: horizontal resolution of touchscreen | ||
8 | - y-size: vertical resolution of touchscreen | ||
9 | |||
10 | Optional properties: | ||
11 | - contact-threshold: | ||
12 | - moving-threshold: | ||
13 | - x-invert: invert X axis | ||
14 | - y-invert: invert Y axis | ||
15 | |||
16 | Example: | ||
17 | |||
18 | i2c@00000000 { | ||
19 | /* ... */ | ||
20 | |||
21 | touchscreen@48 { | ||
22 | compatible = "melfas,mms114"; | ||
23 | reg = <0x48>; | ||
24 | interrupts = <39 0>; | ||
25 | x-size = <720>; | ||
26 | y-size = <1280>; | ||
27 | contact-threshold = <10>; | ||
28 | moving-threshold = <10>; | ||
29 | x-invert; | ||
30 | y-invert; | ||
31 | }; | ||
32 | |||
33 | /* ... */ | ||
34 | }; | ||
diff --git a/Documentation/devicetree/bindings/input/touchscreen/stmpe.txt b/Documentation/devicetree/bindings/input/touchscreen/stmpe.txt new file mode 100644 index 000000000000..127baa31a77a --- /dev/null +++ b/Documentation/devicetree/bindings/input/touchscreen/stmpe.txt | |||
@@ -0,0 +1,43 @@ | |||
1 | STMPE Touchscreen | ||
2 | ---------------- | ||
3 | |||
4 | Required properties: | ||
5 | - compatible: "st,stmpe-ts" | ||
6 | |||
7 | Optional properties: | ||
8 | - st,sample-time: ADC converstion time in number of clock. (0 -> 36 clocks, 1 -> | ||
9 | 44 clocks, 2 -> 56 clocks, 3 -> 64 clocks, 4 -> 80 clocks, 5 -> 96 clocks, 6 | ||
10 | -> 144 clocks), recommended is 4. | ||
11 | - st,mod-12b: ADC Bit mode (0 -> 10bit ADC, 1 -> 12bit ADC) | ||
12 | - st,ref-sel: ADC reference source (0 -> internal reference, 1 -> external | ||
13 | reference) | ||
14 | - st,adc-freq: ADC Clock speed (0 -> 1.625 MHz, 1 -> 3.25 MHz, 2 || 3 -> 6.5 MHz) | ||
15 | - st,ave-ctrl: Sample average control (0 -> 1 sample, 1 -> 2 samples, 2 -> 4 | ||
16 | samples, 3 -> 8 samples) | ||
17 | - st,touch-det-delay: Touch detect interrupt delay (0 -> 10 us, 1 -> 50 us, 2 -> | ||
18 | 100 us, 3 -> 500 us, 4-> 1 ms, 5 -> 5 ms, 6 -> 10 ms, 7 -> 50 ms) recommended | ||
19 | is 3 | ||
20 | - st,settling: Panel driver settling time (0 -> 10 us, 1 -> 100 us, 2 -> 500 us, 3 | ||
21 | -> 1 ms, 4 -> 5 ms, 5 -> 10 ms, 6 for 50 ms, 7 -> 100 ms) recommended is 2 | ||
22 | - st,fraction-z: Length of the fractional part in z (fraction-z ([0..7]) = Count of | ||
23 | the fractional part) recommended is 7 | ||
24 | - st,i-drive: current limit value of the touchscreen drivers (0 -> 20 mA typical 35 | ||
25 | mA max, 1 -> 50 mA typical 80 mA max) | ||
26 | |||
27 | Node name must be stmpe_touchscreen and should be child node of stmpe node to | ||
28 | which it belongs. | ||
29 | |||
30 | Example: | ||
31 | |||
32 | stmpe_touchscreen { | ||
33 | compatible = "st,stmpe-ts"; | ||
34 | st,sample-time = <4>; | ||
35 | st,mod-12b = <1>; | ||
36 | st,ref-sel = <0>; | ||
37 | st,adc-freq = <1>; | ||
38 | st,ave-ctrl = <1>; | ||
39 | st,touch-det-delay = <2>; | ||
40 | st,settling = <2>; | ||
41 | st,fraction-z = <7>; | ||
42 | st,i-drive = <1>; | ||
43 | }; | ||
diff --git a/Documentation/devicetree/bindings/interrupt-controller/allwinner,sunxi-ic.txt b/Documentation/devicetree/bindings/interrupt-controller/allwinner,sunxi-ic.txt new file mode 100644 index 000000000000..7f9fb85f5456 --- /dev/null +++ b/Documentation/devicetree/bindings/interrupt-controller/allwinner,sunxi-ic.txt | |||
@@ -0,0 +1,104 @@ | |||
1 | Allwinner Sunxi Interrupt Controller | ||
2 | |||
3 | Required properties: | ||
4 | |||
5 | - compatible : should be "allwinner,sunxi-ic" | ||
6 | - reg : Specifies base physical address and size of the registers. | ||
7 | - interrupt-controller : Identifies the node as an interrupt controller | ||
8 | - #interrupt-cells : Specifies the number of cells needed to encode an | ||
9 | interrupt source. The value shall be 1. | ||
10 | |||
11 | The interrupt sources are as follows: | ||
12 | |||
13 | 0: ENMI | ||
14 | 1: UART0 | ||
15 | 2: UART1 | ||
16 | 3: UART2 | ||
17 | 4: UART3 | ||
18 | 5: IR0 | ||
19 | 6: IR1 | ||
20 | 7: I2C0 | ||
21 | 8: I2C1 | ||
22 | 9: I2C2 | ||
23 | 10: SPI0 | ||
24 | 11: SPI1 | ||
25 | 12: SPI2 | ||
26 | 13: SPDIF | ||
27 | 14: AC97 | ||
28 | 15: TS | ||
29 | 16: I2S | ||
30 | 17: UART4 | ||
31 | 18: UART5 | ||
32 | 19: UART6 | ||
33 | 20: UART7 | ||
34 | 21: KEYPAD | ||
35 | 22: TIMER0 | ||
36 | 23: TIMER1 | ||
37 | 24: TIMER2 | ||
38 | 25: TIMER3 | ||
39 | 26: CAN | ||
40 | 27: DMA | ||
41 | 28: PIO | ||
42 | 29: TOUCH_PANEL | ||
43 | 30: AUDIO_CODEC | ||
44 | 31: LRADC | ||
45 | 32: SDMC0 | ||
46 | 33: SDMC1 | ||
47 | 34: SDMC2 | ||
48 | 35: SDMC3 | ||
49 | 36: MEMSTICK | ||
50 | 37: NAND | ||
51 | 38: USB0 | ||
52 | 39: USB1 | ||
53 | 40: USB2 | ||
54 | 41: SCR | ||
55 | 42: CSI0 | ||
56 | 43: CSI1 | ||
57 | 44: LCDCTRL0 | ||
58 | 45: LCDCTRL1 | ||
59 | 46: MP | ||
60 | 47: DEFEBE0 | ||
61 | 48: DEFEBE1 | ||
62 | 49: PMU | ||
63 | 50: SPI3 | ||
64 | 51: TZASC | ||
65 | 52: PATA | ||
66 | 53: VE | ||
67 | 54: SS | ||
68 | 55: EMAC | ||
69 | 56: SATA | ||
70 | 57: GPS | ||
71 | 58: HDMI | ||
72 | 59: TVE | ||
73 | 60: ACE | ||
74 | 61: TVD | ||
75 | 62: PS2_0 | ||
76 | 63: PS2_1 | ||
77 | 64: USB3 | ||
78 | 65: USB4 | ||
79 | 66: PLE_PFM | ||
80 | 67: TIMER4 | ||
81 | 68: TIMER5 | ||
82 | 69: GPU_GP | ||
83 | 70: GPU_GPMMU | ||
84 | 71: GPU_PP0 | ||
85 | 72: GPU_PPMMU0 | ||
86 | 73: GPU_PMU | ||
87 | 74: GPU_RSV0 | ||
88 | 75: GPU_RSV1 | ||
89 | 76: GPU_RSV2 | ||
90 | 77: GPU_RSV3 | ||
91 | 78: GPU_RSV4 | ||
92 | 79: GPU_RSV5 | ||
93 | 80: GPU_RSV6 | ||
94 | 82: SYNC_TIMER0 | ||
95 | 83: SYNC_TIMER1 | ||
96 | |||
97 | Example: | ||
98 | |||
99 | intc: interrupt-controller { | ||
100 | compatible = "allwinner,sunxi-ic"; | ||
101 | reg = <0x01c20400 0x400>; | ||
102 | interrupt-controller; | ||
103 | #interrupt-cells = <2>; | ||
104 | }; | ||
diff --git a/Documentation/devicetree/bindings/leds/common.txt b/Documentation/devicetree/bindings/leds/common.txt new file mode 100644 index 000000000000..2d88816dd550 --- /dev/null +++ b/Documentation/devicetree/bindings/leds/common.txt | |||
@@ -0,0 +1,23 @@ | |||
1 | Common leds properties. | ||
2 | |||
3 | Optional properties for child nodes: | ||
4 | - label : The label for this LED. If omitted, the label is | ||
5 | taken from the node name (excluding the unit address). | ||
6 | |||
7 | - linux,default-trigger : This parameter, if present, is a | ||
8 | string defining the trigger assigned to the LED. Current triggers are: | ||
9 | "backlight" - LED will act as a back-light, controlled by the framebuffer | ||
10 | system | ||
11 | "default-on" - LED will turn on (but for leds-gpio see "default-state" | ||
12 | property in Documentation/devicetree/bindings/gpio/led.txt) | ||
13 | "heartbeat" - LED "double" flashes at a load average based rate | ||
14 | "ide-disk" - LED indicates disk activity | ||
15 | "timer" - LED flashes at a fixed, configurable rate | ||
16 | |||
17 | Examples: | ||
18 | |||
19 | system-status { | ||
20 | label = "Status"; | ||
21 | linux,default-trigger = "heartbeat"; | ||
22 | ... | ||
23 | }; | ||
diff --git a/Documentation/devicetree/bindings/gpio/led.txt b/Documentation/devicetree/bindings/leds/leds-gpio.txt index edc83c1c0d54..df1b3080f6b8 100644 --- a/Documentation/devicetree/bindings/gpio/led.txt +++ b/Documentation/devicetree/bindings/leds/leds-gpio.txt | |||
@@ -10,16 +10,10 @@ LED sub-node properties: | |||
10 | - gpios : Should specify the LED's GPIO, see "gpios property" in | 10 | - gpios : Should specify the LED's GPIO, see "gpios property" in |
11 | Documentation/devicetree/bindings/gpio/gpio.txt. Active low LEDs should be | 11 | Documentation/devicetree/bindings/gpio/gpio.txt. Active low LEDs should be |
12 | 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) |
14 | taken from the node name (excluding the unit address). | 14 | see Documentation/devicetree/bindings/leds/common.txt |
15 | - linux,default-trigger : (optional) This parameter, if present, is a | 15 | - linux,default-trigger : (optional) |
16 | string defining the trigger assigned to the LED. Current triggers are: | 16 | see Documentation/devicetree/bindings/leds/common.txt |
17 | "backlight" - LED will act as a back-light, controlled by the framebuffer | ||
18 | system | ||
19 | "default-on" - LED will turn on, but see "default-state" below | ||
20 | "heartbeat" - LED "double" flashes at a load average based rate | ||
21 | "ide-disk" - LED indicates disk activity | ||
22 | "timer" - LED flashes at a fixed, configurable rate | ||
23 | - default-state: (optional) The initial state of the LED. Valid | 17 | - default-state: (optional) The initial state of the LED. Valid |
24 | values are "on", "off", and "keep". If the LED is already on or off | 18 | values are "on", "off", and "keep". If the LED is already on or off |
25 | and the default-state property is set the to same value, then no | 19 | and the default-state property is set the to same value, then no |
diff --git a/Documentation/devicetree/bindings/media/s5p-mfc.txt b/Documentation/devicetree/bindings/media/s5p-mfc.txt new file mode 100644 index 000000000000..67ec3d4ccc7f --- /dev/null +++ b/Documentation/devicetree/bindings/media/s5p-mfc.txt | |||
@@ -0,0 +1,23 @@ | |||
1 | * Samsung Multi Format Codec (MFC) | ||
2 | |||
3 | Multi Format Codec (MFC) is the IP present in Samsung SoCs which | ||
4 | supports high resolution decoding and encoding functionalities. | ||
5 | The MFC device driver is a v4l2 driver which can encode/decode | ||
6 | video raw/elementary streams and has support for all popular | ||
7 | video codecs. | ||
8 | |||
9 | Required properties: | ||
10 | - compatible : value should be either one among the following | ||
11 | (a) "samsung,mfc-v5" for MFC v5 present in Exynos4 SoCs | ||
12 | (b) "samsung,mfc-v6" for MFC v6 present in Exynos5 SoCs | ||
13 | |||
14 | - reg : Physical base address of the IP registers and length of memory | ||
15 | mapped region. | ||
16 | |||
17 | - interrupts : MFC interrupt number to the CPU. | ||
18 | |||
19 | - samsung,mfc-r : Base address of the first memory bank used by MFC | ||
20 | for DMA contiguous memory allocation and its size. | ||
21 | |||
22 | - samsung,mfc-l : Base address of the second memory bank used by MFC | ||
23 | for DMA contiguous memory allocation and its size. | ||
diff --git a/Documentation/devicetree/bindings/mfd/ab8500.txt b/Documentation/devicetree/bindings/mfd/ab8500.txt index ce83c8d3c00e..13b707b7355c 100644 --- a/Documentation/devicetree/bindings/mfd/ab8500.txt +++ b/Documentation/devicetree/bindings/mfd/ab8500.txt | |||
@@ -24,7 +24,32 @@ ab8500-bm : : : Battery Manager | |||
24 | ab8500-btemp : : : Battery Temperature | 24 | ab8500-btemp : : : Battery Temperature |
25 | ab8500-charger : : : Battery Charger | 25 | ab8500-charger : : : Battery Charger |
26 | ab8500-codec : : : Audio Codec | 26 | ab8500-codec : : : Audio Codec |
27 | ab8500-fg : : : Fuel Gauge | 27 | ab8500-fg : : vddadc : Fuel Gauge |
28 | : NCONV_ACCU : : Accumulate N Sample Conversion | ||
29 | : BATT_OVV : : Battery Over Voltage | ||
30 | : LOW_BAT_F : : LOW threshold battery voltage | ||
31 | : CC_INT_CALIB : : Coulomb Counter Internal Calibration | ||
32 | : CCEOC : : Coulomb Counter End of Conversion | ||
33 | ab8500-btemp : : vtvout : Battery Temperature | ||
34 | : BAT_CTRL_INDB : : Battery Removal Indicator | ||
35 | : BTEMP_LOW : : Btemp < BtempLow, if battery temperature is lower than -10°C | ||
36 | : BTEMP_LOW_MEDIUM : : BtempLow < Btemp < BtempMedium,if battery temperature is between -10 and 0°C | ||
37 | : BTEMP_MEDIUM_HIGH : : BtempMedium < Btemp < BtempHigh,if battery temperature is between 0°C and“MaxTemp | ||
38 | : BTEMP_HIGH : : Btemp > BtempHigh, if battery temperature is higher than “MaxTemp | ||
39 | ab8500-charger : : vddadc : Charger interface | ||
40 | : MAIN_CH_UNPLUG_DET : : main charger unplug detection management (not in 8505) | ||
41 | : MAIN_CHARGE_PLUG_DET : : main charger plug detection management (not in 8505) | ||
42 | : MAIN_EXT_CH_NOT_OK : : main charger not OK | ||
43 | : MAIN_CH_TH_PROT_R : : Die temp is above main charger | ||
44 | : MAIN_CH_TH_PROT_F : : Die temp is below main charger | ||
45 | : VBUS_DET_F : : VBUS falling detected | ||
46 | : VBUS_DET_R : : VBUS rising detected | ||
47 | : USB_LINK_STATUS : : USB link status has changed | ||
48 | : USB_CH_TH_PROT_R : : Die temp is above usb charger | ||
49 | : USB_CH_TH_PROT_F : : Die temp is below usb charger | ||
50 | : USB_CHARGER_NOT_OKR : : allowed USB charger not ok detection | ||
51 | : VBUS_OVV : : Overvoltage on Vbus ball detected (USB charge is stopped) | ||
52 | : CH_WD_EXP : : Charger watchdog detected | ||
28 | ab8500-gpadc : HW_CONV_END : vddadc : Analogue to Digital Converter | 53 | ab8500-gpadc : HW_CONV_END : vddadc : Analogue to Digital Converter |
29 | SW_CONV_END : : | 54 | SW_CONV_END : : |
30 | ab8500-gpio : : : GPIO Controller | 55 | ab8500-gpio : : : GPIO Controller |
diff --git a/Documentation/devicetree/bindings/mfd/stmpe.txt b/Documentation/devicetree/bindings/mfd/stmpe.txt new file mode 100644 index 000000000000..56edb5520685 --- /dev/null +++ b/Documentation/devicetree/bindings/mfd/stmpe.txt | |||
@@ -0,0 +1,28 @@ | |||
1 | * ST Microelectronics STMPE Multi-Functional Device | ||
2 | |||
3 | STMPE is an MFD device which may expose the following inbuilt devices: gpio, | ||
4 | keypad, touchscreen, adc, pwm, rotator. | ||
5 | |||
6 | Required properties: | ||
7 | - compatible : "st,stmpe[610|801|811|1601|2401|2403]" | ||
8 | - reg : I2C/SPI address of the device | ||
9 | |||
10 | Optional properties: | ||
11 | - interrupts : The interrupt outputs from the controller | ||
12 | - interrupt-controller : Marks the device node as an interrupt controller | ||
13 | - interrupt-parent : Specifies which IRQ controller we're connected to | ||
14 | - wakeup-source : Marks the input device as wakable | ||
15 | - st,autosleep-timeout : Valid entries (ms); 4, 16, 32, 64, 128, 256, 512 and 1024 | ||
16 | |||
17 | Example: | ||
18 | |||
19 | stmpe1601: stmpe1601@40 { | ||
20 | compatible = "st,stmpe1601"; | ||
21 | reg = <0x40>; | ||
22 | interrupts = <26 0x4>; | ||
23 | interrupt-parent = <&gpio6>; | ||
24 | interrupt-controller; | ||
25 | |||
26 | wakeup-source; | ||
27 | st,autosleep-timeout = <1024>; | ||
28 | }; | ||
diff --git a/Documentation/devicetree/bindings/misc/atmel-ssc.txt b/Documentation/devicetree/bindings/misc/atmel-ssc.txt new file mode 100644 index 000000000000..38e51ad2e07e --- /dev/null +++ b/Documentation/devicetree/bindings/misc/atmel-ssc.txt | |||
@@ -0,0 +1,15 @@ | |||
1 | * Atmel SSC driver. | ||
2 | |||
3 | Required properties: | ||
4 | - compatible: "atmel,at91rm9200-ssc" or "atmel,at91sam9g45-ssc" | ||
5 | - atmel,at91rm9200-ssc: support pdc transfer | ||
6 | - atmel,at91sam9g45-ssc: support dma transfer | ||
7 | - reg: Should contain SSC registers location and length | ||
8 | - interrupts: Should contain SSC interrupt | ||
9 | |||
10 | Example: | ||
11 | ssc0: ssc@fffbc000 { | ||
12 | compatible = "atmel,at91rm9200-ssc"; | ||
13 | reg = <0xfffbc000 0x4000>; | ||
14 | interrupts = <14 4 5>; | ||
15 | }; | ||
diff --git a/Documentation/devicetree/bindings/mmc/mmc.txt b/Documentation/devicetree/bindings/mmc/mmc.txt index 8e2e0ba2f486..a591c6741d75 100644 --- a/Documentation/devicetree/bindings/mmc/mmc.txt +++ b/Documentation/devicetree/bindings/mmc/mmc.txt | |||
@@ -21,6 +21,12 @@ Optional properties: | |||
21 | - cd-inverted: when present, polarity on the cd gpio line is inverted | 21 | - cd-inverted: when present, polarity on the cd gpio line is inverted |
22 | - wp-inverted: when present, polarity on the wp gpio line is inverted | 22 | - wp-inverted: when present, polarity on the wp gpio line is inverted |
23 | - max-frequency: maximum operating clock frequency | 23 | - max-frequency: maximum operating clock frequency |
24 | - no-1-8-v: when present, denotes that 1.8v card voltage is not supported on | ||
25 | this system, even if the controller claims it is. | ||
26 | |||
27 | Optional SDIO properties: | ||
28 | - keep-power-in-suspend: Preserves card power during a suspend/resume cycle | ||
29 | - enable-sdio-wakeup: Enables wake up of host system on SDIO IRQ assertion | ||
24 | 30 | ||
25 | Example: | 31 | Example: |
26 | 32 | ||
@@ -33,4 +39,6 @@ sdhci@ab000000 { | |||
33 | cd-inverted; | 39 | cd-inverted; |
34 | wp-gpios = <&gpio 70 0>; | 40 | wp-gpios = <&gpio 70 0>; |
35 | max-frequency = <50000000>; | 41 | max-frequency = <50000000>; |
42 | keep-power-in-suspend; | ||
43 | enable-sdio-wakeup; | ||
36 | } | 44 | } |
diff --git a/Documentation/devicetree/bindings/mmc/samsung-sdhci.txt b/Documentation/devicetree/bindings/mmc/samsung-sdhci.txt index 630a7d7f4718..97e9e315400d 100644 --- a/Documentation/devicetree/bindings/mmc/samsung-sdhci.txt +++ b/Documentation/devicetree/bindings/mmc/samsung-sdhci.txt | |||
@@ -12,10 +12,6 @@ is used. The Samsung's SDHCI controller bindings extends this as listed below. | |||
12 | [A] The property "samsung,cd-pinmux-gpio" can be used as stated in the | 12 | [A] The property "samsung,cd-pinmux-gpio" can be used as stated in the |
13 | "Optional Board Specific Properties" section below. | 13 | "Optional Board Specific Properties" section below. |
14 | 14 | ||
15 | [B] If core card-detect bindings and "samsung,cd-pinmux-gpio" property | ||
16 | is not specified, it is assumed that there is no card detection | ||
17 | mechanism used. | ||
18 | |||
19 | Required SoC Specific Properties: | 15 | Required SoC Specific Properties: |
20 | - compatible: should be one of the following | 16 | - compatible: should be one of the following |
21 | - "samsung,s3c6410-sdhci": For controllers compatible with s3c6410 sdhci | 17 | - "samsung,s3c6410-sdhci": For controllers compatible with s3c6410 sdhci |
@@ -24,14 +20,18 @@ Required SoC Specific Properties: | |||
24 | controller. | 20 | controller. |
25 | 21 | ||
26 | Required Board Specific Properties: | 22 | Required Board Specific Properties: |
27 | - gpios: Should specify the gpios used for clock, command and data lines. The | 23 | - Samsung GPIO variant (will be completely replaced by pinctrl): |
28 | gpio specifier format depends on the gpio controller. | 24 | - gpios: Should specify the gpios used for clock, command and data lines. The |
25 | gpio specifier format depends on the gpio controller. | ||
26 | - Pinctrl variant (preferred if available): | ||
27 | - pinctrl-0: Should specify pin control groups used for this controller. | ||
28 | - pinctrl-names: Should contain only one value - "default". | ||
29 | 29 | ||
30 | Optional Board Specific Properties: | 30 | Optional Board Specific Properties: |
31 | - samsung,cd-pinmux-gpio: Specifies the card detect line that is routed | 31 | - samsung,cd-pinmux-gpio: Specifies the card detect line that is routed |
32 | through a pinmux to the card-detect pin of the card slot. This property | 32 | through a pinmux to the card-detect pin of the card slot. This property |
33 | should be used only if none of the mmc core card-detect properties are | 33 | should be used only if none of the mmc core card-detect properties are |
34 | used. | 34 | used. Only for Samsung GPIO variant. |
35 | 35 | ||
36 | Example: | 36 | Example: |
37 | sdhci@12530000 { | 37 | sdhci@12530000 { |
@@ -40,12 +40,18 @@ Example: | |||
40 | interrupts = <0 75 0>; | 40 | interrupts = <0 75 0>; |
41 | bus-width = <4>; | 41 | bus-width = <4>; |
42 | cd-gpios = <&gpk2 2 2 3 3>; | 42 | cd-gpios = <&gpk2 2 2 3 3>; |
43 | |||
44 | /* Samsung GPIO variant */ | ||
43 | gpios = <&gpk2 0 2 0 3>, /* clock line */ | 45 | gpios = <&gpk2 0 2 0 3>, /* clock line */ |
44 | <&gpk2 1 2 0 3>, /* command line */ | 46 | <&gpk2 1 2 0 3>, /* command line */ |
45 | <&gpk2 3 2 3 3>, /* data line 0 */ | 47 | <&gpk2 3 2 3 3>, /* data line 0 */ |
46 | <&gpk2 4 2 3 3>, /* data line 1 */ | 48 | <&gpk2 4 2 3 3>, /* data line 1 */ |
47 | <&gpk2 5 2 3 3>, /* data line 2 */ | 49 | <&gpk2 5 2 3 3>, /* data line 2 */ |
48 | <&gpk2 6 2 3 3>; /* data line 3 */ | 50 | <&gpk2 6 2 3 3>; /* data line 3 */ |
51 | |||
52 | /* Pinctrl variant */ | ||
53 | pinctrl-0 = <&sd0_clk &sd0_cmd &sd0_bus4>; | ||
54 | pinctrl-names = "default"; | ||
49 | }; | 55 | }; |
50 | 56 | ||
51 | Note: This example shows both SoC specific and board specific properties | 57 | Note: This example shows both SoC specific and board specific properties |
diff --git a/Documentation/devicetree/bindings/mmc/synposis-dw-mshc.txt b/Documentation/devicetree/bindings/mmc/synopsis-dw-mshc.txt index 06cd32d08052..06cd32d08052 100644 --- a/Documentation/devicetree/bindings/mmc/synposis-dw-mshc.txt +++ b/Documentation/devicetree/bindings/mmc/synopsis-dw-mshc.txt | |||
diff --git a/Documentation/devicetree/bindings/mmc/ti-omap-hsmmc.txt b/Documentation/devicetree/bindings/mmc/ti-omap-hsmmc.txt index be76a23b34c4..ed271fc255b2 100644 --- a/Documentation/devicetree/bindings/mmc/ti-omap-hsmmc.txt +++ b/Documentation/devicetree/bindings/mmc/ti-omap-hsmmc.txt | |||
@@ -19,6 +19,7 @@ ti,dual-volt: boolean, supports dual voltage cards | |||
19 | "supply-name" examples are "vmmc", "vmmc_aux" etc | 19 | "supply-name" examples are "vmmc", "vmmc_aux" etc |
20 | ti,non-removable: non-removable slot (like eMMC) | 20 | ti,non-removable: non-removable slot (like eMMC) |
21 | ti,needs-special-reset: Requires a special softreset sequence | 21 | ti,needs-special-reset: Requires a special softreset sequence |
22 | ti,needs-special-hs-handling: HSMMC IP needs special setting for handling High Speed | ||
22 | 23 | ||
23 | Example: | 24 | Example: |
24 | mmc1: mmc@0x4809c000 { | 25 | mmc1: mmc@0x4809c000 { |
diff --git a/Documentation/devicetree/bindings/mmc/vt8500-sdmmc.txt b/Documentation/devicetree/bindings/mmc/vt8500-sdmmc.txt new file mode 100644 index 000000000000..d7fb6abb3eb8 --- /dev/null +++ b/Documentation/devicetree/bindings/mmc/vt8500-sdmmc.txt | |||
@@ -0,0 +1,23 @@ | |||
1 | * Wondermedia WM8505/WM8650 SD/MMC Host Controller | ||
2 | |||
3 | This file documents differences between the core properties described | ||
4 | by mmc.txt and the properties used by the wmt-sdmmc driver. | ||
5 | |||
6 | Required properties: | ||
7 | - compatible: Should be "wm,wm8505-sdhc". | ||
8 | - interrupts: Two interrupts are required - regular irq and dma irq. | ||
9 | |||
10 | Optional properties: | ||
11 | - sdon-inverted: SD_ON bit is inverted on the controller | ||
12 | |||
13 | Examples: | ||
14 | |||
15 | sdhc@d800a000 { | ||
16 | compatible = "wm,wm8505-sdhc"; | ||
17 | reg = <0xd800a000 0x1000>; | ||
18 | interrupts = <20 21>; | ||
19 | clocks = <&sdhc>; | ||
20 | bus-width = <4>; | ||
21 | sdon-inverted; | ||
22 | }; | ||
23 | |||
diff --git a/Documentation/devicetree/bindings/mtd/denali-nand.txt b/Documentation/devicetree/bindings/mtd/denali-nand.txt new file mode 100644 index 000000000000..b04d03a1d499 --- /dev/null +++ b/Documentation/devicetree/bindings/mtd/denali-nand.txt | |||
@@ -0,0 +1,23 @@ | |||
1 | * Denali NAND controller | ||
2 | |||
3 | Required properties: | ||
4 | - compatible : should be "denali,denali-nand-dt" | ||
5 | - reg : should contain registers location and length for data and reg. | ||
6 | - reg-names: Should contain the reg names "nand_data" and "denali_reg" | ||
7 | - interrupts : The interrupt number. | ||
8 | - dm-mask : DMA bit mask | ||
9 | |||
10 | The device tree may optionally contain sub-nodes describing partitions of the | ||
11 | address space. See partition.txt for more detail. | ||
12 | |||
13 | Examples: | ||
14 | |||
15 | nand: nand@ff900000 { | ||
16 | #address-cells = <1>; | ||
17 | #size-cells = <1>; | ||
18 | compatible = "denali,denali-nand-dt"; | ||
19 | reg = <0xff900000 0x100000>, <0xffb80000 0x10000>; | ||
20 | reg-names = "nand_data", "denali_reg"; | ||
21 | interrupts = <0 144 4>; | ||
22 | dma-mask = <0xffffffff>; | ||
23 | }; | ||
diff --git a/Documentation/devicetree/bindings/mtd/flctl-nand.txt b/Documentation/devicetree/bindings/mtd/flctl-nand.txt new file mode 100644 index 000000000000..427f46dc60ad --- /dev/null +++ b/Documentation/devicetree/bindings/mtd/flctl-nand.txt | |||
@@ -0,0 +1,49 @@ | |||
1 | FLCTL NAND controller | ||
2 | |||
3 | Required properties: | ||
4 | - compatible : "renesas,shmobile-flctl-sh7372" | ||
5 | - reg : Address range of the FLCTL | ||
6 | - interrupts : flste IRQ number | ||
7 | - nand-bus-width : bus width to NAND chip | ||
8 | |||
9 | Optional properties: | ||
10 | - dmas: DMA specifier(s) | ||
11 | - dma-names: name for each DMA specifier. Valid names are | ||
12 | "data_tx", "data_rx", "ecc_tx", "ecc_rx" | ||
13 | |||
14 | The DMA fields are not used yet in the driver but are listed here for | ||
15 | completing the bindings. | ||
16 | |||
17 | The device tree may optionally contain sub-nodes describing partitions of the | ||
18 | address space. See partition.txt for more detail. | ||
19 | |||
20 | Example: | ||
21 | |||
22 | flctl@e6a30000 { | ||
23 | #address-cells = <1>; | ||
24 | #size-cells = <1>; | ||
25 | compatible = "renesas,shmobile-flctl-sh7372"; | ||
26 | reg = <0xe6a30000 0x100>; | ||
27 | interrupts = <0x0d80>; | ||
28 | |||
29 | nand-bus-width = <16>; | ||
30 | |||
31 | dmas = <&dmac 1 /* data_tx */ | ||
32 | &dmac 2;> /* data_rx */ | ||
33 | dma-names = "data_tx", "data_rx"; | ||
34 | |||
35 | system@0 { | ||
36 | label = "system"; | ||
37 | reg = <0x0 0x8000000>; | ||
38 | }; | ||
39 | |||
40 | userdata@8000000 { | ||
41 | label = "userdata"; | ||
42 | reg = <0x8000000 0x10000000>; | ||
43 | }; | ||
44 | |||
45 | cache@18000000 { | ||
46 | label = "cache"; | ||
47 | reg = <0x18000000 0x8000000>; | ||
48 | }; | ||
49 | }; | ||
diff --git a/Documentation/devicetree/bindings/mtd/fsmc-nand.txt b/Documentation/devicetree/bindings/mtd/fsmc-nand.txt index e2c663b354d2..e3ea32e7de3e 100644 --- a/Documentation/devicetree/bindings/mtd/fsmc-nand.txt +++ b/Documentation/devicetree/bindings/mtd/fsmc-nand.txt | |||
@@ -3,9 +3,7 @@ | |||
3 | Required properties: | 3 | Required properties: |
4 | - compatible : "st,spear600-fsmc-nand" | 4 | - compatible : "st,spear600-fsmc-nand" |
5 | - reg : Address range of the mtd chip | 5 | - reg : Address range of the mtd chip |
6 | - reg-names: Should contain the reg names "fsmc_regs" and "nand_data" | 6 | - reg-names: Should contain the reg names "fsmc_regs", "nand_data", "nand_addr" and "nand_cmd" |
7 | - st,ale-off : Chip specific offset to ALE | ||
8 | - st,cle-off : Chip specific offset to CLE | ||
9 | 7 | ||
10 | Optional properties: | 8 | Optional properties: |
11 | - bank-width : Width (in bytes) of the device. If not present, the width | 9 | - bank-width : Width (in bytes) of the device. If not present, the width |
@@ -19,10 +17,10 @@ Example: | |||
19 | #address-cells = <1>; | 17 | #address-cells = <1>; |
20 | #size-cells = <1>; | 18 | #size-cells = <1>; |
21 | reg = <0xd1800000 0x1000 /* FSMC Register */ | 19 | reg = <0xd1800000 0x1000 /* FSMC Register */ |
22 | 0xd2000000 0x4000>; /* NAND Base */ | 20 | 0xd2000000 0x0010 /* NAND Base DATA */ |
23 | reg-names = "fsmc_regs", "nand_data"; | 21 | 0xd2020000 0x0010 /* NAND Base ADDR */ |
24 | st,ale-off = <0x20000>; | 22 | 0xd2010000 0x0010>; /* NAND Base CMD */ |
25 | st,cle-off = <0x10000>; | 23 | reg-names = "fsmc_regs", "nand_data", "nand_addr", "nand_cmd"; |
26 | 24 | ||
27 | bank-width = <1>; | 25 | bank-width = <1>; |
28 | nand-skip-bbtscan; | 26 | nand-skip-bbtscan; |
diff --git a/Documentation/devicetree/bindings/mtd/m25p80.txt b/Documentation/devicetree/bindings/mtd/m25p80.txt new file mode 100644 index 000000000000..6d3d57609470 --- /dev/null +++ b/Documentation/devicetree/bindings/mtd/m25p80.txt | |||
@@ -0,0 +1,29 @@ | |||
1 | * MTD SPI driver for ST M25Pxx (and similar) serial flash chips | ||
2 | |||
3 | Required properties: | ||
4 | - #address-cells, #size-cells : Must be present if the device has sub-nodes | ||
5 | representing partitions. | ||
6 | - compatible : Should be the manufacturer and the name of the chip. Bear in mind | ||
7 | the DT binding is not Linux-only, but in case of Linux, see the | ||
8 | "m25p_ids" table in drivers/mtd/devices/m25p80.c for the list of | ||
9 | supported chips. | ||
10 | - reg : Chip-Select number | ||
11 | - spi-max-frequency : Maximum frequency of the SPI bus the chip can operate at | ||
12 | |||
13 | Optional properties: | ||
14 | - m25p,fast-read : Use the "fast read" opcode to read data from the chip instead | ||
15 | of the usual "read" opcode. This opcode is not supported by | ||
16 | all chips and support for it can not be detected at runtime. | ||
17 | Refer to your chips' datasheet to check if this is supported | ||
18 | by your chip. | ||
19 | |||
20 | Example: | ||
21 | |||
22 | flash: m25p80@0 { | ||
23 | #address-cells = <1>; | ||
24 | #size-cells = <1>; | ||
25 | compatible = "spansion,m25p80"; | ||
26 | reg = <0>; | ||
27 | spi-max-frequency = <40000000>; | ||
28 | m25p,fast-read; | ||
29 | }; | ||
diff --git a/Documentation/devicetree/bindings/mtd/mtd-physmap.txt b/Documentation/devicetree/bindings/mtd/mtd-physmap.txt index 94de19b8f16b..dab7847fc800 100644 --- a/Documentation/devicetree/bindings/mtd/mtd-physmap.txt +++ b/Documentation/devicetree/bindings/mtd/mtd-physmap.txt | |||
@@ -23,6 +23,9 @@ file systems on embedded devices. | |||
23 | unaligned accesses as implemented in the JFFS2 code via memcpy(). | 23 | unaligned accesses as implemented in the JFFS2 code via memcpy(). |
24 | By defining "no-unaligned-direct-access", the flash will not be | 24 | By defining "no-unaligned-direct-access", the flash will not be |
25 | exposed directly to the MTD users (e.g. JFFS2) any more. | 25 | exposed directly to the MTD users (e.g. JFFS2) any more. |
26 | - linux,mtd-name: allow to specify the mtd name for retro capability with | ||
27 | physmap-flash drivers as boot loader pass the mtd partition via the old | ||
28 | device name physmap-flash. | ||
26 | 29 | ||
27 | For JEDEC compatible devices, the following additional properties | 30 | For JEDEC compatible devices, the following additional properties |
28 | are defined: | 31 | are defined: |
diff --git a/Documentation/devicetree/bindings/net/can/grcan.txt b/Documentation/devicetree/bindings/net/can/grcan.txt new file mode 100644 index 000000000000..34ef3498f887 --- /dev/null +++ b/Documentation/devicetree/bindings/net/can/grcan.txt | |||
@@ -0,0 +1,28 @@ | |||
1 | Aeroflex Gaisler GRCAN and GRHCAN CAN controllers. | ||
2 | |||
3 | The GRCAN and CRHCAN CAN controllers are available in the GRLIB VHDL IP core | ||
4 | library. | ||
5 | |||
6 | Note: These properties are built from the AMBA plug&play in a Leon SPARC system | ||
7 | (the ordinary environment for GRCAN and GRHCAN). There are no dts files for | ||
8 | sparc. | ||
9 | |||
10 | Required properties: | ||
11 | |||
12 | - name : Should be "GAISLER_GRCAN", "01_03d", "GAISLER_GRHCAN" or "01_034" | ||
13 | |||
14 | - reg : Address and length of the register set for the device | ||
15 | |||
16 | - freq : Frequency of the external oscillator clock in Hz (the frequency of | ||
17 | the amba bus in the ordinary case) | ||
18 | |||
19 | - interrupts : Interrupt number for this device | ||
20 | |||
21 | Optional properties: | ||
22 | |||
23 | - systemid : If not present or if the value of the least significant 16 bits | ||
24 | of this 32-bit property is smaller than GRCAN_TXBUG_SAFE_GRLIB_VERSION | ||
25 | a bug workaround is activated. | ||
26 | |||
27 | For further information look in the documentation for the GLIB IP core library: | ||
28 | http://www.gaisler.com/products/grlib/grip.pdf | ||
diff --git a/Documentation/devicetree/bindings/net/cdns-emac.txt b/Documentation/devicetree/bindings/net/cdns-emac.txt new file mode 100644 index 000000000000..09055c2495f0 --- /dev/null +++ b/Documentation/devicetree/bindings/net/cdns-emac.txt | |||
@@ -0,0 +1,23 @@ | |||
1 | * Cadence EMAC Ethernet controller | ||
2 | |||
3 | Required properties: | ||
4 | - compatible: Should be "cdns,[<chip>-]{emac}" | ||
5 | Use "cdns,at91rm9200-emac" Atmel at91rm9200 SoC. | ||
6 | or the generic form: "cdns,emac". | ||
7 | - reg: Address and length of the register set for the device | ||
8 | - interrupts: Should contain macb interrupt | ||
9 | - phy-mode: String, operation mode of the PHY interface. | ||
10 | Supported values are: "mii", "rmii". | ||
11 | |||
12 | Optional properties: | ||
13 | - local-mac-address: 6 bytes, mac address | ||
14 | |||
15 | Examples: | ||
16 | |||
17 | macb0: ethernet@fffc4000 { | ||
18 | compatible = "cdns,at91rm9200-emac"; | ||
19 | reg = <0xfffc4000 0x4000>; | ||
20 | interrupts = <21>; | ||
21 | phy-mode = "rmii"; | ||
22 | local-mac-address = [3a 0e 03 04 05 06]; | ||
23 | }; | ||
diff --git a/Documentation/devicetree/bindings/net/cpsw.txt b/Documentation/devicetree/bindings/net/cpsw.txt index dcaabe9fe869..6ddd0286a9b7 100644 --- a/Documentation/devicetree/bindings/net/cpsw.txt +++ b/Documentation/devicetree/bindings/net/cpsw.txt | |||
@@ -9,21 +9,15 @@ Required properties: | |||
9 | number | 9 | number |
10 | - interrupt-parent : The parent interrupt controller | 10 | - interrupt-parent : The parent interrupt controller |
11 | - cpdma_channels : Specifies number of channels in CPDMA | 11 | - cpdma_channels : Specifies number of channels in CPDMA |
12 | - host_port_no : Specifies host port shift | ||
13 | - cpdma_reg_ofs : Specifies CPDMA submodule register offset | ||
14 | - cpdma_sram_ofs : Specifies CPDMA SRAM offset | ||
15 | - ale_reg_ofs : Specifies ALE submodule register offset | ||
16 | - ale_entries : Specifies No of entries ALE can hold | 12 | - ale_entries : Specifies No of entries ALE can hold |
17 | - host_port_reg_ofs : Specifies host port register offset | ||
18 | - hw_stats_reg_ofs : Specifies hardware statistics register offset | ||
19 | - bd_ram_ofs : Specifies internal desciptor RAM offset | ||
20 | - bd_ram_size : Specifies internal descriptor RAM size | 13 | - bd_ram_size : Specifies internal descriptor RAM size |
21 | - rx_descs : Specifies number of Rx descriptors | 14 | - rx_descs : Specifies number of Rx descriptors |
22 | - mac_control : Specifies Default MAC control register content | 15 | - mac_control : Specifies Default MAC control register content |
23 | for the specific platform | 16 | for the specific platform |
24 | - slaves : Specifies number for slaves | 17 | - slaves : Specifies number for slaves |
25 | - slave_reg_ofs : Specifies slave register offset | 18 | - cpts_active_slave : Specifies the slave to use for time stamping |
26 | - sliver_reg_ofs : Specifies slave sliver register offset | 19 | - cpts_clock_mult : Numerator to convert input clock ticks into nanoseconds |
20 | - cpts_clock_shift : Denominator to convert input clock ticks into nanoseconds | ||
27 | - phy_id : Specifies slave phy id | 21 | - phy_id : Specifies slave phy id |
28 | - mac-address : Specifies slave MAC address | 22 | - mac-address : Specifies slave MAC address |
29 | 23 | ||
@@ -45,30 +39,22 @@ Examples: | |||
45 | interrupts = <55 0x4>; | 39 | interrupts = <55 0x4>; |
46 | interrupt-parent = <&intc>; | 40 | interrupt-parent = <&intc>; |
47 | cpdma_channels = <8>; | 41 | cpdma_channels = <8>; |
48 | host_port_no = <0>; | ||
49 | cpdma_reg_ofs = <0x800>; | ||
50 | cpdma_sram_ofs = <0xa00>; | ||
51 | ale_reg_ofs = <0xd00>; | ||
52 | ale_entries = <1024>; | 42 | ale_entries = <1024>; |
53 | host_port_reg_ofs = <0x108>; | ||
54 | hw_stats_reg_ofs = <0x900>; | ||
55 | bd_ram_ofs = <0x2000>; | ||
56 | bd_ram_size = <0x2000>; | 43 | bd_ram_size = <0x2000>; |
57 | no_bd_ram = <0>; | 44 | no_bd_ram = <0>; |
58 | rx_descs = <64>; | 45 | rx_descs = <64>; |
59 | mac_control = <0x20>; | 46 | mac_control = <0x20>; |
60 | slaves = <2>; | 47 | slaves = <2>; |
48 | cpts_active_slave = <0>; | ||
49 | cpts_clock_mult = <0x80000000>; | ||
50 | cpts_clock_shift = <29>; | ||
61 | cpsw_emac0: slave@0 { | 51 | cpsw_emac0: slave@0 { |
62 | slave_reg_ofs = <0x208>; | 52 | phy_id = <&davinci_mdio>, <0>; |
63 | sliver_reg_ofs = <0xd80>; | ||
64 | phy_id = "davinci_mdio.16:00"; | ||
65 | /* Filled in by U-Boot */ | 53 | /* Filled in by U-Boot */ |
66 | mac-address = [ 00 00 00 00 00 00 ]; | 54 | mac-address = [ 00 00 00 00 00 00 ]; |
67 | }; | 55 | }; |
68 | cpsw_emac1: slave@1 { | 56 | cpsw_emac1: slave@1 { |
69 | slave_reg_ofs = <0x308>; | 57 | phy_id = <&davinci_mdio>, <1>; |
70 | sliver_reg_ofs = <0xdc0>; | ||
71 | phy_id = "davinci_mdio.16:01"; | ||
72 | /* Filled in by U-Boot */ | 58 | /* Filled in by U-Boot */ |
73 | mac-address = [ 00 00 00 00 00 00 ]; | 59 | mac-address = [ 00 00 00 00 00 00 ]; |
74 | }; | 60 | }; |
@@ -79,30 +65,22 @@ Examples: | |||
79 | compatible = "ti,cpsw"; | 65 | compatible = "ti,cpsw"; |
80 | ti,hwmods = "cpgmac0"; | 66 | ti,hwmods = "cpgmac0"; |
81 | cpdma_channels = <8>; | 67 | cpdma_channels = <8>; |
82 | host_port_no = <0>; | ||
83 | cpdma_reg_ofs = <0x800>; | ||
84 | cpdma_sram_ofs = <0xa00>; | ||
85 | ale_reg_ofs = <0xd00>; | ||
86 | ale_entries = <1024>; | 68 | ale_entries = <1024>; |
87 | host_port_reg_ofs = <0x108>; | ||
88 | hw_stats_reg_ofs = <0x900>; | ||
89 | bd_ram_ofs = <0x2000>; | ||
90 | bd_ram_size = <0x2000>; | 69 | bd_ram_size = <0x2000>; |
91 | no_bd_ram = <0>; | 70 | no_bd_ram = <0>; |
92 | rx_descs = <64>; | 71 | rx_descs = <64>; |
93 | mac_control = <0x20>; | 72 | mac_control = <0x20>; |
94 | slaves = <2>; | 73 | slaves = <2>; |
74 | cpts_active_slave = <0>; | ||
75 | cpts_clock_mult = <0x80000000>; | ||
76 | cpts_clock_shift = <29>; | ||
95 | cpsw_emac0: slave@0 { | 77 | cpsw_emac0: slave@0 { |
96 | slave_reg_ofs = <0x208>; | 78 | phy_id = <&davinci_mdio>, <0>; |
97 | sliver_reg_ofs = <0xd80>; | ||
98 | phy_id = "davinci_mdio.16:00"; | ||
99 | /* Filled in by U-Boot */ | 79 | /* Filled in by U-Boot */ |
100 | mac-address = [ 00 00 00 00 00 00 ]; | 80 | mac-address = [ 00 00 00 00 00 00 ]; |
101 | }; | 81 | }; |
102 | cpsw_emac1: slave@1 { | 82 | cpsw_emac1: slave@1 { |
103 | slave_reg_ofs = <0x308>; | 83 | phy_id = <&davinci_mdio>, <1>; |
104 | sliver_reg_ofs = <0xdc0>; | ||
105 | phy_id = "davinci_mdio.16:01"; | ||
106 | /* Filled in by U-Boot */ | 84 | /* Filled in by U-Boot */ |
107 | mac-address = [ 00 00 00 00 00 00 ]; | 85 | mac-address = [ 00 00 00 00 00 00 ]; |
108 | }; | 86 | }; |
diff --git a/Documentation/devicetree/bindings/net/marvell-armada-370-neta.txt b/Documentation/devicetree/bindings/net/marvell-armada-370-neta.txt new file mode 100644 index 000000000000..859a6fa7569c --- /dev/null +++ b/Documentation/devicetree/bindings/net/marvell-armada-370-neta.txt | |||
@@ -0,0 +1,23 @@ | |||
1 | * Marvell Armada 370 / Armada XP Ethernet Controller (NETA) | ||
2 | |||
3 | Required properties: | ||
4 | - compatible: should be "marvell,armada-370-neta". | ||
5 | - reg: address and length of the register set for the device. | ||
6 | - interrupts: interrupt for the device | ||
7 | - phy: A phandle to a phy node defining the PHY address (as the reg | ||
8 | property, a single integer). | ||
9 | - phy-mode: The interface between the SoC and the PHY (a string that | ||
10 | of_get_phy_mode() can understand) | ||
11 | - clocks: a pointer to the reference clock for this device. | ||
12 | |||
13 | Example: | ||
14 | |||
15 | ethernet@d0070000 { | ||
16 | compatible = "marvell,armada-370-neta"; | ||
17 | reg = <0xd0070000 0x2500>; | ||
18 | interrupts = <8>; | ||
19 | clocks = <&gate_clk 4>; | ||
20 | status = "okay"; | ||
21 | phy = <&phy0>; | ||
22 | phy-mode = "rgmii-id"; | ||
23 | }; | ||
diff --git a/Documentation/devicetree/bindings/net/marvell-orion-mdio.txt b/Documentation/devicetree/bindings/net/marvell-orion-mdio.txt new file mode 100644 index 000000000000..34e7aafa321c --- /dev/null +++ b/Documentation/devicetree/bindings/net/marvell-orion-mdio.txt | |||
@@ -0,0 +1,35 @@ | |||
1 | * Marvell MDIO Ethernet Controller interface | ||
2 | |||
3 | The Ethernet controllers of the Marvel Kirkwood, Dove, Orion5x, | ||
4 | MV78xx0, Armada 370 and Armada XP have an identical unit that provides | ||
5 | an interface with the MDIO bus. This driver handles this MDIO | ||
6 | interface. | ||
7 | |||
8 | Required properties: | ||
9 | - compatible: "marvell,orion-mdio" | ||
10 | - reg: address and length of the SMI register | ||
11 | |||
12 | The child nodes of the MDIO driver are the individual PHY devices | ||
13 | connected to this MDIO bus. They must have a "reg" property given the | ||
14 | PHY address on the MDIO bus. | ||
15 | |||
16 | Example at the SoC level: | ||
17 | |||
18 | mdio { | ||
19 | #address-cells = <1>; | ||
20 | #size-cells = <0>; | ||
21 | compatible = "marvell,orion-mdio"; | ||
22 | reg = <0xd0072004 0x4>; | ||
23 | }; | ||
24 | |||
25 | And at the board level: | ||
26 | |||
27 | mdio { | ||
28 | phy0: ethernet-phy@0 { | ||
29 | reg = <0>; | ||
30 | }; | ||
31 | |||
32 | phy1: ethernet-phy@1 { | ||
33 | reg = <1>; | ||
34 | }; | ||
35 | } | ||
diff --git a/Documentation/devicetree/bindings/net/mdio-gpio.txt b/Documentation/devicetree/bindings/net/mdio-gpio.txt index bc9549529014..c79bab025369 100644 --- a/Documentation/devicetree/bindings/net/mdio-gpio.txt +++ b/Documentation/devicetree/bindings/net/mdio-gpio.txt | |||
@@ -8,9 +8,16 @@ gpios property as described in section VIII.1 in the following order: | |||
8 | 8 | ||
9 | MDC, MDIO. | 9 | MDC, MDIO. |
10 | 10 | ||
11 | Note: Each gpio-mdio bus should have an alias correctly numbered in "aliases" | ||
12 | node. | ||
13 | |||
11 | Example: | 14 | Example: |
12 | 15 | ||
13 | mdio { | 16 | aliases { |
17 | mdio-gpio0 = <&mdio0>; | ||
18 | }; | ||
19 | |||
20 | mdio0: mdio { | ||
14 | compatible = "virtual,mdio-gpio"; | 21 | compatible = "virtual,mdio-gpio"; |
15 | #address-cells = <1>; | 22 | #address-cells = <1>; |
16 | #size-cells = <0>; | 23 | #size-cells = <0>; |
diff --git a/Documentation/devicetree/bindings/pinctrl/atmel,at91-pinctrl.txt b/Documentation/devicetree/bindings/pinctrl/atmel,at91-pinctrl.txt new file mode 100644 index 000000000000..3a268127b054 --- /dev/null +++ b/Documentation/devicetree/bindings/pinctrl/atmel,at91-pinctrl.txt | |||
@@ -0,0 +1,141 @@ | |||
1 | * Atmel AT91 Pinmux Controller | ||
2 | |||
3 | The AT91 Pinmux Controler, enables the IC | ||
4 | to share one PAD to several functional blocks. The sharing is done by | ||
5 | multiplexing the PAD input/output signals. For each PAD there are up to | ||
6 | 8 muxing options (called periph modes). Since different modules require | ||
7 | different PAD settings (like pull up, keeper, etc) the contoller controls | ||
8 | also the PAD settings parameters. | ||
9 | |||
10 | Please refer to pinctrl-bindings.txt in this directory for details of the | ||
11 | common pinctrl bindings used by client devices, including the meaning of the | ||
12 | phrase "pin configuration node". | ||
13 | |||
14 | Atmel AT91 pin configuration node is a node of a group of pins which can be | ||
15 | used for a specific device or function. This node represents both mux and config | ||
16 | of the pins in that group. The 'pins' selects the function mode(also named pin | ||
17 | mode) this pin can work on and the 'config' configures various pad settings | ||
18 | such as pull-up, multi drive, etc. | ||
19 | |||
20 | Required properties for iomux controller: | ||
21 | - compatible: "atmel,at91rm9200-pinctrl" | ||
22 | - atmel,mux-mask: array of mask (periph per bank) to describe if a pin can be | ||
23 | configured in this periph mode. All the periph and bank need to be describe. | ||
24 | |||
25 | How to create such array: | ||
26 | |||
27 | Each column will represent the possible peripheral of the pinctrl | ||
28 | Each line will represent a pio bank | ||
29 | |||
30 | Take an example on the 9260 | ||
31 | Peripheral: 2 ( A and B) | ||
32 | Bank: 3 (A, B and C) | ||
33 | => | ||
34 | |||
35 | /* A B */ | ||
36 | 0xffffffff 0xffc00c3b /* pioA */ | ||
37 | 0xffffffff 0x7fff3ccf /* pioB */ | ||
38 | 0xffffffff 0x007fffff /* pioC */ | ||
39 | |||
40 | For each peripheral/bank we will descibe in a u32 if a pin can can be | ||
41 | configured in it by putting 1 to the pin bit (1 << pin) | ||
42 | |||
43 | Let's take the pioA on peripheral B | ||
44 | From the datasheet Table 10-2. | ||
45 | Peripheral B | ||
46 | PA0 MCDB0 | ||
47 | PA1 MCCDB | ||
48 | PA2 | ||
49 | PA3 MCDB3 | ||
50 | PA4 MCDB2 | ||
51 | PA5 MCDB1 | ||
52 | PA6 | ||
53 | PA7 | ||
54 | PA8 | ||
55 | PA9 | ||
56 | PA10 ETX2 | ||
57 | PA11 ETX3 | ||
58 | PA12 | ||
59 | PA13 | ||
60 | PA14 | ||
61 | PA15 | ||
62 | PA16 | ||
63 | PA17 | ||
64 | PA18 | ||
65 | PA19 | ||
66 | PA20 | ||
67 | PA21 | ||
68 | PA22 ETXER | ||
69 | PA23 ETX2 | ||
70 | PA24 ETX3 | ||
71 | PA25 ERX2 | ||
72 | PA26 ERX3 | ||
73 | PA27 ERXCK | ||
74 | PA28 ECRS | ||
75 | PA29 ECOL | ||
76 | PA30 RXD4 | ||
77 | PA31 TXD4 | ||
78 | |||
79 | => 0xffc00c3b | ||
80 | |||
81 | Required properties for pin configuration node: | ||
82 | - atmel,pins: 4 integers array, represents a group of pins mux and config | ||
83 | setting. The format is atmel,pins = <PIN_BANK PIN_BANK_NUM PERIPH CONFIG>. | ||
84 | The PERIPH 0 means gpio. | ||
85 | |||
86 | Bits used for CONFIG: | ||
87 | PULL_UP (1 << 0): indicate this pin need a pull up. | ||
88 | MULTIDRIVE (1 << 1): indicate this pin need to be configured as multidrive. | ||
89 | DEGLITCH (1 << 2): indicate this pin need deglitch. | ||
90 | PULL_DOWN (1 << 3): indicate this pin need a pull down. | ||
91 | DIS_SCHMIT (1 << 4): indicate this pin need to disable schmit trigger. | ||
92 | DEBOUNCE (1 << 16): indicate this pin need debounce. | ||
93 | DEBOUNCE_VAL (0x3fff << 17): debounce val. | ||
94 | |||
95 | NOTE: | ||
96 | Some requirements for using atmel,at91rm9200-pinctrl binding: | ||
97 | 1. We have pin function node defined under at91 controller node to represent | ||
98 | what pinmux functions this SoC supports. | ||
99 | 2. The driver can use the function node's name and pin configuration node's | ||
100 | name describe the pin function and group hierarchy. | ||
101 | For example, Linux at91 pinctrl driver takes the function node's name | ||
102 | as the function name and pin configuration node's name as group name to | ||
103 | create the map table. | ||
104 | 3. Each pin configuration node should have a phandle, devices can set pins | ||
105 | configurations by referring to the phandle of that pin configuration node. | ||
106 | 4. The gpio controller must be describe in the pinctrl simple-bus. | ||
107 | |||
108 | Examples: | ||
109 | |||
110 | pinctrl@fffff400 { | ||
111 | #address-cells = <1>; | ||
112 | #size-cells = <1>; | ||
113 | ranges; | ||
114 | compatible = "atmel,at91rm9200-pinctrl", "simple-bus"; | ||
115 | reg = <0xfffff400 0x600>; | ||
116 | |||
117 | atmel,mux-mask = < | ||
118 | /* A B */ | ||
119 | 0xffffffff 0xffc00c3b /* pioA */ | ||
120 | 0xffffffff 0x7fff3ccf /* pioB */ | ||
121 | 0xffffffff 0x007fffff /* pioC */ | ||
122 | >; | ||
123 | |||
124 | /* shared pinctrl settings */ | ||
125 | dbgu { | ||
126 | pinctrl_dbgu: dbgu-0 { | ||
127 | atmel,pins = | ||
128 | <1 14 0x1 0x0 /* PB14 periph A */ | ||
129 | 1 15 0x1 0x1>; /* PB15 periph with pullup */ | ||
130 | }; | ||
131 | }; | ||
132 | }; | ||
133 | |||
134 | dbgu: serial@fffff200 { | ||
135 | compatible = "atmel,at91sam9260-usart"; | ||
136 | reg = <0xfffff200 0x200>; | ||
137 | interrupts = <1 4 7>; | ||
138 | pinctrl-names = "default"; | ||
139 | pinctrl-0 = <&pinctrl_dbgu>; | ||
140 | status = "disabled"; | ||
141 | }; | ||
diff --git a/Documentation/devicetree/bindings/pinctrl/marvell,kirkwood-pinctrl.txt b/Documentation/devicetree/bindings/pinctrl/marvell,kirkwood-pinctrl.txt index 361bccb7ec89..95daf6335c37 100644 --- a/Documentation/devicetree/bindings/pinctrl/marvell,kirkwood-pinctrl.txt +++ b/Documentation/devicetree/bindings/pinctrl/marvell,kirkwood-pinctrl.txt | |||
@@ -7,8 +7,10 @@ Required properties: | |||
7 | - compatible: "marvell,88f6180-pinctrl", | 7 | - compatible: "marvell,88f6180-pinctrl", |
8 | "marvell,88f6190-pinctrl", "marvell,88f6192-pinctrl", | 8 | "marvell,88f6190-pinctrl", "marvell,88f6192-pinctrl", |
9 | "marvell,88f6281-pinctrl", "marvell,88f6282-pinctrl" | 9 | "marvell,88f6281-pinctrl", "marvell,88f6282-pinctrl" |
10 | "marvell,98dx4122-pinctrl" | ||
10 | 11 | ||
11 | This driver supports all kirkwood variants, i.e. 88f6180, 88f619x, and 88f628x. | 12 | This driver supports all kirkwood variants, i.e. 88f6180, 88f619x, and 88f628x. |
13 | It also support the 88f6281-based variant in the 98dx412x Bobcat SoCs. | ||
12 | 14 | ||
13 | Available mpp pins/groups and functions: | 15 | Available mpp pins/groups and functions: |
14 | Note: brackets (x) are not part of the mpp name for marvell,function and given | 16 | Note: brackets (x) are not part of the mpp name for marvell,function and given |
@@ -277,3 +279,40 @@ mpp46 46 gpio, ts(mp10), tdm(fs), lcd(hsync) | |||
277 | mpp47 47 gpio, ts(mp11), tdm(drx), lcd(vsync) | 279 | mpp47 47 gpio, ts(mp11), tdm(drx), lcd(vsync) |
278 | mpp48 48 gpio, ts(mp12), tdm(dtx), lcd(d16) | 280 | mpp48 48 gpio, ts(mp12), tdm(dtx), lcd(d16) |
279 | mpp49 49 gpo, tdm(rx0ql), pex(clkreq), lcd(d17) | 281 | mpp49 49 gpo, tdm(rx0ql), pex(clkreq), lcd(d17) |
282 | |||
283 | * Marvell Bobcat 98dx4122 | ||
284 | |||
285 | name pins functions | ||
286 | ================================================================================ | ||
287 | mpp0 0 gpio, nand(io2), spi(cs) | ||
288 | mpp1 1 gpo, nand(io3), spi(mosi) | ||
289 | mpp2 2 gpo, nand(io4), spi(sck) | ||
290 | mpp3 3 gpo, nand(io5), spi(miso) | ||
291 | mpp4 4 gpio, nand(io6), uart0(rxd) | ||
292 | mpp5 5 gpo, nand(io7), uart0(txd) | ||
293 | mpp6 6 sysrst(out), spi(mosi) | ||
294 | mpp7 7 gpo, pex(rsto), spi(cs) | ||
295 | mpp8 8 gpio, twsi0(sda), uart0(rts), uart1(rts) | ||
296 | mpp9 9 gpio, twsi(sck), uart0(cts), uart1(cts) | ||
297 | mpp10 10 gpo, spi(sck), uart0(txd) | ||
298 | mpp11 11 gpio, spi(miso), uart0(rxd) | ||
299 | mpp13 13 gpio, uart1(txd) | ||
300 | mpp14 14 gpio, uart1(rxd) | ||
301 | mpp15 15 gpio, uart0(rts) | ||
302 | mpp16 16 gpio, uart0(cts) | ||
303 | mpp18 18 gpo, nand(io0) | ||
304 | mpp19 19 gpo, nand(io1) | ||
305 | mpp34 34 gpio | ||
306 | mpp35 35 gpio | ||
307 | mpp36 36 gpio | ||
308 | mpp37 37 gpio | ||
309 | mpp38 38 gpio | ||
310 | mpp39 39 gpio | ||
311 | mpp40 40 gpio | ||
312 | mpp41 41 gpio | ||
313 | mpp42 42 gpio | ||
314 | mpp43 43 gpio | ||
315 | mpp44 44 gpio | ||
316 | mpp45 45 gpio | ||
317 | mpp49 49 gpio | ||
318 | |||
diff --git a/Documentation/devicetree/bindings/pinctrl/nvidia,tegra20-pinmux.txt b/Documentation/devicetree/bindings/pinctrl/nvidia,tegra20-pinmux.txt index c8e578263ce2..683fde93c4fb 100644 --- a/Documentation/devicetree/bindings/pinctrl/nvidia,tegra20-pinmux.txt +++ b/Documentation/devicetree/bindings/pinctrl/nvidia,tegra20-pinmux.txt | |||
@@ -93,7 +93,7 @@ Valid values for pin and group names are: | |||
93 | 93 | ||
94 | With some exceptions, these support nvidia,high-speed-mode, | 94 | With some exceptions, these support nvidia,high-speed-mode, |
95 | nvidia,schmitt, nvidia,low-power-mode, nvidia,pull-down-strength, | 95 | nvidia,schmitt, nvidia,low-power-mode, nvidia,pull-down-strength, |
96 | nvidia,pull-up-strength, nvidia,slew_rate-rising, nvidia,slew_rate-falling. | 96 | nvidia,pull-up-strength, nvidia,slew-rate-rising, nvidia,slew-rate-falling. |
97 | 97 | ||
98 | drive_ao1, drive_ao2, drive_at1, drive_at2, drive_cdev1, drive_cdev2, | 98 | drive_ao1, drive_ao2, drive_at1, drive_at2, drive_cdev1, drive_cdev2, |
99 | drive_csus, drive_dap1, drive_dap2, drive_dap3, drive_dap4, drive_dbg, | 99 | drive_csus, drive_dap1, drive_dap2, drive_dap3, drive_dap4, drive_dbg, |
diff --git a/Documentation/devicetree/bindings/pinctrl/nvidia,tegra30-pinmux.txt b/Documentation/devicetree/bindings/pinctrl/nvidia,tegra30-pinmux.txt index c275b70349c1..6f426ed7009e 100644 --- a/Documentation/devicetree/bindings/pinctrl/nvidia,tegra30-pinmux.txt +++ b/Documentation/devicetree/bindings/pinctrl/nvidia,tegra30-pinmux.txt | |||
@@ -83,7 +83,7 @@ Valid values for pin and group names are: | |||
83 | drive groups: | 83 | drive groups: |
84 | 84 | ||
85 | These all support nvidia,pull-down-strength, nvidia,pull-up-strength, | 85 | These all support nvidia,pull-down-strength, nvidia,pull-up-strength, |
86 | nvidia,slew_rate-rising, nvidia,slew_rate-falling. Most but not all | 86 | nvidia,slew-rate-rising, nvidia,slew-rate-falling. Most but not all |
87 | support nvidia,high-speed-mode, nvidia,schmitt, nvidia,low-power-mode. | 87 | support nvidia,high-speed-mode, nvidia,schmitt, nvidia,low-power-mode. |
88 | 88 | ||
89 | ao1, ao2, at1, at2, at3, at4, at5, cdev1, cdev2, cec, crt, csus, dap1, | 89 | ao1, ao2, at1, at2, at3, at4, at5, cdev1, cdev2, cec, crt, csus, dap1, |
diff --git a/Documentation/devicetree/bindings/pinctrl/samsung-pinctrl.txt b/Documentation/devicetree/bindings/pinctrl/samsung-pinctrl.txt index 03dee50532f5..e97a27856b21 100644 --- a/Documentation/devicetree/bindings/pinctrl/samsung-pinctrl.txt +++ b/Documentation/devicetree/bindings/pinctrl/samsung-pinctrl.txt | |||
@@ -8,13 +8,20 @@ on-chip controllers onto these pads. | |||
8 | Required Properties: | 8 | Required Properties: |
9 | - compatible: should be one of the following. | 9 | - compatible: should be one of the following. |
10 | - "samsung,pinctrl-exynos4210": for Exynos4210 compatible pin-controller. | 10 | - "samsung,pinctrl-exynos4210": for Exynos4210 compatible pin-controller. |
11 | - "samsung,pinctrl-exynos4x12": for Exynos4x12 compatible pin-controller. | ||
11 | - "samsung,pinctrl-exynos5250": for Exynos5250 compatible pin-controller. | 12 | - "samsung,pinctrl-exynos5250": for Exynos5250 compatible pin-controller. |
12 | 13 | ||
13 | - reg: Base address of the pin controller hardware module and length of | 14 | - reg: Base address of the pin controller hardware module and length of |
14 | the address space it occupies. | 15 | the address space it occupies. |
15 | 16 | ||
16 | - interrupts: interrupt specifier for the controller. The format and value of | 17 | - Pin banks as child nodes: Pin banks of the controller are represented by child |
17 | the interrupt specifier depends on the interrupt parent for the controller. | 18 | nodes of the controller node. Bank name is taken from name of the node. Each |
19 | bank node must contain following properties: | ||
20 | |||
21 | - gpio-controller: identifies the node as a gpio controller and pin bank. | ||
22 | - #gpio-cells: number of cells in GPIO specifier. Since the generic GPIO | ||
23 | binding is used, the amount of cells must be specified as 2. See generic | ||
24 | GPIO binding documentation for description of particular cells. | ||
18 | 25 | ||
19 | - Pin mux/config groups as child nodes: The pin mux (selecting pin function | 26 | - Pin mux/config groups as child nodes: The pin mux (selecting pin function |
20 | mode) and pin config (pull up/down, driver strength) settings are represented | 27 | mode) and pin config (pull up/down, driver strength) settings are represented |
@@ -72,16 +79,24 @@ used as system wakeup events. | |||
72 | A. External GPIO Interrupts: For supporting external gpio interrupts, the | 79 | A. External GPIO Interrupts: For supporting external gpio interrupts, the |
73 | following properties should be specified in the pin-controller device node. | 80 | following properties should be specified in the pin-controller device node. |
74 | 81 | ||
75 | - interrupt-controller: identifies the controller node as interrupt-parent. | 82 | - interrupt-parent: phandle of the interrupt parent to which the external |
76 | - #interrupt-cells: the value of this property should be 2. | 83 | GPIO interrupts are forwarded to. |
77 | - First Cell: represents the external gpio interrupt number local to the | 84 | - interrupts: interrupt specifier for the controller. The format and value of |
78 | external gpio interrupt space of the controller. | 85 | the interrupt specifier depends on the interrupt parent for the controller. |
79 | - Second Cell: flags to identify the type of the interrupt | 86 | |
80 | - 1 = rising edge triggered | 87 | In addition, following properties must be present in node of every bank |
81 | - 2 = falling edge triggered | 88 | of pins supporting GPIO interrupts: |
82 | - 3 = rising and falling edge triggered | 89 | |
83 | - 4 = high level triggered | 90 | - interrupt-controller: identifies the controller node as interrupt-parent. |
84 | - 8 = low level triggered | 91 | - #interrupt-cells: the value of this property should be 2. |
92 | - First Cell: represents the external gpio interrupt number local to the | ||
93 | external gpio interrupt space of the controller. | ||
94 | - Second Cell: flags to identify the type of the interrupt | ||
95 | - 1 = rising edge triggered | ||
96 | - 2 = falling edge triggered | ||
97 | - 3 = rising and falling edge triggered | ||
98 | - 4 = high level triggered | ||
99 | - 8 = low level triggered | ||
85 | 100 | ||
86 | B. External Wakeup Interrupts: For supporting external wakeup interrupts, a | 101 | B. External Wakeup Interrupts: For supporting external wakeup interrupts, a |
87 | child node representing the external wakeup interrupt controller should be | 102 | child node representing the external wakeup interrupt controller should be |
@@ -94,6 +109,11 @@ B. External Wakeup Interrupts: For supporting external wakeup interrupts, a | |||
94 | found on Samsung Exynos4210 SoC. | 109 | found on Samsung Exynos4210 SoC. |
95 | - interrupt-parent: phandle of the interrupt parent to which the external | 110 | - interrupt-parent: phandle of the interrupt parent to which the external |
96 | wakeup interrupts are forwarded to. | 111 | wakeup interrupts are forwarded to. |
112 | - interrupts: interrupt used by multiplexed wakeup interrupts. | ||
113 | |||
114 | In addition, following properties must be present in node of every bank | ||
115 | of pins supporting wake-up interrupts: | ||
116 | |||
97 | - interrupt-controller: identifies the node as interrupt-parent. | 117 | - interrupt-controller: identifies the node as interrupt-parent. |
98 | - #interrupt-cells: the value of this property should be 2 | 118 | - #interrupt-cells: the value of this property should be 2 |
99 | - First Cell: represents the external wakeup interrupt number local to | 119 | - First Cell: represents the external wakeup interrupt number local to |
@@ -105,11 +125,63 @@ B. External Wakeup Interrupts: For supporting external wakeup interrupts, a | |||
105 | - 4 = high level triggered | 125 | - 4 = high level triggered |
106 | - 8 = low level triggered | 126 | - 8 = low level triggered |
107 | 127 | ||
128 | Node of every bank of pins supporting direct wake-up interrupts (without | ||
129 | multiplexing) must contain following properties: | ||
130 | |||
131 | - interrupt-parent: phandle of the interrupt parent to which the external | ||
132 | wakeup interrupts are forwarded to. | ||
133 | - interrupts: interrupts of the interrupt parent which are used for external | ||
134 | wakeup interrupts from pins of the bank, must contain interrupts for all | ||
135 | pins of the bank. | ||
136 | |||
108 | Aliases: | 137 | Aliases: |
109 | 138 | ||
110 | All the pin controller nodes should be represented in the aliases node using | 139 | All the pin controller nodes should be represented in the aliases node using |
111 | the following format 'pinctrl{n}' where n is a unique number for the alias. | 140 | the following format 'pinctrl{n}' where n is a unique number for the alias. |
112 | 141 | ||
142 | Example: A pin-controller node with pin banks: | ||
143 | |||
144 | pinctrl_0: pinctrl@11400000 { | ||
145 | compatible = "samsung,pinctrl-exynos4210"; | ||
146 | reg = <0x11400000 0x1000>; | ||
147 | interrupts = <0 47 0>; | ||
148 | |||
149 | /* ... */ | ||
150 | |||
151 | /* Pin bank without external interrupts */ | ||
152 | gpy0: gpy0 { | ||
153 | gpio-controller; | ||
154 | #gpio-cells = <2>; | ||
155 | }; | ||
156 | |||
157 | /* ... */ | ||
158 | |||
159 | /* Pin bank with external GPIO or muxed wake-up interrupts */ | ||
160 | gpj0: gpj0 { | ||
161 | gpio-controller; | ||
162 | #gpio-cells = <2>; | ||
163 | |||
164 | interrupt-controller; | ||
165 | #interrupt-cells = <2>; | ||
166 | }; | ||
167 | |||
168 | /* ... */ | ||
169 | |||
170 | /* Pin bank with external direct wake-up interrupts */ | ||
171 | gpx0: gpx0 { | ||
172 | gpio-controller; | ||
173 | #gpio-cells = <2>; | ||
174 | |||
175 | interrupt-controller; | ||
176 | interrupt-parent = <&gic>; | ||
177 | interrupts = <0 16 0>, <0 17 0>, <0 18 0>, <0 19 0>, | ||
178 | <0 20 0>, <0 21 0>, <0 22 0>, <0 23 0>; | ||
179 | #interrupt-cells = <2>; | ||
180 | }; | ||
181 | |||
182 | /* ... */ | ||
183 | }; | ||
184 | |||
113 | Example 1: A pin-controller node with pin groups. | 185 | Example 1: A pin-controller node with pin groups. |
114 | 186 | ||
115 | pinctrl_0: pinctrl@11400000 { | 187 | pinctrl_0: pinctrl@11400000 { |
@@ -117,6 +189,8 @@ Example 1: A pin-controller node with pin groups. | |||
117 | reg = <0x11400000 0x1000>; | 189 | reg = <0x11400000 0x1000>; |
118 | interrupts = <0 47 0>; | 190 | interrupts = <0 47 0>; |
119 | 191 | ||
192 | /* ... */ | ||
193 | |||
120 | uart0_data: uart0-data { | 194 | uart0_data: uart0-data { |
121 | samsung,pins = "gpa0-0", "gpa0-1"; | 195 | samsung,pins = "gpa0-0", "gpa0-1"; |
122 | samsung,pin-function = <2>; | 196 | samsung,pin-function = <2>; |
@@ -158,20 +232,14 @@ Example 2: A pin-controller node with external wakeup interrupt controller node. | |||
158 | pinctrl_1: pinctrl@11000000 { | 232 | pinctrl_1: pinctrl@11000000 { |
159 | compatible = "samsung,pinctrl-exynos4210"; | 233 | compatible = "samsung,pinctrl-exynos4210"; |
160 | reg = <0x11000000 0x1000>; | 234 | reg = <0x11000000 0x1000>; |
161 | interrupts = <0 46 0>; | 235 | interrupts = <0 46 0> |
162 | interrupt-controller; | ||
163 | #interrupt-cells = <2>; | ||
164 | 236 | ||
165 | wakup_eint: wakeup-interrupt-controller { | 237 | /* ... */ |
238 | |||
239 | wakeup-interrupt-controller { | ||
166 | compatible = "samsung,exynos4210-wakeup-eint"; | 240 | compatible = "samsung,exynos4210-wakeup-eint"; |
167 | interrupt-parent = <&gic>; | 241 | interrupt-parent = <&gic>; |
168 | interrupt-controller; | 242 | interrupts = <0 32 0>; |
169 | #interrupt-cells = <2>; | ||
170 | interrupts = <0 16 0>, <0 17 0>, <0 18 0>, <0 19 0>, | ||
171 | <0 20 0>, <0 21 0>, <0 22 0>, <0 23 0>, | ||
172 | <0 24 0>, <0 25 0>, <0 26 0>, <0 27 0>, | ||
173 | <0 28 0>, <0 29 0>, <0 30 0>, <0 31 0>, | ||
174 | <0 32 0>; | ||
175 | }; | 243 | }; |
176 | }; | 244 | }; |
177 | 245 | ||
@@ -190,7 +258,8 @@ Example 4: Set up the default pin state for uart controller. | |||
190 | 258 | ||
191 | static int s3c24xx_serial_probe(struct platform_device *pdev) { | 259 | static int s3c24xx_serial_probe(struct platform_device *pdev) { |
192 | struct pinctrl *pinctrl; | 260 | struct pinctrl *pinctrl; |
193 | ... | 261 | |
194 | ... | 262 | /* ... */ |
263 | |||
195 | pinctrl = devm_pinctrl_get_select_default(&pdev->dev); | 264 | pinctrl = devm_pinctrl_get_select_default(&pdev->dev); |
196 | } | 265 | } |
diff --git a/Documentation/devicetree/bindings/power_supply/ab8500/btemp.txt b/Documentation/devicetree/bindings/power_supply/ab8500/btemp.txt new file mode 100644 index 000000000000..0ba1bcc7f33a --- /dev/null +++ b/Documentation/devicetree/bindings/power_supply/ab8500/btemp.txt | |||
@@ -0,0 +1,16 @@ | |||
1 | === AB8500 Battery Temperature Monitor Driver === | ||
2 | |||
3 | The properties below describes the node for btemp driver. | ||
4 | |||
5 | Required Properties: | ||
6 | - compatible = Shall be: "stericsson,ab8500-btemp" | ||
7 | - battery = Shall be battery specific information | ||
8 | |||
9 | Example: | ||
10 | ab8500_btemp { | ||
11 | compatible = "stericsson,ab8500-btemp"; | ||
12 | battery = <&ab8500_battery>; | ||
13 | }; | ||
14 | |||
15 | For information on battery specific node, Ref: | ||
16 | Documentation/devicetree/bindings/power_supply/ab8500/fg.txt | ||
diff --git a/Documentation/devicetree/bindings/power_supply/ab8500/chargalg.txt b/Documentation/devicetree/bindings/power_supply/ab8500/chargalg.txt new file mode 100644 index 000000000000..ef5328371122 --- /dev/null +++ b/Documentation/devicetree/bindings/power_supply/ab8500/chargalg.txt | |||
@@ -0,0 +1,16 @@ | |||
1 | === AB8500 Charging Algorithm Driver === | ||
2 | |||
3 | The properties below describes the node for chargalg driver. | ||
4 | |||
5 | Required Properties: | ||
6 | - compatible = Shall be: "stericsson,ab8500-chargalg" | ||
7 | - battery = Shall be battery specific information | ||
8 | |||
9 | Example: | ||
10 | ab8500_chargalg { | ||
11 | compatible = "stericsson,ab8500-chargalg"; | ||
12 | battery = <&ab8500_battery>; | ||
13 | }; | ||
14 | |||
15 | For information on battery specific node, Ref: | ||
16 | Documentation/devicetree/bindings/power_supply/ab8500/fg.txt | ||
diff --git a/Documentation/devicetree/bindings/power_supply/ab8500/charger.txt b/Documentation/devicetree/bindings/power_supply/ab8500/charger.txt new file mode 100644 index 000000000000..6bdbb08ea9e0 --- /dev/null +++ b/Documentation/devicetree/bindings/power_supply/ab8500/charger.txt | |||
@@ -0,0 +1,25 @@ | |||
1 | === AB8500 Charger Driver === | ||
2 | |||
3 | Required Properties: | ||
4 | - compatible = Shall be "stericsson,ab8500-charger" | ||
5 | - battery = Shall be battery specific information | ||
6 | Example: | ||
7 | ab8500_charger { | ||
8 | compatible = "stericsson,ab8500-charger"; | ||
9 | battery = <&ab8500_battery>; | ||
10 | }; | ||
11 | |||
12 | - vddadc-supply: Supply for USB and Main charger | ||
13 | Example: | ||
14 | ab8500-charger { | ||
15 | vddadc-supply = <&ab8500_ldo_tvout_reg>; | ||
16 | } | ||
17 | - autopower_cfg: | ||
18 | Boolean value depicting the presence of 'automatic poweron after powerloss' | ||
19 | Example: | ||
20 | ab8500-charger { | ||
21 | autopower_cfg; | ||
22 | }; | ||
23 | |||
24 | For information on battery specific node, Ref: | ||
25 | Documentation/devicetree/bindings/power_supply/ab8500/fg.txt | ||
diff --git a/Documentation/devicetree/bindings/power_supply/ab8500/fg.txt b/Documentation/devicetree/bindings/power_supply/ab8500/fg.txt new file mode 100644 index 000000000000..ccafcb9112fb --- /dev/null +++ b/Documentation/devicetree/bindings/power_supply/ab8500/fg.txt | |||
@@ -0,0 +1,58 @@ | |||
1 | === AB8500 Fuel Gauge Driver === | ||
2 | |||
3 | AB8500 is a mixed signal multimedia and power management | ||
4 | device comprising: power and energy-management-module, | ||
5 | wall-charger, usb-charger, audio codec, general purpose adc, | ||
6 | tvout, clock management and sim card interface. | ||
7 | |||
8 | Fuelgauge support is part of energy-management-modules, other | ||
9 | components of this module are: | ||
10 | main-charger, usb-combo-charger and battery-temperature-monitoring. | ||
11 | |||
12 | The properties below describes the node for fuelgauge driver. | ||
13 | |||
14 | Required Properties: | ||
15 | - compatible = This shall be: "stericsson,ab8500-fg" | ||
16 | - battery = Shall be battery specific information | ||
17 | Example: | ||
18 | ab8500_fg { | ||
19 | compatible = "stericsson,ab8500-fg"; | ||
20 | battery = <&ab8500_battery>; | ||
21 | }; | ||
22 | |||
23 | dependent node: | ||
24 | ab8500_battery: ab8500_battery { | ||
25 | }; | ||
26 | This node will provide information on 'thermistor interface' and | ||
27 | 'battery technology type' used. | ||
28 | |||
29 | Properties of this node are: | ||
30 | thermistor-on-batctrl: | ||
31 | A boolean value indicating thermistor interface to battery | ||
32 | |||
33 | Note: | ||
34 | 'btemp' and 'batctrl' are the pins interfaced for battery temperature | ||
35 | measurement, 'btemp' signal is used when NTC(negative temperature | ||
36 | coefficient) resister is interfaced external to battery whereas | ||
37 | 'batctrl' pin is used when NTC resister is internal to battery. | ||
38 | |||
39 | Example: | ||
40 | ab8500_battery: ab8500_battery { | ||
41 | thermistor-on-batctrl; | ||
42 | }; | ||
43 | indicates: NTC resister is internal to battery, 'batctrl' is used | ||
44 | for thermal measurement. | ||
45 | |||
46 | The absence of property 'thermal-on-batctrl' indicates | ||
47 | NTC resister is external to battery and 'btemp' signal is used | ||
48 | for thermal measurement. | ||
49 | |||
50 | battery-type: | ||
51 | This shall be the battery manufacturing technology type, | ||
52 | allowed types are: | ||
53 | "UNKNOWN" "NiMH" "LION" "LIPO" "LiFe" "NiCd" "LiMn" | ||
54 | Example: | ||
55 | ab8500_battery: ab8500_battery { | ||
56 | stericsson,battery-type = "LIPO"; | ||
57 | } | ||
58 | |||
diff --git a/Documentation/devicetree/bindings/powerpc/fsl/raideng.txt b/Documentation/devicetree/bindings/powerpc/fsl/raideng.txt new file mode 100644 index 000000000000..4ad29b9ac2ac --- /dev/null +++ b/Documentation/devicetree/bindings/powerpc/fsl/raideng.txt | |||
@@ -0,0 +1,81 @@ | |||
1 | * Freescale 85xx RAID Engine nodes | ||
2 | |||
3 | RAID Engine nodes are defined to describe on-chip RAID accelerators. Each RAID | ||
4 | Engine should have a separate node. | ||
5 | |||
6 | Supported chips: | ||
7 | P5020, P5040 | ||
8 | |||
9 | Required properties: | ||
10 | |||
11 | - compatible: Should contain "fsl,raideng-v1.0" as the value | ||
12 | This identifies RAID Engine block. 1 in 1.0 represents | ||
13 | major number whereas 0 represents minor number. The | ||
14 | version matches the hardware IP version. | ||
15 | - reg: offset and length of the register set for the device | ||
16 | - ranges: standard ranges property specifying the translation | ||
17 | between child address space and parent address space | ||
18 | |||
19 | Example: | ||
20 | /* P5020 */ | ||
21 | raideng: raideng@320000 { | ||
22 | compatible = "fsl,raideng-v1.0"; | ||
23 | #address-cells = <1>; | ||
24 | #size-cells = <1>; | ||
25 | reg = <0x320000 0x10000>; | ||
26 | ranges = <0 0x320000 0x10000>; | ||
27 | }; | ||
28 | |||
29 | |||
30 | There must be a sub-node for each job queue present in RAID Engine | ||
31 | This node must be a sub-node of the main RAID Engine node | ||
32 | |||
33 | - compatible: Should contain "fsl,raideng-v1.0-job-queue" as the value | ||
34 | This identifies the job queue interface | ||
35 | - reg: offset and length of the register set for job queue | ||
36 | - ranges: standard ranges property specifying the translation | ||
37 | between child address space and parent address space | ||
38 | |||
39 | Example: | ||
40 | /* P5020 */ | ||
41 | raideng_jq0@1000 { | ||
42 | compatible = "fsl,raideng-v1.0-job-queue"; | ||
43 | reg = <0x1000 0x1000>; | ||
44 | ranges = <0x0 0x1000 0x1000>; | ||
45 | }; | ||
46 | |||
47 | |||
48 | There must be a sub-node for each job ring present in RAID Engine | ||
49 | This node must be a sub-node of job queue node | ||
50 | |||
51 | - compatible: Must contain "fsl,raideng-v1.0-job-ring" as the value | ||
52 | This identifies job ring. Should contain either | ||
53 | "fsl,raideng-v1.0-hp-ring" or "fsl,raideng-v1.0-lp-ring" | ||
54 | depending upon whether ring has high or low priority | ||
55 | - reg: offset and length of the register set for job ring | ||
56 | - interrupts: interrupt mapping for job ring IRQ | ||
57 | |||
58 | Optional property: | ||
59 | |||
60 | - fsl,liodn: Specifies the LIODN to be used for Job Ring. This | ||
61 | property is normally set by firmware. Value | ||
62 | is of 12-bits which is the LIODN number for this JR. | ||
63 | This property is used by the IOMMU (PAMU) to distinquish | ||
64 | transactions from this JR and than be able to do address | ||
65 | translation & protection accordingly. | ||
66 | |||
67 | Example: | ||
68 | /* P5020 */ | ||
69 | raideng_jq0@1000 { | ||
70 | compatible = "fsl,raideng-v1.0-job-queue"; | ||
71 | reg = <0x1000 0x1000>; | ||
72 | ranges = <0x0 0x1000 0x1000>; | ||
73 | |||
74 | raideng_jr0: jr@0 { | ||
75 | compatible = "fsl,raideng-v1.0-job-ring", "fsl,raideng-v1.0-hp-ring"; | ||
76 | reg = <0x0 0x400>; | ||
77 | interrupts = <139 2 0 0>; | ||
78 | interrupt-parent = <&mpic>; | ||
79 | fsl,liodn = <0x41>; | ||
80 | }; | ||
81 | }; | ||
diff --git a/Documentation/devicetree/bindings/pwm/pwm-tiecap.txt b/Documentation/devicetree/bindings/pwm/pwm-tiecap.txt new file mode 100644 index 000000000000..131e8c11d26f --- /dev/null +++ b/Documentation/devicetree/bindings/pwm/pwm-tiecap.txt | |||
@@ -0,0 +1,23 @@ | |||
1 | TI SOC ECAP based APWM controller | ||
2 | |||
3 | Required properties: | ||
4 | - compatible: Must be "ti,am33xx-ecap" | ||
5 | - #pwm-cells: Should be 3. Number of cells being used to specify PWM property. | ||
6 | First cell specifies the per-chip index of the PWM to use, the second | ||
7 | cell is the period in nanoseconds and bit 0 in the third cell is used to | ||
8 | encode the polarity of PWM output. Set bit 0 of the third in PWM specifier | ||
9 | to 1 for inverse polarity & set to 0 for normal polarity. | ||
10 | - reg: physical base address and size of the registers map. | ||
11 | |||
12 | Optional properties: | ||
13 | - ti,hwmods: Name of the hwmod associated to the ECAP: | ||
14 | "ecap<x>", <x> being the 0-based instance number from the HW spec | ||
15 | |||
16 | Example: | ||
17 | |||
18 | ecap0: ecap@0 { | ||
19 | compatible = "ti,am33xx-ecap"; | ||
20 | #pwm-cells = <3>; | ||
21 | reg = <0x48300100 0x80>; | ||
22 | ti,hwmods = "ecap0"; | ||
23 | }; | ||
diff --git a/Documentation/devicetree/bindings/pwm/pwm-tiehrpwm.txt b/Documentation/devicetree/bindings/pwm/pwm-tiehrpwm.txt new file mode 100644 index 000000000000..4fc7079d822e --- /dev/null +++ b/Documentation/devicetree/bindings/pwm/pwm-tiehrpwm.txt | |||
@@ -0,0 +1,23 @@ | |||
1 | TI SOC EHRPWM based PWM controller | ||
2 | |||
3 | Required properties: | ||
4 | - compatible : Must be "ti,am33xx-ehrpwm" | ||
5 | - #pwm-cells: Should be 3. Number of cells being used to specify PWM property. | ||
6 | First cell specifies the per-chip index of the PWM to use, the second | ||
7 | cell is the period in nanoseconds and bit 0 in the third cell is used to | ||
8 | encode the polarity of PWM output. Set bit 0 of the third in PWM specifier | ||
9 | to 1 for inverse polarity & set to 0 for normal polarity. | ||
10 | - reg: physical base address and size of the registers map. | ||
11 | |||
12 | Optional properties: | ||
13 | - ti,hwmods: Name of the hwmod associated to the EHRPWM: | ||
14 | "ehrpwm<x>", <x> being the 0-based instance number from the HW spec | ||
15 | |||
16 | Example: | ||
17 | |||
18 | ehrpwm0: ehrpwm@0 { | ||
19 | compatible = "ti,am33xx-ehrpwm"; | ||
20 | #pwm-cells = <3>; | ||
21 | reg = <0x48300200 0x100>; | ||
22 | ti,hwmods = "ehrpwm0"; | ||
23 | }; | ||
diff --git a/Documentation/devicetree/bindings/pwm/pwm-tipwmss.txt b/Documentation/devicetree/bindings/pwm/pwm-tipwmss.txt new file mode 100644 index 000000000000..f7eae77f8354 --- /dev/null +++ b/Documentation/devicetree/bindings/pwm/pwm-tipwmss.txt | |||
@@ -0,0 +1,31 @@ | |||
1 | TI SOC based PWM Subsystem | ||
2 | |||
3 | Required properties: | ||
4 | - compatible: Must be "ti,am33xx-pwmss"; | ||
5 | - reg: physical base address and size of the registers map. | ||
6 | - address-cells: Specify the number of u32 entries needed in child nodes. | ||
7 | Should set to 1. | ||
8 | - size-cells: specify number of u32 entries needed to specify child nodes size | ||
9 | in reg property. Should set to 1. | ||
10 | - ranges: describes the address mapping of a memory-mapped bus. Should set to | ||
11 | physical address map of child's base address, physical address within | ||
12 | parent's address space and length of the address map. For am33xx, | ||
13 | 3 set of child register maps present, ECAP register space, EQEP | ||
14 | register space, EHRPWM register space. | ||
15 | |||
16 | Also child nodes should also populated under PWMSS DT node. | ||
17 | |||
18 | Example: | ||
19 | pwmss0: pwmss@48300000 { | ||
20 | compatible = "ti,am33xx-pwmss"; | ||
21 | reg = <0x48300000 0x10>; | ||
22 | ti,hwmods = "epwmss0"; | ||
23 | #address-cells = <1>; | ||
24 | #size-cells = <1>; | ||
25 | status = "disabled"; | ||
26 | ranges = <0x48300100 0x48300100 0x80 /* ECAP */ | ||
27 | 0x48300180 0x48300180 0x80 /* EQEP */ | ||
28 | 0x48300200 0x48300200 0x80>; /* EHRPWM */ | ||
29 | |||
30 | /* child nodes go here */ | ||
31 | }; | ||
diff --git a/Documentation/devicetree/bindings/pwm/pwm.txt b/Documentation/devicetree/bindings/pwm/pwm.txt index 73ec962bfe8c..06e67247859a 100644 --- a/Documentation/devicetree/bindings/pwm/pwm.txt +++ b/Documentation/devicetree/bindings/pwm/pwm.txt | |||
@@ -37,10 +37,21 @@ device: | |||
37 | pwm-names = "backlight"; | 37 | pwm-names = "backlight"; |
38 | }; | 38 | }; |
39 | 39 | ||
40 | Note that in the example above, specifying the "pwm-names" is redundant | ||
41 | because the name "backlight" would be used as fallback anyway. | ||
42 | |||
40 | pwm-specifier typically encodes the chip-relative PWM number and the PWM | 43 | pwm-specifier typically encodes the chip-relative PWM number and the PWM |
41 | period in nanoseconds. Note that in the example above, specifying the | 44 | period in nanoseconds. |
42 | "pwm-names" is redundant because the name "backlight" would be used as | 45 | |
43 | fallback anyway. | 46 | Optionally, the pwm-specifier can encode a number of flags in a third cell: |
47 | - bit 0: PWM signal polarity (0: normal polarity, 1: inverse polarity) | ||
48 | |||
49 | Example with optional PWM specifier for inverse polarity | ||
50 | |||
51 | bl: backlight { | ||
52 | pwms = <&pwm 0 5000000 1>; | ||
53 | pwm-names = "backlight"; | ||
54 | }; | ||
44 | 55 | ||
45 | 2) PWM controller nodes | 56 | 2) PWM controller nodes |
46 | ----------------------- | 57 | ----------------------- |
diff --git a/Documentation/devicetree/bindings/pwm/spear-pwm.txt b/Documentation/devicetree/bindings/pwm/spear-pwm.txt new file mode 100644 index 000000000000..3ac779d83386 --- /dev/null +++ b/Documentation/devicetree/bindings/pwm/spear-pwm.txt | |||
@@ -0,0 +1,18 @@ | |||
1 | == ST SPEAr SoC PWM controller == | ||
2 | |||
3 | Required properties: | ||
4 | - compatible: should be one of: | ||
5 | - "st,spear320-pwm" | ||
6 | - "st,spear1340-pwm" | ||
7 | - reg: physical base address and length of the controller's registers | ||
8 | - #pwm-cells: number of cells used to specify PWM which is fixed to 2 on | ||
9 | SPEAr. The first cell specifies the per-chip index of the PWM to use and | ||
10 | the second cell is the period in nanoseconds. | ||
11 | |||
12 | Example: | ||
13 | |||
14 | pwm: pwm@a8000000 { | ||
15 | compatible ="st,spear320-pwm"; | ||
16 | reg = <0xa8000000 0x1000>; | ||
17 | #pwm-cells = <2>; | ||
18 | }; | ||
diff --git a/Documentation/devicetree/bindings/pwm/ti,twl-pwm.txt b/Documentation/devicetree/bindings/pwm/ti,twl-pwm.txt new file mode 100644 index 000000000000..2943ee5fce00 --- /dev/null +++ b/Documentation/devicetree/bindings/pwm/ti,twl-pwm.txt | |||
@@ -0,0 +1,17 @@ | |||
1 | Texas Instruments TWL series PWM drivers | ||
2 | |||
3 | Supported PWMs: | ||
4 | On TWL4030 series: PWM1 and PWM2 | ||
5 | On TWL6030 series: PWM0 and PWM1 | ||
6 | |||
7 | Required properties: | ||
8 | - compatible: "ti,twl4030-pwm" or "ti,twl6030-pwm" | ||
9 | - #pwm-cells: should be 2. The first cell specifies the per-chip index | ||
10 | of the PWM to use and the second cell is the period in nanoseconds. | ||
11 | |||
12 | Example: | ||
13 | |||
14 | twl_pwm: pwm { | ||
15 | compatible = "ti,twl6030-pwm"; | ||
16 | #pwm-cells = <2>; | ||
17 | }; | ||
diff --git a/Documentation/devicetree/bindings/pwm/ti,twl-pwmled.txt b/Documentation/devicetree/bindings/pwm/ti,twl-pwmled.txt new file mode 100644 index 000000000000..cb64f3acc10f --- /dev/null +++ b/Documentation/devicetree/bindings/pwm/ti,twl-pwmled.txt | |||
@@ -0,0 +1,17 @@ | |||
1 | Texas Instruments TWL series PWM drivers connected to LED terminals | ||
2 | |||
3 | Supported PWMs: | ||
4 | On TWL4030 series: PWMA and PWMB (connected to LEDA and LEDB terminals) | ||
5 | On TWL6030 series: LED PWM (mainly used as charging indicator LED) | ||
6 | |||
7 | Required properties: | ||
8 | - compatible: "ti,twl4030-pwmled" or "ti,twl6030-pwmled" | ||
9 | - #pwm-cells: should be 2. The first cell specifies the per-chip index | ||
10 | of the PWM to use and the second cell is the period in nanoseconds. | ||
11 | |||
12 | Example: | ||
13 | |||
14 | twl_pwmled: pwmled { | ||
15 | compatible = "ti,twl6030-pwmled"; | ||
16 | #pwm-cells = <2>; | ||
17 | }; | ||
diff --git a/Documentation/devicetree/bindings/pwm/vt8500-pwm.txt b/Documentation/devicetree/bindings/pwm/vt8500-pwm.txt new file mode 100644 index 000000000000..bcc63678a9a5 --- /dev/null +++ b/Documentation/devicetree/bindings/pwm/vt8500-pwm.txt | |||
@@ -0,0 +1,17 @@ | |||
1 | VIA/Wondermedia VT8500/WM8xxx series SoC PWM controller | ||
2 | |||
3 | Required properties: | ||
4 | - compatible: should be "via,vt8500-pwm" | ||
5 | - reg: physical base address and length of the controller's registers | ||
6 | - #pwm-cells: should be 2. The first cell specifies the per-chip index | ||
7 | of the PWM to use and the second cell is the period in nanoseconds. | ||
8 | - clocks: phandle to the PWM source clock | ||
9 | |||
10 | Example: | ||
11 | |||
12 | pwm1: pwm@d8220000 { | ||
13 | #pwm-cells = <2>; | ||
14 | compatible = "via,vt8500-pwm"; | ||
15 | reg = <0xd8220000 0x1000>; | ||
16 | clocks = <&clkpwm>; | ||
17 | }; | ||
diff --git a/Documentation/devicetree/bindings/regulator/gpio-regulator.txt b/Documentation/devicetree/bindings/regulator/gpio-regulator.txt new file mode 100644 index 000000000000..63c659800c03 --- /dev/null +++ b/Documentation/devicetree/bindings/regulator/gpio-regulator.txt | |||
@@ -0,0 +1,37 @@ | |||
1 | GPIO controlled regulators | ||
2 | |||
3 | Required properties: | ||
4 | - compatible : Must be "regulator-gpio". | ||
5 | - states : Selection of available voltages and GPIO configs. | ||
6 | if there are no states, then use a fixed regulator | ||
7 | |||
8 | Optional properties: | ||
9 | - enable-gpio : GPIO to use to enable/disable the regulator. | ||
10 | - gpios : GPIO group used to control voltage. | ||
11 | - startup-delay-us : Startup time in microseconds. | ||
12 | - enable-active-high : Polarity of GPIO is active high (default is low). | ||
13 | |||
14 | Any property defined as part of the core regulator binding defined in | ||
15 | regulator.txt can also be used. | ||
16 | |||
17 | Example: | ||
18 | |||
19 | mmciv: gpio-regulator { | ||
20 | compatible = "regulator-gpio"; | ||
21 | |||
22 | regulator-name = "mmci-gpio-supply"; | ||
23 | regulator-min-microvolt = <1800000>; | ||
24 | regulator-max-microvolt = <2600000>; | ||
25 | regulator-boot-on; | ||
26 | |||
27 | enable-gpio = <&gpio0 23 0x4>; | ||
28 | gpios = <&gpio0 24 0x4 | ||
29 | &gpio0 25 0x4>; | ||
30 | states = <1800000 0x3 | ||
31 | 2200000 0x2 | ||
32 | 2600000 0x1 | ||
33 | 2900000 0x0>; | ||
34 | |||
35 | startup-delay-us = <100000>; | ||
36 | enable-active-high; | ||
37 | }; | ||
diff --git a/Documentation/devicetree/bindings/regulator/max8925-regulator.txt b/Documentation/devicetree/bindings/regulator/max8925-regulator.txt new file mode 100644 index 000000000000..0057695aae8f --- /dev/null +++ b/Documentation/devicetree/bindings/regulator/max8925-regulator.txt | |||
@@ -0,0 +1,40 @@ | |||
1 | Max8925 Voltage regulators | ||
2 | |||
3 | Required nodes: | ||
4 | -nodes: | ||
5 | - SDV1 for SDV SDV1 | ||
6 | - SDV2 for SDV SDV2 | ||
7 | - SDV3 for SDV SDV3 | ||
8 | - LDO1 for LDO LDO1 | ||
9 | - LDO2 for LDO LDO2 | ||
10 | - LDO3 for LDO LDO3 | ||
11 | - LDO4 for LDO LDO4 | ||
12 | - LDO5 for LDO LDO5 | ||
13 | - LDO6 for LDO LDO6 | ||
14 | - LDO7 for LDO LDO7 | ||
15 | - LDO8 for LDO LDO8 | ||
16 | - LDO9 for LDO LDO9 | ||
17 | - LDO10 for LDO LDO10 | ||
18 | - LDO11 for LDO LDO11 | ||
19 | - LDO12 for LDO LDO12 | ||
20 | - LDO13 for LDO LDO13 | ||
21 | - LDO14 for LDO LDO14 | ||
22 | - LDO15 for LDO LDO15 | ||
23 | - LDO16 for LDO LDO16 | ||
24 | - LDO17 for LDO LDO17 | ||
25 | - LDO18 for LDO LDO18 | ||
26 | - LDO19 for LDO LDO19 | ||
27 | - LDO20 for LDO LDO20 | ||
28 | |||
29 | Optional properties: | ||
30 | - Any optional property defined in bindings/regulator/regulator.txt | ||
31 | |||
32 | Example: | ||
33 | |||
34 | SDV1 { | ||
35 | regulator-min-microvolt = <637500>; | ||
36 | regulator-max-microvolt = <1425000>; | ||
37 | regulator-boot-on; | ||
38 | regulator-always-on; | ||
39 | }; | ||
40 | |||
diff --git a/Documentation/devicetree/bindings/regulator/max8997-regulator.txt b/Documentation/devicetree/bindings/regulator/max8997-regulator.txt new file mode 100644 index 000000000000..9fd69a18b0ba --- /dev/null +++ b/Documentation/devicetree/bindings/regulator/max8997-regulator.txt | |||
@@ -0,0 +1,146 @@ | |||
1 | * Maxim MAX8997 Voltage and Current Regulator | ||
2 | |||
3 | The Maxim MAX8997 is a multi-function device which includes volatage and | ||
4 | current regulators, rtc, charger controller and other sub-blocks. It is | ||
5 | interfaced to the host controller using a i2c interface. Each sub-block is | ||
6 | addressed by the host system using different i2c slave address. This document | ||
7 | describes the bindings for 'pmic' sub-block of max8997. | ||
8 | |||
9 | Required properties: | ||
10 | - compatible: Should be "maxim,max8997-pmic". | ||
11 | - reg: Specifies the i2c slave address of the pmic block. It should be 0x66. | ||
12 | |||
13 | - max8997,pmic-buck1-dvs-voltage: A set of 8 voltage values in micro-volt (uV) | ||
14 | units for buck1 when changing voltage using gpio dvs. Refer to [1] below | ||
15 | for additional information. | ||
16 | |||
17 | - max8997,pmic-buck2-dvs-voltage: A set of 8 voltage values in micro-volt (uV) | ||
18 | units for buck2 when changing voltage using gpio dvs. Refer to [1] below | ||
19 | for additional information. | ||
20 | |||
21 | - max8997,pmic-buck5-dvs-voltage: A set of 8 voltage values in micro-volt (uV) | ||
22 | units for buck5 when changing voltage using gpio dvs. Refer to [1] below | ||
23 | for additional information. | ||
24 | |||
25 | [1] If none of the 'max8997,pmic-buck[1/2/5]-uses-gpio-dvs' optional | ||
26 | property is specified, the 'max8997,pmic-buck[1/2/5]-dvs-voltage' | ||
27 | property should specify atleast one voltage level (which would be a | ||
28 | safe operating voltage). | ||
29 | |||
30 | If either of the 'max8997,pmic-buck[1/2/5]-uses-gpio-dvs' optional | ||
31 | property is specified, then all the eigth voltage values for the | ||
32 | 'max8997,pmic-buck[1/2/5]-dvs-voltage' should be specified. | ||
33 | |||
34 | Optional properties: | ||
35 | - interrupt-parent: Specifies the phandle of the interrupt controller to which | ||
36 | the interrupts from max8997 are delivered to. | ||
37 | - interrupts: Interrupt specifiers for two interrupt sources. | ||
38 | - First interrupt specifier is for 'irq1' interrupt. | ||
39 | - Second interrupt specifier is for 'alert' interrupt. | ||
40 | - max8997,pmic-buck1-uses-gpio-dvs: 'buck1' can be controlled by gpio dvs. | ||
41 | - max8997,pmic-buck2-uses-gpio-dvs: 'buck2' can be controlled by gpio dvs. | ||
42 | - max8997,pmic-buck5-uses-gpio-dvs: 'buck5' can be controlled by gpio dvs. | ||
43 | |||
44 | Additional properties required if either of the optional properties are used: | ||
45 | - max8997,pmic-ignore-gpiodvs-side-effect: When GPIO-DVS mode is used for | ||
46 | multiple bucks, changing the voltage value of one of the bucks may affect | ||
47 | that of another buck, which is the side effect of the change (set_voltage). | ||
48 | Use this property to ignore such side effects and change the voltage. | ||
49 | |||
50 | - max8997,pmic-buck125-default-dvs-idx: Default voltage setting selected from | ||
51 | the possible 8 options selectable by the dvs gpios. The value of this | ||
52 | property should be between 0 and 7. If not specified or if out of range, the | ||
53 | default value of this property is set to 0. | ||
54 | |||
55 | - max8997,pmic-buck125-dvs-gpios: GPIO specifiers for three host gpio's used | ||
56 | for dvs. The format of the gpio specifier depends in the gpio controller. | ||
57 | |||
58 | Regulators: The regulators of max8997 that have to be instantiated should be | ||
59 | included in a sub-node named 'regulators'. Regulator nodes included in this | ||
60 | sub-node should be of the format as listed below. | ||
61 | |||
62 | regulator_name { | ||
63 | standard regulator bindings here | ||
64 | }; | ||
65 | |||
66 | The following are the names of the regulators that the max8997 pmic block | ||
67 | supports. Note: The 'n' in LDOn and BUCKn represents the LDO or BUCK number | ||
68 | as per the datasheet of max8997. | ||
69 | |||
70 | - LDOn | ||
71 | - valid values for n are 1 to 18 and 21 | ||
72 | - Example: LDO0, LD01, LDO2, LDO21 | ||
73 | - BUCKn | ||
74 | - valid values for n are 1 to 7. | ||
75 | - Example: BUCK1, BUCK2, BUCK3, BUCK7 | ||
76 | |||
77 | - ENVICHG: Battery Charging Current Monitor Output. This is a fixed | ||
78 | voltage type regulator | ||
79 | |||
80 | - ESAFEOUT1: (ldo19) | ||
81 | - ESAFEOUT2: (ld020) | ||
82 | |||
83 | - CHARGER_CV: main battery charger voltage control | ||
84 | - CHARGER: main battery charger current control | ||
85 | - CHARGER_TOPOFF: end of charge current threshold level | ||
86 | |||
87 | The bindings inside the regulator nodes use the standard regulator bindings | ||
88 | which are documented elsewhere. | ||
89 | |||
90 | Example: | ||
91 | |||
92 | max8997_pmic@66 { | ||
93 | compatible = "maxim,max8997-pmic"; | ||
94 | interrupt-parent = <&wakeup_eint>; | ||
95 | reg = <0x66>; | ||
96 | interrupts = <4 0>, <3 0>; | ||
97 | |||
98 | max8997,pmic-buck1-uses-gpio-dvs; | ||
99 | max8997,pmic-buck2-uses-gpio-dvs; | ||
100 | max8997,pmic-buck5-uses-gpio-dvs; | ||
101 | |||
102 | max8997,pmic-ignore-gpiodvs-side-effect; | ||
103 | max8997,pmic-buck125-default-dvs-idx = <0>; | ||
104 | |||
105 | max8997,pmic-buck125-dvs-gpios = <&gpx0 0 1 0 0>, /* SET1 */ | ||
106 | <&gpx0 1 1 0 0>, /* SET2 */ | ||
107 | <&gpx0 2 1 0 0>; /* SET3 */ | ||
108 | |||
109 | max8997,pmic-buck1-dvs-voltage = <1350000>, <1300000>, | ||
110 | <1250000>, <1200000>, | ||
111 | <1150000>, <1100000>, | ||
112 | <1000000>, <950000>; | ||
113 | |||
114 | max8997,pmic-buck2-dvs-voltage = <1100000>, <1100000>, | ||
115 | <1100000>, <1100000>, | ||
116 | <1000000>, <1000000>, | ||
117 | <1000000>, <1000000>; | ||
118 | |||
119 | max8997,pmic-buck5-dvs-voltage = <1200000>, <1200000>, | ||
120 | <1200000>, <1200000>, | ||
121 | <1200000>, <1200000>, | ||
122 | <1200000>, <1200000>; | ||
123 | |||
124 | regulators { | ||
125 | ldo1_reg: LDO1 { | ||
126 | regulator-name = "VDD_ABB_3.3V"; | ||
127 | regulator-min-microvolt = <3300000>; | ||
128 | regulator-max-microvolt = <3300000>; | ||
129 | }; | ||
130 | |||
131 | ldo2_reg: LDO2 { | ||
132 | regulator-name = "VDD_ALIVE_1.1V"; | ||
133 | regulator-min-microvolt = <1100000>; | ||
134 | regulator-max-microvolt = <1100000>; | ||
135 | regulator-always-on; | ||
136 | }; | ||
137 | |||
138 | buck1_reg: BUCK1 { | ||
139 | regulator-name = "VDD_ARM_1.2V"; | ||
140 | regulator-min-microvolt = <950000>; | ||
141 | regulator-max-microvolt = <1350000>; | ||
142 | regulator-always-on; | ||
143 | regulator-boot-on; | ||
144 | }; | ||
145 | }; | ||
146 | }; | ||
diff --git a/Documentation/devicetree/bindings/regulator/tps65217.txt b/Documentation/devicetree/bindings/regulator/tps65217.txt index d316fb895daf..4f05d208c95c 100644 --- a/Documentation/devicetree/bindings/regulator/tps65217.txt +++ b/Documentation/devicetree/bindings/regulator/tps65217.txt | |||
@@ -11,6 +11,9 @@ Required properties: | |||
11 | using the standard binding for regulators found at | 11 | using the standard binding for regulators found at |
12 | Documentation/devicetree/bindings/regulator/regulator.txt. | 12 | Documentation/devicetree/bindings/regulator/regulator.txt. |
13 | 13 | ||
14 | Optional properties: | ||
15 | - ti,pmic-shutdown-controller: Telling the PMIC to shutdown on PWR_EN toggle. | ||
16 | |||
14 | The valid names for regulators are: | 17 | The valid names for regulators are: |
15 | tps65217: dcdc1, dcdc2, dcdc3, ldo1, ldo2, ldo3 and ldo4 | 18 | tps65217: dcdc1, dcdc2, dcdc3, ldo1, ldo2, ldo3 and ldo4 |
16 | 19 | ||
@@ -20,6 +23,7 @@ Example: | |||
20 | 23 | ||
21 | tps: tps@24 { | 24 | tps: tps@24 { |
22 | compatible = "ti,tps65217"; | 25 | compatible = "ti,tps65217"; |
26 | ti,pmic-shutdown-controller; | ||
23 | 27 | ||
24 | regulators { | 28 | regulators { |
25 | dcdc1_reg: dcdc1 { | 29 | dcdc1_reg: dcdc1 { |
diff --git a/Documentation/devicetree/bindings/regulator/vexpress.txt b/Documentation/devicetree/bindings/regulator/vexpress.txt new file mode 100644 index 000000000000..d775f72487aa --- /dev/null +++ b/Documentation/devicetree/bindings/regulator/vexpress.txt | |||
@@ -0,0 +1,32 @@ | |||
1 | Versatile Express voltage regulators | ||
2 | ------------------------------------ | ||
3 | |||
4 | Requires node properties: | ||
5 | - "compatible" value: "arm,vexpress-volt" | ||
6 | - "arm,vexpress-sysreg,func" when controlled via vexpress-sysreg | ||
7 | (see Documentation/devicetree/bindings/arm/vexpress-sysreg.txt | ||
8 | for more details) | ||
9 | |||
10 | Required regulator properties: | ||
11 | - "regulator-name" | ||
12 | - "regulator-always-on" | ||
13 | |||
14 | Optional regulator properties: | ||
15 | - "regulator-min-microvolt" | ||
16 | - "regulator-max-microvolt" | ||
17 | |||
18 | See Documentation/devicetree/bindings/regulator/regulator.txt | ||
19 | for more details about the regulator properties. | ||
20 | |||
21 | When no "regulator-[min|max]-microvolt" properties are defined, | ||
22 | the device is treated as fixed (or rather "read-only") regulator. | ||
23 | |||
24 | Example: | ||
25 | volt@0 { | ||
26 | compatible = "arm,vexpress-volt"; | ||
27 | arm,vexpress-sysreg,func = <2 0>; | ||
28 | regulator-name = "Cores"; | ||
29 | regulator-min-microvolt = <800000>; | ||
30 | regulator-max-microvolt = <1050000>; | ||
31 | regulator-always-on; | ||
32 | }; | ||
diff --git a/Documentation/devicetree/bindings/rtc/imxdi-rtc.txt b/Documentation/devicetree/bindings/rtc/imxdi-rtc.txt new file mode 100644 index 000000000000..c9d80d7da141 --- /dev/null +++ b/Documentation/devicetree/bindings/rtc/imxdi-rtc.txt | |||
@@ -0,0 +1,17 @@ | |||
1 | * i.MX25 Real Time Clock controller | ||
2 | |||
3 | This binding supports the following chips: i.MX25, i.MX53 | ||
4 | |||
5 | Required properties: | ||
6 | - compatible: should be: "fsl,imx25-rtc" | ||
7 | - reg: physical base address of the controller and length of memory mapped | ||
8 | region. | ||
9 | - interrupts: rtc alarm interrupt | ||
10 | |||
11 | Example: | ||
12 | |||
13 | rtc@80056000 { | ||
14 | compatible = "fsl,imx53-rtc", "fsl,imx25-rtc"; | ||
15 | reg = <0x80056000 2000>; | ||
16 | interrupts = <29>; | ||
17 | }; | ||
diff --git a/Documentation/devicetree/bindings/rtc/nvidia,tegra20-rtc.txt b/Documentation/devicetree/bindings/rtc/nvidia,tegra20-rtc.txt new file mode 100644 index 000000000000..93f45e9dce7c --- /dev/null +++ b/Documentation/devicetree/bindings/rtc/nvidia,tegra20-rtc.txt | |||
@@ -0,0 +1,19 @@ | |||
1 | NVIDIA Tegra20 real-time clock | ||
2 | |||
3 | The Tegra RTC maintains seconds and milliseconds counters, and five alarm | ||
4 | registers. The alarms and other interrupts may wake the system from low-power | ||
5 | state. | ||
6 | |||
7 | Required properties: | ||
8 | |||
9 | - compatible : should be "nvidia,tegra20-rtc". | ||
10 | - reg : Specifies base physical address and size of the registers. | ||
11 | - interrupts : A single interrupt specifier. | ||
12 | |||
13 | Example: | ||
14 | |||
15 | timer { | ||
16 | compatible = "nvidia,tegra20-rtc"; | ||
17 | reg = <0x7000e000 0x100>; | ||
18 | interrupts = <0 2 0x04>; | ||
19 | }; | ||
diff --git a/Documentation/devicetree/bindings/rtc/orion-rtc.txt b/Documentation/devicetree/bindings/rtc/orion-rtc.txt new file mode 100644 index 000000000000..3bf63ffa5160 --- /dev/null +++ b/Documentation/devicetree/bindings/rtc/orion-rtc.txt | |||
@@ -0,0 +1,18 @@ | |||
1 | * Mvebu Real Time Clock | ||
2 | |||
3 | RTC controller for the Kirkwood, the Dove, the Armada 370 and the | ||
4 | Armada XP SoCs | ||
5 | |||
6 | Required properties: | ||
7 | - compatible : Should be "marvell,orion-rtc" | ||
8 | - reg: physical base address of the controller and length of memory mapped | ||
9 | region. | ||
10 | - interrupts: IRQ line for the RTC. | ||
11 | |||
12 | Example: | ||
13 | |||
14 | rtc@10300 { | ||
15 | compatible = "marvell,orion-rtc"; | ||
16 | reg = <0xd0010300 0x20>; | ||
17 | interrupts = <50>; | ||
18 | }; | ||
diff --git a/Documentation/devicetree/bindings/rtc/rtc-omap.txt b/Documentation/devicetree/bindings/rtc/rtc-omap.txt new file mode 100644 index 000000000000..b47aa415c820 --- /dev/null +++ b/Documentation/devicetree/bindings/rtc/rtc-omap.txt | |||
@@ -0,0 +1,17 @@ | |||
1 | TI Real Time Clock | ||
2 | |||
3 | Required properties: | ||
4 | - compatible: "ti,da830-rtc" | ||
5 | - reg: Address range of rtc register set | ||
6 | - interrupts: rtc timer, alarm interrupts in order | ||
7 | - interrupt-parent: phandle for the interrupt controller | ||
8 | |||
9 | Example: | ||
10 | |||
11 | rtc@1c23000 { | ||
12 | compatible = "ti,da830-rtc"; | ||
13 | reg = <0x23000 0x1000>; | ||
14 | interrupts = <19 | ||
15 | 19>; | ||
16 | interrupt-parent = <&intc>; | ||
17 | }; | ||
diff --git a/Documentation/devicetree/bindings/sound/ak4104.txt b/Documentation/devicetree/bindings/sound/ak4104.txt new file mode 100644 index 000000000000..b902ee39cf89 --- /dev/null +++ b/Documentation/devicetree/bindings/sound/ak4104.txt | |||
@@ -0,0 +1,22 @@ | |||
1 | AK4104 S/PDIF transmitter | ||
2 | |||
3 | This device supports SPI mode only. | ||
4 | |||
5 | Required properties: | ||
6 | |||
7 | - compatible : "asahi-kasei,ak4104" | ||
8 | |||
9 | - reg : The chip select number on the SPI bus | ||
10 | |||
11 | Optional properties: | ||
12 | |||
13 | - reset-gpio : a GPIO spec for the reset pin. If specified, it will be | ||
14 | deasserted before communication to the device starts. | ||
15 | |||
16 | Example: | ||
17 | |||
18 | spdif: ak4104@0 { | ||
19 | compatible = "asahi-kasei,ak4104"; | ||
20 | reg = <0>; | ||
21 | spi-max-frequency = <5000000>; | ||
22 | }; | ||
diff --git a/Documentation/devicetree/bindings/sound/atmel-at91sam9g20ek-wm8731-audio.txt b/Documentation/devicetree/bindings/sound/atmel-at91sam9g20ek-wm8731-audio.txt new file mode 100644 index 000000000000..9c5a9947b64d --- /dev/null +++ b/Documentation/devicetree/bindings/sound/atmel-at91sam9g20ek-wm8731-audio.txt | |||
@@ -0,0 +1,26 @@ | |||
1 | * Atmel at91sam9g20ek wm8731 audio complex | ||
2 | |||
3 | Required properties: | ||
4 | - compatible: "atmel,at91sam9g20ek-wm8731-audio" | ||
5 | - atmel,model: The user-visible name of this sound complex. | ||
6 | - atmel,audio-routing: A list of the connections between audio components. | ||
7 | - atmel,ssc-controller: The phandle of the SSC controller | ||
8 | - atmel,audio-codec: The phandle of the WM8731 audio codec | ||
9 | Optional properties: | ||
10 | - pinctrl-names, pinctrl-0: Please refer to pinctrl-bindings.txt | ||
11 | |||
12 | Example: | ||
13 | sound { | ||
14 | compatible = "atmel,at91sam9g20ek-wm8731-audio"; | ||
15 | pinctrl-names = "default"; | ||
16 | pinctrl-0 = <&pinctrl_pck0_as_mck>; | ||
17 | |||
18 | atmel,model = "wm8731 @ AT91SAMG20EK"; | ||
19 | |||
20 | atmel,audio-routing = | ||
21 | "Ext Spk", "LHPOUT", | ||
22 | "Int MIC", "MICIN"; | ||
23 | |||
24 | atmel,ssc-controller = <&ssc0>; | ||
25 | atmel,audio-codec = <&wm8731>; | ||
26 | }; | ||
diff --git a/Documentation/devicetree/bindings/sound/cs4271.txt b/Documentation/devicetree/bindings/sound/cs4271.txt index c81b5fd5a5bc..a850fb9c88ea 100644 --- a/Documentation/devicetree/bindings/sound/cs4271.txt +++ b/Documentation/devicetree/bindings/sound/cs4271.txt | |||
@@ -18,6 +18,8 @@ Optional properties: | |||
18 | 18 | ||
19 | - reset-gpio: a GPIO spec to define which pin is connected to the chip's | 19 | - reset-gpio: a GPIO spec to define which pin is connected to the chip's |
20 | !RESET pin | 20 | !RESET pin |
21 | - cirrus,amuteb-eq-bmutec: When given, the Codec's AMUTEB=BMUTEC flag | ||
22 | is enabled. | ||
21 | 23 | ||
22 | Examples: | 24 | Examples: |
23 | 25 | ||
diff --git a/Documentation/devicetree/bindings/sound/omap-abe-twl6040.txt b/Documentation/devicetree/bindings/sound/omap-abe-twl6040.txt index 65dec876cb2d..fd40c852d7c7 100644 --- a/Documentation/devicetree/bindings/sound/omap-abe-twl6040.txt +++ b/Documentation/devicetree/bindings/sound/omap-abe-twl6040.txt | |||
@@ -12,7 +12,7 @@ Required properties: | |||
12 | 12 | ||
13 | Optional properties: | 13 | Optional properties: |
14 | - ti,dmic: phandle for the OMAP dmic node if the machine have it connected | 14 | - ti,dmic: phandle for the OMAP dmic node if the machine have it connected |
15 | - ti,jack_detection: Need to be set to <1> if the board capable to detect jack | 15 | - ti,jack_detection: Need to be present if the board capable to detect jack |
16 | insertion, removal. | 16 | insertion, removal. |
17 | 17 | ||
18 | Available audio endpoints for the audio-routing table: | 18 | Available audio endpoints for the audio-routing table: |
@@ -59,7 +59,7 @@ sound { | |||
59 | compatible = "ti,abe-twl6040"; | 59 | compatible = "ti,abe-twl6040"; |
60 | ti,model = "SDP4430"; | 60 | ti,model = "SDP4430"; |
61 | 61 | ||
62 | ti,jack-detection = <1>; | 62 | ti,jack-detection; |
63 | ti,mclk-freq = <38400000>; | 63 | ti,mclk-freq = <38400000>; |
64 | 64 | ||
65 | ti,mcpdm = <&mcpdm>; | 65 | ti,mcpdm = <&mcpdm>; |
diff --git a/Documentation/devicetree/bindings/spi/nvidia,tegra20-sflash.txt b/Documentation/devicetree/bindings/spi/nvidia,tegra20-sflash.txt new file mode 100644 index 000000000000..7b53da5cb75b --- /dev/null +++ b/Documentation/devicetree/bindings/spi/nvidia,tegra20-sflash.txt | |||
@@ -0,0 +1,26 @@ | |||
1 | NVIDIA Tegra20 SFLASH controller. | ||
2 | |||
3 | Required properties: | ||
4 | - compatible : should be "nvidia,tegra20-sflash". | ||
5 | - reg: Should contain SFLASH registers location and length. | ||
6 | - interrupts: Should contain SFLASH interrupts. | ||
7 | - nvidia,dma-request-selector : The Tegra DMA controller's phandle and | ||
8 | request selector for this SFLASH controller. | ||
9 | |||
10 | Recommended properties: | ||
11 | - spi-max-frequency: Definition as per | ||
12 | Documentation/devicetree/bindings/spi/spi-bus.txt | ||
13 | |||
14 | Example: | ||
15 | |||
16 | spi@7000c380 { | ||
17 | compatible = "nvidia,tegra20-sflash"; | ||
18 | reg = <0x7000c380 0x80>; | ||
19 | interrupts = <0 39 0x04>; | ||
20 | nvidia,dma-request-selector = <&apbdma 16>; | ||
21 | spi-max-frequency = <25000000>; | ||
22 | #address-cells = <1>; | ||
23 | #size-cells = <0>; | ||
24 | status = "disabled"; | ||
25 | }; | ||
26 | |||
diff --git a/Documentation/devicetree/bindings/spi/nvidia,tegra20-slink.txt b/Documentation/devicetree/bindings/spi/nvidia,tegra20-slink.txt new file mode 100644 index 000000000000..eefe15e3d95e --- /dev/null +++ b/Documentation/devicetree/bindings/spi/nvidia,tegra20-slink.txt | |||
@@ -0,0 +1,26 @@ | |||
1 | NVIDIA Tegra20/Tegra30 SLINK controller. | ||
2 | |||
3 | Required properties: | ||
4 | - compatible : should be "nvidia,tegra20-slink", "nvidia,tegra30-slink". | ||
5 | - reg: Should contain SLINK registers location and length. | ||
6 | - interrupts: Should contain SLINK interrupts. | ||
7 | - nvidia,dma-request-selector : The Tegra DMA controller's phandle and | ||
8 | request selector for this SLINK controller. | ||
9 | |||
10 | Recommended properties: | ||
11 | - spi-max-frequency: Definition as per | ||
12 | Documentation/devicetree/bindings/spi/spi-bus.txt | ||
13 | |||
14 | Example: | ||
15 | |||
16 | spi@7000d600 { | ||
17 | compatible = "nvidia,tegra20-slink"; | ||
18 | reg = <0x7000d600 0x200>; | ||
19 | interrupts = <0 82 0x04>; | ||
20 | nvidia,dma-request-selector = <&apbdma 16>; | ||
21 | spi-max-frequency = <25000000>; | ||
22 | #address-cells = <1>; | ||
23 | #size-cells = <0>; | ||
24 | status = "disabled"; | ||
25 | }; | ||
26 | |||
diff --git a/Documentation/devicetree/bindings/spi/omap-spi.txt b/Documentation/devicetree/bindings/spi/omap-spi.txt index 81df374adbb9..938809c6829b 100644 --- a/Documentation/devicetree/bindings/spi/omap-spi.txt +++ b/Documentation/devicetree/bindings/spi/omap-spi.txt | |||
@@ -6,7 +6,9 @@ Required properties: | |||
6 | - "ti,omap4-spi" for OMAP4+. | 6 | - "ti,omap4-spi" for OMAP4+. |
7 | - ti,spi-num-cs : Number of chipselect supported by the instance. | 7 | - ti,spi-num-cs : Number of chipselect supported by the instance. |
8 | - ti,hwmods: Name of the hwmod associated to the McSPI | 8 | - ti,hwmods: Name of the hwmod associated to the McSPI |
9 | 9 | - ti,pindir-d0-out-d1-in: Select the D0 pin as output and D1 as | |
10 | input. The default is D0 as input and | ||
11 | D1 as output. | ||
10 | 12 | ||
11 | Example: | 13 | Example: |
12 | 14 | ||
diff --git a/Documentation/devicetree/bindings/spi/spi-bus.txt b/Documentation/devicetree/bindings/spi/spi-bus.txt index d2c33d0f533e..296015e3c632 100644 --- a/Documentation/devicetree/bindings/spi/spi-bus.txt +++ b/Documentation/devicetree/bindings/spi/spi-bus.txt | |||
@@ -12,6 +12,7 @@ The SPI master node requires the following properties: | |||
12 | - #size-cells - should be zero. | 12 | - #size-cells - should be zero. |
13 | - compatible - name of SPI bus controller following generic names | 13 | - compatible - name of SPI bus controller following generic names |
14 | recommended practice. | 14 | recommended practice. |
15 | - cs-gpios - (optional) gpios chip select. | ||
15 | No other properties are required in the SPI bus node. It is assumed | 16 | No other properties are required in the SPI bus node. It is assumed |
16 | that a driver for an SPI bus device will understand that it is an SPI bus. | 17 | that a driver for an SPI bus device will understand that it is an SPI bus. |
17 | However, the binding does not attempt to define the specific method for | 18 | However, the binding does not attempt to define the specific method for |
@@ -24,6 +25,22 @@ support describing the chip select layout. | |||
24 | Optional property: | 25 | Optional property: |
25 | - num-cs : total number of chipselects | 26 | - num-cs : total number of chipselects |
26 | 27 | ||
28 | If cs-gpios is used the number of chip select will automatically increased | ||
29 | with max(cs-gpios > hw cs) | ||
30 | |||
31 | So if for example the controller has 2 CS lines, and the cs-gpios | ||
32 | property looks like this: | ||
33 | |||
34 | cs-gpios = <&gpio1 0 0> <0> <&gpio1 1 0> <&gpio1 2 0>; | ||
35 | |||
36 | Then it should be configured so that num_chipselect = 4 with the | ||
37 | following mapping: | ||
38 | |||
39 | cs0 : &gpio1 0 0 | ||
40 | cs1 : native | ||
41 | cs2 : &gpio1 1 0 | ||
42 | cs3 : &gpio1 2 0 | ||
43 | |||
27 | SPI slave nodes must be children of the SPI master node and can | 44 | SPI slave nodes must be children of the SPI master node and can |
28 | contain the following properties. | 45 | contain the following properties. |
29 | - reg - (required) chip select address of device. | 46 | - reg - (required) chip select address of device. |
@@ -36,6 +53,11 @@ contain the following properties. | |||
36 | shifted clock phase (CPHA) mode | 53 | shifted clock phase (CPHA) mode |
37 | - spi-cs-high - (optional) Empty property indicating device requires | 54 | - spi-cs-high - (optional) Empty property indicating device requires |
38 | chip select active high | 55 | chip select active high |
56 | - spi-3wire - (optional) Empty property indicating device requires | ||
57 | 3-wire mode. | ||
58 | |||
59 | If a gpio chipselect is used for the SPI slave the gpio number will be passed | ||
60 | via the cs_gpio | ||
39 | 61 | ||
40 | SPI example for an MPC5200 SPI bus: | 62 | SPI example for an MPC5200 SPI bus: |
41 | spi@f00 { | 63 | spi@f00 { |
diff --git a/Documentation/devicetree/bindings/spi/spi_atmel.txt b/Documentation/devicetree/bindings/spi/spi_atmel.txt new file mode 100644 index 000000000000..07e04cdc0c9e --- /dev/null +++ b/Documentation/devicetree/bindings/spi/spi_atmel.txt | |||
@@ -0,0 +1,26 @@ | |||
1 | Atmel SPI device | ||
2 | |||
3 | Required properties: | ||
4 | - compatible : should be "atmel,at91rm9200-spi". | ||
5 | - reg: Address and length of the register set for the device | ||
6 | - interrupts: Should contain spi interrupt | ||
7 | - cs-gpios: chipselects | ||
8 | |||
9 | Example: | ||
10 | |||
11 | spi1: spi@fffcc000 { | ||
12 | compatible = "atmel,at91rm9200-spi"; | ||
13 | reg = <0xfffcc000 0x4000>; | ||
14 | interrupts = <13 4 5>; | ||
15 | #address-cells = <1>; | ||
16 | #size-cells = <0>; | ||
17 | cs-gpios = <&pioB 3 0>; | ||
18 | status = "okay"; | ||
19 | |||
20 | mmc-slot@0 { | ||
21 | compatible = "mmc-spi-slot"; | ||
22 | reg = <0>; | ||
23 | gpios = <&pioC 4 0>; /* CD */ | ||
24 | spi-max-frequency = <25000000>; | ||
25 | }; | ||
26 | }; | ||
diff --git a/Documentation/devicetree/bindings/thermal/db8500-thermal.txt b/Documentation/devicetree/bindings/thermal/db8500-thermal.txt new file mode 100644 index 000000000000..2e1c06fad81f --- /dev/null +++ b/Documentation/devicetree/bindings/thermal/db8500-thermal.txt | |||
@@ -0,0 +1,44 @@ | |||
1 | * ST-Ericsson DB8500 Thermal | ||
2 | |||
3 | ** Thermal node properties: | ||
4 | |||
5 | - compatible : "stericsson,db8500-thermal"; | ||
6 | - reg : address range of the thermal sensor registers; | ||
7 | - interrupts : interrupts generated from PRCMU; | ||
8 | - interrupt-names : "IRQ_HOTMON_LOW" and "IRQ_HOTMON_HIGH"; | ||
9 | - num-trips : number of total trip points, this is required, set it 0 if none, | ||
10 | if greater than 0, the following properties must be defined; | ||
11 | - tripN-temp : temperature of trip point N, should be in ascending order; | ||
12 | - tripN-type : type of trip point N, should be one of "active" "passive" "hot" | ||
13 | "critical"; | ||
14 | - tripN-cdev-num : number of the cooling devices which can be bound to trip | ||
15 | point N, this is required if trip point N is defined, set it 0 if none, | ||
16 | otherwise the following cooling device names must be defined; | ||
17 | - tripN-cdev-nameM : name of the No. M cooling device of trip point N; | ||
18 | |||
19 | Usually the num-trips and tripN-*** are separated in board related dts files. | ||
20 | |||
21 | Example: | ||
22 | thermal@801573c0 { | ||
23 | compatible = "stericsson,db8500-thermal"; | ||
24 | reg = <0x801573c0 0x40>; | ||
25 | interrupts = <21 0x4>, <22 0x4>; | ||
26 | interrupt-names = "IRQ_HOTMON_LOW", "IRQ_HOTMON_HIGH"; | ||
27 | |||
28 | num-trips = <3>; | ||
29 | |||
30 | trip0-temp = <75000>; | ||
31 | trip0-type = "active"; | ||
32 | trip0-cdev-num = <1>; | ||
33 | trip0-cdev-name0 = "thermal-cpufreq-0"; | ||
34 | |||
35 | trip1-temp = <80000>; | ||
36 | trip1-type = "active"; | ||
37 | trip1-cdev-num = <2>; | ||
38 | trip1-cdev-name0 = "thermal-cpufreq-0"; | ||
39 | trip1-cdev-name1 = "thermal-fan"; | ||
40 | |||
41 | trip2-temp = <85000>; | ||
42 | trip2-type = "critical"; | ||
43 | trip2-cdev-num = <0>; | ||
44 | } | ||
diff --git a/Documentation/devicetree/bindings/timer/allwinner,sunxi-timer.txt b/Documentation/devicetree/bindings/timer/allwinner,sunxi-timer.txt new file mode 100644 index 000000000000..0c7b64e95a61 --- /dev/null +++ b/Documentation/devicetree/bindings/timer/allwinner,sunxi-timer.txt | |||
@@ -0,0 +1,17 @@ | |||
1 | Allwinner A1X SoCs Timer Controller | ||
2 | |||
3 | Required properties: | ||
4 | |||
5 | - compatible : should be "allwinner,sunxi-timer" | ||
6 | - reg : Specifies base physical address and size of the registers. | ||
7 | - interrupts : The interrupt of the first timer | ||
8 | - clocks: phandle to the source clock (usually a 24 MHz fixed clock) | ||
9 | |||
10 | Example: | ||
11 | |||
12 | timer { | ||
13 | compatible = "allwinner,sunxi-timer"; | ||
14 | reg = <0x01c20c00 0x400>; | ||
15 | interrupts = <22>; | ||
16 | clocks = <&osc>; | ||
17 | }; | ||
diff --git a/Documentation/devicetree/bindings/timer/nvidia,tegra20-timer.txt b/Documentation/devicetree/bindings/timer/nvidia,tegra20-timer.txt new file mode 100644 index 000000000000..e019fdc38773 --- /dev/null +++ b/Documentation/devicetree/bindings/timer/nvidia,tegra20-timer.txt | |||
@@ -0,0 +1,21 @@ | |||
1 | NVIDIA Tegra20 timer | ||
2 | |||
3 | The Tegra20 timer provides four 29-bit timer channels and a single 32-bit free | ||
4 | running counter. The first two channels may also trigger a watchdog reset. | ||
5 | |||
6 | Required properties: | ||
7 | |||
8 | - compatible : should be "nvidia,tegra20-timer". | ||
9 | - reg : Specifies base physical address and size of the registers. | ||
10 | - interrupts : A list of 4 interrupts; one per timer channel. | ||
11 | |||
12 | Example: | ||
13 | |||
14 | timer { | ||
15 | compatible = "nvidia,tegra20-timer"; | ||
16 | reg = <0x60005000 0x60>; | ||
17 | interrupts = <0 0 0x04 | ||
18 | 0 1 0x04 | ||
19 | 0 41 0x04 | ||
20 | 0 42 0x04>; | ||
21 | }; | ||
diff --git a/Documentation/devicetree/bindings/timer/nvidia,tegra30-timer.txt b/Documentation/devicetree/bindings/timer/nvidia,tegra30-timer.txt new file mode 100644 index 000000000000..906109d4c593 --- /dev/null +++ b/Documentation/devicetree/bindings/timer/nvidia,tegra30-timer.txt | |||
@@ -0,0 +1,23 @@ | |||
1 | NVIDIA Tegra30 timer | ||
2 | |||
3 | The Tegra30 timer provides ten 29-bit timer channels, a single 32-bit free | ||
4 | running counter, and 5 watchdog modules. The first two channels may also | ||
5 | trigger a legacy watchdog reset. | ||
6 | |||
7 | Required properties: | ||
8 | |||
9 | - compatible : should be "nvidia,tegra30-timer", "nvidia,tegra20-timer". | ||
10 | - reg : Specifies base physical address and size of the registers. | ||
11 | - interrupts : A list of 6 interrupts; one per each of timer channels 1 | ||
12 | through 5, and one for the shared interrupt for the remaining channels. | ||
13 | |||
14 | timer { | ||
15 | compatible = "nvidia,tegra30-timer", "nvidia,tegra20-timer"; | ||
16 | reg = <0x60005000 0x400>; | ||
17 | interrupts = <0 0 0x04 | ||
18 | 0 1 0x04 | ||
19 | 0 41 0x04 | ||
20 | 0 42 0x04 | ||
21 | 0 121 0x04 | ||
22 | 0 122 0x04>; | ||
23 | }; | ||
diff --git a/Documentation/devicetree/bindings/tty/serial/fsl-mxs-auart.txt b/Documentation/devicetree/bindings/tty/serial/fsl-mxs-auart.txt index 2ee903fad25c..273a8d5b3300 100644 --- a/Documentation/devicetree/bindings/tty/serial/fsl-mxs-auart.txt +++ b/Documentation/devicetree/bindings/tty/serial/fsl-mxs-auart.txt | |||
@@ -6,11 +6,19 @@ Required properties: | |||
6 | - reg : Address and length of the register set for the device | 6 | - reg : Address and length of the register set for the device |
7 | - interrupts : Should contain the auart interrupt numbers | 7 | - interrupts : Should contain the auart interrupt numbers |
8 | 8 | ||
9 | Optional properties: | ||
10 | - fsl,auart-dma-channel : The DMA channels, the first is for RX, the other | ||
11 | is for TX. If you add this property, it also means that you | ||
12 | will enable the DMA support for the auart. | ||
13 | Note: due to the hardware bug in imx23(see errata : 2836), | ||
14 | only the imx28 can enable the DMA support for the auart. | ||
15 | |||
9 | Example: | 16 | Example: |
10 | auart0: serial@8006a000 { | 17 | auart0: serial@8006a000 { |
11 | compatible = "fsl,imx28-auart", "fsl,imx23-auart"; | 18 | compatible = "fsl,imx28-auart", "fsl,imx23-auart"; |
12 | reg = <0x8006a000 0x2000>; | 19 | reg = <0x8006a000 0x2000>; |
13 | interrupts = <112 70 71>; | 20 | interrupts = <112 70 71>; |
21 | fsl,auart-dma-channel = <8 9>; | ||
14 | }; | 22 | }; |
15 | 23 | ||
16 | Note: Each auart port should have an alias correctly numbered in "aliases" | 24 | Note: Each auart port should have an alias correctly numbered in "aliases" |
diff --git a/Documentation/devicetree/bindings/tty/serial/of-serial.txt b/Documentation/devicetree/bindings/tty/serial/of-serial.txt index ba385f2e0ddc..1e1145ca4f3c 100644 --- a/Documentation/devicetree/bindings/tty/serial/of-serial.txt +++ b/Documentation/devicetree/bindings/tty/serial/of-serial.txt | |||
@@ -14,7 +14,10 @@ Required properties: | |||
14 | - "serial" if the port type is unknown. | 14 | - "serial" if the port type is unknown. |
15 | - reg : offset and length of the register set for the device. | 15 | - reg : offset and length of the register set for the device. |
16 | - interrupts : should contain uart interrupt. | 16 | - interrupts : should contain uart interrupt. |
17 | - clock-frequency : the input clock frequency for the UART. | 17 | - clock-frequency : the input clock frequency for the UART |
18 | or | ||
19 | clocks phandle to refer to the clk used as per Documentation/devicetree | ||
20 | /bindings/clock/clock-bindings.txt | ||
18 | 21 | ||
19 | Optional properties: | 22 | Optional properties: |
20 | - current-speed : the current active speed of the UART. | 23 | - current-speed : the current active speed of the UART. |
diff --git a/Documentation/devicetree/bindings/usb/am33xx-usb.txt b/Documentation/devicetree/bindings/usb/am33xx-usb.txt index ca8fa56e9f03..ea840f7f9258 100644 --- a/Documentation/devicetree/bindings/usb/am33xx-usb.txt +++ b/Documentation/devicetree/bindings/usb/am33xx-usb.txt | |||
@@ -1,14 +1,35 @@ | |||
1 | AM33XX MUSB GLUE | 1 | AM33XX MUSB GLUE |
2 | - compatible : Should be "ti,musb-am33xx" | 2 | - compatible : Should be "ti,musb-am33xx" |
3 | - reg : offset and length of register sets, first usbss, then for musb instances | ||
4 | - interrupts : usbss, musb instance interrupts in order | ||
3 | - ti,hwmods : must be "usb_otg_hs" | 5 | - ti,hwmods : must be "usb_otg_hs" |
4 | - multipoint : Should be "1" indicating the musb controller supports | 6 | - multipoint : Should be "1" indicating the musb controller supports |
5 | multipoint. This is a MUSB configuration-specific setting. | 7 | multipoint. This is a MUSB configuration-specific setting. |
6 | - num_eps : Specifies the number of endpoints. This is also a | 8 | - num-eps : Specifies the number of endpoints. This is also a |
7 | MUSB configuration-specific setting. Should be set to "16" | 9 | MUSB configuration-specific setting. Should be set to "16" |
8 | - ram_bits : Specifies the ram address size. Should be set to "12" | 10 | - ram-bits : Specifies the ram address size. Should be set to "12" |
9 | - port0_mode : Should be "3" to represent OTG. "1" signifies HOST and "2" | 11 | - port0-mode : Should be "3" to represent OTG. "1" signifies HOST and "2" |
10 | represents PERIPHERAL. | 12 | represents PERIPHERAL. |
11 | - port1_mode : Should be "1" to represent HOST. "3" signifies OTG and "2" | 13 | - port1-mode : Should be "1" to represent HOST. "3" signifies OTG and "2" |
12 | represents PERIPHERAL. | 14 | represents PERIPHERAL. |
13 | - power : Should be "250". This signifies the controller can supply upto | 15 | - power : Should be "250". This signifies the controller can supply upto |
14 | 500mA when operating in host mode. | 16 | 500mA when operating in host mode. |
17 | |||
18 | Example: | ||
19 | |||
20 | usb@47400000 { | ||
21 | compatible = "ti,musb-am33xx"; | ||
22 | reg = <0x47400000 0x1000 /* usbss */ | ||
23 | 0x47401000 0x800 /* musb instance 0 */ | ||
24 | 0x47401800 0x800>; /* musb instance 1 */ | ||
25 | interrupts = <17 /* usbss */ | ||
26 | 18 /* musb instance 0 */ | ||
27 | 19>; /* musb instance 1 */ | ||
28 | multipoint = <1>; | ||
29 | num-eps = <16>; | ||
30 | ram-bits = <12>; | ||
31 | port0-mode = <3>; | ||
32 | port1-mode = <3>; | ||
33 | power = <250>; | ||
34 | ti,hwmods = "usb_otg_hs"; | ||
35 | }; | ||
diff --git a/Documentation/devicetree/bindings/usb/ehci-orion.txt b/Documentation/devicetree/bindings/usb/ehci-orion.txt new file mode 100644 index 000000000000..6bc09ec14c4d --- /dev/null +++ b/Documentation/devicetree/bindings/usb/ehci-orion.txt | |||
@@ -0,0 +1,15 @@ | |||
1 | * EHCI controller, Orion Marvell variants | ||
2 | |||
3 | Required properties: | ||
4 | - compatible: must be "marvell,orion-ehci" | ||
5 | - reg: physical base address of the controller and length of memory mapped | ||
6 | region. | ||
7 | - interrupts: The EHCI interrupt | ||
8 | |||
9 | Example: | ||
10 | |||
11 | ehci@50000 { | ||
12 | compatible = "marvell,orion-ehci"; | ||
13 | reg = <0x50000 0x1000>; | ||
14 | interrupts = <19>; | ||
15 | }; | ||
diff --git a/Documentation/devicetree/bindings/vendor-prefixes.txt b/Documentation/devicetree/bindings/vendor-prefixes.txt index 9de2b9ff9d6e..902b1b1f568e 100644 --- a/Documentation/devicetree/bindings/vendor-prefixes.txt +++ b/Documentation/devicetree/bindings/vendor-prefixes.txt | |||
@@ -5,6 +5,7 @@ using them to avoid name-space collisions. | |||
5 | 5 | ||
6 | ad Avionic Design GmbH | 6 | ad Avionic Design GmbH |
7 | adi Analog Devices, Inc. | 7 | adi Analog Devices, Inc. |
8 | ak Asahi Kasei Corp. | ||
8 | amcc Applied Micro Circuits Corporation (APM, formally AMCC) | 9 | amcc Applied Micro Circuits Corporation (APM, formally AMCC) |
9 | apm Applied Micro Circuits Corporation (APM) | 10 | apm Applied Micro Circuits Corporation (APM) |
10 | arm ARM Ltd. | 11 | arm ARM Ltd. |
@@ -25,6 +26,7 @@ gef GE Fanuc Intelligent Platforms Embedded Systems, Inc. | |||
25 | hp Hewlett Packard | 26 | hp Hewlett Packard |
26 | ibm International Business Machines (IBM) | 27 | ibm International Business Machines (IBM) |
27 | idt Integrated Device Technologies, Inc. | 28 | idt Integrated Device Technologies, Inc. |
29 | img Imagination Technologies Ltd. | ||
28 | intercontrol Inter Control Group | 30 | intercontrol Inter Control Group |
29 | linux Linux-specific binding | 31 | linux Linux-specific binding |
30 | marvell Marvell Technology Group Ltd. | 32 | marvell Marvell Technology Group Ltd. |
@@ -34,8 +36,9 @@ national National Semiconductor | |||
34 | nintendo Nintendo | 36 | nintendo Nintendo |
35 | nvidia NVIDIA | 37 | nvidia NVIDIA |
36 | nxp NXP Semiconductors | 38 | nxp NXP Semiconductors |
39 | onnn ON Semiconductor Corp. | ||
37 | picochip Picochip Ltd | 40 | picochip Picochip Ltd |
38 | powervr Imagination Technologies | 41 | powervr PowerVR (deprecated, use img) |
39 | qcom Qualcomm, Inc. | 42 | qcom Qualcomm, Inc. |
40 | ramtron Ramtron International | 43 | ramtron Ramtron International |
41 | realtek Realtek Semiconductor Corp. | 44 | realtek Realtek Semiconductor Corp. |
@@ -45,10 +48,12 @@ schindler Schindler | |||
45 | sil Silicon Image | 48 | sil Silicon Image |
46 | simtek | 49 | simtek |
47 | sirf SiRF Technology, Inc. | 50 | sirf SiRF Technology, Inc. |
51 | snps Synopsys, Inc. | ||
48 | st STMicroelectronics | 52 | st STMicroelectronics |
49 | stericsson ST-Ericsson | 53 | stericsson ST-Ericsson |
50 | ti Texas Instruments | 54 | ti Texas Instruments |
51 | via VIA Technologies, Inc. | 55 | via VIA Technologies, Inc. |
52 | wlf Wolfson Microelectronics | 56 | wlf Wolfson Microelectronics |
53 | wm Wondermedia Technologies, Inc. | 57 | wm Wondermedia Technologies, Inc. |
58 | winbond Winbond Electronics corp. | ||
54 | xlnx Xilinx | 59 | xlnx Xilinx |
diff --git a/Documentation/devicetree/bindings/video/exynos_dp.txt b/Documentation/devicetree/bindings/video/exynos_dp.txt new file mode 100644 index 000000000000..c60da67a5d76 --- /dev/null +++ b/Documentation/devicetree/bindings/video/exynos_dp.txt | |||
@@ -0,0 +1,80 @@ | |||
1 | The Exynos display port interface should be configured based on | ||
2 | the type of panel connected to it. | ||
3 | |||
4 | We use two nodes: | ||
5 | -dp-controller node | ||
6 | -dptx-phy node(defined inside dp-controller node) | ||
7 | |||
8 | For the DP-PHY initialization, we use the dptx-phy node. | ||
9 | Required properties for dptx-phy: | ||
10 | -reg: | ||
11 | Base address of DP PHY register. | ||
12 | -samsung,enable-mask: | ||
13 | The bit-mask used to enable/disable DP PHY. | ||
14 | |||
15 | For the Panel initialization, we read data from dp-controller node. | ||
16 | Required properties for dp-controller: | ||
17 | -compatible: | ||
18 | should be "samsung,exynos5-dp". | ||
19 | -reg: | ||
20 | physical base address of the controller and length | ||
21 | of memory mapped region. | ||
22 | -interrupts: | ||
23 | interrupt combiner values. | ||
24 | -interrupt-parent: | ||
25 | phandle to Interrupt combiner node. | ||
26 | -samsung,color-space: | ||
27 | input video data format. | ||
28 | COLOR_RGB = 0, COLOR_YCBCR422 = 1, COLOR_YCBCR444 = 2 | ||
29 | -samsung,dynamic-range: | ||
30 | dynamic range for input video data. | ||
31 | VESA = 0, CEA = 1 | ||
32 | -samsung,ycbcr-coeff: | ||
33 | YCbCr co-efficients for input video. | ||
34 | COLOR_YCBCR601 = 0, COLOR_YCBCR709 = 1 | ||
35 | -samsung,color-depth: | ||
36 | number of bits per colour component. | ||
37 | COLOR_6 = 0, COLOR_8 = 1, COLOR_10 = 2, COLOR_12 = 3 | ||
38 | -samsung,link-rate: | ||
39 | link rate supported by the panel. | ||
40 | LINK_RATE_1_62GBPS = 0x6, LINK_RATE_2_70GBPS = 0x0A | ||
41 | -samsung,lane-count: | ||
42 | number of lanes supported by the panel. | ||
43 | LANE_COUNT1 = 1, LANE_COUNT2 = 2, LANE_COUNT4 = 4 | ||
44 | |||
45 | Optional properties for dp-controller: | ||
46 | -interlaced: | ||
47 | interlace scan mode. | ||
48 | Progressive if defined, Interlaced if not defined | ||
49 | -vsync-active-high: | ||
50 | VSYNC polarity configuration. | ||
51 | High if defined, Low if not defined | ||
52 | -hsync-active-high: | ||
53 | HSYNC polarity configuration. | ||
54 | High if defined, Low if not defined | ||
55 | |||
56 | Example: | ||
57 | |||
58 | SOC specific portion: | ||
59 | dp-controller { | ||
60 | compatible = "samsung,exynos5-dp"; | ||
61 | reg = <0x145b0000 0x10000>; | ||
62 | interrupts = <10 3>; | ||
63 | interrupt-parent = <&combiner>; | ||
64 | |||
65 | dptx-phy { | ||
66 | reg = <0x10040720>; | ||
67 | samsung,enable-mask = <1>; | ||
68 | }; | ||
69 | |||
70 | }; | ||
71 | |||
72 | Board Specific portion: | ||
73 | dp-controller { | ||
74 | samsung,color-space = <0>; | ||
75 | samsung,dynamic-range = <0>; | ||
76 | samsung,ycbcr-coeff = <0>; | ||
77 | samsung,color-depth = <1>; | ||
78 | samsung,link-rate = <0x0a>; | ||
79 | samsung,lane-count = <4>; | ||
80 | }; | ||
diff --git a/Documentation/devicetree/bindings/video/ssd1307fb.txt b/Documentation/devicetree/bindings/video/ssd1307fb.txt new file mode 100644 index 000000000000..3d0060cff062 --- /dev/null +++ b/Documentation/devicetree/bindings/video/ssd1307fb.txt | |||
@@ -0,0 +1,24 @@ | |||
1 | * Solomon SSD1307 Framebuffer Driver | ||
2 | |||
3 | Required properties: | ||
4 | - compatible: Should be "solomon,ssd1307fb-<bus>". The only supported bus for | ||
5 | now is i2c. | ||
6 | - reg: Should contain address of the controller on the I2C bus. Most likely | ||
7 | 0x3c or 0x3d | ||
8 | - pwm: Should contain the pwm to use according to the OF device tree PWM | ||
9 | specification [0] | ||
10 | - reset-gpios: Should contain the GPIO used to reset the OLED display | ||
11 | |||
12 | Optional properties: | ||
13 | - reset-active-low: Is the reset gpio is active on physical low? | ||
14 | |||
15 | [0]: Documentation/devicetree/bindings/pwm/pwm.txt | ||
16 | |||
17 | Examples: | ||
18 | ssd1307: oled@3c { | ||
19 | compatible = "solomon,ssd1307fb-i2c"; | ||
20 | reg = <0x3c>; | ||
21 | pwms = <&pwm 4 3000>; | ||
22 | reset-gpios = <&gpio2 7>; | ||
23 | reset-active-low; | ||
24 | }; | ||
diff --git a/Documentation/devicetree/bindings/watchdog/atmel-wdt.txt b/Documentation/devicetree/bindings/watchdog/atmel-wdt.txt new file mode 100644 index 000000000000..2957ebb5aa71 --- /dev/null +++ b/Documentation/devicetree/bindings/watchdog/atmel-wdt.txt | |||
@@ -0,0 +1,15 @@ | |||
1 | * Atmel Watchdog Timers | ||
2 | |||
3 | ** at91sam9-wdt | ||
4 | |||
5 | Required properties: | ||
6 | - compatible: must be "atmel,at91sam9260-wdt". | ||
7 | - reg: physical base address of the controller and length of memory mapped | ||
8 | region. | ||
9 | |||
10 | Example: | ||
11 | |||
12 | watchdog@fffffd40 { | ||
13 | compatible = "atmel,at91sam9260-wdt"; | ||
14 | reg = <0xfffffd40 0x10>; | ||
15 | }; | ||
diff --git a/Documentation/devicetree/bindings/watchdog/brcm,bcm2835-pm-wdog.txt b/Documentation/devicetree/bindings/watchdog/brcm,bcm2835-pm-wdog.txt new file mode 100644 index 000000000000..d209366b4a69 --- /dev/null +++ b/Documentation/devicetree/bindings/watchdog/brcm,bcm2835-pm-wdog.txt | |||
@@ -0,0 +1,13 @@ | |||
1 | BCM2835 Watchdog timer | ||
2 | |||
3 | Required properties: | ||
4 | |||
5 | - compatible : should be "brcm,bcm2835-pm-wdt" | ||
6 | - reg : Specifies base physical address and size of the registers. | ||
7 | |||
8 | Example: | ||
9 | |||
10 | watchdog { | ||
11 | compatible = "brcm,bcm2835-pm-wdt"; | ||
12 | reg = <0x7e100000 0x28>; | ||
13 | }; | ||
diff --git a/Documentation/devicetree/bindings/watchdog/davinci-wdt.txt b/Documentation/devicetree/bindings/watchdog/davinci-wdt.txt new file mode 100644 index 000000000000..75558ccd9a05 --- /dev/null +++ b/Documentation/devicetree/bindings/watchdog/davinci-wdt.txt | |||
@@ -0,0 +1,12 @@ | |||
1 | DaVinci Watchdog Timer (WDT) Controller | ||
2 | |||
3 | Required properties: | ||
4 | - compatible : Should be "ti,davinci-wdt" | ||
5 | - reg : Should contain WDT registers location and length | ||
6 | |||
7 | Examples: | ||
8 | |||
9 | wdt: wdt@2320000 { | ||
10 | compatible = "ti,davinci-wdt"; | ||
11 | reg = <0x02320000 0x80>; | ||
12 | }; | ||
diff --git a/Documentation/devicetree/bindings/watchdog/sunxi-wdt.txt b/Documentation/devicetree/bindings/watchdog/sunxi-wdt.txt new file mode 100644 index 000000000000..0b2717775600 --- /dev/null +++ b/Documentation/devicetree/bindings/watchdog/sunxi-wdt.txt | |||
@@ -0,0 +1,13 @@ | |||
1 | Allwinner sunXi Watchdog timer | ||
2 | |||
3 | Required properties: | ||
4 | |||
5 | - compatible : should be "allwinner,sunxi-wdt" | ||
6 | - reg : Specifies base physical address and size of the registers. | ||
7 | |||
8 | Example: | ||
9 | |||
10 | wdt: watchdog@01c20c90 { | ||
11 | compatible = "allwinner,sunxi-wdt"; | ||
12 | reg = <0x01c20c90 0x10>; | ||
13 | }; | ||
diff --git a/Documentation/devicetree/usage-model.txt b/Documentation/devicetree/usage-model.txt index dca90fe22a90..ef9d06c9f8fd 100644 --- a/Documentation/devicetree/usage-model.txt +++ b/Documentation/devicetree/usage-model.txt | |||
@@ -347,7 +347,7 @@ 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 | 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. | 348 | really probably is best registered as a platform_device. |
349 | 349 | ||
350 | Linux board support code calls of_platform_populate(NULL, NULL, NULL) | 350 | Linux board support code calls of_platform_populate(NULL, NULL, NULL, NULL) |
351 | to kick off discovery of devices at the root of the tree. The | 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 | 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 | 353 | tree, there is no need to provide a starting node (the first NULL), a |
diff --git a/Documentation/dma-buf-sharing.txt b/Documentation/dma-buf-sharing.txt index ad86fb86c9a0..0188903bc9e1 100644 --- a/Documentation/dma-buf-sharing.txt +++ b/Documentation/dma-buf-sharing.txt | |||
@@ -376,7 +376,7 @@ Being able to mmap an export dma-buf buffer object has 2 main use-cases: | |||
376 | leaving the cpu domain and flushing caches at fault time. Note that all the | 376 | leaving the cpu domain and flushing caches at fault time. Note that all the |
377 | dma_buf files share the same anon inode, hence the exporter needs to replace | 377 | dma_buf files share the same anon inode, hence the exporter needs to replace |
378 | the dma_buf file stored in vma->vm_file with it's own if pte shootdown is | 378 | the dma_buf file stored in vma->vm_file with it's own if pte shootdown is |
379 | requred. This is because the kernel uses the underlying inode's address_space | 379 | required. This is because the kernel uses the underlying inode's address_space |
380 | for vma tracking (and hence pte tracking at shootdown time with | 380 | for vma tracking (and hence pte tracking at shootdown time with |
381 | unmap_mapping_range). | 381 | unmap_mapping_range). |
382 | 382 | ||
@@ -388,7 +388,7 @@ Being able to mmap an export dma-buf buffer object has 2 main use-cases: | |||
388 | Exporters that shoot down mappings (for any reasons) shall not do any | 388 | Exporters that shoot down mappings (for any reasons) shall not do any |
389 | synchronization at fault time with outstanding device operations. | 389 | synchronization at fault time with outstanding device operations. |
390 | Synchronization is an orthogonal issue to sharing the backing storage of a | 390 | Synchronization is an orthogonal issue to sharing the backing storage of a |
391 | buffer and hence should not be handled by dma-buf itself. This is explictly | 391 | buffer and hence should not be handled by dma-buf itself. This is explicitly |
392 | mentioned here because many people seem to want something like this, but if | 392 | mentioned here because many people seem to want something like this, but if |
393 | different exporters handle this differently, buffer sharing can fail in | 393 | different exporters handle this differently, buffer sharing can fail in |
394 | interesting ways depending upong the exporter (if userspace starts depending | 394 | interesting ways depending upong the exporter (if userspace starts depending |
diff --git a/Documentation/dontdiff b/Documentation/dontdiff index 74c25c8d8884..b89a739a3276 100644 --- a/Documentation/dontdiff +++ b/Documentation/dontdiff | |||
@@ -181,7 +181,6 @@ modversions.h* | |||
181 | nconf | 181 | nconf |
182 | ncscope.* | 182 | ncscope.* |
183 | offset.h | 183 | offset.h |
184 | offsets.h | ||
185 | oui.c* | 184 | oui.c* |
186 | page-types | 185 | page-types |
187 | parse.c | 186 | parse.c |
diff --git a/Documentation/fault-injection/notifier-error-inject.txt b/Documentation/fault-injection/notifier-error-inject.txt index c83526c364e5..09adabef513f 100644 --- a/Documentation/fault-injection/notifier-error-inject.txt +++ b/Documentation/fault-injection/notifier-error-inject.txt | |||
@@ -1,7 +1,7 @@ | |||
1 | Notifier error injection | 1 | Notifier error injection |
2 | ======================== | 2 | ======================== |
3 | 3 | ||
4 | Notifier error injection provides the ability to inject artifical errors to | 4 | Notifier error injection provides the ability to inject artificial errors to |
5 | specified notifier chain callbacks. It is useful to test the error handling of | 5 | specified notifier chain callbacks. It is useful to test the error handling of |
6 | notifier call chain failures which is rarely executed. There are kernel | 6 | notifier call chain failures which is rarely executed. There are kernel |
7 | modules that can be used to test the following notifiers. | 7 | modules that can be used to test the following notifiers. |
@@ -14,7 +14,7 @@ modules that can be used to test the following notifiers. | |||
14 | CPU notifier error injection module | 14 | CPU notifier error injection module |
15 | ----------------------------------- | 15 | ----------------------------------- |
16 | This feature can be used to test the error handling of the CPU notifiers by | 16 | This feature can be used to test the error handling of the CPU notifiers by |
17 | injecting artifical errors to CPU notifier chain callbacks. | 17 | injecting artificial errors to CPU notifier chain callbacks. |
18 | 18 | ||
19 | If the notifier call chain should be failed with some events notified, write | 19 | If the notifier call chain should be failed with some events notified, write |
20 | the error code to debugfs interface | 20 | the error code to debugfs interface |
diff --git a/Documentation/filesystems/00-INDEX b/Documentation/filesystems/00-INDEX index 8c624a18f67d..8042050eb265 100644 --- a/Documentation/filesystems/00-INDEX +++ b/Documentation/filesystems/00-INDEX | |||
@@ -38,6 +38,8 @@ dnotify_test.c | |||
38 | - example program for dnotify | 38 | - example program for dnotify |
39 | ecryptfs.txt | 39 | ecryptfs.txt |
40 | - docs on eCryptfs: stacked cryptographic filesystem for Linux. | 40 | - docs on eCryptfs: stacked cryptographic filesystem for Linux. |
41 | efivarfs.txt | ||
42 | - info for the efivarfs filesystem. | ||
41 | exofs.txt | 43 | exofs.txt |
42 | - info, usage, mount options, design about EXOFS. | 44 | - info, usage, mount options, design about EXOFS. |
43 | ext2.txt | 45 | ext2.txt |
@@ -48,6 +50,8 @@ ext4.txt | |||
48 | - info, mount options and specifications for the Ext4 filesystem. | 50 | - info, mount options and specifications for the Ext4 filesystem. |
49 | files.txt | 51 | files.txt |
50 | - info on file management in the Linux kernel. | 52 | - info on file management in the Linux kernel. |
53 | f2fs.txt | ||
54 | - info and mount options for the F2FS filesystem. | ||
51 | fuse.txt | 55 | fuse.txt |
52 | - info on the Filesystem in User SpacE including mount options. | 56 | - info on the Filesystem in User SpacE including mount options. |
53 | gfs2.txt | 57 | gfs2.txt |
diff --git a/Documentation/filesystems/Locking b/Documentation/filesystems/Locking index e540a24e5d06..f48e0c6b4c42 100644 --- a/Documentation/filesystems/Locking +++ b/Documentation/filesystems/Locking | |||
@@ -80,7 +80,6 @@ rename: yes (all) (see below) | |||
80 | readlink: no | 80 | readlink: no |
81 | follow_link: no | 81 | follow_link: no |
82 | put_link: no | 82 | put_link: no |
83 | truncate: yes (see below) | ||
84 | setattr: yes | 83 | setattr: yes |
85 | permission: no (may not block if called in rcu-walk mode) | 84 | permission: no (may not block if called in rcu-walk mode) |
86 | get_acl: no | 85 | get_acl: no |
@@ -96,11 +95,6 @@ atomic_open: yes | |||
96 | Additionally, ->rmdir(), ->unlink() and ->rename() have ->i_mutex on | 95 | Additionally, ->rmdir(), ->unlink() and ->rename() have ->i_mutex on |
97 | victim. | 96 | victim. |
98 | cross-directory ->rename() has (per-superblock) ->s_vfs_rename_sem. | 97 | cross-directory ->rename() has (per-superblock) ->s_vfs_rename_sem. |
99 | ->truncate() is never called directly - it's a callback, not a | ||
100 | method. It's called by vmtruncate() - deprecated library function used by | ||
101 | ->setattr(). Locking information above applies to that call (i.e. is | ||
102 | inherited from ->setattr() - vmtruncate() is used when ATTR_SIZE had been | ||
103 | passed). | ||
104 | 98 | ||
105 | See Documentation/filesystems/directory-locking for more detailed discussion | 99 | See Documentation/filesystems/directory-locking for more detailed discussion |
106 | of the locking scheme for directory operations. | 100 | of the locking scheme for directory operations. |
diff --git a/Documentation/filesystems/caching/backend-api.txt b/Documentation/filesystems/caching/backend-api.txt index 382d52cdaf2d..d78bab9622c6 100644 --- a/Documentation/filesystems/caching/backend-api.txt +++ b/Documentation/filesystems/caching/backend-api.txt | |||
@@ -308,6 +308,18 @@ performed on the denizens of the cache. These are held in a structure of type: | |||
308 | obtained by calling object->cookie->def->get_aux()/get_attr(). | 308 | obtained by calling object->cookie->def->get_aux()/get_attr(). |
309 | 309 | ||
310 | 310 | ||
311 | (*) Invalidate data object [mandatory]: | ||
312 | |||
313 | int (*invalidate_object)(struct fscache_operation *op) | ||
314 | |||
315 | This is called to invalidate a data object (as pointed to by op->object). | ||
316 | All the data stored for this object should be discarded and an | ||
317 | attr_changed operation should be performed. The caller will follow up | ||
318 | with an object update operation. | ||
319 | |||
320 | fscache_op_complete() must be called on op before returning. | ||
321 | |||
322 | |||
311 | (*) Discard object [mandatory]: | 323 | (*) Discard object [mandatory]: |
312 | 324 | ||
313 | void (*drop_object)(struct fscache_object *object) | 325 | void (*drop_object)(struct fscache_object *object) |
@@ -419,7 +431,10 @@ performed on the denizens of the cache. These are held in a structure of type: | |||
419 | 431 | ||
420 | If an I/O error occurs, fscache_io_error() should be called and -ENOBUFS | 432 | If an I/O error occurs, fscache_io_error() should be called and -ENOBUFS |
421 | returned if possible or fscache_end_io() called with a suitable error | 433 | returned if possible or fscache_end_io() called with a suitable error |
422 | code.. | 434 | code. |
435 | |||
436 | fscache_put_retrieval() should be called after a page or pages are dealt | ||
437 | with. This will complete the operation when all pages are dealt with. | ||
423 | 438 | ||
424 | 439 | ||
425 | (*) Request pages be read from cache [mandatory]: | 440 | (*) Request pages be read from cache [mandatory]: |
@@ -526,6 +541,27 @@ FS-Cache provides some utilities that a cache backend may make use of: | |||
526 | error value should be 0 if successful and an error otherwise. | 541 | error value should be 0 if successful and an error otherwise. |
527 | 542 | ||
528 | 543 | ||
544 | (*) Record that one or more pages being retrieved or allocated have been dealt | ||
545 | with: | ||
546 | |||
547 | void fscache_retrieval_complete(struct fscache_retrieval *op, | ||
548 | int n_pages); | ||
549 | |||
550 | This is called to record the fact that one or more pages have been dealt | ||
551 | with and are no longer the concern of this operation. When the number of | ||
552 | pages remaining in the operation reaches 0, the operation will be | ||
553 | completed. | ||
554 | |||
555 | |||
556 | (*) Record operation completion: | ||
557 | |||
558 | void fscache_op_complete(struct fscache_operation *op); | ||
559 | |||
560 | This is called to record the completion of an operation. This deducts | ||
561 | this operation from the parent object's run state, potentially permitting | ||
562 | one or more pending operations to start running. | ||
563 | |||
564 | |||
529 | (*) Set highest store limit: | 565 | (*) Set highest store limit: |
530 | 566 | ||
531 | void fscache_set_store_limit(struct fscache_object *object, | 567 | void fscache_set_store_limit(struct fscache_object *object, |
diff --git a/Documentation/filesystems/caching/netfs-api.txt b/Documentation/filesystems/caching/netfs-api.txt index 7cc6bf2871eb..97e6c0ecc5ef 100644 --- a/Documentation/filesystems/caching/netfs-api.txt +++ b/Documentation/filesystems/caching/netfs-api.txt | |||
@@ -35,8 +35,9 @@ This document contains the following sections: | |||
35 | (12) Index and data file update | 35 | (12) Index and data file update |
36 | (13) Miscellaneous cookie operations | 36 | (13) Miscellaneous cookie operations |
37 | (14) Cookie unregistration | 37 | (14) Cookie unregistration |
38 | (15) Index and data file invalidation | 38 | (15) Index invalidation |
39 | (16) FS-Cache specific page flags. | 39 | (16) Data file invalidation |
40 | (17) FS-Cache specific page flags. | ||
40 | 41 | ||
41 | 42 | ||
42 | ============================= | 43 | ============================= |
@@ -767,13 +768,42 @@ the cookies for "child" indices, objects and pages have been relinquished | |||
767 | first. | 768 | first. |
768 | 769 | ||
769 | 770 | ||
770 | ================================ | 771 | ================== |
771 | INDEX AND DATA FILE INVALIDATION | 772 | INDEX INVALIDATION |
772 | ================================ | 773 | ================== |
774 | |||
775 | There is no direct way to invalidate an index subtree. To do this, the caller | ||
776 | should relinquish and retire the cookie they have, and then acquire a new one. | ||
777 | |||
778 | |||
779 | ====================== | ||
780 | DATA FILE INVALIDATION | ||
781 | ====================== | ||
782 | |||
783 | Sometimes it will be necessary to invalidate an object that contains data. | ||
784 | Typically this will be necessary when the server tells the netfs of a foreign | ||
785 | change - at which point the netfs has to throw away all the state it had for an | ||
786 | inode and reload from the server. | ||
787 | |||
788 | To indicate that a cache object should be invalidated, the following function | ||
789 | can be called: | ||
790 | |||
791 | void fscache_invalidate(struct fscache_cookie *cookie); | ||
792 | |||
793 | This can be called with spinlocks held as it defers the work to a thread pool. | ||
794 | All extant storage, retrieval and attribute change ops at this point are | ||
795 | cancelled and discarded. Some future operations will be rejected until the | ||
796 | cache has had a chance to insert a barrier in the operations queue. After | ||
797 | that, operations will be queued again behind the invalidation operation. | ||
798 | |||
799 | The invalidation operation will perform an attribute change operation and an | ||
800 | auxiliary data update operation as it is very likely these will have changed. | ||
801 | |||
802 | Using the following function, the netfs can wait for the invalidation operation | ||
803 | to have reached a point at which it can start submitting ordinary operations | ||
804 | once again: | ||
773 | 805 | ||
774 | There is no direct way to invalidate an index subtree or a data file. To do | 806 | void fscache_wait_on_invalidate(struct fscache_cookie *cookie); |
775 | this, the caller should relinquish and retire the cookie they have, and then | ||
776 | acquire a new one. | ||
777 | 807 | ||
778 | 808 | ||
779 | =========================== | 809 | =========================== |
diff --git a/Documentation/filesystems/caching/object.txt b/Documentation/filesystems/caching/object.txt index 58313348da87..100ff41127e4 100644 --- a/Documentation/filesystems/caching/object.txt +++ b/Documentation/filesystems/caching/object.txt | |||
@@ -216,7 +216,14 @@ servicing netfs requests: | |||
216 | The normal running state. In this state, requests the netfs makes will be | 216 | The normal running state. In this state, requests the netfs makes will be |
217 | passed on to the cache. | 217 | passed on to the cache. |
218 | 218 | ||
219 | (6) State FSCACHE_OBJECT_UPDATING. | 219 | (6) State FSCACHE_OBJECT_INVALIDATING. |
220 | |||
221 | The object is undergoing invalidation. When the state comes here, it | ||
222 | discards all pending read, write and attribute change operations as it is | ||
223 | going to clear out the cache entirely and reinitialise it. It will then | ||
224 | continue to the FSCACHE_OBJECT_UPDATING state. | ||
225 | |||
226 | (7) State FSCACHE_OBJECT_UPDATING. | ||
220 | 227 | ||
221 | The state machine comes here to update the object in the cache from the | 228 | The state machine comes here to update the object in the cache from the |
222 | netfs's records. This involves updating the auxiliary data that is used | 229 | netfs's records. This involves updating the auxiliary data that is used |
@@ -225,13 +232,13 @@ servicing netfs requests: | |||
225 | And there are terminal states in which an object cleans itself up, deallocates | 232 | And there are terminal states in which an object cleans itself up, deallocates |
226 | memory and potentially deletes stuff from disk: | 233 | memory and potentially deletes stuff from disk: |
227 | 234 | ||
228 | (7) State FSCACHE_OBJECT_LC_DYING. | 235 | (8) State FSCACHE_OBJECT_LC_DYING. |
229 | 236 | ||
230 | The object comes here if it is dying because of a lookup or creation | 237 | The object comes here if it is dying because of a lookup or creation |
231 | error. This would be due to a disk error or system error of some sort. | 238 | error. This would be due to a disk error or system error of some sort. |
232 | Temporary data is cleaned up, and the parent is released. | 239 | Temporary data is cleaned up, and the parent is released. |
233 | 240 | ||
234 | (8) State FSCACHE_OBJECT_DYING. | 241 | (9) State FSCACHE_OBJECT_DYING. |
235 | 242 | ||
236 | The object comes here if it is dying due to an error, because its parent | 243 | The object comes here if it is dying due to an error, because its parent |
237 | cookie has been relinquished by the netfs or because the cache is being | 244 | cookie has been relinquished by the netfs or because the cache is being |
@@ -241,27 +248,27 @@ memory and potentially deletes stuff from disk: | |||
241 | can destroy themselves. This object waits for all its children to go away | 248 | can destroy themselves. This object waits for all its children to go away |
242 | before advancing to the next state. | 249 | before advancing to the next state. |
243 | 250 | ||
244 | (9) State FSCACHE_OBJECT_ABORT_INIT. | 251 | (10) State FSCACHE_OBJECT_ABORT_INIT. |
245 | 252 | ||
246 | The object comes to this state if it was waiting on its parent in | 253 | The object comes to this state if it was waiting on its parent in |
247 | FSCACHE_OBJECT_INIT, but its parent died. The object will destroy itself | 254 | FSCACHE_OBJECT_INIT, but its parent died. The object will destroy itself |
248 | so that the parent may proceed from the FSCACHE_OBJECT_DYING state. | 255 | so that the parent may proceed from the FSCACHE_OBJECT_DYING state. |
249 | 256 | ||
250 | (10) State FSCACHE_OBJECT_RELEASING. | 257 | (11) State FSCACHE_OBJECT_RELEASING. |
251 | (11) State FSCACHE_OBJECT_RECYCLING. | 258 | (12) State FSCACHE_OBJECT_RECYCLING. |
252 | 259 | ||
253 | The object comes to one of these two states when dying once it is rid of | 260 | The object comes to one of these two states when dying once it is rid of |
254 | all its children, if it is dying because the netfs relinquished its | 261 | all its children, if it is dying because the netfs relinquished its |
255 | cookie. In the first state, the cached data is expected to persist, and | 262 | cookie. In the first state, the cached data is expected to persist, and |
256 | in the second it will be deleted. | 263 | in the second it will be deleted. |
257 | 264 | ||
258 | (12) State FSCACHE_OBJECT_WITHDRAWING. | 265 | (13) State FSCACHE_OBJECT_WITHDRAWING. |
259 | 266 | ||
260 | The object transits to this state if the cache decides it wants to | 267 | The object transits to this state if the cache decides it wants to |
261 | withdraw the object from service, perhaps to make space, but also due to | 268 | withdraw the object from service, perhaps to make space, but also due to |
262 | error or just because the whole cache is being withdrawn. | 269 | error or just because the whole cache is being withdrawn. |
263 | 270 | ||
264 | (13) State FSCACHE_OBJECT_DEAD. | 271 | (14) State FSCACHE_OBJECT_DEAD. |
265 | 272 | ||
266 | The object transits to this state when the in-memory object record is | 273 | The object transits to this state when the in-memory object record is |
267 | ready to be deleted. The object processor shouldn't ever see an object in | 274 | ready to be deleted. The object processor shouldn't ever see an object in |
diff --git a/Documentation/filesystems/caching/operations.txt b/Documentation/filesystems/caching/operations.txt index b6b070c57cbf..bee2a5f93d60 100644 --- a/Documentation/filesystems/caching/operations.txt +++ b/Documentation/filesystems/caching/operations.txt | |||
@@ -174,7 +174,7 @@ Operations are used through the following procedure: | |||
174 | necessary (the object might have died whilst the thread was waiting). | 174 | necessary (the object might have died whilst the thread was waiting). |
175 | 175 | ||
176 | When it has finished doing its processing, it should call | 176 | When it has finished doing its processing, it should call |
177 | fscache_put_operation() on it. | 177 | fscache_op_complete() and fscache_put_operation() on it. |
178 | 178 | ||
179 | (4) The operation holds an effective lock upon the object, preventing other | 179 | (4) The operation holds an effective lock upon the object, preventing other |
180 | exclusive ops conflicting until it is released. The operation can be | 180 | exclusive ops conflicting until it is released. The operation can be |
diff --git a/Documentation/filesystems/efivarfs.txt b/Documentation/filesystems/efivarfs.txt new file mode 100644 index 000000000000..c477af086e65 --- /dev/null +++ b/Documentation/filesystems/efivarfs.txt | |||
@@ -0,0 +1,16 @@ | |||
1 | |||
2 | efivarfs - a (U)EFI variable filesystem | ||
3 | |||
4 | The efivarfs filesystem was created to address the shortcomings of | ||
5 | using entries in sysfs to maintain EFI variables. The old sysfs EFI | ||
6 | variables code only supported variables of up to 1024 bytes. This | ||
7 | limitation existed in version 0.99 of the EFI specification, but was | ||
8 | removed before any full releases. Since variables can now be larger | ||
9 | than a single page, sysfs isn't the best interface for this. | ||
10 | |||
11 | Variables can be created, deleted and modified with the efivarfs | ||
12 | filesystem. | ||
13 | |||
14 | efivarfs is typically mounted like this, | ||
15 | |||
16 | mount -t efivarfs none /sys/firmware/efi/efivars | ||
diff --git a/Documentation/filesystems/ext4.txt b/Documentation/filesystems/ext4.txt index 104322bf378c..34ea4f1fa6ea 100644 --- a/Documentation/filesystems/ext4.txt +++ b/Documentation/filesystems/ext4.txt | |||
@@ -200,12 +200,9 @@ inode_readahead_blks=n This tuning parameter controls the maximum | |||
200 | table readahead algorithm will pre-read into | 200 | table readahead algorithm will pre-read into |
201 | the buffer cache. The default value is 32 blocks. | 201 | the buffer cache. The default value is 32 blocks. |
202 | 202 | ||
203 | nouser_xattr Disables Extended User Attributes. If you have extended | 203 | nouser_xattr Disables Extended User Attributes. See the |
204 | attribute support enabled in the kernel configuration | 204 | attr(5) manual page and http://acl.bestbits.at/ |
205 | (CONFIG_EXT4_FS_XATTR), extended attribute support | 205 | for more information about extended attributes. |
206 | is enabled by default on mount. See the attr(5) manual | ||
207 | page and http://acl.bestbits.at/ for more information | ||
208 | about extended attributes. | ||
209 | 206 | ||
210 | noacl This option disables POSIX Access Control List | 207 | noacl This option disables POSIX Access Control List |
211 | support. If ACL support is enabled in the kernel | 208 | support. If ACL support is enabled in the kernel |
diff --git a/Documentation/filesystems/f2fs.txt b/Documentation/filesystems/f2fs.txt new file mode 100644 index 000000000000..8fbd8b46ee34 --- /dev/null +++ b/Documentation/filesystems/f2fs.txt | |||
@@ -0,0 +1,421 @@ | |||
1 | ================================================================================ | ||
2 | WHAT IS Flash-Friendly File System (F2FS)? | ||
3 | ================================================================================ | ||
4 | |||
5 | NAND flash memory-based storage devices, such as SSD, eMMC, and SD cards, have | ||
6 | been equipped on a variety systems ranging from mobile to server systems. Since | ||
7 | they are known to have different characteristics from the conventional rotating | ||
8 | disks, a file system, an upper layer to the storage device, should adapt to the | ||
9 | changes from the sketch in the design level. | ||
10 | |||
11 | F2FS is a file system exploiting NAND flash memory-based storage devices, which | ||
12 | is based on Log-structured File System (LFS). The design has been focused on | ||
13 | addressing the fundamental issues in LFS, which are snowball effect of wandering | ||
14 | tree and high cleaning overhead. | ||
15 | |||
16 | Since a NAND flash memory-based storage device shows different characteristic | ||
17 | according to its internal geometry or flash memory management scheme, namely FTL, | ||
18 | F2FS and its tools support various parameters not only for configuring on-disk | ||
19 | layout, but also for selecting allocation and cleaning algorithms. | ||
20 | |||
21 | The file system formatting tool, "mkfs.f2fs", is available from the following | ||
22 | git tree: | ||
23 | >> git://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs-tools.git | ||
24 | |||
25 | For reporting bugs and sending patches, please use the following mailing list: | ||
26 | >> linux-f2fs-devel@lists.sourceforge.net | ||
27 | |||
28 | ================================================================================ | ||
29 | BACKGROUND AND DESIGN ISSUES | ||
30 | ================================================================================ | ||
31 | |||
32 | Log-structured File System (LFS) | ||
33 | -------------------------------- | ||
34 | "A log-structured file system writes all modifications to disk sequentially in | ||
35 | a log-like structure, thereby speeding up both file writing and crash recovery. | ||
36 | The log is the only structure on disk; it contains indexing information so that | ||
37 | files can be read back from the log efficiently. In order to maintain large free | ||
38 | areas on disk for fast writing, we divide the log into segments and use a | ||
39 | segment cleaner to compress the live information from heavily fragmented | ||
40 | segments." from Rosenblum, M. and Ousterhout, J. K., 1992, "The design and | ||
41 | implementation of a log-structured file system", ACM Trans. Computer Systems | ||
42 | 10, 1, 26–52. | ||
43 | |||
44 | Wandering Tree Problem | ||
45 | ---------------------- | ||
46 | In LFS, when a file data is updated and written to the end of log, its direct | ||
47 | pointer block is updated due to the changed location. Then the indirect pointer | ||
48 | block is also updated due to the direct pointer block update. In this manner, | ||
49 | the upper index structures such as inode, inode map, and checkpoint block are | ||
50 | also updated recursively. This problem is called as wandering tree problem [1], | ||
51 | and in order to enhance the performance, it should eliminate or relax the update | ||
52 | propagation as much as possible. | ||
53 | |||
54 | [1] Bityutskiy, A. 2005. JFFS3 design issues. http://www.linux-mtd.infradead.org/ | ||
55 | |||
56 | Cleaning Overhead | ||
57 | ----------------- | ||
58 | Since LFS is based on out-of-place writes, it produces so many obsolete blocks | ||
59 | scattered across the whole storage. In order to serve new empty log space, it | ||
60 | needs to reclaim these obsolete blocks seamlessly to users. This job is called | ||
61 | as a cleaning process. | ||
62 | |||
63 | The process consists of three operations as follows. | ||
64 | 1. A victim segment is selected through referencing segment usage table. | ||
65 | 2. It loads parent index structures of all the data in the victim identified by | ||
66 | segment summary blocks. | ||
67 | 3. It checks the cross-reference between the data and its parent index structure. | ||
68 | 4. It moves valid data selectively. | ||
69 | |||
70 | This cleaning job may cause unexpected long delays, so the most important goal | ||
71 | is to hide the latencies to users. And also definitely, it should reduce the | ||
72 | amount of valid data to be moved, and move them quickly as well. | ||
73 | |||
74 | ================================================================================ | ||
75 | KEY FEATURES | ||
76 | ================================================================================ | ||
77 | |||
78 | Flash Awareness | ||
79 | --------------- | ||
80 | - Enlarge the random write area for better performance, but provide the high | ||
81 | spatial locality | ||
82 | - Align FS data structures to the operational units in FTL as best efforts | ||
83 | |||
84 | Wandering Tree Problem | ||
85 | ---------------------- | ||
86 | - Use a term, “node”, that represents inodes as well as various pointer blocks | ||
87 | - Introduce Node Address Table (NAT) containing the locations of all the “node” | ||
88 | blocks; this will cut off the update propagation. | ||
89 | |||
90 | Cleaning Overhead | ||
91 | ----------------- | ||
92 | - Support a background cleaning process | ||
93 | - Support greedy and cost-benefit algorithms for victim selection policies | ||
94 | - Support multi-head logs for static/dynamic hot and cold data separation | ||
95 | - Introduce adaptive logging for efficient block allocation | ||
96 | |||
97 | ================================================================================ | ||
98 | MOUNT OPTIONS | ||
99 | ================================================================================ | ||
100 | |||
101 | background_gc_off Turn off cleaning operations, namely garbage collection, | ||
102 | triggered in background when I/O subsystem is idle. | ||
103 | disable_roll_forward Disable the roll-forward recovery routine | ||
104 | discard Issue discard/TRIM commands when a segment is cleaned. | ||
105 | no_heap Disable heap-style segment allocation which finds free | ||
106 | segments for data from the beginning of main area, while | ||
107 | for node from the end of main area. | ||
108 | nouser_xattr Disable Extended User Attributes. Note: xattr is enabled | ||
109 | by default if CONFIG_F2FS_FS_XATTR is selected. | ||
110 | noacl Disable POSIX Access Control List. Note: acl is enabled | ||
111 | by default if CONFIG_F2FS_FS_POSIX_ACL is selected. | ||
112 | active_logs=%u Support configuring the number of active logs. In the | ||
113 | current design, f2fs supports only 2, 4, and 6 logs. | ||
114 | Default number is 6. | ||
115 | disable_ext_identify Disable the extension list configured by mkfs, so f2fs | ||
116 | does not aware of cold files such as media files. | ||
117 | |||
118 | ================================================================================ | ||
119 | DEBUGFS ENTRIES | ||
120 | ================================================================================ | ||
121 | |||
122 | /sys/kernel/debug/f2fs/ contains information about all the partitions mounted as | ||
123 | f2fs. Each file shows the whole f2fs information. | ||
124 | |||
125 | /sys/kernel/debug/f2fs/status includes: | ||
126 | - major file system information managed by f2fs currently | ||
127 | - average SIT information about whole segments | ||
128 | - current memory footprint consumed by f2fs. | ||
129 | |||
130 | ================================================================================ | ||
131 | USAGE | ||
132 | ================================================================================ | ||
133 | |||
134 | 1. Download userland tools and compile them. | ||
135 | |||
136 | 2. Skip, if f2fs was compiled statically inside kernel. | ||
137 | Otherwise, insert the f2fs.ko module. | ||
138 | # insmod f2fs.ko | ||
139 | |||
140 | 3. Create a directory trying to mount | ||
141 | # mkdir /mnt/f2fs | ||
142 | |||
143 | 4. Format the block device, and then mount as f2fs | ||
144 | # mkfs.f2fs -l label /dev/block_device | ||
145 | # mount -t f2fs /dev/block_device /mnt/f2fs | ||
146 | |||
147 | Format options | ||
148 | -------------- | ||
149 | -l [label] : Give a volume label, up to 256 unicode name. | ||
150 | -a [0 or 1] : Split start location of each area for heap-based allocation. | ||
151 | 1 is set by default, which performs this. | ||
152 | -o [int] : Set overprovision ratio in percent over volume size. | ||
153 | 5 is set by default. | ||
154 | -s [int] : Set the number of segments per section. | ||
155 | 1 is set by default. | ||
156 | -z [int] : Set the number of sections per zone. | ||
157 | 1 is set by default. | ||
158 | -e [str] : Set basic extension list. e.g. "mp3,gif,mov" | ||
159 | |||
160 | ================================================================================ | ||
161 | DESIGN | ||
162 | ================================================================================ | ||
163 | |||
164 | On-disk Layout | ||
165 | -------------- | ||
166 | |||
167 | F2FS divides the whole volume into a number of segments, each of which is fixed | ||
168 | to 2MB in size. A section is composed of consecutive segments, and a zone | ||
169 | consists of a set of sections. By default, section and zone sizes are set to one | ||
170 | segment size identically, but users can easily modify the sizes by mkfs. | ||
171 | |||
172 | F2FS splits the entire volume into six areas, and all the areas except superblock | ||
173 | consists of multiple segments as described below. | ||
174 | |||
175 | align with the zone size <-| | ||
176 | |-> align with the segment size | ||
177 | _________________________________________________________________________ | ||
178 | | | | Node | Segment | Segment | | | ||
179 | | Superblock | Checkpoint | Address | Info. | Summary | Main | | ||
180 | | (SB) | (CP) | Table (NAT) | Table (SIT) | Area (SSA) | | | ||
181 | |____________|_____2______|______N______|______N______|______N_____|__N___| | ||
182 | . . | ||
183 | . . | ||
184 | . . | ||
185 | ._________________________________________. | ||
186 | |_Segment_|_..._|_Segment_|_..._|_Segment_| | ||
187 | . . | ||
188 | ._________._________ | ||
189 | |_section_|__...__|_ | ||
190 | . . | ||
191 | .________. | ||
192 | |__zone__| | ||
193 | |||
194 | - Superblock (SB) | ||
195 | : It is located at the beginning of the partition, and there exist two copies | ||
196 | to avoid file system crash. It contains basic partition information and some | ||
197 | default parameters of f2fs. | ||
198 | |||
199 | - Checkpoint (CP) | ||
200 | : It contains file system information, bitmaps for valid NAT/SIT sets, orphan | ||
201 | inode lists, and summary entries of current active segments. | ||
202 | |||
203 | - Node Address Table (NAT) | ||
204 | : It is composed of a block address table for all the node blocks stored in | ||
205 | Main area. | ||
206 | |||
207 | - Segment Information Table (SIT) | ||
208 | : It contains segment information such as valid block count and bitmap for the | ||
209 | validity of all the blocks. | ||
210 | |||
211 | - Segment Summary Area (SSA) | ||
212 | : It contains summary entries which contains the owner information of all the | ||
213 | data and node blocks stored in Main area. | ||
214 | |||
215 | - Main Area | ||
216 | : It contains file and directory data including their indices. | ||
217 | |||
218 | In order to avoid misalignment between file system and flash-based storage, F2FS | ||
219 | aligns the start block address of CP with the segment size. Also, it aligns the | ||
220 | start block address of Main area with the zone size by reserving some segments | ||
221 | in SSA area. | ||
222 | |||
223 | Reference the following survey for additional technical details. | ||
224 | https://wiki.linaro.org/WorkingGroups/Kernel/Projects/FlashCardSurvey | ||
225 | |||
226 | File System Metadata Structure | ||
227 | ------------------------------ | ||
228 | |||
229 | F2FS adopts the checkpointing scheme to maintain file system consistency. At | ||
230 | mount time, F2FS first tries to find the last valid checkpoint data by scanning | ||
231 | CP area. In order to reduce the scanning time, F2FS uses only two copies of CP. | ||
232 | One of them always indicates the last valid data, which is called as shadow copy | ||
233 | mechanism. In addition to CP, NAT and SIT also adopt the shadow copy mechanism. | ||
234 | |||
235 | For file system consistency, each CP points to which NAT and SIT copies are | ||
236 | valid, as shown as below. | ||
237 | |||
238 | +--------+----------+---------+ | ||
239 | | CP | NAT | SIT | | ||
240 | +--------+----------+---------+ | ||
241 | . . . . | ||
242 | . . . . | ||
243 | . . . . | ||
244 | +-------+-------+--------+--------+--------+--------+ | ||
245 | | CP #0 | CP #1 | NAT #0 | NAT #1 | SIT #0 | SIT #1 | | ||
246 | +-------+-------+--------+--------+--------+--------+ | ||
247 | | ^ ^ | ||
248 | | | | | ||
249 | `----------------------------------------' | ||
250 | |||
251 | Index Structure | ||
252 | --------------- | ||
253 | |||
254 | The key data structure to manage the data locations is a "node". Similar to | ||
255 | traditional file structures, F2FS has three types of node: inode, direct node, | ||
256 | indirect node. F2FS assigns 4KB to an inode block which contains 923 data block | ||
257 | indices, two direct node pointers, two indirect node pointers, and one double | ||
258 | indirect node pointer as described below. One direct node block contains 1018 | ||
259 | data blocks, and one indirect node block contains also 1018 node blocks. Thus, | ||
260 | one inode block (i.e., a file) covers: | ||
261 | |||
262 | 4KB * (923 + 2 * 1018 + 2 * 1018 * 1018 + 1018 * 1018 * 1018) := 3.94TB. | ||
263 | |||
264 | Inode block (4KB) | ||
265 | |- data (923) | ||
266 | |- direct node (2) | ||
267 | | `- data (1018) | ||
268 | |- indirect node (2) | ||
269 | | `- direct node (1018) | ||
270 | | `- data (1018) | ||
271 | `- double indirect node (1) | ||
272 | `- indirect node (1018) | ||
273 | `- direct node (1018) | ||
274 | `- data (1018) | ||
275 | |||
276 | Note that, all the node blocks are mapped by NAT which means the location of | ||
277 | each node is translated by the NAT table. In the consideration of the wandering | ||
278 | tree problem, F2FS is able to cut off the propagation of node updates caused by | ||
279 | leaf data writes. | ||
280 | |||
281 | Directory Structure | ||
282 | ------------------- | ||
283 | |||
284 | A directory entry occupies 11 bytes, which consists of the following attributes. | ||
285 | |||
286 | - hash hash value of the file name | ||
287 | - ino inode number | ||
288 | - len the length of file name | ||
289 | - type file type such as directory, symlink, etc | ||
290 | |||
291 | A dentry block consists of 214 dentry slots and file names. Therein a bitmap is | ||
292 | used to represent whether each dentry is valid or not. A dentry block occupies | ||
293 | 4KB with the following composition. | ||
294 | |||
295 | Dentry Block(4 K) = bitmap (27 bytes) + reserved (3 bytes) + | ||
296 | dentries(11 * 214 bytes) + file name (8 * 214 bytes) | ||
297 | |||
298 | [Bucket] | ||
299 | +--------------------------------+ | ||
300 | |dentry block 1 | dentry block 2 | | ||
301 | +--------------------------------+ | ||
302 | . . | ||
303 | . . | ||
304 | . [Dentry Block Structure: 4KB] . | ||
305 | +--------+----------+----------+------------+ | ||
306 | | bitmap | reserved | dentries | file names | | ||
307 | +--------+----------+----------+------------+ | ||
308 | [Dentry Block: 4KB] . . | ||
309 | . . | ||
310 | . . | ||
311 | +------+------+-----+------+ | ||
312 | | hash | ino | len | type | | ||
313 | +------+------+-----+------+ | ||
314 | [Dentry Structure: 11 bytes] | ||
315 | |||
316 | F2FS implements multi-level hash tables for directory structure. Each level has | ||
317 | a hash table with dedicated number of hash buckets as shown below. Note that | ||
318 | "A(2B)" means a bucket includes 2 data blocks. | ||
319 | |||
320 | ---------------------- | ||
321 | A : bucket | ||
322 | B : block | ||
323 | N : MAX_DIR_HASH_DEPTH | ||
324 | ---------------------- | ||
325 | |||
326 | level #0 | A(2B) | ||
327 | | | ||
328 | level #1 | A(2B) - A(2B) | ||
329 | | | ||
330 | level #2 | A(2B) - A(2B) - A(2B) - A(2B) | ||
331 | . | . . . . | ||
332 | level #N/2 | A(2B) - A(2B) - A(2B) - A(2B) - A(2B) - ... - A(2B) | ||
333 | . | . . . . | ||
334 | level #N | A(4B) - A(4B) - A(4B) - A(4B) - A(4B) - ... - A(4B) | ||
335 | |||
336 | The number of blocks and buckets are determined by, | ||
337 | |||
338 | ,- 2, if n < MAX_DIR_HASH_DEPTH / 2, | ||
339 | # of blocks in level #n = | | ||
340 | `- 4, Otherwise | ||
341 | |||
342 | ,- 2^n, if n < MAX_DIR_HASH_DEPTH / 2, | ||
343 | # of buckets in level #n = | | ||
344 | `- 2^((MAX_DIR_HASH_DEPTH / 2) - 1), Otherwise | ||
345 | |||
346 | When F2FS finds a file name in a directory, at first a hash value of the file | ||
347 | name is calculated. Then, F2FS scans the hash table in level #0 to find the | ||
348 | dentry consisting of the file name and its inode number. If not found, F2FS | ||
349 | scans the next hash table in level #1. In this way, F2FS scans hash tables in | ||
350 | each levels incrementally from 1 to N. In each levels F2FS needs to scan only | ||
351 | one bucket determined by the following equation, which shows O(log(# of files)) | ||
352 | complexity. | ||
353 | |||
354 | bucket number to scan in level #n = (hash value) % (# of buckets in level #n) | ||
355 | |||
356 | In the case of file creation, F2FS finds empty consecutive slots that cover the | ||
357 | file name. F2FS searches the empty slots in the hash tables of whole levels from | ||
358 | 1 to N in the same way as the lookup operation. | ||
359 | |||
360 | The following figure shows an example of two cases holding children. | ||
361 | --------------> Dir <-------------- | ||
362 | | | | ||
363 | child child | ||
364 | |||
365 | child - child [hole] - child | ||
366 | |||
367 | child - child - child [hole] - [hole] - child | ||
368 | |||
369 | Case 1: Case 2: | ||
370 | Number of children = 6, Number of children = 3, | ||
371 | File size = 7 File size = 7 | ||
372 | |||
373 | Default Block Allocation | ||
374 | ------------------------ | ||
375 | |||
376 | At runtime, F2FS manages six active logs inside "Main" area: Hot/Warm/Cold node | ||
377 | and Hot/Warm/Cold data. | ||
378 | |||
379 | - Hot node contains direct node blocks of directories. | ||
380 | - Warm node contains direct node blocks except hot node blocks. | ||
381 | - Cold node contains indirect node blocks | ||
382 | - Hot data contains dentry blocks | ||
383 | - Warm data contains data blocks except hot and cold data blocks | ||
384 | - Cold data contains multimedia data or migrated data blocks | ||
385 | |||
386 | LFS has two schemes for free space management: threaded log and copy-and-compac- | ||
387 | tion. The copy-and-compaction scheme which is known as cleaning, is well-suited | ||
388 | for devices showing very good sequential write performance, since free segments | ||
389 | are served all the time for writing new data. However, it suffers from cleaning | ||
390 | overhead under high utilization. Contrarily, the threaded log scheme suffers | ||
391 | from random writes, but no cleaning process is needed. F2FS adopts a hybrid | ||
392 | scheme where the copy-and-compaction scheme is adopted by default, but the | ||
393 | policy is dynamically changed to the threaded log scheme according to the file | ||
394 | system status. | ||
395 | |||
396 | In order to align F2FS with underlying flash-based storage, F2FS allocates a | ||
397 | segment in a unit of section. F2FS expects that the section size would be the | ||
398 | same as the unit size of garbage collection in FTL. Furthermore, with respect | ||
399 | to the mapping granularity in FTL, F2FS allocates each section of the active | ||
400 | logs from different zones as much as possible, since FTL can write the data in | ||
401 | the active logs into one allocation unit according to its mapping granularity. | ||
402 | |||
403 | Cleaning process | ||
404 | ---------------- | ||
405 | |||
406 | F2FS does cleaning both on demand and in the background. On-demand cleaning is | ||
407 | triggered when there are not enough free segments to serve VFS calls. Background | ||
408 | cleaner is operated by a kernel thread, and triggers the cleaning job when the | ||
409 | system is idle. | ||
410 | |||
411 | F2FS supports two victim selection policies: greedy and cost-benefit algorithms. | ||
412 | In the greedy algorithm, F2FS selects a victim segment having the smallest number | ||
413 | of valid blocks. In the cost-benefit algorithm, F2FS selects a victim segment | ||
414 | according to the segment age and the number of valid blocks in order to address | ||
415 | log block thrashing problem in the greedy algorithm. F2FS adopts the greedy | ||
416 | algorithm for on-demand cleaner, while background cleaner adopts cost-benefit | ||
417 | algorithm. | ||
418 | |||
419 | In order to identify whether the data in the victim segment are valid or not, | ||
420 | F2FS manages a bitmap. Each bit represents the validity of a block, and the | ||
421 | bitmap is composed of a bit stream covering whole blocks in main area. | ||
diff --git a/Documentation/filesystems/nfs/nfs41-server.txt b/Documentation/filesystems/nfs/nfs41-server.txt index 092fad92a3f0..01c2db769791 100644 --- a/Documentation/filesystems/nfs/nfs41-server.txt +++ b/Documentation/filesystems/nfs/nfs41-server.txt | |||
@@ -39,21 +39,10 @@ interoperability problems with future clients. Known issues: | |||
39 | from a linux client are possible, but we aren't really | 39 | from a linux client are possible, but we aren't really |
40 | conformant with the spec (for example, we don't use kerberos | 40 | conformant with the spec (for example, we don't use kerberos |
41 | on the backchannel correctly). | 41 | on the backchannel correctly). |
42 | - Incomplete backchannel support: incomplete backchannel gss | ||
43 | support and no support for BACKCHANNEL_CTL mean that | ||
44 | callbacks (hence delegations and layouts) may not be | ||
45 | available and clients confused by the incomplete | ||
46 | implementation may fail. | ||
47 | - We do not support SSV, which provides security for shared | 42 | - We do not support SSV, which provides security for shared |
48 | client-server state (thus preventing unauthorized tampering | 43 | client-server state (thus preventing unauthorized tampering |
49 | with locks and opens, for example). It is mandatory for | 44 | with locks and opens, for example). It is mandatory for |
50 | servers to support this, though no clients use it yet. | 45 | servers to support this, though no clients use it yet. |
51 | - Mandatory operations which we do not support, such as | ||
52 | DESTROY_CLIENTID, are not currently used by clients, but will be | ||
53 | (and the spec recommends their uses in common cases), and | ||
54 | clients should not be expected to know how to recover from the | ||
55 | case where they are not supported. This will eventually cause | ||
56 | interoperability failures. | ||
57 | 46 | ||
58 | In addition, some limitations are inherited from the current NFSv4 | 47 | In addition, some limitations are inherited from the current NFSv4 |
59 | implementation: | 48 | implementation: |
@@ -89,7 +78,7 @@ Operations | |||
89 | | | MNI | or OPT) | | | 78 | | | MNI | or OPT) | | |
90 | +----------------------+------------+--------------+----------------+ | 79 | +----------------------+------------+--------------+----------------+ |
91 | | ACCESS | REQ | | Section 18.1 | | 80 | | ACCESS | REQ | | Section 18.1 | |
92 | NS | BACKCHANNEL_CTL | REQ | | Section 18.33 | | 81 | I | BACKCHANNEL_CTL | REQ | | Section 18.33 | |
93 | I | BIND_CONN_TO_SESSION | REQ | | Section 18.34 | | 82 | I | BIND_CONN_TO_SESSION | REQ | | Section 18.34 | |
94 | | CLOSE | REQ | | Section 18.2 | | 83 | | CLOSE | REQ | | Section 18.2 | |
95 | | COMMIT | REQ | | Section 18.3 | | 84 | | COMMIT | REQ | | Section 18.3 | |
@@ -99,7 +88,7 @@ NS*| DELEGPURGE | OPT | FDELG (REQ) | Section 18.5 | | |||
99 | | DELEGRETURN | OPT | FDELG, | Section 18.6 | | 88 | | DELEGRETURN | OPT | FDELG, | Section 18.6 | |
100 | | | | DDELG, pNFS | | | 89 | | | | DDELG, pNFS | | |
101 | | | | (REQ) | | | 90 | | | | (REQ) | | |
102 | NS | DESTROY_CLIENTID | REQ | | Section 18.50 | | 91 | I | DESTROY_CLIENTID | REQ | | Section 18.50 | |
103 | I | DESTROY_SESSION | REQ | | Section 18.37 | | 92 | I | DESTROY_SESSION | REQ | | Section 18.37 | |
104 | I | EXCHANGE_ID | REQ | | Section 18.35 | | 93 | I | EXCHANGE_ID | REQ | | Section 18.35 | |
105 | I | FREE_STATEID | REQ | | Section 18.38 | | 94 | I | FREE_STATEID | REQ | | Section 18.38 | |
@@ -192,7 +181,6 @@ EXCHANGE_ID: | |||
192 | 181 | ||
193 | CREATE_SESSION: | 182 | CREATE_SESSION: |
194 | * backchannel attributes are ignored | 183 | * backchannel attributes are ignored |
195 | * backchannel security parameters are ignored | ||
196 | 184 | ||
197 | SEQUENCE: | 185 | SEQUENCE: |
198 | * no support for dynamic slot table renegotiation (optional) | 186 | * no support for dynamic slot table renegotiation (optional) |
@@ -202,7 +190,7 @@ Nonstandard compound limitations: | |||
202 | ca_maxrequestsize request and a ca_maxresponsesize reply, so we may | 190 | ca_maxrequestsize request and a ca_maxresponsesize reply, so we may |
203 | fail to live up to the promise we made in CREATE_SESSION fore channel | 191 | fail to live up to the promise we made in CREATE_SESSION fore channel |
204 | negotiation. | 192 | negotiation. |
205 | * No more than one IO operation (read, write, readdir) allowed per | 193 | * No more than one read-like operation allowed per compound; encoding |
206 | compound. | 194 | replies that cross page boundaries (except for read data) not handled. |
207 | 195 | ||
208 | See also http://wiki.linux-nfs.org/wiki/index.php/Server_4.0_and_4.1_issues. | 196 | See also http://wiki.linux-nfs.org/wiki/index.php/Server_4.0_and_4.1_issues. |
diff --git a/Documentation/filesystems/porting b/Documentation/filesystems/porting index 0742feebc6e2..0472c31c163b 100644 --- a/Documentation/filesystems/porting +++ b/Documentation/filesystems/porting | |||
@@ -281,7 +281,7 @@ ext2_write_failed and callers for an example. | |||
281 | 281 | ||
282 | [mandatory] | 282 | [mandatory] |
283 | 283 | ||
284 | ->truncate is going away. The whole truncate sequence needs to be | 284 | ->truncate is gone. The whole truncate sequence needs to be |
285 | implemented in ->setattr, which is now mandatory for filesystems | 285 | implemented in ->setattr, which is now mandatory for filesystems |
286 | implementing on-disk size changes. Start with a copy of the old inode_setattr | 286 | implementing on-disk size changes. Start with a copy of the old inode_setattr |
287 | and vmtruncate, and the reorder the vmtruncate + foofs_vmtruncate sequence to | 287 | and vmtruncate, and the reorder the vmtruncate + foofs_vmtruncate sequence to |
diff --git a/Documentation/filesystems/proc.txt b/Documentation/filesystems/proc.txt index a1793d670cd0..fd8d0d594fc7 100644 --- a/Documentation/filesystems/proc.txt +++ b/Documentation/filesystems/proc.txt | |||
@@ -33,7 +33,7 @@ Table of Contents | |||
33 | 2 Modifying System Parameters | 33 | 2 Modifying System Parameters |
34 | 34 | ||
35 | 3 Per-Process Parameters | 35 | 3 Per-Process Parameters |
36 | 3.1 /proc/<pid>/oom_score_adj - Adjust the oom-killer | 36 | 3.1 /proc/<pid>/oom_adj & /proc/<pid>/oom_score_adj - Adjust the oom-killer |
37 | score | 37 | score |
38 | 3.2 /proc/<pid>/oom_score - Display current oom-killer score | 38 | 3.2 /proc/<pid>/oom_score - Display current oom-killer score |
39 | 3.3 /proc/<pid>/io - Display the IO accounting fields | 39 | 3.3 /proc/<pid>/io - Display the IO accounting fields |
@@ -41,6 +41,7 @@ Table of Contents | |||
41 | 3.5 /proc/<pid>/mountinfo - Information about mounts | 41 | 3.5 /proc/<pid>/mountinfo - Information about mounts |
42 | 3.6 /proc/<pid>/comm & /proc/<pid>/task/<tid>/comm | 42 | 3.6 /proc/<pid>/comm & /proc/<pid>/task/<tid>/comm |
43 | 3.7 /proc/<pid>/task/<tid>/children - Information about task children | 43 | 3.7 /proc/<pid>/task/<tid>/children - Information about task children |
44 | 3.8 /proc/<pid>/fdinfo/<fd> - Information about opened file | ||
44 | 45 | ||
45 | 4 Configuring procfs | 46 | 4 Configuring procfs |
46 | 4.1 Mount options | 47 | 4.1 Mount options |
@@ -142,7 +143,7 @@ Table 1-1: Process specific entries in /proc | |||
142 | pagemap Page table | 143 | pagemap Page table |
143 | stack Report full stack trace, enable via CONFIG_STACKTRACE | 144 | stack Report full stack trace, enable via CONFIG_STACKTRACE |
144 | smaps a extension based on maps, showing the memory consumption of | 145 | smaps a extension based on maps, showing the memory consumption of |
145 | each mapping | 146 | each mapping and flags associated with it |
146 | .............................................................................. | 147 | .............................................................................. |
147 | 148 | ||
148 | For example, to get the status information of a process, all you have to do is | 149 | For example, to get the status information of a process, all you have to do is |
@@ -181,6 +182,7 @@ read the file /proc/PID/status: | |||
181 | CapPrm: 0000000000000000 | 182 | CapPrm: 0000000000000000 |
182 | CapEff: 0000000000000000 | 183 | CapEff: 0000000000000000 |
183 | CapBnd: ffffffffffffffff | 184 | CapBnd: ffffffffffffffff |
185 | Seccomp: 0 | ||
184 | voluntary_ctxt_switches: 0 | 186 | voluntary_ctxt_switches: 0 |
185 | nonvoluntary_ctxt_switches: 1 | 187 | nonvoluntary_ctxt_switches: 1 |
186 | 188 | ||
@@ -237,6 +239,7 @@ Table 1-2: Contents of the status files (as of 2.6.30-rc7) | |||
237 | CapPrm bitmap of permitted capabilities | 239 | CapPrm bitmap of permitted capabilities |
238 | CapEff bitmap of effective capabilities | 240 | CapEff bitmap of effective capabilities |
239 | CapBnd bitmap of capabilities bounding set | 241 | CapBnd bitmap of capabilities bounding set |
242 | Seccomp seccomp mode, like prctl(PR_GET_SECCOMP, ...) | ||
240 | Cpus_allowed mask of CPUs on which this process may run | 243 | Cpus_allowed mask of CPUs on which this process may run |
241 | Cpus_allowed_list Same as previous, but in "list format" | 244 | Cpus_allowed_list Same as previous, but in "list format" |
242 | Mems_allowed mask of memory nodes allowed to this process | 245 | Mems_allowed mask of memory nodes allowed to this process |
@@ -415,8 +418,9 @@ Swap: 0 kB | |||
415 | KernelPageSize: 4 kB | 418 | KernelPageSize: 4 kB |
416 | MMUPageSize: 4 kB | 419 | MMUPageSize: 4 kB |
417 | Locked: 374 kB | 420 | Locked: 374 kB |
421 | VmFlags: rd ex mr mw me de | ||
418 | 422 | ||
419 | The first of these lines shows the same information as is displayed for the | 423 | the first of these lines shows the same information as is displayed for the |
420 | mapping in /proc/PID/maps. The remaining lines show the size of the mapping | 424 | mapping in /proc/PID/maps. The remaining lines show the size of the mapping |
421 | (size), the amount of the mapping that is currently resident in RAM (RSS), the | 425 | (size), the amount of the mapping that is currently resident in RAM (RSS), the |
422 | process' proportional share of this mapping (PSS), the number of clean and | 426 | process' proportional share of this mapping (PSS), the number of clean and |
@@ -430,6 +434,41 @@ and a page is modified, the file page is replaced by a private anonymous copy. | |||
430 | "Swap" shows how much would-be-anonymous memory is also used, but out on | 434 | "Swap" shows how much would-be-anonymous memory is also used, but out on |
431 | swap. | 435 | swap. |
432 | 436 | ||
437 | "VmFlags" field deserves a separate description. This member represents the kernel | ||
438 | flags associated with the particular virtual memory area in two letter encoded | ||
439 | manner. The codes are the following: | ||
440 | rd - readable | ||
441 | wr - writeable | ||
442 | ex - executable | ||
443 | sh - shared | ||
444 | mr - may read | ||
445 | mw - may write | ||
446 | me - may execute | ||
447 | ms - may share | ||
448 | gd - stack segment growns down | ||
449 | pf - pure PFN range | ||
450 | dw - disabled write to the mapped file | ||
451 | lo - pages are locked in memory | ||
452 | io - memory mapped I/O area | ||
453 | sr - sequential read advise provided | ||
454 | rr - random read advise provided | ||
455 | dc - do not copy area on fork | ||
456 | de - do not expand area on remapping | ||
457 | ac - area is accountable | ||
458 | nr - swap space is not reserved for the area | ||
459 | ht - area uses huge tlb pages | ||
460 | nl - non-linear mapping | ||
461 | ar - architecture specific flag | ||
462 | dd - do not include area into core dump | ||
463 | mm - mixed map area | ||
464 | hg - huge page advise flag | ||
465 | nh - no-huge page advise flag | ||
466 | mg - mergable advise flag | ||
467 | |||
468 | Note that there is no guarantee that every flag and associated mnemonic will | ||
469 | be present in all further kernel releases. Things get changed, the flags may | ||
470 | be vanished or the reverse -- new added. | ||
471 | |||
433 | This file is only present if the CONFIG_MMU kernel configuration option is | 472 | This file is only present if the CONFIG_MMU kernel configuration option is |
434 | enabled. | 473 | enabled. |
435 | 474 | ||
@@ -1320,10 +1359,10 @@ of the kernel. | |||
1320 | CHAPTER 3: PER-PROCESS PARAMETERS | 1359 | CHAPTER 3: PER-PROCESS PARAMETERS |
1321 | ------------------------------------------------------------------------------ | 1360 | ------------------------------------------------------------------------------ |
1322 | 1361 | ||
1323 | 3.1 /proc/<pid>/oom_score_adj- Adjust the oom-killer score | 1362 | 3.1 /proc/<pid>/oom_adj & /proc/<pid>/oom_score_adj- Adjust the oom-killer score |
1324 | -------------------------------------------------------------------------------- | 1363 | -------------------------------------------------------------------------------- |
1325 | 1364 | ||
1326 | This file can be used to adjust the badness heuristic used to select which | 1365 | These file can be used to adjust the badness heuristic used to select which |
1327 | process gets killed in out of memory conditions. | 1366 | process gets killed in out of memory conditions. |
1328 | 1367 | ||
1329 | The badness heuristic assigns a value to each candidate task ranging from 0 | 1368 | The badness heuristic assigns a value to each candidate task ranging from 0 |
@@ -1361,6 +1400,12 @@ same system, cpuset, mempolicy, or memory controller resources to use at least | |||
1361 | equivalent to discounting 50% of the task's allowed memory from being considered | 1400 | equivalent to discounting 50% of the task's allowed memory from being considered |
1362 | as scoring against the task. | 1401 | as scoring against the task. |
1363 | 1402 | ||
1403 | For backwards compatibility with previous kernels, /proc/<pid>/oom_adj may also | ||
1404 | be used to tune the badness score. Its acceptable values range from -16 | ||
1405 | (OOM_ADJUST_MIN) to +15 (OOM_ADJUST_MAX) and a special value of -17 | ||
1406 | (OOM_DISABLE) to disable oom killing entirely for that task. Its value is | ||
1407 | scaled linearly with /proc/<pid>/oom_score_adj. | ||
1408 | |||
1364 | The value of /proc/<pid>/oom_score_adj may be reduced no lower than the last | 1409 | The value of /proc/<pid>/oom_score_adj may be reduced no lower than the last |
1365 | value set by a CAP_SYS_RESOURCE process. To reduce the value any lower | 1410 | value set by a CAP_SYS_RESOURCE process. To reduce the value any lower |
1366 | requires CAP_SYS_RESOURCE. | 1411 | requires CAP_SYS_RESOURCE. |
@@ -1375,7 +1420,9 @@ minimal amount of work. | |||
1375 | ------------------------------------------------------------- | 1420 | ------------------------------------------------------------- |
1376 | 1421 | ||
1377 | This file can be used to check the current score used by the oom-killer is for | 1422 | This file can be used to check the current score used by the oom-killer is for |
1378 | any given <pid>. | 1423 | any given <pid>. Use it together with /proc/<pid>/oom_score_adj to tune which |
1424 | process should be killed in an out-of-memory situation. | ||
1425 | |||
1379 | 1426 | ||
1380 | 3.3 /proc/<pid>/io - Display the IO accounting fields | 1427 | 3.3 /proc/<pid>/io - Display the IO accounting fields |
1381 | ------------------------------------------------------- | 1428 | ------------------------------------------------------- |
@@ -1587,6 +1634,93 @@ pids, so one need to either stop or freeze processes being inspected | |||
1587 | if precise results are needed. | 1634 | if precise results are needed. |
1588 | 1635 | ||
1589 | 1636 | ||
1637 | 3.7 /proc/<pid>/fdinfo/<fd> - Information about opened file | ||
1638 | --------------------------------------------------------------- | ||
1639 | This file provides information associated with an opened file. The regular | ||
1640 | files have at least two fields -- 'pos' and 'flags'. The 'pos' represents | ||
1641 | the current offset of the opened file in decimal form [see lseek(2) for | ||
1642 | details] and 'flags' denotes the octal O_xxx mask the file has been | ||
1643 | created with [see open(2) for details]. | ||
1644 | |||
1645 | A typical output is | ||
1646 | |||
1647 | pos: 0 | ||
1648 | flags: 0100002 | ||
1649 | |||
1650 | The files such as eventfd, fsnotify, signalfd, epoll among the regular pos/flags | ||
1651 | pair provide additional information particular to the objects they represent. | ||
1652 | |||
1653 | Eventfd files | ||
1654 | ~~~~~~~~~~~~~ | ||
1655 | pos: 0 | ||
1656 | flags: 04002 | ||
1657 | eventfd-count: 5a | ||
1658 | |||
1659 | where 'eventfd-count' is hex value of a counter. | ||
1660 | |||
1661 | Signalfd files | ||
1662 | ~~~~~~~~~~~~~~ | ||
1663 | pos: 0 | ||
1664 | flags: 04002 | ||
1665 | sigmask: 0000000000000200 | ||
1666 | |||
1667 | where 'sigmask' is hex value of the signal mask associated | ||
1668 | with a file. | ||
1669 | |||
1670 | Epoll files | ||
1671 | ~~~~~~~~~~~ | ||
1672 | pos: 0 | ||
1673 | flags: 02 | ||
1674 | tfd: 5 events: 1d data: ffffffffffffffff | ||
1675 | |||
1676 | where 'tfd' is a target file descriptor number in decimal form, | ||
1677 | 'events' is events mask being watched and the 'data' is data | ||
1678 | associated with a target [see epoll(7) for more details]. | ||
1679 | |||
1680 | Fsnotify files | ||
1681 | ~~~~~~~~~~~~~~ | ||
1682 | For inotify files the format is the following | ||
1683 | |||
1684 | pos: 0 | ||
1685 | flags: 02000000 | ||
1686 | inotify wd:3 ino:9e7e sdev:800013 mask:800afce ignored_mask:0 fhandle-bytes:8 fhandle-type:1 f_handle:7e9e0000640d1b6d | ||
1687 | |||
1688 | where 'wd' is a watch descriptor in decimal form, ie a target file | ||
1689 | descriptor number, 'ino' and 'sdev' are inode and device where the | ||
1690 | target file resides and the 'mask' is the mask of events, all in hex | ||
1691 | form [see inotify(7) for more details]. | ||
1692 | |||
1693 | If the kernel was built with exportfs support, the path to the target | ||
1694 | file is encoded as a file handle. The file handle is provided by three | ||
1695 | fields 'fhandle-bytes', 'fhandle-type' and 'f_handle', all in hex | ||
1696 | format. | ||
1697 | |||
1698 | If the kernel is built without exportfs support the file handle won't be | ||
1699 | printed out. | ||
1700 | |||
1701 | If there is no inotify mark attached yet the 'inotify' line will be omitted. | ||
1702 | |||
1703 | For fanotify files the format is | ||
1704 | |||
1705 | pos: 0 | ||
1706 | flags: 02 | ||
1707 | fanotify flags:10 event-flags:0 | ||
1708 | fanotify mnt_id:12 mflags:40 mask:38 ignored_mask:40000003 | ||
1709 | fanotify ino:4f969 sdev:800013 mflags:0 mask:3b ignored_mask:40000000 fhandle-bytes:8 fhandle-type:1 f_handle:69f90400c275b5b4 | ||
1710 | |||
1711 | where fanotify 'flags' and 'event-flags' are values used in fanotify_init | ||
1712 | call, 'mnt_id' is the mount point identifier, 'mflags' is the value of | ||
1713 | flags associated with mark which are tracked separately from events | ||
1714 | mask. 'ino', 'sdev' are target inode and device, 'mask' is the events | ||
1715 | mask and 'ignored_mask' is the mask of events which are to be ignored. | ||
1716 | All in hex format. Incorporation of 'mflags', 'mask' and 'ignored_mask' | ||
1717 | does provide information about flags and mask used in fanotify_mark | ||
1718 | call [see fsnotify manpage for details]. | ||
1719 | |||
1720 | While the first three lines are mandatory and always printed, the rest is | ||
1721 | optional and may be omitted if no marks created yet. | ||
1722 | |||
1723 | |||
1590 | ------------------------------------------------------------------------------ | 1724 | ------------------------------------------------------------------------------ |
1591 | Configuring procfs | 1725 | Configuring procfs |
1592 | ------------------------------------------------------------------------------ | 1726 | ------------------------------------------------------------------------------ |
diff --git a/Documentation/filesystems/vfat.txt b/Documentation/filesystems/vfat.txt index de1e6c4dccff..d230dd9c99b0 100644 --- a/Documentation/filesystems/vfat.txt +++ b/Documentation/filesystems/vfat.txt | |||
@@ -111,6 +111,15 @@ tz=UTC -- Interpret timestamps as UTC rather than local time. | |||
111 | useful when mounting devices (like digital cameras) | 111 | useful when mounting devices (like digital cameras) |
112 | that are set to UTC in order to avoid the pitfalls of | 112 | that are set to UTC in order to avoid the pitfalls of |
113 | local time. | 113 | local time. |
114 | time_offset=minutes | ||
115 | -- Set offset for conversion of timestamps from local time | ||
116 | used by FAT to UTC. I.e. <minutes> minutes will be subtracted | ||
117 | from each timestamp to convert it to UTC used internally by | ||
118 | Linux. This is useful when time zone set in sys_tz is | ||
119 | not the time zone used by the filesystem. Note that this | ||
120 | option still does not provide correct time stamps in all | ||
121 | cases in presence of DST - time stamps in a different DST | ||
122 | setting will be off by one hour. | ||
114 | 123 | ||
115 | showexec -- If set, the execute permission bits of the file will be | 124 | showexec -- If set, the execute permission bits of the file will be |
116 | allowed only if the extension part of the name is .EXE, | 125 | allowed only if the extension part of the name is .EXE, |
diff --git a/Documentation/filesystems/vfs.txt b/Documentation/filesystems/vfs.txt index 2ee133e030c3..e3869098163e 100644 --- a/Documentation/filesystems/vfs.txt +++ b/Documentation/filesystems/vfs.txt | |||
@@ -350,7 +350,6 @@ struct inode_operations { | |||
350 | int (*readlink) (struct dentry *, char __user *,int); | 350 | int (*readlink) (struct dentry *, char __user *,int); |
351 | void * (*follow_link) (struct dentry *, struct nameidata *); | 351 | void * (*follow_link) (struct dentry *, struct nameidata *); |
352 | void (*put_link) (struct dentry *, struct nameidata *, void *); | 352 | void (*put_link) (struct dentry *, struct nameidata *, void *); |
353 | void (*truncate) (struct inode *); | ||
354 | int (*permission) (struct inode *, int); | 353 | int (*permission) (struct inode *, int); |
355 | int (*get_acl)(struct inode *, int); | 354 | int (*get_acl)(struct inode *, int); |
356 | int (*setattr) (struct dentry *, struct iattr *); | 355 | int (*setattr) (struct dentry *, struct iattr *); |
@@ -431,16 +430,6 @@ otherwise noted. | |||
431 | started might not be in the page cache at the end of the | 430 | started might not be in the page cache at the end of the |
432 | walk). | 431 | walk). |
433 | 432 | ||
434 | truncate: Deprecated. This will not be called if ->setsize is defined. | ||
435 | Called by the VFS to change the size of a file. The | ||
436 | i_size field of the inode is set to the desired size by the | ||
437 | VFS before this method is called. This method is called by | ||
438 | the truncate(2) system call and related functionality. | ||
439 | |||
440 | Note: ->truncate and vmtruncate are deprecated. Do not add new | ||
441 | instances/calls of these. Filesystems should be converted to do their | ||
442 | truncate sequence via ->setattr(). | ||
443 | |||
444 | permission: called by the VFS to check for access rights on a POSIX-like | 433 | permission: called by the VFS to check for access rights on a POSIX-like |
445 | filesystem. | 434 | filesystem. |
446 | 435 | ||
diff --git a/Documentation/filesystems/xfs.txt b/Documentation/filesystems/xfs.txt index 3fc0c31a6f5d..3e4b3dd1e046 100644 --- a/Documentation/filesystems/xfs.txt +++ b/Documentation/filesystems/xfs.txt | |||
@@ -43,7 +43,7 @@ When mounting an XFS filesystem, the following options are accepted. | |||
43 | Issue command to let the block device reclaim space freed by the | 43 | Issue command to let the block device reclaim space freed by the |
44 | filesystem. This is useful for SSD devices, thinly provisioned | 44 | filesystem. This is useful for SSD devices, thinly provisioned |
45 | LUNs and virtual machine images, but may have a performance | 45 | LUNs and virtual machine images, but may have a performance |
46 | impact. This option is incompatible with the nodelaylog option. | 46 | impact. |
47 | 47 | ||
48 | dmapi | 48 | dmapi |
49 | Enable the DMAPI (Data Management API) event callouts. | 49 | Enable the DMAPI (Data Management API) event callouts. |
@@ -72,8 +72,15 @@ When mounting an XFS filesystem, the following options are accepted. | |||
72 | Indicates that XFS is allowed to create inodes at any location | 72 | Indicates that XFS is allowed to create inodes at any location |
73 | in the filesystem, including those which will result in inode | 73 | in the filesystem, including those which will result in inode |
74 | numbers occupying more than 32 bits of significance. This is | 74 | numbers occupying more than 32 bits of significance. This is |
75 | provided for backwards compatibility, but causes problems for | 75 | the default allocation option. Applications which do not handle |
76 | backup applications that cannot handle large inode numbers. | 76 | inode numbers bigger than 32 bits, should use inode32 option. |
77 | |||
78 | inode32 | ||
79 | Indicates that XFS is limited to create inodes at locations which | ||
80 | will not result in inode numbers with more than 32 bits of | ||
81 | significance. This is provided for backwards compatibility, since | ||
82 | 64 bits inode numbers might cause problems for some applications | ||
83 | that cannot handle large inode numbers. | ||
77 | 84 | ||
78 | largeio/nolargeio | 85 | largeio/nolargeio |
79 | If "nolargeio" is specified, the optimal I/O reported in | 86 | If "nolargeio" is specified, the optimal I/O reported in |
diff --git a/Documentation/firmware_class/README b/Documentation/firmware_class/README index 7eceaff63f5f..43fada989e65 100644 --- a/Documentation/firmware_class/README +++ b/Documentation/firmware_class/README | |||
@@ -18,32 +18,45 @@ | |||
18 | High level behavior (mixed): | 18 | High level behavior (mixed): |
19 | ============================ | 19 | ============================ |
20 | 20 | ||
21 | kernel(driver): calls request_firmware(&fw_entry, $FIRMWARE, device) | 21 | 1), kernel(driver): |
22 | 22 | - calls request_firmware(&fw_entry, $FIRMWARE, device) | |
23 | userspace: | 23 | - kernel searchs the fimware image with name $FIRMWARE directly |
24 | in the below search path of root filesystem: | ||
25 | User customized search path by module parameter 'path'[1] | ||
26 | "/lib/firmware/updates/" UTS_RELEASE, | ||
27 | "/lib/firmware/updates", | ||
28 | "/lib/firmware/" UTS_RELEASE, | ||
29 | "/lib/firmware" | ||
30 | - If found, goto 7), else goto 2) | ||
31 | |||
32 | [1], the 'path' is a string parameter which length should be less | ||
33 | than 256, user should pass 'firmware_class.path=$CUSTOMIZED_PATH' | ||
34 | if firmware_class is built in kernel(the general situation) | ||
35 | |||
36 | 2), userspace: | ||
24 | - /sys/class/firmware/xxx/{loading,data} appear. | 37 | - /sys/class/firmware/xxx/{loading,data} appear. |
25 | - hotplug gets called with a firmware identifier in $FIRMWARE | 38 | - hotplug gets called with a firmware identifier in $FIRMWARE |
26 | and the usual hotplug environment. | 39 | and the usual hotplug environment. |
27 | - hotplug: echo 1 > /sys/class/firmware/xxx/loading | 40 | - hotplug: echo 1 > /sys/class/firmware/xxx/loading |
28 | 41 | ||
29 | kernel: Discard any previous partial load. | 42 | 3), kernel: Discard any previous partial load. |
30 | 43 | ||
31 | userspace: | 44 | 4), userspace: |
32 | - hotplug: cat appropriate_firmware_image > \ | 45 | - hotplug: cat appropriate_firmware_image > \ |
33 | /sys/class/firmware/xxx/data | 46 | /sys/class/firmware/xxx/data |
34 | 47 | ||
35 | kernel: grows a buffer in PAGE_SIZE increments to hold the image as it | 48 | 5), kernel: grows a buffer in PAGE_SIZE increments to hold the image as it |
36 | comes in. | 49 | comes in. |
37 | 50 | ||
38 | userspace: | 51 | 6), userspace: |
39 | - hotplug: echo 0 > /sys/class/firmware/xxx/loading | 52 | - hotplug: echo 0 > /sys/class/firmware/xxx/loading |
40 | 53 | ||
41 | kernel: request_firmware() returns and the driver has the firmware | 54 | 7), kernel: request_firmware() returns and the driver has the firmware |
42 | image in fw_entry->{data,size}. If something went wrong | 55 | image in fw_entry->{data,size}. If something went wrong |
43 | request_firmware() returns non-zero and fw_entry is set to | 56 | request_firmware() returns non-zero and fw_entry is set to |
44 | NULL. | 57 | NULL. |
45 | 58 | ||
46 | kernel(driver): Driver code calls release_firmware(fw_entry) releasing | 59 | 8), kernel(driver): Driver code calls release_firmware(fw_entry) releasing |
47 | the firmware image and any related resource. | 60 | the firmware image and any related resource. |
48 | 61 | ||
49 | High level behavior (driver code): | 62 | High level behavior (driver code): |
@@ -106,3 +119,10 @@ | |||
106 | on the setup, so I think that the choice on what firmware to make | 119 | on the setup, so I think that the choice on what firmware to make |
107 | persistent should be left to userspace. | 120 | persistent should be left to userspace. |
108 | 121 | ||
122 | about firmware cache: | ||
123 | -------------------- | ||
124 | After firmware cache mechanism is introduced during system sleep, | ||
125 | request_firmware can be called safely inside device's suspend and | ||
126 | resume callback, and callers need't cache the firmware by | ||
127 | themselves any more for dealing with firmware loss during system | ||
128 | resume. | ||
diff --git a/Documentation/gpio.txt b/Documentation/gpio.txt index e08a883de36e..77a1d11af723 100644 --- a/Documentation/gpio.txt +++ b/Documentation/gpio.txt | |||
@@ -439,6 +439,48 @@ slower clock delays the rising edge of SCK, and the I2C master adjusts its | |||
439 | signaling rate accordingly. | 439 | signaling rate accordingly. |
440 | 440 | ||
441 | 441 | ||
442 | GPIO controllers and the pinctrl subsystem | ||
443 | ------------------------------------------ | ||
444 | |||
445 | A GPIO controller on a SOC might be tightly coupled with the pinctrl | ||
446 | subsystem, in the sense that the pins can be used by other functions | ||
447 | together with an optional gpio feature. We have already covered the | ||
448 | case where e.g. a GPIO controller need to reserve a pin or set the | ||
449 | direction of a pin by calling any of: | ||
450 | |||
451 | pinctrl_request_gpio() | ||
452 | pinctrl_free_gpio() | ||
453 | pinctrl_gpio_direction_input() | ||
454 | pinctrl_gpio_direction_output() | ||
455 | |||
456 | But how does the pin control subsystem cross-correlate the GPIO | ||
457 | numbers (which are a global business) to a certain pin on a certain | ||
458 | pin controller? | ||
459 | |||
460 | This is done by registering "ranges" of pins, which are essentially | ||
461 | cross-reference tables. These are described in | ||
462 | Documentation/pinctrl.txt | ||
463 | |||
464 | While the pin allocation is totally managed by the pinctrl subsystem, | ||
465 | gpio (under gpiolib) is still maintained by gpio drivers. It may happen | ||
466 | that different pin ranges in a SoC is managed by different gpio drivers. | ||
467 | |||
468 | This makes it logical to let gpio drivers announce their pin ranges to | ||
469 | the pin ctrl subsystem before it will call 'pinctrl_request_gpio' in order | ||
470 | to request the corresponding pin to be prepared by the pinctrl subsystem | ||
471 | before any gpio usage. | ||
472 | |||
473 | For this, the gpio controller can register its pin range with pinctrl | ||
474 | subsystem. There are two ways of doing it currently: with or without DT. | ||
475 | |||
476 | For with DT support refer to Documentation/devicetree/bindings/gpio/gpio.txt. | ||
477 | |||
478 | For non-DT support, user can call gpiochip_add_pin_range() with appropriate | ||
479 | parameters to register a range of gpio pins with a pinctrl driver. For this | ||
480 | exact name string of pinctrl device has to be passed as one of the | ||
481 | argument to this routine. | ||
482 | |||
483 | |||
442 | What do these conventions omit? | 484 | What do these conventions omit? |
443 | =============================== | 485 | =============================== |
444 | One of the biggest things these conventions omit is pin multiplexing, since | 486 | One of the biggest things these conventions omit is pin multiplexing, since |
diff --git a/Documentation/hid/uhid.txt b/Documentation/hid/uhid.txt index 4627c4241ece..3c741214dfbb 100644 --- a/Documentation/hid/uhid.txt +++ b/Documentation/hid/uhid.txt | |||
@@ -108,7 +108,7 @@ the request was handled successfully. | |||
108 | UHID_FEATURE_ANSWER: | 108 | UHID_FEATURE_ANSWER: |
109 | If you receive a UHID_FEATURE request you must answer with this request. You | 109 | If you receive a UHID_FEATURE request you must answer with this request. You |
110 | must copy the "id" field from the request into the answer. Set the "err" field | 110 | must copy the "id" field from the request into the answer. Set the "err" field |
111 | to 0 if no error occured or to EIO if an I/O error occurred. | 111 | to 0 if no error occurred or to EIO if an I/O error occurred. |
112 | If "err" is 0 then you should fill the buffer of the answer with the results | 112 | If "err" is 0 then you should fill the buffer of the answer with the results |
113 | of the feature request and set "size" correspondingly. | 113 | of the feature request and set "size" correspondingly. |
114 | 114 | ||
diff --git a/Documentation/hwmon/ads7828 b/Documentation/hwmon/ads7828 index 2bbebe6f771f..f6e263e0f607 100644 --- a/Documentation/hwmon/ads7828 +++ b/Documentation/hwmon/ads7828 | |||
@@ -4,29 +4,47 @@ Kernel driver ads7828 | |||
4 | Supported chips: | 4 | Supported chips: |
5 | * Texas Instruments/Burr-Brown ADS7828 | 5 | * Texas Instruments/Burr-Brown ADS7828 |
6 | Prefix: 'ads7828' | 6 | Prefix: 'ads7828' |
7 | Addresses scanned: I2C 0x48, 0x49, 0x4a, 0x4b | 7 | Datasheet: Publicly available at the Texas Instruments website: |
8 | Datasheet: Publicly available at the Texas Instruments website : | ||
9 | http://focus.ti.com/lit/ds/symlink/ads7828.pdf | 8 | http://focus.ti.com/lit/ds/symlink/ads7828.pdf |
10 | 9 | ||
10 | * Texas Instruments ADS7830 | ||
11 | Prefix: 'ads7830' | ||
12 | Datasheet: Publicly available at the Texas Instruments website: | ||
13 | http://focus.ti.com/lit/ds/symlink/ads7830.pdf | ||
14 | |||
11 | Authors: | 15 | Authors: |
12 | Steve Hardy <shardy@redhat.com> | 16 | Steve Hardy <shardy@redhat.com> |
17 | Vivien Didelot <vivien.didelot@savoirfairelinux.com> | ||
18 | Guillaume Roguez <guillaume.roguez@savoirfairelinux.com> | ||
19 | |||
20 | Platform data | ||
21 | ------------- | ||
22 | |||
23 | The ads7828 driver accepts an optional ads7828_platform_data structure (defined | ||
24 | in include/linux/platform_data/ads7828.h). The structure fields are: | ||
13 | 25 | ||
14 | Module Parameters | 26 | * diff_input: (bool) Differential operation |
15 | ----------------- | 27 | set to true for differential mode, false for default single ended mode. |
16 | 28 | ||
17 | * se_input: bool (default Y) | 29 | * ext_vref: (bool) External reference |
18 | Single ended operation - set to N for differential mode | 30 | set to true if it operates with an external reference, false for default |
19 | * int_vref: bool (default Y) | 31 | internal reference. |
20 | Operate with the internal 2.5V reference - set to N for external reference | 32 | |
21 | * vref_mv: int (default 2500) | 33 | * vref_mv: (unsigned int) Voltage reference |
22 | If using an external reference, set this to the reference voltage in mV | 34 | if using an external reference, set this to the reference voltage in mV, |
35 | otherwise it will default to the internal value (2500mV). This value will be | ||
36 | bounded with limits accepted by the chip, described in the datasheet. | ||
37 | |||
38 | If no structure is provided, the configuration defaults to single ended | ||
39 | operation and internal voltage reference (2.5V). | ||
23 | 40 | ||
24 | Description | 41 | Description |
25 | ----------- | 42 | ----------- |
26 | 43 | ||
27 | This driver implements support for the Texas Instruments ADS7828. | 44 | This driver implements support for the Texas Instruments ADS7828 and ADS7830. |
28 | 45 | ||
29 | This device is a 12-bit 8-channel A-D converter. | 46 | The ADS7828 device is a 12-bit 8-channel A/D converter, while the ADS7830 does |
47 | 8-bit sampling. | ||
30 | 48 | ||
31 | It can operate in single ended mode (8 +ve inputs) or in differential mode, | 49 | It can operate in single ended mode (8 +ve inputs) or in differential mode, |
32 | where 4 differential pairs can be measured. | 50 | where 4 differential pairs can be measured. |
@@ -34,3 +52,7 @@ where 4 differential pairs can be measured. | |||
34 | The chip also has the facility to use an external voltage reference. This | 52 | The chip also has the facility to use an external voltage reference. This |
35 | may be required if your hardware supplies the ADS7828 from a 5V supply, see | 53 | may be required if your hardware supplies the ADS7828 from a 5V supply, see |
36 | the datasheet for more details. | 54 | the datasheet for more details. |
55 | |||
56 | There is no reliable way to identify this chip, so the driver will not scan | ||
57 | some addresses to try to auto-detect it. That means that you will have to | ||
58 | statically declare the device in the platform support code. | ||
diff --git a/Documentation/hwmon/coretemp b/Documentation/hwmon/coretemp index c86b50c03ea8..3374c085678d 100644 --- a/Documentation/hwmon/coretemp +++ b/Documentation/hwmon/coretemp | |||
@@ -98,13 +98,16 @@ Process Processor TjMax(C) | |||
98 | 98 | ||
99 | 45nm Atom Processors | 99 | 45nm Atom Processors |
100 | D525/510/425/410 100 | 100 | D525/510/425/410 100 |
101 | Z670/650 90 | ||
101 | Z560/550/540/530P/530/520PT/520/515/510PT/510P 90 | 102 | Z560/550/540/530P/530/520PT/520/515/510PT/510P 90 |
102 | Z510/500 90 | 103 | Z510/500 90 |
104 | N570/550 100 | ||
103 | N475/470/455/450 100 | 105 | N475/470/455/450 100 |
104 | N280/270 90 | 106 | N280/270 90 |
105 | 330/230 125 | 107 | 330/230 125 |
106 | E680/660/640/620 90 | 108 | E680/660/640/620 90 |
107 | E680T/660T/640T/620T 110 | 109 | E680T/660T/640T/620T 110 |
110 | CE4170/4150/4110 110 | ||
108 | 111 | ||
109 | 45nm Core2 Processors | 112 | 45nm Core2 Processors |
110 | Solo ULV SU3500/3300 100 | 113 | Solo ULV SU3500/3300 100 |
diff --git a/Documentation/hwmon/da9055 b/Documentation/hwmon/da9055 new file mode 100644 index 000000000000..855c3f536e00 --- /dev/null +++ b/Documentation/hwmon/da9055 | |||
@@ -0,0 +1,47 @@ | |||
1 | Supported chips: | ||
2 | * Dialog Semiconductors DA9055 PMIC | ||
3 | Prefix: 'da9055' | ||
4 | Datasheet: Datasheet is not publicly available. | ||
5 | |||
6 | Authors: David Dajun Chen <dchen@diasemi.com> | ||
7 | |||
8 | Description | ||
9 | ----------- | ||
10 | |||
11 | The DA9055 provides an Analogue to Digital Converter (ADC) with 10 bits | ||
12 | resolution and track and hold circuitry combined with an analogue input | ||
13 | multiplexer. The analogue input multiplexer will allow conversion of up to 5 | ||
14 | different inputs. The track and hold circuit ensures stable input voltages at | ||
15 | the input of the ADC during the conversion. | ||
16 | |||
17 | The ADC is used to measure the following inputs: | ||
18 | Channel 0: VDDOUT - measurement of the system voltage | ||
19 | Channel 1: ADC_IN1 - high impedance input (0 - 2.5V) | ||
20 | Channel 2: ADC_IN2 - high impedance input (0 - 2.5V) | ||
21 | Channel 3: ADC_IN3 - high impedance input (0 - 2.5V) | ||
22 | Channel 4: Internal Tjunc. - sense (internal temp. sensor) | ||
23 | |||
24 | By using sysfs attributes we can measure the system voltage VDDOUT, | ||
25 | chip junction temperature and auxiliary channels voltages. | ||
26 | |||
27 | Voltage Monitoring | ||
28 | ------------------ | ||
29 | |||
30 | Voltages are sampled in a AUTO mode it can be manually sampled too and results | ||
31 | are stored in a 10 bit ADC. | ||
32 | |||
33 | The system voltage is calculated as: | ||
34 | Milli volt = ((ADC value * 1000) / 85) + 2500 | ||
35 | |||
36 | The voltages on ADC channels 1, 2 and 3 are calculated as: | ||
37 | Milli volt = (ADC value * 1000) / 102 | ||
38 | |||
39 | Temperature Monitoring | ||
40 | ---------------------- | ||
41 | |||
42 | Temperatures are sampled by a 10 bit ADC. Junction temperatures | ||
43 | are monitored by the ADC channels. | ||
44 | |||
45 | The junction temperature is calculated: | ||
46 | Degrees celsius = -0.4084 * (ADC_RES - T_OFFSET) + 307.6332 | ||
47 | The junction temperature attribute is supported by the driver. | ||
diff --git a/Documentation/hwmon/fam15h_power b/Documentation/hwmon/fam15h_power index a92918e0bd69..80654813d04a 100644 --- a/Documentation/hwmon/fam15h_power +++ b/Documentation/hwmon/fam15h_power | |||
@@ -10,7 +10,7 @@ Supported chips: | |||
10 | BIOS and Kernel Developer's Guide (BKDG) For AMD Family 15h Processors | 10 | BIOS and Kernel Developer's Guide (BKDG) For AMD Family 15h Processors |
11 | (not yet published) | 11 | (not yet published) |
12 | 12 | ||
13 | Author: Andreas Herrmann <andreas.herrmann3@amd.com> | 13 | Author: Andreas Herrmann <herrmann.der.user@googlemail.com> |
14 | 14 | ||
15 | Description | 15 | Description |
16 | ----------- | 16 | ----------- |
diff --git a/Documentation/hwmon/it87 b/Documentation/hwmon/it87 index 87850d86c559..8386aadc0a82 100644 --- a/Documentation/hwmon/it87 +++ b/Documentation/hwmon/it87 | |||
@@ -209,3 +209,13 @@ doesn't use CPU cycles. | |||
209 | Trip points must be set properly before switching to automatic fan speed | 209 | Trip points must be set properly before switching to automatic fan speed |
210 | control mode. The driver will perform basic integrity checks before | 210 | control mode. The driver will perform basic integrity checks before |
211 | actually switching to automatic control mode. | 211 | actually switching to automatic control mode. |
212 | |||
213 | |||
214 | Temperature offset attributes | ||
215 | ----------------------------- | ||
216 | |||
217 | The driver supports temp[1-3]_offset sysfs attributes to adjust the reported | ||
218 | temperature for thermal diodes or diode-connected thermal transistors. | ||
219 | If a temperature sensor is configured for thermistors, the attribute values | ||
220 | are ignored. If the thermal sensor type is Intel PECI, the temperature offset | ||
221 | must be programmed to the critical CPU temperature. | ||
diff --git a/Documentation/hwmon/pmbus b/Documentation/hwmon/pmbus index f90f99920cc5..3d3a0f97f966 100644 --- a/Documentation/hwmon/pmbus +++ b/Documentation/hwmon/pmbus | |||
@@ -138,7 +138,7 @@ Sysfs entries | |||
138 | 138 | ||
139 | When probing the chip, the driver identifies which PMBus registers are | 139 | When probing the chip, the driver identifies which PMBus registers are |
140 | supported, and determines available sensors from this information. | 140 | supported, and determines available sensors from this information. |
141 | Attribute files only exist if respective sensors are suported by the chip. | 141 | Attribute files only exist if respective sensors are supported by the chip. |
142 | Labels are provided to inform the user about the sensor associated with | 142 | Labels are provided to inform the user about the sensor associated with |
143 | a given sysfs entry. | 143 | a given sysfs entry. |
144 | 144 | ||
diff --git a/Documentation/hwmon/submitting-patches b/Documentation/hwmon/submitting-patches index 790f774a3032..843751c41fea 100644 --- a/Documentation/hwmon/submitting-patches +++ b/Documentation/hwmon/submitting-patches | |||
@@ -60,8 +60,7 @@ increase the chances of your change being accepted. | |||
60 | 60 | ||
61 | * Add the driver to Kconfig and Makefile in alphabetical order. | 61 | * Add the driver to Kconfig and Makefile in alphabetical order. |
62 | 62 | ||
63 | * Make sure that all dependencies are listed in Kconfig. For new drivers, it | 63 | * Make sure that all dependencies are listed in Kconfig. |
64 | is most likely prudent to add a dependency on EXPERIMENTAL. | ||
65 | 64 | ||
66 | * Avoid forward declarations if you can. Rearrange the code if necessary. | 65 | * Avoid forward declarations if you can. Rearrange the code if necessary. |
67 | 66 | ||
diff --git a/Documentation/hwmon/vexpress b/Documentation/hwmon/vexpress new file mode 100644 index 000000000000..557d6d5ad90d --- /dev/null +++ b/Documentation/hwmon/vexpress | |||
@@ -0,0 +1,34 @@ | |||
1 | Kernel driver vexpress | ||
2 | ====================== | ||
3 | |||
4 | Supported systems: | ||
5 | * ARM Ltd. Versatile Express platform | ||
6 | Prefix: 'vexpress' | ||
7 | Datasheets: | ||
8 | * "Hardware Description" sections of the Technical Reference Manuals | ||
9 | for the Versatile Express boards: | ||
10 | http://infocenter.arm.com/help/topic/com.arm.doc.subset.boards.express/index.html | ||
11 | * Section "4.4.14. System Configuration registers" of the V2M-P1 TRM: | ||
12 | http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dui0447-/index.html | ||
13 | |||
14 | Author: Pawel Moll | ||
15 | |||
16 | Description | ||
17 | ----------- | ||
18 | |||
19 | Versatile Express platform (http://www.arm.com/versatileexpress/) is a | ||
20 | reference & prototyping system for ARM Ltd. processors. It can be set up | ||
21 | from a wide range of boards, each of them containing (apart of the main | ||
22 | chip/FPGA) a number of microcontrollers responsible for platform | ||
23 | configuration and control. Theses microcontrollers can also monitor the | ||
24 | board and its environment by a number of internal and external sensors, | ||
25 | providing information about power lines voltages and currents, board | ||
26 | temperature and power usage. Some of them also calculate consumed energy | ||
27 | and provide a cumulative use counter. | ||
28 | |||
29 | The configuration devices are _not_ memory mapped and must be accessed | ||
30 | via a custom interface, abstracted by the "vexpress_config" API. | ||
31 | |||
32 | As these devices are non-discoverable, they must be described in a Device | ||
33 | Tree passed to the kernel. Details of the DT binding for them can be found | ||
34 | in Documentation/devicetree/bindings/hwmon/vexpress.txt. | ||
diff --git a/Documentation/i2c/smbus-protocol b/Documentation/i2c/smbus-protocol index 49f5b680809d..d1f22618e14b 100644 --- a/Documentation/i2c/smbus-protocol +++ b/Documentation/i2c/smbus-protocol | |||
@@ -23,6 +23,12 @@ don't match these function names. For some of the operations which pass a | |||
23 | single data byte, the functions using SMBus protocol operation names execute | 23 | single data byte, the functions using SMBus protocol operation names execute |
24 | a different protocol operation entirely. | 24 | a different protocol operation entirely. |
25 | 25 | ||
26 | Each transaction type corresponds to a functionality flag. Before calling a | ||
27 | transaction function, a device driver should always check (just once) for | ||
28 | the corresponding functionality flag to ensure that the underlying I2C | ||
29 | adapter supports the transaction in question. See | ||
30 | <file:Documentation/i2c/functionality> for the details. | ||
31 | |||
26 | 32 | ||
27 | Key to symbols | 33 | Key to symbols |
28 | ============== | 34 | ============== |
@@ -49,6 +55,8 @@ This sends a single bit to the device, at the place of the Rd/Wr bit. | |||
49 | 55 | ||
50 | A Addr Rd/Wr [A] P | 56 | A Addr Rd/Wr [A] P |
51 | 57 | ||
58 | Functionality flag: I2C_FUNC_SMBUS_QUICK | ||
59 | |||
52 | 60 | ||
53 | SMBus Receive Byte: i2c_smbus_read_byte() | 61 | SMBus Receive Byte: i2c_smbus_read_byte() |
54 | ========================================== | 62 | ========================================== |
@@ -60,6 +68,8 @@ the previous SMBus command. | |||
60 | 68 | ||
61 | S Addr Rd [A] [Data] NA P | 69 | S Addr Rd [A] [Data] NA P |
62 | 70 | ||
71 | Functionality flag: I2C_FUNC_SMBUS_READ_BYTE | ||
72 | |||
63 | 73 | ||
64 | SMBus Send Byte: i2c_smbus_write_byte() | 74 | SMBus Send Byte: i2c_smbus_write_byte() |
65 | ======================================== | 75 | ======================================== |
@@ -69,6 +79,8 @@ to a device. See Receive Byte for more information. | |||
69 | 79 | ||
70 | S Addr Wr [A] Data [A] P | 80 | S Addr Wr [A] Data [A] P |
71 | 81 | ||
82 | Functionality flag: I2C_FUNC_SMBUS_WRITE_BYTE | ||
83 | |||
72 | 84 | ||
73 | SMBus Read Byte: i2c_smbus_read_byte_data() | 85 | SMBus Read Byte: i2c_smbus_read_byte_data() |
74 | ============================================ | 86 | ============================================ |
@@ -78,6 +90,8 @@ The register is specified through the Comm byte. | |||
78 | 90 | ||
79 | S Addr Wr [A] Comm [A] S Addr Rd [A] [Data] NA P | 91 | S Addr Wr [A] Comm [A] S Addr Rd [A] [Data] NA P |
80 | 92 | ||
93 | Functionality flag: I2C_FUNC_SMBUS_READ_BYTE_DATA | ||
94 | |||
81 | 95 | ||
82 | SMBus Read Word: i2c_smbus_read_word_data() | 96 | SMBus Read Word: i2c_smbus_read_word_data() |
83 | ============================================ | 97 | ============================================ |
@@ -88,6 +102,8 @@ byte. But this time, the data is a complete word (16 bits). | |||
88 | 102 | ||
89 | S Addr Wr [A] Comm [A] S Addr Rd [A] [DataLow] A [DataHigh] NA P | 103 | S Addr Wr [A] Comm [A] S Addr Rd [A] [DataLow] A [DataHigh] NA P |
90 | 104 | ||
105 | Functionality flag: I2C_FUNC_SMBUS_READ_WORD_DATA | ||
106 | |||
91 | Note the convenience function i2c_smbus_read_word_swapped is | 107 | Note the convenience function i2c_smbus_read_word_swapped is |
92 | available for reads where the two data bytes are the other way | 108 | available for reads where the two data bytes are the other way |
93 | around (not SMBus compliant, but very popular.) | 109 | around (not SMBus compliant, but very popular.) |
@@ -102,6 +118,8 @@ the Read Byte operation. | |||
102 | 118 | ||
103 | S Addr Wr [A] Comm [A] Data [A] P | 119 | S Addr Wr [A] Comm [A] Data [A] P |
104 | 120 | ||
121 | Functionality flag: I2C_FUNC_SMBUS_WRITE_BYTE_DATA | ||
122 | |||
105 | 123 | ||
106 | SMBus Write Word: i2c_smbus_write_word_data() | 124 | SMBus Write Word: i2c_smbus_write_word_data() |
107 | ============================================== | 125 | ============================================== |
@@ -112,6 +130,8 @@ specified through the Comm byte. | |||
112 | 130 | ||
113 | S Addr Wr [A] Comm [A] DataLow [A] DataHigh [A] P | 131 | S Addr Wr [A] Comm [A] DataLow [A] DataHigh [A] P |
114 | 132 | ||
133 | Functionality flag: I2C_FUNC_SMBUS_WRITE_WORD_DATA | ||
134 | |||
115 | Note the convenience function i2c_smbus_write_word_swapped is | 135 | Note the convenience function i2c_smbus_write_word_swapped is |
116 | available for writes where the two data bytes are the other way | 136 | available for writes where the two data bytes are the other way |
117 | around (not SMBus compliant, but very popular.) | 137 | around (not SMBus compliant, but very popular.) |
@@ -126,6 +146,8 @@ This command selects a device register (through the Comm byte), sends | |||
126 | S Addr Wr [A] Comm [A] DataLow [A] DataHigh [A] | 146 | S Addr Wr [A] Comm [A] DataLow [A] DataHigh [A] |
127 | S Addr Rd [A] [DataLow] A [DataHigh] NA P | 147 | S Addr Rd [A] [DataLow] A [DataHigh] NA P |
128 | 148 | ||
149 | Functionality flag: I2C_FUNC_SMBUS_PROC_CALL | ||
150 | |||
129 | 151 | ||
130 | SMBus Block Read: i2c_smbus_read_block_data() | 152 | SMBus Block Read: i2c_smbus_read_block_data() |
131 | ============================================== | 153 | ============================================== |
@@ -137,6 +159,8 @@ of data is specified by the device in the Count byte. | |||
137 | S Addr Wr [A] Comm [A] | 159 | S Addr Wr [A] Comm [A] |
138 | S Addr Rd [A] [Count] A [Data] A [Data] A ... A [Data] NA P | 160 | S Addr Rd [A] [Count] A [Data] A [Data] A ... A [Data] NA P |
139 | 161 | ||
162 | Functionality flag: I2C_FUNC_SMBUS_READ_BLOCK_DATA | ||
163 | |||
140 | 164 | ||
141 | SMBus Block Write: i2c_smbus_write_block_data() | 165 | SMBus Block Write: i2c_smbus_write_block_data() |
142 | ================================================ | 166 | ================================================ |
@@ -147,6 +171,8 @@ Comm byte. The amount of data is specified in the Count byte. | |||
147 | 171 | ||
148 | S Addr Wr [A] Comm [A] Count [A] Data [A] Data [A] ... [A] Data [A] P | 172 | S Addr Wr [A] Comm [A] Count [A] Data [A] Data [A] ... [A] Data [A] P |
149 | 173 | ||
174 | Functionality flag: I2C_FUNC_SMBUS_WRITE_BLOCK_DATA | ||
175 | |||
150 | 176 | ||
151 | SMBus Block Write - Block Read Process Call | 177 | SMBus Block Write - Block Read Process Call |
152 | =========================================== | 178 | =========================================== |
@@ -160,6 +186,8 @@ This command selects a device register (through the Comm byte), sends | |||
160 | S Addr Wr [A] Comm [A] Count [A] Data [A] ... | 186 | S Addr Wr [A] Comm [A] Count [A] Data [A] ... |
161 | S Addr Rd [A] [Count] A [Data] ... A P | 187 | S Addr Rd [A] [Count] A [Data] ... A P |
162 | 188 | ||
189 | Functionality flag: I2C_FUNC_SMBUS_BLOCK_PROC_CALL | ||
190 | |||
163 | 191 | ||
164 | SMBus Host Notify | 192 | SMBus Host Notify |
165 | ================= | 193 | ================= |
@@ -229,15 +257,7 @@ designated register that is specified through the Comm byte. | |||
229 | S Addr Wr [A] Comm [A] | 257 | S Addr Wr [A] Comm [A] |
230 | S Addr Rd [A] [Data] A [Data] A ... A [Data] NA P | 258 | S Addr Rd [A] [Data] A [Data] A ... A [Data] NA P |
231 | 259 | ||
232 | 260 | Functionality flag: I2C_FUNC_SMBUS_READ_I2C_BLOCK | |
233 | I2C Block Read (2 Comm bytes) | ||
234 | ============================= | ||
235 | |||
236 | This command reads a block of bytes from a device, from a | ||
237 | designated register that is specified through the two Comm bytes. | ||
238 | |||
239 | S Addr Wr [A] Comm1 [A] Comm2 [A] | ||
240 | S Addr Rd [A] [Data] A [Data] A ... A [Data] NA P | ||
241 | 261 | ||
242 | 262 | ||
243 | I2C Block Write: i2c_smbus_write_i2c_block_data() | 263 | I2C Block Write: i2c_smbus_write_i2c_block_data() |
@@ -249,3 +269,5 @@ Comm byte. Note that command lengths of 0, 2, or more bytes are | |||
249 | supported as they are indistinguishable from data. | 269 | supported as they are indistinguishable from data. |
250 | 270 | ||
251 | S Addr Wr [A] Comm [A] Data [A] Data [A] ... [A] Data [A] P | 271 | S Addr Wr [A] Comm [A] Data [A] Data [A] ... [A] Data [A] P |
272 | |||
273 | Functionality flag: I2C_FUNC_SMBUS_WRITE_I2C_BLOCK | ||
diff --git a/Documentation/input/alps.txt b/Documentation/input/alps.txt index ae8ba9a74ce1..3262b6e4d686 100644 --- a/Documentation/input/alps.txt +++ b/Documentation/input/alps.txt | |||
@@ -133,7 +133,7 @@ number of contacts (f1 and f0 in the table below). | |||
133 | 133 | ||
134 | This packet only appears after a position packet with the mt bit set, and | 134 | This packet only appears after a position packet with the mt bit set, and |
135 | usually only appears when there are two or more contacts (although | 135 | usually only appears when there are two or more contacts (although |
136 | occassionally it's seen with only a single contact). | 136 | occasionally it's seen with only a single contact). |
137 | 137 | ||
138 | The final v3 packet type is the trackstick packet. | 138 | The final v3 packet type is the trackstick packet. |
139 | 139 | ||
diff --git a/Documentation/input/event-codes.txt b/Documentation/input/event-codes.txt index 53305bd08182..f1ea2c69648d 100644 --- a/Documentation/input/event-codes.txt +++ b/Documentation/input/event-codes.txt | |||
@@ -196,6 +196,17 @@ EV_MSC: | |||
196 | EV_MSC events are used for input and output events that do not fall under other | 196 | EV_MSC events are used for input and output events that do not fall under other |
197 | categories. | 197 | categories. |
198 | 198 | ||
199 | A few EV_MSC codes have special meaning: | ||
200 | |||
201 | * MSC_TIMESTAMP: | ||
202 | - Used to report the number of microseconds since the last reset. This event | ||
203 | should be coded as an uint32 value, which is allowed to wrap around with | ||
204 | no special consequence. It is assumed that the time difference between two | ||
205 | consecutive events is reliable on a reasonable time scale (hours). | ||
206 | A reset to zero can happen, in which case the time since the last event is | ||
207 | unknown. If the device does not provide this information, the driver must | ||
208 | not provide it to user space. | ||
209 | |||
199 | EV_LED: | 210 | EV_LED: |
200 | ---------- | 211 | ---------- |
201 | EV_LED events are used for input and output to set and query the state of | 212 | EV_LED events are used for input and output to set and query the state of |
diff --git a/Documentation/kbuild/makefiles.txt b/Documentation/kbuild/makefiles.txt index ec9ae6708691..14c3f4f1b617 100644 --- a/Documentation/kbuild/makefiles.txt +++ b/Documentation/kbuild/makefiles.txt | |||
@@ -1175,15 +1175,16 @@ When kbuild executes, the following steps are followed (roughly): | |||
1175 | in an init section in the image. Platform code *must* copy the | 1175 | in an init section in the image. Platform code *must* copy the |
1176 | blob to non-init memory prior to calling unflatten_device_tree(). | 1176 | blob to non-init memory prior to calling unflatten_device_tree(). |
1177 | 1177 | ||
1178 | Example: | 1178 | To use this command, simply add *.dtb into obj-y or targets, or make |
1179 | #arch/x86/platform/ce4100/Makefile | 1179 | some other target depend on %.dtb |
1180 | clean-files := *dtb.S | ||
1181 | 1180 | ||
1182 | DTC_FLAGS := -p 1024 | 1181 | A central rule exists to create $(obj)/%.dtb from $(src)/%.dts; |
1183 | obj-y += foo.dtb.o | 1182 | architecture Makefiles do no need to explicitly write out that rule. |
1184 | 1183 | ||
1185 | $(obj)/%.dtb: $(src)/%.dts | 1184 | Example: |
1186 | $(call cmd,dtc) | 1185 | targets += $(dtb-y) |
1186 | clean-files += *.dtb | ||
1187 | DTC_FLAGS ?= -p 1024 | ||
1187 | 1188 | ||
1188 | --- 6.8 Custom kbuild commands | 1189 | --- 6.8 Custom kbuild commands |
1189 | 1190 | ||
diff --git a/Documentation/kbuild/modules.txt b/Documentation/kbuild/modules.txt index 3fb39e0116b4..69372fb98cf8 100644 --- a/Documentation/kbuild/modules.txt +++ b/Documentation/kbuild/modules.txt | |||
@@ -470,7 +470,7 @@ build. | |||
470 | 470 | ||
471 | Sometimes, an external module uses exported symbols from | 471 | Sometimes, an external module uses exported symbols from |
472 | another external module. kbuild needs to have full knowledge of | 472 | another external module. kbuild needs to have full knowledge of |
473 | all symbols to avoid spitting out warnings about undefined | 473 | all symbols to avoid spliitting out warnings about undefined |
474 | symbols. Three solutions exist for this situation. | 474 | symbols. Three solutions exist for this situation. |
475 | 475 | ||
476 | NOTE: The method with a top-level kbuild file is recommended | 476 | NOTE: The method with a top-level kbuild file is recommended |
diff --git a/Documentation/kernel-doc-nano-HOWTO.txt b/Documentation/kernel-doc-nano-HOWTO.txt index 3d8a97747f77..99b57abddf8a 100644 --- a/Documentation/kernel-doc-nano-HOWTO.txt +++ b/Documentation/kernel-doc-nano-HOWTO.txt | |||
@@ -64,6 +64,8 @@ Example kernel-doc function comment: | |||
64 | * comment lines. | 64 | * comment lines. |
65 | * | 65 | * |
66 | * The longer description can have multiple paragraphs. | 66 | * The longer description can have multiple paragraphs. |
67 | * | ||
68 | * Return: Describe the return value of foobar. | ||
67 | */ | 69 | */ |
68 | 70 | ||
69 | The short description following the subject can span multiple lines | 71 | The short description following the subject can span multiple lines |
@@ -78,6 +80,8 @@ If a function parameter is "..." (varargs), it should be listed in | |||
78 | kernel-doc notation as: | 80 | kernel-doc notation as: |
79 | * @...: description | 81 | * @...: description |
80 | 82 | ||
83 | The return value, if any, should be described in a dedicated section | ||
84 | named "Return". | ||
81 | 85 | ||
82 | Example kernel-doc data structure comment. | 86 | Example kernel-doc data structure comment. |
83 | 87 | ||
@@ -222,6 +226,9 @@ only a "*"). | |||
222 | "section header:" names must be unique per function (or struct, | 226 | "section header:" names must be unique per function (or struct, |
223 | union, typedef, enum). | 227 | union, typedef, enum). |
224 | 228 | ||
229 | Use the section header "Return" for sections describing the return value | ||
230 | of a function. | ||
231 | |||
225 | Avoid putting a spurious blank line after the function name, or else the | 232 | Avoid putting a spurious blank line after the function name, or else the |
226 | description will be repeated! | 233 | description will be repeated! |
227 | 234 | ||
@@ -237,21 +244,21 @@ patterns, which are highlighted appropriately. | |||
237 | NOTE 1: The multi-line descriptive text you provide does *not* recognize | 244 | NOTE 1: The multi-line descriptive text you provide does *not* recognize |
238 | line breaks, so if you try to format some text nicely, as in: | 245 | line breaks, so if you try to format some text nicely, as in: |
239 | 246 | ||
240 | Return codes | 247 | Return: |
241 | 0 - cool | 248 | 0 - cool |
242 | 1 - invalid arg | 249 | 1 - invalid arg |
243 | 2 - out of memory | 250 | 2 - out of memory |
244 | 251 | ||
245 | this will all run together and produce: | 252 | this will all run together and produce: |
246 | 253 | ||
247 | Return codes 0 - cool 1 - invalid arg 2 - out of memory | 254 | Return: 0 - cool 1 - invalid arg 2 - out of memory |
248 | 255 | ||
249 | NOTE 2: If the descriptive text you provide has lines that begin with | 256 | NOTE 2: If the descriptive text you provide has lines that begin with |
250 | some phrase followed by a colon, each of those phrases will be taken as | 257 | some phrase followed by a colon, each of those phrases will be taken as |
251 | a new section heading, which means you should similarly try to avoid text | 258 | a new section heading, which means you should similarly try to avoid text |
252 | like: | 259 | like: |
253 | 260 | ||
254 | Return codes: | 261 | Return: |
255 | 0: cool | 262 | 0: cool |
256 | 1: invalid arg | 263 | 1: invalid arg |
257 | 2: out of memory | 264 | 2: out of memory |
diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt index 9776f068306b..363e348bff9b 100644 --- a/Documentation/kernel-parameters.txt +++ b/Documentation/kernel-parameters.txt | |||
@@ -446,12 +446,6 @@ bytes respectively. Such letter suffixes can also be entirely omitted. | |||
446 | possible to determine what the correct size should be. | 446 | possible to determine what the correct size should be. |
447 | This option provides an override for these situations. | 447 | This option provides an override for these situations. |
448 | 448 | ||
449 | capability.disable= | ||
450 | [SECURITY] Disable capabilities. This would normally | ||
451 | be used only if an alternative security model is to be | ||
452 | configured. Potentially dangerous and should only be | ||
453 | used if you are entirely sure of the consequences. | ||
454 | |||
455 | ccw_timeout_log [S390] | 449 | ccw_timeout_log [S390] |
456 | See Documentation/s390/CommonIO for details. | 450 | See Documentation/s390/CommonIO for details. |
457 | 451 | ||
@@ -905,6 +899,24 @@ bytes respectively. Such letter suffixes can also be entirely omitted. | |||
905 | gpt [EFI] Forces disk with valid GPT signature but | 899 | gpt [EFI] Forces disk with valid GPT signature but |
906 | invalid Protective MBR to be treated as GPT. | 900 | invalid Protective MBR to be treated as GPT. |
907 | 901 | ||
902 | grcan.enable0= [HW] Configuration of physical interface 0. Determines | ||
903 | the "Enable 0" bit of the configuration register. | ||
904 | Format: 0 | 1 | ||
905 | Default: 0 | ||
906 | grcan.enable1= [HW] Configuration of physical interface 1. Determines | ||
907 | the "Enable 0" bit of the configuration register. | ||
908 | Format: 0 | 1 | ||
909 | Default: 0 | ||
910 | grcan.select= [HW] Select which physical interface to use. | ||
911 | Format: 0 | 1 | ||
912 | Default: 0 | ||
913 | grcan.txsize= [HW] Sets the size of the tx buffer. | ||
914 | Format: <unsigned int> such that (txsize & ~0x1fffc0) == 0. | ||
915 | Default: 1024 | ||
916 | grcan.rxsize= [HW] Sets the size of the rx buffer. | ||
917 | Format: <unsigned int> such that (rxsize & ~0x1fffc0) == 0. | ||
918 | Default: 1024 | ||
919 | |||
908 | hashdist= [KNL,NUMA] Large hashes allocated during boot | 920 | hashdist= [KNL,NUMA] Large hashes allocated during boot |
909 | are distributed across NUMA nodes. Defaults on | 921 | are distributed across NUMA nodes. Defaults on |
910 | for 64-bit NUMA, off otherwise. | 922 | for 64-bit NUMA, off otherwise. |
@@ -1304,6 +1316,10 @@ bytes respectively. Such letter suffixes can also be entirely omitted. | |||
1304 | lapic [X86-32,APIC] Enable the local APIC even if BIOS | 1316 | lapic [X86-32,APIC] Enable the local APIC even if BIOS |
1305 | disabled it. | 1317 | disabled it. |
1306 | 1318 | ||
1319 | lapic= [x86,APIC] "notscdeadline" Do not use TSC deadline | ||
1320 | value for LAPIC timer one-shot implementation. Default | ||
1321 | back to the programmable timer unit in the LAPIC. | ||
1322 | |||
1307 | lapic_timer_c2_ok [X86,APIC] trust the local apic timer | 1323 | lapic_timer_c2_ok [X86,APIC] trust the local apic timer |
1308 | in C2 power state. | 1324 | in C2 power state. |
1309 | 1325 | ||
@@ -1481,9 +1497,10 @@ bytes respectively. Such letter suffixes can also be entirely omitted. | |||
1481 | mem=nn[KMG] [KNL,BOOT] Force usage of a specific amount of memory | 1497 | mem=nn[KMG] [KNL,BOOT] Force usage of a specific amount of memory |
1482 | Amount of memory to be used when the kernel is not able | 1498 | Amount of memory to be used when the kernel is not able |
1483 | to see the whole system memory or for test. | 1499 | to see the whole system memory or for test. |
1484 | [X86-32] Use together with memmap= to avoid physical | 1500 | [X86] Work as limiting max address. Use together |
1485 | address space collisions. Without memmap= PCI devices | 1501 | with memmap= to avoid physical address space collisions. |
1486 | could be placed at addresses belonging to unused RAM. | 1502 | Without memmap= PCI devices could be placed at addresses |
1503 | belonging to unused RAM. | ||
1487 | 1504 | ||
1488 | mem=nopentium [BUGS=X86-32] Disable usage of 4MB pages for kernel | 1505 | mem=nopentium [BUGS=X86-32] Disable usage of 4MB pages for kernel |
1489 | memory. | 1506 | memory. |
@@ -1984,6 +2001,20 @@ bytes respectively. Such letter suffixes can also be entirely omitted. | |||
1984 | 2001 | ||
1985 | nox2apic [X86-64,APIC] Do not enable x2APIC mode. | 2002 | nox2apic [X86-64,APIC] Do not enable x2APIC mode. |
1986 | 2003 | ||
2004 | cpu0_hotplug [X86] Turn on CPU0 hotplug feature when | ||
2005 | CONFIG_BOOTPARAM_HOTPLUG_CPU0 is off. | ||
2006 | Some features depend on CPU0. Known dependencies are: | ||
2007 | 1. Resume from suspend/hibernate depends on CPU0. | ||
2008 | Suspend/hibernate will fail if CPU0 is offline and you | ||
2009 | need to online CPU0 before suspend/hibernate. | ||
2010 | 2. PIC interrupts also depend on CPU0. CPU0 can't be | ||
2011 | removed if a PIC interrupt is detected. | ||
2012 | It's said poweroff/reboot may depend on CPU0 on some | ||
2013 | machines although I haven't seen such issues so far | ||
2014 | after CPU0 is offline on a few tested machines. | ||
2015 | If the dependencies are under your control, you can | ||
2016 | turn on cpu0_hotplug. | ||
2017 | |||
1987 | nptcg= [IA-64] Override max number of concurrent global TLB | 2018 | nptcg= [IA-64] Override max number of concurrent global TLB |
1988 | purges which is reported from either PAL_VM_SUMMARY or | 2019 | purges which is reported from either PAL_VM_SUMMARY or |
1989 | SAL PALO. | 2020 | SAL PALO. |
@@ -1996,6 +2027,9 @@ bytes respectively. Such letter suffixes can also be entirely omitted. | |||
1996 | 2027 | ||
1997 | nr_uarts= [SERIAL] maximum number of UARTs to be registered. | 2028 | nr_uarts= [SERIAL] maximum number of UARTs to be registered. |
1998 | 2029 | ||
2030 | numa_balancing= [KNL,X86] Enable or disable automatic NUMA balancing. | ||
2031 | Allowed values are enable and disable | ||
2032 | |||
1999 | numa_zonelist_order= [KNL, BOOT] Select zonelist order for NUMA. | 2033 | numa_zonelist_order= [KNL, BOOT] Select zonelist order for NUMA. |
2000 | one of ['zone', 'node', 'default'] can be specified | 2034 | one of ['zone', 'node', 'default'] can be specified |
2001 | This can be set from sysctl after boot. | 2035 | This can be set from sysctl after boot. |
@@ -2394,6 +2428,27 @@ bytes respectively. Such letter suffixes can also be entirely omitted. | |||
2394 | ramdisk_size= [RAM] Sizes of RAM disks in kilobytes | 2428 | ramdisk_size= [RAM] Sizes of RAM disks in kilobytes |
2395 | See Documentation/blockdev/ramdisk.txt. | 2429 | See Documentation/blockdev/ramdisk.txt. |
2396 | 2430 | ||
2431 | rcu_nocbs= [KNL,BOOT] | ||
2432 | In kernels built with CONFIG_RCU_NOCB_CPU=y, set | ||
2433 | the specified list of CPUs to be no-callback CPUs. | ||
2434 | Invocation of these CPUs' RCU callbacks will | ||
2435 | be offloaded to "rcuoN" kthreads created for | ||
2436 | that purpose. This reduces OS jitter on the | ||
2437 | offloaded CPUs, which can be useful for HPC and | ||
2438 | real-time workloads. It can also improve energy | ||
2439 | efficiency for asymmetric multiprocessors. | ||
2440 | |||
2441 | rcu_nocbs_poll [KNL,BOOT] | ||
2442 | Rather than requiring that offloaded CPUs | ||
2443 | (specified by rcu_nocbs= above) explicitly | ||
2444 | awaken the corresponding "rcuoN" kthreads, | ||
2445 | make these kthreads poll for callbacks. | ||
2446 | This improves the real-time response for the | ||
2447 | offloaded CPUs by relieving them of the need to | ||
2448 | wake up the corresponding kthread, but degrades | ||
2449 | energy efficiency by requiring that the kthreads | ||
2450 | periodically wake up to do the polling. | ||
2451 | |||
2397 | rcutree.blimit= [KNL,BOOT] | 2452 | rcutree.blimit= [KNL,BOOT] |
2398 | Set maximum number of finished RCU callbacks to process | 2453 | Set maximum number of finished RCU callbacks to process |
2399 | in one batch. | 2454 | in one batch. |
@@ -2859,6 +2914,22 @@ bytes respectively. Such letter suffixes can also be entirely omitted. | |||
2859 | to facilitate early boot debugging. | 2914 | to facilitate early boot debugging. |
2860 | See also Documentation/trace/events.txt | 2915 | See also Documentation/trace/events.txt |
2861 | 2916 | ||
2917 | trace_options=[option-list] | ||
2918 | [FTRACE] Enable or disable tracer options at boot. | ||
2919 | The option-list is a comma delimited list of options | ||
2920 | that can be enabled or disabled just as if you were | ||
2921 | to echo the option name into | ||
2922 | |||
2923 | /sys/kernel/debug/tracing/trace_options | ||
2924 | |||
2925 | For example, to enable stacktrace option (to dump the | ||
2926 | stack trace of each event), add to the command line: | ||
2927 | |||
2928 | trace_options=stacktrace | ||
2929 | |||
2930 | See also Documentation/trace/ftrace.txt "trace options" | ||
2931 | section. | ||
2932 | |||
2862 | transparent_hugepage= | 2933 | transparent_hugepage= |
2863 | [KNL] | 2934 | [KNL] |
2864 | Format: [always|madvise|never] | 2935 | Format: [always|madvise|never] |
diff --git a/Documentation/kref.txt b/Documentation/kref.txt index 48ba715d5a63..ddf85a5dde0c 100644 --- a/Documentation/kref.txt +++ b/Documentation/kref.txt | |||
@@ -213,3 +213,91 @@ presentation on krefs, which can be found at: | |||
213 | and: | 213 | and: |
214 | http://www.kroah.com/linux/talks/ols_2004_kref_talk/ | 214 | http://www.kroah.com/linux/talks/ols_2004_kref_talk/ |
215 | 215 | ||
216 | |||
217 | The above example could also be optimized using kref_get_unless_zero() in | ||
218 | the following way: | ||
219 | |||
220 | static struct my_data *get_entry() | ||
221 | { | ||
222 | struct my_data *entry = NULL; | ||
223 | mutex_lock(&mutex); | ||
224 | if (!list_empty(&q)) { | ||
225 | entry = container_of(q.next, struct my_data, link); | ||
226 | if (!kref_get_unless_zero(&entry->refcount)) | ||
227 | entry = NULL; | ||
228 | } | ||
229 | mutex_unlock(&mutex); | ||
230 | return entry; | ||
231 | } | ||
232 | |||
233 | static void release_entry(struct kref *ref) | ||
234 | { | ||
235 | struct my_data *entry = container_of(ref, struct my_data, refcount); | ||
236 | |||
237 | mutex_lock(&mutex); | ||
238 | list_del(&entry->link); | ||
239 | mutex_unlock(&mutex); | ||
240 | kfree(entry); | ||
241 | } | ||
242 | |||
243 | static void put_entry(struct my_data *entry) | ||
244 | { | ||
245 | kref_put(&entry->refcount, release_entry); | ||
246 | } | ||
247 | |||
248 | Which is useful to remove the mutex lock around kref_put() in put_entry(), but | ||
249 | it's important that kref_get_unless_zero is enclosed in the same critical | ||
250 | section that finds the entry in the lookup table, | ||
251 | otherwise kref_get_unless_zero may reference already freed memory. | ||
252 | Note that it is illegal to use kref_get_unless_zero without checking its | ||
253 | return value. If you are sure (by already having a valid pointer) that | ||
254 | kref_get_unless_zero() will return true, then use kref_get() instead. | ||
255 | |||
256 | The function kref_get_unless_zero also makes it possible to use rcu | ||
257 | locking for lookups in the above example: | ||
258 | |||
259 | struct my_data | ||
260 | { | ||
261 | struct rcu_head rhead; | ||
262 | . | ||
263 | struct kref refcount; | ||
264 | . | ||
265 | . | ||
266 | }; | ||
267 | |||
268 | static struct my_data *get_entry_rcu() | ||
269 | { | ||
270 | struct my_data *entry = NULL; | ||
271 | rcu_read_lock(); | ||
272 | if (!list_empty(&q)) { | ||
273 | entry = container_of(q.next, struct my_data, link); | ||
274 | if (!kref_get_unless_zero(&entry->refcount)) | ||
275 | entry = NULL; | ||
276 | } | ||
277 | rcu_read_unlock(); | ||
278 | return entry; | ||
279 | } | ||
280 | |||
281 | static void release_entry_rcu(struct kref *ref) | ||
282 | { | ||
283 | struct my_data *entry = container_of(ref, struct my_data, refcount); | ||
284 | |||
285 | mutex_lock(&mutex); | ||
286 | list_del_rcu(&entry->link); | ||
287 | mutex_unlock(&mutex); | ||
288 | kfree_rcu(entry, rhead); | ||
289 | } | ||
290 | |||
291 | static void put_entry(struct my_data *entry) | ||
292 | { | ||
293 | kref_put(&entry->refcount, release_entry_rcu); | ||
294 | } | ||
295 | |||
296 | But note that the struct kref member needs to remain in valid memory for a | ||
297 | rcu grace period after release_entry_rcu was called. That can be accomplished | ||
298 | by using kfree_rcu(entry, rhead) as done above, or by calling synchronize_rcu() | ||
299 | before using kfree, but note that synchronize_rcu() may sleep for a | ||
300 | substantial amount of time. | ||
301 | |||
302 | |||
303 | Thomas Hellstrom <thellstrom@vmware.com> | ||
diff --git a/Documentation/memory-barriers.txt b/Documentation/memory-barriers.txt index 2759f7c188f0..3c4e1b3b80a1 100644 --- a/Documentation/memory-barriers.txt +++ b/Documentation/memory-barriers.txt | |||
@@ -251,12 +251,13 @@ And there are a number of things that _must_ or _must_not_ be assumed: | |||
251 | 251 | ||
252 | And for: | 252 | And for: |
253 | 253 | ||
254 | *A = X; Y = *A; | 254 | *A = X; *(A + 4) = Y; |
255 | 255 | ||
256 | we may get either of: | 256 | we may get any of: |
257 | 257 | ||
258 | STORE *A = X; Y = LOAD *A; | 258 | STORE *A = X; STORE *(A + 4) = Y; |
259 | STORE *A = Y = X; | 259 | STORE *(A + 4) = Y; STORE *A = X; |
260 | STORE {*A, *(A + 4) } = {X, Y}; | ||
260 | 261 | ||
261 | 262 | ||
262 | ========================= | 263 | ========================= |
diff --git a/Documentation/memory-hotplug.txt b/Documentation/memory-hotplug.txt index 6d0c2519cf47..8e5eacbdcfa3 100644 --- a/Documentation/memory-hotplug.txt +++ b/Documentation/memory-hotplug.txt | |||
@@ -161,7 +161,8 @@ a recent addition and not present on older kernels. | |||
161 | in the memory block. | 161 | in the memory block. |
162 | 'state' : read-write | 162 | 'state' : read-write |
163 | at read: contains online/offline state of memory. | 163 | at read: contains online/offline state of memory. |
164 | at write: user can specify "online", "offline" command | 164 | at write: user can specify "online_kernel", |
165 | "online_movable", "online", "offline" command | ||
165 | which will be performed on al sections in the block. | 166 | which will be performed on al sections in the block. |
166 | 'phys_device' : read-only: designed to show the name of physical memory | 167 | 'phys_device' : read-only: designed to show the name of physical memory |
167 | device. This is not well implemented now. | 168 | device. This is not well implemented now. |
@@ -255,6 +256,17 @@ For onlining, you have to write "online" to the section's state file as: | |||
255 | 256 | ||
256 | % echo online > /sys/devices/system/memory/memoryXXX/state | 257 | % echo online > /sys/devices/system/memory/memoryXXX/state |
257 | 258 | ||
259 | This onlining will not change the ZONE type of the target memory section, | ||
260 | If the memory section is in ZONE_NORMAL, you can change it to ZONE_MOVABLE: | ||
261 | |||
262 | % echo online_movable > /sys/devices/system/memory/memoryXXX/state | ||
263 | (NOTE: current limit: this memory section must be adjacent to ZONE_MOVABLE) | ||
264 | |||
265 | And if the memory section is in ZONE_MOVABLE, you can change it to ZONE_NORMAL: | ||
266 | |||
267 | % echo online_kernel > /sys/devices/system/memory/memoryXXX/state | ||
268 | (NOTE: current limit: this memory section must be adjacent to ZONE_NORMAL) | ||
269 | |||
258 | After this, section memoryXXX's state will be 'online' and the amount of | 270 | After this, section memoryXXX's state will be 'online' and the amount of |
259 | available memory will be increased. | 271 | available memory will be increased. |
260 | 272 | ||
@@ -377,15 +389,21 @@ The third argument is passed by pointer of struct memory_notify. | |||
377 | struct memory_notify { | 389 | struct memory_notify { |
378 | unsigned long start_pfn; | 390 | unsigned long start_pfn; |
379 | unsigned long nr_pages; | 391 | unsigned long nr_pages; |
392 | int status_change_nid_normal; | ||
393 | int status_change_nid_high; | ||
380 | int status_change_nid; | 394 | int status_change_nid; |
381 | } | 395 | } |
382 | 396 | ||
383 | start_pfn is start_pfn of online/offline memory. | 397 | start_pfn is start_pfn of online/offline memory. |
384 | nr_pages is # of pages of online/offline memory. | 398 | nr_pages is # of pages of online/offline memory. |
385 | status_change_nid is set node id when N_HIGH_MEMORY of nodemask is (will be) | 399 | status_change_nid_normal is set node id when N_NORMAL_MEMORY of nodemask |
400 | is (will be) set/clear, if this is -1, then nodemask status is not changed. | ||
401 | status_change_nid_high is set node id when N_HIGH_MEMORY of nodemask | ||
402 | is (will be) set/clear, if this is -1, then nodemask status is not changed. | ||
403 | status_change_nid is set node id when N_MEMORY of nodemask is (will be) | ||
386 | set/clear. It means a new(memoryless) node gets new memory by online and a | 404 | set/clear. It means a new(memoryless) node gets new memory by online and a |
387 | node loses all memory. If this is -1, then nodemask status is not changed. | 405 | node loses all memory. If this is -1, then nodemask status is not changed. |
388 | If status_changed_nid >= 0, callback should create/discard structures for the | 406 | If status_changed_nid* >= 0, callback should create/discard structures for the |
389 | node if necessary. | 407 | node if necessary. |
390 | 408 | ||
391 | -------------- | 409 | -------------- |
diff --git a/Documentation/misc-devices/mei/mei-amt-version.c b/Documentation/misc-devices/mei/mei-amt-version.c index 01804f216312..49e4f770864a 100644 --- a/Documentation/misc-devices/mei/mei-amt-version.c +++ b/Documentation/misc-devices/mei/mei-amt-version.c | |||
@@ -214,7 +214,7 @@ out: | |||
214 | } | 214 | } |
215 | 215 | ||
216 | /*************************************************************************** | 216 | /*************************************************************************** |
217 | * Intel Advanced Management Technolgy ME Client | 217 | * Intel Advanced Management Technology ME Client |
218 | ***************************************************************************/ | 218 | ***************************************************************************/ |
219 | 219 | ||
220 | #define AMT_MAJOR_VERSION 1 | 220 | #define AMT_MAJOR_VERSION 1 |
@@ -256,7 +256,7 @@ struct amt_code_versions { | |||
256 | } __attribute__((packed)); | 256 | } __attribute__((packed)); |
257 | 257 | ||
258 | /*************************************************************************** | 258 | /*************************************************************************** |
259 | * Intel Advanced Management Technolgy Host Interface | 259 | * Intel Advanced Management Technology Host Interface |
260 | ***************************************************************************/ | 260 | ***************************************************************************/ |
261 | 261 | ||
262 | struct amt_host_if_msg_header { | 262 | struct amt_host_if_msg_header { |
diff --git a/Documentation/mmc/mmc-dev-attrs.txt b/Documentation/mmc/mmc-dev-attrs.txt index 22ae8441489f..0d98fac8893b 100644 --- a/Documentation/mmc/mmc-dev-attrs.txt +++ b/Documentation/mmc/mmc-dev-attrs.txt | |||
@@ -25,6 +25,8 @@ All attributes are read-only. | |||
25 | serial Product Serial Number (from CID Register) | 25 | serial Product Serial Number (from CID Register) |
26 | erase_size Erase group size | 26 | erase_size Erase group size |
27 | preferred_erase_size Preferred erase size | 27 | preferred_erase_size Preferred erase size |
28 | raw_rpmb_size_mult RPMB partition size | ||
29 | rel_sectors Reliable write sector count | ||
28 | 30 | ||
29 | Note on Erase Size and Preferred Erase Size: | 31 | Note on Erase Size and Preferred Erase Size: |
30 | 32 | ||
@@ -65,6 +67,11 @@ Note on Erase Size and Preferred Erase Size: | |||
65 | 67 | ||
66 | "preferred_erase_size" is in bytes. | 68 | "preferred_erase_size" is in bytes. |
67 | 69 | ||
70 | Note on raw_rpmb_size_mult: | ||
71 | "raw_rpmb_size_mult" is a mutliple of 128kB block. | ||
72 | RPMB size in byte is calculated by using the following equation: | ||
73 | RPMB partition size = 128kB x raw_rpmb_size_mult | ||
74 | |||
68 | SD/MMC/SDIO Clock Gating Attribute | 75 | SD/MMC/SDIO Clock Gating Attribute |
69 | ================================== | 76 | ================================== |
70 | 77 | ||
diff --git a/Documentation/networking/batman-adv.txt b/Documentation/networking/batman-adv.txt index a173d2a879f5..c1d82047a4b1 100644 --- a/Documentation/networking/batman-adv.txt +++ b/Documentation/networking/batman-adv.txt | |||
@@ -203,7 +203,8 @@ abled during run time. Following log_levels are defined: | |||
203 | 2 - Enable messages related to route added / changed / deleted | 203 | 2 - Enable messages related to route added / changed / deleted |
204 | 4 - Enable messages related to translation table operations | 204 | 4 - Enable messages related to translation table operations |
205 | 8 - Enable messages related to bridge loop avoidance | 205 | 8 - Enable messages related to bridge loop avoidance |
206 | 15 - enable all messages | 206 | 16 - Enable messaged related to DAT, ARP snooping and parsing |
207 | 31 - Enable all messages | ||
207 | 208 | ||
208 | The debug output can be changed at runtime using the file | 209 | The debug output can be changed at runtime using the file |
209 | /sys/class/net/bat0/mesh/log_level. e.g. | 210 | /sys/class/net/bat0/mesh/log_level. e.g. |
diff --git a/Documentation/networking/ip-sysctl.txt b/Documentation/networking/ip-sysctl.txt index c7fc10724948..dd52d516cb89 100644 --- a/Documentation/networking/ip-sysctl.txt +++ b/Documentation/networking/ip-sysctl.txt | |||
@@ -30,16 +30,24 @@ neigh/default/gc_thresh3 - INTEGER | |||
30 | Maximum number of neighbor entries allowed. Increase this | 30 | Maximum number of neighbor entries allowed. Increase this |
31 | when using large numbers of interfaces and when communicating | 31 | when using large numbers of interfaces and when communicating |
32 | with large numbers of directly-connected peers. | 32 | with large numbers of directly-connected peers. |
33 | Default: 1024 | ||
33 | 34 | ||
34 | neigh/default/unres_qlen_bytes - INTEGER | 35 | neigh/default/unres_qlen_bytes - INTEGER |
35 | The maximum number of bytes which may be used by packets | 36 | The maximum number of bytes which may be used by packets |
36 | queued for each unresolved address by other network layers. | 37 | queued for each unresolved address by other network layers. |
37 | (added in linux 3.3) | 38 | (added in linux 3.3) |
39 | Seting negative value is meaningless and will retrun error. | ||
40 | Default: 65536 Bytes(64KB) | ||
38 | 41 | ||
39 | neigh/default/unres_qlen - INTEGER | 42 | neigh/default/unres_qlen - INTEGER |
40 | The maximum number of packets which may be queued for each | 43 | The maximum number of packets which may be queued for each |
41 | unresolved address by other network layers. | 44 | unresolved address by other network layers. |
42 | (deprecated in linux 3.3) : use unres_qlen_bytes instead. | 45 | (deprecated in linux 3.3) : use unres_qlen_bytes instead. |
46 | Prior to linux 3.3, the default value is 3 which may cause | ||
47 | unexpected packet loss. The current default value is calculated | ||
48 | according to default value of unres_qlen_bytes and true size of | ||
49 | packet. | ||
50 | Default: 31 | ||
43 | 51 | ||
44 | mtu_expires - INTEGER | 52 | mtu_expires - INTEGER |
45 | Time, in seconds, that cached PMTU information is kept. | 53 | Time, in seconds, that cached PMTU information is kept. |
@@ -199,15 +207,16 @@ tcp_early_retrans - INTEGER | |||
199 | Default: 2 | 207 | Default: 2 |
200 | 208 | ||
201 | tcp_ecn - INTEGER | 209 | tcp_ecn - INTEGER |
202 | Enable Explicit Congestion Notification (ECN) in TCP. ECN is only | 210 | Control use of Explicit Congestion Notification (ECN) by TCP. |
203 | used when both ends of the TCP flow support it. It is useful to | 211 | ECN is used only when both ends of the TCP connection indicate |
204 | avoid losses due to congestion (when the bottleneck router supports | 212 | support for it. This feature is useful in avoiding losses due |
205 | ECN). | 213 | to congestion by allowing supporting routers to signal |
214 | congestion before having to drop packets. | ||
206 | Possible values are: | 215 | Possible values are: |
207 | 0 disable ECN | 216 | 0 Disable ECN. Neither initiate nor accept ECN. |
208 | 1 ECN enabled | 217 | 1 Always request ECN on outgoing connection attempts. |
209 | 2 Only server-side ECN enabled. If the other end does | 218 | 2 Enable ECN when requested by incomming connections |
210 | not support ECN, behavior is like with ECN disabled. | 219 | but do not request ECN on outgoing connections. |
211 | Default: 2 | 220 | Default: 2 |
212 | 221 | ||
213 | tcp_fack - BOOLEAN | 222 | tcp_fack - BOOLEAN |
@@ -215,15 +224,14 @@ tcp_fack - BOOLEAN | |||
215 | The value is not used, if tcp_sack is not enabled. | 224 | The value is not used, if tcp_sack is not enabled. |
216 | 225 | ||
217 | tcp_fin_timeout - INTEGER | 226 | tcp_fin_timeout - INTEGER |
218 | Time to hold socket in state FIN-WAIT-2, if it was closed | 227 | The length of time an orphaned (no longer referenced by any |
219 | by our side. Peer can be broken and never close its side, | 228 | application) connection will remain in the FIN_WAIT_2 state |
220 | or even died unexpectedly. Default value is 60sec. | 229 | before it is aborted at the local end. While a perfectly |
221 | Usual value used in 2.2 was 180 seconds, you may restore | 230 | valid "receive only" state for an un-orphaned connection, an |
222 | it, but remember that if your machine is even underloaded WEB server, | 231 | orphaned connection in FIN_WAIT_2 state could otherwise wait |
223 | you risk to overflow memory with kilotons of dead sockets, | 232 | forever for the remote to close its end of the connection. |
224 | FIN-WAIT-2 sockets are less dangerous than FIN-WAIT-1, | 233 | Cf. tcp_max_orphans |
225 | because they eat maximum 1.5K of memory, but they tend | 234 | Default: 60 seconds |
226 | to live longer. Cf. tcp_max_orphans. | ||
227 | 235 | ||
228 | tcp_frto - INTEGER | 236 | tcp_frto - INTEGER |
229 | Enables Forward RTO-Recovery (F-RTO) defined in RFC4138. | 237 | Enables Forward RTO-Recovery (F-RTO) defined in RFC4138. |
@@ -1514,6 +1522,20 @@ cookie_preserve_enable - BOOLEAN | |||
1514 | 1522 | ||
1515 | Default: 1 | 1523 | Default: 1 |
1516 | 1524 | ||
1525 | cookie_hmac_alg - STRING | ||
1526 | Select the hmac algorithm used when generating the cookie value sent by | ||
1527 | a listening sctp socket to a connecting client in the INIT-ACK chunk. | ||
1528 | Valid values are: | ||
1529 | * md5 | ||
1530 | * sha1 | ||
1531 | * none | ||
1532 | Ability to assign md5 or sha1 as the selected alg is predicated on the | ||
1533 | configuarion of those algorithms at build time (CONFIG_CRYPTO_MD5 and | ||
1534 | CONFIG_CRYPTO_SHA1). | ||
1535 | |||
1536 | Default: Dependent on configuration. MD5 if available, else SHA1 if | ||
1537 | available, else none. | ||
1538 | |||
1517 | rcvbuf_policy - INTEGER | 1539 | rcvbuf_policy - INTEGER |
1518 | Determines if the receive buffer is attributed to the socket or to | 1540 | Determines if the receive buffer is attributed to the socket or to |
1519 | association. SCTP supports the capability to create multiple | 1541 | association. SCTP supports the capability to create multiple |
diff --git a/Documentation/networking/netdev-features.txt b/Documentation/networking/netdev-features.txt index 4164f5c02e4b..f310edec8a77 100644 --- a/Documentation/networking/netdev-features.txt +++ b/Documentation/networking/netdev-features.txt | |||
@@ -164,4 +164,4 @@ read the CRC recorded by the NIC on receipt of the packet. | |||
164 | This requests that the NIC receive all possible frames, including errored | 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 | 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 | 166 | bad packets on it. Some NICs may receive more packets if also put into normal |
167 | PROMISC mdoe. | 167 | PROMISC mode. |
diff --git a/Documentation/networking/packet_mmap.txt b/Documentation/networking/packet_mmap.txt index 1c08a4b0981f..94444b152fbc 100644 --- a/Documentation/networking/packet_mmap.txt +++ b/Documentation/networking/packet_mmap.txt | |||
@@ -3,9 +3,9 @@ | |||
3 | -------------------------------------------------------------------------------- | 3 | -------------------------------------------------------------------------------- |
4 | 4 | ||
5 | This file documents the mmap() facility available with the PACKET | 5 | This file documents the mmap() facility available with the PACKET |
6 | socket interface on 2.4 and 2.6 kernels. This type of sockets is used for | 6 | socket interface on 2.4/2.6/3.x kernels. This type of sockets is used for |
7 | capture network traffic with utilities like tcpdump or any other that needs | 7 | i) capture network traffic with utilities like tcpdump, ii) transmit network |
8 | raw access to network interface. | 8 | traffic, or any other that needs raw access to network interface. |
9 | 9 | ||
10 | You can find the latest version of this document at: | 10 | You can find the latest version of this document at: |
11 | http://wiki.ipxwarzone.com/index.php5?title=Linux_packet_mmap | 11 | http://wiki.ipxwarzone.com/index.php5?title=Linux_packet_mmap |
@@ -21,19 +21,18 @@ Please send your comments to | |||
21 | + Why use PACKET_MMAP | 21 | + Why use PACKET_MMAP |
22 | -------------------------------------------------------------------------------- | 22 | -------------------------------------------------------------------------------- |
23 | 23 | ||
24 | In Linux 2.4/2.6 if PACKET_MMAP is not enabled, the capture process is very | 24 | In Linux 2.4/2.6/3.x if PACKET_MMAP is not enabled, the capture process is very |
25 | inefficient. It uses very limited buffers and requires one system call | 25 | inefficient. It uses very limited buffers and requires one system call to |
26 | to capture each packet, it requires two if you want to get packet's | 26 | capture each packet, it requires two if you want to get packet's timestamp |
27 | timestamp (like libpcap always does). | 27 | (like libpcap always does). |
28 | 28 | ||
29 | In the other hand PACKET_MMAP is very efficient. PACKET_MMAP provides a size | 29 | In the other hand PACKET_MMAP is very efficient. PACKET_MMAP provides a size |
30 | configurable circular buffer mapped in user space that can be used to either | 30 | configurable circular buffer mapped in user space that can be used to either |
31 | send or receive packets. This way reading packets just needs to wait for them, | 31 | send or receive packets. This way reading packets just needs to wait for them, |
32 | most of the time there is no need to issue a single system call. Concerning | 32 | most of the time there is no need to issue a single system call. Concerning |
33 | transmission, multiple packets can be sent through one system call to get the | 33 | transmission, multiple packets can be sent through one system call to get the |
34 | highest bandwidth. | 34 | highest bandwidth. By using a shared buffer between the kernel and the user |
35 | By using a shared buffer between the kernel and the user also has the benefit | 35 | also has the benefit of minimizing packet copies. |
36 | of minimizing packet copies. | ||
37 | 36 | ||
38 | It's fine to use PACKET_MMAP to improve the performance of the capture and | 37 | It's fine to use PACKET_MMAP to improve the performance of the capture and |
39 | transmission process, but it isn't everything. At least, if you are capturing | 38 | transmission process, but it isn't everything. At least, if you are capturing |
@@ -41,7 +40,8 @@ at high speeds (this is relative to the cpu speed), you should check if the | |||
41 | device driver of your network interface card supports some sort of interrupt | 40 | device driver of your network interface card supports some sort of interrupt |
42 | load mitigation or (even better) if it supports NAPI, also make sure it is | 41 | load mitigation or (even better) if it supports NAPI, also make sure it is |
43 | enabled. For transmission, check the MTU (Maximum Transmission Unit) used and | 42 | enabled. For transmission, check the MTU (Maximum Transmission Unit) used and |
44 | supported by devices of your network. | 43 | supported by devices of your network. CPU IRQ pinning of your network interface |
44 | card can also be an advantage. | ||
45 | 45 | ||
46 | -------------------------------------------------------------------------------- | 46 | -------------------------------------------------------------------------------- |
47 | + How to use mmap() to improve capture process | 47 | + How to use mmap() to improve capture process |
@@ -87,9 +87,7 @@ the following process: | |||
87 | socket creation and destruction is straight forward, and is done | 87 | socket creation and destruction is straight forward, and is done |
88 | the same way with or without PACKET_MMAP: | 88 | the same way with or without PACKET_MMAP: |
89 | 89 | ||
90 | int fd; | 90 | int fd = socket(PF_PACKET, mode, htons(ETH_P_ALL)); |
91 | |||
92 | fd= socket(PF_PACKET, mode, htons(ETH_P_ALL)) | ||
93 | 91 | ||
94 | where mode is SOCK_RAW for the raw interface were link level | 92 | where mode is SOCK_RAW for the raw interface were link level |
95 | information can be captured or SOCK_DGRAM for the cooked | 93 | information can be captured or SOCK_DGRAM for the cooked |
@@ -163,11 +161,23 @@ As capture, each frame contains two parts: | |||
163 | 161 | ||
164 | A complete tutorial is available at: http://wiki.gnu-log.net/ | 162 | A complete tutorial is available at: http://wiki.gnu-log.net/ |
165 | 163 | ||
164 | By default, the user should put data at : | ||
165 | frame base + TPACKET_HDRLEN - sizeof(struct sockaddr_ll) | ||
166 | |||
167 | So, whatever you choose for the socket mode (SOCK_DGRAM or SOCK_RAW), | ||
168 | the beginning of the user data will be at : | ||
169 | frame base + TPACKET_ALIGN(sizeof(struct tpacket_hdr)) | ||
170 | |||
171 | If you wish to put user data at a custom offset from the beginning of | ||
172 | the frame (for payload alignment with SOCK_RAW mode for instance) you | ||
173 | can set tp_net (with SOCK_DGRAM) or tp_mac (with SOCK_RAW). In order | ||
174 | to make this work it must be enabled previously with setsockopt() | ||
175 | and the PACKET_TX_HAS_OFF option. | ||
176 | |||
166 | -------------------------------------------------------------------------------- | 177 | -------------------------------------------------------------------------------- |
167 | + PACKET_MMAP settings | 178 | + PACKET_MMAP settings |
168 | -------------------------------------------------------------------------------- | 179 | -------------------------------------------------------------------------------- |
169 | 180 | ||
170 | |||
171 | To setup PACKET_MMAP from user level code is done with a call like | 181 | To setup PACKET_MMAP from user level code is done with a call like |
172 | 182 | ||
173 | - Capture process | 183 | - Capture process |
@@ -201,7 +211,6 @@ indeed, packet_set_ring checks that the following condition is true | |||
201 | 211 | ||
202 | frames_per_block * tp_block_nr == tp_frame_nr | 212 | frames_per_block * tp_block_nr == tp_frame_nr |
203 | 213 | ||
204 | |||
205 | Lets see an example, with the following values: | 214 | Lets see an example, with the following values: |
206 | 215 | ||
207 | tp_block_size= 4096 | 216 | tp_block_size= 4096 |
@@ -227,7 +236,6 @@ be spawned across two blocks, so there are some details you have to take into | |||
227 | account when choosing the frame_size. See "Mapping and use of the circular | 236 | account when choosing the frame_size. See "Mapping and use of the circular |
228 | buffer (ring)". | 237 | buffer (ring)". |
229 | 238 | ||
230 | |||
231 | -------------------------------------------------------------------------------- | 239 | -------------------------------------------------------------------------------- |
232 | + PACKET_MMAP setting constraints | 240 | + PACKET_MMAP setting constraints |
233 | -------------------------------------------------------------------------------- | 241 | -------------------------------------------------------------------------------- |
@@ -264,7 +272,6 @@ User space programs can include /usr/include/sys/user.h and | |||
264 | The pagesize can also be determined dynamically with the getpagesize (2) | 272 | The pagesize can also be determined dynamically with the getpagesize (2) |
265 | system call. | 273 | system call. |
266 | 274 | ||
267 | |||
268 | Block number limit | 275 | Block number limit |
269 | -------------------- | 276 | -------------------- |
270 | 277 | ||
@@ -284,7 +291,6 @@ called pg_vec, its size limits the number of blocks that can be allocated. | |||
284 | v block #2 | 291 | v block #2 |
285 | block #1 | 292 | block #1 |
286 | 293 | ||
287 | |||
288 | kmalloc allocates any number of bytes of physically contiguous memory from | 294 | kmalloc allocates any number of bytes of physically contiguous memory from |
289 | a pool of pre-determined sizes. This pool of memory is maintained by the slab | 295 | a pool of pre-determined sizes. This pool of memory is maintained by the slab |
290 | allocator which is at the end the responsible for doing the allocation and | 296 | allocator which is at the end the responsible for doing the allocation and |
@@ -299,7 +305,6 @@ pointers to blocks is | |||
299 | 305 | ||
300 | 131072/4 = 32768 blocks | 306 | 131072/4 = 32768 blocks |
301 | 307 | ||
302 | |||
303 | PACKET_MMAP buffer size calculator | 308 | PACKET_MMAP buffer size calculator |
304 | ------------------------------------ | 309 | ------------------------------------ |
305 | 310 | ||
@@ -340,7 +345,6 @@ and a value for <frame size> of 2048 bytes. These parameters will yield | |||
340 | and hence the buffer will have a 262144 MiB size. So it can hold | 345 | and hence the buffer will have a 262144 MiB size. So it can hold |
341 | 262144 MiB / 2048 bytes = 134217728 frames | 346 | 262144 MiB / 2048 bytes = 134217728 frames |
342 | 347 | ||
343 | |||
344 | Actually, this buffer size is not possible with an i386 architecture. | 348 | Actually, this buffer size is not possible with an i386 architecture. |
345 | Remember that the memory is allocated in kernel space, in the case of | 349 | Remember that the memory is allocated in kernel space, in the case of |
346 | an i386 kernel's memory size is limited to 1GiB. | 350 | an i386 kernel's memory size is limited to 1GiB. |
@@ -372,7 +376,6 @@ the following (from include/linux/if_packet.h): | |||
372 | - Start+tp_net: Packet data, aligned to TPACKET_ALIGNMENT=16. | 376 | - Start+tp_net: Packet data, aligned to TPACKET_ALIGNMENT=16. |
373 | - Pad to align to TPACKET_ALIGNMENT=16 | 377 | - Pad to align to TPACKET_ALIGNMENT=16 |
374 | */ | 378 | */ |
375 | |||
376 | 379 | ||
377 | The following are conditions that are checked in packet_set_ring | 380 | The following are conditions that are checked in packet_set_ring |
378 | 381 | ||
@@ -413,7 +416,6 @@ and the following flags apply: | |||
413 | #define TP_STATUS_LOSING 4 | 416 | #define TP_STATUS_LOSING 4 |
414 | #define TP_STATUS_CSUMNOTREADY 8 | 417 | #define TP_STATUS_CSUMNOTREADY 8 |
415 | 418 | ||
416 | |||
417 | TP_STATUS_COPY : This flag indicates that the frame (and associated | 419 | TP_STATUS_COPY : This flag indicates that the frame (and associated |
418 | meta information) has been truncated because it's | 420 | meta information) has been truncated because it's |
419 | larger than tp_frame_size. This packet can be | 421 | larger than tp_frame_size. This packet can be |
@@ -462,7 +464,6 @@ packets are in the ring: | |||
462 | It doesn't incur in a race condition to first check the status value and | 464 | It doesn't incur in a race condition to first check the status value and |
463 | then poll for frames. | 465 | then poll for frames. |
464 | 466 | ||
465 | |||
466 | ++ Transmission process | 467 | ++ Transmission process |
467 | Those defines are also used for transmission: | 468 | Those defines are also used for transmission: |
468 | 469 | ||
@@ -494,6 +495,196 @@ The user can also use poll() to check if a buffer is available: | |||
494 | retval = poll(&pfd, 1, timeout); | 495 | retval = poll(&pfd, 1, timeout); |
495 | 496 | ||
496 | ------------------------------------------------------------------------------- | 497 | ------------------------------------------------------------------------------- |
498 | + What TPACKET versions are available and when to use them? | ||
499 | ------------------------------------------------------------------------------- | ||
500 | |||
501 | int val = tpacket_version; | ||
502 | setsockopt(fd, SOL_PACKET, PACKET_VERSION, &val, sizeof(val)); | ||
503 | getsockopt(fd, SOL_PACKET, PACKET_VERSION, &val, sizeof(val)); | ||
504 | |||
505 | where 'tpacket_version' can be TPACKET_V1 (default), TPACKET_V2, TPACKET_V3. | ||
506 | |||
507 | TPACKET_V1: | ||
508 | - Default if not otherwise specified by setsockopt(2) | ||
509 | - RX_RING, TX_RING available | ||
510 | - VLAN metadata information available for packets | ||
511 | (TP_STATUS_VLAN_VALID) | ||
512 | |||
513 | TPACKET_V1 --> TPACKET_V2: | ||
514 | - Made 64 bit clean due to unsigned long usage in TPACKET_V1 | ||
515 | structures, thus this also works on 64 bit kernel with 32 bit | ||
516 | userspace and the like | ||
517 | - Timestamp resolution in nanoseconds instead of microseconds | ||
518 | - RX_RING, TX_RING available | ||
519 | - How to switch to TPACKET_V2: | ||
520 | 1. Replace struct tpacket_hdr by struct tpacket2_hdr | ||
521 | 2. Query header len and save | ||
522 | 3. Set protocol version to 2, set up ring as usual | ||
523 | 4. For getting the sockaddr_ll, | ||
524 | use (void *)hdr + TPACKET_ALIGN(hdrlen) instead of | ||
525 | (void *)hdr + TPACKET_ALIGN(sizeof(struct tpacket_hdr)) | ||
526 | |||
527 | TPACKET_V2 --> TPACKET_V3: | ||
528 | - Flexible buffer implementation: | ||
529 | 1. Blocks can be configured with non-static frame-size | ||
530 | 2. Read/poll is at a block-level (as opposed to packet-level) | ||
531 | 3. Added poll timeout to avoid indefinite user-space wait | ||
532 | on idle links | ||
533 | 4. Added user-configurable knobs: | ||
534 | 4.1 block::timeout | ||
535 | 4.2 tpkt_hdr::sk_rxhash | ||
536 | - RX Hash data available in user space | ||
537 | - Currently only RX_RING available | ||
538 | |||
539 | ------------------------------------------------------------------------------- | ||
540 | + AF_PACKET fanout mode | ||
541 | ------------------------------------------------------------------------------- | ||
542 | |||
543 | In the AF_PACKET fanout mode, packet reception can be load balanced among | ||
544 | processes. This also works in combination with mmap(2) on packet sockets. | ||
545 | |||
546 | Minimal example code by David S. Miller (try things like "./test eth0 hash", | ||
547 | "./test eth0 lb", etc.): | ||
548 | |||
549 | #include <stddef.h> | ||
550 | #include <stdlib.h> | ||
551 | #include <stdio.h> | ||
552 | #include <string.h> | ||
553 | |||
554 | #include <sys/types.h> | ||
555 | #include <sys/wait.h> | ||
556 | #include <sys/socket.h> | ||
557 | #include <sys/ioctl.h> | ||
558 | |||
559 | #include <unistd.h> | ||
560 | |||
561 | #include <linux/if_ether.h> | ||
562 | #include <linux/if_packet.h> | ||
563 | |||
564 | #include <net/if.h> | ||
565 | |||
566 | static const char *device_name; | ||
567 | static int fanout_type; | ||
568 | static int fanout_id; | ||
569 | |||
570 | #ifndef PACKET_FANOUT | ||
571 | # define PACKET_FANOUT 18 | ||
572 | # define PACKET_FANOUT_HASH 0 | ||
573 | # define PACKET_FANOUT_LB 1 | ||
574 | #endif | ||
575 | |||
576 | static int setup_socket(void) | ||
577 | { | ||
578 | int err, fd = socket(AF_PACKET, SOCK_RAW, htons(ETH_P_IP)); | ||
579 | struct sockaddr_ll ll; | ||
580 | struct ifreq ifr; | ||
581 | int fanout_arg; | ||
582 | |||
583 | if (fd < 0) { | ||
584 | perror("socket"); | ||
585 | return EXIT_FAILURE; | ||
586 | } | ||
587 | |||
588 | memset(&ifr, 0, sizeof(ifr)); | ||
589 | strcpy(ifr.ifr_name, device_name); | ||
590 | err = ioctl(fd, SIOCGIFINDEX, &ifr); | ||
591 | if (err < 0) { | ||
592 | perror("SIOCGIFINDEX"); | ||
593 | return EXIT_FAILURE; | ||
594 | } | ||
595 | |||
596 | memset(&ll, 0, sizeof(ll)); | ||
597 | ll.sll_family = AF_PACKET; | ||
598 | ll.sll_ifindex = ifr.ifr_ifindex; | ||
599 | err = bind(fd, (struct sockaddr *) &ll, sizeof(ll)); | ||
600 | if (err < 0) { | ||
601 | perror("bind"); | ||
602 | return EXIT_FAILURE; | ||
603 | } | ||
604 | |||
605 | fanout_arg = (fanout_id | (fanout_type << 16)); | ||
606 | err = setsockopt(fd, SOL_PACKET, PACKET_FANOUT, | ||
607 | &fanout_arg, sizeof(fanout_arg)); | ||
608 | if (err) { | ||
609 | perror("setsockopt"); | ||
610 | return EXIT_FAILURE; | ||
611 | } | ||
612 | |||
613 | return fd; | ||
614 | } | ||
615 | |||
616 | static void fanout_thread(void) | ||
617 | { | ||
618 | int fd = setup_socket(); | ||
619 | int limit = 10000; | ||
620 | |||
621 | if (fd < 0) | ||
622 | exit(fd); | ||
623 | |||
624 | while (limit-- > 0) { | ||
625 | char buf[1600]; | ||
626 | int err; | ||
627 | |||
628 | err = read(fd, buf, sizeof(buf)); | ||
629 | if (err < 0) { | ||
630 | perror("read"); | ||
631 | exit(EXIT_FAILURE); | ||
632 | } | ||
633 | if ((limit % 10) == 0) | ||
634 | fprintf(stdout, "(%d) \n", getpid()); | ||
635 | } | ||
636 | |||
637 | fprintf(stdout, "%d: Received 10000 packets\n", getpid()); | ||
638 | |||
639 | close(fd); | ||
640 | exit(0); | ||
641 | } | ||
642 | |||
643 | int main(int argc, char **argp) | ||
644 | { | ||
645 | int fd, err; | ||
646 | int i; | ||
647 | |||
648 | if (argc != 3) { | ||
649 | fprintf(stderr, "Usage: %s INTERFACE {hash|lb}\n", argp[0]); | ||
650 | return EXIT_FAILURE; | ||
651 | } | ||
652 | |||
653 | if (!strcmp(argp[2], "hash")) | ||
654 | fanout_type = PACKET_FANOUT_HASH; | ||
655 | else if (!strcmp(argp[2], "lb")) | ||
656 | fanout_type = PACKET_FANOUT_LB; | ||
657 | else { | ||
658 | fprintf(stderr, "Unknown fanout type [%s]\n", argp[2]); | ||
659 | exit(EXIT_FAILURE); | ||
660 | } | ||
661 | |||
662 | device_name = argp[1]; | ||
663 | fanout_id = getpid() & 0xffff; | ||
664 | |||
665 | for (i = 0; i < 4; i++) { | ||
666 | pid_t pid = fork(); | ||
667 | |||
668 | switch (pid) { | ||
669 | case 0: | ||
670 | fanout_thread(); | ||
671 | |||
672 | case -1: | ||
673 | perror("fork"); | ||
674 | exit(EXIT_FAILURE); | ||
675 | } | ||
676 | } | ||
677 | |||
678 | for (i = 0; i < 4; i++) { | ||
679 | int status; | ||
680 | |||
681 | wait(&status); | ||
682 | } | ||
683 | |||
684 | return 0; | ||
685 | } | ||
686 | |||
687 | ------------------------------------------------------------------------------- | ||
497 | + PACKET_TIMESTAMP | 688 | + PACKET_TIMESTAMP |
498 | ------------------------------------------------------------------------------- | 689 | ------------------------------------------------------------------------------- |
499 | 690 | ||
@@ -519,6 +710,13 @@ the networking stack is used (the behavior before this setting was added). | |||
519 | See include/linux/net_tstamp.h and Documentation/networking/timestamping | 710 | See include/linux/net_tstamp.h and Documentation/networking/timestamping |
520 | for more information on hardware timestamps. | 711 | for more information on hardware timestamps. |
521 | 712 | ||
713 | ------------------------------------------------------------------------------- | ||
714 | + Miscellaneous bits | ||
715 | ------------------------------------------------------------------------------- | ||
716 | |||
717 | - Packet sockets work well together with Linux socket filters, thus you also | ||
718 | might want to have a look at Documentation/networking/filter.txt | ||
719 | |||
522 | -------------------------------------------------------------------------------- | 720 | -------------------------------------------------------------------------------- |
523 | + THANKS | 721 | + THANKS |
524 | -------------------------------------------------------------------------------- | 722 | -------------------------------------------------------------------------------- |
diff --git a/Documentation/networking/stmmac.txt b/Documentation/networking/stmmac.txt index ef9ee71b4d7f..f9fa6db40a52 100644 --- a/Documentation/networking/stmmac.txt +++ b/Documentation/networking/stmmac.txt | |||
@@ -29,11 +29,9 @@ The kernel configuration option is STMMAC_ETH: | |||
29 | dma_txsize: DMA tx ring size; | 29 | dma_txsize: DMA tx ring size; |
30 | buf_sz: DMA buffer size; | 30 | buf_sz: DMA buffer size; |
31 | tc: control the HW FIFO threshold; | 31 | tc: control the HW FIFO threshold; |
32 | tx_coe: Enable/Disable Tx Checksum Offload engine; | ||
33 | watchdog: transmit timeout (in milliseconds); | 32 | watchdog: transmit timeout (in milliseconds); |
34 | flow_ctrl: Flow control ability [on/off]; | 33 | flow_ctrl: Flow control ability [on/off]; |
35 | pause: Flow Control Pause Time; | 34 | pause: Flow Control Pause Time; |
36 | tmrate: timer period (only if timer optimisation is configured). | ||
37 | 35 | ||
38 | 3) Command line options | 36 | 3) Command line options |
39 | Driver parameters can be also passed in command line by using: | 37 | Driver parameters can be also passed in command line by using: |
@@ -60,17 +58,19 @@ Then the poll method will be scheduled at some future point. | |||
60 | The incoming packets are stored, by the DMA, in a list of pre-allocated socket | 58 | The incoming packets are stored, by the DMA, in a list of pre-allocated socket |
61 | buffers in order to avoid the memcpy (Zero-copy). | 59 | buffers in order to avoid the memcpy (Zero-copy). |
62 | 60 | ||
63 | 4.3) Timer-Driver Interrupt | 61 | 4.3) Interrupt Mitigation |
64 | Instead of having the device that asynchronously notifies the frame receptions, | 62 | The driver is able to mitigate the number of its DMA interrupts |
65 | the driver configures a timer to generate an interrupt at regular intervals. | 63 | using NAPI for the reception on chips older than the 3.50. |
66 | Based on the granularity of the timer, the frames that are received by the | 64 | New chips have an HW RX-Watchdog used for this mitigation. |
67 | device will experience different levels of latency. Some NICs have dedicated | 65 | |
68 | timer device to perform this task. STMMAC can use either the RTC device or the | 66 | On Tx-side, the mitigation schema is based on a SW timer that calls the |
69 | TMU channel 2 on STLinux platforms. | 67 | tx function (stmmac_tx) to reclaim the resource after transmitting the |
70 | The timers frequency can be passed to the driver as parameter; when change it, | 68 | frames. |
71 | take care of both hardware capability and network stability/performance impact. | 69 | Also there is another parameter (like a threshold) used to program |
72 | Several performance tests on STM platforms showed this optimisation allows to | 70 | the descriptors avoiding to set the interrupt on completion bit in |
73 | spare the CPU while having the maximum throughput. | 71 | when the frame is sent (xmit). |
72 | |||
73 | Mitigation parameters can be tuned by ethtool. | ||
74 | 74 | ||
75 | 4.4) WOL | 75 | 4.4) WOL |
76 | Wake up on Lan feature through Magic and Unicast frames are supported for the | 76 | Wake up on Lan feature through Magic and Unicast frames are supported for the |
@@ -121,6 +121,7 @@ struct plat_stmmacenet_data { | |||
121 | int bugged_jumbo; | 121 | int bugged_jumbo; |
122 | int pmt; | 122 | int pmt; |
123 | int force_sf_dma_mode; | 123 | int force_sf_dma_mode; |
124 | int riwt_off; | ||
124 | void (*fix_mac_speed)(void *priv, unsigned int speed); | 125 | void (*fix_mac_speed)(void *priv, unsigned int speed); |
125 | void (*bus_setup)(void __iomem *ioaddr); | 126 | void (*bus_setup)(void __iomem *ioaddr); |
126 | int (*init)(struct platform_device *pdev); | 127 | int (*init)(struct platform_device *pdev); |
@@ -156,6 +157,7 @@ Where: | |||
156 | o pmt: core has the embedded power module (optional). | 157 | o pmt: core has the embedded power module (optional). |
157 | o force_sf_dma_mode: force DMA to use the Store and Forward mode | 158 | o force_sf_dma_mode: force DMA to use the Store and Forward mode |
158 | instead of the Threshold. | 159 | instead of the Threshold. |
160 | o riwt_off: force to disable the RX watchdog feature and switch to NAPI mode. | ||
159 | o fix_mac_speed: this callback is used for modifying some syscfg registers | 161 | o fix_mac_speed: this callback is used for modifying some syscfg registers |
160 | (on ST SoCs) according to the link speed negotiated by the | 162 | (on ST SoCs) according to the link speed negotiated by the |
161 | physical layer . | 163 | physical layer . |
diff --git a/Documentation/networking/vxlan.txt b/Documentation/networking/vxlan.txt index 5b34b762d7d5..6d993510f091 100644 --- a/Documentation/networking/vxlan.txt +++ b/Documentation/networking/vxlan.txt | |||
@@ -32,7 +32,7 @@ no entry is in the forwarding table. | |||
32 | # ip link delete vxlan0 | 32 | # ip link delete vxlan0 |
33 | 33 | ||
34 | 3. Show vxlan info | 34 | 3. Show vxlan info |
35 | # ip -d show vxlan0 | 35 | # ip -d link show vxlan0 |
36 | 36 | ||
37 | It is possible to create, destroy and display the vxlan | 37 | It is possible to create, destroy and display the vxlan |
38 | forwarding table using the new bridge command. | 38 | forwarding table using the new bridge command. |
@@ -41,7 +41,7 @@ forwarding table using the new bridge command. | |||
41 | # bridge fdb add to 00:17:42:8a:b4:05 dst 192.19.0.2 dev vxlan0 | 41 | # bridge fdb add to 00:17:42:8a:b4:05 dst 192.19.0.2 dev vxlan0 |
42 | 42 | ||
43 | 2. Delete forwarding table entry | 43 | 2. Delete forwarding table entry |
44 | # bridge fdb delete 00:17:42:8a:b4:05 | 44 | # bridge fdb delete 00:17:42:8a:b4:05 dev vxlan0 |
45 | 45 | ||
46 | 3. Show forwarding table | 46 | 3. Show forwarding table |
47 | # bridge fdb show dev vxlan0 | 47 | # bridge fdb show dev vxlan0 |
diff --git a/Documentation/pinctrl.txt b/Documentation/pinctrl.txt index 3b4ee5328868..da40efbef6ec 100644 --- a/Documentation/pinctrl.txt +++ b/Documentation/pinctrl.txt | |||
@@ -364,6 +364,9 @@ will get an pin number into its handled number range. Further it is also passed | |||
364 | the range ID value, so that the pin controller knows which range it should | 364 | the range ID value, so that the pin controller knows which range it should |
365 | deal with. | 365 | deal with. |
366 | 366 | ||
367 | Calling pinctrl_add_gpio_range from pinctrl driver is DEPRECATED. Please see | ||
368 | section 2.1 of Documentation/devicetree/bindings/gpio/gpio.txt on how to bind | ||
369 | pinctrl and gpio drivers. | ||
367 | 370 | ||
368 | PINMUX interfaces | 371 | PINMUX interfaces |
369 | ================= | 372 | ================= |
@@ -1193,4 +1196,6 @@ foo_switch() | |||
1193 | ... | 1196 | ... |
1194 | } | 1197 | } |
1195 | 1198 | ||
1196 | The above has to be done from process context. | 1199 | The above has to be done from process context. The reservation of the pins |
1200 | will be done when the state is activated, so in effect one specific pin | ||
1201 | can be used by different functions at different times on a running system. | ||
diff --git a/Documentation/power/pm_qos_interface.txt b/Documentation/power/pm_qos_interface.txt index 17e130a80347..79a2a58425ee 100644 --- a/Documentation/power/pm_qos_interface.txt +++ b/Documentation/power/pm_qos_interface.txt | |||
@@ -99,7 +99,7 @@ reading the aggregated value does not require any locking mechanism. | |||
99 | 99 | ||
100 | From kernel mode the use of this interface is the following: | 100 | From kernel mode the use of this interface is the following: |
101 | 101 | ||
102 | int dev_pm_qos_add_request(device, handle, value): | 102 | int dev_pm_qos_add_request(device, handle, type, value): |
103 | Will insert an element into the list for that identified device with the | 103 | Will insert an element into the list for that identified device with the |
104 | target value. Upon change to this list the new target is recomputed and any | 104 | target value. Upon change to this list the new target is recomputed and any |
105 | registered notifiers are called only if the target value is now different. | 105 | registered notifiers are called only if the target value is now different. |
diff --git a/Documentation/power/power_supply_class.txt b/Documentation/power/power_supply_class.txt index 9c647bd7c5a9..3f10b39b0346 100644 --- a/Documentation/power/power_supply_class.txt +++ b/Documentation/power/power_supply_class.txt | |||
@@ -123,6 +123,9 @@ CONSTANT_CHARGE_VOLTAGE - constant charge voltage programmed by charger. | |||
123 | CONSTANT_CHARGE_VOLTAGE_MAX - maximum charge voltage supported by the | 123 | CONSTANT_CHARGE_VOLTAGE_MAX - maximum charge voltage supported by the |
124 | power supply object. | 124 | power supply object. |
125 | 125 | ||
126 | CHARGE_CONTROL_LIMIT - current charge control limit setting | ||
127 | CHARGE_CONTROL_LIMIT_MAX - maximum charge control limit setting | ||
128 | |||
126 | ENERGY_FULL, ENERGY_EMPTY - same as above but for energy. | 129 | ENERGY_FULL, ENERGY_EMPTY - same as above but for energy. |
127 | 130 | ||
128 | CAPACITY - capacity in percents. | 131 | CAPACITY - capacity in percents. |
diff --git a/Documentation/powerpc/ptrace.txt b/Documentation/powerpc/ptrace.txt index f4a5499b7bc6..f2a7a3919772 100644 --- a/Documentation/powerpc/ptrace.txt +++ b/Documentation/powerpc/ptrace.txt | |||
@@ -127,6 +127,22 @@ Some examples of using the structure to: | |||
127 | p.addr2 = (uint64_t) end_range; | 127 | p.addr2 = (uint64_t) end_range; |
128 | p.condition_value = 0; | 128 | p.condition_value = 0; |
129 | 129 | ||
130 | - set a watchpoint in server processors (BookS) | ||
131 | |||
132 | p.version = 1; | ||
133 | p.trigger_type = PPC_BREAKPOINT_TRIGGER_RW; | ||
134 | p.addr_mode = PPC_BREAKPOINT_MODE_RANGE_INCLUSIVE; | ||
135 | or | ||
136 | p.addr_mode = PPC_BREAKPOINT_MODE_EXACT; | ||
137 | |||
138 | p.condition_mode = PPC_BREAKPOINT_CONDITION_NONE; | ||
139 | p.addr = (uint64_t) begin_range; | ||
140 | /* For PPC_BREAKPOINT_MODE_RANGE_INCLUSIVE addr2 needs to be specified, where | ||
141 | * addr2 - addr <= 8 Bytes. | ||
142 | */ | ||
143 | p.addr2 = (uint64_t) end_range; | ||
144 | p.condition_value = 0; | ||
145 | |||
130 | 3. PTRACE_DELHWDEBUG | 146 | 3. PTRACE_DELHWDEBUG |
131 | 147 | ||
132 | Takes an integer which identifies an existing breakpoint or watchpoint | 148 | Takes an integer which identifies an existing breakpoint or watchpoint |
diff --git a/Documentation/prctl/seccomp_filter.txt b/Documentation/prctl/seccomp_filter.txt index 597c3c581375..1e469ef75778 100644 --- a/Documentation/prctl/seccomp_filter.txt +++ b/Documentation/prctl/seccomp_filter.txt | |||
@@ -95,12 +95,15 @@ SECCOMP_RET_KILL: | |||
95 | 95 | ||
96 | SECCOMP_RET_TRAP: | 96 | SECCOMP_RET_TRAP: |
97 | Results in the kernel sending a SIGSYS signal to the triggering | 97 | Results in the kernel sending a SIGSYS signal to the triggering |
98 | task without executing the system call. The kernel will | 98 | task without executing the system call. siginfo->si_call_addr |
99 | rollback the register state to just before the system call | 99 | will show the address of the system call instruction, and |
100 | entry such that a signal handler in the task will be able to | 100 | siginfo->si_syscall and siginfo->si_arch will indicate which |
101 | inspect the ucontext_t->uc_mcontext registers and emulate | 101 | syscall was attempted. The program counter will be as though |
102 | system call success or failure upon return from the signal | 102 | the syscall happened (i.e. it will not point to the syscall |
103 | handler. | 103 | instruction). The return value register will contain an arch- |
104 | dependent value -- if resuming execution, set it to something | ||
105 | sensible. (The architecture dependency is because replacing | ||
106 | it with -ENOSYS could overwrite some useful information.) | ||
104 | 107 | ||
105 | The SECCOMP_RET_DATA portion of the return value will be passed | 108 | The SECCOMP_RET_DATA portion of the return value will be passed |
106 | as si_errno. | 109 | as si_errno. |
@@ -123,6 +126,18 @@ SECCOMP_RET_TRACE: | |||
123 | the BPF program return value will be available to the tracer | 126 | the BPF program return value will be available to the tracer |
124 | via PTRACE_GETEVENTMSG. | 127 | via PTRACE_GETEVENTMSG. |
125 | 128 | ||
129 | The tracer can skip the system call by changing the syscall number | ||
130 | to -1. Alternatively, the tracer can change the system call | ||
131 | requested by changing the system call to a valid syscall number. If | ||
132 | the tracer asks to skip the system call, then the system call will | ||
133 | appear to return the value that the tracer puts in the return value | ||
134 | register. | ||
135 | |||
136 | The seccomp check will not be run again after the tracer is | ||
137 | notified. (This means that seccomp-based sandboxes MUST NOT | ||
138 | allow use of ptrace, even of other sandboxed processes, without | ||
139 | extreme care; ptracers can use this mechanism to escape.) | ||
140 | |||
126 | SECCOMP_RET_ALLOW: | 141 | SECCOMP_RET_ALLOW: |
127 | Results in the system call being executed. | 142 | Results in the system call being executed. |
128 | 143 | ||
@@ -161,3 +176,50 @@ architecture supports both ptrace_event and seccomp, it will be able to | |||
161 | support seccomp filter with minor fixup: SIGSYS support and seccomp return | 176 | support seccomp filter with minor fixup: SIGSYS support and seccomp return |
162 | value checking. Then it must just add CONFIG_HAVE_ARCH_SECCOMP_FILTER | 177 | value checking. Then it must just add CONFIG_HAVE_ARCH_SECCOMP_FILTER |
163 | to its arch-specific Kconfig. | 178 | to its arch-specific Kconfig. |
179 | |||
180 | |||
181 | |||
182 | Caveats | ||
183 | ------- | ||
184 | |||
185 | The vDSO can cause some system calls to run entirely in userspace, | ||
186 | leading to surprises when you run programs on different machines that | ||
187 | fall back to real syscalls. To minimize these surprises on x86, make | ||
188 | sure you test with | ||
189 | /sys/devices/system/clocksource/clocksource0/current_clocksource set to | ||
190 | something like acpi_pm. | ||
191 | |||
192 | On x86-64, vsyscall emulation is enabled by default. (vsyscalls are | ||
193 | legacy variants on vDSO calls.) Currently, emulated vsyscalls will honor seccomp, with a few oddities: | ||
194 | |||
195 | - A return value of SECCOMP_RET_TRAP will set a si_call_addr pointing to | ||
196 | the vsyscall entry for the given call and not the address after the | ||
197 | 'syscall' instruction. Any code which wants to restart the call | ||
198 | should be aware that (a) a ret instruction has been emulated and (b) | ||
199 | trying to resume the syscall will again trigger the standard vsyscall | ||
200 | emulation security checks, making resuming the syscall mostly | ||
201 | pointless. | ||
202 | |||
203 | - A return value of SECCOMP_RET_TRACE will signal the tracer as usual, | ||
204 | but the syscall may not be changed to another system call using the | ||
205 | orig_rax register. It may only be changed to -1 order to skip the | ||
206 | currently emulated call. Any other change MAY terminate the process. | ||
207 | The rip value seen by the tracer will be the syscall entry address; | ||
208 | this is different from normal behavior. The tracer MUST NOT modify | ||
209 | rip or rsp. (Do not rely on other changes terminating the process. | ||
210 | They might work. For example, on some kernels, choosing a syscall | ||
211 | that only exists in future kernels will be correctly emulated (by | ||
212 | returning -ENOSYS). | ||
213 | |||
214 | To detect this quirky behavior, check for addr & ~0x0C00 == | ||
215 | 0xFFFFFFFFFF600000. (For SECCOMP_RET_TRACE, use rip. For | ||
216 | SECCOMP_RET_TRAP, use siginfo->si_call_addr.) Do not check any other | ||
217 | condition: future kernels may improve vsyscall emulation and current | ||
218 | kernels in vsyscall=native mode will behave differently, but the | ||
219 | instructions at 0xF...F600{0,4,8,C}00 will not be system calls in these | ||
220 | cases. | ||
221 | |||
222 | Note that modern systems are unlikely to use vsyscalls at all -- they | ||
223 | are a legacy feature and they are considerably slower than standard | ||
224 | syscalls. New code will use the vDSO, and vDSO-issued system calls | ||
225 | are indistinguishable from normal system calls. | ||
diff --git a/Documentation/scsi/hptiop.txt b/Documentation/scsi/hptiop.txt index 9605179711f4..4a4f47e759cd 100644 --- a/Documentation/scsi/hptiop.txt +++ b/Documentation/scsi/hptiop.txt | |||
@@ -37,7 +37,7 @@ For Intel IOP based adapters, the controller IOP is accessed via PCI BAR0: | |||
37 | 0x40 Inbound Queue Port | 37 | 0x40 Inbound Queue Port |
38 | 0x44 Outbound Queue Port | 38 | 0x44 Outbound Queue Port |
39 | 39 | ||
40 | For Marvell IOP based adapters, the IOP is accessed via PCI BAR0 and BAR1: | 40 | For Marvell not Frey IOP based adapters, the IOP is accessed via PCI BAR0 and BAR1: |
41 | 41 | ||
42 | BAR0 offset Register | 42 | BAR0 offset Register |
43 | 0x20400 Inbound Doorbell Register | 43 | 0x20400 Inbound Doorbell Register |
@@ -55,9 +55,31 @@ For Marvell IOP based adapters, the IOP is accessed via PCI BAR0 and BAR1: | |||
55 | 0x40-0x1040 Inbound Queue | 55 | 0x40-0x1040 Inbound Queue |
56 | 0x1040-0x2040 Outbound Queue | 56 | 0x1040-0x2040 Outbound Queue |
57 | 57 | ||
58 | For Marvell Frey IOP based adapters, the IOP is accessed via PCI BAR0 and BAR1: | ||
58 | 59 | ||
59 | I/O Request Workflow | 60 | BAR0 offset Register |
60 | ---------------------- | 61 | 0x0 IOP configuration information. |
62 | |||
63 | BAR1 offset Register | ||
64 | 0x4000 Inbound List Base Address Low | ||
65 | 0x4004 Inbound List Base Address High | ||
66 | 0x4018 Inbound List Write Pointer | ||
67 | 0x402C Inbound List Configuration and Control | ||
68 | 0x4050 Outbound List Base Address Low | ||
69 | 0x4054 Outbound List Base Address High | ||
70 | 0x4058 Outbound List Copy Pointer Shadow Base Address Low | ||
71 | 0x405C Outbound List Copy Pointer Shadow Base Address High | ||
72 | 0x4088 Outbound List Interrupt Cause | ||
73 | 0x408C Outbound List Interrupt Enable | ||
74 | 0x1020C PCIe Function 0 Interrupt Enable | ||
75 | 0x10400 PCIe Function 0 to CPU Message A | ||
76 | 0x10420 CPU to PCIe Function 0 Message A | ||
77 | 0x10480 CPU to PCIe Function 0 Doorbell | ||
78 | 0x10484 CPU to PCIe Function 0 Doorbell Enable | ||
79 | |||
80 | |||
81 | I/O Request Workflow of Not Marvell Frey | ||
82 | ------------------------------------------ | ||
61 | 83 | ||
62 | All queued requests are handled via inbound/outbound queue port. | 84 | All queued requests are handled via inbound/outbound queue port. |
63 | A request packet can be allocated in either IOP or host memory. | 85 | A request packet can be allocated in either IOP or host memory. |
@@ -101,6 +123,45 @@ register 0. An outbound message with the same value indicates the completion | |||
101 | of an inbound message. | 123 | of an inbound message. |
102 | 124 | ||
103 | 125 | ||
126 | I/O Request Workflow of Marvell Frey | ||
127 | -------------------------------------- | ||
128 | |||
129 | All queued requests are handled via inbound/outbound list. | ||
130 | |||
131 | To send a request to the controller: | ||
132 | |||
133 | - Allocate a free request in host DMA coherent memory. | ||
134 | |||
135 | Requests allocated in host memory must be aligned on 32-bytes boundary. | ||
136 | |||
137 | - Fill the request with index of the request in the flag. | ||
138 | |||
139 | Fill a free inbound list unit with the physical address and the size of | ||
140 | the request. | ||
141 | |||
142 | Set up the inbound list write pointer with the index of previous unit, | ||
143 | round to 0 if the index reaches the supported count of requests. | ||
144 | |||
145 | - Post the inbound list writer pointer to IOP. | ||
146 | |||
147 | - The IOP process the request. When the request is completed, the flag of | ||
148 | the request with or-ed IOPMU_QUEUE_MASK_HOST_BITS will be put into a | ||
149 | free outbound list unit and the index of the outbound list unit will be | ||
150 | put into the copy pointer shadow register. An outbound interrupt will be | ||
151 | generated. | ||
152 | |||
153 | - The host read the outbound list copy pointer shadow register and compare | ||
154 | with previous saved read ponter N. If they are different, the host will | ||
155 | read the (N+1)th outbound list unit. | ||
156 | |||
157 | The host get the index of the request from the (N+1)th outbound list | ||
158 | unit and complete the request. | ||
159 | |||
160 | Non-queued requests (reset communication/reset/flush etc) can be sent via PCIe | ||
161 | Function 0 to CPU Message A register. The CPU to PCIe Function 0 Message register | ||
162 | with the same value indicates the completion of message. | ||
163 | |||
164 | |||
104 | User-level Interface | 165 | User-level Interface |
105 | --------------------- | 166 | --------------------- |
106 | 167 | ||
@@ -112,7 +173,7 @@ The driver exposes following sysfs attributes: | |||
112 | 173 | ||
113 | 174 | ||
114 | ----------------------------------------------------------------------------- | 175 | ----------------------------------------------------------------------------- |
115 | Copyright (C) 2006-2009 HighPoint Technologies, Inc. All Rights Reserved. | 176 | Copyright (C) 2006-2012 HighPoint Technologies, Inc. All Rights Reserved. |
116 | 177 | ||
117 | This file is distributed in the hope that it will be useful, | 178 | This file is distributed in the hope that it will be useful, |
118 | but WITHOUT ANY WARRANTY; without even the implied warranty of | 179 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
diff --git a/Documentation/security/00-INDEX b/Documentation/security/00-INDEX index eeed1de546d4..414235c1fcfc 100644 --- a/Documentation/security/00-INDEX +++ b/Documentation/security/00-INDEX | |||
@@ -12,6 +12,8 @@ apparmor.txt | |||
12 | - documentation on the AppArmor security extension. | 12 | - documentation on the AppArmor security extension. |
13 | credentials.txt | 13 | credentials.txt |
14 | - documentation about credentials in Linux. | 14 | - documentation about credentials in Linux. |
15 | keys-ecryptfs.txt | ||
16 | - description of the encryption keys for the ecryptfs filesystem. | ||
15 | keys-request-key.txt | 17 | keys-request-key.txt |
16 | - description of the kernel key request service. | 18 | - description of the kernel key request service. |
17 | keys-trusted-encrypted.txt | 19 | keys-trusted-encrypted.txt |
diff --git a/Documentation/security/keys.txt b/Documentation/security/keys.txt index 7d9ca92022d8..7b4145d00452 100644 --- a/Documentation/security/keys.txt +++ b/Documentation/security/keys.txt | |||
@@ -994,6 +994,23 @@ payload contents" for more information. | |||
994 | reference pointer if successful. | 994 | reference pointer if successful. |
995 | 995 | ||
996 | 996 | ||
997 | (*) A keyring can be created by: | ||
998 | |||
999 | struct key *keyring_alloc(const char *description, uid_t uid, gid_t gid, | ||
1000 | const struct cred *cred, | ||
1001 | key_perm_t perm, | ||
1002 | unsigned long flags, | ||
1003 | struct key *dest); | ||
1004 | |||
1005 | This creates a keyring with the given attributes and returns it. If dest | ||
1006 | is not NULL, the new keyring will be linked into the keyring to which it | ||
1007 | points. No permission checks are made upon the destination keyring. | ||
1008 | |||
1009 | Error EDQUOT can be returned if the keyring would overload the quota (pass | ||
1010 | KEY_ALLOC_NOT_IN_QUOTA in flags if the keyring shouldn't be accounted | ||
1011 | towards the user's quota). Error ENOMEM can also be returned. | ||
1012 | |||
1013 | |||
997 | (*) To check the validity of a key, this function can be called: | 1014 | (*) To check the validity of a key, this function can be called: |
998 | 1015 | ||
999 | int validate_key(struct key *key); | 1016 | int validate_key(struct key *key); |
diff --git a/Documentation/sound/alsa/ALSA-Configuration.txt b/Documentation/sound/alsa/ALSA-Configuration.txt index d90d8ec2853d..b9cfd339a6fa 100644 --- a/Documentation/sound/alsa/ALSA-Configuration.txt +++ b/Documentation/sound/alsa/ALSA-Configuration.txt | |||
@@ -1905,7 +1905,6 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed. | |||
1905 | vid - Vendor ID for the device (optional) | 1905 | vid - Vendor ID for the device (optional) |
1906 | pid - Product ID for the device (optional) | 1906 | pid - Product ID for the device (optional) |
1907 | nrpacks - Max. number of packets per URB (default: 8) | 1907 | nrpacks - Max. number of packets per URB (default: 8) |
1908 | async_unlink - Use async unlink mode (default: yes) | ||
1909 | device_setup - Device specific magic number (optional) | 1908 | device_setup - Device specific magic number (optional) |
1910 | - Influence depends on the device | 1909 | - Influence depends on the device |
1911 | - Default: 0x0000 | 1910 | - Default: 0x0000 |
@@ -1917,8 +1916,6 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed. | |||
1917 | NB: nrpacks parameter can be modified dynamically via sysfs. | 1916 | NB: nrpacks parameter can be modified dynamically via sysfs. |
1918 | Don't put the value over 20. Changing via sysfs has no sanity | 1917 | Don't put the value over 20. Changing via sysfs has no sanity |
1919 | check. | 1918 | check. |
1920 | NB: async_unlink=0 would cause Oops. It remains just for | ||
1921 | debugging purpose (if any). | ||
1922 | NB: ignore_ctl_error=1 may help when you get an error at accessing | 1919 | NB: ignore_ctl_error=1 may help when you get an error at accessing |
1923 | the mixer element such as URB error -22. This happens on some | 1920 | the mixer element such as URB error -22. This happens on some |
1924 | buggy USB device or the controller. | 1921 | buggy USB device or the controller. |
diff --git a/Documentation/sparse.txt b/Documentation/sparse.txt index 4909d4116356..eceab1308a8c 100644 --- a/Documentation/sparse.txt +++ b/Documentation/sparse.txt | |||
@@ -49,6 +49,24 @@ be generated without __CHECK_ENDIAN__. | |||
49 | __bitwise - noisy stuff; in particular, __le*/__be* are that. We really | 49 | __bitwise - noisy stuff; in particular, __le*/__be* are that. We really |
50 | don't want to drown in noise unless we'd explicitly asked for it. | 50 | don't want to drown in noise unless we'd explicitly asked for it. |
51 | 51 | ||
52 | Using sparse for lock checking | ||
53 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
54 | |||
55 | The following macros are undefined for gcc and defined during a sparse | ||
56 | run to use the "context" tracking feature of sparse, applied to | ||
57 | locking. These annotations tell sparse when a lock is held, with | ||
58 | regard to the annotated function's entry and exit. | ||
59 | |||
60 | __must_hold - The specified lock is held on function entry and exit. | ||
61 | |||
62 | __acquires - The specified lock is held on function exit, but not entry. | ||
63 | |||
64 | __releases - The specified lock is held on function entry, but not exit. | ||
65 | |||
66 | If the function enters and exits without the lock held, acquiring and | ||
67 | releasing the lock inside the function in a balanced way, no | ||
68 | annotation is needed. The tree annotations above are for cases where | ||
69 | sparse would otherwise report a context imbalance. | ||
52 | 70 | ||
53 | Getting sparse | 71 | Getting sparse |
54 | ~~~~~~~~~~~~~~ | 72 | ~~~~~~~~~~~~~~ |
diff --git a/Documentation/sysrq.txt b/Documentation/sysrq.txt index 642f84495b29..2a4cdda4828e 100644 --- a/Documentation/sysrq.txt +++ b/Documentation/sysrq.txt | |||
@@ -116,6 +116,7 @@ On all - write a character to /proc/sysrq-trigger. e.g.: | |||
116 | 'w' - Dumps tasks that are in uninterruptable (blocked) state. | 116 | 'w' - Dumps tasks that are in uninterruptable (blocked) state. |
117 | 117 | ||
118 | 'x' - Used by xmon interface on ppc/powerpc platforms. | 118 | 'x' - Used by xmon interface on ppc/powerpc platforms. |
119 | Show global PMU Registers on sparc64. | ||
119 | 120 | ||
120 | 'y' - Show global CPU Registers [SPARC-64 specific] | 121 | 'y' - Show global CPU Registers [SPARC-64 specific] |
121 | 122 | ||
diff --git a/Documentation/telephony/00-INDEX b/Documentation/telephony/00-INDEX deleted file mode 100644 index 4ffe0ed5b6fb..000000000000 --- a/Documentation/telephony/00-INDEX +++ /dev/null | |||
@@ -1,4 +0,0 @@ | |||
1 | 00-INDEX | ||
2 | - this file. | ||
3 | ixj.txt | ||
4 | - document describing the Quicknet drivers. | ||
diff --git a/Documentation/telephony/ixj.txt b/Documentation/telephony/ixj.txt deleted file mode 100644 index db94fb6c5678..000000000000 --- a/Documentation/telephony/ixj.txt +++ /dev/null | |||
@@ -1,394 +0,0 @@ | |||
1 | Linux Quicknet-Drivers-Howto | ||
2 | Quicknet Technologies, Inc. (www.quicknet.net) | ||
3 | Version 0.3.4 December 18, 1999 | ||
4 | |||
5 | 1.0 Introduction | ||
6 | |||
7 | This document describes the first GPL release version of the Linux | ||
8 | driver for the Quicknet Internet PhoneJACK and Internet LineJACK | ||
9 | cards. More information about these cards is available at | ||
10 | www.quicknet.net. The driver version discussed in this document is | ||
11 | 0.3.4. | ||
12 | |||
13 | These cards offer nice telco style interfaces to use your standard | ||
14 | telephone/key system/PBX as the user interface for VoIP applications. | ||
15 | The Internet LineJACK also offers PSTN connectivity for a single line | ||
16 | Internet to PSTN gateway. Of course, you can add more than one card | ||
17 | to a system to obtain multi-line functionality. At this time, the | ||
18 | driver supports the POTS port on both the Internet PhoneJACK and the | ||
19 | Internet LineJACK, but the PSTN port on the latter card is not yet | ||
20 | supported. | ||
21 | |||
22 | This document, and the drivers for the cards, are intended for a | ||
23 | limited audience that includes technically capable programmers who | ||
24 | would like to experiment with Quicknet cards. The drivers are | ||
25 | considered in ALPHA status and are not yet considered stable enough | ||
26 | for general, widespread use in an unlimited audience. | ||
27 | |||
28 | That's worth saying again: | ||
29 | |||
30 | THE LINUX DRIVERS FOR QUICKNET CARDS ARE PRESENTLY IN A ALPHA STATE | ||
31 | AND SHOULD NOT BE CONSIDERED AS READY FOR NORMAL WIDESPREAD USE. | ||
32 | |||
33 | They are released early in the spirit of Internet development and to | ||
34 | make this technology available to innovators who would benefit from | ||
35 | early exposure. | ||
36 | |||
37 | When we promote the device driver to "beta" level it will be | ||
38 | considered ready for non-programmer, non-technical users. Until then, | ||
39 | please be aware that these drivers may not be stable and may affect | ||
40 | the performance of your system. | ||
41 | |||
42 | |||
43 | 1.1 Latest Additions/Improvements | ||
44 | |||
45 | The 0.3.4 version of the driver is the first GPL release. Several | ||
46 | features had to be removed from the prior binary only module, mostly | ||
47 | for reasons of Intellectual Property rights. We can't release | ||
48 | information that is not ours - so certain aspects of the driver had to | ||
49 | be removed to protect the rights of others. | ||
50 | |||
51 | Specifically, very old Internet PhoneJACK cards have non-standard | ||
52 | G.723.1 codecs (due to the early nature of the DSPs in those days). | ||
53 | The auto-conversion code to bring those cards into compliance with | ||
54 | today's standards is available as a binary only module to those people | ||
55 | needing it. If you bought your card after 1997 or so, you are OK - | ||
56 | it's only the very old cards that are affected. | ||
57 | |||
58 | Also, the code to download G.728/G.729/G.729a codecs to the DSP is | ||
59 | available as a binary only module as well. This IP is not ours to | ||
60 | release. | ||
61 | |||
62 | Hooks are built into the GPL driver to allow it to work with other | ||
63 | companion modules that are completely separate from this module. | ||
64 | |||
65 | 1.2 Copyright, Trademarks, Disclaimer, & Credits | ||
66 | |||
67 | Copyright | ||
68 | |||
69 | Copyright (c) 1999 Quicknet Technologies, Inc. Permission is granted | ||
70 | to freely copy and distribute this document provided you preserve it | ||
71 | in its original form. For corrections and minor changes contact the | ||
72 | maintainer at linux@quicknet.net. | ||
73 | |||
74 | Trademarks | ||
75 | |||
76 | Internet PhoneJACK and Internet LineJACK are registered trademarks of | ||
77 | Quicknet Technologies, Inc. | ||
78 | |||
79 | Disclaimer | ||
80 | |||
81 | Much of the info in this HOWTO is early information released by | ||
82 | Quicknet Technologies, Inc. for the express purpose of allowing early | ||
83 | testing and use of the Linux drivers developed for their products. | ||
84 | While every attempt has been made to be thorough, complete and | ||
85 | accurate, the information contained here may be unreliable and there | ||
86 | are likely a number of errors in this document. Please let the | ||
87 | maintainer know about them. Since this is free documentation, it | ||
88 | should be obvious that neither I nor previous authors can be held | ||
89 | legally responsible for any errors. | ||
90 | |||
91 | Credits | ||
92 | |||
93 | This HOWTO was written by: | ||
94 | |||
95 | Greg Herlein <gherlein@quicknet.net> | ||
96 | Ed Okerson <eokerson@quicknet.net> | ||
97 | |||
98 | 1.3 Future Plans: You Can Help | ||
99 | |||
100 | Please let the maintainer know of any errors in facts, opinions, | ||
101 | logic, spelling, grammar, clarity, links, etc. But first, if the date | ||
102 | is over a month old, check to see that you have the latest | ||
103 | version. Please send any info that you think belongs in this document. | ||
104 | |||
105 | You can also contribute code and/or bug-fixes for the sample | ||
106 | applications. | ||
107 | |||
108 | |||
109 | 1.4 Where to get things | ||
110 | |||
111 | Info on latest versions of the driver are here: | ||
112 | |||
113 | http://web.archive.org/web/*/http://www.quicknet.net/develop.htm | ||
114 | |||
115 | 1.5 Mailing List | ||
116 | |||
117 | Quicknet operates a mailing list to provide a public forum on using | ||
118 | these drivers. | ||
119 | |||
120 | To subscribe to the linux-sdk mailing list, send an email to: | ||
121 | |||
122 | majordomo@linux.quicknet.net | ||
123 | |||
124 | In the body of the email, type: | ||
125 | |||
126 | subscribe linux-sdk <your-email-address> | ||
127 | |||
128 | Please delete any signature block that you would normally add to the | ||
129 | bottom of your email - it tends to confuse majordomo. | ||
130 | |||
131 | To send mail to the list, address your mail to | ||
132 | |||
133 | linux-sdk@linux.quicknet.net | ||
134 | |||
135 | Your message will go out to everyone on the list. | ||
136 | |||
137 | To unsubscribe to the linux-sdk mailing list, send an email to: | ||
138 | |||
139 | majordomo@linux.quicknet.net | ||
140 | |||
141 | In the body of the email, type: | ||
142 | |||
143 | unsubscribe linux-sdk <your-email-address> | ||
144 | |||
145 | |||
146 | |||
147 | 2.0 Requirements | ||
148 | |||
149 | 2.1 Quicknet Card(s) | ||
150 | |||
151 | You will need at least one Internet PhoneJACK or Internet LineJACK | ||
152 | cards. These are ISA or PCI bus devices that use Plug-n-Play for | ||
153 | configuration, and use no IRQs. The driver will support up to 16 | ||
154 | cards in any one system, of any mix between the two types. | ||
155 | |||
156 | Note that you will need two cards to do any useful testing alone, since | ||
157 | you will need a card on both ends of the connection. Of course, if | ||
158 | you are doing collaborative work, perhaps your friends or coworkers | ||
159 | have cards too. If not, we'll gladly sell them some! | ||
160 | |||
161 | |||
162 | 2.2 ISAPNP | ||
163 | |||
164 | Since the Quicknet cards are Plug-n-Play devices, you will need the | ||
165 | isapnp tools package to configure the cards, or you can use the isapnp | ||
166 | module to autoconfigure them. The former package probably came with | ||
167 | your Linux distribution. Documentation on this package is available | ||
168 | online at: | ||
169 | |||
170 | http://mailer.wiwi.uni-marburg.de/linux/LDP/HOWTO/Plug-and-Play-HOWTO.html | ||
171 | |||
172 | The isapnp autoconfiguration is available on the Quicknet website at: | ||
173 | |||
174 | http://www.quicknet.net/develop.htm | ||
175 | |||
176 | though it may be in the kernel by the time you read this. | ||
177 | |||
178 | |||
179 | 3.0 Card Configuration | ||
180 | |||
181 | If you did not get your drivers as part of the linux kernel, do the | ||
182 | following to install them: | ||
183 | |||
184 | a. untar the distribution file. We use the following command: | ||
185 | tar -xvzf ixj-0.x.x.tgz | ||
186 | |||
187 | This creates a subdirectory holding all the necessary files. Go to that | ||
188 | subdirectory. | ||
189 | |||
190 | b. run the "ixj_dev_create" script to remove any stray device | ||
191 | files left in the /dev directory, and to create the new officially | ||
192 | designated device files. Note that the old devices were called | ||
193 | /dev/ixj, and the new method uses /dev/phone. | ||
194 | |||
195 | c. type "make;make install" - this will compile and install the | ||
196 | module. | ||
197 | |||
198 | d. type "depmod -av" to rebuild all your kernel version dependencies. | ||
199 | |||
200 | e. if you are using the isapnp module to configure the cards | ||
201 | automatically, then skip to step f. Otherwise, ensure that you | ||
202 | have run the isapnp configuration utility to properly configure | ||
203 | the cards. | ||
204 | |||
205 | e1. The Internet PhoneJACK has one configuration register that | ||
206 | requires 16 IO ports. The Internet LineJACK card has two | ||
207 | configuration registers and isapnp reports that IO 0 | ||
208 | requires 16 IO ports and IO 1 requires 8. The Quicknet | ||
209 | driver assumes that these registers are configured to be | ||
210 | contiguous, i.e. if IO 0 is set to 0x340 then IO 1 should | ||
211 | be set to 0x350. | ||
212 | |||
213 | Make sure that none of the cards overlap if you have | ||
214 | multiple cards in the system. | ||
215 | |||
216 | If you are new to the isapnp tools, you can jumpstart | ||
217 | yourself by doing the following: | ||
218 | |||
219 | e2. go to the /etc directory and run pnpdump to get a blank | ||
220 | isapnp.conf file. | ||
221 | |||
222 | pnpdump > /etc/isapnp.conf | ||
223 | |||
224 | e3. edit the /etc/isapnp.conf file to set the IO warnings and | ||
225 | the register IO addresses. The IO warnings means that you | ||
226 | should find the line in the file that looks like this: | ||
227 | |||
228 | (CONFLICT (IO FATAL)(IRQ FATAL)(DMA FATAL)(MEM FATAL)) # or WARNING | ||
229 | |||
230 | and you should edit the line to look like this: | ||
231 | |||
232 | (CONFLICT (IO WARNING)(IRQ FATAL)(DMA FATAL)(MEM FATAL)) # | ||
233 | or WARNING | ||
234 | |||
235 | The next step is to set the IO port addresses. The issue | ||
236 | here is that isapnp does not identify all of the ports out | ||
237 | there. Specifically any device that does not have a driver | ||
238 | or module loaded by Linux will not be registered. This | ||
239 | includes older sound cards and network cards. We have | ||
240 | found that the IO port 0x300 is often used even though | ||
241 | isapnp claims that no-one is using those ports. We | ||
242 | recommend that for a single card installation that port | ||
243 | 0x340 (and 0x350) be used. The IO port line should change | ||
244 | from this: | ||
245 | |||
246 | (IO 0 (SIZE 16) (BASE 0x0300) (CHECK)) | ||
247 | |||
248 | to this: | ||
249 | |||
250 | (IO 0 (SIZE 16) (BASE 0x0340) ) | ||
251 | |||
252 | e4. if you have multiple Quicknet cards, make sure that you do | ||
253 | not have any overlaps. Be especially careful if you are | ||
254 | mixing Internet PhoneJACK and Internet LineJACK cards in | ||
255 | the same system. In these cases we recommend moving the | ||
256 | IO port addresses to the 0x400 block. Please note that on | ||
257 | a few machines the 0x400 series are used. Feel free to | ||
258 | experiment with other addresses. Our cards have been | ||
259 | proven to work using IO addresses of up to 0xFF0. | ||
260 | |||
261 | e5. the last step is to uncomment the activation line so the | ||
262 | drivers will be associated with the port. This means the | ||
263 | line (immediately below) the IO line should go from this: | ||
264 | |||
265 | # (ACT Y) | ||
266 | |||
267 | to this: | ||
268 | |||
269 | (ACT Y) | ||
270 | |||
271 | Once you have finished editing the isapnp.conf file you | ||
272 | must submit it into the pnp driverconfigure the cards. | ||
273 | This is done using the following command: | ||
274 | |||
275 | isapnp isapnp.conf | ||
276 | |||
277 | If this works you should see a line that identifies the | ||
278 | Quicknet device, the IO port(s) chosen, and a message | ||
279 | "Enabled OK". | ||
280 | |||
281 | f. if you are loading the module by hand, use insmod. An example | ||
282 | of this would look like this: | ||
283 | |||
284 | insmod phonedev | ||
285 | insmod ixj dspio=0x320,0x310 xio=0,0x330 | ||
286 | |||
287 | Then verify the module loaded by running lsmod. If you are not using a | ||
288 | module that matches your kernel version, you may need to "force" the | ||
289 | load using the -f option in the insmod command. | ||
290 | |||
291 | insmod phonedev | ||
292 | insmod -f ixj dspio=0x320,0x310 xio=0,0x330 | ||
293 | |||
294 | |||
295 | If you are using isapnp to autoconfigure your card, then you do NOT | ||
296 | need any of the above, though you need to use depmod to load the | ||
297 | driver, like this: | ||
298 | |||
299 | depmod ixj | ||
300 | |||
301 | which will result in the needed drivers getting loaded automatically. | ||
302 | |||
303 | g. if you are planning on having the kernel automatically request | ||
304 | the module for you, then you need to edit /etc/conf.modules and add the | ||
305 | following lines: | ||
306 | |||
307 | options ixj dspio=0x340 xio=0x330 ixjdebug=0 | ||
308 | |||
309 | If you do this, then when you execute an application that uses the | ||
310 | module the kernel will request that it is loaded. | ||
311 | |||
312 | h. if you want non-root users to be able to read and write to the | ||
313 | ixj devices (this is a good idea!) you should do the following: | ||
314 | |||
315 | - decide upon a group name to use and create that group if | ||
316 | needed. Add the user names to that group that you wish to | ||
317 | have access to the device. For example, we typically will | ||
318 | create a group named "ixj" in /etc/group and add all users | ||
319 | to that group that we want to run software that can use the | ||
320 | ixjX devices. | ||
321 | |||
322 | - change the permissions on the device files, like this: | ||
323 | |||
324 | chgrp ixj /dev/ixj* | ||
325 | chmod 660 /dev/ixj* | ||
326 | |||
327 | Once this is done, then non-root users should be able to use the | ||
328 | devices. If you have enabled autoloading of modules, then the user | ||
329 | should be able to open the device and have the module loaded | ||
330 | automatically for them. | ||
331 | |||
332 | |||
333 | 4.0 Driver Installation problems. | ||
334 | |||
335 | We have tested these drivers on the 2.2.9, 2.2.10, 2.2.12, and 2.2.13 kernels | ||
336 | and in all cases have eventually been able to get the drivers to load and | ||
337 | run. We have found four types of problems that prevent this from happening. | ||
338 | The problems and solutions are: | ||
339 | |||
340 | a. A step was missed in the installation. Go back and use section 3 | ||
341 | as a checklist. Many people miss running the ixj_dev_create script and thus | ||
342 | never load the device names into the filesystem. | ||
343 | |||
344 | b. The kernel is inconsistently linked. We have found this problem in | ||
345 | the Out Of the Box installation of several distributions. The symptoms | ||
346 | are that neither driver will load, and that the unknown symbols include "jiffy" | ||
347 | and "kmalloc". The solution is to recompile both the kernel and the | ||
348 | modules. The command string for the final compile looks like this: | ||
349 | |||
350 | In the kernel directory: | ||
351 | 1. cp .config /tmp | ||
352 | 2. make mrproper | ||
353 | 3. cp /tmp/.config . | ||
354 | 4. make clean;make bzImage;make modules;make modules_install | ||
355 | |||
356 | This rebuilds both the kernel and all the modules and makes sure they all | ||
357 | have the same linkages. This generally solves the problem once the new | ||
358 | kernel is installed and the system rebooted. | ||
359 | |||
360 | c. The kernel has been patched, then unpatched. This happens when | ||
361 | someone decides to use an earlier kernel after they load a later kernel. | ||
362 | The symptoms are proceeding through all three above steps and still not | ||
363 | being able to load the driver. What has happened is that the generated | ||
364 | header files are out of sync with the kernel itself. The solution is | ||
365 | to recompile (again) using "make mrproper". This will remove and then | ||
366 | regenerate all the necessary header files. Once this is done, then you | ||
367 | need to install and reboot the kernel. We have not seen any problem | ||
368 | loading one of our drivers after this treatment. | ||
369 | |||
370 | 5.0 Known Limitations | ||
371 | |||
372 | We cannot currently play "dial-tone" and listen for DTMF digits at the | ||
373 | same time using the ISA PhoneJACK. This is a bug in the 8020 DSP chip | ||
374 | used on that product. All other Quicknet products function normally | ||
375 | in this regard. We have a work-around, but it's not done yet. Until | ||
376 | then, if you want dial-tone, you can always play a recorded dial-tone | ||
377 | sound into the audio until you have gathered the DTMF digits. | ||
378 | |||
379 | |||
380 | |||
381 | |||
382 | |||
383 | |||
384 | |||
385 | |||
386 | |||
387 | |||
388 | |||
389 | |||
390 | |||
391 | |||
392 | |||
393 | |||
394 | |||
diff --git a/Documentation/thermal/sysfs-api.txt b/Documentation/thermal/sysfs-api.txt index ca1a1a34970e..88c02334e356 100644 --- a/Documentation/thermal/sysfs-api.txt +++ b/Documentation/thermal/sysfs-api.txt | |||
@@ -112,6 +112,29 @@ temperature) and throttle appropriate devices. | |||
112 | trip: indicates which trip point the cooling devices is associated with | 112 | trip: indicates which trip point the cooling devices is associated with |
113 | in this thermal zone. | 113 | in this thermal zone. |
114 | 114 | ||
115 | 1.4 Thermal Zone Parameters | ||
116 | 1.4.1 struct thermal_bind_params | ||
117 | This structure defines the following parameters that are used to bind | ||
118 | a zone with a cooling device for a particular trip point. | ||
119 | .cdev: The cooling device pointer | ||
120 | .weight: The 'influence' of a particular cooling device on this zone. | ||
121 | This is on a percentage scale. The sum of all these weights | ||
122 | (for a particular zone) cannot exceed 100. | ||
123 | .trip_mask:This is a bit mask that gives the binding relation between | ||
124 | this thermal zone and cdev, for a particular trip point. | ||
125 | If nth bit is set, then the cdev and thermal zone are bound | ||
126 | for trip point n. | ||
127 | .match: This call back returns success(0) if the 'tz and cdev' need to | ||
128 | be bound, as per platform data. | ||
129 | 1.4.2 struct thermal_zone_params | ||
130 | This structure defines the platform level parameters for a thermal zone. | ||
131 | This data, for each thermal zone should come from the platform layer. | ||
132 | This is an optional feature where some platforms can choose not to | ||
133 | provide this data. | ||
134 | .governor_name: Name of the thermal governor used for this zone | ||
135 | .num_tbps: Number of thermal_bind_params entries for this zone | ||
136 | .tbp: thermal_bind_params entries | ||
137 | |||
115 | 2. sysfs attributes structure | 138 | 2. sysfs attributes structure |
116 | 139 | ||
117 | RO read only value | 140 | RO read only value |
@@ -126,6 +149,7 @@ Thermal zone device sys I/F, created once it's registered: | |||
126 | |---type: Type of the thermal zone | 149 | |---type: Type of the thermal zone |
127 | |---temp: Current temperature | 150 | |---temp: Current temperature |
128 | |---mode: Working mode of the thermal zone | 151 | |---mode: Working mode of the thermal zone |
152 | |---policy: Thermal governor used for this zone | ||
129 | |---trip_point_[0-*]_temp: Trip point temperature | 153 | |---trip_point_[0-*]_temp: Trip point temperature |
130 | |---trip_point_[0-*]_type: Trip point type | 154 | |---trip_point_[0-*]_type: Trip point type |
131 | |---trip_point_[0-*]_hyst: Hysteresis value for this trip point | 155 | |---trip_point_[0-*]_hyst: Hysteresis value for this trip point |
@@ -187,6 +211,10 @@ mode | |||
187 | charge of the thermal management. | 211 | charge of the thermal management. |
188 | RW, Optional | 212 | RW, Optional |
189 | 213 | ||
214 | policy | ||
215 | One of the various thermal governors used for a particular zone. | ||
216 | RW, Required | ||
217 | |||
190 | trip_point_[0-*]_temp | 218 | trip_point_[0-*]_temp |
191 | The temperature above which trip point will be fired. | 219 | The temperature above which trip point will be fired. |
192 | Unit: millidegree Celsius | 220 | Unit: millidegree Celsius |
@@ -264,6 +292,7 @@ method, the sys I/F structure will be built like this: | |||
264 | |---type: acpitz | 292 | |---type: acpitz |
265 | |---temp: 37000 | 293 | |---temp: 37000 |
266 | |---mode: enabled | 294 | |---mode: enabled |
295 | |---policy: step_wise | ||
267 | |---trip_point_0_temp: 100000 | 296 | |---trip_point_0_temp: 100000 |
268 | |---trip_point_0_type: critical | 297 | |---trip_point_0_type: critical |
269 | |---trip_point_1_temp: 80000 | 298 | |---trip_point_1_temp: 80000 |
@@ -305,3 +334,38 @@ to a thermal_zone_device when it registers itself with the framework. The | |||
305 | event will be one of:{THERMAL_AUX0, THERMAL_AUX1, THERMAL_CRITICAL, | 334 | event will be one of:{THERMAL_AUX0, THERMAL_AUX1, THERMAL_CRITICAL, |
306 | THERMAL_DEV_FAULT}. Notification can be sent when the current temperature | 335 | THERMAL_DEV_FAULT}. Notification can be sent when the current temperature |
307 | crosses any of the configured thresholds. | 336 | crosses any of the configured thresholds. |
337 | |||
338 | 5. Export Symbol APIs: | ||
339 | |||
340 | 5.1: get_tz_trend: | ||
341 | This function returns the trend of a thermal zone, i.e the rate of change | ||
342 | of temperature of the thermal zone. Ideally, the thermal sensor drivers | ||
343 | are supposed to implement the callback. If they don't, the thermal | ||
344 | framework calculated the trend by comparing the previous and the current | ||
345 | temperature values. | ||
346 | |||
347 | 5.2:get_thermal_instance: | ||
348 | This function returns the thermal_instance corresponding to a given | ||
349 | {thermal_zone, cooling_device, trip_point} combination. Returns NULL | ||
350 | if such an instance does not exist. | ||
351 | |||
352 | 5.3:notify_thermal_framework: | ||
353 | This function handles the trip events from sensor drivers. It starts | ||
354 | throttling the cooling devices according to the policy configured. | ||
355 | For CRITICAL and HOT trip points, this notifies the respective drivers, | ||
356 | and does actual throttling for other trip points i.e ACTIVE and PASSIVE. | ||
357 | The throttling policy is based on the configured platform data; if no | ||
358 | platform data is provided, this uses the step_wise throttling policy. | ||
359 | |||
360 | 5.4:thermal_cdev_update: | ||
361 | This function serves as an arbitrator to set the state of a cooling | ||
362 | device. It sets the cooling device to the deepest cooling state if | ||
363 | possible. | ||
364 | |||
365 | 5.5:thermal_register_governor: | ||
366 | This function lets the various thermal governors to register themselves | ||
367 | with the Thermal framework. At run time, depending on a zone's platform | ||
368 | data, a particular governor is used for throttling. | ||
369 | |||
370 | 5.6:thermal_unregister_governor: | ||
371 | This function unregisters a governor from the thermal framework. | ||
diff --git a/Documentation/usb/error-codes.txt b/Documentation/usb/error-codes.txt index b3f606b81a03..9c3eb845ebe5 100644 --- a/Documentation/usb/error-codes.txt +++ b/Documentation/usb/error-codes.txt | |||
@@ -21,6 +21,8 @@ Non-USB-specific: | |||
21 | 21 | ||
22 | USB-specific: | 22 | USB-specific: |
23 | 23 | ||
24 | -EBUSY The URB is already active. | ||
25 | |||
24 | -ENODEV specified USB-device or bus doesn't exist | 26 | -ENODEV specified USB-device or bus doesn't exist |
25 | 27 | ||
26 | -ENOENT specified interface or endpoint does not exist or | 28 | -ENOENT specified interface or endpoint does not exist or |
@@ -35,9 +37,8 @@ USB-specific: | |||
35 | d) ISO: number_of_packets is < 0 | 37 | d) ISO: number_of_packets is < 0 |
36 | e) various other cases | 38 | e) various other cases |
37 | 39 | ||
38 | -EAGAIN a) specified ISO start frame too early | 40 | -EXDEV ISO: URB_ISO_ASAP wasn't specified and all the frames |
39 | b) (using ISO-ASAP) too much scheduled for the future | 41 | the URB would be scheduled in have already expired. |
40 | wait some time and try again. | ||
41 | 42 | ||
42 | -EFBIG Host controller driver can't schedule that many ISO frames. | 43 | -EFBIG Host controller driver can't schedule that many ISO frames. |
43 | 44 | ||
diff --git a/Documentation/usb/mass-storage.txt b/Documentation/usb/mass-storage.txt index e9b9334627bf..59063ad7a60d 100644 --- a/Documentation/usb/mass-storage.txt +++ b/Documentation/usb/mass-storage.txt | |||
@@ -20,9 +20,9 @@ | |||
20 | 20 | ||
21 | This document describes how to use the gadget from user space, its | 21 | This document describes how to use the gadget from user space, its |
22 | relation to mass storage function (or MSF) and different gadgets | 22 | relation to mass storage function (or MSF) and different gadgets |
23 | using it, and how it differs from File Storage Gadget (or FSG). It | 23 | using it, and how it differs from File Storage Gadget (or FSG) |
24 | will talk only briefly about how to use MSF within composite | 24 | (which is no longer included in Linux). It will talk only briefly |
25 | gadgets. | 25 | about how to use MSF within composite gadgets. |
26 | 26 | ||
27 | * Module parameters | 27 | * Module parameters |
28 | 28 | ||
@@ -198,16 +198,15 @@ | |||
198 | The Mass Storage Function and thus the Mass Storage Gadget has been | 198 | The Mass Storage Function and thus the Mass Storage Gadget has been |
199 | based on the File Storage Gadget. The difference between the two is | 199 | based on the File Storage Gadget. The difference between the two is |
200 | that MSG is a composite gadget (ie. uses the composite framework) | 200 | that MSG is a composite gadget (ie. uses the composite framework) |
201 | while file storage gadget is a traditional gadget. From userspace | 201 | while file storage gadget was a traditional gadget. From userspace |
202 | point of view this distinction does not really matter, but from | 202 | point of view this distinction does not really matter, but from |
203 | kernel hacker's point of view, this means that (i) MSG does not | 203 | kernel hacker's point of view, this means that (i) MSG does not |
204 | duplicate code needed for handling basic USB protocol commands and | 204 | duplicate code needed for handling basic USB protocol commands and |
205 | (ii) MSF can be used in any other composite gadget. | 205 | (ii) MSF can be used in any other composite gadget. |
206 | 206 | ||
207 | Because of that, File Storage Gadget has been deprecated and | 207 | Because of that, File Storage Gadget has been removed in Linux 3.8. |
208 | scheduled to be removed in Linux 3.8. All users need to transition | 208 | All users need to transition to the Mass Storage Gadget. The two |
209 | to the Mass Storage Gadget by that time. The two gadgets behave | 209 | gadgets behave mostly the same from the outside except: |
210 | mostly the same from the outside except: | ||
211 | 210 | ||
212 | 1. In FSG the “removable” and “cdrom” module parameters set the flag | 211 | 1. In FSG the “removable” and “cdrom” module parameters set the flag |
213 | for all logical units whereas in MSG they accept a list of y/n | 212 | for all logical units whereas in MSG they accept a list of y/n |
diff --git a/Documentation/video4linux/bttv/Cards b/Documentation/video4linux/bttv/Cards index db833ced2cb8..a8fb6e2d3c8b 100644 --- a/Documentation/video4linux/bttv/Cards +++ b/Documentation/video4linux/bttv/Cards | |||
@@ -43,7 +43,7 @@ Very nice card if you only have satellite TV but several tuners connected | |||
43 | to the card via composite. | 43 | to the card via composite. |
44 | 44 | ||
45 | Many thanks to Matrix-Vision for giving us 2 cards for free which made | 45 | Many thanks to Matrix-Vision for giving us 2 cards for free which made |
46 | Bt848a/Bt849 single crytal operation support possible!!! | 46 | Bt848a/Bt849 single crystal operation support possible!!! |
47 | 47 | ||
48 | 48 | ||
49 | 49 | ||
diff --git a/Documentation/video4linux/bttv/Sound-FAQ b/Documentation/video4linux/bttv/Sound-FAQ index 395f6c6fdd98..d3f1d7783d1c 100644 --- a/Documentation/video4linux/bttv/Sound-FAQ +++ b/Documentation/video4linux/bttv/Sound-FAQ | |||
@@ -82,7 +82,7 @@ card installed, you might to check out if you can read these registers | |||
82 | values used by the windows driver. A tool to do this is available | 82 | values used by the windows driver. A tool to do this is available |
83 | from ftp://telepresence.dmem.strath.ac.uk/pub/bt848/winutil, but it | 83 | from ftp://telepresence.dmem.strath.ac.uk/pub/bt848/winutil, but it |
84 | does'nt work with bt878 boards according to some reports I received. | 84 | does'nt work with bt878 boards according to some reports I received. |
85 | Another one with bt878 suport is available from | 85 | Another one with bt878 support is available from |
86 | http://btwincap.sourceforge.net/Files/btspy2.00.zip | 86 | http://btwincap.sourceforge.net/Files/btspy2.00.zip |
87 | 87 | ||
88 | You might also dig around in the *.ini files of the Windows applications. | 88 | You might also dig around in the *.ini files of the Windows applications. |
diff --git a/Documentation/virtual/kvm/api.txt b/Documentation/virtual/kvm/api.txt index f6ec3a92e621..a4df5535996b 100644 --- a/Documentation/virtual/kvm/api.txt +++ b/Documentation/virtual/kvm/api.txt | |||
@@ -1194,12 +1194,15 @@ struct kvm_ppc_pvinfo { | |||
1194 | This ioctl fetches PV specific information that need to be passed to the guest | 1194 | This ioctl fetches PV specific information that need to be passed to the guest |
1195 | using the device tree or other means from vm context. | 1195 | using the device tree or other means from vm context. |
1196 | 1196 | ||
1197 | For now the only implemented piece of information distributed here is an array | 1197 | The hcall array defines 4 instructions that make up a hypercall. |
1198 | of 4 instructions that make up a hypercall. | ||
1199 | 1198 | ||
1200 | If any additional field gets added to this structure later on, a bit for that | 1199 | If any additional field gets added to this structure later on, a bit for that |
1201 | additional piece of information will be set in the flags bitmap. | 1200 | additional piece of information will be set in the flags bitmap. |
1202 | 1201 | ||
1202 | The flags bitmap is defined as: | ||
1203 | |||
1204 | /* the host supports the ePAPR idle hcall | ||
1205 | #define KVM_PPC_PVINFO_FLAGS_EV_IDLE (1<<0) | ||
1203 | 1206 | ||
1204 | 4.48 KVM_ASSIGN_PCI_DEVICE | 1207 | 4.48 KVM_ASSIGN_PCI_DEVICE |
1205 | 1208 | ||
@@ -1731,7 +1734,46 @@ registers, find a list below: | |||
1731 | Arch | Register | Width (bits) | 1734 | Arch | Register | Width (bits) |
1732 | | | | 1735 | | | |
1733 | PPC | KVM_REG_PPC_HIOR | 64 | 1736 | PPC | KVM_REG_PPC_HIOR | 64 |
1734 | 1737 | PPC | KVM_REG_PPC_IAC1 | 64 | |
1738 | PPC | KVM_REG_PPC_IAC2 | 64 | ||
1739 | PPC | KVM_REG_PPC_IAC3 | 64 | ||
1740 | PPC | KVM_REG_PPC_IAC4 | 64 | ||
1741 | PPC | KVM_REG_PPC_DAC1 | 64 | ||
1742 | PPC | KVM_REG_PPC_DAC2 | 64 | ||
1743 | PPC | KVM_REG_PPC_DABR | 64 | ||
1744 | PPC | KVM_REG_PPC_DSCR | 64 | ||
1745 | PPC | KVM_REG_PPC_PURR | 64 | ||
1746 | PPC | KVM_REG_PPC_SPURR | 64 | ||
1747 | PPC | KVM_REG_PPC_DAR | 64 | ||
1748 | PPC | KVM_REG_PPC_DSISR | 32 | ||
1749 | PPC | KVM_REG_PPC_AMR | 64 | ||
1750 | PPC | KVM_REG_PPC_UAMOR | 64 | ||
1751 | PPC | KVM_REG_PPC_MMCR0 | 64 | ||
1752 | PPC | KVM_REG_PPC_MMCR1 | 64 | ||
1753 | PPC | KVM_REG_PPC_MMCRA | 64 | ||
1754 | PPC | KVM_REG_PPC_PMC1 | 32 | ||
1755 | PPC | KVM_REG_PPC_PMC2 | 32 | ||
1756 | PPC | KVM_REG_PPC_PMC3 | 32 | ||
1757 | PPC | KVM_REG_PPC_PMC4 | 32 | ||
1758 | PPC | KVM_REG_PPC_PMC5 | 32 | ||
1759 | PPC | KVM_REG_PPC_PMC6 | 32 | ||
1760 | PPC | KVM_REG_PPC_PMC7 | 32 | ||
1761 | PPC | KVM_REG_PPC_PMC8 | 32 | ||
1762 | PPC | KVM_REG_PPC_FPR0 | 64 | ||
1763 | ... | ||
1764 | PPC | KVM_REG_PPC_FPR31 | 64 | ||
1765 | PPC | KVM_REG_PPC_VR0 | 128 | ||
1766 | ... | ||
1767 | PPC | KVM_REG_PPC_VR31 | 128 | ||
1768 | PPC | KVM_REG_PPC_VSR0 | 128 | ||
1769 | ... | ||
1770 | PPC | KVM_REG_PPC_VSR31 | 128 | ||
1771 | PPC | KVM_REG_PPC_FPSCR | 64 | ||
1772 | PPC | KVM_REG_PPC_VSCR | 32 | ||
1773 | PPC | KVM_REG_PPC_VPA_ADDR | 64 | ||
1774 | PPC | KVM_REG_PPC_VPA_SLB | 128 | ||
1775 | PPC | KVM_REG_PPC_VPA_DTL | 128 | ||
1776 | PPC | KVM_REG_PPC_EPCR | 32 | ||
1735 | 1777 | ||
1736 | 4.69 KVM_GET_ONE_REG | 1778 | 4.69 KVM_GET_ONE_REG |
1737 | 1779 | ||
@@ -1747,7 +1789,7 @@ kvm_one_reg struct passed in. On success, the register value can be found | |||
1747 | at the memory location pointed to by "addr". | 1789 | at the memory location pointed to by "addr". |
1748 | 1790 | ||
1749 | The list of registers accessible using this interface is identical to the | 1791 | The list of registers accessible using this interface is identical to the |
1750 | list in 4.64. | 1792 | list in 4.68. |
1751 | 1793 | ||
1752 | 1794 | ||
1753 | 4.70 KVM_KVMCLOCK_CTRL | 1795 | 4.70 KVM_KVMCLOCK_CTRL |
@@ -1997,6 +2039,93 @@ return the hash table order in the parameter. (If the guest is using | |||
1997 | the virtualized real-mode area (VRMA) facility, the kernel will | 2039 | the virtualized real-mode area (VRMA) facility, the kernel will |
1998 | re-create the VMRA HPTEs on the next KVM_RUN of any vcpu.) | 2040 | re-create the VMRA HPTEs on the next KVM_RUN of any vcpu.) |
1999 | 2041 | ||
2042 | 4.77 KVM_S390_INTERRUPT | ||
2043 | |||
2044 | Capability: basic | ||
2045 | Architectures: s390 | ||
2046 | Type: vm ioctl, vcpu ioctl | ||
2047 | Parameters: struct kvm_s390_interrupt (in) | ||
2048 | Returns: 0 on success, -1 on error | ||
2049 | |||
2050 | Allows to inject an interrupt to the guest. Interrupts can be floating | ||
2051 | (vm ioctl) or per cpu (vcpu ioctl), depending on the interrupt type. | ||
2052 | |||
2053 | Interrupt parameters are passed via kvm_s390_interrupt: | ||
2054 | |||
2055 | struct kvm_s390_interrupt { | ||
2056 | __u32 type; | ||
2057 | __u32 parm; | ||
2058 | __u64 parm64; | ||
2059 | }; | ||
2060 | |||
2061 | type can be one of the following: | ||
2062 | |||
2063 | KVM_S390_SIGP_STOP (vcpu) - sigp restart | ||
2064 | KVM_S390_PROGRAM_INT (vcpu) - program check; code in parm | ||
2065 | KVM_S390_SIGP_SET_PREFIX (vcpu) - sigp set prefix; prefix address in parm | ||
2066 | KVM_S390_RESTART (vcpu) - restart | ||
2067 | KVM_S390_INT_VIRTIO (vm) - virtio external interrupt; external interrupt | ||
2068 | parameters in parm and parm64 | ||
2069 | KVM_S390_INT_SERVICE (vm) - sclp external interrupt; sclp parameter in parm | ||
2070 | KVM_S390_INT_EMERGENCY (vcpu) - sigp emergency; source cpu in parm | ||
2071 | KVM_S390_INT_EXTERNAL_CALL (vcpu) - sigp external call; source cpu in parm | ||
2072 | |||
2073 | Note that the vcpu ioctl is asynchronous to vcpu execution. | ||
2074 | |||
2075 | 4.78 KVM_PPC_GET_HTAB_FD | ||
2076 | |||
2077 | Capability: KVM_CAP_PPC_HTAB_FD | ||
2078 | Architectures: powerpc | ||
2079 | Type: vm ioctl | ||
2080 | Parameters: Pointer to struct kvm_get_htab_fd (in) | ||
2081 | Returns: file descriptor number (>= 0) on success, -1 on error | ||
2082 | |||
2083 | This returns a file descriptor that can be used either to read out the | ||
2084 | entries in the guest's hashed page table (HPT), or to write entries to | ||
2085 | initialize the HPT. The returned fd can only be written to if the | ||
2086 | KVM_GET_HTAB_WRITE bit is set in the flags field of the argument, and | ||
2087 | can only be read if that bit is clear. The argument struct looks like | ||
2088 | this: | ||
2089 | |||
2090 | /* For KVM_PPC_GET_HTAB_FD */ | ||
2091 | struct kvm_get_htab_fd { | ||
2092 | __u64 flags; | ||
2093 | __u64 start_index; | ||
2094 | __u64 reserved[2]; | ||
2095 | }; | ||
2096 | |||
2097 | /* Values for kvm_get_htab_fd.flags */ | ||
2098 | #define KVM_GET_HTAB_BOLTED_ONLY ((__u64)0x1) | ||
2099 | #define KVM_GET_HTAB_WRITE ((__u64)0x2) | ||
2100 | |||
2101 | The `start_index' field gives the index in the HPT of the entry at | ||
2102 | which to start reading. It is ignored when writing. | ||
2103 | |||
2104 | Reads on the fd will initially supply information about all | ||
2105 | "interesting" HPT entries. Interesting entries are those with the | ||
2106 | bolted bit set, if the KVM_GET_HTAB_BOLTED_ONLY bit is set, otherwise | ||
2107 | all entries. When the end of the HPT is reached, the read() will | ||
2108 | return. If read() is called again on the fd, it will start again from | ||
2109 | the beginning of the HPT, but will only return HPT entries that have | ||
2110 | changed since they were last read. | ||
2111 | |||
2112 | Data read or written is structured as a header (8 bytes) followed by a | ||
2113 | series of valid HPT entries (16 bytes) each. The header indicates how | ||
2114 | many valid HPT entries there are and how many invalid entries follow | ||
2115 | the valid entries. The invalid entries are not represented explicitly | ||
2116 | in the stream. The header format is: | ||
2117 | |||
2118 | struct kvm_get_htab_header { | ||
2119 | __u32 index; | ||
2120 | __u16 n_valid; | ||
2121 | __u16 n_invalid; | ||
2122 | }; | ||
2123 | |||
2124 | Writes to the fd create HPT entries starting at the index given in the | ||
2125 | header; first `n_valid' valid entries with contents from the data | ||
2126 | written, then `n_invalid' invalid entries, invalidating any previously | ||
2127 | valid entries found. | ||
2128 | |||
2000 | 2129 | ||
2001 | 5. The kvm_run structure | 2130 | 5. The kvm_run structure |
2002 | ------------------------ | 2131 | ------------------------ |
@@ -2109,7 +2238,8 @@ executed a memory-mapped I/O instruction which could not be satisfied | |||
2109 | by kvm. The 'data' member contains the written data if 'is_write' is | 2238 | by kvm. The 'data' member contains the written data if 'is_write' is |
2110 | true, and should be filled by application code otherwise. | 2239 | true, and should be filled by application code otherwise. |
2111 | 2240 | ||
2112 | NOTE: For KVM_EXIT_IO, KVM_EXIT_MMIO and KVM_EXIT_OSI, the corresponding | 2241 | NOTE: For KVM_EXIT_IO, KVM_EXIT_MMIO, KVM_EXIT_OSI, KVM_EXIT_DCR |
2242 | and KVM_EXIT_PAPR the corresponding | ||
2113 | operations are complete (and guest state is consistent) only after userspace | 2243 | operations are complete (and guest state is consistent) only after userspace |
2114 | has re-entered the kernel with KVM_RUN. The kernel side will first finish | 2244 | has re-entered the kernel with KVM_RUN. The kernel side will first finish |
2115 | incomplete operations and then check for pending signals. Userspace | 2245 | incomplete operations and then check for pending signals. Userspace |
diff --git a/Documentation/vm/frontswap.txt b/Documentation/vm/frontswap.txt index 5ef2d1366425..c71a019be600 100644 --- a/Documentation/vm/frontswap.txt +++ b/Documentation/vm/frontswap.txt | |||
@@ -193,7 +193,7 @@ faster. | |||
193 | or maybe swap-over-nbd/NFS)? | 193 | or maybe swap-over-nbd/NFS)? |
194 | 194 | ||
195 | No. First, the existing swap subsystem doesn't allow for any kind of | 195 | No. First, the existing swap subsystem doesn't allow for any kind of |
196 | swap hierarchy. Perhaps it could be rewritten to accomodate a hierarchy, | 196 | swap hierarchy. Perhaps it could be rewritten to accommodate a hierarchy, |
197 | but this would require fairly drastic changes. Even if it were | 197 | but this would require fairly drastic changes. Even if it were |
198 | rewritten, the existing swap subsystem uses the block I/O layer which | 198 | rewritten, the existing swap subsystem uses the block I/O layer which |
199 | assumes a swap device is fixed size and any page in it is linearly | 199 | assumes a swap device is fixed size and any page in it is linearly |
diff --git a/Documentation/vm/transhuge.txt b/Documentation/vm/transhuge.txt index f734bb2a78dc..8785fb87d9c7 100644 --- a/Documentation/vm/transhuge.txt +++ b/Documentation/vm/transhuge.txt | |||
@@ -116,6 +116,13 @@ echo always >/sys/kernel/mm/transparent_hugepage/defrag | |||
116 | echo madvise >/sys/kernel/mm/transparent_hugepage/defrag | 116 | echo madvise >/sys/kernel/mm/transparent_hugepage/defrag |
117 | echo never >/sys/kernel/mm/transparent_hugepage/defrag | 117 | echo never >/sys/kernel/mm/transparent_hugepage/defrag |
118 | 118 | ||
119 | By default kernel tries to use huge zero page on read page fault. | ||
120 | It's possible to disable huge zero page by writing 0 or enable it | ||
121 | back by writing 1: | ||
122 | |||
123 | echo 0 >/sys/kernel/mm/transparent_hugepage/khugepaged/use_zero_page | ||
124 | echo 1 >/sys/kernel/mm/transparent_hugepage/khugepaged/use_zero_page | ||
125 | |||
119 | khugepaged will be automatically started when | 126 | khugepaged will be automatically started when |
120 | transparent_hugepage/enabled is set to "always" or "madvise, and it'll | 127 | transparent_hugepage/enabled is set to "always" or "madvise, and it'll |
121 | be automatically shutdown if it's set to "never". | 128 | be automatically shutdown if it's set to "never". |
@@ -197,6 +204,14 @@ thp_split is incremented every time a huge page is split into base | |||
197 | pages. This can happen for a variety of reasons but a common | 204 | pages. This can happen for a variety of reasons but a common |
198 | reason is that a huge page is old and is being reclaimed. | 205 | reason is that a huge page is old and is being reclaimed. |
199 | 206 | ||
207 | thp_zero_page_alloc is incremented every time a huge zero page is | ||
208 | successfully allocated. It includes allocations which where | ||
209 | dropped due race with other allocation. Note, it doesn't count | ||
210 | every map of the huge zero page, only its allocation. | ||
211 | |||
212 | thp_zero_page_alloc_failed is incremented if kernel fails to allocate | ||
213 | huge zero page and falls back to using small pages. | ||
214 | |||
200 | As the system ages, allocating huge pages may be expensive as the | 215 | As the system ages, allocating huge pages may be expensive as the |
201 | system uses memory compaction to copy data around memory to free a | 216 | system uses memory compaction to copy data around memory to free a |
202 | huge page for use. There are some counters in /proc/vmstat to help | 217 | huge page for use. There are some counters in /proc/vmstat to help |
@@ -276,7 +291,7 @@ unaffected. libhugetlbfs will also work fine as usual. | |||
276 | == Graceful fallback == | 291 | == Graceful fallback == |
277 | 292 | ||
278 | Code walking pagetables but unware about huge pmds can simply call | 293 | Code walking pagetables but unware about huge pmds can simply call |
279 | split_huge_page_pmd(mm, pmd) where the pmd is the one returned by | 294 | split_huge_page_pmd(vma, addr, pmd) where the pmd is the one returned by |
280 | pmd_offset. It's trivial to make the code transparent hugepage aware | 295 | pmd_offset. It's trivial to make the code transparent hugepage aware |
281 | by just grepping for "pmd_offset" and adding split_huge_page_pmd where | 296 | by just grepping for "pmd_offset" and adding split_huge_page_pmd where |
282 | missing after pmd_offset returns the pmd. Thanks to the graceful | 297 | missing after pmd_offset returns the pmd. Thanks to the graceful |
@@ -299,7 +314,7 @@ diff --git a/mm/mremap.c b/mm/mremap.c | |||
299 | return NULL; | 314 | return NULL; |
300 | 315 | ||
301 | pmd = pmd_offset(pud, addr); | 316 | pmd = pmd_offset(pud, addr); |
302 | + split_huge_page_pmd(mm, pmd); | 317 | + split_huge_page_pmd(vma, addr, pmd); |
303 | if (pmd_none_or_clear_bad(pmd)) | 318 | if (pmd_none_or_clear_bad(pmd)) |
304 | return NULL; | 319 | return NULL; |
305 | 320 | ||
diff --git a/Documentation/x86/boot.txt b/Documentation/x86/boot.txt index 9efceff51bfb..406d82d5d2bb 100644 --- a/Documentation/x86/boot.txt +++ b/Documentation/x86/boot.txt | |||
@@ -373,7 +373,7 @@ Protocol: 2.00+ | |||
373 | 1 Loadlin | 373 | 1 Loadlin |
374 | 2 bootsect-loader (0x20, all other values reserved) | 374 | 2 bootsect-loader (0x20, all other values reserved) |
375 | 3 Syslinux | 375 | 3 Syslinux |
376 | 4 Etherboot/gPXE | 376 | 4 Etherboot/gPXE/iPXE |
377 | 5 ELILO | 377 | 5 ELILO |
378 | 7 GRUB | 378 | 7 GRUB |
379 | 8 U-Boot | 379 | 8 U-Boot |
@@ -381,6 +381,7 @@ Protocol: 2.00+ | |||
381 | A Gujin | 381 | A Gujin |
382 | B Qemu | 382 | B Qemu |
383 | C Arcturus Networks uCbootloader | 383 | C Arcturus Networks uCbootloader |
384 | D kexec-tools | ||
384 | E Extended (see ext_loader_type) | 385 | E Extended (see ext_loader_type) |
385 | F Special (0xFF = undefined) | 386 | F Special (0xFF = undefined) |
386 | 10 Reserved | 387 | 10 Reserved |
@@ -1013,7 +1014,7 @@ boot_params as that of 16-bit boot protocol, the boot loader should | |||
1013 | also fill the additional fields of the struct boot_params as that | 1014 | also fill the additional fields of the struct boot_params as that |
1014 | described in zero-page.txt. | 1015 | described in zero-page.txt. |
1015 | 1016 | ||
1016 | After setupping the struct boot_params, the boot loader can load the | 1017 | After setting up the struct boot_params, the boot loader can load the |
1017 | 32/64-bit kernel in the same way as that of 16-bit boot protocol. | 1018 | 32/64-bit kernel in the same way as that of 16-bit boot protocol. |
1018 | 1019 | ||
1019 | In 32-bit boot protocol, the kernel is started by jumping to the | 1020 | In 32-bit boot protocol, the kernel is started by jumping to the |
@@ -1023,7 +1024,7 @@ In 32-bit boot protocol, the kernel is started by jumping to the | |||
1023 | At entry, the CPU must be in 32-bit protected mode with paging | 1024 | At entry, the CPU must be in 32-bit protected mode with paging |
1024 | disabled; a GDT must be loaded with the descriptors for selectors | 1025 | disabled; a GDT must be loaded with the descriptors for selectors |
1025 | __BOOT_CS(0x10) and __BOOT_DS(0x18); both descriptors must be 4G flat | 1026 | __BOOT_CS(0x10) and __BOOT_DS(0x18); both descriptors must be 4G flat |
1026 | segment; __BOOS_CS must have execute/read permission, and __BOOT_DS | 1027 | segment; __BOOT_CS must have execute/read permission, and __BOOT_DS |
1027 | must have read/write permission; CS must be __BOOT_CS and DS, ES, SS | 1028 | must have read/write permission; CS must be __BOOT_CS and DS, ES, SS |
1028 | must be __BOOT_DS; interrupt must be disabled; %esi must hold the base | 1029 | must be __BOOT_DS; interrupt must be disabled; %esi must hold the base |
1029 | address of the struct boot_params; %ebp, %edi and %ebx must be zero. | 1030 | address of the struct boot_params; %ebp, %edi and %ebx must be zero. |
diff --git a/Documentation/xtensa/atomctl.txt b/Documentation/xtensa/atomctl.txt new file mode 100644 index 000000000000..10a8d1ff35ec --- /dev/null +++ b/Documentation/xtensa/atomctl.txt | |||
@@ -0,0 +1,44 @@ | |||
1 | We Have Atomic Operation Control (ATOMCTL) Register. | ||
2 | This register determines the effect of using a S32C1I instruction | ||
3 | with various combinations of: | ||
4 | |||
5 | 1. With and without an Coherent Cache Controller which | ||
6 | can do Atomic Transactions to the memory internally. | ||
7 | |||
8 | 2. With and without An Intelligent Memory Controller which | ||
9 | can do Atomic Transactions itself. | ||
10 | |||
11 | The Core comes up with a default value of for the three types of cache ops: | ||
12 | |||
13 | 0x28: (WB: Internal, WT: Internal, BY:Exception) | ||
14 | |||
15 | On the FPGA Cards we typically simulate an Intelligent Memory controller | ||
16 | which can implement RCW transactions. For FPGA cards with an External | ||
17 | Memory controller we let it to the atomic operations internally while | ||
18 | doing a Cached (WB) transaction and use the Memory RCW for un-cached | ||
19 | operations. | ||
20 | |||
21 | For systems without an coherent cache controller, non-MX, we always | ||
22 | use the memory controllers RCW, thought non-MX controlers likely | ||
23 | support the Internal Operation. | ||
24 | |||
25 | CUSTOMER-WARNING: | ||
26 | Virtually all customers buy their memory controllers from vendors that | ||
27 | don't support atomic RCW memory transactions and will likely want to | ||
28 | configure this register to not use RCW. | ||
29 | |||
30 | Developers might find using RCW in Bypass mode convenient when testing | ||
31 | with the cache being bypassed; for example studying cache alias problems. | ||
32 | |||
33 | See Section 4.3.12.4 of ISA; Bits: | ||
34 | |||
35 | WB WT BY | ||
36 | 5 4 | 3 2 | 1 0 | ||
37 | 2 Bit | ||
38 | Field | ||
39 | Values WB - Write Back WT - Write Thru BY - Bypass | ||
40 | --------- --------------- ----------------- ---------------- | ||
41 | 0 Exception Exception Exception | ||
42 | 1 RCW Transaction RCW Transaction RCW Transaction | ||
43 | 2 Internal Operation Exception Reserved | ||
44 | 3 Reserved Reserved Reserved | ||
diff --git a/Documentation/zh_CN/IRQ.txt b/Documentation/zh_CN/IRQ.txt new file mode 100644 index 000000000000..956026d5cf82 --- /dev/null +++ b/Documentation/zh_CN/IRQ.txt | |||
@@ -0,0 +1,39 @@ | |||
1 | Chinese translated version of Documentation/IRQ.txt | ||
2 | |||
3 | If you have any comment or update to the content, please contact the | ||
4 | original document maintainer directly. However, if you have a problem | ||
5 | communicating in English you can also ask the Chinese maintainer for | ||
6 | help. Contact the Chinese maintainer if this translation is outdated | ||
7 | or if there is a problem with the translation. | ||
8 | |||
9 | Maintainer: Eric W. Biederman <ebiederman@xmission.com> | ||
10 | Chinese maintainer: Fu Wei <tekkamanninja@gmail.com> | ||
11 | --------------------------------------------------------------------- | ||
12 | Documentation/IRQ.txt 的中文翻译 | ||
13 | |||
14 | 如果想评论或更新本文的内容,请直接联系原文档的维护者。如果你使用英文 | ||
15 | 交流有困难的话,也可以向中文版维护者求助。如果本翻译更新不及时或者翻 | ||
16 | 译存在问题,请联系中文版维护者。 | ||
17 | 英文版维护者: Eric W. Biederman <ebiederman@xmission.com> | ||
18 | 中文版维护者: 傅炜 Fu Wei <tekkamanninja@gmail.com> | ||
19 | 中文版翻译者: 傅炜 Fu Wei <tekkamanninja@gmail.com> | ||
20 | 中文版校译者: 傅炜 Fu Wei <tekkamanninja@gmail.com> | ||
21 | |||
22 | |||
23 | 以下为正文 | ||
24 | --------------------------------------------------------------------- | ||
25 | 何为 IRQ? | ||
26 | |||
27 | 一个 IRQ 是来自某个设备的一个中断请求。目前,它们可以来自一个硬件引脚, | ||
28 | 或来自一个数据包。多个设备可能连接到同个硬件引脚,从而共享一个 IRQ。 | ||
29 | |||
30 | 一个 IRQ 编号是用于告知硬件中断源的内核标识。通常情况下,这是一个 | ||
31 | 全局 irq_desc 数组的索引,但是除了在 linux/interrupt.h 中的实现, | ||
32 | 具体的细节是体系结构特定的。 | ||
33 | |||
34 | 一个 IRQ 编号是设备上某个可能的中断源的枚举。通常情况下,枚举的编号是 | ||
35 | 该引脚在系统内中断控制器的所有输入引脚中的编号。对于 ISA 总线中的情况, | ||
36 | 枚举的是在两个 i8259 中断控制器中 16 个输入引脚。 | ||
37 | |||
38 | 架构可以对 IRQ 编号指定额外的含义,在硬件涉及任何手工配置的情况下, | ||
39 | 是被提倡的。ISA 的 IRQ 是一个分配这类额外含义的典型例子。 | ||
diff --git a/Documentation/zh_CN/arm/kernel_user_helpers.txt b/Documentation/zh_CN/arm/kernel_user_helpers.txt new file mode 100644 index 000000000000..cd7fc8f34cf9 --- /dev/null +++ b/Documentation/zh_CN/arm/kernel_user_helpers.txt | |||
@@ -0,0 +1,284 @@ | |||
1 | Chinese translated version of Documentation/arm/kernel_user_helpers.txt | ||
2 | |||
3 | If you have any comment or update to the content, please contact the | ||
4 | original document maintainer directly. However, if you have a problem | ||
5 | communicating in English you can also ask the Chinese maintainer for | ||
6 | help. Contact the Chinese maintainer if this translation is outdated | ||
7 | or if there is a problem with the translation. | ||
8 | |||
9 | Maintainer: Nicolas Pitre <nicolas.pitre@linaro.org> | ||
10 | Dave Martin <dave.martin@linaro.org> | ||
11 | Chinese maintainer: Fu Wei <tekkamanninja@gmail.com> | ||
12 | --------------------------------------------------------------------- | ||
13 | Documentation/arm/kernel_user_helpers.txt 的中文翻译 | ||
14 | |||
15 | 如果想评论或更新本文的内容,请直接联系原文档的维护者。如果你使用英文 | ||
16 | 交流有困难的话,也可以向中文版维护者求助。如果本翻译更新不及时或者翻 | ||
17 | 译存在问题,请联系中文版维护者。 | ||
18 | 英文版维护者: Nicolas Pitre <nicolas.pitre@linaro.org> | ||
19 | Dave Martin <dave.martin@linaro.org> | ||
20 | 中文版维护者: 傅炜 Fu Wei <tekkamanninja@gmail.com> | ||
21 | 中文版翻译者: 傅炜 Fu Wei <tekkamanninja@gmail.com> | ||
22 | 中文版校译者: 宋冬生 Dongsheng Song <dongshneg.song@gmail.com> | ||
23 | 傅炜 Fu Wei <tekkamanninja@gmail.com> | ||
24 | |||
25 | |||
26 | 以下为正文 | ||
27 | --------------------------------------------------------------------- | ||
28 | 内核提供的用户空间辅助代码 | ||
29 | ========================= | ||
30 | |||
31 | 在内核内存空间的固定地址处,有一个由内核提供并可从用户空间访问的代码 | ||
32 | 段。它用于向用户空间提供因在许多 ARM CPU 中未实现的特性和/或指令而需 | ||
33 | 内核提供帮助的某些操作。这些代码直接在用户模式下执行的想法是为了获得 | ||
34 | 最佳效率,但那些与内核计数器联系过于紧密的部分,则被留给了用户库实现。 | ||
35 | 事实上,此代码甚至可能因不同的 CPU 而异,这取决于其可用的指令集或它 | ||
36 | 是否为 SMP 系统。换句话说,内核保留在不作出警告的情况下根据需要更改 | ||
37 | 这些代码的权利。只有本文档描述的入口及其结果是保证稳定的。 | ||
38 | |||
39 | 这与完全成熟的 VDSO 实现不同(但两者并不冲突),尽管如此,VDSO 可阻止 | ||
40 | 某些通过常量高效跳转到那些代码段的汇编技巧。且由于那些代码段在返回用户 | ||
41 | 代码前仅使用少量的代码周期,则一个 VDSO 间接远程调用将会在这些简单的 | ||
42 | 操作上增加一个可测量的开销。 | ||
43 | |||
44 | 在对那些拥有原生支持的新型处理器进行代码优化时,仅在已为其他操作使用 | ||
45 | 了类似的新增指令,而导致二进制结果已与早期 ARM 处理器不兼容的情况下, | ||
46 | 用户空间才应绕过这些辅助代码,并在内联函数中实现这些操作(无论是通过 | ||
47 | 编译器在代码中直接放置,还是作为库函数调用实现的一部分)。也就是说, | ||
48 | 如果你编译的代码不会为了其他目的使用新指令,则不要仅为了避免使用这些 | ||
49 | 内核辅助代码,导致二进制程序无法在早期处理器上运行。 | ||
50 | |||
51 | 新的辅助代码可能随着时间的推移而增加,所以新内核中的某些辅助代码在旧 | ||
52 | 内核中可能不存在。因此,程序必须在对任何辅助代码调用假设是安全之前, | ||
53 | 检测 __kuser_helper_version 的值(见下文)。理想情况下,这种检测应该 | ||
54 | 只在进程启动时执行一次;如果内核版本不支持所需辅助代码,则该进程可尽早 | ||
55 | 中止执行。 | ||
56 | |||
57 | kuser_helper_version | ||
58 | -------------------- | ||
59 | |||
60 | 位置: 0xffff0ffc | ||
61 | |||
62 | 参考声明: | ||
63 | |||
64 | extern int32_t __kuser_helper_version; | ||
65 | |||
66 | 定义: | ||
67 | |||
68 | 这个区域包含了当前运行内核实现的辅助代码版本号。用户空间可以通过读 | ||
69 | 取此版本号以确定特定的辅助代码是否存在。 | ||
70 | |||
71 | 使用范例: | ||
72 | |||
73 | #define __kuser_helper_version (*(int32_t *)0xffff0ffc) | ||
74 | |||
75 | void check_kuser_version(void) | ||
76 | { | ||
77 | if (__kuser_helper_version < 2) { | ||
78 | fprintf(stderr, "can't do atomic operations, kernel too old\n"); | ||
79 | abort(); | ||
80 | } | ||
81 | } | ||
82 | |||
83 | 注意: | ||
84 | |||
85 | 用户空间可以假设这个域的值不会在任何单个进程的生存期内改变。也就 | ||
86 | 是说,这个域可以仅在库的初始化阶段或进程启动阶段读取一次。 | ||
87 | |||
88 | kuser_get_tls | ||
89 | ------------- | ||
90 | |||
91 | 位置: 0xffff0fe0 | ||
92 | |||
93 | 参考原型: | ||
94 | |||
95 | void * __kuser_get_tls(void); | ||
96 | |||
97 | 输入: | ||
98 | |||
99 | lr = 返回地址 | ||
100 | |||
101 | 输出: | ||
102 | |||
103 | r0 = TLS 值 | ||
104 | |||
105 | 被篡改的寄存器: | ||
106 | |||
107 | 无 | ||
108 | |||
109 | 定义: | ||
110 | |||
111 | 获取之前通过 __ARM_NR_set_tls 系统调用设置的 TLS 值。 | ||
112 | |||
113 | 使用范例: | ||
114 | |||
115 | typedef void * (__kuser_get_tls_t)(void); | ||
116 | #define __kuser_get_tls (*(__kuser_get_tls_t *)0xffff0fe0) | ||
117 | |||
118 | void foo() | ||
119 | { | ||
120 | void *tls = __kuser_get_tls(); | ||
121 | printf("TLS = %p\n", tls); | ||
122 | } | ||
123 | |||
124 | 注意: | ||
125 | |||
126 | - 仅在 __kuser_helper_version >= 1 时,此辅助代码存在 | ||
127 | (从内核版本 2.6.12 开始)。 | ||
128 | |||
129 | kuser_cmpxchg | ||
130 | ------------- | ||
131 | |||
132 | 位置: 0xffff0fc0 | ||
133 | |||
134 | 参考原型: | ||
135 | |||
136 | int __kuser_cmpxchg(int32_t oldval, int32_t newval, volatile int32_t *ptr); | ||
137 | |||
138 | 输入: | ||
139 | |||
140 | r0 = oldval | ||
141 | r1 = newval | ||
142 | r2 = ptr | ||
143 | lr = 返回地址 | ||
144 | |||
145 | 输出: | ||
146 | |||
147 | r0 = 成功代码 (零或非零) | ||
148 | C flag = 如果 r0 == 0 则置 1,如果 r0 != 0 则清零。 | ||
149 | |||
150 | 被篡改的寄存器: | ||
151 | |||
152 | r3, ip, flags | ||
153 | |||
154 | 定义: | ||
155 | |||
156 | 仅在 *ptr 为 oldval 时原子保存 newval 于 *ptr 中。 | ||
157 | 如果 *ptr 被改变,则返回值为零,否则为非零值。 | ||
158 | 如果 *ptr 被改变,则 C flag 也会被置 1,以实现调用代码中的汇编 | ||
159 | 优化。 | ||
160 | |||
161 | 使用范例: | ||
162 | |||
163 | typedef int (__kuser_cmpxchg_t)(int oldval, int newval, volatile int *ptr); | ||
164 | #define __kuser_cmpxchg (*(__kuser_cmpxchg_t *)0xffff0fc0) | ||
165 | |||
166 | int atomic_add(volatile int *ptr, int val) | ||
167 | { | ||
168 | int old, new; | ||
169 | |||
170 | do { | ||
171 | old = *ptr; | ||
172 | new = old + val; | ||
173 | } while(__kuser_cmpxchg(old, new, ptr)); | ||
174 | |||
175 | return new; | ||
176 | } | ||
177 | |||
178 | 注意: | ||
179 | |||
180 | - 这个例程已根据需要包含了内存屏障。 | ||
181 | |||
182 | - 仅在 __kuser_helper_version >= 2 时,此辅助代码存在 | ||
183 | (从内核版本 2.6.12 开始)。 | ||
184 | |||
185 | kuser_memory_barrier | ||
186 | -------------------- | ||
187 | |||
188 | 位置: 0xffff0fa0 | ||
189 | |||
190 | 参考原型: | ||
191 | |||
192 | void __kuser_memory_barrier(void); | ||
193 | |||
194 | 输入: | ||
195 | |||
196 | lr = 返回地址 | ||
197 | |||
198 | 输出: | ||
199 | |||
200 | 无 | ||
201 | |||
202 | 被篡改的寄存器: | ||
203 | |||
204 | 无 | ||
205 | |||
206 | 定义: | ||
207 | |||
208 | 应用于任何需要内存屏障以防止手动数据修改带来的一致性问题,以及 | ||
209 | __kuser_cmpxchg 中。 | ||
210 | |||
211 | 使用范例: | ||
212 | |||
213 | typedef void (__kuser_dmb_t)(void); | ||
214 | #define __kuser_dmb (*(__kuser_dmb_t *)0xffff0fa0) | ||
215 | |||
216 | 注意: | ||
217 | |||
218 | - 仅在 __kuser_helper_version >= 3 时,此辅助代码存在 | ||
219 | (从内核版本 2.6.15 开始)。 | ||
220 | |||
221 | kuser_cmpxchg64 | ||
222 | --------------- | ||
223 | |||
224 | 位置: 0xffff0f60 | ||
225 | |||
226 | 参考原型: | ||
227 | |||
228 | int __kuser_cmpxchg64(const int64_t *oldval, | ||
229 | const int64_t *newval, | ||
230 | volatile int64_t *ptr); | ||
231 | |||
232 | 输入: | ||
233 | |||
234 | r0 = 指向 oldval | ||
235 | r1 = 指向 newval | ||
236 | r2 = 指向目标值 | ||
237 | lr = 返回地址 | ||
238 | |||
239 | 输出: | ||
240 | |||
241 | r0 = 成功代码 (零或非零) | ||
242 | C flag = 如果 r0 == 0 则置 1,如果 r0 != 0 则清零。 | ||
243 | |||
244 | 被篡改的寄存器: | ||
245 | |||
246 | r3, lr, flags | ||
247 | |||
248 | 定义: | ||
249 | |||
250 | 仅在 *ptr 等于 *oldval 指向的 64 位值时,原子保存 *newval | ||
251 | 指向的 64 位值于 *ptr 中。如果 *ptr 被改变,则返回值为零, | ||
252 | 否则为非零值。 | ||
253 | |||
254 | 如果 *ptr 被改变,则 C flag 也会被置 1,以实现调用代码中的汇编 | ||
255 | 优化。 | ||
256 | |||
257 | 使用范例: | ||
258 | |||
259 | typedef int (__kuser_cmpxchg64_t)(const int64_t *oldval, | ||
260 | const int64_t *newval, | ||
261 | volatile int64_t *ptr); | ||
262 | #define __kuser_cmpxchg64 (*(__kuser_cmpxchg64_t *)0xffff0f60) | ||
263 | |||
264 | int64_t atomic_add64(volatile int64_t *ptr, int64_t val) | ||
265 | { | ||
266 | int64_t old, new; | ||
267 | |||
268 | do { | ||
269 | old = *ptr; | ||
270 | new = old + val; | ||
271 | } while(__kuser_cmpxchg64(&old, &new, ptr)); | ||
272 | |||
273 | return new; | ||
274 | } | ||
275 | |||
276 | 注意: | ||
277 | |||
278 | - 这个例程已根据需要包含了内存屏障。 | ||
279 | |||
280 | - 由于这个过程的代码长度(此辅助代码跨越 2 个常规的 kuser “槽”), | ||
281 | 因此 0xffff0f80 不被作为有效的入口点。 | ||
282 | |||
283 | - 仅在 __kuser_helper_version >= 5 时,此辅助代码存在 | ||
284 | (从内核版本 3.1 开始)。 | ||
diff --git a/Documentation/zh_CN/arm64/booting.txt b/Documentation/zh_CN/arm64/booting.txt new file mode 100644 index 000000000000..28fa325b7461 --- /dev/null +++ b/Documentation/zh_CN/arm64/booting.txt | |||
@@ -0,0 +1,156 @@ | |||
1 | Chinese translated version of Documentation/arm64/booting.txt | ||
2 | |||
3 | If you have any comment or update to the content, please contact the | ||
4 | original document maintainer directly. However, if you have a problem | ||
5 | communicating in English you can also ask the Chinese maintainer for | ||
6 | help. Contact the Chinese maintainer if this translation is outdated | ||
7 | or if there is a problem with the translation. | ||
8 | |||
9 | Maintainer: Will Deacon <will.deacon@arm.com> | ||
10 | Chinese maintainer: Fu Wei <tekkamanninja@gmail.com> | ||
11 | --------------------------------------------------------------------- | ||
12 | Documentation/arm64/booting.txt 的中文翻译 | ||
13 | |||
14 | 如果想评论或更新本文的内容,请直接联系原文档的维护者。如果你使用英文 | ||
15 | 交流有困难的话,也可以向中文版维护者求助。如果本翻译更新不及时或者翻 | ||
16 | 译存在问题,请联系中文版维护者。 | ||
17 | |||
18 | 英文版维护者: Will Deacon <will.deacon@arm.com> | ||
19 | 中文版维护者: 傅炜 Fu Wei <tekkamanninja@gmail.com> | ||
20 | 中文版翻译者: 傅炜 Fu Wei <tekkamanninja@gmail.com> | ||
21 | 中文版校译者: 傅炜 Fu Wei <tekkamanninja@gmail.com> | ||
22 | |||
23 | 以下为正文 | ||
24 | --------------------------------------------------------------------- | ||
25 | 启动 AArch64 Linux | ||
26 | ================== | ||
27 | |||
28 | 作者: Will Deacon <will.deacon@arm.com> | ||
29 | 日期: 2012 年 09 月 07 日 | ||
30 | |||
31 | 本文档基于 Russell King 的 ARM 启动文档,且适用于所有公开发布的 | ||
32 | AArch64 Linux 内核代码。 | ||
33 | |||
34 | AArch64 异常模型由多个异常级别(EL0 - EL3)组成,对于 EL0 和 EL1 | ||
35 | 异常级有对应的安全和非安全模式。EL2 是系统管理级,且仅存在于 | ||
36 | 非安全模式下。EL3 是最高特权级,且仅存在于安全模式下。 | ||
37 | |||
38 | 基于本文档的目的,我们将简单地使用‘引导装载程序’(‘boot loader’) | ||
39 | 这个术语来定义在将控制权交给 Linux 内核前 CPU 上执行的所有软件。 | ||
40 | 这可能包含安全监控和系统管理代码,或者它可能只是一些用于准备最小启动 | ||
41 | 环境的指令。 | ||
42 | |||
43 | 基本上,引导装载程序(至少)应实现以下操作: | ||
44 | |||
45 | 1、设置和初始化 RAM | ||
46 | 2、设置设备树数据 | ||
47 | 3、解压内核映像 | ||
48 | 4、调用内核映像 | ||
49 | |||
50 | |||
51 | 1、设置和初始化 RAM | ||
52 | ----------------- | ||
53 | |||
54 | 必要性: 强制 | ||
55 | |||
56 | 引导装载程序应该找到并初始化系统中所有内核用于保持系统变量数据的 RAM。 | ||
57 | 这个操作的执行是设备依赖的。(它可能使用内部算法来自动定位和计算所有 | ||
58 | RAM,或可能使用对这个设备已知的 RAM 信息,还可能使用任何引导装载程序 | ||
59 | 设计者想到的匹配方法。) | ||
60 | |||
61 | |||
62 | 2、设置设备树数据 | ||
63 | --------------- | ||
64 | |||
65 | 必要性: 强制 | ||
66 | |||
67 | 设备树数据块(dtb)大小必须不大于 2 MB,且位于从内核映像起始算起第一个 | ||
68 | 512MB 内的 2MB 边界上。这使得内核可以通过初始页表中的单个节描述符来 | ||
69 | 映射此数据块。 | ||
70 | |||
71 | |||
72 | 3、解压内核映像 | ||
73 | ------------- | ||
74 | |||
75 | 必要性: 可选 | ||
76 | |||
77 | AArch64 内核当前没有提供自解压代码,因此如果使用了压缩内核映像文件 | ||
78 | (比如 Image.gz),则需要通过引导装载程序(使用 gzip 等)来进行解压。 | ||
79 | 若引导装载程序没有实现这个需求,就要使用非压缩内核映像文件。 | ||
80 | |||
81 | |||
82 | 4、调用内核映像 | ||
83 | ------------- | ||
84 | |||
85 | 必要性: 强制 | ||
86 | |||
87 | 已解压的内核映像包含一个 32 字节的头,内容如下: | ||
88 | |||
89 | u32 magic = 0x14000008; /* 跳转到 stext, 小端 */ | ||
90 | u32 res0 = 0; /* 保留 */ | ||
91 | u64 text_offset; /* 映像装载偏移 */ | ||
92 | u64 res1 = 0; /* 保留 */ | ||
93 | u64 res2 = 0; /* 保留 */ | ||
94 | |||
95 | 映像必须位于系统 RAM 起始处的特定偏移(当前是 0x80000)。系统 RAM | ||
96 | 的起始地址必须是以 2MB 对齐的。 | ||
97 | |||
98 | 在跳转入内核前,必须符合以下状态: | ||
99 | |||
100 | - 停止所有 DMA 设备,这样内存数据就不会因为虚假网络包或磁盘数据而 | ||
101 | 被破坏。这可能可以节省你许多的调试时间。 | ||
102 | |||
103 | - 主 CPU 通用寄存器设置 | ||
104 | x0 = 系统 RAM 中设备树数据块(dtb)的物理地址。 | ||
105 | x1 = 0 (保留,将来可能使用) | ||
106 | x2 = 0 (保留,将来可能使用) | ||
107 | x3 = 0 (保留,将来可能使用) | ||
108 | |||
109 | - CPU 模式 | ||
110 | 所有形式的中断必须在 PSTATE.DAIF 中被屏蔽(Debug、SError、IRQ | ||
111 | 和 FIQ)。 | ||
112 | CPU 必须处于 EL2(推荐,可访问虚拟化扩展)或非安全 EL1 模式下。 | ||
113 | |||
114 | - 高速缓存、MMU | ||
115 | MMU 必须关闭。 | ||
116 | 指令缓存开启或关闭都可以。 | ||
117 | 数据缓存必须关闭且无效。 | ||
118 | 外部高速缓存(如果存在)必须配置并禁用。 | ||
119 | |||
120 | - 架构计时器 | ||
121 | CNTFRQ 必须设定为计时器的频率。 | ||
122 | 如果在 EL1 模式下进入内核,则 CNTHCTL_EL2 中的 EL1PCTEN (bit 0) | ||
123 | 必须置位。 | ||
124 | |||
125 | - 一致性 | ||
126 | 通过内核启动的所有 CPU 在内核入口地址上必须处于相同的一致性域中。 | ||
127 | 这可能要根据具体实现来定义初始化过程,以使能每个CPU上对维护操作的 | ||
128 | 接收。 | ||
129 | |||
130 | - 系统寄存器 | ||
131 | 在进入内核映像的异常级中,所有构架中可写的系统寄存器必须通过软件 | ||
132 | 在一个更高的异常级别下初始化,以防止在 未知 状态下运行。 | ||
133 | |||
134 | 引导装载程序必须在每个 CPU 处于以下状态时跳入内核入口: | ||
135 | |||
136 | - 主 CPU 必须直接跳入内核映像的第一条指令。通过此 CPU 传递的设备树 | ||
137 | 数据块必须在每个 CPU 节点中包含以下内容: | ||
138 | |||
139 | 1、‘enable-method’属性。目前,此字段支持的值仅为字符串“spin-table”。 | ||
140 | |||
141 | 2、‘cpu-release-addr’标识一个 64-bit、初始化为零的内存位置。 | ||
142 | |||
143 | 引导装载程序必须生成这些设备树属性,并在跳入内核入口之前将其插入 | ||
144 | 数据块。 | ||
145 | |||
146 | - 任何辅助 CPU 必须在内存保留区(通过设备树中的 /memreserve/ 域传递 | ||
147 | 给内核)中自旋于内核之外,轮询它们的 cpu-release-addr 位置(必须 | ||
148 | 包含在保留区中)。可通过插入 wfe 指令来降低忙循环开销,而主 CPU 将 | ||
149 | 发出 sev 指令。当对 cpu-release-addr 所指位置的读取操作返回非零值 | ||
150 | 时,CPU 必须直接跳入此值所指向的地址。 | ||
151 | |||
152 | - 辅助 CPU 通用寄存器设置 | ||
153 | x0 = 0 (保留,将来可能使用) | ||
154 | x1 = 0 (保留,将来可能使用) | ||
155 | x2 = 0 (保留,将来可能使用) | ||
156 | x3 = 0 (保留,将来可能使用) | ||
diff --git a/Documentation/zh_CN/arm64/memory.txt b/Documentation/zh_CN/arm64/memory.txt new file mode 100644 index 000000000000..a5f6283829f9 --- /dev/null +++ b/Documentation/zh_CN/arm64/memory.txt | |||
@@ -0,0 +1,93 @@ | |||
1 | Chinese translated version of Documentation/arm64/memory.txt | ||
2 | |||
3 | If you have any comment or update to the content, please contact the | ||
4 | original document maintainer directly. However, if you have a problem | ||
5 | communicating in English you can also ask the Chinese maintainer for | ||
6 | help. Contact the Chinese maintainer if this translation is outdated | ||
7 | or if there is a problem with the translation. | ||
8 | |||
9 | Maintainer: Catalin Marinas <catalin.marinas@arm.com> | ||
10 | Chinese maintainer: Fu Wei <tekkamanninja@gmail.com> | ||
11 | --------------------------------------------------------------------- | ||
12 | Documentation/arm64/memory.txt 的中文翻译 | ||
13 | |||
14 | 如果想评论或更新本文的内容,请直接联系原文档的维护者。如果你使用英文 | ||
15 | 交流有困难的话,也可以向中文版维护者求助。如果本翻译更新不及时或者翻 | ||
16 | 译存在问题,请联系中文版维护者。 | ||
17 | |||
18 | 英文版维护者: Catalin Marinas <catalin.marinas@arm.com> | ||
19 | 中文版维护者: 傅炜 Fu Wei <tekkamanninja@gmail.com> | ||
20 | 中文版翻译者: 傅炜 Fu Wei <tekkamanninja@gmail.com> | ||
21 | 中文版校译者: 傅炜 Fu Wei <tekkamanninja@gmail.com> | ||
22 | |||
23 | 以下为正文 | ||
24 | --------------------------------------------------------------------- | ||
25 | Linux 在 AArch64 中的内存布局 | ||
26 | =========================== | ||
27 | |||
28 | 作者: Catalin Marinas <catalin.marinas@arm.com> | ||
29 | 日期: 2012 年 02 月 20 日 | ||
30 | |||
31 | 本文档描述 AArch64 Linux 内核所使用的虚拟内存布局。此构架可以实现 | ||
32 | 页大小为 4KB 的 4 级转换表和页大小为 64KB 的 3 级转换表。 | ||
33 | |||
34 | AArch64 Linux 使用页大小为 4KB 的 3 级转换表配置,对于用户和内核 | ||
35 | 都有 39-bit (512GB) 的虚拟地址空间。对于页大小为 64KB的配置,仅 | ||
36 | 使用 2 级转换表,但内存布局相同。 | ||
37 | |||
38 | 用户地址空间的 63:39 位为 0,而内核地址空间的相应位为 1。TTBRx 的 | ||
39 | 选择由虚拟地址的 63 位给出。swapper_pg_dir 仅包含内核(全局)映射, | ||
40 | 而用户 pgd 仅包含用户(非全局)映射。swapper_pgd_dir 地址被写入 | ||
41 | TTBR1 中,且从不写入 TTBR0。 | ||
42 | |||
43 | |||
44 | AArch64 Linux 内存布局: | ||
45 | |||
46 | 起始地址 结束地址 大小 用途 | ||
47 | ----------------------------------------------------------------------- | ||
48 | 0000000000000000 0000007fffffffff 512GB 用户空间 | ||
49 | |||
50 | ffffff8000000000 ffffffbbfffeffff ~240GB vmalloc | ||
51 | |||
52 | ffffffbbffff0000 ffffffbbffffffff 64KB [防护页] | ||
53 | |||
54 | ffffffbc00000000 ffffffbdffffffff 8GB vmemmap | ||
55 | |||
56 | ffffffbe00000000 ffffffbffbbfffff ~8GB [防护页,未来用于 vmmemap] | ||
57 | |||
58 | ffffffbffbe00000 ffffffbffbe0ffff 64KB PCI I/O 空间 | ||
59 | |||
60 | ffffffbbffff0000 ffffffbcffffffff ~2MB [防护页] | ||
61 | |||
62 | ffffffbffc000000 ffffffbfffffffff 64MB 模块 | ||
63 | |||
64 | ffffffc000000000 ffffffffffffffff 256GB 内核逻辑内存映射 | ||
65 | |||
66 | |||
67 | 4KB 页大小的转换表查找: | ||
68 | |||
69 | +--------+--------+--------+--------+--------+--------+--------+--------+ | ||
70 | |63 56|55 48|47 40|39 32|31 24|23 16|15 8|7 0| | ||
71 | +--------+--------+--------+--------+--------+--------+--------+--------+ | ||
72 | | | | | | | | ||
73 | | | | | | v | ||
74 | | | | | | [11:0] 页内偏移 | ||
75 | | | | | +-> [20:12] L3 索引 | ||
76 | | | | +-----------> [29:21] L2 索引 | ||
77 | | | +---------------------> [38:30] L1 索引 | ||
78 | | +-------------------------------> [47:39] L0 索引 (未使用) | ||
79 | +-------------------------------------------------> [63] TTBR0/1 | ||
80 | |||
81 | |||
82 | 64KB 页大小的转换表查找: | ||
83 | |||
84 | +--------+--------+--------+--------+--------+--------+--------+--------+ | ||
85 | |63 56|55 48|47 40|39 32|31 24|23 16|15 8|7 0| | ||
86 | +--------+--------+--------+--------+--------+--------+--------+--------+ | ||
87 | | | | | | | ||
88 | | | | | v | ||
89 | | | | | [15:0] 页内偏移 | ||
90 | | | | +----------> [28:16] L3 索引 | ||
91 | | | +--------------------------> [41:29] L2 索引 (仅使用 38:29 ) | ||
92 | | +-------------------------------> [47:42] L1 索引 (未使用) | ||
93 | +-------------------------------------------------> [63] TTBR0/1 | ||