aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation
diff options
context:
space:
mode:
Diffstat (limited to 'Documentation')
-rw-r--r--Documentation/ABI/testing/sysfs-bus-rbd83
-rw-r--r--Documentation/ABI/testing/sysfs-class-led9
-rw-r--r--Documentation/ABI/testing/sysfs-class-net-batman-adv14
-rw-r--r--Documentation/ABI/testing/sysfs-class-net-mesh69
-rw-r--r--Documentation/ABI/testing/sysfs-driver-hid-roccat-kone16
-rw-r--r--Documentation/ABI/testing/sysfs-driver-hid-roccat-koneplus108
-rw-r--r--Documentation/ABI/testing/sysfs-driver-hid-roccat-pyra18
-rw-r--r--Documentation/ABI/testing/sysfs-platform-asus-laptop16
-rw-r--r--Documentation/ABI/testing/sysfs-platform-eeepc-wmi10
-rw-r--r--Documentation/ABI/testing/sysfs-platform-ideapad-laptop6
-rw-r--r--Documentation/ABI/testing/sysfs-tty19
-rw-r--r--Documentation/DocBook/80211.tmpl70
-rw-r--r--Documentation/DocBook/device-drivers.tmpl4
-rw-r--r--Documentation/DocBook/mtdnand.tmpl2
-rw-r--r--Documentation/DocBook/sh.tmpl4
-rw-r--r--Documentation/DocBook/uio-howto.tmpl6
-rw-r--r--Documentation/DocBook/v4l/func-ioctl.xml5
-rw-r--r--Documentation/DocBook/v4l/pixfmt.xml4
-rw-r--r--Documentation/Makefile2
-rw-r--r--Documentation/RCU/trace.txt144
-rw-r--r--Documentation/accounting/getdelays.c1
-rw-r--r--Documentation/arm/00-INDEX2
-rw-r--r--Documentation/arm/OMAP/omap_pm25
-rw-r--r--Documentation/arm/swp_emulation27
-rw-r--r--Documentation/cgroups/cgroup_event_listener.c2
-rw-r--r--Documentation/cgroups/cgroups.txt8
-rw-r--r--Documentation/cgroups/memcg_test.txt2
-rw-r--r--Documentation/coccinelle.txt4
-rw-r--r--Documentation/development-process/2.Process33
-rw-r--r--Documentation/dontdiff26
-rw-r--r--Documentation/driver-model/interface.txt129
-rw-r--r--Documentation/dvb/lmedm04.txt2
-rw-r--r--Documentation/edac.txt8
-rw-r--r--Documentation/email-clients.txt50
-rw-r--r--Documentation/fb/00-INDEX32
-rw-r--r--Documentation/fb/udlfb.txt144
-rw-r--r--Documentation/feature-removal-schedule.txt84
-rw-r--r--Documentation/filesystems/Locking246
-rw-r--r--Documentation/filesystems/configfs/configfs_example_explicit.c2
-rw-r--r--Documentation/filesystems/dentry-locking.txt174
-rw-r--r--Documentation/filesystems/ntfs.txt3
-rw-r--r--Documentation/filesystems/path-lookup.txt382
-rw-r--r--Documentation/filesystems/porting78
-rw-r--r--Documentation/filesystems/proc.txt24
-rw-r--r--Documentation/filesystems/vfs.txt90
-rw-r--r--Documentation/gpio.txt12
-rw-r--r--Documentation/hwmon/adm92402
-rw-r--r--Documentation/hwmon/ads78282
-rw-r--r--Documentation/hwmon/dme173712
-rw-r--r--Documentation/hwmon/ds62034
-rw-r--r--Documentation/hwmon/lm932
-rw-r--r--Documentation/hwmon/max66502
-rw-r--r--Documentation/hwmon/sht2149
-rw-r--r--Documentation/hwmon/sysfs-interface49
-rw-r--r--Documentation/hwmon/w83627hf22
-rw-r--r--Documentation/hwmon/w837932
-rw-r--r--Documentation/i2c/muxes/gpio-i2cmux65
-rw-r--r--Documentation/input/cma3000_d0x.txt115
-rw-r--r--Documentation/input/ff.txt4
-rw-r--r--Documentation/input/multi-touch-protocol.txt53
-rw-r--r--Documentation/ioctl/ioctl-number.txt8
-rw-r--r--Documentation/iostats.txt2
-rw-r--r--Documentation/kbuild/kbuild.txt8
-rw-r--r--Documentation/kbuild/kconfig-language.txt7
-rw-r--r--Documentation/kbuild/makefiles.txt15
-rw-r--r--Documentation/kdump/kdump.txt15
-rw-r--r--Documentation/kernel-docs.txt27
-rw-r--r--Documentation/kernel-parameters.txt50
-rw-r--r--Documentation/keys-trusted-encrypted.txt145
-rw-r--r--Documentation/ko_KR/HOWTO4
-rw-r--r--Documentation/kprobes.txt2
-rw-r--r--Documentation/kvm/api.txt180
-rw-r--r--Documentation/kvm/cpuid.txt3
-rw-r--r--Documentation/kvm/msr.txt36
-rw-r--r--Documentation/lguest/lguest.txt7
-rw-r--r--Documentation/magic-number.txt2
-rw-r--r--Documentation/make/headers_install.txt5
-rw-r--r--Documentation/networking/LICENSE.qlcnic327
-rw-r--r--Documentation/networking/batman-adv.txt240
-rw-r--r--Documentation/networking/bridge.txt4
-rw-r--r--Documentation/networking/caif/spi_porting.txt2
-rw-r--r--Documentation/networking/dccp.txt25
-rw-r--r--Documentation/networking/e100.txt19
-rw-r--r--Documentation/networking/e1000.txt16
-rw-r--r--Documentation/networking/e1000e.txt52
-rw-r--r--Documentation/networking/generic_netlink.txt2
-rw-r--r--Documentation/networking/igb.txt35
-rw-r--r--Documentation/networking/igbvf.txt6
-rw-r--r--Documentation/networking/ip-sysctl.txt29
-rw-r--r--Documentation/networking/ixgb.txt10
-rw-r--r--Documentation/networking/ixgbe.txt213
-rw-r--r--Documentation/networking/ixgbevf.txt4
-rw-r--r--Documentation/networking/stmmac.txt48
-rw-r--r--Documentation/nfc/nfc-pn544.txt114
-rw-r--r--Documentation/power/drivers-testing.txt8
-rw-r--r--Documentation/power/opp.txt3
-rw-r--r--Documentation/power/runtime_pm.txt35
-rw-r--r--Documentation/powerpc/booting-without-of.txt6
-rw-r--r--Documentation/powerpc/dts-bindings/4xx/cpm.txt52
-rw-r--r--Documentation/powerpc/dts-bindings/eeprom.txt28
-rw-r--r--Documentation/pps/pps.txt46
-rw-r--r--Documentation/scheduler/00-INDEX2
-rw-r--r--Documentation/scsi/ChangeLog.lpfc2
-rw-r--r--Documentation/scsi/ChangeLog.megaraid_sas22
-rw-r--r--Documentation/scsi/scsi_mid_low_api.txt59
-rw-r--r--Documentation/serial/00-INDEX2
-rw-r--r--Documentation/serial/serial-rs485.txt120
-rw-r--r--Documentation/serial/tty.txt2
-rw-r--r--Documentation/sh/clk.txt32
-rw-r--r--Documentation/sound/alsa/ALSA-Configuration.txt20
-rw-r--r--Documentation/sound/alsa/HD-Audio-Models.txt1
-rw-r--r--Documentation/spi/pxa2xx4
-rw-r--r--Documentation/sysctl/00-INDEX2
-rw-r--r--Documentation/sysctl/kernel.txt16
-rw-r--r--Documentation/timers/timer_stats.txt2
-rw-r--r--Documentation/trace/events-power.txt90
-rw-r--r--Documentation/trace/events.txt8
-rw-r--r--Documentation/trace/postprocess/trace-vmscan-postprocess.pl11
-rw-r--r--Documentation/usb/power-management.txt113
-rw-r--r--Documentation/video4linux/CARDLIST.em28xx6
-rw-r--r--Documentation/video4linux/CARDLIST.saa71342
-rw-r--r--Documentation/video4linux/Makefile8
-rw-r--r--Documentation/video4linux/README.cpia191
-rw-r--r--Documentation/video4linux/Zoran74
-rw-r--r--Documentation/video4linux/bttv/Cards4
-rw-r--r--Documentation/video4linux/gspca.txt1
-rw-r--r--Documentation/video4linux/meye.txt10
-rw-r--r--Documentation/video4linux/v4lgrab.c201
-rw-r--r--Documentation/video4linux/videobuf7
-rw-r--r--Documentation/vm/Makefile2
-rw-r--r--Documentation/vm/slabinfo.c1364
-rw-r--r--Documentation/w1/slaves/00-INDEX2
-rw-r--r--Documentation/w1/slaves/w1_ds242347
-rw-r--r--Documentation/x86/boot.txt7
-rw-r--r--Documentation/xz.txt121
-rw-r--r--Documentation/zh_CN/HOWTO4
-rw-r--r--Documentation/zh_CN/SubmittingDrivers2
137 files changed, 4130 insertions, 2883 deletions
diff --git a/Documentation/ABI/testing/sysfs-bus-rbd b/Documentation/ABI/testing/sysfs-bus-rbd
new file mode 100644
index 000000000000..90a87e2a572b
--- /dev/null
+++ b/Documentation/ABI/testing/sysfs-bus-rbd
@@ -0,0 +1,83 @@
1What: /sys/bus/rbd/
2Date: November 2010
3Contact: Yehuda Sadeh <yehuda@hq.newdream.net>,
4 Sage Weil <sage@newdream.net>
5Description:
6
7Being used for adding and removing rbd block devices.
8
9Usage: <mon ip addr> <options> <pool name> <rbd image name> [snap name]
10
11 $ echo "192.168.0.1 name=admin rbd foo" > /sys/bus/rbd/add
12
13The snapshot name can be "-" or omitted to map the image read/write. A <dev-id>
14will be assigned for any registered block device. If snapshot is used, it will
15be mapped read-only.
16
17Removal of a device:
18
19 $ echo <dev-id> > /sys/bus/rbd/remove
20
21Entries under /sys/bus/rbd/devices/<dev-id>/
22--------------------------------------------
23
24client_id
25
26 The ceph unique client id that was assigned for this specific session.
27
28major
29
30 The block device major number.
31
32name
33
34 The name of the rbd image.
35
36pool
37
38 The pool where this rbd image resides. The pool-name pair is unique
39 per rados system.
40
41size
42
43 The size (in bytes) of the mapped block device.
44
45refresh
46
47 Writing to this file will reread the image header data and set
48 all relevant datastructures accordingly.
49
50current_snap
51
52 The current snapshot for which the device is mapped.
53
54create_snap
55
56 Create a snapshot:
57
58 $ echo <snap-name> > /sys/bus/rbd/devices/<dev-id>/snap_create
59
60rollback_snap
61
62 Rolls back data to the specified snapshot. This goes over the entire
63 list of rados blocks and sends a rollback command to each.
64
65 $ echo <snap-name> > /sys/bus/rbd/devices/<dev-id>/snap_rollback
66
67snap_*
68
69 A directory per each snapshot
70
71
72Entries under /sys/bus/rbd/devices/<dev-id>/snap_<snap-name>
73-------------------------------------------------------------
74
75id
76
77 The rados internal snapshot id assigned for this snapshot
78
79size
80
81 The size of the image when this snapshot was taken.
82
83
diff --git a/Documentation/ABI/testing/sysfs-class-led b/Documentation/ABI/testing/sysfs-class-led
index 9e4541d71cb6..edff6630c805 100644
--- a/Documentation/ABI/testing/sysfs-class-led
+++ b/Documentation/ABI/testing/sysfs-class-led
@@ -26,3 +26,12 @@ Description:
26 scheduler is chosen. Trigger specific parameters can appear in 26 scheduler is chosen. Trigger specific parameters can appear in
27 /sys/class/leds/<led> once a given trigger is selected. 27 /sys/class/leds/<led> once a given trigger is selected.
28 28
29What: /sys/class/leds/<led>/inverted
30Date: January 2011
31KernelVersion: 2.6.38
32Contact: Richard Purdie <rpurdie@rpsys.net>
33Description:
34 Invert the LED on/off state. This parameter is specific to
35 gpio and backlight triggers. In case of the backlight trigger,
36 it is usefull when driving a LED which is intended to indicate
37 a device in a standby like state.
diff --git a/Documentation/ABI/testing/sysfs-class-net-batman-adv b/Documentation/ABI/testing/sysfs-class-net-batman-adv
new file mode 100644
index 000000000000..38dd762def4b
--- /dev/null
+++ b/Documentation/ABI/testing/sysfs-class-net-batman-adv
@@ -0,0 +1,14 @@
1
2What: /sys/class/net/<iface>/batman-adv/mesh_iface
3Date: May 2010
4Contact: Marek Lindner <lindner_marek@yahoo.de>
5Description:
6 The /sys/class/net/<iface>/batman-adv/mesh_iface file
7 displays the batman mesh interface this <iface>
8 currently is associated with.
9
10What: /sys/class/net/<iface>/batman-adv/iface_status
11Date: May 2010
12Contact: Marek Lindner <lindner_marek@yahoo.de>
13Description:
14 Indicates the status of <iface> as it is seen by batman.
diff --git a/Documentation/ABI/testing/sysfs-class-net-mesh b/Documentation/ABI/testing/sysfs-class-net-mesh
new file mode 100644
index 000000000000..748fe1701d25
--- /dev/null
+++ b/Documentation/ABI/testing/sysfs-class-net-mesh
@@ -0,0 +1,69 @@
1
2What: /sys/class/net/<mesh_iface>/mesh/aggregated_ogms
3Date: May 2010
4Contact: Marek Lindner <lindner_marek@yahoo.de>
5Description:
6 Indicates whether the batman protocol messages of the
7 mesh <mesh_iface> shall be aggregated or not.
8
9What: /sys/class/net/<mesh_iface>/mesh/bonding
10Date: June 2010
11Contact: Simon Wunderlich <siwu@hrz.tu-chemnitz.de>
12Description:
13 Indicates whether the data traffic going through the
14 mesh will be sent using multiple interfaces at the
15 same time (if available).
16
17What: /sys/class/net/<mesh_iface>/mesh/fragmentation
18Date: October 2010
19Contact: Andreas Langer <an.langer@gmx.de>
20Description:
21 Indicates whether the data traffic going through the
22 mesh will be fragmented or silently discarded if the
23 packet size exceeds the outgoing interface MTU.
24
25What: /sys/class/net/<mesh_iface>/mesh/gw_bandwidth
26Date: October 2010
27Contact: Marek Lindner <lindner_marek@yahoo.de>
28Description:
29 Defines the bandwidth which is propagated by this
30 node if gw_mode was set to 'server'.
31
32What: /sys/class/net/<mesh_iface>/mesh/gw_mode
33Date: October 2010
34Contact: Marek Lindner <lindner_marek@yahoo.de>
35Description:
36 Defines the state of the gateway features. Can be
37 either 'off', 'client' or 'server'.
38
39What: /sys/class/net/<mesh_iface>/mesh/gw_sel_class
40Date: October 2010
41Contact: Marek Lindner <lindner_marek@yahoo.de>
42Description:
43 Defines the selection criteria this node will use
44 to choose a gateway if gw_mode was set to 'client'.
45
46What: /sys/class/net/<mesh_iface>/mesh/orig_interval
47Date: May 2010
48Contact: Marek Lindner <lindner_marek@yahoo.de>
49Description:
50 Defines the interval in milliseconds in which batman
51 sends its protocol messages.
52
53What: /sys/class/net/<mesh_iface>/mesh/hop_penalty
54Date: Oct 2010
55Contact: Linus Lüssing <linus.luessing@web.de>
56Description:
57 Defines the penalty which will be applied to an
58 originator message's tq-field on every hop.
59
60What: /sys/class/net/<mesh_iface>/mesh/vis_mode
61Date: May 2010
62Contact: Marek Lindner <lindner_marek@yahoo.de>
63Description:
64 Each batman node only maintains information about its
65 own local neighborhood, therefore generating graphs
66 showing the topology of the entire mesh is not easily
67 feasible without having a central instance to collect
68 the local topologies from all nodes. This file allows
69 to activate the collecting (server) mode.
diff --git a/Documentation/ABI/testing/sysfs-driver-hid-roccat-kone b/Documentation/ABI/testing/sysfs-driver-hid-roccat-kone
index 063bda7fe707..698b8081c473 100644
--- a/Documentation/ABI/testing/sysfs-driver-hid-roccat-kone
+++ b/Documentation/ABI/testing/sysfs-driver-hid-roccat-kone
@@ -1,4 +1,4 @@
1What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/actual_dpi 1What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/kone/roccatkone<minor>/actual_dpi
2Date: March 2010 2Date: March 2010
3Contact: Stefan Achatz <erazor_de@users.sourceforge.net> 3Contact: Stefan Achatz <erazor_de@users.sourceforge.net>
4Description: It is possible to switch the dpi setting of the mouse with the 4Description: It is possible to switch the dpi setting of the mouse with the
@@ -17,13 +17,13 @@ Description: It is possible to switch the dpi setting of the mouse with the
17 17
18 This file is readonly. 18 This file is readonly.
19 19
20What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/actual_profile 20What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/kone/roccatkone<minor>/actual_profile
21Date: March 2010 21Date: March 2010
22Contact: Stefan Achatz <erazor_de@users.sourceforge.net> 22Contact: Stefan Achatz <erazor_de@users.sourceforge.net>
23Description: When read, this file returns the number of the actual profile. 23Description: When read, this file returns the number of the actual profile.
24 This file is readonly. 24 This file is readonly.
25 25
26What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/firmware_version 26What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/kone/roccatkone<minor>/firmware_version
27Date: March 2010 27Date: March 2010
28Contact: Stefan Achatz <erazor_de@users.sourceforge.net> 28Contact: Stefan Achatz <erazor_de@users.sourceforge.net>
29Description: When read, this file returns the raw integer version number of the 29Description: When read, this file returns the raw integer version number of the
@@ -33,7 +33,7 @@ Description: When read, this file returns the raw integer version number of the
33 left. E.g. a returned value of 138 means 1.38 33 left. E.g. a returned value of 138 means 1.38
34 This file is readonly. 34 This file is readonly.
35 35
36What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/profile[1-5] 36What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/kone/roccatkone<minor>/profile[1-5]
37Date: March 2010 37Date: March 2010
38Contact: Stefan Achatz <erazor_de@users.sourceforge.net> 38Contact: Stefan Achatz <erazor_de@users.sourceforge.net>
39Description: The mouse can store 5 profiles which can be switched by the 39Description: The mouse can store 5 profiles which can be switched by the
@@ -48,7 +48,7 @@ Description: The mouse can store 5 profiles which can be switched by the
48 stored in the profile doesn't need to fit the number of the 48 stored in the profile doesn't need to fit the number of the
49 store. 49 store.
50 50
51What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/settings 51What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/kone/roccatkone<minor>/settings
52Date: March 2010 52Date: March 2010
53Contact: Stefan Achatz <erazor_de@users.sourceforge.net> 53Contact: Stefan Achatz <erazor_de@users.sourceforge.net>
54Description: When read, this file returns the settings stored in the mouse. 54Description: When read, this file returns the settings stored in the mouse.
@@ -58,7 +58,7 @@ Description: When read, this file returns the settings stored in the mouse.
58 The data has to be 36 bytes long. The mouse will reject invalid 58 The data has to be 36 bytes long. The mouse will reject invalid
59 data. 59 data.
60 60
61What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/startup_profile 61What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/kone/roccatkone<minor>/startup_profile
62Date: March 2010 62Date: March 2010
63Contact: Stefan Achatz <erazor_de@users.sourceforge.net> 63Contact: Stefan Achatz <erazor_de@users.sourceforge.net>
64Description: The integer value of this attribute ranges from 1 to 5. 64Description: The integer value of this attribute ranges from 1 to 5.
@@ -67,7 +67,7 @@ Description: The integer value of this attribute ranges from 1 to 5.
67 When written, this file sets the number of the startup profile 67 When written, this file sets the number of the startup profile
68 and the mouse activates this profile immediately. 68 and the mouse activates this profile immediately.
69 69
70What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/tcu 70What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/kone/roccatkone<minor>/tcu
71Date: March 2010 71Date: March 2010
72Contact: Stefan Achatz <erazor_de@users.sourceforge.net> 72Contact: Stefan Achatz <erazor_de@users.sourceforge.net>
73Description: The mouse has a "Tracking Control Unit" which lets the user 73Description: The mouse has a "Tracking Control Unit" which lets the user
@@ -78,7 +78,7 @@ Description: The mouse has a "Tracking Control Unit" which lets the user
78 Writing 1 in this file will start the calibration which takes 78 Writing 1 in this file will start the calibration which takes
79 around 6 seconds to complete and activates the TCU. 79 around 6 seconds to complete and activates the TCU.
80 80
81What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/weight 81What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/kone/roccatkone<minor>/weight
82Date: March 2010 82Date: March 2010
83Contact: Stefan Achatz <erazor_de@users.sourceforge.net> 83Contact: Stefan Achatz <erazor_de@users.sourceforge.net>
84Description: The mouse can be equipped with one of four supplied weights 84Description: The mouse can be equipped with one of four supplied weights
diff --git a/Documentation/ABI/testing/sysfs-driver-hid-roccat-koneplus b/Documentation/ABI/testing/sysfs-driver-hid-roccat-koneplus
new file mode 100644
index 000000000000..0f9f30eb1742
--- /dev/null
+++ b/Documentation/ABI/testing/sysfs-driver-hid-roccat-koneplus
@@ -0,0 +1,108 @@
1What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/koneplus/roccatkoneplus<minor>/actual_profile
2Date: October 2010
3Contact: Stefan Achatz <erazor_de@users.sourceforge.net>
4Description: When read, this file returns the number of the actual profile in
5 range 0-4.
6 This file is readonly.
7
8What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/koneplus/roccatkoneplus<minor>/firmware_version
9Date: October 2010
10Contact: Stefan Achatz <erazor_de@users.sourceforge.net>
11Description: When read, this file returns the raw integer version number of the
12 firmware reported by the mouse. Using the integer value eases
13 further usage in other programs. To receive the real version
14 number the decimal point has to be shifted 2 positions to the
15 left. E.g. a returned value of 121 means 1.21
16 This file is readonly.
17
18What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/koneplus/roccatkoneplus<minor>/macro
19Date: October 2010
20Contact: Stefan Achatz <erazor_de@users.sourceforge.net>
21Description: The mouse can store a macro with max 500 key/button strokes
22 internally.
23 When written, this file lets one set the sequence for a specific
24 button for a specific profile. Button and profile numbers are
25 included in written data. The data has to be 2082 bytes long.
26 This file is writeonly.
27
28What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/koneplus/roccatkoneplus<minor>/profile_buttons
29Date: August 2010
30Contact: Stefan Achatz <erazor_de@users.sourceforge.net>
31Description: The mouse can store 5 profiles which can be switched by the
32 press of a button. A profile is split in settings and buttons.
33 profile_buttons holds informations about button layout.
34 When written, this file lets one write the respective profile
35 buttons back to the mouse. The data has to be 77 bytes long.
36 The mouse will reject invalid data.
37 Which profile to write is determined by the profile number
38 contained in the data.
39 This file is writeonly.
40
41What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/koneplus/roccatkoneplus<minor>/profile[1-5]_buttons
42Date: August 2010
43Contact: Stefan Achatz <erazor_de@users.sourceforge.net>
44Description: The mouse can store 5 profiles which can be switched by the
45 press of a button. A profile is split in settings and buttons.
46 profile_buttons holds informations about button layout.
47 When read, these files return the respective profile buttons.
48 The returned data is 77 bytes in size.
49 This file is readonly.
50
51What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/koneplus/roccatkoneplus<minor>/profile_settings
52Date: October 2010
53Contact: Stefan Achatz <erazor_de@users.sourceforge.net>
54Description: The mouse can store 5 profiles which can be switched by the
55 press of a button. A profile is split in settings and buttons.
56 profile_settings holds informations like resolution, sensitivity
57 and light effects.
58 When written, this file lets one write the respective profile
59 settings back to the mouse. The data has to be 43 bytes long.
60 The mouse will reject invalid data.
61 Which profile to write is determined by the profile number
62 contained in the data.
63 This file is writeonly.
64
65What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/koneplus/roccatkoneplus<minor>/profile[1-5]_settings
66Date: August 2010
67Contact: Stefan Achatz <erazor_de@users.sourceforge.net>
68Description: The mouse can store 5 profiles which can be switched by the
69 press of a button. A profile is split in settings and buttons.
70 profile_settings holds informations like resolution, sensitivity
71 and light effects.
72 When read, these files return the respective profile settings.
73 The returned data is 43 bytes in size.
74 This file is readonly.
75
76What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/koneplus/roccatkoneplus<minor>/sensor
77Date: October 2010
78Contact: Stefan Achatz <erazor_de@users.sourceforge.net>
79Description: The mouse has a tracking- and a distance-control-unit. These
80 can be activated/deactivated and the lift-off distance can be
81 set. The data has to be 6 bytes long.
82 This file is writeonly.
83
84What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/koneplus/roccatkoneplus<minor>/startup_profile
85Date: October 2010
86Contact: Stefan Achatz <erazor_de@users.sourceforge.net>
87Description: The integer value of this attribute ranges from 0-4.
88 When read, this attribute returns the number of the profile
89 that's active when the mouse is powered on.
90 When written, this file sets the number of the startup profile
91 and the mouse activates this profile immediately.
92
93What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/koneplus/roccatkoneplus<minor>/tcu
94Date: October 2010
95Contact: Stefan Achatz <erazor_de@users.sourceforge.net>
96Description: When written a calibration process for the tracking control unit
97 can be initiated/cancelled.
98 The data has to be 3 bytes long.
99 This file is writeonly.
100
101What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/koneplus/roccatkoneplus<minor>/tcu_image
102Date: October 2010
103Contact: Stefan Achatz <erazor_de@users.sourceforge.net>
104Description: When read the mouse returns a 30x30 pixel image of the
105 sampled underground. This works only in the course of a
106 calibration process initiated with tcu.
107 The returned data is 1028 bytes in size.
108 This file is readonly.
diff --git a/Documentation/ABI/testing/sysfs-driver-hid-roccat-pyra b/Documentation/ABI/testing/sysfs-driver-hid-roccat-pyra
index ad1125b02ff4..1c37b823f142 100644
--- a/Documentation/ABI/testing/sysfs-driver-hid-roccat-pyra
+++ b/Documentation/ABI/testing/sysfs-driver-hid-roccat-pyra
@@ -1,4 +1,4 @@
1What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/actual_cpi 1What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/pyra/roccatpyra<minor>/actual_cpi
2Date: August 2010 2Date: August 2010
3Contact: Stefan Achatz <erazor_de@users.sourceforge.net> 3Contact: Stefan Achatz <erazor_de@users.sourceforge.net>
4Description: It is possible to switch the cpi setting of the mouse with the 4Description: It is possible to switch the cpi setting of the mouse with the
@@ -14,14 +14,14 @@ Description: It is possible to switch the cpi setting of the mouse with the
14 14
15 This file is readonly. 15 This file is readonly.
16 16
17What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/actual_profile 17What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/pyra/roccatpyra<minor>/actual_profile
18Date: August 2010 18Date: August 2010
19Contact: Stefan Achatz <erazor_de@users.sourceforge.net> 19Contact: Stefan Achatz <erazor_de@users.sourceforge.net>
20Description: When read, this file returns the number of the actual profile in 20Description: When read, this file returns the number of the actual profile in
21 range 0-4. 21 range 0-4.
22 This file is readonly. 22 This file is readonly.
23 23
24What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/firmware_version 24What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/pyra/roccatpyra<minor>/firmware_version
25Date: August 2010 25Date: August 2010
26Contact: Stefan Achatz <erazor_de@users.sourceforge.net> 26Contact: Stefan Achatz <erazor_de@users.sourceforge.net>
27Description: When read, this file returns the raw integer version number of the 27Description: When read, this file returns the raw integer version number of the
@@ -31,7 +31,7 @@ Description: When read, this file returns the raw integer version number of the
31 left. E.g. a returned value of 138 means 1.38 31 left. E.g. a returned value of 138 means 1.38
32 This file is readonly. 32 This file is readonly.
33 33
34What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/profile_settings 34What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/pyra/roccatpyra<minor>/profile_settings
35Date: August 2010 35Date: August 2010
36Contact: Stefan Achatz <erazor_de@users.sourceforge.net> 36Contact: Stefan Achatz <erazor_de@users.sourceforge.net>
37Description: The mouse can store 5 profiles which can be switched by the 37Description: The mouse can store 5 profiles which can be switched by the
@@ -45,7 +45,7 @@ Description: The mouse can store 5 profiles which can be switched by the
45 contained in the data. 45 contained in the data.
46 This file is writeonly. 46 This file is writeonly.
47 47
48What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/profile[1-5]_settings 48What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/pyra/roccatpyra<minor>/profile[1-5]_settings
49Date: August 2010 49Date: August 2010
50Contact: Stefan Achatz <erazor_de@users.sourceforge.net> 50Contact: Stefan Achatz <erazor_de@users.sourceforge.net>
51Description: The mouse can store 5 profiles which can be switched by the 51Description: The mouse can store 5 profiles which can be switched by the
@@ -56,7 +56,7 @@ Description: The mouse can store 5 profiles which can be switched by the
56 The returned data is 13 bytes in size. 56 The returned data is 13 bytes in size.
57 This file is readonly. 57 This file is readonly.
58 58
59What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/profile_buttons 59What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/pyra/roccatpyra<minor>/profile_buttons
60Date: August 2010 60Date: August 2010
61Contact: Stefan Achatz <erazor_de@users.sourceforge.net> 61Contact: Stefan Achatz <erazor_de@users.sourceforge.net>
62Description: The mouse can store 5 profiles which can be switched by the 62Description: The mouse can store 5 profiles which can be switched by the
@@ -69,7 +69,7 @@ Description: The mouse can store 5 profiles which can be switched by the
69 contained in the data. 69 contained in the data.
70 This file is writeonly. 70 This file is writeonly.
71 71
72What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/profile[1-5]_buttons 72What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/pyra/roccatpyra<minor>/profile[1-5]_buttons
73Date: August 2010 73Date: August 2010
74Contact: Stefan Achatz <erazor_de@users.sourceforge.net> 74Contact: Stefan Achatz <erazor_de@users.sourceforge.net>
75Description: The mouse can store 5 profiles which can be switched by the 75Description: The mouse can store 5 profiles which can be switched by the
@@ -79,7 +79,7 @@ Description: The mouse can store 5 profiles which can be switched by the
79 The returned data is 19 bytes in size. 79 The returned data is 19 bytes in size.
80 This file is readonly. 80 This file is readonly.
81 81
82What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/startup_profile 82What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/pyra/roccatpyra<minor>/startup_profile
83Date: August 2010 83Date: August 2010
84Contact: Stefan Achatz <erazor_de@users.sourceforge.net> 84Contact: Stefan Achatz <erazor_de@users.sourceforge.net>
85Description: The integer value of this attribute ranges from 0-4. 85Description: The integer value of this attribute ranges from 0-4.
@@ -87,7 +87,7 @@ Description: The integer value of this attribute ranges from 0-4.
87 that's active when the mouse is powered on. 87 that's active when the mouse is powered on.
88 This file is readonly. 88 This file is readonly.
89 89
90What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/settings 90What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/pyra/roccatpyra<minor>/settings
91Date: August 2010 91Date: August 2010
92Contact: Stefan Achatz <erazor_de@users.sourceforge.net> 92Contact: Stefan Achatz <erazor_de@users.sourceforge.net>
93Description: When read, this file returns the settings stored in the mouse. 93Description: When read, this file returns the settings stored in the mouse.
diff --git a/Documentation/ABI/testing/sysfs-platform-asus-laptop b/Documentation/ABI/testing/sysfs-platform-asus-laptop
index 1d775390e856..41ff8ae4dee0 100644
--- a/Documentation/ABI/testing/sysfs-platform-asus-laptop
+++ b/Documentation/ABI/testing/sysfs-platform-asus-laptop
@@ -47,6 +47,20 @@ Date: January 2007
47KernelVersion: 2.6.20 47KernelVersion: 2.6.20
48Contact: "Corentin Chary" <corentincj@iksaif.net> 48Contact: "Corentin Chary" <corentincj@iksaif.net>
49Description: 49Description:
50 Control the bluetooth device. 1 means on, 0 means off. 50 Control the wlan device. 1 means on, 0 means off.
51 This may control the led, the device or both. 51 This may control the led, the device or both.
52Users: Lapsus 52Users: Lapsus
53
54What: /sys/devices/platform/asus_laptop/wimax
55Date: October 2010
56KernelVersion: 2.6.37
57Contact: "Corentin Chary" <corentincj@iksaif.net>
58Description:
59 Control the wimax device. 1 means on, 0 means off.
60
61What: /sys/devices/platform/asus_laptop/wwan
62Date: October 2010
63KernelVersion: 2.6.37
64Contact: "Corentin Chary" <corentincj@iksaif.net>
65Description:
66 Control the wwan (3G) device. 1 means on, 0 means off.
diff --git a/Documentation/ABI/testing/sysfs-platform-eeepc-wmi b/Documentation/ABI/testing/sysfs-platform-eeepc-wmi
new file mode 100644
index 000000000000..e4b5fef5fadd
--- /dev/null
+++ b/Documentation/ABI/testing/sysfs-platform-eeepc-wmi
@@ -0,0 +1,10 @@
1What: /sys/devices/platform/eeepc-wmi/cpufv
2Date: Oct 2010
3KernelVersion: 2.6.37
4Contact: "Corentin Chary" <corentincj@iksaif.net>
5Description:
6 Change CPU clock configuration (write-only).
7 There are three available clock configuration:
8 * 0 -> Super Performance Mode
9 * 1 -> High Performance Mode
10 * 2 -> Power Saving Mode
diff --git a/Documentation/ABI/testing/sysfs-platform-ideapad-laptop b/Documentation/ABI/testing/sysfs-platform-ideapad-laptop
new file mode 100644
index 000000000000..807fca2ae2a4
--- /dev/null
+++ b/Documentation/ABI/testing/sysfs-platform-ideapad-laptop
@@ -0,0 +1,6 @@
1What: /sys/devices/platform/ideapad/camera_power
2Date: Dec 2010
3KernelVersion: 2.6.37
4Contact: "Ike Panhc <ike.pan@canonical.com>"
5Description:
6 Control the power of camera module. 1 means on, 0 means off.
diff --git a/Documentation/ABI/testing/sysfs-tty b/Documentation/ABI/testing/sysfs-tty
new file mode 100644
index 000000000000..b138b663bf54
--- /dev/null
+++ b/Documentation/ABI/testing/sysfs-tty
@@ -0,0 +1,19 @@
1What: /sys/class/tty/console/active
2Date: Nov 2010
3Contact: Kay Sievers <kay.sievers@vrfy.org>
4Description:
5 Shows the list of currently configured
6 console devices, like 'tty1 ttyS0'.
7 The last entry in the file is the active
8 device connected to /dev/console.
9 The file supports poll() to detect virtual
10 console switches.
11
12What: /sys/class/tty/tty0/active
13Date: Nov 2010
14Contact: Kay Sievers <kay.sievers@vrfy.org>
15Description:
16 Shows the currently active virtual console
17 device, like 'tty1'.
18 The file supports poll() to detect virtual
19 console switches.
diff --git a/Documentation/DocBook/80211.tmpl b/Documentation/DocBook/80211.tmpl
index 19a1210c2530..03641a08e275 100644
--- a/Documentation/DocBook/80211.tmpl
+++ b/Documentation/DocBook/80211.tmpl
@@ -146,6 +146,7 @@
146!Finclude/net/cfg80211.h cfg80211_rx_mgmt 146!Finclude/net/cfg80211.h cfg80211_rx_mgmt
147!Finclude/net/cfg80211.h cfg80211_mgmt_tx_status 147!Finclude/net/cfg80211.h cfg80211_mgmt_tx_status
148!Finclude/net/cfg80211.h cfg80211_cqm_rssi_notify 148!Finclude/net/cfg80211.h cfg80211_cqm_rssi_notify
149!Finclude/net/cfg80211.h cfg80211_cqm_pktloss_notify
149!Finclude/net/cfg80211.h cfg80211_michael_mic_failure 150!Finclude/net/cfg80211.h cfg80211_michael_mic_failure
150 </chapter> 151 </chapter>
151 <chapter> 152 <chapter>
@@ -332,10 +333,16 @@
332 <title>functions/definitions</title> 333 <title>functions/definitions</title>
333!Finclude/net/mac80211.h ieee80211_rx_status 334!Finclude/net/mac80211.h ieee80211_rx_status
334!Finclude/net/mac80211.h mac80211_rx_flags 335!Finclude/net/mac80211.h mac80211_rx_flags
336!Finclude/net/mac80211.h mac80211_tx_control_flags
337!Finclude/net/mac80211.h mac80211_rate_control_flags
338!Finclude/net/mac80211.h ieee80211_tx_rate
335!Finclude/net/mac80211.h ieee80211_tx_info 339!Finclude/net/mac80211.h ieee80211_tx_info
340!Finclude/net/mac80211.h ieee80211_tx_info_clear_status
336!Finclude/net/mac80211.h ieee80211_rx 341!Finclude/net/mac80211.h ieee80211_rx
342!Finclude/net/mac80211.h ieee80211_rx_ni
337!Finclude/net/mac80211.h ieee80211_rx_irqsafe 343!Finclude/net/mac80211.h ieee80211_rx_irqsafe
338!Finclude/net/mac80211.h ieee80211_tx_status 344!Finclude/net/mac80211.h ieee80211_tx_status
345!Finclude/net/mac80211.h ieee80211_tx_status_ni
339!Finclude/net/mac80211.h ieee80211_tx_status_irqsafe 346!Finclude/net/mac80211.h ieee80211_tx_status_irqsafe
340!Finclude/net/mac80211.h ieee80211_rts_get 347!Finclude/net/mac80211.h ieee80211_rts_get
341!Finclude/net/mac80211.h ieee80211_rts_duration 348!Finclude/net/mac80211.h ieee80211_rts_duration
@@ -346,6 +353,7 @@
346!Finclude/net/mac80211.h ieee80211_stop_queue 353!Finclude/net/mac80211.h ieee80211_stop_queue
347!Finclude/net/mac80211.h ieee80211_wake_queues 354!Finclude/net/mac80211.h ieee80211_wake_queues
348!Finclude/net/mac80211.h ieee80211_stop_queues 355!Finclude/net/mac80211.h ieee80211_stop_queues
356!Finclude/net/mac80211.h ieee80211_queue_stopped
349 </sect1> 357 </sect1>
350 </chapter> 358 </chapter>
351 359
@@ -354,6 +362,13 @@
354!Pinclude/net/mac80211.h Frame filtering 362!Pinclude/net/mac80211.h Frame filtering
355!Finclude/net/mac80211.h ieee80211_filter_flags 363!Finclude/net/mac80211.h ieee80211_filter_flags
356 </chapter> 364 </chapter>
365
366 <chapter id="workqueue">
367 <title>The mac80211 workqueue</title>
368!Pinclude/net/mac80211.h mac80211 workqueue
369!Finclude/net/mac80211.h ieee80211_queue_work
370!Finclude/net/mac80211.h ieee80211_queue_delayed_work
371 </chapter>
357 </part> 372 </part>
358 373
359 <part id="advanced"> 374 <part id="advanced">
@@ -374,6 +389,9 @@
374!Finclude/net/mac80211.h set_key_cmd 389!Finclude/net/mac80211.h set_key_cmd
375!Finclude/net/mac80211.h ieee80211_key_conf 390!Finclude/net/mac80211.h ieee80211_key_conf
376!Finclude/net/mac80211.h ieee80211_key_flags 391!Finclude/net/mac80211.h ieee80211_key_flags
392!Finclude/net/mac80211.h ieee80211_tkip_key_type
393!Finclude/net/mac80211.h ieee80211_get_tkip_key
394!Finclude/net/mac80211.h ieee80211_key_removed
377 </chapter> 395 </chapter>
378 396
379 <chapter id="powersave"> 397 <chapter id="powersave">
@@ -417,6 +435,18 @@
417 supported by mac80211, add notes about supporting hw crypto 435 supported by mac80211, add notes about supporting hw crypto
418 with it. 436 with it.
419 </para> 437 </para>
438!Finclude/net/mac80211.h ieee80211_iterate_active_interfaces
439!Finclude/net/mac80211.h ieee80211_iterate_active_interfaces_atomic
440 </chapter>
441
442 <chapter id="station-handling">
443 <title>Station handling</title>
444 <para>TODO</para>
445!Finclude/net/mac80211.h ieee80211_sta
446!Finclude/net/mac80211.h sta_notify_cmd
447!Finclude/net/mac80211.h ieee80211_find_sta
448!Finclude/net/mac80211.h ieee80211_find_sta_by_ifaddr
449!Finclude/net/mac80211.h ieee80211_sta_block_awake
420 </chapter> 450 </chapter>
421 451
422 <chapter id="hardware-scan-offload"> 452 <chapter id="hardware-scan-offload">
@@ -424,6 +454,28 @@
424 <para>TBD</para> 454 <para>TBD</para>
425!Finclude/net/mac80211.h ieee80211_scan_completed 455!Finclude/net/mac80211.h ieee80211_scan_completed
426 </chapter> 456 </chapter>
457
458 <chapter id="aggregation">
459 <title>Aggregation</title>
460 <sect1>
461 <title>TX A-MPDU aggregation</title>
462!Pnet/mac80211/agg-tx.c TX A-MPDU aggregation
463!Cnet/mac80211/agg-tx.c
464 </sect1>
465 <sect1>
466 <title>RX A-MPDU aggregation</title>
467!Pnet/mac80211/agg-rx.c RX A-MPDU aggregation
468!Cnet/mac80211/agg-rx.c
469 </sect1>
470!Finclude/net/mac80211.h ieee80211_ampdu_mlme_action
471 </chapter>
472
473 <chapter id="smps">
474 <title>Spatial Multiplexing Powersave (SMPS)</title>
475!Pinclude/net/mac80211.h Spatial multiplexing power save
476!Finclude/net/mac80211.h ieee80211_request_smps
477!Finclude/net/mac80211.h ieee80211_smps_mode
478 </chapter>
427 </part> 479 </part>
428 480
429 <part id="rate-control"> 481 <part id="rate-control">
@@ -435,9 +487,16 @@
435 interface and how it relates to mac80211 and drivers. 487 interface and how it relates to mac80211 and drivers.
436 </para> 488 </para>
437 </partintro> 489 </partintro>
438 <chapter id="dummy"> 490 <chapter id="ratecontrol-api">
439 <title>dummy chapter</title> 491 <title>Rate Control API</title>
440 <para>TBD</para> 492 <para>TBD</para>
493!Finclude/net/mac80211.h ieee80211_start_tx_ba_session
494!Finclude/net/mac80211.h ieee80211_start_tx_ba_cb_irqsafe
495!Finclude/net/mac80211.h ieee80211_stop_tx_ba_session
496!Finclude/net/mac80211.h ieee80211_stop_tx_ba_cb_irqsafe
497!Finclude/net/mac80211.h rate_control_changed
498!Finclude/net/mac80211.h ieee80211_tx_rate_control
499!Finclude/net/mac80211.h rate_control_send_low
441 </chapter> 500 </chapter>
442 </part> 501 </part>
443 502
@@ -485,6 +544,13 @@
485 </sect1> 544 </sect1>
486 </chapter> 545 </chapter>
487 546
547 <chapter id="aggregation-internals">
548 <title>Aggregation</title>
549!Fnet/mac80211/sta_info.h sta_ampdu_mlme
550!Fnet/mac80211/sta_info.h tid_ampdu_tx
551!Fnet/mac80211/sta_info.h tid_ampdu_rx
552 </chapter>
553
488 <chapter id="synchronisation"> 554 <chapter id="synchronisation">
489 <title>Synchronisation</title> 555 <title>Synchronisation</title>
490 <para>TBD</para> 556 <para>TBD</para>
diff --git a/Documentation/DocBook/device-drivers.tmpl b/Documentation/DocBook/device-drivers.tmpl
index 22edcbb9ddaf..35447e081736 100644
--- a/Documentation/DocBook/device-drivers.tmpl
+++ b/Documentation/DocBook/device-drivers.tmpl
@@ -304,6 +304,10 @@ X!Idrivers/video/console/fonts.c
304!Edrivers/input/ff-core.c 304!Edrivers/input/ff-core.c
305!Edrivers/input/ff-memless.c 305!Edrivers/input/ff-memless.c
306 </sect1> 306 </sect1>
307 <sect1><title>Multitouch Library</title>
308!Iinclude/linux/input/mt.h
309!Edrivers/input/input-mt.c
310 </sect1>
307 <sect1><title>Polled input devices</title> 311 <sect1><title>Polled input devices</title>
308!Iinclude/linux/input-polldev.h 312!Iinclude/linux/input-polldev.h
309!Edrivers/input/input-polldev.c 313!Edrivers/input/input-polldev.c
diff --git a/Documentation/DocBook/mtdnand.tmpl b/Documentation/DocBook/mtdnand.tmpl
index 020ac80d4682..620eb3f6a90a 100644
--- a/Documentation/DocBook/mtdnand.tmpl
+++ b/Documentation/DocBook/mtdnand.tmpl
@@ -250,7 +250,7 @@ static void board_hwcontrol(struct mtd_info *mtd, int cmd)
250 <title>Device ready function</title> 250 <title>Device ready function</title>
251 <para> 251 <para>
252 If the hardware interface has the ready busy pin of the NAND chip connected to a 252 If the hardware interface has the ready busy pin of the NAND chip connected to a
253 GPIO or other accesible I/O pin, this function is used to read back the state of the 253 GPIO or other accessible I/O pin, this function is used to read back the state of the
254 pin. The function has no arguments and should return 0, if the device is busy (R/B pin 254 pin. The function has no arguments and should return 0, if the device is busy (R/B pin
255 is low) and 1, if the device is ready (R/B pin is high). 255 is low) and 1, if the device is ready (R/B pin is high).
256 If the hardware interface does not give access to the ready busy pin, then 256 If the hardware interface does not give access to the ready busy pin, then
diff --git a/Documentation/DocBook/sh.tmpl b/Documentation/DocBook/sh.tmpl
index d858d92cf6d9..4a38f604fa66 100644
--- a/Documentation/DocBook/sh.tmpl
+++ b/Documentation/DocBook/sh.tmpl
@@ -79,10 +79,6 @@
79 </sect2> 79 </sect2>
80 </sect1> 80 </sect1>
81 </chapter> 81 </chapter>
82 <chapter id="clk">
83 <title>Clock Framework Extensions</title>
84!Iinclude/linux/sh_clk.h
85 </chapter>
86 <chapter id="mach"> 82 <chapter id="mach">
87 <title>Machine Specific Interfaces</title> 83 <title>Machine Specific Interfaces</title>
88 <sect1 id="dreamcast"> 84 <sect1 id="dreamcast">
diff --git a/Documentation/DocBook/uio-howto.tmpl b/Documentation/DocBook/uio-howto.tmpl
index 4d4ce0e61e42..b4665b9c40b0 100644
--- a/Documentation/DocBook/uio-howto.tmpl
+++ b/Documentation/DocBook/uio-howto.tmpl
@@ -16,7 +16,7 @@
16 </orgname> 16 </orgname>
17 17
18 <address> 18 <address>
19 <email>hjk@linutronix.de</email> 19 <email>hjk@hansjkoch.de</email>
20 </address> 20 </address>
21 </affiliation> 21 </affiliation>
22</author> 22</author>
@@ -114,7 +114,7 @@ GPL version 2.
114 114
115<para>If you know of any translations for this document, or you are 115<para>If you know of any translations for this document, or you are
116interested in translating it, please email me 116interested in translating it, please email me
117<email>hjk@linutronix.de</email>. 117<email>hjk@hansjkoch.de</email>.
118</para> 118</para>
119</sect1> 119</sect1>
120 120
@@ -171,7 +171,7 @@ interested in translating it, please email me
171<title>Feedback</title> 171<title>Feedback</title>
172 <para>Find something wrong with this document? (Or perhaps something 172 <para>Find something wrong with this document? (Or perhaps something
173 right?) I would love to hear from you. Please email me at 173 right?) I would love to hear from you. Please email me at
174 <email>hjk@linutronix.de</email>.</para> 174 <email>hjk@hansjkoch.de</email>.</para>
175</sect1> 175</sect1>
176</chapter> 176</chapter>
177 177
diff --git a/Documentation/DocBook/v4l/func-ioctl.xml b/Documentation/DocBook/v4l/func-ioctl.xml
index 00f9690e1c28..b60fd37a6295 100644
--- a/Documentation/DocBook/v4l/func-ioctl.xml
+++ b/Documentation/DocBook/v4l/func-ioctl.xml
@@ -34,8 +34,7 @@
34 <varlistentry> 34 <varlistentry>
35 <term><parameter>request</parameter></term> 35 <term><parameter>request</parameter></term>
36 <listitem> 36 <listitem>
37 <para>V4L2 ioctl request code as defined in the <link 37 <para>V4L2 ioctl request code as defined in the <filename>videodev2.h</filename> header file, for example
38linkend="videodev">videodev.h</link> header file, for example
39VIDIOC_QUERYCAP.</para> 38VIDIOC_QUERYCAP.</para>
40 </listitem> 39 </listitem>
41 </varlistentry> 40 </varlistentry>
@@ -57,7 +56,7 @@ file descriptor. An ioctl <parameter>request</parameter> has encoded
57in it whether the argument is an input, output or read/write 56in it whether the argument is an input, output or read/write
58parameter, and the size of the argument <parameter>argp</parameter> in 57parameter, and the size of the argument <parameter>argp</parameter> in
59bytes. Macros and defines specifying V4L2 ioctl requests are located 58bytes. Macros and defines specifying V4L2 ioctl requests are located
60in the <link linkend="videodev">videodev.h</link> header file. 59in the <filename>videodev2.h</filename> header file.
61Applications should use their own copy, not include the version in the 60Applications should use their own copy, not include the version in the
62kernel sources on the system they compile on. All V4L2 ioctl requests, 61kernel sources on the system they compile on. All V4L2 ioctl requests,
63their respective function and parameters are specified in <xref 62their respective function and parameters are specified in <xref
diff --git a/Documentation/DocBook/v4l/pixfmt.xml b/Documentation/DocBook/v4l/pixfmt.xml
index d7c467187095..cfffc88d7383 100644
--- a/Documentation/DocBook/v4l/pixfmt.xml
+++ b/Documentation/DocBook/v4l/pixfmt.xml
@@ -142,8 +142,8 @@ leftmost pixel of the second row from the top, and so on. The last row
142has just as many pad bytes after it as the other rows.</para> 142has just as many pad bytes after it as the other rows.</para>
143 143
144 <para>In V4L2 each format has an identifier which looks like 144 <para>In V4L2 each format has an identifier which looks like
145<constant>PIX_FMT_XXX</constant>, defined in the <link 145<constant>PIX_FMT_XXX</constant>, defined in the <filename>videodev2.h</filename>
146linkend="videodev">videodev.h</link> header file. These identifiers 146header file. These identifiers
147represent <link linkend="v4l2-fourcc">four character codes</link> 147represent <link linkend="v4l2-fourcc">four character codes</link>
148which are also listed below, however they are not the same as those 148which are also listed below, however they are not the same as those
149used in the Windows world.</para> 149used in the Windows world.</para>
diff --git a/Documentation/Makefile b/Documentation/Makefile
index 6fc7ea1d1f9d..9b4bc5c76f33 100644
--- a/Documentation/Makefile
+++ b/Documentation/Makefile
@@ -1,3 +1,3 @@
1obj-m := DocBook/ accounting/ auxdisplay/ connector/ \ 1obj-m := DocBook/ accounting/ auxdisplay/ connector/ \
2 filesystems/ filesystems/configfs/ ia64/ laptops/ networking/ \ 2 filesystems/ filesystems/configfs/ ia64/ laptops/ networking/ \
3 pcmcia/ spi/ timers/ video4linux/ vm/ watchdog/src/ 3 pcmcia/ spi/ timers/ vm/ watchdog/src/
diff --git a/Documentation/RCU/trace.txt b/Documentation/RCU/trace.txt
index a851118775d8..6a8c73f55b80 100644
--- a/Documentation/RCU/trace.txt
+++ b/Documentation/RCU/trace.txt
@@ -1,18 +1,22 @@
1CONFIG_RCU_TRACE debugfs Files and Formats 1CONFIG_RCU_TRACE debugfs Files and Formats
2 2
3 3
4The rcutree implementation of RCU provides debugfs trace output that 4The rcutree and rcutiny implementations of RCU provide debugfs trace
5summarizes counters and state. This information is useful for debugging 5output that summarizes counters and state. This information is useful for
6RCU itself, and can sometimes also help to debug abuses of RCU. 6debugging RCU itself, and can sometimes also help to debug abuses of RCU.
7The following sections describe the debugfs files and formats. 7The following sections describe the debugfs files and formats, first
8for rcutree and next for rcutiny.
8 9
9 10
10Hierarchical RCU debugfs Files and Formats 11CONFIG_TREE_RCU and CONFIG_TREE_PREEMPT_RCU debugfs Files and Formats
11 12
12This implementation of RCU provides three debugfs files under the 13These implementations of RCU provides five debugfs files under the
13top-level directory RCU: rcu/rcudata (which displays fields in struct 14top-level directory RCU: rcu/rcudata (which displays fields in struct
14rcu_data), rcu/rcugp (which displays grace-period counters), and 15rcu_data), rcu/rcudata.csv (which is a .csv spreadsheet version of
15rcu/rcuhier (which displays the struct rcu_node hierarchy). 16rcu/rcudata), rcu/rcugp (which displays grace-period counters),
17rcu/rcuhier (which displays the struct rcu_node hierarchy), and
18rcu/rcu_pending (which displays counts of the reasons that the
19rcu_pending() function decided that there was core RCU work to do).
16 20
17The output of "cat rcu/rcudata" looks as follows: 21The output of "cat rcu/rcudata" looks as follows:
18 22
@@ -130,7 +134,8 @@ o "ci" is the number of RCU callbacks that have been invoked for
130 been registered in absence of CPU-hotplug activity. 134 been registered in absence of CPU-hotplug activity.
131 135
132o "co" is the number of RCU callbacks that have been orphaned due to 136o "co" is the number of RCU callbacks that have been orphaned due to
133 this CPU going offline. 137 this CPU going offline. These orphaned callbacks have been moved
138 to an arbitrarily chosen online CPU.
134 139
135o "ca" is the number of RCU callbacks that have been adopted due to 140o "ca" is the number of RCU callbacks that have been adopted due to
136 other CPUs going offline. Note that ci+co-ca+ql is the number of 141 other CPUs going offline. Note that ci+co-ca+ql is the number of
@@ -168,12 +173,12 @@ o "gpnum" is the number of grace periods that have started. It is
168 173
169The output of "cat rcu/rcuhier" looks as follows, with very long lines: 174The output of "cat rcu/rcuhier" looks as follows, with very long lines:
170 175
171c=6902 g=6903 s=2 jfq=3 j=72c7 nfqs=13142/nfqsng=0(13142) fqlh=6 oqlen=0 176c=6902 g=6903 s=2 jfq=3 j=72c7 nfqs=13142/nfqsng=0(13142) fqlh=6
1721/1 .>. 0:127 ^0 1771/1 .>. 0:127 ^0
1733/3 .>. 0:35 ^0 0/0 .>. 36:71 ^1 0/0 .>. 72:107 ^2 0/0 .>. 108:127 ^3 1783/3 .>. 0:35 ^0 0/0 .>. 36:71 ^1 0/0 .>. 72:107 ^2 0/0 .>. 108:127 ^3
1743/3f .>. 0:5 ^0 2/3 .>. 6:11 ^1 0/0 .>. 12:17 ^2 0/0 .>. 18:23 ^3 0/0 .>. 24:29 ^4 0/0 .>. 30:35 ^5 0/0 .>. 36:41 ^0 0/0 .>. 42:47 ^1 0/0 .>. 48:53 ^2 0/0 .>. 54:59 ^3 0/0 .>. 60:65 ^4 0/0 .>. 66:71 ^5 0/0 .>. 72:77 ^0 0/0 .>. 78:83 ^1 0/0 .>. 84:89 ^2 0/0 .>. 90:95 ^3 0/0 .>. 96:101 ^4 0/0 .>. 102:107 ^5 0/0 .>. 108:113 ^0 0/0 .>. 114:119 ^1 0/0 .>. 120:125 ^2 0/0 .>. 126:127 ^3 1793/3f .>. 0:5 ^0 2/3 .>. 6:11 ^1 0/0 .>. 12:17 ^2 0/0 .>. 18:23 ^3 0/0 .>. 24:29 ^4 0/0 .>. 30:35 ^5 0/0 .>. 36:41 ^0 0/0 .>. 42:47 ^1 0/0 .>. 48:53 ^2 0/0 .>. 54:59 ^3 0/0 .>. 60:65 ^4 0/0 .>. 66:71 ^5 0/0 .>. 72:77 ^0 0/0 .>. 78:83 ^1 0/0 .>. 84:89 ^2 0/0 .>. 90:95 ^3 0/0 .>. 96:101 ^4 0/0 .>. 102:107 ^5 0/0 .>. 108:113 ^0 0/0 .>. 114:119 ^1 0/0 .>. 120:125 ^2 0/0 .>. 126:127 ^3
175rcu_bh: 180rcu_bh:
176c=-226 g=-226 s=1 jfq=-5701 j=72c7 nfqs=88/nfqsng=0(88) fqlh=0 oqlen=0 181c=-226 g=-226 s=1 jfq=-5701 j=72c7 nfqs=88/nfqsng=0(88) fqlh=0
1770/1 .>. 0:127 ^0 1820/1 .>. 0:127 ^0
1780/3 .>. 0:35 ^0 0/0 .>. 36:71 ^1 0/0 .>. 72:107 ^2 0/0 .>. 108:127 ^3 1830/3 .>. 0:35 ^0 0/0 .>. 36:71 ^1 0/0 .>. 72:107 ^2 0/0 .>. 108:127 ^3
1790/3f .>. 0:5 ^0 0/3 .>. 6:11 ^1 0/0 .>. 12:17 ^2 0/0 .>. 18:23 ^3 0/0 .>. 24:29 ^4 0/0 .>. 30:35 ^5 0/0 .>. 36:41 ^0 0/0 .>. 42:47 ^1 0/0 .>. 48:53 ^2 0/0 .>. 54:59 ^3 0/0 .>. 60:65 ^4 0/0 .>. 66:71 ^5 0/0 .>. 72:77 ^0 0/0 .>. 78:83 ^1 0/0 .>. 84:89 ^2 0/0 .>. 90:95 ^3 0/0 .>. 96:101 ^4 0/0 .>. 102:107 ^5 0/0 .>. 108:113 ^0 0/0 .>. 114:119 ^1 0/0 .>. 120:125 ^2 0/0 .>. 126:127 ^3 1840/3f .>. 0:5 ^0 0/3 .>. 6:11 ^1 0/0 .>. 12:17 ^2 0/0 .>. 18:23 ^3 0/0 .>. 24:29 ^4 0/0 .>. 30:35 ^5 0/0 .>. 36:41 ^0 0/0 .>. 42:47 ^1 0/0 .>. 48:53 ^2 0/0 .>. 54:59 ^3 0/0 .>. 60:65 ^4 0/0 .>. 66:71 ^5 0/0 .>. 72:77 ^0 0/0 .>. 78:83 ^1 0/0 .>. 84:89 ^2 0/0 .>. 90:95 ^3 0/0 .>. 96:101 ^4 0/0 .>. 102:107 ^5 0/0 .>. 108:113 ^0 0/0 .>. 114:119 ^1 0/0 .>. 120:125 ^2 0/0 .>. 126:127 ^3
@@ -212,11 +217,6 @@ o "fqlh" is the number of calls to force_quiescent_state() that
212 exited immediately (without even being counted in nfqs above) 217 exited immediately (without even being counted in nfqs above)
213 due to contention on ->fqslock. 218 due to contention on ->fqslock.
214 219
215o "oqlen" is the number of callbacks on the "orphan" callback
216 list. RCU callbacks are placed on this list by CPUs going
217 offline, and are "adopted" either by the CPU helping the outgoing
218 CPU or by the next rcu_barrier*() call, whichever comes first.
219
220o Each element of the form "1/1 0:127 ^0" represents one struct 220o Each element of the form "1/1 0:127 ^0" represents one struct
221 rcu_node. Each line represents one level of the hierarchy, from 221 rcu_node. Each line represents one level of the hierarchy, from
222 root to leaves. It is best to think of the rcu_data structures 222 root to leaves. It is best to think of the rcu_data structures
@@ -326,3 +326,115 @@ o "nn" is the number of times that this CPU needed nothing. Alert
326 readers will note that the rcu "nn" number for a given CPU very 326 readers will note that the rcu "nn" number for a given CPU very
327 closely matches the rcu_bh "np" number for that same CPU. This 327 closely matches the rcu_bh "np" number for that same CPU. This
328 is due to short-circuit evaluation in rcu_pending(). 328 is due to short-circuit evaluation in rcu_pending().
329
330
331CONFIG_TINY_RCU and CONFIG_TINY_PREEMPT_RCU debugfs Files and Formats
332
333These implementations of RCU provides a single debugfs file under the
334top-level directory RCU, namely rcu/rcudata, which displays fields in
335rcu_bh_ctrlblk, rcu_sched_ctrlblk and, for CONFIG_TINY_PREEMPT_RCU,
336rcu_preempt_ctrlblk.
337
338The output of "cat rcu/rcudata" is as follows:
339
340rcu_preempt: qlen=24 gp=1097669 g197/p197/c197 tasks=...
341 ttb=. btg=no ntb=184 neb=0 nnb=183 j=01f7 bt=0274
342 normal balk: nt=1097669 gt=0 bt=371 b=0 ny=25073378 nos=0
343 exp balk: bt=0 nos=0
344rcu_sched: qlen: 0
345rcu_bh: qlen: 0
346
347This is split into rcu_preempt, rcu_sched, and rcu_bh sections, with the
348rcu_preempt section appearing only in CONFIG_TINY_PREEMPT_RCU builds.
349The last three lines of the rcu_preempt section appear only in
350CONFIG_RCU_BOOST kernel builds. The fields are as follows:
351
352o "qlen" is the number of RCU callbacks currently waiting either
353 for an RCU grace period or waiting to be invoked. This is the
354 only field present for rcu_sched and rcu_bh, due to the
355 short-circuiting of grace period in those two cases.
356
357o "gp" is the number of grace periods that have completed.
358
359o "g197/p197/c197" displays the grace-period state, with the
360 "g" number being the number of grace periods that have started
361 (mod 256), the "p" number being the number of grace periods
362 that the CPU has responded to (also mod 256), and the "c"
363 number being the number of grace periods that have completed
364 (once again mode 256).
365
366 Why have both "gp" and "g"? Because the data flowing into
367 "gp" is only present in a CONFIG_RCU_TRACE kernel.
368
369o "tasks" is a set of bits. The first bit is "T" if there are
370 currently tasks that have recently blocked within an RCU
371 read-side critical section, the second bit is "N" if any of the
372 aforementioned tasks are blocking the current RCU grace period,
373 and the third bit is "E" if any of the aforementioned tasks are
374 blocking the current expedited grace period. Each bit is "."
375 if the corresponding condition does not hold.
376
377o "ttb" is a single bit. It is "B" if any of the blocked tasks
378 need to be priority boosted and "." otherwise.
379
380o "btg" indicates whether boosting has been carried out during
381 the current grace period, with "exp" indicating that boosting
382 is in progress for an expedited grace period, "no" indicating
383 that boosting has not yet started for a normal grace period,
384 "begun" indicating that boosting has bebug for a normal grace
385 period, and "done" indicating that boosting has completed for
386 a normal grace period.
387
388o "ntb" is the total number of tasks subjected to RCU priority boosting
389 periods since boot.
390
391o "neb" is the number of expedited grace periods that have had
392 to resort to RCU priority boosting since boot.
393
394o "nnb" is the number of normal grace periods that have had
395 to resort to RCU priority boosting since boot.
396
397o "j" is the low-order 12 bits of the jiffies counter in hexadecimal.
398
399o "bt" is the low-order 12 bits of the value that the jiffies counter
400 will have at the next time that boosting is scheduled to begin.
401
402o In the line beginning with "normal balk", the fields are as follows:
403
404 o "nt" is the number of times that the system balked from
405 boosting because there were no blocked tasks to boost.
406 Note that the system will balk from boosting even if the
407 grace period is overdue when the currently running task
408 is looping within an RCU read-side critical section.
409 There is no point in boosting in this case, because
410 boosting a running task won't make it run any faster.
411
412 o "gt" is the number of times that the system balked
413 from boosting because, although there were blocked tasks,
414 none of them were preventing the current grace period
415 from completing.
416
417 o "bt" is the number of times that the system balked
418 from boosting because boosting was already in progress.
419
420 o "b" is the number of times that the system balked from
421 boosting because boosting had already completed for
422 the grace period in question.
423
424 o "ny" is the number of times that the system balked from
425 boosting because it was not yet time to start boosting
426 the grace period in question.
427
428 o "nos" is the number of times that the system balked from
429 boosting for inexplicable ("not otherwise specified")
430 reasons. This can actually happen due to races involving
431 increments of the jiffies counter.
432
433o In the line beginning with "exp balk", the fields are as follows:
434
435 o "bt" is the number of times that the system balked from
436 boosting because there were no blocked tasks to boost.
437
438 o "nos" is the number of times that the system balked from
439 boosting for inexplicable ("not otherwise specified")
440 reasons.
diff --git a/Documentation/accounting/getdelays.c b/Documentation/accounting/getdelays.c
index a2976a6de033..e9c77788a39d 100644
--- a/Documentation/accounting/getdelays.c
+++ b/Documentation/accounting/getdelays.c
@@ -516,6 +516,7 @@ int main(int argc, char *argv[])
516 default: 516 default:
517 fprintf(stderr, "Unknown nla_type %d\n", 517 fprintf(stderr, "Unknown nla_type %d\n",
518 na->nla_type); 518 na->nla_type);
519 case TASKSTATS_TYPE_NULL:
519 break; 520 break;
520 } 521 }
521 na = (struct nlattr *) (GENLMSG_DATA(&msg) + len); 522 na = (struct nlattr *) (GENLMSG_DATA(&msg) + len);
diff --git a/Documentation/arm/00-INDEX b/Documentation/arm/00-INDEX
index ecf7d04bca26..91c24a1e8a9e 100644
--- a/Documentation/arm/00-INDEX
+++ b/Documentation/arm/00-INDEX
@@ -34,3 +34,5 @@ memory.txt
34 - description of the virtual memory layout 34 - description of the virtual memory layout
35nwfpe/ 35nwfpe/
36 - NWFPE floating point emulator documentation 36 - NWFPE floating point emulator documentation
37swp_emulation
38 - SWP/SWPB emulation handler/logging description
diff --git a/Documentation/arm/OMAP/omap_pm b/Documentation/arm/OMAP/omap_pm
index 5389440aade3..9012bb039094 100644
--- a/Documentation/arm/OMAP/omap_pm
+++ b/Documentation/arm/OMAP/omap_pm
@@ -127,3 +127,28 @@ implementation needs:
12710. (*pdata->cpu_set_freq)(unsigned long f) 12710. (*pdata->cpu_set_freq)(unsigned long f)
128 128
12911. (*pdata->cpu_get_freq)(void) 12911. (*pdata->cpu_get_freq)(void)
130
131Customizing OPP for platform
132============================
133Defining CONFIG_PM should enable OPP layer for the silicon
134and the registration of OPP table should take place automatically.
135However, in special cases, the default OPP table may need to be
136tweaked, for e.g.:
137 * enable default OPPs which are disabled by default, but which
138 could be enabled on a platform
139 * Disable an unsupported OPP on the platform
140 * Define and add a custom opp table entry
141in these cases, the board file needs to do additional steps as follows:
142arch/arm/mach-omapx/board-xyz.c
143 #include "pm.h"
144 ....
145 static void __init omap_xyz_init_irq(void)
146 {
147 ....
148 /* Initialize the default table */
149 omapx_opp_init();
150 /* Do customization to the defaults */
151 ....
152 }
153NOTE: omapx_opp_init will be omap3_opp_init or as required
154based on the omap family.
diff --git a/Documentation/arm/swp_emulation b/Documentation/arm/swp_emulation
new file mode 100644
index 000000000000..af903d22fd93
--- /dev/null
+++ b/Documentation/arm/swp_emulation
@@ -0,0 +1,27 @@
1Software emulation of deprecated SWP instruction (CONFIG_SWP_EMULATE)
2---------------------------------------------------------------------
3
4ARMv6 architecture deprecates use of the SWP/SWPB instructions, and recommeds
5moving to the load-locked/store-conditional instructions LDREX and STREX.
6
7ARMv7 multiprocessing extensions introduce the ability to disable these
8instructions, triggering an undefined instruction exception when executed.
9Trapped instructions are emulated using an LDREX/STREX or LDREXB/STREXB
10sequence. If a memory access fault (an abort) occurs, a segmentation fault is
11signalled to the triggering process.
12
13/proc/cpu/swp_emulation holds some statistics/information, including the PID of
14the last process to trigger the emulation to be invocated. For example:
15---
16Emulated SWP: 12
17Emulated SWPB: 0
18Aborted SWP{B}: 1
19Last process: 314
20---
21
22NOTE: when accessing uncached shared regions, LDREX/STREX rely on an external
23transaction monitoring block called a global monitor to maintain update
24atomicity. If your system does not implement a global monitor, this option can
25cause programs that perform SWP operations to uncached memory to deadlock, as
26the STREX operation will always fail.
27
diff --git a/Documentation/cgroups/cgroup_event_listener.c b/Documentation/cgroups/cgroup_event_listener.c
index 8c2bfc4a6358..3e082f96dc12 100644
--- a/Documentation/cgroups/cgroup_event_listener.c
+++ b/Documentation/cgroups/cgroup_event_listener.c
@@ -91,7 +91,7 @@ int main(int argc, char **argv)
91 91
92 if (ret == -1) { 92 if (ret == -1) {
93 perror("cgroup.event_control " 93 perror("cgroup.event_control "
94 "is not accessable any more"); 94 "is not accessible any more");
95 break; 95 break;
96 } 96 }
97 97
diff --git a/Documentation/cgroups/cgroups.txt b/Documentation/cgroups/cgroups.txt
index 190018b0c649..44b8b7af8019 100644
--- a/Documentation/cgroups/cgroups.txt
+++ b/Documentation/cgroups/cgroups.txt
@@ -355,13 +355,13 @@ subsystems, type:
355 355
356To change the set of subsystems bound to a mounted hierarchy, just 356To change the set of subsystems bound to a mounted hierarchy, just
357remount with different options: 357remount with different options:
358# mount -o remount,cpuset,ns hier1 /dev/cgroup 358# mount -o remount,cpuset,blkio hier1 /dev/cgroup
359 359
360Now memory is removed from the hierarchy and ns is added. 360Now memory is removed from the hierarchy and blkio is added.
361 361
362Note this will add ns to the hierarchy but won't remove memory or 362Note this will add blkio to the hierarchy but won't remove memory or
363cpuset, because the new options are appended to the old ones: 363cpuset, because the new options are appended to the old ones:
364# mount -o remount,ns /dev/cgroup 364# mount -o remount,blkio /dev/cgroup
365 365
366To Specify a hierarchy's release_agent: 366To Specify a hierarchy's release_agent:
367# mount -t cgroup -o cpuset,release_agent="/sbin/cpuset_release_agent" \ 367# mount -t cgroup -o cpuset,release_agent="/sbin/cpuset_release_agent" \
diff --git a/Documentation/cgroups/memcg_test.txt b/Documentation/cgroups/memcg_test.txt
index b7eececfb195..fc8fa97a09ac 100644
--- a/Documentation/cgroups/memcg_test.txt
+++ b/Documentation/cgroups/memcg_test.txt
@@ -398,7 +398,7 @@ Under below explanation, we assume CONFIG_MEM_RES_CTRL_SWAP=y.
398 written to move_charge_at_immigrate. 398 written to move_charge_at_immigrate.
399 399
400 9.10 Memory thresholds 400 9.10 Memory thresholds
401 Memory controler implements memory thresholds using cgroups notification 401 Memory controller implements memory thresholds using cgroups notification
402 API. You can use Documentation/cgroups/cgroup_event_listener.c to test 402 API. You can use Documentation/cgroups/cgroup_event_listener.c to test
403 it. 403 it.
404 404
diff --git a/Documentation/coccinelle.txt b/Documentation/coccinelle.txt
index 4a276ea7001c..96b690348ba1 100644
--- a/Documentation/coccinelle.txt
+++ b/Documentation/coccinelle.txt
@@ -36,6 +36,10 @@ as a regular user, and install it with
36 36
37 sudo make install 37 sudo make install
38 38
39The semantic patches in the kernel will work best with Coccinelle version
400.2.4 or later. Using earlier versions may incur some parse errors in the
41semantic patch code, but any results that are obtained should still be
42correct.
39 43
40 Using Coccinelle on the Linux kernel 44 Using Coccinelle on the Linux kernel
41~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 45~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
diff --git a/Documentation/development-process/2.Process b/Documentation/development-process/2.Process
index 97726eba6102..911a45186340 100644
--- a/Documentation/development-process/2.Process
+++ b/Documentation/development-process/2.Process
@@ -154,7 +154,7 @@ The stages that a patch goes through are, generally:
154 inclusion, it should be accepted by a relevant subsystem maintainer - 154 inclusion, it should be accepted by a relevant subsystem maintainer -
155 though this acceptance is not a guarantee that the patch will make it 155 though this acceptance is not a guarantee that the patch will make it
156 all the way to the mainline. The patch will show up in the maintainer's 156 all the way to the mainline. The patch will show up in the maintainer's
157 subsystem tree and into the staging trees (described below). When the 157 subsystem tree and into the -next trees (described below). When the
158 process works, this step leads to more extensive review of the patch and 158 process works, this step leads to more extensive review of the patch and
159 the discovery of any problems resulting from the integration of this 159 the discovery of any problems resulting from the integration of this
160 patch with work being done by others. 160 patch with work being done by others.
@@ -236,7 +236,7 @@ finding the right maintainer. Sending patches directly to Linus is not
236normally the right way to go. 236normally the right way to go.
237 237
238 238
2392.4: STAGING TREES 2392.4: NEXT TREES
240 240
241The chain of subsystem trees guides the flow of patches into the kernel, 241The chain of subsystem trees guides the flow of patches into the kernel,
242but it also raises an interesting question: what if somebody wants to look 242but it also raises an interesting question: what if somebody wants to look
@@ -250,7 +250,7 @@ changes land in the mainline kernel. One could pull changes from all of
250the interesting subsystem trees, but that would be a big and error-prone 250the interesting subsystem trees, but that would be a big and error-prone
251job. 251job.
252 252
253The answer comes in the form of staging trees, where subsystem trees are 253The answer comes in the form of -next trees, where subsystem trees are
254collected for testing and review. The older of these trees, maintained by 254collected for testing and review. The older of these trees, maintained by
255Andrew Morton, is called "-mm" (for memory management, which is how it got 255Andrew Morton, is called "-mm" (for memory management, which is how it got
256started). The -mm tree integrates patches from a long list of subsystem 256started). The -mm tree integrates patches from a long list of subsystem
@@ -275,7 +275,7 @@ directory at:
275Use of the MMOTM tree is likely to be a frustrating experience, though; 275Use of the MMOTM tree is likely to be a frustrating experience, though;
276there is a definite chance that it will not even compile. 276there is a definite chance that it will not even compile.
277 277
278The other staging tree, started more recently, is linux-next, maintained by 278The other -next tree, started more recently, is linux-next, maintained by
279Stephen Rothwell. The linux-next tree is, by design, a snapshot of what 279Stephen Rothwell. The linux-next tree is, by design, a snapshot of what
280the mainline is expected to look like after the next merge window closes. 280the mainline is expected to look like after the next merge window closes.
281Linux-next trees are announced on the linux-kernel and linux-next mailing 281Linux-next trees are announced on the linux-kernel and linux-next mailing
@@ -303,12 +303,25 @@ volatility of linux-next tends to make it a difficult development target.
303See http://lwn.net/Articles/289013/ for more information on this topic, and 303See http://lwn.net/Articles/289013/ for more information on this topic, and
304stay tuned; much is still in flux where linux-next is involved. 304stay tuned; much is still in flux where linux-next is involved.
305 305
306Besides the mmotm and linux-next trees, the kernel source tree now contains 3062.4.1: STAGING TREES
307the drivers/staging/ directory and many sub-directories for drivers or 307
308filesystems that are on their way to being added to the kernel tree 308The kernel source tree now contains the drivers/staging/ directory, where
309proper, but they remain in drivers/staging/ while they still need more 309many sub-directories for drivers or filesystems that are on their way to
310work. 310being added to the kernel tree live. They remain in drivers/staging while
311 311they still need more work; once complete, they can be moved into the
312kernel proper. This is a way to keep track of drivers that aren't
313up to Linux kernel coding or quality standards, but people may want to use
314them and track development.
315
316Greg Kroah-Hartman currently (as of 2.6.36) maintains the staging tree.
317Drivers that still need work are sent to him, with each driver having
318its own subdirectory in drivers/staging/. Along with the driver source
319files, a TODO file should be present in the directory as well. The TODO
320file lists the pending work that the driver needs for acceptance into
321the kernel proper, as well as a list of people that should be Cc'd for any
322patches to the driver. Staging drivers that don't currently build should
323have their config entries depend upon CONFIG_BROKEN. Once they can
324be successfully built without outside patches, CONFIG_BROKEN can be removed.
312 325
3132.5: TOOLS 3262.5: TOOLS
314 327
diff --git a/Documentation/dontdiff b/Documentation/dontdiff
index d9bcffd59433..470d3dba1a69 100644
--- a/Documentation/dontdiff
+++ b/Documentation/dontdiff
@@ -62,6 +62,10 @@ aic7*reg_print.c*
62aic7*seq.h* 62aic7*seq.h*
63aicasm 63aicasm
64aicdb.h* 64aicdb.h*
65altivec1.c
66altivec2.c
67altivec4.c
68altivec8.c
65asm-offsets.h 69asm-offsets.h
66asm_offsets.h 70asm_offsets.h
67autoconf.h* 71autoconf.h*
@@ -76,6 +80,7 @@ btfixupprep
76build 80build
77bvmlinux 81bvmlinux
78bzImage* 82bzImage*
83capflags.c
79classlist.h* 84classlist.h*
80comp*.log 85comp*.log
81compile.h* 86compile.h*
@@ -94,6 +99,7 @@ devlist.h*
94docproc 99docproc
95elf2ecoff 100elf2ecoff
96elfconfig.h* 101elfconfig.h*
102evergreen_reg_safe.h
97fixdep 103fixdep
98flask.h 104flask.h
99fore200e_mkfirm 105fore200e_mkfirm
@@ -108,9 +114,16 @@ genksyms
108*_gray256.c 114*_gray256.c
109ihex2fw 115ihex2fw
110ikconfig.h* 116ikconfig.h*
117inat-tables.c
111initramfs_data.cpio 118initramfs_data.cpio
112initramfs_data.cpio.gz 119initramfs_data.cpio.gz
113initramfs_list 120initramfs_list
121int16.c
122int1.c
123int2.c
124int32.c
125int4.c
126int8.c
114kallsyms 127kallsyms
115kconfig 128kconfig
116keywords.c 129keywords.c
@@ -140,6 +153,7 @@ mkprep
140mktables 153mktables
141mktree 154mktree
142modpost 155modpost
156modules.builtin
143modules.order 157modules.order
144modversions.h* 158modversions.h*
145ncscope.* 159ncscope.*
@@ -153,14 +167,23 @@ pca200e.bin
153pca200e_ecd.bin2 167pca200e_ecd.bin2
154piggy.gz 168piggy.gz
155piggyback 169piggyback
170piggy.S
156pnmtologo 171pnmtologo
157ppc_defs.h* 172ppc_defs.h*
158pss_boot.h 173pss_boot.h
159qconf 174qconf
175r100_reg_safe.h
176r200_reg_safe.h
177r300_reg_safe.h
178r420_reg_safe.h
179r600_reg_safe.h
160raid6altivec*.c 180raid6altivec*.c
161raid6int*.c 181raid6int*.c
162raid6tables.c 182raid6tables.c
163relocs 183relocs
184rn50_reg_safe.h
185rs600_reg_safe.h
186rv515_reg_safe.h
164series 187series
165setup 188setup
166setup.bin 189setup.bin
@@ -169,6 +192,7 @@ sImage
169sm_tbl* 192sm_tbl*
170split-include 193split-include
171syscalltab.h 194syscalltab.h
195tables.c
172tags 196tags
173tftpboot.img 197tftpboot.img
174timeconst.h 198timeconst.h
@@ -190,6 +214,7 @@ vmlinux
190vmlinux-* 214vmlinux-*
191vmlinux.aout 215vmlinux.aout
192vmlinux.lds 216vmlinux.lds
217voffset.h
193vsyscall.lds 218vsyscall.lds
194vsyscall_32.lds 219vsyscall_32.lds
195wanxlfw.inc 220wanxlfw.inc
@@ -200,3 +225,4 @@ wakeup.elf
200wakeup.lds 225wakeup.lds
201zImage* 226zImage*
202zconf.hash.c 227zconf.hash.c
228zoffset.h
diff --git a/Documentation/driver-model/interface.txt b/Documentation/driver-model/interface.txt
deleted file mode 100644
index c66912bfe866..000000000000
--- a/Documentation/driver-model/interface.txt
+++ /dev/null
@@ -1,129 +0,0 @@
1
2Device Interfaces
3
4Introduction
5~~~~~~~~~~~~
6
7Device interfaces are the logical interfaces of device classes that correlate
8directly to userspace interfaces, like device nodes.
9
10Each device class may have multiple interfaces through which you can
11access the same device. An input device may support the mouse interface,
12the 'evdev' interface, and the touchscreen interface. A SCSI disk would
13support the disk interface, the SCSI generic interface, and possibly a raw
14device interface.
15
16Device interfaces are registered with the class they belong to. As devices
17are added to the class, they are added to each interface registered with
18the class. The interface is responsible for determining whether the device
19supports the interface or not.
20
21
22Programming Interface
23~~~~~~~~~~~~~~~~~~~~~
24
25struct device_interface {
26 char * name;
27 rwlock_t lock;
28 u32 devnum;
29 struct device_class * devclass;
30
31 struct list_head node;
32 struct driver_dir_entry dir;
33
34 int (*add_device)(struct device *);
35 int (*add_device)(struct intf_data *);
36};
37
38int interface_register(struct device_interface *);
39void interface_unregister(struct device_interface *);
40
41
42An interface must specify the device class it belongs to. It is added
43to that class's list of interfaces on registration.
44
45
46Interfaces can be added to a device class at any time. Whenever it is
47added, each device in the class is passed to the interface's
48add_device callback. When an interface is removed, each device is
49removed from the interface.
50
51
52Devices
53~~~~~~~
54Once a device is added to a device class, it is added to each
55interface that is registered with the device class. The class
56is expected to place a class-specific data structure in
57struct device::class_data. The interface can use that (along with
58other fields of struct device) to determine whether or not the driver
59and/or device support that particular interface.
60
61
62Data
63~~~~
64
65struct intf_data {
66 struct list_head node;
67 struct device_interface * intf;
68 struct device * dev;
69 u32 intf_num;
70};
71
72int interface_add_data(struct interface_data *);
73
74The interface is responsible for allocating and initializing a struct
75intf_data and calling interface_add_data() to add it to the device's list
76of interfaces it belongs to. This list will be iterated over when the device
77is removed from the class (instead of all possible interfaces for a class).
78This structure should probably be embedded in whatever per-device data
79structure the interface is allocating anyway.
80
81Devices are enumerated within the interface. This happens in interface_add_data()
82and the enumerated value is stored in the struct intf_data for that device.
83
84sysfs
85~~~~~
86Each interface is given a directory in the directory of the device
87class it belongs to:
88
89Interfaces get a directory in the class's directory as well:
90
91 class/
92 `-- input
93 |-- devices
94 |-- drivers
95 |-- mouse
96 `-- evdev
97
98When a device is added to the interface, a symlink is created that points
99to the device's directory in the physical hierarchy:
100
101 class/
102 `-- input
103 |-- devices
104 | `-- 1 -> ../../../root/pci0/00:1f.0/usb_bus/00:1f.2-1:0/
105 |-- drivers
106 | `-- usb:usb_mouse -> ../../../bus/drivers/usb_mouse/
107 |-- mouse
108 | `-- 1 -> ../../../root/pci0/00:1f.0/usb_bus/00:1f.2-1:0/
109 `-- evdev
110 `-- 1 -> ../../../root/pci0/00:1f.0/usb_bus/00:1f.2-1:0/
111
112
113Future Plans
114~~~~~~~~~~~~
115A device interface is correlated directly with a userspace interface
116for a device, specifically a device node. For instance, a SCSI disk
117exposes at least two interfaces to userspace: the standard SCSI disk
118interface and the SCSI generic interface. It might also export a raw
119device interface.
120
121Many interfaces have a major number associated with them and each
122device gets a minor number. Or, multiple interfaces might share one
123major number, and each will receive a range of minor numbers (like in
124the case of input devices).
125
126These major and minor numbers could be stored in the interface
127structure. Major and minor allocations could happen when the interface
128is registered with the class, or via a helper function.
129
diff --git a/Documentation/dvb/lmedm04.txt b/Documentation/dvb/lmedm04.txt
index e175784b89bf..641886504201 100644
--- a/Documentation/dvb/lmedm04.txt
+++ b/Documentation/dvb/lmedm04.txt
@@ -46,7 +46,7 @@ and run
46Other LG firmware can be extracted manually from US280D.sys 46Other LG firmware can be extracted manually from US280D.sys
47only found in windows/system32/driver. 47only found in windows/system32/driver.
48 48
49dd if=US280D.sys ibs=1 skip=42616 count=3668 of=dvb-usb-lme2510-lg.fw 49dd if=US280D.sys ibs=1 skip=42360 count=3924 of=dvb-usb-lme2510-lg.fw
50 50
51for DM04 LME2510C (LG Tuner) 51for DM04 LME2510C (LG Tuner)
52--------------------------- 52---------------------------
diff --git a/Documentation/edac.txt b/Documentation/edac.txt
index 0b875e8da969..9ee774de57cd 100644
--- a/Documentation/edac.txt
+++ b/Documentation/edac.txt
@@ -196,7 +196,7 @@ csrow3.
196The representation of the above is reflected in the directory tree 196The representation of the above is reflected in the directory tree
197in EDAC's sysfs interface. Starting in directory 197in EDAC's sysfs interface. Starting in directory
198/sys/devices/system/edac/mc each memory controller will be represented 198/sys/devices/system/edac/mc each memory controller will be represented
199by its own 'mcX' directory, where 'X" is the index of the MC. 199by its own 'mcX' directory, where 'X' is the index of the MC.
200 200
201 201
202 ..../edac/mc/ 202 ..../edac/mc/
@@ -207,7 +207,7 @@ by its own 'mcX' directory, where 'X" is the index of the MC.
207 .... 207 ....
208 208
209Under each 'mcX' directory each 'csrowX' is again represented by a 209Under each 'mcX' directory each 'csrowX' is again represented by a
210'csrowX', where 'X" is the csrow index: 210'csrowX', where 'X' is the csrow index:
211 211
212 212
213 .../mc/mc0/ 213 .../mc/mc0/
@@ -232,7 +232,7 @@ EDAC control and attribute files.
232 232
233 233
234In 'mcX' directories are EDAC control and attribute files for 234In 'mcX' directories are EDAC control and attribute files for
235this 'X" instance of the memory controllers: 235this 'X' instance of the memory controllers:
236 236
237 237
238Counter reset control file: 238Counter reset control file:
@@ -343,7 +343,7 @@ Sdram memory scrubbing rate:
343'csrowX' DIRECTORIES 343'csrowX' DIRECTORIES
344 344
345In the 'csrowX' directories are EDAC control and attribute files for 345In the 'csrowX' directories are EDAC control and attribute files for
346this 'X" instance of csrow: 346this 'X' instance of csrow:
347 347
348 348
349Total Uncorrectable Errors count attribute file: 349Total Uncorrectable Errors count attribute file:
diff --git a/Documentation/email-clients.txt b/Documentation/email-clients.txt
index 945ff3fda433..a0b58e29f911 100644
--- a/Documentation/email-clients.txt
+++ b/Documentation/email-clients.txt
@@ -104,6 +104,13 @@ Then from the "Message" menu item, select insert file and choose your patch.
104As an added bonus you can customise the message creation toolbar menu 104As an added bonus you can customise the message creation toolbar menu
105and put the "insert file" icon there. 105and put the "insert file" icon there.
106 106
107Make the the composer window wide enough so that no lines wrap. As of
108KMail 1.13.5 (KDE 4.5.4), KMail will apply word wrapping when sending
109the email if the lines wrap in the composer window. Having word wrapping
110disabled in the Options menu isn't enough. Thus, if your patch has very
111long lines, you must make the composer window very wide before sending
112the email. See: https://bugs.kde.org/show_bug.cgi?id=174034
113
107You can safely GPG sign attachments, but inlined text is preferred for 114You can safely GPG sign attachments, but inlined text is preferred for
108patches so do not GPG sign them. Signing patches that have been inserted 115patches so do not GPG sign them. Signing patches that have been inserted
109as inlined text will make them tricky to extract from their 7-bit encoding. 116as inlined text will make them tricky to extract from their 7-bit encoding.
@@ -179,26 +186,8 @@ Sylpheed (GUI)
179~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 186~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
180Thunderbird (GUI) 187Thunderbird (GUI)
181 188
182By default, thunderbird likes to mangle text, but there are ways to 189Thunderbird is an Outlook clone that likes to mangle text, but there are ways
183coerce it into being nice. 190to coerce it into behaving.
184
185- Under account settings, composition and addressing, uncheck "Compose
186 messages in HTML format".
187
188- Edit your Thunderbird config settings to tell it not to wrap lines:
189 user_pref("mailnews.wraplength", 0);
190
191- Edit your Thunderbird config settings so that it won't use format=flowed:
192 user_pref("mailnews.send_plaintext_flowed", false);
193
194- You need to get Thunderbird into preformat mode:
195. If you compose HTML messages by default, it's not too hard. Just select
196 "Preformat" from the drop-down box just under the subject line.
197. If you compose in text by default, you have to tell it to compose a new
198 message in HTML (just as a one-off), and then force it from there back to
199 text, else it will wrap lines. To do this, use shift-click on the Write
200 icon to compose to get HTML compose mode, then select "Preformat" from
201 the drop-down box just under the subject line.
202 191
203- Allows use of an external editor: 192- Allows use of an external editor:
204 The easiest thing to do with Thunderbird and patches is to use an 193 The easiest thing to do with Thunderbird and patches is to use an
@@ -208,6 +197,27 @@ coerce it into being nice.
208 View->Toolbars->Customize... and finally just click on it when in the 197 View->Toolbars->Customize... and finally just click on it when in the
209 Compose dialog. 198 Compose dialog.
210 199
200To beat some sense out of the internal editor, do this:
201
202- Under account settings, composition and addressing, uncheck "Compose
203 messages in HTML format".
204
205- Edit your Thunderbird config settings so that it won't use format=flowed.
206 Go to "edit->preferences->advanced->config editor" to bring up the
207 thunderbird's registry editor, and set "mailnews.send_plaintext_flowed" to
208 "false".
209
210- Enable "preformat" mode: Shft-click on the Write icon to bring up the HTML
211 composer, select "Preformat" from the drop-down box just under the subject
212 line, then close the message without saving. (This setting also applies to
213 the text composer, but the only control for it is in the HTML composer.)
214
215- Install the "toggle wordwrap" extension. Download the file from:
216 https://addons.mozilla.org/thunderbird/addon/2351/
217 Then go to "tools->add ons", select "install" at the bottom of the screen,
218 and browse to where you saved the .xul file. This adds an "Enable
219 Wordwrap" entry under the Options menu of the message composer.
220
211~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 221~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
212TkRat (GUI) 222TkRat (GUI)
213 223
diff --git a/Documentation/fb/00-INDEX b/Documentation/fb/00-INDEX
index a618fd99c9f0..30a70542e823 100644
--- a/Documentation/fb/00-INDEX
+++ b/Documentation/fb/00-INDEX
@@ -4,33 +4,41 @@ please mail me.
4 Geert Uytterhoeven <geert@linux-m68k.org> 4 Geert Uytterhoeven <geert@linux-m68k.org>
5 5
600-INDEX 600-INDEX
7 - this file 7 - this file.
8arkfb.txt 8arkfb.txt
9 - info on the fbdev driver for ARK Logic chips. 9 - info on the fbdev driver for ARK Logic chips.
10aty128fb.txt 10aty128fb.txt
11 - info on the ATI Rage128 frame buffer driver. 11 - info on the ATI Rage128 frame buffer driver.
12cirrusfb.txt 12cirrusfb.txt
13 - info on the driver for Cirrus Logic chipsets. 13 - info on the driver for Cirrus Logic chipsets.
14cmap_xfbdev.txt
15 - an introduction to fbdev's cmap structures.
14deferred_io.txt 16deferred_io.txt
15 - an introduction to deferred IO. 17 - an introduction to deferred IO.
18efifb.txt
19 - info on the EFI platform driver for Intel based Apple computers.
20ep93xx-fb.txt
21 - info on the driver for EP93xx LCD controller.
16fbcon.txt 22fbcon.txt
17 - intro to and usage guide for the framebuffer console (fbcon). 23 - intro to and usage guide for the framebuffer console (fbcon).
18framebuffer.txt 24framebuffer.txt
19 - introduction to frame buffer devices. 25 - introduction to frame buffer devices.
20imacfb.txt 26gxfb.txt
21 - info on the generic EFI platform driver for Intel based Macs. 27 - info on the framebuffer driver for AMD Geode GX2 based processors.
22intel810.txt 28intel810.txt
23 - documentation for the Intel 810/815 framebuffer driver. 29 - documentation for the Intel 810/815 framebuffer driver.
24intelfb.txt 30intelfb.txt
25 - docs for Intel 830M/845G/852GM/855GM/865G/915G/945G fb driver. 31 - docs for Intel 830M/845G/852GM/855GM/865G/915G/945G fb driver.
26internals.txt 32internals.txt
27 - quick overview of frame buffer device internals. 33 - quick overview of frame buffer device internals.
34lxfb.txt
35 - info on the framebuffer driver for AMD Geode LX based processors.
28matroxfb.txt 36matroxfb.txt
29 - info on the Matrox framebuffer driver for Alpha, Intel and PPC. 37 - info on the Matrox framebuffer driver for Alpha, Intel and PPC.
38metronomefb.txt
39 - info on the driver for the Metronome display controller.
30modedb.txt 40modedb.txt
31 - info on the video mode database. 41 - info on the video mode database.
32matroxfb.txt
33 - info on the Matrox frame buffer driver.
34pvr2fb.txt 42pvr2fb.txt
35 - info on the PowerVR 2 frame buffer driver. 43 - info on the PowerVR 2 frame buffer driver.
36pxafb.txt 44pxafb.txt
@@ -39,13 +47,23 @@ s3fb.txt
39 - info on the fbdev driver for S3 Trio/Virge chips. 47 - info on the fbdev driver for S3 Trio/Virge chips.
40sa1100fb.txt 48sa1100fb.txt
41 - information about the driver for the SA-1100 LCD controller. 49 - information about the driver for the SA-1100 LCD controller.
50sh7760fb.txt
51 - info on the SH7760/SH7763 integrated LCDC Framebuffer driver.
42sisfb.txt 52sisfb.txt
43 - info on the framebuffer device driver for various SiS chips. 53 - info on the framebuffer device driver for various SiS chips.
44sstfb.txt 54sstfb.txt
45 - info on the frame buffer driver for 3dfx' Voodoo Graphics boards. 55 - info on the frame buffer driver for 3dfx' Voodoo Graphics boards.
46tgafb.txt 56tgafb.txt
47 - info on the TGA (DECChip 21030) frame buffer driver 57 - info on the TGA (DECChip 21030) frame buffer driver.
58tridentfb.txt
59 info on the framebuffer driver for some Trident chip based cards.
60uvesafb.txt
61 - info on the userspace VESA (VBE2+ compliant) frame buffer device.
48vesafb.txt 62vesafb.txt
49 - info on the VESA frame buffer device 63 - info on the VESA frame buffer device.
64viafb.modes
65 - list of modes for VIA Integration Graphic Chip.
66viafb.txt
67 - info on the VIA Integration Graphic Chip console framebuffer driver.
50vt8623fb.txt 68vt8623fb.txt
51 - info on the fb driver for the graphics core in VIA VT8623 chipsets. 69 - info on the fb driver for the graphics core in VIA VT8623 chipsets.
diff --git a/Documentation/fb/udlfb.txt b/Documentation/fb/udlfb.txt
new file mode 100644
index 000000000000..7fdde2a02a27
--- /dev/null
+++ b/Documentation/fb/udlfb.txt
@@ -0,0 +1,144 @@
1
2What is udlfb?
3===============
4
5This is a driver for DisplayLink USB 2.0 era graphics chips.
6
7DisplayLink chips provide simple hline/blit operations with some compression,
8pairing that with a hardware framebuffer (16MB) on the other end of the
9USB wire. That hardware framebuffer is able to drive the VGA, DVI, or HDMI
10monitor with no CPU involvement until a pixel has to change.
11
12The CPU or other local resource does all the rendering; optinally compares the
13result with a local shadow of the remote hardware framebuffer to identify
14the minimal set of pixels that have changed; and compresses and sends those
15pixels line-by-line via USB bulk transfers.
16
17Because of the efficiency of bulk transfers and a protocol on top that
18does not require any acks - the effect is very low latency that
19can support surprisingly high resolutions with good performance for
20non-gaming and non-video applications.
21
22Mode setting, EDID read, etc are other bulk or control transfers. Mode
23setting is very flexible - able to set nearly arbitrary modes from any timing.
24
25Advantages of USB graphics in general:
26
27 * Ability to add a nearly arbitrary number of displays to any USB 2.0
28 capable system. On Linux, number of displays is limited by fbdev interface
29 (FB_MAX is currently 32). Of course, all USB devices on the same
30 host controller share the same 480Mbs USB 2.0 interface.
31
32Advantages of supporting DisplayLink chips with kernel framebuffer interface:
33
34 * The actual hardware functionality of DisplayLink chips matches nearly
35 one-to-one with the fbdev interface, making the driver quite small and
36 tight relative to the functionality it provides.
37 * X servers and other applications can use the standard fbdev interface
38 from user mode to talk to the device, without needing to know anything
39 about USB or DisplayLink's protocol at all. A "displaylink" X driver
40 and a slightly modified "fbdev" X driver are among those that already do.
41
42Disadvantages:
43
44 * Fbdev's mmap interface assumes a real hardware framebuffer is mapped.
45 In the case of USB graphics, it is just an allocated (virtual) buffer.
46 Writes need to be detected and encoded into USB bulk transfers by the CPU.
47 Accurate damage/changed area notifications work around this problem.
48 In the future, hopefully fbdev will be enhanced with an small standard
49 interface to allow mmap clients to report damage, for the benefit
50 of virtual or remote framebuffers.
51 * Fbdev does not arbitrate client ownership of the framebuffer well.
52 * Fbcon assumes the first framebuffer it finds should be consumed for console.
53 * It's not clear what the future of fbdev is, given the rise of KMS/DRM.
54
55How to use it?
56==============
57
58Udlfb, when loaded as a module, will match against all USB 2.0 generation
59DisplayLink chips (Alex and Ollie family). It will then attempt to read the EDID
60of the monitor, and set the best common mode between the DisplayLink device
61and the monitor's capabilities.
62
63If the DisplayLink device is successful, it will paint a "green screen" which
64means that from a hardware and fbdev software perspective, everything is good.
65
66At that point, a /dev/fb? interface will be present for user-mode applications
67to open and begin writing to the framebuffer of the DisplayLink device using
68standard fbdev calls. Note that if mmap() is used, by default the user mode
69application must send down damage notifcations to trigger repaints of the
70changed regions. Alternatively, udlfb can be recompiled with experimental
71defio support enabled, to support a page-fault based detection mechanism
72that can work without explicit notifcation.
73
74The most common client of udlfb is xf86-video-displaylink or a modified
75xf86-video-fbdev X server. These servers have no real DisplayLink specific
76code. They write to the standard framebuffer interface and rely on udlfb
77to do its thing. The one extra feature they have is the ability to report
78rectangles from the X DAMAGE protocol extension down to udlfb via udlfb's
79damage interface (which will hopefully be standardized for all virtual
80framebuffers that need damage info). These damage notifications allow
81udlfb to efficiently process the changed pixels.
82
83Module Options
84==============
85
86Special configuration for udlfb is usually unnecessary. There are a few
87options, however.
88
89From the command line, pass options to modprobe
90modprobe udlfb defio=1 console=1
91
92Or for permanent option, create file like /etc/modprobe.d/options with text
93options udlfb defio=1 console=1
94
95Accepted options:
96
97fb_defio Make use of the fb_defio (CONFIG_FB_DEFERRED_IO) kernel
98 module to track changed areas of the framebuffer by page faults.
99 Standard fbdev applications that use mmap but that do not
100 report damage, may be able to work with this enabled.
101 Disabled by default because of overhead and other issues.
102
103console Allow fbcon to attach to udlfb provided framebuffers. This
104 is disabled by default because fbcon will aggressively consume
105 the first framebuffer it finds, which isn't usually what the
106 user wants in the case of USB displays.
107
108Sysfs Attributes
109================
110
111Udlfb creates several files in /sys/class/graphics/fb?
112Where ? is the sequential framebuffer id of the particular DisplayLink device
113
114edid If a valid EDID blob is written to this file (typically
115 by a udev rule), then udlfb will use this EDID as a
116 backup in case reading the actual EDID of the monitor
117 attached to the DisplayLink device fails. This is
118 especially useful for fixed panels, etc. that cannot
119 communicate their capabilities via EDID. Reading
120 this file returns the current EDID of the attached
121 monitor (or last backup value written). This is
122 useful to get the EDID of the attached monitor,
123 which can be passed to utilities like parse-edid.
124
125metrics_bytes_rendered 32-bit count of pixel bytes rendered
126
127metrics_bytes_identical 32-bit count of how many of those bytes were found to be
128 unchanged, based on a shadow framebuffer check
129
130metrics_bytes_sent 32-bit count of how many bytes were transferred over
131 USB to communicate the resulting changed pixels to the
132 hardware. Includes compression and protocol overhead
133
134metrics_cpu_kcycles_used 32-bit count of CPU cycles used in processing the
135 above pixels (in thousands of cycles).
136
137metrics_reset Write-only. Any write to this file resets all metrics
138 above to zero. Note that the 32-bit counters above
139 roll over very quickly. To get reliable results, design
140 performance tests to start and finish in a very short
141 period of time (one minute or less is safe).
142
143--
144Bernie Thompson <bernie@plugable.com>
diff --git a/Documentation/feature-removal-schedule.txt b/Documentation/feature-removal-schedule.txt
index 6c2f55e05f13..6cbbd20534cf 100644
--- a/Documentation/feature-removal-schedule.txt
+++ b/Documentation/feature-removal-schedule.txt
@@ -97,36 +97,38 @@ Who: Pavel Machek <pavel@ucw.cz>
97 97
98--------------------------- 98---------------------------
99 99
100What: Video4Linux API 1 ioctls and from Video devices.
101When: kernel 2.6.38
102Files: include/linux/videodev.h
103Check: include/linux/videodev.h
104Why: V4L1 AP1 was replaced by V4L2 API during migration from 2.4 to 2.6
105 series. The old API have lots of drawbacks and don't provide enough
106 means to work with all video and audio standards. The newer API is
107 already available on the main drivers and should be used instead.
108 Newer drivers should use v4l_compat_translate_ioctl function to handle
109 old calls, replacing to newer ones.
110 Decoder iocts are using internally to allow video drivers to
111 communicate with video decoders. This should also be improved to allow
112 V4L2 calls being translated into compatible internal ioctls.
113 Compatibility ioctls will be provided, for a while, via
114 v4l1-compat module.
115Who: Mauro Carvalho Chehab <mchehab@infradead.org>
116
117---------------------------
118
119What: Video4Linux obsolete drivers using V4L1 API 100What: Video4Linux obsolete drivers using V4L1 API
120When: kernel 2.6.38 101When: kernel 2.6.39
121Files: drivers/staging/cpia/* drivers/staging/stradis/* 102Files: drivers/staging/se401/* drivers/staging/usbvideo/*
122Check: drivers/staging/cpia/cpia.c drivers/staging/stradis/stradis.c 103Check: drivers/staging/se401/se401.c drivers/staging/usbvideo/usbvideo.c
123Why: There are some drivers still using V4L1 API, despite all efforts we've done 104Why: There are some drivers still using V4L1 API, despite all efforts we've done
124 to migrate. Those drivers are for obsolete hardware that the old maintainer 105 to migrate. Those drivers are for obsolete hardware that the old maintainer
125 didn't care (or not have the hardware anymore), and that no other developer 106 didn't care (or not have the hardware anymore), and that no other developer
126 could find any hardware to buy. They probably have no practical usage today, 107 could find any hardware to buy. They probably have no practical usage today,
127 and people with such old hardware could probably keep using an older version 108 and people with such old hardware could probably keep using an older version
128 of the kernel. Those drivers will be moved to staging on 2.6.37 and, if nobody 109 of the kernel. Those drivers will be moved to staging on 2.6.38 and, if nobody
129 care enough to port and test them with V4L2 API, they'll be removed on 2.6.38. 110 cares enough to port and test them with V4L2 API, they'll be removed on 2.6.39.
111Who: Mauro Carvalho Chehab <mchehab@infradead.org>
112
113---------------------------
114
115What: Video4Linux: Remove obsolete ioctl's
116When: kernel 2.6.39
117Files: include/media/videodev2.h
118Why: Some ioctl's were defined wrong on 2.6.2 and 2.6.6, using the wrong
119 type of R/W arguments. They were fixed, but the old ioctl names are
120 still there, maintained to avoid breaking binary compatibility:
121 #define VIDIOC_OVERLAY_OLD _IOWR('V', 14, int)
122 #define VIDIOC_S_PARM_OLD _IOW('V', 22, struct v4l2_streamparm)
123 #define VIDIOC_S_CTRL_OLD _IOW('V', 28, struct v4l2_control)
124 #define VIDIOC_G_AUDIO_OLD _IOWR('V', 33, struct v4l2_audio)
125 #define VIDIOC_G_AUDOUT_OLD _IOWR('V', 49, struct v4l2_audioout)
126 #define VIDIOC_CROPCAP_OLD _IOR('V', 58, struct v4l2_cropcap)
127 There's no sense on preserving those forever, as it is very doubtful
128 that someone would try to use a such old binary with a modern kernel.
129 Removing them will allow us to remove some magic done at the V4L ioctl
130 handler.
131
130Who: Mauro Carvalho Chehab <mchehab@infradead.org> 132Who: Mauro Carvalho Chehab <mchehab@infradead.org>
131 133
132--------------------------- 134---------------------------
@@ -191,6 +193,20 @@ Why: /proc/<pid>/oom_adj allows userspace to influence the oom killer's
191 193
192--------------------------- 194---------------------------
193 195
196What: CS5535/CS5536 obsolete GPIO driver
197When: June 2011
198Files: drivers/staging/cs5535_gpio/*
199Check: drivers/staging/cs5535_gpio/cs5535_gpio.c
200Why: A newer driver replaces this; it is drivers/gpio/cs5535-gpio.c, and
201 integrates with the Linux GPIO subsystem. The old driver has been
202 moved to staging, and will be removed altogether around 2.6.40.
203 Please test the new driver, and ensure that the functionality you
204 need and any bugfixes from the old driver are available in the new
205 one.
206Who: Andres Salomon <dilinger@queued.net>
207
208--------------------------
209
194What: remove EXPORT_SYMBOL(kernel_thread) 210What: remove EXPORT_SYMBOL(kernel_thread)
195When: August 2006 211When: August 2006
196Files: arch/*/kernel/*_ksyms.c 212Files: arch/*/kernel/*_ksyms.c
@@ -564,3 +580,23 @@ Why: This field is deprecated. I2C device drivers shouldn't change their
564Who: Jean Delvare <khali@linux-fr.org> 580Who: Jean Delvare <khali@linux-fr.org>
565 581
566---------------------------- 582----------------------------
583
584What: cancel_rearming_delayed_work[queue]()
585When: 2.6.39
586
587Why: The functions have been superceded by cancel_delayed_work_sync()
588 quite some time ago. The conversion is trivial and there is no
589 in-kernel user left.
590Who: Tejun Heo <tj@kernel.org>
591
592----------------------------
593
594What: Legacy, non-standard chassis intrusion detection interface.
595When: June 2011
596Why: The adm9240, w83792d and w83793 hardware monitoring drivers have
597 legacy interfaces for chassis intrusion detection. A standard
598 interface has been added to each driver, so the legacy interface
599 can be removed.
600Who: Jean Delvare <khali@linux-fr.org>
601
602----------------------------
diff --git a/Documentation/filesystems/Locking b/Documentation/filesystems/Locking
index a91f30890011..977d8919cc69 100644
--- a/Documentation/filesystems/Locking
+++ b/Documentation/filesystems/Locking
@@ -9,23 +9,25 @@ be able to use diff(1).
9 9
10--------------------------- dentry_operations -------------------------- 10--------------------------- dentry_operations --------------------------
11prototypes: 11prototypes:
12 int (*d_revalidate)(struct dentry *, int); 12 int (*d_revalidate)(struct dentry *, struct nameidata *);
13 int (*d_hash) (struct dentry *, struct qstr *); 13 int (*d_hash)(const struct dentry *, const struct inode *,
14 int (*d_compare) (struct dentry *, struct qstr *, struct qstr *); 14 struct qstr *);
15 int (*d_compare)(const struct dentry *, const struct inode *,
16 const struct dentry *, const struct inode *,
17 unsigned int, const char *, const struct qstr *);
15 int (*d_delete)(struct dentry *); 18 int (*d_delete)(struct dentry *);
16 void (*d_release)(struct dentry *); 19 void (*d_release)(struct dentry *);
17 void (*d_iput)(struct dentry *, struct inode *); 20 void (*d_iput)(struct dentry *, struct inode *);
18 char *(*d_dname)((struct dentry *dentry, char *buffer, int buflen); 21 char *(*d_dname)((struct dentry *dentry, char *buffer, int buflen);
19 22
20locking rules: 23locking rules:
21 none have BKL 24 rename_lock ->d_lock may block rcu-walk
22 dcache_lock rename_lock ->d_lock may block 25d_revalidate: no no yes (ref-walk) maybe
23d_revalidate: no no no yes 26d_hash no no no maybe
24d_hash no no no yes 27d_compare: yes no no maybe
25d_compare: no yes no no 28d_delete: no yes no no
26d_delete: yes no yes no 29d_release: no no yes no
27d_release: no no no yes 30d_iput: no no yes no
28d_iput: no no no yes
29d_dname: no no no no 31d_dname: no no no no
30 32
31--------------------------- inode_operations --------------------------- 33--------------------------- inode_operations ---------------------------
@@ -42,18 +44,23 @@ ata *);
42 int (*rename) (struct inode *, struct dentry *, 44 int (*rename) (struct inode *, struct dentry *,
43 struct inode *, struct dentry *); 45 struct inode *, struct dentry *);
44 int (*readlink) (struct dentry *, char __user *,int); 46 int (*readlink) (struct dentry *, char __user *,int);
45 int (*follow_link) (struct dentry *, struct nameidata *); 47 void * (*follow_link) (struct dentry *, struct nameidata *);
48 void (*put_link) (struct dentry *, struct nameidata *, void *);
46 void (*truncate) (struct inode *); 49 void (*truncate) (struct inode *);
47 int (*permission) (struct inode *, int, struct nameidata *); 50 int (*permission) (struct inode *, int, unsigned int);
51 int (*check_acl)(struct inode *, int, unsigned int);
48 int (*setattr) (struct dentry *, struct iattr *); 52 int (*setattr) (struct dentry *, struct iattr *);
49 int (*getattr) (struct vfsmount *, struct dentry *, struct kstat *); 53 int (*getattr) (struct vfsmount *, struct dentry *, struct kstat *);
50 int (*setxattr) (struct dentry *, const char *,const void *,size_t,int); 54 int (*setxattr) (struct dentry *, const char *,const void *,size_t,int);
51 ssize_t (*getxattr) (struct dentry *, const char *, void *, size_t); 55 ssize_t (*getxattr) (struct dentry *, const char *, void *, size_t);
52 ssize_t (*listxattr) (struct dentry *, char *, size_t); 56 ssize_t (*listxattr) (struct dentry *, char *, size_t);
53 int (*removexattr) (struct dentry *, const char *); 57 int (*removexattr) (struct dentry *, const char *);
58 void (*truncate_range)(struct inode *, loff_t, loff_t);
59 long (*fallocate)(struct inode *inode, int mode, loff_t offset, loff_t len);
60 int (*fiemap)(struct inode *, struct fiemap_extent_info *, u64 start, u64 len);
54 61
55locking rules: 62locking rules:
56 all may block, none have BKL 63 all may block
57 i_mutex(inode) 64 i_mutex(inode)
58lookup: yes 65lookup: yes
59create: yes 66create: yes
@@ -66,19 +73,24 @@ rmdir: yes (both) (see below)
66rename: yes (all) (see below) 73rename: yes (all) (see below)
67readlink: no 74readlink: no
68follow_link: no 75follow_link: no
76put_link: no
69truncate: yes (see below) 77truncate: yes (see below)
70setattr: yes 78setattr: yes
71permission: no 79permission: no (may not block if called in rcu-walk mode)
80check_acl: no
72getattr: no 81getattr: no
73setxattr: yes 82setxattr: yes
74getxattr: no 83getxattr: no
75listxattr: no 84listxattr: no
76removexattr: yes 85removexattr: yes
86truncate_range: yes
87fallocate: no
88fiemap: no
77 Additionally, ->rmdir(), ->unlink() and ->rename() have ->i_mutex on 89 Additionally, ->rmdir(), ->unlink() and ->rename() have ->i_mutex on
78victim. 90victim.
79 cross-directory ->rename() has (per-superblock) ->s_vfs_rename_sem. 91 cross-directory ->rename() has (per-superblock) ->s_vfs_rename_sem.
80 ->truncate() is never called directly - it's a callback, not a 92 ->truncate() is never called directly - it's a callback, not a
81method. It's called by vmtruncate() - library function normally used by 93method. It's called by vmtruncate() - deprecated library function used by
82->setattr(). Locking information above applies to that call (i.e. is 94->setattr(). Locking information above applies to that call (i.e. is
83inherited from ->setattr() - vmtruncate() is used when ATTR_SIZE had been 95inherited from ->setattr() - vmtruncate() is used when ATTR_SIZE had been
84passed). 96passed).
@@ -91,7 +103,7 @@ prototypes:
91 struct inode *(*alloc_inode)(struct super_block *sb); 103 struct inode *(*alloc_inode)(struct super_block *sb);
92 void (*destroy_inode)(struct inode *); 104 void (*destroy_inode)(struct inode *);
93 void (*dirty_inode) (struct inode *); 105 void (*dirty_inode) (struct inode *);
94 int (*write_inode) (struct inode *, int); 106 int (*write_inode) (struct inode *, struct writeback_control *wbc);
95 int (*drop_inode) (struct inode *); 107 int (*drop_inode) (struct inode *);
96 void (*evict_inode) (struct inode *); 108 void (*evict_inode) (struct inode *);
97 void (*put_super) (struct super_block *); 109 void (*put_super) (struct super_block *);
@@ -105,10 +117,10 @@ prototypes:
105 int (*show_options)(struct seq_file *, struct vfsmount *); 117 int (*show_options)(struct seq_file *, struct vfsmount *);
106 ssize_t (*quota_read)(struct super_block *, int, char *, size_t, loff_t); 118 ssize_t (*quota_read)(struct super_block *, int, char *, size_t, loff_t);
107 ssize_t (*quota_write)(struct super_block *, int, const char *, size_t, loff_t); 119 ssize_t (*quota_write)(struct super_block *, int, const char *, size_t, loff_t);
120 int (*bdev_try_to_free_page)(struct super_block*, struct page*, gfp_t);
108 121
109locking rules: 122locking rules:
110 All may block [not true, see below] 123 All may block [not true, see below]
111 None have BKL
112 s_umount 124 s_umount
113alloc_inode: 125alloc_inode:
114destroy_inode: 126destroy_inode:
@@ -127,6 +139,7 @@ umount_begin: no
127show_options: no (namespace_sem) 139show_options: no (namespace_sem)
128quota_read: no (see below) 140quota_read: no (see below)
129quota_write: no (see below) 141quota_write: no (see below)
142bdev_try_to_free_page: no (see below)
130 143
131->statfs() has s_umount (shared) when called by ustat(2) (native or 144->statfs() has s_umount (shared) when called by ustat(2) (native or
132compat), but that's an accident of bad API; s_umount is used to pin 145compat), but that's an accident of bad API; s_umount is used to pin
@@ -139,19 +152,25 @@ be the only ones operating on the quota file by the quota code (via
139dqio_sem) (unless an admin really wants to screw up something and 152dqio_sem) (unless an admin really wants to screw up something and
140writes to quota files with quotas on). For other details about locking 153writes to quota files with quotas on). For other details about locking
141see also dquot_operations section. 154see also dquot_operations section.
155->bdev_try_to_free_page is called from the ->releasepage handler of
156the block device inode. See there for more details.
142 157
143--------------------------- file_system_type --------------------------- 158--------------------------- file_system_type ---------------------------
144prototypes: 159prototypes:
145 int (*get_sb) (struct file_system_type *, int, 160 int (*get_sb) (struct file_system_type *, int,
146 const char *, void *, struct vfsmount *); 161 const char *, void *, struct vfsmount *);
162 struct dentry *(*mount) (struct file_system_type *, int,
163 const char *, void *);
147 void (*kill_sb) (struct super_block *); 164 void (*kill_sb) (struct super_block *);
148locking rules: 165locking rules:
149 may block BKL 166 may block
150get_sb yes no 167get_sb yes
151kill_sb yes no 168mount yes
169kill_sb yes
152 170
153->get_sb() returns error or 0 with locked superblock attached to the vfsmount 171->get_sb() returns error or 0 with locked superblock attached to the vfsmount
154(exclusive on ->s_umount). 172(exclusive on ->s_umount).
173->mount() returns ERR_PTR or the root dentry.
155->kill_sb() takes a write-locked superblock, does all shutdown work on it, 174->kill_sb() takes a write-locked superblock, does all shutdown work on it,
156unlocks and drops the reference. 175unlocks and drops the reference.
157 176
@@ -173,28 +192,38 @@ prototypes:
173 sector_t (*bmap)(struct address_space *, sector_t); 192 sector_t (*bmap)(struct address_space *, sector_t);
174 int (*invalidatepage) (struct page *, unsigned long); 193 int (*invalidatepage) (struct page *, unsigned long);
175 int (*releasepage) (struct page *, int); 194 int (*releasepage) (struct page *, int);
195 void (*freepage)(struct page *);
176 int (*direct_IO)(int, struct kiocb *, const struct iovec *iov, 196 int (*direct_IO)(int, struct kiocb *, const struct iovec *iov,
177 loff_t offset, unsigned long nr_segs); 197 loff_t offset, unsigned long nr_segs);
178 int (*launder_page) (struct page *); 198 int (*get_xip_mem)(struct address_space *, pgoff_t, int, void **,
199 unsigned long *);
200 int (*migratepage)(struct address_space *, struct page *, struct page *);
201 int (*launder_page)(struct page *);
202 int (*is_partially_uptodate)(struct page *, read_descriptor_t *, unsigned long);
203 int (*error_remove_page)(struct address_space *, struct page *);
179 204
180locking rules: 205locking rules:
181 All except set_page_dirty may block 206 All except set_page_dirty and freepage may block
182 207
183 BKL PageLocked(page) i_mutex 208 PageLocked(page) i_mutex
184writepage: no yes, unlocks (see below) 209writepage: yes, unlocks (see below)
185readpage: no yes, unlocks 210readpage: yes, unlocks
186sync_page: no maybe 211sync_page: maybe
187writepages: no 212writepages:
188set_page_dirty no no 213set_page_dirty no
189readpages: no 214readpages:
190write_begin: no locks the page yes 215write_begin: locks the page yes
191write_end: no yes, unlocks yes 216write_end: yes, unlocks yes
192perform_write: no n/a yes 217bmap:
193bmap: no 218invalidatepage: yes
194invalidatepage: no yes 219releasepage: yes
195releasepage: no yes 220freepage: yes
196direct_IO: no 221direct_IO:
197launder_page: no yes 222get_xip_mem: maybe
223migratepage: yes (both)
224launder_page: yes
225is_partially_uptodate: yes
226error_remove_page: yes
198 227
199 ->write_begin(), ->write_end(), ->sync_page() and ->readpage() 228 ->write_begin(), ->write_end(), ->sync_page() and ->readpage()
200may be called from the request handler (/dev/loop). 229may be called from the request handler (/dev/loop).
@@ -274,9 +303,8 @@ under spinlock (it cannot block) and is sometimes called with the page
274not locked. 303not locked.
275 304
276 ->bmap() is currently used by legacy ioctl() (FIBMAP) provided by some 305 ->bmap() is currently used by legacy ioctl() (FIBMAP) provided by some
277filesystems and by the swapper. The latter will eventually go away. All 306filesystems and by the swapper. The latter will eventually go away. Please,
278instances do not actually need the BKL. Please, keep it that way and don't 307keep it that way and don't breed new callers.
279breed new callers.
280 308
281 ->invalidatepage() is called when the filesystem must attempt to drop 309 ->invalidatepage() is called when the filesystem must attempt to drop
282some or all of the buffers from the page when it is being truncated. It 310some or all of the buffers from the page when it is being truncated. It
@@ -288,53 +316,46 @@ buffers from the page in preparation for freeing it. It returns zero to
288indicate that the buffers are (or may be) freeable. If ->releasepage is zero, 316indicate that the buffers are (or may be) freeable. If ->releasepage is zero,
289the kernel assumes that the fs has no private interest in the buffers. 317the kernel assumes that the fs has no private interest in the buffers.
290 318
319 ->freepage() is called when the kernel is done dropping the page
320from the page cache.
321
291 ->launder_page() may be called prior to releasing a page if 322 ->launder_page() may be called prior to releasing a page if
292it is still found to be dirty. It returns zero if the page was successfully 323it is still found to be dirty. It returns zero if the page was successfully
293cleaned, or an error value if not. Note that in order to prevent the page 324cleaned, or an error value if not. Note that in order to prevent the page
294getting mapped back in and redirtied, it needs to be kept locked 325getting mapped back in and redirtied, it needs to be kept locked
295across the entire operation. 326across the entire operation.
296 327
297 Note: currently almost all instances of address_space methods are
298using BKL for internal serialization and that's one of the worst sources
299of contention. Normally they are calling library functions (in fs/buffer.c)
300and pass foo_get_block() as a callback (on local block-based filesystems,
301indeed). BKL is not needed for library stuff and is usually taken by
302foo_get_block(). It's an overkill, since block bitmaps can be protected by
303internal fs locking and real critical areas are much smaller than the areas
304filesystems protect now.
305
306----------------------- file_lock_operations ------------------------------ 328----------------------- file_lock_operations ------------------------------
307prototypes: 329prototypes:
308 void (*fl_insert)(struct file_lock *); /* lock insertion callback */
309 void (*fl_remove)(struct file_lock *); /* lock removal callback */
310 void (*fl_copy_lock)(struct file_lock *, struct file_lock *); 330 void (*fl_copy_lock)(struct file_lock *, struct file_lock *);
311 void (*fl_release_private)(struct file_lock *); 331 void (*fl_release_private)(struct file_lock *);
312 332
313 333
314locking rules: 334locking rules:
315 BKL may block 335 file_lock_lock may block
316fl_insert: yes no 336fl_copy_lock: yes no
317fl_remove: yes no 337fl_release_private: maybe no
318fl_copy_lock: yes no
319fl_release_private: yes yes
320 338
321----------------------- lock_manager_operations --------------------------- 339----------------------- lock_manager_operations ---------------------------
322prototypes: 340prototypes:
323 int (*fl_compare_owner)(struct file_lock *, struct file_lock *); 341 int (*fl_compare_owner)(struct file_lock *, struct file_lock *);
324 void (*fl_notify)(struct file_lock *); /* unblock callback */ 342 void (*fl_notify)(struct file_lock *); /* unblock callback */
343 int (*fl_grant)(struct file_lock *, struct file_lock *, int);
325 void (*fl_release_private)(struct file_lock *); 344 void (*fl_release_private)(struct file_lock *);
326 void (*fl_break)(struct file_lock *); /* break_lease callback */ 345 void (*fl_break)(struct file_lock *); /* break_lease callback */
346 int (*fl_mylease)(struct file_lock *, struct file_lock *);
347 int (*fl_change)(struct file_lock **, int);
327 348
328locking rules: 349locking rules:
329 BKL may block 350 file_lock_lock may block
330fl_compare_owner: yes no 351fl_compare_owner: yes no
331fl_notify: yes no 352fl_notify: yes no
332fl_release_private: yes yes 353fl_grant: no no
333fl_break: yes no 354fl_release_private: maybe no
334 355fl_break: yes no
335 Currently only NFSD and NLM provide instances of this class. None of the 356fl_mylease: yes no
336them block. If you have out-of-tree instances - please, show up. Locking 357fl_change yes no
337in that area will change. 358
338--------------------------- buffer_head ----------------------------------- 359--------------------------- buffer_head -----------------------------------
339prototypes: 360prototypes:
340 void (*b_end_io)(struct buffer_head *bh, int uptodate); 361 void (*b_end_io)(struct buffer_head *bh, int uptodate);
@@ -359,17 +380,17 @@ prototypes:
359 void (*swap_slot_free_notify) (struct block_device *, unsigned long); 380 void (*swap_slot_free_notify) (struct block_device *, unsigned long);
360 381
361locking rules: 382locking rules:
362 BKL bd_mutex 383 bd_mutex
363open: no yes 384open: yes
364release: no yes 385release: yes
365ioctl: no no 386ioctl: no
366compat_ioctl: no no 387compat_ioctl: no
367direct_access: no no 388direct_access: no
368media_changed: no no 389media_changed: no
369unlock_native_capacity: no no 390unlock_native_capacity: no
370revalidate_disk: no no 391revalidate_disk: no
371getgeo: no no 392getgeo: no
372swap_slot_free_notify: no no (see below) 393swap_slot_free_notify: no (see below)
373 394
374media_changed, unlock_native_capacity and revalidate_disk are called only from 395media_changed, unlock_native_capacity and revalidate_disk are called only from
375check_disk_change(). 396check_disk_change().
@@ -408,34 +429,21 @@ prototypes:
408 unsigned long (*get_unmapped_area)(struct file *, unsigned long, 429 unsigned long (*get_unmapped_area)(struct file *, unsigned long,
409 unsigned long, unsigned long, unsigned long); 430 unsigned long, unsigned long, unsigned long);
410 int (*check_flags)(int); 431 int (*check_flags)(int);
432 int (*flock) (struct file *, int, struct file_lock *);
433 ssize_t (*splice_write)(struct pipe_inode_info *, struct file *, loff_t *,
434 size_t, unsigned int);
435 ssize_t (*splice_read)(struct file *, loff_t *, struct pipe_inode_info *,
436 size_t, unsigned int);
437 int (*setlease)(struct file *, long, struct file_lock **);
411}; 438};
412 439
413locking rules: 440locking rules:
414 All may block. 441 All may block except for ->setlease.
415 BKL 442 No VFS locks held on entry except for ->fsync and ->setlease.
416llseek: no (see below) 443
417read: no 444->fsync() has i_mutex on inode.
418aio_read: no 445
419write: no 446->setlease has the file_list_lock held and must not sleep.
420aio_write: no
421readdir: no
422poll: no
423unlocked_ioctl: no
424compat_ioctl: no
425mmap: no
426open: no
427flush: no
428release: no
429fsync: no (see below)
430aio_fsync: no
431fasync: no
432lock: yes
433readv: no
434writev: no
435sendfile: no
436sendpage: no
437get_unmapped_area: no
438check_flags: no
439 447
440->llseek() locking has moved from llseek to the individual llseek 448->llseek() locking has moved from llseek to the individual llseek
441implementations. If your fs is not using generic_file_llseek, you 449implementations. If your fs is not using generic_file_llseek, you
@@ -445,17 +453,10 @@ mutex or just to use i_size_read() instead.
445Note: this does not protect the file->f_pos against concurrent modifications 453Note: this does not protect the file->f_pos against concurrent modifications
446since this is something the userspace has to take care about. 454since this is something the userspace has to take care about.
447 455
448Note: ext2_release() was *the* source of contention on fs-intensive 456->fasync() is responsible for maintaining the FASYNC bit in filp->f_flags.
449loads and dropping BKL on ->release() helps to get rid of that (we still 457Most instances call fasync_helper(), which does that maintenance, so it's
450grab BKL for cases when we close a file that had been opened r/w, but that 458not normally something one needs to worry about. Return values > 0 will be
451can and should be done using the internal locking with smaller critical areas). 459mapped to zero in the VFS layer.
452Current worst offender is ext2_get_block()...
453
454->fasync() is called without BKL protection, and is responsible for
455maintaining the FASYNC bit in filp->f_flags. Most instances call
456fasync_helper(), which does that maintenance, so it's not normally
457something one needs to worry about. Return values > 0 will be mapped to
458zero in the VFS layer.
459 460
460->readdir() and ->ioctl() on directories must be changed. Ideally we would 461->readdir() and ->ioctl() on directories must be changed. Ideally we would
461move ->readdir() to inode_operations and use a separate method for directory 462move ->readdir() to inode_operations and use a separate method for directory
@@ -466,8 +467,6 @@ components. And there are other reasons why the current interface is a mess...
466->read on directories probably must go away - we should just enforce -EISDIR 467->read on directories probably must go away - we should just enforce -EISDIR
467in sys_read() and friends. 468in sys_read() and friends.
468 469
469->fsync() has i_mutex on inode.
470
471--------------------------- dquot_operations ------------------------------- 470--------------------------- dquot_operations -------------------------------
472prototypes: 471prototypes:
473 int (*write_dquot) (struct dquot *); 472 int (*write_dquot) (struct dquot *);
@@ -502,12 +501,12 @@ prototypes:
502 int (*access)(struct vm_area_struct *, unsigned long, void*, int, int); 501 int (*access)(struct vm_area_struct *, unsigned long, void*, int, int);
503 502
504locking rules: 503locking rules:
505 BKL mmap_sem PageLocked(page) 504 mmap_sem PageLocked(page)
506open: no yes 505open: yes
507close: no yes 506close: yes
508fault: no yes can return with page locked 507fault: yes can return with page locked
509page_mkwrite: no yes can return with page locked 508page_mkwrite: yes can return with page locked
510access: no yes 509access: yes
511 510
512 ->fault() is called when a previously not present pte is about 511 ->fault() is called when a previously not present pte is about
513to be faulted in. The filesystem must find and return the page associated 512to be faulted in. The filesystem must find and return the page associated
@@ -534,6 +533,3 @@ VM_IO | VM_PFNMAP VMAs.
534 533
535(if you break something or notice that it is broken and do not fix it yourself 534(if you break something or notice that it is broken and do not fix it yourself
536- at least put it here) 535- at least put it here)
537
538ipc/shm.c::shm_delete() - may need BKL.
539->read() and ->write() in many drivers are (probably) missing BKL.
diff --git a/Documentation/filesystems/configfs/configfs_example_explicit.c b/Documentation/filesystems/configfs/configfs_example_explicit.c
index d428cc9f07f3..fd53869f5633 100644
--- a/Documentation/filesystems/configfs/configfs_example_explicit.c
+++ b/Documentation/filesystems/configfs/configfs_example_explicit.c
@@ -89,7 +89,7 @@ static ssize_t childless_storeme_write(struct childless *childless,
89 char *p = (char *) page; 89 char *p = (char *) page;
90 90
91 tmp = simple_strtoul(p, &p, 10); 91 tmp = simple_strtoul(p, &p, 10);
92 if (!p || (*p && (*p != '\n'))) 92 if ((*p != '\0') && (*p != '\n'))
93 return -EINVAL; 93 return -EINVAL;
94 94
95 if (tmp > INT_MAX) 95 if (tmp > INT_MAX)
diff --git a/Documentation/filesystems/dentry-locking.txt b/Documentation/filesystems/dentry-locking.txt
deleted file mode 100644
index 79334ed5daa7..000000000000
--- a/Documentation/filesystems/dentry-locking.txt
+++ /dev/null
@@ -1,174 +0,0 @@
1RCU-based dcache locking model
2==============================
3
4On many workloads, the most common operation on dcache is to look up a
5dentry, given a parent dentry and the name of the child. Typically,
6for every open(), stat() etc., the dentry corresponding to the
7pathname will be looked up by walking the tree starting with the first
8component of the pathname and using that dentry along with the next
9component to look up the next level and so on. Since it is a frequent
10operation for workloads like multiuser environments and web servers,
11it is important to optimize this path.
12
13Prior to 2.5.10, dcache_lock was acquired in d_lookup and thus in
14every component during path look-up. Since 2.5.10 onwards, fast-walk
15algorithm changed this by holding the dcache_lock at the beginning and
16walking as many cached path component dentries as possible. This
17significantly decreases the number of acquisition of
18dcache_lock. However it also increases the lock hold time
19significantly and affects performance in large SMP machines. Since
202.5.62 kernel, dcache has been using a new locking model that uses RCU
21to make dcache look-up lock-free.
22
23The current dcache locking model is not very different from the
24existing dcache locking model. Prior to 2.5.62 kernel, dcache_lock
25protected the hash chain, d_child, d_alias, d_lru lists as well as
26d_inode and several other things like mount look-up. RCU-based changes
27affect only the way the hash chain is protected. For everything else
28the dcache_lock must be taken for both traversing as well as
29updating. The hash chain updates too take the dcache_lock. The
30significant change is the way d_lookup traverses the hash chain, it
31doesn't acquire the dcache_lock for this and rely on RCU to ensure
32that the dentry has not been *freed*.
33
34
35Dcache locking details
36======================
37
38For many multi-user workloads, open() and stat() on files are very
39frequently occurring operations. Both involve walking of path names to
40find the dentry corresponding to the concerned file. In 2.4 kernel,
41dcache_lock was held during look-up of each path component. Contention
42and cache-line bouncing of this global lock caused significant
43scalability problems. With the introduction of RCU in Linux kernel,
44this was worked around by making the look-up of path components during
45path walking lock-free.
46
47
48Safe lock-free look-up of dcache hash table
49===========================================
50
51Dcache is a complex data structure with the hash table entries also
52linked together in other lists. In 2.4 kernel, dcache_lock protected
53all the lists. We applied RCU only on hash chain walking. The rest of
54the lists are still protected by dcache_lock. Some of the important
55changes are :
56
571. The deletion from hash chain is done using hlist_del_rcu() macro
58 which doesn't initialize next pointer of the deleted dentry and
59 this allows us to walk safely lock-free while a deletion is
60 happening.
61
622. Insertion of a dentry into the hash table is done using
63 hlist_add_head_rcu() which take care of ordering the writes - the
64 writes to the dentry must be visible before the dentry is
65 inserted. This works in conjunction with hlist_for_each_rcu(),
66 which has since been replaced by hlist_for_each_entry_rcu(), while
67 walking the hash chain. The only requirement is that all
68 initialization to the dentry must be done before
69 hlist_add_head_rcu() since we don't have dcache_lock protection
70 while traversing the hash chain. This isn't different from the
71 existing code.
72
733. The dentry looked up without holding dcache_lock by cannot be
74 returned for walking if it is unhashed. It then may have a NULL
75 d_inode or other bogosity since RCU doesn't protect the other
76 fields in the dentry. We therefore use a flag DCACHE_UNHASHED to
77 indicate unhashed dentries and use this in conjunction with a
78 per-dentry lock (d_lock). Once looked up without the dcache_lock,
79 we acquire the per-dentry lock (d_lock) and check if the dentry is
80 unhashed. If so, the look-up is failed. If not, the reference count
81 of the dentry is increased and the dentry is returned.
82
834. Once a dentry is looked up, it must be ensured during the path walk
84 for that component it doesn't go away. In pre-2.5.10 code, this was
85 done holding a reference to the dentry. dcache_rcu does the same.
86 In some sense, dcache_rcu path walking looks like the pre-2.5.10
87 version.
88
895. All dentry hash chain updates must take the dcache_lock as well as
90 the per-dentry lock in that order. dput() does this to ensure that
91 a dentry that has just been looked up in another CPU doesn't get
92 deleted before dget() can be done on it.
93
946. There are several ways to do reference counting of RCU protected
95 objects. One such example is in ipv4 route cache where deferred
96 freeing (using call_rcu()) is done as soon as the reference count
97 goes to zero. This cannot be done in the case of dentries because
98 tearing down of dentries require blocking (dentry_iput()) which
99 isn't supported from RCU callbacks. Instead, tearing down of
100 dentries happen synchronously in dput(), but actual freeing happens
101 later when RCU grace period is over. This allows safe lock-free
102 walking of the hash chains, but a matched dentry may have been
103 partially torn down. The checking of DCACHE_UNHASHED flag with
104 d_lock held detects such dentries and prevents them from being
105 returned from look-up.
106
107
108Maintaining POSIX rename semantics
109==================================
110
111Since look-up of dentries is lock-free, it can race against a
112concurrent rename operation. For example, during rename of file A to
113B, look-up of either A or B must succeed. So, if look-up of B happens
114after A has been removed from the hash chain but not added to the new
115hash chain, it may fail. Also, a comparison while the name is being
116written concurrently by a rename may result in false positive matches
117violating rename semantics. Issues related to race with rename are
118handled as described below :
119
1201. Look-up can be done in two ways - d_lookup() which is safe from
121 simultaneous renames and __d_lookup() which is not. If
122 __d_lookup() fails, it must be followed up by a d_lookup() to
123 correctly determine whether a dentry is in the hash table or
124 not. d_lookup() protects look-ups using a sequence lock
125 (rename_lock).
126
1272. The name associated with a dentry (d_name) may be changed if a
128 rename is allowed to happen simultaneously. To avoid memcmp() in
129 __d_lookup() go out of bounds due to a rename and false positive
130 comparison, the name comparison is done while holding the
131 per-dentry lock. This prevents concurrent renames during this
132 operation.
133
1343. Hash table walking during look-up may move to a different bucket as
135 the current dentry is moved to a different bucket due to rename.
136 But we use hlists in dcache hash table and they are
137 null-terminated. So, even if a dentry moves to a different bucket,
138 hash chain walk will terminate. [with a list_head list, it may not
139 since termination is when the list_head in the original bucket is
140 reached]. Since we redo the d_parent check and compare name while
141 holding d_lock, lock-free look-up will not race against d_move().
142
1434. There can be a theoretical race when a dentry keeps coming back to
144 original bucket due to double moves. Due to this look-up may
145 consider that it has never moved and can end up in a infinite loop.
146 But this is not any worse that theoretical livelocks we already
147 have in the kernel.
148
149
150Important guidelines for filesystem developers related to dcache_rcu
151====================================================================
152
1531. Existing dcache interfaces (pre-2.5.62) exported to filesystem
154 don't change. Only dcache internal implementation changes. However
155 filesystems *must not* delete from the dentry hash chains directly
156 using the list macros like allowed earlier. They must use dcache
157 APIs like d_drop() or __d_drop() depending on the situation.
158
1592. d_flags is now protected by a per-dentry lock (d_lock). All access
160 to d_flags must be protected by it.
161
1623. For a hashed dentry, checking of d_count needs to be protected by
163 d_lock.
164
165
166Papers and other documentation on dcache locking
167================================================
168
1691. Scaling dcache with RCU (http://linuxjournal.com/article.php?sid=7124).
170
1712. http://lse.sourceforge.net/locking/dcache/dcache.html
172
173
174
diff --git a/Documentation/filesystems/ntfs.txt b/Documentation/filesystems/ntfs.txt
index ac2a261c5f7d..6ef8cf3bc9a3 100644
--- a/Documentation/filesystems/ntfs.txt
+++ b/Documentation/filesystems/ntfs.txt
@@ -457,6 +457,9 @@ ChangeLog
457 457
458Note, a technical ChangeLog aimed at kernel hackers is in fs/ntfs/ChangeLog. 458Note, a technical ChangeLog aimed at kernel hackers is in fs/ntfs/ChangeLog.
459 459
4602.1.30:
461 - Fix writev() (it kept writing the first segment over and over again
462 instead of moving onto subsequent segments).
4602.1.29: 4632.1.29:
461 - Fix a deadlock when mounting read-write. 464 - Fix a deadlock when mounting read-write.
4622.1.28: 4652.1.28:
diff --git a/Documentation/filesystems/path-lookup.txt b/Documentation/filesystems/path-lookup.txt
new file mode 100644
index 000000000000..eb59c8b44be9
--- /dev/null
+++ b/Documentation/filesystems/path-lookup.txt
@@ -0,0 +1,382 @@
1Path walking and name lookup locking
2====================================
3
4Path resolution is the finding a dentry corresponding to a path name string, by
5performing a path walk. Typically, for every open(), stat() etc., the path name
6will be resolved. Paths are resolved by walking the namespace tree, starting
7with the first component of the pathname (eg. root or cwd) with a known dentry,
8then finding the child of that dentry, which is named the next component in the
9path string. Then repeating the lookup from the child dentry and finding its
10child with the next element, and so on.
11
12Since it is a frequent operation for workloads like multiuser environments and
13web servers, it is important to optimize this code.
14
15Path walking synchronisation history:
16Prior to 2.5.10, dcache_lock was acquired in d_lookup (dcache hash lookup) and
17thus in every component during path look-up. Since 2.5.10 onwards, fast-walk
18algorithm changed this by holding the dcache_lock at the beginning and walking
19as many cached path component dentries as possible. This significantly
20decreases the number of acquisition of dcache_lock. However it also increases
21the lock hold time significantly and affects performance in large SMP machines.
22Since 2.5.62 kernel, dcache has been using a new locking model that uses RCU to
23make dcache look-up lock-free.
24
25All the above algorithms required taking a lock and reference count on the
26dentry that was looked up, so that may be used as the basis for walking the
27next path element. This is inefficient and unscalable. It is inefficient
28because of the locks and atomic operations required for every dentry element
29slows things down. It is not scalable because many parallel applications that
30are path-walk intensive tend to do path lookups starting from a common dentry
31(usually, the root "/" or current working directory). So contention on these
32common path elements causes lock and cacheline queueing.
33
34Since 2.6.38, RCU is used to make a significant part of the entire path walk
35(including dcache look-up) completely "store-free" (so, no locks, atomics, or
36even stores into cachelines of common dentries). This is known as "rcu-walk"
37path walking.
38
39Path walking overview
40=====================
41
42A name string specifies a start (root directory, cwd, fd-relative) and a
43sequence of elements (directory entry names), which together refer to a path in
44the namespace. A path is represented as a (dentry, vfsmount) tuple. The name
45elements are sub-strings, seperated by '/'.
46
47Name lookups will want to find a particular path that a name string refers to
48(usually the final element, or parent of final element). This is done by taking
49the path given by the name's starting point (which we know in advance -- eg.
50current->fs->cwd or current->fs->root) as the first parent of the lookup. Then
51iteratively for each subsequent name element, look up the child of the current
52parent with the given name and if it is not the desired entry, make it the
53parent for the next lookup.
54
55A parent, of course, must be a directory, and we must have appropriate
56permissions on the parent inode to be able to walk into it.
57
58Turning the child into a parent for the next lookup requires more checks and
59procedures. Symlinks essentially substitute the symlink name for the target
60name in the name string, and require some recursive path walking. Mount points
61must be followed into (thus changing the vfsmount that subsequent path elements
62refer to), switching from the mount point path to the root of the particular
63mounted vfsmount. These behaviours are variously modified depending on the
64exact path walking flags.
65
66Path walking then must, broadly, do several particular things:
67- find the start point of the walk;
68- perform permissions and validity checks on inodes;
69- perform dcache hash name lookups on (parent, name element) tuples;
70- traverse mount points;
71- traverse symlinks;
72- lookup and create missing parts of the path on demand.
73
74Safe store-free look-up of dcache hash table
75============================================
76
77Dcache name lookup
78------------------
79In order to lookup a dcache (parent, name) tuple, we take a hash on the tuple
80and use that to select a bucket in the dcache-hash table. The list of entries
81in that bucket is then walked, and we do a full comparison of each entry
82against our (parent, name) tuple.
83
84The hash lists are RCU protected, so list walking is not serialised with
85concurrent updates (insertion, deletion from the hash). This is a standard RCU
86list application with the exception of renames, which will be covered below.
87
88Parent and name members of a dentry, as well as its membership in the dcache
89hash, and its inode are protected by the per-dentry d_lock spinlock. A
90reference is taken on the dentry (while the fields are verified under d_lock),
91and this stabilises its d_inode pointer and actual inode. This gives a stable
92point to perform the next step of our path walk against.
93
94These members are also protected by d_seq seqlock, although this offers
95read-only protection and no durability of results, so care must be taken when
96using d_seq for synchronisation (see seqcount based lookups, below).
97
98Renames
99-------
100Back to the rename case. In usual RCU protected lists, the only operations that
101will happen to an object is insertion, and then eventually removal from the
102list. The object will not be reused until an RCU grace period is complete.
103This ensures the RCU list traversal primitives can run over the object without
104problems (see RCU documentation for how this works).
105
106However when a dentry is renamed, its hash value can change, requiring it to be
107moved to a new hash list. Allocating and inserting a new alias would be
108expensive and also problematic for directory dentries. Latency would be far to
109high to wait for a grace period after removing the dentry and before inserting
110it in the new hash bucket. So what is done is to insert the dentry into the
111new list immediately.
112
113However, when the dentry's list pointers are updated to point to objects in the
114new list before waiting for a grace period, this can result in a concurrent RCU
115lookup of the old list veering off into the new (incorrect) list and missing
116the remaining dentries on the list.
117
118There is no fundamental problem with walking down the wrong list, because the
119dentry comparisons will never match. However it is fatal to miss a matching
120dentry. So a seqlock is used to detect when a rename has occurred, and so the
121lookup can be retried.
122
123 1 2 3
124 +---+ +---+ +---+
125hlist-->| N-+->| N-+->| N-+->
126head <--+-P |<-+-P |<-+-P |
127 +---+ +---+ +---+
128
129Rename of dentry 2 may require it deleted from the above list, and inserted
130into a new list. Deleting 2 gives the following list.
131
132 1 3
133 +---+ +---+ (don't worry, the longer pointers do not
134hlist-->| N-+-------->| N-+-> impose a measurable performance overhead
135head <--+-P |<--------+-P | on modern CPUs)
136 +---+ +---+
137 ^ 2 ^
138 | +---+ |
139 | | N-+----+
140 +----+-P |
141 +---+
142
143This is a standard RCU-list deletion, which leaves the deleted object's
144pointers intact, so a concurrent list walker that is currently looking at
145object 2 will correctly continue to object 3 when it is time to traverse the
146next object.
147
148However, when inserting object 2 onto a new list, we end up with this:
149
150 1 3
151 +---+ +---+
152hlist-->| N-+-------->| N-+->
153head <--+-P |<--------+-P |
154 +---+ +---+
155 2
156 +---+
157 | N-+---->
158 <----+-P |
159 +---+
160
161Because we didn't wait for a grace period, there may be a concurrent lookup
162still at 2. Now when it follows 2's 'next' pointer, it will walk off into
163another list without ever having checked object 3.
164
165A related, but distinctly different, issue is that of rename atomicity versus
166lookup operations. If a file is renamed from 'A' to 'B', a lookup must only
167find either 'A' or 'B'. So if a lookup of 'A' returns NULL, a subsequent lookup
168of 'B' must succeed (note the reverse is not true).
169
170Between deleting the dentry from the old hash list, and inserting it on the new
171hash list, a lookup may find neither 'A' nor 'B' matching the dentry. The same
172rename seqlock is also used to cover this race in much the same way, by
173retrying a negative lookup result if a rename was in progress.
174
175Seqcount based lookups
176----------------------
177In refcount based dcache lookups, d_lock is used to serialise access to
178the dentry, stabilising it while comparing its name and parent and then
179taking a reference count (the reference count then gives a stable place to
180start the next part of the path walk from).
181
182As explained above, we would like to do path walking without taking locks or
183reference counts on intermediate dentries along the path. To do this, a per
184dentry seqlock (d_seq) is used to take a "coherent snapshot" of what the dentry
185looks like (its name, parent, and inode). That snapshot is then used to start
186the next part of the path walk. When loading the coherent snapshot under d_seq,
187care must be taken to load the members up-front, and use those pointers rather
188than reloading from the dentry later on (otherwise we'd have interesting things
189like d_inode going NULL underneath us, if the name was unlinked).
190
191Also important is to avoid performing any destructive operations (pretty much:
192no non-atomic stores to shared data), and to recheck the seqcount when we are
193"done" with the operation. Retry or abort if the seqcount does not match.
194Avoiding destructive or changing operations means we can easily unwind from
195failure.
196
197What this means is that a caller, provided they are holding RCU lock to
198protect the dentry object from disappearing, can perform a seqcount based
199lookup which does not increment the refcount on the dentry or write to
200it in any way. This returned dentry can be used for subsequent operations,
201provided that d_seq is rechecked after that operation is complete.
202
203Inodes are also rcu freed, so the seqcount lookup dentry's inode may also be
204queried for permissions.
205
206With this two parts of the puzzle, we can do path lookups without taking
207locks or refcounts on dentry elements.
208
209RCU-walk path walking design
210============================
211
212Path walking code now has two distinct modes, ref-walk and rcu-walk. ref-walk
213is the traditional[*] way of performing dcache lookups using d_lock to
214serialise concurrent modifications to the dentry and take a reference count on
215it. ref-walk is simple and obvious, and may sleep, take locks, etc while path
216walking is operating on each dentry. rcu-walk uses seqcount based dentry
217lookups, and can perform lookup of intermediate elements without any stores to
218shared data in the dentry or inode. rcu-walk can not be applied to all cases,
219eg. if the filesystem must sleep or perform non trivial operations, rcu-walk
220must be switched to ref-walk mode.
221
222[*] RCU is still used for the dentry hash lookup in ref-walk, but not the full
223 path walk.
224
225Where ref-walk uses a stable, refcounted ``parent'' to walk the remaining
226path string, rcu-walk uses a d_seq protected snapshot. When looking up a
227child of this parent snapshot, we open d_seq critical section on the child
228before closing d_seq critical section on the parent. This gives an interlocking
229ladder of snapshots to walk down.
230
231
232 proc 101
233 /----------------\
234 / comm: "vi" \
235 / fs.root: dentry0 \
236 \ fs.cwd: dentry2 /
237 \ /
238 \----------------/
239
240So when vi wants to open("/home/npiggin/test.c", O_RDWR), then it will
241start from current->fs->root, which is a pinned dentry. Alternatively,
242"./test.c" would start from cwd; both names refer to the same path in
243the context of proc101.
244
245 dentry 0
246 +---------------------+ rcu-walk begins here, we note d_seq, check the
247 | name: "/" | inode's permission, and then look up the next
248 | inode: 10 | path element which is "home"...
249 | children:"home", ...|
250 +---------------------+
251 |
252 dentry 1 V
253 +---------------------+ ... which brings us here. We find dentry1 via
254 | name: "home" | hash lookup, then note d_seq and compare name
255 | inode: 678 | string and parent pointer. When we have a match,
256 | children:"npiggin" | we now recheck the d_seq of dentry0. Then we
257 +---------------------+ check inode and look up the next element.
258 |
259 dentry2 V
260 +---------------------+ Note: if dentry0 is now modified, lookup is
261 | name: "npiggin" | not necessarily invalid, so we need only keep a
262 | inode: 543 | parent for d_seq verification, and grandparents
263 | children:"a.c", ... | can be forgotten.
264 +---------------------+
265 |
266 dentry3 V
267 +---------------------+ At this point we have our destination dentry.
268 | name: "a.c" | We now take its d_lock, verify d_seq of this
269 | inode: 14221 | dentry. If that checks out, we can increment
270 | children:NULL | its refcount because we're holding d_lock.
271 +---------------------+
272
273Taking a refcount on a dentry from rcu-walk mode, by taking its d_lock,
274re-checking its d_seq, and then incrementing its refcount is called
275"dropping rcu" or dropping from rcu-walk into ref-walk mode.
276
277It is, in some sense, a bit of a house of cards. If the seqcount check of the
278parent snapshot fails, the house comes down, because we had closed the d_seq
279section on the grandparent, so we have nothing left to stand on. In that case,
280the path walk must be fully restarted (which we do in ref-walk mode, to avoid
281live locks). It is costly to have a full restart, but fortunately they are
282quite rare.
283
284When we reach a point where sleeping is required, or a filesystem callout
285requires ref-walk, then instead of restarting the walk, we attempt to drop rcu
286at the last known good dentry we have. Avoiding a full restart in ref-walk in
287these cases is fundamental for performance and scalability because blocking
288operations such as creates and unlinks are not uncommon.
289
290The detailed design for rcu-walk is like this:
291* LOOKUP_RCU is set in nd->flags, which distinguishes rcu-walk from ref-walk.
292* Take the RCU lock for the entire path walk, starting with the acquiring
293 of the starting path (eg. root/cwd/fd-path). So now dentry refcounts are
294 not required for dentry persistence.
295* synchronize_rcu is called when unregistering a filesystem, so we can
296 access d_ops and i_ops during rcu-walk.
297* Similarly take the vfsmount lock for the entire path walk. So now mnt
298 refcounts are not required for persistence. Also we are free to perform mount
299 lookups, and to assume dentry mount points and mount roots are stable up and
300 down the path.
301* Have a per-dentry seqlock to protect the dentry name, parent, and inode,
302 so we can load this tuple atomically, and also check whether any of its
303 members have changed.
304* Dentry lookups (based on parent, candidate string tuple) recheck the parent
305 sequence after the child is found in case anything changed in the parent
306 during the path walk.
307* inode is also RCU protected so we can load d_inode and use the inode for
308 limited things.
309* i_mode, i_uid, i_gid can be tested for exec permissions during path walk.
310* i_op can be loaded.
311* When the destination dentry is reached, drop rcu there (ie. take d_lock,
312 verify d_seq, increment refcount).
313* If seqlock verification fails anywhere along the path, do a full restart
314 of the path lookup in ref-walk mode. -ECHILD tends to be used (for want of
315 a better errno) to signal an rcu-walk failure.
316
317The cases where rcu-walk cannot continue are:
318* NULL dentry (ie. any uncached path element)
319* Following links
320
321It may be possible eventually to make following links rcu-walk aware.
322
323Uncached path elements will always require dropping to ref-walk mode, at the
324very least because i_mutex needs to be grabbed, and objects allocated.
325
326Final note:
327"store-free" path walking is not strictly store free. We take vfsmount lock
328and refcounts (both of which can be made per-cpu), and we also store to the
329stack (which is essentially CPU-local), and we also have to take locks and
330refcount on final dentry.
331
332The point is that shared data, where practically possible, is not locked
333or stored into. The result is massive improvements in performance and
334scalability of path resolution.
335
336
337Interesting statistics
338======================
339
340The following table gives rcu lookup statistics for a few simple workloads
341(2s12c24t Westmere, debian non-graphical system). Ungraceful are attempts to
342drop rcu that fail due to d_seq failure and requiring the entire path lookup
343again. Other cases are successful rcu-drops that are required before the final
344element, nodentry for missing dentry, revalidate for filesystem revalidate
345routine requiring rcu drop, permission for permission check requiring drop,
346and link for symlink traversal requiring drop.
347
348 rcu-lookups restart nodentry link revalidate permission
349bootup 47121 0 4624 1010 10283 7852
350dbench 25386793 0 6778659(26.7%) 55 549 1156
351kbuild 2696672 10 64442(2.3%) 108764(4.0%) 1 1590
352git diff 39605 0 28 2 0 106
353vfstest 24185492 4945 708725(2.9%) 1076136(4.4%) 0 2651
354
355What this shows is that failed rcu-walk lookups, ie. ones that are restarted
356entirely with ref-walk, are quite rare. Even the "vfstest" case which
357specifically has concurrent renames/mkdir/rmdir/ creat/unlink/etc to excercise
358such races is not showing a huge amount of restarts.
359
360Dropping from rcu-walk to ref-walk mean that we have encountered a dentry where
361the reference count needs to be taken for some reason. This is either because
362we have reached the target of the path walk, or because we have encountered a
363condition that can't be resolved in rcu-walk mode. Ideally, we drop rcu-walk
364only when we have reached the target dentry, so the other statistics show where
365this does not happen.
366
367Note that a graceful drop from rcu-walk mode due to something such as the
368dentry not existing (which can be common) is not necessarily a failure of
369rcu-walk scheme, because some elements of the path may have been walked in
370rcu-walk mode. The further we get from common path elements (such as cwd or
371root), the less contended the dentry is likely to be. The closer we are to
372common path elements, the more likely they will exist in dentry cache.
373
374
375Papers and other documentation on dcache locking
376================================================
377
3781. Scaling dcache with RCU (http://linuxjournal.com/article.php?sid=7124).
379
3802. http://lse.sourceforge.net/locking/dcache/dcache.html
381
382
diff --git a/Documentation/filesystems/porting b/Documentation/filesystems/porting
index b12c89538680..266d2059b9b8 100644
--- a/Documentation/filesystems/porting
+++ b/Documentation/filesystems/porting
@@ -216,7 +216,6 @@ had ->revalidate()) add calls in ->follow_link()/->readlink().
216->d_parent changes are not protected by BKL anymore. Read access is safe 216->d_parent changes are not protected by BKL anymore. Read access is safe
217if at least one of the following is true: 217if at least one of the following is true:
218 * filesystem has no cross-directory rename() 218 * filesystem has no cross-directory rename()
219 * dcache_lock is held
220 * we know that parent had been locked (e.g. we are looking at 219 * we know that parent had been locked (e.g. we are looking at
221->d_parent of ->lookup() argument). 220->d_parent of ->lookup() argument).
222 * we are called from ->rename(). 221 * we are called from ->rename().
@@ -318,3 +317,80 @@ if it's zero is not *and* *never* *had* *been* enough. Final unlink() and iput(
318may happen while the inode is in the middle of ->write_inode(); e.g. if you blindly 317may happen while the inode is in the middle of ->write_inode(); e.g. if you blindly
319free the on-disk inode, you may end up doing that while ->write_inode() is writing 318free the on-disk inode, you may end up doing that while ->write_inode() is writing
320to it. 319to it.
320
321---
322[mandatory]
323
324 .d_delete() now only advises the dcache as to whether or not to cache
325unreferenced dentries, and is now only called when the dentry refcount goes to
3260. Even on 0 refcount transition, it must be able to tolerate being called 0,
3271, or more times (eg. constant, idempotent).
328
329---
330[mandatory]
331
332 .d_compare() calling convention and locking rules are significantly
333changed. Read updated documentation in Documentation/filesystems/vfs.txt (and
334look at examples of other filesystems) for guidance.
335
336---
337[mandatory]
338
339 .d_hash() calling convention and locking rules are significantly
340changed. Read updated documentation in Documentation/filesystems/vfs.txt (and
341look at examples of other filesystems) for guidance.
342
343---
344[mandatory]
345 dcache_lock is gone, replaced by fine grained locks. See fs/dcache.c
346for details of what locks to replace dcache_lock with in order to protect
347particular things. Most of the time, a filesystem only needs ->d_lock, which
348protects *all* the dcache state of a given dentry.
349
350--
351[mandatory]
352
353 Filesystems must RCU-free their inodes, if they can have been accessed
354via rcu-walk path walk (basically, if the file can have had a path name in the
355vfs namespace).
356
357 i_dentry and i_rcu share storage in a union, and the vfs expects
358i_dentry to be reinitialized before it is freed, so an:
359
360 INIT_LIST_HEAD(&inode->i_dentry);
361
362must be done in the RCU callback.
363
364--
365[recommended]
366 vfs now tries to do path walking in "rcu-walk mode", which avoids
367atomic operations and scalability hazards on dentries and inodes (see
368Documentation/filesystems/path-walk.txt). d_hash and d_compare changes (above)
369are examples of the changes required to support this. For more complex
370filesystem callbacks, the vfs drops out of rcu-walk mode before the fs call, so
371no changes are required to the filesystem. However, this is costly and loses
372the benefits of rcu-walk mode. We will begin to add filesystem callbacks that
373are rcu-walk aware, shown below. Filesystems should take advantage of this
374where possible.
375
376--
377[mandatory]
378 d_revalidate is a callback that is made on every path element (if
379the filesystem provides it), which requires dropping out of rcu-walk mode. This
380may now be called in rcu-walk mode (nd->flags & LOOKUP_RCU). -ECHILD should be
381returned if the filesystem cannot handle rcu-walk. See
382Documentation/filesystems/vfs.txt for more details.
383
384 permission and check_acl are inode permission checks that are called
385on many or all directory inodes on the way down a path walk (to check for
386exec permission). These must now be rcu-walk aware (flags & IPERM_RCU). See
387Documentation/filesystems/vfs.txt for more details.
388
389--
390[mandatory]
391 In ->fallocate() you must check the mode option passed in. If your
392filesystem does not support hole punching (deallocating space in the middle of a
393file) you must return -EOPNOTSUPP if FALLOC_FL_PUNCH_HOLE is set in mode.
394Currently you can only have FALLOC_FL_PUNCH_HOLE with FALLOC_FL_KEEP_SIZE set,
395so the i_size should not change when hole punching, even when puching the end of
396a file off.
diff --git a/Documentation/filesystems/proc.txt b/Documentation/filesystems/proc.txt
index e73df2722ff3..9471225212c4 100644
--- a/Documentation/filesystems/proc.txt
+++ b/Documentation/filesystems/proc.txt
@@ -1181,6 +1181,30 @@ Table 1-12: Files in /proc/fs/ext4/<devname>
1181 mb_groups details of multiblock allocator buddy cache of free blocks 1181 mb_groups details of multiblock allocator buddy cache of free blocks
1182.............................................................................. 1182..............................................................................
1183 1183
11842.0 /proc/consoles
1185------------------
1186Shows registered system console lines.
1187
1188To see which character device lines are currently used for the system console
1189/dev/console, you may simply look into the file /proc/consoles:
1190
1191 > cat /proc/consoles
1192 tty0 -WU (ECp) 4:7
1193 ttyS0 -W- (Ep) 4:64
1194
1195The columns are:
1196
1197 device name of the device
1198 operations R = can do read operations
1199 W = can do write operations
1200 U = can do unblank
1201 flags E = it is enabled
1202 C = it is prefered console
1203 B = it is primary boot console
1204 p = it is used for printk buffer
1205 b = it is not a TTY but a Braille device
1206 a = it is safe to use when cpu is offline
1207 major:minor major and minor number of the device separated by a colon
1184 1208
1185------------------------------------------------------------------------------ 1209------------------------------------------------------------------------------
1186Summary 1210Summary
diff --git a/Documentation/filesystems/vfs.txt b/Documentation/filesystems/vfs.txt
index ed7e5efc06d8..fbb324e2bd43 100644
--- a/Documentation/filesystems/vfs.txt
+++ b/Documentation/filesystems/vfs.txt
@@ -325,7 +325,8 @@ struct inode_operations {
325 void * (*follow_link) (struct dentry *, struct nameidata *); 325 void * (*follow_link) (struct dentry *, struct nameidata *);
326 void (*put_link) (struct dentry *, struct nameidata *, void *); 326 void (*put_link) (struct dentry *, struct nameidata *, void *);
327 void (*truncate) (struct inode *); 327 void (*truncate) (struct inode *);
328 int (*permission) (struct inode *, int, struct nameidata *); 328 int (*permission) (struct inode *, int, unsigned int);
329 int (*check_acl)(struct inode *, int, unsigned int);
329 int (*setattr) (struct dentry *, struct iattr *); 330 int (*setattr) (struct dentry *, struct iattr *);
330 int (*getattr) (struct vfsmount *mnt, struct dentry *, struct kstat *); 331 int (*getattr) (struct vfsmount *mnt, struct dentry *, struct kstat *);
331 int (*setxattr) (struct dentry *, const char *,const void *,size_t,int); 332 int (*setxattr) (struct dentry *, const char *,const void *,size_t,int);
@@ -414,6 +415,13 @@ otherwise noted.
414 permission: called by the VFS to check for access rights on a POSIX-like 415 permission: called by the VFS to check for access rights on a POSIX-like
415 filesystem. 416 filesystem.
416 417
418 May be called in rcu-walk mode (flags & IPERM_RCU). If in rcu-walk
419 mode, the filesystem must check the permission without blocking or
420 storing to the inode.
421
422 If a situation is encountered that rcu-walk cannot handle, return
423 -ECHILD and it will be called again in ref-walk mode.
424
417 setattr: called by the VFS to set attributes for a file. This method 425 setattr: called by the VFS to set attributes for a file. This method
418 is called by chmod(2) and related system calls. 426 is called by chmod(2) and related system calls.
419 427
@@ -534,6 +542,7 @@ struct address_space_operations {
534 sector_t (*bmap)(struct address_space *, sector_t); 542 sector_t (*bmap)(struct address_space *, sector_t);
535 int (*invalidatepage) (struct page *, unsigned long); 543 int (*invalidatepage) (struct page *, unsigned long);
536 int (*releasepage) (struct page *, int); 544 int (*releasepage) (struct page *, int);
545 void (*freepage)(struct page *);
537 ssize_t (*direct_IO)(int, struct kiocb *, const struct iovec *iov, 546 ssize_t (*direct_IO)(int, struct kiocb *, const struct iovec *iov,
538 loff_t offset, unsigned long nr_segs); 547 loff_t offset, unsigned long nr_segs);
539 struct page* (*get_xip_page)(struct address_space *, sector_t, 548 struct page* (*get_xip_page)(struct address_space *, sector_t,
@@ -660,11 +669,10 @@ struct address_space_operations {
660 releasepage: releasepage is called on PagePrivate pages to indicate 669 releasepage: releasepage is called on PagePrivate pages to indicate
661 that the page should be freed if possible. ->releasepage 670 that the page should be freed if possible. ->releasepage
662 should remove any private data from the page and clear the 671 should remove any private data from the page and clear the
663 PagePrivate flag. It may also remove the page from the 672 PagePrivate flag. If releasepage() fails for some reason, it must
664 address_space. If this fails for some reason, it may indicate 673 indicate failure with a 0 return value.
665 failure with a 0 return value. 674 releasepage() is used in two distinct though related cases. The
666 This is used in two distinct though related cases. The first 675 first is when the VM finds a clean page with no active users and
667 is when the VM finds a clean page with no active users and
668 wants to make it a free page. If ->releasepage succeeds, the 676 wants to make it a free page. If ->releasepage succeeds, the
669 page will be removed from the address_space and become free. 677 page will be removed from the address_space and become free.
670 678
@@ -679,6 +687,12 @@ struct address_space_operations {
679 need to ensure this. Possibly it can clear the PageUptodate 687 need to ensure this. Possibly it can clear the PageUptodate
680 bit if it cannot free private data yet. 688 bit if it cannot free private data yet.
681 689
690 freepage: freepage is called once the page is no longer visible in
691 the page cache in order to allow the cleanup of any private
692 data. Since it may be called by the memory reclaimer, it
693 should not assume that the original address_space mapping still
694 exists, and it should not block.
695
682 direct_IO: called by the generic read/write routines to perform 696 direct_IO: called by the generic read/write routines to perform
683 direct_IO - that is IO requests which bypass the page cache 697 direct_IO - that is IO requests which bypass the page cache
684 and transfer data directly between the storage and the 698 and transfer data directly between the storage and the
@@ -841,9 +855,12 @@ defined:
841 855
842struct dentry_operations { 856struct dentry_operations {
843 int (*d_revalidate)(struct dentry *, struct nameidata *); 857 int (*d_revalidate)(struct dentry *, struct nameidata *);
844 int (*d_hash) (struct dentry *, struct qstr *); 858 int (*d_hash)(const struct dentry *, const struct inode *,
845 int (*d_compare) (struct dentry *, struct qstr *, struct qstr *); 859 struct qstr *);
846 int (*d_delete)(struct dentry *); 860 int (*d_compare)(const struct dentry *, const struct inode *,
861 const struct dentry *, const struct inode *,
862 unsigned int, const char *, const struct qstr *);
863 int (*d_delete)(const struct dentry *);
847 void (*d_release)(struct dentry *); 864 void (*d_release)(struct dentry *);
848 void (*d_iput)(struct dentry *, struct inode *); 865 void (*d_iput)(struct dentry *, struct inode *);
849 char *(*d_dname)(struct dentry *, char *, int); 866 char *(*d_dname)(struct dentry *, char *, int);
@@ -854,13 +871,45 @@ struct dentry_operations {
854 dcache. Most filesystems leave this as NULL, because all their 871 dcache. Most filesystems leave this as NULL, because all their
855 dentries in the dcache are valid 872 dentries in the dcache are valid
856 873
857 d_hash: called when the VFS adds a dentry to the hash table 874 d_revalidate may be called in rcu-walk mode (nd->flags & LOOKUP_RCU).
875 If in rcu-walk mode, the filesystem must revalidate the dentry without
876 blocking or storing to the dentry, d_parent and d_inode should not be
877 used without care (because they can go NULL), instead nd->inode should
878 be used.
879
880 If a situation is encountered that rcu-walk cannot handle, return
881 -ECHILD and it will be called again in ref-walk mode.
882
883 d_hash: called when the VFS adds a dentry to the hash table. The first
884 dentry passed to d_hash is the parent directory that the name is
885 to be hashed into. The inode is the dentry's inode.
886
887 Same locking and synchronisation rules as d_compare regarding
888 what is safe to dereference etc.
889
890 d_compare: called to compare a dentry name with a given name. The first
891 dentry is the parent of the dentry to be compared, the second is
892 the parent's inode, then the dentry and inode (may be NULL) of the
893 child dentry. len and name string are properties of the dentry to be
894 compared. qstr is the name to compare it with.
895
896 Must be constant and idempotent, and should not take locks if
897 possible, and should not or store into the dentry or inodes.
898 Should not dereference pointers outside the dentry or inodes without
899 lots of care (eg. d_parent, d_inode, d_name should not be used).
900
901 However, our vfsmount is pinned, and RCU held, so the dentries and
902 inodes won't disappear, neither will our sb or filesystem module.
903 ->i_sb and ->d_sb may be used.
858 904
859 d_compare: called when a dentry should be compared with another 905 It is a tricky calling convention because it needs to be called under
906 "rcu-walk", ie. without any locks or references on things.
860 907
861 d_delete: called when the last reference to a dentry is 908 d_delete: called when the last reference to a dentry is dropped and the
862 deleted. This means no-one is using the dentry, however it is 909 dcache is deciding whether or not to cache it. Return 1 to delete
863 still valid and in the dcache 910 immediately, or 0 to cache the dentry. Default is NULL which means to
911 always cache a reachable dentry. d_delete must be constant and
912 idempotent.
864 913
865 d_release: called when a dentry is really deallocated 914 d_release: called when a dentry is really deallocated
866 915
@@ -904,14 +953,11 @@ manipulate dentries:
904 the usage count) 953 the usage count)
905 954
906 dput: close a handle for a dentry (decrements the usage count). If 955 dput: close a handle for a dentry (decrements the usage count). If
907 the usage count drops to 0, the "d_delete" method is called 956 the usage count drops to 0, and the dentry is still in its
908 and the dentry is placed on the unused list if the dentry is 957 parent's hash, the "d_delete" method is called to check whether
909 still in its parents hash list. Putting the dentry on the 958 it should be cached. If it should not be cached, or if the dentry
910 unused list just means that if the system needs some RAM, it 959 is not hashed, it is deleted. Otherwise cached dentries are put
911 goes through the unused list of dentries and deallocates them. 960 into an LRU list to be reclaimed on memory shortage.
912 If the dentry has already been unhashed and the usage count
913 drops to 0, in this case the dentry is deallocated after the
914 "d_delete" method is called
915 961
916 d_drop: this unhashes a dentry from its parents hash list. A 962 d_drop: this unhashes a dentry from its parents hash list. A
917 subsequent call to dput() will deallocate the dentry if its 963 subsequent call to dput() will deallocate the dentry if its
diff --git a/Documentation/gpio.txt b/Documentation/gpio.txt
index 9633da01ff46..a492d92bb098 100644
--- a/Documentation/gpio.txt
+++ b/Documentation/gpio.txt
@@ -135,7 +135,7 @@ setting up a platform_device using the GPIO, is mark its direction:
135 int gpio_direction_input(unsigned gpio); 135 int gpio_direction_input(unsigned gpio);
136 int gpio_direction_output(unsigned gpio, int value); 136 int gpio_direction_output(unsigned gpio, int value);
137 137
138The return value is zero for success, else a negative errno. It should 138The return value is zero for success, else a negative errno. It must
139be checked, since the get/set calls don't have error returns and since 139be checked, since the get/set calls don't have error returns and since
140misconfiguration is possible. You should normally issue these calls from 140misconfiguration is possible. You should normally issue these calls from
141a task context. However, for spinlock-safe GPIOs it's OK to use them 141a task context. However, for spinlock-safe GPIOs it's OK to use them
@@ -617,6 +617,16 @@ and have the following read/write attributes:
617 is configured as an output, this value may be written; 617 is configured as an output, this value may be written;
618 any nonzero value is treated as high. 618 any nonzero value is treated as high.
619 619
620 If the pin can be configured as interrupt-generating interrupt
621 and if it has been configured to generate interrupts (see the
622 description of "edge"), you can poll(2) on that file and
623 poll(2) will return whenever the interrupt was triggered. If
624 you use poll(2), set the events POLLPRI and POLLERR. If you
625 use select(2), set the file descriptor in exceptfds. After
626 poll(2) returns, either lseek(2) to the beginning of the sysfs
627 file and read the new value or close the file and re-open it
628 to read the value.
629
620 "edge" ... reads as either "none", "rising", "falling", or 630 "edge" ... reads as either "none", "rising", "falling", or
621 "both". Write these strings to select the signal edge(s) 631 "both". Write these strings to select the signal edge(s)
622 that will make poll(2) on the "value" file return. 632 that will make poll(2) on the "value" file return.
diff --git a/Documentation/hwmon/adm9240 b/Documentation/hwmon/adm9240
index 2c6f1fed4618..36e8ec6aa868 100644
--- a/Documentation/hwmon/adm9240
+++ b/Documentation/hwmon/adm9240
@@ -155,7 +155,7 @@ connected to a normally open switch.
155The ADM9240 provides an internal open drain on this line, and may output 155The ADM9240 provides an internal open drain on this line, and may output
156a 20 ms active low pulse to reset an external Chassis Intrusion latch. 156a 20 ms active low pulse to reset an external Chassis Intrusion latch.
157 157
158Clear the CI latch by writing value 1 to the sysfs chassis_clear file. 158Clear the CI latch by writing value 0 to the sysfs intrusion0_alarm file.
159 159
160Alarm flags reported as 16-bit word 160Alarm flags reported as 16-bit word
161 161
diff --git a/Documentation/hwmon/ads7828 b/Documentation/hwmon/ads7828
index 75bc4beaf447..2bbebe6f771f 100644
--- a/Documentation/hwmon/ads7828
+++ b/Documentation/hwmon/ads7828
@@ -9,7 +9,7 @@ Supported chips:
9 http://focus.ti.com/lit/ds/symlink/ads7828.pdf 9 http://focus.ti.com/lit/ds/symlink/ads7828.pdf
10 10
11Authors: 11Authors:
12 Steve Hardy <steve@linuxrealtime.co.uk> 12 Steve Hardy <shardy@redhat.com>
13 13
14Module Parameters 14Module Parameters
15----------------- 15-----------------
diff --git a/Documentation/hwmon/dme1737 b/Documentation/hwmon/dme1737
index fc5df7654d63..4d2935145a1c 100644
--- a/Documentation/hwmon/dme1737
+++ b/Documentation/hwmon/dme1737
@@ -42,7 +42,7 @@ Description
42This driver implements support for the hardware monitoring capabilities of the 42This driver implements support for the hardware monitoring capabilities of the
43SMSC DME1737 and Asus A8000 (which are the same), SMSC SCH5027, SCH311x, 43SMSC DME1737 and Asus A8000 (which are the same), SMSC SCH5027, SCH311x,
44and SCH5127 Super-I/O chips. These chips feature monitoring of 3 temp sensors 44and SCH5127 Super-I/O chips. These chips feature monitoring of 3 temp sensors
45temp[1-3] (2 remote diodes and 1 internal), 7 voltages in[0-6] (6 external and 45temp[1-3] (2 remote diodes and 1 internal), 8 voltages in[0-7] (7 external and
461 internal) and up to 6 fan speeds fan[1-6]. Additionally, the chips implement 461 internal) and up to 6 fan speeds fan[1-6]. Additionally, the chips implement
47up to 5 PWM outputs pwm[1-3,5-6] for controlling fan speeds both manually and 47up to 5 PWM outputs pwm[1-3,5-6] for controlling fan speeds both manually and
48automatically. 48automatically.
@@ -105,6 +105,7 @@ SCH5127:
105 in4: V1_IN 0V - 1.5V 105 in4: V1_IN 0V - 1.5V
106 in5: VTR (+3.3V standby) 0V - 4.38V 106 in5: VTR (+3.3V standby) 0V - 4.38V
107 in6: Vbat (+3.0V) 0V - 4.38V 107 in6: Vbat (+3.0V) 0V - 4.38V
108 in7: Vtrip (+1.5V) 0V - 1.99V
108 109
109Each voltage input has associated min and max limits which trigger an alarm 110Each voltage input has associated min and max limits which trigger an alarm
110when crossed. 111when crossed.
@@ -217,10 +218,10 @@ cpu0_vid RO CPU core reference voltage in
217vrm RW Voltage regulator module version 218vrm RW Voltage regulator module version
218 number. 219 number.
219 220
220in[0-6]_input RO Measured voltage in millivolts. 221in[0-7]_input RO Measured voltage in millivolts.
221in[0-6]_min RW Low limit for voltage input. 222in[0-7]_min RW Low limit for voltage input.
222in[0-6]_max RW High limit for voltage input. 223in[0-7]_max RW High limit for voltage input.
223in[0-6]_alarm RO Voltage input alarm. Returns 1 if 224in[0-7]_alarm RO Voltage input alarm. Returns 1 if
224 voltage input is or went outside the 225 voltage input is or went outside the
225 associated min-max range, 0 otherwise. 226 associated min-max range, 0 otherwise.
226 227
@@ -324,3 +325,4 @@ fan5 opt opt
324pwm5 opt opt 325pwm5 opt opt
325fan6 opt opt 326fan6 opt opt
326pwm6 opt opt 327pwm6 opt opt
328in7 yes
diff --git a/Documentation/hwmon/ds620 b/Documentation/hwmon/ds620
new file mode 100644
index 000000000000..1fbe3cd916cc
--- /dev/null
+++ b/Documentation/hwmon/ds620
@@ -0,0 +1,34 @@
1Kernel driver ds620
2===================
3
4Supported chips:
5 * Dallas Semiconductor DS620
6 Prefix: 'ds620'
7 Datasheet: Publicly available at the Dallas Semiconductor website
8 http://www.dalsemi.com/
9
10Authors:
11 Roland Stigge <stigge@antcom.de>
12 based on ds1621.c by
13 Christian W. Zuckschwerdt <zany@triq.net>
14
15Description
16-----------
17
18The DS620 is a (one instance) digital thermometer and thermostat. It has both
19high and low temperature limits which can be user defined (i.e. programmed
20into non-volatile on-chip registers). Temperature range is -55 degree Celsius
21to +125. Between 0 and 70 degree Celsius, accuracy is 0.5 Kelvin. The value
22returned via sysfs displays post decimal positions.
23
24The thermostat function works as follows: When configured via platform_data
25(struct ds620_platform_data) .pomode == 0 (default), the thermostat output pin
26PO is always low. If .pomode == 1, the thermostat is in PO_LOW mode. I.e., the
27output pin PO becomes active when the temperature falls below temp1_min and
28stays active until the temperature goes above temp1_max.
29
30Likewise, with .pomode == 2, the thermostat is in PO_HIGH mode. I.e., the PO
31output pin becomes active when the temperature goes above temp1_max and stays
32active until the temperature falls below temp1_min.
33
34The PO output pin of the DS620 operates active-low.
diff --git a/Documentation/hwmon/lm93 b/Documentation/hwmon/lm93
index ac711f357faf..7a10616d0b44 100644
--- a/Documentation/hwmon/lm93
+++ b/Documentation/hwmon/lm93
@@ -11,7 +11,7 @@ Authors:
11 Mark M. Hoffman <mhoffman@lightlink.com> 11 Mark M. Hoffman <mhoffman@lightlink.com>
12 Ported to 2.6 by Eric J. Bowersox <ericb@aspsys.com> 12 Ported to 2.6 by Eric J. Bowersox <ericb@aspsys.com>
13 Adapted to 2.6.20 by Carsten Emde <ce@osadl.org> 13 Adapted to 2.6.20 by Carsten Emde <ce@osadl.org>
14 Modified for mainline integration by Hans J. Koch <hjk@linutronix.de> 14 Modified for mainline integration by Hans J. Koch <hjk@hansjkoch.de>
15 15
16Module Parameters 16Module Parameters
17----------------- 17-----------------
diff --git a/Documentation/hwmon/max6650 b/Documentation/hwmon/max6650
index 8be7beb9e3e8..c565650fcfc6 100644
--- a/Documentation/hwmon/max6650
+++ b/Documentation/hwmon/max6650
@@ -8,7 +8,7 @@ Supported chips:
8 Datasheet: http://pdfserv.maxim-ic.com/en/ds/MAX6650-MAX6651.pdf 8 Datasheet: http://pdfserv.maxim-ic.com/en/ds/MAX6650-MAX6651.pdf
9 9
10Authors: 10Authors:
11 Hans J. Koch <hjk@linutronix.de> 11 Hans J. Koch <hjk@hansjkoch.de>
12 John Morris <john.morris@spirentcom.com> 12 John Morris <john.morris@spirentcom.com>
13 Claus Gindhart <claus.gindhart@kontron.com> 13 Claus Gindhart <claus.gindhart@kontron.com>
14 14
diff --git a/Documentation/hwmon/sht21 b/Documentation/hwmon/sht21
new file mode 100644
index 000000000000..db17fda45c3e
--- /dev/null
+++ b/Documentation/hwmon/sht21
@@ -0,0 +1,49 @@
1Kernel driver sht21
2===================
3
4Supported chips:
5 * Sensirion SHT21
6 Prefix: 'sht21'
7 Addresses scanned: none
8 Datasheet: Publicly available at the Sensirion website
9 http://www.sensirion.com/en/pdf/product_information/Datasheet-humidity-sensor-SHT21.pdf
10
11 * Sensirion SHT25
12 Prefix: 'sht21'
13 Addresses scanned: none
14 Datasheet: Publicly available at the Sensirion website
15 http://www.sensirion.com/en/pdf/product_information/Datasheet-humidity-sensor-SHT25.pdf
16
17Author:
18 Urs Fleisch <urs.fleisch@sensirion.com>
19
20Description
21-----------
22
23The SHT21 and SHT25 are humidity and temperature sensors in a DFN package of
24only 3 x 3 mm footprint and 1.1 mm height. The difference between the two
25devices is the higher level of precision of the SHT25 (1.8% relative humidity,
260.2 degree Celsius) compared with the SHT21 (2.0% relative humidity,
270.3 degree Celsius).
28
29The devices communicate with the I2C protocol. All sensors are set to the same
30I2C address 0x40, so an entry with I2C_BOARD_INFO("sht21", 0x40) can be used
31in the board setup code.
32
33sysfs-Interface
34---------------
35
36temp1_input - temperature input
37humidity1_input - humidity input
38
39Notes
40-----
41
42The driver uses the default resolution settings of 12 bit for humidity and 14
43bit for temperature, which results in typical measurement times of 22 ms for
44humidity and 66 ms for temperature. To keep self heating below 0.1 degree
45Celsius, the device should not be active for more than 10% of the time,
46e.g. maximum two measurements per second at the given resolution.
47
48Different resolutions, the on-chip heater, using the CRC checksum and reading
49the serial number are not supported yet.
diff --git a/Documentation/hwmon/sysfs-interface b/Documentation/hwmon/sysfs-interface
index 645699010551..c6559f153589 100644
--- a/Documentation/hwmon/sysfs-interface
+++ b/Documentation/hwmon/sysfs-interface
@@ -384,10 +384,20 @@ curr[1-*]_min Current min value.
384 Unit: milliampere 384 Unit: milliampere
385 RW 385 RW
386 386
387curr[1-*]_lcrit Current critical low value
388 Unit: milliampere
389 RW
390
391curr[1-*]_crit Current critical high value.
392 Unit: milliampere
393 RW
394
387curr[1-*]_input Current input value 395curr[1-*]_input Current input value
388 Unit: milliampere 396 Unit: milliampere
389 RO 397 RO
390 398
399Also see the Alarms section for status flags associated with currents.
400
391********* 401*********
392* Power * 402* Power *
393********* 403*********
@@ -450,13 +460,6 @@ power[1-*]_accuracy Accuracy of the power meter.
450 Unit: Percent 460 Unit: Percent
451 RO 461 RO
452 462
453power[1-*]_alarm 1 if the system is drawing more power than the
454 cap allows; 0 otherwise. A poll notification is
455 sent to this file when the power use exceeds the
456 cap. This file only appears if the cap is known
457 to be enforced by hardware.
458 RO
459
460power[1-*]_cap If power use rises above this limit, the 463power[1-*]_cap If power use rises above this limit, the
461 system should take action to reduce power use. 464 system should take action to reduce power use.
462 A poll notification is sent to this file if the 465 A poll notification is sent to this file if the
@@ -479,6 +482,20 @@ power[1-*]_cap_min Minimum cap that can be set.
479 Unit: microWatt 482 Unit: microWatt
480 RO 483 RO
481 484
485power[1-*]_max Maximum power.
486 Unit: microWatt
487 RW
488
489power[1-*]_crit Critical maximum power.
490 If power rises to or above this limit, the
491 system is expected take drastic action to reduce
492 power consumption, such as a system shutdown or
493 a forced powerdown of some devices.
494 Unit: microWatt
495 RW
496
497Also see the Alarms section for status flags associated with power readings.
498
482********** 499**********
483* Energy * 500* Energy *
484********** 501**********
@@ -488,6 +505,15 @@ energy[1-*]_input Cumulative energy use
488 RO 505 RO
489 506
490 507
508************
509* Humidity *
510************
511
512humidity[1-*]_input Humidity
513 Unit: milli-percent (per cent mille, pcm)
514 RO
515
516
491********** 517**********
492* Alarms * 518* Alarms *
493********** 519**********
@@ -501,6 +527,7 @@ implementation.
501 527
502in[0-*]_alarm 528in[0-*]_alarm
503curr[1-*]_alarm 529curr[1-*]_alarm
530power[1-*]_alarm
504fan[1-*]_alarm 531fan[1-*]_alarm
505temp[1-*]_alarm 532temp[1-*]_alarm
506 Channel alarm 533 Channel alarm
@@ -512,12 +539,20 @@ OR
512 539
513in[0-*]_min_alarm 540in[0-*]_min_alarm
514in[0-*]_max_alarm 541in[0-*]_max_alarm
542in[0-*]_lcrit_alarm
543in[0-*]_crit_alarm
515curr[1-*]_min_alarm 544curr[1-*]_min_alarm
516curr[1-*]_max_alarm 545curr[1-*]_max_alarm
546curr[1-*]_lcrit_alarm
547curr[1-*]_crit_alarm
548power[1-*]_cap_alarm
549power[1-*]_max_alarm
550power[1-*]_crit_alarm
517fan[1-*]_min_alarm 551fan[1-*]_min_alarm
518fan[1-*]_max_alarm 552fan[1-*]_max_alarm
519temp[1-*]_min_alarm 553temp[1-*]_min_alarm
520temp[1-*]_max_alarm 554temp[1-*]_max_alarm
555temp[1-*]_lcrit_alarm
521temp[1-*]_crit_alarm 556temp[1-*]_crit_alarm
522temp[1-*]_emergency_alarm 557temp[1-*]_emergency_alarm
523 Limit alarm 558 Limit alarm
diff --git a/Documentation/hwmon/w83627hf b/Documentation/hwmon/w83627hf
index fb145e5e722a..8432e1118173 100644
--- a/Documentation/hwmon/w83627hf
+++ b/Documentation/hwmon/w83627hf
@@ -91,3 +91,25 @@ isaset -y -f 0x2e 0xaa
91 91
92The above sequence assumes a Super-I/O config space at 0x2e/0x2f, but 92The above sequence assumes a Super-I/O config space at 0x2e/0x2f, but
930x4e/0x4f is also possible. 930x4e/0x4f is also possible.
94
95Voltage pin mapping
96-------------------
97
98Here is a summary of the voltage pin mapping for the W83627THF. This
99can be useful to convert data provided by board manufacturers into
100working libsensors configuration statements.
101
102 W83627THF |
103 Pin | Name | Register | Sysfs attribute
104-----------------------------------------------------
105 100 | CPUVCORE | 20h | in0
106 99 | VIN0 | 21h | in1
107 98 | VIN1 | 22h | in2
108 97 | VIN2 | 24h | in4
109 114 | AVCC | 23h | in3
110 61 | 5VSB | 50h (bank 5) | in7
111 74 | VBAT | 51h (bank 5) | in8
112
113For other supported devices, you'll have to take the hard path and
114look up the information in the datasheet yourself (and then add it
115to this document please.)
diff --git a/Documentation/hwmon/w83793 b/Documentation/hwmon/w83793
index 51171a83165b..6cc5f639b721 100644
--- a/Documentation/hwmon/w83793
+++ b/Documentation/hwmon/w83793
@@ -92,7 +92,7 @@ This driver implements support for Winbond W83793G/W83793R chips.
92 92
93* Chassis 93* Chassis
94 If the case open alarm triggers, it will stay in this state unless cleared 94 If the case open alarm triggers, it will stay in this state unless cleared
95 by any write to the sysfs file "chassis". 95 by writing 0 to the sysfs file "intrusion0_alarm".
96 96
97* VID and VRM 97* VID and VRM
98 The VRM version is detected automatically, don't modify the it unless you 98 The VRM version is detected automatically, don't modify the it unless you
diff --git a/Documentation/i2c/muxes/gpio-i2cmux b/Documentation/i2c/muxes/gpio-i2cmux
new file mode 100644
index 000000000000..811cd78d4cdc
--- /dev/null
+++ b/Documentation/i2c/muxes/gpio-i2cmux
@@ -0,0 +1,65 @@
1Kernel driver gpio-i2cmux
2
3Author: Peter Korsgaard <peter.korsgaard@barco.com>
4
5Description
6-----------
7
8gpio-i2cmux is an i2c mux driver providing access to I2C bus segments
9from a master I2C bus and a hardware MUX controlled through GPIO pins.
10
11E.G.:
12
13 ---------- ---------- Bus segment 1 - - - - -
14 | | SCL/SDA | |-------------- | |
15 | |------------| |
16 | | | | Bus segment 2 | |
17 | Linux | GPIO 1..N | MUX |--------------- Devices
18 | |------------| | | |
19 | | | | Bus segment M
20 | | | |---------------| |
21 ---------- ---------- - - - - -
22
23SCL/SDA of the master I2C bus is multiplexed to bus segment 1..M
24according to the settings of the GPIO pins 1..N.
25
26Usage
27-----
28
29gpio-i2cmux uses the platform bus, so you need to provide a struct
30platform_device with the platform_data pointing to a struct
31gpio_i2cmux_platform_data with the I2C adapter number of the master
32bus, the number of bus segments to create and the GPIO pins used
33to control it. See include/linux/gpio-i2cmux.h for details.
34
35E.G. something like this for a MUX providing 4 bus segments
36controlled through 3 GPIO pins:
37
38#include <linux/gpio-i2cmux.h>
39#include <linux/platform_device.h>
40
41static const unsigned myboard_gpiomux_gpios[] = {
42 AT91_PIN_PC26, AT91_PIN_PC25, AT91_PIN_PC24
43};
44
45static const unsigned myboard_gpiomux_values[] = {
46 0, 1, 2, 3
47};
48
49static struct gpio_i2cmux_platform_data myboard_i2cmux_data = {
50 .parent = 1,
51 .base_nr = 2, /* optional */
52 .values = myboard_gpiomux_values,
53 .n_values = ARRAY_SIZE(myboard_gpiomux_values),
54 .gpios = myboard_gpiomux_gpios,
55 .n_gpios = ARRAY_SIZE(myboard_gpiomux_gpios),
56 .idle = 4, /* optional */
57};
58
59static struct platform_device myboard_i2cmux = {
60 .name = "gpio-i2cmux",
61 .id = 0,
62 .dev = {
63 .platform_data = &myboard_i2cmux_data,
64 },
65};
diff --git a/Documentation/input/cma3000_d0x.txt b/Documentation/input/cma3000_d0x.txt
new file mode 100644
index 000000000000..29d088db4afd
--- /dev/null
+++ b/Documentation/input/cma3000_d0x.txt
@@ -0,0 +1,115 @@
1Kernel driver for CMA3000-D0x
2============================
3
4Supported chips:
5* VTI CMA3000-D0x
6Datasheet:
7 CMA3000-D0X Product Family Specification 8281000A.02.pdf
8 <http://www.vti.fi/en/>
9
10Author: Hemanth V <hemanthv@ti.com>
11
12
13Description
14-----------
15CMA3000 Tri-axis accelerometer supports Motion detect, Measurement and
16Free fall modes.
17
18Motion Detect Mode: Its the low power mode where interrupts are generated only
19when motion exceeds the defined thresholds.
20
21Measurement Mode: This mode is used to read the acceleration data on X,Y,Z
22axis and supports 400, 100, 40 Hz sample frequency.
23
24Free fall Mode: This mode is intended to save system resources.
25
26Threshold values: Chip supports defining threshold values for above modes
27which includes time and g value. Refer product specifications for more details.
28
29CMA3000 chip supports mutually exclusive I2C and SPI interfaces for
30communication, currently the driver supports I2C based communication only.
31Initial configuration for bus mode is set in non volatile memory and can later
32be modified through bus interface command.
33
34Driver reports acceleration data through input subsystem. It generates ABS_MISC
35event with value 1 when free fall is detected.
36
37Platform data need to be configured for initial default values.
38
39Platform Data
40-------------
41fuzz_x: Noise on X Axis
42
43fuzz_y: Noise on Y Axis
44
45fuzz_z: Noise on Z Axis
46
47g_range: G range in milli g i.e 2000 or 8000
48
49mode: Default Operating mode
50
51mdthr: Motion detect g range threshold value
52
53mdfftmr: Motion detect and free fall time threshold value
54
55ffthr: Free fall g range threshold value
56
57Input Interface
58--------------
59Input driver version is 1.0.0
60Input device ID: bus 0x18 vendor 0x0 product 0x0 version 0x0
61Input device name: "cma3000-accelerometer"
62Supported events:
63 Event type 0 (Sync)
64 Event type 3 (Absolute)
65 Event code 0 (X)
66 Value 47
67 Min -8000
68 Max 8000
69 Fuzz 200
70 Event code 1 (Y)
71 Value -28
72 Min -8000
73 Max 8000
74 Fuzz 200
75 Event code 2 (Z)
76 Value 905
77 Min -8000
78 Max 8000
79 Fuzz 200
80 Event code 40 (Misc)
81 Value 0
82 Min 0
83 Max 1
84 Event type 4 (Misc)
85
86
87Register/Platform parameters Description
88----------------------------------------
89
90mode:
91 0: power down mode
92 1: 100 Hz Measurement mode
93 2: 400 Hz Measurement mode
94 3: 40 Hz Measurement mode
95 4: Motion Detect mode (default)
96 5: 100 Hz Free fall mode
97 6: 40 Hz Free fall mode
98 7: Power off mode
99
100grange:
101 2000: 2000 mg or 2G Range
102 8000: 8000 mg or 8G Range
103
104mdthr:
105 X: X * 71mg (8G Range)
106 X: X * 18mg (2G Range)
107
108mdfftmr:
109 X: (X & 0x70) * 100 ms (MDTMR)
110 (X & 0x0F) * 2.5 ms (FFTMR 400 Hz)
111 (X & 0x0F) * 10 ms (FFTMR 100 Hz)
112
113ffthr:
114 X: (X >> 2) * 18mg (2G Range)
115 X: (X & 0x0F) * 71 mg (8G Range)
diff --git a/Documentation/input/ff.txt b/Documentation/input/ff.txt
index ded4d5f53109..b3867bf49f8f 100644
--- a/Documentation/input/ff.txt
+++ b/Documentation/input/ff.txt
@@ -49,7 +49,9 @@ This information is subject to change.
49#include <linux/input.h> 49#include <linux/input.h>
50#include <sys/ioctl.h> 50#include <sys/ioctl.h>
51 51
52unsigned long features[1 + FF_MAX/sizeof(unsigned long)]; 52#define BITS_TO_LONGS(x) \
53 (((x) + 8 * sizeof (unsigned long) - 1) / (8 * sizeof (unsigned long)))
54unsigned long features[BITS_TO_LONGS(FF_CNT)];
53int ioctl(int file_descriptor, int request, unsigned long *features); 55int ioctl(int file_descriptor, int request, unsigned long *features);
54 56
55"request" must be EVIOCGBIT(EV_FF, size of features array in bytes ) 57"request" must be EVIOCGBIT(EV_FF, size of features array in bytes )
diff --git a/Documentation/input/multi-touch-protocol.txt b/Documentation/input/multi-touch-protocol.txt
index bdcba154b83e..71536e78406f 100644
--- a/Documentation/input/multi-touch-protocol.txt
+++ b/Documentation/input/multi-touch-protocol.txt
@@ -1,6 +1,6 @@
1Multi-touch (MT) Protocol 1Multi-touch (MT) Protocol
2------------------------- 2-------------------------
3 Copyright (C) 2009 Henrik Rydberg <rydberg@euromail.se> 3 Copyright (C) 2009-2010 Henrik Rydberg <rydberg@euromail.se>
4 4
5 5
6Introduction 6Introduction
@@ -161,19 +161,24 @@ against the glass. The inner region will increase, and in general, the
161ratio ABS_MT_TOUCH_MAJOR / ABS_MT_WIDTH_MAJOR, which is always smaller than 161ratio ABS_MT_TOUCH_MAJOR / ABS_MT_WIDTH_MAJOR, which is always smaller than
162unity, is related to the contact pressure. For pressure-based devices, 162unity, is related to the contact pressure. For pressure-based devices,
163ABS_MT_PRESSURE may be used to provide the pressure on the contact area 163ABS_MT_PRESSURE may be used to provide the pressure on the contact area
164instead. 164instead. Devices capable of contact hovering can use ABS_MT_DISTANCE to
165indicate the distance between the contact and the surface.
165 166
166In addition to the MAJOR parameters, the oval shape of the contact can be 167In addition to the MAJOR parameters, the oval shape of the contact can be
167described by adding the MINOR parameters, such that MAJOR and MINOR are the 168described by adding the MINOR parameters, such that MAJOR and MINOR are the
168major and minor axis of an ellipse. Finally, the orientation of the oval 169major and minor axis of an ellipse. Finally, the orientation of the oval
169shape can be describe with the ORIENTATION parameter. 170shape can be describe with the ORIENTATION parameter.
170 171
172For type A devices, further specification of the touch shape is possible
173via ABS_MT_BLOB_ID.
174
171The ABS_MT_TOOL_TYPE may be used to specify whether the touching tool is a 175The ABS_MT_TOOL_TYPE may be used to specify whether the touching tool is a
172contact or a pen or something else. Devices with more granular information 176finger or a pen or something else. Finally, the ABS_MT_TRACKING_ID event
173may specify general shapes as blobs, i.e., as a sequence of rectangular 177may be used to track identified contacts over time [5].
174shapes grouped together by an ABS_MT_BLOB_ID. Finally, for the few devices 178
175that currently support it, the ABS_MT_TRACKING_ID event may be used to 179In the type B protocol, ABS_MT_TOOL_TYPE and ABS_MT_TRACKING_ID are
176report contact tracking from hardware [5]. 180implicitly handled by input core; drivers should instead call
181input_mt_report_slot_state().
177 182
178 183
179Event Semantics 184Event Semantics
@@ -213,6 +218,12 @@ The pressure, in arbitrary units, on the contact area. May be used instead
213of TOUCH and WIDTH for pressure-based devices or any device with a spatial 218of TOUCH and WIDTH for pressure-based devices or any device with a spatial
214signal intensity distribution. 219signal intensity distribution.
215 220
221ABS_MT_DISTANCE
222
223The distance, in surface units, between the contact and the surface. Zero
224distance means the contact is touching the surface. A positive number means
225the contact is hovering above the surface.
226
216ABS_MT_ORIENTATION 227ABS_MT_ORIENTATION
217 228
218The orientation of the ellipse. The value should describe a signed quarter 229The orientation of the ellipse. The value should describe a signed quarter
@@ -240,21 +251,24 @@ ABS_MT_TOOL_TYPE
240The type of approaching tool. A lot of kernel drivers cannot distinguish 251The type of approaching tool. A lot of kernel drivers cannot distinguish
241between different tool types, such as a finger or a pen. In such cases, the 252between different tool types, such as a finger or a pen. In such cases, the
242event should be omitted. The protocol currently supports MT_TOOL_FINGER and 253event should be omitted. The protocol currently supports MT_TOOL_FINGER and
243MT_TOOL_PEN [2]. 254MT_TOOL_PEN [2]. For type B devices, this event is handled by input core;
255drivers should instead use input_mt_report_slot_state().
244 256
245ABS_MT_BLOB_ID 257ABS_MT_BLOB_ID
246 258
247The BLOB_ID groups several packets together into one arbitrarily shaped 259The BLOB_ID groups several packets together into one arbitrarily shaped
248contact. This is a low-level anonymous grouping for type A devices, and 260contact. The sequence of points forms a polygon which defines the shape of
261the contact. This is a low-level anonymous grouping for type A devices, and
249should not be confused with the high-level trackingID [5]. Most type A 262should not be confused with the high-level trackingID [5]. Most type A
250devices do not have blob capability, so drivers can safely omit this event. 263devices do not have blob capability, so drivers can safely omit this event.
251 264
252ABS_MT_TRACKING_ID 265ABS_MT_TRACKING_ID
253 266
254The TRACKING_ID identifies an initiated contact throughout its life cycle 267The TRACKING_ID identifies an initiated contact throughout its life cycle
255[5]. This event is mandatory for type B devices. The value range of the 268[5]. The value range of the TRACKING_ID should be large enough to ensure
256TRACKING_ID should be large enough to ensure unique identification of a 269unique identification of a contact maintained over an extended period of
257contact maintained over an extended period of time. 270time. For type B devices, this event is handled by input core; drivers
271should instead use input_mt_report_slot_state().
258 272
259 273
260Event Computation 274Event Computation
@@ -301,18 +315,19 @@ and with ORIENTATION, one can detect twisting of fingers.
301Notes 315Notes
302----- 316-----
303 317
304In order to stay compatible with existing applications, the data 318In order to stay compatible with existing applications, the data reported
305reported in a finger packet must not be recognized as single-touch 319in a finger packet must not be recognized as single-touch events.
306events. In addition, all finger data must bypass input filtering, 320
307since subsequent events of the same type refer to different fingers. 321For type A devices, all finger data bypasses input filtering, since
322subsequent events of the same type refer to different fingers.
308 323
309The first kernel driver to utilize the MT protocol is the bcm5974 driver, 324For example usage of the type A protocol, see the bcm5974 driver. For
310where examples can be found. 325example usage of the type B protocol, see the hid-egalax driver.
311 326
312[1] With the extension ABS_MT_APPROACH_X and ABS_MT_APPROACH_Y, the 327[1] With the extension ABS_MT_APPROACH_X and ABS_MT_APPROACH_Y, the
313difference between the contact position and the approaching tool position 328difference between the contact position and the approaching tool position
314could be used to derive tilt. 329could be used to derive tilt.
315[2] The list can of course be extended. 330[2] The list can of course be extended.
316[3] Multitouch X driver project: http://bitmath.org/code/multitouch/. 331[3] The mtdev project: http://bitmath.org/code/mtdev/.
317[4] See the section on event computation. 332[4] See the section on event computation.
318[5] See the section on finger tracking. 333[5] See the section on finger tracking.
diff --git a/Documentation/ioctl/ioctl-number.txt b/Documentation/ioctl/ioctl-number.txt
index 63ffd78824d8..ac293e955308 100644
--- a/Documentation/ioctl/ioctl-number.txt
+++ b/Documentation/ioctl/ioctl-number.txt
@@ -155,7 +155,6 @@ Code Seq#(hex) Include File Comments
155'Q' all linux/soundcard.h 155'Q' all linux/soundcard.h
156'R' 00-1F linux/random.h conflict! 156'R' 00-1F linux/random.h conflict!
157'R' 01 linux/rfkill.h conflict! 157'R' 01 linux/rfkill.h conflict!
158'R' 01-0F media/rds.h conflict!
159'R' C0-DF net/bluetooth/rfcomm.h 158'R' C0-DF net/bluetooth/rfcomm.h
160'S' all linux/cdrom.h conflict! 159'S' all linux/cdrom.h conflict!
161'S' 80-81 scsi/scsi_ioctl.h conflict! 160'S' 80-81 scsi/scsi_ioctl.h conflict!
@@ -194,7 +193,6 @@ Code Seq#(hex) Include File Comments
194 <http://lrcwww.epfl.ch/> 193 <http://lrcwww.epfl.ch/>
195'b' 00-FF conflict! bit3 vme host bridge 194'b' 00-FF conflict! bit3 vme host bridge
196 <mailto:natalia@nikhefk.nikhef.nl> 195 <mailto:natalia@nikhefk.nikhef.nl>
197'b' 00-0F media/bt819.h conflict!
198'c' all linux/cm4000_cs.h conflict! 196'c' all linux/cm4000_cs.h conflict!
199'c' 00-7F linux/comstats.h conflict! 197'c' 00-7F linux/comstats.h conflict!
200'c' 00-7F linux/coda.h conflict! 198'c' 00-7F linux/coda.h conflict!
@@ -249,7 +247,7 @@ Code Seq#(hex) Include File Comments
249'p' 40-7F linux/nvram.h 247'p' 40-7F linux/nvram.h
250'p' 80-9F linux/ppdev.h user-space parport 248'p' 80-9F linux/ppdev.h user-space parport
251 <mailto:tim@cyberelk.net> 249 <mailto:tim@cyberelk.net>
252'p' A1-A4 linux/pps.h LinuxPPS 250'p' A1-A5 linux/pps.h LinuxPPS
253 <mailto:giometti@linux.it> 251 <mailto:giometti@linux.it>
254'q' 00-1F linux/serio.h 252'q' 00-1F linux/serio.h
255'q' 80-FF linux/telephony.h Internet PhoneJACK, Internet LineJACK 253'q' 80-FF linux/telephony.h Internet PhoneJACK, Internet LineJACK
@@ -260,14 +258,11 @@ Code Seq#(hex) Include File Comments
260't' 80-8F linux/isdn_ppp.h 258't' 80-8F linux/isdn_ppp.h
261't' 90 linux/toshiba.h 259't' 90 linux/toshiba.h
262'u' 00-1F linux/smb_fs.h gone 260'u' 00-1F linux/smb_fs.h gone
263'v' all linux/videodev.h conflict!
264'v' 00-1F linux/ext2_fs.h conflict! 261'v' 00-1F linux/ext2_fs.h conflict!
265'v' 00-1F linux/fs.h conflict! 262'v' 00-1F linux/fs.h conflict!
266'v' 00-0F linux/sonypi.h conflict! 263'v' 00-0F linux/sonypi.h conflict!
267'v' C0-CF drivers/media/video/ov511.h conflict!
268'v' C0-DF media/pwc-ioctl.h conflict! 264'v' C0-DF media/pwc-ioctl.h conflict!
269'v' C0-FF linux/meye.h conflict! 265'v' C0-FF linux/meye.h conflict!
270'v' C0-CF drivers/media/video/zoran/zoran.h conflict!
271'v' D0-DF drivers/media/video/cpia2/cpia2dev.h conflict! 266'v' D0-DF drivers/media/video/cpia2/cpia2dev.h conflict!
272'w' all CERN SCI driver 267'w' all CERN SCI driver
273'y' 00-1F packet based user level communications 268'y' 00-1F packet based user level communications
@@ -278,7 +273,6 @@ Code Seq#(hex) Include File Comments
278 <mailto:oe@port.de> 273 <mailto:oe@port.de>
279'z' 10-4F drivers/s390/crypto/zcrypt_api.h conflict! 274'z' 10-4F drivers/s390/crypto/zcrypt_api.h conflict!
2800x80 00-1F linux/fb.h 2750x80 00-1F linux/fb.h
2810x88 00-3F media/ovcamchip.h
2820x89 00-06 arch/x86/include/asm/sockios.h 2760x89 00-06 arch/x86/include/asm/sockios.h
2830x89 0B-DF linux/sockios.h 2770x89 0B-DF linux/sockios.h
2840x89 E0-EF linux/sockios.h SIOCPROTOPRIVATE range 2780x89 E0-EF linux/sockios.h SIOCPROTOPRIVATE range
diff --git a/Documentation/iostats.txt b/Documentation/iostats.txt
index 59a69ec67c40..f6dece5b7014 100644
--- a/Documentation/iostats.txt
+++ b/Documentation/iostats.txt
@@ -81,7 +81,7 @@ Field 9 -- # of I/Os currently in progress
81 The only field that should go to zero. Incremented as requests are 81 The only field that should go to zero. Incremented as requests are
82 given to appropriate struct request_queue and decremented as they finish. 82 given to appropriate struct request_queue and decremented as they finish.
83Field 10 -- # of milliseconds spent doing I/Os 83Field 10 -- # of milliseconds spent doing I/Os
84 This field is increases so long as field 9 is nonzero. 84 This field increases so long as field 9 is nonzero.
85Field 11 -- weighted # of milliseconds spent doing I/Os 85Field 11 -- weighted # of milliseconds spent doing I/Os
86 This field is incremented at each I/O start, I/O completion, I/O 86 This field is incremented at each I/O start, I/O completion, I/O
87 merge, or read of these stats by the number of I/Os in progress 87 merge, or read of these stats by the number of I/Os in progress
diff --git a/Documentation/kbuild/kbuild.txt b/Documentation/kbuild/kbuild.txt
index 1e5165aa9e4e..4a990317b84a 100644
--- a/Documentation/kbuild/kbuild.txt
+++ b/Documentation/kbuild/kbuild.txt
@@ -73,6 +73,14 @@ Specify the output directory when building the kernel.
73The output directory can also be specified using "O=...". 73The output directory can also be specified using "O=...".
74Setting "O=..." takes precedence over KBUILD_OUTPUT. 74Setting "O=..." takes precedence over KBUILD_OUTPUT.
75 75
76KBUILD_DEBARCH
77--------------------------------------------------
78For the deb-pkg target, allows overriding the normal heuristics deployed by
79deb-pkg. Normally deb-pkg attempts to guess the right architecture based on
80the UTS_MACHINE variable, and on some architectures also the kernel config.
81The value of KBUILD_DEBARCH is assumed (not checked) to be a valid Debian
82architecture.
83
76ARCH 84ARCH
77-------------------------------------------------- 85--------------------------------------------------
78Set ARCH to the architecture to be built. 86Set ARCH to the architecture to be built.
diff --git a/Documentation/kbuild/kconfig-language.txt b/Documentation/kbuild/kconfig-language.txt
index 2fe93ca7c77c..b507d61fd41c 100644
--- a/Documentation/kbuild/kconfig-language.txt
+++ b/Documentation/kbuild/kconfig-language.txt
@@ -112,7 +112,6 @@ applicable everywhere (see syntax).
112 (no prompts anywhere) and for symbols with no dependencies. 112 (no prompts anywhere) and for symbols with no dependencies.
113 That will limit the usefulness but on the other hand avoid 113 That will limit the usefulness but on the other hand avoid
114 the illegal configurations all over. 114 the illegal configurations all over.
115 kconfig should one day warn about such things.
116 115
117- numerical ranges: "range" <symbol> <symbol> ["if" <expr>] 116- numerical ranges: "range" <symbol> <symbol> ["if" <expr>]
118 This allows to limit the range of possible input values for int 117 This allows to limit the range of possible input values for int
@@ -268,7 +267,7 @@ separate list of options.
268 267
269choices: 268choices:
270 269
271 "choice" 270 "choice" [symbol]
272 <choice options> 271 <choice options>
273 <choice block> 272 <choice block>
274 "endchoice" 273 "endchoice"
@@ -282,6 +281,10 @@ single driver can be compiled/loaded into the kernel, but all drivers
282can be compiled as modules. 281can be compiled as modules.
283A choice accepts another option "optional", which allows to set the 282A choice accepts another option "optional", which allows to set the
284choice to 'n' and no entry needs to be selected. 283choice to 'n' and no entry needs to be selected.
284If no [symbol] is associated with a choice, then you can not have multiple
285definitions of that choice. If a [symbol] is associated to the choice,
286then you may define the same choice (ie. with the same entries) in another
287place.
285 288
286comment: 289comment:
287 290
diff --git a/Documentation/kbuild/makefiles.txt b/Documentation/kbuild/makefiles.txt
index 0ef00bd6e54d..86e3cd0d26a0 100644
--- a/Documentation/kbuild/makefiles.txt
+++ b/Documentation/kbuild/makefiles.txt
@@ -1136,6 +1136,21 @@ When kbuild executes, the following steps are followed (roughly):
1136 resulting in the target file being recompiled for no 1136 resulting in the target file being recompiled for no
1137 obvious reason. 1137 obvious reason.
1138 1138
1139 dtc
1140 Create flattend device tree blob object suitable for linking
1141 into vmlinux. Device tree blobs linked into vmlinux are placed
1142 in an init section in the image. Platform code *must* copy the
1143 blob to non-init memory prior to calling unflatten_device_tree().
1144
1145 Example:
1146 #arch/x86/platform/ce4100/Makefile
1147 clean-files := *dtb.S
1148
1149 DTC_FLAGS := -p 1024
1150 obj-y += foo.dtb.o
1151
1152 $(obj)/%.dtb: $(src)/%.dts
1153 $(call cmd,dtc)
1139 1154
1140--- 6.7 Custom kbuild commands 1155--- 6.7 Custom kbuild commands
1141 1156
diff --git a/Documentation/kdump/kdump.txt b/Documentation/kdump/kdump.txt
index cab61d842259..7a9e0b4b2903 100644
--- a/Documentation/kdump/kdump.txt
+++ b/Documentation/kdump/kdump.txt
@@ -65,18 +65,21 @@ Install kexec-tools
65 65
662) Download the kexec-tools user-space package from the following URL: 662) Download the kexec-tools user-space package from the following URL:
67 67
68http://www.kernel.org/pub/linux/kernel/people/horms/kexec-tools/kexec-tools.tar.gz 68http://kernel.org/pub/linux/utils/kernel/kexec/kexec-tools.tar.gz
69 69
70This is a symlink to the latest version. 70This is a symlink to the latest version.
71 71
72The latest kexec-tools git tree is available at: 72The latest kexec-tools git tree is available at:
73 73
74git://git.kernel.org/pub/scm/linux/kernel/git/horms/kexec-tools.git 74git://git.kernel.org/pub/scm/utils/kernel/kexec/kexec-tools.git
75or 75and
76http://www.kernel.org/git/?p=linux/kernel/git/horms/kexec-tools.git 76http://www.kernel.org/pub/scm/utils/kernel/kexec/kexec-tools.git
77
78There is also a gitweb interface available at
79http://www.kernel.org/git/?p=utils/kernel/kexec/kexec-tools.git
77 80
78More information about kexec-tools can be found at 81More information about kexec-tools can be found at
79http://www.kernel.org/pub/linux/kernel/people/horms/kexec-tools/README.html 82http://www.kernel.org/pub/linux/utils/kernel/kexec/README.html
80 83
813) Unpack the tarball with the tar command, as follows: 843) Unpack the tarball with the tar command, as follows:
82 85
@@ -439,6 +442,6 @@ To Do
439Contact 442Contact
440======= 443=======
441 444
442Vivek Goyal (vgoyal@in.ibm.com) 445Vivek Goyal (vgoyal@redhat.com)
443Maneesh Soni (maneesh@in.ibm.com) 446Maneesh Soni (maneesh@in.ibm.com)
444 447
diff --git a/Documentation/kernel-docs.txt b/Documentation/kernel-docs.txt
index 715eaaf1519d..9a8674629a07 100644
--- a/Documentation/kernel-docs.txt
+++ b/Documentation/kernel-docs.txt
@@ -537,7 +537,7 @@
537 Notes: Further information in 537 Notes: Further information in
538 http://www.oreilly.com/catalog/linuxdrive2/ 538 http://www.oreilly.com/catalog/linuxdrive2/
539 539
540 * Title: "Linux Device Drivers, 3nd Edition" 540 * Title: "Linux Device Drivers, 3rd Edition"
541 Authors: Jonathan Corbet, Alessandro Rubini, and Greg Kroah-Hartman 541 Authors: Jonathan Corbet, Alessandro Rubini, and Greg Kroah-Hartman
542 Publisher: O'Reilly & Associates. 542 Publisher: O'Reilly & Associates.
543 Date: 2005. 543 Date: 2005.
@@ -592,14 +592,6 @@
592 Pages: 600. 592 Pages: 600.
593 ISBN: 0-13-101908-2 593 ISBN: 0-13-101908-2
594 594
595 * Title: "The Design and Implementation of the 4.4 BSD UNIX
596 Operating System"
597 Author: Marshall Kirk McKusick, Keith Bostic, Michael J. Karels,
598 John S. Quarterman.
599 Publisher: Addison-Wesley.
600 Date: 1996.
601 ISBN: 0-201-54979-4
602
603 * Title: "Programming for the real world - POSIX.4" 595 * Title: "Programming for the real world - POSIX.4"
604 Author: Bill O. Gallmeister. 596 Author: Bill O. Gallmeister.
605 Publisher: O'Reilly & Associates, Inc.. 597 Publisher: O'Reilly & Associates, Inc..
@@ -610,28 +602,13 @@
610 POSIX. Good reference. 602 POSIX. Good reference.
611 603
612 * Title: "UNIX Systems for Modern Architectures: Symmetric 604 * Title: "UNIX Systems for Modern Architectures: Symmetric
613 Multiprocesssing and Caching for Kernel Programmers" 605 Multiprocessing and Caching for Kernel Programmers"
614 Author: Curt Schimmel. 606 Author: Curt Schimmel.
615 Publisher: Addison Wesley. 607 Publisher: Addison Wesley.
616 Date: June, 1994. 608 Date: June, 1994.
617 Pages: 432. 609 Pages: 432.
618 ISBN: 0-201-63338-8 610 ISBN: 0-201-63338-8
619 611
620 * Title: "The Design and Implementation of the 4.3 BSD UNIX
621 Operating System"
622 Author: Samuel J. Leffler, Marshall Kirk McKusick, Michael J.
623 Karels, John S. Quarterman.
624 Publisher: Addison-Wesley.
625 Date: 1989 (reprinted with corrections on October, 1990).
626 ISBN: 0-201-06196-1
627
628 * Title: "The Design of the UNIX Operating System"
629 Author: Maurice J. Bach.
630 Publisher: Prentice Hall.
631 Date: 1986.
632 Pages: 471.
633 ISBN: 0-13-201757-1
634
635 MISCELLANEOUS: 612 MISCELLANEOUS:
636 613
637 * Name: linux/Documentation 614 * Name: linux/Documentation
diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt
index 92e83e53148f..55fe7599bc8e 100644
--- a/Documentation/kernel-parameters.txt
+++ b/Documentation/kernel-parameters.txt
@@ -403,6 +403,10 @@ and is between 256 and 4096 characters. It is defined in the file
403 bttv.pll= See Documentation/video4linux/bttv/Insmod-options 403 bttv.pll= See Documentation/video4linux/bttv/Insmod-options
404 bttv.tuner= and Documentation/video4linux/bttv/CARDLIST 404 bttv.tuner= and Documentation/video4linux/bttv/CARDLIST
405 405
406 bulk_remove=off [PPC] This parameter disables the use of the pSeries
407 firmware feature for flushing multiple hpte entries
408 at a time.
409
406 c101= [NET] Moxa C101 synchronous serial card 410 c101= [NET] Moxa C101 synchronous serial card
407 411
408 cachesize= [BUGS=X86-32] Override level 2 CPU cache size detection. 412 cachesize= [BUGS=X86-32] Override level 2 CPU cache size detection.
@@ -655,11 +659,6 @@ and is between 256 and 4096 characters. It is defined in the file
655 659
656 dscc4.setup= [NET] 660 dscc4.setup= [NET]
657 661
658 dynamic_printk Enables pr_debug()/dev_dbg() calls if
659 CONFIG_DYNAMIC_PRINTK_DEBUG has been enabled.
660 These can also be switched on/off via
661 <debugfs>/dynamic_printk/modules
662
663 earlycon= [KNL] Output early console device and options. 662 earlycon= [KNL] Output early console device and options.
664 uart[8250],io,<addr>[,options] 663 uart[8250],io,<addr>[,options]
665 uart[8250],mmio,<addr>[,options] 664 uart[8250],mmio,<addr>[,options]
@@ -884,6 +883,7 @@ and is between 256 and 4096 characters. It is defined in the file
884 controller 883 controller
885 i8042.nopnp [HW] Don't use ACPIPnP / PnPBIOS to discover KBD/AUX 884 i8042.nopnp [HW] Don't use ACPIPnP / PnPBIOS to discover KBD/AUX
886 controllers 885 controllers
886 i8042.notimeout [HW] Ignore timeout condition signalled by conroller
887 i8042.reset [HW] Reset the controller during init and cleanup 887 i8042.reset [HW] Reset the controller during init and cleanup
888 i8042.unlock [HW] Unlock (ignore) the keylock 888 i8042.unlock [HW] Unlock (ignore) the keylock
889 889
@@ -1490,6 +1490,10 @@ and is between 256 and 4096 characters. It is defined in the file
1490 mtdparts= [MTD] 1490 mtdparts= [MTD]
1491 See drivers/mtd/cmdlinepart.c. 1491 See drivers/mtd/cmdlinepart.c.
1492 1492
1493 multitce=off [PPC] This parameter disables the use of the pSeries
1494 firmware feature for updating multiple TCE entries
1495 at a time.
1496
1493 onenand.bdry= [HW,MTD] Flex-OneNAND Boundary Configuration 1497 onenand.bdry= [HW,MTD] Flex-OneNAND Boundary Configuration
1494 1498
1495 Format: [die0_boundary][,die0_lock][,die1_boundary][,die1_lock] 1499 Format: [die0_boundary][,die0_lock][,die1_boundary][,die1_lock]
@@ -1579,20 +1583,12 @@ and is between 256 and 4096 characters. It is defined in the file
1579 1583
1580 nmi_watchdog= [KNL,BUGS=X86] Debugging features for SMP kernels 1584 nmi_watchdog= [KNL,BUGS=X86] Debugging features for SMP kernels
1581 Format: [panic,][num] 1585 Format: [panic,][num]
1582 Valid num: 0,1,2 1586 Valid num: 0
1583 0 - turn nmi_watchdog off 1587 0 - turn nmi_watchdog off
1584 1 - use the IO-APIC timer for the NMI watchdog
1585 2 - use the local APIC for the NMI watchdog using
1586 a performance counter. Note: This will use one
1587 performance counter and the local APIC's performance
1588 vector.
1589 When panic is specified, panic when an NMI watchdog 1588 When panic is specified, panic when an NMI watchdog
1590 timeout occurs. 1589 timeout occurs.
1591 This is useful when you use a panic=... timeout and 1590 This is useful when you use a panic=... timeout and
1592 need the box quickly up again. 1591 need the box quickly up again.
1593 Instead of 1 and 2 it is possible to use the following
1594 symbolic names: lapic and ioapic
1595 Example: nmi_watchdog=2 or nmi_watchdog=panic,lapic
1596 1592
1597 netpoll.carrier_timeout= 1593 netpoll.carrier_timeout=
1598 [NET] Specifies amount of time (in seconds) that 1594 [NET] Specifies amount of time (in seconds) that
@@ -1622,6 +1618,8 @@ and is between 256 and 4096 characters. It is defined in the file
1622 noapic [SMP,APIC] Tells the kernel to not make use of any 1618 noapic [SMP,APIC] Tells the kernel to not make use of any
1623 IOAPICs that may be present in the system. 1619 IOAPICs that may be present in the system.
1624 1620
1621 noautogroup Disable scheduler automatic task group creation.
1622
1625 nobats [PPC] Do not use BATs for mapping kernel lowmem 1623 nobats [PPC] Do not use BATs for mapping kernel lowmem
1626 on "Classic" PPC cores. 1624 on "Classic" PPC cores.
1627 1625
@@ -1707,6 +1705,9 @@ and is between 256 and 4096 characters. It is defined in the file
1707 1705
1708 no-kvmclock [X86,KVM] Disable paravirtualized KVM clock driver 1706 no-kvmclock [X86,KVM] Disable paravirtualized KVM clock driver
1709 1707
1708 no-kvmapf [X86,KVM] Disable paravirtualized asynchronous page
1709 fault handling.
1710
1710 nolapic [X86-32,APIC] Do not enable or use the local APIC. 1711 nolapic [X86-32,APIC] Do not enable or use the local APIC.
1711 1712
1712 nolapic_timer [X86-32,APIC] Do not use the local APIC timer. 1713 nolapic_timer [X86-32,APIC] Do not use the local APIC timer.
@@ -1759,7 +1760,7 @@ and is between 256 and 4096 characters. It is defined in the file
1759 1760
1760 nousb [USB] Disable the USB subsystem 1761 nousb [USB] Disable the USB subsystem
1761 1762
1762 nowatchdog [KNL] Disable the lockup detector. 1763 nowatchdog [KNL] Disable the lockup detector (NMI watchdog).
1763 1764
1764 nowb [ARM] 1765 nowb [ARM]
1765 1766
@@ -2175,11 +2176,6 @@ and is between 256 and 4096 characters. It is defined in the file
2175 reset_devices [KNL] Force drivers to reset the underlying device 2176 reset_devices [KNL] Force drivers to reset the underlying device
2176 during initialization. 2177 during initialization.
2177 2178
2178 resource_alloc_from_bottom
2179 Allocate new resources from the beginning of available
2180 space, not the end. If you need to use this, please
2181 report a bug.
2182
2183 resume= [SWSUSP] 2179 resume= [SWSUSP]
2184 Specify the partition device for software suspend 2180 Specify the partition device for software suspend
2185 2181
@@ -2385,6 +2381,11 @@ and is between 256 and 4096 characters. It is defined in the file
2385 improve throughput, but will also increase the 2381 improve throughput, but will also increase the
2386 amount of memory reserved for use by the client. 2382 amount of memory reserved for use by the client.
2387 2383
2384 swapaccount[=0|1]
2385 [KNL] Enable accounting of swap in memory resource
2386 controller if no parameter or 1 is given or disable
2387 it if 0 is given (See Documentation/cgroups/memory.txt)
2388
2388 swiotlb= [IA-64] Number of I/O TLB slabs 2389 swiotlb= [IA-64] Number of I/O TLB slabs
2389 2390
2390 switches= [HW,M68k] 2391 switches= [HW,M68k]
@@ -2467,12 +2468,13 @@ and is between 256 and 4096 characters. It is defined in the file
2467 to facilitate early boot debugging. 2468 to facilitate early boot debugging.
2468 See also Documentation/trace/events.txt 2469 See also Documentation/trace/events.txt
2469 2470
2470 tsc= Disable clocksource-must-verify flag for TSC. 2471 tsc= Disable clocksource stability checks for TSC.
2471 Format: <string> 2472 Format: <string>
2472 [x86] reliable: mark tsc clocksource as reliable, this 2473 [x86] reliable: mark tsc clocksource as reliable, this
2473 disables clocksource verification at runtime. 2474 disables clocksource verification at runtime, as well
2474 Used to enable high-resolution timer mode on older 2475 as the stability checks done at bootup. Used to enable
2475 hardware, and in virtualized environment. 2476 high-resolution timer mode on older hardware, and in
2477 virtualized environment.
2476 [x86] noirqtime: Do not use TSC to do irq accounting. 2478 [x86] noirqtime: Do not use TSC to do irq accounting.
2477 Used to run time disable IRQ_TIME_ACCOUNTING on any 2479 Used to run time disable IRQ_TIME_ACCOUNTING on any
2478 platforms where RDTSC is slow and this accounting 2480 platforms where RDTSC is slow and this accounting
diff --git a/Documentation/keys-trusted-encrypted.txt b/Documentation/keys-trusted-encrypted.txt
new file mode 100644
index 000000000000..8fb79bc1ac4b
--- /dev/null
+++ b/Documentation/keys-trusted-encrypted.txt
@@ -0,0 +1,145 @@
1 Trusted and Encrypted Keys
2
3Trusted and Encrypted Keys are two new key types added to the existing kernel
4key ring service. Both of these new types are variable length symmetic keys,
5and in both cases all keys are created in the kernel, and user space sees,
6stores, and loads only encrypted blobs. Trusted Keys require the availability
7of a Trusted Platform Module (TPM) chip for greater security, while Encrypted
8Keys can be used on any system. All user level blobs, are displayed and loaded
9in hex ascii for convenience, and are integrity verified.
10
11Trusted Keys use a TPM both to generate and to seal the keys. Keys are sealed
12under a 2048 bit RSA key in the TPM, and optionally sealed to specified PCR
13(integrity measurement) values, and only unsealed by the TPM, if PCRs and blob
14integrity verifications match. A loaded Trusted Key can be updated with new
15(future) PCR values, so keys are easily migrated to new pcr values, such as
16when the kernel and initramfs are updated. The same key can have many saved
17blobs under different PCR values, so multiple boots are easily supported.
18
19By default, trusted keys are sealed under the SRK, which has the default
20authorization value (20 zeros). This can be set at takeownership time with the
21trouser's utility: "tpm_takeownership -u -z".
22
23Usage:
24 keyctl add trusted name "new keylen [options]" ring
25 keyctl add trusted name "load hex_blob [pcrlock=pcrnum]" ring
26 keyctl update key "update [options]"
27 keyctl print keyid
28
29 options:
30 keyhandle= ascii hex value of sealing key default 0x40000000 (SRK)
31 keyauth= ascii hex auth for sealing key default 0x00...i
32 (40 ascii zeros)
33 blobauth= ascii hex auth for sealed data default 0x00...
34 (40 ascii zeros)
35 blobauth= ascii hex auth for sealed data default 0x00...
36 (40 ascii zeros)
37 pcrinfo= ascii hex of PCR_INFO or PCR_INFO_LONG (no default)
38 pcrlock= pcr number to be extended to "lock" blob
39 migratable= 0|1 indicating permission to reseal to new PCR values,
40 default 1 (resealing allowed)
41
42"keyctl print" returns an ascii hex copy of the sealed key, which is in standard
43TPM_STORED_DATA format. The key length for new keys are always in bytes.
44Trusted Keys can be 32 - 128 bytes (256 - 1024 bits), the upper limit is to fit
45within the 2048 bit SRK (RSA) keylength, with all necessary structure/padding.
46
47Encrypted keys do not depend on a TPM, and are faster, as they use AES for
48encryption/decryption. New keys are created from kernel generated random
49numbers, and are encrypted/decrypted using a specified 'master' key. The
50'master' key can either be a trusted-key or user-key type. The main
51disadvantage of encrypted keys is that if they are not rooted in a trusted key,
52they are only as secure as the user key encrypting them. The master user key
53should therefore be loaded in as secure a way as possible, preferably early in
54boot.
55
56Usage:
57 keyctl add encrypted name "new key-type:master-key-name keylen" ring
58 keyctl add encrypted name "load hex_blob" ring
59 keyctl update keyid "update key-type:master-key-name"
60
61where 'key-type' is either 'trusted' or 'user'.
62
63Examples of trusted and encrypted key usage:
64
65Create and save a trusted key named "kmk" of length 32 bytes:
66
67 $ keyctl add trusted kmk "new 32" @u
68 440502848
69
70 $ keyctl show
71 Session Keyring
72 -3 --alswrv 500 500 keyring: _ses
73 97833714 --alswrv 500 -1 \_ keyring: _uid.500
74 440502848 --alswrv 500 500 \_ trusted: kmk
75
76 $ keyctl print 440502848
77 0101000000000000000001005d01b7e3f4a6be5709930f3b70a743cbb42e0cc95e18e915
78 3f60da455bbf1144ad12e4f92b452f966929f6105fd29ca28e4d4d5a031d068478bacb0b
79 27351119f822911b0a11ba3d3498ba6a32e50dac7f32894dd890eb9ad578e4e292c83722
80 a52e56a097e6a68b3f56f7a52ece0cdccba1eb62cad7d817f6dc58898b3ac15f36026fec
81 d568bd4a706cb60bb37be6d8f1240661199d640b66fb0fe3b079f97f450b9ef9c22c6d5d
82 dd379f0facd1cd020281dfa3c70ba21a3fa6fc2471dc6d13ecf8298b946f65345faa5ef0
83 f1f8fff03ad0acb083725535636addb08d73dedb9832da198081e5deae84bfaf0409c22b
84 e4a8aea2b607ec96931e6f4d4fe563ba
85
86 $ keyctl pipe 440502848 > kmk.blob
87
88Load a trusted key from the saved blob:
89
90 $ keyctl add trusted kmk "load `cat kmk.blob`" @u
91 268728824
92
93 $ keyctl print 268728824
94 0101000000000000000001005d01b7e3f4a6be5709930f3b70a743cbb42e0cc95e18e915
95 3f60da455bbf1144ad12e4f92b452f966929f6105fd29ca28e4d4d5a031d068478bacb0b
96 27351119f822911b0a11ba3d3498ba6a32e50dac7f32894dd890eb9ad578e4e292c83722
97 a52e56a097e6a68b3f56f7a52ece0cdccba1eb62cad7d817f6dc58898b3ac15f36026fec
98 d568bd4a706cb60bb37be6d8f1240661199d640b66fb0fe3b079f97f450b9ef9c22c6d5d
99 dd379f0facd1cd020281dfa3c70ba21a3fa6fc2471dc6d13ecf8298b946f65345faa5ef0
100 f1f8fff03ad0acb083725535636addb08d73dedb9832da198081e5deae84bfaf0409c22b
101 e4a8aea2b607ec96931e6f4d4fe563ba
102
103Reseal a trusted key under new pcr values:
104
105 $ keyctl update 268728824 "update pcrinfo=`cat pcr.blob`"
106 $ keyctl print 268728824
107 010100000000002c0002800093c35a09b70fff26e7a98ae786c641e678ec6ffb6b46d805
108 77c8a6377aed9d3219c6dfec4b23ffe3000001005d37d472ac8a44023fbb3d18583a4f73
109 d3a076c0858f6f1dcaa39ea0f119911ff03f5406df4f7f27f41da8d7194f45c9f4e00f2e
110 df449f266253aa3f52e55c53de147773e00f0f9aca86c64d94c95382265968c354c5eab4
111 9638c5ae99c89de1e0997242edfb0b501744e11ff9762dfd951cffd93227cc513384e7e6
112 e782c29435c7ec2edafaa2f4c1fe6e7a781b59549ff5296371b42133777dcc5b8b971610
113 94bc67ede19e43ddb9dc2baacad374a36feaf0314d700af0a65c164b7082401740e489c9
114 7ef6a24defe4846104209bf0c3eced7fa1a672ed5b125fc9d8cd88b476a658a4434644ef
115 df8ae9a178e9f83ba9f08d10fa47e4226b98b0702f06b3b8
116
117Create and save an encrypted key "evm" using the above trusted key "kmk":
118
119 $ keyctl add encrypted evm "new trusted:kmk 32" @u
120 159771175
121
122 $ keyctl print 159771175
123 trusted:kmk 32 2375725ad57798846a9bbd240de8906f006e66c03af53b1b382dbbc55
124 be2a44616e4959430436dc4f2a7a9659aa60bb4652aeb2120f149ed197c564e024717c64
125 5972dcb82ab2dde83376d82b2e3c09ffc
126
127 $ keyctl pipe 159771175 > evm.blob
128
129Load an encrypted key "evm" from saved blob:
130
131 $ keyctl add encrypted evm "load `cat evm.blob`" @u
132 831684262
133
134 $ keyctl print 831684262
135 trusted:kmk 32 2375725ad57798846a9bbd240de8906f006e66c03af53b1b382dbbc55
136 be2a44616e4959430436dc4f2a7a9659aa60bb4652aeb2120f149ed197c564e024717c64
137 5972dcb82ab2dde83376d82b2e3c09ffc
138
139
140The initial consumer of trusted keys is EVM, which at boot time needs a high
141quality symmetric key for HMAC protection of file metadata. The use of a
142trusted key provides strong guarantees that the EVM key has not been
143compromised by a user level problem, and when sealed to specific boot PCR
144values, protects against boot and offline attacks. Other uses for trusted and
145encrypted keys, such as for disk and file encryption are anticipated.
diff --git a/Documentation/ko_KR/HOWTO b/Documentation/ko_KR/HOWTO
index e3a55b6091e9..ab5189ae3428 100644
--- a/Documentation/ko_KR/HOWTO
+++ b/Documentation/ko_KR/HOWTO
@@ -391,8 +391,8 @@ bugme-new 메일링 리스트나(새로운 버그 리포트들만이 이곳에
391bugme-janitor 메일링 리스트(bugzilla에 모든 변화들이 여기서 메일로 전해진다) 391bugme-janitor 메일링 리스트(bugzilla에 모든 변화들이 여기서 메일로 전해진다)
392에 등록하면 된다. 392에 등록하면 된다.
393 393
394 http://lists.osdl.org/mailman/listinfo/bugme-new 394 https://lists.linux-foundation.org/mailman/listinfo/bugme-new
395 http://lists.osdl.org/mailman/listinfo/bugme-janitors 395 https://lists.linux-foundation.org/mailman/listinfo/bugme-janitors
396 396
397 397
398 398
diff --git a/Documentation/kprobes.txt b/Documentation/kprobes.txt
index 741fe66d6eca..0cfb00fd86ff 100644
--- a/Documentation/kprobes.txt
+++ b/Documentation/kprobes.txt
@@ -598,7 +598,7 @@ a 5-byte jump instruction. So there are several limitations.
598a) The instructions in DCR must be relocatable. 598a) The instructions in DCR must be relocatable.
599b) The instructions in DCR must not include a call instruction. 599b) The instructions in DCR must not include a call instruction.
600c) JTPR must not be targeted by any jump or call instruction. 600c) JTPR must not be targeted by any jump or call instruction.
601d) DCR must not straddle the border betweeen functions. 601d) DCR must not straddle the border between functions.
602 602
603Anyway, these limitations are checked by the in-kernel instruction 603Anyway, these limitations are checked by the in-kernel instruction
604decoder, so you don't need to worry about that. 604decoder, so you don't need to worry about that.
diff --git a/Documentation/kvm/api.txt b/Documentation/kvm/api.txt
index b336266bea5e..ad85797c1cf0 100644
--- a/Documentation/kvm/api.txt
+++ b/Documentation/kvm/api.txt
@@ -874,7 +874,7 @@ Possible values are:
874 - KVM_MP_STATE_HALTED: the vcpu has executed a HLT instruction and 874 - KVM_MP_STATE_HALTED: the vcpu has executed a HLT instruction and
875 is waiting for an interrupt 875 is waiting for an interrupt
876 - KVM_MP_STATE_SIPI_RECEIVED: the vcpu has just received a SIPI (vector 876 - KVM_MP_STATE_SIPI_RECEIVED: the vcpu has just received a SIPI (vector
877 accesible via KVM_GET_VCPU_EVENTS) 877 accessible via KVM_GET_VCPU_EVENTS)
878 878
879This ioctl is only useful after KVM_CREATE_IRQCHIP. Without an in-kernel 879This ioctl is only useful after KVM_CREATE_IRQCHIP. Without an in-kernel
880irqchip, the multiprocessing state must be maintained by userspace. 880irqchip, the multiprocessing state must be maintained by userspace.
@@ -1085,6 +1085,184 @@ of 4 instructions that make up a hypercall.
1085If any additional field gets added to this structure later on, a bit for that 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. 1086additional piece of information will be set in the flags bitmap.
1087 1087
10884.47 KVM_ASSIGN_PCI_DEVICE
1089
1090Capability: KVM_CAP_DEVICE_ASSIGNMENT
1091Architectures: x86 ia64
1092Type: vm ioctl
1093Parameters: struct kvm_assigned_pci_dev (in)
1094Returns: 0 on success, -1 on error
1095
1096Assigns a host PCI device to the VM.
1097
1098struct kvm_assigned_pci_dev {
1099 __u32 assigned_dev_id;
1100 __u32 busnr;
1101 __u32 devfn;
1102 __u32 flags;
1103 __u32 segnr;
1104 union {
1105 __u32 reserved[11];
1106 };
1107};
1108
1109The PCI device is specified by the triple segnr, busnr, and devfn.
1110Identification in succeeding service requests is done via assigned_dev_id. The
1111following flags are specified:
1112
1113/* Depends on KVM_CAP_IOMMU */
1114#define KVM_DEV_ASSIGN_ENABLE_IOMMU (1 << 0)
1115
11164.48 KVM_DEASSIGN_PCI_DEVICE
1117
1118Capability: KVM_CAP_DEVICE_DEASSIGNMENT
1119Architectures: x86 ia64
1120Type: vm ioctl
1121Parameters: struct kvm_assigned_pci_dev (in)
1122Returns: 0 on success, -1 on error
1123
1124Ends PCI device assignment, releasing all associated resources.
1125
1126See KVM_CAP_DEVICE_ASSIGNMENT for the data structure. Only assigned_dev_id is
1127used in kvm_assigned_pci_dev to identify the device.
1128
11294.49 KVM_ASSIGN_DEV_IRQ
1130
1131Capability: KVM_CAP_ASSIGN_DEV_IRQ
1132Architectures: x86 ia64
1133Type: vm ioctl
1134Parameters: struct kvm_assigned_irq (in)
1135Returns: 0 on success, -1 on error
1136
1137Assigns an IRQ to a passed-through device.
1138
1139struct kvm_assigned_irq {
1140 __u32 assigned_dev_id;
1141 __u32 host_irq;
1142 __u32 guest_irq;
1143 __u32 flags;
1144 union {
1145 struct {
1146 __u32 addr_lo;
1147 __u32 addr_hi;
1148 __u32 data;
1149 } guest_msi;
1150 __u32 reserved[12];
1151 };
1152};
1153
1154The following flags are defined:
1155
1156#define KVM_DEV_IRQ_HOST_INTX (1 << 0)
1157#define KVM_DEV_IRQ_HOST_MSI (1 << 1)
1158#define KVM_DEV_IRQ_HOST_MSIX (1 << 2)
1159
1160#define KVM_DEV_IRQ_GUEST_INTX (1 << 8)
1161#define KVM_DEV_IRQ_GUEST_MSI (1 << 9)
1162#define KVM_DEV_IRQ_GUEST_MSIX (1 << 10)
1163
1164It is not valid to specify multiple types per host or guest IRQ. However, the
1165IRQ type of host and guest can differ or can even be null.
1166
11674.50 KVM_DEASSIGN_DEV_IRQ
1168
1169Capability: KVM_CAP_ASSIGN_DEV_IRQ
1170Architectures: x86 ia64
1171Type: vm ioctl
1172Parameters: struct kvm_assigned_irq (in)
1173Returns: 0 on success, -1 on error
1174
1175Ends an IRQ assignment to a passed-through device.
1176
1177See KVM_ASSIGN_DEV_IRQ for the data structure. The target device is specified
1178by assigned_dev_id, flags must correspond to the IRQ type specified on
1179KVM_ASSIGN_DEV_IRQ. Partial deassignment of host or guest IRQ is allowed.
1180
11814.51 KVM_SET_GSI_ROUTING
1182
1183Capability: KVM_CAP_IRQ_ROUTING
1184Architectures: x86 ia64
1185Type: vm ioctl
1186Parameters: struct kvm_irq_routing (in)
1187Returns: 0 on success, -1 on error
1188
1189Sets the GSI routing table entries, overwriting any previously set entries.
1190
1191struct kvm_irq_routing {
1192 __u32 nr;
1193 __u32 flags;
1194 struct kvm_irq_routing_entry entries[0];
1195};
1196
1197No flags are specified so far, the corresponding field must be set to zero.
1198
1199struct kvm_irq_routing_entry {
1200 __u32 gsi;
1201 __u32 type;
1202 __u32 flags;
1203 __u32 pad;
1204 union {
1205 struct kvm_irq_routing_irqchip irqchip;
1206 struct kvm_irq_routing_msi msi;
1207 __u32 pad[8];
1208 } u;
1209};
1210
1211/* gsi routing entry types */
1212#define KVM_IRQ_ROUTING_IRQCHIP 1
1213#define KVM_IRQ_ROUTING_MSI 2
1214
1215No flags are specified so far, the corresponding field must be set to zero.
1216
1217struct kvm_irq_routing_irqchip {
1218 __u32 irqchip;
1219 __u32 pin;
1220};
1221
1222struct kvm_irq_routing_msi {
1223 __u32 address_lo;
1224 __u32 address_hi;
1225 __u32 data;
1226 __u32 pad;
1227};
1228
12294.52 KVM_ASSIGN_SET_MSIX_NR
1230
1231Capability: KVM_CAP_DEVICE_MSIX
1232Architectures: x86 ia64
1233Type: vm ioctl
1234Parameters: struct kvm_assigned_msix_nr (in)
1235Returns: 0 on success, -1 on error
1236
1237Set the number of MSI-X interrupts for an assigned device. This service can
1238only be called once in the lifetime of an assigned device.
1239
1240struct kvm_assigned_msix_nr {
1241 __u32 assigned_dev_id;
1242 __u16 entry_nr;
1243 __u16 padding;
1244};
1245
1246#define KVM_MAX_MSIX_PER_DEV 256
1247
12484.53 KVM_ASSIGN_SET_MSIX_ENTRY
1249
1250Capability: KVM_CAP_DEVICE_MSIX
1251Architectures: x86 ia64
1252Type: vm ioctl
1253Parameters: struct kvm_assigned_msix_entry (in)
1254Returns: 0 on success, -1 on error
1255
1256Specifies the routing of an MSI-X assigned device interrupt to a GSI. Setting
1257the GSI vector to zero means disabling the interrupt.
1258
1259struct kvm_assigned_msix_entry {
1260 __u32 assigned_dev_id;
1261 __u32 gsi;
1262 __u16 entry; /* The index of entry in the MSI-X table */
1263 __u16 padding[3];
1264};
1265
10885. The kvm_run structure 12665. The kvm_run structure
1089 1267
1090Application code obtains a pointer to the kvm_run structure by 1268Application code obtains a pointer to the kvm_run structure by
diff --git a/Documentation/kvm/cpuid.txt b/Documentation/kvm/cpuid.txt
index 14a12ea92b7f..882068538c9c 100644
--- a/Documentation/kvm/cpuid.txt
+++ b/Documentation/kvm/cpuid.txt
@@ -36,6 +36,9 @@ KVM_FEATURE_MMU_OP || 2 || deprecated.
36KVM_FEATURE_CLOCKSOURCE2 || 3 || kvmclock available at msrs 36KVM_FEATURE_CLOCKSOURCE2 || 3 || kvmclock available at msrs
37 || || 0x4b564d00 and 0x4b564d01 37 || || 0x4b564d00 and 0x4b564d01
38------------------------------------------------------------------------------ 38------------------------------------------------------------------------------
39KVM_FEATURE_ASYNC_PF || 4 || async pf can be enabled by
40 || || writing to msr 0x4b564d02
41------------------------------------------------------------------------------
39KVM_FEATURE_CLOCKSOURCE_STABLE_BIT || 24 || host will warn if no guest-side 42KVM_FEATURE_CLOCKSOURCE_STABLE_BIT || 24 || host will warn if no guest-side
40 || || per-cpu warps are expected in 43 || || per-cpu warps are expected in
41 || || kvmclock. 44 || || kvmclock.
diff --git a/Documentation/kvm/msr.txt b/Documentation/kvm/msr.txt
index 8ddcfe84c09a..d079aed27e03 100644
--- a/Documentation/kvm/msr.txt
+++ b/Documentation/kvm/msr.txt
@@ -3,7 +3,6 @@ Glauber Costa <glommer@redhat.com>, Red Hat Inc, 2010
3===================================================== 3=====================================================
4 4
5KVM makes use of some custom MSRs to service some requests. 5KVM makes use of some custom MSRs to service some requests.
6At present, this facility is only used by kvmclock.
7 6
8Custom MSRs have a range reserved for them, that goes from 7Custom MSRs have a range reserved for them, that goes from
90x4b564d00 to 0x4b564dff. There are MSRs outside this area, 80x4b564d00 to 0x4b564dff. There are MSRs outside this area,
@@ -151,3 +150,38 @@ MSR_KVM_SYSTEM_TIME: 0x12
151 return PRESENT; 150 return PRESENT;
152 } else 151 } else
153 return NON_PRESENT; 152 return NON_PRESENT;
153
154MSR_KVM_ASYNC_PF_EN: 0x4b564d02
155 data: Bits 63-6 hold 64-byte aligned physical address of a
156 64 byte memory area which must be in guest RAM and must be
157 zeroed. Bits 5-2 are reserved and should be zero. Bit 0 is 1
158 when asynchronous page faults are enabled on the vcpu 0 when
159 disabled. Bit 2 is 1 if asynchronous page faults can be injected
160 when vcpu is in cpl == 0.
161
162 First 4 byte of 64 byte memory location will be written to by
163 the hypervisor at the time of asynchronous page fault (APF)
164 injection to indicate type of asynchronous page fault. Value
165 of 1 means that the page referred to by the page fault is not
166 present. Value 2 means that the page is now available. Disabling
167 interrupt inhibits APFs. Guest must not enable interrupt
168 before the reason is read, or it may be overwritten by another
169 APF. Since APF uses the same exception vector as regular page
170 fault guest must reset the reason to 0 before it does
171 something that can generate normal page fault. If during page
172 fault APF reason is 0 it means that this is regular page
173 fault.
174
175 During delivery of type 1 APF cr2 contains a token that will
176 be used to notify a guest when missing page becomes
177 available. When page becomes available type 2 APF is sent with
178 cr2 set to the token associated with the page. There is special
179 kind of token 0xffffffff which tells vcpu that it should wake
180 up all processes waiting for APFs and no individual type 2 APFs
181 will be sent.
182
183 If APF is disabled while there are outstanding APFs, they will
184 not be delivered.
185
186 Currently type 2 APF will be always delivered on the same vcpu as
187 type 1 was, but guest should not rely on that.
diff --git a/Documentation/lguest/lguest.txt b/Documentation/lguest/lguest.txt
index efb3a6a045a2..6ccaf8e1a00e 100644
--- a/Documentation/lguest/lguest.txt
+++ b/Documentation/lguest/lguest.txt
@@ -111,8 +111,11 @@ Running Lguest:
111 111
112 Then use --tunnet=bridge:lg0 when launching the guest. 112 Then use --tunnet=bridge:lg0 when launching the guest.
113 113
114 See http://linux-net.osdl.org/index.php/Bridge for general information 114 See:
115 on how to get bridging working. 115
116 http://www.linuxfoundation.org/collaborate/workgroups/networking/bridge
117
118 for general information on how to get bridging to work.
116 119
117There is a helpful mailing list at http://ozlabs.org/mailman/listinfo/lguest 120There is a helpful mailing list at http://ozlabs.org/mailman/listinfo/lguest
118 121
diff --git a/Documentation/magic-number.txt b/Documentation/magic-number.txt
index 505f19607542..4b12abcb2ad3 100644
--- a/Documentation/magic-number.txt
+++ b/Documentation/magic-number.txt
@@ -150,7 +150,7 @@ NBD_REPLY_MAGIC 0x96744668 nbd_reply include/linux/nbd.h
150STL_BOARDMAGIC 0xa2267f52 stlbrd include/linux/stallion.h 150STL_BOARDMAGIC 0xa2267f52 stlbrd include/linux/stallion.h
151ENI155_MAGIC 0xa54b872d midway_eprom drivers/atm/eni.h 151ENI155_MAGIC 0xa54b872d midway_eprom drivers/atm/eni.h
152SCI_MAGIC 0xbabeface gs_port drivers/char/sh-sci.h 152SCI_MAGIC 0xbabeface gs_port drivers/char/sh-sci.h
153CODA_MAGIC 0xC0DAC0DA coda_file_info include/linux/coda_fs_i.h 153CODA_MAGIC 0xC0DAC0DA coda_file_info fs/coda/coda_fs_i.h
154DPMEM_MAGIC 0xc0ffee11 gdt_pci_sram drivers/scsi/gdth.h 154DPMEM_MAGIC 0xc0ffee11 gdt_pci_sram drivers/scsi/gdth.h
155STLI_PORTMAGIC 0xe671c7a1 stliport include/linux/istallion.h 155STLI_PORTMAGIC 0xe671c7a1 stliport include/linux/istallion.h
156YAM_MAGIC 0xF10A7654 yam_port drivers/net/hamradio/yam.c 156YAM_MAGIC 0xF10A7654 yam_port drivers/net/hamradio/yam.c
diff --git a/Documentation/make/headers_install.txt b/Documentation/make/headers_install.txt
index f2481cabffcb..951eb9f1e040 100644
--- a/Documentation/make/headers_install.txt
+++ b/Documentation/make/headers_install.txt
@@ -39,8 +39,9 @@ INSTALL_HDR_PATH indicates where to install the headers. It defaults to
39The command "make headers_install_all" exports headers for all architectures 39The command "make headers_install_all" exports headers for all architectures
40simultaneously. (This is mostly of interest to distribution maintainers, 40simultaneously. (This is mostly of interest to distribution maintainers,
41who create an architecture-independent tarball from the resulting include 41who create an architecture-independent tarball from the resulting include
42directory.) Remember to provide the appropriate linux/asm directory via "mv" 42directory.) You also can use HDR_ARCH_LIST to specify list of architectures.
43or "ln -s" before building a C library with headers exported this way. 43Remember to provide the appropriate linux/asm directory via "mv" or "ln -s"
44before building a C library with headers exported this way.
44 45
45The kernel header export infrastructure is maintained by David Woodhouse 46The kernel header export infrastructure is maintained by David Woodhouse
46<dwmw2@infradead.org>. 47<dwmw2@infradead.org>.
diff --git a/Documentation/networking/LICENSE.qlcnic b/Documentation/networking/LICENSE.qlcnic
new file mode 100644
index 000000000000..29ad4b106420
--- /dev/null
+++ b/Documentation/networking/LICENSE.qlcnic
@@ -0,0 +1,327 @@
1Copyright (c) 2009-2010 QLogic Corporation
2QLogic Linux qlcnic NIC Driver
3
4This program includes a device driver for Linux 2.6 that may be
5distributed with QLogic hardware specific firmware binary file.
6You may modify and redistribute the device driver code under the
7GNU General Public License (a copy of which is attached hereto as
8Exhibit A) published by the Free Software Foundation (version 2).
9
10You may redistribute the hardware specific firmware binary file
11under the following terms:
12
13 1. Redistribution of source code (only if applicable),
14 must retain the above copyright notice, this list of
15 conditions and the following disclaimer.
16
17 2. Redistribution in binary form must reproduce the above
18 copyright notice, this list of conditions and the
19 following disclaimer in the documentation and/or other
20 materials provided with the distribution.
21
22 3. The name of QLogic Corporation may not be used to
23 endorse or promote products derived from this software
24 without specific prior written permission
25
26REGARDLESS OF WHAT LICENSING MECHANISM IS USED OR APPLICABLE,
27THIS PROGRAM IS PROVIDED BY QLOGIC CORPORATION "AS IS'' AND ANY
28EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
29IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
30PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR
31BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
32EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
33TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
34DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
35ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
36OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
37OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
38POSSIBILITY OF SUCH DAMAGE.
39
40USER ACKNOWLEDGES AND AGREES THAT USE OF THIS PROGRAM WILL NOT
41CREATE OR GIVE GROUNDS FOR A LICENSE BY IMPLICATION, ESTOPPEL, OR
42OTHERWISE IN ANY INTELLECTUAL PROPERTY RIGHTS (PATENT, COPYRIGHT,
43TRADE SECRET, MASK WORK, OR OTHER PROPRIETARY RIGHT) EMBODIED IN
44ANY OTHER QLOGIC HARDWARE OR SOFTWARE EITHER SOLELY OR IN
45COMBINATION WITH THIS PROGRAM.
46
47
48EXHIBIT A
49
50 GNU GENERAL PUBLIC LICENSE
51 Version 2, June 1991
52
53 Copyright (C) 1989, 1991 Free Software Foundation, Inc.
54 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
55 Everyone is permitted to copy and distribute verbatim copies
56 of this license document, but changing it is not allowed.
57
58 Preamble
59
60 The licenses for most software are designed to take away your
61freedom to share and change it. By contrast, the GNU General Public
62License is intended to guarantee your freedom to share and change free
63software--to make sure the software is free for all its users. This
64General Public License applies to most of the Free Software
65Foundation's software and to any other program whose authors commit to
66using it. (Some other Free Software Foundation software is covered by
67the GNU Lesser General Public License instead.) You can apply it to
68your programs, too.
69
70 When we speak of free software, we are referring to freedom, not
71price. Our General Public Licenses are designed to make sure that you
72have the freedom to distribute copies of free software (and charge for
73this service if you wish), that you receive source code or can get it
74if you want it, that you can change the software or use pieces of it
75in new free programs; and that you know you can do these things.
76
77 To protect your rights, we need to make restrictions that forbid
78anyone to deny you these rights or to ask you to surrender the rights.
79These restrictions translate to certain responsibilities for you if you
80distribute copies of the software, or if you modify it.
81
82 For example, if you distribute copies of such a program, whether
83gratis or for a fee, you must give the recipients all the rights that
84you have. You must make sure that they, too, receive or can get the
85source code. And you must show them these terms so they know their
86rights.
87
88 We protect your rights with two steps: (1) copyright the software, and
89(2) offer you this license which gives you legal permission to copy,
90distribute and/or modify the software.
91
92 Also, for each author's protection and ours, we want to make certain
93that everyone understands that there is no warranty for this free
94software. If the software is modified by someone else and passed on, we
95want its recipients to know that what they have is not the original, so
96that any problems introduced by others will not reflect on the original
97authors' reputations.
98
99 Finally, any free program is threatened constantly by software
100patents. We wish to avoid the danger that redistributors of a free
101program will individually obtain patent licenses, in effect making the
102program proprietary. To prevent this, we have made it clear that any
103patent must be licensed for everyone's free use or not licensed at all.
104
105 The precise terms and conditions for copying, distribution and
106modification follow.
107
108 GNU GENERAL PUBLIC LICENSE
109 TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
110
111 0. This License applies to any program or other work which contains
112a notice placed by the copyright holder saying it may be distributed
113under the terms of this General Public License. The "Program", below,
114refers to any such program or work, and a "work based on the Program"
115means either the Program or any derivative work under copyright law:
116that is to say, a work containing the Program or a portion of it,
117either verbatim or with modifications and/or translated into another
118language. (Hereinafter, translation is included without limitation in
119the term "modification".) Each licensee is addressed as "you".
120
121Activities other than copying, distribution and modification are not
122covered by this License; they are outside its scope. The act of
123running the Program is not restricted, and the output from the Program
124is covered only if its contents constitute a work based on the
125Program (independent of having been made by running the Program).
126Whether that is true depends on what the Program does.
127
128 1. You may copy and distribute verbatim copies of the Program's
129source code as you receive it, in any medium, provided that you
130conspicuously and appropriately publish on each copy an appropriate
131copyright notice and disclaimer of warranty; keep intact all the
132notices that refer to this License and to the absence of any warranty;
133and give any other recipients of the Program a copy of this License
134along with the Program.
135
136You may charge a fee for the physical act of transferring a copy, and
137you may at your option offer warranty protection in exchange for a fee.
138
139 2. You may modify your copy or copies of the Program or any portion
140of it, thus forming a work based on the Program, and copy and
141distribute such modifications or work under the terms of Section 1
142above, provided that you also meet all of these conditions:
143
144 a) You must cause the modified files to carry prominent notices
145 stating that you changed the files and the date of any change.
146
147 b) You must cause any work that you distribute or publish, that in
148 whole or in part contains or is derived from the Program or any
149 part thereof, to be licensed as a whole at no charge to all third
150 parties under the terms of this License.
151
152 c) If the modified program normally reads commands interactively
153 when run, you must cause it, when started running for such
154 interactive use in the most ordinary way, to print or display an
155 announcement including an appropriate copyright notice and a
156 notice that there is no warranty (or else, saying that you provide
157 a warranty) and that users may redistribute the program under
158 these conditions, and telling the user how to view a copy of this
159 License. (Exception: if the Program itself is interactive but
160 does not normally print such an announcement, your work based on
161 the Program is not required to print an announcement.)
162
163These requirements apply to the modified work as a whole. If
164identifiable sections of that work are not derived from the Program,
165and can be reasonably considered independent and separate works in
166themselves, then this License, and its terms, do not apply to those
167sections when you distribute them as separate works. But when you
168distribute the same sections as part of a whole which is a work based
169on the Program, the distribution of the whole must be on the terms of
170this License, whose permissions for other licensees extend to the
171entire whole, and thus to each and every part regardless of who wrote it.
172
173Thus, it is not the intent of this section to claim rights or contest
174your rights to work written entirely by you; rather, the intent is to
175exercise the right to control the distribution of derivative or
176collective works based on the Program.
177
178In addition, mere aggregation of another work not based on the Program
179with the Program (or with a work based on the Program) on a volume of
180a storage or distribution medium does not bring the other work under
181the scope of this License.
182
183 3. You may copy and distribute the Program (or a work based on it,
184under Section 2) in object code or executable form under the terms of
185Sections 1 and 2 above provided that you also do one of the following:
186
187 a) Accompany it with the complete corresponding machine-readable
188 source code, which must be distributed under the terms of Sections
189 1 and 2 above on a medium customarily used for software interchange; or,
190
191 b) Accompany it with a written offer, valid for at least three
192 years, to give any third party, for a charge no more than your
193 cost of physically performing source distribution, a complete
194 machine-readable copy of the corresponding source code, to be
195 distributed under the terms of Sections 1 and 2 above on a medium
196 customarily used for software interchange; or,
197
198 c) Accompany it with the information you received as to the offer
199 to distribute corresponding source code. (This alternative is
200 allowed only for noncommercial distribution and only if you
201 received the program in object code or executable form with such
202 an offer, in accord with Subsection b above.)
203
204The source code for a work means the preferred form of the work for
205making modifications to it. For an executable work, complete source
206code means all the source code for all modules it contains, plus any
207associated interface definition files, plus the scripts used to
208control compilation and installation of the executable. However, as a
209special exception, the source code distributed need not include
210anything that is normally distributed (in either source or binary
211form) with the major components (compiler, kernel, and so on) of the
212operating system on which the executable runs, unless that component
213itself accompanies the executable.
214
215If distribution of executable or object code is made by offering
216access to copy from a designated place, then offering equivalent
217access to copy the source code from the same place counts as
218distribution of the source code, even though third parties are not
219compelled to copy the source along with the object code.
220
221 4. You may not copy, modify, sublicense, or distribute the Program
222except as expressly provided under this License. Any attempt
223otherwise to copy, modify, sublicense or distribute the Program is
224void, and will automatically terminate your rights under this License.
225However, parties who have received copies, or rights, from you under
226this License will not have their licenses terminated so long as such
227parties remain in full compliance.
228
229 5. You are not required to accept this License, since you have not
230signed it. However, nothing else grants you permission to modify or
231distribute the Program or its derivative works. These actions are
232prohibited by law if you do not accept this License. Therefore, by
233modifying or distributing the Program (or any work based on the
234Program), you indicate your acceptance of this License to do so, and
235all its terms and conditions for copying, distributing or modifying
236the Program or works based on it.
237
238 6. Each time you redistribute the Program (or any work based on the
239Program), the recipient automatically receives a license from the
240original licensor to copy, distribute or modify the Program subject to
241these terms and conditions. You may not impose any further
242restrictions on the recipients' exercise of the rights granted herein.
243You are not responsible for enforcing compliance by third parties to
244this License.
245
246 7. If, as a consequence of a court judgment or allegation of patent
247infringement or for any other reason (not limited to patent issues),
248conditions are imposed on you (whether by court order, agreement or
249otherwise) that contradict the conditions of this License, they do not
250excuse you from the conditions of this License. If you cannot
251distribute so as to satisfy simultaneously your obligations under this
252License and any other pertinent obligations, then as a consequence you
253may not distribute the Program at all. For example, if a patent
254license would not permit royalty-free redistribution of the Program by
255all those who receive copies directly or indirectly through you, then
256the only way you could satisfy both it and this License would be to
257refrain entirely from distribution of the Program.
258
259If any portion of this section is held invalid or unenforceable under
260any particular circumstance, the balance of the section is intended to
261apply and the section as a whole is intended to apply in other
262circumstances.
263
264It is not the purpose of this section to induce you to infringe any
265patents or other property right claims or to contest validity of any
266such claims; this section has the sole purpose of protecting the
267integrity of the free software distribution system, which is
268implemented by public license practices. Many people have made
269generous contributions to the wide range of software distributed
270through that system in reliance on consistent application of that
271system; it is up to the author/donor to decide if he or she is willing
272to distribute software through any other system and a licensee cannot
273impose that choice.
274
275This section is intended to make thoroughly clear what is believed to
276be a consequence of the rest of this License.
277
278 8. If the distribution and/or use of the Program is restricted in
279certain countries either by patents or by copyrighted interfaces, the
280original copyright holder who places the Program under this License
281may add an explicit geographical distribution limitation excluding
282those countries, so that distribution is permitted only in or among
283countries not thus excluded. In such case, this License incorporates
284the limitation as if written in the body of this License.
285
286 9. The Free Software Foundation may publish revised and/or new versions
287of the General Public License from time to time. Such new versions will
288be similar in spirit to the present version, but may differ in detail to
289address new problems or concerns.
290
291Each version is given a distinguishing version number. If the Program
292specifies a version number of this License which applies to it and "any
293later version", you have the option of following the terms and conditions
294either of that version or of any later version published by the Free
295Software Foundation. If the Program does not specify a version number of
296this License, you may choose any version ever published by the Free Software
297Foundation.
298
299 10. If you wish to incorporate parts of the Program into other free
300programs whose distribution conditions are different, write to the author
301to ask for permission. For software which is copyrighted by the Free
302Software Foundation, write to the Free Software Foundation; we sometimes
303make exceptions for this. Our decision will be guided by the two goals
304of preserving the free status of all derivatives of our free software and
305of promoting the sharing and reuse of software generally.
306
307 NO WARRANTY
308
309 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
310FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
311OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
312PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
313OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
314MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
315TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
316PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
317REPAIR OR CORRECTION.
318
319 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
320WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
321REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
322INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
323OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
324TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
325YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
326PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
327POSSIBILITY OF SUCH DAMAGES.
diff --git a/Documentation/networking/batman-adv.txt b/Documentation/networking/batman-adv.txt
new file mode 100644
index 000000000000..77f0cdd5b0dd
--- /dev/null
+++ b/Documentation/networking/batman-adv.txt
@@ -0,0 +1,240 @@
1[state: 21-11-2010]
2
3BATMAN-ADV
4----------
5
6Batman advanced is a new approach to wireless networking which
7does no longer operate on the IP basis. Unlike the batman daemon,
8which exchanges information using UDP packets and sets routing
9tables, batman-advanced operates on ISO/OSI Layer 2 only and uses
10and routes (or better: bridges) Ethernet Frames. It emulates a
11virtual network switch of all nodes participating. Therefore all
12nodes appear to be link local, thus all higher operating proto-
13cols won't be affected by any changes within the network. You can
14run almost any protocol above batman advanced, prominent examples
15are: IPv4, IPv6, DHCP, IPX.
16
17Batman advanced was implemented as a Linux kernel driver to re-
18duce the overhead to a minimum. It does not depend on any (other)
19network driver, and can be used on wifi as well as ethernet lan,
20vpn, etc ... (anything with ethernet-style layer 2).
21
22CONFIGURATION
23-------------
24
25Load the batman-adv module into your kernel:
26
27# insmod batman-adv.ko
28
29The module is now waiting for activation. You must add some in-
30terfaces on which batman can operate. After loading the module
31batman advanced will scan your systems interfaces to search for
32compatible interfaces. Once found, it will create subfolders in
33the /sys directories of each supported interface, e.g.
34
35# ls /sys/class/net/eth0/batman_adv/
36# iface_status mesh_iface
37
38If an interface does not have the "batman_adv" subfolder it prob-
39ably is not supported. Not supported interfaces are: loopback,
40non-ethernet and batman's own interfaces.
41
42Note: After the module was loaded it will continuously watch for
43new interfaces to verify the compatibility. There is no need to
44reload the module if you plug your USB wifi adapter into your ma-
45chine after batman advanced was initially loaded.
46
47To activate a given interface simply write "bat0" into its
48"mesh_iface" file inside the batman_adv subfolder:
49
50# echo bat0 > /sys/class/net/eth0/batman_adv/mesh_iface
51
52Repeat this step for all interfaces you wish to add. Now batman
53starts using/broadcasting on this/these interface(s).
54
55By reading the "iface_status" file you can check its status:
56
57# cat /sys/class/net/eth0/batman_adv/iface_status
58# active
59
60To deactivate an interface you have to write "none" into its
61"mesh_iface" file:
62
63# echo none > /sys/class/net/eth0/batman_adv/mesh_iface
64
65
66All mesh wide settings can be found in batman's own interface
67folder:
68
69# ls /sys/class/net/bat0/mesh/
70# aggregated_ogms bonding fragmentation orig_interval
71# vis_mode
72
73
74There is a special folder for debugging informations:
75
76# ls /sys/kernel/debug/batman_adv/bat0/
77# originators socket transtable_global transtable_local
78# vis_data
79
80
81Some of the files contain all sort of status information regard-
82ing the mesh network. For example, you can view the table of
83originators (mesh participants) with:
84
85# cat /sys/kernel/debug/batman_adv/bat0/originators
86
87Other files allow to change batman's behaviour to better fit your
88requirements. For instance, you can check the current originator
89interval (value in milliseconds which determines how often batman
90sends its broadcast packets):
91
92# cat /sys/class/net/bat0/mesh/orig_interval
93# 1000
94
95and also change its value:
96
97# echo 3000 > /sys/class/net/bat0/mesh/orig_interval
98
99In very mobile scenarios, you might want to adjust the originator
100interval to a lower value. This will make the mesh more respon-
101sive to topology changes, but will also increase the overhead.
102
103
104USAGE
105-----
106
107To make use of your newly created mesh, batman advanced provides
108a new interface "bat0" which you should use from this point on.
109All interfaces added to batman advanced are not relevant any
110longer because batman handles them for you. Basically, one "hands
111over" the data by using the batman interface and batman will make
112sure it reaches its destination.
113
114The "bat0" interface can be used like any other regular inter-
115face. It needs an IP address which can be either statically con-
116figured or dynamically (by using DHCP or similar services):
117
118# NodeA: ifconfig bat0 192.168.0.1
119# NodeB: ifconfig bat0 192.168.0.2
120# NodeB: ping 192.168.0.1
121
122Note: In order to avoid problems remove all IP addresses previ-
123ously assigned to interfaces now used by batman advanced, e.g.
124
125# ifconfig eth0 0.0.0.0
126
127
128VISUALIZATION
129-------------
130
131If you want topology visualization, at least one mesh node must
132be configured as VIS-server:
133
134# echo "server" > /sys/class/net/bat0/mesh/vis_mode
135
136Each node is either configured as "server" or as "client" (de-
137fault: "client"). Clients send their topology data to the server
138next to them, and server synchronize with other servers. If there
139is no server configured (default) within the mesh, no topology
140information will be transmitted. With these "synchronizing
141servers", there can be 1 or more vis servers sharing the same (or
142at least very similar) data.
143
144When configured as server, you can get a topology snapshot of
145your mesh:
146
147# cat /sys/kernel/debug/batman_adv/bat0/vis_data
148
149This raw output is intended to be easily parsable and convertable
150with other tools. Have a look at the batctl README if you want a
151vis output in dot or json format for instance and how those out-
152puts could then be visualised in an image.
153
154The raw format consists of comma separated values per entry where
155each entry is giving information about a certain source inter-
156face. Each entry can/has to have the following values:
157-> "mac" - mac address of an originator's source interface
158 (each line begins with it)
159-> "TQ mac value" - src mac's link quality towards mac address
160 of a neighbor originator's interface which
161 is being used for routing
162-> "HNA mac" - HNA announced by source mac
163-> "PRIMARY" - this is a primary interface
164-> "SEC mac" - secondary mac address of source
165 (requires preceding PRIMARY)
166
167The TQ value has a range from 4 to 255 with 255 being the best.
168The HNA entries are showing which hosts are connected to the mesh
169via bat0 or being bridged into the mesh network. The PRIMARY/SEC
170values are only applied on primary interfaces
171
172
173LOGGING/DEBUGGING
174-----------------
175
176All error messages, warnings and information messages are sent to
177the kernel log. Depending on your operating system distribution
178this can be read in one of a number of ways. Try using the com-
179mands: dmesg, logread, or looking in the files /var/log/kern.log
180or /var/log/syslog. All batman-adv messages are prefixed with
181"batman-adv:" So to see just these messages try
182
183# dmesg | grep batman-adv
184
185When investigating problems with your mesh network it is some-
186times necessary to see more detail debug messages. This must be
187enabled when compiling the batman-adv module. When building bat-
188man-adv as part of kernel, use "make menuconfig" and enable the
189option "B.A.T.M.A.N. debugging".
190
191Those additional debug messages can be accessed using a special
192file in debugfs
193
194# cat /sys/kernel/debug/batman_adv/bat0/log
195
196The additional debug output is by default disabled. It can be en-
197abled during run time. Following log_levels are defined:
198
1990 - All debug output disabled
2001 - Enable messages related to routing / flooding / broadcasting
2012 - Enable route or hna added / changed / deleted
2023 - Enable all messages
203
204The debug output can be changed at runtime using the file
205/sys/class/net/bat0/mesh/log_level. e.g.
206
207# echo 2 > /sys/class/net/bat0/mesh/log_level
208
209will enable debug messages for when routes or HNAs change.
210
211
212BATCTL
213------
214
215As batman advanced operates on layer 2 all hosts participating in
216the virtual switch are completely transparent for all protocols
217above layer 2. Therefore the common diagnosis tools do not work
218as expected. To overcome these problems batctl was created. At
219the moment the batctl contains ping, traceroute, tcpdump and
220interfaces to the kernel module settings.
221
222For more information, please see the manpage (man batctl).
223
224batctl is available on http://www.open-mesh.org/
225
226
227CONTACT
228-------
229
230Please send us comments, experiences, questions, anything :)
231
232IRC: #batman on irc.freenode.org
233Mailing-list: b.a.t.m.a.n@b.a.t.m.a.n@lists.open-mesh.org
234 (optional subscription at
235 https://lists.open-mesh.org/mm/listinfo/b.a.t.m.a.n)
236
237You can also contact the Authors:
238
239Marek Lindner <lindner_marek@yahoo.de>
240Simon Wunderlich <siwu@hrz.tu-chemnitz.de>
diff --git a/Documentation/networking/bridge.txt b/Documentation/networking/bridge.txt
index bec69a8a1697..a7ba5e4e2c91 100644
--- a/Documentation/networking/bridge.txt
+++ b/Documentation/networking/bridge.txt
@@ -1,8 +1,8 @@
1In order to use the Ethernet bridging functionality, you'll need the 1In order to use the Ethernet bridging functionality, you'll need the
2userspace tools. These programs and documentation are available 2userspace tools. These programs and documentation are available
3at http://www.linux-foundation.org/en/Net:Bridge. The download page is 3at http://www.linuxfoundation.org/en/Net:Bridge. The download page is
4http://prdownloads.sourceforge.net/bridge. 4http://prdownloads.sourceforge.net/bridge.
5 5
6If you still have questions, don't hesitate to post to the mailing list 6If you still have questions, don't hesitate to post to the mailing list
7(more info http://lists.osdl.org/mailman/listinfo/bridge). 7(more info https://lists.linux-foundation.org/mailman/listinfo/bridge).
8 8
diff --git a/Documentation/networking/caif/spi_porting.txt b/Documentation/networking/caif/spi_porting.txt
index 61d7c9247453..0cb8cb9098f4 100644
--- a/Documentation/networking/caif/spi_porting.txt
+++ b/Documentation/networking/caif/spi_porting.txt
@@ -32,7 +32,7 @@ the physical hardware, both with regard to SPI and to GPIOs.
32 This function is called by the CAIF SPI interface to give 32 This function is called by the CAIF SPI interface to give
33 you a chance to set up your hardware to be ready to receive 33 you a chance to set up your hardware to be ready to receive
34 a stream of data from the master. The xfer structure contains 34 a stream of data from the master. The xfer structure contains
35 both physical and logical adresses, as well as the total length 35 both physical and logical addresses, as well as the total length
36 of the transfer in both directions.The dev parameter can be used 36 of the transfer in both directions.The dev parameter can be used
37 to map to different CAIF SPI slave devices. 37 to map to different CAIF SPI slave devices.
38 38
diff --git a/Documentation/networking/dccp.txt b/Documentation/networking/dccp.txt
index 271d524a4c8d..d718bc2ff1cf 100644
--- a/Documentation/networking/dccp.txt
+++ b/Documentation/networking/dccp.txt
@@ -38,15 +38,35 @@ The Linux DCCP implementation does not currently support all the features that a
38specified in RFCs 4340...42. 38specified in RFCs 4340...42.
39 39
40The known bugs are at: 40The known bugs are at:
41 http://linux-net.osdl.org/index.php/TODO#DCCP 41 http://www.linuxfoundation.org/collaborate/workgroups/networking/todo#DCCP
42 42
43For more up-to-date versions of the DCCP implementation, please consider using 43For more up-to-date versions of the DCCP implementation, please consider using
44the experimental DCCP test tree; instructions for checking this out are on: 44the experimental DCCP test tree; instructions for checking this out are on:
45http://linux-net.osdl.org/index.php/DCCP_Testing#Experimental_DCCP_source_tree 45http://www.linuxfoundation.org/collaborate/workgroups/networking/dccp_testing#Experimental_DCCP_source_tree
46 46
47 47
48Socket options 48Socket options
49============== 49==============
50DCCP_SOCKOPT_QPOLICY_ID sets the dequeuing policy for outgoing packets. It takes
51a policy ID as argument and can only be set before the connection (i.e. changes
52during an established connection are not supported). Currently, two policies are
53defined: the "simple" policy (DCCPQ_POLICY_SIMPLE), which does nothing special,
54and a priority-based variant (DCCPQ_POLICY_PRIO). The latter allows to pass an
55u32 priority value as ancillary data to sendmsg(), where higher numbers indicate
56a higher packet priority (similar to SO_PRIORITY). This ancillary data needs to
57be formatted using a cmsg(3) message header filled in as follows:
58 cmsg->cmsg_level = SOL_DCCP;
59 cmsg->cmsg_type = DCCP_SCM_PRIORITY;
60 cmsg->cmsg_len = CMSG_LEN(sizeof(uint32_t)); /* or CMSG_LEN(4) */
61
62DCCP_SOCKOPT_QPOLICY_TXQLEN sets the maximum length of the output queue. A zero
63value is always interpreted as unbounded queue length. If different from zero,
64the interpretation of this parameter depends on the current dequeuing policy
65(see above): the "simple" policy will enforce a fixed queue size by returning
66EAGAIN, whereas the "prio" policy enforces a fixed queue length by dropping the
67lowest-priority packet first. The default value for this parameter is
68initialised from /proc/sys/net/dccp/default/tx_qlen.
69
50DCCP_SOCKOPT_SERVICE sets the service. The specification mandates use of 70DCCP_SOCKOPT_SERVICE sets the service. The specification mandates use of
51service codes (RFC 4340, sec. 8.1.2); if this socket option is not set, 71service codes (RFC 4340, sec. 8.1.2); if this socket option is not set,
52the socket will fall back to 0 (which means that no meaningful service code 72the socket will fall back to 0 (which means that no meaningful service code
@@ -147,6 +167,7 @@ rx_ccid = 2
147seq_window = 100 167seq_window = 100
148 The initial sequence window (sec. 7.5.2) of the sender. This influences 168 The initial sequence window (sec. 7.5.2) of the sender. This influences
149 the local ackno validity and the remote seqno validity windows (7.5.1). 169 the local ackno validity and the remote seqno validity windows (7.5.1).
170 Values in the range Wmin = 32 (RFC 4340, 7.5.2) up to 2^32-1 can be set.
150 171
151tx_qlen = 5 172tx_qlen = 5
152 The size of the transmit buffer in packets. A value of 0 corresponds 173 The size of the transmit buffer in packets. A value of 0 corresponds
diff --git a/Documentation/networking/e100.txt b/Documentation/networking/e100.txt
index 944aa55e79f8..162f323a7a1f 100644
--- a/Documentation/networking/e100.txt
+++ b/Documentation/networking/e100.txt
@@ -72,7 +72,7 @@ Tx Descriptors: Number of transmit descriptors. A transmit descriptor is a data
72 ethtool -G eth? tx n, where n is the number of desired tx descriptors. 72 ethtool -G eth? tx n, where n is the number of desired tx descriptors.
73 73
74Speed/Duplex: The driver auto-negotiates the link speed and duplex settings by 74Speed/Duplex: The driver auto-negotiates the link speed and duplex settings by
75 default. Ethtool can be used as follows to force speed/duplex. 75 default. The ethtool utility can be used as follows to force speed/duplex.
76 76
77 ethtool -s eth? autoneg off speed {10|100} duplex {full|half} 77 ethtool -s eth? autoneg off speed {10|100} duplex {full|half}
78 78
@@ -126,30 +126,21 @@ Additional Configurations
126 ------- 126 -------
127 127
128 The driver utilizes the ethtool interface for driver configuration and 128 The driver utilizes the ethtool interface for driver configuration and
129 diagnostics, as well as displaying statistical information. Ethtool 129 diagnostics, as well as displaying statistical information. The ethtool
130 version 1.6 or later is required for this functionality. 130 version 1.6 or later is required for this functionality.
131 131
132 The latest release of ethtool can be found from 132 The latest release of ethtool can be found from
133 http://sourceforge.net/projects/gkernel. 133 http://ftp.kernel.org/pub/software/network/ethtool/
134
135 NOTE: Ethtool 1.6 only supports a limited set of ethtool options. Support
136 for a more complete ethtool feature set can be enabled by upgrading
137 ethtool to ethtool-1.8.1.
138
139 134
140 Enabling Wake on LAN* (WoL) 135 Enabling Wake on LAN* (WoL)
141 --------------------------- 136 ---------------------------
142 WoL is provided through the Ethtool* utility. Ethtool is included with Red 137 WoL is provided through the ethtool* utility. For instructions on enabling
143 Hat* 8.0. For other Linux distributions, download and install Ethtool from 138 WoL with ethtool, refer to the ethtool man page.
144 the following website: http://sourceforge.net/projects/gkernel.
145
146 For instructions on enabling WoL with Ethtool, refer to the Ethtool man page.
147 139
148 WoL will be enabled on the system during the next shut down or reboot. For 140 WoL will be enabled on the system during the next shut down or reboot. For
149 this driver version, in order to enable WoL, the e100 driver must be 141 this driver version, in order to enable WoL, the e100 driver must be
150 loaded when shutting down or rebooting the system. 142 loaded when shutting down or rebooting the system.
151 143
152
153 NAPI 144 NAPI
154 ---- 145 ----
155 146
diff --git a/Documentation/networking/e1000.txt b/Documentation/networking/e1000.txt
index d9271e74e488..71ca95855671 100644
--- a/Documentation/networking/e1000.txt
+++ b/Documentation/networking/e1000.txt
@@ -79,7 +79,7 @@ InterruptThrottleRate
79--------------------- 79---------------------
80(not supported on Intel(R) 82542, 82543 or 82544-based adapters) 80(not supported on Intel(R) 82542, 82543 or 82544-based adapters)
81Valid Range: 0,1,3,4,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) 82 4=simplified balancing)
83Default Value: 3 83Default Value: 3
84 84
85The 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
@@ -124,8 +124,8 @@ InterruptThrottleRate is set to mode 1. In this mode, which operates
124the same as mode 3, the InterruptThrottleRate will be increased stepwise to 124the same as mode 3, the InterruptThrottleRate will be increased stepwise to
12570000 for traffic in class "Lowest latency". 12570000 for traffic in class "Lowest latency".
126 126
127In simplified mode the interrupt rate is based on the ratio of Tx and 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 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 129interrupt rate will drop as low as 2000 interrupts per second. If the
130traffic is mostly transmit or mostly receive, the interrupt rate could 130traffic is mostly transmit or mostly receive, the interrupt rate could
131be as high as 8000. 131be as high as 8000.
@@ -245,7 +245,7 @@ NOTE: Depending on the available system resources, the request for a
245TxDescriptorStep 245TxDescriptorStep
246---------------- 246----------------
247Valid Range: 1 (use every Tx Descriptor) 247Valid Range: 1 (use every Tx Descriptor)
248 4 (use every 4th Tx Descriptor) 248 4 (use every 4th Tx Descriptor)
249 249
250Default Value: 1 (use every Tx Descriptor) 250Default Value: 1 (use every Tx Descriptor)
251 251
@@ -312,7 +312,7 @@ Valid Range: 0-xxxxxxx (0=off)
312Default Value: 256 312Default Value: 256
313Usage: insmod e1000.ko copybreak=128 313Usage: insmod e1000.ko copybreak=128
314 314
315Driver copies all packets below or equaling this size to a fresh Rx 315Driver copies all packets below or equaling this size to a fresh RX
316buffer before handing it up the stack. 316buffer before handing it up the stack.
317 317
318This parameter is different than other parameters, in that it is a 318This parameter is different than other parameters, in that it is a
@@ -431,15 +431,15 @@ Additional Configurations
431 Ethtool 431 Ethtool
432 ------- 432 -------
433 The driver utilizes the ethtool interface for driver configuration and 433 The driver utilizes the ethtool interface for driver configuration and
434 diagnostics, as well as displaying statistical information. Ethtool 434 diagnostics, as well as displaying statistical information. The ethtool
435 version 1.6 or later is required for this functionality. 435 version 1.6 or later is required for this functionality.
436 436
437 The latest release of ethtool can be found from 437 The latest release of ethtool can be found from
438 http://sourceforge.net/projects/gkernel. 438 http://ftp.kernel.org/pub/software/network/ethtool/
439 439
440 Enabling Wake on LAN* (WoL) 440 Enabling Wake on LAN* (WoL)
441 --------------------------- 441 ---------------------------
442 WoL is configured through the Ethtool* utility. 442 WoL is configured through the ethtool* utility.
443 443
444 WoL will be enabled on the system during the next shut down or reboot. 444 WoL will be enabled on the system during the next shut down or reboot.
445 For this driver version, in order to enable WoL, the e1000 driver must be 445 For this driver version, in order to enable WoL, the e1000 driver must be
diff --git a/Documentation/networking/e1000e.txt b/Documentation/networking/e1000e.txt
index 6aa048badf32..97b5ba942ebf 100644
--- a/Documentation/networking/e1000e.txt
+++ b/Documentation/networking/e1000e.txt
@@ -1,5 +1,5 @@
1Linux* Driver for Intel(R) Network Connection 1Linux* Driver for Intel(R) Network Connection
2=============================================================== 2=============================================
3 3
4Intel Gigabit Linux driver. 4Intel Gigabit Linux driver.
5Copyright(c) 1999 - 2010 Intel Corporation. 5Copyright(c) 1999 - 2010 Intel Corporation.
@@ -61,6 +61,12 @@ per second, even if more packets have come in. This reduces interrupt
61load on the system and can lower CPU utilization under heavy load, 61load on the system and can lower CPU utilization under heavy load,
62but will increase latency as packets are not processed as quickly. 62but will increase latency as packets are not processed as quickly.
63 63
64The default behaviour of the driver previously assumed a static
65InterruptThrottleRate value of 8000, providing a good fallback value for
66all traffic types, but lacking in small packet performance and latency.
67The hardware can handle many more small packets per second however, and
68for this reason an adaptive interrupt moderation algorithm was implemented.
69
64The driver has two adaptive modes (setting 1 or 3) in which 70The driver has two adaptive modes (setting 1 or 3) in which
65it dynamically adjusts the InterruptThrottleRate value based on the traffic 71it dynamically adjusts the InterruptThrottleRate value based on the traffic
66that it receives. After determining the type of incoming traffic in the last 72that it receives. After determining the type of incoming traffic in the last
@@ -86,8 +92,8 @@ InterruptThrottleRate is set to mode 1. In this mode, which operates
86the same as mode 3, the InterruptThrottleRate will be increased stepwise to 92the same as mode 3, the InterruptThrottleRate will be increased stepwise to
8770000 for traffic in class "Lowest latency". 9370000 for traffic in class "Lowest latency".
88 94
89In simplified mode the interrupt rate is based on the ratio of Tx and 95In 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 96RX traffic. If the bytes per second rate is approximately equal, the
91interrupt rate will drop as low as 2000 interrupts per second. If the 97interrupt rate will drop as low as 2000 interrupts per second. If the
92traffic is mostly transmit or mostly receive, the interrupt rate could 98traffic is mostly transmit or mostly receive, the interrupt rate could
93be as high as 8000. 99be as high as 8000.
@@ -177,7 +183,7 @@ Copybreak
177Valid Range: 0-xxxxxxx (0=off) 183Valid Range: 0-xxxxxxx (0=off)
178Default Value: 256 184Default Value: 256
179 185
180Driver copies all packets below or equaling this size to a fresh Rx 186Driver copies all packets below or equaling this size to a fresh RX
181buffer before handing it up the stack. 187buffer before handing it up the stack.
182 188
183This parameter is different than other parameters, in that it is a 189This parameter is different than other parameters, in that it is a
@@ -223,17 +229,17 @@ loading or enabling the driver, try disabling this feature.
223 229
224WriteProtectNVM 230WriteProtectNVM
225--------------- 231---------------
226Valid Range: 0-1 232Valid Range: 0,1
227Default Value: 1 (enabled) 233Default Value: 1
228 234
229Set the hardware to ignore all write/erase cycles to the GbE region in the 235If set to 1, configure the hardware to ignore all write/erase cycles to the
230ICHx NVM (non-volatile memory). This feature can be disabled by the 236GbE region in the ICHx NVM (in order to prevent accidental corruption of the
231WriteProtectNVM module parameter (enabled by default) only after a hardware 237NVM). This feature can be disabled by setting the parameter to 0 during initial
232reset, but the machine must be power cycled before trying to enable writes. 238driver load.
233 239NOTE: The machine must be power cycled (full off/on) when enabling NVM writes
234Note: the kernel boot option iomem=relaxed may need to be set if the kernel 240via setting the parameter to zero. Once the NVM has been locked (via the
235config option CONFIG_STRICT_DEVMEM=y, if the root user wants to write the 241parameter at 1 when the driver loads) it cannot be unlocked except via power
236NVM from user space via ethtool. 242cycle.
237 243
238Additional Configurations 244Additional Configurations
239========================= 245=========================
@@ -259,32 +265,30 @@ Additional Configurations
259 - Some adapters limit Jumbo Frames sized packets to a maximum of 265 - Some adapters limit Jumbo Frames sized packets to a maximum of
260 4096 bytes and some adapters do not support Jumbo Frames. 266 4096 bytes and some adapters do not support Jumbo Frames.
261 267
262
263 Ethtool 268 Ethtool
264 ------- 269 -------
265 The driver utilizes the ethtool interface for driver configuration and 270 The driver utilizes the ethtool interface for driver configuration and
266 diagnostics, as well as displaying statistical information. We 271 diagnostics, as well as displaying statistical information. We
267 strongly recommend downloading the latest version of Ethtool at: 272 strongly recommend downloading the latest version of ethtool at:
268 273
269 http://sourceforge.net/projects/gkernel. 274 http://ftp.kernel.org/pub/software/network/ethtool/
270 275
271 Speed and Duplex 276 Speed and Duplex
272 ---------------- 277 ----------------
273 Speed and Duplex are configured through the Ethtool* utility. For 278 Speed and Duplex are configured through the ethtool* utility. For
274 instructions, refer to the Ethtool man page. 279 instructions, refer to the ethtool man page.
275 280
276 Enabling Wake on LAN* (WoL) 281 Enabling Wake on LAN* (WoL)
277 --------------------------- 282 ---------------------------
278 WoL is configured through the Ethtool* utility. For instructions on 283 WoL is configured through the ethtool* utility. For instructions on
279 enabling WoL with Ethtool, refer to the Ethtool man page. 284 enabling WoL with ethtool, refer to the ethtool man page.
280 285
281 WoL will be enabled on the system during the next shut down or reboot. 286 WoL will be enabled on the system during the next shut down or reboot.
282 For this driver version, in order to enable WoL, the e1000e driver must be 287 For this driver version, in order to enable WoL, the e1000e driver must be
283 loaded when shutting down or rebooting the system. 288 loaded when shutting down or rebooting the system.
284 289
285 In most cases Wake On LAN is only supported on port A for multiple port 290 In most cases Wake On LAN is only supported on port A for multiple port
286 adapters. To verify if a port supports Wake on LAN run ethtool eth<X>. 291 adapters. To verify if a port supports Wake on Lan run ethtool eth<X>.
287
288 292
289Support 293Support
290======= 294=======
diff --git a/Documentation/networking/generic_netlink.txt b/Documentation/networking/generic_netlink.txt
index d4f8b8b9b53c..3e071115ca90 100644
--- a/Documentation/networking/generic_netlink.txt
+++ b/Documentation/networking/generic_netlink.txt
@@ -1,3 +1,3 @@
1A wiki document on how to use Generic Netlink can be found here: 1A wiki document on how to use Generic Netlink can be found here:
2 2
3 * http://linux-net.osdl.org/index.php/Generic_Netlink_HOWTO 3 * http://www.linuxfoundation.org/collaborate/workgroups/networking/generic_netlink_howto
diff --git a/Documentation/networking/igb.txt b/Documentation/networking/igb.txt
index ab2d71831892..98953c0d5342 100644
--- a/Documentation/networking/igb.txt
+++ b/Documentation/networking/igb.txt
@@ -36,6 +36,7 @@ Default Value: 0
36This parameter adds support for SR-IOV. It causes the driver to spawn up to 36This parameter adds support for SR-IOV. It causes the driver to spawn up to
37max_vfs worth of virtual function. 37max_vfs worth of virtual function.
38 38
39
39Additional Configurations 40Additional Configurations
40========================= 41=========================
41 42
@@ -60,15 +61,16 @@ Additional Configurations
60 Ethtool 61 Ethtool
61 ------- 62 -------
62 The driver utilizes the ethtool interface for driver configuration and 63 The driver utilizes the ethtool interface for driver configuration and
63 diagnostics, as well as displaying statistical information. 64 diagnostics, as well as displaying statistical information. The latest
65 version of ethtool can be found at:
64 66
65 http://sourceforge.net/projects/gkernel. 67 http://ftp.kernel.org/pub/software/network/ethtool/
66 68
67 Enabling Wake on LAN* (WoL) 69 Enabling Wake on LAN* (WoL)
68 --------------------------- 70 ---------------------------
69 WoL is configured through the Ethtool* utility. 71 WoL is configured through the ethtool* utility.
70 72
71 For instructions on enabling WoL with Ethtool, refer to the Ethtool man page. 73 For instructions on enabling WoL with ethtool, refer to the ethtool man page.
72 74
73 WoL will be enabled on the system during the next shut down or reboot. 75 WoL will be enabled on the system during the next shut down or reboot.
74 For this driver version, in order to enable WoL, the igb driver must be 76 For this driver version, in order to enable WoL, the igb driver must be
@@ -91,31 +93,6 @@ Additional Configurations
91 REQUIREMENTS: MSI-X support is required for Multiqueue. If MSI-X is not 93 REQUIREMENTS: MSI-X support is required for Multiqueue. If MSI-X is not
92 found, the system will fallback to MSI or to Legacy interrupts. 94 found, the system will fallback to MSI or to Legacy interrupts.
93 95
94 LRO
95 ---
96 Large Receive Offload (LRO) is a technique for increasing inbound throughput
97 of high-bandwidth network connections by reducing CPU overhead. It works by
98 aggregating multiple incoming packets from a single stream into a larger
99 buffer before they are passed higher up the networking stack, thus reducing
100 the number of packets that have to be processed. LRO combines multiple
101 Ethernet frames into a single receive in the stack, thereby potentially
102 decreasing CPU utilization for receives.
103
104 NOTE: You need to have inet_lro enabled via either the CONFIG_INET_LRO or
105 CONFIG_INET_LRO_MODULE kernel config option. Additionally, if
106 CONFIG_INET_LRO_MODULE is used, the inet_lro module needs to be loaded
107 before the igb driver.
108
109 You can verify that the driver is using LRO by looking at these counters in
110 Ethtool:
111
112 lro_aggregated - count of total packets that were combined
113 lro_flushed - counts the number of packets flushed out of LRO
114 lro_no_desc - counts the number of times an LRO descriptor was not available
115 for the LRO packet
116
117 NOTE: IPv6 and UDP are not supported by LRO.
118
119Support 96Support
120======= 97=======
121 98
diff --git a/Documentation/networking/igbvf.txt b/Documentation/networking/igbvf.txt
index 056028138d9c..cbfe4ee65533 100644
--- a/Documentation/networking/igbvf.txt
+++ b/Documentation/networking/igbvf.txt
@@ -58,9 +58,11 @@ Additional Configurations
58 Ethtool 58 Ethtool
59 ------- 59 -------
60 The driver utilizes the ethtool interface for driver configuration and 60 The driver utilizes the ethtool interface for driver configuration and
61 diagnostics, as well as displaying statistical information. 61 diagnostics, as well as displaying statistical information. The ethtool
62 version 3.0 or later is required for this functionality, although we
63 strongly recommend downloading the latest version at:
62 64
63 http://sourceforge.net/projects/gkernel. 65 http://ftp.kernel.org/pub/software/network/ethtool/
64 66
65Support 67Support
66======= 68=======
diff --git a/Documentation/networking/ip-sysctl.txt b/Documentation/networking/ip-sysctl.txt
index fe95105992c5..d99940dcfc44 100644
--- a/Documentation/networking/ip-sysctl.txt
+++ b/Documentation/networking/ip-sysctl.txt
@@ -11,7 +11,9 @@ ip_forward - BOOLEAN
11 for routers) 11 for routers)
12 12
13ip_default_ttl - INTEGER 13ip_default_ttl - INTEGER
14 default 64 14 Default value of TTL field (Time To Live) for outgoing (but not
15 forwarded) IP packets. Should be between 1 and 255 inclusive.
16 Default: 64 (as recommended by RFC1700)
15 17
16ip_no_pmtu_disc - BOOLEAN 18ip_no_pmtu_disc - BOOLEAN
17 Disable Path MTU Discovery. 19 Disable Path MTU Discovery.
@@ -144,6 +146,7 @@ tcp_adv_win_scale - INTEGER
144 Count buffering overhead as bytes/2^tcp_adv_win_scale 146 Count buffering overhead as bytes/2^tcp_adv_win_scale
145 (if tcp_adv_win_scale > 0) or bytes-bytes/2^(-tcp_adv_win_scale), 147 (if tcp_adv_win_scale > 0) or bytes-bytes/2^(-tcp_adv_win_scale),
146 if it is <= 0. 148 if it is <= 0.
149 Possible values are [-31, 31], inclusive.
147 Default: 2 150 Default: 2
148 151
149tcp_allowed_congestion_control - STRING 152tcp_allowed_congestion_control - STRING
@@ -707,10 +710,28 @@ igmp_max_memberships - INTEGER
707 Change the maximum number of multicast groups we can subscribe to. 710 Change the maximum number of multicast groups we can subscribe to.
708 Default: 20 711 Default: 20
709 712
710conf/interface/* changes special settings per interface (where "interface" is 713 Theoretical maximum value is bounded by having to send a membership
711 the name of your network interface) 714 report in a single datagram (i.e. the report can't span multiple
712conf/all/* is special, changes the settings for all interfaces 715 datagrams, or risk confusing the switch and leaving groups you don't
716 intend to).
713 717
718 The number of supported groups 'M' is bounded by the number of group
719 report entries you can fit into a single datagram of 65535 bytes.
720
721 M = 65536-sizeof (ip header)/(sizeof(Group record))
722
723 Group records are variable length, with a minimum of 12 bytes.
724 So net.ipv4.igmp_max_memberships should not be set higher than:
725
726 (65536-24) / 12 = 5459
727
728 The value 5459 assumes no IP header options, so in practice
729 this number may be lower.
730
731 conf/interface/* changes special settings per interface (where
732 "interface" is the name of your network interface)
733
734 conf/all/* is special, changes the settings for all interfaces
714 735
715log_martians - BOOLEAN 736log_martians - BOOLEAN
716 Log packets with impossible addresses to kernel log. 737 Log packets with impossible addresses to kernel log.
diff --git a/Documentation/networking/ixgb.txt b/Documentation/networking/ixgb.txt
index a0d0ffb5e584..e196f16df313 100644
--- a/Documentation/networking/ixgb.txt
+++ b/Documentation/networking/ixgb.txt
@@ -309,15 +309,15 @@ Additional Configurations
309 Ethtool 309 Ethtool
310 ------- 310 -------
311 The driver utilizes the ethtool interface for driver configuration and 311 The driver utilizes the ethtool interface for driver configuration and
312 diagnostics, as well as displaying statistical information. Ethtool 312 diagnostics, as well as displaying statistical information. The ethtool
313 version 1.6 or later is required for this functionality. 313 version 1.6 or later is required for this functionality.
314 314
315 The latest release of ethtool can be found from 315 The latest release of ethtool can be found from
316 http://sourceforge.net/projects/gkernel 316 http://ftp.kernel.org/pub/software/network/ethtool/
317 317
318 NOTE: Ethtool 1.6 only supports a limited set of ethtool options. Support 318 NOTE: The ethtool version 1.6 only supports a limited set of ethtool options.
319 for a more complete ethtool feature set can be enabled by upgrading 319 Support for a more complete ethtool feature set can be enabled by
320 to the latest version. 320 upgrading to the latest version.
321 321
322 322
323 NAPI 323 NAPI
diff --git a/Documentation/networking/ixgbe.txt b/Documentation/networking/ixgbe.txt
index eeb68685c788..af77ed3c4172 100644
--- a/Documentation/networking/ixgbe.txt
+++ b/Documentation/networking/ixgbe.txt
@@ -1,107 +1,126 @@
1Linux Base Driver for 10 Gigabit PCI Express Intel(R) Network Connection 1Linux Base Driver for 10 Gigabit PCI Express Intel(R) Network Connection
2======================================================================== 2========================================================================
3 3
4March 10, 2009 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- Additional Configurations 11- Additional Configurations
12- Performance Tuning
13- Known Issues
14- Support 14- Support
15 15
16Identifying Your Adapter
17========================
16 18
19The driver in this release is compatible with 82598 and 82599-based Intel
20Network Connections.
17 21
18In This Release 22For more information on how to identify your adapter, go to the Adapter &
19=============== 23Driver ID Guide at:
20 24
21This file describes the ixgbe Linux Base Driver for the 10 Gigabit PCI 25 http://support.intel.com/support/network/sb/CS-012904.htm
22Express Intel(R) Network Connection. This driver includes support for
23Itanium(R)2-based systems.
24 26
25For questions related to hardware requirements, refer to the documentation 27SFP+ Devices with Pluggable Optics
26supplied with your 10 Gigabit adapter. All hardware requirements listed apply 28----------------------------------
27to use with Linux.
28 29
29The following features are available in this kernel: 3082599-BASED ADAPTERS
30 - Native VLANs
31 - Channel Bonding (teaming)
32 - SNMP
33 - Generic Receive Offload
34 - Data Center Bridging
35 31
36Channel Bonding documentation can be found in the Linux kernel source: 32NOTES: If your 82599-based Intel(R) Network Adapter came with Intel optics, or
37/Documentation/networking/bonding.txt 33is an Intel(R) Ethernet Server Adapter X520-2, then it only supports Intel
34optics and/or the direct attach cables listed below.
38 35
39Ethtool, lspci, and ifconfig can be used to display device and driver 36When 82599-based SFP+ devices are connected back to back, they should be set to
40specific information. 37the same Speed setting via ethtool. Results may vary if you mix speed settings.
3882598-based adapters support all passive direct attach cables that comply
39with SFF-8431 v4.1 and SFF-8472 v10.4 specifications. Active direct attach
40cables are not supported.
41 41
42Supplier Type Part Numbers
42 43
43Identifying Your Adapter 44SR Modules
44======================== 45Intel DUAL RATE 1G/10G SFP+ SR (bailed) FTLX8571D3BCV-IT
46Intel DUAL RATE 1G/10G SFP+ SR (bailed) AFBR-703SDDZ-IN1
47Intel DUAL RATE 1G/10G SFP+ SR (bailed) AFBR-703SDZ-IN2
48LR Modules
49Intel DUAL RATE 1G/10G SFP+ LR (bailed) FTLX1471D3BCV-IT
50Intel DUAL RATE 1G/10G SFP+ LR (bailed) AFCT-701SDDZ-IN1
51Intel DUAL RATE 1G/10G SFP+ LR (bailed) AFCT-701SDZ-IN2
45 52
46This driver supports devices based on the 82598 controller and the 82599 53The following is a list of 3rd party SFP+ modules and direct attach cables that
47controller. 54have received some testing. Not all modules are applicable to all devices.
48 55
49For specific information on identifying which adapter you have, please visit: 56Supplier Type Part Numbers
50 57
51 http://support.intel.com/support/network/sb/CS-008441.htm 58Finisar SFP+ SR bailed, 10g single rate FTLX8571D3BCL
59Avago SFP+ SR bailed, 10g single rate AFBR-700SDZ
60Finisar SFP+ LR bailed, 10g single rate FTLX1471D3BCL
52 61
62Finisar DUAL RATE 1G/10G SFP+ SR (No Bail) FTLX8571D3QCV-IT
63Avago DUAL RATE 1G/10G SFP+ SR (No Bail) AFBR-703SDZ-IN1
64Finisar DUAL RATE 1G/10G SFP+ LR (No Bail) FTLX1471D3QCV-IT
65Avago DUAL RATE 1G/10G SFP+ LR (No Bail) AFCT-701SDZ-IN1
66Finistar 1000BASE-T SFP FCLF8522P2BTL
67Avago 1000BASE-T SFP ABCU-5710RZ
53 68
54Building and Installation 6982599-based adapters support all passive and active limiting direct attach
55========================= 70cables that comply with SFF-8431 v4.1 and SFF-8472 v10.4 specifications.
56 71
57select m for "Intel(R) 10GbE PCI Express adapters support" located at: 72Laser turns off for SFP+ when ifconfig down
58 Location: 73-------------------------------------------
59 -> Device Drivers 74"ifconfig down" turns off the laser for 82599-based SFP+ fiber adapters.
60 -> Network device support (NETDEVICES [=y]) 75"ifconfig up" turns on the later.
61 -> Ethernet (10000 Mbit) (NETDEV_10000 [=y])
62 76
631. make modules & make modules_install
64 77
652. Load the module: 7882598-BASED ADAPTERS
66 79
67# modprobe ixgbe 80NOTES for 82598-Based Adapters:
81- Intel(R) Network Adapters that support removable optical modules only support
82 their original module type (i.e., the Intel(R) 10 Gigabit SR Dual Port
83 Express Module only supports SR optical modules). If you plug in a different
84 type of module, the driver will not load.
85- Hot Swapping/hot plugging optical modules is not supported.
86- Only single speed, 10 gigabit modules are supported.
87- LAN on Motherboard (LOMs) may support DA, SR, or LR modules. Other module
88 types are not supported. Please see your system documentation for details.
68 89
69 The insmod command can be used if the full 90The following is a list of 3rd party SFP+ modules and direct attach cables that
70 path to the driver module is specified. For example: 91have received some testing. Not all modules are applicable to all devices.
71 92
72 insmod /lib/modules/<KERNEL VERSION>/kernel/drivers/net/ixgbe/ixgbe.ko 93Supplier Type Part Numbers
73 94
74 With 2.6 based kernels also make sure that older ixgbe drivers are 95Finisar SFP+ SR bailed, 10g single rate FTLX8571D3BCL
75 removed from the kernel, before loading the new module: 96Avago SFP+ SR bailed, 10g single rate AFBR-700SDZ
97Finisar SFP+ LR bailed, 10g single rate FTLX1471D3BCL
76 98
77 rmmod ixgbe; modprobe ixgbe 9982598-based adapters support all passive direct attach cables that comply
100with SFF-8431 v4.1 and SFF-8472 v10.4 specifications. Active direct attach
101cables are not supported.
78 102
793. Assign an IP address to the interface by entering the following, where
80 x is the interface number:
81 103
82 ifconfig ethx <IP_address> 104Flow Control
105------------
106Ethernet Flow Control (IEEE 802.3x) can be configured with ethtool to enable
107receiving and transmitting pause frames for ixgbe. When TX is enabled, PAUSE
108frames are generated when the receive packet buffer crosses a predefined
109threshold. When rx is enabled, the transmit unit will halt for the time delay
110specified when a PAUSE frame is received.
83 111
844. Verify that the interface works. Enter the following, where <IP_address> 112Flow Control is enabled by default. If you want to disable a flow control
85 is the IP address for another machine on the same subnet as the interface 113capable link partner, use ethtool:
86 that is being tested:
87 114
88 ping <IP_address> 115 ethtool -A eth? autoneg off RX off TX off
89 116
117NOTE: For 82598 backplane cards entering 1 gig mode, flow control default
118behavior is changed to off. Flow control in 1 gig mode on these devices can
119lead to Tx hangs.
90 120
91Additional Configurations 121Additional Configurations
92========================= 122=========================
93 123
94 Viewing Link Messages
95 ---------------------
96 Link messages will not be displayed to the console if the distribution is
97 restricting system messages. In order to see network driver link messages on
98 your console, set dmesg to eight by entering the following:
99
100 dmesg -n 8
101
102 NOTE: This setting is not saved across reboots.
103
104
105 Jumbo Frames 124 Jumbo Frames
106 ------------ 125 ------------
107 The driver supports Jumbo Frames for all adapters. Jumbo Frames support is 126 The driver supports Jumbo Frames for all adapters. Jumbo Frames support is
@@ -123,13 +142,8 @@ Additional Configurations
123 other protocols besides TCP. It's also safe to use with configurations that 142 other protocols besides TCP. It's also safe to use with configurations that
124 are problematic for LRO, namely bridging and iSCSI. 143 are problematic for LRO, namely bridging and iSCSI.
125 144
126 GRO is enabled by default in the driver. Future versions of ethtool will
127 support disabling and re-enabling GRO on the fly.
128
129
130 Data Center Bridging, aka DCB 145 Data Center Bridging, aka DCB
131 ----------------------------- 146 -----------------------------
132
133 DCB is a configuration Quality of Service implementation in hardware. 147 DCB is a configuration Quality of Service implementation in hardware.
134 It uses the VLAN priority tag (802.1p) to filter traffic. That means 148 It uses the VLAN priority tag (802.1p) to filter traffic. That means
135 that there are 8 different priorities that traffic can be filtered into. 149 that there are 8 different priorities that traffic can be filtered into.
@@ -163,24 +177,71 @@ Additional Configurations
163 177
164 http://e1000.sf.net 178 http://e1000.sf.net
165 179
166
167 Ethtool 180 Ethtool
168 ------- 181 -------
169 The driver utilizes the ethtool interface for driver configuration and 182 The driver utilizes the ethtool interface for driver configuration and
170 diagnostics, as well as displaying statistical information. Ethtool 183 diagnostics, as well as displaying statistical information. The latest
171 version 3.0 or later is required for this functionality. 184 ethtool version is required for this functionality.
172 185
173 The latest release of ethtool can be found from 186 The latest release of ethtool can be found from
174 http://sourceforge.net/projects/gkernel. 187 http://ftp.kernel.org/pub/software/network/ethtool/
175 188
176 189 FCoE
177 NAPI
178 ---- 190 ----
191 This release of the ixgbe driver contains new code to enable users to use
192 Fiber Channel over Ethernet (FCoE) and Data Center Bridging (DCB)
193 functionality that is supported by the 82598-based hardware. This code has
194 no default effect on the regular driver operation, and configuring DCB and
195 FCoE is outside the scope of this driver README. Refer to
196 http://www.open-fcoe.org/ for FCoE project information and contact
197 e1000-eedc@lists.sourceforge.net for DCB information.
198
199 MAC and VLAN anti-spoofing feature
200 ----------------------------------
201 When a malicious driver attempts to send a spoofed packet, it is dropped by
202 the hardware and not transmitted. An interrupt is sent to the PF driver
203 notifying it of the spoof attempt.
204
205 When a spoofed packet is detected the PF driver will send the following
206 message to the system log (displayed by the "dmesg" command):
207
208 Spoof event(s) detected on VF (n)
209
210 Where n=the VF that attempted to do the spoofing.
211
212
213Performance Tuning
214==================
215
216An excellent article on performance tuning can be found at:
217
218http://www.redhat.com/promo/summit/2008/downloads/pdf/Thursday/Mark_Wagner.pdf
219
220
221Known Issues
222============
223
224 Enabling SR-IOV in a 32-bit Microsoft* Windows* Server 2008 Guest OS using
225 Intel (R) 82576-based GbE or Intel (R) 82599-based 10GbE controller under KVM
226 -----------------------------------------------------------------------------
227 KVM Hypervisor/VMM supports direct assignment of a PCIe device to a VM. This
228 includes traditional PCIe devices, as well as SR-IOV-capable devices using
229 Intel 82576-based and 82599-based controllers.
230
231 While direct assignment of a PCIe device or an SR-IOV Virtual Function (VF)
232 to a Linux-based VM running 2.6.32 or later kernel works fine, there is a
233 known issue with Microsoft Windows Server 2008 VM that results in a "yellow
234 bang" error. This problem is within the KVM VMM itself, not the Intel driver,
235 or the SR-IOV logic of the VMM, but rather that KVM emulates an older CPU
236 model for the guests, and this older CPU model does not support MSI-X
237 interrupts, which is a requirement for Intel SR-IOV.
179 238
180 NAPI (Rx polling mode) is supported in the ixgbe driver. NAPI is enabled 239 If you wish to use the Intel 82576 or 82599-based controllers in SR-IOV mode
181 by default in the driver. 240 with KVM and a Microsoft Windows Server 2008 guest try the following
241 workaround. The workaround is to tell KVM to emulate a different model of CPU
242 when using qemu to create the KVM guest:
182 243
183 See www.cyberus.ca/~hadi/usenix-paper.tgz for more information on NAPI. 244 "-cpu qemu64,model=13"
184 245
185 246
186Support 247Support
diff --git a/Documentation/networking/ixgbevf.txt b/Documentation/networking/ixgbevf.txt
index 21dd5d15b6b4..5a91a41fa946 100644
--- a/Documentation/networking/ixgbevf.txt
+++ b/Documentation/networking/ixgbevf.txt
@@ -35,10 +35,6 @@ Driver ID Guide at:
35Known Issues/Troubleshooting 35Known Issues/Troubleshooting
36============================ 36============================
37 37
38 Unloading Physical Function (PF) Driver Causes System Reboots When VM is
39 Running and VF is Loaded on the VM
40 ------------------------------------------------------------------------
41 Do not unload the PF driver (ixgbe) while VFs are assigned to guests.
42 38
43Support 39Support
44======= 40=======
diff --git a/Documentation/networking/stmmac.txt b/Documentation/networking/stmmac.txt
index 7ee770b5ef5f..80a7a3454902 100644
--- a/Documentation/networking/stmmac.txt
+++ b/Documentation/networking/stmmac.txt
@@ -7,7 +7,7 @@ This is the driver for the MAC 10/100/1000 on-chip Ethernet controllers
7(Synopsys IP blocks); it has been fully tested on STLinux platforms. 7(Synopsys IP blocks); it has been fully tested on STLinux platforms.
8 8
9Currently this network device driver is for all STM embedded MAC/GMAC 9Currently this network device driver is for all STM embedded MAC/GMAC
10(7xxx SoCs). 10(7xxx SoCs). Other platforms start using it i.e. ARM SPEAr.
11 11
12DWC Ether MAC 10/100/1000 Universal version 3.41a and DWC Ether MAC 10/100 12DWC Ether MAC 10/100/1000 Universal version 3.41a and DWC Ether MAC 10/100
13Universal version 4.0 have been used for developing the first code 13Universal version 4.0 have been used for developing the first code
@@ -95,9 +95,14 @@ Several information came from the platform; please refer to the
95driver's Header file in include/linux directory. 95driver's Header file in include/linux directory.
96 96
97struct plat_stmmacenet_data { 97struct plat_stmmacenet_data {
98 int bus_id; 98 int bus_id;
99 int pbl; 99 int pbl;
100 int has_gmac; 100 int clk_csr;
101 int has_gmac;
102 int enh_desc;
103 int tx_coe;
104 int bugged_jumbo;
105 int pmt;
101 void (*fix_mac_speed)(void *priv, unsigned int speed); 106 void (*fix_mac_speed)(void *priv, unsigned int speed);
102 void (*bus_setup)(unsigned long ioaddr); 107 void (*bus_setup)(unsigned long ioaddr);
103#ifdef CONFIG_STM_DRIVERS 108#ifdef CONFIG_STM_DRIVERS
@@ -114,6 +119,12 @@ Where:
114 registers (on STM platforms); 119 registers (on STM platforms);
115- has_gmac: GMAC core is on board (get it at run-time in the next step); 120- has_gmac: GMAC core is on board (get it at run-time in the next step);
116- bus_id: bus identifier. 121- bus_id: bus identifier.
122- tx_coe: core is able to perform the tx csum in HW.
123- enh_desc: if sets the MAC will use the enhanced descriptor structure.
124- clk_csr: CSR Clock range selection.
125- bugged_jumbo: some HWs are not able to perform the csum in HW for
126 over-sized frames due to limited buffer sizes. Setting this
127 flag the csum will be done in SW on JUMBO frames.
117 128
118struct plat_stmmacphy_data { 129struct plat_stmmacphy_data {
119 int bus_id; 130 int bus_id;
@@ -131,13 +142,28 @@ Where:
131- interface: physical MII interface mode; 142- interface: physical MII interface mode;
132- phy_reset: hook to reset HW function. 143- phy_reset: hook to reset HW function.
133 144
145SOURCES:
146- Kconfig
147- Makefile
148- stmmac_main.c: main network device driver;
149- stmmac_mdio.c: mdio functions;
150- stmmac_ethtool.c: ethtool support;
151- stmmac_timer.[ch]: timer code used for mitigating the driver dma interrupts
152 Only tested on ST40 platforms based.
153- stmmac.h: private driver structure;
154- common.h: common definitions and VFTs;
155- descs.h: descriptor structure definitions;
156- dwmac1000_core.c: GMAC core functions;
157- dwmac1000_dma.c: dma functions for the GMAC chip;
158- dwmac1000.h: specific header file for the GMAC;
159- dwmac100_core: MAC 100 core and dma code;
160- dwmac100_dma.c: dma funtions for the MAC chip;
161- dwmac1000.h: specific header file for the MAC;
162- dwmac_lib.c: generic DMA functions shared among chips
163- enh_desc.c: functions for handling enhanced descriptors
164- norm_desc.c: functions for handling normal descriptors
165
134TODO: 166TODO:
135- Continue to make the driver more generic and suitable for other Synopsys 167- XGMAC controller is not supported.
136 Ethernet controllers used on other architectures (i.e. ARM).
137- 10G controllers are not supported.
138- MAC uses Normal descriptors and GMAC uses enhanced ones.
139 This is a limit that should be reviewed. MAC could want to
140 use the enhanced structure.
141- Checksumming: Rx/Tx csum is done in HW in case of GMAC only.
142- Review the timer optimisation code to use an embedded device that seems to be 168- Review the timer optimisation code to use an embedded device that seems to be
143 available in new chip generations. 169 available in new chip generations.
diff --git a/Documentation/nfc/nfc-pn544.txt b/Documentation/nfc/nfc-pn544.txt
new file mode 100644
index 000000000000..2fcac9f5996e
--- /dev/null
+++ b/Documentation/nfc/nfc-pn544.txt
@@ -0,0 +1,114 @@
1Kernel driver for the NXP Semiconductors PN544 Near Field
2Communication chip
3
4Author: Jari Vanhala
5Contact: Matti Aaltonen (matti.j.aaltonen at nokia.com)
6
7General
8-------
9
10The PN544 is an integrated transmission module for contactless
11communication. The driver goes under drives/nfc/ and is compiled as a
12module named "pn544". It registers a misc device and creates a device
13file named "/dev/pn544".
14
15Host Interfaces: I2C, SPI and HSU, this driver supports currently only I2C.
16
17The Interface
18-------------
19
20The driver offers a sysfs interface for a hardware test and an IOCTL
21interface for selecting between two operating modes. There are read,
22write and poll functions for transferring messages. The two operating
23modes are the normal (HCI) mode and the firmware update mode.
24
25PN544 is controlled by sending messages from the userspace to the
26chip. The main function of the driver is just to pass those messages
27without caring about the message content.
28
29
30Protocols
31---------
32
33In the normal (HCI) mode and in the firmware update mode read and
34write functions behave a bit differently because the message formats
35or the protocols are different.
36
37In the normal (HCI) mode the protocol used is derived from the ETSI
38HCI specification. The firmware is updated using a specific protocol,
39which is different from HCI.
40
41HCI messages consist of an eight bit header and the message body. The
42header contains the message length. Maximum size for an HCI message is
4333. In HCI mode sent messages are tested for a correct
44checksum. Firmware update messages have the length in the second (MSB)
45and third (LSB) bytes of the message. The maximum FW message length is
461024 bytes.
47
48For the ETSI HCI specification see
49http://www.etsi.org/WebSite/Technologies/ProtocolSpecification.aspx
50
51The Hardware Test
52-----------------
53
54The idea of the test is that it can performed by reading from the
55corresponding sysfs file. The test is implemented in the board file
56and it should test that PN544 can be put into the firmware update
57mode. If the test is not implemented the sysfs file does not get
58created.
59
60Example:
61> cat /sys/module/pn544/drivers/i2c\:pn544/3-002b/nfc_test
621
63
64Normal Operation
65----------------
66
67PN544 is powered up when the device file is opened, otherwise it's
68turned off. Only one instance can use the device at a time.
69
70Userspace applications control PN544 with HCI messages. The hardware
71sends an interrupt when data is available for reading. Data is
72physically read when the read function is called by a userspace
73application. Poll() checks the read interrupt state. Configuration and
74self testing are also done from the userspace using read and write.
75
76Example platform data:
77
78static int rx71_pn544_nfc_request_resources(struct i2c_client *client)
79{
80 /* Get and setup the HW resources for the device */
81}
82
83static void rx71_pn544_nfc_free_resources(void)
84{
85 /* Release the HW resources */
86}
87
88static void rx71_pn544_nfc_enable(int fw)
89{
90 /* Turn the device on */
91}
92
93static int rx71_pn544_nfc_test(void)
94{
95 /*
96 * Put the device into the FW update mode
97 * and then back to the normal mode.
98 * Check the behavior and return one on success,
99 * zero on failure.
100 */
101}
102
103static void rx71_pn544_nfc_disable(void)
104{
105 /* turn the power off */
106}
107
108static struct pn544_nfc_platform_data rx71_nfc_data = {
109 .request_resources = rx71_pn544_nfc_request_resources,
110 .free_resources = rx71_pn544_nfc_free_resources,
111 .enable = rx71_pn544_nfc_enable,
112 .test = rx71_pn544_nfc_test,
113 .disable = rx71_pn544_nfc_disable,
114};
diff --git a/Documentation/power/drivers-testing.txt b/Documentation/power/drivers-testing.txt
index 7f7a737f7f9f..638afdf4d6b8 100644
--- a/Documentation/power/drivers-testing.txt
+++ b/Documentation/power/drivers-testing.txt
@@ -23,10 +23,10 @@ Once you have resolved the suspend/resume-related problems with your test system
23without the new driver, you are ready to test it: 23without the new driver, you are ready to test it:
24 24
25a) Build the driver as a module, load it and try the test modes of hibernation 25a) Build the driver as a module, load it and try the test modes of hibernation
26 (see: Documents/power/basic-pm-debugging.txt, 1). 26 (see: Documentation/power/basic-pm-debugging.txt, 1).
27 27
28b) Load the driver and attempt to hibernate in the "reboot", "shutdown" and 28b) Load the driver and attempt to hibernate in the "reboot", "shutdown" and
29 "platform" modes (see: Documents/power/basic-pm-debugging.txt, 1). 29 "platform" modes (see: Documentation/power/basic-pm-debugging.txt, 1).
30 30
31c) Compile the driver directly into the kernel and try the test modes of 31c) Compile the driver directly into the kernel and try the test modes of
32 hibernation. 32 hibernation.
@@ -34,12 +34,12 @@ c) Compile the driver directly into the kernel and try the test modes of
34d) Attempt to hibernate with the driver compiled directly into the kernel 34d) Attempt to hibernate with the driver compiled directly into the kernel
35 in the "reboot", "shutdown" and "platform" modes. 35 in the "reboot", "shutdown" and "platform" modes.
36 36
37e) Try the test modes of suspend (see: Documents/power/basic-pm-debugging.txt, 37e) Try the test modes of suspend (see: Documentation/power/basic-pm-debugging.txt,
38 2). [As far as the STR tests are concerned, it should not matter whether or 38 2). [As far as the STR tests are concerned, it should not matter whether or
39 not the driver is built as a module.] 39 not the driver is built as a module.]
40 40
41f) Attempt to suspend to RAM using the s2ram tool with the driver loaded 41f) Attempt to suspend to RAM using the s2ram tool with the driver loaded
42 (see: Documents/power/basic-pm-debugging.txt, 2). 42 (see: Documentation/power/basic-pm-debugging.txt, 2).
43 43
44Each of the above tests should be repeated several times and the STD tests 44Each of the above tests should be repeated several times and the STD tests
45should be mixed with the STR tests. If any of them fails, the driver cannot be 45should be mixed with the STR tests. If any of them fails, the driver cannot be
diff --git a/Documentation/power/opp.txt b/Documentation/power/opp.txt
index 44d87ad3cea9..cd445582d1f8 100644
--- a/Documentation/power/opp.txt
+++ b/Documentation/power/opp.txt
@@ -37,6 +37,9 @@ Typical usage of the OPP library is as follows:
37SoC framework -> modifies on required cases certain OPPs -> OPP layer 37SoC framework -> modifies on required cases certain OPPs -> OPP layer
38 -> queries to search/retrieve information -> 38 -> queries to search/retrieve information ->
39 39
40Architectures that provide a SoC framework for OPP should select ARCH_HAS_OPP
41to make the OPP layer available.
42
40OPP layer expects each domain to be represented by a unique device pointer. SoC 43OPP 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 44framework 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. 45list is expected to be an optimally small number typically around 5 per device.
diff --git a/Documentation/power/runtime_pm.txt b/Documentation/power/runtime_pm.txt
index 489e9bacd165..ffe55ffa540a 100644
--- a/Documentation/power/runtime_pm.txt
+++ b/Documentation/power/runtime_pm.txt
@@ -50,6 +50,15 @@ type's callbacks are not defined) of given device. The bus type, device type
50and device class callbacks are referred to as subsystem-level callbacks in what 50and device class callbacks are referred to as subsystem-level callbacks in what
51follows. 51follows.
52 52
53By default, the callbacks are always invoked in process context with interrupts
54enabled. However, subsystems can use the pm_runtime_irq_safe() helper function
55to tell the PM core that a device's ->runtime_suspend() and ->runtime_resume()
56callbacks should be invoked in atomic context with interrupts disabled
57(->runtime_idle() is still invoked the default way). This implies that these
58callback routines must not block or sleep, but it also means that the
59synchronous helper functions listed at the end of Section 4 can be used within
60an interrupt handler or in an atomic context.
61
53The subsystem-level suspend callback is _entirely_ _responsible_ for handling 62The subsystem-level suspend callback is _entirely_ _responsible_ for handling
54the suspend of the device as appropriate, which may, but need not include 63the suspend of the device as appropriate, which may, but need not include
55executing the device driver's own ->runtime_suspend() callback (from the 64executing the device driver's own ->runtime_suspend() callback (from the
@@ -237,6 +246,10 @@ defined in include/linux/pm.h:
237 Section 8); it may be modified only by the pm_runtime_no_callbacks() 246 Section 8); it may be modified only by the pm_runtime_no_callbacks()
238 helper function 247 helper function
239 248
249 unsigned int irq_safe;
250 - indicates that the ->runtime_suspend() and ->runtime_resume() callbacks
251 will be invoked with the spinlock held and interrupts disabled
252
240 unsigned int use_autosuspend; 253 unsigned int use_autosuspend;
241 - indicates that the device's driver supports delayed autosuspend (see 254 - indicates that the device's driver supports delayed autosuspend (see
242 Section 9); it may be modified only by the 255 Section 9); it may be modified only by the
@@ -344,6 +357,10 @@ drivers/base/power/runtime.c and include/linux/pm_runtime.h:
344 - decrement the device's usage counter; if the result is 0 then run 357 - decrement the device's usage counter; if the result is 0 then run
345 pm_runtime_idle(dev) and return its result 358 pm_runtime_idle(dev) and return its result
346 359
360 int pm_runtime_put_sync_suspend(struct device *dev);
361 - decrement the device's usage counter; if the result is 0 then run
362 pm_runtime_suspend(dev) and return its result
363
347 int pm_runtime_put_sync_autosuspend(struct device *dev); 364 int pm_runtime_put_sync_autosuspend(struct device *dev);
348 - decrement the device's usage counter; if the result is 0 then run 365 - decrement the device's usage counter; if the result is 0 then run
349 pm_runtime_autosuspend(dev) and return its result 366 pm_runtime_autosuspend(dev) and return its result
@@ -379,8 +396,8 @@ drivers/base/power/runtime.c and include/linux/pm_runtime.h:
379 zero) 396 zero)
380 397
381 bool pm_runtime_suspended(struct device *dev); 398 bool pm_runtime_suspended(struct device *dev);
382 - return true if the device's runtime PM status is 'suspended', or false 399 - return true if the device's runtime PM status is 'suspended' and its
383 otherwise 400 'power.disable_depth' field is equal to zero, or false otherwise
384 401
385 void pm_runtime_allow(struct device *dev); 402 void pm_runtime_allow(struct device *dev);
386 - set the power.runtime_auto flag for the device and decrease its usage 403 - set the power.runtime_auto flag for the device and decrease its usage
@@ -397,6 +414,11 @@ drivers/base/power/runtime.c and include/linux/pm_runtime.h:
397 PM attributes from /sys/devices/.../power (or prevent them from being 414 PM attributes from /sys/devices/.../power (or prevent them from being
398 added when the device is registered) 415 added when the device is registered)
399 416
417 void pm_runtime_irq_safe(struct device *dev);
418 - set the power.irq_safe flag for the device, causing the runtime-PM
419 suspend and resume callbacks (but not the idle callback) to be invoked
420 with interrupts disabled
421
400 void pm_runtime_mark_last_busy(struct device *dev); 422 void pm_runtime_mark_last_busy(struct device *dev);
401 - set the power.last_busy field to the current time 423 - set the power.last_busy field to the current time
402 424
@@ -438,6 +460,15 @@ pm_runtime_suspended()
438pm_runtime_mark_last_busy() 460pm_runtime_mark_last_busy()
439pm_runtime_autosuspend_expiration() 461pm_runtime_autosuspend_expiration()
440 462
463If pm_runtime_irq_safe() has been called for a device then the following helper
464functions may also be used in interrupt context:
465
466pm_runtime_suspend()
467pm_runtime_autosuspend()
468pm_runtime_resume()
469pm_runtime_get_sync()
470pm_runtime_put_sync_suspend()
471
4415. Run-time PM Initialization, Device Probing and Removal 4725. Run-time PM Initialization, Device Probing and Removal
442 473
443Initially, the run-time PM is disabled for all devices, which means that the 474Initially, the run-time PM is disabled for all devices, which means that the
diff --git a/Documentation/powerpc/booting-without-of.txt b/Documentation/powerpc/booting-without-of.txt
index 302db5da49b3..7400d7555dc3 100644
--- a/Documentation/powerpc/booting-without-of.txt
+++ b/Documentation/powerpc/booting-without-of.txt
@@ -131,7 +131,7 @@ order to avoid the degeneration that had become the ppc32 kernel entry
131point and the way a new platform should be added to the kernel. The 131point and the way a new platform should be added to the kernel. The
132legacy iSeries platform breaks those rules as it predates this scheme, 132legacy iSeries platform breaks those rules as it predates this scheme,
133but no new board support will be accepted in the main tree that 133but no new board support will be accepted in the main tree that
134doesn't follows them properly. In addition, since the advent of the 134doesn't follow them properly. In addition, since the advent of the
135arch/powerpc merged architecture for ppc32 and ppc64, new 32-bit 135arch/powerpc merged architecture for ppc32 and ppc64, new 32-bit
136platforms and 32-bit platforms which move into arch/powerpc will be 136platforms and 32-bit platforms which move into arch/powerpc will be
137required to use these rules as well. 137required to use these rules as well.
@@ -1025,7 +1025,7 @@ dtc source code can be found at
1025 1025
1026WARNING: This version is still in early development stage; the 1026WARNING: This version is still in early development stage; the
1027resulting device-tree "blobs" have not yet been validated with the 1027resulting device-tree "blobs" have not yet been validated with the
1028kernel. The current generated bloc lacks a useful reserve map (it will 1028kernel. The current generated block lacks a useful reserve map (it will
1029be fixed to generate an empty one, it's up to the bootloader to fill 1029be fixed to generate an empty one, it's up to the bootloader to fill
1030it up) among others. The error handling needs work, bugs are lurking, 1030it up) among others. The error handling needs work, bugs are lurking,
1031etc... 1031etc...
@@ -1098,7 +1098,7 @@ supported currently at the toplevel.
1098 * an arbitrary array of bytes 1098 * an arbitrary array of bytes
1099 */ 1099 */
1100 1100
1101 childnode@addresss { /* define a child node named "childnode" 1101 childnode@address { /* define a child node named "childnode"
1102 * whose unit name is "childnode at 1102 * whose unit name is "childnode at
1103 * address" 1103 * address"
1104 */ 1104 */
diff --git a/Documentation/powerpc/dts-bindings/4xx/cpm.txt b/Documentation/powerpc/dts-bindings/4xx/cpm.txt
new file mode 100644
index 000000000000..ee459806d35e
--- /dev/null
+++ b/Documentation/powerpc/dts-bindings/4xx/cpm.txt
@@ -0,0 +1,52 @@
1PPC4xx Clock Power Management (CPM) node
2
3Required properties:
4 - compatible : compatible list, currently only "ibm,cpm"
5 - dcr-access-method : "native"
6 - dcr-reg : < DCR register range >
7
8Optional properties:
9 - er-offset : All 4xx SoCs with a CPM controller have
10 one of two different order for the CPM
11 registers. Some have the CPM registers
12 in the following order (ER,FR,SR). The
13 others have them in the following order
14 (SR,ER,FR). For the second case set
15 er-offset = <1>.
16 - unused-units : specifier consist of one cell. For each
17 bit in the cell, the corresponding bit
18 in CPM will be set to turn off unused
19 devices.
20 - idle-doze : specifier consist of one cell. For each
21 bit in the cell, the corresponding bit
22 in CPM will be set to turn off unused
23 devices. This is usually just CPM[CPU].
24 - standby : specifier consist of one cell. For each
25 bit in the cell, the corresponding bit
26 in CPM will be set on standby and
27 restored on resume.
28 - suspend : specifier consist of one cell. For each
29 bit in the cell, the corresponding bit
30 in CPM will be set on suspend (mem) and
31 restored on resume. Note, for standby
32 and suspend the corresponding bits can
33 be different or the same. Usually for
34 standby only class 2 and 3 units are set.
35 However, the interface does not care.
36 If they are the same, the additional
37 power saving will be seeing if support
38 is available to put the DDR in self
39 refresh mode and any additional power
40 saving techniques for the specific SoC.
41
42Example:
43 CPM0: cpm {
44 compatible = "ibm,cpm";
45 dcr-access-method = "native";
46 dcr-reg = <0x160 0x003>;
47 er-offset = <0>;
48 unused-units = <0x00000100>;
49 idle-doze = <0x02000000>;
50 standby = <0xfeff0000>;
51 suspend = <0xfeff791d>;
52};
diff --git a/Documentation/powerpc/dts-bindings/eeprom.txt b/Documentation/powerpc/dts-bindings/eeprom.txt
new file mode 100644
index 000000000000..4342c10de1bf
--- /dev/null
+++ b/Documentation/powerpc/dts-bindings/eeprom.txt
@@ -0,0 +1,28 @@
1EEPROMs (I2C)
2
3Required properties:
4
5 - compatible : should be "<manufacturer>,<type>"
6 If there is no specific driver for <manufacturer>, a generic
7 driver based on <type> is selected. Possible types are:
8 24c00, 24c01, 24c02, 24c04, 24c08, 24c16, 24c32, 24c64,
9 24c128, 24c256, 24c512, 24c1024, spd
10
11 - reg : the I2C address of the EEPROM
12
13Optional properties:
14
15 - pagesize : the length of the pagesize for writing. Please consult the
16 manual of your device, that value varies a lot. A wrong value
17 may result in data loss! If not specified, a safety value of
18 '1' is used which will be very slow.
19
20 - read-only: this parameterless property disables writes to the eeprom
21
22Example:
23
24eeprom@52 {
25 compatible = "atmel,24c32";
26 reg = <0x52>;
27 pagesize = <32>;
28};
diff --git a/Documentation/pps/pps.txt b/Documentation/pps/pps.txt
index 125f4ab48998..d35dcdd82ff6 100644
--- a/Documentation/pps/pps.txt
+++ b/Documentation/pps/pps.txt
@@ -170,3 +170,49 @@ and the run ppstest as follow:
170 170
171Please, note that to compile userland programs you need the file timepps.h 171Please, note that to compile userland programs you need the file timepps.h
172(see Documentation/pps/). 172(see Documentation/pps/).
173
174
175Generators
176----------
177
178Sometimes one needs to be able not only to catch PPS signals but to produce
179them also. For example, running a distributed simulation, which requires
180computers' clock to be synchronized very tightly. One way to do this is to
181invent some complicated hardware solutions but it may be neither necessary
182nor affordable. The cheap way is to load a PPS generator on one of the
183computers (master) and PPS clients on others (slaves), and use very simple
184cables to deliver signals using parallel ports, for example.
185
186Parallel port cable pinout:
187pin name master slave
1881 STROBE *------ *
1892 D0 * | *
1903 D1 * | *
1914 D2 * | *
1925 D3 * | *
1936 D4 * | *
1947 D5 * | *
1958 D6 * | *
1969 D7 * | *
19710 ACK * ------*
19811 BUSY * *
19912 PE * *
20013 SEL * *
20114 AUTOFD * *
20215 ERROR * *
20316 INIT * *
20417 SELIN * *
20518-25 GND *-----------*
206
207Please note that parallel port interrupt occurs only on high->low transition,
208so it is used for PPS assert edge. PPS clear edge can be determined only
209using polling in the interrupt handler which actually can be done way more
210precisely because interrupt handling delays can be quite big and random. So
211current parport PPS generator implementation (pps_gen_parport module) is
212geared towards using the clear edge for time synchronization.
213
214Clear edge polling is done with disabled interrupts so it's better to select
215delay between assert and clear edge as small as possible to reduce system
216latencies. But if it is too small slave won't be able to capture clear edge
217transition. The default of 30us should be good enough in most situations.
218The delay can be selected using 'delay' pps_gen_parport module parameter.
diff --git a/Documentation/scheduler/00-INDEX b/Documentation/scheduler/00-INDEX
index 3c00c9c3219e..d2651c47ae27 100644
--- a/Documentation/scheduler/00-INDEX
+++ b/Documentation/scheduler/00-INDEX
@@ -3,7 +3,7 @@
3sched-arch.txt 3sched-arch.txt
4 - CPU Scheduler implementation hints for architecture specific code. 4 - CPU Scheduler implementation hints for architecture specific code.
5sched-design-CFS.txt 5sched-design-CFS.txt
6 - goals, design and implementation of the Complete Fair Scheduler. 6 - goals, design and implementation of the Completely Fair Scheduler.
7sched-domains.txt 7sched-domains.txt
8 - information on scheduling domains. 8 - information on scheduling domains.
9sched-nice-design.txt 9sched-nice-design.txt
diff --git a/Documentation/scsi/ChangeLog.lpfc b/Documentation/scsi/ChangeLog.lpfc
index 337c924cc81f..5e83769c6aa9 100644
--- a/Documentation/scsi/ChangeLog.lpfc
+++ b/Documentation/scsi/ChangeLog.lpfc
@@ -573,7 +573,7 @@ Changes from 20041018 to 20041123
573 * Backround nodev_timeout processing to DPC This enables us to 573 * Backround nodev_timeout processing to DPC This enables us to
574 unblock (stop dev_loss_tmo) when appopriate. 574 unblock (stop dev_loss_tmo) when appopriate.
575 * Fix array discovery with multiple luns. The max_luns was 0 at 575 * Fix array discovery with multiple luns. The max_luns was 0 at
576 the time the host structure was intialized. lpfc_cfg_params 576 the time the host structure was initialized. lpfc_cfg_params
577 then set the max_luns to the correct value afterwards. 577 then set the max_luns to the correct value afterwards.
578 * Remove unused define LPFC_MAX_LUN and set the default value of 578 * Remove unused define LPFC_MAX_LUN and set the default value of
579 lpfc_max_lun parameter to 512. 579 lpfc_max_lun parameter to 512.
diff --git a/Documentation/scsi/ChangeLog.megaraid_sas b/Documentation/scsi/ChangeLog.megaraid_sas
index 00301ed9c371..b64d10d221ec 100644
--- a/Documentation/scsi/ChangeLog.megaraid_sas
+++ b/Documentation/scsi/ChangeLog.megaraid_sas
@@ -1,3 +1,25 @@
1Release Date : Tues. Dec 14, 2010 17:00:00 PST 2010 -
2 (emaild-id:megaraidlinux@lsi.com)
3 Adam Radford
4Current Version : 00.00.05.29-rc1
5Old Version : 00.00.04.31-rc1
6 1. Rename megaraid_sas.c to megaraid_sas_base.c.
7 2. Update GPL headers.
8 3. Add MSI-X support and 'msix_disable' module parameter.
9 4. Use lowest memory bar (for SR-IOV VF support).
10 5. Add struct megasas_instance_temlate changes, and change all code to use
11 new instance entries:
12
13 irqreturn_t (*service_isr )(int irq, void *devp);
14 void (*tasklet)(unsigned long);
15 u32 (*init_adapter)(struct megasas_instance *);
16 u32 (*build_and_issue_cmd) (struct megasas_instance *,
17 struct scsi_cmnd *);
18 void (*issue_dcmd) (struct megasas_instance *instance,
19 struct megasas_cmd *cmd);
20
21 6. Add code to support MegaRAID 9265/9285 controllers device id (0x5b).
22-------------------------------------------------------------------------------
11 Release Date : Thur. May 03, 2010 09:12:45 PST 2009 - 231 Release Date : Thur. May 03, 2010 09:12:45 PST 2009 -
2 (emaild-id:megaraidlinux@lsi.com) 24 (emaild-id:megaraidlinux@lsi.com)
3 Bo Yang 25 Bo Yang
diff --git a/Documentation/scsi/scsi_mid_low_api.txt b/Documentation/scsi/scsi_mid_low_api.txt
index 570ef2b3d79b..df322c103466 100644
--- a/Documentation/scsi/scsi_mid_low_api.txt
+++ b/Documentation/scsi/scsi_mid_low_api.txt
@@ -1044,9 +1044,9 @@ Details:
1044 1044
1045 1045
1046/** 1046/**
1047 * queuecommand - queue scsi command, invoke 'done' on completion 1047 * queuecommand - queue scsi command, invoke scp->scsi_done on completion
1048 * @shost: pointer to the scsi host object
1048 * @scp: pointer to scsi command object 1049 * @scp: pointer to scsi command object
1049 * @done: function pointer to be invoked on completion
1050 * 1050 *
1051 * Returns 0 on success. 1051 * Returns 0 on success.
1052 * 1052 *
@@ -1074,42 +1074,45 @@ Details:
1074 * 1074 *
1075 * Other types of errors that are detected immediately may be 1075 * Other types of errors that are detected immediately may be
1076 * flagged by setting scp->result to an appropriate value, 1076 * flagged by setting scp->result to an appropriate value,
1077 * invoking the 'done' callback, and then returning 0 from this 1077 * invoking the scp->scsi_done callback, and then returning 0
1078 * function. If the command is not performed immediately (and the 1078 * from this function. If the command is not performed
1079 * LLD is starting (or will start) the given command) then this 1079 * immediately (and the LLD is starting (or will start) the given
1080 * function should place 0 in scp->result and return 0. 1080 * command) then this function should place 0 in scp->result and
1081 * return 0.
1081 * 1082 *
1082 * Command ownership. If the driver returns zero, it owns the 1083 * Command ownership. If the driver returns zero, it owns the
1083 * command and must take responsibility for ensuring the 'done' 1084 * command and must take responsibility for ensuring the
1084 * callback is executed. Note: the driver may call done before 1085 * scp->scsi_done callback is executed. Note: the driver may
1085 * returning zero, but after it has called done, it may not 1086 * call scp->scsi_done before returning zero, but after it has
1086 * return any value other than zero. If the driver makes a 1087 * called scp->scsi_done, it may not return any value other than
1087 * non-zero return, it must not execute the command's done 1088 * zero. If the driver makes a non-zero return, it must not
1088 * callback at any time. 1089 * execute the command's scsi_done callback at any time.
1089 * 1090 *
1090 * Locks: struct Scsi_Host::host_lock held on entry (with "irqsave") 1091 * Locks: up to and including 2.6.36, struct Scsi_Host::host_lock
1091 * and is expected to be held on return. 1092 * held on entry (with "irqsave") and is expected to be
1093 * held on return. From 2.6.37 onwards, queuecommand is
1094 * called without any locks held.
1092 * 1095 *
1093 * Calling context: in interrupt (soft irq) or process context 1096 * Calling context: in interrupt (soft irq) or process context
1094 * 1097 *
1095 * Notes: This function should be relatively fast. Normally it will 1098 * Notes: This function should be relatively fast. Normally it
1096 * not wait for IO to complete. Hence the 'done' callback is invoked 1099 * will not wait for IO to complete. Hence the scp->scsi_done
1097 * (often directly from an interrupt service routine) some time after 1100 * callback is invoked (often directly from an interrupt service
1098 * this function has returned. In some cases (e.g. pseudo adapter 1101 * routine) some time after this function has returned. In some
1099 * drivers that manufacture the response to a SCSI INQUIRY) 1102 * cases (e.g. pseudo adapter drivers that manufacture the
1100 * the 'done' callback may be invoked before this function returns. 1103 * response to a SCSI INQUIRY) the scp->scsi_done callback may be
1101 * If the 'done' callback is not invoked within a certain period 1104 * invoked before this function returns. If the scp->scsi_done
1102 * the SCSI mid level will commence error processing. 1105 * callback is not invoked within a certain period the SCSI mid
1103 * If a status of CHECK CONDITION is placed in "result" when the 1106 * level will commence error processing. If a status of CHECK
1104 * 'done' callback is invoked, then the LLD driver should 1107 * CONDITION is placed in "result" when the scp->scsi_done
1105 * perform autosense and fill in the struct scsi_cmnd::sense_buffer 1108 * callback is invoked, then the LLD driver should perform
1109 * autosense and fill in the struct scsi_cmnd::sense_buffer
1106 * array. The scsi_cmnd::sense_buffer array is zeroed prior to 1110 * array. The scsi_cmnd::sense_buffer array is zeroed prior to
1107 * the mid level queuing a command to an LLD. 1111 * the mid level queuing a command to an LLD.
1108 * 1112 *
1109 * Defined in: LLD 1113 * Defined in: LLD
1110 **/ 1114 **/
1111 int queuecommand(struct scsi_cmnd * scp, 1115 int queuecommand(struct Scsi_Host *shost, struct scsi_cmnd * scp)
1112 void (*done)(struct scsi_cmnd *))
1113 1116
1114 1117
1115/** 1118/**
diff --git a/Documentation/serial/00-INDEX b/Documentation/serial/00-INDEX
index 07dcdb0d2a36..e09468ad3cb1 100644
--- a/Documentation/serial/00-INDEX
+++ b/Documentation/serial/00-INDEX
@@ -14,6 +14,8 @@ riscom8.txt
14 - notes on using the RISCom/8 multi-port serial driver. 14 - notes on using the RISCom/8 multi-port serial driver.
15rocket.txt 15rocket.txt
16 - info on the Comtrol RocketPort multiport serial driver. 16 - info on the Comtrol RocketPort multiport serial driver.
17serial-rs485.txt
18 - info about RS485 structures and support in the kernel.
17specialix.txt 19specialix.txt
18 - info on hardware/driver for specialix IO8+ multiport serial card. 20 - info on hardware/driver for specialix IO8+ multiport serial card.
19stallion.txt 21stallion.txt
diff --git a/Documentation/serial/serial-rs485.txt b/Documentation/serial/serial-rs485.txt
new file mode 100644
index 000000000000..a4932387bbfb
--- /dev/null
+++ b/Documentation/serial/serial-rs485.txt
@@ -0,0 +1,120 @@
1 RS485 SERIAL COMMUNICATIONS
2
31. INTRODUCTION
4
5 EIA-485, also known as TIA/EIA-485 or RS-485, is a standard defining the
6 electrical characteristics of drivers and receivers for use in balanced
7 digital multipoint systems.
8 This standard is widely used for communications in industrial automation
9 because it can be used effectively over long distances and in electrically
10 noisy environments.
11
122. HARDWARE-RELATED CONSIDERATIONS
13
14 Some CPUs/UARTs (e.g., Atmel AT91 or 16C950 UART) contain a built-in
15 half-duplex mode capable of automatically controlling line direction by
16 toggling RTS or DTR signals. That can be used to control external
17 half-duplex hardware like an RS485 transceiver or any RS232-connected
18 half-duplex devices like some modems.
19
20 For these microcontrollers, the Linux driver should be made capable of
21 working in both modes, and proper ioctls (see later) should be made
22 available at user-level to allow switching from one mode to the other, and
23 vice versa.
24
253. DATA STRUCTURES ALREADY AVAILABLE IN THE KERNEL
26
27 The Linux kernel provides the serial_rs485 structure (see [1]) to handle
28 RS485 communications. This data structure is used to set and configure RS485
29 parameters in the platform data and in ioctls.
30
31 Any driver for devices capable of working both as RS232 and RS485 should
32 provide at least the following ioctls:
33
34 - TIOCSRS485 (typically associated with number 0x542F). This ioctl is used
35 to enable/disable RS485 mode from user-space
36
37 - TIOCGRS485 (typically associated with number 0x542E). This ioctl is used
38 to get RS485 mode from kernel-space (i.e., driver) to user-space.
39
40 In other words, the serial driver should contain a code similar to the next
41 one:
42
43 static struct uart_ops atmel_pops = {
44 /* ... */
45 .ioctl = handle_ioctl,
46 };
47
48 static int handle_ioctl(struct uart_port *port,
49 unsigned int cmd,
50 unsigned long arg)
51 {
52 struct serial_rs485 rs485conf;
53
54 switch (cmd) {
55 case TIOCSRS485:
56 if (copy_from_user(&rs485conf,
57 (struct serial_rs485 *) arg,
58 sizeof(rs485conf)))
59 return -EFAULT;
60
61 /* ... */
62 break;
63
64 case TIOCGRS485:
65 if (copy_to_user((struct serial_rs485 *) arg,
66 ...,
67 sizeof(rs485conf)))
68 return -EFAULT;
69 /* ... */
70 break;
71
72 /* ... */
73 }
74 }
75
76
774. USAGE FROM USER-LEVEL
78
79 From user-level, RS485 configuration can be get/set using the previous
80 ioctls. For instance, to set RS485 you can use the following code:
81
82 #include <linux/serial.h>
83
84 /* Driver-specific ioctls: */
85 #define TIOCGRS485 0x542E
86 #define TIOCSRS485 0x542F
87
88 /* Open your specific device (e.g., /dev/mydevice): */
89 int fd = open ("/dev/mydevice", O_RDWR);
90 if (fd < 0) {
91 /* Error handling. See errno. */
92 }
93
94 struct serial_rs485 rs485conf;
95
96 /* Set RS485 mode: */
97 rs485conf.flags |= SER_RS485_ENABLED;
98
99 /* Set rts delay before send, if needed: */
100 rs485conf.flags |= SER_RS485_RTS_BEFORE_SEND;
101 rs485conf.delay_rts_before_send = ...;
102
103 /* Set rts delay after send, if needed: */
104 rs485conf.flags |= SER_RS485_RTS_AFTER_SEND;
105 rs485conf.delay_rts_after_send = ...;
106
107 if (ioctl (fd, TIOCSRS485, &rs485conf) < 0) {
108 /* Error handling. See errno. */
109 }
110
111 /* Use read() and write() syscalls here... */
112
113 /* Close the device when finished: */
114 if (close (fd) < 0) {
115 /* Error handling. See errno. */
116 }
117
1185. REFERENCES
119
120 [1] include/linux/serial.h
diff --git a/Documentation/serial/tty.txt b/Documentation/serial/tty.txt
index 7c900507279f..540db41dfd5d 100644
--- a/Documentation/serial/tty.txt
+++ b/Documentation/serial/tty.txt
@@ -107,7 +107,7 @@ write_wakeup() - May be called at any point between open and close.
107 107
108dcd_change() - Report to the tty line the current DCD pin status 108dcd_change() - Report to the tty line the current DCD pin status
109 changes and the relative timestamp. The timestamp 109 changes and the relative timestamp. The timestamp
110 can be NULL. 110 cannot be NULL.
111 111
112 112
113Driver Access 113Driver Access
diff --git a/Documentation/sh/clk.txt b/Documentation/sh/clk.txt
deleted file mode 100644
index 114b595cfa97..000000000000
--- a/Documentation/sh/clk.txt
+++ /dev/null
@@ -1,32 +0,0 @@
1Clock framework on SuperH architecture
2
3The framework on SH extends existing API by the function clk_set_rate_ex,
4which prototype is as follows:
5
6 clk_set_rate_ex (struct clk *clk, unsigned long rate, int algo_id)
7
8The algo_id parameter is used to specify algorithm used to recalculate clocks,
9adjanced to clock, specified as first argument. It is assumed that algo_id==0
10means no changes to adjanced clock
11
12Internally, the clk_set_rate_ex forwards request to clk->ops->set_rate method,
13if it is present in ops structure. The method should set the clock rate and adjust
14all needed clocks according to the passed algo_id.
15Exact values for algo_id are machine-dependent. For the sh7722, the following
16values are defined:
17
18 NO_CHANGE = 0,
19 IUS_N1_N1, /* I:U = N:1, U:Sh = N:1 */
20 IUS_322, /* I:U:Sh = 3:2:2 */
21 IUS_522, /* I:U:Sh = 5:2:2 */
22 IUS_N11, /* I:U:Sh = N:1:1 */
23 SB_N1, /* Sh:B = N:1 */
24 SB3_N1, /* Sh:B3 = N:1 */
25 SB3_32, /* Sh:B3 = 3:2 */
26 SB3_43, /* Sh:B3 = 4:3 */
27 SB3_54, /* Sh:B3 = 5:4 */
28 BP_N1, /* B:P = N:1 */
29 IP_N1 /* I:P = N:1 */
30
31Each of these constants means relation between clocks that can be set via the FRQCR
32register
diff --git a/Documentation/sound/alsa/ALSA-Configuration.txt b/Documentation/sound/alsa/ALSA-Configuration.txt
index d0eb696d32e8..3c1eddd9fcc7 100644
--- a/Documentation/sound/alsa/ALSA-Configuration.txt
+++ b/Documentation/sound/alsa/ALSA-Configuration.txt
@@ -974,13 +974,6 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed.
974 974
975 See hdspm.txt for details. 975 See hdspm.txt for details.
976 976
977 Module snd-hifier
978 -----------------
979
980 Module for the MediaTek/TempoTec HiFier Fantasia sound card.
981
982 This module supports autoprobe and multiple cards.
983
984 Module snd-ice1712 977 Module snd-ice1712
985 ------------------ 978 ------------------
986 979
@@ -1531,15 +1524,20 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed.
1531 Module snd-oxygen 1524 Module snd-oxygen
1532 ----------------- 1525 -----------------
1533 1526
1534 Module for sound cards based on the C-Media CMI8788 chip: 1527 Module for sound cards based on the C-Media CMI8786/8787/8788 chip:
1535 * Asound A-8788 1528 * Asound A-8788
1529 * Asus Xonar DG
1536 * AuzenTech X-Meridian 1530 * AuzenTech X-Meridian
1531 * AuzenTech X-Meridian 2G
1537 * Bgears b-Enspirer 1532 * Bgears b-Enspirer
1538 * Club3D Theatron DTS 1533 * Club3D Theatron DTS
1539 * HT-Omega Claro (plus) 1534 * HT-Omega Claro (plus)
1540 * HT-Omega Claro halo (XT) 1535 * HT-Omega Claro halo (XT)
1536 * Kuroutoshikou CMI8787-HG2PCI
1541 * Razer Barracuda AC-1 1537 * Razer Barracuda AC-1
1542 * Sondigo Inferno 1538 * Sondigo Inferno
1539 * TempoTec HiFier Fantasia
1540 * TempoTec HiFier Serenade
1543 1541
1544 This module supports autoprobe and multiple cards. 1542 This module supports autoprobe and multiple cards.
1545 1543
@@ -2006,9 +2004,9 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed.
2006 Module snd-virtuoso 2004 Module snd-virtuoso
2007 ------------------- 2005 -------------------
2008 2006
2009 Module for sound cards based on the Asus AV100/AV200 chips, 2007 Module for sound cards based on the Asus AV66/AV100/AV200 chips,
2010 i.e., Xonar D1, DX, D2, D2X, DS, HDAV1.3 (Deluxe), Essence ST 2008 i.e., Xonar D1, DX, D2, D2X, DS, Essence ST (Deluxe), Essence STX,
2011 (Deluxe) and Essence STX. 2009 HDAV1.3 (Deluxe), and HDAV1.3 Slim.
2012 2010
2013 This module supports autoprobe and multiple cards. 2011 This module supports autoprobe and multiple cards.
2014 2012
diff --git a/Documentation/sound/alsa/HD-Audio-Models.txt b/Documentation/sound/alsa/HD-Audio-Models.txt
index 37c6aad5e590..16ae4300c747 100644
--- a/Documentation/sound/alsa/HD-Audio-Models.txt
+++ b/Documentation/sound/alsa/HD-Audio-Models.txt
@@ -149,7 +149,6 @@ ALC882/883/885/888/889
149 acer-aspire-7730g Acer Aspire 7730G 149 acer-aspire-7730g Acer Aspire 7730G
150 acer-aspire-8930g Acer Aspire 8930G 150 acer-aspire-8930g Acer Aspire 8930G
151 medion Medion Laptops 151 medion Medion Laptops
152 medion-md2 Medion MD2
153 targa-dig Targa/MSI 152 targa-dig Targa/MSI
154 targa-2ch-dig Targa/MSI with 2-channel 153 targa-2ch-dig Targa/MSI with 2-channel
155 targa-8ch-dig Targa/MSI with 8-channel (MSI GX620) 154 targa-8ch-dig Targa/MSI with 8-channel (MSI GX620)
diff --git a/Documentation/spi/pxa2xx b/Documentation/spi/pxa2xx
index 6bb916d57c95..68a4fe3818a1 100644
--- a/Documentation/spi/pxa2xx
+++ b/Documentation/spi/pxa2xx
@@ -19,7 +19,7 @@ Declaring PXA2xx Master Controllers
19----------------------------------- 19-----------------------------------
20Typically a SPI master is defined in the arch/.../mach-*/board-*.c as a 20Typically a SPI master is defined in the arch/.../mach-*/board-*.c as a
21"platform device". The master configuration is passed to the driver via a table 21"platform device". The master configuration is passed to the driver via a table
22found in arch/arm/mach-pxa/include/mach/pxa2xx_spi.h: 22found in include/linux/spi/pxa2xx_spi.h:
23 23
24struct pxa2xx_spi_master { 24struct pxa2xx_spi_master {
25 enum pxa_ssp_type ssp_type; 25 enum pxa_ssp_type ssp_type;
@@ -94,7 +94,7 @@ using the "spi_board_info" structure found in "linux/spi/spi.h". See
94 94
95Each slave device attached to the PXA must provide slave specific configuration 95Each slave device attached to the PXA must provide slave specific configuration
96information via the structure "pxa2xx_spi_chip" found in 96information via the structure "pxa2xx_spi_chip" found in
97"arch/arm/mach-pxa/include/mach/pxa2xx_spi.h". The pxa2xx_spi master controller driver 97"include/linux/spi/pxa2xx_spi.h". The pxa2xx_spi master controller driver
98will uses the configuration whenever the driver communicates with the slave 98will uses the configuration whenever the driver communicates with the slave
99device. All fields are optional. 99device. All fields are optional.
100 100
diff --git a/Documentation/sysctl/00-INDEX b/Documentation/sysctl/00-INDEX
index 1286f455992f..8cf5d493fd03 100644
--- a/Documentation/sysctl/00-INDEX
+++ b/Documentation/sysctl/00-INDEX
@@ -4,8 +4,6 @@ README
4 - general information about /proc/sys/ sysctl files. 4 - general information about /proc/sys/ sysctl files.
5abi.txt 5abi.txt
6 - documentation for /proc/sys/abi/*. 6 - documentation for /proc/sys/abi/*.
7ctl_unnumbered.txt
8 - explanation of why one should not add new binary sysctl numbers.
9fs.txt 7fs.txt
10 - documentation for /proc/sys/fs/*. 8 - documentation for /proc/sys/fs/*.
11kernel.txt 9kernel.txt
diff --git a/Documentation/sysctl/kernel.txt b/Documentation/sysctl/kernel.txt
index 209e1584c3dc..11d5ceda5bb0 100644
--- a/Documentation/sysctl/kernel.txt
+++ b/Documentation/sysctl/kernel.txt
@@ -34,6 +34,7 @@ show up in /proc/sys/kernel:
34- hotplug 34- hotplug
35- java-appletviewer [ binfmt_java, obsolete ] 35- java-appletviewer [ binfmt_java, obsolete ]
36- java-interpreter [ binfmt_java, obsolete ] 36- java-interpreter [ binfmt_java, obsolete ]
37- kptr_restrict
37- kstack_depth_to_print [ X86 only ] 38- kstack_depth_to_print [ X86 only ]
38- l2cr [ PPC only ] 39- l2cr [ PPC only ]
39- modprobe ==> Documentation/debugging-modules.txt 40- modprobe ==> Documentation/debugging-modules.txt
@@ -219,7 +220,7 @@ dmesg_restrict:
219This toggle indicates whether unprivileged users are prevented from using 220This toggle indicates whether unprivileged users are prevented from using
220dmesg(8) to view messages from the kernel's log buffer. When 221dmesg(8) to view messages from the kernel's log buffer. When
221dmesg_restrict is set to (0) there are no restrictions. When 222dmesg_restrict is set to (0) there are no restrictions. When
222dmesg_restrict is set set to (1), users must have CAP_SYS_ADMIN to use 223dmesg_restrict is set set to (1), users must have CAP_SYSLOG to use
223dmesg(8). 224dmesg(8).
224 225
225The kernel config option CONFIG_SECURITY_DMESG_RESTRICT sets the default 226The kernel config option CONFIG_SECURITY_DMESG_RESTRICT sets the default
@@ -261,6 +262,19 @@ This flag controls the L2 cache of G3 processor boards. If
261 262
262============================================================== 263==============================================================
263 264
265kptr_restrict:
266
267This toggle indicates whether restrictions are placed on
268exposing kernel addresses via /proc and other interfaces. When
269kptr_restrict is set to (0), there are no restrictions. When
270kptr_restrict is set to (1), the default, kernel pointers
271printed using the %pK format specifier will be replaced with 0's
272unless the user has CAP_SYSLOG. When kptr_restrict is set to
273(2), kernel pointers printed using %pK will be replaced with 0's
274regardless of privileges.
275
276==============================================================
277
264kstack_depth_to_print: (X86 only) 278kstack_depth_to_print: (X86 only)
265 279
266Controls the number of words to print when dumping the raw 280Controls the number of words to print when dumping the raw
diff --git a/Documentation/timers/timer_stats.txt b/Documentation/timers/timer_stats.txt
index 9bd00fc2e823..8abd40b22b7f 100644
--- a/Documentation/timers/timer_stats.txt
+++ b/Documentation/timers/timer_stats.txt
@@ -19,7 +19,7 @@ Linux system over a sample period:
19 19
20- the pid of the task(process) which initialized the timer 20- the pid of the task(process) which initialized the timer
21- the name of the process which initialized the timer 21- the name of the process which initialized the timer
22- the function where the timer was intialized 22- the function where the timer was initialized
23- the callback function which is associated to the timer 23- the callback function which is associated to the timer
24- the number of events (callbacks) 24- the number of events (callbacks)
25 25
diff --git a/Documentation/trace/events-power.txt b/Documentation/trace/events-power.txt
new file mode 100644
index 000000000000..96d87b67fe37
--- /dev/null
+++ b/Documentation/trace/events-power.txt
@@ -0,0 +1,90 @@
1
2 Subsystem Trace Points: power
3
4The power tracing system captures events related to power transitions
5within the kernel. Broadly speaking there are three major subheadings:
6
7 o Power state switch which reports events related to suspend (S-states),
8 cpuidle (C-states) and cpufreq (P-states)
9 o System clock related changes
10 o Power domains related changes and transitions
11
12This document describes what each of the tracepoints is and why they
13might be useful.
14
15Cf. include/trace/events/power.h for the events definitions.
16
171. Power state switch events
18============================
19
201.1 New trace API
21-----------------
22
23A 'cpu' event class gathers the CPU-related events: cpuidle and
24cpufreq.
25
26cpu_idle "state=%lu cpu_id=%lu"
27cpu_frequency "state=%lu cpu_id=%lu"
28
29A suspend event is used to indicate the system going in and out of the
30suspend mode:
31
32machine_suspend "state=%lu"
33
34
35Note: the value of '-1' or '4294967295' for state means an exit from the current state,
36i.e. trace_cpu_idle(4, smp_processor_id()) means that the system
37enters the idle state 4, while trace_cpu_idle(PWR_EVENT_EXIT, smp_processor_id())
38means that the system exits the previous idle state.
39
40The event which has 'state=4294967295' in the trace is very important to the user
41space tools which are using it to detect the end of the current state, and so to
42correctly draw the states diagrams and to calculate accurate statistics etc.
43
441.2 DEPRECATED trace API
45------------------------
46
47A new Kconfig option CONFIG_EVENT_POWER_TRACING_DEPRECATED with the default value of
48'y' has been created. This allows the legacy trace power API to be used conjointly
49with the new trace API.
50The Kconfig option, the old trace API (in include/trace/events/power.h) and the
51old trace points will disappear in a future release (namely 2.6.41).
52
53power_start "type=%lu state=%lu cpu_id=%lu"
54power_frequency "type=%lu state=%lu cpu_id=%lu"
55power_end "cpu_id=%lu"
56
57The 'type' parameter takes one of those macros:
58 . POWER_NONE = 0,
59 . POWER_CSTATE = 1, /* C-State */
60 . POWER_PSTATE = 2, /* Fequency change or DVFS */
61
62The 'state' parameter is set depending on the type:
63 . Target C-state for type=POWER_CSTATE,
64 . Target frequency for type=POWER_PSTATE,
65
66power_end is used to indicate the exit of a state, corresponding to the latest
67power_start event.
68
692. Clocks events
70================
71The clock events are used for clock enable/disable and for
72clock rate change.
73
74clock_enable "%s state=%lu cpu_id=%lu"
75clock_disable "%s state=%lu cpu_id=%lu"
76clock_set_rate "%s state=%lu cpu_id=%lu"
77
78The first parameter gives the clock name (e.g. "gpio1_iclk").
79The second parameter is '1' for enable, '0' for disable, the target
80clock rate for set_rate.
81
823. Power domains events
83=======================
84The power domain events are used for power domains transitions
85
86power_domain_target "%s state=%lu cpu_id=%lu"
87
88The first parameter gives the power domain name (e.g. "mpu_pwrdm").
89The second parameter is the power domain target state.
90
diff --git a/Documentation/trace/events.txt b/Documentation/trace/events.txt
index 09bd8e902989..b510564aac7e 100644
--- a/Documentation/trace/events.txt
+++ b/Documentation/trace/events.txt
@@ -125,7 +125,7 @@ is the size of the data item, in bytes.
125For example, here's the information displayed for the 'sched_wakeup' 125For example, here's the information displayed for the 'sched_wakeup'
126event: 126event:
127 127
128# cat /debug/tracing/events/sched/sched_wakeup/format 128# cat /sys/kernel/debug/tracing/events/sched/sched_wakeup/format
129 129
130name: sched_wakeup 130name: sched_wakeup
131ID: 60 131ID: 60
@@ -201,19 +201,19 @@ to the 'filter' file for the given event.
201 201
202For example: 202For example:
203 203
204# cd /debug/tracing/events/sched/sched_wakeup 204# cd /sys/kernel/debug/tracing/events/sched/sched_wakeup
205# echo "common_preempt_count > 4" > filter 205# echo "common_preempt_count > 4" > filter
206 206
207A slightly more involved example: 207A slightly more involved example:
208 208
209# cd /debug/tracing/events/sched/sched_signal_send 209# cd /sys/kernel/debug/tracing/events/signal/signal_generate
210# echo "((sig >= 10 && sig < 15) || sig == 17) && comm != bash" > filter 210# echo "((sig >= 10 && sig < 15) || sig == 17) && comm != bash" > filter
211 211
212If there is an error in the expression, you'll get an 'Invalid 212If there is an error in the expression, you'll get an 'Invalid
213argument' error when setting it, and the erroneous string along with 213argument' error when setting it, and the erroneous string along with
214an error message can be seen by looking at the filter e.g.: 214an error message can be seen by looking at the filter e.g.:
215 215
216# cd /debug/tracing/events/sched/sched_signal_send 216# cd /sys/kernel/debug/tracing/events/signal/signal_generate
217# echo "((sig >= 10 && sig < 15) || dsig == 17) && comm != bash" > filter 217# echo "((sig >= 10 && sig < 15) || dsig == 17) && comm != bash" > filter
218-bash: echo: write error: Invalid argument 218-bash: echo: write error: Invalid argument
219# cat filter 219# cat filter
diff --git a/Documentation/trace/postprocess/trace-vmscan-postprocess.pl b/Documentation/trace/postprocess/trace-vmscan-postprocess.pl
index b3e73ddb1567..12cecc83cd91 100644
--- a/Documentation/trace/postprocess/trace-vmscan-postprocess.pl
+++ b/Documentation/trace/postprocess/trace-vmscan-postprocess.pl
@@ -373,9 +373,18 @@ EVENT_PROCESS:
373 print " $regex_lru_isolate/o\n"; 373 print " $regex_lru_isolate/o\n";
374 next; 374 next;
375 } 375 }
376 my $isolate_mode = $1;
376 my $nr_scanned = $4; 377 my $nr_scanned = $4;
377 my $nr_contig_dirty = $7; 378 my $nr_contig_dirty = $7;
378 $perprocesspid{$process_pid}->{HIGH_NR_SCANNED} += $nr_scanned; 379
380 # To closer match vmstat scanning statistics, only count isolate_both
381 # and isolate_inactive as scanning. isolate_active is rotation
382 # isolate_inactive == 0
383 # isolate_active == 1
384 # isolate_both == 2
385 if ($isolate_mode != 1) {
386 $perprocesspid{$process_pid}->{HIGH_NR_SCANNED} += $nr_scanned;
387 }
379 $perprocesspid{$process_pid}->{HIGH_NR_CONTIG_DIRTY} += $nr_contig_dirty; 388 $perprocesspid{$process_pid}->{HIGH_NR_CONTIG_DIRTY} += $nr_contig_dirty;
380 } elsif ($tracepoint eq "mm_vmscan_lru_shrink_inactive") { 389 } elsif ($tracepoint eq "mm_vmscan_lru_shrink_inactive") {
381 $details = $5; 390 $details = $5;
diff --git a/Documentation/usb/power-management.txt b/Documentation/usb/power-management.txt
index b29d8e56cf28..c9ffa9ced7ee 100644
--- a/Documentation/usb/power-management.txt
+++ b/Documentation/usb/power-management.txt
@@ -2,7 +2,7 @@
2 2
3 Alan Stern <stern@rowland.harvard.edu> 3 Alan Stern <stern@rowland.harvard.edu>
4 4
5 December 11, 2009 5 October 28, 2010
6 6
7 7
8 8
@@ -107,9 +107,14 @@ allowed to issue dynamic suspends.
107The user interface for controlling dynamic PM is located in the power/ 107The user interface for controlling dynamic PM is located in the power/
108subdirectory of each USB device's sysfs directory, that is, in 108subdirectory of each USB device's sysfs directory, that is, in
109/sys/bus/usb/devices/.../power/ where "..." is the device's ID. The 109/sys/bus/usb/devices/.../power/ where "..." is the device's ID. The
110relevant attribute files are: wakeup, control, and autosuspend. 110relevant attribute files are: wakeup, control, and
111(There may also be a file named "level"; this file was deprecated 111autosuspend_delay_ms. (There may also be a file named "level"; this
112as of the 2.6.35 kernel and replaced by the "control" file.) 112file was deprecated as of the 2.6.35 kernel and replaced by the
113"control" file. In 2.6.38 the "autosuspend" file will be deprecated
114and replaced by the "autosuspend_delay_ms" file. The only difference
115is that the newer file expresses the delay in milliseconds whereas the
116older file uses seconds. Confusingly, both files are present in 2.6.37
117but only "autosuspend" works.)
113 118
114 power/wakeup 119 power/wakeup
115 120
@@ -140,33 +145,36 @@ as of the 2.6.35 kernel and replaced by the "control" file.)
140 suspended and autoresume was not allowed. This 145 suspended and autoresume was not allowed. This
141 setting is no longer supported.) 146 setting is no longer supported.)
142 147
143 power/autosuspend 148 power/autosuspend_delay_ms
144 149
145 This file contains an integer value, which is the 150 This file contains an integer value, which is the
146 number of seconds the device should remain idle before 151 number of milliseconds the device should remain idle
147 the kernel will autosuspend it (the idle-delay time). 152 before the kernel will autosuspend it (the idle-delay
148 The default is 2. 0 means to autosuspend as soon as 153 time). The default is 2000. 0 means to autosuspend
149 the device becomes idle, and negative values mean 154 as soon as the device becomes idle, and negative
150 never to autosuspend. You can write a number to the 155 values mean never to autosuspend. You can write a
151 file to change the autosuspend idle-delay time. 156 number to the file to change the autosuspend
152 157 idle-delay time.
153Writing "-1" to power/autosuspend and writing "on" to power/control do 158
154essentially the same thing -- they both prevent the device from being 159Writing "-1" to power/autosuspend_delay_ms and writing "on" to
155autosuspended. Yes, this is a redundancy in the API. 160power/control do essentially the same thing -- they both prevent the
161device from being autosuspended. Yes, this is a redundancy in the
162API.
156 163
157(In 2.6.21 writing "0" to power/autosuspend would prevent the device 164(In 2.6.21 writing "0" to power/autosuspend would prevent the device
158from being autosuspended; the behavior was changed in 2.6.22. The 165from being autosuspended; the behavior was changed in 2.6.22. The
159power/autosuspend attribute did not exist prior to 2.6.21, and the 166power/autosuspend attribute did not exist prior to 2.6.21, and the
160power/level attribute did not exist prior to 2.6.22. power/control 167power/level attribute did not exist prior to 2.6.22. power/control
161was added in 2.6.34.) 168was added in 2.6.34, and power/autosuspend_delay_ms was added in
1692.6.37 but did not become functional until 2.6.38.)
162 170
163 171
164 Changing the default idle-delay time 172 Changing the default idle-delay time
165 ------------------------------------ 173 ------------------------------------
166 174
167The default autosuspend idle-delay time is controlled by a module 175The default autosuspend idle-delay time (in seconds) is controlled by
168parameter in usbcore. You can specify the value when usbcore is 176a module parameter in usbcore. You can specify the value when usbcore
169loaded. For example, to set it to 5 seconds instead of 2 you would 177is loaded. For example, to set it to 5 seconds instead of 2 you would
170do: 178do:
171 179
172 modprobe usbcore autosuspend=5 180 modprobe usbcore autosuspend=5
@@ -234,25 +242,23 @@ every device.
234 242
235If a driver knows that its device has proper suspend/resume support, 243If a driver knows that its device has proper suspend/resume support,
236it can enable autosuspend all by itself. For example, the video 244it can enable autosuspend all by itself. For example, the video
237driver for a laptop's webcam might do this, since these devices are 245driver for a laptop's webcam might do this (in recent kernels they
238rarely used and so should normally be autosuspended. 246do), since these devices are rarely used and so should normally be
247autosuspended.
239 248
240Sometimes it turns out that even when a device does work okay with 249Sometimes it turns out that even when a device does work okay with
241autosuspend there are still problems. For example, there are 250autosuspend there are still problems. For example, the usbhid driver,
242experimental patches adding autosuspend support to the usbhid driver, 251which manages keyboards and mice, has autosuspend support. Tests with
243which manages keyboards and mice, among other things. Tests with a 252a number of keyboards show that typing on a suspended keyboard, while
244number of keyboards showed that typing on a suspended keyboard, while 253causing the keyboard to do a remote wakeup all right, will nonetheless
245causing the keyboard to do a remote wakeup all right, would 254frequently result in lost keystrokes. Tests with mice show that some
246nonetheless frequently result in lost keystrokes. Tests with mice 255of them will issue a remote-wakeup request in response to button
247showed that some of them would issue a remote-wakeup request in 256presses but not to motion, and some in response to neither.
248response to button presses but not to motion, and some in response to
249neither.
250 257
251The kernel will not prevent you from enabling autosuspend on devices 258The kernel will not prevent you from enabling autosuspend on devices
252that can't handle it. It is even possible in theory to damage a 259that can't handle it. It is even possible in theory to damage a
253device by suspending it at the wrong time -- for example, suspending a 260device by suspending it at the wrong time. (Highly unlikely, but
254USB hard disk might cause it to spin down without parking the heads. 261possible.) Take care.
255(Highly unlikely, but possible.) Take care.
256 262
257 263
258 The driver interface for Power Management 264 The driver interface for Power Management
@@ -336,10 +342,6 @@ autosuspend the interface's device. When the usage counter is = 0
336then the interface is considered to be idle, and the kernel may 342then the interface is considered to be idle, and the kernel may
337autosuspend the device. 343autosuspend the device.
338 344
339(There is a similar usage counter field in struct usb_device,
340associated with the device itself rather than any of its interfaces.
341This counter is used only by the USB core.)
342
343Drivers need not be concerned about balancing changes to the usage 345Drivers need not be concerned about balancing changes to the usage
344counter; the USB core will undo any remaining "get"s when a driver 346counter; the USB core will undo any remaining "get"s when a driver
345is unbound from its interface. As a corollary, drivers must not call 347is unbound from its interface. As a corollary, drivers must not call
@@ -409,11 +411,11 @@ during autosuspend. For example, there's not much point
409autosuspending a keyboard if the user can't cause the keyboard to do a 411autosuspending a keyboard if the user can't cause the keyboard to do a
410remote wakeup by typing on it. If the driver sets 412remote wakeup by typing on it. If the driver sets
411intf->needs_remote_wakeup to 1, the kernel won't autosuspend the 413intf->needs_remote_wakeup to 1, the kernel won't autosuspend the
412device if remote wakeup isn't available or has been disabled through 414device if remote wakeup isn't available. (If the device is already
413the power/wakeup attribute. (If the device is already autosuspended, 415autosuspended, though, setting this flag won't cause the kernel to
414though, setting this flag won't cause the kernel to autoresume it. 416autoresume it. Normally a driver would set this flag in its probe
415Normally a driver would set this flag in its probe method, at which 417method, at which time the device is guaranteed not to be
416time the device is guaranteed not to be autosuspended.) 418autosuspended.)
417 419
418If a driver does its I/O asynchronously in interrupt context, it 420If a driver does its I/O asynchronously in interrupt context, it
419should call usb_autopm_get_interface_async() before starting output and 421should call usb_autopm_get_interface_async() before starting output and
@@ -422,20 +424,19 @@ it receives an input event, it should call
422 424
423 usb_mark_last_busy(struct usb_device *udev); 425 usb_mark_last_busy(struct usb_device *udev);
424 426
425in the event handler. This sets udev->last_busy to the current time. 427in the event handler. This tells the PM core that the device was just
426udev->last_busy is the field used for idle-delay calculations; 428busy and therefore the next autosuspend idle-delay expiration should
427updating it will cause any pending autosuspend to be moved back. Most 429be pushed back. Many of the usb_autopm_* routines also make this call,
428of the usb_autopm_* routines will also set the last_busy field to the 430so drivers need to worry only when interrupt-driven input arrives.
429current time.
430 431
431Asynchronous operation is always subject to races. For example, a 432Asynchronous operation is always subject to races. For example, a
432driver may call one of the usb_autopm_*_interface_async() routines at 433driver may call the usb_autopm_get_interface_async() routine at a time
433a time when the core has just finished deciding the device has been 434when the core has just finished deciding the device has been idle for
434idle for long enough but not yet gotten around to calling the driver's 435long enough but not yet gotten around to calling the driver's suspend
435suspend method. The suspend method must be responsible for 436method. The suspend method must be responsible for synchronizing with
436synchronizing with the output request routine and the URB completion 437the I/O request routine and the URB completion handler; it should
437handler; it should cause autosuspends to fail with -EBUSY if the 438cause autosuspends to fail with -EBUSY if the driver needs to use the
438driver needs to use the device. 439device.
439 440
440External suspend calls should never be allowed to fail in this way, 441External suspend calls should never be allowed to fail in this way,
441only autosuspend calls. The driver can tell them apart by checking 442only autosuspend calls. The driver can tell them apart by checking
@@ -472,7 +473,9 @@ Firstly, a device may already be autosuspended when a system suspend
472occurs. Since system suspends are supposed to be as transparent as 473occurs. Since system suspends are supposed to be as transparent as
473possible, the device should remain suspended following the system 474possible, the device should remain suspended following the system
474resume. But this theory may not work out well in practice; over time 475resume. But this theory may not work out well in practice; over time
475the kernel's behavior in this regard has changed. 476the kernel's behavior in this regard has changed. As of 2.6.37 the
477policy is to resume all devices during a system resume and let them
478handle their own runtime suspends afterward.
476 479
477Secondly, a dynamic power-management event may occur as a system 480Secondly, a dynamic power-management event may occur as a system
478suspend is underway. The window for this is short, since system 481suspend is underway. The window for this is short, since system
diff --git a/Documentation/video4linux/CARDLIST.em28xx b/Documentation/video4linux/CARDLIST.em28xx
index ac2616a62fc3..31b485723bc5 100644
--- a/Documentation/video4linux/CARDLIST.em28xx
+++ b/Documentation/video4linux/CARDLIST.em28xx
@@ -1,5 +1,5 @@
1 0 -> Unknown EM2800 video grabber (em2800) [eb1a:2800] 1 0 -> Unknown EM2800 video grabber (em2800) [eb1a:2800]
2 1 -> Unknown EM2750/28xx video grabber (em2820/em2840) [eb1a:2710,eb1a:2820,eb1a:2821,eb1a:2860,eb1a:2861,eb1a:2862,eb1a:2863,eb1a:2870,eb1a:2881,eb1a:2883,eb1a:2868] 2 1 -> Unknown EM2750/28xx video grabber (em2820/em2840) [eb1a:2710,eb1a:2820,eb1a:2821,eb1a:2860,eb1a:2861,eb1a:2862,eb1a:2863,eb1a:2870,eb1a:2881,eb1a:2883,eb1a:2868,eb1a:2875]
3 2 -> Terratec Cinergy 250 USB (em2820/em2840) [0ccd:0036] 3 2 -> Terratec Cinergy 250 USB (em2820/em2840) [0ccd:0036]
4 3 -> Pinnacle PCTV USB 2 (em2820/em2840) [2304:0208] 4 3 -> Pinnacle PCTV USB 2 (em2820/em2840) [2304:0208]
5 4 -> Hauppauge WinTV USB 2 (em2820/em2840) [2040:4200,2040:4201] 5 4 -> Hauppauge WinTV USB 2 (em2820/em2840) [2040:4200,2040:4201]
@@ -9,7 +9,7 @@
9 8 -> Kworld USB2800 (em2800) 9 8 -> Kworld USB2800 (em2800)
10 9 -> Pinnacle Dazzle DVC 90/100/101/107 / Kaiser Baas Video to DVD maker (em2820/em2840) [1b80:e302,1b80:e304,2304:0207,2304:021a] 10 9 -> Pinnacle Dazzle DVC 90/100/101/107 / Kaiser Baas Video to DVD maker (em2820/em2840) [1b80:e302,1b80:e304,2304:0207,2304:021a]
11 10 -> Hauppauge WinTV HVR 900 (em2880) [2040:6500] 11 10 -> Hauppauge WinTV HVR 900 (em2880) [2040:6500]
12 11 -> Terratec Hybrid XS (em2880) [0ccd:0042] 12 11 -> Terratec Hybrid XS (em2880)
13 12 -> Kworld PVR TV 2800 RF (em2820/em2840) 13 12 -> Kworld PVR TV 2800 RF (em2820/em2840)
14 13 -> Terratec Prodigy XS (em2880) [0ccd:0047] 14 13 -> Terratec Prodigy XS (em2880) [0ccd:0047]
15 14 -> SIIG AVTuner-PVR / Pixelview Prolink PlayTV USB 2.0 (em2820/em2840) 15 14 -> SIIG AVTuner-PVR / Pixelview Prolink PlayTV USB 2.0 (em2820/em2840)
@@ -53,7 +53,7 @@
53 52 -> DNT DA2 Hybrid (em2881) 53 52 -> DNT DA2 Hybrid (em2881)
54 53 -> Pinnacle Hybrid Pro (em2881) 54 53 -> Pinnacle Hybrid Pro (em2881)
55 54 -> Kworld VS-DVB-T 323UR (em2882) [eb1a:e323] 55 54 -> Kworld VS-DVB-T 323UR (em2882) [eb1a:e323]
56 55 -> Terratec Hybrid XS (em2882) (em2882) [0ccd:005e] 56 55 -> Terratec Cinnergy Hybrid T USB XS (em2882) (em2882) [0ccd:005e,0ccd:0042]
57 56 -> Pinnacle Hybrid Pro (2) (em2882) [2304:0226] 57 56 -> Pinnacle Hybrid Pro (2) (em2882) [2304:0226]
58 57 -> Kworld PlusTV HD Hybrid 330 (em2883) [eb1a:a316] 58 57 -> Kworld PlusTV HD Hybrid 330 (em2883) [eb1a:a316]
59 58 -> Compro VideoMate ForYou/Stereo (em2820/em2840) [185b:2041] 59 58 -> Compro VideoMate ForYou/Stereo (em2820/em2840) [185b:2041]
diff --git a/Documentation/video4linux/CARDLIST.saa7134 b/Documentation/video4linux/CARDLIST.saa7134
index 8d9afc7d8014..6b4c72d8862d 100644
--- a/Documentation/video4linux/CARDLIST.saa7134
+++ b/Documentation/video4linux/CARDLIST.saa7134
@@ -180,3 +180,5 @@
180179 -> Beholder BeholdTV A7 [5ace:7090] 180179 -> Beholder BeholdTV A7 [5ace:7090]
181180 -> Avermedia PCI M733A [1461:4155,1461:4255] 181180 -> Avermedia PCI M733A [1461:4155,1461:4255]
182181 -> TechoTrend TT-budget T-3000 [13c2:2804] 182181 -> TechoTrend TT-budget T-3000 [13c2:2804]
183182 -> Kworld PCI SBTVD/ISDB-T Full-Seg Hybrid [17de:b136]
184183 -> Compro VideoMate Vista M1F [185b:c900]
diff --git a/Documentation/video4linux/Makefile b/Documentation/video4linux/Makefile
deleted file mode 100644
index 1ed0e98d057d..000000000000
--- a/Documentation/video4linux/Makefile
+++ /dev/null
@@ -1,8 +0,0 @@
1# kbuild trick to avoid linker error. Can be omitted if a module is built.
2obj- := dummy.o
3
4# List of programs to build
5hostprogs-y := v4lgrab
6
7# Tell kbuild to always build the programs
8always := $(hostprogs-y)
diff --git a/Documentation/video4linux/README.cpia b/Documentation/video4linux/README.cpia
deleted file mode 100644
index 8a747fee661f..000000000000
--- a/Documentation/video4linux/README.cpia
+++ /dev/null
@@ -1,191 +0,0 @@
1This is a driver for the CPiA PPC2 driven parallel connected
2Camera. For example the Creative WebcamII is CPiA driven.
3
4 ) [1]Peter Pregler, Linz 2000, published under the [2]GNU GPL
5
6---------------------------------------------------------------------------
7
8USAGE:
9
10General:
11========
12
131) Make sure you have created the video devices (/dev/video*):
14
15- if you have a recent MAKEDEV do a 'cd /dev;./MAKEDEV video'
16- otherwise do a:
17
18cd /dev
19mknod video0 c 81 0
20ln -s video0 video
21
222) Compile the kernel (see below for the list of options to use),
23 configure your parport and reboot.
24
253) If all worked well you should get messages similar
26 to the following (your versions may be different) on the console:
27
28V4L-Driver for Vision CPiA based cameras v0.7.4
29parport0: read2 timeout.
30parport0: Multimedia device, VLSI Vision Ltd PPC2
31Parallel port driver for Vision CPiA based camera
32 CPIA Version: 1.20 (2.0)
33 CPIA PnP-ID: 0553:0002:0100
34 VP-Version: 1.0 0100
35 1 camera(s) found
36
37
38As modules:
39===========
40
41Make sure you have selected the following kernel options (you can
42select all stuff as modules):
43
44The cpia-stuff is in the section 'Character devices -> Video For Linux'.
45
46CONFIG_PARPORT=m
47CONFIG_PARPORT_PC=m
48CONFIG_PARPORT_PC_FIFO=y
49CONFIG_PARPORT_1284=y
50CONFIG_VIDEO_DEV=m
51CONFIG_VIDEO_CPIA=m
52CONFIG_VIDEO_CPIA_PP=m
53
54For autoloading of all those modules you need to tell module-init-tools
55some stuff. Add the following line to your module-init-tools config-file
56(e.g. /etc/modprobe.conf or wherever your distribution does store that
57stuff):
58
59options parport_pc io=0x378 irq=7 dma=3
60alias char-major-81 cpia_pp
61
62The first line tells the dma/irq channels to use. Those _must_ match
63the settings of your BIOS. Do NOT simply use the values above. See
64Documentation/parport.txt for more information about this. The second
65line associates the video-device file with the driver. Of cause you
66can also load the modules once upon boot (usually done in /etc/modules).
67
68Linked into the kernel:
69=======================
70
71Make sure you have selected the following kernel options. Note that
72you cannot compile the parport-stuff as modules and the cpia-driver
73statically (the other way round is okay though).
74
75The cpia-stuff is in the section 'Character devices -> Video For Linux'.
76
77CONFIG_PARPORT=y
78CONFIG_PARPORT_PC=y
79CONFIG_PARPORT_PC_FIFO=y
80CONFIG_PARPORT_1284=y
81CONFIG_VIDEO_DEV=y
82CONFIG_VIDEO_CPIA=y
83CONFIG_VIDEO_CPIA_PP=y
84
85To use DMA/irq you will need to tell the kernel upon boot time the
86hardware configuration of the parport. You can give the boot-parameter
87at the LILO-prompt or specify it in lilo.conf. I use the following
88append-line in lilo.conf:
89
90 append="parport=0x378,7,3"
91
92See Documentation/parport.txt for more information about the
93configuration of the parport and the values given above. Do not simply
94use the values given above.
95
96---------------------------------------------------------------------------
97FEATURES:
98
99- mmap/read v4l-interface (but no overlay)
100- image formats: CIF/QCIF, SIF/QSIF, various others used by isabel;
101 note: all sizes except CIF/QCIF are implemented by clipping, i.e.
102 pixels are not uploaded from the camera
103- palettes: VIDEO_PALETTE_GRAY, VIDEO_PALETTE_RGB565, VIDEO_PALETTE_RGB555,
104 VIDEO_PALETTE_RGB24, VIDEO_PALETTE_RGB32, VIDEO_PALETTE_YUYV,
105 VIDEO_PALETTE_UYVY, VIDEO_PALETTE_YUV422
106- state information (color balance, exposure, ...) is preserved between
107 device opens
108- complete control over camera via proc-interface (_all_ camera settings are
109 supported), there is also a python-gtk application available for this [3]
110- works under SMP (but the driver is completely serialized and synchronous)
111 so you get no benefit from SMP, but at least it does not crash your box
112- might work for non-Intel architecture, let us know about this
113
114---------------------------------------------------------------------------
115TESTED APPLICATIONS:
116
117- a simple test application based on Xt is available at [3]
118- another test-application based on gqcam-0.4 (uses GTK)
119- gqcam-0.6 should work
120- xawtv-3.x (also the webcam software)
121- xawtv-2.46
122- w3cam (cgi-interface and vidcat, e.g. you may try out 'vidcat |xv
123 -maxpect -root -quit +noresetroot -rmode 5 -')
124- vic, the MBONE video conferencing tool (version 2.8ucl4-1)
125- isabel 3R4beta (barely working, but AFAICT all the problems are on
126 their side)
127- camserv-0.40
128
129See [3] for pointers to v4l-applications.
130
131---------------------------------------------------------------------------
132KNOWN PROBLEMS:
133
134- some applications do not handle the image format correctly, you will
135 see strange horizontal stripes instead of a nice picture -> make sure
136 your application does use a supported image size or queries the driver
137 for the actually used size (reason behind this: the camera cannot
138 provide any image format, so if size NxM is requested the driver will
139 use a format to the closest fitting N1xM1, the application should now
140 query for this granted size, most applications do not).
141- all the todo ;)
142- if there is not enough light and the picture is too dark try to
143 adjust the SetSensorFPS setting, automatic frame rate adjustment
144 has its price
145- do not try out isabel 3R4beta (built 135), you will be disappointed
146
147---------------------------------------------------------------------------
148TODO:
149
150- multiple camera support (struct camera or something) - This should work,
151 but hasn't been tested yet.
152- architecture independence?
153- SMP-safe asynchronous mmap interface
154- nibble mode for old parport interfaces
155- streaming capture, this should give a performance gain
156
157---------------------------------------------------------------------------
158IMPLEMENTATION NOTES:
159
160The camera can act in two modes, streaming or grabbing. Right now a
161polling grab-scheme is used. Maybe interrupt driven streaming will be
162used for a asynchronous mmap interface in the next major release of the
163driver. This might give a better frame rate.
164
165---------------------------------------------------------------------------
166THANKS (in no particular order):
167
168- Scott J. Bertin <sbertin@mindspring.com> for cleanups, the proc-filesystem
169 and much more
170- Henry Bruce <whb@vvl.co.uk> for providing developers information about
171 the CPiA chip, I wish all companies would treat Linux as seriously
172- Karoly Erdei <Karoly.Erdei@risc.uni-linz.ac.at> and RISC-Linz for being
173 my boss ;) resp. my employer and for providing me the hardware and
174 allow me to devote some working time to this project
175- Manuel J. Petit de Gabriel <mpetit@dit.upm.es> for providing help
176 with Isabel (http://isabel.dit.upm.es/)
177- Bas Huisman <bhuism@cs.utwente.nl> for writing the initial parport code
178- Jarl Totland <Jarl.Totland@bdc.no> for setting up the mailing list
179 and maintaining the web-server[3]
180- Chris Whiteford <Chris@informinteractive.com> for fixes related to the
181 1.02 firmware
182- special kudos to all the tester whose machines crashed and/or
183 will crash. :)
184
185---------------------------------------------------------------------------
186REFERENCES
187
188 1. http://www.risc.uni-linz.ac.at/
189 mailto:Peter_Pregler@email.com
190 2. see the file COPYING in the top directory of the kernel tree
191 3. http://webcam.sourceforge.net/
diff --git a/Documentation/video4linux/Zoran b/Documentation/video4linux/Zoran
index 00e3f9267814..699b60e070d2 100644
--- a/Documentation/video4linux/Zoran
+++ b/Documentation/video4linux/Zoran
@@ -322,76 +322,11 @@ your IRQs and make sure the card has its own interrupts.
322 322
3234. Programming interface 3234. Programming interface
324 324
325This driver conforms to video4linux and video4linux2, both can be used to 325This driver conforms to video4linux2. Support for V4L1 and for the custom
326use the driver. Since video4linux didn't provide adequate calls to fully 326zoran ioctls has been removed in kernel 2.6.38.
327use the cards' features, we've introduced several programming extensions,
328which are currently officially accepted in the 2.4.x branch of the kernel.
329These extensions are known as the v4l/mjpeg extensions. See zoran.h for
330details (structs/ioctls).
331
332Information - video4linux:
333http://linux.bytesex.org/v4l2/API.html
334Documentation/video4linux/API.html
335/usr/include/linux/videodev.h
336
337Information - video4linux/mjpeg extensions:
338./zoran.h
339(also see below)
340
341Information - video4linux2:
342http://linuxtv.org
343http://v4l2spec.bytesex.org/
344/usr/include/linux/videodev2.h
345
346More information on the video4linux/mjpeg extensions, by Serguei
347Miridonovi and Rainer Johanni:
348--
349The ioctls for that interface are as follows:
350
351BUZIOC_G_PARAMS
352BUZIOC_S_PARAMS
353
354Get and set the parameters of the buz. The user should always do a
355BUZIOC_G_PARAMS (with a struct buz_params) to obtain the default
356settings, change what he likes and then make a BUZIOC_S_PARAMS call.
357
358BUZIOC_REQBUFS
359
360Before being able to capture/playback, the user has to request
361the buffers he is wanting to use. Fill the structure
362zoran_requestbuffers with the size (recommended: 256*1024) and
363the number (recommended 32 up to 256). There are no such restrictions
364as for the Video for Linux buffers, you should LEAVE SUFFICIENT
365MEMORY for your system however, else strange things will happen ....
366On return, the zoran_requestbuffers structure contains number and
367size of the actually allocated buffers.
368You should use these numbers for doing a mmap of the buffers
369into the user space.
370The BUZIOC_REQBUFS ioctl also makes it happen, that the next mmap
371maps the MJPEG buffer instead of the V4L buffers.
372
373BUZIOC_QBUF_CAPT
374BUZIOC_QBUF_PLAY
375
376Queue a buffer for capture or playback. The first call also starts
377streaming capture. When streaming capture is going on, you may
378only queue further buffers or issue syncs until streaming
379capture is switched off again with a argument of -1 to
380a BUZIOC_QBUF_CAPT/BUZIOC_QBUF_PLAY ioctl.
381
382BUZIOC_SYNC
383
384Issue this ioctl when all buffers are queued. This ioctl will
385block until the first buffer becomes free for saving its
386data to disk (after BUZIOC_QBUF_CAPT) or for reuse (after BUZIOC_QBUF_PLAY).
387
388BUZIOC_G_STATUS
389
390Get the status of the input lines (video source connected/norm).
391 327
392For programming example, please, look at lavrec.c and lavplay.c code in 328For programming example, please, look at lavrec.c and lavplay.c code in
393lavtools-1.2p2 package (URL: http://www.cicese.mx/) 329the MJPEG-tools (http://mjpeg.sf.net/).
394and the 'examples' directory in the original Buz driver distribution.
395 330
396Additional notes for software developers: 331Additional notes for software developers:
397 332
@@ -402,9 +337,6 @@ Additional notes for software developers:
402 standard is "more constant" for current country than geometry 337 standard is "more constant" for current country than geometry
403 settings of a variety of TV capture cards which may work in ITU or 338 settings of a variety of TV capture cards which may work in ITU or
404 square pixel format. 339 square pixel format.
405--
406Please note that lavplay/lavrec are also included in the MJPEG-tools
407(http://mjpeg.sf.net/).
408 340
409=========================== 341===========================
410 342
diff --git a/Documentation/video4linux/bttv/Cards b/Documentation/video4linux/bttv/Cards
index 12217fc49725..db833ced2cb8 100644
--- a/Documentation/video4linux/bttv/Cards
+++ b/Documentation/video4linux/bttv/Cards
@@ -464,10 +464,6 @@ Siemens
464------- 464-------
465 Multimedia eXtension Board (MXB) (SAA7146, SAA7111) 465 Multimedia eXtension Board (MXB) (SAA7146, SAA7111)
466 466
467Stradis
468-------
469 SDM275,SDM250,SDM026,SDM025 (SAA7146, IBMMPEG2): MPEG2 decoder only
470
471Powercolor 467Powercolor
472---------- 468----------
473 MTV878 469 MTV878
diff --git a/Documentation/video4linux/gspca.txt b/Documentation/video4linux/gspca.txt
index 6a562eeeb4cd..261776e0c5e1 100644
--- a/Documentation/video4linux/gspca.txt
+++ b/Documentation/video4linux/gspca.txt
@@ -366,6 +366,7 @@ t613 17a1:0128 TASCORP JPEG Webcam, NGS Cyclops
366vc032x 17ef:4802 Lenovo Vc0323+MI1310_SOC 366vc032x 17ef:4802 Lenovo Vc0323+MI1310_SOC
367pac207 2001:f115 D-Link DSB-C120 367pac207 2001:f115 D-Link DSB-C120
368sq905c 2770:9050 Disney pix micro (CIF) 368sq905c 2770:9050 Disney pix micro (CIF)
369sq905c 2770:9051 Lego Bionicle
369sq905c 2770:9052 Disney pix micro 2 (VGA) 370sq905c 2770:9052 Disney pix micro 2 (VGA)
370sq905c 2770:905c All 11 known cameras with this ID 371sq905c 2770:905c All 11 known cameras with this ID
371sq905 2770:9120 All 24 known cameras with this ID 372sq905 2770:9120 All 24 known cameras with this ID
diff --git a/Documentation/video4linux/meye.txt b/Documentation/video4linux/meye.txt
index bf3af5fe558f..34e2842c70ae 100644
--- a/Documentation/video4linux/meye.txt
+++ b/Documentation/video4linux/meye.txt
@@ -45,8 +45,6 @@ module argument syntax (<param>=<value> when passing the option to the
45module or meye.<param>=<value> on the kernel boot line when meye is 45module or meye.<param>=<value> on the kernel boot line when meye is
46statically linked into the kernel). Those options are: 46statically linked into the kernel). Those options are:
47 47
48 forcev4l1: force use of V4L1 API instead of V4L2
49
50 gbuffers: number of capture buffers, default is 2 (32 max) 48 gbuffers: number of capture buffers, default is 2 (32 max)
51 49
52 gbufsize: size of each capture buffer, default is 614400 50 gbufsize: size of each capture buffer, default is 614400
@@ -79,9 +77,8 @@ Usage:
79Private API: 77Private API:
80------------ 78------------
81 79
82 The driver supports frame grabbing with the video4linux API 80 The driver supports frame grabbing with the video4linux API,
83 (either v4l1 or v4l2), so all video4linux tools (like xawtv) 81 so all video4linux tools (like xawtv) should work with this driver.
84 should work with this driver.
85 82
86 Besides the video4linux interface, the driver has a private interface 83 Besides the video4linux interface, the driver has a private interface
87 for accessing the Motion Eye extended parameters (camera sharpness, 84 for accessing the Motion Eye extended parameters (camera sharpness,
@@ -123,7 +120,4 @@ Private API:
123Bugs / Todo: 120Bugs / Todo:
124------------ 121------------
125 122
126 - the driver could be much cleaned up by removing the v4l1 support.
127 However, this means all v4l1-only applications will stop working.
128
129 - 'motioneye' still uses the meye private v4l1 API extensions. 123 - 'motioneye' still uses the meye private v4l1 API extensions.
diff --git a/Documentation/video4linux/v4lgrab.c b/Documentation/video4linux/v4lgrab.c
deleted file mode 100644
index c8ded175796e..000000000000
--- a/Documentation/video4linux/v4lgrab.c
+++ /dev/null
@@ -1,201 +0,0 @@
1/* Simple Video4Linux image grabber. */
2/*
3 * Video4Linux Driver Test/Example Framegrabbing Program
4 *
5 * Compile with:
6 * gcc -s -Wall -Wstrict-prototypes v4lgrab.c -o v4lgrab
7 * Use as:
8 * v4lgrab >image.ppm
9 *
10 * Copyright (C) 1998-05-03, Phil Blundell <philb@gnu.org>
11 * Copied from http://www.tazenda.demon.co.uk/phil/vgrabber.c
12 * with minor modifications (Dave Forrest, drf5n@virginia.edu).
13 *
14 *
15 * For some cameras you may need to pre-load libv4l to perform
16 * the necessary decompression, e.g.:
17 *
18 * export LD_PRELOAD=/usr/lib/libv4l/v4l1compat.so
19 * ./v4lgrab >image.ppm
20 *
21 * see http://hansdegoede.livejournal.com/3636.html for details.
22 *
23 */
24
25#include <unistd.h>
26#include <sys/types.h>
27#include <sys/stat.h>
28#include <fcntl.h>
29#include <stdio.h>
30#include <sys/ioctl.h>
31#include <stdlib.h>
32
33#include <linux/types.h>
34#include <linux/videodev.h>
35
36#define VIDEO_DEV "/dev/video0"
37
38/* Stole this from tvset.c */
39
40#define READ_VIDEO_PIXEL(buf, format, depth, r, g, b) \
41{ \
42 switch (format) \
43 { \
44 case VIDEO_PALETTE_GREY: \
45 switch (depth) \
46 { \
47 case 4: \
48 case 6: \
49 case 8: \
50 (r) = (g) = (b) = (*buf++ << 8);\
51 break; \
52 \
53 case 16: \
54 (r) = (g) = (b) = \
55 *((unsigned short *) buf); \
56 buf += 2; \
57 break; \
58 } \
59 break; \
60 \
61 \
62 case VIDEO_PALETTE_RGB565: \
63 { \
64 unsigned short tmp = *(unsigned short *)buf; \
65 (r) = tmp&0xF800; \
66 (g) = (tmp<<5)&0xFC00; \
67 (b) = (tmp<<11)&0xF800; \
68 buf += 2; \
69 } \
70 break; \
71 \
72 case VIDEO_PALETTE_RGB555: \
73 (r) = (buf[0]&0xF8)<<8; \
74 (g) = ((buf[0] << 5 | buf[1] >> 3)&0xF8)<<8; \
75 (b) = ((buf[1] << 2 ) & 0xF8)<<8; \
76 buf += 2; \
77 break; \
78 \
79 case VIDEO_PALETTE_RGB24: \
80 (r) = buf[0] << 8; (g) = buf[1] << 8; \
81 (b) = buf[2] << 8; \
82 buf += 3; \
83 break; \
84 \
85 default: \
86 fprintf(stderr, \
87 "Format %d not yet supported\n", \
88 format); \
89 } \
90}
91
92static int get_brightness_adj(unsigned char *image, long size, int *brightness) {
93 long i, tot = 0;
94 for (i=0;i<size*3;i++)
95 tot += image[i];
96 *brightness = (128 - tot/(size*3))/3;
97 return !((tot/(size*3)) >= 126 && (tot/(size*3)) <= 130);
98}
99
100int main(int argc, char ** argv)
101{
102 int fd = open(VIDEO_DEV, O_RDONLY), f;
103 struct video_capability cap;
104 struct video_window win;
105 struct video_picture vpic;
106
107 unsigned char *buffer, *src;
108 int bpp = 24, r = 0, g = 0, b = 0;
109 unsigned int i, src_depth = 16;
110
111 if (fd < 0) {
112 perror(VIDEO_DEV);
113 exit(1);
114 }
115
116 if (ioctl(fd, VIDIOCGCAP, &cap) < 0) {
117 perror("VIDIOGCAP");
118 fprintf(stderr, "(" VIDEO_DEV " not a video4linux device?)\n");
119 close(fd);
120 exit(1);
121 }
122
123 if (ioctl(fd, VIDIOCGWIN, &win) < 0) {
124 perror("VIDIOCGWIN");
125 close(fd);
126 exit(1);
127 }
128
129 if (ioctl(fd, VIDIOCGPICT, &vpic) < 0) {
130 perror("VIDIOCGPICT");
131 close(fd);
132 exit(1);
133 }
134
135 if (cap.type & VID_TYPE_MONOCHROME) {
136 vpic.depth=8;
137 vpic.palette=VIDEO_PALETTE_GREY; /* 8bit grey */
138 if(ioctl(fd, VIDIOCSPICT, &vpic) < 0) {
139 vpic.depth=6;
140 if(ioctl(fd, VIDIOCSPICT, &vpic) < 0) {
141 vpic.depth=4;
142 if(ioctl(fd, VIDIOCSPICT, &vpic) < 0) {
143 fprintf(stderr, "Unable to find a supported capture format.\n");
144 close(fd);
145 exit(1);
146 }
147 }
148 }
149 } else {
150 vpic.depth=24;
151 vpic.palette=VIDEO_PALETTE_RGB24;
152
153 if(ioctl(fd, VIDIOCSPICT, &vpic) < 0) {
154 vpic.palette=VIDEO_PALETTE_RGB565;
155 vpic.depth=16;
156
157 if(ioctl(fd, VIDIOCSPICT, &vpic)==-1) {
158 vpic.palette=VIDEO_PALETTE_RGB555;
159 vpic.depth=15;
160
161 if(ioctl(fd, VIDIOCSPICT, &vpic)==-1) {
162 fprintf(stderr, "Unable to find a supported capture format.\n");
163 return -1;
164 }
165 }
166 }
167 }
168
169 buffer = malloc(win.width * win.height * bpp);
170 if (!buffer) {
171 fprintf(stderr, "Out of memory.\n");
172 exit(1);
173 }
174
175 do {
176 int newbright;
177 read(fd, buffer, win.width * win.height * bpp);
178 f = get_brightness_adj(buffer, win.width * win.height, &newbright);
179 if (f) {
180 vpic.brightness += (newbright << 8);
181 if(ioctl(fd, VIDIOCSPICT, &vpic)==-1) {
182 perror("VIDIOSPICT");
183 break;
184 }
185 }
186 } while (f);
187
188 fprintf(stdout, "P6\n%d %d 255\n", win.width, win.height);
189
190 src = buffer;
191
192 for (i = 0; i < win.width * win.height; i++) {
193 READ_VIDEO_PIXEL(src, vpic.palette, src_depth, r, g, b);
194 fputc(r>>8, stdout);
195 fputc(g>>8, stdout);
196 fputc(b>>8, stdout);
197 }
198
199 close(fd);
200 return 0;
201}
diff --git a/Documentation/video4linux/videobuf b/Documentation/video4linux/videobuf
index 17a1f9abf260..1d00d7f15b8f 100644
--- a/Documentation/video4linux/videobuf
+++ b/Documentation/video4linux/videobuf
@@ -247,8 +247,6 @@ calls. The relevant helper functions are:
247 int nonblocking); 247 int nonblocking);
248 int videobuf_streamon(struct videobuf_queue *q); 248 int videobuf_streamon(struct videobuf_queue *q);
249 int videobuf_streamoff(struct videobuf_queue *q); 249 int videobuf_streamoff(struct videobuf_queue *q);
250 int videobuf_cgmbuf(struct videobuf_queue *q, struct video_mbuf *mbuf,
251 int count);
252 250
253So, for example, a VIDIOC_REQBUFS call turns into a call to the driver's 251So, for example, a VIDIOC_REQBUFS call turns into a call to the driver's
254vidioc_reqbufs() callback which, in turn, usually only needs to locate the 252vidioc_reqbufs() callback which, in turn, usually only needs to locate the
@@ -258,10 +256,7 @@ boilerplate in a lot of V4L2 drivers.
258 256
259The vidioc_streamon() and vidioc_streamoff() functions will be a bit more 257The vidioc_streamon() and vidioc_streamoff() functions will be a bit more
260complex, of course, since they will also need to deal with starting and 258complex, of course, since they will also need to deal with starting and
261stopping the capture engine. videobuf_cgmbuf(), called from the driver's 259stopping the capture engine.
262vidiocgmbuf() function, only exists if the V4L1 compatibility module has
263been selected with CONFIG_VIDEO_V4L1_COMPAT, so its use must be surrounded
264with #ifdef directives.
265 260
266Buffer allocation 261Buffer allocation
267 262
diff --git a/Documentation/vm/Makefile b/Documentation/vm/Makefile
index 9dcff328b964..3fa4d0668864 100644
--- a/Documentation/vm/Makefile
+++ b/Documentation/vm/Makefile
@@ -2,7 +2,7 @@
2obj- := dummy.o 2obj- := dummy.o
3 3
4# List of programs to build 4# List of programs to build
5hostprogs-y := slabinfo page-types hugepage-mmap hugepage-shm map_hugetlb 5hostprogs-y := page-types hugepage-mmap hugepage-shm map_hugetlb
6 6
7# Tell kbuild to always build the programs 7# Tell kbuild to always build the programs
8always := $(hostprogs-y) 8always := $(hostprogs-y)
diff --git a/Documentation/vm/slabinfo.c b/Documentation/vm/slabinfo.c
deleted file mode 100644
index 92e729f4b676..000000000000
--- a/Documentation/vm/slabinfo.c
+++ /dev/null
@@ -1,1364 +0,0 @@
1/*
2 * Slabinfo: Tool to get reports about slabs
3 *
4 * (C) 2007 sgi, Christoph Lameter
5 *
6 * Compile by:
7 *
8 * gcc -o slabinfo slabinfo.c
9 */
10#include <stdio.h>
11#include <stdlib.h>
12#include <sys/types.h>
13#include <dirent.h>
14#include <strings.h>
15#include <string.h>
16#include <unistd.h>
17#include <stdarg.h>
18#include <getopt.h>
19#include <regex.h>
20#include <errno.h>
21
22#define MAX_SLABS 500
23#define MAX_ALIASES 500
24#define MAX_NODES 1024
25
26struct slabinfo {
27 char *name;
28 int alias;
29 int refs;
30 int aliases, align, cache_dma, cpu_slabs, destroy_by_rcu;
31 int hwcache_align, object_size, objs_per_slab;
32 int sanity_checks, slab_size, store_user, trace;
33 int order, poison, reclaim_account, red_zone;
34 unsigned long partial, objects, slabs, objects_partial, objects_total;
35 unsigned long alloc_fastpath, alloc_slowpath;
36 unsigned long free_fastpath, free_slowpath;
37 unsigned long free_frozen, free_add_partial, free_remove_partial;
38 unsigned long alloc_from_partial, alloc_slab, free_slab, alloc_refill;
39 unsigned long cpuslab_flush, deactivate_full, deactivate_empty;
40 unsigned long deactivate_to_head, deactivate_to_tail;
41 unsigned long deactivate_remote_frees, order_fallback;
42 int numa[MAX_NODES];
43 int numa_partial[MAX_NODES];
44} slabinfo[MAX_SLABS];
45
46struct aliasinfo {
47 char *name;
48 char *ref;
49 struct slabinfo *slab;
50} aliasinfo[MAX_ALIASES];
51
52int slabs = 0;
53int actual_slabs = 0;
54int aliases = 0;
55int alias_targets = 0;
56int highest_node = 0;
57
58char buffer[4096];
59
60int show_empty = 0;
61int show_report = 0;
62int show_alias = 0;
63int show_slab = 0;
64int skip_zero = 1;
65int show_numa = 0;
66int show_track = 0;
67int show_first_alias = 0;
68int validate = 0;
69int shrink = 0;
70int show_inverted = 0;
71int show_single_ref = 0;
72int show_totals = 0;
73int sort_size = 0;
74int sort_active = 0;
75int set_debug = 0;
76int show_ops = 0;
77int show_activity = 0;
78
79/* Debug options */
80int sanity = 0;
81int redzone = 0;
82int poison = 0;
83int tracking = 0;
84int tracing = 0;
85
86int page_size;
87
88regex_t pattern;
89
90static void fatal(const char *x, ...)
91{
92 va_list ap;
93
94 va_start(ap, x);
95 vfprintf(stderr, x, ap);
96 va_end(ap);
97 exit(EXIT_FAILURE);
98}
99
100static void usage(void)
101{
102 printf("slabinfo 5/7/2007. (c) 2007 sgi.\n\n"
103 "slabinfo [-ahnpvtsz] [-d debugopts] [slab-regexp]\n"
104 "-a|--aliases Show aliases\n"
105 "-A|--activity Most active slabs first\n"
106 "-d<options>|--debug=<options> Set/Clear Debug options\n"
107 "-D|--display-active Switch line format to activity\n"
108 "-e|--empty Show empty slabs\n"
109 "-f|--first-alias Show first alias\n"
110 "-h|--help Show usage information\n"
111 "-i|--inverted Inverted list\n"
112 "-l|--slabs Show slabs\n"
113 "-n|--numa Show NUMA information\n"
114 "-o|--ops Show kmem_cache_ops\n"
115 "-s|--shrink Shrink slabs\n"
116 "-r|--report Detailed report on single slabs\n"
117 "-S|--Size Sort by size\n"
118 "-t|--tracking Show alloc/free information\n"
119 "-T|--Totals Show summary information\n"
120 "-v|--validate Validate slabs\n"
121 "-z|--zero Include empty slabs\n"
122 "-1|--1ref Single reference\n"
123 "\nValid debug options (FZPUT may be combined)\n"
124 "a / A Switch on all debug options (=FZUP)\n"
125 "- Switch off all debug options\n"
126 "f / F Sanity Checks (SLAB_DEBUG_FREE)\n"
127 "z / Z Redzoning\n"
128 "p / P Poisoning\n"
129 "u / U Tracking\n"
130 "t / T Tracing\n"
131 );
132}
133
134static unsigned long read_obj(const char *name)
135{
136 FILE *f = fopen(name, "r");
137
138 if (!f)
139 buffer[0] = 0;
140 else {
141 if (!fgets(buffer, sizeof(buffer), f))
142 buffer[0] = 0;
143 fclose(f);
144 if (buffer[strlen(buffer)] == '\n')
145 buffer[strlen(buffer)] = 0;
146 }
147 return strlen(buffer);
148}
149
150
151/*
152 * Get the contents of an attribute
153 */
154static unsigned long get_obj(const char *name)
155{
156 if (!read_obj(name))
157 return 0;
158
159 return atol(buffer);
160}
161
162static unsigned long get_obj_and_str(const char *name, char **x)
163{
164 unsigned long result = 0;
165 char *p;
166
167 *x = NULL;
168
169 if (!read_obj(name)) {
170 x = NULL;
171 return 0;
172 }
173 result = strtoul(buffer, &p, 10);
174 while (*p == ' ')
175 p++;
176 if (*p)
177 *x = strdup(p);
178 return result;
179}
180
181static void set_obj(struct slabinfo *s, const char *name, int n)
182{
183 char x[100];
184 FILE *f;
185
186 snprintf(x, 100, "%s/%s", s->name, name);
187 f = fopen(x, "w");
188 if (!f)
189 fatal("Cannot write to %s\n", x);
190
191 fprintf(f, "%d\n", n);
192 fclose(f);
193}
194
195static unsigned long read_slab_obj(struct slabinfo *s, const char *name)
196{
197 char x[100];
198 FILE *f;
199 size_t l;
200
201 snprintf(x, 100, "%s/%s", s->name, name);
202 f = fopen(x, "r");
203 if (!f) {
204 buffer[0] = 0;
205 l = 0;
206 } else {
207 l = fread(buffer, 1, sizeof(buffer), f);
208 buffer[l] = 0;
209 fclose(f);
210 }
211 return l;
212}
213
214
215/*
216 * Put a size string together
217 */
218static int store_size(char *buffer, unsigned long value)
219{
220 unsigned long divisor = 1;
221 char trailer = 0;
222 int n;
223
224 if (value > 1000000000UL) {
225 divisor = 100000000UL;
226 trailer = 'G';
227 } else if (value > 1000000UL) {
228 divisor = 100000UL;
229 trailer = 'M';
230 } else if (value > 1000UL) {
231 divisor = 100;
232 trailer = 'K';
233 }
234
235 value /= divisor;
236 n = sprintf(buffer, "%ld",value);
237 if (trailer) {
238 buffer[n] = trailer;
239 n++;
240 buffer[n] = 0;
241 }
242 if (divisor != 1) {
243 memmove(buffer + n - 2, buffer + n - 3, 4);
244 buffer[n-2] = '.';
245 n++;
246 }
247 return n;
248}
249
250static void decode_numa_list(int *numa, char *t)
251{
252 int node;
253 int nr;
254
255 memset(numa, 0, MAX_NODES * sizeof(int));
256
257 if (!t)
258 return;
259
260 while (*t == 'N') {
261 t++;
262 node = strtoul(t, &t, 10);
263 if (*t == '=') {
264 t++;
265 nr = strtoul(t, &t, 10);
266 numa[node] = nr;
267 if (node > highest_node)
268 highest_node = node;
269 }
270 while (*t == ' ')
271 t++;
272 }
273}
274
275static void slab_validate(struct slabinfo *s)
276{
277 if (strcmp(s->name, "*") == 0)
278 return;
279
280 set_obj(s, "validate", 1);
281}
282
283static void slab_shrink(struct slabinfo *s)
284{
285 if (strcmp(s->name, "*") == 0)
286 return;
287
288 set_obj(s, "shrink", 1);
289}
290
291int line = 0;
292
293static void first_line(void)
294{
295 if (show_activity)
296 printf("Name Objects Alloc Free %%Fast Fallb O\n");
297 else
298 printf("Name Objects Objsize Space "
299 "Slabs/Part/Cpu O/S O %%Fr %%Ef Flg\n");
300}
301
302/*
303 * Find the shortest alias of a slab
304 */
305static struct aliasinfo *find_one_alias(struct slabinfo *find)
306{
307 struct aliasinfo *a;
308 struct aliasinfo *best = NULL;
309
310 for(a = aliasinfo;a < aliasinfo + aliases; a++) {
311 if (a->slab == find &&
312 (!best || strlen(best->name) < strlen(a->name))) {
313 best = a;
314 if (strncmp(a->name,"kmall", 5) == 0)
315 return best;
316 }
317 }
318 return best;
319}
320
321static unsigned long slab_size(struct slabinfo *s)
322{
323 return s->slabs * (page_size << s->order);
324}
325
326static unsigned long slab_activity(struct slabinfo *s)
327{
328 return s->alloc_fastpath + s->free_fastpath +
329 s->alloc_slowpath + s->free_slowpath;
330}
331
332static void slab_numa(struct slabinfo *s, int mode)
333{
334 int node;
335
336 if (strcmp(s->name, "*") == 0)
337 return;
338
339 if (!highest_node) {
340 printf("\n%s: No NUMA information available.\n", s->name);
341 return;
342 }
343
344 if (skip_zero && !s->slabs)
345 return;
346
347 if (!line) {
348 printf("\n%-21s:", mode ? "NUMA nodes" : "Slab");
349 for(node = 0; node <= highest_node; node++)
350 printf(" %4d", node);
351 printf("\n----------------------");
352 for(node = 0; node <= highest_node; node++)
353 printf("-----");
354 printf("\n");
355 }
356 printf("%-21s ", mode ? "All slabs" : s->name);
357 for(node = 0; node <= highest_node; node++) {
358 char b[20];
359
360 store_size(b, s->numa[node]);
361 printf(" %4s", b);
362 }
363 printf("\n");
364 if (mode) {
365 printf("%-21s ", "Partial slabs");
366 for(node = 0; node <= highest_node; node++) {
367 char b[20];
368
369 store_size(b, s->numa_partial[node]);
370 printf(" %4s", b);
371 }
372 printf("\n");
373 }
374 line++;
375}
376
377static void show_tracking(struct slabinfo *s)
378{
379 printf("\n%s: Kernel object allocation\n", s->name);
380 printf("-----------------------------------------------------------------------\n");
381 if (read_slab_obj(s, "alloc_calls"))
382 printf(buffer);
383 else
384 printf("No Data\n");
385
386 printf("\n%s: Kernel object freeing\n", s->name);
387 printf("------------------------------------------------------------------------\n");
388 if (read_slab_obj(s, "free_calls"))
389 printf(buffer);
390 else
391 printf("No Data\n");
392
393}
394
395static void ops(struct slabinfo *s)
396{
397 if (strcmp(s->name, "*") == 0)
398 return;
399
400 if (read_slab_obj(s, "ops")) {
401 printf("\n%s: kmem_cache operations\n", s->name);
402 printf("--------------------------------------------\n");
403 printf(buffer);
404 } else
405 printf("\n%s has no kmem_cache operations\n", s->name);
406}
407
408static const char *onoff(int x)
409{
410 if (x)
411 return "On ";
412 return "Off";
413}
414
415static void slab_stats(struct slabinfo *s)
416{
417 unsigned long total_alloc;
418 unsigned long total_free;
419 unsigned long total;
420
421 if (!s->alloc_slab)
422 return;
423
424 total_alloc = s->alloc_fastpath + s->alloc_slowpath;
425 total_free = s->free_fastpath + s->free_slowpath;
426
427 if (!total_alloc)
428 return;
429
430 printf("\n");
431 printf("Slab Perf Counter Alloc Free %%Al %%Fr\n");
432 printf("--------------------------------------------------\n");
433 printf("Fastpath %8lu %8lu %3lu %3lu\n",
434 s->alloc_fastpath, s->free_fastpath,
435 s->alloc_fastpath * 100 / total_alloc,
436 s->free_fastpath * 100 / total_free);
437 printf("Slowpath %8lu %8lu %3lu %3lu\n",
438 total_alloc - s->alloc_fastpath, s->free_slowpath,
439 (total_alloc - s->alloc_fastpath) * 100 / total_alloc,
440 s->free_slowpath * 100 / total_free);
441 printf("Page Alloc %8lu %8lu %3lu %3lu\n",
442 s->alloc_slab, s->free_slab,
443 s->alloc_slab * 100 / total_alloc,
444 s->free_slab * 100 / total_free);
445 printf("Add partial %8lu %8lu %3lu %3lu\n",
446 s->deactivate_to_head + s->deactivate_to_tail,
447 s->free_add_partial,
448 (s->deactivate_to_head + s->deactivate_to_tail) * 100 / total_alloc,
449 s->free_add_partial * 100 / total_free);
450 printf("Remove partial %8lu %8lu %3lu %3lu\n",
451 s->alloc_from_partial, s->free_remove_partial,
452 s->alloc_from_partial * 100 / total_alloc,
453 s->free_remove_partial * 100 / total_free);
454
455 printf("RemoteObj/SlabFrozen %8lu %8lu %3lu %3lu\n",
456 s->deactivate_remote_frees, s->free_frozen,
457 s->deactivate_remote_frees * 100 / total_alloc,
458 s->free_frozen * 100 / total_free);
459
460 printf("Total %8lu %8lu\n\n", total_alloc, total_free);
461
462 if (s->cpuslab_flush)
463 printf("Flushes %8lu\n", s->cpuslab_flush);
464
465 if (s->alloc_refill)
466 printf("Refill %8lu\n", s->alloc_refill);
467
468 total = s->deactivate_full + s->deactivate_empty +
469 s->deactivate_to_head + s->deactivate_to_tail;
470
471 if (total)
472 printf("Deactivate Full=%lu(%lu%%) Empty=%lu(%lu%%) "
473 "ToHead=%lu(%lu%%) ToTail=%lu(%lu%%)\n",
474 s->deactivate_full, (s->deactivate_full * 100) / total,
475 s->deactivate_empty, (s->deactivate_empty * 100) / total,
476 s->deactivate_to_head, (s->deactivate_to_head * 100) / total,
477 s->deactivate_to_tail, (s->deactivate_to_tail * 100) / total);
478}
479
480static void report(struct slabinfo *s)
481{
482 if (strcmp(s->name, "*") == 0)
483 return;
484
485 printf("\nSlabcache: %-20s Aliases: %2d Order : %2d Objects: %lu\n",
486 s->name, s->aliases, s->order, s->objects);
487 if (s->hwcache_align)
488 printf("** Hardware cacheline aligned\n");
489 if (s->cache_dma)
490 printf("** Memory is allocated in a special DMA zone\n");
491 if (s->destroy_by_rcu)
492 printf("** Slabs are destroyed via RCU\n");
493 if (s->reclaim_account)
494 printf("** Reclaim accounting active\n");
495
496 printf("\nSizes (bytes) Slabs Debug Memory\n");
497 printf("------------------------------------------------------------------------\n");
498 printf("Object : %7d Total : %7ld Sanity Checks : %s Total: %7ld\n",
499 s->object_size, s->slabs, onoff(s->sanity_checks),
500 s->slabs * (page_size << s->order));
501 printf("SlabObj: %7d Full : %7ld Redzoning : %s Used : %7ld\n",
502 s->slab_size, s->slabs - s->partial - s->cpu_slabs,
503 onoff(s->red_zone), s->objects * s->object_size);
504 printf("SlabSiz: %7d Partial: %7ld Poisoning : %s Loss : %7ld\n",
505 page_size << s->order, s->partial, onoff(s->poison),
506 s->slabs * (page_size << s->order) - s->objects * s->object_size);
507 printf("Loss : %7d CpuSlab: %7d Tracking : %s Lalig: %7ld\n",
508 s->slab_size - s->object_size, s->cpu_slabs, onoff(s->store_user),
509 (s->slab_size - s->object_size) * s->objects);
510 printf("Align : %7d Objects: %7d Tracing : %s Lpadd: %7ld\n",
511 s->align, s->objs_per_slab, onoff(s->trace),
512 ((page_size << s->order) - s->objs_per_slab * s->slab_size) *
513 s->slabs);
514
515 ops(s);
516 show_tracking(s);
517 slab_numa(s, 1);
518 slab_stats(s);
519}
520
521static void slabcache(struct slabinfo *s)
522{
523 char size_str[20];
524 char dist_str[40];
525 char flags[20];
526 char *p = flags;
527
528 if (strcmp(s->name, "*") == 0)
529 return;
530
531 if (actual_slabs == 1) {
532 report(s);
533 return;
534 }
535
536 if (skip_zero && !show_empty && !s->slabs)
537 return;
538
539 if (show_empty && s->slabs)
540 return;
541
542 store_size(size_str, slab_size(s));
543 snprintf(dist_str, 40, "%lu/%lu/%d", s->slabs - s->cpu_slabs,
544 s->partial, s->cpu_slabs);
545
546 if (!line++)
547 first_line();
548
549 if (s->aliases)
550 *p++ = '*';
551 if (s->cache_dma)
552 *p++ = 'd';
553 if (s->hwcache_align)
554 *p++ = 'A';
555 if (s->poison)
556 *p++ = 'P';
557 if (s->reclaim_account)
558 *p++ = 'a';
559 if (s->red_zone)
560 *p++ = 'Z';
561 if (s->sanity_checks)
562 *p++ = 'F';
563 if (s->store_user)
564 *p++ = 'U';
565 if (s->trace)
566 *p++ = 'T';
567
568 *p = 0;
569 if (show_activity) {
570 unsigned long total_alloc;
571 unsigned long total_free;
572
573 total_alloc = s->alloc_fastpath + s->alloc_slowpath;
574 total_free = s->free_fastpath + s->free_slowpath;
575
576 printf("%-21s %8ld %10ld %10ld %3ld %3ld %5ld %1d\n",
577 s->name, s->objects,
578 total_alloc, total_free,
579 total_alloc ? (s->alloc_fastpath * 100 / total_alloc) : 0,
580 total_free ? (s->free_fastpath * 100 / total_free) : 0,
581 s->order_fallback, s->order);
582 }
583 else
584 printf("%-21s %8ld %7d %8s %14s %4d %1d %3ld %3ld %s\n",
585 s->name, s->objects, s->object_size, size_str, dist_str,
586 s->objs_per_slab, s->order,
587 s->slabs ? (s->partial * 100) / s->slabs : 100,
588 s->slabs ? (s->objects * s->object_size * 100) /
589 (s->slabs * (page_size << s->order)) : 100,
590 flags);
591}
592
593/*
594 * Analyze debug options. Return false if something is amiss.
595 */
596static int debug_opt_scan(char *opt)
597{
598 if (!opt || !opt[0] || strcmp(opt, "-") == 0)
599 return 1;
600
601 if (strcasecmp(opt, "a") == 0) {
602 sanity = 1;
603 poison = 1;
604 redzone = 1;
605 tracking = 1;
606 return 1;
607 }
608
609 for ( ; *opt; opt++)
610 switch (*opt) {
611 case 'F' : case 'f':
612 if (sanity)
613 return 0;
614 sanity = 1;
615 break;
616 case 'P' : case 'p':
617 if (poison)
618 return 0;
619 poison = 1;
620 break;
621
622 case 'Z' : case 'z':
623 if (redzone)
624 return 0;
625 redzone = 1;
626 break;
627
628 case 'U' : case 'u':
629 if (tracking)
630 return 0;
631 tracking = 1;
632 break;
633
634 case 'T' : case 't':
635 if (tracing)
636 return 0;
637 tracing = 1;
638 break;
639 default:
640 return 0;
641 }
642 return 1;
643}
644
645static int slab_empty(struct slabinfo *s)
646{
647 if (s->objects > 0)
648 return 0;
649
650 /*
651 * We may still have slabs even if there are no objects. Shrinking will
652 * remove them.
653 */
654 if (s->slabs != 0)
655 set_obj(s, "shrink", 1);
656
657 return 1;
658}
659
660static void slab_debug(struct slabinfo *s)
661{
662 if (strcmp(s->name, "*") == 0)
663 return;
664
665 if (sanity && !s->sanity_checks) {
666 set_obj(s, "sanity", 1);
667 }
668 if (!sanity && s->sanity_checks) {
669 if (slab_empty(s))
670 set_obj(s, "sanity", 0);
671 else
672 fprintf(stderr, "%s not empty cannot disable sanity checks\n", s->name);
673 }
674 if (redzone && !s->red_zone) {
675 if (slab_empty(s))
676 set_obj(s, "red_zone", 1);
677 else
678 fprintf(stderr, "%s not empty cannot enable redzoning\n", s->name);
679 }
680 if (!redzone && s->red_zone) {
681 if (slab_empty(s))
682 set_obj(s, "red_zone", 0);
683 else
684 fprintf(stderr, "%s not empty cannot disable redzoning\n", s->name);
685 }
686 if (poison && !s->poison) {
687 if (slab_empty(s))
688 set_obj(s, "poison", 1);
689 else
690 fprintf(stderr, "%s not empty cannot enable poisoning\n", s->name);
691 }
692 if (!poison && s->poison) {
693 if (slab_empty(s))
694 set_obj(s, "poison", 0);
695 else
696 fprintf(stderr, "%s not empty cannot disable poisoning\n", s->name);
697 }
698 if (tracking && !s->store_user) {
699 if (slab_empty(s))
700 set_obj(s, "store_user", 1);
701 else
702 fprintf(stderr, "%s not empty cannot enable tracking\n", s->name);
703 }
704 if (!tracking && s->store_user) {
705 if (slab_empty(s))
706 set_obj(s, "store_user", 0);
707 else
708 fprintf(stderr, "%s not empty cannot disable tracking\n", s->name);
709 }
710 if (tracing && !s->trace) {
711 if (slabs == 1)
712 set_obj(s, "trace", 1);
713 else
714 fprintf(stderr, "%s can only enable trace for one slab at a time\n", s->name);
715 }
716 if (!tracing && s->trace)
717 set_obj(s, "trace", 1);
718}
719
720static void totals(void)
721{
722 struct slabinfo *s;
723
724 int used_slabs = 0;
725 char b1[20], b2[20], b3[20], b4[20];
726 unsigned long long max = 1ULL << 63;
727
728 /* Object size */
729 unsigned long long min_objsize = max, max_objsize = 0, avg_objsize;
730
731 /* Number of partial slabs in a slabcache */
732 unsigned long long min_partial = max, max_partial = 0,
733 avg_partial, total_partial = 0;
734
735 /* Number of slabs in a slab cache */
736 unsigned long long min_slabs = max, max_slabs = 0,
737 avg_slabs, total_slabs = 0;
738
739 /* Size of the whole slab */
740 unsigned long long min_size = max, max_size = 0,
741 avg_size, total_size = 0;
742
743 /* Bytes used for object storage in a slab */
744 unsigned long long min_used = max, max_used = 0,
745 avg_used, total_used = 0;
746
747 /* Waste: Bytes used for alignment and padding */
748 unsigned long long min_waste = max, max_waste = 0,
749 avg_waste, total_waste = 0;
750 /* Number of objects in a slab */
751 unsigned long long min_objects = max, max_objects = 0,
752 avg_objects, total_objects = 0;
753 /* Waste per object */
754 unsigned long long min_objwaste = max,
755 max_objwaste = 0, avg_objwaste,
756 total_objwaste = 0;
757
758 /* Memory per object */
759 unsigned long long min_memobj = max,
760 max_memobj = 0, avg_memobj,
761 total_objsize = 0;
762
763 /* Percentage of partial slabs per slab */
764 unsigned long min_ppart = 100, max_ppart = 0,
765 avg_ppart, total_ppart = 0;
766
767 /* Number of objects in partial slabs */
768 unsigned long min_partobj = max, max_partobj = 0,
769 avg_partobj, total_partobj = 0;
770
771 /* Percentage of partial objects of all objects in a slab */
772 unsigned long min_ppartobj = 100, max_ppartobj = 0,
773 avg_ppartobj, total_ppartobj = 0;
774
775
776 for (s = slabinfo; s < slabinfo + slabs; s++) {
777 unsigned long long size;
778 unsigned long used;
779 unsigned long long wasted;
780 unsigned long long objwaste;
781 unsigned long percentage_partial_slabs;
782 unsigned long percentage_partial_objs;
783
784 if (!s->slabs || !s->objects)
785 continue;
786
787 used_slabs++;
788
789 size = slab_size(s);
790 used = s->objects * s->object_size;
791 wasted = size - used;
792 objwaste = s->slab_size - s->object_size;
793
794 percentage_partial_slabs = s->partial * 100 / s->slabs;
795 if (percentage_partial_slabs > 100)
796 percentage_partial_slabs = 100;
797
798 percentage_partial_objs = s->objects_partial * 100
799 / s->objects;
800
801 if (percentage_partial_objs > 100)
802 percentage_partial_objs = 100;
803
804 if (s->object_size < min_objsize)
805 min_objsize = s->object_size;
806 if (s->partial < min_partial)
807 min_partial = s->partial;
808 if (s->slabs < min_slabs)
809 min_slabs = s->slabs;
810 if (size < min_size)
811 min_size = size;
812 if (wasted < min_waste)
813 min_waste = wasted;
814 if (objwaste < min_objwaste)
815 min_objwaste = objwaste;
816 if (s->objects < min_objects)
817 min_objects = s->objects;
818 if (used < min_used)
819 min_used = used;
820 if (s->objects_partial < min_partobj)
821 min_partobj = s->objects_partial;
822 if (percentage_partial_slabs < min_ppart)
823 min_ppart = percentage_partial_slabs;
824 if (percentage_partial_objs < min_ppartobj)
825 min_ppartobj = percentage_partial_objs;
826 if (s->slab_size < min_memobj)
827 min_memobj = s->slab_size;
828
829 if (s->object_size > max_objsize)
830 max_objsize = s->object_size;
831 if (s->partial > max_partial)
832 max_partial = s->partial;
833 if (s->slabs > max_slabs)
834 max_slabs = s->slabs;
835 if (size > max_size)
836 max_size = size;
837 if (wasted > max_waste)
838 max_waste = wasted;
839 if (objwaste > max_objwaste)
840 max_objwaste = objwaste;
841 if (s->objects > max_objects)
842 max_objects = s->objects;
843 if (used > max_used)
844 max_used = used;
845 if (s->objects_partial > max_partobj)
846 max_partobj = s->objects_partial;
847 if (percentage_partial_slabs > max_ppart)
848 max_ppart = percentage_partial_slabs;
849 if (percentage_partial_objs > max_ppartobj)
850 max_ppartobj = percentage_partial_objs;
851 if (s->slab_size > max_memobj)
852 max_memobj = s->slab_size;
853
854 total_partial += s->partial;
855 total_slabs += s->slabs;
856 total_size += size;
857 total_waste += wasted;
858
859 total_objects += s->objects;
860 total_used += used;
861 total_partobj += s->objects_partial;
862 total_ppart += percentage_partial_slabs;
863 total_ppartobj += percentage_partial_objs;
864
865 total_objwaste += s->objects * objwaste;
866 total_objsize += s->objects * s->slab_size;
867 }
868
869 if (!total_objects) {
870 printf("No objects\n");
871 return;
872 }
873 if (!used_slabs) {
874 printf("No slabs\n");
875 return;
876 }
877
878 /* Per slab averages */
879 avg_partial = total_partial / used_slabs;
880 avg_slabs = total_slabs / used_slabs;
881 avg_size = total_size / used_slabs;
882 avg_waste = total_waste / used_slabs;
883
884 avg_objects = total_objects / used_slabs;
885 avg_used = total_used / used_slabs;
886 avg_partobj = total_partobj / used_slabs;
887 avg_ppart = total_ppart / used_slabs;
888 avg_ppartobj = total_ppartobj / used_slabs;
889
890 /* Per object object sizes */
891 avg_objsize = total_used / total_objects;
892 avg_objwaste = total_objwaste / total_objects;
893 avg_partobj = total_partobj * 100 / total_objects;
894 avg_memobj = total_objsize / total_objects;
895
896 printf("Slabcache Totals\n");
897 printf("----------------\n");
898 printf("Slabcaches : %3d Aliases : %3d->%-3d Active: %3d\n",
899 slabs, aliases, alias_targets, used_slabs);
900
901 store_size(b1, total_size);store_size(b2, total_waste);
902 store_size(b3, total_waste * 100 / total_used);
903 printf("Memory used: %6s # Loss : %6s MRatio:%6s%%\n", b1, b2, b3);
904
905 store_size(b1, total_objects);store_size(b2, total_partobj);
906 store_size(b3, total_partobj * 100 / total_objects);
907 printf("# Objects : %6s # PartObj: %6s ORatio:%6s%%\n", b1, b2, b3);
908
909 printf("\n");
910 printf("Per Cache Average Min Max Total\n");
911 printf("---------------------------------------------------------\n");
912
913 store_size(b1, avg_objects);store_size(b2, min_objects);
914 store_size(b3, max_objects);store_size(b4, total_objects);
915 printf("#Objects %10s %10s %10s %10s\n",
916 b1, b2, b3, b4);
917
918 store_size(b1, avg_slabs);store_size(b2, min_slabs);
919 store_size(b3, max_slabs);store_size(b4, total_slabs);
920 printf("#Slabs %10s %10s %10s %10s\n",
921 b1, b2, b3, b4);
922
923 store_size(b1, avg_partial);store_size(b2, min_partial);
924 store_size(b3, max_partial);store_size(b4, total_partial);
925 printf("#PartSlab %10s %10s %10s %10s\n",
926 b1, b2, b3, b4);
927 store_size(b1, avg_ppart);store_size(b2, min_ppart);
928 store_size(b3, max_ppart);
929 store_size(b4, total_partial * 100 / total_slabs);
930 printf("%%PartSlab%10s%% %10s%% %10s%% %10s%%\n",
931 b1, b2, b3, b4);
932
933 store_size(b1, avg_partobj);store_size(b2, min_partobj);
934 store_size(b3, max_partobj);
935 store_size(b4, total_partobj);
936 printf("PartObjs %10s %10s %10s %10s\n",
937 b1, b2, b3, b4);
938
939 store_size(b1, avg_ppartobj);store_size(b2, min_ppartobj);
940 store_size(b3, max_ppartobj);
941 store_size(b4, total_partobj * 100 / total_objects);
942 printf("%% PartObj%10s%% %10s%% %10s%% %10s%%\n",
943 b1, b2, b3, b4);
944
945 store_size(b1, avg_size);store_size(b2, min_size);
946 store_size(b3, max_size);store_size(b4, total_size);
947 printf("Memory %10s %10s %10s %10s\n",
948 b1, b2, b3, b4);
949
950 store_size(b1, avg_used);store_size(b2, min_used);
951 store_size(b3, max_used);store_size(b4, total_used);
952 printf("Used %10s %10s %10s %10s\n",
953 b1, b2, b3, b4);
954
955 store_size(b1, avg_waste);store_size(b2, min_waste);
956 store_size(b3, max_waste);store_size(b4, total_waste);
957 printf("Loss %10s %10s %10s %10s\n",
958 b1, b2, b3, b4);
959
960 printf("\n");
961 printf("Per Object Average Min Max\n");
962 printf("---------------------------------------------\n");
963
964 store_size(b1, avg_memobj);store_size(b2, min_memobj);
965 store_size(b3, max_memobj);
966 printf("Memory %10s %10s %10s\n",
967 b1, b2, b3);
968 store_size(b1, avg_objsize);store_size(b2, min_objsize);
969 store_size(b3, max_objsize);
970 printf("User %10s %10s %10s\n",
971 b1, b2, b3);
972
973 store_size(b1, avg_objwaste);store_size(b2, min_objwaste);
974 store_size(b3, max_objwaste);
975 printf("Loss %10s %10s %10s\n",
976 b1, b2, b3);
977}
978
979static void sort_slabs(void)
980{
981 struct slabinfo *s1,*s2;
982
983 for (s1 = slabinfo; s1 < slabinfo + slabs; s1++) {
984 for (s2 = s1 + 1; s2 < slabinfo + slabs; s2++) {
985 int result;
986
987 if (sort_size)
988 result = slab_size(s1) < slab_size(s2);
989 else if (sort_active)
990 result = slab_activity(s1) < slab_activity(s2);
991 else
992 result = strcasecmp(s1->name, s2->name);
993
994 if (show_inverted)
995 result = -result;
996
997 if (result > 0) {
998 struct slabinfo t;
999
1000 memcpy(&t, s1, sizeof(struct slabinfo));
1001 memcpy(s1, s2, sizeof(struct slabinfo));
1002 memcpy(s2, &t, sizeof(struct slabinfo));
1003 }
1004 }
1005 }
1006}
1007
1008static void sort_aliases(void)
1009{
1010 struct aliasinfo *a1,*a2;
1011
1012 for (a1 = aliasinfo; a1 < aliasinfo + aliases; a1++) {
1013 for (a2 = a1 + 1; a2 < aliasinfo + aliases; a2++) {
1014 char *n1, *n2;
1015
1016 n1 = a1->name;
1017 n2 = a2->name;
1018 if (show_alias && !show_inverted) {
1019 n1 = a1->ref;
1020 n2 = a2->ref;
1021 }
1022 if (strcasecmp(n1, n2) > 0) {
1023 struct aliasinfo t;
1024
1025 memcpy(&t, a1, sizeof(struct aliasinfo));
1026 memcpy(a1, a2, sizeof(struct aliasinfo));
1027 memcpy(a2, &t, sizeof(struct aliasinfo));
1028 }
1029 }
1030 }
1031}
1032
1033static void link_slabs(void)
1034{
1035 struct aliasinfo *a;
1036 struct slabinfo *s;
1037
1038 for (a = aliasinfo; a < aliasinfo + aliases; a++) {
1039
1040 for (s = slabinfo; s < slabinfo + slabs; s++)
1041 if (strcmp(a->ref, s->name) == 0) {
1042 a->slab = s;
1043 s->refs++;
1044 break;
1045 }
1046 if (s == slabinfo + slabs)
1047 fatal("Unresolved alias %s\n", a->ref);
1048 }
1049}
1050
1051static void alias(void)
1052{
1053 struct aliasinfo *a;
1054 char *active = NULL;
1055
1056 sort_aliases();
1057 link_slabs();
1058
1059 for(a = aliasinfo; a < aliasinfo + aliases; a++) {
1060
1061 if (!show_single_ref && a->slab->refs == 1)
1062 continue;
1063
1064 if (!show_inverted) {
1065 if (active) {
1066 if (strcmp(a->slab->name, active) == 0) {
1067 printf(" %s", a->name);
1068 continue;
1069 }
1070 }
1071 printf("\n%-12s <- %s", a->slab->name, a->name);
1072 active = a->slab->name;
1073 }
1074 else
1075 printf("%-20s -> %s\n", a->name, a->slab->name);
1076 }
1077 if (active)
1078 printf("\n");
1079}
1080
1081
1082static void rename_slabs(void)
1083{
1084 struct slabinfo *s;
1085 struct aliasinfo *a;
1086
1087 for (s = slabinfo; s < slabinfo + slabs; s++) {
1088 if (*s->name != ':')
1089 continue;
1090
1091 if (s->refs > 1 && !show_first_alias)
1092 continue;
1093
1094 a = find_one_alias(s);
1095
1096 if (a)
1097 s->name = a->name;
1098 else {
1099 s->name = "*";
1100 actual_slabs--;
1101 }
1102 }
1103}
1104
1105static int slab_mismatch(char *slab)
1106{
1107 return regexec(&pattern, slab, 0, NULL, 0);
1108}
1109
1110static void read_slab_dir(void)
1111{
1112 DIR *dir;
1113 struct dirent *de;
1114 struct slabinfo *slab = slabinfo;
1115 struct aliasinfo *alias = aliasinfo;
1116 char *p;
1117 char *t;
1118 int count;
1119
1120 if (chdir("/sys/kernel/slab") && chdir("/sys/slab"))
1121 fatal("SYSFS support for SLUB not active\n");
1122
1123 dir = opendir(".");
1124 while ((de = readdir(dir))) {
1125 if (de->d_name[0] == '.' ||
1126 (de->d_name[0] != ':' && slab_mismatch(de->d_name)))
1127 continue;
1128 switch (de->d_type) {
1129 case DT_LNK:
1130 alias->name = strdup(de->d_name);
1131 count = readlink(de->d_name, buffer, sizeof(buffer));
1132
1133 if (count < 0)
1134 fatal("Cannot read symlink %s\n", de->d_name);
1135
1136 buffer[count] = 0;
1137 p = buffer + count;
1138 while (p > buffer && p[-1] != '/')
1139 p--;
1140 alias->ref = strdup(p);
1141 alias++;
1142 break;
1143 case DT_DIR:
1144 if (chdir(de->d_name))
1145 fatal("Unable to access slab %s\n", slab->name);
1146 slab->name = strdup(de->d_name);
1147 slab->alias = 0;
1148 slab->refs = 0;
1149 slab->aliases = get_obj("aliases");
1150 slab->align = get_obj("align");
1151 slab->cache_dma = get_obj("cache_dma");
1152 slab->cpu_slabs = get_obj("cpu_slabs");
1153 slab->destroy_by_rcu = get_obj("destroy_by_rcu");
1154 slab->hwcache_align = get_obj("hwcache_align");
1155 slab->object_size = get_obj("object_size");
1156 slab->objects = get_obj("objects");
1157 slab->objects_partial = get_obj("objects_partial");
1158 slab->objects_total = get_obj("objects_total");
1159 slab->objs_per_slab = get_obj("objs_per_slab");
1160 slab->order = get_obj("order");
1161 slab->partial = get_obj("partial");
1162 slab->partial = get_obj_and_str("partial", &t);
1163 decode_numa_list(slab->numa_partial, t);
1164 free(t);
1165 slab->poison = get_obj("poison");
1166 slab->reclaim_account = get_obj("reclaim_account");
1167 slab->red_zone = get_obj("red_zone");
1168 slab->sanity_checks = get_obj("sanity_checks");
1169 slab->slab_size = get_obj("slab_size");
1170 slab->slabs = get_obj_and_str("slabs", &t);
1171 decode_numa_list(slab->numa, t);
1172 free(t);
1173 slab->store_user = get_obj("store_user");
1174 slab->trace = get_obj("trace");
1175 slab->alloc_fastpath = get_obj("alloc_fastpath");
1176 slab->alloc_slowpath = get_obj("alloc_slowpath");
1177 slab->free_fastpath = get_obj("free_fastpath");
1178 slab->free_slowpath = get_obj("free_slowpath");
1179 slab->free_frozen= get_obj("free_frozen");
1180 slab->free_add_partial = get_obj("free_add_partial");
1181 slab->free_remove_partial = get_obj("free_remove_partial");
1182 slab->alloc_from_partial = get_obj("alloc_from_partial");
1183 slab->alloc_slab = get_obj("alloc_slab");
1184 slab->alloc_refill = get_obj("alloc_refill");
1185 slab->free_slab = get_obj("free_slab");
1186 slab->cpuslab_flush = get_obj("cpuslab_flush");
1187 slab->deactivate_full = get_obj("deactivate_full");
1188 slab->deactivate_empty = get_obj("deactivate_empty");
1189 slab->deactivate_to_head = get_obj("deactivate_to_head");
1190 slab->deactivate_to_tail = get_obj("deactivate_to_tail");
1191 slab->deactivate_remote_frees = get_obj("deactivate_remote_frees");
1192 slab->order_fallback = get_obj("order_fallback");
1193 chdir("..");
1194 if (slab->name[0] == ':')
1195 alias_targets++;
1196 slab++;
1197 break;
1198 default :
1199 fatal("Unknown file type %lx\n", de->d_type);
1200 }
1201 }
1202 closedir(dir);
1203 slabs = slab - slabinfo;
1204 actual_slabs = slabs;
1205 aliases = alias - aliasinfo;
1206 if (slabs > MAX_SLABS)
1207 fatal("Too many slabs\n");
1208 if (aliases > MAX_ALIASES)
1209 fatal("Too many aliases\n");
1210}
1211
1212static void output_slabs(void)
1213{
1214 struct slabinfo *slab;
1215
1216 for (slab = slabinfo; slab < slabinfo + slabs; slab++) {
1217
1218 if (slab->alias)
1219 continue;
1220
1221
1222 if (show_numa)
1223 slab_numa(slab, 0);
1224 else if (show_track)
1225 show_tracking(slab);
1226 else if (validate)
1227 slab_validate(slab);
1228 else if (shrink)
1229 slab_shrink(slab);
1230 else if (set_debug)
1231 slab_debug(slab);
1232 else if (show_ops)
1233 ops(slab);
1234 else if (show_slab)
1235 slabcache(slab);
1236 else if (show_report)
1237 report(slab);
1238 }
1239}
1240
1241struct option opts[] = {
1242 { "aliases", 0, NULL, 'a' },
1243 { "activity", 0, NULL, 'A' },
1244 { "debug", 2, NULL, 'd' },
1245 { "display-activity", 0, NULL, 'D' },
1246 { "empty", 0, NULL, 'e' },
1247 { "first-alias", 0, NULL, 'f' },
1248 { "help", 0, NULL, 'h' },
1249 { "inverted", 0, NULL, 'i'},
1250 { "numa", 0, NULL, 'n' },
1251 { "ops", 0, NULL, 'o' },
1252 { "report", 0, NULL, 'r' },
1253 { "shrink", 0, NULL, 's' },
1254 { "slabs", 0, NULL, 'l' },
1255 { "track", 0, NULL, 't'},
1256 { "validate", 0, NULL, 'v' },
1257 { "zero", 0, NULL, 'z' },
1258 { "1ref", 0, NULL, '1'},
1259 { NULL, 0, NULL, 0 }
1260};
1261
1262int main(int argc, char *argv[])
1263{
1264 int c;
1265 int err;
1266 char *pattern_source;
1267
1268 page_size = getpagesize();
1269
1270 while ((c = getopt_long(argc, argv, "aAd::Defhil1noprstvzTS",
1271 opts, NULL)) != -1)
1272 switch (c) {
1273 case '1':
1274 show_single_ref = 1;
1275 break;
1276 case 'a':
1277 show_alias = 1;
1278 break;
1279 case 'A':
1280 sort_active = 1;
1281 break;
1282 case 'd':
1283 set_debug = 1;
1284 if (!debug_opt_scan(optarg))
1285 fatal("Invalid debug option '%s'\n", optarg);
1286 break;
1287 case 'D':
1288 show_activity = 1;
1289 break;
1290 case 'e':
1291 show_empty = 1;
1292 break;
1293 case 'f':
1294 show_first_alias = 1;
1295 break;
1296 case 'h':
1297 usage();
1298 return 0;
1299 case 'i':
1300 show_inverted = 1;
1301 break;
1302 case 'n':
1303 show_numa = 1;
1304 break;
1305 case 'o':
1306 show_ops = 1;
1307 break;
1308 case 'r':
1309 show_report = 1;
1310 break;
1311 case 's':
1312 shrink = 1;
1313 break;
1314 case 'l':
1315 show_slab = 1;
1316 break;
1317 case 't':
1318 show_track = 1;
1319 break;
1320 case 'v':
1321 validate = 1;
1322 break;
1323 case 'z':
1324 skip_zero = 0;
1325 break;
1326 case 'T':
1327 show_totals = 1;
1328 break;
1329 case 'S':
1330 sort_size = 1;
1331 break;
1332
1333 default:
1334 fatal("%s: Invalid option '%c'\n", argv[0], optopt);
1335
1336 }
1337
1338 if (!show_slab && !show_alias && !show_track && !show_report
1339 && !validate && !shrink && !set_debug && !show_ops)
1340 show_slab = 1;
1341
1342 if (argc > optind)
1343 pattern_source = argv[optind];
1344 else
1345 pattern_source = ".*";
1346
1347 err = regcomp(&pattern, pattern_source, REG_ICASE|REG_NOSUB);
1348 if (err)
1349 fatal("%s: Invalid pattern '%s' code %d\n",
1350 argv[0], pattern_source, err);
1351 read_slab_dir();
1352 if (show_alias)
1353 alias();
1354 else
1355 if (show_totals)
1356 totals();
1357 else {
1358 link_slabs();
1359 rename_slabs();
1360 sort_slabs();
1361 output_slabs();
1362 }
1363 return 0;
1364}
diff --git a/Documentation/w1/slaves/00-INDEX b/Documentation/w1/slaves/00-INDEX
index f8101d6b07b7..75613c9ac4db 100644
--- a/Documentation/w1/slaves/00-INDEX
+++ b/Documentation/w1/slaves/00-INDEX
@@ -2,3 +2,5 @@
2 - This file 2 - This file
3w1_therm 3w1_therm
4 - The Maxim/Dallas Semiconductor ds18*20 temperature sensor. 4 - The Maxim/Dallas Semiconductor ds18*20 temperature sensor.
5w1_ds2423
6 - The Maxim/Dallas Semiconductor ds2423 counter device.
diff --git a/Documentation/w1/slaves/w1_ds2423 b/Documentation/w1/slaves/w1_ds2423
new file mode 100644
index 000000000000..90a65d23cf59
--- /dev/null
+++ b/Documentation/w1/slaves/w1_ds2423
@@ -0,0 +1,47 @@
1Kernel driver w1_ds2423
2=======================
3
4Supported chips:
5 * Maxim DS2423 based counter devices.
6
7supported family codes:
8 W1_THERM_DS2423 0x1D
9
10Author: Mika Laitio <lamikr@pilppa.org>
11
12Description
13-----------
14
15Support is provided through the sysfs w1_slave file. Each opening and
16read sequence of w1_slave file initiates the read of counters and ram
17available in DS2423 pages 12 - 15.
18
19Result of each page is provided as an ASCII output where each counter
20value and associated ram buffer is outpputed to own line.
21
22Each lines will contain the values of 42 bytes read from the counter and
23memory page along the crc=YES or NO for indicating whether the read operation
24was successfull and CRC matched.
25If the operation was successfull, there is also in the end of each line
26a counter value expressed as an integer after c=
27
28Meaning of 42 bytes represented is following:
29 - 1 byte from ram page
30 - 4 bytes for the counter value
31 - 4 zero bytes
32 - 2 bytes for crc16 which was calculated from the data read since the previous crc bytes
33 - 31 remaining bytes from the ram page
34 - crc=YES/NO indicating whether read was ok and crc matched
35 - c=<int> current counter value
36
37example from the successfull read:
3800 02 00 00 00 00 00 00 00 6d 38 00 ff ff 00 00 fe ff 00 00 ff ff 00 00 ff ff 00 00 ff ff 00 00 ff ff 00 00 ff ff 00 00 ff ff crc=YES c=2
3900 02 00 00 00 00 00 00 00 e0 1f 00 ff ff 00 00 ff ff 00 00 ff ff 00 00 ff ff 00 00 ff ff 00 00 ff ff 00 00 ff ff 00 00 ff ff crc=YES c=2
4000 29 c6 5d 18 00 00 00 00 04 37 00 ff ff 00 00 ff ff 00 00 ff ff 00 00 ff ff 00 00 ff ff 00 00 ff ff 00 00 ff ff 00 00 ff ff crc=YES c=408798761
4100 05 00 00 00 00 00 00 00 8d 39 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff crc=YES c=5
42
43example from the read with crc errors:
4400 02 00 00 00 00 00 00 00 6d 38 00 ff ff 00 00 fe ff 00 00 ff ff 00 00 ff ff 00 00 ff ff 00 00 ff ff 00 00 ff ff 00 00 ff ff crc=YES c=2
4500 02 00 00 22 00 00 00 00 e0 1f 00 ff ff 00 00 ff ff 00 00 ff ff 00 00 ff ff 00 00 ff ff 00 00 ff ff 00 00 ff ff 00 00 ff ff crc=NO
4600 e1 61 5d 19 00 00 00 00 df 0b 00 ff ff 00 00 ff ff 00 00 ff ff 00 00 ff ff 00 00 ff ff 00 00 ff ff 00 00 ff ff 00 00 ff ff crc=NO
4700 05 00 00 20 00 00 00 00 8d 39 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff crc=NO
diff --git a/Documentation/x86/boot.txt b/Documentation/x86/boot.txt
index 30b43e1b2697..9b7221a86df2 100644
--- a/Documentation/x86/boot.txt
+++ b/Documentation/x86/boot.txt
@@ -600,6 +600,7 @@ Protocol: 2.07+
600 0x00000001 lguest 600 0x00000001 lguest
601 0x00000002 Xen 601 0x00000002 Xen
602 0x00000003 Moorestown MID 602 0x00000003 Moorestown MID
603 0x00000004 CE4100 TV Platform
603 604
604Field name: hardware_subarch_data 605Field name: hardware_subarch_data
605Type: write (subarch-dependent) 606Type: write (subarch-dependent)
@@ -621,9 +622,9 @@ Protocol: 2.08+
621 The payload may be compressed. The format of both the compressed and 622 The payload may be compressed. The format of both the compressed and
622 uncompressed data should be determined using the standard magic 623 uncompressed data should be determined using the standard magic
623 numbers. The currently supported compression formats are gzip 624 numbers. The currently supported compression formats are gzip
624 (magic numbers 1F 8B or 1F 9E), bzip2 (magic number 42 5A) and LZMA 625 (magic numbers 1F 8B or 1F 9E), bzip2 (magic number 42 5A), LZMA
625 (magic number 5D 00). The uncompressed payload is currently always ELF 626 (magic number 5D 00), and XZ (magic number FD 37). The uncompressed
626 (magic number 7F 45 4C 46). 627 payload is currently always ELF (magic number 7F 45 4C 46).
627 628
628Field name: payload_length 629Field name: payload_length
629Type: read 630Type: read
diff --git a/Documentation/xz.txt b/Documentation/xz.txt
new file mode 100644
index 000000000000..2cf3e2608de3
--- /dev/null
+++ b/Documentation/xz.txt
@@ -0,0 +1,121 @@
1
2XZ data compression in Linux
3============================
4
5Introduction
6
7 XZ is a general purpose data compression format with high compression
8 ratio and relatively fast decompression. The primary compression
9 algorithm (filter) is LZMA2. Additional filters can be used to improve
10 compression ratio even further. E.g. Branch/Call/Jump (BCJ) filters
11 improve compression ratio of executable data.
12
13 The XZ decompressor in Linux is called XZ Embedded. It supports
14 the LZMA2 filter and optionally also BCJ filters. CRC32 is supported
15 for integrity checking. The home page of XZ Embedded is at
16 <http://tukaani.org/xz/embedded.html>, where you can find the
17 latest version and also information about using the code outside
18 the Linux kernel.
19
20 For userspace, XZ Utils provide a zlib-like compression library
21 and a gzip-like command line tool. XZ Utils can be downloaded from
22 <http://tukaani.org/xz/>.
23
24XZ related components in the kernel
25
26 The xz_dec module provides XZ decompressor with single-call (buffer
27 to buffer) and multi-call (stateful) APIs. The usage of the xz_dec
28 module is documented in include/linux/xz.h.
29
30 The xz_dec_test module is for testing xz_dec. xz_dec_test is not
31 useful unless you are hacking the XZ decompressor. xz_dec_test
32 allocates a char device major dynamically to which one can write
33 .xz files from userspace. The decompressed output is thrown away.
34 Keep an eye on dmesg to see diagnostics printed by xz_dec_test.
35 See the xz_dec_test source code for the details.
36
37 For decompressing the kernel image, initramfs, and initrd, there
38 is a wrapper function in lib/decompress_unxz.c. Its API is the
39 same as in other decompress_*.c files, which is defined in
40 include/linux/decompress/generic.h.
41
42 scripts/xz_wrap.sh is a wrapper for the xz command line tool found
43 from XZ Utils. The wrapper sets compression options to values suitable
44 for compressing the kernel image.
45
46 For kernel makefiles, two commands are provided for use with
47 $(call if_needed). The kernel image should be compressed with
48 $(call if_needed,xzkern) which will use a BCJ filter and a big LZMA2
49 dictionary. It will also append a four-byte trailer containing the
50 uncompressed size of the file, which is needed by the boot code.
51 Other things should be compressed with $(call if_needed,xzmisc)
52 which will use no BCJ filter and 1 MiB LZMA2 dictionary.
53
54Notes on compression options
55
56 Since the XZ Embedded supports only streams with no integrity check or
57 CRC32, make sure that you don't use some other integrity check type
58 when encoding files that are supposed to be decoded by the kernel. With
59 liblzma, you need to use either LZMA_CHECK_NONE or LZMA_CHECK_CRC32
60 when encoding. With the xz command line tool, use --check=none or
61 --check=crc32.
62
63 Using CRC32 is strongly recommended unless there is some other layer
64 which will verify the integrity of the uncompressed data anyway.
65 Double checking the integrity would probably be waste of CPU cycles.
66 Note that the headers will always have a CRC32 which will be validated
67 by the decoder; you can only change the integrity check type (or
68 disable it) for the actual uncompressed data.
69
70 In userspace, LZMA2 is typically used with dictionary sizes of several
71 megabytes. The decoder needs to have the dictionary in RAM, thus big
72 dictionaries cannot be used for files that are intended to be decoded
73 by the kernel. 1 MiB is probably the maximum reasonable dictionary
74 size for in-kernel use (maybe more is OK for initramfs). The presets
75 in XZ Utils may not be optimal when creating files for the kernel,
76 so don't hesitate to use custom settings. Example:
77
78 xz --check=crc32 --lzma2=dict=512KiB inputfile
79
80 An exception to above dictionary size limitation is when the decoder
81 is used in single-call mode. Decompressing the kernel itself is an
82 example of this situation. In single-call mode, the memory usage
83 doesn't depend on the dictionary size, and it is perfectly fine to
84 use a big dictionary: for maximum compression, the dictionary should
85 be at least as big as the uncompressed data itself.
86
87Future plans
88
89 Creating a limited XZ encoder may be considered if people think it is
90 useful. LZMA2 is slower to compress than e.g. Deflate or LZO even at
91 the fastest settings, so it isn't clear if LZMA2 encoder is wanted
92 into the kernel.
93
94 Support for limited random-access reading is planned for the
95 decompression code. I don't know if it could have any use in the
96 kernel, but I know that it would be useful in some embedded projects
97 outside the Linux kernel.
98
99Conformance to the .xz file format specification
100
101 There are a couple of corner cases where things have been simplified
102 at expense of detecting errors as early as possible. These should not
103 matter in practice all, since they don't cause security issues. But
104 it is good to know this if testing the code e.g. with the test files
105 from XZ Utils.
106
107Reporting bugs
108
109 Before reporting a bug, please check that it's not fixed already
110 at upstream. See <http://tukaani.org/xz/embedded.html> to get the
111 latest code.
112
113 Report bugs to <lasse.collin@tukaani.org> or visit #tukaani on
114 Freenode and talk to Larhzu. I don't actively read LKML or other
115 kernel-related mailing lists, so if there's something I should know,
116 you should email to me personally or use IRC.
117
118 Don't bother Igor Pavlov with questions about the XZ implementation
119 in the kernel or about XZ Utils. While these two implementations
120 include essential code that is directly based on Igor Pavlov's code,
121 these implementations aren't maintained nor supported by him.
diff --git a/Documentation/zh_CN/HOWTO b/Documentation/zh_CN/HOWTO
index 69160779e432..faf976c0c731 100644
--- a/Documentation/zh_CN/HOWTO
+++ b/Documentation/zh_CN/HOWTO
@@ -347,8 +347,8 @@ bugzilla.kernel.org是Linux内核开发者们用来跟踪内核Bug的网站。
347最新bug的通知,可以订阅bugme-new邮件列表(只有新的bug报告会被寄到这里) 347最新bug的通知,可以订阅bugme-new邮件列表(只有新的bug报告会被寄到这里)
348或者订阅bugme-janitor邮件列表(所有bugzilla的变动都会被寄到这里)。 348或者订阅bugme-janitor邮件列表(所有bugzilla的变动都会被寄到这里)。
349 349
350 http://lists.osdl.org/mailman/listinfo/bugme-new 350 https://lists.linux-foundation.org/mailman/listinfo/bugme-new
351 http://lists.osdl.org/mailman/listinfo/bugme-janitors 351 https://lists.linux-foundation.org/mailman/listinfo/bugme-janitors
352 352
353 353
354邮件列表 354邮件列表
diff --git a/Documentation/zh_CN/SubmittingDrivers b/Documentation/zh_CN/SubmittingDrivers
index c27b0f6cdd39..5889f8df6312 100644
--- a/Documentation/zh_CN/SubmittingDrivers
+++ b/Documentation/zh_CN/SubmittingDrivers
@@ -61,7 +61,7 @@ Linux 2.4:
61Linux 2.6: 61Linux 2.6:
62 除了遵循和 2.4 版内核同样的规则外,你还需要在 linux-kernel 邮件 62 除了遵循和 2.4 版内核同样的规则外,你还需要在 linux-kernel 邮件
63 列表上跟踪最新的 API 变化。向 Linux 2.6 内核提交驱动的顶级联系人 63 列表上跟踪最新的 API 变化。向 Linux 2.6 内核提交驱动的顶级联系人
64 是 Andrew Morton <akpm@osdl.org>。 64 是 Andrew Morton <akpm@linux-foundation.org>。
65 65
66决定设备驱动能否被接受的条件 66决定设备驱动能否被接受的条件
67---------------------------- 67----------------------------