diff options
Diffstat (limited to 'Documentation')
137 files changed, 4130 insertions, 2883 deletions
diff --git a/Documentation/ABI/testing/sysfs-bus-rbd b/Documentation/ABI/testing/sysfs-bus-rbd new file mode 100644 index 000000000000..90a87e2a572b --- /dev/null +++ b/Documentation/ABI/testing/sysfs-bus-rbd | |||
@@ -0,0 +1,83 @@ | |||
1 | What: /sys/bus/rbd/ | ||
2 | Date: November 2010 | ||
3 | Contact: Yehuda Sadeh <yehuda@hq.newdream.net>, | ||
4 | Sage Weil <sage@newdream.net> | ||
5 | Description: | ||
6 | |||
7 | Being used for adding and removing rbd block devices. | ||
8 | |||
9 | Usage: <mon ip addr> <options> <pool name> <rbd image name> [snap name] | ||
10 | |||
11 | $ echo "192.168.0.1 name=admin rbd foo" > /sys/bus/rbd/add | ||
12 | |||
13 | The snapshot name can be "-" or omitted to map the image read/write. A <dev-id> | ||
14 | will be assigned for any registered block device. If snapshot is used, it will | ||
15 | be mapped read-only. | ||
16 | |||
17 | Removal of a device: | ||
18 | |||
19 | $ echo <dev-id> > /sys/bus/rbd/remove | ||
20 | |||
21 | Entries under /sys/bus/rbd/devices/<dev-id>/ | ||
22 | -------------------------------------------- | ||
23 | |||
24 | client_id | ||
25 | |||
26 | The ceph unique client id that was assigned for this specific session. | ||
27 | |||
28 | major | ||
29 | |||
30 | The block device major number. | ||
31 | |||
32 | name | ||
33 | |||
34 | The name of the rbd image. | ||
35 | |||
36 | pool | ||
37 | |||
38 | The pool where this rbd image resides. The pool-name pair is unique | ||
39 | per rados system. | ||
40 | |||
41 | size | ||
42 | |||
43 | The size (in bytes) of the mapped block device. | ||
44 | |||
45 | refresh | ||
46 | |||
47 | Writing to this file will reread the image header data and set | ||
48 | all relevant datastructures accordingly. | ||
49 | |||
50 | current_snap | ||
51 | |||
52 | The current snapshot for which the device is mapped. | ||
53 | |||
54 | create_snap | ||
55 | |||
56 | Create a snapshot: | ||
57 | |||
58 | $ echo <snap-name> > /sys/bus/rbd/devices/<dev-id>/snap_create | ||
59 | |||
60 | rollback_snap | ||
61 | |||
62 | Rolls back data to the specified snapshot. This goes over the entire | ||
63 | list of rados blocks and sends a rollback command to each. | ||
64 | |||
65 | $ echo <snap-name> > /sys/bus/rbd/devices/<dev-id>/snap_rollback | ||
66 | |||
67 | snap_* | ||
68 | |||
69 | A directory per each snapshot | ||
70 | |||
71 | |||
72 | Entries under /sys/bus/rbd/devices/<dev-id>/snap_<snap-name> | ||
73 | ------------------------------------------------------------- | ||
74 | |||
75 | id | ||
76 | |||
77 | The rados internal snapshot id assigned for this snapshot | ||
78 | |||
79 | size | ||
80 | |||
81 | The size of the image when this snapshot was taken. | ||
82 | |||
83 | |||
diff --git a/Documentation/ABI/testing/sysfs-class-led b/Documentation/ABI/testing/sysfs-class-led index 9e4541d71cb6..edff6630c805 100644 --- a/Documentation/ABI/testing/sysfs-class-led +++ b/Documentation/ABI/testing/sysfs-class-led | |||
@@ -26,3 +26,12 @@ Description: | |||
26 | scheduler is chosen. Trigger specific parameters can appear in | 26 | scheduler is chosen. Trigger specific parameters can appear in |
27 | /sys/class/leds/<led> once a given trigger is selected. | 27 | /sys/class/leds/<led> once a given trigger is selected. |
28 | 28 | ||
29 | What: /sys/class/leds/<led>/inverted | ||
30 | Date: January 2011 | ||
31 | KernelVersion: 2.6.38 | ||
32 | Contact: Richard Purdie <rpurdie@rpsys.net> | ||
33 | Description: | ||
34 | Invert the LED on/off state. This parameter is specific to | ||
35 | gpio and backlight triggers. In case of the backlight trigger, | ||
36 | it is usefull when driving a LED which is intended to indicate | ||
37 | a device in a standby like state. | ||
diff --git a/Documentation/ABI/testing/sysfs-class-net-batman-adv b/Documentation/ABI/testing/sysfs-class-net-batman-adv new file mode 100644 index 000000000000..38dd762def4b --- /dev/null +++ b/Documentation/ABI/testing/sysfs-class-net-batman-adv | |||
@@ -0,0 +1,14 @@ | |||
1 | |||
2 | What: /sys/class/net/<iface>/batman-adv/mesh_iface | ||
3 | Date: May 2010 | ||
4 | Contact: Marek Lindner <lindner_marek@yahoo.de> | ||
5 | Description: | ||
6 | The /sys/class/net/<iface>/batman-adv/mesh_iface file | ||
7 | displays the batman mesh interface this <iface> | ||
8 | currently is associated with. | ||
9 | |||
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-mesh b/Documentation/ABI/testing/sysfs-class-net-mesh new file mode 100644 index 000000000000..748fe1701d25 --- /dev/null +++ b/Documentation/ABI/testing/sysfs-class-net-mesh | |||
@@ -0,0 +1,69 @@ | |||
1 | |||
2 | What: /sys/class/net/<mesh_iface>/mesh/aggregated_ogms | ||
3 | Date: May 2010 | ||
4 | Contact: Marek Lindner <lindner_marek@yahoo.de> | ||
5 | Description: | ||
6 | Indicates whether the batman protocol messages of the | ||
7 | mesh <mesh_iface> shall be aggregated or not. | ||
8 | |||
9 | What: /sys/class/net/<mesh_iface>/mesh/bonding | ||
10 | Date: June 2010 | ||
11 | Contact: Simon Wunderlich <siwu@hrz.tu-chemnitz.de> | ||
12 | Description: | ||
13 | Indicates whether the data traffic going through the | ||
14 | mesh will be sent using multiple interfaces at the | ||
15 | same time (if available). | ||
16 | |||
17 | What: /sys/class/net/<mesh_iface>/mesh/fragmentation | ||
18 | Date: October 2010 | ||
19 | Contact: Andreas Langer <an.langer@gmx.de> | ||
20 | Description: | ||
21 | Indicates whether the data traffic going through the | ||
22 | mesh will be fragmented or silently discarded if the | ||
23 | packet size exceeds the outgoing interface MTU. | ||
24 | |||
25 | What: /sys/class/net/<mesh_iface>/mesh/gw_bandwidth | ||
26 | Date: October 2010 | ||
27 | Contact: Marek Lindner <lindner_marek@yahoo.de> | ||
28 | Description: | ||
29 | Defines the bandwidth which is propagated by this | ||
30 | node if gw_mode was set to 'server'. | ||
31 | |||
32 | What: /sys/class/net/<mesh_iface>/mesh/gw_mode | ||
33 | Date: October 2010 | ||
34 | Contact: Marek Lindner <lindner_marek@yahoo.de> | ||
35 | Description: | ||
36 | Defines the state of the gateway features. Can be | ||
37 | either 'off', 'client' or 'server'. | ||
38 | |||
39 | What: /sys/class/net/<mesh_iface>/mesh/gw_sel_class | ||
40 | Date: October 2010 | ||
41 | Contact: Marek Lindner <lindner_marek@yahoo.de> | ||
42 | Description: | ||
43 | Defines the selection criteria this node will use | ||
44 | to choose a gateway if gw_mode was set to 'client'. | ||
45 | |||
46 | What: /sys/class/net/<mesh_iface>/mesh/orig_interval | ||
47 | Date: May 2010 | ||
48 | Contact: Marek Lindner <lindner_marek@yahoo.de> | ||
49 | Description: | ||
50 | Defines the interval in milliseconds in which batman | ||
51 | sends its protocol messages. | ||
52 | |||
53 | What: /sys/class/net/<mesh_iface>/mesh/hop_penalty | ||
54 | Date: Oct 2010 | ||
55 | Contact: Linus Lüssing <linus.luessing@web.de> | ||
56 | Description: | ||
57 | Defines the penalty which will be applied to an | ||
58 | originator message's tq-field on every hop. | ||
59 | |||
60 | What: /sys/class/net/<mesh_iface>/mesh/vis_mode | ||
61 | Date: May 2010 | ||
62 | Contact: Marek Lindner <lindner_marek@yahoo.de> | ||
63 | Description: | ||
64 | Each batman node only maintains information about its | ||
65 | own local neighborhood, therefore generating graphs | ||
66 | showing the topology of the entire mesh is not easily | ||
67 | feasible without having a central instance to collect | ||
68 | the local topologies from all nodes. This file allows | ||
69 | to activate the collecting (server) mode. | ||
diff --git a/Documentation/ABI/testing/sysfs-driver-hid-roccat-kone b/Documentation/ABI/testing/sysfs-driver-hid-roccat-kone index 063bda7fe707..698b8081c473 100644 --- a/Documentation/ABI/testing/sysfs-driver-hid-roccat-kone +++ b/Documentation/ABI/testing/sysfs-driver-hid-roccat-kone | |||
@@ -1,4 +1,4 @@ | |||
1 | What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/actual_dpi | 1 | What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/kone/roccatkone<minor>/actual_dpi |
2 | Date: March 2010 | 2 | Date: March 2010 |
3 | Contact: Stefan Achatz <erazor_de@users.sourceforge.net> | 3 | Contact: Stefan Achatz <erazor_de@users.sourceforge.net> |
4 | Description: It is possible to switch the dpi setting of the mouse with the | 4 | Description: It is possible to switch the dpi setting of the mouse with the |
@@ -17,13 +17,13 @@ Description: It is possible to switch the dpi setting of the mouse with the | |||
17 | 17 | ||
18 | This file is readonly. | 18 | This file is readonly. |
19 | 19 | ||
20 | What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/actual_profile | 20 | What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/kone/roccatkone<minor>/actual_profile |
21 | Date: March 2010 | 21 | Date: March 2010 |
22 | Contact: Stefan Achatz <erazor_de@users.sourceforge.net> | 22 | Contact: Stefan Achatz <erazor_de@users.sourceforge.net> |
23 | Description: When read, this file returns the number of the actual profile. | 23 | Description: When read, this file returns the number of the actual profile. |
24 | This file is readonly. | 24 | This file is readonly. |
25 | 25 | ||
26 | What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/firmware_version | 26 | What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/kone/roccatkone<minor>/firmware_version |
27 | Date: March 2010 | 27 | Date: March 2010 |
28 | Contact: Stefan Achatz <erazor_de@users.sourceforge.net> | 28 | Contact: Stefan Achatz <erazor_de@users.sourceforge.net> |
29 | Description: When read, this file returns the raw integer version number of the | 29 | Description: When read, this file returns the raw integer version number of the |
@@ -33,7 +33,7 @@ Description: When read, this file returns the raw integer version number of the | |||
33 | left. E.g. a returned value of 138 means 1.38 | 33 | left. E.g. a returned value of 138 means 1.38 |
34 | This file is readonly. | 34 | This file is readonly. |
35 | 35 | ||
36 | What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/profile[1-5] | 36 | What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/kone/roccatkone<minor>/profile[1-5] |
37 | Date: March 2010 | 37 | Date: March 2010 |
38 | Contact: Stefan Achatz <erazor_de@users.sourceforge.net> | 38 | Contact: Stefan Achatz <erazor_de@users.sourceforge.net> |
39 | Description: The mouse can store 5 profiles which can be switched by the | 39 | Description: The mouse can store 5 profiles which can be switched by the |
@@ -48,7 +48,7 @@ Description: The mouse can store 5 profiles which can be switched by the | |||
48 | stored in the profile doesn't need to fit the number of the | 48 | stored in the profile doesn't need to fit the number of the |
49 | store. | 49 | store. |
50 | 50 | ||
51 | What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/settings | 51 | What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/kone/roccatkone<minor>/settings |
52 | Date: March 2010 | 52 | Date: March 2010 |
53 | Contact: Stefan Achatz <erazor_de@users.sourceforge.net> | 53 | Contact: Stefan Achatz <erazor_de@users.sourceforge.net> |
54 | Description: When read, this file returns the settings stored in the mouse. | 54 | Description: When read, this file returns the settings stored in the mouse. |
@@ -58,7 +58,7 @@ Description: When read, this file returns the settings stored in the mouse. | |||
58 | The data has to be 36 bytes long. The mouse will reject invalid | 58 | The data has to be 36 bytes long. The mouse will reject invalid |
59 | data. | 59 | data. |
60 | 60 | ||
61 | What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/startup_profile | 61 | What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/kone/roccatkone<minor>/startup_profile |
62 | Date: March 2010 | 62 | Date: March 2010 |
63 | Contact: Stefan Achatz <erazor_de@users.sourceforge.net> | 63 | Contact: Stefan Achatz <erazor_de@users.sourceforge.net> |
64 | Description: The integer value of this attribute ranges from 1 to 5. | 64 | Description: The integer value of this attribute ranges from 1 to 5. |
@@ -67,7 +67,7 @@ Description: The integer value of this attribute ranges from 1 to 5. | |||
67 | When written, this file sets the number of the startup profile | 67 | When written, this file sets the number of the startup profile |
68 | and the mouse activates this profile immediately. | 68 | and the mouse activates this profile immediately. |
69 | 69 | ||
70 | What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/tcu | 70 | What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/kone/roccatkone<minor>/tcu |
71 | Date: March 2010 | 71 | Date: March 2010 |
72 | Contact: Stefan Achatz <erazor_de@users.sourceforge.net> | 72 | Contact: Stefan Achatz <erazor_de@users.sourceforge.net> |
73 | Description: The mouse has a "Tracking Control Unit" which lets the user | 73 | Description: The mouse has a "Tracking Control Unit" which lets the user |
@@ -78,7 +78,7 @@ Description: The mouse has a "Tracking Control Unit" which lets the user | |||
78 | Writing 1 in this file will start the calibration which takes | 78 | Writing 1 in this file will start the calibration which takes |
79 | around 6 seconds to complete and activates the TCU. | 79 | around 6 seconds to complete and activates the TCU. |
80 | 80 | ||
81 | What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/weight | 81 | What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/kone/roccatkone<minor>/weight |
82 | Date: March 2010 | 82 | Date: March 2010 |
83 | Contact: Stefan Achatz <erazor_de@users.sourceforge.net> | 83 | Contact: Stefan Achatz <erazor_de@users.sourceforge.net> |
84 | Description: The mouse can be equipped with one of four supplied weights | 84 | Description: The mouse can be equipped with one of four supplied weights |
diff --git a/Documentation/ABI/testing/sysfs-driver-hid-roccat-koneplus b/Documentation/ABI/testing/sysfs-driver-hid-roccat-koneplus new file mode 100644 index 000000000000..0f9f30eb1742 --- /dev/null +++ b/Documentation/ABI/testing/sysfs-driver-hid-roccat-koneplus | |||
@@ -0,0 +1,108 @@ | |||
1 | What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/koneplus/roccatkoneplus<minor>/actual_profile | ||
2 | Date: October 2010 | ||
3 | Contact: Stefan Achatz <erazor_de@users.sourceforge.net> | ||
4 | Description: When read, this file returns the number of the actual profile in | ||
5 | range 0-4. | ||
6 | This file is readonly. | ||
7 | |||
8 | What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/koneplus/roccatkoneplus<minor>/firmware_version | ||
9 | Date: October 2010 | ||
10 | Contact: Stefan Achatz <erazor_de@users.sourceforge.net> | ||
11 | Description: When read, this file returns the raw integer version number of the | ||
12 | firmware reported by the mouse. Using the integer value eases | ||
13 | further usage in other programs. To receive the real version | ||
14 | number the decimal point has to be shifted 2 positions to the | ||
15 | left. E.g. a returned value of 121 means 1.21 | ||
16 | This file is readonly. | ||
17 | |||
18 | What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/koneplus/roccatkoneplus<minor>/macro | ||
19 | Date: October 2010 | ||
20 | Contact: Stefan Achatz <erazor_de@users.sourceforge.net> | ||
21 | Description: The mouse can store a macro with max 500 key/button strokes | ||
22 | internally. | ||
23 | When written, this file lets one set the sequence for a specific | ||
24 | button for a specific profile. Button and profile numbers are | ||
25 | included in written data. The data has to be 2082 bytes long. | ||
26 | This file is writeonly. | ||
27 | |||
28 | What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/koneplus/roccatkoneplus<minor>/profile_buttons | ||
29 | Date: August 2010 | ||
30 | Contact: Stefan Achatz <erazor_de@users.sourceforge.net> | ||
31 | Description: The mouse can store 5 profiles which can be switched by the | ||
32 | press of a button. A profile is split in settings and buttons. | ||
33 | profile_buttons holds informations about button layout. | ||
34 | When written, this file lets one write the respective profile | ||
35 | buttons back to the mouse. The data has to be 77 bytes long. | ||
36 | The mouse will reject invalid data. | ||
37 | Which profile to write is determined by the profile number | ||
38 | contained in the data. | ||
39 | This file is writeonly. | ||
40 | |||
41 | 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 | ||
42 | Date: August 2010 | ||
43 | Contact: Stefan Achatz <erazor_de@users.sourceforge.net> | ||
44 | Description: The mouse can store 5 profiles which can be switched by the | ||
45 | press of a button. A profile is split in settings and buttons. | ||
46 | profile_buttons holds informations about button layout. | ||
47 | When read, these files return the respective profile buttons. | ||
48 | The returned data is 77 bytes in size. | ||
49 | This file is readonly. | ||
50 | |||
51 | What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/koneplus/roccatkoneplus<minor>/profile_settings | ||
52 | Date: October 2010 | ||
53 | Contact: Stefan Achatz <erazor_de@users.sourceforge.net> | ||
54 | Description: The mouse can store 5 profiles which can be switched by the | ||
55 | press of a button. A profile is split in settings and buttons. | ||
56 | profile_settings holds informations like resolution, sensitivity | ||
57 | and light effects. | ||
58 | When written, this file lets one write the respective profile | ||
59 | settings back to the mouse. The data has to be 43 bytes long. | ||
60 | The mouse will reject invalid data. | ||
61 | Which profile to write is determined by the profile number | ||
62 | contained in the data. | ||
63 | This file is writeonly. | ||
64 | |||
65 | 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 | ||
66 | Date: August 2010 | ||
67 | Contact: Stefan Achatz <erazor_de@users.sourceforge.net> | ||
68 | Description: The mouse can store 5 profiles which can be switched by the | ||
69 | press of a button. A profile is split in settings and buttons. | ||
70 | profile_settings holds informations like resolution, sensitivity | ||
71 | and light effects. | ||
72 | When read, these files return the respective profile settings. | ||
73 | The returned data is 43 bytes in size. | ||
74 | This file is readonly. | ||
75 | |||
76 | What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/koneplus/roccatkoneplus<minor>/sensor | ||
77 | Date: October 2010 | ||
78 | Contact: Stefan Achatz <erazor_de@users.sourceforge.net> | ||
79 | Description: The mouse has a tracking- and a distance-control-unit. These | ||
80 | can be activated/deactivated and the lift-off distance can be | ||
81 | set. The data has to be 6 bytes long. | ||
82 | This file is writeonly. | ||
83 | |||
84 | What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/koneplus/roccatkoneplus<minor>/startup_profile | ||
85 | Date: October 2010 | ||
86 | Contact: Stefan Achatz <erazor_de@users.sourceforge.net> | ||
87 | Description: The integer value of this attribute ranges from 0-4. | ||
88 | When read, this attribute returns the number of the profile | ||
89 | that's active when the mouse is powered on. | ||
90 | When written, this file sets the number of the startup profile | ||
91 | and the mouse activates this profile immediately. | ||
92 | |||
93 | What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/koneplus/roccatkoneplus<minor>/tcu | ||
94 | Date: October 2010 | ||
95 | Contact: Stefan Achatz <erazor_de@users.sourceforge.net> | ||
96 | Description: When written a calibration process for the tracking control unit | ||
97 | can be initiated/cancelled. | ||
98 | The data has to be 3 bytes long. | ||
99 | This file is writeonly. | ||
100 | |||
101 | What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/koneplus/roccatkoneplus<minor>/tcu_image | ||
102 | Date: October 2010 | ||
103 | Contact: Stefan Achatz <erazor_de@users.sourceforge.net> | ||
104 | Description: When read the mouse returns a 30x30 pixel image of the | ||
105 | sampled underground. This works only in the course of a | ||
106 | calibration process initiated with tcu. | ||
107 | The returned data is 1028 bytes in size. | ||
108 | This file is readonly. | ||
diff --git a/Documentation/ABI/testing/sysfs-driver-hid-roccat-pyra b/Documentation/ABI/testing/sysfs-driver-hid-roccat-pyra index ad1125b02ff4..1c37b823f142 100644 --- a/Documentation/ABI/testing/sysfs-driver-hid-roccat-pyra +++ b/Documentation/ABI/testing/sysfs-driver-hid-roccat-pyra | |||
@@ -1,4 +1,4 @@ | |||
1 | What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/actual_cpi | 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 | 2 | Date: August 2010 |
3 | Contact: Stefan Achatz <erazor_de@users.sourceforge.net> | 3 | Contact: Stefan Achatz <erazor_de@users.sourceforge.net> |
4 | Description: It is possible to switch the cpi setting of the mouse with the | 4 | Description: It is possible to switch the cpi setting of the mouse with the |
@@ -14,14 +14,14 @@ Description: It is possible to switch the cpi setting of the mouse with the | |||
14 | 14 | ||
15 | This file is readonly. | 15 | This file is readonly. |
16 | 16 | ||
17 | What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/actual_profile | 17 | What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/pyra/roccatpyra<minor>/actual_profile |
18 | Date: August 2010 | 18 | Date: August 2010 |
19 | Contact: Stefan Achatz <erazor_de@users.sourceforge.net> | 19 | Contact: Stefan Achatz <erazor_de@users.sourceforge.net> |
20 | Description: When read, this file returns the number of the actual profile in | 20 | Description: When read, this file returns the number of the actual profile in |
21 | range 0-4. | 21 | range 0-4. |
22 | This file is readonly. | 22 | This file is readonly. |
23 | 23 | ||
24 | What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/firmware_version | 24 | What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/pyra/roccatpyra<minor>/firmware_version |
25 | Date: August 2010 | 25 | Date: August 2010 |
26 | Contact: Stefan Achatz <erazor_de@users.sourceforge.net> | 26 | Contact: Stefan Achatz <erazor_de@users.sourceforge.net> |
27 | Description: When read, this file returns the raw integer version number of the | 27 | Description: When read, this file returns the raw integer version number of the |
@@ -31,7 +31,7 @@ Description: When read, this file returns the raw integer version number of the | |||
31 | left. E.g. a returned value of 138 means 1.38 | 31 | left. E.g. a returned value of 138 means 1.38 |
32 | This file is readonly. | 32 | This file is readonly. |
33 | 33 | ||
34 | What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/profile_settings | 34 | What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/pyra/roccatpyra<minor>/profile_settings |
35 | Date: August 2010 | 35 | Date: August 2010 |
36 | Contact: Stefan Achatz <erazor_de@users.sourceforge.net> | 36 | Contact: Stefan Achatz <erazor_de@users.sourceforge.net> |
37 | Description: The mouse can store 5 profiles which can be switched by the | 37 | Description: The mouse can store 5 profiles which can be switched by the |
@@ -45,7 +45,7 @@ Description: The mouse can store 5 profiles which can be switched by the | |||
45 | contained in the data. | 45 | contained in the data. |
46 | This file is writeonly. | 46 | This file is writeonly. |
47 | 47 | ||
48 | What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/profile[1-5]_settings | 48 | 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 |
49 | Date: August 2010 | 49 | Date: August 2010 |
50 | Contact: Stefan Achatz <erazor_de@users.sourceforge.net> | 50 | Contact: Stefan Achatz <erazor_de@users.sourceforge.net> |
51 | Description: The mouse can store 5 profiles which can be switched by the | 51 | Description: The mouse can store 5 profiles which can be switched by the |
@@ -56,7 +56,7 @@ Description: The mouse can store 5 profiles which can be switched by the | |||
56 | The returned data is 13 bytes in size. | 56 | The returned data is 13 bytes in size. |
57 | This file is readonly. | 57 | This file is readonly. |
58 | 58 | ||
59 | What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/profile_buttons | 59 | What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/pyra/roccatpyra<minor>/profile_buttons |
60 | Date: August 2010 | 60 | Date: August 2010 |
61 | Contact: Stefan Achatz <erazor_de@users.sourceforge.net> | 61 | Contact: Stefan Achatz <erazor_de@users.sourceforge.net> |
62 | Description: The mouse can store 5 profiles which can be switched by the | 62 | Description: The mouse can store 5 profiles which can be switched by the |
@@ -69,7 +69,7 @@ Description: The mouse can store 5 profiles which can be switched by the | |||
69 | contained in the data. | 69 | contained in the data. |
70 | This file is writeonly. | 70 | This file is writeonly. |
71 | 71 | ||
72 | What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/profile[1-5]_buttons | 72 | 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 |
73 | Date: August 2010 | 73 | Date: August 2010 |
74 | Contact: Stefan Achatz <erazor_de@users.sourceforge.net> | 74 | Contact: Stefan Achatz <erazor_de@users.sourceforge.net> |
75 | Description: The mouse can store 5 profiles which can be switched by the | 75 | Description: The mouse can store 5 profiles which can be switched by the |
@@ -79,7 +79,7 @@ Description: The mouse can store 5 profiles which can be switched by the | |||
79 | The returned data is 19 bytes in size. | 79 | The returned data is 19 bytes in size. |
80 | This file is readonly. | 80 | This file is readonly. |
81 | 81 | ||
82 | What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/startup_profile | 82 | What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/pyra/roccatpyra<minor>/startup_profile |
83 | Date: August 2010 | 83 | Date: August 2010 |
84 | Contact: Stefan Achatz <erazor_de@users.sourceforge.net> | 84 | Contact: Stefan Achatz <erazor_de@users.sourceforge.net> |
85 | Description: The integer value of this attribute ranges from 0-4. | 85 | Description: The integer value of this attribute ranges from 0-4. |
@@ -87,7 +87,7 @@ Description: The integer value of this attribute ranges from 0-4. | |||
87 | that's active when the mouse is powered on. | 87 | that's active when the mouse is powered on. |
88 | This file is readonly. | 88 | This file is readonly. |
89 | 89 | ||
90 | What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/settings | 90 | What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/pyra/roccatpyra<minor>/settings |
91 | Date: August 2010 | 91 | Date: August 2010 |
92 | Contact: Stefan Achatz <erazor_de@users.sourceforge.net> | 92 | Contact: Stefan Achatz <erazor_de@users.sourceforge.net> |
93 | Description: When read, this file returns the settings stored in the mouse. | 93 | Description: When read, this file returns the settings stored in the mouse. |
diff --git a/Documentation/ABI/testing/sysfs-platform-asus-laptop b/Documentation/ABI/testing/sysfs-platform-asus-laptop index 1d775390e856..41ff8ae4dee0 100644 --- a/Documentation/ABI/testing/sysfs-platform-asus-laptop +++ b/Documentation/ABI/testing/sysfs-platform-asus-laptop | |||
@@ -47,6 +47,20 @@ Date: January 2007 | |||
47 | KernelVersion: 2.6.20 | 47 | KernelVersion: 2.6.20 |
48 | Contact: "Corentin Chary" <corentincj@iksaif.net> | 48 | Contact: "Corentin Chary" <corentincj@iksaif.net> |
49 | Description: | 49 | Description: |
50 | Control the bluetooth device. 1 means on, 0 means off. | 50 | Control the wlan device. 1 means on, 0 means off. |
51 | This may control the led, the device or both. | 51 | This may control the led, the device or both. |
52 | Users: Lapsus | 52 | Users: Lapsus |
53 | |||
54 | What: /sys/devices/platform/asus_laptop/wimax | ||
55 | Date: October 2010 | ||
56 | KernelVersion: 2.6.37 | ||
57 | Contact: "Corentin Chary" <corentincj@iksaif.net> | ||
58 | Description: | ||
59 | Control the wimax device. 1 means on, 0 means off. | ||
60 | |||
61 | What: /sys/devices/platform/asus_laptop/wwan | ||
62 | Date: October 2010 | ||
63 | KernelVersion: 2.6.37 | ||
64 | Contact: "Corentin Chary" <corentincj@iksaif.net> | ||
65 | Description: | ||
66 | Control the wwan (3G) device. 1 means on, 0 means off. | ||
diff --git a/Documentation/ABI/testing/sysfs-platform-eeepc-wmi b/Documentation/ABI/testing/sysfs-platform-eeepc-wmi new file mode 100644 index 000000000000..e4b5fef5fadd --- /dev/null +++ b/Documentation/ABI/testing/sysfs-platform-eeepc-wmi | |||
@@ -0,0 +1,10 @@ | |||
1 | What: /sys/devices/platform/eeepc-wmi/cpufv | ||
2 | Date: Oct 2010 | ||
3 | KernelVersion: 2.6.37 | ||
4 | Contact: "Corentin Chary" <corentincj@iksaif.net> | ||
5 | Description: | ||
6 | Change CPU clock configuration (write-only). | ||
7 | There are three available clock configuration: | ||
8 | * 0 -> Super Performance Mode | ||
9 | * 1 -> High Performance Mode | ||
10 | * 2 -> Power Saving Mode | ||
diff --git a/Documentation/ABI/testing/sysfs-platform-ideapad-laptop b/Documentation/ABI/testing/sysfs-platform-ideapad-laptop new file mode 100644 index 000000000000..807fca2ae2a4 --- /dev/null +++ b/Documentation/ABI/testing/sysfs-platform-ideapad-laptop | |||
@@ -0,0 +1,6 @@ | |||
1 | What: /sys/devices/platform/ideapad/camera_power | ||
2 | Date: Dec 2010 | ||
3 | KernelVersion: 2.6.37 | ||
4 | Contact: "Ike Panhc <ike.pan@canonical.com>" | ||
5 | Description: | ||
6 | Control the power of camera module. 1 means on, 0 means off. | ||
diff --git a/Documentation/ABI/testing/sysfs-tty b/Documentation/ABI/testing/sysfs-tty new file mode 100644 index 000000000000..b138b663bf54 --- /dev/null +++ b/Documentation/ABI/testing/sysfs-tty | |||
@@ -0,0 +1,19 @@ | |||
1 | What: /sys/class/tty/console/active | ||
2 | Date: Nov 2010 | ||
3 | Contact: Kay Sievers <kay.sievers@vrfy.org> | ||
4 | Description: | ||
5 | Shows the list of currently configured | ||
6 | console devices, like 'tty1 ttyS0'. | ||
7 | The last entry in the file is the active | ||
8 | device connected to /dev/console. | ||
9 | The file supports poll() to detect virtual | ||
10 | console switches. | ||
11 | |||
12 | What: /sys/class/tty/tty0/active | ||
13 | Date: Nov 2010 | ||
14 | Contact: Kay Sievers <kay.sievers@vrfy.org> | ||
15 | Description: | ||
16 | Shows the currently active virtual console | ||
17 | device, like 'tty1'. | ||
18 | The file supports poll() to detect virtual | ||
19 | console switches. | ||
diff --git a/Documentation/DocBook/80211.tmpl b/Documentation/DocBook/80211.tmpl index 19a1210c2530..03641a08e275 100644 --- a/Documentation/DocBook/80211.tmpl +++ b/Documentation/DocBook/80211.tmpl | |||
@@ -146,6 +146,7 @@ | |||
146 | !Finclude/net/cfg80211.h cfg80211_rx_mgmt | 146 | !Finclude/net/cfg80211.h cfg80211_rx_mgmt |
147 | !Finclude/net/cfg80211.h cfg80211_mgmt_tx_status | 147 | !Finclude/net/cfg80211.h cfg80211_mgmt_tx_status |
148 | !Finclude/net/cfg80211.h cfg80211_cqm_rssi_notify | 148 | !Finclude/net/cfg80211.h cfg80211_cqm_rssi_notify |
149 | !Finclude/net/cfg80211.h cfg80211_cqm_pktloss_notify | ||
149 | !Finclude/net/cfg80211.h cfg80211_michael_mic_failure | 150 | !Finclude/net/cfg80211.h cfg80211_michael_mic_failure |
150 | </chapter> | 151 | </chapter> |
151 | <chapter> | 152 | <chapter> |
@@ -332,10 +333,16 @@ | |||
332 | <title>functions/definitions</title> | 333 | <title>functions/definitions</title> |
333 | !Finclude/net/mac80211.h ieee80211_rx_status | 334 | !Finclude/net/mac80211.h ieee80211_rx_status |
334 | !Finclude/net/mac80211.h mac80211_rx_flags | 335 | !Finclude/net/mac80211.h mac80211_rx_flags |
336 | !Finclude/net/mac80211.h mac80211_tx_control_flags | ||
337 | !Finclude/net/mac80211.h mac80211_rate_control_flags | ||
338 | !Finclude/net/mac80211.h ieee80211_tx_rate | ||
335 | !Finclude/net/mac80211.h ieee80211_tx_info | 339 | !Finclude/net/mac80211.h ieee80211_tx_info |
340 | !Finclude/net/mac80211.h ieee80211_tx_info_clear_status | ||
336 | !Finclude/net/mac80211.h ieee80211_rx | 341 | !Finclude/net/mac80211.h ieee80211_rx |
342 | !Finclude/net/mac80211.h ieee80211_rx_ni | ||
337 | !Finclude/net/mac80211.h ieee80211_rx_irqsafe | 343 | !Finclude/net/mac80211.h ieee80211_rx_irqsafe |
338 | !Finclude/net/mac80211.h ieee80211_tx_status | 344 | !Finclude/net/mac80211.h ieee80211_tx_status |
345 | !Finclude/net/mac80211.h ieee80211_tx_status_ni | ||
339 | !Finclude/net/mac80211.h ieee80211_tx_status_irqsafe | 346 | !Finclude/net/mac80211.h ieee80211_tx_status_irqsafe |
340 | !Finclude/net/mac80211.h ieee80211_rts_get | 347 | !Finclude/net/mac80211.h ieee80211_rts_get |
341 | !Finclude/net/mac80211.h ieee80211_rts_duration | 348 | !Finclude/net/mac80211.h ieee80211_rts_duration |
@@ -346,6 +353,7 @@ | |||
346 | !Finclude/net/mac80211.h ieee80211_stop_queue | 353 | !Finclude/net/mac80211.h ieee80211_stop_queue |
347 | !Finclude/net/mac80211.h ieee80211_wake_queues | 354 | !Finclude/net/mac80211.h ieee80211_wake_queues |
348 | !Finclude/net/mac80211.h ieee80211_stop_queues | 355 | !Finclude/net/mac80211.h ieee80211_stop_queues |
356 | !Finclude/net/mac80211.h ieee80211_queue_stopped | ||
349 | </sect1> | 357 | </sect1> |
350 | </chapter> | 358 | </chapter> |
351 | 359 | ||
@@ -354,6 +362,13 @@ | |||
354 | !Pinclude/net/mac80211.h Frame filtering | 362 | !Pinclude/net/mac80211.h Frame filtering |
355 | !Finclude/net/mac80211.h ieee80211_filter_flags | 363 | !Finclude/net/mac80211.h ieee80211_filter_flags |
356 | </chapter> | 364 | </chapter> |
365 | |||
366 | <chapter id="workqueue"> | ||
367 | <title>The mac80211 workqueue</title> | ||
368 | !Pinclude/net/mac80211.h mac80211 workqueue | ||
369 | !Finclude/net/mac80211.h ieee80211_queue_work | ||
370 | !Finclude/net/mac80211.h ieee80211_queue_delayed_work | ||
371 | </chapter> | ||
357 | </part> | 372 | </part> |
358 | 373 | ||
359 | <part id="advanced"> | 374 | <part id="advanced"> |
@@ -374,6 +389,9 @@ | |||
374 | !Finclude/net/mac80211.h set_key_cmd | 389 | !Finclude/net/mac80211.h set_key_cmd |
375 | !Finclude/net/mac80211.h ieee80211_key_conf | 390 | !Finclude/net/mac80211.h ieee80211_key_conf |
376 | !Finclude/net/mac80211.h ieee80211_key_flags | 391 | !Finclude/net/mac80211.h ieee80211_key_flags |
392 | !Finclude/net/mac80211.h ieee80211_tkip_key_type | ||
393 | !Finclude/net/mac80211.h ieee80211_get_tkip_key | ||
394 | !Finclude/net/mac80211.h ieee80211_key_removed | ||
377 | </chapter> | 395 | </chapter> |
378 | 396 | ||
379 | <chapter id="powersave"> | 397 | <chapter id="powersave"> |
@@ -417,6 +435,18 @@ | |||
417 | supported by mac80211, add notes about supporting hw crypto | 435 | supported by mac80211, add notes about supporting hw crypto |
418 | with it. | 436 | with it. |
419 | </para> | 437 | </para> |
438 | !Finclude/net/mac80211.h ieee80211_iterate_active_interfaces | ||
439 | !Finclude/net/mac80211.h ieee80211_iterate_active_interfaces_atomic | ||
440 | </chapter> | ||
441 | |||
442 | <chapter id="station-handling"> | ||
443 | <title>Station handling</title> | ||
444 | <para>TODO</para> | ||
445 | !Finclude/net/mac80211.h ieee80211_sta | ||
446 | !Finclude/net/mac80211.h sta_notify_cmd | ||
447 | !Finclude/net/mac80211.h ieee80211_find_sta | ||
448 | !Finclude/net/mac80211.h ieee80211_find_sta_by_ifaddr | ||
449 | !Finclude/net/mac80211.h ieee80211_sta_block_awake | ||
420 | </chapter> | 450 | </chapter> |
421 | 451 | ||
422 | <chapter id="hardware-scan-offload"> | 452 | <chapter id="hardware-scan-offload"> |
@@ -424,6 +454,28 @@ | |||
424 | <para>TBD</para> | 454 | <para>TBD</para> |
425 | !Finclude/net/mac80211.h ieee80211_scan_completed | 455 | !Finclude/net/mac80211.h ieee80211_scan_completed |
426 | </chapter> | 456 | </chapter> |
457 | |||
458 | <chapter id="aggregation"> | ||
459 | <title>Aggregation</title> | ||
460 | <sect1> | ||
461 | <title>TX A-MPDU aggregation</title> | ||
462 | !Pnet/mac80211/agg-tx.c TX A-MPDU aggregation | ||
463 | !Cnet/mac80211/agg-tx.c | ||
464 | </sect1> | ||
465 | <sect1> | ||
466 | <title>RX A-MPDU aggregation</title> | ||
467 | !Pnet/mac80211/agg-rx.c RX A-MPDU aggregation | ||
468 | !Cnet/mac80211/agg-rx.c | ||
469 | </sect1> | ||
470 | !Finclude/net/mac80211.h ieee80211_ampdu_mlme_action | ||
471 | </chapter> | ||
472 | |||
473 | <chapter id="smps"> | ||
474 | <title>Spatial Multiplexing Powersave (SMPS)</title> | ||
475 | !Pinclude/net/mac80211.h Spatial multiplexing power save | ||
476 | !Finclude/net/mac80211.h ieee80211_request_smps | ||
477 | !Finclude/net/mac80211.h ieee80211_smps_mode | ||
478 | </chapter> | ||
427 | </part> | 479 | </part> |
428 | 480 | ||
429 | <part id="rate-control"> | 481 | <part id="rate-control"> |
@@ -435,9 +487,16 @@ | |||
435 | interface and how it relates to mac80211 and drivers. | 487 | interface and how it relates to mac80211 and drivers. |
436 | </para> | 488 | </para> |
437 | </partintro> | 489 | </partintro> |
438 | <chapter id="dummy"> | 490 | <chapter id="ratecontrol-api"> |
439 | <title>dummy chapter</title> | 491 | <title>Rate Control API</title> |
440 | <para>TBD</para> | 492 | <para>TBD</para> |
493 | !Finclude/net/mac80211.h ieee80211_start_tx_ba_session | ||
494 | !Finclude/net/mac80211.h ieee80211_start_tx_ba_cb_irqsafe | ||
495 | !Finclude/net/mac80211.h ieee80211_stop_tx_ba_session | ||
496 | !Finclude/net/mac80211.h ieee80211_stop_tx_ba_cb_irqsafe | ||
497 | !Finclude/net/mac80211.h rate_control_changed | ||
498 | !Finclude/net/mac80211.h ieee80211_tx_rate_control | ||
499 | !Finclude/net/mac80211.h rate_control_send_low | ||
441 | </chapter> | 500 | </chapter> |
442 | </part> | 501 | </part> |
443 | 502 | ||
@@ -485,6 +544,13 @@ | |||
485 | </sect1> | 544 | </sect1> |
486 | </chapter> | 545 | </chapter> |
487 | 546 | ||
547 | <chapter id="aggregation-internals"> | ||
548 | <title>Aggregation</title> | ||
549 | !Fnet/mac80211/sta_info.h sta_ampdu_mlme | ||
550 | !Fnet/mac80211/sta_info.h tid_ampdu_tx | ||
551 | !Fnet/mac80211/sta_info.h tid_ampdu_rx | ||
552 | </chapter> | ||
553 | |||
488 | <chapter id="synchronisation"> | 554 | <chapter id="synchronisation"> |
489 | <title>Synchronisation</title> | 555 | <title>Synchronisation</title> |
490 | <para>TBD</para> | 556 | <para>TBD</para> |
diff --git a/Documentation/DocBook/device-drivers.tmpl b/Documentation/DocBook/device-drivers.tmpl index 22edcbb9ddaf..35447e081736 100644 --- a/Documentation/DocBook/device-drivers.tmpl +++ b/Documentation/DocBook/device-drivers.tmpl | |||
@@ -304,6 +304,10 @@ X!Idrivers/video/console/fonts.c | |||
304 | !Edrivers/input/ff-core.c | 304 | !Edrivers/input/ff-core.c |
305 | !Edrivers/input/ff-memless.c | 305 | !Edrivers/input/ff-memless.c |
306 | </sect1> | 306 | </sect1> |
307 | <sect1><title>Multitouch Library</title> | ||
308 | !Iinclude/linux/input/mt.h | ||
309 | !Edrivers/input/input-mt.c | ||
310 | </sect1> | ||
307 | <sect1><title>Polled input devices</title> | 311 | <sect1><title>Polled input devices</title> |
308 | !Iinclude/linux/input-polldev.h | 312 | !Iinclude/linux/input-polldev.h |
309 | !Edrivers/input/input-polldev.c | 313 | !Edrivers/input/input-polldev.c |
diff --git a/Documentation/DocBook/mtdnand.tmpl b/Documentation/DocBook/mtdnand.tmpl index 020ac80d4682..620eb3f6a90a 100644 --- a/Documentation/DocBook/mtdnand.tmpl +++ b/Documentation/DocBook/mtdnand.tmpl | |||
@@ -250,7 +250,7 @@ static void board_hwcontrol(struct mtd_info *mtd, int cmd) | |||
250 | <title>Device ready function</title> | 250 | <title>Device ready function</title> |
251 | <para> | 251 | <para> |
252 | If the hardware interface has the ready busy pin of the NAND chip connected to a | 252 | If the hardware interface has the ready busy pin of the NAND chip connected to a |
253 | GPIO or other accesible I/O pin, this function is used to read back the state of the | 253 | GPIO or other accessible I/O pin, this function is used to read back the state of the |
254 | pin. The function has no arguments and should return 0, if the device is busy (R/B pin | 254 | pin. The function has no arguments and should return 0, if the device is busy (R/B pin |
255 | is low) and 1, if the device is ready (R/B pin is high). | 255 | is low) and 1, if the device is ready (R/B pin is high). |
256 | If the hardware interface does not give access to the ready busy pin, then | 256 | If the hardware interface does not give access to the ready busy pin, then |
diff --git a/Documentation/DocBook/sh.tmpl b/Documentation/DocBook/sh.tmpl index d858d92cf6d9..4a38f604fa66 100644 --- a/Documentation/DocBook/sh.tmpl +++ b/Documentation/DocBook/sh.tmpl | |||
@@ -79,10 +79,6 @@ | |||
79 | </sect2> | 79 | </sect2> |
80 | </sect1> | 80 | </sect1> |
81 | </chapter> | 81 | </chapter> |
82 | <chapter id="clk"> | ||
83 | <title>Clock Framework Extensions</title> | ||
84 | !Iinclude/linux/sh_clk.h | ||
85 | </chapter> | ||
86 | <chapter id="mach"> | 82 | <chapter id="mach"> |
87 | <title>Machine Specific Interfaces</title> | 83 | <title>Machine Specific Interfaces</title> |
88 | <sect1 id="dreamcast"> | 84 | <sect1 id="dreamcast"> |
diff --git a/Documentation/DocBook/uio-howto.tmpl b/Documentation/DocBook/uio-howto.tmpl index 4d4ce0e61e42..b4665b9c40b0 100644 --- a/Documentation/DocBook/uio-howto.tmpl +++ b/Documentation/DocBook/uio-howto.tmpl | |||
@@ -16,7 +16,7 @@ | |||
16 | </orgname> | 16 | </orgname> |
17 | 17 | ||
18 | <address> | 18 | <address> |
19 | <email>hjk@linutronix.de</email> | 19 | <email>hjk@hansjkoch.de</email> |
20 | </address> | 20 | </address> |
21 | </affiliation> | 21 | </affiliation> |
22 | </author> | 22 | </author> |
@@ -114,7 +114,7 @@ GPL version 2. | |||
114 | 114 | ||
115 | <para>If you know of any translations for this document, or you are | 115 | <para>If you know of any translations for this document, or you are |
116 | interested in translating it, please email me | 116 | interested in translating it, please email me |
117 | <email>hjk@linutronix.de</email>. | 117 | <email>hjk@hansjkoch.de</email>. |
118 | </para> | 118 | </para> |
119 | </sect1> | 119 | </sect1> |
120 | 120 | ||
@@ -171,7 +171,7 @@ interested in translating it, please email me | |||
171 | <title>Feedback</title> | 171 | <title>Feedback</title> |
172 | <para>Find something wrong with this document? (Or perhaps something | 172 | <para>Find something wrong with this document? (Or perhaps something |
173 | right?) I would love to hear from you. Please email me at | 173 | right?) I would love to hear from you. Please email me at |
174 | <email>hjk@linutronix.de</email>.</para> | 174 | <email>hjk@hansjkoch.de</email>.</para> |
175 | </sect1> | 175 | </sect1> |
176 | </chapter> | 176 | </chapter> |
177 | 177 | ||
diff --git a/Documentation/DocBook/v4l/func-ioctl.xml b/Documentation/DocBook/v4l/func-ioctl.xml index 00f9690e1c28..b60fd37a6295 100644 --- a/Documentation/DocBook/v4l/func-ioctl.xml +++ b/Documentation/DocBook/v4l/func-ioctl.xml | |||
@@ -34,8 +34,7 @@ | |||
34 | <varlistentry> | 34 | <varlistentry> |
35 | <term><parameter>request</parameter></term> | 35 | <term><parameter>request</parameter></term> |
36 | <listitem> | 36 | <listitem> |
37 | <para>V4L2 ioctl request code as defined in the <link | 37 | <para>V4L2 ioctl request code as defined in the <filename>videodev2.h</filename> header file, for example |
38 | linkend="videodev">videodev.h</link> header file, for example | ||
39 | VIDIOC_QUERYCAP.</para> | 38 | VIDIOC_QUERYCAP.</para> |
40 | </listitem> | 39 | </listitem> |
41 | </varlistentry> | 40 | </varlistentry> |
@@ -57,7 +56,7 @@ file descriptor. An ioctl <parameter>request</parameter> has encoded | |||
57 | in it whether the argument is an input, output or read/write | 56 | in it whether the argument is an input, output or read/write |
58 | parameter, and the size of the argument <parameter>argp</parameter> in | 57 | parameter, and the size of the argument <parameter>argp</parameter> in |
59 | bytes. Macros and defines specifying V4L2 ioctl requests are located | 58 | bytes. Macros and defines specifying V4L2 ioctl requests are located |
60 | in the <link linkend="videodev">videodev.h</link> header file. | 59 | in the <filename>videodev2.h</filename> header file. |
61 | Applications should use their own copy, not include the version in the | 60 | Applications should use their own copy, not include the version in the |
62 | kernel sources on the system they compile on. All V4L2 ioctl requests, | 61 | kernel sources on the system they compile on. All V4L2 ioctl requests, |
63 | their respective function and parameters are specified in <xref | 62 | their respective function and parameters are specified in <xref |
diff --git a/Documentation/DocBook/v4l/pixfmt.xml b/Documentation/DocBook/v4l/pixfmt.xml index d7c467187095..cfffc88d7383 100644 --- a/Documentation/DocBook/v4l/pixfmt.xml +++ b/Documentation/DocBook/v4l/pixfmt.xml | |||
@@ -142,8 +142,8 @@ leftmost pixel of the second row from the top, and so on. The last row | |||
142 | has just as many pad bytes after it as the other rows.</para> | 142 | has just as many pad bytes after it as the other rows.</para> |
143 | 143 | ||
144 | <para>In V4L2 each format has an identifier which looks like | 144 | <para>In V4L2 each format has an identifier which looks like |
145 | <constant>PIX_FMT_XXX</constant>, defined in the <link | 145 | <constant>PIX_FMT_XXX</constant>, defined in the <filename>videodev2.h</filename> |
146 | linkend="videodev">videodev.h</link> header file. These identifiers | 146 | header file. These identifiers |
147 | represent <link linkend="v4l2-fourcc">four character codes</link> | 147 | represent <link linkend="v4l2-fourcc">four character codes</link> |
148 | which are also listed below, however they are not the same as those | 148 | which are also listed below, however they are not the same as those |
149 | used in the Windows world.</para> | 149 | used in the Windows world.</para> |
diff --git a/Documentation/Makefile b/Documentation/Makefile index 6fc7ea1d1f9d..9b4bc5c76f33 100644 --- a/Documentation/Makefile +++ b/Documentation/Makefile | |||
@@ -1,3 +1,3 @@ | |||
1 | obj-m := DocBook/ accounting/ auxdisplay/ connector/ \ | 1 | obj-m := DocBook/ accounting/ auxdisplay/ connector/ \ |
2 | filesystems/ filesystems/configfs/ ia64/ laptops/ networking/ \ | 2 | filesystems/ filesystems/configfs/ ia64/ laptops/ networking/ \ |
3 | pcmcia/ spi/ timers/ video4linux/ vm/ watchdog/src/ | 3 | pcmcia/ spi/ timers/ vm/ watchdog/src/ |
diff --git a/Documentation/RCU/trace.txt b/Documentation/RCU/trace.txt index a851118775d8..6a8c73f55b80 100644 --- a/Documentation/RCU/trace.txt +++ b/Documentation/RCU/trace.txt | |||
@@ -1,18 +1,22 @@ | |||
1 | CONFIG_RCU_TRACE debugfs Files and Formats | 1 | CONFIG_RCU_TRACE debugfs Files and Formats |
2 | 2 | ||
3 | 3 | ||
4 | The rcutree implementation of RCU provides debugfs trace output that | 4 | The rcutree and rcutiny implementations of RCU provide debugfs trace |
5 | summarizes counters and state. This information is useful for debugging | 5 | output that summarizes counters and state. This information is useful for |
6 | RCU itself, and can sometimes also help to debug abuses of RCU. | 6 | debugging RCU itself, and can sometimes also help to debug abuses of RCU. |
7 | The following sections describe the debugfs files and formats. | 7 | The following sections describe the debugfs files and formats, first |
8 | for rcutree and next for rcutiny. | ||
8 | 9 | ||
9 | 10 | ||
10 | Hierarchical RCU debugfs Files and Formats | 11 | CONFIG_TREE_RCU and CONFIG_TREE_PREEMPT_RCU debugfs Files and Formats |
11 | 12 | ||
12 | This implementation of RCU provides three debugfs files under the | 13 | These implementations of RCU provides five debugfs files under the |
13 | top-level directory RCU: rcu/rcudata (which displays fields in struct | 14 | top-level directory RCU: rcu/rcudata (which displays fields in struct |
14 | rcu_data), rcu/rcugp (which displays grace-period counters), and | 15 | rcu_data), rcu/rcudata.csv (which is a .csv spreadsheet version of |
15 | rcu/rcuhier (which displays the struct rcu_node hierarchy). | 16 | rcu/rcudata), rcu/rcugp (which displays grace-period counters), |
17 | rcu/rcuhier (which displays the struct rcu_node hierarchy), and | ||
18 | rcu/rcu_pending (which displays counts of the reasons that the | ||
19 | rcu_pending() function decided that there was core RCU work to do). | ||
16 | 20 | ||
17 | The output of "cat rcu/rcudata" looks as follows: | 21 | The output of "cat rcu/rcudata" looks as follows: |
18 | 22 | ||
@@ -130,7 +134,8 @@ o "ci" is the number of RCU callbacks that have been invoked for | |||
130 | been registered in absence of CPU-hotplug activity. | 134 | been registered in absence of CPU-hotplug activity. |
131 | 135 | ||
132 | o "co" is the number of RCU callbacks that have been orphaned due to | 136 | o "co" is the number of RCU callbacks that have been orphaned due to |
133 | this CPU going offline. | 137 | this CPU going offline. These orphaned callbacks have been moved |
138 | to an arbitrarily chosen online CPU. | ||
134 | 139 | ||
135 | o "ca" is the number of RCU callbacks that have been adopted due to | 140 | o "ca" is the number of RCU callbacks that have been adopted due to |
136 | other CPUs going offline. Note that ci+co-ca+ql is the number of | 141 | other CPUs going offline. Note that ci+co-ca+ql is the number of |
@@ -168,12 +173,12 @@ o "gpnum" is the number of grace periods that have started. It is | |||
168 | 173 | ||
169 | The output of "cat rcu/rcuhier" looks as follows, with very long lines: | 174 | The output of "cat rcu/rcuhier" looks as follows, with very long lines: |
170 | 175 | ||
171 | c=6902 g=6903 s=2 jfq=3 j=72c7 nfqs=13142/nfqsng=0(13142) fqlh=6 oqlen=0 | 176 | c=6902 g=6903 s=2 jfq=3 j=72c7 nfqs=13142/nfqsng=0(13142) fqlh=6 |
172 | 1/1 .>. 0:127 ^0 | 177 | 1/1 .>. 0:127 ^0 |
173 | 3/3 .>. 0:35 ^0 0/0 .>. 36:71 ^1 0/0 .>. 72:107 ^2 0/0 .>. 108:127 ^3 | 178 | 3/3 .>. 0:35 ^0 0/0 .>. 36:71 ^1 0/0 .>. 72:107 ^2 0/0 .>. 108:127 ^3 |
174 | 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 | 179 | 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 |
175 | rcu_bh: | 180 | rcu_bh: |
176 | c=-226 g=-226 s=1 jfq=-5701 j=72c7 nfqs=88/nfqsng=0(88) fqlh=0 oqlen=0 | 181 | c=-226 g=-226 s=1 jfq=-5701 j=72c7 nfqs=88/nfqsng=0(88) fqlh=0 |
177 | 0/1 .>. 0:127 ^0 | 182 | 0/1 .>. 0:127 ^0 |
178 | 0/3 .>. 0:35 ^0 0/0 .>. 36:71 ^1 0/0 .>. 72:107 ^2 0/0 .>. 108:127 ^3 | 183 | 0/3 .>. 0:35 ^0 0/0 .>. 36:71 ^1 0/0 .>. 72:107 ^2 0/0 .>. 108:127 ^3 |
179 | 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 | 184 | 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 |
@@ -212,11 +217,6 @@ o "fqlh" is the number of calls to force_quiescent_state() that | |||
212 | exited immediately (without even being counted in nfqs above) | 217 | exited immediately (without even being counted in nfqs above) |
213 | due to contention on ->fqslock. | 218 | due to contention on ->fqslock. |
214 | 219 | ||
215 | o "oqlen" is the number of callbacks on the "orphan" callback | ||
216 | list. RCU callbacks are placed on this list by CPUs going | ||
217 | offline, and are "adopted" either by the CPU helping the outgoing | ||
218 | CPU or by the next rcu_barrier*() call, whichever comes first. | ||
219 | |||
220 | o Each element of the form "1/1 0:127 ^0" represents one struct | 220 | o Each element of the form "1/1 0:127 ^0" represents one struct |
221 | rcu_node. Each line represents one level of the hierarchy, from | 221 | rcu_node. Each line represents one level of the hierarchy, from |
222 | root to leaves. It is best to think of the rcu_data structures | 222 | root to leaves. It is best to think of the rcu_data structures |
@@ -326,3 +326,115 @@ o "nn" is the number of times that this CPU needed nothing. Alert | |||
326 | readers will note that the rcu "nn" number for a given CPU very | 326 | readers will note that the rcu "nn" number for a given CPU very |
327 | closely matches the rcu_bh "np" number for that same CPU. This | 327 | closely matches the rcu_bh "np" number for that same CPU. This |
328 | is due to short-circuit evaluation in rcu_pending(). | 328 | is due to short-circuit evaluation in rcu_pending(). |
329 | |||
330 | |||
331 | CONFIG_TINY_RCU and CONFIG_TINY_PREEMPT_RCU debugfs Files and Formats | ||
332 | |||
333 | These implementations of RCU provides a single debugfs file under the | ||
334 | top-level directory RCU, namely rcu/rcudata, which displays fields in | ||
335 | rcu_bh_ctrlblk, rcu_sched_ctrlblk and, for CONFIG_TINY_PREEMPT_RCU, | ||
336 | rcu_preempt_ctrlblk. | ||
337 | |||
338 | The output of "cat rcu/rcudata" is as follows: | ||
339 | |||
340 | rcu_preempt: qlen=24 gp=1097669 g197/p197/c197 tasks=... | ||
341 | ttb=. btg=no ntb=184 neb=0 nnb=183 j=01f7 bt=0274 | ||
342 | normal balk: nt=1097669 gt=0 bt=371 b=0 ny=25073378 nos=0 | ||
343 | exp balk: bt=0 nos=0 | ||
344 | rcu_sched: qlen: 0 | ||
345 | rcu_bh: qlen: 0 | ||
346 | |||
347 | This is split into rcu_preempt, rcu_sched, and rcu_bh sections, with the | ||
348 | rcu_preempt section appearing only in CONFIG_TINY_PREEMPT_RCU builds. | ||
349 | The last three lines of the rcu_preempt section appear only in | ||
350 | CONFIG_RCU_BOOST kernel builds. The fields are as follows: | ||
351 | |||
352 | o "qlen" is the number of RCU callbacks currently waiting either | ||
353 | for an RCU grace period or waiting to be invoked. This is the | ||
354 | only field present for rcu_sched and rcu_bh, due to the | ||
355 | short-circuiting of grace period in those two cases. | ||
356 | |||
357 | o "gp" is the number of grace periods that have completed. | ||
358 | |||
359 | o "g197/p197/c197" displays the grace-period state, with the | ||
360 | "g" number being the number of grace periods that have started | ||
361 | (mod 256), the "p" number being the number of grace periods | ||
362 | that the CPU has responded to (also mod 256), and the "c" | ||
363 | number being the number of grace periods that have completed | ||
364 | (once again mode 256). | ||
365 | |||
366 | Why have both "gp" and "g"? Because the data flowing into | ||
367 | "gp" is only present in a CONFIG_RCU_TRACE kernel. | ||
368 | |||
369 | o "tasks" is a set of bits. The first bit is "T" if there are | ||
370 | currently tasks that have recently blocked within an RCU | ||
371 | read-side critical section, the second bit is "N" if any of the | ||
372 | aforementioned tasks are blocking the current RCU grace period, | ||
373 | and the third bit is "E" if any of the aforementioned tasks are | ||
374 | blocking the current expedited grace period. Each bit is "." | ||
375 | if the corresponding condition does not hold. | ||
376 | |||
377 | o "ttb" is a single bit. It is "B" if any of the blocked tasks | ||
378 | need to be priority boosted and "." otherwise. | ||
379 | |||
380 | o "btg" indicates whether boosting has been carried out during | ||
381 | the current grace period, with "exp" indicating that boosting | ||
382 | is in progress for an expedited grace period, "no" indicating | ||
383 | that boosting has not yet started for a normal grace period, | ||
384 | "begun" indicating that boosting has bebug for a normal grace | ||
385 | period, and "done" indicating that boosting has completed for | ||
386 | a normal grace period. | ||
387 | |||
388 | o "ntb" is the total number of tasks subjected to RCU priority boosting | ||
389 | periods since boot. | ||
390 | |||
391 | o "neb" is the number of expedited grace periods that have had | ||
392 | to resort to RCU priority boosting since boot. | ||
393 | |||
394 | o "nnb" is the number of normal grace periods that have had | ||
395 | to resort to RCU priority boosting since boot. | ||
396 | |||
397 | o "j" is the low-order 12 bits of the jiffies counter in hexadecimal. | ||
398 | |||
399 | o "bt" is the low-order 12 bits of the value that the jiffies counter | ||
400 | will have at the next time that boosting is scheduled to begin. | ||
401 | |||
402 | o In the line beginning with "normal balk", the fields are as follows: | ||
403 | |||
404 | o "nt" is the number of times that the system balked from | ||
405 | boosting because there were no blocked tasks to boost. | ||
406 | Note that the system will balk from boosting even if the | ||
407 | grace period is overdue when the currently running task | ||
408 | is looping within an RCU read-side critical section. | ||
409 | There is no point in boosting in this case, because | ||
410 | boosting a running task won't make it run any faster. | ||
411 | |||
412 | o "gt" is the number of times that the system balked | ||
413 | from boosting because, although there were blocked tasks, | ||
414 | none of them were preventing the current grace period | ||
415 | from completing. | ||
416 | |||
417 | o "bt" is the number of times that the system balked | ||
418 | from boosting because boosting was already in progress. | ||
419 | |||
420 | o "b" is the number of times that the system balked from | ||
421 | boosting because boosting had already completed for | ||
422 | the grace period in question. | ||
423 | |||
424 | o "ny" is the number of times that the system balked from | ||
425 | boosting because it was not yet time to start boosting | ||
426 | the grace period in question. | ||
427 | |||
428 | o "nos" is the number of times that the system balked from | ||
429 | boosting for inexplicable ("not otherwise specified") | ||
430 | reasons. This can actually happen due to races involving | ||
431 | increments of the jiffies counter. | ||
432 | |||
433 | o In the line beginning with "exp balk", the fields are as follows: | ||
434 | |||
435 | o "bt" is the number of times that the system balked from | ||
436 | boosting because there were no blocked tasks to boost. | ||
437 | |||
438 | o "nos" is the number of times that the system balked from | ||
439 | boosting for inexplicable ("not otherwise specified") | ||
440 | reasons. | ||
diff --git a/Documentation/accounting/getdelays.c b/Documentation/accounting/getdelays.c index a2976a6de033..e9c77788a39d 100644 --- a/Documentation/accounting/getdelays.c +++ b/Documentation/accounting/getdelays.c | |||
@@ -516,6 +516,7 @@ int main(int argc, char *argv[]) | |||
516 | default: | 516 | default: |
517 | fprintf(stderr, "Unknown nla_type %d\n", | 517 | fprintf(stderr, "Unknown nla_type %d\n", |
518 | na->nla_type); | 518 | na->nla_type); |
519 | case TASKSTATS_TYPE_NULL: | ||
519 | break; | 520 | break; |
520 | } | 521 | } |
521 | na = (struct nlattr *) (GENLMSG_DATA(&msg) + len); | 522 | na = (struct nlattr *) (GENLMSG_DATA(&msg) + len); |
diff --git a/Documentation/arm/00-INDEX b/Documentation/arm/00-INDEX index ecf7d04bca26..91c24a1e8a9e 100644 --- a/Documentation/arm/00-INDEX +++ b/Documentation/arm/00-INDEX | |||
@@ -34,3 +34,5 @@ memory.txt | |||
34 | - description of the virtual memory layout | 34 | - description of the virtual memory layout |
35 | nwfpe/ | 35 | nwfpe/ |
36 | - NWFPE floating point emulator documentation | 36 | - NWFPE floating point emulator documentation |
37 | swp_emulation | ||
38 | - SWP/SWPB emulation handler/logging description | ||
diff --git a/Documentation/arm/OMAP/omap_pm b/Documentation/arm/OMAP/omap_pm index 5389440aade3..9012bb039094 100644 --- a/Documentation/arm/OMAP/omap_pm +++ b/Documentation/arm/OMAP/omap_pm | |||
@@ -127,3 +127,28 @@ implementation needs: | |||
127 | 10. (*pdata->cpu_set_freq)(unsigned long f) | 127 | 10. (*pdata->cpu_set_freq)(unsigned long f) |
128 | 128 | ||
129 | 11. (*pdata->cpu_get_freq)(void) | 129 | 11. (*pdata->cpu_get_freq)(void) |
130 | |||
131 | Customizing OPP for platform | ||
132 | ============================ | ||
133 | Defining CONFIG_PM should enable OPP layer for the silicon | ||
134 | and the registration of OPP table should take place automatically. | ||
135 | However, in special cases, the default OPP table may need to be | ||
136 | tweaked, for e.g.: | ||
137 | * enable default OPPs which are disabled by default, but which | ||
138 | could be enabled on a platform | ||
139 | * Disable an unsupported OPP on the platform | ||
140 | * Define and add a custom opp table entry | ||
141 | in these cases, the board file needs to do additional steps as follows: | ||
142 | arch/arm/mach-omapx/board-xyz.c | ||
143 | #include "pm.h" | ||
144 | .... | ||
145 | static void __init omap_xyz_init_irq(void) | ||
146 | { | ||
147 | .... | ||
148 | /* Initialize the default table */ | ||
149 | omapx_opp_init(); | ||
150 | /* Do customization to the defaults */ | ||
151 | .... | ||
152 | } | ||
153 | NOTE: omapx_opp_init will be omap3_opp_init or as required | ||
154 | based on the omap family. | ||
diff --git a/Documentation/arm/swp_emulation b/Documentation/arm/swp_emulation new file mode 100644 index 000000000000..af903d22fd93 --- /dev/null +++ b/Documentation/arm/swp_emulation | |||
@@ -0,0 +1,27 @@ | |||
1 | Software emulation of deprecated SWP instruction (CONFIG_SWP_EMULATE) | ||
2 | --------------------------------------------------------------------- | ||
3 | |||
4 | ARMv6 architecture deprecates use of the SWP/SWPB instructions, and recommeds | ||
5 | moving to the load-locked/store-conditional instructions LDREX and STREX. | ||
6 | |||
7 | ARMv7 multiprocessing extensions introduce the ability to disable these | ||
8 | instructions, triggering an undefined instruction exception when executed. | ||
9 | Trapped instructions are emulated using an LDREX/STREX or LDREXB/STREXB | ||
10 | sequence. If a memory access fault (an abort) occurs, a segmentation fault is | ||
11 | signalled to the triggering process. | ||
12 | |||
13 | /proc/cpu/swp_emulation holds some statistics/information, including the PID of | ||
14 | the last process to trigger the emulation to be invocated. For example: | ||
15 | --- | ||
16 | Emulated SWP: 12 | ||
17 | Emulated SWPB: 0 | ||
18 | Aborted SWP{B}: 1 | ||
19 | Last process: 314 | ||
20 | --- | ||
21 | |||
22 | NOTE: when accessing uncached shared regions, LDREX/STREX rely on an external | ||
23 | transaction monitoring block called a global monitor to maintain update | ||
24 | atomicity. If your system does not implement a global monitor, this option can | ||
25 | cause programs that perform SWP operations to uncached memory to deadlock, as | ||
26 | the STREX operation will always fail. | ||
27 | |||
diff --git a/Documentation/cgroups/cgroup_event_listener.c b/Documentation/cgroups/cgroup_event_listener.c index 8c2bfc4a6358..3e082f96dc12 100644 --- a/Documentation/cgroups/cgroup_event_listener.c +++ b/Documentation/cgroups/cgroup_event_listener.c | |||
@@ -91,7 +91,7 @@ int main(int argc, char **argv) | |||
91 | 91 | ||
92 | if (ret == -1) { | 92 | if (ret == -1) { |
93 | perror("cgroup.event_control " | 93 | perror("cgroup.event_control " |
94 | "is not accessable any more"); | 94 | "is not accessible any more"); |
95 | break; | 95 | break; |
96 | } | 96 | } |
97 | 97 | ||
diff --git a/Documentation/cgroups/cgroups.txt b/Documentation/cgroups/cgroups.txt index 190018b0c649..44b8b7af8019 100644 --- a/Documentation/cgroups/cgroups.txt +++ b/Documentation/cgroups/cgroups.txt | |||
@@ -355,13 +355,13 @@ subsystems, type: | |||
355 | 355 | ||
356 | To change the set of subsystems bound to a mounted hierarchy, just | 356 | To change the set of subsystems bound to a mounted hierarchy, just |
357 | remount with different options: | 357 | remount with different options: |
358 | # mount -o remount,cpuset,ns hier1 /dev/cgroup | 358 | # mount -o remount,cpuset,blkio hier1 /dev/cgroup |
359 | 359 | ||
360 | Now memory is removed from the hierarchy and ns is added. | 360 | Now memory is removed from the hierarchy and blkio is added. |
361 | 361 | ||
362 | Note this will add ns to the hierarchy but won't remove memory or | 362 | Note this will add blkio to the hierarchy but won't remove memory or |
363 | cpuset, because the new options are appended to the old ones: | 363 | cpuset, because the new options are appended to the old ones: |
364 | # mount -o remount,ns /dev/cgroup | 364 | # mount -o remount,blkio /dev/cgroup |
365 | 365 | ||
366 | To Specify a hierarchy's release_agent: | 366 | To Specify a hierarchy's release_agent: |
367 | # mount -t cgroup -o cpuset,release_agent="/sbin/cpuset_release_agent" \ | 367 | # mount -t cgroup -o cpuset,release_agent="/sbin/cpuset_release_agent" \ |
diff --git a/Documentation/cgroups/memcg_test.txt b/Documentation/cgroups/memcg_test.txt index b7eececfb195..fc8fa97a09ac 100644 --- a/Documentation/cgroups/memcg_test.txt +++ b/Documentation/cgroups/memcg_test.txt | |||
@@ -398,7 +398,7 @@ Under below explanation, we assume CONFIG_MEM_RES_CTRL_SWAP=y. | |||
398 | written to move_charge_at_immigrate. | 398 | written to move_charge_at_immigrate. |
399 | 399 | ||
400 | 9.10 Memory thresholds | 400 | 9.10 Memory thresholds |
401 | Memory controler implements memory thresholds using cgroups notification | 401 | Memory controller implements memory thresholds using cgroups notification |
402 | API. You can use Documentation/cgroups/cgroup_event_listener.c to test | 402 | API. You can use Documentation/cgroups/cgroup_event_listener.c to test |
403 | it. | 403 | it. |
404 | 404 | ||
diff --git a/Documentation/coccinelle.txt b/Documentation/coccinelle.txt index 4a276ea7001c..96b690348ba1 100644 --- a/Documentation/coccinelle.txt +++ b/Documentation/coccinelle.txt | |||
@@ -36,6 +36,10 @@ as a regular user, and install it with | |||
36 | 36 | ||
37 | sudo make install | 37 | sudo make install |
38 | 38 | ||
39 | The semantic patches in the kernel will work best with Coccinelle version | ||
40 | 0.2.4 or later. Using earlier versions may incur some parse errors in the | ||
41 | semantic patch code, but any results that are obtained should still be | ||
42 | correct. | ||
39 | 43 | ||
40 | Using Coccinelle on the Linux kernel | 44 | Using Coccinelle on the Linux kernel |
41 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | 45 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
diff --git a/Documentation/development-process/2.Process b/Documentation/development-process/2.Process index 97726eba6102..911a45186340 100644 --- a/Documentation/development-process/2.Process +++ b/Documentation/development-process/2.Process | |||
@@ -154,7 +154,7 @@ The stages that a patch goes through are, generally: | |||
154 | inclusion, it should be accepted by a relevant subsystem maintainer - | 154 | inclusion, it should be accepted by a relevant subsystem maintainer - |
155 | though this acceptance is not a guarantee that the patch will make it | 155 | though this acceptance is not a guarantee that the patch will make it |
156 | all the way to the mainline. The patch will show up in the maintainer's | 156 | all the way to the mainline. The patch will show up in the maintainer's |
157 | subsystem tree and into the staging trees (described below). When the | 157 | subsystem tree and into the -next trees (described below). When the |
158 | process works, this step leads to more extensive review of the patch and | 158 | process works, this step leads to more extensive review of the patch and |
159 | the discovery of any problems resulting from the integration of this | 159 | the discovery of any problems resulting from the integration of this |
160 | patch with work being done by others. | 160 | patch with work being done by others. |
@@ -236,7 +236,7 @@ finding the right maintainer. Sending patches directly to Linus is not | |||
236 | normally the right way to go. | 236 | normally the right way to go. |
237 | 237 | ||
238 | 238 | ||
239 | 2.4: STAGING TREES | 239 | 2.4: NEXT TREES |
240 | 240 | ||
241 | The chain of subsystem trees guides the flow of patches into the kernel, | 241 | The chain of subsystem trees guides the flow of patches into the kernel, |
242 | but it also raises an interesting question: what if somebody wants to look | 242 | but it also raises an interesting question: what if somebody wants to look |
@@ -250,7 +250,7 @@ changes land in the mainline kernel. One could pull changes from all of | |||
250 | the interesting subsystem trees, but that would be a big and error-prone | 250 | the interesting subsystem trees, but that would be a big and error-prone |
251 | job. | 251 | job. |
252 | 252 | ||
253 | The answer comes in the form of staging trees, where subsystem trees are | 253 | The answer comes in the form of -next trees, where subsystem trees are |
254 | collected for testing and review. The older of these trees, maintained by | 254 | collected for testing and review. The older of these trees, maintained by |
255 | Andrew Morton, is called "-mm" (for memory management, which is how it got | 255 | Andrew Morton, is called "-mm" (for memory management, which is how it got |
256 | started). The -mm tree integrates patches from a long list of subsystem | 256 | started). The -mm tree integrates patches from a long list of subsystem |
@@ -275,7 +275,7 @@ directory at: | |||
275 | Use of the MMOTM tree is likely to be a frustrating experience, though; | 275 | Use of the MMOTM tree is likely to be a frustrating experience, though; |
276 | there is a definite chance that it will not even compile. | 276 | there is a definite chance that it will not even compile. |
277 | 277 | ||
278 | The other staging tree, started more recently, is linux-next, maintained by | 278 | The other -next tree, started more recently, is linux-next, maintained by |
279 | Stephen Rothwell. The linux-next tree is, by design, a snapshot of what | 279 | Stephen Rothwell. The linux-next tree is, by design, a snapshot of what |
280 | the mainline is expected to look like after the next merge window closes. | 280 | the mainline is expected to look like after the next merge window closes. |
281 | Linux-next trees are announced on the linux-kernel and linux-next mailing | 281 | Linux-next trees are announced on the linux-kernel and linux-next mailing |
@@ -303,12 +303,25 @@ volatility of linux-next tends to make it a difficult development target. | |||
303 | See http://lwn.net/Articles/289013/ for more information on this topic, and | 303 | See http://lwn.net/Articles/289013/ for more information on this topic, and |
304 | stay tuned; much is still in flux where linux-next is involved. | 304 | stay tuned; much is still in flux where linux-next is involved. |
305 | 305 | ||
306 | Besides the mmotm and linux-next trees, the kernel source tree now contains | 306 | 2.4.1: STAGING TREES |
307 | the drivers/staging/ directory and many sub-directories for drivers or | 307 | |
308 | filesystems that are on their way to being added to the kernel tree | 308 | The kernel source tree now contains the drivers/staging/ directory, where |
309 | proper, but they remain in drivers/staging/ while they still need more | 309 | many sub-directories for drivers or filesystems that are on their way to |
310 | work. | 310 | being added to the kernel tree live. They remain in drivers/staging while |
311 | 311 | they still need more work; once complete, they can be moved into the | |
312 | kernel proper. This is a way to keep track of drivers that aren't | ||
313 | up to Linux kernel coding or quality standards, but people may want to use | ||
314 | them and track development. | ||
315 | |||
316 | Greg Kroah-Hartman currently (as of 2.6.36) maintains the staging tree. | ||
317 | Drivers that still need work are sent to him, with each driver having | ||
318 | its own subdirectory in drivers/staging/. Along with the driver source | ||
319 | files, a TODO file should be present in the directory as well. The TODO | ||
320 | file lists the pending work that the driver needs for acceptance into | ||
321 | the kernel proper, as well as a list of people that should be Cc'd for any | ||
322 | patches to the driver. Staging drivers that don't currently build should | ||
323 | have their config entries depend upon CONFIG_BROKEN. Once they can | ||
324 | be successfully built without outside patches, CONFIG_BROKEN can be removed. | ||
312 | 325 | ||
313 | 2.5: TOOLS | 326 | 2.5: TOOLS |
314 | 327 | ||
diff --git a/Documentation/dontdiff b/Documentation/dontdiff index d9bcffd59433..470d3dba1a69 100644 --- a/Documentation/dontdiff +++ b/Documentation/dontdiff | |||
@@ -62,6 +62,10 @@ aic7*reg_print.c* | |||
62 | aic7*seq.h* | 62 | aic7*seq.h* |
63 | aicasm | 63 | aicasm |
64 | aicdb.h* | 64 | aicdb.h* |
65 | altivec1.c | ||
66 | altivec2.c | ||
67 | altivec4.c | ||
68 | altivec8.c | ||
65 | asm-offsets.h | 69 | asm-offsets.h |
66 | asm_offsets.h | 70 | asm_offsets.h |
67 | autoconf.h* | 71 | autoconf.h* |
@@ -76,6 +80,7 @@ btfixupprep | |||
76 | build | 80 | build |
77 | bvmlinux | 81 | bvmlinux |
78 | bzImage* | 82 | bzImage* |
83 | capflags.c | ||
79 | classlist.h* | 84 | classlist.h* |
80 | comp*.log | 85 | comp*.log |
81 | compile.h* | 86 | compile.h* |
@@ -94,6 +99,7 @@ devlist.h* | |||
94 | docproc | 99 | docproc |
95 | elf2ecoff | 100 | elf2ecoff |
96 | elfconfig.h* | 101 | elfconfig.h* |
102 | evergreen_reg_safe.h | ||
97 | fixdep | 103 | fixdep |
98 | flask.h | 104 | flask.h |
99 | fore200e_mkfirm | 105 | fore200e_mkfirm |
@@ -108,9 +114,16 @@ genksyms | |||
108 | *_gray256.c | 114 | *_gray256.c |
109 | ihex2fw | 115 | ihex2fw |
110 | ikconfig.h* | 116 | ikconfig.h* |
117 | inat-tables.c | ||
111 | initramfs_data.cpio | 118 | initramfs_data.cpio |
112 | initramfs_data.cpio.gz | 119 | initramfs_data.cpio.gz |
113 | initramfs_list | 120 | initramfs_list |
121 | int16.c | ||
122 | int1.c | ||
123 | int2.c | ||
124 | int32.c | ||
125 | int4.c | ||
126 | int8.c | ||
114 | kallsyms | 127 | kallsyms |
115 | kconfig | 128 | kconfig |
116 | keywords.c | 129 | keywords.c |
@@ -140,6 +153,7 @@ mkprep | |||
140 | mktables | 153 | mktables |
141 | mktree | 154 | mktree |
142 | modpost | 155 | modpost |
156 | modules.builtin | ||
143 | modules.order | 157 | modules.order |
144 | modversions.h* | 158 | modversions.h* |
145 | ncscope.* | 159 | ncscope.* |
@@ -153,14 +167,23 @@ pca200e.bin | |||
153 | pca200e_ecd.bin2 | 167 | pca200e_ecd.bin2 |
154 | piggy.gz | 168 | piggy.gz |
155 | piggyback | 169 | piggyback |
170 | piggy.S | ||
156 | pnmtologo | 171 | pnmtologo |
157 | ppc_defs.h* | 172 | ppc_defs.h* |
158 | pss_boot.h | 173 | pss_boot.h |
159 | qconf | 174 | qconf |
175 | r100_reg_safe.h | ||
176 | r200_reg_safe.h | ||
177 | r300_reg_safe.h | ||
178 | r420_reg_safe.h | ||
179 | r600_reg_safe.h | ||
160 | raid6altivec*.c | 180 | raid6altivec*.c |
161 | raid6int*.c | 181 | raid6int*.c |
162 | raid6tables.c | 182 | raid6tables.c |
163 | relocs | 183 | relocs |
184 | rn50_reg_safe.h | ||
185 | rs600_reg_safe.h | ||
186 | rv515_reg_safe.h | ||
164 | series | 187 | series |
165 | setup | 188 | setup |
166 | setup.bin | 189 | setup.bin |
@@ -169,6 +192,7 @@ sImage | |||
169 | sm_tbl* | 192 | sm_tbl* |
170 | split-include | 193 | split-include |
171 | syscalltab.h | 194 | syscalltab.h |
195 | tables.c | ||
172 | tags | 196 | tags |
173 | tftpboot.img | 197 | tftpboot.img |
174 | timeconst.h | 198 | timeconst.h |
@@ -190,6 +214,7 @@ vmlinux | |||
190 | vmlinux-* | 214 | vmlinux-* |
191 | vmlinux.aout | 215 | vmlinux.aout |
192 | vmlinux.lds | 216 | vmlinux.lds |
217 | voffset.h | ||
193 | vsyscall.lds | 218 | vsyscall.lds |
194 | vsyscall_32.lds | 219 | vsyscall_32.lds |
195 | wanxlfw.inc | 220 | wanxlfw.inc |
@@ -200,3 +225,4 @@ wakeup.elf | |||
200 | wakeup.lds | 225 | wakeup.lds |
201 | zImage* | 226 | zImage* |
202 | zconf.hash.c | 227 | zconf.hash.c |
228 | zoffset.h | ||
diff --git a/Documentation/driver-model/interface.txt b/Documentation/driver-model/interface.txt deleted file mode 100644 index c66912bfe866..000000000000 --- a/Documentation/driver-model/interface.txt +++ /dev/null | |||
@@ -1,129 +0,0 @@ | |||
1 | |||
2 | Device Interfaces | ||
3 | |||
4 | Introduction | ||
5 | ~~~~~~~~~~~~ | ||
6 | |||
7 | Device interfaces are the logical interfaces of device classes that correlate | ||
8 | directly to userspace interfaces, like device nodes. | ||
9 | |||
10 | Each device class may have multiple interfaces through which you can | ||
11 | access the same device. An input device may support the mouse interface, | ||
12 | the 'evdev' interface, and the touchscreen interface. A SCSI disk would | ||
13 | support the disk interface, the SCSI generic interface, and possibly a raw | ||
14 | device interface. | ||
15 | |||
16 | Device interfaces are registered with the class they belong to. As devices | ||
17 | are added to the class, they are added to each interface registered with | ||
18 | the class. The interface is responsible for determining whether the device | ||
19 | supports the interface or not. | ||
20 | |||
21 | |||
22 | Programming Interface | ||
23 | ~~~~~~~~~~~~~~~~~~~~~ | ||
24 | |||
25 | struct device_interface { | ||
26 | char * name; | ||
27 | rwlock_t lock; | ||
28 | u32 devnum; | ||
29 | struct device_class * devclass; | ||
30 | |||
31 | struct list_head node; | ||
32 | struct driver_dir_entry dir; | ||
33 | |||
34 | int (*add_device)(struct device *); | ||
35 | int (*add_device)(struct intf_data *); | ||
36 | }; | ||
37 | |||
38 | int interface_register(struct device_interface *); | ||
39 | void interface_unregister(struct device_interface *); | ||
40 | |||
41 | |||
42 | An interface must specify the device class it belongs to. It is added | ||
43 | to that class's list of interfaces on registration. | ||
44 | |||
45 | |||
46 | Interfaces can be added to a device class at any time. Whenever it is | ||
47 | added, each device in the class is passed to the interface's | ||
48 | add_device callback. When an interface is removed, each device is | ||
49 | removed from the interface. | ||
50 | |||
51 | |||
52 | Devices | ||
53 | ~~~~~~~ | ||
54 | Once a device is added to a device class, it is added to each | ||
55 | interface that is registered with the device class. The class | ||
56 | is expected to place a class-specific data structure in | ||
57 | struct device::class_data. The interface can use that (along with | ||
58 | other fields of struct device) to determine whether or not the driver | ||
59 | and/or device support that particular interface. | ||
60 | |||
61 | |||
62 | Data | ||
63 | ~~~~ | ||
64 | |||
65 | struct intf_data { | ||
66 | struct list_head node; | ||
67 | struct device_interface * intf; | ||
68 | struct device * dev; | ||
69 | u32 intf_num; | ||
70 | }; | ||
71 | |||
72 | int interface_add_data(struct interface_data *); | ||
73 | |||
74 | The interface is responsible for allocating and initializing a struct | ||
75 | intf_data and calling interface_add_data() to add it to the device's list | ||
76 | of interfaces it belongs to. This list will be iterated over when the device | ||
77 | is removed from the class (instead of all possible interfaces for a class). | ||
78 | This structure should probably be embedded in whatever per-device data | ||
79 | structure the interface is allocating anyway. | ||
80 | |||
81 | Devices are enumerated within the interface. This happens in interface_add_data() | ||
82 | and the enumerated value is stored in the struct intf_data for that device. | ||
83 | |||
84 | sysfs | ||
85 | ~~~~~ | ||
86 | Each interface is given a directory in the directory of the device | ||
87 | class it belongs to: | ||
88 | |||
89 | Interfaces get a directory in the class's directory as well: | ||
90 | |||
91 | class/ | ||
92 | `-- input | ||
93 | |-- devices | ||
94 | |-- drivers | ||
95 | |-- mouse | ||
96 | `-- evdev | ||
97 | |||
98 | When a device is added to the interface, a symlink is created that points | ||
99 | to the device's directory in the physical hierarchy: | ||
100 | |||
101 | class/ | ||
102 | `-- input | ||
103 | |-- devices | ||
104 | | `-- 1 -> ../../../root/pci0/00:1f.0/usb_bus/00:1f.2-1:0/ | ||
105 | |-- drivers | ||
106 | | `-- usb:usb_mouse -> ../../../bus/drivers/usb_mouse/ | ||
107 | |-- mouse | ||
108 | | `-- 1 -> ../../../root/pci0/00:1f.0/usb_bus/00:1f.2-1:0/ | ||
109 | `-- evdev | ||
110 | `-- 1 -> ../../../root/pci0/00:1f.0/usb_bus/00:1f.2-1:0/ | ||
111 | |||
112 | |||
113 | Future Plans | ||
114 | ~~~~~~~~~~~~ | ||
115 | A device interface is correlated directly with a userspace interface | ||
116 | for a device, specifically a device node. For instance, a SCSI disk | ||
117 | exposes at least two interfaces to userspace: the standard SCSI disk | ||
118 | interface and the SCSI generic interface. It might also export a raw | ||
119 | device interface. | ||
120 | |||
121 | Many interfaces have a major number associated with them and each | ||
122 | device gets a minor number. Or, multiple interfaces might share one | ||
123 | major number, and each will receive a range of minor numbers (like in | ||
124 | the case of input devices). | ||
125 | |||
126 | These major and minor numbers could be stored in the interface | ||
127 | structure. Major and minor allocations could happen when the interface | ||
128 | is registered with the class, or via a helper function. | ||
129 | |||
diff --git a/Documentation/dvb/lmedm04.txt b/Documentation/dvb/lmedm04.txt index e175784b89bf..641886504201 100644 --- a/Documentation/dvb/lmedm04.txt +++ b/Documentation/dvb/lmedm04.txt | |||
@@ -46,7 +46,7 @@ and run | |||
46 | Other LG firmware can be extracted manually from US280D.sys | 46 | Other LG firmware can be extracted manually from US280D.sys |
47 | only found in windows/system32/driver. | 47 | only found in windows/system32/driver. |
48 | 48 | ||
49 | dd if=US280D.sys ibs=1 skip=42616 count=3668 of=dvb-usb-lme2510-lg.fw | 49 | dd if=US280D.sys ibs=1 skip=42360 count=3924 of=dvb-usb-lme2510-lg.fw |
50 | 50 | ||
51 | for DM04 LME2510C (LG Tuner) | 51 | for DM04 LME2510C (LG Tuner) |
52 | --------------------------- | 52 | --------------------------- |
diff --git a/Documentation/edac.txt b/Documentation/edac.txt index 0b875e8da969..9ee774de57cd 100644 --- a/Documentation/edac.txt +++ b/Documentation/edac.txt | |||
@@ -196,7 +196,7 @@ csrow3. | |||
196 | The representation of the above is reflected in the directory tree | 196 | The representation of the above is reflected in the directory tree |
197 | in EDAC's sysfs interface. Starting in directory | 197 | in EDAC's sysfs interface. Starting in directory |
198 | /sys/devices/system/edac/mc each memory controller will be represented | 198 | /sys/devices/system/edac/mc each memory controller will be represented |
199 | by its own 'mcX' directory, where 'X" is the index of the MC. | 199 | by its own 'mcX' directory, where 'X' is the index of the MC. |
200 | 200 | ||
201 | 201 | ||
202 | ..../edac/mc/ | 202 | ..../edac/mc/ |
@@ -207,7 +207,7 @@ by its own 'mcX' directory, where 'X" is the index of the MC. | |||
207 | .... | 207 | .... |
208 | 208 | ||
209 | Under each 'mcX' directory each 'csrowX' is again represented by a | 209 | Under each 'mcX' directory each 'csrowX' is again represented by a |
210 | 'csrowX', where 'X" is the csrow index: | 210 | 'csrowX', where 'X' is the csrow index: |
211 | 211 | ||
212 | 212 | ||
213 | .../mc/mc0/ | 213 | .../mc/mc0/ |
@@ -232,7 +232,7 @@ EDAC control and attribute files. | |||
232 | 232 | ||
233 | 233 | ||
234 | In 'mcX' directories are EDAC control and attribute files for | 234 | In 'mcX' directories are EDAC control and attribute files for |
235 | this 'X" instance of the memory controllers: | 235 | this 'X' instance of the memory controllers: |
236 | 236 | ||
237 | 237 | ||
238 | Counter reset control file: | 238 | Counter reset control file: |
@@ -343,7 +343,7 @@ Sdram memory scrubbing rate: | |||
343 | 'csrowX' DIRECTORIES | 343 | 'csrowX' DIRECTORIES |
344 | 344 | ||
345 | In the 'csrowX' directories are EDAC control and attribute files for | 345 | In the 'csrowX' directories are EDAC control and attribute files for |
346 | this 'X" instance of csrow: | 346 | this 'X' instance of csrow: |
347 | 347 | ||
348 | 348 | ||
349 | Total Uncorrectable Errors count attribute file: | 349 | Total Uncorrectable Errors count attribute file: |
diff --git a/Documentation/email-clients.txt b/Documentation/email-clients.txt index 945ff3fda433..a0b58e29f911 100644 --- a/Documentation/email-clients.txt +++ b/Documentation/email-clients.txt | |||
@@ -104,6 +104,13 @@ Then from the "Message" menu item, select insert file and choose your patch. | |||
104 | As an added bonus you can customise the message creation toolbar menu | 104 | As an added bonus you can customise the message creation toolbar menu |
105 | and put the "insert file" icon there. | 105 | and put the "insert file" icon there. |
106 | 106 | ||
107 | Make the the composer window wide enough so that no lines wrap. As of | ||
108 | KMail 1.13.5 (KDE 4.5.4), KMail will apply word wrapping when sending | ||
109 | the email if the lines wrap in the composer window. Having word wrapping | ||
110 | disabled in the Options menu isn't enough. Thus, if your patch has very | ||
111 | long lines, you must make the composer window very wide before sending | ||
112 | the email. See: https://bugs.kde.org/show_bug.cgi?id=174034 | ||
113 | |||
107 | You can safely GPG sign attachments, but inlined text is preferred for | 114 | You can safely GPG sign attachments, but inlined text is preferred for |
108 | patches so do not GPG sign them. Signing patches that have been inserted | 115 | patches so do not GPG sign them. Signing patches that have been inserted |
109 | as inlined text will make them tricky to extract from their 7-bit encoding. | 116 | as inlined text will make them tricky to extract from their 7-bit encoding. |
@@ -179,26 +186,8 @@ Sylpheed (GUI) | |||
179 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | 186 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
180 | Thunderbird (GUI) | 187 | Thunderbird (GUI) |
181 | 188 | ||
182 | By default, thunderbird likes to mangle text, but there are ways to | 189 | Thunderbird is an Outlook clone that likes to mangle text, but there are ways |
183 | coerce it into being nice. | 190 | to coerce it into behaving. |
184 | |||
185 | - Under account settings, composition and addressing, uncheck "Compose | ||
186 | messages in HTML format". | ||
187 | |||
188 | - Edit your Thunderbird config settings to tell it not to wrap lines: | ||
189 | user_pref("mailnews.wraplength", 0); | ||
190 | |||
191 | - Edit your Thunderbird config settings so that it won't use format=flowed: | ||
192 | user_pref("mailnews.send_plaintext_flowed", false); | ||
193 | |||
194 | - You need to get Thunderbird into preformat mode: | ||
195 | . If you compose HTML messages by default, it's not too hard. Just select | ||
196 | "Preformat" from the drop-down box just under the subject line. | ||
197 | . If you compose in text by default, you have to tell it to compose a new | ||
198 | message in HTML (just as a one-off), and then force it from there back to | ||
199 | text, else it will wrap lines. To do this, use shift-click on the Write | ||
200 | icon to compose to get HTML compose mode, then select "Preformat" from | ||
201 | the drop-down box just under the subject line. | ||
202 | 191 | ||
203 | - Allows use of an external editor: | 192 | - Allows use of an external editor: |
204 | The easiest thing to do with Thunderbird and patches is to use an | 193 | The easiest thing to do with Thunderbird and patches is to use an |
@@ -208,6 +197,27 @@ coerce it into being nice. | |||
208 | View->Toolbars->Customize... and finally just click on it when in the | 197 | View->Toolbars->Customize... and finally just click on it when in the |
209 | Compose dialog. | 198 | Compose dialog. |
210 | 199 | ||
200 | To beat some sense out of the internal editor, do this: | ||
201 | |||
202 | - Under account settings, composition and addressing, uncheck "Compose | ||
203 | messages in HTML format". | ||
204 | |||
205 | - Edit your Thunderbird config settings so that it won't use format=flowed. | ||
206 | Go to "edit->preferences->advanced->config editor" to bring up the | ||
207 | thunderbird's registry editor, and set "mailnews.send_plaintext_flowed" to | ||
208 | "false". | ||
209 | |||
210 | - Enable "preformat" mode: Shft-click on the Write icon to bring up the HTML | ||
211 | composer, select "Preformat" from the drop-down box just under the subject | ||
212 | line, then close the message without saving. (This setting also applies to | ||
213 | the text composer, but the only control for it is in the HTML composer.) | ||
214 | |||
215 | - Install the "toggle wordwrap" extension. Download the file from: | ||
216 | https://addons.mozilla.org/thunderbird/addon/2351/ | ||
217 | Then go to "tools->add ons", select "install" at the bottom of the screen, | ||
218 | and browse to where you saved the .xul file. This adds an "Enable | ||
219 | Wordwrap" entry under the Options menu of the message composer. | ||
220 | |||
211 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | 221 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
212 | TkRat (GUI) | 222 | TkRat (GUI) |
213 | 223 | ||
diff --git a/Documentation/fb/00-INDEX b/Documentation/fb/00-INDEX index a618fd99c9f0..30a70542e823 100644 --- a/Documentation/fb/00-INDEX +++ b/Documentation/fb/00-INDEX | |||
@@ -4,33 +4,41 @@ please mail me. | |||
4 | Geert Uytterhoeven <geert@linux-m68k.org> | 4 | Geert Uytterhoeven <geert@linux-m68k.org> |
5 | 5 | ||
6 | 00-INDEX | 6 | 00-INDEX |
7 | - this file | 7 | - this file. |
8 | arkfb.txt | 8 | arkfb.txt |
9 | - info on the fbdev driver for ARK Logic chips. | 9 | - info on the fbdev driver for ARK Logic chips. |
10 | aty128fb.txt | 10 | aty128fb.txt |
11 | - info on the ATI Rage128 frame buffer driver. | 11 | - info on the ATI Rage128 frame buffer driver. |
12 | cirrusfb.txt | 12 | cirrusfb.txt |
13 | - info on the driver for Cirrus Logic chipsets. | 13 | - info on the driver for Cirrus Logic chipsets. |
14 | cmap_xfbdev.txt | ||
15 | - an introduction to fbdev's cmap structures. | ||
14 | deferred_io.txt | 16 | deferred_io.txt |
15 | - an introduction to deferred IO. | 17 | - an introduction to deferred IO. |
18 | efifb.txt | ||
19 | - info on the EFI platform driver for Intel based Apple computers. | ||
20 | ep93xx-fb.txt | ||
21 | - info on the driver for EP93xx LCD controller. | ||
16 | fbcon.txt | 22 | fbcon.txt |
17 | - intro to and usage guide for the framebuffer console (fbcon). | 23 | - intro to and usage guide for the framebuffer console (fbcon). |
18 | framebuffer.txt | 24 | framebuffer.txt |
19 | - introduction to frame buffer devices. | 25 | - introduction to frame buffer devices. |
20 | imacfb.txt | 26 | gxfb.txt |
21 | - info on the generic EFI platform driver for Intel based Macs. | 27 | - info on the framebuffer driver for AMD Geode GX2 based processors. |
22 | intel810.txt | 28 | intel810.txt |
23 | - documentation for the Intel 810/815 framebuffer driver. | 29 | - documentation for the Intel 810/815 framebuffer driver. |
24 | intelfb.txt | 30 | intelfb.txt |
25 | - docs for Intel 830M/845G/852GM/855GM/865G/915G/945G fb driver. | 31 | - docs for Intel 830M/845G/852GM/855GM/865G/915G/945G fb driver. |
26 | internals.txt | 32 | internals.txt |
27 | - quick overview of frame buffer device internals. | 33 | - quick overview of frame buffer device internals. |
34 | lxfb.txt | ||
35 | - info on the framebuffer driver for AMD Geode LX based processors. | ||
28 | matroxfb.txt | 36 | matroxfb.txt |
29 | - info on the Matrox framebuffer driver for Alpha, Intel and PPC. | 37 | - info on the Matrox framebuffer driver for Alpha, Intel and PPC. |
38 | metronomefb.txt | ||
39 | - info on the driver for the Metronome display controller. | ||
30 | modedb.txt | 40 | modedb.txt |
31 | - info on the video mode database. | 41 | - info on the video mode database. |
32 | matroxfb.txt | ||
33 | - info on the Matrox frame buffer driver. | ||
34 | pvr2fb.txt | 42 | pvr2fb.txt |
35 | - info on the PowerVR 2 frame buffer driver. | 43 | - info on the PowerVR 2 frame buffer driver. |
36 | pxafb.txt | 44 | pxafb.txt |
@@ -39,13 +47,23 @@ s3fb.txt | |||
39 | - info on the fbdev driver for S3 Trio/Virge chips. | 47 | - info on the fbdev driver for S3 Trio/Virge chips. |
40 | sa1100fb.txt | 48 | sa1100fb.txt |
41 | - information about the driver for the SA-1100 LCD controller. | 49 | - information about the driver for the SA-1100 LCD controller. |
50 | sh7760fb.txt | ||
51 | - info on the SH7760/SH7763 integrated LCDC Framebuffer driver. | ||
42 | sisfb.txt | 52 | sisfb.txt |
43 | - info on the framebuffer device driver for various SiS chips. | 53 | - info on the framebuffer device driver for various SiS chips. |
44 | sstfb.txt | 54 | sstfb.txt |
45 | - info on the frame buffer driver for 3dfx' Voodoo Graphics boards. | 55 | - info on the frame buffer driver for 3dfx' Voodoo Graphics boards. |
46 | tgafb.txt | 56 | tgafb.txt |
47 | - info on the TGA (DECChip 21030) frame buffer driver | 57 | - info on the TGA (DECChip 21030) frame buffer driver. |
58 | tridentfb.txt | ||
59 | info on the framebuffer driver for some Trident chip based cards. | ||
60 | uvesafb.txt | ||
61 | - info on the userspace VESA (VBE2+ compliant) frame buffer device. | ||
48 | vesafb.txt | 62 | vesafb.txt |
49 | - info on the VESA frame buffer device | 63 | - info on the VESA frame buffer device. |
64 | viafb.modes | ||
65 | - list of modes for VIA Integration Graphic Chip. | ||
66 | viafb.txt | ||
67 | - info on the VIA Integration Graphic Chip console framebuffer driver. | ||
50 | vt8623fb.txt | 68 | vt8623fb.txt |
51 | - info on the fb driver for the graphics core in VIA VT8623 chipsets. | 69 | - info on the fb driver for the graphics core in VIA VT8623 chipsets. |
diff --git a/Documentation/fb/udlfb.txt b/Documentation/fb/udlfb.txt new file mode 100644 index 000000000000..7fdde2a02a27 --- /dev/null +++ b/Documentation/fb/udlfb.txt | |||
@@ -0,0 +1,144 @@ | |||
1 | |||
2 | What is udlfb? | ||
3 | =============== | ||
4 | |||
5 | This is a driver for DisplayLink USB 2.0 era graphics chips. | ||
6 | |||
7 | DisplayLink chips provide simple hline/blit operations with some compression, | ||
8 | pairing that with a hardware framebuffer (16MB) on the other end of the | ||
9 | USB wire. That hardware framebuffer is able to drive the VGA, DVI, or HDMI | ||
10 | monitor with no CPU involvement until a pixel has to change. | ||
11 | |||
12 | The CPU or other local resource does all the rendering; optinally compares the | ||
13 | result with a local shadow of the remote hardware framebuffer to identify | ||
14 | the minimal set of pixels that have changed; and compresses and sends those | ||
15 | pixels line-by-line via USB bulk transfers. | ||
16 | |||
17 | Because of the efficiency of bulk transfers and a protocol on top that | ||
18 | does not require any acks - the effect is very low latency that | ||
19 | can support surprisingly high resolutions with good performance for | ||
20 | non-gaming and non-video applications. | ||
21 | |||
22 | Mode setting, EDID read, etc are other bulk or control transfers. Mode | ||
23 | setting is very flexible - able to set nearly arbitrary modes from any timing. | ||
24 | |||
25 | Advantages of USB graphics in general: | ||
26 | |||
27 | * Ability to add a nearly arbitrary number of displays to any USB 2.0 | ||
28 | capable system. On Linux, number of displays is limited by fbdev interface | ||
29 | (FB_MAX is currently 32). Of course, all USB devices on the same | ||
30 | host controller share the same 480Mbs USB 2.0 interface. | ||
31 | |||
32 | Advantages of supporting DisplayLink chips with kernel framebuffer interface: | ||
33 | |||
34 | * The actual hardware functionality of DisplayLink chips matches nearly | ||
35 | one-to-one with the fbdev interface, making the driver quite small and | ||
36 | tight relative to the functionality it provides. | ||
37 | * X servers and other applications can use the standard fbdev interface | ||
38 | from user mode to talk to the device, without needing to know anything | ||
39 | about USB or DisplayLink's protocol at all. A "displaylink" X driver | ||
40 | and a slightly modified "fbdev" X driver are among those that already do. | ||
41 | |||
42 | Disadvantages: | ||
43 | |||
44 | * Fbdev's mmap interface assumes a real hardware framebuffer is mapped. | ||
45 | In the case of USB graphics, it is just an allocated (virtual) buffer. | ||
46 | Writes need to be detected and encoded into USB bulk transfers by the CPU. | ||
47 | Accurate damage/changed area notifications work around this problem. | ||
48 | In the future, hopefully fbdev will be enhanced with an small standard | ||
49 | interface to allow mmap clients to report damage, for the benefit | ||
50 | of virtual or remote framebuffers. | ||
51 | * Fbdev does not arbitrate client ownership of the framebuffer well. | ||
52 | * Fbcon assumes the first framebuffer it finds should be consumed for console. | ||
53 | * It's not clear what the future of fbdev is, given the rise of KMS/DRM. | ||
54 | |||
55 | How to use it? | ||
56 | ============== | ||
57 | |||
58 | Udlfb, when loaded as a module, will match against all USB 2.0 generation | ||
59 | DisplayLink chips (Alex and Ollie family). It will then attempt to read the EDID | ||
60 | of the monitor, and set the best common mode between the DisplayLink device | ||
61 | and the monitor's capabilities. | ||
62 | |||
63 | If the DisplayLink device is successful, it will paint a "green screen" which | ||
64 | means that from a hardware and fbdev software perspective, everything is good. | ||
65 | |||
66 | At that point, a /dev/fb? interface will be present for user-mode applications | ||
67 | to open and begin writing to the framebuffer of the DisplayLink device using | ||
68 | standard fbdev calls. Note that if mmap() is used, by default the user mode | ||
69 | application must send down damage notifcations to trigger repaints of the | ||
70 | changed regions. Alternatively, udlfb can be recompiled with experimental | ||
71 | defio support enabled, to support a page-fault based detection mechanism | ||
72 | that can work without explicit notifcation. | ||
73 | |||
74 | The most common client of udlfb is xf86-video-displaylink or a modified | ||
75 | xf86-video-fbdev X server. These servers have no real DisplayLink specific | ||
76 | code. They write to the standard framebuffer interface and rely on udlfb | ||
77 | to do its thing. The one extra feature they have is the ability to report | ||
78 | rectangles from the X DAMAGE protocol extension down to udlfb via udlfb's | ||
79 | damage interface (which will hopefully be standardized for all virtual | ||
80 | framebuffers that need damage info). These damage notifications allow | ||
81 | udlfb to efficiently process the changed pixels. | ||
82 | |||
83 | Module Options | ||
84 | ============== | ||
85 | |||
86 | Special configuration for udlfb is usually unnecessary. There are a few | ||
87 | options, however. | ||
88 | |||
89 | From the command line, pass options to modprobe | ||
90 | modprobe udlfb defio=1 console=1 | ||
91 | |||
92 | Or for permanent option, create file like /etc/modprobe.d/options with text | ||
93 | options udlfb defio=1 console=1 | ||
94 | |||
95 | Accepted options: | ||
96 | |||
97 | fb_defio Make use of the fb_defio (CONFIG_FB_DEFERRED_IO) kernel | ||
98 | module to track changed areas of the framebuffer by page faults. | ||
99 | Standard fbdev applications that use mmap but that do not | ||
100 | report damage, may be able to work with this enabled. | ||
101 | Disabled by default because of overhead and other issues. | ||
102 | |||
103 | console Allow fbcon to attach to udlfb provided framebuffers. This | ||
104 | is disabled by default because fbcon will aggressively consume | ||
105 | the first framebuffer it finds, which isn't usually what the | ||
106 | user wants in the case of USB displays. | ||
107 | |||
108 | Sysfs Attributes | ||
109 | ================ | ||
110 | |||
111 | Udlfb creates several files in /sys/class/graphics/fb? | ||
112 | Where ? is the sequential framebuffer id of the particular DisplayLink device | ||
113 | |||
114 | edid If a valid EDID blob is written to this file (typically | ||
115 | by a udev rule), then udlfb will use this EDID as a | ||
116 | backup in case reading the actual EDID of the monitor | ||
117 | attached to the DisplayLink device fails. This is | ||
118 | especially useful for fixed panels, etc. that cannot | ||
119 | communicate their capabilities via EDID. Reading | ||
120 | this file returns the current EDID of the attached | ||
121 | monitor (or last backup value written). This is | ||
122 | useful to get the EDID of the attached monitor, | ||
123 | which can be passed to utilities like parse-edid. | ||
124 | |||
125 | metrics_bytes_rendered 32-bit count of pixel bytes rendered | ||
126 | |||
127 | metrics_bytes_identical 32-bit count of how many of those bytes were found to be | ||
128 | unchanged, based on a shadow framebuffer check | ||
129 | |||
130 | metrics_bytes_sent 32-bit count of how many bytes were transferred over | ||
131 | USB to communicate the resulting changed pixels to the | ||
132 | hardware. Includes compression and protocol overhead | ||
133 | |||
134 | metrics_cpu_kcycles_used 32-bit count of CPU cycles used in processing the | ||
135 | above pixels (in thousands of cycles). | ||
136 | |||
137 | metrics_reset Write-only. Any write to this file resets all metrics | ||
138 | above to zero. Note that the 32-bit counters above | ||
139 | roll over very quickly. To get reliable results, design | ||
140 | performance tests to start and finish in a very short | ||
141 | period of time (one minute or less is safe). | ||
142 | |||
143 | -- | ||
144 | Bernie Thompson <bernie@plugable.com> | ||
diff --git a/Documentation/feature-removal-schedule.txt b/Documentation/feature-removal-schedule.txt index 6c2f55e05f13..6cbbd20534cf 100644 --- a/Documentation/feature-removal-schedule.txt +++ b/Documentation/feature-removal-schedule.txt | |||
@@ -97,36 +97,38 @@ Who: Pavel Machek <pavel@ucw.cz> | |||
97 | 97 | ||
98 | --------------------------- | 98 | --------------------------- |
99 | 99 | ||
100 | What: Video4Linux API 1 ioctls and from Video devices. | ||
101 | When: kernel 2.6.38 | ||
102 | Files: include/linux/videodev.h | ||
103 | Check: include/linux/videodev.h | ||
104 | Why: V4L1 AP1 was replaced by V4L2 API during migration from 2.4 to 2.6 | ||
105 | series. The old API have lots of drawbacks and don't provide enough | ||
106 | means to work with all video and audio standards. The newer API is | ||
107 | already available on the main drivers and should be used instead. | ||
108 | Newer drivers should use v4l_compat_translate_ioctl function to handle | ||
109 | old calls, replacing to newer ones. | ||
110 | Decoder iocts are using internally to allow video drivers to | ||
111 | communicate with video decoders. This should also be improved to allow | ||
112 | V4L2 calls being translated into compatible internal ioctls. | ||
113 | Compatibility ioctls will be provided, for a while, via | ||
114 | v4l1-compat module. | ||
115 | Who: Mauro Carvalho Chehab <mchehab@infradead.org> | ||
116 | |||
117 | --------------------------- | ||
118 | |||
119 | What: Video4Linux obsolete drivers using V4L1 API | 100 | What: Video4Linux obsolete drivers using V4L1 API |
120 | When: kernel 2.6.38 | 101 | When: kernel 2.6.39 |
121 | Files: drivers/staging/cpia/* drivers/staging/stradis/* | 102 | Files: drivers/staging/se401/* drivers/staging/usbvideo/* |
122 | Check: drivers/staging/cpia/cpia.c drivers/staging/stradis/stradis.c | 103 | Check: drivers/staging/se401/se401.c drivers/staging/usbvideo/usbvideo.c |
123 | Why: There are some drivers still using V4L1 API, despite all efforts we've done | 104 | Why: There are some drivers still using V4L1 API, despite all efforts we've done |
124 | to migrate. Those drivers are for obsolete hardware that the old maintainer | 105 | to migrate. Those drivers are for obsolete hardware that the old maintainer |
125 | didn't care (or not have the hardware anymore), and that no other developer | 106 | didn't care (or not have the hardware anymore), and that no other developer |
126 | could find any hardware to buy. They probably have no practical usage today, | 107 | could find any hardware to buy. They probably have no practical usage today, |
127 | and people with such old hardware could probably keep using an older version | 108 | and people with such old hardware could probably keep using an older version |
128 | of the kernel. Those drivers will be moved to staging on 2.6.37 and, if nobody | 109 | of the kernel. Those drivers will be moved to staging on 2.6.38 and, if nobody |
129 | care enough to port and test them with V4L2 API, they'll be removed on 2.6.38. | 110 | cares enough to port and test them with V4L2 API, they'll be removed on 2.6.39. |
111 | Who: Mauro Carvalho Chehab <mchehab@infradead.org> | ||
112 | |||
113 | --------------------------- | ||
114 | |||
115 | What: Video4Linux: Remove obsolete ioctl's | ||
116 | When: kernel 2.6.39 | ||
117 | Files: include/media/videodev2.h | ||
118 | Why: Some ioctl's were defined wrong on 2.6.2 and 2.6.6, using the wrong | ||
119 | type of R/W arguments. They were fixed, but the old ioctl names are | ||
120 | still there, maintained to avoid breaking binary compatibility: | ||
121 | #define VIDIOC_OVERLAY_OLD _IOWR('V', 14, int) | ||
122 | #define VIDIOC_S_PARM_OLD _IOW('V', 22, struct v4l2_streamparm) | ||
123 | #define VIDIOC_S_CTRL_OLD _IOW('V', 28, struct v4l2_control) | ||
124 | #define VIDIOC_G_AUDIO_OLD _IOWR('V', 33, struct v4l2_audio) | ||
125 | #define VIDIOC_G_AUDOUT_OLD _IOWR('V', 49, struct v4l2_audioout) | ||
126 | #define VIDIOC_CROPCAP_OLD _IOR('V', 58, struct v4l2_cropcap) | ||
127 | There's no sense on preserving those forever, as it is very doubtful | ||
128 | that someone would try to use a such old binary with a modern kernel. | ||
129 | Removing them will allow us to remove some magic done at the V4L ioctl | ||
130 | handler. | ||
131 | |||
130 | Who: Mauro Carvalho Chehab <mchehab@infradead.org> | 132 | Who: Mauro Carvalho Chehab <mchehab@infradead.org> |
131 | 133 | ||
132 | --------------------------- | 134 | --------------------------- |
@@ -191,6 +193,20 @@ Why: /proc/<pid>/oom_adj allows userspace to influence the oom killer's | |||
191 | 193 | ||
192 | --------------------------- | 194 | --------------------------- |
193 | 195 | ||
196 | What: CS5535/CS5536 obsolete GPIO driver | ||
197 | When: June 2011 | ||
198 | Files: drivers/staging/cs5535_gpio/* | ||
199 | Check: drivers/staging/cs5535_gpio/cs5535_gpio.c | ||
200 | Why: A newer driver replaces this; it is drivers/gpio/cs5535-gpio.c, and | ||
201 | integrates with the Linux GPIO subsystem. The old driver has been | ||
202 | moved to staging, and will be removed altogether around 2.6.40. | ||
203 | Please test the new driver, and ensure that the functionality you | ||
204 | need and any bugfixes from the old driver are available in the new | ||
205 | one. | ||
206 | Who: Andres Salomon <dilinger@queued.net> | ||
207 | |||
208 | -------------------------- | ||
209 | |||
194 | What: remove EXPORT_SYMBOL(kernel_thread) | 210 | What: remove EXPORT_SYMBOL(kernel_thread) |
195 | When: August 2006 | 211 | When: August 2006 |
196 | Files: arch/*/kernel/*_ksyms.c | 212 | Files: arch/*/kernel/*_ksyms.c |
@@ -564,3 +580,23 @@ Why: This field is deprecated. I2C device drivers shouldn't change their | |||
564 | Who: Jean Delvare <khali@linux-fr.org> | 580 | Who: Jean Delvare <khali@linux-fr.org> |
565 | 581 | ||
566 | ---------------------------- | 582 | ---------------------------- |
583 | |||
584 | What: cancel_rearming_delayed_work[queue]() | ||
585 | When: 2.6.39 | ||
586 | |||
587 | Why: The functions have been superceded by cancel_delayed_work_sync() | ||
588 | quite some time ago. The conversion is trivial and there is no | ||
589 | in-kernel user left. | ||
590 | Who: Tejun Heo <tj@kernel.org> | ||
591 | |||
592 | ---------------------------- | ||
593 | |||
594 | What: Legacy, non-standard chassis intrusion detection interface. | ||
595 | When: June 2011 | ||
596 | Why: The adm9240, w83792d and w83793 hardware monitoring drivers have | ||
597 | legacy interfaces for chassis intrusion detection. A standard | ||
598 | interface has been added to each driver, so the legacy interface | ||
599 | can be removed. | ||
600 | Who: Jean Delvare <khali@linux-fr.org> | ||
601 | |||
602 | ---------------------------- | ||
diff --git a/Documentation/filesystems/Locking b/Documentation/filesystems/Locking index a91f30890011..977d8919cc69 100644 --- a/Documentation/filesystems/Locking +++ b/Documentation/filesystems/Locking | |||
@@ -9,23 +9,25 @@ be able to use diff(1). | |||
9 | 9 | ||
10 | --------------------------- dentry_operations -------------------------- | 10 | --------------------------- dentry_operations -------------------------- |
11 | prototypes: | 11 | prototypes: |
12 | int (*d_revalidate)(struct dentry *, int); | 12 | int (*d_revalidate)(struct dentry *, struct nameidata *); |
13 | int (*d_hash) (struct dentry *, struct qstr *); | 13 | int (*d_hash)(const struct dentry *, const struct inode *, |
14 | int (*d_compare) (struct dentry *, struct qstr *, struct qstr *); | 14 | struct qstr *); |
15 | int (*d_compare)(const struct dentry *, const struct inode *, | ||
16 | const struct dentry *, const struct inode *, | ||
17 | unsigned int, const char *, const struct qstr *); | ||
15 | int (*d_delete)(struct dentry *); | 18 | int (*d_delete)(struct dentry *); |
16 | void (*d_release)(struct dentry *); | 19 | void (*d_release)(struct dentry *); |
17 | void (*d_iput)(struct dentry *, struct inode *); | 20 | void (*d_iput)(struct dentry *, struct inode *); |
18 | char *(*d_dname)((struct dentry *dentry, char *buffer, int buflen); | 21 | char *(*d_dname)((struct dentry *dentry, char *buffer, int buflen); |
19 | 22 | ||
20 | locking rules: | 23 | locking rules: |
21 | none have BKL | 24 | rename_lock ->d_lock may block rcu-walk |
22 | dcache_lock rename_lock ->d_lock may block | 25 | d_revalidate: no no yes (ref-walk) maybe |
23 | d_revalidate: no no no yes | 26 | d_hash no no no maybe |
24 | d_hash no no no yes | 27 | d_compare: yes no no maybe |
25 | d_compare: no yes no no | 28 | d_delete: no yes no no |
26 | d_delete: yes no yes no | 29 | d_release: no no yes no |
27 | d_release: no no no yes | 30 | d_iput: no no yes no |
28 | d_iput: no no no yes | ||
29 | d_dname: no no no no | 31 | d_dname: no no no no |
30 | 32 | ||
31 | --------------------------- inode_operations --------------------------- | 33 | --------------------------- inode_operations --------------------------- |
@@ -42,18 +44,23 @@ ata *); | |||
42 | int (*rename) (struct inode *, struct dentry *, | 44 | int (*rename) (struct inode *, struct dentry *, |
43 | struct inode *, struct dentry *); | 45 | struct inode *, struct dentry *); |
44 | int (*readlink) (struct dentry *, char __user *,int); | 46 | int (*readlink) (struct dentry *, char __user *,int); |
45 | int (*follow_link) (struct dentry *, struct nameidata *); | 47 | void * (*follow_link) (struct dentry *, struct nameidata *); |
48 | void (*put_link) (struct dentry *, struct nameidata *, void *); | ||
46 | void (*truncate) (struct inode *); | 49 | void (*truncate) (struct inode *); |
47 | int (*permission) (struct inode *, int, struct nameidata *); | 50 | int (*permission) (struct inode *, int, unsigned int); |
51 | int (*check_acl)(struct inode *, int, unsigned int); | ||
48 | int (*setattr) (struct dentry *, struct iattr *); | 52 | int (*setattr) (struct dentry *, struct iattr *); |
49 | int (*getattr) (struct vfsmount *, struct dentry *, struct kstat *); | 53 | int (*getattr) (struct vfsmount *, struct dentry *, struct kstat *); |
50 | int (*setxattr) (struct dentry *, const char *,const void *,size_t,int); | 54 | int (*setxattr) (struct dentry *, const char *,const void *,size_t,int); |
51 | ssize_t (*getxattr) (struct dentry *, const char *, void *, size_t); | 55 | ssize_t (*getxattr) (struct dentry *, const char *, void *, size_t); |
52 | ssize_t (*listxattr) (struct dentry *, char *, size_t); | 56 | ssize_t (*listxattr) (struct dentry *, char *, size_t); |
53 | int (*removexattr) (struct dentry *, const char *); | 57 | int (*removexattr) (struct dentry *, const char *); |
58 | void (*truncate_range)(struct inode *, loff_t, loff_t); | ||
59 | long (*fallocate)(struct inode *inode, int mode, loff_t offset, loff_t len); | ||
60 | int (*fiemap)(struct inode *, struct fiemap_extent_info *, u64 start, u64 len); | ||
54 | 61 | ||
55 | locking rules: | 62 | locking rules: |
56 | all may block, none have BKL | 63 | all may block |
57 | i_mutex(inode) | 64 | i_mutex(inode) |
58 | lookup: yes | 65 | lookup: yes |
59 | create: yes | 66 | create: yes |
@@ -66,19 +73,24 @@ rmdir: yes (both) (see below) | |||
66 | rename: yes (all) (see below) | 73 | rename: yes (all) (see below) |
67 | readlink: no | 74 | readlink: no |
68 | follow_link: no | 75 | follow_link: no |
76 | put_link: no | ||
69 | truncate: yes (see below) | 77 | truncate: yes (see below) |
70 | setattr: yes | 78 | setattr: yes |
71 | permission: no | 79 | permission: no (may not block if called in rcu-walk mode) |
80 | check_acl: no | ||
72 | getattr: no | 81 | getattr: no |
73 | setxattr: yes | 82 | setxattr: yes |
74 | getxattr: no | 83 | getxattr: no |
75 | listxattr: no | 84 | listxattr: no |
76 | removexattr: yes | 85 | removexattr: yes |
86 | truncate_range: yes | ||
87 | fallocate: no | ||
88 | fiemap: no | ||
77 | Additionally, ->rmdir(), ->unlink() and ->rename() have ->i_mutex on | 89 | Additionally, ->rmdir(), ->unlink() and ->rename() have ->i_mutex on |
78 | victim. | 90 | victim. |
79 | cross-directory ->rename() has (per-superblock) ->s_vfs_rename_sem. | 91 | cross-directory ->rename() has (per-superblock) ->s_vfs_rename_sem. |
80 | ->truncate() is never called directly - it's a callback, not a | 92 | ->truncate() is never called directly - it's a callback, not a |
81 | method. It's called by vmtruncate() - library function normally used by | 93 | method. It's called by vmtruncate() - deprecated library function used by |
82 | ->setattr(). Locking information above applies to that call (i.e. is | 94 | ->setattr(). Locking information above applies to that call (i.e. is |
83 | inherited from ->setattr() - vmtruncate() is used when ATTR_SIZE had been | 95 | inherited from ->setattr() - vmtruncate() is used when ATTR_SIZE had been |
84 | passed). | 96 | passed). |
@@ -91,7 +103,7 @@ prototypes: | |||
91 | struct inode *(*alloc_inode)(struct super_block *sb); | 103 | struct inode *(*alloc_inode)(struct super_block *sb); |
92 | void (*destroy_inode)(struct inode *); | 104 | void (*destroy_inode)(struct inode *); |
93 | void (*dirty_inode) (struct inode *); | 105 | void (*dirty_inode) (struct inode *); |
94 | int (*write_inode) (struct inode *, int); | 106 | int (*write_inode) (struct inode *, struct writeback_control *wbc); |
95 | int (*drop_inode) (struct inode *); | 107 | int (*drop_inode) (struct inode *); |
96 | void (*evict_inode) (struct inode *); | 108 | void (*evict_inode) (struct inode *); |
97 | void (*put_super) (struct super_block *); | 109 | void (*put_super) (struct super_block *); |
@@ -105,10 +117,10 @@ prototypes: | |||
105 | int (*show_options)(struct seq_file *, struct vfsmount *); | 117 | int (*show_options)(struct seq_file *, struct vfsmount *); |
106 | ssize_t (*quota_read)(struct super_block *, int, char *, size_t, loff_t); | 118 | ssize_t (*quota_read)(struct super_block *, int, char *, size_t, loff_t); |
107 | ssize_t (*quota_write)(struct super_block *, int, const char *, size_t, loff_t); | 119 | ssize_t (*quota_write)(struct super_block *, int, const char *, size_t, loff_t); |
120 | int (*bdev_try_to_free_page)(struct super_block*, struct page*, gfp_t); | ||
108 | 121 | ||
109 | locking rules: | 122 | locking rules: |
110 | All may block [not true, see below] | 123 | All may block [not true, see below] |
111 | None have BKL | ||
112 | s_umount | 124 | s_umount |
113 | alloc_inode: | 125 | alloc_inode: |
114 | destroy_inode: | 126 | destroy_inode: |
@@ -127,6 +139,7 @@ umount_begin: no | |||
127 | show_options: no (namespace_sem) | 139 | show_options: no (namespace_sem) |
128 | quota_read: no (see below) | 140 | quota_read: no (see below) |
129 | quota_write: no (see below) | 141 | quota_write: no (see below) |
142 | bdev_try_to_free_page: no (see below) | ||
130 | 143 | ||
131 | ->statfs() has s_umount (shared) when called by ustat(2) (native or | 144 | ->statfs() has s_umount (shared) when called by ustat(2) (native or |
132 | compat), but that's an accident of bad API; s_umount is used to pin | 145 | compat), but that's an accident of bad API; s_umount is used to pin |
@@ -139,19 +152,25 @@ be the only ones operating on the quota file by the quota code (via | |||
139 | dqio_sem) (unless an admin really wants to screw up something and | 152 | dqio_sem) (unless an admin really wants to screw up something and |
140 | writes to quota files with quotas on). For other details about locking | 153 | writes to quota files with quotas on). For other details about locking |
141 | see also dquot_operations section. | 154 | see also dquot_operations section. |
155 | ->bdev_try_to_free_page is called from the ->releasepage handler of | ||
156 | the block device inode. See there for more details. | ||
142 | 157 | ||
143 | --------------------------- file_system_type --------------------------- | 158 | --------------------------- file_system_type --------------------------- |
144 | prototypes: | 159 | prototypes: |
145 | int (*get_sb) (struct file_system_type *, int, | 160 | int (*get_sb) (struct file_system_type *, int, |
146 | const char *, void *, struct vfsmount *); | 161 | const char *, void *, struct vfsmount *); |
162 | struct dentry *(*mount) (struct file_system_type *, int, | ||
163 | const char *, void *); | ||
147 | void (*kill_sb) (struct super_block *); | 164 | void (*kill_sb) (struct super_block *); |
148 | locking rules: | 165 | locking rules: |
149 | may block BKL | 166 | may block |
150 | get_sb yes no | 167 | get_sb yes |
151 | kill_sb yes no | 168 | mount yes |
169 | kill_sb yes | ||
152 | 170 | ||
153 | ->get_sb() returns error or 0 with locked superblock attached to the vfsmount | 171 | ->get_sb() returns error or 0 with locked superblock attached to the vfsmount |
154 | (exclusive on ->s_umount). | 172 | (exclusive on ->s_umount). |
173 | ->mount() returns ERR_PTR or the root dentry. | ||
155 | ->kill_sb() takes a write-locked superblock, does all shutdown work on it, | 174 | ->kill_sb() takes a write-locked superblock, does all shutdown work on it, |
156 | unlocks and drops the reference. | 175 | unlocks and drops the reference. |
157 | 176 | ||
@@ -173,28 +192,38 @@ prototypes: | |||
173 | sector_t (*bmap)(struct address_space *, sector_t); | 192 | sector_t (*bmap)(struct address_space *, sector_t); |
174 | int (*invalidatepage) (struct page *, unsigned long); | 193 | int (*invalidatepage) (struct page *, unsigned long); |
175 | int (*releasepage) (struct page *, int); | 194 | int (*releasepage) (struct page *, int); |
195 | void (*freepage)(struct page *); | ||
176 | int (*direct_IO)(int, struct kiocb *, const struct iovec *iov, | 196 | int (*direct_IO)(int, struct kiocb *, const struct iovec *iov, |
177 | loff_t offset, unsigned long nr_segs); | 197 | loff_t offset, unsigned long nr_segs); |
178 | int (*launder_page) (struct page *); | 198 | int (*get_xip_mem)(struct address_space *, pgoff_t, int, void **, |
199 | unsigned long *); | ||
200 | int (*migratepage)(struct address_space *, struct page *, struct page *); | ||
201 | int (*launder_page)(struct page *); | ||
202 | int (*is_partially_uptodate)(struct page *, read_descriptor_t *, unsigned long); | ||
203 | int (*error_remove_page)(struct address_space *, struct page *); | ||
179 | 204 | ||
180 | locking rules: | 205 | locking rules: |
181 | All except set_page_dirty may block | 206 | All except set_page_dirty and freepage may block |
182 | 207 | ||
183 | BKL PageLocked(page) i_mutex | 208 | PageLocked(page) i_mutex |
184 | writepage: no yes, unlocks (see below) | 209 | writepage: yes, unlocks (see below) |
185 | readpage: no yes, unlocks | 210 | readpage: yes, unlocks |
186 | sync_page: no maybe | 211 | sync_page: maybe |
187 | writepages: no | 212 | writepages: |
188 | set_page_dirty no no | 213 | set_page_dirty no |
189 | readpages: no | 214 | readpages: |
190 | write_begin: no locks the page yes | 215 | write_begin: locks the page yes |
191 | write_end: no yes, unlocks yes | 216 | write_end: yes, unlocks yes |
192 | perform_write: no n/a yes | 217 | bmap: |
193 | bmap: no | 218 | invalidatepage: yes |
194 | invalidatepage: no yes | 219 | releasepage: yes |
195 | releasepage: no yes | 220 | freepage: yes |
196 | direct_IO: no | 221 | direct_IO: |
197 | launder_page: no yes | 222 | get_xip_mem: maybe |
223 | migratepage: yes (both) | ||
224 | launder_page: yes | ||
225 | is_partially_uptodate: yes | ||
226 | error_remove_page: yes | ||
198 | 227 | ||
199 | ->write_begin(), ->write_end(), ->sync_page() and ->readpage() | 228 | ->write_begin(), ->write_end(), ->sync_page() and ->readpage() |
200 | may be called from the request handler (/dev/loop). | 229 | may be called from the request handler (/dev/loop). |
@@ -274,9 +303,8 @@ under spinlock (it cannot block) and is sometimes called with the page | |||
274 | not locked. | 303 | not locked. |
275 | 304 | ||
276 | ->bmap() is currently used by legacy ioctl() (FIBMAP) provided by some | 305 | ->bmap() is currently used by legacy ioctl() (FIBMAP) provided by some |
277 | filesystems and by the swapper. The latter will eventually go away. All | 306 | filesystems and by the swapper. The latter will eventually go away. Please, |
278 | instances do not actually need the BKL. Please, keep it that way and don't | 307 | keep it that way and don't breed new callers. |
279 | breed new callers. | ||
280 | 308 | ||
281 | ->invalidatepage() is called when the filesystem must attempt to drop | 309 | ->invalidatepage() is called when the filesystem must attempt to drop |
282 | some or all of the buffers from the page when it is being truncated. It | 310 | some or all of the buffers from the page when it is being truncated. It |
@@ -288,53 +316,46 @@ buffers from the page in preparation for freeing it. It returns zero to | |||
288 | indicate that the buffers are (or may be) freeable. If ->releasepage is zero, | 316 | indicate that the buffers are (or may be) freeable. If ->releasepage is zero, |
289 | the kernel assumes that the fs has no private interest in the buffers. | 317 | the kernel assumes that the fs has no private interest in the buffers. |
290 | 318 | ||
319 | ->freepage() is called when the kernel is done dropping the page | ||
320 | from the page cache. | ||
321 | |||
291 | ->launder_page() may be called prior to releasing a page if | 322 | ->launder_page() may be called prior to releasing a page if |
292 | it is still found to be dirty. It returns zero if the page was successfully | 323 | it is still found to be dirty. It returns zero if the page was successfully |
293 | cleaned, or an error value if not. Note that in order to prevent the page | 324 | cleaned, or an error value if not. Note that in order to prevent the page |
294 | getting mapped back in and redirtied, it needs to be kept locked | 325 | getting mapped back in and redirtied, it needs to be kept locked |
295 | across the entire operation. | 326 | across the entire operation. |
296 | 327 | ||
297 | Note: currently almost all instances of address_space methods are | ||
298 | using BKL for internal serialization and that's one of the worst sources | ||
299 | of contention. Normally they are calling library functions (in fs/buffer.c) | ||
300 | and pass foo_get_block() as a callback (on local block-based filesystems, | ||
301 | indeed). BKL is not needed for library stuff and is usually taken by | ||
302 | foo_get_block(). It's an overkill, since block bitmaps can be protected by | ||
303 | internal fs locking and real critical areas are much smaller than the areas | ||
304 | filesystems protect now. | ||
305 | |||
306 | ----------------------- file_lock_operations ------------------------------ | 328 | ----------------------- file_lock_operations ------------------------------ |
307 | prototypes: | 329 | prototypes: |
308 | void (*fl_insert)(struct file_lock *); /* lock insertion callback */ | ||
309 | void (*fl_remove)(struct file_lock *); /* lock removal callback */ | ||
310 | void (*fl_copy_lock)(struct file_lock *, struct file_lock *); | 330 | void (*fl_copy_lock)(struct file_lock *, struct file_lock *); |
311 | void (*fl_release_private)(struct file_lock *); | 331 | void (*fl_release_private)(struct file_lock *); |
312 | 332 | ||
313 | 333 | ||
314 | locking rules: | 334 | locking rules: |
315 | BKL may block | 335 | file_lock_lock may block |
316 | fl_insert: yes no | 336 | fl_copy_lock: yes no |
317 | fl_remove: yes no | 337 | fl_release_private: maybe no |
318 | fl_copy_lock: yes no | ||
319 | fl_release_private: yes yes | ||
320 | 338 | ||
321 | ----------------------- lock_manager_operations --------------------------- | 339 | ----------------------- lock_manager_operations --------------------------- |
322 | prototypes: | 340 | prototypes: |
323 | int (*fl_compare_owner)(struct file_lock *, struct file_lock *); | 341 | int (*fl_compare_owner)(struct file_lock *, struct file_lock *); |
324 | void (*fl_notify)(struct file_lock *); /* unblock callback */ | 342 | void (*fl_notify)(struct file_lock *); /* unblock callback */ |
343 | int (*fl_grant)(struct file_lock *, struct file_lock *, int); | ||
325 | void (*fl_release_private)(struct file_lock *); | 344 | void (*fl_release_private)(struct file_lock *); |
326 | void (*fl_break)(struct file_lock *); /* break_lease callback */ | 345 | void (*fl_break)(struct file_lock *); /* break_lease callback */ |
346 | int (*fl_mylease)(struct file_lock *, struct file_lock *); | ||
347 | int (*fl_change)(struct file_lock **, int); | ||
327 | 348 | ||
328 | locking rules: | 349 | locking rules: |
329 | BKL may block | 350 | file_lock_lock may block |
330 | fl_compare_owner: yes no | 351 | fl_compare_owner: yes no |
331 | fl_notify: yes no | 352 | fl_notify: yes no |
332 | fl_release_private: yes yes | 353 | fl_grant: no no |
333 | fl_break: yes no | 354 | fl_release_private: maybe no |
334 | 355 | fl_break: yes no | |
335 | Currently only NFSD and NLM provide instances of this class. None of the | 356 | fl_mylease: yes no |
336 | them block. If you have out-of-tree instances - please, show up. Locking | 357 | fl_change yes no |
337 | in that area will change. | 358 | |
338 | --------------------------- buffer_head ----------------------------------- | 359 | --------------------------- buffer_head ----------------------------------- |
339 | prototypes: | 360 | prototypes: |
340 | void (*b_end_io)(struct buffer_head *bh, int uptodate); | 361 | void (*b_end_io)(struct buffer_head *bh, int uptodate); |
@@ -359,17 +380,17 @@ prototypes: | |||
359 | void (*swap_slot_free_notify) (struct block_device *, unsigned long); | 380 | void (*swap_slot_free_notify) (struct block_device *, unsigned long); |
360 | 381 | ||
361 | locking rules: | 382 | locking rules: |
362 | BKL bd_mutex | 383 | bd_mutex |
363 | open: no yes | 384 | open: yes |
364 | release: no yes | 385 | release: yes |
365 | ioctl: no no | 386 | ioctl: no |
366 | compat_ioctl: no no | 387 | compat_ioctl: no |
367 | direct_access: no no | 388 | direct_access: no |
368 | media_changed: no no | 389 | media_changed: no |
369 | unlock_native_capacity: no no | 390 | unlock_native_capacity: no |
370 | revalidate_disk: no no | 391 | revalidate_disk: no |
371 | getgeo: no no | 392 | getgeo: no |
372 | swap_slot_free_notify: no no (see below) | 393 | swap_slot_free_notify: no (see below) |
373 | 394 | ||
374 | media_changed, unlock_native_capacity and revalidate_disk are called only from | 395 | media_changed, unlock_native_capacity and revalidate_disk are called only from |
375 | check_disk_change(). | 396 | check_disk_change(). |
@@ -408,34 +429,21 @@ prototypes: | |||
408 | unsigned long (*get_unmapped_area)(struct file *, unsigned long, | 429 | unsigned long (*get_unmapped_area)(struct file *, unsigned long, |
409 | unsigned long, unsigned long, unsigned long); | 430 | unsigned long, unsigned long, unsigned long); |
410 | int (*check_flags)(int); | 431 | int (*check_flags)(int); |
432 | int (*flock) (struct file *, int, struct file_lock *); | ||
433 | ssize_t (*splice_write)(struct pipe_inode_info *, struct file *, loff_t *, | ||
434 | size_t, unsigned int); | ||
435 | ssize_t (*splice_read)(struct file *, loff_t *, struct pipe_inode_info *, | ||
436 | size_t, unsigned int); | ||
437 | int (*setlease)(struct file *, long, struct file_lock **); | ||
411 | }; | 438 | }; |
412 | 439 | ||
413 | locking rules: | 440 | locking rules: |
414 | All may block. | 441 | All may block except for ->setlease. |
415 | BKL | 442 | No VFS locks held on entry except for ->fsync and ->setlease. |
416 | llseek: no (see below) | 443 | |
417 | read: no | 444 | ->fsync() has i_mutex on inode. |
418 | aio_read: no | 445 | |
419 | write: no | 446 | ->setlease has the file_list_lock held and must not sleep. |
420 | aio_write: no | ||
421 | readdir: no | ||
422 | poll: no | ||
423 | unlocked_ioctl: no | ||
424 | compat_ioctl: no | ||
425 | mmap: no | ||
426 | open: no | ||
427 | flush: no | ||
428 | release: no | ||
429 | fsync: no (see below) | ||
430 | aio_fsync: no | ||
431 | fasync: no | ||
432 | lock: yes | ||
433 | readv: no | ||
434 | writev: no | ||
435 | sendfile: no | ||
436 | sendpage: no | ||
437 | get_unmapped_area: no | ||
438 | check_flags: no | ||
439 | 447 | ||
440 | ->llseek() locking has moved from llseek to the individual llseek | 448 | ->llseek() locking has moved from llseek to the individual llseek |
441 | implementations. If your fs is not using generic_file_llseek, you | 449 | implementations. If your fs is not using generic_file_llseek, you |
@@ -445,17 +453,10 @@ mutex or just to use i_size_read() instead. | |||
445 | Note: this does not protect the file->f_pos against concurrent modifications | 453 | Note: this does not protect the file->f_pos against concurrent modifications |
446 | since this is something the userspace has to take care about. | 454 | since this is something the userspace has to take care about. |
447 | 455 | ||
448 | Note: ext2_release() was *the* source of contention on fs-intensive | 456 | ->fasync() is responsible for maintaining the FASYNC bit in filp->f_flags. |
449 | loads and dropping BKL on ->release() helps to get rid of that (we still | 457 | Most instances call fasync_helper(), which does that maintenance, so it's |
450 | grab BKL for cases when we close a file that had been opened r/w, but that | 458 | not normally something one needs to worry about. Return values > 0 will be |
451 | can and should be done using the internal locking with smaller critical areas). | 459 | mapped to zero in the VFS layer. |
452 | Current worst offender is ext2_get_block()... | ||
453 | |||
454 | ->fasync() is called without BKL protection, and is responsible for | ||
455 | maintaining the FASYNC bit in filp->f_flags. Most instances call | ||
456 | fasync_helper(), which does that maintenance, so it's not normally | ||
457 | something one needs to worry about. Return values > 0 will be mapped to | ||
458 | zero in the VFS layer. | ||
459 | 460 | ||
460 | ->readdir() and ->ioctl() on directories must be changed. Ideally we would | 461 | ->readdir() and ->ioctl() on directories must be changed. Ideally we would |
461 | move ->readdir() to inode_operations and use a separate method for directory | 462 | move ->readdir() to inode_operations and use a separate method for directory |
@@ -466,8 +467,6 @@ components. And there are other reasons why the current interface is a mess... | |||
466 | ->read on directories probably must go away - we should just enforce -EISDIR | 467 | ->read on directories probably must go away - we should just enforce -EISDIR |
467 | in sys_read() and friends. | 468 | in sys_read() and friends. |
468 | 469 | ||
469 | ->fsync() has i_mutex on inode. | ||
470 | |||
471 | --------------------------- dquot_operations ------------------------------- | 470 | --------------------------- dquot_operations ------------------------------- |
472 | prototypes: | 471 | prototypes: |
473 | int (*write_dquot) (struct dquot *); | 472 | int (*write_dquot) (struct dquot *); |
@@ -502,12 +501,12 @@ prototypes: | |||
502 | int (*access)(struct vm_area_struct *, unsigned long, void*, int, int); | 501 | int (*access)(struct vm_area_struct *, unsigned long, void*, int, int); |
503 | 502 | ||
504 | locking rules: | 503 | locking rules: |
505 | BKL mmap_sem PageLocked(page) | 504 | mmap_sem PageLocked(page) |
506 | open: no yes | 505 | open: yes |
507 | close: no yes | 506 | close: yes |
508 | fault: no yes can return with page locked | 507 | fault: yes can return with page locked |
509 | page_mkwrite: no yes can return with page locked | 508 | page_mkwrite: yes can return with page locked |
510 | access: no yes | 509 | access: yes |
511 | 510 | ||
512 | ->fault() is called when a previously not present pte is about | 511 | ->fault() is called when a previously not present pte is about |
513 | to be faulted in. The filesystem must find and return the page associated | 512 | to be faulted in. The filesystem must find and return the page associated |
@@ -534,6 +533,3 @@ VM_IO | VM_PFNMAP VMAs. | |||
534 | 533 | ||
535 | (if you break something or notice that it is broken and do not fix it yourself | 534 | (if you break something or notice that it is broken and do not fix it yourself |
536 | - at least put it here) | 535 | - at least put it here) |
537 | |||
538 | ipc/shm.c::shm_delete() - may need BKL. | ||
539 | ->read() and ->write() in many drivers are (probably) missing BKL. | ||
diff --git a/Documentation/filesystems/configfs/configfs_example_explicit.c b/Documentation/filesystems/configfs/configfs_example_explicit.c index d428cc9f07f3..fd53869f5633 100644 --- a/Documentation/filesystems/configfs/configfs_example_explicit.c +++ b/Documentation/filesystems/configfs/configfs_example_explicit.c | |||
@@ -89,7 +89,7 @@ static ssize_t childless_storeme_write(struct childless *childless, | |||
89 | char *p = (char *) page; | 89 | char *p = (char *) page; |
90 | 90 | ||
91 | tmp = simple_strtoul(p, &p, 10); | 91 | tmp = simple_strtoul(p, &p, 10); |
92 | if (!p || (*p && (*p != '\n'))) | 92 | if ((*p != '\0') && (*p != '\n')) |
93 | return -EINVAL; | 93 | return -EINVAL; |
94 | 94 | ||
95 | if (tmp > INT_MAX) | 95 | if (tmp > INT_MAX) |
diff --git a/Documentation/filesystems/dentry-locking.txt b/Documentation/filesystems/dentry-locking.txt deleted file mode 100644 index 79334ed5daa7..000000000000 --- a/Documentation/filesystems/dentry-locking.txt +++ /dev/null | |||
@@ -1,174 +0,0 @@ | |||
1 | RCU-based dcache locking model | ||
2 | ============================== | ||
3 | |||
4 | On many workloads, the most common operation on dcache is to look up a | ||
5 | dentry, given a parent dentry and the name of the child. Typically, | ||
6 | for every open(), stat() etc., the dentry corresponding to the | ||
7 | pathname will be looked up by walking the tree starting with the first | ||
8 | component of the pathname and using that dentry along with the next | ||
9 | component to look up the next level and so on. Since it is a frequent | ||
10 | operation for workloads like multiuser environments and web servers, | ||
11 | it is important to optimize this path. | ||
12 | |||
13 | Prior to 2.5.10, dcache_lock was acquired in d_lookup and thus in | ||
14 | every component during path look-up. Since 2.5.10 onwards, fast-walk | ||
15 | algorithm changed this by holding the dcache_lock at the beginning and | ||
16 | walking as many cached path component dentries as possible. This | ||
17 | significantly decreases the number of acquisition of | ||
18 | dcache_lock. However it also increases the lock hold time | ||
19 | significantly and affects performance in large SMP machines. Since | ||
20 | 2.5.62 kernel, dcache has been using a new locking model that uses RCU | ||
21 | to make dcache look-up lock-free. | ||
22 | |||
23 | The current dcache locking model is not very different from the | ||
24 | existing dcache locking model. Prior to 2.5.62 kernel, dcache_lock | ||
25 | protected the hash chain, d_child, d_alias, d_lru lists as well as | ||
26 | d_inode and several other things like mount look-up. RCU-based changes | ||
27 | affect only the way the hash chain is protected. For everything else | ||
28 | the dcache_lock must be taken for both traversing as well as | ||
29 | updating. The hash chain updates too take the dcache_lock. The | ||
30 | significant change is the way d_lookup traverses the hash chain, it | ||
31 | doesn't acquire the dcache_lock for this and rely on RCU to ensure | ||
32 | that the dentry has not been *freed*. | ||
33 | |||
34 | |||
35 | Dcache locking details | ||
36 | ====================== | ||
37 | |||
38 | For many multi-user workloads, open() and stat() on files are very | ||
39 | frequently occurring operations. Both involve walking of path names to | ||
40 | find the dentry corresponding to the concerned file. In 2.4 kernel, | ||
41 | dcache_lock was held during look-up of each path component. Contention | ||
42 | and cache-line bouncing of this global lock caused significant | ||
43 | scalability problems. With the introduction of RCU in Linux kernel, | ||
44 | this was worked around by making the look-up of path components during | ||
45 | path walking lock-free. | ||
46 | |||
47 | |||
48 | Safe lock-free look-up of dcache hash table | ||
49 | =========================================== | ||
50 | |||
51 | Dcache is a complex data structure with the hash table entries also | ||
52 | linked together in other lists. In 2.4 kernel, dcache_lock protected | ||
53 | all the lists. We applied RCU only on hash chain walking. The rest of | ||
54 | the lists are still protected by dcache_lock. Some of the important | ||
55 | changes are : | ||
56 | |||
57 | 1. The deletion from hash chain is done using hlist_del_rcu() macro | ||
58 | which doesn't initialize next pointer of the deleted dentry and | ||
59 | this allows us to walk safely lock-free while a deletion is | ||
60 | happening. | ||
61 | |||
62 | 2. Insertion of a dentry into the hash table is done using | ||
63 | hlist_add_head_rcu() which take care of ordering the writes - the | ||
64 | writes to the dentry must be visible before the dentry is | ||
65 | inserted. This works in conjunction with hlist_for_each_rcu(), | ||
66 | which has since been replaced by hlist_for_each_entry_rcu(), while | ||
67 | walking the hash chain. The only requirement is that all | ||
68 | initialization to the dentry must be done before | ||
69 | hlist_add_head_rcu() since we don't have dcache_lock protection | ||
70 | while traversing the hash chain. This isn't different from the | ||
71 | existing code. | ||
72 | |||
73 | 3. The dentry looked up without holding dcache_lock by cannot be | ||
74 | returned for walking if it is unhashed. It then may have a NULL | ||
75 | d_inode or other bogosity since RCU doesn't protect the other | ||
76 | fields in the dentry. We therefore use a flag DCACHE_UNHASHED to | ||
77 | indicate unhashed dentries and use this in conjunction with a | ||
78 | per-dentry lock (d_lock). Once looked up without the dcache_lock, | ||
79 | we acquire the per-dentry lock (d_lock) and check if the dentry is | ||
80 | unhashed. If so, the look-up is failed. If not, the reference count | ||
81 | of the dentry is increased and the dentry is returned. | ||
82 | |||
83 | 4. Once a dentry is looked up, it must be ensured during the path walk | ||
84 | for that component it doesn't go away. In pre-2.5.10 code, this was | ||
85 | done holding a reference to the dentry. dcache_rcu does the same. | ||
86 | In some sense, dcache_rcu path walking looks like the pre-2.5.10 | ||
87 | version. | ||
88 | |||
89 | 5. All dentry hash chain updates must take the dcache_lock as well as | ||
90 | the per-dentry lock in that order. dput() does this to ensure that | ||
91 | a dentry that has just been looked up in another CPU doesn't get | ||
92 | deleted before dget() can be done on it. | ||
93 | |||
94 | 6. There are several ways to do reference counting of RCU protected | ||
95 | objects. One such example is in ipv4 route cache where deferred | ||
96 | freeing (using call_rcu()) is done as soon as the reference count | ||
97 | goes to zero. This cannot be done in the case of dentries because | ||
98 | tearing down of dentries require blocking (dentry_iput()) which | ||
99 | isn't supported from RCU callbacks. Instead, tearing down of | ||
100 | dentries happen synchronously in dput(), but actual freeing happens | ||
101 | later when RCU grace period is over. This allows safe lock-free | ||
102 | walking of the hash chains, but a matched dentry may have been | ||
103 | partially torn down. The checking of DCACHE_UNHASHED flag with | ||
104 | d_lock held detects such dentries and prevents them from being | ||
105 | returned from look-up. | ||
106 | |||
107 | |||
108 | Maintaining POSIX rename semantics | ||
109 | ================================== | ||
110 | |||
111 | Since look-up of dentries is lock-free, it can race against a | ||
112 | concurrent rename operation. For example, during rename of file A to | ||
113 | B, look-up of either A or B must succeed. So, if look-up of B happens | ||
114 | after A has been removed from the hash chain but not added to the new | ||
115 | hash chain, it may fail. Also, a comparison while the name is being | ||
116 | written concurrently by a rename may result in false positive matches | ||
117 | violating rename semantics. Issues related to race with rename are | ||
118 | handled as described below : | ||
119 | |||
120 | 1. Look-up can be done in two ways - d_lookup() which is safe from | ||
121 | simultaneous renames and __d_lookup() which is not. If | ||
122 | __d_lookup() fails, it must be followed up by a d_lookup() to | ||
123 | correctly determine whether a dentry is in the hash table or | ||
124 | not. d_lookup() protects look-ups using a sequence lock | ||
125 | (rename_lock). | ||
126 | |||
127 | 2. The name associated with a dentry (d_name) may be changed if a | ||
128 | rename is allowed to happen simultaneously. To avoid memcmp() in | ||
129 | __d_lookup() go out of bounds due to a rename and false positive | ||
130 | comparison, the name comparison is done while holding the | ||
131 | per-dentry lock. This prevents concurrent renames during this | ||
132 | operation. | ||
133 | |||
134 | 3. Hash table walking during look-up may move to a different bucket as | ||
135 | the current dentry is moved to a different bucket due to rename. | ||
136 | But we use hlists in dcache hash table and they are | ||
137 | null-terminated. So, even if a dentry moves to a different bucket, | ||
138 | hash chain walk will terminate. [with a list_head list, it may not | ||
139 | since termination is when the list_head in the original bucket is | ||
140 | reached]. Since we redo the d_parent check and compare name while | ||
141 | holding d_lock, lock-free look-up will not race against d_move(). | ||
142 | |||
143 | 4. There can be a theoretical race when a dentry keeps coming back to | ||
144 | original bucket due to double moves. Due to this look-up may | ||
145 | consider that it has never moved and can end up in a infinite loop. | ||
146 | But this is not any worse that theoretical livelocks we already | ||
147 | have in the kernel. | ||
148 | |||
149 | |||
150 | Important guidelines for filesystem developers related to dcache_rcu | ||
151 | ==================================================================== | ||
152 | |||
153 | 1. Existing dcache interfaces (pre-2.5.62) exported to filesystem | ||
154 | don't change. Only dcache internal implementation changes. However | ||
155 | filesystems *must not* delete from the dentry hash chains directly | ||
156 | using the list macros like allowed earlier. They must use dcache | ||
157 | APIs like d_drop() or __d_drop() depending on the situation. | ||
158 | |||
159 | 2. d_flags is now protected by a per-dentry lock (d_lock). All access | ||
160 | to d_flags must be protected by it. | ||
161 | |||
162 | 3. For a hashed dentry, checking of d_count needs to be protected by | ||
163 | d_lock. | ||
164 | |||
165 | |||
166 | Papers and other documentation on dcache locking | ||
167 | ================================================ | ||
168 | |||
169 | 1. Scaling dcache with RCU (http://linuxjournal.com/article.php?sid=7124). | ||
170 | |||
171 | 2. http://lse.sourceforge.net/locking/dcache/dcache.html | ||
172 | |||
173 | |||
174 | |||
diff --git a/Documentation/filesystems/ntfs.txt b/Documentation/filesystems/ntfs.txt index ac2a261c5f7d..6ef8cf3bc9a3 100644 --- a/Documentation/filesystems/ntfs.txt +++ b/Documentation/filesystems/ntfs.txt | |||
@@ -457,6 +457,9 @@ ChangeLog | |||
457 | 457 | ||
458 | Note, a technical ChangeLog aimed at kernel hackers is in fs/ntfs/ChangeLog. | 458 | Note, a technical ChangeLog aimed at kernel hackers is in fs/ntfs/ChangeLog. |
459 | 459 | ||
460 | 2.1.30: | ||
461 | - Fix writev() (it kept writing the first segment over and over again | ||
462 | instead of moving onto subsequent segments). | ||
460 | 2.1.29: | 463 | 2.1.29: |
461 | - Fix a deadlock when mounting read-write. | 464 | - Fix a deadlock when mounting read-write. |
462 | 2.1.28: | 465 | 2.1.28: |
diff --git a/Documentation/filesystems/path-lookup.txt b/Documentation/filesystems/path-lookup.txt new file mode 100644 index 000000000000..eb59c8b44be9 --- /dev/null +++ b/Documentation/filesystems/path-lookup.txt | |||
@@ -0,0 +1,382 @@ | |||
1 | Path walking and name lookup locking | ||
2 | ==================================== | ||
3 | |||
4 | Path resolution is the finding a dentry corresponding to a path name string, by | ||
5 | performing a path walk. Typically, for every open(), stat() etc., the path name | ||
6 | will be resolved. Paths are resolved by walking the namespace tree, starting | ||
7 | with the first component of the pathname (eg. root or cwd) with a known dentry, | ||
8 | then finding the child of that dentry, which is named the next component in the | ||
9 | path string. Then repeating the lookup from the child dentry and finding its | ||
10 | child with the next element, and so on. | ||
11 | |||
12 | Since it is a frequent operation for workloads like multiuser environments and | ||
13 | web servers, it is important to optimize this code. | ||
14 | |||
15 | Path walking synchronisation history: | ||
16 | Prior to 2.5.10, dcache_lock was acquired in d_lookup (dcache hash lookup) and | ||
17 | thus in every component during path look-up. Since 2.5.10 onwards, fast-walk | ||
18 | algorithm changed this by holding the dcache_lock at the beginning and walking | ||
19 | as many cached path component dentries as possible. This significantly | ||
20 | decreases the number of acquisition of dcache_lock. However it also increases | ||
21 | the lock hold time significantly and affects performance in large SMP machines. | ||
22 | Since 2.5.62 kernel, dcache has been using a new locking model that uses RCU to | ||
23 | make dcache look-up lock-free. | ||
24 | |||
25 | All the above algorithms required taking a lock and reference count on the | ||
26 | dentry that was looked up, so that may be used as the basis for walking the | ||
27 | next path element. This is inefficient and unscalable. It is inefficient | ||
28 | because of the locks and atomic operations required for every dentry element | ||
29 | slows things down. It is not scalable because many parallel applications that | ||
30 | are path-walk intensive tend to do path lookups starting from a common dentry | ||
31 | (usually, the root "/" or current working directory). So contention on these | ||
32 | common path elements causes lock and cacheline queueing. | ||
33 | |||
34 | Since 2.6.38, RCU is used to make a significant part of the entire path walk | ||
35 | (including dcache look-up) completely "store-free" (so, no locks, atomics, or | ||
36 | even stores into cachelines of common dentries). This is known as "rcu-walk" | ||
37 | path walking. | ||
38 | |||
39 | Path walking overview | ||
40 | ===================== | ||
41 | |||
42 | A name string specifies a start (root directory, cwd, fd-relative) and a | ||
43 | sequence of elements (directory entry names), which together refer to a path in | ||
44 | the namespace. A path is represented as a (dentry, vfsmount) tuple. The name | ||
45 | elements are sub-strings, seperated by '/'. | ||
46 | |||
47 | Name lookups will want to find a particular path that a name string refers to | ||
48 | (usually the final element, or parent of final element). This is done by taking | ||
49 | the path given by the name's starting point (which we know in advance -- eg. | ||
50 | current->fs->cwd or current->fs->root) as the first parent of the lookup. Then | ||
51 | iteratively for each subsequent name element, look up the child of the current | ||
52 | parent with the given name and if it is not the desired entry, make it the | ||
53 | parent for the next lookup. | ||
54 | |||
55 | A parent, of course, must be a directory, and we must have appropriate | ||
56 | permissions on the parent inode to be able to walk into it. | ||
57 | |||
58 | Turning the child into a parent for the next lookup requires more checks and | ||
59 | procedures. Symlinks essentially substitute the symlink name for the target | ||
60 | name in the name string, and require some recursive path walking. Mount points | ||
61 | must be followed into (thus changing the vfsmount that subsequent path elements | ||
62 | refer to), switching from the mount point path to the root of the particular | ||
63 | mounted vfsmount. These behaviours are variously modified depending on the | ||
64 | exact path walking flags. | ||
65 | |||
66 | Path walking then must, broadly, do several particular things: | ||
67 | - find the start point of the walk; | ||
68 | - perform permissions and validity checks on inodes; | ||
69 | - perform dcache hash name lookups on (parent, name element) tuples; | ||
70 | - traverse mount points; | ||
71 | - traverse symlinks; | ||
72 | - lookup and create missing parts of the path on demand. | ||
73 | |||
74 | Safe store-free look-up of dcache hash table | ||
75 | ============================================ | ||
76 | |||
77 | Dcache name lookup | ||
78 | ------------------ | ||
79 | In order to lookup a dcache (parent, name) tuple, we take a hash on the tuple | ||
80 | and use that to select a bucket in the dcache-hash table. The list of entries | ||
81 | in that bucket is then walked, and we do a full comparison of each entry | ||
82 | against our (parent, name) tuple. | ||
83 | |||
84 | The hash lists are RCU protected, so list walking is not serialised with | ||
85 | concurrent updates (insertion, deletion from the hash). This is a standard RCU | ||
86 | list application with the exception of renames, which will be covered below. | ||
87 | |||
88 | Parent and name members of a dentry, as well as its membership in the dcache | ||
89 | hash, and its inode are protected by the per-dentry d_lock spinlock. A | ||
90 | reference is taken on the dentry (while the fields are verified under d_lock), | ||
91 | and this stabilises its d_inode pointer and actual inode. This gives a stable | ||
92 | point to perform the next step of our path walk against. | ||
93 | |||
94 | These members are also protected by d_seq seqlock, although this offers | ||
95 | read-only protection and no durability of results, so care must be taken when | ||
96 | using d_seq for synchronisation (see seqcount based lookups, below). | ||
97 | |||
98 | Renames | ||
99 | ------- | ||
100 | Back to the rename case. In usual RCU protected lists, the only operations that | ||
101 | will happen to an object is insertion, and then eventually removal from the | ||
102 | list. The object will not be reused until an RCU grace period is complete. | ||
103 | This ensures the RCU list traversal primitives can run over the object without | ||
104 | problems (see RCU documentation for how this works). | ||
105 | |||
106 | However when a dentry is renamed, its hash value can change, requiring it to be | ||
107 | moved to a new hash list. Allocating and inserting a new alias would be | ||
108 | expensive and also problematic for directory dentries. Latency would be far to | ||
109 | high to wait for a grace period after removing the dentry and before inserting | ||
110 | it in the new hash bucket. So what is done is to insert the dentry into the | ||
111 | new list immediately. | ||
112 | |||
113 | However, when the dentry's list pointers are updated to point to objects in the | ||
114 | new list before waiting for a grace period, this can result in a concurrent RCU | ||
115 | lookup of the old list veering off into the new (incorrect) list and missing | ||
116 | the remaining dentries on the list. | ||
117 | |||
118 | There is no fundamental problem with walking down the wrong list, because the | ||
119 | dentry comparisons will never match. However it is fatal to miss a matching | ||
120 | dentry. So a seqlock is used to detect when a rename has occurred, and so the | ||
121 | lookup can be retried. | ||
122 | |||
123 | 1 2 3 | ||
124 | +---+ +---+ +---+ | ||
125 | hlist-->| N-+->| N-+->| N-+-> | ||
126 | head <--+-P |<-+-P |<-+-P | | ||
127 | +---+ +---+ +---+ | ||
128 | |||
129 | Rename of dentry 2 may require it deleted from the above list, and inserted | ||
130 | into a new list. Deleting 2 gives the following list. | ||
131 | |||
132 | 1 3 | ||
133 | +---+ +---+ (don't worry, the longer pointers do not | ||
134 | hlist-->| N-+-------->| N-+-> impose a measurable performance overhead | ||
135 | head <--+-P |<--------+-P | on modern CPUs) | ||
136 | +---+ +---+ | ||
137 | ^ 2 ^ | ||
138 | | +---+ | | ||
139 | | | N-+----+ | ||
140 | +----+-P | | ||
141 | +---+ | ||
142 | |||
143 | This is a standard RCU-list deletion, which leaves the deleted object's | ||
144 | pointers intact, so a concurrent list walker that is currently looking at | ||
145 | object 2 will correctly continue to object 3 when it is time to traverse the | ||
146 | next object. | ||
147 | |||
148 | However, when inserting object 2 onto a new list, we end up with this: | ||
149 | |||
150 | 1 3 | ||
151 | +---+ +---+ | ||
152 | hlist-->| N-+-------->| N-+-> | ||
153 | head <--+-P |<--------+-P | | ||
154 | +---+ +---+ | ||
155 | 2 | ||
156 | +---+ | ||
157 | | N-+----> | ||
158 | <----+-P | | ||
159 | +---+ | ||
160 | |||
161 | Because we didn't wait for a grace period, there may be a concurrent lookup | ||
162 | still at 2. Now when it follows 2's 'next' pointer, it will walk off into | ||
163 | another list without ever having checked object 3. | ||
164 | |||
165 | A related, but distinctly different, issue is that of rename atomicity versus | ||
166 | lookup operations. If a file is renamed from 'A' to 'B', a lookup must only | ||
167 | find either 'A' or 'B'. So if a lookup of 'A' returns NULL, a subsequent lookup | ||
168 | of 'B' must succeed (note the reverse is not true). | ||
169 | |||
170 | Between deleting the dentry from the old hash list, and inserting it on the new | ||
171 | hash list, a lookup may find neither 'A' nor 'B' matching the dentry. The same | ||
172 | rename seqlock is also used to cover this race in much the same way, by | ||
173 | retrying a negative lookup result if a rename was in progress. | ||
174 | |||
175 | Seqcount based lookups | ||
176 | ---------------------- | ||
177 | In refcount based dcache lookups, d_lock is used to serialise access to | ||
178 | the dentry, stabilising it while comparing its name and parent and then | ||
179 | taking a reference count (the reference count then gives a stable place to | ||
180 | start the next part of the path walk from). | ||
181 | |||
182 | As explained above, we would like to do path walking without taking locks or | ||
183 | reference counts on intermediate dentries along the path. To do this, a per | ||
184 | dentry seqlock (d_seq) is used to take a "coherent snapshot" of what the dentry | ||
185 | looks like (its name, parent, and inode). That snapshot is then used to start | ||
186 | the next part of the path walk. When loading the coherent snapshot under d_seq, | ||
187 | care must be taken to load the members up-front, and use those pointers rather | ||
188 | than reloading from the dentry later on (otherwise we'd have interesting things | ||
189 | like d_inode going NULL underneath us, if the name was unlinked). | ||
190 | |||
191 | Also important is to avoid performing any destructive operations (pretty much: | ||
192 | no non-atomic stores to shared data), and to recheck the seqcount when we are | ||
193 | "done" with the operation. Retry or abort if the seqcount does not match. | ||
194 | Avoiding destructive or changing operations means we can easily unwind from | ||
195 | failure. | ||
196 | |||
197 | What this means is that a caller, provided they are holding RCU lock to | ||
198 | protect the dentry object from disappearing, can perform a seqcount based | ||
199 | lookup which does not increment the refcount on the dentry or write to | ||
200 | it in any way. This returned dentry can be used for subsequent operations, | ||
201 | provided that d_seq is rechecked after that operation is complete. | ||
202 | |||
203 | Inodes are also rcu freed, so the seqcount lookup dentry's inode may also be | ||
204 | queried for permissions. | ||
205 | |||
206 | With this two parts of the puzzle, we can do path lookups without taking | ||
207 | locks or refcounts on dentry elements. | ||
208 | |||
209 | RCU-walk path walking design | ||
210 | ============================ | ||
211 | |||
212 | Path walking code now has two distinct modes, ref-walk and rcu-walk. ref-walk | ||
213 | is the traditional[*] way of performing dcache lookups using d_lock to | ||
214 | serialise concurrent modifications to the dentry and take a reference count on | ||
215 | it. ref-walk is simple and obvious, and may sleep, take locks, etc while path | ||
216 | walking is operating on each dentry. rcu-walk uses seqcount based dentry | ||
217 | lookups, and can perform lookup of intermediate elements without any stores to | ||
218 | shared data in the dentry or inode. rcu-walk can not be applied to all cases, | ||
219 | eg. if the filesystem must sleep or perform non trivial operations, rcu-walk | ||
220 | must be switched to ref-walk mode. | ||
221 | |||
222 | [*] RCU is still used for the dentry hash lookup in ref-walk, but not the full | ||
223 | path walk. | ||
224 | |||
225 | Where ref-walk uses a stable, refcounted ``parent'' to walk the remaining | ||
226 | path string, rcu-walk uses a d_seq protected snapshot. When looking up a | ||
227 | child of this parent snapshot, we open d_seq critical section on the child | ||
228 | before closing d_seq critical section on the parent. This gives an interlocking | ||
229 | ladder of snapshots to walk down. | ||
230 | |||
231 | |||
232 | proc 101 | ||
233 | /----------------\ | ||
234 | / comm: "vi" \ | ||
235 | / fs.root: dentry0 \ | ||
236 | \ fs.cwd: dentry2 / | ||
237 | \ / | ||
238 | \----------------/ | ||
239 | |||
240 | So when vi wants to open("/home/npiggin/test.c", O_RDWR), then it will | ||
241 | start from current->fs->root, which is a pinned dentry. Alternatively, | ||
242 | "./test.c" would start from cwd; both names refer to the same path in | ||
243 | the context of proc101. | ||
244 | |||
245 | dentry 0 | ||
246 | +---------------------+ rcu-walk begins here, we note d_seq, check the | ||
247 | | name: "/" | inode's permission, and then look up the next | ||
248 | | inode: 10 | path element which is "home"... | ||
249 | | children:"home", ...| | ||
250 | +---------------------+ | ||
251 | | | ||
252 | dentry 1 V | ||
253 | +---------------------+ ... which brings us here. We find dentry1 via | ||
254 | | name: "home" | hash lookup, then note d_seq and compare name | ||
255 | | inode: 678 | string and parent pointer. When we have a match, | ||
256 | | children:"npiggin" | we now recheck the d_seq of dentry0. Then we | ||
257 | +---------------------+ check inode and look up the next element. | ||
258 | | | ||
259 | dentry2 V | ||
260 | +---------------------+ Note: if dentry0 is now modified, lookup is | ||
261 | | name: "npiggin" | not necessarily invalid, so we need only keep a | ||
262 | | inode: 543 | parent for d_seq verification, and grandparents | ||
263 | | children:"a.c", ... | can be forgotten. | ||
264 | +---------------------+ | ||
265 | | | ||
266 | dentry3 V | ||
267 | +---------------------+ At this point we have our destination dentry. | ||
268 | | name: "a.c" | We now take its d_lock, verify d_seq of this | ||
269 | | inode: 14221 | dentry. If that checks out, we can increment | ||
270 | | children:NULL | its refcount because we're holding d_lock. | ||
271 | +---------------------+ | ||
272 | |||
273 | Taking a refcount on a dentry from rcu-walk mode, by taking its d_lock, | ||
274 | re-checking its d_seq, and then incrementing its refcount is called | ||
275 | "dropping rcu" or dropping from rcu-walk into ref-walk mode. | ||
276 | |||
277 | It is, in some sense, a bit of a house of cards. If the seqcount check of the | ||
278 | parent snapshot fails, the house comes down, because we had closed the d_seq | ||
279 | section on the grandparent, so we have nothing left to stand on. In that case, | ||
280 | the path walk must be fully restarted (which we do in ref-walk mode, to avoid | ||
281 | live locks). It is costly to have a full restart, but fortunately they are | ||
282 | quite rare. | ||
283 | |||
284 | When we reach a point where sleeping is required, or a filesystem callout | ||
285 | requires ref-walk, then instead of restarting the walk, we attempt to drop rcu | ||
286 | at the last known good dentry we have. Avoiding a full restart in ref-walk in | ||
287 | these cases is fundamental for performance and scalability because blocking | ||
288 | operations such as creates and unlinks are not uncommon. | ||
289 | |||
290 | The detailed design for rcu-walk is like this: | ||
291 | * LOOKUP_RCU is set in nd->flags, which distinguishes rcu-walk from ref-walk. | ||
292 | * Take the RCU lock for the entire path walk, starting with the acquiring | ||
293 | of the starting path (eg. root/cwd/fd-path). So now dentry refcounts are | ||
294 | not required for dentry persistence. | ||
295 | * synchronize_rcu is called when unregistering a filesystem, so we can | ||
296 | access d_ops and i_ops during rcu-walk. | ||
297 | * Similarly take the vfsmount lock for the entire path walk. So now mnt | ||
298 | refcounts are not required for persistence. Also we are free to perform mount | ||
299 | lookups, and to assume dentry mount points and mount roots are stable up and | ||
300 | down the path. | ||
301 | * Have a per-dentry seqlock to protect the dentry name, parent, and inode, | ||
302 | so we can load this tuple atomically, and also check whether any of its | ||
303 | members have changed. | ||
304 | * Dentry lookups (based on parent, candidate string tuple) recheck the parent | ||
305 | sequence after the child is found in case anything changed in the parent | ||
306 | during the path walk. | ||
307 | * inode is also RCU protected so we can load d_inode and use the inode for | ||
308 | limited things. | ||
309 | * i_mode, i_uid, i_gid can be tested for exec permissions during path walk. | ||
310 | * i_op can be loaded. | ||
311 | * When the destination dentry is reached, drop rcu there (ie. take d_lock, | ||
312 | verify d_seq, increment refcount). | ||
313 | * If seqlock verification fails anywhere along the path, do a full restart | ||
314 | of the path lookup in ref-walk mode. -ECHILD tends to be used (for want of | ||
315 | a better errno) to signal an rcu-walk failure. | ||
316 | |||
317 | The cases where rcu-walk cannot continue are: | ||
318 | * NULL dentry (ie. any uncached path element) | ||
319 | * Following links | ||
320 | |||
321 | It may be possible eventually to make following links rcu-walk aware. | ||
322 | |||
323 | Uncached path elements will always require dropping to ref-walk mode, at the | ||
324 | very least because i_mutex needs to be grabbed, and objects allocated. | ||
325 | |||
326 | Final note: | ||
327 | "store-free" path walking is not strictly store free. We take vfsmount lock | ||
328 | and refcounts (both of which can be made per-cpu), and we also store to the | ||
329 | stack (which is essentially CPU-local), and we also have to take locks and | ||
330 | refcount on final dentry. | ||
331 | |||
332 | The point is that shared data, where practically possible, is not locked | ||
333 | or stored into. The result is massive improvements in performance and | ||
334 | scalability of path resolution. | ||
335 | |||
336 | |||
337 | Interesting statistics | ||
338 | ====================== | ||
339 | |||
340 | The following table gives rcu lookup statistics for a few simple workloads | ||
341 | (2s12c24t Westmere, debian non-graphical system). Ungraceful are attempts to | ||
342 | drop rcu that fail due to d_seq failure and requiring the entire path lookup | ||
343 | again. Other cases are successful rcu-drops that are required before the final | ||
344 | element, nodentry for missing dentry, revalidate for filesystem revalidate | ||
345 | routine requiring rcu drop, permission for permission check requiring drop, | ||
346 | and link for symlink traversal requiring drop. | ||
347 | |||
348 | rcu-lookups restart nodentry link revalidate permission | ||
349 | bootup 47121 0 4624 1010 10283 7852 | ||
350 | dbench 25386793 0 6778659(26.7%) 55 549 1156 | ||
351 | kbuild 2696672 10 64442(2.3%) 108764(4.0%) 1 1590 | ||
352 | git diff 39605 0 28 2 0 106 | ||
353 | vfstest 24185492 4945 708725(2.9%) 1076136(4.4%) 0 2651 | ||
354 | |||
355 | What this shows is that failed rcu-walk lookups, ie. ones that are restarted | ||
356 | entirely with ref-walk, are quite rare. Even the "vfstest" case which | ||
357 | specifically has concurrent renames/mkdir/rmdir/ creat/unlink/etc to excercise | ||
358 | such races is not showing a huge amount of restarts. | ||
359 | |||
360 | Dropping from rcu-walk to ref-walk mean that we have encountered a dentry where | ||
361 | the reference count needs to be taken for some reason. This is either because | ||
362 | we have reached the target of the path walk, or because we have encountered a | ||
363 | condition that can't be resolved in rcu-walk mode. Ideally, we drop rcu-walk | ||
364 | only when we have reached the target dentry, so the other statistics show where | ||
365 | this does not happen. | ||
366 | |||
367 | Note that a graceful drop from rcu-walk mode due to something such as the | ||
368 | dentry not existing (which can be common) is not necessarily a failure of | ||
369 | rcu-walk scheme, because some elements of the path may have been walked in | ||
370 | rcu-walk mode. The further we get from common path elements (such as cwd or | ||
371 | root), the less contended the dentry is likely to be. The closer we are to | ||
372 | common path elements, the more likely they will exist in dentry cache. | ||
373 | |||
374 | |||
375 | Papers and other documentation on dcache locking | ||
376 | ================================================ | ||
377 | |||
378 | 1. Scaling dcache with RCU (http://linuxjournal.com/article.php?sid=7124). | ||
379 | |||
380 | 2. http://lse.sourceforge.net/locking/dcache/dcache.html | ||
381 | |||
382 | |||
diff --git a/Documentation/filesystems/porting b/Documentation/filesystems/porting index b12c89538680..266d2059b9b8 100644 --- a/Documentation/filesystems/porting +++ b/Documentation/filesystems/porting | |||
@@ -216,7 +216,6 @@ had ->revalidate()) add calls in ->follow_link()/->readlink(). | |||
216 | ->d_parent changes are not protected by BKL anymore. Read access is safe | 216 | ->d_parent changes are not protected by BKL anymore. Read access is safe |
217 | if at least one of the following is true: | 217 | if at least one of the following is true: |
218 | * filesystem has no cross-directory rename() | 218 | * filesystem has no cross-directory rename() |
219 | * dcache_lock is held | ||
220 | * we know that parent had been locked (e.g. we are looking at | 219 | * we know that parent had been locked (e.g. we are looking at |
221 | ->d_parent of ->lookup() argument). | 220 | ->d_parent of ->lookup() argument). |
222 | * we are called from ->rename(). | 221 | * we are called from ->rename(). |
@@ -318,3 +317,80 @@ if it's zero is not *and* *never* *had* *been* enough. Final unlink() and iput( | |||
318 | may happen while the inode is in the middle of ->write_inode(); e.g. if you blindly | 317 | may happen while the inode is in the middle of ->write_inode(); e.g. if you blindly |
319 | free the on-disk inode, you may end up doing that while ->write_inode() is writing | 318 | free the on-disk inode, you may end up doing that while ->write_inode() is writing |
320 | to it. | 319 | to it. |
320 | |||
321 | --- | ||
322 | [mandatory] | ||
323 | |||
324 | .d_delete() now only advises the dcache as to whether or not to cache | ||
325 | unreferenced dentries, and is now only called when the dentry refcount goes to | ||
326 | 0. Even on 0 refcount transition, it must be able to tolerate being called 0, | ||
327 | 1, or more times (eg. constant, idempotent). | ||
328 | |||
329 | --- | ||
330 | [mandatory] | ||
331 | |||
332 | .d_compare() calling convention and locking rules are significantly | ||
333 | changed. Read updated documentation in Documentation/filesystems/vfs.txt (and | ||
334 | look at examples of other filesystems) for guidance. | ||
335 | |||
336 | --- | ||
337 | [mandatory] | ||
338 | |||
339 | .d_hash() calling convention and locking rules are significantly | ||
340 | changed. Read updated documentation in Documentation/filesystems/vfs.txt (and | ||
341 | look at examples of other filesystems) for guidance. | ||
342 | |||
343 | --- | ||
344 | [mandatory] | ||
345 | dcache_lock is gone, replaced by fine grained locks. See fs/dcache.c | ||
346 | for details of what locks to replace dcache_lock with in order to protect | ||
347 | particular things. Most of the time, a filesystem only needs ->d_lock, which | ||
348 | protects *all* the dcache state of a given dentry. | ||
349 | |||
350 | -- | ||
351 | [mandatory] | ||
352 | |||
353 | Filesystems must RCU-free their inodes, if they can have been accessed | ||
354 | via rcu-walk path walk (basically, if the file can have had a path name in the | ||
355 | vfs namespace). | ||
356 | |||
357 | i_dentry and i_rcu share storage in a union, and the vfs expects | ||
358 | i_dentry to be reinitialized before it is freed, so an: | ||
359 | |||
360 | INIT_LIST_HEAD(&inode->i_dentry); | ||
361 | |||
362 | must be done in the RCU callback. | ||
363 | |||
364 | -- | ||
365 | [recommended] | ||
366 | vfs now tries to do path walking in "rcu-walk mode", which avoids | ||
367 | atomic operations and scalability hazards on dentries and inodes (see | ||
368 | Documentation/filesystems/path-walk.txt). d_hash and d_compare changes (above) | ||
369 | are examples of the changes required to support this. For more complex | ||
370 | filesystem callbacks, the vfs drops out of rcu-walk mode before the fs call, so | ||
371 | no changes are required to the filesystem. However, this is costly and loses | ||
372 | the benefits of rcu-walk mode. We will begin to add filesystem callbacks that | ||
373 | are rcu-walk aware, shown below. Filesystems should take advantage of this | ||
374 | where possible. | ||
375 | |||
376 | -- | ||
377 | [mandatory] | ||
378 | d_revalidate is a callback that is made on every path element (if | ||
379 | the filesystem provides it), which requires dropping out of rcu-walk mode. This | ||
380 | may now be called in rcu-walk mode (nd->flags & LOOKUP_RCU). -ECHILD should be | ||
381 | returned if the filesystem cannot handle rcu-walk. See | ||
382 | Documentation/filesystems/vfs.txt for more details. | ||
383 | |||
384 | permission and check_acl are inode permission checks that are called | ||
385 | on many or all directory inodes on the way down a path walk (to check for | ||
386 | exec permission). These must now be rcu-walk aware (flags & IPERM_RCU). See | ||
387 | Documentation/filesystems/vfs.txt for more details. | ||
388 | |||
389 | -- | ||
390 | [mandatory] | ||
391 | In ->fallocate() you must check the mode option passed in. If your | ||
392 | filesystem does not support hole punching (deallocating space in the middle of a | ||
393 | file) you must return -EOPNOTSUPP if FALLOC_FL_PUNCH_HOLE is set in mode. | ||
394 | Currently you can only have FALLOC_FL_PUNCH_HOLE with FALLOC_FL_KEEP_SIZE set, | ||
395 | so the i_size should not change when hole punching, even when puching the end of | ||
396 | a file off. | ||
diff --git a/Documentation/filesystems/proc.txt b/Documentation/filesystems/proc.txt index e73df2722ff3..9471225212c4 100644 --- a/Documentation/filesystems/proc.txt +++ b/Documentation/filesystems/proc.txt | |||
@@ -1181,6 +1181,30 @@ Table 1-12: Files in /proc/fs/ext4/<devname> | |||
1181 | mb_groups details of multiblock allocator buddy cache of free blocks | 1181 | mb_groups details of multiblock allocator buddy cache of free blocks |
1182 | .............................................................................. | 1182 | .............................................................................. |
1183 | 1183 | ||
1184 | 2.0 /proc/consoles | ||
1185 | ------------------ | ||
1186 | Shows registered system console lines. | ||
1187 | |||
1188 | To see which character device lines are currently used for the system console | ||
1189 | /dev/console, you may simply look into the file /proc/consoles: | ||
1190 | |||
1191 | > cat /proc/consoles | ||
1192 | tty0 -WU (ECp) 4:7 | ||
1193 | ttyS0 -W- (Ep) 4:64 | ||
1194 | |||
1195 | The columns are: | ||
1196 | |||
1197 | device name of the device | ||
1198 | operations R = can do read operations | ||
1199 | W = can do write operations | ||
1200 | U = can do unblank | ||
1201 | flags E = it is enabled | ||
1202 | C = it is prefered console | ||
1203 | B = it is primary boot console | ||
1204 | p = it is used for printk buffer | ||
1205 | b = it is not a TTY but a Braille device | ||
1206 | a = it is safe to use when cpu is offline | ||
1207 | major:minor major and minor number of the device separated by a colon | ||
1184 | 1208 | ||
1185 | ------------------------------------------------------------------------------ | 1209 | ------------------------------------------------------------------------------ |
1186 | Summary | 1210 | Summary |
diff --git a/Documentation/filesystems/vfs.txt b/Documentation/filesystems/vfs.txt index ed7e5efc06d8..fbb324e2bd43 100644 --- a/Documentation/filesystems/vfs.txt +++ b/Documentation/filesystems/vfs.txt | |||
@@ -325,7 +325,8 @@ struct inode_operations { | |||
325 | void * (*follow_link) (struct dentry *, struct nameidata *); | 325 | void * (*follow_link) (struct dentry *, struct nameidata *); |
326 | void (*put_link) (struct dentry *, struct nameidata *, void *); | 326 | void (*put_link) (struct dentry *, struct nameidata *, void *); |
327 | void (*truncate) (struct inode *); | 327 | void (*truncate) (struct inode *); |
328 | int (*permission) (struct inode *, int, struct nameidata *); | 328 | int (*permission) (struct inode *, int, unsigned int); |
329 | int (*check_acl)(struct inode *, int, unsigned int); | ||
329 | int (*setattr) (struct dentry *, struct iattr *); | 330 | int (*setattr) (struct dentry *, struct iattr *); |
330 | int (*getattr) (struct vfsmount *mnt, struct dentry *, struct kstat *); | 331 | int (*getattr) (struct vfsmount *mnt, struct dentry *, struct kstat *); |
331 | int (*setxattr) (struct dentry *, const char *,const void *,size_t,int); | 332 | int (*setxattr) (struct dentry *, const char *,const void *,size_t,int); |
@@ -414,6 +415,13 @@ otherwise noted. | |||
414 | permission: called by the VFS to check for access rights on a POSIX-like | 415 | permission: called by the VFS to check for access rights on a POSIX-like |
415 | filesystem. | 416 | filesystem. |
416 | 417 | ||
418 | May be called in rcu-walk mode (flags & IPERM_RCU). If in rcu-walk | ||
419 | mode, the filesystem must check the permission without blocking or | ||
420 | storing to the inode. | ||
421 | |||
422 | If a situation is encountered that rcu-walk cannot handle, return | ||
423 | -ECHILD and it will be called again in ref-walk mode. | ||
424 | |||
417 | setattr: called by the VFS to set attributes for a file. This method | 425 | setattr: called by the VFS to set attributes for a file. This method |
418 | is called by chmod(2) and related system calls. | 426 | is called by chmod(2) and related system calls. |
419 | 427 | ||
@@ -534,6 +542,7 @@ struct address_space_operations { | |||
534 | sector_t (*bmap)(struct address_space *, sector_t); | 542 | sector_t (*bmap)(struct address_space *, sector_t); |
535 | int (*invalidatepage) (struct page *, unsigned long); | 543 | int (*invalidatepage) (struct page *, unsigned long); |
536 | int (*releasepage) (struct page *, int); | 544 | int (*releasepage) (struct page *, int); |
545 | void (*freepage)(struct page *); | ||
537 | ssize_t (*direct_IO)(int, struct kiocb *, const struct iovec *iov, | 546 | ssize_t (*direct_IO)(int, struct kiocb *, const struct iovec *iov, |
538 | loff_t offset, unsigned long nr_segs); | 547 | loff_t offset, unsigned long nr_segs); |
539 | struct page* (*get_xip_page)(struct address_space *, sector_t, | 548 | struct page* (*get_xip_page)(struct address_space *, sector_t, |
@@ -660,11 +669,10 @@ struct address_space_operations { | |||
660 | releasepage: releasepage is called on PagePrivate pages to indicate | 669 | releasepage: releasepage is called on PagePrivate pages to indicate |
661 | that the page should be freed if possible. ->releasepage | 670 | that the page should be freed if possible. ->releasepage |
662 | should remove any private data from the page and clear the | 671 | should remove any private data from the page and clear the |
663 | PagePrivate flag. It may also remove the page from the | 672 | PagePrivate flag. If releasepage() fails for some reason, it must |
664 | address_space. If this fails for some reason, it may indicate | 673 | indicate failure with a 0 return value. |
665 | failure with a 0 return value. | 674 | releasepage() is used in two distinct though related cases. The |
666 | This is used in two distinct though related cases. The first | 675 | first is when the VM finds a clean page with no active users and |
667 | is when the VM finds a clean page with no active users and | ||
668 | wants to make it a free page. If ->releasepage succeeds, the | 676 | wants to make it a free page. If ->releasepage succeeds, the |
669 | page will be removed from the address_space and become free. | 677 | page will be removed from the address_space and become free. |
670 | 678 | ||
@@ -679,6 +687,12 @@ struct address_space_operations { | |||
679 | need to ensure this. Possibly it can clear the PageUptodate | 687 | need to ensure this. Possibly it can clear the PageUptodate |
680 | bit if it cannot free private data yet. | 688 | bit if it cannot free private data yet. |
681 | 689 | ||
690 | freepage: freepage is called once the page is no longer visible in | ||
691 | the page cache in order to allow the cleanup of any private | ||
692 | data. Since it may be called by the memory reclaimer, it | ||
693 | should not assume that the original address_space mapping still | ||
694 | exists, and it should not block. | ||
695 | |||
682 | direct_IO: called by the generic read/write routines to perform | 696 | direct_IO: called by the generic read/write routines to perform |
683 | direct_IO - that is IO requests which bypass the page cache | 697 | direct_IO - that is IO requests which bypass the page cache |
684 | and transfer data directly between the storage and the | 698 | and transfer data directly between the storage and the |
@@ -841,9 +855,12 @@ defined: | |||
841 | 855 | ||
842 | struct dentry_operations { | 856 | struct dentry_operations { |
843 | int (*d_revalidate)(struct dentry *, struct nameidata *); | 857 | int (*d_revalidate)(struct dentry *, struct nameidata *); |
844 | int (*d_hash) (struct dentry *, struct qstr *); | 858 | int (*d_hash)(const struct dentry *, const struct inode *, |
845 | int (*d_compare) (struct dentry *, struct qstr *, struct qstr *); | 859 | struct qstr *); |
846 | int (*d_delete)(struct dentry *); | 860 | int (*d_compare)(const struct dentry *, const struct inode *, |
861 | const struct dentry *, const struct inode *, | ||
862 | unsigned int, const char *, const struct qstr *); | ||
863 | int (*d_delete)(const struct dentry *); | ||
847 | void (*d_release)(struct dentry *); | 864 | void (*d_release)(struct dentry *); |
848 | void (*d_iput)(struct dentry *, struct inode *); | 865 | void (*d_iput)(struct dentry *, struct inode *); |
849 | char *(*d_dname)(struct dentry *, char *, int); | 866 | char *(*d_dname)(struct dentry *, char *, int); |
@@ -854,13 +871,45 @@ struct dentry_operations { | |||
854 | dcache. Most filesystems leave this as NULL, because all their | 871 | dcache. Most filesystems leave this as NULL, because all their |
855 | dentries in the dcache are valid | 872 | dentries in the dcache are valid |
856 | 873 | ||
857 | d_hash: called when the VFS adds a dentry to the hash table | 874 | d_revalidate may be called in rcu-walk mode (nd->flags & LOOKUP_RCU). |
875 | If in rcu-walk mode, the filesystem must revalidate the dentry without | ||
876 | blocking or storing to the dentry, d_parent and d_inode should not be | ||
877 | used without care (because they can go NULL), instead nd->inode should | ||
878 | be used. | ||
879 | |||
880 | If a situation is encountered that rcu-walk cannot handle, return | ||
881 | -ECHILD and it will be called again in ref-walk mode. | ||
882 | |||
883 | d_hash: called when the VFS adds a dentry to the hash table. The first | ||
884 | dentry passed to d_hash is the parent directory that the name is | ||
885 | to be hashed into. The inode is the dentry's inode. | ||
886 | |||
887 | Same locking and synchronisation rules as d_compare regarding | ||
888 | what is safe to dereference etc. | ||
889 | |||
890 | d_compare: called to compare a dentry name with a given name. The first | ||
891 | dentry is the parent of the dentry to be compared, the second is | ||
892 | the parent's inode, then the dentry and inode (may be NULL) of the | ||
893 | child dentry. len and name string are properties of the dentry to be | ||
894 | compared. qstr is the name to compare it with. | ||
895 | |||
896 | Must be constant and idempotent, and should not take locks if | ||
897 | possible, and should not or store into the dentry or inodes. | ||
898 | Should not dereference pointers outside the dentry or inodes without | ||
899 | lots of care (eg. d_parent, d_inode, d_name should not be used). | ||
900 | |||
901 | However, our vfsmount is pinned, and RCU held, so the dentries and | ||
902 | inodes won't disappear, neither will our sb or filesystem module. | ||
903 | ->i_sb and ->d_sb may be used. | ||
858 | 904 | ||
859 | d_compare: called when a dentry should be compared with another | 905 | It is a tricky calling convention because it needs to be called under |
906 | "rcu-walk", ie. without any locks or references on things. | ||
860 | 907 | ||
861 | d_delete: called when the last reference to a dentry is | 908 | d_delete: called when the last reference to a dentry is dropped and the |
862 | deleted. This means no-one is using the dentry, however it is | 909 | dcache is deciding whether or not to cache it. Return 1 to delete |
863 | still valid and in the dcache | 910 | immediately, or 0 to cache the dentry. Default is NULL which means to |
911 | always cache a reachable dentry. d_delete must be constant and | ||
912 | idempotent. | ||
864 | 913 | ||
865 | d_release: called when a dentry is really deallocated | 914 | d_release: called when a dentry is really deallocated |
866 | 915 | ||
@@ -904,14 +953,11 @@ manipulate dentries: | |||
904 | the usage count) | 953 | the usage count) |
905 | 954 | ||
906 | dput: close a handle for a dentry (decrements the usage count). If | 955 | dput: close a handle for a dentry (decrements the usage count). If |
907 | the usage count drops to 0, the "d_delete" method is called | 956 | the usage count drops to 0, and the dentry is still in its |
908 | and the dentry is placed on the unused list if the dentry is | 957 | parent's hash, the "d_delete" method is called to check whether |
909 | still in its parents hash list. Putting the dentry on the | 958 | it should be cached. If it should not be cached, or if the dentry |
910 | unused list just means that if the system needs some RAM, it | 959 | is not hashed, it is deleted. Otherwise cached dentries are put |
911 | goes through the unused list of dentries and deallocates them. | 960 | into an LRU list to be reclaimed on memory shortage. |
912 | If the dentry has already been unhashed and the usage count | ||
913 | drops to 0, in this case the dentry is deallocated after the | ||
914 | "d_delete" method is called | ||
915 | 961 | ||
916 | d_drop: this unhashes a dentry from its parents hash list. A | 962 | d_drop: this unhashes a dentry from its parents hash list. A |
917 | subsequent call to dput() will deallocate the dentry if its | 963 | subsequent call to dput() will deallocate the dentry if its |
diff --git a/Documentation/gpio.txt b/Documentation/gpio.txt index 9633da01ff46..a492d92bb098 100644 --- a/Documentation/gpio.txt +++ b/Documentation/gpio.txt | |||
@@ -135,7 +135,7 @@ setting up a platform_device using the GPIO, is mark its direction: | |||
135 | int gpio_direction_input(unsigned gpio); | 135 | int gpio_direction_input(unsigned gpio); |
136 | int gpio_direction_output(unsigned gpio, int value); | 136 | int gpio_direction_output(unsigned gpio, int value); |
137 | 137 | ||
138 | The return value is zero for success, else a negative errno. It should | 138 | The return value is zero for success, else a negative errno. It must |
139 | be checked, since the get/set calls don't have error returns and since | 139 | be checked, since the get/set calls don't have error returns and since |
140 | misconfiguration is possible. You should normally issue these calls from | 140 | misconfiguration is possible. You should normally issue these calls from |
141 | a task context. However, for spinlock-safe GPIOs it's OK to use them | 141 | a task context. However, for spinlock-safe GPIOs it's OK to use them |
@@ -617,6 +617,16 @@ and have the following read/write attributes: | |||
617 | is configured as an output, this value may be written; | 617 | is configured as an output, this value may be written; |
618 | any nonzero value is treated as high. | 618 | any nonzero value is treated as high. |
619 | 619 | ||
620 | If the pin can be configured as interrupt-generating interrupt | ||
621 | and if it has been configured to generate interrupts (see the | ||
622 | description of "edge"), you can poll(2) on that file and | ||
623 | poll(2) will return whenever the interrupt was triggered. If | ||
624 | you use poll(2), set the events POLLPRI and POLLERR. If you | ||
625 | use select(2), set the file descriptor in exceptfds. After | ||
626 | poll(2) returns, either lseek(2) to the beginning of the sysfs | ||
627 | file and read the new value or close the file and re-open it | ||
628 | to read the value. | ||
629 | |||
620 | "edge" ... reads as either "none", "rising", "falling", or | 630 | "edge" ... reads as either "none", "rising", "falling", or |
621 | "both". Write these strings to select the signal edge(s) | 631 | "both". Write these strings to select the signal edge(s) |
622 | that will make poll(2) on the "value" file return. | 632 | that will make poll(2) on the "value" file return. |
diff --git a/Documentation/hwmon/adm9240 b/Documentation/hwmon/adm9240 index 2c6f1fed4618..36e8ec6aa868 100644 --- a/Documentation/hwmon/adm9240 +++ b/Documentation/hwmon/adm9240 | |||
@@ -155,7 +155,7 @@ connected to a normally open switch. | |||
155 | The ADM9240 provides an internal open drain on this line, and may output | 155 | The ADM9240 provides an internal open drain on this line, and may output |
156 | a 20 ms active low pulse to reset an external Chassis Intrusion latch. | 156 | a 20 ms active low pulse to reset an external Chassis Intrusion latch. |
157 | 157 | ||
158 | Clear the CI latch by writing value 1 to the sysfs chassis_clear file. | 158 | Clear the CI latch by writing value 0 to the sysfs intrusion0_alarm file. |
159 | 159 | ||
160 | Alarm flags reported as 16-bit word | 160 | Alarm flags reported as 16-bit word |
161 | 161 | ||
diff --git a/Documentation/hwmon/ads7828 b/Documentation/hwmon/ads7828 index 75bc4beaf447..2bbebe6f771f 100644 --- a/Documentation/hwmon/ads7828 +++ b/Documentation/hwmon/ads7828 | |||
@@ -9,7 +9,7 @@ Supported chips: | |||
9 | http://focus.ti.com/lit/ds/symlink/ads7828.pdf | 9 | http://focus.ti.com/lit/ds/symlink/ads7828.pdf |
10 | 10 | ||
11 | Authors: | 11 | Authors: |
12 | Steve Hardy <steve@linuxrealtime.co.uk> | 12 | Steve Hardy <shardy@redhat.com> |
13 | 13 | ||
14 | Module Parameters | 14 | Module Parameters |
15 | ----------------- | 15 | ----------------- |
diff --git a/Documentation/hwmon/dme1737 b/Documentation/hwmon/dme1737 index fc5df7654d63..4d2935145a1c 100644 --- a/Documentation/hwmon/dme1737 +++ b/Documentation/hwmon/dme1737 | |||
@@ -42,7 +42,7 @@ Description | |||
42 | This driver implements support for the hardware monitoring capabilities of the | 42 | This driver implements support for the hardware monitoring capabilities of the |
43 | SMSC DME1737 and Asus A8000 (which are the same), SMSC SCH5027, SCH311x, | 43 | SMSC DME1737 and Asus A8000 (which are the same), SMSC SCH5027, SCH311x, |
44 | and SCH5127 Super-I/O chips. These chips feature monitoring of 3 temp sensors | 44 | and SCH5127 Super-I/O chips. These chips feature monitoring of 3 temp sensors |
45 | temp[1-3] (2 remote diodes and 1 internal), 7 voltages in[0-6] (6 external and | 45 | temp[1-3] (2 remote diodes and 1 internal), 8 voltages in[0-7] (7 external and |
46 | 1 internal) and up to 6 fan speeds fan[1-6]. Additionally, the chips implement | 46 | 1 internal) and up to 6 fan speeds fan[1-6]. Additionally, the chips implement |
47 | up to 5 PWM outputs pwm[1-3,5-6] for controlling fan speeds both manually and | 47 | up to 5 PWM outputs pwm[1-3,5-6] for controlling fan speeds both manually and |
48 | automatically. | 48 | automatically. |
@@ -105,6 +105,7 @@ SCH5127: | |||
105 | in4: V1_IN 0V - 1.5V | 105 | in4: V1_IN 0V - 1.5V |
106 | in5: VTR (+3.3V standby) 0V - 4.38V | 106 | in5: VTR (+3.3V standby) 0V - 4.38V |
107 | in6: Vbat (+3.0V) 0V - 4.38V | 107 | in6: Vbat (+3.0V) 0V - 4.38V |
108 | in7: Vtrip (+1.5V) 0V - 1.99V | ||
108 | 109 | ||
109 | Each voltage input has associated min and max limits which trigger an alarm | 110 | Each voltage input has associated min and max limits which trigger an alarm |
110 | when crossed. | 111 | when crossed. |
@@ -217,10 +218,10 @@ cpu0_vid RO CPU core reference voltage in | |||
217 | vrm RW Voltage regulator module version | 218 | vrm RW Voltage regulator module version |
218 | number. | 219 | number. |
219 | 220 | ||
220 | in[0-6]_input RO Measured voltage in millivolts. | 221 | in[0-7]_input RO Measured voltage in millivolts. |
221 | in[0-6]_min RW Low limit for voltage input. | 222 | in[0-7]_min RW Low limit for voltage input. |
222 | in[0-6]_max RW High limit for voltage input. | 223 | in[0-7]_max RW High limit for voltage input. |
223 | in[0-6]_alarm RO Voltage input alarm. Returns 1 if | 224 | in[0-7]_alarm RO Voltage input alarm. Returns 1 if |
224 | voltage input is or went outside the | 225 | voltage input is or went outside the |
225 | associated min-max range, 0 otherwise. | 226 | associated min-max range, 0 otherwise. |
226 | 227 | ||
@@ -324,3 +325,4 @@ fan5 opt opt | |||
324 | pwm5 opt opt | 325 | pwm5 opt opt |
325 | fan6 opt opt | 326 | fan6 opt opt |
326 | pwm6 opt opt | 327 | pwm6 opt opt |
328 | in7 yes | ||
diff --git a/Documentation/hwmon/ds620 b/Documentation/hwmon/ds620 new file mode 100644 index 000000000000..1fbe3cd916cc --- /dev/null +++ b/Documentation/hwmon/ds620 | |||
@@ -0,0 +1,34 @@ | |||
1 | Kernel driver ds620 | ||
2 | =================== | ||
3 | |||
4 | Supported chips: | ||
5 | * Dallas Semiconductor DS620 | ||
6 | Prefix: 'ds620' | ||
7 | Datasheet: Publicly available at the Dallas Semiconductor website | ||
8 | http://www.dalsemi.com/ | ||
9 | |||
10 | Authors: | ||
11 | Roland Stigge <stigge@antcom.de> | ||
12 | based on ds1621.c by | ||
13 | Christian W. Zuckschwerdt <zany@triq.net> | ||
14 | |||
15 | Description | ||
16 | ----------- | ||
17 | |||
18 | The DS620 is a (one instance) digital thermometer and thermostat. It has both | ||
19 | high and low temperature limits which can be user defined (i.e. programmed | ||
20 | into non-volatile on-chip registers). Temperature range is -55 degree Celsius | ||
21 | to +125. Between 0 and 70 degree Celsius, accuracy is 0.5 Kelvin. The value | ||
22 | returned via sysfs displays post decimal positions. | ||
23 | |||
24 | The thermostat function works as follows: When configured via platform_data | ||
25 | (struct ds620_platform_data) .pomode == 0 (default), the thermostat output pin | ||
26 | PO is always low. If .pomode == 1, the thermostat is in PO_LOW mode. I.e., the | ||
27 | output pin PO becomes active when the temperature falls below temp1_min and | ||
28 | stays active until the temperature goes above temp1_max. | ||
29 | |||
30 | Likewise, with .pomode == 2, the thermostat is in PO_HIGH mode. I.e., the PO | ||
31 | output pin becomes active when the temperature goes above temp1_max and stays | ||
32 | active until the temperature falls below temp1_min. | ||
33 | |||
34 | The PO output pin of the DS620 operates active-low. | ||
diff --git a/Documentation/hwmon/lm93 b/Documentation/hwmon/lm93 index ac711f357faf..7a10616d0b44 100644 --- a/Documentation/hwmon/lm93 +++ b/Documentation/hwmon/lm93 | |||
@@ -11,7 +11,7 @@ Authors: | |||
11 | Mark M. Hoffman <mhoffman@lightlink.com> | 11 | Mark M. Hoffman <mhoffman@lightlink.com> |
12 | Ported to 2.6 by Eric J. Bowersox <ericb@aspsys.com> | 12 | Ported to 2.6 by Eric J. Bowersox <ericb@aspsys.com> |
13 | Adapted to 2.6.20 by Carsten Emde <ce@osadl.org> | 13 | Adapted to 2.6.20 by Carsten Emde <ce@osadl.org> |
14 | Modified for mainline integration by Hans J. Koch <hjk@linutronix.de> | 14 | Modified for mainline integration by Hans J. Koch <hjk@hansjkoch.de> |
15 | 15 | ||
16 | Module Parameters | 16 | Module Parameters |
17 | ----------------- | 17 | ----------------- |
diff --git a/Documentation/hwmon/max6650 b/Documentation/hwmon/max6650 index 8be7beb9e3e8..c565650fcfc6 100644 --- a/Documentation/hwmon/max6650 +++ b/Documentation/hwmon/max6650 | |||
@@ -8,7 +8,7 @@ Supported chips: | |||
8 | Datasheet: http://pdfserv.maxim-ic.com/en/ds/MAX6650-MAX6651.pdf | 8 | Datasheet: http://pdfserv.maxim-ic.com/en/ds/MAX6650-MAX6651.pdf |
9 | 9 | ||
10 | Authors: | 10 | Authors: |
11 | Hans J. Koch <hjk@linutronix.de> | 11 | Hans J. Koch <hjk@hansjkoch.de> |
12 | John Morris <john.morris@spirentcom.com> | 12 | John Morris <john.morris@spirentcom.com> |
13 | Claus Gindhart <claus.gindhart@kontron.com> | 13 | Claus Gindhart <claus.gindhart@kontron.com> |
14 | 14 | ||
diff --git a/Documentation/hwmon/sht21 b/Documentation/hwmon/sht21 new file mode 100644 index 000000000000..db17fda45c3e --- /dev/null +++ b/Documentation/hwmon/sht21 | |||
@@ -0,0 +1,49 @@ | |||
1 | Kernel driver sht21 | ||
2 | =================== | ||
3 | |||
4 | Supported chips: | ||
5 | * Sensirion SHT21 | ||
6 | Prefix: 'sht21' | ||
7 | Addresses scanned: none | ||
8 | Datasheet: Publicly available at the Sensirion website | ||
9 | http://www.sensirion.com/en/pdf/product_information/Datasheet-humidity-sensor-SHT21.pdf | ||
10 | |||
11 | * Sensirion SHT25 | ||
12 | Prefix: 'sht21' | ||
13 | Addresses scanned: none | ||
14 | Datasheet: Publicly available at the Sensirion website | ||
15 | http://www.sensirion.com/en/pdf/product_information/Datasheet-humidity-sensor-SHT25.pdf | ||
16 | |||
17 | Author: | ||
18 | Urs Fleisch <urs.fleisch@sensirion.com> | ||
19 | |||
20 | Description | ||
21 | ----------- | ||
22 | |||
23 | The SHT21 and SHT25 are humidity and temperature sensors in a DFN package of | ||
24 | only 3 x 3 mm footprint and 1.1 mm height. The difference between the two | ||
25 | devices is the higher level of precision of the SHT25 (1.8% relative humidity, | ||
26 | 0.2 degree Celsius) compared with the SHT21 (2.0% relative humidity, | ||
27 | 0.3 degree Celsius). | ||
28 | |||
29 | The devices communicate with the I2C protocol. All sensors are set to the same | ||
30 | I2C address 0x40, so an entry with I2C_BOARD_INFO("sht21", 0x40) can be used | ||
31 | in the board setup code. | ||
32 | |||
33 | sysfs-Interface | ||
34 | --------------- | ||
35 | |||
36 | temp1_input - temperature input | ||
37 | humidity1_input - humidity input | ||
38 | |||
39 | Notes | ||
40 | ----- | ||
41 | |||
42 | The driver uses the default resolution settings of 12 bit for humidity and 14 | ||
43 | bit for temperature, which results in typical measurement times of 22 ms for | ||
44 | humidity and 66 ms for temperature. To keep self heating below 0.1 degree | ||
45 | Celsius, the device should not be active for more than 10% of the time, | ||
46 | e.g. maximum two measurements per second at the given resolution. | ||
47 | |||
48 | Different resolutions, the on-chip heater, using the CRC checksum and reading | ||
49 | the serial number are not supported yet. | ||
diff --git a/Documentation/hwmon/sysfs-interface b/Documentation/hwmon/sysfs-interface index 645699010551..c6559f153589 100644 --- a/Documentation/hwmon/sysfs-interface +++ b/Documentation/hwmon/sysfs-interface | |||
@@ -384,10 +384,20 @@ curr[1-*]_min Current min value. | |||
384 | Unit: milliampere | 384 | Unit: milliampere |
385 | RW | 385 | RW |
386 | 386 | ||
387 | curr[1-*]_lcrit Current critical low value | ||
388 | Unit: milliampere | ||
389 | RW | ||
390 | |||
391 | curr[1-*]_crit Current critical high value. | ||
392 | Unit: milliampere | ||
393 | RW | ||
394 | |||
387 | curr[1-*]_input Current input value | 395 | curr[1-*]_input Current input value |
388 | Unit: milliampere | 396 | Unit: milliampere |
389 | RO | 397 | RO |
390 | 398 | ||
399 | Also see the Alarms section for status flags associated with currents. | ||
400 | |||
391 | ********* | 401 | ********* |
392 | * Power * | 402 | * Power * |
393 | ********* | 403 | ********* |
@@ -450,13 +460,6 @@ power[1-*]_accuracy Accuracy of the power meter. | |||
450 | Unit: Percent | 460 | Unit: Percent |
451 | RO | 461 | RO |
452 | 462 | ||
453 | power[1-*]_alarm 1 if the system is drawing more power than the | ||
454 | cap allows; 0 otherwise. A poll notification is | ||
455 | sent to this file when the power use exceeds the | ||
456 | cap. This file only appears if the cap is known | ||
457 | to be enforced by hardware. | ||
458 | RO | ||
459 | |||
460 | power[1-*]_cap If power use rises above this limit, the | 463 | power[1-*]_cap If power use rises above this limit, the |
461 | system should take action to reduce power use. | 464 | system should take action to reduce power use. |
462 | A poll notification is sent to this file if the | 465 | A poll notification is sent to this file if the |
@@ -479,6 +482,20 @@ power[1-*]_cap_min Minimum cap that can be set. | |||
479 | Unit: microWatt | 482 | Unit: microWatt |
480 | RO | 483 | RO |
481 | 484 | ||
485 | power[1-*]_max Maximum power. | ||
486 | Unit: microWatt | ||
487 | RW | ||
488 | |||
489 | power[1-*]_crit Critical maximum power. | ||
490 | If power rises to or above this limit, the | ||
491 | system is expected take drastic action to reduce | ||
492 | power consumption, such as a system shutdown or | ||
493 | a forced powerdown of some devices. | ||
494 | Unit: microWatt | ||
495 | RW | ||
496 | |||
497 | Also see the Alarms section for status flags associated with power readings. | ||
498 | |||
482 | ********** | 499 | ********** |
483 | * Energy * | 500 | * Energy * |
484 | ********** | 501 | ********** |
@@ -488,6 +505,15 @@ energy[1-*]_input Cumulative energy use | |||
488 | RO | 505 | RO |
489 | 506 | ||
490 | 507 | ||
508 | ************ | ||
509 | * Humidity * | ||
510 | ************ | ||
511 | |||
512 | humidity[1-*]_input Humidity | ||
513 | Unit: milli-percent (per cent mille, pcm) | ||
514 | RO | ||
515 | |||
516 | |||
491 | ********** | 517 | ********** |
492 | * Alarms * | 518 | * Alarms * |
493 | ********** | 519 | ********** |
@@ -501,6 +527,7 @@ implementation. | |||
501 | 527 | ||
502 | in[0-*]_alarm | 528 | in[0-*]_alarm |
503 | curr[1-*]_alarm | 529 | curr[1-*]_alarm |
530 | power[1-*]_alarm | ||
504 | fan[1-*]_alarm | 531 | fan[1-*]_alarm |
505 | temp[1-*]_alarm | 532 | temp[1-*]_alarm |
506 | Channel alarm | 533 | Channel alarm |
@@ -512,12 +539,20 @@ OR | |||
512 | 539 | ||
513 | in[0-*]_min_alarm | 540 | in[0-*]_min_alarm |
514 | in[0-*]_max_alarm | 541 | in[0-*]_max_alarm |
542 | in[0-*]_lcrit_alarm | ||
543 | in[0-*]_crit_alarm | ||
515 | curr[1-*]_min_alarm | 544 | curr[1-*]_min_alarm |
516 | curr[1-*]_max_alarm | 545 | curr[1-*]_max_alarm |
546 | curr[1-*]_lcrit_alarm | ||
547 | curr[1-*]_crit_alarm | ||
548 | power[1-*]_cap_alarm | ||
549 | power[1-*]_max_alarm | ||
550 | power[1-*]_crit_alarm | ||
517 | fan[1-*]_min_alarm | 551 | fan[1-*]_min_alarm |
518 | fan[1-*]_max_alarm | 552 | fan[1-*]_max_alarm |
519 | temp[1-*]_min_alarm | 553 | temp[1-*]_min_alarm |
520 | temp[1-*]_max_alarm | 554 | temp[1-*]_max_alarm |
555 | temp[1-*]_lcrit_alarm | ||
521 | temp[1-*]_crit_alarm | 556 | temp[1-*]_crit_alarm |
522 | temp[1-*]_emergency_alarm | 557 | temp[1-*]_emergency_alarm |
523 | Limit alarm | 558 | Limit alarm |
diff --git a/Documentation/hwmon/w83627hf b/Documentation/hwmon/w83627hf index fb145e5e722a..8432e1118173 100644 --- a/Documentation/hwmon/w83627hf +++ b/Documentation/hwmon/w83627hf | |||
@@ -91,3 +91,25 @@ isaset -y -f 0x2e 0xaa | |||
91 | 91 | ||
92 | The above sequence assumes a Super-I/O config space at 0x2e/0x2f, but | 92 | The above sequence assumes a Super-I/O config space at 0x2e/0x2f, but |
93 | 0x4e/0x4f is also possible. | 93 | 0x4e/0x4f is also possible. |
94 | |||
95 | Voltage pin mapping | ||
96 | ------------------- | ||
97 | |||
98 | Here is a summary of the voltage pin mapping for the W83627THF. This | ||
99 | can be useful to convert data provided by board manufacturers into | ||
100 | working libsensors configuration statements. | ||
101 | |||
102 | W83627THF | | ||
103 | Pin | Name | Register | Sysfs attribute | ||
104 | ----------------------------------------------------- | ||
105 | 100 | CPUVCORE | 20h | in0 | ||
106 | 99 | VIN0 | 21h | in1 | ||
107 | 98 | VIN1 | 22h | in2 | ||
108 | 97 | VIN2 | 24h | in4 | ||
109 | 114 | AVCC | 23h | in3 | ||
110 | 61 | 5VSB | 50h (bank 5) | in7 | ||
111 | 74 | VBAT | 51h (bank 5) | in8 | ||
112 | |||
113 | For other supported devices, you'll have to take the hard path and | ||
114 | look up the information in the datasheet yourself (and then add it | ||
115 | to this document please.) | ||
diff --git a/Documentation/hwmon/w83793 b/Documentation/hwmon/w83793 index 51171a83165b..6cc5f639b721 100644 --- a/Documentation/hwmon/w83793 +++ b/Documentation/hwmon/w83793 | |||
@@ -92,7 +92,7 @@ This driver implements support for Winbond W83793G/W83793R chips. | |||
92 | 92 | ||
93 | * Chassis | 93 | * Chassis |
94 | If the case open alarm triggers, it will stay in this state unless cleared | 94 | If the case open alarm triggers, it will stay in this state unless cleared |
95 | by any write to the sysfs file "chassis". | 95 | by writing 0 to the sysfs file "intrusion0_alarm". |
96 | 96 | ||
97 | * VID and VRM | 97 | * VID and VRM |
98 | The VRM version is detected automatically, don't modify the it unless you | 98 | The VRM version is detected automatically, don't modify the it unless you |
diff --git a/Documentation/i2c/muxes/gpio-i2cmux b/Documentation/i2c/muxes/gpio-i2cmux new file mode 100644 index 000000000000..811cd78d4cdc --- /dev/null +++ b/Documentation/i2c/muxes/gpio-i2cmux | |||
@@ -0,0 +1,65 @@ | |||
1 | Kernel driver gpio-i2cmux | ||
2 | |||
3 | Author: Peter Korsgaard <peter.korsgaard@barco.com> | ||
4 | |||
5 | Description | ||
6 | ----------- | ||
7 | |||
8 | gpio-i2cmux is an i2c mux driver providing access to I2C bus segments | ||
9 | from a master I2C bus and a hardware MUX controlled through GPIO pins. | ||
10 | |||
11 | E.G.: | ||
12 | |||
13 | ---------- ---------- Bus segment 1 - - - - - | ||
14 | | | SCL/SDA | |-------------- | | | ||
15 | | |------------| | | ||
16 | | | | | Bus segment 2 | | | ||
17 | | Linux | GPIO 1..N | MUX |--------------- Devices | ||
18 | | |------------| | | | | ||
19 | | | | | Bus segment M | ||
20 | | | | |---------------| | | ||
21 | ---------- ---------- - - - - - | ||
22 | |||
23 | SCL/SDA of the master I2C bus is multiplexed to bus segment 1..M | ||
24 | according to the settings of the GPIO pins 1..N. | ||
25 | |||
26 | Usage | ||
27 | ----- | ||
28 | |||
29 | gpio-i2cmux uses the platform bus, so you need to provide a struct | ||
30 | platform_device with the platform_data pointing to a struct | ||
31 | gpio_i2cmux_platform_data with the I2C adapter number of the master | ||
32 | bus, the number of bus segments to create and the GPIO pins used | ||
33 | to control it. See include/linux/gpio-i2cmux.h for details. | ||
34 | |||
35 | E.G. something like this for a MUX providing 4 bus segments | ||
36 | controlled through 3 GPIO pins: | ||
37 | |||
38 | #include <linux/gpio-i2cmux.h> | ||
39 | #include <linux/platform_device.h> | ||
40 | |||
41 | static const unsigned myboard_gpiomux_gpios[] = { | ||
42 | AT91_PIN_PC26, AT91_PIN_PC25, AT91_PIN_PC24 | ||
43 | }; | ||
44 | |||
45 | static const unsigned myboard_gpiomux_values[] = { | ||
46 | 0, 1, 2, 3 | ||
47 | }; | ||
48 | |||
49 | static struct gpio_i2cmux_platform_data myboard_i2cmux_data = { | ||
50 | .parent = 1, | ||
51 | .base_nr = 2, /* optional */ | ||
52 | .values = myboard_gpiomux_values, | ||
53 | .n_values = ARRAY_SIZE(myboard_gpiomux_values), | ||
54 | .gpios = myboard_gpiomux_gpios, | ||
55 | .n_gpios = ARRAY_SIZE(myboard_gpiomux_gpios), | ||
56 | .idle = 4, /* optional */ | ||
57 | }; | ||
58 | |||
59 | static struct platform_device myboard_i2cmux = { | ||
60 | .name = "gpio-i2cmux", | ||
61 | .id = 0, | ||
62 | .dev = { | ||
63 | .platform_data = &myboard_i2cmux_data, | ||
64 | }, | ||
65 | }; | ||
diff --git a/Documentation/input/cma3000_d0x.txt b/Documentation/input/cma3000_d0x.txt new file mode 100644 index 000000000000..29d088db4afd --- /dev/null +++ b/Documentation/input/cma3000_d0x.txt | |||
@@ -0,0 +1,115 @@ | |||
1 | Kernel driver for CMA3000-D0x | ||
2 | ============================ | ||
3 | |||
4 | Supported chips: | ||
5 | * VTI CMA3000-D0x | ||
6 | Datasheet: | ||
7 | CMA3000-D0X Product Family Specification 8281000A.02.pdf | ||
8 | <http://www.vti.fi/en/> | ||
9 | |||
10 | Author: Hemanth V <hemanthv@ti.com> | ||
11 | |||
12 | |||
13 | Description | ||
14 | ----------- | ||
15 | CMA3000 Tri-axis accelerometer supports Motion detect, Measurement and | ||
16 | Free fall modes. | ||
17 | |||
18 | Motion Detect Mode: Its the low power mode where interrupts are generated only | ||
19 | when motion exceeds the defined thresholds. | ||
20 | |||
21 | Measurement Mode: This mode is used to read the acceleration data on X,Y,Z | ||
22 | axis and supports 400, 100, 40 Hz sample frequency. | ||
23 | |||
24 | Free fall Mode: This mode is intended to save system resources. | ||
25 | |||
26 | Threshold values: Chip supports defining threshold values for above modes | ||
27 | which includes time and g value. Refer product specifications for more details. | ||
28 | |||
29 | CMA3000 chip supports mutually exclusive I2C and SPI interfaces for | ||
30 | communication, currently the driver supports I2C based communication only. | ||
31 | Initial configuration for bus mode is set in non volatile memory and can later | ||
32 | be modified through bus interface command. | ||
33 | |||
34 | Driver reports acceleration data through input subsystem. It generates ABS_MISC | ||
35 | event with value 1 when free fall is detected. | ||
36 | |||
37 | Platform data need to be configured for initial default values. | ||
38 | |||
39 | Platform Data | ||
40 | ------------- | ||
41 | fuzz_x: Noise on X Axis | ||
42 | |||
43 | fuzz_y: Noise on Y Axis | ||
44 | |||
45 | fuzz_z: Noise on Z Axis | ||
46 | |||
47 | g_range: G range in milli g i.e 2000 or 8000 | ||
48 | |||
49 | mode: Default Operating mode | ||
50 | |||
51 | mdthr: Motion detect g range threshold value | ||
52 | |||
53 | mdfftmr: Motion detect and free fall time threshold value | ||
54 | |||
55 | ffthr: Free fall g range threshold value | ||
56 | |||
57 | Input Interface | ||
58 | -------------- | ||
59 | Input driver version is 1.0.0 | ||
60 | Input device ID: bus 0x18 vendor 0x0 product 0x0 version 0x0 | ||
61 | Input device name: "cma3000-accelerometer" | ||
62 | Supported events: | ||
63 | Event type 0 (Sync) | ||
64 | Event type 3 (Absolute) | ||
65 | Event code 0 (X) | ||
66 | Value 47 | ||
67 | Min -8000 | ||
68 | Max 8000 | ||
69 | Fuzz 200 | ||
70 | Event code 1 (Y) | ||
71 | Value -28 | ||
72 | Min -8000 | ||
73 | Max 8000 | ||
74 | Fuzz 200 | ||
75 | Event code 2 (Z) | ||
76 | Value 905 | ||
77 | Min -8000 | ||
78 | Max 8000 | ||
79 | Fuzz 200 | ||
80 | Event code 40 (Misc) | ||
81 | Value 0 | ||
82 | Min 0 | ||
83 | Max 1 | ||
84 | Event type 4 (Misc) | ||
85 | |||
86 | |||
87 | Register/Platform parameters Description | ||
88 | ---------------------------------------- | ||
89 | |||
90 | mode: | ||
91 | 0: power down mode | ||
92 | 1: 100 Hz Measurement mode | ||
93 | 2: 400 Hz Measurement mode | ||
94 | 3: 40 Hz Measurement mode | ||
95 | 4: Motion Detect mode (default) | ||
96 | 5: 100 Hz Free fall mode | ||
97 | 6: 40 Hz Free fall mode | ||
98 | 7: Power off mode | ||
99 | |||
100 | grange: | ||
101 | 2000: 2000 mg or 2G Range | ||
102 | 8000: 8000 mg or 8G Range | ||
103 | |||
104 | mdthr: | ||
105 | X: X * 71mg (8G Range) | ||
106 | X: X * 18mg (2G Range) | ||
107 | |||
108 | mdfftmr: | ||
109 | X: (X & 0x70) * 100 ms (MDTMR) | ||
110 | (X & 0x0F) * 2.5 ms (FFTMR 400 Hz) | ||
111 | (X & 0x0F) * 10 ms (FFTMR 100 Hz) | ||
112 | |||
113 | ffthr: | ||
114 | X: (X >> 2) * 18mg (2G Range) | ||
115 | X: (X & 0x0F) * 71 mg (8G Range) | ||
diff --git a/Documentation/input/ff.txt b/Documentation/input/ff.txt index ded4d5f53109..b3867bf49f8f 100644 --- a/Documentation/input/ff.txt +++ b/Documentation/input/ff.txt | |||
@@ -49,7 +49,9 @@ This information is subject to change. | |||
49 | #include <linux/input.h> | 49 | #include <linux/input.h> |
50 | #include <sys/ioctl.h> | 50 | #include <sys/ioctl.h> |
51 | 51 | ||
52 | unsigned long features[1 + FF_MAX/sizeof(unsigned long)]; | 52 | #define BITS_TO_LONGS(x) \ |
53 | (((x) + 8 * sizeof (unsigned long) - 1) / (8 * sizeof (unsigned long))) | ||
54 | unsigned long features[BITS_TO_LONGS(FF_CNT)]; | ||
53 | int ioctl(int file_descriptor, int request, unsigned long *features); | 55 | int ioctl(int file_descriptor, int request, unsigned long *features); |
54 | 56 | ||
55 | "request" must be EVIOCGBIT(EV_FF, size of features array in bytes ) | 57 | "request" must be EVIOCGBIT(EV_FF, size of features array in bytes ) |
diff --git a/Documentation/input/multi-touch-protocol.txt b/Documentation/input/multi-touch-protocol.txt index bdcba154b83e..71536e78406f 100644 --- a/Documentation/input/multi-touch-protocol.txt +++ b/Documentation/input/multi-touch-protocol.txt | |||
@@ -1,6 +1,6 @@ | |||
1 | Multi-touch (MT) Protocol | 1 | Multi-touch (MT) Protocol |
2 | ------------------------- | 2 | ------------------------- |
3 | Copyright (C) 2009 Henrik Rydberg <rydberg@euromail.se> | 3 | Copyright (C) 2009-2010 Henrik Rydberg <rydberg@euromail.se> |
4 | 4 | ||
5 | 5 | ||
6 | Introduction | 6 | Introduction |
@@ -161,19 +161,24 @@ against the glass. The inner region will increase, and in general, the | |||
161 | ratio ABS_MT_TOUCH_MAJOR / ABS_MT_WIDTH_MAJOR, which is always smaller than | 161 | ratio ABS_MT_TOUCH_MAJOR / ABS_MT_WIDTH_MAJOR, which is always smaller than |
162 | unity, is related to the contact pressure. For pressure-based devices, | 162 | unity, is related to the contact pressure. For pressure-based devices, |
163 | ABS_MT_PRESSURE may be used to provide the pressure on the contact area | 163 | ABS_MT_PRESSURE may be used to provide the pressure on the contact area |
164 | instead. | 164 | instead. Devices capable of contact hovering can use ABS_MT_DISTANCE to |
165 | indicate the distance between the contact and the surface. | ||
165 | 166 | ||
166 | In addition to the MAJOR parameters, the oval shape of the contact can be | 167 | In addition to the MAJOR parameters, the oval shape of the contact can be |
167 | described by adding the MINOR parameters, such that MAJOR and MINOR are the | 168 | described by adding the MINOR parameters, such that MAJOR and MINOR are the |
168 | major and minor axis of an ellipse. Finally, the orientation of the oval | 169 | major and minor axis of an ellipse. Finally, the orientation of the oval |
169 | shape can be describe with the ORIENTATION parameter. | 170 | shape can be describe with the ORIENTATION parameter. |
170 | 171 | ||
172 | For type A devices, further specification of the touch shape is possible | ||
173 | via ABS_MT_BLOB_ID. | ||
174 | |||
171 | The ABS_MT_TOOL_TYPE may be used to specify whether the touching tool is a | 175 | The ABS_MT_TOOL_TYPE may be used to specify whether the touching tool is a |
172 | contact or a pen or something else. Devices with more granular information | 176 | finger or a pen or something else. Finally, the ABS_MT_TRACKING_ID event |
173 | may specify general shapes as blobs, i.e., as a sequence of rectangular | 177 | may be used to track identified contacts over time [5]. |
174 | shapes grouped together by an ABS_MT_BLOB_ID. Finally, for the few devices | 178 | |
175 | that currently support it, the ABS_MT_TRACKING_ID event may be used to | 179 | In the type B protocol, ABS_MT_TOOL_TYPE and ABS_MT_TRACKING_ID are |
176 | report contact tracking from hardware [5]. | 180 | implicitly handled by input core; drivers should instead call |
181 | input_mt_report_slot_state(). | ||
177 | 182 | ||
178 | 183 | ||
179 | Event Semantics | 184 | Event Semantics |
@@ -213,6 +218,12 @@ The pressure, in arbitrary units, on the contact area. May be used instead | |||
213 | of TOUCH and WIDTH for pressure-based devices or any device with a spatial | 218 | of TOUCH and WIDTH for pressure-based devices or any device with a spatial |
214 | signal intensity distribution. | 219 | signal intensity distribution. |
215 | 220 | ||
221 | ABS_MT_DISTANCE | ||
222 | |||
223 | The distance, in surface units, between the contact and the surface. Zero | ||
224 | distance means the contact is touching the surface. A positive number means | ||
225 | the contact is hovering above the surface. | ||
226 | |||
216 | ABS_MT_ORIENTATION | 227 | ABS_MT_ORIENTATION |
217 | 228 | ||
218 | The orientation of the ellipse. The value should describe a signed quarter | 229 | The orientation of the ellipse. The value should describe a signed quarter |
@@ -240,21 +251,24 @@ ABS_MT_TOOL_TYPE | |||
240 | The type of approaching tool. A lot of kernel drivers cannot distinguish | 251 | The type of approaching tool. A lot of kernel drivers cannot distinguish |
241 | between different tool types, such as a finger or a pen. In such cases, the | 252 | between different tool types, such as a finger or a pen. In such cases, the |
242 | event should be omitted. The protocol currently supports MT_TOOL_FINGER and | 253 | event should be omitted. The protocol currently supports MT_TOOL_FINGER and |
243 | MT_TOOL_PEN [2]. | 254 | MT_TOOL_PEN [2]. For type B devices, this event is handled by input core; |
255 | drivers should instead use input_mt_report_slot_state(). | ||
244 | 256 | ||
245 | ABS_MT_BLOB_ID | 257 | ABS_MT_BLOB_ID |
246 | 258 | ||
247 | The BLOB_ID groups several packets together into one arbitrarily shaped | 259 | The BLOB_ID groups several packets together into one arbitrarily shaped |
248 | contact. This is a low-level anonymous grouping for type A devices, and | 260 | contact. The sequence of points forms a polygon which defines the shape of |
261 | the contact. This is a low-level anonymous grouping for type A devices, and | ||
249 | should not be confused with the high-level trackingID [5]. Most type A | 262 | should not be confused with the high-level trackingID [5]. Most type A |
250 | devices do not have blob capability, so drivers can safely omit this event. | 263 | devices do not have blob capability, so drivers can safely omit this event. |
251 | 264 | ||
252 | ABS_MT_TRACKING_ID | 265 | ABS_MT_TRACKING_ID |
253 | 266 | ||
254 | The TRACKING_ID identifies an initiated contact throughout its life cycle | 267 | The TRACKING_ID identifies an initiated contact throughout its life cycle |
255 | [5]. This event is mandatory for type B devices. The value range of the | 268 | [5]. The value range of the TRACKING_ID should be large enough to ensure |
256 | TRACKING_ID should be large enough to ensure unique identification of a | 269 | unique identification of a contact maintained over an extended period of |
257 | contact maintained over an extended period of time. | 270 | time. For type B devices, this event is handled by input core; drivers |
271 | should instead use input_mt_report_slot_state(). | ||
258 | 272 | ||
259 | 273 | ||
260 | Event Computation | 274 | Event Computation |
@@ -301,18 +315,19 @@ and with ORIENTATION, one can detect twisting of fingers. | |||
301 | Notes | 315 | Notes |
302 | ----- | 316 | ----- |
303 | 317 | ||
304 | In order to stay compatible with existing applications, the data | 318 | In order to stay compatible with existing applications, the data reported |
305 | reported in a finger packet must not be recognized as single-touch | 319 | in a finger packet must not be recognized as single-touch events. |
306 | events. In addition, all finger data must bypass input filtering, | 320 | |
307 | since subsequent events of the same type refer to different fingers. | 321 | For type A devices, all finger data bypasses input filtering, since |
322 | subsequent events of the same type refer to different fingers. | ||
308 | 323 | ||
309 | The first kernel driver to utilize the MT protocol is the bcm5974 driver, | 324 | For example usage of the type A protocol, see the bcm5974 driver. For |
310 | where examples can be found. | 325 | example usage of the type B protocol, see the hid-egalax driver. |
311 | 326 | ||
312 | [1] With the extension ABS_MT_APPROACH_X and ABS_MT_APPROACH_Y, the | 327 | [1] With the extension ABS_MT_APPROACH_X and ABS_MT_APPROACH_Y, the |
313 | difference between the contact position and the approaching tool position | 328 | difference between the contact position and the approaching tool position |
314 | could be used to derive tilt. | 329 | could be used to derive tilt. |
315 | [2] The list can of course be extended. | 330 | [2] The list can of course be extended. |
316 | [3] Multitouch X driver project: http://bitmath.org/code/multitouch/. | 331 | [3] The mtdev project: http://bitmath.org/code/mtdev/. |
317 | [4] See the section on event computation. | 332 | [4] See the section on event computation. |
318 | [5] See the section on finger tracking. | 333 | [5] See the section on finger tracking. |
diff --git a/Documentation/ioctl/ioctl-number.txt b/Documentation/ioctl/ioctl-number.txt index 63ffd78824d8..ac293e955308 100644 --- a/Documentation/ioctl/ioctl-number.txt +++ b/Documentation/ioctl/ioctl-number.txt | |||
@@ -155,7 +155,6 @@ Code Seq#(hex) Include File Comments | |||
155 | 'Q' all linux/soundcard.h | 155 | 'Q' all linux/soundcard.h |
156 | 'R' 00-1F linux/random.h conflict! | 156 | 'R' 00-1F linux/random.h conflict! |
157 | 'R' 01 linux/rfkill.h conflict! | 157 | 'R' 01 linux/rfkill.h conflict! |
158 | 'R' 01-0F media/rds.h conflict! | ||
159 | 'R' C0-DF net/bluetooth/rfcomm.h | 158 | 'R' C0-DF net/bluetooth/rfcomm.h |
160 | 'S' all linux/cdrom.h conflict! | 159 | 'S' all linux/cdrom.h conflict! |
161 | 'S' 80-81 scsi/scsi_ioctl.h conflict! | 160 | 'S' 80-81 scsi/scsi_ioctl.h conflict! |
@@ -194,7 +193,6 @@ Code Seq#(hex) Include File Comments | |||
194 | <http://lrcwww.epfl.ch/> | 193 | <http://lrcwww.epfl.ch/> |
195 | 'b' 00-FF conflict! bit3 vme host bridge | 194 | 'b' 00-FF conflict! bit3 vme host bridge |
196 | <mailto:natalia@nikhefk.nikhef.nl> | 195 | <mailto:natalia@nikhefk.nikhef.nl> |
197 | 'b' 00-0F media/bt819.h conflict! | ||
198 | 'c' all linux/cm4000_cs.h conflict! | 196 | 'c' all linux/cm4000_cs.h conflict! |
199 | 'c' 00-7F linux/comstats.h conflict! | 197 | 'c' 00-7F linux/comstats.h conflict! |
200 | 'c' 00-7F linux/coda.h conflict! | 198 | 'c' 00-7F linux/coda.h conflict! |
@@ -249,7 +247,7 @@ Code Seq#(hex) Include File Comments | |||
249 | 'p' 40-7F linux/nvram.h | 247 | 'p' 40-7F linux/nvram.h |
250 | 'p' 80-9F linux/ppdev.h user-space parport | 248 | 'p' 80-9F linux/ppdev.h user-space parport |
251 | <mailto:tim@cyberelk.net> | 249 | <mailto:tim@cyberelk.net> |
252 | 'p' A1-A4 linux/pps.h LinuxPPS | 250 | 'p' A1-A5 linux/pps.h LinuxPPS |
253 | <mailto:giometti@linux.it> | 251 | <mailto:giometti@linux.it> |
254 | 'q' 00-1F linux/serio.h | 252 | 'q' 00-1F linux/serio.h |
255 | 'q' 80-FF linux/telephony.h Internet PhoneJACK, Internet LineJACK | 253 | 'q' 80-FF linux/telephony.h Internet PhoneJACK, Internet LineJACK |
@@ -260,14 +258,11 @@ Code Seq#(hex) Include File Comments | |||
260 | 't' 80-8F linux/isdn_ppp.h | 258 | 't' 80-8F linux/isdn_ppp.h |
261 | 't' 90 linux/toshiba.h | 259 | 't' 90 linux/toshiba.h |
262 | 'u' 00-1F linux/smb_fs.h gone | 260 | 'u' 00-1F linux/smb_fs.h gone |
263 | 'v' all linux/videodev.h conflict! | ||
264 | 'v' 00-1F linux/ext2_fs.h conflict! | 261 | 'v' 00-1F linux/ext2_fs.h conflict! |
265 | 'v' 00-1F linux/fs.h conflict! | 262 | 'v' 00-1F linux/fs.h conflict! |
266 | 'v' 00-0F linux/sonypi.h conflict! | 263 | 'v' 00-0F linux/sonypi.h conflict! |
267 | 'v' C0-CF drivers/media/video/ov511.h conflict! | ||
268 | 'v' C0-DF media/pwc-ioctl.h conflict! | 264 | 'v' C0-DF media/pwc-ioctl.h conflict! |
269 | 'v' C0-FF linux/meye.h conflict! | 265 | 'v' C0-FF linux/meye.h conflict! |
270 | 'v' C0-CF drivers/media/video/zoran/zoran.h conflict! | ||
271 | 'v' D0-DF drivers/media/video/cpia2/cpia2dev.h conflict! | 266 | 'v' D0-DF drivers/media/video/cpia2/cpia2dev.h conflict! |
272 | 'w' all CERN SCI driver | 267 | 'w' all CERN SCI driver |
273 | 'y' 00-1F packet based user level communications | 268 | 'y' 00-1F packet based user level communications |
@@ -278,7 +273,6 @@ Code Seq#(hex) Include File Comments | |||
278 | <mailto:oe@port.de> | 273 | <mailto:oe@port.de> |
279 | 'z' 10-4F drivers/s390/crypto/zcrypt_api.h conflict! | 274 | 'z' 10-4F drivers/s390/crypto/zcrypt_api.h conflict! |
280 | 0x80 00-1F linux/fb.h | 275 | 0x80 00-1F linux/fb.h |
281 | 0x88 00-3F media/ovcamchip.h | ||
282 | 0x89 00-06 arch/x86/include/asm/sockios.h | 276 | 0x89 00-06 arch/x86/include/asm/sockios.h |
283 | 0x89 0B-DF linux/sockios.h | 277 | 0x89 0B-DF linux/sockios.h |
284 | 0x89 E0-EF linux/sockios.h SIOCPROTOPRIVATE range | 278 | 0x89 E0-EF linux/sockios.h SIOCPROTOPRIVATE range |
diff --git a/Documentation/iostats.txt b/Documentation/iostats.txt index 59a69ec67c40..f6dece5b7014 100644 --- a/Documentation/iostats.txt +++ b/Documentation/iostats.txt | |||
@@ -81,7 +81,7 @@ Field 9 -- # of I/Os currently in progress | |||
81 | The only field that should go to zero. Incremented as requests are | 81 | The only field that should go to zero. Incremented as requests are |
82 | given to appropriate struct request_queue and decremented as they finish. | 82 | given to appropriate struct request_queue and decremented as they finish. |
83 | Field 10 -- # of milliseconds spent doing I/Os | 83 | Field 10 -- # of milliseconds spent doing I/Os |
84 | This field is increases so long as field 9 is nonzero. | 84 | This field increases so long as field 9 is nonzero. |
85 | Field 11 -- weighted # of milliseconds spent doing I/Os | 85 | Field 11 -- weighted # of milliseconds spent doing I/Os |
86 | This field is incremented at each I/O start, I/O completion, I/O | 86 | This field is incremented at each I/O start, I/O completion, I/O |
87 | merge, or read of these stats by the number of I/Os in progress | 87 | merge, or read of these stats by the number of I/Os in progress |
diff --git a/Documentation/kbuild/kbuild.txt b/Documentation/kbuild/kbuild.txt index 1e5165aa9e4e..4a990317b84a 100644 --- a/Documentation/kbuild/kbuild.txt +++ b/Documentation/kbuild/kbuild.txt | |||
@@ -73,6 +73,14 @@ Specify the output directory when building the kernel. | |||
73 | The output directory can also be specified using "O=...". | 73 | The output directory can also be specified using "O=...". |
74 | Setting "O=..." takes precedence over KBUILD_OUTPUT. | 74 | Setting "O=..." takes precedence over KBUILD_OUTPUT. |
75 | 75 | ||
76 | KBUILD_DEBARCH | ||
77 | -------------------------------------------------- | ||
78 | For the deb-pkg target, allows overriding the normal heuristics deployed by | ||
79 | deb-pkg. Normally deb-pkg attempts to guess the right architecture based on | ||
80 | the UTS_MACHINE variable, and on some architectures also the kernel config. | ||
81 | The value of KBUILD_DEBARCH is assumed (not checked) to be a valid Debian | ||
82 | architecture. | ||
83 | |||
76 | ARCH | 84 | ARCH |
77 | -------------------------------------------------- | 85 | -------------------------------------------------- |
78 | Set ARCH to the architecture to be built. | 86 | Set ARCH to the architecture to be built. |
diff --git a/Documentation/kbuild/kconfig-language.txt b/Documentation/kbuild/kconfig-language.txt index 2fe93ca7c77c..b507d61fd41c 100644 --- a/Documentation/kbuild/kconfig-language.txt +++ b/Documentation/kbuild/kconfig-language.txt | |||
@@ -112,7 +112,6 @@ applicable everywhere (see syntax). | |||
112 | (no prompts anywhere) and for symbols with no dependencies. | 112 | (no prompts anywhere) and for symbols with no dependencies. |
113 | That will limit the usefulness but on the other hand avoid | 113 | That will limit the usefulness but on the other hand avoid |
114 | the illegal configurations all over. | 114 | the illegal configurations all over. |
115 | kconfig should one day warn about such things. | ||
116 | 115 | ||
117 | - numerical ranges: "range" <symbol> <symbol> ["if" <expr>] | 116 | - numerical ranges: "range" <symbol> <symbol> ["if" <expr>] |
118 | This allows to limit the range of possible input values for int | 117 | This allows to limit the range of possible input values for int |
@@ -268,7 +267,7 @@ separate list of options. | |||
268 | 267 | ||
269 | choices: | 268 | choices: |
270 | 269 | ||
271 | "choice" | 270 | "choice" [symbol] |
272 | <choice options> | 271 | <choice options> |
273 | <choice block> | 272 | <choice block> |
274 | "endchoice" | 273 | "endchoice" |
@@ -282,6 +281,10 @@ single driver can be compiled/loaded into the kernel, but all drivers | |||
282 | can be compiled as modules. | 281 | can be compiled as modules. |
283 | A choice accepts another option "optional", which allows to set the | 282 | A choice accepts another option "optional", which allows to set the |
284 | choice to 'n' and no entry needs to be selected. | 283 | choice to 'n' and no entry needs to be selected. |
284 | If no [symbol] is associated with a choice, then you can not have multiple | ||
285 | definitions of that choice. If a [symbol] is associated to the choice, | ||
286 | then you may define the same choice (ie. with the same entries) in another | ||
287 | place. | ||
285 | 288 | ||
286 | comment: | 289 | comment: |
287 | 290 | ||
diff --git a/Documentation/kbuild/makefiles.txt b/Documentation/kbuild/makefiles.txt index 0ef00bd6e54d..86e3cd0d26a0 100644 --- a/Documentation/kbuild/makefiles.txt +++ b/Documentation/kbuild/makefiles.txt | |||
@@ -1136,6 +1136,21 @@ When kbuild executes, the following steps are followed (roughly): | |||
1136 | resulting in the target file being recompiled for no | 1136 | resulting in the target file being recompiled for no |
1137 | obvious reason. | 1137 | obvious reason. |
1138 | 1138 | ||
1139 | dtc | ||
1140 | Create flattend device tree blob object suitable for linking | ||
1141 | into vmlinux. Device tree blobs linked into vmlinux are placed | ||
1142 | in an init section in the image. Platform code *must* copy the | ||
1143 | blob to non-init memory prior to calling unflatten_device_tree(). | ||
1144 | |||
1145 | Example: | ||
1146 | #arch/x86/platform/ce4100/Makefile | ||
1147 | clean-files := *dtb.S | ||
1148 | |||
1149 | DTC_FLAGS := -p 1024 | ||
1150 | obj-y += foo.dtb.o | ||
1151 | |||
1152 | $(obj)/%.dtb: $(src)/%.dts | ||
1153 | $(call cmd,dtc) | ||
1139 | 1154 | ||
1140 | --- 6.7 Custom kbuild commands | 1155 | --- 6.7 Custom kbuild commands |
1141 | 1156 | ||
diff --git a/Documentation/kdump/kdump.txt b/Documentation/kdump/kdump.txt index cab61d842259..7a9e0b4b2903 100644 --- a/Documentation/kdump/kdump.txt +++ b/Documentation/kdump/kdump.txt | |||
@@ -65,18 +65,21 @@ Install kexec-tools | |||
65 | 65 | ||
66 | 2) Download the kexec-tools user-space package from the following URL: | 66 | 2) Download the kexec-tools user-space package from the following URL: |
67 | 67 | ||
68 | http://www.kernel.org/pub/linux/kernel/people/horms/kexec-tools/kexec-tools.tar.gz | 68 | http://kernel.org/pub/linux/utils/kernel/kexec/kexec-tools.tar.gz |
69 | 69 | ||
70 | This is a symlink to the latest version. | 70 | This is a symlink to the latest version. |
71 | 71 | ||
72 | The latest kexec-tools git tree is available at: | 72 | The latest kexec-tools git tree is available at: |
73 | 73 | ||
74 | git://git.kernel.org/pub/scm/linux/kernel/git/horms/kexec-tools.git | 74 | git://git.kernel.org/pub/scm/utils/kernel/kexec/kexec-tools.git |
75 | or | 75 | and |
76 | http://www.kernel.org/git/?p=linux/kernel/git/horms/kexec-tools.git | 76 | http://www.kernel.org/pub/scm/utils/kernel/kexec/kexec-tools.git |
77 | |||
78 | There is also a gitweb interface available at | ||
79 | http://www.kernel.org/git/?p=utils/kernel/kexec/kexec-tools.git | ||
77 | 80 | ||
78 | More information about kexec-tools can be found at | 81 | More information about kexec-tools can be found at |
79 | http://www.kernel.org/pub/linux/kernel/people/horms/kexec-tools/README.html | 82 | http://www.kernel.org/pub/linux/utils/kernel/kexec/README.html |
80 | 83 | ||
81 | 3) Unpack the tarball with the tar command, as follows: | 84 | 3) Unpack the tarball with the tar command, as follows: |
82 | 85 | ||
@@ -439,6 +442,6 @@ To Do | |||
439 | Contact | 442 | Contact |
440 | ======= | 443 | ======= |
441 | 444 | ||
442 | Vivek Goyal (vgoyal@in.ibm.com) | 445 | Vivek Goyal (vgoyal@redhat.com) |
443 | Maneesh Soni (maneesh@in.ibm.com) | 446 | Maneesh Soni (maneesh@in.ibm.com) |
444 | 447 | ||
diff --git a/Documentation/kernel-docs.txt b/Documentation/kernel-docs.txt index 715eaaf1519d..9a8674629a07 100644 --- a/Documentation/kernel-docs.txt +++ b/Documentation/kernel-docs.txt | |||
@@ -537,7 +537,7 @@ | |||
537 | Notes: Further information in | 537 | Notes: Further information in |
538 | http://www.oreilly.com/catalog/linuxdrive2/ | 538 | http://www.oreilly.com/catalog/linuxdrive2/ |
539 | 539 | ||
540 | * Title: "Linux Device Drivers, 3nd Edition" | 540 | * Title: "Linux Device Drivers, 3rd Edition" |
541 | Authors: Jonathan Corbet, Alessandro Rubini, and Greg Kroah-Hartman | 541 | Authors: Jonathan Corbet, Alessandro Rubini, and Greg Kroah-Hartman |
542 | Publisher: O'Reilly & Associates. | 542 | Publisher: O'Reilly & Associates. |
543 | Date: 2005. | 543 | Date: 2005. |
@@ -592,14 +592,6 @@ | |||
592 | Pages: 600. | 592 | Pages: 600. |
593 | ISBN: 0-13-101908-2 | 593 | ISBN: 0-13-101908-2 |
594 | 594 | ||
595 | * Title: "The Design and Implementation of the 4.4 BSD UNIX | ||
596 | Operating System" | ||
597 | Author: Marshall Kirk McKusick, Keith Bostic, Michael J. Karels, | ||
598 | John S. Quarterman. | ||
599 | Publisher: Addison-Wesley. | ||
600 | Date: 1996. | ||
601 | ISBN: 0-201-54979-4 | ||
602 | |||
603 | * Title: "Programming for the real world - POSIX.4" | 595 | * Title: "Programming for the real world - POSIX.4" |
604 | Author: Bill O. Gallmeister. | 596 | Author: Bill O. Gallmeister. |
605 | Publisher: O'Reilly & Associates, Inc.. | 597 | Publisher: O'Reilly & Associates, Inc.. |
@@ -610,28 +602,13 @@ | |||
610 | POSIX. Good reference. | 602 | POSIX. Good reference. |
611 | 603 | ||
612 | * Title: "UNIX Systems for Modern Architectures: Symmetric | 604 | * Title: "UNIX Systems for Modern Architectures: Symmetric |
613 | Multiprocesssing and Caching for Kernel Programmers" | 605 | Multiprocessing and Caching for Kernel Programmers" |
614 | Author: Curt Schimmel. | 606 | Author: Curt Schimmel. |
615 | Publisher: Addison Wesley. | 607 | Publisher: Addison Wesley. |
616 | Date: June, 1994. | 608 | Date: June, 1994. |
617 | Pages: 432. | 609 | Pages: 432. |
618 | ISBN: 0-201-63338-8 | 610 | ISBN: 0-201-63338-8 |
619 | 611 | ||
620 | * Title: "The Design and Implementation of the 4.3 BSD UNIX | ||
621 | Operating System" | ||
622 | Author: Samuel J. Leffler, Marshall Kirk McKusick, Michael J. | ||
623 | Karels, John S. Quarterman. | ||
624 | Publisher: Addison-Wesley. | ||
625 | Date: 1989 (reprinted with corrections on October, 1990). | ||
626 | ISBN: 0-201-06196-1 | ||
627 | |||
628 | * Title: "The Design of the UNIX Operating System" | ||
629 | Author: Maurice J. Bach. | ||
630 | Publisher: Prentice Hall. | ||
631 | Date: 1986. | ||
632 | Pages: 471. | ||
633 | ISBN: 0-13-201757-1 | ||
634 | |||
635 | MISCELLANEOUS: | 612 | MISCELLANEOUS: |
636 | 613 | ||
637 | * Name: linux/Documentation | 614 | * Name: linux/Documentation |
diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt index 92e83e53148f..55fe7599bc8e 100644 --- a/Documentation/kernel-parameters.txt +++ b/Documentation/kernel-parameters.txt | |||
@@ -403,6 +403,10 @@ and is between 256 and 4096 characters. It is defined in the file | |||
403 | bttv.pll= See Documentation/video4linux/bttv/Insmod-options | 403 | bttv.pll= See Documentation/video4linux/bttv/Insmod-options |
404 | bttv.tuner= and Documentation/video4linux/bttv/CARDLIST | 404 | bttv.tuner= and Documentation/video4linux/bttv/CARDLIST |
405 | 405 | ||
406 | bulk_remove=off [PPC] This parameter disables the use of the pSeries | ||
407 | firmware feature for flushing multiple hpte entries | ||
408 | at a time. | ||
409 | |||
406 | c101= [NET] Moxa C101 synchronous serial card | 410 | c101= [NET] Moxa C101 synchronous serial card |
407 | 411 | ||
408 | cachesize= [BUGS=X86-32] Override level 2 CPU cache size detection. | 412 | cachesize= [BUGS=X86-32] Override level 2 CPU cache size detection. |
@@ -655,11 +659,6 @@ and is between 256 and 4096 characters. It is defined in the file | |||
655 | 659 | ||
656 | dscc4.setup= [NET] | 660 | dscc4.setup= [NET] |
657 | 661 | ||
658 | dynamic_printk Enables pr_debug()/dev_dbg() calls if | ||
659 | CONFIG_DYNAMIC_PRINTK_DEBUG has been enabled. | ||
660 | These can also be switched on/off via | ||
661 | <debugfs>/dynamic_printk/modules | ||
662 | |||
663 | earlycon= [KNL] Output early console device and options. | 662 | earlycon= [KNL] Output early console device and options. |
664 | uart[8250],io,<addr>[,options] | 663 | uart[8250],io,<addr>[,options] |
665 | uart[8250],mmio,<addr>[,options] | 664 | uart[8250],mmio,<addr>[,options] |
@@ -884,6 +883,7 @@ and is between 256 and 4096 characters. It is defined in the file | |||
884 | controller | 883 | controller |
885 | i8042.nopnp [HW] Don't use ACPIPnP / PnPBIOS to discover KBD/AUX | 884 | i8042.nopnp [HW] Don't use ACPIPnP / PnPBIOS to discover KBD/AUX |
886 | controllers | 885 | controllers |
886 | i8042.notimeout [HW] Ignore timeout condition signalled by conroller | ||
887 | i8042.reset [HW] Reset the controller during init and cleanup | 887 | i8042.reset [HW] Reset the controller during init and cleanup |
888 | i8042.unlock [HW] Unlock (ignore) the keylock | 888 | i8042.unlock [HW] Unlock (ignore) the keylock |
889 | 889 | ||
@@ -1490,6 +1490,10 @@ and is between 256 and 4096 characters. It is defined in the file | |||
1490 | mtdparts= [MTD] | 1490 | mtdparts= [MTD] |
1491 | See drivers/mtd/cmdlinepart.c. | 1491 | See drivers/mtd/cmdlinepart.c. |
1492 | 1492 | ||
1493 | multitce=off [PPC] This parameter disables the use of the pSeries | ||
1494 | firmware feature for updating multiple TCE entries | ||
1495 | at a time. | ||
1496 | |||
1493 | onenand.bdry= [HW,MTD] Flex-OneNAND Boundary Configuration | 1497 | onenand.bdry= [HW,MTD] Flex-OneNAND Boundary Configuration |
1494 | 1498 | ||
1495 | Format: [die0_boundary][,die0_lock][,die1_boundary][,die1_lock] | 1499 | Format: [die0_boundary][,die0_lock][,die1_boundary][,die1_lock] |
@@ -1579,20 +1583,12 @@ and is between 256 and 4096 characters. It is defined in the file | |||
1579 | 1583 | ||
1580 | nmi_watchdog= [KNL,BUGS=X86] Debugging features for SMP kernels | 1584 | nmi_watchdog= [KNL,BUGS=X86] Debugging features for SMP kernels |
1581 | Format: [panic,][num] | 1585 | Format: [panic,][num] |
1582 | Valid num: 0,1,2 | 1586 | Valid num: 0 |
1583 | 0 - turn nmi_watchdog off | 1587 | 0 - turn nmi_watchdog off |
1584 | 1 - use the IO-APIC timer for the NMI watchdog | ||
1585 | 2 - use the local APIC for the NMI watchdog using | ||
1586 | a performance counter. Note: This will use one | ||
1587 | performance counter and the local APIC's performance | ||
1588 | vector. | ||
1589 | When panic is specified, panic when an NMI watchdog | 1588 | When panic is specified, panic when an NMI watchdog |
1590 | timeout occurs. | 1589 | timeout occurs. |
1591 | This is useful when you use a panic=... timeout and | 1590 | This is useful when you use a panic=... timeout and |
1592 | need the box quickly up again. | 1591 | need the box quickly up again. |
1593 | Instead of 1 and 2 it is possible to use the following | ||
1594 | symbolic names: lapic and ioapic | ||
1595 | Example: nmi_watchdog=2 or nmi_watchdog=panic,lapic | ||
1596 | 1592 | ||
1597 | netpoll.carrier_timeout= | 1593 | netpoll.carrier_timeout= |
1598 | [NET] Specifies amount of time (in seconds) that | 1594 | [NET] Specifies amount of time (in seconds) that |
@@ -1622,6 +1618,8 @@ and is between 256 and 4096 characters. It is defined in the file | |||
1622 | noapic [SMP,APIC] Tells the kernel to not make use of any | 1618 | noapic [SMP,APIC] Tells the kernel to not make use of any |
1623 | IOAPICs that may be present in the system. | 1619 | IOAPICs that may be present in the system. |
1624 | 1620 | ||
1621 | noautogroup Disable scheduler automatic task group creation. | ||
1622 | |||
1625 | nobats [PPC] Do not use BATs for mapping kernel lowmem | 1623 | nobats [PPC] Do not use BATs for mapping kernel lowmem |
1626 | on "Classic" PPC cores. | 1624 | on "Classic" PPC cores. |
1627 | 1625 | ||
@@ -1707,6 +1705,9 @@ and is between 256 and 4096 characters. It is defined in the file | |||
1707 | 1705 | ||
1708 | no-kvmclock [X86,KVM] Disable paravirtualized KVM clock driver | 1706 | no-kvmclock [X86,KVM] Disable paravirtualized KVM clock driver |
1709 | 1707 | ||
1708 | no-kvmapf [X86,KVM] Disable paravirtualized asynchronous page | ||
1709 | fault handling. | ||
1710 | |||
1710 | nolapic [X86-32,APIC] Do not enable or use the local APIC. | 1711 | nolapic [X86-32,APIC] Do not enable or use the local APIC. |
1711 | 1712 | ||
1712 | nolapic_timer [X86-32,APIC] Do not use the local APIC timer. | 1713 | nolapic_timer [X86-32,APIC] Do not use the local APIC timer. |
@@ -1759,7 +1760,7 @@ and is between 256 and 4096 characters. It is defined in the file | |||
1759 | 1760 | ||
1760 | nousb [USB] Disable the USB subsystem | 1761 | nousb [USB] Disable the USB subsystem |
1761 | 1762 | ||
1762 | nowatchdog [KNL] Disable the lockup detector. | 1763 | nowatchdog [KNL] Disable the lockup detector (NMI watchdog). |
1763 | 1764 | ||
1764 | nowb [ARM] | 1765 | nowb [ARM] |
1765 | 1766 | ||
@@ -2175,11 +2176,6 @@ and is between 256 and 4096 characters. It is defined in the file | |||
2175 | reset_devices [KNL] Force drivers to reset the underlying device | 2176 | reset_devices [KNL] Force drivers to reset the underlying device |
2176 | during initialization. | 2177 | during initialization. |
2177 | 2178 | ||
2178 | resource_alloc_from_bottom | ||
2179 | Allocate new resources from the beginning of available | ||
2180 | space, not the end. If you need to use this, please | ||
2181 | report a bug. | ||
2182 | |||
2183 | resume= [SWSUSP] | 2179 | resume= [SWSUSP] |
2184 | Specify the partition device for software suspend | 2180 | Specify the partition device for software suspend |
2185 | 2181 | ||
@@ -2385,6 +2381,11 @@ and is between 256 and 4096 characters. It is defined in the file | |||
2385 | improve throughput, but will also increase the | 2381 | improve throughput, but will also increase the |
2386 | amount of memory reserved for use by the client. | 2382 | amount of memory reserved for use by the client. |
2387 | 2383 | ||
2384 | swapaccount[=0|1] | ||
2385 | [KNL] Enable accounting of swap in memory resource | ||
2386 | controller if no parameter or 1 is given or disable | ||
2387 | it if 0 is given (See Documentation/cgroups/memory.txt) | ||
2388 | |||
2388 | swiotlb= [IA-64] Number of I/O TLB slabs | 2389 | swiotlb= [IA-64] Number of I/O TLB slabs |
2389 | 2390 | ||
2390 | switches= [HW,M68k] | 2391 | switches= [HW,M68k] |
@@ -2467,12 +2468,13 @@ and is between 256 and 4096 characters. It is defined in the file | |||
2467 | to facilitate early boot debugging. | 2468 | to facilitate early boot debugging. |
2468 | See also Documentation/trace/events.txt | 2469 | See also Documentation/trace/events.txt |
2469 | 2470 | ||
2470 | tsc= Disable clocksource-must-verify flag for TSC. | 2471 | tsc= Disable clocksource stability checks for TSC. |
2471 | Format: <string> | 2472 | Format: <string> |
2472 | [x86] reliable: mark tsc clocksource as reliable, this | 2473 | [x86] reliable: mark tsc clocksource as reliable, this |
2473 | disables clocksource verification at runtime. | 2474 | disables clocksource verification at runtime, as well |
2474 | Used to enable high-resolution timer mode on older | 2475 | as the stability checks done at bootup. Used to enable |
2475 | hardware, and in virtualized environment. | 2476 | high-resolution timer mode on older hardware, and in |
2477 | virtualized environment. | ||
2476 | [x86] noirqtime: Do not use TSC to do irq accounting. | 2478 | [x86] noirqtime: Do not use TSC to do irq accounting. |
2477 | Used to run time disable IRQ_TIME_ACCOUNTING on any | 2479 | Used to run time disable IRQ_TIME_ACCOUNTING on any |
2478 | platforms where RDTSC is slow and this accounting | 2480 | platforms where RDTSC is slow and this accounting |
diff --git a/Documentation/keys-trusted-encrypted.txt b/Documentation/keys-trusted-encrypted.txt new file mode 100644 index 000000000000..8fb79bc1ac4b --- /dev/null +++ b/Documentation/keys-trusted-encrypted.txt | |||
@@ -0,0 +1,145 @@ | |||
1 | Trusted and Encrypted Keys | ||
2 | |||
3 | Trusted and Encrypted Keys are two new key types added to the existing kernel | ||
4 | key ring service. Both of these new types are variable length symmetic keys, | ||
5 | and in both cases all keys are created in the kernel, and user space sees, | ||
6 | stores, and loads only encrypted blobs. Trusted Keys require the availability | ||
7 | of a Trusted Platform Module (TPM) chip for greater security, while Encrypted | ||
8 | Keys can be used on any system. All user level blobs, are displayed and loaded | ||
9 | in hex ascii for convenience, and are integrity verified. | ||
10 | |||
11 | Trusted Keys use a TPM both to generate and to seal the keys. Keys are sealed | ||
12 | under a 2048 bit RSA key in the TPM, and optionally sealed to specified PCR | ||
13 | (integrity measurement) values, and only unsealed by the TPM, if PCRs and blob | ||
14 | integrity verifications match. A loaded Trusted Key can be updated with new | ||
15 | (future) PCR values, so keys are easily migrated to new pcr values, such as | ||
16 | when the kernel and initramfs are updated. The same key can have many saved | ||
17 | blobs under different PCR values, so multiple boots are easily supported. | ||
18 | |||
19 | By default, trusted keys are sealed under the SRK, which has the default | ||
20 | authorization value (20 zeros). This can be set at takeownership time with the | ||
21 | trouser's utility: "tpm_takeownership -u -z". | ||
22 | |||
23 | Usage: | ||
24 | keyctl add trusted name "new keylen [options]" ring | ||
25 | keyctl add trusted name "load hex_blob [pcrlock=pcrnum]" ring | ||
26 | keyctl update key "update [options]" | ||
27 | keyctl print keyid | ||
28 | |||
29 | options: | ||
30 | keyhandle= ascii hex value of sealing key default 0x40000000 (SRK) | ||
31 | keyauth= ascii hex auth for sealing key default 0x00...i | ||
32 | (40 ascii zeros) | ||
33 | blobauth= ascii hex auth for sealed data default 0x00... | ||
34 | (40 ascii zeros) | ||
35 | blobauth= ascii hex auth for sealed data default 0x00... | ||
36 | (40 ascii zeros) | ||
37 | pcrinfo= ascii hex of PCR_INFO or PCR_INFO_LONG (no default) | ||
38 | pcrlock= pcr number to be extended to "lock" blob | ||
39 | migratable= 0|1 indicating permission to reseal to new PCR values, | ||
40 | default 1 (resealing allowed) | ||
41 | |||
42 | "keyctl print" returns an ascii hex copy of the sealed key, which is in standard | ||
43 | TPM_STORED_DATA format. The key length for new keys are always in bytes. | ||
44 | Trusted Keys can be 32 - 128 bytes (256 - 1024 bits), the upper limit is to fit | ||
45 | within the 2048 bit SRK (RSA) keylength, with all necessary structure/padding. | ||
46 | |||
47 | Encrypted keys do not depend on a TPM, and are faster, as they use AES for | ||
48 | encryption/decryption. New keys are created from kernel generated random | ||
49 | numbers, and are encrypted/decrypted using a specified 'master' key. The | ||
50 | 'master' key can either be a trusted-key or user-key type. The main | ||
51 | disadvantage of encrypted keys is that if they are not rooted in a trusted key, | ||
52 | they are only as secure as the user key encrypting them. The master user key | ||
53 | should therefore be loaded in as secure a way as possible, preferably early in | ||
54 | boot. | ||
55 | |||
56 | Usage: | ||
57 | keyctl add encrypted name "new key-type:master-key-name keylen" ring | ||
58 | keyctl add encrypted name "load hex_blob" ring | ||
59 | keyctl update keyid "update key-type:master-key-name" | ||
60 | |||
61 | where 'key-type' is either 'trusted' or 'user'. | ||
62 | |||
63 | Examples of trusted and encrypted key usage: | ||
64 | |||
65 | Create and save a trusted key named "kmk" of length 32 bytes: | ||
66 | |||
67 | $ keyctl add trusted kmk "new 32" @u | ||
68 | 440502848 | ||
69 | |||
70 | $ keyctl show | ||
71 | Session Keyring | ||
72 | -3 --alswrv 500 500 keyring: _ses | ||
73 | 97833714 --alswrv 500 -1 \_ keyring: _uid.500 | ||
74 | 440502848 --alswrv 500 500 \_ trusted: kmk | ||
75 | |||
76 | $ keyctl print 440502848 | ||
77 | 0101000000000000000001005d01b7e3f4a6be5709930f3b70a743cbb42e0cc95e18e915 | ||
78 | 3f60da455bbf1144ad12e4f92b452f966929f6105fd29ca28e4d4d5a031d068478bacb0b | ||
79 | 27351119f822911b0a11ba3d3498ba6a32e50dac7f32894dd890eb9ad578e4e292c83722 | ||
80 | a52e56a097e6a68b3f56f7a52ece0cdccba1eb62cad7d817f6dc58898b3ac15f36026fec | ||
81 | d568bd4a706cb60bb37be6d8f1240661199d640b66fb0fe3b079f97f450b9ef9c22c6d5d | ||
82 | dd379f0facd1cd020281dfa3c70ba21a3fa6fc2471dc6d13ecf8298b946f65345faa5ef0 | ||
83 | f1f8fff03ad0acb083725535636addb08d73dedb9832da198081e5deae84bfaf0409c22b | ||
84 | e4a8aea2b607ec96931e6f4d4fe563ba | ||
85 | |||
86 | $ keyctl pipe 440502848 > kmk.blob | ||
87 | |||
88 | Load a trusted key from the saved blob: | ||
89 | |||
90 | $ keyctl add trusted kmk "load `cat kmk.blob`" @u | ||
91 | 268728824 | ||
92 | |||
93 | $ keyctl print 268728824 | ||
94 | 0101000000000000000001005d01b7e3f4a6be5709930f3b70a743cbb42e0cc95e18e915 | ||
95 | 3f60da455bbf1144ad12e4f92b452f966929f6105fd29ca28e4d4d5a031d068478bacb0b | ||
96 | 27351119f822911b0a11ba3d3498ba6a32e50dac7f32894dd890eb9ad578e4e292c83722 | ||
97 | a52e56a097e6a68b3f56f7a52ece0cdccba1eb62cad7d817f6dc58898b3ac15f36026fec | ||
98 | d568bd4a706cb60bb37be6d8f1240661199d640b66fb0fe3b079f97f450b9ef9c22c6d5d | ||
99 | dd379f0facd1cd020281dfa3c70ba21a3fa6fc2471dc6d13ecf8298b946f65345faa5ef0 | ||
100 | f1f8fff03ad0acb083725535636addb08d73dedb9832da198081e5deae84bfaf0409c22b | ||
101 | e4a8aea2b607ec96931e6f4d4fe563ba | ||
102 | |||
103 | Reseal a trusted key under new pcr values: | ||
104 | |||
105 | $ keyctl update 268728824 "update pcrinfo=`cat pcr.blob`" | ||
106 | $ keyctl print 268728824 | ||
107 | 010100000000002c0002800093c35a09b70fff26e7a98ae786c641e678ec6ffb6b46d805 | ||
108 | 77c8a6377aed9d3219c6dfec4b23ffe3000001005d37d472ac8a44023fbb3d18583a4f73 | ||
109 | d3a076c0858f6f1dcaa39ea0f119911ff03f5406df4f7f27f41da8d7194f45c9f4e00f2e | ||
110 | df449f266253aa3f52e55c53de147773e00f0f9aca86c64d94c95382265968c354c5eab4 | ||
111 | 9638c5ae99c89de1e0997242edfb0b501744e11ff9762dfd951cffd93227cc513384e7e6 | ||
112 | e782c29435c7ec2edafaa2f4c1fe6e7a781b59549ff5296371b42133777dcc5b8b971610 | ||
113 | 94bc67ede19e43ddb9dc2baacad374a36feaf0314d700af0a65c164b7082401740e489c9 | ||
114 | 7ef6a24defe4846104209bf0c3eced7fa1a672ed5b125fc9d8cd88b476a658a4434644ef | ||
115 | df8ae9a178e9f83ba9f08d10fa47e4226b98b0702f06b3b8 | ||
116 | |||
117 | Create and save an encrypted key "evm" using the above trusted key "kmk": | ||
118 | |||
119 | $ keyctl add encrypted evm "new trusted:kmk 32" @u | ||
120 | 159771175 | ||
121 | |||
122 | $ keyctl print 159771175 | ||
123 | trusted:kmk 32 2375725ad57798846a9bbd240de8906f006e66c03af53b1b382dbbc55 | ||
124 | be2a44616e4959430436dc4f2a7a9659aa60bb4652aeb2120f149ed197c564e024717c64 | ||
125 | 5972dcb82ab2dde83376d82b2e3c09ffc | ||
126 | |||
127 | $ keyctl pipe 159771175 > evm.blob | ||
128 | |||
129 | Load an encrypted key "evm" from saved blob: | ||
130 | |||
131 | $ keyctl add encrypted evm "load `cat evm.blob`" @u | ||
132 | 831684262 | ||
133 | |||
134 | $ keyctl print 831684262 | ||
135 | trusted:kmk 32 2375725ad57798846a9bbd240de8906f006e66c03af53b1b382dbbc55 | ||
136 | be2a44616e4959430436dc4f2a7a9659aa60bb4652aeb2120f149ed197c564e024717c64 | ||
137 | 5972dcb82ab2dde83376d82b2e3c09ffc | ||
138 | |||
139 | |||
140 | The initial consumer of trusted keys is EVM, which at boot time needs a high | ||
141 | quality symmetric key for HMAC protection of file metadata. The use of a | ||
142 | trusted key provides strong guarantees that the EVM key has not been | ||
143 | compromised by a user level problem, and when sealed to specific boot PCR | ||
144 | values, protects against boot and offline attacks. Other uses for trusted and | ||
145 | encrypted keys, such as for disk and file encryption are anticipated. | ||
diff --git a/Documentation/ko_KR/HOWTO b/Documentation/ko_KR/HOWTO index e3a55b6091e9..ab5189ae3428 100644 --- a/Documentation/ko_KR/HOWTO +++ b/Documentation/ko_KR/HOWTO | |||
@@ -391,8 +391,8 @@ bugme-new 메일링 리스트나(새로운 버그 리포트들만이 이곳에 | |||
391 | bugme-janitor 메일링 리스트(bugzilla에 모든 변화들이 여기서 메일로 전해진다) | 391 | bugme-janitor 메일링 리스트(bugzilla에 모든 변화들이 여기서 메일로 전해진다) |
392 | 에 등록하면 된다. | 392 | 에 등록하면 된다. |
393 | 393 | ||
394 | http://lists.osdl.org/mailman/listinfo/bugme-new | 394 | https://lists.linux-foundation.org/mailman/listinfo/bugme-new |
395 | http://lists.osdl.org/mailman/listinfo/bugme-janitors | 395 | https://lists.linux-foundation.org/mailman/listinfo/bugme-janitors |
396 | 396 | ||
397 | 397 | ||
398 | 398 | ||
diff --git a/Documentation/kprobes.txt b/Documentation/kprobes.txt index 741fe66d6eca..0cfb00fd86ff 100644 --- a/Documentation/kprobes.txt +++ b/Documentation/kprobes.txt | |||
@@ -598,7 +598,7 @@ a 5-byte jump instruction. So there are several limitations. | |||
598 | a) The instructions in DCR must be relocatable. | 598 | a) The instructions in DCR must be relocatable. |
599 | b) The instructions in DCR must not include a call instruction. | 599 | b) The instructions in DCR must not include a call instruction. |
600 | c) JTPR must not be targeted by any jump or call instruction. | 600 | c) JTPR must not be targeted by any jump or call instruction. |
601 | d) DCR must not straddle the border betweeen functions. | 601 | d) DCR must not straddle the border between functions. |
602 | 602 | ||
603 | Anyway, these limitations are checked by the in-kernel instruction | 603 | Anyway, these limitations are checked by the in-kernel instruction |
604 | decoder, so you don't need to worry about that. | 604 | decoder, so you don't need to worry about that. |
diff --git a/Documentation/kvm/api.txt b/Documentation/kvm/api.txt index b336266bea5e..ad85797c1cf0 100644 --- a/Documentation/kvm/api.txt +++ b/Documentation/kvm/api.txt | |||
@@ -874,7 +874,7 @@ Possible values are: | |||
874 | - KVM_MP_STATE_HALTED: the vcpu has executed a HLT instruction and | 874 | - KVM_MP_STATE_HALTED: the vcpu has executed a HLT instruction and |
875 | is waiting for an interrupt | 875 | is waiting for an interrupt |
876 | - KVM_MP_STATE_SIPI_RECEIVED: the vcpu has just received a SIPI (vector | 876 | - KVM_MP_STATE_SIPI_RECEIVED: the vcpu has just received a SIPI (vector |
877 | accesible via KVM_GET_VCPU_EVENTS) | 877 | accessible via KVM_GET_VCPU_EVENTS) |
878 | 878 | ||
879 | This ioctl is only useful after KVM_CREATE_IRQCHIP. Without an in-kernel | 879 | This ioctl is only useful after KVM_CREATE_IRQCHIP. Without an in-kernel |
880 | irqchip, the multiprocessing state must be maintained by userspace. | 880 | irqchip, the multiprocessing state must be maintained by userspace. |
@@ -1085,6 +1085,184 @@ of 4 instructions that make up a hypercall. | |||
1085 | If any additional field gets added to this structure later on, a bit for that | 1085 | If any additional field gets added to this structure later on, a bit for that |
1086 | additional piece of information will be set in the flags bitmap. | 1086 | additional piece of information will be set in the flags bitmap. |
1087 | 1087 | ||
1088 | 4.47 KVM_ASSIGN_PCI_DEVICE | ||
1089 | |||
1090 | Capability: KVM_CAP_DEVICE_ASSIGNMENT | ||
1091 | Architectures: x86 ia64 | ||
1092 | Type: vm ioctl | ||
1093 | Parameters: struct kvm_assigned_pci_dev (in) | ||
1094 | Returns: 0 on success, -1 on error | ||
1095 | |||
1096 | Assigns a host PCI device to the VM. | ||
1097 | |||
1098 | struct kvm_assigned_pci_dev { | ||
1099 | __u32 assigned_dev_id; | ||
1100 | __u32 busnr; | ||
1101 | __u32 devfn; | ||
1102 | __u32 flags; | ||
1103 | __u32 segnr; | ||
1104 | union { | ||
1105 | __u32 reserved[11]; | ||
1106 | }; | ||
1107 | }; | ||
1108 | |||
1109 | The PCI device is specified by the triple segnr, busnr, and devfn. | ||
1110 | Identification in succeeding service requests is done via assigned_dev_id. The | ||
1111 | following flags are specified: | ||
1112 | |||
1113 | /* Depends on KVM_CAP_IOMMU */ | ||
1114 | #define KVM_DEV_ASSIGN_ENABLE_IOMMU (1 << 0) | ||
1115 | |||
1116 | 4.48 KVM_DEASSIGN_PCI_DEVICE | ||
1117 | |||
1118 | Capability: KVM_CAP_DEVICE_DEASSIGNMENT | ||
1119 | Architectures: x86 ia64 | ||
1120 | Type: vm ioctl | ||
1121 | Parameters: struct kvm_assigned_pci_dev (in) | ||
1122 | Returns: 0 on success, -1 on error | ||
1123 | |||
1124 | Ends PCI device assignment, releasing all associated resources. | ||
1125 | |||
1126 | See KVM_CAP_DEVICE_ASSIGNMENT for the data structure. Only assigned_dev_id is | ||
1127 | used in kvm_assigned_pci_dev to identify the device. | ||
1128 | |||
1129 | 4.49 KVM_ASSIGN_DEV_IRQ | ||
1130 | |||
1131 | Capability: KVM_CAP_ASSIGN_DEV_IRQ | ||
1132 | Architectures: x86 ia64 | ||
1133 | Type: vm ioctl | ||
1134 | Parameters: struct kvm_assigned_irq (in) | ||
1135 | Returns: 0 on success, -1 on error | ||
1136 | |||
1137 | Assigns an IRQ to a passed-through device. | ||
1138 | |||
1139 | struct kvm_assigned_irq { | ||
1140 | __u32 assigned_dev_id; | ||
1141 | __u32 host_irq; | ||
1142 | __u32 guest_irq; | ||
1143 | __u32 flags; | ||
1144 | union { | ||
1145 | struct { | ||
1146 | __u32 addr_lo; | ||
1147 | __u32 addr_hi; | ||
1148 | __u32 data; | ||
1149 | } guest_msi; | ||
1150 | __u32 reserved[12]; | ||
1151 | }; | ||
1152 | }; | ||
1153 | |||
1154 | The following flags are defined: | ||
1155 | |||
1156 | #define KVM_DEV_IRQ_HOST_INTX (1 << 0) | ||
1157 | #define KVM_DEV_IRQ_HOST_MSI (1 << 1) | ||
1158 | #define KVM_DEV_IRQ_HOST_MSIX (1 << 2) | ||
1159 | |||
1160 | #define KVM_DEV_IRQ_GUEST_INTX (1 << 8) | ||
1161 | #define KVM_DEV_IRQ_GUEST_MSI (1 << 9) | ||
1162 | #define KVM_DEV_IRQ_GUEST_MSIX (1 << 10) | ||
1163 | |||
1164 | It is not valid to specify multiple types per host or guest IRQ. However, the | ||
1165 | IRQ type of host and guest can differ or can even be null. | ||
1166 | |||
1167 | 4.50 KVM_DEASSIGN_DEV_IRQ | ||
1168 | |||
1169 | Capability: KVM_CAP_ASSIGN_DEV_IRQ | ||
1170 | Architectures: x86 ia64 | ||
1171 | Type: vm ioctl | ||
1172 | Parameters: struct kvm_assigned_irq (in) | ||
1173 | Returns: 0 on success, -1 on error | ||
1174 | |||
1175 | Ends an IRQ assignment to a passed-through device. | ||
1176 | |||
1177 | See KVM_ASSIGN_DEV_IRQ for the data structure. The target device is specified | ||
1178 | by assigned_dev_id, flags must correspond to the IRQ type specified on | ||
1179 | KVM_ASSIGN_DEV_IRQ. Partial deassignment of host or guest IRQ is allowed. | ||
1180 | |||
1181 | 4.51 KVM_SET_GSI_ROUTING | ||
1182 | |||
1183 | Capability: KVM_CAP_IRQ_ROUTING | ||
1184 | Architectures: x86 ia64 | ||
1185 | Type: vm ioctl | ||
1186 | Parameters: struct kvm_irq_routing (in) | ||
1187 | Returns: 0 on success, -1 on error | ||
1188 | |||
1189 | Sets the GSI routing table entries, overwriting any previously set entries. | ||
1190 | |||
1191 | struct kvm_irq_routing { | ||
1192 | __u32 nr; | ||
1193 | __u32 flags; | ||
1194 | struct kvm_irq_routing_entry entries[0]; | ||
1195 | }; | ||
1196 | |||
1197 | No flags are specified so far, the corresponding field must be set to zero. | ||
1198 | |||
1199 | struct kvm_irq_routing_entry { | ||
1200 | __u32 gsi; | ||
1201 | __u32 type; | ||
1202 | __u32 flags; | ||
1203 | __u32 pad; | ||
1204 | union { | ||
1205 | struct kvm_irq_routing_irqchip irqchip; | ||
1206 | struct kvm_irq_routing_msi msi; | ||
1207 | __u32 pad[8]; | ||
1208 | } u; | ||
1209 | }; | ||
1210 | |||
1211 | /* gsi routing entry types */ | ||
1212 | #define KVM_IRQ_ROUTING_IRQCHIP 1 | ||
1213 | #define KVM_IRQ_ROUTING_MSI 2 | ||
1214 | |||
1215 | No flags are specified so far, the corresponding field must be set to zero. | ||
1216 | |||
1217 | struct kvm_irq_routing_irqchip { | ||
1218 | __u32 irqchip; | ||
1219 | __u32 pin; | ||
1220 | }; | ||
1221 | |||
1222 | struct kvm_irq_routing_msi { | ||
1223 | __u32 address_lo; | ||
1224 | __u32 address_hi; | ||
1225 | __u32 data; | ||
1226 | __u32 pad; | ||
1227 | }; | ||
1228 | |||
1229 | 4.52 KVM_ASSIGN_SET_MSIX_NR | ||
1230 | |||
1231 | Capability: KVM_CAP_DEVICE_MSIX | ||
1232 | Architectures: x86 ia64 | ||
1233 | Type: vm ioctl | ||
1234 | Parameters: struct kvm_assigned_msix_nr (in) | ||
1235 | Returns: 0 on success, -1 on error | ||
1236 | |||
1237 | Set the number of MSI-X interrupts for an assigned device. This service can | ||
1238 | only be called once in the lifetime of an assigned device. | ||
1239 | |||
1240 | struct kvm_assigned_msix_nr { | ||
1241 | __u32 assigned_dev_id; | ||
1242 | __u16 entry_nr; | ||
1243 | __u16 padding; | ||
1244 | }; | ||
1245 | |||
1246 | #define KVM_MAX_MSIX_PER_DEV 256 | ||
1247 | |||
1248 | 4.53 KVM_ASSIGN_SET_MSIX_ENTRY | ||
1249 | |||
1250 | Capability: KVM_CAP_DEVICE_MSIX | ||
1251 | Architectures: x86 ia64 | ||
1252 | Type: vm ioctl | ||
1253 | Parameters: struct kvm_assigned_msix_entry (in) | ||
1254 | Returns: 0 on success, -1 on error | ||
1255 | |||
1256 | Specifies the routing of an MSI-X assigned device interrupt to a GSI. Setting | ||
1257 | the GSI vector to zero means disabling the interrupt. | ||
1258 | |||
1259 | struct kvm_assigned_msix_entry { | ||
1260 | __u32 assigned_dev_id; | ||
1261 | __u32 gsi; | ||
1262 | __u16 entry; /* The index of entry in the MSI-X table */ | ||
1263 | __u16 padding[3]; | ||
1264 | }; | ||
1265 | |||
1088 | 5. The kvm_run structure | 1266 | 5. The kvm_run structure |
1089 | 1267 | ||
1090 | Application code obtains a pointer to the kvm_run structure by | 1268 | Application code obtains a pointer to the kvm_run structure by |
diff --git a/Documentation/kvm/cpuid.txt b/Documentation/kvm/cpuid.txt index 14a12ea92b7f..882068538c9c 100644 --- a/Documentation/kvm/cpuid.txt +++ b/Documentation/kvm/cpuid.txt | |||
@@ -36,6 +36,9 @@ KVM_FEATURE_MMU_OP || 2 || deprecated. | |||
36 | KVM_FEATURE_CLOCKSOURCE2 || 3 || kvmclock available at msrs | 36 | KVM_FEATURE_CLOCKSOURCE2 || 3 || kvmclock available at msrs |
37 | || || 0x4b564d00 and 0x4b564d01 | 37 | || || 0x4b564d00 and 0x4b564d01 |
38 | ------------------------------------------------------------------------------ | 38 | ------------------------------------------------------------------------------ |
39 | KVM_FEATURE_ASYNC_PF || 4 || async pf can be enabled by | ||
40 | || || writing to msr 0x4b564d02 | ||
41 | ------------------------------------------------------------------------------ | ||
39 | KVM_FEATURE_CLOCKSOURCE_STABLE_BIT || 24 || host will warn if no guest-side | 42 | KVM_FEATURE_CLOCKSOURCE_STABLE_BIT || 24 || host will warn if no guest-side |
40 | || || per-cpu warps are expected in | 43 | || || per-cpu warps are expected in |
41 | || || kvmclock. | 44 | || || kvmclock. |
diff --git a/Documentation/kvm/msr.txt b/Documentation/kvm/msr.txt index 8ddcfe84c09a..d079aed27e03 100644 --- a/Documentation/kvm/msr.txt +++ b/Documentation/kvm/msr.txt | |||
@@ -3,7 +3,6 @@ Glauber Costa <glommer@redhat.com>, Red Hat Inc, 2010 | |||
3 | ===================================================== | 3 | ===================================================== |
4 | 4 | ||
5 | KVM makes use of some custom MSRs to service some requests. | 5 | KVM makes use of some custom MSRs to service some requests. |
6 | At present, this facility is only used by kvmclock. | ||
7 | 6 | ||
8 | Custom MSRs have a range reserved for them, that goes from | 7 | Custom MSRs have a range reserved for them, that goes from |
9 | 0x4b564d00 to 0x4b564dff. There are MSRs outside this area, | 8 | 0x4b564d00 to 0x4b564dff. There are MSRs outside this area, |
@@ -151,3 +150,38 @@ MSR_KVM_SYSTEM_TIME: 0x12 | |||
151 | return PRESENT; | 150 | return PRESENT; |
152 | } else | 151 | } else |
153 | return NON_PRESENT; | 152 | return NON_PRESENT; |
153 | |||
154 | MSR_KVM_ASYNC_PF_EN: 0x4b564d02 | ||
155 | data: Bits 63-6 hold 64-byte aligned physical address of a | ||
156 | 64 byte memory area which must be in guest RAM and must be | ||
157 | zeroed. Bits 5-2 are reserved and should be zero. Bit 0 is 1 | ||
158 | when asynchronous page faults are enabled on the vcpu 0 when | ||
159 | disabled. Bit 2 is 1 if asynchronous page faults can be injected | ||
160 | when vcpu is in cpl == 0. | ||
161 | |||
162 | First 4 byte of 64 byte memory location will be written to by | ||
163 | the hypervisor at the time of asynchronous page fault (APF) | ||
164 | injection to indicate type of asynchronous page fault. Value | ||
165 | of 1 means that the page referred to by the page fault is not | ||
166 | present. Value 2 means that the page is now available. Disabling | ||
167 | interrupt inhibits APFs. Guest must not enable interrupt | ||
168 | before the reason is read, or it may be overwritten by another | ||
169 | APF. Since APF uses the same exception vector as regular page | ||
170 | fault guest must reset the reason to 0 before it does | ||
171 | something that can generate normal page fault. If during page | ||
172 | fault APF reason is 0 it means that this is regular page | ||
173 | fault. | ||
174 | |||
175 | During delivery of type 1 APF cr2 contains a token that will | ||
176 | be used to notify a guest when missing page becomes | ||
177 | available. When page becomes available type 2 APF is sent with | ||
178 | cr2 set to the token associated with the page. There is special | ||
179 | kind of token 0xffffffff which tells vcpu that it should wake | ||
180 | up all processes waiting for APFs and no individual type 2 APFs | ||
181 | will be sent. | ||
182 | |||
183 | If APF is disabled while there are outstanding APFs, they will | ||
184 | not be delivered. | ||
185 | |||
186 | Currently type 2 APF will be always delivered on the same vcpu as | ||
187 | type 1 was, but guest should not rely on that. | ||
diff --git a/Documentation/lguest/lguest.txt b/Documentation/lguest/lguest.txt index efb3a6a045a2..6ccaf8e1a00e 100644 --- a/Documentation/lguest/lguest.txt +++ b/Documentation/lguest/lguest.txt | |||
@@ -111,8 +111,11 @@ Running Lguest: | |||
111 | 111 | ||
112 | Then use --tunnet=bridge:lg0 when launching the guest. | 112 | Then use --tunnet=bridge:lg0 when launching the guest. |
113 | 113 | ||
114 | See http://linux-net.osdl.org/index.php/Bridge for general information | 114 | See: |
115 | on how to get bridging working. | 115 | |
116 | http://www.linuxfoundation.org/collaborate/workgroups/networking/bridge | ||
117 | |||
118 | for general information on how to get bridging to work. | ||
116 | 119 | ||
117 | There is a helpful mailing list at http://ozlabs.org/mailman/listinfo/lguest | 120 | There is a helpful mailing list at http://ozlabs.org/mailman/listinfo/lguest |
118 | 121 | ||
diff --git a/Documentation/magic-number.txt b/Documentation/magic-number.txt index 505f19607542..4b12abcb2ad3 100644 --- a/Documentation/magic-number.txt +++ b/Documentation/magic-number.txt | |||
@@ -150,7 +150,7 @@ NBD_REPLY_MAGIC 0x96744668 nbd_reply include/linux/nbd.h | |||
150 | STL_BOARDMAGIC 0xa2267f52 stlbrd include/linux/stallion.h | 150 | STL_BOARDMAGIC 0xa2267f52 stlbrd include/linux/stallion.h |
151 | ENI155_MAGIC 0xa54b872d midway_eprom drivers/atm/eni.h | 151 | ENI155_MAGIC 0xa54b872d midway_eprom drivers/atm/eni.h |
152 | SCI_MAGIC 0xbabeface gs_port drivers/char/sh-sci.h | 152 | SCI_MAGIC 0xbabeface gs_port drivers/char/sh-sci.h |
153 | CODA_MAGIC 0xC0DAC0DA coda_file_info include/linux/coda_fs_i.h | 153 | CODA_MAGIC 0xC0DAC0DA coda_file_info fs/coda/coda_fs_i.h |
154 | DPMEM_MAGIC 0xc0ffee11 gdt_pci_sram drivers/scsi/gdth.h | 154 | DPMEM_MAGIC 0xc0ffee11 gdt_pci_sram drivers/scsi/gdth.h |
155 | STLI_PORTMAGIC 0xe671c7a1 stliport include/linux/istallion.h | 155 | STLI_PORTMAGIC 0xe671c7a1 stliport include/linux/istallion.h |
156 | YAM_MAGIC 0xF10A7654 yam_port drivers/net/hamradio/yam.c | 156 | YAM_MAGIC 0xF10A7654 yam_port drivers/net/hamradio/yam.c |
diff --git a/Documentation/make/headers_install.txt b/Documentation/make/headers_install.txt index f2481cabffcb..951eb9f1e040 100644 --- a/Documentation/make/headers_install.txt +++ b/Documentation/make/headers_install.txt | |||
@@ -39,8 +39,9 @@ INSTALL_HDR_PATH indicates where to install the headers. It defaults to | |||
39 | The command "make headers_install_all" exports headers for all architectures | 39 | The command "make headers_install_all" exports headers for all architectures |
40 | simultaneously. (This is mostly of interest to distribution maintainers, | 40 | simultaneously. (This is mostly of interest to distribution maintainers, |
41 | who create an architecture-independent tarball from the resulting include | 41 | who create an architecture-independent tarball from the resulting include |
42 | directory.) Remember to provide the appropriate linux/asm directory via "mv" | 42 | directory.) You also can use HDR_ARCH_LIST to specify list of architectures. |
43 | or "ln -s" before building a C library with headers exported this way. | 43 | Remember to provide the appropriate linux/asm directory via "mv" or "ln -s" |
44 | before building a C library with headers exported this way. | ||
44 | 45 | ||
45 | The kernel header export infrastructure is maintained by David Woodhouse | 46 | The kernel header export infrastructure is maintained by David Woodhouse |
46 | <dwmw2@infradead.org>. | 47 | <dwmw2@infradead.org>. |
diff --git a/Documentation/networking/LICENSE.qlcnic b/Documentation/networking/LICENSE.qlcnic new file mode 100644 index 000000000000..29ad4b106420 --- /dev/null +++ b/Documentation/networking/LICENSE.qlcnic | |||
@@ -0,0 +1,327 @@ | |||
1 | Copyright (c) 2009-2010 QLogic Corporation | ||
2 | QLogic Linux qlcnic NIC Driver | ||
3 | |||
4 | This program includes a device driver for Linux 2.6 that may be | ||
5 | distributed with QLogic hardware specific firmware binary file. | ||
6 | You may modify and redistribute the device driver code under the | ||
7 | GNU General Public License (a copy of which is attached hereto as | ||
8 | Exhibit A) published by the Free Software Foundation (version 2). | ||
9 | |||
10 | You may redistribute the hardware specific firmware binary file | ||
11 | under the following terms: | ||
12 | |||
13 | 1. Redistribution of source code (only if applicable), | ||
14 | must retain the above copyright notice, this list of | ||
15 | conditions and the following disclaimer. | ||
16 | |||
17 | 2. Redistribution in binary form must reproduce the above | ||
18 | copyright notice, this list of conditions and the | ||
19 | following disclaimer in the documentation and/or other | ||
20 | materials provided with the distribution. | ||
21 | |||
22 | 3. The name of QLogic Corporation may not be used to | ||
23 | endorse or promote products derived from this software | ||
24 | without specific prior written permission | ||
25 | |||
26 | REGARDLESS OF WHAT LICENSING MECHANISM IS USED OR APPLICABLE, | ||
27 | THIS PROGRAM IS PROVIDED BY QLOGIC CORPORATION "AS IS'' AND ANY | ||
28 | EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
29 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A | ||
30 | PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR | ||
31 | BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, | ||
32 | EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED | ||
33 | TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | ||
34 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON | ||
35 | ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, | ||
36 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||
37 | OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | ||
38 | POSSIBILITY OF SUCH DAMAGE. | ||
39 | |||
40 | USER ACKNOWLEDGES AND AGREES THAT USE OF THIS PROGRAM WILL NOT | ||
41 | CREATE OR GIVE GROUNDS FOR A LICENSE BY IMPLICATION, ESTOPPEL, OR | ||
42 | OTHERWISE IN ANY INTELLECTUAL PROPERTY RIGHTS (PATENT, COPYRIGHT, | ||
43 | TRADE SECRET, MASK WORK, OR OTHER PROPRIETARY RIGHT) EMBODIED IN | ||
44 | ANY OTHER QLOGIC HARDWARE OR SOFTWARE EITHER SOLELY OR IN | ||
45 | COMBINATION WITH THIS PROGRAM. | ||
46 | |||
47 | |||
48 | EXHIBIT A | ||
49 | |||
50 | GNU GENERAL PUBLIC LICENSE | ||
51 | Version 2, June 1991 | ||
52 | |||
53 | Copyright (C) 1989, 1991 Free Software Foundation, Inc. | ||
54 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA | ||
55 | Everyone is permitted to copy and distribute verbatim copies | ||
56 | of this license document, but changing it is not allowed. | ||
57 | |||
58 | Preamble | ||
59 | |||
60 | The licenses for most software are designed to take away your | ||
61 | freedom to share and change it. By contrast, the GNU General Public | ||
62 | License is intended to guarantee your freedom to share and change free | ||
63 | software--to make sure the software is free for all its users. This | ||
64 | General Public License applies to most of the Free Software | ||
65 | Foundation's software and to any other program whose authors commit to | ||
66 | using it. (Some other Free Software Foundation software is covered by | ||
67 | the GNU Lesser General Public License instead.) You can apply it to | ||
68 | your programs, too. | ||
69 | |||
70 | When we speak of free software, we are referring to freedom, not | ||
71 | price. Our General Public Licenses are designed to make sure that you | ||
72 | have the freedom to distribute copies of free software (and charge for | ||
73 | this service if you wish), that you receive source code or can get it | ||
74 | if you want it, that you can change the software or use pieces of it | ||
75 | in new free programs; and that you know you can do these things. | ||
76 | |||
77 | To protect your rights, we need to make restrictions that forbid | ||
78 | anyone to deny you these rights or to ask you to surrender the rights. | ||
79 | These restrictions translate to certain responsibilities for you if you | ||
80 | distribute copies of the software, or if you modify it. | ||
81 | |||
82 | For example, if you distribute copies of such a program, whether | ||
83 | gratis or for a fee, you must give the recipients all the rights that | ||
84 | you have. You must make sure that they, too, receive or can get the | ||
85 | source code. And you must show them these terms so they know their | ||
86 | rights. | ||
87 | |||
88 | We protect your rights with two steps: (1) copyright the software, and | ||
89 | (2) offer you this license which gives you legal permission to copy, | ||
90 | distribute and/or modify the software. | ||
91 | |||
92 | Also, for each author's protection and ours, we want to make certain | ||
93 | that everyone understands that there is no warranty for this free | ||
94 | software. If the software is modified by someone else and passed on, we | ||
95 | want its recipients to know that what they have is not the original, so | ||
96 | that any problems introduced by others will not reflect on the original | ||
97 | authors' reputations. | ||
98 | |||
99 | Finally, any free program is threatened constantly by software | ||
100 | patents. We wish to avoid the danger that redistributors of a free | ||
101 | program will individually obtain patent licenses, in effect making the | ||
102 | program proprietary. To prevent this, we have made it clear that any | ||
103 | patent must be licensed for everyone's free use or not licensed at all. | ||
104 | |||
105 | The precise terms and conditions for copying, distribution and | ||
106 | modification follow. | ||
107 | |||
108 | GNU GENERAL PUBLIC LICENSE | ||
109 | TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION | ||
110 | |||
111 | 0. This License applies to any program or other work which contains | ||
112 | a notice placed by the copyright holder saying it may be distributed | ||
113 | under the terms of this General Public License. The "Program", below, | ||
114 | refers to any such program or work, and a "work based on the Program" | ||
115 | means either the Program or any derivative work under copyright law: | ||
116 | that is to say, a work containing the Program or a portion of it, | ||
117 | either verbatim or with modifications and/or translated into another | ||
118 | language. (Hereinafter, translation is included without limitation in | ||
119 | the term "modification".) Each licensee is addressed as "you". | ||
120 | |||
121 | Activities other than copying, distribution and modification are not | ||
122 | covered by this License; they are outside its scope. The act of | ||
123 | running the Program is not restricted, and the output from the Program | ||
124 | is covered only if its contents constitute a work based on the | ||
125 | Program (independent of having been made by running the Program). | ||
126 | Whether that is true depends on what the Program does. | ||
127 | |||
128 | 1. You may copy and distribute verbatim copies of the Program's | ||
129 | source code as you receive it, in any medium, provided that you | ||
130 | conspicuously and appropriately publish on each copy an appropriate | ||
131 | copyright notice and disclaimer of warranty; keep intact all the | ||
132 | notices that refer to this License and to the absence of any warranty; | ||
133 | and give any other recipients of the Program a copy of this License | ||
134 | along with the Program. | ||
135 | |||
136 | You may charge a fee for the physical act of transferring a copy, and | ||
137 | you may at your option offer warranty protection in exchange for a fee. | ||
138 | |||
139 | 2. You may modify your copy or copies of the Program or any portion | ||
140 | of it, thus forming a work based on the Program, and copy and | ||
141 | distribute such modifications or work under the terms of Section 1 | ||
142 | above, provided that you also meet all of these conditions: | ||
143 | |||
144 | a) You must cause the modified files to carry prominent notices | ||
145 | stating that you changed the files and the date of any change. | ||
146 | |||
147 | b) You must cause any work that you distribute or publish, that in | ||
148 | whole or in part contains or is derived from the Program or any | ||
149 | part thereof, to be licensed as a whole at no charge to all third | ||
150 | parties under the terms of this License. | ||
151 | |||
152 | c) If the modified program normally reads commands interactively | ||
153 | when run, you must cause it, when started running for such | ||
154 | interactive use in the most ordinary way, to print or display an | ||
155 | announcement including an appropriate copyright notice and a | ||
156 | notice that there is no warranty (or else, saying that you provide | ||
157 | a warranty) and that users may redistribute the program under | ||
158 | these conditions, and telling the user how to view a copy of this | ||
159 | License. (Exception: if the Program itself is interactive but | ||
160 | does not normally print such an announcement, your work based on | ||
161 | the Program is not required to print an announcement.) | ||
162 | |||
163 | These requirements apply to the modified work as a whole. If | ||
164 | identifiable sections of that work are not derived from the Program, | ||
165 | and can be reasonably considered independent and separate works in | ||
166 | themselves, then this License, and its terms, do not apply to those | ||
167 | sections when you distribute them as separate works. But when you | ||
168 | distribute the same sections as part of a whole which is a work based | ||
169 | on the Program, the distribution of the whole must be on the terms of | ||
170 | this License, whose permissions for other licensees extend to the | ||
171 | entire whole, and thus to each and every part regardless of who wrote it. | ||
172 | |||
173 | Thus, it is not the intent of this section to claim rights or contest | ||
174 | your rights to work written entirely by you; rather, the intent is to | ||
175 | exercise the right to control the distribution of derivative or | ||
176 | collective works based on the Program. | ||
177 | |||
178 | In addition, mere aggregation of another work not based on the Program | ||
179 | with the Program (or with a work based on the Program) on a volume of | ||
180 | a storage or distribution medium does not bring the other work under | ||
181 | the scope of this License. | ||
182 | |||
183 | 3. You may copy and distribute the Program (or a work based on it, | ||
184 | under Section 2) in object code or executable form under the terms of | ||
185 | Sections 1 and 2 above provided that you also do one of the following: | ||
186 | |||
187 | a) Accompany it with the complete corresponding machine-readable | ||
188 | source code, which must be distributed under the terms of Sections | ||
189 | 1 and 2 above on a medium customarily used for software interchange; or, | ||
190 | |||
191 | b) Accompany it with a written offer, valid for at least three | ||
192 | years, to give any third party, for a charge no more than your | ||
193 | cost of physically performing source distribution, a complete | ||
194 | machine-readable copy of the corresponding source code, to be | ||
195 | distributed under the terms of Sections 1 and 2 above on a medium | ||
196 | customarily used for software interchange; or, | ||
197 | |||
198 | c) Accompany it with the information you received as to the offer | ||
199 | to distribute corresponding source code. (This alternative is | ||
200 | allowed only for noncommercial distribution and only if you | ||
201 | received the program in object code or executable form with such | ||
202 | an offer, in accord with Subsection b above.) | ||
203 | |||
204 | The source code for a work means the preferred form of the work for | ||
205 | making modifications to it. For an executable work, complete source | ||
206 | code means all the source code for all modules it contains, plus any | ||
207 | associated interface definition files, plus the scripts used to | ||
208 | control compilation and installation of the executable. However, as a | ||
209 | special exception, the source code distributed need not include | ||
210 | anything that is normally distributed (in either source or binary | ||
211 | form) with the major components (compiler, kernel, and so on) of the | ||
212 | operating system on which the executable runs, unless that component | ||
213 | itself accompanies the executable. | ||
214 | |||
215 | If distribution of executable or object code is made by offering | ||
216 | access to copy from a designated place, then offering equivalent | ||
217 | access to copy the source code from the same place counts as | ||
218 | distribution of the source code, even though third parties are not | ||
219 | compelled to copy the source along with the object code. | ||
220 | |||
221 | 4. You may not copy, modify, sublicense, or distribute the Program | ||
222 | except as expressly provided under this License. Any attempt | ||
223 | otherwise to copy, modify, sublicense or distribute the Program is | ||
224 | void, and will automatically terminate your rights under this License. | ||
225 | However, parties who have received copies, or rights, from you under | ||
226 | this License will not have their licenses terminated so long as such | ||
227 | parties remain in full compliance. | ||
228 | |||
229 | 5. You are not required to accept this License, since you have not | ||
230 | signed it. However, nothing else grants you permission to modify or | ||
231 | distribute the Program or its derivative works. These actions are | ||
232 | prohibited by law if you do not accept this License. Therefore, by | ||
233 | modifying or distributing the Program (or any work based on the | ||
234 | Program), you indicate your acceptance of this License to do so, and | ||
235 | all its terms and conditions for copying, distributing or modifying | ||
236 | the Program or works based on it. | ||
237 | |||
238 | 6. Each time you redistribute the Program (or any work based on the | ||
239 | Program), the recipient automatically receives a license from the | ||
240 | original licensor to copy, distribute or modify the Program subject to | ||
241 | these terms and conditions. You may not impose any further | ||
242 | restrictions on the recipients' exercise of the rights granted herein. | ||
243 | You are not responsible for enforcing compliance by third parties to | ||
244 | this License. | ||
245 | |||
246 | 7. If, as a consequence of a court judgment or allegation of patent | ||
247 | infringement or for any other reason (not limited to patent issues), | ||
248 | conditions are imposed on you (whether by court order, agreement or | ||
249 | otherwise) that contradict the conditions of this License, they do not | ||
250 | excuse you from the conditions of this License. If you cannot | ||
251 | distribute so as to satisfy simultaneously your obligations under this | ||
252 | License and any other pertinent obligations, then as a consequence you | ||
253 | may not distribute the Program at all. For example, if a patent | ||
254 | license would not permit royalty-free redistribution of the Program by | ||
255 | all those who receive copies directly or indirectly through you, then | ||
256 | the only way you could satisfy both it and this License would be to | ||
257 | refrain entirely from distribution of the Program. | ||
258 | |||
259 | If any portion of this section is held invalid or unenforceable under | ||
260 | any particular circumstance, the balance of the section is intended to | ||
261 | apply and the section as a whole is intended to apply in other | ||
262 | circumstances. | ||
263 | |||
264 | It is not the purpose of this section to induce you to infringe any | ||
265 | patents or other property right claims or to contest validity of any | ||
266 | such claims; this section has the sole purpose of protecting the | ||
267 | integrity of the free software distribution system, which is | ||
268 | implemented by public license practices. Many people have made | ||
269 | generous contributions to the wide range of software distributed | ||
270 | through that system in reliance on consistent application of that | ||
271 | system; it is up to the author/donor to decide if he or she is willing | ||
272 | to distribute software through any other system and a licensee cannot | ||
273 | impose that choice. | ||
274 | |||
275 | This section is intended to make thoroughly clear what is believed to | ||
276 | be a consequence of the rest of this License. | ||
277 | |||
278 | 8. If the distribution and/or use of the Program is restricted in | ||
279 | certain countries either by patents or by copyrighted interfaces, the | ||
280 | original copyright holder who places the Program under this License | ||
281 | may add an explicit geographical distribution limitation excluding | ||
282 | those countries, so that distribution is permitted only in or among | ||
283 | countries not thus excluded. In such case, this License incorporates | ||
284 | the limitation as if written in the body of this License. | ||
285 | |||
286 | 9. The Free Software Foundation may publish revised and/or new versions | ||
287 | of the General Public License from time to time. Such new versions will | ||
288 | be similar in spirit to the present version, but may differ in detail to | ||
289 | address new problems or concerns. | ||
290 | |||
291 | Each version is given a distinguishing version number. If the Program | ||
292 | specifies a version number of this License which applies to it and "any | ||
293 | later version", you have the option of following the terms and conditions | ||
294 | either of that version or of any later version published by the Free | ||
295 | Software Foundation. If the Program does not specify a version number of | ||
296 | this License, you may choose any version ever published by the Free Software | ||
297 | Foundation. | ||
298 | |||
299 | 10. If you wish to incorporate parts of the Program into other free | ||
300 | programs whose distribution conditions are different, write to the author | ||
301 | to ask for permission. For software which is copyrighted by the Free | ||
302 | Software Foundation, write to the Free Software Foundation; we sometimes | ||
303 | make exceptions for this. Our decision will be guided by the two goals | ||
304 | of preserving the free status of all derivatives of our free software and | ||
305 | of promoting the sharing and reuse of software generally. | ||
306 | |||
307 | NO WARRANTY | ||
308 | |||
309 | 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY | ||
310 | FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN | ||
311 | OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES | ||
312 | PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED | ||
313 | OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF | ||
314 | MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS | ||
315 | TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE | ||
316 | PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, | ||
317 | REPAIR OR CORRECTION. | ||
318 | |||
319 | 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING | ||
320 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR | ||
321 | REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, | ||
322 | INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING | ||
323 | OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED | ||
324 | TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY | ||
325 | YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER | ||
326 | PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE | ||
327 | POSSIBILITY OF SUCH DAMAGES. | ||
diff --git a/Documentation/networking/batman-adv.txt b/Documentation/networking/batman-adv.txt new file mode 100644 index 000000000000..77f0cdd5b0dd --- /dev/null +++ b/Documentation/networking/batman-adv.txt | |||
@@ -0,0 +1,240 @@ | |||
1 | [state: 21-11-2010] | ||
2 | |||
3 | BATMAN-ADV | ||
4 | ---------- | ||
5 | |||
6 | Batman advanced is a new approach to wireless networking which | ||
7 | does no longer operate on the IP basis. Unlike the batman daemon, | ||
8 | which exchanges information using UDP packets and sets routing | ||
9 | tables, batman-advanced operates on ISO/OSI Layer 2 only and uses | ||
10 | and routes (or better: bridges) Ethernet Frames. It emulates a | ||
11 | virtual network switch of all nodes participating. Therefore all | ||
12 | nodes appear to be link local, thus all higher operating proto- | ||
13 | cols won't be affected by any changes within the network. You can | ||
14 | run almost any protocol above batman advanced, prominent examples | ||
15 | are: IPv4, IPv6, DHCP, IPX. | ||
16 | |||
17 | Batman advanced was implemented as a Linux kernel driver to re- | ||
18 | duce the overhead to a minimum. It does not depend on any (other) | ||
19 | network driver, and can be used on wifi as well as ethernet lan, | ||
20 | vpn, etc ... (anything with ethernet-style layer 2). | ||
21 | |||
22 | CONFIGURATION | ||
23 | ------------- | ||
24 | |||
25 | Load the batman-adv module into your kernel: | ||
26 | |||
27 | # insmod batman-adv.ko | ||
28 | |||
29 | The module is now waiting for activation. You must add some in- | ||
30 | terfaces on which batman can operate. After loading the module | ||
31 | batman advanced will scan your systems interfaces to search for | ||
32 | compatible interfaces. Once found, it will create subfolders in | ||
33 | the /sys directories of each supported interface, e.g. | ||
34 | |||
35 | # ls /sys/class/net/eth0/batman_adv/ | ||
36 | # iface_status mesh_iface | ||
37 | |||
38 | If an interface does not have the "batman_adv" subfolder it prob- | ||
39 | ably is not supported. Not supported interfaces are: loopback, | ||
40 | non-ethernet and batman's own interfaces. | ||
41 | |||
42 | Note: After the module was loaded it will continuously watch for | ||
43 | new interfaces to verify the compatibility. There is no need to | ||
44 | reload the module if you plug your USB wifi adapter into your ma- | ||
45 | chine after batman advanced was initially loaded. | ||
46 | |||
47 | To activate a given interface simply write "bat0" into its | ||
48 | "mesh_iface" file inside the batman_adv subfolder: | ||
49 | |||
50 | # echo bat0 > /sys/class/net/eth0/batman_adv/mesh_iface | ||
51 | |||
52 | Repeat this step for all interfaces you wish to add. Now batman | ||
53 | starts using/broadcasting on this/these interface(s). | ||
54 | |||
55 | By reading the "iface_status" file you can check its status: | ||
56 | |||
57 | # cat /sys/class/net/eth0/batman_adv/iface_status | ||
58 | # active | ||
59 | |||
60 | To deactivate an interface you have to write "none" into its | ||
61 | "mesh_iface" file: | ||
62 | |||
63 | # echo none > /sys/class/net/eth0/batman_adv/mesh_iface | ||
64 | |||
65 | |||
66 | All mesh wide settings can be found in batman's own interface | ||
67 | folder: | ||
68 | |||
69 | # ls /sys/class/net/bat0/mesh/ | ||
70 | # aggregated_ogms bonding fragmentation orig_interval | ||
71 | # vis_mode | ||
72 | |||
73 | |||
74 | There is a special folder for debugging informations: | ||
75 | |||
76 | # ls /sys/kernel/debug/batman_adv/bat0/ | ||
77 | # originators socket transtable_global transtable_local | ||
78 | # vis_data | ||
79 | |||
80 | |||
81 | Some of the files contain all sort of status information regard- | ||
82 | ing the mesh network. For example, you can view the table of | ||
83 | originators (mesh participants) with: | ||
84 | |||
85 | # cat /sys/kernel/debug/batman_adv/bat0/originators | ||
86 | |||
87 | Other files allow to change batman's behaviour to better fit your | ||
88 | requirements. For instance, you can check the current originator | ||
89 | interval (value in milliseconds which determines how often batman | ||
90 | sends its broadcast packets): | ||
91 | |||
92 | # cat /sys/class/net/bat0/mesh/orig_interval | ||
93 | # 1000 | ||
94 | |||
95 | and also change its value: | ||
96 | |||
97 | # echo 3000 > /sys/class/net/bat0/mesh/orig_interval | ||
98 | |||
99 | In very mobile scenarios, you might want to adjust the originator | ||
100 | interval to a lower value. This will make the mesh more respon- | ||
101 | sive to topology changes, but will also increase the overhead. | ||
102 | |||
103 | |||
104 | USAGE | ||
105 | ----- | ||
106 | |||
107 | To make use of your newly created mesh, batman advanced provides | ||
108 | a new interface "bat0" which you should use from this point on. | ||
109 | All interfaces added to batman advanced are not relevant any | ||
110 | longer because batman handles them for you. Basically, one "hands | ||
111 | over" the data by using the batman interface and batman will make | ||
112 | sure it reaches its destination. | ||
113 | |||
114 | The "bat0" interface can be used like any other regular inter- | ||
115 | face. It needs an IP address which can be either statically con- | ||
116 | figured or dynamically (by using DHCP or similar services): | ||
117 | |||
118 | # NodeA: ifconfig bat0 192.168.0.1 | ||
119 | # NodeB: ifconfig bat0 192.168.0.2 | ||
120 | # NodeB: ping 192.168.0.1 | ||
121 | |||
122 | Note: In order to avoid problems remove all IP addresses previ- | ||
123 | ously assigned to interfaces now used by batman advanced, e.g. | ||
124 | |||
125 | # ifconfig eth0 0.0.0.0 | ||
126 | |||
127 | |||
128 | VISUALIZATION | ||
129 | ------------- | ||
130 | |||
131 | If you want topology visualization, at least one mesh node must | ||
132 | be configured as VIS-server: | ||
133 | |||
134 | # echo "server" > /sys/class/net/bat0/mesh/vis_mode | ||
135 | |||
136 | Each node is either configured as "server" or as "client" (de- | ||
137 | fault: "client"). Clients send their topology data to the server | ||
138 | next to them, and server synchronize with other servers. If there | ||
139 | is no server configured (default) within the mesh, no topology | ||
140 | information will be transmitted. With these "synchronizing | ||
141 | servers", there can be 1 or more vis servers sharing the same (or | ||
142 | at least very similar) data. | ||
143 | |||
144 | When configured as server, you can get a topology snapshot of | ||
145 | your mesh: | ||
146 | |||
147 | # cat /sys/kernel/debug/batman_adv/bat0/vis_data | ||
148 | |||
149 | This raw output is intended to be easily parsable and convertable | ||
150 | with other tools. Have a look at the batctl README if you want a | ||
151 | vis output in dot or json format for instance and how those out- | ||
152 | puts could then be visualised in an image. | ||
153 | |||
154 | The raw format consists of comma separated values per entry where | ||
155 | each entry is giving information about a certain source inter- | ||
156 | face. Each entry can/has to have the following values: | ||
157 | -> "mac" - mac address of an originator's source interface | ||
158 | (each line begins with it) | ||
159 | -> "TQ mac value" - src mac's link quality towards mac address | ||
160 | of a neighbor originator's interface which | ||
161 | is being used for routing | ||
162 | -> "HNA mac" - HNA announced by source mac | ||
163 | -> "PRIMARY" - this is a primary interface | ||
164 | -> "SEC mac" - secondary mac address of source | ||
165 | (requires preceding PRIMARY) | ||
166 | |||
167 | The TQ value has a range from 4 to 255 with 255 being the best. | ||
168 | The HNA entries are showing which hosts are connected to the mesh | ||
169 | via bat0 or being bridged into the mesh network. The PRIMARY/SEC | ||
170 | values are only applied on primary interfaces | ||
171 | |||
172 | |||
173 | LOGGING/DEBUGGING | ||
174 | ----------------- | ||
175 | |||
176 | All error messages, warnings and information messages are sent to | ||
177 | the kernel log. Depending on your operating system distribution | ||
178 | this can be read in one of a number of ways. Try using the com- | ||
179 | mands: dmesg, logread, or looking in the files /var/log/kern.log | ||
180 | or /var/log/syslog. All batman-adv messages are prefixed with | ||
181 | "batman-adv:" So to see just these messages try | ||
182 | |||
183 | # dmesg | grep batman-adv | ||
184 | |||
185 | When investigating problems with your mesh network it is some- | ||
186 | times necessary to see more detail debug messages. This must be | ||
187 | enabled when compiling the batman-adv module. When building bat- | ||
188 | man-adv as part of kernel, use "make menuconfig" and enable the | ||
189 | option "B.A.T.M.A.N. debugging". | ||
190 | |||
191 | Those additional debug messages can be accessed using a special | ||
192 | file in debugfs | ||
193 | |||
194 | # cat /sys/kernel/debug/batman_adv/bat0/log | ||
195 | |||
196 | The additional debug output is by default disabled. It can be en- | ||
197 | abled during run time. Following log_levels are defined: | ||
198 | |||
199 | 0 - All debug output disabled | ||
200 | 1 - Enable messages related to routing / flooding / broadcasting | ||
201 | 2 - Enable route or hna added / changed / deleted | ||
202 | 3 - Enable all messages | ||
203 | |||
204 | The debug output can be changed at runtime using the file | ||
205 | /sys/class/net/bat0/mesh/log_level. e.g. | ||
206 | |||
207 | # echo 2 > /sys/class/net/bat0/mesh/log_level | ||
208 | |||
209 | will enable debug messages for when routes or HNAs change. | ||
210 | |||
211 | |||
212 | BATCTL | ||
213 | ------ | ||
214 | |||
215 | As batman advanced operates on layer 2 all hosts participating in | ||
216 | the virtual switch are completely transparent for all protocols | ||
217 | above layer 2. Therefore the common diagnosis tools do not work | ||
218 | as expected. To overcome these problems batctl was created. At | ||
219 | the moment the batctl contains ping, traceroute, tcpdump and | ||
220 | interfaces to the kernel module settings. | ||
221 | |||
222 | For more information, please see the manpage (man batctl). | ||
223 | |||
224 | batctl is available on http://www.open-mesh.org/ | ||
225 | |||
226 | |||
227 | CONTACT | ||
228 | ------- | ||
229 | |||
230 | Please send us comments, experiences, questions, anything :) | ||
231 | |||
232 | IRC: #batman on irc.freenode.org | ||
233 | Mailing-list: b.a.t.m.a.n@b.a.t.m.a.n@lists.open-mesh.org | ||
234 | (optional subscription at | ||
235 | https://lists.open-mesh.org/mm/listinfo/b.a.t.m.a.n) | ||
236 | |||
237 | You can also contact the Authors: | ||
238 | |||
239 | Marek Lindner <lindner_marek@yahoo.de> | ||
240 | Simon Wunderlich <siwu@hrz.tu-chemnitz.de> | ||
diff --git a/Documentation/networking/bridge.txt b/Documentation/networking/bridge.txt index bec69a8a1697..a7ba5e4e2c91 100644 --- a/Documentation/networking/bridge.txt +++ b/Documentation/networking/bridge.txt | |||
@@ -1,8 +1,8 @@ | |||
1 | In order to use the Ethernet bridging functionality, you'll need the | 1 | In order to use the Ethernet bridging functionality, you'll need the |
2 | userspace tools. These programs and documentation are available | 2 | userspace tools. These programs and documentation are available |
3 | at http://www.linux-foundation.org/en/Net:Bridge. The download page is | 3 | at http://www.linuxfoundation.org/en/Net:Bridge. The download page is |
4 | http://prdownloads.sourceforge.net/bridge. | 4 | http://prdownloads.sourceforge.net/bridge. |
5 | 5 | ||
6 | If you still have questions, don't hesitate to post to the mailing list | 6 | If you still have questions, don't hesitate to post to the mailing list |
7 | (more info http://lists.osdl.org/mailman/listinfo/bridge). | 7 | (more info https://lists.linux-foundation.org/mailman/listinfo/bridge). |
8 | 8 | ||
diff --git a/Documentation/networking/caif/spi_porting.txt b/Documentation/networking/caif/spi_porting.txt index 61d7c9247453..0cb8cb9098f4 100644 --- a/Documentation/networking/caif/spi_porting.txt +++ b/Documentation/networking/caif/spi_porting.txt | |||
@@ -32,7 +32,7 @@ the physical hardware, both with regard to SPI and to GPIOs. | |||
32 | This function is called by the CAIF SPI interface to give | 32 | This function is called by the CAIF SPI interface to give |
33 | you a chance to set up your hardware to be ready to receive | 33 | you a chance to set up your hardware to be ready to receive |
34 | a stream of data from the master. The xfer structure contains | 34 | a stream of data from the master. The xfer structure contains |
35 | both physical and logical adresses, as well as the total length | 35 | both physical and logical addresses, as well as the total length |
36 | of the transfer in both directions.The dev parameter can be used | 36 | of the transfer in both directions.The dev parameter can be used |
37 | to map to different CAIF SPI slave devices. | 37 | to map to different CAIF SPI slave devices. |
38 | 38 | ||
diff --git a/Documentation/networking/dccp.txt b/Documentation/networking/dccp.txt index 271d524a4c8d..d718bc2ff1cf 100644 --- a/Documentation/networking/dccp.txt +++ b/Documentation/networking/dccp.txt | |||
@@ -38,15 +38,35 @@ The Linux DCCP implementation does not currently support all the features that a | |||
38 | specified in RFCs 4340...42. | 38 | specified in RFCs 4340...42. |
39 | 39 | ||
40 | The known bugs are at: | 40 | The known bugs are at: |
41 | http://linux-net.osdl.org/index.php/TODO#DCCP | 41 | http://www.linuxfoundation.org/collaborate/workgroups/networking/todo#DCCP |
42 | 42 | ||
43 | For more up-to-date versions of the DCCP implementation, please consider using | 43 | For more up-to-date versions of the DCCP implementation, please consider using |
44 | the experimental DCCP test tree; instructions for checking this out are on: | 44 | the experimental DCCP test tree; instructions for checking this out are on: |
45 | http://linux-net.osdl.org/index.php/DCCP_Testing#Experimental_DCCP_source_tree | 45 | http://www.linuxfoundation.org/collaborate/workgroups/networking/dccp_testing#Experimental_DCCP_source_tree |
46 | 46 | ||
47 | 47 | ||
48 | Socket options | 48 | Socket options |
49 | ============== | 49 | ============== |
50 | DCCP_SOCKOPT_QPOLICY_ID sets the dequeuing policy for outgoing packets. It takes | ||
51 | a policy ID as argument and can only be set before the connection (i.e. changes | ||
52 | during an established connection are not supported). Currently, two policies are | ||
53 | defined: the "simple" policy (DCCPQ_POLICY_SIMPLE), which does nothing special, | ||
54 | and a priority-based variant (DCCPQ_POLICY_PRIO). The latter allows to pass an | ||
55 | u32 priority value as ancillary data to sendmsg(), where higher numbers indicate | ||
56 | a higher packet priority (similar to SO_PRIORITY). This ancillary data needs to | ||
57 | be formatted using a cmsg(3) message header filled in as follows: | ||
58 | cmsg->cmsg_level = SOL_DCCP; | ||
59 | cmsg->cmsg_type = DCCP_SCM_PRIORITY; | ||
60 | cmsg->cmsg_len = CMSG_LEN(sizeof(uint32_t)); /* or CMSG_LEN(4) */ | ||
61 | |||
62 | DCCP_SOCKOPT_QPOLICY_TXQLEN sets the maximum length of the output queue. A zero | ||
63 | value is always interpreted as unbounded queue length. If different from zero, | ||
64 | the interpretation of this parameter depends on the current dequeuing policy | ||
65 | (see above): the "simple" policy will enforce a fixed queue size by returning | ||
66 | EAGAIN, whereas the "prio" policy enforces a fixed queue length by dropping the | ||
67 | lowest-priority packet first. The default value for this parameter is | ||
68 | initialised from /proc/sys/net/dccp/default/tx_qlen. | ||
69 | |||
50 | DCCP_SOCKOPT_SERVICE sets the service. The specification mandates use of | 70 | DCCP_SOCKOPT_SERVICE sets the service. The specification mandates use of |
51 | service codes (RFC 4340, sec. 8.1.2); if this socket option is not set, | 71 | service codes (RFC 4340, sec. 8.1.2); if this socket option is not set, |
52 | the socket will fall back to 0 (which means that no meaningful service code | 72 | the socket will fall back to 0 (which means that no meaningful service code |
@@ -147,6 +167,7 @@ rx_ccid = 2 | |||
147 | seq_window = 100 | 167 | seq_window = 100 |
148 | The initial sequence window (sec. 7.5.2) of the sender. This influences | 168 | The initial sequence window (sec. 7.5.2) of the sender. This influences |
149 | the local ackno validity and the remote seqno validity windows (7.5.1). | 169 | the local ackno validity and the remote seqno validity windows (7.5.1). |
170 | Values in the range Wmin = 32 (RFC 4340, 7.5.2) up to 2^32-1 can be set. | ||
150 | 171 | ||
151 | tx_qlen = 5 | 172 | tx_qlen = 5 |
152 | The size of the transmit buffer in packets. A value of 0 corresponds | 173 | The size of the transmit buffer in packets. A value of 0 corresponds |
diff --git a/Documentation/networking/e100.txt b/Documentation/networking/e100.txt index 944aa55e79f8..162f323a7a1f 100644 --- a/Documentation/networking/e100.txt +++ b/Documentation/networking/e100.txt | |||
@@ -72,7 +72,7 @@ Tx Descriptors: Number of transmit descriptors. A transmit descriptor is a data | |||
72 | ethtool -G eth? tx n, where n is the number of desired tx descriptors. | 72 | ethtool -G eth? tx n, where n is the number of desired tx descriptors. |
73 | 73 | ||
74 | Speed/Duplex: The driver auto-negotiates the link speed and duplex settings by | 74 | Speed/Duplex: The driver auto-negotiates the link speed and duplex settings by |
75 | default. Ethtool can be used as follows to force speed/duplex. | 75 | default. The ethtool utility can be used as follows to force speed/duplex. |
76 | 76 | ||
77 | ethtool -s eth? autoneg off speed {10|100} duplex {full|half} | 77 | ethtool -s eth? autoneg off speed {10|100} duplex {full|half} |
78 | 78 | ||
@@ -126,30 +126,21 @@ Additional Configurations | |||
126 | ------- | 126 | ------- |
127 | 127 | ||
128 | The driver utilizes the ethtool interface for driver configuration and | 128 | The driver utilizes the ethtool interface for driver configuration and |
129 | diagnostics, as well as displaying statistical information. Ethtool | 129 | diagnostics, as well as displaying statistical information. The ethtool |
130 | version 1.6 or later is required for this functionality. | 130 | version 1.6 or later is required for this functionality. |
131 | 131 | ||
132 | The latest release of ethtool can be found from | 132 | The latest release of ethtool can be found from |
133 | http://sourceforge.net/projects/gkernel. | 133 | http://ftp.kernel.org/pub/software/network/ethtool/ |
134 | |||
135 | NOTE: Ethtool 1.6 only supports a limited set of ethtool options. Support | ||
136 | for a more complete ethtool feature set can be enabled by upgrading | ||
137 | ethtool to ethtool-1.8.1. | ||
138 | |||
139 | 134 | ||
140 | Enabling Wake on LAN* (WoL) | 135 | Enabling Wake on LAN* (WoL) |
141 | --------------------------- | 136 | --------------------------- |
142 | WoL is provided through the Ethtool* utility. Ethtool is included with Red | 137 | WoL is provided through the ethtool* utility. For instructions on enabling |
143 | Hat* 8.0. For other Linux distributions, download and install Ethtool from | 138 | WoL with ethtool, refer to the ethtool man page. |
144 | the following website: http://sourceforge.net/projects/gkernel. | ||
145 | |||
146 | For instructions on enabling WoL with Ethtool, refer to the Ethtool man page. | ||
147 | 139 | ||
148 | WoL will be enabled on the system during the next shut down or reboot. For | 140 | WoL will be enabled on the system during the next shut down or reboot. For |
149 | this driver version, in order to enable WoL, the e100 driver must be | 141 | this driver version, in order to enable WoL, the e100 driver must be |
150 | loaded when shutting down or rebooting the system. | 142 | loaded when shutting down or rebooting the system. |
151 | 143 | ||
152 | |||
153 | NAPI | 144 | NAPI |
154 | ---- | 145 | ---- |
155 | 146 | ||
diff --git a/Documentation/networking/e1000.txt b/Documentation/networking/e1000.txt index d9271e74e488..71ca95855671 100644 --- a/Documentation/networking/e1000.txt +++ b/Documentation/networking/e1000.txt | |||
@@ -79,7 +79,7 @@ InterruptThrottleRate | |||
79 | --------------------- | 79 | --------------------- |
80 | (not supported on Intel(R) 82542, 82543 or 82544-based adapters) | 80 | (not supported on Intel(R) 82542, 82543 or 82544-based adapters) |
81 | Valid Range: 0,1,3,4,100-100000 (0=off, 1=dynamic, 3=dynamic conservative, | 81 | Valid Range: 0,1,3,4,100-100000 (0=off, 1=dynamic, 3=dynamic conservative, |
82 | 4=simplified balancing) | 82 | 4=simplified balancing) |
83 | Default Value: 3 | 83 | Default Value: 3 |
84 | 84 | ||
85 | The driver can limit the amount of interrupts per second that the adapter | 85 | The driver can limit the amount of interrupts per second that the adapter |
@@ -124,8 +124,8 @@ InterruptThrottleRate is set to mode 1. In this mode, which operates | |||
124 | the same as mode 3, the InterruptThrottleRate will be increased stepwise to | 124 | the same as mode 3, the InterruptThrottleRate will be increased stepwise to |
125 | 70000 for traffic in class "Lowest latency". | 125 | 70000 for traffic in class "Lowest latency". |
126 | 126 | ||
127 | In simplified mode the interrupt rate is based on the ratio of Tx and | 127 | In simplified mode the interrupt rate is based on the ratio of TX and |
128 | Rx traffic. If the bytes per second rate is approximately equal, the | 128 | RX traffic. If the bytes per second rate is approximately equal, the |
129 | interrupt rate will drop as low as 2000 interrupts per second. If the | 129 | interrupt rate will drop as low as 2000 interrupts per second. If the |
130 | traffic is mostly transmit or mostly receive, the interrupt rate could | 130 | traffic is mostly transmit or mostly receive, the interrupt rate could |
131 | be as high as 8000. | 131 | be as high as 8000. |
@@ -245,7 +245,7 @@ NOTE: Depending on the available system resources, the request for a | |||
245 | TxDescriptorStep | 245 | TxDescriptorStep |
246 | ---------------- | 246 | ---------------- |
247 | Valid Range: 1 (use every Tx Descriptor) | 247 | Valid Range: 1 (use every Tx Descriptor) |
248 | 4 (use every 4th Tx Descriptor) | 248 | 4 (use every 4th Tx Descriptor) |
249 | 249 | ||
250 | Default Value: 1 (use every Tx Descriptor) | 250 | Default Value: 1 (use every Tx Descriptor) |
251 | 251 | ||
@@ -312,7 +312,7 @@ Valid Range: 0-xxxxxxx (0=off) | |||
312 | Default Value: 256 | 312 | Default Value: 256 |
313 | Usage: insmod e1000.ko copybreak=128 | 313 | Usage: insmod e1000.ko copybreak=128 |
314 | 314 | ||
315 | Driver copies all packets below or equaling this size to a fresh Rx | 315 | Driver copies all packets below or equaling this size to a fresh RX |
316 | buffer before handing it up the stack. | 316 | buffer before handing it up the stack. |
317 | 317 | ||
318 | This parameter is different than other parameters, in that it is a | 318 | This parameter is different than other parameters, in that it is a |
@@ -431,15 +431,15 @@ Additional Configurations | |||
431 | Ethtool | 431 | Ethtool |
432 | ------- | 432 | ------- |
433 | The driver utilizes the ethtool interface for driver configuration and | 433 | The driver utilizes the ethtool interface for driver configuration and |
434 | diagnostics, as well as displaying statistical information. Ethtool | 434 | diagnostics, as well as displaying statistical information. The ethtool |
435 | version 1.6 or later is required for this functionality. | 435 | version 1.6 or later is required for this functionality. |
436 | 436 | ||
437 | The latest release of ethtool can be found from | 437 | The latest release of ethtool can be found from |
438 | http://sourceforge.net/projects/gkernel. | 438 | http://ftp.kernel.org/pub/software/network/ethtool/ |
439 | 439 | ||
440 | Enabling Wake on LAN* (WoL) | 440 | Enabling Wake on LAN* (WoL) |
441 | --------------------------- | 441 | --------------------------- |
442 | WoL is configured through the Ethtool* utility. | 442 | WoL is configured through the ethtool* utility. |
443 | 443 | ||
444 | WoL will be enabled on the system during the next shut down or reboot. | 444 | WoL will be enabled on the system during the next shut down or reboot. |
445 | For this driver version, in order to enable WoL, the e1000 driver must be | 445 | For this driver version, in order to enable WoL, the e1000 driver must be |
diff --git a/Documentation/networking/e1000e.txt b/Documentation/networking/e1000e.txt index 6aa048badf32..97b5ba942ebf 100644 --- a/Documentation/networking/e1000e.txt +++ b/Documentation/networking/e1000e.txt | |||
@@ -1,5 +1,5 @@ | |||
1 | Linux* Driver for Intel(R) Network Connection | 1 | Linux* Driver for Intel(R) Network Connection |
2 | =============================================================== | 2 | ============================================= |
3 | 3 | ||
4 | Intel Gigabit Linux driver. | 4 | Intel Gigabit Linux driver. |
5 | Copyright(c) 1999 - 2010 Intel Corporation. | 5 | Copyright(c) 1999 - 2010 Intel Corporation. |
@@ -61,6 +61,12 @@ per second, even if more packets have come in. This reduces interrupt | |||
61 | load on the system and can lower CPU utilization under heavy load, | 61 | load on the system and can lower CPU utilization under heavy load, |
62 | but will increase latency as packets are not processed as quickly. | 62 | but will increase latency as packets are not processed as quickly. |
63 | 63 | ||
64 | The default behaviour of the driver previously assumed a static | ||
65 | InterruptThrottleRate value of 8000, providing a good fallback value for | ||
66 | all traffic types, but lacking in small packet performance and latency. | ||
67 | The hardware can handle many more small packets per second however, and | ||
68 | for this reason an adaptive interrupt moderation algorithm was implemented. | ||
69 | |||
64 | The driver has two adaptive modes (setting 1 or 3) in which | 70 | The driver has two adaptive modes (setting 1 or 3) in which |
65 | it dynamically adjusts the InterruptThrottleRate value based on the traffic | 71 | it dynamically adjusts the InterruptThrottleRate value based on the traffic |
66 | that it receives. After determining the type of incoming traffic in the last | 72 | that it receives. After determining the type of incoming traffic in the last |
@@ -86,8 +92,8 @@ InterruptThrottleRate is set to mode 1. In this mode, which operates | |||
86 | the same as mode 3, the InterruptThrottleRate will be increased stepwise to | 92 | the same as mode 3, the InterruptThrottleRate will be increased stepwise to |
87 | 70000 for traffic in class "Lowest latency". | 93 | 70000 for traffic in class "Lowest latency". |
88 | 94 | ||
89 | In simplified mode the interrupt rate is based on the ratio of Tx and | 95 | In simplified mode the interrupt rate is based on the ratio of TX and |
90 | Rx traffic. If the bytes per second rate is approximately equal the | 96 | RX traffic. If the bytes per second rate is approximately equal, the |
91 | interrupt rate will drop as low as 2000 interrupts per second. If the | 97 | interrupt rate will drop as low as 2000 interrupts per second. If the |
92 | traffic is mostly transmit or mostly receive, the interrupt rate could | 98 | traffic is mostly transmit or mostly receive, the interrupt rate could |
93 | be as high as 8000. | 99 | be as high as 8000. |
@@ -177,7 +183,7 @@ Copybreak | |||
177 | Valid Range: 0-xxxxxxx (0=off) | 183 | Valid Range: 0-xxxxxxx (0=off) |
178 | Default Value: 256 | 184 | Default Value: 256 |
179 | 185 | ||
180 | Driver copies all packets below or equaling this size to a fresh Rx | 186 | Driver copies all packets below or equaling this size to a fresh RX |
181 | buffer before handing it up the stack. | 187 | buffer before handing it up the stack. |
182 | 188 | ||
183 | This parameter is different than other parameters, in that it is a | 189 | This parameter is different than other parameters, in that it is a |
@@ -223,17 +229,17 @@ loading or enabling the driver, try disabling this feature. | |||
223 | 229 | ||
224 | WriteProtectNVM | 230 | WriteProtectNVM |
225 | --------------- | 231 | --------------- |
226 | Valid Range: 0-1 | 232 | Valid Range: 0,1 |
227 | Default Value: 1 (enabled) | 233 | Default Value: 1 |
228 | 234 | ||
229 | Set the hardware to ignore all write/erase cycles to the GbE region in the | 235 | If set to 1, configure the hardware to ignore all write/erase cycles to the |
230 | ICHx NVM (non-volatile memory). This feature can be disabled by the | 236 | GbE region in the ICHx NVM (in order to prevent accidental corruption of the |
231 | WriteProtectNVM module parameter (enabled by default) only after a hardware | 237 | NVM). This feature can be disabled by setting the parameter to 0 during initial |
232 | reset, but the machine must be power cycled before trying to enable writes. | 238 | driver load. |
233 | 239 | NOTE: The machine must be power cycled (full off/on) when enabling NVM writes | |
234 | Note: the kernel boot option iomem=relaxed may need to be set if the kernel | 240 | via setting the parameter to zero. Once the NVM has been locked (via the |
235 | config option CONFIG_STRICT_DEVMEM=y, if the root user wants to write the | 241 | parameter at 1 when the driver loads) it cannot be unlocked except via power |
236 | NVM from user space via ethtool. | 242 | cycle. |
237 | 243 | ||
238 | Additional Configurations | 244 | Additional Configurations |
239 | ========================= | 245 | ========================= |
@@ -259,32 +265,30 @@ Additional Configurations | |||
259 | - Some adapters limit Jumbo Frames sized packets to a maximum of | 265 | - Some adapters limit Jumbo Frames sized packets to a maximum of |
260 | 4096 bytes and some adapters do not support Jumbo Frames. | 266 | 4096 bytes and some adapters do not support Jumbo Frames. |
261 | 267 | ||
262 | |||
263 | Ethtool | 268 | Ethtool |
264 | ------- | 269 | ------- |
265 | The driver utilizes the ethtool interface for driver configuration and | 270 | The driver utilizes the ethtool interface for driver configuration and |
266 | diagnostics, as well as displaying statistical information. We | 271 | diagnostics, as well as displaying statistical information. We |
267 | strongly recommend downloading the latest version of Ethtool at: | 272 | strongly recommend downloading the latest version of ethtool at: |
268 | 273 | ||
269 | http://sourceforge.net/projects/gkernel. | 274 | http://ftp.kernel.org/pub/software/network/ethtool/ |
270 | 275 | ||
271 | Speed and Duplex | 276 | Speed and Duplex |
272 | ---------------- | 277 | ---------------- |
273 | Speed and Duplex are configured through the Ethtool* utility. For | 278 | Speed and Duplex are configured through the ethtool* utility. For |
274 | instructions, refer to the Ethtool man page. | 279 | instructions, refer to the ethtool man page. |
275 | 280 | ||
276 | Enabling Wake on LAN* (WoL) | 281 | Enabling Wake on LAN* (WoL) |
277 | --------------------------- | 282 | --------------------------- |
278 | WoL is configured through the Ethtool* utility. For instructions on | 283 | WoL is configured through the ethtool* utility. For instructions on |
279 | enabling WoL with Ethtool, refer to the Ethtool man page. | 284 | enabling WoL with ethtool, refer to the ethtool man page. |
280 | 285 | ||
281 | WoL will be enabled on the system during the next shut down or reboot. | 286 | WoL will be enabled on the system during the next shut down or reboot. |
282 | For this driver version, in order to enable WoL, the e1000e driver must be | 287 | For this driver version, in order to enable WoL, the e1000e driver must be |
283 | loaded when shutting down or rebooting the system. | 288 | loaded when shutting down or rebooting the system. |
284 | 289 | ||
285 | In most cases Wake On LAN is only supported on port A for multiple port | 290 | In most cases Wake On LAN is only supported on port A for multiple port |
286 | adapters. To verify if a port supports Wake on LAN run ethtool eth<X>. | 291 | adapters. To verify if a port supports Wake on Lan run ethtool eth<X>. |
287 | |||
288 | 292 | ||
289 | Support | 293 | Support |
290 | ======= | 294 | ======= |
diff --git a/Documentation/networking/generic_netlink.txt b/Documentation/networking/generic_netlink.txt index d4f8b8b9b53c..3e071115ca90 100644 --- a/Documentation/networking/generic_netlink.txt +++ b/Documentation/networking/generic_netlink.txt | |||
@@ -1,3 +1,3 @@ | |||
1 | A wiki document on how to use Generic Netlink can be found here: | 1 | A wiki document on how to use Generic Netlink can be found here: |
2 | 2 | ||
3 | * http://linux-net.osdl.org/index.php/Generic_Netlink_HOWTO | 3 | * http://www.linuxfoundation.org/collaborate/workgroups/networking/generic_netlink_howto |
diff --git a/Documentation/networking/igb.txt b/Documentation/networking/igb.txt index ab2d71831892..98953c0d5342 100644 --- a/Documentation/networking/igb.txt +++ b/Documentation/networking/igb.txt | |||
@@ -36,6 +36,7 @@ Default Value: 0 | |||
36 | This parameter adds support for SR-IOV. It causes the driver to spawn up to | 36 | This parameter adds support for SR-IOV. It causes the driver to spawn up to |
37 | max_vfs worth of virtual function. | 37 | max_vfs worth of virtual function. |
38 | 38 | ||
39 | |||
39 | Additional Configurations | 40 | Additional Configurations |
40 | ========================= | 41 | ========================= |
41 | 42 | ||
@@ -60,15 +61,16 @@ Additional Configurations | |||
60 | Ethtool | 61 | Ethtool |
61 | ------- | 62 | ------- |
62 | The driver utilizes the ethtool interface for driver configuration and | 63 | The driver utilizes the ethtool interface for driver configuration and |
63 | diagnostics, as well as displaying statistical information. | 64 | diagnostics, as well as displaying statistical information. The latest |
65 | version of ethtool can be found at: | ||
64 | 66 | ||
65 | http://sourceforge.net/projects/gkernel. | 67 | http://ftp.kernel.org/pub/software/network/ethtool/ |
66 | 68 | ||
67 | Enabling Wake on LAN* (WoL) | 69 | Enabling Wake on LAN* (WoL) |
68 | --------------------------- | 70 | --------------------------- |
69 | WoL is configured through the Ethtool* utility. | 71 | WoL is configured through the ethtool* utility. |
70 | 72 | ||
71 | For instructions on enabling WoL with Ethtool, refer to the Ethtool man page. | 73 | For instructions on enabling WoL with ethtool, refer to the ethtool man page. |
72 | 74 | ||
73 | WoL will be enabled on the system during the next shut down or reboot. | 75 | WoL will be enabled on the system during the next shut down or reboot. |
74 | For this driver version, in order to enable WoL, the igb driver must be | 76 | For this driver version, in order to enable WoL, the igb driver must be |
@@ -91,31 +93,6 @@ Additional Configurations | |||
91 | REQUIREMENTS: MSI-X support is required for Multiqueue. If MSI-X is not | 93 | REQUIREMENTS: MSI-X support is required for Multiqueue. If MSI-X is not |
92 | found, the system will fallback to MSI or to Legacy interrupts. | 94 | found, the system will fallback to MSI or to Legacy interrupts. |
93 | 95 | ||
94 | LRO | ||
95 | --- | ||
96 | Large Receive Offload (LRO) is a technique for increasing inbound throughput | ||
97 | of high-bandwidth network connections by reducing CPU overhead. It works by | ||
98 | aggregating multiple incoming packets from a single stream into a larger | ||
99 | buffer before they are passed higher up the networking stack, thus reducing | ||
100 | the number of packets that have to be processed. LRO combines multiple | ||
101 | Ethernet frames into a single receive in the stack, thereby potentially | ||
102 | decreasing CPU utilization for receives. | ||
103 | |||
104 | NOTE: You need to have inet_lro enabled via either the CONFIG_INET_LRO or | ||
105 | CONFIG_INET_LRO_MODULE kernel config option. Additionally, if | ||
106 | CONFIG_INET_LRO_MODULE is used, the inet_lro module needs to be loaded | ||
107 | before the igb driver. | ||
108 | |||
109 | You can verify that the driver is using LRO by looking at these counters in | ||
110 | Ethtool: | ||
111 | |||
112 | lro_aggregated - count of total packets that were combined | ||
113 | lro_flushed - counts the number of packets flushed out of LRO | ||
114 | lro_no_desc - counts the number of times an LRO descriptor was not available | ||
115 | for the LRO packet | ||
116 | |||
117 | NOTE: IPv6 and UDP are not supported by LRO. | ||
118 | |||
119 | Support | 96 | Support |
120 | ======= | 97 | ======= |
121 | 98 | ||
diff --git a/Documentation/networking/igbvf.txt b/Documentation/networking/igbvf.txt index 056028138d9c..cbfe4ee65533 100644 --- a/Documentation/networking/igbvf.txt +++ b/Documentation/networking/igbvf.txt | |||
@@ -58,9 +58,11 @@ Additional Configurations | |||
58 | Ethtool | 58 | Ethtool |
59 | ------- | 59 | ------- |
60 | The driver utilizes the ethtool interface for driver configuration and | 60 | The driver utilizes the ethtool interface for driver configuration and |
61 | diagnostics, as well as displaying statistical information. | 61 | diagnostics, as well as displaying statistical information. The ethtool |
62 | version 3.0 or later is required for this functionality, although we | ||
63 | strongly recommend downloading the latest version at: | ||
62 | 64 | ||
63 | http://sourceforge.net/projects/gkernel. | 65 | http://ftp.kernel.org/pub/software/network/ethtool/ |
64 | 66 | ||
65 | Support | 67 | Support |
66 | ======= | 68 | ======= |
diff --git a/Documentation/networking/ip-sysctl.txt b/Documentation/networking/ip-sysctl.txt index fe95105992c5..d99940dcfc44 100644 --- a/Documentation/networking/ip-sysctl.txt +++ b/Documentation/networking/ip-sysctl.txt | |||
@@ -11,7 +11,9 @@ ip_forward - BOOLEAN | |||
11 | for routers) | 11 | for routers) |
12 | 12 | ||
13 | ip_default_ttl - INTEGER | 13 | ip_default_ttl - INTEGER |
14 | default 64 | 14 | Default value of TTL field (Time To Live) for outgoing (but not |
15 | forwarded) IP packets. Should be between 1 and 255 inclusive. | ||
16 | Default: 64 (as recommended by RFC1700) | ||
15 | 17 | ||
16 | ip_no_pmtu_disc - BOOLEAN | 18 | ip_no_pmtu_disc - BOOLEAN |
17 | Disable Path MTU Discovery. | 19 | Disable Path MTU Discovery. |
@@ -144,6 +146,7 @@ tcp_adv_win_scale - INTEGER | |||
144 | Count buffering overhead as bytes/2^tcp_adv_win_scale | 146 | Count buffering overhead as bytes/2^tcp_adv_win_scale |
145 | (if tcp_adv_win_scale > 0) or bytes-bytes/2^(-tcp_adv_win_scale), | 147 | (if tcp_adv_win_scale > 0) or bytes-bytes/2^(-tcp_adv_win_scale), |
146 | if it is <= 0. | 148 | if it is <= 0. |
149 | Possible values are [-31, 31], inclusive. | ||
147 | Default: 2 | 150 | Default: 2 |
148 | 151 | ||
149 | tcp_allowed_congestion_control - STRING | 152 | tcp_allowed_congestion_control - STRING |
@@ -707,10 +710,28 @@ igmp_max_memberships - INTEGER | |||
707 | Change the maximum number of multicast groups we can subscribe to. | 710 | Change the maximum number of multicast groups we can subscribe to. |
708 | Default: 20 | 711 | Default: 20 |
709 | 712 | ||
710 | conf/interface/* changes special settings per interface (where "interface" is | 713 | Theoretical maximum value is bounded by having to send a membership |
711 | the name of your network interface) | 714 | report in a single datagram (i.e. the report can't span multiple |
712 | conf/all/* is special, changes the settings for all interfaces | 715 | datagrams, or risk confusing the switch and leaving groups you don't |
716 | intend to). | ||
713 | 717 | ||
718 | The number of supported groups 'M' is bounded by the number of group | ||
719 | report entries you can fit into a single datagram of 65535 bytes. | ||
720 | |||
721 | M = 65536-sizeof (ip header)/(sizeof(Group record)) | ||
722 | |||
723 | Group records are variable length, with a minimum of 12 bytes. | ||
724 | So net.ipv4.igmp_max_memberships should not be set higher than: | ||
725 | |||
726 | (65536-24) / 12 = 5459 | ||
727 | |||
728 | The value 5459 assumes no IP header options, so in practice | ||
729 | this number may be lower. | ||
730 | |||
731 | conf/interface/* changes special settings per interface (where | ||
732 | "interface" is the name of your network interface) | ||
733 | |||
734 | conf/all/* is special, changes the settings for all interfaces | ||
714 | 735 | ||
715 | log_martians - BOOLEAN | 736 | log_martians - BOOLEAN |
716 | Log packets with impossible addresses to kernel log. | 737 | Log packets with impossible addresses to kernel log. |
diff --git a/Documentation/networking/ixgb.txt b/Documentation/networking/ixgb.txt index a0d0ffb5e584..e196f16df313 100644 --- a/Documentation/networking/ixgb.txt +++ b/Documentation/networking/ixgb.txt | |||
@@ -309,15 +309,15 @@ Additional Configurations | |||
309 | Ethtool | 309 | Ethtool |
310 | ------- | 310 | ------- |
311 | The driver utilizes the ethtool interface for driver configuration and | 311 | The driver utilizes the ethtool interface for driver configuration and |
312 | diagnostics, as well as displaying statistical information. Ethtool | 312 | diagnostics, as well as displaying statistical information. The ethtool |
313 | version 1.6 or later is required for this functionality. | 313 | version 1.6 or later is required for this functionality. |
314 | 314 | ||
315 | The latest release of ethtool can be found from | 315 | The latest release of ethtool can be found from |
316 | http://sourceforge.net/projects/gkernel | 316 | http://ftp.kernel.org/pub/software/network/ethtool/ |
317 | 317 | ||
318 | NOTE: Ethtool 1.6 only supports a limited set of ethtool options. Support | 318 | NOTE: The ethtool version 1.6 only supports a limited set of ethtool options. |
319 | for a more complete ethtool feature set can be enabled by upgrading | 319 | Support for a more complete ethtool feature set can be enabled by |
320 | to the latest version. | 320 | upgrading to the latest version. |
321 | 321 | ||
322 | 322 | ||
323 | NAPI | 323 | NAPI |
diff --git a/Documentation/networking/ixgbe.txt b/Documentation/networking/ixgbe.txt index eeb68685c788..af77ed3c4172 100644 --- a/Documentation/networking/ixgbe.txt +++ b/Documentation/networking/ixgbe.txt | |||
@@ -1,107 +1,126 @@ | |||
1 | Linux Base Driver for 10 Gigabit PCI Express Intel(R) Network Connection | 1 | Linux Base Driver for 10 Gigabit PCI Express Intel(R) Network Connection |
2 | ======================================================================== | 2 | ======================================================================== |
3 | 3 | ||
4 | March 10, 2009 | 4 | Intel Gigabit Linux driver. |
5 | 5 | Copyright(c) 1999 - 2010 Intel Corporation. | |
6 | 6 | ||
7 | Contents | 7 | Contents |
8 | ======== | 8 | ======== |
9 | 9 | ||
10 | - In This Release | ||
11 | - Identifying Your Adapter | 10 | - Identifying Your Adapter |
12 | - Building and Installation | ||
13 | - Additional Configurations | 11 | - Additional Configurations |
12 | - Performance Tuning | ||
13 | - Known Issues | ||
14 | - Support | 14 | - Support |
15 | 15 | ||
16 | Identifying Your Adapter | ||
17 | ======================== | ||
16 | 18 | ||
19 | The driver in this release is compatible with 82598 and 82599-based Intel | ||
20 | Network Connections. | ||
17 | 21 | ||
18 | In This Release | 22 | For more information on how to identify your adapter, go to the Adapter & |
19 | =============== | 23 | Driver ID Guide at: |
20 | 24 | ||
21 | This file describes the ixgbe Linux Base Driver for the 10 Gigabit PCI | 25 | http://support.intel.com/support/network/sb/CS-012904.htm |
22 | Express Intel(R) Network Connection. This driver includes support for | ||
23 | Itanium(R)2-based systems. | ||
24 | 26 | ||
25 | For questions related to hardware requirements, refer to the documentation | 27 | SFP+ Devices with Pluggable Optics |
26 | supplied with your 10 Gigabit adapter. All hardware requirements listed apply | 28 | ---------------------------------- |
27 | to use with Linux. | ||
28 | 29 | ||
29 | The following features are available in this kernel: | 30 | 82599-BASED ADAPTERS |
30 | - Native VLANs | ||
31 | - Channel Bonding (teaming) | ||
32 | - SNMP | ||
33 | - Generic Receive Offload | ||
34 | - Data Center Bridging | ||
35 | 31 | ||
36 | Channel Bonding documentation can be found in the Linux kernel source: | 32 | NOTES: If your 82599-based Intel(R) Network Adapter came with Intel optics, or |
37 | /Documentation/networking/bonding.txt | 33 | is an Intel(R) Ethernet Server Adapter X520-2, then it only supports Intel |
34 | optics and/or the direct attach cables listed below. | ||
38 | 35 | ||
39 | Ethtool, lspci, and ifconfig can be used to display device and driver | 36 | When 82599-based SFP+ devices are connected back to back, they should be set to |
40 | specific information. | 37 | the same Speed setting via ethtool. Results may vary if you mix speed settings. |
38 | 82598-based adapters support all passive direct attach cables that comply | ||
39 | with SFF-8431 v4.1 and SFF-8472 v10.4 specifications. Active direct attach | ||
40 | cables are not supported. | ||
41 | 41 | ||
42 | Supplier Type Part Numbers | ||
42 | 43 | ||
43 | Identifying Your Adapter | 44 | SR Modules |
44 | ======================== | 45 | Intel DUAL RATE 1G/10G SFP+ SR (bailed) FTLX8571D3BCV-IT |
46 | Intel DUAL RATE 1G/10G SFP+ SR (bailed) AFBR-703SDDZ-IN1 | ||
47 | Intel DUAL RATE 1G/10G SFP+ SR (bailed) AFBR-703SDZ-IN2 | ||
48 | LR Modules | ||
49 | Intel DUAL RATE 1G/10G SFP+ LR (bailed) FTLX1471D3BCV-IT | ||
50 | Intel DUAL RATE 1G/10G SFP+ LR (bailed) AFCT-701SDDZ-IN1 | ||
51 | Intel DUAL RATE 1G/10G SFP+ LR (bailed) AFCT-701SDZ-IN2 | ||
45 | 52 | ||
46 | This driver supports devices based on the 82598 controller and the 82599 | 53 | The following is a list of 3rd party SFP+ modules and direct attach cables that |
47 | controller. | 54 | have received some testing. Not all modules are applicable to all devices. |
48 | 55 | ||
49 | For specific information on identifying which adapter you have, please visit: | 56 | Supplier Type Part Numbers |
50 | 57 | ||
51 | http://support.intel.com/support/network/sb/CS-008441.htm | 58 | Finisar SFP+ SR bailed, 10g single rate FTLX8571D3BCL |
59 | Avago SFP+ SR bailed, 10g single rate AFBR-700SDZ | ||
60 | Finisar SFP+ LR bailed, 10g single rate FTLX1471D3BCL | ||
52 | 61 | ||
62 | Finisar DUAL RATE 1G/10G SFP+ SR (No Bail) FTLX8571D3QCV-IT | ||
63 | Avago DUAL RATE 1G/10G SFP+ SR (No Bail) AFBR-703SDZ-IN1 | ||
64 | Finisar DUAL RATE 1G/10G SFP+ LR (No Bail) FTLX1471D3QCV-IT | ||
65 | Avago DUAL RATE 1G/10G SFP+ LR (No Bail) AFCT-701SDZ-IN1 | ||
66 | Finistar 1000BASE-T SFP FCLF8522P2BTL | ||
67 | Avago 1000BASE-T SFP ABCU-5710RZ | ||
53 | 68 | ||
54 | Building and Installation | 69 | 82599-based adapters support all passive and active limiting direct attach |
55 | ========================= | 70 | cables that comply with SFF-8431 v4.1 and SFF-8472 v10.4 specifications. |
56 | 71 | ||
57 | select m for "Intel(R) 10GbE PCI Express adapters support" located at: | 72 | Laser turns off for SFP+ when ifconfig down |
58 | Location: | 73 | ------------------------------------------- |
59 | -> Device Drivers | 74 | "ifconfig down" turns off the laser for 82599-based SFP+ fiber adapters. |
60 | -> Network device support (NETDEVICES [=y]) | 75 | "ifconfig up" turns on the later. |
61 | -> Ethernet (10000 Mbit) (NETDEV_10000 [=y]) | ||
62 | 76 | ||
63 | 1. make modules & make modules_install | ||
64 | 77 | ||
65 | 2. Load the module: | 78 | 82598-BASED ADAPTERS |
66 | 79 | ||
67 | # modprobe ixgbe | 80 | NOTES for 82598-Based Adapters: |
81 | - Intel(R) Network Adapters that support removable optical modules only support | ||
82 | their original module type (i.e., the Intel(R) 10 Gigabit SR Dual Port | ||
83 | Express Module only supports SR optical modules). If you plug in a different | ||
84 | type of module, the driver will not load. | ||
85 | - Hot Swapping/hot plugging optical modules is not supported. | ||
86 | - Only single speed, 10 gigabit modules are supported. | ||
87 | - LAN on Motherboard (LOMs) may support DA, SR, or LR modules. Other module | ||
88 | types are not supported. Please see your system documentation for details. | ||
68 | 89 | ||
69 | The insmod command can be used if the full | 90 | The following is a list of 3rd party SFP+ modules and direct attach cables that |
70 | path to the driver module is specified. For example: | 91 | have received some testing. Not all modules are applicable to all devices. |
71 | 92 | ||
72 | insmod /lib/modules/<KERNEL VERSION>/kernel/drivers/net/ixgbe/ixgbe.ko | 93 | Supplier Type Part Numbers |
73 | 94 | ||
74 | With 2.6 based kernels also make sure that older ixgbe drivers are | 95 | Finisar SFP+ SR bailed, 10g single rate FTLX8571D3BCL |
75 | removed from the kernel, before loading the new module: | 96 | Avago SFP+ SR bailed, 10g single rate AFBR-700SDZ |
97 | Finisar SFP+ LR bailed, 10g single rate FTLX1471D3BCL | ||
76 | 98 | ||
77 | rmmod ixgbe; modprobe ixgbe | 99 | 82598-based adapters support all passive direct attach cables that comply |
100 | with SFF-8431 v4.1 and SFF-8472 v10.4 specifications. Active direct attach | ||
101 | cables are not supported. | ||
78 | 102 | ||
79 | 3. Assign an IP address to the interface by entering the following, where | ||
80 | x is the interface number: | ||
81 | 103 | ||
82 | ifconfig ethx <IP_address> | 104 | Flow Control |
105 | ------------ | ||
106 | Ethernet Flow Control (IEEE 802.3x) can be configured with ethtool to enable | ||
107 | receiving and transmitting pause frames for ixgbe. When TX is enabled, PAUSE | ||
108 | frames are generated when the receive packet buffer crosses a predefined | ||
109 | threshold. When rx is enabled, the transmit unit will halt for the time delay | ||
110 | specified when a PAUSE frame is received. | ||
83 | 111 | ||
84 | 4. Verify that the interface works. Enter the following, where <IP_address> | 112 | Flow Control is enabled by default. If you want to disable a flow control |
85 | is the IP address for another machine on the same subnet as the interface | 113 | capable link partner, use ethtool: |
86 | that is being tested: | ||
87 | 114 | ||
88 | ping <IP_address> | 115 | ethtool -A eth? autoneg off RX off TX off |
89 | 116 | ||
117 | NOTE: For 82598 backplane cards entering 1 gig mode, flow control default | ||
118 | behavior is changed to off. Flow control in 1 gig mode on these devices can | ||
119 | lead to Tx hangs. | ||
90 | 120 | ||
91 | Additional Configurations | 121 | Additional Configurations |
92 | ========================= | 122 | ========================= |
93 | 123 | ||
94 | Viewing Link Messages | ||
95 | --------------------- | ||
96 | Link messages will not be displayed to the console if the distribution is | ||
97 | restricting system messages. In order to see network driver link messages on | ||
98 | your console, set dmesg to eight by entering the following: | ||
99 | |||
100 | dmesg -n 8 | ||
101 | |||
102 | NOTE: This setting is not saved across reboots. | ||
103 | |||
104 | |||
105 | Jumbo Frames | 124 | Jumbo Frames |
106 | ------------ | 125 | ------------ |
107 | The driver supports Jumbo Frames for all adapters. Jumbo Frames support is | 126 | The driver supports Jumbo Frames for all adapters. Jumbo Frames support is |
@@ -123,13 +142,8 @@ Additional Configurations | |||
123 | other protocols besides TCP. It's also safe to use with configurations that | 142 | other protocols besides TCP. It's also safe to use with configurations that |
124 | are problematic for LRO, namely bridging and iSCSI. | 143 | are problematic for LRO, namely bridging and iSCSI. |
125 | 144 | ||
126 | GRO is enabled by default in the driver. Future versions of ethtool will | ||
127 | support disabling and re-enabling GRO on the fly. | ||
128 | |||
129 | |||
130 | Data Center Bridging, aka DCB | 145 | Data Center Bridging, aka DCB |
131 | ----------------------------- | 146 | ----------------------------- |
132 | |||
133 | DCB is a configuration Quality of Service implementation in hardware. | 147 | DCB is a configuration Quality of Service implementation in hardware. |
134 | It uses the VLAN priority tag (802.1p) to filter traffic. That means | 148 | It uses the VLAN priority tag (802.1p) to filter traffic. That means |
135 | that there are 8 different priorities that traffic can be filtered into. | 149 | that there are 8 different priorities that traffic can be filtered into. |
@@ -163,24 +177,71 @@ Additional Configurations | |||
163 | 177 | ||
164 | http://e1000.sf.net | 178 | http://e1000.sf.net |
165 | 179 | ||
166 | |||
167 | Ethtool | 180 | Ethtool |
168 | ------- | 181 | ------- |
169 | The driver utilizes the ethtool interface for driver configuration and | 182 | The driver utilizes the ethtool interface for driver configuration and |
170 | diagnostics, as well as displaying statistical information. Ethtool | 183 | diagnostics, as well as displaying statistical information. The latest |
171 | version 3.0 or later is required for this functionality. | 184 | ethtool version is required for this functionality. |
172 | 185 | ||
173 | The latest release of ethtool can be found from | 186 | The latest release of ethtool can be found from |
174 | http://sourceforge.net/projects/gkernel. | 187 | http://ftp.kernel.org/pub/software/network/ethtool/ |
175 | 188 | ||
176 | 189 | FCoE | |
177 | NAPI | ||
178 | ---- | 190 | ---- |
191 | This release of the ixgbe driver contains new code to enable users to use | ||
192 | Fiber Channel over Ethernet (FCoE) and Data Center Bridging (DCB) | ||
193 | functionality that is supported by the 82598-based hardware. This code has | ||
194 | no default effect on the regular driver operation, and configuring DCB and | ||
195 | FCoE is outside the scope of this driver README. Refer to | ||
196 | http://www.open-fcoe.org/ for FCoE project information and contact | ||
197 | e1000-eedc@lists.sourceforge.net for DCB information. | ||
198 | |||
199 | MAC and VLAN anti-spoofing feature | ||
200 | ---------------------------------- | ||
201 | When a malicious driver attempts to send a spoofed packet, it is dropped by | ||
202 | the hardware and not transmitted. An interrupt is sent to the PF driver | ||
203 | notifying it of the spoof attempt. | ||
204 | |||
205 | When a spoofed packet is detected the PF driver will send the following | ||
206 | message to the system log (displayed by the "dmesg" command): | ||
207 | |||
208 | Spoof event(s) detected on VF (n) | ||
209 | |||
210 | Where n=the VF that attempted to do the spoofing. | ||
211 | |||
212 | |||
213 | Performance Tuning | ||
214 | ================== | ||
215 | |||
216 | An excellent article on performance tuning can be found at: | ||
217 | |||
218 | http://www.redhat.com/promo/summit/2008/downloads/pdf/Thursday/Mark_Wagner.pdf | ||
219 | |||
220 | |||
221 | Known Issues | ||
222 | ============ | ||
223 | |||
224 | Enabling SR-IOV in a 32-bit Microsoft* Windows* Server 2008 Guest OS using | ||
225 | Intel (R) 82576-based GbE or Intel (R) 82599-based 10GbE controller under KVM | ||
226 | ----------------------------------------------------------------------------- | ||
227 | KVM Hypervisor/VMM supports direct assignment of a PCIe device to a VM. This | ||
228 | includes traditional PCIe devices, as well as SR-IOV-capable devices using | ||
229 | Intel 82576-based and 82599-based controllers. | ||
230 | |||
231 | While direct assignment of a PCIe device or an SR-IOV Virtual Function (VF) | ||
232 | to a Linux-based VM running 2.6.32 or later kernel works fine, there is a | ||
233 | known issue with Microsoft Windows Server 2008 VM that results in a "yellow | ||
234 | bang" error. This problem is within the KVM VMM itself, not the Intel driver, | ||
235 | or the SR-IOV logic of the VMM, but rather that KVM emulates an older CPU | ||
236 | model for the guests, and this older CPU model does not support MSI-X | ||
237 | interrupts, which is a requirement for Intel SR-IOV. | ||
179 | 238 | ||
180 | NAPI (Rx polling mode) is supported in the ixgbe driver. NAPI is enabled | 239 | If you wish to use the Intel 82576 or 82599-based controllers in SR-IOV mode |
181 | by default in the driver. | 240 | with KVM and a Microsoft Windows Server 2008 guest try the following |
241 | workaround. The workaround is to tell KVM to emulate a different model of CPU | ||
242 | when using qemu to create the KVM guest: | ||
182 | 243 | ||
183 | See www.cyberus.ca/~hadi/usenix-paper.tgz for more information on NAPI. | 244 | "-cpu qemu64,model=13" |
184 | 245 | ||
185 | 246 | ||
186 | Support | 247 | Support |
diff --git a/Documentation/networking/ixgbevf.txt b/Documentation/networking/ixgbevf.txt index 21dd5d15b6b4..5a91a41fa946 100644 --- a/Documentation/networking/ixgbevf.txt +++ b/Documentation/networking/ixgbevf.txt | |||
@@ -35,10 +35,6 @@ Driver ID Guide at: | |||
35 | Known Issues/Troubleshooting | 35 | Known Issues/Troubleshooting |
36 | ============================ | 36 | ============================ |
37 | 37 | ||
38 | Unloading Physical Function (PF) Driver Causes System Reboots When VM is | ||
39 | Running and VF is Loaded on the VM | ||
40 | ------------------------------------------------------------------------ | ||
41 | Do not unload the PF driver (ixgbe) while VFs are assigned to guests. | ||
42 | 38 | ||
43 | Support | 39 | Support |
44 | ======= | 40 | ======= |
diff --git a/Documentation/networking/stmmac.txt b/Documentation/networking/stmmac.txt index 7ee770b5ef5f..80a7a3454902 100644 --- a/Documentation/networking/stmmac.txt +++ b/Documentation/networking/stmmac.txt | |||
@@ -7,7 +7,7 @@ This is the driver for the MAC 10/100/1000 on-chip Ethernet controllers | |||
7 | (Synopsys IP blocks); it has been fully tested on STLinux platforms. | 7 | (Synopsys IP blocks); it has been fully tested on STLinux platforms. |
8 | 8 | ||
9 | Currently this network device driver is for all STM embedded MAC/GMAC | 9 | Currently this network device driver is for all STM embedded MAC/GMAC |
10 | (7xxx SoCs). | 10 | (7xxx SoCs). Other platforms start using it i.e. ARM SPEAr. |
11 | 11 | ||
12 | DWC Ether MAC 10/100/1000 Universal version 3.41a and DWC Ether MAC 10/100 | 12 | DWC Ether MAC 10/100/1000 Universal version 3.41a and DWC Ether MAC 10/100 |
13 | Universal version 4.0 have been used for developing the first code | 13 | Universal version 4.0 have been used for developing the first code |
@@ -95,9 +95,14 @@ Several information came from the platform; please refer to the | |||
95 | driver's Header file in include/linux directory. | 95 | driver's Header file in include/linux directory. |
96 | 96 | ||
97 | struct plat_stmmacenet_data { | 97 | struct plat_stmmacenet_data { |
98 | int bus_id; | 98 | int bus_id; |
99 | int pbl; | 99 | int pbl; |
100 | int has_gmac; | 100 | int clk_csr; |
101 | int has_gmac; | ||
102 | int enh_desc; | ||
103 | int tx_coe; | ||
104 | int bugged_jumbo; | ||
105 | int pmt; | ||
101 | void (*fix_mac_speed)(void *priv, unsigned int speed); | 106 | void (*fix_mac_speed)(void *priv, unsigned int speed); |
102 | void (*bus_setup)(unsigned long ioaddr); | 107 | void (*bus_setup)(unsigned long ioaddr); |
103 | #ifdef CONFIG_STM_DRIVERS | 108 | #ifdef CONFIG_STM_DRIVERS |
@@ -114,6 +119,12 @@ Where: | |||
114 | registers (on STM platforms); | 119 | registers (on STM platforms); |
115 | - has_gmac: GMAC core is on board (get it at run-time in the next step); | 120 | - has_gmac: GMAC core is on board (get it at run-time in the next step); |
116 | - bus_id: bus identifier. | 121 | - bus_id: bus identifier. |
122 | - tx_coe: core is able to perform the tx csum in HW. | ||
123 | - enh_desc: if sets the MAC will use the enhanced descriptor structure. | ||
124 | - clk_csr: CSR Clock range selection. | ||
125 | - bugged_jumbo: some HWs are not able to perform the csum in HW for | ||
126 | over-sized frames due to limited buffer sizes. Setting this | ||
127 | flag the csum will be done in SW on JUMBO frames. | ||
117 | 128 | ||
118 | struct plat_stmmacphy_data { | 129 | struct plat_stmmacphy_data { |
119 | int bus_id; | 130 | int bus_id; |
@@ -131,13 +142,28 @@ Where: | |||
131 | - interface: physical MII interface mode; | 142 | - interface: physical MII interface mode; |
132 | - phy_reset: hook to reset HW function. | 143 | - phy_reset: hook to reset HW function. |
133 | 144 | ||
145 | SOURCES: | ||
146 | - Kconfig | ||
147 | - Makefile | ||
148 | - stmmac_main.c: main network device driver; | ||
149 | - stmmac_mdio.c: mdio functions; | ||
150 | - stmmac_ethtool.c: ethtool support; | ||
151 | - stmmac_timer.[ch]: timer code used for mitigating the driver dma interrupts | ||
152 | Only tested on ST40 platforms based. | ||
153 | - stmmac.h: private driver structure; | ||
154 | - common.h: common definitions and VFTs; | ||
155 | - descs.h: descriptor structure definitions; | ||
156 | - dwmac1000_core.c: GMAC core functions; | ||
157 | - dwmac1000_dma.c: dma functions for the GMAC chip; | ||
158 | - dwmac1000.h: specific header file for the GMAC; | ||
159 | - dwmac100_core: MAC 100 core and dma code; | ||
160 | - dwmac100_dma.c: dma funtions for the MAC chip; | ||
161 | - dwmac1000.h: specific header file for the MAC; | ||
162 | - dwmac_lib.c: generic DMA functions shared among chips | ||
163 | - enh_desc.c: functions for handling enhanced descriptors | ||
164 | - norm_desc.c: functions for handling normal descriptors | ||
165 | |||
134 | TODO: | 166 | TODO: |
135 | - Continue to make the driver more generic and suitable for other Synopsys | 167 | - XGMAC controller is not supported. |
136 | Ethernet controllers used on other architectures (i.e. ARM). | ||
137 | - 10G controllers are not supported. | ||
138 | - MAC uses Normal descriptors and GMAC uses enhanced ones. | ||
139 | This is a limit that should be reviewed. MAC could want to | ||
140 | use the enhanced structure. | ||
141 | - Checksumming: Rx/Tx csum is done in HW in case of GMAC only. | ||
142 | - Review the timer optimisation code to use an embedded device that seems to be | 168 | - Review the timer optimisation code to use an embedded device that seems to be |
143 | available in new chip generations. | 169 | available in new chip generations. |
diff --git a/Documentation/nfc/nfc-pn544.txt b/Documentation/nfc/nfc-pn544.txt new file mode 100644 index 000000000000..2fcac9f5996e --- /dev/null +++ b/Documentation/nfc/nfc-pn544.txt | |||
@@ -0,0 +1,114 @@ | |||
1 | Kernel driver for the NXP Semiconductors PN544 Near Field | ||
2 | Communication chip | ||
3 | |||
4 | Author: Jari Vanhala | ||
5 | Contact: Matti Aaltonen (matti.j.aaltonen at nokia.com) | ||
6 | |||
7 | General | ||
8 | ------- | ||
9 | |||
10 | The PN544 is an integrated transmission module for contactless | ||
11 | communication. The driver goes under drives/nfc/ and is compiled as a | ||
12 | module named "pn544". It registers a misc device and creates a device | ||
13 | file named "/dev/pn544". | ||
14 | |||
15 | Host Interfaces: I2C, SPI and HSU, this driver supports currently only I2C. | ||
16 | |||
17 | The Interface | ||
18 | ------------- | ||
19 | |||
20 | The driver offers a sysfs interface for a hardware test and an IOCTL | ||
21 | interface for selecting between two operating modes. There are read, | ||
22 | write and poll functions for transferring messages. The two operating | ||
23 | modes are the normal (HCI) mode and the firmware update mode. | ||
24 | |||
25 | PN544 is controlled by sending messages from the userspace to the | ||
26 | chip. The main function of the driver is just to pass those messages | ||
27 | without caring about the message content. | ||
28 | |||
29 | |||
30 | Protocols | ||
31 | --------- | ||
32 | |||
33 | In the normal (HCI) mode and in the firmware update mode read and | ||
34 | write functions behave a bit differently because the message formats | ||
35 | or the protocols are different. | ||
36 | |||
37 | In the normal (HCI) mode the protocol used is derived from the ETSI | ||
38 | HCI specification. The firmware is updated using a specific protocol, | ||
39 | which is different from HCI. | ||
40 | |||
41 | HCI messages consist of an eight bit header and the message body. The | ||
42 | header contains the message length. Maximum size for an HCI message is | ||
43 | 33. In HCI mode sent messages are tested for a correct | ||
44 | checksum. Firmware update messages have the length in the second (MSB) | ||
45 | and third (LSB) bytes of the message. The maximum FW message length is | ||
46 | 1024 bytes. | ||
47 | |||
48 | For the ETSI HCI specification see | ||
49 | http://www.etsi.org/WebSite/Technologies/ProtocolSpecification.aspx | ||
50 | |||
51 | The Hardware Test | ||
52 | ----------------- | ||
53 | |||
54 | The idea of the test is that it can performed by reading from the | ||
55 | corresponding sysfs file. The test is implemented in the board file | ||
56 | and it should test that PN544 can be put into the firmware update | ||
57 | mode. If the test is not implemented the sysfs file does not get | ||
58 | created. | ||
59 | |||
60 | Example: | ||
61 | > cat /sys/module/pn544/drivers/i2c\:pn544/3-002b/nfc_test | ||
62 | 1 | ||
63 | |||
64 | Normal Operation | ||
65 | ---------------- | ||
66 | |||
67 | PN544 is powered up when the device file is opened, otherwise it's | ||
68 | turned off. Only one instance can use the device at a time. | ||
69 | |||
70 | Userspace applications control PN544 with HCI messages. The hardware | ||
71 | sends an interrupt when data is available for reading. Data is | ||
72 | physically read when the read function is called by a userspace | ||
73 | application. Poll() checks the read interrupt state. Configuration and | ||
74 | self testing are also done from the userspace using read and write. | ||
75 | |||
76 | Example platform data: | ||
77 | |||
78 | static int rx71_pn544_nfc_request_resources(struct i2c_client *client) | ||
79 | { | ||
80 | /* Get and setup the HW resources for the device */ | ||
81 | } | ||
82 | |||
83 | static void rx71_pn544_nfc_free_resources(void) | ||
84 | { | ||
85 | /* Release the HW resources */ | ||
86 | } | ||
87 | |||
88 | static void rx71_pn544_nfc_enable(int fw) | ||
89 | { | ||
90 | /* Turn the device on */ | ||
91 | } | ||
92 | |||
93 | static int rx71_pn544_nfc_test(void) | ||
94 | { | ||
95 | /* | ||
96 | * Put the device into the FW update mode | ||
97 | * and then back to the normal mode. | ||
98 | * Check the behavior and return one on success, | ||
99 | * zero on failure. | ||
100 | */ | ||
101 | } | ||
102 | |||
103 | static void rx71_pn544_nfc_disable(void) | ||
104 | { | ||
105 | /* turn the power off */ | ||
106 | } | ||
107 | |||
108 | static struct pn544_nfc_platform_data rx71_nfc_data = { | ||
109 | .request_resources = rx71_pn544_nfc_request_resources, | ||
110 | .free_resources = rx71_pn544_nfc_free_resources, | ||
111 | .enable = rx71_pn544_nfc_enable, | ||
112 | .test = rx71_pn544_nfc_test, | ||
113 | .disable = rx71_pn544_nfc_disable, | ||
114 | }; | ||
diff --git a/Documentation/power/drivers-testing.txt b/Documentation/power/drivers-testing.txt index 7f7a737f7f9f..638afdf4d6b8 100644 --- a/Documentation/power/drivers-testing.txt +++ b/Documentation/power/drivers-testing.txt | |||
@@ -23,10 +23,10 @@ Once you have resolved the suspend/resume-related problems with your test system | |||
23 | without the new driver, you are ready to test it: | 23 | without the new driver, you are ready to test it: |
24 | 24 | ||
25 | a) Build the driver as a module, load it and try the test modes of hibernation | 25 | a) Build the driver as a module, load it and try the test modes of hibernation |
26 | (see: Documents/power/basic-pm-debugging.txt, 1). | 26 | (see: Documentation/power/basic-pm-debugging.txt, 1). |
27 | 27 | ||
28 | b) Load the driver and attempt to hibernate in the "reboot", "shutdown" and | 28 | b) Load the driver and attempt to hibernate in the "reboot", "shutdown" and |
29 | "platform" modes (see: Documents/power/basic-pm-debugging.txt, 1). | 29 | "platform" modes (see: Documentation/power/basic-pm-debugging.txt, 1). |
30 | 30 | ||
31 | c) Compile the driver directly into the kernel and try the test modes of | 31 | c) Compile the driver directly into the kernel and try the test modes of |
32 | hibernation. | 32 | hibernation. |
@@ -34,12 +34,12 @@ c) Compile the driver directly into the kernel and try the test modes of | |||
34 | d) Attempt to hibernate with the driver compiled directly into the kernel | 34 | d) Attempt to hibernate with the driver compiled directly into the kernel |
35 | in the "reboot", "shutdown" and "platform" modes. | 35 | in the "reboot", "shutdown" and "platform" modes. |
36 | 36 | ||
37 | e) Try the test modes of suspend (see: Documents/power/basic-pm-debugging.txt, | 37 | e) Try the test modes of suspend (see: Documentation/power/basic-pm-debugging.txt, |
38 | 2). [As far as the STR tests are concerned, it should not matter whether or | 38 | 2). [As far as the STR tests are concerned, it should not matter whether or |
39 | not the driver is built as a module.] | 39 | not the driver is built as a module.] |
40 | 40 | ||
41 | f) Attempt to suspend to RAM using the s2ram tool with the driver loaded | 41 | f) Attempt to suspend to RAM using the s2ram tool with the driver loaded |
42 | (see: Documents/power/basic-pm-debugging.txt, 2). | 42 | (see: Documentation/power/basic-pm-debugging.txt, 2). |
43 | 43 | ||
44 | Each of the above tests should be repeated several times and the STD tests | 44 | Each of the above tests should be repeated several times and the STD tests |
45 | should be mixed with the STR tests. If any of them fails, the driver cannot be | 45 | should be mixed with the STR tests. If any of them fails, the driver cannot be |
diff --git a/Documentation/power/opp.txt b/Documentation/power/opp.txt index 44d87ad3cea9..cd445582d1f8 100644 --- a/Documentation/power/opp.txt +++ b/Documentation/power/opp.txt | |||
@@ -37,6 +37,9 @@ Typical usage of the OPP library is as follows: | |||
37 | SoC framework -> modifies on required cases certain OPPs -> OPP layer | 37 | SoC framework -> modifies on required cases certain OPPs -> OPP layer |
38 | -> queries to search/retrieve information -> | 38 | -> queries to search/retrieve information -> |
39 | 39 | ||
40 | Architectures that provide a SoC framework for OPP should select ARCH_HAS_OPP | ||
41 | to make the OPP layer available. | ||
42 | |||
40 | OPP layer expects each domain to be represented by a unique device pointer. SoC | 43 | OPP layer expects each domain to be represented by a unique device pointer. SoC |
41 | framework registers a set of initial OPPs per device with the OPP layer. This | 44 | framework registers a set of initial OPPs per device with the OPP layer. This |
42 | list is expected to be an optimally small number typically around 5 per device. | 45 | list is expected to be an optimally small number typically around 5 per device. |
diff --git a/Documentation/power/runtime_pm.txt b/Documentation/power/runtime_pm.txt index 489e9bacd165..ffe55ffa540a 100644 --- a/Documentation/power/runtime_pm.txt +++ b/Documentation/power/runtime_pm.txt | |||
@@ -50,6 +50,15 @@ type's callbacks are not defined) of given device. The bus type, device type | |||
50 | and device class callbacks are referred to as subsystem-level callbacks in what | 50 | and device class callbacks are referred to as subsystem-level callbacks in what |
51 | follows. | 51 | follows. |
52 | 52 | ||
53 | By default, the callbacks are always invoked in process context with interrupts | ||
54 | enabled. However, subsystems can use the pm_runtime_irq_safe() helper function | ||
55 | to tell the PM core that a device's ->runtime_suspend() and ->runtime_resume() | ||
56 | callbacks should be invoked in atomic context with interrupts disabled | ||
57 | (->runtime_idle() is still invoked the default way). This implies that these | ||
58 | callback routines must not block or sleep, but it also means that the | ||
59 | synchronous helper functions listed at the end of Section 4 can be used within | ||
60 | an interrupt handler or in an atomic context. | ||
61 | |||
53 | The subsystem-level suspend callback is _entirely_ _responsible_ for handling | 62 | The subsystem-level suspend callback is _entirely_ _responsible_ for handling |
54 | the suspend of the device as appropriate, which may, but need not include | 63 | the suspend of the device as appropriate, which may, but need not include |
55 | executing the device driver's own ->runtime_suspend() callback (from the | 64 | executing the device driver's own ->runtime_suspend() callback (from the |
@@ -237,6 +246,10 @@ defined in include/linux/pm.h: | |||
237 | Section 8); it may be modified only by the pm_runtime_no_callbacks() | 246 | Section 8); it may be modified only by the pm_runtime_no_callbacks() |
238 | helper function | 247 | helper function |
239 | 248 | ||
249 | unsigned int irq_safe; | ||
250 | - indicates that the ->runtime_suspend() and ->runtime_resume() callbacks | ||
251 | will be invoked with the spinlock held and interrupts disabled | ||
252 | |||
240 | unsigned int use_autosuspend; | 253 | unsigned int use_autosuspend; |
241 | - indicates that the device's driver supports delayed autosuspend (see | 254 | - indicates that the device's driver supports delayed autosuspend (see |
242 | Section 9); it may be modified only by the | 255 | Section 9); it may be modified only by the |
@@ -344,6 +357,10 @@ drivers/base/power/runtime.c and include/linux/pm_runtime.h: | |||
344 | - decrement the device's usage counter; if the result is 0 then run | 357 | - decrement the device's usage counter; if the result is 0 then run |
345 | pm_runtime_idle(dev) and return its result | 358 | pm_runtime_idle(dev) and return its result |
346 | 359 | ||
360 | int pm_runtime_put_sync_suspend(struct device *dev); | ||
361 | - decrement the device's usage counter; if the result is 0 then run | ||
362 | pm_runtime_suspend(dev) and return its result | ||
363 | |||
347 | int pm_runtime_put_sync_autosuspend(struct device *dev); | 364 | int pm_runtime_put_sync_autosuspend(struct device *dev); |
348 | - decrement the device's usage counter; if the result is 0 then run | 365 | - decrement the device's usage counter; if the result is 0 then run |
349 | pm_runtime_autosuspend(dev) and return its result | 366 | pm_runtime_autosuspend(dev) and return its result |
@@ -379,8 +396,8 @@ drivers/base/power/runtime.c and include/linux/pm_runtime.h: | |||
379 | zero) | 396 | zero) |
380 | 397 | ||
381 | bool pm_runtime_suspended(struct device *dev); | 398 | bool pm_runtime_suspended(struct device *dev); |
382 | - return true if the device's runtime PM status is 'suspended', or false | 399 | - return true if the device's runtime PM status is 'suspended' and its |
383 | otherwise | 400 | 'power.disable_depth' field is equal to zero, or false otherwise |
384 | 401 | ||
385 | void pm_runtime_allow(struct device *dev); | 402 | void pm_runtime_allow(struct device *dev); |
386 | - set the power.runtime_auto flag for the device and decrease its usage | 403 | - set the power.runtime_auto flag for the device and decrease its usage |
@@ -397,6 +414,11 @@ drivers/base/power/runtime.c and include/linux/pm_runtime.h: | |||
397 | PM attributes from /sys/devices/.../power (or prevent them from being | 414 | PM attributes from /sys/devices/.../power (or prevent them from being |
398 | added when the device is registered) | 415 | added when the device is registered) |
399 | 416 | ||
417 | void pm_runtime_irq_safe(struct device *dev); | ||
418 | - set the power.irq_safe flag for the device, causing the runtime-PM | ||
419 | suspend and resume callbacks (but not the idle callback) to be invoked | ||
420 | with interrupts disabled | ||
421 | |||
400 | void pm_runtime_mark_last_busy(struct device *dev); | 422 | void pm_runtime_mark_last_busy(struct device *dev); |
401 | - set the power.last_busy field to the current time | 423 | - set the power.last_busy field to the current time |
402 | 424 | ||
@@ -438,6 +460,15 @@ pm_runtime_suspended() | |||
438 | pm_runtime_mark_last_busy() | 460 | pm_runtime_mark_last_busy() |
439 | pm_runtime_autosuspend_expiration() | 461 | pm_runtime_autosuspend_expiration() |
440 | 462 | ||
463 | If pm_runtime_irq_safe() has been called for a device then the following helper | ||
464 | functions may also be used in interrupt context: | ||
465 | |||
466 | pm_runtime_suspend() | ||
467 | pm_runtime_autosuspend() | ||
468 | pm_runtime_resume() | ||
469 | pm_runtime_get_sync() | ||
470 | pm_runtime_put_sync_suspend() | ||
471 | |||
441 | 5. Run-time PM Initialization, Device Probing and Removal | 472 | 5. Run-time PM Initialization, Device Probing and Removal |
442 | 473 | ||
443 | Initially, the run-time PM is disabled for all devices, which means that the | 474 | Initially, the run-time PM is disabled for all devices, which means that the |
diff --git a/Documentation/powerpc/booting-without-of.txt b/Documentation/powerpc/booting-without-of.txt index 302db5da49b3..7400d7555dc3 100644 --- a/Documentation/powerpc/booting-without-of.txt +++ b/Documentation/powerpc/booting-without-of.txt | |||
@@ -131,7 +131,7 @@ order to avoid the degeneration that had become the ppc32 kernel entry | |||
131 | point and the way a new platform should be added to the kernel. The | 131 | point and the way a new platform should be added to the kernel. The |
132 | legacy iSeries platform breaks those rules as it predates this scheme, | 132 | legacy iSeries platform breaks those rules as it predates this scheme, |
133 | but no new board support will be accepted in the main tree that | 133 | but no new board support will be accepted in the main tree that |
134 | doesn't follows them properly. In addition, since the advent of the | 134 | doesn't follow them properly. In addition, since the advent of the |
135 | arch/powerpc merged architecture for ppc32 and ppc64, new 32-bit | 135 | arch/powerpc merged architecture for ppc32 and ppc64, new 32-bit |
136 | platforms and 32-bit platforms which move into arch/powerpc will be | 136 | platforms and 32-bit platforms which move into arch/powerpc will be |
137 | required to use these rules as well. | 137 | required to use these rules as well. |
@@ -1025,7 +1025,7 @@ dtc source code can be found at | |||
1025 | 1025 | ||
1026 | WARNING: This version is still in early development stage; the | 1026 | WARNING: This version is still in early development stage; the |
1027 | resulting device-tree "blobs" have not yet been validated with the | 1027 | resulting device-tree "blobs" have not yet been validated with the |
1028 | kernel. The current generated bloc lacks a useful reserve map (it will | 1028 | kernel. The current generated block lacks a useful reserve map (it will |
1029 | be fixed to generate an empty one, it's up to the bootloader to fill | 1029 | be fixed to generate an empty one, it's up to the bootloader to fill |
1030 | it up) among others. The error handling needs work, bugs are lurking, | 1030 | it up) among others. The error handling needs work, bugs are lurking, |
1031 | etc... | 1031 | etc... |
@@ -1098,7 +1098,7 @@ supported currently at the toplevel. | |||
1098 | * an arbitrary array of bytes | 1098 | * an arbitrary array of bytes |
1099 | */ | 1099 | */ |
1100 | 1100 | ||
1101 | childnode@addresss { /* define a child node named "childnode" | 1101 | childnode@address { /* define a child node named "childnode" |
1102 | * whose unit name is "childnode at | 1102 | * whose unit name is "childnode at |
1103 | * address" | 1103 | * address" |
1104 | */ | 1104 | */ |
diff --git a/Documentation/powerpc/dts-bindings/4xx/cpm.txt b/Documentation/powerpc/dts-bindings/4xx/cpm.txt new file mode 100644 index 000000000000..ee459806d35e --- /dev/null +++ b/Documentation/powerpc/dts-bindings/4xx/cpm.txt | |||
@@ -0,0 +1,52 @@ | |||
1 | PPC4xx Clock Power Management (CPM) node | ||
2 | |||
3 | Required properties: | ||
4 | - compatible : compatible list, currently only "ibm,cpm" | ||
5 | - dcr-access-method : "native" | ||
6 | - dcr-reg : < DCR register range > | ||
7 | |||
8 | Optional properties: | ||
9 | - er-offset : All 4xx SoCs with a CPM controller have | ||
10 | one of two different order for the CPM | ||
11 | registers. Some have the CPM registers | ||
12 | in the following order (ER,FR,SR). The | ||
13 | others have them in the following order | ||
14 | (SR,ER,FR). For the second case set | ||
15 | er-offset = <1>. | ||
16 | - unused-units : specifier consist of one cell. For each | ||
17 | bit in the cell, the corresponding bit | ||
18 | in CPM will be set to turn off unused | ||
19 | devices. | ||
20 | - idle-doze : specifier consist of one cell. For each | ||
21 | bit in the cell, the corresponding bit | ||
22 | in CPM will be set to turn off unused | ||
23 | devices. This is usually just CPM[CPU]. | ||
24 | - standby : specifier consist of one cell. For each | ||
25 | bit in the cell, the corresponding bit | ||
26 | in CPM will be set on standby and | ||
27 | restored on resume. | ||
28 | - suspend : specifier consist of one cell. For each | ||
29 | bit in the cell, the corresponding bit | ||
30 | in CPM will be set on suspend (mem) and | ||
31 | restored on resume. Note, for standby | ||
32 | and suspend the corresponding bits can | ||
33 | be different or the same. Usually for | ||
34 | standby only class 2 and 3 units are set. | ||
35 | However, the interface does not care. | ||
36 | If they are the same, the additional | ||
37 | power saving will be seeing if support | ||
38 | is available to put the DDR in self | ||
39 | refresh mode and any additional power | ||
40 | saving techniques for the specific SoC. | ||
41 | |||
42 | Example: | ||
43 | CPM0: cpm { | ||
44 | compatible = "ibm,cpm"; | ||
45 | dcr-access-method = "native"; | ||
46 | dcr-reg = <0x160 0x003>; | ||
47 | er-offset = <0>; | ||
48 | unused-units = <0x00000100>; | ||
49 | idle-doze = <0x02000000>; | ||
50 | standby = <0xfeff0000>; | ||
51 | suspend = <0xfeff791d>; | ||
52 | }; | ||
diff --git a/Documentation/powerpc/dts-bindings/eeprom.txt b/Documentation/powerpc/dts-bindings/eeprom.txt new file mode 100644 index 000000000000..4342c10de1bf --- /dev/null +++ b/Documentation/powerpc/dts-bindings/eeprom.txt | |||
@@ -0,0 +1,28 @@ | |||
1 | EEPROMs (I2C) | ||
2 | |||
3 | Required properties: | ||
4 | |||
5 | - compatible : should be "<manufacturer>,<type>" | ||
6 | If there is no specific driver for <manufacturer>, a generic | ||
7 | driver based on <type> is selected. Possible types are: | ||
8 | 24c00, 24c01, 24c02, 24c04, 24c08, 24c16, 24c32, 24c64, | ||
9 | 24c128, 24c256, 24c512, 24c1024, spd | ||
10 | |||
11 | - reg : the I2C address of the EEPROM | ||
12 | |||
13 | Optional properties: | ||
14 | |||
15 | - pagesize : the length of the pagesize for writing. Please consult the | ||
16 | manual of your device, that value varies a lot. A wrong value | ||
17 | may result in data loss! If not specified, a safety value of | ||
18 | '1' is used which will be very slow. | ||
19 | |||
20 | - read-only: this parameterless property disables writes to the eeprom | ||
21 | |||
22 | Example: | ||
23 | |||
24 | eeprom@52 { | ||
25 | compatible = "atmel,24c32"; | ||
26 | reg = <0x52>; | ||
27 | pagesize = <32>; | ||
28 | }; | ||
diff --git a/Documentation/pps/pps.txt b/Documentation/pps/pps.txt index 125f4ab48998..d35dcdd82ff6 100644 --- a/Documentation/pps/pps.txt +++ b/Documentation/pps/pps.txt | |||
@@ -170,3 +170,49 @@ and the run ppstest as follow: | |||
170 | 170 | ||
171 | Please, note that to compile userland programs you need the file timepps.h | 171 | Please, note that to compile userland programs you need the file timepps.h |
172 | (see Documentation/pps/). | 172 | (see Documentation/pps/). |
173 | |||
174 | |||
175 | Generators | ||
176 | ---------- | ||
177 | |||
178 | Sometimes one needs to be able not only to catch PPS signals but to produce | ||
179 | them also. For example, running a distributed simulation, which requires | ||
180 | computers' clock to be synchronized very tightly. One way to do this is to | ||
181 | invent some complicated hardware solutions but it may be neither necessary | ||
182 | nor affordable. The cheap way is to load a PPS generator on one of the | ||
183 | computers (master) and PPS clients on others (slaves), and use very simple | ||
184 | cables to deliver signals using parallel ports, for example. | ||
185 | |||
186 | Parallel port cable pinout: | ||
187 | pin name master slave | ||
188 | 1 STROBE *------ * | ||
189 | 2 D0 * | * | ||
190 | 3 D1 * | * | ||
191 | 4 D2 * | * | ||
192 | 5 D3 * | * | ||
193 | 6 D4 * | * | ||
194 | 7 D5 * | * | ||
195 | 8 D6 * | * | ||
196 | 9 D7 * | * | ||
197 | 10 ACK * ------* | ||
198 | 11 BUSY * * | ||
199 | 12 PE * * | ||
200 | 13 SEL * * | ||
201 | 14 AUTOFD * * | ||
202 | 15 ERROR * * | ||
203 | 16 INIT * * | ||
204 | 17 SELIN * * | ||
205 | 18-25 GND *-----------* | ||
206 | |||
207 | Please note that parallel port interrupt occurs only on high->low transition, | ||
208 | so it is used for PPS assert edge. PPS clear edge can be determined only | ||
209 | using polling in the interrupt handler which actually can be done way more | ||
210 | precisely because interrupt handling delays can be quite big and random. So | ||
211 | current parport PPS generator implementation (pps_gen_parport module) is | ||
212 | geared towards using the clear edge for time synchronization. | ||
213 | |||
214 | Clear edge polling is done with disabled interrupts so it's better to select | ||
215 | delay between assert and clear edge as small as possible to reduce system | ||
216 | latencies. But if it is too small slave won't be able to capture clear edge | ||
217 | transition. The default of 30us should be good enough in most situations. | ||
218 | The delay can be selected using 'delay' pps_gen_parport module parameter. | ||
diff --git a/Documentation/scheduler/00-INDEX b/Documentation/scheduler/00-INDEX index 3c00c9c3219e..d2651c47ae27 100644 --- a/Documentation/scheduler/00-INDEX +++ b/Documentation/scheduler/00-INDEX | |||
@@ -3,7 +3,7 @@ | |||
3 | sched-arch.txt | 3 | sched-arch.txt |
4 | - CPU Scheduler implementation hints for architecture specific code. | 4 | - CPU Scheduler implementation hints for architecture specific code. |
5 | sched-design-CFS.txt | 5 | sched-design-CFS.txt |
6 | - goals, design and implementation of the Complete Fair Scheduler. | 6 | - goals, design and implementation of the Completely Fair Scheduler. |
7 | sched-domains.txt | 7 | sched-domains.txt |
8 | - information on scheduling domains. | 8 | - information on scheduling domains. |
9 | sched-nice-design.txt | 9 | sched-nice-design.txt |
diff --git a/Documentation/scsi/ChangeLog.lpfc b/Documentation/scsi/ChangeLog.lpfc index 337c924cc81f..5e83769c6aa9 100644 --- a/Documentation/scsi/ChangeLog.lpfc +++ b/Documentation/scsi/ChangeLog.lpfc | |||
@@ -573,7 +573,7 @@ Changes from 20041018 to 20041123 | |||
573 | * Backround nodev_timeout processing to DPC This enables us to | 573 | * Backround nodev_timeout processing to DPC This enables us to |
574 | unblock (stop dev_loss_tmo) when appopriate. | 574 | unblock (stop dev_loss_tmo) when appopriate. |
575 | * Fix array discovery with multiple luns. The max_luns was 0 at | 575 | * Fix array discovery with multiple luns. The max_luns was 0 at |
576 | the time the host structure was intialized. lpfc_cfg_params | 576 | the time the host structure was initialized. lpfc_cfg_params |
577 | then set the max_luns to the correct value afterwards. | 577 | then set the max_luns to the correct value afterwards. |
578 | * Remove unused define LPFC_MAX_LUN and set the default value of | 578 | * Remove unused define LPFC_MAX_LUN and set the default value of |
579 | lpfc_max_lun parameter to 512. | 579 | lpfc_max_lun parameter to 512. |
diff --git a/Documentation/scsi/ChangeLog.megaraid_sas b/Documentation/scsi/ChangeLog.megaraid_sas index 00301ed9c371..b64d10d221ec 100644 --- a/Documentation/scsi/ChangeLog.megaraid_sas +++ b/Documentation/scsi/ChangeLog.megaraid_sas | |||
@@ -1,3 +1,25 @@ | |||
1 | Release Date : Tues. Dec 14, 2010 17:00:00 PST 2010 - | ||
2 | (emaild-id:megaraidlinux@lsi.com) | ||
3 | Adam Radford | ||
4 | Current Version : 00.00.05.29-rc1 | ||
5 | Old Version : 00.00.04.31-rc1 | ||
6 | 1. Rename megaraid_sas.c to megaraid_sas_base.c. | ||
7 | 2. Update GPL headers. | ||
8 | 3. Add MSI-X support and 'msix_disable' module parameter. | ||
9 | 4. Use lowest memory bar (for SR-IOV VF support). | ||
10 | 5. Add struct megasas_instance_temlate changes, and change all code to use | ||
11 | new instance entries: | ||
12 | |||
13 | irqreturn_t (*service_isr )(int irq, void *devp); | ||
14 | void (*tasklet)(unsigned long); | ||
15 | u32 (*init_adapter)(struct megasas_instance *); | ||
16 | u32 (*build_and_issue_cmd) (struct megasas_instance *, | ||
17 | struct scsi_cmnd *); | ||
18 | void (*issue_dcmd) (struct megasas_instance *instance, | ||
19 | struct megasas_cmd *cmd); | ||
20 | |||
21 | 6. Add code to support MegaRAID 9265/9285 controllers device id (0x5b). | ||
22 | ------------------------------------------------------------------------------- | ||
1 | 1 Release Date : Thur. May 03, 2010 09:12:45 PST 2009 - | 23 | 1 Release Date : Thur. May 03, 2010 09:12:45 PST 2009 - |
2 | (emaild-id:megaraidlinux@lsi.com) | 24 | (emaild-id:megaraidlinux@lsi.com) |
3 | Bo Yang | 25 | Bo Yang |
diff --git a/Documentation/scsi/scsi_mid_low_api.txt b/Documentation/scsi/scsi_mid_low_api.txt index 570ef2b3d79b..df322c103466 100644 --- a/Documentation/scsi/scsi_mid_low_api.txt +++ b/Documentation/scsi/scsi_mid_low_api.txt | |||
@@ -1044,9 +1044,9 @@ Details: | |||
1044 | 1044 | ||
1045 | 1045 | ||
1046 | /** | 1046 | /** |
1047 | * queuecommand - queue scsi command, invoke 'done' on completion | 1047 | * queuecommand - queue scsi command, invoke scp->scsi_done on completion |
1048 | * @shost: pointer to the scsi host object | ||
1048 | * @scp: pointer to scsi command object | 1049 | * @scp: pointer to scsi command object |
1049 | * @done: function pointer to be invoked on completion | ||
1050 | * | 1050 | * |
1051 | * Returns 0 on success. | 1051 | * Returns 0 on success. |
1052 | * | 1052 | * |
@@ -1074,42 +1074,45 @@ Details: | |||
1074 | * | 1074 | * |
1075 | * Other types of errors that are detected immediately may be | 1075 | * Other types of errors that are detected immediately may be |
1076 | * flagged by setting scp->result to an appropriate value, | 1076 | * flagged by setting scp->result to an appropriate value, |
1077 | * invoking the 'done' callback, and then returning 0 from this | 1077 | * invoking the scp->scsi_done callback, and then returning 0 |
1078 | * function. If the command is not performed immediately (and the | 1078 | * from this function. If the command is not performed |
1079 | * LLD is starting (or will start) the given command) then this | 1079 | * immediately (and the LLD is starting (or will start) the given |
1080 | * function should place 0 in scp->result and return 0. | 1080 | * command) then this function should place 0 in scp->result and |
1081 | * return 0. | ||
1081 | * | 1082 | * |
1082 | * Command ownership. If the driver returns zero, it owns the | 1083 | * Command ownership. If the driver returns zero, it owns the |
1083 | * command and must take responsibility for ensuring the 'done' | 1084 | * command and must take responsibility for ensuring the |
1084 | * callback is executed. Note: the driver may call done before | 1085 | * scp->scsi_done callback is executed. Note: the driver may |
1085 | * returning zero, but after it has called done, it may not | 1086 | * call scp->scsi_done before returning zero, but after it has |
1086 | * return any value other than zero. If the driver makes a | 1087 | * called scp->scsi_done, it may not return any value other than |
1087 | * non-zero return, it must not execute the command's done | 1088 | * zero. If the driver makes a non-zero return, it must not |
1088 | * callback at any time. | 1089 | * execute the command's scsi_done callback at any time. |
1089 | * | 1090 | * |
1090 | * Locks: struct Scsi_Host::host_lock held on entry (with "irqsave") | 1091 | * Locks: up to and including 2.6.36, struct Scsi_Host::host_lock |
1091 | * and is expected to be held on return. | 1092 | * held on entry (with "irqsave") and is expected to be |
1093 | * held on return. From 2.6.37 onwards, queuecommand is | ||
1094 | * called without any locks held. | ||
1092 | * | 1095 | * |
1093 | * Calling context: in interrupt (soft irq) or process context | 1096 | * Calling context: in interrupt (soft irq) or process context |
1094 | * | 1097 | * |
1095 | * Notes: This function should be relatively fast. Normally it will | 1098 | * Notes: This function should be relatively fast. Normally it |
1096 | * not wait for IO to complete. Hence the 'done' callback is invoked | 1099 | * will not wait for IO to complete. Hence the scp->scsi_done |
1097 | * (often directly from an interrupt service routine) some time after | 1100 | * callback is invoked (often directly from an interrupt service |
1098 | * this function has returned. In some cases (e.g. pseudo adapter | 1101 | * routine) some time after this function has returned. In some |
1099 | * drivers that manufacture the response to a SCSI INQUIRY) | 1102 | * cases (e.g. pseudo adapter drivers that manufacture the |
1100 | * the 'done' callback may be invoked before this function returns. | 1103 | * response to a SCSI INQUIRY) the scp->scsi_done callback may be |
1101 | * If the 'done' callback is not invoked within a certain period | 1104 | * invoked before this function returns. If the scp->scsi_done |
1102 | * the SCSI mid level will commence error processing. | 1105 | * callback is not invoked within a certain period the SCSI mid |
1103 | * If a status of CHECK CONDITION is placed in "result" when the | 1106 | * level will commence error processing. If a status of CHECK |
1104 | * 'done' callback is invoked, then the LLD driver should | 1107 | * CONDITION is placed in "result" when the scp->scsi_done |
1105 | * perform autosense and fill in the struct scsi_cmnd::sense_buffer | 1108 | * callback is invoked, then the LLD driver should perform |
1109 | * autosense and fill in the struct scsi_cmnd::sense_buffer | ||
1106 | * array. The scsi_cmnd::sense_buffer array is zeroed prior to | 1110 | * array. The scsi_cmnd::sense_buffer array is zeroed prior to |
1107 | * the mid level queuing a command to an LLD. | 1111 | * the mid level queuing a command to an LLD. |
1108 | * | 1112 | * |
1109 | * Defined in: LLD | 1113 | * Defined in: LLD |
1110 | **/ | 1114 | **/ |
1111 | int queuecommand(struct scsi_cmnd * scp, | 1115 | int queuecommand(struct Scsi_Host *shost, struct scsi_cmnd * scp) |
1112 | void (*done)(struct scsi_cmnd *)) | ||
1113 | 1116 | ||
1114 | 1117 | ||
1115 | /** | 1118 | /** |
diff --git a/Documentation/serial/00-INDEX b/Documentation/serial/00-INDEX index 07dcdb0d2a36..e09468ad3cb1 100644 --- a/Documentation/serial/00-INDEX +++ b/Documentation/serial/00-INDEX | |||
@@ -14,6 +14,8 @@ riscom8.txt | |||
14 | - notes on using the RISCom/8 multi-port serial driver. | 14 | - notes on using the RISCom/8 multi-port serial driver. |
15 | rocket.txt | 15 | rocket.txt |
16 | - info on the Comtrol RocketPort multiport serial driver. | 16 | - info on the Comtrol RocketPort multiport serial driver. |
17 | serial-rs485.txt | ||
18 | - info about RS485 structures and support in the kernel. | ||
17 | specialix.txt | 19 | specialix.txt |
18 | - info on hardware/driver for specialix IO8+ multiport serial card. | 20 | - info on hardware/driver for specialix IO8+ multiport serial card. |
19 | stallion.txt | 21 | stallion.txt |
diff --git a/Documentation/serial/serial-rs485.txt b/Documentation/serial/serial-rs485.txt new file mode 100644 index 000000000000..a4932387bbfb --- /dev/null +++ b/Documentation/serial/serial-rs485.txt | |||
@@ -0,0 +1,120 @@ | |||
1 | RS485 SERIAL COMMUNICATIONS | ||
2 | |||
3 | 1. INTRODUCTION | ||
4 | |||
5 | EIA-485, also known as TIA/EIA-485 or RS-485, is a standard defining the | ||
6 | electrical characteristics of drivers and receivers for use in balanced | ||
7 | digital multipoint systems. | ||
8 | This standard is widely used for communications in industrial automation | ||
9 | because it can be used effectively over long distances and in electrically | ||
10 | noisy environments. | ||
11 | |||
12 | 2. HARDWARE-RELATED CONSIDERATIONS | ||
13 | |||
14 | Some CPUs/UARTs (e.g., Atmel AT91 or 16C950 UART) contain a built-in | ||
15 | half-duplex mode capable of automatically controlling line direction by | ||
16 | toggling RTS or DTR signals. That can be used to control external | ||
17 | half-duplex hardware like an RS485 transceiver or any RS232-connected | ||
18 | half-duplex devices like some modems. | ||
19 | |||
20 | For these microcontrollers, the Linux driver should be made capable of | ||
21 | working in both modes, and proper ioctls (see later) should be made | ||
22 | available at user-level to allow switching from one mode to the other, and | ||
23 | vice versa. | ||
24 | |||
25 | 3. DATA STRUCTURES ALREADY AVAILABLE IN THE KERNEL | ||
26 | |||
27 | The Linux kernel provides the serial_rs485 structure (see [1]) to handle | ||
28 | RS485 communications. This data structure is used to set and configure RS485 | ||
29 | parameters in the platform data and in ioctls. | ||
30 | |||
31 | Any driver for devices capable of working both as RS232 and RS485 should | ||
32 | provide at least the following ioctls: | ||
33 | |||
34 | - TIOCSRS485 (typically associated with number 0x542F). This ioctl is used | ||
35 | to enable/disable RS485 mode from user-space | ||
36 | |||
37 | - TIOCGRS485 (typically associated with number 0x542E). This ioctl is used | ||
38 | to get RS485 mode from kernel-space (i.e., driver) to user-space. | ||
39 | |||
40 | In other words, the serial driver should contain a code similar to the next | ||
41 | one: | ||
42 | |||
43 | static struct uart_ops atmel_pops = { | ||
44 | /* ... */ | ||
45 | .ioctl = handle_ioctl, | ||
46 | }; | ||
47 | |||
48 | static int handle_ioctl(struct uart_port *port, | ||
49 | unsigned int cmd, | ||
50 | unsigned long arg) | ||
51 | { | ||
52 | struct serial_rs485 rs485conf; | ||
53 | |||
54 | switch (cmd) { | ||
55 | case TIOCSRS485: | ||
56 | if (copy_from_user(&rs485conf, | ||
57 | (struct serial_rs485 *) arg, | ||
58 | sizeof(rs485conf))) | ||
59 | return -EFAULT; | ||
60 | |||
61 | /* ... */ | ||
62 | break; | ||
63 | |||
64 | case TIOCGRS485: | ||
65 | if (copy_to_user((struct serial_rs485 *) arg, | ||
66 | ..., | ||
67 | sizeof(rs485conf))) | ||
68 | return -EFAULT; | ||
69 | /* ... */ | ||
70 | break; | ||
71 | |||
72 | /* ... */ | ||
73 | } | ||
74 | } | ||
75 | |||
76 | |||
77 | 4. USAGE FROM USER-LEVEL | ||
78 | |||
79 | From user-level, RS485 configuration can be get/set using the previous | ||
80 | ioctls. For instance, to set RS485 you can use the following code: | ||
81 | |||
82 | #include <linux/serial.h> | ||
83 | |||
84 | /* Driver-specific ioctls: */ | ||
85 | #define TIOCGRS485 0x542E | ||
86 | #define TIOCSRS485 0x542F | ||
87 | |||
88 | /* Open your specific device (e.g., /dev/mydevice): */ | ||
89 | int fd = open ("/dev/mydevice", O_RDWR); | ||
90 | if (fd < 0) { | ||
91 | /* Error handling. See errno. */ | ||
92 | } | ||
93 | |||
94 | struct serial_rs485 rs485conf; | ||
95 | |||
96 | /* Set RS485 mode: */ | ||
97 | rs485conf.flags |= SER_RS485_ENABLED; | ||
98 | |||
99 | /* Set rts delay before send, if needed: */ | ||
100 | rs485conf.flags |= SER_RS485_RTS_BEFORE_SEND; | ||
101 | rs485conf.delay_rts_before_send = ...; | ||
102 | |||
103 | /* Set rts delay after send, if needed: */ | ||
104 | rs485conf.flags |= SER_RS485_RTS_AFTER_SEND; | ||
105 | rs485conf.delay_rts_after_send = ...; | ||
106 | |||
107 | if (ioctl (fd, TIOCSRS485, &rs485conf) < 0) { | ||
108 | /* Error handling. See errno. */ | ||
109 | } | ||
110 | |||
111 | /* Use read() and write() syscalls here... */ | ||
112 | |||
113 | /* Close the device when finished: */ | ||
114 | if (close (fd) < 0) { | ||
115 | /* Error handling. See errno. */ | ||
116 | } | ||
117 | |||
118 | 5. REFERENCES | ||
119 | |||
120 | [1] include/linux/serial.h | ||
diff --git a/Documentation/serial/tty.txt b/Documentation/serial/tty.txt index 7c900507279f..540db41dfd5d 100644 --- a/Documentation/serial/tty.txt +++ b/Documentation/serial/tty.txt | |||
@@ -107,7 +107,7 @@ write_wakeup() - May be called at any point between open and close. | |||
107 | 107 | ||
108 | dcd_change() - Report to the tty line the current DCD pin status | 108 | dcd_change() - Report to the tty line the current DCD pin status |
109 | changes and the relative timestamp. The timestamp | 109 | changes and the relative timestamp. The timestamp |
110 | can be NULL. | 110 | cannot be NULL. |
111 | 111 | ||
112 | 112 | ||
113 | Driver Access | 113 | Driver Access |
diff --git a/Documentation/sh/clk.txt b/Documentation/sh/clk.txt deleted file mode 100644 index 114b595cfa97..000000000000 --- a/Documentation/sh/clk.txt +++ /dev/null | |||
@@ -1,32 +0,0 @@ | |||
1 | Clock framework on SuperH architecture | ||
2 | |||
3 | The framework on SH extends existing API by the function clk_set_rate_ex, | ||
4 | which prototype is as follows: | ||
5 | |||
6 | clk_set_rate_ex (struct clk *clk, unsigned long rate, int algo_id) | ||
7 | |||
8 | The algo_id parameter is used to specify algorithm used to recalculate clocks, | ||
9 | adjanced to clock, specified as first argument. It is assumed that algo_id==0 | ||
10 | means no changes to adjanced clock | ||
11 | |||
12 | Internally, the clk_set_rate_ex forwards request to clk->ops->set_rate method, | ||
13 | if it is present in ops structure. The method should set the clock rate and adjust | ||
14 | all needed clocks according to the passed algo_id. | ||
15 | Exact values for algo_id are machine-dependent. For the sh7722, the following | ||
16 | values are defined: | ||
17 | |||
18 | NO_CHANGE = 0, | ||
19 | IUS_N1_N1, /* I:U = N:1, U:Sh = N:1 */ | ||
20 | IUS_322, /* I:U:Sh = 3:2:2 */ | ||
21 | IUS_522, /* I:U:Sh = 5:2:2 */ | ||
22 | IUS_N11, /* I:U:Sh = N:1:1 */ | ||
23 | SB_N1, /* Sh:B = N:1 */ | ||
24 | SB3_N1, /* Sh:B3 = N:1 */ | ||
25 | SB3_32, /* Sh:B3 = 3:2 */ | ||
26 | SB3_43, /* Sh:B3 = 4:3 */ | ||
27 | SB3_54, /* Sh:B3 = 5:4 */ | ||
28 | BP_N1, /* B:P = N:1 */ | ||
29 | IP_N1 /* I:P = N:1 */ | ||
30 | |||
31 | Each of these constants means relation between clocks that can be set via the FRQCR | ||
32 | register | ||
diff --git a/Documentation/sound/alsa/ALSA-Configuration.txt b/Documentation/sound/alsa/ALSA-Configuration.txt index d0eb696d32e8..3c1eddd9fcc7 100644 --- a/Documentation/sound/alsa/ALSA-Configuration.txt +++ b/Documentation/sound/alsa/ALSA-Configuration.txt | |||
@@ -974,13 +974,6 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed. | |||
974 | 974 | ||
975 | See hdspm.txt for details. | 975 | See hdspm.txt for details. |
976 | 976 | ||
977 | Module snd-hifier | ||
978 | ----------------- | ||
979 | |||
980 | Module for the MediaTek/TempoTec HiFier Fantasia sound card. | ||
981 | |||
982 | This module supports autoprobe and multiple cards. | ||
983 | |||
984 | Module snd-ice1712 | 977 | Module snd-ice1712 |
985 | ------------------ | 978 | ------------------ |
986 | 979 | ||
@@ -1531,15 +1524,20 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed. | |||
1531 | Module snd-oxygen | 1524 | Module snd-oxygen |
1532 | ----------------- | 1525 | ----------------- |
1533 | 1526 | ||
1534 | Module for sound cards based on the C-Media CMI8788 chip: | 1527 | Module for sound cards based on the C-Media CMI8786/8787/8788 chip: |
1535 | * Asound A-8788 | 1528 | * Asound A-8788 |
1529 | * Asus Xonar DG | ||
1536 | * AuzenTech X-Meridian | 1530 | * AuzenTech X-Meridian |
1531 | * AuzenTech X-Meridian 2G | ||
1537 | * Bgears b-Enspirer | 1532 | * Bgears b-Enspirer |
1538 | * Club3D Theatron DTS | 1533 | * Club3D Theatron DTS |
1539 | * HT-Omega Claro (plus) | 1534 | * HT-Omega Claro (plus) |
1540 | * HT-Omega Claro halo (XT) | 1535 | * HT-Omega Claro halo (XT) |
1536 | * Kuroutoshikou CMI8787-HG2PCI | ||
1541 | * Razer Barracuda AC-1 | 1537 | * Razer Barracuda AC-1 |
1542 | * Sondigo Inferno | 1538 | * Sondigo Inferno |
1539 | * TempoTec HiFier Fantasia | ||
1540 | * TempoTec HiFier Serenade | ||
1543 | 1541 | ||
1544 | This module supports autoprobe and multiple cards. | 1542 | This module supports autoprobe and multiple cards. |
1545 | 1543 | ||
@@ -2006,9 +2004,9 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed. | |||
2006 | Module snd-virtuoso | 2004 | Module snd-virtuoso |
2007 | ------------------- | 2005 | ------------------- |
2008 | 2006 | ||
2009 | Module for sound cards based on the Asus AV100/AV200 chips, | 2007 | Module for sound cards based on the Asus AV66/AV100/AV200 chips, |
2010 | i.e., Xonar D1, DX, D2, D2X, DS, HDAV1.3 (Deluxe), Essence ST | 2008 | i.e., Xonar D1, DX, D2, D2X, DS, Essence ST (Deluxe), Essence STX, |
2011 | (Deluxe) and Essence STX. | 2009 | HDAV1.3 (Deluxe), and HDAV1.3 Slim. |
2012 | 2010 | ||
2013 | This module supports autoprobe and multiple cards. | 2011 | This module supports autoprobe and multiple cards. |
2014 | 2012 | ||
diff --git a/Documentation/sound/alsa/HD-Audio-Models.txt b/Documentation/sound/alsa/HD-Audio-Models.txt index 37c6aad5e590..16ae4300c747 100644 --- a/Documentation/sound/alsa/HD-Audio-Models.txt +++ b/Documentation/sound/alsa/HD-Audio-Models.txt | |||
@@ -149,7 +149,6 @@ ALC882/883/885/888/889 | |||
149 | acer-aspire-7730g Acer Aspire 7730G | 149 | acer-aspire-7730g Acer Aspire 7730G |
150 | acer-aspire-8930g Acer Aspire 8930G | 150 | acer-aspire-8930g Acer Aspire 8930G |
151 | medion Medion Laptops | 151 | medion Medion Laptops |
152 | medion-md2 Medion MD2 | ||
153 | targa-dig Targa/MSI | 152 | targa-dig Targa/MSI |
154 | targa-2ch-dig Targa/MSI with 2-channel | 153 | targa-2ch-dig Targa/MSI with 2-channel |
155 | targa-8ch-dig Targa/MSI with 8-channel (MSI GX620) | 154 | targa-8ch-dig Targa/MSI with 8-channel (MSI GX620) |
diff --git a/Documentation/spi/pxa2xx b/Documentation/spi/pxa2xx index 6bb916d57c95..68a4fe3818a1 100644 --- a/Documentation/spi/pxa2xx +++ b/Documentation/spi/pxa2xx | |||
@@ -19,7 +19,7 @@ Declaring PXA2xx Master Controllers | |||
19 | ----------------------------------- | 19 | ----------------------------------- |
20 | Typically a SPI master is defined in the arch/.../mach-*/board-*.c as a | 20 | Typically a SPI master is defined in the arch/.../mach-*/board-*.c as a |
21 | "platform device". The master configuration is passed to the driver via a table | 21 | "platform device". The master configuration is passed to the driver via a table |
22 | found in arch/arm/mach-pxa/include/mach/pxa2xx_spi.h: | 22 | found in include/linux/spi/pxa2xx_spi.h: |
23 | 23 | ||
24 | struct pxa2xx_spi_master { | 24 | struct pxa2xx_spi_master { |
25 | enum pxa_ssp_type ssp_type; | 25 | enum pxa_ssp_type ssp_type; |
@@ -94,7 +94,7 @@ using the "spi_board_info" structure found in "linux/spi/spi.h". See | |||
94 | 94 | ||
95 | Each slave device attached to the PXA must provide slave specific configuration | 95 | Each slave device attached to the PXA must provide slave specific configuration |
96 | information via the structure "pxa2xx_spi_chip" found in | 96 | information via the structure "pxa2xx_spi_chip" found in |
97 | "arch/arm/mach-pxa/include/mach/pxa2xx_spi.h". The pxa2xx_spi master controller driver | 97 | "include/linux/spi/pxa2xx_spi.h". The pxa2xx_spi master controller driver |
98 | will uses the configuration whenever the driver communicates with the slave | 98 | will uses the configuration whenever the driver communicates with the slave |
99 | device. All fields are optional. | 99 | device. All fields are optional. |
100 | 100 | ||
diff --git a/Documentation/sysctl/00-INDEX b/Documentation/sysctl/00-INDEX index 1286f455992f..8cf5d493fd03 100644 --- a/Documentation/sysctl/00-INDEX +++ b/Documentation/sysctl/00-INDEX | |||
@@ -4,8 +4,6 @@ README | |||
4 | - general information about /proc/sys/ sysctl files. | 4 | - general information about /proc/sys/ sysctl files. |
5 | abi.txt | 5 | abi.txt |
6 | - documentation for /proc/sys/abi/*. | 6 | - documentation for /proc/sys/abi/*. |
7 | ctl_unnumbered.txt | ||
8 | - explanation of why one should not add new binary sysctl numbers. | ||
9 | fs.txt | 7 | fs.txt |
10 | - documentation for /proc/sys/fs/*. | 8 | - documentation for /proc/sys/fs/*. |
11 | kernel.txt | 9 | kernel.txt |
diff --git a/Documentation/sysctl/kernel.txt b/Documentation/sysctl/kernel.txt index 209e1584c3dc..11d5ceda5bb0 100644 --- a/Documentation/sysctl/kernel.txt +++ b/Documentation/sysctl/kernel.txt | |||
@@ -34,6 +34,7 @@ show up in /proc/sys/kernel: | |||
34 | - hotplug | 34 | - hotplug |
35 | - java-appletviewer [ binfmt_java, obsolete ] | 35 | - java-appletviewer [ binfmt_java, obsolete ] |
36 | - java-interpreter [ binfmt_java, obsolete ] | 36 | - java-interpreter [ binfmt_java, obsolete ] |
37 | - kptr_restrict | ||
37 | - kstack_depth_to_print [ X86 only ] | 38 | - kstack_depth_to_print [ X86 only ] |
38 | - l2cr [ PPC only ] | 39 | - l2cr [ PPC only ] |
39 | - modprobe ==> Documentation/debugging-modules.txt | 40 | - modprobe ==> Documentation/debugging-modules.txt |
@@ -219,7 +220,7 @@ dmesg_restrict: | |||
219 | This toggle indicates whether unprivileged users are prevented from using | 220 | This toggle indicates whether unprivileged users are prevented from using |
220 | dmesg(8) to view messages from the kernel's log buffer. When | 221 | dmesg(8) to view messages from the kernel's log buffer. When |
221 | dmesg_restrict is set to (0) there are no restrictions. When | 222 | dmesg_restrict is set to (0) there are no restrictions. When |
222 | dmesg_restrict is set set to (1), users must have CAP_SYS_ADMIN to use | 223 | dmesg_restrict is set set to (1), users must have CAP_SYSLOG to use |
223 | dmesg(8). | 224 | dmesg(8). |
224 | 225 | ||
225 | The kernel config option CONFIG_SECURITY_DMESG_RESTRICT sets the default | 226 | The kernel config option CONFIG_SECURITY_DMESG_RESTRICT sets the default |
@@ -261,6 +262,19 @@ This flag controls the L2 cache of G3 processor boards. If | |||
261 | 262 | ||
262 | ============================================================== | 263 | ============================================================== |
263 | 264 | ||
265 | kptr_restrict: | ||
266 | |||
267 | This toggle indicates whether restrictions are placed on | ||
268 | exposing kernel addresses via /proc and other interfaces. When | ||
269 | kptr_restrict is set to (0), there are no restrictions. When | ||
270 | kptr_restrict is set to (1), the default, kernel pointers | ||
271 | printed using the %pK format specifier will be replaced with 0's | ||
272 | unless the user has CAP_SYSLOG. When kptr_restrict is set to | ||
273 | (2), kernel pointers printed using %pK will be replaced with 0's | ||
274 | regardless of privileges. | ||
275 | |||
276 | ============================================================== | ||
277 | |||
264 | kstack_depth_to_print: (X86 only) | 278 | kstack_depth_to_print: (X86 only) |
265 | 279 | ||
266 | Controls the number of words to print when dumping the raw | 280 | Controls the number of words to print when dumping the raw |
diff --git a/Documentation/timers/timer_stats.txt b/Documentation/timers/timer_stats.txt index 9bd00fc2e823..8abd40b22b7f 100644 --- a/Documentation/timers/timer_stats.txt +++ b/Documentation/timers/timer_stats.txt | |||
@@ -19,7 +19,7 @@ Linux system over a sample period: | |||
19 | 19 | ||
20 | - the pid of the task(process) which initialized the timer | 20 | - the pid of the task(process) which initialized the timer |
21 | - the name of the process which initialized the timer | 21 | - the name of the process which initialized the timer |
22 | - the function where the timer was intialized | 22 | - the function where the timer was initialized |
23 | - the callback function which is associated to the timer | 23 | - the callback function which is associated to the timer |
24 | - the number of events (callbacks) | 24 | - the number of events (callbacks) |
25 | 25 | ||
diff --git a/Documentation/trace/events-power.txt b/Documentation/trace/events-power.txt new file mode 100644 index 000000000000..96d87b67fe37 --- /dev/null +++ b/Documentation/trace/events-power.txt | |||
@@ -0,0 +1,90 @@ | |||
1 | |||
2 | Subsystem Trace Points: power | ||
3 | |||
4 | The power tracing system captures events related to power transitions | ||
5 | within the kernel. Broadly speaking there are three major subheadings: | ||
6 | |||
7 | o Power state switch which reports events related to suspend (S-states), | ||
8 | cpuidle (C-states) and cpufreq (P-states) | ||
9 | o System clock related changes | ||
10 | o Power domains related changes and transitions | ||
11 | |||
12 | This document describes what each of the tracepoints is and why they | ||
13 | might be useful. | ||
14 | |||
15 | Cf. include/trace/events/power.h for the events definitions. | ||
16 | |||
17 | 1. Power state switch events | ||
18 | ============================ | ||
19 | |||
20 | 1.1 New trace API | ||
21 | ----------------- | ||
22 | |||
23 | A 'cpu' event class gathers the CPU-related events: cpuidle and | ||
24 | cpufreq. | ||
25 | |||
26 | cpu_idle "state=%lu cpu_id=%lu" | ||
27 | cpu_frequency "state=%lu cpu_id=%lu" | ||
28 | |||
29 | A suspend event is used to indicate the system going in and out of the | ||
30 | suspend mode: | ||
31 | |||
32 | machine_suspend "state=%lu" | ||
33 | |||
34 | |||
35 | Note: the value of '-1' or '4294967295' for state means an exit from the current state, | ||
36 | i.e. trace_cpu_idle(4, smp_processor_id()) means that the system | ||
37 | enters the idle state 4, while trace_cpu_idle(PWR_EVENT_EXIT, smp_processor_id()) | ||
38 | means that the system exits the previous idle state. | ||
39 | |||
40 | The event which has 'state=4294967295' in the trace is very important to the user | ||
41 | space tools which are using it to detect the end of the current state, and so to | ||
42 | correctly draw the states diagrams and to calculate accurate statistics etc. | ||
43 | |||
44 | 1.2 DEPRECATED trace API | ||
45 | ------------------------ | ||
46 | |||
47 | A new Kconfig option CONFIG_EVENT_POWER_TRACING_DEPRECATED with the default value of | ||
48 | 'y' has been created. This allows the legacy trace power API to be used conjointly | ||
49 | with the new trace API. | ||
50 | The Kconfig option, the old trace API (in include/trace/events/power.h) and the | ||
51 | old trace points will disappear in a future release (namely 2.6.41). | ||
52 | |||
53 | power_start "type=%lu state=%lu cpu_id=%lu" | ||
54 | power_frequency "type=%lu state=%lu cpu_id=%lu" | ||
55 | power_end "cpu_id=%lu" | ||
56 | |||
57 | The 'type' parameter takes one of those macros: | ||
58 | . POWER_NONE = 0, | ||
59 | . POWER_CSTATE = 1, /* C-State */ | ||
60 | . POWER_PSTATE = 2, /* Fequency change or DVFS */ | ||
61 | |||
62 | The 'state' parameter is set depending on the type: | ||
63 | . Target C-state for type=POWER_CSTATE, | ||
64 | . Target frequency for type=POWER_PSTATE, | ||
65 | |||
66 | power_end is used to indicate the exit of a state, corresponding to the latest | ||
67 | power_start event. | ||
68 | |||
69 | 2. Clocks events | ||
70 | ================ | ||
71 | The clock events are used for clock enable/disable and for | ||
72 | clock rate change. | ||
73 | |||
74 | clock_enable "%s state=%lu cpu_id=%lu" | ||
75 | clock_disable "%s state=%lu cpu_id=%lu" | ||
76 | clock_set_rate "%s state=%lu cpu_id=%lu" | ||
77 | |||
78 | The first parameter gives the clock name (e.g. "gpio1_iclk"). | ||
79 | The second parameter is '1' for enable, '0' for disable, the target | ||
80 | clock rate for set_rate. | ||
81 | |||
82 | 3. Power domains events | ||
83 | ======================= | ||
84 | The power domain events are used for power domains transitions | ||
85 | |||
86 | power_domain_target "%s state=%lu cpu_id=%lu" | ||
87 | |||
88 | The first parameter gives the power domain name (e.g. "mpu_pwrdm"). | ||
89 | The second parameter is the power domain target state. | ||
90 | |||
diff --git a/Documentation/trace/events.txt b/Documentation/trace/events.txt index 09bd8e902989..b510564aac7e 100644 --- a/Documentation/trace/events.txt +++ b/Documentation/trace/events.txt | |||
@@ -125,7 +125,7 @@ is the size of the data item, in bytes. | |||
125 | For example, here's the information displayed for the 'sched_wakeup' | 125 | For example, here's the information displayed for the 'sched_wakeup' |
126 | event: | 126 | event: |
127 | 127 | ||
128 | # cat /debug/tracing/events/sched/sched_wakeup/format | 128 | # cat /sys/kernel/debug/tracing/events/sched/sched_wakeup/format |
129 | 129 | ||
130 | name: sched_wakeup | 130 | name: sched_wakeup |
131 | ID: 60 | 131 | ID: 60 |
@@ -201,19 +201,19 @@ to the 'filter' file for the given event. | |||
201 | 201 | ||
202 | For example: | 202 | For example: |
203 | 203 | ||
204 | # cd /debug/tracing/events/sched/sched_wakeup | 204 | # cd /sys/kernel/debug/tracing/events/sched/sched_wakeup |
205 | # echo "common_preempt_count > 4" > filter | 205 | # echo "common_preempt_count > 4" > filter |
206 | 206 | ||
207 | A slightly more involved example: | 207 | A slightly more involved example: |
208 | 208 | ||
209 | # cd /debug/tracing/events/sched/sched_signal_send | 209 | # cd /sys/kernel/debug/tracing/events/signal/signal_generate |
210 | # echo "((sig >= 10 && sig < 15) || sig == 17) && comm != bash" > filter | 210 | # echo "((sig >= 10 && sig < 15) || sig == 17) && comm != bash" > filter |
211 | 211 | ||
212 | If there is an error in the expression, you'll get an 'Invalid | 212 | If there is an error in the expression, you'll get an 'Invalid |
213 | argument' error when setting it, and the erroneous string along with | 213 | argument' error when setting it, and the erroneous string along with |
214 | an error message can be seen by looking at the filter e.g.: | 214 | an error message can be seen by looking at the filter e.g.: |
215 | 215 | ||
216 | # cd /debug/tracing/events/sched/sched_signal_send | 216 | # cd /sys/kernel/debug/tracing/events/signal/signal_generate |
217 | # echo "((sig >= 10 && sig < 15) || dsig == 17) && comm != bash" > filter | 217 | # echo "((sig >= 10 && sig < 15) || dsig == 17) && comm != bash" > filter |
218 | -bash: echo: write error: Invalid argument | 218 | -bash: echo: write error: Invalid argument |
219 | # cat filter | 219 | # cat filter |
diff --git a/Documentation/trace/postprocess/trace-vmscan-postprocess.pl b/Documentation/trace/postprocess/trace-vmscan-postprocess.pl index b3e73ddb1567..12cecc83cd91 100644 --- a/Documentation/trace/postprocess/trace-vmscan-postprocess.pl +++ b/Documentation/trace/postprocess/trace-vmscan-postprocess.pl | |||
@@ -373,9 +373,18 @@ EVENT_PROCESS: | |||
373 | print " $regex_lru_isolate/o\n"; | 373 | print " $regex_lru_isolate/o\n"; |
374 | next; | 374 | next; |
375 | } | 375 | } |
376 | my $isolate_mode = $1; | ||
376 | my $nr_scanned = $4; | 377 | my $nr_scanned = $4; |
377 | my $nr_contig_dirty = $7; | 378 | my $nr_contig_dirty = $7; |
378 | $perprocesspid{$process_pid}->{HIGH_NR_SCANNED} += $nr_scanned; | 379 | |
380 | # To closer match vmstat scanning statistics, only count isolate_both | ||
381 | # and isolate_inactive as scanning. isolate_active is rotation | ||
382 | # isolate_inactive == 0 | ||
383 | # isolate_active == 1 | ||
384 | # isolate_both == 2 | ||
385 | if ($isolate_mode != 1) { | ||
386 | $perprocesspid{$process_pid}->{HIGH_NR_SCANNED} += $nr_scanned; | ||
387 | } | ||
379 | $perprocesspid{$process_pid}->{HIGH_NR_CONTIG_DIRTY} += $nr_contig_dirty; | 388 | $perprocesspid{$process_pid}->{HIGH_NR_CONTIG_DIRTY} += $nr_contig_dirty; |
380 | } elsif ($tracepoint eq "mm_vmscan_lru_shrink_inactive") { | 389 | } elsif ($tracepoint eq "mm_vmscan_lru_shrink_inactive") { |
381 | $details = $5; | 390 | $details = $5; |
diff --git a/Documentation/usb/power-management.txt b/Documentation/usb/power-management.txt index b29d8e56cf28..c9ffa9ced7ee 100644 --- a/Documentation/usb/power-management.txt +++ b/Documentation/usb/power-management.txt | |||
@@ -2,7 +2,7 @@ | |||
2 | 2 | ||
3 | Alan Stern <stern@rowland.harvard.edu> | 3 | Alan Stern <stern@rowland.harvard.edu> |
4 | 4 | ||
5 | December 11, 2009 | 5 | October 28, 2010 |
6 | 6 | ||
7 | 7 | ||
8 | 8 | ||
@@ -107,9 +107,14 @@ allowed to issue dynamic suspends. | |||
107 | The user interface for controlling dynamic PM is located in the power/ | 107 | The user interface for controlling dynamic PM is located in the power/ |
108 | subdirectory of each USB device's sysfs directory, that is, in | 108 | subdirectory of each USB device's sysfs directory, that is, in |
109 | /sys/bus/usb/devices/.../power/ where "..." is the device's ID. The | 109 | /sys/bus/usb/devices/.../power/ where "..." is the device's ID. The |
110 | relevant attribute files are: wakeup, control, and autosuspend. | 110 | relevant attribute files are: wakeup, control, and |
111 | (There may also be a file named "level"; this file was deprecated | 111 | autosuspend_delay_ms. (There may also be a file named "level"; this |
112 | as of the 2.6.35 kernel and replaced by the "control" file.) | 112 | file was deprecated as of the 2.6.35 kernel and replaced by the |
113 | "control" file. In 2.6.38 the "autosuspend" file will be deprecated | ||
114 | and replaced by the "autosuspend_delay_ms" file. The only difference | ||
115 | is that the newer file expresses the delay in milliseconds whereas the | ||
116 | older file uses seconds. Confusingly, both files are present in 2.6.37 | ||
117 | but only "autosuspend" works.) | ||
113 | 118 | ||
114 | power/wakeup | 119 | power/wakeup |
115 | 120 | ||
@@ -140,33 +145,36 @@ as of the 2.6.35 kernel and replaced by the "control" file.) | |||
140 | suspended and autoresume was not allowed. This | 145 | suspended and autoresume was not allowed. This |
141 | setting is no longer supported.) | 146 | setting is no longer supported.) |
142 | 147 | ||
143 | power/autosuspend | 148 | power/autosuspend_delay_ms |
144 | 149 | ||
145 | This file contains an integer value, which is the | 150 | This file contains an integer value, which is the |
146 | number of seconds the device should remain idle before | 151 | number of milliseconds the device should remain idle |
147 | the kernel will autosuspend it (the idle-delay time). | 152 | before the kernel will autosuspend it (the idle-delay |
148 | The default is 2. 0 means to autosuspend as soon as | 153 | time). The default is 2000. 0 means to autosuspend |
149 | the device becomes idle, and negative values mean | 154 | as soon as the device becomes idle, and negative |
150 | never to autosuspend. You can write a number to the | 155 | values mean never to autosuspend. You can write a |
151 | file to change the autosuspend idle-delay time. | 156 | number to the file to change the autosuspend |
152 | 157 | idle-delay time. | |
153 | Writing "-1" to power/autosuspend and writing "on" to power/control do | 158 | |
154 | essentially the same thing -- they both prevent the device from being | 159 | Writing "-1" to power/autosuspend_delay_ms and writing "on" to |
155 | autosuspended. Yes, this is a redundancy in the API. | 160 | power/control do essentially the same thing -- they both prevent the |
161 | device from being autosuspended. Yes, this is a redundancy in the | ||
162 | API. | ||
156 | 163 | ||
157 | (In 2.6.21 writing "0" to power/autosuspend would prevent the device | 164 | (In 2.6.21 writing "0" to power/autosuspend would prevent the device |
158 | from being autosuspended; the behavior was changed in 2.6.22. The | 165 | from being autosuspended; the behavior was changed in 2.6.22. The |
159 | power/autosuspend attribute did not exist prior to 2.6.21, and the | 166 | power/autosuspend attribute did not exist prior to 2.6.21, and the |
160 | power/level attribute did not exist prior to 2.6.22. power/control | 167 | power/level attribute did not exist prior to 2.6.22. power/control |
161 | was added in 2.6.34.) | 168 | was added in 2.6.34, and power/autosuspend_delay_ms was added in |
169 | 2.6.37 but did not become functional until 2.6.38.) | ||
162 | 170 | ||
163 | 171 | ||
164 | Changing the default idle-delay time | 172 | Changing the default idle-delay time |
165 | ------------------------------------ | 173 | ------------------------------------ |
166 | 174 | ||
167 | The default autosuspend idle-delay time is controlled by a module | 175 | The default autosuspend idle-delay time (in seconds) is controlled by |
168 | parameter in usbcore. You can specify the value when usbcore is | 176 | a module parameter in usbcore. You can specify the value when usbcore |
169 | loaded. For example, to set it to 5 seconds instead of 2 you would | 177 | is loaded. For example, to set it to 5 seconds instead of 2 you would |
170 | do: | 178 | do: |
171 | 179 | ||
172 | modprobe usbcore autosuspend=5 | 180 | modprobe usbcore autosuspend=5 |
@@ -234,25 +242,23 @@ every device. | |||
234 | 242 | ||
235 | If a driver knows that its device has proper suspend/resume support, | 243 | If a driver knows that its device has proper suspend/resume support, |
236 | it can enable autosuspend all by itself. For example, the video | 244 | it can enable autosuspend all by itself. For example, the video |
237 | driver for a laptop's webcam might do this, since these devices are | 245 | driver for a laptop's webcam might do this (in recent kernels they |
238 | rarely used and so should normally be autosuspended. | 246 | do), since these devices are rarely used and so should normally be |
247 | autosuspended. | ||
239 | 248 | ||
240 | Sometimes it turns out that even when a device does work okay with | 249 | Sometimes it turns out that even when a device does work okay with |
241 | autosuspend there are still problems. For example, there are | 250 | autosuspend there are still problems. For example, the usbhid driver, |
242 | experimental patches adding autosuspend support to the usbhid driver, | 251 | which manages keyboards and mice, has autosuspend support. Tests with |
243 | which manages keyboards and mice, among other things. Tests with a | 252 | a number of keyboards show that typing on a suspended keyboard, while |
244 | number of keyboards showed that typing on a suspended keyboard, while | 253 | causing the keyboard to do a remote wakeup all right, will nonetheless |
245 | causing the keyboard to do a remote wakeup all right, would | 254 | frequently result in lost keystrokes. Tests with mice show that some |
246 | nonetheless frequently result in lost keystrokes. Tests with mice | 255 | of them will issue a remote-wakeup request in response to button |
247 | showed that some of them would issue a remote-wakeup request in | 256 | presses but not to motion, and some in response to neither. |
248 | response to button presses but not to motion, and some in response to | ||
249 | neither. | ||
250 | 257 | ||
251 | The kernel will not prevent you from enabling autosuspend on devices | 258 | The kernel will not prevent you from enabling autosuspend on devices |
252 | that can't handle it. It is even possible in theory to damage a | 259 | that can't handle it. It is even possible in theory to damage a |
253 | device by suspending it at the wrong time -- for example, suspending a | 260 | device by suspending it at the wrong time. (Highly unlikely, but |
254 | USB hard disk might cause it to spin down without parking the heads. | 261 | possible.) Take care. |
255 | (Highly unlikely, but possible.) Take care. | ||
256 | 262 | ||
257 | 263 | ||
258 | The driver interface for Power Management | 264 | The driver interface for Power Management |
@@ -336,10 +342,6 @@ autosuspend the interface's device. When the usage counter is = 0 | |||
336 | then the interface is considered to be idle, and the kernel may | 342 | then the interface is considered to be idle, and the kernel may |
337 | autosuspend the device. | 343 | autosuspend the device. |
338 | 344 | ||
339 | (There is a similar usage counter field in struct usb_device, | ||
340 | associated with the device itself rather than any of its interfaces. | ||
341 | This counter is used only by the USB core.) | ||
342 | |||
343 | Drivers need not be concerned about balancing changes to the usage | 345 | Drivers need not be concerned about balancing changes to the usage |
344 | counter; the USB core will undo any remaining "get"s when a driver | 346 | counter; the USB core will undo any remaining "get"s when a driver |
345 | is unbound from its interface. As a corollary, drivers must not call | 347 | is unbound from its interface. As a corollary, drivers must not call |
@@ -409,11 +411,11 @@ during autosuspend. For example, there's not much point | |||
409 | autosuspending a keyboard if the user can't cause the keyboard to do a | 411 | autosuspending a keyboard if the user can't cause the keyboard to do a |
410 | remote wakeup by typing on it. If the driver sets | 412 | remote wakeup by typing on it. If the driver sets |
411 | intf->needs_remote_wakeup to 1, the kernel won't autosuspend the | 413 | intf->needs_remote_wakeup to 1, the kernel won't autosuspend the |
412 | device if remote wakeup isn't available or has been disabled through | 414 | device if remote wakeup isn't available. (If the device is already |
413 | the power/wakeup attribute. (If the device is already autosuspended, | 415 | autosuspended, though, setting this flag won't cause the kernel to |
414 | though, setting this flag won't cause the kernel to autoresume it. | 416 | autoresume it. Normally a driver would set this flag in its probe |
415 | Normally a driver would set this flag in its probe method, at which | 417 | method, at which time the device is guaranteed not to be |
416 | time the device is guaranteed not to be autosuspended.) | 418 | autosuspended.) |
417 | 419 | ||
418 | If a driver does its I/O asynchronously in interrupt context, it | 420 | If a driver does its I/O asynchronously in interrupt context, it |
419 | should call usb_autopm_get_interface_async() before starting output and | 421 | should call usb_autopm_get_interface_async() before starting output and |
@@ -422,20 +424,19 @@ it receives an input event, it should call | |||
422 | 424 | ||
423 | usb_mark_last_busy(struct usb_device *udev); | 425 | usb_mark_last_busy(struct usb_device *udev); |
424 | 426 | ||
425 | in the event handler. This sets udev->last_busy to the current time. | 427 | in the event handler. This tells the PM core that the device was just |
426 | udev->last_busy is the field used for idle-delay calculations; | 428 | busy and therefore the next autosuspend idle-delay expiration should |
427 | updating it will cause any pending autosuspend to be moved back. Most | 429 | be pushed back. Many of the usb_autopm_* routines also make this call, |
428 | of the usb_autopm_* routines will also set the last_busy field to the | 430 | so drivers need to worry only when interrupt-driven input arrives. |
429 | current time. | ||
430 | 431 | ||
431 | Asynchronous operation is always subject to races. For example, a | 432 | Asynchronous operation is always subject to races. For example, a |
432 | driver may call one of the usb_autopm_*_interface_async() routines at | 433 | driver may call the usb_autopm_get_interface_async() routine at a time |
433 | a time when the core has just finished deciding the device has been | 434 | when the core has just finished deciding the device has been idle for |
434 | idle for long enough but not yet gotten around to calling the driver's | 435 | long enough but not yet gotten around to calling the driver's suspend |
435 | suspend method. The suspend method must be responsible for | 436 | method. The suspend method must be responsible for synchronizing with |
436 | synchronizing with the output request routine and the URB completion | 437 | the I/O request routine and the URB completion handler; it should |
437 | handler; it should cause autosuspends to fail with -EBUSY if the | 438 | cause autosuspends to fail with -EBUSY if the driver needs to use the |
438 | driver needs to use the device. | 439 | device. |
439 | 440 | ||
440 | External suspend calls should never be allowed to fail in this way, | 441 | External suspend calls should never be allowed to fail in this way, |
441 | only autosuspend calls. The driver can tell them apart by checking | 442 | only autosuspend calls. The driver can tell them apart by checking |
@@ -472,7 +473,9 @@ Firstly, a device may already be autosuspended when a system suspend | |||
472 | occurs. Since system suspends are supposed to be as transparent as | 473 | occurs. Since system suspends are supposed to be as transparent as |
473 | possible, the device should remain suspended following the system | 474 | possible, the device should remain suspended following the system |
474 | resume. But this theory may not work out well in practice; over time | 475 | resume. But this theory may not work out well in practice; over time |
475 | the kernel's behavior in this regard has changed. | 476 | the kernel's behavior in this regard has changed. As of 2.6.37 the |
477 | policy is to resume all devices during a system resume and let them | ||
478 | handle their own runtime suspends afterward. | ||
476 | 479 | ||
477 | Secondly, a dynamic power-management event may occur as a system | 480 | Secondly, a dynamic power-management event may occur as a system |
478 | suspend is underway. The window for this is short, since system | 481 | suspend is underway. The window for this is short, since system |
diff --git a/Documentation/video4linux/CARDLIST.em28xx b/Documentation/video4linux/CARDLIST.em28xx index ac2616a62fc3..31b485723bc5 100644 --- a/Documentation/video4linux/CARDLIST.em28xx +++ b/Documentation/video4linux/CARDLIST.em28xx | |||
@@ -1,5 +1,5 @@ | |||
1 | 0 -> Unknown EM2800 video grabber (em2800) [eb1a:2800] | 1 | 0 -> Unknown EM2800 video grabber (em2800) [eb1a:2800] |
2 | 1 -> Unknown EM2750/28xx video grabber (em2820/em2840) [eb1a:2710,eb1a:2820,eb1a:2821,eb1a:2860,eb1a:2861,eb1a:2862,eb1a:2863,eb1a:2870,eb1a:2881,eb1a:2883,eb1a:2868] | 2 | 1 -> Unknown EM2750/28xx video grabber (em2820/em2840) [eb1a:2710,eb1a:2820,eb1a:2821,eb1a:2860,eb1a:2861,eb1a:2862,eb1a:2863,eb1a:2870,eb1a:2881,eb1a:2883,eb1a:2868,eb1a:2875] |
3 | 2 -> Terratec Cinergy 250 USB (em2820/em2840) [0ccd:0036] | 3 | 2 -> Terratec Cinergy 250 USB (em2820/em2840) [0ccd:0036] |
4 | 3 -> Pinnacle PCTV USB 2 (em2820/em2840) [2304:0208] | 4 | 3 -> Pinnacle PCTV USB 2 (em2820/em2840) [2304:0208] |
5 | 4 -> Hauppauge WinTV USB 2 (em2820/em2840) [2040:4200,2040:4201] | 5 | 4 -> Hauppauge WinTV USB 2 (em2820/em2840) [2040:4200,2040:4201] |
@@ -9,7 +9,7 @@ | |||
9 | 8 -> Kworld USB2800 (em2800) | 9 | 8 -> Kworld USB2800 (em2800) |
10 | 9 -> Pinnacle Dazzle DVC 90/100/101/107 / Kaiser Baas Video to DVD maker (em2820/em2840) [1b80:e302,1b80:e304,2304:0207,2304:021a] | 10 | 9 -> Pinnacle Dazzle DVC 90/100/101/107 / Kaiser Baas Video to DVD maker (em2820/em2840) [1b80:e302,1b80:e304,2304:0207,2304:021a] |
11 | 10 -> Hauppauge WinTV HVR 900 (em2880) [2040:6500] | 11 | 10 -> Hauppauge WinTV HVR 900 (em2880) [2040:6500] |
12 | 11 -> Terratec Hybrid XS (em2880) [0ccd:0042] | 12 | 11 -> Terratec Hybrid XS (em2880) |
13 | 12 -> Kworld PVR TV 2800 RF (em2820/em2840) | 13 | 12 -> Kworld PVR TV 2800 RF (em2820/em2840) |
14 | 13 -> Terratec Prodigy XS (em2880) [0ccd:0047] | 14 | 13 -> Terratec Prodigy XS (em2880) [0ccd:0047] |
15 | 14 -> SIIG AVTuner-PVR / Pixelview Prolink PlayTV USB 2.0 (em2820/em2840) | 15 | 14 -> SIIG AVTuner-PVR / Pixelview Prolink PlayTV USB 2.0 (em2820/em2840) |
@@ -53,7 +53,7 @@ | |||
53 | 52 -> DNT DA2 Hybrid (em2881) | 53 | 52 -> DNT DA2 Hybrid (em2881) |
54 | 53 -> Pinnacle Hybrid Pro (em2881) | 54 | 53 -> Pinnacle Hybrid Pro (em2881) |
55 | 54 -> Kworld VS-DVB-T 323UR (em2882) [eb1a:e323] | 55 | 54 -> Kworld VS-DVB-T 323UR (em2882) [eb1a:e323] |
56 | 55 -> Terratec Hybrid XS (em2882) (em2882) [0ccd:005e] | 56 | 55 -> Terratec Cinnergy Hybrid T USB XS (em2882) (em2882) [0ccd:005e,0ccd:0042] |
57 | 56 -> Pinnacle Hybrid Pro (2) (em2882) [2304:0226] | 57 | 56 -> Pinnacle Hybrid Pro (2) (em2882) [2304:0226] |
58 | 57 -> Kworld PlusTV HD Hybrid 330 (em2883) [eb1a:a316] | 58 | 57 -> Kworld PlusTV HD Hybrid 330 (em2883) [eb1a:a316] |
59 | 58 -> Compro VideoMate ForYou/Stereo (em2820/em2840) [185b:2041] | 59 | 58 -> Compro VideoMate ForYou/Stereo (em2820/em2840) [185b:2041] |
diff --git a/Documentation/video4linux/CARDLIST.saa7134 b/Documentation/video4linux/CARDLIST.saa7134 index 8d9afc7d8014..6b4c72d8862d 100644 --- a/Documentation/video4linux/CARDLIST.saa7134 +++ b/Documentation/video4linux/CARDLIST.saa7134 | |||
@@ -180,3 +180,5 @@ | |||
180 | 179 -> Beholder BeholdTV A7 [5ace:7090] | 180 | 179 -> Beholder BeholdTV A7 [5ace:7090] |
181 | 180 -> Avermedia PCI M733A [1461:4155,1461:4255] | 181 | 180 -> Avermedia PCI M733A [1461:4155,1461:4255] |
182 | 181 -> TechoTrend TT-budget T-3000 [13c2:2804] | 182 | 181 -> TechoTrend TT-budget T-3000 [13c2:2804] |
183 | 182 -> Kworld PCI SBTVD/ISDB-T Full-Seg Hybrid [17de:b136] | ||
184 | 183 -> Compro VideoMate Vista M1F [185b:c900] | ||
diff --git a/Documentation/video4linux/Makefile b/Documentation/video4linux/Makefile deleted file mode 100644 index 1ed0e98d057d..000000000000 --- a/Documentation/video4linux/Makefile +++ /dev/null | |||
@@ -1,8 +0,0 @@ | |||
1 | # kbuild trick to avoid linker error. Can be omitted if a module is built. | ||
2 | obj- := dummy.o | ||
3 | |||
4 | # List of programs to build | ||
5 | hostprogs-y := v4lgrab | ||
6 | |||
7 | # Tell kbuild to always build the programs | ||
8 | always := $(hostprogs-y) | ||
diff --git a/Documentation/video4linux/README.cpia b/Documentation/video4linux/README.cpia deleted file mode 100644 index 8a747fee661f..000000000000 --- a/Documentation/video4linux/README.cpia +++ /dev/null | |||
@@ -1,191 +0,0 @@ | |||
1 | This is a driver for the CPiA PPC2 driven parallel connected | ||
2 | Camera. For example the Creative WebcamII is CPiA driven. | ||
3 | |||
4 | ) [1]Peter Pregler, Linz 2000, published under the [2]GNU GPL | ||
5 | |||
6 | --------------------------------------------------------------------------- | ||
7 | |||
8 | USAGE: | ||
9 | |||
10 | General: | ||
11 | ======== | ||
12 | |||
13 | 1) Make sure you have created the video devices (/dev/video*): | ||
14 | |||
15 | - if you have a recent MAKEDEV do a 'cd /dev;./MAKEDEV video' | ||
16 | - otherwise do a: | ||
17 | |||
18 | cd /dev | ||
19 | mknod video0 c 81 0 | ||
20 | ln -s video0 video | ||
21 | |||
22 | 2) Compile the kernel (see below for the list of options to use), | ||
23 | configure your parport and reboot. | ||
24 | |||
25 | 3) If all worked well you should get messages similar | ||
26 | to the following (your versions may be different) on the console: | ||
27 | |||
28 | V4L-Driver for Vision CPiA based cameras v0.7.4 | ||
29 | parport0: read2 timeout. | ||
30 | parport0: Multimedia device, VLSI Vision Ltd PPC2 | ||
31 | Parallel port driver for Vision CPiA based camera | ||
32 | CPIA Version: 1.20 (2.0) | ||
33 | CPIA PnP-ID: 0553:0002:0100 | ||
34 | VP-Version: 1.0 0100 | ||
35 | 1 camera(s) found | ||
36 | |||
37 | |||
38 | As modules: | ||
39 | =========== | ||
40 | |||
41 | Make sure you have selected the following kernel options (you can | ||
42 | select all stuff as modules): | ||
43 | |||
44 | The cpia-stuff is in the section 'Character devices -> Video For Linux'. | ||
45 | |||
46 | CONFIG_PARPORT=m | ||
47 | CONFIG_PARPORT_PC=m | ||
48 | CONFIG_PARPORT_PC_FIFO=y | ||
49 | CONFIG_PARPORT_1284=y | ||
50 | CONFIG_VIDEO_DEV=m | ||
51 | CONFIG_VIDEO_CPIA=m | ||
52 | CONFIG_VIDEO_CPIA_PP=m | ||
53 | |||
54 | For autoloading of all those modules you need to tell module-init-tools | ||
55 | some stuff. Add the following line to your module-init-tools config-file | ||
56 | (e.g. /etc/modprobe.conf or wherever your distribution does store that | ||
57 | stuff): | ||
58 | |||
59 | options parport_pc io=0x378 irq=7 dma=3 | ||
60 | alias char-major-81 cpia_pp | ||
61 | |||
62 | The first line tells the dma/irq channels to use. Those _must_ match | ||
63 | the settings of your BIOS. Do NOT simply use the values above. See | ||
64 | Documentation/parport.txt for more information about this. The second | ||
65 | line associates the video-device file with the driver. Of cause you | ||
66 | can also load the modules once upon boot (usually done in /etc/modules). | ||
67 | |||
68 | Linked into the kernel: | ||
69 | ======================= | ||
70 | |||
71 | Make sure you have selected the following kernel options. Note that | ||
72 | you cannot compile the parport-stuff as modules and the cpia-driver | ||
73 | statically (the other way round is okay though). | ||
74 | |||
75 | The cpia-stuff is in the section 'Character devices -> Video For Linux'. | ||
76 | |||
77 | CONFIG_PARPORT=y | ||
78 | CONFIG_PARPORT_PC=y | ||
79 | CONFIG_PARPORT_PC_FIFO=y | ||
80 | CONFIG_PARPORT_1284=y | ||
81 | CONFIG_VIDEO_DEV=y | ||
82 | CONFIG_VIDEO_CPIA=y | ||
83 | CONFIG_VIDEO_CPIA_PP=y | ||
84 | |||
85 | To use DMA/irq you will need to tell the kernel upon boot time the | ||
86 | hardware configuration of the parport. You can give the boot-parameter | ||
87 | at the LILO-prompt or specify it in lilo.conf. I use the following | ||
88 | append-line in lilo.conf: | ||
89 | |||
90 | append="parport=0x378,7,3" | ||
91 | |||
92 | See Documentation/parport.txt for more information about the | ||
93 | configuration of the parport and the values given above. Do not simply | ||
94 | use the values given above. | ||
95 | |||
96 | --------------------------------------------------------------------------- | ||
97 | FEATURES: | ||
98 | |||
99 | - mmap/read v4l-interface (but no overlay) | ||
100 | - image formats: CIF/QCIF, SIF/QSIF, various others used by isabel; | ||
101 | note: all sizes except CIF/QCIF are implemented by clipping, i.e. | ||
102 | pixels are not uploaded from the camera | ||
103 | - palettes: VIDEO_PALETTE_GRAY, VIDEO_PALETTE_RGB565, VIDEO_PALETTE_RGB555, | ||
104 | VIDEO_PALETTE_RGB24, VIDEO_PALETTE_RGB32, VIDEO_PALETTE_YUYV, | ||
105 | VIDEO_PALETTE_UYVY, VIDEO_PALETTE_YUV422 | ||
106 | - state information (color balance, exposure, ...) is preserved between | ||
107 | device opens | ||
108 | - complete control over camera via proc-interface (_all_ camera settings are | ||
109 | supported), there is also a python-gtk application available for this [3] | ||
110 | - works under SMP (but the driver is completely serialized and synchronous) | ||
111 | so you get no benefit from SMP, but at least it does not crash your box | ||
112 | - might work for non-Intel architecture, let us know about this | ||
113 | |||
114 | --------------------------------------------------------------------------- | ||
115 | TESTED APPLICATIONS: | ||
116 | |||
117 | - a simple test application based on Xt is available at [3] | ||
118 | - another test-application based on gqcam-0.4 (uses GTK) | ||
119 | - gqcam-0.6 should work | ||
120 | - xawtv-3.x (also the webcam software) | ||
121 | - xawtv-2.46 | ||
122 | - w3cam (cgi-interface and vidcat, e.g. you may try out 'vidcat |xv | ||
123 | -maxpect -root -quit +noresetroot -rmode 5 -') | ||
124 | - vic, the MBONE video conferencing tool (version 2.8ucl4-1) | ||
125 | - isabel 3R4beta (barely working, but AFAICT all the problems are on | ||
126 | their side) | ||
127 | - camserv-0.40 | ||
128 | |||
129 | See [3] for pointers to v4l-applications. | ||
130 | |||
131 | --------------------------------------------------------------------------- | ||
132 | KNOWN PROBLEMS: | ||
133 | |||
134 | - some applications do not handle the image format correctly, you will | ||
135 | see strange horizontal stripes instead of a nice picture -> make sure | ||
136 | your application does use a supported image size or queries the driver | ||
137 | for the actually used size (reason behind this: the camera cannot | ||
138 | provide any image format, so if size NxM is requested the driver will | ||
139 | use a format to the closest fitting N1xM1, the application should now | ||
140 | query for this granted size, most applications do not). | ||
141 | - all the todo ;) | ||
142 | - if there is not enough light and the picture is too dark try to | ||
143 | adjust the SetSensorFPS setting, automatic frame rate adjustment | ||
144 | has its price | ||
145 | - do not try out isabel 3R4beta (built 135), you will be disappointed | ||
146 | |||
147 | --------------------------------------------------------------------------- | ||
148 | TODO: | ||
149 | |||
150 | - multiple camera support (struct camera or something) - This should work, | ||
151 | but hasn't been tested yet. | ||
152 | - architecture independence? | ||
153 | - SMP-safe asynchronous mmap interface | ||
154 | - nibble mode for old parport interfaces | ||
155 | - streaming capture, this should give a performance gain | ||
156 | |||
157 | --------------------------------------------------------------------------- | ||
158 | IMPLEMENTATION NOTES: | ||
159 | |||
160 | The camera can act in two modes, streaming or grabbing. Right now a | ||
161 | polling grab-scheme is used. Maybe interrupt driven streaming will be | ||
162 | used for a asynchronous mmap interface in the next major release of the | ||
163 | driver. This might give a better frame rate. | ||
164 | |||
165 | --------------------------------------------------------------------------- | ||
166 | THANKS (in no particular order): | ||
167 | |||
168 | - Scott J. Bertin <sbertin@mindspring.com> for cleanups, the proc-filesystem | ||
169 | and much more | ||
170 | - Henry Bruce <whb@vvl.co.uk> for providing developers information about | ||
171 | the CPiA chip, I wish all companies would treat Linux as seriously | ||
172 | - Karoly Erdei <Karoly.Erdei@risc.uni-linz.ac.at> and RISC-Linz for being | ||
173 | my boss ;) resp. my employer and for providing me the hardware and | ||
174 | allow me to devote some working time to this project | ||
175 | - Manuel J. Petit de Gabriel <mpetit@dit.upm.es> for providing help | ||
176 | with Isabel (http://isabel.dit.upm.es/) | ||
177 | - Bas Huisman <bhuism@cs.utwente.nl> for writing the initial parport code | ||
178 | - Jarl Totland <Jarl.Totland@bdc.no> for setting up the mailing list | ||
179 | and maintaining the web-server[3] | ||
180 | - Chris Whiteford <Chris@informinteractive.com> for fixes related to the | ||
181 | 1.02 firmware | ||
182 | - special kudos to all the tester whose machines crashed and/or | ||
183 | will crash. :) | ||
184 | |||
185 | --------------------------------------------------------------------------- | ||
186 | REFERENCES | ||
187 | |||
188 | 1. http://www.risc.uni-linz.ac.at/ | ||
189 | mailto:Peter_Pregler@email.com | ||
190 | 2. see the file COPYING in the top directory of the kernel tree | ||
191 | 3. http://webcam.sourceforge.net/ | ||
diff --git a/Documentation/video4linux/Zoran b/Documentation/video4linux/Zoran index 00e3f9267814..699b60e070d2 100644 --- a/Documentation/video4linux/Zoran +++ b/Documentation/video4linux/Zoran | |||
@@ -322,76 +322,11 @@ your IRQs and make sure the card has its own interrupts. | |||
322 | 322 | ||
323 | 4. Programming interface | 323 | 4. Programming interface |
324 | 324 | ||
325 | This driver conforms to video4linux and video4linux2, both can be used to | 325 | This driver conforms to video4linux2. Support for V4L1 and for the custom |
326 | use the driver. Since video4linux didn't provide adequate calls to fully | 326 | zoran ioctls has been removed in kernel 2.6.38. |
327 | use the cards' features, we've introduced several programming extensions, | ||
328 | which are currently officially accepted in the 2.4.x branch of the kernel. | ||
329 | These extensions are known as the v4l/mjpeg extensions. See zoran.h for | ||
330 | details (structs/ioctls). | ||
331 | |||
332 | Information - video4linux: | ||
333 | http://linux.bytesex.org/v4l2/API.html | ||
334 | Documentation/video4linux/API.html | ||
335 | /usr/include/linux/videodev.h | ||
336 | |||
337 | Information - video4linux/mjpeg extensions: | ||
338 | ./zoran.h | ||
339 | (also see below) | ||
340 | |||
341 | Information - video4linux2: | ||
342 | http://linuxtv.org | ||
343 | http://v4l2spec.bytesex.org/ | ||
344 | /usr/include/linux/videodev2.h | ||
345 | |||
346 | More information on the video4linux/mjpeg extensions, by Serguei | ||
347 | Miridonovi and Rainer Johanni: | ||
348 | -- | ||
349 | The ioctls for that interface are as follows: | ||
350 | |||
351 | BUZIOC_G_PARAMS | ||
352 | BUZIOC_S_PARAMS | ||
353 | |||
354 | Get and set the parameters of the buz. The user should always do a | ||
355 | BUZIOC_G_PARAMS (with a struct buz_params) to obtain the default | ||
356 | settings, change what he likes and then make a BUZIOC_S_PARAMS call. | ||
357 | |||
358 | BUZIOC_REQBUFS | ||
359 | |||
360 | Before being able to capture/playback, the user has to request | ||
361 | the buffers he is wanting to use. Fill the structure | ||
362 | zoran_requestbuffers with the size (recommended: 256*1024) and | ||
363 | the number (recommended 32 up to 256). There are no such restrictions | ||
364 | as for the Video for Linux buffers, you should LEAVE SUFFICIENT | ||
365 | MEMORY for your system however, else strange things will happen .... | ||
366 | On return, the zoran_requestbuffers structure contains number and | ||
367 | size of the actually allocated buffers. | ||
368 | You should use these numbers for doing a mmap of the buffers | ||
369 | into the user space. | ||
370 | The BUZIOC_REQBUFS ioctl also makes it happen, that the next mmap | ||
371 | maps the MJPEG buffer instead of the V4L buffers. | ||
372 | |||
373 | BUZIOC_QBUF_CAPT | ||
374 | BUZIOC_QBUF_PLAY | ||
375 | |||
376 | Queue a buffer for capture or playback. The first call also starts | ||
377 | streaming capture. When streaming capture is going on, you may | ||
378 | only queue further buffers or issue syncs until streaming | ||
379 | capture is switched off again with a argument of -1 to | ||
380 | a BUZIOC_QBUF_CAPT/BUZIOC_QBUF_PLAY ioctl. | ||
381 | |||
382 | BUZIOC_SYNC | ||
383 | |||
384 | Issue this ioctl when all buffers are queued. This ioctl will | ||
385 | block until the first buffer becomes free for saving its | ||
386 | data to disk (after BUZIOC_QBUF_CAPT) or for reuse (after BUZIOC_QBUF_PLAY). | ||
387 | |||
388 | BUZIOC_G_STATUS | ||
389 | |||
390 | Get the status of the input lines (video source connected/norm). | ||
391 | 327 | ||
392 | For programming example, please, look at lavrec.c and lavplay.c code in | 328 | For programming example, please, look at lavrec.c and lavplay.c code in |
393 | lavtools-1.2p2 package (URL: http://www.cicese.mx/) | 329 | the MJPEG-tools (http://mjpeg.sf.net/). |
394 | and the 'examples' directory in the original Buz driver distribution. | ||
395 | 330 | ||
396 | Additional notes for software developers: | 331 | Additional notes for software developers: |
397 | 332 | ||
@@ -402,9 +337,6 @@ Additional notes for software developers: | |||
402 | standard is "more constant" for current country than geometry | 337 | standard is "more constant" for current country than geometry |
403 | settings of a variety of TV capture cards which may work in ITU or | 338 | settings of a variety of TV capture cards which may work in ITU or |
404 | square pixel format. | 339 | square pixel format. |
405 | -- | ||
406 | Please note that lavplay/lavrec are also included in the MJPEG-tools | ||
407 | (http://mjpeg.sf.net/). | ||
408 | 340 | ||
409 | =========================== | 341 | =========================== |
410 | 342 | ||
diff --git a/Documentation/video4linux/bttv/Cards b/Documentation/video4linux/bttv/Cards index 12217fc49725..db833ced2cb8 100644 --- a/Documentation/video4linux/bttv/Cards +++ b/Documentation/video4linux/bttv/Cards | |||
@@ -464,10 +464,6 @@ Siemens | |||
464 | ------- | 464 | ------- |
465 | Multimedia eXtension Board (MXB) (SAA7146, SAA7111) | 465 | Multimedia eXtension Board (MXB) (SAA7146, SAA7111) |
466 | 466 | ||
467 | Stradis | ||
468 | ------- | ||
469 | SDM275,SDM250,SDM026,SDM025 (SAA7146, IBMMPEG2): MPEG2 decoder only | ||
470 | |||
471 | Powercolor | 467 | Powercolor |
472 | ---------- | 468 | ---------- |
473 | MTV878 | 469 | MTV878 |
diff --git a/Documentation/video4linux/gspca.txt b/Documentation/video4linux/gspca.txt index 6a562eeeb4cd..261776e0c5e1 100644 --- a/Documentation/video4linux/gspca.txt +++ b/Documentation/video4linux/gspca.txt | |||
@@ -366,6 +366,7 @@ t613 17a1:0128 TASCORP JPEG Webcam, NGS Cyclops | |||
366 | vc032x 17ef:4802 Lenovo Vc0323+MI1310_SOC | 366 | vc032x 17ef:4802 Lenovo Vc0323+MI1310_SOC |
367 | pac207 2001:f115 D-Link DSB-C120 | 367 | pac207 2001:f115 D-Link DSB-C120 |
368 | sq905c 2770:9050 Disney pix micro (CIF) | 368 | sq905c 2770:9050 Disney pix micro (CIF) |
369 | sq905c 2770:9051 Lego Bionicle | ||
369 | sq905c 2770:9052 Disney pix micro 2 (VGA) | 370 | sq905c 2770:9052 Disney pix micro 2 (VGA) |
370 | sq905c 2770:905c All 11 known cameras with this ID | 371 | sq905c 2770:905c All 11 known cameras with this ID |
371 | sq905 2770:9120 All 24 known cameras with this ID | 372 | sq905 2770:9120 All 24 known cameras with this ID |
diff --git a/Documentation/video4linux/meye.txt b/Documentation/video4linux/meye.txt index bf3af5fe558f..34e2842c70ae 100644 --- a/Documentation/video4linux/meye.txt +++ b/Documentation/video4linux/meye.txt | |||
@@ -45,8 +45,6 @@ module argument syntax (<param>=<value> when passing the option to the | |||
45 | module or meye.<param>=<value> on the kernel boot line when meye is | 45 | module or meye.<param>=<value> on the kernel boot line when meye is |
46 | statically linked into the kernel). Those options are: | 46 | statically linked into the kernel). Those options are: |
47 | 47 | ||
48 | forcev4l1: force use of V4L1 API instead of V4L2 | ||
49 | |||
50 | gbuffers: number of capture buffers, default is 2 (32 max) | 48 | gbuffers: number of capture buffers, default is 2 (32 max) |
51 | 49 | ||
52 | gbufsize: size of each capture buffer, default is 614400 | 50 | gbufsize: size of each capture buffer, default is 614400 |
@@ -79,9 +77,8 @@ Usage: | |||
79 | Private API: | 77 | Private API: |
80 | ------------ | 78 | ------------ |
81 | 79 | ||
82 | The driver supports frame grabbing with the video4linux API | 80 | The driver supports frame grabbing with the video4linux API, |
83 | (either v4l1 or v4l2), so all video4linux tools (like xawtv) | 81 | so all video4linux tools (like xawtv) should work with this driver. |
84 | should work with this driver. | ||
85 | 82 | ||
86 | Besides the video4linux interface, the driver has a private interface | 83 | Besides the video4linux interface, the driver has a private interface |
87 | for accessing the Motion Eye extended parameters (camera sharpness, | 84 | for accessing the Motion Eye extended parameters (camera sharpness, |
@@ -123,7 +120,4 @@ Private API: | |||
123 | Bugs / Todo: | 120 | Bugs / Todo: |
124 | ------------ | 121 | ------------ |
125 | 122 | ||
126 | - the driver could be much cleaned up by removing the v4l1 support. | ||
127 | However, this means all v4l1-only applications will stop working. | ||
128 | |||
129 | - 'motioneye' still uses the meye private v4l1 API extensions. | 123 | - 'motioneye' still uses the meye private v4l1 API extensions. |
diff --git a/Documentation/video4linux/v4lgrab.c b/Documentation/video4linux/v4lgrab.c deleted file mode 100644 index c8ded175796e..000000000000 --- a/Documentation/video4linux/v4lgrab.c +++ /dev/null | |||
@@ -1,201 +0,0 @@ | |||
1 | /* Simple Video4Linux image grabber. */ | ||
2 | /* | ||
3 | * Video4Linux Driver Test/Example Framegrabbing Program | ||
4 | * | ||
5 | * Compile with: | ||
6 | * gcc -s -Wall -Wstrict-prototypes v4lgrab.c -o v4lgrab | ||
7 | * Use as: | ||
8 | * v4lgrab >image.ppm | ||
9 | * | ||
10 | * Copyright (C) 1998-05-03, Phil Blundell <philb@gnu.org> | ||
11 | * Copied from http://www.tazenda.demon.co.uk/phil/vgrabber.c | ||
12 | * with minor modifications (Dave Forrest, drf5n@virginia.edu). | ||
13 | * | ||
14 | * | ||
15 | * For some cameras you may need to pre-load libv4l to perform | ||
16 | * the necessary decompression, e.g.: | ||
17 | * | ||
18 | * export LD_PRELOAD=/usr/lib/libv4l/v4l1compat.so | ||
19 | * ./v4lgrab >image.ppm | ||
20 | * | ||
21 | * see http://hansdegoede.livejournal.com/3636.html for details. | ||
22 | * | ||
23 | */ | ||
24 | |||
25 | #include <unistd.h> | ||
26 | #include <sys/types.h> | ||
27 | #include <sys/stat.h> | ||
28 | #include <fcntl.h> | ||
29 | #include <stdio.h> | ||
30 | #include <sys/ioctl.h> | ||
31 | #include <stdlib.h> | ||
32 | |||
33 | #include <linux/types.h> | ||
34 | #include <linux/videodev.h> | ||
35 | |||
36 | #define VIDEO_DEV "/dev/video0" | ||
37 | |||
38 | /* Stole this from tvset.c */ | ||
39 | |||
40 | #define READ_VIDEO_PIXEL(buf, format, depth, r, g, b) \ | ||
41 | { \ | ||
42 | switch (format) \ | ||
43 | { \ | ||
44 | case VIDEO_PALETTE_GREY: \ | ||
45 | switch (depth) \ | ||
46 | { \ | ||
47 | case 4: \ | ||
48 | case 6: \ | ||
49 | case 8: \ | ||
50 | (r) = (g) = (b) = (*buf++ << 8);\ | ||
51 | break; \ | ||
52 | \ | ||
53 | case 16: \ | ||
54 | (r) = (g) = (b) = \ | ||
55 | *((unsigned short *) buf); \ | ||
56 | buf += 2; \ | ||
57 | break; \ | ||
58 | } \ | ||
59 | break; \ | ||
60 | \ | ||
61 | \ | ||
62 | case VIDEO_PALETTE_RGB565: \ | ||
63 | { \ | ||
64 | unsigned short tmp = *(unsigned short *)buf; \ | ||
65 | (r) = tmp&0xF800; \ | ||
66 | (g) = (tmp<<5)&0xFC00; \ | ||
67 | (b) = (tmp<<11)&0xF800; \ | ||
68 | buf += 2; \ | ||
69 | } \ | ||
70 | break; \ | ||
71 | \ | ||
72 | case VIDEO_PALETTE_RGB555: \ | ||
73 | (r) = (buf[0]&0xF8)<<8; \ | ||
74 | (g) = ((buf[0] << 5 | buf[1] >> 3)&0xF8)<<8; \ | ||
75 | (b) = ((buf[1] << 2 ) & 0xF8)<<8; \ | ||
76 | buf += 2; \ | ||
77 | break; \ | ||
78 | \ | ||
79 | case VIDEO_PALETTE_RGB24: \ | ||
80 | (r) = buf[0] << 8; (g) = buf[1] << 8; \ | ||
81 | (b) = buf[2] << 8; \ | ||
82 | buf += 3; \ | ||
83 | break; \ | ||
84 | \ | ||
85 | default: \ | ||
86 | fprintf(stderr, \ | ||
87 | "Format %d not yet supported\n", \ | ||
88 | format); \ | ||
89 | } \ | ||
90 | } | ||
91 | |||
92 | static int get_brightness_adj(unsigned char *image, long size, int *brightness) { | ||
93 | long i, tot = 0; | ||
94 | for (i=0;i<size*3;i++) | ||
95 | tot += image[i]; | ||
96 | *brightness = (128 - tot/(size*3))/3; | ||
97 | return !((tot/(size*3)) >= 126 && (tot/(size*3)) <= 130); | ||
98 | } | ||
99 | |||
100 | int main(int argc, char ** argv) | ||
101 | { | ||
102 | int fd = open(VIDEO_DEV, O_RDONLY), f; | ||
103 | struct video_capability cap; | ||
104 | struct video_window win; | ||
105 | struct video_picture vpic; | ||
106 | |||
107 | unsigned char *buffer, *src; | ||
108 | int bpp = 24, r = 0, g = 0, b = 0; | ||
109 | unsigned int i, src_depth = 16; | ||
110 | |||
111 | if (fd < 0) { | ||
112 | perror(VIDEO_DEV); | ||
113 | exit(1); | ||
114 | } | ||
115 | |||
116 | if (ioctl(fd, VIDIOCGCAP, &cap) < 0) { | ||
117 | perror("VIDIOGCAP"); | ||
118 | fprintf(stderr, "(" VIDEO_DEV " not a video4linux device?)\n"); | ||
119 | close(fd); | ||
120 | exit(1); | ||
121 | } | ||
122 | |||
123 | if (ioctl(fd, VIDIOCGWIN, &win) < 0) { | ||
124 | perror("VIDIOCGWIN"); | ||
125 | close(fd); | ||
126 | exit(1); | ||
127 | } | ||
128 | |||
129 | if (ioctl(fd, VIDIOCGPICT, &vpic) < 0) { | ||
130 | perror("VIDIOCGPICT"); | ||
131 | close(fd); | ||
132 | exit(1); | ||
133 | } | ||
134 | |||
135 | if (cap.type & VID_TYPE_MONOCHROME) { | ||
136 | vpic.depth=8; | ||
137 | vpic.palette=VIDEO_PALETTE_GREY; /* 8bit grey */ | ||
138 | if(ioctl(fd, VIDIOCSPICT, &vpic) < 0) { | ||
139 | vpic.depth=6; | ||
140 | if(ioctl(fd, VIDIOCSPICT, &vpic) < 0) { | ||
141 | vpic.depth=4; | ||
142 | if(ioctl(fd, VIDIOCSPICT, &vpic) < 0) { | ||
143 | fprintf(stderr, "Unable to find a supported capture format.\n"); | ||
144 | close(fd); | ||
145 | exit(1); | ||
146 | } | ||
147 | } | ||
148 | } | ||
149 | } else { | ||
150 | vpic.depth=24; | ||
151 | vpic.palette=VIDEO_PALETTE_RGB24; | ||
152 | |||
153 | if(ioctl(fd, VIDIOCSPICT, &vpic) < 0) { | ||
154 | vpic.palette=VIDEO_PALETTE_RGB565; | ||
155 | vpic.depth=16; | ||
156 | |||
157 | if(ioctl(fd, VIDIOCSPICT, &vpic)==-1) { | ||
158 | vpic.palette=VIDEO_PALETTE_RGB555; | ||
159 | vpic.depth=15; | ||
160 | |||
161 | if(ioctl(fd, VIDIOCSPICT, &vpic)==-1) { | ||
162 | fprintf(stderr, "Unable to find a supported capture format.\n"); | ||
163 | return -1; | ||
164 | } | ||
165 | } | ||
166 | } | ||
167 | } | ||
168 | |||
169 | buffer = malloc(win.width * win.height * bpp); | ||
170 | if (!buffer) { | ||
171 | fprintf(stderr, "Out of memory.\n"); | ||
172 | exit(1); | ||
173 | } | ||
174 | |||
175 | do { | ||
176 | int newbright; | ||
177 | read(fd, buffer, win.width * win.height * bpp); | ||
178 | f = get_brightness_adj(buffer, win.width * win.height, &newbright); | ||
179 | if (f) { | ||
180 | vpic.brightness += (newbright << 8); | ||
181 | if(ioctl(fd, VIDIOCSPICT, &vpic)==-1) { | ||
182 | perror("VIDIOSPICT"); | ||
183 | break; | ||
184 | } | ||
185 | } | ||
186 | } while (f); | ||
187 | |||
188 | fprintf(stdout, "P6\n%d %d 255\n", win.width, win.height); | ||
189 | |||
190 | src = buffer; | ||
191 | |||
192 | for (i = 0; i < win.width * win.height; i++) { | ||
193 | READ_VIDEO_PIXEL(src, vpic.palette, src_depth, r, g, b); | ||
194 | fputc(r>>8, stdout); | ||
195 | fputc(g>>8, stdout); | ||
196 | fputc(b>>8, stdout); | ||
197 | } | ||
198 | |||
199 | close(fd); | ||
200 | return 0; | ||
201 | } | ||
diff --git a/Documentation/video4linux/videobuf b/Documentation/video4linux/videobuf index 17a1f9abf260..1d00d7f15b8f 100644 --- a/Documentation/video4linux/videobuf +++ b/Documentation/video4linux/videobuf | |||
@@ -247,8 +247,6 @@ calls. The relevant helper functions are: | |||
247 | int nonblocking); | 247 | int nonblocking); |
248 | int videobuf_streamon(struct videobuf_queue *q); | 248 | int videobuf_streamon(struct videobuf_queue *q); |
249 | int videobuf_streamoff(struct videobuf_queue *q); | 249 | int videobuf_streamoff(struct videobuf_queue *q); |
250 | int videobuf_cgmbuf(struct videobuf_queue *q, struct video_mbuf *mbuf, | ||
251 | int count); | ||
252 | 250 | ||
253 | So, for example, a VIDIOC_REQBUFS call turns into a call to the driver's | 251 | So, for example, a VIDIOC_REQBUFS call turns into a call to the driver's |
254 | vidioc_reqbufs() callback which, in turn, usually only needs to locate the | 252 | vidioc_reqbufs() callback which, in turn, usually only needs to locate the |
@@ -258,10 +256,7 @@ boilerplate in a lot of V4L2 drivers. | |||
258 | 256 | ||
259 | The vidioc_streamon() and vidioc_streamoff() functions will be a bit more | 257 | The vidioc_streamon() and vidioc_streamoff() functions will be a bit more |
260 | complex, of course, since they will also need to deal with starting and | 258 | complex, of course, since they will also need to deal with starting and |
261 | stopping the capture engine. videobuf_cgmbuf(), called from the driver's | 259 | stopping the capture engine. |
262 | vidiocgmbuf() function, only exists if the V4L1 compatibility module has | ||
263 | been selected with CONFIG_VIDEO_V4L1_COMPAT, so its use must be surrounded | ||
264 | with #ifdef directives. | ||
265 | 260 | ||
266 | Buffer allocation | 261 | Buffer allocation |
267 | 262 | ||
diff --git a/Documentation/vm/Makefile b/Documentation/vm/Makefile index 9dcff328b964..3fa4d0668864 100644 --- a/Documentation/vm/Makefile +++ b/Documentation/vm/Makefile | |||
@@ -2,7 +2,7 @@ | |||
2 | obj- := dummy.o | 2 | obj- := dummy.o |
3 | 3 | ||
4 | # List of programs to build | 4 | # List of programs to build |
5 | hostprogs-y := slabinfo page-types hugepage-mmap hugepage-shm map_hugetlb | 5 | hostprogs-y := page-types hugepage-mmap hugepage-shm map_hugetlb |
6 | 6 | ||
7 | # Tell kbuild to always build the programs | 7 | # Tell kbuild to always build the programs |
8 | always := $(hostprogs-y) | 8 | always := $(hostprogs-y) |
diff --git a/Documentation/vm/slabinfo.c b/Documentation/vm/slabinfo.c deleted file mode 100644 index 92e729f4b676..000000000000 --- a/Documentation/vm/slabinfo.c +++ /dev/null | |||
@@ -1,1364 +0,0 @@ | |||
1 | /* | ||
2 | * Slabinfo: Tool to get reports about slabs | ||
3 | * | ||
4 | * (C) 2007 sgi, Christoph Lameter | ||
5 | * | ||
6 | * Compile by: | ||
7 | * | ||
8 | * gcc -o slabinfo slabinfo.c | ||
9 | */ | ||
10 | #include <stdio.h> | ||
11 | #include <stdlib.h> | ||
12 | #include <sys/types.h> | ||
13 | #include <dirent.h> | ||
14 | #include <strings.h> | ||
15 | #include <string.h> | ||
16 | #include <unistd.h> | ||
17 | #include <stdarg.h> | ||
18 | #include <getopt.h> | ||
19 | #include <regex.h> | ||
20 | #include <errno.h> | ||
21 | |||
22 | #define MAX_SLABS 500 | ||
23 | #define MAX_ALIASES 500 | ||
24 | #define MAX_NODES 1024 | ||
25 | |||
26 | struct slabinfo { | ||
27 | char *name; | ||
28 | int alias; | ||
29 | int refs; | ||
30 | int aliases, align, cache_dma, cpu_slabs, destroy_by_rcu; | ||
31 | int hwcache_align, object_size, objs_per_slab; | ||
32 | int sanity_checks, slab_size, store_user, trace; | ||
33 | int order, poison, reclaim_account, red_zone; | ||
34 | unsigned long partial, objects, slabs, objects_partial, objects_total; | ||
35 | unsigned long alloc_fastpath, alloc_slowpath; | ||
36 | unsigned long free_fastpath, free_slowpath; | ||
37 | unsigned long free_frozen, free_add_partial, free_remove_partial; | ||
38 | unsigned long alloc_from_partial, alloc_slab, free_slab, alloc_refill; | ||
39 | unsigned long cpuslab_flush, deactivate_full, deactivate_empty; | ||
40 | unsigned long deactivate_to_head, deactivate_to_tail; | ||
41 | unsigned long deactivate_remote_frees, order_fallback; | ||
42 | int numa[MAX_NODES]; | ||
43 | int numa_partial[MAX_NODES]; | ||
44 | } slabinfo[MAX_SLABS]; | ||
45 | |||
46 | struct aliasinfo { | ||
47 | char *name; | ||
48 | char *ref; | ||
49 | struct slabinfo *slab; | ||
50 | } aliasinfo[MAX_ALIASES]; | ||
51 | |||
52 | int slabs = 0; | ||
53 | int actual_slabs = 0; | ||
54 | int aliases = 0; | ||
55 | int alias_targets = 0; | ||
56 | int highest_node = 0; | ||
57 | |||
58 | char buffer[4096]; | ||
59 | |||
60 | int show_empty = 0; | ||
61 | int show_report = 0; | ||
62 | int show_alias = 0; | ||
63 | int show_slab = 0; | ||
64 | int skip_zero = 1; | ||
65 | int show_numa = 0; | ||
66 | int show_track = 0; | ||
67 | int show_first_alias = 0; | ||
68 | int validate = 0; | ||
69 | int shrink = 0; | ||
70 | int show_inverted = 0; | ||
71 | int show_single_ref = 0; | ||
72 | int show_totals = 0; | ||
73 | int sort_size = 0; | ||
74 | int sort_active = 0; | ||
75 | int set_debug = 0; | ||
76 | int show_ops = 0; | ||
77 | int show_activity = 0; | ||
78 | |||
79 | /* Debug options */ | ||
80 | int sanity = 0; | ||
81 | int redzone = 0; | ||
82 | int poison = 0; | ||
83 | int tracking = 0; | ||
84 | int tracing = 0; | ||
85 | |||
86 | int page_size; | ||
87 | |||
88 | regex_t pattern; | ||
89 | |||
90 | static void fatal(const char *x, ...) | ||
91 | { | ||
92 | va_list ap; | ||
93 | |||
94 | va_start(ap, x); | ||
95 | vfprintf(stderr, x, ap); | ||
96 | va_end(ap); | ||
97 | exit(EXIT_FAILURE); | ||
98 | } | ||
99 | |||
100 | static void usage(void) | ||
101 | { | ||
102 | printf("slabinfo 5/7/2007. (c) 2007 sgi.\n\n" | ||
103 | "slabinfo [-ahnpvtsz] [-d debugopts] [slab-regexp]\n" | ||
104 | "-a|--aliases Show aliases\n" | ||
105 | "-A|--activity Most active slabs first\n" | ||
106 | "-d<options>|--debug=<options> Set/Clear Debug options\n" | ||
107 | "-D|--display-active Switch line format to activity\n" | ||
108 | "-e|--empty Show empty slabs\n" | ||
109 | "-f|--first-alias Show first alias\n" | ||
110 | "-h|--help Show usage information\n" | ||
111 | "-i|--inverted Inverted list\n" | ||
112 | "-l|--slabs Show slabs\n" | ||
113 | "-n|--numa Show NUMA information\n" | ||
114 | "-o|--ops Show kmem_cache_ops\n" | ||
115 | "-s|--shrink Shrink slabs\n" | ||
116 | "-r|--report Detailed report on single slabs\n" | ||
117 | "-S|--Size Sort by size\n" | ||
118 | "-t|--tracking Show alloc/free information\n" | ||
119 | "-T|--Totals Show summary information\n" | ||
120 | "-v|--validate Validate slabs\n" | ||
121 | "-z|--zero Include empty slabs\n" | ||
122 | "-1|--1ref Single reference\n" | ||
123 | "\nValid debug options (FZPUT may be combined)\n" | ||
124 | "a / A Switch on all debug options (=FZUP)\n" | ||
125 | "- Switch off all debug options\n" | ||
126 | "f / F Sanity Checks (SLAB_DEBUG_FREE)\n" | ||
127 | "z / Z Redzoning\n" | ||
128 | "p / P Poisoning\n" | ||
129 | "u / U Tracking\n" | ||
130 | "t / T Tracing\n" | ||
131 | ); | ||
132 | } | ||
133 | |||
134 | static unsigned long read_obj(const char *name) | ||
135 | { | ||
136 | FILE *f = fopen(name, "r"); | ||
137 | |||
138 | if (!f) | ||
139 | buffer[0] = 0; | ||
140 | else { | ||
141 | if (!fgets(buffer, sizeof(buffer), f)) | ||
142 | buffer[0] = 0; | ||
143 | fclose(f); | ||
144 | if (buffer[strlen(buffer)] == '\n') | ||
145 | buffer[strlen(buffer)] = 0; | ||
146 | } | ||
147 | return strlen(buffer); | ||
148 | } | ||
149 | |||
150 | |||
151 | /* | ||
152 | * Get the contents of an attribute | ||
153 | */ | ||
154 | static unsigned long get_obj(const char *name) | ||
155 | { | ||
156 | if (!read_obj(name)) | ||
157 | return 0; | ||
158 | |||
159 | return atol(buffer); | ||
160 | } | ||
161 | |||
162 | static unsigned long get_obj_and_str(const char *name, char **x) | ||
163 | { | ||
164 | unsigned long result = 0; | ||
165 | char *p; | ||
166 | |||
167 | *x = NULL; | ||
168 | |||
169 | if (!read_obj(name)) { | ||
170 | x = NULL; | ||
171 | return 0; | ||
172 | } | ||
173 | result = strtoul(buffer, &p, 10); | ||
174 | while (*p == ' ') | ||
175 | p++; | ||
176 | if (*p) | ||
177 | *x = strdup(p); | ||
178 | return result; | ||
179 | } | ||
180 | |||
181 | static void set_obj(struct slabinfo *s, const char *name, int n) | ||
182 | { | ||
183 | char x[100]; | ||
184 | FILE *f; | ||
185 | |||
186 | snprintf(x, 100, "%s/%s", s->name, name); | ||
187 | f = fopen(x, "w"); | ||
188 | if (!f) | ||
189 | fatal("Cannot write to %s\n", x); | ||
190 | |||
191 | fprintf(f, "%d\n", n); | ||
192 | fclose(f); | ||
193 | } | ||
194 | |||
195 | static unsigned long read_slab_obj(struct slabinfo *s, const char *name) | ||
196 | { | ||
197 | char x[100]; | ||
198 | FILE *f; | ||
199 | size_t l; | ||
200 | |||
201 | snprintf(x, 100, "%s/%s", s->name, name); | ||
202 | f = fopen(x, "r"); | ||
203 | if (!f) { | ||
204 | buffer[0] = 0; | ||
205 | l = 0; | ||
206 | } else { | ||
207 | l = fread(buffer, 1, sizeof(buffer), f); | ||
208 | buffer[l] = 0; | ||
209 | fclose(f); | ||
210 | } | ||
211 | return l; | ||
212 | } | ||
213 | |||
214 | |||
215 | /* | ||
216 | * Put a size string together | ||
217 | */ | ||
218 | static int store_size(char *buffer, unsigned long value) | ||
219 | { | ||
220 | unsigned long divisor = 1; | ||
221 | char trailer = 0; | ||
222 | int n; | ||
223 | |||
224 | if (value > 1000000000UL) { | ||
225 | divisor = 100000000UL; | ||
226 | trailer = 'G'; | ||
227 | } else if (value > 1000000UL) { | ||
228 | divisor = 100000UL; | ||
229 | trailer = 'M'; | ||
230 | } else if (value > 1000UL) { | ||
231 | divisor = 100; | ||
232 | trailer = 'K'; | ||
233 | } | ||
234 | |||
235 | value /= divisor; | ||
236 | n = sprintf(buffer, "%ld",value); | ||
237 | if (trailer) { | ||
238 | buffer[n] = trailer; | ||
239 | n++; | ||
240 | buffer[n] = 0; | ||
241 | } | ||
242 | if (divisor != 1) { | ||
243 | memmove(buffer + n - 2, buffer + n - 3, 4); | ||
244 | buffer[n-2] = '.'; | ||
245 | n++; | ||
246 | } | ||
247 | return n; | ||
248 | } | ||
249 | |||
250 | static void decode_numa_list(int *numa, char *t) | ||
251 | { | ||
252 | int node; | ||
253 | int nr; | ||
254 | |||
255 | memset(numa, 0, MAX_NODES * sizeof(int)); | ||
256 | |||
257 | if (!t) | ||
258 | return; | ||
259 | |||
260 | while (*t == 'N') { | ||
261 | t++; | ||
262 | node = strtoul(t, &t, 10); | ||
263 | if (*t == '=') { | ||
264 | t++; | ||
265 | nr = strtoul(t, &t, 10); | ||
266 | numa[node] = nr; | ||
267 | if (node > highest_node) | ||
268 | highest_node = node; | ||
269 | } | ||
270 | while (*t == ' ') | ||
271 | t++; | ||
272 | } | ||
273 | } | ||
274 | |||
275 | static void slab_validate(struct slabinfo *s) | ||
276 | { | ||
277 | if (strcmp(s->name, "*") == 0) | ||
278 | return; | ||
279 | |||
280 | set_obj(s, "validate", 1); | ||
281 | } | ||
282 | |||
283 | static void slab_shrink(struct slabinfo *s) | ||
284 | { | ||
285 | if (strcmp(s->name, "*") == 0) | ||
286 | return; | ||
287 | |||
288 | set_obj(s, "shrink", 1); | ||
289 | } | ||
290 | |||
291 | int line = 0; | ||
292 | |||
293 | static void first_line(void) | ||
294 | { | ||
295 | if (show_activity) | ||
296 | printf("Name Objects Alloc Free %%Fast Fallb O\n"); | ||
297 | else | ||
298 | printf("Name Objects Objsize Space " | ||
299 | "Slabs/Part/Cpu O/S O %%Fr %%Ef Flg\n"); | ||
300 | } | ||
301 | |||
302 | /* | ||
303 | * Find the shortest alias of a slab | ||
304 | */ | ||
305 | static struct aliasinfo *find_one_alias(struct slabinfo *find) | ||
306 | { | ||
307 | struct aliasinfo *a; | ||
308 | struct aliasinfo *best = NULL; | ||
309 | |||
310 | for(a = aliasinfo;a < aliasinfo + aliases; a++) { | ||
311 | if (a->slab == find && | ||
312 | (!best || strlen(best->name) < strlen(a->name))) { | ||
313 | best = a; | ||
314 | if (strncmp(a->name,"kmall", 5) == 0) | ||
315 | return best; | ||
316 | } | ||
317 | } | ||
318 | return best; | ||
319 | } | ||
320 | |||
321 | static unsigned long slab_size(struct slabinfo *s) | ||
322 | { | ||
323 | return s->slabs * (page_size << s->order); | ||
324 | } | ||
325 | |||
326 | static unsigned long slab_activity(struct slabinfo *s) | ||
327 | { | ||
328 | return s->alloc_fastpath + s->free_fastpath + | ||
329 | s->alloc_slowpath + s->free_slowpath; | ||
330 | } | ||
331 | |||
332 | static void slab_numa(struct slabinfo *s, int mode) | ||
333 | { | ||
334 | int node; | ||
335 | |||
336 | if (strcmp(s->name, "*") == 0) | ||
337 | return; | ||
338 | |||
339 | if (!highest_node) { | ||
340 | printf("\n%s: No NUMA information available.\n", s->name); | ||
341 | return; | ||
342 | } | ||
343 | |||
344 | if (skip_zero && !s->slabs) | ||
345 | return; | ||
346 | |||
347 | if (!line) { | ||
348 | printf("\n%-21s:", mode ? "NUMA nodes" : "Slab"); | ||
349 | for(node = 0; node <= highest_node; node++) | ||
350 | printf(" %4d", node); | ||
351 | printf("\n----------------------"); | ||
352 | for(node = 0; node <= highest_node; node++) | ||
353 | printf("-----"); | ||
354 | printf("\n"); | ||
355 | } | ||
356 | printf("%-21s ", mode ? "All slabs" : s->name); | ||
357 | for(node = 0; node <= highest_node; node++) { | ||
358 | char b[20]; | ||
359 | |||
360 | store_size(b, s->numa[node]); | ||
361 | printf(" %4s", b); | ||
362 | } | ||
363 | printf("\n"); | ||
364 | if (mode) { | ||
365 | printf("%-21s ", "Partial slabs"); | ||
366 | for(node = 0; node <= highest_node; node++) { | ||
367 | char b[20]; | ||
368 | |||
369 | store_size(b, s->numa_partial[node]); | ||
370 | printf(" %4s", b); | ||
371 | } | ||
372 | printf("\n"); | ||
373 | } | ||
374 | line++; | ||
375 | } | ||
376 | |||
377 | static void show_tracking(struct slabinfo *s) | ||
378 | { | ||
379 | printf("\n%s: Kernel object allocation\n", s->name); | ||
380 | printf("-----------------------------------------------------------------------\n"); | ||
381 | if (read_slab_obj(s, "alloc_calls")) | ||
382 | printf(buffer); | ||
383 | else | ||
384 | printf("No Data\n"); | ||
385 | |||
386 | printf("\n%s: Kernel object freeing\n", s->name); | ||
387 | printf("------------------------------------------------------------------------\n"); | ||
388 | if (read_slab_obj(s, "free_calls")) | ||
389 | printf(buffer); | ||
390 | else | ||
391 | printf("No Data\n"); | ||
392 | |||
393 | } | ||
394 | |||
395 | static void ops(struct slabinfo *s) | ||
396 | { | ||
397 | if (strcmp(s->name, "*") == 0) | ||
398 | return; | ||
399 | |||
400 | if (read_slab_obj(s, "ops")) { | ||
401 | printf("\n%s: kmem_cache operations\n", s->name); | ||
402 | printf("--------------------------------------------\n"); | ||
403 | printf(buffer); | ||
404 | } else | ||
405 | printf("\n%s has no kmem_cache operations\n", s->name); | ||
406 | } | ||
407 | |||
408 | static const char *onoff(int x) | ||
409 | { | ||
410 | if (x) | ||
411 | return "On "; | ||
412 | return "Off"; | ||
413 | } | ||
414 | |||
415 | static void slab_stats(struct slabinfo *s) | ||
416 | { | ||
417 | unsigned long total_alloc; | ||
418 | unsigned long total_free; | ||
419 | unsigned long total; | ||
420 | |||
421 | if (!s->alloc_slab) | ||
422 | return; | ||
423 | |||
424 | total_alloc = s->alloc_fastpath + s->alloc_slowpath; | ||
425 | total_free = s->free_fastpath + s->free_slowpath; | ||
426 | |||
427 | if (!total_alloc) | ||
428 | return; | ||
429 | |||
430 | printf("\n"); | ||
431 | printf("Slab Perf Counter Alloc Free %%Al %%Fr\n"); | ||
432 | printf("--------------------------------------------------\n"); | ||
433 | printf("Fastpath %8lu %8lu %3lu %3lu\n", | ||
434 | s->alloc_fastpath, s->free_fastpath, | ||
435 | s->alloc_fastpath * 100 / total_alloc, | ||
436 | s->free_fastpath * 100 / total_free); | ||
437 | printf("Slowpath %8lu %8lu %3lu %3lu\n", | ||
438 | total_alloc - s->alloc_fastpath, s->free_slowpath, | ||
439 | (total_alloc - s->alloc_fastpath) * 100 / total_alloc, | ||
440 | s->free_slowpath * 100 / total_free); | ||
441 | printf("Page Alloc %8lu %8lu %3lu %3lu\n", | ||
442 | s->alloc_slab, s->free_slab, | ||
443 | s->alloc_slab * 100 / total_alloc, | ||
444 | s->free_slab * 100 / total_free); | ||
445 | printf("Add partial %8lu %8lu %3lu %3lu\n", | ||
446 | s->deactivate_to_head + s->deactivate_to_tail, | ||
447 | s->free_add_partial, | ||
448 | (s->deactivate_to_head + s->deactivate_to_tail) * 100 / total_alloc, | ||
449 | s->free_add_partial * 100 / total_free); | ||
450 | printf("Remove partial %8lu %8lu %3lu %3lu\n", | ||
451 | s->alloc_from_partial, s->free_remove_partial, | ||
452 | s->alloc_from_partial * 100 / total_alloc, | ||
453 | s->free_remove_partial * 100 / total_free); | ||
454 | |||
455 | printf("RemoteObj/SlabFrozen %8lu %8lu %3lu %3lu\n", | ||
456 | s->deactivate_remote_frees, s->free_frozen, | ||
457 | s->deactivate_remote_frees * 100 / total_alloc, | ||
458 | s->free_frozen * 100 / total_free); | ||
459 | |||
460 | printf("Total %8lu %8lu\n\n", total_alloc, total_free); | ||
461 | |||
462 | if (s->cpuslab_flush) | ||
463 | printf("Flushes %8lu\n", s->cpuslab_flush); | ||
464 | |||
465 | if (s->alloc_refill) | ||
466 | printf("Refill %8lu\n", s->alloc_refill); | ||
467 | |||
468 | total = s->deactivate_full + s->deactivate_empty + | ||
469 | s->deactivate_to_head + s->deactivate_to_tail; | ||
470 | |||
471 | if (total) | ||
472 | printf("Deactivate Full=%lu(%lu%%) Empty=%lu(%lu%%) " | ||
473 | "ToHead=%lu(%lu%%) ToTail=%lu(%lu%%)\n", | ||
474 | s->deactivate_full, (s->deactivate_full * 100) / total, | ||
475 | s->deactivate_empty, (s->deactivate_empty * 100) / total, | ||
476 | s->deactivate_to_head, (s->deactivate_to_head * 100) / total, | ||
477 | s->deactivate_to_tail, (s->deactivate_to_tail * 100) / total); | ||
478 | } | ||
479 | |||
480 | static void report(struct slabinfo *s) | ||
481 | { | ||
482 | if (strcmp(s->name, "*") == 0) | ||
483 | return; | ||
484 | |||
485 | printf("\nSlabcache: %-20s Aliases: %2d Order : %2d Objects: %lu\n", | ||
486 | s->name, s->aliases, s->order, s->objects); | ||
487 | if (s->hwcache_align) | ||
488 | printf("** Hardware cacheline aligned\n"); | ||
489 | if (s->cache_dma) | ||
490 | printf("** Memory is allocated in a special DMA zone\n"); | ||
491 | if (s->destroy_by_rcu) | ||
492 | printf("** Slabs are destroyed via RCU\n"); | ||
493 | if (s->reclaim_account) | ||
494 | printf("** Reclaim accounting active\n"); | ||
495 | |||
496 | printf("\nSizes (bytes) Slabs Debug Memory\n"); | ||
497 | printf("------------------------------------------------------------------------\n"); | ||
498 | printf("Object : %7d Total : %7ld Sanity Checks : %s Total: %7ld\n", | ||
499 | s->object_size, s->slabs, onoff(s->sanity_checks), | ||
500 | s->slabs * (page_size << s->order)); | ||
501 | printf("SlabObj: %7d Full : %7ld Redzoning : %s Used : %7ld\n", | ||
502 | s->slab_size, s->slabs - s->partial - s->cpu_slabs, | ||
503 | onoff(s->red_zone), s->objects * s->object_size); | ||
504 | printf("SlabSiz: %7d Partial: %7ld Poisoning : %s Loss : %7ld\n", | ||
505 | page_size << s->order, s->partial, onoff(s->poison), | ||
506 | s->slabs * (page_size << s->order) - s->objects * s->object_size); | ||
507 | printf("Loss : %7d CpuSlab: %7d Tracking : %s Lalig: %7ld\n", | ||
508 | s->slab_size - s->object_size, s->cpu_slabs, onoff(s->store_user), | ||
509 | (s->slab_size - s->object_size) * s->objects); | ||
510 | printf("Align : %7d Objects: %7d Tracing : %s Lpadd: %7ld\n", | ||
511 | s->align, s->objs_per_slab, onoff(s->trace), | ||
512 | ((page_size << s->order) - s->objs_per_slab * s->slab_size) * | ||
513 | s->slabs); | ||
514 | |||
515 | ops(s); | ||
516 | show_tracking(s); | ||
517 | slab_numa(s, 1); | ||
518 | slab_stats(s); | ||
519 | } | ||
520 | |||
521 | static void slabcache(struct slabinfo *s) | ||
522 | { | ||
523 | char size_str[20]; | ||
524 | char dist_str[40]; | ||
525 | char flags[20]; | ||
526 | char *p = flags; | ||
527 | |||
528 | if (strcmp(s->name, "*") == 0) | ||
529 | return; | ||
530 | |||
531 | if (actual_slabs == 1) { | ||
532 | report(s); | ||
533 | return; | ||
534 | } | ||
535 | |||
536 | if (skip_zero && !show_empty && !s->slabs) | ||
537 | return; | ||
538 | |||
539 | if (show_empty && s->slabs) | ||
540 | return; | ||
541 | |||
542 | store_size(size_str, slab_size(s)); | ||
543 | snprintf(dist_str, 40, "%lu/%lu/%d", s->slabs - s->cpu_slabs, | ||
544 | s->partial, s->cpu_slabs); | ||
545 | |||
546 | if (!line++) | ||
547 | first_line(); | ||
548 | |||
549 | if (s->aliases) | ||
550 | *p++ = '*'; | ||
551 | if (s->cache_dma) | ||
552 | *p++ = 'd'; | ||
553 | if (s->hwcache_align) | ||
554 | *p++ = 'A'; | ||
555 | if (s->poison) | ||
556 | *p++ = 'P'; | ||
557 | if (s->reclaim_account) | ||
558 | *p++ = 'a'; | ||
559 | if (s->red_zone) | ||
560 | *p++ = 'Z'; | ||
561 | if (s->sanity_checks) | ||
562 | *p++ = 'F'; | ||
563 | if (s->store_user) | ||
564 | *p++ = 'U'; | ||
565 | if (s->trace) | ||
566 | *p++ = 'T'; | ||
567 | |||
568 | *p = 0; | ||
569 | if (show_activity) { | ||
570 | unsigned long total_alloc; | ||
571 | unsigned long total_free; | ||
572 | |||
573 | total_alloc = s->alloc_fastpath + s->alloc_slowpath; | ||
574 | total_free = s->free_fastpath + s->free_slowpath; | ||
575 | |||
576 | printf("%-21s %8ld %10ld %10ld %3ld %3ld %5ld %1d\n", | ||
577 | s->name, s->objects, | ||
578 | total_alloc, total_free, | ||
579 | total_alloc ? (s->alloc_fastpath * 100 / total_alloc) : 0, | ||
580 | total_free ? (s->free_fastpath * 100 / total_free) : 0, | ||
581 | s->order_fallback, s->order); | ||
582 | } | ||
583 | else | ||
584 | printf("%-21s %8ld %7d %8s %14s %4d %1d %3ld %3ld %s\n", | ||
585 | s->name, s->objects, s->object_size, size_str, dist_str, | ||
586 | s->objs_per_slab, s->order, | ||
587 | s->slabs ? (s->partial * 100) / s->slabs : 100, | ||
588 | s->slabs ? (s->objects * s->object_size * 100) / | ||
589 | (s->slabs * (page_size << s->order)) : 100, | ||
590 | flags); | ||
591 | } | ||
592 | |||
593 | /* | ||
594 | * Analyze debug options. Return false if something is amiss. | ||
595 | */ | ||
596 | static int debug_opt_scan(char *opt) | ||
597 | { | ||
598 | if (!opt || !opt[0] || strcmp(opt, "-") == 0) | ||
599 | return 1; | ||
600 | |||
601 | if (strcasecmp(opt, "a") == 0) { | ||
602 | sanity = 1; | ||
603 | poison = 1; | ||
604 | redzone = 1; | ||
605 | tracking = 1; | ||
606 | return 1; | ||
607 | } | ||
608 | |||
609 | for ( ; *opt; opt++) | ||
610 | switch (*opt) { | ||
611 | case 'F' : case 'f': | ||
612 | if (sanity) | ||
613 | return 0; | ||
614 | sanity = 1; | ||
615 | break; | ||
616 | case 'P' : case 'p': | ||
617 | if (poison) | ||
618 | return 0; | ||
619 | poison = 1; | ||
620 | break; | ||
621 | |||
622 | case 'Z' : case 'z': | ||
623 | if (redzone) | ||
624 | return 0; | ||
625 | redzone = 1; | ||
626 | break; | ||
627 | |||
628 | case 'U' : case 'u': | ||
629 | if (tracking) | ||
630 | return 0; | ||
631 | tracking = 1; | ||
632 | break; | ||
633 | |||
634 | case 'T' : case 't': | ||
635 | if (tracing) | ||
636 | return 0; | ||
637 | tracing = 1; | ||
638 | break; | ||
639 | default: | ||
640 | return 0; | ||
641 | } | ||
642 | return 1; | ||
643 | } | ||
644 | |||
645 | static int slab_empty(struct slabinfo *s) | ||
646 | { | ||
647 | if (s->objects > 0) | ||
648 | return 0; | ||
649 | |||
650 | /* | ||
651 | * We may still have slabs even if there are no objects. Shrinking will | ||
652 | * remove them. | ||
653 | */ | ||
654 | if (s->slabs != 0) | ||
655 | set_obj(s, "shrink", 1); | ||
656 | |||
657 | return 1; | ||
658 | } | ||
659 | |||
660 | static void slab_debug(struct slabinfo *s) | ||
661 | { | ||
662 | if (strcmp(s->name, "*") == 0) | ||
663 | return; | ||
664 | |||
665 | if (sanity && !s->sanity_checks) { | ||
666 | set_obj(s, "sanity", 1); | ||
667 | } | ||
668 | if (!sanity && s->sanity_checks) { | ||
669 | if (slab_empty(s)) | ||
670 | set_obj(s, "sanity", 0); | ||
671 | else | ||
672 | fprintf(stderr, "%s not empty cannot disable sanity checks\n", s->name); | ||
673 | } | ||
674 | if (redzone && !s->red_zone) { | ||
675 | if (slab_empty(s)) | ||
676 | set_obj(s, "red_zone", 1); | ||
677 | else | ||
678 | fprintf(stderr, "%s not empty cannot enable redzoning\n", s->name); | ||
679 | } | ||
680 | if (!redzone && s->red_zone) { | ||
681 | if (slab_empty(s)) | ||
682 | set_obj(s, "red_zone", 0); | ||
683 | else | ||
684 | fprintf(stderr, "%s not empty cannot disable redzoning\n", s->name); | ||
685 | } | ||
686 | if (poison && !s->poison) { | ||
687 | if (slab_empty(s)) | ||
688 | set_obj(s, "poison", 1); | ||
689 | else | ||
690 | fprintf(stderr, "%s not empty cannot enable poisoning\n", s->name); | ||
691 | } | ||
692 | if (!poison && s->poison) { | ||
693 | if (slab_empty(s)) | ||
694 | set_obj(s, "poison", 0); | ||
695 | else | ||
696 | fprintf(stderr, "%s not empty cannot disable poisoning\n", s->name); | ||
697 | } | ||
698 | if (tracking && !s->store_user) { | ||
699 | if (slab_empty(s)) | ||
700 | set_obj(s, "store_user", 1); | ||
701 | else | ||
702 | fprintf(stderr, "%s not empty cannot enable tracking\n", s->name); | ||
703 | } | ||
704 | if (!tracking && s->store_user) { | ||
705 | if (slab_empty(s)) | ||
706 | set_obj(s, "store_user", 0); | ||
707 | else | ||
708 | fprintf(stderr, "%s not empty cannot disable tracking\n", s->name); | ||
709 | } | ||
710 | if (tracing && !s->trace) { | ||
711 | if (slabs == 1) | ||
712 | set_obj(s, "trace", 1); | ||
713 | else | ||
714 | fprintf(stderr, "%s can only enable trace for one slab at a time\n", s->name); | ||
715 | } | ||
716 | if (!tracing && s->trace) | ||
717 | set_obj(s, "trace", 1); | ||
718 | } | ||
719 | |||
720 | static void totals(void) | ||
721 | { | ||
722 | struct slabinfo *s; | ||
723 | |||
724 | int used_slabs = 0; | ||
725 | char b1[20], b2[20], b3[20], b4[20]; | ||
726 | unsigned long long max = 1ULL << 63; | ||
727 | |||
728 | /* Object size */ | ||
729 | unsigned long long min_objsize = max, max_objsize = 0, avg_objsize; | ||
730 | |||
731 | /* Number of partial slabs in a slabcache */ | ||
732 | unsigned long long min_partial = max, max_partial = 0, | ||
733 | avg_partial, total_partial = 0; | ||
734 | |||
735 | /* Number of slabs in a slab cache */ | ||
736 | unsigned long long min_slabs = max, max_slabs = 0, | ||
737 | avg_slabs, total_slabs = 0; | ||
738 | |||
739 | /* Size of the whole slab */ | ||
740 | unsigned long long min_size = max, max_size = 0, | ||
741 | avg_size, total_size = 0; | ||
742 | |||
743 | /* Bytes used for object storage in a slab */ | ||
744 | unsigned long long min_used = max, max_used = 0, | ||
745 | avg_used, total_used = 0; | ||
746 | |||
747 | /* Waste: Bytes used for alignment and padding */ | ||
748 | unsigned long long min_waste = max, max_waste = 0, | ||
749 | avg_waste, total_waste = 0; | ||
750 | /* Number of objects in a slab */ | ||
751 | unsigned long long min_objects = max, max_objects = 0, | ||
752 | avg_objects, total_objects = 0; | ||
753 | /* Waste per object */ | ||
754 | unsigned long long min_objwaste = max, | ||
755 | max_objwaste = 0, avg_objwaste, | ||
756 | total_objwaste = 0; | ||
757 | |||
758 | /* Memory per object */ | ||
759 | unsigned long long min_memobj = max, | ||
760 | max_memobj = 0, avg_memobj, | ||
761 | total_objsize = 0; | ||
762 | |||
763 | /* Percentage of partial slabs per slab */ | ||
764 | unsigned long min_ppart = 100, max_ppart = 0, | ||
765 | avg_ppart, total_ppart = 0; | ||
766 | |||
767 | /* Number of objects in partial slabs */ | ||
768 | unsigned long min_partobj = max, max_partobj = 0, | ||
769 | avg_partobj, total_partobj = 0; | ||
770 | |||
771 | /* Percentage of partial objects of all objects in a slab */ | ||
772 | unsigned long min_ppartobj = 100, max_ppartobj = 0, | ||
773 | avg_ppartobj, total_ppartobj = 0; | ||
774 | |||
775 | |||
776 | for (s = slabinfo; s < slabinfo + slabs; s++) { | ||
777 | unsigned long long size; | ||
778 | unsigned long used; | ||
779 | unsigned long long wasted; | ||
780 | unsigned long long objwaste; | ||
781 | unsigned long percentage_partial_slabs; | ||
782 | unsigned long percentage_partial_objs; | ||
783 | |||
784 | if (!s->slabs || !s->objects) | ||
785 | continue; | ||
786 | |||
787 | used_slabs++; | ||
788 | |||
789 | size = slab_size(s); | ||
790 | used = s->objects * s->object_size; | ||
791 | wasted = size - used; | ||
792 | objwaste = s->slab_size - s->object_size; | ||
793 | |||
794 | percentage_partial_slabs = s->partial * 100 / s->slabs; | ||
795 | if (percentage_partial_slabs > 100) | ||
796 | percentage_partial_slabs = 100; | ||
797 | |||
798 | percentage_partial_objs = s->objects_partial * 100 | ||
799 | / s->objects; | ||
800 | |||
801 | if (percentage_partial_objs > 100) | ||
802 | percentage_partial_objs = 100; | ||
803 | |||
804 | if (s->object_size < min_objsize) | ||
805 | min_objsize = s->object_size; | ||
806 | if (s->partial < min_partial) | ||
807 | min_partial = s->partial; | ||
808 | if (s->slabs < min_slabs) | ||
809 | min_slabs = s->slabs; | ||
810 | if (size < min_size) | ||
811 | min_size = size; | ||
812 | if (wasted < min_waste) | ||
813 | min_waste = wasted; | ||
814 | if (objwaste < min_objwaste) | ||
815 | min_objwaste = objwaste; | ||
816 | if (s->objects < min_objects) | ||
817 | min_objects = s->objects; | ||
818 | if (used < min_used) | ||
819 | min_used = used; | ||
820 | if (s->objects_partial < min_partobj) | ||
821 | min_partobj = s->objects_partial; | ||
822 | if (percentage_partial_slabs < min_ppart) | ||
823 | min_ppart = percentage_partial_slabs; | ||
824 | if (percentage_partial_objs < min_ppartobj) | ||
825 | min_ppartobj = percentage_partial_objs; | ||
826 | if (s->slab_size < min_memobj) | ||
827 | min_memobj = s->slab_size; | ||
828 | |||
829 | if (s->object_size > max_objsize) | ||
830 | max_objsize = s->object_size; | ||
831 | if (s->partial > max_partial) | ||
832 | max_partial = s->partial; | ||
833 | if (s->slabs > max_slabs) | ||
834 | max_slabs = s->slabs; | ||
835 | if (size > max_size) | ||
836 | max_size = size; | ||
837 | if (wasted > max_waste) | ||
838 | max_waste = wasted; | ||
839 | if (objwaste > max_objwaste) | ||
840 | max_objwaste = objwaste; | ||
841 | if (s->objects > max_objects) | ||
842 | max_objects = s->objects; | ||
843 | if (used > max_used) | ||
844 | max_used = used; | ||
845 | if (s->objects_partial > max_partobj) | ||
846 | max_partobj = s->objects_partial; | ||
847 | if (percentage_partial_slabs > max_ppart) | ||
848 | max_ppart = percentage_partial_slabs; | ||
849 | if (percentage_partial_objs > max_ppartobj) | ||
850 | max_ppartobj = percentage_partial_objs; | ||
851 | if (s->slab_size > max_memobj) | ||
852 | max_memobj = s->slab_size; | ||
853 | |||
854 | total_partial += s->partial; | ||
855 | total_slabs += s->slabs; | ||
856 | total_size += size; | ||
857 | total_waste += wasted; | ||
858 | |||
859 | total_objects += s->objects; | ||
860 | total_used += used; | ||
861 | total_partobj += s->objects_partial; | ||
862 | total_ppart += percentage_partial_slabs; | ||
863 | total_ppartobj += percentage_partial_objs; | ||
864 | |||
865 | total_objwaste += s->objects * objwaste; | ||
866 | total_objsize += s->objects * s->slab_size; | ||
867 | } | ||
868 | |||
869 | if (!total_objects) { | ||
870 | printf("No objects\n"); | ||
871 | return; | ||
872 | } | ||
873 | if (!used_slabs) { | ||
874 | printf("No slabs\n"); | ||
875 | return; | ||
876 | } | ||
877 | |||
878 | /* Per slab averages */ | ||
879 | avg_partial = total_partial / used_slabs; | ||
880 | avg_slabs = total_slabs / used_slabs; | ||
881 | avg_size = total_size / used_slabs; | ||
882 | avg_waste = total_waste / used_slabs; | ||
883 | |||
884 | avg_objects = total_objects / used_slabs; | ||
885 | avg_used = total_used / used_slabs; | ||
886 | avg_partobj = total_partobj / used_slabs; | ||
887 | avg_ppart = total_ppart / used_slabs; | ||
888 | avg_ppartobj = total_ppartobj / used_slabs; | ||
889 | |||
890 | /* Per object object sizes */ | ||
891 | avg_objsize = total_used / total_objects; | ||
892 | avg_objwaste = total_objwaste / total_objects; | ||
893 | avg_partobj = total_partobj * 100 / total_objects; | ||
894 | avg_memobj = total_objsize / total_objects; | ||
895 | |||
896 | printf("Slabcache Totals\n"); | ||
897 | printf("----------------\n"); | ||
898 | printf("Slabcaches : %3d Aliases : %3d->%-3d Active: %3d\n", | ||
899 | slabs, aliases, alias_targets, used_slabs); | ||
900 | |||
901 | store_size(b1, total_size);store_size(b2, total_waste); | ||
902 | store_size(b3, total_waste * 100 / total_used); | ||
903 | printf("Memory used: %6s # Loss : %6s MRatio:%6s%%\n", b1, b2, b3); | ||
904 | |||
905 | store_size(b1, total_objects);store_size(b2, total_partobj); | ||
906 | store_size(b3, total_partobj * 100 / total_objects); | ||
907 | printf("# Objects : %6s # PartObj: %6s ORatio:%6s%%\n", b1, b2, b3); | ||
908 | |||
909 | printf("\n"); | ||
910 | printf("Per Cache Average Min Max Total\n"); | ||
911 | printf("---------------------------------------------------------\n"); | ||
912 | |||
913 | store_size(b1, avg_objects);store_size(b2, min_objects); | ||
914 | store_size(b3, max_objects);store_size(b4, total_objects); | ||
915 | printf("#Objects %10s %10s %10s %10s\n", | ||
916 | b1, b2, b3, b4); | ||
917 | |||
918 | store_size(b1, avg_slabs);store_size(b2, min_slabs); | ||
919 | store_size(b3, max_slabs);store_size(b4, total_slabs); | ||
920 | printf("#Slabs %10s %10s %10s %10s\n", | ||
921 | b1, b2, b3, b4); | ||
922 | |||
923 | store_size(b1, avg_partial);store_size(b2, min_partial); | ||
924 | store_size(b3, max_partial);store_size(b4, total_partial); | ||
925 | printf("#PartSlab %10s %10s %10s %10s\n", | ||
926 | b1, b2, b3, b4); | ||
927 | store_size(b1, avg_ppart);store_size(b2, min_ppart); | ||
928 | store_size(b3, max_ppart); | ||
929 | store_size(b4, total_partial * 100 / total_slabs); | ||
930 | printf("%%PartSlab%10s%% %10s%% %10s%% %10s%%\n", | ||
931 | b1, b2, b3, b4); | ||
932 | |||
933 | store_size(b1, avg_partobj);store_size(b2, min_partobj); | ||
934 | store_size(b3, max_partobj); | ||
935 | store_size(b4, total_partobj); | ||
936 | printf("PartObjs %10s %10s %10s %10s\n", | ||
937 | b1, b2, b3, b4); | ||
938 | |||
939 | store_size(b1, avg_ppartobj);store_size(b2, min_ppartobj); | ||
940 | store_size(b3, max_ppartobj); | ||
941 | store_size(b4, total_partobj * 100 / total_objects); | ||
942 | printf("%% PartObj%10s%% %10s%% %10s%% %10s%%\n", | ||
943 | b1, b2, b3, b4); | ||
944 | |||
945 | store_size(b1, avg_size);store_size(b2, min_size); | ||
946 | store_size(b3, max_size);store_size(b4, total_size); | ||
947 | printf("Memory %10s %10s %10s %10s\n", | ||
948 | b1, b2, b3, b4); | ||
949 | |||
950 | store_size(b1, avg_used);store_size(b2, min_used); | ||
951 | store_size(b3, max_used);store_size(b4, total_used); | ||
952 | printf("Used %10s %10s %10s %10s\n", | ||
953 | b1, b2, b3, b4); | ||
954 | |||
955 | store_size(b1, avg_waste);store_size(b2, min_waste); | ||
956 | store_size(b3, max_waste);store_size(b4, total_waste); | ||
957 | printf("Loss %10s %10s %10s %10s\n", | ||
958 | b1, b2, b3, b4); | ||
959 | |||
960 | printf("\n"); | ||
961 | printf("Per Object Average Min Max\n"); | ||
962 | printf("---------------------------------------------\n"); | ||
963 | |||
964 | store_size(b1, avg_memobj);store_size(b2, min_memobj); | ||
965 | store_size(b3, max_memobj); | ||
966 | printf("Memory %10s %10s %10s\n", | ||
967 | b1, b2, b3); | ||
968 | store_size(b1, avg_objsize);store_size(b2, min_objsize); | ||
969 | store_size(b3, max_objsize); | ||
970 | printf("User %10s %10s %10s\n", | ||
971 | b1, b2, b3); | ||
972 | |||
973 | store_size(b1, avg_objwaste);store_size(b2, min_objwaste); | ||
974 | store_size(b3, max_objwaste); | ||
975 | printf("Loss %10s %10s %10s\n", | ||
976 | b1, b2, b3); | ||
977 | } | ||
978 | |||
979 | static void sort_slabs(void) | ||
980 | { | ||
981 | struct slabinfo *s1,*s2; | ||
982 | |||
983 | for (s1 = slabinfo; s1 < slabinfo + slabs; s1++) { | ||
984 | for (s2 = s1 + 1; s2 < slabinfo + slabs; s2++) { | ||
985 | int result; | ||
986 | |||
987 | if (sort_size) | ||
988 | result = slab_size(s1) < slab_size(s2); | ||
989 | else if (sort_active) | ||
990 | result = slab_activity(s1) < slab_activity(s2); | ||
991 | else | ||
992 | result = strcasecmp(s1->name, s2->name); | ||
993 | |||
994 | if (show_inverted) | ||
995 | result = -result; | ||
996 | |||
997 | if (result > 0) { | ||
998 | struct slabinfo t; | ||
999 | |||
1000 | memcpy(&t, s1, sizeof(struct slabinfo)); | ||
1001 | memcpy(s1, s2, sizeof(struct slabinfo)); | ||
1002 | memcpy(s2, &t, sizeof(struct slabinfo)); | ||
1003 | } | ||
1004 | } | ||
1005 | } | ||
1006 | } | ||
1007 | |||
1008 | static void sort_aliases(void) | ||
1009 | { | ||
1010 | struct aliasinfo *a1,*a2; | ||
1011 | |||
1012 | for (a1 = aliasinfo; a1 < aliasinfo + aliases; a1++) { | ||
1013 | for (a2 = a1 + 1; a2 < aliasinfo + aliases; a2++) { | ||
1014 | char *n1, *n2; | ||
1015 | |||
1016 | n1 = a1->name; | ||
1017 | n2 = a2->name; | ||
1018 | if (show_alias && !show_inverted) { | ||
1019 | n1 = a1->ref; | ||
1020 | n2 = a2->ref; | ||
1021 | } | ||
1022 | if (strcasecmp(n1, n2) > 0) { | ||
1023 | struct aliasinfo t; | ||
1024 | |||
1025 | memcpy(&t, a1, sizeof(struct aliasinfo)); | ||
1026 | memcpy(a1, a2, sizeof(struct aliasinfo)); | ||
1027 | memcpy(a2, &t, sizeof(struct aliasinfo)); | ||
1028 | } | ||
1029 | } | ||
1030 | } | ||
1031 | } | ||
1032 | |||
1033 | static void link_slabs(void) | ||
1034 | { | ||
1035 | struct aliasinfo *a; | ||
1036 | struct slabinfo *s; | ||
1037 | |||
1038 | for (a = aliasinfo; a < aliasinfo + aliases; a++) { | ||
1039 | |||
1040 | for (s = slabinfo; s < slabinfo + slabs; s++) | ||
1041 | if (strcmp(a->ref, s->name) == 0) { | ||
1042 | a->slab = s; | ||
1043 | s->refs++; | ||
1044 | break; | ||
1045 | } | ||
1046 | if (s == slabinfo + slabs) | ||
1047 | fatal("Unresolved alias %s\n", a->ref); | ||
1048 | } | ||
1049 | } | ||
1050 | |||
1051 | static void alias(void) | ||
1052 | { | ||
1053 | struct aliasinfo *a; | ||
1054 | char *active = NULL; | ||
1055 | |||
1056 | sort_aliases(); | ||
1057 | link_slabs(); | ||
1058 | |||
1059 | for(a = aliasinfo; a < aliasinfo + aliases; a++) { | ||
1060 | |||
1061 | if (!show_single_ref && a->slab->refs == 1) | ||
1062 | continue; | ||
1063 | |||
1064 | if (!show_inverted) { | ||
1065 | if (active) { | ||
1066 | if (strcmp(a->slab->name, active) == 0) { | ||
1067 | printf(" %s", a->name); | ||
1068 | continue; | ||
1069 | } | ||
1070 | } | ||
1071 | printf("\n%-12s <- %s", a->slab->name, a->name); | ||
1072 | active = a->slab->name; | ||
1073 | } | ||
1074 | else | ||
1075 | printf("%-20s -> %s\n", a->name, a->slab->name); | ||
1076 | } | ||
1077 | if (active) | ||
1078 | printf("\n"); | ||
1079 | } | ||
1080 | |||
1081 | |||
1082 | static void rename_slabs(void) | ||
1083 | { | ||
1084 | struct slabinfo *s; | ||
1085 | struct aliasinfo *a; | ||
1086 | |||
1087 | for (s = slabinfo; s < slabinfo + slabs; s++) { | ||
1088 | if (*s->name != ':') | ||
1089 | continue; | ||
1090 | |||
1091 | if (s->refs > 1 && !show_first_alias) | ||
1092 | continue; | ||
1093 | |||
1094 | a = find_one_alias(s); | ||
1095 | |||
1096 | if (a) | ||
1097 | s->name = a->name; | ||
1098 | else { | ||
1099 | s->name = "*"; | ||
1100 | actual_slabs--; | ||
1101 | } | ||
1102 | } | ||
1103 | } | ||
1104 | |||
1105 | static int slab_mismatch(char *slab) | ||
1106 | { | ||
1107 | return regexec(&pattern, slab, 0, NULL, 0); | ||
1108 | } | ||
1109 | |||
1110 | static void read_slab_dir(void) | ||
1111 | { | ||
1112 | DIR *dir; | ||
1113 | struct dirent *de; | ||
1114 | struct slabinfo *slab = slabinfo; | ||
1115 | struct aliasinfo *alias = aliasinfo; | ||
1116 | char *p; | ||
1117 | char *t; | ||
1118 | int count; | ||
1119 | |||
1120 | if (chdir("/sys/kernel/slab") && chdir("/sys/slab")) | ||
1121 | fatal("SYSFS support for SLUB not active\n"); | ||
1122 | |||
1123 | dir = opendir("."); | ||
1124 | while ((de = readdir(dir))) { | ||
1125 | if (de->d_name[0] == '.' || | ||
1126 | (de->d_name[0] != ':' && slab_mismatch(de->d_name))) | ||
1127 | continue; | ||
1128 | switch (de->d_type) { | ||
1129 | case DT_LNK: | ||
1130 | alias->name = strdup(de->d_name); | ||
1131 | count = readlink(de->d_name, buffer, sizeof(buffer)); | ||
1132 | |||
1133 | if (count < 0) | ||
1134 | fatal("Cannot read symlink %s\n", de->d_name); | ||
1135 | |||
1136 | buffer[count] = 0; | ||
1137 | p = buffer + count; | ||
1138 | while (p > buffer && p[-1] != '/') | ||
1139 | p--; | ||
1140 | alias->ref = strdup(p); | ||
1141 | alias++; | ||
1142 | break; | ||
1143 | case DT_DIR: | ||
1144 | if (chdir(de->d_name)) | ||
1145 | fatal("Unable to access slab %s\n", slab->name); | ||
1146 | slab->name = strdup(de->d_name); | ||
1147 | slab->alias = 0; | ||
1148 | slab->refs = 0; | ||
1149 | slab->aliases = get_obj("aliases"); | ||
1150 | slab->align = get_obj("align"); | ||
1151 | slab->cache_dma = get_obj("cache_dma"); | ||
1152 | slab->cpu_slabs = get_obj("cpu_slabs"); | ||
1153 | slab->destroy_by_rcu = get_obj("destroy_by_rcu"); | ||
1154 | slab->hwcache_align = get_obj("hwcache_align"); | ||
1155 | slab->object_size = get_obj("object_size"); | ||
1156 | slab->objects = get_obj("objects"); | ||
1157 | slab->objects_partial = get_obj("objects_partial"); | ||
1158 | slab->objects_total = get_obj("objects_total"); | ||
1159 | slab->objs_per_slab = get_obj("objs_per_slab"); | ||
1160 | slab->order = get_obj("order"); | ||
1161 | slab->partial = get_obj("partial"); | ||
1162 | slab->partial = get_obj_and_str("partial", &t); | ||
1163 | decode_numa_list(slab->numa_partial, t); | ||
1164 | free(t); | ||
1165 | slab->poison = get_obj("poison"); | ||
1166 | slab->reclaim_account = get_obj("reclaim_account"); | ||
1167 | slab->red_zone = get_obj("red_zone"); | ||
1168 | slab->sanity_checks = get_obj("sanity_checks"); | ||
1169 | slab->slab_size = get_obj("slab_size"); | ||
1170 | slab->slabs = get_obj_and_str("slabs", &t); | ||
1171 | decode_numa_list(slab->numa, t); | ||
1172 | free(t); | ||
1173 | slab->store_user = get_obj("store_user"); | ||
1174 | slab->trace = get_obj("trace"); | ||
1175 | slab->alloc_fastpath = get_obj("alloc_fastpath"); | ||
1176 | slab->alloc_slowpath = get_obj("alloc_slowpath"); | ||
1177 | slab->free_fastpath = get_obj("free_fastpath"); | ||
1178 | slab->free_slowpath = get_obj("free_slowpath"); | ||
1179 | slab->free_frozen= get_obj("free_frozen"); | ||
1180 | slab->free_add_partial = get_obj("free_add_partial"); | ||
1181 | slab->free_remove_partial = get_obj("free_remove_partial"); | ||
1182 | slab->alloc_from_partial = get_obj("alloc_from_partial"); | ||
1183 | slab->alloc_slab = get_obj("alloc_slab"); | ||
1184 | slab->alloc_refill = get_obj("alloc_refill"); | ||
1185 | slab->free_slab = get_obj("free_slab"); | ||
1186 | slab->cpuslab_flush = get_obj("cpuslab_flush"); | ||
1187 | slab->deactivate_full = get_obj("deactivate_full"); | ||
1188 | slab->deactivate_empty = get_obj("deactivate_empty"); | ||
1189 | slab->deactivate_to_head = get_obj("deactivate_to_head"); | ||
1190 | slab->deactivate_to_tail = get_obj("deactivate_to_tail"); | ||
1191 | slab->deactivate_remote_frees = get_obj("deactivate_remote_frees"); | ||
1192 | slab->order_fallback = get_obj("order_fallback"); | ||
1193 | chdir(".."); | ||
1194 | if (slab->name[0] == ':') | ||
1195 | alias_targets++; | ||
1196 | slab++; | ||
1197 | break; | ||
1198 | default : | ||
1199 | fatal("Unknown file type %lx\n", de->d_type); | ||
1200 | } | ||
1201 | } | ||
1202 | closedir(dir); | ||
1203 | slabs = slab - slabinfo; | ||
1204 | actual_slabs = slabs; | ||
1205 | aliases = alias - aliasinfo; | ||
1206 | if (slabs > MAX_SLABS) | ||
1207 | fatal("Too many slabs\n"); | ||
1208 | if (aliases > MAX_ALIASES) | ||
1209 | fatal("Too many aliases\n"); | ||
1210 | } | ||
1211 | |||
1212 | static void output_slabs(void) | ||
1213 | { | ||
1214 | struct slabinfo *slab; | ||
1215 | |||
1216 | for (slab = slabinfo; slab < slabinfo + slabs; slab++) { | ||
1217 | |||
1218 | if (slab->alias) | ||
1219 | continue; | ||
1220 | |||
1221 | |||
1222 | if (show_numa) | ||
1223 | slab_numa(slab, 0); | ||
1224 | else if (show_track) | ||
1225 | show_tracking(slab); | ||
1226 | else if (validate) | ||
1227 | slab_validate(slab); | ||
1228 | else if (shrink) | ||
1229 | slab_shrink(slab); | ||
1230 | else if (set_debug) | ||
1231 | slab_debug(slab); | ||
1232 | else if (show_ops) | ||
1233 | ops(slab); | ||
1234 | else if (show_slab) | ||
1235 | slabcache(slab); | ||
1236 | else if (show_report) | ||
1237 | report(slab); | ||
1238 | } | ||
1239 | } | ||
1240 | |||
1241 | struct option opts[] = { | ||
1242 | { "aliases", 0, NULL, 'a' }, | ||
1243 | { "activity", 0, NULL, 'A' }, | ||
1244 | { "debug", 2, NULL, 'd' }, | ||
1245 | { "display-activity", 0, NULL, 'D' }, | ||
1246 | { "empty", 0, NULL, 'e' }, | ||
1247 | { "first-alias", 0, NULL, 'f' }, | ||
1248 | { "help", 0, NULL, 'h' }, | ||
1249 | { "inverted", 0, NULL, 'i'}, | ||
1250 | { "numa", 0, NULL, 'n' }, | ||
1251 | { "ops", 0, NULL, 'o' }, | ||
1252 | { "report", 0, NULL, 'r' }, | ||
1253 | { "shrink", 0, NULL, 's' }, | ||
1254 | { "slabs", 0, NULL, 'l' }, | ||
1255 | { "track", 0, NULL, 't'}, | ||
1256 | { "validate", 0, NULL, 'v' }, | ||
1257 | { "zero", 0, NULL, 'z' }, | ||
1258 | { "1ref", 0, NULL, '1'}, | ||
1259 | { NULL, 0, NULL, 0 } | ||
1260 | }; | ||
1261 | |||
1262 | int main(int argc, char *argv[]) | ||
1263 | { | ||
1264 | int c; | ||
1265 | int err; | ||
1266 | char *pattern_source; | ||
1267 | |||
1268 | page_size = getpagesize(); | ||
1269 | |||
1270 | while ((c = getopt_long(argc, argv, "aAd::Defhil1noprstvzTS", | ||
1271 | opts, NULL)) != -1) | ||
1272 | switch (c) { | ||
1273 | case '1': | ||
1274 | show_single_ref = 1; | ||
1275 | break; | ||
1276 | case 'a': | ||
1277 | show_alias = 1; | ||
1278 | break; | ||
1279 | case 'A': | ||
1280 | sort_active = 1; | ||
1281 | break; | ||
1282 | case 'd': | ||
1283 | set_debug = 1; | ||
1284 | if (!debug_opt_scan(optarg)) | ||
1285 | fatal("Invalid debug option '%s'\n", optarg); | ||
1286 | break; | ||
1287 | case 'D': | ||
1288 | show_activity = 1; | ||
1289 | break; | ||
1290 | case 'e': | ||
1291 | show_empty = 1; | ||
1292 | break; | ||
1293 | case 'f': | ||
1294 | show_first_alias = 1; | ||
1295 | break; | ||
1296 | case 'h': | ||
1297 | usage(); | ||
1298 | return 0; | ||
1299 | case 'i': | ||
1300 | show_inverted = 1; | ||
1301 | break; | ||
1302 | case 'n': | ||
1303 | show_numa = 1; | ||
1304 | break; | ||
1305 | case 'o': | ||
1306 | show_ops = 1; | ||
1307 | break; | ||
1308 | case 'r': | ||
1309 | show_report = 1; | ||
1310 | break; | ||
1311 | case 's': | ||
1312 | shrink = 1; | ||
1313 | break; | ||
1314 | case 'l': | ||
1315 | show_slab = 1; | ||
1316 | break; | ||
1317 | case 't': | ||
1318 | show_track = 1; | ||
1319 | break; | ||
1320 | case 'v': | ||
1321 | validate = 1; | ||
1322 | break; | ||
1323 | case 'z': | ||
1324 | skip_zero = 0; | ||
1325 | break; | ||
1326 | case 'T': | ||
1327 | show_totals = 1; | ||
1328 | break; | ||
1329 | case 'S': | ||
1330 | sort_size = 1; | ||
1331 | break; | ||
1332 | |||
1333 | default: | ||
1334 | fatal("%s: Invalid option '%c'\n", argv[0], optopt); | ||
1335 | |||
1336 | } | ||
1337 | |||
1338 | if (!show_slab && !show_alias && !show_track && !show_report | ||
1339 | && !validate && !shrink && !set_debug && !show_ops) | ||
1340 | show_slab = 1; | ||
1341 | |||
1342 | if (argc > optind) | ||
1343 | pattern_source = argv[optind]; | ||
1344 | else | ||
1345 | pattern_source = ".*"; | ||
1346 | |||
1347 | err = regcomp(&pattern, pattern_source, REG_ICASE|REG_NOSUB); | ||
1348 | if (err) | ||
1349 | fatal("%s: Invalid pattern '%s' code %d\n", | ||
1350 | argv[0], pattern_source, err); | ||
1351 | read_slab_dir(); | ||
1352 | if (show_alias) | ||
1353 | alias(); | ||
1354 | else | ||
1355 | if (show_totals) | ||
1356 | totals(); | ||
1357 | else { | ||
1358 | link_slabs(); | ||
1359 | rename_slabs(); | ||
1360 | sort_slabs(); | ||
1361 | output_slabs(); | ||
1362 | } | ||
1363 | return 0; | ||
1364 | } | ||
diff --git a/Documentation/w1/slaves/00-INDEX b/Documentation/w1/slaves/00-INDEX index f8101d6b07b7..75613c9ac4db 100644 --- a/Documentation/w1/slaves/00-INDEX +++ b/Documentation/w1/slaves/00-INDEX | |||
@@ -2,3 +2,5 @@ | |||
2 | - This file | 2 | - This file |
3 | w1_therm | 3 | w1_therm |
4 | - The Maxim/Dallas Semiconductor ds18*20 temperature sensor. | 4 | - The Maxim/Dallas Semiconductor ds18*20 temperature sensor. |
5 | w1_ds2423 | ||
6 | - The Maxim/Dallas Semiconductor ds2423 counter device. | ||
diff --git a/Documentation/w1/slaves/w1_ds2423 b/Documentation/w1/slaves/w1_ds2423 new file mode 100644 index 000000000000..90a65d23cf59 --- /dev/null +++ b/Documentation/w1/slaves/w1_ds2423 | |||
@@ -0,0 +1,47 @@ | |||
1 | Kernel driver w1_ds2423 | ||
2 | ======================= | ||
3 | |||
4 | Supported chips: | ||
5 | * Maxim DS2423 based counter devices. | ||
6 | |||
7 | supported family codes: | ||
8 | W1_THERM_DS2423 0x1D | ||
9 | |||
10 | Author: Mika Laitio <lamikr@pilppa.org> | ||
11 | |||
12 | Description | ||
13 | ----------- | ||
14 | |||
15 | Support is provided through the sysfs w1_slave file. Each opening and | ||
16 | read sequence of w1_slave file initiates the read of counters and ram | ||
17 | available in DS2423 pages 12 - 15. | ||
18 | |||
19 | Result of each page is provided as an ASCII output where each counter | ||
20 | value and associated ram buffer is outpputed to own line. | ||
21 | |||
22 | Each lines will contain the values of 42 bytes read from the counter and | ||
23 | memory page along the crc=YES or NO for indicating whether the read operation | ||
24 | was successfull and CRC matched. | ||
25 | If the operation was successfull, there is also in the end of each line | ||
26 | a counter value expressed as an integer after c= | ||
27 | |||
28 | Meaning of 42 bytes represented is following: | ||
29 | - 1 byte from ram page | ||
30 | - 4 bytes for the counter value | ||
31 | - 4 zero bytes | ||
32 | - 2 bytes for crc16 which was calculated from the data read since the previous crc bytes | ||
33 | - 31 remaining bytes from the ram page | ||
34 | - crc=YES/NO indicating whether read was ok and crc matched | ||
35 | - c=<int> current counter value | ||
36 | |||
37 | example from the successfull read: | ||
38 | 00 02 00 00 00 00 00 00 00 6d 38 00 ff ff 00 00 fe ff 00 00 ff ff 00 00 ff ff 00 00 ff ff 00 00 ff ff 00 00 ff ff 00 00 ff ff crc=YES c=2 | ||
39 | 00 02 00 00 00 00 00 00 00 e0 1f 00 ff ff 00 00 ff ff 00 00 ff ff 00 00 ff ff 00 00 ff ff 00 00 ff ff 00 00 ff ff 00 00 ff ff crc=YES c=2 | ||
40 | 00 29 c6 5d 18 00 00 00 00 04 37 00 ff ff 00 00 ff ff 00 00 ff ff 00 00 ff ff 00 00 ff ff 00 00 ff ff 00 00 ff ff 00 00 ff ff crc=YES c=408798761 | ||
41 | 00 05 00 00 00 00 00 00 00 8d 39 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff crc=YES c=5 | ||
42 | |||
43 | example from the read with crc errors: | ||
44 | 00 02 00 00 00 00 00 00 00 6d 38 00 ff ff 00 00 fe ff 00 00 ff ff 00 00 ff ff 00 00 ff ff 00 00 ff ff 00 00 ff ff 00 00 ff ff crc=YES c=2 | ||
45 | 00 02 00 00 22 00 00 00 00 e0 1f 00 ff ff 00 00 ff ff 00 00 ff ff 00 00 ff ff 00 00 ff ff 00 00 ff ff 00 00 ff ff 00 00 ff ff crc=NO | ||
46 | 00 e1 61 5d 19 00 00 00 00 df 0b 00 ff ff 00 00 ff ff 00 00 ff ff 00 00 ff ff 00 00 ff ff 00 00 ff ff 00 00 ff ff 00 00 ff ff crc=NO | ||
47 | 00 05 00 00 20 00 00 00 00 8d 39 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff crc=NO | ||
diff --git a/Documentation/x86/boot.txt b/Documentation/x86/boot.txt index 30b43e1b2697..9b7221a86df2 100644 --- a/Documentation/x86/boot.txt +++ b/Documentation/x86/boot.txt | |||
@@ -600,6 +600,7 @@ Protocol: 2.07+ | |||
600 | 0x00000001 lguest | 600 | 0x00000001 lguest |
601 | 0x00000002 Xen | 601 | 0x00000002 Xen |
602 | 0x00000003 Moorestown MID | 602 | 0x00000003 Moorestown MID |
603 | 0x00000004 CE4100 TV Platform | ||
603 | 604 | ||
604 | Field name: hardware_subarch_data | 605 | Field name: hardware_subarch_data |
605 | Type: write (subarch-dependent) | 606 | Type: write (subarch-dependent) |
@@ -621,9 +622,9 @@ Protocol: 2.08+ | |||
621 | The payload may be compressed. The format of both the compressed and | 622 | The payload may be compressed. The format of both the compressed and |
622 | uncompressed data should be determined using the standard magic | 623 | uncompressed data should be determined using the standard magic |
623 | numbers. The currently supported compression formats are gzip | 624 | numbers. The currently supported compression formats are gzip |
624 | (magic numbers 1F 8B or 1F 9E), bzip2 (magic number 42 5A) and LZMA | 625 | (magic numbers 1F 8B or 1F 9E), bzip2 (magic number 42 5A), LZMA |
625 | (magic number 5D 00). The uncompressed payload is currently always ELF | 626 | (magic number 5D 00), and XZ (magic number FD 37). The uncompressed |
626 | (magic number 7F 45 4C 46). | 627 | payload is currently always ELF (magic number 7F 45 4C 46). |
627 | 628 | ||
628 | Field name: payload_length | 629 | Field name: payload_length |
629 | Type: read | 630 | Type: read |
diff --git a/Documentation/xz.txt b/Documentation/xz.txt new file mode 100644 index 000000000000..2cf3e2608de3 --- /dev/null +++ b/Documentation/xz.txt | |||
@@ -0,0 +1,121 @@ | |||
1 | |||
2 | XZ data compression in Linux | ||
3 | ============================ | ||
4 | |||
5 | Introduction | ||
6 | |||
7 | XZ is a general purpose data compression format with high compression | ||
8 | ratio and relatively fast decompression. The primary compression | ||
9 | algorithm (filter) is LZMA2. Additional filters can be used to improve | ||
10 | compression ratio even further. E.g. Branch/Call/Jump (BCJ) filters | ||
11 | improve compression ratio of executable data. | ||
12 | |||
13 | The XZ decompressor in Linux is called XZ Embedded. It supports | ||
14 | the LZMA2 filter and optionally also BCJ filters. CRC32 is supported | ||
15 | for integrity checking. The home page of XZ Embedded is at | ||
16 | <http://tukaani.org/xz/embedded.html>, where you can find the | ||
17 | latest version and also information about using the code outside | ||
18 | the Linux kernel. | ||
19 | |||
20 | For userspace, XZ Utils provide a zlib-like compression library | ||
21 | and a gzip-like command line tool. XZ Utils can be downloaded from | ||
22 | <http://tukaani.org/xz/>. | ||
23 | |||
24 | XZ related components in the kernel | ||
25 | |||
26 | The xz_dec module provides XZ decompressor with single-call (buffer | ||
27 | to buffer) and multi-call (stateful) APIs. The usage of the xz_dec | ||
28 | module is documented in include/linux/xz.h. | ||
29 | |||
30 | The xz_dec_test module is for testing xz_dec. xz_dec_test is not | ||
31 | useful unless you are hacking the XZ decompressor. xz_dec_test | ||
32 | allocates a char device major dynamically to which one can write | ||
33 | .xz files from userspace. The decompressed output is thrown away. | ||
34 | Keep an eye on dmesg to see diagnostics printed by xz_dec_test. | ||
35 | See the xz_dec_test source code for the details. | ||
36 | |||
37 | For decompressing the kernel image, initramfs, and initrd, there | ||
38 | is a wrapper function in lib/decompress_unxz.c. Its API is the | ||
39 | same as in other decompress_*.c files, which is defined in | ||
40 | include/linux/decompress/generic.h. | ||
41 | |||
42 | scripts/xz_wrap.sh is a wrapper for the xz command line tool found | ||
43 | from XZ Utils. The wrapper sets compression options to values suitable | ||
44 | for compressing the kernel image. | ||
45 | |||
46 | For kernel makefiles, two commands are provided for use with | ||
47 | $(call if_needed). The kernel image should be compressed with | ||
48 | $(call if_needed,xzkern) which will use a BCJ filter and a big LZMA2 | ||
49 | dictionary. It will also append a four-byte trailer containing the | ||
50 | uncompressed size of the file, which is needed by the boot code. | ||
51 | Other things should be compressed with $(call if_needed,xzmisc) | ||
52 | which will use no BCJ filter and 1 MiB LZMA2 dictionary. | ||
53 | |||
54 | Notes on compression options | ||
55 | |||
56 | Since the XZ Embedded supports only streams with no integrity check or | ||
57 | CRC32, make sure that you don't use some other integrity check type | ||
58 | when encoding files that are supposed to be decoded by the kernel. With | ||
59 | liblzma, you need to use either LZMA_CHECK_NONE or LZMA_CHECK_CRC32 | ||
60 | when encoding. With the xz command line tool, use --check=none or | ||
61 | --check=crc32. | ||
62 | |||
63 | Using CRC32 is strongly recommended unless there is some other layer | ||
64 | which will verify the integrity of the uncompressed data anyway. | ||
65 | Double checking the integrity would probably be waste of CPU cycles. | ||
66 | Note that the headers will always have a CRC32 which will be validated | ||
67 | by the decoder; you can only change the integrity check type (or | ||
68 | disable it) for the actual uncompressed data. | ||
69 | |||
70 | In userspace, LZMA2 is typically used with dictionary sizes of several | ||
71 | megabytes. The decoder needs to have the dictionary in RAM, thus big | ||
72 | dictionaries cannot be used for files that are intended to be decoded | ||
73 | by the kernel. 1 MiB is probably the maximum reasonable dictionary | ||
74 | size for in-kernel use (maybe more is OK for initramfs). The presets | ||
75 | in XZ Utils may not be optimal when creating files for the kernel, | ||
76 | so don't hesitate to use custom settings. Example: | ||
77 | |||
78 | xz --check=crc32 --lzma2=dict=512KiB inputfile | ||
79 | |||
80 | An exception to above dictionary size limitation is when the decoder | ||
81 | is used in single-call mode. Decompressing the kernel itself is an | ||
82 | example of this situation. In single-call mode, the memory usage | ||
83 | doesn't depend on the dictionary size, and it is perfectly fine to | ||
84 | use a big dictionary: for maximum compression, the dictionary should | ||
85 | be at least as big as the uncompressed data itself. | ||
86 | |||
87 | Future plans | ||
88 | |||
89 | Creating a limited XZ encoder may be considered if people think it is | ||
90 | useful. LZMA2 is slower to compress than e.g. Deflate or LZO even at | ||
91 | the fastest settings, so it isn't clear if LZMA2 encoder is wanted | ||
92 | into the kernel. | ||
93 | |||
94 | Support for limited random-access reading is planned for the | ||
95 | decompression code. I don't know if it could have any use in the | ||
96 | kernel, but I know that it would be useful in some embedded projects | ||
97 | outside the Linux kernel. | ||
98 | |||
99 | Conformance to the .xz file format specification | ||
100 | |||
101 | There are a couple of corner cases where things have been simplified | ||
102 | at expense of detecting errors as early as possible. These should not | ||
103 | matter in practice all, since they don't cause security issues. But | ||
104 | it is good to know this if testing the code e.g. with the test files | ||
105 | from XZ Utils. | ||
106 | |||
107 | Reporting bugs | ||
108 | |||
109 | Before reporting a bug, please check that it's not fixed already | ||
110 | at upstream. See <http://tukaani.org/xz/embedded.html> to get the | ||
111 | latest code. | ||
112 | |||
113 | Report bugs to <lasse.collin@tukaani.org> or visit #tukaani on | ||
114 | Freenode and talk to Larhzu. I don't actively read LKML or other | ||
115 | kernel-related mailing lists, so if there's something I should know, | ||
116 | you should email to me personally or use IRC. | ||
117 | |||
118 | Don't bother Igor Pavlov with questions about the XZ implementation | ||
119 | in the kernel or about XZ Utils. While these two implementations | ||
120 | include essential code that is directly based on Igor Pavlov's code, | ||
121 | these implementations aren't maintained nor supported by him. | ||
diff --git a/Documentation/zh_CN/HOWTO b/Documentation/zh_CN/HOWTO index 69160779e432..faf976c0c731 100644 --- a/Documentation/zh_CN/HOWTO +++ b/Documentation/zh_CN/HOWTO | |||
@@ -347,8 +347,8 @@ bugzilla.kernel.org是Linux内核开发者们用来跟踪内核Bug的网站。 | |||
347 | 最新bug的通知,可以订阅bugme-new邮件列表(只有新的bug报告会被寄到这里) | 347 | 最新bug的通知,可以订阅bugme-new邮件列表(只有新的bug报告会被寄到这里) |
348 | 或者订阅bugme-janitor邮件列表(所有bugzilla的变动都会被寄到这里)。 | 348 | 或者订阅bugme-janitor邮件列表(所有bugzilla的变动都会被寄到这里)。 |
349 | 349 | ||
350 | http://lists.osdl.org/mailman/listinfo/bugme-new | 350 | https://lists.linux-foundation.org/mailman/listinfo/bugme-new |
351 | http://lists.osdl.org/mailman/listinfo/bugme-janitors | 351 | https://lists.linux-foundation.org/mailman/listinfo/bugme-janitors |
352 | 352 | ||
353 | 353 | ||
354 | 邮件列表 | 354 | 邮件列表 |
diff --git a/Documentation/zh_CN/SubmittingDrivers b/Documentation/zh_CN/SubmittingDrivers index c27b0f6cdd39..5889f8df6312 100644 --- a/Documentation/zh_CN/SubmittingDrivers +++ b/Documentation/zh_CN/SubmittingDrivers | |||
@@ -61,7 +61,7 @@ Linux 2.4: | |||
61 | Linux 2.6: | 61 | Linux 2.6: |
62 | 除了遵循和 2.4 版内核同样的规则外,你还需要在 linux-kernel 邮件 | 62 | 除了遵循和 2.4 版内核同样的规则外,你还需要在 linux-kernel 邮件 |
63 | 列表上跟踪最新的 API 变化。向 Linux 2.6 内核提交驱动的顶级联系人 | 63 | 列表上跟踪最新的 API 变化。向 Linux 2.6 内核提交驱动的顶级联系人 |
64 | 是 Andrew Morton <akpm@osdl.org>。 | 64 | 是 Andrew Morton <akpm@linux-foundation.org>。 |
65 | 65 | ||
66 | 决定设备驱动能否被接受的条件 | 66 | 决定设备驱动能否被接受的条件 |
67 | ---------------------------- | 67 | ---------------------------- |