aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation
diff options
context:
space:
mode:
Diffstat (limited to 'Documentation')
-rw-r--r--Documentation/00-INDEX4
-rw-r--r--Documentation/ABI/testing/sysfs-ata99
-rw-r--r--Documentation/ABI/testing/sysfs-devices-power88
-rw-r--r--Documentation/ABI/testing/sysfs-driver-hid-roccat-pyra98
-rw-r--r--Documentation/ABI/testing/sysfs-module12
-rw-r--r--Documentation/ABI/testing/sysfs-power29
-rw-r--r--Documentation/DMA-API-HOWTO.txt16
-rw-r--r--Documentation/DMA-API.txt6
-rw-r--r--Documentation/DocBook/80211.tmpl495
-rw-r--r--Documentation/DocBook/Makefile6
-rw-r--r--Documentation/DocBook/device-drivers.tmpl1
-rw-r--r--Documentation/DocBook/drm.tmpl1
-rw-r--r--Documentation/DocBook/genericirq.tmpl84
-rw-r--r--Documentation/DocBook/kernel-api.tmpl5
-rw-r--r--Documentation/DocBook/kernel-locking.tmpl27
-rw-r--r--Documentation/DocBook/mac80211.tmpl337
-rw-r--r--Documentation/DocBook/tracepoint.tmpl5
-rw-r--r--Documentation/RCU/checklist.txt46
-rw-r--r--Documentation/RCU/stallwarn.txt18
-rw-r--r--Documentation/RCU/trace.txt13
-rw-r--r--Documentation/acpi/method-customizing.txt2
-rw-r--r--Documentation/arm/00-INDEX2
-rw-r--r--Documentation/arm/msm/gpiomux.txt176
-rw-r--r--Documentation/block/00-INDEX4
-rw-r--r--Documentation/block/barrier.txt261
-rw-r--r--Documentation/block/cfq-iosched.txt45
-rw-r--r--Documentation/block/writeback_cache_control.txt86
-rw-r--r--Documentation/cgroups/blkio-controller.txt134
-rw-r--r--Documentation/cpu-hotplug.txt2
-rw-r--r--Documentation/cputopology.txt23
-rw-r--r--Documentation/devices.txt7
-rw-r--r--Documentation/dynamic-debug-howto.txt22
-rw-r--r--Documentation/feature-removal-schedule.txt54
-rw-r--r--Documentation/filesystems/Locking8
-rw-r--r--Documentation/filesystems/ocfs2.txt7
-rw-r--r--Documentation/filesystems/squashfs.txt2
-rw-r--r--Documentation/filesystems/vfs.txt6
-rw-r--r--Documentation/gpio.txt57
-rw-r--r--Documentation/hwmon/emc210333
-rw-r--r--Documentation/hwmon/f71882fg4
-rw-r--r--Documentation/hwmon/ltc424524
-rw-r--r--Documentation/hwmon/pc8742727
-rw-r--r--Documentation/hwmon/sysfs-interface36
-rw-r--r--Documentation/hwmon/w83627ehf15
-rw-r--r--Documentation/i2c/instantiating-devices2
-rw-r--r--Documentation/input/ntrig.txt126
-rw-r--r--Documentation/kbuild/makefiles.txt6
-rw-r--r--Documentation/kernel-doc-nano-HOWTO.txt5
-rw-r--r--Documentation/kernel-parameters.txt199
-rw-r--r--Documentation/kprobes.txt8
-rw-r--r--Documentation/kvm/api.txt61
-rw-r--r--Documentation/kvm/ppc-pv.txt196
-rw-r--r--Documentation/kvm/timekeeping.txt612
-rw-r--r--Documentation/laptops/thinkpad-acpi.txt4
-rw-r--r--Documentation/lguest/Makefile3
-rw-r--r--Documentation/lguest/lguest.c52
-rw-r--r--Documentation/mmc/00-INDEX4
-rw-r--r--Documentation/mmc/mmc-dev-attrs.txt56
-rw-r--r--Documentation/mutex-design.txt3
-rw-r--r--Documentation/networking/bonding.txt8
-rw-r--r--Documentation/networking/can.txt12
-rw-r--r--Documentation/networking/dccp.txt29
-rw-r--r--Documentation/networking/e1000.txt373
-rw-r--r--Documentation/networking/e1000e.txt302
-rw-r--r--Documentation/networking/ip-sysctl.txt27
-rw-r--r--[-rwxr-xr-x]Documentation/networking/ixgbevf.txt40
-rw-r--r--Documentation/networking/phonet.txt56
-rw-r--r--Documentation/networking/timestamping.txt22
-rw-r--r--Documentation/networking/wavelan.txt74
-rw-r--r--Documentation/padata.txt24
-rw-r--r--Documentation/pcmcia/driver-changes.txt25
-rw-r--r--Documentation/power/00-INDEX2
-rw-r--r--Documentation/power/interface.txt2
-rw-r--r--Documentation/power/opp.txt375
-rw-r--r--Documentation/power/regulator/overview.txt2
-rw-r--r--Documentation/power/runtime_pm.txt227
-rw-r--r--Documentation/power/s2ram.txt7
-rw-r--r--Documentation/power/swsusp.txt3
-rw-r--r--Documentation/powerpc/booting-without-of.txt31
-rw-r--r--Documentation/powerpc/dts-bindings/fsl/esdhc.txt2
-rw-r--r--Documentation/powerpc/dts-bindings/fsl/spi.txt24
-rw-r--r--Documentation/powerpc/dts-bindings/fsl/usb.txt22
-rw-r--r--Documentation/powerpc/hvcs.txt2
-rw-r--r--Documentation/scsi/scsi-parameters.txt139
-rw-r--r--Documentation/scsi/st.txt15
-rw-r--r--Documentation/sound/alsa/HD-Audio-Models.txt14
-rw-r--r--Documentation/usb/proc_usb_info.txt34
-rw-r--r--Documentation/vm/page-types.c2
-rw-r--r--Documentation/workqueue.txt381
-rw-r--r--Documentation/x86/x86_64/kernel-stacks6
90 files changed, 4623 insertions, 1423 deletions
diff --git a/Documentation/00-INDEX b/Documentation/00-INDEX
index 5405f7aecefc..8dfc6708a257 100644
--- a/Documentation/00-INDEX
+++ b/Documentation/00-INDEX
@@ -130,8 +130,6 @@ edac.txt
130 - information on EDAC - Error Detection And Correction 130 - information on EDAC - Error Detection And Correction
131eisa.txt 131eisa.txt
132 - info on EISA bus support. 132 - info on EISA bus support.
133exception.txt
134 - how Linux v2.2 handles exceptions without verify_area etc.
135fault-injection/ 133fault-injection/
136 - dir with docs about the fault injection capabilities infrastructure. 134 - dir with docs about the fault injection capabilities infrastructure.
137fb/ 135fb/
@@ -234,6 +232,8 @@ memory.txt
234 - info on typical Linux memory problems. 232 - info on typical Linux memory problems.
235mips/ 233mips/
236 - directory with info about Linux on MIPS architecture. 234 - directory with info about Linux on MIPS architecture.
235mmc/
236 - directory with info about the MMC subsystem
237mono.txt 237mono.txt
238 - how to execute Mono-based .NET binaries with the help of BINFMT_MISC. 238 - how to execute Mono-based .NET binaries with the help of BINFMT_MISC.
239mutex-design.txt 239mutex-design.txt
diff --git a/Documentation/ABI/testing/sysfs-ata b/Documentation/ABI/testing/sysfs-ata
new file mode 100644
index 000000000000..0a932155cbba
--- /dev/null
+++ b/Documentation/ABI/testing/sysfs-ata
@@ -0,0 +1,99 @@
1What: /sys/class/ata_...
2Date: August 2008
3Contact: Gwendal Grignou<gwendal@google.com>
4Description:
5
6Provide a place in sysfs for storing the ATA topology of the system. This allows
7retrieving various information about ATA objects.
8
9Files under /sys/class/ata_port
10-------------------------------
11
12 For each port, a directory ataX is created where X is the ata_port_id of
13 the port. The device parent is the ata host device.
14
15idle_irq (read)
16
17 Number of IRQ received by the port while idle [some ata HBA only].
18
19nr_pmp_links (read)
20
21 If a SATA Port Multiplier (PM) is connected, number of link behind it.
22
23Files under /sys/class/ata_link
24-------------------------------
25
26 Behind each port, there is a ata_link. If there is a SATA PM in the
27 topology, 15 ata_link objects are created.
28
29 If a link is behind a port, the directory name is linkX, where X is
30 ata_port_id of the port.
31 If a link is behind a PM, its name is linkX.Y where X is ata_port_id
32 of the parent port and Y the PM port.
33
34hw_sata_spd_limit
35
36 Maximum speed supported by the connected SATA device.
37
38sata_spd_limit
39
40 Maximum speed imposed by libata.
41
42sata_spd
43
44 Current speed of the link [1.5, 3Gps,...].
45
46Files under /sys/class/ata_device
47---------------------------------
48
49 Behind each link, up to two ata device are created.
50 The name of the directory is devX[.Y].Z where:
51 - X is ata_port_id of the port where the device is connected,
52 - Y the port of the PM if any, and
53 - Z the device id: for PATA, there is usually 2 devices [0,1],
54 only 1 for SATA.
55
56class
57 Device class. Can be "ata" for disk, "atapi" for packet device,
58 "pmp" for PM, or "none" if no device was found behind the link.
59
60dma_mode
61
62 Transfer modes supported by the device when in DMA mode.
63 Mostly used by PATA device.
64
65pio_mode
66
67 Transfer modes supported by the device when in PIO mode.
68 Mostly used by PATA device.
69
70xfer_mode
71
72 Current transfer mode.
73
74id
75
76 Cached result of IDENTIFY command, as described in ATA8 7.16 and 7.17.
77 Only valid if the device is not a PM.
78
79gscr
80
81 Cached result of the dump of PM GSCR register.
82 Valid registers are:
83 0: SATA_PMP_GSCR_PROD_ID,
84 1: SATA_PMP_GSCR_REV,
85 2: SATA_PMP_GSCR_PORT_INFO,
86 32: SATA_PMP_GSCR_ERROR,
87 33: SATA_PMP_GSCR_ERROR_EN,
88 64: SATA_PMP_GSCR_FEAT,
89 96: SATA_PMP_GSCR_FEAT_EN,
90 130: SATA_PMP_GSCR_SII_GPIO
91 Only valid if the device is a PM.
92
93spdn_cnt
94
95 Number of time libata decided to lower the speed of link due to errors.
96
97ering
98
99 Formatted output of the error ring of the device.
diff --git a/Documentation/ABI/testing/sysfs-devices-power b/Documentation/ABI/testing/sysfs-devices-power
index 6123c523bfd7..7628cd1bc36a 100644
--- a/Documentation/ABI/testing/sysfs-devices-power
+++ b/Documentation/ABI/testing/sysfs-devices-power
@@ -77,3 +77,91 @@ Description:
77 devices this attribute is set to "enabled" by bus type code or 77 devices this attribute is set to "enabled" by bus type code or
78 device drivers and in that cases it should be safe to leave the 78 device drivers and in that cases it should be safe to leave the
79 default value. 79 default value.
80
81What: /sys/devices/.../power/wakeup_count
82Date: September 2010
83Contact: Rafael J. Wysocki <rjw@sisk.pl>
84Description:
85 The /sys/devices/.../wakeup_count attribute contains the number
86 of signaled wakeup events associated with the device. This
87 attribute is read-only. If the device is not enabled to wake up
88 the system from sleep states, this attribute is empty.
89
90What: /sys/devices/.../power/wakeup_active_count
91Date: September 2010
92Contact: Rafael J. Wysocki <rjw@sisk.pl>
93Description:
94 The /sys/devices/.../wakeup_active_count attribute contains the
95 number of times the processing of wakeup events associated with
96 the device was completed (at the kernel level). This attribute
97 is read-only. If the device is not enabled to wake up the
98 system from sleep states, this attribute is empty.
99
100What: /sys/devices/.../power/wakeup_hit_count
101Date: September 2010
102Contact: Rafael J. Wysocki <rjw@sisk.pl>
103Description:
104 The /sys/devices/.../wakeup_hit_count attribute contains the
105 number of times the processing of a wakeup event associated with
106 the device might prevent the system from entering a sleep state.
107 This attribute is read-only. If the device is not enabled to
108 wake up the system from sleep states, this attribute is empty.
109
110What: /sys/devices/.../power/wakeup_active
111Date: September 2010
112Contact: Rafael J. Wysocki <rjw@sisk.pl>
113Description:
114 The /sys/devices/.../wakeup_active attribute contains either 1,
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.
117 If the device is not enabled to wake up the system from sleep
118 states, this attribute is empty.
119
120What: /sys/devices/.../power/wakeup_total_time_ms
121Date: September 2010
122Contact: Rafael J. Wysocki <rjw@sisk.pl>
123Description:
124 The /sys/devices/.../wakeup_total_time_ms attribute contains
125 the total time of processing wakeup events associated with 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,
128 this attribute is empty.
129
130What: /sys/devices/.../power/wakeup_max_time_ms
131Date: September 2010
132Contact: Rafael J. Wysocki <rjw@sisk.pl>
133Description:
134 The /sys/devices/.../wakeup_max_time_ms attribute contains
135 the maximum time of processing a single wakeup event associated
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
138 states, this attribute is empty.
139
140What: /sys/devices/.../power/wakeup_last_time_ms
141Date: September 2010
142Contact: Rafael J. Wysocki <rjw@sisk.pl>
143Description:
144 The /sys/devices/.../wakeup_last_time_ms attribute contains
145 the value of the monotonic clock corresponding to the time of
146 signaling the last wakeup event associated with the device, in
147 milliseconds. This attribute is read-only. If the device is
148 not enabled to wake up the system from sleep states, this
149 attribute is empty.
150
151What: /sys/devices/.../power/autosuspend_delay_ms
152Date: September 2010
153Contact: Alan Stern <stern@rowland.harvard.edu>
154Description:
155 The /sys/devices/.../power/autosuspend_delay_ms attribute
156 contains the autosuspend delay value (in milliseconds). Some
157 drivers do not want their device to suspend as soon as it
158 becomes idle at run time; they want the device to remain
159 inactive for a certain minimum period of time first. That
160 period is called the autosuspend delay. Negative values will
161 prevent the device from being suspended at run time (similar
162 to writing "on" to the power/control attribute). Values >=
163 1000 will cause the autosuspend timer expiration to be rounded
164 up to the nearest second.
165
166 Not all drivers support this attribute. If it isn't supported,
167 attempts to read or write it will yield I/O errors.
diff --git a/Documentation/ABI/testing/sysfs-driver-hid-roccat-pyra b/Documentation/ABI/testing/sysfs-driver-hid-roccat-pyra
new file mode 100644
index 000000000000..ad1125b02ff4
--- /dev/null
+++ b/Documentation/ABI/testing/sysfs-driver-hid-roccat-pyra
@@ -0,0 +1,98 @@
1What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/actual_cpi
2Date: August 2010
3Contact: Stefan Achatz <erazor_de@users.sourceforge.net>
4Description: It is possible to switch the cpi setting of the mouse with the
5 press of a button.
6 When read, this file returns the raw number of the actual cpi
7 setting reported by the mouse. This number has to be further
8 processed to receive the real dpi value.
9
10 VALUE DPI
11 1 400
12 2 800
13 4 1600
14
15 This file is readonly.
16
17What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/actual_profile
18Date: August 2010
19Contact: Stefan Achatz <erazor_de@users.sourceforge.net>
20Description: When read, this file returns the number of the actual profile in
21 range 0-4.
22 This file is readonly.
23
24What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/firmware_version
25Date: August 2010
26Contact: Stefan Achatz <erazor_de@users.sourceforge.net>
27Description: When read, this file returns the raw integer version number of the
28 firmware reported by the mouse. Using the integer value eases
29 further usage in other programs. To receive the real version
30 number the decimal point has to be shifted 2 positions to the
31 left. E.g. a returned value of 138 means 1.38
32 This file is readonly.
33
34What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/profile_settings
35Date: August 2010
36Contact: Stefan Achatz <erazor_de@users.sourceforge.net>
37Description: The mouse can store 5 profiles which can be switched by the
38 press of a button. A profile is split in settings and buttons.
39 profile_settings holds informations like resolution, sensitivity
40 and light effects.
41 When written, this file lets one write the respective profile
42 settings back to the mouse. The data has to be 13 bytes long.
43 The mouse will reject invalid data.
44 Which profile to write is determined by the profile number
45 contained in the data.
46 This file is writeonly.
47
48What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/profile[1-5]_settings
49Date: August 2010
50Contact: Stefan Achatz <erazor_de@users.sourceforge.net>
51Description: The mouse can store 5 profiles which can be switched by the
52 press of a button. A profile is split in settings and buttons.
53 profile_settings holds informations like resolution, sensitivity
54 and light effects.
55 When read, these files return the respective profile settings.
56 The returned data is 13 bytes in size.
57 This file is readonly.
58
59What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/profile_buttons
60Date: August 2010
61Contact: Stefan Achatz <erazor_de@users.sourceforge.net>
62Description: The mouse can store 5 profiles which can be switched by the
63 press of a button. A profile is split in settings and buttons.
64 profile_buttons holds informations about button layout.
65 When written, this file lets one write the respective profile
66 buttons back to the mouse. The data has to be 19 bytes long.
67 The mouse will reject invalid data.
68 Which profile to write is determined by the profile number
69 contained in the data.
70 This file is writeonly.
71
72What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/profile[1-5]_buttons
73Date: August 2010
74Contact: Stefan Achatz <erazor_de@users.sourceforge.net>
75Description: The mouse can store 5 profiles which can be switched by the
76 press of a button. A profile is split in settings and buttons.
77 profile_buttons holds informations about button layout.
78 When read, these files return the respective profile buttons.
79 The returned data is 19 bytes in size.
80 This file is readonly.
81
82What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/startup_profile
83Date: August 2010
84Contact: Stefan Achatz <erazor_de@users.sourceforge.net>
85Description: The integer value of this attribute ranges from 0-4.
86 When read, this attribute returns the number of the profile
87 that's active when the mouse is powered on.
88 This file is readonly.
89
90What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/settings
91Date: August 2010
92Contact: Stefan Achatz <erazor_de@users.sourceforge.net>
93Description: When read, this file returns the settings stored in the mouse.
94 The size of the data is 3 bytes and holds information on the
95 startup_profile.
96 When written, this file lets write settings back to the mouse.
97 The data has to be 3 bytes long. The mouse will reject invalid
98 data.
diff --git a/Documentation/ABI/testing/sysfs-module b/Documentation/ABI/testing/sysfs-module
new file mode 100644
index 000000000000..cfcec3bffc0a
--- /dev/null
+++ b/Documentation/ABI/testing/sysfs-module
@@ -0,0 +1,12 @@
1What: /sys/module/pch_phub/drivers/.../pch_mac
2Date: August 2010
3KernelVersion: 2.6.35
4Contact: masa-korg@dsn.okisemi.com
5Description: Write/read GbE MAC address.
6
7What: /sys/module/pch_phub/drivers/.../pch_firmware
8Date: August 2010
9KernelVersion: 2.6.35
10Contact: masa-korg@dsn.okisemi.com
11Description: Write/read Option ROM data.
12
diff --git a/Documentation/ABI/testing/sysfs-power b/Documentation/ABI/testing/sysfs-power
index 2875f1f74a07..194ca446ac28 100644
--- a/Documentation/ABI/testing/sysfs-power
+++ b/Documentation/ABI/testing/sysfs-power
@@ -99,9 +99,38 @@ Description:
99 99
100 dmesg -s 1000000 | grep 'hash matches' 100 dmesg -s 1000000 | grep 'hash matches'
101 101
102 If you do not get any matches (or they appear to be false
103 positives), it is possible that the last PM event point
104 referred to a device created by a loadable kernel module. In
105 this case cat /sys/power/pm_trace_dev_match (see below) after
106 your system is started up and the kernel modules are loaded.
107
102 CAUTION: Using it will cause your machine's real-time (CMOS) 108 CAUTION: Using it will cause your machine's real-time (CMOS)
103 clock to be set to a random invalid time after a resume. 109 clock to be set to a random invalid time after a resume.
104 110
111What; /sys/power/pm_trace_dev_match
112Date: October 2010
113Contact: James Hogan <james@albanarts.com>
114Description:
115 The /sys/power/pm_trace_dev_match file contains the name of the
116 device associated with the last PM event point saved in the RTC
117 across reboots when pm_trace has been used. More precisely it
118 contains the list of current devices (including those
119 registered by loadable kernel modules since boot) which match
120 the device hash in the RTC at boot, with a newline after each
121 one.
122
123 The advantage of this file over the hash matches printed to the
124 kernel log (see /sys/power/pm_trace), is that it includes
125 devices created after boot by loadable kernel modules.
126
127 Due to the small hash size necessary to fit in the RTC, it is
128 possible that more than one device matches the hash, in which
129 case further investigation is required to determine which
130 device is causing the problem. Note that genuine RTC clock
131 values (such as when pm_trace has not been used), can still
132 match a device and output it's name here.
133
105What: /sys/power/pm_async 134What: /sys/power/pm_async
106Date: January 2009 135Date: January 2009
107Contact: Rafael J. Wysocki <rjw@sisk.pl> 136Contact: Rafael J. Wysocki <rjw@sisk.pl>
diff --git a/Documentation/DMA-API-HOWTO.txt b/Documentation/DMA-API-HOWTO.txt
index 98ce51796f71..d568bc235bc0 100644
--- a/Documentation/DMA-API-HOWTO.txt
+++ b/Documentation/DMA-API-HOWTO.txt
@@ -738,21 +738,31 @@ to "Closing".
738 CONFIG_NEED_SG_DMA_LENGTH if the architecture supports IOMMUs 738 CONFIG_NEED_SG_DMA_LENGTH if the architecture supports IOMMUs
739 (including software IOMMU). 739 (including software IOMMU).
740 740
7412) ARCH_KMALLOC_MINALIGN 7412) ARCH_DMA_MINALIGN
742 742
743 Architectures must ensure that kmalloc'ed buffer is 743 Architectures must ensure that kmalloc'ed buffer is
744 DMA-safe. Drivers and subsystems depend on it. If an architecture 744 DMA-safe. Drivers and subsystems depend on it. If an architecture
745 isn't fully DMA-coherent (i.e. hardware doesn't ensure that data in 745 isn't fully DMA-coherent (i.e. hardware doesn't ensure that data in
746 the CPU cache is identical to data in main memory), 746 the CPU cache is identical to data in main memory),
747 ARCH_KMALLOC_MINALIGN must be set so that the memory allocator 747 ARCH_DMA_MINALIGN must be set so that the memory allocator
748 makes sure that kmalloc'ed buffer doesn't share a cache line with 748 makes sure that kmalloc'ed buffer doesn't share a cache line with
749 the others. See arch/arm/include/asm/cache.h as an example. 749 the others. See arch/arm/include/asm/cache.h as an example.
750 750
751 Note that ARCH_KMALLOC_MINALIGN is about DMA memory alignment 751 Note that ARCH_DMA_MINALIGN is about DMA memory alignment
752 constraints. You don't need to worry about the architecture data 752 constraints. You don't need to worry about the architecture data
753 alignment constraints (e.g. the alignment constraints about 64-bit 753 alignment constraints (e.g. the alignment constraints about 64-bit
754 objects). 754 objects).
755 755
7563) Supporting multiple types of IOMMUs
757
758 If your architecture needs to support multiple types of IOMMUs, you
759 can use include/linux/asm-generic/dma-mapping-common.h. It's a
760 library to support the DMA API with multiple types of IOMMUs. Lots
761 of architectures (x86, powerpc, sh, alpha, ia64, microblaze and
762 sparc) use it. Choose one to see how it can be used. If you need to
763 support multiple types of IOMMUs in a single system, the example of
764 x86 or powerpc helps.
765
756 Closing 766 Closing
757 767
758This document, and the API itself, would not be in its current 768This document, and the API itself, would not be in its current
diff --git a/Documentation/DMA-API.txt b/Documentation/DMA-API.txt
index 05e2ae236865..fe2326906610 100644
--- a/Documentation/DMA-API.txt
+++ b/Documentation/DMA-API.txt
@@ -456,12 +456,6 @@ be identical to those passed in (and returned by
456dma_alloc_noncoherent()). 456dma_alloc_noncoherent()).
457 457
458int 458int
459dma_is_consistent(struct device *dev, dma_addr_t dma_handle)
460
461Returns true if the device dev is performing consistent DMA on the memory
462area pointed to by the dma_handle.
463
464int
465dma_get_cache_alignment(void) 459dma_get_cache_alignment(void)
466 460
467Returns the processor cache alignment. This is the absolute minimum 461Returns the processor cache alignment. This is the absolute minimum
diff --git a/Documentation/DocBook/80211.tmpl b/Documentation/DocBook/80211.tmpl
new file mode 100644
index 000000000000..19a1210c2530
--- /dev/null
+++ b/Documentation/DocBook/80211.tmpl
@@ -0,0 +1,495 @@
1<?xml version="1.0" encoding="UTF-8"?>
2<!DOCTYPE set PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
3 "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd" []>
4<set>
5 <setinfo>
6 <title>The 802.11 subsystems &ndash; for kernel developers</title>
7 <subtitle>
8 Explaining wireless 802.11 networking in the Linux kernel
9 </subtitle>
10
11 <copyright>
12 <year>2007-2009</year>
13 <holder>Johannes Berg</holder>
14 </copyright>
15
16 <authorgroup>
17 <author>
18 <firstname>Johannes</firstname>
19 <surname>Berg</surname>
20 <affiliation>
21 <address><email>johannes@sipsolutions.net</email></address>
22 </affiliation>
23 </author>
24 </authorgroup>
25
26 <legalnotice>
27 <para>
28 This documentation is free software; you can redistribute
29 it and/or modify it under the terms of the GNU General Public
30 License version 2 as published by the Free Software Foundation.
31 </para>
32 <para>
33 This documentation is distributed in the hope that it will be
34 useful, but WITHOUT ANY WARRANTY; without even the implied
35 warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
36 See the GNU General Public License for more details.
37 </para>
38 <para>
39 You should have received a copy of the GNU General Public
40 License along with this documentation; if not, write to the Free
41 Software Foundation, Inc., 59 Temple Place, Suite 330, Boston,
42 MA 02111-1307 USA
43 </para>
44 <para>
45 For more details see the file COPYING in the source
46 distribution of Linux.
47 </para>
48 </legalnotice>
49
50 <abstract>
51 <para>
52 These books attempt to give a description of the
53 various subsystems that play a role in 802.11 wireless
54 networking in Linux. Since these books are for kernel
55 developers they attempts to document the structures
56 and functions used in the kernel as well as giving a
57 higher-level overview.
58 </para>
59 <para>
60 The reader is expected to be familiar with the 802.11
61 standard as published by the IEEE in 802.11-2007 (or
62 possibly later versions). References to this standard
63 will be given as "802.11-2007 8.1.5".
64 </para>
65 </abstract>
66 </setinfo>
67 <book id="cfg80211-developers-guide">
68 <bookinfo>
69 <title>The cfg80211 subsystem</title>
70
71 <abstract>
72!Pinclude/net/cfg80211.h Introduction
73 </abstract>
74 </bookinfo>
75 <chapter>
76 <title>Device registration</title>
77!Pinclude/net/cfg80211.h Device registration
78!Finclude/net/cfg80211.h ieee80211_band
79!Finclude/net/cfg80211.h ieee80211_channel_flags
80!Finclude/net/cfg80211.h ieee80211_channel
81!Finclude/net/cfg80211.h ieee80211_rate_flags
82!Finclude/net/cfg80211.h ieee80211_rate
83!Finclude/net/cfg80211.h ieee80211_sta_ht_cap
84!Finclude/net/cfg80211.h ieee80211_supported_band
85!Finclude/net/cfg80211.h cfg80211_signal_type
86!Finclude/net/cfg80211.h wiphy_params_flags
87!Finclude/net/cfg80211.h wiphy_flags
88!Finclude/net/cfg80211.h wiphy
89!Finclude/net/cfg80211.h wireless_dev
90!Finclude/net/cfg80211.h wiphy_new
91!Finclude/net/cfg80211.h wiphy_register
92!Finclude/net/cfg80211.h wiphy_unregister
93!Finclude/net/cfg80211.h wiphy_free
94
95!Finclude/net/cfg80211.h wiphy_name
96!Finclude/net/cfg80211.h wiphy_dev
97!Finclude/net/cfg80211.h wiphy_priv
98!Finclude/net/cfg80211.h priv_to_wiphy
99!Finclude/net/cfg80211.h set_wiphy_dev
100!Finclude/net/cfg80211.h wdev_priv
101 </chapter>
102 <chapter>
103 <title>Actions and configuration</title>
104!Pinclude/net/cfg80211.h Actions and configuration
105!Finclude/net/cfg80211.h cfg80211_ops
106!Finclude/net/cfg80211.h vif_params
107!Finclude/net/cfg80211.h key_params
108!Finclude/net/cfg80211.h survey_info_flags
109!Finclude/net/cfg80211.h survey_info
110!Finclude/net/cfg80211.h beacon_parameters
111!Finclude/net/cfg80211.h plink_actions
112!Finclude/net/cfg80211.h station_parameters
113!Finclude/net/cfg80211.h station_info_flags
114!Finclude/net/cfg80211.h rate_info_flags
115!Finclude/net/cfg80211.h rate_info
116!Finclude/net/cfg80211.h station_info
117!Finclude/net/cfg80211.h monitor_flags
118!Finclude/net/cfg80211.h mpath_info_flags
119!Finclude/net/cfg80211.h mpath_info
120!Finclude/net/cfg80211.h bss_parameters
121!Finclude/net/cfg80211.h ieee80211_txq_params
122!Finclude/net/cfg80211.h cfg80211_crypto_settings
123!Finclude/net/cfg80211.h cfg80211_auth_request
124!Finclude/net/cfg80211.h cfg80211_assoc_request
125!Finclude/net/cfg80211.h cfg80211_deauth_request
126!Finclude/net/cfg80211.h cfg80211_disassoc_request
127!Finclude/net/cfg80211.h cfg80211_ibss_params
128!Finclude/net/cfg80211.h cfg80211_connect_params
129!Finclude/net/cfg80211.h cfg80211_pmksa
130!Finclude/net/cfg80211.h cfg80211_send_rx_auth
131!Finclude/net/cfg80211.h cfg80211_send_auth_timeout
132!Finclude/net/cfg80211.h __cfg80211_auth_canceled
133!Finclude/net/cfg80211.h cfg80211_send_rx_assoc
134!Finclude/net/cfg80211.h cfg80211_send_assoc_timeout
135!Finclude/net/cfg80211.h cfg80211_send_deauth
136!Finclude/net/cfg80211.h __cfg80211_send_deauth
137!Finclude/net/cfg80211.h cfg80211_send_disassoc
138!Finclude/net/cfg80211.h __cfg80211_send_disassoc
139!Finclude/net/cfg80211.h cfg80211_ibss_joined
140!Finclude/net/cfg80211.h cfg80211_connect_result
141!Finclude/net/cfg80211.h cfg80211_roamed
142!Finclude/net/cfg80211.h cfg80211_disconnected
143!Finclude/net/cfg80211.h cfg80211_ready_on_channel
144!Finclude/net/cfg80211.h cfg80211_remain_on_channel_expired
145!Finclude/net/cfg80211.h cfg80211_new_sta
146!Finclude/net/cfg80211.h cfg80211_rx_mgmt
147!Finclude/net/cfg80211.h cfg80211_mgmt_tx_status
148!Finclude/net/cfg80211.h cfg80211_cqm_rssi_notify
149!Finclude/net/cfg80211.h cfg80211_michael_mic_failure
150 </chapter>
151 <chapter>
152 <title>Scanning and BSS list handling</title>
153!Pinclude/net/cfg80211.h Scanning and BSS list handling
154!Finclude/net/cfg80211.h cfg80211_ssid
155!Finclude/net/cfg80211.h cfg80211_scan_request
156!Finclude/net/cfg80211.h cfg80211_scan_done
157!Finclude/net/cfg80211.h cfg80211_bss
158!Finclude/net/cfg80211.h cfg80211_inform_bss_frame
159!Finclude/net/cfg80211.h cfg80211_inform_bss
160!Finclude/net/cfg80211.h cfg80211_unlink_bss
161!Finclude/net/cfg80211.h cfg80211_find_ie
162!Finclude/net/cfg80211.h ieee80211_bss_get_ie
163 </chapter>
164 <chapter>
165 <title>Utility functions</title>
166!Pinclude/net/cfg80211.h Utility functions
167!Finclude/net/cfg80211.h ieee80211_channel_to_frequency
168!Finclude/net/cfg80211.h ieee80211_frequency_to_channel
169!Finclude/net/cfg80211.h ieee80211_get_channel
170!Finclude/net/cfg80211.h ieee80211_get_response_rate
171!Finclude/net/cfg80211.h ieee80211_hdrlen
172!Finclude/net/cfg80211.h ieee80211_get_hdrlen_from_skb
173!Finclude/net/cfg80211.h ieee80211_radiotap_iterator
174 </chapter>
175 <chapter>
176 <title>Data path helpers</title>
177!Pinclude/net/cfg80211.h Data path helpers
178!Finclude/net/cfg80211.h ieee80211_data_to_8023
179!Finclude/net/cfg80211.h ieee80211_data_from_8023
180!Finclude/net/cfg80211.h ieee80211_amsdu_to_8023s
181!Finclude/net/cfg80211.h cfg80211_classify8021d
182 </chapter>
183 <chapter>
184 <title>Regulatory enforcement infrastructure</title>
185!Pinclude/net/cfg80211.h Regulatory enforcement infrastructure
186!Finclude/net/cfg80211.h regulatory_hint
187!Finclude/net/cfg80211.h wiphy_apply_custom_regulatory
188!Finclude/net/cfg80211.h freq_reg_info
189 </chapter>
190 <chapter>
191 <title>RFkill integration</title>
192!Pinclude/net/cfg80211.h RFkill integration
193!Finclude/net/cfg80211.h wiphy_rfkill_set_hw_state
194!Finclude/net/cfg80211.h wiphy_rfkill_start_polling
195!Finclude/net/cfg80211.h wiphy_rfkill_stop_polling
196 </chapter>
197 <chapter>
198 <title>Test mode</title>
199!Pinclude/net/cfg80211.h Test mode
200!Finclude/net/cfg80211.h cfg80211_testmode_alloc_reply_skb
201!Finclude/net/cfg80211.h cfg80211_testmode_reply
202!Finclude/net/cfg80211.h cfg80211_testmode_alloc_event_skb
203!Finclude/net/cfg80211.h cfg80211_testmode_event
204 </chapter>
205 </book>
206 <book id="mac80211-developers-guide">
207 <bookinfo>
208 <title>The mac80211 subsystem</title>
209 <abstract>
210!Pinclude/net/mac80211.h Introduction
211!Pinclude/net/mac80211.h Warning
212 </abstract>
213 </bookinfo>
214
215 <toc></toc>
216
217 <!--
218 Generally, this document shall be ordered by increasing complexity.
219 It is important to note that readers should be able to read only
220 the first few sections to get a working driver and only advanced
221 usage should require reading the full document.
222 -->
223
224 <part>
225 <title>The basic mac80211 driver interface</title>
226 <partintro>
227 <para>
228 You should read and understand the information contained
229 within this part of the book while implementing a driver.
230 In some chapters, advanced usage is noted, that may be
231 skipped at first.
232 </para>
233 <para>
234 This part of the book only covers station and monitor mode
235 functionality, additional information required to implement
236 the other modes is covered in the second part of the book.
237 </para>
238 </partintro>
239
240 <chapter id="basics">
241 <title>Basic hardware handling</title>
242 <para>TBD</para>
243 <para>
244 This chapter shall contain information on getting a hw
245 struct allocated and registered with mac80211.
246 </para>
247 <para>
248 Since it is required to allocate rates/modes before registering
249 a hw struct, this chapter shall also contain information on setting
250 up the rate/mode structs.
251 </para>
252 <para>
253 Additionally, some discussion about the callbacks and
254 the general programming model should be in here, including
255 the definition of ieee80211_ops which will be referred to
256 a lot.
257 </para>
258 <para>
259 Finally, a discussion of hardware capabilities should be done
260 with references to other parts of the book.
261 </para>
262 <!-- intentionally multiple !F lines to get proper order -->
263!Finclude/net/mac80211.h ieee80211_hw
264!Finclude/net/mac80211.h ieee80211_hw_flags
265!Finclude/net/mac80211.h SET_IEEE80211_DEV
266!Finclude/net/mac80211.h SET_IEEE80211_PERM_ADDR
267!Finclude/net/mac80211.h ieee80211_ops
268!Finclude/net/mac80211.h ieee80211_alloc_hw
269!Finclude/net/mac80211.h ieee80211_register_hw
270!Finclude/net/mac80211.h ieee80211_get_tx_led_name
271!Finclude/net/mac80211.h ieee80211_get_rx_led_name
272!Finclude/net/mac80211.h ieee80211_get_assoc_led_name
273!Finclude/net/mac80211.h ieee80211_get_radio_led_name
274!Finclude/net/mac80211.h ieee80211_unregister_hw
275!Finclude/net/mac80211.h ieee80211_free_hw
276 </chapter>
277
278 <chapter id="phy-handling">
279 <title>PHY configuration</title>
280 <para>TBD</para>
281 <para>
282 This chapter should describe PHY handling including
283 start/stop callbacks and the various structures used.
284 </para>
285!Finclude/net/mac80211.h ieee80211_conf
286!Finclude/net/mac80211.h ieee80211_conf_flags
287 </chapter>
288
289 <chapter id="iface-handling">
290 <title>Virtual interfaces</title>
291 <para>TBD</para>
292 <para>
293 This chapter should describe virtual interface basics
294 that are relevant to the driver (VLANs, MGMT etc are not.)
295 It should explain the use of the add_iface/remove_iface
296 callbacks as well as the interface configuration callbacks.
297 </para>
298 <para>Things related to AP mode should be discussed there.</para>
299 <para>
300 Things related to supporting multiple interfaces should be
301 in the appropriate chapter, a BIG FAT note should be here about
302 this though and the recommendation to allow only a single
303 interface in STA mode at first!
304 </para>
305!Finclude/net/mac80211.h ieee80211_vif
306 </chapter>
307
308 <chapter id="rx-tx">
309 <title>Receive and transmit processing</title>
310 <sect1>
311 <title>what should be here</title>
312 <para>TBD</para>
313 <para>
314 This should describe the receive and transmit
315 paths in mac80211/the drivers as well as
316 transmit status handling.
317 </para>
318 </sect1>
319 <sect1>
320 <title>Frame format</title>
321!Pinclude/net/mac80211.h Frame format
322 </sect1>
323 <sect1>
324 <title>Packet alignment</title>
325!Pnet/mac80211/rx.c Packet alignment
326 </sect1>
327 <sect1>
328 <title>Calling into mac80211 from interrupts</title>
329!Pinclude/net/mac80211.h Calling mac80211 from interrupts
330 </sect1>
331 <sect1>
332 <title>functions/definitions</title>
333!Finclude/net/mac80211.h ieee80211_rx_status
334!Finclude/net/mac80211.h mac80211_rx_flags
335!Finclude/net/mac80211.h ieee80211_tx_info
336!Finclude/net/mac80211.h ieee80211_rx
337!Finclude/net/mac80211.h ieee80211_rx_irqsafe
338!Finclude/net/mac80211.h ieee80211_tx_status
339!Finclude/net/mac80211.h ieee80211_tx_status_irqsafe
340!Finclude/net/mac80211.h ieee80211_rts_get
341!Finclude/net/mac80211.h ieee80211_rts_duration
342!Finclude/net/mac80211.h ieee80211_ctstoself_get
343!Finclude/net/mac80211.h ieee80211_ctstoself_duration
344!Finclude/net/mac80211.h ieee80211_generic_frame_duration
345!Finclude/net/mac80211.h ieee80211_wake_queue
346!Finclude/net/mac80211.h ieee80211_stop_queue
347!Finclude/net/mac80211.h ieee80211_wake_queues
348!Finclude/net/mac80211.h ieee80211_stop_queues
349 </sect1>
350 </chapter>
351
352 <chapter id="filters">
353 <title>Frame filtering</title>
354!Pinclude/net/mac80211.h Frame filtering
355!Finclude/net/mac80211.h ieee80211_filter_flags
356 </chapter>
357 </part>
358
359 <part id="advanced">
360 <title>Advanced driver interface</title>
361 <partintro>
362 <para>
363 Information contained within this part of the book is
364 of interest only for advanced interaction of mac80211
365 with drivers to exploit more hardware capabilities and
366 improve performance.
367 </para>
368 </partintro>
369
370 <chapter id="hardware-crypto-offload">
371 <title>Hardware crypto acceleration</title>
372!Pinclude/net/mac80211.h Hardware crypto acceleration
373 <!-- intentionally multiple !F lines to get proper order -->
374!Finclude/net/mac80211.h set_key_cmd
375!Finclude/net/mac80211.h ieee80211_key_conf
376!Finclude/net/mac80211.h ieee80211_key_flags
377 </chapter>
378
379 <chapter id="powersave">
380 <title>Powersave support</title>
381!Pinclude/net/mac80211.h Powersave support
382 </chapter>
383
384 <chapter id="beacon-filter">
385 <title>Beacon filter support</title>
386!Pinclude/net/mac80211.h Beacon filter support
387!Finclude/net/mac80211.h ieee80211_beacon_loss
388 </chapter>
389
390 <chapter id="qos">
391 <title>Multiple queues and QoS support</title>
392 <para>TBD</para>
393!Finclude/net/mac80211.h ieee80211_tx_queue_params
394 </chapter>
395
396 <chapter id="AP">
397 <title>Access point mode support</title>
398 <para>TBD</para>
399 <para>Some parts of the if_conf should be discussed here instead</para>
400 <para>
401 Insert notes about VLAN interfaces with hw crypto here or
402 in the hw crypto chapter.
403 </para>
404!Finclude/net/mac80211.h ieee80211_get_buffered_bc
405!Finclude/net/mac80211.h ieee80211_beacon_get
406 </chapter>
407
408 <chapter id="multi-iface">
409 <title>Supporting multiple virtual interfaces</title>
410 <para>TBD</para>
411 <para>
412 Note: WDS with identical MAC address should almost always be OK
413 </para>
414 <para>
415 Insert notes about having multiple virtual interfaces with
416 different MAC addresses here, note which configurations are
417 supported by mac80211, add notes about supporting hw crypto
418 with it.
419 </para>
420 </chapter>
421
422 <chapter id="hardware-scan-offload">
423 <title>Hardware scan offload</title>
424 <para>TBD</para>
425!Finclude/net/mac80211.h ieee80211_scan_completed
426 </chapter>
427 </part>
428
429 <part id="rate-control">
430 <title>Rate control interface</title>
431 <partintro>
432 <para>TBD</para>
433 <para>
434 This part of the book describes the rate control algorithm
435 interface and how it relates to mac80211 and drivers.
436 </para>
437 </partintro>
438 <chapter id="dummy">
439 <title>dummy chapter</title>
440 <para>TBD</para>
441 </chapter>
442 </part>
443
444 <part id="internal">
445 <title>Internals</title>
446 <partintro>
447 <para>TBD</para>
448 <para>
449 This part of the book describes mac80211 internals.
450 </para>
451 </partintro>
452
453 <chapter id="key-handling">
454 <title>Key handling</title>
455 <sect1>
456 <title>Key handling basics</title>
457!Pnet/mac80211/key.c Key handling basics
458 </sect1>
459 <sect1>
460 <title>MORE TBD</title>
461 <para>TBD</para>
462 </sect1>
463 </chapter>
464
465 <chapter id="rx-processing">
466 <title>Receive processing</title>
467 <para>TBD</para>
468 </chapter>
469
470 <chapter id="tx-processing">
471 <title>Transmit processing</title>
472 <para>TBD</para>
473 </chapter>
474
475 <chapter id="sta-info">
476 <title>Station info handling</title>
477 <sect1>
478 <title>Programming information</title>
479!Fnet/mac80211/sta_info.h sta_info
480!Fnet/mac80211/sta_info.h ieee80211_sta_info_flags
481 </sect1>
482 <sect1>
483 <title>STA information lifetime rules</title>
484!Pnet/mac80211/sta_info.c STA information lifetime rules
485 </sect1>
486 </chapter>
487
488 <chapter id="synchronisation">
489 <title>Synchronisation</title>
490 <para>TBD</para>
491 <para>Locking, lots of RCU</para>
492 </chapter>
493 </part>
494 </book>
495</set>
diff --git a/Documentation/DocBook/Makefile b/Documentation/DocBook/Makefile
index 4b603c5c3cc1..8b6e00a71034 100644
--- a/Documentation/DocBook/Makefile
+++ b/Documentation/DocBook/Makefile
@@ -12,7 +12,7 @@ DOCBOOKS := z8530book.xml mcabook.xml device-drivers.xml \
12 kernel-api.xml filesystems.xml lsm.xml usb.xml kgdb.xml \ 12 kernel-api.xml filesystems.xml lsm.xml usb.xml kgdb.xml \
13 gadget.xml libata.xml mtdnand.xml librs.xml rapidio.xml \ 13 gadget.xml libata.xml mtdnand.xml librs.xml rapidio.xml \
14 genericirq.xml s390-drivers.xml uio-howto.xml scsi.xml \ 14 genericirq.xml s390-drivers.xml uio-howto.xml scsi.xml \
15 mac80211.xml debugobjects.xml sh.xml regulator.xml \ 15 80211.xml debugobjects.xml sh.xml regulator.xml \
16 alsa-driver-api.xml writing-an-alsa-driver.xml \ 16 alsa-driver-api.xml writing-an-alsa-driver.xml \
17 tracepoint.xml media.xml drm.xml 17 tracepoint.xml media.xml drm.xml
18 18
@@ -35,7 +35,7 @@ PS_METHOD = $(prefer-db2x)
35PHONY += xmldocs sgmldocs psdocs pdfdocs htmldocs mandocs installmandocs cleandocs xmldoclinks 35PHONY += xmldocs sgmldocs psdocs pdfdocs htmldocs mandocs installmandocs cleandocs xmldoclinks
36 36
37BOOKS := $(addprefix $(obj)/,$(DOCBOOKS)) 37BOOKS := $(addprefix $(obj)/,$(DOCBOOKS))
38xmldocs: $(BOOKS) xmldoclinks 38xmldocs: $(BOOKS)
39sgmldocs: xmldocs 39sgmldocs: xmldocs
40 40
41PS := $(patsubst %.xml, %.ps, $(BOOKS)) 41PS := $(patsubst %.xml, %.ps, $(BOOKS))
@@ -95,7 +95,7 @@ define rule_docproc
95 ) > $(dir $@).$(notdir $@).cmd 95 ) > $(dir $@).$(notdir $@).cmd
96endef 96endef
97 97
98%.xml: %.tmpl FORCE 98%.xml: %.tmpl xmldoclinks FORCE
99 $(call if_changed_rule,docproc) 99 $(call if_changed_rule,docproc)
100 100
101### 101###
diff --git a/Documentation/DocBook/device-drivers.tmpl b/Documentation/DocBook/device-drivers.tmpl
index ecd35e9d4410..feca0758391e 100644
--- a/Documentation/DocBook/device-drivers.tmpl
+++ b/Documentation/DocBook/device-drivers.tmpl
@@ -46,7 +46,6 @@
46 46
47 <sect1><title>Atomic and pointer manipulation</title> 47 <sect1><title>Atomic and pointer manipulation</title>
48!Iarch/x86/include/asm/atomic.h 48!Iarch/x86/include/asm/atomic.h
49!Iarch/x86/include/asm/unaligned.h
50 </sect1> 49 </sect1>
51 50
52 <sect1><title>Delaying, scheduling, and timer routines</title> 51 <sect1><title>Delaying, scheduling, and timer routines</title>
diff --git a/Documentation/DocBook/drm.tmpl b/Documentation/DocBook/drm.tmpl
index 910c923a9b86..2861055afd7a 100644
--- a/Documentation/DocBook/drm.tmpl
+++ b/Documentation/DocBook/drm.tmpl
@@ -136,6 +136,7 @@
136#ifdef CONFIG_COMPAT 136#ifdef CONFIG_COMPAT
137 .compat_ioctl = i915_compat_ioctl, 137 .compat_ioctl = i915_compat_ioctl,
138#endif 138#endif
139 .llseek = noop_llseek,
139 }, 140 },
140 .pci_driver = { 141 .pci_driver = {
141 .name = DRIVER_NAME, 142 .name = DRIVER_NAME,
diff --git a/Documentation/DocBook/genericirq.tmpl b/Documentation/DocBook/genericirq.tmpl
index 1448b33fd222..fb10fd08c05c 100644
--- a/Documentation/DocBook/genericirq.tmpl
+++ b/Documentation/DocBook/genericirq.tmpl
@@ -28,7 +28,7 @@
28 </authorgroup> 28 </authorgroup>
29 29
30 <copyright> 30 <copyright>
31 <year>2005-2006</year> 31 <year>2005-2010</year>
32 <holder>Thomas Gleixner</holder> 32 <holder>Thomas Gleixner</holder>
33 </copyright> 33 </copyright>
34 <copyright> 34 <copyright>
@@ -100,6 +100,10 @@
100 <listitem><para>Edge type</para></listitem> 100 <listitem><para>Edge type</para></listitem>
101 <listitem><para>Simple type</para></listitem> 101 <listitem><para>Simple type</para></listitem>
102 </itemizedlist> 102 </itemizedlist>
103 During the implementation we identified another type:
104 <itemizedlist>
105 <listitem><para>Fast EOI type</para></listitem>
106 </itemizedlist>
103 In the SMP world of the __do_IRQ() super-handler another type 107 In the SMP world of the __do_IRQ() super-handler another type
104 was identified: 108 was identified:
105 <itemizedlist> 109 <itemizedlist>
@@ -153,6 +157,7 @@
153 is still available. This leads to a kind of duality for the time 157 is still available. This leads to a kind of duality for the time
154 being. Over time the new model should be used in more and more 158 being. Over time the new model should be used in more and more
155 architectures, as it enables smaller and cleaner IRQ subsystems. 159 architectures, as it enables smaller and cleaner IRQ subsystems.
160 It's deprecated for three years now and about to be removed.
156 </para> 161 </para>
157 </chapter> 162 </chapter>
158 <chapter id="bugs"> 163 <chapter id="bugs">
@@ -217,6 +222,7 @@
217 <itemizedlist> 222 <itemizedlist>
218 <listitem><para>handle_level_irq</para></listitem> 223 <listitem><para>handle_level_irq</para></listitem>
219 <listitem><para>handle_edge_irq</para></listitem> 224 <listitem><para>handle_edge_irq</para></listitem>
225 <listitem><para>handle_fasteoi_irq</para></listitem>
220 <listitem><para>handle_simple_irq</para></listitem> 226 <listitem><para>handle_simple_irq</para></listitem>
221 <listitem><para>handle_percpu_irq</para></listitem> 227 <listitem><para>handle_percpu_irq</para></listitem>
222 </itemizedlist> 228 </itemizedlist>
@@ -233,33 +239,33 @@
233 are used by the default flow implementations. 239 are used by the default flow implementations.
234 The following helper functions are implemented (simplified excerpt): 240 The following helper functions are implemented (simplified excerpt):
235 <programlisting> 241 <programlisting>
236default_enable(irq) 242default_enable(struct irq_data *data)
237{ 243{
238 desc->chip->unmask(irq); 244 desc->chip->irq_unmask(data);
239} 245}
240 246
241default_disable(irq) 247default_disable(struct irq_data *data)
242{ 248{
243 if (!delay_disable(irq)) 249 if (!delay_disable(data))
244 desc->chip->mask(irq); 250 desc->chip->irq_mask(data);
245} 251}
246 252
247default_ack(irq) 253default_ack(struct irq_data *data)
248{ 254{
249 chip->ack(irq); 255 chip->irq_ack(data);
250} 256}
251 257
252default_mask_ack(irq) 258default_mask_ack(struct irq_data *data)
253{ 259{
254 if (chip->mask_ack) { 260 if (chip->irq_mask_ack) {
255 chip->mask_ack(irq); 261 chip->irq_mask_ack(data);
256 } else { 262 } else {
257 chip->mask(irq); 263 chip->irq_mask(data);
258 chip->ack(irq); 264 chip->irq_ack(data);
259 } 265 }
260} 266}
261 267
262noop(irq) 268noop(struct irq_data *data))
263{ 269{
264} 270}
265 271
@@ -278,12 +284,27 @@ noop(irq)
278 <para> 284 <para>
279 The following control flow is implemented (simplified excerpt): 285 The following control flow is implemented (simplified excerpt):
280 <programlisting> 286 <programlisting>
281desc->chip->start(); 287desc->chip->irq_mask();
282handle_IRQ_event(desc->action); 288handle_IRQ_event(desc->action);
283desc->chip->end(); 289desc->chip->irq_unmask();
284 </programlisting> 290 </programlisting>
285 </para> 291 </para>
286 </sect3> 292 </sect3>
293 <sect3 id="Default_FASTEOI_IRQ_flow_handler">
294 <title>Default Fast EOI IRQ flow handler</title>
295 <para>
296 handle_fasteoi_irq provides a generic implementation
297 for interrupts, which only need an EOI at the end of
298 the handler
299 </para>
300 <para>
301 The following control flow is implemented (simplified excerpt):
302 <programlisting>
303handle_IRQ_event(desc->action);
304desc->chip->irq_eoi();
305 </programlisting>
306 </para>
307 </sect3>
287 <sect3 id="Default_Edge_IRQ_flow_handler"> 308 <sect3 id="Default_Edge_IRQ_flow_handler">
288 <title>Default Edge IRQ flow handler</title> 309 <title>Default Edge IRQ flow handler</title>
289 <para> 310 <para>
@@ -294,20 +315,19 @@ desc->chip->end();
294 The following control flow is implemented (simplified excerpt): 315 The following control flow is implemented (simplified excerpt):
295 <programlisting> 316 <programlisting>
296if (desc->status &amp; running) { 317if (desc->status &amp; running) {
297 desc->chip->hold(); 318 desc->chip->irq_mask();
298 desc->status |= pending | masked; 319 desc->status |= pending | masked;
299 return; 320 return;
300} 321}
301desc->chip->start(); 322desc->chip->irq_ack();
302desc->status |= running; 323desc->status |= running;
303do { 324do {
304 if (desc->status &amp; masked) 325 if (desc->status &amp; masked)
305 desc->chip->enable(); 326 desc->chip->irq_unmask();
306 desc->status &amp;= ~pending; 327 desc->status &amp;= ~pending;
307 handle_IRQ_event(desc->action); 328 handle_IRQ_event(desc->action);
308} while (status &amp; pending); 329} while (status &amp; pending);
309desc->status &amp;= ~running; 330desc->status &amp;= ~running;
310desc->chip->end();
311 </programlisting> 331 </programlisting>
312 </para> 332 </para>
313 </sect3> 333 </sect3>
@@ -342,9 +362,9 @@ handle_IRQ_event(desc->action);
342 <para> 362 <para>
343 The following control flow is implemented (simplified excerpt): 363 The following control flow is implemented (simplified excerpt):
344 <programlisting> 364 <programlisting>
345desc->chip->start();
346handle_IRQ_event(desc->action); 365handle_IRQ_event(desc->action);
347desc->chip->end(); 366if (desc->chip->irq_eoi)
367 desc->chip->irq_eoi();
348 </programlisting> 368 </programlisting>
349 </para> 369 </para>
350 </sect3> 370 </sect3>
@@ -375,8 +395,7 @@ desc->chip->end();
375 mechanism. (It's necessary to enable CONFIG_HARDIRQS_SW_RESEND when 395 mechanism. (It's necessary to enable CONFIG_HARDIRQS_SW_RESEND when
376 you want to use the delayed interrupt disable feature and your 396 you want to use the delayed interrupt disable feature and your
377 hardware is not capable of retriggering an interrupt.) 397 hardware is not capable of retriggering an interrupt.)
378 The delayed interrupt disable can be runtime enabled, per interrupt, 398 The delayed interrupt disable is not configurable.
379 by setting the IRQ_DELAYED_DISABLE flag in the irq_desc status field.
380 </para> 399 </para>
381 </sect2> 400 </sect2>
382 </sect1> 401 </sect1>
@@ -387,13 +406,13 @@ desc->chip->end();
387 contains all the direct chip relevant functions, which 406 contains all the direct chip relevant functions, which
388 can be utilized by the irq flow implementations. 407 can be utilized by the irq flow implementations.
389 <itemizedlist> 408 <itemizedlist>
390 <listitem><para>ack()</para></listitem> 409 <listitem><para>irq_ack()</para></listitem>
391 <listitem><para>mask_ack() - Optional, recommended for performance</para></listitem> 410 <listitem><para>irq_mask_ack() - Optional, recommended for performance</para></listitem>
392 <listitem><para>mask()</para></listitem> 411 <listitem><para>irq_mask()</para></listitem>
393 <listitem><para>unmask()</para></listitem> 412 <listitem><para>irq_unmask()</para></listitem>
394 <listitem><para>retrigger() - Optional</para></listitem> 413 <listitem><para>irq_retrigger() - Optional</para></listitem>
395 <listitem><para>set_type() - Optional</para></listitem> 414 <listitem><para>irq_set_type() - Optional</para></listitem>
396 <listitem><para>set_wake() - Optional</para></listitem> 415 <listitem><para>irq_set_wake() - Optional</para></listitem>
397 </itemizedlist> 416 </itemizedlist>
398 These primitives are strictly intended to mean what they say: ack means 417 These primitives are strictly intended to mean what they say: ack means
399 ACK, masking means masking of an IRQ line, etc. It is up to the flow 418 ACK, masking means masking of an IRQ line, etc. It is up to the flow
@@ -458,6 +477,7 @@ desc->chip->end();
458 <para> 477 <para>
459 This chapter contains the autogenerated documentation of the internal functions. 478 This chapter contains the autogenerated documentation of the internal functions.
460 </para> 479 </para>
480!Ikernel/irq/irqdesc.c
461!Ikernel/irq/handle.c 481!Ikernel/irq/handle.c
462!Ikernel/irq/chip.c 482!Ikernel/irq/chip.c
463 </chapter> 483 </chapter>
diff --git a/Documentation/DocBook/kernel-api.tmpl b/Documentation/DocBook/kernel-api.tmpl
index 44b3def961a2..6b4e07f28b69 100644
--- a/Documentation/DocBook/kernel-api.tmpl
+++ b/Documentation/DocBook/kernel-api.tmpl
@@ -57,7 +57,6 @@
57 </para> 57 </para>
58 58
59 <sect1><title>String Conversions</title> 59 <sect1><title>String Conversions</title>
60!Ilib/vsprintf.c
61!Elib/vsprintf.c 60!Elib/vsprintf.c
62 </sect1> 61 </sect1>
63 <sect1><title>String Manipulation</title> 62 <sect1><title>String Manipulation</title>
@@ -132,7 +131,6 @@ X!Ilib/string.c
132 <title>FIFO Buffer</title> 131 <title>FIFO Buffer</title>
133 <sect1><title>kfifo interface</title> 132 <sect1><title>kfifo interface</title>
134!Iinclude/linux/kfifo.h 133!Iinclude/linux/kfifo.h
135!Ekernel/kfifo.c
136 </sect1> 134 </sect1>
137 </chapter> 135 </chapter>
138 136
@@ -259,7 +257,8 @@ X!Earch/x86/kernel/mca_32.c
259!Iblock/blk-sysfs.c 257!Iblock/blk-sysfs.c
260!Eblock/blk-settings.c 258!Eblock/blk-settings.c
261!Eblock/blk-exec.c 259!Eblock/blk-exec.c
262!Eblock/blk-barrier.c 260!Eblock/blk-flush.c
261!Eblock/blk-lib.c
263!Eblock/blk-tag.c 262!Eblock/blk-tag.c
264!Iblock/blk-tag.c 263!Iblock/blk-tag.c
265!Eblock/blk-integrity.c 264!Eblock/blk-integrity.c
diff --git a/Documentation/DocBook/kernel-locking.tmpl b/Documentation/DocBook/kernel-locking.tmpl
index 084f6ad7b7a0..f66f4df18690 100644
--- a/Documentation/DocBook/kernel-locking.tmpl
+++ b/Documentation/DocBook/kernel-locking.tmpl
@@ -1645,7 +1645,9 @@ the amount of locking which needs to be done.
1645 all the readers who were traversing the list when we deleted the 1645 all the readers who were traversing the list when we deleted the
1646 element are finished. We use <function>call_rcu()</function> to 1646 element are finished. We use <function>call_rcu()</function> to
1647 register a callback which will actually destroy the object once 1647 register a callback which will actually destroy the object once
1648 the readers are finished. 1648 all pre-existing readers are finished. Alternatively,
1649 <function>synchronize_rcu()</function> may be used to block until
1650 all pre-existing are finished.
1649 </para> 1651 </para>
1650 <para> 1652 <para>
1651 But how does Read Copy Update know when the readers are 1653 But how does Read Copy Update know when the readers are
@@ -1714,7 +1716,7 @@ the amount of locking which needs to be done.
1714- object_put(obj); 1716- object_put(obj);
1715+ list_del_rcu(&amp;obj-&gt;list); 1717+ list_del_rcu(&amp;obj-&gt;list);
1716 cache_num--; 1718 cache_num--;
1717+ call_rcu(&amp;obj-&gt;rcu, cache_delete_rcu, obj); 1719+ call_rcu(&amp;obj-&gt;rcu, cache_delete_rcu);
1718 } 1720 }
1719 1721
1720 /* Must be holding cache_lock */ 1722 /* Must be holding cache_lock */
@@ -1725,14 +1727,6 @@ the amount of locking which needs to be done.
1725 if (++cache_num > MAX_CACHE_SIZE) { 1727 if (++cache_num > MAX_CACHE_SIZE) {
1726 struct object *i, *outcast = NULL; 1728 struct object *i, *outcast = NULL;
1727 list_for_each_entry(i, &amp;cache, list) { 1729 list_for_each_entry(i, &amp;cache, list) {
1728@@ -85,6 +94,7 @@
1729 obj-&gt;popularity = 0;
1730 atomic_set(&amp;obj-&gt;refcnt, 1); /* The cache holds a reference */
1731 spin_lock_init(&amp;obj-&gt;lock);
1732+ INIT_RCU_HEAD(&amp;obj-&gt;rcu);
1733
1734 spin_lock_irqsave(&amp;cache_lock, flags);
1735 __cache_add(obj);
1736@@ -104,12 +114,11 @@ 1730@@ -104,12 +114,11 @@
1737 struct object *cache_find(int id) 1731 struct object *cache_find(int id)
1738 { 1732 {
@@ -1922,9 +1916,12 @@ machines due to caching.
1922 <function>mutex_lock()</function> 1916 <function>mutex_lock()</function>
1923 </para> 1917 </para>
1924 <para> 1918 <para>
1925 There is a <function>mutex_trylock()</function> which can be 1919 There is a <function>mutex_trylock()</function> which does not
1926 used inside interrupt context, as it will not sleep. 1920 sleep. Still, it must not be used inside interrupt context since
1921 its implementation is not safe for that.
1927 <function>mutex_unlock()</function> will also never sleep. 1922 <function>mutex_unlock()</function> will also never sleep.
1923 It cannot be used in interrupt context either since a mutex
1924 must be released by the same task that acquired it.
1928 </para> 1925 </para>
1929 </listitem> 1926 </listitem>
1930 </itemizedlist> 1927 </itemizedlist>
@@ -1958,6 +1955,12 @@ machines due to caching.
1958 </sect1> 1955 </sect1>
1959 </chapter> 1956 </chapter>
1960 1957
1958 <chapter id="apiref">
1959 <title>Mutex API reference</title>
1960!Iinclude/linux/mutex.h
1961!Ekernel/mutex.c
1962 </chapter>
1963
1961 <chapter id="references"> 1964 <chapter id="references">
1962 <title>Further reading</title> 1965 <title>Further reading</title>
1963 1966
diff --git a/Documentation/DocBook/mac80211.tmpl b/Documentation/DocBook/mac80211.tmpl
deleted file mode 100644
index affb15a344a1..000000000000
--- a/Documentation/DocBook/mac80211.tmpl
+++ /dev/null
@@ -1,337 +0,0 @@
1<?xml version="1.0" encoding="UTF-8"?>
2<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
3 "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd" []>
4
5<book id="mac80211-developers-guide">
6 <bookinfo>
7 <title>The mac80211 subsystem for kernel developers</title>
8
9 <authorgroup>
10 <author>
11 <firstname>Johannes</firstname>
12 <surname>Berg</surname>
13 <affiliation>
14 <address><email>johannes@sipsolutions.net</email></address>
15 </affiliation>
16 </author>
17 </authorgroup>
18
19 <copyright>
20 <year>2007-2009</year>
21 <holder>Johannes Berg</holder>
22 </copyright>
23
24 <legalnotice>
25 <para>
26 This documentation is free software; you can redistribute
27 it and/or modify it under the terms of the GNU General Public
28 License version 2 as published by the Free Software Foundation.
29 </para>
30
31 <para>
32 This documentation is distributed in the hope that it will be
33 useful, but WITHOUT ANY WARRANTY; without even the implied
34 warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
35 See the GNU General Public License for more details.
36 </para>
37
38 <para>
39 You should have received a copy of the GNU General Public
40 License along with this documentation; if not, write to the Free
41 Software Foundation, Inc., 59 Temple Place, Suite 330, Boston,
42 MA 02111-1307 USA
43 </para>
44
45 <para>
46 For more details see the file COPYING in the source
47 distribution of Linux.
48 </para>
49 </legalnotice>
50
51 <abstract>
52!Pinclude/net/mac80211.h Introduction
53!Pinclude/net/mac80211.h Warning
54 </abstract>
55 </bookinfo>
56
57 <toc></toc>
58
59<!--
60Generally, this document shall be ordered by increasing complexity.
61It is important to note that readers should be able to read only
62the first few sections to get a working driver and only advanced
63usage should require reading the full document.
64-->
65
66 <part>
67 <title>The basic mac80211 driver interface</title>
68 <partintro>
69 <para>
70 You should read and understand the information contained
71 within this part of the book while implementing a driver.
72 In some chapters, advanced usage is noted, that may be
73 skipped at first.
74 </para>
75 <para>
76 This part of the book only covers station and monitor mode
77 functionality, additional information required to implement
78 the other modes is covered in the second part of the book.
79 </para>
80 </partintro>
81
82 <chapter id="basics">
83 <title>Basic hardware handling</title>
84 <para>TBD</para>
85 <para>
86 This chapter shall contain information on getting a hw
87 struct allocated and registered with mac80211.
88 </para>
89 <para>
90 Since it is required to allocate rates/modes before registering
91 a hw struct, this chapter shall also contain information on setting
92 up the rate/mode structs.
93 </para>
94 <para>
95 Additionally, some discussion about the callbacks and
96 the general programming model should be in here, including
97 the definition of ieee80211_ops which will be referred to
98 a lot.
99 </para>
100 <para>
101 Finally, a discussion of hardware capabilities should be done
102 with references to other parts of the book.
103 </para>
104<!-- intentionally multiple !F lines to get proper order -->
105!Finclude/net/mac80211.h ieee80211_hw
106!Finclude/net/mac80211.h ieee80211_hw_flags
107!Finclude/net/mac80211.h SET_IEEE80211_DEV
108!Finclude/net/mac80211.h SET_IEEE80211_PERM_ADDR
109!Finclude/net/mac80211.h ieee80211_ops
110!Finclude/net/mac80211.h ieee80211_alloc_hw
111!Finclude/net/mac80211.h ieee80211_register_hw
112!Finclude/net/mac80211.h ieee80211_get_tx_led_name
113!Finclude/net/mac80211.h ieee80211_get_rx_led_name
114!Finclude/net/mac80211.h ieee80211_get_assoc_led_name
115!Finclude/net/mac80211.h ieee80211_get_radio_led_name
116!Finclude/net/mac80211.h ieee80211_unregister_hw
117!Finclude/net/mac80211.h ieee80211_free_hw
118 </chapter>
119
120 <chapter id="phy-handling">
121 <title>PHY configuration</title>
122 <para>TBD</para>
123 <para>
124 This chapter should describe PHY handling including
125 start/stop callbacks and the various structures used.
126 </para>
127!Finclude/net/mac80211.h ieee80211_conf
128!Finclude/net/mac80211.h ieee80211_conf_flags
129 </chapter>
130
131 <chapter id="iface-handling">
132 <title>Virtual interfaces</title>
133 <para>TBD</para>
134 <para>
135 This chapter should describe virtual interface basics
136 that are relevant to the driver (VLANs, MGMT etc are not.)
137 It should explain the use of the add_iface/remove_iface
138 callbacks as well as the interface configuration callbacks.
139 </para>
140 <para>Things related to AP mode should be discussed there.</para>
141 <para>
142 Things related to supporting multiple interfaces should be
143 in the appropriate chapter, a BIG FAT note should be here about
144 this though and the recommendation to allow only a single
145 interface in STA mode at first!
146 </para>
147!Finclude/net/mac80211.h ieee80211_vif
148 </chapter>
149
150 <chapter id="rx-tx">
151 <title>Receive and transmit processing</title>
152 <sect1>
153 <title>what should be here</title>
154 <para>TBD</para>
155 <para>
156 This should describe the receive and transmit
157 paths in mac80211/the drivers as well as
158 transmit status handling.
159 </para>
160 </sect1>
161 <sect1>
162 <title>Frame format</title>
163!Pinclude/net/mac80211.h Frame format
164 </sect1>
165 <sect1>
166 <title>Packet alignment</title>
167!Pnet/mac80211/rx.c Packet alignment
168 </sect1>
169 <sect1>
170 <title>Calling into mac80211 from interrupts</title>
171!Pinclude/net/mac80211.h Calling mac80211 from interrupts
172 </sect1>
173 <sect1>
174 <title>functions/definitions</title>
175!Finclude/net/mac80211.h ieee80211_rx_status
176!Finclude/net/mac80211.h mac80211_rx_flags
177!Finclude/net/mac80211.h ieee80211_tx_info
178!Finclude/net/mac80211.h ieee80211_rx
179!Finclude/net/mac80211.h ieee80211_rx_irqsafe
180!Finclude/net/mac80211.h ieee80211_tx_status
181!Finclude/net/mac80211.h ieee80211_tx_status_irqsafe
182!Finclude/net/mac80211.h ieee80211_rts_get
183!Finclude/net/mac80211.h ieee80211_rts_duration
184!Finclude/net/mac80211.h ieee80211_ctstoself_get
185!Finclude/net/mac80211.h ieee80211_ctstoself_duration
186!Finclude/net/mac80211.h ieee80211_generic_frame_duration
187!Finclude/net/mac80211.h ieee80211_wake_queue
188!Finclude/net/mac80211.h ieee80211_stop_queue
189!Finclude/net/mac80211.h ieee80211_wake_queues
190!Finclude/net/mac80211.h ieee80211_stop_queues
191 </sect1>
192 </chapter>
193
194 <chapter id="filters">
195 <title>Frame filtering</title>
196!Pinclude/net/mac80211.h Frame filtering
197!Finclude/net/mac80211.h ieee80211_filter_flags
198 </chapter>
199 </part>
200
201 <part id="advanced">
202 <title>Advanced driver interface</title>
203 <partintro>
204 <para>
205 Information contained within this part of the book is
206 of interest only for advanced interaction of mac80211
207 with drivers to exploit more hardware capabilities and
208 improve performance.
209 </para>
210 </partintro>
211
212 <chapter id="hardware-crypto-offload">
213 <title>Hardware crypto acceleration</title>
214!Pinclude/net/mac80211.h Hardware crypto acceleration
215<!-- intentionally multiple !F lines to get proper order -->
216!Finclude/net/mac80211.h set_key_cmd
217!Finclude/net/mac80211.h ieee80211_key_conf
218!Finclude/net/mac80211.h ieee80211_key_alg
219!Finclude/net/mac80211.h ieee80211_key_flags
220 </chapter>
221
222 <chapter id="powersave">
223 <title>Powersave support</title>
224!Pinclude/net/mac80211.h Powersave support
225 </chapter>
226
227 <chapter id="beacon-filter">
228 <title>Beacon filter support</title>
229!Pinclude/net/mac80211.h Beacon filter support
230!Finclude/net/mac80211.h ieee80211_beacon_loss
231 </chapter>
232
233 <chapter id="qos">
234 <title>Multiple queues and QoS support</title>
235 <para>TBD</para>
236!Finclude/net/mac80211.h ieee80211_tx_queue_params
237 </chapter>
238
239 <chapter id="AP">
240 <title>Access point mode support</title>
241 <para>TBD</para>
242 <para>Some parts of the if_conf should be discussed here instead</para>
243 <para>
244 Insert notes about VLAN interfaces with hw crypto here or
245 in the hw crypto chapter.
246 </para>
247!Finclude/net/mac80211.h ieee80211_get_buffered_bc
248!Finclude/net/mac80211.h ieee80211_beacon_get
249 </chapter>
250
251 <chapter id="multi-iface">
252 <title>Supporting multiple virtual interfaces</title>
253 <para>TBD</para>
254 <para>
255 Note: WDS with identical MAC address should almost always be OK
256 </para>
257 <para>
258 Insert notes about having multiple virtual interfaces with
259 different MAC addresses here, note which configurations are
260 supported by mac80211, add notes about supporting hw crypto
261 with it.
262 </para>
263 </chapter>
264
265 <chapter id="hardware-scan-offload">
266 <title>Hardware scan offload</title>
267 <para>TBD</para>
268!Finclude/net/mac80211.h ieee80211_scan_completed
269 </chapter>
270 </part>
271
272 <part id="rate-control">
273 <title>Rate control interface</title>
274 <partintro>
275 <para>TBD</para>
276 <para>
277 This part of the book describes the rate control algorithm
278 interface and how it relates to mac80211 and drivers.
279 </para>
280 </partintro>
281 <chapter id="dummy">
282 <title>dummy chapter</title>
283 <para>TBD</para>
284 </chapter>
285 </part>
286
287 <part id="internal">
288 <title>Internals</title>
289 <partintro>
290 <para>TBD</para>
291 <para>
292 This part of the book describes mac80211 internals.
293 </para>
294 </partintro>
295
296 <chapter id="key-handling">
297 <title>Key handling</title>
298 <sect1>
299 <title>Key handling basics</title>
300!Pnet/mac80211/key.c Key handling basics
301 </sect1>
302 <sect1>
303 <title>MORE TBD</title>
304 <para>TBD</para>
305 </sect1>
306 </chapter>
307
308 <chapter id="rx-processing">
309 <title>Receive processing</title>
310 <para>TBD</para>
311 </chapter>
312
313 <chapter id="tx-processing">
314 <title>Transmit processing</title>
315 <para>TBD</para>
316 </chapter>
317
318 <chapter id="sta-info">
319 <title>Station info handling</title>
320 <sect1>
321 <title>Programming information</title>
322!Fnet/mac80211/sta_info.h sta_info
323!Fnet/mac80211/sta_info.h ieee80211_sta_info_flags
324 </sect1>
325 <sect1>
326 <title>STA information lifetime rules</title>
327!Pnet/mac80211/sta_info.c STA information lifetime rules
328 </sect1>
329 </chapter>
330
331 <chapter id="synchronisation">
332 <title>Synchronisation</title>
333 <para>TBD</para>
334 <para>Locking, lots of RCU</para>
335 </chapter>
336 </part>
337</book>
diff --git a/Documentation/DocBook/tracepoint.tmpl b/Documentation/DocBook/tracepoint.tmpl
index e8473eae2a20..b57a9ede3224 100644
--- a/Documentation/DocBook/tracepoint.tmpl
+++ b/Documentation/DocBook/tracepoint.tmpl
@@ -104,4 +104,9 @@
104 <title>Block IO</title> 104 <title>Block IO</title>
105!Iinclude/trace/events/block.h 105!Iinclude/trace/events/block.h
106 </chapter> 106 </chapter>
107
108 <chapter id="workqueue">
109 <title>Workqueue</title>
110!Iinclude/trace/events/workqueue.h
111 </chapter>
107</book> 112</book>
diff --git a/Documentation/RCU/checklist.txt b/Documentation/RCU/checklist.txt
index 790d1a812376..0c134f8afc6f 100644
--- a/Documentation/RCU/checklist.txt
+++ b/Documentation/RCU/checklist.txt
@@ -218,13 +218,22 @@ over a rather long period of time, but improvements are always welcome!
218 include: 218 include:
219 219
220 a. Keeping a count of the number of data-structure elements 220 a. Keeping a count of the number of data-structure elements
221 used by the RCU-protected data structure, including those 221 used by the RCU-protected data structure, including
222 waiting for a grace period to elapse. Enforce a limit 222 those waiting for a grace period to elapse. Enforce a
223 on this number, stalling updates as needed to allow 223 limit on this number, stalling updates as needed to allow
224 previously deferred frees to complete. 224 previously deferred frees to complete. Alternatively,
225 225 limit only the number awaiting deferred free rather than
226 Alternatively, limit only the number awaiting deferred 226 the total number of elements.
227 free rather than the total number of elements. 227
228 One way to stall the updates is to acquire the update-side
229 mutex. (Don't try this with a spinlock -- other CPUs
230 spinning on the lock could prevent the grace period
231 from ever ending.) Another way to stall the updates
232 is for the updates to use a wrapper function around
233 the memory allocator, so that this wrapper function
234 simulates OOM when there is too much memory awaiting an
235 RCU grace period. There are of course many other
236 variations on this theme.
228 237
229 b. Limiting update rate. For example, if updates occur only 238 b. Limiting update rate. For example, if updates occur only
230 once per hour, then no explicit rate limiting is required, 239 once per hour, then no explicit rate limiting is required,
@@ -365,3 +374,26 @@ over a rather long period of time, but improvements are always welcome!
365 and the compiler to freely reorder code into and out of RCU 374 and the compiler to freely reorder code into and out of RCU
366 read-side critical sections. It is the responsibility of the 375 read-side critical sections. It is the responsibility of the
367 RCU update-side primitives to deal with this. 376 RCU update-side primitives to deal with this.
377
37817. Use CONFIG_PROVE_RCU, CONFIG_DEBUG_OBJECTS_RCU_HEAD, and
379 the __rcu sparse checks to validate your RCU code. These
380 can help find problems as follows:
381
382 CONFIG_PROVE_RCU: check that accesses to RCU-protected data
383 structures are carried out under the proper RCU
384 read-side critical section, while holding the right
385 combination of locks, or whatever other conditions
386 are appropriate.
387
388 CONFIG_DEBUG_OBJECTS_RCU_HEAD: check that you don't pass the
389 same object to call_rcu() (or friends) before an RCU
390 grace period has elapsed since the last time that you
391 passed that same object to call_rcu() (or friends).
392
393 __rcu sparse checks: tag the pointer to the RCU-protected data
394 structure with __rcu, and sparse will warn you if you
395 access that pointer without the services of one of the
396 variants of rcu_dereference().
397
398 These debugging aids can help you find problems that are
399 otherwise extremely difficult to spot.
diff --git a/Documentation/RCU/stallwarn.txt b/Documentation/RCU/stallwarn.txt
index 44c6dcc93d6d..862c08ef1fde 100644
--- a/Documentation/RCU/stallwarn.txt
+++ b/Documentation/RCU/stallwarn.txt
@@ -80,6 +80,24 @@ o A CPU looping with bottom halves disabled. This condition can
80o For !CONFIG_PREEMPT kernels, a CPU looping anywhere in the kernel 80o For !CONFIG_PREEMPT kernels, a CPU looping anywhere in the kernel
81 without invoking schedule(). 81 without invoking schedule().
82 82
83o A CPU-bound real-time task in a CONFIG_PREEMPT kernel, which might
84 happen to preempt a low-priority task in the middle of an RCU
85 read-side critical section. This is especially damaging if
86 that low-priority task is not permitted to run on any other CPU,
87 in which case the next RCU grace period can never complete, which
88 will eventually cause the system to run out of memory and hang.
89 While the system is in the process of running itself out of
90 memory, you might see stall-warning messages.
91
92o A CPU-bound real-time task in a CONFIG_PREEMPT_RT kernel that
93 is running at a higher priority than the RCU softirq threads.
94 This will prevent RCU callbacks from ever being invoked,
95 and in a CONFIG_TREE_PREEMPT_RCU kernel will further prevent
96 RCU grace periods from ever completing. Either way, the
97 system will eventually run out of memory and hang. In the
98 CONFIG_TREE_PREEMPT_RCU case, you might see stall-warning
99 messages.
100
83o A bug in the RCU implementation. 101o A bug in the RCU implementation.
84 102
85o A hardware failure. This is quite unlikely, but has occurred 103o A hardware failure. This is quite unlikely, but has occurred
diff --git a/Documentation/RCU/trace.txt b/Documentation/RCU/trace.txt
index efd8cc95c06b..a851118775d8 100644
--- a/Documentation/RCU/trace.txt
+++ b/Documentation/RCU/trace.txt
@@ -125,6 +125,17 @@ o "b" is the batch limit for this CPU. If more than this number
125 of RCU callbacks is ready to invoke, then the remainder will 125 of RCU callbacks is ready to invoke, then the remainder will
126 be deferred. 126 be deferred.
127 127
128o "ci" is the number of RCU callbacks that have been invoked for
129 this CPU. Note that ci+ql is the number of callbacks that have
130 been registered in absence of CPU-hotplug activity.
131
132o "co" is the number of RCU callbacks that have been orphaned due to
133 this CPU going offline.
134
135o "ca" is the number of RCU callbacks that have been adopted due to
136 other CPUs going offline. Note that ci+co-ca+ql is the number of
137 RCU callbacks registered on this CPU.
138
128There is also an rcu/rcudata.csv file with the same information in 139There is also an rcu/rcudata.csv file with the same information in
129comma-separated-variable spreadsheet format. 140comma-separated-variable spreadsheet format.
130 141
@@ -180,7 +191,7 @@ o "s" is the "signaled" state that drives force_quiescent_state()'s
180 191
181o "jfq" is the number of jiffies remaining for this grace period 192o "jfq" is the number of jiffies remaining for this grace period
182 before force_quiescent_state() is invoked to help push things 193 before force_quiescent_state() is invoked to help push things
183 along. Note that CPUs in dyntick-idle mode thoughout the grace 194 along. Note that CPUs in dyntick-idle mode throughout the grace
184 period will not report on their own, but rather must be check by 195 period will not report on their own, but rather must be check by
185 some other CPU via force_quiescent_state(). 196 some other CPU via force_quiescent_state().
186 197
diff --git a/Documentation/acpi/method-customizing.txt b/Documentation/acpi/method-customizing.txt
index e628cd23ca80..3e1d25aee3fb 100644
--- a/Documentation/acpi/method-customizing.txt
+++ b/Documentation/acpi/method-customizing.txt
@@ -19,6 +19,8 @@ Note: Only ACPI METHOD can be overridden, any other object types like
19 "Device", "OperationRegion", are not recognized. 19 "Device", "OperationRegion", are not recognized.
20Note: The same ACPI control method can be overridden for many times, 20Note: The same ACPI control method can be overridden for many times,
21 and it's always the latest one that used by Linux/kernel. 21 and it's always the latest one that used by Linux/kernel.
22Note: To get the ACPI debug object output (Store (AAAA, Debug)),
23 please run "echo 1 > /sys/module/acpi/parameters/aml_debug_output".
22 24
231. override an existing method 251. override an existing method
24 a) get the ACPI table via ACPI sysfs I/F. e.g. to get the DSDT, 26 a) get the ACPI table via ACPI sysfs I/F. e.g. to get the DSDT,
diff --git a/Documentation/arm/00-INDEX b/Documentation/arm/00-INDEX
index 7f5fc3ba9c91..ecf7d04bca26 100644
--- a/Documentation/arm/00-INDEX
+++ b/Documentation/arm/00-INDEX
@@ -6,6 +6,8 @@ Interrupts
6 - ARM Interrupt subsystem documentation 6 - ARM Interrupt subsystem documentation
7IXP2000 7IXP2000
8 - Release Notes for Linux on Intel's IXP2000 Network Processor 8 - Release Notes for Linux on Intel's IXP2000 Network Processor
9msm
10 - MSM specific documentation
9Netwinder 11Netwinder
10 - Netwinder specific documentation 12 - Netwinder specific documentation
11Porting 13Porting
diff --git a/Documentation/arm/msm/gpiomux.txt b/Documentation/arm/msm/gpiomux.txt
new file mode 100644
index 000000000000..67a81620adf6
--- /dev/null
+++ b/Documentation/arm/msm/gpiomux.txt
@@ -0,0 +1,176 @@
1This document provides an overview of the msm_gpiomux interface, which
2is used to provide gpio pin multiplexing and configuration on mach-msm
3targets.
4
5History
6=======
7
8The first-generation API for gpio configuration & multiplexing on msm
9is the function gpio_tlmm_config(). This function has a few notable
10shortcomings, which led to its deprecation and replacement by gpiomux:
11
12The 'disable' parameter: Setting the second parameter to
13gpio_tlmm_config to GPIO_CFG_DISABLE tells the peripheral
14processor in charge of the subsystem to perform a look-up into a
15low-power table and apply the low-power/sleep setting for the pin.
16As the msm family evolved this became problematic. Not all pins
17have sleep settings, not all peripheral processors will accept requests
18to apply said sleep settings, and not all msm targets have their gpio
19subsystems managed by a peripheral processor. In order to get consistent
20behavior on all targets, drivers are forced to ignore this parameter,
21rendering it useless.
22
23The 'direction' flag: for all mux-settings other than raw-gpio (0),
24the output-enable bit of a gpio is hard-wired to a known
25input (usually VDD or ground). For those settings, the direction flag
26is meaningless at best, and deceptive at worst. In addition, using the
27direction flag to change output-enable (OE) directly can cause trouble in
28gpiolib, which has no visibility into gpio direction changes made
29in this way. Direction control in gpio mode should be made through gpiolib.
30
31Key Features of gpiomux
32=======================
33
34- A consistent interface across all generations of msm. Drivers can expect
35the same results on every target.
36- gpiomux plays nicely with gpiolib. Functions that should belong to gpiolib
37are left to gpiolib and not duplicated here. gpiomux is written with the
38intent that gpio_chips will call gpiomux reference-counting methods
39from their request() and free() hooks, providing full integration.
40- Tabular configuration. Instead of having to call gpio_tlmm_config
41hundreds of times, gpio configuration is placed in a single table.
42- Per-gpio sleep. Each gpio is individually reference counted, allowing only
43those lines which are in use to be put in high-power states.
44- 0 means 'do nothing': all flags are designed so that the default memset-zero
45equates to a sensible default of 'no configuration', preventing users
46from having to provide hundreds of 'no-op' configs for unused or
47unwanted lines.
48
49Usage
50=====
51
52To use gpiomux, provide configuration information for relevant gpio lines
53in the msm_gpiomux_configs table. Since a 0 equates to "unconfigured",
54only those lines to be managed by gpiomux need to be specified. Here
55is a completely fictional example:
56
57struct msm_gpiomux_config msm_gpiomux_configs[GPIOMUX_NGPIOS] = {
58 [12] = {
59 .active = GPIOMUX_VALID | GPIOMUX_DRV_8MA | GPIOMUX_FUNC_1,
60 .suspended = GPIOMUX_VALID | GPIOMUX_PULL_DOWN,
61 },
62 [34] = {
63 .suspended = GPIOMUX_VALID | GPIOMUX_PULL_DOWN,
64 },
65};
66
67To indicate that a gpio is in use, call msm_gpiomux_get() to increase
68its reference count. To decrease the reference count, call msm_gpiomux_put().
69
70The effect of this configuration is as follows:
71
72When the system boots, gpios 12 and 34 will be initialized with their
73'suspended' configurations. All other gpios, which were left unconfigured,
74will not be touched.
75
76When msm_gpiomux_get() is called on gpio 12 to raise its reference count
77above 0, its active configuration will be applied. Since no other gpio
78line has a valid active configuration, msm_gpiomux_get() will have no
79effect on any other line.
80
81When msm_gpiomux_put() is called on gpio 12 or 34 to drop their reference
82count to 0, their suspended configurations will be applied.
83Since no other gpio line has a valid suspended configuration, no other
84gpio line will be effected by msm_gpiomux_put(). Since gpio 34 has no valid
85active configuration, this is effectively a no-op for gpio 34 as well,
86with one small caveat, see the section "About Output-Enable Settings".
87
88All of the GPIOMUX_VALID flags may seem like unnecessary overhead, but
89they address some important issues. As unused entries (all those
90except 12 and 34) are zero-filled, gpiomux needs a way to distinguish
91the used fields from the unused. In addition, the all-zero pattern
92is a valid configuration! Therefore, gpiomux defines an additional bit
93which is used to indicate when a field is used. This has the pleasant
94side-effect of allowing calls to msm_gpiomux_write to use '0' to indicate
95that a value should not be changed:
96
97 msm_gpiomux_write(0, GPIOMUX_VALID, 0);
98
99replaces the active configuration of gpio 0 with an all-zero configuration,
100but leaves the suspended configuration as it was.
101
102Static Configurations
103=====================
104
105To install a static configuration, which is applied at boot and does
106not change after that, install a configuration with a suspended component
107but no active component, as in the previous example:
108
109 [34] = {
110 .suspended = GPIOMUX_VALID | GPIOMUX_PULL_DOWN,
111 },
112
113The suspended setting is applied during boot, and the lack of any valid
114active setting prevents any other setting from being applied at runtime.
115If other subsystems attempting to access the line is a concern, one could
116*really* anchor the configuration down by calling msm_gpiomux_get on the
117line at initialization to move the line into active mode. With the line
118held, it will never be re-suspended, and with no valid active configuration,
119no new configurations will be applied.
120
121But then, if having other subsystems grabbing for the line is truly a concern,
122it should be reserved with gpio_request instead, which carries an implicit
123msm_gpiomux_get.
124
125gpiomux and gpiolib
126===================
127
128It is expected that msm gpio_chips will call msm_gpiomux_get() and
129msm_gpiomux_put() from their request and free hooks, like this fictional
130example:
131
132static int request(struct gpio_chip *chip, unsigned offset)
133{
134 return msm_gpiomux_get(chip->base + offset);
135}
136
137static void free(struct gpio_chip *chip, unsigned offset)
138{
139 msm_gpiomux_put(chip->base + offset);
140}
141
142 ...somewhere in a gpio_chip declaration...
143 .request = request,
144 .free = free,
145
146This provides important functionality:
147- It guarantees that a gpio line will have its 'active' config applied
148 when the line is requested, and will not be suspended while the line
149 remains requested; and
150- It guarantees that gpio-direction settings from gpiolib behave sensibly.
151 See "About Output-Enable Settings."
152
153This mechanism allows for "auto-request" of gpiomux lines via gpiolib
154when it is suitable. Drivers wishing more exact control are, of course,
155free to also use msm_gpiomux_set and msm_gpiomux_get.
156
157About Output-Enable Settings
158============================
159
160Some msm targets do not have the ability to query the current gpio
161configuration setting. This means that changes made to the output-enable
162(OE) bit by gpiolib cannot be consistently detected and preserved by gpiomux.
163Therefore, when gpiomux applies a configuration setting, any direction
164settings which may have been applied by gpiolib are lost and the default
165input settings are re-applied.
166
167For this reason, drivers should not assume that gpio direction settings
168continue to hold if they free and then re-request a gpio. This seems like
169common sense - after all, anybody could have obtained the line in the
170meantime - but it needs saying.
171
172This also means that calls to msm_gpiomux_write will reset the OE bit,
173which means that if the gpio line is held by a client of gpiolib and
174msm_gpiomux_write is called, the direction setting has been lost and
175gpiolib's internal state has been broken.
176Release gpio lines before reconfiguring them.
diff --git a/Documentation/block/00-INDEX b/Documentation/block/00-INDEX
index a406286f6f3e..d111e3b23db0 100644
--- a/Documentation/block/00-INDEX
+++ b/Documentation/block/00-INDEX
@@ -1,7 +1,5 @@
100-INDEX 100-INDEX
2 - This file 2 - This file
3barrier.txt
4 - I/O Barriers
5biodoc.txt 3biodoc.txt
6 - Notes on the Generic Block Layer Rewrite in Linux 2.5 4 - Notes on the Generic Block Layer Rewrite in Linux 2.5
7capability.txt 5capability.txt
@@ -16,3 +14,5 @@ stat.txt
16 - Block layer statistics in /sys/block/<dev>/stat 14 - Block layer statistics in /sys/block/<dev>/stat
17switching-sched.txt 15switching-sched.txt
18 - Switching I/O schedulers at runtime 16 - Switching I/O schedulers at runtime
17writeback_cache_control.txt
18 - Control of volatile write back caches
diff --git a/Documentation/block/barrier.txt b/Documentation/block/barrier.txt
deleted file mode 100644
index 2c2f24f634e4..000000000000
--- a/Documentation/block/barrier.txt
+++ /dev/null
@@ -1,261 +0,0 @@
1I/O Barriers
2============
3Tejun Heo <htejun@gmail.com>, July 22 2005
4
5I/O barrier requests are used to guarantee ordering around the barrier
6requests. Unless you're crazy enough to use disk drives for
7implementing synchronization constructs (wow, sounds interesting...),
8the ordering is meaningful only for write requests for things like
9journal checkpoints. All requests queued before a barrier request
10must be finished (made it to the physical medium) before the barrier
11request is started, and all requests queued after the barrier request
12must be started only after the barrier request is finished (again,
13made it to the physical medium).
14
15In other words, I/O barrier requests have the following two properties.
16
171. Request ordering
18
19Requests cannot pass the barrier request. Preceding requests are
20processed before the barrier and following requests after.
21
22Depending on what features a drive supports, this can be done in one
23of the following three ways.
24
25i. For devices which have queue depth greater than 1 (TCQ devices) and
26support ordered tags, block layer can just issue the barrier as an
27ordered request and the lower level driver, controller and drive
28itself are responsible for making sure that the ordering constraint is
29met. Most modern SCSI controllers/drives should support this.
30
31NOTE: SCSI ordered tag isn't currently used due to limitation in the
32 SCSI midlayer, see the following random notes section.
33
34ii. For devices which have queue depth greater than 1 but don't
35support ordered tags, block layer ensures that the requests preceding
36a barrier request finishes before issuing the barrier request. Also,
37it defers requests following the barrier until the barrier request is
38finished. Older SCSI controllers/drives and SATA drives fall in this
39category.
40
41iii. Devices which have queue depth of 1. This is a degenerate case
42of ii. Just keeping issue order suffices. Ancient SCSI
43controllers/drives and IDE drives are in this category.
44
452. Forced flushing to physical medium
46
47Again, if you're not gonna do synchronization with disk drives (dang,
48it sounds even more appealing now!), the reason you use I/O barriers
49is mainly to protect filesystem integrity when power failure or some
50other events abruptly stop the drive from operating and possibly make
51the drive lose data in its cache. So, I/O barriers need to guarantee
52that requests actually get written to non-volatile medium in order.
53
54There are four cases,
55
56i. No write-back cache. Keeping requests ordered is enough.
57
58ii. Write-back cache but no flush operation. There's no way to
59guarantee physical-medium commit order. This kind of devices can't to
60I/O barriers.
61
62iii. Write-back cache and flush operation but no FUA (forced unit
63access). We need two cache flushes - before and after the barrier
64request.
65
66iv. Write-back cache, flush operation and FUA. We still need one
67flush to make sure requests preceding a barrier are written to medium,
68but post-barrier flush can be avoided by using FUA write on the
69barrier itself.
70
71
72How to support barrier requests in drivers
73------------------------------------------
74
75All barrier handling is done inside block layer proper. All low level
76drivers have to are implementing its prepare_flush_fn and using one
77the following two functions to indicate what barrier type it supports
78and how to prepare flush requests. Note that the term 'ordered' is
79used to indicate the whole sequence of performing barrier requests
80including draining and flushing.
81
82typedef void (prepare_flush_fn)(struct request_queue *q, struct request *rq);
83
84int blk_queue_ordered(struct request_queue *q, unsigned ordered,
85 prepare_flush_fn *prepare_flush_fn);
86
87@q : the queue in question
88@ordered : the ordered mode the driver/device supports
89@prepare_flush_fn : this function should prepare @rq such that it
90 flushes cache to physical medium when executed
91
92For example, SCSI disk driver's prepare_flush_fn looks like the
93following.
94
95static void sd_prepare_flush(struct request_queue *q, struct request *rq)
96{
97 memset(rq->cmd, 0, sizeof(rq->cmd));
98 rq->cmd_type = REQ_TYPE_BLOCK_PC;
99 rq->timeout = SD_TIMEOUT;
100 rq->cmd[0] = SYNCHRONIZE_CACHE;
101 rq->cmd_len = 10;
102}
103
104The following seven ordered modes are supported. The following table
105shows which mode should be used depending on what features a
106device/driver supports. In the leftmost column of table,
107QUEUE_ORDERED_ prefix is omitted from the mode names to save space.
108
109The table is followed by description of each mode. Note that in the
110descriptions of QUEUE_ORDERED_DRAIN*, '=>' is used whereas '->' is
111used for QUEUE_ORDERED_TAG* descriptions. '=>' indicates that the
112preceding step must be complete before proceeding to the next step.
113'->' indicates that the next step can start as soon as the previous
114step is issued.
115
116 write-back cache ordered tag flush FUA
117-----------------------------------------------------------------------
118NONE yes/no N/A no N/A
119DRAIN no no N/A N/A
120DRAIN_FLUSH yes no yes no
121DRAIN_FUA yes no yes yes
122TAG no yes N/A N/A
123TAG_FLUSH yes yes yes no
124TAG_FUA yes yes yes yes
125
126
127QUEUE_ORDERED_NONE
128 I/O barriers are not needed and/or supported.
129
130 Sequence: N/A
131
132QUEUE_ORDERED_DRAIN
133 Requests are ordered by draining the request queue and cache
134 flushing isn't needed.
135
136 Sequence: drain => barrier
137
138QUEUE_ORDERED_DRAIN_FLUSH
139 Requests are ordered by draining the request queue and both
140 pre-barrier and post-barrier cache flushings are needed.
141
142 Sequence: drain => preflush => barrier => postflush
143
144QUEUE_ORDERED_DRAIN_FUA
145 Requests are ordered by draining the request queue and
146 pre-barrier cache flushing is needed. By using FUA on barrier
147 request, post-barrier flushing can be skipped.
148
149 Sequence: drain => preflush => barrier
150
151QUEUE_ORDERED_TAG
152 Requests are ordered by ordered tag and cache flushing isn't
153 needed.
154
155 Sequence: barrier
156
157QUEUE_ORDERED_TAG_FLUSH
158 Requests are ordered by ordered tag and both pre-barrier and
159 post-barrier cache flushings are needed.
160
161 Sequence: preflush -> barrier -> postflush
162
163QUEUE_ORDERED_TAG_FUA
164 Requests are ordered by ordered tag and pre-barrier cache
165 flushing is needed. By using FUA on barrier request,
166 post-barrier flushing can be skipped.
167
168 Sequence: preflush -> barrier
169
170
171Random notes/caveats
172--------------------
173
174* SCSI layer currently can't use TAG ordering even if the drive,
175controller and driver support it. The problem is that SCSI midlayer
176request dispatch function is not atomic. It releases queue lock and
177switch to SCSI host lock during issue and it's possible and likely to
178happen in time that requests change their relative positions. Once
179this problem is solved, TAG ordering can be enabled.
180
181* Currently, no matter which ordered mode is used, there can be only
182one barrier request in progress. All I/O barriers are held off by
183block layer until the previous I/O barrier is complete. This doesn't
184make any difference for DRAIN ordered devices, but, for TAG ordered
185devices with very high command latency, passing multiple I/O barriers
186to low level *might* be helpful if they are very frequent. Well, this
187certainly is a non-issue. I'm writing this just to make clear that no
188two I/O barrier is ever passed to low-level driver.
189
190* Completion order. Requests in ordered sequence are issued in order
191but not required to finish in order. Barrier implementation can
192handle out-of-order completion of ordered sequence. IOW, the requests
193MUST be processed in order but the hardware/software completion paths
194are allowed to reorder completion notifications - eg. current SCSI
195midlayer doesn't preserve completion order during error handling.
196
197* Requeueing order. Low-level drivers are free to requeue any request
198after they removed it from the request queue with
199blkdev_dequeue_request(). As barrier sequence should be kept in order
200when requeued, generic elevator code takes care of putting requests in
201order around barrier. See blk_ordered_req_seq() and
202ELEVATOR_INSERT_REQUEUE handling in __elv_add_request() for details.
203
204Note that block drivers must not requeue preceding requests while
205completing latter requests in an ordered sequence. Currently, no
206error checking is done against this.
207
208* Error handling. Currently, block layer will report error to upper
209layer if any of requests in an ordered sequence fails. Unfortunately,
210this doesn't seem to be enough. Look at the following request flow.
211QUEUE_ORDERED_TAG_FLUSH is in use.
212
213 [0] [1] [2] [3] [pre] [barrier] [post] < [4] [5] [6] ... >
214 still in elevator
215
216Let's say request [2], [3] are write requests to update file system
217metadata (journal or whatever) and [barrier] is used to mark that
218those updates are valid. Consider the following sequence.
219
220 i. Requests [0] ~ [post] leaves the request queue and enters
221 low-level driver.
222 ii. After a while, unfortunately, something goes wrong and the
223 drive fails [2]. Note that any of [0], [1] and [3] could have
224 completed by this time, but [pre] couldn't have been finished
225 as the drive must process it in order and it failed before
226 processing that command.
227 iii. Error handling kicks in and determines that the error is
228 unrecoverable and fails [2], and resumes operation.
229 iv. [pre] [barrier] [post] gets processed.
230 v. *BOOM* power fails
231
232The problem here is that the barrier request is *supposed* to indicate
233that filesystem update requests [2] and [3] made it safely to the
234physical medium and, if the machine crashes after the barrier is
235written, filesystem recovery code can depend on that. Sadly, that
236isn't true in this case anymore. IOW, the success of a I/O barrier
237should also be dependent on success of some of the preceding requests,
238where only upper layer (filesystem) knows what 'some' is.
239
240This can be solved by implementing a way to tell the block layer which
241requests affect the success of the following barrier request and
242making lower lever drivers to resume operation on error only after
243block layer tells it to do so.
244
245As the probability of this happening is very low and the drive should
246be faulty, implementing the fix is probably an overkill. But, still,
247it's there.
248
249* In previous drafts of barrier implementation, there was fallback
250mechanism such that, if FUA or ordered TAG fails, less fancy ordered
251mode can be selected and the failed barrier request is retried
252automatically. The rationale for this feature was that as FUA is
253pretty new in ATA world and ordered tag was never used widely, there
254could be devices which report to support those features but choke when
255actually given such requests.
256
257 This was removed for two reasons 1. it's an overkill 2. it's
258impossible to implement properly when TAG ordering is used as low
259level drivers resume after an error automatically. If it's ever
260needed adding it back and modifying low level drivers accordingly
261shouldn't be difficult.
diff --git a/Documentation/block/cfq-iosched.txt b/Documentation/block/cfq-iosched.txt
new file mode 100644
index 000000000000..e578feed6d81
--- /dev/null
+++ b/Documentation/block/cfq-iosched.txt
@@ -0,0 +1,45 @@
1CFQ ioscheduler tunables
2========================
3
4slice_idle
5----------
6This specifies how long CFQ should idle for next request on certain cfq queues
7(for sequential workloads) and service trees (for random workloads) before
8queue is expired and CFQ selects next queue to dispatch from.
9
10By default slice_idle is a non-zero value. That means by default we idle on
11queues/service trees. This can be very helpful on highly seeky media like
12single spindle SATA/SAS disks where we can cut down on overall number of
13seeks and see improved throughput.
14
15Setting slice_idle to 0 will remove all the idling on queues/service tree
16level and one should see an overall improved throughput on faster storage
17devices like multiple SATA/SAS disks in hardware RAID configuration. The down
18side is that isolation provided from WRITES also goes down and notion of
19IO priority becomes weaker.
20
21So depending on storage and workload, it might be useful to set slice_idle=0.
22In general I think for SATA/SAS disks and software RAID of SATA/SAS disks
23keeping slice_idle enabled should be useful. For any configurations where
24there are multiple spindles behind single LUN (Host based hardware RAID
25controller or for storage arrays), setting slice_idle=0 might end up in better
26throughput and acceptable latencies.
27
28CFQ IOPS Mode for group scheduling
29===================================
30Basic CFQ design is to provide priority based time slices. Higher priority
31process gets bigger time slice and lower priority process gets smaller time
32slice. Measuring time becomes harder if storage is fast and supports NCQ and
33it would be better to dispatch multiple requests from multiple cfq queues in
34request queue at a time. In such scenario, it is not possible to measure time
35consumed by single queue accurately.
36
37What is possible though is to measure number of requests dispatched from a
38single queue and also allow dispatch from multiple cfq queue at the same time.
39This effectively becomes the fairness in terms of IOPS (IO operations per
40second).
41
42If one sets slice_idle=0 and if storage supports NCQ, CFQ internally switches
43to IOPS mode and starts providing fairness in terms of number of requests
44dispatched. Note that this mode switching takes effect only for group
45scheduling. For non-cgroup users nothing should change.
diff --git a/Documentation/block/writeback_cache_control.txt b/Documentation/block/writeback_cache_control.txt
new file mode 100644
index 000000000000..83407d36630a
--- /dev/null
+++ b/Documentation/block/writeback_cache_control.txt
@@ -0,0 +1,86 @@
1
2Explicit volatile write back cache control
3=====================================
4
5Introduction
6------------
7
8Many storage devices, especially in the consumer market, come with volatile
9write back caches. That means the devices signal I/O completion to the
10operating system before data actually has hit the non-volatile storage. This
11behavior obviously speeds up various workloads, but it means the operating
12system needs to force data out to the non-volatile storage when it performs
13a data integrity operation like fsync, sync or an unmount.
14
15The Linux block layer provides two simple mechanisms that let filesystems
16control the caching behavior of the storage device. These mechanisms are
17a forced cache flush, and the Force Unit Access (FUA) flag for requests.
18
19
20Explicit cache flushes
21----------------------
22
23The REQ_FLUSH flag can be OR ed into the r/w flags of a bio submitted from
24the filesystem and will make sure the volatile cache of the storage device
25has been flushed before the actual I/O operation is started. This explicitly
26guarantees that previously completed write requests are on non-volatile
27storage before the flagged bio starts. In addition the REQ_FLUSH flag can be
28set on an otherwise empty bio structure, which causes only an explicit cache
29flush without any dependent I/O. It is recommend to use
30the blkdev_issue_flush() helper for a pure cache flush.
31
32
33Forced Unit Access
34-----------------
35
36The REQ_FUA flag can be OR ed into the r/w flags of a bio submitted from the
37filesystem and will make sure that I/O completion for this request is only
38signaled after the data has been committed to non-volatile storage.
39
40
41Implementation details for filesystems
42--------------------------------------
43
44Filesystems can simply set the REQ_FLUSH and REQ_FUA bits and do not have to
45worry if the underlying devices need any explicit cache flushing and how
46the Forced Unit Access is implemented. The REQ_FLUSH and REQ_FUA flags
47may both be set on a single bio.
48
49
50Implementation details for make_request_fn based block drivers
51--------------------------------------------------------------
52
53These drivers will always see the REQ_FLUSH and REQ_FUA bits as they sit
54directly below the submit_bio interface. For remapping drivers the REQ_FUA
55bits need to be propagated to underlying devices, and a global flush needs
56to be implemented for bios with the REQ_FLUSH bit set. For real device
57drivers that do not have a volatile cache the REQ_FLUSH and REQ_FUA bits
58on non-empty bios can simply be ignored, and REQ_FLUSH requests without
59data can be completed successfully without doing any work. Drivers for
60devices with volatile caches need to implement the support for these
61flags themselves without any help from the block layer.
62
63
64Implementation details for request_fn based block drivers
65--------------------------------------------------------------
66
67For devices that do not support volatile write caches there is no driver
68support required, the block layer completes empty REQ_FLUSH requests before
69entering the driver and strips off the REQ_FLUSH and REQ_FUA bits from
70requests that have a payload. For devices with volatile write caches the
71driver needs to tell the block layer that it supports flushing caches by
72doing:
73
74 blk_queue_flush(sdkp->disk->queue, REQ_FLUSH);
75
76and handle empty REQ_FLUSH requests in its prep_fn/request_fn. Note that
77REQ_FLUSH requests with a payload are automatically turned into a sequence
78of an empty REQ_FLUSH request followed by the actual write by the block
79layer. For devices that also support the FUA bit the block layer needs
80to be told to pass through the REQ_FUA bit using:
81
82 blk_queue_flush(sdkp->disk->queue, REQ_FLUSH | REQ_FUA);
83
84and the driver must handle write requests that have the REQ_FUA bit set
85in prep_fn/request_fn. If the FUA bit is not natively supported the block
86layer turns it into an empty REQ_FLUSH request after the actual write.
diff --git a/Documentation/cgroups/blkio-controller.txt b/Documentation/cgroups/blkio-controller.txt
index 48e0b21b0059..d6da611f8f63 100644
--- a/Documentation/cgroups/blkio-controller.txt
+++ b/Documentation/cgroups/blkio-controller.txt
@@ -8,12 +8,17 @@ both at leaf nodes as well as at intermediate nodes in a storage hierarchy.
8Plan is to use the same cgroup based management interface for blkio controller 8Plan is to use the same cgroup based management interface for blkio controller
9and based on user options switch IO policies in the background. 9and based on user options switch IO policies in the background.
10 10
11In the first phase, this patchset implements proportional weight time based 11Currently two IO control policies are implemented. First one is proportional
12division of disk policy. It is implemented in CFQ. Hence this policy takes 12weight time based division of disk policy. It is implemented in CFQ. Hence
13effect only on leaf nodes when CFQ is being used. 13this policy takes effect only on leaf nodes when CFQ is being used. The second
14one is throttling policy which can be used to specify upper IO rate limits
15on devices. This policy is implemented in generic block layer and can be
16used on leaf nodes as well as higher level logical devices like device mapper.
14 17
15HOWTO 18HOWTO
16===== 19=====
20Proportional Weight division of bandwidth
21-----------------------------------------
17You can do a very simple testing of running two dd threads in two different 22You can do a very simple testing of running two dd threads in two different
18cgroups. Here is what you can do. 23cgroups. Here is what you can do.
19 24
@@ -55,6 +60,35 @@ cgroups. Here is what you can do.
55 group dispatched to the disk. We provide fairness in terms of disk time, so 60 group dispatched to the disk. We provide fairness in terms of disk time, so
56 ideally io.disk_time of cgroups should be in proportion to the weight. 61 ideally io.disk_time of cgroups should be in proportion to the weight.
57 62
63Throttling/Upper Limit policy
64-----------------------------
65- Enable Block IO controller
66 CONFIG_BLK_CGROUP=y
67
68- Enable throttling in block layer
69 CONFIG_BLK_DEV_THROTTLING=y
70
71- Mount blkio controller
72 mount -t cgroup -o blkio none /cgroup/blkio
73
74- Specify a bandwidth rate on particular device for root group. The format
75 for policy is "<major>:<minor> <byes_per_second>".
76
77 echo "8:16 1048576" > /cgroup/blkio/blkio.read_bps_device
78
79 Above will put a limit of 1MB/second on reads happening for root group
80 on device having major/minor number 8:16.
81
82- Run dd to read a file and see if rate is throttled to 1MB/s or not.
83
84 # dd if=/mnt/common/zerofile of=/dev/null bs=4K count=1024
85 # iflag=direct
86 1024+0 records in
87 1024+0 records out
88 4194304 bytes (4.2 MB) copied, 4.0001 s, 1.0 MB/s
89
90 Limits for writes can be put using blkio.write_bps_device file.
91
58Various user visible config options 92Various user visible config options
59=================================== 93===================================
60CONFIG_BLK_CGROUP 94CONFIG_BLK_CGROUP
@@ -68,8 +102,13 @@ CONFIG_CFQ_GROUP_IOSCHED
68 - Enables group scheduling in CFQ. Currently only 1 level of group 102 - Enables group scheduling in CFQ. Currently only 1 level of group
69 creation is allowed. 103 creation is allowed.
70 104
105CONFIG_BLK_DEV_THROTTLING
106 - Enable block device throttling support in block layer.
107
71Details of cgroup files 108Details of cgroup files
72======================= 109=======================
110Proportional weight policy files
111--------------------------------
73- blkio.weight 112- blkio.weight
74 - Specifies per cgroup weight. This is default weight of the group 113 - Specifies per cgroup weight. This is default weight of the group
75 on all the devices until and unless overridden by per device rule. 114 on all the devices until and unless overridden by per device rule.
@@ -210,6 +249,67 @@ Details of cgroup files
210 and minor number of the device and third field specifies the number 249 and minor number of the device and third field specifies the number
211 of times a group was dequeued from a particular device. 250 of times a group was dequeued from a particular device.
212 251
252Throttling/Upper limit policy files
253-----------------------------------
254- blkio.throttle.read_bps_device
255 - Specifies upper limit on READ rate from the device. IO rate is
256 specified in bytes per second. Rules are per deivce. Following is
257 the format.
258
259 echo "<major>:<minor> <rate_bytes_per_second>" > /cgrp/blkio.read_bps_device
260
261- blkio.throttle.write_bps_device
262 - Specifies upper limit on WRITE rate to the device. IO rate is
263 specified in bytes per second. Rules are per deivce. Following is
264 the format.
265
266 echo "<major>:<minor> <rate_bytes_per_second>" > /cgrp/blkio.write_bps_device
267
268- blkio.throttle.read_iops_device
269 - Specifies upper limit on READ rate from the device. IO rate is
270 specified in IO per second. Rules are per deivce. Following is
271 the format.
272
273 echo "<major>:<minor> <rate_io_per_second>" > /cgrp/blkio.read_iops_device
274
275- blkio.throttle.write_iops_device
276 - Specifies upper limit on WRITE rate to the device. IO rate is
277 specified in io per second. Rules are per deivce. Following is
278 the format.
279
280 echo "<major>:<minor> <rate_io_per_second>" > /cgrp/blkio.write_iops_device
281
282Note: If both BW and IOPS rules are specified for a device, then IO is
283 subjectd to both the constraints.
284
285- blkio.throttle.io_serviced
286 - Number of IOs (bio) completed to/from the disk by the group (as
287 seen by throttling policy). These are further divided by the type
288 of operation - read or write, sync or async. First two fields specify
289 the major and minor number of the device, third field specifies the
290 operation type and the fourth field specifies the number of IOs.
291
292 blkio.io_serviced does accounting as seen by CFQ and counts are in
293 number of requests (struct request). On the other hand,
294 blkio.throttle.io_serviced counts number of IO in terms of number
295 of bios as seen by throttling policy. These bios can later be
296 merged by elevator and total number of requests completed can be
297 lesser.
298
299- blkio.throttle.io_service_bytes
300 - Number of bytes transferred to/from the disk by the group. These
301 are further divided by the type of operation - read or write, sync
302 or async. First two fields specify the major and minor number of the
303 device, third field specifies the operation type and the fourth field
304 specifies the number of bytes.
305
306 These numbers should roughly be same as blkio.io_service_bytes as
307 updated by CFQ. The difference between two is that
308 blkio.io_service_bytes will not be updated if CFQ is not operating
309 on request queue.
310
311Common files among various policies
312-----------------------------------
213- blkio.reset_stats 313- blkio.reset_stats
214 - Writing an int to this file will result in resetting all the stats 314 - Writing an int to this file will result in resetting all the stats
215 for that cgroup. 315 for that cgroup.
@@ -217,6 +317,7 @@ Details of cgroup files
217CFQ sysfs tunable 317CFQ sysfs tunable
218================= 318=================
219/sys/block/<disk>/queue/iosched/group_isolation 319/sys/block/<disk>/queue/iosched/group_isolation
320-----------------------------------------------
220 321
221If group_isolation=1, it provides stronger isolation between groups at the 322If group_isolation=1, it provides stronger isolation between groups at the
222expense of throughput. By default group_isolation is 0. In general that 323expense of throughput. By default group_isolation is 0. In general that
@@ -243,6 +344,33 @@ By default one should run with group_isolation=0. If that is not sufficient
243and one wants stronger isolation between groups, then set group_isolation=1 344and one wants stronger isolation between groups, then set group_isolation=1
244but this will come at cost of reduced throughput. 345but this will come at cost of reduced throughput.
245 346
347/sys/block/<disk>/queue/iosched/slice_idle
348------------------------------------------
349On a faster hardware CFQ can be slow, especially with sequential workload.
350This happens because CFQ idles on a single queue and single queue might not
351drive deeper request queue depths to keep the storage busy. In such scenarios
352one can try setting slice_idle=0 and that would switch CFQ to IOPS
353(IO operations per second) mode on NCQ supporting hardware.
354
355That means CFQ will not idle between cfq queues of a cfq group and hence be
356able to driver higher queue depth and achieve better throughput. That also
357means that cfq provides fairness among groups in terms of IOPS and not in
358terms of disk time.
359
360/sys/block/<disk>/queue/iosched/group_idle
361------------------------------------------
362If one disables idling on individual cfq queues and cfq service trees by
363setting slice_idle=0, group_idle kicks in. That means CFQ will still idle
364on the group in an attempt to provide fairness among groups.
365
366By default group_idle is same as slice_idle and does not do anything if
367slice_idle is enabled.
368
369One can experience an overall throughput drop if you have created multiple
370groups and put applications in that group which are not driving enough
371IO to keep disk busy. In that case set group_idle=0, and CFQ will not idle
372on individual groups and throughput should improve.
373
246What works 374What works
247========== 375==========
248- Currently only sync IO queues are support. All the buffered writes are 376- Currently only sync IO queues are support. All the buffered writes are
diff --git a/Documentation/cpu-hotplug.txt b/Documentation/cpu-hotplug.txt
index a99d7031cdf9..45d5a217484f 100644
--- a/Documentation/cpu-hotplug.txt
+++ b/Documentation/cpu-hotplug.txt
@@ -2,7 +2,7 @@
2 2
3 Maintainers: 3 Maintainers:
4 CPU Hotplug Core: 4 CPU Hotplug Core:
5 Rusty Russell <rusty@rustycorp.com.au> 5 Rusty Russell <rusty@rustcorp.com.au>
6 Srivatsa Vaddagiri <vatsa@in.ibm.com> 6 Srivatsa Vaddagiri <vatsa@in.ibm.com>
7 i386: 7 i386:
8 Zwane Mwaikambo <zwane@arm.linux.org.uk> 8 Zwane Mwaikambo <zwane@arm.linux.org.uk>
diff --git a/Documentation/cputopology.txt b/Documentation/cputopology.txt
index f1c5c4bccd3e..902d3151f527 100644
--- a/Documentation/cputopology.txt
+++ b/Documentation/cputopology.txt
@@ -14,25 +14,39 @@ to /proc/cpuinfo.
14 identifier (rather than the kernel's). The actual value is 14 identifier (rather than the kernel's). The actual value is
15 architecture and platform dependent. 15 architecture and platform dependent.
16 16
173) /sys/devices/system/cpu/cpuX/topology/thread_siblings: 173) /sys/devices/system/cpu/cpuX/topology/book_id:
18
19 the book ID of cpuX. Typically it is the hardware platform's
20 identifier (rather than the kernel's). The actual value is
21 architecture and platform dependent.
22
234) /sys/devices/system/cpu/cpuX/topology/thread_siblings:
18 24
19 internel kernel map of cpuX's hardware threads within the same 25 internel kernel map of cpuX's hardware threads within the same
20 core as cpuX 26 core as cpuX
21 27
224) /sys/devices/system/cpu/cpuX/topology/core_siblings: 285) /sys/devices/system/cpu/cpuX/topology/core_siblings:
23 29
24 internal kernel map of cpuX's hardware threads within the same 30 internal kernel map of cpuX's hardware threads within the same
25 physical_package_id. 31 physical_package_id.
26 32
336) /sys/devices/system/cpu/cpuX/topology/book_siblings:
34
35 internal kernel map of cpuX's hardware threads within the same
36 book_id.
37
27To implement it in an architecture-neutral way, a new source file, 38To implement it in an architecture-neutral way, a new source file,
28drivers/base/topology.c, is to export the 4 attributes. 39drivers/base/topology.c, is to export the 4 or 6 attributes. The two book
40related sysfs files will only be created if CONFIG_SCHED_BOOK is selected.
29 41
30For an architecture to support this feature, it must define some of 42For an architecture to support this feature, it must define some of
31these macros in include/asm-XXX/topology.h: 43these macros in include/asm-XXX/topology.h:
32#define topology_physical_package_id(cpu) 44#define topology_physical_package_id(cpu)
33#define topology_core_id(cpu) 45#define topology_core_id(cpu)
46#define topology_book_id(cpu)
34#define topology_thread_cpumask(cpu) 47#define topology_thread_cpumask(cpu)
35#define topology_core_cpumask(cpu) 48#define topology_core_cpumask(cpu)
49#define topology_book_cpumask(cpu)
36 50
37The type of **_id is int. 51The type of **_id is int.
38The type of siblings is (const) struct cpumask *. 52The type of siblings is (const) struct cpumask *.
@@ -45,6 +59,9 @@ not defined by include/asm-XXX/topology.h:
453) thread_siblings: just the given CPU 593) thread_siblings: just the given CPU
464) core_siblings: just the given CPU 604) core_siblings: just the given CPU
47 61
62For architectures that don't support books (CONFIG_SCHED_BOOK) there are no
63default definitions for topology_book_id() and topology_book_cpumask().
64
48Additionally, CPU topology information is provided under 65Additionally, CPU topology information is provided under
49/sys/devices/system/cpu and includes these files. The internal 66/sys/devices/system/cpu and includes these files. The internal
50source for the output is in brackets ("[]"). 67source for the output is in brackets ("[]").
diff --git a/Documentation/devices.txt b/Documentation/devices.txt
index f2da781705b2..c58abf1ccc71 100644
--- a/Documentation/devices.txt
+++ b/Documentation/devices.txt
@@ -239,6 +239,7 @@ Your cooperation is appreciated.
239 0 = /dev/tty Current TTY device 239 0 = /dev/tty Current TTY device
240 1 = /dev/console System console 240 1 = /dev/console System console
241 2 = /dev/ptmx PTY master multiplex 241 2 = /dev/ptmx PTY master multiplex
242 3 = /dev/ttyprintk User messages via printk TTY device
242 64 = /dev/cua0 Callout device for ttyS0 243 64 = /dev/cua0 Callout device for ttyS0
243 ... 244 ...
244 255 = /dev/cua191 Callout device for ttyS191 245 255 = /dev/cua191 Callout device for ttyS191
@@ -445,6 +446,7 @@ Your cooperation is appreciated.
445 233 = /dev/kmview View-OS A process with a view 446 233 = /dev/kmview View-OS A process with a view
446 234 = /dev/btrfs-control Btrfs control device 447 234 = /dev/btrfs-control Btrfs control device
447 235 = /dev/autofs Autofs control device 448 235 = /dev/autofs Autofs control device
449 236 = /dev/mapper/control Device-Mapper control device
448 240-254 Reserved for local use 450 240-254 Reserved for local use
449 255 Reserved for MISC_DYNAMIC_MINOR 451 255 Reserved for MISC_DYNAMIC_MINOR
450 452
@@ -2552,7 +2554,10 @@ Your cooperation is appreciated.
2552 175 = /dev/usb/legousbtower15 16th USB Legotower device 2554 175 = /dev/usb/legousbtower15 16th USB Legotower device
2553 176 = /dev/usb/usbtmc1 First USB TMC device 2555 176 = /dev/usb/usbtmc1 First USB TMC device
2554 ... 2556 ...
2555 192 = /dev/usb/usbtmc16 16th USB TMC device 2557 191 = /dev/usb/usbtmc16 16th USB TMC device
2558 192 = /dev/usb/yurex1 First USB Yurex device
2559 ...
2560 209 = /dev/usb/yurex16 16th USB Yurex device
2556 240 = /dev/usb/dabusb0 First daubusb device 2561 240 = /dev/usb/dabusb0 First daubusb device
2557 ... 2562 ...
2558 243 = /dev/usb/dabusb3 Fourth dabusb device 2563 243 = /dev/usb/dabusb3 Fourth dabusb device
diff --git a/Documentation/dynamic-debug-howto.txt b/Documentation/dynamic-debug-howto.txt
index 674c5663d346..58ea64a96165 100644
--- a/Documentation/dynamic-debug-howto.txt
+++ b/Documentation/dynamic-debug-howto.txt
@@ -24,7 +24,7 @@ Dynamic debug has even more useful features:
24 read to display the complete list of known debug statements, to help guide you 24 read to display the complete list of known debug statements, to help guide you
25 25
26Controlling dynamic debug Behaviour 26Controlling dynamic debug Behaviour
27=============================== 27===================================
28 28
29The behaviour of pr_debug()/dev_debug()s are controlled via writing to a 29The behaviour of pr_debug()/dev_debug()s are controlled via writing to a
30control file in the 'debugfs' filesystem. Thus, you must first mount the debugfs 30control file in the 'debugfs' filesystem. Thus, you must first mount the debugfs
@@ -212,6 +212,26 @@ Note the regexp ^[-+=][scp]+$ matches a flags specification.
212Note also that there is no convenient syntax to remove all 212Note also that there is no convenient syntax to remove all
213the flags at once, you need to use "-psc". 213the flags at once, you need to use "-psc".
214 214
215
216Debug messages during boot process
217==================================
218
219To be able to activate debug messages during the boot process,
220even before userspace and debugfs exists, use the boot parameter:
221ddebug_query="QUERY"
222
223QUERY follows the syntax described above, but must not exceed 1023
224characters. The enablement of debug messages is done as an arch_initcall.
225Thus you can enable debug messages in all code processed after this
226arch_initcall via this boot parameter.
227On an x86 system for example ACPI enablement is a subsys_initcall and
228ddebug_query="file ec.c +p"
229will show early Embedded Controller transactions during ACPI setup if
230your machine (typically a laptop) has an Embedded Controller.
231PCI (or other devices) initialization also is a hot candidate for using
232this boot parameter for debugging purposes.
233
234
215Examples 235Examples
216======== 236========
217 237
diff --git a/Documentation/feature-removal-schedule.txt b/Documentation/feature-removal-schedule.txt
index b16cbe4152ea..9961f1564d22 100644
--- a/Documentation/feature-removal-schedule.txt
+++ b/Documentation/feature-removal-schedule.txt
@@ -386,34 +386,6 @@ Who: Tejun Heo <tj@kernel.org>
386 386
387---------------------------- 387----------------------------
388 388
389What: Support for VMware's guest paravirtuliazation technique [VMI] will be
390 dropped.
391When: 2.6.37 or earlier.
392Why: With the recent innovations in CPU hardware acceleration technologies
393 from Intel and AMD, VMware ran a few experiments to compare these
394 techniques to guest paravirtualization technique on VMware's platform.
395 These hardware assisted virtualization techniques have outperformed the
396 performance benefits provided by VMI in most of the workloads. VMware
397 expects that these hardware features will be ubiquitous in a couple of
398 years, as a result, VMware has started a phased retirement of this
399 feature from the hypervisor. We will be removing this feature from the
400 Kernel too. Right now we are targeting 2.6.37 but can retire earlier if
401 technical reasons (read opportunity to remove major chunk of pvops)
402 arise.
403
404 Please note that VMI has always been an optimization and non-VMI kernels
405 still work fine on VMware's platform.
406 Latest versions of VMware's product which support VMI are,
407 Workstation 7.0 and VSphere 4.0 on ESX side, future maintainence
408 releases for these products will continue supporting VMI.
409
410 For more details about VMI retirement take a look at this,
411 http://blogs.vmware.com/guestosguide/2009/09/vmi-retirement.html
412
413Who: Alok N Kataria <akataria@vmware.com>
414
415----------------------------
416
417What: Support for lcd_switch and display_get in asus-laptop driver 389What: Support for lcd_switch and display_get in asus-laptop driver
418When: March 2010 390When: March 2010
419Why: These two features use non-standard interfaces. There are the 391Why: These two features use non-standard interfaces. There are the
@@ -547,3 +519,29 @@ Why: superseded by acpi_sleep=nonvs
547Who: Rafael J. Wysocki <rjw@sisk.pl> 519Who: Rafael J. Wysocki <rjw@sisk.pl>
548 520
549---------------------------- 521----------------------------
522
523What: PCI DMA unmap state API
524When: August 2012
525Why: PCI DMA unmap state API (include/linux/pci-dma.h) was replaced
526 with DMA unmap state API (DMA unmap state API can be used for
527 any bus).
528Who: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
529
530----------------------------
531
532What: DMA_xxBIT_MASK macros
533When: Jun 2011
534Why: DMA_xxBIT_MASK macros were replaced with DMA_BIT_MASK() macros.
535Who: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
536
537----------------------------
538
539What: iwlwifi disable_hw_scan module parameters
540When: 2.6.40
541Why: Hareware scan is the prefer method for iwlwifi devices for
542 scanning operation. Remove software scan support for all the
543 iwlwifi devices.
544
545Who: Wey-Yi Guy <wey-yi.w.guy@intel.com>
546
547----------------------------
diff --git a/Documentation/filesystems/Locking b/Documentation/filesystems/Locking
index bbcc15651a21..2db4283efa8d 100644
--- a/Documentation/filesystems/Locking
+++ b/Documentation/filesystems/Locking
@@ -374,8 +374,6 @@ prototypes:
374 ssize_t (*aio_write) (struct kiocb *, const struct iovec *, unsigned long, loff_t); 374 ssize_t (*aio_write) (struct kiocb *, const struct iovec *, unsigned long, loff_t);
375 int (*readdir) (struct file *, void *, filldir_t); 375 int (*readdir) (struct file *, void *, filldir_t);
376 unsigned int (*poll) (struct file *, struct poll_table_struct *); 376 unsigned int (*poll) (struct file *, struct poll_table_struct *);
377 int (*ioctl) (struct inode *, struct file *, unsigned int,
378 unsigned long);
379 long (*unlocked_ioctl) (struct file *, unsigned int, unsigned long); 377 long (*unlocked_ioctl) (struct file *, unsigned int, unsigned long);
380 long (*compat_ioctl) (struct file *, unsigned int, unsigned long); 378 long (*compat_ioctl) (struct file *, unsigned int, unsigned long);
381 int (*mmap) (struct file *, struct vm_area_struct *); 379 int (*mmap) (struct file *, struct vm_area_struct *);
@@ -409,8 +407,7 @@ write: no
409aio_write: no 407aio_write: no
410readdir: no 408readdir: no
411poll: no 409poll: no
412ioctl: yes (see below) 410unlocked_ioctl: no
413unlocked_ioctl: no (see below)
414compat_ioctl: no 411compat_ioctl: no
415mmap: no 412mmap: no
416open: no 413open: no
@@ -453,9 +450,6 @@ move ->readdir() to inode_operations and use a separate method for directory
453anything that resembles union-mount we won't have a struct file for all 450anything that resembles union-mount we won't have a struct file for all
454components. And there are other reasons why the current interface is a mess... 451components. And there are other reasons why the current interface is a mess...
455 452
456->ioctl() on regular files is superceded by the ->unlocked_ioctl() that
457doesn't take the BKL.
458
459->read on directories probably must go away - we should just enforce -EISDIR 453->read on directories probably must go away - we should just enforce -EISDIR
460in sys_read() and friends. 454in sys_read() and friends.
461 455
diff --git a/Documentation/filesystems/ocfs2.txt b/Documentation/filesystems/ocfs2.txt
index 1f7ae144f6d8..5393e6611691 100644
--- a/Documentation/filesystems/ocfs2.txt
+++ b/Documentation/filesystems/ocfs2.txt
@@ -87,3 +87,10 @@ dir_resv_level= (*) By default, directory reservations will scale with file
87 reservations - users should rarely need to change this 87 reservations - users should rarely need to change this
88 value. If allocation reservations are turned off, this 88 value. If allocation reservations are turned off, this
89 option will have no effect. 89 option will have no effect.
90coherency=full (*) Disallow concurrent O_DIRECT writes, cluster inode
91 lock will be taken to force other nodes drop cache,
92 therefore full cluster coherency is guaranteed even
93 for O_DIRECT writes.
94coherency=buffered Allow concurrent O_DIRECT writes without EX lock among
95 nodes, which gains high performance at risk of getting
96 stale data on other nodes.
diff --git a/Documentation/filesystems/squashfs.txt b/Documentation/filesystems/squashfs.txt
index 203f7202cc9e..66699afd66ca 100644
--- a/Documentation/filesystems/squashfs.txt
+++ b/Documentation/filesystems/squashfs.txt
@@ -2,7 +2,7 @@ SQUASHFS 4.0 FILESYSTEM
2======================= 2=======================
3 3
4Squashfs is a compressed read-only filesystem for Linux. 4Squashfs is a compressed read-only filesystem for Linux.
5It uses zlib compression to compress files, inodes and directories. 5It uses zlib/lzo compression to compress files, inodes and directories.
6Inodes in the system are very small and all blocks are packed to minimise 6Inodes in the system are very small and all blocks are packed to minimise
7data overhead. Block sizes greater than 4K are supported up to a maximum 7data overhead. Block sizes greater than 4K are supported up to a maximum
8of 1Mbytes (default block size 128K). 8of 1Mbytes (default block size 128K).
diff --git a/Documentation/filesystems/vfs.txt b/Documentation/filesystems/vfs.txt
index 94677e7dcb13..ed7e5efc06d8 100644
--- a/Documentation/filesystems/vfs.txt
+++ b/Documentation/filesystems/vfs.txt
@@ -727,7 +727,6 @@ struct file_operations {
727 ssize_t (*aio_write) (struct kiocb *, const struct iovec *, unsigned long, loff_t); 727 ssize_t (*aio_write) (struct kiocb *, const struct iovec *, unsigned long, loff_t);
728 int (*readdir) (struct file *, void *, filldir_t); 728 int (*readdir) (struct file *, void *, filldir_t);
729 unsigned int (*poll) (struct file *, struct poll_table_struct *); 729 unsigned int (*poll) (struct file *, struct poll_table_struct *);
730 int (*ioctl) (struct inode *, struct file *, unsigned int, unsigned long);
731 long (*unlocked_ioctl) (struct file *, unsigned int, unsigned long); 730 long (*unlocked_ioctl) (struct file *, unsigned int, unsigned long);
732 long (*compat_ioctl) (struct file *, unsigned int, unsigned long); 731 long (*compat_ioctl) (struct file *, unsigned int, unsigned long);
733 int (*mmap) (struct file *, struct vm_area_struct *); 732 int (*mmap) (struct file *, struct vm_area_struct *);
@@ -768,10 +767,7 @@ otherwise noted.
768 activity on this file and (optionally) go to sleep until there 767 activity on this file and (optionally) go to sleep until there
769 is activity. Called by the select(2) and poll(2) system calls 768 is activity. Called by the select(2) and poll(2) system calls
770 769
771 ioctl: called by the ioctl(2) system call 770 unlocked_ioctl: called by the ioctl(2) system call.
772
773 unlocked_ioctl: called by the ioctl(2) system call. Filesystems that do not
774 require the BKL should use this method instead of the ioctl() above.
775 771
776 compat_ioctl: called by the ioctl(2) system call when 32 bit system calls 772 compat_ioctl: called by the ioctl(2) system call when 32 bit system calls
777 are used on 64 bit kernels. 773 are used on 64 bit kernels.
diff --git a/Documentation/gpio.txt b/Documentation/gpio.txt
index c2c6e9b39bbe..9633da01ff46 100644
--- a/Documentation/gpio.txt
+++ b/Documentation/gpio.txt
@@ -109,17 +109,19 @@ use numbers 2000-2063 to identify GPIOs in a bank of I2C GPIO expanders.
109 109
110If you want to initialize a structure with an invalid GPIO number, use 110If you want to initialize a structure with an invalid GPIO number, use
111some negative number (perhaps "-EINVAL"); that will never be valid. To 111some negative number (perhaps "-EINVAL"); that will never be valid. To
112test if a number could reference a GPIO, you may use this predicate: 112test if such number from such a structure could reference a GPIO, you
113may use this predicate:
113 114
114 int gpio_is_valid(int number); 115 int gpio_is_valid(int number);
115 116
116A number that's not valid will be rejected by calls which may request 117A number that's not valid will be rejected by calls which may request
117or free GPIOs (see below). Other numbers may also be rejected; for 118or free GPIOs (see below). Other numbers may also be rejected; for
118example, a number might be valid but unused on a given board. 119example, a number might be valid but temporarily unused on a given board.
119
120Whether a platform supports multiple GPIO controllers is currently a
121platform-specific implementation issue.
122 120
121Whether a platform supports multiple GPIO controllers is a platform-specific
122implementation issue, as are whether that support can leave "holes" in the space
123of GPIO numbers, and whether new controllers can be added at runtime. Such issues
124can affect things including whether adjacent GPIO numbers are both valid.
123 125
124Using GPIOs 126Using GPIOs
125----------- 127-----------
@@ -158,10 +160,11 @@ and configure pullups/pulldowns appropriately.)
158Spinlock-Safe GPIO access 160Spinlock-Safe GPIO access
159------------------------- 161-------------------------
160Most GPIO controllers can be accessed with memory read/write instructions. 162Most GPIO controllers can be accessed with memory read/write instructions.
161That doesn't need to sleep, and can safely be done from inside IRQ handlers. 163Those don't need to sleep, and can safely be done from inside hard
162(That includes hardirq contexts on RT kernels.) 164(nonthreaded) IRQ handlers and similar contexts.
163 165
164Use these calls to access such GPIOs: 166Use the following calls to access such GPIOs,
167for which gpio_cansleep() will always return false (see below):
165 168
166 /* GPIO INPUT: return zero or nonzero */ 169 /* GPIO INPUT: return zero or nonzero */
167 int gpio_get_value(unsigned gpio); 170 int gpio_get_value(unsigned gpio);
@@ -210,9 +213,31 @@ To access such GPIOs, a different set of accessors is defined:
210 /* GPIO OUTPUT, might sleep */ 213 /* GPIO OUTPUT, might sleep */
211 void gpio_set_value_cansleep(unsigned gpio, int value); 214 void gpio_set_value_cansleep(unsigned gpio, int value);
212 215
213Other than the fact that these calls might sleep, and will not be ignored 216
214for GPIOs that can't be accessed from IRQ handlers, these calls act the 217Accessing such GPIOs requires a context which may sleep, for example
215same as the spinlock-safe calls. 218a threaded IRQ handler, and those accessors must be used instead of
219spinlock-safe accessors without the cansleep() name suffix.
220
221Other than the fact that these accessors might sleep, and will work
222on GPIOs that can't be accessed from hardIRQ handlers, these calls act
223the same as the spinlock-safe calls.
224
225 ** IN ADDITION ** calls to setup and configure such GPIOs must be made
226from contexts which may sleep, since they may need to access the GPIO
227controller chip too: (These setup calls are usually made from board
228setup or driver probe/teardown code, so this is an easy constraint.)
229
230 gpio_direction_input()
231 gpio_direction_output()
232 gpio_request()
233
234## gpio_request_one()
235## gpio_request_array()
236## gpio_free_array()
237
238 gpio_free()
239 gpio_set_debounce()
240
216 241
217 242
218Claiming and Releasing GPIOs 243Claiming and Releasing GPIOs
@@ -457,12 +482,16 @@ To support this framework, a platform's Kconfig will "select" either
457ARCH_REQUIRE_GPIOLIB or ARCH_WANT_OPTIONAL_GPIOLIB 482ARCH_REQUIRE_GPIOLIB or ARCH_WANT_OPTIONAL_GPIOLIB
458and arrange that its <asm/gpio.h> includes <asm-generic/gpio.h> and defines 483and arrange that its <asm/gpio.h> includes <asm-generic/gpio.h> and defines
459three functions: gpio_get_value(), gpio_set_value(), and gpio_cansleep(). 484three functions: gpio_get_value(), gpio_set_value(), and gpio_cansleep().
460They may also want to provide a custom value for ARCH_NR_GPIOS.
461 485
462ARCH_REQUIRE_GPIOLIB means that the gpio-lib code will always get compiled 486It may also provide a custom value for ARCH_NR_GPIOS, so that it better
487reflects the number of GPIOs in actual use on that platform, without
488wasting static table space. (It should count both built-in/SoC GPIOs and
489also ones on GPIO expanders.
490
491ARCH_REQUIRE_GPIOLIB means that the gpiolib code will always get compiled
463into the kernel on that architecture. 492into the kernel on that architecture.
464 493
465ARCH_WANT_OPTIONAL_GPIOLIB means the gpio-lib code defaults to off and the user 494ARCH_WANT_OPTIONAL_GPIOLIB means the gpiolib code defaults to off and the user
466can enable it and build it into the kernel optionally. 495can enable it and build it into the kernel optionally.
467 496
468If neither of these options are selected, the platform does not support 497If neither of these options are selected, the platform does not support
diff --git a/Documentation/hwmon/emc2103 b/Documentation/hwmon/emc2103
new file mode 100644
index 000000000000..a12b2c127140
--- /dev/null
+++ b/Documentation/hwmon/emc2103
@@ -0,0 +1,33 @@
1Kernel driver emc2103
2======================
3
4Supported chips:
5 * SMSC EMC2103
6 Addresses scanned: I2C 0x2e
7 Prefix: 'emc2103'
8 Datasheet: Not public
9
10Authors:
11 Steve Glendinning <steve.glendinning@smsc.com>
12
13Description
14-----------
15
16The Standard Microsystems Corporation (SMSC) EMC2103 chips
17contain up to 4 temperature sensors and a single fan controller.
18
19Fan rotation speeds are reported in RPM (rotations per minute). An alarm is
20triggered if the rotation speed has dropped below a programmable limit. Fan
21readings can be divided by a programmable divider (1, 2, 4 or 8) to give
22the readings more range or accuracy. Not all RPM values can accurately be
23represented, so some rounding is done. With a divider of 1, the lowest
24representable value is 480 RPM.
25
26This driver supports RPM based control, to use this a fan target
27should be written to fan1_target and pwm1_enable should be set to 3.
28
29The 2103-2 and 2103-4 variants have a third temperature sensor, which can
30be connected to two anti-parallel diodes. These values can be read
31as temp3 and temp4. If only one diode is attached to this channel, temp4
32will show as "fault". The module parameter "apd=0" can be used to suppress
33this 4th channel when anti-parallel diodes are not fitted.
diff --git a/Documentation/hwmon/f71882fg b/Documentation/hwmon/f71882fg
index 1a07fd674cd0..a7952c2bd959 100644
--- a/Documentation/hwmon/f71882fg
+++ b/Documentation/hwmon/f71882fg
@@ -2,10 +2,6 @@ Kernel driver f71882fg
2====================== 2======================
3 3
4Supported chips: 4Supported chips:
5 * Fintek F71808E
6 Prefix: 'f71808fg'
7 Addresses scanned: none, address read from Super I/O config space
8 Datasheet: Not public
9 * Fintek F71858FG 5 * Fintek F71858FG
10 Prefix: 'f71858fg' 6 Prefix: 'f71858fg'
11 Addresses scanned: none, address read from Super I/O config space 7 Addresses scanned: none, address read from Super I/O config space
diff --git a/Documentation/hwmon/ltc4245 b/Documentation/hwmon/ltc4245
index 86b5880d8502..b478b0864965 100644
--- a/Documentation/hwmon/ltc4245
+++ b/Documentation/hwmon/ltc4245
@@ -72,9 +72,31 @@ in6_min_alarm 5v output undervoltage alarm
72in7_min_alarm 3v output undervoltage alarm 72in7_min_alarm 3v output undervoltage alarm
73in8_min_alarm Vee (-12v) output undervoltage alarm 73in8_min_alarm Vee (-12v) output undervoltage alarm
74 74
75in9_input GPIO voltage data 75in9_input GPIO voltage data (see note 1)
76in10_input GPIO voltage data (see note 1)
77in11_input GPIO voltage data (see note 1)
76 78
77power1_input 12v power usage (mW) 79power1_input 12v power usage (mW)
78power2_input 5v power usage (mW) 80power2_input 5v power usage (mW)
79power3_input 3v power usage (mW) 81power3_input 3v power usage (mW)
80power4_input Vee (-12v) power usage (mW) 82power4_input Vee (-12v) power usage (mW)
83
84
85Note 1
86------
87
88If you have NOT configured the driver to sample all GPIO pins as analog
89voltages, then the in10_input and in11_input sysfs attributes will not be
90created. The driver will sample the GPIO pin that is currently connected to the
91ADC as an analog voltage, and report the value in in9_input.
92
93If you have configured the driver to sample all GPIO pins as analog voltages,
94then they will be sampled in round-robin fashion. If userspace reads too
95slowly, -EAGAIN will be returned when you read the sysfs attribute containing
96the sensor reading.
97
98The LTC4245 chip can be configured to sample all GPIO pins with two methods:
991) platform data -- see include/linux/i2c/ltc4245.h
1002) OF device tree -- add the "ltc4245,use-extra-gpios" property to each chip
101
102The default mode of operation is to sample a single GPIO pin.
diff --git a/Documentation/hwmon/pc87427 b/Documentation/hwmon/pc87427
index db5cc1227a83..8fdd08c9e48b 100644
--- a/Documentation/hwmon/pc87427
+++ b/Documentation/hwmon/pc87427
@@ -18,10 +18,11 @@ Description
18 18
19The National Semiconductor Super I/O chip includes complete hardware 19The National Semiconductor Super I/O chip includes complete hardware
20monitoring capabilities. It can monitor up to 18 voltages, 8 fans and 20monitoring capabilities. It can monitor up to 18 voltages, 8 fans and
216 temperature sensors. Only the fans are supported at the moment. 216 temperature sensors. Only the fans and temperatures are supported at
22the moment, voltages aren't.
22 23
23This chip also has fan controlling features, which are not yet supported 24This chip also has fan controlling features (up to 4 PWM outputs),
24by this driver either. 25which are partly supported by this driver.
25 26
26The driver assumes that no more than one chip is present, which seems 27The driver assumes that no more than one chip is present, which seems
27reasonable. 28reasonable.
@@ -36,3 +37,23 @@ signal. Speeds down to 83 RPM can be measured.
36An alarm is triggered if the rotation speed drops below a programmable 37An alarm is triggered if the rotation speed drops below a programmable
37limit. Another alarm is triggered if the speed is too low to be measured 38limit. Another alarm is triggered if the speed is too low to be measured
38(including stalled or missing fan). 39(including stalled or missing fan).
40
41
42Fan Speed Control
43-----------------
44
45Fan speed can be controlled by PWM outputs. There are 4 possible modes:
46always off, always on, manual and automatic. The latter isn't supported
47by the driver: you can only return to that mode if it was the original
48setting, and the configuration interface is missing.
49
50
51Temperature Monitoring
52----------------------
53
54The PC87427 relies on external sensors (following the SensorPath
55standard), so the resolution and range depend on the type of sensor
56connected. The integer part can be 8-bit or 9-bit, and can be signed or
57not. I couldn't find a way to figure out the external sensor data
58temperature format, so user-space adjustment (typically by a factor 2)
59may be required.
diff --git a/Documentation/hwmon/sysfs-interface b/Documentation/hwmon/sysfs-interface
index d4e2917c6f18..48ceabedf55d 100644
--- a/Documentation/hwmon/sysfs-interface
+++ b/Documentation/hwmon/sysfs-interface
@@ -91,12 +91,11 @@ name The chip name.
91 I2C devices get this attribute created automatically. 91 I2C devices get this attribute created automatically.
92 RO 92 RO
93 93
94update_rate The rate at which the chip will update readings. 94update_interval The interval at which the chip will update readings.
95 Unit: millisecond 95 Unit: millisecond
96 RW 96 RW
97 Some devices have a variable update rate. This attribute 97 Some devices have a variable update rate or interval.
98 can be used to change the update rate to the desired 98 This attribute can be used to change it to the desired value.
99 frequency.
100 99
101 100
102************ 101************
@@ -107,10 +106,24 @@ in[0-*]_min Voltage min value.
107 Unit: millivolt 106 Unit: millivolt
108 RW 107 RW
109 108
109in[0-*]_lcrit Voltage critical min value.
110 Unit: millivolt
111 RW
112 If voltage drops to or below this limit, the system may
113 take drastic action such as power down or reset. At the very
114 least, it should report a fault.
115
110in[0-*]_max Voltage max value. 116in[0-*]_max Voltage max value.
111 Unit: millivolt 117 Unit: millivolt
112 RW 118 RW
113 119
120in[0-*]_crit Voltage critical max value.
121 Unit: millivolt
122 RW
123 If voltage reaches or exceeds this limit, the system may
124 take drastic action such as power down or reset. At the very
125 least, it should report a fault.
126
114in[0-*]_input Voltage input value. 127in[0-*]_input Voltage input value.
115 Unit: millivolt 128 Unit: millivolt
116 RO 129 RO
@@ -284,7 +297,7 @@ temp[1-*]_input Temperature input value.
284 Unit: millidegree Celsius 297 Unit: millidegree Celsius
285 RO 298 RO
286 299
287temp[1-*]_crit Temperature critical value, typically greater than 300temp[1-*]_crit Temperature critical max value, typically greater than
288 corresponding temp_max values. 301 corresponding temp_max values.
289 Unit: millidegree Celsius 302 Unit: millidegree Celsius
290 RW 303 RW
@@ -296,6 +309,11 @@ temp[1-*]_crit_hyst
296 from the critical value. 309 from the critical value.
297 RW 310 RW
298 311
312temp[1-*]_lcrit Temperature critical min value, typically lower than
313 corresponding temp_min values.
314 Unit: millidegree Celsius
315 RW
316
299temp[1-*]_offset 317temp[1-*]_offset
300 Temperature offset which is added to the temperature reading 318 Temperature offset which is added to the temperature reading
301 by the chip. 319 by the chip.
@@ -344,9 +362,6 @@ Also see the Alarms section for status flags associated with temperatures.
344* Currents * 362* Currents *
345************ 363************
346 364
347Note that no known chip provides current measurements as of writing,
348so this part is theoretical, so to say.
349
350curr[1-*]_max Current max value 365curr[1-*]_max Current max value
351 Unit: milliampere 366 Unit: milliampere
352 RW 367 RW
@@ -471,6 +486,7 @@ limit-related alarms, not both. The driver should just reflect the hardware
471implementation. 486implementation.
472 487
473in[0-*]_alarm 488in[0-*]_alarm
489curr[1-*]_alarm
474fan[1-*]_alarm 490fan[1-*]_alarm
475temp[1-*]_alarm 491temp[1-*]_alarm
476 Channel alarm 492 Channel alarm
@@ -482,6 +498,8 @@ OR
482 498
483in[0-*]_min_alarm 499in[0-*]_min_alarm
484in[0-*]_max_alarm 500in[0-*]_max_alarm
501curr[1-*]_min_alarm
502curr[1-*]_max_alarm
485fan[1-*]_min_alarm 503fan[1-*]_min_alarm
486fan[1-*]_max_alarm 504fan[1-*]_max_alarm
487temp[1-*]_min_alarm 505temp[1-*]_min_alarm
@@ -497,7 +515,6 @@ to notify open diodes, unconnected fans etc. where the hardware
497supports it. When this boolean has value 1, the measurement for that 515supports it. When this boolean has value 1, the measurement for that
498channel should not be trusted. 516channel should not be trusted.
499 517
500in[0-*]_fault
501fan[1-*]_fault 518fan[1-*]_fault
502temp[1-*]_fault 519temp[1-*]_fault
503 Input fault condition 520 Input fault condition
@@ -513,6 +530,7 @@ beep_enable Master beep enable
513 RW 530 RW
514 531
515in[0-*]_beep 532in[0-*]_beep
533curr[1-*]_beep
516fan[1-*]_beep 534fan[1-*]_beep
517temp[1-*]_beep 535temp[1-*]_beep
518 Channel beep 536 Channel beep
diff --git a/Documentation/hwmon/w83627ehf b/Documentation/hwmon/w83627ehf
index b7e42ec4b26b..13d556112fc0 100644
--- a/Documentation/hwmon/w83627ehf
+++ b/Documentation/hwmon/w83627ehf
@@ -20,6 +20,10 @@ Supported chips:
20 Prefix: 'w83667hg' 20 Prefix: 'w83667hg'
21 Addresses scanned: ISA address retrieved from Super I/O registers 21 Addresses scanned: ISA address retrieved from Super I/O registers
22 Datasheet: not available 22 Datasheet: not available
23 * Winbond W83667HG-B
24 Prefix: 'w83667hg'
25 Addresses scanned: ISA address retrieved from Super I/O registers
26 Datasheet: Available from Nuvoton upon request
23 27
24Authors: 28Authors:
25 Jean Delvare <khali@linux-fr.org> 29 Jean Delvare <khali@linux-fr.org>
@@ -32,8 +36,8 @@ Description
32----------- 36-----------
33 37
34This driver implements support for the Winbond W83627EHF, W83627EHG, 38This driver implements support for the Winbond W83627EHF, W83627EHG,
35W83627DHG, W83627DHG-P and W83667HG super I/O chips. We will refer to them 39W83627DHG, W83627DHG-P, W83667HG and W83667HG-B super I/O chips.
36collectively as Winbond chips. 40We will refer to them collectively as Winbond chips.
37 41
38The chips implement three temperature sensors, five fan rotation 42The chips implement three temperature sensors, five fan rotation
39speed sensors, ten analog voltage sensors (only nine for the 627DHG), one 43speed sensors, ten analog voltage sensors (only nine for the 627DHG), one
@@ -68,14 +72,15 @@ follows:
68temp1 -> pwm1 72temp1 -> pwm1
69temp2 -> pwm2 73temp2 -> pwm2
70temp3 -> pwm3 74temp3 -> pwm3
71prog -> pwm4 (not on 667HG; the programmable setting is not supported by 75prog -> pwm4 (not on 667HG and 667HG-B; the programmable setting is not
72 the driver) 76 supported by the driver)
73 77
74/sys files 78/sys files
75---------- 79----------
76 80
77name - this is a standard hwmon device entry. For the W83627EHF and W83627EHG, 81name - this is a standard hwmon device entry. For the W83627EHF and W83627EHG,
78 it is set to "w83627ehf" and for the W83627DHG it is set to "w83627dhg" 82 it is set to "w83627ehf", for the W83627DHG it is set to "w83627dhg",
83 and for the W83667HG it is set to "w83667hg".
79 84
80pwm[1-4] - this file stores PWM duty cycle or DC value (fan speed) in range: 85pwm[1-4] - this file stores PWM duty cycle or DC value (fan speed) in range:
81 0 (stop) to 255 (full) 86 0 (stop) to 255 (full)
diff --git a/Documentation/i2c/instantiating-devices b/Documentation/i2c/instantiating-devices
index e89490270aba..87da405a8597 100644
--- a/Documentation/i2c/instantiating-devices
+++ b/Documentation/i2c/instantiating-devices
@@ -102,7 +102,7 @@ static int __devinit usb_hcd_pnx4008_probe(struct platform_device *pdev)
102 memset(&i2c_info, 0, sizeof(struct i2c_board_info)); 102 memset(&i2c_info, 0, sizeof(struct i2c_board_info));
103 strlcpy(i2c_info.name, "isp1301_pnx", I2C_NAME_SIZE); 103 strlcpy(i2c_info.name, "isp1301_pnx", I2C_NAME_SIZE);
104 isp1301_i2c_client = i2c_new_probed_device(i2c_adap, &i2c_info, 104 isp1301_i2c_client = i2c_new_probed_device(i2c_adap, &i2c_info,
105 normal_i2c); 105 normal_i2c, NULL);
106 i2c_put_adapter(i2c_adap); 106 i2c_put_adapter(i2c_adap);
107 (...) 107 (...)
108} 108}
diff --git a/Documentation/input/ntrig.txt b/Documentation/input/ntrig.txt
new file mode 100644
index 000000000000..be1fd981f73f
--- /dev/null
+++ b/Documentation/input/ntrig.txt
@@ -0,0 +1,126 @@
1N-Trig touchscreen Driver
2-------------------------
3 Copyright (c) 2008-2010 Rafi Rubin <rafi@seas.upenn.edu>
4 Copyright (c) 2009-2010 Stephane Chatty
5
6This driver provides support for N-Trig pen and multi-touch sensors. Single
7and multi-touch events are translated to the appropriate protocols for
8the hid and input systems. Pen events are sufficiently hid compliant and
9are left to the hid core. The driver also provides additional filtering
10and utility functions accessible with sysfs and module parameters.
11
12This driver has been reported to work properly with multiple N-Trig devices
13attached.
14
15
16Parameters
17----------
18
19Note: values set at load time are global and will apply to all applicable
20devices. Adjusting parameters with sysfs will override the load time values,
21but only for that one device.
22
23The following parameters are used to configure filters to reduce noise:
24
25activate_slack number of fingers to ignore before processing events
26
27activation_height size threshold to activate immediately
28activation_width
29
30min_height size threshold bellow which fingers are ignored
31min_width both to decide activation and during activity
32
33deactivate_slack the number of "no contact" frames to ignore before
34 propagating the end of activity events
35
36When the last finger is removed from the device, it sends a number of empty
37frames. By holding off on deactivation for a few frames we can tolerate false
38erroneous disconnects, where the sensor may mistakenly not detect a finger that
39is still present. Thus deactivate_slack addresses problems where a users might
40see breaks in lines during drawing, or drop an object during a long drag.
41
42
43Additional sysfs items
44----------------------
45
46These nodes just provide easy access to the ranges reported by the device.
47sensor_logical_height the range for positions reported during activity
48sensor_logical_width
49
50sensor_physical_height internal ranges not used for normal events but
51sensor_physical_width useful for tuning
52
53All N-Trig devices with product id of 1 report events in the ranges of
54X: 0-9600
55Y: 0-7200
56However not all of these devices have the same physical dimensions. Most
57seem to be 12" sensors (Dell Latitude XT and XT2 and the HP TX2), and
58at least one model (Dell Studio 17) has a 17" sensor. The ratio of physical
59to logical sizes is used to adjust the size based filter parameters.
60
61
62Filtering
63---------
64
65With the release of the early multi-touch firmwares it became increasingly
66obvious that these sensors were prone to erroneous events. Users reported
67seeing both inappropriately dropped contact and ghosts, contacts reported
68where no finger was actually touching the screen.
69
70Deactivation slack helps prevent dropped contact for single touch use, but does
71not address the problem of dropping one of more contacts while other contacts
72are still active. Drops in the multi-touch context require additional
73processing and should be handled in tandem with tacking.
74
75As observed ghost contacts are similar to actual use of the sensor, but they
76seem to have different profiles. Ghost activity typically shows up as small
77short lived touches. As such, I assume that the longer the continuous stream
78of events the more likely those events are from a real contact, and that the
79larger the size of each contact the more likely it is real. Balancing the
80goals of preventing ghosts and accepting real events quickly (to minimize
81user observable latency), the filter accumulates confidence for incoming
82events until it hits thresholds and begins propagating. In the interest in
83minimizing stored state as well as the cost of operations to make a decision,
84I've kept that decision simple.
85
86Time is measured in terms of the number of fingers reported, not frames since
87the probability of multiple simultaneous ghosts is expected to drop off
88dramatically with increasing numbers. Rather than accumulate weight as a
89function of size, I just use it as a binary threshold. A sufficiently large
90contact immediately overrides the waiting period and leads to activation.
91
92Setting the activation size thresholds to large values will result in deciding
93primarily on activation slack. If you see longer lived ghosts, turning up the
94activation slack while reducing the size thresholds may suffice to eliminate
95the ghosts while keeping the screen quite responsive to firm taps.
96
97Contacts continue to be filtered with min_height and min_width even after
98the initial activation filter is satisfied. The intent is to provide
99a mechanism for filtering out ghosts in the form of an extra finger while
100you actually are using the screen. In practice this sort of ghost has
101been far less problematic or relatively rare and I've left the defaults
102set to 0 for both parameters, effectively turning off that filter.
103
104I don't know what the optimal values are for these filters. If the defaults
105don't work for you, please play with the parameters. If you do find other
106values more comfortable, I would appreciate feedback.
107
108The calibration of these devices does drift over time. If ghosts or contact
109dropping worsen and interfere with the normal usage of your device, try
110recalibrating it.
111
112
113Calibration
114-----------
115
116The N-Trig windows tools provide calibration and testing routines. Also an
117unofficial unsupported set of user space tools including a calibrator is
118available at:
119http://code.launchpad.net/~rafi-seas/+junk/ntrig_calib
120
121
122Tracking
123--------
124
125As of yet, all tested N-Trig firmwares do not track fingers. When multiple
126contacts are active they seem to be sorted primarily by Y position.
diff --git a/Documentation/kbuild/makefiles.txt b/Documentation/kbuild/makefiles.txt
index c375313cb128..c787ae512120 100644
--- a/Documentation/kbuild/makefiles.txt
+++ b/Documentation/kbuild/makefiles.txt
@@ -45,7 +45,6 @@ This document describes the Linux kernel Makefiles.
45 --- 7.1 header-y 45 --- 7.1 header-y
46 --- 7.2 objhdr-y 46 --- 7.2 objhdr-y
47 --- 7.3 destination-y 47 --- 7.3 destination-y
48 --- 7.4 unifdef-y (deprecated)
49 48
50 === 8 Kbuild Variables 49 === 8 Kbuild Variables
51 === 9 Makefile language 50 === 9 Makefile language
@@ -1245,11 +1244,6 @@ See subsequent chapter for the syntax of the Kbuild file.
1245 will be located in the directory "include/linux" when exported. 1244 will be located in the directory "include/linux" when exported.
1246 1245
1247 1246
1248 --- 7.4 unifdef-y (deprecated)
1249
1250 unifdef-y is deprecated. A direct replacement is header-y.
1251
1252
1253=== 8 Kbuild Variables 1247=== 8 Kbuild Variables
1254 1248
1255The top Makefile exports the following variables: 1249The top Makefile exports the following variables:
diff --git a/Documentation/kernel-doc-nano-HOWTO.txt b/Documentation/kernel-doc-nano-HOWTO.txt
index 27a52b35d55b..3d8a97747f77 100644
--- a/Documentation/kernel-doc-nano-HOWTO.txt
+++ b/Documentation/kernel-doc-nano-HOWTO.txt
@@ -345,5 +345,10 @@ documentation, in <filename>, for the functions listed.
345section titled <section title> from <filename>. 345section titled <section title> from <filename>.
346Spaces are allowed in <section title>; do not quote the <section title>. 346Spaces are allowed in <section title>; do not quote the <section title>.
347 347
348!C<filename> is replaced by nothing, but makes the tools check that
349all DOC: sections and documented functions, symbols, etc. are used.
350This makes sense to use when you use !F/!P only and want to verify
351that all documentation is included.
352
348Tim. 353Tim.
349*/ <twaugh@redhat.com> 354*/ <twaugh@redhat.com>
diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt
index 8ed3a7772da1..0b6815504e6d 100644
--- a/Documentation/kernel-parameters.txt
+++ b/Documentation/kernel-parameters.txt
@@ -43,10 +43,11 @@ parameter is applicable:
43 AVR32 AVR32 architecture is enabled. 43 AVR32 AVR32 architecture is enabled.
44 AX25 Appropriate AX.25 support is enabled. 44 AX25 Appropriate AX.25 support is enabled.
45 BLACKFIN Blackfin architecture is enabled. 45 BLACKFIN Blackfin architecture is enabled.
46 DRM Direct Rendering Management support is enabled.
47 EDD BIOS Enhanced Disk Drive Services (EDD) is enabled 46 EDD BIOS Enhanced Disk Drive Services (EDD) is enabled
48 EFI EFI Partitioning (GPT) is enabled 47 EFI EFI Partitioning (GPT) is enabled
49 EIDE EIDE/ATAPI support is enabled. 48 EIDE EIDE/ATAPI support is enabled.
49 DRM Direct Rendering Management support is enabled.
50 DYNAMIC_DEBUG Build in debug messages and enable them at runtime
50 FB The frame buffer device is enabled. 51 FB The frame buffer device is enabled.
51 GCOV GCOV profiling is enabled. 52 GCOV GCOV profiling is enabled.
52 HW Appropriate hardware is enabled. 53 HW Appropriate hardware is enabled.
@@ -88,8 +89,8 @@ parameter is applicable:
88 RAM RAM disk support is enabled. 89 RAM RAM disk support is enabled.
89 S390 S390 architecture is enabled. 90 S390 S390 architecture is enabled.
90 SCSI Appropriate SCSI support is enabled. 91 SCSI Appropriate SCSI support is enabled.
91 A lot of drivers has their options described inside of 92 A lot of drivers have their options described inside
92 Documentation/scsi/. 93 the Documentation/scsi/ sub-directory.
93 SECURITY Different security models are enabled. 94 SECURITY Different security models are enabled.
94 SELINUX SELinux support is enabled. 95 SELINUX SELinux support is enabled.
95 APPARMOR AppArmor support is enabled. 96 APPARMOR AppArmor support is enabled.
@@ -284,27 +285,12 @@ and is between 256 and 4096 characters. It is defined in the file
284 add_efi_memmap [EFI; X86] Include EFI memory map in 285 add_efi_memmap [EFI; X86] Include EFI memory map in
285 kernel's map of available physical RAM. 286 kernel's map of available physical RAM.
286 287
287 advansys= [HW,SCSI]
288 See header of drivers/scsi/advansys.c.
289
290 agp= [AGP] 288 agp= [AGP]
291 { off | try_unsupported } 289 { off | try_unsupported }
292 off: disable AGP support 290 off: disable AGP support
293 try_unsupported: try to drive unsupported chipsets 291 try_unsupported: try to drive unsupported chipsets
294 (may crash computer or cause data corruption) 292 (may crash computer or cause data corruption)
295 293
296 aha152x= [HW,SCSI]
297 See Documentation/scsi/aha152x.txt.
298
299 aha1542= [HW,SCSI]
300 Format: <portbase>[,<buson>,<busoff>[,<dmaspeed>]]
301
302 aic7xxx= [HW,SCSI]
303 See Documentation/scsi/aic7xxx.txt.
304
305 aic79xx= [HW,SCSI]
306 See Documentation/scsi/aic79xx.txt.
307
308 ALSA [HW,ALSA] 294 ALSA [HW,ALSA]
309 See Documentation/sound/alsa/alsa-parameters.txt 295 See Documentation/sound/alsa/alsa-parameters.txt
310 296
@@ -368,8 +354,6 @@ and is between 256 and 4096 characters. It is defined in the file
368 354
369 atarimouse= [HW,MOUSE] Atari Mouse 355 atarimouse= [HW,MOUSE] Atari Mouse
370 356
371 atascsi= [HW,SCSI] Atari SCSI
372
373 atkbd.extra= [HW] Enable extra LEDs and keys on IBM RapidAccess, 357 atkbd.extra= [HW] Enable extra LEDs and keys on IBM RapidAccess,
374 EzKey and similar keyboards 358 EzKey and similar keyboards
375 359
@@ -419,10 +403,6 @@ and is between 256 and 4096 characters. It is defined in the file
419 bttv.pll= See Documentation/video4linux/bttv/Insmod-options 403 bttv.pll= See Documentation/video4linux/bttv/Insmod-options
420 bttv.tuner= and Documentation/video4linux/bttv/CARDLIST 404 bttv.tuner= and Documentation/video4linux/bttv/CARDLIST
421 405
422 BusLogic= [HW,SCSI]
423 See drivers/scsi/BusLogic.c, comment before function
424 BusLogic_ParseDriverOptions().
425
426 c101= [NET] Moxa C101 synchronous serial card 406 c101= [NET] Moxa C101 synchronous serial card
427 407
428 cachesize= [BUGS=X86-32] Override level 2 CPU cache size detection. 408 cachesize= [BUGS=X86-32] Override level 2 CPU cache size detection.
@@ -476,7 +456,7 @@ and is between 256 and 4096 characters. It is defined in the file
476 [ARM] imx_timer1,OSTS,netx_timer,mpu_timer2, 456 [ARM] imx_timer1,OSTS,netx_timer,mpu_timer2,
477 pxa_timer,timer3,32k_counter,timer0_1 457 pxa_timer,timer3,32k_counter,timer0_1
478 [AVR32] avr32 458 [AVR32] avr32
479 [X86-32] pit,hpet,tsc,vmi-timer; 459 [X86-32] pit,hpet,tsc;
480 scx200_hrt on Geode; cyclone on IBM x440 460 scx200_hrt on Geode; cyclone on IBM x440
481 [MIPS] MIPS 461 [MIPS] MIPS
482 [PARISC] cr16 462 [PARISC] cr16
@@ -591,6 +571,10 @@ and is between 256 and 4096 characters. It is defined in the file
591 Format: <port#>,<type> 571 Format: <port#>,<type>
592 See also Documentation/input/joystick-parport.txt 572 See also Documentation/input/joystick-parport.txt
593 573
574 ddebug_query= [KNL,DYNAMIC_DEBUG] Enable debug messages at early boot
575 time. See Documentation/dynamic-debug-howto.txt for
576 details.
577
594 debug [KNL] Enable kernel debugging (events log level). 578 debug [KNL] Enable kernel debugging (events log level).
595 579
596 debug_locks_verbose= 580 debug_locks_verbose=
@@ -671,8 +655,6 @@ and is between 256 and 4096 characters. It is defined in the file
671 655
672 dscc4.setup= [NET] 656 dscc4.setup= [NET]
673 657
674 dtc3181e= [HW,SCSI]
675
676 dynamic_printk Enables pr_debug()/dev_dbg() calls if 658 dynamic_printk Enables pr_debug()/dev_dbg() calls if
677 CONFIG_DYNAMIC_PRINTK_DEBUG has been enabled. 659 CONFIG_DYNAMIC_PRINTK_DEBUG has been enabled.
678 These can also be switched on/off via 660 These can also be switched on/off via
@@ -713,8 +695,6 @@ and is between 256 and 4096 characters. It is defined in the file
713 This is desgined to be used in conjunction with 695 This is desgined to be used in conjunction with
714 the boot argument: earlyprintk=vga 696 the boot argument: earlyprintk=vga
715 697
716 eata= [HW,SCSI]
717
718 edd= [EDD] 698 edd= [EDD]
719 Format: {"off" | "on" | "skip[mbr]"} 699 Format: {"off" | "on" | "skip[mbr]"}
720 700
@@ -770,12 +750,6 @@ and is between 256 and 4096 characters. It is defined in the file
770 Format: <interval>,<probability>,<space>,<times> 750 Format: <interval>,<probability>,<space>,<times>
771 See also /Documentation/fault-injection/. 751 See also /Documentation/fault-injection/.
772 752
773 fd_mcs= [HW,SCSI]
774 See header of drivers/scsi/fd_mcs.c.
775
776 fdomain= [HW,SCSI]
777 See header of drivers/scsi/fdomain.c.
778
779 floppy= [HW] 753 floppy= [HW]
780 See Documentation/blockdev/floppy.txt. 754 See Documentation/blockdev/floppy.txt.
781 755
@@ -835,14 +809,9 @@ and is between 256 and 4096 characters. It is defined in the file
835 When zero, profiling data is discarded and associated 809 When zero, profiling data is discarded and associated
836 debugfs files are removed at module unload time. 810 debugfs files are removed at module unload time.
837 811
838 gdth= [HW,SCSI]
839 See header of drivers/scsi/gdth.c.
840
841 gpt [EFI] Forces disk with valid GPT signature but 812 gpt [EFI] Forces disk with valid GPT signature but
842 invalid Protective MBR to be treated as GPT. 813 invalid Protective MBR to be treated as GPT.
843 814
844 gvp11= [HW,SCSI]
845
846 hashdist= [KNL,NUMA] Large hashes allocated during boot 815 hashdist= [KNL,NUMA] Large hashes allocated during boot
847 are distributed across NUMA nodes. Defaults on 816 are distributed across NUMA nodes. Defaults on
848 for 64bit NUMA, off otherwise. 817 for 64bit NUMA, off otherwise.
@@ -915,9 +884,6 @@ and is between 256 and 4096 characters. It is defined in the file
915 controller 884 controller
916 i8042.nopnp [HW] Don't use ACPIPnP / PnPBIOS to discover KBD/AUX 885 i8042.nopnp [HW] Don't use ACPIPnP / PnPBIOS to discover KBD/AUX
917 controllers 886 controllers
918 i8042.panicblink=
919 [HW] Frequency with which keyboard LEDs should blink
920 when kernel panics (default is 0.5 sec)
921 i8042.reset [HW] Reset the controller during init and cleanup 887 i8042.reset [HW] Reset the controller during init and cleanup
922 i8042.unlock [HW] Unlock (ignore) the keylock 888 i8042.unlock [HW] Unlock (ignore) the keylock
923 889
@@ -934,9 +900,6 @@ and is between 256 and 4096 characters. It is defined in the file
934 i8k.restricted [HW] Allow controlling fans only if SYS_ADMIN 900 i8k.restricted [HW] Allow controlling fans only if SYS_ADMIN
935 capability is set. 901 capability is set.
936 902
937 ibmmcascsi= [HW,MCA,SCSI] IBM MicroChannel SCSI adapter
938 See Documentation/mca.txt.
939
940 icn= [HW,ISDN] 903 icn= [HW,ISDN]
941 Format: <io>[,<membase>[,<icn_id>[,<icn_id2>]]] 904 Format: <io>[,<membase>[,<icn_id>[,<icn_id2>]]]
942 905
@@ -986,9 +949,6 @@ and is between 256 and 4096 characters. It is defined in the file
986 programs exec'd, files mmap'd for exec, and all files 949 programs exec'd, files mmap'd for exec, and all files
987 opened for read by uid=0. 950 opened for read by uid=0.
988 951
989 in2000= [HW,SCSI]
990 See header of drivers/scsi/in2000.c.
991
992 init= [KNL] 952 init= [KNL]
993 Format: <full_path> 953 Format: <full_path>
994 Run specified binary instead of /sbin/init as init 954 Run specified binary instead of /sbin/init as init
@@ -1026,6 +986,12 @@ and is between 256 and 4096 characters. It is defined in the file
1026 result in a hardware IOTLB flush operation as opposed 986 result in a hardware IOTLB flush operation as opposed
1027 to batching them for performance. 987 to batching them for performance.
1028 988
989 intremap= [X86-64, Intel-IOMMU]
990 Format: { on (default) | off | nosid }
991 on enable Interrupt Remapping (default)
992 off disable Interrupt Remapping
993 nosid disable Source ID checking
994
1029 inttest= [IA64] 995 inttest= [IA64]
1030 996
1031 iomem= Disable strict checking of access to MMIO memory 997 iomem= Disable strict checking of access to MMIO memory
@@ -1066,9 +1032,6 @@ and is between 256 and 4096 characters. It is defined in the file
1066 See comment before ip2_setup() in 1032 See comment before ip2_setup() in
1067 drivers/char/ip2/ip2base.c. 1033 drivers/char/ip2/ip2base.c.
1068 1034
1069 ips= [HW,SCSI] Adaptec / IBM ServeRAID controller
1070 See header of drivers/scsi/ips.c.
1071
1072 irqfixup [HW] 1035 irqfixup [HW]
1073 When an interrupt is not handled search all handlers 1036 When an interrupt is not handled search all handlers
1074 for it. Intended to get systems with badly broken 1037 for it. Intended to get systems with badly broken
@@ -1168,9 +1131,13 @@ and is between 256 and 4096 characters. It is defined in the file
1168 kvm.oos_shadow= [KVM] Disable out-of-sync shadow paging. 1131 kvm.oos_shadow= [KVM] Disable out-of-sync shadow paging.
1169 Default is 1 (enabled) 1132 Default is 1 (enabled)
1170 1133
1171 kvm-amd.nested= [KVM,AMD] Allow nested virtualization in KVM/SVM. 1134 kvm.mmu_audit= [KVM] This is a R/W parameter which allows audit
1135 KVM MMU at runtime.
1172 Default is 0 (off) 1136 Default is 0 (off)
1173 1137
1138 kvm-amd.nested= [KVM,AMD] Allow nested virtualization in KVM/SVM.
1139 Default is 1 (enabled)
1140
1174 kvm-amd.npt= [KVM,AMD] Disable nested paging (virtualized MMU) 1141 kvm-amd.npt= [KVM,AMD] Disable nested paging (virtualized MMU)
1175 for all guests. 1142 for all guests.
1176 Default is 1 (enabled) if in 64bit or 32bit-PAE mode 1143 Default is 1 (enabled) if in 64bit or 32bit-PAE mode
@@ -1344,9 +1311,6 @@ and is between 256 and 4096 characters. It is defined in the file
1344 ltpc= [NET] 1311 ltpc= [NET]
1345 Format: <io>,<irq>,<dma> 1312 Format: <io>,<irq>,<dma>
1346 1313
1347 mac5380= [HW,SCSI] Format:
1348 <can_queue>,<cmd_per_lun>,<sg_tablesize>,<hostid>,<use_tags>
1349
1350 machvec= [IA64] Force the use of a particular machine-vector 1314 machvec= [IA64] Force the use of a particular machine-vector
1351 (machvec) in a generic kernel. 1315 (machvec) in a generic kernel.
1352 Example: machvec=hpzx1_swiotlb 1316 Example: machvec=hpzx1_swiotlb
@@ -1368,13 +1332,6 @@ and is between 256 and 4096 characters. It is defined in the file
1368 be mounted 1332 be mounted
1369 Format: <1-256> 1333 Format: <1-256>
1370 1334
1371 max_luns= [SCSI] Maximum number of LUNs to probe.
1372 Should be between 1 and 2^32-1.
1373
1374 max_report_luns=
1375 [SCSI] Maximum number of LUNs received.
1376 Should be between 1 and 16384.
1377
1378 mcatest= [IA-64] 1335 mcatest= [IA-64]
1379 1336
1380 mce [X86-32] Machine Check Exception 1337 mce [X86-32] Machine Check Exception
@@ -1571,19 +1528,6 @@ and is between 256 and 4096 characters. It is defined in the file
1571 1528
1572 n2= [NET] SDL Inc. RISCom/N2 synchronous serial card 1529 n2= [NET] SDL Inc. RISCom/N2 synchronous serial card
1573 1530
1574 NCR_D700= [HW,SCSI]
1575 See header of drivers/scsi/NCR_D700.c.
1576
1577 ncr5380= [HW,SCSI]
1578
1579 ncr53c400= [HW,SCSI]
1580
1581 ncr53c400a= [HW,SCSI]
1582
1583 ncr53c406a= [HW,SCSI]
1584
1585 ncr53c8xx= [HW,SCSI]
1586
1587 netdev= [NET] Network devices parameters 1531 netdev= [NET] Network devices parameters
1588 Format: <irq>,<io>,<mem_start>,<mem_end>,<name> 1532 Format: <irq>,<io>,<mem_start>,<mem_end>,<name>
1589 Note that mem_start is often overloaded to mean 1533 Note that mem_start is often overloaded to mean
@@ -1752,11 +1696,14 @@ and is between 256 and 4096 characters. It is defined in the file
1752 1696
1753 nointremap [X86-64, Intel-IOMMU] Do not enable interrupt 1697 nointremap [X86-64, Intel-IOMMU] Do not enable interrupt
1754 remapping. 1698 remapping.
1699 [Deprecated - use intremap=off]
1755 1700
1756 nointroute [IA-64] 1701 nointroute [IA-64]
1757 1702
1758 nojitter [IA64] Disables jitter checking for ITC timers. 1703 nojitter [IA64] Disables jitter checking for ITC timers.
1759 1704
1705 no-kvmclock [X86,KVM] Disable paravirtualized KVM clock driver
1706
1760 nolapic [X86-32,APIC] Do not enable or use the local APIC. 1707 nolapic [X86-32,APIC] Do not enable or use the local APIC.
1761 1708
1762 nolapic_timer [X86-32,APIC] Do not use the local APIC timer. 1709 nolapic_timer [X86-32,APIC] Do not use the local APIC timer.
@@ -1862,10 +1809,6 @@ and is between 256 and 4096 characters. It is defined in the file
1862 OSS [HW,OSS] 1809 OSS [HW,OSS]
1863 See Documentation/sound/oss/oss-parameters.txt 1810 See Documentation/sound/oss/oss-parameters.txt
1864 1811
1865 osst= [HW,SCSI] SCSI Tape Driver
1866 Format: <buffer_size>,<write_threshold>
1867 See also Documentation/scsi/st.txt.
1868
1869 panic= [KNL] Kernel behaviour on panic 1812 panic= [KNL] Kernel behaviour on panic
1870 Format: <timeout> 1813 Format: <timeout>
1871 1814
@@ -1898,9 +1841,6 @@ and is between 256 and 4096 characters. It is defined in the file
1898 Currently this function knows 686a and 8231 chips. 1841 Currently this function knows 686a and 8231 chips.
1899 Format: [spp|ps2|epp|ecp|ecpepp] 1842 Format: [spp|ps2|epp|ecp|ecpepp]
1900 1843
1901 pas16= [HW,SCSI]
1902 See header of drivers/scsi/pas16.c.
1903
1904 pause_on_oops= 1844 pause_on_oops=
1905 Halt all CPUs after the first oops has been printed for 1845 Halt all CPUs after the first oops has been printed for
1906 the specified number of seconds. This is to be used if 1846 the specified number of seconds. This is to be used if
@@ -2045,15 +1985,18 @@ and is between 256 and 4096 characters. It is defined in the file
2045 force Enable ASPM even on devices that claim not to support it. 1985 force Enable ASPM even on devices that claim not to support it.
2046 WARNING: Forcing ASPM on may cause system lockups. 1986 WARNING: Forcing ASPM on may cause system lockups.
2047 1987
1988 pcie_ports= [PCIE] PCIe ports handling:
1989 auto Ask the BIOS whether or not to use native PCIe services
1990 associated with PCIe ports (PME, hot-plug, AER). Use
1991 them only if that is allowed by the BIOS.
1992 native Use native PCIe services associated with PCIe ports
1993 unconditionally.
1994 compat Treat PCIe ports as PCI-to-PCI bridges, disable the PCIe
1995 ports driver.
1996
2048 pcie_pme= [PCIE,PM] Native PCIe PME signaling options: 1997 pcie_pme= [PCIE,PM] Native PCIe PME signaling options:
2049 Format: {auto|force}[,nomsi]
2050 auto Use native PCIe PME signaling if the BIOS allows the
2051 kernel to control PCIe config registers of root ports.
2052 force Use native PCIe PME signaling even if the BIOS refuses
2053 to allow the kernel to control the relevant PCIe config
2054 registers.
2055 nomsi Do not use MSI for native PCIe PME signaling (this makes 1998 nomsi Do not use MSI for native PCIe PME signaling (this makes
2056 all PCIe root ports use INTx for everything). 1999 all PCIe root ports use INTx for all services).
2057 2000
2058 pcmv= [HW,PCMCIA] BadgePAD 4 2001 pcmv= [HW,PCMCIA] BadgePAD 4
2059 2002
@@ -2221,6 +2164,11 @@ and is between 256 and 4096 characters. It is defined in the file
2221 Reserves a hole at the top of the kernel virtual 2164 Reserves a hole at the top of the kernel virtual
2222 address space. 2165 address space.
2223 2166
2167 reservelow= [X86]
2168 Format: nn[K]
2169 Set the amount of memory to reserve for BIOS at
2170 the bottom of the address space.
2171
2224 reset_devices [KNL] Force drivers to reset the underlying device 2172 reset_devices [KNL] Force drivers to reset the underlying device
2225 during initialization. 2173 during initialization.
2226 2174
@@ -2233,6 +2181,11 @@ and is between 256 and 4096 characters. It is defined in the file
2233 in <PAGE_SIZE> units (needed only for swap files). 2181 in <PAGE_SIZE> units (needed only for swap files).
2234 See Documentation/power/swsusp-and-swap-files.txt 2182 See Documentation/power/swsusp-and-swap-files.txt
2235 2183
2184 hibernate= [HIBERNATION]
2185 noresume Don't check if there's a hibernation image
2186 present during boot.
2187 nocompress Don't compress/decompress hibernation images.
2188
2236 retain_initrd [RAM] Keep initrd memory after extraction 2189 retain_initrd [RAM] Keep initrd memory after extraction
2237 2190
2238 rhash_entries= [KNL,NET] 2191 rhash_entries= [KNL,NET]
@@ -2267,30 +2220,6 @@ and is between 256 and 4096 characters. It is defined in the file
2267 2220
2268 sched_debug [KNL] Enables verbose scheduler debug messages. 2221 sched_debug [KNL] Enables verbose scheduler debug messages.
2269 2222
2270 scsi_debug_*= [SCSI]
2271 See drivers/scsi/scsi_debug.c.
2272
2273 scsi_default_dev_flags=
2274 [SCSI] SCSI default device flags
2275 Format: <integer>
2276
2277 scsi_dev_flags= [SCSI] Black/white list entry for vendor and model
2278 Format: <vendor>:<model>:<flags>
2279 (flags are integer value)
2280
2281 scsi_logging_level= [SCSI] a bit mask of logging levels
2282 See drivers/scsi/scsi_logging.h for bits. Also
2283 settable via sysctl at dev.scsi.logging_level
2284 (/proc/sys/dev/scsi/logging_level).
2285 There is also a nice 'scsi_logging_level' script in the
2286 S390-tools package, available for download at
2287 http://www-128.ibm.com/developerworks/linux/linux390/s390-tools-1.5.4.html
2288
2289 scsi_mod.scan= [SCSI] sync (default) scans SCSI busses as they are
2290 discovered. async scans them in kernel threads,
2291 allowing boot to proceed. none ignores them, expecting
2292 user space to do the scan.
2293
2294 security= [SECURITY] Choose a security module to enable at boot. 2223 security= [SECURITY] Choose a security module to enable at boot.
2295 If this boot parameter is not specified, only the first 2224 If this boot parameter is not specified, only the first
2296 security module asking for security registration will be 2225 security module asking for security registration will be
@@ -2324,9 +2253,6 @@ and is between 256 and 4096 characters. It is defined in the file
2324 The parameter means the number of CPUs to show, 2253 The parameter means the number of CPUs to show,
2325 for example 1 means boot CPU only. 2254 for example 1 means boot CPU only.
2326 2255
2327 sim710= [SCSI,HW]
2328 See header of drivers/scsi/sim710.c.
2329
2330 simeth= [IA-64] 2256 simeth= [IA-64]
2331 simscsi= 2257 simscsi=
2332 2258
@@ -2398,9 +2324,6 @@ and is between 256 and 4096 characters. It is defined in the file
2398 spia_pedr= 2324 spia_pedr=
2399 spia_peddr= 2325 spia_peddr=
2400 2326
2401 st= [HW,SCSI] SCSI tape parameters (buffers, etc.)
2402 See Documentation/scsi/st.txt.
2403
2404 stacktrace [FTRACE] 2327 stacktrace [FTRACE]
2405 Enabled the stack tracer on boot up. 2328 Enabled the stack tracer on boot up.
2406 2329
@@ -2458,8 +2381,14 @@ and is between 256 and 4096 characters. It is defined in the file
2458 2381
2459 switches= [HW,M68k] 2382 switches= [HW,M68k]
2460 2383
2461 sym53c416= [HW,SCSI] 2384 sysfs.deprecated=0|1 [KNL]
2462 See header of drivers/scsi/sym53c416.c. 2385 Enable/disable old style sysfs layout for old udev
2386 on older distributions. When this option is enabled
2387 very new udev will not work anymore. When this option
2388 is disabled (or CONFIG_SYSFS_DEPRECATED not compiled)
2389 in older udev will not work anymore.
2390 Default depends on CONFIG_SYSFS_DEPRECATED_V2 set in
2391 the kernel configuration.
2463 2392
2464 sysrq_always_enabled 2393 sysrq_always_enabled
2465 [KNL] 2394 [KNL]
@@ -2467,9 +2396,6 @@ and is between 256 and 4096 characters. It is defined in the file
2467 neutralize any effect of /proc/sys/kernel/sysrq. 2396 neutralize any effect of /proc/sys/kernel/sysrq.
2468 Useful for debugging. 2397 Useful for debugging.
2469 2398
2470 t128= [HW,SCSI]
2471 See header of drivers/scsi/t128.c.
2472
2473 tdfx= [HW,DRM] 2399 tdfx= [HW,DRM]
2474 2400
2475 test_suspend= [SUSPEND] 2401 test_suspend= [SUSPEND]
@@ -2506,10 +2432,6 @@ and is between 256 and 4096 characters. It is defined in the file
2506 <deci-seconds>: poll all this frequency 2432 <deci-seconds>: poll all this frequency
2507 0: no polling (default) 2433 0: no polling (default)
2508 2434
2509 tmscsim= [HW,SCSI]
2510 See comment before function dc390_setup() in
2511 drivers/scsi/tmscsim.c.
2512
2513 topology= [S390] 2435 topology= [S390]
2514 Format: {off | on} 2436 Format: {off | on}
2515 Specify if the kernel should make use of the cpu 2437 Specify if the kernel should make use of the cpu
@@ -2543,6 +2465,10 @@ and is between 256 and 4096 characters. It is defined in the file
2543 disables clocksource verification at runtime. 2465 disables clocksource verification at runtime.
2544 Used to enable high-resolution timer mode on older 2466 Used to enable high-resolution timer mode on older
2545 hardware, and in virtualized environment. 2467 hardware, and in virtualized environment.
2468 [x86] noirqtime: Do not use TSC to do irq accounting.
2469 Used to run time disable IRQ_TIME_ACCOUNTING on any
2470 platforms where RDTSC is slow and this accounting
2471 can add overhead.
2546 2472
2547 turbografx.map[2|3]= [HW,JOY] 2473 turbografx.map[2|3]= [HW,JOY]
2548 TurboGraFX parallel port interface 2474 TurboGraFX parallel port interface
@@ -2550,9 +2476,6 @@ and is between 256 and 4096 characters. It is defined in the file
2550 <port#>,<js1>,<js2>,<js3>,<js4>,<js5>,<js6>,<js7> 2476 <port#>,<js1>,<js2>,<js3>,<js4>,<js5>,<js6>,<js7>
2551 See also Documentation/input/joystick-parport.txt 2477 See also Documentation/input/joystick-parport.txt
2552 2478
2553 u14-34f= [HW,SCSI] UltraStor 14F/34F SCSI host adapter
2554 See header of drivers/scsi/u14-34f.c.
2555
2556 uhash_entries= [KNL,NET] 2479 uhash_entries= [KNL,NET]
2557 Set number of hash buckets for UDP/UDP-Lite connections 2480 Set number of hash buckets for UDP/UDP-Lite connections
2558 2481
@@ -2718,12 +2641,6 @@ and is between 256 and 4096 characters. It is defined in the file
2718 overridden by individual drivers. 0 will hide 2641 overridden by individual drivers. 0 will hide
2719 cursors, 1 will display them. 2642 cursors, 1 will display them.
2720 2643
2721 wd33c93= [HW,SCSI]
2722 See header of drivers/scsi/wd33c93.c.
2723
2724 wd7000= [HW,SCSI]
2725 See header of drivers/scsi/wd7000.c.
2726
2727 watchdog timers [HW,WDT] For information on watchdog timers, 2644 watchdog timers [HW,WDT] For information on watchdog timers,
2728 see Documentation/watchdog/watchdog-parameters.txt 2645 see Documentation/watchdog/watchdog-parameters.txt
2729 or other driver-specific files in the 2646 or other driver-specific files in the
@@ -2749,8 +2666,10 @@ and is between 256 and 4096 characters. It is defined in the file
2749 aux-ide-disks -- unplug non-primary-master IDE devices 2666 aux-ide-disks -- unplug non-primary-master IDE devices
2750 nics -- unplug network devices 2667 nics -- unplug network devices
2751 all -- unplug all emulated devices (NICs and IDE disks) 2668 all -- unplug all emulated devices (NICs and IDE disks)
2752 ignore -- continue loading the Xen platform PCI driver even 2669 unnecessary -- unplugging emulated devices is
2753 if the version check failed 2670 unnecessary even if the host did not respond to
2671 the unplug protocol
2672 never -- do not unplug even if version check succeeds
2754 2673
2755 xirc2ps_cs= [NET,PCMCIA] 2674 xirc2ps_cs= [NET,PCMCIA]
2756 Format: 2675 Format:
diff --git a/Documentation/kprobes.txt b/Documentation/kprobes.txt
index 1762b81fcdf2..741fe66d6eca 100644
--- a/Documentation/kprobes.txt
+++ b/Documentation/kprobes.txt
@@ -542,9 +542,11 @@ Kprobes does not use mutexes or allocate memory except during
542registration and unregistration. 542registration and unregistration.
543 543
544Probe handlers are run with preemption disabled. Depending on the 544Probe handlers are run with preemption disabled. Depending on the
545architecture, handlers may also run with interrupts disabled. In any 545architecture and optimization state, handlers may also run with
546case, your handler should not yield the CPU (e.g., by attempting to 546interrupts disabled (e.g., kretprobe handlers and optimized kprobe
547acquire a semaphore). 547handlers run without interrupt disabled on x86/x86-64). In any case,
548your handler should not yield the CPU (e.g., by attempting to acquire
549a semaphore).
548 550
549Since a return probe is implemented by replacing the return 551Since a return probe is implemented by replacing the return
550address with the trampoline's address, stack backtraces and calls 552address with the trampoline's address, stack backtraces and calls
diff --git a/Documentation/kvm/api.txt b/Documentation/kvm/api.txt
index 5f5b64982b1a..b336266bea5e 100644
--- a/Documentation/kvm/api.txt
+++ b/Documentation/kvm/api.txt
@@ -320,13 +320,13 @@ struct kvm_translation {
3204.15 KVM_INTERRUPT 3204.15 KVM_INTERRUPT
321 321
322Capability: basic 322Capability: basic
323Architectures: x86 323Architectures: x86, ppc
324Type: vcpu ioctl 324Type: vcpu ioctl
325Parameters: struct kvm_interrupt (in) 325Parameters: struct kvm_interrupt (in)
326Returns: 0 on success, -1 on error 326Returns: 0 on success, -1 on error
327 327
328Queues a hardware interrupt vector to be injected. This is only 328Queues a hardware interrupt vector to be injected. This is only
329useful if in-kernel local APIC is not used. 329useful if in-kernel local APIC or equivalent is not used.
330 330
331/* for KVM_INTERRUPT */ 331/* for KVM_INTERRUPT */
332struct kvm_interrupt { 332struct kvm_interrupt {
@@ -334,8 +334,37 @@ struct kvm_interrupt {
334 __u32 irq; 334 __u32 irq;
335}; 335};
336 336
337X86:
338
337Note 'irq' is an interrupt vector, not an interrupt pin or line. 339Note 'irq' is an interrupt vector, not an interrupt pin or line.
338 340
341PPC:
342
343Queues an external interrupt to be injected. This ioctl is overleaded
344with 3 different irq values:
345
346a) KVM_INTERRUPT_SET
347
348 This injects an edge type external interrupt into the guest once it's ready
349 to receive interrupts. When injected, the interrupt is done.
350
351b) KVM_INTERRUPT_UNSET
352
353 This unsets any pending interrupt.
354
355 Only available with KVM_CAP_PPC_UNSET_IRQ.
356
357c) KVM_INTERRUPT_SET_LEVEL
358
359 This injects a level type external interrupt into the guest context. The
360 interrupt stays pending until a specific ioctl with KVM_INTERRUPT_UNSET
361 is triggered.
362
363 Only available with KVM_CAP_PPC_IRQ_LEVEL.
364
365Note that any value for 'irq' other than the ones stated above is invalid
366and incurs unexpected behavior.
367
3394.16 KVM_DEBUG_GUEST 3684.16 KVM_DEBUG_GUEST
340 369
341Capability: basic 370Capability: basic
@@ -1013,8 +1042,9 @@ number is just right, the 'nent' field is adjusted to the number of valid
1013entries in the 'entries' array, which is then filled. 1042entries in the 'entries' array, which is then filled.
1014 1043
1015The entries returned are the host cpuid as returned by the cpuid instruction, 1044The entries returned are the host cpuid as returned by the cpuid instruction,
1016with unknown or unsupported features masked out. The fields in each entry 1045with unknown or unsupported features masked out. Some features (for example,
1017are defined as follows: 1046x2apic), may not be present in the host cpu, but are exposed by kvm if it can
1047emulate them efficiently. The fields in each entry are defined as follows:
1018 1048
1019 function: the eax value used to obtain the entry 1049 function: the eax value used to obtain the entry
1020 index: the ecx value used to obtain the entry (for entries that are 1050 index: the ecx value used to obtain the entry (for entries that are
@@ -1032,6 +1062,29 @@ are defined as follows:
1032 eax, ebx, ecx, edx: the values returned by the cpuid instruction for 1062 eax, ebx, ecx, edx: the values returned by the cpuid instruction for
1033 this function/index combination 1063 this function/index combination
1034 1064
10654.46 KVM_PPC_GET_PVINFO
1066
1067Capability: KVM_CAP_PPC_GET_PVINFO
1068Architectures: ppc
1069Type: vm ioctl
1070Parameters: struct kvm_ppc_pvinfo (out)
1071Returns: 0 on success, !0 on error
1072
1073struct kvm_ppc_pvinfo {
1074 __u32 flags;
1075 __u32 hcall[4];
1076 __u8 pad[108];
1077};
1078
1079This ioctl fetches PV specific information that need to be passed to the guest
1080using the device tree or other means from vm context.
1081
1082For now the only implemented piece of information distributed here is an array
1083of 4 instructions that make up a hypercall.
1084
1085If any additional field gets added to this structure later on, a bit for that
1086additional piece of information will be set in the flags bitmap.
1087
10355. The kvm_run structure 10885. The kvm_run structure
1036 1089
1037Application code obtains a pointer to the kvm_run structure by 1090Application code obtains a pointer to the kvm_run structure by
diff --git a/Documentation/kvm/ppc-pv.txt b/Documentation/kvm/ppc-pv.txt
new file mode 100644
index 000000000000..a7f2244b3be9
--- /dev/null
+++ b/Documentation/kvm/ppc-pv.txt
@@ -0,0 +1,196 @@
1The PPC KVM paravirtual interface
2=================================
3
4The basic execution principle by which KVM on PowerPC works is to run all kernel
5space code in PR=1 which is user space. This way we trap all privileged
6instructions and can emulate them accordingly.
7
8Unfortunately that is also the downfall. There are quite some privileged
9instructions that needlessly return us to the hypervisor even though they
10could be handled differently.
11
12This is what the PPC PV interface helps with. It takes privileged instructions
13and transforms them into unprivileged ones with some help from the hypervisor.
14This cuts down virtualization costs by about 50% on some of my benchmarks.
15
16The code for that interface can be found in arch/powerpc/kernel/kvm*
17
18Querying for existence
19======================
20
21To find out if we're running on KVM or not, we leverage the device tree. When
22Linux is running on KVM, a node /hypervisor exists. That node contains a
23compatible property with the value "linux,kvm".
24
25Once you determined you're running under a PV capable KVM, you can now use
26hypercalls as described below.
27
28KVM hypercalls
29==============
30
31Inside the device tree's /hypervisor node there's a property called
32'hypercall-instructions'. This property contains at most 4 opcodes that make
33up the hypercall. To call a hypercall, just call these instructions.
34
35The parameters are as follows:
36
37 Register IN OUT
38
39 r0 - volatile
40 r3 1st parameter Return code
41 r4 2nd parameter 1st output value
42 r5 3rd parameter 2nd output value
43 r6 4th parameter 3rd output value
44 r7 5th parameter 4th output value
45 r8 6th parameter 5th output value
46 r9 7th parameter 6th output value
47 r10 8th parameter 7th output value
48 r11 hypercall number 8th output value
49 r12 - volatile
50
51Hypercall definitions are shared in generic code, so the same hypercall numbers
52apply for x86 and powerpc alike with the exception that each KVM hypercall
53also needs to be ORed with the KVM vendor code which is (42 << 16).
54
55Return codes can be as follows:
56
57 Code Meaning
58
59 0 Success
60 12 Hypercall not implemented
61 <0 Error
62
63The magic page
64==============
65
66To enable communication between the hypervisor and guest there is a new shared
67page that contains parts of supervisor visible register state. The guest can
68map this shared page using the KVM hypercall KVM_HC_PPC_MAP_MAGIC_PAGE.
69
70With this hypercall issued the guest always gets the magic page mapped at the
71desired location in effective and physical address space. For now, we always
72map the page to -4096. This way we can access it using absolute load and store
73functions. The following instruction reads the first field of the magic page:
74
75 ld rX, -4096(0)
76
77The interface is designed to be extensible should there be need later to add
78additional registers to the magic page. If you add fields to the magic page,
79also define a new hypercall feature to indicate that the host can give you more
80registers. Only if the host supports the additional features, make use of them.
81
82The magic page has the following layout as described in
83arch/powerpc/include/asm/kvm_para.h:
84
85struct kvm_vcpu_arch_shared {
86 __u64 scratch1;
87 __u64 scratch2;
88 __u64 scratch3;
89 __u64 critical; /* Guest may not get interrupts if == r1 */
90 __u64 sprg0;
91 __u64 sprg1;
92 __u64 sprg2;
93 __u64 sprg3;
94 __u64 srr0;
95 __u64 srr1;
96 __u64 dar;
97 __u64 msr;
98 __u32 dsisr;
99 __u32 int_pending; /* Tells the guest if we have an interrupt */
100};
101
102Additions to the page must only occur at the end. Struct fields are always 32
103or 64 bit aligned, depending on them being 32 or 64 bit wide respectively.
104
105Magic page features
106===================
107
108When mapping the magic page using the KVM hypercall KVM_HC_PPC_MAP_MAGIC_PAGE,
109a second return value is passed to the guest. This second return value contains
110a bitmap of available features inside the magic page.
111
112The following enhancements to the magic page are currently available:
113
114 KVM_MAGIC_FEAT_SR Maps SR registers r/w in the magic page
115
116For enhanced features in the magic page, please check for the existence of the
117feature before using them!
118
119MSR bits
120========
121
122The MSR contains bits that require hypervisor intervention and bits that do
123not require direct hypervisor intervention because they only get interpreted
124when entering the guest or don't have any impact on the hypervisor's behavior.
125
126The following bits are safe to be set inside the guest:
127
128 MSR_EE
129 MSR_RI
130 MSR_CR
131 MSR_ME
132
133If any other bit changes in the MSR, please still use mtmsr(d).
134
135Patched instructions
136====================
137
138The "ld" and "std" instructions are transormed to "lwz" and "stw" instructions
139respectively on 32 bit systems with an added offset of 4 to accomodate for big
140endianness.
141
142The following is a list of mapping the Linux kernel performs when running as
143guest. Implementing any of those mappings is optional, as the instruction traps
144also act on the shared page. So calling privileged instructions still works as
145before.
146
147From To
148==== ==
149
150mfmsr rX ld rX, magic_page->msr
151mfsprg rX, 0 ld rX, magic_page->sprg0
152mfsprg rX, 1 ld rX, magic_page->sprg1
153mfsprg rX, 2 ld rX, magic_page->sprg2
154mfsprg rX, 3 ld rX, magic_page->sprg3
155mfsrr0 rX ld rX, magic_page->srr0
156mfsrr1 rX ld rX, magic_page->srr1
157mfdar rX ld rX, magic_page->dar
158mfdsisr rX lwz rX, magic_page->dsisr
159
160mtmsr rX std rX, magic_page->msr
161mtsprg 0, rX std rX, magic_page->sprg0
162mtsprg 1, rX std rX, magic_page->sprg1
163mtsprg 2, rX std rX, magic_page->sprg2
164mtsprg 3, rX std rX, magic_page->sprg3
165mtsrr0 rX std rX, magic_page->srr0
166mtsrr1 rX std rX, magic_page->srr1
167mtdar rX std rX, magic_page->dar
168mtdsisr rX stw rX, magic_page->dsisr
169
170tlbsync nop
171
172mtmsrd rX, 0 b <special mtmsr section>
173mtmsr rX b <special mtmsr section>
174
175mtmsrd rX, 1 b <special mtmsrd section>
176
177[Book3S only]
178mtsrin rX, rY b <special mtsrin section>
179
180[BookE only]
181wrteei [0|1] b <special wrteei section>
182
183
184Some instructions require more logic to determine what's going on than a load
185or store instruction can deliver. To enable patching of those, we keep some
186RAM around where we can live translate instructions to. What happens is the
187following:
188
189 1) copy emulation code to memory
190 2) patch that code to fit the emulated instruction
191 3) patch that code to return to the original pc + 4
192 4) patch the original instruction to branch to the new code
193
194That way we can inject an arbitrary amount of code as replacement for a single
195instruction. This allows us to check for pending interrupts when setting EE=1
196for example.
diff --git a/Documentation/kvm/timekeeping.txt b/Documentation/kvm/timekeeping.txt
new file mode 100644
index 000000000000..0c5033a58c9e
--- /dev/null
+++ b/Documentation/kvm/timekeeping.txt
@@ -0,0 +1,612 @@
1
2 Timekeeping Virtualization for X86-Based Architectures
3
4 Zachary Amsden <zamsden@redhat.com>
5 Copyright (c) 2010, Red Hat. All rights reserved.
6
71) Overview
82) Timing Devices
93) TSC Hardware
104) Virtualization Problems
11
12=========================================================================
13
141) Overview
15
16One of the most complicated parts of the X86 platform, and specifically,
17the virtualization of this platform is the plethora of timing devices available
18and the complexity of emulating those devices. In addition, virtualization of
19time introduces a new set of challenges because it introduces a multiplexed
20division of time beyond the control of the guest CPU.
21
22First, we will describe the various timekeeping hardware available, then
23present some of the problems which arise and solutions available, giving
24specific recommendations for certain classes of KVM guests.
25
26The purpose of this document is to collect data and information relevant to
27timekeeping which may be difficult to find elsewhere, specifically,
28information relevant to KVM and hardware-based virtualization.
29
30=========================================================================
31
322) Timing Devices
33
34First we discuss the basic hardware devices available. TSC and the related
35KVM clock are special enough to warrant a full exposition and are described in
36the following section.
37
382.1) i8254 - PIT
39
40One of the first timer devices available is the programmable interrupt timer,
41or PIT. The PIT has a fixed frequency 1.193182 MHz base clock and three
42channels which can be programmed to deliver periodic or one-shot interrupts.
43These three channels can be configured in different modes and have individual
44counters. Channel 1 and 2 were not available for general use in the original
45IBM PC, and historically were connected to control RAM refresh and the PC
46speaker. Now the PIT is typically integrated as part of an emulated chipset
47and a separate physical PIT is not used.
48
49The PIT uses I/O ports 0x40 - 0x43. Access to the 16-bit counters is done
50using single or multiple byte access to the I/O ports. There are 6 modes
51available, but not all modes are available to all timers, as only timer 2
52has a connected gate input, required for modes 1 and 5. The gate line is
53controlled by port 61h, bit 0, as illustrated in the following diagram.
54
55 -------------- ----------------
56| | | |
57| 1.1932 MHz |---------->| CLOCK OUT | ---------> IRQ 0
58| Clock | | | |
59 -------------- | +->| GATE TIMER 0 |
60 | ----------------
61 |
62 | ----------------
63 | | |
64 |------>| CLOCK OUT | ---------> 66.3 KHZ DRAM
65 | | | (aka /dev/null)
66 | +->| GATE TIMER 1 |
67 | ----------------
68 |
69 | ----------------
70 | | |
71 |------>| CLOCK OUT | ---------> Port 61h, bit 5
72 | | |
73Port 61h, bit 0 ---------->| GATE TIMER 2 | \_.---- ____
74 ---------------- _| )--|LPF|---Speaker
75 / *---- \___/
76Port 61h, bit 1 -----------------------------------/
77
78The timer modes are now described.
79
80Mode 0: Single Timeout. This is a one-shot software timeout that counts down
81 when the gate is high (always true for timers 0 and 1). When the count
82 reaches zero, the output goes high.
83
84Mode 1: Triggered One-shot. The output is intially set high. When the gate
85 line is set high, a countdown is initiated (which does not stop if the gate is
86 lowered), during which the output is set low. When the count reaches zero,
87 the output goes high.
88
89Mode 2: Rate Generator. The output is initially set high. When the countdown
90 reaches 1, the output goes low for one count and then returns high. The value
91 is reloaded and the countdown automatically resumes. If the gate line goes
92 low, the count is halted. If the output is low when the gate is lowered, the
93 output automatically goes high (this only affects timer 2).
94
95Mode 3: Square Wave. This generates a high / low square wave. The count
96 determines the length of the pulse, which alternates between high and low
97 when zero is reached. The count only proceeds when gate is high and is
98 automatically reloaded on reaching zero. The count is decremented twice at
99 each clock to generate a full high / low cycle at the full periodic rate.
100 If the count is even, the clock remains high for N/2 counts and low for N/2
101 counts; if the clock is odd, the clock is high for (N+1)/2 counts and low
102 for (N-1)/2 counts. Only even values are latched by the counter, so odd
103 values are not observed when reading. This is the intended mode for timer 2,
104 which generates sine-like tones by low-pass filtering the square wave output.
105
106Mode 4: Software Strobe. After programming this mode and loading the counter,
107 the output remains high until the counter reaches zero. Then the output
108 goes low for 1 clock cycle and returns high. The counter is not reloaded.
109 Counting only occurs when gate is high.
110
111Mode 5: Hardware Strobe. After programming and loading the counter, the
112 output remains high. When the gate is raised, a countdown is initiated
113 (which does not stop if the gate is lowered). When the counter reaches zero,
114 the output goes low for 1 clock cycle and then returns high. The counter is
115 not reloaded.
116
117In addition to normal binary counting, the PIT supports BCD counting. The
118command port, 0x43 is used to set the counter and mode for each of the three
119timers.
120
121PIT commands, issued to port 0x43, using the following bit encoding:
122
123Bit 7-4: Command (See table below)
124Bit 3-1: Mode (000 = Mode 0, 101 = Mode 5, 11X = undefined)
125Bit 0 : Binary (0) / BCD (1)
126
127Command table:
128
1290000 - Latch Timer 0 count for port 0x40
130 sample and hold the count to be read in port 0x40;
131 additional commands ignored until counter is read;
132 mode bits ignored.
133
1340001 - Set Timer 0 LSB mode for port 0x40
135 set timer to read LSB only and force MSB to zero;
136 mode bits set timer mode
137
1380010 - Set Timer 0 MSB mode for port 0x40
139 set timer to read MSB only and force LSB to zero;
140 mode bits set timer mode
141
1420011 - Set Timer 0 16-bit mode for port 0x40
143 set timer to read / write LSB first, then MSB;
144 mode bits set timer mode
145
1460100 - Latch Timer 1 count for port 0x41 - as described above
1470101 - Set Timer 1 LSB mode for port 0x41 - as described above
1480110 - Set Timer 1 MSB mode for port 0x41 - as described above
1490111 - Set Timer 1 16-bit mode for port 0x41 - as described above
150
1511000 - Latch Timer 2 count for port 0x42 - as described above
1521001 - Set Timer 2 LSB mode for port 0x42 - as described above
1531010 - Set Timer 2 MSB mode for port 0x42 - as described above
1541011 - Set Timer 2 16-bit mode for port 0x42 as described above
155
1561101 - General counter latch
157 Latch combination of counters into corresponding ports
158 Bit 3 = Counter 2
159 Bit 2 = Counter 1
160 Bit 1 = Counter 0
161 Bit 0 = Unused
162
1631110 - Latch timer status
164 Latch combination of counter mode into corresponding ports
165 Bit 3 = Counter 2
166 Bit 2 = Counter 1
167 Bit 1 = Counter 0
168
169 The output of ports 0x40-0x42 following this command will be:
170
171 Bit 7 = Output pin
172 Bit 6 = Count loaded (0 if timer has expired)
173 Bit 5-4 = Read / Write mode
174 01 = MSB only
175 10 = LSB only
176 11 = LSB / MSB (16-bit)
177 Bit 3-1 = Mode
178 Bit 0 = Binary (0) / BCD mode (1)
179
1802.2) RTC
181
182The second device which was available in the original PC was the MC146818 real
183time clock. The original device is now obsolete, and usually emulated by the
184system chipset, sometimes by an HPET and some frankenstein IRQ routing.
185
186The RTC is accessed through CMOS variables, which uses an index register to
187control which bytes are read. Since there is only one index register, read
188of the CMOS and read of the RTC require lock protection (in addition, it is
189dangerous to allow userspace utilities such as hwclock to have direct RTC
190access, as they could corrupt kernel reads and writes of CMOS memory).
191
192The RTC generates an interrupt which is usually routed to IRQ 8. The interrupt
193can function as a periodic timer, an additional once a day alarm, and can issue
194interrupts after an update of the CMOS registers by the MC146818 is complete.
195The type of interrupt is signalled in the RTC status registers.
196
197The RTC will update the current time fields by battery power even while the
198system is off. The current time fields should not be read while an update is
199in progress, as indicated in the status register.
200
201The clock uses a 32.768kHz crystal, so bits 6-4 of register A should be
202programmed to a 32kHz divider if the RTC is to count seconds.
203
204This is the RAM map originally used for the RTC/CMOS:
205
206Location Size Description
207------------------------------------------
20800h byte Current second (BCD)
20901h byte Seconds alarm (BCD)
21002h byte Current minute (BCD)
21103h byte Minutes alarm (BCD)
21204h byte Current hour (BCD)
21305h byte Hours alarm (BCD)
21406h byte Current day of week (BCD)
21507h byte Current day of month (BCD)
21608h byte Current month (BCD)
21709h byte Current year (BCD)
2180Ah byte Register A
219 bit 7 = Update in progress
220 bit 6-4 = Divider for clock
221 000 = 4.194 MHz
222 001 = 1.049 MHz
223 010 = 32 kHz
224 10X = test modes
225 110 = reset / disable
226 111 = reset / disable
227 bit 3-0 = Rate selection for periodic interrupt
228 000 = periodic timer disabled
229 001 = 3.90625 uS
230 010 = 7.8125 uS
231 011 = .122070 mS
232 100 = .244141 mS
233 ...
234 1101 = 125 mS
235 1110 = 250 mS
236 1111 = 500 mS
2370Bh byte Register B
238 bit 7 = Run (0) / Halt (1)
239 bit 6 = Periodic interrupt enable
240 bit 5 = Alarm interrupt enable
241 bit 4 = Update-ended interrupt enable
242 bit 3 = Square wave interrupt enable
243 bit 2 = BCD calendar (0) / Binary (1)
244 bit 1 = 12-hour mode (0) / 24-hour mode (1)
245 bit 0 = 0 (DST off) / 1 (DST enabled)
246OCh byte Register C (read only)
247 bit 7 = interrupt request flag (IRQF)
248 bit 6 = periodic interrupt flag (PF)
249 bit 5 = alarm interrupt flag (AF)
250 bit 4 = update interrupt flag (UF)
251 bit 3-0 = reserved
252ODh byte Register D (read only)
253 bit 7 = RTC has power
254 bit 6-0 = reserved
25532h byte Current century BCD (*)
256 (*) location vendor specific and now determined from ACPI global tables
257
2582.3) APIC
259
260On Pentium and later processors, an on-board timer is available to each CPU
261as part of the Advanced Programmable Interrupt Controller. The APIC is
262accessed through memory-mapped registers and provides interrupt service to each
263CPU, used for IPIs and local timer interrupts.
264
265Although in theory the APIC is a safe and stable source for local interrupts,
266in practice, many bugs and glitches have occurred due to the special nature of
267the APIC CPU-local memory-mapped hardware. Beware that CPU errata may affect
268the use of the APIC and that workarounds may be required. In addition, some of
269these workarounds pose unique constraints for virtualization - requiring either
270extra overhead incurred from extra reads of memory-mapped I/O or additional
271functionality that may be more computationally expensive to implement.
272
273Since the APIC is documented quite well in the Intel and AMD manuals, we will
274avoid repetition of the detail here. It should be pointed out that the APIC
275timer is programmed through the LVT (local vector timer) register, is capable
276of one-shot or periodic operation, and is based on the bus clock divided down
277by the programmable divider register.
278
2792.4) HPET
280
281HPET is quite complex, and was originally intended to replace the PIT / RTC
282support of the X86 PC. It remains to be seen whether that will be the case, as
283the de facto standard of PC hardware is to emulate these older devices. Some
284systems designated as legacy free may support only the HPET as a hardware timer
285device.
286
287The HPET spec is rather loose and vague, requiring at least 3 hardware timers,
288but allowing implementation freedom to support many more. It also imposes no
289fixed rate on the timer frequency, but does impose some extremal values on
290frequency, error and slew.
291
292In general, the HPET is recommended as a high precision (compared to PIT /RTC)
293time source which is independent of local variation (as there is only one HPET
294in any given system). The HPET is also memory-mapped, and its presence is
295indicated through ACPI tables by the BIOS.
296
297Detailed specification of the HPET is beyond the current scope of this
298document, as it is also very well documented elsewhere.
299
3002.5) Offboard Timers
301
302Several cards, both proprietary (watchdog boards) and commonplace (e1000) have
303timing chips built into the cards which may have registers which are accessible
304to kernel or user drivers. To the author's knowledge, using these to generate
305a clocksource for a Linux or other kernel has not yet been attempted and is in
306general frowned upon as not playing by the agreed rules of the game. Such a
307timer device would require additional support to be virtualized properly and is
308not considered important at this time as no known operating system does this.
309
310=========================================================================
311
3123) TSC Hardware
313
314The TSC or time stamp counter is relatively simple in theory; it counts
315instruction cycles issued by the processor, which can be used as a measure of
316time. In practice, due to a number of problems, it is the most complicated
317timekeeping device to use.
318
319The TSC is represented internally as a 64-bit MSR which can be read with the
320RDMSR, RDTSC, or RDTSCP (when available) instructions. In the past, hardware
321limitations made it possible to write the TSC, but generally on old hardware it
322was only possible to write the low 32-bits of the 64-bit counter, and the upper
32332-bits of the counter were cleared. Now, however, on Intel processors family
3240Fh, for models 3, 4 and 6, and family 06h, models e and f, this restriction
325has been lifted and all 64-bits are writable. On AMD systems, the ability to
326write the TSC MSR is not an architectural guarantee.
327
328The TSC is accessible from CPL-0 and conditionally, for CPL > 0 software by
329means of the CR4.TSD bit, which when enabled, disables CPL > 0 TSC access.
330
331Some vendors have implemented an additional instruction, RDTSCP, which returns
332atomically not just the TSC, but an indicator which corresponds to the
333processor number. This can be used to index into an array of TSC variables to
334determine offset information in SMP systems where TSCs are not synchronized.
335The presence of this instruction must be determined by consulting CPUID feature
336bits.
337
338Both VMX and SVM provide extension fields in the virtualization hardware which
339allows the guest visible TSC to be offset by a constant. Newer implementations
340promise to allow the TSC to additionally be scaled, but this hardware is not
341yet widely available.
342
3433.1) TSC synchronization
344
345The TSC is a CPU-local clock in most implementations. This means, on SMP
346platforms, the TSCs of different CPUs may start at different times depending
347on when the CPUs are powered on. Generally, CPUs on the same die will share
348the same clock, however, this is not always the case.
349
350The BIOS may attempt to resynchronize the TSCs during the poweron process and
351the operating system or other system software may attempt to do this as well.
352Several hardware limitations make the problem worse - if it is not possible to
353write the full 64-bits of the TSC, it may be impossible to match the TSC in
354newly arriving CPUs to that of the rest of the system, resulting in
355unsynchronized TSCs. This may be done by BIOS or system software, but in
356practice, getting a perfectly synchronized TSC will not be possible unless all
357values are read from the same clock, which generally only is possible on single
358socket systems or those with special hardware support.
359
3603.2) TSC and CPU hotplug
361
362As touched on already, CPUs which arrive later than the boot time of the system
363may not have a TSC value that is synchronized with the rest of the system.
364Either system software, BIOS, or SMM code may actually try to establish the TSC
365to a value matching the rest of the system, but a perfect match is usually not
366a guarantee. This can have the effect of bringing a system from a state where
367TSC is synchronized back to a state where TSC synchronization flaws, however
368small, may be exposed to the OS and any virtualization environment.
369
3703.3) TSC and multi-socket / NUMA
371
372Multi-socket systems, especially large multi-socket systems are likely to have
373individual clocksources rather than a single, universally distributed clock.
374Since these clocks are driven by different crystals, they will not have
375perfectly matched frequency, and temperature and electrical variations will
376cause the CPU clocks, and thus the TSCs to drift over time. Depending on the
377exact clock and bus design, the drift may or may not be fixed in absolute
378error, and may accumulate over time.
379
380In addition, very large systems may deliberately slew the clocks of individual
381cores. This technique, known as spread-spectrum clocking, reduces EMI at the
382clock frequency and harmonics of it, which may be required to pass FCC
383standards for telecommunications and computer equipment.
384
385It is recommended not to trust the TSCs to remain synchronized on NUMA or
386multiple socket systems for these reasons.
387
3883.4) TSC and C-states
389
390C-states, or idling states of the processor, especially C1E and deeper sleep
391states may be problematic for TSC as well. The TSC may stop advancing in such
392a state, resulting in a TSC which is behind that of other CPUs when execution
393is resumed. Such CPUs must be detected and flagged by the operating system
394based on CPU and chipset identifications.
395
396The TSC in such a case may be corrected by catching it up to a known external
397clocksource.
398
3993.5) TSC frequency change / P-states
400
401To make things slightly more interesting, some CPUs may change frequency. They
402may or may not run the TSC at the same rate, and because the frequency change
403may be staggered or slewed, at some points in time, the TSC rate may not be
404known other than falling within a range of values. In this case, the TSC will
405not be a stable time source, and must be calibrated against a known, stable,
406external clock to be a usable source of time.
407
408Whether the TSC runs at a constant rate or scales with the P-state is model
409dependent and must be determined by inspecting CPUID, chipset or vendor
410specific MSR fields.
411
412In addition, some vendors have known bugs where the P-state is actually
413compensated for properly during normal operation, but when the processor is
414inactive, the P-state may be raised temporarily to service cache misses from
415other processors. In such cases, the TSC on halted CPUs could advance faster
416than that of non-halted processors. AMD Turion processors are known to have
417this problem.
418
4193.6) TSC and STPCLK / T-states
420
421External signals given to the processor may also have the effect of stopping
422the TSC. This is typically done for thermal emergency power control to prevent
423an overheating condition, and typically, there is no way to detect that this
424condition has happened.
425
4263.7) TSC virtualization - VMX
427
428VMX provides conditional trapping of RDTSC, RDMSR, WRMSR and RDTSCP
429instructions, which is enough for full virtualization of TSC in any manner. In
430addition, VMX allows passing through the host TSC plus an additional TSC_OFFSET
431field specified in the VMCS. Special instructions must be used to read and
432write the VMCS field.
433
4343.8) TSC virtualization - SVM
435
436SVM provides conditional trapping of RDTSC, RDMSR, WRMSR and RDTSCP
437instructions, which is enough for full virtualization of TSC in any manner. In
438addition, SVM allows passing through the host TSC plus an additional offset
439field specified in the SVM control block.
440
4413.9) TSC feature bits in Linux
442
443In summary, there is no way to guarantee the TSC remains in perfect
444synchronization unless it is explicitly guaranteed by the architecture. Even
445if so, the TSCs in multi-sockets or NUMA systems may still run independently
446despite being locally consistent.
447
448The following feature bits are used by Linux to signal various TSC attributes,
449but they can only be taken to be meaningful for UP or single node systems.
450
451X86_FEATURE_TSC : The TSC is available in hardware
452X86_FEATURE_RDTSCP : The RDTSCP instruction is available
453X86_FEATURE_CONSTANT_TSC : The TSC rate is unchanged with P-states
454X86_FEATURE_NONSTOP_TSC : The TSC does not stop in C-states
455X86_FEATURE_TSC_RELIABLE : TSC sync checks are skipped (VMware)
456
4574) Virtualization Problems
458
459Timekeeping is especially problematic for virtualization because a number of
460challenges arise. The most obvious problem is that time is now shared between
461the host and, potentially, a number of virtual machines. Thus the virtual
462operating system does not run with 100% usage of the CPU, despite the fact that
463it may very well make that assumption. It may expect it to remain true to very
464exacting bounds when interrupt sources are disabled, but in reality only its
465virtual interrupt sources are disabled, and the machine may still be preempted
466at any time. This causes problems as the passage of real time, the injection
467of machine interrupts and the associated clock sources are no longer completely
468synchronized with real time.
469
470This same problem can occur on native harware to a degree, as SMM mode may
471steal cycles from the naturally on X86 systems when SMM mode is used by the
472BIOS, but not in such an extreme fashion. However, the fact that SMM mode may
473cause similar problems to virtualization makes it a good justification for
474solving many of these problems on bare metal.
475
4764.1) Interrupt clocking
477
478One of the most immediate problems that occurs with legacy operating systems
479is that the system timekeeping routines are often designed to keep track of
480time by counting periodic interrupts. These interrupts may come from the PIT
481or the RTC, but the problem is the same: the host virtualization engine may not
482be able to deliver the proper number of interrupts per second, and so guest
483time may fall behind. This is especially problematic if a high interrupt rate
484is selected, such as 1000 HZ, which is unfortunately the default for many Linux
485guests.
486
487There are three approaches to solving this problem; first, it may be possible
488to simply ignore it. Guests which have a separate time source for tracking
489'wall clock' or 'real time' may not need any adjustment of their interrupts to
490maintain proper time. If this is not sufficient, it may be necessary to inject
491additional interrupts into the guest in order to increase the effective
492interrupt rate. This approach leads to complications in extreme conditions,
493where host load or guest lag is too much to compensate for, and thus another
494solution to the problem has risen: the guest may need to become aware of lost
495ticks and compensate for them internally. Although promising in theory, the
496implementation of this policy in Linux has been extremely error prone, and a
497number of buggy variants of lost tick compensation are distributed across
498commonly used Linux systems.
499
500Windows uses periodic RTC clocking as a means of keeping time internally, and
501thus requires interrupt slewing to keep proper time. It does use a low enough
502rate (ed: is it 18.2 Hz?) however that it has not yet been a problem in
503practice.
504
5054.2) TSC sampling and serialization
506
507As the highest precision time source available, the cycle counter of the CPU
508has aroused much interest from developers. As explained above, this timer has
509many problems unique to its nature as a local, potentially unstable and
510potentially unsynchronized source. One issue which is not unique to the TSC,
511but is highlighted because of its very precise nature is sampling delay. By
512definition, the counter, once read is already old. However, it is also
513possible for the counter to be read ahead of the actual use of the result.
514This is a consequence of the superscalar execution of the instruction stream,
515which may execute instructions out of order. Such execution is called
516non-serialized. Forcing serialized execution is necessary for precise
517measurement with the TSC, and requires a serializing instruction, such as CPUID
518or an MSR read.
519
520Since CPUID may actually be virtualized by a trap and emulate mechanism, this
521serialization can pose a performance issue for hardware virtualization. An
522accurate time stamp counter reading may therefore not always be available, and
523it may be necessary for an implementation to guard against "backwards" reads of
524the TSC as seen from other CPUs, even in an otherwise perfectly synchronized
525system.
526
5274.3) Timespec aliasing
528
529Additionally, this lack of serialization from the TSC poses another challenge
530when using results of the TSC when measured against another time source. As
531the TSC is much higher precision, many possible values of the TSC may be read
532while another clock is still expressing the same value.
533
534That is, you may read (T,T+10) while external clock C maintains the same value.
535Due to non-serialized reads, you may actually end up with a range which
536fluctuates - from (T-1.. T+10). Thus, any time calculated from a TSC, but
537calibrated against an external value may have a range of valid values.
538Re-calibrating this computation may actually cause time, as computed after the
539calibration, to go backwards, compared with time computed before the
540calibration.
541
542This problem is particularly pronounced with an internal time source in Linux,
543the kernel time, which is expressed in the theoretically high resolution
544timespec - but which advances in much larger granularity intervals, sometimes
545at the rate of jiffies, and possibly in catchup modes, at a much larger step.
546
547This aliasing requires care in the computation and recalibration of kvmclock
548and any other values derived from TSC computation (such as TSC virtualization
549itself).
550
5514.4) Migration
552
553Migration of a virtual machine raises problems for timekeeping in two ways.
554First, the migration itself may take time, during which interrupts cannot be
555delivered, and after which, the guest time may need to be caught up. NTP may
556be able to help to some degree here, as the clock correction required is
557typically small enough to fall in the NTP-correctable window.
558
559An additional concern is that timers based off the TSC (or HPET, if the raw bus
560clock is exposed) may now be running at different rates, requiring compensation
561in some way in the hypervisor by virtualizing these timers. In addition,
562migrating to a faster machine may preclude the use of a passthrough TSC, as a
563faster clock cannot be made visible to a guest without the potential of time
564advancing faster than usual. A slower clock is less of a problem, as it can
565always be caught up to the original rate. KVM clock avoids these problems by
566simply storing multipliers and offsets against the TSC for the guest to convert
567back into nanosecond resolution values.
568
5694.5) Scheduling
570
571Since scheduling may be based on precise timing and firing of interrupts, the
572scheduling algorithms of an operating system may be adversely affected by
573virtualization. In theory, the effect is random and should be universally
574distributed, but in contrived as well as real scenarios (guest device access,
575causes of virtualization exits, possible context switch), this may not always
576be the case. The effect of this has not been well studied.
577
578In an attempt to work around this, several implementations have provided a
579paravirtualized scheduler clock, which reveals the true amount of CPU time for
580which a virtual machine has been running.
581
5824.6) Watchdogs
583
584Watchdog timers, such as the lock detector in Linux may fire accidentally when
585running under hardware virtualization due to timer interrupts being delayed or
586misinterpretation of the passage of real time. Usually, these warnings are
587spurious and can be ignored, but in some circumstances it may be necessary to
588disable such detection.
589
5904.7) Delays and precision timing
591
592Precise timing and delays may not be possible in a virtualized system. This
593can happen if the system is controlling physical hardware, or issues delays to
594compensate for slower I/O to and from devices. The first issue is not solvable
595in general for a virtualized system; hardware control software can't be
596adequately virtualized without a full real-time operating system, which would
597require an RT aware virtualization platform.
598
599The second issue may cause performance problems, but this is unlikely to be a
600significant issue. In many cases these delays may be eliminated through
601configuration or paravirtualization.
602
6034.8) Covert channels and leaks
604
605In addition to the above problems, time information will inevitably leak to the
606guest about the host in anything but a perfect implementation of virtualized
607time. This may allow the guest to infer the presence of a hypervisor (as in a
608red-pill type detection), and it may allow information to leak between guests
609by using CPU utilization itself as a signalling channel. Preventing such
610problems would require completely isolated virtual time which may not track
611real time any longer. This may be useful in certain security or QA contexts,
612but in general isn't recommended for real-world deployment scenarios.
diff --git a/Documentation/laptops/thinkpad-acpi.txt b/Documentation/laptops/thinkpad-acpi.txt
index f6f80257addb..1565eefd6fd5 100644
--- a/Documentation/laptops/thinkpad-acpi.txt
+++ b/Documentation/laptops/thinkpad-acpi.txt
@@ -1024,6 +1024,10 @@ ThinkPad-specific interface. The driver will disable its native
1024backlight brightness control interface if it detects that the standard 1024backlight brightness control interface if it detects that the standard
1025ACPI interface is available in the ThinkPad. 1025ACPI interface is available in the ThinkPad.
1026 1026
1027If you want to use the thinkpad-acpi backlight brightness control
1028instead of the generic ACPI video backlight brightness control for some
1029reason, you should use the acpi_backlight=vendor kernel parameter.
1030
1027The brightness_enable module parameter can be used to control whether 1031The brightness_enable module parameter can be used to control whether
1028the LCD brightness control feature will be enabled when available. 1032the LCD brightness control feature will be enabled when available.
1029brightness_enable=0 forces it to be disabled. brightness_enable=1 1033brightness_enable=0 forces it to be disabled. brightness_enable=1
diff --git a/Documentation/lguest/Makefile b/Documentation/lguest/Makefile
index 28c8cdfcafd8..bebac6b4f332 100644
--- a/Documentation/lguest/Makefile
+++ b/Documentation/lguest/Makefile
@@ -1,5 +1,6 @@
1# This creates the demonstration utility "lguest" which runs a Linux guest. 1# This creates the demonstration utility "lguest" which runs a Linux guest.
2CFLAGS:=-m32 -Wall -Wmissing-declarations -Wmissing-prototypes -O3 -I../../include -I../../arch/x86/include -U_FORTIFY_SOURCE 2# Missing headers? Add "-I../../include -I../../arch/x86/include"
3CFLAGS:=-m32 -Wall -Wmissing-declarations -Wmissing-prototypes -O3 -U_FORTIFY_SOURCE
3 4
4all: lguest 5all: lguest
5 6
diff --git a/Documentation/lguest/lguest.c b/Documentation/lguest/lguest.c
index e9ce3c554514..dc73bc54cc4e 100644
--- a/Documentation/lguest/lguest.c
+++ b/Documentation/lguest/lguest.c
@@ -39,14 +39,14 @@
39#include <limits.h> 39#include <limits.h>
40#include <stddef.h> 40#include <stddef.h>
41#include <signal.h> 41#include <signal.h>
42#include "linux/lguest_launcher.h" 42#include <linux/virtio_config.h>
43#include "linux/virtio_config.h" 43#include <linux/virtio_net.h>
44#include "linux/virtio_net.h" 44#include <linux/virtio_blk.h>
45#include "linux/virtio_blk.h" 45#include <linux/virtio_console.h>
46#include "linux/virtio_console.h" 46#include <linux/virtio_rng.h>
47#include "linux/virtio_rng.h" 47#include <linux/virtio_ring.h>
48#include "linux/virtio_ring.h" 48#include <asm/bootparam.h>
49#include "asm/bootparam.h" 49#include "../../include/linux/lguest_launcher.h"
50/*L:110 50/*L:110
51 * We can ignore the 42 include files we need for this program, but I do want 51 * We can ignore the 42 include files we need for this program, but I do want
52 * to draw attention to the use of kernel-style types. 52 * to draw attention to the use of kernel-style types.
@@ -1447,14 +1447,15 @@ static void add_to_bridge(int fd, const char *if_name, const char *br_name)
1447static void configure_device(int fd, const char *tapif, u32 ipaddr) 1447static void configure_device(int fd, const char *tapif, u32 ipaddr)
1448{ 1448{
1449 struct ifreq ifr; 1449 struct ifreq ifr;
1450 struct sockaddr_in *sin = (struct sockaddr_in *)&ifr.ifr_addr; 1450 struct sockaddr_in sin;
1451 1451
1452 memset(&ifr, 0, sizeof(ifr)); 1452 memset(&ifr, 0, sizeof(ifr));
1453 strcpy(ifr.ifr_name, tapif); 1453 strcpy(ifr.ifr_name, tapif);
1454 1454
1455 /* Don't read these incantations. Just cut & paste them like I did! */ 1455 /* Don't read these incantations. Just cut & paste them like I did! */
1456 sin->sin_family = AF_INET; 1456 sin.sin_family = AF_INET;
1457 sin->sin_addr.s_addr = htonl(ipaddr); 1457 sin.sin_addr.s_addr = htonl(ipaddr);
1458 memcpy(&ifr.ifr_addr, &sin, sizeof(sin));
1458 if (ioctl(fd, SIOCSIFADDR, &ifr) != 0) 1459 if (ioctl(fd, SIOCSIFADDR, &ifr) != 0)
1459 err(1, "Setting %s interface address", tapif); 1460 err(1, "Setting %s interface address", tapif);
1460 ifr.ifr_flags = IFF_UP; 1461 ifr.ifr_flags = IFF_UP;
@@ -1639,15 +1640,6 @@ static void blk_request(struct virtqueue *vq)
1639 off = out->sector * 512; 1640 off = out->sector * 512;
1640 1641
1641 /* 1642 /*
1642 * The block device implements "barriers", where the Guest indicates
1643 * that it wants all previous writes to occur before this write. We
1644 * don't have a way of asking our kernel to do a barrier, so we just
1645 * synchronize all the data in the file. Pretty poor, no?
1646 */
1647 if (out->type & VIRTIO_BLK_T_BARRIER)
1648 fdatasync(vblk->fd);
1649
1650 /*
1651 * In general the virtio block driver is allowed to try SCSI commands. 1643 * In general the virtio block driver is allowed to try SCSI commands.
1652 * It'd be nice if we supported eject, for example, but we don't. 1644 * It'd be nice if we supported eject, for example, but we don't.
1653 */ 1645 */
@@ -1679,6 +1671,13 @@ static void blk_request(struct virtqueue *vq)
1679 /* Die, bad Guest, die. */ 1671 /* Die, bad Guest, die. */
1680 errx(1, "Write past end %llu+%u", off, ret); 1672 errx(1, "Write past end %llu+%u", off, ret);
1681 } 1673 }
1674
1675 wlen = sizeof(*in);
1676 *in = (ret >= 0 ? VIRTIO_BLK_S_OK : VIRTIO_BLK_S_IOERR);
1677 } else if (out->type & VIRTIO_BLK_T_FLUSH) {
1678 /* Flush */
1679 ret = fdatasync(vblk->fd);
1680 verbose("FLUSH fdatasync: %i\n", ret);
1682 wlen = sizeof(*in); 1681 wlen = sizeof(*in);
1683 *in = (ret >= 0 ? VIRTIO_BLK_S_OK : VIRTIO_BLK_S_IOERR); 1682 *in = (ret >= 0 ? VIRTIO_BLK_S_OK : VIRTIO_BLK_S_IOERR);
1684 } else { 1683 } else {
@@ -1702,15 +1701,6 @@ static void blk_request(struct virtqueue *vq)
1702 } 1701 }
1703 } 1702 }
1704 1703
1705 /*
1706 * OK, so we noted that it was pretty poor to use an fdatasync as a
1707 * barrier. But Christoph Hellwig points out that we need a sync
1708 * *afterwards* as well: "Barriers specify no reordering to the front
1709 * or the back." And Jens Axboe confirmed it, so here we are:
1710 */
1711 if (out->type & VIRTIO_BLK_T_BARRIER)
1712 fdatasync(vblk->fd);
1713
1714 /* Finished that request. */ 1704 /* Finished that request. */
1715 add_used(vq, head, wlen); 1705 add_used(vq, head, wlen);
1716} 1706}
@@ -1735,8 +1725,8 @@ static void setup_block_file(const char *filename)
1735 vblk->fd = open_or_die(filename, O_RDWR|O_LARGEFILE); 1725 vblk->fd = open_or_die(filename, O_RDWR|O_LARGEFILE);
1736 vblk->len = lseek64(vblk->fd, 0, SEEK_END); 1726 vblk->len = lseek64(vblk->fd, 0, SEEK_END);
1737 1727
1738 /* We support barriers. */ 1728 /* We support FLUSH. */
1739 add_feature(dev, VIRTIO_BLK_F_BARRIER); 1729 add_feature(dev, VIRTIO_BLK_F_FLUSH);
1740 1730
1741 /* Tell Guest how many sectors this device has. */ 1731 /* Tell Guest how many sectors this device has. */
1742 conf.capacity = cpu_to_le64(vblk->len / 512); 1732 conf.capacity = cpu_to_le64(vblk->len / 512);
diff --git a/Documentation/mmc/00-INDEX b/Documentation/mmc/00-INDEX
new file mode 100644
index 000000000000..fca586f5b853
--- /dev/null
+++ b/Documentation/mmc/00-INDEX
@@ -0,0 +1,4 @@
100-INDEX
2 - this file
3mmc-dev-attrs.txt
4 - info on SD and MMC device attributes
diff --git a/Documentation/mmc/mmc-dev-attrs.txt b/Documentation/mmc/mmc-dev-attrs.txt
new file mode 100644
index 000000000000..ff2bd685bced
--- /dev/null
+++ b/Documentation/mmc/mmc-dev-attrs.txt
@@ -0,0 +1,56 @@
1SD and MMC Device Attributes
2============================
3
4All attributes are read-only.
5
6 cid Card Identifaction Register
7 csd Card Specific Data Register
8 scr SD Card Configuration Register (SD only)
9 date Manufacturing Date (from CID Register)
10 fwrev Firmware/Product Revision (from CID Register) (SD and MMCv1 only)
11 hwrev Hardware/Product Revision (from CID Register) (SD and MMCv1 only)
12 manfid Manufacturer ID (from CID Register)
13 name Product Name (from CID Register)
14 oemid OEM/Application ID (from CID Register)
15 serial Product Serial Number (from CID Register)
16 erase_size Erase group size
17 preferred_erase_size Preferred erase size
18
19Note on Erase Size and Preferred Erase Size:
20
21 "erase_size" is the minimum size, in bytes, of an erase
22 operation. For MMC, "erase_size" is the erase group size
23 reported by the card. Note that "erase_size" does not apply
24 to trim or secure trim operations where the minimum size is
25 always one 512 byte sector. For SD, "erase_size" is 512
26 if the card is block-addressed, 0 otherwise.
27
28 SD/MMC cards can erase an arbitrarily large area up to and
29 including the whole card. When erasing a large area it may
30 be desirable to do it in smaller chunks for three reasons:
31 1. A single erase command will make all other I/O on
32 the card wait. This is not a problem if the whole card
33 is being erased, but erasing one partition will make
34 I/O for another partition on the same card wait for the
35 duration of the erase - which could be a several
36 minutes.
37 2. To be able to inform the user of erase progress.
38 3. The erase timeout becomes too large to be very
39 useful. Because the erase timeout contains a margin
40 which is multiplied by the size of the erase area,
41 the value can end up being several minutes for large
42 areas.
43
44 "erase_size" is not the most efficient unit to erase
45 (especially for SD where it is just one sector),
46 hence "preferred_erase_size" provides a good chunk
47 size for erasing large areas.
48
49 For MMC, "preferred_erase_size" is the high-capacity
50 erase size if a card specifies one, otherwise it is
51 based on the capacity of the card.
52
53 For SD, "preferred_erase_size" is the allocation unit
54 size specified by the card.
55
56 "preferred_erase_size" is in bytes.
diff --git a/Documentation/mutex-design.txt b/Documentation/mutex-design.txt
index c91ccc0720fa..38c10fd7f411 100644
--- a/Documentation/mutex-design.txt
+++ b/Documentation/mutex-design.txt
@@ -9,7 +9,7 @@ firstly, there's nothing wrong with semaphores. But if the simpler
9mutex semantics are sufficient for your code, then there are a couple 9mutex semantics are sufficient for your code, then there are a couple
10of advantages of mutexes: 10of advantages of mutexes:
11 11
12 - 'struct mutex' is smaller on most architectures: .e.g on x86, 12 - 'struct mutex' is smaller on most architectures: E.g. on x86,
13 'struct semaphore' is 20 bytes, 'struct mutex' is 16 bytes. 13 'struct semaphore' is 20 bytes, 'struct mutex' is 16 bytes.
14 A smaller structure size means less RAM footprint, and better 14 A smaller structure size means less RAM footprint, and better
15 CPU-cache utilization. 15 CPU-cache utilization.
@@ -136,3 +136,4 @@ the APIs of 'struct mutex' have been streamlined:
136 void mutex_lock_nested(struct mutex *lock, unsigned int subclass); 136 void mutex_lock_nested(struct mutex *lock, unsigned int subclass);
137 int mutex_lock_interruptible_nested(struct mutex *lock, 137 int mutex_lock_interruptible_nested(struct mutex *lock,
138 unsigned int subclass); 138 unsigned int subclass);
139 int atomic_dec_and_mutex_lock(atomic_t *cnt, struct mutex *lock);
diff --git a/Documentation/networking/bonding.txt b/Documentation/networking/bonding.txt
index d2b62b71b617..5dc638791d97 100644
--- a/Documentation/networking/bonding.txt
+++ b/Documentation/networking/bonding.txt
@@ -765,6 +765,14 @@ xmit_hash_policy
765 does not exist, and the layer2 policy is the only policy. The 765 does not exist, and the layer2 policy is the only policy. The
766 layer2+3 value was added for bonding version 3.2.2. 766 layer2+3 value was added for bonding version 3.2.2.
767 767
768resend_igmp
769
770 Specifies the number of IGMP membership reports to be issued after
771 a failover event. One membership report is issued immediately after
772 the failover, subsequent packets are sent in each 200ms interval.
773
774 The valid range is 0 - 255; the default value is 1. This option
775 was added for bonding version 3.7.0.
768 776
7693. Configuring Bonding Devices 7773. Configuring Bonding Devices
770============================== 778==============================
diff --git a/Documentation/networking/can.txt b/Documentation/networking/can.txt
index cd79735013f9..5b04b67ddca2 100644
--- a/Documentation/networking/can.txt
+++ b/Documentation/networking/can.txt
@@ -22,6 +22,7 @@ This file contains
22 4.1.2 RAW socket option CAN_RAW_ERR_FILTER 22 4.1.2 RAW socket option CAN_RAW_ERR_FILTER
23 4.1.3 RAW socket option CAN_RAW_LOOPBACK 23 4.1.3 RAW socket option CAN_RAW_LOOPBACK
24 4.1.4 RAW socket option CAN_RAW_RECV_OWN_MSGS 24 4.1.4 RAW socket option CAN_RAW_RECV_OWN_MSGS
25 4.1.5 RAW socket returned message flags
25 4.2 Broadcast Manager protocol sockets (SOCK_DGRAM) 26 4.2 Broadcast Manager protocol sockets (SOCK_DGRAM)
26 4.3 connected transport protocols (SOCK_SEQPACKET) 27 4.3 connected transport protocols (SOCK_SEQPACKET)
27 4.4 unconnected transport protocols (SOCK_DGRAM) 28 4.4 unconnected transport protocols (SOCK_DGRAM)
@@ -471,6 +472,17 @@ solution for a couple of reasons:
471 setsockopt(s, SOL_CAN_RAW, CAN_RAW_RECV_OWN_MSGS, 472 setsockopt(s, SOL_CAN_RAW, CAN_RAW_RECV_OWN_MSGS,
472 &recv_own_msgs, sizeof(recv_own_msgs)); 473 &recv_own_msgs, sizeof(recv_own_msgs));
473 474
475 4.1.5 RAW socket returned message flags
476
477 When using recvmsg() call, the msg->msg_flags may contain following flags:
478
479 MSG_DONTROUTE: set when the received frame was created on the local host.
480
481 MSG_CONFIRM: set when the frame was sent via the socket it is received on.
482 This flag can be interpreted as a 'transmission confirmation' when the
483 CAN driver supports the echo of frames on driver level, see 3.2 and 6.2.
484 In order to receive such messages, CAN_RAW_RECV_OWN_MSGS must be set.
485
474 4.2 Broadcast Manager protocol sockets (SOCK_DGRAM) 486 4.2 Broadcast Manager protocol sockets (SOCK_DGRAM)
475 4.3 connected transport protocols (SOCK_SEQPACKET) 487 4.3 connected transport protocols (SOCK_SEQPACKET)
476 4.4 unconnected transport protocols (SOCK_DGRAM) 488 4.4 unconnected transport protocols (SOCK_DGRAM)
diff --git a/Documentation/networking/dccp.txt b/Documentation/networking/dccp.txt
index a62fdf7a6bff..271d524a4c8d 100644
--- a/Documentation/networking/dccp.txt
+++ b/Documentation/networking/dccp.txt
@@ -1,18 +1,20 @@
1DCCP protocol 1DCCP protocol
2============ 2=============
3 3
4 4
5Contents 5Contents
6======== 6========
7
8- Introduction 7- Introduction
9- Missing features 8- Missing features
10- Socket options 9- Socket options
10- Sysctl variables
11- IOCTLs
12- Other tunables
11- Notes 13- Notes
12 14
15
13Introduction 16Introduction
14============ 17============
15
16Datagram Congestion Control Protocol (DCCP) is an unreliable, connection 18Datagram Congestion Control Protocol (DCCP) is an unreliable, connection
17oriented protocol designed to solve issues present in UDP and TCP, particularly 19oriented protocol designed to solve issues present in UDP and TCP, particularly
18for real-time and multimedia (streaming) traffic. 20for real-time and multimedia (streaming) traffic.
@@ -29,9 +31,9 @@ It has a base protocol and pluggable congestion control IDs (CCIDs).
29DCCP is a Proposed Standard (RFC 2026), and the homepage for DCCP as a protocol 31DCCP is a Proposed Standard (RFC 2026), and the homepage for DCCP as a protocol
30is at http://www.ietf.org/html.charters/dccp-charter.html 32is at http://www.ietf.org/html.charters/dccp-charter.html
31 33
34
32Missing features 35Missing features
33================ 36================
34
35The Linux DCCP implementation does not currently support all the features that are 37The Linux DCCP implementation does not currently support all the features that are
36specified in RFCs 4340...42. 38specified in RFCs 4340...42.
37 39
@@ -45,7 +47,6 @@ http://linux-net.osdl.org/index.php/DCCP_Testing#Experimental_DCCP_source_tree
45 47
46Socket options 48Socket options
47============== 49==============
48
49DCCP_SOCKOPT_SERVICE sets the service. The specification mandates use of 50DCCP_SOCKOPT_SERVICE sets the service. The specification mandates use of
50service codes (RFC 4340, sec. 8.1.2); if this socket option is not set, 51service codes (RFC 4340, sec. 8.1.2); if this socket option is not set,
51the socket will fall back to 0 (which means that no meaningful service code 52the socket will fall back to 0 (which means that no meaningful service code
@@ -112,6 +113,7 @@ DCCP_SOCKOPT_CCID_TX_INFO
112On unidirectional connections it is useful to close the unused half-connection 113On unidirectional connections it is useful to close the unused half-connection
113via shutdown (SHUT_WR or SHUT_RD): this will reduce per-packet processing costs. 114via shutdown (SHUT_WR or SHUT_RD): this will reduce per-packet processing costs.
114 115
116
115Sysctl variables 117Sysctl variables
116================ 118================
117Several DCCP default parameters can be managed by the following sysctls 119Several DCCP default parameters can be managed by the following sysctls
@@ -155,15 +157,30 @@ sync_ratelimit = 125 ms
155 sequence-invalid packets on the same socket (RFC 4340, 7.5.4). The unit 157 sequence-invalid packets on the same socket (RFC 4340, 7.5.4). The unit
156 of this parameter is milliseconds; a value of 0 disables rate-limiting. 158 of this parameter is milliseconds; a value of 0 disables rate-limiting.
157 159
160
158IOCTLS 161IOCTLS
159====== 162======
160FIONREAD 163FIONREAD
161 Works as in udp(7): returns in the `int' argument pointer the size of 164 Works as in udp(7): returns in the `int' argument pointer the size of
162 the next pending datagram in bytes, or 0 when no datagram is pending. 165 the next pending datagram in bytes, or 0 when no datagram is pending.
163 166
167
168Other tunables
169==============
170Per-route rto_min support
171 CCID-2 supports the RTAX_RTO_MIN per-route setting for the minimum value
172 of the RTO timer. This setting can be modified via the 'rto_min' option
173 of iproute2; for example:
174 > ip route change 10.0.0.0/24 rto_min 250j dev wlan0
175 > ip route add 10.0.0.254/32 rto_min 800j dev wlan0
176 > ip route show dev wlan0
177 CCID-3 also supports the rto_min setting: it is used to define the lower
178 bound for the expiry of the nofeedback timer. This can be useful on LANs
179 with very low RTTs (e.g., loopback, Gbit ethernet).
180
181
164Notes 182Notes
165===== 183=====
166
167DCCP does not travel through NAT successfully at present on many boxes. This is 184DCCP does not travel through NAT successfully at present on many boxes. This is
168because the checksum covers the pseudo-header as per TCP and UDP. Linux NAT 185because the checksum covers the pseudo-header as per TCP and UDP. Linux NAT
169support for DCCP has been added. 186support for DCCP has been added.
diff --git a/Documentation/networking/e1000.txt b/Documentation/networking/e1000.txt
index 2df71861e578..d9271e74e488 100644
--- a/Documentation/networking/e1000.txt
+++ b/Documentation/networking/e1000.txt
@@ -1,82 +1,35 @@
1Linux* Base Driver for the Intel(R) PRO/1000 Family of Adapters 1Linux* Base Driver for the Intel(R) PRO/1000 Family of Adapters
2=============================================================== 2===============================================================
3 3
4September 26, 2006 4Intel Gigabit Linux driver.
5 5Copyright(c) 1999 - 2010 Intel Corporation.
6 6
7Contents 7Contents
8======== 8========
9 9
10- In This Release
11- Identifying Your Adapter 10- Identifying Your Adapter
12- Building and Installation
13- Command Line Parameters 11- Command Line Parameters
14- Speed and Duplex Configuration 12- Speed and Duplex Configuration
15- Additional Configurations 13- Additional Configurations
16- Known Issues
17- Support 14- Support
18 15
19
20In This Release
21===============
22
23This file describes the Linux* Base Driver for the Intel(R) PRO/1000 Family
24of Adapters. This driver includes support for Itanium(R)2-based systems.
25
26For questions related to hardware requirements, refer to the documentation
27supplied with your Intel PRO/1000 adapter. All hardware requirements listed
28apply to use with Linux.
29
30The following features are now available in supported kernels:
31 - Native VLANs
32 - Channel Bonding (teaming)
33 - SNMP
34
35Channel Bonding documentation can be found in the Linux kernel source:
36/Documentation/networking/bonding.txt
37
38The driver information previously displayed in the /proc filesystem is not
39supported in this release. Alternatively, you can use ethtool (version 1.6
40or later), lspci, and ifconfig to obtain the same information.
41
42Instructions on updating ethtool can be found in the section "Additional
43Configurations" later in this document.
44
45NOTE: The Intel(R) 82562v 10/100 Network Connection only provides 10/100
46support.
47
48
49Identifying Your Adapter 16Identifying Your Adapter
50======================== 17========================
51 18
52For more information on how to identify your adapter, go to the Adapter & 19For more information on how to identify your adapter, go to the Adapter &
53Driver ID Guide at: 20Driver ID Guide at:
54 21
55 http://support.intel.com/support/network/adapter/pro100/21397.htm 22 http://support.intel.com/support/go/network/adapter/idguide.htm
56 23
57For the latest Intel network drivers for Linux, refer to the following 24For the latest Intel network drivers for Linux, refer to the following
58website. In the search field, enter your adapter name or type, or use the 25website. In the search field, enter your adapter name or type, or use the
59networking link on the left to search for your adapter: 26networking link on the left to search for your adapter:
60 27
61 http://downloadfinder.intel.com/scripts-df/support_intel.asp 28 http://support.intel.com/support/go/network/adapter/home.htm
62
63 29
64Command Line Parameters 30Command Line Parameters
65======================= 31=======================
66 32
67If the driver is built as a module, the following optional parameters
68are used by entering them on the command line with the modprobe command
69using this syntax:
70
71 modprobe e1000 [<option>=<VAL1>,<VAL2>,...]
72
73For example, with two PRO/1000 PCI adapters, entering:
74
75 modprobe e1000 TxDescriptors=80,128
76
77loads the e1000 driver with 80 TX descriptors for the first adapter and
78128 TX descriptors for the second adapter.
79
80The default value for each parameter is generally the recommended setting, 33The default value for each parameter is generally the recommended setting,
81unless otherwise noted. 34unless otherwise noted.
82 35
@@ -89,10 +42,6 @@ NOTES: For more information about the AutoNeg, Duplex, and Speed
89 parameters, see the application note at: 42 parameters, see the application note at:
90 http://www.intel.com/design/network/applnots/ap450.htm 43 http://www.intel.com/design/network/applnots/ap450.htm
91 44
92 A descriptor describes a data buffer and attributes related to
93 the data buffer. This information is accessed by the hardware.
94
95
96AutoNeg 45AutoNeg
97------- 46-------
98(Supported only on adapters with copper connections) 47(Supported only on adapters with copper connections)
@@ -106,7 +55,6 @@ Duplex parameters must not be specified.
106NOTE: Refer to the Speed and Duplex section of this readme for more 55NOTE: Refer to the Speed and Duplex section of this readme for more
107 information on the AutoNeg parameter. 56 information on the AutoNeg parameter.
108 57
109
110Duplex 58Duplex
111------ 59------
112(Supported only on adapters with copper connections) 60(Supported only on adapters with copper connections)
@@ -119,7 +67,6 @@ set to auto-negotiate, the board auto-detects the correct duplex. If the
119link partner is forced (either full or half), Duplex defaults to half- 67link partner is forced (either full or half), Duplex defaults to half-
120duplex. 68duplex.
121 69
122
123FlowControl 70FlowControl
124----------- 71-----------
125Valid Range: 0-3 (0=none, 1=Rx only, 2=Tx only, 3=Rx&Tx) 72Valid Range: 0-3 (0=none, 1=Rx only, 2=Tx only, 3=Rx&Tx)
@@ -128,16 +75,16 @@ Default Value: Reads flow control settings from the EEPROM
128This parameter controls the automatic generation(Tx) and response(Rx) 75This parameter controls the automatic generation(Tx) and response(Rx)
129to Ethernet PAUSE frames. 76to Ethernet PAUSE frames.
130 77
131
132InterruptThrottleRate 78InterruptThrottleRate
133--------------------- 79---------------------
134(not supported on Intel(R) 82542, 82543 or 82544-based adapters) 80(not supported on Intel(R) 82542, 82543 or 82544-based adapters)
135Valid Range: 0,1,3,100-100000 (0=off, 1=dynamic, 3=dynamic conservative) 81Valid Range: 0,1,3,4,100-100000 (0=off, 1=dynamic, 3=dynamic conservative,
82 4=simplified balancing)
136Default Value: 3 83Default Value: 3
137 84
138The driver can limit the amount of interrupts per second that the adapter 85The driver can limit the amount of interrupts per second that the adapter
139will generate for incoming packets. It does this by writing a value to the 86will generate for incoming packets. It does this by writing a value to the
140adapter that is based on the maximum amount of interrupts that the adapter 87adapter that is based on the maximum amount of interrupts that the adapter
141will generate per second. 88will generate per second.
142 89
143Setting InterruptThrottleRate to a value greater or equal to 100 90Setting InterruptThrottleRate to a value greater or equal to 100
@@ -146,37 +93,43 @@ per second, even if more packets have come in. This reduces interrupt
146load on the system and can lower CPU utilization under heavy load, 93load on the system and can lower CPU utilization under heavy load,
147but will increase latency as packets are not processed as quickly. 94but will increase latency as packets are not processed as quickly.
148 95
149The default behaviour of the driver previously assumed a static 96The default behaviour of the driver previously assumed a static
150InterruptThrottleRate value of 8000, providing a good fallback value for 97InterruptThrottleRate value of 8000, providing a good fallback value for
151all traffic types,but lacking in small packet performance and latency. 98all traffic types,but lacking in small packet performance and latency.
152The hardware can handle many more small packets per second however, and 99The hardware can handle many more small packets per second however, and
153for this reason an adaptive interrupt moderation algorithm was implemented. 100for this reason an adaptive interrupt moderation algorithm was implemented.
154 101
155Since 7.3.x, the driver has two adaptive modes (setting 1 or 3) in which 102Since 7.3.x, the driver has two adaptive modes (setting 1 or 3) in which
156it dynamically adjusts the InterruptThrottleRate value based on the traffic 103it dynamically adjusts the InterruptThrottleRate value based on the traffic
157that it receives. After determining the type of incoming traffic in the last 104that it receives. After determining the type of incoming traffic in the last
158timeframe, it will adjust the InterruptThrottleRate to an appropriate value 105timeframe, it will adjust the InterruptThrottleRate to an appropriate value
159for that traffic. 106for that traffic.
160 107
161The algorithm classifies the incoming traffic every interval into 108The algorithm classifies the incoming traffic every interval into
162classes. Once the class is determined, the InterruptThrottleRate value is 109classes. Once the class is determined, the InterruptThrottleRate value is
163adjusted to suit that traffic type the best. There are three classes defined: 110adjusted to suit that traffic type the best. There are three classes defined:
164"Bulk traffic", for large amounts of packets of normal size; "Low latency", 111"Bulk traffic", for large amounts of packets of normal size; "Low latency",
165for small amounts of traffic and/or a significant percentage of small 112for small amounts of traffic and/or a significant percentage of small
166packets; and "Lowest latency", for almost completely small packets or 113packets; and "Lowest latency", for almost completely small packets or
167minimal traffic. 114minimal traffic.
168 115
169In dynamic conservative mode, the InterruptThrottleRate value is set to 4000 116In dynamic conservative mode, the InterruptThrottleRate value is set to 4000
170for traffic that falls in class "Bulk traffic". If traffic falls in the "Low 117for traffic that falls in class "Bulk traffic". If traffic falls in the "Low
171latency" or "Lowest latency" class, the InterruptThrottleRate is increased 118latency" or "Lowest latency" class, the InterruptThrottleRate is increased
172stepwise to 20000. This default mode is suitable for most applications. 119stepwise to 20000. This default mode is suitable for most applications.
173 120
174For situations where low latency is vital such as cluster or 121For situations where low latency is vital such as cluster or
175grid computing, the algorithm can reduce latency even more when 122grid computing, the algorithm can reduce latency even more when
176InterruptThrottleRate is set to mode 1. In this mode, which operates 123InterruptThrottleRate is set to mode 1. In this mode, which operates
177the same as mode 3, the InterruptThrottleRate will be increased stepwise to 124the same as mode 3, the InterruptThrottleRate will be increased stepwise to
17870000 for traffic in class "Lowest latency". 12570000 for traffic in class "Lowest latency".
179 126
127In simplified mode the interrupt rate is based on the ratio of Tx and
128Rx traffic. If the bytes per second rate is approximately equal, the
129interrupt rate will drop as low as 2000 interrupts per second. If the
130traffic is mostly transmit or mostly receive, the interrupt rate could
131be as high as 8000.
132
180Setting InterruptThrottleRate to 0 turns off any interrupt moderation 133Setting InterruptThrottleRate to 0 turns off any interrupt moderation
181and may improve small packet latency, but is generally not suitable 134and may improve small packet latency, but is generally not suitable
182for bulk throughput traffic. 135for bulk throughput traffic.
@@ -212,8 +165,6 @@ NOTE: When e1000 is loaded with default settings and multiple adapters
212 be platform-specific. If CPU utilization is not a concern, use 165 be platform-specific. If CPU utilization is not a concern, use
213 RX_POLLING (NAPI) and default driver settings. 166 RX_POLLING (NAPI) and default driver settings.
214 167
215
216
217RxDescriptors 168RxDescriptors
218------------- 169-------------
219Valid Range: 80-256 for 82542 and 82543-based adapters 170Valid Range: 80-256 for 82542 and 82543-based adapters
@@ -225,15 +176,14 @@ by the driver. Increasing this value allows the driver to buffer more
225incoming packets, at the expense of increased system memory utilization. 176incoming packets, at the expense of increased system memory utilization.
226 177
227Each descriptor is 16 bytes. A receive buffer is also allocated for each 178Each descriptor is 16 bytes. A receive buffer is also allocated for each
228descriptor and can be either 2048, 4096, 8192, or 16384 bytes, depending 179descriptor and can be either 2048, 4096, 8192, or 16384 bytes, depending
229on the MTU setting. The maximum MTU size is 16110. 180on the MTU setting. The maximum MTU size is 16110.
230 181
231NOTE: MTU designates the frame size. It only needs to be set for Jumbo 182NOTE: MTU designates the frame size. It only needs to be set for Jumbo
232 Frames. Depending on the available system resources, the request 183 Frames. Depending on the available system resources, the request
233 for a higher number of receive descriptors may be denied. In this 184 for a higher number of receive descriptors may be denied. In this
234 case, use a lower number. 185 case, use a lower number.
235 186
236
237RxIntDelay 187RxIntDelay
238---------- 188----------
239Valid Range: 0-65535 (0=off) 189Valid Range: 0-65535 (0=off)
@@ -254,7 +204,6 @@ CAUTION: When setting RxIntDelay to a value other than 0, adapters may
254 restoring the network connection. To eliminate the potential 204 restoring the network connection. To eliminate the potential
255 for the hang ensure that RxIntDelay is set to 0. 205 for the hang ensure that RxIntDelay is set to 0.
256 206
257
258RxAbsIntDelay 207RxAbsIntDelay
259------------- 208-------------
260(This parameter is supported only on 82540, 82545 and later adapters.) 209(This parameter is supported only on 82540, 82545 and later adapters.)
@@ -268,7 +217,6 @@ packet is received within the set amount of time. Proper tuning,
268along with RxIntDelay, may improve traffic throughput in specific network 217along with RxIntDelay, may improve traffic throughput in specific network
269conditions. 218conditions.
270 219
271
272Speed 220Speed
273----- 221-----
274(This parameter is supported only on adapters with copper connections.) 222(This parameter is supported only on adapters with copper connections.)
@@ -280,7 +228,6 @@ Speed forces the line speed to the specified value in megabits per second
280partner is set to auto-negotiate, the board will auto-detect the correct 228partner is set to auto-negotiate, the board will auto-detect the correct
281speed. Duplex should also be set when Speed is set to either 10 or 100. 229speed. Duplex should also be set when Speed is set to either 10 or 100.
282 230
283
284TxDescriptors 231TxDescriptors
285------------- 232-------------
286Valid Range: 80-256 for 82542 and 82543-based adapters 233Valid Range: 80-256 for 82542 and 82543-based adapters
@@ -295,6 +242,36 @@ NOTE: Depending on the available system resources, the request for a
295 higher number of transmit descriptors may be denied. In this case, 242 higher number of transmit descriptors may be denied. In this case,
296 use a lower number. 243 use a lower number.
297 244
245TxDescriptorStep
246----------------
247Valid Range: 1 (use every Tx Descriptor)
248 4 (use every 4th Tx Descriptor)
249
250Default Value: 1 (use every Tx Descriptor)
251
252On certain non-Intel architectures, it has been observed that intense TX
253traffic bursts of short packets may result in an improper descriptor
254writeback. If this occurs, the driver will report a "TX Timeout" and reset
255the adapter, after which the transmit flow will restart, though data may
256have stalled for as much as 10 seconds before it resumes.
257
258The improper writeback does not occur on the first descriptor in a system
259memory cache-line, which is typically 32 bytes, or 4 descriptors long.
260
261Setting TxDescriptorStep to a value of 4 will ensure that all TX descriptors
262are aligned to the start of a system memory cache line, and so this problem
263will not occur.
264
265NOTES: Setting TxDescriptorStep to 4 effectively reduces the number of
266 TxDescriptors available for transmits to 1/4 of the normal allocation.
267 This has a possible negative performance impact, which may be
268 compensated for by allocating more descriptors using the TxDescriptors
269 module parameter.
270
271 There are other conditions which may result in "TX Timeout", which will
272 not be resolved by the use of the TxDescriptorStep parameter. As the
273 issue addressed by this parameter has never been observed on Intel
274 Architecture platforms, it should not be used on Intel platforms.
298 275
299TxIntDelay 276TxIntDelay
300---------- 277----------
@@ -307,7 +284,6 @@ efficiency if properly tuned for specific network traffic. If the
307system is reporting dropped transmits, this value may be set too high 284system is reporting dropped transmits, this value may be set too high
308causing the driver to run out of available transmit descriptors. 285causing the driver to run out of available transmit descriptors.
309 286
310
311TxAbsIntDelay 287TxAbsIntDelay
312------------- 288-------------
313(This parameter is supported only on 82540, 82545 and later adapters.) 289(This parameter is supported only on 82540, 82545 and later adapters.)
@@ -330,6 +306,35 @@ Default Value: 1
330A value of '1' indicates that the driver should enable IP checksum 306A value of '1' indicates that the driver should enable IP checksum
331offload for received packets (both UDP and TCP) to the adapter hardware. 307offload for received packets (both UDP and TCP) to the adapter hardware.
332 308
309Copybreak
310---------
311Valid Range: 0-xxxxxxx (0=off)
312Default Value: 256
313Usage: insmod e1000.ko copybreak=128
314
315Driver copies all packets below or equaling this size to a fresh Rx
316buffer before handing it up the stack.
317
318This parameter is different than other parameters, in that it is a
319single (not 1,1,1 etc.) parameter applied to all driver instances and
320it is also available during runtime at
321/sys/module/e1000/parameters/copybreak
322
323SmartPowerDownEnable
324--------------------
325Valid Range: 0-1
326Default Value: 0 (disabled)
327
328Allows PHY to turn off in lower power states. The user can turn off
329this parameter in supported chipsets.
330
331KumeranLockLoss
332---------------
333Valid Range: 0-1
334Default Value: 1 (enabled)
335
336This workaround skips resetting the PHY at shutdown for the initial
337silicon releases of ICH8 systems.
333 338
334Speed and Duplex Configuration 339Speed and Duplex Configuration
335============================== 340==============================
@@ -385,40 +390,9 @@ If the link partner is forced to a specific speed and duplex, then this
385parameter should not be used. Instead, use the Speed and Duplex parameters 390parameter should not be used. Instead, use the Speed and Duplex parameters
386previously mentioned to force the adapter to the same speed and duplex. 391previously mentioned to force the adapter to the same speed and duplex.
387 392
388
389Additional Configurations 393Additional Configurations
390========================= 394=========================
391 395
392 Configuring the Driver on Different Distributions
393 -------------------------------------------------
394 Configuring a network driver to load properly when the system is started
395 is distribution dependent. Typically, the configuration process involves
396 adding an alias line to /etc/modules.conf or /etc/modprobe.conf as well
397 as editing other system startup scripts and/or configuration files. Many
398 popular Linux distributions ship with tools to make these changes for you.
399 To learn the proper way to configure a network device for your system,
400 refer to your distribution documentation. If during this process you are
401 asked for the driver or module name, the name for the Linux Base Driver
402 for the Intel(R) PRO/1000 Family of Adapters is e1000.
403
404 As an example, if you install the e1000 driver for two PRO/1000 adapters
405 (eth0 and eth1) and set the speed and duplex to 10full and 100half, add
406 the following to modules.conf or or modprobe.conf:
407
408 alias eth0 e1000
409 alias eth1 e1000
410 options e1000 Speed=10,100 Duplex=2,1
411
412 Viewing Link Messages
413 ---------------------
414 Link messages will not be displayed to the console if the distribution is
415 restricting system messages. In order to see network driver link messages
416 on your console, set dmesg to eight by entering the following:
417
418 dmesg -n 8
419
420 NOTE: This setting is not saved across reboots.
421
422 Jumbo Frames 396 Jumbo Frames
423 ------------ 397 ------------
424 Jumbo Frames support is enabled by changing the MTU to a value larger than 398 Jumbo Frames support is enabled by changing the MTU to a value larger than
@@ -437,9 +411,11 @@ Additional Configurations
437 setting in a different location. 411 setting in a different location.
438 412
439 Notes: 413 Notes:
440 414 Degradation in throughput performance may be observed in some Jumbo frames
441 - To enable Jumbo Frames, increase the MTU size on the interface beyond 415 environments. If this is observed, increasing the application's socket buffer
442 1500. 416 size and/or increasing the /proc/sys/net/ipv4/tcp_*mem entry values may help.
417 See the specific application manual and /usr/src/linux*/Documentation/
418 networking/ip-sysctl.txt for more details.
443 419
444 - The maximum MTU setting for Jumbo Frames is 16110. This value coincides 420 - The maximum MTU setting for Jumbo Frames is 16110. This value coincides
445 with the maximum Jumbo Frames size of 16128. 421 with the maximum Jumbo Frames size of 16128.
@@ -447,40 +423,11 @@ Additional Configurations
447 - Using Jumbo Frames at 10 or 100 Mbps may result in poor performance or 423 - Using Jumbo Frames at 10 or 100 Mbps may result in poor performance or
448 loss of link. 424 loss of link.
449 425
450 - Some Intel gigabit adapters that support Jumbo Frames have a frame size
451 limit of 9238 bytes, with a corresponding MTU size limit of 9216 bytes.
452 The adapters with this limitation are based on the Intel(R) 82571EB,
453 82572EI, 82573L and 80003ES2LAN controller. These correspond to the
454 following product names:
455 Intel(R) PRO/1000 PT Server Adapter
456 Intel(R) PRO/1000 PT Desktop Adapter
457 Intel(R) PRO/1000 PT Network Connection
458 Intel(R) PRO/1000 PT Dual Port Server Adapter
459 Intel(R) PRO/1000 PT Dual Port Network Connection
460 Intel(R) PRO/1000 PF Server Adapter
461 Intel(R) PRO/1000 PF Network Connection
462 Intel(R) PRO/1000 PF Dual Port Server Adapter
463 Intel(R) PRO/1000 PB Server Connection
464 Intel(R) PRO/1000 PL Network Connection
465 Intel(R) PRO/1000 EB Network Connection with I/O Acceleration
466 Intel(R) PRO/1000 EB Backplane Connection with I/O Acceleration
467 Intel(R) PRO/1000 PT Quad Port Server Adapter
468
469 - Adapters based on the Intel(R) 82542 and 82573V/E controller do not 426 - Adapters based on the Intel(R) 82542 and 82573V/E controller do not
470 support Jumbo Frames. These correspond to the following product names: 427 support Jumbo Frames. These correspond to the following product names:
471 Intel(R) PRO/1000 Gigabit Server Adapter 428 Intel(R) PRO/1000 Gigabit Server Adapter
472 Intel(R) PRO/1000 PM Network Connection 429 Intel(R) PRO/1000 PM Network Connection
473 430
474 - The following adapters do not support Jumbo Frames:
475 Intel(R) 82562V 10/100 Network Connection
476 Intel(R) 82566DM Gigabit Network Connection
477 Intel(R) 82566DC Gigabit Network Connection
478 Intel(R) 82566MM Gigabit Network Connection
479 Intel(R) 82566MC Gigabit Network Connection
480 Intel(R) 82562GT 10/100 Network Connection
481 Intel(R) 82562G 10/100 Network Connection
482
483
484 Ethtool 431 Ethtool
485 ------- 432 -------
486 The driver utilizes the ethtool interface for driver configuration and 433 The driver utilizes the ethtool interface for driver configuration and
@@ -490,142 +437,14 @@ Additional Configurations
490 The latest release of ethtool can be found from 437 The latest release of ethtool can be found from
491 http://sourceforge.net/projects/gkernel. 438 http://sourceforge.net/projects/gkernel.
492 439
493 NOTE: Ethtool 1.6 only supports a limited set of ethtool options. Support
494 for a more complete ethtool feature set can be enabled by upgrading
495 ethtool to ethtool-1.8.1.
496
497 Enabling Wake on LAN* (WoL) 440 Enabling Wake on LAN* (WoL)
498 --------------------------- 441 ---------------------------
499 WoL is configured through the Ethtool* utility. Ethtool is included with 442 WoL is configured through the Ethtool* utility.
500 all versions of Red Hat after Red Hat 7.2. For other Linux distributions,
501 download and install Ethtool from the following website:
502 http://sourceforge.net/projects/gkernel.
503
504 For instructions on enabling WoL with Ethtool, refer to the website listed
505 above.
506 443
507 WoL will be enabled on the system during the next shut down or reboot. 444 WoL will be enabled on the system during the next shut down or reboot.
508 For this driver version, in order to enable WoL, the e1000 driver must be 445 For this driver version, in order to enable WoL, the e1000 driver must be
509 loaded when shutting down or rebooting the system. 446 loaded when shutting down or rebooting the system.
510 447
511 Wake On LAN is only supported on port A for the following devices:
512 Intel(R) PRO/1000 PT Dual Port Network Connection
513 Intel(R) PRO/1000 PT Dual Port Server Connection
514 Intel(R) PRO/1000 PT Dual Port Server Adapter
515 Intel(R) PRO/1000 PF Dual Port Server Adapter
516 Intel(R) PRO/1000 PT Quad Port Server Adapter
517
518 NAPI
519 ----
520 NAPI (Rx polling mode) is enabled in the e1000 driver.
521
522 See www.cyberus.ca/~hadi/usenix-paper.tgz for more information on NAPI.
523
524
525Known Issues
526============
527
528Dropped Receive Packets on Half-duplex 10/100 Networks
529------------------------------------------------------
530If you have an Intel PCI Express adapter running at 10mbps or 100mbps, half-
531duplex, you may observe occasional dropped receive packets. There are no
532workarounds for this problem in this network configuration. The network must
533be updated to operate in full-duplex, and/or 1000mbps only.
534
535Jumbo Frames System Requirement
536-------------------------------
537Memory allocation failures have been observed on Linux systems with 64 MB
538of RAM or less that are running Jumbo Frames. If you are using Jumbo
539Frames, your system may require more than the advertised minimum
540requirement of 64 MB of system memory.
541
542Performance Degradation with Jumbo Frames
543-----------------------------------------
544Degradation in throughput performance may be observed in some Jumbo frames
545environments. If this is observed, increasing the application's socket
546buffer size and/or increasing the /proc/sys/net/ipv4/tcp_*mem entry values
547may help. See the specific application manual and
548/usr/src/linux*/Documentation/
549networking/ip-sysctl.txt for more details.
550
551Jumbo Frames on Foundry BigIron 8000 switch
552-------------------------------------------
553There is a known issue using Jumbo frames when connected to a Foundry
554BigIron 8000 switch. This is a 3rd party limitation. If you experience
555loss of packets, lower the MTU size.
556
557Allocating Rx Buffers when Using Jumbo Frames
558---------------------------------------------
559Allocating Rx buffers when using Jumbo Frames on 2.6.x kernels may fail if
560the available memory is heavily fragmented. This issue may be seen with PCI-X
561adapters or with packet split disabled. This can be reduced or eliminated
562by changing the amount of available memory for receive buffer allocation, by
563increasing /proc/sys/vm/min_free_kbytes.
564
565Multiple Interfaces on Same Ethernet Broadcast Network
566------------------------------------------------------
567Due to the default ARP behavior on Linux, it is not possible to have
568one system on two IP networks in the same Ethernet broadcast domain
569(non-partitioned switch) behave as expected. All Ethernet interfaces
570will respond to IP traffic for any IP address assigned to the system.
571This results in unbalanced receive traffic.
572
573If you have multiple interfaces in a server, either turn on ARP
574filtering by entering:
575
576 echo 1 > /proc/sys/net/ipv4/conf/all/arp_filter
577(this only works if your kernel's version is higher than 2.4.5),
578
579NOTE: This setting is not saved across reboots. The configuration
580change can be made permanent by adding the line:
581 net.ipv4.conf.all.arp_filter = 1
582to the file /etc/sysctl.conf
583
584 or,
585
586install the interfaces in separate broadcast domains (either in
587different switches or in a switch partitioned to VLANs).
588
58982541/82547 can't link or are slow to link with some link partners
590-----------------------------------------------------------------
591There is a known compatibility issue with 82541/82547 and some
592low-end switches where the link will not be established, or will
593be slow to establish. In particular, these switches are known to
594be incompatible with 82541/82547:
595
596 Planex FXG-08TE
597 I-O Data ETG-SH8
598
599To workaround this issue, the driver can be compiled with an override
600of the PHY's master/slave setting. Forcing master or forcing slave
601mode will improve time-to-link.
602
603 # make CFLAGS_EXTRA=-DE1000_MASTER_SLAVE=<n>
604
605Where <n> is:
606
607 0 = Hardware default
608 1 = Master mode
609 2 = Slave mode
610 3 = Auto master/slave
611
612Disable rx flow control with ethtool
613------------------------------------
614In order to disable receive flow control using ethtool, you must turn
615off auto-negotiation on the same command line.
616
617For example:
618
619 ethtool -A eth? autoneg off rx off
620
621Unplugging network cable while ethtool -p is running
622----------------------------------------------------
623In kernel versions 2.5.50 and later (including 2.6 kernel), unplugging
624the network cable while ethtool -p is running will cause the system to
625become unresponsive to keyboard commands, except for control-alt-delete.
626Restarting the system appears to be the only remedy.
627
628
629Support 448Support
630======= 449=======
631 450
diff --git a/Documentation/networking/e1000e.txt b/Documentation/networking/e1000e.txt
new file mode 100644
index 000000000000..6aa048badf32
--- /dev/null
+++ b/Documentation/networking/e1000e.txt
@@ -0,0 +1,302 @@
1Linux* Driver for Intel(R) Network Connection
2===============================================================
3
4Intel Gigabit Linux driver.
5Copyright(c) 1999 - 2010 Intel Corporation.
6
7Contents
8========
9
10- Identifying Your Adapter
11- Command Line Parameters
12- Additional Configurations
13- Support
14
15Identifying Your Adapter
16========================
17
18The e1000e driver supports all PCI Express Intel(R) Gigabit Network
19Connections, except those that are 82575, 82576 and 82580-based*.
20
21* NOTE: The Intel(R) PRO/1000 P Dual Port Server Adapter is supported by
22 the e1000 driver, not the e1000e driver due to the 82546 part being used
23 behind a PCI Express bridge.
24
25For more information on how to identify your adapter, go to the Adapter &
26Driver ID Guide at:
27
28 http://support.intel.com/support/go/network/adapter/idguide.htm
29
30For the latest Intel network drivers for Linux, refer to the following
31website. In the search field, enter your adapter name or type, or use the
32networking link on the left to search for your adapter:
33
34 http://support.intel.com/support/go/network/adapter/home.htm
35
36Command Line Parameters
37=======================
38
39The default value for each parameter is generally the recommended setting,
40unless otherwise noted.
41
42NOTES: For more information about the InterruptThrottleRate,
43 RxIntDelay, TxIntDelay, RxAbsIntDelay, and TxAbsIntDelay
44 parameters, see the application note at:
45 http://www.intel.com/design/network/applnots/ap450.htm
46
47InterruptThrottleRate
48---------------------
49Valid Range: 0,1,3,4,100-100000 (0=off, 1=dynamic, 3=dynamic conservative,
50 4=simplified balancing)
51Default Value: 3
52
53The driver can limit the amount of interrupts per second that the adapter
54will generate for incoming packets. It does this by writing a value to the
55adapter that is based on the maximum amount of interrupts that the adapter
56will generate per second.
57
58Setting InterruptThrottleRate to a value greater or equal to 100
59will program the adapter to send out a maximum of that many interrupts
60per second, even if more packets have come in. This reduces interrupt
61load on the system and can lower CPU utilization under heavy load,
62but will increase latency as packets are not processed as quickly.
63
64The driver has two adaptive modes (setting 1 or 3) in which
65it dynamically adjusts the InterruptThrottleRate value based on the traffic
66that it receives. After determining the type of incoming traffic in the last
67timeframe, it will adjust the InterruptThrottleRate to an appropriate value
68for that traffic.
69
70The algorithm classifies the incoming traffic every interval into
71classes. Once the class is determined, the InterruptThrottleRate value is
72adjusted to suit that traffic type the best. There are three classes defined:
73"Bulk traffic", for large amounts of packets of normal size; "Low latency",
74for small amounts of traffic and/or a significant percentage of small
75packets; and "Lowest latency", for almost completely small packets or
76minimal traffic.
77
78In dynamic conservative mode, the InterruptThrottleRate value is set to 4000
79for traffic that falls in class "Bulk traffic". If traffic falls in the "Low
80latency" or "Lowest latency" class, the InterruptThrottleRate is increased
81stepwise to 20000. This default mode is suitable for most applications.
82
83For situations where low latency is vital such as cluster or
84grid computing, the algorithm can reduce latency even more when
85InterruptThrottleRate is set to mode 1. In this mode, which operates
86the same as mode 3, the InterruptThrottleRate will be increased stepwise to
8770000 for traffic in class "Lowest latency".
88
89In simplified mode the interrupt rate is based on the ratio of Tx and
90Rx traffic. If the bytes per second rate is approximately equal the
91interrupt rate will drop as low as 2000 interrupts per second. If the
92traffic is mostly transmit or mostly receive, the interrupt rate could
93be as high as 8000.
94
95Setting InterruptThrottleRate to 0 turns off any interrupt moderation
96and may improve small packet latency, but is generally not suitable
97for bulk throughput traffic.
98
99NOTE: InterruptThrottleRate takes precedence over the TxAbsIntDelay and
100 RxAbsIntDelay parameters. In other words, minimizing the receive
101 and/or transmit absolute delays does not force the controller to
102 generate more interrupts than what the Interrupt Throttle Rate
103 allows.
104
105NOTE: When e1000e is loaded with default settings and multiple adapters
106 are in use simultaneously, the CPU utilization may increase non-
107 linearly. In order to limit the CPU utilization without impacting
108 the overall throughput, we recommend that you load the driver as
109 follows:
110
111 modprobe e1000e InterruptThrottleRate=3000,3000,3000
112
113 This sets the InterruptThrottleRate to 3000 interrupts/sec for
114 the first, second, and third instances of the driver. The range
115 of 2000 to 3000 interrupts per second works on a majority of
116 systems and is a good starting point, but the optimal value will
117 be platform-specific. If CPU utilization is not a concern, use
118 RX_POLLING (NAPI) and default driver settings.
119
120RxIntDelay
121----------
122Valid Range: 0-65535 (0=off)
123Default Value: 0
124
125This value delays the generation of receive interrupts in units of 1.024
126microseconds. Receive interrupt reduction can improve CPU efficiency if
127properly tuned for specific network traffic. Increasing this value adds
128extra latency to frame reception and can end up decreasing the throughput
129of TCP traffic. If the system is reporting dropped receives, this value
130may be set too high, causing the driver to run out of available receive
131descriptors.
132
133CAUTION: When setting RxIntDelay to a value other than 0, adapters may
134 hang (stop transmitting) under certain network conditions. If
135 this occurs a NETDEV WATCHDOG message is logged in the system
136 event log. In addition, the controller is automatically reset,
137 restoring the network connection. To eliminate the potential
138 for the hang ensure that RxIntDelay is set to 0.
139
140RxAbsIntDelay
141-------------
142Valid Range: 0-65535 (0=off)
143Default Value: 8
144
145This value, in units of 1.024 microseconds, limits the delay in which a
146receive interrupt is generated. Useful only if RxIntDelay is non-zero,
147this value ensures that an interrupt is generated after the initial
148packet is received within the set amount of time. Proper tuning,
149along with RxIntDelay, may improve traffic throughput in specific network
150conditions.
151
152TxIntDelay
153----------
154Valid Range: 0-65535 (0=off)
155Default Value: 8
156
157This value delays the generation of transmit interrupts in units of
1581.024 microseconds. Transmit interrupt reduction can improve CPU
159efficiency if properly tuned for specific network traffic. If the
160system is reporting dropped transmits, this value may be set too high
161causing the driver to run out of available transmit descriptors.
162
163TxAbsIntDelay
164-------------
165Valid Range: 0-65535 (0=off)
166Default Value: 32
167
168This value, in units of 1.024 microseconds, limits the delay in which a
169transmit interrupt is generated. Useful only if TxIntDelay is non-zero,
170this value ensures that an interrupt is generated after the initial
171packet is sent on the wire within the set amount of time. Proper tuning,
172along with TxIntDelay, may improve traffic throughput in specific
173network conditions.
174
175Copybreak
176---------
177Valid Range: 0-xxxxxxx (0=off)
178Default Value: 256
179
180Driver copies all packets below or equaling this size to a fresh Rx
181buffer before handing it up the stack.
182
183This parameter is different than other parameters, in that it is a
184single (not 1,1,1 etc.) parameter applied to all driver instances and
185it is also available during runtime at
186/sys/module/e1000e/parameters/copybreak
187
188SmartPowerDownEnable
189--------------------
190Valid Range: 0-1
191Default Value: 0 (disabled)
192
193Allows PHY to turn off in lower power states. The user can set this parameter
194in supported chipsets.
195
196KumeranLockLoss
197---------------
198Valid Range: 0-1
199Default Value: 1 (enabled)
200
201This workaround skips resetting the PHY at shutdown for the initial
202silicon releases of ICH8 systems.
203
204IntMode
205-------
206Valid Range: 0-2 (0=legacy, 1=MSI, 2=MSI-X)
207Default Value: 2
208
209Allows changing the interrupt mode at module load time, without requiring a
210recompile. If the driver load fails to enable a specific interrupt mode, the
211driver will try other interrupt modes, from least to most compatible. The
212interrupt order is MSI-X, MSI, Legacy. If specifying MSI (IntMode=1)
213interrupts, only MSI and Legacy will be attempted.
214
215CrcStripping
216------------
217Valid Range: 0-1
218Default Value: 1 (enabled)
219
220Strip the CRC from received packets before sending up the network stack. If
221you have a machine with a BMC enabled but cannot receive IPMI traffic after
222loading or enabling the driver, try disabling this feature.
223
224WriteProtectNVM
225---------------
226Valid Range: 0-1
227Default Value: 1 (enabled)
228
229Set the hardware to ignore all write/erase cycles to the GbE region in the
230ICHx NVM (non-volatile memory). This feature can be disabled by the
231WriteProtectNVM module parameter (enabled by default) only after a hardware
232reset, but the machine must be power cycled before trying to enable writes.
233
234Note: the kernel boot option iomem=relaxed may need to be set if the kernel
235config option CONFIG_STRICT_DEVMEM=y, if the root user wants to write the
236NVM from user space via ethtool.
237
238Additional Configurations
239=========================
240
241 Jumbo Frames
242 ------------
243 Jumbo Frames support is enabled by changing the MTU to a value larger than
244 the default of 1500. Use the ifconfig command to increase the MTU size.
245 For example:
246
247 ifconfig eth<x> mtu 9000 up
248
249 This setting is not saved across reboots.
250
251 Notes:
252
253 - The maximum MTU setting for Jumbo Frames is 9216. This value coincides
254 with the maximum Jumbo Frames size of 9234 bytes.
255
256 - Using Jumbo Frames at 10 or 100 Mbps is not supported and may result in
257 poor performance or loss of link.
258
259 - Some adapters limit Jumbo Frames sized packets to a maximum of
260 4096 bytes and some adapters do not support Jumbo Frames.
261
262
263 Ethtool
264 -------
265 The driver utilizes the ethtool interface for driver configuration and
266 diagnostics, as well as displaying statistical information. We
267 strongly recommend downloading the latest version of Ethtool at:
268
269 http://sourceforge.net/projects/gkernel.
270
271 Speed and Duplex
272 ----------------
273 Speed and Duplex are configured through the Ethtool* utility. For
274 instructions, refer to the Ethtool man page.
275
276 Enabling Wake on LAN* (WoL)
277 ---------------------------
278 WoL is configured through the Ethtool* utility. For instructions on
279 enabling WoL with Ethtool, refer to the Ethtool man page.
280
281 WoL will be enabled on the system during the next shut down or reboot.
282 For this driver version, in order to enable WoL, the e1000e driver must be
283 loaded when shutting down or rebooting the system.
284
285 In most cases Wake On LAN is only supported on port A for multiple port
286 adapters. To verify if a port supports Wake on LAN run ethtool eth<X>.
287
288
289Support
290=======
291
292For general information, go to the Intel support website at:
293
294 www.intel.com/support/
295
296or the Intel Wired Networking project hosted by Sourceforge at:
297
298 http://sourceforge.net/projects/e1000
299
300If an issue is identified with the released source code on the supported
301kernel with a supported adapter, email the specific information related
302to the issue to e1000-devel@lists.sf.net
diff --git a/Documentation/networking/ip-sysctl.txt b/Documentation/networking/ip-sysctl.txt
index f350c69b2bb4..c7165f4cb792 100644
--- a/Documentation/networking/ip-sysctl.txt
+++ b/Documentation/networking/ip-sysctl.txt
@@ -1014,6 +1014,12 @@ conf/interface/*:
1014accept_ra - BOOLEAN 1014accept_ra - BOOLEAN
1015 Accept Router Advertisements; autoconfigure using them. 1015 Accept Router Advertisements; autoconfigure using them.
1016 1016
1017 Possible values are:
1018 0 Do not accept Router Advertisements.
1019 1 Accept Router Advertisements if forwarding is disabled.
1020 2 Overrule forwarding behaviour. Accept Router Advertisements
1021 even if forwarding is enabled.
1022
1017 Functional default: enabled if local forwarding is disabled. 1023 Functional default: enabled if local forwarding is disabled.
1018 disabled if local forwarding is enabled. 1024 disabled if local forwarding is enabled.
1019 1025
@@ -1075,7 +1081,12 @@ forwarding - BOOLEAN
1075 Note: It is recommended to have the same setting on all 1081 Note: It is recommended to have the same setting on all
1076 interfaces; mixed router/host scenarios are rather uncommon. 1082 interfaces; mixed router/host scenarios are rather uncommon.
1077 1083
1078 FALSE: 1084 Possible values are:
1085 0 Forwarding disabled
1086 1 Forwarding enabled
1087 2 Forwarding enabled (Hybrid Mode)
1088
1089 FALSE (0):
1079 1090
1080 By default, Host behaviour is assumed. This means: 1091 By default, Host behaviour is assumed. This means:
1081 1092
@@ -1085,18 +1096,24 @@ forwarding - BOOLEAN
1085 Advertisements (and do autoconfiguration). 1096 Advertisements (and do autoconfiguration).
1086 4. If accept_redirects is TRUE (default), accept Redirects. 1097 4. If accept_redirects is TRUE (default), accept Redirects.
1087 1098
1088 TRUE: 1099 TRUE (1):
1089 1100
1090 If local forwarding is enabled, Router behaviour is assumed. 1101 If local forwarding is enabled, Router behaviour is assumed.
1091 This means exactly the reverse from the above: 1102 This means exactly the reverse from the above:
1092 1103
1093 1. IsRouter flag is set in Neighbour Advertisements. 1104 1. IsRouter flag is set in Neighbour Advertisements.
1094 2. Router Solicitations are not sent. 1105 2. Router Solicitations are not sent.
1095 3. Router Advertisements are ignored. 1106 3. Router Advertisements are ignored unless accept_ra is 2.
1096 4. Redirects are ignored. 1107 4. Redirects are ignored.
1097 1108
1098 Default: FALSE if global forwarding is disabled (default), 1109 TRUE (2):
1099 otherwise TRUE. 1110
1111 Hybrid mode. Same behaviour as TRUE, except for:
1112
1113 2. Router Solicitations are being sent when necessary.
1114
1115 Default: 0 (disabled) if global forwarding is disabled (default),
1116 otherwise 1 (enabled).
1100 1117
1101hop_limit - INTEGER 1118hop_limit - INTEGER
1102 Default Hop Limit to set. 1119 Default Hop Limit to set.
diff --git a/Documentation/networking/ixgbevf.txt b/Documentation/networking/ixgbevf.txt
index 19015de6725f..21dd5d15b6b4 100755..100644
--- a/Documentation/networking/ixgbevf.txt
+++ b/Documentation/networking/ixgbevf.txt
@@ -1,19 +1,16 @@
1Linux* Base Driver for Intel(R) Network Connection 1Linux* Base Driver for Intel(R) Network Connection
2================================================== 2==================================================
3 3
4November 24, 2009 4Intel Gigabit Linux driver.
5Copyright(c) 1999 - 2010 Intel Corporation.
5 6
6Contents 7Contents
7======== 8========
8 9
9- In This Release
10- Identifying Your Adapter 10- Identifying Your Adapter
11- Known Issues/Troubleshooting 11- Known Issues/Troubleshooting
12- Support 12- Support
13 13
14In This Release
15===============
16
17This file describes the ixgbevf Linux* Base Driver for Intel Network 14This file describes the ixgbevf Linux* Base Driver for Intel Network
18Connection. 15Connection.
19 16
@@ -33,7 +30,7 @@ Identifying Your Adapter
33For more information on how to identify your adapter, go to the Adapter & 30For more information on how to identify your adapter, go to the Adapter &
34Driver ID Guide at: 31Driver ID Guide at:
35 32
36 http://support.intel.com/support/network/sb/CS-008441.htm 33 http://support.intel.com/support/go/network/adapter/idguide.htm
37 34
38Known Issues/Troubleshooting 35Known Issues/Troubleshooting
39============================ 36============================
@@ -57,34 +54,3 @@ or the Intel Wired Networking project hosted by Sourceforge at:
57If an issue is identified with the released source code on the supported 54If an issue is identified with the released source code on the supported
58kernel with a supported adapter, email the specific information related 55kernel with a supported adapter, email the specific information related
59to the issue to e1000-devel@lists.sf.net 56to the issue to e1000-devel@lists.sf.net
60
61License
62=======
63
64Intel 10 Gigabit Linux driver.
65Copyright(c) 1999 - 2009 Intel Corporation.
66
67This program is free software; you can redistribute it and/or modify it
68under the terms and conditions of the GNU General Public License,
69version 2, as published by the Free Software Foundation.
70
71This program is distributed in the hope it will be useful, but WITHOUT
72ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
73FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
74more details.
75
76You should have received a copy of the GNU General Public License along with
77this program; if not, write to the Free Software Foundation, Inc.,
7851 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
79
80The full GNU General Public License is included in this distribution in
81the file called "COPYING".
82
83Trademarks
84==========
85
86Intel, Itanium, and Pentium are trademarks or registered trademarks of
87Intel Corporation or its subsidiaries in the United States and other
88countries.
89
90* Other names and brands may be claimed as the property of others.
diff --git a/Documentation/networking/phonet.txt b/Documentation/networking/phonet.txt
index 6e8ce09f9c73..24ad2adba6e5 100644
--- a/Documentation/networking/phonet.txt
+++ b/Documentation/networking/phonet.txt
@@ -112,6 +112,22 @@ However, connect() and getpeername() are not supported, as they did
112not seem useful with Phonet usages (could be added easily). 112not seem useful with Phonet usages (could be added easily).
113 113
114 114
115Resource subscription
116---------------------
117
118A Phonet datagram socket can be subscribed to any number of 8-bits
119Phonet resources, as follow:
120
121 uint32_t res = 0xXX;
122 ioctl(fd, SIOCPNADDRESOURCE, &res);
123
124Subscription is similarly cancelled using the SIOCPNDELRESOURCE I/O
125control request, or when the socket is closed.
126
127Note that no more than one socket can be subcribed to any given
128resource at a time. If not, ioctl() will return EBUSY.
129
130
115Phonet Pipe protocol 131Phonet Pipe protocol
116-------------------- 132--------------------
117 133
@@ -166,6 +182,46 @@ The pipe protocol provides two socket options at the SOL_PNPIPE level:
166 or zero if encapsulation is off. 182 or zero if encapsulation is off.
167 183
168 184
185Phonet Pipe-controller Implementation
186-------------------------------------
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
224
169Authors 225Authors
170------- 226-------
171 227
diff --git a/Documentation/networking/timestamping.txt b/Documentation/networking/timestamping.txt
index e8c8f4f06c67..98097d8cb910 100644
--- a/Documentation/networking/timestamping.txt
+++ b/Documentation/networking/timestamping.txt
@@ -172,15 +172,19 @@ struct skb_shared_hwtstamps {
172}; 172};
173 173
174Time stamps for outgoing packets are to be generated as follows: 174Time stamps for outgoing packets are to be generated as follows:
175- In hard_start_xmit(), check if skb_tx(skb)->hardware is set no-zero. 175- In hard_start_xmit(), check if (skb_shinfo(skb)->tx_flags & SKBTX_HW_TSTAMP)
176 If yes, then the driver is expected to do hardware time stamping. 176 is set no-zero. If yes, then the driver is expected to do hardware time
177 stamping.
177- If this is possible for the skb and requested, then declare 178- If this is possible for the skb and requested, then declare
178 that the driver is doing the time stamping by setting the field 179 that the driver is doing the time stamping by setting the flag
179 skb_tx(skb)->in_progress non-zero. You might want to keep a pointer 180 SKBTX_IN_PROGRESS in skb_shinfo(skb)->tx_flags , e.g. with
180 to the associated skb for the next step and not free the skb. A driver 181
181 not supporting hardware time stamping doesn't do that. A driver must 182 skb_shinfo(skb)->tx_flags |= SKBTX_IN_PROGRESS;
182 never touch sk_buff::tstamp! It is used to store software generated 183
183 time stamps by the network subsystem. 184 You might want to keep a pointer to the associated skb for the next step
185 and not free the skb. A driver not supporting hardware time stamping doesn't
186 do that. A driver must never touch sk_buff::tstamp! It is used to store
187 software generated time stamps by the network subsystem.
184- As soon as the driver has sent the packet and/or obtained a 188- As soon as the driver has sent the packet and/or obtained a
185 hardware time stamp for it, it passes the time stamp back by 189 hardware time stamp for it, it passes the time stamp back by
186 calling skb_hwtstamp_tx() with the original skb, the raw 190 calling skb_hwtstamp_tx() with the original skb, the raw
@@ -191,6 +195,6 @@ Time stamps for outgoing packets are to be generated as follows:
191 this would occur at a later time in the processing pipeline than other 195 this would occur at a later time in the processing pipeline than other
192 software time stamping and therefore could lead to unexpected deltas 196 software time stamping and therefore could lead to unexpected deltas
193 between time stamps. 197 between time stamps.
194- If the driver did not call set skb_tx(skb)->in_progress, then 198- If the driver did not set the SKBTX_IN_PROGRESS flag (see above), then
195 dev_hard_start_xmit() checks whether software time stamping 199 dev_hard_start_xmit() checks whether software time stamping
196 is wanted as fallback and potentially generates the time stamp. 200 is wanted as fallback and potentially generates the time stamp.
diff --git a/Documentation/networking/wavelan.txt b/Documentation/networking/wavelan.txt
deleted file mode 100644
index 90e0ac4e15da..000000000000
--- a/Documentation/networking/wavelan.txt
+++ /dev/null
@@ -1,74 +0,0 @@
1 The Wavelan drivers saga
2 ------------------------
3
4 By Jean Tourrilhes <jt@hpl.hp.com>
5
6 The Wavelan is a Radio network adapter designed by
7Lucent. Under this generic name is hidden quite a variety of hardware,
8and many Linux driver to support it.
9 The get the full story on Wireless LANs, please consult :
10 http://www.hpl.hp.com/personal/Jean_Tourrilhes/Linux/
11
12"wavelan" driver (old ISA Wavelan)
13----------------
14 o Config : Network device -> Wireless LAN -> AT&T WaveLAN
15 o Location : .../drivers/net/wireless/wavelan*
16 o in-line doc : .../drivers/net/wireless/wavelan.p.h
17 o on-line doc :
18 http://www.hpl.hp.com/personal/Jean_Tourrilhes/Linux/Wavelan.html
19
20 This is the driver for the ISA version of the first generation
21of the Wavelan, now discontinued. The device is 2 Mb/s, composed of a
22Intel 82586 controller and a Lucent Modem, and is NOT 802.11 compliant.
23 The driver has been tested with the following hardware :
24 o Wavelan ISA 915 MHz (full length ISA card)
25 o Wavelan ISA 915 MHz 2.0 (half length ISA card)
26 o Wavelan ISA 2.4 GHz (full length ISA card, fixed frequency)
27 o Wavelan ISA 2.4 GHz 2.0 (half length ISA card, frequency selectable)
28 o Above cards with the optional DES encryption feature
29
30"wavelan_cs" driver (old Pcmcia Wavelan)
31-------------------
32 o Config : Network device -> PCMCIA network ->
33 Pcmcia Wireless LAN -> AT&T/Lucent WaveLAN
34 o Location : .../drivers/net/pcmcia/wavelan*
35 o in-line doc : .../drivers/net/pcmcia/wavelan_cs.h
36 o on-line doc :
37 http://www.hpl.hp.com/personal/Jean_Tourrilhes/Linux/Wavelan.html
38
39 This is the driver for the PCMCIA version of the first
40generation of the Wavelan, now discontinued. The device is 2 Mb/s,
41composed of a Intel 82593 controller (totally different from the 82586)
42and a Lucent Modem, and NOT 802.11 compatible.
43 The driver has been tested with the following hardware :
44 o Wavelan Pcmcia 915 MHz 2.0 (Pcmcia card + separate
45 modem/antenna block)
46 o Wavelan Pcmcia 2.4 GHz 2.0 (Pcmcia card + separate
47 modem/antenna block)
48
49"wvlan_cs" driver (Wavelan IEEE, GPL)
50-----------------
51 o Config : Not yet in kernel
52 o Location : Pcmcia package 3.1.10+
53 o on-line doc :
54 http://web.archive.org/web/*/http://www.fasta.fh-dortmund.de/users/andy/wvlan/
55
56 This is the driver for the current generation of Wavelan IEEE,
57which is 802.11 compatible. Depending on version, it is 2 Mb/s or 11
58Mb/s, with or without encryption, all implemented in Lucent specific
59DSP (the Hermes).
60 This is a GPL full source PCMCIA driver (ISA is just a Pcmcia
61card with ISA-Pcmcia bridge).
62
63"wavelan2_cs" driver (Wavelan IEEE, binary)
64--------------------
65 o Config : Not yet in kernel
66 o Location : ftp://sourceforge.org/pcmcia/contrib/
67
68 This driver support exactly the same hardware as the previous
69driver, the main difference is that it is based on a binary library
70and supported by Lucent.
71
72 I hope it clears the confusion ;-)
73
74 Jean
diff --git a/Documentation/padata.txt b/Documentation/padata.txt
index 473ebf22cd69..7ddfe216a0aa 100644
--- a/Documentation/padata.txt
+++ b/Documentation/padata.txt
@@ -19,7 +19,7 @@ overall control of how tasks are to be run:
19 19
20The pcpumask describes which processors will be used to execute work 20The pcpumask describes which processors will be used to execute work
21submitted to this instance in parallel. The cbcpumask defines which 21submitted to this instance in parallel. The cbcpumask defines which
22processors are allowed to use as the serialization callback processor. 22processors are allowed to be used as the serialization callback processor.
23The workqueue wq is where the work will actually be done; it should be 23The workqueue wq is where the work will actually be done; it should be
24a multithreaded queue, naturally. 24a multithreaded queue, naturally.
25 25
@@ -30,10 +30,10 @@ cpumasks this helper function can be used:
30 30
31Note: Padata maintains two kinds of cpumasks internally. The user supplied 31Note: Padata maintains two kinds of cpumasks internally. The user supplied
32cpumasks, submitted by padata_alloc/padata_alloc_possible and the 'usable' 32cpumasks, submitted by padata_alloc/padata_alloc_possible and the 'usable'
33cpumasks. The usable cpumasks are always the subset of active cpus in the 33cpumasks. The usable cpumasks are always a subset of active CPUs in the
34user supplied cpumasks, these are the cpumasks padata actually use. So 34user supplied cpumasks; these are the cpumasks padata actually uses. So
35it is legal to supply a cpumask to padata that contains offline cpus. 35it is legal to supply a cpumask to padata that contains offline CPUs.
36Once a offline cpu in the user supplied cpumask comes online, padata 36Once an offline CPU in the user supplied cpumask comes online, padata
37is going to use it. 37is going to use it.
38 38
39There are functions for enabling and disabling the instance: 39There are functions for enabling and disabling the instance:
@@ -44,7 +44,7 @@ There are functions for enabling and disabling the instance:
44These functions are setting or clearing the "PADATA_INIT" flag; 44These functions are setting or clearing the "PADATA_INIT" flag;
45if that flag is not set, other functions will refuse to work. 45if that flag is not set, other functions will refuse to work.
46padata_start returns zero on success (flag set) or -EINVAL if the 46padata_start returns zero on success (flag set) or -EINVAL if the
47padata cpumask contains no active cpu (flag not set). 47padata cpumask contains no active CPU (flag not set).
48padata_stop clears the flag and blocks until the padata instance 48padata_stop clears the flag and blocks until the padata instance
49is unused. 49is unused.
50 50
@@ -63,11 +63,11 @@ done with great frequency.
63 63
64It's possible to change both cpumasks of a padata instance with 64It's possible to change both cpumasks of a padata instance with
65padata_set_cpumasks by specifying the cpumasks for parallel execution (pcpumask) 65padata_set_cpumasks by specifying the cpumasks for parallel execution (pcpumask)
66and for the serial callback function (cbcpumask). padata_set_cpumask is to 66and for the serial callback function (cbcpumask). padata_set_cpumask is used to
67change just one of the cpumasks. Here cpumask_type is one of PADATA_CPU_SERIAL, 67change just one of the cpumasks. Here cpumask_type is one of PADATA_CPU_SERIAL,
68PADATA_CPU_PARALLEL and cpumask specifies the new cpumask to use. 68PADATA_CPU_PARALLEL and cpumask specifies the new cpumask to use.
69To simply add or remove one cpu from a certain cpumask the functions 69To simply add or remove one CPU from a certain cpumask the functions
70padata_add_cpu/padata_remove_cpu are used. cpu specifies the cpu to add or 70padata_add_cpu/padata_remove_cpu are used. cpu specifies the CPU to add or
71remove and mask is one of PADATA_CPU_SERIAL, PADATA_CPU_PARALLEL. 71remove and mask is one of PADATA_CPU_SERIAL, PADATA_CPU_PARALLEL.
72 72
73If a user is interested in padata cpumask changes, he can register to 73If a user is interested in padata cpumask changes, he can register to
@@ -82,7 +82,7 @@ To unregister from that notifier:
82 struct notifier_block *nblock); 82 struct notifier_block *nblock);
83 83
84The padata cpumask change notifier notifies about changes of the usable 84The padata cpumask change notifier notifies about changes of the usable
85cpumasks, i.e. the subset of active cpus in the user supplied cpumask. 85cpumasks, i.e. the subset of active CPUs in the user supplied cpumask.
86 86
87Padata calls the notifier chain with: 87Padata calls the notifier chain with:
88 88
@@ -92,7 +92,7 @@ Padata calls the notifier chain with:
92 92
93Here cpumask_change_notifier is registered notifier, notification_mask 93Here cpumask_change_notifier is registered notifier, notification_mask
94is one of PADATA_CPU_SERIAL, PADATA_CPU_PARALLEL and cpumask is a pointer 94is one of PADATA_CPU_SERIAL, PADATA_CPU_PARALLEL and cpumask is a pointer
95to a struct padata_cpumask that contains the new cpumask informations. 95to a struct padata_cpumask that contains the new cpumask information.
96 96
97Actually submitting work to the padata instance requires the creation of a 97Actually submitting work to the padata instance requires the creation of a
98padata_priv structure: 98padata_priv structure:
@@ -104,7 +104,7 @@ padata_priv structure:
104 }; 104 };
105 105
106This structure will almost certainly be embedded within some larger 106This structure will almost certainly be embedded within some larger
107structure specific to the work to be done. Most its fields are private to 107structure specific to the work to be done. Most of its fields are private to
108padata, but the structure should be zeroed at initialisation time, and the 108padata, but the structure should be zeroed at initialisation time, and the
109parallel() and serial() functions should be provided. Those functions will 109parallel() and serial() functions should be provided. Those functions will
110be called in the process of getting the work done as we will see 110be called in the process of getting the work done as we will see
diff --git a/Documentation/pcmcia/driver-changes.txt b/Documentation/pcmcia/driver-changes.txt
index 26c0f9c00545..dd04361dd361 100644
--- a/Documentation/pcmcia/driver-changes.txt
+++ b/Documentation/pcmcia/driver-changes.txt
@@ -1,4 +1,29 @@
1This file details changes in 2.6 which affect PCMCIA card driver authors: 1This file details changes in 2.6 which affect PCMCIA card driver authors:
2* pcmcia_loop_config() and autoconfiguration (as of 2.6.36)
3 If struct pcmcia_device *p_dev->config_flags is set accordingly,
4 pcmcia_loop_config() now sets up certain configuration values
5 automatically, though the driver may still override the settings
6 in the callback function. The following autoconfiguration options
7 are provided at the moment:
8 CONF_AUTO_CHECK_VCC : check for matching Vcc
9 CONF_AUTO_SET_VPP : set Vpp
10 CONF_AUTO_AUDIO : auto-enable audio line, if required
11 CONF_AUTO_SET_IO : set ioport resources (->resource[0,1])
12 CONF_AUTO_SET_IOMEM : set first iomem resource (->resource[2])
13
14* pcmcia_request_configuration -> pcmcia_enable_device (as of 2.6.36)
15 pcmcia_request_configuration() got renamed to pcmcia_enable_device(),
16 as it mirrors pcmcia_disable_device(). Configuration settings are now
17 stored in struct pcmcia_device, e.g. in the fields config_flags,
18 config_index, config_base, vpp.
19
20* pcmcia_request_window changes (as of 2.6.36)
21 Instead of win_req_t, drivers are now requested to fill out
22 struct pcmcia_device *p_dev->resource[2,3,4,5] for up to four ioport
23 ranges. After a call to pcmcia_request_window(), the regions found there
24 are reserved and may be used immediately -- until pcmcia_release_window()
25 is called.
26
2* pcmcia_request_io changes (as of 2.6.36) 27* pcmcia_request_io changes (as of 2.6.36)
3 Instead of io_req_t, drivers are now requested to fill out 28 Instead of io_req_t, drivers are now requested to fill out
4 struct pcmcia_device *p_dev->resource[0,1] for up to two ioport 29 struct pcmcia_device *p_dev->resource[0,1] for up to two ioport
diff --git a/Documentation/power/00-INDEX b/Documentation/power/00-INDEX
index fb742c213c9e..45e9d4a91284 100644
--- a/Documentation/power/00-INDEX
+++ b/Documentation/power/00-INDEX
@@ -14,6 +14,8 @@ interface.txt
14 - Power management user interface in /sys/power 14 - Power management user interface in /sys/power
15notifiers.txt 15notifiers.txt
16 - Registering suspend notifiers in device drivers 16 - Registering suspend notifiers in device drivers
17opp.txt
18 - Operating Performance Point library
17pci.txt 19pci.txt
18 - How the PCI Subsystem Does Power Management 20 - How the PCI Subsystem Does Power Management
19pm_qos_interface.txt 21pm_qos_interface.txt
diff --git a/Documentation/power/interface.txt b/Documentation/power/interface.txt
index e67211fe0ee2..c537834af005 100644
--- a/Documentation/power/interface.txt
+++ b/Documentation/power/interface.txt
@@ -57,7 +57,7 @@ smallest image possible. In particular, if "0" is written to this file, the
57suspend image will be as small as possible. 57suspend image will be as small as possible.
58 58
59Reading from this file will display the current image size limit, which 59Reading from this file will display the current image size limit, which
60is set to 500 MB by default. 60is set to 2/5 of available RAM by default.
61 61
62/sys/power/pm_trace controls the code which saves the last PM event point in 62/sys/power/pm_trace controls the code which saves the last PM event point in
63the RTC across reboots, so that you can debug a machine that just hangs 63the RTC across reboots, so that you can debug a machine that just hangs
diff --git a/Documentation/power/opp.txt b/Documentation/power/opp.txt
new file mode 100644
index 000000000000..44d87ad3cea9
--- /dev/null
+++ b/Documentation/power/opp.txt
@@ -0,0 +1,375 @@
1*=============*
2* OPP Library *
3*=============*
4
5(C) 2009-2010 Nishanth Menon <nm@ti.com>, Texas Instruments Incorporated
6
7Contents
8--------
91. Introduction
102. Initial OPP List Registration
113. OPP Search Functions
124. OPP Availability Control Functions
135. OPP Data Retrieval Functions
146. Cpufreq Table Generation
157. Data Structures
16
171. Introduction
18===============
19Complex SoCs of today consists of a multiple sub-modules working in conjunction.
20In an operational system executing varied use cases, not all modules in the SoC
21need to function at their highest performing frequency all the time. To
22facilitate this, sub-modules in a SoC are grouped into domains, allowing some
23domains to run at lower voltage and frequency while other domains are loaded
24more. The set of discrete tuples consisting of frequency and voltage pairs that
25the device will support per domain are called Operating Performance Points or
26OPPs.
27
28OPP library provides a set of helper functions to organize and query the OPP
29information. The library is located in drivers/base/power/opp.c and the header
30is located in include/linux/opp.h. OPP library can be enabled by enabling
31CONFIG_PM_OPP from power management menuconfig menu. OPP library depends on
32CONFIG_PM as certain SoCs such as Texas Instrument's OMAP framework allows to
33optionally boot at a certain OPP without needing cpufreq.
34
35Typical usage of the OPP library is as follows:
36(users) -> registers a set of default OPPs -> (library)
37SoC framework -> modifies on required cases certain OPPs -> OPP layer
38 -> queries to search/retrieve information ->
39
40OPP layer expects each domain to be represented by a unique device pointer. SoC
41framework registers a set of initial OPPs per device with the OPP layer. This
42list is expected to be an optimally small number typically around 5 per device.
43This initial list contains a set of OPPs that the framework expects to be safely
44enabled by default in the system.
45
46Note on OPP Availability:
47------------------------
48As the system proceeds to operate, SoC framework may choose to make certain
49OPPs available or not available on each device based on various external
50factors. Example usage: Thermal management or other exceptional situations where
51SoC framework might choose to disable a higher frequency OPP to safely continue
52operations until that OPP could be re-enabled if possible.
53
54OPP library facilitates this concept in it's implementation. The following
55operational functions operate only on available opps:
56opp_find_freq_{ceil, floor}, opp_get_voltage, opp_get_freq, opp_get_opp_count
57and opp_init_cpufreq_table
58
59opp_find_freq_exact is meant to be used to find the opp pointer which can then
60be used for opp_enable/disable functions to make an opp available as required.
61
62WARNING: Users of OPP library should refresh their availability count using
63get_opp_count if opp_enable/disable functions are invoked for a device, the
64exact mechanism to trigger these or the notification mechanism to other
65dependent subsystems such as cpufreq are left to the discretion of the SoC
66specific framework which uses the OPP library. Similar care needs to be taken
67care to refresh the cpufreq table in cases of these operations.
68
69WARNING on OPP List locking mechanism:
70-------------------------------------------------
71OPP library uses RCU for exclusivity. RCU allows the query functions to operate
72in multiple contexts and this synchronization mechanism is optimal for a read
73intensive operations on data structure as the OPP library caters to.
74
75To ensure that the data retrieved are sane, the users such as SoC framework
76should ensure that the section of code operating on OPP queries are locked
77using RCU read locks. The opp_find_freq_{exact,ceil,floor},
78opp_get_{voltage, freq, opp_count} fall into this category.
79
80opp_{add,enable,disable} are updaters which use mutex and implement it's own
81RCU locking mechanisms. opp_init_cpufreq_table acts as an updater and uses
82mutex to implment RCU updater strategy. These functions should *NOT* be called
83under RCU locks and other contexts that prevent blocking functions in RCU or
84mutex operations from working.
85
862. Initial OPP List Registration
87================================
88The SoC implementation calls opp_add function iteratively to add OPPs per
89device. It is expected that the SoC framework will register the OPP entries
90optimally- typical numbers range to be less than 5. The list generated by
91registering the OPPs is maintained by OPP library throughout the device
92operation. The SoC framework can subsequently control the availability of the
93OPPs dynamically using the opp_enable / disable functions.
94
95opp_add - Add a new OPP for a specific domain represented by the device pointer.
96 The OPP is defined using the frequency and voltage. Once added, the OPP
97 is assumed to be available and control of it's availability can be done
98 with the opp_enable/disable functions. OPP library internally stores
99 and manages this information in the opp struct. This function may be
100 used by SoC framework to define a optimal list as per the demands of
101 SoC usage environment.
102
103 WARNING: Do not use this function in interrupt context.
104
105 Example:
106 soc_pm_init()
107 {
108 /* Do things */
109 r = opp_add(mpu_dev, 1000000, 900000);
110 if (!r) {
111 pr_err("%s: unable to register mpu opp(%d)\n", r);
112 goto no_cpufreq;
113 }
114 /* Do cpufreq things */
115 no_cpufreq:
116 /* Do remaining things */
117 }
118
1193. OPP Search Functions
120=======================
121High level framework such as cpufreq operates on frequencies. To map the
122frequency back to the corresponding OPP, OPP library provides handy functions
123to search the OPP list that OPP library internally manages. These search
124functions return the matching pointer representing the opp if a match is
125found, else returns error. These errors are expected to be handled by standard
126error checks such as IS_ERR() and appropriate actions taken by the caller.
127
128opp_find_freq_exact - Search for an OPP based on an *exact* frequency and
129 availability. This function is especially useful to enable an OPP which
130 is not available by default.
131 Example: In a case when SoC framework detects a situation where a
132 higher frequency could be made available, it can use this function to
133 find the OPP prior to call the opp_enable to actually make it available.
134 rcu_read_lock();
135 opp = opp_find_freq_exact(dev, 1000000000, false);
136 rcu_read_unlock();
137 /* dont operate on the pointer.. just do a sanity check.. */
138 if (IS_ERR(opp)) {
139 pr_err("frequency not disabled!\n");
140 /* trigger appropriate actions.. */
141 } else {
142 opp_enable(dev,1000000000);
143 }
144
145 NOTE: This is the only search function that operates on OPPs which are
146 not available.
147
148opp_find_freq_floor - Search for an available OPP which is *at most* the
149 provided frequency. This function is useful while searching for a lesser
150 match OR operating on OPP information in the order of decreasing
151 frequency.
152 Example: To find the highest opp for a device:
153 freq = ULONG_MAX;
154 rcu_read_lock();
155 opp_find_freq_floor(dev, &freq);
156 rcu_read_unlock();
157
158opp_find_freq_ceil - Search for an available OPP which is *at least* the
159 provided frequency. This function is useful while searching for a
160 higher match OR operating on OPP information in the order of increasing
161 frequency.
162 Example 1: To find the lowest opp for a device:
163 freq = 0;
164 rcu_read_lock();
165 opp_find_freq_ceil(dev, &freq);
166 rcu_read_unlock();
167 Example 2: A simplified implementation of a SoC cpufreq_driver->target:
168 soc_cpufreq_target(..)
169 {
170 /* Do stuff like policy checks etc. */
171 /* Find the best frequency match for the req */
172 rcu_read_lock();
173 opp = opp_find_freq_ceil(dev, &freq);
174 rcu_read_unlock();
175 if (!IS_ERR(opp))
176 soc_switch_to_freq_voltage(freq);
177 else
178 /* do something when we cant satisfy the req */
179 /* do other stuff */
180 }
181
1824. OPP Availability Control Functions
183=====================================
184A default OPP list registered with the OPP library may not cater to all possible
185situation. The OPP library provides a set of functions to modify the
186availability of a OPP within the OPP list. This allows SoC frameworks to have
187fine grained dynamic control of which sets of OPPs are operationally available.
188These functions are intended to *temporarily* remove an OPP in conditions such
189as thermal considerations (e.g. don't use OPPx until the temperature drops).
190
191WARNING: Do not use these functions in interrupt context.
192
193opp_enable - Make a OPP available for operation.
194 Example: Lets say that 1GHz OPP is to be made available only if the
195 SoC temperature is lower than a certain threshold. The SoC framework
196 implementation might choose to do something as follows:
197 if (cur_temp < temp_low_thresh) {
198 /* Enable 1GHz if it was disabled */
199 rcu_read_lock();
200 opp = opp_find_freq_exact(dev, 1000000000, false);
201 rcu_read_unlock();
202 /* just error check */
203 if (!IS_ERR(opp))
204 ret = opp_enable(dev, 1000000000);
205 else
206 goto try_something_else;
207 }
208
209opp_disable - Make an OPP to be not available for operation
210 Example: Lets say that 1GHz OPP is to be disabled if the temperature
211 exceeds a threshold value. The SoC framework implementation might
212 choose to do something as follows:
213 if (cur_temp > temp_high_thresh) {
214 /* Disable 1GHz if it was enabled */
215 rcu_read_lock();
216 opp = opp_find_freq_exact(dev, 1000000000, true);
217 rcu_read_unlock();
218 /* just error check */
219 if (!IS_ERR(opp))
220 ret = opp_disable(dev, 1000000000);
221 else
222 goto try_something_else;
223 }
224
2255. OPP Data Retrieval Functions
226===============================
227Since OPP library abstracts away the OPP information, a set of functions to pull
228information from the OPP structure is necessary. Once an OPP pointer is
229retrieved using the search functions, the following functions can be used by SoC
230framework to retrieve the information represented inside the OPP layer.
231
232opp_get_voltage - Retrieve the voltage represented by the opp pointer.
233 Example: At a cpufreq transition to a different frequency, SoC
234 framework requires to set the voltage represented by the OPP using
235 the regulator framework to the Power Management chip providing the
236 voltage.
237 soc_switch_to_freq_voltage(freq)
238 {
239 /* do things */
240 rcu_read_lock();
241 opp = opp_find_freq_ceil(dev, &freq);
242 v = opp_get_voltage(opp);
243 rcu_read_unlock();
244 if (v)
245 regulator_set_voltage(.., v);
246 /* do other things */
247 }
248
249opp_get_freq - Retrieve the freq represented by the opp pointer.
250 Example: Lets say the SoC framework uses a couple of helper functions
251 we could pass opp pointers instead of doing additional parameters to
252 handle quiet a bit of data parameters.
253 soc_cpufreq_target(..)
254 {
255 /* do things.. */
256 max_freq = ULONG_MAX;
257 rcu_read_lock();
258 max_opp = opp_find_freq_floor(dev,&max_freq);
259 requested_opp = opp_find_freq_ceil(dev,&freq);
260 if (!IS_ERR(max_opp) && !IS_ERR(requested_opp))
261 r = soc_test_validity(max_opp, requested_opp);
262 rcu_read_unlock();
263 /* do other things */
264 }
265 soc_test_validity(..)
266 {
267 if(opp_get_voltage(max_opp) < opp_get_voltage(requested_opp))
268 return -EINVAL;
269 if(opp_get_freq(max_opp) < opp_get_freq(requested_opp))
270 return -EINVAL;
271 /* do things.. */
272 }
273
274opp_get_opp_count - Retrieve the number of available opps for a device
275 Example: Lets say a co-processor in the SoC needs to know the available
276 frequencies in a table, the main processor can notify as following:
277 soc_notify_coproc_available_frequencies()
278 {
279 /* Do things */
280 rcu_read_lock();
281 num_available = opp_get_opp_count(dev);
282 speeds = kzalloc(sizeof(u32) * num_available, GFP_KERNEL);
283 /* populate the table in increasing order */
284 freq = 0;
285 while (!IS_ERR(opp = opp_find_freq_ceil(dev, &freq))) {
286 speeds[i] = freq;
287 freq++;
288 i++;
289 }
290 rcu_read_unlock();
291
292 soc_notify_coproc(AVAILABLE_FREQs, speeds, num_available);
293 /* Do other things */
294 }
295
2966. Cpufreq Table Generation
297===========================
298opp_init_cpufreq_table - cpufreq framework typically is initialized with
299 cpufreq_frequency_table_cpuinfo which is provided with the list of
300 frequencies that are available for operation. This function provides
301 a ready to use conversion routine to translate the OPP layer's internal
302 information about the available frequencies into a format readily
303 providable to cpufreq.
304
305 WARNING: Do not use this function in interrupt context.
306
307 Example:
308 soc_pm_init()
309 {
310 /* Do things */
311 r = opp_init_cpufreq_table(dev, &freq_table);
312 if (!r)
313 cpufreq_frequency_table_cpuinfo(policy, freq_table);
314 /* Do other things */
315 }
316
317 NOTE: This function is available only if CONFIG_CPU_FREQ is enabled in
318 addition to CONFIG_PM as power management feature is required to
319 dynamically scale voltage and frequency in a system.
320
3217. Data Structures
322==================
323Typically an SoC contains multiple voltage domains which are variable. Each
324domain is represented by a device pointer. The relationship to OPP can be
325represented as follows:
326SoC
327 |- device 1
328 | |- opp 1 (availability, freq, voltage)
329 | |- opp 2 ..
330 ... ...
331 | `- opp n ..
332 |- device 2
333 ...
334 `- device m
335
336OPP library maintains a internal list that the SoC framework populates and
337accessed by various functions as described above. However, the structures
338representing the actual OPPs and domains are internal to the OPP library itself
339to allow for suitable abstraction reusable across systems.
340
341struct opp - The internal data structure of OPP library which is used to
342 represent an OPP. In addition to the freq, voltage, availability
343 information, it also contains internal book keeping information required
344 for the OPP library to operate on. Pointer to this structure is
345 provided back to the users such as SoC framework to be used as a
346 identifier for OPP in the interactions with OPP layer.
347
348 WARNING: The struct opp pointer should not be parsed or modified by the
349 users. The defaults of for an instance is populated by opp_add, but the
350 availability of the OPP can be modified by opp_enable/disable functions.
351
352struct device - This is used to identify a domain to the OPP layer. The
353 nature of the device and it's implementation is left to the user of
354 OPP library such as the SoC framework.
355
356Overall, in a simplistic view, the data structure operations is represented as
357following:
358
359Initialization / modification:
360 +-----+ /- opp_enable
361opp_add --> | opp | <-------
362 | +-----+ \- opp_disable
363 \-------> domain_info(device)
364
365Search functions:
366 /-- opp_find_freq_ceil ---\ +-----+
367domain_info<---- opp_find_freq_exact -----> | opp |
368 \-- opp_find_freq_floor ---/ +-----+
369
370Retrieval functions:
371+-----+ /- opp_get_voltage
372| opp | <---
373+-----+ \- opp_get_freq
374
375domain_info <- opp_get_opp_count
diff --git a/Documentation/power/regulator/overview.txt b/Documentation/power/regulator/overview.txt
index 9363e056188a..8ed17587a74b 100644
--- a/Documentation/power/regulator/overview.txt
+++ b/Documentation/power/regulator/overview.txt
@@ -13,7 +13,7 @@ regulators (where voltage output is controllable) and current sinks (where
13current limit is controllable). 13current limit is controllable).
14 14
15(C) 2008 Wolfson Microelectronics PLC. 15(C) 2008 Wolfson Microelectronics PLC.
16Author: Liam Girdwood <lg@opensource.wolfsonmicro.com> 16Author: Liam Girdwood <lrg@slimlogic.co.uk>
17 17
18 18
19Nomenclature 19Nomenclature
diff --git a/Documentation/power/runtime_pm.txt b/Documentation/power/runtime_pm.txt
index 55b859b3bc72..489e9bacd165 100644
--- a/Documentation/power/runtime_pm.txt
+++ b/Documentation/power/runtime_pm.txt
@@ -1,6 +1,7 @@
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 Rafael J. Wysocki <rjw@sisk.pl>, Novell Inc.
4(C) 2010 Alan Stern <stern@rowland.harvard.edu>
4 5
51. Introduction 61. Introduction
6 7
@@ -157,7 +158,8 @@ rules:
157 to execute it, the other callbacks will not be executed for the same device. 158 to execute it, the other callbacks will not be executed for the same device.
158 159
159 * A request to execute ->runtime_resume() will cancel any pending or 160 * A request to execute ->runtime_resume() will cancel any pending or
160 scheduled requests to execute the other callbacks for the same device. 161 scheduled requests to execute the other callbacks for the same device,
162 except for scheduled autosuspends.
161 163
1623. Run-time PM Device Fields 1643. Run-time PM Device Fields
163 165
@@ -165,7 +167,7 @@ The following device run-time PM fields are present in 'struct dev_pm_info', as
165defined in include/linux/pm.h: 167defined in include/linux/pm.h:
166 168
167 struct timer_list suspend_timer; 169 struct timer_list suspend_timer;
168 - timer used for scheduling (delayed) suspend request 170 - timer used for scheduling (delayed) suspend and autosuspend requests
169 171
170 unsigned long timer_expires; 172 unsigned long timer_expires;
171 - timer expiration time, in jiffies (if this is different from zero, the 173 - timer expiration time, in jiffies (if this is different from zero, the
@@ -230,6 +232,28 @@ defined in include/linux/pm.h:
230 interface; it may only be modified with the help of the pm_runtime_allow() 232 interface; it may only be modified with the help of the pm_runtime_allow()
231 and pm_runtime_forbid() helper functions 233 and pm_runtime_forbid() helper functions
232 234
235 unsigned int no_callbacks;
236 - indicates that the device does not use the run-time PM callbacks (see
237 Section 8); it may be modified only by the pm_runtime_no_callbacks()
238 helper function
239
240 unsigned int use_autosuspend;
241 - indicates that the device's driver supports delayed autosuspend (see
242 Section 9); it may be modified only by the
243 pm_runtime{_dont}_use_autosuspend() helper functions
244
245 unsigned int timer_autosuspends;
246 - indicates that the PM core should attempt to carry out an autosuspend
247 when the timer expires rather than a normal suspend
248
249 int autosuspend_delay;
250 - the delay time (in milliseconds) to be used for autosuspend
251
252 unsigned long last_busy;
253 - the time (in jiffies) when the pm_runtime_mark_last_busy() helper
254 function was last called for this device; used in calculating inactivity
255 periods for autosuspend
256
233All of the above fields are members of the 'power' member of 'struct device'. 257All of the above fields are members of the 'power' member of 'struct device'.
234 258
2354. Run-time PM Device Helper Functions 2594. Run-time PM Device Helper Functions
@@ -255,6 +279,12 @@ drivers/base/power/runtime.c and include/linux/pm_runtime.h:
255 error code on failure, where -EAGAIN or -EBUSY means it is safe to attempt 279 error code on failure, where -EAGAIN or -EBUSY means it is safe to attempt
256 to suspend the device again in future 280 to suspend the device again in future
257 281
282 int pm_runtime_autosuspend(struct device *dev);
283 - same as pm_runtime_suspend() except that the autosuspend delay is taken
284 into account; if pm_runtime_autosuspend_expiration() says the delay has
285 not yet expired then an autosuspend is scheduled for the appropriate time
286 and 0 is returned
287
258 int pm_runtime_resume(struct device *dev); 288 int pm_runtime_resume(struct device *dev);
259 - execute the subsystem-level resume callback for the device; returns 0 on 289 - execute the subsystem-level resume callback for the device; returns 0 on
260 success, 1 if the device's run-time PM status was already 'active' or 290 success, 1 if the device's run-time PM status was already 'active' or
@@ -267,6 +297,11 @@ drivers/base/power/runtime.c and include/linux/pm_runtime.h:
267 device (the request is represented by a work item in pm_wq); returns 0 on 297 device (the request is represented by a work item in pm_wq); returns 0 on
268 success or error code if the request has not been queued up 298 success or error code if the request has not been queued up
269 299
300 int pm_request_autosuspend(struct device *dev);
301 - schedule the execution of the subsystem-level suspend callback for the
302 device when the autosuspend delay has expired; if the delay has already
303 expired then the work item is queued up immediately
304
270 int pm_schedule_suspend(struct device *dev, unsigned int delay); 305 int pm_schedule_suspend(struct device *dev, unsigned int delay);
271 - schedule the execution of the subsystem-level suspend callback for the 306 - schedule the execution of the subsystem-level suspend callback for the
272 device in future, where 'delay' is the time to wait before queuing up a 307 device in future, where 'delay' is the time to wait before queuing up a
@@ -298,12 +333,20 @@ drivers/base/power/runtime.c and include/linux/pm_runtime.h:
298 - decrement the device's usage counter 333 - decrement the device's usage counter
299 334
300 int pm_runtime_put(struct device *dev); 335 int pm_runtime_put(struct device *dev);
301 - decrement the device's usage counter, run pm_request_idle(dev) and return 336 - decrement the device's usage counter; if the result is 0 then run
302 its result 337 pm_request_idle(dev) and return its result
338
339 int pm_runtime_put_autosuspend(struct device *dev);
340 - decrement the device's usage counter; if the result is 0 then run
341 pm_request_autosuspend(dev) and return its result
303 342
304 int pm_runtime_put_sync(struct device *dev); 343 int pm_runtime_put_sync(struct device *dev);
305 - decrement the device's usage counter, run pm_runtime_idle(dev) and return 344 - decrement the device's usage counter; if the result is 0 then run
306 its result 345 pm_runtime_idle(dev) and return its result
346
347 int pm_runtime_put_sync_autosuspend(struct device *dev);
348 - decrement the device's usage counter; if the result is 0 then run
349 pm_runtime_autosuspend(dev) and return its result
307 350
308 void pm_runtime_enable(struct device *dev); 351 void pm_runtime_enable(struct device *dev);
309 - enable the run-time PM helper functions to run the device bus type's 352 - enable the run-time PM helper functions to run the device bus type's
@@ -349,19 +392,51 @@ drivers/base/power/runtime.c and include/linux/pm_runtime.h:
349 counter (used by the /sys/devices/.../power/control interface to 392 counter (used by the /sys/devices/.../power/control interface to
350 effectively prevent the device from being power managed at run time) 393 effectively prevent the device from being power managed at run time)
351 394
395 void pm_runtime_no_callbacks(struct device *dev);
396 - set the power.no_callbacks flag for the device and remove the run-time
397 PM attributes from /sys/devices/.../power (or prevent them from being
398 added when the device is registered)
399
400 void pm_runtime_mark_last_busy(struct device *dev);
401 - set the power.last_busy field to the current time
402
403 void pm_runtime_use_autosuspend(struct device *dev);
404 - set the power.use_autosuspend flag, enabling autosuspend delays
405
406 void pm_runtime_dont_use_autosuspend(struct device *dev);
407 - clear the power.use_autosuspend flag, disabling autosuspend delays
408
409 void pm_runtime_set_autosuspend_delay(struct device *dev, int delay);
410 - set the power.autosuspend_delay value to 'delay' (expressed in
411 milliseconds); if 'delay' is negative then run-time suspends are
412 prevented
413
414 unsigned long pm_runtime_autosuspend_expiration(struct device *dev);
415 - calculate the time when the current autosuspend delay period will expire,
416 based on power.last_busy and power.autosuspend_delay; if the delay time
417 is 1000 ms or larger then the expiration time is rounded up to the
418 nearest second; returns 0 if the delay period has already expired or
419 power.use_autosuspend isn't set, otherwise returns the expiration time
420 in jiffies
421
352It is safe to execute the following helper functions from interrupt context: 422It is safe to execute the following helper functions from interrupt context:
353 423
354pm_request_idle() 424pm_request_idle()
425pm_request_autosuspend()
355pm_schedule_suspend() 426pm_schedule_suspend()
356pm_request_resume() 427pm_request_resume()
357pm_runtime_get_noresume() 428pm_runtime_get_noresume()
358pm_runtime_get() 429pm_runtime_get()
359pm_runtime_put_noidle() 430pm_runtime_put_noidle()
360pm_runtime_put() 431pm_runtime_put()
432pm_runtime_put_autosuspend()
433pm_runtime_enable()
361pm_suspend_ignore_children() 434pm_suspend_ignore_children()
362pm_runtime_set_active() 435pm_runtime_set_active()
363pm_runtime_set_suspended() 436pm_runtime_set_suspended()
364pm_runtime_enable() 437pm_runtime_suspended()
438pm_runtime_mark_last_busy()
439pm_runtime_autosuspend_expiration()
365 440
3665. Run-time PM Initialization, Device Probing and Removal 4415. Run-time PM Initialization, Device Probing and Removal
367 442
@@ -524,3 +599,141 @@ poweroff and run-time suspend callback, and similarly for system resume, thaw,
524restore, and run-time resume, can achieve this with the help of the 599restore, and run-time resume, can achieve this with the help of the
525UNIVERSAL_DEV_PM_OPS macro defined in include/linux/pm.h (possibly setting its 600UNIVERSAL_DEV_PM_OPS macro defined in include/linux/pm.h (possibly setting its
526last argument to NULL). 601last argument to NULL).
602
6038. "No-Callback" Devices
604
605Some "devices" are only logical sub-devices of their parent and cannot be
606power-managed on their own. (The prototype example is a USB interface. Entire
607USB devices can go into low-power mode or send wake-up requests, but neither is
608possible for individual interfaces.) The drivers for these devices have no
609need of run-time PM callbacks; if the callbacks did exist, ->runtime_suspend()
610and ->runtime_resume() would always return 0 without doing anything else and
611->runtime_idle() would always call pm_runtime_suspend().
612
613Subsystems can tell the PM core about these devices by calling
614pm_runtime_no_callbacks(). This should be done after the device structure is
615initialized and before it is registered (although after device registration is
616also okay). The routine will set the device's power.no_callbacks flag and
617prevent the non-debugging run-time PM sysfs attributes from being created.
618
619When power.no_callbacks is set, the PM core will not invoke the
620->runtime_idle(), ->runtime_suspend(), or ->runtime_resume() callbacks.
621Instead it will assume that suspends and resumes always succeed and that idle
622devices should be suspended.
623
624As a consequence, the PM core will never directly inform the device's subsystem
625or driver about run-time power changes. Instead, the driver for the device's
626parent must take responsibility for telling the device's driver when the
627parent's power state changes.
628
6299. Autosuspend, or automatically-delayed suspends
630
631Changing a device's power state isn't free; it requires both time and energy.
632A device should be put in a low-power state only when there's some reason to
633think it will remain in that state for a substantial time. A common heuristic
634says that a device which hasn't been used for a while is liable to remain
635unused; following this advice, drivers should not allow devices to be suspended
636at run-time until they have been inactive for some minimum period. Even when
637the heuristic ends up being non-optimal, it will still prevent devices from
638"bouncing" too rapidly between low-power and full-power states.
639
640The term "autosuspend" is an historical remnant. It doesn't mean that the
641device is automatically suspended (the subsystem or driver still has to call
642the appropriate PM routines); rather it means that run-time suspends will
643automatically be delayed until the desired period of inactivity has elapsed.
644
645Inactivity is determined based on the power.last_busy field. Drivers should
646call pm_runtime_mark_last_busy() to update this field after carrying out I/O,
647typically just before calling pm_runtime_put_autosuspend(). The desired length
648of the inactivity period is a matter of policy. Subsystems can set this length
649initially by calling pm_runtime_set_autosuspend_delay(), but after device
650registration the length should be controlled by user space, using the
651/sys/devices/.../power/autosuspend_delay_ms attribute.
652
653In order to use autosuspend, subsystems or drivers must call
654pm_runtime_use_autosuspend() (preferably before registering the device), and
655thereafter they should use the various *_autosuspend() helper functions instead
656of the non-autosuspend counterparts:
657
658 Instead of: pm_runtime_suspend use: pm_runtime_autosuspend;
659 Instead of: pm_schedule_suspend use: pm_request_autosuspend;
660 Instead of: pm_runtime_put use: pm_runtime_put_autosuspend;
661 Instead of: pm_runtime_put_sync use: pm_runtime_put_sync_autosuspend.
662
663Drivers may also continue to use the non-autosuspend helper functions; they
664will behave normally, not taking the autosuspend delay into account.
665Similarly, if the power.use_autosuspend field isn't set then the autosuspend
666helper functions will behave just like the non-autosuspend counterparts.
667
668The implementation is well suited for asynchronous use in interrupt contexts.
669However such use inevitably involves races, because the PM core can't
670synchronize ->runtime_suspend() callbacks with the arrival of I/O requests.
671This synchronization must be handled by the driver, using its private lock.
672Here is a schematic pseudo-code example:
673
674 foo_read_or_write(struct foo_priv *foo, void *data)
675 {
676 lock(&foo->private_lock);
677 add_request_to_io_queue(foo, data);
678 if (foo->num_pending_requests++ == 0)
679 pm_runtime_get(&foo->dev);
680 if (!foo->is_suspended)
681 foo_process_next_request(foo);
682 unlock(&foo->private_lock);
683 }
684
685 foo_io_completion(struct foo_priv *foo, void *req)
686 {
687 lock(&foo->private_lock);
688 if (--foo->num_pending_requests == 0) {
689 pm_runtime_mark_last_busy(&foo->dev);
690 pm_runtime_put_autosuspend(&foo->dev);
691 } else {
692 foo_process_next_request(foo);
693 }
694 unlock(&foo->private_lock);
695 /* Send req result back to the user ... */
696 }
697
698 int foo_runtime_suspend(struct device *dev)
699 {
700 struct foo_priv foo = container_of(dev, ...);
701 int ret = 0;
702
703 lock(&foo->private_lock);
704 if (foo->num_pending_requests > 0) {
705 ret = -EBUSY;
706 } else {
707 /* ... suspend the device ... */
708 foo->is_suspended = 1;
709 }
710 unlock(&foo->private_lock);
711 return ret;
712 }
713
714 int foo_runtime_resume(struct device *dev)
715 {
716 struct foo_priv foo = container_of(dev, ...);
717
718 lock(&foo->private_lock);
719 /* ... resume the device ... */
720 foo->is_suspended = 0;
721 pm_runtime_mark_last_busy(&foo->dev);
722 if (foo->num_pending_requests > 0)
723 foo_process_requests(foo);
724 unlock(&foo->private_lock);
725 return 0;
726 }
727
728The important point is that after foo_io_completion() asks for an autosuspend,
729the foo_runtime_suspend() callback may race with foo_read_or_write().
730Therefore foo_runtime_suspend() has to check whether there are any pending I/O
731requests (while holding the private lock) before allowing the suspend to
732proceed.
733
734In addition, the power.autosuspend_delay field can be changed by user space at
735any time. If a driver cares about this, it can call
736pm_runtime_autosuspend_expiration() from within the ->runtime_suspend()
737callback while holding its private lock. If the function returns a nonzero
738value then the delay has not yet expired and the callback should return
739-EAGAIN.
diff --git a/Documentation/power/s2ram.txt b/Documentation/power/s2ram.txt
index 514b94fc931e..1bdfa0443773 100644
--- a/Documentation/power/s2ram.txt
+++ b/Documentation/power/s2ram.txt
@@ -49,6 +49,13 @@ machine that doesn't boot) is:
49 device (lspci and /sys/devices/pci* is your friend), and see if you can 49 device (lspci and /sys/devices/pci* is your friend), and see if you can
50 fix it, disable it, or trace into its resume function. 50 fix it, disable it, or trace into its resume function.
51 51
52 If no device matches the hash (or any matches appear to be false positives),
53 the culprit may be a device from a loadable kernel module that is not loaded
54 until after the hash is checked. You can check the hash against the current
55 devices again after more modules are loaded using sysfs:
56
57 cat /sys/power/pm_trace_dev_match
58
52For example, the above happens to be the VGA device on my EVO, which I 59For example, the above happens to be the VGA device on my EVO, which I
53used to run with "radeonfb" (it's an ATI Radeon mobility). It turns out 60used to run with "radeonfb" (it's an ATI Radeon mobility). It turns out
54that "radeonfb" simply cannot resume that device - it tries to set the 61that "radeonfb" simply cannot resume that device - it tries to set the
diff --git a/Documentation/power/swsusp.txt b/Documentation/power/swsusp.txt
index 9d60ab717a7b..ea718891a665 100644
--- a/Documentation/power/swsusp.txt
+++ b/Documentation/power/swsusp.txt
@@ -66,7 +66,8 @@ swsusp saves the state of the machine into active swaps and then reboots or
66powerdowns. You must explicitly specify the swap partition to resume from with 66powerdowns. You must explicitly specify the swap partition to resume from with
67``resume='' kernel option. If signature is found it loads and restores saved 67``resume='' kernel option. If signature is found it loads and restores saved
68state. If the option ``noresume'' is specified as a boot parameter, it skips 68state. If the option ``noresume'' is specified as a boot parameter, it skips
69the resuming. 69the resuming. If the option ``hibernate=nocompress'' is specified as a boot
70parameter, it saves hibernation image without compression.
70 71
71In the meantime while the system is suspended you should not add/remove any 72In the meantime while the system is suspended you should not add/remove any
72of the hardware, write to the filesystems, etc. 73of the hardware, write to the filesystems, etc.
diff --git a/Documentation/powerpc/booting-without-of.txt b/Documentation/powerpc/booting-without-of.txt
index 568fa08e82e5..302db5da49b3 100644
--- a/Documentation/powerpc/booting-without-of.txt
+++ b/Documentation/powerpc/booting-without-of.txt
@@ -49,40 +49,13 @@ Table of Contents
49 f) MDIO on GPIOs 49 f) MDIO on GPIOs
50 g) SPI busses 50 g) SPI busses
51 51
52 VII - Marvell Discovery mv64[345]6x System Controller chips 52 VII - Specifying interrupt information for devices
53 1) The /system-controller node
54 2) Child nodes of /system-controller
55 a) Marvell Discovery MDIO bus
56 b) Marvell Discovery ethernet controller
57 c) Marvell Discovery PHY nodes
58 d) Marvell Discovery SDMA nodes
59 e) Marvell Discovery BRG nodes
60 f) Marvell Discovery CUNIT nodes
61 g) Marvell Discovery MPSCROUTING nodes
62 h) Marvell Discovery MPSCINTR nodes
63 i) Marvell Discovery MPSC nodes
64 j) Marvell Discovery Watch Dog Timer nodes
65 k) Marvell Discovery I2C nodes
66 l) Marvell Discovery PIC (Programmable Interrupt Controller) nodes
67 m) Marvell Discovery MPP (Multipurpose Pins) multiplexing nodes
68 n) Marvell Discovery GPP (General Purpose Pins) nodes
69 o) Marvell Discovery PCI host bridge node
70 p) Marvell Discovery CPU Error nodes
71 q) Marvell Discovery SRAM Controller nodes
72 r) Marvell Discovery PCI Error Handler nodes
73 s) Marvell Discovery Memory Controller nodes
74
75 VIII - Specifying interrupt information for devices
76 1) interrupts property 53 1) interrupts property
77 2) interrupt-parent property 54 2) interrupt-parent property
78 3) OpenPIC Interrupt Controllers 55 3) OpenPIC Interrupt Controllers
79 4) ISA Interrupt Controllers 56 4) ISA Interrupt Controllers
80 57
81 IX - Specifying GPIO information for devices 58 VIII - Specifying device power management information (sleep property)
82 1) gpios property
83 2) gpio-controller nodes
84
85 X - Specifying device power management information (sleep property)
86 59
87 Appendix A - Sample SOC node for MPC8540 60 Appendix A - Sample SOC node for MPC8540
88 61
diff --git a/Documentation/powerpc/dts-bindings/fsl/esdhc.txt b/Documentation/powerpc/dts-bindings/fsl/esdhc.txt
index 8a0040738969..64bcb8be973c 100644
--- a/Documentation/powerpc/dts-bindings/fsl/esdhc.txt
+++ b/Documentation/powerpc/dts-bindings/fsl/esdhc.txt
@@ -14,6 +14,8 @@ Required properties:
14 reports inverted write-protect state; 14 reports inverted write-protect state;
15 - sdhci,1-bit-only : (optional) specifies that a controller can 15 - sdhci,1-bit-only : (optional) specifies that a controller can
16 only handle 1-bit data transfers. 16 only handle 1-bit data transfers.
17 - sdhci,auto-cmd12: (optional) specifies that a controller can
18 only handle auto CMD12.
17 19
18Example: 20Example:
19 21
diff --git a/Documentation/powerpc/dts-bindings/fsl/spi.txt b/Documentation/powerpc/dts-bindings/fsl/spi.txt
index 80510c018eea..777abd7399d5 100644
--- a/Documentation/powerpc/dts-bindings/fsl/spi.txt
+++ b/Documentation/powerpc/dts-bindings/fsl/spi.txt
@@ -1,7 +1,9 @@
1* SPI (Serial Peripheral Interface) 1* SPI (Serial Peripheral Interface)
2 2
3Required properties: 3Required properties:
4- cell-index : SPI controller index. 4- cell-index : QE SPI subblock index.
5 0: QE subblock SPI1
6 1: QE subblock SPI2
5- compatible : should be "fsl,spi". 7- compatible : should be "fsl,spi".
6- mode : the SPI operation mode, it can be "cpu" or "cpu-qe". 8- mode : the SPI operation mode, it can be "cpu" or "cpu-qe".
7- reg : Offset and length of the register set for the device 9- reg : Offset and length of the register set for the device
@@ -29,3 +31,23 @@ Example:
29 gpios = <&gpio 18 1 // device reg=<0> 31 gpios = <&gpio 18 1 // device reg=<0>
30 &gpio 19 1>; // device reg=<1> 32 &gpio 19 1>; // device reg=<1>
31 }; 33 };
34
35
36* eSPI (Enhanced Serial Peripheral Interface)
37
38Required properties:
39- compatible : should be "fsl,mpc8536-espi".
40- reg : Offset and length of the register set for the device.
41- interrupts : should contain eSPI interrupt, the device has one interrupt.
42- fsl,espi-num-chipselects : the number of the chipselect signals.
43
44Example:
45 spi@110000 {
46 #address-cells = <1>;
47 #size-cells = <0>;
48 compatible = "fsl,mpc8536-espi";
49 reg = <0x110000 0x1000>;
50 interrupts = <53 0x2>;
51 interrupt-parent = <&mpic>;
52 fsl,espi-num-chipselects = <4>;
53 };
diff --git a/Documentation/powerpc/dts-bindings/fsl/usb.txt b/Documentation/powerpc/dts-bindings/fsl/usb.txt
index b00152402694..bd5723f0b67e 100644
--- a/Documentation/powerpc/dts-bindings/fsl/usb.txt
+++ b/Documentation/powerpc/dts-bindings/fsl/usb.txt
@@ -8,6 +8,7 @@ and additions :
8Required properties : 8Required properties :
9 - compatible : Should be "fsl-usb2-mph" for multi port host USB 9 - compatible : Should be "fsl-usb2-mph" for multi port host USB
10 controllers, or "fsl-usb2-dr" for dual role USB controllers 10 controllers, or "fsl-usb2-dr" for dual role USB controllers
11 or "fsl,mpc5121-usb2-dr" for dual role USB controllers of MPC5121
11 - phy_type : For multi port host USB controllers, should be one of 12 - phy_type : For multi port host USB controllers, should be one of
12 "ulpi", or "serial". For dual role USB controllers, should be 13 "ulpi", or "serial". For dual role USB controllers, should be
13 one of "ulpi", "utmi", "utmi_wide", or "serial". 14 one of "ulpi", "utmi", "utmi_wide", or "serial".
@@ -33,6 +34,12 @@ Recommended properties :
33 - interrupt-parent : the phandle for the interrupt controller that 34 - interrupt-parent : the phandle for the interrupt controller that
34 services interrupts for this device. 35 services interrupts for this device.
35 36
37Optional properties :
38 - fsl,invert-drvvbus : boolean; for MPC5121 USB0 only. Indicates the
39 port power polarity of internal PHY signal DRVVBUS is inverted.
40 - fsl,invert-pwr-fault : boolean; for MPC5121 USB0 only. Indicates
41 the PWR_FAULT signal polarity is inverted.
42
36Example multi port host USB controller device node : 43Example multi port host USB controller device node :
37 usb@22000 { 44 usb@22000 {
38 compatible = "fsl-usb2-mph"; 45 compatible = "fsl-usb2-mph";
@@ -57,3 +64,18 @@ Example dual role USB controller device node :
57 dr_mode = "otg"; 64 dr_mode = "otg";
58 phy = "ulpi"; 65 phy = "ulpi";
59 }; 66 };
67
68Example dual role USB controller device node for MPC5121ADS:
69
70 usb@4000 {
71 compatible = "fsl,mpc5121-usb2-dr";
72 reg = <0x4000 0x1000>;
73 #address-cells = <1>;
74 #size-cells = <0>;
75 interrupt-parent = < &ipic >;
76 interrupts = <44 0x8>;
77 dr_mode = "otg";
78 phy_type = "utmi_wide";
79 fsl,invert-drvvbus;
80 fsl,invert-pwr-fault;
81 };
diff --git a/Documentation/powerpc/hvcs.txt b/Documentation/powerpc/hvcs.txt
index f93462c5db25..6d8be3468d7d 100644
--- a/Documentation/powerpc/hvcs.txt
+++ b/Documentation/powerpc/hvcs.txt
@@ -560,7 +560,7 @@ The proper channel for reporting bugs is either through the Linux OS
560distribution company that provided your OS or by posting issues to the 560distribution company that provided your OS or by posting issues to the
561PowerPC development mailing list at: 561PowerPC development mailing list at:
562 562
563linuxppc-dev@ozlabs.org 563linuxppc-dev@lists.ozlabs.org
564 564
565This request is to provide a documented and searchable public exchange 565This request is to provide a documented and searchable public exchange
566of the problems and solutions surrounding this driver for the benefit of 566of the problems and solutions surrounding this driver for the benefit of
diff --git a/Documentation/scsi/scsi-parameters.txt b/Documentation/scsi/scsi-parameters.txt
new file mode 100644
index 000000000000..21e5798526ee
--- /dev/null
+++ b/Documentation/scsi/scsi-parameters.txt
@@ -0,0 +1,139 @@
1 SCSI Kernel Parameters
2 ~~~~~~~~~~~~~~~~~~~~~~
3
4See Documentation/kernel-parameters.txt for general information on
5specifying module parameters.
6
7This document may not be entirely up to date and comprehensive. The command
8"modinfo -p ${modulename}" shows a current list of all parameters of a loadable
9module. Loadable modules, after being loaded into the running kernel, also
10reveal their parameters in /sys/module/${modulename}/parameters/. Some of these
11parameters may be changed at runtime by the command
12"echo -n ${value} > /sys/module/${modulename}/parameters/${parm}".
13
14
15 advansys= [HW,SCSI]
16 See header of drivers/scsi/advansys.c.
17
18 aha152x= [HW,SCSI]
19 See Documentation/scsi/aha152x.txt.
20
21 aha1542= [HW,SCSI]
22 Format: <portbase>[,<buson>,<busoff>[,<dmaspeed>]]
23
24 aic7xxx= [HW,SCSI]
25 See Documentation/scsi/aic7xxx.txt.
26
27 aic79xx= [HW,SCSI]
28 See Documentation/scsi/aic79xx.txt.
29
30 atascsi= [HW,SCSI] Atari SCSI
31
32 BusLogic= [HW,SCSI]
33 See drivers/scsi/BusLogic.c, comment before function
34 BusLogic_ParseDriverOptions().
35
36 dtc3181e= [HW,SCSI]
37
38 eata= [HW,SCSI]
39
40 fd_mcs= [HW,SCSI]
41 See header of drivers/scsi/fd_mcs.c.
42
43 fdomain= [HW,SCSI]
44 See header of drivers/scsi/fdomain.c.
45
46 gdth= [HW,SCSI]
47 See header of drivers/scsi/gdth.c.
48
49 gvp11= [HW,SCSI]
50
51 ibmmcascsi= [HW,MCA,SCSI] IBM MicroChannel SCSI adapter
52 See Documentation/mca.txt.
53
54 in2000= [HW,SCSI]
55 See header of drivers/scsi/in2000.c.
56
57 ips= [HW,SCSI] Adaptec / IBM ServeRAID controller
58 See header of drivers/scsi/ips.c.
59
60 mac5380= [HW,SCSI] Format:
61 <can_queue>,<cmd_per_lun>,<sg_tablesize>,<hostid>,<use_tags>
62
63 max_luns= [SCSI] Maximum number of LUNs to probe.
64 Should be between 1 and 2^32-1.
65
66 max_report_luns=
67 [SCSI] Maximum number of LUNs received.
68 Should be between 1 and 16384.
69
70 NCR_D700= [HW,SCSI]
71 See header of drivers/scsi/NCR_D700.c.
72
73 ncr5380= [HW,SCSI]
74
75 ncr53c400= [HW,SCSI]
76
77 ncr53c400a= [HW,SCSI]
78
79 ncr53c406a= [HW,SCSI]
80
81 ncr53c8xx= [HW,SCSI]
82
83 nodisconnect [HW,SCSI,M68K] Disables SCSI disconnects.
84
85 osst= [HW,SCSI] SCSI Tape Driver
86 Format: <buffer_size>,<write_threshold>
87 See also Documentation/scsi/st.txt.
88
89 pas16= [HW,SCSI]
90 See header of drivers/scsi/pas16.c.
91
92 scsi_debug_*= [SCSI]
93 See drivers/scsi/scsi_debug.c.
94
95 scsi_default_dev_flags=
96 [SCSI] SCSI default device flags
97 Format: <integer>
98
99 scsi_dev_flags= [SCSI] Black/white list entry for vendor and model
100 Format: <vendor>:<model>:<flags>
101 (flags are integer value)
102
103 scsi_logging_level= [SCSI] a bit mask of logging levels
104 See drivers/scsi/scsi_logging.h for bits. Also
105 settable via sysctl at dev.scsi.logging_level
106 (/proc/sys/dev/scsi/logging_level).
107 There is also a nice 'scsi_logging_level' script in the
108 S390-tools package, available for download at
109 http://www-128.ibm.com/developerworks/linux/linux390/s390-tools-1.5.4.html
110
111 scsi_mod.scan= [SCSI] sync (default) scans SCSI busses as they are
112 discovered. async scans them in kernel threads,
113 allowing boot to proceed. none ignores them, expecting
114 user space to do the scan.
115
116 sim710= [SCSI,HW]
117 See header of drivers/scsi/sim710.c.
118
119 st= [HW,SCSI] SCSI tape parameters (buffers, etc.)
120 See Documentation/scsi/st.txt.
121
122 sym53c416= [HW,SCSI]
123 See header of drivers/scsi/sym53c416.c.
124
125 t128= [HW,SCSI]
126 See header of drivers/scsi/t128.c.
127
128 tmscsim= [HW,SCSI]
129 See comment before function dc390_setup() in
130 drivers/scsi/tmscsim.c.
131
132 u14-34f= [HW,SCSI] UltraStor 14F/34F SCSI host adapter
133 See header of drivers/scsi/u14-34f.c.
134
135 wd33c93= [HW,SCSI]
136 See header of drivers/scsi/wd33c93.c.
137
138 wd7000= [HW,SCSI]
139 See header of drivers/scsi/wd7000.c.
diff --git a/Documentation/scsi/st.txt b/Documentation/scsi/st.txt
index 40752602c050..691ca292c24d 100644
--- a/Documentation/scsi/st.txt
+++ b/Documentation/scsi/st.txt
@@ -2,7 +2,7 @@ This file contains brief information about the SCSI tape driver.
2The driver is currently maintained by Kai Mäkisara (email 2The driver is currently maintained by Kai Mäkisara (email
3Kai.Makisara@kolumbus.fi) 3Kai.Makisara@kolumbus.fi)
4 4
5Last modified: Sun Feb 24 21:59:07 2008 by kai.makisara 5Last modified: Sun Aug 29 18:25:47 2010 by kai.makisara
6 6
7 7
8BASICS 8BASICS
@@ -85,6 +85,17 @@ writing and the last operation has been a write. Two filemarks can be
85optionally written. In both cases end of data is signified by 85optionally written. In both cases end of data is signified by
86returning zero bytes for two consecutive reads. 86returning zero bytes for two consecutive reads.
87 87
88Writing filemarks without the immediate bit set in the SCSI command block acts
89as a synchronization point, i.e., all remaining data form the drive buffers is
90written to tape before the command returns. This makes sure that write errors
91are caught at that point, but this takes time. In some applications, several
92consecutive files must be written fast. The MTWEOFI operation can be used to
93write the filemarks without flushing the drive buffer. Writing filemark at
94close() is always flushing the drive buffers. However, if the previous
95operation is MTWEOFI, close() does not write a filemark. This can be used if
96the program wants to close/open the tape device between files and wants to
97skip waiting.
98
88If rewind, offline, bsf, or seek is done and previous tape operation was 99If rewind, offline, bsf, or seek is done and previous tape operation was
89write, a filemark is written before moving tape. 100write, a filemark is written before moving tape.
90 101
@@ -301,6 +312,8 @@ MTBSR Space backward over count records.
301MTFSS Space forward over count setmarks. 312MTFSS Space forward over count setmarks.
302MTBSS Space backward over count setmarks. 313MTBSS Space backward over count setmarks.
303MTWEOF Write count filemarks. 314MTWEOF Write count filemarks.
315MTWEOFI Write count filemarks with immediate bit set (i.e., does not
316 wait until data is on tape)
304MTWSM Write count setmarks. 317MTWSM Write count setmarks.
305MTREW Rewind tape. 318MTREW Rewind tape.
306MTOFFL Set device off line (often rewind plus eject). 319MTOFFL Set device off line (often rewind plus eject).
diff --git a/Documentation/sound/alsa/HD-Audio-Models.txt b/Documentation/sound/alsa/HD-Audio-Models.txt
index 03771d7c5dd7..37c6aad5e590 100644
--- a/Documentation/sound/alsa/HD-Audio-Models.txt
+++ b/Documentation/sound/alsa/HD-Audio-Models.txt
@@ -83,8 +83,8 @@ ALC269
83====== 83======
84 basic Basic preset 84 basic Basic preset
85 quanta Quanta FL1 85 quanta Quanta FL1
86 eeepc-p703 ASUS Eeepc P703 P900A 86 laptop-amic Laptops with analog-mic input
87 eeepc-p901 ASUS Eeepc P901 S101 87 laptop-dmic Laptops with digital-mic input
88 fujitsu FSC Amilo 88 fujitsu FSC Amilo
89 lifebook Fujitsu Lifebook S6420 89 lifebook Fujitsu Lifebook S6420
90 auto auto-config reading BIOS (default) 90 auto auto-config reading BIOS (default)
@@ -109,6 +109,8 @@ ALC662/663/272
109 asus-mode4 ASUS 109 asus-mode4 ASUS
110 asus-mode5 ASUS 110 asus-mode5 ASUS
111 asus-mode6 ASUS 111 asus-mode6 ASUS
112 asus-mode7 ASUS
113 asus-mode8 ASUS
112 dell Dell with ALC272 114 dell Dell with ALC272
113 dell-zm1 Dell ZM1 with ALC272 115 dell-zm1 Dell ZM1 with ALC272
114 samsung-nc10 Samsung NC10 mini notebook 116 samsung-nc10 Samsung NC10 mini notebook
@@ -294,9 +296,12 @@ Conexant 5051
294Conexant 5066 296Conexant 5066
295============= 297=============
296 laptop Basic Laptop config (default) 298 laptop Basic Laptop config (default)
299 hp-laptop HP laptops, e g G60
297 dell-laptop Dell laptops 300 dell-laptop Dell laptops
301 dell-vostro Dell Vostro
298 olpc-xo-1_5 OLPC XO 1.5 302 olpc-xo-1_5 OLPC XO 1.5
299 ideapad Lenovo IdeaPad U150 303 ideapad Lenovo IdeaPad U150
304 thinkpad Lenovo Thinkpad
300 305
301STAC9200 306STAC9200
302======== 307========
@@ -404,6 +409,7 @@ STAC92HD83*
404 mic-ref Reference board with power management for ports 409 mic-ref Reference board with power management for ports
405 dell-s14 Dell laptop 410 dell-s14 Dell laptop
406 hp HP laptops with (inverted) mute-LED 411 hp HP laptops with (inverted) mute-LED
412 hp-dv7-4000 HP dv-7 4000
407 auto BIOS setup (default) 413 auto BIOS setup (default)
408 414
409STAC9872 415STAC9872
@@ -416,3 +422,7 @@ Cirrus Logic CS4206/4207
416 mbp55 MacBook Pro 5,5 422 mbp55 MacBook Pro 5,5
417 imac27 IMac 27 Inch 423 imac27 IMac 27 Inch
418 auto BIOS setup (default) 424 auto BIOS setup (default)
425
426VIA VT17xx/VT18xx/VT20xx
427========================
428 auto BIOS setup (default)
diff --git a/Documentation/usb/proc_usb_info.txt b/Documentation/usb/proc_usb_info.txt
index fafcd4723260..afe596d5f201 100644
--- a/Documentation/usb/proc_usb_info.txt
+++ b/Documentation/usb/proc_usb_info.txt
@@ -1,12 +1,17 @@
1/proc/bus/usb filesystem output 1/proc/bus/usb filesystem output
2=============================== 2===============================
3(version 2003.05.30) 3(version 2010.09.13)
4 4
5 5
6The usbfs filesystem for USB devices is traditionally mounted at 6The usbfs filesystem for USB devices is traditionally mounted at
7/proc/bus/usb. It provides the /proc/bus/usb/devices file, as well as 7/proc/bus/usb. It provides the /proc/bus/usb/devices file, as well as
8the /proc/bus/usb/BBB/DDD files. 8the /proc/bus/usb/BBB/DDD files.
9 9
10In many modern systems the usbfs filsystem isn't used at all. Instead
11USB device nodes are created under /dev/usb/ or someplace similar. The
12"devices" file is available in debugfs, typically as
13/sys/kernel/debug/usb/devices.
14
10 15
11**NOTE**: If /proc/bus/usb appears empty, and a host controller 16**NOTE**: If /proc/bus/usb appears empty, and a host controller
12 driver has been linked, then you need to mount the 17 driver has been linked, then you need to mount the
@@ -106,8 +111,8 @@ Legend:
106 111
107Topology info: 112Topology info:
108 113
109T: Bus=dd Lev=dd Prnt=dd Port=dd Cnt=dd Dev#=ddd Spd=ddd MxCh=dd 114T: Bus=dd Lev=dd Prnt=dd Port=dd Cnt=dd Dev#=ddd Spd=dddd MxCh=dd
110| | | | | | | | |__MaxChildren 115| | | | | | | | |__MaxChildren
111| | | | | | | |__Device Speed in Mbps 116| | | | | | | |__Device Speed in Mbps
112| | | | | | |__DeviceNumber 117| | | | | | |__DeviceNumber
113| | | | | |__Count of devices at this level 118| | | | | |__Count of devices at this level
@@ -120,8 +125,13 @@ T: Bus=dd Lev=dd Prnt=dd Port=dd Cnt=dd Dev#=ddd Spd=ddd MxCh=dd
120 Speed may be: 125 Speed may be:
121 1.5 Mbit/s for low speed USB 126 1.5 Mbit/s for low speed USB
122 12 Mbit/s for full speed USB 127 12 Mbit/s for full speed USB
123 480 Mbit/s for high speed USB (added for USB 2.0) 128 480 Mbit/s for high speed USB (added for USB 2.0);
129 also used for Wireless USB, which has no fixed speed
130 5000 Mbit/s for SuperSpeed USB (added for USB 3.0)
124 131
132 For reasons lost in the mists of time, the Port number is always
133 too low by 1. For example, a device plugged into port 4 will
134 show up with "Port=03".
125 135
126Bandwidth info: 136Bandwidth info:
127B: Alloc=ddd/ddd us (xx%), #Int=ddd, #Iso=ddd 137B: Alloc=ddd/ddd us (xx%), #Int=ddd, #Iso=ddd
@@ -291,7 +301,7 @@ Here's an example, from a system which has a UHCI root hub,
291an external hub connected to the root hub, and a mouse and 301an external hub connected to the root hub, and a mouse and
292a serial converter connected to the external hub. 302a serial converter connected to the external hub.
293 303
294T: Bus=00 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#= 1 Spd=12 MxCh= 2 304T: Bus=00 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#= 1 Spd=12 MxCh= 2
295B: Alloc= 28/900 us ( 3%), #Int= 2, #Iso= 0 305B: Alloc= 28/900 us ( 3%), #Int= 2, #Iso= 0
296D: Ver= 1.00 Cls=09(hub ) Sub=00 Prot=00 MxPS= 8 #Cfgs= 1 306D: Ver= 1.00 Cls=09(hub ) Sub=00 Prot=00 MxPS= 8 #Cfgs= 1
297P: Vendor=0000 ProdID=0000 Rev= 0.00 307P: Vendor=0000 ProdID=0000 Rev= 0.00
@@ -301,21 +311,21 @@ C:* #Ifs= 1 Cfg#= 1 Atr=40 MxPwr= 0mA
301I: If#= 0 Alt= 0 #EPs= 1 Cls=09(hub ) Sub=00 Prot=00 Driver=hub 311I: If#= 0 Alt= 0 #EPs= 1 Cls=09(hub ) Sub=00 Prot=00 Driver=hub
302E: Ad=81(I) Atr=03(Int.) MxPS= 8 Ivl=255ms 312E: Ad=81(I) Atr=03(Int.) MxPS= 8 Ivl=255ms
303 313
304T: Bus=00 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 2 Spd=12 MxCh= 4 314T: Bus=00 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 2 Spd=12 MxCh= 4
305D: Ver= 1.00 Cls=09(hub ) Sub=00 Prot=00 MxPS= 8 #Cfgs= 1 315D: Ver= 1.00 Cls=09(hub ) Sub=00 Prot=00 MxPS= 8 #Cfgs= 1
306P: Vendor=0451 ProdID=1446 Rev= 1.00 316P: Vendor=0451 ProdID=1446 Rev= 1.00
307C:* #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr=100mA 317C:* #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr=100mA
308I: If#= 0 Alt= 0 #EPs= 1 Cls=09(hub ) Sub=00 Prot=00 Driver=hub 318I: If#= 0 Alt= 0 #EPs= 1 Cls=09(hub ) Sub=00 Prot=00 Driver=hub
309E: Ad=81(I) Atr=03(Int.) MxPS= 1 Ivl=255ms 319E: Ad=81(I) Atr=03(Int.) MxPS= 1 Ivl=255ms
310 320
311T: Bus=00 Lev=02 Prnt=02 Port=00 Cnt=01 Dev#= 3 Spd=1.5 MxCh= 0 321T: Bus=00 Lev=02 Prnt=02 Port=00 Cnt=01 Dev#= 3 Spd=1.5 MxCh= 0
312D: Ver= 1.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS= 8 #Cfgs= 1 322D: Ver= 1.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS= 8 #Cfgs= 1
313P: Vendor=04b4 ProdID=0001 Rev= 0.00 323P: Vendor=04b4 ProdID=0001 Rev= 0.00
314C:* #Ifs= 1 Cfg#= 1 Atr=80 MxPwr=100mA 324C:* #Ifs= 1 Cfg#= 1 Atr=80 MxPwr=100mA
315I: If#= 0 Alt= 0 #EPs= 1 Cls=03(HID ) Sub=01 Prot=02 Driver=mouse 325I: If#= 0 Alt= 0 #EPs= 1 Cls=03(HID ) Sub=01 Prot=02 Driver=mouse
316E: Ad=81(I) Atr=03(Int.) MxPS= 3 Ivl= 10ms 326E: Ad=81(I) Atr=03(Int.) MxPS= 3 Ivl= 10ms
317 327
318T: Bus=00 Lev=02 Prnt=02 Port=02 Cnt=02 Dev#= 4 Spd=12 MxCh= 0 328T: Bus=00 Lev=02 Prnt=02 Port=02 Cnt=02 Dev#= 4 Spd=12 MxCh= 0
319D: Ver= 1.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS= 8 #Cfgs= 1 329D: Ver= 1.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS= 8 #Cfgs= 1
320P: Vendor=0565 ProdID=0001 Rev= 1.08 330P: Vendor=0565 ProdID=0001 Rev= 1.08
321S: Manufacturer=Peracom Networks, Inc. 331S: Manufacturer=Peracom Networks, Inc.
@@ -330,12 +340,12 @@ E: Ad=82(I) Atr=03(Int.) MxPS= 8 Ivl= 8ms
330Selecting only the "T:" and "I:" lines from this (for example, by using 340Selecting only the "T:" and "I:" lines from this (for example, by using
331"procusb ti"), we have: 341"procusb ti"), we have:
332 342
333T: Bus=00 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#= 1 Spd=12 MxCh= 2 343T: Bus=00 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#= 1 Spd=12 MxCh= 2
334T: Bus=00 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 2 Spd=12 MxCh= 4 344T: Bus=00 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 2 Spd=12 MxCh= 4
335I: If#= 0 Alt= 0 #EPs= 1 Cls=09(hub ) Sub=00 Prot=00 Driver=hub 345I: If#= 0 Alt= 0 #EPs= 1 Cls=09(hub ) Sub=00 Prot=00 Driver=hub
336T: Bus=00 Lev=02 Prnt=02 Port=00 Cnt=01 Dev#= 3 Spd=1.5 MxCh= 0 346T: Bus=00 Lev=02 Prnt=02 Port=00 Cnt=01 Dev#= 3 Spd=1.5 MxCh= 0
337I: If#= 0 Alt= 0 #EPs= 1 Cls=03(HID ) Sub=01 Prot=02 Driver=mouse 347I: If#= 0 Alt= 0 #EPs= 1 Cls=03(HID ) Sub=01 Prot=02 Driver=mouse
338T: Bus=00 Lev=02 Prnt=02 Port=02 Cnt=02 Dev#= 4 Spd=12 MxCh= 0 348T: Bus=00 Lev=02 Prnt=02 Port=02 Cnt=02 Dev#= 4 Spd=12 MxCh= 0
339I: If#= 0 Alt= 0 #EPs= 3 Cls=00(>ifc ) Sub=00 Prot=00 Driver=serial 349I: If#= 0 Alt= 0 #EPs= 3 Cls=00(>ifc ) Sub=00 Prot=00 Driver=serial
340 350
341 351
diff --git a/Documentation/vm/page-types.c b/Documentation/vm/page-types.c
index ccd951fa94ee..cc96ee2666f2 100644
--- a/Documentation/vm/page-types.c
+++ b/Documentation/vm/page-types.c
@@ -478,7 +478,7 @@ static void prepare_hwpoison_fd(void)
478 } 478 }
479 479
480 if (opt_unpoison && !hwpoison_forget_fd) { 480 if (opt_unpoison && !hwpoison_forget_fd) {
481 sprintf(buf, "%s/renew-pfn", hwpoison_debug_fs); 481 sprintf(buf, "%s/unpoison-pfn", hwpoison_debug_fs);
482 hwpoison_forget_fd = checked_open(buf, O_WRONLY); 482 hwpoison_forget_fd = checked_open(buf, O_WRONLY);
483 } 483 }
484} 484}
diff --git a/Documentation/workqueue.txt b/Documentation/workqueue.txt
new file mode 100644
index 000000000000..996a27d9b8db
--- /dev/null
+++ b/Documentation/workqueue.txt
@@ -0,0 +1,381 @@
1
2Concurrency Managed Workqueue (cmwq)
3
4September, 2010 Tejun Heo <tj@kernel.org>
5 Florian Mickler <florian@mickler.org>
6
7CONTENTS
8
91. Introduction
102. Why cmwq?
113. The Design
124. Application Programming Interface (API)
135. Example Execution Scenarios
146. Guidelines
15
16
171. Introduction
18
19There are many cases where an asynchronous process execution context
20is needed and the workqueue (wq) API is the most commonly used
21mechanism for such cases.
22
23When such an asynchronous execution context is needed, a work item
24describing which function to execute is put on a queue. An
25independent thread serves as the asynchronous execution context. The
26queue is called workqueue and the thread is called worker.
27
28While there are work items on the workqueue the worker executes the
29functions associated with the work items one after the other. When
30there is no work item left on the workqueue the worker becomes idle.
31When a new work item gets queued, the worker begins executing again.
32
33
342. Why cmwq?
35
36In the original wq implementation, a multi threaded (MT) wq had one
37worker thread per CPU and a single threaded (ST) wq had one worker
38thread system-wide. A single MT wq needed to keep around the same
39number of workers as the number of CPUs. The kernel grew a lot of MT
40wq users over the years and with the number of CPU cores continuously
41rising, some systems saturated the default 32k PID space just booting
42up.
43
44Although MT wq wasted a lot of resource, the level of concurrency
45provided was unsatisfactory. The limitation was common to both ST and
46MT wq albeit less severe on MT. Each wq maintained its own separate
47worker pool. A MT wq could provide only one execution context per CPU
48while a ST wq one for the whole system. Work items had to compete for
49those very limited execution contexts leading to various problems
50including proneness to deadlocks around the single execution context.
51
52The tension between the provided level of concurrency and resource
53usage also forced its users to make unnecessary tradeoffs like libata
54choosing to use ST wq for polling PIOs and accepting an unnecessary
55limitation that no two polling PIOs can progress at the same time. As
56MT wq don't provide much better concurrency, users which require
57higher level of concurrency, like async or fscache, had to implement
58their own thread pool.
59
60Concurrency Managed Workqueue (cmwq) is a reimplementation of wq with
61focus on the following goals.
62
63* Maintain compatibility with the original workqueue API.
64
65* Use per-CPU unified worker pools shared by all wq to provide
66 flexible level of concurrency on demand without wasting a lot of
67 resource.
68
69* Automatically regulate worker pool and level of concurrency so that
70 the API users don't need to worry about such details.
71
72
733. The Design
74
75In order to ease the asynchronous execution of functions a new
76abstraction, the work item, is introduced.
77
78A work item is a simple struct that holds a pointer to the function
79that is to be executed asynchronously. Whenever a driver or subsystem
80wants a function to be executed asynchronously it has to set up a work
81item pointing to that function and queue that work item on a
82workqueue.
83
84Special purpose threads, called worker threads, execute the functions
85off of the queue, one after the other. If no work is queued, the
86worker threads become idle. These worker threads are managed in so
87called thread-pools.
88
89The cmwq design differentiates between the user-facing workqueues that
90subsystems and drivers queue work items on and the backend mechanism
91which manages thread-pool and processes the queued work items.
92
93The backend is called gcwq. There is one gcwq for each possible CPU
94and one gcwq to serve work items queued on unbound workqueues.
95
96Subsystems and drivers can create and queue work items through special
97workqueue API functions as they see fit. They can influence some
98aspects of the way the work items are executed by setting flags on the
99workqueue they are putting the work item on. These flags include
100things like CPU locality, reentrancy, concurrency limits and more. To
101get a detailed overview refer to the API description of
102alloc_workqueue() below.
103
104When a work item is queued to a workqueue, the target gcwq is
105determined according to the queue parameters and workqueue attributes
106and appended on the shared worklist of the gcwq. For example, unless
107specifically overridden, a work item of a bound workqueue will be
108queued on the worklist of exactly that gcwq that is associated to the
109CPU the issuer is running on.
110
111For any worker pool implementation, managing the concurrency level
112(how many execution contexts are active) is an important issue. cmwq
113tries to keep the concurrency at a minimal but sufficient level.
114Minimal to save resources and sufficient in that the system is used at
115its full capacity.
116
117Each gcwq bound to an actual CPU implements concurrency management by
118hooking into the scheduler. The gcwq is notified whenever an active
119worker wakes up or sleeps and keeps track of the number of the
120currently runnable workers. Generally, work items are not expected to
121hog a CPU and consume many cycles. That means maintaining just enough
122concurrency to prevent work processing from stalling should be
123optimal. As long as there are one or more runnable workers on the
124CPU, the gcwq doesn't start execution of a new work, but, when the
125last running worker goes to sleep, it immediately schedules a new
126worker so that the CPU doesn't sit idle while there are pending work
127items. This allows using a minimal number of workers without losing
128execution bandwidth.
129
130Keeping idle workers around doesn't cost other than the memory space
131for kthreads, so cmwq holds onto idle ones for a while before killing
132them.
133
134For an unbound wq, the above concurrency management doesn't apply and
135the gcwq for the pseudo unbound CPU tries to start executing all work
136items as soon as possible. The responsibility of regulating
137concurrency level is on the users. There is also a flag to mark a
138bound wq to ignore the concurrency management. Please refer to the
139API section for details.
140
141Forward progress guarantee relies on that workers can be created when
142more execution contexts are necessary, which in turn is guaranteed
143through the use of rescue workers. All work items which might be used
144on code paths that handle memory reclaim are required to be queued on
145wq's that have a rescue-worker reserved for execution under memory
146pressure. Else it is possible that the thread-pool deadlocks waiting
147for execution contexts to free up.
148
149
1504. Application Programming Interface (API)
151
152alloc_workqueue() allocates a wq. The original create_*workqueue()
153functions are deprecated and scheduled for removal. alloc_workqueue()
154takes three arguments - @name, @flags and @max_active. @name is the
155name of the wq and also used as the name of the rescuer thread if
156there is one.
157
158A wq no longer manages execution resources but serves as a domain for
159forward progress guarantee, flush and work item attributes. @flags
160and @max_active control how work items are assigned execution
161resources, scheduled and executed.
162
163@flags:
164
165 WQ_NON_REENTRANT
166
167 By default, a wq guarantees non-reentrance only on the same
168 CPU. A work item may not be executed concurrently on the same
169 CPU by multiple workers but is allowed to be executed
170 concurrently on multiple CPUs. This flag makes sure
171 non-reentrance is enforced across all CPUs. Work items queued
172 to a non-reentrant wq are guaranteed to be executed by at most
173 one worker system-wide at any given time.
174
175 WQ_UNBOUND
176
177 Work items queued to an unbound wq are served by a special
178 gcwq which hosts workers which are not bound to any specific
179 CPU. This makes the wq behave as a simple execution context
180 provider without concurrency management. The unbound gcwq
181 tries to start execution of work items as soon as possible.
182 Unbound wq sacrifices locality but is useful for the following
183 cases.
184
185 * Wide fluctuation in the concurrency level requirement is
186 expected and using bound wq may end up creating large number
187 of mostly unused workers across different CPUs as the issuer
188 hops through different CPUs.
189
190 * Long running CPU intensive workloads which can be better
191 managed by the system scheduler.
192
193 WQ_FREEZEABLE
194
195 A freezeable wq participates in the freeze phase of the system
196 suspend operations. Work items on the wq are drained and no
197 new work item starts execution until thawed.
198
199 WQ_MEM_RECLAIM
200
201 All wq which might be used in the memory reclaim paths _MUST_
202 have this flag set. The wq is guaranteed to have at least one
203 execution context regardless of memory pressure.
204
205 WQ_HIGHPRI
206
207 Work items of a highpri wq are queued at the head of the
208 worklist of the target gcwq and start execution regardless of
209 the current concurrency level. In other words, highpri work
210 items will always start execution as soon as execution
211 resource is available.
212
213 Ordering among highpri work items is preserved - a highpri
214 work item queued after another highpri work item will start
215 execution after the earlier highpri work item starts.
216
217 Although highpri work items are not held back by other
218 runnable work items, they still contribute to the concurrency
219 level. Highpri work items in runnable state will prevent
220 non-highpri work items from starting execution.
221
222 This flag is meaningless for unbound wq.
223
224 WQ_CPU_INTENSIVE
225
226 Work items of a CPU intensive wq do not contribute to the
227 concurrency level. In other words, runnable CPU intensive
228 work items will not prevent other work items from starting
229 execution. This is useful for bound work items which are
230 expected to hog CPU cycles so that their execution is
231 regulated by the system scheduler.
232
233 Although CPU intensive work items don't contribute to the
234 concurrency level, start of their executions is still
235 regulated by the concurrency management and runnable
236 non-CPU-intensive work items can delay execution of CPU
237 intensive work items.
238
239 This flag is meaningless for unbound wq.
240
241 WQ_HIGHPRI | WQ_CPU_INTENSIVE
242
243 This combination makes the wq avoid interaction with
244 concurrency management completely and behave as a simple
245 per-CPU execution context provider. Work items queued on a
246 highpri CPU-intensive wq start execution as soon as resources
247 are available and don't affect execution of other work items.
248
249@max_active:
250
251@max_active determines the maximum number of execution contexts per
252CPU which can be assigned to the work items of a wq. For example,
253with @max_active of 16, at most 16 work items of the wq can be
254executing at the same time per CPU.
255
256Currently, for a bound wq, the maximum limit for @max_active is 512
257and the default value used when 0 is specified is 256. For an unbound
258wq, the limit is higher of 512 and 4 * num_possible_cpus(). These
259values are chosen sufficiently high such that they are not the
260limiting factor while providing protection in runaway cases.
261
262The number of active work items of a wq is usually regulated by the
263users of the wq, more specifically, by how many work items the users
264may queue at the same time. Unless there is a specific need for
265throttling the number of active work items, specifying '0' is
266recommended.
267
268Some users depend on the strict execution ordering of ST wq. The
269combination of @max_active of 1 and WQ_UNBOUND is used to achieve this
270behavior. Work items on such wq are always queued to the unbound gcwq
271and only one work item can be active at any given time thus achieving
272the same ordering property as ST wq.
273
274
2755. Example Execution Scenarios
276
277The following example execution scenarios try to illustrate how cmwq
278behave under different configurations.
279
280 Work items w0, w1, w2 are queued to a bound wq q0 on the same CPU.
281 w0 burns CPU for 5ms then sleeps for 10ms then burns CPU for 5ms
282 again before finishing. w1 and w2 burn CPU for 5ms then sleep for
283 10ms.
284
285Ignoring all other tasks, works and processing overhead, and assuming
286simple FIFO scheduling, the following is one highly simplified version
287of possible sequences of events with the original wq.
288
289 TIME IN MSECS EVENT
290 0 w0 starts and burns CPU
291 5 w0 sleeps
292 15 w0 wakes up and burns CPU
293 20 w0 finishes
294 20 w1 starts and burns CPU
295 25 w1 sleeps
296 35 w1 wakes up and finishes
297 35 w2 starts and burns CPU
298 40 w2 sleeps
299 50 w2 wakes up and finishes
300
301And with cmwq with @max_active >= 3,
302
303 TIME IN MSECS EVENT
304 0 w0 starts and burns CPU
305 5 w0 sleeps
306 5 w1 starts and burns CPU
307 10 w1 sleeps
308 10 w2 starts and burns CPU
309 15 w2 sleeps
310 15 w0 wakes up and burns CPU
311 20 w0 finishes
312 20 w1 wakes up and finishes
313 25 w2 wakes up and finishes
314
315If @max_active == 2,
316
317 TIME IN MSECS EVENT
318 0 w0 starts and burns CPU
319 5 w0 sleeps
320 5 w1 starts and burns CPU
321 10 w1 sleeps
322 15 w0 wakes up and burns CPU
323 20 w0 finishes
324 20 w1 wakes up and finishes
325 20 w2 starts and burns CPU
326 25 w2 sleeps
327 35 w2 wakes up and finishes
328
329Now, let's assume w1 and w2 are queued to a different wq q1 which has
330WQ_HIGHPRI set,
331
332 TIME IN MSECS EVENT
333 0 w1 and w2 start and burn CPU
334 5 w1 sleeps
335 10 w2 sleeps
336 10 w0 starts and burns CPU
337 15 w0 sleeps
338 15 w1 wakes up and finishes
339 20 w2 wakes up and finishes
340 25 w0 wakes up and burns CPU
341 30 w0 finishes
342
343If q1 has WQ_CPU_INTENSIVE set,
344
345 TIME IN MSECS EVENT
346 0 w0 starts and burns CPU
347 5 w0 sleeps
348 5 w1 and w2 start and burn CPU
349 10 w1 sleeps
350 15 w2 sleeps
351 15 w0 wakes up and burns CPU
352 20 w0 finishes
353 20 w1 wakes up and finishes
354 25 w2 wakes up and finishes
355
356
3576. Guidelines
358
359* Do not forget to use WQ_MEM_RECLAIM if a wq may process work items
360 which are used during memory reclaim. Each wq with WQ_MEM_RECLAIM
361 set has an execution context reserved for it. If there is
362 dependency among multiple work items used during memory reclaim,
363 they should be queued to separate wq each with WQ_MEM_RECLAIM.
364
365* Unless strict ordering is required, there is no need to use ST wq.
366
367* Unless there is a specific need, using 0 for @max_active is
368 recommended. In most use cases, concurrency level usually stays
369 well under the default limit.
370
371* A wq serves as a domain for forward progress guarantee
372 (WQ_MEM_RECLAIM, flush and work item attributes. Work items which
373 are not involved in memory reclaim and don't need to be flushed as a
374 part of a group of work items, and don't require any special
375 attribute, can use one of the system wq. There is no difference in
376 execution characteristics between using a dedicated wq and a system
377 wq.
378
379* Unless work items are expected to consume a huge amount of CPU
380 cycles, using a bound wq is usually beneficial due to the increased
381 level of locality in wq operations and work item execution.
diff --git a/Documentation/x86/x86_64/kernel-stacks b/Documentation/x86/x86_64/kernel-stacks
index 5ad65d51fb95..a01eec5d1d0b 100644
--- a/Documentation/x86/x86_64/kernel-stacks
+++ b/Documentation/x86/x86_64/kernel-stacks
@@ -18,9 +18,9 @@ specialized stacks contain no useful data. The main CPU stacks are:
18 Used for external hardware interrupts. If this is the first external 18 Used for external hardware interrupts. If this is the first external
19 hardware interrupt (i.e. not a nested hardware interrupt) then the 19 hardware interrupt (i.e. not a nested hardware interrupt) then the
20 kernel switches from the current task to the interrupt stack. Like 20 kernel switches from the current task to the interrupt stack. Like
21 the split thread and interrupt stacks on i386 (with CONFIG_4KSTACKS), 21 the split thread and interrupt stacks on i386, this gives more room
22 this gives more room for kernel interrupt processing without having 22 for kernel interrupt processing without having to increase the size
23 to increase the size of every per thread stack. 23 of every per thread stack.
24 24
25 The interrupt stack is also used when processing a softirq. 25 The interrupt stack is also used when processing a softirq.
26 26