aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation
diff options
context:
space:
mode:
authorGrant Likely <grant.likely@secretlab.ca>2011-03-17 15:46:58 -0400
committerGrant Likely <grant.likely@secretlab.ca>2011-03-17 15:48:06 -0400
commit2dd22997679a88874c131f6e6ffb963e6d43b3a6 (patch)
treebfe1707dda7e755b8b550c6796e2649813bcfbb9 /Documentation
parent36885ff0e6563687e6152da6d311abbf83c0198f (diff)
parent7b7adc4a016a1decb806eb71ecab98721fa7f146 (diff)
Merge remote-tracking branch 'origin' into spi/next
Pull in Linus' tree to pick up changes required for the langwell gpio fixes
Diffstat (limited to 'Documentation')
-rw-r--r--Documentation/00-INDEX4
-rw-r--r--Documentation/ABI/stable/sysfs-firmware-efi-vars75
-rw-r--r--Documentation/ABI/testing/pstore35
-rw-r--r--Documentation/ABI/testing/sysfs-devices-power20
-rw-r--r--Documentation/ABI/testing/sysfs-firmware-dmi110
-rw-r--r--Documentation/ABI/testing/sysfs-fs-pstore7
-rw-r--r--Documentation/ABI/testing/sysfs-platform-kim48
-rw-r--r--Documentation/CodingStyle5
-rw-r--r--Documentation/RCU/whatisRCU.txt31
-rw-r--r--Documentation/arm/SH-Mobile/Makefile8
-rw-r--r--Documentation/arm/SH-Mobile/vrl4.c169
-rw-r--r--Documentation/arm/SH-Mobile/zboot-rom-mmcif.txt29
-rw-r--r--Documentation/arm/Sharp-LH/ADC-LH7-Touchscreen61
-rw-r--r--Documentation/arm/Sharp-LH/CompactFlash32
-rw-r--r--Documentation/arm/Sharp-LH/IOBarrier45
-rw-r--r--Documentation/arm/Sharp-LH/KEV7A4008
-rw-r--r--Documentation/arm/Sharp-LH/LCDPanels59
-rw-r--r--Documentation/arm/Sharp-LH/LPD7A40015
-rw-r--r--Documentation/arm/Sharp-LH/LPD7A40X16
-rw-r--r--Documentation/arm/Sharp-LH/SDRAM51
-rw-r--r--Documentation/arm/Sharp-LH/VectoredInterruptController80
-rw-r--r--Documentation/cgroups/cgroups.txt12
-rw-r--r--Documentation/devicetree/00-INDEX10
-rw-r--r--Documentation/devicetree/bindings/i2c/ce4100-i2c.txt93
-rw-r--r--Documentation/devicetree/bindings/rtc/rtc-cmos.txt28
-rw-r--r--Documentation/devicetree/bindings/serial/altera_jtaguart.txt4
-rw-r--r--Documentation/devicetree/bindings/serial/altera_uart.txt7
-rw-r--r--Documentation/devicetree/bindings/serio/altera_ps2.txt4
-rw-r--r--Documentation/devicetree/bindings/x86/ce4100.txt38
-rw-r--r--Documentation/devicetree/bindings/x86/interrupt.txt26
-rw-r--r--Documentation/devicetree/bindings/x86/timer.txt6
-rw-r--r--Documentation/devicetree/booting-without-of.txt20
-rw-r--r--Documentation/dynamic-debug-howto.txt12
-rw-r--r--Documentation/feature-removal-schedule.txt26
-rw-r--r--Documentation/filesystems/Locking6
-rw-r--r--Documentation/filesystems/porting7
-rw-r--r--Documentation/filesystems/sysfs.txt16
-rw-r--r--Documentation/filesystems/vfs.txt56
-rw-r--r--Documentation/kernel-parameters.txt4
-rw-r--r--Documentation/keys-request-key.txt9
-rw-r--r--Documentation/keys.txt28
-rw-r--r--Documentation/kref.txt2
-rw-r--r--Documentation/memory-barriers.txt58
-rw-r--r--Documentation/memory-hotplug.txt47
-rw-r--r--Documentation/networking/batman-adv.txt16
-rw-r--r--Documentation/networking/bonding.txt26
-rw-r--r--Documentation/networking/ip-sysctl.txt11
-rw-r--r--Documentation/networking/phonet.txt67
-rw-r--r--Documentation/power/devices.txt94
-rw-r--r--Documentation/power/runtime_pm.txt13
-rw-r--r--Documentation/power/states.txt12
-rw-r--r--Documentation/powerpc/00-INDEX4
-rw-r--r--Documentation/rtc.txt29
-rw-r--r--Documentation/serial/n_gsm.txt89
-rw-r--r--Documentation/spinlocks.txt24
-rw-r--r--Documentation/sysctl/fs.txt17
-rw-r--r--Documentation/trace/ftrace-design.txt7
-rw-r--r--Documentation/trace/ftrace.txt151
-rw-r--r--Documentation/trace/kprobetrace.txt16
-rw-r--r--Documentation/usb/usbmon.txt42
-rw-r--r--Documentation/zh_CN/SecurityBugs50
-rw-r--r--Documentation/zh_CN/SubmitChecklist109
-rw-r--r--Documentation/zh_CN/SubmittingPatches4
-rw-r--r--Documentation/zh_CN/magic-number.txt167
64 files changed, 1610 insertions, 765 deletions
diff --git a/Documentation/00-INDEX b/Documentation/00-INDEX
index 8dfc6708a257..f607367e642f 100644
--- a/Documentation/00-INDEX
+++ b/Documentation/00-INDEX
@@ -328,8 +328,6 @@ sysrq.txt
328 - info on the magic SysRq key. 328 - info on the magic SysRq key.
329telephony/ 329telephony/
330 - directory with info on telephony (e.g. voice over IP) support. 330 - directory with info on telephony (e.g. voice over IP) support.
331time_interpolators.txt
332 - info on time interpolators.
333uml/ 331uml/
334 - directory with information about User Mode Linux. 332 - directory with information about User Mode Linux.
335unicode.txt 333unicode.txt
@@ -346,8 +344,6 @@ vm/
346 - directory with info on the Linux vm code. 344 - directory with info on the Linux vm code.
347volatile-considered-harmful.txt 345volatile-considered-harmful.txt
348 - Why the "volatile" type class should not be used 346 - Why the "volatile" type class should not be used
349voyager.txt
350 - guide to running Linux on the Voyager architecture.
351w1/ 347w1/
352 - directory with documents regarding the 1-wire (w1) subsystem. 348 - directory with documents regarding the 1-wire (w1) subsystem.
353watchdog/ 349watchdog/
diff --git a/Documentation/ABI/stable/sysfs-firmware-efi-vars b/Documentation/ABI/stable/sysfs-firmware-efi-vars
new file mode 100644
index 000000000000..5def20b9019e
--- /dev/null
+++ b/Documentation/ABI/stable/sysfs-firmware-efi-vars
@@ -0,0 +1,75 @@
1What: /sys/firmware/efi/vars
2Date: April 2004
3Contact: Matt Domsch <Matt_Domsch@dell.com>
4Description:
5 This directory exposes interfaces for interactive with
6 EFI variables. For more information on EFI variables,
7 see 'Variable Services' in the UEFI specification
8 (section 7.2 in specification version 2.3 Errata D).
9
10 In summary, EFI variables are named, and are classified
11 into separate namespaces through the use of a vendor
12 GUID. They also have an arbitrary binary value
13 associated with them.
14
15 The efivars module enumerates these variables and
16 creates a separate directory for each one found. Each
17 directory has a name of the form "<key>-<vendor guid>"
18 and contains the following files:
19
20 attributes: A read-only text file enumerating the
21 EFI variable flags. Potential values
22 include:
23
24 EFI_VARIABLE_NON_VOLATILE
25 EFI_VARIABLE_BOOTSERVICE_ACCESS
26 EFI_VARIABLE_RUNTIME_ACCESS
27 EFI_VARIABLE_HARDWARE_ERROR_RECORD
28 EFI_VARIABLE_AUTHENTICATED_WRITE_ACCESS
29
30 See the EFI documentation for an
31 explanation of each of these variables.
32
33 data: A read-only binary file that can be read
34 to attain the value of the EFI variable
35
36 guid: The vendor GUID of the variable. This
37 should always match the GUID in the
38 variable's name.
39
40 raw_var: A binary file that can be read to obtain
41 a structure that contains everything
42 there is to know about the variable.
43 For structure definition see "struct
44 efi_variable" in the kernel sources.
45
46 This file can also be written to in
47 order to update the value of a variable.
48 For this to work however, all fields of
49 the "struct efi_variable" passed must
50 match byte for byte with the structure
51 read out of the file, save for the value
52 portion.
53
54 **Note** the efi_variable structure
55 read/written with this file contains a
56 'long' type that may change widths
57 depending on your underlying
58 architecture.
59
60 size: As ASCII representation of the size of
61 the variable's value.
62
63
64 In addition, two other magic binary files are provided
65 in the top-level directory and are used for adding and
66 removing variables:
67
68 new_var: Takes a "struct efi_variable" and
69 instructs the EFI firmware to create a
70 new variable.
71
72 del_var: Takes a "struct efi_variable" and
73 instructs the EFI firmware to remove any
74 variable that has a matching vendor GUID
75 and variable key name.
diff --git a/Documentation/ABI/testing/pstore b/Documentation/ABI/testing/pstore
new file mode 100644
index 000000000000..f1fb2a004264
--- /dev/null
+++ b/Documentation/ABI/testing/pstore
@@ -0,0 +1,35 @@
1Where: /dev/pstore/...
2Date: January 2011
3Kernel Version: 2.6.38
4Contact: tony.luck@intel.com
5Description: Generic interface to platform dependent persistent storage.
6
7 Platforms that provide a mechanism to preserve some data
8 across system reboots can register with this driver to
9 provide a generic interface to show records captured in
10 the dying moments. In the case of a panic the last part
11 of the console log is captured, but other interesting
12 data can also be saved.
13
14 # mount -t pstore - /dev/pstore
15
16 $ ls -l /dev/pstore
17 total 0
18 -r--r--r-- 1 root root 7896 Nov 30 15:38 dmesg-erst-1
19
20 Different users of this interface will result in different
21 filename prefixes. Currently two are defined:
22
23 "dmesg" - saved console log
24 "mce" - architecture dependent data from fatal h/w error
25
26 Once the information in a file has been read, removing
27 the file will signal to the underlying persistent storage
28 device that it can reclaim the space for later re-use.
29
30 $ rm /dev/pstore/dmesg-erst-1
31
32 The expectation is that all files in /dev/pstore
33 will be saved elsewhere and erased from persistent store
34 soon after boot to free up space ready for the next
35 catastrophe.
diff --git a/Documentation/ABI/testing/sysfs-devices-power b/Documentation/ABI/testing/sysfs-devices-power
index 7628cd1bc36a..8ffbc25376a0 100644
--- a/Documentation/ABI/testing/sysfs-devices-power
+++ b/Documentation/ABI/testing/sysfs-devices-power
@@ -29,9 +29,8 @@ Description:
29 "disabled" to it. 29 "disabled" to it.
30 30
31 For the devices that are not capable of generating system wakeup 31 For the devices that are not capable of generating system wakeup
32 events this file contains "\n". In that cases the user space 32 events this file is not present. In that case the device cannot
33 cannot modify the contents of this file and the device cannot be 33 be enabled to wake up the system from sleep states.
34 enabled to wake up the system.
35 34
36What: /sys/devices/.../power/control 35What: /sys/devices/.../power/control
37Date: January 2009 36Date: January 2009
@@ -85,7 +84,7 @@ Description:
85 The /sys/devices/.../wakeup_count attribute contains the number 84 The /sys/devices/.../wakeup_count attribute contains the number
86 of signaled wakeup events associated with the device. This 85 of signaled wakeup events associated with the device. This
87 attribute is read-only. If the device is not enabled to wake up 86 attribute is read-only. If the device is not enabled to wake up
88 the system from sleep states, this attribute is empty. 87 the system from sleep states, this attribute is not present.
89 88
90What: /sys/devices/.../power/wakeup_active_count 89What: /sys/devices/.../power/wakeup_active_count
91Date: September 2010 90Date: September 2010
@@ -95,7 +94,7 @@ Description:
95 number of times the processing of wakeup events associated with 94 number of times the processing of wakeup events associated with
96 the device was completed (at the kernel level). This attribute 95 the device was completed (at the kernel level). This attribute
97 is read-only. If the device is not enabled to wake up the 96 is read-only. If the device is not enabled to wake up the
98 system from sleep states, this attribute is empty. 97 system from sleep states, this attribute is not present.
99 98
100What: /sys/devices/.../power/wakeup_hit_count 99What: /sys/devices/.../power/wakeup_hit_count
101Date: September 2010 100Date: September 2010
@@ -105,7 +104,8 @@ Description:
105 number of times the processing of a wakeup event associated with 104 number of times the processing of a wakeup event associated with
106 the device might prevent the system from entering a sleep state. 105 the device might prevent the system from entering a sleep state.
107 This attribute is read-only. If the device is not enabled to 106 This attribute is read-only. If the device is not enabled to
108 wake up the system from sleep states, this attribute is empty. 107 wake up the system from sleep states, this attribute is not
108 present.
109 109
110What: /sys/devices/.../power/wakeup_active 110What: /sys/devices/.../power/wakeup_active
111Date: September 2010 111Date: September 2010
@@ -115,7 +115,7 @@ Description:
115 or 0, depending on whether or not a wakeup event associated with 115 or 0, depending on whether or not a wakeup event associated with
116 the device is being processed (1). This attribute is read-only. 116 the device is being processed (1). This attribute is read-only.
117 If the device is not enabled to wake up the system from sleep 117 If the device is not enabled to wake up the system from sleep
118 states, this attribute is empty. 118 states, this attribute is not present.
119 119
120What: /sys/devices/.../power/wakeup_total_time_ms 120What: /sys/devices/.../power/wakeup_total_time_ms
121Date: September 2010 121Date: September 2010
@@ -125,7 +125,7 @@ Description:
125 the total time of processing wakeup events associated with the 125 the total time of processing wakeup events associated with the
126 device, in milliseconds. This attribute is read-only. If the 126 device, in milliseconds. This attribute is read-only. If the
127 device is not enabled to wake up the system from sleep states, 127 device is not enabled to wake up the system from sleep states,
128 this attribute is empty. 128 this attribute is not present.
129 129
130What: /sys/devices/.../power/wakeup_max_time_ms 130What: /sys/devices/.../power/wakeup_max_time_ms
131Date: September 2010 131Date: September 2010
@@ -135,7 +135,7 @@ Description:
135 the maximum time of processing a single wakeup event associated 135 the maximum time of processing a single wakeup event associated
136 with the device, in milliseconds. This attribute is read-only. 136 with the device, in milliseconds. This attribute is read-only.
137 If the device is not enabled to wake up the system from sleep 137 If the device is not enabled to wake up the system from sleep
138 states, this attribute is empty. 138 states, this attribute is not present.
139 139
140What: /sys/devices/.../power/wakeup_last_time_ms 140What: /sys/devices/.../power/wakeup_last_time_ms
141Date: September 2010 141Date: September 2010
@@ -146,7 +146,7 @@ Description:
146 signaling the last wakeup event associated with the device, in 146 signaling the last wakeup event associated with the device, in
147 milliseconds. This attribute is read-only. If the device is 147 milliseconds. This attribute is read-only. If the device is
148 not enabled to wake up the system from sleep states, this 148 not enabled to wake up the system from sleep states, this
149 attribute is empty. 149 attribute is not present.
150 150
151What: /sys/devices/.../power/autosuspend_delay_ms 151What: /sys/devices/.../power/autosuspend_delay_ms
152Date: September 2010 152Date: September 2010
diff --git a/Documentation/ABI/testing/sysfs-firmware-dmi b/Documentation/ABI/testing/sysfs-firmware-dmi
new file mode 100644
index 000000000000..ba9da9503c23
--- /dev/null
+++ b/Documentation/ABI/testing/sysfs-firmware-dmi
@@ -0,0 +1,110 @@
1What: /sys/firmware/dmi/
2Date: February 2011
3Contact: Mike Waychison <mikew@google.com>
4Description:
5 Many machines' firmware (x86 and ia64) export DMI /
6 SMBIOS tables to the operating system. Getting at this
7 information is often valuable to userland, especially in
8 cases where there are OEM extensions used.
9
10 The kernel itself does not rely on the majority of the
11 information in these tables being correct. It equally
12 cannot ensure that the data as exported to userland is
13 without error either.
14
15 DMI is structured as a large table of entries, where
16 each entry has a common header indicating the type and
17 length of the entry, as well as 'handle' that is
18 supposed to be unique amongst all entries.
19
20 Some entries are required by the specification, but many
21 others are optional. In general though, users should
22 never expect to find a specific entry type on their
23 system unless they know for certain what their firmware
24 is doing. Machine to machine will vary.
25
26 Multiple entries of the same type are allowed. In order
27 to handle these duplicate entry types, each entry is
28 assigned by the operating system an 'instance', which is
29 derived from an entry type's ordinal position. That is
30 to say, if there are 'N' multiple entries with the same type
31 'T' in the DMI tables (adjacent or spread apart, it
32 doesn't matter), they will be represented in sysfs as
33 entries "T-0" through "T-(N-1)":
34
35 Example entry directories:
36
37 /sys/firmware/dmi/entries/17-0
38 /sys/firmware/dmi/entries/17-1
39 /sys/firmware/dmi/entries/17-2
40 /sys/firmware/dmi/entries/17-3
41 ...
42
43 Instance numbers are used in lieu of the firmware
44 assigned entry handles as the kernel itself makes no
45 guarantees that handles as exported are unique, and
46 there are likely firmware images that get this wrong in
47 the wild.
48
49 Each DMI entry in sysfs has the common header values
50 exported as attributes:
51
52 handle : The 16bit 'handle' that is assigned to this
53 entry by the firmware. This handle may be
54 referred to by other entries.
55 length : The length of the entry, as presented in the
56 entry itself. Note that this is _not the
57 total count of bytes associated with the
58 entry_. This value represents the length of
59 the "formatted" portion of the entry. This
60 "formatted" region is sometimes followed by
61 the "unformatted" region composed of nul
62 terminated strings, with termination signalled
63 by a two nul characters in series.
64 raw : The raw bytes of the entry. This includes the
65 "formatted" portion of the entry, the
66 "unformatted" strings portion of the entry,
67 and the two terminating nul characters.
68 type : The type of the entry. This value is the same
69 as found in the directory name. It indicates
70 how the rest of the entry should be
71 interpreted.
72 instance: The instance ordinal of the entry for the
73 given type. This value is the same as found
74 in the parent directory name.
75 position: The position of the entry within the entirety
76 of the entirety.
77
78 === Entry Specialization ===
79
80 Some entry types may have other information available in
81 sysfs.
82
83 --- Type 15 - System Event Log ---
84
85 This entry allows the firmware to export a log of
86 events the system has taken. This information is
87 typically backed by nvram, but the implementation
88 details are abstracted by this table. This entries data
89 is exported in the directory:
90
91 /sys/firmware/dmi/entries/15-0/system_event_log
92
93 and has the following attributes (documented in the
94 SMBIOS / DMI specification under "System Event Log (Type 15)":
95
96 area_length
97 header_start_offset
98 data_start_offset
99 access_method
100 status
101 change_token
102 access_method_address
103 header_format
104 per_log_type_descriptor_length
105 type_descriptors_supported_count
106
107 As well, the kernel exports the binary attribute:
108
109 raw_event_log : The raw binary bits of the event log
110 as described by the DMI entry.
diff --git a/Documentation/ABI/testing/sysfs-fs-pstore b/Documentation/ABI/testing/sysfs-fs-pstore
new file mode 100644
index 000000000000..8e659d854805
--- /dev/null
+++ b/Documentation/ABI/testing/sysfs-fs-pstore
@@ -0,0 +1,7 @@
1What: /sys/fs/pstore/kmsg_bytes
2Date: January 2011
3Kernel Version: 2.6.38
4Contact: "Tony Luck" <tony.luck@intel.com>
5Description:
6 Controls amount of console log that will be saved
7 to persistent store on oops/panic.
diff --git a/Documentation/ABI/testing/sysfs-platform-kim b/Documentation/ABI/testing/sysfs-platform-kim
new file mode 100644
index 000000000000..c1653271872a
--- /dev/null
+++ b/Documentation/ABI/testing/sysfs-platform-kim
@@ -0,0 +1,48 @@
1What: /sys/devices/platform/kim/dev_name
2Date: January 2010
3KernelVersion: 2.6.38
4Contact: "Pavan Savoy" <pavan_savoy@ti.com>
5Description:
6 Name of the UART device at which the WL128x chip
7 is connected. example: "/dev/ttyS0".
8 The device name flows down to architecture specific board
9 initialization file from the SFI/ATAGS bootloader
10 firmware. The name exposed is read from the user-space
11 dameon and opens the device when install is requested.
12
13What: /sys/devices/platform/kim/baud_rate
14Date: January 2010
15KernelVersion: 2.6.38
16Contact: "Pavan Savoy" <pavan_savoy@ti.com>
17Description:
18 The maximum reliable baud-rate the host can support.
19 Different platforms tend to have different high-speed
20 UART configurations, so the baud-rate needs to be set
21 locally and also sent across to the WL128x via a HCI-VS
22 command. The entry is read and made use by the user-space
23 daemon when the ldisc install is requested.
24
25What: /sys/devices/platform/kim/flow_cntrl
26Date: January 2010
27KernelVersion: 2.6.38
28Contact: "Pavan Savoy" <pavan_savoy@ti.com>
29Description:
30 The WL128x makes use of flow control mechanism, and this
31 entry most often should be 1, the host's UART is required
32 to have the capability of flow-control, or else this
33 entry can be made use of for exceptions.
34
35What: /sys/devices/platform/kim/install
36Date: January 2010
37KernelVersion: 2.6.38
38Contact: "Pavan Savoy" <pavan_savoy@ti.com>
39Description:
40 When one of the protocols Bluetooth, FM or GPS wants to make
41 use of the shared UART transport, it registers to the shared
42 transport driver, which will signal the user-space for opening,
43 configuring baud and install line discipline via this sysfs
44 entry. This entry would be polled upon by the user-space
45 daemon managing the UART, and is notified about the change
46 by the sysfs_notify. The value would be '1' when UART needs
47 to be opened/ldisc installed, and would be '0' when UART
48 is no more required and needs to be closed.
diff --git a/Documentation/CodingStyle b/Documentation/CodingStyle
index 8bb37237ebd2..1cd3478e5834 100644
--- a/Documentation/CodingStyle
+++ b/Documentation/CodingStyle
@@ -659,7 +659,7 @@ There are a number of driver model diagnostic macros in <linux/device.h>
659which you should use to make sure messages are matched to the right device 659which you should use to make sure messages are matched to the right device
660and driver, and are tagged with the right level: dev_err(), dev_warn(), 660and driver, and are tagged with the right level: dev_err(), dev_warn(),
661dev_info(), and so forth. For messages that aren't associated with a 661dev_info(), and so forth. For messages that aren't associated with a
662particular device, <linux/kernel.h> defines pr_debug() and pr_info(). 662particular device, <linux/printk.h> defines pr_debug() and pr_info().
663 663
664Coming up with good debugging messages can be quite a challenge; and once 664Coming up with good debugging messages can be quite a challenge; and once
665you have them, they can be a huge help for remote troubleshooting. Such 665you have them, they can be a huge help for remote troubleshooting. Such
@@ -819,6 +819,3 @@ language C, URL: http://www.open-std.org/JTC1/SC22/WG14/
819Kernel CodingStyle, by greg@kroah.com at OLS 2002: 819Kernel CodingStyle, by greg@kroah.com at OLS 2002:
820http://www.kroah.com/linux/talks/ols_2002_kernel_codingstyle_talk/html/ 820http://www.kroah.com/linux/talks/ols_2002_kernel_codingstyle_talk/html/
821 821
822--
823Last updated on 2007-July-13.
824
diff --git a/Documentation/RCU/whatisRCU.txt b/Documentation/RCU/whatisRCU.txt
index cfaac34c4557..6ef692667e2f 100644
--- a/Documentation/RCU/whatisRCU.txt
+++ b/Documentation/RCU/whatisRCU.txt
@@ -849,6 +849,37 @@ All: lockdep-checked RCU-protected pointer access
849See the comment headers in the source code (or the docbook generated 849See the comment headers in the source code (or the docbook generated
850from them) for more information. 850from them) for more information.
851 851
852However, given that there are no fewer than four families of RCU APIs
853in the Linux kernel, how do you choose which one to use? The following
854list can be helpful:
855
856a. Will readers need to block? If so, you need SRCU.
857
858b. What about the -rt patchset? If readers would need to block
859 in an non-rt kernel, you need SRCU. If readers would block
860 in a -rt kernel, but not in a non-rt kernel, SRCU is not
861 necessary.
862
863c. Do you need to treat NMI handlers, hardirq handlers,
864 and code segments with preemption disabled (whether
865 via preempt_disable(), local_irq_save(), local_bh_disable(),
866 or some other mechanism) as if they were explicit RCU readers?
867 If so, you need RCU-sched.
868
869d. Do you need RCU grace periods to complete even in the face
870 of softirq monopolization of one or more of the CPUs? For
871 example, is your code subject to network-based denial-of-service
872 attacks? If so, you need RCU-bh.
873
874e. Is your workload too update-intensive for normal use of
875 RCU, but inappropriate for other synchronization mechanisms?
876 If so, consider SLAB_DESTROY_BY_RCU. But please be careful!
877
878f. Otherwise, use RCU.
879
880Of course, this all assumes that you have determined that RCU is in fact
881the right tool for your job.
882
852 883
8538. ANSWERS TO QUICK QUIZZES 8848. ANSWERS TO QUICK QUIZZES
854 885
diff --git a/Documentation/arm/SH-Mobile/Makefile b/Documentation/arm/SH-Mobile/Makefile
new file mode 100644
index 000000000000..8771d832cf8c
--- /dev/null
+++ b/Documentation/arm/SH-Mobile/Makefile
@@ -0,0 +1,8 @@
1BIN := vrl4
2
3.PHONY: all
4all: $(BIN)
5
6.PHONY: clean
7clean:
8 rm -f *.o $(BIN)
diff --git a/Documentation/arm/SH-Mobile/vrl4.c b/Documentation/arm/SH-Mobile/vrl4.c
new file mode 100644
index 000000000000..e8a191358ad2
--- /dev/null
+++ b/Documentation/arm/SH-Mobile/vrl4.c
@@ -0,0 +1,169 @@
1/*
2 * vrl4 format generator
3 *
4 * Copyright (C) 2010 Simon Horman
5 *
6 * This file is subject to the terms and conditions of the GNU General Public
7 * License. See the file "COPYING" in the main directory of this archive
8 * for more details.
9 */
10
11/*
12 * usage: vrl4 < zImage > out
13 * dd if=out of=/dev/sdx bs=512 seek=1 # Write the image to sector 1
14 *
15 * Reads a zImage from stdin and writes a vrl4 image to stdout.
16 * In practice this means writing a padded vrl4 header to stdout followed
17 * by the zImage.
18 *
19 * The padding places the zImage at ALIGN bytes into the output.
20 * The vrl4 uses ALIGN + START_BASE as the start_address.
21 * This is where the mask ROM will jump to after verifying the header.
22 *
23 * The header sets copy_size to min(sizeof(zImage), MAX_BOOT_PROG_LEN) + ALIGN.
24 * That is, the mask ROM will load the padded header (ALIGN bytes)
25 * And then MAX_BOOT_PROG_LEN bytes of the image, or the entire image,
26 * whichever is smaller.
27 *
28 * The zImage is not modified in any way.
29 */
30
31#define _BSD_SOURCE
32#include <endian.h>
33#include <unistd.h>
34#include <stdint.h>
35#include <stdio.h>
36#include <errno.h>
37
38struct hdr {
39 uint32_t magic1;
40 uint32_t reserved1;
41 uint32_t magic2;
42 uint32_t reserved2;
43 uint16_t copy_size;
44 uint16_t boot_options;
45 uint32_t reserved3;
46 uint32_t start_address;
47 uint32_t reserved4;
48 uint32_t reserved5;
49 char reserved6[308];
50};
51
52#define DECLARE_HDR(h) \
53 struct hdr (h) = { \
54 .magic1 = htole32(0xea000000), \
55 .reserved1 = htole32(0x56), \
56 .magic2 = htole32(0xe59ff008), \
57 .reserved3 = htole16(0x1) }
58
59/* Align to 512 bytes, the MMCIF sector size */
60#define ALIGN_BITS 9
61#define ALIGN (1 << ALIGN_BITS)
62
63#define START_BASE 0xe55b0000
64
65/*
66 * With an alignment of 512 the header uses the first sector.
67 * There is a 128 sector (64kbyte) limit on the data loaded by the mask ROM.
68 * So there are 127 sectors left for the boot programme. But in practice
69 * Only a small portion of a zImage is needed, 16 sectors should be more
70 * than enough.
71 *
72 * Note that this sets how much of the zImage is copied by the mask ROM.
73 * The entire zImage is present after the header and is loaded
74 * by the code in the boot program (which is the first portion of the zImage).
75 */
76#define MAX_BOOT_PROG_LEN (16 * 512)
77
78#define ROUND_UP(x) ((x + ALIGN - 1) & ~(ALIGN - 1))
79
80ssize_t do_read(int fd, void *buf, size_t count)
81{
82 size_t offset = 0;
83 ssize_t l;
84
85 while (offset < count) {
86 l = read(fd, buf + offset, count - offset);
87 if (!l)
88 break;
89 if (l < 0) {
90 if (errno == EAGAIN || errno == EWOULDBLOCK)
91 continue;
92 perror("read");
93 return -1;
94 }
95 offset += l;
96 }
97
98 return offset;
99}
100
101ssize_t do_write(int fd, const void *buf, size_t count)
102{
103 size_t offset = 0;
104 ssize_t l;
105
106 while (offset < count) {
107 l = write(fd, buf + offset, count - offset);
108 if (l < 0) {
109 if (errno == EAGAIN || errno == EWOULDBLOCK)
110 continue;
111 perror("write");
112 return -1;
113 }
114 offset += l;
115 }
116
117 return offset;
118}
119
120ssize_t write_zero(int fd, size_t len)
121{
122 size_t i = len;
123
124 while (i--) {
125 const char x = 0;
126 if (do_write(fd, &x, 1) < 0)
127 return -1;
128 }
129
130 return len;
131}
132
133int main(void)
134{
135 DECLARE_HDR(hdr);
136 char boot_program[MAX_BOOT_PROG_LEN];
137 size_t aligned_hdr_len, alligned_prog_len;
138 ssize_t prog_len;
139
140 prog_len = do_read(0, boot_program, sizeof(boot_program));
141 if (prog_len <= 0)
142 return -1;
143
144 aligned_hdr_len = ROUND_UP(sizeof(hdr));
145 hdr.start_address = htole32(START_BASE + aligned_hdr_len);
146 alligned_prog_len = ROUND_UP(prog_len);
147 hdr.copy_size = htole16(aligned_hdr_len + alligned_prog_len);
148
149 if (do_write(1, &hdr, sizeof(hdr)) < 0)
150 return -1;
151 if (write_zero(1, aligned_hdr_len - sizeof(hdr)) < 0)
152 return -1;
153
154 if (do_write(1, boot_program, prog_len) < 0)
155 return 1;
156
157 /* Write out the rest of the kernel */
158 while (1) {
159 prog_len = do_read(0, boot_program, sizeof(boot_program));
160 if (prog_len < 0)
161 return 1;
162 if (prog_len == 0)
163 break;
164 if (do_write(1, boot_program, prog_len) < 0)
165 return 1;
166 }
167
168 return 0;
169}
diff --git a/Documentation/arm/SH-Mobile/zboot-rom-mmcif.txt b/Documentation/arm/SH-Mobile/zboot-rom-mmcif.txt
new file mode 100644
index 000000000000..efff8ae2713d
--- /dev/null
+++ b/Documentation/arm/SH-Mobile/zboot-rom-mmcif.txt
@@ -0,0 +1,29 @@
1ROM-able zImage boot from MMC
2-----------------------------
3
4An ROM-able zImage compiled with ZBOOT_ROM_MMCIF may be written to MMC and
5SuperH Mobile ARM will to boot directly from the MMCIF hardware block.
6
7This is achieved by the mask ROM loading the first portion of the image into
8MERAM and then jumping to it. This portion contains loader code which
9copies the entire image to SDRAM and jumps to it. From there the zImage
10boot code proceeds as normal, uncompressing the image into its final
11location and then jumping to it.
12
13This code has been tested on an AP4EB board using the developer 1A eMMC
14boot mode which is configured using the following jumper settings.
15The board used for testing required a patched mask ROM in order for
16this mode to function.
17
18 8 7 6 5 4 3 2 1
19 x|x|x|x|x| |x|
20S4 -+-+-+-+-+-+-+-
21 | | | | |x| |x on
22
23The zImage must be written to the MMC card at sector 1 (512 bytes) in
24vrl4 format. A utility vrl4 is supplied to accomplish this.
25
26e.g.
27 vrl4 < zImage | dd of=/dev/sdX bs=512 seek=1
28
29A dual-voltage MMC 4.0 card was used for testing.
diff --git a/Documentation/arm/Sharp-LH/ADC-LH7-Touchscreen b/Documentation/arm/Sharp-LH/ADC-LH7-Touchscreen
deleted file mode 100644
index dc460f055647..000000000000
--- a/Documentation/arm/Sharp-LH/ADC-LH7-Touchscreen
+++ /dev/null
@@ -1,61 +0,0 @@
1README on the ADC/Touchscreen Controller
2========================================
3
4The LH79524 and LH7A404 include a built-in Analog to Digital
5controller (ADC) that is used to process input from a touchscreen.
6The driver only implements a four-wire touch panel protocol.
7
8The touchscreen driver is maintenance free except for the pen-down or
9touch threshold. Some resistive displays and board combinations may
10require tuning of this threshold. The driver exposes some of its
11internal state in the sys filesystem. If the kernel is configured
12with it, CONFIG_SYSFS, and sysfs is mounted at /sys, there will be a
13directory
14
15 /sys/devices/platform/adc-lh7.0
16
17containing these files.
18
19 -r--r--r-- 1 root root 4096 Jan 1 00:00 samples
20 -rw-r--r-- 1 root root 4096 Jan 1 00:00 threshold
21 -r--r--r-- 1 root root 4096 Jan 1 00:00 threshold_range
22
23The threshold is the current touch threshold. It defaults to 750 on
24most targets.
25
26 # cat threshold
27 750
28
29The threshold_range contains the range of valid values for the
30threshold. Values outside of this range will be silently ignored.
31
32 # cat threshold_range
33 0 1023
34
35To change the threshold, write a value to the threshold file.
36
37 # echo 500 > threshold
38 # cat threshold
39 500
40
41The samples file contains the most recently sampled values from the
42ADC. There are 12. Below are typical of the last sampled values when
43the pen has been released. The first two and last two samples are for
44detecting whether or not the pen is down. The third through sixth are
45X coordinate samples. The seventh through tenth are Y coordinate
46samples.
47
48 # cat samples
49 1023 1023 0 0 0 0 530 529 530 529 1023 1023
50
51To determine a reasonable threshold, press on the touch panel with an
52appropriate stylus and read the values from samples.
53
54 # cat samples
55 1023 676 92 103 101 102 855 919 922 922 1023 679
56
57The first and eleventh samples are discarded. Thus, the important
58values are the second and twelfth which are used to determine if the
59pen is down. When both are below the threshold, the driver registers
60that the pen is down. When either is above the threshold, it
61registers then pen is up.
diff --git a/Documentation/arm/Sharp-LH/CompactFlash b/Documentation/arm/Sharp-LH/CompactFlash
deleted file mode 100644
index 8616d877df9e..000000000000
--- a/Documentation/arm/Sharp-LH/CompactFlash
+++ /dev/null
@@ -1,32 +0,0 @@
1README on the Compact Flash for Card Engines
2============================================
3
4There are three challenges in supporting the CF interface of the Card
5Engines. First, every IO operation must be followed with IO to
6another memory region. Second, the slot is wired for one-to-one
7address mapping *and* it is wired for 16 bit access only. Second, the
8interrupt request line from the CF device isn't wired.
9
10The IOBARRIER issue is covered in README.IOBARRIER. This isn't an
11onerous problem. Enough said here.
12
13The addressing issue is solved in the
14arch/arm/mach-lh7a40x/ide-lpd7a40x.c file with some awkward
15work-arounds. We implement a special SELECT_DRIVE routine that is
16called before the IDE driver performs its own SELECT_DRIVE. Our code
17recognizes that the SELECT register cannot be modified without also
18writing a command. It send an IDLE_IMMEDIATE command on selecting a
19drive. The function also prevents drive select to the slave drive
20since there can be only one. The awkward part is that the IDE driver,
21even though we have a select procedure, also attempts to change the
22drive by writing directly the SELECT register. This attempt is
23explicitly blocked by the OUTB function--not pretty, but effective.
24
25The lack of interrupts is a more serious problem. Even though the CF
26card is fast when compared to a normal IDE device, we don't know that
27the CF is really flash. A user could use one of the very small hard
28drives being shipped with a CF interface. The IDE code includes a
29check for interfaces that lack an IRQ. In these cases, submitting a
30command to the IDE controller is followed by a call to poll for
31completion. If the device isn't immediately ready, it schedules a
32timer to poll again later.
diff --git a/Documentation/arm/Sharp-LH/IOBarrier b/Documentation/arm/Sharp-LH/IOBarrier
deleted file mode 100644
index 2e953e228f4d..000000000000
--- a/Documentation/arm/Sharp-LH/IOBarrier
+++ /dev/null
@@ -1,45 +0,0 @@
1README on the IOBARRIER for CardEngine IO
2=========================================
3
4Due to an unfortunate oversight when the Card Engines were designed,
5the signals that control access to some peripherals, most notably the
6SMC91C9111 ethernet controller, are not properly handled.
7
8The symptom is that some back to back IO with the peripheral returns
9unreliable data. With the SMC chip, you'll see errors about the bank
10register being 'screwed'.
11
12The cause is that the AEN signal to the SMC chip does not transition
13for every memory access. It is driven through the CPLD from the CS7
14line of the CPU's static memory controller which is optimized to
15eliminate unnecessary transitions. Yet, the SMC requires a transition
16for every write access. The Sharp website has more information about
17the effect this power-conserving feature has on peripheral
18interfacing.
19
20The solution is to follow every write access to the SMC chip with an
21access to another memory region that will force the CPU to release the
22chip select line. It is important to guarantee that this access
23forces the CPU off-chip. We map a page of SDRAM as if it were an
24uncacheable IO device and read from it after every SMC IO write
25operation.
26
27 SMC IO
28 BARRIER IO
29
30Only this sequence is important. It does not matter that there is no
31BARRIER IO before the access to the SMC chip because the AEN latch
32only needs occurs after the SMC IO write cycle. The routines that
33implement this work-around make an additional concession which is to
34disable interrupts during the IO sequence. Other hardware devices
35(the LogicPD CPLD) have registers in the same physical memory
36region as the SMC chip. An interrupt might allow an access to one of
37those registers while SMC IO is being performed.
38
39You might be tempted to think that we have to access another device
40attached to the static memory controller, but the empirical evidence
41indicates that this is not so. Mapping 0x00000000 (flash) and
420xc0000000 (SDRAM) appear to have the same effect. Using SDRAM seems
43to be faster. Choosing to access an undecoded memory region is not
44desirable as there is no way to know how that chip select will be used
45in the future.
diff --git a/Documentation/arm/Sharp-LH/KEV7A400 b/Documentation/arm/Sharp-LH/KEV7A400
deleted file mode 100644
index be32b14cd535..000000000000
--- a/Documentation/arm/Sharp-LH/KEV7A400
+++ /dev/null
@@ -1,8 +0,0 @@
1README on Implementing Linux for Sharp's KEV7a400
2=================================================
3
4This product has been discontinued by Sharp. For the time being, the
5partially implemented code remains in the kernel. At some point in
6the future, either the code will be finished or it will be removed
7completely. This depends primarily on how many of the development
8boards are in the field.
diff --git a/Documentation/arm/Sharp-LH/LCDPanels b/Documentation/arm/Sharp-LH/LCDPanels
deleted file mode 100644
index fb1b21c2f2f4..000000000000
--- a/Documentation/arm/Sharp-LH/LCDPanels
+++ /dev/null
@@ -1,59 +0,0 @@
1README on the LCD Panels
2========================
3
4Configuration options for several LCD panels, available from Logic PD,
5are included in the kernel source. This README will help you
6understand the configuration data and give you some guidance for
7adding support for other panels if you wish.
8
9
10lcd-panels.h
11------------
12
13There is no way, at present, to detect which panel is attached to the
14system at runtime. Thus the kernel configuration is static. The file
15arch/arm/mach-ld7a40x/lcd-panels.h (or similar) defines all of the
16panel specific parameters.
17
18It should be possible for this data to be shared among several device
19families. The current layout may be insufficiently general, but it is
20amenable to improvement.
21
22
23PIXEL_CLOCK
24-----------
25
26The panel data sheets will give a range of acceptable pixel clocks.
27The fundamental LCDCLK input frequency is divided down by a PCD
28constant in field '.tim2'. It may happen that it is impossible to set
29the pixel clock within this range. A clock which is too slow will
30tend to flicker. For the highest quality image, set the clock as high
31as possible.
32
33
34MARGINS
35-------
36
37These values may be difficult to glean from the panel data sheet. In
38the case of the Sharp panels, the upper margin is explicitly called
39out as a specific number of lines from the top of the frame. The
40other values may not matter as much as the panels tend to
41automatically center the image.
42
43
44Sync Sense
45----------
46
47The sense of the hsync and vsync pulses may be called out in the data
48sheet. On one panel, the sense of these pulses determine the height
49of the visible region on the panel. Most of the Sharp panels use
50negative sense sync pulses set by the TIM2_IHS and TIM2_IVS bits in
51'.tim2'.
52
53
54Pel Layout
55----------
56
57The Sharp color TFT panels are all configured for 16 bit direct color
58modes. The amba-lcd driver sets the pel mode to 565 for 5 bits of
59each red and blue and 6 bits of green.
diff --git a/Documentation/arm/Sharp-LH/LPD7A400 b/Documentation/arm/Sharp-LH/LPD7A400
deleted file mode 100644
index 3275b453bfdf..000000000000
--- a/Documentation/arm/Sharp-LH/LPD7A400
+++ /dev/null
@@ -1,15 +0,0 @@
1README on Implementing Linux for the Logic PD LPD7A400-10
2=========================================================
3
4- CPLD memory mapping
5
6 The board designers chose to use high address lines for controlling
7 access to the CPLD registers. It turns out to be a big waste
8 because we're using an MMU and must map IO space into virtual
9 memory. The result is that we have to make a mapping for every
10 register.
11
12- Serial Console
13
14 It may be OK not to use the serial console option if the user passes
15 the console device name to the kernel. This deserves some exploration.
diff --git a/Documentation/arm/Sharp-LH/LPD7A40X b/Documentation/arm/Sharp-LH/LPD7A40X
deleted file mode 100644
index 8c29a27e208f..000000000000
--- a/Documentation/arm/Sharp-LH/LPD7A40X
+++ /dev/null
@@ -1,16 +0,0 @@
1README on Implementing Linux for the Logic PD LPD7A40X-10
2=========================================================
3
4- CPLD memory mapping
5
6 The board designers chose to use high address lines for controlling
7 access to the CPLD registers. It turns out to be a big waste
8 because we're using an MMU and must map IO space into virtual
9 memory. The result is that we have to make a mapping for every
10 register.
11
12- Serial Console
13
14 It may be OK not to use the serial console option if the user passes
15 the console device name to the kernel. This deserves some exploration.
16
diff --git a/Documentation/arm/Sharp-LH/SDRAM b/Documentation/arm/Sharp-LH/SDRAM
deleted file mode 100644
index 93ddc23c2faa..000000000000
--- a/Documentation/arm/Sharp-LH/SDRAM
+++ /dev/null
@@ -1,51 +0,0 @@
1README on the SDRAM Controller for the LH7a40X
2==============================================
3
4The standard configuration for the SDRAM controller generates a sparse
5memory array. The precise layout is determined by the SDRAM chips. A
6default kernel configuration assembles the discontiguous memory
7regions into separate memory nodes via the NUMA (Non-Uniform Memory
8Architecture) facilities. In this default configuration, the kernel
9is forgiving about the precise layout. As long as it is given an
10accurate picture of available memory by the bootloader the kernel will
11execute correctly.
12
13The SDRC supports a mode where some of the chip select lines are
14swapped in order to make SDRAM look like a synchronous ROM. Setting
15this bit means that the RAM will present as a contiguous array. Some
16programmers prefer this to the discontiguous layout. Be aware that
17may be a penalty for this feature where some some configurations of
18memory are significantly reduced; i.e. 64MiB of RAM appears as only 32
19MiB.
20
21There are a couple of configuration options to override the default
22behavior. When the SROMLL bit is set and memory appears as a
23contiguous array, there is no reason to support NUMA.
24CONFIG_LH7A40X_CONTIGMEM disables NUMA support. When physical memory
25is discontiguous, the memory tables are organized such that there are
26two banks per nodes with a small gap between them. This layout wastes
27some kernel memory for page tables representing non-existent memory.
28CONFIG_LH7A40X_ONE_BANK_PER_NODE optimizes the node tables such that
29there are no gaps. These options control the low level organization
30of the memory management tables in ways that may prevent the kernel
31from booting or may cause the kernel to allocated excessively large
32page tables. Be warned. Only change these options if you know what
33you are doing. The default behavior is a reasonable compromise that
34will suit all users.
35
36--
37
38A typical 32MiB system with the default configuration options will
39find physical memory managed as follows.
40
41 node 0: 0xc0000000 4MiB
42 0xc1000000 4MiB
43 node 1: 0xc4000000 4MiB
44 0xc5000000 4MiB
45 node 2: 0xc8000000 4MiB
46 0xc9000000 4MiB
47 node 3: 0xcc000000 4MiB
48 0xcd000000 4MiB
49
50Setting CONFIG_LH7A40X_ONE_BANK_PER_NODE will put each bank into a
51separate node.
diff --git a/Documentation/arm/Sharp-LH/VectoredInterruptController b/Documentation/arm/Sharp-LH/VectoredInterruptController
deleted file mode 100644
index 23047e9861ee..000000000000
--- a/Documentation/arm/Sharp-LH/VectoredInterruptController
+++ /dev/null
@@ -1,80 +0,0 @@
1README on the Vectored Interrupt Controller of the LH7A404
2==========================================================
3
4The 404 revision of the LH7A40X series comes with two vectored
5interrupts controllers. While the kernel does use some of the
6features of these devices, it is far from the purpose for which they
7were designed.
8
9When this README was written, the implementation of the VICs was in
10flux. It is possible that some details, especially with priorities,
11will change.
12
13The VIC support code is inspired by routines written by Sharp.
14
15
16Priority Control
17----------------
18
19The significant reason for using the VIC's vectoring is to control
20interrupt priorities. There are two tables in
21arch/arm/mach-lh7a40x/irq-lh7a404.c that look something like this.
22
23 static unsigned char irq_pri_vic1[] = { IRQ_GPIO3INTR, };
24 static unsigned char irq_pri_vic2[] = {
25 IRQ_T3UI, IRQ_GPIO7INTR,
26 IRQ_UART1INTR, IRQ_UART2INTR, IRQ_UART3INTR, };
27
28The initialization code reads these tables and inserts a vector
29address and enable for each indicated IRQ. Vectored interrupts have
30higher priority than non-vectored interrupts. So, on VIC1,
31IRQ_GPIO3INTR will be served before any other non-FIQ interrupt. Due
32to the way that the vectoring works, IRQ_T3UI is the next highest
33priority followed by the other vectored interrupts on VIC2. After
34that, the non-vectored interrupts are scanned in VIC1 then in VIC2.
35
36
37ISR
38---
39
40The interrupt service routine macro get_irqnr() in
41arch/arm/kernel/entry-armv.S scans the VICs for the next active
42interrupt. The vectoring makes this code somewhat larger than it was
43before using vectoring (refer to the LH7A400 implementation). In the
44case where an interrupt is vectored, the implementation will tend to
45be faster than the non-vectored version. However, the worst-case path
46is longer.
47
48It is worth noting that at present, there is no need to read
49VIC2_VECTADDR because the register appears to be shared between the
50controllers. The code is written such that if this changes, it ought
51to still work properly.
52
53
54Vector Addresses
55----------------
56
57The proper use of the vectoring hardware would jump to the ISR
58specified by the vectoring address. Linux isn't structured to take
59advantage of this feature, though it might be possible to change
60things to support it.
61
62In this implementation, the vectoring address is used to speed the
63search for the active IRQ. The address is coded such that the lowest
646 bits store the IRQ number for vectored interrupts. These numbers
65correspond to the bits in the interrupt status registers. IRQ zero is
66the lowest interrupt bit in VIC1. IRQ 32 is the lowest interrupt bit
67in VIC2. Because zero is a valid IRQ number and because we cannot
68detect whether or not there is a valid vectoring address if that
69address is zero, the eigth bit (0x100) is set for vectored interrupts.
70The address for IRQ 0x18 (VIC2) is 0x118. Only the ninth bit is set
71for the default handler on VIC1 and only the tenth bit is set for the
72default handler on VIC2.
73
74In other words.
75
76 0x000 - no active interrupt
77 0x1ii - vectored interrupt 0xii
78 0x2xx - unvectored interrupt on VIC1 (xx is don't care)
79 0x4xx - unvectored interrupt on VIC2 (xx is don't care)
80
diff --git a/Documentation/cgroups/cgroups.txt b/Documentation/cgroups/cgroups.txt
index 44b8b7af8019..cbdfb7d9455b 100644
--- a/Documentation/cgroups/cgroups.txt
+++ b/Documentation/cgroups/cgroups.txt
@@ -349,6 +349,10 @@ To mount a cgroup hierarchy with all available subsystems, type:
349The "xxx" is not interpreted by the cgroup code, but will appear in 349The "xxx" is not interpreted by the cgroup code, but will appear in
350/proc/mounts so may be any useful identifying string that you like. 350/proc/mounts so may be any useful identifying string that you like.
351 351
352Note: Some subsystems do not work without some user input first. For instance,
353if cpusets are enabled the user will have to populate the cpus and mems files
354for each new cgroup created before that group can be used.
355
352To mount a cgroup hierarchy with just the cpuset and memory 356To mount a cgroup hierarchy with just the cpuset and memory
353subsystems, type: 357subsystems, type:
354# mount -t cgroup -o cpuset,memory hier1 /dev/cgroup 358# mount -t cgroup -o cpuset,memory hier1 /dev/cgroup
@@ -426,6 +430,14 @@ You can attach the current shell task by echoing 0:
426 430
427# echo 0 > tasks 431# echo 0 > tasks
428 432
433Note: Since every task is always a member of exactly one cgroup in each
434mounted hierarchy, to remove a task from its current cgroup you must
435move it into a new cgroup (possibly the root cgroup) by writing to the
436new cgroup's tasks file.
437
438Note: If the ns cgroup is active, moving a process to another cgroup can
439fail.
440
4292.3 Mounting hierarchies by name 4412.3 Mounting hierarchies by name
430-------------------------------- 442--------------------------------
431 443
diff --git a/Documentation/devicetree/00-INDEX b/Documentation/devicetree/00-INDEX
new file mode 100644
index 000000000000..b78f691fd847
--- /dev/null
+++ b/Documentation/devicetree/00-INDEX
@@ -0,0 +1,10 @@
1Documentation for device trees, a data structure by which bootloaders pass
2hardware layout to Linux in a device-independent manner, simplifying hardware
3probing. This subsystem is maintained by Grant Likely
4<grant.likely@secretlab.ca> and has a mailing list at
5https://lists.ozlabs.org/listinfo/devicetree-discuss
6
700-INDEX
8 - this file
9booting-without-of.txt
10 - Booting Linux without Open Firmware, describes history and format of device trees.
diff --git a/Documentation/devicetree/bindings/i2c/ce4100-i2c.txt b/Documentation/devicetree/bindings/i2c/ce4100-i2c.txt
new file mode 100644
index 000000000000..569b16248514
--- /dev/null
+++ b/Documentation/devicetree/bindings/i2c/ce4100-i2c.txt
@@ -0,0 +1,93 @@
1CE4100 I2C
2----------
3
4CE4100 has one PCI device which is described as the I2C-Controller. This
5PCI device has three PCI-bars, each bar contains a complete I2C
6controller. So we have a total of three independent I2C-Controllers
7which share only an interrupt line.
8The driver is probed via the PCI-ID and is gathering the information of
9attached devices from the devices tree.
10Grant Likely recommended to use the ranges property to map the PCI-Bar
11number to its physical address and to use this to find the child nodes
12of the specific I2C controller. This were his exact words:
13
14 Here's where the magic happens. Each entry in
15 ranges describes how the parent pci address space
16 (middle group of 3) is translated to the local
17 address space (first group of 2) and the size of
18 each range (last cell). In this particular case,
19 the first cell of the local address is chosen to be
20 1:1 mapped to the BARs, and the second is the
21 offset from be base of the BAR (which would be
22 non-zero if you had 2 or more devices mapped off
23 the same BAR)
24
25 ranges allows the address mapping to be described
26 in a way that the OS can interpret without
27 requiring custom device driver code.
28
29This is an example which is used on FalconFalls:
30------------------------------------------------
31 i2c-controller@b,2 {
32 #address-cells = <2>;
33 #size-cells = <1>;
34 compatible = "pci8086,2e68.2",
35 "pci8086,2e68",
36 "pciclass,ff0000",
37 "pciclass,ff00";
38
39 reg = <0x15a00 0x0 0x0 0x0 0x0>;
40 interrupts = <16 1>;
41
42 /* as described by Grant, the first number in the group of
43 * three is the bar number followed by the 64bit bar address
44 * followed by size of the mapping. The bar address
45 * requires also a valid translation in parents ranges
46 * property.
47 */
48 ranges = <0 0 0x02000000 0 0xdffe0500 0x100
49 1 0 0x02000000 0 0xdffe0600 0x100
50 2 0 0x02000000 0 0xdffe0700 0x100>;
51
52 i2c@0 {
53 #address-cells = <1>;
54 #size-cells = <0>;
55 compatible = "intel,ce4100-i2c-controller";
56
57 /* The first number in the reg property is the
58 * number of the bar
59 */
60 reg = <0 0 0x100>;
61
62 /* This I2C controller has no devices */
63 };
64
65 i2c@1 {
66 #address-cells = <1>;
67 #size-cells = <0>;
68 compatible = "intel,ce4100-i2c-controller";
69 reg = <1 0 0x100>;
70
71 /* This I2C controller has one gpio controller */
72 gpio@26 {
73 #gpio-cells = <2>;
74 compatible = "ti,pcf8575";
75 reg = <0x26>;
76 gpio-controller;
77 };
78 };
79
80 i2c@2 {
81 #address-cells = <1>;
82 #size-cells = <0>;
83 compatible = "intel,ce4100-i2c-controller";
84 reg = <2 0 0x100>;
85
86 gpio@26 {
87 #gpio-cells = <2>;
88 compatible = "ti,pcf8575";
89 reg = <0x26>;
90 gpio-controller;
91 };
92 };
93 };
diff --git a/Documentation/devicetree/bindings/rtc/rtc-cmos.txt b/Documentation/devicetree/bindings/rtc/rtc-cmos.txt
new file mode 100644
index 000000000000..7382989b3052
--- /dev/null
+++ b/Documentation/devicetree/bindings/rtc/rtc-cmos.txt
@@ -0,0 +1,28 @@
1 Motorola mc146818 compatible RTC
2~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3
4Required properties:
5 - compatible : "motorola,mc146818"
6 - reg : should contain registers location and length.
7
8Optional properties:
9 - interrupts : should contain interrupt.
10 - interrupt-parent : interrupt source phandle.
11 - ctrl-reg : Contains the initial value of the control register also
12 called "Register B".
13 - freq-reg : Contains the initial value of the frequency register also
14 called "Regsiter A".
15
16"Register A" and "B" are usually initialized by the firmware (BIOS for
17instance). If this is not done, it can be performed by the driver.
18
19ISA Example:
20
21 rtc@70 {
22 compatible = "motorola,mc146818";
23 interrupts = <8 3>;
24 interrupt-parent = <&ioapic1>;
25 ctrl-reg = <2>;
26 freq-reg = <0x26>;
27 reg = <1 0x70 2>;
28 };
diff --git a/Documentation/devicetree/bindings/serial/altera_jtaguart.txt b/Documentation/devicetree/bindings/serial/altera_jtaguart.txt
new file mode 100644
index 000000000000..c152f65f9a28
--- /dev/null
+++ b/Documentation/devicetree/bindings/serial/altera_jtaguart.txt
@@ -0,0 +1,4 @@
1Altera JTAG UART
2
3Required properties:
4- compatible : should be "ALTR,juart-1.0"
diff --git a/Documentation/devicetree/bindings/serial/altera_uart.txt b/Documentation/devicetree/bindings/serial/altera_uart.txt
new file mode 100644
index 000000000000..71cae3f70100
--- /dev/null
+++ b/Documentation/devicetree/bindings/serial/altera_uart.txt
@@ -0,0 +1,7 @@
1Altera UART
2
3Required properties:
4- compatible : should be "ALTR,uart-1.0"
5
6Optional properties:
7- clock-frequency : frequency of the clock input to the UART
diff --git a/Documentation/devicetree/bindings/serio/altera_ps2.txt b/Documentation/devicetree/bindings/serio/altera_ps2.txt
new file mode 100644
index 000000000000..4d9eecc2ef7d
--- /dev/null
+++ b/Documentation/devicetree/bindings/serio/altera_ps2.txt
@@ -0,0 +1,4 @@
1Altera UP PS/2 controller
2
3Required properties:
4- compatible : should be "ALTR,ps2-1.0".
diff --git a/Documentation/devicetree/bindings/x86/ce4100.txt b/Documentation/devicetree/bindings/x86/ce4100.txt
new file mode 100644
index 000000000000..b49ae593a60b
--- /dev/null
+++ b/Documentation/devicetree/bindings/x86/ce4100.txt
@@ -0,0 +1,38 @@
1CE4100 Device Tree Bindings
2---------------------------
3
4The CE4100 SoC uses for in core peripherals the following compatible
5format: <vendor>,<chip>-<device>.
6Many of the "generic" devices like HPET or IO APIC have the ce4100
7name in their compatible property because they first appeared in this
8SoC.
9
10The CPU node
11------------
12 cpu@0 {
13 device_type = "cpu";
14 compatible = "intel,ce4100";
15 reg = <0>;
16 lapic = <&lapic0>;
17 };
18
19The reg property describes the CPU number. The lapic property points to
20the local APIC timer.
21
22The SoC node
23------------
24
25This node describes the in-core peripherals. Required property:
26 compatible = "intel,ce4100-cp";
27
28The PCI node
29------------
30This node describes the PCI bus on the SoC. Its property should be
31 compatible = "intel,ce4100-pci", "pci";
32
33If the OS is using the IO-APIC for interrupt routing then the reported
34interrupt numbers for devices is no longer true. In order to obtain the
35correct interrupt number, the child node which represents the device has
36to contain the interrupt property. Besides the interrupt property it has
37to contain at least the reg property containing the PCI bus address and
38compatible property according to "PCI Bus Binding Revision 2.1".
diff --git a/Documentation/devicetree/bindings/x86/interrupt.txt b/Documentation/devicetree/bindings/x86/interrupt.txt
new file mode 100644
index 000000000000..7d19f494f19a
--- /dev/null
+++ b/Documentation/devicetree/bindings/x86/interrupt.txt
@@ -0,0 +1,26 @@
1Interrupt chips
2---------------
3
4* Intel I/O Advanced Programmable Interrupt Controller (IO APIC)
5
6 Required properties:
7 --------------------
8 compatible = "intel,ce4100-ioapic";
9 #interrupt-cells = <2>;
10
11 Device's interrupt property:
12
13 interrupts = <P S>;
14
15 The first number (P) represents the interrupt pin which is wired to the
16 IO APIC. The second number (S) represents the sense of interrupt which
17 should be configured and can be one of:
18 0 - Edge Rising
19 1 - Level Low
20 2 - Level High
21 3 - Edge Falling
22
23* Local APIC
24 Required property:
25
26 compatible = "intel,ce4100-lapic";
diff --git a/Documentation/devicetree/bindings/x86/timer.txt b/Documentation/devicetree/bindings/x86/timer.txt
new file mode 100644
index 000000000000..c688af58e3bd
--- /dev/null
+++ b/Documentation/devicetree/bindings/x86/timer.txt
@@ -0,0 +1,6 @@
1Timers
2------
3
4* High Precision Event Timer (HPET)
5 Required property:
6 compatible = "intel,ce4100-hpet";
diff --git a/Documentation/devicetree/booting-without-of.txt b/Documentation/devicetree/booting-without-of.txt
index 28b1c9d3d351..55fd2623445b 100644
--- a/Documentation/devicetree/booting-without-of.txt
+++ b/Documentation/devicetree/booting-without-of.txt
@@ -13,6 +13,7 @@ Table of Contents
13 13
14 I - Introduction 14 I - Introduction
15 1) Entry point for arch/powerpc 15 1) Entry point for arch/powerpc
16 2) Entry point for arch/x86
16 17
17 II - The DT block format 18 II - The DT block format
18 1) Header 19 1) Header
@@ -225,6 +226,25 @@ it with special cases.
225 cannot support both configurations with Book E and configurations 226 cannot support both configurations with Book E and configurations
226 with classic Powerpc architectures. 227 with classic Powerpc architectures.
227 228
2292) Entry point for arch/x86
230-------------------------------
231
232 There is one single 32bit entry point to the kernel at code32_start,
233 the decompressor (the real mode entry point goes to the same 32bit
234 entry point once it switched into protected mode). That entry point
235 supports one calling convention which is documented in
236 Documentation/x86/boot.txt
237 The physical pointer to the device-tree block (defined in chapter II)
238 is passed via setup_data which requires at least boot protocol 2.09.
239 The type filed is defined as
240
241 #define SETUP_DTB 2
242
243 This device-tree is used as an extension to the "boot page". As such it
244 does not parse / consider data which is already covered by the boot
245 page. This includes memory size, reserved ranges, command line arguments
246 or initrd address. It simply holds information which can not be retrieved
247 otherwise like interrupt routing or a list of devices behind an I2C bus.
228 248
229II - The DT block format 249II - The DT block format
230======================== 250========================
diff --git a/Documentation/dynamic-debug-howto.txt b/Documentation/dynamic-debug-howto.txt
index 58ea64a96165..e6c4b757025b 100644
--- a/Documentation/dynamic-debug-howto.txt
+++ b/Documentation/dynamic-debug-howto.txt
@@ -205,12 +205,20 @@ of the characters:
205 205
206The flags are: 206The flags are:
207 207
208f
209 Include the function name in the printed message
210l
211 Include line number in the printed message
212m
213 Include module name in the printed message
208p 214p
209 Causes a printk() message to be emitted to dmesg 215 Causes a printk() message to be emitted to dmesg
216t
217 Include thread ID in messages not generated from interrupt context
210 218
211Note the regexp ^[-+=][scp]+$ matches a flags specification. 219Note the regexp ^[-+=][flmpt]+$ matches a flags specification.
212Note also that there is no convenient syntax to remove all 220Note also that there is no convenient syntax to remove all
213the flags at once, you need to use "-psc". 221the flags at once, you need to use "-flmpt".
214 222
215 223
216Debug messages during boot process 224Debug messages during boot process
diff --git a/Documentation/feature-removal-schedule.txt b/Documentation/feature-removal-schedule.txt
index b3f35e5f9c95..f487c6918d78 100644
--- a/Documentation/feature-removal-schedule.txt
+++ b/Documentation/feature-removal-schedule.txt
@@ -35,6 +35,17 @@ Who: Luis R. Rodriguez <lrodriguez@atheros.com>
35 35
36--------------------------- 36---------------------------
37 37
38What: AR9170USB
39When: 2.6.40
40
41Why: This driver is deprecated and the firmware is no longer
42 maintained. The replacement driver "carl9170" has been
43 around for a while, so the devices are still supported.
44
45Who: Christian Lamparter <chunkeey@googlemail.com>
46
47---------------------------
48
38What: IRQF_SAMPLE_RANDOM 49What: IRQF_SAMPLE_RANDOM
39Check: IRQF_SAMPLE_RANDOM 50Check: IRQF_SAMPLE_RANDOM
40When: July 2009 51When: July 2009
@@ -604,6 +615,13 @@ Who: Jean Delvare <khali@linux-fr.org>
604 615
605---------------------------- 616----------------------------
606 617
618What: xt_connlimit rev 0
619When: 2012
620Who: Jan Engelhardt <jengelh@medozas.de>
621Files: net/netfilter/xt_connlimit.c
622
623----------------------------
624
607What: noswapaccount kernel command line parameter 625What: noswapaccount kernel command line parameter
608When: 2.6.40 626When: 2.6.40
609Why: The original implementation of memsw feature enabled by 627Why: The original implementation of memsw feature enabled by
@@ -619,3 +637,11 @@ Why: The original implementation of memsw feature enabled by
619Who: Michal Hocko <mhocko@suse.cz> 637Who: Michal Hocko <mhocko@suse.cz>
620 638
621---------------------------- 639----------------------------
640
641What: ipt_addrtype match include file
642When: 2012
643Why: superseded by xt_addrtype
644Who: Florian Westphal <fw@strlen.de>
645Files: include/linux/netfilter_ipv4/ipt_addrtype.h
646
647----------------------------
diff --git a/Documentation/filesystems/Locking b/Documentation/filesystems/Locking
index 4471a416c274..2e994efe12cb 100644
--- a/Documentation/filesystems/Locking
+++ b/Documentation/filesystems/Locking
@@ -166,13 +166,11 @@ prototypes:
166 void (*kill_sb) (struct super_block *); 166 void (*kill_sb) (struct super_block *);
167locking rules: 167locking rules:
168 may block 168 may block
169get_sb yes
170mount yes 169mount yes
171kill_sb yes 170kill_sb yes
172 171
173->get_sb() returns error or 0 with locked superblock attached to the vfsmount 172->mount() returns ERR_PTR or the root dentry; its superblock should be locked
174(exclusive on ->s_umount). 173on return.
175->mount() returns ERR_PTR or the root dentry.
176->kill_sb() takes a write-locked superblock, does all shutdown work on it, 174->kill_sb() takes a write-locked superblock, does all shutdown work on it,
177unlocks and drops the reference. 175unlocks and drops the reference.
178 176
diff --git a/Documentation/filesystems/porting b/Documentation/filesystems/porting
index dfbcd1b00b0a..0c986c9e8519 100644
--- a/Documentation/filesystems/porting
+++ b/Documentation/filesystems/porting
@@ -394,3 +394,10 @@ file) you must return -EOPNOTSUPP if FALLOC_FL_PUNCH_HOLE is set in mode.
394Currently you can only have FALLOC_FL_PUNCH_HOLE with FALLOC_FL_KEEP_SIZE set, 394Currently you can only have FALLOC_FL_PUNCH_HOLE with FALLOC_FL_KEEP_SIZE set,
395so the i_size should not change when hole punching, even when puching the end of 395so the i_size should not change when hole punching, even when puching the end of
396a file off. 396a file off.
397
398--
399[mandatory]
400 ->get_sb() is gone. Switch to use of ->mount(). Typically it's just
401a matter of switching from calling get_sb_... to mount_... and changing the
402function type. If you were doing it manually, just switch from setting ->mnt_root
403to some pointer to returning that pointer. On errors return ERR_PTR(...).
diff --git a/Documentation/filesystems/sysfs.txt b/Documentation/filesystems/sysfs.txt
index 5d1335faec2d..f806e50aaa63 100644
--- a/Documentation/filesystems/sysfs.txt
+++ b/Documentation/filesystems/sysfs.txt
@@ -39,10 +39,12 @@ userspace. Top-level directories in sysfs represent the common
39ancestors of object hierarchies; i.e. the subsystems the objects 39ancestors of object hierarchies; i.e. the subsystems the objects
40belong to. 40belong to.
41 41
42Sysfs internally stores the kobject that owns the directory in the 42Sysfs internally stores a pointer to the kobject that implements a
43->d_fsdata pointer of the directory's dentry. This allows sysfs to do 43directory in the sysfs_dirent object associated with the directory. In
44reference counting directly on the kobject when the file is opened and 44the past this kobject pointer has been used by sysfs to do reference
45closed. 45counting directly on the kobject whenever the file is opened or closed.
46With the current sysfs implementation the kobject reference count is
47only modified directly by the function sysfs_schedule_callback().
46 48
47 49
48Attributes 50Attributes
@@ -208,9 +210,9 @@ Other notes:
208 is 4096. 210 is 4096.
209 211
210- show() methods should return the number of bytes printed into the 212- show() methods should return the number of bytes printed into the
211 buffer. This is the return value of snprintf(). 213 buffer. This is the return value of scnprintf().
212 214
213- show() should always use snprintf(). 215- show() should always use scnprintf().
214 216
215- store() should return the number of bytes used from the buffer. If the 217- store() should return the number of bytes used from the buffer. If the
216 entire buffer has been used, just return the count argument. 218 entire buffer has been used, just return the count argument.
@@ -229,7 +231,7 @@ A very simple (and naive) implementation of a device attribute is:
229static ssize_t show_name(struct device *dev, struct device_attribute *attr, 231static ssize_t show_name(struct device *dev, struct device_attribute *attr,
230 char *buf) 232 char *buf)
231{ 233{
232 return snprintf(buf, PAGE_SIZE, "%s\n", dev->name); 234 return scnprintf(buf, PAGE_SIZE, "%s\n", dev->name);
233} 235}
234 236
235static ssize_t store_name(struct device *dev, struct device_attribute *attr, 237static ssize_t store_name(struct device *dev, struct device_attribute *attr,
diff --git a/Documentation/filesystems/vfs.txt b/Documentation/filesystems/vfs.txt
index 94cf97b901d7..ef0714aa8e40 100644
--- a/Documentation/filesystems/vfs.txt
+++ b/Documentation/filesystems/vfs.txt
@@ -95,10 +95,11 @@ functions:
95 extern int unregister_filesystem(struct file_system_type *); 95 extern int unregister_filesystem(struct file_system_type *);
96 96
97The passed struct file_system_type describes your filesystem. When a 97The passed struct file_system_type describes your filesystem. When a
98request is made to mount a device onto a directory in your filespace, 98request is made to mount a filesystem onto a directory in your namespace,
99the VFS will call the appropriate get_sb() method for the specific 99the VFS will call the appropriate mount() method for the specific
100filesystem. The dentry for the mount point will then be updated to 100filesystem. New vfsmount refering to the tree returned by ->mount()
101point to the root inode for the new filesystem. 101will be attached to the mountpoint, so that when pathname resolution
102reaches the mountpoint it will jump into the root of that vfsmount.
102 103
103You can see all filesystems that are registered to the kernel in the 104You can see all filesystems that are registered to the kernel in the
104file /proc/filesystems. 105file /proc/filesystems.
@@ -107,14 +108,14 @@ file /proc/filesystems.
107struct file_system_type 108struct file_system_type
108----------------------- 109-----------------------
109 110
110This describes the filesystem. As of kernel 2.6.22, the following 111This describes the filesystem. As of kernel 2.6.39, the following
111members are defined: 112members are defined:
112 113
113struct file_system_type { 114struct file_system_type {
114 const char *name; 115 const char *name;
115 int fs_flags; 116 int fs_flags;
116 int (*get_sb) (struct file_system_type *, int, 117 struct dentry (*mount) (struct file_system_type *, int,
117 const char *, void *, struct vfsmount *); 118 const char *, void *);
118 void (*kill_sb) (struct super_block *); 119 void (*kill_sb) (struct super_block *);
119 struct module *owner; 120 struct module *owner;
120 struct file_system_type * next; 121 struct file_system_type * next;
@@ -128,11 +129,11 @@ struct file_system_type {
128 129
129 fs_flags: various flags (i.e. FS_REQUIRES_DEV, FS_NO_DCACHE, etc.) 130 fs_flags: various flags (i.e. FS_REQUIRES_DEV, FS_NO_DCACHE, etc.)
130 131
131 get_sb: the method to call when a new instance of this 132 mount: the method to call when a new instance of this
132 filesystem should be mounted 133 filesystem should be mounted
133 134
134 kill_sb: the method to call when an instance of this filesystem 135 kill_sb: the method to call when an instance of this filesystem
135 should be unmounted 136 should be shut down
136 137
137 owner: for internal VFS use: you should initialize this to THIS_MODULE in 138 owner: for internal VFS use: you should initialize this to THIS_MODULE in
138 most cases. 139 most cases.
@@ -141,7 +142,7 @@ struct file_system_type {
141 142
142 s_lock_key, s_umount_key: lockdep-specific 143 s_lock_key, s_umount_key: lockdep-specific
143 144
144The get_sb() method has the following arguments: 145The mount() method has the following arguments:
145 146
146 struct file_system_type *fs_type: describes the filesystem, partly initialized 147 struct file_system_type *fs_type: describes the filesystem, partly initialized
147 by the specific filesystem code 148 by the specific filesystem code
@@ -153,32 +154,39 @@ The get_sb() method has the following arguments:
153 void *data: arbitrary mount options, usually comes as an ASCII 154 void *data: arbitrary mount options, usually comes as an ASCII
154 string (see "Mount Options" section) 155 string (see "Mount Options" section)
155 156
156 struct vfsmount *mnt: a vfs-internal representation of a mount point 157The mount() method must return the root dentry of the tree requested by
158caller. An active reference to its superblock must be grabbed and the
159superblock must be locked. On failure it should return ERR_PTR(error).
157 160
158The get_sb() method must determine if the block device specified 161The arguments match those of mount(2) and their interpretation
159in the dev_name and fs_type contains a filesystem of the type the method 162depends on filesystem type. E.g. for block filesystems, dev_name is
160supports. If it succeeds in opening the named block device, it initializes a 163interpreted as block device name, that device is opened and if it
161struct super_block descriptor for the filesystem contained by the block device. 164contains a suitable filesystem image the method creates and initializes
162On failure it returns an error. 165struct super_block accordingly, returning its root dentry to caller.
166
167->mount() may choose to return a subtree of existing filesystem - it
168doesn't have to create a new one. The main result from the caller's
169point of view is a reference to dentry at the root of (sub)tree to
170be attached; creation of new superblock is a common side effect.
163 171
164The most interesting member of the superblock structure that the 172The most interesting member of the superblock structure that the
165get_sb() method fills in is the "s_op" field. This is a pointer to 173mount() method fills in is the "s_op" field. This is a pointer to
166a "struct super_operations" which describes the next level of the 174a "struct super_operations" which describes the next level of the
167filesystem implementation. 175filesystem implementation.
168 176
169Usually, a filesystem uses one of the generic get_sb() implementations 177Usually, a filesystem uses one of the generic mount() implementations
170and provides a fill_super() method instead. The generic methods are: 178and provides a fill_super() callback instead. The generic variants are:
171 179
172 get_sb_bdev: mount a filesystem residing on a block device 180 mount_bdev: mount a filesystem residing on a block device
173 181
174 get_sb_nodev: mount a filesystem that is not backed by a device 182 mount_nodev: mount a filesystem that is not backed by a device
175 183
176 get_sb_single: mount a filesystem which shares the instance between 184 mount_single: mount a filesystem which shares the instance between
177 all mounts 185 all mounts
178 186
179A fill_super() method implementation has the following arguments: 187A fill_super() callback implementation has the following arguments:
180 188
181 struct super_block *sb: the superblock structure. The method fill_super() 189 struct super_block *sb: the superblock structure. The callback
182 must initialize this properly. 190 must initialize this properly.
183 191
184 void *data: arbitrary mount options, usually comes as an ASCII 192 void *data: arbitrary mount options, usually comes as an ASCII
diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt
index f4a04c0c7edc..738c6fda3fb0 100644
--- a/Documentation/kernel-parameters.txt
+++ b/Documentation/kernel-parameters.txt
@@ -2444,6 +2444,10 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
2444 <deci-seconds>: poll all this frequency 2444 <deci-seconds>: poll all this frequency
2445 0: no polling (default) 2445 0: no polling (default)
2446 2446
2447 threadirqs [KNL]
2448 Force threading of all interrupt handlers except those
2449 marked explicitely IRQF_NO_THREAD.
2450
2447 topology= [S390] 2451 topology= [S390]
2448 Format: {off | on} 2452 Format: {off | on}
2449 Specify if the kernel should make use of the cpu 2453 Specify if the kernel should make use of the cpu
diff --git a/Documentation/keys-request-key.txt b/Documentation/keys-request-key.txt
index 09b55e461740..69686ad12c66 100644
--- a/Documentation/keys-request-key.txt
+++ b/Documentation/keys-request-key.txt
@@ -127,14 +127,15 @@ This is because process A's keyrings can't simply be attached to
127of them, and (b) it requires the same UID/GID/Groups all the way through. 127of them, and (b) it requires the same UID/GID/Groups all the way through.
128 128
129 129
130====================== 130====================================
131NEGATIVE INSTANTIATION 131NEGATIVE INSTANTIATION AND REJECTION
132====================== 132====================================
133 133
134Rather than instantiating a key, it is possible for the possessor of an 134Rather than instantiating a key, it is possible for the possessor of an
135authorisation key to negatively instantiate a key that's under construction. 135authorisation key to negatively instantiate a key that's under construction.
136This is a short duration placeholder that causes any attempt at re-requesting 136This is a short duration placeholder that causes any attempt at re-requesting
137the key whilst it exists to fail with error ENOKEY. 137the key whilst it exists to fail with error ENOKEY if negated or the specified
138error if rejected.
138 139
139This is provided to prevent excessive repeated spawning of /sbin/request-key 140This is provided to prevent excessive repeated spawning of /sbin/request-key
140processes for a key that will never be obtainable. 141processes for a key that will never be obtainable.
diff --git a/Documentation/keys.txt b/Documentation/keys.txt
index e4dbbdb1bd96..6523a9e6f293 100644
--- a/Documentation/keys.txt
+++ b/Documentation/keys.txt
@@ -637,6 +637,9 @@ The keyctl syscall functions are:
637 long keyctl(KEYCTL_INSTANTIATE, key_serial_t key, 637 long keyctl(KEYCTL_INSTANTIATE, key_serial_t key,
638 const void *payload, size_t plen, 638 const void *payload, size_t plen,
639 key_serial_t keyring); 639 key_serial_t keyring);
640 long keyctl(KEYCTL_INSTANTIATE_IOV, key_serial_t key,
641 const struct iovec *payload_iov, unsigned ioc,
642 key_serial_t keyring);
640 643
641 If the kernel calls back to userspace to complete the instantiation of a 644 If the kernel calls back to userspace to complete the instantiation of a
642 key, userspace should use this call to supply data for the key before the 645 key, userspace should use this call to supply data for the key before the
@@ -652,11 +655,16 @@ The keyctl syscall functions are:
652 655
653 The payload and plen arguments describe the payload data as for add_key(). 656 The payload and plen arguments describe the payload data as for add_key().
654 657
658 The payload_iov and ioc arguments describe the payload data in an iovec
659 array instead of a single buffer.
660
655 661
656 (*) Negatively instantiate a partially constructed key. 662 (*) Negatively instantiate a partially constructed key.
657 663
658 long keyctl(KEYCTL_NEGATE, key_serial_t key, 664 long keyctl(KEYCTL_NEGATE, key_serial_t key,
659 unsigned timeout, key_serial_t keyring); 665 unsigned timeout, key_serial_t keyring);
666 long keyctl(KEYCTL_REJECT, key_serial_t key,
667 unsigned timeout, unsigned error, key_serial_t keyring);
660 668
661 If the kernel calls back to userspace to complete the instantiation of a 669 If the kernel calls back to userspace to complete the instantiation of a
662 key, userspace should use this call mark the key as negative before the 670 key, userspace should use this call mark the key as negative before the
@@ -669,6 +677,10 @@ The keyctl syscall functions are:
669 that keyring, however all the constraints applying in KEYCTL_LINK apply in 677 that keyring, however all the constraints applying in KEYCTL_LINK apply in
670 this case too. 678 this case too.
671 679
680 If the key is rejected, future searches for it will return the specified
681 error code until the rejected key expires. Negating the key is the same
682 as rejecting the key with ENOKEY as the error code.
683
672 684
673 (*) Set the default request-key destination keyring. 685 (*) Set the default request-key destination keyring.
674 686
@@ -1062,6 +1074,13 @@ The structure has a number of fields, some of which are mandatory:
1062 viable. 1074 viable.
1063 1075
1064 1076
1077 (*) int (*vet_description)(const char *description);
1078
1079 This optional method is called to vet a key description. If the key type
1080 doesn't approve of the key description, it may return an error, otherwise
1081 it should return 0.
1082
1083
1065 (*) int (*instantiate)(struct key *key, const void *data, size_t datalen); 1084 (*) int (*instantiate)(struct key *key, const void *data, size_t datalen);
1066 1085
1067 This method is called to attach a payload to a key during construction. 1086 This method is called to attach a payload to a key during construction.
@@ -1231,10 +1250,11 @@ hand the request off to (perhaps a path held in placed in another key by, for
1231example, the KDE desktop manager). 1250example, the KDE desktop manager).
1232 1251
1233The program (or whatever it calls) should finish construction of the key by 1252The program (or whatever it calls) should finish construction of the key by
1234calling KEYCTL_INSTANTIATE, which also permits it to cache the key in one of 1253calling KEYCTL_INSTANTIATE or KEYCTL_INSTANTIATE_IOV, which also permits it to
1235the keyrings (probably the session ring) before returning. Alternatively, the 1254cache the key in one of the keyrings (probably the session ring) before
1236key can be marked as negative with KEYCTL_NEGATE; this also permits the key to 1255returning. Alternatively, the key can be marked as negative with KEYCTL_NEGATE
1237be cached in one of the keyrings. 1256or KEYCTL_REJECT; this also permits the key to be cached in one of the
1257keyrings.
1238 1258
1239If it returns with the key remaining in the unconstructed state, the key will 1259If it returns with the key remaining in the unconstructed state, the key will
1240be marked as being negative, it will be added to the session keyring, and an 1260be marked as being negative, it will be added to the session keyring, and an
diff --git a/Documentation/kref.txt b/Documentation/kref.txt
index ae203f91ee9b..48ba715d5a63 100644
--- a/Documentation/kref.txt
+++ b/Documentation/kref.txt
@@ -156,7 +156,7 @@ static struct my_data *get_entry()
156 struct my_data *entry = NULL; 156 struct my_data *entry = NULL;
157 mutex_lock(&mutex); 157 mutex_lock(&mutex);
158 if (!list_empty(&q)) { 158 if (!list_empty(&q)) {
159 entry = container_of(q.next, struct my_q_entry, link); 159 entry = container_of(q.next, struct my_data, link);
160 kref_get(&entry->refcount); 160 kref_get(&entry->refcount);
161 } 161 }
162 mutex_unlock(&mutex); 162 mutex_unlock(&mutex);
diff --git a/Documentation/memory-barriers.txt b/Documentation/memory-barriers.txt
index 631ad2f1b229..f0d3a8026a56 100644
--- a/Documentation/memory-barriers.txt
+++ b/Documentation/memory-barriers.txt
@@ -21,6 +21,7 @@ Contents:
21 - SMP barrier pairing. 21 - SMP barrier pairing.
22 - Examples of memory barrier sequences. 22 - Examples of memory barrier sequences.
23 - Read memory barriers vs load speculation. 23 - Read memory barriers vs load speculation.
24 - Transitivity
24 25
25 (*) Explicit kernel barriers. 26 (*) Explicit kernel barriers.
26 27
@@ -959,6 +960,63 @@ the speculation will be cancelled and the value reloaded:
959 retrieved : : +-------+ 960 retrieved : : +-------+
960 961
961 962
963TRANSITIVITY
964------------
965
966Transitivity is a deeply intuitive notion about ordering that is not
967always provided by real computer systems. The following example
968demonstrates transitivity (also called "cumulativity"):
969
970 CPU 1 CPU 2 CPU 3
971 ======================= ======================= =======================
972 { X = 0, Y = 0 }
973 STORE X=1 LOAD X STORE Y=1
974 <general barrier> <general barrier>
975 LOAD Y LOAD X
976
977Suppose that CPU 2's load from X returns 1 and its load from Y returns 0.
978This indicates that CPU 2's load from X in some sense follows CPU 1's
979store to X and that CPU 2's load from Y in some sense preceded CPU 3's
980store to Y. The question is then "Can CPU 3's load from X return 0?"
981
982Because CPU 2's load from X in some sense came after CPU 1's store, it
983is natural to expect that CPU 3's load from X must therefore return 1.
984This expectation is an example of transitivity: if a load executing on
985CPU A follows a load from the same variable executing on CPU B, then
986CPU A's load must either return the same value that CPU B's load did,
987or must return some later value.
988
989In the Linux kernel, use of general memory barriers guarantees
990transitivity. Therefore, in the above example, if CPU 2's load from X
991returns 1 and its load from Y returns 0, then CPU 3's load from X must
992also return 1.
993
994However, transitivity is -not- guaranteed for read or write barriers.
995For example, suppose that CPU 2's general barrier in the above example
996is changed to a read barrier as shown below:
997
998 CPU 1 CPU 2 CPU 3
999 ======================= ======================= =======================
1000 { X = 0, Y = 0 }
1001 STORE X=1 LOAD X STORE Y=1
1002 <read barrier> <general barrier>
1003 LOAD Y LOAD X
1004
1005This substitution destroys transitivity: in this example, it is perfectly
1006legal for CPU 2's load from X to return 1, its load from Y to return 0,
1007and CPU 3's load from X to return 0.
1008
1009The key point is that although CPU 2's read barrier orders its pair
1010of loads, it does not guarantee to order CPU 1's store. Therefore, if
1011this example runs on a system where CPUs 1 and 2 share a store buffer
1012or a level of cache, CPU 2 might have early access to CPU 1's writes.
1013General barriers are therefore required to ensure that all CPUs agree
1014on the combined order of CPU 1's and CPU 2's accesses.
1015
1016To reiterate, if your code requires transitivity, use general barriers
1017throughout.
1018
1019
962======================== 1020========================
963EXPLICIT KERNEL BARRIERS 1021EXPLICIT KERNEL BARRIERS
964======================== 1022========================
diff --git a/Documentation/memory-hotplug.txt b/Documentation/memory-hotplug.txt
index 57e7e9cc1870..8f485d72cf25 100644
--- a/Documentation/memory-hotplug.txt
+++ b/Documentation/memory-hotplug.txt
@@ -126,36 +126,51 @@ config options.
126-------------------------------- 126--------------------------------
1274 sysfs files for memory hotplug 1274 sysfs files for memory hotplug
128-------------------------------- 128--------------------------------
129All sections have their device information under /sys/devices/system/memory as 129All sections have their device information in sysfs. Each section is part of
130a memory block under /sys/devices/system/memory as
130 131
131/sys/devices/system/memory/memoryXXX 132/sys/devices/system/memory/memoryXXX
132(XXX is section id.) 133(XXX is the section id.)
133 134
134Now, XXX is defined as start_address_of_section / section_size. 135Now, XXX is defined as (start_address_of_section / section_size) of the first
136section contained in the memory block. The files 'phys_index' and
137'end_phys_index' under each directory report the beginning and end section id's
138for the memory block covered by the sysfs directory. It is expected that all
139memory sections in this range are present and no memory holes exist in the
140range. Currently there is no way to determine if there is a memory hole, but
141the existence of one should not affect the hotplug capabilities of the memory
142block.
135 143
136For example, assume 1GiB section size. A device for a memory starting at 144For example, assume 1GiB section size. A device for a memory starting at
1370x100000000 is /sys/device/system/memory/memory4 1450x100000000 is /sys/device/system/memory/memory4
138(0x100000000 / 1Gib = 4) 146(0x100000000 / 1Gib = 4)
139This device covers address range [0x100000000 ... 0x140000000) 147This device covers address range [0x100000000 ... 0x140000000)
140 148
141Under each section, you can see 4 files. 149Under each section, you can see 4 or 5 files, the end_phys_index file being
150a recent addition and not present on older kernels.
142 151
143/sys/devices/system/memory/memoryXXX/phys_index 152/sys/devices/system/memory/memoryXXX/start_phys_index
153/sys/devices/system/memory/memoryXXX/end_phys_index
144/sys/devices/system/memory/memoryXXX/phys_device 154/sys/devices/system/memory/memoryXXX/phys_device
145/sys/devices/system/memory/memoryXXX/state 155/sys/devices/system/memory/memoryXXX/state
146/sys/devices/system/memory/memoryXXX/removable 156/sys/devices/system/memory/memoryXXX/removable
147 157
148'phys_index' : read-only and contains section id, same as XXX. 158'phys_index' : read-only and contains section id of the first section
149'state' : read-write 159 in the memory block, same as XXX.
150 at read: contains online/offline state of memory. 160'end_phys_index' : read-only and contains section id of the last section
151 at write: user can specify "online", "offline" command 161 in the memory block.
152'phys_device': read-only: designed to show the name of physical memory device. 162'state' : read-write
153 This is not well implemented now. 163 at read: contains online/offline state of memory.
154'removable' : read-only: contains an integer value indicating 164 at write: user can specify "online", "offline" command
155 whether the memory section is removable or not 165 which will be performed on al sections in the block.
156 removable. A value of 1 indicates that the memory 166'phys_device' : read-only: designed to show the name of physical memory
157 section is removable and a value of 0 indicates that 167 device. This is not well implemented now.
158 it is not removable. 168'removable' : read-only: contains an integer value indicating
169 whether the memory block is removable or not
170 removable. A value of 1 indicates that the memory
171 block is removable and a value of 0 indicates that
172 it is not removable. A memory block is removable only if
173 every section in the block is removable.
159 174
160NOTE: 175NOTE:
161 These directories/files appear after physical memory hotplug phase. 176 These directories/files appear after physical memory hotplug phase.
diff --git a/Documentation/networking/batman-adv.txt b/Documentation/networking/batman-adv.txt
index 77f0cdd5b0dd..18afcd8afd51 100644
--- a/Documentation/networking/batman-adv.txt
+++ b/Documentation/networking/batman-adv.txt
@@ -1,4 +1,4 @@
1[state: 21-11-2010] 1[state: 27-01-2011]
2 2
3BATMAN-ADV 3BATMAN-ADV
4---------- 4----------
@@ -67,15 +67,16 @@ All mesh wide settings can be found in batman's own interface
67folder: 67folder:
68 68
69# ls /sys/class/net/bat0/mesh/ 69# ls /sys/class/net/bat0/mesh/
70# aggregated_ogms bonding fragmentation orig_interval 70# aggregated_ogms gw_bandwidth hop_penalty
71# vis_mode 71# bonding gw_mode orig_interval
72# fragmentation gw_sel_class vis_mode
72 73
73 74
74There is a special folder for debugging informations: 75There is a special folder for debugging informations:
75 76
76# ls /sys/kernel/debug/batman_adv/bat0/ 77# ls /sys/kernel/debug/batman_adv/bat0/
77# originators socket transtable_global transtable_local 78# gateways socket transtable_global vis_data
78# vis_data 79# originators softif_neigh transtable_local
79 80
80 81
81Some of the files contain all sort of status information regard- 82Some of the files contain all sort of status information regard-
@@ -230,9 +231,8 @@ CONTACT
230Please send us comments, experiences, questions, anything :) 231Please send us comments, experiences, questions, anything :)
231 232
232IRC: #batman on irc.freenode.org 233IRC: #batman on irc.freenode.org
233Mailing-list: b.a.t.m.a.n@b.a.t.m.a.n@lists.open-mesh.org 234Mailing-list: b.a.t.m.a.n@open-mesh.org (optional subscription
234 (optional subscription at 235 at https://lists.open-mesh.org/mm/listinfo/b.a.t.m.a.n)
235 https://lists.open-mesh.org/mm/listinfo/b.a.t.m.a.n)
236 236
237You can also contact the Authors: 237You can also contact the Authors:
238 238
diff --git a/Documentation/networking/bonding.txt b/Documentation/networking/bonding.txt
index 25d2f4141d27..b36e741e94db 100644
--- a/Documentation/networking/bonding.txt
+++ b/Documentation/networking/bonding.txt
@@ -2558,18 +2558,15 @@ enslaved.
255816. Resources and Links 255816. Resources and Links
2559======================= 2559=======================
2560 2560
2561The latest version of the bonding driver can be found in the latest 2561 The latest version of the bonding driver can be found in the latest
2562version of the linux kernel, found on http://kernel.org 2562version of the linux kernel, found on http://kernel.org
2563 2563
2564The latest version of this document can be found in either the latest 2564 The latest version of this document can be found in the latest kernel
2565kernel source (named Documentation/networking/bonding.txt), or on the 2565source (named Documentation/networking/bonding.txt).
2566bonding sourceforge site:
2567 2566
2568http://www.sourceforge.net/projects/bonding 2567 Discussions regarding the usage of the bonding driver take place on the
2569 2568bonding-devel mailing list, hosted at sourceforge.net. If you have questions or
2570Discussions regarding the bonding driver take place primarily on the 2569problems, post them to the list. The list address is:
2571bonding-devel mailing list, hosted at sourceforge.net. If you have
2572questions or problems, post them to the list. The list address is:
2573 2570
2574bonding-devel@lists.sourceforge.net 2571bonding-devel@lists.sourceforge.net
2575 2572
@@ -2578,6 +2575,17 @@ be found at:
2578 2575
2579https://lists.sourceforge.net/lists/listinfo/bonding-devel 2576https://lists.sourceforge.net/lists/listinfo/bonding-devel
2580 2577
2578 Discussions regarding the developpement of the bonding driver take place
2579on the main Linux network mailing list, hosted at vger.kernel.org. The list
2580address is:
2581
2582netdev@vger.kernel.org
2583
2584 The administrative interface (to subscribe or unsubscribe) can
2585be found at:
2586
2587http://vger.kernel.org/vger-lists.html#netdev
2588
2581Donald Becker's Ethernet Drivers and diag programs may be found at : 2589Donald Becker's Ethernet Drivers and diag programs may be found at :
2582 - http://web.archive.org/web/*/http://www.scyld.com/network/ 2590 - http://web.archive.org/web/*/http://www.scyld.com/network/
2583 2591
diff --git a/Documentation/networking/ip-sysctl.txt b/Documentation/networking/ip-sysctl.txt
index ac3b4a726a1a..d3d653a5f9b9 100644
--- a/Documentation/networking/ip-sysctl.txt
+++ b/Documentation/networking/ip-sysctl.txt
@@ -280,6 +280,17 @@ tcp_max_orphans - INTEGER
280 more aggressively. Let me to remind again: each orphan eats 280 more aggressively. Let me to remind again: each orphan eats
281 up to ~64K of unswappable memory. 281 up to ~64K of unswappable memory.
282 282
283tcp_max_ssthresh - INTEGER
284 Limited Slow-Start for TCP with large congestion windows (cwnd) defined in
285 RFC3742. Limited slow-start is a mechanism to limit growth of the cwnd
286 on the region where cwnd is larger than tcp_max_ssthresh. TCP increases cwnd
287 by at most tcp_max_ssthresh segments, and by at least tcp_max_ssthresh/2
288 segments per RTT when the cwnd is above tcp_max_ssthresh.
289 If TCP connection increased cwnd to thousands (or tens of thousands) segments,
290 and thousands of packets were being dropped during slow-start, you can set
291 tcp_max_ssthresh to improve performance for new TCP connection.
292 Default: 0 (off)
293
283tcp_max_syn_backlog - INTEGER 294tcp_max_syn_backlog - INTEGER
284 Maximal number of remembered connection requests, which are 295 Maximal number of remembered connection requests, which are
285 still did not receive an acknowledgment from connecting client. 296 still did not receive an acknowledgment from connecting client.
diff --git a/Documentation/networking/phonet.txt b/Documentation/networking/phonet.txt
index 24ad2adba6e5..81003581f47a 100644
--- a/Documentation/networking/phonet.txt
+++ b/Documentation/networking/phonet.txt
@@ -154,9 +154,28 @@ connections, one per accept()'d socket.
154 write(cfd, msg, msglen); 154 write(cfd, msg, msglen);
155 } 155 }
156 156
157Connections are established between two endpoints by a "third party" 157Connections are traditionally established between two endpoints by a
158application. This means that both endpoints are passive; so connect() 158"third party" application. This means that both endpoints are passive.
159is not possible. 159
160
161As of Linux kernel version 2.6.39, it is also possible to connect
162two endpoints directly, using connect() on the active side. This is
163intended to support the newer Nokia Wireless Modem API, as found in
164e.g. the Nokia Slim Modem in the ST-Ericsson U8500 platform:
165
166 struct sockaddr_spn spn;
167 int fd;
168
169 fd = socket(PF_PHONET, SOCK_SEQPACKET, PN_PROTO_PIPE);
170 memset(&spn, 0, sizeof(spn));
171 spn.spn_family = AF_PHONET;
172 spn.spn_obj = ...;
173 spn.spn_dev = ...;
174 spn.spn_resource = 0xD9;
175 connect(fd, (struct sockaddr *)&spn, sizeof(spn));
176 /* normal I/O here ... */
177 close(fd);
178
160 179
161WARNING: 180WARNING:
162When polling a connected pipe socket for writability, there is an 181When polling a connected pipe socket for writability, there is an
@@ -181,45 +200,9 @@ The pipe protocol provides two socket options at the SOL_PNPIPE level:
181 interface index of the network interface created by PNPIPE_ENCAP, 200 interface index of the network interface created by PNPIPE_ENCAP,
182 or zero if encapsulation is off. 201 or zero if encapsulation is off.
183 202
184 203 PNPIPE_HANDLE is a read-only integer value. It contains the underlying
185Phonet Pipe-controller Implementation 204 identifier ("pipe handle") of the pipe. This is only defined for
186------------------------------------- 205 socket descriptors that are already connected or being connected.
187
188Phonet Pipe-controller is enabled by selecting the CONFIG_PHONET_PIPECTRLR Kconfig
189option. It is useful when communicating with those Nokia Modems which do not
190implement Pipe controller in them e.g. Nokia Slim Modem used in ST-Ericsson
191U8500 platform.
192
193The implementation is based on the Data Connection Establishment Sequence
194depicted in 'Nokia Wireless Modem API - Wireless_modem_user_guide.pdf'
195document.
196
197It allows a phonet sequenced socket (host-pep) to initiate a Pipe connection
198between itself and a remote pipe-end point (e.g. modem).
199
200The implementation adds socket options at SOL_PNPIPE level:
201
202 PNPIPE_PIPE_HANDLE
203 It accepts an integer argument for setting value of pipe handle.
204
205 PNPIPE_ENABLE accepts one integer value (int). If set to zero, the pipe
206 is disabled. If the value is non-zero, the pipe is enabled. If the pipe
207 is not (yet) connected, ENOTCONN is error is returned.
208
209The implementation also adds socket 'connect'. On calling the 'connect', pipe
210will be created between the source socket and the destination, and the pipe
211state will be set to PIPE_DISABLED.
212
213After a pipe has been created and enabled successfully, the Pipe data can be
214exchanged between the host-pep and remote-pep (modem).
215
216User-space would typically follow below sequence with Pipe controller:-
217-socket
218-bind
219-setsockopt for PNPIPE_PIPE_HANDLE
220-connect
221-setsockopt for PNPIPE_ENCAP_IP
222-setsockopt for PNPIPE_ENABLE
223 206
224 207
225Authors 208Authors
diff --git a/Documentation/power/devices.txt b/Documentation/power/devices.txt
index 57080cd74575..f023ba6bba62 100644
--- a/Documentation/power/devices.txt
+++ b/Documentation/power/devices.txt
@@ -1,6 +1,6 @@
1Device Power Management 1Device Power Management
2 2
3Copyright (c) 2010 Rafael J. Wysocki <rjw@sisk.pl>, Novell Inc. 3Copyright (c) 2010-2011 Rafael J. Wysocki <rjw@sisk.pl>, Novell Inc.
4Copyright (c) 2010 Alan Stern <stern@rowland.harvard.edu> 4Copyright (c) 2010 Alan Stern <stern@rowland.harvard.edu>
5 5
6 6
@@ -159,18 +159,18 @@ matter, and the kernel is responsible for keeping track of it. By contrast,
159whether or not a wakeup-capable device should issue wakeup events is a policy 159whether or not a wakeup-capable device should issue wakeup events is a policy
160decision, and it is managed by user space through a sysfs attribute: the 160decision, and it is managed by user space through a sysfs attribute: the
161power/wakeup file. User space can write the strings "enabled" or "disabled" to 161power/wakeup file. User space can write the strings "enabled" or "disabled" to
162set or clear the should_wakeup flag, respectively. Reads from the file will 162set or clear the "should_wakeup" flag, respectively. This file is only present
163return the corresponding string if can_wakeup is true, but if can_wakeup is 163for wakeup-capable devices (i.e. devices whose "can_wakeup" flags are set)
164false then reads will return an empty string, to indicate that the device 164and is created (or removed) by device_set_wakeup_capable(). Reads from the
165doesn't support wakeup events. (But even though the file appears empty, writes 165file will return the corresponding string.
166will still affect the should_wakeup flag.)
167 166
168The device_may_wakeup() routine returns true only if both flags are set. 167The device_may_wakeup() routine returns true only if both flags are set.
169Drivers should check this routine when putting devices in a low-power state 168This information is used by subsystems, like the PCI bus type code, to see
170during a system sleep transition, to see whether or not to enable the devices' 169whether or not to enable the devices' wakeup mechanisms. If device wakeup
171wakeup mechanisms. However for runtime power management, wakeup events should 170mechanisms are enabled or disabled directly by drivers, they also should use
172be enabled whenever the device and driver both support them, regardless of the 171device_may_wakeup() to decide what to do during a system sleep transition.
173should_wakeup flag. 172However for runtime power management, wakeup events should be enabled whenever
173the device and driver both support them, regardless of the should_wakeup flag.
174 174
175 175
176/sys/devices/.../power/control files 176/sys/devices/.../power/control files
@@ -249,23 +249,18 @@ various phases always run after tasks have been frozen and before they are
249unfrozen. Furthermore, the *_noirq phases run at a time when IRQ handlers have 249unfrozen. Furthermore, the *_noirq phases run at a time when IRQ handlers have
250been disabled (except for those marked with the IRQ_WAKEUP flag). 250been disabled (except for those marked with the IRQ_WAKEUP flag).
251 251
252Most phases use bus, type, and class callbacks (that is, methods defined in 252All phases use bus, type, or class callbacks (that is, methods defined in
253dev->bus->pm, dev->type->pm, and dev->class->pm). The prepare and complete 253dev->bus->pm, dev->type->pm, or dev->class->pm). These callbacks are mutually
254phases are exceptions; they use only bus callbacks. When multiple callbacks 254exclusive, so if the device type provides a struct dev_pm_ops object pointed to
255are used in a phase, they are invoked in the order: <class, type, bus> during 255by its pm field (i.e. both dev->type and dev->type->pm are defined), the
256power-down transitions and in the opposite order during power-up transitions. 256callbacks included in that object (i.e. dev->type->pm) will be used. Otherwise,
257For example, during the suspend phase the PM core invokes 257if the class provides a struct dev_pm_ops object pointed to by its pm field
258 258(i.e. both dev->class and dev->class->pm are defined), the PM core will use the
259 dev->class->pm.suspend(dev); 259callbacks from that object (i.e. dev->class->pm). Finally, if the pm fields of
260 dev->type->pm.suspend(dev); 260both the device type and class objects are NULL (or those objects do not exist),
261 dev->bus->pm.suspend(dev); 261the callbacks provided by the bus (that is, the callbacks from dev->bus->pm)
262 262will be used (this allows device types to override callbacks provided by bus
263before moving on to the next device, whereas during the resume phase the core 263types or classes if necessary).
264invokes
265
266 dev->bus->pm.resume(dev);
267 dev->type->pm.resume(dev);
268 dev->class->pm.resume(dev);
269 264
270These callbacks may in turn invoke device- or driver-specific methods stored in 265These callbacks may in turn invoke device- or driver-specific methods stored in
271dev->driver->pm, but they don't have to. 266dev->driver->pm, but they don't have to.
@@ -507,6 +502,49 @@ routines. Nevertheless, different callback pointers are used in case there is a
507situation where it actually matters. 502situation where it actually matters.
508 503
509 504
505Device Power Domains
506--------------------
507Sometimes devices share reference clocks or other power resources. In those
508cases it generally is not possible to put devices into low-power states
509individually. Instead, a set of devices sharing a power resource can be put
510into a low-power state together at the same time by turning off the shared
511power resource. Of course, they also need to be put into the full-power state
512together, by turning the shared power resource on. A set of devices with this
513property is often referred to as a power domain.
514
515Support for power domains is provided through the pwr_domain field of struct
516device. This field is a pointer to an object of type struct dev_power_domain,
517defined in include/linux/pm.h, providing a set of power management callbacks
518analogous to the subsystem-level and device driver callbacks that are executed
519for the given device during all power transitions, in addition to the respective
520subsystem-level callbacks. Specifically, the power domain "suspend" callbacks
521(i.e. ->runtime_suspend(), ->suspend(), ->freeze(), ->poweroff(), etc.) are
522executed after the analogous subsystem-level callbacks, while the power domain
523"resume" callbacks (i.e. ->runtime_resume(), ->resume(), ->thaw(), ->restore,
524etc.) are executed before the analogous subsystem-level callbacks. Error codes
525returned by the "suspend" and "resume" power domain callbacks are ignored.
526
527Power domain ->runtime_idle() callback is executed before the subsystem-level
528->runtime_idle() callback and the result returned by it is not ignored. Namely,
529if it returns error code, the subsystem-level ->runtime_idle() callback will not
530be called and the helper function rpm_idle() executing it will return error
531code. This mechanism is intended to help platforms where saving device state
532is a time consuming operation and should only be carried out if all devices
533in the power domain are idle, before turning off the shared power resource(s).
534Namely, the power domain ->runtime_idle() callback may return error code until
535the pm_runtime_idle() helper (or its asychronous version) has been called for
536all devices in the power domain (it is recommended that the returned error code
537be -EBUSY in those cases), preventing the subsystem-level ->runtime_idle()
538callback from being run prematurely.
539
540The support for device power domains is only relevant to platforms needing to
541use the same subsystem-level (e.g. platform bus type) and device driver power
542management callbacks in many different power domain configurations and wanting
543to avoid incorporating the support for power domains into the subsystem-level
544callbacks. The other platforms need not implement it or take it into account
545in any way.
546
547
510System Devices 548System Devices
511-------------- 549--------------
512System devices (sysdevs) follow a slightly different API, which can be found in 550System devices (sysdevs) follow a slightly different API, which can be found in
diff --git a/Documentation/power/runtime_pm.txt b/Documentation/power/runtime_pm.txt
index ffe55ffa540a..654097b130b4 100644
--- a/Documentation/power/runtime_pm.txt
+++ b/Documentation/power/runtime_pm.txt
@@ -1,6 +1,6 @@
1Run-time Power Management Framework for I/O Devices 1Run-time Power Management Framework for I/O Devices
2 2
3(C) 2009 Rafael J. Wysocki <rjw@sisk.pl>, Novell Inc. 3(C) 2009-2011 Rafael J. Wysocki <rjw@sisk.pl>, Novell Inc.
4(C) 2010 Alan Stern <stern@rowland.harvard.edu> 4(C) 2010 Alan Stern <stern@rowland.harvard.edu>
5 5
61. Introduction 61. Introduction
@@ -44,11 +44,12 @@ struct dev_pm_ops {
44}; 44};
45 45
46The ->runtime_suspend(), ->runtime_resume() and ->runtime_idle() callbacks are 46The ->runtime_suspend(), ->runtime_resume() and ->runtime_idle() callbacks are
47executed by the PM core for either the bus type, or device type (if the bus 47executed by the PM core for either the device type, or the class (if the device
48type's callback is not defined), or device class (if the bus type's and device 48type's struct dev_pm_ops object does not exist), or the bus type (if the
49type's callbacks are not defined) of given device. The bus type, device type 49device type's and class' struct dev_pm_ops objects do not exist) of the given
50and device class callbacks are referred to as subsystem-level callbacks in what 50device (this allows device types to override callbacks provided by bus types or
51follows. 51classes if necessary). The bus type, device type and class callbacks are
52referred to as subsystem-level callbacks in what follows.
52 53
53By default, the callbacks are always invoked in process context with interrupts 54By default, the callbacks are always invoked in process context with interrupts
54enabled. However, subsystems can use the pm_runtime_irq_safe() helper function 55enabled. However, subsystems can use the pm_runtime_irq_safe() helper function
diff --git a/Documentation/power/states.txt b/Documentation/power/states.txt
index 34800cc521bf..4416b28630df 100644
--- a/Documentation/power/states.txt
+++ b/Documentation/power/states.txt
@@ -62,12 +62,12 @@ setup via another operating system for it to use. Despite the
62inconvenience, this method requires minimal work by the kernel, since 62inconvenience, this method requires minimal work by the kernel, since
63the firmware will also handle restoring memory contents on resume. 63the firmware will also handle restoring memory contents on resume.
64 64
65For suspend-to-disk, a mechanism called swsusp called 'swsusp' (Swap 65For suspend-to-disk, a mechanism called 'swsusp' (Swap Suspend) is used
66Suspend) is used to write memory contents to free swap space. 66to write memory contents to free swap space. swsusp has some restrictive
67swsusp has some restrictive requirements, but should work in most 67requirements, but should work in most cases. Some, albeit outdated,
68cases. Some, albeit outdated, documentation can be found in 68documentation can be found in Documentation/power/swsusp.txt.
69Documentation/power/swsusp.txt. Alternatively, userspace can do most 69Alternatively, userspace can do most of the actual suspend to disk work,
70of the actual suspend to disk work, see userland-swsusp.txt. 70see userland-swsusp.txt.
71 71
72Once memory state is written to disk, the system may either enter a 72Once memory state is written to disk, the system may either enter a
73low-power state (like ACPI S4), or it may simply power down. Powering 73low-power state (like ACPI S4), or it may simply power down. Powering
diff --git a/Documentation/powerpc/00-INDEX b/Documentation/powerpc/00-INDEX
index e3960b8c8689..5620fb5ac425 100644
--- a/Documentation/powerpc/00-INDEX
+++ b/Documentation/powerpc/00-INDEX
@@ -5,8 +5,6 @@ please mail me.
5 5
600-INDEX 600-INDEX
7 - this file 7 - this file
8booting-without-of.txt
9 - Booting the Linux/ppc kernel without Open Firmware
10cpu_features.txt 8cpu_features.txt
11 - info on how we support a variety of CPUs with minimal compile-time 9 - info on how we support a variety of CPUs with minimal compile-time
12 options. 10 options.
@@ -16,8 +14,6 @@ hvcs.txt
16 - IBM "Hypervisor Virtual Console Server" Installation Guide 14 - IBM "Hypervisor Virtual Console Server" Installation Guide
17mpc52xx.txt 15mpc52xx.txt
18 - Linux 2.6.x on MPC52xx family 16 - Linux 2.6.x on MPC52xx family
19mpc52xx-device-tree-bindings.txt
20 - MPC5200 Device Tree Bindings
21sound.txt 17sound.txt
22 - info on sound support under Linux/PPC 18 - info on sound support under Linux/PPC
23zImage_layout.txt 19zImage_layout.txt
diff --git a/Documentation/rtc.txt b/Documentation/rtc.txt
index 9104c1062084..250160469d83 100644
--- a/Documentation/rtc.txt
+++ b/Documentation/rtc.txt
@@ -178,38 +178,29 @@ RTC class framework, but can't be supported by the older driver.
178 setting the longer alarm time and enabling its IRQ using a single 178 setting the longer alarm time and enabling its IRQ using a single
179 request (using the same model as EFI firmware). 179 request (using the same model as EFI firmware).
180 180
181 * RTC_UIE_ON, RTC_UIE_OFF ... if the RTC offers IRQs, it probably 181 * RTC_UIE_ON, RTC_UIE_OFF ... if the RTC offers IRQs, the RTC framework
182 also offers update IRQs whenever the "seconds" counter changes. 182 will emulate this mechanism.
183 If needed, the RTC framework can emulate this mechanism.
184 183
185 * RTC_PIE_ON, RTC_PIE_OFF, RTC_IRQP_SET, RTC_IRQP_READ ... another 184 * RTC_PIE_ON, RTC_PIE_OFF, RTC_IRQP_SET, RTC_IRQP_READ ... these icotls
186 feature often accessible with an IRQ line is a periodic IRQ, issued 185 are emulated via a kernel hrtimer.
187 at settable frequencies (usually 2^N Hz).
188 186
189In many cases, the RTC alarm can be a system wake event, used to force 187In many cases, the RTC alarm can be a system wake event, used to force
190Linux out of a low power sleep state (or hibernation) back to a fully 188Linux out of a low power sleep state (or hibernation) back to a fully
191operational state. For example, a system could enter a deep power saving 189operational state. For example, a system could enter a deep power saving
192state until it's time to execute some scheduled tasks. 190state until it's time to execute some scheduled tasks.
193 191
194Note that many of these ioctls need not actually be implemented by your 192Note that many of these ioctls are handled by the common rtc-dev interface.
195driver. The common rtc-dev interface handles many of these nicely if your 193Some common examples:
196driver returns ENOIOCTLCMD. Some common examples:
197 194
198 * RTC_RD_TIME, RTC_SET_TIME: the read_time/set_time functions will be 195 * RTC_RD_TIME, RTC_SET_TIME: the read_time/set_time functions will be
199 called with appropriate values. 196 called with appropriate values.
200 197
201 * RTC_ALM_SET, RTC_ALM_READ, RTC_WKALM_SET, RTC_WKALM_RD: the 198 * RTC_ALM_SET, RTC_ALM_READ, RTC_WKALM_SET, RTC_WKALM_RD: gets or sets
202 set_alarm/read_alarm functions will be called. 199 the alarm rtc_timer. May call the set_alarm driver function.
203 200
204 * RTC_IRQP_SET, RTC_IRQP_READ: the irq_set_freq function will be called 201 * RTC_IRQP_SET, RTC_IRQP_READ: These are emulated by the generic code.
205 to set the frequency while the framework will handle the read for you
206 since the frequency is stored in the irq_freq member of the rtc_device
207 structure. Your driver needs to initialize the irq_freq member during
208 init. Make sure you check the requested frequency is in range of your
209 hardware in the irq_set_freq function. If it isn't, return -EINVAL. If
210 you cannot actually change the frequency, do not define irq_set_freq.
211 202
212 * RTC_PIE_ON, RTC_PIE_OFF: the irq_set_state function will be called. 203 * RTC_PIE_ON, RTC_PIE_OFF: These are also emulated by the generic code.
213 204
214If all else fails, check out the rtc-test.c driver! 205If all else fails, check out the rtc-test.c driver!
215 206
diff --git a/Documentation/serial/n_gsm.txt b/Documentation/serial/n_gsm.txt
new file mode 100644
index 000000000000..397f41a1f153
--- /dev/null
+++ b/Documentation/serial/n_gsm.txt
@@ -0,0 +1,89 @@
1n_gsm.c GSM 0710 tty multiplexor HOWTO
2===================================================
3
4This line discipline implements the GSM 07.10 multiplexing protocol
5detailed in the following 3GPP document :
6http://www.3gpp.org/ftp/Specs/archive/07_series/07.10/0710-720.zip
7
8This document give some hints on how to use this driver with GPRS and 3G
9modems connected to a physical serial port.
10
11How to use it
12-------------
131- initialize the modem in 0710 mux mode (usually AT+CMUX= command) through
14its serial port. Depending on the modem used, you can pass more or less
15parameters to this command,
162- switch the serial line to using the n_gsm line discipline by using
17TIOCSETD ioctl,
183- configure the mux using GSMIOC_GETCONF / GSMIOC_SETCONF ioctl,
19
20Major parts of the initialization program :
21(a good starting point is util-linux-ng/sys-utils/ldattach.c)
22#include <linux/gsmmux.h>
23#define N_GSM0710 21 /* GSM 0710 Mux */
24#define DEFAULT_SPEED B115200
25#define SERIAL_PORT /dev/ttyS0
26
27 int ldisc = N_GSM0710;
28 struct gsm_config c;
29 struct termios configuration;
30
31 /* open the serial port connected to the modem */
32 fd = open(SERIAL_PORT, O_RDWR | O_NOCTTY | O_NDELAY);
33
34 /* configure the serial port : speed, flow control ... */
35
36 /* send the AT commands to switch the modem to CMUX mode
37 and check that it's succesful (should return OK) */
38 write(fd, "AT+CMUX=0\r", 10);
39
40 /* experience showed that some modems need some time before
41 being able to answer to the first MUX packet so a delay
42 may be needed here in some case */
43 sleep(3);
44
45 /* use n_gsm line discipline */
46 ioctl(fd, TIOCSETD, &ldisc);
47
48 /* get n_gsm configuration */
49 ioctl(fd, GSMIOC_GETCONF, &c);
50 /* we are initiator and need encoding 0 (basic) */
51 c.initiator = 1;
52 c.encapsulation = 0;
53 /* our modem defaults to a maximum size of 127 bytes */
54 c.mru = 127;
55 c.mtu = 127;
56 /* set the new configuration */
57 ioctl(fd, GSMIOC_SETCONF, &c);
58
59 /* and wait for ever to keep the line discipline enabled */
60 daemon(0,0);
61 pause();
62
634- create the devices corresponding to the "virtual" serial ports (take care,
64each modem has its configuration and some DLC have dedicated functions,
65for example GPS), starting with minor 1 (DLC0 is reserved for the management
66of the mux)
67
68MAJOR=`cat /proc/devices |grep gsmtty | awk '{print $1}`
69for i in `seq 1 4`; do
70 mknod /dev/ttygsm$i c $MAJOR $i
71done
72
735- use these devices as plain serial ports.
74for example, it's possible :
75- and to use gnokii to send / receive SMS on ttygsm1
76- to use ppp to establish a datalink on ttygsm2
77
786- first close all virtual ports before closing the physical port.
79
80Additional Documentation
81------------------------
82More practical details on the protocol and how it's supported by industrial
83modems can be found in the following documents :
84http://www.telit.com/module/infopool/download.php?id=616
85http://www.u-blox.com/images/downloads/Product_Docs/LEON-G100-G200-MuxImplementation_ApplicationNote_%28GSM%20G1-CS-10002%29.pdf
86http://www.sierrawireless.com/Support/Downloads/AirPrime/WMP_Series/~/media/Support_Downloads/AirPrime/Application_notes/CMUX_Feature_Application_Note-Rev004.ashx
87http://wm.sim.com/sim/News/photo/2010721161442.pdf
88
8911-03-08 - Eric B茅nard - <eric@eukrea.com>
diff --git a/Documentation/spinlocks.txt b/Documentation/spinlocks.txt
index 178c831b907d..2e3c64b1a6a5 100644
--- a/Documentation/spinlocks.txt
+++ b/Documentation/spinlocks.txt
@@ -86,7 +86,7 @@ to change the variables it has to get an exclusive write lock.
86 86
87The routines look the same as above: 87The routines look the same as above:
88 88
89 rwlock_t xxx_lock = RW_LOCK_UNLOCKED; 89 rwlock_t xxx_lock = __RW_LOCK_UNLOCKED(xxx_lock);
90 90
91 unsigned long flags; 91 unsigned long flags;
92 92
@@ -196,25 +196,3 @@ appropriate:
196 196
197For static initialization, use DEFINE_SPINLOCK() / DEFINE_RWLOCK() or 197For static initialization, use DEFINE_SPINLOCK() / DEFINE_RWLOCK() or
198__SPIN_LOCK_UNLOCKED() / __RW_LOCK_UNLOCKED() as appropriate. 198__SPIN_LOCK_UNLOCKED() / __RW_LOCK_UNLOCKED() as appropriate.
199
200SPIN_LOCK_UNLOCKED and RW_LOCK_UNLOCKED are deprecated. These interfere
201with lockdep state tracking.
202
203Most of the time, you can simply turn:
204 static spinlock_t xxx_lock = SPIN_LOCK_UNLOCKED;
205into:
206 static DEFINE_SPINLOCK(xxx_lock);
207
208Static structure member variables go from:
209
210 struct foo bar {
211 .lock = SPIN_LOCK_UNLOCKED;
212 };
213
214to:
215
216 struct foo bar {
217 .lock = __SPIN_LOCK_UNLOCKED(bar.lock);
218 };
219
220Declaration of static rw_locks undergo a similar transformation.
diff --git a/Documentation/sysctl/fs.txt b/Documentation/sysctl/fs.txt
index 62682500878a..4af0614147ef 100644
--- a/Documentation/sysctl/fs.txt
+++ b/Documentation/sysctl/fs.txt
@@ -88,20 +88,19 @@ you might want to raise the limit.
88 88
89file-max & file-nr: 89file-max & file-nr:
90 90
91The kernel allocates file handles dynamically, but as yet it
92doesn't free them again.
93
94The value in file-max denotes the maximum number of file- 91The value in file-max denotes the maximum number of file-
95handles that the Linux kernel will allocate. When you get lots 92handles that the Linux kernel will allocate. When you get lots
96of error messages about running out of file handles, you might 93of error messages about running out of file handles, you might
97want to increase this limit. 94want to increase this limit.
98 95
99Historically, the three values in file-nr denoted the number of 96Historically,the kernel was able to allocate file handles
100allocated file handles, the number of allocated but unused file 97dynamically, but not to free them again. The three values in
101handles, and the maximum number of file handles. Linux 2.6 always 98file-nr denote the number of allocated file handles, the number
102reports 0 as the number of free file handles -- this is not an 99of allocated but unused file handles, and the maximum number of
103error, it just means that the number of allocated file handles 100file handles. Linux 2.6 always reports 0 as the number of free
104exactly matches the number of used file handles. 101file handles -- this is not an error, it just means that the
102number of allocated file handles exactly matches the number of
103used file handles.
105 104
106Attempts to allocate more file descriptors than file-max are 105Attempts to allocate more file descriptors than file-max are
107reported with printk, look for "VFS: file-max limit <number> 106reported with printk, look for "VFS: file-max limit <number>
diff --git a/Documentation/trace/ftrace-design.txt b/Documentation/trace/ftrace-design.txt
index dc52bd442c92..79fcafc7fd64 100644
--- a/Documentation/trace/ftrace-design.txt
+++ b/Documentation/trace/ftrace-design.txt
@@ -247,6 +247,13 @@ You need very few things to get the syscalls tracing in an arch.
247- Support the TIF_SYSCALL_TRACEPOINT thread flags. 247- Support the TIF_SYSCALL_TRACEPOINT thread flags.
248- Put the trace_sys_enter() and trace_sys_exit() tracepoints calls from ptrace 248- Put the trace_sys_enter() and trace_sys_exit() tracepoints calls from ptrace
249 in the ptrace syscalls tracing path. 249 in the ptrace syscalls tracing path.
250- If the system call table on this arch is more complicated than a simple array
251 of addresses of the system calls, implement an arch_syscall_addr to return
252 the address of a given system call.
253- If the symbol names of the system calls do not match the function names on
254 this arch, define ARCH_HAS_SYSCALL_MATCH_SYM_NAME in asm/ftrace.h and
255 implement arch_syscall_match_sym_name with the appropriate logic to return
256 true if the function name corresponds with the symbol name.
250- Tag this arch as HAVE_SYSCALL_TRACEPOINTS. 257- Tag this arch as HAVE_SYSCALL_TRACEPOINTS.
251 258
252 259
diff --git a/Documentation/trace/ftrace.txt b/Documentation/trace/ftrace.txt
index 557c1edeccaf..1ebc24cf9a55 100644
--- a/Documentation/trace/ftrace.txt
+++ b/Documentation/trace/ftrace.txt
@@ -80,11 +80,11 @@ of ftrace. Here is a list of some of the key files:
80 tracers listed here can be configured by 80 tracers listed here can be configured by
81 echoing their name into current_tracer. 81 echoing their name into current_tracer.
82 82
83 tracing_enabled: 83 tracing_on:
84 84
85 This sets or displays whether the current_tracer 85 This sets or displays whether writing to the trace
86 is activated and tracing or not. Echo 0 into this 86 ring buffer is enabled. Echo 0 into this file to disable
87 file to disable the tracer or 1 to enable it. 87 the tracer or 1 to enable it.
88 88
89 trace: 89 trace:
90 90
@@ -202,10 +202,6 @@ Here is the list of current tracers that may be configured.
202 to draw a graph of function calls similar to C code 202 to draw a graph of function calls similar to C code
203 source. 203 source.
204 204
205 "sched_switch"
206
207 Traces the context switches and wakeups between tasks.
208
209 "irqsoff" 205 "irqsoff"
210 206
211 Traces the areas that disable interrupts and saves 207 Traces the areas that disable interrupts and saves
@@ -273,39 +269,6 @@ format, the function name that was traced "path_put" and the
273parent function that called this function "path_walk". The 269parent function that called this function "path_walk". The
274timestamp is the time at which the function was entered. 270timestamp is the time at which the function was entered.
275 271
276The sched_switch tracer also includes tracing of task wakeups
277and context switches.
278
279 ksoftirqd/1-7 [01] 1453.070013: 7:115:R + 2916:115:S
280 ksoftirqd/1-7 [01] 1453.070013: 7:115:R + 10:115:S
281 ksoftirqd/1-7 [01] 1453.070013: 7:115:R ==> 10:115:R
282 events/1-10 [01] 1453.070013: 10:115:S ==> 2916:115:R
283 kondemand/1-2916 [01] 1453.070013: 2916:115:S ==> 7:115:R
284 ksoftirqd/1-7 [01] 1453.070013: 7:115:S ==> 0:140:R
285
286Wake ups are represented by a "+" and the context switches are
287shown as "==>". The format is:
288
289 Context switches:
290
291 Previous task Next Task
292
293 <pid>:<prio>:<state> ==> <pid>:<prio>:<state>
294
295 Wake ups:
296
297 Current task Task waking up
298
299 <pid>:<prio>:<state> + <pid>:<prio>:<state>
300
301The prio is the internal kernel priority, which is the inverse
302of the priority that is usually displayed by user-space tools.
303Zero represents the highest priority (99). Prio 100 starts the
304"nice" priorities with 100 being equal to nice -20 and 139 being
305nice 19. The prio "140" is reserved for the idle task which is
306the lowest priority thread (pid 0).
307
308
309Latency trace format 272Latency trace format
310-------------------- 273--------------------
311 274
@@ -491,78 +454,10 @@ x494] <- /root/a.out[+0x4a8] <- /lib/libc-2.7.so[+0x1e1a6]
491 latencies, as described in "Latency 454 latencies, as described in "Latency
492 trace format". 455 trace format".
493 456
494sched_switch 457 overwrite - This controls what happens when the trace buffer is
495------------ 458 full. If "1" (default), the oldest events are
496 459 discarded and overwritten. If "0", then the newest
497This tracer simply records schedule switches. Here is an example 460 events are discarded.
498of how to use it.
499
500 # echo sched_switch > current_tracer
501 # echo 1 > tracing_enabled
502 # sleep 1
503 # echo 0 > tracing_enabled
504 # cat trace
505
506# tracer: sched_switch
507#
508# TASK-PID CPU# TIMESTAMP FUNCTION
509# | | | | |
510 bash-3997 [01] 240.132281: 3997:120:R + 4055:120:R
511 bash-3997 [01] 240.132284: 3997:120:R ==> 4055:120:R
512 sleep-4055 [01] 240.132371: 4055:120:S ==> 3997:120:R
513 bash-3997 [01] 240.132454: 3997:120:R + 4055:120:S
514 bash-3997 [01] 240.132457: 3997:120:R ==> 4055:120:R
515 sleep-4055 [01] 240.132460: 4055:120:D ==> 3997:120:R
516 bash-3997 [01] 240.132463: 3997:120:R + 4055:120:D
517 bash-3997 [01] 240.132465: 3997:120:R ==> 4055:120:R
518 <idle>-0 [00] 240.132589: 0:140:R + 4:115:S
519 <idle>-0 [00] 240.132591: 0:140:R ==> 4:115:R
520 ksoftirqd/0-4 [00] 240.132595: 4:115:S ==> 0:140:R
521 <idle>-0 [00] 240.132598: 0:140:R + 4:115:S
522 <idle>-0 [00] 240.132599: 0:140:R ==> 4:115:R
523 ksoftirqd/0-4 [00] 240.132603: 4:115:S ==> 0:140:R
524 sleep-4055 [01] 240.133058: 4055:120:S ==> 3997:120:R
525 [...]
526
527
528As we have discussed previously about this format, the header
529shows the name of the trace and points to the options. The
530"FUNCTION" is a misnomer since here it represents the wake ups
531and context switches.
532
533The sched_switch file only lists the wake ups (represented with
534'+') and context switches ('==>') with the previous task or
535current task first followed by the next task or task waking up.
536The format for both of these is PID:KERNEL-PRIO:TASK-STATE.
537Remember that the KERNEL-PRIO is the inverse of the actual
538priority with zero (0) being the highest priority and the nice
539values starting at 100 (nice -20). Below is a quick chart to map
540the kernel priority to user land priorities.
541
542 Kernel Space User Space
543 ===============================================================
544 0(high) to 98(low) user RT priority 99(high) to 1(low)
545 with SCHED_RR or SCHED_FIFO
546 ---------------------------------------------------------------
547 99 sched_priority is not used in scheduling
548 decisions(it must be specified as 0)
549 ---------------------------------------------------------------
550 100(high) to 139(low) user nice -20(high) to 19(low)
551 ---------------------------------------------------------------
552 140 idle task priority
553 ---------------------------------------------------------------
554
555The task states are:
556
557 R - running : wants to run, may not actually be running
558 S - sleep : process is waiting to be woken up (handles signals)
559 D - disk sleep (uninterruptible sleep) : process must be woken up
560 (ignores signals)
561 T - stopped : process suspended
562 t - traced : process is being traced (with something like gdb)
563 Z - zombie : process waiting to be cleaned up
564 X - unknown
565
566 461
567ftrace_enabled 462ftrace_enabled
568-------------- 463--------------
@@ -607,10 +502,10 @@ an example:
607 # echo irqsoff > current_tracer 502 # echo irqsoff > current_tracer
608 # echo latency-format > trace_options 503 # echo latency-format > trace_options
609 # echo 0 > tracing_max_latency 504 # echo 0 > tracing_max_latency
610 # echo 1 > tracing_enabled 505 # echo 1 > tracing_on
611 # ls -ltr 506 # ls -ltr
612 [...] 507 [...]
613 # echo 0 > tracing_enabled 508 # echo 0 > tracing_on
614 # cat trace 509 # cat trace
615# tracer: irqsoff 510# tracer: irqsoff
616# 511#
@@ -715,10 +610,10 @@ is much like the irqsoff tracer.
715 # echo preemptoff > current_tracer 610 # echo preemptoff > current_tracer
716 # echo latency-format > trace_options 611 # echo latency-format > trace_options
717 # echo 0 > tracing_max_latency 612 # echo 0 > tracing_max_latency
718 # echo 1 > tracing_enabled 613 # echo 1 > tracing_on
719 # ls -ltr 614 # ls -ltr
720 [...] 615 [...]
721 # echo 0 > tracing_enabled 616 # echo 0 > tracing_on
722 # cat trace 617 # cat trace
723# tracer: preemptoff 618# tracer: preemptoff
724# 619#
@@ -863,10 +758,10 @@ tracers.
863 # echo preemptirqsoff > current_tracer 758 # echo preemptirqsoff > current_tracer
864 # echo latency-format > trace_options 759 # echo latency-format > trace_options
865 # echo 0 > tracing_max_latency 760 # echo 0 > tracing_max_latency
866 # echo 1 > tracing_enabled 761 # echo 1 > tracing_on
867 # ls -ltr 762 # ls -ltr
868 [...] 763 [...]
869 # echo 0 > tracing_enabled 764 # echo 0 > tracing_on
870 # cat trace 765 # cat trace
871# tracer: preemptirqsoff 766# tracer: preemptirqsoff
872# 767#
@@ -1026,9 +921,9 @@ Instead of performing an 'ls', we will run 'sleep 1' under
1026 # echo wakeup > current_tracer 921 # echo wakeup > current_tracer
1027 # echo latency-format > trace_options 922 # echo latency-format > trace_options
1028 # echo 0 > tracing_max_latency 923 # echo 0 > tracing_max_latency
1029 # echo 1 > tracing_enabled 924 # echo 1 > tracing_on
1030 # chrt -f 5 sleep 1 925 # chrt -f 5 sleep 1
1031 # echo 0 > tracing_enabled 926 # echo 0 > tracing_on
1032 # cat trace 927 # cat trace
1033# tracer: wakeup 928# tracer: wakeup
1034# 929#
@@ -1140,9 +1035,9 @@ ftrace_enabled is set; otherwise this tracer is a nop.
1140 1035
1141 # sysctl kernel.ftrace_enabled=1 1036 # sysctl kernel.ftrace_enabled=1
1142 # echo function > current_tracer 1037 # echo function > current_tracer
1143 # echo 1 > tracing_enabled 1038 # echo 1 > tracing_on
1144 # usleep 1 1039 # usleep 1
1145 # echo 0 > tracing_enabled 1040 # echo 0 > tracing_on
1146 # cat trace 1041 # cat trace
1147# tracer: function 1042# tracer: function
1148# 1043#
@@ -1180,7 +1075,7 @@ int trace_fd;
1180[...] 1075[...]
1181int main(int argc, char *argv[]) { 1076int main(int argc, char *argv[]) {
1182 [...] 1077 [...]
1183 trace_fd = open(tracing_file("tracing_enabled"), O_WRONLY); 1078 trace_fd = open(tracing_file("tracing_on"), O_WRONLY);
1184 [...] 1079 [...]
1185 if (condition_hit()) { 1080 if (condition_hit()) {
1186 write(trace_fd, "0", 1); 1081 write(trace_fd, "0", 1);
@@ -1631,9 +1526,9 @@ If I am only interested in sys_nanosleep and hrtimer_interrupt:
1631 # echo sys_nanosleep hrtimer_interrupt \ 1526 # echo sys_nanosleep hrtimer_interrupt \
1632 > set_ftrace_filter 1527 > set_ftrace_filter
1633 # echo function > current_tracer 1528 # echo function > current_tracer
1634 # echo 1 > tracing_enabled 1529 # echo 1 > tracing_on
1635 # usleep 1 1530 # usleep 1
1636 # echo 0 > tracing_enabled 1531 # echo 0 > tracing_on
1637 # cat trace 1532 # cat trace
1638# tracer: ftrace 1533# tracer: ftrace
1639# 1534#
@@ -1879,9 +1774,9 @@ different. The trace is live.
1879 # echo function > current_tracer 1774 # echo function > current_tracer
1880 # cat trace_pipe > /tmp/trace.out & 1775 # cat trace_pipe > /tmp/trace.out &
1881[1] 4153 1776[1] 4153
1882 # echo 1 > tracing_enabled 1777 # echo 1 > tracing_on
1883 # usleep 1 1778 # usleep 1
1884 # echo 0 > tracing_enabled 1779 # echo 0 > tracing_on
1885 # cat trace 1780 # cat trace
1886# tracer: function 1781# tracer: function
1887# 1782#
diff --git a/Documentation/trace/kprobetrace.txt b/Documentation/trace/kprobetrace.txt
index 5f77d94598dd..6d27ab8d6e9f 100644
--- a/Documentation/trace/kprobetrace.txt
+++ b/Documentation/trace/kprobetrace.txt
@@ -42,11 +42,25 @@ Synopsis of kprobe_events
42 +|-offs(FETCHARG) : Fetch memory at FETCHARG +|- offs address.(**) 42 +|-offs(FETCHARG) : Fetch memory at FETCHARG +|- offs address.(**)
43 NAME=FETCHARG : Set NAME as the argument name of FETCHARG. 43 NAME=FETCHARG : Set NAME as the argument name of FETCHARG.
44 FETCHARG:TYPE : Set TYPE as the type of FETCHARG. Currently, basic types 44 FETCHARG:TYPE : Set TYPE as the type of FETCHARG. Currently, basic types
45 (u8/u16/u32/u64/s8/s16/s32/s64) and string are supported. 45 (u8/u16/u32/u64/s8/s16/s32/s64), "string" and bitfield
46 are supported.
46 47
47 (*) only for return probe. 48 (*) only for return probe.
48 (**) this is useful for fetching a field of data structures. 49 (**) this is useful for fetching a field of data structures.
49 50
51Types
52-----
53Several types are supported for fetch-args. Kprobe tracer will access memory
54by given type. Prefix 's' and 'u' means those types are signed and unsigned
55respectively. Traced arguments are shown in decimal (signed) or hex (unsigned).
56String type is a special type, which fetches a "null-terminated" string from
57kernel space. This means it will fail and store NULL if the string container
58has been paged out.
59Bitfield is another special type, which takes 3 parameters, bit-width, bit-
60offset, and container-size (usually 32). The syntax is;
61
62 b<bit-width>@<bit-offset>/<container-size>
63
50 64
51Per-Probe Event Filtering 65Per-Probe Event Filtering
52------------------------- 66-------------------------
diff --git a/Documentation/usb/usbmon.txt b/Documentation/usb/usbmon.txt
index 66f92d1194c1..a4efa0462f05 100644
--- a/Documentation/usb/usbmon.txt
+++ b/Documentation/usb/usbmon.txt
@@ -12,6 +12,10 @@ Controller Drivers (HCD). So, if HCD is buggy, the traces reported by
12usbmon may not correspond to bus transactions precisely. This is the same 12usbmon may not correspond to bus transactions precisely. This is the same
13situation as with tcpdump. 13situation as with tcpdump.
14 14
15Two APIs are currently implemented: "text" and "binary". The binary API
16is available through a character device in /dev namespace and is an ABI.
17The text API is deprecated since 2.6.35, but available for convenience.
18
15* How to use usbmon to collect raw text traces 19* How to use usbmon to collect raw text traces
16 20
17Unlike the packet socket, usbmon has an interface which provides traces 21Unlike the packet socket, usbmon has an interface which provides traces
@@ -162,39 +166,11 @@ Here is the list of words, from left to right:
162 not machine words, but really just a byte stream split into words to make 166 not machine words, but really just a byte stream split into words to make
163 it easier to read. Thus, the last word may contain from one to four bytes. 167 it easier to read. Thus, the last word may contain from one to four bytes.
164 The length of collected data is limited and can be less than the data length 168 The length of collected data is limited and can be less than the data length
165 report in Data Length word. 169 reported in the Data Length word. In the case of an Isochronous input (Zi)
166 170 completion where the received data is sparse in the buffer, the length of
167Here is an example of code to read the data stream in a well known programming 171 the collected data can be greater than the Data Length value (because Data
168language: 172 Length counts only the bytes that were received whereas the Data words
169 173 contain the entire transfer buffer).
170class ParsedLine {
171 int data_len; /* Available length of data */
172 byte data[];
173
174 void parseData(StringTokenizer st) {
175 int availwords = st.countTokens();
176 data = new byte[availwords * 4];
177 data_len = 0;
178 while (st.hasMoreTokens()) {
179 String data_str = st.nextToken();
180 int len = data_str.length() / 2;
181 int i;
182 int b; // byte is signed, apparently?! XXX
183 for (i = 0; i < len; i++) {
184 // data[data_len] = Byte.parseByte(
185 // data_str.substring(i*2, i*2 + 2),
186 // 16);
187 b = Integer.parseInt(
188 data_str.substring(i*2, i*2 + 2),
189 16);
190 if (b >= 128)
191 b *= -1;
192 data[data_len] = (byte) b;
193 data_len++;
194 }
195 }
196 }
197}
198 174
199Examples: 175Examples:
200 176
diff --git a/Documentation/zh_CN/SecurityBugs b/Documentation/zh_CN/SecurityBugs
new file mode 100644
index 000000000000..d21eb07fe943
--- /dev/null
+++ b/Documentation/zh_CN/SecurityBugs
@@ -0,0 +1,50 @@
1Chinese translated version of Documentation/SecurityBugs
2
3If you have any comment or update to the content, please contact the
4original document maintainer directly. However, if you have a problem
5communicating in English you can also ask the Chinese maintainer for
6help. Contact the Chinese maintainer if this translation is outdated
7or if there is a problem with the translation.
8
9Chinese maintainer: Harry Wei <harryxiyou@gmail.com>
10---------------------------------------------------------------------
11Documentation/SecurityBugs 鐨勪腑鏂囩炕璇
12
13濡傛灉鎯宠瘎璁烘垨鏇存柊鏈枃鐨勫唴瀹癸紝璇风洿鎺ヨ仈绯诲師鏂囨。鐨勭淮鎶よ呫傚鏋滀綘浣跨敤鑻辨枃
14浜ゆ祦鏈夊洶闅剧殑璇濓紝涔熷彲浠ュ悜涓枃鐗堢淮鎶よ呮眰鍔┿傚鏋滄湰缈昏瘧鏇存柊涓嶅強鏃舵垨鑰呯炕
15璇戝瓨鍦ㄩ棶棰橈紝璇疯仈绯讳腑鏂囩増缁存姢鑰呫
16
17涓枃鐗堢淮鎶よ咃細 璐惧▉濞 Harry Wei <harryxiyou@gmail.com>
18涓枃鐗堢炕璇戣咃細 璐惧▉濞 Harry Wei <harryxiyou@gmail.com>
19涓枃鐗堟牎璇戣咃細 璐惧▉濞 Harry Wei <harryxiyou@gmail.com>
20
21
22浠ヤ笅涓烘鏂
23---------------------------------------------------------------------
24Linux鍐呮牳寮鍙戣呰涓哄畨鍏ㄩ潪甯搁噸瑕併傚洜姝わ紝鎴戜滑鎯宠鐭ラ亾褰撲竴涓湁鍏充簬
25瀹夊叏鐨勬紡娲炶鍙戠幇鐨勬椂鍊欙紝骞朵笖瀹冨彲鑳戒細琚敖蹇殑淇鎴栬呭叕寮銆傝鎶婅繖涓畨鍏
26婕忔礊鎶ュ憡缁橪inux鍐呮牳瀹夊叏鍥㈤槦銆
27
281) 鑱旂郴
29
30linux鍐呮牳瀹夊叏鍥㈤槦鍙互閫氳繃email<security@kernel.org>鏉ヨ仈绯汇傝繖鏄
31涓缁勭嫭绔嬬殑瀹夊叏宸ヤ綔浜哄憳锛屽彲浠ュ府鍔╂敼鍠勬紡娲炴姤鍛婂苟涓斿叕甯冨拰鍙栨秷涓涓慨澶嶃傚畨
32鍏ㄥ洟闃熸湁鍙兘浼氫粠閮ㄥ垎鐨勭淮鎶よ呴偅閲屽紩杩涢澶栫殑甯姪鏉ヤ簡瑙e苟涓斾慨澶嶅畨鍏ㄦ紡娲炪
33褰撻亣鍒颁换浣曟紡娲烇紝鎵鑳芥彁渚涚殑淇℃伅瓒婂灏辫秺鑳借瘖鏂拰淇銆傚鏋滀綘涓嶆竻妤氫粈涔
34鏄湁甯姪鐨勪俊鎭紝閭e氨璇烽噸娓╀竴涓婻EPORTING-BUGS鏂囦欢涓殑姒傝堪杩囩▼銆備换
35浣曟敾鍑绘х殑浠g爜閮芥槸闈炲父鏈夌敤鐨勶紝鏈粡鎶ュ憡鑰呯殑鍚屾剰涓嶄細琚彇娑堬紝闄ら潪瀹冨凡缁
36琚叕甯冧簬浼椼
37
382) 鍏紑
39
40Linux鍐呮牳瀹夊叏鍥㈤槦鐨勫畻鏃ㄥ氨鏄拰婕忔礊鎻愪氦鑰呬竴璧峰鐞嗘紡娲炵殑瑙e喅鏂规鐩
41鍒板叕寮銆傛垜浠枩娆㈠敖蹇湴瀹屽叏鍏紑婕忔礊銆傚綋涓涓紡娲炴垨鑰呬慨澶嶈繕娌℃湁琚畬鍏ㄥ湴鐞
42瑙o紝瑙e喅鏂规娌℃湁閫氳繃娴嬭瘯鎴栬呬緵搴斿晢鍗忚皟锛屽彲浠ュ悎鐞嗗湴寤惰繜鍏紑銆傜劧鑰岋紝鎴戜滑
43鏈熸湜杩欎簺寤惰繜灏藉彲鑳界殑鐭簺锛屾槸鍙暟鐨勫嚑澶╋紝鑰屼笉鏄嚑涓槦鏈熸垨鑰呭嚑涓湀銆傚叕寮
44鏃ユ湡鏄氳繃瀹夊叏鍥㈤槦鍜屾紡娲炴彁渚涜呬互鍙婁緵搴斿晢娲借皥鍚庣殑缁撴灉銆傚叕寮鏃堕棿琛ㄦ槸浠庡緢
45鐭紙鐗规畩鐨勶紝瀹冨凡缁忚鍏紬鎵鐭ラ亾锛夊埌鍑犱釜鏄熸湡銆備綔涓轰竴涓熀鏈殑榛樿鏀跨瓥锛屾垜
46浠墍鏈熸湜閫氱煡鍏紬鐨勬棩鏈熸槸7澶╃殑瀹夋帓銆
47
483) 淇濆瘑鍗忚
49
50Linux鍐呮牳瀹夊叏鍥㈤槦涓嶆槸涓涓寮忕殑鍥綋锛屽洜姝や笉鑳藉姞鍏ヤ换浣曠殑淇濆瘑鍗忚銆
diff --git a/Documentation/zh_CN/SubmitChecklist b/Documentation/zh_CN/SubmitChecklist
new file mode 100644
index 000000000000..951415bbab0c
--- /dev/null
+++ b/Documentation/zh_CN/SubmitChecklist
@@ -0,0 +1,109 @@
1Chinese translated version of Documentation/SubmitChecklist
2
3If you have any comment or update to the content, please contact the
4original document maintainer directly. However, if you have a problem
5communicating in English you can also ask the Chinese maintainer for
6help. Contact the Chinese maintainer if this translation is outdated
7or if there is a problem with the translation.
8
9Chinese maintainer: Harry Wei <harryxiyou@gmail.com>
10---------------------------------------------------------------------
11Documentation/SubmitChecklist 的中文翻译
12
13如果想评论或更新本文的内容,请直接联系原文档的维护者。如果你使用英文
14交流有困难的话,也可以向中文版维护者求助。如果本翻译更新不及时或者翻
15译存在问题,请联系中文版维护者。
16
17中文版维护者: 贾威威 Harry Wei <harryxiyou@gmail.com>
18中文版翻译者: 贾威威 Harry Wei <harryxiyou@gmail.com>
19中文版校译者: 贾威威 Harry Wei <harryxiyou@gmail.com>
20
21
22以下为正文
23---------------------------------------------------------------------
24Linux内核提交清单
25~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
26
27这里有一些内核开发者应该做的基本事情,如果他们想看到自己的内核补丁提交
28被接受的更快。
29
30这些都是超出Documentation/SubmittingPatches文档里所提供的以及其他
31关于提交Linux内核补丁的说明。
32
331:如果你使用了一个功能那么就#include定义/声明那个功能的那个文件。
34 不要依靠其他间接引入定义/声明那个功能的头文件。
35
362:构建简洁适用或者更改CONFIG选项 =y,=m,或者=n。
37 不要有编译警告/错误, 不要有链接警告/错误。
38
392b:通过 allnoconfig, allmodconfig
40
412c:当使用 0=builddir 成功地构建
42
433:通过使用本地交叉编译工具或者其他一些构建产所,在多CPU框架上构建。
44
454:ppc64 是一个很好的检查交叉编译的框架,因为它往往把‘unsigned long’
46 当64位值来使用。
47
485:按照Documentation/CodingStyle文件里的详细描述,检查你补丁的整体风格。
49 使用补丁风格检查琐碎的违规(scripts/checkpatch.pl),审核员优先提交。
50 你应该调整遗留在你补丁中的所有违规。
51
526:任何更新或者改动CONFIG选项都不能打乱配置菜单。
53
547:所有的Kconfig选项更新都要有说明文字。
55
568:已经认真地总结了相关的Kconfig组合。这是很难通过测试做好的--脑力在这里下降。
57
589:检查具有简洁性。
59
6010:使用'make checkstack'和'make namespacecheck'检查,然后修改所找到的问题。
61 注意:堆栈检查不会明确地出现问题,但是任何的一个函数在堆栈上使用多于512字节
62 都要准备修改。
63
6411:包含kernel-doc到全局内核APIs文件。(不要求静态的函数,但是包含也无所谓。)
65 使用'make htmldocs'或者'make mandocs'来检查kernel-doc,然后修改任何
66 发现的问题。
67
6812:已经通过CONFIG_PREEMPT, CONFIG_DEBUG_PREEMPT,
69 CONFIG_DEBUG_SLAB, CONFIG_DEBUG_PAGEALLOC, CONFIG_DEBUG_MUTEXES,
70 CONFIG_DEBUG_SPINLOCK, CONFIG_DEBUG_SPINLOCK_SLEEP测试,并且同时都
71 使能。
72
7313:已经都构建并且使用或者不使用 CONFIG_SMP 和 CONFIG_PREEMPT测试执行时间。
74
7514:如果补丁影响IO/Disk,等等:已经通过使用或者不使用 CONFIG_LBDAF 测试。
76
7715:所有的codepaths已经行使所有lockdep启用功能。
78
7916:所有的/proc记录更新都要作成文件放在Documentation/目录下。
80
8117:所有的内核启动参数更新都被记录到Documentation/kernel-parameters.txt文件中。
82
8318:所有的模块参数更新都用MODULE_PARM_DESC()记录。
84
8519:所有的用户空间接口更新都被记录到Documentation/ABI/。查看Documentation/ABI/README
86 可以获得更多的信息。改变用户空间接口的补丁应该被邮件抄送给linux-api@vger.kernel.org。
87
8820:检查它是不是都通过`make headers_check'。
89
9021:已经通过至少引入slab和page-allocation失败检查。查看Documentation/fault-injection/。
91
9222:新加入的源码已经通过`gcc -W'(使用"make EXTRA_CFLAGS=-W")编译。这样将产生很多烦恼,
93 但是对于寻找漏洞很有益处,例如:"warning: comparison between signed and unsigned"。
94
9523:当它被合并到-mm补丁集后再测试,用来确定它是否还和补丁队列中的其他补丁一起工作以及在VM,VFS
96 和其他子系统中各个变化。
97
9824:所有的内存屏障{e.g., barrier(), rmb(), wmb()}需要在源代码中的一个注释来解释他们都是干什么的
99 以及原因。
100
10125:如果有任何输入输出控制的补丁被添加,也要更新Documentation/ioctl/ioctl-number.txt。
102
10326:如果你的更改代码依靠或者使用任何的内核APIs或者与下面的kconfig符号有关系的功能,你就要
104 使用相关的kconfig符号关闭, and/or =m(如果选项提供)[在同一时间不是所用的都启用,仅仅各个或者自由
105 组合他们]:
106
107 CONFIG_SMP, CONFIG_SYSFS, CONFIG_PROC_FS, CONFIG_INPUT, CONFIG_PCI,
108 CONFIG_BLOCK, CONFIG_PM, CONFIG_HOTPLUG, CONFIG_MAGIC_SYSRQ,
109 CONFIG_NET, CONFIG_INET=n (后一个使用 CONFIG_NET=y)
diff --git a/Documentation/zh_CN/SubmittingPatches b/Documentation/zh_CN/SubmittingPatches
index 9a1a6e1ed09e..0f4385a62a49 100644
--- a/Documentation/zh_CN/SubmittingPatches
+++ b/Documentation/zh_CN/SubmittingPatches
@@ -100,7 +100,7 @@ http://userweb.kernel.org/~akpm/stuff/patch-scripts.tar.gz
100 100
101灏嗘敼鍔ㄦ媶鍒嗭紝閫昏緫绫讳技鐨勬斁鍒板悓涓涓ˉ涓佹枃浠堕噷銆 101灏嗘敼鍔ㄦ媶鍒嗭紝閫昏緫绫讳技鐨勬斁鍒板悓涓涓ˉ涓佹枃浠堕噷銆
102 102
103渚嬪锛屽鏋滀綘鐨勬敼鍔ㄩ噷鍚屾椂鏈塨ug淇鍜屾ц兘浼樺寲锛岄偅涔堟妸杩欎簺鏀瑰姩鍒嗗埌涓や釜鎴 103渚嬪锛屽鏋滀綘鐨勬敼鍔ㄩ噷鍚屾椂鏈塨ug淇鍜屾ц兘浼樺寲锛岄偅涔堟妸杩欎簺鏀瑰姩鍒嗗埌涓や釜鎴
104鑰呮洿澶氱殑琛ヤ竵鏂囦欢涓傚鏋滀綘鐨勬敼鍔ㄥ寘鍚API鐨勪慨鏀癸紝骞朵笖淇敼浜嗛┍鍔ㄧ▼搴忔潵閫 104鑰呮洿澶氱殑琛ヤ竵鏂囦欢涓傚鏋滀綘鐨勬敼鍔ㄥ寘鍚API鐨勪慨鏀癸紝骞朵笖淇敼浜嗛┍鍔ㄧ▼搴忔潵閫
105搴旇繖浜涙柊鐨凙PI锛岄偅涔堟妸杩欎簺淇敼鍒嗘垚涓や釜琛ヤ竵銆 105搴旇繖浜涙柊鐨凙PI锛岄偅涔堟妸杩欎簺淇敼鍒嗘垚涓や釜琛ヤ竵銆
106 106
@@ -230,7 +230,7 @@ pref("mailnews.display.disable_format_flowed_support", true);
230浜涘師鍥狅紝淇閿欒锛岄噸鏂版彁浜ゆ洿鏂板悗鐨勬敼鍔紝鏄綘鑷繁鐨勫伐浣溿 230浜涘師鍥狅紝淇閿欒锛岄噸鏂版彁浜ゆ洿鏂板悗鐨勬敼鍔紝鏄綘鑷繁鐨勫伐浣溿
231 231
232Linus涓嶇粰鍑轰换浣曡瘎璁哄氨鈥滀涪寮冣濅綘鐨勮ˉ涓佹槸甯歌鐨勪簨鎯呫傚湪绯荤粺涓繖鏍风殑浜嬫儏寰 232Linus涓嶇粰鍑轰换浣曡瘎璁哄氨鈥滀涪寮冣濅綘鐨勮ˉ涓佹槸甯歌鐨勪簨鎯呫傚湪绯荤粺涓繖鏍风殑浜嬫儏寰
233骞冲父銆傚鏋滀粬娌℃湁鎺ュ彈浣犵殑琛ヤ竵锛屼篃璁告槸鐢变簬浠ヤ笅鍘 233骞冲父銆傚鏋滀粬娌℃湁鎺ュ彈浣犵殑琛ヤ竵锛屼篃璁告槸鐢变簬浠ヤ笅鍘
234* 浣犵殑琛ヤ竵涓嶈兘鍦ㄦ渶鏂扮増鏈殑鍐呮牳涓婂共鍑鐨勬墦涓娿 234* 浣犵殑琛ヤ竵涓嶈兘鍦ㄦ渶鏂扮増鏈殑鍐呮牳涓婂共鍑鐨勬墦涓娿
235* 浣犵殑琛ヤ竵鍦 linux-kernel 閭欢鍒楄〃涓病鏈夊緱鍒板厖鍒嗙殑璁ㄨ銆 235* 浣犵殑琛ヤ竵鍦 linux-kernel 閭欢鍒楄〃涓病鏈夊緱鍒板厖鍒嗙殑璁ㄨ銆
236* 椋庢牸闂锛堝弬鐓х2灏忚妭锛 236* 椋庢牸闂锛堝弬鐓х2灏忚妭锛
diff --git a/Documentation/zh_CN/magic-number.txt b/Documentation/zh_CN/magic-number.txt
new file mode 100644
index 000000000000..4c4ce853577b
--- /dev/null
+++ b/Documentation/zh_CN/magic-number.txt
@@ -0,0 +1,167 @@
1Chinese translated version of Documentation/magic-number.txt
2
3If you have any comment or update to the content, please post to LKML directly.
4However, if you have problem communicating in English you can also ask the
5Chinese maintainer for help. Contact the Chinese maintainer, if this
6translation is outdated or there is problem with translation.
7
8Chinese maintainer: Jia Wei Wei <harryxiyou@gmail.com>
9---------------------------------------------------------------------
10Documentation/magic-number.txt鐨勪腑鏂囩炕璇
11
12濡傛灉鎯宠瘎璁烘垨鏇存柊鏈枃鐨勫唴瀹癸紝璇风洿鎺ュ彂淇″埌LKML銆傚鏋滀綘浣跨敤鑻辨枃浜ゆ祦鏈夊洶闅剧殑璇濓紝涔熷彲
13浠ュ悜涓枃鐗堢淮鎶よ呮眰鍔┿傚鏋滄湰缈昏瘧鏇存柊涓嶅強鏃舵垨鑰呯炕璇戝瓨鍦ㄩ棶棰橈紝璇疯仈绯讳腑鏂囩増缁存姢鑰呫
14
15涓枃鐗堢淮鎶よ咃細 璐惧▉濞 Jia Wei Wei <harryxiyou@gmail.com>
16涓枃鐗堢炕璇戣咃細 璐惧▉濞 Jia Wei Wei <harryxiyou@gmail.com>
17涓枃鐗堟牎璇戣咃細 璐惧▉濞 Jia Wei Wei <harryxiyou@gmail.com>
18
19浠ヤ笅涓烘鏂
20---------------------------------------------------------------------
21杩欎釜鏂囦欢鏄湁鍏冲綋鍓嶄娇鐢ㄧ殑榄旀湳鍊兼敞鍐岃〃銆傚綋浣犵粰涓涓粨鏋勬坊鍔犱簡涓涓瓟鏈硷紝浣犱篃搴旇鎶婅繖涓瓟鏈兼坊鍔犲埌杩欎釜鏂囦欢锛屽洜涓烘垜浠渶濂芥妸鐢ㄤ簬鍚勭缁撴瀯鐨勯瓟鏈肩粺涓璧锋潵銆
22
23浣跨敤榄旀湳鍊兼潵淇濇姢鍐呮牳鏁版嵁缁撴瀯鏄竴涓潪甯稿ソ鐨勪富鎰忋傝繖灏卞厑璁镐綘鍦ㄨ繍琛屾湡妫鏌(a)涓涓粨鏋勬槸鍚﹀凡缁忚鏀诲嚮锛屾垨鑰(b)浣犲凡缁忕粰涓涓緥琛岀▼搴忛氳繃浜嗕竴涓敊璇殑缁撴瀯銆傚悗涓绉嶆儏鍐电壒鍒湴鏈夌敤---鐗瑰埆鏄綋浣犻氳繃涓涓┖鎸囬拡鎸囧悜缁撴瀯浣撶殑鏃跺欍倀ty婧愮爜锛屼緥濡傦紝缁忓父閫氳繃鐗瑰畾椹卞姩浣跨敤杩欑鏂规硶骞朵笖鍙嶅鍦版帓鍒楃壒瀹氭柟闈㈢殑缁撴瀯銆
24
25浣跨敤榄旀湳鍊肩殑鏂规硶鏄湪缁撴瀯鐨勫紑濮嬪澹版槑鐨勶紝濡備笅锛
26
27struct tty_ldisc {
28 int magic;
29 ...
30};
31
32褰撲綘浠ュ悗缁欏唴鏍告坊鍔犲寮哄姛鑳界殑鏃跺欙紝璇烽伒瀹堣繖鏉¤鍒欙紒杩欐牱灏变細鑺傜渷鏁颁笉娓呯殑璋冭瘯鏃堕棿锛岀壒鍒槸涓浜涘彜鎬殑鎯呭喌锛屼緥濡傦紝鏁扮粍瓒呭嚭鑼冨洿骞朵笖閲嶆柊鍐欎簡瓒呭嚭閮ㄥ垎銆傞伒瀹堣繖涓鍒欙紝鈥繖浜涙儏鍐靛彲浠ヨ蹇熷湴锛屽畨鍏ㄥ湴閬垮厤銆
33
34 Theodore Ts'o
35 31 Mar 94
36
37缁欏綋鍓嶇殑Linux 2.1.55娣诲姞榄旀湳琛ㄣ
38
39 Michael Chastain
40 <mailto:mec@shout.net>
41 22 Sep 1997
42
43鐜板湪搴旇鏈鏂扮殑Linux 2.1.112.鍥犱负鍦ㄧ壒鎬у喕缁撴湡闂达紝涓嶈兘鍦2.2.x鍓嶆敼鍙樹换浣曚笢瑗裤傝繖浜涙潯鐩鏁板煙鎵鎺掑簭銆
44
45 Krzysztof G.Baranowski
46 <mailto: kgb@knm.org.pl>
47 29 Jul 1998
48
49鏇存柊榄旀湳琛ㄥ埌Linux 2.5.45銆傚垰濂借秺杩囩壒鎬у喕缁擄紝浣嗘槸鏈夊彲鑳借繕浼氭湁涓浜涙柊鐨勯瓟鏈煎湪2.6.x涔嬪墠铻嶅叆鍒板唴鏍镐腑銆
50
51 Petr Baudis
52 <pasky@ucw.cz>
53 03 Nov 2002
54
55鏇存柊榄旀湳琛ㄥ埌Linux 2.5.74銆
56
57 Fabian Frederick
58 <ffrederick@users.sourceforge.net>
59 09 Jul 2003
60
61榄旀湳鍚 鍦板潃 缁撴瀯 鎵鍦ㄦ枃浠
62===========================================================================
63PG_MAGIC 'P' pg_{read,write}_hdr include/linux/pg.h
64CMAGIC 0x0111 user include/linux/a.out.h
65MKISS_DRIVER_MAGIC 0x04bf mkiss_channel drivers/net/mkiss.h
66RISCOM8_MAGIC 0x0907 riscom_port drivers/char/riscom8.h
67SPECIALIX_MAGIC 0x0907 specialix_port drivers/char/specialix_io8.h
68HDLC_MAGIC 0x239e n_hdlc drivers/char/n_hdlc.c
69APM_BIOS_MAGIC 0x4101 apm_user arch/i386/kernel/apm.c
70CYCLADES_MAGIC 0x4359 cyclades_port include/linux/cyclades.h
71DB_MAGIC 0x4442 fc_info drivers/net/iph5526_novram.c
72DL_MAGIC 0x444d fc_info drivers/net/iph5526_novram.c
73FASYNC_MAGIC 0x4601 fasync_struct include/linux/fs.h
74FF_MAGIC 0x4646 fc_info drivers/net/iph5526_novram.c
75ISICOM_MAGIC 0x4d54 isi_port include/linux/isicom.h
76PTY_MAGIC 0x5001 drivers/char/pty.c
77PPP_MAGIC 0x5002 ppp include/linux/if_pppvar.h
78SERIAL_MAGIC 0x5301 async_struct include/linux/serial.h
79SSTATE_MAGIC 0x5302 serial_state include/linux/serial.h
80SLIP_MAGIC 0x5302 slip drivers/net/slip.h
81STRIP_MAGIC 0x5303 strip drivers/net/strip.c
82X25_ASY_MAGIC 0x5303 x25_asy drivers/net/x25_asy.h
83SIXPACK_MAGIC 0x5304 sixpack drivers/net/hamradio/6pack.h
84AX25_MAGIC 0x5316 ax_disp drivers/net/mkiss.h
85ESP_MAGIC 0x53ee esp_struct drivers/char/esp.h
86TTY_MAGIC 0x5401 tty_struct include/linux/tty.h
87MGSL_MAGIC 0x5401 mgsl_info drivers/char/synclink.c
88TTY_DRIVER_MAGIC 0x5402 tty_driver include/linux/tty_driver.h
89MGSLPC_MAGIC 0x5402 mgslpc_info drivers/char/pcmcia/synclink_cs.c
90TTY_LDISC_MAGIC 0x5403 tty_ldisc include/linux/tty_ldisc.h
91USB_SERIAL_MAGIC 0x6702 usb_serial drivers/usb/serial/usb-serial.h
92FULL_DUPLEX_MAGIC 0x6969 drivers/net/tulip/de2104x.c
93USB_BLUETOOTH_MAGIC 0x6d02 usb_bluetooth drivers/usb/class/bluetty.c
94RFCOMM_TTY_MAGIC 0x6d02 net/bluetooth/rfcomm/tty.c
95USB_SERIAL_PORT_MAGIC 0x7301 usb_serial_port drivers/usb/serial/usb-serial.h
96CG_MAGIC 0x00090255 ufs_cylinder_group include/linux/ufs_fs.h
97A2232_MAGIC 0x000a2232 gs_port drivers/char/ser_a2232.h
98RPORT_MAGIC 0x00525001 r_port drivers/char/rocket_int.h
99LSEMAGIC 0x05091998 lse drivers/fc4/fc.c
100GDTIOCTL_MAGIC 0x06030f07 gdth_iowr_str drivers/scsi/gdth_ioctl.h
101RIEBL_MAGIC 0x09051990 drivers/net/atarilance.c
102RIO_MAGIC 0x12345678 gs_port drivers/char/rio/rio_linux.c
103SX_MAGIC 0x12345678 gs_port drivers/char/sx.h
104NBD_REQUEST_MAGIC 0x12560953 nbd_request include/linux/nbd.h
105RED_MAGIC2 0x170fc2a5 (any) mm/slab.c
106BAYCOM_MAGIC 0x19730510 baycom_state drivers/net/baycom_epp.c
107ISDN_X25IFACE_MAGIC 0x1e75a2b9 isdn_x25iface_proto_data
108 drivers/isdn/isdn_x25iface.h
109ECP_MAGIC 0x21504345 cdkecpsig include/linux/cdk.h
110LSOMAGIC 0x27091997 lso drivers/fc4/fc.c
111LSMAGIC 0x2a3b4d2a ls drivers/fc4/fc.c
112WANPIPE_MAGIC 0x414C4453 sdla_{dump,exec} include/linux/wanpipe.h
113CS_CARD_MAGIC 0x43525553 cs_card sound/oss/cs46xx.c
114LABELCL_MAGIC 0x4857434c labelcl_info_s include/asm/ia64/sn/labelcl.h
115ISDN_ASYNC_MAGIC 0x49344C01 modem_info include/linux/isdn.h
116CTC_ASYNC_MAGIC 0x49344C01 ctc_tty_info drivers/s390/net/ctctty.c
117ISDN_NET_MAGIC 0x49344C02 isdn_net_local_s drivers/isdn/i4l/isdn_net_lib.h
118SAVEKMSG_MAGIC2 0x4B4D5347 savekmsg arch/*/amiga/config.c
119STLI_BOARDMAGIC 0x4bc6c825 stlibrd include/linux/istallion.h
120CS_STATE_MAGIC 0x4c4f4749 cs_state sound/oss/cs46xx.c
121SLAB_C_MAGIC 0x4f17a36d kmem_cache mm/slab.c
122COW_MAGIC 0x4f4f4f4d cow_header_v1 arch/um/drivers/ubd_user.c
123I810_CARD_MAGIC 0x5072696E i810_card sound/oss/i810_audio.c
124TRIDENT_CARD_MAGIC 0x5072696E trident_card sound/oss/trident.c
125ROUTER_MAGIC 0x524d4157 wan_device include/linux/wanrouter.h
126SCC_MAGIC 0x52696368 gs_port drivers/char/scc.h
127SAVEKMSG_MAGIC1 0x53415645 savekmsg arch/*/amiga/config.c
128GDA_MAGIC 0x58464552 gda arch/mips/include/asm/sn/gda.h
129RED_MAGIC1 0x5a2cf071 (any) mm/slab.c
130STL_PORTMAGIC 0x5a7182c9 stlport include/linux/stallion.h
131EEPROM_MAGIC_VALUE 0x5ab478d2 lanai_dev drivers/atm/lanai.c
132HDLCDRV_MAGIC 0x5ac6e778 hdlcdrv_state include/linux/hdlcdrv.h
133EPCA_MAGIC 0x5c6df104 channel include/linux/epca.h
134PCXX_MAGIC 0x5c6df104 channel drivers/char/pcxx.h
135KV_MAGIC 0x5f4b565f kernel_vars_s arch/mips/include/asm/sn/klkernvars.h
136I810_STATE_MAGIC 0x63657373 i810_state sound/oss/i810_audio.c
137TRIDENT_STATE_MAGIC 0x63657373 trient_state sound/oss/trident.c
138M3_CARD_MAGIC 0x646e6f50 m3_card sound/oss/maestro3.c
139FW_HEADER_MAGIC 0x65726F66 fw_header drivers/atm/fore200e.h
140SLOT_MAGIC 0x67267321 slot drivers/hotplug/cpqphp.h
141SLOT_MAGIC 0x67267322 slot drivers/hotplug/acpiphp.h
142LO_MAGIC 0x68797548 nbd_device include/linux/nbd.h
143OPROFILE_MAGIC 0x6f70726f super_block drivers/oprofile/oprofilefs.h
144M3_STATE_MAGIC 0x734d724d m3_state sound/oss/maestro3.c
145STL_PANELMAGIC 0x7ef621a1 stlpanel include/linux/stallion.h
146VMALLOC_MAGIC 0x87654320 snd_alloc_track sound/core/memory.c
147KMALLOC_MAGIC 0x87654321 snd_alloc_track sound/core/memory.c
148PWC_MAGIC 0x89DC10AB pwc_device drivers/usb/media/pwc.h
149NBD_REPLY_MAGIC 0x96744668 nbd_reply include/linux/nbd.h
150STL_BOARDMAGIC 0xa2267f52 stlbrd include/linux/stallion.h
151ENI155_MAGIC 0xa54b872d midway_eprom drivers/atm/eni.h
152SCI_MAGIC 0xbabeface gs_port drivers/char/sh-sci.h
153CODA_MAGIC 0xC0DAC0DA coda_file_info include/linux/coda_fs_i.h
154DPMEM_MAGIC 0xc0ffee11 gdt_pci_sram drivers/scsi/gdth.h
155STLI_PORTMAGIC 0xe671c7a1 stliport include/linux/istallion.h
156YAM_MAGIC 0xF10A7654 yam_port drivers/net/hamradio/yam.c
157CCB_MAGIC 0xf2691ad2 ccb drivers/scsi/ncr53c8xx.c
158QUEUE_MAGIC_FREE 0xf7e1c9a3 queue_entry drivers/scsi/arm/queue.c
159QUEUE_MAGIC_USED 0xf7e1cc33 queue_entry drivers/scsi/arm/queue.c
160HTB_CMAGIC 0xFEFAFEF1 htb_class net/sched/sch_htb.c
161NMI_MAGIC 0x48414d4d455201 nmi_s arch/mips/include/asm/sn/nmi.h
162
163璇锋敞鎰忥紝鍦ㄥ0闊宠蹇嗙鐞嗕腑浠嶇劧鏈夋瘡涓浜涜瀹氫箟鐨勯┍鍔ㄩ瓟鏈笺傛煡鐪媔nclude/sound/sndmagic.h鏉ヨ幏鍙栦粬浠畬鏁寸殑鍒楄〃淇℃伅銆傚緢澶歄SS澹伴煶椹卞姩鎷ユ湁鑷繁浠庡0鍗CI ID鏋勫缓鐨勯瓟鏈-浠栦滑涔熸病鏈夎鍒楀湪杩欓噷銆
164
165IrDA瀛愮郴缁熶篃浣跨敤浜嗗ぇ閲忕殑鑷繁鐨勯瓟鏈硷紝鏌ョ湅include/net/irda/irda.h鏉ヨ幏鍙栦粬浠畬鏁寸殑淇℃伅銆
166
167HFS鏄彟澶栦竴涓瘮杈冨ぇ鐨勪娇鐢ㄩ瓟鏈肩殑鏂囦欢绯荤粺-浣犲彲浠ュ湪fs/hfs/hfs.h涓壘鍒颁粬浠