diff options
Diffstat (limited to 'Documentation')
79 files changed, 1950 insertions, 1506 deletions
diff --git a/Documentation/ABI/stable/thermal-notification b/Documentation/ABI/stable/thermal-notification new file mode 100644 index 000000000000..9723e8b7aeb3 --- /dev/null +++ b/Documentation/ABI/stable/thermal-notification | |||
@@ -0,0 +1,4 @@ | |||
1 | What: A notification mechanism for thermal related events | ||
2 | Description: | ||
3 | This interface enables notification for thermal related events. | ||
4 | The notification is in the form of a netlink event. | ||
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-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-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/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/IPMI.txt b/Documentation/IPMI.txt index 69dd29ed824e..b2bea15137d2 100644 --- a/Documentation/IPMI.txt +++ b/Documentation/IPMI.txt | |||
@@ -533,6 +533,33 @@ completion during sending a panic event. | |||
533 | Other Pieces | 533 | Other Pieces |
534 | ------------ | 534 | ------------ |
535 | 535 | ||
536 | Get the detailed info related with the IPMI device | ||
537 | -------------------------------------------------- | ||
538 | |||
539 | Some users need more detailed information about a device, like where | ||
540 | the address came from or the raw base device for the IPMI interface. | ||
541 | You can use the IPMI smi_watcher to catch the IPMI interfaces as they | ||
542 | come or go, and to grab the information, you can use the function | ||
543 | ipmi_get_smi_info(), which returns the following structure: | ||
544 | |||
545 | struct ipmi_smi_info { | ||
546 | enum ipmi_addr_src addr_src; | ||
547 | struct device *dev; | ||
548 | union { | ||
549 | struct { | ||
550 | void *acpi_handle; | ||
551 | } acpi_info; | ||
552 | } addr_info; | ||
553 | }; | ||
554 | |||
555 | Currently special info for only for SI_ACPI address sources is | ||
556 | returned. Others may be added as necessary. | ||
557 | |||
558 | Note that the dev pointer is included in the above structure, and | ||
559 | assuming ipmi_smi_get_info returns success, you must call put_device | ||
560 | on the dev pointer. | ||
561 | |||
562 | |||
536 | Watchdog | 563 | Watchdog |
537 | -------- | 564 | -------- |
538 | 565 | ||
diff --git a/Documentation/acpi/apei/output_format.txt b/Documentation/acpi/apei/output_format.txt new file mode 100644 index 000000000000..9146952c612a --- /dev/null +++ b/Documentation/acpi/apei/output_format.txt | |||
@@ -0,0 +1,122 @@ | |||
1 | APEI output format | ||
2 | ~~~~~~~~~~~~~~~~~~ | ||
3 | |||
4 | APEI uses printk as hardware error reporting interface, the output | ||
5 | format is as follow. | ||
6 | |||
7 | <error record> := | ||
8 | APEI generic hardware error status | ||
9 | severity: <integer>, <severity string> | ||
10 | section: <integer>, severity: <integer>, <severity string> | ||
11 | flags: <integer> | ||
12 | <section flags strings> | ||
13 | fru_id: <uuid string> | ||
14 | fru_text: <string> | ||
15 | section_type: <section type string> | ||
16 | <section data> | ||
17 | |||
18 | <severity string>* := recoverable | fatal | corrected | info | ||
19 | |||
20 | <section flags strings># := | ||
21 | [primary][, containment warning][, reset][, threshold exceeded]\ | ||
22 | [, resource not accessible][, latent error] | ||
23 | |||
24 | <section type string> := generic processor error | memory error | \ | ||
25 | PCIe error | unknown, <uuid string> | ||
26 | |||
27 | <section data> := | ||
28 | <generic processor section data> | <memory section data> | \ | ||
29 | <pcie section data> | <null> | ||
30 | |||
31 | <generic processor section data> := | ||
32 | [processor_type: <integer>, <proc type string>] | ||
33 | [processor_isa: <integer>, <proc isa string>] | ||
34 | [error_type: <integer> | ||
35 | <proc error type strings>] | ||
36 | [operation: <integer>, <proc operation string>] | ||
37 | [flags: <integer> | ||
38 | <proc flags strings>] | ||
39 | [level: <integer>] | ||
40 | [version_info: <integer>] | ||
41 | [processor_id: <integer>] | ||
42 | [target_address: <integer>] | ||
43 | [requestor_id: <integer>] | ||
44 | [responder_id: <integer>] | ||
45 | [IP: <integer>] | ||
46 | |||
47 | <proc type string>* := IA32/X64 | IA64 | ||
48 | |||
49 | <proc isa string>* := IA32 | IA64 | X64 | ||
50 | |||
51 | <processor error type strings># := | ||
52 | [cache error][, TLB error][, bus error][, micro-architectural error] | ||
53 | |||
54 | <proc operation string>* := unknown or generic | data read | data write | \ | ||
55 | instruction execution | ||
56 | |||
57 | <proc flags strings># := | ||
58 | [restartable][, precise IP][, overflow][, corrected] | ||
59 | |||
60 | <memory section data> := | ||
61 | [error_status: <integer>] | ||
62 | [physical_address: <integer>] | ||
63 | [physical_address_mask: <integer>] | ||
64 | [node: <integer>] | ||
65 | [card: <integer>] | ||
66 | [module: <integer>] | ||
67 | [bank: <integer>] | ||
68 | [device: <integer>] | ||
69 | [row: <integer>] | ||
70 | [column: <integer>] | ||
71 | [bit_position: <integer>] | ||
72 | [requestor_id: <integer>] | ||
73 | [responder_id: <integer>] | ||
74 | [target_id: <integer>] | ||
75 | [error_type: <integer>, <mem error type string>] | ||
76 | |||
77 | <mem error type string>* := | ||
78 | unknown | no error | single-bit ECC | multi-bit ECC | \ | ||
79 | single-symbol chipkill ECC | multi-symbol chipkill ECC | master abort | \ | ||
80 | target abort | parity error | watchdog timeout | invalid address | \ | ||
81 | mirror Broken | memory sparing | scrub corrected error | \ | ||
82 | scrub uncorrected error | ||
83 | |||
84 | <pcie section data> := | ||
85 | [port_type: <integer>, <pcie port type string>] | ||
86 | [version: <integer>.<integer>] | ||
87 | [command: <integer>, status: <integer>] | ||
88 | [device_id: <integer>:<integer>:<integer>.<integer> | ||
89 | slot: <integer> | ||
90 | secondary_bus: <integer> | ||
91 | vendor_id: <integer>, device_id: <integer> | ||
92 | class_code: <integer>] | ||
93 | [serial number: <integer>, <integer>] | ||
94 | [bridge: secondary_status: <integer>, control: <integer>] | ||
95 | |||
96 | <pcie port type string>* := PCIe end point | legacy PCI end point | \ | ||
97 | unknown | unknown | root port | upstream switch port | \ | ||
98 | downstream switch port | PCIe to PCI/PCI-X bridge | \ | ||
99 | PCI/PCI-X to PCIe bridge | root complex integrated endpoint device | \ | ||
100 | root complex event collector | ||
101 | |||
102 | Where, [] designate corresponding content is optional | ||
103 | |||
104 | All <field string> description with * has the following format: | ||
105 | |||
106 | field: <integer>, <field string> | ||
107 | |||
108 | Where value of <integer> should be the position of "string" in <field | ||
109 | string> description. Otherwise, <field string> will be "unknown". | ||
110 | |||
111 | All <field strings> description with # has the following format: | ||
112 | |||
113 | field: <integer> | ||
114 | <field strings> | ||
115 | |||
116 | Where each string in <fields strings> corresponding to one set bit of | ||
117 | <integer>. The bit position is the position of "string" in <field | ||
118 | strings> description. | ||
119 | |||
120 | For more detailed explanation of every field, please refer to UEFI | ||
121 | specification version 2.3 or later, section Appendix N: Common | ||
122 | Platform Error Record. | ||
diff --git a/Documentation/cgroups/blkio-controller.txt b/Documentation/cgroups/blkio-controller.txt index d6da611f8f63..4ed7b5ceeed2 100644 --- a/Documentation/cgroups/blkio-controller.txt +++ b/Documentation/cgroups/blkio-controller.txt | |||
@@ -89,6 +89,33 @@ Throttling/Upper Limit policy | |||
89 | 89 | ||
90 | Limits for writes can be put using blkio.write_bps_device file. | 90 | Limits for writes can be put using blkio.write_bps_device file. |
91 | 91 | ||
92 | Hierarchical Cgroups | ||
93 | ==================== | ||
94 | - Currently none of the IO control policy supports hierarhical groups. But | ||
95 | cgroup interface does allow creation of hierarhical cgroups and internally | ||
96 | IO policies treat them as flat hierarchy. | ||
97 | |||
98 | So this patch will allow creation of cgroup hierarhcy but at the backend | ||
99 | everything will be treated as flat. So if somebody created a hierarchy like | ||
100 | as follows. | ||
101 | |||
102 | root | ||
103 | / \ | ||
104 | test1 test2 | ||
105 | | | ||
106 | test3 | ||
107 | |||
108 | CFQ and throttling will practically treat all groups at same level. | ||
109 | |||
110 | pivot | ||
111 | / | \ \ | ||
112 | root test1 test2 test3 | ||
113 | |||
114 | Down the line we can implement hierarchical accounting/control support | ||
115 | and also introduce a new cgroup file "use_hierarchy" which will control | ||
116 | whether cgroup hierarchy is viewed as flat or hierarchical by the policy.. | ||
117 | This is how memory controller also has implemented the things. | ||
118 | |||
92 | Various user visible config options | 119 | Various user visible config options |
93 | =================================== | 120 | =================================== |
94 | CONFIG_BLK_CGROUP | 121 | CONFIG_BLK_CGROUP |
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/device-mapper/dm-crypt.txt b/Documentation/device-mapper/dm-crypt.txt index 524de926290d..59293ac4a5d0 100644 --- a/Documentation/device-mapper/dm-crypt.txt +++ b/Documentation/device-mapper/dm-crypt.txt | |||
@@ -8,7 +8,7 @@ Parameters: <cipher> <key> <iv_offset> <device path> <offset> | |||
8 | 8 | ||
9 | <cipher> | 9 | <cipher> |
10 | Encryption cipher and an optional IV generation mode. | 10 | Encryption cipher and an optional IV generation mode. |
11 | (In format cipher-chainmode-ivopts:ivmode). | 11 | (In format cipher[:keycount]-chainmode-ivopts:ivmode). |
12 | Examples: | 12 | Examples: |
13 | des | 13 | des |
14 | aes-cbc-essiv:sha256 | 14 | aes-cbc-essiv:sha256 |
@@ -20,6 +20,11 @@ Parameters: <cipher> <key> <iv_offset> <device path> <offset> | |||
20 | Key used for encryption. It is encoded as a hexadecimal number. | 20 | Key used for encryption. It is encoded as a hexadecimal number. |
21 | You can only use key sizes that are valid for the selected cipher. | 21 | You can only use key sizes that are valid for the selected cipher. |
22 | 22 | ||
23 | <keycount> | ||
24 | Multi-key compatibility mode. You can define <keycount> keys and | ||
25 | then sectors are encrypted according to their offsets (sector 0 uses key0; | ||
26 | sector 1 uses key1 etc.). <keycount> must be a power of two. | ||
27 | |||
23 | <iv_offset> | 28 | <iv_offset> |
24 | The IV offset is a sector count that is added to the sector number | 29 | The IV offset is a sector count that is added to the sector number |
25 | before creating the IV. | 30 | before creating the IV. |
diff --git a/Documentation/device-mapper/dm-raid.txt b/Documentation/device-mapper/dm-raid.txt new file mode 100644 index 000000000000..33b6b7071ac8 --- /dev/null +++ b/Documentation/device-mapper/dm-raid.txt | |||
@@ -0,0 +1,70 @@ | |||
1 | Device-mapper RAID (dm-raid) is a bridge from DM to MD. It | ||
2 | provides a way to use device-mapper interfaces to access the MD RAID | ||
3 | drivers. | ||
4 | |||
5 | As with all device-mapper targets, the nominal public interfaces are the | ||
6 | constructor (CTR) tables and the status outputs (both STATUSTYPE_INFO | ||
7 | and STATUSTYPE_TABLE). The CTR table looks like the following: | ||
8 | |||
9 | 1: <s> <l> raid \ | ||
10 | 2: <raid_type> <#raid_params> <raid_params> \ | ||
11 | 3: <#raid_devs> <meta_dev1> <dev1> .. <meta_devN> <devN> | ||
12 | |||
13 | Line 1 contains the standard first three arguments to any device-mapper | ||
14 | target - the start, length, and target type fields. The target type in | ||
15 | this case is "raid". | ||
16 | |||
17 | Line 2 contains the arguments that define the particular raid | ||
18 | type/personality/level, the required arguments for that raid type, and | ||
19 | any optional arguments. Possible raid types include: raid4, raid5_la, | ||
20 | raid5_ls, raid5_rs, raid6_zr, raid6_nr, and raid6_nc. (raid1 is | ||
21 | planned for the future.) The list of required and optional parameters | ||
22 | is the same for all the current raid types. The required parameters are | ||
23 | positional, while the optional parameters are given as key/value pairs. | ||
24 | The possible parameters are as follows: | ||
25 | <chunk_size> Chunk size in sectors. | ||
26 | [[no]sync] Force/Prevent RAID initialization | ||
27 | [rebuild <idx>] Rebuild the drive indicated by the index | ||
28 | [daemon_sleep <ms>] Time between bitmap daemon work to clear bits | ||
29 | [min_recovery_rate <kB/sec/disk>] Throttle RAID initialization | ||
30 | [max_recovery_rate <kB/sec/disk>] Throttle RAID initialization | ||
31 | [max_write_behind <sectors>] See '-write-behind=' (man mdadm) | ||
32 | [stripe_cache <sectors>] Stripe cache size for higher RAIDs | ||
33 | |||
34 | Line 3 contains the list of devices that compose the array in | ||
35 | metadata/data device pairs. If the metadata is stored separately, a '-' | ||
36 | is given for the metadata device position. If a drive has failed or is | ||
37 | missing at creation time, a '-' can be given for both the metadata and | ||
38 | data drives for a given position. | ||
39 | |||
40 | NB. Currently all metadata devices must be specified as '-'. | ||
41 | |||
42 | Examples: | ||
43 | # RAID4 - 4 data drives, 1 parity | ||
44 | # No metadata devices specified to hold superblock/bitmap info | ||
45 | # Chunk size of 1MiB | ||
46 | # (Lines separated for easy reading) | ||
47 | 0 1960893648 raid \ | ||
48 | raid4 1 2048 \ | ||
49 | 5 - 8:17 - 8:33 - 8:49 - 8:65 - 8:81 | ||
50 | |||
51 | # RAID4 - 4 data drives, 1 parity (no metadata devices) | ||
52 | # Chunk size of 1MiB, force RAID initialization, | ||
53 | # min recovery rate at 20 kiB/sec/disk | ||
54 | 0 1960893648 raid \ | ||
55 | raid4 4 2048 min_recovery_rate 20 sync\ | ||
56 | 5 - 8:17 - 8:33 - 8:49 - 8:65 - 8:81 | ||
57 | |||
58 | Performing a 'dmsetup table' should display the CTR table used to | ||
59 | construct the mapping (with possible reordering of optional | ||
60 | parameters). | ||
61 | |||
62 | Performing a 'dmsetup status' will yield information on the state and | ||
63 | health of the array. The output is as follows: | ||
64 | 1: <s> <l> raid \ | ||
65 | 2: <raid_type> <#devices> <1 health char for each dev> <resync_ratio> | ||
66 | |||
67 | Line 1 is standard DM output. Line 2 is best shown by example: | ||
68 | 0 1960893648 raid raid4 5 AAAAA 2/490221568 | ||
69 | Here we can see the RAID type is raid4, there are 5 devices - all of | ||
70 | which are 'A'live, and the array is 2/490221568 complete with recovery. | ||
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/feature-removal-schedule.txt b/Documentation/feature-removal-schedule.txt index 22f10818c2b3..8c594c45b6a1 100644 --- a/Documentation/feature-removal-schedule.txt +++ b/Documentation/feature-removal-schedule.txt | |||
@@ -193,6 +193,20 @@ Why: /proc/<pid>/oom_adj allows userspace to influence the oom killer's | |||
193 | 193 | ||
194 | --------------------------- | 194 | --------------------------- |
195 | 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 | |||
196 | What: remove EXPORT_SYMBOL(kernel_thread) | 210 | What: remove EXPORT_SYMBOL(kernel_thread) |
197 | When: August 2006 | 211 | When: August 2006 |
198 | Files: arch/*/kernel/*_ksyms.c | 212 | Files: arch/*/kernel/*_ksyms.c |
@@ -234,6 +248,17 @@ Who: Zhang Rui <rui.zhang@intel.com> | |||
234 | 248 | ||
235 | --------------------------- | 249 | --------------------------- |
236 | 250 | ||
251 | What: CONFIG_ACPI_PROCFS_POWER | ||
252 | When: 2.6.39 | ||
253 | Why: sysfs I/F for ACPI power devices, including AC and Battery, | ||
254 | has been working in upstream kenrel since 2.6.24, Sep 2007. | ||
255 | In 2.6.37, we make the sysfs I/F always built in and this option | ||
256 | disabled by default. | ||
257 | Remove this option and the ACPI power procfs interface in 2.6.39. | ||
258 | Who: Zhang Rui <rui.zhang@intel.com> | ||
259 | |||
260 | --------------------------- | ||
261 | |||
237 | What: /proc/acpi/button | 262 | What: /proc/acpi/button |
238 | When: August 2007 | 263 | When: August 2007 |
239 | Why: /proc/acpi/button has been replaced by events to the input layer | 264 | Why: /proc/acpi/button has been replaced by events to the input layer |
@@ -576,3 +601,13 @@ Why: The functions have been superceded by cancel_delayed_work_sync() | |||
576 | Who: Tejun Heo <tj@kernel.org> | 601 | Who: Tejun Heo <tj@kernel.org> |
577 | 602 | ||
578 | ---------------------------- | 603 | ---------------------------- |
604 | |||
605 | What: Legacy, non-standard chassis intrusion detection interface. | ||
606 | When: June 2011 | ||
607 | Why: The adm9240, w83792d and w83793 hardware monitoring drivers have | ||
608 | legacy interfaces for chassis intrusion detection. A standard | ||
609 | interface has been added to each driver, so the legacy interface | ||
610 | can be removed. | ||
611 | Who: Jean Delvare <khali@linux-fr.org> | ||
612 | |||
613 | ---------------------------- | ||
diff --git a/Documentation/filesystems/Locking b/Documentation/filesystems/Locking index 977d8919cc69..ef9349a4b5d1 100644 --- a/Documentation/filesystems/Locking +++ b/Documentation/filesystems/Locking | |||
@@ -343,7 +343,6 @@ prototypes: | |||
343 | int (*fl_grant)(struct file_lock *, struct file_lock *, int); | 343 | int (*fl_grant)(struct file_lock *, struct file_lock *, int); |
344 | void (*fl_release_private)(struct file_lock *); | 344 | void (*fl_release_private)(struct file_lock *); |
345 | 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); | 346 | int (*fl_change)(struct file_lock **, int); |
348 | 347 | ||
349 | locking rules: | 348 | locking rules: |
@@ -353,7 +352,6 @@ fl_notify: yes no | |||
353 | fl_grant: no no | 352 | fl_grant: no no |
354 | fl_release_private: maybe no | 353 | fl_release_private: maybe no |
355 | fl_break: yes no | 354 | fl_break: yes no |
356 | fl_mylease: yes no | ||
357 | fl_change yes no | 355 | fl_change yes no |
358 | 356 | ||
359 | --------------------------- buffer_head ----------------------------------- | 357 | --------------------------- buffer_head ----------------------------------- |
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/porting b/Documentation/filesystems/porting index 07a32b42cf9c..dfbcd1b00b0a 100644 --- a/Documentation/filesystems/porting +++ b/Documentation/filesystems/porting | |||
@@ -365,8 +365,8 @@ must be done in the RCU callback. | |||
365 | [recommended] | 365 | [recommended] |
366 | vfs now tries to do path walking in "rcu-walk mode", which avoids | 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 | 367 | atomic operations and scalability hazards on dentries and inodes (see |
368 | Documentation/filesystems/path-walk.txt). d_hash and d_compare changes (above) | 368 | Documentation/filesystems/path-lookup.txt). d_hash and d_compare changes |
369 | are examples of the changes required to support this. For more complex | 369 | (above) 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 | 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 | 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 | 372 | the benefits of rcu-walk mode. We will begin to add filesystem callbacks that |
@@ -383,5 +383,14 @@ Documentation/filesystems/vfs.txt for more details. | |||
383 | 383 | ||
384 | permission and check_acl are inode permission checks that are called | 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 | 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 | 386 | exec permission). These must now be rcu-walk aware (flags & IPERM_FLAG_RCU). |
387 | Documentation/filesystems/vfs.txt for more details. | 387 | See 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 9471225212c4..23cae6548d3a 100644 --- a/Documentation/filesystems/proc.txt +++ b/Documentation/filesystems/proc.txt | |||
@@ -375,6 +375,7 @@ Anonymous: 0 kB | |||
375 | Swap: 0 kB | 375 | Swap: 0 kB |
376 | KernelPageSize: 4 kB | 376 | KernelPageSize: 4 kB |
377 | MMUPageSize: 4 kB | 377 | MMUPageSize: 4 kB |
378 | Locked: 374 kB | ||
378 | 379 | ||
379 | The first of these lines shows the same information as is displayed for the | 380 | The first of these lines shows the same information as is displayed for the |
380 | mapping in /proc/PID/maps. The remaining lines show the size of the mapping | 381 | mapping in /proc/PID/maps. The remaining lines show the size of the mapping |
@@ -670,6 +671,8 @@ varies by architecture and compile options. The following is from a | |||
670 | 671 | ||
671 | > cat /proc/meminfo | 672 | > cat /proc/meminfo |
672 | 673 | ||
674 | The "Locked" indicates whether the mapping is locked in memory or not. | ||
675 | |||
673 | 676 | ||
674 | MemTotal: 16344972 kB | 677 | MemTotal: 16344972 kB |
675 | MemFree: 13634064 kB | 678 | MemFree: 13634064 kB |
@@ -1320,6 +1323,10 @@ scaled linearly with /proc/<pid>/oom_score_adj. | |||
1320 | Writing to /proc/<pid>/oom_score_adj or /proc/<pid>/oom_adj will change the | 1323 | Writing to /proc/<pid>/oom_score_adj or /proc/<pid>/oom_adj will change the |
1321 | other with its scaled value. | 1324 | other with its scaled value. |
1322 | 1325 | ||
1326 | The value of /proc/<pid>/oom_score_adj may be reduced no lower than the last | ||
1327 | value set by a CAP_SYS_RESOURCE process. To reduce the value any lower | ||
1328 | requires CAP_SYS_RESOURCE. | ||
1329 | |||
1323 | NOTICE: /proc/<pid>/oom_adj is deprecated and will be removed, please see | 1330 | NOTICE: /proc/<pid>/oom_adj is deprecated and will be removed, please see |
1324 | Documentation/feature-removal-schedule.txt. | 1331 | Documentation/feature-removal-schedule.txt. |
1325 | 1332 | ||
diff --git a/Documentation/filesystems/vfs.txt b/Documentation/filesystems/vfs.txt index fbb324e2bd43..cae6d27c9f5b 100644 --- a/Documentation/filesystems/vfs.txt +++ b/Documentation/filesystems/vfs.txt | |||
@@ -415,8 +415,8 @@ otherwise noted. | |||
415 | 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 |
416 | filesystem. | 416 | filesystem. |
417 | 417 | ||
418 | May be called in rcu-walk mode (flags & IPERM_RCU). If in rcu-walk | 418 | May be called in rcu-walk mode (flags & IPERM_FLAG_RCU). If in rcu-walk |
419 | mode, the filesystem must check the permission without blocking or | 419 | mode, the filesystem must check the permission without blocking or |
420 | storing to the inode. | 420 | storing to the inode. |
421 | 421 | ||
422 | If a situation is encountered that rcu-walk cannot handle, return | 422 | If a situation is encountered that rcu-walk cannot handle, 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/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/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/ioctl/ioctl-number.txt b/Documentation/ioctl/ioctl-number.txt index d6a63c7b4478..ac293e955308 100644 --- a/Documentation/ioctl/ioctl-number.txt +++ b/Documentation/ioctl/ioctl-number.txt | |||
@@ -247,7 +247,7 @@ Code Seq#(hex) Include File Comments | |||
247 | 'p' 40-7F linux/nvram.h | 247 | 'p' 40-7F linux/nvram.h |
248 | 'p' 80-9F linux/ppdev.h user-space parport | 248 | 'p' 80-9F linux/ppdev.h user-space parport |
249 | <mailto:tim@cyberelk.net> | 249 | <mailto:tim@cyberelk.net> |
250 | 'p' A1-A4 linux/pps.h LinuxPPS | 250 | 'p' A1-A5 linux/pps.h LinuxPPS |
251 | <mailto:giometti@linux.it> | 251 | <mailto:giometti@linux.it> |
252 | 'q' 00-1F linux/serio.h | 252 | 'q' 00-1F linux/serio.h |
253 | 'q' 80-FF linux/telephony.h Internet PhoneJACK, Internet LineJACK | 253 | 'q' 80-FF linux/telephony.h Internet PhoneJACK, Internet LineJACK |
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-parameters.txt b/Documentation/kernel-parameters.txt index f3dc951e949f..b72e071a3e5b 100644 --- a/Documentation/kernel-parameters.txt +++ b/Documentation/kernel-parameters.txt | |||
@@ -199,11 +199,6 @@ and is between 256 and 4096 characters. It is defined in the file | |||
199 | unusable. The "log_buf_len" parameter may be useful | 199 | unusable. The "log_buf_len" parameter may be useful |
200 | if you need to capture more output. | 200 | if you need to capture more output. |
201 | 201 | ||
202 | acpi_display_output= [HW,ACPI] | ||
203 | acpi_display_output=vendor | ||
204 | acpi_display_output=video | ||
205 | See above. | ||
206 | |||
207 | acpi_irq_balance [HW,ACPI] | 202 | acpi_irq_balance [HW,ACPI] |
208 | ACPI will balance active IRQs | 203 | ACPI will balance active IRQs |
209 | default in APIC mode | 204 | default in APIC mode |
@@ -403,6 +398,10 @@ and is between 256 and 4096 characters. It is defined in the file | |||
403 | bttv.pll= See Documentation/video4linux/bttv/Insmod-options | 398 | bttv.pll= See Documentation/video4linux/bttv/Insmod-options |
404 | bttv.tuner= and Documentation/video4linux/bttv/CARDLIST | 399 | bttv.tuner= and Documentation/video4linux/bttv/CARDLIST |
405 | 400 | ||
401 | bulk_remove=off [PPC] This parameter disables the use of the pSeries | ||
402 | firmware feature for flushing multiple hpte entries | ||
403 | at a time. | ||
404 | |||
406 | c101= [NET] Moxa C101 synchronous serial card | 405 | c101= [NET] Moxa C101 synchronous serial card |
407 | 406 | ||
408 | cachesize= [BUGS=X86-32] Override level 2 CPU cache size detection. | 407 | cachesize= [BUGS=X86-32] Override level 2 CPU cache size detection. |
@@ -655,11 +654,6 @@ and is between 256 and 4096 characters. It is defined in the file | |||
655 | 654 | ||
656 | dscc4.setup= [NET] | 655 | dscc4.setup= [NET] |
657 | 656 | ||
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. | 657 | earlycon= [KNL] Output early console device and options. |
664 | uart[8250],io,<addr>[,options] | 658 | uart[8250],io,<addr>[,options] |
665 | uart[8250],mmio,<addr>[,options] | 659 | uart[8250],mmio,<addr>[,options] |
@@ -884,6 +878,7 @@ and is between 256 and 4096 characters. It is defined in the file | |||
884 | controller | 878 | controller |
885 | i8042.nopnp [HW] Don't use ACPIPnP / PnPBIOS to discover KBD/AUX | 879 | i8042.nopnp [HW] Don't use ACPIPnP / PnPBIOS to discover KBD/AUX |
886 | controllers | 880 | controllers |
881 | i8042.notimeout [HW] Ignore timeout condition signalled by conroller | ||
887 | i8042.reset [HW] Reset the controller during init and cleanup | 882 | i8042.reset [HW] Reset the controller during init and cleanup |
888 | i8042.unlock [HW] Unlock (ignore) the keylock | 883 | i8042.unlock [HW] Unlock (ignore) the keylock |
889 | 884 | ||
@@ -1490,6 +1485,10 @@ and is between 256 and 4096 characters. It is defined in the file | |||
1490 | mtdparts= [MTD] | 1485 | mtdparts= [MTD] |
1491 | See drivers/mtd/cmdlinepart.c. | 1486 | See drivers/mtd/cmdlinepart.c. |
1492 | 1487 | ||
1488 | multitce=off [PPC] This parameter disables the use of the pSeries | ||
1489 | firmware feature for updating multiple TCE entries | ||
1490 | at a time. | ||
1491 | |||
1493 | onenand.bdry= [HW,MTD] Flex-OneNAND Boundary Configuration | 1492 | onenand.bdry= [HW,MTD] Flex-OneNAND Boundary Configuration |
1494 | 1493 | ||
1495 | Format: [die0_boundary][,die0_lock][,die1_boundary][,die1_lock] | 1494 | Format: [die0_boundary][,die0_lock][,die1_boundary][,die1_lock] |
@@ -1701,6 +1700,9 @@ and is between 256 and 4096 characters. It is defined in the file | |||
1701 | 1700 | ||
1702 | no-kvmclock [X86,KVM] Disable paravirtualized KVM clock driver | 1701 | no-kvmclock [X86,KVM] Disable paravirtualized KVM clock driver |
1703 | 1702 | ||
1703 | no-kvmapf [X86,KVM] Disable paravirtualized asynchronous page | ||
1704 | fault handling. | ||
1705 | |||
1704 | nolapic [X86-32,APIC] Do not enable or use the local APIC. | 1706 | nolapic [X86-32,APIC] Do not enable or use the local APIC. |
1705 | 1707 | ||
1706 | nolapic_timer [X86-32,APIC] Do not use the local APIC timer. | 1708 | nolapic_timer [X86-32,APIC] Do not use the local APIC timer. |
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/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 811872b45bee..d718bc2ff1cf 100644 --- a/Documentation/networking/dccp.txt +++ b/Documentation/networking/dccp.txt | |||
@@ -38,11 +38,11 @@ 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 |
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/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/runtime_pm.txt b/Documentation/power/runtime_pm.txt index 41cc7b30d7dd..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 |
@@ -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/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/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/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/thermal/sysfs-api.txt b/Documentation/thermal/sysfs-api.txt index cb3d15bc1aeb..b61e46f449aa 100644 --- a/Documentation/thermal/sysfs-api.txt +++ b/Documentation/thermal/sysfs-api.txt | |||
@@ -278,3 +278,15 @@ method, the sys I/F structure will be built like this: | |||
278 | |---name: acpitz | 278 | |---name: acpitz |
279 | |---temp1_input: 37000 | 279 | |---temp1_input: 37000 |
280 | |---temp1_crit: 100000 | 280 | |---temp1_crit: 100000 |
281 | |||
282 | 4. Event Notification | ||
283 | |||
284 | The framework includes a simple notification mechanism, in the form of a | ||
285 | netlink event. Netlink socket initialization is done during the _init_ | ||
286 | of the framework. Drivers which intend to use the notification mechanism | ||
287 | just need to call generate_netlink_event() with two arguments viz | ||
288 | (originator, event). Typically the originator will be an integer assigned | ||
289 | to a thermal_zone_device when it registers itself with the framework. The | ||
290 | event will be one of:{THERMAL_AUX0, THERMAL_AUX1, THERMAL_CRITICAL, | ||
291 | THERMAL_DEV_FAULT}. Notification can be sent when the current temperature | ||
292 | crosses any of the configured thresholds. | ||
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.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/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/vm/transhuge.txt b/Documentation/vm/transhuge.txt new file mode 100644 index 000000000000..0924aaca3302 --- /dev/null +++ b/Documentation/vm/transhuge.txt | |||
@@ -0,0 +1,298 @@ | |||
1 | = Transparent Hugepage Support = | ||
2 | |||
3 | == Objective == | ||
4 | |||
5 | Performance critical computing applications dealing with large memory | ||
6 | working sets are already running on top of libhugetlbfs and in turn | ||
7 | hugetlbfs. Transparent Hugepage Support is an alternative means of | ||
8 | using huge pages for the backing of virtual memory with huge pages | ||
9 | that supports the automatic promotion and demotion of page sizes and | ||
10 | without the shortcomings of hugetlbfs. | ||
11 | |||
12 | Currently it only works for anonymous memory mappings but in the | ||
13 | future it can expand over the pagecache layer starting with tmpfs. | ||
14 | |||
15 | The reason applications are running faster is because of two | ||
16 | factors. The first factor is almost completely irrelevant and it's not | ||
17 | of significant interest because it'll also have the downside of | ||
18 | requiring larger clear-page copy-page in page faults which is a | ||
19 | potentially negative effect. The first factor consists in taking a | ||
20 | single page fault for each 2M virtual region touched by userland (so | ||
21 | reducing the enter/exit kernel frequency by a 512 times factor). This | ||
22 | only matters the first time the memory is accessed for the lifetime of | ||
23 | a memory mapping. The second long lasting and much more important | ||
24 | factor will affect all subsequent accesses to the memory for the whole | ||
25 | runtime of the application. The second factor consist of two | ||
26 | components: 1) the TLB miss will run faster (especially with | ||
27 | virtualization using nested pagetables but almost always also on bare | ||
28 | metal without virtualization) and 2) a single TLB entry will be | ||
29 | mapping a much larger amount of virtual memory in turn reducing the | ||
30 | number of TLB misses. With virtualization and nested pagetables the | ||
31 | TLB can be mapped of larger size only if both KVM and the Linux guest | ||
32 | are using hugepages but a significant speedup already happens if only | ||
33 | one of the two is using hugepages just because of the fact the TLB | ||
34 | miss is going to run faster. | ||
35 | |||
36 | == Design == | ||
37 | |||
38 | - "graceful fallback": mm components which don't have transparent | ||
39 | hugepage knowledge fall back to breaking a transparent hugepage and | ||
40 | working on the regular pages and their respective regular pmd/pte | ||
41 | mappings | ||
42 | |||
43 | - if a hugepage allocation fails because of memory fragmentation, | ||
44 | regular pages should be gracefully allocated instead and mixed in | ||
45 | the same vma without any failure or significant delay and without | ||
46 | userland noticing | ||
47 | |||
48 | - if some task quits and more hugepages become available (either | ||
49 | immediately in the buddy or through the VM), guest physical memory | ||
50 | backed by regular pages should be relocated on hugepages | ||
51 | automatically (with khugepaged) | ||
52 | |||
53 | - it doesn't require memory reservation and in turn it uses hugepages | ||
54 | whenever possible (the only possible reservation here is kernelcore= | ||
55 | to avoid unmovable pages to fragment all the memory but such a tweak | ||
56 | is not specific to transparent hugepage support and it's a generic | ||
57 | feature that applies to all dynamic high order allocations in the | ||
58 | kernel) | ||
59 | |||
60 | - this initial support only offers the feature in the anonymous memory | ||
61 | regions but it'd be ideal to move it to tmpfs and the pagecache | ||
62 | later | ||
63 | |||
64 | Transparent Hugepage Support maximizes the usefulness of free memory | ||
65 | if compared to the reservation approach of hugetlbfs by allowing all | ||
66 | unused memory to be used as cache or other movable (or even unmovable | ||
67 | entities). It doesn't require reservation to prevent hugepage | ||
68 | allocation failures to be noticeable from userland. It allows paging | ||
69 | and all other advanced VM features to be available on the | ||
70 | hugepages. It requires no modifications for applications to take | ||
71 | advantage of it. | ||
72 | |||
73 | Applications however can be further optimized to take advantage of | ||
74 | this feature, like for example they've been optimized before to avoid | ||
75 | a flood of mmap system calls for every malloc(4k). Optimizing userland | ||
76 | is by far not mandatory and khugepaged already can take care of long | ||
77 | lived page allocations even for hugepage unaware applications that | ||
78 | deals with large amounts of memory. | ||
79 | |||
80 | In certain cases when hugepages are enabled system wide, application | ||
81 | may end up allocating more memory resources. An application may mmap a | ||
82 | large region but only touch 1 byte of it, in that case a 2M page might | ||
83 | be allocated instead of a 4k page for no good. This is why it's | ||
84 | possible to disable hugepages system-wide and to only have them inside | ||
85 | MADV_HUGEPAGE madvise regions. | ||
86 | |||
87 | Embedded systems should enable hugepages only inside madvise regions | ||
88 | to eliminate any risk of wasting any precious byte of memory and to | ||
89 | only run faster. | ||
90 | |||
91 | Applications that gets a lot of benefit from hugepages and that don't | ||
92 | risk to lose memory by using hugepages, should use | ||
93 | madvise(MADV_HUGEPAGE) on their critical mmapped regions. | ||
94 | |||
95 | == sysfs == | ||
96 | |||
97 | Transparent Hugepage Support can be entirely disabled (mostly for | ||
98 | debugging purposes) or only enabled inside MADV_HUGEPAGE regions (to | ||
99 | avoid the risk of consuming more memory resources) or enabled system | ||
100 | wide. This can be achieved with one of: | ||
101 | |||
102 | echo always >/sys/kernel/mm/transparent_hugepage/enabled | ||
103 | echo madvise >/sys/kernel/mm/transparent_hugepage/enabled | ||
104 | echo never >/sys/kernel/mm/transparent_hugepage/enabled | ||
105 | |||
106 | It's also possible to limit defrag efforts in the VM to generate | ||
107 | hugepages in case they're not immediately free to madvise regions or | ||
108 | to never try to defrag memory and simply fallback to regular pages | ||
109 | unless hugepages are immediately available. Clearly if we spend CPU | ||
110 | time to defrag memory, we would expect to gain even more by the fact | ||
111 | we use hugepages later instead of regular pages. This isn't always | ||
112 | guaranteed, but it may be more likely in case the allocation is for a | ||
113 | MADV_HUGEPAGE region. | ||
114 | |||
115 | echo always >/sys/kernel/mm/transparent_hugepage/defrag | ||
116 | echo madvise >/sys/kernel/mm/transparent_hugepage/defrag | ||
117 | echo never >/sys/kernel/mm/transparent_hugepage/defrag | ||
118 | |||
119 | khugepaged will be automatically started when | ||
120 | transparent_hugepage/enabled is set to "always" or "madvise, and it'll | ||
121 | be automatically shutdown if it's set to "never". | ||
122 | |||
123 | khugepaged runs usually at low frequency so while one may not want to | ||
124 | invoke defrag algorithms synchronously during the page faults, it | ||
125 | should be worth invoking defrag at least in khugepaged. However it's | ||
126 | also possible to disable defrag in khugepaged: | ||
127 | |||
128 | echo yes >/sys/kernel/mm/transparent_hugepage/khugepaged/defrag | ||
129 | echo no >/sys/kernel/mm/transparent_hugepage/khugepaged/defrag | ||
130 | |||
131 | You can also control how many pages khugepaged should scan at each | ||
132 | pass: | ||
133 | |||
134 | /sys/kernel/mm/transparent_hugepage/khugepaged/pages_to_scan | ||
135 | |||
136 | and how many milliseconds to wait in khugepaged between each pass (you | ||
137 | can set this to 0 to run khugepaged at 100% utilization of one core): | ||
138 | |||
139 | /sys/kernel/mm/transparent_hugepage/khugepaged/scan_sleep_millisecs | ||
140 | |||
141 | and how many milliseconds to wait in khugepaged if there's an hugepage | ||
142 | allocation failure to throttle the next allocation attempt. | ||
143 | |||
144 | /sys/kernel/mm/transparent_hugepage/khugepaged/alloc_sleep_millisecs | ||
145 | |||
146 | The khugepaged progress can be seen in the number of pages collapsed: | ||
147 | |||
148 | /sys/kernel/mm/transparent_hugepage/khugepaged/pages_collapsed | ||
149 | |||
150 | for each pass: | ||
151 | |||
152 | /sys/kernel/mm/transparent_hugepage/khugepaged/full_scans | ||
153 | |||
154 | == Boot parameter == | ||
155 | |||
156 | You can change the sysfs boot time defaults of Transparent Hugepage | ||
157 | Support by passing the parameter "transparent_hugepage=always" or | ||
158 | "transparent_hugepage=madvise" or "transparent_hugepage=never" | ||
159 | (without "") to the kernel command line. | ||
160 | |||
161 | == Need of application restart == | ||
162 | |||
163 | The transparent_hugepage/enabled values only affect future | ||
164 | behavior. So to make them effective you need to restart any | ||
165 | application that could have been using hugepages. This also applies to | ||
166 | the regions registered in khugepaged. | ||
167 | |||
168 | == get_user_pages and follow_page == | ||
169 | |||
170 | get_user_pages and follow_page if run on a hugepage, will return the | ||
171 | head or tail pages as usual (exactly as they would do on | ||
172 | hugetlbfs). Most gup users will only care about the actual physical | ||
173 | address of the page and its temporary pinning to release after the I/O | ||
174 | is complete, so they won't ever notice the fact the page is huge. But | ||
175 | if any driver is going to mangle over the page structure of the tail | ||
176 | page (like for checking page->mapping or other bits that are relevant | ||
177 | for the head page and not the tail page), it should be updated to jump | ||
178 | to check head page instead (while serializing properly against | ||
179 | split_huge_page() to avoid the head and tail pages to disappear from | ||
180 | under it, see the futex code to see an example of that, hugetlbfs also | ||
181 | needed special handling in futex code for similar reasons). | ||
182 | |||
183 | NOTE: these aren't new constraints to the GUP API, and they match the | ||
184 | same constrains that applies to hugetlbfs too, so any driver capable | ||
185 | of handling GUP on hugetlbfs will also work fine on transparent | ||
186 | hugepage backed mappings. | ||
187 | |||
188 | In case you can't handle compound pages if they're returned by | ||
189 | follow_page, the FOLL_SPLIT bit can be specified as parameter to | ||
190 | follow_page, so that it will split the hugepages before returning | ||
191 | them. Migration for example passes FOLL_SPLIT as parameter to | ||
192 | follow_page because it's not hugepage aware and in fact it can't work | ||
193 | at all on hugetlbfs (but it instead works fine on transparent | ||
194 | hugepages thanks to FOLL_SPLIT). migration simply can't deal with | ||
195 | hugepages being returned (as it's not only checking the pfn of the | ||
196 | page and pinning it during the copy but it pretends to migrate the | ||
197 | memory in regular page sizes and with regular pte/pmd mappings). | ||
198 | |||
199 | == Optimizing the applications == | ||
200 | |||
201 | To be guaranteed that the kernel will map a 2M page immediately in any | ||
202 | memory region, the mmap region has to be hugepage naturally | ||
203 | aligned. posix_memalign() can provide that guarantee. | ||
204 | |||
205 | == Hugetlbfs == | ||
206 | |||
207 | You can use hugetlbfs on a kernel that has transparent hugepage | ||
208 | support enabled just fine as always. No difference can be noted in | ||
209 | hugetlbfs other than there will be less overall fragmentation. All | ||
210 | usual features belonging to hugetlbfs are preserved and | ||
211 | unaffected. libhugetlbfs will also work fine as usual. | ||
212 | |||
213 | == Graceful fallback == | ||
214 | |||
215 | Code walking pagetables but unware about huge pmds can simply call | ||
216 | split_huge_page_pmd(mm, pmd) where the pmd is the one returned by | ||
217 | pmd_offset. It's trivial to make the code transparent hugepage aware | ||
218 | by just grepping for "pmd_offset" and adding split_huge_page_pmd where | ||
219 | missing after pmd_offset returns the pmd. Thanks to the graceful | ||
220 | fallback design, with a one liner change, you can avoid to write | ||
221 | hundred if not thousand of lines of complex code to make your code | ||
222 | hugepage aware. | ||
223 | |||
224 | If you're not walking pagetables but you run into a physical hugepage | ||
225 | but you can't handle it natively in your code, you can split it by | ||
226 | calling split_huge_page(page). This is what the Linux VM does before | ||
227 | it tries to swapout the hugepage for example. | ||
228 | |||
229 | Example to make mremap.c transparent hugepage aware with a one liner | ||
230 | change: | ||
231 | |||
232 | diff --git a/mm/mremap.c b/mm/mremap.c | ||
233 | --- a/mm/mremap.c | ||
234 | +++ b/mm/mremap.c | ||
235 | @@ -41,6 +41,7 @@ static pmd_t *get_old_pmd(struct mm_stru | ||
236 | return NULL; | ||
237 | |||
238 | pmd = pmd_offset(pud, addr); | ||
239 | + split_huge_page_pmd(mm, pmd); | ||
240 | if (pmd_none_or_clear_bad(pmd)) | ||
241 | return NULL; | ||
242 | |||
243 | == Locking in hugepage aware code == | ||
244 | |||
245 | We want as much code as possible hugepage aware, as calling | ||
246 | split_huge_page() or split_huge_page_pmd() has a cost. | ||
247 | |||
248 | To make pagetable walks huge pmd aware, all you need to do is to call | ||
249 | pmd_trans_huge() on the pmd returned by pmd_offset. You must hold the | ||
250 | mmap_sem in read (or write) mode to be sure an huge pmd cannot be | ||
251 | created from under you by khugepaged (khugepaged collapse_huge_page | ||
252 | takes the mmap_sem in write mode in addition to the anon_vma lock). If | ||
253 | pmd_trans_huge returns false, you just fallback in the old code | ||
254 | paths. If instead pmd_trans_huge returns true, you have to take the | ||
255 | mm->page_table_lock and re-run pmd_trans_huge. Taking the | ||
256 | page_table_lock will prevent the huge pmd to be converted into a | ||
257 | regular pmd from under you (split_huge_page can run in parallel to the | ||
258 | pagetable walk). If the second pmd_trans_huge returns false, you | ||
259 | should just drop the page_table_lock and fallback to the old code as | ||
260 | before. Otherwise you should run pmd_trans_splitting on the pmd. In | ||
261 | case pmd_trans_splitting returns true, it means split_huge_page is | ||
262 | already in the middle of splitting the page. So if pmd_trans_splitting | ||
263 | returns true it's enough to drop the page_table_lock and call | ||
264 | wait_split_huge_page and then fallback the old code paths. You are | ||
265 | guaranteed by the time wait_split_huge_page returns, the pmd isn't | ||
266 | huge anymore. If pmd_trans_splitting returns false, you can proceed to | ||
267 | process the huge pmd and the hugepage natively. Once finished you can | ||
268 | drop the page_table_lock. | ||
269 | |||
270 | == compound_lock, get_user_pages and put_page == | ||
271 | |||
272 | split_huge_page internally has to distribute the refcounts in the head | ||
273 | page to the tail pages before clearing all PG_head/tail bits from the | ||
274 | page structures. It can do that easily for refcounts taken by huge pmd | ||
275 | mappings. But the GUI API as created by hugetlbfs (that returns head | ||
276 | and tail pages if running get_user_pages on an address backed by any | ||
277 | hugepage), requires the refcount to be accounted on the tail pages and | ||
278 | not only in the head pages, if we want to be able to run | ||
279 | split_huge_page while there are gup pins established on any tail | ||
280 | page. Failure to be able to run split_huge_page if there's any gup pin | ||
281 | on any tail page, would mean having to split all hugepages upfront in | ||
282 | get_user_pages which is unacceptable as too many gup users are | ||
283 | performance critical and they must work natively on hugepages like | ||
284 | they work natively on hugetlbfs already (hugetlbfs is simpler because | ||
285 | hugetlbfs pages cannot be splitted so there wouldn't be requirement of | ||
286 | accounting the pins on the tail pages for hugetlbfs). If we wouldn't | ||
287 | account the gup refcounts on the tail pages during gup, we won't know | ||
288 | anymore which tail page is pinned by gup and which is not while we run | ||
289 | split_huge_page. But we still have to add the gup pin to the head page | ||
290 | too, to know when we can free the compound page in case it's never | ||
291 | splitted during its lifetime. That requires changing not just | ||
292 | get_page, but put_page as well so that when put_page runs on a tail | ||
293 | page (and only on a tail page) it will find its respective head page, | ||
294 | and then it will decrease the head page refcount in addition to the | ||
295 | tail page refcount. To obtain a head page reliably and to decrease its | ||
296 | refcount without race conditions, put_page has to serialize against | ||
297 | __split_huge_page_refcount using a special per-page lock called | ||
298 | compound_lock. | ||
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 bdeb81ccb5f6..9b7221a86df2 100644 --- a/Documentation/x86/boot.txt +++ b/Documentation/x86/boot.txt | |||
@@ -622,9 +622,9 @@ Protocol: 2.08+ | |||
622 | 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 |
623 | uncompressed data should be determined using the standard magic | 623 | uncompressed data should be determined using the standard magic |
624 | numbers. The currently supported compression formats are gzip | 624 | numbers. The currently supported compression formats are gzip |
625 | (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 |
626 | (magic number 5D 00). The uncompressed payload is currently always ELF | 626 | (magic number 5D 00), and XZ (magic number FD 37). The uncompressed |
627 | (magic number 7F 45 4C 46). | 627 | payload is currently always ELF (magic number 7F 45 4C 46). |
628 | 628 | ||
629 | Field name: payload_length | 629 | Field name: payload_length |
630 | 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 | ---------------------------- |