aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation
diff options
context:
space:
mode:
Diffstat (limited to 'Documentation')
-rw-r--r--Documentation/00-INDEX6
-rw-r--r--Documentation/ABI/obsolete/sysfs-class-rfkill2
-rw-r--r--Documentation/ABI/removed/devfs2
-rw-r--r--Documentation/ABI/stable/sysfs-driver-usb-usbtmc12
-rw-r--r--Documentation/ABI/stable/sysfs-module2
-rw-r--r--Documentation/ABI/testing/debugfs-olpc16
-rw-r--r--Documentation/ABI/testing/sysfs-block-dm25
-rw-r--r--Documentation/ABI/testing/sysfs-bus-event_source-devices-format14
-rw-r--r--Documentation/ABI/testing/sysfs-bus-rpmsg75
-rw-r--r--Documentation/ABI/testing/sysfs-bus-usb11
-rw-r--r--Documentation/ABI/testing/sysfs-class2
-rw-r--r--Documentation/ABI/testing/sysfs-class-net-mesh7
-rw-r--r--Documentation/ABI/testing/sysfs-devices2
-rw-r--r--Documentation/ABI/testing/sysfs-devices-power18
-rw-r--r--Documentation/ABI/testing/sysfs-devices-soc58
-rw-r--r--Documentation/ABI/testing/sysfs-driver-samsung-laptop20
-rw-r--r--Documentation/ABI/testing/sysfs-firmware-acpi20
-rw-r--r--Documentation/ABI/testing/sysfs-kernel-mm-cleancache11
-rw-r--r--Documentation/CodingStyle29
-rw-r--r--Documentation/DocBook/80211.tmpl1
-rw-r--r--Documentation/DocBook/device-drivers.tmpl17
-rw-r--r--Documentation/DocBook/filesystems.tmpl2
-rw-r--r--Documentation/DocBook/kgdb.tmpl17
-rw-r--r--Documentation/DocBook/libata.tmpl8
-rw-r--r--Documentation/DocBook/media/v4l/biblio.xml20
-rw-r--r--Documentation/DocBook/media/v4l/compat.xml18
-rw-r--r--Documentation/DocBook/media/v4l/controls.xml220
-rw-r--r--Documentation/DocBook/media/v4l/selection-api.xml8
-rw-r--r--Documentation/DocBook/media/v4l/v4l2.xml19
-rw-r--r--Documentation/DocBook/media/v4l/vidioc-decoder-cmd.xml256
-rw-r--r--Documentation/DocBook/media/v4l/vidioc-encoder-cmd.xml9
-rw-r--r--Documentation/DocBook/media/v4l/vidioc-g-jpegcomp.xml16
-rw-r--r--Documentation/DocBook/media/v4l/vidioc-g-selection.xml106
-rw-r--r--Documentation/DocBook/media/v4l/vidioc-querycap.xml36
-rw-r--r--Documentation/DocBook/media/v4l/vidioc-s-hw-freq-seek.xml6
-rw-r--r--Documentation/EDID/1024x768.S44
-rw-r--r--Documentation/EDID/1280x1024.S44
-rw-r--r--Documentation/EDID/1680x1050.S44
-rw-r--r--Documentation/EDID/1920x1080.S44
-rw-r--r--Documentation/EDID/HOWTO.txt39
-rw-r--r--Documentation/EDID/Makefile26
-rw-r--r--Documentation/EDID/edid.S261
-rw-r--r--Documentation/EDID/hex1
-rw-r--r--Documentation/IRQ-domain.txt117
-rw-r--r--Documentation/Makefile2
-rw-r--r--Documentation/RCU/RTFP.txt1784
-rw-r--r--Documentation/RCU/checklist.txt14
-rw-r--r--Documentation/RCU/stallwarn.txt87
-rw-r--r--Documentation/RCU/torture.txt33
-rw-r--r--Documentation/RCU/trace.txt36
-rw-r--r--Documentation/acpi/apei/einj.txt8
-rw-r--r--Documentation/aoe/aoe.txt2
-rw-r--r--Documentation/aoe/autoload.sh4
-rw-r--r--Documentation/arm/kernel_user_helpers.txt2
-rw-r--r--Documentation/backlight/lp855x-driver.txt78
-rw-r--r--Documentation/blockdev/floppy.txt2
-rw-r--r--Documentation/cgroups/blkio-controller.txt18
-rw-r--r--Documentation/cgroups/cgroups.txt26
-rw-r--r--Documentation/cgroups/cpusets.txt2
-rw-r--r--Documentation/clk.txt233
-rw-r--r--Documentation/cpu-hotplug.txt22
-rw-r--r--Documentation/cpuidle/sysfs.txt5
-rw-r--r--Documentation/crc32.txt182
-rw-r--r--Documentation/device-mapper/dm-raid.txt2
-rw-r--r--Documentation/device-mapper/persistent-data.txt2
-rw-r--r--Documentation/device-mapper/thin-provisioning.txt67
-rw-r--r--Documentation/device-mapper/verity.txt194
-rw-r--r--Documentation/devicetree/bindings/arm/atmel-aic.txt38
-rw-r--r--Documentation/devicetree/bindings/arm/atmel-at91.txt92
-rw-r--r--Documentation/devicetree/bindings/arm/atmel-pmc.txt11
-rw-r--r--Documentation/devicetree/bindings/arm/exynos/power_domain.txt21
-rw-r--r--Documentation/devicetree/bindings/arm/fsl.txt22
-rw-r--r--Documentation/devicetree/bindings/arm/mrvl.txt6
-rw-r--r--Documentation/devicetree/bindings/arm/omap/intc.txt27
-rw-r--r--Documentation/devicetree/bindings/arm/omap/omap.txt8
-rw-r--r--Documentation/devicetree/bindings/arm/sirf.txt2
-rw-r--r--Documentation/devicetree/bindings/arm/spear.txt8
-rw-r--r--Documentation/devicetree/bindings/arm/tegra/emc.txt100
-rw-r--r--Documentation/devicetree/bindings/arm/tegra/nvidia,tegra20-pmc.txt19
-rw-r--r--Documentation/devicetree/bindings/arm/twd.txt48
-rw-r--r--Documentation/devicetree/bindings/arm/vexpress.txt146
-rw-r--r--Documentation/devicetree/bindings/dma/tegra20-apbdma.txt30
-rw-r--r--Documentation/devicetree/bindings/gpio/gpio-omap.txt36
-rw-r--r--Documentation/devicetree/bindings/gpio/gpio-twl4030.txt23
-rw-r--r--Documentation/devicetree/bindings/gpio/gpio_atmel.txt20
-rw-r--r--Documentation/devicetree/bindings/gpio/gpio_i2c.txt32
-rw-r--r--Documentation/devicetree/bindings/gpio/gpio_nvidia.txt36
-rw-r--r--Documentation/devicetree/bindings/gpio/led.txt6
-rw-r--r--Documentation/devicetree/bindings/gpio/mrvl-gpio.txt23
-rw-r--r--Documentation/devicetree/bindings/gpio/sodaville.txt48
-rw-r--r--Documentation/devicetree/bindings/i2c/mrvl-i2c.txt37
-rw-r--r--Documentation/devicetree/bindings/i2c/sirf-i2c.txt19
-rw-r--r--Documentation/devicetree/bindings/input/matrix-keymap.txt19
-rw-r--r--Documentation/devicetree/bindings/input/tegra-kbc.txt17
-rw-r--r--Documentation/devicetree/bindings/mmc/ti-omap-hsmmc.txt33
-rw-r--r--Documentation/devicetree/bindings/mtd/arm-versatile.txt4
-rw-r--r--Documentation/devicetree/bindings/mtd/atmel-dataflash.txt3
-rw-r--r--Documentation/devicetree/bindings/mtd/atmel-nand.txt41
-rw-r--r--Documentation/devicetree/bindings/mtd/fsl-upm-nand.txt4
-rw-r--r--Documentation/devicetree/bindings/mtd/fsmc-nand.txt33
-rw-r--r--Documentation/devicetree/bindings/mtd/gpio-control-nand.txt3
-rw-r--r--Documentation/devicetree/bindings/mtd/mtd-physmap.txt23
-rw-r--r--Documentation/devicetree/bindings/mtd/nand.txt7
-rw-r--r--Documentation/devicetree/bindings/mtd/partition.txt38
-rw-r--r--Documentation/devicetree/bindings/mtd/spear_smi.txt31
-rw-r--r--Documentation/devicetree/bindings/net/stmmac.txt28
-rw-r--r--Documentation/devicetree/bindings/power_supply/max17042_battery.txt18
-rw-r--r--Documentation/devicetree/bindings/powerpc/fsl/mpic-msgr.txt63
-rw-r--r--Documentation/devicetree/bindings/powerpc/fsl/mpic.txt22
-rw-r--r--Documentation/devicetree/bindings/powerpc/fsl/msi-pic.txt6
-rw-r--r--Documentation/devicetree/bindings/rtc/sa1100-rtc.txt17
-rw-r--r--Documentation/devicetree/bindings/serial/mrvl-serial.txt4
-rw-r--r--Documentation/devicetree/bindings/sound/alc5632.txt24
-rw-r--r--Documentation/devicetree/bindings/sound/imx-audmux.txt13
-rw-r--r--Documentation/devicetree/bindings/sound/sgtl5000.txt (renamed from Documentation/devicetree/bindings/sound/soc/codecs/fsl-sgtl5000.txt)0
-rw-r--r--Documentation/devicetree/bindings/sound/tegra-audio-alc5632.txt59
-rw-r--r--Documentation/devicetree/bindings/spi/omap-spi.txt20
-rw-r--r--Documentation/devicetree/bindings/tty/serial/efm32-uart.txt14
-rw-r--r--Documentation/devicetree/bindings/usb/atmel-usb.txt49
-rw-r--r--Documentation/devicetree/bindings/usb/tegra-usb.txt13
-rw-r--r--Documentation/devicetree/bindings/vendor-prefixes.txt2
-rw-r--r--Documentation/devicetree/booting-without-of.txt2
-rw-r--r--Documentation/devicetree/usage-model.txt412
-rw-r--r--Documentation/dma-buf-sharing.txt120
-rw-r--r--Documentation/dmaengine.txt2
-rw-r--r--Documentation/dontdiff1
-rw-r--r--Documentation/dvb/cards.txt1
-rw-r--r--Documentation/dvb/lmedm04.txt11
-rw-r--r--Documentation/dynamic-debug-howto.txt30
-rw-r--r--Documentation/edac.txt4
-rw-r--r--Documentation/fb/intel810.txt2
-rw-r--r--Documentation/fb/intelfb.txt2
-rw-r--r--Documentation/fb/matroxfb.txt8
-rw-r--r--Documentation/feature-removal-schedule.txt45
-rw-r--r--Documentation/filesystems/debugfs.txt7
-rw-r--r--Documentation/filesystems/ext4.txt12
-rw-r--r--Documentation/filesystems/files.txt4
-rw-r--r--Documentation/filesystems/gfs2-uevents.txt2
-rw-r--r--Documentation/filesystems/nfs/idmapper.txt20
-rw-r--r--Documentation/filesystems/nfs/pnfs.txt54
-rw-r--r--Documentation/filesystems/pohmelfs/network_protocol.txt2
-rw-r--r--Documentation/filesystems/porting6
-rw-r--r--Documentation/filesystems/proc.txt32
-rw-r--r--Documentation/filesystems/qnx6.txt174
-rw-r--r--Documentation/filesystems/ramfs-rootfs-initramfs.txt2
-rw-r--r--Documentation/filesystems/vfs.txt2
-rw-r--r--Documentation/gpio.txt40
-rw-r--r--Documentation/hwmon/adm127532
-rw-r--r--Documentation/hwmon/jc4249
-rw-r--r--Documentation/hwmon/k10temp2
-rw-r--r--Documentation/hwmon/lm809
-rw-r--r--Documentation/hwmon/lm904
-rw-r--r--Documentation/hwmon/max160644
-rw-r--r--Documentation/hwmon/max3444034
-rw-r--r--Documentation/hwmon/max86884
-rw-r--r--Documentation/hwmon/mc13783-adc50
-rw-r--r--Documentation/hwmon/mcp302122
-rw-r--r--Documentation/hwmon/pmbus9
-rw-r--r--Documentation/hwmon/sch56275
-rw-r--r--Documentation/hwmon/sch56363
-rw-r--r--Documentation/hwmon/ucd90006
-rw-r--r--Documentation/hwmon/ucd920010
-rw-r--r--Documentation/hwmon/w83627ehf9
-rw-r--r--Documentation/hwmon/zl610026
-rw-r--r--Documentation/i2c/busses/i2c-i8011
-rw-r--r--Documentation/i2c/busses/scx200_acb2
-rw-r--r--Documentation/i2c/instantiating-devices6
-rw-r--r--Documentation/i2o/ioctl12
-rw-r--r--Documentation/ide/ChangeLog.ide-cd.1994-20042
-rw-r--r--Documentation/ide/ide.txt2
-rw-r--r--Documentation/input/alps.txt7
-rw-r--r--Documentation/input/input.txt4
-rw-r--r--Documentation/input/joystick.txt2
-rw-r--r--Documentation/ioctl/hdio.txt4
-rw-r--r--Documentation/ioctl/ioctl-number.txt6
-rw-r--r--Documentation/isdn/README.gigaset16
-rw-r--r--Documentation/kbuild/kconfig-language.txt2
-rw-r--r--Documentation/kbuild/kconfig.txt8
-rw-r--r--Documentation/kernel-parameters.txt81
-rw-r--r--Documentation/ko_KR/HOWTO2
-rw-r--r--Documentation/kobject.txt2
-rw-r--r--Documentation/laptops/asus-laptop.txt2
-rw-r--r--Documentation/laptops/sony-laptop.txt5
-rw-r--r--Documentation/laptops/sonypi.txt2
-rw-r--r--Documentation/leds/leds-lp5521.txt63
-rw-r--r--Documentation/lockup-watchdogs.txt63
-rw-r--r--Documentation/magic-number.txt2
-rw-r--r--Documentation/mono.txt8
-rw-r--r--Documentation/networking/LICENSE.qlge328
-rw-r--r--Documentation/networking/baycom.txt2
-rw-r--r--Documentation/networking/bonding.txt46
-rw-r--r--Documentation/networking/dl2k.txt11
-rw-r--r--Documentation/networking/dns_resolver.txt4
-rw-r--r--Documentation/networking/e100.txt6
-rw-r--r--Documentation/networking/fore200e.txt2
-rw-r--r--Documentation/networking/ipv6.txt6
-rw-r--r--Documentation/networking/ixgb.txt6
-rw-r--r--Documentation/networking/l2tp.txt2
-rw-r--r--Documentation/networking/ltpc.txt2
-rw-r--r--Documentation/networking/mac80211-auth-assoc-deauth.txt99
-rw-r--r--Documentation/networking/netdev-features.txt13
-rw-r--r--Documentation/networking/phy.txt3
-rw-r--r--Documentation/networking/ppp_generic.txt6
-rw-r--r--Documentation/networking/vortex.txt6
-rw-r--r--Documentation/nmi_watchdog.txt83
-rw-r--r--Documentation/numastat.txt27
-rw-r--r--Documentation/parport.txt13
-rw-r--r--Documentation/pinctrl.txt311
-rw-r--r--Documentation/power/devices.txt93
-rw-r--r--Documentation/power/freezing-of-tasks.txt21
-rw-r--r--Documentation/powerpc/firmware-assisted-dump.txt270
-rw-r--r--Documentation/powerpc/mpc52xx.txt12
-rw-r--r--Documentation/powerpc/phyp-assisted-dump.txt127
-rw-r--r--Documentation/remoteproc.txt322
-rw-r--r--Documentation/rpmsg.txt293
-rw-r--r--Documentation/s390/3270.txt21
-rw-r--r--Documentation/scheduler/sched-stats.txt3
-rw-r--r--Documentation/scsi/00-INDEX2
-rw-r--r--Documentation/scsi/ChangeLog.lpfc2
-rw-r--r--Documentation/scsi/ChangeLog.megaraid_sas2
-rw-r--r--Documentation/scsi/LICENSE.qla2xxx41
-rw-r--r--Documentation/scsi/aic79xx.txt2
-rw-r--r--Documentation/scsi/aic7xxx.txt2
-rw-r--r--Documentation/scsi/bfa.txt82
-rw-r--r--Documentation/scsi/libsas.txt15
-rw-r--r--Documentation/scsi/osst.txt2
-rw-r--r--Documentation/scsi/scsi-generic.txt2
-rw-r--r--Documentation/scsi/st.txt4
-rw-r--r--Documentation/scsi/tmscsim.txt2
-rw-r--r--Documentation/scsi/ufs.txt133
-rw-r--r--Documentation/security/00-INDEX2
-rw-r--r--Documentation/security/Smack.txt2
-rw-r--r--Documentation/security/Yama.txt65
-rw-r--r--Documentation/security/keys-trusted-encrypted.txt2
-rw-r--r--Documentation/security/keys.txt6
-rw-r--r--Documentation/serial/computone.txt8
-rw-r--r--Documentation/serial/rocket.txt2
-rw-r--r--Documentation/serial/stallion.txt4
-rw-r--r--Documentation/sound/alsa/ALSA-Configuration.txt20
-rw-r--r--Documentation/sound/alsa/Audiophile-Usb.txt4
-rw-r--r--Documentation/sound/alsa/HD-Audio-Models.txt79
-rw-r--r--Documentation/sound/alsa/HD-Audio.txt7
-rw-r--r--Documentation/sound/alsa/MIXART.txt6
-rw-r--r--Documentation/sound/alsa/OSS-Emulation.txt2
-rw-r--r--Documentation/sound/oss/AudioExcelDSP1610
-rw-r--r--Documentation/sound/oss/CMI83305
-rw-r--r--Documentation/sound/oss/Introduction10
-rw-r--r--Documentation/sound/oss/Opti8
-rw-r--r--Documentation/sound/oss/PAS164
-rw-r--r--Documentation/sound/oss/README.modules10
-rw-r--r--Documentation/spi/spi-summary58
-rw-r--r--Documentation/static-keys.txt286
-rw-r--r--Documentation/sysrq.txt5
-rwxr-xr-xDocumentation/target/tcm_mod_builder.py2
-rw-r--r--Documentation/trace/events-power.txt2
-rw-r--r--Documentation/trace/ftrace.txt7
-rw-r--r--Documentation/usb/mtouchusb.txt2
-rw-r--r--Documentation/usb/power-management.txt5
-rw-r--r--Documentation/usb/proc_usb_info.txt2
-rw-r--r--Documentation/video4linux/CARDLIST.cx238851
-rw-r--r--Documentation/video4linux/CARDLIST.cx884
-rw-r--r--Documentation/video4linux/CARDLIST.em28xx10
-rw-r--r--Documentation/video4linux/CARDLIST.saa71341
-rw-r--r--Documentation/video4linux/CARDLIST.tuner3
-rw-r--r--Documentation/video4linux/CQcam.txt14
-rw-r--r--Documentation/video4linux/Zoran2
-rw-r--r--Documentation/video4linux/bttv/Modules.conf2
-rw-r--r--Documentation/video4linux/fimc.txt178
-rw-r--r--Documentation/video4linux/gspca.txt1
-rw-r--r--Documentation/video4linux/meye.txt2
-rw-r--r--Documentation/video4linux/uvcvideo.txt2
-rw-r--r--Documentation/virtual/kvm/api.txt259
-rw-r--r--Documentation/virtual/kvm/mmu.txt4
-rw-r--r--Documentation/virtual/kvm/ppc-pv.txt24
-rw-r--r--Documentation/virtual/virtio-spec.txt8
-rw-r--r--Documentation/vm/Makefile8
-rw-r--r--Documentation/vm/cleancache.txt43
-rw-r--r--Documentation/vm/hugepage-mmap.c91
-rw-r--r--Documentation/vm/hugepage-shm.c98
-rw-r--r--Documentation/vm/map_hugetlb.c77
-rw-r--r--Documentation/vm/page-types.c1100
-rw-r--r--Documentation/vm/pagemap.txt4
-rw-r--r--Documentation/vm/unevictable-lru.txt8
-rw-r--r--Documentation/watchdog/00-INDEX19
-rw-r--r--Documentation/watchdog/convert_drivers_to_kernel_api.txt4
-rw-r--r--Documentation/watchdog/watchdog-kernel-api.txt13
-rw-r--r--Documentation/zh_CN/HOWTO2
-rw-r--r--Documentation/zh_CN/magic-number.txt2
288 files changed, 9888 insertions, 2711 deletions
diff --git a/Documentation/00-INDEX b/Documentation/00-INDEX
index 65bbd2622396..2214f123a976 100644
--- a/Documentation/00-INDEX
+++ b/Documentation/00-INDEX
@@ -7,8 +7,8 @@ Please try and keep the descriptions small enough to fit on one line.
7 7
8Following translations are available on the WWW: 8Following translations are available on the WWW:
9 9
10 - Japanese, maintained by the JF Project (JF@linux.or.jp), at 10 - Japanese, maintained by the JF Project (jf@listserv.linux.or.jp), at
11 http://www.linux.or.jp/JF/ 11 http://linuxjf.sourceforge.jp/
12 12
1300-INDEX 1300-INDEX
14 - this file. 14 - this file.
@@ -104,6 +104,8 @@ cpuidle/
104 - info on CPU_IDLE, CPU idle state management subsystem. 104 - info on CPU_IDLE, CPU idle state management subsystem.
105cputopology.txt 105cputopology.txt
106 - documentation on how CPU topology info is exported via sysfs. 106 - documentation on how CPU topology info is exported via sysfs.
107crc32.txt
108 - brief tutorial on CRC computation
107cris/ 109cris/
108 - directory with info about Linux on CRIS architecture. 110 - directory with info about Linux on CRIS architecture.
109crypto/ 111crypto/
diff --git a/Documentation/ABI/obsolete/sysfs-class-rfkill b/Documentation/ABI/obsolete/sysfs-class-rfkill
index 4201d5b05515..ff60ad9eca4c 100644
--- a/Documentation/ABI/obsolete/sysfs-class-rfkill
+++ b/Documentation/ABI/obsolete/sysfs-class-rfkill
@@ -7,7 +7,7 @@ Date: 09-Jul-2007
7KernelVersion v2.6.22 7KernelVersion v2.6.22
8Contact: linux-wireless@vger.kernel.org 8Contact: linux-wireless@vger.kernel.org
9Description: Current state of the transmitter. 9Description: Current state of the transmitter.
10 This file is deprecated and sheduled to be removed in 2014, 10 This file is deprecated and scheduled to be removed in 2014,
11 because its not possible to express the 'soft and hard block' 11 because its not possible to express the 'soft and hard block'
12 state of the rfkill driver. 12 state of the rfkill driver.
13Values: A numeric value. 13Values: A numeric value.
diff --git a/Documentation/ABI/removed/devfs b/Documentation/ABI/removed/devfs
index 8ffd28bf6598..0020c49933c4 100644
--- a/Documentation/ABI/removed/devfs
+++ b/Documentation/ABI/removed/devfs
@@ -1,6 +1,6 @@
1What: devfs 1What: devfs
2Date: July 2005 (scheduled), finally removed in kernel v2.6.18 2Date: July 2005 (scheduled), finally removed in kernel v2.6.18
3Contact: Greg Kroah-Hartman <gregkh@suse.de> 3Contact: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4Description: 4Description:
5 devfs has been unmaintained for a number of years, has unfixable 5 devfs has been unmaintained for a number of years, has unfixable
6 races, contains a naming policy within the kernel that is 6 races, contains a naming policy within the kernel that is
diff --git a/Documentation/ABI/stable/sysfs-driver-usb-usbtmc b/Documentation/ABI/stable/sysfs-driver-usb-usbtmc
index 9a75fb22187d..2a7f9a00cb0a 100644
--- a/Documentation/ABI/stable/sysfs-driver-usb-usbtmc
+++ b/Documentation/ABI/stable/sysfs-driver-usb-usbtmc
@@ -1,7 +1,7 @@
1What: /sys/bus/usb/drivers/usbtmc/devices/*/interface_capabilities 1What: /sys/bus/usb/drivers/usbtmc/devices/*/interface_capabilities
2What: /sys/bus/usb/drivers/usbtmc/devices/*/device_capabilities 2What: /sys/bus/usb/drivers/usbtmc/devices/*/device_capabilities
3Date: August 2008 3Date: August 2008
4Contact: Greg Kroah-Hartman <gregkh@suse.de> 4Contact: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5Description: 5Description:
6 These files show the various USB TMC capabilities as described 6 These files show the various USB TMC capabilities as described
7 by the device itself. The full description of the bitfields 7 by the device itself. The full description of the bitfields
@@ -15,7 +15,7 @@ Description:
15What: /sys/bus/usb/drivers/usbtmc/devices/*/usb488_interface_capabilities 15What: /sys/bus/usb/drivers/usbtmc/devices/*/usb488_interface_capabilities
16What: /sys/bus/usb/drivers/usbtmc/devices/*/usb488_device_capabilities 16What: /sys/bus/usb/drivers/usbtmc/devices/*/usb488_device_capabilities
17Date: August 2008 17Date: August 2008
18Contact: Greg Kroah-Hartman <gregkh@suse.de> 18Contact: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
19Description: 19Description:
20 These files show the various USB TMC capabilities as described 20 These files show the various USB TMC capabilities as described
21 by the device itself. The full description of the bitfields 21 by the device itself. The full description of the bitfields
@@ -29,7 +29,7 @@ Description:
29 29
30What: /sys/bus/usb/drivers/usbtmc/devices/*/TermChar 30What: /sys/bus/usb/drivers/usbtmc/devices/*/TermChar
31Date: August 2008 31Date: August 2008
32Contact: Greg Kroah-Hartman <gregkh@suse.de> 32Contact: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
33Description: 33Description:
34 This file is the TermChar value to be sent to the USB TMC 34 This file is the TermChar value to be sent to the USB TMC
35 device as described by the document, "Universal Serial Bus Test 35 device as described by the document, "Universal Serial Bus Test
@@ -42,7 +42,7 @@ Description:
42 42
43What: /sys/bus/usb/drivers/usbtmc/devices/*/TermCharEnabled 43What: /sys/bus/usb/drivers/usbtmc/devices/*/TermCharEnabled
44Date: August 2008 44Date: August 2008
45Contact: Greg Kroah-Hartman <gregkh@suse.de> 45Contact: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
46Description: 46Description:
47 This file determines if the TermChar is to be sent to the 47 This file determines if the TermChar is to be sent to the
48 device on every transaction or not. For more details about 48 device on every transaction or not. For more details about
@@ -53,9 +53,9 @@ Description:
53 53
54What: /sys/bus/usb/drivers/usbtmc/devices/*/auto_abort 54What: /sys/bus/usb/drivers/usbtmc/devices/*/auto_abort
55Date: August 2008 55Date: August 2008
56Contact: Greg Kroah-Hartman <gregkh@suse.de> 56Contact: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
57Description: 57Description:
58 This file determines if the the transaction of the USB TMC 58 This file determines if the transaction of the USB TMC
59 device is to be automatically aborted if there is any error. 59 device is to be automatically aborted if there is any error.
60 For more details about this, please see the document, 60 For more details about this, please see the document,
61 "Universal Serial Bus Test and Measurement Class Specification 61 "Universal Serial Bus Test and Measurement Class Specification
diff --git a/Documentation/ABI/stable/sysfs-module b/Documentation/ABI/stable/sysfs-module
index 75be43118335..a0dd21c6db59 100644
--- a/Documentation/ABI/stable/sysfs-module
+++ b/Documentation/ABI/stable/sysfs-module
@@ -6,7 +6,7 @@ Description:
6 The name of the module that is in the kernel. This 6 The name of the module that is in the kernel. This
7 module name will show up either if the module is built 7 module name will show up either if the module is built
8 directly into the kernel, or if it is loaded as a 8 directly into the kernel, or if it is loaded as a
9 dyanmic module. 9 dynamic module.
10 10
11 /sys/module/MODULENAME/parameters 11 /sys/module/MODULENAME/parameters
12 This directory contains individual files that are each 12 This directory contains individual files that are each
diff --git a/Documentation/ABI/testing/debugfs-olpc b/Documentation/ABI/testing/debugfs-olpc
new file mode 100644
index 000000000000..bd76cc6d55f9
--- /dev/null
+++ b/Documentation/ABI/testing/debugfs-olpc
@@ -0,0 +1,16 @@
1What: /sys/kernel/debug/olpc-ec/cmd
2Date: Dec 2011
3KernelVersion: 3.4
4Contact: devel@lists.laptop.org
5Description:
6
7A generic interface for executing OLPC Embedded Controller commands and
8reading their responses.
9
10To execute a command, write data with the format: CC:N A A A A
11CC is the (hex) command, N is the count of expected reply bytes, and A A A A
12are optional (hex) arguments.
13
14To read the response (if any), read from the generic node after executing
15a command. Hex reply bytes will be returned, *whether or not* they came from
16the immediately previous command.
diff --git a/Documentation/ABI/testing/sysfs-block-dm b/Documentation/ABI/testing/sysfs-block-dm
new file mode 100644
index 000000000000..87ca5691e29b
--- /dev/null
+++ b/Documentation/ABI/testing/sysfs-block-dm
@@ -0,0 +1,25 @@
1What: /sys/block/dm-<num>/dm/name
2Date: January 2009
3KernelVersion: 2.6.29
4Contact: dm-devel@redhat.com
5Description: Device-mapper device name.
6 Read-only string containing mapped device name.
7Users: util-linux, device-mapper udev rules
8
9What: /sys/block/dm-<num>/dm/uuid
10Date: January 2009
11KernelVersion: 2.6.29
12Contact: dm-devel@redhat.com
13Description: Device-mapper device UUID.
14 Read-only string containing DM-UUID or empty string
15 if DM-UUID is not set.
16Users: util-linux, device-mapper udev rules
17
18What: /sys/block/dm-<num>/dm/suspended
19Date: June 2009
20KernelVersion: 2.6.31
21Contact: dm-devel@redhat.com
22Description: Device-mapper device suspend state.
23 Contains the value 1 while the device is suspended.
24 Otherwise it contains 0. Read-only attribute.
25Users: util-linux, device-mapper udev rules
diff --git a/Documentation/ABI/testing/sysfs-bus-event_source-devices-format b/Documentation/ABI/testing/sysfs-bus-event_source-devices-format
new file mode 100644
index 000000000000..079afc71363d
--- /dev/null
+++ b/Documentation/ABI/testing/sysfs-bus-event_source-devices-format
@@ -0,0 +1,14 @@
1Where: /sys/bus/event_source/devices/<dev>/format
2Date: January 2012
3Kernel Version: 3.3
4Contact: Jiri Olsa <jolsa@redhat.com>
5Description:
6 Attribute group to describe the magic bits that go into
7 perf_event_attr::config[012] for a particular pmu.
8 Each attribute of this group defines the 'hardware' bitmask
9 we want to export, so that userspace can deal with sane
10 name/value pairs.
11
12 Example: 'config1:1,6-10,44'
13 Defines contents of attribute that occupies bits 1,6-10,44 of
14 perf_event_attr::config1.
diff --git a/Documentation/ABI/testing/sysfs-bus-rpmsg b/Documentation/ABI/testing/sysfs-bus-rpmsg
new file mode 100644
index 000000000000..189e419a5a2d
--- /dev/null
+++ b/Documentation/ABI/testing/sysfs-bus-rpmsg
@@ -0,0 +1,75 @@
1What: /sys/bus/rpmsg/devices/.../name
2Date: June 2011
3KernelVersion: 3.3
4Contact: Ohad Ben-Cohen <ohad@wizery.com>
5Description:
6 Every rpmsg device is a communication channel with a remote
7 processor. Channels are identified with a (textual) name,
8 which is maximum 32 bytes long (defined as RPMSG_NAME_SIZE in
9 rpmsg.h).
10
11 This sysfs entry contains the name of this channel.
12
13What: /sys/bus/rpmsg/devices/.../src
14Date: June 2011
15KernelVersion: 3.3
16Contact: Ohad Ben-Cohen <ohad@wizery.com>
17Description:
18 Every rpmsg device is a communication channel with a remote
19 processor. Channels have a local ("source") rpmsg address,
20 and remote ("destination") rpmsg address. When an entity
21 starts listening on one end of a channel, it assigns it with
22 a unique rpmsg address (a 32 bits integer). This way when
23 inbound messages arrive to this address, the rpmsg core
24 dispatches them to the listening entity (a kernel driver).
25
26 This sysfs entry contains the src (local) rpmsg address
27 of this channel. If it contains 0xffffffff, then an address
28 wasn't assigned (can happen if no driver exists for this
29 channel).
30
31What: /sys/bus/rpmsg/devices/.../dst
32Date: June 2011
33KernelVersion: 3.3
34Contact: Ohad Ben-Cohen <ohad@wizery.com>
35Description:
36 Every rpmsg device is a communication channel with a remote
37 processor. Channels have a local ("source") rpmsg address,
38 and remote ("destination") rpmsg address. When an entity
39 starts listening on one end of a channel, it assigns it with
40 a unique rpmsg address (a 32 bits integer). This way when
41 inbound messages arrive to this address, the rpmsg core
42 dispatches them to the listening entity.
43
44 This sysfs entry contains the dst (remote) rpmsg address
45 of this channel. If it contains 0xffffffff, then an address
46 wasn't assigned (can happen if the kernel driver that
47 is attached to this channel is exposing a service to the
48 remote processor. This make it a local rpmsg server,
49 and it is listening for inbound messages that may be sent
50 from any remote rpmsg client; it is not bound to a single
51 remote entity).
52
53What: /sys/bus/rpmsg/devices/.../announce
54Date: June 2011
55KernelVersion: 3.3
56Contact: Ohad Ben-Cohen <ohad@wizery.com>
57Description:
58 Every rpmsg device is a communication channel with a remote
59 processor. Channels are identified by a textual name (see
60 /sys/bus/rpmsg/devices/.../name above) and have a local
61 ("source") rpmsg address, and remote ("destination") rpmsg
62 address.
63
64 A channel is first created when an entity, whether local
65 or remote, starts listening on it for messages (and is thus
66 called an rpmsg server).
67
68 When that happens, a "name service" announcement is sent
69 to the other processor, in order to let it know about the
70 creation of the channel (this way remote clients know they
71 can start sending messages).
72
73 This sysfs entry tells us whether the channel is a local
74 server channel that is announced (values are either
75 true or false).
diff --git a/Documentation/ABI/testing/sysfs-bus-usb b/Documentation/ABI/testing/sysfs-bus-usb
index b4f548792e32..7c22a532fdfb 100644
--- a/Documentation/ABI/testing/sysfs-bus-usb
+++ b/Documentation/ABI/testing/sysfs-bus-usb
@@ -182,3 +182,14 @@ Description:
182 USB2 hardware LPM is enabled for the device. Developer can 182 USB2 hardware LPM is enabled for the device. Developer can
183 write y/Y/1 or n/N/0 to the file to enable/disable the 183 write y/Y/1 or n/N/0 to the file to enable/disable the
184 feature. 184 feature.
185
186What: /sys/bus/usb/devices/.../removable
187Date: February 2012
188Contact: Matthew Garrett <mjg@redhat.com>
189Description:
190 Some information about whether a given USB device is
191 physically fixed to the platform can be inferred from a
192 combination of hub decriptor bits and platform-specific data
193 such as ACPI. This file will read either "removable" or
194 "fixed" if the information is available, and "unknown"
195 otherwise. \ No newline at end of file
diff --git a/Documentation/ABI/testing/sysfs-class b/Documentation/ABI/testing/sysfs-class
index 4b0cb891e46e..676530fcf747 100644
--- a/Documentation/ABI/testing/sysfs-class
+++ b/Documentation/ABI/testing/sysfs-class
@@ -1,6 +1,6 @@
1What: /sys/class/ 1What: /sys/class/
2Date: Febuary 2006 2Date: Febuary 2006
3Contact: Greg Kroah-Hartman <gregkh@suse.de> 3Contact: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4Description: 4Description:
5 The /sys/class directory will consist of a group of 5 The /sys/class directory will consist of a group of
6 subdirectories describing individual classes of devices 6 subdirectories describing individual classes of devices
diff --git a/Documentation/ABI/testing/sysfs-class-net-mesh b/Documentation/ABI/testing/sysfs-class-net-mesh
index b02001488eef..b218e0f8bdb3 100644
--- a/Documentation/ABI/testing/sysfs-class-net-mesh
+++ b/Documentation/ABI/testing/sysfs-class-net-mesh
@@ -65,6 +65,13 @@ Description:
65 Defines the penalty which will be applied to an 65 Defines the penalty which will be applied to an
66 originator message's tq-field on every hop. 66 originator message's tq-field on every hop.
67 67
68What: /sys/class/net/<mesh_iface>/mesh/routing_algo
69Date: Dec 2011
70Contact: Marek Lindner <lindner_marek@yahoo.de>
71Description:
72 Defines the routing procotol this mesh instance
73 uses to find the optimal paths through the mesh.
74
68What: /sys/class/net/<mesh_iface>/mesh/vis_mode 75What: /sys/class/net/<mesh_iface>/mesh/vis_mode
69Date: May 2010 76Date: May 2010
70Contact: Marek Lindner <lindner_marek@yahoo.de> 77Contact: Marek Lindner <lindner_marek@yahoo.de>
diff --git a/Documentation/ABI/testing/sysfs-devices b/Documentation/ABI/testing/sysfs-devices
index 6a25671ee5f6..5fcc94358b8d 100644
--- a/Documentation/ABI/testing/sysfs-devices
+++ b/Documentation/ABI/testing/sysfs-devices
@@ -1,6 +1,6 @@
1What: /sys/devices 1What: /sys/devices
2Date: February 2006 2Date: February 2006
3Contact: Greg Kroah-Hartman <gregkh@suse.de> 3Contact: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4Description: 4Description:
5 The /sys/devices tree contains a snapshot of the 5 The /sys/devices tree contains a snapshot of the
6 internal state of the kernel device tree. Devices will 6 internal state of the kernel device tree. Devices will
diff --git a/Documentation/ABI/testing/sysfs-devices-power b/Documentation/ABI/testing/sysfs-devices-power
index 8ffbc25376a0..840f7d64d483 100644
--- a/Documentation/ABI/testing/sysfs-devices-power
+++ b/Documentation/ABI/testing/sysfs-devices-power
@@ -165,3 +165,21 @@ Description:
165 165
166 Not all drivers support this attribute. If it isn't supported, 166 Not all drivers support this attribute. If it isn't supported,
167 attempts to read or write it will yield I/O errors. 167 attempts to read or write it will yield I/O errors.
168
169What: /sys/devices/.../power/pm_qos_latency_us
170Date: March 2012
171Contact: Rafael J. Wysocki <rjw@sisk.pl>
172Description:
173 The /sys/devices/.../power/pm_qos_resume_latency_us attribute
174 contains the PM QoS resume latency limit for the given device,
175 which is the maximum allowed time it can take to resume the
176 device, after it has been suspended at run time, from a resume
177 request to the moment the device will be ready to process I/O,
178 in microseconds. If it is equal to 0, however, this means that
179 the PM QoS resume latency may be arbitrary.
180
181 Not all drivers support this attribute. If it isn't supported,
182 it is not present.
183
184 This attribute has no effect on system-wide suspend/resume and
185 hibernation.
diff --git a/Documentation/ABI/testing/sysfs-devices-soc b/Documentation/ABI/testing/sysfs-devices-soc
new file mode 100644
index 000000000000..6d9cc253f2b2
--- /dev/null
+++ b/Documentation/ABI/testing/sysfs-devices-soc
@@ -0,0 +1,58 @@
1What: /sys/devices/socX
2Date: January 2012
3contact: Lee Jones <lee.jones@linaro.org>
4Description:
5 The /sys/devices/ directory contains a sub-directory for each
6 System-on-Chip (SoC) device on a running platform. Information
7 regarding each SoC can be obtained by reading sysfs files. This
8 functionality is only available if implemented by the platform.
9
10 The directory created for each SoC will also house information
11 about devices which are commonly contained in /sys/devices/platform.
12 It has been agreed that if an SoC device exists, its supported
13 devices would be better suited to appear as children of that SoC.
14
15What: /sys/devices/socX/machine
16Date: January 2012
17contact: Lee Jones <lee.jones@linaro.org>
18Description:
19 Read-only attribute common to all SoCs. Contains the SoC machine
20 name (e.g. Ux500).
21
22What: /sys/devices/socX/family
23Date: January 2012
24contact: Lee Jones <lee.jones@linaro.org>
25Description:
26 Read-only attribute common to all SoCs. Contains SoC family name
27 (e.g. DB8500).
28
29What: /sys/devices/socX/soc_id
30Date: January 2012
31contact: Lee Jones <lee.jones@linaro.org>
32Description:
33 Read-only attribute supported by most SoCs. In the case of
34 ST-Ericsson's chips this contains the SoC serial number.
35
36What: /sys/devices/socX/revision
37Date: January 2012
38contact: Lee Jones <lee.jones@linaro.org>
39Description:
40 Read-only attribute supported by most SoCs. Contains the SoC's
41 manufacturing revision number.
42
43What: /sys/devices/socX/process
44Date: January 2012
45contact: Lee Jones <lee.jones@linaro.org>
46Description:
47 Read-only attribute supported ST-Ericsson's silicon. Contains the
48 the process by which the silicon chip was manufactured.
49
50What: /sys/bus/soc
51Date: January 2012
52contact: Lee Jones <lee.jones@linaro.org>
53Description:
54 The /sys/bus/soc/ directory contains the usual sub-folders
55 expected under most buses. /sys/bus/soc/devices is of particular
56 interest, as it contains a symlink for each SoC device found on
57 the system. Each symlink points back into the aforementioned
58 /sys/devices/socX devices.
diff --git a/Documentation/ABI/testing/sysfs-driver-samsung-laptop b/Documentation/ABI/testing/sysfs-driver-samsung-laptop
index 0a810231aad4..678819a3f8bf 100644
--- a/Documentation/ABI/testing/sysfs-driver-samsung-laptop
+++ b/Documentation/ABI/testing/sysfs-driver-samsung-laptop
@@ -1,7 +1,7 @@
1What: /sys/devices/platform/samsung/performance_level 1What: /sys/devices/platform/samsung/performance_level
2Date: January 1, 2010 2Date: January 1, 2010
3KernelVersion: 2.6.33 3KernelVersion: 2.6.33
4Contact: Greg Kroah-Hartman <gregkh@suse.de> 4Contact: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5Description: Some Samsung laptops have different "performance levels" 5Description: Some Samsung laptops have different "performance levels"
6 that are can be modified by a function key, and by this 6 that are can be modified by a function key, and by this
7 sysfs file. These values don't always make a whole lot 7 sysfs file. These values don't always make a whole lot
@@ -17,3 +17,21 @@ Description: Some Samsung laptops have different "performance levels"
17 Specifically, not all support the "overclock" option, 17 Specifically, not all support the "overclock" option,
18 and it's still unknown if this value even changes 18 and it's still unknown if this value even changes
19 anything, other than making the user feel a bit better. 19 anything, other than making the user feel a bit better.
20
21What: /sys/devices/platform/samsung/battery_life_extender
22Date: December 1, 2011
23KernelVersion: 3.3
24Contact: Corentin Chary <corentin.chary@gmail.com>
25Description: Max battery charge level can be modified, battery cycle
26 life can be extended by reducing the max battery charge
27 level.
28 0 means normal battery mode (100% charge)
29 1 means battery life extender mode (80% charge)
30
31What: /sys/devices/platform/samsung/usb_charge
32Date: December 1, 2011
33KernelVersion: 3.3
34Contact: Corentin Chary <corentin.chary@gmail.com>
35Description: Use your USB ports to charge devices, even
36 when your laptop is powered off.
37 1 means enabled, 0 means disabled.
diff --git a/Documentation/ABI/testing/sysfs-firmware-acpi b/Documentation/ABI/testing/sysfs-firmware-acpi
index 4f9ba3c2fca7..dd930c8db41f 100644
--- a/Documentation/ABI/testing/sysfs-firmware-acpi
+++ b/Documentation/ABI/testing/sysfs-firmware-acpi
@@ -1,3 +1,23 @@
1What: /sys/firmware/acpi/bgrt/
2Date: January 2012
3Contact: Matthew Garrett <mjg@redhat.com>
4Description:
5 The BGRT is an ACPI 5.0 feature that allows the OS
6 to obtain a copy of the firmware boot splash and
7 some associated metadata. This is intended to be used
8 by boot splash applications in order to interact with
9 the firmware boot splash in order to avoid jarring
10 transitions.
11
12 image: The image bitmap. Currently a 32-bit BMP.
13 status: 1 if the image is valid, 0 if firmware invalidated it.
14 type: 0 indicates image is in BMP format.
15 version: The version of the BGRT. Currently 1.
16 xoffset: The number of pixels between the left of the screen
17 and the left edge of the image.
18 yoffset: The number of pixels between the top of the screen
19 and the top edge of the image.
20
1What: /sys/firmware/acpi/interrupts/ 21What: /sys/firmware/acpi/interrupts/
2Date: February 2008 22Date: February 2008
3Contact: Len Brown <lenb@kernel.org> 23Contact: Len Brown <lenb@kernel.org>
diff --git a/Documentation/ABI/testing/sysfs-kernel-mm-cleancache b/Documentation/ABI/testing/sysfs-kernel-mm-cleancache
deleted file mode 100644
index 662ae646ea12..000000000000
--- a/Documentation/ABI/testing/sysfs-kernel-mm-cleancache
+++ /dev/null
@@ -1,11 +0,0 @@
1What: /sys/kernel/mm/cleancache/
2Date: April 2011
3Contact: Dan Magenheimer <dan.magenheimer@oracle.com>
4Description:
5 /sys/kernel/mm/cleancache/ contains a number of files which
6 record a count of various cleancache operations
7 (sum across all filesystems):
8 succ_gets
9 failed_gets
10 puts
11 flushes
diff --git a/Documentation/CodingStyle b/Documentation/CodingStyle
index 2b90d328b3ba..c58b236bbe04 100644
--- a/Documentation/CodingStyle
+++ b/Documentation/CodingStyle
@@ -793,6 +793,35 @@ own custom mode, or may have some other magic method for making indentation
793work correctly. 793work correctly.
794 794
795 795
796 Chapter 19: Inline assembly
797
798In architecture-specific code, you may need to use inline assembly to interface
799with CPU or platform functionality. Don't hesitate to do so when necessary.
800However, don't use inline assembly gratuitously when C can do the job. You can
801and should poke hardware from C when possible.
802
803Consider writing simple helper functions that wrap common bits of inline
804assembly, rather than repeatedly writing them with slight variations. Remember
805that inline assembly can use C parameters.
806
807Large, non-trivial assembly functions should go in .S files, with corresponding
808C prototypes defined in C header files. The C prototypes for assembly
809functions should use "asmlinkage".
810
811You may need to mark your asm statement as volatile, to prevent GCC from
812removing it if GCC doesn't notice any side effects. You don't always need to
813do so, though, and doing so unnecessarily can limit optimization.
814
815When writing a single inline assembly statement containing multiple
816instructions, put each instruction on a separate line in a separate quoted
817string, and end each string except the last with \n\t to properly indent the
818next instruction in the assembly output:
819
820 asm ("magic %reg1, #42\n\t"
821 "more_magic %reg2, %reg3"
822 : /* outputs */ : /* inputs */ : /* clobbers */);
823
824
796 825
797 Appendix I: References 826 Appendix I: References
798 827
diff --git a/Documentation/DocBook/80211.tmpl b/Documentation/DocBook/80211.tmpl
index 2014155c899d..c5ac6929c41c 100644
--- a/Documentation/DocBook/80211.tmpl
+++ b/Documentation/DocBook/80211.tmpl
@@ -129,7 +129,6 @@
129!Finclude/net/cfg80211.h cfg80211_pmksa 129!Finclude/net/cfg80211.h cfg80211_pmksa
130!Finclude/net/cfg80211.h cfg80211_send_rx_auth 130!Finclude/net/cfg80211.h cfg80211_send_rx_auth
131!Finclude/net/cfg80211.h cfg80211_send_auth_timeout 131!Finclude/net/cfg80211.h cfg80211_send_auth_timeout
132!Finclude/net/cfg80211.h __cfg80211_auth_canceled
133!Finclude/net/cfg80211.h cfg80211_send_rx_assoc 132!Finclude/net/cfg80211.h cfg80211_send_rx_assoc
134!Finclude/net/cfg80211.h cfg80211_send_assoc_timeout 133!Finclude/net/cfg80211.h cfg80211_send_assoc_timeout
135!Finclude/net/cfg80211.h cfg80211_send_deauth 134!Finclude/net/cfg80211.h cfg80211_send_deauth
diff --git a/Documentation/DocBook/device-drivers.tmpl b/Documentation/DocBook/device-drivers.tmpl
index 9c27e5125dd2..7514dbf0a679 100644
--- a/Documentation/DocBook/device-drivers.tmpl
+++ b/Documentation/DocBook/device-drivers.tmpl
@@ -446,4 +446,21 @@ X!Idrivers/video/console/fonts.c
446!Edrivers/i2c/i2c-core.c 446!Edrivers/i2c/i2c-core.c
447 </chapter> 447 </chapter>
448 448
449 <chapter id="hsi">
450 <title>High Speed Synchronous Serial Interface (HSI)</title>
451
452 <para>
453 High Speed Synchronous Serial Interface (HSI) is a
454 serial interface mainly used for connecting application
455 engines (APE) with cellular modem engines (CMT) in cellular
456 handsets.
457
458 HSI provides multiplexing for up to 16 logical channels,
459 low-latency and full duplex communication.
460 </para>
461
462!Iinclude/linux/hsi/hsi.h
463!Edrivers/hsi/hsi.c
464 </chapter>
465
449</book> 466</book>
diff --git a/Documentation/DocBook/filesystems.tmpl b/Documentation/DocBook/filesystems.tmpl
index f51f28531b8d..3fca32c41927 100644
--- a/Documentation/DocBook/filesystems.tmpl
+++ b/Documentation/DocBook/filesystems.tmpl
@@ -387,7 +387,7 @@ an example.
387 <title>See also</title> 387 <title>See also</title>
388 <para> 388 <para>
389 <citation> 389 <citation>
390 <ulink url="ftp://ftp.uk.linux.org/pub/linux/sct/fs/jfs/journal-design.ps.gz"> 390 <ulink url="http://kernel.org/pub/linux/kernel/people/sct/ext3/journal-design.ps.gz">
391 Journaling the Linux ext2fs Filesystem, LinuxExpo 98, Stephen Tweedie 391 Journaling the Linux ext2fs Filesystem, LinuxExpo 98, Stephen Tweedie
392 </ulink> 392 </ulink>
393 </citation> 393 </citation>
diff --git a/Documentation/DocBook/kgdb.tmpl b/Documentation/DocBook/kgdb.tmpl
index d71b57fcf116..4ee4ba3509fc 100644
--- a/Documentation/DocBook/kgdb.tmpl
+++ b/Documentation/DocBook/kgdb.tmpl
@@ -362,6 +362,23 @@
362 </para> 362 </para>
363 </para> 363 </para>
364 </sect1> 364 </sect1>
365 <sect1 id="kgdbreboot">
366 <title>Run time parameter: kgdbreboot</title>
367 <para> The kgdbreboot feature allows you to change how the debugger
368 deals with the reboot notification. You have 3 choices for the
369 behavior. The default behavior is always set to 0.</para>
370 <orderedlist>
371 <listitem><para>echo -1 > /sys/module/debug_core/parameters/kgdbreboot</para>
372 <para>Ignore the reboot notification entirely.</para>
373 </listitem>
374 <listitem><para>echo 0 > /sys/module/debug_core/parameters/kgdbreboot</para>
375 <para>Send the detach message to any attached debugger client.</para>
376 </listitem>
377 <listitem><para>echo 1 > /sys/module/debug_core/parameters/kgdbreboot</para>
378 <para>Enter the debugger on reboot notify.</para>
379 </listitem>
380 </orderedlist>
381 </sect1>
365 </chapter> 382 </chapter>
366 <chapter id="usingKDB"> 383 <chapter id="usingKDB">
367 <title>Using kdb</title> 384 <title>Using kdb</title>
diff --git a/Documentation/DocBook/libata.tmpl b/Documentation/DocBook/libata.tmpl
index cdd1bb9aac0d..31df1aa00710 100644
--- a/Documentation/DocBook/libata.tmpl
+++ b/Documentation/DocBook/libata.tmpl
@@ -22,8 +22,8 @@
22 <para> 22 <para>
23 The contents of this file are subject to the Open 23 The contents of this file are subject to the Open
24 Software License version 1.1 that can be found at 24 Software License version 1.1 that can be found at
25 <ulink url="http://www.opensource.org/licenses/osl-1.1.txt">http://www.opensource.org/licenses/osl-1.1.txt</ulink> and is included herein 25 <ulink url="http://fedoraproject.org/wiki/Licensing:OSL1.1">http://fedoraproject.org/wiki/Licensing:OSL1.1</ulink>
26 by reference. 26 and is included herein by reference.
27 </para> 27 </para>
28 28
29 <para> 29 <para>
@@ -945,7 +945,7 @@ and other resources, etc.
945 945
946 <listitem> 946 <listitem>
947 <para> 947 <para>
948 !BSY &amp;&amp; ERR after CDB tranfer starts but before the 948 !BSY &amp;&amp; ERR after CDB transfer starts but before the
949 last byte of CDB is transferred. ATA/ATAPI standard states 949 last byte of CDB is transferred. ATA/ATAPI standard states
950 that &quot;The device shall not terminate the PACKET command 950 that &quot;The device shall not terminate the PACKET command
951 with an error before the last byte of the command packet has 951 with an error before the last byte of the command packet has
@@ -1050,7 +1050,7 @@ and other resources, etc.
1050 to complete a command. Combined with the fact that MWDMA 1050 to complete a command. Combined with the fact that MWDMA
1051 and PIO transfer errors aren't allowed to use ICRC bit up to 1051 and PIO transfer errors aren't allowed to use ICRC bit up to
1052 ATA/ATAPI-7, it seems to imply that ABRT bit alone could 1052 ATA/ATAPI-7, it seems to imply that ABRT bit alone could
1053 indicate tranfer errors. 1053 indicate transfer errors.
1054 </para> 1054 </para>
1055 <para> 1055 <para>
1056 However, ATA/ATAPI-8 draft revision 1f removes the part 1056 However, ATA/ATAPI-8 draft revision 1f removes the part
diff --git a/Documentation/DocBook/media/v4l/biblio.xml b/Documentation/DocBook/media/v4l/biblio.xml
index cea6fd3ed428..7dc65c592a87 100644
--- a/Documentation/DocBook/media/v4l/biblio.xml
+++ b/Documentation/DocBook/media/v4l/biblio.xml
@@ -128,6 +128,26 @@ url="http://www.ijg.org">http://www.ijg.org</ulink>)</corpauthor>
128 <subtitle>Version 1.02</subtitle> 128 <subtitle>Version 1.02</subtitle>
129 </biblioentry> 129 </biblioentry>
130 130
131 <biblioentry id="itu-t81">
132 <abbrev>ITU-T.81</abbrev>
133 <authorgroup>
134 <corpauthor>International Telecommunication Union
135(<ulink url="http://www.itu.int">http://www.itu.int</ulink>)</corpauthor>
136 </authorgroup>
137 <title>ITU-T Recommendation T.81
138"Information Technology &mdash; Digital Compression and Coding of Continous-Tone
139Still Images &mdash; Requirements and Guidelines"</title>
140 </biblioentry>
141
142 <biblioentry id="w3c-jpeg-jfif">
143 <abbrev>W3C JPEG JFIF</abbrev>
144 <authorgroup>
145 <corpauthor>The World Wide Web Consortium (<ulink
146url="http://www.w3.org/Graphics/JPEG">http://www.w3.org</ulink>)</corpauthor>
147 </authorgroup>
148 <title>JPEG JFIF</title>
149 </biblioentry>
150
131 <biblioentry id="smpte12m"> 151 <biblioentry id="smpte12m">
132 <abbrev>SMPTE&nbsp;12M</abbrev> 152 <abbrev>SMPTE&nbsp;12M</abbrev>
133 <authorgroup> 153 <authorgroup>
diff --git a/Documentation/DocBook/media/v4l/compat.xml b/Documentation/DocBook/media/v4l/compat.xml
index c736380b4647..bce97c50391b 100644
--- a/Documentation/DocBook/media/v4l/compat.xml
+++ b/Documentation/DocBook/media/v4l/compat.xml
@@ -444,7 +444,7 @@ linkend="pixfmt-rgb"><constant>V4L2_PIX_FMT_BGR24</constant></link></para></entr
444 <entry><para><link 444 <entry><para><link
445linkend="pixfmt-rgb"><constant>V4L2_PIX_FMT_BGR32</constant></link><footnote> 445linkend="pixfmt-rgb"><constant>V4L2_PIX_FMT_BGR32</constant></link><footnote>
446 <para>Presumably all V4L RGB formats are 446 <para>Presumably all V4L RGB formats are
447little-endian, although some drivers might interpret them according to machine endianess. V4L2 defines little-endian, big-endian and red/blue 447little-endian, although some drivers might interpret them according to machine endianness. V4L2 defines little-endian, big-endian and red/blue
448swapped variants. For details see <xref linkend="pixfmt-rgb" />.</para> 448swapped variants. For details see <xref linkend="pixfmt-rgb" />.</para>
449 </footnote></para></entry> 449 </footnote></para></entry>
450 </row> 450 </row>
@@ -823,7 +823,7 @@ standard); 35468950&nbsp;Hz PAL and SECAM (625-line standards)</entry>
823 <row> 823 <row>
824 <entry>sample_format</entry> 824 <entry>sample_format</entry>
825 <entry>V4L2_PIX_FMT_GREY. The last four bytes (a 825 <entry>V4L2_PIX_FMT_GREY. The last four bytes (a
826machine endianess integer) contain a frame counter.</entry> 826machine endianness integer) contain a frame counter.</entry>
827 </row> 827 </row>
828 <row> 828 <row>
829 <entry>start[]</entry> 829 <entry>start[]</entry>
@@ -2393,6 +2393,20 @@ details.</para>
2393 to the <link linkend="control">User controls class</link>. 2393 to the <link linkend="control">User controls class</link>.
2394 </para> 2394 </para>
2395 </listitem> 2395 </listitem>
2396 <listitem>
2397 <para>Added the device_caps field to struct v4l2_capabilities and added the new
2398 V4L2_CAP_DEVICE_CAPS capability.</para>
2399 </listitem>
2400 </orderedlist>
2401 </section>
2402
2403 <section>
2404 <title>V4L2 in Linux 3.4</title>
2405 <orderedlist>
2406 <listitem>
2407 <para>Added <link linkend="jpeg-controls">JPEG compression control
2408 class</link>.</para>
2409 </listitem>
2396 </orderedlist> 2410 </orderedlist>
2397 </section> 2411 </section>
2398 2412
diff --git a/Documentation/DocBook/media/v4l/controls.xml b/Documentation/DocBook/media/v4l/controls.xml
index a1be37897ad7..b84f25e9cc87 100644
--- a/Documentation/DocBook/media/v4l/controls.xml
+++ b/Documentation/DocBook/media/v4l/controls.xml
@@ -1286,6 +1286,49 @@ produce a slight hiss, but in the encoder itself, guaranteeing a fixed
1286and reproducible audio bitstream. 0 = unmuted, 1 = muted.</entry> 1286and reproducible audio bitstream. 0 = unmuted, 1 = muted.</entry>
1287 </row> 1287 </row>
1288 <row><entry></entry></row> 1288 <row><entry></entry></row>
1289 <row id="v4l2-mpeg-audio-dec-playback">
1290 <entry spanname="id"><constant>V4L2_CID_MPEG_AUDIO_DEC_PLAYBACK</constant>&nbsp;</entry>
1291 <entry>enum&nbsp;v4l2_mpeg_audio_dec_playback</entry>
1292 </row><row><entry spanname="descr">Determines how monolingual audio should be played back.
1293Possible values are:</entry>
1294 </row>
1295 <row>
1296 <entrytbl spanname="descr" cols="2">
1297 <tbody valign="top">
1298 <row>
1299 <entry><constant>V4L2_MPEG_AUDIO_DEC_PLAYBACK_AUTO</constant>&nbsp;</entry>
1300 <entry>Automatically determines the best playback mode.</entry>
1301 </row>
1302 <row>
1303 <entry><constant>V4L2_MPEG_AUDIO_DEC_PLAYBACK_STEREO</constant>&nbsp;</entry>
1304 <entry>Stereo playback.</entry>
1305 </row>
1306 <row>
1307 <entry><constant>V4L2_MPEG_AUDIO_DEC_PLAYBACK_LEFT</constant>&nbsp;</entry>
1308 <entry>Left channel playback.</entry>
1309 </row>
1310 <row>
1311 <entry><constant>V4L2_MPEG_AUDIO_DEC_PLAYBACK_RIGHT</constant>&nbsp;</entry>
1312 <entry>Right channel playback.</entry>
1313 </row>
1314 <row>
1315 <entry><constant>V4L2_MPEG_AUDIO_DEC_PLAYBACK_MONO</constant>&nbsp;</entry>
1316 <entry>Mono playback.</entry>
1317 </row>
1318 <row>
1319 <entry><constant>V4L2_MPEG_AUDIO_DEC_PLAYBACK_SWAPPED_STEREO</constant>&nbsp;</entry>
1320 <entry>Stereo playback with swapped left and right channels.</entry>
1321 </row>
1322 </tbody>
1323 </entrytbl>
1324 </row>
1325 <row><entry></entry></row>
1326 <row id="v4l2-mpeg-audio-dec-multilingual-playback">
1327 <entry spanname="id"><constant>V4L2_CID_MPEG_AUDIO_DEC_MULTILINGUAL_PLAYBACK</constant>&nbsp;</entry>
1328 <entry>enum&nbsp;v4l2_mpeg_audio_dec_playback</entry>
1329 </row><row><entry spanname="descr">Determines how multilingual audio should be played back.</entry>
1330 </row>
1331 <row><entry></entry></row>
1289 <row id="v4l2-mpeg-video-encoding"> 1332 <row id="v4l2-mpeg-video-encoding">
1290 <entry spanname="id"><constant>V4L2_CID_MPEG_VIDEO_ENCODING</constant>&nbsp;</entry> 1333 <entry spanname="id"><constant>V4L2_CID_MPEG_VIDEO_ENCODING</constant>&nbsp;</entry>
1291 <entry>enum&nbsp;v4l2_mpeg_video_encoding</entry> 1334 <entry>enum&nbsp;v4l2_mpeg_video_encoding</entry>
@@ -1447,6 +1490,22 @@ of the video. The supplied 32-bit integer is interpreted as follows (bit
1447 </tbody> 1490 </tbody>
1448 </entrytbl> 1491 </entrytbl>
1449 </row> 1492 </row>
1493 <row><entry></entry></row>
1494 <row id="v4l2-mpeg-video-dec-pts">
1495 <entry spanname="id"><constant>V4L2_CID_MPEG_VIDEO_DEC_PTS</constant>&nbsp;</entry>
1496 <entry>integer64</entry>
1497 </row><row><entry spanname="descr">This read-only control returns the
149833-bit video Presentation Time Stamp as defined in ITU T-REC-H.222.0 and ISO/IEC 13818-1 of
1499the currently displayed frame. This is the same PTS as is used in &VIDIOC-DECODER-CMD;.</entry>
1500 </row>
1501 <row><entry></entry></row>
1502 <row id="v4l2-mpeg-video-dec-frame">
1503 <entry spanname="id"><constant>V4L2_CID_MPEG_VIDEO_DEC_FRAME</constant>&nbsp;</entry>
1504 <entry>integer64</entry>
1505 </row><row><entry spanname="descr">This read-only control returns the
1506frame counter of the frame that is currently displayed (decoded). This value is reset to 0 whenever
1507the decoder is started.</entry>
1508 </row>
1450 1509
1451 1510
1452 <row><entry></entry></row> 1511 <row><entry></entry></row>
@@ -3377,6 +3436,167 @@ interface and may change in the future.</para>
3377 </tbody> 3436 </tbody>
3378 </tgroup> 3437 </tgroup>
3379 </table> 3438 </table>
3439 </section>
3440
3441 <section id="jpeg-controls">
3442 <title>JPEG Control Reference</title>
3443 <para>The JPEG class includes controls for common features of JPEG
3444 encoders and decoders. Currently it includes features for codecs
3445 implementing progressive baseline DCT compression process with
3446 Huffman entrophy coding.</para>
3447 <table pgwide="1" frame="none" id="jpeg-control-id">
3448 <title>JPEG Control IDs</title>
3380 3449
3450 <tgroup cols="4">
3451 <colspec colname="c1" colwidth="1*" />
3452 <colspec colname="c2" colwidth="6*" />
3453 <colspec colname="c3" colwidth="2*" />
3454 <colspec colname="c4" colwidth="6*" />
3455 <spanspec namest="c1" nameend="c2" spanname="id" />
3456 <spanspec namest="c2" nameend="c4" spanname="descr" />
3457 <thead>
3458 <row>
3459 <entry spanname="id" align="left">ID</entry>
3460 <entry align="left">Type</entry>
3461 </row><row rowsep="1"><entry spanname="descr" align="left">Description</entry>
3462 </row>
3463 </thead>
3464 <tbody valign="top">
3465 <row><entry></entry></row>
3466 <row>
3467 <entry spanname="id"><constant>V4L2_CID_JPEG_CLASS</constant>&nbsp;</entry>
3468 <entry>class</entry>
3469 </row><row><entry spanname="descr">The JPEG class descriptor. Calling
3470 &VIDIOC-QUERYCTRL; for this control will return a description of this
3471 control class.
3472
3473 </entry>
3474 </row>
3475 <row>
3476 <entry spanname="id"><constant>V4L2_CID_JPEG_CHROMA_SUBSAMPLING</constant></entry>
3477 <entry>menu</entry>
3478 </row>
3479 <row id="jpeg-chroma-subsampling-control">
3480 <entry spanname="descr">The chroma subsampling factors describe how
3481 each component of an input image is sampled, in respect to maximum
3482 sample rate in each spatial dimension. See <xref linkend="itu-t81"/>,
3483 clause A.1.1. for more details. The <constant>
3484 V4L2_CID_JPEG_CHROMA_SUBSAMPLING</constant> control determines how
3485 Cb and Cr components are downsampled after coverting an input image
3486 from RGB to Y'CbCr color space.
3487 </entry>
3488 </row>
3489 <row>
3490 <entrytbl spanname="descr" cols="2">
3491 <tbody valign="top">
3492 <row>
3493 <entry><constant>V4L2_JPEG_CHROMA_SUBSAMPLING_444</constant>
3494 </entry><entry>No chroma subsampling, each pixel has
3495 Y, Cr and Cb values.</entry>
3496 </row>
3497 <row>
3498 <entry><constant>V4L2_JPEG_CHROMA_SUBSAMPLING_422</constant>
3499 </entry><entry>Horizontally subsample Cr, Cb components
3500 by a factor of 2.</entry>
3501 </row>
3502 <row>
3503 <entry><constant>V4L2_JPEG_CHROMA_SUBSAMPLING_420</constant>
3504 </entry><entry>Subsample Cr, Cb components horizontally
3505 and vertically by 2.</entry>
3506 </row>
3507 <row>
3508 <entry><constant>V4L2_JPEG_CHROMA_SUBSAMPLING_411</constant>
3509 </entry><entry>Horizontally subsample Cr, Cb components
3510 by a factor of 4.</entry>
3511 </row>
3512 <row>
3513 <entry><constant>V4L2_JPEG_CHROMA_SUBSAMPLING_410</constant>
3514 </entry><entry>Subsample Cr, Cb components horizontally
3515 by 4 and vertically by 2.</entry>
3516 </row>
3517 <row>
3518 <entry><constant>V4L2_JPEG_CHROMA_SUBSAMPLING_GRAY</constant>
3519 </entry><entry>Use only luminance component.</entry>
3520 </row>
3521 </tbody>
3522 </entrytbl>
3523 </row>
3524 <row>
3525 <entry spanname="id"><constant>V4L2_CID_JPEG_RESTART_INTERVAL</constant>
3526 </entry><entry>integer</entry>
3527 </row>
3528 <row><entry spanname="descr">
3529 The restart interval determines an interval of inserting RSTm
3530 markers (m = 0..7). The purpose of these markers is to additionally
3531 reinitialize the encoder process, in order to process blocks of
3532 an image independently.
3533 For the lossy compression processes the restart interval unit is
3534 MCU (Minimum Coded Unit) and its value is contained in DRI
3535 (Define Restart Interval) marker. If <constant>
3536 V4L2_CID_JPEG_RESTART_INTERVAL</constant> control is set to 0,
3537 DRI and RSTm markers will not be inserted.
3538 </entry>
3539 </row>
3540 <row id="jpeg-quality-control">
3541 <entry spanname="id"><constant>V4L2_CID_JPEG_COMPRESION_QUALITY</constant></entry>
3542 <entry>integer</entry>
3543 </row>
3544 <row>
3545 <entry spanname="descr">
3546 <constant>V4L2_CID_JPEG_COMPRESION_QUALITY</constant> control
3547 determines trade-off between image quality and size.
3548 It provides simpler method for applications to control image quality,
3549 without a need for direct reconfiguration of luminance and chrominance
3550 quantization tables.
3551
3552 In cases where a driver uses quantization tables configured directly
3553 by an application, using interfaces defined elsewhere, <constant>
3554 V4L2_CID_JPEG_COMPRESION_QUALITY</constant> control should be set
3555 by driver to 0.
3556
3557 <para>The value range of this control is driver-specific. Only
3558 positive, non-zero values are meaningful. The recommended range
3559 is 1 - 100, where larger values correspond to better image quality.
3560 </para>
3561 </entry>
3562 </row>
3563 <row id="jpeg-active-marker-control">
3564 <entry spanname="id"><constant>V4L2_CID_JPEG_ACTIVE_MARKER</constant></entry>
3565 <entry>bitmask</entry>
3566 </row>
3567 <row>
3568 <entry spanname="descr">Specify which JPEG markers are included
3569 in compressed stream. This control is valid only for encoders.
3570 </entry>
3571 </row>
3572 <row>
3573 <entrytbl spanname="descr" cols="2">
3574 <tbody valign="top">
3575 <row>
3576 <entry><constant>V4L2_JPEG_ACTIVE_MARKER_APP0</constant></entry>
3577 <entry>Application data segment APP<subscript>0</subscript>.</entry>
3578 </row><row>
3579 <entry><constant>V4L2_JPEG_ACTIVE_MARKER_APP1</constant></entry>
3580 <entry>Application data segment APP<subscript>1</subscript>.</entry>
3581 </row><row>
3582 <entry><constant>V4L2_JPEG_ACTIVE_MARKER_COM</constant></entry>
3583 <entry>Comment segment.</entry>
3584 </row><row>
3585 <entry><constant>V4L2_JPEG_ACTIVE_MARKER_DQT</constant></entry>
3586 <entry>Quantization tables segment.</entry>
3587 </row><row>
3588 <entry><constant>V4L2_JPEG_ACTIVE_MARKER_DHT</constant></entry>
3589 <entry>Huffman tables segment.</entry>
3590 </row>
3591 </tbody>
3592 </entrytbl>
3593 </row>
3594 <row><entry></entry></row>
3595 </tbody>
3596 </tgroup>
3597 </table>
3598 <para>For more details about JPEG specification, refer
3599 to <xref linkend="itu-t81"/>, <xref linkend="jfif"/>,
3600 <xref linkend="w3c-jpeg-jfif"/>.</para>
3381 </section> 3601 </section>
3382</section> 3602</section>
diff --git a/Documentation/DocBook/media/v4l/selection-api.xml b/Documentation/DocBook/media/v4l/selection-api.xml
index 2f0bdb4d5551..b299e4779354 100644
--- a/Documentation/DocBook/media/v4l/selection-api.xml
+++ b/Documentation/DocBook/media/v4l/selection-api.xml
@@ -52,6 +52,10 @@ cropping and composing rectangles have the same size.</para>
52 </textobject> 52 </textobject>
53 </mediaobject> 53 </mediaobject>
54 </figure> 54 </figure>
55
56For complete list of the available selection targets see table <xref
57linkend="v4l2-sel-target"/>
58
55 </section> 59 </section>
56 60
57 <section> 61 <section>
@@ -186,7 +190,7 @@ V4L2_SEL_TGT_COMPOSE_ACTIVE </constant> target.</para>
186 190
187 <section> 191 <section>
188 192
189 <title>Scaling control.</title> 193 <title>Scaling control</title>
190 194
191<para>An application can detect if scaling is performed by comparing the width 195<para>An application can detect if scaling is performed by comparing the width
192and the height of rectangles obtained using <constant> V4L2_SEL_TGT_CROP_ACTIVE 196and the height of rectangles obtained using <constant> V4L2_SEL_TGT_CROP_ACTIVE
@@ -200,7 +204,7 @@ the scaling ratios using these values.</para>
200 204
201 <section> 205 <section>
202 206
203 <title>Comparison with old cropping API.</title> 207 <title>Comparison with old cropping API</title>
204 208
205<para>The selection API was introduced to cope with deficiencies of previous 209<para>The selection API was introduced to cope with deficiencies of previous
206<link linkend="crop"> API </link>, that was designed to control simple capture 210<link linkend="crop"> API </link>, that was designed to control simple capture
diff --git a/Documentation/DocBook/media/v4l/v4l2.xml b/Documentation/DocBook/media/v4l/v4l2.xml
index e97c512861bb..8ae38876172e 100644
--- a/Documentation/DocBook/media/v4l/v4l2.xml
+++ b/Documentation/DocBook/media/v4l/v4l2.xml
@@ -128,6 +128,22 @@ structs, ioctls) must be noted in more detail in the history chapter
128applications. --> 128applications. -->
129 129
130 <revision> 130 <revision>
131 <revnumber>3.4</revnumber>
132 <date>2012-01-25</date>
133 <authorinitials>sn</authorinitials>
134 <revremark>Added <link linkend="jpeg-controls">JPEG compression
135 control class.</link>
136 </revremark>
137 </revision>
138
139 <revision>
140 <revnumber>3.3</revnumber>
141 <date>2012-01-11</date>
142 <authorinitials>hv</authorinitials>
143 <revremark>Added device_caps field to struct v4l2_capabilities.</revremark>
144 </revision>
145
146 <revision>
131 <revnumber>3.2</revnumber> 147 <revnumber>3.2</revnumber>
132 <date>2011-08-26</date> 148 <date>2011-08-26</date>
133 <authorinitials>hv</authorinitials> 149 <authorinitials>hv</authorinitials>
@@ -417,7 +433,7 @@ and discussions on the V4L mailing list.</revremark>
417</partinfo> 433</partinfo>
418 434
419<title>Video for Linux Two API Specification</title> 435<title>Video for Linux Two API Specification</title>
420 <subtitle>Revision 3.2</subtitle> 436 <subtitle>Revision 3.3</subtitle>
421 437
422 <chapter id="common"> 438 <chapter id="common">
423 &sub-common; 439 &sub-common;
@@ -473,6 +489,7 @@ and discussions on the V4L mailing list.</revremark>
473 &sub-cropcap; 489 &sub-cropcap;
474 &sub-dbg-g-chip-ident; 490 &sub-dbg-g-chip-ident;
475 &sub-dbg-g-register; 491 &sub-dbg-g-register;
492 &sub-decoder-cmd;
476 &sub-dqevent; 493 &sub-dqevent;
477 &sub-encoder-cmd; 494 &sub-encoder-cmd;
478 &sub-enumaudio; 495 &sub-enumaudio;
diff --git a/Documentation/DocBook/media/v4l/vidioc-decoder-cmd.xml b/Documentation/DocBook/media/v4l/vidioc-decoder-cmd.xml
new file mode 100644
index 000000000000..74b87f6e480a
--- /dev/null
+++ b/Documentation/DocBook/media/v4l/vidioc-decoder-cmd.xml
@@ -0,0 +1,256 @@
1<refentry id="vidioc-decoder-cmd">
2 <refmeta>
3 <refentrytitle>ioctl VIDIOC_DECODER_CMD, VIDIOC_TRY_DECODER_CMD</refentrytitle>
4 &manvol;
5 </refmeta>
6
7 <refnamediv>
8 <refname>VIDIOC_DECODER_CMD</refname>
9 <refname>VIDIOC_TRY_DECODER_CMD</refname>
10 <refpurpose>Execute an decoder command</refpurpose>
11 </refnamediv>
12
13 <refsynopsisdiv>
14 <funcsynopsis>
15 <funcprototype>
16 <funcdef>int <function>ioctl</function></funcdef>
17 <paramdef>int <parameter>fd</parameter></paramdef>
18 <paramdef>int <parameter>request</parameter></paramdef>
19 <paramdef>struct v4l2_decoder_cmd *<parameter>argp</parameter></paramdef>
20 </funcprototype>
21 </funcsynopsis>
22 </refsynopsisdiv>
23
24 <refsect1>
25 <title>Arguments</title>
26
27 <variablelist>
28 <varlistentry>
29 <term><parameter>fd</parameter></term>
30 <listitem>
31 <para>&fd;</para>
32 </listitem>
33 </varlistentry>
34 <varlistentry>
35 <term><parameter>request</parameter></term>
36 <listitem>
37 <para>VIDIOC_DECODER_CMD, VIDIOC_TRY_DECODER_CMD</para>
38 </listitem>
39 </varlistentry>
40 <varlistentry>
41 <term><parameter>argp</parameter></term>
42 <listitem>
43 <para></para>
44 </listitem>
45 </varlistentry>
46 </variablelist>
47 </refsect1>
48
49 <refsect1>
50 <title>Description</title>
51
52 <note>
53 <title>Experimental</title>
54
55 <para>This is an <link linkend="experimental">experimental</link>
56interface and may change in the future.</para>
57 </note>
58
59 <para>These ioctls control an audio/video (usually MPEG-) decoder.
60<constant>VIDIOC_DECODER_CMD</constant> sends a command to the
61decoder, <constant>VIDIOC_TRY_DECODER_CMD</constant> can be used to
62try a command without actually executing it. To send a command applications
63must initialize all fields of a &v4l2-decoder-cmd; and call
64<constant>VIDIOC_DECODER_CMD</constant> or <constant>VIDIOC_TRY_DECODER_CMD</constant>
65with a pointer to this structure.</para>
66
67 <para>The <structfield>cmd</structfield> field must contain the
68command code. Some commands use the <structfield>flags</structfield> field for
69additional information.
70</para>
71
72 <para>A <function>write</function>() or &VIDIOC-STREAMON; call sends an implicit
73START command to the decoder if it has not been started yet.
74</para>
75
76 <para>A <function>close</function>() or &VIDIOC-STREAMOFF; call of a streaming
77file descriptor sends an implicit immediate STOP command to the decoder, and all
78buffered data is discarded.</para>
79
80 <para>These ioctls are optional, not all drivers may support
81them. They were introduced in Linux 3.3.</para>
82
83 <table pgwide="1" frame="none" id="v4l2-decoder-cmd">
84 <title>struct <structname>v4l2_decoder_cmd</structname></title>
85 <tgroup cols="5">
86 &cs-str;
87 <tbody valign="top">
88 <row>
89 <entry>__u32</entry>
90 <entry><structfield>cmd</structfield></entry>
91 <entry></entry>
92 <entry></entry>
93 <entry>The decoder command, see <xref linkend="decoder-cmds" />.</entry>
94 </row>
95 <row>
96 <entry>__u32</entry>
97 <entry><structfield>flags</structfield></entry>
98 <entry></entry>
99 <entry></entry>
100 <entry>Flags to go with the command. If no flags are defined for
101this command, drivers and applications must set this field to zero.</entry>
102 </row>
103 <row>
104 <entry>union</entry>
105 <entry>(anonymous)</entry>
106 <entry></entry>
107 <entry></entry>
108 <entry></entry>
109 </row>
110 <row>
111 <entry></entry>
112 <entry>struct</entry>
113 <entry><structfield>start</structfield></entry>
114 <entry></entry>
115 <entry>Structure containing additional data for the
116<constant>V4L2_DEC_CMD_START</constant> command.</entry>
117 </row>
118 <row>
119 <entry></entry>
120 <entry></entry>
121 <entry>__s32</entry>
122 <entry><structfield>speed</structfield></entry>
123 <entry>Playback speed and direction. The playback speed is defined as
124<structfield>speed</structfield>/1000 of the normal speed. So 1000 is normal playback.
125Negative numbers denote reverse playback, so -1000 does reverse playback at normal
126speed. Speeds -1, 0 and 1 have special meanings: speed 0 is shorthand for 1000
127(normal playback). A speed of 1 steps just one frame forward, a speed of -1 steps
128just one frame back.
129 </entry>
130 </row>
131 <row>
132 <entry></entry>
133 <entry></entry>
134 <entry>__u32</entry>
135 <entry><structfield>format</structfield></entry>
136 <entry>Format restrictions. This field is set by the driver, not the
137application. Possible values are <constant>V4L2_DEC_START_FMT_NONE</constant> if
138there are no format restrictions or <constant>V4L2_DEC_START_FMT_GOP</constant>
139if the decoder operates on full GOPs (<wordasword>Group Of Pictures</wordasword>).
140This is usually the case for reverse playback: the decoder needs full GOPs, which
141it can then play in reverse order. So to implement reverse playback the application
142must feed the decoder the last GOP in the video file, then the GOP before that, etc. etc.
143 </entry>
144 </row>
145 <row>
146 <entry></entry>
147 <entry>struct</entry>
148 <entry><structfield>stop</structfield></entry>
149 <entry></entry>
150 <entry>Structure containing additional data for the
151<constant>V4L2_DEC_CMD_STOP</constant> command.</entry>
152 </row>
153 <row>
154 <entry></entry>
155 <entry></entry>
156 <entry>__u64</entry>
157 <entry><structfield>pts</structfield></entry>
158 <entry>Stop playback at this <structfield>pts</structfield> or immediately
159if the playback is already past that timestamp. Leave to 0 if you want to stop after the
160last frame was decoded.
161 </entry>
162 </row>
163 <row>
164 <entry></entry>
165 <entry>struct</entry>
166 <entry><structfield>raw</structfield></entry>
167 <entry></entry>
168 <entry></entry>
169 </row>
170 <row>
171 <entry></entry>
172 <entry></entry>
173 <entry>__u32</entry>
174 <entry><structfield>data</structfield>[16]</entry>
175 <entry>Reserved for future extensions. Drivers and
176applications must set the array to zero.</entry>
177 </row>
178 </tbody>
179 </tgroup>
180 </table>
181
182 <table pgwide="1" frame="none" id="decoder-cmds">
183 <title>Decoder Commands</title>
184 <tgroup cols="3">
185 &cs-def;
186 <tbody valign="top">
187 <row>
188 <entry><constant>V4L2_DEC_CMD_START</constant></entry>
189 <entry>0</entry>
190 <entry>Start the decoder. When the decoder is already
191running or paused, this command will just change the playback speed.
192That means that calling <constant>V4L2_DEC_CMD_START</constant> when
193the decoder was paused will <emphasis>not</emphasis> resume the decoder.
194You have to explicitly call <constant>V4L2_DEC_CMD_RESUME</constant> for that.
195This command has one flag:
196<constant>V4L2_DEC_CMD_START_MUTE_AUDIO</constant>. If set, then audio will
197be muted when playing back at a non-standard speed.
198 </entry>
199 </row>
200 <row>
201 <entry><constant>V4L2_DEC_CMD_STOP</constant></entry>
202 <entry>1</entry>
203 <entry>Stop the decoder. When the decoder is already stopped,
204this command does nothing. This command has two flags:
205if <constant>V4L2_DEC_CMD_STOP_TO_BLACK</constant> is set, then the decoder will
206set the picture to black after it stopped decoding. Otherwise the last image will
207repeat. If <constant>V4L2_DEC_CMD_STOP_IMMEDIATELY</constant> is set, then the decoder
208stops immediately (ignoring the <structfield>pts</structfield> value), otherwise it
209will keep decoding until timestamp >= pts or until the last of the pending data from
210its internal buffers was decoded.
211</entry>
212 </row>
213 <row>
214 <entry><constant>V4L2_DEC_CMD_PAUSE</constant></entry>
215 <entry>2</entry>
216 <entry>Pause the decoder. When the decoder has not been
217started yet, the driver will return an &EPERM;. When the decoder is
218already paused, this command does nothing. This command has one flag:
219if <constant>V4L2_DEC_CMD_PAUSE_TO_BLACK</constant> is set, then set the
220decoder output to black when paused.
221</entry>
222 </row>
223 <row>
224 <entry><constant>V4L2_DEC_CMD_RESUME</constant></entry>
225 <entry>3</entry>
226 <entry>Resume decoding after a PAUSE command. When the
227decoder has not been started yet, the driver will return an &EPERM;.
228When the decoder is already running, this command does nothing. No
229flags are defined for this command.</entry>
230 </row>
231 </tbody>
232 </tgroup>
233 </table>
234
235 </refsect1>
236
237 <refsect1>
238 &return-value;
239
240 <variablelist>
241 <varlistentry>
242 <term><errorcode>EINVAL</errorcode></term>
243 <listitem>
244 <para>The <structfield>cmd</structfield> field is invalid.</para>
245 </listitem>
246 </varlistentry>
247 <varlistentry>
248 <term><errorcode>EPERM</errorcode></term>
249 <listitem>
250 <para>The application sent a PAUSE or RESUME command when
251the decoder was not running.</para>
252 </listitem>
253 </varlistentry>
254 </variablelist>
255 </refsect1>
256</refentry>
diff --git a/Documentation/DocBook/media/v4l/vidioc-encoder-cmd.xml b/Documentation/DocBook/media/v4l/vidioc-encoder-cmd.xml
index af7f3f2a36dd..f431b3ba79bd 100644
--- a/Documentation/DocBook/media/v4l/vidioc-encoder-cmd.xml
+++ b/Documentation/DocBook/media/v4l/vidioc-encoder-cmd.xml
@@ -74,15 +74,16 @@ only used by the STOP command and contains one bit: If the
74encoding will continue until the end of the current <wordasword>Group 74encoding will continue until the end of the current <wordasword>Group
75Of Pictures</wordasword>, otherwise it will stop immediately.</para> 75Of Pictures</wordasword>, otherwise it will stop immediately.</para>
76 76
77 <para>A <function>read</function>() call sends a START command to 77 <para>A <function>read</function>() or &VIDIOC-STREAMON; call sends an implicit
78the encoder if it has not been started yet. After a STOP command, 78START command to the encoder if it has not been started yet. After a STOP command,
79<function>read</function>() calls will read the remaining data 79<function>read</function>() calls will read the remaining data
80buffered by the driver. When the buffer is empty, 80buffered by the driver. When the buffer is empty,
81<function>read</function>() will return zero and the next 81<function>read</function>() will return zero and the next
82<function>read</function>() call will restart the encoder.</para> 82<function>read</function>() call will restart the encoder.</para>
83 83
84 <para>A <function>close</function>() call sends an immediate STOP 84 <para>A <function>close</function>() or &VIDIOC-STREAMOFF; call of a streaming
85to the encoder, and all buffered data is discarded.</para> 85file descriptor sends an implicit immediate STOP to the encoder, and all buffered
86data is discarded.</para>
86 87
87 <para>These ioctls are optional, not all drivers may support 88 <para>These ioctls are optional, not all drivers may support
88them. They were introduced in Linux 2.6.21.</para> 89them. They were introduced in Linux 2.6.21.</para>
diff --git a/Documentation/DocBook/media/v4l/vidioc-g-jpegcomp.xml b/Documentation/DocBook/media/v4l/vidioc-g-jpegcomp.xml
index 01ea24b84385..48748499c097 100644
--- a/Documentation/DocBook/media/v4l/vidioc-g-jpegcomp.xml
+++ b/Documentation/DocBook/media/v4l/vidioc-g-jpegcomp.xml
@@ -57,6 +57,11 @@
57 <refsect1> 57 <refsect1>
58 <title>Description</title> 58 <title>Description</title>
59 59
60 <para>These ioctls are <emphasis role="bold">deprecated</emphasis>.
61 New drivers and applications should use <link linkend="jpeg-controls">
62 JPEG class controls</link> for image quality and JPEG markers control.
63 </para>
64
60 <para>[to do]</para> 65 <para>[to do]</para>
61 66
62 <para>Ronald Bultje elaborates:</para> 67 <para>Ronald Bultje elaborates:</para>
@@ -86,7 +91,10 @@ to add them.</para>
86 <row> 91 <row>
87 <entry>int</entry> 92 <entry>int</entry>
88 <entry><structfield>quality</structfield></entry> 93 <entry><structfield>quality</structfield></entry>
89 <entry></entry> 94 <entry>Deprecated. If <link linkend="jpeg-quality-control"><constant>
95 V4L2_CID_JPEG_IMAGE_QUALITY</constant></link> control is exposed by
96 a driver applications should use it instead and ignore this field.
97 </entry>
90 </row> 98 </row>
91 <row> 99 <row>
92 <entry>int</entry> 100 <entry>int</entry>
@@ -116,7 +124,11 @@ to add them.</para>
116 <row> 124 <row>
117 <entry>__u32</entry> 125 <entry>__u32</entry>
118 <entry><structfield>jpeg_markers</structfield></entry> 126 <entry><structfield>jpeg_markers</structfield></entry>
119 <entry>See <xref linkend="jpeg-markers" />.</entry> 127 <entry>See <xref linkend="jpeg-markers"/>. Deprecated.
128 If <link linkend="jpeg-active-marker-control"><constant>
129 V4L2_CID_JPEG_ACTIVE_MARKER</constant></link> control
130 is exposed by a driver applications should use it instead
131 and ignore this field.</entry>
120 </row> 132 </row>
121 </tbody> 133 </tbody>
122 </tgroup> 134 </tgroup>
diff --git a/Documentation/DocBook/media/v4l/vidioc-g-selection.xml b/Documentation/DocBook/media/v4l/vidioc-g-selection.xml
index a9d36e0c090e..bb04eff75f45 100644
--- a/Documentation/DocBook/media/v4l/vidioc-g-selection.xml
+++ b/Documentation/DocBook/media/v4l/vidioc-g-selection.xml
@@ -58,43 +58,43 @@
58 58
59 <para>The ioctls are used to query and configure selection rectangles.</para> 59 <para>The ioctls are used to query and configure selection rectangles.</para>
60 60
61<para> To query the cropping (composing) rectangle set <structfield> 61<para> To query the cropping (composing) rectangle set &v4l2-selection;
62&v4l2-selection;::type </structfield> to the respective buffer type. Do not 62<structfield> type </structfield> field to the respective buffer type.
63use multiplanar buffers. Use <constant> V4L2_BUF_TYPE_VIDEO_CAPTURE 63Do not use multiplanar buffers. Use <constant> V4L2_BUF_TYPE_VIDEO_CAPTURE
64</constant> instead of <constant> V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE 64</constant> instead of <constant> V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE
65</constant>. Use <constant> V4L2_BUF_TYPE_VIDEO_OUTPUT </constant> instead of 65</constant>. Use <constant> V4L2_BUF_TYPE_VIDEO_OUTPUT </constant> instead of
66<constant> V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE </constant>. The next step is 66<constant> V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE </constant>. The next step is
67setting <structfield> &v4l2-selection;::target </structfield> to value 67setting the value of &v4l2-selection; <structfield>target</structfield> field
68<constant> V4L2_SEL_TGT_CROP_ACTIVE </constant> (<constant> 68to <constant> V4L2_SEL_TGT_CROP_ACTIVE </constant> (<constant>
69V4L2_SEL_TGT_COMPOSE_ACTIVE </constant>). Please refer to table <xref 69V4L2_SEL_TGT_COMPOSE_ACTIVE </constant>). Please refer to table <xref
70linkend="v4l2-sel-target" /> or <xref linkend="selection-api" /> for additional 70linkend="v4l2-sel-target" /> or <xref linkend="selection-api" /> for additional
71targets. Fields <structfield> &v4l2-selection;::flags </structfield> and 71targets. The <structfield>flags</structfield> and <structfield>reserved
72<structfield> &v4l2-selection;::reserved </structfield> are ignored and they 72</structfield> fields of &v4l2-selection; are ignored and they must be filled
73must be filled with zeros. The driver fills the rest of the structure or 73with zeros. The driver fills the rest of the structure or
74returns &EINVAL; if incorrect buffer type or target was used. If cropping 74returns &EINVAL; if incorrect buffer type or target was used. If cropping
75(composing) is not supported then the active rectangle is not mutable and it is 75(composing) is not supported then the active rectangle is not mutable and it is
76always equal to the bounds rectangle. Finally, structure <structfield> 76always equal to the bounds rectangle. Finally, the &v4l2-rect;
77&v4l2-selection;::r </structfield> is filled with the current cropping 77<structfield>r</structfield> rectangle is filled with the current cropping
78(composing) coordinates. The coordinates are expressed in driver-dependent 78(composing) coordinates. The coordinates are expressed in driver-dependent
79units. The only exception are rectangles for images in raw formats, whose 79units. The only exception are rectangles for images in raw formats, whose
80coordinates are always expressed in pixels. </para> 80coordinates are always expressed in pixels. </para>
81 81
82<para> To change the cropping (composing) rectangle set <structfield> 82<para> To change the cropping (composing) rectangle set the &v4l2-selection;
83&v4l2-selection;::type </structfield> to the respective buffer type. Do not 83<structfield>type</structfield> field to the respective buffer type. Do not
84use multiplanar buffers. Use <constant> V4L2_BUF_TYPE_VIDEO_CAPTURE 84use multiplanar buffers. Use <constant> V4L2_BUF_TYPE_VIDEO_CAPTURE
85</constant> instead of <constant> V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE 85</constant> instead of <constant> V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE
86</constant>. Use <constant> V4L2_BUF_TYPE_VIDEO_OUTPUT </constant> instead of 86</constant>. Use <constant> V4L2_BUF_TYPE_VIDEO_OUTPUT </constant> instead of
87<constant> V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE </constant>. The next step is 87<constant> V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE </constant>. The next step is
88setting <structfield> &v4l2-selection;::target </structfield> to value 88setting the value of &v4l2-selection; <structfield>target</structfield> to
89<constant> V4L2_SEL_TGT_CROP_ACTIVE </constant> (<constant> 89<constant>V4L2_SEL_TGT_CROP_ACTIVE</constant> (<constant>
90V4L2_SEL_TGT_COMPOSE_ACTIVE </constant>). Please refer to table <xref 90V4L2_SEL_TGT_COMPOSE_ACTIVE </constant>). Please refer to table <xref
91linkend="v4l2-sel-target" /> or <xref linkend="selection-api" /> for additional 91linkend="v4l2-sel-target" /> or <xref linkend="selection-api" /> for additional
92targets. Set desired active area into the field <structfield> 92targets. The &v4l2-rect; <structfield>r</structfield> rectangle need to be
93&v4l2-selection;::r </structfield>. Field <structfield> 93set to the desired active area. Field &v4l2-selection; <structfield> reserved
94&v4l2-selection;::reserved </structfield> is ignored and must be filled with 94</structfield> is ignored and must be filled with zeros. The driver may adjust
95zeros. The driver may adjust the rectangle coordinates. An application may 95coordinates of the requested rectangle. An application may
96introduce constraints to control rounding behaviour. Set the field 96introduce constraints to control rounding behaviour. The &v4l2-selection;
97<structfield> &v4l2-selection;::flags </structfield> to one of values: 97<structfield>flags</structfield> field must be set to one of the following:
98 98
99<itemizedlist> 99<itemizedlist>
100 <listitem> 100 <listitem>
@@ -129,7 +129,7 @@ and vertical offset and sizes are chosen according to following priority:
129 129
130<orderedlist> 130<orderedlist>
131 <listitem> 131 <listitem>
132 <para>Satisfy constraints from <structfield>&v4l2-selection;::flags</structfield>.</para> 132 <para>Satisfy constraints from &v4l2-selection; <structfield>flags</structfield>.</para>
133 </listitem> 133 </listitem>
134 <listitem> 134 <listitem>
135 <para>Adjust width, height, left, and top to hardware limits and alignments.</para> 135 <para>Adjust width, height, left, and top to hardware limits and alignments.</para>
@@ -145,7 +145,7 @@ and vertical offset and sizes are chosen according to following priority:
145 </listitem> 145 </listitem>
146</orderedlist> 146</orderedlist>
147 147
148On success the field <structfield> &v4l2-selection;::r </structfield> contains 148On success the &v4l2-rect; <structfield>r</structfield> field contains
149the adjusted rectangle. When the parameters are unsuitable the application may 149the adjusted rectangle. When the parameters are unsuitable the application may
150modify the cropping (composing) or image parameters and repeat the cycle until 150modify the cropping (composing) or image parameters and repeat the cycle until
151satisfactory parameters have been negotiated. If constraints flags have to be 151satisfactory parameters have been negotiated. If constraints flags have to be
@@ -162,38 +162,38 @@ exist no rectangle </emphasis> that satisfies the constraints.</para>
162 <tbody valign="top"> 162 <tbody valign="top">
163 <row> 163 <row>
164 <entry><constant>V4L2_SEL_TGT_CROP_ACTIVE</constant></entry> 164 <entry><constant>V4L2_SEL_TGT_CROP_ACTIVE</constant></entry>
165 <entry>0</entry> 165 <entry>0x0000</entry>
166 <entry>area that is currently cropped by hardware</entry> 166 <entry>The area that is currently cropped by hardware.</entry>
167 </row> 167 </row>
168 <row> 168 <row>
169 <entry><constant>V4L2_SEL_TGT_CROP_DEFAULT</constant></entry> 169 <entry><constant>V4L2_SEL_TGT_CROP_DEFAULT</constant></entry>
170 <entry>1</entry> 170 <entry>0x0001</entry>
171 <entry>suggested cropping rectangle that covers the "whole picture"</entry> 171 <entry>Suggested cropping rectangle that covers the "whole picture".</entry>
172 </row> 172 </row>
173 <row> 173 <row>
174 <entry><constant>V4L2_SEL_TGT_CROP_BOUNDS</constant></entry> 174 <entry><constant>V4L2_SEL_TGT_CROP_BOUNDS</constant></entry>
175 <entry>2</entry> 175 <entry>0x0002</entry>
176 <entry>limits for the cropping rectangle</entry> 176 <entry>Limits for the cropping rectangle.</entry>
177 </row> 177 </row>
178 <row> 178 <row>
179 <entry><constant>V4L2_SEL_TGT_COMPOSE_ACTIVE</constant></entry> 179 <entry><constant>V4L2_SEL_TGT_COMPOSE_ACTIVE</constant></entry>
180 <entry>256</entry> 180 <entry>0x0100</entry>
181 <entry>area to which data are composed by hardware</entry> 181 <entry>The area to which data is composed by hardware.</entry>
182 </row> 182 </row>
183 <row> 183 <row>
184 <entry><constant>V4L2_SEL_TGT_COMPOSE_DEFAULT</constant></entry> 184 <entry><constant>V4L2_SEL_TGT_COMPOSE_DEFAULT</constant></entry>
185 <entry>257</entry> 185 <entry>0x0101</entry>
186 <entry>suggested composing rectangle that covers the "whole picture"</entry> 186 <entry>Suggested composing rectangle that covers the "whole picture".</entry>
187 </row> 187 </row>
188 <row> 188 <row>
189 <entry><constant>V4L2_SEL_TGT_COMPOSE_BOUNDS</constant></entry> 189 <entry><constant>V4L2_SEL_TGT_COMPOSE_BOUNDS</constant></entry>
190 <entry>258</entry> 190 <entry>0x0102</entry>
191 <entry>limits for the composing rectangle</entry> 191 <entry>Limits for the composing rectangle.</entry>
192 </row> 192 </row>
193 <row> 193 <row>
194 <entry><constant>V4L2_SEL_TGT_COMPOSE_PADDED</constant></entry> 194 <entry><constant>V4L2_SEL_TGT_COMPOSE_PADDED</constant></entry>
195 <entry>259</entry> 195 <entry>0x0103</entry>
196 <entry>the active area and all padding pixels that are inserted or modified by the hardware</entry> 196 <entry>The active area and all padding pixels that are inserted or modified by hardware.</entry>
197 </row> 197 </row>
198 </tbody> 198 </tbody>
199 </tgroup> 199 </tgroup>
@@ -209,12 +209,14 @@ exist no rectangle </emphasis> that satisfies the constraints.</para>
209 <row> 209 <row>
210 <entry><constant>V4L2_SEL_FLAG_GE</constant></entry> 210 <entry><constant>V4L2_SEL_FLAG_GE</constant></entry>
211 <entry>0x00000001</entry> 211 <entry>0x00000001</entry>
212 <entry>indicate that adjusted rectangle must contain a rectangle from <structfield>&v4l2-selection;::r</structfield></entry> 212 <entry>Indicates that the adjusted rectangle must contain the original
213 &v4l2-selection; <structfield>r</structfield> rectangle.</entry>
213 </row> 214 </row>
214 <row> 215 <row>
215 <entry><constant>V4L2_SEL_FLAG_LE</constant></entry> 216 <entry><constant>V4L2_SEL_FLAG_LE</constant></entry>
216 <entry>0x00000002</entry> 217 <entry>0x00000002</entry>
217 <entry>indicate that adjusted rectangle must be inside a rectangle from <structfield>&v4l2-selection;::r</structfield></entry> 218 <entry>Indicates that the adjusted rectangle must be inside the original
219 &v4l2-rect; <structfield>r</structfield> rectangle.</entry>
218 </row> 220 </row>
219 </tbody> 221 </tbody>
220 </tgroup> 222 </tgroup>
@@ -245,27 +247,29 @@ exist no rectangle </emphasis> that satisfies the constraints.</para>
245 <row> 247 <row>
246 <entry>__u32</entry> 248 <entry>__u32</entry>
247 <entry><structfield>type</structfield></entry> 249 <entry><structfield>type</structfield></entry>
248 <entry>Type of the buffer (from &v4l2-buf-type;)</entry> 250 <entry>Type of the buffer (from &v4l2-buf-type;).</entry>
249 </row> 251 </row>
250 <row> 252 <row>
251 <entry>__u32</entry> 253 <entry>__u32</entry>
252 <entry><structfield>target</structfield></entry> 254 <entry><structfield>target</structfield></entry>
253 <entry>used to select between <link linkend="v4l2-sel-target"> cropping and composing rectangles </link></entry> 255 <entry>Used to select between <link linkend="v4l2-sel-target"> cropping
256 and composing rectangles</link>.</entry>
254 </row> 257 </row>
255 <row> 258 <row>
256 <entry>__u32</entry> 259 <entry>__u32</entry>
257 <entry><structfield>flags</structfield></entry> 260 <entry><structfield>flags</structfield></entry>
258 <entry>control over coordinates adjustments, refer to <link linkend="v4l2-sel-flags">selection flags</link></entry> 261 <entry>Flags controlling the selection rectangle adjustments, refer to
262 <link linkend="v4l2-sel-flags">selection flags</link>.</entry>
259 </row> 263 </row>
260 <row> 264 <row>
261 <entry>&v4l2-rect;</entry> 265 <entry>&v4l2-rect;</entry>
262 <entry><structfield>r</structfield></entry> 266 <entry><structfield>r</structfield></entry>
263 <entry>selection rectangle</entry> 267 <entry>The selection rectangle.</entry>
264 </row> 268 </row>
265 <row> 269 <row>
266 <entry>__u32</entry> 270 <entry>__u32</entry>
267 <entry><structfield>reserved[9]</structfield></entry> 271 <entry><structfield>reserved[9]</structfield></entry>
268 <entry>Reserved fields for future use</entry> 272 <entry>Reserved fields for future use.</entry>
269 </row> 273 </row>
270 </tbody> 274 </tbody>
271 </tgroup> 275 </tgroup>
@@ -278,24 +282,24 @@ exist no rectangle </emphasis> that satisfies the constraints.</para>
278 <varlistentry> 282 <varlistentry>
279 <term><errorcode>EINVAL</errorcode></term> 283 <term><errorcode>EINVAL</errorcode></term>
280 <listitem> 284 <listitem>
281 <para>The buffer <structfield> &v4l2-selection;::type </structfield> 285 <para>Given buffer type <structfield>type</structfield> or
282or <structfield> &v4l2-selection;::target </structfield> is not supported, or 286the selection target <structfield>target</structfield> is not supported,
283the <structfield> &v4l2-selection;::flags </structfield> are invalid.</para> 287or the <structfield>flags</structfield> argument is not valid.</para>
284 </listitem> 288 </listitem>
285 </varlistentry> 289 </varlistentry>
286 <varlistentry> 290 <varlistentry>
287 <term><errorcode>ERANGE</errorcode></term> 291 <term><errorcode>ERANGE</errorcode></term>
288 <listitem> 292 <listitem>
289 <para>it is not possible to adjust a rectangle <structfield> 293 <para>It is not possible to adjust &v4l2-rect; <structfield>
290&v4l2-selection;::r </structfield> that satisfies all contraints from 294r</structfield> rectangle to satisfy all contraints given in the
291<structfield> &v4l2-selection;::flags </structfield>.</para> 295<structfield>flags</structfield> argument.</para>
292 </listitem> 296 </listitem>
293 </varlistentry> 297 </varlistentry>
294 <varlistentry> 298 <varlistentry>
295 <term><errorcode>EBUSY</errorcode></term> 299 <term><errorcode>EBUSY</errorcode></term>
296 <listitem> 300 <listitem>
297 <para>it is not possible to apply change of selection rectangle at the moment. 301 <para>It is not possible to apply change of the selection rectangle
298Usually because streaming is in progress.</para> 302at the moment. Usually because streaming is in progress.</para>
299 </listitem> 303 </listitem>
300 </varlistentry> 304 </varlistentry>
301 </variablelist> 305 </variablelist>
diff --git a/Documentation/DocBook/media/v4l/vidioc-querycap.xml b/Documentation/DocBook/media/v4l/vidioc-querycap.xml
index e3664d6f2de4..4643505cd4ca 100644
--- a/Documentation/DocBook/media/v4l/vidioc-querycap.xml
+++ b/Documentation/DocBook/media/v4l/vidioc-querycap.xml
@@ -124,12 +124,35 @@ printf ("Version: %u.%u.%u\n",
124 <row> 124 <row>
125 <entry>__u32</entry> 125 <entry>__u32</entry>
126 <entry><structfield>capabilities</structfield></entry> 126 <entry><structfield>capabilities</structfield></entry>
127 <entry>Device capabilities, see <xref 127 <entry>Available capabilities of the physical device as a whole, see <xref
128 linkend="device-capabilities" />.</entry> 128 linkend="device-capabilities" />. The same physical device can export
129 multiple devices in /dev (e.g. /dev/videoX, /dev/vbiY and /dev/radioZ).
130 The <structfield>capabilities</structfield> field should contain a union
131 of all capabilities available around the several V4L2 devices exported
132 to userspace.
133 For all those devices the <structfield>capabilities</structfield> field
134 returns the same set of capabilities. This allows applications to open
135 just one of the devices (typically the video device) and discover whether
136 video, vbi and/or radio are also supported.
137 </entry>
129 </row> 138 </row>
130 <row> 139 <row>
131 <entry>__u32</entry> 140 <entry>__u32</entry>
132 <entry><structfield>reserved</structfield>[4]</entry> 141 <entry><structfield>device_caps</structfield></entry>
142 <entry>Device capabilities of the opened device, see <xref
143 linkend="device-capabilities" />. Should contain the available capabilities
144 of that specific device node. So, for example, <structfield>device_caps</structfield>
145 of a radio device will only contain radio related capabilities and
146 no video or vbi capabilities. This field is only set if the <structfield>capabilities</structfield>
147 field contains the <constant>V4L2_CAP_DEVICE_CAPS</constant> capability.
148 Only the <structfield>capabilities</structfield> field can have the
149 <constant>V4L2_CAP_DEVICE_CAPS</constant> capability, <structfield>device_caps</structfield>
150 will never set <constant>V4L2_CAP_DEVICE_CAPS</constant>.
151 </entry>
152 </row>
153 <row>
154 <entry>__u32</entry>
155 <entry><structfield>reserved</structfield>[3]</entry>
133 <entry>Reserved for future extensions. Drivers must set 156 <entry>Reserved for future extensions. Drivers must set
134this array to zero.</entry> 157this array to zero.</entry>
135 </row> 158 </row>
@@ -276,6 +299,13 @@ linkend="async">asynchronous</link> I/O methods.</entry>
276 <entry>The device supports the <link 299 <entry>The device supports the <link
277linkend="mmap">streaming</link> I/O method.</entry> 300linkend="mmap">streaming</link> I/O method.</entry>
278 </row> 301 </row>
302 <row>
303 <entry><constant>V4L2_CAP_DEVICE_CAPS</constant></entry>
304 <entry>0x80000000</entry>
305 <entry>The driver fills the <structfield>device_caps</structfield>
306 field. This capability can only appear in the <structfield>capabilities</structfield>
307 field and never in the <structfield>device_caps</structfield> field.</entry>
308 </row>
279 </tbody> 309 </tbody>
280 </tgroup> 310 </tgroup>
281 </table> 311 </table>
diff --git a/Documentation/DocBook/media/v4l/vidioc-s-hw-freq-seek.xml b/Documentation/DocBook/media/v4l/vidioc-s-hw-freq-seek.xml
index e013da845b11..18b1a8266f7c 100644
--- a/Documentation/DocBook/media/v4l/vidioc-s-hw-freq-seek.xml
+++ b/Documentation/DocBook/media/v4l/vidioc-s-hw-freq-seek.xml
@@ -96,8 +96,8 @@ field and the &v4l2-tuner; <structfield>index</structfield> field.</entry>
96 <row> 96 <row>
97 <entry>__u32</entry> 97 <entry>__u32</entry>
98 <entry><structfield>reserved</structfield>[7]</entry> 98 <entry><structfield>reserved</structfield>[7]</entry>
99 <entry>Reserved for future extensions. Drivers and 99 <entry>Reserved for future extensions. Applications
100 applications must set the array to zero.</entry> 100 must set the array to zero.</entry>
101 </row> 101 </row>
102 </tbody> 102 </tbody>
103 </tgroup> 103 </tgroup>
@@ -112,7 +112,7 @@ field and the &v4l2-tuner; <structfield>index</structfield> field.</entry>
112 <term><errorcode>EINVAL</errorcode></term> 112 <term><errorcode>EINVAL</errorcode></term>
113 <listitem> 113 <listitem>
114 <para>The <structfield>tuner</structfield> index is out of 114 <para>The <structfield>tuner</structfield> index is out of
115bounds or the value in the <structfield>type</structfield> field is 115bounds, the wrap_around value is not supported or the value in the <structfield>type</structfield> field is
116wrong.</para> 116wrong.</para>
117 </listitem> 117 </listitem>
118 </varlistentry> 118 </varlistentry>
diff --git a/Documentation/EDID/1024x768.S b/Documentation/EDID/1024x768.S
new file mode 100644
index 000000000000..4b486fe31b32
--- /dev/null
+++ b/Documentation/EDID/1024x768.S
@@ -0,0 +1,44 @@
1/*
2 1024x768.S: EDID data set for standard 1024x768 60 Hz monitor
3
4 Copyright (C) 2011 Carsten Emde <C.Emde@osadl.org>
5
6 This program is free software; you can redistribute it and/or
7 modify it under the terms of the GNU General Public License
8 as published by the Free Software Foundation; either version 2
9 of the License, or (at your option) any later version.
10
11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
15
16 You should have received a copy of the GNU General Public License
17 along with this program; if not, write to the Free Software
18 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
19*/
20
21/* EDID */
22#define VERSION 1
23#define REVISION 3
24
25/* Display */
26#define CLOCK 65000 /* kHz */
27#define XPIX 1024
28#define YPIX 768
29#define XY_RATIO XY_RATIO_4_3
30#define XBLANK 320
31#define YBLANK 38
32#define XOFFSET 8
33#define XPULSE 144
34#define YOFFSET (63+3)
35#define YPULSE (63+6)
36#define DPI 72
37#define VFREQ 60 /* Hz */
38#define TIMING_NAME "Linux XGA"
39#define ESTABLISHED_TIMINGS_BITS 0x08 /* Bit 3 -> 1024x768 @60 Hz */
40#define HSYNC_POL 0
41#define VSYNC_POL 0
42#define CRC 0x55
43
44#include "edid.S"
diff --git a/Documentation/EDID/1280x1024.S b/Documentation/EDID/1280x1024.S
new file mode 100644
index 000000000000..a2799fe33a4d
--- /dev/null
+++ b/Documentation/EDID/1280x1024.S
@@ -0,0 +1,44 @@
1/*
2 1280x1024.S: EDID data set for standard 1280x1024 60 Hz monitor
3
4 Copyright (C) 2011 Carsten Emde <C.Emde@osadl.org>
5
6 This program is free software; you can redistribute it and/or
7 modify it under the terms of the GNU General Public License
8 as published by the Free Software Foundation; either version 2
9 of the License, or (at your option) any later version.
10
11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
15
16 You should have received a copy of the GNU General Public License
17 along with this program; if not, write to the Free Software
18 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
19*/
20
21/* EDID */
22#define VERSION 1
23#define REVISION 3
24
25/* Display */
26#define CLOCK 108000 /* kHz */
27#define XPIX 1280
28#define YPIX 1024
29#define XY_RATIO XY_RATIO_5_4
30#define XBLANK 408
31#define YBLANK 42
32#define XOFFSET 48
33#define XPULSE 112
34#define YOFFSET (63+1)
35#define YPULSE (63+3)
36#define DPI 72
37#define VFREQ 60 /* Hz */
38#define TIMING_NAME "Linux SXGA"
39#define ESTABLISHED_TIMINGS_BITS 0x00 /* none */
40#define HSYNC_POL 1
41#define VSYNC_POL 1
42#define CRC 0xa0
43
44#include "edid.S"
diff --git a/Documentation/EDID/1680x1050.S b/Documentation/EDID/1680x1050.S
new file mode 100644
index 000000000000..96f67cafcf2e
--- /dev/null
+++ b/Documentation/EDID/1680x1050.S
@@ -0,0 +1,44 @@
1/*
2 1680x1050.S: EDID data set for standard 1680x1050 60 Hz monitor
3
4 Copyright (C) 2012 Carsten Emde <C.Emde@osadl.org>
5
6 This program is free software; you can redistribute it and/or
7 modify it under the terms of the GNU General Public License
8 as published by the Free Software Foundation; either version 2
9 of the License, or (at your option) any later version.
10
11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
15
16 You should have received a copy of the GNU General Public License
17 along with this program; if not, write to the Free Software
18 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
19*/
20
21/* EDID */
22#define VERSION 1
23#define REVISION 3
24
25/* Display */
26#define CLOCK 146250 /* kHz */
27#define XPIX 1680
28#define YPIX 1050
29#define XY_RATIO XY_RATIO_16_10
30#define XBLANK 560
31#define YBLANK 39
32#define XOFFSET 104
33#define XPULSE 176
34#define YOFFSET (63+3)
35#define YPULSE (63+6)
36#define DPI 96
37#define VFREQ 60 /* Hz */
38#define TIMING_NAME "Linux WSXGA"
39#define ESTABLISHED_TIMINGS_BITS 0x00 /* none */
40#define HSYNC_POL 1
41#define VSYNC_POL 1
42#define CRC 0x26
43
44#include "edid.S"
diff --git a/Documentation/EDID/1920x1080.S b/Documentation/EDID/1920x1080.S
new file mode 100644
index 000000000000..36ed5d571d0a
--- /dev/null
+++ b/Documentation/EDID/1920x1080.S
@@ -0,0 +1,44 @@
1/*
2 1920x1080.S: EDID data set for standard 1920x1080 60 Hz monitor
3
4 Copyright (C) 2012 Carsten Emde <C.Emde@osadl.org>
5
6 This program is free software; you can redistribute it and/or
7 modify it under the terms of the GNU General Public License
8 as published by the Free Software Foundation; either version 2
9 of the License, or (at your option) any later version.
10
11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
15
16 You should have received a copy of the GNU General Public License
17 along with this program; if not, write to the Free Software
18 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
19*/
20
21/* EDID */
22#define VERSION 1
23#define REVISION 3
24
25/* Display */
26#define CLOCK 148500 /* kHz */
27#define XPIX 1920
28#define YPIX 1080
29#define XY_RATIO XY_RATIO_16_9
30#define XBLANK 280
31#define YBLANK 45
32#define XOFFSET 88
33#define XPULSE 44
34#define YOFFSET (63+4)
35#define YPULSE (63+5)
36#define DPI 96
37#define VFREQ 60 /* Hz */
38#define TIMING_NAME "Linux FHD"
39#define ESTABLISHED_TIMINGS_BITS 0x00 /* none */
40#define HSYNC_POL 1
41#define VSYNC_POL 1
42#define CRC 0x05
43
44#include "edid.S"
diff --git a/Documentation/EDID/HOWTO.txt b/Documentation/EDID/HOWTO.txt
new file mode 100644
index 000000000000..75a9f2a0c43d
--- /dev/null
+++ b/Documentation/EDID/HOWTO.txt
@@ -0,0 +1,39 @@
1In the good old days when graphics parameters were configured explicitly
2in a file called xorg.conf, even broken hardware could be managed.
3
4Today, with the advent of Kernel Mode Setting, a graphics board is
5either correctly working because all components follow the standards -
6or the computer is unusable, because the screen remains dark after
7booting or it displays the wrong area. Cases when this happens are:
8- The graphics board does not recognize the monitor.
9- The graphics board is unable to detect any EDID data.
10- The graphics board incorrectly forwards EDID data to the driver.
11- The monitor sends no or bogus EDID data.
12- A KVM sends its own EDID data instead of querying the connected monitor.
13Adding the kernel parameter "nomodeset" helps in most cases, but causes
14restrictions later on.
15
16As a remedy for such situations, the kernel configuration item
17CONFIG_DRM_LOAD_EDID_FIRMWARE was introduced. It allows to provide an
18individually prepared or corrected EDID data set in the /lib/firmware
19directory from where it is loaded via the firmware interface. The code
20(see drivers/gpu/drm/drm_edid_load.c) contains built-in data sets for
21commonly used screen resolutions (1024x768, 1280x1024, 1680x1050,
221920x1080) as binary blobs, but the kernel source tree does not contain
23code to create these data. In order to elucidate the origin of the
24built-in binary EDID blobs and to facilitate the creation of individual
25data for a specific misbehaving monitor, commented sources and a
26Makefile environment are given here.
27
28To create binary EDID and C source code files from the existing data
29material, simply type "make".
30
31If you want to create your own EDID file, copy the file 1024x768.S and
32replace the settings with your own data. The CRC value in the last line
33 #define CRC 0x55
34is a bit tricky. After a first version of the binary data set is
35created, it must be be checked with the "edid-decode" utility which will
36most probably complain about a wrong CRC. Fortunately, the utility also
37displays the correct CRC which must then be inserted into the source
38file. After the make procedure is repeated, the EDID data set is ready
39to be used.
diff --git a/Documentation/EDID/Makefile b/Documentation/EDID/Makefile
new file mode 100644
index 000000000000..17763ca3f12b
--- /dev/null
+++ b/Documentation/EDID/Makefile
@@ -0,0 +1,26 @@
1
2SOURCES := $(wildcard [0-9]*x[0-9]*.S)
3
4BIN := $(patsubst %.S, %.bin, $(SOURCES))
5
6IHEX := $(patsubst %.S, %.bin.ihex, $(SOURCES))
7
8CODE := $(patsubst %.S, %.c, $(SOURCES))
9
10all: $(BIN) $(IHEX) $(CODE)
11
12clean:
13 @rm -f *.o *.bin.ihex *.bin *.c
14
15%.o: %.S
16 @cc -c $^
17
18%.bin: %.o
19 @objcopy -Obinary $^ $@
20
21%.bin.ihex: %.o
22 @objcopy -Oihex $^ $@
23 @dos2unix $@ 2>/dev/null
24
25%.c: %.bin
26 @echo "{" >$@; hexdump -f hex $^ >>$@; echo "};" >>$@
diff --git a/Documentation/EDID/edid.S b/Documentation/EDID/edid.S
new file mode 100644
index 000000000000..ea97ae275fca
--- /dev/null
+++ b/Documentation/EDID/edid.S
@@ -0,0 +1,261 @@
1/*
2 edid.S: EDID data template
3
4 Copyright (C) 2012 Carsten Emde <C.Emde@osadl.org>
5
6 This program is free software; you can redistribute it and/or
7 modify it under the terms of the GNU General Public License
8 as published by the Free Software Foundation; either version 2
9 of the License, or (at your option) any later version.
10
11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
15
16 You should have received a copy of the GNU General Public License
17 along with this program; if not, write to the Free Software
18 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
19*/
20
21
22/* Manufacturer */
23#define MFG_LNX1 'L'
24#define MFG_LNX2 'N'
25#define MFG_LNX3 'X'
26#define SERIAL 0
27#define YEAR 2012
28#define WEEK 5
29
30/* EDID 1.3 standard definitions */
31#define XY_RATIO_16_10 0b00
32#define XY_RATIO_4_3 0b01
33#define XY_RATIO_5_4 0b10
34#define XY_RATIO_16_9 0b11
35
36#define mfgname2id(v1,v2,v3) \
37 ((((v1-'@')&0x1f)<<10)+(((v2-'@')&0x1f)<<5)+((v3-'@')&0x1f))
38#define swap16(v1) ((v1>>8)+((v1&0xff)<<8))
39#define msbs2(v1,v2) ((((v1>>8)&0x0f)<<4)+((v2>>8)&0x0f))
40#define msbs4(v1,v2,v3,v4) \
41 (((v1&0x03)>>2)+((v2&0x03)>>4)+((v3&0x03)>>6)+((v4&0x03)>>8))
42#define pixdpi2mm(pix,dpi) ((pix*25)/dpi)
43#define xsize pixdpi2mm(XPIX,DPI)
44#define ysize pixdpi2mm(YPIX,DPI)
45
46 .data
47
48/* Fixed header pattern */
49header: .byte 0x00,0xff,0xff,0xff,0xff,0xff,0xff,0x00
50
51mfg_id: .word swap16(mfgname2id(MFG_LNX1, MFG_LNX2, MFG_LNX3))
52
53prod_code: .word 0
54
55/* Serial number. 32 bits, little endian. */
56serial_number: .long SERIAL
57
58/* Week of manufacture */
59week: .byte WEEK
60
61/* Year of manufacture, less 1990. (1990-2245)
62 If week=255, it is the model year instead */
63year: .byte YEAR-1990
64
65version: .byte VERSION /* EDID version, usually 1 (for 1.3) */
66revision: .byte REVISION /* EDID revision, usually 3 (for 1.3) */
67
68/* If Bit 7=1 Digital input. If set, the following bit definitions apply:
69 Bits 6-1 Reserved, must be 0
70 Bit 0 Signal is compatible with VESA DFP 1.x TMDS CRGB,
71 1 pixel per clock, up to 8 bits per color, MSB aligned,
72 If Bit 7=0 Analog input. If clear, the following bit definitions apply:
73 Bits 6-5 Video white and sync levels, relative to blank
74 00=+0.7/-0.3 V; 01=+0.714/-0.286 V;
75 10=+1.0/-0.4 V; 11=+0.7/0 V
76 Bit 4 Blank-to-black setup (pedestal) expected
77 Bit 3 Separate sync supported
78 Bit 2 Composite sync (on HSync) supported
79 Bit 1 Sync on green supported
80 Bit 0 VSync pulse must be serrated when somposite or
81 sync-on-green is used. */
82video_parms: .byte 0x6d
83
84/* Maximum horizontal image size, in centimetres
85 (max 292 cm/115 in at 16:9 aspect ratio) */
86max_hor_size: .byte xsize/10
87
88/* Maximum vertical image size, in centimetres.
89 If either byte is 0, undefined (e.g. projector) */
90max_vert_size: .byte ysize/10
91
92/* Display gamma, minus 1, times 100 (range 1.00-3.5 */
93gamma: .byte 120
94
95/* Bit 7 DPMS standby supported
96 Bit 6 DPMS suspend supported
97 Bit 5 DPMS active-off supported
98 Bits 4-3 Display type: 00=monochrome; 01=RGB colour;
99 10=non-RGB multicolour; 11=undefined
100 Bit 2 Standard sRGB colour space. Bytes 25-34 must contain
101 sRGB standard values.
102 Bit 1 Preferred timing mode specified in descriptor block 1.
103 Bit 0 GTF supported with default parameter values. */
104dsp_features: .byte 0xea
105
106/* Chromaticity coordinates. */
107/* Red and green least-significant bits
108 Bits 7-6 Red x value least-significant 2 bits
109 Bits 5-4 Red y value least-significant 2 bits
110 Bits 3-2 Green x value lst-significant 2 bits
111 Bits 1-0 Green y value least-significant 2 bits */
112red_green_lsb: .byte 0x5e
113
114/* Blue and white least-significant 2 bits */
115blue_white_lsb: .byte 0xc0
116
117/* Red x value most significant 8 bits.
118 0-255 encodes 0-0.996 (255/256); 0-0.999 (1023/1024) with lsbits */
119red_x_msb: .byte 0xa4
120
121/* Red y value most significant 8 bits */
122red_y_msb: .byte 0x59
123
124/* Green x and y value most significant 8 bits */
125green_x_y_msb: .byte 0x4a,0x98
126
127/* Blue x and y value most significant 8 bits */
128blue_x_y_msb: .byte 0x25,0x20
129
130/* Default white point x and y value most significant 8 bits */
131white_x_y_msb: .byte 0x50,0x54
132
133/* Established timings */
134/* Bit 7 720x400 @ 70 Hz
135 Bit 6 720x400 @ 88 Hz
136 Bit 5 640x480 @ 60 Hz
137 Bit 4 640x480 @ 67 Hz
138 Bit 3 640x480 @ 72 Hz
139 Bit 2 640x480 @ 75 Hz
140 Bit 1 800x600 @ 56 Hz
141 Bit 0 800x600 @ 60 Hz */
142estbl_timing1: .byte 0x00
143
144/* Bit 7 800x600 @ 72 Hz
145 Bit 6 800x600 @ 75 Hz
146 Bit 5 832x624 @ 75 Hz
147 Bit 4 1024x768 @ 87 Hz, interlaced (1024x768)
148 Bit 3 1024x768 @ 60 Hz
149 Bit 2 1024x768 @ 72 Hz
150 Bit 1 1024x768 @ 75 Hz
151 Bit 0 1280x1024 @ 75 Hz */
152estbl_timing2: .byte ESTABLISHED_TIMINGS_BITS
153
154/* Bit 7 1152x870 @ 75 Hz (Apple Macintosh II)
155 Bits 6-0 Other manufacturer-specific display mod */
156estbl_timing3: .byte 0x00
157
158/* Standard timing */
159/* X resolution, less 31, divided by 8 (256-2288 pixels) */
160std_xres: .byte (XPIX/8)-31
161/* Y resolution, X:Y pixel ratio
162 Bits 7-6 X:Y pixel ratio: 00=16:10; 01=4:3; 10=5:4; 11=16:9.
163 Bits 5-0 Vertical frequency, less 60 (60-123 Hz) */
164std_vres: .byte (XY_RATIO<<6)+VFREQ-60
165 .fill 7,2,0x0101 /* Unused */
166
167descriptor1:
168/* Pixel clock in 10 kHz units. (0.-655.35 MHz, little-endian) */
169clock: .word CLOCK/10
170
171/* Horizontal active pixels 8 lsbits (0-4095) */
172x_act_lsb: .byte XPIX&0xff
173/* Horizontal blanking pixels 8 lsbits (0-4095)
174 End of active to start of next active. */
175x_blk_lsb: .byte XBLANK&0xff
176/* Bits 7-4 Horizontal active pixels 4 msbits
177 Bits 3-0 Horizontal blanking pixels 4 msbits */
178x_msbs: .byte msbs2(XPIX,XBLANK)
179
180/* Vertical active lines 8 lsbits (0-4095) */
181y_act_lsb: .byte YPIX&0xff
182/* Vertical blanking lines 8 lsbits (0-4095) */
183y_blk_lsb: .byte YBLANK&0xff
184/* Bits 7-4 Vertical active lines 4 msbits
185 Bits 3-0 Vertical blanking lines 4 msbits */
186y_msbs: .byte msbs2(YPIX,YBLANK)
187
188/* Horizontal sync offset pixels 8 lsbits (0-1023) From blanking start */
189x_snc_off_lsb: .byte XOFFSET&0xff
190/* Horizontal sync pulse width pixels 8 lsbits (0-1023) */
191x_snc_pls_lsb: .byte XPULSE&0xff
192/* Bits 7-4 Vertical sync offset lines 4 lsbits -63)
193 Bits 3-0 Vertical sync pulse width lines 4 lsbits -63) */
194y_snc_lsb: .byte ((YOFFSET-63)<<4)+(YPULSE-63)
195/* Bits 7-6 Horizontal sync offset pixels 2 msbits
196 Bits 5-4 Horizontal sync pulse width pixels 2 msbits
197 Bits 3-2 Vertical sync offset lines 2 msbits
198 Bits 1-0 Vertical sync pulse width lines 2 msbits */
199xy_snc_msbs: .byte msbs4(XOFFSET,XPULSE,YOFFSET,YPULSE)
200
201/* Horizontal display size, mm, 8 lsbits (0-4095 mm, 161 in) */
202x_dsp_size: .byte xsize&0xff
203
204/* Vertical display size, mm, 8 lsbits (0-4095 mm, 161 in) */
205y_dsp_size: .byte ysize&0xff
206
207/* Bits 7-4 Horizontal display size, mm, 4 msbits
208 Bits 3-0 Vertical display size, mm, 4 msbits */
209dsp_size_mbsb: .byte msbs2(xsize,ysize)
210
211/* Horizontal border pixels (each side; total is twice this) */
212x_border: .byte 0
213/* Vertical border lines (each side; total is twice this) */
214y_border: .byte 0
215
216/* Bit 7 Interlaced
217 Bits 6-5 Stereo mode: 00=No stereo; other values depend on bit 0:
218 Bit 0=0: 01=Field sequential, sync=1 during right; 10=similar,
219 sync=1 during left; 11=4-way interleaved stereo
220 Bit 0=1 2-way interleaved stereo: 01=Right image on even lines;
221 10=Left image on even lines; 11=side-by-side
222 Bits 4-3 Sync type: 00=Analog composite; 01=Bipolar analog composite;
223 10=Digital composite (on HSync); 11=Digital separate
224 Bit 2 If digital separate: Vertical sync polarity (1=positive)
225 Other types: VSync serrated (HSync during VSync)
226 Bit 1 If analog sync: Sync on all 3 RGB lines (else green only)
227 Digital: HSync polarity (1=positive)
228 Bit 0 2-way line-interleaved stereo, if bits 4-3 are not 00. */
229features: .byte 0x18+(VSYNC_POL<<2)+(HSYNC_POL<<1)
230
231descriptor2: .byte 0,0 /* Not a detailed timing descriptor */
232 .byte 0 /* Must be zero */
233 .byte 0xff /* Descriptor is monitor serial number (text) */
234 .byte 0 /* Must be zero */
235start1: .ascii "Linux #0"
236end1: .byte 0x0a /* End marker */
237 .fill 12-(end1-start1), 1, 0x20 /* Padded spaces */
238descriptor3: .byte 0,0 /* Not a detailed timing descriptor */
239 .byte 0 /* Must be zero */
240 .byte 0xfd /* Descriptor is monitor range limits */
241 .byte 0 /* Must be zero */
242start2: .byte VFREQ-1 /* Minimum vertical field rate (1-255 Hz) */
243 .byte VFREQ+1 /* Maximum vertical field rate (1-255 Hz) */
244 .byte (CLOCK/(XPIX+XBLANK))-1 /* Minimum horizontal line rate
245 (1-255 kHz) */
246 .byte (CLOCK/(XPIX+XBLANK))+1 /* Maximum horizontal line rate
247 (1-255 kHz) */
248 .byte (CLOCK/10000)+1 /* Maximum pixel clock rate, rounded up
249 to 10 MHz multiple (10-2550 MHz) */
250 .byte 0 /* No extended timing information type */
251end2: .byte 0x0a /* End marker */
252 .fill 12-(end2-start2), 1, 0x20 /* Padded spaces */
253descriptor4: .byte 0,0 /* Not a detailed timing descriptor */
254 .byte 0 /* Must be zero */
255 .byte 0xfc /* Descriptor is text */
256 .byte 0 /* Must be zero */
257start3: .ascii TIMING_NAME
258end3: .byte 0x0a /* End marker */
259 .fill 12-(end3-start3), 1, 0x20 /* Padded spaces */
260extensions: .byte 0 /* Number of extensions to follow */
261checksum: .byte CRC /* Sum of all bytes must be 0 */
diff --git a/Documentation/EDID/hex b/Documentation/EDID/hex
new file mode 100644
index 000000000000..8873ebb618af
--- /dev/null
+++ b/Documentation/EDID/hex
@@ -0,0 +1 @@
"\t" 8/1 "0x%02x, " "\n"
diff --git a/Documentation/IRQ-domain.txt b/Documentation/IRQ-domain.txt
new file mode 100644
index 000000000000..27dcaabfb4db
--- /dev/null
+++ b/Documentation/IRQ-domain.txt
@@ -0,0 +1,117 @@
1irq_domain interrupt number mapping library
2
3The current design of the Linux kernel uses a single large number
4space where each separate IRQ source is assigned a different number.
5This is simple when there is only one interrupt controller, but in
6systems with multiple interrupt controllers the kernel must ensure
7that each one gets assigned non-overlapping allocations of Linux
8IRQ numbers.
9
10The irq_alloc_desc*() and irq_free_desc*() APIs provide allocation of
11irq numbers, but they don't provide any support for reverse mapping of
12the controller-local IRQ (hwirq) number into the Linux IRQ number
13space.
14
15The irq_domain library adds mapping between hwirq and IRQ numbers on
16top of the irq_alloc_desc*() API. An irq_domain to manage mapping is
17preferred over interrupt controller drivers open coding their own
18reverse mapping scheme.
19
20irq_domain also implements translation from Device Tree interrupt
21specifiers to hwirq numbers, and can be easily extended to support
22other IRQ topology data sources.
23
24=== irq_domain usage ===
25An interrupt controller driver creates and registers an irq_domain by
26calling one of the irq_domain_add_*() functions (each mapping method
27has a different allocator function, more on that later). The function
28will return a pointer to the irq_domain on success. The caller must
29provide the allocator function with an irq_domain_ops structure with
30the .map callback populated as a minimum.
31
32In most cases, the irq_domain will begin empty without any mappings
33between hwirq and IRQ numbers. Mappings are added to the irq_domain
34by calling irq_create_mapping() which accepts the irq_domain and a
35hwirq number as arguments. If a mapping for the hwirq doesn't already
36exist then it will allocate a new Linux irq_desc, associate it with
37the hwirq, and call the .map() callback so the driver can perform any
38required hardware setup.
39
40When an interrupt is received, irq_find_mapping() function should
41be used to find the Linux IRQ number from the hwirq number.
42
43If the driver has the Linux IRQ number or the irq_data pointer, and
44needs to know the associated hwirq number (such as in the irq_chip
45callbacks) then it can be directly obtained from irq_data->hwirq.
46
47=== Types of irq_domain mappings ===
48There are several mechanisms available for reverse mapping from hwirq
49to Linux irq, and each mechanism uses a different allocation function.
50Which reverse map type should be used depends on the use case. Each
51of the reverse map types are described below:
52
53==== Linear ====
54irq_domain_add_linear()
55
56The linear reverse map maintains a fixed size table indexed by the
57hwirq number. When a hwirq is mapped, an irq_desc is allocated for
58the hwirq, and the IRQ number is stored in the table.
59
60The Linear map is a good choice when the maximum number of hwirqs is
61fixed and a relatively small number (~ < 256). The advantages of this
62map are fixed time lookup for IRQ numbers, and irq_descs are only
63allocated for in-use IRQs. The disadvantage is that the table must be
64as large as the largest possible hwirq number.
65
66The majority of drivers should use the linear map.
67
68==== Tree ====
69irq_domain_add_tree()
70
71The irq_domain maintains a radix tree map from hwirq numbers to Linux
72IRQs. When an hwirq is mapped, an irq_desc is allocated and the
73hwirq is used as the lookup key for the radix tree.
74
75The tree map is a good choice if the hwirq number can be very large
76since it doesn't need to allocate a table as large as the largest
77hwirq number. The disadvantage is that hwirq to IRQ number lookup is
78dependent on how many entries are in the table.
79
80Very few drivers should need this mapping. At the moment, powerpc
81iseries is the only user.
82
83==== No Map ===-
84irq_domain_add_nomap()
85
86The No Map mapping is to be used when the hwirq number is
87programmable in the hardware. In this case it is best to program the
88Linux IRQ number into the hardware itself so that no mapping is
89required. Calling irq_create_direct_mapping() will allocate a Linux
90IRQ number and call the .map() callback so that driver can program the
91Linux IRQ number into the hardware.
92
93Most drivers cannot use this mapping.
94
95==== Legacy ====
96irq_domain_add_legacy()
97irq_domain_add_legacy_isa()
98
99The Legacy mapping is a special case for drivers that already have a
100range of irq_descs allocated for the hwirqs. It is used when the
101driver cannot be immediately converted to use the linear mapping. For
102example, many embedded system board support files use a set of #defines
103for IRQ numbers that are passed to struct device registrations. In that
104case the Linux IRQ numbers cannot be dynamically assigned and the legacy
105mapping should be used.
106
107The legacy map assumes a contiguous range of IRQ numbers has already
108been allocated for the controller and that the IRQ number can be
109calculated by adding a fixed offset to the hwirq number, and
110visa-versa. The disadvantage is that it requires the interrupt
111controller to manage IRQ allocations and it requires an irq_desc to be
112allocated for every hwirq, even if it is unused.
113
114The legacy map should only be used if fixed IRQ mappings must be
115supported. For example, ISA controllers would use the legacy map for
116mapping Linux IRQs 0-15 so that existing ISA drivers get the correct IRQ
117numbers.
diff --git a/Documentation/Makefile b/Documentation/Makefile
index 9b4bc5c76f33..30b656ece7aa 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/ vm/ watchdog/src/ 3 pcmcia/ spi/ timers/ watchdog/src/
diff --git a/Documentation/RCU/RTFP.txt b/Documentation/RCU/RTFP.txt
index c43460dade0f..7c1dfb19fc40 100644
--- a/Documentation/RCU/RTFP.txt
+++ b/Documentation/RCU/RTFP.txt
@@ -1,9 +1,10 @@
1Read the F-ing Papers! 1Read the Fscking Papers!
2 2
3 3
4This document describes RCU-related publications, and is followed by 4This document describes RCU-related publications, and is followed by
5the corresponding bibtex entries. A number of the publications may 5the corresponding bibtex entries. A number of the publications may
6be found at http://www.rdrop.com/users/paulmck/RCU/. 6be found at http://www.rdrop.com/users/paulmck/RCU/. For others, browsers
7and search engines will usually find what you are looking for.
7 8
8The first thing resembling RCU was published in 1980, when Kung and Lehman 9The first thing resembling RCU was published in 1980, when Kung and Lehman
9[Kung80] recommended use of a garbage collector to defer destruction 10[Kung80] recommended use of a garbage collector to defer destruction
@@ -160,7 +161,26 @@ which Mathieu Desnoyers is now maintaining [MathieuDesnoyers2009URCU]
160[MathieuDesnoyersPhD]. TINY_RCU [PaulEMcKenney2009BloatWatchRCU] made 161[MathieuDesnoyersPhD]. TINY_RCU [PaulEMcKenney2009BloatWatchRCU] made
161its appearance, as did expedited RCU [PaulEMcKenney2009expeditedRCU]. 162its appearance, as did expedited RCU [PaulEMcKenney2009expeditedRCU].
162The problem of resizeable RCU-protected hash tables may now be on a path 163The problem of resizeable RCU-protected hash tables may now be on a path
163to a solution [JoshTriplett2009RPHash]. 164to a solution [JoshTriplett2009RPHash]. A few academic researchers are now
165using RCU to solve their parallel problems [HariKannan2009DynamicAnalysisRCU].
166
1672010 produced a simpler preemptible-RCU implementation
168based on TREE_RCU [PaulEMcKenney2010SimpleOptRCU], lockdep-RCU
169[PaulEMcKenney2010LockdepRCU], another resizeable RCU-protected hash
170table [HerbertXu2010RCUResizeHash] (this one consuming more memory,
171but allowing arbitrary changes in hash function, as required for DoS
172avoidance in the networking code), realization of the 2009 RCU-protected
173hash table with atomic node move [JoshTriplett2010RPHash], an update on
174the RCU API [PaulEMcKenney2010RCUAPI].
175
1762011 marked the inclusion of Nick Piggin's fully lockless dentry search
177[LinusTorvalds2011Linux2:6:38:rc1:NPigginVFS], an RCU-protected red-black
178tree using software transactional memory to protect concurrent updates
179(strange, but true!) [PhilHoward2011RCUTMRBTree], yet another variant of
180RCU-protected resizeable hash tables [Triplett:2011:RPHash], the 3.0 RCU
181trainwreck [PaulEMcKenney2011RCU3.0trainwreck], and Neil Brown's "Meet the
182Lockers" LWN article [NeilBrown2011MeetTheLockers].
183
164 184
165Bibtex Entries 185Bibtex Entries
166 186
@@ -173,6 +193,14 @@ Bibtex Entries
173,volume="5" 193,volume="5"
174,number="3" 194,number="3"
175,pages="354-382" 195,pages="354-382"
196,note="Available:
197\url{http://portal.acm.org/citation.cfm?id=320619&dl=GUIDE,}
198[Viewed December 3, 2007]"
199,annotation={
200 Use garbage collector to clean up data after everyone is done with it.
201 .
202 Oldest use of something vaguely resembling RCU that I have found.
203}
176} 204}
177 205
178@techreport{Manber82 206@techreport{Manber82
@@ -184,6 +212,31 @@ Bibtex Entries
184,number="82-01-01" 212,number="82-01-01"
185,month="January" 213,month="January"
186,pages="28" 214,pages="28"
215,annotation={
216 .
217 Superseded by Manber84.
218 .
219 Describes concurrent AVL tree implementation. Uses a
220 garbage-collection mechanism to handle concurrent use and deletion
221 of nodes in the tree, but lacks the summary-of-execution-history
222 concept of read-copy locking.
223 .
224 Keeps full list of processes that were active when a given
225 node was to be deleted, and waits until all such processes have
226 -terminated- before allowing this node to be reused. This is
227 not described in great detail -- one could imagine using process
228 IDs for this if the ID space was large enough that overlapping
229 never occurred.
230 .
231 This restriction makes this algorithm unsuitable for use in
232 systems comprised of long-lived processes. It also produces
233 completely unacceptable overhead in systems with large numbers
234 of processes. Finally, it is specific to AVL trees.
235 .
236 Cites Kung80, so not an independent invention, but the first
237 RCU-like usage that does not rely on an automatic garbage
238 collector.
239}
187} 240}
188 241
189@article{Manber84 242@article{Manber84
@@ -195,6 +248,74 @@ Bibtex Entries
195,volume="9" 248,volume="9"
196,number="3" 249,number="3"
197,pages="439-455" 250,pages="439-455"
251,annotation={
252 Describes concurrent AVL tree implementation. Uses a
253 garbage-collection mechanism to handle concurrent use and deletion
254 of nodes in the tree, but lacks the summary-of-execution-history
255 concept of read-copy locking.
256 .
257 Keeps full list of processes that were active when a given
258 node was to be deleted, and waits until all such processes have
259 -terminated- before allowing this node to be reused. This is
260 not described in great detail -- one could imagine using process
261 IDs for this if the ID space was large enough that overlapping
262 never occurred.
263 .
264 This restriction makes this algorithm unsuitable for use in
265 systems comprised of long-lived processes. It also produces
266 completely unacceptable overhead in systems with large numbers
267 of processes. Finally, it is specific to AVL trees.
268}
269}
270
271@Conference{RichardRashid87a
272,Author="Richard Rashid and Avadis Tevanian and Michael Young and
273David Golub and Robert Baron and David Black and William Bolosky and
274Jonathan Chew"
275,Title="Machine-Independent Virtual Memory Management for Paged
276Uniprocessor and Multiprocessor Architectures"
277,Booktitle="{2\textsuperscript{nd} Symposium on Architectural Support
278for Programming Languages and Operating Systems}"
279,Publisher="Association for Computing Machinery"
280,Month="October"
281,Year="1987"
282,pages="31-39"
283,Address="Palo Alto, CA"
284,note="Available:
285\url{http://www.cse.ucsc.edu/~randal/221/rashid-machvm.pdf}
286[Viewed February 17, 2005]"
287,annotation={
288 Describes lazy TLB flush, where one waits for each CPU to pass
289 through a scheduling-clock interrupt before reusing a given range
290 of virtual address. Does not describe how one determines that
291 all CPUs have in fact taken such an interrupt, though there are
292 no shortage of straightforward methods for accomplishing this.
293 .
294 Note that it does not make sense to just wait a fixed amount of
295 time, since a given CPU might have interrupts disabled for an
296 extended amount of time.
297}
298}
299
300@article{BarbaraLiskov1988ArgusCACM
301,author = {Barbara Liskov}
302,title = {Distributed programming in {Argus}}
303,journal = {Commun. ACM}
304,volume = {31}
305,number = {3}
306,year = {1988}
307,issn = {0001-0782}
308,pages = {300--312}
309,doi = {http://doi.acm.org/10.1145/42392.42399}
310,publisher = {ACM}
311,address = {New York, NY, USA}
312,annotation= {
313 At the top of page 307: "Conflicts with deposits and withdrawals
314 are necessary if the reported total is to be up to date. They
315 could be avoided by having total return a sum that is slightly
316 out of date." Relies on semantics -- approximate numerical
317 values sometimes OK.
318}
198} 319}
199 320
200@techreport{Hennessy89 321@techreport{Hennessy89
@@ -216,6 +337,13 @@ Bibtex Entries
216,year="1990" 337,year="1990"
217,number="CS-TR-2222.1" 338,number="CS-TR-2222.1"
218,month="June" 339,month="June"
340,annotation={
341 Concurrent access to skip lists. Has both weak and strong search.
342 Uses concept of ``garbage queue'', but has no real way of cleaning
343 the garbage efficiently.
344 .
345 Appears to be an independent invention of an RCU-like mechanism.
346}
219} 347}
220 348
221@Book{Adams91 349@Book{Adams91
@@ -223,20 +351,15 @@ Bibtex Entries
223,title="Concurrent Programming, Principles, and Practices" 351,title="Concurrent Programming, Principles, and Practices"
224,Publisher="Benjamin Cummins" 352,Publisher="Benjamin Cummins"
225,Year="1991" 353,Year="1991"
354,annotation={
355 Has a few paragraphs describing ``chaotic relaxation'', a
356 numerical analysis technique that allows multiprocessors to
357 avoid synchronization overhead by using possibly-stale data.
358 .
359 Seems like this is descended from yet another independent
360 invention of RCU-like function -- but this is restricted
361 in that reclamation is not necessary.
226} 362}
227
228@phdthesis{HMassalinPhD
229,author="H. Massalin"
230,title="Synthesis: An Efficient Implementation of Fundamental Operating
231System Services"
232,school="Columbia University"
233,address="New York, NY"
234,year="1992"
235,annotation="
236 Mondo optimizing compiler.
237 Wait-free stuff.
238 Good advice: defer work to avoid synchronization.
239"
240} 363}
241 364
242@unpublished{Jacobson93 365@unpublished{Jacobson93
@@ -244,7 +367,13 @@ System Services"
244,title="Avoid Read-Side Locking Via Delayed Free" 367,title="Avoid Read-Side Locking Via Delayed Free"
245,year="1993" 368,year="1993"
246,month="September" 369,month="September"
247,note="Verbal discussion" 370,note="private communication"
371,annotation={
372 Use fixed time delay to approximate grace period. Very simple,
373 but subject to random memory corruption under heavy load.
374 .
375 Independent invention of RCU-like mechanism.
376}
248} 377}
249 378
250@Conference{AjuJohn95 379@Conference{AjuJohn95
@@ -256,6 +385,17 @@ System Services"
256,Year="1995" 385,Year="1995"
257,pages="11-23" 386,pages="11-23"
258,Address="New Orleans, LA" 387,Address="New Orleans, LA"
388,note="Available:
389\url{https://www.usenix.org/publications/library/proceedings/neworl/full_papers/john.a}
390[Viewed October 1, 2010]"
391,annotation={
392 Age vnodes out of the cache, and have a fixed time set by a kernel
393 parameter. Not clear that all races were in fact correctly handled.
394 Used a 20-minute time by default, which would most definitely not
395 be suitable during DoS attacks or virus scans.
396 .
397 Apparently independent invention of RCU-like mechanism.
398}
259} 399}
260 400
261@conference{Pu95a, 401@conference{Pu95a,
@@ -301,31 +441,47 @@ Utilizing Execution History and Thread Monitoring"
301,institution="US Patent and Trademark Office" 441,institution="US Patent and Trademark Office"
302,address="Washington, DC" 442,address="Washington, DC"
303,year="1995" 443,year="1995"
304,number="US Patent 5,442,758 (contributed under GPL)" 444,number="US Patent 5,442,758"
305,month="August" 445,month="August"
446,annotation={
447 Describes the parallel RCU infrastructure. Includes NUMA aspect
448 (structure of bitmap can reflect bus structure of computer system).
449 .
450 Another independent invention of an RCU-like mechanism, but the
451 "real" RCU this time!
452}
306} 453}
307 454
308@techreport{Slingwine97 455@techreport{Slingwine97
309,author="John D. Slingwine and Paul E. McKenney" 456,author="John D. Slingwine and Paul E. McKenney"
310,title="Method for maintaining data coherency using thread 457,title="Method for Maintaining Data Coherency Using Thread Activity
311activity summaries in a multicomputer system" 458Summaries in a Multicomputer System"
312,institution="US Patent and Trademark Office" 459,institution="US Patent and Trademark Office"
313,address="Washington, DC" 460,address="Washington, DC"
314,year="1997" 461,year="1997"
315,number="US Patent 5,608,893 (contributed under GPL)" 462,number="US Patent 5,608,893"
316,month="March" 463,month="March"
464,pages="19"
465,annotation={
466 Describes use of RCU to synchronize data between a pair of
467 SMP/NUMA computer systems.
468}
317} 469}
318 470
319@techreport{Slingwine98 471@techreport{Slingwine98
320,author="John D. Slingwine and Paul E. McKenney" 472,author="John D. Slingwine and Paul E. McKenney"
321,title="Apparatus and method for achieving reduced overhead 473,title="Apparatus and Method for Achieving Reduced Overhead Mutual
322mutual exclusion and maintaining coherency in a multiprocessor 474Exclusion and Maintaining Coherency in a Multiprocessor System
323system utilizing execution history and thread monitoring" 475Utilizing Execution History and Thread Monitoring"
324,institution="US Patent and Trademark Office" 476,institution="US Patent and Trademark Office"
325,address="Washington, DC" 477,address="Washington, DC"
326,year="1998" 478,year="1998"
327,number="US Patent 5,727,209 (contributed under GPL)" 479,number="US Patent 5,727,209"
328,month="March" 480,month="March"
481,annotation={
482 Describes doing an atomic update by copying the data item and
483 then substituting it into the data structure.
484}
329} 485}
330 486
331@Conference{McKenney98 487@Conference{McKenney98
@@ -337,6 +493,15 @@ Problems"
337,Year="1998" 493,Year="1998"
338,pages="509-518" 494,pages="509-518"
339,Address="Las Vegas, NV" 495,Address="Las Vegas, NV"
496,note="Available:
497\url{http://www.rdrop.com/users/paulmck/RCU/rclockpdcsproof.pdf}
498[Viewed December 3, 2007]"
499,annotation={
500 Describes and analyzes RCU mechanism in DYNIX/ptx. Describes
501 application to linked list update and log-buffer flushing.
502 Defines 'quiescent state'. Includes both measured and analytic
503 evaluation.
504}
340} 505}
341 506
342@Conference{Gamsa99 507@Conference{Gamsa99
@@ -349,18 +514,76 @@ Operating System Design and Implementation}"
349,Year="1999" 514,Year="1999"
350,pages="87-100" 515,pages="87-100"
351,Address="New Orleans, LA" 516,Address="New Orleans, LA"
517,note="Available:
518\url{http://www.usenix.org/events/osdi99/full_papers/gamsa/gamsa.pdf}
519[Viewed August 30, 2006]"
520,annotation={
521 Use of RCU-like facility in K42/Tornado. Another independent
522 invention of RCU.
523 See especially pages 7-9 (Section 5).
524}
525}
526
527@unpublished{RustyRussell2000a
528,Author="Rusty Russell"
529,Title="Re: modular net drivers"
530,month="June"
531,year="2000"
532,day="23"
533,note="Available:
534\url{http://oss.sgi.com/projects/netdev/archive/2000-06/msg00250.html}
535[Viewed April 10, 2006]"
536,annotation={
537 Proto-RCU proposal from Phil Rumpf and Rusty Russell.
538 Yet another independent invention of RCU.
539 Outline of algorithm to unload modules...
540 .
541 Appeared on net-dev mailing list.
542}
543}
544
545@unpublished{RustyRussell2000b
546,Author="Rusty Russell"
547,Title="Re: modular net drivers"
548,month="June"
549,year="2000"
550,day="24"
551,note="Available:
552\url{http://oss.sgi.com/projects/netdev/archive/2000-06/msg00254.html}
553[Viewed April 10, 2006]"
554,annotation={
555 Proto-RCU proposal from Phil Rumpf and Rusty Russell.
556 .
557 Appeared on net-dev mailing list.
558}
559}
560
561@unpublished{McKenney01b
562,Author="Paul E. McKenney and Dipankar Sarma"
563,Title="Read-Copy Update Mutual Exclusion in {Linux}"
564,month="February"
565,year="2001"
566,note="Available:
567\url{http://lse.sourceforge.net/locking/rcu/rcupdate_doc.html}
568[Viewed October 18, 2004]"
569,annotation={
570 Prototypical Linux documentation for RCU.
571}
352} 572}
353 573
354@techreport{Slingwine01 574@techreport{Slingwine01
355,author="John D. Slingwine and Paul E. McKenney" 575,author="John D. Slingwine and Paul E. McKenney"
356,title="Apparatus and method for achieving reduced overhead 576,title="Apparatus and Method for Achieving Reduced Overhead Mutual
357mutual exclusion and maintaining coherency in a multiprocessor 577Exclusion and Maintaining Coherency in a Multiprocessor System
358system utilizing execution history and thread monitoring" 578Utilizing Execution History and Thread Monitoring"
359,institution="US Patent and Trademark Office" 579,institution="US Patent and Trademark Office"
360,address="Washington, DC" 580,address="Washington, DC"
361,year="2001" 581,year="2001"
362,number="US Patent 5,219,690 (contributed under GPL)" 582,number="US Patent 6,219,690"
363,month="April" 583,month="April"
584,annotation={
585 'Change in mode' aspect of RCU. Can be thought of as a lazy barrier.
586}
364} 587}
365 588
366@Conference{McKenney01a 589@Conference{McKenney01a
@@ -372,14 +595,61 @@ Orran Krieger and Rusty Russell and Dipankar Sarma and Maneesh Soni"
372,Year="2001" 595,Year="2001"
373,note="Available: 596,note="Available:
374\url{http://www.linuxsymposium.org/2001/abstracts/readcopy.php} 597\url{http://www.linuxsymposium.org/2001/abstracts/readcopy.php}
375\url{http://www.rdrop.com/users/paulmck/rclock/rclock_OLS.2001.05.01c.pdf} 598\url{http://www.rdrop.com/users/paulmck/RCU/rclock_OLS.2001.05.01c.pdf}
376[Viewed June 23, 2004]" 599[Viewed June 23, 2004]"
377annotation=" 600,annotation={
378Described RCU, and presented some patches implementing and using it in 601 Described RCU, and presented some patches implementing and using
379the Linux kernel. 602 it in the Linux kernel.
603}
604}
605
606@unpublished{McKenney01f
607,Author="Paul E. McKenney"
608,Title="{RFC:} patch to allow lock-free traversal of lists with insertion"
609,month="October"
610,year="2001"
611,note="Available:
612\url{http://marc.theaimsgroup.com/?l=linux-kernel&m=100259266316456&w=2}
613[Viewed June 23, 2004]"
614,annotation="
615 Memory-barrier and Alpha thread. 100 messages, not too bad...
616"
617}
618
619@unpublished{Spraul01
620,Author="Manfred Spraul"
621,Title="Re: {RFC:} patch to allow lock-free traversal of lists with insertion"
622,month="October"
623,year="2001"
624,note="Available:
625\url{http://marc.theaimsgroup.com/?l=linux-kernel&m=100264675012867&w=2}
626[Viewed June 23, 2004]"
627,annotation="
628 Suggested burying memory barriers in Linux's list-manipulation
629 primitives.
380" 630"
381} 631}
382 632
633@unpublished{LinusTorvalds2001a
634,Author="Linus Torvalds"
635,Title="{Re:} {[Lse-tech]} {Re:} {RFC:} patch to allow lock-free traversal of lists with insertion"
636,month="October"
637,year="2001"
638,note="Available:
639\url{http://lkml.org/lkml/2001/10/13/105}
640[Viewed August 21, 2004]"
641}
642
643@unpublished{Blanchard02a
644,Author="Anton Blanchard"
645,Title="some RCU dcache and ratcache results"
646,month="March"
647,year="2002"
648,note="Available:
649\url{http://marc.theaimsgroup.com/?l=linux-kernel&m=101637107412972&w=2}
650[Viewed October 18, 2004]"
651}
652
383@Conference{Linder02a 653@Conference{Linder02a
384,Author="Hanna Linder and Dipankar Sarma and Maneesh Soni" 654,Author="Hanna Linder and Dipankar Sarma and Maneesh Soni"
385,Title="Scalability of the Directory Entry Cache" 655,Title="Scalability of the Directory Entry Cache"
@@ -387,6 +657,10 @@ the Linux kernel.
387,Month="June" 657,Month="June"
388,Year="2002" 658,Year="2002"
389,pages="289-300" 659,pages="289-300"
660,annotation="
661 Measured scalability of Linux 2.4 kernel's directory-entry cache
662 (dcache), and measured some scalability enhancements.
663"
390} 664}
391 665
392@Conference{McKenney02a 666@Conference{McKenney02a
@@ -400,49 +674,76 @@ Andrea Arcangeli and Andi Kleen and Orran Krieger and Rusty Russell"
400,note="Available: 674,note="Available:
401\url{http://www.linux.org.uk/~ajh/ols2002_proceedings.pdf.gz} 675\url{http://www.linux.org.uk/~ajh/ols2002_proceedings.pdf.gz}
402[Viewed June 23, 2004]" 676[Viewed June 23, 2004]"
677,annotation="
678 Presented and compared a number of RCU implementations for the
679 Linux kernel.
680"
403} 681}
404 682
405@conference{Michael02a 683@unpublished{Sarma02a
406,author="Maged M. Michael" 684,Author="Dipankar Sarma"
407,title="Safe Memory Reclamation for Dynamic Lock-Free Objects Using Atomic 685,Title="specweb99: dcache scalability results"
408Reads and Writes" 686,month="July"
409,Year="2002" 687,year="2002"
410,Month="August" 688,note="Available:
411,booktitle="{Proceedings of the 21\textsuperscript{st} Annual ACM 689\url{http://marc.theaimsgroup.com/?l=linux-kernel&m=102645767914212&w=2}
412Symposium on Principles of Distributed Computing}" 690[Viewed June 23, 2004]"
413,pages="21-30"
414,annotation=" 691,annotation="
415 Each thread keeps an array of pointers to items that it is 692 Compare fastwalk and RCU for dcache. RCU won.
416 currently referencing. Sort of an inside-out garbage collection
417 mechanism, but one that requires the accessing code to explicitly
418 state its needs. Also requires read-side memory barriers on
419 most architectures.
420" 693"
421} 694}
422 695
423@conference{Michael02b 696@unpublished{Barbieri02
424,author="Maged M. Michael" 697,Author="Luca Barbieri"
425,title="High Performance Dynamic Lock-Free Hash Tables and List-Based Sets" 698,Title="Re: {[PATCH]} Initial support for struct {vfs\_cred}"
426,Year="2002" 699,month="August"
427,Month="August" 700,year="2002"
428,booktitle="{Proceedings of the 14\textsuperscript{th} Annual ACM 701,note="Available:
429Symposium on Parallel 702\url{http://marc.theaimsgroup.com/?l=linux-kernel&m=103082050621241&w=2}
430Algorithms and Architecture}" 703[Viewed: June 23, 2004]"
431,pages="73-82"
432,annotation=" 704,annotation="
433 Like the title says... 705 Suggested RCU for vfs\_shared\_cred.
434" 706"
435} 707}
436 708
437@InProceedings{HerlihyLM02 709@unpublished{Dickins02a
438,author={Maurice Herlihy and Victor Luchangco and Mark Moir} 710,author="Hugh Dickins"
439,title="The Repeat Offender Problem: A Mechanism for Supporting Dynamic-Sized, 711,title="Use RCU for System-V IPC"
440Lock-Free Data Structures" 712,year="2002"
441,booktitle={Proceedings of 16\textsuperscript{th} International 713,month="October"
442Symposium on Distributed Computing} 714,note="private communication"
443,year=2002 715}
716
717@unpublished{Sarma02b
718,Author="Dipankar Sarma"
719,Title="Some dcache\_rcu benchmark numbers"
444,month="October" 720,month="October"
445,pages="339-353" 721,year="2002"
722,note="Available:
723\url{http://marc.theaimsgroup.com/?l=linux-kernel&m=103462075416638&w=2}
724[Viewed June 23, 2004]"
725,annotation="
726 Performance of dcache RCU on kernbench for 16x NUMA-Q and 1x,
727 2x, and 4x systems. RCU does no harm, and helps on 16x.
728"
729}
730
731@unpublished{LinusTorvalds2003a
732,Author="Linus Torvalds"
733,Title="Re: {[PATCH]} small fixes in brlock.h"
734,month="March"
735,year="2003"
736,note="Available:
737\url{http://lkml.org/lkml/2003/3/9/205}
738[Viewed March 13, 2006]"
739,annotation="
740 Linus suggests replacing brlock with RCU and/or seqlocks:
741 .
742 'It's entirely possible that the current user could be replaced
743 by RCU and/or seqlocks, and we could get rid of brlocks entirely.'
744 .
745 Steve Hemminger responds by replacing them with RCU.
746"
446} 747}
447 748
448@article{Appavoo03a 749@article{Appavoo03a
@@ -457,6 +758,20 @@ B. Rosenburg and M. Stumm and J. Xenidis"
457,volume="42" 758,volume="42"
458,number="1" 759,number="1"
459,pages="60-76" 760,pages="60-76"
761,annotation="
762 Use of RCU to enable hot-swapping for autonomic behavior in K42.
763"
764}
765
766@unpublished{Seigh03
767,author="Joseph W. {Seigh II}"
768,title="Read Copy Update"
769,Year="2003"
770,Month="March"
771,note="email correspondence"
772,annotation="
773 Described the relationship of the VM/XA passive serialization to RCU.
774"
460} 775}
461 776
462@Conference{Arcangeli03 777@Conference{Arcangeli03
@@ -470,6 +785,27 @@ Dipankar Sarma"
470,year="2003" 785,year="2003"
471,month="June" 786,month="June"
472,pages="297-310" 787,pages="297-310"
788,note="Available:
789\url{http://www.rdrop.com/users/paulmck/RCU/rcu.FREENIX.2003.06.14.pdf}
790[Viewed November 21, 2007]"
791,annotation="
792 Compared updated RCU implementations for the Linux kernel, and
793 described System V IPC use of RCU, including order-of-magnitude
794 performance improvements.
795"
796}
797
798@Conference{Soules03a
799,Author="Craig A. N. Soules and Jonathan Appavoo and Kevin Hui and
800Dilma {Da Silva} and Gregory R. Ganger and Orran Krieger and
801Michael Stumm and Robert W. Wisniewski and Marc Auslander and
802Michal Ostrowski and Bryan Rosenburg and Jimi Xenidis"
803,Title="System Support for Online Reconfiguration"
804,Booktitle="Proceedings of the 2003 USENIX Annual Technical Conference"
805,Publisher="USENIX Association"
806,year="2003"
807,month="June"
808,pages="141-154"
473} 809}
474 810
475@article{McKenney03a 811@article{McKenney03a
@@ -481,6 +817,22 @@ Dipankar Sarma"
481,volume="1" 817,volume="1"
482,number="114" 818,number="114"
483,pages="18-26" 819,pages="18-26"
820,note="Available:
821\url{http://www.linuxjournal.com/article/6993}
822[Viewed November 14, 2007]"
823,annotation="
824 Reader-friendly intro to RCU, with the infamous old-man-and-brat
825 cartoon.
826"
827}
828
829@unpublished{Sarma03a
830,Author="Dipankar Sarma"
831,Title="RCU low latency patches"
832,month="December"
833,year="2003"
834,note="Message ID: 20031222180114.GA2248@in.ibm.com"
835,annotation="dipankar/ct.2004.03.27/RCUll.2003.12.22.patch"
484} 836}
485 837
486@techreport{Friedberg03a 838@techreport{Friedberg03a
@@ -489,9 +841,14 @@ Dipankar Sarma"
489,institution="US Patent and Trademark Office" 841,institution="US Patent and Trademark Office"
490,address="Washington, DC" 842,address="Washington, DC"
491,year="2003" 843,year="2003"
492,number="US Patent 6,662,184 (contributed under GPL)" 844,number="US Patent 6,662,184"
493,month="December" 845,month="December"
494,pages="112" 846,pages="112"
847,annotation="
848 Applies RCU to a wildcard-search Patricia tree in order to permit
849 synchronization-free lookup. RCU is used to retain removed nodes
850 for a grace period before freeing them.
851"
495} 852}
496 853
497@article{McKenney04a 854@article{McKenney04a
@@ -503,6 +860,12 @@ Dipankar Sarma"
503,volume="1" 860,volume="1"
504,number="118" 861,number="118"
505,pages="38-46" 862,pages="38-46"
863,note="Available:
864\url{http://www.linuxjournal.com/node/7124}
865[Viewed December 26, 2010]"
866,annotation="
867 Reader friendly intro to dcache and RCU.
868"
506} 869}
507 870
508@Conference{McKenney04b 871@Conference{McKenney04b
@@ -514,8 +877,83 @@ Dipankar Sarma"
514,Address="Adelaide, Australia" 877,Address="Adelaide, Australia"
515,note="Available: 878,note="Available:
516\url{http://www.linux.org.au/conf/2004/abstracts.html#90} 879\url{http://www.linux.org.au/conf/2004/abstracts.html#90}
517\url{http://www.rdrop.com/users/paulmck/rclock/lockperf.2004.01.17a.pdf} 880\url{http://www.rdrop.com/users/paulmck/RCU/lockperf.2004.01.17a.pdf}
518[Viewed June 23, 2004]" 881[Viewed June 23, 2004]"
882,annotation="
883 Compares performance of RCU to that of other locking primitives
884 over a number of CPUs (x86, Opteron, Itanium, and PPC).
885"
886}
887
888@unpublished{Sarma04a
889,Author="Dipankar Sarma"
890,Title="{[PATCH]} {RCU} for low latency (experimental)"
891,month="March"
892,year="2004"
893,note="\url{http://marc.theaimsgroup.com/?l=linux-kernel&m=108003746402892&w=2}"
894,annotation="Head of thread: dipankar/2004.03.23/rcu-low-lat.1.patch"
895}
896
897@unpublished{Sarma04b
898,Author="Dipankar Sarma"
899,Title="Re: {[PATCH]} {RCU} for low latency (experimental)"
900,month="March"
901,year="2004"
902,note="\url{http://marc.theaimsgroup.com/?l=linux-kernel&m=108016474829546&w=2}"
903,annotation="dipankar/rcuth.2004.03.24/rcu-throttle.patch"
904}
905
906@unpublished{Spraul04a
907,Author="Manfred Spraul"
908,Title="[RFC] 0/5 rcu lock update"
909,month="May"
910,year="2004"
911,note="Available:
912\url{http://marc.theaimsgroup.com/?l=linux-kernel&m=108546407726602&w=2}
913[Viewed June 23, 2004]"
914,annotation="
915 Hierarchical-bitmap patch for RCU infrastructure.
916"
917}
918
919@unpublished{Steiner04a
920,Author="Jack Steiner"
921,Title="Re: [Lse-tech] [RFC, PATCH] 1/5 rcu lock update:
922Add per-cpu batch counter"
923,month="May"
924,year="2004"
925,note="Available:
926\url{http://marc.theaimsgroup.com/?l=linux-kernel&m=108551764515332&w=2}
927[Viewed June 23, 2004]"
928,annotation={
929 RCU runs reasonably on a 512-CPU SGI using Manfred Spraul's patches,
930 which may be found at:
931 https://lkml.org/lkml/2004/5/20/49 (split vars into cachelines)
932 https://lkml.org/lkml/2004/5/22/114 (cpu_quiet() patch)
933 https://lkml.org/lkml/2004/5/25/24 (0/5)
934 https://lkml.org/lkml/2004/5/25/23 (1/5)
935 https://lkml.org/lkml/2004/5/25/265 (works for Jack)
936 https://lkml.org/lkml/2004/5/25/20 (2/5)
937 https://lkml.org/lkml/2004/5/25/22 (3/5)
938 https://lkml.org/lkml/2004/5/25/19 (4/5)
939 https://lkml.org/lkml/2004/5/25/21 (5/5)
940}
941}
942
943@Conference{Sarma04c
944,Author="Dipankar Sarma and Paul E. McKenney"
945,Title="Making {RCU} Safe for Deep Sub-Millisecond Response
946Realtime Applications"
947,Booktitle="Proceedings of the 2004 USENIX Annual Technical Conference
948(FREENIX Track)"
949,Publisher="USENIX Association"
950,year="2004"
951,month="June"
952,pages="182-191"
953,annotation="
954 Describes and compares a number of modifications to the Linux RCU
955 implementation that make it friendly to realtime applications.
956"
519} 957}
520 958
521@phdthesis{PaulEdwardMcKenneyPhD 959@phdthesis{PaulEdwardMcKenneyPhD
@@ -529,17 +967,118 @@ Oregon Health and Sciences University"
529,note="Available: 967,note="Available:
530\url{http://www.rdrop.com/users/paulmck/RCU/RCUdissertation.2004.07.14e1.pdf} 968\url{http://www.rdrop.com/users/paulmck/RCU/RCUdissertation.2004.07.14e1.pdf}
531[Viewed October 15, 2004]" 969[Viewed October 15, 2004]"
970,annotation="
971 Describes RCU implementations and presents design patterns
972 corresponding to common uses of RCU in several operating-system
973 kernels.
974"
532} 975}
533 976
534@Conference{Sarma04c 977@unpublished{PaulEMcKenney2004rcu:dereference
535,Author="Dipankar Sarma and Paul E. McKenney" 978,Author="Dipankar Sarma"
536,Title="Making RCU Safe for Deep Sub-Millisecond Response Realtime Applications" 979,Title="{Re: RCU : Abstracted RCU dereferencing [5/5]}"
537,Booktitle="Proceedings of the 2004 USENIX Annual Technical Conference 980,month="August"
538(FREENIX Track)"
539,Publisher="USENIX Association"
540,year="2004" 981,year="2004"
541,month="June" 982,note="Available:
542,pages="182-191" 983\url{http://lkml.org/lkml/2004/8/6/237}
984[Viewed June 8, 2010]"
985,annotation="
986 Introduce rcu_dereference().
987"
988}
989
990@unpublished{JimHouston04a
991,Author="Jim Houston"
992,Title="{[RFC\&PATCH] Alternative {RCU} implementation}"
993,month="August"
994,year="2004"
995,note="Available:
996\url{http://lkml.org/lkml/2004/8/30/87}
997[Viewed February 17, 2005]"
998,annotation="
999 Uses active code in rcu_read_lock() and rcu_read_unlock() to
1000 make RCU happen, allowing RCU to function on CPUs that do not
1001 receive a scheduling-clock interrupt.
1002"
1003}
1004
1005@unpublished{TomHart04a
1006,Author="Thomas E. Hart"
1007,Title="Master's Thesis: Applying Lock-free Techniques to the {Linux} Kernel"
1008,month="October"
1009,year="2004"
1010,note="Available:
1011\url{http://www.cs.toronto.edu/~tomhart/masters_thesis.html}
1012[Viewed October 15, 2004]"
1013,annotation="
1014 Proposes comparing RCU to lock-free methods for the Linux kernel.
1015"
1016}
1017
1018@unpublished{Vaddagiri04a
1019,Author="Srivatsa Vaddagiri"
1020,Title="Subject: [RFC] Use RCU for tcp\_ehash lookup"
1021,month="October"
1022,year="2004"
1023,note="Available:
1024\url{http://marc.theaimsgroup.com/?t=109395731700004&r=1&w=2}
1025[Viewed October 18, 2004]"
1026,annotation="
1027 Srivatsa's RCU patch for tcp_ehash lookup.
1028"
1029}
1030
1031@unpublished{Thirumalai04a
1032,Author="Ravikiran Thirumalai"
1033,Title="Subject: [patchset] Lockfree fd lookup 0 of 5"
1034,month="October"
1035,year="2004"
1036,note="Available:
1037\url{http://marc.theaimsgroup.com/?t=109144217400003&r=1&w=2}
1038[Viewed October 18, 2004]"
1039,annotation="
1040 Ravikiran's lockfree FD patch.
1041"
1042}
1043
1044@unpublished{Thirumalai04b
1045,Author="Ravikiran Thirumalai"
1046,Title="Subject: Re: [patchset] Lockfree fd lookup 0 of 5"
1047,month="October"
1048,year="2004"
1049,note="Available:
1050\url{http://marc.theaimsgroup.com/?l=linux-kernel&m=109152521410459&w=2}
1051[Viewed October 18, 2004]"
1052,annotation="
1053 Ravikiran's lockfree FD patch.
1054"
1055}
1056
1057@unpublished{PaulEMcKenney2004rcu:assign:pointer
1058,Author="Paul E. McKenney"
1059,Title="{[PATCH 1/3] RCU: \url{rcu_assign_pointer()} removal of memory barriers}"
1060,month="October"
1061,year="2004"
1062,note="Available:
1063\url{http://lkml.org/lkml/2004/10/23/241}
1064[Viewed June 8, 2010]"
1065,annotation="
1066 Introduce rcu_assign_pointer().
1067"
1068}
1069
1070@unpublished{JamesMorris04a
1071,Author="James Morris"
1072,Title="{[PATCH 2/3] SELinux} scalability - convert {AVC} to {RCU}"
1073,day="15"
1074,month="November"
1075,year="2004"
1076,note="Available:
1077\url{http://marc.theaimsgroup.com/?l=linux-kernel&m=110054979416004&w=2}
1078[Viewed December 10, 2004]"
1079,annotation="
1080 James Morris posts Kaigai Kohei's patch to LKML.
1081"
543} 1082}
544 1083
545@unpublished{JamesMorris04b 1084@unpublished{JamesMorris04b
@@ -550,6 +1089,85 @@ Oregon Health and Sciences University"
550,note="Available: 1089,note="Available:
551\url{http://www.livejournal.com/users/james_morris/2153.html} 1090\url{http://www.livejournal.com/users/james_morris/2153.html}
552[Viewed December 10, 2004]" 1091[Viewed December 10, 2004]"
1092,annotation="
1093 RCU helps SELinux performance. ;-) Made LWN.
1094"
1095}
1096
1097@unpublished{PaulMcKenney2005RCUSemantics
1098,Author="Paul E. McKenney and Jonathan Walpole"
1099,Title="{RCU} Semantics: A First Attempt"
1100,month="January"
1101,year="2005"
1102,day="30"
1103,note="Available:
1104\url{http://www.rdrop.com/users/paulmck/RCU/rcu-semantics.2005.01.30a.pdf}
1105[Viewed December 6, 2009]"
1106,annotation="
1107 Early derivation of RCU semantics.
1108"
1109}
1110
1111@unpublished{PaulMcKenney2005e
1112,Author="Paul E. McKenney"
1113,Title="Real-Time Preemption and {RCU}"
1114,month="March"
1115,year="2005"
1116,day="17"
1117,note="Available:
1118\url{http://lkml.org/lkml/2005/3/17/199}
1119[Viewed September 5, 2005]"
1120,annotation="
1121 First posting showing how RCU can be safely adapted for
1122 preemptable RCU read side critical sections.
1123"
1124}
1125
1126@unpublished{EsbenNeilsen2005a
1127,Author="Esben Neilsen"
1128,Title="Re: Real-Time Preemption and {RCU}"
1129,month="March"
1130,year="2005"
1131,day="18"
1132,note="Available:
1133\url{http://lkml.org/lkml/2005/3/18/122}
1134[Viewed March 30, 2006]"
1135,annotation="
1136 Esben Neilsen suggests read-side suppression of grace-period
1137 processing for crude-but-workable realtime RCU. The downside
1138 is indefinite grace periods...But this is OK for experimentation
1139 and testing.
1140"
1141}
1142
1143@unpublished{TomHart05a
1144,Author="Thomas E. Hart and Paul E. McKenney and Angela Demke Brown"
1145,Title="Efficient Memory Reclamation is Necessary for Fast Lock-Free
1146Data Structures"
1147,month="March"
1148,year="2005"
1149,note="Available:
1150\url{ftp://ftp.cs.toronto.edu/csrg-technical-reports/515/}
1151[Viewed March 4, 2005]"
1152,annotation="
1153 Comparison of RCU, QBSR, and EBSR. RCU wins for read-mostly
1154 workloads. ;-)
1155"
1156}
1157
1158@unpublished{JonCorbet2005DeprecateSyncKernel
1159,Author="Jonathan Corbet"
1160,Title="API change: synchronize_kernel() deprecated"
1161,month="May"
1162,day="3"
1163,year="2005"
1164,note="Available:
1165\url{http://lwn.net/Articles/134484/}
1166[Viewed May 3, 2005]"
1167,annotation="
1168 Jon Corbet describes deprecation of synchronize_kernel()
1169 in favor of synchronize_rcu() and synchronize_sched().
1170"
553} 1171}
554 1172
555@unpublished{PaulMcKenney05a 1173@unpublished{PaulMcKenney05a
@@ -568,7 +1186,7 @@ Oregon Health and Sciences University"
568 1186
569@conference{PaulMcKenney05b 1187@conference{PaulMcKenney05b
570,Author="Paul E. McKenney and Dipankar Sarma" 1188,Author="Paul E. McKenney and Dipankar Sarma"
571,Title="Towards Hard Realtime Response from the Linux Kernel on SMP Hardware" 1189,Title="Towards Hard Realtime Response from the {Linux} Kernel on {SMP} Hardware"
572,Booktitle="linux.conf.au 2005" 1190,Booktitle="linux.conf.au 2005"
573,month="April" 1191,month="April"
574,year="2005" 1192,year="2005"
@@ -578,6 +1196,103 @@ Oregon Health and Sciences University"
578[Viewed May 13, 2005]" 1196[Viewed May 13, 2005]"
579,annotation=" 1197,annotation="
580 Realtime turns into making RCU yet more realtime friendly. 1198 Realtime turns into making RCU yet more realtime friendly.
1199 http://lca2005.linux.org.au/Papers/Paul%20McKenney/Towards%20Hard%20Realtime%20Response%20from%20the%20Linux%20Kernel/LKS.2005.04.22a.pdf
1200"
1201}
1202
1203@unpublished{PaulEMcKenneyHomePage
1204,Author="Paul E. McKenney"
1205,Title="{Paul} {E.} {McKenney}"
1206,month="May"
1207,year="2005"
1208,note="Available:
1209\url{http://www.rdrop.com/users/paulmck/}
1210[Viewed May 25, 2005]"
1211,annotation="
1212 Paul McKenney's home page.
1213"
1214}
1215
1216@unpublished{PaulEMcKenneyRCUPage
1217,Author="Paul E. McKenney"
1218,Title="Read-Copy Update {(RCU)}"
1219,month="May"
1220,year="2005"
1221,note="Available:
1222\url{http://www.rdrop.com/users/paulmck/RCU}
1223[Viewed May 25, 2005]"
1224,annotation="
1225 Paul McKenney's RCU page.
1226"
1227}
1228
1229@unpublished{JosephSeigh2005a
1230,Author="Joseph Seigh"
1231,Title="{RCU}+{SMR} (hazard pointers)"
1232,month="July"
1233,year="2005"
1234,note="Personal communication"
1235,annotation="
1236 Joe Seigh announcing his atomic-ptr-plus project.
1237 http://sourceforge.net/projects/atomic-ptr-plus/
1238"
1239}
1240
1241@unpublished{JosephSeigh2005b
1242,Author="Joseph Seigh"
1243,Title="Lock-free synchronization primitives"
1244,month="July"
1245,day="6"
1246,year="2005"
1247,note="Available:
1248\url{http://sourceforge.net/projects/atomic-ptr-plus/}
1249[Viewed August 8, 2005]"
1250,annotation="
1251 Joe Seigh's atomic-ptr-plus project.
1252"
1253}
1254
1255@unpublished{PaulMcKenney2005c
1256,Author="Paul E.McKenney"
1257,Title="{[RFC,PATCH] RCU} and {CONFIG\_PREEMPT\_RT} sane patch"
1258,month="August"
1259,day="1"
1260,year="2005"
1261,note="Available:
1262\url{http://lkml.org/lkml/2005/8/1/155}
1263[Viewed March 14, 2006]"
1264,annotation="
1265 First operating counter-based realtime RCU patch posted to LKML.
1266"
1267}
1268
1269@unpublished{PaulMcKenney2005d
1270,Author="Paul E. McKenney"
1271,Title="Re: [Fwd: Re: [patch] Real-Time Preemption, -RT-2.6.13-rc4-V0.7.52-01]"
1272,month="August"
1273,day="8"
1274,year="2005"
1275,note="Available:
1276\url{http://lkml.org/lkml/2005/8/8/108}
1277[Viewed March 14, 2006]"
1278,annotation="
1279 First operating counter-based realtime RCU patch posted to LKML,
1280 but fixed so that various unusual combinations of configuration
1281 parameters all function properly.
1282"
1283}
1284
1285@unpublished{PaulMcKenney2005rcutorture
1286,Author="Paul E. McKenney"
1287,Title="{[PATCH]} {RCU} torture testing"
1288,month="October"
1289,day="1"
1290,year="2005"
1291,note="Available:
1292\url{http://lkml.org/lkml/2005/10/1/70}
1293[Viewed March 14, 2006]"
1294,annotation="
1295 First rcutorture patch.
581" 1296"
582} 1297}
583 1298
@@ -591,22 +1306,39 @@ Distributed Processing Symposium"
591,year="2006" 1306,year="2006"
592,day="25-29" 1307,day="25-29"
593,address="Rhodes, Greece" 1308,address="Rhodes, Greece"
1309,note="Available:
1310\url{http://www.rdrop.com/users/paulmck/RCU/hart_ipdps06.pdf}
1311[Viewed April 28, 2008]"
1312,annotation="
1313 Compares QSBR, HPBR, EBR, and lock-free reference counting.
1314 http://www.cs.toronto.edu/~tomhart/perflab/ipdps06.tgz
1315"
1316}
1317
1318@unpublished{NickPiggin2006radixtree
1319,Author="Nick Piggin"
1320,Title="[patch 3/3] radix-tree: {RCU} lockless readside"
1321,month="June"
1322,day="20"
1323,year="2006"
1324,note="Available:
1325\url{http://lkml.org/lkml/2006/6/20/238}
1326[Viewed March 25, 2008]"
594,annotation=" 1327,annotation="
595 Compares QSBR (AKA "classic RCU"), HPBR, EBR, and lock-free 1328 RCU-protected radix tree.
596 reference counting.
597" 1329"
598} 1330}
599 1331
600@Conference{PaulEMcKenney2006b 1332@Conference{PaulEMcKenney2006b
601,Author="Paul E. McKenney and Dipankar Sarma and Ingo Molnar and 1333,Author="Paul E. McKenney and Dipankar Sarma and Ingo Molnar and
602Suparna Bhattacharya" 1334Suparna Bhattacharya"
603,Title="Extending RCU for Realtime and Embedded Workloads" 1335,Title="Extending {RCU} for Realtime and Embedded Workloads"
604,Booktitle="{Ottawa Linux Symposium}" 1336,Booktitle="{Ottawa Linux Symposium}"
605,Month="July" 1337,Month="July"
606,Year="2006" 1338,Year="2006"
607,pages="v2 123-138" 1339,pages="v2 123-138"
608,note="Available: 1340,note="Available:
609\url{http://www.linuxsymposium.org/2006/index_2006.php} 1341\url{http://www.linuxsymposium.org/2006/view_abstract.php?content_key=184}
610\url{http://www.rdrop.com/users/paulmck/RCU/OLSrtRCU.2006.08.11a.pdf} 1342\url{http://www.rdrop.com/users/paulmck/RCU/OLSrtRCU.2006.08.11a.pdf}
611[Viewed January 1, 2007]" 1343[Viewed January 1, 2007]"
612,annotation=" 1344,annotation="
@@ -614,6 +1346,37 @@ Suparna Bhattacharya"
614" 1346"
615} 1347}
616 1348
1349@unpublished{WikipediaRCU
1350,Author="Paul E. McKenney and Chris Purcell and Algae and Ben Schumin and
1351Gaius Cornelius and Qwertyus and Neil Conway and Sbw and Blainster and
1352Canis Rufus and Zoicon5 and Anome and Hal Eisen"
1353,Title="Read-Copy Update"
1354,month="July"
1355,day="8"
1356,year="2006"
1357,note="Available:
1358\url{http://en.wikipedia.org/wiki/Read-copy-update}
1359[Viewed August 21, 2006]"
1360,annotation="
1361 Wikipedia RCU page as of July 8 2006.
1362"
1363}
1364
1365@Conference{NickPiggin2006LocklessPageCache
1366,Author="Nick Piggin"
1367,Title="A Lockless Pagecache in Linux---Introduction, Progress, Performance"
1368,Booktitle="{Ottawa Linux Symposium}"
1369,Month="July"
1370,Year="2006"
1371,pages="v2 249-254"
1372,note="Available:
1373\url{http://www.linuxsymposium.org/2006/view_abstract.php?content_key=184}
1374[Viewed January 11, 2009]"
1375,annotation="
1376 Uses RCU-protected radix tree for a lockless page cache.
1377"
1378}
1379
617@unpublished{PaulEMcKenney2006c 1380@unpublished{PaulEMcKenney2006c
618,Author="Paul E. McKenney" 1381,Author="Paul E. McKenney"
619,Title="Sleepable {RCU}" 1382,Title="Sleepable {RCU}"
@@ -637,29 +1400,301 @@ Revised:
637,day="18" 1400,day="18"
638,year="2006" 1401,year="2006"
639,note="Available: 1402,note="Available:
640\url{http://www.nada.kth.se/~snilsson/public/papers/trash/trash.pdf} 1403\url{http://www.nada.kth.se/~snilsson/publications/TRASH/trash.pdf}
641[Viewed February 24, 2007]" 1404[Viewed March 4, 2011]"
642,annotation=" 1405,annotation="
643 RCU-protected dynamic trie-hash combination. 1406 RCU-protected dynamic trie-hash combination.
644" 1407"
645} 1408}
646 1409
647@unpublished{ThomasEHart2007a 1410@unpublished{ChristophHellwig2006RCU2SRCU
648,Author="Thomas E. Hart and Paul E. McKenney and Angela Demke Brown and Jonathan Walpole" 1411,Author="Christoph Hellwig"
649,Title="Performance of memory reclamation for lockless synchronization" 1412,Title="Re: {[-mm PATCH 1/4]} {RCU}: split classic rcu"
650,journal="J. Parallel Distrib. Comput." 1413,month="September"
1414,day="28"
1415,year="2006"
1416,note="Available:
1417\url{http://lkml.org/lkml/2006/9/28/160}
1418[Viewed March 27, 2008]"
1419}
1420
1421@unpublished{PaulEMcKenneyRCUusagePage
1422,Author="Paul E. McKenney"
1423,Title="{RCU} {Linux} Usage"
1424,month="October"
1425,year="2006"
1426,note="Available:
1427\url{http://www.rdrop.com/users/paulmck/RCU/linuxusage.html}
1428[Viewed January 14, 2007]"
1429,annotation="
1430 Paul McKenney's RCU page showing graphs plotting Linux-kernel
1431 usage of RCU.
1432"
1433}
1434
1435@unpublished{PaulEMcKenneyRCUusageRawDataPage
1436,Author="Paul E. McKenney"
1437,Title="Read-Copy Update {(RCU)} Usage in {Linux} Kernel"
1438,month="October"
1439,year="2006"
1440,note="Available:
1441\url{http://www.rdrop.com/users/paulmck/RCU/linuxusage/rculocktab.html}
1442[Viewed January 14, 2007]"
1443,annotation="
1444 Paul McKenney's RCU page showing Linux usage of RCU in tabular
1445 form, with links to corresponding cscope databases.
1446"
1447}
1448
1449@unpublished{GauthamShenoy2006RCUrwlock
1450,Author="Gautham R. Shenoy"
1451,Title="[PATCH 4/5] lock\_cpu\_hotplug: Redesign - Lightweight implementation of lock\_cpu\_hotplug"
1452,month="October"
1453,year="2006"
1454,day=26
1455,note="Available:
1456\url{http://lkml.org/lkml/2006/10/26/73}
1457[Viewed January 26, 2009]"
1458,annotation="
1459 RCU-based reader-writer lock that allows readers to proceed with
1460 no memory barriers or atomic instruction in absence of writers.
1461 If writer do show up, readers must of course wait as required by
1462 the semantics of reader-writer locking. This is a recursive
1463 lock.
1464"
1465}
1466
1467@unpublished{JensAxboe2006SlowSRCU
1468,Author="Jens Axboe"
1469,Title="Re: [patch] cpufreq: mark \url{cpufreq_tsc()} as
1470\url{core_initcall_sync}"
1471,month="November"
1472,year="2006"
1473,day=17
1474,note="Available:
1475\url{http://lkml.org/lkml/2006/11/17/56}
1476[Viewed May 28, 2007]"
1477,annotation="
1478 SRCU's grace periods are too slow for Jens, even after a
1479 factor-of-three speedup.
1480 Sped-up version of SRCU at http://lkml.org/lkml/2006/11/17/359.
1481"
1482}
1483
1484@unpublished{OlegNesterov2006QRCU
1485,Author="Oleg Nesterov"
1486,Title="Re: [patch] cpufreq: mark {\tt cpufreq\_tsc()} as
1487{\tt core\_initcall\_sync}"
1488,month="November"
1489,year="2006"
1490,day=19
1491,note="Available:
1492\url{http://lkml.org/lkml/2006/11/19/69}
1493[Viewed May 28, 2007]"
1494,annotation="
1495 First cut of QRCU. Expanded/corrected versions followed.
1496 Used to be OlegNesterov2007QRCU, now time-corrected.
1497"
1498}
1499
1500@unpublished{OlegNesterov2006aQRCU
1501,Author="Oleg Nesterov"
1502,Title="Re: [RFC, PATCH 1/2] qrcu: {"quick"} srcu implementation"
1503,month="November"
1504,year="2006"
1505,day=30
1506,note="Available:
1507\url{http://lkml.org/lkml/2006/11/29/330}
1508[Viewed November 26, 2008]"
1509,annotation="
1510 Expanded/corrected version of QRCU.
1511 Used to be OlegNesterov2007aQRCU, now time-corrected.
1512"
1513}
1514
1515@unpublished{EvgeniyPolyakov2006RCUslowdown
1516,Author="Evgeniy Polyakov"
1517,Title="Badness in postponing work"
1518,month="December"
1519,year="2006"
1520,day=05
1521,note="Available:
1522\url{http://www.ioremap.net/node/41}
1523[Viewed October 28, 2008]"
1524,annotation="
1525 Using RCU as a pure delay leads to a 2.5x slowdown in skbs in
1526 the Linux kernel.
1527"
1528}
1529
1530@inproceedings{ChrisMatthews2006ClusteredObjectsRCU
1531,author = {Matthews, Chris and Coady, Yvonne and Appavoo, Jonathan}
1532,title = {Portability events: a programming model for scalable system infrastructures}
1533,booktitle = {PLOS '06: Proceedings of the 3rd workshop on Programming languages and operating systems}
1534,year = {2006}
1535,isbn = {1-59593-577-0}
1536,pages = {11}
1537,location = {San Jose, California}
1538,doi = {http://doi.acm.org/10.1145/1215995.1216006}
1539,publisher = {ACM}
1540,address = {New York, NY, USA}
1541,annotation={
1542 Uses K42's RCU-like functionality to manage clustered-object
1543 lifetimes.
1544}}
1545
1546@article{DilmaDaSilva2006K42
1547,author = {Silva, Dilma Da and Krieger, Orran and Wisniewski, Robert W. and Waterland, Amos and Tam, David and Baumann, Andrew}
1548,title = {K42: an infrastructure for operating system research}
1549,journal = {SIGOPS Oper. Syst. Rev.}
1550,volume = {40}
1551,number = {2}
1552,year = {2006}
1553,issn = {0163-5980}
1554,pages = {34--42}
1555,doi = {http://doi.acm.org/10.1145/1131322.1131333}
1556,publisher = {ACM}
1557,address = {New York, NY, USA}
1558,annotation={
1559 Describes relationship of K42 generations to RCU.
1560}}
1561
1562# CoreyMinyard2007list_splice_rcu
1563@unpublished{CoreyMinyard2007list:splice:rcu
1564,Author="Corey Minyard and Paul E. McKenney"
1565,Title="{[PATCH]} add an {RCU} version of list splicing"
1566,month="January"
1567,year="2007"
1568,day=3
1569,note="Available:
1570\url{http://lkml.org/lkml/2007/1/3/112}
1571[Viewed May 28, 2007]"
1572,annotation="
1573 Patch for list_splice_rcu().
1574"
1575}
1576
1577@unpublished{PaulEMcKenney2007rcubarrier
1578,Author="Paul E. McKenney"
1579,Title="{RCU} and Unloadable Modules"
1580,month="January"
1581,day="14"
1582,year="2007"
1583,note="Available:
1584\url{http://lwn.net/Articles/217484/}
1585[Viewed November 22, 2007]"
1586,annotation="
1587 LWN article introducing the rcu_barrier() primitive.
1588"
1589}
1590
1591@unpublished{PeterZijlstra2007SyncBarrier
1592,Author="Peter Zijlstra and Ingo Molnar"
1593,Title="{[PATCH 3/7]} barrier: a scalable synchonisation barrier"
1594,month="January"
1595,year="2007"
1596,day=28
1597,note="Available:
1598\url{http://lkml.org/lkml/2007/1/28/34}
1599[Viewed March 27, 2008]"
1600,annotation="
1601 RCU-like implementation for frequent updaters and rare readers(!).
1602 Subsumed into QRCU. Maybe...
1603"
1604}
1605
1606@unpublished{PaulEMcKenney2007BoostRCU
1607,Author="Paul E. McKenney"
1608,Title="Priority-Boosting {RCU} Read-Side Critical Sections"
1609,month="February"
1610,day="5"
1611,year="2007"
1612,note="Available:
1613\url{http://lwn.net/Articles/220677/}
1614Revised:
1615\url{http://www.rdrop.com/users/paulmck/RCU/RCUbooststate.2007.04.16a.pdf}
1616[Viewed September 7, 2007]"
1617,annotation="
1618 LWN article introducing RCU priority boosting.
1619"
1620}
1621
1622@unpublished{PaulMcKenney2007QRCUpatch
1623,Author="Paul E. McKenney"
1624,Title="{[PATCH]} {QRCU} with lockless fastpath"
1625,month="February"
1626,year="2007"
1627,day=24
1628,note="Available:
1629\url{http://lkml.org/lkml/2007/2/25/18}
1630[Viewed March 27, 2008]"
1631,annotation="
1632 Patch for QRCU supplying lock-free fast path.
1633"
1634}
1635
1636@article{JonathanAppavoo2007K42RCU
1637,author = {Appavoo, Jonathan and Silva, Dilma Da and Krieger, Orran and Auslander, Marc and Ostrowski, Michal and Rosenburg, Bryan and Waterland, Amos and Wisniewski, Robert W. and Xenidis, Jimi and Stumm, Michael and Soares, Livio}
1638,title = {Experience distributing objects in an SMMP OS}
1639,journal = {ACM Trans. Comput. Syst.}
1640,volume = {25}
1641,number = {3}
1642,year = {2007}
1643,issn = {0734-2071}
1644,pages = {6/1--6/52}
1645,doi = {http://doi.acm.org/10.1145/1275517.1275518}
1646,publisher = {ACM}
1647,address = {New York, NY, USA}
1648,annotation={
1649 Role of RCU in K42.
1650}}
1651
1652@conference{RobertOlsson2007Trash
1653,Author="Robert Olsson and Stefan Nilsson"
1654,Title="{TRASH}: A dynamic {LC}-trie and hash data structure"
1655,booktitle="Workshop on High Performance Switching and Routing (HPSR'07)"
1656,month="May"
1657,year="2007"
1658,note="Available:
1659\url{http://ieeexplore.ieee.org/xpl/freeabs_all.jsp?arnumber=4281239}
1660[Viewed October 1, 2010]"
1661,annotation="
1662 RCU-protected dynamic trie-hash combination.
1663"
1664}
1665
1666@conference{PeterZijlstra2007ConcurrentPagecacheRCU
1667,Author="Peter Zijlstra"
1668,Title="Concurrent Pagecache"
1669,Booktitle="Linux Symposium"
1670,month="June"
651,year="2007" 1671,year="2007"
652,note="To appear in J. Parallel Distrib. Comput. 1672,address="Ottawa, Canada"
653 \url{doi=10.1016/j.jpdc.2007.04.010}" 1673,note="Available:
1674\url{http://ols.108.redhat.com/2007/Reprints/zijlstra-Reprint.pdf}
1675[Viewed April 14, 2008]"
1676,annotation="
1677 Page-cache modifications permitting RCU readers and concurrent
1678 updates.
1679"
1680}
1681
1682@unpublished{PaulEMcKenney2007whatisRCU
1683,Author="Paul E. McKenney"
1684,Title="What is {RCU}?"
1685,year="2007"
1686,month="07"
1687,note="Available:
1688\url{http://www.rdrop.com/users/paulmck/RCU/whatisRCU.html}
1689[Viewed July 6, 2007]"
654,annotation={ 1690,annotation={
655 Compares QSBR (AKA "classic RCU"), HPBR, EBR, and lock-free 1691 Describes RCU in Linux kernel.
656 reference counting. Journal version of ThomasEHart2006a.
657} 1692}
658} 1693}
659 1694
660@unpublished{PaulEMcKenney2007QRCUspin 1695@unpublished{PaulEMcKenney2007QRCUspin
661,Author="Paul E. McKenney" 1696,Author="Paul E. McKenney"
662,Title="Using Promela and Spin to verify parallel algorithms" 1697,Title="Using {Promela} and {Spin} to verify parallel algorithms"
663,month="August" 1698,month="August"
664,day="1" 1699,day="1"
665,year="2007" 1700,year="2007"
@@ -669,6 +1704,50 @@ Revised:
669,annotation=" 1704,annotation="
670 LWN article describing Promela and spin, and also using Oleg 1705 LWN article describing Promela and spin, and also using Oleg
671 Nesterov's QRCU as an example (with Paul McKenney's fastpath). 1706 Nesterov's QRCU as an example (with Paul McKenney's fastpath).
1707 Merged patch at: http://lkml.org/lkml/2007/2/25/18
1708"
1709}
1710
1711@unpublished{PaulEMcKenney2007WG21DDOatomics
1712,Author="Paul E. McKenney and Hans-J. Boehm and Lawrence Crowl"
1713,Title="C++ Data-Dependency Ordering: Atomics and Memory Model"
1714,month="August"
1715,day="3"
1716,year="2007"
1717,note="Preprint:
1718\url{http://open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2664.htm}
1719[Viewed December 7, 2009]"
1720,annotation="
1721 RCU for C++, parts 1 and 2.
1722"
1723}
1724
1725@unpublished{PaulEMcKenney2007WG21DDOannotation
1726,Author="Paul E. McKenney and Lawrence Crowl"
1727,Title="C++ Data-Dependency Ordering: Function Annotation"
1728,month="September"
1729,day="18"
1730,year="2008"
1731,note="Preprint:
1732\url{http://open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2782.htm}
1733[Viewed December 7, 2009]"
1734,annotation="
1735 RCU for C++, part 2, updated many times.
1736"
1737}
1738
1739@unpublished{PaulEMcKenney2007PreemptibleRCUPatch
1740,Author="Paul E. McKenney"
1741,Title="[PATCH RFC 0/9] {RCU}: Preemptible {RCU}"
1742,month="September"
1743,day="10"
1744,year="2007"
1745,note="Available:
1746\url{http://lkml.org/lkml/2007/9/10/213}
1747[Viewed October 25, 2007]"
1748,annotation="
1749 Final patch for preemptable RCU to -rt. (Later patches were
1750 to mainline, eventually incorporated.)
672" 1751"
673} 1752}
674 1753
@@ -686,10 +1765,46 @@ Revised:
686" 1765"
687} 1766}
688 1767
1768@article{ThomasEHart2007a
1769,Author="Thomas E. Hart and Paul E. McKenney and Angela Demke Brown and Jonathan Walpole"
1770,Title="Performance of memory reclamation for lockless synchronization"
1771,journal="J. Parallel Distrib. Comput."
1772,volume={67}
1773,number="12"
1774,year="2007"
1775,issn="0743-7315"
1776,pages="1270--1285"
1777,doi="http://dx.doi.org/10.1016/j.jpdc.2007.04.010"
1778,publisher="Academic Press, Inc."
1779,address="Orlando, FL, USA"
1780,annotation={
1781 Compares QSBR, HPBR, EBR, and lock-free reference counting.
1782 Journal version of ThomasEHart2006a.
1783}
1784}
1785
1786@unpublished{MathieuDesnoyers2007call:rcu:schedNeeded
1787,Author="Mathieu Desnoyers"
1788,Title="Re: [patch 1/2] {Linux} Kernel Markers - Support Multiple Probes"
1789,month="December"
1790,day="20"
1791,year="2007"
1792,note="Available:
1793\url{http://lkml.org/lkml/2007/12/20/244}
1794[Viewed March 27, 2008]"
1795,annotation="
1796 Request for call_rcu_sched() and rcu_barrier_sched().
1797"
1798}
1799
1800
689######################################################################## 1801########################################################################
690# 1802#
691# "What is RCU?" LWN series. 1803# "What is RCU?" LWN series.
692# 1804#
1805# http://lwn.net/Articles/262464/ (What is RCU, Fundamentally?)
1806# http://lwn.net/Articles/263130/ (What is RCU's Usage?)
1807# http://lwn.net/Articles/264090/ (What is RCU's API?)
693 1808
694@unpublished{PaulEMcKenney2007WhatIsRCUFundamentally 1809@unpublished{PaulEMcKenney2007WhatIsRCUFundamentally
695,Author="Paul E. McKenney and Jonathan Walpole" 1810,Author="Paul E. McKenney and Jonathan Walpole"
@@ -723,7 +1838,7 @@ Revised:
723 3. RCU is a Bulk Reference-Counting Mechanism 1838 3. RCU is a Bulk Reference-Counting Mechanism
724 4. RCU is a Poor Man's Garbage Collector 1839 4. RCU is a Poor Man's Garbage Collector
725 5. RCU is a Way of Providing Existence Guarantees 1840 5. RCU is a Way of Providing Existence Guarantees
726 6. RCU is a Way of Waiting for Things to Finish 1841 6. RCU is a Way of Waiting for Things to Finish
727" 1842"
728} 1843}
729 1844
@@ -747,20 +1862,96 @@ Revised:
747# 1862#
748######################################################################## 1863########################################################################
749 1864
1865
1866@unpublished{SteveRostedt2008dyntickRCUpatch
1867,Author="Steven Rostedt and Paul E. McKenney"
1868,Title="{[PATCH]} add support for dynamic ticks and preempt rcu"
1869,month="January"
1870,day="29"
1871,year="2008"
1872,note="Available:
1873\url{http://lkml.org/lkml/2008/1/29/208}
1874[Viewed March 27, 2008]"
1875,annotation="
1876 Patch that prevents preemptible RCU from unnecessarily waking
1877 up dynticks-idle CPUs.
1878"
1879}
1880
1881@unpublished{PaulEMcKenney2008LKMLDependencyOrdering
1882,Author="Paul E. McKenney"
1883,Title="Re: [PATCH 02/22 -v7] Add basic support for gcc profiler instrumentation"
1884,month="February"
1885,day="1"
1886,year="2008"
1887,note="Available:
1888\url{http://lkml.org/lkml/2008/2/2/255}
1889[Viewed October 18, 2008]"
1890,annotation="
1891 Explanation of compilers violating dependency ordering.
1892"
1893}
1894
1895@Conference{PaulEMcKenney2008Beijing
1896,Author="Paul E. McKenney"
1897,Title="Introducing Technology Into {Linux} Or:
1898Introducing your technology Into {Linux} will require introducing a
1899lot of {Linux} into your technology!!!"
1900,Booktitle="2008 Linux Developer Symposium - China"
1901,Publisher="OSS China"
1902,Month="February"
1903,Year="2008"
1904,Address="Beijing, China"
1905,note="Available:
1906\url{http://www.rdrop.com/users/paulmck/RCU/TechIntroLinux.2008.02.19a.pdf}
1907[Viewed August 12, 2008]"
1908}
1909
1910@unpublished{PaulEMcKenney2008dynticksRCU
1911,Author="Paul E. McKenney and Steven Rostedt"
1912,Title="Integrating and Validating dynticks and Preemptable RCU"
1913,month="April"
1914,day="24"
1915,year="2008"
1916,note="Available:
1917\url{http://lwn.net/Articles/279077/}
1918[Viewed April 24, 2008]"
1919,annotation="
1920 Describes use of Promela and Spin to validate (and fix!) the
1921 dynticks/RCU interface.
1922"
1923}
1924
750@article{DinakarGuniguntala2008IBMSysJ 1925@article{DinakarGuniguntala2008IBMSysJ
751,author="D. Guniguntala and P. E. McKenney and J. Triplett and J. Walpole" 1926,author="D. Guniguntala and P. E. McKenney and J. Triplett and J. Walpole"
752,title="The read-copy-update mechanism for supporting real-time applications on shared-memory multiprocessor systems with {Linux}" 1927,title="The read-copy-update mechanism for supporting real-time applications on shared-memory multiprocessor systems with {Linux}"
753,Year="2008" 1928,Year="2008"
754,Month="April" 1929,Month="April-June"
755,journal="IBM Systems Journal" 1930,journal="IBM Systems Journal"
756,volume="47" 1931,volume="47"
757,number="2" 1932,number="2"
758,pages="@@-@@" 1933,pages="221-236"
759,annotation=" 1934,annotation="
760 RCU, realtime RCU, sleepable RCU, performance. 1935 RCU, realtime RCU, sleepable RCU, performance.
761" 1936"
762} 1937}
763 1938
1939@unpublished{LaiJiangshan2008NewClassicAlgorithm
1940,Author="Lai Jiangshan"
1941,Title="[{RFC}][{PATCH}] rcu classic: new algorithm for callbacks-processing"
1942,month="June"
1943,day="3"
1944,year="2008"
1945,note="Available:
1946\url{http://lkml.org/lkml/2008/6/2/539}
1947[Viewed December 10, 2008]"
1948,annotation="
1949 Updated RCU classic algorithm. Introduced multi-tailed list
1950 for RCU callbacks and also pulling common code into
1951 __call_rcu().
1952"
1953}
1954
764@article{PaulEMcKenney2008RCUOSR 1955@article{PaulEMcKenney2008RCUOSR
765,author="Paul E. McKenney and Jonathan Walpole" 1956,author="Paul E. McKenney and Jonathan Walpole"
766,title="Introducing technology into the {Linux} kernel: a case study" 1957,title="Introducing technology into the {Linux} kernel: a case study"
@@ -778,6 +1969,52 @@ Revised:
778} 1969}
779} 1970}
780 1971
1972@unpublished{ManfredSpraul2008StateMachineRCU
1973,Author="Manfred Spraul"
1974,Title="[{RFC}, {PATCH}] state machine based rcu"
1975,month="August"
1976,day="21"
1977,year="2008"
1978,note="Available:
1979\url{http://lkml.org/lkml/2008/8/21/336}
1980[Viewed December 8, 2008]"
1981,annotation="
1982 State-based RCU. One key thing that this patch does is to
1983 separate the dynticks handling of NMIs and IRQs.
1984"
1985}
1986
1987@unpublished{ManfredSpraul2008dyntickIRQNMI
1988,Author="Manfred Spraul"
1989,Title="Re: [{RFC}, {PATCH}] v4 scalable classic {RCU} implementation"
1990,month="September"
1991,day="6"
1992,year="2008"
1993,note="Available:
1994\url{http://lkml.org/lkml/2008/9/6/86}
1995[Viewed December 8, 2008]"
1996,annotation="
1997 Manfred notes a fix required to my attempt to separate irq
1998 and NMI processing for hierarchical RCU's dynticks interface.
1999"
2000}
2001
2002@techreport{PaulEMcKenney2008cyclicRCU
2003,author="Paul E. McKenney"
2004,title="Efficient Support of Consistent Cyclic Search With Read-Copy Update"
2005,institution="US Patent and Trademark Office"
2006,address="Washington, DC"
2007,year="2008"
2008,number="US Patent 7,426,511"
2009,month="September"
2010,pages="23"
2011,annotation="
2012 Maintains an additional level of indirection to allow
2013 readers to confine themselves to the desired snapshot of the
2014 data structure. Only permits one update at a time.
2015"
2016}
2017
781@unpublished{PaulEMcKenney2008HierarchicalRCU 2018@unpublished{PaulEMcKenney2008HierarchicalRCU
782,Author="Paul E. McKenney" 2019,Author="Paul E. McKenney"
783,Title="Hierarchical {RCU}" 2020,Title="Hierarchical {RCU}"
@@ -793,6 +2030,21 @@ Revised:
793" 2030"
794} 2031}
795 2032
2033@unpublished{PaulEMcKenney2009BloatwatchRCU
2034,Author="Paul E. McKenney"
2035,Title="Re: [PATCH fyi] RCU: the bloatwatch edition"
2036,month="January"
2037,day="14"
2038,year="2009"
2039,note="Available:
2040\url{http://lkml.org/lkml/2009/1/14/449}
2041[Viewed January 15, 2009]"
2042,annotation="
2043 Small-footprint implementation of RCU for uniprocessor
2044 embedded applications -- and also for exposition purposes.
2045"
2046}
2047
796@conference{PaulEMcKenney2009MaliciousURCU 2048@conference{PaulEMcKenney2009MaliciousURCU
797,Author="Paul E. McKenney" 2049,Author="Paul E. McKenney"
798,Title="Using a Malicious User-Level {RCU} to Torture {RCU}-Based Algorithms" 2050,Title="Using a Malicious User-Level {RCU} to Torture {RCU}-Based Algorithms"
@@ -816,15 +2068,17 @@ Revised:
816,year="2009" 2068,year="2009"
817,note="Available: 2069,note="Available:
818\url{http://lkml.org/lkml/2009/2/5/572} 2070\url{http://lkml.org/lkml/2009/2/5/572}
819\url{git://lttng.org/userspace-rcu.git} 2071\url{http://lttng.org/urcu}
820[Viewed February 20, 2009]" 2072[Viewed February 20, 2009]"
821,annotation=" 2073,annotation="
822 Mathieu Desnoyers's user-space RCU implementation. 2074 Mathieu Desnoyers's user-space RCU implementation.
823 git://lttng.org/userspace-rcu.git 2075 git://lttng.org/userspace-rcu.git
2076 http://lttng.org/cgi-bin/gitweb.cgi?p=userspace-rcu.git
2077 http://lttng.org/urcu
824" 2078"
825} 2079}
826 2080
827@unpublished{PaulEMcKenney2009BloatWatchRCU 2081@unpublished{PaulEMcKenney2009LWNBloatWatchRCU
828,Author="Paul E. McKenney" 2082,Author="Paul E. McKenney"
829,Title="{RCU}: The {Bloatwatch} Edition" 2083,Title="{RCU}: The {Bloatwatch} Edition"
830,month="March" 2084,month="March"
@@ -852,14 +2106,29 @@ Revised:
852" 2106"
853} 2107}
854 2108
855@unpublished{JoshTriplett2009RPHash 2109@unpublished{PaulEMcKenney2009fastRTRCU
2110,Author="Paul E. McKenney"
2111,Title="[{PATCH} {RFC} -tip 0/4] {RCU} cleanups and simplified preemptable {RCU}"
2112,month="July"
2113,day="23"
2114,year="2009"
2115,note="Available:
2116\url{http://lkml.org/lkml/2009/7/23/294}
2117[Viewed August 15, 2009]"
2118,annotation="
2119 First posting of simple and fast preemptable RCU.
2120"
2121}
2122
2123@InProceedings{JoshTriplett2009RPHash
856,Author="Josh Triplett" 2124,Author="Josh Triplett"
857,Title="Scalable concurrent hash tables via relativistic programming" 2125,Title="Scalable concurrent hash tables via relativistic programming"
858,month="September" 2126,month="September"
859,year="2009" 2127,year="2009"
860,note="Linux Plumbers Conference presentation" 2128,booktitle="Linux Plumbers Conference 2009"
861,annotation=" 2129,annotation="
862 RP fun with hash tables. 2130 RP fun with hash tables.
2131 See also JoshTriplett2010RPHash
863" 2132"
864} 2133}
865 2134
@@ -872,4 +2141,323 @@ Revised:
872,note="Available: 2141,note="Available:
873\url{http://www.lttng.org/pub/thesis/desnoyers-dissertation-2009-12.pdf} 2142\url{http://www.lttng.org/pub/thesis/desnoyers-dissertation-2009-12.pdf}
874[Viewed December 9, 2009]" 2143[Viewed December 9, 2009]"
2144,annotation={
2145 Chapter 6 (page 97) covers user-level RCU.
2146}
2147}
2148
2149@unpublished{RelativisticProgrammingWiki
2150,Author="Josh Triplett and Paul E. McKenney and Jonathan Walpole"
2151,Title="Relativistic Programming"
2152,month="September"
2153,year="2009"
2154,note="Available:
2155\url{http://wiki.cs.pdx.edu/rp/}
2156[Viewed December 9, 2009]"
2157,annotation="
2158 Main Relativistic Programming Wiki.
2159"
2160}
2161
2162@conference{PaulEMcKenney2009DeterministicRCU
2163,Author="Paul E. McKenney"
2164,Title="Deterministic Synchronization in Multicore Systems: the Role of {RCU}"
2165,Booktitle="Eleventh Real Time Linux Workshop"
2166,month="September"
2167,year="2009"
2168,address="Dresden, Germany"
2169,note="Available:
2170\url{http://www.rdrop.com/users/paulmck/realtime/paper/DetSyncRCU.2009.08.18a.pdf}
2171[Viewed January 14, 2009]"
2172}
2173
2174@unpublished{PaulEMcKenney2009HuntingHeisenbugs
2175,Author="Paul E. McKenney"
2176,Title="Hunting Heisenbugs"
2177,month="November"
2178,year="2009"
2179,day="1"
2180,note="Available:
2181\url{http://paulmck.livejournal.com/14639.html}
2182[Viewed June 4, 2010]"
2183,annotation="
2184 Day-one bug in Tree RCU that took forever to track down.
2185"
2186}
2187
2188@unpublished{MathieuDesnoyers2009defer:rcu
2189,Author="Mathieu Desnoyers"
2190,Title="Kernel RCU: shrink the size of the struct rcu\_head"
2191,month="December"
2192,year="2009"
2193,note="Available:
2194\url{http://lkml.org/lkml/2009/10/18/129}
2195[Viewed December 29, 2009]"
2196,annotation="
2197 Mathieu proposed defer_rcu() with fixed-size per-thread pool
2198 of RCU callbacks.
2199"
2200}
2201
2202@unpublished{MathieuDesnoyers2009VerifPrePub
2203,Author="Mathieu Desnoyers and Paul E. McKenney and Michel R. Dagenais"
2204,Title="Multi-Core Systems Modeling for Formal Verification of Parallel Algorithms"
2205,month="December"
2206,year="2009"
2207,note="Submitted to IEEE TPDS"
2208,annotation="
2209 OOMem model for Mathieu's user-level RCU mechanical proof of
2210 correctness.
2211"
2212}
2213
2214@unpublished{MathieuDesnoyers2009URCUPrePub
2215,Author="Mathieu Desnoyers and Paul E. McKenney and Alan Stern and Michel R. Dagenais and Jonathan Walpole"
2216,Title="User-Level Implementations of Read-Copy Update"
2217,month="December"
2218,year="2010"
2219,url=\url{http://www.computer.org/csdl/trans/td/2012/02/ttd2012020375-abs.html}
2220,annotation="
2221 RCU overview, desiderata, semi-formal semantics, user-level RCU
2222 usage scenarios, three classes of RCU implementation, wait-free
2223 RCU updates, RCU grace-period batching, update overhead,
2224 http://www.rdrop.com/users/paulmck/RCU/urcu-main-accepted.2011.08.30a.pdf
2225 http://www.rdrop.com/users/paulmck/RCU/urcu-supp-accepted.2011.08.30a.pdf
2226 Superseded by MathieuDesnoyers2012URCU.
2227"
2228}
2229
2230@inproceedings{HariKannan2009DynamicAnalysisRCU
2231,author = {Kannan, Hari}
2232,title = {Ordering decoupled metadata accesses in multiprocessors}
2233,booktitle = {MICRO 42: Proceedings of the 42nd Annual IEEE/ACM International Symposium on Microarchitecture}
2234,year = {2009}
2235,isbn = {978-1-60558-798-1}
2236,pages = {381--390}
2237,location = {New York, New York}
2238,doi = {http://doi.acm.org/10.1145/1669112.1669161}
2239,publisher = {ACM}
2240,address = {New York, NY, USA}
2241,annotation={
2242 Uses RCU to protect metadata used in dynamic analysis.
2243}}
2244
2245@conference{PaulEMcKenney2010SimpleOptRCU
2246,Author="Paul E. McKenney"
2247,Title="Simplicity Through Optimization"
2248,Booktitle="linux.conf.au 2010"
2249,month="January"
2250,year="2010"
2251,address="Wellington, New Zealand"
2252,note="Available:
2253\url{http://www.rdrop.com/users/paulmck/RCU/SimplicityThruOptimization.2010.01.21f.pdf}
2254[Viewed October 10, 2010]"
2255,annotation="
2256 TREE_PREEMPT_RCU optimizations greatly simplified the old
2257 PREEMPT_RCU implementation.
2258"
2259}
2260
2261@unpublished{PaulEMcKenney2010LockdepRCU
2262,Author="Paul E. McKenney"
2263,Title="Lockdep-{RCU}"
2264,month="February"
2265,year="2010"
2266,day="1"
2267,note="Available:
2268\url{https://lwn.net/Articles/371986/}
2269[Viewed June 4, 2010]"
2270,annotation="
2271 CONFIG_PROVE_RCU, or at least an early version.
2272"
2273}
2274
2275@unpublished{AviKivity2010KVM2RCU
2276,Author="Avi Kivity"
2277,Title="[{PATCH} 37/40] {KVM}: Bump maximum vcpu count to 64"
2278,month="February"
2279,year="2010"
2280,note="Available:
2281\url{http://www.mail-archive.com/kvm@vger.kernel.org/msg28640.html}
2282[Viewed March 20, 2010]"
2283,annotation="
2284 Use of RCU permits KVM to increase the size of guest OSes from
2285 16 CPUs to 64 CPUs.
2286"
2287}
2288
2289@unpublished{HerbertXu2010RCUResizeHash
2290,Author="Herbert Xu"
2291,Title="bridge: Add core IGMP snooping support"
2292,month="February"
2293,year="2010"
2294,note="Available:
2295\url{http://kerneltrap.com/mailarchive/linux-netdev/2010/2/26/6270589}
2296[Viewed March 20, 2011]"
2297,annotation={
2298 Use a pair of list_head structures to support RCU-protected
2299 resizable hash tables.
2300}}
2301
2302@article{JoshTriplett2010RPHash
2303,author="Josh Triplett and Paul E. McKenney and Jonathan Walpole"
2304,title="Scalable Concurrent Hash Tables via Relativistic Programming"
2305,journal="ACM Operating Systems Review"
2306,year=2010
2307,volume=44
2308,number=3
2309,month="July"
2310,annotation={
2311 RP fun with hash tables.
2312 http://portal.acm.org/citation.cfm?id=1842733.1842750
2313}}
2314
2315@unpublished{PaulEMcKenney2010RCUAPI
2316,Author="Paul E. McKenney"
2317,Title="The {RCU} {API}, 2010 Edition"
2318,month="December"
2319,day="8"
2320,year="2010"
2321,note="Available:
2322\url{http://lwn.net/Articles/418853/}
2323[Viewed December 8, 2010]"
2324,annotation="
2325 Includes updated software-engineering features.
2326"
2327}
2328
2329@mastersthesis{AndrejPodzimek2010masters
2330,author="Andrej Podzimek"
2331,title="Read-Copy-Update for OpenSolaris"
2332,school="Charles University in Prague"
2333,year="2010"
2334,note="Available:
2335\url{https://andrej.podzimek.org/thesis.pdf}
2336[Viewed January 31, 2011]"
2337,annotation={
2338 Reviews RCU implementations and creates a few for OpenSolaris.
2339 Drives quiescent-state detection from RCU read-side primitives,
2340 in a manner roughly similar to that of Jim Houston.
2341}}
2342
2343@unpublished{LinusTorvalds2011Linux2:6:38:rc1:NPigginVFS
2344,Author="Linus Torvalds"
2345,Title="Linux 2.6.38-rc1"
2346,month="January"
2347,year="2011"
2348,note="Available:
2349\url{https://lkml.org/lkml/2011/1/18/322}
2350[Viewed March 4, 2011]"
2351,annotation={
2352 "The RCU-based name lookup is at the other end of the spectrum - the
2353 absolute anti-gimmick. It's some seriously good stuff, and gets rid of
2354 the last main global lock that really tends to hurt some kernel loads.
2355 The dentry lock is no longer a big serializing issue. What's really
2356 nice about it is that it actually improves performance a lot even for
2357 single-threaded loads (on an SMP kernel), because it gets rid of some
2358 of the most expensive parts of path component lookup, which was the
2359 d_lock on every component lookup. So I'm seeing improvements of 30-50%
2360 on some seriously pathname-lookup intensive loads."
2361}}
2362
2363@techreport{JoshTriplett2011RPScalableCorrectOrdering
2364,author = {Josh Triplett and Philip W. Howard and Paul E. McKenney and Jonathan Walpole}
2365,title = {Scalable Correct Memory Ordering via Relativistic Programming}
2366,year = {2011}
2367,number = {11-03}
2368,institution = {Portland State University}
2369,note = {\url{http://www.cs.pdx.edu/pdfs/tr1103.pdf}}
2370}
2371
2372@inproceedings{PhilHoward2011RCUTMRBTree
2373,author = {Philip W. Howard and Jonathan Walpole}
2374,title = {A Relativistic Enhancement to Software Transactional Memory}
2375,booktitle = {Proceedings of the 3rd USENIX conference on Hot topics in parallelism}
2376,series = {HotPar'11}
2377,year = {2011}
2378,location = {Berkeley, CA}
2379,pages = {1--6}
2380,numpages = {6}
2381,url = {http://www.usenix.org/event/hotpar11/tech/final_files/Howard.pdf}
2382,publisher = {USENIX Association}
2383,address = {Berkeley, CA, USA}
2384}
2385
2386@techreport{PaulEMcKenney2011cyclicparallelRCU
2387,author="Paul E. McKenney and Jonathan Walpole"
2388,title="Efficient Support of Consistent Cyclic Search With Read-Copy Update and Parallel Updates"
2389,institution="US Patent and Trademark Office"
2390,address="Washington, DC"
2391,year="2011"
2392,number="US Patent 7,953,778"
2393,month="May"
2394,pages="34"
2395,annotation="
2396 Maintains an array of generation numbers to track in-flight
2397 updates and keeps an additional level of indirection to allow
2398 readers to confine themselves to the desired snapshot of the
2399 data structure.
2400"
2401}
2402
2403@inproceedings{Triplett:2011:RPHash
2404,author = {Triplett, Josh and McKenney, Paul E. and Walpole, Jonathan}
2405,title = {Resizable, Scalable, Concurrent Hash Tables via Relativistic Programming}
2406,booktitle = {Proceedings of the 2011 USENIX Annual Technical Conference}
2407,month = {June}
2408,year = {2011}
2409,pages = {145--158}
2410,numpages = {14}
2411,url={http://www.usenix.org/event/atc11/tech/final_files/atc11_proceedings.pdf}
2412,publisher = {The USENIX Association}
2413,address = {Portland, OR USA}
2414}
2415
2416@unpublished{PaulEMcKenney2011RCU3.0trainwreck
2417,Author="Paul E. McKenney"
2418,Title="3.0 and {RCU:} what went wrong"
2419,month="July"
2420,day="27"
2421,year="2011"
2422,note="Available:
2423\url{http://lwn.net/Articles/453002/}
2424[Viewed July 27, 2011]"
2425,annotation="
2426 Analysis of the RCU trainwreck in Linux kernel 3.0.
2427"
2428}
2429
2430@unpublished{NeilBrown2011MeetTheLockers
2431,Author="Neil Brown"
2432,Title="Meet the Lockers"
2433,month="August"
2434,day="3"
2435,year="2011"
2436,note="Available:
2437\url{http://lwn.net/Articles/453685/}
2438[Viewed September 2, 2011]"
2439,annotation="
2440 The Locker family as an analogy for locking, reference counting,
2441 RCU, and seqlock.
2442"
2443}
2444
2445@article{MathieuDesnoyers2012URCU
2446,Author="Mathieu Desnoyers and Paul E. McKenney and Alan Stern and Michel R. Dagenais and Jonathan Walpole"
2447,Title="User-Level Implementations of Read-Copy Update"
2448,journal="IEEE Transactions on Parallel and Distributed Systems"
2449,volume={23}
2450,year="2012"
2451,issn="1045-9219"
2452,pages="375-382"
2453,doi="http://doi.ieeecomputersociety.org/10.1109/TPDS.2011.159"
2454,publisher="IEEE Computer Society"
2455,address="Los Alamitos, CA, USA"
2456,annotation={
2457 RCU overview, desiderata, semi-formal semantics, user-level RCU
2458 usage scenarios, three classes of RCU implementation, wait-free
2459 RCU updates, RCU grace-period batching, update overhead,
2460 http://www.rdrop.com/users/paulmck/RCU/urcu-main-accepted.2011.08.30a.pdf
2461 http://www.rdrop.com/users/paulmck/RCU/urcu-supp-accepted.2011.08.30a.pdf
2462}
875} 2463}
diff --git a/Documentation/RCU/checklist.txt b/Documentation/RCU/checklist.txt
index bff2d8be1e18..5c8d74968090 100644
--- a/Documentation/RCU/checklist.txt
+++ b/Documentation/RCU/checklist.txt
@@ -180,6 +180,20 @@ over a rather long period of time, but improvements are always welcome!
180 operations that would not normally be undertaken while a real-time 180 operations that would not normally be undertaken while a real-time
181 workload is running. 181 workload is running.
182 182
183 In particular, if you find yourself invoking one of the expedited
184 primitives repeatedly in a loop, please do everyone a favor:
185 Restructure your code so that it batches the updates, allowing
186 a single non-expedited primitive to cover the entire batch.
187 This will very likely be faster than the loop containing the
188 expedited primitive, and will be much much easier on the rest
189 of the system, especially to real-time workloads running on
190 the rest of the system.
191
192 In addition, it is illegal to call the expedited forms from
193 a CPU-hotplug notifier, or while holding a lock that is acquired
194 by a CPU-hotplug notifier. Failing to observe this restriction
195 will result in deadlock.
196
1837. If the updater uses call_rcu() or synchronize_rcu(), then the 1977. If the updater uses call_rcu() or synchronize_rcu(), then the
184 corresponding readers must use rcu_read_lock() and 198 corresponding readers must use rcu_read_lock() and
185 rcu_read_unlock(). If the updater uses call_rcu_bh() or 199 rcu_read_unlock(). If the updater uses call_rcu_bh() or
diff --git a/Documentation/RCU/stallwarn.txt b/Documentation/RCU/stallwarn.txt
index 083d88cbc089..523364e4e1f1 100644
--- a/Documentation/RCU/stallwarn.txt
+++ b/Documentation/RCU/stallwarn.txt
@@ -12,14 +12,38 @@ CONFIG_RCU_CPU_STALL_TIMEOUT
12 This kernel configuration parameter defines the period of time 12 This kernel configuration parameter defines the period of time
13 that RCU will wait from the beginning of a grace period until it 13 that RCU will wait from the beginning of a grace period until it
14 issues an RCU CPU stall warning. This time period is normally 14 issues an RCU CPU stall warning. This time period is normally
15 ten seconds. 15 sixty seconds.
16 16
17RCU_SECONDS_TILL_STALL_RECHECK 17 This configuration parameter may be changed at runtime via the
18 /sys/module/rcutree/parameters/rcu_cpu_stall_timeout, however
19 this parameter is checked only at the beginning of a cycle.
20 So if you are 30 seconds into a 70-second stall, setting this
21 sysfs parameter to (say) five will shorten the timeout for the
22 -next- stall, or the following warning for the current stall
23 (assuming the stall lasts long enough). It will not affect the
24 timing of the next warning for the current stall.
18 25
19 This macro defines the period of time that RCU will wait after 26 Stall-warning messages may be enabled and disabled completely via
20 issuing a stall warning until it issues another stall warning 27 /sys/module/rcutree/parameters/rcu_cpu_stall_suppress.
21 for the same stall. This time period is normally set to three 28
22 times the check interval plus thirty seconds. 29CONFIG_RCU_CPU_STALL_VERBOSE
30
31 This kernel configuration parameter causes the stall warning to
32 also dump the stacks of any tasks that are blocking the current
33 RCU-preempt grace period.
34
35RCU_CPU_STALL_INFO
36
37 This kernel configuration parameter causes the stall warning to
38 print out additional per-CPU diagnostic information, including
39 information on scheduling-clock ticks and RCU's idle-CPU tracking.
40
41RCU_STALL_DELAY_DELTA
42
43 Although the lockdep facility is extremely useful, it does add
44 some overhead. Therefore, under CONFIG_PROVE_RCU, the
45 RCU_STALL_DELAY_DELTA macro allows five extra seconds before
46 giving an RCU CPU stall warning message.
23 47
24RCU_STALL_RAT_DELAY 48RCU_STALL_RAT_DELAY
25 49
@@ -64,6 +88,54 @@ INFO: rcu_bh_state detected stalls on CPUs/tasks: { } (detected by 4, 2502 jiffi
64 88
65This is rare, but does happen from time to time in real life. 89This is rare, but does happen from time to time in real life.
66 90
91If the CONFIG_RCU_CPU_STALL_INFO kernel configuration parameter is set,
92more information is printed with the stall-warning message, for example:
93
94 INFO: rcu_preempt detected stall on CPU
95 0: (63959 ticks this GP) idle=241/3fffffffffffffff/0
96 (t=65000 jiffies)
97
98In kernels with CONFIG_RCU_FAST_NO_HZ, even more information is
99printed:
100
101 INFO: rcu_preempt detected stall on CPU
102 0: (64628 ticks this GP) idle=dd5/3fffffffffffffff/0 drain=0 . timer=-1
103 (t=65000 jiffies)
104
105The "(64628 ticks this GP)" indicates that this CPU has taken more
106than 64,000 scheduling-clock interrupts during the current stalled
107grace period. If the CPU was not yet aware of the current grace
108period (for example, if it was offline), then this part of the message
109indicates how many grace periods behind the CPU is.
110
111The "idle=" portion of the message prints the dyntick-idle state.
112The hex number before the first "/" is the low-order 12 bits of the
113dynticks counter, which will have an even-numbered value if the CPU is
114in dyntick-idle mode and an odd-numbered value otherwise. The hex
115number between the two "/"s is the value of the nesting, which will
116be a small positive number if in the idle loop and a very large positive
117number (as shown above) otherwise.
118
119For CONFIG_RCU_FAST_NO_HZ kernels, the "drain=0" indicates that the
120CPU is not in the process of trying to force itself into dyntick-idle
121state, the "." indicates that the CPU has not given up forcing RCU
122into dyntick-idle mode (it would be "H" otherwise), and the "timer=-1"
123indicates that the CPU has not recented forced RCU into dyntick-idle
124mode (it would otherwise indicate the number of microseconds remaining
125in this forced state).
126
127
128Multiple Warnings From One Stall
129
130If a stall lasts long enough, multiple stall-warning messages will be
131printed for it. The second and subsequent messages are printed at
132longer intervals, so that the time between (say) the first and second
133message will be about three times the interval between the beginning
134of the stall and the first message.
135
136
137What Causes RCU CPU Stall Warnings?
138
67So your kernel printed an RCU CPU stall warning. The next question is 139So your kernel printed an RCU CPU stall warning. The next question is
68"What caused it?" The following problems can result in RCU CPU stall 140"What caused it?" The following problems can result in RCU CPU stall
69warnings: 141warnings:
@@ -128,4 +200,5 @@ is occurring, which will usually be in the function nearest the top of
128that portion of the stack which remains the same from trace to trace. 200that portion of the stack which remains the same from trace to trace.
129If you can reliably trigger the stall, ftrace can be quite helpful. 201If you can reliably trigger the stall, ftrace can be quite helpful.
130 202
131RCU bugs can often be debugged with the help of CONFIG_RCU_TRACE. 203RCU bugs can often be debugged with the help of CONFIG_RCU_TRACE
204and with RCU's event tracing.
diff --git a/Documentation/RCU/torture.txt b/Documentation/RCU/torture.txt
index d67068d0d2b9..375d3fb71437 100644
--- a/Documentation/RCU/torture.txt
+++ b/Documentation/RCU/torture.txt
@@ -69,6 +69,13 @@ onoff_interval
69 CPU-hotplug operations regardless of what value is 69 CPU-hotplug operations regardless of what value is
70 specified for onoff_interval. 70 specified for onoff_interval.
71 71
72onoff_holdoff The number of seconds to wait until starting CPU-hotplug
73 operations. This would normally only be used when
74 rcutorture was built into the kernel and started
75 automatically at boot time, in which case it is useful
76 in order to avoid confusing boot-time code with CPUs
77 coming and going.
78
72shuffle_interval 79shuffle_interval
73 The number of seconds to keep the test threads affinitied 80 The number of seconds to keep the test threads affinitied
74 to a particular subset of the CPUs, defaults to 3 seconds. 81 to a particular subset of the CPUs, defaults to 3 seconds.
@@ -79,6 +86,24 @@ shutdown_secs The number of seconds to run the test before terminating
79 zero, which disables test termination and system shutdown. 86 zero, which disables test termination and system shutdown.
80 This capability is useful for automated testing. 87 This capability is useful for automated testing.
81 88
89stall_cpu The number of seconds that a CPU should be stalled while
90 within both an rcu_read_lock() and a preempt_disable().
91 This stall happens only once per rcutorture run.
92 If you need multiple stalls, use modprobe and rmmod to
93 repeatedly run rcutorture. The default for stall_cpu
94 is zero, which prevents rcutorture from stalling a CPU.
95
96 Note that attempts to rmmod rcutorture while the stall
97 is ongoing will hang, so be careful what value you
98 choose for this module parameter! In addition, too-large
99 values for stall_cpu might well induce failures and
100 warnings in other parts of the kernel. You have been
101 warned!
102
103stall_cpu_holdoff
104 The number of seconds to wait after rcutorture starts
105 before stalling a CPU. Defaults to 10 seconds.
106
82stat_interval The number of seconds between output of torture 107stat_interval The number of seconds between output of torture
83 statistics (via printk()). Regardless of the interval, 108 statistics (via printk()). Regardless of the interval,
84 statistics are printed when the module is unloaded. 109 statistics are printed when the module is unloaded.
@@ -271,11 +296,13 @@ The following script may be used to torture RCU:
271 #!/bin/sh 296 #!/bin/sh
272 297
273 modprobe rcutorture 298 modprobe rcutorture
274 sleep 100 299 sleep 3600
275 rmmod rcutorture 300 rmmod rcutorture
276 dmesg | grep torture: 301 dmesg | grep torture:
277 302
278The output can be manually inspected for the error flag of "!!!". 303The output can be manually inspected for the error flag of "!!!".
279One could of course create a more elaborate script that automatically 304One could of course create a more elaborate script that automatically
280checked for such errors. The "rmmod" command forces a "SUCCESS" or 305checked for such errors. The "rmmod" command forces a "SUCCESS",
281"FAILURE" indication to be printk()ed. 306"FAILURE", or "RCU_HOTPLUG" indication to be printk()ed. The first
307two are self-explanatory, while the last indicates that while there
308were no RCU failures, CPU-hotplug problems were detected.
diff --git a/Documentation/RCU/trace.txt b/Documentation/RCU/trace.txt
index 49587abfc2f7..f6f15ce39903 100644
--- a/Documentation/RCU/trace.txt
+++ b/Documentation/RCU/trace.txt
@@ -33,23 +33,23 @@ rcu/rcuboost:
33The output of "cat rcu/rcudata" looks as follows: 33The output of "cat rcu/rcudata" looks as follows:
34 34
35rcu_sched: 35rcu_sched:
36 0 c=20972 g=20973 pq=1 pgp=20973 qp=0 dt=545/1/0 df=50 of=0 ri=0 ql=163 qs=NRW. kt=0/W/0 ktl=ebc3 b=10 ci=153737 co=0 ca=0 36 0 c=20972 g=20973 pq=1 pgp=20973 qp=0 dt=545/1/0 df=50 of=0 ql=163 qs=NRW. kt=0/W/0 ktl=ebc3 b=10 ci=153737 co=0 ca=0
37 1 c=20972 g=20973 pq=1 pgp=20973 qp=0 dt=967/1/0 df=58 of=0 ri=0 ql=634 qs=NRW. kt=0/W/1 ktl=58c b=10 ci=191037 co=0 ca=0 37 1 c=20972 g=20973 pq=1 pgp=20973 qp=0 dt=967/1/0 df=58 of=0 ql=634 qs=NRW. kt=0/W/1 ktl=58c b=10 ci=191037 co=0 ca=0
38 2 c=20972 g=20973 pq=1 pgp=20973 qp=0 dt=1081/1/0 df=175 of=0 ri=0 ql=74 qs=N.W. kt=0/W/2 ktl=da94 b=10 ci=75991 co=0 ca=0 38 2 c=20972 g=20973 pq=1 pgp=20973 qp=0 dt=1081/1/0 df=175 of=0 ql=74 qs=N.W. kt=0/W/2 ktl=da94 b=10 ci=75991 co=0 ca=0
39 3 c=20942 g=20943 pq=1 pgp=20942 qp=1 dt=1846/0/0 df=404 of=0 ri=0 ql=0 qs=.... kt=0/W/3 ktl=d1cd b=10 ci=72261 co=0 ca=0 39 3 c=20942 g=20943 pq=1 pgp=20942 qp=1 dt=1846/0/0 df=404 of=0 ql=0 qs=.... kt=0/W/3 ktl=d1cd b=10 ci=72261 co=0 ca=0
40 4 c=20972 g=20973 pq=1 pgp=20973 qp=0 dt=369/1/0 df=83 of=0 ri=0 ql=48 qs=N.W. kt=0/W/4 ktl=e0e7 b=10 ci=128365 co=0 ca=0 40 4 c=20972 g=20973 pq=1 pgp=20973 qp=0 dt=369/1/0 df=83 of=0 ql=48 qs=N.W. kt=0/W/4 ktl=e0e7 b=10 ci=128365 co=0 ca=0
41 5 c=20972 g=20973 pq=1 pgp=20973 qp=0 dt=381/1/0 df=64 of=0 ri=0 ql=169 qs=NRW. kt=0/W/5 ktl=fb2f b=10 ci=164360 co=0 ca=0 41 5 c=20972 g=20973 pq=1 pgp=20973 qp=0 dt=381/1/0 df=64 of=0 ql=169 qs=NRW. kt=0/W/5 ktl=fb2f b=10 ci=164360 co=0 ca=0
42 6 c=20972 g=20973 pq=1 pgp=20973 qp=0 dt=1037/1/0 df=183 of=0 ri=0 ql=62 qs=N.W. kt=0/W/6 ktl=d2ad b=10 ci=65663 co=0 ca=0 42 6 c=20972 g=20973 pq=1 pgp=20973 qp=0 dt=1037/1/0 df=183 of=0 ql=62 qs=N.W. kt=0/W/6 ktl=d2ad b=10 ci=65663 co=0 ca=0
43 7 c=20897 g=20897 pq=1 pgp=20896 qp=0 dt=1572/0/0 df=382 of=0 ri=0 ql=0 qs=.... kt=0/W/7 ktl=cf15 b=10 ci=75006 co=0 ca=0 43 7 c=20897 g=20897 pq=1 pgp=20896 qp=0 dt=1572/0/0 df=382 of=0 ql=0 qs=.... kt=0/W/7 ktl=cf15 b=10 ci=75006 co=0 ca=0
44rcu_bh: 44rcu_bh:
45 0 c=1480 g=1480 pq=1 pgp=1480 qp=0 dt=545/1/0 df=6 of=0 ri=1 ql=0 qs=.... kt=0/W/0 ktl=ebc3 b=10 ci=0 co=0 ca=0 45 0 c=1480 g=1480 pq=1 pgp=1480 qp=0 dt=545/1/0 df=6 of=0 ql=0 qs=.... kt=0/W/0 ktl=ebc3 b=10 ci=0 co=0 ca=0
46 1 c=1480 g=1480 pq=1 pgp=1480 qp=0 dt=967/1/0 df=3 of=0 ri=1 ql=0 qs=.... kt=0/W/1 ktl=58c b=10 ci=151 co=0 ca=0 46 1 c=1480 g=1480 pq=1 pgp=1480 qp=0 dt=967/1/0 df=3 of=0 ql=0 qs=.... kt=0/W/1 ktl=58c b=10 ci=151 co=0 ca=0
47 2 c=1480 g=1480 pq=1 pgp=1480 qp=0 dt=1081/1/0 df=6 of=0 ri=1 ql=0 qs=.... kt=0/W/2 ktl=da94 b=10 ci=0 co=0 ca=0 47 2 c=1480 g=1480 pq=1 pgp=1480 qp=0 dt=1081/1/0 df=6 of=0 ql=0 qs=.... kt=0/W/2 ktl=da94 b=10 ci=0 co=0 ca=0
48 3 c=1480 g=1480 pq=1 pgp=1480 qp=0 dt=1846/0/0 df=8 of=0 ri=1 ql=0 qs=.... kt=0/W/3 ktl=d1cd b=10 ci=0 co=0 ca=0 48 3 c=1480 g=1480 pq=1 pgp=1480 qp=0 dt=1846/0/0 df=8 of=0 ql=0 qs=.... kt=0/W/3 ktl=d1cd b=10 ci=0 co=0 ca=0
49 4 c=1480 g=1480 pq=1 pgp=1480 qp=0 dt=369/1/0 df=6 of=0 ri=1 ql=0 qs=.... kt=0/W/4 ktl=e0e7 b=10 ci=0 co=0 ca=0 49 4 c=1480 g=1480 pq=1 pgp=1480 qp=0 dt=369/1/0 df=6 of=0 ql=0 qs=.... kt=0/W/4 ktl=e0e7 b=10 ci=0 co=0 ca=0
50 5 c=1480 g=1480 pq=1 pgp=1480 qp=0 dt=381/1/0 df=4 of=0 ri=1 ql=0 qs=.... kt=0/W/5 ktl=fb2f b=10 ci=0 co=0 ca=0 50 5 c=1480 g=1480 pq=1 pgp=1480 qp=0 dt=381/1/0 df=4 of=0 ql=0 qs=.... kt=0/W/5 ktl=fb2f b=10 ci=0 co=0 ca=0
51 6 c=1480 g=1480 pq=1 pgp=1480 qp=0 dt=1037/1/0 df=6 of=0 ri=1 ql=0 qs=.... kt=0/W/6 ktl=d2ad b=10 ci=0 co=0 ca=0 51 6 c=1480 g=1480 pq=1 pgp=1480 qp=0 dt=1037/1/0 df=6 of=0 ql=0 qs=.... kt=0/W/6 ktl=d2ad b=10 ci=0 co=0 ca=0
52 7 c=1474 g=1474 pq=1 pgp=1473 qp=0 dt=1572/0/0 df=8 of=0 ri=1 ql=0 qs=.... kt=0/W/7 ktl=cf15 b=10 ci=0 co=0 ca=0 52 7 c=1474 g=1474 pq=1 pgp=1473 qp=0 dt=1572/0/0 df=8 of=0 ql=0 qs=.... kt=0/W/7 ktl=cf15 b=10 ci=0 co=0 ca=0
53 53
54The first section lists the rcu_data structures for rcu_sched, the second 54The first section lists the rcu_data structures for rcu_sched, the second
55for rcu_bh. Note that CONFIG_TREE_PREEMPT_RCU kernels will have an 55for rcu_bh. Note that CONFIG_TREE_PREEMPT_RCU kernels will have an
@@ -119,10 +119,6 @@ o "of" is the number of times that some other CPU has forced a
119 CPU is offline when it is really alive and kicking) is a fatal 119 CPU is offline when it is really alive and kicking) is a fatal
120 error, so it makes sense to err conservatively. 120 error, so it makes sense to err conservatively.
121 121
122o "ri" is the number of times that RCU has seen fit to send a
123 reschedule IPI to this CPU in order to get it to report a
124 quiescent state.
125
126o "ql" is the number of RCU callbacks currently residing on 122o "ql" is the number of RCU callbacks currently residing on
127 this CPU. This is the total number of callbacks, regardless 123 this CPU. This is the total number of callbacks, regardless
128 of what state they are in (new, waiting for grace period to 124 of what state they are in (new, waiting for grace period to
diff --git a/Documentation/acpi/apei/einj.txt b/Documentation/acpi/apei/einj.txt
index e7cc36397217..e20b6daaced4 100644
--- a/Documentation/acpi/apei/einj.txt
+++ b/Documentation/acpi/apei/einj.txt
@@ -53,6 +53,14 @@ directory apei/einj. The following files are provided.
53 This file is used to set the second error parameter value. Effect of 53 This file is used to set the second error parameter value. Effect of
54 parameter depends on error_type specified. 54 parameter depends on error_type specified.
55 55
56- notrigger
57 The EINJ mechanism is a two step process. First inject the error, then
58 perform some actions to trigger it. Setting "notrigger" to 1 skips the
59 trigger phase, which *may* allow the user to cause the error in some other
60 context by a simple access to the cpu, memory location, or device that is
61 the target of the error injection. Whether this actually works depends
62 on what operations the BIOS actually includes in the trigger phase.
63
56BIOS versions based in the ACPI 4.0 specification have limited options 64BIOS versions based in the ACPI 4.0 specification have limited options
57to control where the errors are injected. Your BIOS may support an 65to control where the errors are injected. Your BIOS may support an
58extension (enabled with the param_extension=1 module parameter, or 66extension (enabled with the param_extension=1 module parameter, or
diff --git a/Documentation/aoe/aoe.txt b/Documentation/aoe/aoe.txt
index b5aada9f20cc..5f5aa16047ff 100644
--- a/Documentation/aoe/aoe.txt
+++ b/Documentation/aoe/aoe.txt
@@ -35,7 +35,7 @@ CREATING DEVICE NODES
35 sh Documentation/aoe/mkshelf.sh /dev/etherd 0 35 sh Documentation/aoe/mkshelf.sh /dev/etherd 0
36 36
37 There is also an autoload script that shows how to edit 37 There is also an autoload script that shows how to edit
38 /etc/modprobe.conf to ensure that the aoe module is loaded when 38 /etc/modprobe.d/aoe.conf to ensure that the aoe module is loaded when
39 necessary. 39 necessary.
40 40
41USING DEVICE NODES 41USING DEVICE NODES
diff --git a/Documentation/aoe/autoload.sh b/Documentation/aoe/autoload.sh
index 78dad1334c6f..815dff4691c9 100644
--- a/Documentation/aoe/autoload.sh
+++ b/Documentation/aoe/autoload.sh
@@ -1,8 +1,8 @@
1#!/bin/sh 1#!/bin/sh
2# set aoe to autoload by installing the 2# set aoe to autoload by installing the
3# aliases in /etc/modprobe.conf 3# aliases in /etc/modprobe.d/
4 4
5f=/etc/modprobe.conf 5f=/etc/modprobe.d/aoe.conf
6 6
7if test ! -r $f || test ! -w $f; then 7if test ! -r $f || test ! -w $f; then
8 echo "cannot configure $f for module autoloading" 1>&2 8 echo "cannot configure $f for module autoloading" 1>&2
diff --git a/Documentation/arm/kernel_user_helpers.txt b/Documentation/arm/kernel_user_helpers.txt
index a17df9f91d16..5673594717cf 100644
--- a/Documentation/arm/kernel_user_helpers.txt
+++ b/Documentation/arm/kernel_user_helpers.txt
@@ -25,7 +25,7 @@ inline (either in the code emitted directly by the compiler, or part of
25the implementation of a library call) when optimizing for a recent enough 25the implementation of a library call) when optimizing for a recent enough
26processor that has the necessary native support, but only if resulting 26processor that has the necessary native support, but only if resulting
27binaries are already to be incompatible with earlier ARM processors due to 27binaries are already to be incompatible with earlier ARM processors due to
28useage of similar native instructions for other things. In other words 28usage of similar native instructions for other things. In other words
29don't make binaries unable to run on earlier processors just for the sake 29don't make binaries unable to run on earlier processors just for the sake
30of not using these kernel helpers if your compiled code is not going to 30of not using these kernel helpers if your compiled code is not going to
31use new instructions for other purpose. 31use new instructions for other purpose.
diff --git a/Documentation/backlight/lp855x-driver.txt b/Documentation/backlight/lp855x-driver.txt
new file mode 100644
index 000000000000..f5e4caafab7d
--- /dev/null
+++ b/Documentation/backlight/lp855x-driver.txt
@@ -0,0 +1,78 @@
1Kernel driver lp855x
2====================
3
4Backlight driver for LP855x ICs
5
6Supported chips:
7 Texas Instruments LP8550, LP8551, LP8552, LP8553 and LP8556
8
9Author: Milo(Woogyom) Kim <milo.kim@ti.com>
10
11Description
12-----------
13
14* Brightness control
15
16Brightness can be controlled by the pwm input or the i2c command.
17The lp855x driver supports both cases.
18
19* Device attributes
20
211) bl_ctl_mode
22Backlight control mode.
23Value : pwm based or register based
24
252) chip_id
26The lp855x chip id.
27Value : lp8550/lp8551/lp8552/lp8553/lp8556
28
29Platform data for lp855x
30------------------------
31
32For supporting platform specific data, the lp855x platform data can be used.
33
34* name : Backlight driver name. If it is not defined, default name is set.
35* mode : Brightness control mode. PWM or register based.
36* device_control : Value of DEVICE CONTROL register.
37* initial_brightness : Initial value of backlight brightness.
38* pwm_data : Platform specific pwm generation functions.
39 Only valid when brightness is pwm input mode.
40 Functions should be implemented by PWM driver.
41 - pwm_set_intensity() : set duty of PWM
42 - pwm_get_intensity() : get current duty of PWM
43* load_new_rom_data :
44 0 : use default configuration data
45 1 : update values of eeprom or eprom registers on loading driver
46* size_program : Total size of lp855x_rom_data.
47* rom_data : List of new eeprom/eprom registers.
48
49example 1) lp8552 platform data : i2c register mode with new eeprom data
50
51#define EEPROM_A5_ADDR 0xA5
52#define EEPROM_A5_VAL 0x4f /* EN_VSYNC=0 */
53
54static struct lp855x_rom_data lp8552_eeprom_arr[] = {
55 {EEPROM_A5_ADDR, EEPROM_A5_VAL},
56};
57
58static struct lp855x_platform_data lp8552_pdata = {
59 .name = "lcd-bl",
60 .mode = REGISTER_BASED,
61 .device_control = I2C_CONFIG(LP8552),
62 .initial_brightness = INITIAL_BRT,
63 .load_new_rom_data = 1,
64 .size_program = ARRAY_SIZE(lp8552_eeprom_arr),
65 .rom_data = lp8552_eeprom_arr,
66};
67
68example 2) lp8556 platform data : pwm input mode with default rom data
69
70static struct lp855x_platform_data lp8556_pdata = {
71 .mode = PWM_BASED,
72 .device_control = PWM_CONFIG(LP8556),
73 .initial_brightness = INITIAL_BRT,
74 .pwm_data = {
75 .pwm_set_intensity = platform_pwm_set_intensity,
76 .pwm_get_intensity = platform_pwm_get_intensity,
77 },
78};
diff --git a/Documentation/blockdev/floppy.txt b/Documentation/blockdev/floppy.txt
index 6ccab88705cb..470fe4b5e379 100644
--- a/Documentation/blockdev/floppy.txt
+++ b/Documentation/blockdev/floppy.txt
@@ -49,7 +49,7 @@ you can put:
49 49
50 options floppy omnibook messages 50 options floppy omnibook messages
51 51
52in /etc/modprobe.conf. 52in a configuration file in /etc/modprobe.d/.
53 53
54 54
55 The floppy driver related options are: 55 The floppy driver related options are:
diff --git a/Documentation/cgroups/blkio-controller.txt b/Documentation/cgroups/blkio-controller.txt
index 84f0a15fc210..b4b1fb3a83f0 100644
--- a/Documentation/cgroups/blkio-controller.txt
+++ b/Documentation/cgroups/blkio-controller.txt
@@ -94,11 +94,11 @@ Throttling/Upper Limit policy
94 94
95Hierarchical Cgroups 95Hierarchical Cgroups
96==================== 96====================
97- Currently none of the IO control policy supports hierarhical groups. But 97- Currently none of the IO control policy supports hierarchical groups. But
98 cgroup interface does allow creation of hierarhical cgroups and internally 98 cgroup interface does allow creation of hierarchical cgroups and internally
99 IO policies treat them as flat hierarchy. 99 IO policies treat them as flat hierarchy.
100 100
101 So this patch will allow creation of cgroup hierarhcy but at the backend 101 So this patch will allow creation of cgroup hierarchcy but at the backend
102 everything will be treated as flat. So if somebody created a hierarchy like 102 everything will be treated as flat. So if somebody created a hierarchy like
103 as follows. 103 as follows.
104 104
@@ -266,7 +266,7 @@ Proportional weight policy files
266- blkio.idle_time 266- blkio.idle_time
267 - Debugging aid only enabled if CONFIG_DEBUG_BLK_CGROUP=y. 267 - Debugging aid only enabled if CONFIG_DEBUG_BLK_CGROUP=y.
268 This is the amount of time spent by the IO scheduler idling for a 268 This is the amount of time spent by the IO scheduler idling for a
269 given cgroup in anticipation of a better request than the exising ones 269 given cgroup in anticipation of a better request than the existing ones
270 from other queues/cgroups. This is in nanoseconds. If this is read 270 from other queues/cgroups. This is in nanoseconds. If this is read
271 when the cgroup is in an idling state, the stat will only report the 271 when the cgroup is in an idling state, the stat will only report the
272 idle_time accumulated till the last idle period and will not include 272 idle_time accumulated till the last idle period and will not include
@@ -283,34 +283,34 @@ Throttling/Upper limit policy files
283----------------------------------- 283-----------------------------------
284- blkio.throttle.read_bps_device 284- blkio.throttle.read_bps_device
285 - Specifies upper limit on READ rate from the device. IO rate is 285 - Specifies upper limit on READ rate from the device. IO rate is
286 specified in bytes per second. Rules are per deivce. Following is 286 specified in bytes per second. Rules are per device. Following is
287 the format. 287 the format.
288 288
289 echo "<major>:<minor> <rate_bytes_per_second>" > /cgrp/blkio.throttle.read_bps_device 289 echo "<major>:<minor> <rate_bytes_per_second>" > /cgrp/blkio.throttle.read_bps_device
290 290
291- blkio.throttle.write_bps_device 291- blkio.throttle.write_bps_device
292 - Specifies upper limit on WRITE rate to the device. IO rate is 292 - Specifies upper limit on WRITE rate to the device. IO rate is
293 specified in bytes per second. Rules are per deivce. Following is 293 specified in bytes per second. Rules are per device. Following is
294 the format. 294 the format.
295 295
296 echo "<major>:<minor> <rate_bytes_per_second>" > /cgrp/blkio.throttle.write_bps_device 296 echo "<major>:<minor> <rate_bytes_per_second>" > /cgrp/blkio.throttle.write_bps_device
297 297
298- blkio.throttle.read_iops_device 298- blkio.throttle.read_iops_device
299 - Specifies upper limit on READ rate from the device. IO rate is 299 - Specifies upper limit on READ rate from the device. IO rate is
300 specified in IO per second. Rules are per deivce. Following is 300 specified in IO per second. Rules are per device. Following is
301 the format. 301 the format.
302 302
303 echo "<major>:<minor> <rate_io_per_second>" > /cgrp/blkio.throttle.read_iops_device 303 echo "<major>:<minor> <rate_io_per_second>" > /cgrp/blkio.throttle.read_iops_device
304 304
305- blkio.throttle.write_iops_device 305- blkio.throttle.write_iops_device
306 - Specifies upper limit on WRITE rate to the device. IO rate is 306 - Specifies upper limit on WRITE rate to the device. IO rate is
307 specified in io per second. Rules are per deivce. Following is 307 specified in io per second. Rules are per device. Following is
308 the format. 308 the format.
309 309
310 echo "<major>:<minor> <rate_io_per_second>" > /cgrp/blkio.throttle.write_iops_device 310 echo "<major>:<minor> <rate_io_per_second>" > /cgrp/blkio.throttle.write_iops_device
311 311
312Note: If both BW and IOPS rules are specified for a device, then IO is 312Note: If both BW and IOPS rules are specified for a device, then IO is
313 subjectd to both the constraints. 313 subjected to both the constraints.
314 314
315- blkio.throttle.io_serviced 315- blkio.throttle.io_serviced
316 - Number of IOs (bio) completed to/from the disk by the group (as 316 - Number of IOs (bio) completed to/from the disk by the group (as
diff --git a/Documentation/cgroups/cgroups.txt b/Documentation/cgroups/cgroups.txt
index a7c96ae5557c..8e74980ab385 100644
--- a/Documentation/cgroups/cgroups.txt
+++ b/Documentation/cgroups/cgroups.txt
@@ -558,8 +558,7 @@ Each subsystem may export the following methods. The only mandatory
558methods are create/destroy. Any others that are null are presumed to 558methods are create/destroy. Any others that are null are presumed to
559be successful no-ops. 559be successful no-ops.
560 560
561struct cgroup_subsys_state *create(struct cgroup_subsys *ss, 561struct cgroup_subsys_state *create(struct cgroup *cgrp)
562 struct cgroup *cgrp)
563(cgroup_mutex held by caller) 562(cgroup_mutex held by caller)
564 563
565Called to create a subsystem state object for a cgroup. The 564Called to create a subsystem state object for a cgroup. The
@@ -574,7 +573,7 @@ identified by the passed cgroup object having a NULL parent (since
574it's the root of the hierarchy) and may be an appropriate place for 573it's the root of the hierarchy) and may be an appropriate place for
575initialization code. 574initialization code.
576 575
577void destroy(struct cgroup_subsys *ss, struct cgroup *cgrp) 576void destroy(struct cgroup *cgrp)
578(cgroup_mutex held by caller) 577(cgroup_mutex held by caller)
579 578
580The cgroup system is about to destroy the passed cgroup; the subsystem 579The cgroup system is about to destroy the passed cgroup; the subsystem
@@ -585,7 +584,7 @@ cgroup->parent is still valid. (Note - can also be called for a
585newly-created cgroup if an error occurs after this subsystem's 584newly-created cgroup if an error occurs after this subsystem's
586create() method has been called for the new cgroup). 585create() method has been called for the new cgroup).
587 586
588int pre_destroy(struct cgroup_subsys *ss, struct cgroup *cgrp); 587int pre_destroy(struct cgroup *cgrp);
589 588
590Called before checking the reference count on each subsystem. This may 589Called before checking the reference count on each subsystem. This may
591be useful for subsystems which have some extra references even if 590be useful for subsystems which have some extra references even if
@@ -593,8 +592,7 @@ there are not tasks in the cgroup. If pre_destroy() returns error code,
593rmdir() will fail with it. From this behavior, pre_destroy() can be 592rmdir() will fail with it. From this behavior, pre_destroy() can be
594called multiple times against a cgroup. 593called multiple times against a cgroup.
595 594
596int can_attach(struct cgroup_subsys *ss, struct cgroup *cgrp, 595int can_attach(struct cgroup *cgrp, struct cgroup_taskset *tset)
597 struct cgroup_taskset *tset)
598(cgroup_mutex held by caller) 596(cgroup_mutex held by caller)
599 597
600Called prior to moving one or more tasks into a cgroup; if the 598Called prior to moving one or more tasks into a cgroup; if the
@@ -615,8 +613,7 @@ fork. If this method returns 0 (success) then this should remain valid
615while the caller holds cgroup_mutex and it is ensured that either 613while the caller holds cgroup_mutex and it is ensured that either
616attach() or cancel_attach() will be called in future. 614attach() or cancel_attach() will be called in future.
617 615
618void cancel_attach(struct cgroup_subsys *ss, struct cgroup *cgrp, 616void cancel_attach(struct cgroup *cgrp, struct cgroup_taskset *tset)
619 struct cgroup_taskset *tset)
620(cgroup_mutex held by caller) 617(cgroup_mutex held by caller)
621 618
622Called when a task attach operation has failed after can_attach() has succeeded. 619Called when a task attach operation has failed after can_attach() has succeeded.
@@ -625,23 +622,22 @@ function, so that the subsystem can implement a rollback. If not, not necessary.
625This will be called only about subsystems whose can_attach() operation have 622This will be called only about subsystems whose can_attach() operation have
626succeeded. The parameters are identical to can_attach(). 623succeeded. The parameters are identical to can_attach().
627 624
628void attach(struct cgroup_subsys *ss, struct cgroup *cgrp, 625void attach(struct cgroup *cgrp, struct cgroup_taskset *tset)
629 struct cgroup_taskset *tset)
630(cgroup_mutex held by caller) 626(cgroup_mutex held by caller)
631 627
632Called after the task has been attached to the cgroup, to allow any 628Called after the task has been attached to the cgroup, to allow any
633post-attachment activity that requires memory allocations or blocking. 629post-attachment activity that requires memory allocations or blocking.
634The parameters are identical to can_attach(). 630The parameters are identical to can_attach().
635 631
636void fork(struct cgroup_subsy *ss, struct task_struct *task) 632void fork(struct task_struct *task)
637 633
638Called when a task is forked into a cgroup. 634Called when a task is forked into a cgroup.
639 635
640void exit(struct cgroup_subsys *ss, struct task_struct *task) 636void exit(struct task_struct *task)
641 637
642Called during task exit. 638Called during task exit.
643 639
644int populate(struct cgroup_subsys *ss, struct cgroup *cgrp) 640int populate(struct cgroup *cgrp)
645(cgroup_mutex held by caller) 641(cgroup_mutex held by caller)
646 642
647Called after creation of a cgroup to allow a subsystem to populate 643Called after creation of a cgroup to allow a subsystem to populate
@@ -651,7 +647,7 @@ include/linux/cgroup.h for details). Note that although this
651method can return an error code, the error code is currently not 647method can return an error code, the error code is currently not
652always handled well. 648always handled well.
653 649
654void post_clone(struct cgroup_subsys *ss, struct cgroup *cgrp) 650void post_clone(struct cgroup *cgrp)
655(cgroup_mutex held by caller) 651(cgroup_mutex held by caller)
656 652
657Called during cgroup_create() to do any parameter 653Called during cgroup_create() to do any parameter
@@ -659,7 +655,7 @@ initialization which might be required before a task could attach. For
659example in cpusets, no task may attach before 'cpus' and 'mems' are set 655example in cpusets, no task may attach before 'cpus' and 'mems' are set
660up. 656up.
661 657
662void bind(struct cgroup_subsys *ss, struct cgroup *root) 658void bind(struct cgroup *root)
663(cgroup_mutex and ss->hierarchy_mutex held by caller) 659(cgroup_mutex and ss->hierarchy_mutex held by caller)
664 660
665Called when a cgroup subsystem is rebound to a different hierarchy 661Called when a cgroup subsystem is rebound to a different hierarchy
diff --git a/Documentation/cgroups/cpusets.txt b/Documentation/cgroups/cpusets.txt
index 5c51ed406d1d..cefd3d8bbd11 100644
--- a/Documentation/cgroups/cpusets.txt
+++ b/Documentation/cgroups/cpusets.txt
@@ -217,7 +217,7 @@ and name space for cpusets, with a minimum of additional kernel code.
217 217
218The cpus and mems files in the root (top_cpuset) cpuset are 218The cpus and mems files in the root (top_cpuset) cpuset are
219read-only. The cpus file automatically tracks the value of 219read-only. The cpus file automatically tracks the value of
220cpu_online_map using a CPU hotplug notifier, and the mems file 220cpu_online_mask using a CPU hotplug notifier, and the mems file
221automatically tracks the value of node_states[N_HIGH_MEMORY]--i.e., 221automatically tracks the value of node_states[N_HIGH_MEMORY]--i.e.,
222nodes with memory--using the cpuset_track_online_nodes() hook. 222nodes with memory--using the cpuset_track_online_nodes() hook.
223 223
diff --git a/Documentation/clk.txt b/Documentation/clk.txt
new file mode 100644
index 000000000000..1943fae014fd
--- /dev/null
+++ b/Documentation/clk.txt
@@ -0,0 +1,233 @@
1 The Common Clk Framework
2 Mike Turquette <mturquette@ti.com>
3
4This document endeavours to explain the common clk framework details,
5and how to port a platform over to this framework. It is not yet a
6detailed explanation of the clock api in include/linux/clk.h, but
7perhaps someday it will include that information.
8
9 Part 1 - introduction and interface split
10
11The common clk framework is an interface to control the clock nodes
12available on various devices today. This may come in the form of clock
13gating, rate adjustment, muxing or other operations. This framework is
14enabled with the CONFIG_COMMON_CLK option.
15
16The interface itself is divided into two halves, each shielded from the
17details of its counterpart. First is the common definition of struct
18clk which unifies the framework-level accounting and infrastructure that
19has traditionally been duplicated across a variety of platforms. Second
20is a common implementation of the clk.h api, defined in
21drivers/clk/clk.c. Finally there is struct clk_ops, whose operations
22are invoked by the clk api implementation.
23
24The second half of the interface is comprised of the hardware-specific
25callbacks registered with struct clk_ops and the corresponding
26hardware-specific structures needed to model a particular clock. For
27the remainder of this document any reference to a callback in struct
28clk_ops, such as .enable or .set_rate, implies the hardware-specific
29implementation of that code. Likewise, references to struct clk_foo
30serve as a convenient shorthand for the implementation of the
31hardware-specific bits for the hypothetical "foo" hardware.
32
33Tying the two halves of this interface together is struct clk_hw, which
34is defined in struct clk_foo and pointed to within struct clk. This
35allows easy for navigation between the two discrete halves of the common
36clock interface.
37
38 Part 2 - common data structures and api
39
40Below is the common struct clk definition from
41include/linux/clk-private.h, modified for brevity:
42
43 struct clk {
44 const char *name;
45 const struct clk_ops *ops;
46 struct clk_hw *hw;
47 char **parent_names;
48 struct clk **parents;
49 struct clk *parent;
50 struct hlist_head children;
51 struct hlist_node child_node;
52 ...
53 };
54
55The members above make up the core of the clk tree topology. The clk
56api itself defines several driver-facing functions which operate on
57struct clk. That api is documented in include/linux/clk.h.
58
59Platforms and devices utilizing the common struct clk use the struct
60clk_ops pointer in struct clk to perform the hardware-specific parts of
61the operations defined in clk.h:
62
63 struct clk_ops {
64 int (*prepare)(struct clk_hw *hw);
65 void (*unprepare)(struct clk_hw *hw);
66 int (*enable)(struct clk_hw *hw);
67 void (*disable)(struct clk_hw *hw);
68 int (*is_enabled)(struct clk_hw *hw);
69 unsigned long (*recalc_rate)(struct clk_hw *hw,
70 unsigned long parent_rate);
71 long (*round_rate)(struct clk_hw *hw, unsigned long,
72 unsigned long *);
73 int (*set_parent)(struct clk_hw *hw, u8 index);
74 u8 (*get_parent)(struct clk_hw *hw);
75 int (*set_rate)(struct clk_hw *hw, unsigned long);
76 void (*init)(struct clk_hw *hw);
77 };
78
79 Part 3 - hardware clk implementations
80
81The strength of the common struct clk comes from its .ops and .hw pointers
82which abstract the details of struct clk from the hardware-specific bits, and
83vice versa. To illustrate consider the simple gateable clk implementation in
84drivers/clk/clk-gate.c:
85
86struct clk_gate {
87 struct clk_hw hw;
88 void __iomem *reg;
89 u8 bit_idx;
90 ...
91};
92
93struct clk_gate contains struct clk_hw hw as well as hardware-specific
94knowledge about which register and bit controls this clk's gating.
95Nothing about clock topology or accounting, such as enable_count or
96notifier_count, is needed here. That is all handled by the common
97framework code and struct clk.
98
99Let's walk through enabling this clk from driver code:
100
101 struct clk *clk;
102 clk = clk_get(NULL, "my_gateable_clk");
103
104 clk_prepare(clk);
105 clk_enable(clk);
106
107The call graph for clk_enable is very simple:
108
109clk_enable(clk);
110 clk->ops->enable(clk->hw);
111 [resolves to...]
112 clk_gate_enable(hw);
113 [resolves struct clk gate with to_clk_gate(hw)]
114 clk_gate_set_bit(gate);
115
116And the definition of clk_gate_set_bit:
117
118static void clk_gate_set_bit(struct clk_gate *gate)
119{
120 u32 reg;
121
122 reg = __raw_readl(gate->reg);
123 reg |= BIT(gate->bit_idx);
124 writel(reg, gate->reg);
125}
126
127Note that to_clk_gate is defined as:
128
129#define to_clk_gate(_hw) container_of(_hw, struct clk_gate, clk)
130
131This pattern of abstraction is used for every clock hardware
132representation.
133
134 Part 4 - supporting your own clk hardware
135
136When implementing support for a new type of clock it only necessary to
137include the following header:
138
139#include <linux/clk-provider.h>
140
141include/linux/clk.h is included within that header and clk-private.h
142must never be included from the code which implements the operations for
143a clock. More on that below in Part 5.
144
145To construct a clk hardware structure for your platform you must define
146the following:
147
148struct clk_foo {
149 struct clk_hw hw;
150 ... hardware specific data goes here ...
151};
152
153To take advantage of your data you'll need to support valid operations
154for your clk:
155
156struct clk_ops clk_foo_ops {
157 .enable = &clk_foo_enable;
158 .disable = &clk_foo_disable;
159};
160
161Implement the above functions using container_of:
162
163#define to_clk_foo(_hw) container_of(_hw, struct clk_foo, hw)
164
165int clk_foo_enable(struct clk_hw *hw)
166{
167 struct clk_foo *foo;
168
169 foo = to_clk_foo(hw);
170
171 ... perform magic on foo ...
172
173 return 0;
174};
175
176Below is a matrix detailing which clk_ops are mandatory based upon the
177hardware capbilities of that clock. A cell marked as "y" means
178mandatory, a cell marked as "n" implies that either including that
179callback is invalid or otherwise uneccesary. Empty cells are either
180optional or must be evaluated on a case-by-case basis.
181
182 clock hardware characteristics
183 -----------------------------------------------------------
184 | gate | change rate | single parent | multiplexer | root |
185 |------|-------------|---------------|-------------|------|
186.prepare | | | | | |
187.unprepare | | | | | |
188 | | | | | |
189.enable | y | | | | |
190.disable | y | | | | |
191.is_enabled | y | | | | |
192 | | | | | |
193.recalc_rate | | y | | | |
194.round_rate | | y | | | |
195.set_rate | | y | | | |
196 | | | | | |
197.set_parent | | | n | y | n |
198.get_parent | | | n | y | n |
199 | | | | | |
200.init | | | | | |
201 -----------------------------------------------------------
202
203Finally, register your clock at run-time with a hardware-specific
204registration function. This function simply populates struct clk_foo's
205data and then passes the common struct clk parameters to the framework
206with a call to:
207
208clk_register(...)
209
210See the basic clock types in drivers/clk/clk-*.c for examples.
211
212 Part 5 - static initialization of clock data
213
214For platforms with many clocks (often numbering into the hundreds) it
215may be desirable to statically initialize some clock data. This
216presents a problem since the definition of struct clk should be hidden
217from everyone except for the clock core in drivers/clk/clk.c.
218
219To get around this problem struct clk's definition is exposed in
220include/linux/clk-private.h along with some macros for more easily
221initializing instances of the basic clock types. These clocks must
222still be initialized with the common clock framework via a call to
223__clk_init.
224
225clk-private.h must NEVER be included by code which implements struct
226clk_ops callbacks, nor must it be included by any logic which pokes
227around inside of struct clk at run-time. To do so is a layering
228violation.
229
230To better enforce this policy, always follow this simple rule: any
231statically initialized clock data MUST be defined in a separate file
232from the logic that implements its ops. Basically separate the logic
233from the data and all is well.
diff --git a/Documentation/cpu-hotplug.txt b/Documentation/cpu-hotplug.txt
index a20bfd415e41..66ef8f35613d 100644
--- a/Documentation/cpu-hotplug.txt
+++ b/Documentation/cpu-hotplug.txt
@@ -47,7 +47,7 @@ maxcpus=n Restrict boot time cpus to n. Say if you have 4 cpus, using
47 other cpus later online, read FAQ's for more info. 47 other cpus later online, read FAQ's for more info.
48 48
49additional_cpus=n (*) Use this to limit hotpluggable cpus. This option sets 49additional_cpus=n (*) Use this to limit hotpluggable cpus. This option sets
50 cpu_possible_map = cpu_present_map + additional_cpus 50 cpu_possible_mask = cpu_present_mask + additional_cpus
51 51
52cede_offline={"off","on"} Use this option to disable/enable putting offlined 52cede_offline={"off","on"} Use this option to disable/enable putting offlined
53 processors to an extended H_CEDE state on 53 processors to an extended H_CEDE state on
@@ -64,11 +64,11 @@ should only rely on this to count the # of cpus, but *MUST* not rely
64on the apicid values in those tables for disabled apics. In the event 64on the apicid values in those tables for disabled apics. In the event
65BIOS doesn't mark such hot-pluggable cpus as disabled entries, one could 65BIOS doesn't mark such hot-pluggable cpus as disabled entries, one could
66use this parameter "additional_cpus=x" to represent those cpus in the 66use this parameter "additional_cpus=x" to represent those cpus in the
67cpu_possible_map. 67cpu_possible_mask.
68 68
69possible_cpus=n [s390,x86_64] use this to set hotpluggable cpus. 69possible_cpus=n [s390,x86_64] use this to set hotpluggable cpus.
70 This option sets possible_cpus bits in 70 This option sets possible_cpus bits in
71 cpu_possible_map. Thus keeping the numbers of bits set 71 cpu_possible_mask. Thus keeping the numbers of bits set
72 constant even if the machine gets rebooted. 72 constant even if the machine gets rebooted.
73 73
74CPU maps and such 74CPU maps and such
@@ -76,7 +76,7 @@ CPU maps and such
76[More on cpumaps and primitive to manipulate, please check 76[More on cpumaps and primitive to manipulate, please check
77include/linux/cpumask.h that has more descriptive text.] 77include/linux/cpumask.h that has more descriptive text.]
78 78
79cpu_possible_map: Bitmap of possible CPUs that can ever be available in the 79cpu_possible_mask: Bitmap of possible CPUs that can ever be available in the
80system. This is used to allocate some boot time memory for per_cpu variables 80system. This is used to allocate some boot time memory for per_cpu variables
81that aren't designed to grow/shrink as CPUs are made available or removed. 81that aren't designed to grow/shrink as CPUs are made available or removed.
82Once set during boot time discovery phase, the map is static, i.e no bits 82Once set during boot time discovery phase, the map is static, i.e no bits
@@ -84,13 +84,13 @@ are added or removed anytime. Trimming it accurately for your system needs
84upfront can save some boot time memory. See below for how we use heuristics 84upfront can save some boot time memory. See below for how we use heuristics
85in x86_64 case to keep this under check. 85in x86_64 case to keep this under check.
86 86
87cpu_online_map: Bitmap of all CPUs currently online. Its set in __cpu_up() 87cpu_online_mask: Bitmap of all CPUs currently online. Its set in __cpu_up()
88after a cpu is available for kernel scheduling and ready to receive 88after a cpu is available for kernel scheduling and ready to receive
89interrupts from devices. Its cleared when a cpu is brought down using 89interrupts from devices. Its cleared when a cpu is brought down using
90__cpu_disable(), before which all OS services including interrupts are 90__cpu_disable(), before which all OS services including interrupts are
91migrated to another target CPU. 91migrated to another target CPU.
92 92
93cpu_present_map: Bitmap of CPUs currently present in the system. Not all 93cpu_present_mask: Bitmap of CPUs currently present in the system. Not all
94of them may be online. When physical hotplug is processed by the relevant 94of them may be online. When physical hotplug is processed by the relevant
95subsystem (e.g ACPI) can change and new bit either be added or removed 95subsystem (e.g ACPI) can change and new bit either be added or removed
96from the map depending on the event is hot-add/hot-remove. There are currently 96from the map depending on the event is hot-add/hot-remove. There are currently
@@ -99,22 +99,22 @@ at which time hotplug is disabled.
99 99
100You really dont need to manipulate any of the system cpu maps. They should 100You really dont need to manipulate any of the system cpu maps. They should
101be read-only for most use. When setting up per-cpu resources almost always use 101be read-only for most use. When setting up per-cpu resources almost always use
102cpu_possible_map/for_each_possible_cpu() to iterate. 102cpu_possible_mask/for_each_possible_cpu() to iterate.
103 103
104Never use anything other than cpumask_t to represent bitmap of CPUs. 104Never use anything other than cpumask_t to represent bitmap of CPUs.
105 105
106 #include <linux/cpumask.h> 106 #include <linux/cpumask.h>
107 107
108 for_each_possible_cpu - Iterate over cpu_possible_map 108 for_each_possible_cpu - Iterate over cpu_possible_mask
109 for_each_online_cpu - Iterate over cpu_online_map 109 for_each_online_cpu - Iterate over cpu_online_mask
110 for_each_present_cpu - Iterate over cpu_present_map 110 for_each_present_cpu - Iterate over cpu_present_mask
111 for_each_cpu_mask(x,mask) - Iterate over some random collection of cpu mask. 111 for_each_cpu_mask(x,mask) - Iterate over some random collection of cpu mask.
112 112
113 #include <linux/cpu.h> 113 #include <linux/cpu.h>
114 get_online_cpus() and put_online_cpus(): 114 get_online_cpus() and put_online_cpus():
115 115
116The above calls are used to inhibit cpu hotplug operations. While the 116The above calls are used to inhibit cpu hotplug operations. While the
117cpu_hotplug.refcount is non zero, the cpu_online_map will not change. 117cpu_hotplug.refcount is non zero, the cpu_online_mask will not change.
118If you merely need to avoid cpus going away, you could also use 118If you merely need to avoid cpus going away, you could also use
119preempt_disable() and preempt_enable() for those sections. 119preempt_disable() and preempt_enable() for those sections.
120Just remember the critical section cannot call any 120Just remember the critical section cannot call any
diff --git a/Documentation/cpuidle/sysfs.txt b/Documentation/cpuidle/sysfs.txt
index 50d7b1642759..9d28a3406e74 100644
--- a/Documentation/cpuidle/sysfs.txt
+++ b/Documentation/cpuidle/sysfs.txt
@@ -36,6 +36,7 @@ drwxr-xr-x 2 root root 0 Feb 8 10:42 state3
36/sys/devices/system/cpu/cpu0/cpuidle/state0: 36/sys/devices/system/cpu/cpu0/cpuidle/state0:
37total 0 37total 0
38-r--r--r-- 1 root root 4096 Feb 8 10:42 desc 38-r--r--r-- 1 root root 4096 Feb 8 10:42 desc
39-rw-r--r-- 1 root root 4096 Feb 8 10:42 disable
39-r--r--r-- 1 root root 4096 Feb 8 10:42 latency 40-r--r--r-- 1 root root 4096 Feb 8 10:42 latency
40-r--r--r-- 1 root root 4096 Feb 8 10:42 name 41-r--r--r-- 1 root root 4096 Feb 8 10:42 name
41-r--r--r-- 1 root root 4096 Feb 8 10:42 power 42-r--r--r-- 1 root root 4096 Feb 8 10:42 power
@@ -45,6 +46,7 @@ total 0
45/sys/devices/system/cpu/cpu0/cpuidle/state1: 46/sys/devices/system/cpu/cpu0/cpuidle/state1:
46total 0 47total 0
47-r--r--r-- 1 root root 4096 Feb 8 10:42 desc 48-r--r--r-- 1 root root 4096 Feb 8 10:42 desc
49-rw-r--r-- 1 root root 4096 Feb 8 10:42 disable
48-r--r--r-- 1 root root 4096 Feb 8 10:42 latency 50-r--r--r-- 1 root root 4096 Feb 8 10:42 latency
49-r--r--r-- 1 root root 4096 Feb 8 10:42 name 51-r--r--r-- 1 root root 4096 Feb 8 10:42 name
50-r--r--r-- 1 root root 4096 Feb 8 10:42 power 52-r--r--r-- 1 root root 4096 Feb 8 10:42 power
@@ -54,6 +56,7 @@ total 0
54/sys/devices/system/cpu/cpu0/cpuidle/state2: 56/sys/devices/system/cpu/cpu0/cpuidle/state2:
55total 0 57total 0
56-r--r--r-- 1 root root 4096 Feb 8 10:42 desc 58-r--r--r-- 1 root root 4096 Feb 8 10:42 desc
59-rw-r--r-- 1 root root 4096 Feb 8 10:42 disable
57-r--r--r-- 1 root root 4096 Feb 8 10:42 latency 60-r--r--r-- 1 root root 4096 Feb 8 10:42 latency
58-r--r--r-- 1 root root 4096 Feb 8 10:42 name 61-r--r--r-- 1 root root 4096 Feb 8 10:42 name
59-r--r--r-- 1 root root 4096 Feb 8 10:42 power 62-r--r--r-- 1 root root 4096 Feb 8 10:42 power
@@ -63,6 +66,7 @@ total 0
63/sys/devices/system/cpu/cpu0/cpuidle/state3: 66/sys/devices/system/cpu/cpu0/cpuidle/state3:
64total 0 67total 0
65-r--r--r-- 1 root root 4096 Feb 8 10:42 desc 68-r--r--r-- 1 root root 4096 Feb 8 10:42 desc
69-rw-r--r-- 1 root root 4096 Feb 8 10:42 disable
66-r--r--r-- 1 root root 4096 Feb 8 10:42 latency 70-r--r--r-- 1 root root 4096 Feb 8 10:42 latency
67-r--r--r-- 1 root root 4096 Feb 8 10:42 name 71-r--r--r-- 1 root root 4096 Feb 8 10:42 name
68-r--r--r-- 1 root root 4096 Feb 8 10:42 power 72-r--r--r-- 1 root root 4096 Feb 8 10:42 power
@@ -72,6 +76,7 @@ total 0
72 76
73 77
74* desc : Small description about the idle state (string) 78* desc : Small description about the idle state (string)
79* disable : Option to disable this idle state (bool)
75* latency : Latency to exit out of this idle state (in microseconds) 80* latency : Latency to exit out of this idle state (in microseconds)
76* name : Name of the idle state (string) 81* name : Name of the idle state (string)
77* power : Power consumed while in this idle state (in milliwatts) 82* power : Power consumed while in this idle state (in milliwatts)
diff --git a/Documentation/crc32.txt b/Documentation/crc32.txt
new file mode 100644
index 000000000000..a08a7dd9d625
--- /dev/null
+++ b/Documentation/crc32.txt
@@ -0,0 +1,182 @@
1A brief CRC tutorial.
2
3A CRC is a long-division remainder. You add the CRC to the message,
4and the whole thing (message+CRC) is a multiple of the given
5CRC polynomial. To check the CRC, you can either check that the
6CRC matches the recomputed value, *or* you can check that the
7remainder computed on the message+CRC is 0. This latter approach
8is used by a lot of hardware implementations, and is why so many
9protocols put the end-of-frame flag after the CRC.
10
11It's actually the same long division you learned in school, except that
12- We're working in binary, so the digits are only 0 and 1, and
13- When dividing polynomials, there are no carries. Rather than add and
14 subtract, we just xor. Thus, we tend to get a bit sloppy about
15 the difference between adding and subtracting.
16
17Like all division, the remainder is always smaller than the divisor.
18To produce a 32-bit CRC, the divisor is actually a 33-bit CRC polynomial.
19Since it's 33 bits long, bit 32 is always going to be set, so usually the
20CRC is written in hex with the most significant bit omitted. (If you're
21familiar with the IEEE 754 floating-point format, it's the same idea.)
22
23Note that a CRC is computed over a string of *bits*, so you have
24to decide on the endianness of the bits within each byte. To get
25the best error-detecting properties, this should correspond to the
26order they're actually sent. For example, standard RS-232 serial is
27little-endian; the most significant bit (sometimes used for parity)
28is sent last. And when appending a CRC word to a message, you should
29do it in the right order, matching the endianness.
30
31Just like with ordinary division, you proceed one digit (bit) at a time.
32Each step of the division you take one more digit (bit) of the dividend
33and append it to the current remainder. Then you figure out the
34appropriate multiple of the divisor to subtract to being the remainder
35back into range. In binary, this is easy - it has to be either 0 or 1,
36and to make the XOR cancel, it's just a copy of bit 32 of the remainder.
37
38When computing a CRC, we don't care about the quotient, so we can
39throw the quotient bit away, but subtract the appropriate multiple of
40the polynomial from the remainder and we're back to where we started,
41ready to process the next bit.
42
43A big-endian CRC written this way would be coded like:
44for (i = 0; i < input_bits; i++) {
45 multiple = remainder & 0x80000000 ? CRCPOLY : 0;
46 remainder = (remainder << 1 | next_input_bit()) ^ multiple;
47}
48
49Notice how, to get at bit 32 of the shifted remainder, we look
50at bit 31 of the remainder *before* shifting it.
51
52But also notice how the next_input_bit() bits we're shifting into
53the remainder don't actually affect any decision-making until
5432 bits later. Thus, the first 32 cycles of this are pretty boring.
55Also, to add the CRC to a message, we need a 32-bit-long hole for it at
56the end, so we have to add 32 extra cycles shifting in zeros at the
57end of every message,
58
59These details lead to a standard trick: rearrange merging in the
60next_input_bit() until the moment it's needed. Then the first 32 cycles
61can be precomputed, and merging in the final 32 zero bits to make room
62for the CRC can be skipped entirely. This changes the code to:
63
64for (i = 0; i < input_bits; i++) {
65 remainder ^= next_input_bit() << 31;
66 multiple = (remainder & 0x80000000) ? CRCPOLY : 0;
67 remainder = (remainder << 1) ^ multiple;
68}
69
70With this optimization, the little-endian code is particularly simple:
71for (i = 0; i < input_bits; i++) {
72 remainder ^= next_input_bit();
73 multiple = (remainder & 1) ? CRCPOLY : 0;
74 remainder = (remainder >> 1) ^ multiple;
75}
76
77The most significant coefficient of the remainder polynomial is stored
78in the least significant bit of the binary "remainder" variable.
79The other details of endianness have been hidden in CRCPOLY (which must
80be bit-reversed) and next_input_bit().
81
82As long as next_input_bit is returning the bits in a sensible order, we don't
83*have* to wait until the last possible moment to merge in additional bits.
84We can do it 8 bits at a time rather than 1 bit at a time:
85for (i = 0; i < input_bytes; i++) {
86 remainder ^= next_input_byte() << 24;
87 for (j = 0; j < 8; j++) {
88 multiple = (remainder & 0x80000000) ? CRCPOLY : 0;
89 remainder = (remainder << 1) ^ multiple;
90 }
91}
92
93Or in little-endian:
94for (i = 0; i < input_bytes; i++) {
95 remainder ^= next_input_byte();
96 for (j = 0; j < 8; j++) {
97 multiple = (remainder & 1) ? CRCPOLY : 0;
98 remainder = (remainder >> 1) ^ multiple;
99 }
100}
101
102If the input is a multiple of 32 bits, you can even XOR in a 32-bit
103word at a time and increase the inner loop count to 32.
104
105You can also mix and match the two loop styles, for example doing the
106bulk of a message byte-at-a-time and adding bit-at-a-time processing
107for any fractional bytes at the end.
108
109To reduce the number of conditional branches, software commonly uses
110the byte-at-a-time table method, popularized by Dilip V. Sarwate,
111"Computation of Cyclic Redundancy Checks via Table Look-Up", Comm. ACM
112v.31 no.8 (August 1998) p. 1008-1013.
113
114Here, rather than just shifting one bit of the remainder to decide
115in the correct multiple to subtract, we can shift a byte at a time.
116This produces a 40-bit (rather than a 33-bit) intermediate remainder,
117and the correct multiple of the polynomial to subtract is found using
118a 256-entry lookup table indexed by the high 8 bits.
119
120(The table entries are simply the CRC-32 of the given one-byte messages.)
121
122When space is more constrained, smaller tables can be used, e.g. two
1234-bit shifts followed by a lookup in a 16-entry table.
124
125It is not practical to process much more than 8 bits at a time using this
126technique, because tables larger than 256 entries use too much memory and,
127more importantly, too much of the L1 cache.
128
129To get higher software performance, a "slicing" technique can be used.
130See "High Octane CRC Generation with the Intel Slicing-by-8 Algorithm",
131ftp://download.intel.com/technology/comms/perfnet/download/slicing-by-8.pdf
132
133This does not change the number of table lookups, but does increase
134the parallelism. With the classic Sarwate algorithm, each table lookup
135must be completed before the index of the next can be computed.
136
137A "slicing by 2" technique would shift the remainder 16 bits at a time,
138producing a 48-bit intermediate remainder. Rather than doing a single
139lookup in a 65536-entry table, the two high bytes are looked up in
140two different 256-entry tables. Each contains the remainder required
141to cancel out the corresponding byte. The tables are different because the
142polynomials to cancel are different. One has non-zero coefficients from
143x^32 to x^39, while the other goes from x^40 to x^47.
144
145Since modern processors can handle many parallel memory operations, this
146takes barely longer than a single table look-up and thus performs almost
147twice as fast as the basic Sarwate algorithm.
148
149This can be extended to "slicing by 4" using 4 256-entry tables.
150Each step, 32 bits of data is fetched, XORed with the CRC, and the result
151broken into bytes and looked up in the tables. Because the 32-bit shift
152leaves the low-order bits of the intermediate remainder zero, the
153final CRC is simply the XOR of the 4 table look-ups.
154
155But this still enforces sequential execution: a second group of table
156look-ups cannot begin until the previous groups 4 table look-ups have all
157been completed. Thus, the processor's load/store unit is sometimes idle.
158
159To make maximum use of the processor, "slicing by 8" performs 8 look-ups
160in parallel. Each step, the 32-bit CRC is shifted 64 bits and XORed
161with 64 bits of input data. What is important to note is that 4 of
162those 8 bytes are simply copies of the input data; they do not depend
163on the previous CRC at all. Thus, those 4 table look-ups may commence
164immediately, without waiting for the previous loop iteration.
165
166By always having 4 loads in flight, a modern superscalar processor can
167be kept busy and make full use of its L1 cache.
168
169Two more details about CRC implementation in the real world:
170
171Normally, appending zero bits to a message which is already a multiple
172of a polynomial produces a larger multiple of that polynomial. Thus,
173a basic CRC will not detect appended zero bits (or bytes). To enable
174a CRC to detect this condition, it's common to invert the CRC before
175appending it. This makes the remainder of the message+crc come out not
176as zero, but some fixed non-zero value. (The CRC of the inversion
177pattern, 0xffffffff.)
178
179The same problem applies to zero bits prepended to the message, and a
180similar solution is used. Instead of starting the CRC computation with
181a remainder of 0, an initial remainder of all ones is used. As long as
182you start the same way on decoding, it doesn't make a difference.
diff --git a/Documentation/device-mapper/dm-raid.txt b/Documentation/device-mapper/dm-raid.txt
index 2a8c11331d2d..946c73342cde 100644
--- a/Documentation/device-mapper/dm-raid.txt
+++ b/Documentation/device-mapper/dm-raid.txt
@@ -28,7 +28,7 @@ The target is named "raid" and it accepts the following parameters:
28 raid6_nc RAID6 N continue 28 raid6_nc RAID6 N continue
29 - rotating parity N (right-to-left) with data continuation 29 - rotating parity N (right-to-left) with data continuation
30 30
31 Refererence: Chapter 4 of 31 Reference: Chapter 4 of
32 http://www.snia.org/sites/default/files/SNIA_DDF_Technical_Position_v2.0.pdf 32 http://www.snia.org/sites/default/files/SNIA_DDF_Technical_Position_v2.0.pdf
33 33
34<#raid_params>: The number of parameters that follow. 34<#raid_params>: The number of parameters that follow.
diff --git a/Documentation/device-mapper/persistent-data.txt b/Documentation/device-mapper/persistent-data.txt
index 0e5df9b04ad2..a333bcb3a6c2 100644
--- a/Documentation/device-mapper/persistent-data.txt
+++ b/Documentation/device-mapper/persistent-data.txt
@@ -3,7 +3,7 @@ Introduction
3 3
4The more-sophisticated device-mapper targets require complex metadata 4The more-sophisticated device-mapper targets require complex metadata
5that is managed in kernel. In late 2010 we were seeing that various 5that is managed in kernel. In late 2010 we were seeing that various
6different targets were rolling their own data strutures, for example: 6different targets were rolling their own data structures, for example:
7 7
8- Mikulas Patocka's multisnap implementation 8- Mikulas Patocka's multisnap implementation
9- Heinz Mauelshagen's thin provisioning target 9- Heinz Mauelshagen's thin provisioning target
diff --git a/Documentation/device-mapper/thin-provisioning.txt b/Documentation/device-mapper/thin-provisioning.txt
index 801d9d1cf82b..3370bc4d7b98 100644
--- a/Documentation/device-mapper/thin-provisioning.txt
+++ b/Documentation/device-mapper/thin-provisioning.txt
@@ -1,7 +1,7 @@
1Introduction 1Introduction
2============ 2============
3 3
4This document descibes a collection of device-mapper targets that 4This document describes a collection of device-mapper targets that
5between them implement thin-provisioning and snapshots. 5between them implement thin-provisioning and snapshots.
6 6
7The main highlight of this implementation, compared to the previous 7The main highlight of this implementation, compared to the previous
@@ -75,10 +75,12 @@ less sharing than average you'll need a larger-than-average metadata device.
75 75
76As a guide, we suggest you calculate the number of bytes to use in the 76As a guide, we suggest you calculate the number of bytes to use in the
77metadata device as 48 * $data_dev_size / $data_block_size but round it up 77metadata device as 48 * $data_dev_size / $data_block_size but round it up
78to 2MB if the answer is smaller. The largest size supported is 16GB. 78to 2MB if the answer is smaller. If you're creating large numbers of
79snapshots which are recording large amounts of change, you may find you
80need to increase this.
79 81
80If you're creating large numbers of snapshots which are recording large 82The largest size supported is 16GB: If the device is larger,
81amounts of change, you may need find you need to increase this. 83a warning will be issued and the excess space will not be used.
82 84
83Reloading a pool table 85Reloading a pool table
84---------------------- 86----------------------
@@ -167,6 +169,38 @@ ii) Using an internal snapshot.
167 169
168 dmsetup create snap --table "0 2097152 thin /dev/mapper/pool 1" 170 dmsetup create snap --table "0 2097152 thin /dev/mapper/pool 1"
169 171
172External snapshots
173------------------
174
175You can use an external _read only_ device as an origin for a
176thinly-provisioned volume. Any read to an unprovisioned area of the
177thin device will be passed through to the origin. Writes trigger
178the allocation of new blocks as usual.
179
180One use case for this is VM hosts that want to run guests on
181thinly-provisioned volumes but have the base image on another device
182(possibly shared between many VMs).
183
184You must not write to the origin device if you use this technique!
185Of course, you may write to the thin device and take internal snapshots
186of the thin volume.
187
188i) Creating a snapshot of an external device
189
190 This is the same as creating a thin device.
191 You don't mention the origin at this stage.
192
193 dmsetup message /dev/mapper/pool 0 "create_thin 0"
194
195ii) Using a snapshot of an external device.
196
197 Append an extra parameter to the thin target specifying the origin:
198
199 dmsetup create snap --table "0 2097152 thin /dev/mapper/pool 0 /dev/image"
200
201 N.B. All descendants (internal snapshots) of this snapshot require the
202 same extra origin parameter.
203
170Deactivation 204Deactivation
171------------ 205------------
172 206
@@ -189,7 +223,13 @@ i) Constructor
189 <low water mark (blocks)> [<number of feature args> [<arg>]*] 223 <low water mark (blocks)> [<number of feature args> [<arg>]*]
190 224
191 Optional feature arguments: 225 Optional feature arguments:
192 - 'skip_block_zeroing': skips the zeroing of newly-provisioned blocks. 226
227 skip_block_zeroing: Skip the zeroing of newly-provisioned blocks.
228
229 ignore_discard: Disable discard support.
230
231 no_discard_passdown: Don't pass discards down to the underlying
232 data device, but just remove the mapping.
193 233
194 Data block size must be between 64KB (128 sectors) and 1GB 234 Data block size must be between 64KB (128 sectors) and 1GB
195 (2097152 sectors) inclusive. 235 (2097152 sectors) inclusive.
@@ -237,16 +277,6 @@ iii) Messages
237 277
238 Deletes a thin device. Irreversible. 278 Deletes a thin device. Irreversible.
239 279
240 trim <dev id> <new size in sectors>
241
242 Delete mappings from the end of a thin device. Irreversible.
243 You might want to use this if you're reducing the size of
244 your thinly-provisioned device. In many cases, due to the
245 sharing of blocks between devices, it is not possible to
246 determine in advance how much space 'trim' will release. (In
247 future a userspace tool might be able to perform this
248 calculation.)
249
250 set_transaction_id <current id> <new id> 280 set_transaction_id <current id> <new id>
251 281
252 Userland volume managers, such as LVM, need a way to 282 Userland volume managers, such as LVM, need a way to
@@ -262,7 +292,7 @@ iii) Messages
262 292
263i) Constructor 293i) Constructor
264 294
265 thin <pool dev> <dev id> 295 thin <pool dev> <dev id> [<external origin dev>]
266 296
267 pool dev: 297 pool dev:
268 the thin-pool device, e.g. /dev/mapper/my_pool or 253:0 298 the thin-pool device, e.g. /dev/mapper/my_pool or 253:0
@@ -271,6 +301,11 @@ i) Constructor
271 the internal device identifier of the device to be 301 the internal device identifier of the device to be
272 activated. 302 activated.
273 303
304 external origin dev:
305 an optional block device outside the pool to be treated as a
306 read-only snapshot origin: reads to unprovisioned areas of the
307 thin target will be mapped to this device.
308
274The pool doesn't store any size against the thin devices. If you 309The pool doesn't store any size against the thin devices. If you
275load a thin target that is smaller than you've been using previously, 310load a thin target that is smaller than you've been using previously,
276then you'll have no access to blocks mapped beyond the end. If you 311then you'll have no access to blocks mapped beyond the end. If you
diff --git a/Documentation/device-mapper/verity.txt b/Documentation/device-mapper/verity.txt
new file mode 100644
index 000000000000..32e48797a14f
--- /dev/null
+++ b/Documentation/device-mapper/verity.txt
@@ -0,0 +1,194 @@
1dm-verity
2==========
3
4Device-Mapper's "verity" target provides transparent integrity checking of
5block devices using a cryptographic digest provided by the kernel crypto API.
6This target is read-only.
7
8Construction Parameters
9=======================
10 <version> <dev> <hash_dev> <hash_start>
11 <data_block_size> <hash_block_size>
12 <num_data_blocks> <hash_start_block>
13 <algorithm> <digest> <salt>
14
15<version>
16 This is the version number of the on-disk format.
17
18 0 is the original format used in the Chromium OS.
19 The salt is appended when hashing, digests are stored continuously and
20 the rest of the block is padded with zeros.
21
22 1 is the current format that should be used for new devices.
23 The salt is prepended when hashing and each digest is
24 padded with zeros to the power of two.
25
26<dev>
27 This is the device containing the data the integrity of which needs to be
28 checked. It may be specified as a path, like /dev/sdaX, or a device number,
29 <major>:<minor>.
30
31<hash_dev>
32 This is the device that that supplies the hash tree data. It may be
33 specified similarly to the device path and may be the same device. If the
34 same device is used, the hash_start should be outside of the dm-verity
35 configured device size.
36
37<data_block_size>
38 The block size on a data device. Each block corresponds to one digest on
39 the hash device.
40
41<hash_block_size>
42 The size of a hash block.
43
44<num_data_blocks>
45 The number of data blocks on the data device. Additional blocks are
46 inaccessible. You can place hashes to the same partition as data, in this
47 case hashes are placed after <num_data_blocks>.
48
49<hash_start_block>
50 This is the offset, in <hash_block_size>-blocks, from the start of hash_dev
51 to the root block of the hash tree.
52
53<algorithm>
54 The cryptographic hash algorithm used for this device. This should
55 be the name of the algorithm, like "sha1".
56
57<digest>
58 The hexadecimal encoding of the cryptographic hash of the root hash block
59 and the salt. This hash should be trusted as there is no other authenticity
60 beyond this point.
61
62<salt>
63 The hexadecimal encoding of the salt value.
64
65Theory of operation
66===================
67
68dm-verity is meant to be setup as part of a verified boot path. This
69may be anything ranging from a boot using tboot or trustedgrub to just
70booting from a known-good device (like a USB drive or CD).
71
72When a dm-verity device is configured, it is expected that the caller
73has been authenticated in some way (cryptographic signatures, etc).
74After instantiation, all hashes will be verified on-demand during
75disk access. If they cannot be verified up to the root node of the
76tree, the root hash, then the I/O will fail. This should identify
77tampering with any data on the device and the hash data.
78
79Cryptographic hashes are used to assert the integrity of the device on a
80per-block basis. This allows for a lightweight hash computation on first read
81into the page cache. Block hashes are stored linearly-aligned to the nearest
82block the size of a page.
83
84Hash Tree
85---------
86
87Each node in the tree is a cryptographic hash. If it is a leaf node, the hash
88is of some block data on disk. If it is an intermediary node, then the hash is
89of a number of child nodes.
90
91Each entry in the tree is a collection of neighboring nodes that fit in one
92block. The number is determined based on block_size and the size of the
93selected cryptographic digest algorithm. The hashes are linearly-ordered in
94this entry and any unaligned trailing space is ignored but included when
95calculating the parent node.
96
97The tree looks something like:
98
99alg = sha256, num_blocks = 32768, block_size = 4096
100
101 [ root ]
102 / . . . \
103 [entry_0] [entry_1]
104 / . . . \ . . . \
105 [entry_0_0] . . . [entry_0_127] . . . . [entry_1_127]
106 / ... \ / . . . \ / \
107 blk_0 ... blk_127 blk_16256 blk_16383 blk_32640 . . . blk_32767
108
109
110On-disk format
111==============
112
113Below is the recommended on-disk format. The verity kernel code does not
114read the on-disk header. It only reads the hash blocks which directly
115follow the header. It is expected that a user-space tool will verify the
116integrity of the verity_header and then call dmsetup with the correct
117parameters. Alternatively, the header can be omitted and the dmsetup
118parameters can be passed via the kernel command-line in a rooted chain
119of trust where the command-line is verified.
120
121The on-disk format is especially useful in cases where the hash blocks
122are on a separate partition. The magic number allows easy identification
123of the partition contents. Alternatively, the hash blocks can be stored
124in the same partition as the data to be verified. In such a configuration
125the filesystem on the partition would be sized a little smaller than
126the full-partition, leaving room for the hash blocks.
127
128struct superblock {
129 uint8_t signature[8]
130 "verity\0\0";
131
132 uint8_t version;
133 1 - current format
134
135 uint8_t data_block_bits;
136 log2(data block size)
137
138 uint8_t hash_block_bits;
139 log2(hash block size)
140
141 uint8_t pad1[1];
142 zero padding
143
144 uint16_t salt_size;
145 big-endian salt size
146
147 uint8_t pad2[2];
148 zero padding
149
150 uint32_t data_blocks_hi;
151 big-endian high 32 bits of the 64-bit number of data blocks
152
153 uint32_t data_blocks_lo;
154 big-endian low 32 bits of the 64-bit number of data blocks
155
156 uint8_t algorithm[16];
157 cryptographic algorithm
158
159 uint8_t salt[384];
160 salt (the salt size is specified above)
161
162 uint8_t pad3[88];
163 zero padding to 512-byte boundary
164}
165
166Directly following the header (and with sector number padded to the next hash
167block boundary) are the hash blocks which are stored a depth at a time
168(starting from the root), sorted in order of increasing index.
169
170Status
171======
172V (for Valid) is returned if every check performed so far was valid.
173If any check failed, C (for Corruption) is returned.
174
175Example
176=======
177
178Setup a device:
179 dmsetup create vroot --table \
180 "0 2097152 "\
181 "verity 1 /dev/sda1 /dev/sda2 4096 4096 2097152 1 "\
182 "4392712ba01368efdf14b05c76f9e4df0d53664630b5d48632ed17a137f39076 "\
183 "1234000000000000000000000000000000000000000000000000000000000000"
184
185A command line tool veritysetup is available to compute or verify
186the hash tree or activate the kernel driver. This is available from
187the LVM2 upstream repository and may be supplied as a package called
188device-mapper-verity-tools:
189 git://sources.redhat.com/git/lvm2
190 http://sourceware.org/git/?p=lvm2.git
191 http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/verity?cvsroot=lvm2
192
193veritysetup -a vroot /dev/sda1 /dev/sda2 \
194 4392712ba01368efdf14b05c76f9e4df0d53664630b5d48632ed17a137f39076
diff --git a/Documentation/devicetree/bindings/arm/atmel-aic.txt b/Documentation/devicetree/bindings/arm/atmel-aic.txt
new file mode 100644
index 000000000000..aabca4f83402
--- /dev/null
+++ b/Documentation/devicetree/bindings/arm/atmel-aic.txt
@@ -0,0 +1,38 @@
1* Advanced Interrupt Controller (AIC)
2
3Required properties:
4- compatible: Should be "atmel,<chip>-aic"
5- interrupt-controller: Identifies the node as an interrupt controller.
6- interrupt-parent: For single AIC system, it is an empty property.
7- #interrupt-cells: The number of cells to define the interrupts. It sould be 2.
8 The first cell is the IRQ number (aka "Peripheral IDentifier" on datasheet).
9 The second cell is used to specify flags:
10 bits[3:0] trigger type and level flags:
11 1 = low-to-high edge triggered.
12 2 = high-to-low edge triggered.
13 4 = active high level-sensitive.
14 8 = active low level-sensitive.
15 Valid combinations are 1, 2, 3, 4, 8.
16 Default flag for internal sources should be set to 4 (active high).
17- reg: Should contain AIC registers location and length
18
19Examples:
20 /*
21 * AIC
22 */
23 aic: interrupt-controller@fffff000 {
24 compatible = "atmel,at91rm9200-aic";
25 interrupt-controller;
26 interrupt-parent;
27 #interrupt-cells = <2>;
28 reg = <0xfffff000 0x200>;
29 };
30
31 /*
32 * An interrupt generating device that is wired to an AIC.
33 */
34 dma: dma-controller@ffffec00 {
35 compatible = "atmel,at91sam9g45-dma";
36 reg = <0xffffec00 0x200>;
37 interrupts = <21 4>;
38 };
diff --git a/Documentation/devicetree/bindings/arm/atmel-at91.txt b/Documentation/devicetree/bindings/arm/atmel-at91.txt
new file mode 100644
index 000000000000..ecc81e368715
--- /dev/null
+++ b/Documentation/devicetree/bindings/arm/atmel-at91.txt
@@ -0,0 +1,92 @@
1Atmel AT91 device tree bindings.
2================================
3
4PIT Timer required properties:
5- compatible: Should be "atmel,at91sam9260-pit"
6- reg: Should contain registers location and length
7- interrupts: Should contain interrupt for the PIT which is the IRQ line
8 shared across all System Controller members.
9
10TC/TCLIB Timer required properties:
11- compatible: Should be "atmel,<chip>-pit".
12 <chip> can be "at91rm9200" or "at91sam9x5"
13- reg: Should contain registers location and length
14- interrupts: Should contain all interrupts for the TC block
15 Note that you can specify several interrupt cells if the TC
16 block has one interrupt per channel.
17
18Examples:
19
20One interrupt per TC block:
21 tcb0: timer@fff7c000 {
22 compatible = "atmel,at91rm9200-tcb";
23 reg = <0xfff7c000 0x100>;
24 interrupts = <18 4>;
25 };
26
27One interrupt per TC channel in a TC block:
28 tcb1: timer@fffdc000 {
29 compatible = "atmel,at91rm9200-tcb";
30 reg = <0xfffdc000 0x100>;
31 interrupts = <26 4 27 4 28 4>;
32 };
33
34RSTC Reset Controller required properties:
35- compatible: Should be "atmel,<chip>-rstc".
36 <chip> can be "at91sam9260" or "at91sam9g45"
37- reg: Should contain registers location and length
38
39Example:
40
41 rstc@fffffd00 {
42 compatible = "atmel,at91sam9260-rstc";
43 reg = <0xfffffd00 0x10>;
44 };
45
46RAMC SDRAM/DDR Controller required properties:
47- compatible: Should be "atmel,at91sam9260-sdramc",
48 "atmel,at91sam9g45-ddramc",
49- reg: Should contain registers location and length
50 For at91sam9263 and at91sam9g45 you must specify 2 entries.
51
52Examples:
53
54 ramc0: ramc@ffffe800 {
55 compatible = "atmel,at91sam9g45-ddramc";
56 reg = <0xffffe800 0x200>;
57 };
58
59 ramc0: ramc@ffffe400 {
60 compatible = "atmel,at91sam9g45-ddramc";
61 reg = <0xffffe400 0x200
62 0xffffe600 0x200>;
63 };
64
65SHDWC Shutdown Controller
66
67required properties:
68- compatible: Should be "atmel,<chip>-shdwc".
69 <chip> can be "at91sam9260", "at91sam9rl" or "at91sam9x5".
70- reg: Should contain registers location and length
71
72optional properties:
73- atmel,wakeup-mode: String, operation mode of the wakeup mode.
74 Supported values are: "none", "high", "low", "any".
75- atmel,wakeup-counter: Counter on Wake-up 0 (between 0x0 and 0xf).
76
77optional at91sam9260 properties:
78- atmel,wakeup-rtt-timer: boolean to enable Real-time Timer Wake-up.
79
80optional at91sam9rl properties:
81- atmel,wakeup-rtc-timer: boolean to enable Real-time Clock Wake-up.
82- atmel,wakeup-rtt-timer: boolean to enable Real-time Timer Wake-up.
83
84optional at91sam9x5 properties:
85- atmel,wakeup-rtc-timer: boolean to enable Real-time Clock Wake-up.
86
87Example:
88
89 rstc@fffffd00 {
90 compatible = "atmel,at91sam9260-rstc";
91 reg = <0xfffffd00 0x10>;
92 };
diff --git a/Documentation/devicetree/bindings/arm/atmel-pmc.txt b/Documentation/devicetree/bindings/arm/atmel-pmc.txt
new file mode 100644
index 000000000000..389bed5056e8
--- /dev/null
+++ b/Documentation/devicetree/bindings/arm/atmel-pmc.txt
@@ -0,0 +1,11 @@
1* Power Management Controller (PMC)
2
3Required properties:
4- compatible: Should be "atmel,at91rm9200-pmc"
5- reg: Should contain PMC registers location and length
6
7Examples:
8 pmc: pmc@fffffc00 {
9 compatible = "atmel,at91rm9200-pmc";
10 reg = <0xfffffc00 0x100>;
11 };
diff --git a/Documentation/devicetree/bindings/arm/exynos/power_domain.txt b/Documentation/devicetree/bindings/arm/exynos/power_domain.txt
new file mode 100644
index 000000000000..6528e215c5fe
--- /dev/null
+++ b/Documentation/devicetree/bindings/arm/exynos/power_domain.txt
@@ -0,0 +1,21 @@
1* Samsung Exynos Power Domains
2
3Exynos processors include support for multiple power domains which are used
4to gate power to one or more peripherals on the processor.
5
6Required Properties:
7- compatiable: should be one of the following.
8 * samsung,exynos4210-pd - for exynos4210 type power domain.
9- reg: physical base address of the controller and length of memory mapped
10 region.
11
12Optional Properties:
13- samsung,exynos4210-pd-off: Specifies that the power domain is in turned-off
14 state during boot and remains to be turned-off until explicitly turned-on.
15
16Example:
17
18 lcd0: power-domain-lcd0 {
19 compatible = "samsung,exynos4210-pd";
20 reg = <0x10023C00 0x10>;
21 };
diff --git a/Documentation/devicetree/bindings/arm/fsl.txt b/Documentation/devicetree/bindings/arm/fsl.txt
index 54bdddadf1cf..bfbc771a65f8 100644
--- a/Documentation/devicetree/bindings/arm/fsl.txt
+++ b/Documentation/devicetree/bindings/arm/fsl.txt
@@ -28,3 +28,25 @@ Required root node properties:
28i.MX6 Quad SABRE Lite Board 28i.MX6 Quad SABRE Lite Board
29Required root node properties: 29Required root node properties:
30 - compatible = "fsl,imx6q-sabrelite", "fsl,imx6q"; 30 - compatible = "fsl,imx6q-sabrelite", "fsl,imx6q";
31
32Generic i.MX boards
33-------------------
34
35No iomux setup is done for these boards, so this must have been configured
36by the bootloader for boards to work with the generic bindings.
37
38i.MX27 generic board
39Required root node properties:
40 - compatible = "fsl,imx27";
41
42i.MX51 generic board
43Required root node properties:
44 - compatible = "fsl,imx51";
45
46i.MX53 generic board
47Required root node properties:
48 - compatible = "fsl,imx53";
49
50i.MX6q generic board
51Required root node properties:
52 - compatible = "fsl,imx6q";
diff --git a/Documentation/devicetree/bindings/arm/mrvl.txt b/Documentation/devicetree/bindings/arm/mrvl.txt
new file mode 100644
index 000000000000..d8de933e9d81
--- /dev/null
+++ b/Documentation/devicetree/bindings/arm/mrvl.txt
@@ -0,0 +1,6 @@
1Marvell Platforms Device Tree Bindings
2----------------------------------------------------
3
4PXA168 Aspenite Board
5Required root node properties:
6 - compatible = "mrvl,pxa168-aspenite", "mrvl,pxa168";
diff --git a/Documentation/devicetree/bindings/arm/omap/intc.txt b/Documentation/devicetree/bindings/arm/omap/intc.txt
new file mode 100644
index 000000000000..f2583e6ec060
--- /dev/null
+++ b/Documentation/devicetree/bindings/arm/omap/intc.txt
@@ -0,0 +1,27 @@
1* OMAP Interrupt Controller
2
3OMAP2/3 are using a TI interrupt controller that can support several
4configurable number of interrupts.
5
6Main node required properties:
7
8- compatible : should be:
9 "ti,omap2-intc"
10- interrupt-controller : Identifies the node as an interrupt controller
11- #interrupt-cells : Specifies the number of cells needed to encode an
12 interrupt source. The type shall be a <u32> and the value shall be 1.
13
14 The cell contains the interrupt number in the range [0-128].
15- ti,intc-size: Number of interrupts handled by the interrupt controller.
16- reg: physical base address and size of the intc registers map.
17
18Example:
19
20 intc: interrupt-controller@1 {
21 compatible = "ti,omap2-intc";
22 interrupt-controller;
23 #interrupt-cells = <1>;
24 ti,intc-size = <96>;
25 reg = <0x48200000 0x1000>;
26 };
27
diff --git a/Documentation/devicetree/bindings/arm/omap/omap.txt b/Documentation/devicetree/bindings/arm/omap/omap.txt
index dbdab40ed3a6..e78e8bccac30 100644
--- a/Documentation/devicetree/bindings/arm/omap/omap.txt
+++ b/Documentation/devicetree/bindings/arm/omap/omap.txt
@@ -5,7 +5,7 @@ IPs present in the SoC.
5On top of that an omap_device is created to extend the platform_device 5On top of that an omap_device is created to extend the platform_device
6capabilities and to allow binding with one or several hwmods. 6capabilities and to allow binding with one or several hwmods.
7The hwmods will contain all the information to build the device: 7The hwmods will contain all the information to build the device:
8adresse range, irq lines, dma lines, interconnect, PRCM register, 8address range, irq lines, dma lines, interconnect, PRCM register,
9clock domain, input clocks. 9clock domain, input clocks.
10For the moment just point to the existing hwmod, the next step will be 10For the moment just point to the existing hwmod, the next step will be
11to move data from hwmod to device-tree representation. 11to move data from hwmod to device-tree representation.
@@ -41,3 +41,9 @@ Boards:
41 41
42- OMAP4 PandaBoard : Low cost community board 42- OMAP4 PandaBoard : Low cost community board
43 compatible = "ti,omap4-panda", "ti,omap4430" 43 compatible = "ti,omap4-panda", "ti,omap4430"
44
45- OMAP3 EVM : Software Developement Board for OMAP35x, AM/DM37x
46 compatible = "ti,omap3-evm", "ti,omap3"
47
48- AM335X EVM : Software Developement Board for AM335x
49 compatible = "ti,am335x-evm", "ti,am33xx", "ti,omap3"
diff --git a/Documentation/devicetree/bindings/arm/sirf.txt b/Documentation/devicetree/bindings/arm/sirf.txt
index 6b07f65b32de..1881e1c6dda5 100644
--- a/Documentation/devicetree/bindings/arm/sirf.txt
+++ b/Documentation/devicetree/bindings/arm/sirf.txt
@@ -1,3 +1,3 @@
1prima2 "cb" evalutation board 1prima2 "cb" evaluation board
2Required root node properties: 2Required root node properties:
3 - compatible = "sirf,prima2-cb", "sirf,prima2"; 3 - compatible = "sirf,prima2-cb", "sirf,prima2";
diff --git a/Documentation/devicetree/bindings/arm/spear.txt b/Documentation/devicetree/bindings/arm/spear.txt
new file mode 100644
index 000000000000..f8e54f092328
--- /dev/null
+++ b/Documentation/devicetree/bindings/arm/spear.txt
@@ -0,0 +1,8 @@
1ST SPEAr Platforms Device Tree Bindings
2---------------------------------------
3
4Boards with the ST SPEAr600 SoC shall have the following properties:
5
6Required root node property:
7
8compatible = "st,spear600";
diff --git a/Documentation/devicetree/bindings/arm/tegra/emc.txt b/Documentation/devicetree/bindings/arm/tegra/emc.txt
new file mode 100644
index 000000000000..09335f8eee00
--- /dev/null
+++ b/Documentation/devicetree/bindings/arm/tegra/emc.txt
@@ -0,0 +1,100 @@
1Embedded Memory Controller
2
3Properties:
4- name : Should be emc
5- #address-cells : Should be 1
6- #size-cells : Should be 0
7- compatible : Should contain "nvidia,tegra20-emc".
8- reg : Offset and length of the register set for the device
9- nvidia,use-ram-code : If present, the sub-nodes will be addressed
10 and chosen using the ramcode board selector. If omitted, only one
11 set of tables can be present and said tables will be used
12 irrespective of ram-code configuration.
13
14Child device nodes describe the memory settings for different configurations and clock rates.
15
16Example:
17
18 emc@7000f400 {
19 #address-cells = < 1 >;
20 #size-cells = < 0 >;
21 compatible = "nvidia,tegra20-emc";
22 reg = <0x7000f4000 0x200>;
23 }
24
25
26Embedded Memory Controller ram-code table
27
28If the emc node has the nvidia,use-ram-code property present, then the
29next level of nodes below the emc table are used to specify which settings
30apply for which ram-code settings.
31
32If the emc node lacks the nvidia,use-ram-code property, this level is omitted
33and the tables are stored directly under the emc node (see below).
34
35Properties:
36
37- name : Should be emc-tables
38- nvidia,ram-code : the binary representation of the ram-code board strappings
39 for which this node (and children) are valid.
40
41
42
43Embedded Memory Controller configuration table
44
45This is a table containing the EMC register settings for the various
46operating speeds of the memory controller. They are always located as
47subnodes of the emc controller node.
48
49There are two ways of specifying which tables to use:
50
51* The simplest is if there is just one set of tables in the device tree,
52 and they will always be used (based on which frequency is used).
53 This is the preferred method, especially when firmware can fill in
54 this information based on the specific system information and just
55 pass it on to the kernel.
56
57* The slightly more complex one is when more than one memory configuration
58 might exist on the system. The Tegra20 platform handles this during
59 early boot by selecting one out of possible 4 memory settings based
60 on a 2-pin "ram code" bootstrap setting on the board. The values of
61 these strappings can be read through a register in the SoC, and thus
62 used to select which tables to use.
63
64Properties:
65- name : Should be emc-table
66- compatible : Should contain "nvidia,tegra20-emc-table".
67- reg : either an opaque enumerator to tell different tables apart, or
68 the valid frequency for which the table should be used (in kHz).
69- clock-frequency : the clock frequency for the EMC at which this
70 table should be used (in kHz).
71- nvidia,emc-registers : a 46 word array of EMC registers to be programmed
72 for operation at the 'clock-frequency' setting.
73 The order and contents of the registers are:
74 RC, RFC, RAS, RP, R2W, W2R, R2P, W2P, RD_RCD, WR_RCD, RRD, REXT,
75 WDV, QUSE, QRST, QSAFE, RDV, REFRESH, BURST_REFRESH_NUM, PDEX2WR,
76 PDEX2RD, PCHG2PDEN, ACT2PDEN, AR2PDEN, RW2PDEN, TXSR, TCKE, TFAW,
77 TRPAB, TCLKSTABLE, TCLKSTOP, TREFBW, QUSE_EXTRA, FBIO_CFG6, ODT_WRITE,
78 ODT_READ, FBIO_CFG5, CFG_DIG_DLL, DLL_XFORM_DQS, DLL_XFORM_QUSE,
79 ZCAL_REF_CNT, ZCAL_WAIT_CNT, AUTO_CAL_INTERVAL, CFG_CLKTRIM_0,
80 CFG_CLKTRIM_1, CFG_CLKTRIM_2
81
82 emc-table@166000 {
83 reg = <166000>;
84 compatible = "nvidia,tegra20-emc-table";
85 clock-frequency = < 166000 >;
86 nvidia,emc-registers = < 0 0 0 0 0 0 0 0 0 0 0 0 0 0
87 0 0 0 0 0 0 0 0 0 0 0 0 0 0
88 0 0 0 0 0 0 0 0 0 0 0 0 0 0
89 0 0 0 0 >;
90 };
91
92 emc-table@333000 {
93 reg = <333000>;
94 compatible = "nvidia,tegra20-emc-table";
95 clock-frequency = < 333000 >;
96 nvidia,emc-registers = < 0 0 0 0 0 0 0 0 0 0 0 0 0 0
97 0 0 0 0 0 0 0 0 0 0 0 0 0 0
98 0 0 0 0 0 0 0 0 0 0 0 0 0 0
99 0 0 0 0 >;
100 };
diff --git a/Documentation/devicetree/bindings/arm/tegra/nvidia,tegra20-pmc.txt b/Documentation/devicetree/bindings/arm/tegra/nvidia,tegra20-pmc.txt
new file mode 100644
index 000000000000..b5846e21cc2e
--- /dev/null
+++ b/Documentation/devicetree/bindings/arm/tegra/nvidia,tegra20-pmc.txt
@@ -0,0 +1,19 @@
1NVIDIA Tegra Power Management Controller (PMC)
2
3Properties:
4- name : Should be pmc
5- compatible : Should contain "nvidia,tegra<chip>-pmc".
6- reg : Offset and length of the register set for the device
7- nvidia,invert-interrupt : If present, inverts the PMU interrupt signal.
8 The PMU is an external Power Management Unit, whose interrupt output
9 signal is fed into the PMC. This signal is optionally inverted, and then
10 fed into the ARM GIC. The PMC is not involved in the detection or
11 handling of this interrupt signal, merely its inversion.
12
13Example:
14
15pmc@7000f400 {
16 compatible = "nvidia,tegra20-pmc";
17 reg = <0x7000e400 0x400>;
18 nvidia,invert-interrupt;
19};
diff --git a/Documentation/devicetree/bindings/arm/twd.txt b/Documentation/devicetree/bindings/arm/twd.txt
new file mode 100644
index 000000000000..75b8610939fa
--- /dev/null
+++ b/Documentation/devicetree/bindings/arm/twd.txt
@@ -0,0 +1,48 @@
1* ARM Timer Watchdog
2
3ARM 11MP, Cortex-A5 and Cortex-A9 are often associated with a per-core
4Timer-Watchdog (aka TWD), which provides both a per-cpu local timer
5and watchdog.
6
7The TWD is usually attached to a GIC to deliver its two per-processor
8interrupts.
9
10** Timer node required properties:
11
12- compatible : Should be one of:
13 "arm,cortex-a9-twd-timer"
14 "arm,cortex-a5-twd-timer"
15 "arm,arm11mp-twd-timer"
16
17- interrupts : One interrupt to each core
18
19- reg : Specify the base address and the size of the TWD timer
20 register window.
21
22Example:
23
24 twd-timer@2c000600 {
25 compatible = "arm,arm11mp-twd-timer"";
26 reg = <0x2c000600 0x20>;
27 interrupts = <1 13 0xf01>;
28 };
29
30** Watchdog node properties:
31
32- compatible : Should be one of:
33 "arm,cortex-a9-twd-wdt"
34 "arm,cortex-a5-twd-wdt"
35 "arm,arm11mp-twd-wdt"
36
37- interrupts : One interrupt to each core
38
39- reg : Specify the base address and the size of the TWD watchdog
40 register window.
41
42Example:
43
44 twd-watchdog@2c000620 {
45 compatible = "arm,arm11mp-twd-wdt";
46 reg = <0x2c000620 0x20>;
47 interrupts = <1 14 0xf01>;
48 };
diff --git a/Documentation/devicetree/bindings/arm/vexpress.txt b/Documentation/devicetree/bindings/arm/vexpress.txt
new file mode 100644
index 000000000000..ec8b50cbb2e8
--- /dev/null
+++ b/Documentation/devicetree/bindings/arm/vexpress.txt
@@ -0,0 +1,146 @@
1ARM Versatile Express boards family
2-----------------------------------
3
4ARM's Versatile Express platform consists of a motherboard and one
5or more daughterboards (tiles). The motherboard provides a set of
6peripherals. Processor and RAM "live" on the tiles.
7
8The motherboard and each core tile should be described by a separate
9Device Tree source file, with the tile's description including
10the motherboard file using a /include/ directive. As the motherboard
11can be initialized in one of two different configurations ("memory
12maps"), care must be taken to include the correct one.
13
14Required properties in the root node:
15- compatible value:
16 compatible = "arm,vexpress,<model>", "arm,vexpress";
17 where <model> is the full tile model name (as used in the tile's
18 Technical Reference Manual), eg.:
19 - for Coretile Express A5x2 (V2P-CA5s):
20 compatible = "arm,vexpress,v2p-ca5s", "arm,vexpress";
21 - for Coretile Express A9x4 (V2P-CA9):
22 compatible = "arm,vexpress,v2p-ca9", "arm,vexpress";
23 If a tile comes in several variants or can be used in more then one
24 configuration, the compatible value should be:
25 compatible = "arm,vexpress,<model>,<variant>", \
26 "arm,vexpress,<model>", "arm,vexpress";
27 eg:
28 - Coretile Express A15x2 (V2P-CA15) with Tech Chip 1:
29 compatible = "arm,vexpress,v2p-ca15,tc1", \
30 "arm,vexpress,v2p-ca15", "arm,vexpress";
31 - LogicTile Express 13MG (V2F-2XV6) running Cortex-A7 (3 cores) SMM:
32 compatible = "arm,vexpress,v2f-2xv6,ca7x3", \
33 "arm,vexpress,v2f-2xv6", "arm,vexpress";
34
35Optional properties in the root node:
36- tile model name (use name from the tile's Technical Reference
37 Manual, eg. "V2P-CA5s")
38 model = "<model>";
39- tile's HBI number (unique ARM's board model ID, visible on the
40 PCB's silkscreen) in hexadecimal transcription:
41 arm,hbi = <0xhbi>
42 eg:
43 - for Coretile Express A5x2 (V2P-CA5s) HBI-0191:
44 arm,hbi = <0x191>;
45 - Coretile Express A9x4 (V2P-CA9) HBI-0225:
46 arm,hbi = <0x225>;
47
48Top-level standard "cpus" node is required. It must contain a node
49with device_type = "cpu" property for every available core, eg.:
50
51 cpus {
52 #address-cells = <1>;
53 #size-cells = <0>;
54
55 cpu@0 {
56 device_type = "cpu";
57 compatible = "arm,cortex-a5";
58 reg = <0>;
59 };
60 };
61
62The motherboard description file provides a single "motherboard" node
63using 2 address cells corresponding to the Static Memory Bus used
64between the motherboard and the tile. The first cell defines the Chip
65Select (CS) line number, the second cell address offset within the CS.
66All interrupt lines between the motherboard and the tile are active
67high and are described using single cell.
68
69Optional properties of the "motherboard" node:
70- motherboard's memory map variant:
71 arm,v2m-memory-map = "<name>";
72 where name is one of:
73 - "rs1" - for RS1 map (i.a. peripherals on CS3); this map is also
74 referred to as "ARM Cortex-A Series memory map":
75 arm,v2m-memory-map = "rs1";
76 When this property is missing, the motherboard is using the original
77 memory map (also known as the "Legacy memory map", primarily used
78 with the original CoreTile Express A9x4) with peripherals on CS7.
79
80Motherboard .dtsi files provide a set of labelled peripherals that
81can be used to obtain required phandle in the tile's "aliases" node:
82- UARTs, note that the numbers correspond to the physical connectors
83 on the motherboard's back panel:
84 v2m_serial0, v2m_serial1, v2m_serial2 and v2m_serial3
85- I2C controllers:
86 v2m_i2c_dvi and v2m_i2c_pcie
87- SP804 timers:
88 v2m_timer01 and v2m_timer23
89
90Current Linux implementation requires a "arm,v2m_timer" alias
91pointing at one of the motherboard's SP804 timers, if it is to be
92used as the system timer. This alias should be defined in the
93motherboard files.
94
95The tile description must define "ranges", "interrupt-map-mask" and
96"interrupt-map" properties to translate the motherboard's address
97and interrupt space into one used by the tile's processor.
98
99Abbreviated example:
100
101/dts-v1/;
102
103/ {
104 model = "V2P-CA5s";
105 arm,hbi = <0x225>;
106 compatible = "arm,vexpress-v2p-ca5s", "arm,vexpress";
107 interrupt-parent = <&gic>;
108 #address-cells = <1>;
109 #size-cells = <1>;
110
111 chosen { };
112
113 aliases {
114 serial0 = &v2m_serial0;
115 };
116
117 cpus {
118 #address-cells = <1>;
119 #size-cells = <0>;
120
121 cpu@0 {
122 device_type = "cpu";
123 compatible = "arm,cortex-a5";
124 reg = <0>;
125 };
126 };
127
128 gic: interrupt-controller@2c001000 {
129 compatible = "arm,cortex-a9-gic";
130 #interrupt-cells = <3>;
131 #address-cells = <0>;
132 interrupt-controller;
133 reg = <0x2c001000 0x1000>,
134 <0x2c000100 0x100>;
135 };
136
137 motherboard {
138 /* CS0 is visible at 0x08000000 */
139 ranges = <0 0 0x08000000 0x04000000>;
140 interrupt-map-mask = <0 0 63>;
141 /* Active high IRQ 0 is connected to GIC's SPI0 */
142 interrupt-map = <0 0 0 &gic 0 0 4>;
143 };
144};
145
146/include/ "vexpress-v2m-rs1.dtsi"
diff --git a/Documentation/devicetree/bindings/dma/tegra20-apbdma.txt b/Documentation/devicetree/bindings/dma/tegra20-apbdma.txt
new file mode 100644
index 000000000000..90fa7da525b8
--- /dev/null
+++ b/Documentation/devicetree/bindings/dma/tegra20-apbdma.txt
@@ -0,0 +1,30 @@
1* NVIDIA Tegra APB DMA controller
2
3Required properties:
4- compatible: Should be "nvidia,<chip>-apbdma"
5- reg: Should contain DMA registers location and length. This shuld include
6 all of the per-channel registers.
7- interrupts: Should contain all of the per-channel DMA interrupts.
8
9Examples:
10
11apbdma: dma@6000a000 {
12 compatible = "nvidia,tegra20-apbdma";
13 reg = <0x6000a000 0x1200>;
14 interrupts = < 0 136 0x04
15 0 137 0x04
16 0 138 0x04
17 0 139 0x04
18 0 140 0x04
19 0 141 0x04
20 0 142 0x04
21 0 143 0x04
22 0 144 0x04
23 0 145 0x04
24 0 146 0x04
25 0 147 0x04
26 0 148 0x04
27 0 149 0x04
28 0 150 0x04
29 0 151 0x04 >;
30};
diff --git a/Documentation/devicetree/bindings/gpio/gpio-omap.txt b/Documentation/devicetree/bindings/gpio/gpio-omap.txt
new file mode 100644
index 000000000000..bff51a2fee1e
--- /dev/null
+++ b/Documentation/devicetree/bindings/gpio/gpio-omap.txt
@@ -0,0 +1,36 @@
1OMAP GPIO controller bindings
2
3Required properties:
4- compatible:
5 - "ti,omap2-gpio" for OMAP2 controllers
6 - "ti,omap3-gpio" for OMAP3 controllers
7 - "ti,omap4-gpio" for OMAP4 controllers
8- #gpio-cells : Should be two.
9 - first cell is the pin number
10 - second cell is used to specify optional parameters (unused)
11- gpio-controller : Marks the device node as a GPIO controller.
12- #interrupt-cells : Should be 2.
13- interrupt-controller: Mark the device node as an interrupt controller
14 The first cell is the GPIO number.
15 The second cell is used to specify flags:
16 bits[3:0] trigger type and level flags:
17 1 = low-to-high edge triggered.
18 2 = high-to-low edge triggered.
19 4 = active high level-sensitive.
20 8 = active low level-sensitive.
21
22OMAP specific properties:
23- ti,hwmods: Name of the hwmod associated to the GPIO:
24 "gpio<X>", <X> being the 1-based instance number from the HW spec
25
26
27Example:
28
29gpio4: gpio4 {
30 compatible = "ti,omap4-gpio";
31 ti,hwmods = "gpio4";
32 #gpio-cells = <2>;
33 gpio-controller;
34 #interrupt-cells = <2>;
35 interrupt-controller;
36};
diff --git a/Documentation/devicetree/bindings/gpio/gpio-twl4030.txt b/Documentation/devicetree/bindings/gpio/gpio-twl4030.txt
new file mode 100644
index 000000000000..16695d9cf1e8
--- /dev/null
+++ b/Documentation/devicetree/bindings/gpio/gpio-twl4030.txt
@@ -0,0 +1,23 @@
1twl4030 GPIO controller bindings
2
3Required properties:
4- compatible:
5 - "ti,twl4030-gpio" for twl4030 GPIO controller
6- #gpio-cells : Should be two.
7 - first cell is the pin number
8 - second cell is used to specify optional parameters (unused)
9- gpio-controller : Marks the device node as a GPIO controller.
10- #interrupt-cells : Should be 2.
11- interrupt-controller: Mark the device node as an interrupt controller
12 The first cell is the GPIO number.
13 The second cell is not used.
14
15Example:
16
17twl_gpio: gpio {
18 compatible = "ti,twl4030-gpio";
19 #gpio-cells = <2>;
20 gpio-controller;
21 #interrupt-cells = <2>;
22 interrupt-controller;
23};
diff --git a/Documentation/devicetree/bindings/gpio/gpio_atmel.txt b/Documentation/devicetree/bindings/gpio/gpio_atmel.txt
new file mode 100644
index 000000000000..66efc804806a
--- /dev/null
+++ b/Documentation/devicetree/bindings/gpio/gpio_atmel.txt
@@ -0,0 +1,20 @@
1* Atmel GPIO controller (PIO)
2
3Required properties:
4- compatible: "atmel,<chip>-gpio", where <chip> is at91rm9200 or at91sam9x5.
5- reg: Should contain GPIO controller registers location and length
6- interrupts: Should be the port interrupt shared by all the pins.
7- #gpio-cells: Should be two. The first cell is the pin number and
8 the second cell is used to specify optional parameters (currently
9 unused).
10- gpio-controller: Marks the device node as a GPIO controller.
11
12Example:
13 pioA: gpio@fffff200 {
14 compatible = "atmel,at91rm9200-gpio";
15 reg = <0xfffff200 0x100>;
16 interrupts = <2 4>;
17 #gpio-cells = <2>;
18 gpio-controller;
19 };
20
diff --git a/Documentation/devicetree/bindings/gpio/gpio_i2c.txt b/Documentation/devicetree/bindings/gpio/gpio_i2c.txt
new file mode 100644
index 000000000000..4f8ec947c6bd
--- /dev/null
+++ b/Documentation/devicetree/bindings/gpio/gpio_i2c.txt
@@ -0,0 +1,32 @@
1Device-Tree bindings for i2c gpio driver
2
3Required properties:
4 - compatible = "i2c-gpio";
5 - gpios: sda and scl gpio
6
7
8Optional properties:
9 - i2c-gpio,sda-open-drain: sda as open drain
10 - i2c-gpio,scl-open-drain: scl as open drain
11 - i2c-gpio,scl-output-only: scl as output only
12 - i2c-gpio,delay-us: delay between GPIO operations (may depend on each platform)
13 - i2c-gpio,timeout-ms: timeout to get data
14
15Example nodes:
16
17i2c@0 {
18 compatible = "i2c-gpio";
19 gpios = <&pioA 23 0 /* sda */
20 &pioA 24 0 /* scl */
21 >;
22 i2c-gpio,sda-open-drain;
23 i2c-gpio,scl-open-drain;
24 i2c-gpio,delay-us = <2>; /* ~100 kHz */
25 #address-cells = <1>;
26 #size-cells = <0>;
27
28 rv3029c2@56 {
29 compatible = "rv3029c2";
30 reg = <0x56>;
31 };
32};
diff --git a/Documentation/devicetree/bindings/gpio/gpio_nvidia.txt b/Documentation/devicetree/bindings/gpio/gpio_nvidia.txt
index eb4b530d64e1..023c9526e5f8 100644
--- a/Documentation/devicetree/bindings/gpio/gpio_nvidia.txt
+++ b/Documentation/devicetree/bindings/gpio/gpio_nvidia.txt
@@ -1,8 +1,40 @@
1NVIDIA Tegra 2 GPIO controller 1NVIDIA Tegra GPIO controller
2 2
3Required properties: 3Required properties:
4- compatible : "nvidia,tegra20-gpio" 4- compatible : "nvidia,tegra<chip>-gpio"
5- reg : Physical base address and length of the controller's registers.
6- interrupts : The interrupt outputs from the controller. For Tegra20,
7 there should be 7 interrupts specified, and for Tegra30, there should
8 be 8 interrupts specified.
5- #gpio-cells : Should be two. The first cell is the pin number and the 9- #gpio-cells : Should be two. The first cell is the pin number and the
6 second cell is used to specify optional parameters: 10 second cell is used to specify optional parameters:
7 - bit 0 specifies polarity (0 for normal, 1 for inverted) 11 - bit 0 specifies polarity (0 for normal, 1 for inverted)
8- gpio-controller : Marks the device node as a GPIO controller. 12- gpio-controller : Marks the device node as a GPIO controller.
13- #interrupt-cells : Should be 2.
14 The first cell is the GPIO number.
15 The second cell is used to specify flags:
16 bits[3:0] trigger type and level flags:
17 1 = low-to-high edge triggered.
18 2 = high-to-low edge triggered.
19 4 = active high level-sensitive.
20 8 = active low level-sensitive.
21 Valid combinations are 1, 2, 3, 4, 8.
22- interrupt-controller : Marks the device node as an interrupt controller.
23
24Example:
25
26gpio: gpio@6000d000 {
27 compatible = "nvidia,tegra20-gpio";
28 reg = < 0x6000d000 0x1000 >;
29 interrupts = < 0 32 0x04
30 0 33 0x04
31 0 34 0x04
32 0 35 0x04
33 0 55 0x04
34 0 87 0x04
35 0 89 0x04 >;
36 #gpio-cells = <2>;
37 gpio-controller;
38 #interrupt-cells = <2>;
39 interrupt-controller;
40};
diff --git a/Documentation/devicetree/bindings/gpio/led.txt b/Documentation/devicetree/bindings/gpio/led.txt
index 141087cf3107..fd2bd56e7195 100644
--- a/Documentation/devicetree/bindings/gpio/led.txt
+++ b/Documentation/devicetree/bindings/gpio/led.txt
@@ -7,9 +7,9 @@ Each LED is represented as a sub-node of the gpio-leds device. Each
7node's name represents the name of the corresponding LED. 7node's name represents the name of the corresponding LED.
8 8
9LED sub-node properties: 9LED sub-node properties:
10- gpios : Should specify the LED's GPIO, see "Specifying GPIO information 10- gpios : Should specify the LED's GPIO, see "gpios property" in
11 for devices" in Documentation/devicetree/booting-without-of.txt. Active 11 Documentation/devicetree/gpio.txt. Active low LEDs should be
12 low LEDs should be indicated using flags in the GPIO specifier. 12 indicated using flags in the GPIO specifier.
13- label : (optional) The label for this LED. If omitted, the label is 13- label : (optional) The label for this LED. If omitted, the label is
14 taken from the node name (excluding the unit address). 14 taken from the node name (excluding the unit address).
15- linux,default-trigger : (optional) This parameter, if present, is a 15- linux,default-trigger : (optional) This parameter, if present, is a
diff --git a/Documentation/devicetree/bindings/gpio/mrvl-gpio.txt b/Documentation/devicetree/bindings/gpio/mrvl-gpio.txt
new file mode 100644
index 000000000000..1e34cfe5ebea
--- /dev/null
+++ b/Documentation/devicetree/bindings/gpio/mrvl-gpio.txt
@@ -0,0 +1,23 @@
1* Marvell PXA GPIO controller
2
3Required properties:
4- compatible : Should be "mrvl,pxa-gpio" or "mrvl,mmp-gpio"
5- reg : Address and length of the register set for the device
6- interrupts : Should be the port interrupt shared by all gpio pins, if
7- interrupt-name : Should be the name of irq resource.
8 one number.
9- gpio-controller : Marks the device node as a gpio controller.
10- #gpio-cells : Should be one. It is the pin number.
11
12Example:
13
14 gpio: gpio@d4019000 {
15 compatible = "mrvl,mmp-gpio", "mrvl,pxa-gpio";
16 reg = <0xd4019000 0x1000>;
17 interrupts = <49>, <17>, <18>;
18 interrupt-name = "gpio_mux", "gpio0", "gpio1";
19 gpio-controller;
20 #gpio-cells = <1>;
21 interrupt-controller;
22 #interrupt-cells = <1>;
23 };
diff --git a/Documentation/devicetree/bindings/gpio/sodaville.txt b/Documentation/devicetree/bindings/gpio/sodaville.txt
new file mode 100644
index 000000000000..563eff22b975
--- /dev/null
+++ b/Documentation/devicetree/bindings/gpio/sodaville.txt
@@ -0,0 +1,48 @@
1GPIO controller on CE4100 / Sodaville SoCs
2==========================================
3
4The bindings for CE4100's GPIO controller match the generic description
5which is covered by the gpio.txt file in this folder.
6
7The only additional property is the intel,muxctl property which holds the
8value which is written into the MUXCNTL register.
9
10There is no compatible property for now because the driver is probed via
11PCI id (vendor 0x8086 device 0x2e67).
12
13The interrupt specifier consists of two cells encoded as follows:
14 - <1st cell>: The interrupt-number that identifies the interrupt source.
15 - <2nd cell>: The level-sense information, encoded as follows:
16 4 - active high level-sensitive
17 8 - active low level-sensitive
18
19Example of the GPIO device and one user:
20
21 pcigpio: gpio@b,1 {
22 /* two cells for GPIO and interrupt */
23 #gpio-cells = <2>;
24 #interrupt-cells = <2>;
25 compatible = "pci8086,2e67.2",
26 "pci8086,2e67",
27 "pciclassff0000",
28 "pciclassff00";
29
30 reg = <0x15900 0x0 0x0 0x0 0x0>;
31 /* Interrupt line of the gpio device */
32 interrupts = <15 1>;
33 /* It is an interrupt and GPIO controller itself */
34 interrupt-controller;
35 gpio-controller;
36 intel,muxctl = <0>;
37 };
38
39 testuser@20 {
40 compatible = "example,testuser";
41 /* User the 11th GPIO line as an active high triggered
42 * level interrupt
43 */
44 interrupts = <11 8>;
45 interrupt-parent = <&pcigpio>;
46 /* Use this GPIO also with the gpio functions */
47 gpios = <&pcigpio 11 0>;
48 };
diff --git a/Documentation/devicetree/bindings/i2c/mrvl-i2c.txt b/Documentation/devicetree/bindings/i2c/mrvl-i2c.txt
new file mode 100644
index 000000000000..071eb3caae91
--- /dev/null
+++ b/Documentation/devicetree/bindings/i2c/mrvl-i2c.txt
@@ -0,0 +1,37 @@
1* I2C
2
3Required properties :
4
5 - reg : Offset and length of the register set for the device
6 - compatible : should be "mrvl,mmp-twsi" where CHIP is the name of a
7 compatible processor, e.g. pxa168, pxa910, mmp2, mmp3.
8 For the pxa2xx/pxa3xx, an additional node "mrvl,pxa-i2c" is required
9 as shown in the example below.
10
11Recommended properties :
12
13 - interrupts : <a b> where a is the interrupt number and b is a
14 field that represents an encoding of the sense and level
15 information for the interrupt. This should be encoded based on
16 the information in section 2) depending on the type of interrupt
17 controller you have.
18 - interrupt-parent : the phandle for the interrupt controller that
19 services interrupts for this device.
20 - mrvl,i2c-polling : Disable interrupt of i2c controller. Polling
21 status register of i2c controller instead.
22 - mrvl,i2c-fast-mode : Enable fast mode of i2c controller.
23
24Examples:
25 twsi1: i2c@d4011000 {
26 compatible = "mrvl,mmp-twsi", "mrvl,pxa-i2c";
27 reg = <0xd4011000 0x1000>;
28 interrupts = <7>;
29 mrvl,i2c-fast-mode;
30 };
31
32 twsi2: i2c@d4025000 {
33 compatible = "mrvl,mmp-twsi", "mrvl,pxa-i2c";
34 reg = <0xd4025000 0x1000>;
35 interrupts = <58>;
36 };
37
diff --git a/Documentation/devicetree/bindings/i2c/sirf-i2c.txt b/Documentation/devicetree/bindings/i2c/sirf-i2c.txt
new file mode 100644
index 000000000000..7baf9e133fa8
--- /dev/null
+++ b/Documentation/devicetree/bindings/i2c/sirf-i2c.txt
@@ -0,0 +1,19 @@
1I2C for SiRFprimaII platforms
2
3Required properties :
4- compatible : Must be "sirf,prima2-i2c"
5- reg: physical base address of the controller and length of memory mapped
6 region.
7- interrupts: interrupt number to the cpu.
8
9Optional properties:
10- clock-frequency : Constains desired I2C/HS-I2C bus clock frequency in Hz.
11 The absence of the propoerty indicates the default frequency 100 kHz.
12
13Examples :
14
15i2c0: i2c@b00e0000 {
16 compatible = "sirf,prima2-i2c";
17 reg = <0xb00e0000 0x10000>;
18 interrupts = <24>;
19};
diff --git a/Documentation/devicetree/bindings/input/matrix-keymap.txt b/Documentation/devicetree/bindings/input/matrix-keymap.txt
new file mode 100644
index 000000000000..3cd8b98ccd2d
--- /dev/null
+++ b/Documentation/devicetree/bindings/input/matrix-keymap.txt
@@ -0,0 +1,19 @@
1A simple common binding for matrix-connected key boards. Currently targeted at
2defining the keys in the scope of linux key codes since that is a stable and
3standardized interface at this time.
4
5Required properties:
6- linux,keymap: an array of packed 1-cell entries containing the equivalent
7 of row, column and linux key-code. The 32-bit big endian cell is packed
8 as:
9 row << 24 | column << 16 | key-code
10
11Optional properties:
12Some users of this binding might choose to specify secondary keymaps for
13cases where there is a modifier key such as a Fn key. Proposed names
14for said properties are "linux,fn-keymap" or with another descriptive
15word for the modifier other from "Fn".
16
17Example:
18 linux,keymap = < 0x00030012
19 0x0102003a >;
diff --git a/Documentation/devicetree/bindings/input/tegra-kbc.txt b/Documentation/devicetree/bindings/input/tegra-kbc.txt
index 5ecfa99089b4..72683be6de35 100644
--- a/Documentation/devicetree/bindings/input/tegra-kbc.txt
+++ b/Documentation/devicetree/bindings/input/tegra-kbc.txt
@@ -3,16 +3,21 @@
3Required properties: 3Required properties:
4- compatible: "nvidia,tegra20-kbc" 4- compatible: "nvidia,tegra20-kbc"
5 5
6Optional properties: 6Optional properties, in addition to those specified by the shared
7- debounce-delay: delay in milliseconds per row scan for debouncing 7matrix-keyboard bindings:
8- repeat-delay: delay in milliseconds before repeat starts 8
9- ghost-filter: enable ghost filtering for this device 9- linux,fn-keymap: a second keymap, same specification as the
10- wakeup-source: configure keyboard as a wakeup source for suspend/resume 10 matrix-keyboard-controller spec but to be used when the KEY_FN modifier
11 key is pressed.
12- nvidia,debounce-delay-ms: delay in milliseconds per row scan for debouncing
13- nvidia,repeat-delay-ms: delay in milliseconds before repeat starts
14- nvidia,ghost-filter: enable ghost filtering for this device
15- nvidia,wakeup-source: configure keyboard as a wakeup source for suspend/resume
11 16
12Example: 17Example:
13 18
14keyboard: keyboard { 19keyboard: keyboard {
15 compatible = "nvidia,tegra20-kbc"; 20 compatible = "nvidia,tegra20-kbc";
16 reg = <0x7000e200 0x100>; 21 reg = <0x7000e200 0x100>;
17 ghost-filter; 22 nvidia,ghost-filter;
18}; 23};
diff --git a/Documentation/devicetree/bindings/mmc/ti-omap-hsmmc.txt b/Documentation/devicetree/bindings/mmc/ti-omap-hsmmc.txt
new file mode 100644
index 000000000000..dbd4368ab8cc
--- /dev/null
+++ b/Documentation/devicetree/bindings/mmc/ti-omap-hsmmc.txt
@@ -0,0 +1,33 @@
1* TI Highspeed MMC host controller for OMAP
2
3The Highspeed MMC Host Controller on TI OMAP family
4provides an interface for MMC, SD, and SDIO types of memory cards.
5
6Required properties:
7- compatible:
8 Should be "ti,omap2-hsmmc", for OMAP2 controllers
9 Should be "ti,omap3-hsmmc", for OMAP3 controllers
10 Should be "ti,omap4-hsmmc", for OMAP4 controllers
11- ti,hwmods: Must be "mmc<n>", n is controller instance starting 1
12- reg : should contain hsmmc registers location and length
13
14Optional properties:
15ti,dual-volt: boolean, supports dual voltage cards
16<supply-name>-supply: phandle to the regulator device tree node
17"supply-name" examples are "vmmc", "vmmc_aux" etc
18ti,bus-width: Number of data lines, default assumed is 1 if the property is missing.
19cd-gpios: GPIOs for card detection
20wp-gpios: GPIOs for write protection
21ti,non-removable: non-removable slot (like eMMC)
22ti,needs-special-reset: Requires a special softreset sequence
23
24Example:
25 mmc1: mmc@0x4809c000 {
26 compatible = "ti,omap4-hsmmc";
27 reg = <0x4809c000 0x400>;
28 ti,hwmods = "mmc1";
29 ti,dual-volt;
30 ti,bus-width = <4>;
31 vmmc-supply = <&vmmc>; /* phandle to regulator node */
32 ti,non-removable;
33 };
diff --git a/Documentation/devicetree/bindings/mtd/arm-versatile.txt b/Documentation/devicetree/bindings/mtd/arm-versatile.txt
index 476845db94d0..beace4b89daa 100644
--- a/Documentation/devicetree/bindings/mtd/arm-versatile.txt
+++ b/Documentation/devicetree/bindings/mtd/arm-versatile.txt
@@ -4,5 +4,5 @@ Required properties:
4- compatible : must be "arm,versatile-flash"; 4- compatible : must be "arm,versatile-flash";
5- bank-width : width in bytes of flash interface. 5- bank-width : width in bytes of flash interface.
6 6
7Optional properties: 7The device tree may optionally contain sub-nodes describing partitions of the
8- Subnode partition map from mtd flash binding 8address space. See partition.txt for more detail.
diff --git a/Documentation/devicetree/bindings/mtd/atmel-dataflash.txt b/Documentation/devicetree/bindings/mtd/atmel-dataflash.txt
index ef66ddd01da0..1889a4db5b7c 100644
--- a/Documentation/devicetree/bindings/mtd/atmel-dataflash.txt
+++ b/Documentation/devicetree/bindings/mtd/atmel-dataflash.txt
@@ -3,6 +3,9 @@
3Required properties: 3Required properties:
4- compatible : "atmel,<model>", "atmel,<series>", "atmel,dataflash". 4- compatible : "atmel,<model>", "atmel,<series>", "atmel,dataflash".
5 5
6The device tree may optionally contain sub-nodes describing partitions of the
7address space. See partition.txt for more detail.
8
6Example: 9Example:
7 10
8flash@1 { 11flash@1 {
diff --git a/Documentation/devicetree/bindings/mtd/atmel-nand.txt b/Documentation/devicetree/bindings/mtd/atmel-nand.txt
new file mode 100644
index 000000000000..5903ecf6e895
--- /dev/null
+++ b/Documentation/devicetree/bindings/mtd/atmel-nand.txt
@@ -0,0 +1,41 @@
1Atmel NAND flash
2
3Required properties:
4- compatible : "atmel,at91rm9200-nand".
5- reg : should specify localbus address and size used for the chip,
6 and if availlable the ECC.
7- atmel,nand-addr-offset : offset for the address latch.
8- atmel,nand-cmd-offset : offset for the command latch.
9- #address-cells, #size-cells : Must be present if the device has sub-nodes
10 representing partitions.
11
12- gpios : specifies the gpio pins to control the NAND device. detect is an
13 optional gpio and may be set to 0 if not present.
14
15Optional properties:
16- nand-ecc-mode : String, operation mode of the NAND ecc mode, soft by default.
17 Supported values are: "none", "soft", "hw", "hw_syndrome", "hw_oob_first",
18 "soft_bch".
19- nand-bus-width : 8 or 16 bus width if not present 8
20- nand-on-flash-bbt: boolean to enable on flash bbt option if not present false
21
22Examples:
23nand0: nand@40000000,0 {
24 compatible = "atmel,at91rm9200-nand";
25 #address-cells = <1>;
26 #size-cells = <1>;
27 reg = <0x40000000 0x10000000
28 0xffffe800 0x200
29 >;
30 atmel,nand-addr-offset = <21>;
31 atmel,nand-cmd-offset = <22>;
32 nand-on-flash-bbt;
33 nand-ecc-mode = "soft";
34 gpios = <&pioC 13 0
35 &pioC 14 0
36 0
37 >;
38 partition@0 {
39 ...
40 };
41};
diff --git a/Documentation/devicetree/bindings/mtd/fsl-upm-nand.txt b/Documentation/devicetree/bindings/mtd/fsl-upm-nand.txt
index 00f1f546b32e..fce4894f5a98 100644
--- a/Documentation/devicetree/bindings/mtd/fsl-upm-nand.txt
+++ b/Documentation/devicetree/bindings/mtd/fsl-upm-nand.txt
@@ -19,6 +19,10 @@ Optional properties:
19 read registers (tR). Required if property "gpios" is not used 19 read registers (tR). Required if property "gpios" is not used
20 (R/B# pins not connected). 20 (R/B# pins not connected).
21 21
22Each flash chip described may optionally contain additional sub-nodes
23describing partitions of the address space. See partition.txt for more
24detail.
25
22Examples: 26Examples:
23 27
24upm@1,0 { 28upm@1,0 {
diff --git a/Documentation/devicetree/bindings/mtd/fsmc-nand.txt b/Documentation/devicetree/bindings/mtd/fsmc-nand.txt
new file mode 100644
index 000000000000..e2c663b354d2
--- /dev/null
+++ b/Documentation/devicetree/bindings/mtd/fsmc-nand.txt
@@ -0,0 +1,33 @@
1* FSMC NAND
2
3Required properties:
4- compatible : "st,spear600-fsmc-nand"
5- reg : Address range of the mtd chip
6- reg-names: Should contain the reg names "fsmc_regs" and "nand_data"
7- st,ale-off : Chip specific offset to ALE
8- st,cle-off : Chip specific offset to CLE
9
10Optional properties:
11- bank-width : Width (in bytes) of the device. If not present, the width
12 defaults to 1 byte
13- nand-skip-bbtscan: Indicates the the BBT scanning should be skipped
14
15Example:
16
17 fsmc: flash@d1800000 {
18 compatible = "st,spear600-fsmc-nand";
19 #address-cells = <1>;
20 #size-cells = <1>;
21 reg = <0xd1800000 0x1000 /* FSMC Register */
22 0xd2000000 0x4000>; /* NAND Base */
23 reg-names = "fsmc_regs", "nand_data";
24 st,ale-off = <0x20000>;
25 st,cle-off = <0x10000>;
26
27 bank-width = <1>;
28 nand-skip-bbtscan;
29
30 partition@0 {
31 ...
32 };
33 };
diff --git a/Documentation/devicetree/bindings/mtd/gpio-control-nand.txt b/Documentation/devicetree/bindings/mtd/gpio-control-nand.txt
index 719f4dc58df7..36ef07d3c90f 100644
--- a/Documentation/devicetree/bindings/mtd/gpio-control-nand.txt
+++ b/Documentation/devicetree/bindings/mtd/gpio-control-nand.txt
@@ -25,6 +25,9 @@ Optional properties:
25 GPIO state and before and after command byte writes, this register will be 25 GPIO state and before and after command byte writes, this register will be
26 read to ensure that the GPIO accesses have completed. 26 read to ensure that the GPIO accesses have completed.
27 27
28The device tree may optionally contain sub-nodes describing partitions of the
29address space. See partition.txt for more detail.
30
28Examples: 31Examples:
29 32
30gpio-nand@1,0 { 33gpio-nand@1,0 {
diff --git a/Documentation/devicetree/bindings/mtd/mtd-physmap.txt b/Documentation/devicetree/bindings/mtd/mtd-physmap.txt
index 80152cb567d9..a63c2bd7de2b 100644
--- a/Documentation/devicetree/bindings/mtd/mtd-physmap.txt
+++ b/Documentation/devicetree/bindings/mtd/mtd-physmap.txt
@@ -23,27 +23,8 @@ are defined:
23 - vendor-id : Contains the flash chip's vendor id (1 byte). 23 - vendor-id : Contains the flash chip's vendor id (1 byte).
24 - device-id : Contains the flash chip's device id (1 byte). 24 - device-id : Contains the flash chip's device id (1 byte).
25 25
26In addition to the information on the mtd bank itself, the 26The device tree may optionally contain sub-nodes describing partitions of the
27device tree may optionally contain additional information 27address space. See partition.txt for more detail.
28describing partitions of the address space. This can be
29used on platforms which have strong conventions about which
30portions of a flash are used for what purposes, but which don't
31use an on-flash partition table such as RedBoot.
32
33Each partition is represented as a sub-node of the mtd device.
34Each node's name represents the name of the corresponding
35partition of the mtd device.
36
37Flash partitions
38 - reg : The partition's offset and size within the mtd bank.
39 - label : (optional) The label / name for this partition.
40 If omitted, the label is taken from the node name (excluding
41 the unit address).
42 - read-only : (optional) This parameter, if present, is a hint to
43 Linux that this partition should only be mounted
44 read-only. This is usually used for flash partitions
45 containing early-boot firmware images or data which should not
46 be clobbered.
47 28
48Example: 29Example:
49 30
diff --git a/Documentation/devicetree/bindings/mtd/nand.txt b/Documentation/devicetree/bindings/mtd/nand.txt
new file mode 100644
index 000000000000..03855c8c492a
--- /dev/null
+++ b/Documentation/devicetree/bindings/mtd/nand.txt
@@ -0,0 +1,7 @@
1* MTD generic binding
2
3- nand-ecc-mode : String, operation mode of the NAND ecc mode.
4 Supported values are: "none", "soft", "hw", "hw_syndrome", "hw_oob_first",
5 "soft_bch".
6- nand-bus-width : 8 or 16 bus width if not present 8
7- nand-on-flash-bbt: boolean to enable on flash bbt option if not present false
diff --git a/Documentation/devicetree/bindings/mtd/partition.txt b/Documentation/devicetree/bindings/mtd/partition.txt
new file mode 100644
index 000000000000..f114ce1657c2
--- /dev/null
+++ b/Documentation/devicetree/bindings/mtd/partition.txt
@@ -0,0 +1,38 @@
1Representing flash partitions in devicetree
2
3Partitions can be represented by sub-nodes of an mtd device. This can be used
4on platforms which have strong conventions about which portions of a flash are
5used for what purposes, but which don't use an on-flash partition table such
6as RedBoot.
7
8#address-cells & #size-cells must both be present in the mtd device and be
9equal to 1.
10
11Required properties:
12- reg : The partition's offset and size within the mtd bank.
13
14Optional properties:
15- label : The label / name for this partition. If omitted, the label is taken
16 from the node name (excluding the unit address).
17- read-only : This parameter, if present, is a hint to Linux that this
18 partition should only be mounted read-only. This is usually used for flash
19 partitions containing early-boot firmware images or data which should not be
20 clobbered.
21
22Examples:
23
24
25flash@0 {
26 #address-cells = <1>;
27 #size-cells = <1>;
28
29 partition@0 {
30 label = "u-boot";
31 reg = <0x0000000 0x100000>;
32 read-only;
33 };
34
35 uimage@100000 {
36 reg = <0x0100000 0x200000>;
37 };
38];
diff --git a/Documentation/devicetree/bindings/mtd/spear_smi.txt b/Documentation/devicetree/bindings/mtd/spear_smi.txt
new file mode 100644
index 000000000000..7248aadd89e4
--- /dev/null
+++ b/Documentation/devicetree/bindings/mtd/spear_smi.txt
@@ -0,0 +1,31 @@
1* SPEAr SMI
2
3Required properties:
4- compatible : "st,spear600-smi"
5- reg : Address range of the mtd chip
6- #address-cells, #size-cells : Must be present if the device has sub-nodes
7 representing partitions.
8- interrupt-parent: Should be the phandle for the interrupt controller
9 that services interrupts for this device
10- interrupts: Should contain the STMMAC interrupts
11- clock-rate : Functional clock rate of SMI in Hz
12
13Optional properties:
14- st,smi-fast-mode : Flash supports read in fast mode
15
16Example:
17
18 smi: flash@fc000000 {
19 compatible = "st,spear600-smi";
20 #address-cells = <1>;
21 #size-cells = <1>;
22 reg = <0xfc000000 0x1000>;
23 interrupt-parent = <&vic1>;
24 interrupts = <12>;
25 clock-rate = <50000000>; /* 50MHz */
26
27 flash@f8000000 {
28 st,smi-fast-mode;
29 ...
30 };
31 };
diff --git a/Documentation/devicetree/bindings/net/stmmac.txt b/Documentation/devicetree/bindings/net/stmmac.txt
new file mode 100644
index 000000000000..1f62623f8c3f
--- /dev/null
+++ b/Documentation/devicetree/bindings/net/stmmac.txt
@@ -0,0 +1,28 @@
1* STMicroelectronics 10/100/1000 Ethernet driver (GMAC)
2
3Required properties:
4- compatible: Should be "st,spear600-gmac"
5- reg: Address and length of the register set for the device
6- interrupt-parent: Should be the phandle for the interrupt controller
7 that services interrupts for this device
8- interrupts: Should contain the STMMAC interrupts
9- interrupt-names: Should contain the interrupt names "macirq"
10 "eth_wake_irq" if this interrupt is supported in the "interrupts"
11 property
12- phy-mode: String, operation mode of the PHY interface.
13 Supported values are: "mii", "rmii", "gmii", "rgmii".
14
15Optional properties:
16- mac-address: 6 bytes, mac address
17
18Examples:
19
20 gmac0: ethernet@e0800000 {
21 compatible = "st,spear600-gmac";
22 reg = <0xe0800000 0x8000>;
23 interrupt-parent = <&vic1>;
24 interrupts = <24 23>;
25 interrupt-names = "macirq", "eth_wake_irq";
26 mac-address = [000000000000]; /* Filled in by U-Boot */
27 phy-mode = "gmii";
28 };
diff --git a/Documentation/devicetree/bindings/power_supply/max17042_battery.txt b/Documentation/devicetree/bindings/power_supply/max17042_battery.txt
new file mode 100644
index 000000000000..5bc9b685cf8a
--- /dev/null
+++ b/Documentation/devicetree/bindings/power_supply/max17042_battery.txt
@@ -0,0 +1,18 @@
1max17042_battery
2~~~~~~~~~~~~~~~~
3
4Required properties :
5 - compatible : "maxim,max17042"
6
7Optional properties :
8 - maxim,rsns-microohm : Resistance of rsns resistor in micro Ohms
9 (datasheet-recommended value is 10000).
10 Defining this property enables current-sense functionality.
11
12Example:
13
14 battery-charger@36 {
15 compatible = "maxim,max17042";
16 reg = <0x36>;
17 maxim,rsns-microohm = <10000>;
18 };
diff --git a/Documentation/devicetree/bindings/powerpc/fsl/mpic-msgr.txt b/Documentation/devicetree/bindings/powerpc/fsl/mpic-msgr.txt
new file mode 100644
index 000000000000..bc8ded641ab6
--- /dev/null
+++ b/Documentation/devicetree/bindings/powerpc/fsl/mpic-msgr.txt
@@ -0,0 +1,63 @@
1* FSL MPIC Message Registers
2
3This binding specifies what properties must be available in the device tree
4representation of the message register blocks found in some FSL MPIC
5implementations.
6
7Required properties:
8
9 - compatible: Specifies the compatibility list for the message register
10 block. The type shall be <string-list> and the value shall be of the form
11 "fsl,mpic-v<version>-msgr", where <version> is the version number of
12 the MPIC containing the message registers.
13
14 - reg: Specifies the base physical address(s) and size(s) of the
15 message register block's addressable register space. The type shall be
16 <prop-encoded-array>.
17
18 - interrupts: Specifies a list of interrupt-specifiers which are available
19 for receiving interrupts. Interrupt-specifier consists of two cells: first
20 cell is interrupt-number and second cell is level-sense. The type shall be
21 <prop-encoded-array>.
22
23Optional properties:
24
25 - mpic-msgr-receive-mask: Specifies what registers in the containing block
26 are allowed to receive interrupts. The value is a bit mask where a set
27 bit at bit 'n' indicates that message register 'n' can receive interrupts.
28 Note that "bit 'n'" is numbered from LSB for PPC hardware. The type shall
29 be <u32>. If not present, then all of the message registers in the block
30 are available.
31
32Aliases:
33
34 An alias should be created for every message register block. They are not
35 required, though. However, a particular implementation of this binding
36 may require aliases to be present. Aliases are of the form
37 'mpic-msgr-block<n>', where <n> is an integer specifying the block's number.
38 Numbers shall start at 0.
39
40Example:
41
42 aliases {
43 mpic-msgr-block0 = &mpic_msgr_block0;
44 mpic-msgr-block1 = &mpic_msgr_block1;
45 };
46
47 mpic_msgr_block0: mpic-msgr-block@41400 {
48 compatible = "fsl,mpic-v3.1-msgr";
49 reg = <0x41400 0x200>;
50 // Message registers 0 and 2 in this block can receive interrupts on
51 // sources 0xb0 and 0xb2, respectively.
52 interrupts = <0xb0 2 0xb2 2>;
53 mpic-msgr-receive-mask = <0x5>;
54 };
55
56 mpic_msgr_block1: mpic-msgr-block@42400 {
57 compatible = "fsl,mpic-v3.1-msgr";
58 reg = <0x42400 0x200>;
59 // Message registers 0 and 2 in this block can receive interrupts on
60 // sources 0xb4 and 0xb6, respectively.
61 interrupts = <0xb4 2 0xb6 2>;
62 mpic-msgr-receive-mask = <0x5>;
63 };
diff --git a/Documentation/devicetree/bindings/powerpc/fsl/mpic.txt b/Documentation/devicetree/bindings/powerpc/fsl/mpic.txt
index 2cf38bd841fd..dc5744636a57 100644
--- a/Documentation/devicetree/bindings/powerpc/fsl/mpic.txt
+++ b/Documentation/devicetree/bindings/powerpc/fsl/mpic.txt
@@ -56,7 +56,27 @@ PROPERTIES
56 to the client. The presence of this property also mandates 56 to the client. The presence of this property also mandates
57 that any initialization related to interrupt sources shall 57 that any initialization related to interrupt sources shall
58 be limited to sources explicitly referenced in the device tree. 58 be limited to sources explicitly referenced in the device tree.
59 59
60 - big-endian
61 Usage: optional
62 Value type: <empty>
63 If present the MPIC will be assumed to be big-endian. Some
64 device-trees omit this property on MPIC nodes even when the MPIC is
65 in fact big-endian, so certain boards override this property.
66
67 - single-cpu-affinity
68 Usage: optional
69 Value type: <empty>
70 If present the MPIC will be assumed to only be able to route
71 non-IPI interrupts to a single CPU at a time (EG: Freescale MPIC).
72
73 - last-interrupt-source
74 Usage: optional
75 Value type: <u32>
76 Some MPICs do not correctly report the number of hardware sources
77 in the global feature registers. If specified, this field will
78 override the value read from MPIC_GREG_FEATURE_LAST_SRC.
79
60INTERRUPT SPECIFIER DEFINITION 80INTERRUPT SPECIFIER DEFINITION
61 81
62 Interrupt specifiers consists of 4 cells encoded as 82 Interrupt specifiers consists of 4 cells encoded as
diff --git a/Documentation/devicetree/bindings/powerpc/fsl/msi-pic.txt b/Documentation/devicetree/bindings/powerpc/fsl/msi-pic.txt
index 5d586e1ccaf5..5693877ab377 100644
--- a/Documentation/devicetree/bindings/powerpc/fsl/msi-pic.txt
+++ b/Documentation/devicetree/bindings/powerpc/fsl/msi-pic.txt
@@ -6,8 +6,10 @@ Required properties:
6 etc.) and the second is "fsl,mpic-msi" or "fsl,ipic-msi" depending on 6 etc.) and the second is "fsl,mpic-msi" or "fsl,ipic-msi" depending on
7 the parent type. 7 the parent type.
8 8
9- reg : should contain the address and the length of the shared message 9- reg : It may contain one or two regions. The first region should contain
10 interrupt register set. 10 the address and the length of the shared message interrupt register set.
11 The second region should contain the address of aliased MSIIR register for
12 platforms that have such an alias.
11 13
12- msi-available-ranges: use <start count> style section to define which 14- msi-available-ranges: use <start count> style section to define which
13 msi interrupt can be used in the 256 msi interrupts. This property is 15 msi interrupt can be used in the 256 msi interrupts. This property is
diff --git a/Documentation/devicetree/bindings/rtc/sa1100-rtc.txt b/Documentation/devicetree/bindings/rtc/sa1100-rtc.txt
new file mode 100644
index 000000000000..0cda19ad4859
--- /dev/null
+++ b/Documentation/devicetree/bindings/rtc/sa1100-rtc.txt
@@ -0,0 +1,17 @@
1* Marvell Real Time Clock controller
2
3Required properties:
4- compatible: should be "mrvl,sa1100-rtc"
5- reg: physical base address of the controller and length of memory mapped
6 region.
7- interrupts: Should be two. The first interrupt number is the rtc alarm
8 interrupt and the second interrupt number is the rtc hz interrupt.
9- interrupt-names: Assign name of irq resource.
10
11Example:
12 rtc: rtc@d4010000 {
13 compatible = "mrvl,mmp-rtc";
14 reg = <0xd4010000 0x1000>;
15 interrupts = <5>, <6>;
16 interrupt-name = "rtc 1Hz", "rtc alarm";
17 };
diff --git a/Documentation/devicetree/bindings/serial/mrvl-serial.txt b/Documentation/devicetree/bindings/serial/mrvl-serial.txt
new file mode 100644
index 000000000000..d744340de887
--- /dev/null
+++ b/Documentation/devicetree/bindings/serial/mrvl-serial.txt
@@ -0,0 +1,4 @@
1PXA UART controller
2
3Required properties:
4- compatible : should be "mrvl,mmp-uart" or "mrvl,pxa-uart".
diff --git a/Documentation/devicetree/bindings/sound/alc5632.txt b/Documentation/devicetree/bindings/sound/alc5632.txt
new file mode 100644
index 000000000000..8608f747dcfe
--- /dev/null
+++ b/Documentation/devicetree/bindings/sound/alc5632.txt
@@ -0,0 +1,24 @@
1ALC5632 audio CODEC
2
3This device supports I2C only.
4
5Required properties:
6
7 - compatible : "realtek,alc5632"
8
9 - reg : the I2C address of the device.
10
11 - gpio-controller : Indicates this device is a GPIO controller.
12
13 - #gpio-cells : Should be two. The first cell is the pin number and the
14 second cell is used to specify optional parameters (currently unused).
15
16Example:
17
18alc5632: alc5632@1e {
19 compatible = "realtek,alc5632";
20 reg = <0x1a>;
21
22 gpio-controller;
23 #gpio-cells = <2>;
24};
diff --git a/Documentation/devicetree/bindings/sound/imx-audmux.txt b/Documentation/devicetree/bindings/sound/imx-audmux.txt
new file mode 100644
index 000000000000..215aa9817213
--- /dev/null
+++ b/Documentation/devicetree/bindings/sound/imx-audmux.txt
@@ -0,0 +1,13 @@
1Freescale Digital Audio Mux (AUDMUX) device
2
3Required properties:
4- compatible : "fsl,imx21-audmux" for AUDMUX version firstly used on i.MX21,
5 or "fsl,imx31-audmux" for the version firstly used on i.MX31.
6- reg : Should contain AUDMUX registers location and length
7
8Example:
9
10audmux@021d8000 {
11 compatible = "fsl,imx6q-audmux", "fsl,imx31-audmux";
12 reg = <0x021d8000 0x4000>;
13};
diff --git a/Documentation/devicetree/bindings/sound/soc/codecs/fsl-sgtl5000.txt b/Documentation/devicetree/bindings/sound/sgtl5000.txt
index 2c3cd413f042..2c3cd413f042 100644
--- a/Documentation/devicetree/bindings/sound/soc/codecs/fsl-sgtl5000.txt
+++ b/Documentation/devicetree/bindings/sound/sgtl5000.txt
diff --git a/Documentation/devicetree/bindings/sound/tegra-audio-alc5632.txt b/Documentation/devicetree/bindings/sound/tegra-audio-alc5632.txt
new file mode 100644
index 000000000000..b77a97c9101e
--- /dev/null
+++ b/Documentation/devicetree/bindings/sound/tegra-audio-alc5632.txt
@@ -0,0 +1,59 @@
1NVIDIA Tegra audio complex
2
3Required properties:
4- compatible : "nvidia,tegra-audio-alc5632"
5- nvidia,model : The user-visible name of this sound complex.
6- nvidia,audio-routing : A list of the connections between audio components.
7 Each entry is a pair of strings, the first being the connection's sink,
8 the second being the connection's source. Valid names for sources and
9 sinks are the ALC5632's pins:
10
11 ALC5632 pins:
12
13 * SPK_OUTP
14 * SPK_OUTN
15 * HP_OUT_L
16 * HP_OUT_R
17 * AUX_OUT_P
18 * AUX_OUT_N
19 * LINE_IN_L
20 * LINE_IN_R
21 * PHONE_P
22 * PHONE_N
23 * MIC1_P
24 * MIC1_N
25 * MIC2_P
26 * MIC2_N
27 * MICBIAS1
28 * DMICDAT
29
30 Board connectors:
31
32 * Headset Stereophone
33 * Int Spk
34 * Headset Mic
35 * Digital Mic
36
37- nvidia,i2s-controller : The phandle of the Tegra I2S controller
38- nvidia,audio-codec : The phandle of the ALC5632 audio codec
39
40Example:
41
42sound {
43 compatible = "nvidia,tegra-audio-alc5632-paz00",
44 "nvidia,tegra-audio-alc5632";
45
46 nvidia,model = "Compal PAZ00";
47
48 nvidia,audio-routing =
49 "Int Spk", "SPK_OUTP",
50 "Int Spk", "SPK_OUTN",
51 "Headset Mic","MICBIAS1",
52 "MIC1_N", "Headset Mic",
53 "MIC1_P", "Headset Mic",
54 "Headset Stereophone", "HP_OUT_R",
55 "Headset Stereophone", "HP_OUT_L";
56
57 nvidia,i2s-controller = <&tegra_i2s1>;
58 nvidia,audio-codec = <&alc5632>;
59};
diff --git a/Documentation/devicetree/bindings/spi/omap-spi.txt b/Documentation/devicetree/bindings/spi/omap-spi.txt
new file mode 100644
index 000000000000..81df374adbb9
--- /dev/null
+++ b/Documentation/devicetree/bindings/spi/omap-spi.txt
@@ -0,0 +1,20 @@
1OMAP2+ McSPI device
2
3Required properties:
4- compatible :
5 - "ti,omap2-spi" for OMAP2 & OMAP3.
6 - "ti,omap4-spi" for OMAP4+.
7- ti,spi-num-cs : Number of chipselect supported by the instance.
8- ti,hwmods: Name of the hwmod associated to the McSPI
9
10
11Example:
12
13mcspi1: mcspi@1 {
14 #address-cells = <1>;
15 #size-cells = <0>;
16 compatible = "ti,omap4-mcspi";
17 ti,hwmods = "mcspi1";
18 ti,spi-num-cs = <4>;
19};
20
diff --git a/Documentation/devicetree/bindings/tty/serial/efm32-uart.txt b/Documentation/devicetree/bindings/tty/serial/efm32-uart.txt
new file mode 100644
index 000000000000..6588b6950a7f
--- /dev/null
+++ b/Documentation/devicetree/bindings/tty/serial/efm32-uart.txt
@@ -0,0 +1,14 @@
1* Energymicro efm32 UART
2
3Required properties:
4- compatible : Should be "efm32,uart"
5- reg : Address and length of the register set
6- interrupts : Should contain uart interrupt
7
8Example:
9
10uart@0x4000c400 {
11 compatible = "efm32,uart";
12 reg = <0x4000c400 0x400>;
13 interrupts = <15>;
14};
diff --git a/Documentation/devicetree/bindings/usb/atmel-usb.txt b/Documentation/devicetree/bindings/usb/atmel-usb.txt
new file mode 100644
index 000000000000..60bd2150a3e6
--- /dev/null
+++ b/Documentation/devicetree/bindings/usb/atmel-usb.txt
@@ -0,0 +1,49 @@
1Atmel SOC USB controllers
2
3OHCI
4
5Required properties:
6 - compatible: Should be "atmel,at91rm9200-ohci" for USB controllers
7 used in host mode.
8 - num-ports: Number of ports.
9 - atmel,vbus-gpio: If present, specifies a gpio that needs to be
10 activated for the bus to be powered.
11 - atmel,oc-gpio: If present, specifies a gpio that needs to be
12 activated for the overcurrent detection.
13
14usb0: ohci@00500000 {
15 compatible = "atmel,at91rm9200-ohci", "usb-ohci";
16 reg = <0x00500000 0x100000>;
17 interrupts = <20 4>;
18 num-ports = <2>;
19};
20
21EHCI
22
23Required properties:
24 - compatible: Should be "atmel,at91sam9g45-ehci" for USB controllers
25 used in host mode.
26
27usb1: ehci@00800000 {
28 compatible = "atmel,at91sam9g45-ehci", "usb-ehci";
29 reg = <0x00800000 0x100000>;
30 interrupts = <22 4>;
31};
32
33AT91 USB device controller
34
35Required properties:
36 - compatible: Should be "atmel,at91rm9200-udc"
37 - reg: Address and length of the register set for the device
38 - interrupts: Should contain macb interrupt
39
40Optional properties:
41 - atmel,vbus-gpio: If present, specifies a gpio that needs to be
42 activated for the bus to be powered.
43
44usb1: gadget@fffa4000 {
45 compatible = "atmel,at91rm9200-udc";
46 reg = <0xfffa4000 0x4000>;
47 interrupts = <10 4>;
48 atmel,vbus-gpio = <&pioC 5 0>;
49};
diff --git a/Documentation/devicetree/bindings/usb/tegra-usb.txt b/Documentation/devicetree/bindings/usb/tegra-usb.txt
index 035d63d5646d..007005ddbe12 100644
--- a/Documentation/devicetree/bindings/usb/tegra-usb.txt
+++ b/Documentation/devicetree/bindings/usb/tegra-usb.txt
@@ -11,3 +11,16 @@ Required properties :
11 - phy_type : Should be one of "ulpi" or "utmi". 11 - phy_type : Should be one of "ulpi" or "utmi".
12 - nvidia,vbus-gpio : If present, specifies a gpio that needs to be 12 - nvidia,vbus-gpio : If present, specifies a gpio that needs to be
13 activated for the bus to be powered. 13 activated for the bus to be powered.
14
15Optional properties:
16 - dr_mode : dual role mode. Indicates the working mode for
17 nvidia,tegra20-ehci compatible controllers. Can be "host", "peripheral",
18 or "otg". Default to "host" if not defined for backward compatibility.
19 host means this is a host controller
20 peripheral means it is device controller
21 otg means it can operate as either ("on the go")
22 - nvidia,has-legacy-mode : boolean indicates whether this controller can
23 operate in legacy mode (as APX 2500 / 2600). In legacy mode some
24 registers are accessed through the APB_MISC base address instead of
25 the USB controller. Since this is a legacy issue it probably does not
26 warrant a compatible string of its own.
diff --git a/Documentation/devicetree/bindings/vendor-prefixes.txt b/Documentation/devicetree/bindings/vendor-prefixes.txt
index ecc6a6cd26c1..82ac057a24a9 100644
--- a/Documentation/devicetree/bindings/vendor-prefixes.txt
+++ b/Documentation/devicetree/bindings/vendor-prefixes.txt
@@ -30,9 +30,11 @@ national National Semiconductor
30nintendo Nintendo 30nintendo Nintendo
31nvidia NVIDIA 31nvidia NVIDIA
32nxp NXP Semiconductors 32nxp NXP Semiconductors
33picochip Picochip Ltd
33powervr Imagination Technologies 34powervr Imagination Technologies
34qcom Qualcomm, Inc. 35qcom Qualcomm, Inc.
35ramtron Ramtron International 36ramtron Ramtron International
37realtek Realtek Semiconductor Corp.
36samsung Samsung Semiconductor 38samsung Samsung Semiconductor
37sbs Smart Battery System 39sbs Smart Battery System
38schindler Schindler 40schindler Schindler
diff --git a/Documentation/devicetree/booting-without-of.txt b/Documentation/devicetree/booting-without-of.txt
index 7c1329de0596..da0bfeb4253d 100644
--- a/Documentation/devicetree/booting-without-of.txt
+++ b/Documentation/devicetree/booting-without-of.txt
@@ -169,7 +169,7 @@ it with special cases.
169 169
170 b) Entry with a flattened device-tree block. Firmware loads the 170 b) Entry with a flattened device-tree block. Firmware loads the
171 physical address of the flattened device tree block (dtb) into r2, 171 physical address of the flattened device tree block (dtb) into r2,
172 r1 is not used, but it is considered good practise to use a valid 172 r1 is not used, but it is considered good practice to use a valid
173 machine number as described in Documentation/arm/Booting. 173 machine number as described in Documentation/arm/Booting.
174 174
175 r0 : 0 175 r0 : 0
diff --git a/Documentation/devicetree/usage-model.txt b/Documentation/devicetree/usage-model.txt
new file mode 100644
index 000000000000..c5a80099b71c
--- /dev/null
+++ b/Documentation/devicetree/usage-model.txt
@@ -0,0 +1,412 @@
1Linux and the Device Tree
2-------------------------
3The Linux usage model for device tree data
4
5Author: Grant Likely <grant.likely@secretlab.ca>
6
7This article describes how Linux uses the device tree. An overview of
8the device tree data format can be found on the device tree usage page
9at devicetree.org[1].
10
11[1] http://devicetree.org/Device_Tree_Usage
12
13The "Open Firmware Device Tree", or simply Device Tree (DT), is a data
14structure and language for describing hardware. More specifically, it
15is a description of hardware that is readable by an operating system
16so that the operating system doesn't need to hard code details of the
17machine.
18
19Structurally, the DT is a tree, or acyclic graph with named nodes, and
20nodes may have an arbitrary number of named properties encapsulating
21arbitrary data. A mechanism also exists to create arbitrary
22links from one node to another outside of the natural tree structure.
23
24Conceptually, a common set of usage conventions, called 'bindings',
25is defined for how data should appear in the tree to describe typical
26hardware characteristics including data busses, interrupt lines, GPIO
27connections, and peripheral devices.
28
29As much as possible, hardware is described using existing bindings to
30maximize use of existing support code, but since property and node
31names are simply text strings, it is easy to extend existing bindings
32or create new ones by defining new nodes and properties. Be wary,
33however, of creating a new binding without first doing some homework
34about what already exists. There are currently two different,
35incompatible, bindings for i2c busses that came about because the new
36binding was created without first investigating how i2c devices were
37already being enumerated in existing systems.
38
391. History
40----------
41The DT was originally created by Open Firmware as part of the
42communication method for passing data from Open Firmware to a client
43program (like to an operating system). An operating system used the
44Device Tree to discover the topology of the hardware at runtime, and
45thereby support a majority of available hardware without hard coded
46information (assuming drivers were available for all devices).
47
48Since Open Firmware is commonly used on PowerPC and SPARC platforms,
49the Linux support for those architectures has for a long time used the
50Device Tree.
51
52In 2005, when PowerPC Linux began a major cleanup and to merge 32-bit
53and 64-bit support, the decision was made to require DT support on all
54powerpc platforms, regardless of whether or not they used Open
55Firmware. To do this, a DT representation called the Flattened Device
56Tree (FDT) was created which could be passed to the kernel as a binary
57blob without requiring a real Open Firmware implementation. U-Boot,
58kexec, and other bootloaders were modified to support both passing a
59Device Tree Binary (dtb) and to modify a dtb at boot time. DT was
60also added to the PowerPC boot wrapper (arch/powerpc/boot/*) so that
61a dtb could be wrapped up with the kernel image to support booting
62existing non-DT aware firmware.
63
64Some time later, FDT infrastructure was generalized to be usable by
65all architectures. At the time of this writing, 6 mainlined
66architectures (arm, microblaze, mips, powerpc, sparc, and x86) and 1
67out of mainline (nios) have some level of DT support.
68
692. Data Model
70-------------
71If you haven't already read the Device Tree Usage[1] page,
72then go read it now. It's okay, I'll wait....
73
742.1 High Level View
75-------------------
76The most important thing to understand is that the DT is simply a data
77structure that describes the hardware. There is nothing magical about
78it, and it doesn't magically make all hardware configuration problems
79go away. What it does do is provide a language for decoupling the
80hardware configuration from the board and device driver support in the
81Linux kernel (or any other operating system for that matter). Using
82it allows board and device support to become data driven; to make
83setup decisions based on data passed into the kernel instead of on
84per-machine hard coded selections.
85
86Ideally, data driven platform setup should result in less code
87duplication and make it easier to support a wide range of hardware
88with a single kernel image.
89
90Linux uses DT data for three major purposes:
911) platform identification,
922) runtime configuration, and
933) device population.
94
952.2 Platform Identification
96---------------------------
97First and foremost, the kernel will use data in the DT to identify the
98specific machine. In a perfect world, the specific platform shouldn't
99matter to the kernel because all platform details would be described
100perfectly by the device tree in a consistent and reliable manner.
101Hardware is not perfect though, and so the kernel must identify the
102machine during early boot so that it has the opportunity to run
103machine-specific fixups.
104
105In the majority of cases, the machine identity is irrelevant, and the
106kernel will instead select setup code based on the machine's core
107CPU or SoC. On ARM for example, setup_arch() in
108arch/arm/kernel/setup.c will call setup_machine_fdt() in
109arch/arm/kernel/devicetree.c which searches through the machine_desc
110table and selects the machine_desc which best matches the device tree
111data. It determines the best match by looking at the 'compatible'
112property in the root device tree node, and comparing it with the
113dt_compat list in struct machine_desc.
114
115The 'compatible' property contains a sorted list of strings starting
116with the exact name of the machine, followed by an optional list of
117boards it is compatible with sorted from most compatible to least. For
118example, the root compatible properties for the TI BeagleBoard and its
119successor, the BeagleBoard xM board might look like:
120
121 compatible = "ti,omap3-beagleboard", "ti,omap3450", "ti,omap3";
122 compatible = "ti,omap3-beagleboard-xm", "ti,omap3450", "ti,omap3";
123
124Where "ti,omap3-beagleboard-xm" specifies the exact model, it also
125claims that it compatible with the OMAP 3450 SoC, and the omap3 family
126of SoCs in general. You'll notice that the list is sorted from most
127specific (exact board) to least specific (SoC family).
128
129Astute readers might point out that the Beagle xM could also claim
130compatibility with the original Beagle board. However, one should be
131cautioned about doing so at the board level since there is typically a
132high level of change from one board to another, even within the same
133product line, and it is hard to nail down exactly what is meant when one
134board claims to be compatible with another. For the top level, it is
135better to err on the side of caution and not claim one board is
136compatible with another. The notable exception would be when one
137board is a carrier for another, such as a CPU module attached to a
138carrier board.
139
140One more note on compatible values. Any string used in a compatible
141property must be documented as to what it indicates. Add
142documentation for compatible strings in Documentation/devicetree/bindings.
143
144Again on ARM, for each machine_desc, the kernel looks to see if
145any of the dt_compat list entries appear in the compatible property.
146If one does, then that machine_desc is a candidate for driving the
147machine. After searching the entire table of machine_descs,
148setup_machine_fdt() returns the 'most compatible' machine_desc based
149on which entry in the compatible property each machine_desc matches
150against. If no matching machine_desc is found, then it returns NULL.
151
152The reasoning behind this scheme is the observation that in the majority
153of cases, a single machine_desc can support a large number of boards
154if they all use the same SoC, or same family of SoCs. However,
155invariably there will be some exceptions where a specific board will
156require special setup code that is not useful in the generic case.
157Special cases could be handled by explicitly checking for the
158troublesome board(s) in generic setup code, but doing so very quickly
159becomes ugly and/or unmaintainable if it is more than just a couple of
160cases.
161
162Instead, the compatible list allows a generic machine_desc to provide
163support for a wide common set of boards by specifying "less
164compatible" value in the dt_compat list. In the example above,
165generic board support can claim compatibility with "ti,omap3" or
166"ti,omap3450". If a bug was discovered on the original beagleboard
167that required special workaround code during early boot, then a new
168machine_desc could be added which implements the workarounds and only
169matches on "ti,omap3-beagleboard".
170
171PowerPC uses a slightly different scheme where it calls the .probe()
172hook from each machine_desc, and the first one returning TRUE is used.
173However, this approach does not take into account the priority of the
174compatible list, and probably should be avoided for new architecture
175support.
176
1772.3 Runtime configuration
178-------------------------
179In most cases, a DT will be the sole method of communicating data from
180firmware to the kernel, so also gets used to pass in runtime and
181configuration data like the kernel parameters string and the location
182of an initrd image.
183
184Most of this data is contained in the /chosen node, and when booting
185Linux it will look something like this:
186
187 chosen {
188 bootargs = "console=ttyS0,115200 loglevel=8";
189 initrd-start = <0xc8000000>;
190 initrd-end = <0xc8200000>;
191 };
192
193The bootargs property contains the kernel arguments, and the initrd-*
194properties define the address and size of an initrd blob. The
195chosen node may also optionally contain an arbitrary number of
196additional properties for platform-specific configuration data.
197
198During early boot, the architecture setup code calls of_scan_flat_dt()
199several times with different helper callbacks to parse device tree
200data before paging is setup. The of_scan_flat_dt() code scans through
201the device tree and uses the helpers to extract information required
202during early boot. Typically the early_init_dt_scan_chosen() helper
203is used to parse the chosen node including kernel parameters,
204early_init_dt_scan_root() to initialize the DT address space model,
205and early_init_dt_scan_memory() to determine the size and
206location of usable RAM.
207
208On ARM, the function setup_machine_fdt() is responsible for early
209scanning of the device tree after selecting the correct machine_desc
210that supports the board.
211
2122.4 Device population
213---------------------
214After the board has been identified, and after the early configuration data
215has been parsed, then kernel initialization can proceed in the normal
216way. At some point in this process, unflatten_device_tree() is called
217to convert the data into a more efficient runtime representation.
218This is also when machine-specific setup hooks will get called, like
219the machine_desc .init_early(), .init_irq() and .init_machine() hooks
220on ARM. The remainder of this section uses examples from the ARM
221implementation, but all architectures will do pretty much the same
222thing when using a DT.
223
224As can be guessed by the names, .init_early() is used for any machine-
225specific setup that needs to be executed early in the boot process,
226and .init_irq() is used to set up interrupt handling. Using a DT
227doesn't materially change the behaviour of either of these functions.
228If a DT is provided, then both .init_early() and .init_irq() are able
229to call any of the DT query functions (of_* in include/linux/of*.h) to
230get additional data about the platform.
231
232The most interesting hook in the DT context is .init_machine() which
233is primarily responsible for populating the Linux device model with
234data about the platform. Historically this has been implemented on
235embedded platforms by defining a set of static clock structures,
236platform_devices, and other data in the board support .c file, and
237registering it en-masse in .init_machine(). When DT is used, then
238instead of hard coding static devices for each platform, the list of
239devices can be obtained by parsing the DT, and allocating device
240structures dynamically.
241
242The simplest case is when .init_machine() is only responsible for
243registering a block of platform_devices. A platform_device is a concept
244used by Linux for memory or I/O mapped devices which cannot be detected
245by hardware, and for 'composite' or 'virtual' devices (more on those
246later). While there is no 'platform device' terminology for the DT,
247platform devices roughly correspond to device nodes at the root of the
248tree and children of simple memory mapped bus nodes.
249
250About now is a good time to lay out an example. Here is part of the
251device tree for the NVIDIA Tegra board.
252
253/{
254 compatible = "nvidia,harmony", "nvidia,tegra20";
255 #address-cells = <1>;
256 #size-cells = <1>;
257 interrupt-parent = <&intc>;
258
259 chosen { };
260 aliases { };
261
262 memory {
263 device_type = "memory";
264 reg = <0x00000000 0x40000000>;
265 };
266
267 soc {
268 compatible = "nvidia,tegra20-soc", "simple-bus";
269 #address-cells = <1>;
270 #size-cells = <1>;
271 ranges;
272
273 intc: interrupt-controller@50041000 {
274 compatible = "nvidia,tegra20-gic";
275 interrupt-controller;
276 #interrupt-cells = <1>;
277 reg = <0x50041000 0x1000>, < 0x50040100 0x0100 >;
278 };
279
280 serial@70006300 {
281 compatible = "nvidia,tegra20-uart";
282 reg = <0x70006300 0x100>;
283 interrupts = <122>;
284 };
285
286 i2s1: i2s@70002800 {
287 compatible = "nvidia,tegra20-i2s";
288 reg = <0x70002800 0x100>;
289 interrupts = <77>;
290 codec = <&wm8903>;
291 };
292
293 i2c@7000c000 {
294 compatible = "nvidia,tegra20-i2c";
295 #address-cells = <1>;
296 #size-cells = <0>;
297 reg = <0x7000c000 0x100>;
298 interrupts = <70>;
299
300 wm8903: codec@1a {
301 compatible = "wlf,wm8903";
302 reg = <0x1a>;
303 interrupts = <347>;
304 };
305 };
306 };
307
308 sound {
309 compatible = "nvidia,harmony-sound";
310 i2s-controller = <&i2s1>;
311 i2s-codec = <&wm8903>;
312 };
313};
314
315At .machine_init() time, Tegra board support code will need to look at
316this DT and decide which nodes to create platform_devices for.
317However, looking at the tree, it is not immediately obvious what kind
318of device each node represents, or even if a node represents a device
319at all. The /chosen, /aliases, and /memory nodes are informational
320nodes that don't describe devices (although arguably memory could be
321considered a device). The children of the /soc node are memory mapped
322devices, but the codec@1a is an i2c device, and the sound node
323represents not a device, but rather how other devices are connected
324together to create the audio subsystem. I know what each device is
325because I'm familiar with the board design, but how does the kernel
326know what to do with each node?
327
328The trick is that the kernel starts at the root of the tree and looks
329for nodes that have a 'compatible' property. First, it is generally
330assumed that any node with a 'compatible' property represents a device
331of some kind, and second, it can be assumed that any node at the root
332of the tree is either directly attached to the processor bus, or is a
333miscellaneous system device that cannot be described any other way.
334For each of these nodes, Linux allocates and registers a
335platform_device, which in turn may get bound to a platform_driver.
336
337Why is using a platform_device for these nodes a safe assumption?
338Well, for the way that Linux models devices, just about all bus_types
339assume that its devices are children of a bus controller. For
340example, each i2c_client is a child of an i2c_master. Each spi_device
341is a child of an SPI bus. Similarly for USB, PCI, MDIO, etc. The
342same hierarchy is also found in the DT, where I2C device nodes only
343ever appear as children of an I2C bus node. Ditto for SPI, MDIO, USB,
344etc. The only devices which do not require a specific type of parent
345device are platform_devices (and amba_devices, but more on that
346later), which will happily live at the base of the Linux /sys/devices
347tree. Therefore, if a DT node is at the root of the tree, then it
348really probably is best registered as a platform_device.
349
350Linux board support code calls of_platform_populate(NULL, NULL, NULL)
351to kick off discovery of devices at the root of the tree. The
352parameters are all NULL because when starting from the root of the
353tree, there is no need to provide a starting node (the first NULL), a
354parent struct device (the last NULL), and we're not using a match
355table (yet). For a board that only needs to register devices,
356.init_machine() can be completely empty except for the
357of_platform_populate() call.
358
359In the Tegra example, this accounts for the /soc and /sound nodes, but
360what about the children of the SoC node? Shouldn't they be registered
361as platform devices too? For Linux DT support, the generic behaviour
362is for child devices to be registered by the parent's device driver at
363driver .probe() time. So, an i2c bus device driver will register a
364i2c_client for each child node, an SPI bus driver will register
365its spi_device children, and similarly for other bus_types.
366According to that model, a driver could be written that binds to the
367SoC node and simply registers platform_devices for each of its
368children. The board support code would allocate and register an SoC
369device, a (theoretical) SoC device driver could bind to the SoC device,
370and register platform_devices for /soc/interrupt-controller, /soc/serial,
371/soc/i2s, and /soc/i2c in its .probe() hook. Easy, right?
372
373Actually, it turns out that registering children of some
374platform_devices as more platform_devices is a common pattern, and the
375device tree support code reflects that and makes the above example
376simpler. The second argument to of_platform_populate() is an
377of_device_id table, and any node that matches an entry in that table
378will also get its child nodes registered. In the tegra case, the code
379can look something like this:
380
381static void __init harmony_init_machine(void)
382{
383 /* ... */
384 of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
385}
386
387"simple-bus" is defined in the ePAPR 1.0 specification as a property
388meaning a simple memory mapped bus, so the of_platform_populate() code
389could be written to just assume simple-bus compatible nodes will
390always be traversed. However, we pass it in as an argument so that
391board support code can always override the default behaviour.
392
393[Need to add discussion of adding i2c/spi/etc child devices]
394
395Appendix A: AMBA devices
396------------------------
397
398ARM Primecells are a certain kind of device attached to the ARM AMBA
399bus which include some support for hardware detection and power
400management. In Linux, struct amba_device and the amba_bus_type is
401used to represent Primecell devices. However, the fiddly bit is that
402not all devices on an AMBA bus are Primecells, and for Linux it is
403typical for both amba_device and platform_device instances to be
404siblings of the same bus segment.
405
406When using the DT, this creates problems for of_platform_populate()
407because it must decide whether to register each node as either a
408platform_device or an amba_device. This unfortunately complicates the
409device creation model a little bit, but the solution turns out not to
410be too invasive. If a node is compatible with "arm,amba-primecell", then
411of_platform_populate() will register it as an amba_device instead of a
412platform_device.
diff --git a/Documentation/dma-buf-sharing.txt b/Documentation/dma-buf-sharing.txt
index 225f96d88f55..3bbd5c51605a 100644
--- a/Documentation/dma-buf-sharing.txt
+++ b/Documentation/dma-buf-sharing.txt
@@ -32,8 +32,12 @@ The buffer-user
32*IMPORTANT*: [see https://lkml.org/lkml/2011/12/20/211 for more details] 32*IMPORTANT*: [see https://lkml.org/lkml/2011/12/20/211 for more details]
33For this first version, A buffer shared using the dma_buf sharing API: 33For this first version, A buffer shared using the dma_buf sharing API:
34- *may* be exported to user space using "mmap" *ONLY* by exporter, outside of 34- *may* be exported to user space using "mmap" *ONLY* by exporter, outside of
35 this framework. 35 this framework.
36- may be used *ONLY* by importers that do not need CPU access to the buffer. 36- with this new iteration of the dma-buf api cpu access from the kernel has been
37 enable, see below for the details.
38
39dma-buf operations for device dma only
40--------------------------------------
37 41
38The dma_buf buffer sharing API usage contains the following steps: 42The dma_buf buffer sharing API usage contains the following steps:
39 43
@@ -219,10 +223,120 @@ NOTES:
219 If the exporter chooses not to allow an attach() operation once a 223 If the exporter chooses not to allow an attach() operation once a
220 map_dma_buf() API has been called, it simply returns an error. 224 map_dma_buf() API has been called, it simply returns an error.
221 225
222Miscellaneous notes: 226Kernel cpu access to a dma-buf buffer object
227--------------------------------------------
228
229The motivation to allow cpu access from the kernel to a dma-buf object from the
230importers side are:
231- fallback operations, e.g. if the devices is connected to a usb bus and the
232 kernel needs to shuffle the data around first before sending it away.
233- full transparency for existing users on the importer side, i.e. userspace
234 should not notice the difference between a normal object from that subsystem
235 and an imported one backed by a dma-buf. This is really important for drm
236 opengl drivers that expect to still use all the existing upload/download
237 paths.
238
239Access to a dma_buf from the kernel context involves three steps:
240
2411. Prepare access, which invalidate any necessary caches and make the object
242 available for cpu access.
2432. Access the object page-by-page with the dma_buf map apis
2443. Finish access, which will flush any necessary cpu caches and free reserved
245 resources.
246
2471. Prepare access
248
249 Before an importer can access a dma_buf object with the cpu from the kernel
250 context, it needs to notify the exporter of the access that is about to
251 happen.
252
253 Interface:
254 int dma_buf_begin_cpu_access(struct dma_buf *dmabuf,
255 size_t start, size_t len,
256 enum dma_data_direction direction)
257
258 This allows the exporter to ensure that the memory is actually available for
259 cpu access - the exporter might need to allocate or swap-in and pin the
260 backing storage. The exporter also needs to ensure that cpu access is
261 coherent for the given range and access direction. The range and access
262 direction can be used by the exporter to optimize the cache flushing, i.e.
263 access outside of the range or with a different direction (read instead of
264 write) might return stale or even bogus data (e.g. when the exporter needs to
265 copy the data to temporary storage).
266
267 This step might fail, e.g. in oom conditions.
268
2692. Accessing the buffer
270
271 To support dma_buf objects residing in highmem cpu access is page-based using
272 an api similar to kmap. Accessing a dma_buf is done in aligned chunks of
273 PAGE_SIZE size. Before accessing a chunk it needs to be mapped, which returns
274 a pointer in kernel virtual address space. Afterwards the chunk needs to be
275 unmapped again. There is no limit on how often a given chunk can be mapped
276 and unmapped, i.e. the importer does not need to call begin_cpu_access again
277 before mapping the same chunk again.
278
279 Interfaces:
280 void *dma_buf_kmap(struct dma_buf *, unsigned long);
281 void dma_buf_kunmap(struct dma_buf *, unsigned long, void *);
282
283 There are also atomic variants of these interfaces. Like for kmap they
284 facilitate non-blocking fast-paths. Neither the importer nor the exporter (in
285 the callback) is allowed to block when using these.
286
287 Interfaces:
288 void *dma_buf_kmap_atomic(struct dma_buf *, unsigned long);
289 void dma_buf_kunmap_atomic(struct dma_buf *, unsigned long, void *);
290
291 For importers all the restrictions of using kmap apply, like the limited
292 supply of kmap_atomic slots. Hence an importer shall only hold onto at most 2
293 atomic dma_buf kmaps at the same time (in any given process context).
294
295 dma_buf kmap calls outside of the range specified in begin_cpu_access are
296 undefined. If the range is not PAGE_SIZE aligned, kmap needs to succeed on
297 the partial chunks at the beginning and end but may return stale or bogus
298 data outside of the range (in these partial chunks).
299
300 Note that these calls need to always succeed. The exporter needs to complete
301 any preparations that might fail in begin_cpu_access.
302
3033. Finish access
304
305 When the importer is done accessing the range specified in begin_cpu_access,
306 it needs to announce this to the exporter (to facilitate cache flushing and
307 unpinning of any pinned resources). The result of of any dma_buf kmap calls
308 after end_cpu_access is undefined.
309
310 Interface:
311 void dma_buf_end_cpu_access(struct dma_buf *dma_buf,
312 size_t start, size_t len,
313 enum dma_data_direction dir);
314
315
316Miscellaneous notes
317-------------------
318
223- Any exporters or users of the dma-buf buffer sharing framework must have 319- Any exporters or users of the dma-buf buffer sharing framework must have
224 a 'select DMA_SHARED_BUFFER' in their respective Kconfigs. 320 a 'select DMA_SHARED_BUFFER' in their respective Kconfigs.
225 321
322- In order to avoid fd leaks on exec, the FD_CLOEXEC flag must be set
323 on the file descriptor. This is not just a resource leak, but a
324 potential security hole. It could give the newly exec'd application
325 access to buffers, via the leaked fd, to which it should otherwise
326 not be permitted access.
327
328 The problem with doing this via a separate fcntl() call, versus doing it
329 atomically when the fd is created, is that this is inherently racy in a
330 multi-threaded app[3]. The issue is made worse when it is library code
331 opening/creating the file descriptor, as the application may not even be
332 aware of the fd's.
333
334 To avoid this problem, userspace must have a way to request O_CLOEXEC
335 flag be set when the dma-buf fd is created. So any API provided by
336 the exporting driver to create a dmabuf fd must provide a way to let
337 userspace control setting of O_CLOEXEC flag passed in to dma_buf_fd().
338
226References: 339References:
227[1] struct dma_buf_ops in include/linux/dma-buf.h 340[1] struct dma_buf_ops in include/linux/dma-buf.h
228[2] All interfaces mentioned above defined in include/linux/dma-buf.h 341[2] All interfaces mentioned above defined in include/linux/dma-buf.h
342[3] https://lwn.net/Articles/236486/
diff --git a/Documentation/dmaengine.txt b/Documentation/dmaengine.txt
index bbe6cb3d1856..879b6e31e2da 100644
--- a/Documentation/dmaengine.txt
+++ b/Documentation/dmaengine.txt
@@ -63,7 +63,7 @@ The slave DMA usage consists of following steps:
63 struct dma_slave_config *config) 63 struct dma_slave_config *config)
64 64
65 Please see the dma_slave_config structure definition in dmaengine.h 65 Please see the dma_slave_config structure definition in dmaengine.h
66 for a detailed explaination of the struct members. Please note 66 for a detailed explanation of the struct members. Please note
67 that the 'direction' member will be going away as it duplicates the 67 that the 'direction' member will be going away as it duplicates the
68 direction given in the prepare call. 68 direction given in the prepare call.
69 69
diff --git a/Documentation/dontdiff b/Documentation/dontdiff
index 0c083c5c2faa..b4a898f43c37 100644
--- a/Documentation/dontdiff
+++ b/Documentation/dontdiff
@@ -158,7 +158,6 @@ logo_*.c
158logo_*_clut224.c 158logo_*_clut224.c
159logo_*_mono.c 159logo_*_mono.c
160lxdialog 160lxdialog
161mach
162mach-types 161mach-types
163mach-types.h 162mach-types.h
164machtypes.h 163machtypes.h
diff --git a/Documentation/dvb/cards.txt b/Documentation/dvb/cards.txt
index cc09187a5db7..97709e9a3076 100644
--- a/Documentation/dvb/cards.txt
+++ b/Documentation/dvb/cards.txt
@@ -119,4 +119,5 @@ o Cards based on the Phillips saa7134 PCI bridge:
119 - Compro Videomate DVB-T300 119 - Compro Videomate DVB-T300
120 - Compro Videomate DVB-T200 120 - Compro Videomate DVB-T200
121 - AVerMedia AVerTVHD MCE A180 121 - AVerMedia AVerTVHD MCE A180
122 - KWorld PC150-U ATSC Hybrid
122 123
diff --git a/Documentation/dvb/lmedm04.txt b/Documentation/dvb/lmedm04.txt
index 10b5f0411386..f4b720a14675 100644
--- a/Documentation/dvb/lmedm04.txt
+++ b/Documentation/dvb/lmedm04.txt
@@ -66,5 +66,16 @@ dd if=US290D.sys ibs=1 skip=36856 count=3976 of=dvb-usb-lme2510-s0194.fw
66For LME2510C 66For LME2510C
67dd if=US290D.sys ibs=1 skip=33152 count=3697 of=dvb-usb-lme2510c-s0194.fw 67dd if=US290D.sys ibs=1 skip=33152 count=3697 of=dvb-usb-lme2510c-s0194.fw
68 68
69---------------------------------------------------------------------
70
71The m88rs2000 tuner driver can be found in windows/system32/drivers
72
73US2B0D.sys (dated 29 Jun 2010)
74
75dd if=US2B0D.sys ibs=1 skip=34432 count=3871 of=dvb-usb-lme2510c-rs2000.fw
76
77We need to modify id of rs2000 firmware or it will warm boot id 3344:1120.
78
79echo -ne \\xF0\\x22 | dd conv=notrunc bs=1 count=2 seek=266 of=dvb-usb-lme2510c-rs2000.fw
69 80
70Copy the firmware file(s) to /lib/firmware 81Copy the firmware file(s) to /lib/firmware
diff --git a/Documentation/dynamic-debug-howto.txt b/Documentation/dynamic-debug-howto.txt
index f959909d7154..74e6c7782678 100644
--- a/Documentation/dynamic-debug-howto.txt
+++ b/Documentation/dynamic-debug-howto.txt
@@ -12,7 +12,7 @@ dynamically enabled per-callsite.
12Dynamic debug has even more useful features: 12Dynamic debug has even more useful features:
13 13
14 * Simple query language allows turning on and off debugging statements by 14 * Simple query language allows turning on and off debugging statements by
15 matching any combination of: 15 matching any combination of 0 or 1 of:
16 16
17 - source filename 17 - source filename
18 - function name 18 - function name
@@ -79,31 +79,24 @@ Command Language Reference
79========================== 79==========================
80 80
81At the lexical level, a command comprises a sequence of words separated 81At the lexical level, a command comprises a sequence of words separated
82by whitespace characters. Note that newlines are treated as word 82by spaces or tabs. So these are all equivalent:
83separators and do *not* end a command or allow multiple commands to
84be done together. So these are all equivalent:
85 83
86nullarbor:~ # echo -c 'file svcsock.c line 1603 +p' > 84nullarbor:~ # echo -c 'file svcsock.c line 1603 +p' >
87 <debugfs>/dynamic_debug/control 85 <debugfs>/dynamic_debug/control
88nullarbor:~ # echo -c ' file svcsock.c line 1603 +p ' > 86nullarbor:~ # echo -c ' file svcsock.c line 1603 +p ' >
89 <debugfs>/dynamic_debug/control 87 <debugfs>/dynamic_debug/control
90nullarbor:~ # echo -c 'file svcsock.c\nline 1603 +p' >
91 <debugfs>/dynamic_debug/control
92nullarbor:~ # echo -n 'file svcsock.c line 1603 +p' > 88nullarbor:~ # echo -n 'file svcsock.c line 1603 +p' >
93 <debugfs>/dynamic_debug/control 89 <debugfs>/dynamic_debug/control
94 90
95Commands are bounded by a write() system call. If you want to do 91Command submissions are bounded by a write() system call.
96multiple commands you need to do a separate "echo" for each, like: 92Multiple commands can be written together, separated by ';' or '\n'.
97 93
98nullarbor:~ # echo 'file svcsock.c line 1603 +p' > /proc/dprintk ;\ 94 ~# echo "func pnpacpi_get_resources +p; func pnp_assign_mem +p" \
99> echo 'file svcsock.c line 1563 +p' > /proc/dprintk 95 > <debugfs>/dynamic_debug/control
100 96
101or even like: 97If your query set is big, you can batch them too:
102 98
103nullarbor:~ # ( 99 ~# cat query-batch-file > <debugfs>/dynamic_debug/control
104> echo 'file svcsock.c line 1603 +p' ;\
105> echo 'file svcsock.c line 1563 +p' ;\
106> ) > /proc/dprintk
107 100
108At the syntactical level, a command comprises a sequence of match 101At the syntactical level, a command comprises a sequence of match
109specifications, followed by a flags change specification. 102specifications, followed by a flags change specification.
@@ -144,11 +137,12 @@ func
144 func svc_tcp_accept 137 func svc_tcp_accept
145 138
146file 139file
147 The given string is compared against either the full 140 The given string is compared against either the full pathname, the
148 pathname or the basename of the source file of each 141 src-root relative pathname, or the basename of the source file of
149 callsite. Examples: 142 each callsite. Examples:
150 143
151 file svcsock.c 144 file svcsock.c
145 file kernel/freezer.c
152 file /usr/src/packages/BUILD/sgi-enhancednfs-1.4/default/net/sunrpc/svcsock.c 146 file /usr/src/packages/BUILD/sgi-enhancednfs-1.4/default/net/sunrpc/svcsock.c
153 147
154module 148module
diff --git a/Documentation/edac.txt b/Documentation/edac.txt
index 249822cde82b..fdcc49fad8e1 100644
--- a/Documentation/edac.txt
+++ b/Documentation/edac.txt
@@ -334,8 +334,8 @@ Sdram memory scrubbing rate:
334 334
335 Reading the file will return the actual scrubbing rate employed. 335 Reading the file will return the actual scrubbing rate employed.
336 336
337 If configuration fails or memory scrubbing is not implemented, the value 337 If configuration fails or memory scrubbing is not implemented, accessing
338 of the attribute file will be -1. 338 that attribute will fail.
339 339
340 340
341 341
diff --git a/Documentation/fb/intel810.txt b/Documentation/fb/intel810.txt
index be3e7836abef..a8e9f5bca6f3 100644
--- a/Documentation/fb/intel810.txt
+++ b/Documentation/fb/intel810.txt
@@ -211,7 +211,7 @@ Using the same setup as described above, load the module like this:
211 modprobe i810fb vram=2 xres=1024 bpp=8 hsync1=30 hsync2=55 vsync1=50 \ 211 modprobe i810fb vram=2 xres=1024 bpp=8 hsync1=30 hsync2=55 vsync1=50 \
212 vsync2=85 accel=1 mtrr=1 212 vsync2=85 accel=1 mtrr=1
213 213
214Or just add the following to /etc/modprobe.conf 214Or just add the following to a configuration file in /etc/modprobe.d/
215 215
216 options i810fb vram=2 xres=1024 bpp=16 hsync1=30 hsync2=55 vsync1=50 \ 216 options i810fb vram=2 xres=1024 bpp=16 hsync1=30 hsync2=55 vsync1=50 \
217 vsync2=85 accel=1 mtrr=1 217 vsync2=85 accel=1 mtrr=1
diff --git a/Documentation/fb/intelfb.txt b/Documentation/fb/intelfb.txt
index dd9e944ea628..feac4e4d6968 100644
--- a/Documentation/fb/intelfb.txt
+++ b/Documentation/fb/intelfb.txt
@@ -120,7 +120,7 @@ Using the same setup as described above, load the module like this:
120 120
121 modprobe intelfb mode=800x600-32@75 vram=8 accel=1 hwcursor=1 121 modprobe intelfb mode=800x600-32@75 vram=8 accel=1 hwcursor=1
122 122
123Or just add the following to /etc/modprobe.conf 123Or just add the following to a configuration file in /etc/modprobe.d/
124 124
125 options intelfb mode=800x600-32@75 vram=8 accel=1 hwcursor=1 125 options intelfb mode=800x600-32@75 vram=8 accel=1 hwcursor=1
126 126
diff --git a/Documentation/fb/matroxfb.txt b/Documentation/fb/matroxfb.txt
index e5ce8a1a978b..b95f5bb522f2 100644
--- a/Documentation/fb/matroxfb.txt
+++ b/Documentation/fb/matroxfb.txt
@@ -177,8 +177,8 @@ sgram - tells to driver that you have Gxx0 with SGRAM memory. It has no
177 effect without `init'. 177 effect without `init'.
178sdram - tells to driver that you have Gxx0 with SDRAM memory. 178sdram - tells to driver that you have Gxx0 with SDRAM memory.
179 It is a default. 179 It is a default.
180inv24 - change timings parameters for 24bpp modes on Millenium and 180inv24 - change timings parameters for 24bpp modes on Millennium and
181 Millenium II. Specify this if you see strange color shadows around 181 Millennium II. Specify this if you see strange color shadows around
182 characters. 182 characters.
183noinv24 - use standard timings. It is the default. 183noinv24 - use standard timings. It is the default.
184inverse - invert colors on screen (for LCD displays) 184inverse - invert colors on screen (for LCD displays)
@@ -204,9 +204,9 @@ grayscale - enable grayscale summing. It works in PSEUDOCOLOR modes (text,
204 can paint colors. 204 can paint colors.
205nograyscale - disable grayscale summing. It is default. 205nograyscale - disable grayscale summing. It is default.
206cross4MB - enables that pixel line can cross 4MB boundary. It is default for 206cross4MB - enables that pixel line can cross 4MB boundary. It is default for
207 non-Millenium. 207 non-Millennium.
208nocross4MB - pixel line must not cross 4MB boundary. It is default for 208nocross4MB - pixel line must not cross 4MB boundary. It is default for
209 Millenium I or II, because of these devices have hardware 209 Millennium I or II, because of these devices have hardware
210 limitations which do not allow this. But this option is 210 limitations which do not allow this. But this option is
211 incompatible with some (if not all yet released) versions of 211 incompatible with some (if not all yet released) versions of
212 XF86_FBDev. 212 XF86_FBDev.
diff --git a/Documentation/feature-removal-schedule.txt b/Documentation/feature-removal-schedule.txt
index a0ffac029a0d..709e08e9a222 100644
--- a/Documentation/feature-removal-schedule.txt
+++ b/Documentation/feature-removal-schedule.txt
@@ -6,14 +6,6 @@ be removed from this file.
6 6
7--------------------------- 7---------------------------
8 8
9What: x86 floppy disable_hlt
10When: 2012
11Why: ancient workaround of dubious utility clutters the
12 code used by everybody else.
13Who: Len Brown <len.brown@intel.com>
14
15---------------------------
16
17What: CONFIG_APM_CPU_IDLE, and its ability to call APM BIOS in idle 9What: CONFIG_APM_CPU_IDLE, and its ability to call APM BIOS in idle
18When: 2012 10When: 2012
19Why: This optional sub-feature of APM is of dubious reliability, 11Why: This optional sub-feature of APM is of dubious reliability,
@@ -513,14 +505,29 @@ Who: Bjorn Helgaas <bhelgaas@google.com>
513 505
514---------------------------- 506----------------------------
515 507
516What: The CAP9 SoC family will be removed 508What: Low Performance USB Block driver ("CONFIG_BLK_DEV_UB")
517When: 3.4 509When: 3.6
518Files: arch/arm/mach-at91/at91cap9.c 510Why: This driver provides support for USB storage devices like "USB
519 arch/arm/mach-at91/at91cap9_devices.c 511 sticks". As of now, it is deactivated in Debian, Fedora and
520 arch/arm/mach-at91/include/mach/at91cap9.h 512 Ubuntu. All current users can switch over to usb-storage
521 arch/arm/mach-at91/include/mach/at91cap9_matrix.h 513 (CONFIG_USB_STORAGE) which only drawback is the additional SCSI
522 arch/arm/mach-at91/include/mach/at91cap9_ddrsdr.h 514 stack.
523 arch/arm/mach-at91/board-cap9adk.c 515Who: Sebastian Andrzej Siewior <sebastian@breakpoint.cc>
524Why: The code is not actively maintained and platforms are now hard to find. 516
525Who: Nicolas Ferre <nicolas.ferre@atmel.com> 517----------------------------
526 Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> 518
519What: kmap_atomic(page, km_type)
520When: 3.5
521Why: The old kmap_atomic() with two arguments is deprecated, we only
522 keep it for backward compatibility for few cycles and then drop it.
523Who: Cong Wang <amwang@redhat.com>
524
525----------------------------
526
527What: get_robust_list syscall
528When: 2013
529Why: There appear to be no production users of the get_robust_list syscall,
530 and it runs the risk of leaking address locations, allowing the bypass
531 of ASLR. It was only ever intended for debugging, so it should be
532 removed.
533Who: Kees Cook <keescook@chromium.org>
diff --git a/Documentation/filesystems/debugfs.txt b/Documentation/filesystems/debugfs.txt
index 6872c91bce35..7a34f827989c 100644
--- a/Documentation/filesystems/debugfs.txt
+++ b/Documentation/filesystems/debugfs.txt
@@ -14,7 +14,10 @@ Debugfs is typically mounted with a command like:
14 14
15 mount -t debugfs none /sys/kernel/debug 15 mount -t debugfs none /sys/kernel/debug
16 16
17(Or an equivalent /etc/fstab line). 17(Or an equivalent /etc/fstab line).
18The debugfs root directory is accessible by anyone by default. To
19restrict access to the tree the "uid", "gid" and "mode" mount
20options can be used.
18 21
19Note that the debugfs API is exported GPL-only to modules. 22Note that the debugfs API is exported GPL-only to modules.
20 23
@@ -133,7 +136,7 @@ file.
133 void __iomem *base; 136 void __iomem *base;
134 }; 137 };
135 138
136 struct dentry *debugfs_create_regset32(const char *name, mode_t mode, 139 struct dentry *debugfs_create_regset32(const char *name, umode_t mode,
137 struct dentry *parent, 140 struct dentry *parent,
138 struct debugfs_regset32 *regset); 141 struct debugfs_regset32 *regset);
139 142
diff --git a/Documentation/filesystems/ext4.txt b/Documentation/filesystems/ext4.txt
index 10ec4639f152..1b7f9acbcbbe 100644
--- a/Documentation/filesystems/ext4.txt
+++ b/Documentation/filesystems/ext4.txt
@@ -144,9 +144,6 @@ journal_async_commit Commit block can be written to disk without waiting
144 mount the device. This will enable 'journal_checksum' 144 mount the device. This will enable 'journal_checksum'
145 internally. 145 internally.
146 146
147journal=update Update the ext4 file system's journal to the current
148 format.
149
150journal_dev=devnum When the external journal device's major/minor numbers 147journal_dev=devnum When the external journal device's major/minor numbers
151 have changed, this option allows the user to specify 148 have changed, this option allows the user to specify
152 the new journal location. The journal device is 149 the new journal location. The journal device is
@@ -308,7 +305,7 @@ min_batch_time=usec This parameter sets the commit time (as
308 fast disks, at the cost of increasing latency. 305 fast disks, at the cost of increasing latency.
309 306
310journal_ioprio=prio The I/O priority (from 0 to 7, where 0 is the 307journal_ioprio=prio The I/O priority (from 0 to 7, where 0 is the
311 highest priorty) which should be used for I/O 308 highest priority) which should be used for I/O
312 operations submitted by kjournald2 during a 309 operations submitted by kjournald2 during a
313 commit operation. This defaults to 3, which is 310 commit operation. This defaults to 3, which is
314 a slightly higher priority than the default I/O 311 a slightly higher priority than the default I/O
@@ -343,7 +340,7 @@ noinit_itable Do not initialize any uninitialized inode table
343init_itable=n The lazy itable init code will wait n times the 340init_itable=n The lazy itable init code will wait n times the
344 number of milliseconds it took to zero out the 341 number of milliseconds it took to zero out the
345 previous block group's inode table. This 342 previous block group's inode table. This
346 minimizes the impact on the systme performance 343 minimizes the impact on the system performance
347 while file system's inode table is being initialized. 344 while file system's inode table is being initialized.
348 345
349discard Controls whether ext4 should issue discard/TRIM 346discard Controls whether ext4 should issue discard/TRIM
@@ -356,11 +353,6 @@ nouid32 Disables 32-bit UIDs and GIDs. This is for
356 interoperability with older kernels which only 353 interoperability with older kernels which only
357 store and expect 16-bit values. 354 store and expect 16-bit values.
358 355
359resize Allows to resize filesystem to the end of the last
360 existing block group, further resize has to be done
361 with resize2fs either online, or offline. It can be
362 used only with conjunction with remount.
363
364block_validity This options allows to enables/disables the in-kernel 356block_validity This options allows to enables/disables the in-kernel
365noblock_validity facility for tracking filesystem metadata blocks 357noblock_validity facility for tracking filesystem metadata blocks
366 within internal data structures. This allows multi- 358 within internal data structures. This allows multi-
diff --git a/Documentation/filesystems/files.txt b/Documentation/filesystems/files.txt
index ac2facc50d2a..46dfc6b038c3 100644
--- a/Documentation/filesystems/files.txt
+++ b/Documentation/filesystems/files.txt
@@ -113,8 +113,8 @@ the fdtable structure -
113 if (fd >= 0) { 113 if (fd >= 0) {
114 /* locate_fd() may have expanded fdtable, load the ptr */ 114 /* locate_fd() may have expanded fdtable, load the ptr */
115 fdt = files_fdtable(files); 115 fdt = files_fdtable(files);
116 FD_SET(fd, fdt->open_fds); 116 __set_open_fd(fd, fdt);
117 FD_CLR(fd, fdt->close_on_exec); 117 __clear_close_on_exec(fd, fdt);
118 spin_unlock(&files->file_lock); 118 spin_unlock(&files->file_lock);
119 ..... 119 .....
120 120
diff --git a/Documentation/filesystems/gfs2-uevents.txt b/Documentation/filesystems/gfs2-uevents.txt
index d81889669293..19a19ebebc34 100644
--- a/Documentation/filesystems/gfs2-uevents.txt
+++ b/Documentation/filesystems/gfs2-uevents.txt
@@ -62,7 +62,7 @@ be fixed.
62 62
63The REMOVE uevent is generated at the end of an unsuccessful mount 63The REMOVE uevent is generated at the end of an unsuccessful mount
64or at the end of a umount of the filesystem. All REMOVE uevents will 64or at the end of a umount of the filesystem. All REMOVE uevents will
65have been preceded by at least an ADD uevent for the same fileystem, 65have been preceded by at least an ADD uevent for the same filesystem,
66and unlike the other uevents is generated automatically by the kernel's 66and unlike the other uevents is generated automatically by the kernel's
67kobject subsystem. 67kobject subsystem.
68 68
diff --git a/Documentation/filesystems/nfs/idmapper.txt b/Documentation/filesystems/nfs/idmapper.txt
index 120fd3cf7fd9..fe03d10bb79a 100644
--- a/Documentation/filesystems/nfs/idmapper.txt
+++ b/Documentation/filesystems/nfs/idmapper.txt
@@ -4,13 +4,21 @@ ID Mapper
4========= 4=========
5Id mapper is used by NFS to translate user and group ids into names, and to 5Id mapper is used by NFS to translate user and group ids into names, and to
6translate user and group names into ids. Part of this translation involves 6translate user and group names into ids. Part of this translation involves
7performing an upcall to userspace to request the information. Id mapper will 7performing an upcall to userspace to request the information. There are two
8user request-key to perform this upcall and cache the result. The program 8ways NFS could obtain this information: placing a call to /sbin/request-key
9/usr/sbin/nfs.idmap should be called by request-key, and will perform the 9or by placing a call to the rpc.idmap daemon.
10translation and initialize a key with the resulting information. 10
11NFS will attempt to call /sbin/request-key first. If this succeeds, the
12result will be cached using the generic request-key cache. This call should
13only fail if /etc/request-key.conf is not configured for the id_resolver key
14type, see the "Configuring" section below if you wish to use the request-key
15method.
16
17If the call to /sbin/request-key fails (if /etc/request-key.conf is not
18configured with the id_resolver key type), then the idmapper will ask the
19legacy rpc.idmap daemon for the id mapping. This result will be stored
20in a custom NFS idmap cache.
11 21
12 NFS_USE_NEW_IDMAPPER must be selected when configuring the kernel to use this
13 feature.
14 22
15=========== 23===========
16Configuring 24Configuring
diff --git a/Documentation/filesystems/nfs/pnfs.txt b/Documentation/filesystems/nfs/pnfs.txt
index 983e14abe7e9..c7919c6e3bea 100644
--- a/Documentation/filesystems/nfs/pnfs.txt
+++ b/Documentation/filesystems/nfs/pnfs.txt
@@ -53,3 +53,57 @@ lseg maintains an extra reference corresponding to the NFS_LSEG_VALID
53bit which holds it in the pnfs_layout_hdr's list. When the final lseg 53bit which holds it in the pnfs_layout_hdr's list. When the final lseg
54is removed from the pnfs_layout_hdr's list, the NFS_LAYOUT_DESTROYED 54is removed from the pnfs_layout_hdr's list, the NFS_LAYOUT_DESTROYED
55bit is set, preventing any new lsegs from being added. 55bit is set, preventing any new lsegs from being added.
56
57layout drivers
58--------------
59
60PNFS utilizes what is called layout drivers. The STD defines 3 basic
61layout types: "files" "objects" and "blocks". For each of these types
62there is a layout-driver with a common function-vectors table which
63are called by the nfs-client pnfs-core to implement the different layout
64types.
65
66Files-layout-driver code is in: fs/nfs/nfs4filelayout.c && nfs4filelayoutdev.c
67Objects-layout-deriver code is in: fs/nfs/objlayout/.. directory
68Blocks-layout-deriver code is in: fs/nfs/blocklayout/.. directory
69
70objects-layout setup
71--------------------
72
73As part of the full STD implementation the objlayoutdriver.ko needs, at times,
74to automatically login to yet undiscovered iscsi/osd devices. For this the
75driver makes up-calles to a user-mode script called *osd_login*
76
77The path_name of the script to use is by default:
78 /sbin/osd_login.
79This name can be overridden by the Kernel module parameter:
80 objlayoutdriver.osd_login_prog
81
82If Kernel does not find the osd_login_prog path it will zero it out
83and will not attempt farther logins. An admin can then write new value
84to the objlayoutdriver.osd_login_prog Kernel parameter to re-enable it.
85
86The /sbin/osd_login is part of the nfs-utils package, and should usually
87be installed on distributions that support this Kernel version.
88
89The API to the login script is as follows:
90 Usage: $0 -u <URI> -o <OSDNAME> -s <SYSTEMID>
91 Options:
92 -u target uri e.g. iscsi://<ip>:<port>
93 (allways exists)
94 (More protocols can be defined in the future.
95 The client does not interpret this string it is
96 passed unchanged as recieved from the Server)
97 -o osdname of the requested target OSD
98 (Might be empty)
99 (A string which denotes the OSD name, there is a
100 limit of 64 chars on this string)
101 -s systemid of the requested target OSD
102 (Might be empty)
103 (This string, if not empty is always an hex
104 representation of the 20 bytes osd_system_id)
105
106blocks-layout setup
107-------------------
108
109TODO: Document the setup needs of the blocks layout driver
diff --git a/Documentation/filesystems/pohmelfs/network_protocol.txt b/Documentation/filesystems/pohmelfs/network_protocol.txt
index 65e03dd44823..c680b4b5353d 100644
--- a/Documentation/filesystems/pohmelfs/network_protocol.txt
+++ b/Documentation/filesystems/pohmelfs/network_protocol.txt
@@ -20,7 +20,7 @@ Commands can be embedded into transaction command (which in turn has own command
20so one can extend protocol as needed without breaking backward compatibility as long 20so one can extend protocol as needed without breaking backward compatibility as long
21as old commands are supported. All string lengths include tail 0 byte. 21as old commands are supported. All string lengths include tail 0 byte.
22 22
23All commands are transferred over the network in big-endian. CPU endianess is used at the end peers. 23All commands are transferred over the network in big-endian. CPU endianness is used at the end peers.
24 24
25@cmd - command number, which specifies command to be processed. Following 25@cmd - command number, which specifies command to be processed. Following
26 commands are used currently: 26 commands are used currently:
diff --git a/Documentation/filesystems/porting b/Documentation/filesystems/porting
index b4a3d765ff9a..74acd9618819 100644
--- a/Documentation/filesystems/porting
+++ b/Documentation/filesystems/porting
@@ -429,3 +429,9 @@ filemap_write_and_wait_range() so that all dirty pages are synced out properly.
429You must also keep in mind that ->fsync() is not called with i_mutex held 429You must also keep in mind that ->fsync() is not called with i_mutex held
430anymore, so if you require i_mutex locking you must make sure to take it and 430anymore, so if you require i_mutex locking you must make sure to take it and
431release it yourself. 431release it yourself.
432
433--
434[mandatory]
435 d_alloc_root() is gone, along with a lot of bugs caused by code
436misusing it. Replacement: d_make_root(inode). The difference is,
437d_make_root() drops the reference to inode if dentry allocation fails.
diff --git a/Documentation/filesystems/proc.txt b/Documentation/filesystems/proc.txt
index a76a26a1db8a..b7413cb46dcb 100644
--- a/Documentation/filesystems/proc.txt
+++ b/Documentation/filesystems/proc.txt
@@ -290,7 +290,7 @@ Table 1-4: Contents of the stat files (as of 2.6.30-rc7)
290 rsslim current limit in bytes on the rss 290 rsslim current limit in bytes on the rss
291 start_code address above which program text can run 291 start_code address above which program text can run
292 end_code address below which program text can run 292 end_code address below which program text can run
293 start_stack address of the start of the stack 293 start_stack address of the start of the main process stack
294 esp current value of ESP 294 esp current value of ESP
295 eip current value of EIP 295 eip current value of EIP
296 pending bitmap of pending signals 296 pending bitmap of pending signals
@@ -325,7 +325,7 @@ address perms offset dev inode pathname
325a7cb1000-a7cb2000 ---p 00000000 00:00 0 325a7cb1000-a7cb2000 ---p 00000000 00:00 0
326a7cb2000-a7eb2000 rw-p 00000000 00:00 0 326a7cb2000-a7eb2000 rw-p 00000000 00:00 0
327a7eb2000-a7eb3000 ---p 00000000 00:00 0 327a7eb2000-a7eb3000 ---p 00000000 00:00 0
328a7eb3000-a7ed5000 rw-p 00000000 00:00 0 328a7eb3000-a7ed5000 rw-p 00000000 00:00 0 [stack:1001]
329a7ed5000-a8008000 r-xp 00000000 03:00 4222 /lib/libc.so.6 329a7ed5000-a8008000 r-xp 00000000 03:00 4222 /lib/libc.so.6
330a8008000-a800a000 r--p 00133000 03:00 4222 /lib/libc.so.6 330a8008000-a800a000 r--p 00133000 03:00 4222 /lib/libc.so.6
331a800a000-a800b000 rw-p 00135000 03:00 4222 /lib/libc.so.6 331a800a000-a800b000 rw-p 00135000 03:00 4222 /lib/libc.so.6
@@ -357,11 +357,39 @@ is not associated with a file:
357 357
358 [heap] = the heap of the program 358 [heap] = the heap of the program
359 [stack] = the stack of the main process 359 [stack] = the stack of the main process
360 [stack:1001] = the stack of the thread with tid 1001
360 [vdso] = the "virtual dynamic shared object", 361 [vdso] = the "virtual dynamic shared object",
361 the kernel system call handler 362 the kernel system call handler
362 363
363 or if empty, the mapping is anonymous. 364 or if empty, the mapping is anonymous.
364 365
366The /proc/PID/task/TID/maps is a view of the virtual memory from the viewpoint
367of the individual tasks of a process. In this file you will see a mapping marked
368as [stack] if that task sees it as a stack. This is a key difference from the
369content of /proc/PID/maps, where you will see all mappings that are being used
370as stack by all of those tasks. Hence, for the example above, the task-level
371map, i.e. /proc/PID/task/TID/maps for thread 1001 will look like this:
372
37308048000-08049000 r-xp 00000000 03:00 8312 /opt/test
37408049000-0804a000 rw-p 00001000 03:00 8312 /opt/test
3750804a000-0806b000 rw-p 00000000 00:00 0 [heap]
376a7cb1000-a7cb2000 ---p 00000000 00:00 0
377a7cb2000-a7eb2000 rw-p 00000000 00:00 0
378a7eb2000-a7eb3000 ---p 00000000 00:00 0
379a7eb3000-a7ed5000 rw-p 00000000 00:00 0 [stack]
380a7ed5000-a8008000 r-xp 00000000 03:00 4222 /lib/libc.so.6
381a8008000-a800a000 r--p 00133000 03:00 4222 /lib/libc.so.6
382a800a000-a800b000 rw-p 00135000 03:00 4222 /lib/libc.so.6
383a800b000-a800e000 rw-p 00000000 00:00 0
384a800e000-a8022000 r-xp 00000000 03:00 14462 /lib/libpthread.so.0
385a8022000-a8023000 r--p 00013000 03:00 14462 /lib/libpthread.so.0
386a8023000-a8024000 rw-p 00014000 03:00 14462 /lib/libpthread.so.0
387a8024000-a8027000 rw-p 00000000 00:00 0
388a8027000-a8043000 r-xp 00000000 03:00 8317 /lib/ld-linux.so.2
389a8043000-a8044000 r--p 0001b000 03:00 8317 /lib/ld-linux.so.2
390a8044000-a8045000 rw-p 0001c000 03:00 8317 /lib/ld-linux.so.2
391aff35000-aff4a000 rw-p 00000000 00:00 0
392ffffe000-fffff000 r-xp 00000000 00:00 0 [vdso]
365 393
366The /proc/PID/smaps is an extension based on maps, showing the memory 394The /proc/PID/smaps is an extension based on maps, showing the memory
367consumption for each of the process's mappings. For each of mappings there 395consumption for each of the process's mappings. For each of mappings there
diff --git a/Documentation/filesystems/qnx6.txt b/Documentation/filesystems/qnx6.txt
new file mode 100644
index 000000000000..050223ea03c7
--- /dev/null
+++ b/Documentation/filesystems/qnx6.txt
@@ -0,0 +1,174 @@
1The QNX6 Filesystem
2===================
3
4The qnx6fs is used by newer QNX operating system versions. (e.g. Neutrino)
5It got introduced in QNX 6.4.0 and is used default since 6.4.1.
6
7Option
8======
9
10mmi_fs Mount filesystem as used for example by Audi MMI 3G system
11
12Specification
13=============
14
15qnx6fs shares many properties with traditional Unix filesystems. It has the
16concepts of blocks, inodes and directories.
17On QNX it is possible to create little endian and big endian qnx6 filesystems.
18This feature makes it possible to create and use a different endianness fs
19for the target (QNX is used on quite a range of embedded systems) plattform
20running on a different endianess.
21The Linux driver handles endianness transparently. (LE and BE)
22
23Blocks
24------
25
26The space in the device or file is split up into blocks. These are a fixed
27size of 512, 1024, 2048 or 4096, which is decided when the filesystem is
28created.
29Blockpointers are 32bit, so the maximum space that can be adressed is
302^32 * 4096 bytes or 16TB
31
32The superblocks
33---------------
34
35The superblock contains all global information about the filesystem.
36Each qnx6fs got two superblocks, each one having a 64bit serial number.
37That serial number is used to identify the "active" superblock.
38In write mode with reach new snapshot (after each synchronous write), the
39serial of the new master superblock is increased (old superblock serial + 1)
40
41So basically the snapshot functionality is realized by an atomic final
42update of the serial number. Before updating that serial, all modifications
43are done by copying all modified blocks during that specific write request
44(or period) and building up a new (stable) filesystem structure under the
45inactive superblock.
46
47Each superblock holds a set of root inodes for the different filesystem
48parts. (Inode, Bitmap and Longfilenames)
49Each of these root nodes holds information like total size of the stored
50data and the adressing levels in that specific tree.
51If the level value is 0, up to 16 direct blocks can be adressed by each
52node.
53Level 1 adds an additional indirect adressing level where each indirect
54adressing block holds up to blocksize / 4 bytes pointers to data blocks.
55Level 2 adds an additional indirect adressig block level (so, already up
56to 16 * 256 * 256 = 1048576 blocks that can be adressed by such a tree)a
57
58Unused block pointers are always set to ~0 - regardless of root node,
59indirect adressing blocks or inodes.
60Data leaves are always on the lowest level. So no data is stored on upper
61tree levels.
62
63The first Superblock is located at 0x2000. (0x2000 is the bootblock size)
64The Audi MMI 3G first superblock directly starts at byte 0.
65Second superblock position can either be calculated from the superblock
66information (total number of filesystem blocks) or by taking the highest
67device address, zeroing the last 3 bytes and then substracting 0x1000 from
68that address.
69
700x1000 is the size reserved for each superblock - regardless of the
71blocksize of the filesystem.
72
73Inodes
74------
75
76Each object in the filesystem is represented by an inode. (index node)
77The inode structure contains pointers to the filesystem blocks which contain
78the data held in the object and all of the metadata about an object except
79its longname. (filenames longer than 27 characters)
80The metadata about an object includes the permissions, owner, group, flags,
81size, number of blocks used, access time, change time and modification time.
82
83Object mode field is POSIX format. (which makes things easier)
84
85There are also pointers to the first 16 blocks, if the object data can be
86adressed with 16 direct blocks.
87For more than 16 blocks an indirect adressing in form of another tree is
88used. (scheme is the same as the one used for the superblock root nodes)
89
90The filesize is stored 64bit. Inode counting starts with 1. (whilst long
91filename inodes start with 0)
92
93Directories
94-----------
95
96A directory is a filesystem object and has an inode just like a file.
97It is a specially formatted file containing records which associate each
98name with an inode number.
99'.' inode number points to the directory inode
100'..' inode number points to the parent directory inode
101Eeach filename record additionally got a filename length field.
102
103One special case are long filenames or subdirectory names.
104These got set a filename length field of 0xff in the corresponding directory
105record plus the longfile inode number also stored in that record.
106With that longfilename inode number, the longfilename tree can be walked
107starting with the superblock longfilename root node pointers.
108
109Special files
110-------------
111
112Symbolic links are also filesystem objects with inodes. They got a specific
113bit in the inode mode field identifying them as symbolic link.
114The directory entry file inode pointer points to the target file inode.
115
116Hard links got an inode, a directory entry, but a specific mode bit set,
117no block pointers and the directory file record pointing to the target file
118inode.
119
120Character and block special devices do not exist in QNX as those files
121are handled by the QNX kernel/drivers and created in /dev independant of the
122underlaying filesystem.
123
124Long filenames
125--------------
126
127Long filenames are stored in a seperate adressing tree. The staring point
128is the longfilename root node in the active superblock.
129Each data block (tree leaves) holds one long filename. That filename is
130limited to 510 bytes. The first two starting bytes are used as length field
131for the actual filename.
132If that structure shall fit for all allowed blocksizes, it is clear why there
133is a limit of 510 bytes for the actual filename stored.
134
135Bitmap
136------
137
138The qnx6fs filesystem allocation bitmap is stored in a tree under bitmap
139root node in the superblock and each bit in the bitmap represents one
140filesystem block.
141The first block is block 0, which starts 0x1000 after superblock start.
142So for a normal qnx6fs 0x3000 (bootblock + superblock) is the physical
143address at which block 0 is located.
144
145Bits at the end of the last bitmap block are set to 1, if the device is
146smaller than addressing space in the bitmap.
147
148Bitmap system area
149------------------
150
151The bitmap itself is devided into three parts.
152First the system area, that is split into two halfs.
153Then userspace.
154
155The requirement for a static, fixed preallocated system area comes from how
156qnx6fs deals with writes.
157Each superblock got it's own half of the system area. So superblock #1
158always uses blocks from the lower half whilst superblock #2 just writes to
159blocks represented by the upper half bitmap system area bits.
160
161Bitmap blocks, Inode blocks and indirect addressing blocks for those two
162tree structures are treated as system blocks.
163
164The rational behind that is that a write request can work on a new snapshot
165(system area of the inactive - resp. lower serial numbered superblock) while
166at the same time there is still a complete stable filesystem structer in the
167other half of the system area.
168
169When finished with writing (a sync write is completed, the maximum sync leap
170time or a filesystem sync is requested), serial of the previously inactive
171superblock atomically is increased and the fs switches over to that - then
172stable declared - superblock.
173
174For all data outside the system area, blocks are just copied while writing.
diff --git a/Documentation/filesystems/ramfs-rootfs-initramfs.txt b/Documentation/filesystems/ramfs-rootfs-initramfs.txt
index a8273d5fad20..59b4a0962e0f 100644
--- a/Documentation/filesystems/ramfs-rootfs-initramfs.txt
+++ b/Documentation/filesystems/ramfs-rootfs-initramfs.txt
@@ -297,7 +297,7 @@ the above threads) is:
297 either way about the archive format, and there are alternative tools, 297 either way about the archive format, and there are alternative tools,
298 such as: 298 such as:
299 299
300 http://freshmeat.net/projects/afio/ 300 http://freecode.com/projects/afio
301 301
3022) The cpio archive format chosen by the kernel is simpler and cleaner (and 3022) The cpio archive format chosen by the kernel is simpler and cleaner (and
303 thus easier to create and parse) than any of the (literally dozens of) 303 thus easier to create and parse) than any of the (literally dozens of)
diff --git a/Documentation/filesystems/vfs.txt b/Documentation/filesystems/vfs.txt
index 3d9393b845b8..e916e3d36488 100644
--- a/Documentation/filesystems/vfs.txt
+++ b/Documentation/filesystems/vfs.txt
@@ -993,7 +993,7 @@ struct dentry_operations {
993 993
994 If the 'rcu_walk' parameter is true, then the caller is doing a 994 If the 'rcu_walk' parameter is true, then the caller is doing a
995 pathwalk in RCU-walk mode. Sleeping is not permitted in this mode, 995 pathwalk in RCU-walk mode. Sleeping is not permitted in this mode,
996 and the caller can be asked to leave it and call again by returing 996 and the caller can be asked to leave it and call again by returning
997 -ECHILD. 997 -ECHILD.
998 998
999 This function is only used if DCACHE_MANAGE_TRANSIT is set on the 999 This function is only used if DCACHE_MANAGE_TRANSIT is set on the
diff --git a/Documentation/gpio.txt b/Documentation/gpio.txt
index 792faa3c06cf..620a07844e8c 100644
--- a/Documentation/gpio.txt
+++ b/Documentation/gpio.txt
@@ -271,9 +271,26 @@ Some platforms may also use knowledge about what GPIOs are active for
271power management, such as by powering down unused chip sectors and, more 271power management, such as by powering down unused chip sectors and, more
272easily, gating off unused clocks. 272easily, gating off unused clocks.
273 273
274Note that requesting a GPIO does NOT cause it to be configured in any 274For GPIOs that use pins known to the pinctrl subsystem, that subsystem should
275way; it just marks that GPIO as in use. Separate code must handle any 275be informed of their use; a gpiolib driver's .request() operation may call
276pin setup (e.g. controlling which pin the GPIO uses, pullup/pulldown). 276pinctrl_request_gpio(), and a gpiolib driver's .free() operation may call
277pinctrl_free_gpio(). The pinctrl subsystem allows a pinctrl_request_gpio()
278to succeed concurrently with a pin or pingroup being "owned" by a device for
279pin multiplexing.
280
281Any programming of pin multiplexing hardware that is needed to route the
282GPIO signal to the appropriate pin should occur within a GPIO driver's
283.direction_input() or .direction_output() operations, and occur after any
284setup of an output GPIO's value. This allows a glitch-free migration from a
285pin's special function to GPIO. This is sometimes required when using a GPIO
286to implement a workaround on signals typically driven by a non-GPIO HW block.
287
288Some platforms allow some or all GPIO signals to be routed to different pins.
289Similarly, other aspects of the GPIO or pin may need to be configured, such as
290pullup/pulldown. Platform software should arrange that any such details are
291configured prior to gpio_request() being called for those GPIOs, e.g. using
292the pinctrl subsystem's mapping table, so that GPIO users need not be aware
293of these details.
277 294
278Also note that it's your responsibility to have stopped using a GPIO 295Also note that it's your responsibility to have stopped using a GPIO
279before you free it. 296before you free it.
@@ -302,6 +319,8 @@ where 'flags' is currently defined to specify the following properties:
302 319
303 * GPIOF_INIT_LOW - as output, set initial level to LOW 320 * GPIOF_INIT_LOW - as output, set initial level to LOW
304 * GPIOF_INIT_HIGH - as output, set initial level to HIGH 321 * GPIOF_INIT_HIGH - as output, set initial level to HIGH
322 * GPIOF_OPEN_DRAIN - gpio pin is open drain type.
323 * GPIOF_OPEN_SOURCE - gpio pin is open source type.
305 324
306since GPIOF_INIT_* are only valid when configured as output, so group valid 325since GPIOF_INIT_* are only valid when configured as output, so group valid
307combinations as: 326combinations as:
@@ -310,8 +329,19 @@ combinations as:
310 * GPIOF_OUT_INIT_LOW - configured as output, initial level LOW 329 * GPIOF_OUT_INIT_LOW - configured as output, initial level LOW
311 * GPIOF_OUT_INIT_HIGH - configured as output, initial level HIGH 330 * GPIOF_OUT_INIT_HIGH - configured as output, initial level HIGH
312 331
313In the future, these flags can be extended to support more properties such 332When setting the flag as GPIOF_OPEN_DRAIN then it will assume that pins is
314as open-drain status. 333open drain type. Such pins will not be driven to 1 in output mode. It is
334require to connect pull-up on such pins. By enabling this flag, gpio lib will
335make the direction to input when it is asked to set value of 1 in output mode
336to make the pin HIGH. The pin is make to LOW by driving value 0 in output mode.
337
338When setting the flag as GPIOF_OPEN_SOURCE then it will assume that pins is
339open source type. Such pins will not be driven to 0 in output mode. It is
340require to connect pull-down on such pin. By enabling this flag, gpio lib will
341make the direction to input when it is asked to set value of 0 in output mode
342to make the pin LOW. The pin is make to HIGH by driving value 1 in output mode.
343
344In the future, these flags can be extended to support more properties.
315 345
316Further more, to ease the claim/release of multiple GPIOs, 'struct gpio' is 346Further more, to ease the claim/release of multiple GPIOs, 'struct gpio' is
317introduced to encapsulate all three fields as: 347introduced to encapsulate all three fields as:
diff --git a/Documentation/hwmon/adm1275 b/Documentation/hwmon/adm1275
index ab70d96d2dfd..2cfa25667123 100644
--- a/Documentation/hwmon/adm1275
+++ b/Documentation/hwmon/adm1275
@@ -2,6 +2,10 @@ Kernel driver adm1275
2===================== 2=====================
3 3
4Supported chips: 4Supported chips:
5 * Analog Devices ADM1075
6 Prefix: 'adm1075'
7 Addresses scanned: -
8 Datasheet: www.analog.com/static/imported-files/data_sheets/ADM1075.pdf
5 * Analog Devices ADM1275 9 * Analog Devices ADM1275
6 Prefix: 'adm1275' 10 Prefix: 'adm1275'
7 Addresses scanned: - 11 Addresses scanned: -
@@ -17,13 +21,13 @@ Author: Guenter Roeck <guenter.roeck@ericsson.com>
17Description 21Description
18----------- 22-----------
19 23
20This driver supports hardware montoring for Analog Devices ADM1275 and ADM1276 24This driver supports hardware montoring for Analog Devices ADM1075, ADM1275,
21Hot-Swap Controller and Digital Power Monitor. 25and ADM1276 Hot-Swap Controller and Digital Power Monitor.
22 26
23ADM1275 and ADM1276 are hot-swap controllers that allow a circuit board to be 27ADM1075, ADM1275, and ADM1276 are hot-swap controllers that allow a circuit
24removed from or inserted into a live backplane. They also feature current and 28board to be removed from or inserted into a live backplane. They also feature
25voltage readback via an integrated 12-bit analog-to-digital converter (ADC), 29current and voltage readback via an integrated 12-bit analog-to-digital
26accessed using a PMBus interface. 30converter (ADC), accessed using a PMBus interface.
27 31
28The driver is a client driver to the core PMBus driver. Please see 32The driver is a client driver to the core PMBus driver. Please see
29Documentation/hwmon/pmbus for details on PMBus client drivers. 33Documentation/hwmon/pmbus for details on PMBus client drivers.
@@ -36,6 +40,10 @@ This driver does not auto-detect devices. You will have to instantiate the
36devices explicitly. Please see Documentation/i2c/instantiating-devices for 40devices explicitly. Please see Documentation/i2c/instantiating-devices for
37details. 41details.
38 42
43The ADM1075, unlike many other PMBus devices, does not support internal voltage
44or current scaling. Reported voltages, currents, and power are raw measurements,
45and will typically have to be scaled.
46
39 47
40Platform data support 48Platform data support
41--------------------- 49---------------------
@@ -51,9 +59,10 @@ The following attributes are supported. Limits are read-write, history reset
51attributes are write-only, all other attributes are read-only. 59attributes are write-only, all other attributes are read-only.
52 60
53in1_label "vin1" or "vout1" depending on chip variant and 61in1_label "vin1" or "vout1" depending on chip variant and
54 configuration. 62 configuration. On ADM1075, vout1 reports the voltage on
63 the VAUX pin.
55in1_input Measured voltage. 64in1_input Measured voltage.
56in1_min Minumum Voltage. 65in1_min Minimum Voltage.
57in1_max Maximum voltage. 66in1_max Maximum voltage.
58in1_min_alarm Voltage low alarm. 67in1_min_alarm Voltage low alarm.
59in1_max_alarm Voltage high alarm. 68in1_max_alarm Voltage high alarm.
@@ -74,3 +83,10 @@ curr1_crit Critical maximum current. Depending on the chip
74curr1_crit_alarm Critical current high alarm. 83curr1_crit_alarm Critical current high alarm.
75curr1_highest Historical maximum current. 84curr1_highest Historical maximum current.
76curr1_reset_history Write any value to reset history. 85curr1_reset_history Write any value to reset history.
86
87power1_label "pin1"
88power1_input Input power.
89power1_reset_history Write any value to reset history.
90
91 Power attributes are supported on ADM1075 and ADM1276
92 only.
diff --git a/Documentation/hwmon/jc42 b/Documentation/hwmon/jc42
index a22ecf48f255..66ecb9fc8246 100644
--- a/Documentation/hwmon/jc42
+++ b/Documentation/hwmon/jc42
@@ -3,57 +3,50 @@ Kernel driver jc42
3 3
4Supported chips: 4Supported chips:
5 * Analog Devices ADT7408 5 * Analog Devices ADT7408
6 Prefix: 'adt7408'
7 Addresses scanned: I2C 0x18 - 0x1f
8 Datasheets: 6 Datasheets:
9 http://www.analog.com/static/imported-files/data_sheets/ADT7408.pdf 7 http://www.analog.com/static/imported-files/data_sheets/ADT7408.pdf
10 * IDT TSE2002B3, TS3000B3 8 * Atmel AT30TS00
11 Prefix: 'tse2002b3', 'ts3000b3'
12 Addresses scanned: I2C 0x18 - 0x1f
13 Datasheets: 9 Datasheets:
14 http://www.idt.com/products/getdoc.cfm?docid=18715691 10 http://www.atmel.com/Images/doc8585.pdf
15 http://www.idt.com/products/getdoc.cfm?docid=18715692 11 * IDT TSE2002B3, TSE2002GB2, TS3000B3, TS3000GB2
12 Datasheets:
13 http://www.idt.com/sites/default/files/documents/IDT_TSE2002B3C_DST_20100512_120303152056.pdf
14 http://www.idt.com/sites/default/files/documents/IDT_TSE2002GB2A1_DST_20111107_120303145914.pdf
15 http://www.idt.com/sites/default/files/documents/IDT_TS3000B3A_DST_20101129_120303152013.pdf
16 http://www.idt.com/sites/default/files/documents/IDT_TS3000GB2A1_DST_20111104_120303151012.pdf
16 * Maxim MAX6604 17 * Maxim MAX6604
17 Prefix: 'max6604'
18 Addresses scanned: I2C 0x18 - 0x1f
19 Datasheets: 18 Datasheets:
20 http://datasheets.maxim-ic.com/en/ds/MAX6604.pdf 19 http://datasheets.maxim-ic.com/en/ds/MAX6604.pdf
21 * Microchip MCP9805, MCP98242, MCP98243, MCP9843 20 * Microchip MCP9804, MCP9805, MCP98242, MCP98243, MCP9843
22 Prefixes: 'mcp9805', 'mcp98242', 'mcp98243', 'mcp9843'
23 Addresses scanned: I2C 0x18 - 0x1f
24 Datasheets: 21 Datasheets:
22 http://ww1.microchip.com/downloads/en/DeviceDoc/22203C.pdf
25 http://ww1.microchip.com/downloads/en/DeviceDoc/21977b.pdf 23 http://ww1.microchip.com/downloads/en/DeviceDoc/21977b.pdf
26 http://ww1.microchip.com/downloads/en/DeviceDoc/21996a.pdf 24 http://ww1.microchip.com/downloads/en/DeviceDoc/21996a.pdf
27 http://ww1.microchip.com/downloads/en/DeviceDoc/22153c.pdf 25 http://ww1.microchip.com/downloads/en/DeviceDoc/22153c.pdf
28 * NXP Semiconductors SE97, SE97B 26 * NXP Semiconductors SE97, SE97B, SE98, SE98A
29 Prefix: 'se97'
30 Addresses scanned: I2C 0x18 - 0x1f
31 Datasheets: 27 Datasheets:
32 http://www.nxp.com/documents/data_sheet/SE97.pdf 28 http://www.nxp.com/documents/data_sheet/SE97.pdf
33 http://www.nxp.com/documents/data_sheet/SE97B.pdf 29 http://www.nxp.com/documents/data_sheet/SE97B.pdf
34 * NXP Semiconductors SE98
35 Prefix: 'se98'
36 Addresses scanned: I2C 0x18 - 0x1f
37 Datasheets:
38 http://www.nxp.com/documents/data_sheet/SE98.pdf 30 http://www.nxp.com/documents/data_sheet/SE98.pdf
31 http://www.nxp.com/documents/data_sheet/SE98A.pdf
39 * ON Semiconductor CAT34TS02, CAT6095 32 * ON Semiconductor CAT34TS02, CAT6095
40 Prefix: 'cat34ts02', 'cat6095'
41 Addresses scanned: I2C 0x18 - 0x1f
42 Datasheet: 33 Datasheet:
43 http://www.onsemi.com/pub_link/Collateral/CAT34TS02-D.PDF 34 http://www.onsemi.com/pub_link/Collateral/CAT34TS02-D.PDF
44 http://www.onsemi.com/pub/Collateral/CAT6095-D.PDF 35 http://www.onsemi.com/pub/Collateral/CAT6095-D.PDF
45 * ST Microelectronics STTS424, STTS424E02 36 * ST Microelectronics STTS424, STTS424E02, STTS2002, STTS3000
46 Prefix: 'stts424'
47 Addresses scanned: I2C 0x18 - 0x1f
48 Datasheets: 37 Datasheets:
49 http://www.st.com/stonline/products/literature/ds/13447/stts424.pdf 38 http://www.st.com/internet/com/TECHNICAL_RESOURCES/TECHNICAL_LITERATURE/DATASHEET/CD00157556.pdf
50 http://www.st.com/stonline/products/literature/ds/13448/stts424e02.pdf 39 http://www.st.com/internet/com/TECHNICAL_RESOURCES/TECHNICAL_LITERATURE/DATASHEET/CD00157558.pdf
40 http://www.st.com/internet/com/TECHNICAL_RESOURCES/TECHNICAL_LITERATURE/DATASHEET/CD00225278.pdf
41 http://www.st.com/internet/com/TECHNICAL_RESOURCES/TECHNICAL_LITERATURE/DATA_BRIEF/CD00270920.pdf
51 * JEDEC JC 42.4 compliant temperature sensor chips 42 * JEDEC JC 42.4 compliant temperature sensor chips
52 Prefix: 'jc42'
53 Addresses scanned: I2C 0x18 - 0x1f
54 Datasheet: 43 Datasheet:
55 http://www.jedec.org/sites/default/files/docs/4_01_04R19.pdf 44 http://www.jedec.org/sites/default/files/docs/4_01_04R19.pdf
56 45
46 Common for all chips:
47 Prefix: 'jc42'
48 Addresses scanned: I2C 0x18 - 0x1f
49
57Author: 50Author:
58 Guenter Roeck <guenter.roeck@ericsson.com> 51 Guenter Roeck <guenter.roeck@ericsson.com>
59 52
diff --git a/Documentation/hwmon/k10temp b/Documentation/hwmon/k10temp
index a10f73624ad3..90956b618025 100644
--- a/Documentation/hwmon/k10temp
+++ b/Documentation/hwmon/k10temp
@@ -11,7 +11,7 @@ Supported chips:
11 Socket S1G2: Athlon (X2), Sempron (X2), Turion X2 (Ultra) 11 Socket S1G2: Athlon (X2), Sempron (X2), Turion X2 (Ultra)
12* AMD Family 12h processors: "Llano" (E2/A4/A6/A8-Series) 12* AMD Family 12h processors: "Llano" (E2/A4/A6/A8-Series)
13* AMD Family 14h processors: "Brazos" (C/E/G/Z-Series) 13* AMD Family 14h processors: "Brazos" (C/E/G/Z-Series)
14* AMD Family 15h processors: "Bulldozer" 14* AMD Family 15h processors: "Bulldozer" (FX-Series), "Trinity"
15 15
16 Prefix: 'k10temp' 16 Prefix: 'k10temp'
17 Addresses scanned: PCI space 17 Addresses scanned: PCI space
diff --git a/Documentation/hwmon/lm80 b/Documentation/hwmon/lm80
index cb5b407ba3e6..a60b43efc32b 100644
--- a/Documentation/hwmon/lm80
+++ b/Documentation/hwmon/lm80
@@ -7,6 +7,11 @@ Supported chips:
7 Addresses scanned: I2C 0x28 - 0x2f 7 Addresses scanned: I2C 0x28 - 0x2f
8 Datasheet: Publicly available at the National Semiconductor website 8 Datasheet: Publicly available at the National Semiconductor website
9 http://www.national.com/ 9 http://www.national.com/
10 * National Semiconductor LM96080
11 Prefix: 'lm96080'
12 Addresses scanned: I2C 0x28 - 0x2f
13 Datasheet: Publicly available at the National Semiconductor website
14 http://www.national.com/
10 15
11Authors: 16Authors:
12 Frodo Looijaard <frodol@dds.nl>, 17 Frodo Looijaard <frodol@dds.nl>,
@@ -17,7 +22,9 @@ Description
17 22
18This driver implements support for the National Semiconductor LM80. 23This driver implements support for the National Semiconductor LM80.
19It is described as a 'Serial Interface ACPI-Compatible Microprocessor 24It is described as a 'Serial Interface ACPI-Compatible Microprocessor
20System Hardware Monitor'. 25System Hardware Monitor'. The LM96080 is a more recent incarnation,
26it is pin and register compatible, with a few additional features not
27yet supported by the driver.
21 28
22The LM80 implements one temperature sensor, two fan rotation speed sensors, 29The LM80 implements one temperature sensor, two fan rotation speed sensors,
23seven voltage sensors, alarms, and some miscellaneous stuff. 30seven voltage sensors, alarms, and some miscellaneous stuff.
diff --git a/Documentation/hwmon/lm90 b/Documentation/hwmon/lm90
index 9cd14cfe6515..b466974e142f 100644
--- a/Documentation/hwmon/lm90
+++ b/Documentation/hwmon/lm90
@@ -118,6 +118,10 @@ Supported chips:
118 Addresses scanned: I2C 0x48 through 0x4F 118 Addresses scanned: I2C 0x48 through 0x4F
119 Datasheet: Publicly available at NXP website 119 Datasheet: Publicly available at NXP website
120 http://ics.nxp.com/products/interface/datasheet/sa56004x.pdf 120 http://ics.nxp.com/products/interface/datasheet/sa56004x.pdf
121 * GMT G781
122 Prefix: 'g781'
123 Addresses scanned: I2C 0x4c, 0x4d
124 Datasheet: Not publicly available from GMT
121 125
122Author: Jean Delvare <khali@linux-fr.org> 126Author: Jean Delvare <khali@linux-fr.org>
123 127
diff --git a/Documentation/hwmon/max16064 b/Documentation/hwmon/max16064
index f6e8bcbfaccf..f8b478076f6d 100644
--- a/Documentation/hwmon/max16064
+++ b/Documentation/hwmon/max16064
@@ -42,9 +42,9 @@ attributes are read-only.
42 42
43in[1-4]_label "vout[1-4]" 43in[1-4]_label "vout[1-4]"
44in[1-4]_input Measured voltage. From READ_VOUT register. 44in[1-4]_input Measured voltage. From READ_VOUT register.
45in[1-4]_min Minumum Voltage. From VOUT_UV_WARN_LIMIT register. 45in[1-4]_min Minimum Voltage. From VOUT_UV_WARN_LIMIT register.
46in[1-4]_max Maximum voltage. From VOUT_OV_WARN_LIMIT register. 46in[1-4]_max Maximum voltage. From VOUT_OV_WARN_LIMIT register.
47in[1-4]_lcrit Critical minumum Voltage. VOUT_UV_FAULT_LIMIT register. 47in[1-4]_lcrit Critical minimum Voltage. VOUT_UV_FAULT_LIMIT register.
48in[1-4]_crit Critical maximum voltage. From VOUT_OV_FAULT_LIMIT register. 48in[1-4]_crit Critical maximum voltage. From VOUT_OV_FAULT_LIMIT register.
49in[1-4]_min_alarm Voltage low alarm. From VOLTAGE_UV_WARNING status. 49in[1-4]_min_alarm Voltage low alarm. From VOLTAGE_UV_WARNING status.
50in[1-4]_max_alarm Voltage high alarm. From VOLTAGE_OV_WARNING status. 50in[1-4]_max_alarm Voltage high alarm. From VOLTAGE_OV_WARNING status.
diff --git a/Documentation/hwmon/max34440 b/Documentation/hwmon/max34440
index 8ab51536a1eb..04482226db20 100644
--- a/Documentation/hwmon/max34440
+++ b/Documentation/hwmon/max34440
@@ -11,6 +11,11 @@ Supported chips:
11 Prefixes: 'max34441' 11 Prefixes: 'max34441'
12 Addresses scanned: - 12 Addresses scanned: -
13 Datasheet: http://datasheets.maxim-ic.com/en/ds/MAX34441.pdf 13 Datasheet: http://datasheets.maxim-ic.com/en/ds/MAX34441.pdf
14 * Maxim MAX34446
15 PMBus Power-Supply Data Logger
16 Prefixes: 'max34446'
17 Addresses scanned: -
18 Datasheet: http://datasheets.maxim-ic.com/en/ds/MAX34446.pdf
14 19
15Author: Guenter Roeck <guenter.roeck@ericsson.com> 20Author: Guenter Roeck <guenter.roeck@ericsson.com>
16 21
@@ -19,8 +24,8 @@ Description
19----------- 24-----------
20 25
21This driver supports hardware montoring for Maxim MAX34440 PMBus 6-Channel 26This driver supports hardware montoring for Maxim MAX34440 PMBus 6-Channel
22Power-Supply Manager and MAX34441 PMBus 5-Channel Power-Supply Manager 27Power-Supply Manager, MAX34441 PMBus 5-Channel Power-Supply Manager
23and Intelligent Fan Controller. 28and Intelligent Fan Controller, and MAX34446 PMBus Power-Supply Data Logger.
24 29
25The driver is a client driver to the core PMBus driver. Please see 30The driver is a client driver to the core PMBus driver. Please see
26Documentation/hwmon/pmbus for details on PMBus client drivers. 31Documentation/hwmon/pmbus for details on PMBus client drivers.
@@ -33,6 +38,13 @@ This driver does not auto-detect devices. You will have to instantiate the
33devices explicitly. Please see Documentation/i2c/instantiating-devices for 38devices explicitly. Please see Documentation/i2c/instantiating-devices for
34details. 39details.
35 40
41For MAX34446, the value of the currX_crit attribute determines if current or
42voltage measurement is enabled for a given channel. Voltage measurement is
43enabled if currX_crit is set to 0; current measurement is enabled if the
44attribute is set to a positive value. Power measurement is only enabled if
45channel 1 (3) is configured for voltage measurement, and channel 2 (4) is
46configured for current measurement.
47
36 48
37Platform data support 49Platform data support
38--------------------- 50---------------------
@@ -48,27 +60,39 @@ attributes are read-only.
48 60
49in[1-6]_label "vout[1-6]". 61in[1-6]_label "vout[1-6]".
50in[1-6]_input Measured voltage. From READ_VOUT register. 62in[1-6]_input Measured voltage. From READ_VOUT register.
51in[1-6]_min Minumum Voltage. From VOUT_UV_WARN_LIMIT register. 63in[1-6]_min Minimum Voltage. From VOUT_UV_WARN_LIMIT register.
52in[1-6]_max Maximum voltage. From VOUT_OV_WARN_LIMIT register. 64in[1-6]_max Maximum voltage. From VOUT_OV_WARN_LIMIT register.
53in[1-6]_lcrit Critical minumum Voltage. VOUT_UV_FAULT_LIMIT register. 65in[1-6]_lcrit Critical minimum Voltage. VOUT_UV_FAULT_LIMIT register.
54in[1-6]_crit Critical maximum voltage. From VOUT_OV_FAULT_LIMIT register. 66in[1-6]_crit Critical maximum voltage. From VOUT_OV_FAULT_LIMIT register.
55in[1-6]_min_alarm Voltage low alarm. From VOLTAGE_UV_WARNING status. 67in[1-6]_min_alarm Voltage low alarm. From VOLTAGE_UV_WARNING status.
56in[1-6]_max_alarm Voltage high alarm. From VOLTAGE_OV_WARNING status. 68in[1-6]_max_alarm Voltage high alarm. From VOLTAGE_OV_WARNING status.
57in[1-6]_lcrit_alarm Voltage critical low alarm. From VOLTAGE_UV_FAULT status. 69in[1-6]_lcrit_alarm Voltage critical low alarm. From VOLTAGE_UV_FAULT status.
58in[1-6]_crit_alarm Voltage critical high alarm. From VOLTAGE_OV_FAULT status. 70in[1-6]_crit_alarm Voltage critical high alarm. From VOLTAGE_OV_FAULT status.
71in[1-6]_lowest Historical minimum voltage.
59in[1-6]_highest Historical maximum voltage. 72in[1-6]_highest Historical maximum voltage.
60in[1-6]_reset_history Write any value to reset history. 73in[1-6]_reset_history Write any value to reset history.
61 74
75 MAX34446 only supports in[1-4].
76
62curr[1-6]_label "iout[1-6]". 77curr[1-6]_label "iout[1-6]".
63curr[1-6]_input Measured current. From READ_IOUT register. 78curr[1-6]_input Measured current. From READ_IOUT register.
64curr[1-6]_max Maximum current. From IOUT_OC_WARN_LIMIT register. 79curr[1-6]_max Maximum current. From IOUT_OC_WARN_LIMIT register.
65curr[1-6]_crit Critical maximum current. From IOUT_OC_FAULT_LIMIT register. 80curr[1-6]_crit Critical maximum current. From IOUT_OC_FAULT_LIMIT register.
66curr[1-6]_max_alarm Current high alarm. From IOUT_OC_WARNING status. 81curr[1-6]_max_alarm Current high alarm. From IOUT_OC_WARNING status.
67curr[1-6]_crit_alarm Current critical high alarm. From IOUT_OC_FAULT status. 82curr[1-6]_crit_alarm Current critical high alarm. From IOUT_OC_FAULT status.
83curr[1-4]_average Historical average current (MAX34446 only).
68curr[1-6]_highest Historical maximum current. 84curr[1-6]_highest Historical maximum current.
69curr[1-6]_reset_history Write any value to reset history. 85curr[1-6]_reset_history Write any value to reset history.
70 86
71 in6 and curr6 attributes only exist for MAX34440. 87 in6 and curr6 attributes only exist for MAX34440.
88 MAX34446 only supports curr[1-4].
89
90power[1,3]_label "pout[1,3]"
91power[1,3]_input Measured power.
92power[1,3]_average Historical average power.
93power[1,3]_highest Historical maximum power.
94
95 Power attributes only exist for MAX34446.
72 96
73temp[1-8]_input Measured temperatures. From READ_TEMPERATURE_1 register. 97temp[1-8]_input Measured temperatures. From READ_TEMPERATURE_1 register.
74 temp1 is the chip's internal temperature. temp2..temp5 98 temp1 is the chip's internal temperature. temp2..temp5
@@ -79,7 +103,9 @@ temp[1-8]_max Maximum temperature. From OT_WARN_LIMIT register.
79temp[1-8]_crit Critical high temperature. From OT_FAULT_LIMIT register. 103temp[1-8]_crit Critical high temperature. From OT_FAULT_LIMIT register.
80temp[1-8]_max_alarm Temperature high alarm. 104temp[1-8]_max_alarm Temperature high alarm.
81temp[1-8]_crit_alarm Temperature critical high alarm. 105temp[1-8]_crit_alarm Temperature critical high alarm.
106temp[1-8]_average Historical average temperature (MAX34446 only).
82temp[1-8]_highest Historical maximum temperature. 107temp[1-8]_highest Historical maximum temperature.
83temp[1-8]_reset_history Write any value to reset history. 108temp[1-8]_reset_history Write any value to reset history.
84 109
85 temp7 and temp8 attributes only exist for MAX34440. 110 temp7 and temp8 attributes only exist for MAX34440.
111 MAX34446 only supports temp[1-3].
diff --git a/Documentation/hwmon/max8688 b/Documentation/hwmon/max8688
index 71ed10a3c94e..fe849871df32 100644
--- a/Documentation/hwmon/max8688
+++ b/Documentation/hwmon/max8688
@@ -42,9 +42,9 @@ attributes are read-only.
42 42
43in1_label "vout1" 43in1_label "vout1"
44in1_input Measured voltage. From READ_VOUT register. 44in1_input Measured voltage. From READ_VOUT register.
45in1_min Minumum Voltage. From VOUT_UV_WARN_LIMIT register. 45in1_min Minimum Voltage. From VOUT_UV_WARN_LIMIT register.
46in1_max Maximum voltage. From VOUT_OV_WARN_LIMIT register. 46in1_max Maximum voltage. From VOUT_OV_WARN_LIMIT register.
47in1_lcrit Critical minumum Voltage. VOUT_UV_FAULT_LIMIT register. 47in1_lcrit Critical minimum Voltage. VOUT_UV_FAULT_LIMIT register.
48in1_crit Critical maximum voltage. From VOUT_OV_FAULT_LIMIT register. 48in1_crit Critical maximum voltage. From VOUT_OV_FAULT_LIMIT register.
49in1_min_alarm Voltage low alarm. From VOLTAGE_UV_WARNING status. 49in1_min_alarm Voltage low alarm. From VOLTAGE_UV_WARNING status.
50in1_max_alarm Voltage high alarm. From VOLTAGE_OV_WARNING status. 50in1_max_alarm Voltage high alarm. From VOLTAGE_OV_WARNING status.
diff --git a/Documentation/hwmon/mc13783-adc b/Documentation/hwmon/mc13783-adc
index 044531a86405..d0e7b3fa9e75 100644
--- a/Documentation/hwmon/mc13783-adc
+++ b/Documentation/hwmon/mc13783-adc
@@ -3,8 +3,11 @@ Kernel driver mc13783-adc
3 3
4Supported chips: 4Supported chips:
5 * Freescale Atlas MC13783 5 * Freescale Atlas MC13783
6 Prefix: 'mc13783_adc' 6 Prefix: 'mc13783'
7 Datasheet: http://www.freescale.com/files/rf_if/doc/data_sheet/MC13783.pdf?fsrch=1 7 Datasheet: http://www.freescale.com/files/rf_if/doc/data_sheet/MC13783.pdf?fsrch=1
8 * Freescale Atlas MC13892
9 Prefix: 'mc13892'
10 Datasheet: http://cache.freescale.com/files/analog/doc/data_sheet/MC13892.pdf?fsrch=1&sr=1
8 11
9Authors: 12Authors:
10 Sascha Hauer <s.hauer@pengutronix.de> 13 Sascha Hauer <s.hauer@pengutronix.de>
@@ -13,20 +16,21 @@ Authors:
13Description 16Description
14----------- 17-----------
15 18
16The Freescale MC13783 is a Power Management and Audio Circuit. Among 19The Freescale MC13783 and MC13892 are Power Management and Audio Circuits.
17other things it contains a 10-bit A/D converter. The converter has 16 20Among other things they contain a 10-bit A/D converter. The converter has 16
18channels which can be used in different modes. 21(MC13783) resp. 12 (MC13892) channels which can be used in different modes. The
19The A/D converter has a resolution of 2.25mV. Channels 0-4 have 22A/D converter has a resolution of 2.25mV.
20a dedicated meaning with chip internal scaling applied. Channels 5-7
21can be used as general purpose inputs or alternatively in a dedicated
22mode. Channels 12-15 are occupied by the touchscreen if it's active.
23 23
24Currently the driver only supports channels 2 and 5-15 with no alternative 24Some channels can be used as General Purpose inputs or in a dedicated mode with
25modes for channels 5-7. 25a chip internal scaling applied .
26 26
27See this table for the meaning of the different channels and their chip 27Currently the driver only supports the Application Supply channel (BP / BPSNS),
28internal scaling: 28the General Purpose inputs and touchscreen.
29 29
30See the following tables for the meaning of the different channels and their
31chip internal scaling:
32
33MC13783:
30Channel Signal Input Range Scaling 34Channel Signal Input Range Scaling
31------------------------------------------------------------------------------- 35-------------------------------------------------------------------------------
320 Battery Voltage (BATT) 2.50 - 4.65V -2.40V 360 Battery Voltage (BATT) 2.50 - 4.65V -2.40V
@@ -34,7 +38,7 @@ Channel Signal Input Range Scaling
342 Application Supply (BP) 2.50 - 4.65V -2.40V 382 Application Supply (BP) 2.50 - 4.65V -2.40V
353 Charger Voltage (CHRGRAW) 0 - 10V / /5 393 Charger Voltage (CHRGRAW) 0 - 10V / /5
36 0 - 20V /10 40 0 - 20V /10
374 Charger Current (CHRGISNSP-CHRGISNSN) -0.25V - 0.25V x4 414 Charger Current (CHRGISNSP-CHRGISNSN) -0.25 - 0.25V x4
385 General Purpose ADIN5 / Battery Pack Thermistor 0 - 2.30V No 425 General Purpose ADIN5 / Battery Pack Thermistor 0 - 2.30V No
396 General Purpose ADIN6 / Backup Voltage (LICELL) 0 - 2.30V / No / 436 General Purpose ADIN6 / Backup Voltage (LICELL) 0 - 2.30V / No /
40 1.50 - 3.50V -1.20V 44 1.50 - 3.50V -1.20V
@@ -48,3 +52,23 @@ Channel Signal Input Range Scaling
4813 General Purpose TSX2 / Touchscreen X-plate 2 0 - 2.30V No 5213 General Purpose TSX2 / Touchscreen X-plate 2 0 - 2.30V No
4914 General Purpose TSY1 / Touchscreen Y-plate 1 0 - 2.30V No 5314 General Purpose TSY1 / Touchscreen Y-plate 1 0 - 2.30V No
5015 General Purpose TSY2 / Touchscreen Y-plate 2 0 - 2.30V No 5415 General Purpose TSY2 / Touchscreen Y-plate 2 0 - 2.30V No
55
56MC13892:
57Channel Signal Input Range Scaling
58-------------------------------------------------------------------------------
590 Battery Voltage (BATT) 0 - 4.8V /2
601 Battery Current (BATT - BATTISNSCC) -60 - 60 mV x20
612 Application Supply (BPSNS) 0 - 4.8V /2
623 Charger Voltage (CHRGRAW) 0 - 12V / /5
63 0 - 20V /10
644 Charger Current (CHRGISNS-BPSNS) / -0.3 - 0.3V / x4 /
65 Touchscreen X-plate 1 0 - 2.4V No
665 General Purpose ADIN5 / Battery Pack Thermistor 0 - 2.4V No
676 General Purpose ADIN6 / Backup Voltage (LICELL) 0 - 2.4V / No
68 Backup Voltage (LICELL) 0 - 3.6V x2/3
697 General Purpose ADIN7 / UID / Die Temperature 0 - 2.4V / No /
70 0 - 4.8V /2
7112 General Purpose TSX1 / Touchscreen X-plate 1 0 - 2.4V No
7213 General Purpose TSX2 / Touchscreen X-plate 2 0 - 2.4V No
7314 General Purpose TSY1 / Touchscreen Y-plate 1 0 - 2.4V No
7415 General Purpose TSY2 / Touchscreen Y-plate 2 0 - 2.4V No
diff --git a/Documentation/hwmon/mcp3021 b/Documentation/hwmon/mcp3021
new file mode 100644
index 000000000000..325fd87e81b2
--- /dev/null
+++ b/Documentation/hwmon/mcp3021
@@ -0,0 +1,22 @@
1Kernel driver MCP3021
2======================
3
4Supported chips:
5 * Microchip Technology MCP3021
6 Prefix: 'mcp3021'
7 Datasheet: http://ww1.microchip.com/downloads/en/DeviceDoc/21805a.pdf
8
9Author: Mingkai Hu
10
11Description
12-----------
13
14This driver implements support for the Microchip Technology MCP3021 chip.
15
16The Microchip Technology Inc. MCP3021 is a successive approximation A/D
17converter (ADC) with 10-bit resolution.
18This device provides one single-ended input with very low power consumption.
19Communication to the MCP3021 is performed using a 2-wire I2C compatible
20interface. Standard (100 kHz) and Fast (400 kHz) I2C modes are available.
21The default I2C device address is 0x4d (contact the Microchip factory for
22additional address options).
diff --git a/Documentation/hwmon/pmbus b/Documentation/hwmon/pmbus
index d28b591753d1..f90f99920cc5 100644
--- a/Documentation/hwmon/pmbus
+++ b/Documentation/hwmon/pmbus
@@ -15,13 +15,20 @@ Supported chips:
15 http://www.onsemi.com/pub_link/Collateral/NCP4200-D.PDF 15 http://www.onsemi.com/pub_link/Collateral/NCP4200-D.PDF
16 http://www.onsemi.com/pub_link/Collateral/JUNE%202009-%20REV.%200.PDF 16 http://www.onsemi.com/pub_link/Collateral/JUNE%202009-%20REV.%200.PDF
17 * Lineage Power 17 * Lineage Power
18 Prefixes: 'pdt003', 'pdt006', 'pdt012', 'udt020' 18 Prefixes: 'mdt040', 'pdt003', 'pdt006', 'pdt012', 'udt020'
19 Addresses scanned: - 19 Addresses scanned: -
20 Datasheets: 20 Datasheets:
21 http://www.lineagepower.com/oem/pdf/PDT003A0X.pdf 21 http://www.lineagepower.com/oem/pdf/PDT003A0X.pdf
22 http://www.lineagepower.com/oem/pdf/PDT006A0X.pdf 22 http://www.lineagepower.com/oem/pdf/PDT006A0X.pdf
23 http://www.lineagepower.com/oem/pdf/PDT012A0X.pdf 23 http://www.lineagepower.com/oem/pdf/PDT012A0X.pdf
24 http://www.lineagepower.com/oem/pdf/UDT020A0X.pdf 24 http://www.lineagepower.com/oem/pdf/UDT020A0X.pdf
25 http://www.lineagepower.com/oem/pdf/MDT040A0X.pdf
26 * Texas Instruments TPS40400, TPS40422
27 Prefixes: 'tps40400', 'tps40422'
28 Addresses scanned: -
29 Datasheets:
30 http://www.ti.com/lit/gpn/tps40400
31 http://www.ti.com/lit/gpn/tps40422
25 * Generic PMBus devices 32 * Generic PMBus devices
26 Prefix: 'pmbus' 33 Prefix: 'pmbus'
27 Addresses scanned: - 34 Addresses scanned: -
diff --git a/Documentation/hwmon/sch5627 b/Documentation/hwmon/sch5627
index 446a054e4912..0551d266c51c 100644
--- a/Documentation/hwmon/sch5627
+++ b/Documentation/hwmon/sch5627
@@ -16,6 +16,11 @@ Description
16SMSC SCH5627 Super I/O chips include complete hardware monitoring 16SMSC SCH5627 Super I/O chips include complete hardware monitoring
17capabilities. They can monitor up to 5 voltages, 4 fans and 8 temperatures. 17capabilities. They can monitor up to 5 voltages, 4 fans and 8 temperatures.
18 18
19The SMSC SCH5627 hardware monitoring part also contains an integrated
20watchdog. In order for this watchdog to function some motherboard specific
21initialization most be done by the BIOS, so if the watchdog is not enabled
22by the BIOS the sch5627 driver will not register a watchdog device.
23
19The hardware monitoring part of the SMSC SCH5627 is accessed by talking 24The hardware monitoring part of the SMSC SCH5627 is accessed by talking
20through an embedded microcontroller. An application note describing the 25through an embedded microcontroller. An application note describing the
21protocol for communicating with the microcontroller is available upon 26protocol for communicating with the microcontroller is available upon
diff --git a/Documentation/hwmon/sch5636 b/Documentation/hwmon/sch5636
index f83bd1c260f0..7b0a01da0717 100644
--- a/Documentation/hwmon/sch5636
+++ b/Documentation/hwmon/sch5636
@@ -26,6 +26,9 @@ temperatures. Note that the driver detects how many fan headers /
26temperature sensors are actually implemented on the motherboard, so you will 26temperature sensors are actually implemented on the motherboard, so you will
27likely see fewer temperature and fan inputs. 27likely see fewer temperature and fan inputs.
28 28
29The Fujitsu Theseus hwmon solution also contains an integrated watchdog.
30This watchdog is fully supported by the sch5636 driver.
31
29An application note describing the Theseus' registers, as well as an 32An application note describing the Theseus' registers, as well as an
30application note describing the protocol for communicating with the 33application note describing the protocol for communicating with the
31microcontroller is available upon request. Please mail me if you want a copy. 34microcontroller is available upon request. Please mail me if you want a copy.
diff --git a/Documentation/hwmon/ucd9000 b/Documentation/hwmon/ucd9000
index 40ca6db50c48..0df5f276505b 100644
--- a/Documentation/hwmon/ucd9000
+++ b/Documentation/hwmon/ucd9000
@@ -70,9 +70,9 @@ attributes are read-only.
70 70
71in[1-12]_label "vout[1-12]". 71in[1-12]_label "vout[1-12]".
72in[1-12]_input Measured voltage. From READ_VOUT register. 72in[1-12]_input Measured voltage. From READ_VOUT register.
73in[1-12]_min Minumum Voltage. From VOUT_UV_WARN_LIMIT register. 73in[1-12]_min Minimum Voltage. From VOUT_UV_WARN_LIMIT register.
74in[1-12]_max Maximum voltage. From VOUT_OV_WARN_LIMIT register. 74in[1-12]_max Maximum voltage. From VOUT_OV_WARN_LIMIT register.
75in[1-12]_lcrit Critical minumum Voltage. VOUT_UV_FAULT_LIMIT register. 75in[1-12]_lcrit Critical minimum Voltage. VOUT_UV_FAULT_LIMIT register.
76in[1-12]_crit Critical maximum voltage. From VOUT_OV_FAULT_LIMIT register. 76in[1-12]_crit Critical maximum voltage. From VOUT_OV_FAULT_LIMIT register.
77in[1-12]_min_alarm Voltage low alarm. From VOLTAGE_UV_WARNING status. 77in[1-12]_min_alarm Voltage low alarm. From VOLTAGE_UV_WARNING status.
78in[1-12]_max_alarm Voltage high alarm. From VOLTAGE_OV_WARNING status. 78in[1-12]_max_alarm Voltage high alarm. From VOLTAGE_OV_WARNING status.
@@ -82,7 +82,7 @@ in[1-12]_crit_alarm Voltage critical high alarm. From VOLTAGE_OV_FAULT status.
82curr[1-12]_label "iout[1-12]". 82curr[1-12]_label "iout[1-12]".
83curr[1-12]_input Measured current. From READ_IOUT register. 83curr[1-12]_input Measured current. From READ_IOUT register.
84curr[1-12]_max Maximum current. From IOUT_OC_WARN_LIMIT register. 84curr[1-12]_max Maximum current. From IOUT_OC_WARN_LIMIT register.
85curr[1-12]_lcrit Critical minumum output current. From IOUT_UC_FAULT_LIMIT 85curr[1-12]_lcrit Critical minimum output current. From IOUT_UC_FAULT_LIMIT
86 register. 86 register.
87curr[1-12]_crit Critical maximum current. From IOUT_OC_FAULT_LIMIT register. 87curr[1-12]_crit Critical maximum current. From IOUT_OC_FAULT_LIMIT register.
88curr[1-12]_max_alarm Current high alarm. From IOUT_OC_WARNING status. 88curr[1-12]_max_alarm Current high alarm. From IOUT_OC_WARNING status.
diff --git a/Documentation/hwmon/ucd9200 b/Documentation/hwmon/ucd9200
index 3c58607f72fe..fd7d07b1908a 100644
--- a/Documentation/hwmon/ucd9200
+++ b/Documentation/hwmon/ucd9200
@@ -54,9 +54,9 @@ attributes are read-only.
54 54
55in1_label "vin". 55in1_label "vin".
56in1_input Measured voltage. From READ_VIN register. 56in1_input Measured voltage. From READ_VIN register.
57in1_min Minumum Voltage. From VIN_UV_WARN_LIMIT register. 57in1_min Minimum Voltage. From VIN_UV_WARN_LIMIT register.
58in1_max Maximum voltage. From VIN_OV_WARN_LIMIT register. 58in1_max Maximum voltage. From VIN_OV_WARN_LIMIT register.
59in1_lcrit Critical minumum Voltage. VIN_UV_FAULT_LIMIT register. 59in1_lcrit Critical minimum Voltage. VIN_UV_FAULT_LIMIT register.
60in1_crit Critical maximum voltage. From VIN_OV_FAULT_LIMIT register. 60in1_crit Critical maximum voltage. From VIN_OV_FAULT_LIMIT register.
61in1_min_alarm Voltage low alarm. From VIN_UV_WARNING status. 61in1_min_alarm Voltage low alarm. From VIN_UV_WARNING status.
62in1_max_alarm Voltage high alarm. From VIN_OV_WARNING status. 62in1_max_alarm Voltage high alarm. From VIN_OV_WARNING status.
@@ -65,9 +65,9 @@ in1_crit_alarm Voltage critical high alarm. From VIN_OV_FAULT status.
65 65
66in[2-5]_label "vout[1-4]". 66in[2-5]_label "vout[1-4]".
67in[2-5]_input Measured voltage. From READ_VOUT register. 67in[2-5]_input Measured voltage. From READ_VOUT register.
68in[2-5]_min Minumum Voltage. From VOUT_UV_WARN_LIMIT register. 68in[2-5]_min Minimum Voltage. From VOUT_UV_WARN_LIMIT register.
69in[2-5]_max Maximum voltage. From VOUT_OV_WARN_LIMIT register. 69in[2-5]_max Maximum voltage. From VOUT_OV_WARN_LIMIT register.
70in[2-5]_lcrit Critical minumum Voltage. VOUT_UV_FAULT_LIMIT register. 70in[2-5]_lcrit Critical minimum Voltage. VOUT_UV_FAULT_LIMIT register.
71in[2-5]_crit Critical maximum voltage. From VOUT_OV_FAULT_LIMIT register. 71in[2-5]_crit Critical maximum voltage. From VOUT_OV_FAULT_LIMIT register.
72in[2-5]_min_alarm Voltage low alarm. From VOLTAGE_UV_WARNING status. 72in[2-5]_min_alarm Voltage low alarm. From VOLTAGE_UV_WARNING status.
73in[2-5]_max_alarm Voltage high alarm. From VOLTAGE_OV_WARNING status. 73in[2-5]_max_alarm Voltage high alarm. From VOLTAGE_OV_WARNING status.
@@ -80,7 +80,7 @@ curr1_input Measured current. From READ_IIN register.
80curr[2-5]_label "iout[1-4]". 80curr[2-5]_label "iout[1-4]".
81curr[2-5]_input Measured current. From READ_IOUT register. 81curr[2-5]_input Measured current. From READ_IOUT register.
82curr[2-5]_max Maximum current. From IOUT_OC_WARN_LIMIT register. 82curr[2-5]_max Maximum current. From IOUT_OC_WARN_LIMIT register.
83curr[2-5]_lcrit Critical minumum output current. From IOUT_UC_FAULT_LIMIT 83curr[2-5]_lcrit Critical minimum output current. From IOUT_UC_FAULT_LIMIT
84 register. 84 register.
85curr[2-5]_crit Critical maximum current. From IOUT_OC_FAULT_LIMIT register. 85curr[2-5]_crit Critical maximum current. From IOUT_OC_FAULT_LIMIT register.
86curr[2-5]_max_alarm Current high alarm. From IOUT_OC_WARNING status. 86curr[2-5]_max_alarm Current high alarm. From IOUT_OC_WARNING status.
diff --git a/Documentation/hwmon/w83627ehf b/Documentation/hwmon/w83627ehf
index 3f44dbdfda70..ceaf6f652b00 100644
--- a/Documentation/hwmon/w83627ehf
+++ b/Documentation/hwmon/w83627ehf
@@ -50,7 +50,7 @@ W83627DHG, W83627DHG-P, W83627UHG, W83667HG, W83667HG-B, W83667HG-I
50(NCT6775F), and NCT6776F super I/O chips. We will refer to them collectively 50(NCT6775F), and NCT6776F super I/O chips. We will refer to them collectively
51as Winbond chips. 51as Winbond chips.
52 52
53The chips implement 2 to 4 temperature sensors (9 for NCT6775F and NCT6776F), 53The chips implement 3 to 4 temperature sensors (9 for NCT6775F and NCT6776F),
542 to 5 fan rotation speed sensors, 8 to 10 analog voltage sensors, one VID 542 to 5 fan rotation speed sensors, 8 to 10 analog voltage sensors, one VID
55(except for 627UHG), alarms with beep warnings (control unimplemented), 55(except for 627UHG), alarms with beep warnings (control unimplemented),
56and some automatic fan regulation strategies (plus manual fan control mode). 56and some automatic fan regulation strategies (plus manual fan control mode).
@@ -143,8 +143,13 @@ pwm[1-4]_min_output - minimum fan speed (range 1 - 255), when the temperature
143pwm[1-4]_stop_time - how many milliseconds [ms] must elapse to switch 143pwm[1-4]_stop_time - how many milliseconds [ms] must elapse to switch
144 corresponding fan off. (when the temperature was below 144 corresponding fan off. (when the temperature was below
145 defined range). 145 defined range).
146pwm[1-4]_start_output-minimum fan speed (range 1 - 255) when spinning up
147pwm[1-4]_step_output- rate of fan speed change (1 - 255)
148pwm[1-4]_stop_output- minimum fan speed (range 1 - 255) when spinning down
149pwm[1-4]_max_output - maximum fan speed (range 1 - 255), when the temperature
150 is above defined range.
146 151
147Note: last two functions are influenced by other control bits, not yet exported 152Note: last six functions are influenced by other control bits, not yet exported
148 by the driver, so a change might not have any effect. 153 by the driver, so a change might not have any effect.
149 154
150Implementation Details 155Implementation Details
diff --git a/Documentation/hwmon/zl6100 b/Documentation/hwmon/zl6100
index 51f76a189fee..a995b41724fd 100644
--- a/Documentation/hwmon/zl6100
+++ b/Documentation/hwmon/zl6100
@@ -34,6 +34,14 @@ Supported chips:
34 Prefix: 'zl6105' 34 Prefix: 'zl6105'
35 Addresses scanned: - 35 Addresses scanned: -
36 Datasheet: http://www.intersil.com/data/fn/fn6906.pdf 36 Datasheet: http://www.intersil.com/data/fn/fn6906.pdf
37 * Intersil / Zilker Labs ZL9101M
38 Prefix: 'zl9101'
39 Addresses scanned: -
40 Datasheet: http://www.intersil.com/data/fn/fn7669.pdf
41 * Intersil / Zilker Labs ZL9117M
42 Prefix: 'zl9117'
43 Addresses scanned: -
44 Datasheet: http://www.intersil.com/data/fn/fn7914.pdf
37 * Ericsson BMR450, BMR451 45 * Ericsson BMR450, BMR451
38 Prefix: 'bmr450', 'bmr451' 46 Prefix: 'bmr450', 'bmr451'
39 Addresses scanned: - 47 Addresses scanned: -
@@ -88,14 +96,12 @@ Module parameters
88delay 96delay
89----- 97-----
90 98
91Some Intersil/Zilker Labs DC-DC controllers require a minimum interval between 99Intersil/Zilker Labs DC-DC controllers require a minimum interval between I2C
92I2C bus accesses. According to Intersil, the minimum interval is 2 ms, though 100bus accesses. According to Intersil, the minimum interval is 2 ms, though 1 ms
931 ms appears to be sufficient and has not caused any problems in testing. 101appears to be sufficient and has not caused any problems in testing. The problem
94The problem is known to affect ZL6100, ZL2105, and ZL2008. It is known not to 102is known to affect all currently supported chips. For manual override, the
95affect ZL2004 and ZL6105. The driver automatically sets the interval to 1 ms 103driver provides a writeable module parameter, 'delay', which can be used to set
96except for ZL2004 and ZL6105. To enable manual override, the driver provides a 104the interval to a value between 0 and 65,535 microseconds.
97writeable module parameter, 'delay', which can be used to set the interval to
98a value between 0 and 65,535 microseconds.
99 105
100 106
101Sysfs entries 107Sysfs entries
@@ -108,7 +114,7 @@ in1_label "vin"
108in1_input Measured input voltage. 114in1_input Measured input voltage.
109in1_min Minimum input voltage. 115in1_min Minimum input voltage.
110in1_max Maximum input voltage. 116in1_max Maximum input voltage.
111in1_lcrit Critical minumum input voltage. 117in1_lcrit Critical minimum input voltage.
112in1_crit Critical maximum input voltage. 118in1_crit Critical maximum input voltage.
113in1_min_alarm Input voltage low alarm. 119in1_min_alarm Input voltage low alarm.
114in1_max_alarm Input voltage high alarm. 120in1_max_alarm Input voltage high alarm.
@@ -117,7 +123,7 @@ in1_crit_alarm Input voltage critical high alarm.
117 123
118in2_label "vout1" 124in2_label "vout1"
119in2_input Measured output voltage. 125in2_input Measured output voltage.
120in2_lcrit Critical minumum output Voltage. 126in2_lcrit Critical minimum output Voltage.
121in2_crit Critical maximum output voltage. 127in2_crit Critical maximum output voltage.
122in2_lcrit_alarm Critical output voltage critical low alarm. 128in2_lcrit_alarm Critical output voltage critical low alarm.
123in2_crit_alarm Critical output voltage critical high alarm. 129in2_crit_alarm Critical output voltage critical high alarm.
diff --git a/Documentation/i2c/busses/i2c-i801 b/Documentation/i2c/busses/i2c-i801
index 2871fd500349..71f55bbcefc8 100644
--- a/Documentation/i2c/busses/i2c-i801
+++ b/Documentation/i2c/busses/i2c-i801
@@ -20,6 +20,7 @@ Supported adapters:
20 * Intel Patsburg (PCH) 20 * Intel Patsburg (PCH)
21 * Intel DH89xxCC (PCH) 21 * Intel DH89xxCC (PCH)
22 * Intel Panther Point (PCH) 22 * Intel Panther Point (PCH)
23 * Intel Lynx Point (PCH)
23 Datasheets: Publicly available at the Intel website 24 Datasheets: Publicly available at the Intel website
24 25
25On Intel Patsburg and later chipsets, both the normal host SMBus controller 26On Intel Patsburg and later chipsets, both the normal host SMBus controller
diff --git a/Documentation/i2c/busses/scx200_acb b/Documentation/i2c/busses/scx200_acb
index 7c07883d4dfc..ce83c871fe95 100644
--- a/Documentation/i2c/busses/scx200_acb
+++ b/Documentation/i2c/busses/scx200_acb
@@ -28,5 +28,5 @@ If the scx200_acb driver is built into the kernel, add the following
28parameter to your boot command line: 28parameter to your boot command line:
29 scx200_acb.base=0x810,0x820 29 scx200_acb.base=0x810,0x820
30If the scx200_acb driver is built as a module, add the following line to 30If the scx200_acb driver is built as a module, add the following line to
31the file /etc/modprobe.conf instead: 31a configuration file in /etc/modprobe.d/ instead:
32 options scx200_acb base=0x810,0x820 32 options scx200_acb base=0x810,0x820
diff --git a/Documentation/i2c/instantiating-devices b/Documentation/i2c/instantiating-devices
index 9edb75d8c9b9..abf63615ee05 100644
--- a/Documentation/i2c/instantiating-devices
+++ b/Documentation/i2c/instantiating-devices
@@ -87,11 +87,11 @@ it may have different addresses from one board to the next (manufacturer
87changing its design without notice). In this case, you can call 87changing its design without notice). In this case, you can call
88i2c_new_probed_device() instead of i2c_new_device(). 88i2c_new_probed_device() instead of i2c_new_device().
89 89
90Example (from the pnx4008 OHCI driver): 90Example (from the nxp OHCI driver):
91 91
92static const unsigned short normal_i2c[] = { 0x2c, 0x2d, I2C_CLIENT_END }; 92static const unsigned short normal_i2c[] = { 0x2c, 0x2d, I2C_CLIENT_END };
93 93
94static int __devinit usb_hcd_pnx4008_probe(struct platform_device *pdev) 94static int __devinit usb_hcd_nxp_probe(struct platform_device *pdev)
95{ 95{
96 (...) 96 (...)
97 struct i2c_adapter *i2c_adap; 97 struct i2c_adapter *i2c_adap;
@@ -100,7 +100,7 @@ static int __devinit usb_hcd_pnx4008_probe(struct platform_device *pdev)
100 (...) 100 (...)
101 i2c_adap = i2c_get_adapter(2); 101 i2c_adap = i2c_get_adapter(2);
102 memset(&i2c_info, 0, sizeof(struct i2c_board_info)); 102 memset(&i2c_info, 0, sizeof(struct i2c_board_info));
103 strlcpy(i2c_info.type, "isp1301_pnx", I2C_NAME_SIZE); 103 strlcpy(i2c_info.type, "isp1301_nxp", I2C_NAME_SIZE);
104 isp1301_i2c_client = i2c_new_probed_device(i2c_adap, &i2c_info, 104 isp1301_i2c_client = i2c_new_probed_device(i2c_adap, &i2c_info,
105 normal_i2c, NULL); 105 normal_i2c, NULL);
106 i2c_put_adapter(i2c_adap); 106 i2c_put_adapter(i2c_adap);
diff --git a/Documentation/i2o/ioctl b/Documentation/i2o/ioctl
index 22ca53a67e23..27c3c5493116 100644
--- a/Documentation/i2o/ioctl
+++ b/Documentation/i2o/ioctl
@@ -138,7 +138,7 @@ VI. Setting Parameters
138 138
139 The return value is the size in bytes of the data written into 139 The return value is the size in bytes of the data written into
140 ops->resbuf if no errors occur. If an error occurs, -1 is returned 140 ops->resbuf if no errors occur. If an error occurs, -1 is returned
141 and errno is set appropriatly: 141 and errno is set appropriately:
142 142
143 EFAULT Invalid user space pointer was passed 143 EFAULT Invalid user space pointer was passed
144 ENXIO Invalid IOP number 144 ENXIO Invalid IOP number
@@ -222,7 +222,7 @@ VIII. Downloading Software
222 RETURNS 222 RETURNS
223 223
224 This function returns 0 no errors occur. If an error occurs, -1 224 This function returns 0 no errors occur. If an error occurs, -1
225 is returned and errno is set appropriatly: 225 is returned and errno is set appropriately:
226 226
227 EFAULT Invalid user space pointer was passed 227 EFAULT Invalid user space pointer was passed
228 ENXIO Invalid IOP number 228 ENXIO Invalid IOP number
@@ -264,7 +264,7 @@ IX. Uploading Software
264 RETURNS 264 RETURNS
265 265
266 This function returns 0 if no errors occur. If an error occurs, -1 266 This function returns 0 if no errors occur. If an error occurs, -1
267 is returned and errno is set appropriatly: 267 is returned and errno is set appropriately:
268 268
269 EFAULT Invalid user space pointer was passed 269 EFAULT Invalid user space pointer was passed
270 ENXIO Invalid IOP number 270 ENXIO Invalid IOP number
@@ -301,7 +301,7 @@ X. Removing Software
301 RETURNS 301 RETURNS
302 302
303 This function returns 0 if no errors occur. If an error occurs, -1 303 This function returns 0 if no errors occur. If an error occurs, -1
304 is returned and errno is set appropriatly: 304 is returned and errno is set appropriately:
305 305
306 EFAULT Invalid user space pointer was passed 306 EFAULT Invalid user space pointer was passed
307 ENXIO Invalid IOP number 307 ENXIO Invalid IOP number
@@ -325,7 +325,7 @@ X. Validating Configuration
325 RETURNS 325 RETURNS
326 326
327 This function returns 0 if no erro occur. If an error occurs, -1 is 327 This function returns 0 if no erro occur. If an error occurs, -1 is
328 returned and errno is set appropriatly: 328 returned and errno is set appropriately:
329 329
330 ETIMEDOUT Timeout waiting for reply message 330 ETIMEDOUT Timeout waiting for reply message
331 ENXIO Invalid IOP number 331 ENXIO Invalid IOP number
@@ -360,7 +360,7 @@ XI. Configuration Dialog
360 RETURNS 360 RETURNS
361 361
362 This function returns 0 if no error occur. If an error occurs, -1 362 This function returns 0 if no error occur. If an error occurs, -1
363 is returned and errno is set appropriatly: 363 is returned and errno is set appropriately:
364 364
365 EFAULT Invalid user space pointer was passed 365 EFAULT Invalid user space pointer was passed
366 ENXIO Invalid IOP number 366 ENXIO Invalid IOP number
diff --git a/Documentation/ide/ChangeLog.ide-cd.1994-2004 b/Documentation/ide/ChangeLog.ide-cd.1994-2004
index 190d17bfff62..4cc3ad99f39b 100644
--- a/Documentation/ide/ChangeLog.ide-cd.1994-2004
+++ b/Documentation/ide/ChangeLog.ide-cd.1994-2004
@@ -175,7 +175,7 @@
175 * since the .pdf version doesn't seem to work... 175 * since the .pdf version doesn't seem to work...
176 * -- Updated the TODO list to something more current. 176 * -- Updated the TODO list to something more current.
177 * 177 *
178 * 4.15 Aug 25, 1998 -- Updated ide-cd.h to respect mechine endianess, 178 * 4.15 Aug 25, 1998 -- Updated ide-cd.h to respect machine endianness,
179 * patch thanks to "Eddie C. Dost" <ecd@skynet.be> 179 * patch thanks to "Eddie C. Dost" <ecd@skynet.be>
180 * 180 *
181 * 4.50 Oct 19, 1998 -- New maintainers! 181 * 4.50 Oct 19, 1998 -- New maintainers!
diff --git a/Documentation/ide/ide.txt b/Documentation/ide/ide.txt
index e77bebfa7b0d..7aca987c23d9 100644
--- a/Documentation/ide/ide.txt
+++ b/Documentation/ide/ide.txt
@@ -169,7 +169,7 @@ When using ide.c as a module in combination with kmod, add:
169 169
170 alias block-major-3 ide-probe 170 alias block-major-3 ide-probe
171 171
172to /etc/modprobe.conf. 172to a configuration file in /etc/modprobe.d/.
173 173
174When ide.c is used as a module, you can pass command line parameters to the 174When ide.c is used as a module, you can pass command line parameters to the
175driver using the "options=" keyword to insmod, while replacing any ',' with 175driver using the "options=" keyword to insmod, while replacing any ',' with
diff --git a/Documentation/input/alps.txt b/Documentation/input/alps.txt
index f274c28b5103..ae8ba9a74ce1 100644
--- a/Documentation/input/alps.txt
+++ b/Documentation/input/alps.txt
@@ -13,7 +13,8 @@ Detection
13 13
14All ALPS touchpads should respond to the "E6 report" command sequence: 14All ALPS touchpads should respond to the "E6 report" command sequence:
15E8-E6-E6-E6-E9. An ALPS touchpad should respond with either 00-00-0A or 15E8-E6-E6-E6-E9. An ALPS touchpad should respond with either 00-00-0A or
1600-00-64. 1600-00-64 if no buttons are pressed. The bits 0-2 of the first byte will be 1s
17if some buttons are pressed.
17 18
18If the E6 report is successful, the touchpad model is identified using the "E7 19If the E6 report is successful, the touchpad model is identified using the "E7
19report" sequence: E8-E7-E7-E7-E9. The response is the model signature and is 20report" sequence: E8-E7-E7-E7-E9. The response is the model signature and is
@@ -131,8 +132,8 @@ number of contacts (f1 and f0 in the table below).
131 byte 5: 0 1 ? ? ? ? f1 f0 132 byte 5: 0 1 ? ? ? ? f1 f0
132 133
133This packet only appears after a position packet with the mt bit set, and 134This packet only appears after a position packet with the mt bit set, and
134ususally only appears when there are two or more contacts (although 135usually only appears when there are two or more contacts (although
135ocassionally it's seen with only a single contact). 136occassionally it's seen with only a single contact).
136 137
137The final v3 packet type is the trackstick packet. 138The final v3 packet type is the trackstick packet.
138 139
diff --git a/Documentation/input/input.txt b/Documentation/input/input.txt
index b3d6787b4fb1..666c06c5ab0c 100644
--- a/Documentation/input/input.txt
+++ b/Documentation/input/input.txt
@@ -250,8 +250,8 @@ And so on up to event31.
250a USB keyboard works and is correctly connected to the kernel keyboard 250a USB keyboard works and is correctly connected to the kernel keyboard
251driver. 251driver.
252 252
253 Doing a cat /dev/input/mouse0 (c, 13, 32) will verify that a mouse 253 Doing a "cat /dev/input/mouse0" (c, 13, 32) will verify that a mouse
254is also emulated, characters should appear if you move it. 254is also emulated; characters should appear if you move it.
255 255
256 You can test the joystick emulation with the 'jstest' utility, 256 You can test the joystick emulation with the 'jstest' utility,
257available in the joystick package (see Documentation/input/joystick.txt). 257available in the joystick package (see Documentation/input/joystick.txt).
diff --git a/Documentation/input/joystick.txt b/Documentation/input/joystick.txt
index 8007b7ca87bf..304262bb661a 100644
--- a/Documentation/input/joystick.txt
+++ b/Documentation/input/joystick.txt
@@ -330,7 +330,7 @@ the USB documentation for how to setup an USB mouse.
330 The TM DirectConnect (BSP) protocol is supported by the tmdc.c 330 The TM DirectConnect (BSP) protocol is supported by the tmdc.c
331module. This includes, but is not limited to: 331module. This includes, but is not limited to:
332 332
333* ThrustMaster Millenium 3D Inceptor 333* ThrustMaster Millennium 3D Interceptor
334* ThrustMaster 3D Rage Pad 334* ThrustMaster 3D Rage Pad
335* ThrustMaster Fusion Digital Game Pad 335* ThrustMaster Fusion Digital Game Pad
336 336
diff --git a/Documentation/ioctl/hdio.txt b/Documentation/ioctl/hdio.txt
index 91a6ecbae0bb..18eb98c44ffe 100644
--- a/Documentation/ioctl/hdio.txt
+++ b/Documentation/ioctl/hdio.txt
@@ -596,7 +596,7 @@ HDIO_DRIVE_TASKFILE execute raw taskfile
596 if CHS/LBA28 596 if CHS/LBA28
597 597
598 The association between in_flags.all and each enable 598 The association between in_flags.all and each enable
599 bitfield flips depending on endianess; fortunately, TASKFILE 599 bitfield flips depending on endianness; fortunately, TASKFILE
600 only uses inflags.b.data bit and ignores all other bits. 600 only uses inflags.b.data bit and ignores all other bits.
601 The end result is that, on any endian machines, it has no 601 The end result is that, on any endian machines, it has no
602 effect other than modifying in_flags on completion. 602 effect other than modifying in_flags on completion.
@@ -720,7 +720,7 @@ HDIO_DRIVE_TASKFILE execute raw taskfile
720 720
721 [6] Do not access {in|out}_flags->all except for resetting 721 [6] Do not access {in|out}_flags->all except for resetting
722 all the bits. Always access individual bit fields. ->all 722 all the bits. Always access individual bit fields. ->all
723 value will flip depending on endianess. For the same 723 value will flip depending on endianness. For the same
724 reason, do not use IDE_{TASKFILE|HOB}_STD_{OUT|IN}_FLAGS 724 reason, do not use IDE_{TASKFILE|HOB}_STD_{OUT|IN}_FLAGS
725 constants defined in hdreg.h. 725 constants defined in hdreg.h.
726 726
diff --git a/Documentation/ioctl/ioctl-number.txt b/Documentation/ioctl/ioctl-number.txt
index 4840334ea97b..e34b531dc316 100644
--- a/Documentation/ioctl/ioctl-number.txt
+++ b/Documentation/ioctl/ioctl-number.txt
@@ -189,7 +189,7 @@ Code Seq#(hex) Include File Comments
189'Y' all linux/cyclades.h 189'Y' all linux/cyclades.h
190'Z' 14-15 drivers/message/fusion/mptctl.h 190'Z' 14-15 drivers/message/fusion/mptctl.h
191'[' 00-07 linux/usb/tmc.h USB Test and Measurement Devices 191'[' 00-07 linux/usb/tmc.h USB Test and Measurement Devices
192 <mailto:gregkh@suse.de> 192 <mailto:gregkh@linuxfoundation.org>
193'a' all linux/atm*.h, linux/sonet.h ATM on linux 193'a' all linux/atm*.h, linux/sonet.h ATM on linux
194 <http://lrcwww.epfl.ch/> 194 <http://lrcwww.epfl.ch/>
195'b' 00-FF conflict! bit3 vme host bridge 195'b' 00-FF conflict! bit3 vme host bridge
@@ -218,12 +218,14 @@ Code Seq#(hex) Include File Comments
218'h' 00-7F conflict! Charon filesystem 218'h' 00-7F conflict! Charon filesystem
219 <mailto:zapman@interlan.net> 219 <mailto:zapman@interlan.net>
220'h' 00-1F linux/hpet.h conflict! 220'h' 00-1F linux/hpet.h conflict!
221'h' 80-8F fs/hfsplus/ioctl.c
221'i' 00-3F linux/i2o-dev.h conflict! 222'i' 00-3F linux/i2o-dev.h conflict!
222'i' 0B-1F linux/ipmi.h conflict! 223'i' 0B-1F linux/ipmi.h conflict!
223'i' 80-8F linux/i8k.h 224'i' 80-8F linux/i8k.h
224'j' 00-3F linux/joystick.h 225'j' 00-3F linux/joystick.h
225'k' 00-0F linux/spi/spidev.h conflict! 226'k' 00-0F linux/spi/spidev.h conflict!
226'k' 00-05 video/kyro.h conflict! 227'k' 00-05 video/kyro.h conflict!
228'k' 10-17 linux/hsi/hsi_char.h HSI character device
227'l' 00-3F linux/tcfs_fs.h transparent cryptographic file system 229'l' 00-3F linux/tcfs_fs.h transparent cryptographic file system
228 <http://web.archive.org/web/*/http://mikonos.dia.unisa.it/tcfs> 230 <http://web.archive.org/web/*/http://mikonos.dia.unisa.it/tcfs>
229'l' 40-7F linux/udf_fs_i.h in development: 231'l' 40-7F linux/udf_fs_i.h in development:
@@ -255,7 +257,7 @@ Code Seq#(hex) Include File Comments
255 linux/ixjuser.h <http://web.archive.org/web/*/http://www.quicknet.net> 257 linux/ixjuser.h <http://web.archive.org/web/*/http://www.quicknet.net>
256'r' 00-1F linux/msdos_fs.h and fs/fat/dir.c 258'r' 00-1F linux/msdos_fs.h and fs/fat/dir.c
257's' all linux/cdk.h 259's' all linux/cdk.h
258't' 00-7F linux/if_ppp.h 260't' 00-7F linux/ppp-ioctl.h
259't' 80-8F linux/isdn_ppp.h 261't' 80-8F linux/isdn_ppp.h
260't' 90 linux/toshiba.h 262't' 90 linux/toshiba.h
261'u' 00-1F linux/smb_fs.h gone 263'u' 00-1F linux/smb_fs.h gone
diff --git a/Documentation/isdn/README.gigaset b/Documentation/isdn/README.gigaset
index ef3343eaa002..7534c6039adc 100644
--- a/Documentation/isdn/README.gigaset
+++ b/Documentation/isdn/README.gigaset
@@ -97,8 +97,7 @@ GigaSet 307x Device Driver
97 2.5.): 1=on (default), 0=off 97 2.5.): 1=on (default), 0=off
98 98
99 Depending on your distribution you may want to create a separate module 99 Depending on your distribution you may want to create a separate module
100 configuration file /etc/modprobe.d/gigaset for these, or add them to a 100 configuration file like /etc/modprobe.d/gigaset.conf for these.
101 custom file like /etc/modprobe.conf.local.
102 101
1032.2. Device nodes for user space programs 1022.2. Device nodes for user space programs
104 ------------------------------------ 103 ------------------------------------
@@ -212,8 +211,8 @@ GigaSet 307x Device Driver
212 211
213 options ppp_async flag_time=0 212 options ppp_async flag_time=0
214 213
215 to an appropriate module configuration file, like /etc/modprobe.d/gigaset 214 to an appropriate module configuration file, like
216 or /etc/modprobe.conf.local. 215 /etc/modprobe.d/gigaset.conf.
217 216
218 Unimodem mode is needed for making some devices [e.g. SX100] work which 217 Unimodem mode is needed for making some devices [e.g. SX100] work which
219 do not support the regular Gigaset command set. If debug output (see 218 do not support the regular Gigaset command set. If debug output (see
@@ -237,8 +236,8 @@ GigaSet 307x Device Driver
237 modprobe usb_gigaset startmode=0 236 modprobe usb_gigaset startmode=0
238 or by adding a line like 237 or by adding a line like
239 options usb_gigaset startmode=0 238 options usb_gigaset startmode=0
240 to an appropriate module configuration file, like /etc/modprobe.d/gigaset 239 to an appropriate module configuration file, like
241 or /etc/modprobe.conf.local. 240 /etc/modprobe.d/gigaset.conf
242 241
2432.6. Call-ID (CID) mode 2422.6. Call-ID (CID) mode
244 ------------------ 243 ------------------
@@ -310,7 +309,7 @@ GigaSet 307x Device Driver
310 309
311 options isdn dialtimeout=15 310 options isdn dialtimeout=15
312 311
313 to /etc/modprobe.d/gigaset, /etc/modprobe.conf.local or a similar file. 312 to /etc/modprobe.d/gigaset.conf or a similar file.
314 313
315 Problem: 314 Problem:
316 The isdnlog program emits error messages or just doesn't work. 315 The isdnlog program emits error messages or just doesn't work.
@@ -350,8 +349,7 @@ GigaSet 307x Device Driver
350 The initial value can be set using the debug parameter when loading the 349 The initial value can be set using the debug parameter when loading the
351 module "gigaset", e.g. by adding a line 350 module "gigaset", e.g. by adding a line
352 options gigaset debug=0 351 options gigaset debug=0
353 to your module configuration file, eg. /etc/modprobe.d/gigaset or 352 to your module configuration file, eg. /etc/modprobe.d/gigaset.conf
354 /etc/modprobe.conf.local.
355 353
356 Generated debugging information can be found 354 Generated debugging information can be found
357 - as output of the command 355 - as output of the command
diff --git a/Documentation/kbuild/kconfig-language.txt b/Documentation/kbuild/kconfig-language.txt
index 44e2649fbb29..a686f9cd69c1 100644
--- a/Documentation/kbuild/kconfig-language.txt
+++ b/Documentation/kbuild/kconfig-language.txt
@@ -117,7 +117,7 @@ applicable everywhere (see syntax).
117 This attribute is only applicable to menu blocks, if the condition is 117 This attribute is only applicable to menu blocks, if the condition is
118 false, the menu block is not displayed to the user (the symbols 118 false, the menu block is not displayed to the user (the symbols
119 contained there can still be selected by other symbols, though). It is 119 contained there can still be selected by other symbols, though). It is
120 similar to a conditional "prompt" attribude for individual menu 120 similar to a conditional "prompt" attribute for individual menu
121 entries. Default value of "visible" is true. 121 entries. Default value of "visible" is true.
122 122
123- numerical ranges: "range" <symbol> <symbol> ["if" <expr>] 123- numerical ranges: "range" <symbol> <symbol> ["if" <expr>]
diff --git a/Documentation/kbuild/kconfig.txt b/Documentation/kbuild/kconfig.txt
index c313d71324b4..9d5f2a90dca9 100644
--- a/Documentation/kbuild/kconfig.txt
+++ b/Documentation/kbuild/kconfig.txt
@@ -28,12 +28,10 @@ new (default) values, so you can use:
28 28
29 grep "(NEW)" conf.new 29 grep "(NEW)" conf.new
30 30
31to see the new config symbols or you can 'diff' the previous and 31to see the new config symbols or you can use diffconfig to see the
32new .config files to see the differences: 32differences between the previous and new .config files:
33 33
34 diff .config.old .config | less 34 scripts/diffconfig .config.old .config | less
35
36(Yes, we need something better here.)
37 35
38______________________________________________________________________ 36______________________________________________________________________
39Environment variables for '*config' 37Environment variables for '*config'
diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt
index 033d4e69b43b..c1601e5a8b71 100644
--- a/Documentation/kernel-parameters.txt
+++ b/Documentation/kernel-parameters.txt
@@ -713,6 +713,21 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
713 The filter can be disabled or changed to another 713 The filter can be disabled or changed to another
714 driver later using sysfs. 714 driver later using sysfs.
715 715
716 drm_kms_helper.edid_firmware=[<connector>:]<file>
717 Broken monitors, graphic adapters and KVMs may
718 send no or incorrect EDID data sets. This parameter
719 allows to specify an EDID data set in the
720 /lib/firmware directory that is used instead.
721 Generic built-in EDID data sets are used, if one of
722 edid/1024x768.bin, edid/1280x1024.bin,
723 edid/1680x1050.bin, or edid/1920x1080.bin is given
724 and no file with the same name exists. Details and
725 instructions how to build your own EDID data are
726 available in Documentation/EDID/HOWTO.txt. An EDID
727 data set will only be used for a particular connector,
728 if its name and a colon are prepended to the EDID
729 name.
730
716 dscc4.setup= [NET] 731 dscc4.setup= [NET]
717 732
718 earlycon= [KNL] Output early console device and options. 733 earlycon= [KNL] Output early console device and options.
@@ -950,7 +965,7 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
950 controller 965 controller
951 i8042.nopnp [HW] Don't use ACPIPnP / PnPBIOS to discover KBD/AUX 966 i8042.nopnp [HW] Don't use ACPIPnP / PnPBIOS to discover KBD/AUX
952 controllers 967 controllers
953 i8042.notimeout [HW] Ignore timeout condition signalled by conroller 968 i8042.notimeout [HW] Ignore timeout condition signalled by controller
954 i8042.reset [HW] Reset the controller during init and cleanup 969 i8042.reset [HW] Reset the controller during init and cleanup
955 i8042.unlock [HW] Unlock (ignore) the keylock 970 i8042.unlock [HW] Unlock (ignore) the keylock
956 971
@@ -1071,8 +1086,6 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
1071 no_x2apic_optout 1086 no_x2apic_optout
1072 BIOS x2APIC opt-out request will be ignored 1087 BIOS x2APIC opt-out request will be ignored
1073 1088
1074 inttest= [IA-64]
1075
1076 iomem= Disable strict checking of access to MMIO memory 1089 iomem= Disable strict checking of access to MMIO memory
1077 strict regions from userspace. 1090 strict regions from userspace.
1078 relaxed 1091 relaxed
@@ -1657,6 +1670,14 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
1657 of returning the full 64-bit number. 1670 of returning the full 64-bit number.
1658 The default is to return 64-bit inode numbers. 1671 The default is to return 64-bit inode numbers.
1659 1672
1673 nfs.max_session_slots=
1674 [NFSv4.1] Sets the maximum number of session slots
1675 the client will attempt to negotiate with the server.
1676 This limits the number of simultaneous RPC requests
1677 that the client can send to the NFSv4.1 server.
1678 Note that there is little point in setting this
1679 value higher than the max_tcp_slot_table_limit.
1680
1660 nfs.nfs4_disable_idmapping= 1681 nfs.nfs4_disable_idmapping=
1661 [NFSv4] When set to the default of '1', this option 1682 [NFSv4] When set to the default of '1', this option
1662 ensures that both the RPC level authentication 1683 ensures that both the RPC level authentication
@@ -1670,6 +1691,27 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
1670 back to using the idmapper. 1691 back to using the idmapper.
1671 To turn off this behaviour, set the value to '0'. 1692 To turn off this behaviour, set the value to '0'.
1672 1693
1694 nfs.send_implementation_id =
1695 [NFSv4.1] Send client implementation identification
1696 information in exchange_id requests.
1697 If zero, no implementation identification information
1698 will be sent.
1699 The default is to send the implementation identification
1700 information.
1701
1702 nfsd.nfs4_disable_idmapping=
1703 [NFSv4] When set to the default of '1', the NFSv4
1704 server will return only numeric uids and gids to
1705 clients using auth_sys, and will accept numeric uids
1706 and gids from such clients. This is intended to ease
1707 migration from NFSv2/v3.
1708
1709 objlayoutdriver.osd_login_prog=
1710 [NFS] [OBJLAYOUT] sets the pathname to the program which
1711 is used to automatically discover and login into new
1712 osd-targets. Please see:
1713 Documentation/filesystems/pnfs.txt for more explanations
1714
1673 nmi_debug= [KNL,AVR32,SH] Specify one or more actions to take 1715 nmi_debug= [KNL,AVR32,SH] Specify one or more actions to take
1674 when a NMI is triggered. 1716 when a NMI is triggered.
1675 Format: [state][,regs][,debounce][,die] 1717 Format: [state][,regs][,debounce][,die]
@@ -1833,6 +1875,8 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
1833 shutdown the other cpus. Instead use the REBOOT_VECTOR 1875 shutdown the other cpus. Instead use the REBOOT_VECTOR
1834 irq. 1876 irq.
1835 1877
1878 nomodule Disable module load
1879
1836 nopat [X86] Disable PAT (page attribute table extension of 1880 nopat [X86] Disable PAT (page attribute table extension of
1837 pagetables) support. 1881 pagetables) support.
1838 1882
@@ -2109,8 +2153,14 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
2109 the default. 2153 the default.
2110 off: Turn ECRC off 2154 off: Turn ECRC off
2111 on: Turn ECRC on. 2155 on: Turn ECRC on.
2112 realloc reallocate PCI resources if allocations done by BIOS 2156 realloc= Enable/disable reallocating PCI bridge resources
2113 are erroneous. 2157 if allocations done by BIOS are too small to
2158 accommodate resources required by all child
2159 devices.
2160 off: Turn realloc off
2161 on: Turn realloc on
2162 realloc same as realloc=on
2163 noari do not use PCIe ARI.
2114 2164
2115 pcie_aspm= [PCIE] Forcibly enable or disable PCIe Active State Power 2165 pcie_aspm= [PCIE] Forcibly enable or disable PCIe Active State Power
2116 Management. 2166 Management.
@@ -2118,6 +2168,10 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
2118 force Enable ASPM even on devices that claim not to support it. 2168 force Enable ASPM even on devices that claim not to support it.
2119 WARNING: Forcing ASPM on may cause system lockups. 2169 WARNING: Forcing ASPM on may cause system lockups.
2120 2170
2171 pcie_hp= [PCIE] PCI Express Hotplug driver options:
2172 nomsi Do not use MSI for PCI Express Native Hotplug (this
2173 makes all PCIe ports use INTx for hotplug services).
2174
2121 pcie_ports= [PCIE] PCIe ports handling: 2175 pcie_ports= [PCIE] PCIe ports handling:
2122 auto Ask the BIOS whether or not to use native PCIe services 2176 auto Ask the BIOS whether or not to use native PCIe services
2123 associated with PCIe ports (PME, hot-plug, AER). Use 2177 associated with PCIe ports (PME, hot-plug, AER). Use
@@ -2211,6 +2265,12 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
2211 2265
2212 default: off. 2266 default: off.
2213 2267
2268 printk.always_kmsg_dump=
2269 Trigger kmsg_dump for cases other than kernel oops or
2270 panics
2271 Format: <bool> (1/Y/y=enable, 0/N/n=disable)
2272 default: disabled
2273
2214 printk.time= Show timing data prefixed to each printk message line 2274 printk.time= Show timing data prefixed to each printk message line
2215 Format: <bool> (1/Y/y=enable, 0/N/n=disable) 2275 Format: <bool> (1/Y/y=enable, 0/N/n=disable)
2216 2276
@@ -2434,7 +2494,7 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
2434 For more information see Documentation/vm/slub.txt. 2494 For more information see Documentation/vm/slub.txt.
2435 2495
2436 slub_min_order= [MM, SLUB] 2496 slub_min_order= [MM, SLUB]
2437 Determines the mininum page order for slabs. Must be 2497 Determines the minimum page order for slabs. Must be
2438 lower than slub_max_order. 2498 lower than slub_max_order.
2439 For more information see Documentation/vm/slub.txt. 2499 For more information see Documentation/vm/slub.txt.
2440 2500
@@ -2600,7 +2660,7 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
2600 2660
2601 threadirqs [KNL] 2661 threadirqs [KNL]
2602 Force threading of all interrupt handlers except those 2662 Force threading of all interrupt handlers except those
2603 marked explicitely IRQF_NO_THREAD. 2663 marked explicitly IRQF_NO_THREAD.
2604 2664
2605 topology= [S390] 2665 topology= [S390]
2606 Format: {off | on} 2666 Format: {off | on}
@@ -2629,6 +2689,13 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
2629 to facilitate early boot debugging. 2689 to facilitate early boot debugging.
2630 See also Documentation/trace/events.txt 2690 See also Documentation/trace/events.txt
2631 2691
2692 transparent_hugepage=
2693 [KNL]
2694 Format: [always|madvise|never]
2695 Can be used to control the default behavior of the system
2696 with respect to transparent hugepages.
2697 See Documentation/vm/transhuge.txt for more details.
2698
2632 tsc= Disable clocksource stability checks for TSC. 2699 tsc= Disable clocksource stability checks for TSC.
2633 Format: <string> 2700 Format: <string>
2634 [x86] reliable: mark tsc clocksource as reliable, this 2701 [x86] reliable: mark tsc clocksource as reliable, this
diff --git a/Documentation/ko_KR/HOWTO b/Documentation/ko_KR/HOWTO
index ab5189ae3428..2f48f205fedc 100644
--- a/Documentation/ko_KR/HOWTO
+++ b/Documentation/ko_KR/HOWTO
@@ -354,7 +354,7 @@ Andrew Morton에 의해 배포된 실험적인 커널 패치들이다. Andrew는
354 git.kernel.org:/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6.git 354 git.kernel.org:/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6.git
355 355
356 quilt trees: 356 quilt trees:
357 - USB, PCI, Driver Core, and I2C, Greg Kroah-Hartman < gregkh@suse.de> 357 - USB, PCI, Driver Core, and I2C, Greg Kroah-Hartman < gregkh@linuxfoundation.org>
358 kernel.org/pub/linux/kernel/people/gregkh/gregkh-2.6/ 358 kernel.org/pub/linux/kernel/people/gregkh/gregkh-2.6/
359 - x86-64, partly i386, Andi Kleen < ak@suse.de> 359 - x86-64, partly i386, Andi Kleen < ak@suse.de>
360 ftp.firstfloor.org:/pub/ak/x86_64/quilt/ 360 ftp.firstfloor.org:/pub/ak/x86_64/quilt/
diff --git a/Documentation/kobject.txt b/Documentation/kobject.txt
index 3ab2472509cb..49578cf1aea5 100644
--- a/Documentation/kobject.txt
+++ b/Documentation/kobject.txt
@@ -1,6 +1,6 @@
1Everything you never wanted to know about kobjects, ksets, and ktypes 1Everything you never wanted to know about kobjects, ksets, and ktypes
2 2
3Greg Kroah-Hartman <gregkh@suse.de> 3Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4 4
5Based on an original article by Jon Corbet for lwn.net written October 1, 5Based on an original article by Jon Corbet for lwn.net written October 1,
62003 and located at http://lwn.net/Articles/51437/ 62003 and located at http://lwn.net/Articles/51437/
diff --git a/Documentation/laptops/asus-laptop.txt b/Documentation/laptops/asus-laptop.txt
index 803e51f6768b..a1e04d679289 100644
--- a/Documentation/laptops/asus-laptop.txt
+++ b/Documentation/laptops/asus-laptop.txt
@@ -45,7 +45,7 @@ Status
45Usage 45Usage
46----- 46-----
47 47
48 Try "modprobe asus_acpi". Check your dmesg (simply type dmesg). You should 48 Try "modprobe asus-laptop". Check your dmesg (simply type dmesg). You should
49 see some lines like this : 49 see some lines like this :
50 50
51 Asus Laptop Extras version 0.42 51 Asus Laptop Extras version 0.42
diff --git a/Documentation/laptops/sony-laptop.txt b/Documentation/laptops/sony-laptop.txt
index 2bd4e82e5d9f..0d5ac7f5287e 100644
--- a/Documentation/laptops/sony-laptop.txt
+++ b/Documentation/laptops/sony-laptop.txt
@@ -17,6 +17,11 @@ subsystem. See the logs of acpid or /proc/acpi/event and
17devices are created by the driver. Additionally, loading the driver with the 17devices are created by the driver. Additionally, loading the driver with the
18debug option will report all events in the kernel log. 18debug option will report all events in the kernel log.
19 19
20The "scancodes" passed to the input system (that can be remapped with udev)
21are indexes to the table "sony_laptop_input_keycode_map" in the sony-laptop.c
22module. For example the "FN/E" key combination (EJECTCD on some models)
23generates the scancode 20 (0x14).
24
20Backlight control: 25Backlight control:
21------------------ 26------------------
22If your laptop model supports it, you will find sysfs files in the 27If your laptop model supports it, you will find sysfs files in the
diff --git a/Documentation/laptops/sonypi.txt b/Documentation/laptops/sonypi.txt
index 4857acfc50f1..606bdb9ce036 100644
--- a/Documentation/laptops/sonypi.txt
+++ b/Documentation/laptops/sonypi.txt
@@ -110,7 +110,7 @@ Module use:
110----------- 110-----------
111 111
112In order to automatically load the sonypi module on use, you can put those 112In order to automatically load the sonypi module on use, you can put those
113lines in your /etc/modprobe.conf file: 113lines a configuration file in /etc/modprobe.d/:
114 114
115 alias char-major-10-250 sonypi 115 alias char-major-10-250 sonypi
116 options sonypi minor=250 116 options sonypi minor=250
diff --git a/Documentation/leds/leds-lp5521.txt b/Documentation/leds/leds-lp5521.txt
index c4d8d151e0fe..0e542ab3d4a0 100644
--- a/Documentation/leds/leds-lp5521.txt
+++ b/Documentation/leds/leds-lp5521.txt
@@ -43,17 +43,23 @@ Format: 10x mA i.e 10 means 1.0 mA
43example platform data: 43example platform data:
44 44
45Note: chan_nr can have values between 0 and 2. 45Note: chan_nr can have values between 0 and 2.
46The name of each channel can be configurable.
47If the name field is not defined, the default name will be set to 'xxxx:channelN'
48(XXXX : pdata->label or i2c client name, N : channel number)
46 49
47static struct lp5521_led_config lp5521_led_config[] = { 50static struct lp5521_led_config lp5521_led_config[] = {
48 { 51 {
52 .name = "red",
49 .chan_nr = 0, 53 .chan_nr = 0,
50 .led_current = 50, 54 .led_current = 50,
51 .max_current = 130, 55 .max_current = 130,
52 }, { 56 }, {
57 .name = "green",
53 .chan_nr = 1, 58 .chan_nr = 1,
54 .led_current = 0, 59 .led_current = 0,
55 .max_current = 130, 60 .max_current = 130,
56 }, { 61 }, {
62 .name = "blue",
57 .chan_nr = 2, 63 .chan_nr = 2,
58 .led_current = 0, 64 .led_current = 0,
59 .max_current = 130, 65 .max_current = 130,
@@ -86,3 +92,60 @@ static struct lp5521_platform_data lp5521_platform_data = {
86 92
87If the current is set to 0 in the platform data, that channel is 93If the current is set to 0 in the platform data, that channel is
88disabled and it is not visible in the sysfs. 94disabled and it is not visible in the sysfs.
95
96The 'update_config' : CONFIG register (ADDR 08h)
97This value is platform-specific data.
98If update_config is not defined, the CONFIG register is set with
99'LP5521_PWRSAVE_EN | LP5521_CP_MODE_AUTO | LP5521_R_TO_BATT'.
100(Enable auto-powersave, set charge pump to auto, red to battery)
101
102example of update_config :
103
104#define LP5521_CONFIGS (LP5521_PWM_HF | LP5521_PWRSAVE_EN | \
105 LP5521_CP_MODE_AUTO | LP5521_R_TO_BATT | \
106 LP5521_CLK_INT)
107
108static struct lp5521_platform_data lp5521_pdata = {
109 .led_config = lp5521_led_config,
110 .num_channels = ARRAY_SIZE(lp5521_led_config),
111 .clock_mode = LP5521_CLOCK_INT,
112 .update_config = LP5521_CONFIGS,
113};
114
115LED patterns : LP5521 has autonomous operation without external control.
116Pattern data can be defined in the platform data.
117
118example of led pattern data :
119
120/* RGB(50,5,0) 500ms on, 500ms off, infinite loop */
121static u8 pattern_red[] = {
122 0x40, 0x32, 0x60, 0x00, 0x40, 0x00, 0x60, 0x00,
123 };
124
125static u8 pattern_green[] = {
126 0x40, 0x05, 0x60, 0x00, 0x40, 0x00, 0x60, 0x00,
127 };
128
129static struct lp5521_led_pattern board_led_patterns[] = {
130 {
131 .r = pattern_red,
132 .g = pattern_green,
133 .size_r = ARRAY_SIZE(pattern_red),
134 .size_g = ARRAY_SIZE(pattern_green),
135 },
136};
137
138static struct lp5521_platform_data lp5521_platform_data = {
139 .led_config = lp5521_led_config,
140 .num_channels = ARRAY_SIZE(lp5521_led_config),
141 .clock_mode = LP5521_CLOCK_EXT,
142 .patterns = board_led_patterns,
143 .num_patterns = ARRAY_SIZE(board_led_patterns),
144};
145
146Then predefined led pattern(s) can be executed via the sysfs.
147To start the pattern #1,
148# echo 1 > /sys/bus/i2c/devices/xxxx/led_pattern
149(xxxx : i2c bus & slave address)
150To end the pattern,
151# echo 0 > /sys/bus/i2c/devices/xxxx/led_pattern
diff --git a/Documentation/lockup-watchdogs.txt b/Documentation/lockup-watchdogs.txt
new file mode 100644
index 000000000000..d2a36602ca8d
--- /dev/null
+++ b/Documentation/lockup-watchdogs.txt
@@ -0,0 +1,63 @@
1===============================================================
2Softlockup detector and hardlockup detector (aka nmi_watchdog)
3===============================================================
4
5The Linux kernel can act as a watchdog to detect both soft and hard
6lockups.
7
8A 'softlockup' is defined as a bug that causes the kernel to loop in
9kernel mode for more than 20 seconds (see "Implementation" below for
10details), without giving other tasks a chance to run. The current
11stack trace is displayed upon detection and, by default, the system
12will stay locked up. Alternatively, the kernel can be configured to
13panic; a sysctl, "kernel.softlockup_panic", a kernel parameter,
14"softlockup_panic" (see "Documentation/kernel-parameters.txt" for
15details), and a compile option, "BOOTPARAM_HARDLOCKUP_PANIC", are
16provided for this.
17
18A 'hardlockup' is defined as a bug that causes the CPU to loop in
19kernel mode for more than 10 seconds (see "Implementation" below for
20details), without letting other interrupts have a chance to run.
21Similarly to the softlockup case, the current stack trace is displayed
22upon detection and the system will stay locked up unless the default
23behavior is changed, which can be done through a compile time knob,
24"BOOTPARAM_HARDLOCKUP_PANIC", and a kernel parameter, "nmi_watchdog"
25(see "Documentation/kernel-parameters.txt" for details).
26
27The panic option can be used in combination with panic_timeout (this
28timeout is set through the confusingly named "kernel.panic" sysctl),
29to cause the system to reboot automatically after a specified amount
30of time.
31
32=== Implementation ===
33
34The soft and hard lockup detectors are built on top of the hrtimer and
35perf subsystems, respectively. A direct consequence of this is that,
36in principle, they should work in any architecture where these
37subsystems are present.
38
39A periodic hrtimer runs to generate interrupts and kick the watchdog
40task. An NMI perf event is generated every "watchdog_thresh"
41(compile-time initialized to 10 and configurable through sysctl of the
42same name) seconds to check for hardlockups. If any CPU in the system
43does not receive any hrtimer interrupt during that time the
44'hardlockup detector' (the handler for the NMI perf event) will
45generate a kernel warning or call panic, depending on the
46configuration.
47
48The watchdog task is a high priority kernel thread that updates a
49timestamp every time it is scheduled. If that timestamp is not updated
50for 2*watchdog_thresh seconds (the softlockup threshold) the
51'softlockup detector' (coded inside the hrtimer callback function)
52will dump useful debug information to the system log, after which it
53will call panic if it was instructed to do so or resume execution of
54other kernel code.
55
56The period of the hrtimer is 2*watchdog_thresh/5, which means it has
57two or three chances to generate an interrupt before the hardlockup
58detector kicks in.
59
60As explained above, a kernel knob is provided that allows
61administrators to configure the period of the hrtimer and the perf
62event. The right value for a particular environment is a trade-off
63between fast response to lockups and detection overhead.
diff --git a/Documentation/magic-number.txt b/Documentation/magic-number.txt
index abf481f780ec..82761a31d64d 100644
--- a/Documentation/magic-number.txt
+++ b/Documentation/magic-number.txt
@@ -89,7 +89,7 @@ TTY_DRIVER_MAGIC 0x5402 tty_driver include/linux/tty_driver.h
89MGSLPC_MAGIC 0x5402 mgslpc_info drivers/char/pcmcia/synclink_cs.c 89MGSLPC_MAGIC 0x5402 mgslpc_info drivers/char/pcmcia/synclink_cs.c
90TTY_LDISC_MAGIC 0x5403 tty_ldisc include/linux/tty_ldisc.h 90TTY_LDISC_MAGIC 0x5403 tty_ldisc include/linux/tty_ldisc.h
91USB_SERIAL_MAGIC 0x6702 usb_serial drivers/usb/serial/usb-serial.h 91USB_SERIAL_MAGIC 0x6702 usb_serial drivers/usb/serial/usb-serial.h
92FULL_DUPLEX_MAGIC 0x6969 drivers/net/tulip/de2104x.c 92FULL_DUPLEX_MAGIC 0x6969 drivers/net/ethernet/dec/tulip/de2104x.c
93USB_BLUETOOTH_MAGIC 0x6d02 usb_bluetooth drivers/usb/class/bluetty.c 93USB_BLUETOOTH_MAGIC 0x6d02 usb_bluetooth drivers/usb/class/bluetty.c
94RFCOMM_TTY_MAGIC 0x6d02 net/bluetooth/rfcomm/tty.c 94RFCOMM_TTY_MAGIC 0x6d02 net/bluetooth/rfcomm/tty.c
95USB_SERIAL_PORT_MAGIC 0x7301 usb_serial_port drivers/usb/serial/usb-serial.h 95USB_SERIAL_PORT_MAGIC 0x7301 usb_serial_port drivers/usb/serial/usb-serial.h
diff --git a/Documentation/mono.txt b/Documentation/mono.txt
index e8e1758e87da..d01ac6052194 100644
--- a/Documentation/mono.txt
+++ b/Documentation/mono.txt
@@ -38,11 +38,11 @@ if [ ! -e /proc/sys/fs/binfmt_misc/register ]; then
38 /sbin/modprobe binfmt_misc 38 /sbin/modprobe binfmt_misc
39 # Some distributions, like Fedora Core, perform 39 # Some distributions, like Fedora Core, perform
40 # the following command automatically when the 40 # the following command automatically when the
41 # binfmt_misc module is loaded into the kernel. 41 # binfmt_misc module is loaded into the kernel
42 # or during normal boot up (systemd-based systems).
42 # Thus, it is possible that the following line 43 # Thus, it is possible that the following line
43 # is not needed at all. Look at /etc/modprobe.conf 44 # is not needed at all.
44 # to check whether this is applicable or not. 45 mount -t binfmt_misc none /proc/sys/fs/binfmt_misc
45 mount -t binfmt_misc none /proc/sys/fs/binfmt_misc
46fi 46fi
47 47
48# Register support for .NET CLR binaries 48# Register support for .NET CLR binaries
diff --git a/Documentation/networking/LICENSE.qlge b/Documentation/networking/LICENSE.qlge
index 123b6edd7f18..ce64e4d15b21 100644
--- a/Documentation/networking/LICENSE.qlge
+++ b/Documentation/networking/LICENSE.qlge
@@ -1,46 +1,288 @@
1Copyright (c) 2003-2008 QLogic Corporation 1Copyright (c) 2003-2011 QLogic Corporation
2QLogic Linux Networking HBA Driver 2QLogic Linux qlge NIC Driver
3 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 4You may modify and redistribute the device driver code under the
7GNU General Public License as published by the Free Software 5GNU General Public License (a copy of which is attached hereto as
8Foundation (version 2 or a later version). 6Exhibit 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 7
8
9EXHIBIT A
10
11 GNU GENERAL PUBLIC LICENSE
12 Version 2, June 1991
13
14 Copyright (C) 1989, 1991 Free Software Foundation, Inc.
15 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
16 Everyone is permitted to copy and distribute verbatim copies
17 of this license document, but changing it is not allowed.
18
19 Preamble
20
21 The licenses for most software are designed to take away your
22freedom to share and change it. By contrast, the GNU General Public
23License is intended to guarantee your freedom to share and change free
24software--to make sure the software is free for all its users. This
25General Public License applies to most of the Free Software
26Foundation's software and to any other program whose authors commit to
27using it. (Some other Free Software Foundation software is covered by
28the GNU Lesser General Public License instead.) You can apply it to
29your programs, too.
30
31 When we speak of free software, we are referring to freedom, not
32price. Our General Public Licenses are designed to make sure that you
33have the freedom to distribute copies of free software (and charge for
34this service if you wish), that you receive source code or can get it
35if you want it, that you can change the software or use pieces of it
36in new free programs; and that you know you can do these things.
37
38 To protect your rights, we need to make restrictions that forbid
39anyone to deny you these rights or to ask you to surrender the rights.
40These restrictions translate to certain responsibilities for you if you
41distribute copies of the software, or if you modify it.
42
43 For example, if you distribute copies of such a program, whether
44gratis or for a fee, you must give the recipients all the rights that
45you have. You must make sure that they, too, receive or can get the
46source code. And you must show them these terms so they know their
47rights.
48
49 We protect your rights with two steps: (1) copyright the software, and
50(2) offer you this license which gives you legal permission to copy,
51distribute and/or modify the software.
52
53 Also, for each author's protection and ours, we want to make certain
54that everyone understands that there is no warranty for this free
55software. If the software is modified by someone else and passed on, we
56want its recipients to know that what they have is not the original, so
57that any problems introduced by others will not reflect on the original
58authors' reputations.
59
60 Finally, any free program is threatened constantly by software
61patents. We wish to avoid the danger that redistributors of a free
62program will individually obtain patent licenses, in effect making the
63program proprietary. To prevent this, we have made it clear that any
64patent must be licensed for everyone's free use or not licensed at all.
65
66 The precise terms and conditions for copying, distribution and
67modification follow.
68
69 GNU GENERAL PUBLIC LICENSE
70 TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
71
72 0. This License applies to any program or other work which contains
73a notice placed by the copyright holder saying it may be distributed
74under the terms of this General Public License. The "Program", below,
75refers to any such program or work, and a "work based on the Program"
76means either the Program or any derivative work under copyright law:
77that is to say, a work containing the Program or a portion of it,
78either verbatim or with modifications and/or translated into another
79language. (Hereinafter, translation is included without limitation in
80the term "modification".) Each licensee is addressed as "you".
81
82Activities other than copying, distribution and modification are not
83covered by this License; they are outside its scope. The act of
84running the Program is not restricted, and the output from the Program
85is covered only if its contents constitute a work based on the
86Program (independent of having been made by running the Program).
87Whether that is true depends on what the Program does.
88
89 1. You may copy and distribute verbatim copies of the Program's
90source code as you receive it, in any medium, provided that you
91conspicuously and appropriately publish on each copy an appropriate
92copyright notice and disclaimer of warranty; keep intact all the
93notices that refer to this License and to the absence of any warranty;
94and give any other recipients of the Program a copy of this License
95along with the Program.
96
97You may charge a fee for the physical act of transferring a copy, and
98you may at your option offer warranty protection in exchange for a fee.
99
100 2. You may modify your copy or copies of the Program or any portion
101of it, thus forming a work based on the Program, and copy and
102distribute such modifications or work under the terms of Section 1
103above, provided that you also meet all of these conditions:
104
105 a) You must cause the modified files to carry prominent notices
106 stating that you changed the files and the date of any change.
107
108 b) You must cause any work that you distribute or publish, that in
109 whole or in part contains or is derived from the Program or any
110 part thereof, to be licensed as a whole at no charge to all third
111 parties under the terms of this License.
112
113 c) If the modified program normally reads commands interactively
114 when run, you must cause it, when started running for such
115 interactive use in the most ordinary way, to print or display an
116 announcement including an appropriate copyright notice and a
117 notice that there is no warranty (or else, saying that you provide
118 a warranty) and that users may redistribute the program under
119 these conditions, and telling the user how to view a copy of this
120 License. (Exception: if the Program itself is interactive but
121 does not normally print such an announcement, your work based on
122 the Program is not required to print an announcement.)
123
124These requirements apply to the modified work as a whole. If
125identifiable sections of that work are not derived from the Program,
126and can be reasonably considered independent and separate works in
127themselves, then this License, and its terms, do not apply to those
128sections when you distribute them as separate works. But when you
129distribute the same sections as part of a whole which is a work based
130on the Program, the distribution of the whole must be on the terms of
131this License, whose permissions for other licensees extend to the
132entire whole, and thus to each and every part regardless of who wrote it.
133
134Thus, it is not the intent of this section to claim rights or contest
135your rights to work written entirely by you; rather, the intent is to
136exercise the right to control the distribution of derivative or
137collective works based on the Program.
138
139In addition, mere aggregation of another work not based on the Program
140with the Program (or with a work based on the Program) on a volume of
141a storage or distribution medium does not bring the other work under
142the scope of this License.
143
144 3. You may copy and distribute the Program (or a work based on it,
145under Section 2) in object code or executable form under the terms of
146Sections 1 and 2 above provided that you also do one of the following:
147
148 a) Accompany it with the complete corresponding machine-readable
149 source code, which must be distributed under the terms of Sections
150 1 and 2 above on a medium customarily used for software interchange; or,
151
152 b) Accompany it with a written offer, valid for at least three
153 years, to give any third party, for a charge no more than your
154 cost of physically performing source distribution, a complete
155 machine-readable copy of the corresponding source code, to be
156 distributed under the terms of Sections 1 and 2 above on a medium
157 customarily used for software interchange; or,
158
159 c) Accompany it with the information you received as to the offer
160 to distribute corresponding source code. (This alternative is
161 allowed only for noncommercial distribution and only if you
162 received the program in object code or executable form with such
163 an offer, in accord with Subsection b above.)
164
165The source code for a work means the preferred form of the work for
166making modifications to it. For an executable work, complete source
167code means all the source code for all modules it contains, plus any
168associated interface definition files, plus the scripts used to
169control compilation and installation of the executable. However, as a
170special exception, the source code distributed need not include
171anything that is normally distributed (in either source or binary
172form) with the major components (compiler, kernel, and so on) of the
173operating system on which the executable runs, unless that component
174itself accompanies the executable.
175
176If distribution of executable or object code is made by offering
177access to copy from a designated place, then offering equivalent
178access to copy the source code from the same place counts as
179distribution of the source code, even though third parties are not
180compelled to copy the source along with the object code.
181
182 4. You may not copy, modify, sublicense, or distribute the Program
183except as expressly provided under this License. Any attempt
184otherwise to copy, modify, sublicense or distribute the Program is
185void, and will automatically terminate your rights under this License.
186However, parties who have received copies, or rights, from you under
187this License will not have their licenses terminated so long as such
188parties remain in full compliance.
189
190 5. You are not required to accept this License, since you have not
191signed it. However, nothing else grants you permission to modify or
192distribute the Program or its derivative works. These actions are
193prohibited by law if you do not accept this License. Therefore, by
194modifying or distributing the Program (or any work based on the
195Program), you indicate your acceptance of this License to do so, and
196all its terms and conditions for copying, distributing or modifying
197the Program or works based on it.
198
199 6. Each time you redistribute the Program (or any work based on the
200Program), the recipient automatically receives a license from the
201original licensor to copy, distribute or modify the Program subject to
202these terms and conditions. You may not impose any further
203restrictions on the recipients' exercise of the rights granted herein.
204You are not responsible for enforcing compliance by third parties to
205this License.
206
207 7. If, as a consequence of a court judgment or allegation of patent
208infringement or for any other reason (not limited to patent issues),
209conditions are imposed on you (whether by court order, agreement or
210otherwise) that contradict the conditions of this License, they do not
211excuse you from the conditions of this License. If you cannot
212distribute so as to satisfy simultaneously your obligations under this
213License and any other pertinent obligations, then as a consequence you
214may not distribute the Program at all. For example, if a patent
215license would not permit royalty-free redistribution of the Program by
216all those who receive copies directly or indirectly through you, then
217the only way you could satisfy both it and this License would be to
218refrain entirely from distribution of the Program.
219
220If any portion of this section is held invalid or unenforceable under
221any particular circumstance, the balance of the section is intended to
222apply and the section as a whole is intended to apply in other
223circumstances.
224
225It is not the purpose of this section to induce you to infringe any
226patents or other property right claims or to contest validity of any
227such claims; this section has the sole purpose of protecting the
228integrity of the free software distribution system, which is
229implemented by public license practices. Many people have made
230generous contributions to the wide range of software distributed
231through that system in reliance on consistent application of that
232system; it is up to the author/donor to decide if he or she is willing
233to distribute software through any other system and a licensee cannot
234impose that choice.
235
236This section is intended to make thoroughly clear what is believed to
237be a consequence of the rest of this License.
238
239 8. If the distribution and/or use of the Program is restricted in
240certain countries either by patents or by copyrighted interfaces, the
241original copyright holder who places the Program under this License
242may add an explicit geographical distribution limitation excluding
243those countries, so that distribution is permitted only in or among
244countries not thus excluded. In such case, this License incorporates
245the limitation as if written in the body of this License.
246
247 9. The Free Software Foundation may publish revised and/or new versions
248of the General Public License from time to time. Such new versions will
249be similar in spirit to the present version, but may differ in detail to
250address new problems or concerns.
251
252Each version is given a distinguishing version number. If the Program
253specifies a version number of this License which applies to it and "any
254later version", you have the option of following the terms and conditions
255either of that version or of any later version published by the Free
256Software Foundation. If the Program does not specify a version number of
257this License, you may choose any version ever published by the Free Software
258Foundation.
259
260 10. If you wish to incorporate parts of the Program into other free
261programs whose distribution conditions are different, write to the author
262to ask for permission. For software which is copyrighted by the Free
263Software Foundation, write to the Free Software Foundation; we sometimes
264make exceptions for this. Our decision will be guided by the two goals
265of preserving the free status of all derivatives of our free software and
266of promoting the sharing and reuse of software generally.
267
268 NO WARRANTY
269
270 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
271FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
272OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
273PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
274OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
275MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
276TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
277PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
278REPAIR OR CORRECTION.
279
280 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
281WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
282REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
283INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
284OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
285TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
286YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
287PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
288POSSIBILITY OF SUCH DAMAGES.
diff --git a/Documentation/networking/baycom.txt b/Documentation/networking/baycom.txt
index 4e68849d5639..688f18fd4467 100644
--- a/Documentation/networking/baycom.txt
+++ b/Documentation/networking/baycom.txt
@@ -93,7 +93,7 @@ Every time a driver is inserted into the kernel, it has to know which
93modems it should access at which ports. This can be done with the setbaycom 93modems it should access at which ports. This can be done with the setbaycom
94utility. If you are only using one modem, you can also configure the 94utility. If you are only using one modem, you can also configure the
95driver from the insmod command line (or by means of an option line in 95driver from the insmod command line (or by means of an option line in
96/etc/modprobe.conf). 96/etc/modprobe.d/*.conf).
97 97
98Examples: 98Examples:
99 modprobe baycom_ser_fdx mode="ser12*" iobase=0x3f8 irq=4 99 modprobe baycom_ser_fdx mode="ser12*" iobase=0x3f8 irq=4
diff --git a/Documentation/networking/bonding.txt b/Documentation/networking/bonding.txt
index 080ad26690ae..bfea8a338901 100644
--- a/Documentation/networking/bonding.txt
+++ b/Documentation/networking/bonding.txt
@@ -173,9 +173,8 @@ bonding module at load time, or are specified via sysfs.
173 173
174 Module options may be given as command line arguments to the 174 Module options may be given as command line arguments to the
175insmod or modprobe command, but are usually specified in either the 175insmod or modprobe command, but are usually specified in either the
176/etc/modules.conf or /etc/modprobe.conf configuration file, or in a 176/etc/modrobe.d/*.conf configuration files, or in a distro-specific
177distro-specific configuration file (some of which are detailed in the next 177configuration file (some of which are detailed in the next section).
178section).
179 178
180 Details on bonding support for sysfs is provided in the 179 Details on bonding support for sysfs is provided in the
181"Configuring Bonding Manually via Sysfs" section, below. 180"Configuring Bonding Manually via Sysfs" section, below.
@@ -1021,7 +1020,7 @@ ifcfg-bondX files.
1021 1020
1022 Because the sysconfig scripts supply the bonding module 1021 Because the sysconfig scripts supply the bonding module
1023options in the ifcfg-bondX file, it is not necessary to add them to 1022options in the ifcfg-bondX file, it is not necessary to add them to
1024the system /etc/modules.conf or /etc/modprobe.conf configuration file. 1023the system /etc/modules.d/*.conf configuration files.
1025 1024
10263.2 Configuration with Initscripts Support 10253.2 Configuration with Initscripts Support
1027------------------------------------------ 1026------------------------------------------
@@ -1098,15 +1097,13 @@ queried targets, e.g.,
1098 arp_ip_target=+192.168.1.1 arp_ip_target=+192.168.1.2 1097 arp_ip_target=+192.168.1.1 arp_ip_target=+192.168.1.2
1099 1098
1100 is the proper syntax to specify multiple targets. When specifying 1099 is the proper syntax to specify multiple targets. When specifying
1101options via BONDING_OPTS, it is not necessary to edit /etc/modules.conf or 1100options via BONDING_OPTS, it is not necessary to edit /etc/modprobe.d/*.conf.
1102/etc/modprobe.conf.
1103 1101
1104 For even older versions of initscripts that do not support 1102 For even older versions of initscripts that do not support
1105BONDING_OPTS, it is necessary to edit /etc/modules.conf (or 1103BONDING_OPTS, it is necessary to edit /etc/modprobe.d/*.conf, depending upon
1106/etc/modprobe.conf, depending upon your distro) to load the bonding module 1104your distro) to load the bonding module with your desired options when the
1107with your desired options when the bond0 interface is brought up. The 1105bond0 interface is brought up. The following lines in /etc/modprobe.d/*.conf
1108following lines in /etc/modules.conf (or modprobe.conf) will load the 1106will load the bonding module, and select its options:
1109bonding module, and select its options:
1110 1107
1111alias bond0 bonding 1108alias bond0 bonding
1112options bond0 mode=balance-alb miimon=100 1109options bond0 mode=balance-alb miimon=100
@@ -1152,7 +1149,7 @@ knowledge of bonding. One such distro is SuSE Linux Enterprise Server
1152version 8. 1149version 8.
1153 1150
1154 The general method for these systems is to place the bonding 1151 The general method for these systems is to place the bonding
1155module parameters into /etc/modules.conf or /etc/modprobe.conf (as 1152module parameters into a config file in /etc/modprobe.d/ (as
1156appropriate for the installed distro), then add modprobe and/or 1153appropriate for the installed distro), then add modprobe and/or
1157ifenslave commands to the system's global init script. The name of 1154ifenslave commands to the system's global init script. The name of
1158the global init script differs; for sysconfig, it is 1155the global init script differs; for sysconfig, it is
@@ -1228,7 +1225,7 @@ network initialization scripts.
1228specify a different name for each instance (the module loading system 1225specify a different name for each instance (the module loading system
1229requires that every loaded module, even multiple instances of the same 1226requires that every loaded module, even multiple instances of the same
1230module, have a unique name). This is accomplished by supplying multiple 1227module, have a unique name). This is accomplished by supplying multiple
1231sets of bonding options in /etc/modprobe.conf, for example: 1228sets of bonding options in /etc/modprobe.d/*.conf, for example:
1232 1229
1233alias bond0 bonding 1230alias bond0 bonding
1234options bond0 -o bond0 mode=balance-rr miimon=100 1231options bond0 -o bond0 mode=balance-rr miimon=100
@@ -1793,8 +1790,8 @@ route additions may cause trouble.
1793 On systems with network configuration scripts that do not 1790 On systems with network configuration scripts that do not
1794associate physical devices directly with network interface names (so 1791associate physical devices directly with network interface names (so
1795that the same physical device always has the same "ethX" name), it may 1792that the same physical device always has the same "ethX" name), it may
1796be necessary to add some special logic to either /etc/modules.conf or 1793be necessary to add some special logic to config files in
1797/etc/modprobe.conf (depending upon which is installed on the system). 1794/etc/modprobe.d/.
1798 1795
1799 For example, given a modules.conf containing the following: 1796 For example, given a modules.conf containing the following:
1800 1797
@@ -1821,20 +1818,15 @@ add above bonding e1000 tg3
1821bonding is loaded. This command is fully documented in the 1818bonding is loaded. This command is fully documented in the
1822modules.conf manual page. 1819modules.conf manual page.
1823 1820
1824 On systems utilizing modprobe.conf (or modprobe.conf.local), 1821 On systems utilizing modprobe an equivalent problem can occur.
1825an equivalent problem can occur. In this case, the following can be 1822In this case, the following can be added to config files in
1826added to modprobe.conf (or modprobe.conf.local, as appropriate), as 1823/etc/modprobe.d/ as:
1827follows (all on one line; it has been split here for clarity):
1828 1824
1829install bonding /sbin/modprobe tg3; /sbin/modprobe e1000; 1825softdep bonding pre: tg3 e1000
1830 /sbin/modprobe --ignore-install bonding
1831 1826
1832 This will, when loading the bonding module, rather than 1827 This will load tg3 and e1000 modules before loading the bonding one.
1833performing the normal action, instead execute the provided command. 1828Full documentation on this can be found in the modprobe.d and modprobe
1834This command loads the device drivers in the order needed, then calls 1829manual pages.
1835modprobe with --ignore-install to cause the normal action to then take
1836place. Full documentation on this can be found in the modprobe.conf
1837and modprobe manual pages.
1838 1830
18398.3. Painfully Slow Or No Failed Link Detection By Miimon 18318.3. Painfully Slow Or No Failed Link Detection By Miimon
1840--------------------------------------------------------- 1832---------------------------------------------------------
diff --git a/Documentation/networking/dl2k.txt b/Documentation/networking/dl2k.txt
index 10e8490fa406..cba74f7a3abc 100644
--- a/Documentation/networking/dl2k.txt
+++ b/Documentation/networking/dl2k.txt
@@ -45,12 +45,13 @@ Now eth0 should active, you can test it by "ping" or get more information by
45"ifconfig". If tested ok, continue the next step. 45"ifconfig". If tested ok, continue the next step.
46 46
474. cp dl2k.ko /lib/modules/`uname -r`/kernel/drivers/net 474. cp dl2k.ko /lib/modules/`uname -r`/kernel/drivers/net
485. Add the following line to /etc/modprobe.conf: 485. Add the following line to /etc/modprobe.d/dl2k.conf:
49 alias eth0 dl2k 49 alias eth0 dl2k
506. Run "netconfig" or "netconf" to create configuration script ifcfg-eth0 506. Run depmod to updated module indexes.
517. Run "netconfig" or "netconf" to create configuration script ifcfg-eth0
51 located at /etc/sysconfig/network-scripts or create it manually. 52 located at /etc/sysconfig/network-scripts or create it manually.
52 [see - Configuration Script Sample] 53 [see - Configuration Script Sample]
537. Driver will automatically load and configure at next boot time. 548. Driver will automatically load and configure at next boot time.
54 55
55Compiling the Driver 56Compiling the Driver
56==================== 57====================
@@ -154,8 +155,8 @@ Installing the Driver
154 ----------------- 155 -----------------
155 1. Copy dl2k.o to the network modules directory, typically 156 1. Copy dl2k.o to the network modules directory, typically
156 /lib/modules/2.x.x-xx/net or /lib/modules/2.x.x/kernel/drivers/net. 157 /lib/modules/2.x.x-xx/net or /lib/modules/2.x.x/kernel/drivers/net.
157 2. Locate the boot module configuration file, most commonly modprobe.conf 158 2. Locate the boot module configuration file, most commonly in the
158 or modules.conf (for 2.4) in the /etc directory. Add the following lines: 159 /etc/modprobe.d/ directory. Add the following lines:
159 160
160 alias ethx dl2k 161 alias ethx dl2k
161 options dl2k <optional parameters> 162 options dl2k <optional parameters>
diff --git a/Documentation/networking/dns_resolver.txt b/Documentation/networking/dns_resolver.txt
index 7f531ad83285..d86adcdae420 100644
--- a/Documentation/networking/dns_resolver.txt
+++ b/Documentation/networking/dns_resolver.txt
@@ -102,6 +102,10 @@ implemented in the module can be called after doing:
102 If _expiry is non-NULL, the expiry time (TTL) of the result will be 102 If _expiry is non-NULL, the expiry time (TTL) of the result will be
103 returned also. 103 returned also.
104 104
105The kernel maintains an internal keyring in which it caches looked up keys.
106This can be cleared by any process that has the CAP_SYS_ADMIN capability by
107the use of KEYCTL_KEYRING_CLEAR on the keyring ID.
108
105 109
106=============================== 110===============================
107READING DNS KEYS FROM USERSPACE 111READING DNS KEYS FROM USERSPACE
diff --git a/Documentation/networking/e100.txt b/Documentation/networking/e100.txt
index 162f323a7a1f..fcb6c71cdb69 100644
--- a/Documentation/networking/e100.txt
+++ b/Documentation/networking/e100.txt
@@ -94,8 +94,8 @@ Additional Configurations
94 94
95 Configuring a network driver to load properly when the system is started is 95 Configuring a network driver to load properly when the system is started is
96 distribution dependent. Typically, the configuration process involves adding 96 distribution dependent. Typically, the configuration process involves adding
97 an alias line to /etc/modules.conf or /etc/modprobe.conf as well as editing 97 an alias line to /etc/modprobe.d/*.conf as well as editing other system
98 other system startup scripts and/or configuration files. Many popular Linux 98 startup scripts and/or configuration files. Many popular Linux
99 distributions ship with tools to make these changes for you. To learn the 99 distributions ship with tools to make these changes for you. To learn the
100 proper way to configure a network device for your system, refer to your 100 proper way to configure a network device for your system, refer to your
101 distribution documentation. If during this process you are asked for the 101 distribution documentation. If during this process you are asked for the
@@ -103,7 +103,7 @@ Additional Configurations
103 PRO/100 Family of Adapters is e100. 103 PRO/100 Family of Adapters is e100.
104 104
105 As an example, if you install the e100 driver for two PRO/100 adapters 105 As an example, if you install the e100 driver for two PRO/100 adapters
106 (eth0 and eth1), add the following to modules.conf or modprobe.conf: 106 (eth0 and eth1), add the following to a configuraton file in /etc/modprobe.d/
107 107
108 alias eth0 e100 108 alias eth0 e100
109 alias eth1 e100 109 alias eth1 e100
diff --git a/Documentation/networking/fore200e.txt b/Documentation/networking/fore200e.txt
index 6e0d2a9613ec..f648eb265188 100644
--- a/Documentation/networking/fore200e.txt
+++ b/Documentation/networking/fore200e.txt
@@ -44,7 +44,7 @@ the 'software updates' pages. The firmware binaries are part of
44the various ForeThought software distributions. 44the various ForeThought software distributions.
45 45
46Notice that different versions of the PCA-200E firmware exist, depending 46Notice that different versions of the PCA-200E firmware exist, depending
47on the endianess of the host architecture. The driver is shipped with 47on the endianness of the host architecture. The driver is shipped with
48both little and big endian PCA firmware images. 48both little and big endian PCA firmware images.
49 49
50Name and location of the new firmware images can be set at kernel 50Name and location of the new firmware images can be set at kernel
diff --git a/Documentation/networking/ipv6.txt b/Documentation/networking/ipv6.txt
index 9fd7e21296c8..6cd74fa55358 100644
--- a/Documentation/networking/ipv6.txt
+++ b/Documentation/networking/ipv6.txt
@@ -2,9 +2,9 @@
2Options for the ipv6 module are supplied as parameters at load time. 2Options for the ipv6 module are supplied as parameters at load time.
3 3
4Module options may be given as command line arguments to the insmod 4Module options may be given as command line arguments to the insmod
5or modprobe command, but are usually specified in either the 5or modprobe command, but are usually specified in either
6/etc/modules.conf or /etc/modprobe.conf configuration file, or in a 6/etc/modules.d/*.conf configuration files, or in a distro-specific
7distro-specific configuration file. 7configuration file.
8 8
9The available ipv6 module parameters are listed below. If a parameter 9The available ipv6 module parameters are listed below. If a parameter
10is not specified the default value is used. 10is not specified the default value is used.
diff --git a/Documentation/networking/ixgb.txt b/Documentation/networking/ixgb.txt
index e196f16df313..d75a1f9565bb 100644
--- a/Documentation/networking/ixgb.txt
+++ b/Documentation/networking/ixgb.txt
@@ -274,9 +274,9 @@ Additional Configurations
274 ------------------------------------------------- 274 -------------------------------------------------
275 Configuring a network driver to load properly when the system is started is 275 Configuring a network driver to load properly when the system is started is
276 distribution dependent. Typically, the configuration process involves adding 276 distribution dependent. Typically, the configuration process involves adding
277 an alias line to /etc/modprobe.conf as well as editing other system startup 277 an alias line to files in /etc/modprobe.d/ as well as editing other system
278 scripts and/or configuration files. Many popular Linux distributions ship 278 startup scripts and/or configuration files. Many popular Linux distributions
279 with tools to make these changes for you. To learn the proper way to 279 ship with tools to make these changes for you. To learn the proper way to
280 configure a network device for your system, refer to your distribution 280 configure a network device for your system, refer to your distribution
281 documentation. If during this process you are asked for the driver or module 281 documentation. If during this process you are asked for the driver or module
282 name, the name for the Linux Base Driver for the Intel 10GbE Family of 282 name, the name for the Linux Base Driver for the Intel 10GbE Family of
diff --git a/Documentation/networking/l2tp.txt b/Documentation/networking/l2tp.txt
index e7bf3979facb..e63fc1f7bf87 100644
--- a/Documentation/networking/l2tp.txt
+++ b/Documentation/networking/l2tp.txt
@@ -111,7 +111,7 @@ When creating PPPoL2TP sockets, the application provides information
111to the driver about the socket in a socket connect() call. Source and 111to the driver about the socket in a socket connect() call. Source and
112destination tunnel and session ids are provided, as well as the file 112destination tunnel and session ids are provided, as well as the file
113descriptor of a UDP socket. See struct pppol2tp_addr in 113descriptor of a UDP socket. See struct pppol2tp_addr in
114include/linux/if_ppp.h. Note that zero tunnel / session ids are 114include/linux/if_pppol2tp.h. Note that zero tunnel / session ids are
115treated specially. When creating the per-tunnel PPPoL2TP management 115treated specially. When creating the per-tunnel PPPoL2TP management
116socket in Step 2 above, zero source and destination session ids are 116socket in Step 2 above, zero source and destination session ids are
117specified, which tells the driver to prepare the supplied UDP file 117specified, which tells the driver to prepare the supplied UDP file
diff --git a/Documentation/networking/ltpc.txt b/Documentation/networking/ltpc.txt
index fe2a9129d959..0bf3220c715b 100644
--- a/Documentation/networking/ltpc.txt
+++ b/Documentation/networking/ltpc.txt
@@ -25,7 +25,7 @@ the driver will try to determine them itself.
25 25
26If you load the driver as a module, you can pass the parameters "io=", 26If you load the driver as a module, you can pass the parameters "io=",
27"irq=", and "dma=" on the command line with insmod or modprobe, or add 27"irq=", and "dma=" on the command line with insmod or modprobe, or add
28them as options in /etc/modprobe.conf: 28them as options in a configuration file in /etc/modprobe.d/ directory:
29 29
30 alias lt0 ltpc # autoload the module when the interface is configured 30 alias lt0 ltpc # autoload the module when the interface is configured
31 options ltpc io=0x240 irq=9 dma=1 31 options ltpc io=0x240 irq=9 dma=1
diff --git a/Documentation/networking/mac80211-auth-assoc-deauth.txt b/Documentation/networking/mac80211-auth-assoc-deauth.txt
new file mode 100644
index 000000000000..e0a2aa585ca3
--- /dev/null
+++ b/Documentation/networking/mac80211-auth-assoc-deauth.txt
@@ -0,0 +1,99 @@
1#
2# This outlines the Linux authentication/association and
3# deauthentication/disassociation flows.
4#
5# This can be converted into a diagram using the service
6# at http://www.websequencediagrams.com/
7#
8
9participant userspace
10participant mac80211
11participant driver
12
13alt authentication needed (not FT)
14userspace->mac80211: authenticate
15
16alt authenticated/authenticating already
17mac80211->driver: sta_state(AP, not-exists)
18mac80211->driver: bss_info_changed(clear BSSID)
19else associated
20note over mac80211,driver
21like deauth/disassoc, without sending the
22BA session stop & deauth/disassoc frames
23end note
24end
25
26mac80211->driver: config(channel, non-HT)
27mac80211->driver: bss_info_changed(set BSSID, basic rate bitmap)
28mac80211->driver: sta_state(AP, exists)
29
30alt no probe request data known
31mac80211->driver: TX directed probe request
32driver->mac80211: RX probe response
33end
34
35mac80211->driver: TX auth frame
36driver->mac80211: RX auth frame
37
38alt WEP shared key auth
39mac80211->driver: TX auth frame
40driver->mac80211: RX auth frame
41end
42
43mac80211->driver: sta_state(AP, authenticated)
44mac80211->userspace: RX auth frame
45
46end
47
48userspace->mac80211: associate
49alt authenticated or associated
50note over mac80211,driver: cleanup like for authenticate
51end
52
53alt not previously authenticated (FT)
54mac80211->driver: config(channel, non-HT)
55mac80211->driver: bss_info_changed(set BSSID, basic rate bitmap)
56mac80211->driver: sta_state(AP, exists)
57mac80211->driver: sta_state(AP, authenticated)
58end
59mac80211->driver: TX assoc
60driver->mac80211: RX assoc response
61note over mac80211: init rate control
62mac80211->driver: sta_state(AP, associated)
63
64alt not using WPA
65mac80211->driver: sta_state(AP, authorized)
66end
67
68mac80211->driver: set up QoS parameters
69
70alt is HT channel
71mac80211->driver: config(channel, HT params)
72end
73
74mac80211->driver: bss_info_changed(QoS, HT, associated with AID)
75mac80211->userspace: associated
76
77note left of userspace: associated now
78
79alt using WPA
80note over userspace
81do 4-way-handshake
82(data frames)
83end note
84userspace->mac80211: authorized
85mac80211->driver: sta_state(AP, authorized)
86end
87
88userspace->mac80211: deauthenticate/disassociate
89mac80211->driver: stop BA sessions
90mac80211->driver: TX deauth/disassoc
91mac80211->driver: flush frames
92mac80211->driver: sta_state(AP,associated)
93mac80211->driver: sta_state(AP,authenticated)
94mac80211->driver: sta_state(AP,exists)
95mac80211->driver: sta_state(AP,not-exists)
96mac80211->driver: turn off powersave
97mac80211->driver: bss_info_changed(clear BSSID, not associated, no QoS, ...)
98mac80211->driver: config(non-HT channel type)
99mac80211->userspace: disconnected
diff --git a/Documentation/networking/netdev-features.txt b/Documentation/networking/netdev-features.txt
index 4b1c0dcef84c..4164f5c02e4b 100644
--- a/Documentation/networking/netdev-features.txt
+++ b/Documentation/networking/netdev-features.txt
@@ -152,3 +152,16 @@ NETIF_F_VLAN_CHALLENGED should be set for devices which can't cope with VLAN
152headers. Some drivers set this because the cards can't handle the bigger MTU. 152headers. Some drivers set this because the cards can't handle the bigger MTU.
153[FIXME: Those cases could be fixed in VLAN code by allowing only reduced-MTU 153[FIXME: Those cases could be fixed in VLAN code by allowing only reduced-MTU
154VLANs. This may be not useful, though.] 154VLANs. This may be not useful, though.]
155
156* rx-fcs
157
158This requests that the NIC append the Ethernet Frame Checksum (FCS)
159to the end of the skb data. This allows sniffers and other tools to
160read the CRC recorded by the NIC on receipt of the packet.
161
162* rx-all
163
164This requests that the NIC receive all possible frames, including errored
165frames (such as bad FCS, etc). This can be helpful when sniffing a link with
166bad packets on it. Some NICs may receive more packets if also put into normal
167PROMISC mdoe.
diff --git a/Documentation/networking/phy.txt b/Documentation/networking/phy.txt
index 9eb1ba52013d..95e5f5985a2a 100644
--- a/Documentation/networking/phy.txt
+++ b/Documentation/networking/phy.txt
@@ -62,7 +62,8 @@ The MDIO bus
62 5) The bus must also be declared somewhere as a device, and registered. 62 5) The bus must also be declared somewhere as a device, and registered.
63 63
64 As an example for how one driver implemented an mdio bus driver, see 64 As an example for how one driver implemented an mdio bus driver, see
65 drivers/net/gianfar_mii.c and arch/ppc/syslib/mpc85xx_devices.c 65 drivers/net/ethernet/freescale/fsl_pq_mdio.c and an associated DTS file
66 for one of the users. (e.g. "git grep fsl,.*-mdio arch/powerpc/boot/dts/")
66 67
67Connecting to a PHY 68Connecting to a PHY
68 69
diff --git a/Documentation/networking/ppp_generic.txt b/Documentation/networking/ppp_generic.txt
index 15b5172fbb98..091d20273dcb 100644
--- a/Documentation/networking/ppp_generic.txt
+++ b/Documentation/networking/ppp_generic.txt
@@ -342,7 +342,7 @@ an interface unit are:
342 numbers on received multilink fragments 342 numbers on received multilink fragments
343 SC_MP_XSHORTSEQ transmit short multilink sequence nos. 343 SC_MP_XSHORTSEQ transmit short multilink sequence nos.
344 344
345 The values of these flags are defined in <linux/if_ppp.h>. Note 345 The values of these flags are defined in <linux/ppp-ioctl.h>. Note
346 that the values of the SC_MULTILINK, SC_MP_SHORTSEQ and 346 that the values of the SC_MULTILINK, SC_MP_SHORTSEQ and
347 SC_MP_XSHORTSEQ bits are ignored if the CONFIG_PPP_MULTILINK option 347 SC_MP_XSHORTSEQ bits are ignored if the CONFIG_PPP_MULTILINK option
348 is not selected. 348 is not selected.
@@ -358,7 +358,7 @@ an interface unit are:
358 358
359* PPPIOCSCOMPRESS sets the parameters for packet compression or 359* PPPIOCSCOMPRESS sets the parameters for packet compression or
360 decompression. The argument should point to a ppp_option_data 360 decompression. The argument should point to a ppp_option_data
361 structure (defined in <linux/if_ppp.h>), which contains a 361 structure (defined in <linux/ppp-ioctl.h>), which contains a
362 pointer/length pair which should describe a block of memory 362 pointer/length pair which should describe a block of memory
363 containing a CCP option specifying a compression method and its 363 containing a CCP option specifying a compression method and its
364 parameters. The ppp_option_data struct also contains a `transmit' 364 parameters. The ppp_option_data struct also contains a `transmit'
@@ -395,7 +395,7 @@ an interface unit are:
395 395
396* PPPIOCSNPMODE sets the network-protocol mode for a given network 396* PPPIOCSNPMODE sets the network-protocol mode for a given network
397 protocol. The argument should point to an npioctl struct (defined 397 protocol. The argument should point to an npioctl struct (defined
398 in <linux/if_ppp.h>). The `protocol' field gives the PPP protocol 398 in <linux/ppp-ioctl.h>). The `protocol' field gives the PPP protocol
399 number for the protocol to be affected, and the `mode' field 399 number for the protocol to be affected, and the `mode' field
400 specifies what to do with packets for that protocol: 400 specifies what to do with packets for that protocol:
401 401
diff --git a/Documentation/networking/vortex.txt b/Documentation/networking/vortex.txt
index bd70976b8160..b4038ffb3bc5 100644
--- a/Documentation/networking/vortex.txt
+++ b/Documentation/networking/vortex.txt
@@ -67,8 +67,8 @@ Module parameters
67================= 67=================
68 68
69There are several parameters which may be provided to the driver when 69There are several parameters which may be provided to the driver when
70its module is loaded. These are usually placed in /etc/modprobe.conf 70its module is loaded. These are usually placed in /etc/modprobe.d/*.conf
71(/etc/modules.conf in 2.4). Example: 71configuretion files. Example:
72 72
73options 3c59x debug=3 rx_copybreak=300 73options 3c59x debug=3 rx_copybreak=300
74 74
@@ -425,7 +425,7 @@ steps you should take:
425 1) Increase the debug level. Usually this is done via: 425 1) Increase the debug level. Usually this is done via:
426 426
427 a) modprobe driver debug=7 427 a) modprobe driver debug=7
428 b) In /etc/modprobe.conf (or /etc/modules.conf for 2.4): 428 b) In /etc/modprobe.d/driver.conf:
429 options driver debug=7 429 options driver debug=7
430 430
431 2) Recreate the problem with the higher debug level, 431 2) Recreate the problem with the higher debug level,
diff --git a/Documentation/nmi_watchdog.txt b/Documentation/nmi_watchdog.txt
deleted file mode 100644
index bf9f80a98282..000000000000
--- a/Documentation/nmi_watchdog.txt
+++ /dev/null
@@ -1,83 +0,0 @@
1
2[NMI watchdog is available for x86 and x86-64 architectures]
3
4Is your system locking up unpredictably? No keyboard activity, just
5a frustrating complete hard lockup? Do you want to help us debugging
6such lockups? If all yes then this document is definitely for you.
7
8On many x86/x86-64 type hardware there is a feature that enables
9us to generate 'watchdog NMI interrupts'. (NMI: Non Maskable Interrupt
10which get executed even if the system is otherwise locked up hard).
11This can be used to debug hard kernel lockups. By executing periodic
12NMI interrupts, the kernel can monitor whether any CPU has locked up,
13and print out debugging messages if so.
14
15In order to use the NMI watchdog, you need to have APIC support in your
16kernel. For SMP kernels, APIC support gets compiled in automatically. For
17UP, enable either CONFIG_X86_UP_APIC (Processor type and features -> Local
18APIC support on uniprocessors) or CONFIG_X86_UP_IOAPIC (Processor type and
19features -> IO-APIC support on uniprocessors) in your kernel config.
20CONFIG_X86_UP_APIC is for uniprocessor machines without an IO-APIC.
21CONFIG_X86_UP_IOAPIC is for uniprocessor with an IO-APIC. [Note: certain
22kernel debugging options, such as Kernel Stack Meter or Kernel Tracer,
23may implicitly disable the NMI watchdog.]
24
25For x86-64, the needed APIC is always compiled in.
26
27Using local APIC (nmi_watchdog=2) needs the first performance register, so
28you can't use it for other purposes (such as high precision performance
29profiling.) However, at least oprofile and the perfctr driver disable the
30local APIC NMI watchdog automatically.
31
32To actually enable the NMI watchdog, use the 'nmi_watchdog=N' boot
33parameter. Eg. the relevant lilo.conf entry:
34
35 append="nmi_watchdog=1"
36
37For SMP machines and UP machines with an IO-APIC use nmi_watchdog=1.
38For UP machines without an IO-APIC use nmi_watchdog=2, this only works
39for some processor types. If in doubt, boot with nmi_watchdog=1 and
40check the NMI count in /proc/interrupts; if the count is zero then
41reboot with nmi_watchdog=2 and check the NMI count. If it is still
42zero then log a problem, you probably have a processor that needs to be
43added to the nmi code.
44
45A 'lockup' is the following scenario: if any CPU in the system does not
46execute the period local timer interrupt for more than 5 seconds, then
47the NMI handler generates an oops and kills the process. This
48'controlled crash' (and the resulting kernel messages) can be used to
49debug the lockup. Thus whenever the lockup happens, wait 5 seconds and
50the oops will show up automatically. If the kernel produces no messages
51then the system has crashed so hard (eg. hardware-wise) that either it
52cannot even accept NMI interrupts, or the crash has made the kernel
53unable to print messages.
54
55Be aware that when using local APIC, the frequency of NMI interrupts
56it generates, depends on the system load. The local APIC NMI watchdog,
57lacking a better source, uses the "cycles unhalted" event. As you may
58guess it doesn't tick when the CPU is in the halted state (which happens
59when the system is idle), but if your system locks up on anything but the
60"hlt" processor instruction, the watchdog will trigger very soon as the
61"cycles unhalted" event will happen every clock tick. If it locks up on
62"hlt", then you are out of luck -- the event will not happen at all and the
63watchdog won't trigger. This is a shortcoming of the local APIC watchdog
64-- unfortunately there is no "clock ticks" event that would work all the
65time. The I/O APIC watchdog is driven externally and has no such shortcoming.
66But its NMI frequency is much higher, resulting in a more significant hit
67to the overall system performance.
68
69On x86 nmi_watchdog is disabled by default so you have to enable it with
70a boot time parameter.
71
72It's possible to disable the NMI watchdog in run-time by writing "0" to
73/proc/sys/kernel/nmi_watchdog. Writing "1" to the same file will re-enable
74the NMI watchdog. Notice that you still need to use "nmi_watchdog=" parameter
75at boot time.
76
77NOTE: In kernels prior to 2.4.2-ac18 the NMI-oopser is enabled unconditionally
78on x86 SMP boxes.
79
80[ feel free to send bug reports, suggestions and patches to
81 Ingo Molnar <mingo@redhat.com> or the Linux SMP mailing
82 list at <linux-smp@vger.kernel.org> ]
83
diff --git a/Documentation/numastat.txt b/Documentation/numastat.txt
index 9fcc9a608dc0..520327790d54 100644
--- a/Documentation/numastat.txt
+++ b/Documentation/numastat.txt
@@ -5,18 +5,23 @@ Numa policy hit/miss statistics
5 5
6All units are pages. Hugepages have separate counters. 6All units are pages. Hugepages have separate counters.
7 7
8numa_hit A process wanted to allocate memory from this node, 8numa_hit A process wanted to allocate memory from this node,
9 and succeeded. 9 and succeeded.
10numa_miss A process wanted to allocate memory from another node, 10
11 but ended up with memory from this node. 11numa_miss A process wanted to allocate memory from another node,
12numa_foreign A process wanted to allocate on this node, 12 but ended up with memory from this node.
13 but ended up with memory from another one. 13
14local_node A process ran on this node and got memory from it. 14numa_foreign A process wanted to allocate on this node,
15other_node A process ran on this node and got memory from another node. 15 but ended up with memory from another one.
16interleave_hit Interleaving wanted to allocate from this node 16
17 and succeeded. 17local_node A process ran on this node and got memory from it.
18
19other_node A process ran on this node and got memory from another node.
20
21interleave_hit Interleaving wanted to allocate from this node
22 and succeeded.
18 23
19For easier reading you can use the numastat utility from the numactl package 24For easier reading you can use the numastat utility from the numactl package
20(ftp://ftp.suse.com/pub/people/ak/numa/numactl*). Note that it only works 25(http://oss.sgi.com/projects/libnuma/). Note that it only works
21well right now on machines with a small number of CPUs. 26well right now on machines with a small number of CPUs.
22 27
diff --git a/Documentation/parport.txt b/Documentation/parport.txt
index 93a7ceef398d..c208e4366c03 100644
--- a/Documentation/parport.txt
+++ b/Documentation/parport.txt
@@ -36,18 +36,17 @@ addresses should not be specified for supported PCI cards since they
36are automatically detected. 36are automatically detected.
37 37
38 38
39KMod 39modprobe
40---- 40--------
41 41
42If you use kmod, you will find it useful to edit /etc/modprobe.conf. 42If you use modprobe , you will find it useful to add lines as below to a
43Here is an example of the lines that need to be added: 43configuration file in /etc/modprobe.d/ directory:.
44 44
45 alias parport_lowlevel parport_pc 45 alias parport_lowlevel parport_pc
46 options parport_pc io=0x378,0x278 irq=7,auto 46 options parport_pc io=0x378,0x278 irq=7,auto
47 47
48KMod will then automatically load parport_pc (with the options 48modprobe will load parport_pc (with the options "io=0x378,0x278 irq=7,auto")
49"io=0x378,0x278 irq=7,auto") whenever a parallel port device driver 49whenever a parallel port device driver (such as lp) is loaded.
50(such as lp) is loaded.
51 50
52Note that these are example lines only! You shouldn't in general need 51Note that these are example lines only! You shouldn't in general need
53to specify any options to parport_pc in order to be able to use a 52to specify any options to parport_pc in order to be able to use a
diff --git a/Documentation/pinctrl.txt b/Documentation/pinctrl.txt
index 150fd3833d0b..d97bccf46147 100644
--- a/Documentation/pinctrl.txt
+++ b/Documentation/pinctrl.txt
@@ -206,12 +206,21 @@ using a certain resistor value - pull up and pull down - so that the pin has a
206stable value when nothing is driving the rail it is connected to, or when it's 206stable value when nothing is driving the rail it is connected to, or when it's
207unconnected. 207unconnected.
208 208
209For example, a platform may do this: 209Pin configuration can be programmed either using the explicit APIs described
210immediately below, or by adding configuration entries into the mapping table;
211see section "Board/machine configuration" below.
212
213For example, a platform may do the following to pull up a pin to VDD:
214
215#include <linux/pinctrl/consumer.h>
210 216
211ret = pin_config_set("foo-dev", "FOO_GPIO_PIN", PLATFORM_X_PULL_UP); 217ret = pin_config_set("foo-dev", "FOO_GPIO_PIN", PLATFORM_X_PULL_UP);
212 218
213To pull up a pin to VDD. The pin configuration driver implements callbacks for 219The format and meaning of the configuration parameter, PLATFORM_X_PULL_UP
214changing pin configuration in the pin controller ops like this: 220above, is entirely defined by the pin controller driver.
221
222The pin configuration driver implements callbacks for changing pin
223configuration in the pin controller ops like this:
215 224
216#include <linux/pinctrl/pinctrl.h> 225#include <linux/pinctrl/pinctrl.h>
217#include <linux/pinctrl/pinconf.h> 226#include <linux/pinctrl/pinconf.h>
@@ -492,14 +501,10 @@ Definitions:
492 {"map-i2c0", i2c0, pinctrl0, fi2c0, gi2c0} 501 {"map-i2c0", i2c0, pinctrl0, fi2c0, gi2c0}
493 } 502 }
494 503
495 Every map must be assigned a symbolic name, pin controller and function. 504 Every map must be assigned a state name, pin controller, device and
496 The group is not compulsory - if it is omitted the first group presented by 505 function. The group is not compulsory - if it is omitted the first group
497 the driver as applicable for the function will be selected, which is 506 presented by the driver as applicable for the function will be selected,
498 useful for simple cases. 507 which is useful for simple cases.
499
500 The device name is present in map entries tied to specific devices. Maps
501 without device names are referred to as SYSTEM pinmuxes, such as can be taken
502 by the machine implementation on boot and not tied to any specific device.
503 508
504 It is possible to map several groups to the same combination of device, 509 It is possible to map several groups to the same combination of device,
505 pin controller and function. This is for cases where a certain function on 510 pin controller and function. This is for cases where a certain function on
@@ -726,19 +731,19 @@ same time.
726All the above functions are mandatory to implement for a pinmux driver. 731All the above functions are mandatory to implement for a pinmux driver.
727 732
728 733
729Pinmux interaction with the GPIO subsystem 734Pin control interaction with the GPIO subsystem
730========================================== 735===============================================
731 736
732The public pinmux API contains two functions named pinmux_request_gpio() 737The public pinmux API contains two functions named pinctrl_request_gpio()
733and pinmux_free_gpio(). These two functions shall *ONLY* be called from 738and pinctrl_free_gpio(). These two functions shall *ONLY* be called from
734gpiolib-based drivers as part of their gpio_request() and 739gpiolib-based drivers as part of their gpio_request() and
735gpio_free() semantics. Likewise the pinmux_gpio_direction_[input|output] 740gpio_free() semantics. Likewise the pinctrl_gpio_direction_[input|output]
736shall only be called from within respective gpio_direction_[input|output] 741shall only be called from within respective gpio_direction_[input|output]
737gpiolib implementation. 742gpiolib implementation.
738 743
739NOTE that platforms and individual drivers shall *NOT* request GPIO pins to be 744NOTE that platforms and individual drivers shall *NOT* request GPIO pins to be
740muxed in. Instead, implement a proper gpiolib driver and have that driver 745controlled e.g. muxed in. Instead, implement a proper gpiolib driver and have
741request proper muxing for its pins. 746that driver request proper muxing and other control for its pins.
742 747
743The function list could become long, especially if you can convert every 748The function list could become long, especially if you can convert every
744individual pin into a GPIO pin independent of any other pins, and then try 749individual pin into a GPIO pin independent of any other pins, and then try
@@ -747,7 +752,7 @@ the approach to define every pin as a function.
747In this case, the function array would become 64 entries for each GPIO 752In this case, the function array would become 64 entries for each GPIO
748setting and then the device functions. 753setting and then the device functions.
749 754
750For this reason there are two functions a pinmux driver can implement 755For this reason there are two functions a pin control driver can implement
751to enable only GPIO on an individual pin: .gpio_request_enable() and 756to enable only GPIO on an individual pin: .gpio_request_enable() and
752.gpio_disable_free(). 757.gpio_disable_free().
753 758
@@ -762,12 +767,12 @@ gpiolib driver and the affected GPIO range, pin offset and desired direction
762will be passed along to this function. 767will be passed along to this function.
763 768
764Alternatively to using these special functions, it is fully allowed to use 769Alternatively to using these special functions, it is fully allowed to use
765named functions for each GPIO pin, the pinmux_request_gpio() will attempt to 770named functions for each GPIO pin, the pinctrl_request_gpio() will attempt to
766obtain the function "gpioN" where "N" is the global GPIO pin number if no 771obtain the function "gpioN" where "N" is the global GPIO pin number if no
767special GPIO-handler is registered. 772special GPIO-handler is registered.
768 773
769 774
770Pinmux board/machine configuration 775Board/machine configuration
771================================== 776==================================
772 777
773Boards and machines define how a certain complete running system is put 778Boards and machines define how a certain complete running system is put
@@ -775,27 +780,33 @@ together, including how GPIOs and devices are muxed, how regulators are
775constrained and how the clock tree looks. Of course pinmux settings are also 780constrained and how the clock tree looks. Of course pinmux settings are also
776part of this. 781part of this.
777 782
778A pinmux config for a machine looks pretty much like a simple regulator 783A pin controller configuration for a machine looks pretty much like a simple
779configuration, so for the example array above we want to enable i2c and 784regulator configuration, so for the example array above we want to enable i2c
780spi on the second function mapping: 785and spi on the second function mapping:
781 786
782#include <linux/pinctrl/machine.h> 787#include <linux/pinctrl/machine.h>
783 788
784static const struct pinmux_map __initdata pmx_mapping[] = { 789static const struct pinctrl_map __initdata mapping[] = {
785 { 790 {
786 .ctrl_dev_name = "pinctrl-foo",
787 .function = "spi0",
788 .dev_name = "foo-spi.0", 791 .dev_name = "foo-spi.0",
792 .name = PINCTRL_STATE_DEFAULT,
793 .type = PIN_MAP_TYPE_MUX_GROUP,
794 .ctrl_dev_name = "pinctrl-foo",
795 .data.mux.function = "spi0",
789 }, 796 },
790 { 797 {
791 .ctrl_dev_name = "pinctrl-foo",
792 .function = "i2c0",
793 .dev_name = "foo-i2c.0", 798 .dev_name = "foo-i2c.0",
799 .name = PINCTRL_STATE_DEFAULT,
800 .type = PIN_MAP_TYPE_MUX_GROUP,
801 .ctrl_dev_name = "pinctrl-foo",
802 .data.mux.function = "i2c0",
794 }, 803 },
795 { 804 {
796 .ctrl_dev_name = "pinctrl-foo",
797 .function = "mmc0",
798 .dev_name = "foo-mmc.0", 805 .dev_name = "foo-mmc.0",
806 .name = PINCTRL_STATE_DEFAULT,
807 .type = PIN_MAP_TYPE_MUX_GROUP,
808 .ctrl_dev_name = "pinctrl-foo",
809 .data.mux.function = "mmc0",
799 }, 810 },
800}; 811};
801 812
@@ -805,21 +816,51 @@ must match a function provided by the pinmux driver handling this pin range.
805 816
806As you can see we may have several pin controllers on the system and thus 817As you can see we may have several pin controllers on the system and thus
807we need to specify which one of them that contain the functions we wish 818we need to specify which one of them that contain the functions we wish
808to map. The map can also use struct device * directly, so there is no 819to map.
809inherent need to use strings to specify .dev_name or .ctrl_dev_name, these
810are for the situation where you do not have a handle to the struct device *,
811for example if they are not yet instantiated or cumbersome to obtain.
812 820
813You register this pinmux mapping to the pinmux subsystem by simply: 821You register this pinmux mapping to the pinmux subsystem by simply:
814 822
815 ret = pinmux_register_mappings(pmx_mapping, ARRAY_SIZE(pmx_mapping)); 823 ret = pinctrl_register_mappings(mapping, ARRAY_SIZE(mapping));
816 824
817Since the above construct is pretty common there is a helper macro to make 825Since the above construct is pretty common there is a helper macro to make
818it even more compact which assumes you want to use pinctrl-foo and position 826it even more compact which assumes you want to use pinctrl-foo and position
8190 for mapping, for example: 8270 for mapping, for example:
820 828
821static struct pinmux_map __initdata pmx_mapping[] = { 829static struct pinctrl_map __initdata mapping[] = {
822 PINMUX_MAP("I2CMAP", "pinctrl-foo", "i2c0", "foo-i2c.0"), 830 PIN_MAP_MUX_GROUP("foo-i2c.o", PINCTRL_STATE_DEFAULT, "pinctrl-foo", NULL, "i2c0"),
831};
832
833The mapping table may also contain pin configuration entries. It's common for
834each pin/group to have a number of configuration entries that affect it, so
835the table entries for configuration reference an array of config parameters
836and values. An example using the convenience macros is shown below:
837
838static unsigned long i2c_grp_configs[] = {
839 FOO_PIN_DRIVEN,
840 FOO_PIN_PULLUP,
841};
842
843static unsigned long i2c_pin_configs[] = {
844 FOO_OPEN_COLLECTOR,
845 FOO_SLEW_RATE_SLOW,
846};
847
848static struct pinctrl_map __initdata mapping[] = {
849 PIN_MAP_MUX_GROUP("foo-i2c.0", PINCTRL_STATE_DEFAULT, "pinctrl-foo", "i2c0", "i2c0"),
850 PIN_MAP_MUX_CONFIGS_GROUP("foo-i2c.0", PINCTRL_STATE_DEFAULT, "pinctrl-foo", "i2c0", i2c_grp_configs),
851 PIN_MAP_MUX_CONFIGS_PIN("foo-i2c.0", PINCTRL_STATE_DEFAULT, "pinctrl-foo", "i2c0scl", i2c_pin_configs),
852 PIN_MAP_MUX_CONFIGS_PIN("foo-i2c.0", PINCTRL_STATE_DEFAULT, "pinctrl-foo", "i2c0sda", i2c_pin_configs),
853};
854
855Finally, some devices expect the mapping table to contain certain specific
856named states. When running on hardware that doesn't need any pin controller
857configuration, the mapping table must still contain those named states, in
858order to explicitly indicate that the states were provided and intended to
859be empty. Table entry macro PIN_MAP_DUMMY_STATE serves the purpose of defining
860a named state without causing any pin controller to be programmed:
861
862static struct pinctrl_map __initdata mapping[] = {
863 PIN_MAP_DUMMY_STATE("foo-i2c.0", PINCTRL_STATE_DEFAULT),
823}; 864};
824 865
825 866
@@ -831,81 +872,96 @@ As it is possible to map a function to different groups of pins an optional
831 872
832... 873...
833{ 874{
875 .dev_name = "foo-spi.0",
834 .name = "spi0-pos-A", 876 .name = "spi0-pos-A",
877 .type = PIN_MAP_TYPE_MUX_GROUP,
835 .ctrl_dev_name = "pinctrl-foo", 878 .ctrl_dev_name = "pinctrl-foo",
836 .function = "spi0", 879 .function = "spi0",
837 .group = "spi0_0_grp", 880 .group = "spi0_0_grp",
838 .dev_name = "foo-spi.0",
839}, 881},
840{ 882{
883 .dev_name = "foo-spi.0",
841 .name = "spi0-pos-B", 884 .name = "spi0-pos-B",
885 .type = PIN_MAP_TYPE_MUX_GROUP,
842 .ctrl_dev_name = "pinctrl-foo", 886 .ctrl_dev_name = "pinctrl-foo",
843 .function = "spi0", 887 .function = "spi0",
844 .group = "spi0_1_grp", 888 .group = "spi0_1_grp",
845 .dev_name = "foo-spi.0",
846}, 889},
847... 890...
848 891
849This example mapping is used to switch between two positions for spi0 at 892This example mapping is used to switch between two positions for spi0 at
850runtime, as described further below under the heading "Runtime pinmuxing". 893runtime, as described further below under the heading "Runtime pinmuxing".
851 894
852Further it is possible to match several groups of pins to the same function 895Further it is possible for one named state to affect the muxing of several
853for a single device, say for example in the mmc0 example above, where you can 896groups of pins, say for example in the mmc0 example above, where you can
854additively expand the mmc0 bus from 2 to 4 to 8 pins. If we want to use all 897additively expand the mmc0 bus from 2 to 4 to 8 pins. If we want to use all
855three groups for a total of 2+2+4 = 8 pins (for an 8-bit MMC bus as is the 898three groups for a total of 2+2+4 = 8 pins (for an 8-bit MMC bus as is the
856case), we define a mapping like this: 899case), we define a mapping like this:
857 900
858... 901...
859{ 902{
903 .dev_name = "foo-mmc.0",
860 .name = "2bit" 904 .name = "2bit"
905 .type = PIN_MAP_TYPE_MUX_GROUP,
861 .ctrl_dev_name = "pinctrl-foo", 906 .ctrl_dev_name = "pinctrl-foo",
862 .function = "mmc0", 907 .function = "mmc0",
863 .group = "mmc0_1_grp", 908 .group = "mmc0_1_grp",
864 .dev_name = "foo-mmc.0",
865}, 909},
866{ 910{
911 .dev_name = "foo-mmc.0",
867 .name = "4bit" 912 .name = "4bit"
913 .type = PIN_MAP_TYPE_MUX_GROUP,
868 .ctrl_dev_name = "pinctrl-foo", 914 .ctrl_dev_name = "pinctrl-foo",
869 .function = "mmc0", 915 .function = "mmc0",
870 .group = "mmc0_1_grp", 916 .group = "mmc0_1_grp",
871 .dev_name = "foo-mmc.0",
872}, 917},
873{ 918{
919 .dev_name = "foo-mmc.0",
874 .name = "4bit" 920 .name = "4bit"
921 .type = PIN_MAP_TYPE_MUX_GROUP,
875 .ctrl_dev_name = "pinctrl-foo", 922 .ctrl_dev_name = "pinctrl-foo",
876 .function = "mmc0", 923 .function = "mmc0",
877 .group = "mmc0_2_grp", 924 .group = "mmc0_2_grp",
878 .dev_name = "foo-mmc.0",
879}, 925},
880{ 926{
927 .dev_name = "foo-mmc.0",
881 .name = "8bit" 928 .name = "8bit"
929 .type = PIN_MAP_TYPE_MUX_GROUP,
882 .ctrl_dev_name = "pinctrl-foo", 930 .ctrl_dev_name = "pinctrl-foo",
931 .function = "mmc0",
883 .group = "mmc0_1_grp", 932 .group = "mmc0_1_grp",
884 .dev_name = "foo-mmc.0",
885}, 933},
886{ 934{
935 .dev_name = "foo-mmc.0",
887 .name = "8bit" 936 .name = "8bit"
937 .type = PIN_MAP_TYPE_MUX_GROUP,
888 .ctrl_dev_name = "pinctrl-foo", 938 .ctrl_dev_name = "pinctrl-foo",
889 .function = "mmc0", 939 .function = "mmc0",
890 .group = "mmc0_2_grp", 940 .group = "mmc0_2_grp",
891 .dev_name = "foo-mmc.0",
892}, 941},
893{ 942{
943 .dev_name = "foo-mmc.0",
894 .name = "8bit" 944 .name = "8bit"
945 .type = PIN_MAP_TYPE_MUX_GROUP,
895 .ctrl_dev_name = "pinctrl-foo", 946 .ctrl_dev_name = "pinctrl-foo",
896 .function = "mmc0", 947 .function = "mmc0",
897 .group = "mmc0_3_grp", 948 .group = "mmc0_3_grp",
898 .dev_name = "foo-mmc.0",
899}, 949},
900... 950...
901 951
902The result of grabbing this mapping from the device with something like 952The result of grabbing this mapping from the device with something like
903this (see next paragraph): 953this (see next paragraph):
904 954
905 pmx = pinmux_get(&device, "8bit"); 955 p = pinctrl_get(dev);
956 s = pinctrl_lookup_state(p, "8bit");
957 ret = pinctrl_select_state(p, s);
958
959or more simply:
960
961 p = pinctrl_get_select(dev, "8bit");
906 962
907Will be that you activate all the three bottom records in the mapping at 963Will be that you activate all the three bottom records in the mapping at
908once. Since they share the same name, pin controller device, funcion and 964once. Since they share the same name, pin controller device, function and
909device, and since we allow multiple groups to match to a single device, they 965device, and since we allow multiple groups to match to a single device, they
910all get selected, and they all get enabled and disable simultaneously by the 966all get selected, and they all get enabled and disable simultaneously by the
911pinmux core. 967pinmux core.
@@ -914,97 +970,111 @@ pinmux core.
914Pinmux requests from drivers 970Pinmux requests from drivers
915============================ 971============================
916 972
917Generally it is discouraged to let individual drivers get and enable pinmuxes. 973Generally it is discouraged to let individual drivers get and enable pin
918So if possible, handle the pinmuxes in platform code or some other place where 974control. So if possible, handle the pin control in platform code or some other
919you have access to all the affected struct device * pointers. In some cases 975place where you have access to all the affected struct device * pointers. In
920where a driver needs to switch between different mux mappings at runtime 976some cases where a driver needs to e.g. switch between different mux mappings
921this is not possible. 977at runtime this is not possible.
922 978
923A driver may request a certain mux to be activated, usually just the default 979A driver may request a certain control state to be activated, usually just the
924mux like this: 980default state like this:
925 981
926#include <linux/pinctrl/pinmux.h> 982#include <linux/pinctrl/consumer.h>
927 983
928struct foo_state { 984struct foo_state {
929 struct pinmux *pmx; 985 struct pinctrl *p;
986 struct pinctrl_state *s;
930 ... 987 ...
931}; 988};
932 989
933foo_probe() 990foo_probe()
934{ 991{
935 /* Allocate a state holder named "state" etc */ 992 /* Allocate a state holder named "foo" etc */
936 struct pinmux pmx; 993 struct foo_state *foo = ...;
994
995 foo->p = pinctrl_get(&device);
996 if (IS_ERR(foo->p)) {
997 /* FIXME: clean up "foo" here */
998 return PTR_ERR(foo->p);
999 }
937 1000
938 pmx = pinmux_get(&device, NULL); 1001 foo->s = pinctrl_lookup_state(foo->p, PINCTRL_STATE_DEFAULT);
939 if IS_ERR(pmx) 1002 if (IS_ERR(foo->s)) {
940 return PTR_ERR(pmx); 1003 pinctrl_put(foo->p);
941 pinmux_enable(pmx); 1004 /* FIXME: clean up "foo" here */
1005 return PTR_ERR(s);
1006 }
942 1007
943 state->pmx = pmx; 1008 ret = pinctrl_select_state(foo->s);
1009 if (ret < 0) {
1010 pinctrl_put(foo->p);
1011 /* FIXME: clean up "foo" here */
1012 return ret;
1013 }
944} 1014}
945 1015
946foo_remove() 1016foo_remove()
947{ 1017{
948 pinmux_disable(state->pmx); 1018 pinctrl_put(state->p);
949 pinmux_put(state->pmx);
950} 1019}
951 1020
952If you want to grab a specific mux mapping and not just the first one found for 1021This get/lookup/select/put sequence can just as well be handled by bus drivers
953this device you can specify a specific mapping name, for example in the above
954example the second i2c0 setting: pinmux_get(&device, "spi0-pos-B");
955
956This get/enable/disable/put sequence can just as well be handled by bus drivers
957if you don't want each and every driver to handle it and you know the 1022if you don't want each and every driver to handle it and you know the
958arrangement on your bus. 1023arrangement on your bus.
959 1024
960The semantics of the get/enable respective disable/put is as follows: 1025The semantics of the pinctrl APIs are:
1026
1027- pinctrl_get() is called in process context to obtain a handle to all pinctrl
1028 information for a given client device. It will allocate a struct from the
1029 kernel memory to hold the pinmux state. All mapping table parsing or similar
1030 slow operations take place within this API.
961 1031
962- pinmux_get() is called in process context to reserve the pins affected with 1032- pinctrl_lookup_state() is called in process context to obtain a handle to a
963 a certain mapping and set up the pinmux core and the driver. It will allocate 1033 specific state for a the client device. This operation may be slow too.
964 a struct from the kernel memory to hold the pinmux state.
965 1034
966- pinmux_enable()/pinmux_disable() is quick and can be called from fastpath 1035- pinctrl_select_state() programs pin controller hardware according to the
967 (irq context) when you quickly want to set up/tear down the hardware muxing 1036 definition of the state as given by the mapping table. In theory this is a
968 when running a device driver. Usually it will just poke some values into a 1037 fast-path operation, since it only involved blasting some register settings
969 register. 1038 into hardware. However, note that some pin controllers may have their
1039 registers on a slow/IRQ-based bus, so client devices should not assume they
1040 can call pinctrl_select_state() from non-blocking contexts.
970 1041
971- pinmux_disable() is called in process context to tear down the pin requests 1042- pinctrl_put() frees all information associated with a pinctrl handle.
972 and release the state holder struct for the mux setting.
973 1043
974Usually the pinmux core handled the get/put pair and call out to the device 1044Usually the pin control core handled the get/put pair and call out to the
975drivers bookkeeping operations, like checking available functions and the 1045device drivers bookkeeping operations, like checking available functions and
976associated pins, whereas the enable/disable pass on to the pin controller 1046the associated pins, whereas the enable/disable pass on to the pin controller
977driver which takes care of activating and/or deactivating the mux setting by 1047driver which takes care of activating and/or deactivating the mux setting by
978quickly poking some registers. 1048quickly poking some registers.
979 1049
980The pins are allocated for your device when you issue the pinmux_get() call, 1050The pins are allocated for your device when you issue the pinctrl_get() call,
981after this you should be able to see this in the debugfs listing of all pins. 1051after this you should be able to see this in the debugfs listing of all pins.
982 1052
983 1053
984System pinmux hogging 1054System pin control hogging
985===================== 1055==========================
986 1056
987A system pinmux map entry, i.e. a pinmux setting that does not have a device 1057Pin control map entries can be hogged by the core when the pin controller
988associated with it, can be hogged by the core when the pin controller is 1058is registered. This means that the core will attempt to call pinctrl_get(),
989registered. This means that the core will attempt to call pinmux_get() and 1059lookup_state() and select_state() on it immediately after the pin control
990pinmux_enable() on it immediately after the pin control device has been 1060device has been registered.
991registered.
992 1061
993This is enabled by simply setting the .hog_on_boot field in the map to true, 1062This occurs for mapping table entries where the client device name is equal
994like this: 1063to the pin controller device name, and the state name is PINCTRL_STATE_DEFAULT.
995 1064
996{ 1065{
997 .name = "POWERMAP" 1066 .dev_name = "pinctrl-foo",
1067 .name = PINCTRL_STATE_DEFAULT,
1068 .type = PIN_MAP_TYPE_MUX_GROUP,
998 .ctrl_dev_name = "pinctrl-foo", 1069 .ctrl_dev_name = "pinctrl-foo",
999 .function = "power_func", 1070 .function = "power_func",
1000 .hog_on_boot = true,
1001}, 1071},
1002 1072
1003Since it may be common to request the core to hog a few always-applicable 1073Since it may be common to request the core to hog a few always-applicable
1004mux settings on the primary pin controller, there is a convenience macro for 1074mux settings on the primary pin controller, there is a convenience macro for
1005this: 1075this:
1006 1076
1007PINMUX_MAP_PRIMARY_SYS_HOG("POWERMAP", "power_func") 1077PIN_MAP_MUX_GROUP_HOG_DEFAULT("pinctrl-foo", NULL /* group */, "power_func")
1008 1078
1009This gives the exact same result as the above construction. 1079This gives the exact same result as the above construction.
1010 1080
@@ -1016,32 +1086,47 @@ It is possible to mux a certain function in and out at runtime, say to move
1016an SPI port from one set of pins to another set of pins. Say for example for 1086an SPI port from one set of pins to another set of pins. Say for example for
1017spi0 in the example above, we expose two different groups of pins for the same 1087spi0 in the example above, we expose two different groups of pins for the same
1018function, but with different named in the mapping as described under 1088function, but with different named in the mapping as described under
1019"Advanced mapping" above. So we have two mappings named "spi0-pos-A" and 1089"Advanced mapping" above. So that for an SPI device, we have two states named
1020"spi0-pos-B". 1090"pos-A" and "pos-B".
1021 1091
1022This snippet first muxes the function in the pins defined by group A, enables 1092This snippet first muxes the function in the pins defined by group A, enables
1023it, disables and releases it, and muxes it in on the pins defined by group B: 1093it, disables and releases it, and muxes it in on the pins defined by group B:
1024 1094
1095#include <linux/pinctrl/consumer.h>
1096
1025foo_switch() 1097foo_switch()
1026{ 1098{
1027 struct pinmux *pmx; 1099 struct pinctrl *p;
1100 struct pinctrl_state *s1, *s2;
1101
1102 /* Setup */
1103 p = pinctrl_get(&device);
1104 if (IS_ERR(p))
1105 ...
1106
1107 s1 = pinctrl_lookup_state(foo->p, "pos-A");
1108 if (IS_ERR(s1))
1109 ...
1110
1111 s2 = pinctrl_lookup_state(foo->p, "pos-B");
1112 if (IS_ERR(s2))
1113 ...
1028 1114
1029 /* Enable on position A */ 1115 /* Enable on position A */
1030 pmx = pinmux_get(&device, "spi0-pos-A"); 1116 ret = pinctrl_select_state(s1);
1031 if IS_ERR(pmx) 1117 if (ret < 0)
1032 return PTR_ERR(pmx); 1118 ...
1033 pinmux_enable(pmx);
1034 1119
1035 /* This releases the pins again */ 1120 ...
1036 pinmux_disable(pmx);
1037 pinmux_put(pmx);
1038 1121
1039 /* Enable on position B */ 1122 /* Enable on position B */
1040 pmx = pinmux_get(&device, "spi0-pos-B"); 1123 ret = pinctrl_select_state(s2);
1041 if IS_ERR(pmx) 1124 if (ret < 0)
1042 return PTR_ERR(pmx); 1125 ...
1043 pinmux_enable(pmx); 1126
1044 ... 1127 ...
1128
1129 pinctrl_put(p);
1045} 1130}
1046 1131
1047The above has to be done from process context. 1132The above has to be done from process context.
diff --git a/Documentation/power/devices.txt b/Documentation/power/devices.txt
index 20af7def23c8..872815cd41d3 100644
--- a/Documentation/power/devices.txt
+++ b/Documentation/power/devices.txt
@@ -96,6 +96,12 @@ struct dev_pm_ops {
96 int (*thaw)(struct device *dev); 96 int (*thaw)(struct device *dev);
97 int (*poweroff)(struct device *dev); 97 int (*poweroff)(struct device *dev);
98 int (*restore)(struct device *dev); 98 int (*restore)(struct device *dev);
99 int (*suspend_late)(struct device *dev);
100 int (*resume_early)(struct device *dev);
101 int (*freeze_late)(struct device *dev);
102 int (*thaw_early)(struct device *dev);
103 int (*poweroff_late)(struct device *dev);
104 int (*restore_early)(struct device *dev);
99 int (*suspend_noirq)(struct device *dev); 105 int (*suspend_noirq)(struct device *dev);
100 int (*resume_noirq)(struct device *dev); 106 int (*resume_noirq)(struct device *dev);
101 int (*freeze_noirq)(struct device *dev); 107 int (*freeze_noirq)(struct device *dev);
@@ -305,7 +311,7 @@ Entering System Suspend
305----------------------- 311-----------------------
306When the system goes into the standby or memory sleep state, the phases are: 312When the system goes into the standby or memory sleep state, the phases are:
307 313
308 prepare, suspend, suspend_noirq. 314 prepare, suspend, suspend_late, suspend_noirq.
309 315
310 1. The prepare phase is meant to prevent races by preventing new devices 316 1. The prepare phase is meant to prevent races by preventing new devices
311 from being registered; the PM core would never know that all the 317 from being registered; the PM core would never know that all the
@@ -324,7 +330,12 @@ When the system goes into the standby or memory sleep state, the phases are:
324 appropriate low-power state, depending on the bus type the device is on, 330 appropriate low-power state, depending on the bus type the device is on,
325 and they may enable wakeup events. 331 and they may enable wakeup events.
326 332
327 3. The suspend_noirq phase occurs after IRQ handlers have been disabled, 333 3 For a number of devices it is convenient to split suspend into the
334 "quiesce device" and "save device state" phases, in which cases
335 suspend_late is meant to do the latter. It is always executed after
336 runtime power management has been disabled for all devices.
337
338 4. The suspend_noirq phase occurs after IRQ handlers have been disabled,
328 which means that the driver's interrupt handler will not be called while 339 which means that the driver's interrupt handler will not be called while
329 the callback method is running. The methods should save the values of 340 the callback method is running. The methods should save the values of
330 the device's registers that weren't saved previously and finally put the 341 the device's registers that weren't saved previously and finally put the
@@ -359,7 +370,7 @@ Leaving System Suspend
359---------------------- 370----------------------
360When resuming from standby or memory sleep, the phases are: 371When resuming from standby or memory sleep, the phases are:
361 372
362 resume_noirq, resume, complete. 373 resume_noirq, resume_early, resume, complete.
363 374
364 1. The resume_noirq callback methods should perform any actions needed 375 1. The resume_noirq callback methods should perform any actions needed
365 before the driver's interrupt handlers are invoked. This generally 376 before the driver's interrupt handlers are invoked. This generally
@@ -375,14 +386,18 @@ When resuming from standby or memory sleep, the phases are:
375 device driver's ->pm.resume_noirq() method to perform device-specific 386 device driver's ->pm.resume_noirq() method to perform device-specific
376 actions. 387 actions.
377 388
378 2. The resume methods should bring the the device back to its operating 389 2. The resume_early methods should prepare devices for the execution of
390 the resume methods. This generally involves undoing the actions of the
391 preceding suspend_late phase.
392
393 3 The resume methods should bring the the device back to its operating
379 state, so that it can perform normal I/O. This generally involves 394 state, so that it can perform normal I/O. This generally involves
380 undoing the actions of the suspend phase. 395 undoing the actions of the suspend phase.
381 396
382 3. The complete phase uses only a bus callback. The method should undo the 397 4. The complete phase should undo the actions of the prepare phase. Note,
383 actions of the prepare phase. Note, however, that new children may be 398 however, that new children may be registered below the device as soon as
384 registered below the device as soon as the resume callbacks occur; it's 399 the resume callbacks occur; it's not necessary to wait until the
385 not necessary to wait until the complete phase. 400 complete phase.
386 401
387At the end of these phases, drivers should be as functional as they were before 402At the end of these phases, drivers should be as functional as they were before
388suspending: I/O can be performed using DMA and IRQs, and the relevant clocks are 403suspending: I/O can be performed using DMA and IRQs, and the relevant clocks are
@@ -429,8 +444,8 @@ an image of the system memory while everything is stable, reactivate all
429devices (thaw), write the image to permanent storage, and finally shut down the 444devices (thaw), write the image to permanent storage, and finally shut down the
430system (poweroff). The phases used to accomplish this are: 445system (poweroff). The phases used to accomplish this are:
431 446
432 prepare, freeze, freeze_noirq, thaw_noirq, thaw, complete, 447 prepare, freeze, freeze_late, freeze_noirq, thaw_noirq, thaw_early,
433 prepare, poweroff, poweroff_noirq 448 thaw, complete, prepare, poweroff, poweroff_late, poweroff_noirq
434 449
435 1. The prepare phase is discussed in the "Entering System Suspend" section 450 1. The prepare phase is discussed in the "Entering System Suspend" section
436 above. 451 above.
@@ -441,7 +456,11 @@ system (poweroff). The phases used to accomplish this are:
441 save time it's best not to do so. Also, the device should not be 456 save time it's best not to do so. Also, the device should not be
442 prepared to generate wakeup events. 457 prepared to generate wakeup events.
443 458
444 3. The freeze_noirq phase is analogous to the suspend_noirq phase discussed 459 3. The freeze_late phase is analogous to the suspend_late phase described
460 above, except that the device should not be put in a low-power state and
461 should not be allowed to generate wakeup events by it.
462
463 4. The freeze_noirq phase is analogous to the suspend_noirq phase discussed
445 above, except again that the device should not be put in a low-power 464 above, except again that the device should not be put in a low-power
446 state and should not be allowed to generate wakeup events. 465 state and should not be allowed to generate wakeup events.
447 466
@@ -449,15 +468,19 @@ At this point the system image is created. All devices should be inactive and
449the contents of memory should remain undisturbed while this happens, so that the 468the contents of memory should remain undisturbed while this happens, so that the
450image forms an atomic snapshot of the system state. 469image forms an atomic snapshot of the system state.
451 470
452 4. The thaw_noirq phase is analogous to the resume_noirq phase discussed 471 5. The thaw_noirq phase is analogous to the resume_noirq phase discussed
453 above. The main difference is that its methods can assume the device is 472 above. The main difference is that its methods can assume the device is
454 in the same state as at the end of the freeze_noirq phase. 473 in the same state as at the end of the freeze_noirq phase.
455 474
456 5. The thaw phase is analogous to the resume phase discussed above. Its 475 6. The thaw_early phase is analogous to the resume_early phase described
476 above. Its methods should undo the actions of the preceding
477 freeze_late, if necessary.
478
479 7. The thaw phase is analogous to the resume phase discussed above. Its
457 methods should bring the device back to an operating state, so that it 480 methods should bring the device back to an operating state, so that it
458 can be used for saving the image if necessary. 481 can be used for saving the image if necessary.
459 482
460 6. The complete phase is discussed in the "Leaving System Suspend" section 483 8. The complete phase is discussed in the "Leaving System Suspend" section
461 above. 484 above.
462 485
463At this point the system image is saved, and the devices then need to be 486At this point the system image is saved, and the devices then need to be
@@ -465,16 +488,19 @@ prepared for the upcoming system shutdown. This is much like suspending them
465before putting the system into the standby or memory sleep state, and the phases 488before putting the system into the standby or memory sleep state, and the phases
466are similar. 489are similar.
467 490
468 7. The prepare phase is discussed above. 491 9. The prepare phase is discussed above.
492
493 10. The poweroff phase is analogous to the suspend phase.
469 494
470 8. The poweroff phase is analogous to the suspend phase. 495 11. The poweroff_late phase is analogous to the suspend_late phase.
471 496
472 9. The poweroff_noirq phase is analogous to the suspend_noirq phase. 497 12. The poweroff_noirq phase is analogous to the suspend_noirq phase.
473 498
474The poweroff and poweroff_noirq callbacks should do essentially the same things 499The poweroff, poweroff_late and poweroff_noirq callbacks should do essentially
475as the suspend and suspend_noirq callbacks. The only notable difference is that 500the same things as the suspend, suspend_late and suspend_noirq callbacks,
476they need not store the device register values, because the registers should 501respectively. The only notable difference is that they need not store the
477already have been stored during the freeze or freeze_noirq phases. 502device register values, because the registers should already have been stored
503during the freeze, freeze_late or freeze_noirq phases.
478 504
479 505
480Leaving Hibernation 506Leaving Hibernation
@@ -518,22 +544,25 @@ To achieve this, the image kernel must restore the devices' pre-hibernation
518functionality. The operation is much like waking up from the memory sleep 544functionality. The operation is much like waking up from the memory sleep
519state, although it involves different phases: 545state, although it involves different phases:
520 546
521 restore_noirq, restore, complete 547 restore_noirq, restore_early, restore, complete
522 548
523 1. The restore_noirq phase is analogous to the resume_noirq phase. 549 1. The restore_noirq phase is analogous to the resume_noirq phase.
524 550
525 2. The restore phase is analogous to the resume phase. 551 2. The restore_early phase is analogous to the resume_early phase.
552
553 3. The restore phase is analogous to the resume phase.
526 554
527 3. The complete phase is discussed above. 555 4. The complete phase is discussed above.
528 556
529The main difference from resume[_noirq] is that restore[_noirq] must assume the 557The main difference from resume[_early|_noirq] is that restore[_early|_noirq]
530device has been accessed and reconfigured by the boot loader or the boot kernel. 558must assume the device has been accessed and reconfigured by the boot loader or
531Consequently the state of the device may be different from the state remembered 559the boot kernel. Consequently the state of the device may be different from the
532from the freeze and freeze_noirq phases. The device may even need to be reset 560state remembered from the freeze, freeze_late and freeze_noirq phases. The
533and completely re-initialized. In many cases this difference doesn't matter, so 561device may even need to be reset and completely re-initialized. In many cases
534the resume[_noirq] and restore[_norq] method pointers can be set to the same 562this difference doesn't matter, so the resume[_early|_noirq] and
535routines. Nevertheless, different callback pointers are used in case there is a 563restore[_early|_norq] method pointers can be set to the same routines.
536situation where it actually matters. 564Nevertheless, different callback pointers are used in case there is a situation
565where it actually does matter.
537 566
538 567
539Device Power Management Domains 568Device Power Management Domains
diff --git a/Documentation/power/freezing-of-tasks.txt b/Documentation/power/freezing-of-tasks.txt
index ebd7490ef1df..ec715cd78fbb 100644
--- a/Documentation/power/freezing-of-tasks.txt
+++ b/Documentation/power/freezing-of-tasks.txt
@@ -63,6 +63,27 @@ devices have been reinitialized, the function thaw_processes() is called in
63order to clear the PF_FROZEN flag for each frozen task. Then, the tasks that 63order to clear the PF_FROZEN flag for each frozen task. Then, the tasks that
64have been frozen leave __refrigerator() and continue running. 64have been frozen leave __refrigerator() and continue running.
65 65
66
67Rationale behind the functions dealing with freezing and thawing of tasks:
68-------------------------------------------------------------------------
69
70freeze_processes():
71 - freezes only userspace tasks
72
73freeze_kernel_threads():
74 - freezes all tasks (including kernel threads) because we can't freeze
75 kernel threads without freezing userspace tasks
76
77thaw_kernel_threads():
78 - thaws only kernel threads; this is particularly useful if we need to do
79 anything special in between thawing of kernel threads and thawing of
80 userspace tasks, or if we want to postpone the thawing of userspace tasks
81
82thaw_processes():
83 - thaws all tasks (including kernel threads) because we can't thaw userspace
84 tasks without thawing kernel threads
85
86
66III. Which kernel threads are freezable? 87III. Which kernel threads are freezable?
67 88
68Kernel threads are not freezable by default. However, a kernel thread may clear 89Kernel threads are not freezable by default. However, a kernel thread may clear
diff --git a/Documentation/powerpc/firmware-assisted-dump.txt b/Documentation/powerpc/firmware-assisted-dump.txt
new file mode 100644
index 000000000000..3007bc98af28
--- /dev/null
+++ b/Documentation/powerpc/firmware-assisted-dump.txt
@@ -0,0 +1,270 @@
1
2 Firmware-Assisted Dump
3 ------------------------
4 July 2011
5
6The goal of firmware-assisted dump is to enable the dump of
7a crashed system, and to do so from a fully-reset system, and
8to minimize the total elapsed time until the system is back
9in production use.
10
11- Firmware assisted dump (fadump) infrastructure is intended to replace
12 the existing phyp assisted dump.
13- Fadump uses the same firmware interfaces and memory reservation model
14 as phyp assisted dump.
15- Unlike phyp dump, fadump exports the memory dump through /proc/vmcore
16 in the ELF format in the same way as kdump. This helps us reuse the
17 kdump infrastructure for dump capture and filtering.
18- Unlike phyp dump, userspace tool does not need to refer any sysfs
19 interface while reading /proc/vmcore.
20- Unlike phyp dump, fadump allows user to release all the memory reserved
21 for dump, with a single operation of echo 1 > /sys/kernel/fadump_release_mem.
22- Once enabled through kernel boot parameter, fadump can be
23 started/stopped through /sys/kernel/fadump_registered interface (see
24 sysfs files section below) and can be easily integrated with kdump
25 service start/stop init scripts.
26
27Comparing with kdump or other strategies, firmware-assisted
28dump offers several strong, practical advantages:
29
30-- Unlike kdump, the system has been reset, and loaded
31 with a fresh copy of the kernel. In particular,
32 PCI and I/O devices have been reinitialized and are
33 in a clean, consistent state.
34-- Once the dump is copied out, the memory that held the dump
35 is immediately available to the running kernel. And therefore,
36 unlike kdump, fadump doesn't need a 2nd reboot to get back
37 the system to the production configuration.
38
39The above can only be accomplished by coordination with,
40and assistance from the Power firmware. The procedure is
41as follows:
42
43-- The first kernel registers the sections of memory with the
44 Power firmware for dump preservation during OS initialization.
45 These registered sections of memory are reserved by the first
46 kernel during early boot.
47
48-- When a system crashes, the Power firmware will save
49 the low memory (boot memory of size larger of 5% of system RAM
50 or 256MB) of RAM to the previous registered region. It will
51 also save system registers, and hardware PTE's.
52
53 NOTE: The term 'boot memory' means size of the low memory chunk
54 that is required for a kernel to boot successfully when
55 booted with restricted memory. By default, the boot memory
56 size will be the larger of 5% of system RAM or 256MB.
57 Alternatively, user can also specify boot memory size
58 through boot parameter 'fadump_reserve_mem=' which will
59 override the default calculated size. Use this option
60 if default boot memory size is not sufficient for second
61 kernel to boot successfully.
62
63-- After the low memory (boot memory) area has been saved, the
64 firmware will reset PCI and other hardware state. It will
65 *not* clear the RAM. It will then launch the bootloader, as
66 normal.
67
68-- The freshly booted kernel will notice that there is a new
69 node (ibm,dump-kernel) in the device tree, indicating that
70 there is crash data available from a previous boot. During
71 the early boot OS will reserve rest of the memory above
72 boot memory size effectively booting with restricted memory
73 size. This will make sure that the second kernel will not
74 touch any of the dump memory area.
75
76-- User-space tools will read /proc/vmcore to obtain the contents
77 of memory, which holds the previous crashed kernel dump in ELF
78 format. The userspace tools may copy this info to disk, or
79 network, nas, san, iscsi, etc. as desired.
80
81-- Once the userspace tool is done saving dump, it will echo
82 '1' to /sys/kernel/fadump_release_mem to release the reserved
83 memory back to general use, except the memory required for
84 next firmware-assisted dump registration.
85
86 e.g.
87 # echo 1 > /sys/kernel/fadump_release_mem
88
89Please note that the firmware-assisted dump feature
90is only available on Power6 and above systems with recent
91firmware versions.
92
93Implementation details:
94----------------------
95
96During boot, a check is made to see if firmware supports
97this feature on that particular machine. If it does, then
98we check to see if an active dump is waiting for us. If yes
99then everything but boot memory size of RAM is reserved during
100early boot (See Fig. 2). This area is released once we finish
101collecting the dump from user land scripts (e.g. kdump scripts)
102that are run. If there is dump data, then the
103/sys/kernel/fadump_release_mem file is created, and the reserved
104memory is held.
105
106If there is no waiting dump data, then only the memory required
107to hold CPU state, HPTE region, boot memory dump and elfcore
108header, is reserved at the top of memory (see Fig. 1). This area
109is *not* released: this region will be kept permanently reserved,
110so that it can act as a receptacle for a copy of the boot memory
111content in addition to CPU state and HPTE region, in the case a
112crash does occur.
113
114 o Memory Reservation during first kernel
115
116 Low memory Top of memory
117 0 boot memory size |
118 | | |<--Reserved dump area -->|
119 V V | Permanent Reservation V
120 +-----------+----------/ /----------+---+----+-----------+----+
121 | | |CPU|HPTE| DUMP |ELF |
122 +-----------+----------/ /----------+---+----+-----------+----+
123 | ^
124 | |
125 \ /
126 -------------------------------------------
127 Boot memory content gets transferred to
128 reserved area by firmware at the time of
129 crash
130 Fig. 1
131
132 o Memory Reservation during second kernel after crash
133
134 Low memory Top of memory
135 0 boot memory size |
136 | |<------------- Reserved dump area ----------- -->|
137 V V V
138 +-----------+----------/ /----------+---+----+-----------+----+
139 | | |CPU|HPTE| DUMP |ELF |
140 +-----------+----------/ /----------+---+----+-----------+----+
141 | |
142 V V
143 Used by second /proc/vmcore
144 kernel to boot
145 Fig. 2
146
147Currently the dump will be copied from /proc/vmcore to a
148a new file upon user intervention. The dump data available through
149/proc/vmcore will be in ELF format. Hence the existing kdump
150infrastructure (kdump scripts) to save the dump works fine with
151minor modifications.
152
153The tools to examine the dump will be same as the ones
154used for kdump.
155
156How to enable firmware-assisted dump (fadump):
157-------------------------------------
158
1591. Set config option CONFIG_FA_DUMP=y and build kernel.
1602. Boot into linux kernel with 'fadump=on' kernel cmdline option.
1613. Optionally, user can also set 'fadump_reserve_mem=' kernel cmdline
162 to specify size of the memory to reserve for boot memory dump
163 preservation.
164
165NOTE: If firmware-assisted dump fails to reserve memory then it will
166 fallback to existing kdump mechanism if 'crashkernel=' option
167 is set at kernel cmdline.
168
169Sysfs/debugfs files:
170------------
171
172Firmware-assisted dump feature uses sysfs file system to hold
173the control files and debugfs file to display memory reserved region.
174
175Here is the list of files under kernel sysfs:
176
177 /sys/kernel/fadump_enabled
178
179 This is used to display the fadump status.
180 0 = fadump is disabled
181 1 = fadump is enabled
182
183 This interface can be used by kdump init scripts to identify if
184 fadump is enabled in the kernel and act accordingly.
185
186 /sys/kernel/fadump_registered
187
188 This is used to display the fadump registration status as well
189 as to control (start/stop) the fadump registration.
190 0 = fadump is not registered.
191 1 = fadump is registered and ready to handle system crash.
192
193 To register fadump echo 1 > /sys/kernel/fadump_registered and
194 echo 0 > /sys/kernel/fadump_registered for un-register and stop the
195 fadump. Once the fadump is un-registered, the system crash will not
196 be handled and vmcore will not be captured. This interface can be
197 easily integrated with kdump service start/stop.
198
199 /sys/kernel/fadump_release_mem
200
201 This file is available only when fadump is active during
202 second kernel. This is used to release the reserved memory
203 region that are held for saving crash dump. To release the
204 reserved memory echo 1 to it:
205
206 echo 1 > /sys/kernel/fadump_release_mem
207
208 After echo 1, the content of the /sys/kernel/debug/powerpc/fadump_region
209 file will change to reflect the new memory reservations.
210
211 The existing userspace tools (kdump infrastructure) can be easily
212 enhanced to use this interface to release the memory reserved for
213 dump and continue without 2nd reboot.
214
215Here is the list of files under powerpc debugfs:
216(Assuming debugfs is mounted on /sys/kernel/debug directory.)
217
218 /sys/kernel/debug/powerpc/fadump_region
219
220 This file shows the reserved memory regions if fadump is
221 enabled otherwise this file is empty. The output format
222 is:
223 <region>: [<start>-<end>] <reserved-size> bytes, Dumped: <dump-size>
224
225 e.g.
226 Contents when fadump is registered during first kernel
227
228 # cat /sys/kernel/debug/powerpc/fadump_region
229 CPU : [0x0000006ffb0000-0x0000006fff001f] 0x40020 bytes, Dumped: 0x0
230 HPTE: [0x0000006fff0020-0x0000006fff101f] 0x1000 bytes, Dumped: 0x0
231 DUMP: [0x0000006fff1020-0x0000007fff101f] 0x10000000 bytes, Dumped: 0x0
232
233 Contents when fadump is active during second kernel
234
235 # cat /sys/kernel/debug/powerpc/fadump_region
236 CPU : [0x0000006ffb0000-0x0000006fff001f] 0x40020 bytes, Dumped: 0x40020
237 HPTE: [0x0000006fff0020-0x0000006fff101f] 0x1000 bytes, Dumped: 0x1000
238 DUMP: [0x0000006fff1020-0x0000007fff101f] 0x10000000 bytes, Dumped: 0x10000000
239 : [0x00000010000000-0x0000006ffaffff] 0x5ffb0000 bytes, Dumped: 0x5ffb0000
240
241NOTE: Please refer to Documentation/filesystems/debugfs.txt on
242 how to mount the debugfs filesystem.
243
244
245TODO:
246-----
247 o Need to come up with the better approach to find out more
248 accurate boot memory size that is required for a kernel to
249 boot successfully when booted with restricted memory.
250 o The fadump implementation introduces a fadump crash info structure
251 in the scratch area before the ELF core header. The idea of introducing
252 this structure is to pass some important crash info data to the second
253 kernel which will help second kernel to populate ELF core header with
254 correct data before it gets exported through /proc/vmcore. The current
255 design implementation does not address a possibility of introducing
256 additional fields (in future) to this structure without affecting
257 compatibility. Need to come up with the better approach to address this.
258 The possible approaches are:
259 1. Introduce version field for version tracking, bump up the version
260 whenever a new field is added to the structure in future. The version
261 field can be used to find out what fields are valid for the current
262 version of the structure.
263 2. Reserve the area of predefined size (say PAGE_SIZE) for this
264 structure and have unused area as reserved (initialized to zero)
265 for future field additions.
266 The advantage of approach 1 over 2 is we don't need to reserve extra space.
267---
268Author: Mahesh Salgaonkar <mahesh@linux.vnet.ibm.com>
269This document is based on the original documentation written for phyp
270assisted dump by Linas Vepstas and Manish Ahuja.
diff --git a/Documentation/powerpc/mpc52xx.txt b/Documentation/powerpc/mpc52xx.txt
index 10dd4ab93b85..0d540a31ea1a 100644
--- a/Documentation/powerpc/mpc52xx.txt
+++ b/Documentation/powerpc/mpc52xx.txt
@@ -2,7 +2,7 @@ Linux 2.6.x on MPC52xx family
2----------------------------- 2-----------------------------
3 3
4For the latest info, go to http://www.246tNt.com/mpc52xx/ 4For the latest info, go to http://www.246tNt.com/mpc52xx/
5 5
6To compile/use : 6To compile/use :
7 7
8 - U-Boot: 8 - U-Boot:
@@ -10,23 +10,23 @@ To compile/use :
10 if you wish to ). 10 if you wish to ).
11 # make lite5200_defconfig 11 # make lite5200_defconfig
12 # make uImage 12 # make uImage
13 13
14 then, on U-boot: 14 then, on U-boot:
15 => tftpboot 200000 uImage 15 => tftpboot 200000 uImage
16 => tftpboot 400000 pRamdisk 16 => tftpboot 400000 pRamdisk
17 => bootm 200000 400000 17 => bootm 200000 400000
18 18
19 - DBug: 19 - DBug:
20 # <edit Makefile to set ARCH=ppc & CROSS_COMPILE=... ( also EXTRAVERSION 20 # <edit Makefile to set ARCH=ppc & CROSS_COMPILE=... ( also EXTRAVERSION
21 if you wish to ). 21 if you wish to ).
22 # make lite5200_defconfig 22 # make lite5200_defconfig
23 # cp your_initrd.gz arch/ppc/boot/images/ramdisk.image.gz 23 # cp your_initrd.gz arch/ppc/boot/images/ramdisk.image.gz
24 # make zImage.initrd 24 # make zImage.initrd
25 # make 25 # make
26 26
27 then in DBug: 27 then in DBug:
28 DBug> dn -i zImage.initrd.lite5200 28 DBug> dn -i zImage.initrd.lite5200
29 29
30 30
31Some remarks : 31Some remarks :
32 - The port is named mpc52xxx, and config options are PPC_MPC52xx. The MGT5100 32 - The port is named mpc52xxx, and config options are PPC_MPC52xx. The MGT5100
diff --git a/Documentation/powerpc/phyp-assisted-dump.txt b/Documentation/powerpc/phyp-assisted-dump.txt
deleted file mode 100644
index ad340205d96a..000000000000
--- a/Documentation/powerpc/phyp-assisted-dump.txt
+++ /dev/null
@@ -1,127 +0,0 @@
1
2 Hypervisor-Assisted Dump
3 ------------------------
4 November 2007
5
6The goal of hypervisor-assisted dump is to enable the dump of
7a crashed system, and to do so from a fully-reset system, and
8to minimize the total elapsed time until the system is back
9in production use.
10
11As compared to kdump or other strategies, hypervisor-assisted
12dump offers several strong, practical advantages:
13
14-- Unlike kdump, the system has been reset, and loaded
15 with a fresh copy of the kernel. In particular,
16 PCI and I/O devices have been reinitialized and are
17 in a clean, consistent state.
18-- As the dump is performed, the dumped memory becomes
19 immediately available to the system for normal use.
20-- After the dump is completed, no further reboots are
21 required; the system will be fully usable, and running
22 in its normal, production mode on its normal kernel.
23
24The above can only be accomplished by coordination with,
25and assistance from the hypervisor. The procedure is
26as follows:
27
28-- When a system crashes, the hypervisor will save
29 the low 256MB of RAM to a previously registered
30 save region. It will also save system state, system
31 registers, and hardware PTE's.
32
33-- After the low 256MB area has been saved, the
34 hypervisor will reset PCI and other hardware state.
35 It will *not* clear RAM. It will then launch the
36 bootloader, as normal.
37
38-- The freshly booted kernel will notice that there
39 is a new node (ibm,dump-kernel) in the device tree,
40 indicating that there is crash data available from
41 a previous boot. It will boot into only 256MB of RAM,
42 reserving the rest of system memory.
43
44-- Userspace tools will parse /sys/kernel/release_region
45 and read /proc/vmcore to obtain the contents of memory,
46 which holds the previous crashed kernel. The userspace
47 tools may copy this info to disk, or network, nas, san,
48 iscsi, etc. as desired.
49
50 For Example: the values in /sys/kernel/release-region
51 would look something like this (address-range pairs).
52 CPU:0x177fee000-0x10000: HPTE:0x177ffe020-0x1000: /
53 DUMP:0x177fff020-0x10000000, 0x10000000-0x16F1D370A
54
55-- As the userspace tools complete saving a portion of
56 dump, they echo an offset and size to
57 /sys/kernel/release_region to release the reserved
58 memory back to general use.
59
60 An example of this is:
61 "echo 0x40000000 0x10000000 > /sys/kernel/release_region"
62 which will release 256MB at the 1GB boundary.
63
64Please note that the hypervisor-assisted dump feature
65is only available on Power6-based systems with recent
66firmware versions.
67
68Implementation details:
69----------------------
70
71During boot, a check is made to see if firmware supports
72this feature on this particular machine. If it does, then
73we check to see if a active dump is waiting for us. If yes
74then everything but 256 MB of RAM is reserved during early
75boot. This area is released once we collect a dump from user
76land scripts that are run. If there is dump data, then
77the /sys/kernel/release_region file is created, and
78the reserved memory is held.
79
80If there is no waiting dump data, then only the highest
81256MB of the ram is reserved as a scratch area. This area
82is *not* released: this region will be kept permanently
83reserved, so that it can act as a receptacle for a copy
84of the low 256MB in the case a crash does occur. See,
85however, "open issues" below, as to whether
86such a reserved region is really needed.
87
88Currently the dump will be copied from /proc/vmcore to a
89a new file upon user intervention. The starting address
90to be read and the range for each data point in provided
91in /sys/kernel/release_region.
92
93The tools to examine the dump will be same as the ones
94used for kdump.
95
96General notes:
97--------------
98Security: please note that there are potential security issues
99with any sort of dump mechanism. In particular, plaintext
100(unencrypted) data, and possibly passwords, may be present in
101the dump data. Userspace tools must take adequate precautions to
102preserve security.
103
104Open issues/ToDo:
105------------
106 o The various code paths that tell the hypervisor that a crash
107 occurred, vs. it simply being a normal reboot, should be
108 reviewed, and possibly clarified/fixed.
109
110 o Instead of using /sys/kernel, should there be a /sys/dump
111 instead? There is a dump_subsys being created by the s390 code,
112 perhaps the pseries code should use a similar layout as well.
113
114 o Is reserving a 256MB region really required? The goal of
115 reserving a 256MB scratch area is to make sure that no
116 important crash data is clobbered when the hypervisor
117 save low mem to the scratch area. But, if one could assure
118 that nothing important is located in some 256MB area, then
119 it would not need to be reserved. Something that can be
120 improved in subsequent versions.
121
122 o Still working the kdump team to integrate this with kdump,
123 some work remains but this would not affect the current
124 patches.
125
126 o Still need to write a shell script, to copy the dump away.
127 Currently I am parsing it manually.
diff --git a/Documentation/remoteproc.txt b/Documentation/remoteproc.txt
new file mode 100644
index 000000000000..70a048cd3fa3
--- /dev/null
+++ b/Documentation/remoteproc.txt
@@ -0,0 +1,322 @@
1Remote Processor Framework
2
31. Introduction
4
5Modern SoCs typically have heterogeneous remote processor devices in asymmetric
6multiprocessing (AMP) configurations, which may be running different instances
7of operating system, whether it's Linux or any other flavor of real-time OS.
8
9OMAP4, for example, has dual Cortex-A9, dual Cortex-M3 and a C64x+ DSP.
10In a typical configuration, the dual cortex-A9 is running Linux in a SMP
11configuration, and each of the other three cores (two M3 cores and a DSP)
12is running its own instance of RTOS in an AMP configuration.
13
14The remoteproc framework allows different platforms/architectures to
15control (power on, load firmware, power off) those remote processors while
16abstracting the hardware differences, so the entire driver doesn't need to be
17duplicated. In addition, this framework also adds rpmsg virtio devices
18for remote processors that supports this kind of communication. This way,
19platform-specific remoteproc drivers only need to provide a few low-level
20handlers, and then all rpmsg drivers will then just work
21(for more information about the virtio-based rpmsg bus and its drivers,
22please read Documentation/rpmsg.txt).
23Registration of other types of virtio devices is now also possible. Firmwares
24just need to publish what kind of virtio devices do they support, and then
25remoteproc will add those devices. This makes it possible to reuse the
26existing virtio drivers with remote processor backends at a minimal development
27cost.
28
292. User API
30
31 int rproc_boot(struct rproc *rproc)
32 - Boot a remote processor (i.e. load its firmware, power it on, ...).
33 If the remote processor is already powered on, this function immediately
34 returns (successfully).
35 Returns 0 on success, and an appropriate error value otherwise.
36 Note: to use this function you should already have a valid rproc
37 handle. There are several ways to achieve that cleanly (devres, pdata,
38 the way remoteproc_rpmsg.c does this, or, if this becomes prevalent, we
39 might also consider using dev_archdata for this). See also
40 rproc_get_by_name() below.
41
42 void rproc_shutdown(struct rproc *rproc)
43 - Power off a remote processor (previously booted with rproc_boot()).
44 In case @rproc is still being used by an additional user(s), then
45 this function will just decrement the power refcount and exit,
46 without really powering off the device.
47 Every call to rproc_boot() must (eventually) be accompanied by a call
48 to rproc_shutdown(). Calling rproc_shutdown() redundantly is a bug.
49 Notes:
50 - we're not decrementing the rproc's refcount, only the power refcount.
51 which means that the @rproc handle stays valid even after
52 rproc_shutdown() returns, and users can still use it with a subsequent
53 rproc_boot(), if needed.
54 - don't call rproc_shutdown() to unroll rproc_get_by_name(), exactly
55 because rproc_shutdown() _does not_ decrement the refcount of @rproc.
56 To decrement the refcount of @rproc, use rproc_put() (but _only_ if
57 you acquired @rproc using rproc_get_by_name()).
58
59 struct rproc *rproc_get_by_name(const char *name)
60 - Find an rproc handle using the remote processor's name, and then
61 boot it. If it's already powered on, then just immediately return
62 (successfully). Returns the rproc handle on success, and NULL on failure.
63 This function increments the remote processor's refcount, so always
64 use rproc_put() to decrement it back once rproc isn't needed anymore.
65 Note: currently rproc_get_by_name() and rproc_put() are not used anymore
66 by the rpmsg bus and its drivers. We need to scrutinize the use cases
67 that still need them, and see if we can migrate them to use the non
68 name-based boot/shutdown interface.
69
70 void rproc_put(struct rproc *rproc)
71 - Decrement @rproc's power refcount and shut it down if it reaches zero
72 (essentially by just calling rproc_shutdown), and then decrement @rproc's
73 validity refcount too.
74 After this function returns, @rproc may _not_ be used anymore, and its
75 handle should be considered invalid.
76 This function should be called _iff_ the @rproc handle was grabbed by
77 calling rproc_get_by_name().
78
793. Typical usage
80
81#include <linux/remoteproc.h>
82
83/* in case we were given a valid 'rproc' handle */
84int dummy_rproc_example(struct rproc *my_rproc)
85{
86 int ret;
87
88 /* let's power on and boot our remote processor */
89 ret = rproc_boot(my_rproc);
90 if (ret) {
91 /*
92 * something went wrong. handle it and leave.
93 */
94 }
95
96 /*
97 * our remote processor is now powered on... give it some work
98 */
99
100 /* let's shut it down now */
101 rproc_shutdown(my_rproc);
102}
103
1044. API for implementors
105
106 struct rproc *rproc_alloc(struct device *dev, const char *name,
107 const struct rproc_ops *ops,
108 const char *firmware, int len)
109 - Allocate a new remote processor handle, but don't register
110 it yet. Required parameters are the underlying device, the
111 name of this remote processor, platform-specific ops handlers,
112 the name of the firmware to boot this rproc with, and the
113 length of private data needed by the allocating rproc driver (in bytes).
114
115 This function should be used by rproc implementations during
116 initialization of the remote processor.
117 After creating an rproc handle using this function, and when ready,
118 implementations should then call rproc_register() to complete
119 the registration of the remote processor.
120 On success, the new rproc is returned, and on failure, NULL.
121
122 Note: _never_ directly deallocate @rproc, even if it was not registered
123 yet. Instead, if you just need to unroll rproc_alloc(), use rproc_free().
124
125 void rproc_free(struct rproc *rproc)
126 - Free an rproc handle that was allocated by rproc_alloc.
127 This function should _only_ be used if @rproc was only allocated,
128 but not registered yet.
129 If @rproc was already successfully registered (by calling
130 rproc_register()), then use rproc_unregister() instead.
131
132 int rproc_register(struct rproc *rproc)
133 - Register @rproc with the remoteproc framework, after it has been
134 allocated with rproc_alloc().
135 This is called by the platform-specific rproc implementation, whenever
136 a new remote processor device is probed.
137 Returns 0 on success and an appropriate error code otherwise.
138 Note: this function initiates an asynchronous firmware loading
139 context, which will look for virtio devices supported by the rproc's
140 firmware.
141 If found, those virtio devices will be created and added, so as a result
142 of registering this remote processor, additional virtio drivers might get
143 probed.
144
145 int rproc_unregister(struct rproc *rproc)
146 - Unregister a remote processor, and decrement its refcount.
147 If its refcount drops to zero, then @rproc will be freed. If not,
148 it will be freed later once the last reference is dropped.
149
150 This function should be called when the platform specific rproc
151 implementation decides to remove the rproc device. it should
152 _only_ be called if a previous invocation of rproc_register()
153 has completed successfully.
154
155 After rproc_unregister() returns, @rproc is _not_ valid anymore and
156 it shouldn't be used. More specifically, don't call rproc_free()
157 or try to directly free @rproc after rproc_unregister() returns;
158 none of these are needed, and calling them is a bug.
159
160 Returns 0 on success and -EINVAL if @rproc isn't valid.
161
1625. Implementation callbacks
163
164These callbacks should be provided by platform-specific remoteproc
165drivers:
166
167/**
168 * struct rproc_ops - platform-specific device handlers
169 * @start: power on the device and boot it
170 * @stop: power off the device
171 * @kick: kick a virtqueue (virtqueue id given as a parameter)
172 */
173struct rproc_ops {
174 int (*start)(struct rproc *rproc);
175 int (*stop)(struct rproc *rproc);
176 void (*kick)(struct rproc *rproc, int vqid);
177};
178
179Every remoteproc implementation should at least provide the ->start and ->stop
180handlers. If rpmsg/virtio functionality is also desired, then the ->kick handler
181should be provided as well.
182
183The ->start() handler takes an rproc handle and should then power on the
184device and boot it (use rproc->priv to access platform-specific private data).
185The boot address, in case needed, can be found in rproc->bootaddr (remoteproc
186core puts there the ELF entry point).
187On success, 0 should be returned, and on failure, an appropriate error code.
188
189The ->stop() handler takes an rproc handle and powers the device down.
190On success, 0 is returned, and on failure, an appropriate error code.
191
192The ->kick() handler takes an rproc handle, and an index of a virtqueue
193where new message was placed in. Implementations should interrupt the remote
194processor and let it know it has pending messages. Notifying remote processors
195the exact virtqueue index to look in is optional: it is easy (and not
196too expensive) to go through the existing virtqueues and look for new buffers
197in the used rings.
198
1996. Binary Firmware Structure
200
201At this point remoteproc only supports ELF32 firmware binaries. However,
202it is quite expected that other platforms/devices which we'd want to
203support with this framework will be based on different binary formats.
204
205When those use cases show up, we will have to decouple the binary format
206from the framework core, so we can support several binary formats without
207duplicating common code.
208
209When the firmware is parsed, its various segments are loaded to memory
210according to the specified device address (might be a physical address
211if the remote processor is accessing memory directly).
212
213In addition to the standard ELF segments, most remote processors would
214also include a special section which we call "the resource table".
215
216The resource table contains system resources that the remote processor
217requires before it should be powered on, such as allocation of physically
218contiguous memory, or iommu mapping of certain on-chip peripherals.
219Remotecore will only power up the device after all the resource table's
220requirement are met.
221
222In addition to system resources, the resource table may also contain
223resource entries that publish the existence of supported features
224or configurations by the remote processor, such as trace buffers and
225supported virtio devices (and their configurations).
226
227The resource table begins with this header:
228
229/**
230 * struct resource_table - firmware resource table header
231 * @ver: version number
232 * @num: number of resource entries
233 * @reserved: reserved (must be zero)
234 * @offset: array of offsets pointing at the various resource entries
235 *
236 * The header of the resource table, as expressed by this structure,
237 * contains a version number (should we need to change this format in the
238 * future), the number of available resource entries, and their offsets
239 * in the table.
240 */
241struct resource_table {
242 u32 ver;
243 u32 num;
244 u32 reserved[2];
245 u32 offset[0];
246} __packed;
247
248Immediately following this header are the resource entries themselves,
249each of which begins with the following resource entry header:
250
251/**
252 * struct fw_rsc_hdr - firmware resource entry header
253 * @type: resource type
254 * @data: resource data
255 *
256 * Every resource entry begins with a 'struct fw_rsc_hdr' header providing
257 * its @type. The content of the entry itself will immediately follow
258 * this header, and it should be parsed according to the resource type.
259 */
260struct fw_rsc_hdr {
261 u32 type;
262 u8 data[0];
263} __packed;
264
265Some resources entries are mere announcements, where the host is informed
266of specific remoteproc configuration. Other entries require the host to
267do something (e.g. allocate a system resource). Sometimes a negotiation
268is expected, where the firmware requests a resource, and once allocated,
269the host should provide back its details (e.g. address of an allocated
270memory region).
271
272Here are the various resource types that are currently supported:
273
274/**
275 * enum fw_resource_type - types of resource entries
276 *
277 * @RSC_CARVEOUT: request for allocation of a physically contiguous
278 * memory region.
279 * @RSC_DEVMEM: request to iommu_map a memory-based peripheral.
280 * @RSC_TRACE: announces the availability of a trace buffer into which
281 * the remote processor will be writing logs.
282 * @RSC_VDEV: declare support for a virtio device, and serve as its
283 * virtio header.
284 * @RSC_LAST: just keep this one at the end
285 *
286 * Please note that these values are used as indices to the rproc_handle_rsc
287 * lookup table, so please keep them sane. Moreover, @RSC_LAST is used to
288 * check the validity of an index before the lookup table is accessed, so
289 * please update it as needed.
290 */
291enum fw_resource_type {
292 RSC_CARVEOUT = 0,
293 RSC_DEVMEM = 1,
294 RSC_TRACE = 2,
295 RSC_VDEV = 3,
296 RSC_LAST = 4,
297};
298
299For more details regarding a specific resource type, please see its
300dedicated structure in include/linux/remoteproc.h.
301
302We also expect that platform-specific resource entries will show up
303at some point. When that happens, we could easily add a new RSC_PLATFORM
304type, and hand those resources to the platform-specific rproc driver to handle.
305
3067. Virtio and remoteproc
307
308The firmware should provide remoteproc information about virtio devices
309that it supports, and their configurations: a RSC_VDEV resource entry
310should specify the virtio device id (as in virtio_ids.h), virtio features,
311virtio config space, vrings information, etc.
312
313When a new remote processor is registered, the remoteproc framework
314will look for its resource table and will register the virtio devices
315it supports. A firmware may support any number of virtio devices, and
316of any type (a single remote processor can also easily support several
317rpmsg virtio devices this way, if desired).
318
319Of course, RSC_VDEV resource entries are only good enough for static
320allocation of virtio devices. Dynamic allocations will also be made possible
321using the rpmsg bus (similar to how we already do dynamic allocations of
322rpmsg channels; read more about it in rpmsg.txt).
diff --git a/Documentation/rpmsg.txt b/Documentation/rpmsg.txt
new file mode 100644
index 000000000000..409d9f964c5b
--- /dev/null
+++ b/Documentation/rpmsg.txt
@@ -0,0 +1,293 @@
1Remote Processor Messaging (rpmsg) Framework
2
3Note: this document describes the rpmsg bus and how to write rpmsg drivers.
4To learn how to add rpmsg support for new platforms, check out remoteproc.txt
5(also a resident of Documentation/).
6
71. Introduction
8
9Modern SoCs typically employ heterogeneous remote processor devices in
10asymmetric multiprocessing (AMP) configurations, which may be running
11different instances of operating system, whether it's Linux or any other
12flavor of real-time OS.
13
14OMAP4, for example, has dual Cortex-A9, dual Cortex-M3 and a C64x+ DSP.
15Typically, the dual cortex-A9 is running Linux in a SMP configuration,
16and each of the other three cores (two M3 cores and a DSP) is running
17its own instance of RTOS in an AMP configuration.
18
19Typically AMP remote processors employ dedicated DSP codecs and multimedia
20hardware accelerators, and therefore are often used to offload CPU-intensive
21multimedia tasks from the main application processor.
22
23These remote processors could also be used to control latency-sensitive
24sensors, drive random hardware blocks, or just perform background tasks
25while the main CPU is idling.
26
27Users of those remote processors can either be userland apps (e.g. multimedia
28frameworks talking with remote OMX components) or kernel drivers (controlling
29hardware accessible only by the remote processor, reserving kernel-controlled
30resources on behalf of the remote processor, etc..).
31
32Rpmsg is a virtio-based messaging bus that allows kernel drivers to communicate
33with remote processors available on the system. In turn, drivers could then
34expose appropriate user space interfaces, if needed.
35
36When writing a driver that exposes rpmsg communication to userland, please
37keep in mind that remote processors might have direct access to the
38system's physical memory and other sensitive hardware resources (e.g. on
39OMAP4, remote cores and hardware accelerators may have direct access to the
40physical memory, gpio banks, dma controllers, i2c bus, gptimers, mailbox
41devices, hwspinlocks, etc..). Moreover, those remote processors might be
42running RTOS where every task can access the entire memory/devices exposed
43to the processor. To minimize the risks of rogue (or buggy) userland code
44exploiting remote bugs, and by that taking over the system, it is often
45desired to limit userland to specific rpmsg channels (see definition below)
46it can send messages on, and if possible, minimize how much control
47it has over the content of the messages.
48
49Every rpmsg device is a communication channel with a remote processor (thus
50rpmsg devices are called channels). Channels are identified by a textual name
51and have a local ("source") rpmsg address, and remote ("destination") rpmsg
52address.
53
54When a driver starts listening on a channel, its rx callback is bound with
55a unique rpmsg local address (a 32-bit integer). This way when inbound messages
56arrive, the rpmsg core dispatches them to the appropriate driver according
57to their destination address (this is done by invoking the driver's rx handler
58with the payload of the inbound message).
59
60
612. User API
62
63 int rpmsg_send(struct rpmsg_channel *rpdev, void *data, int len);
64 - sends a message across to the remote processor on a given channel.
65 The caller should specify the channel, the data it wants to send,
66 and its length (in bytes). The message will be sent on the specified
67 channel, i.e. its source and destination address fields will be
68 set to the channel's src and dst addresses.
69
70 In case there are no TX buffers available, the function will block until
71 one becomes available (i.e. until the remote processor consumes
72 a tx buffer and puts it back on virtio's used descriptor ring),
73 or a timeout of 15 seconds elapses. When the latter happens,
74 -ERESTARTSYS is returned.
75 The function can only be called from a process context (for now).
76 Returns 0 on success and an appropriate error value on failure.
77
78 int rpmsg_sendto(struct rpmsg_channel *rpdev, void *data, int len, u32 dst);
79 - sends a message across to the remote processor on a given channel,
80 to a destination address provided by the caller.
81 The caller should specify the channel, the data it wants to send,
82 its length (in bytes), and an explicit destination address.
83 The message will then be sent to the remote processor to which the
84 channel belongs, using the channel's src address, and the user-provided
85 dst address (thus the channel's dst address will be ignored).
86
87 In case there are no TX buffers available, the function will block until
88 one becomes available (i.e. until the remote processor consumes
89 a tx buffer and puts it back on virtio's used descriptor ring),
90 or a timeout of 15 seconds elapses. When the latter happens,
91 -ERESTARTSYS is returned.
92 The function can only be called from a process context (for now).
93 Returns 0 on success and an appropriate error value on failure.
94
95 int rpmsg_send_offchannel(struct rpmsg_channel *rpdev, u32 src, u32 dst,
96 void *data, int len);
97 - sends a message across to the remote processor, using the src and dst
98 addresses provided by the user.
99 The caller should specify the channel, the data it wants to send,
100 its length (in bytes), and explicit source and destination addresses.
101 The message will then be sent to the remote processor to which the
102 channel belongs, but the channel's src and dst addresses will be
103 ignored (and the user-provided addresses will be used instead).
104
105 In case there are no TX buffers available, the function will block until
106 one becomes available (i.e. until the remote processor consumes
107 a tx buffer and puts it back on virtio's used descriptor ring),
108 or a timeout of 15 seconds elapses. When the latter happens,
109 -ERESTARTSYS is returned.
110 The function can only be called from a process context (for now).
111 Returns 0 on success and an appropriate error value on failure.
112
113 int rpmsg_trysend(struct rpmsg_channel *rpdev, void *data, int len);
114 - sends a message across to the remote processor on a given channel.
115 The caller should specify the channel, the data it wants to send,
116 and its length (in bytes). The message will be sent on the specified
117 channel, i.e. its source and destination address fields will be
118 set to the channel's src and dst addresses.
119
120 In case there are no TX buffers available, the function will immediately
121 return -ENOMEM without waiting until one becomes available.
122 The function can only be called from a process context (for now).
123 Returns 0 on success and an appropriate error value on failure.
124
125 int rpmsg_trysendto(struct rpmsg_channel *rpdev, void *data, int len, u32 dst)
126 - sends a message across to the remote processor on a given channel,
127 to a destination address provided by the user.
128 The user should specify the channel, the data it wants to send,
129 its length (in bytes), and an explicit destination address.
130 The message will then be sent to the remote processor to which the
131 channel belongs, using the channel's src address, and the user-provided
132 dst address (thus the channel's dst address will be ignored).
133
134 In case there are no TX buffers available, the function will immediately
135 return -ENOMEM without waiting until one becomes available.
136 The function can only be called from a process context (for now).
137 Returns 0 on success and an appropriate error value on failure.
138
139 int rpmsg_trysend_offchannel(struct rpmsg_channel *rpdev, u32 src, u32 dst,
140 void *data, int len);
141 - sends a message across to the remote processor, using source and
142 destination addresses provided by the user.
143 The user should specify the channel, the data it wants to send,
144 its length (in bytes), and explicit source and destination addresses.
145 The message will then be sent to the remote processor to which the
146 channel belongs, but the channel's src and dst addresses will be
147 ignored (and the user-provided addresses will be used instead).
148
149 In case there are no TX buffers available, the function will immediately
150 return -ENOMEM without waiting until one becomes available.
151 The function can only be called from a process context (for now).
152 Returns 0 on success and an appropriate error value on failure.
153
154 struct rpmsg_endpoint *rpmsg_create_ept(struct rpmsg_channel *rpdev,
155 void (*cb)(struct rpmsg_channel *, void *, int, void *, u32),
156 void *priv, u32 addr);
157 - every rpmsg address in the system is bound to an rx callback (so when
158 inbound messages arrive, they are dispatched by the rpmsg bus using the
159 appropriate callback handler) by means of an rpmsg_endpoint struct.
160
161 This function allows drivers to create such an endpoint, and by that,
162 bind a callback, and possibly some private data too, to an rpmsg address
163 (either one that is known in advance, or one that will be dynamically
164 assigned for them).
165
166 Simple rpmsg drivers need not call rpmsg_create_ept, because an endpoint
167 is already created for them when they are probed by the rpmsg bus
168 (using the rx callback they provide when they registered to the rpmsg bus).
169
170 So things should just work for simple drivers: they already have an
171 endpoint, their rx callback is bound to their rpmsg address, and when
172 relevant inbound messages arrive (i.e. messages which their dst address
173 equals to the src address of their rpmsg channel), the driver's handler
174 is invoked to process it.
175
176 That said, more complicated drivers might do need to allocate
177 additional rpmsg addresses, and bind them to different rx callbacks.
178 To accomplish that, those drivers need to call this function.
179 Drivers should provide their channel (so the new endpoint would bind
180 to the same remote processor their channel belongs to), an rx callback
181 function, an optional private data (which is provided back when the
182 rx callback is invoked), and an address they want to bind with the
183 callback. If addr is RPMSG_ADDR_ANY, then rpmsg_create_ept will
184 dynamically assign them an available rpmsg address (drivers should have
185 a very good reason why not to always use RPMSG_ADDR_ANY here).
186
187 Returns a pointer to the endpoint on success, or NULL on error.
188
189 void rpmsg_destroy_ept(struct rpmsg_endpoint *ept);
190 - destroys an existing rpmsg endpoint. user should provide a pointer
191 to an rpmsg endpoint that was previously created with rpmsg_create_ept().
192
193 int register_rpmsg_driver(struct rpmsg_driver *rpdrv);
194 - registers an rpmsg driver with the rpmsg bus. user should provide
195 a pointer to an rpmsg_driver struct, which contains the driver's
196 ->probe() and ->remove() functions, an rx callback, and an id_table
197 specifying the names of the channels this driver is interested to
198 be probed with.
199
200 void unregister_rpmsg_driver(struct rpmsg_driver *rpdrv);
201 - unregisters an rpmsg driver from the rpmsg bus. user should provide
202 a pointer to a previously-registered rpmsg_driver struct.
203 Returns 0 on success, and an appropriate error value on failure.
204
205
2063. Typical usage
207
208The following is a simple rpmsg driver, that sends an "hello!" message
209on probe(), and whenever it receives an incoming message, it dumps its
210content to the console.
211
212#include <linux/kernel.h>
213#include <linux/module.h>
214#include <linux/rpmsg.h>
215
216static void rpmsg_sample_cb(struct rpmsg_channel *rpdev, void *data, int len,
217 void *priv, u32 src)
218{
219 print_hex_dump(KERN_INFO, "incoming message:", DUMP_PREFIX_NONE,
220 16, 1, data, len, true);
221}
222
223static int rpmsg_sample_probe(struct rpmsg_channel *rpdev)
224{
225 int err;
226
227 dev_info(&rpdev->dev, "chnl: 0x%x -> 0x%x\n", rpdev->src, rpdev->dst);
228
229 /* send a message on our channel */
230 err = rpmsg_send(rpdev, "hello!", 6);
231 if (err) {
232 pr_err("rpmsg_send failed: %d\n", err);
233 return err;
234 }
235
236 return 0;
237}
238
239static void __devexit rpmsg_sample_remove(struct rpmsg_channel *rpdev)
240{
241 dev_info(&rpdev->dev, "rpmsg sample client driver is removed\n");
242}
243
244static struct rpmsg_device_id rpmsg_driver_sample_id_table[] = {
245 { .name = "rpmsg-client-sample" },
246 { },
247};
248MODULE_DEVICE_TABLE(rpmsg, rpmsg_driver_sample_id_table);
249
250static struct rpmsg_driver rpmsg_sample_client = {
251 .drv.name = KBUILD_MODNAME,
252 .drv.owner = THIS_MODULE,
253 .id_table = rpmsg_driver_sample_id_table,
254 .probe = rpmsg_sample_probe,
255 .callback = rpmsg_sample_cb,
256 .remove = __devexit_p(rpmsg_sample_remove),
257};
258
259static int __init init(void)
260{
261 return register_rpmsg_driver(&rpmsg_sample_client);
262}
263module_init(init);
264
265static void __exit fini(void)
266{
267 unregister_rpmsg_driver(&rpmsg_sample_client);
268}
269module_exit(fini);
270
271Note: a similar sample which can be built and loaded can be found
272in samples/rpmsg/.
273
2744. Allocations of rpmsg channels:
275
276At this point we only support dynamic allocations of rpmsg channels.
277
278This is possible only with remote processors that have the VIRTIO_RPMSG_F_NS
279virtio device feature set. This feature bit means that the remote
280processor supports dynamic name service announcement messages.
281
282When this feature is enabled, creation of rpmsg devices (i.e. channels)
283is completely dynamic: the remote processor announces the existence of a
284remote rpmsg service by sending a name service message (which contains
285the name and rpmsg addr of the remote service, see struct rpmsg_ns_msg).
286
287This message is then handled by the rpmsg bus, which in turn dynamically
288creates and registers an rpmsg channel (which represents the remote service).
289If/when a relevant rpmsg driver is registered, it will be immediately probed
290by the bus, and can then start sending messages to the remote service.
291
292The plan is also to add static creation of rpmsg channels via the virtio
293config space, but it's not implemented yet.
diff --git a/Documentation/s390/3270.txt b/Documentation/s390/3270.txt
index 7a5c73a7ed7f..7c715de99774 100644
--- a/Documentation/s390/3270.txt
+++ b/Documentation/s390/3270.txt
@@ -47,9 +47,9 @@ including the console 3270, changes subchannel identifier relative to
47one another. ReIPL as soon as possible after running the configuration 47one another. ReIPL as soon as possible after running the configuration
48script and the resulting /tmp/mkdev3270. 48script and the resulting /tmp/mkdev3270.
49 49
50If you have chosen to make tub3270 a module, you add a line to 50If you have chosen to make tub3270 a module, you add a line to a
51/etc/modprobe.conf. If you are working on a VM virtual machine, you 51configuration file under /etc/modprobe.d/. If you are working on a VM
52can use DEF GRAF to define virtual 3270 devices. 52virtual machine, you can use DEF GRAF to define virtual 3270 devices.
53 53
54You may generate both 3270 and 3215 console support, or one or the 54You may generate both 3270 and 3215 console support, or one or the
55other, or neither. If you generate both, the console type under VM is 55other, or neither. If you generate both, the console type under VM is
@@ -60,7 +60,7 @@ at boot time to a 3270 if it is a 3215.
60 60
61In brief, these are the steps: 61In brief, these are the steps:
62 1. Install the tub3270 patch 62 1. Install the tub3270 patch
63 2. (If a module) add a line to /etc/modprobe.conf 63 2. (If a module) add a line to a file in /etc/modprobe.d/*.conf
64 3. (If VM) define devices with DEF GRAF 64 3. (If VM) define devices with DEF GRAF
65 4. Reboot 65 4. Reboot
66 5. Configure 66 5. Configure
@@ -84,13 +84,12 @@ Here are the installation steps in detail:
84 make modules_install 84 make modules_install
85 85
86 2. (Perform this step only if you have configured tub3270 as a 86 2. (Perform this step only if you have configured tub3270 as a
87 module.) Add a line to /etc/modprobe.conf to automatically 87 module.) Add a line to a file /etc/modprobe.d/*.conf to automatically
88 load the driver when it's needed. With this line added, 88 load the driver when it's needed. With this line added, you will see
89 you will see login prompts appear on your 3270s as soon as 89 login prompts appear on your 3270s as soon as boot is complete (or
90 boot is complete (or with emulated 3270s, as soon as you dial 90 with emulated 3270s, as soon as you dial into your vm guest using the
91 into your vm guest using the command "DIAL <vmguestname>"). 91 command "DIAL <vmguestname>"). Since the line-mode major number is
92 Since the line-mode major number is 227, the line to add to 92 227, the line to add should be:
93 /etc/modprobe.conf should be:
94 alias char-major-227 tub3270 93 alias char-major-227 tub3270
95 94
96 3. Define graphic devices to your vm guest machine, if you 95 3. Define graphic devices to your vm guest machine, if you
diff --git a/Documentation/scheduler/sched-stats.txt b/Documentation/scheduler/sched-stats.txt
index 1cd5d51bc761..8259b34a66ae 100644
--- a/Documentation/scheduler/sched-stats.txt
+++ b/Documentation/scheduler/sched-stats.txt
@@ -38,7 +38,8 @@ First field is a sched_yield() statistic:
38 1) # of times sched_yield() was called 38 1) # of times sched_yield() was called
39 39
40Next three are schedule() statistics: 40Next three are schedule() statistics:
41 2) # of times we switched to the expired queue and reused it 41 2) This field is a legacy array expiration count field used in the O(1)
42 scheduler. We kept it for ABI compatibility, but it is always set to zero.
42 3) # of times schedule() was called 43 3) # of times schedule() was called
43 4) # of times schedule() left the processor idle 44 4) # of times schedule() left the processor idle
44 45
diff --git a/Documentation/scsi/00-INDEX b/Documentation/scsi/00-INDEX
index b48ded55b555..b7dd6502bec5 100644
--- a/Documentation/scsi/00-INDEX
+++ b/Documentation/scsi/00-INDEX
@@ -94,3 +94,5 @@ sym53c8xx_2.txt
94 - info on second generation driver for sym53c8xx based adapters 94 - info on second generation driver for sym53c8xx based adapters
95tmscsim.txt 95tmscsim.txt
96 - info on driver for AM53c974 based adapters 96 - info on driver for AM53c974 based adapters
97ufs.txt
98 - info on Universal Flash Storage(UFS) and UFS host controller driver.
diff --git a/Documentation/scsi/ChangeLog.lpfc b/Documentation/scsi/ChangeLog.lpfc
index c56ec99d7b2f..2f6d595f95e1 100644
--- a/Documentation/scsi/ChangeLog.lpfc
+++ b/Documentation/scsi/ChangeLog.lpfc
@@ -1718,7 +1718,7 @@ Changes from 20040319 to 20040326
1718 * lpfc_els_timeout_handler() now uses system timer. 1718 * lpfc_els_timeout_handler() now uses system timer.
1719 * Further cleanup of #ifdef powerpc 1719 * Further cleanup of #ifdef powerpc
1720 * lpfc_scsi_timeout_handler() now uses system timer. 1720 * lpfc_scsi_timeout_handler() now uses system timer.
1721 * Replace common driver's own defines for endianess w/ Linux's 1721 * Replace common driver's own defines for endianness w/ Linux's
1722 __BIG_ENDIAN etc. 1722 __BIG_ENDIAN etc.
1723 * Added #ifdef IPFC for all IPFC specific code. 1723 * Added #ifdef IPFC for all IPFC specific code.
1724 * lpfc_disc_retry_rptlun() now uses system timer. 1724 * lpfc_disc_retry_rptlun() now uses system timer.
diff --git a/Documentation/scsi/ChangeLog.megaraid_sas b/Documentation/scsi/ChangeLog.megaraid_sas
index 57566bacb4c5..83f8ea8b79eb 100644
--- a/Documentation/scsi/ChangeLog.megaraid_sas
+++ b/Documentation/scsi/ChangeLog.megaraid_sas
@@ -510,7 +510,7 @@ i. Support for 1078 type (ppc IOP) controller, device id : 0x60 added.
5103 Older Version : 00.00.02.02 5103 Older Version : 00.00.02.02
511i. Register 16 byte CDB capability with scsi midlayer 511i. Register 16 byte CDB capability with scsi midlayer
512 512
513 "Ths patch properly registers the 16 byte command length capability of the 513 "This patch properly registers the 16 byte command length capability of the
514 megaraid_sas controlled hardware with the scsi midlayer. All megaraid_sas 514 megaraid_sas controlled hardware with the scsi midlayer. All megaraid_sas
515 hardware supports 16 byte CDB's." 515 hardware supports 16 byte CDB's."
516 516
diff --git a/Documentation/scsi/LICENSE.qla2xxx b/Documentation/scsi/LICENSE.qla2xxx
index 19e7cd4bba66..ce0fdf349a81 100644
--- a/Documentation/scsi/LICENSE.qla2xxx
+++ b/Documentation/scsi/LICENSE.qla2xxx
@@ -1,48 +1,11 @@
1Copyright (c) 2003-2011 QLogic Corporation 1Copyright (c) 2003-2011 QLogic Corporation
2QLogic Linux/ESX Fibre Channel HBA Driver 2QLogic Linux FC-FCoE Driver
3 3
4This program includes a device driver for Linux 2.6/ESX that may be 4This program includes a device driver for Linux 3.x.
5distributed with QLogic hardware specific firmware binary file.
6You may modify and redistribute the device driver code under the 5You may modify and redistribute the device driver code under the
7GNU General Public License (a copy of which is attached hereto as 6GNU General Public License (a copy of which is attached hereto as
8Exhibit A) published by the Free Software Foundation (version 2). 7Exhibit A) published by the Free Software Foundation (version 2).
9 8
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 9
47 10
48EXHIBIT A 11EXHIBIT A
diff --git a/Documentation/scsi/aic79xx.txt b/Documentation/scsi/aic79xx.txt
index 64ac7093c872..e2d3273000d4 100644
--- a/Documentation/scsi/aic79xx.txt
+++ b/Documentation/scsi/aic79xx.txt
@@ -215,7 +215,7 @@ The following information is available in this file:
215 INCORRECTLY CAN RENDER YOUR SYSTEM INOPERABLE. 215 INCORRECTLY CAN RENDER YOUR SYSTEM INOPERABLE.
216 USE THEM WITH CAUTION. 216 USE THEM WITH CAUTION.
217 217
218 Edit the file "modprobe.conf" in the directory /etc and add/edit a 218 Put a .conf file in the /etc/modprobe.d/ directory and add/edit a
219 line containing 'options aic79xx aic79xx=[command[,command...]]' where 219 line containing 'options aic79xx aic79xx=[command[,command...]]' where
220 'command' is one or more of the following: 220 'command' is one or more of the following:
221 ----------------------------------------------------------------- 221 -----------------------------------------------------------------
diff --git a/Documentation/scsi/aic7xxx.txt b/Documentation/scsi/aic7xxx.txt
index 18f8d1905e6a..7c5d0223d444 100644
--- a/Documentation/scsi/aic7xxx.txt
+++ b/Documentation/scsi/aic7xxx.txt
@@ -190,7 +190,7 @@ The following information is available in this file:
190 INCORRECTLY CAN RENDER YOUR SYSTEM INOPERABLE. 190 INCORRECTLY CAN RENDER YOUR SYSTEM INOPERABLE.
191 USE THEM WITH CAUTION. 191 USE THEM WITH CAUTION.
192 192
193 Edit the file "modprobe.conf" in the directory /etc and add/edit a 193 Put a .conf file in the /etc/modprobe.d directory and add/edit a
194 line containing 'options aic7xxx aic7xxx=[command[,command...]]' where 194 line containing 'options aic7xxx aic7xxx=[command[,command...]]' where
195 'command' is one or more of the following: 195 'command' is one or more of the following:
196 ----------------------------------------------------------------- 196 -----------------------------------------------------------------
diff --git a/Documentation/scsi/bfa.txt b/Documentation/scsi/bfa.txt
new file mode 100644
index 000000000000..f2d6e9d1791e
--- /dev/null
+++ b/Documentation/scsi/bfa.txt
@@ -0,0 +1,82 @@
1Linux driver for Brocade FC/FCOE adapters
2
3
4Supported Hardware
5------------------
6
7bfa 3.0.2.2 driver supports all Brocade FC/FCOE adapters. Below is a list of
8adapter models with corresponding PCIIDs.
9
10 PCIID Model
11
12 1657:0013:1657:0014 425 4Gbps dual port FC HBA
13 1657:0013:1657:0014 825 8Gbps PCIe dual port FC HBA
14 1657:0013:103c:1742 HP 82B 8Gbps PCIedual port FC HBA
15 1657:0013:103c:1744 HP 42B 4Gbps dual port FC HBA
16 1657:0017:1657:0014 415 4Gbps single port FC HBA
17 1657:0017:1657:0014 815 8Gbps single port FC HBA
18 1657:0017:103c:1741 HP 41B 4Gbps single port FC HBA
19 1657:0017:103c 1743 HP 81B 8Gbps single port FC HBA
20 1657:0021:103c:1779 804 8Gbps FC HBA for HP Bladesystem c-class
21
22 1657:0014:1657:0014 1010 10Gbps single port CNA - FCOE
23 1657:0014:1657:0014 1020 10Gbps dual port CNA - FCOE
24 1657:0014:1657:0014 1007 10Gbps dual port CNA - FCOE
25 1657:0014:1657:0014 1741 10Gbps dual port CNA - FCOE
26
27 1657:0022:1657:0024 1860 16Gbps FC HBA
28 1657:0022:1657:0022 1860 10Gbps CNA - FCOE
29
30
31Firmware download
32-----------------
33
34The latest Firmware package for 3.0.2.2 bfa driver can be found at:
35
36http://www.brocade.com/services-support/drivers-downloads/adapters/Linux.page
37
38and then click following respective util package link:
39
40 Version Link
41
42 v3.0.0.0 Linux Adapter Firmware package for RHEL 6.2, SLES 11SP2
43
44
45Configuration & Management utility download
46-------------------------------------------
47
48The latest driver configuration & management utility for 3.0.2.2 bfa driver can
49be found at:
50
51http://www.brocade.com/services-support/drivers-downloads/adapters/Linux.page
52
53and then click following respective util pacakge link
54
55 Version Link
56
57 v3.0.2.0 Linux Adapter Firmware package for RHEL 6.2, SLES 11SP2
58
59
60Documentation
61-------------
62
63The latest Administration's Guide, Installation and Reference Manual,
64Troubleshooting Guide, and Release Notes for the corresponding out-of-box
65driver can be found at:
66
67http://www.brocade.com/services-support/drivers-downloads/adapters/Linux.page
68
69and use the following inbox and out-of-box driver version mapping to find
70the corresponding documentation:
71
72 Inbox Version Out-of-box Version
73
74 v3.0.2.2 v3.0.0.0
75
76
77Support
78-------
79
80For general product and support info, go to the Brocade website at:
81
82http://www.brocade.com/services-support/index.page
diff --git a/Documentation/scsi/libsas.txt b/Documentation/scsi/libsas.txt
index aa54f54c4a50..3cc9c7843e15 100644
--- a/Documentation/scsi/libsas.txt
+++ b/Documentation/scsi/libsas.txt
@@ -398,21 +398,6 @@ struct sas_task {
398 task_done -- callback when the task has finished execution 398 task_done -- callback when the task has finished execution
399}; 399};
400 400
401When an external entity, entity other than the LLDD or the
402SAS Layer, wants to work with a struct domain_device, it
403_must_ call kobject_get() when getting a handle on the
404device and kobject_put() when it is done with the device.
405
406This does two things:
407 A) implements proper kfree() for the device;
408 B) increments/decrements the kref for all players:
409 domain_device
410 all domain_device's ... (if past an expander)
411 port
412 host adapter
413 pci device
414 and up the ladder, etc.
415
416DISCOVERY 401DISCOVERY
417--------- 402---------
418 403
diff --git a/Documentation/scsi/osst.txt b/Documentation/scsi/osst.txt
index ad86c6d1e898..00c8ebb2fd18 100644
--- a/Documentation/scsi/osst.txt
+++ b/Documentation/scsi/osst.txt
@@ -66,7 +66,7 @@ recognized.
66If you want to have the module autoloaded on access to /dev/osst, you may 66If you want to have the module autoloaded on access to /dev/osst, you may
67add something like 67add something like
68alias char-major-206 osst 68alias char-major-206 osst
69to your /etc/modprobe.conf (before 2.6: modules.conf). 69to a file under /etc/modprobe.d/ directory.
70 70
71You may find it convenient to create a symbolic link 71You may find it convenient to create a symbolic link
72ln -s nosst0 /dev/tape 72ln -s nosst0 /dev/tape
diff --git a/Documentation/scsi/scsi-generic.txt b/Documentation/scsi/scsi-generic.txt
index 0a22ab8ea0c1..51be20a6a14d 100644
--- a/Documentation/scsi/scsi-generic.txt
+++ b/Documentation/scsi/scsi-generic.txt
@@ -62,7 +62,7 @@ There are two packages of sg utilities:
62 and earlier 62 and earlier
63Both packages will work in the lk 2.4 series however sg3_utils offers more 63Both packages will work in the lk 2.4 series however sg3_utils offers more
64capabilities. They can be found at: http://sg.danny.cz/sg/sg3_utils.html and 64capabilities. They can be found at: http://sg.danny.cz/sg/sg3_utils.html and
65freshmeat.net 65freecode.com
66 66
67Another approach is to look at the applications that use the sg driver. 67Another approach is to look at the applications that use the sg driver.
68These include cdrecord, cdparanoia, SANE and cdrdao. 68These include cdrecord, cdparanoia, SANE and cdrdao.
diff --git a/Documentation/scsi/st.txt b/Documentation/scsi/st.txt
index 691ca292c24d..685bf3582abe 100644
--- a/Documentation/scsi/st.txt
+++ b/Documentation/scsi/st.txt
@@ -390,6 +390,10 @@ MTSETDRVBUFFER
390 MT_ST_SYSV sets the SYSV semantics (mode) 390 MT_ST_SYSV sets the SYSV semantics (mode)
391 MT_ST_NOWAIT enables immediate mode (i.e., don't wait for 391 MT_ST_NOWAIT enables immediate mode (i.e., don't wait for
392 the command to finish) for some commands (e.g., rewind) 392 the command to finish) for some commands (e.g., rewind)
393 MT_ST_NOWAIT_EOF enables immediate filemark mode (i.e. when
394 writing a filemark, don't wait for it to complete). Please
395 see the BASICS note about MTWEOFI with respect to the
396 possible dangers of writing immediate filemarks.
393 MT_ST_SILI enables setting the SILI bit in SCSI commands when 397 MT_ST_SILI enables setting the SILI bit in SCSI commands when
394 reading in variable block mode to enhance performance when 398 reading in variable block mode to enhance performance when
395 reading blocks shorter than the byte count; set this only 399 reading blocks shorter than the byte count; set this only
diff --git a/Documentation/scsi/tmscsim.txt b/Documentation/scsi/tmscsim.txt
index 61c0531e044a..3303d218b32e 100644
--- a/Documentation/scsi/tmscsim.txt
+++ b/Documentation/scsi/tmscsim.txt
@@ -102,7 +102,7 @@ So take at least the following measures:
102 ftp://student.physik.uni-dortmund.de/pub/linux/kernel/bootdisk.gz 102 ftp://student.physik.uni-dortmund.de/pub/linux/kernel/bootdisk.gz
103 103
104One more warning: I used to overclock my PCI bus to 41.67 MHz. My Tekram 104One more warning: I used to overclock my PCI bus to 41.67 MHz. My Tekram
105DC390F (Sym53c875) accepted this as well as my Millenium. But the Am53C974 105DC390F (Sym53c875) accepted this as well as my Millennium. But the Am53C974
106produced errors and started to corrupt my disks. So don't do that! A 37.50 106produced errors and started to corrupt my disks. So don't do that! A 37.50
107MHz PCI bus works for me, though, but I don't recommend using higher clocks 107MHz PCI bus works for me, though, but I don't recommend using higher clocks
108than the 33.33 MHz being in the PCI spec. 108than the 33.33 MHz being in the PCI spec.
diff --git a/Documentation/scsi/ufs.txt b/Documentation/scsi/ufs.txt
new file mode 100644
index 000000000000..41a6164592aa
--- /dev/null
+++ b/Documentation/scsi/ufs.txt
@@ -0,0 +1,133 @@
1 Universal Flash Storage
2 =======================
3
4
5Contents
6--------
7
81. Overview
92. UFS Architecture Overview
10 2.1 Application Layer
11 2.2 UFS Transport Protocol(UTP) layer
12 2.3 UFS Interconnect(UIC) Layer
133. UFSHCD Overview
14 3.1 UFS controller initialization
15 3.2 UTP Transfer requests
16 3.3 UFS error handling
17 3.4 SCSI Error handling
18
19
201. Overview
21-----------
22
23Universal Flash Storage(UFS) is a storage specification for flash devices.
24It is aimed to provide a universal storage interface for both
25embedded and removable flash memory based storage in mobile
26devices such as smart phones and tablet computers. The specification
27is defined by JEDEC Solid State Technology Association. UFS is based
28on MIPI M-PHY physical layer standard. UFS uses MIPI M-PHY as the
29physical layer and MIPI Unipro as the link layer.
30
31The main goals of UFS is to provide,
32 * Optimized performance:
33 For UFS version 1.0 and 1.1 the target performance is as follows,
34 Support for Gear1 is mandatory (rate A: 1248Mbps, rate B: 1457.6Mbps)
35 Support for Gear2 is optional (rate A: 2496Mbps, rate B: 2915.2Mbps)
36 Future version of the standard,
37 Gear3 (rate A: 4992Mbps, rate B: 5830.4Mbps)
38 * Low power consumption
39 * High random IOPs and low latency
40
41
422. UFS Architecture Overview
43----------------------------
44
45UFS has a layered communication architecture which is based on SCSI
46SAM-5 architectural model.
47
48UFS communication architecture consists of following layers,
49
502.1 Application Layer
51
52 The Application layer is composed of UFS command set layer(UCS),
53 Task Manager and Device manager. The UFS interface is designed to be
54 protocol agnostic, however SCSI has been selected as a baseline
55 protocol for versions 1.0 and 1.1 of UFS protocol layer.
56 UFS supports subset of SCSI commands defined by SPC-4 and SBC-3.
57 * UCS: It handles SCSI commands supported by UFS specification.
58 * Task manager: It handles task management functions defined by the
59 UFS which are meant for command queue control.
60 * Device manager: It handles device level operations and device
61 configuration operations. Device level operations mainly involve
62 device power management operations and commands to Interconnect
63 layers. Device level configurations involve handling of query
64 requests which are used to modify and retrieve configuration
65 information of the device.
66
672.2 UFS Transport Protocol(UTP) layer
68
69 UTP layer provides services for
70 the higher layers through Service Access Points. UTP defines 3
71 service access points for higher layers.
72 * UDM_SAP: Device manager service access point is exposed to device
73 manager for device level operations. These device level operations
74 are done through query requests.
75 * UTP_CMD_SAP: Command service access point is exposed to UFS command
76 set layer(UCS) to transport commands.
77 * UTP_TM_SAP: Task management service access point is exposed to task
78 manager to transport task management functions.
79 UTP transports messages through UFS protocol information unit(UPIU).
80
812.3 UFS Interconnect(UIC) Layer
82
83 UIC is the lowest layer of UFS layered architecture. It handles
84 connection between UFS host and UFS device. UIC consists of
85 MIPI UniPro and MIPI M-PHY. UIC provides 2 service access points
86 to upper layer,
87 * UIC_SAP: To transport UPIU between UFS host and UFS device.
88 * UIO_SAP: To issue commands to Unipro layers.
89
90
913. UFSHCD Overview
92------------------
93
94The UFS host controller driver is based on Linux SCSI Framework.
95UFSHCD is a low level device driver which acts as an interface between
96SCSI Midlayer and PCIe based UFS host controllers.
97
98The current UFSHCD implementation supports following functionality,
99
1003.1 UFS controller initialization
101
102 The initialization module brings UFS host controller to active state
103 and prepares the controller to transfer commands/response between
104 UFSHCD and UFS device.
105
1063.2 UTP Transfer requests
107
108 Transfer request handling module of UFSHCD receives SCSI commands
109 from SCSI Midlayer, forms UPIUs and issues the UPIUs to UFS Host
110 controller. Also, the module decodes, responses received from UFS
111 host controller in the form of UPIUs and intimates the SCSI Midlayer
112 of the status of the command.
113
1143.3 UFS error handling
115
116 Error handling module handles Host controller fatal errors,
117 Device fatal errors and UIC interconnect layer related errors.
118
1193.4 SCSI Error handling
120
121 This is done through UFSHCD SCSI error handling routines registered
122 with SCSI Midlayer. Examples of some of the error handling commands
123 issues by SCSI Midlayer are Abort task, Lun reset and host reset.
124 UFSHCD Routines to perform these tasks are registered with
125 SCSI Midlayer through .eh_abort_handler, .eh_device_reset_handler and
126 .eh_host_reset_handler.
127
128In this version of UFSHCD Query requests and power management
129functionality are not implemented.
130
131UFS Specifications can be found at,
132UFS - http://www.jedec.org/sites/default/files/docs/JESD220.pdf
133UFSHCI - http://www.jedec.org/sites/default/files/docs/JESD223.pdf
diff --git a/Documentation/security/00-INDEX b/Documentation/security/00-INDEX
index 99b85d39751c..eeed1de546d4 100644
--- a/Documentation/security/00-INDEX
+++ b/Documentation/security/00-INDEX
@@ -6,6 +6,8 @@ SELinux.txt
6 - how to get started with the SELinux security enhancement. 6 - how to get started with the SELinux security enhancement.
7Smack.txt 7Smack.txt
8 - documentation on the Smack Linux Security Module. 8 - documentation on the Smack Linux Security Module.
9Yama.txt
10 - documentation on the Yama Linux Security Module.
9apparmor.txt 11apparmor.txt
10 - documentation on the AppArmor security extension. 12 - documentation on the AppArmor security extension.
11credentials.txt 13credentials.txt
diff --git a/Documentation/security/Smack.txt b/Documentation/security/Smack.txt
index e9dab41c0fe0..d2f72ae66432 100644
--- a/Documentation/security/Smack.txt
+++ b/Documentation/security/Smack.txt
@@ -536,6 +536,6 @@ writing a single character to the /smack/logging file :
5363 : log denied & accepted 5363 : log denied & accepted
537 537
538Events are logged as 'key=value' pairs, for each event you at least will get 538Events are logged as 'key=value' pairs, for each event you at least will get
539the subjet, the object, the rights requested, the action, the kernel function 539the subject, the object, the rights requested, the action, the kernel function
540that triggered the event, plus other pairs depending on the type of event 540that triggered the event, plus other pairs depending on the type of event
541audited. 541audited.
diff --git a/Documentation/security/Yama.txt b/Documentation/security/Yama.txt
new file mode 100644
index 000000000000..a9511f179069
--- /dev/null
+++ b/Documentation/security/Yama.txt
@@ -0,0 +1,65 @@
1Yama is a Linux Security Module that collects a number of system-wide DAC
2security protections that are not handled by the core kernel itself. To
3select it at boot time, specify "security=yama" (though this will disable
4any other LSM).
5
6Yama is controlled through sysctl in /proc/sys/kernel/yama:
7
8- ptrace_scope
9
10==============================================================
11
12ptrace_scope:
13
14As Linux grows in popularity, it will become a larger target for
15malware. One particularly troubling weakness of the Linux process
16interfaces is that a single user is able to examine the memory and
17running state of any of their processes. For example, if one application
18(e.g. Pidgin) was compromised, it would be possible for an attacker to
19attach to other running processes (e.g. Firefox, SSH sessions, GPG agent,
20etc) to extract additional credentials and continue to expand the scope
21of their attack without resorting to user-assisted phishing.
22
23This is not a theoretical problem. SSH session hijacking
24(http://www.storm.net.nz/projects/7) and arbitrary code injection
25(http://c-skills.blogspot.com/2007/05/injectso.html) attacks already
26exist and remain possible if ptrace is allowed to operate as before.
27Since ptrace is not commonly used by non-developers and non-admins, system
28builders should be allowed the option to disable this debugging system.
29
30For a solution, some applications use prctl(PR_SET_DUMPABLE, ...) to
31specifically disallow such ptrace attachment (e.g. ssh-agent), but many
32do not. A more general solution is to only allow ptrace directly from a
33parent to a child process (i.e. direct "gdb EXE" and "strace EXE" still
34work), or with CAP_SYS_PTRACE (i.e. "gdb --pid=PID", and "strace -p PID"
35still work as root).
36
37For software that has defined application-specific relationships
38between a debugging process and its inferior (crash handlers, etc),
39prctl(PR_SET_PTRACER, pid, ...) can be used. An inferior can declare which
40other process (and its descendents) are allowed to call PTRACE_ATTACH
41against it. Only one such declared debugging process can exists for
42each inferior at a time. For example, this is used by KDE, Chromium, and
43Firefox's crash handlers, and by Wine for allowing only Wine processes
44to ptrace each other. If a process wishes to entirely disable these ptrace
45restrictions, it can call prctl(PR_SET_PTRACER, PR_SET_PTRACER_ANY, ...)
46so that any otherwise allowed process (even those in external pid namespaces)
47may attach.
48
49The sysctl settings are:
50
510 - classic ptrace permissions: a process can PTRACE_ATTACH to any other
52 process running under the same uid, as long as it is dumpable (i.e.
53 did not transition uids, start privileged, or have called
54 prctl(PR_SET_DUMPABLE...) already).
55
561 - restricted ptrace: a process must have a predefined relationship
57 with the inferior it wants to call PTRACE_ATTACH on. By default,
58 this relationship is that of only its descendants when the above
59 classic criteria is also met. To change the relationship, an
60 inferior can call prctl(PR_SET_PTRACER, debugger, ...) to declare
61 an allowed debugger PID to call PTRACE_ATTACH on the inferior.
62
63The original children-only logic was based on the restrictions in grsecurity.
64
65==============================================================
diff --git a/Documentation/security/keys-trusted-encrypted.txt b/Documentation/security/keys-trusted-encrypted.txt
index c9e4855ed3d7..e105ae97a4f5 100644
--- a/Documentation/security/keys-trusted-encrypted.txt
+++ b/Documentation/security/keys-trusted-encrypted.txt
@@ -1,7 +1,7 @@
1 Trusted and Encrypted Keys 1 Trusted and Encrypted Keys
2 2
3Trusted and Encrypted Keys are two new key types added to the existing kernel 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, 4key ring service. Both of these new types are variable length symmetric keys,
5and in both cases all keys are created in the kernel, and user space sees, 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 6stores, and loads only encrypted blobs. Trusted Keys require the availability
7of a Trusted Platform Module (TPM) chip for greater security, while Encrypted 7of a Trusted Platform Module (TPM) chip for greater security, while Encrypted
diff --git a/Documentation/security/keys.txt b/Documentation/security/keys.txt
index 4d75931d2d79..787717091421 100644
--- a/Documentation/security/keys.txt
+++ b/Documentation/security/keys.txt
@@ -554,6 +554,10 @@ The keyctl syscall functions are:
554 process must have write permission on the keyring, and it must be a 554 process must have write permission on the keyring, and it must be a
555 keyring (or else error ENOTDIR will result). 555 keyring (or else error ENOTDIR will result).
556 556
557 This function can also be used to clear special kernel keyrings if they
558 are appropriately marked if the user has CAP_SYS_ADMIN capability. The
559 DNS resolver cache keyring is an example of this.
560
557 561
558 (*) Link a key into a keyring: 562 (*) Link a key into a keyring:
559 563
@@ -668,7 +672,7 @@ The keyctl syscall functions are:
668 672
669 If the kernel calls back to userspace to complete the instantiation of a 673 If the kernel calls back to userspace to complete the instantiation of a
670 key, userspace should use this call mark the key as negative before the 674 key, userspace should use this call mark the key as negative before the
671 invoked process returns if it is unable to fulfil the request. 675 invoked process returns if it is unable to fulfill the request.
672 676
673 The process must have write access on the key to be able to instantiate 677 The process must have write access on the key to be able to instantiate
674 it, and the key must be uninstantiated. 678 it, and the key must be uninstantiated.
diff --git a/Documentation/serial/computone.txt b/Documentation/serial/computone.txt
index 39ddcdbeeb85..a6a1158ea2ba 100644
--- a/Documentation/serial/computone.txt
+++ b/Documentation/serial/computone.txt
@@ -49,7 +49,7 @@ Hardware - If you have an ISA card, find a free interrupt and io port.
49 49
50 Note the hardware address from the Computone ISA cards installed into 50 Note the hardware address from the Computone ISA cards installed into
51 the system. These are required for editing ip2.c or editing 51 the system. These are required for editing ip2.c or editing
52 /etc/modprobe.conf, or for specification on the modprobe 52 /etc/modprobe.d/*.conf, or for specification on the modprobe
53 command line. 53 command line.
54 54
55 Note that the /etc/modules.conf should be used for older (pre-2.6) 55 Note that the /etc/modules.conf should be used for older (pre-2.6)
@@ -66,7 +66,7 @@ b) Run "make config" or "make menuconfig" or "make xconfig"
66c) Set address on ISA cards then: 66c) Set address on ISA cards then:
67 edit /usr/src/linux/drivers/char/ip2.c if needed 67 edit /usr/src/linux/drivers/char/ip2.c if needed
68 or 68 or
69 edit /etc/modprobe.conf if needed (module). 69 edit config file in /etc/modprobe.d/ if needed (module).
70 or both to match this setting. 70 or both to match this setting.
71d) Run "make modules" 71d) Run "make modules"
72e) Run "make modules_install" 72e) Run "make modules_install"
@@ -153,11 +153,11 @@ the irqs are not specified the driver uses the default in ip2.c (which
153selects polled mode). If no base addresses are specified the defaults in 153selects polled mode). If no base addresses are specified the defaults in
154ip2.c are used. If you are autoloading the driver module with kerneld or 154ip2.c are used. If you are autoloading the driver module with kerneld or
155kmod the base addresses and interrupt number must also be set in ip2.c 155kmod the base addresses and interrupt number must also be set in ip2.c
156and recompile or just insert and options line in /etc/modprobe.conf or both. 156and recompile or just insert and options line in /etc/modprobe.d/*.conf or both.
157The options line is equivalent to the command line and takes precedence over 157The options line is equivalent to the command line and takes precedence over
158what is in ip2.c. 158what is in ip2.c.
159 159
160/etc/modprobe.conf sample: 160config sample to put /etc/modprobe.d/*.conf:
161 options ip2 io=1,0x328 irq=1,10 161 options ip2 io=1,0x328 irq=1,10
162 alias char-major-71 ip2 162 alias char-major-71 ip2
163 alias char-major-72 ip2 163 alias char-major-72 ip2
diff --git a/Documentation/serial/rocket.txt b/Documentation/serial/rocket.txt
index 1d8582990435..60b039891057 100644
--- a/Documentation/serial/rocket.txt
+++ b/Documentation/serial/rocket.txt
@@ -62,7 +62,7 @@ in the system log at /var/log/messages.
62 62
63If installed as a module, the module must be loaded. This can be done 63If installed as a module, the module must be loaded. This can be done
64manually by entering "modprobe rocket". To have the module loaded automatically 64manually by entering "modprobe rocket". To have the module loaded automatically
65upon system boot, edit the /etc/modprobe.conf file and add the line 65upon system boot, edit a /etc/modprobe.d/*.conf file and add the line
66"alias char-major-46 rocket". 66"alias char-major-46 rocket".
67 67
68In order to use the ports, their device names (nodes) must be created with mknod. 68In order to use the ports, their device names (nodes) must be created with mknod.
diff --git a/Documentation/serial/stallion.txt b/Documentation/serial/stallion.txt
index 5c4902d9a5be..55090914a9c5 100644
--- a/Documentation/serial/stallion.txt
+++ b/Documentation/serial/stallion.txt
@@ -139,8 +139,8 @@ secondary address 0x280 and IRQ 10.
139 139
140You will probably want to enter this module load and configuration information 140You will probably want to enter this module load and configuration information
141into your system startup scripts so that the drivers are loaded and configured 141into your system startup scripts so that the drivers are loaded and configured
142on each system boot. Typically the start up script would be something like 142on each system boot. Typically configuration files are put in the
143/etc/modprobe.conf. 143/etc/modprobe.d/ directory.
144 144
145 145
1462.2 STATIC DRIVER CONFIGURATION: 1462.2 STATIC DRIVER CONFIGURATION:
diff --git a/Documentation/sound/alsa/ALSA-Configuration.txt b/Documentation/sound/alsa/ALSA-Configuration.txt
index 936699e4f04b..8c16d50f6cb6 100644
--- a/Documentation/sound/alsa/ALSA-Configuration.txt
+++ b/Documentation/sound/alsa/ALSA-Configuration.txt
@@ -860,7 +860,8 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed.
860 860
861 [Multiple options for each card instance] 861 [Multiple options for each card instance]
862 model - force the model name 862 model - force the model name
863 position_fix - Fix DMA pointer (0 = auto, 1 = use LPIB, 2 = POSBUF) 863 position_fix - Fix DMA pointer (0 = auto, 1 = use LPIB, 2 = POSBUF,
864 3 = VIACOMBO, 4 = COMBO)
864 probe_mask - Bitmask to probe codecs (default = -1, meaning all slots) 865 probe_mask - Bitmask to probe codecs (default = -1, meaning all slots)
865 When the bit 8 (0x100) is set, the lower 8 bits are used 866 When the bit 8 (0x100) is set, the lower 8 bits are used
866 as the "fixed" codec slots; i.e. the driver probes the 867 as the "fixed" codec slots; i.e. the driver probes the
@@ -925,6 +926,11 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed.
925 (Usually SD_LPIB register is more accurate than the 926 (Usually SD_LPIB register is more accurate than the
926 position buffer.) 927 position buffer.)
927 928
929 position_fix=3 is specific to VIA devices. The position
930 of the capture stream is checked from both LPIB and POSBUF
931 values. position_fix=4 is a combination mode, using LPIB
932 for playback and POSBUF for capture.
933
928 NB: If you get many "azx_get_response timeout" messages at 934 NB: If you get many "azx_get_response timeout" messages at
929 loading, it's likely a problem of interrupts (e.g. ACPI irq 935 loading, it's likely a problem of interrupts (e.g. ACPI irq
930 routing). Try to boot with options like "pci=noacpi". Also, you 936 routing). Try to boot with options like "pci=noacpi". Also, you
@@ -1588,7 +1594,7 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed.
1588 1594
1589 Module supports autoprobe a chip. 1595 Module supports autoprobe a chip.
1590 1596
1591 Note: the driver may have problems regarding endianess. 1597 Note: the driver may have problems regarding endianness.
1592 1598
1593 The power-management is supported. 1599 The power-management is supported.
1594 1600
@@ -2038,7 +2044,7 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed.
2038 Install the necessary firmware files in alsa-firmware package. 2044 Install the necessary firmware files in alsa-firmware package.
2039 When no hotplug fw loader is available, you need to load the 2045 When no hotplug fw loader is available, you need to load the
2040 firmware via vxloader utility in alsa-tools package. To invoke 2046 firmware via vxloader utility in alsa-tools package. To invoke
2041 vxloader automatically, add the following to /etc/modprobe.conf 2047 vxloader automatically, add the following to /etc/modprobe.d/alsa.conf
2042 2048
2043 install snd-vx222 /sbin/modprobe --first-time -i snd-vx222 && /usr/bin/vxloader 2049 install snd-vx222 /sbin/modprobe --first-time -i snd-vx222 && /usr/bin/vxloader
2044 2050
@@ -2162,10 +2168,10 @@ corresponds to the card index of ALSA. Usually, define this
2162as the same card module. 2168as the same card module.
2163 2169
2164An example configuration for a single emu10k1 card is like below: 2170An example configuration for a single emu10k1 card is like below:
2165----- /etc/modprobe.conf 2171----- /etc/modprobe.d/alsa.conf
2166alias snd-card-0 snd-emu10k1 2172alias snd-card-0 snd-emu10k1
2167alias sound-slot-0 snd-emu10k1 2173alias sound-slot-0 snd-emu10k1
2168----- /etc/modprobe.conf 2174----- /etc/modprobe.d/alsa.conf
2169 2175
2170The available number of auto-loaded sound cards depends on the module 2176The available number of auto-loaded sound cards depends on the module
2171option "cards_limit" of snd module. As default it's set to 1. 2177option "cards_limit" of snd module. As default it's set to 1.
@@ -2178,7 +2184,7 @@ cards is kept consistent.
2178 2184
2179An example configuration for two sound cards is like below: 2185An example configuration for two sound cards is like below:
2180 2186
2181----- /etc/modprobe.conf 2187----- /etc/modprobe.d/alsa.conf
2182# ALSA portion 2188# ALSA portion
2183options snd cards_limit=2 2189options snd cards_limit=2
2184alias snd-card-0 snd-interwave 2190alias snd-card-0 snd-interwave
@@ -2188,7 +2194,7 @@ options snd-ens1371 index=1
2188# OSS/Free portion 2194# OSS/Free portion
2189alias sound-slot-0 snd-interwave 2195alias sound-slot-0 snd-interwave
2190alias sound-slot-1 snd-ens1371 2196alias sound-slot-1 snd-ens1371
2191----- /etc/modprobe.conf 2197----- /etc/modprobe.d/alsa.conf
2192 2198
2193In this example, the interwave card is always loaded as the first card 2199In this example, the interwave card is always loaded as the first card
2194(index 0) and ens1371 as the second (index 1). 2200(index 0) and ens1371 as the second (index 1).
diff --git a/Documentation/sound/alsa/Audiophile-Usb.txt b/Documentation/sound/alsa/Audiophile-Usb.txt
index a4c53d8961e1..654dd3b694a8 100644
--- a/Documentation/sound/alsa/Audiophile-Usb.txt
+++ b/Documentation/sound/alsa/Audiophile-Usb.txt
@@ -232,7 +232,7 @@ The parameter can be given:
232 # modprobe snd-usb-audio index=1 device_setup=0x09 232 # modprobe snd-usb-audio index=1 device_setup=0x09
233 233
234 * Or while configuring the modules options in your modules configuration file 234 * Or while configuring the modules options in your modules configuration file
235 - For Fedora distributions, edit the /etc/modprobe.conf file: 235 (tipically a .conf file in /etc/modprobe.d/ directory:
236 alias snd-card-1 snd-usb-audio 236 alias snd-card-1 snd-usb-audio
237 options snd-usb-audio index=1 device_setup=0x09 237 options snd-usb-audio index=1 device_setup=0x09
238 238
@@ -253,7 +253,7 @@ CAUTION when initializing the device
253 - first turn off the device 253 - first turn off the device
254 - de-register the snd-usb-audio module (modprobe -r) 254 - de-register the snd-usb-audio module (modprobe -r)
255 - change the device_setup parameter by changing the device_setup 255 - change the device_setup parameter by changing the device_setup
256 option in /etc/modprobe.conf 256 option in /etc/modprobe.d/*.conf
257 - turn on the device 257 - turn on the device
258 * A workaround for this last issue has been applied to kernel 2.6.23, but it may not 258 * A workaround for this last issue has been applied to kernel 2.6.23, but it may not
259 be enough to ensure the 'stability' of the device initialization. 259 be enough to ensure the 'stability' of the device initialization.
diff --git a/Documentation/sound/alsa/HD-Audio-Models.txt b/Documentation/sound/alsa/HD-Audio-Models.txt
index c8c54544abc5..d97d992ced14 100644
--- a/Documentation/sound/alsa/HD-Audio-Models.txt
+++ b/Documentation/sound/alsa/HD-Audio-Models.txt
@@ -8,37 +8,10 @@ ALC880
8 5stack-digout 5-jack in back, 2-jack in front, a SPDIF out 8 5stack-digout 5-jack in back, 2-jack in front, a SPDIF out
9 6stack 6-jack in back, 2-jack in front 9 6stack 6-jack in back, 2-jack in front
10 6stack-digout 6-jack with a SPDIF out 10 6stack-digout 6-jack with a SPDIF out
11 w810 3-jack
12 z71v 3-jack (HP shared SPDIF)
13 asus 3-jack (ASUS Mobo)
14 asus-w1v ASUS W1V
15 asus-dig ASUS with SPDIF out
16 asus-dig2 ASUS with SPDIF out (using GPIO2)
17 uniwill 3-jack
18 fujitsu Fujitsu Laptops (Pi1536)
19 F1734 2-jack
20 lg LG laptop (m1 express dual)
21 lg-lw LG LW20/LW25 laptop
22 tcl TCL S700
23 clevo Clevo laptops (m520G, m665n)
24 medion Medion Rim 2150
25 test for testing/debugging purpose, almost all controls can be
26 adjusted. Appearing only when compiled with
27 $CONFIG_SND_DEBUG=y
28 auto auto-config reading BIOS (default)
29 11
30ALC260 12ALC260
31====== 13======
32 fujitsu Fujitsu S7020 14 N/A
33 acer Acer TravelMate
34 will Will laptops (PB V7900)
35 replacer Replacer 672V
36 favorit100 Maxdata Favorit 100XS
37 basic fixed pin assignment (old default model)
38 test for testing/debugging purpose, almost all controls can
39 adjusted. Appearing only when compiled with
40 $CONFIG_SND_DEBUG=y
41 auto auto-config reading BIOS (default)
42 15
43ALC262 16ALC262
44====== 17======
@@ -70,55 +43,7 @@ ALC680
70 43
71ALC882/883/885/888/889 44ALC882/883/885/888/889
72====================== 45======================
73 3stack-dig 3-jack with SPDIF I/O 46 N/A
74 6stack-dig 6-jack digital with SPDIF I/O
75 arima Arima W820Di1
76 targa Targa T8, MSI-1049 T8
77 asus-a7j ASUS A7J
78 asus-a7m ASUS A7M
79 macpro MacPro support
80 mb5 Macbook 5,1
81 macmini3 Macmini 3,1
82 mba21 Macbook Air 2,1
83 mbp3 Macbook Pro rev3
84 imac24 iMac 24'' with jack detection
85 imac91 iMac 9,1
86 w2jc ASUS W2JC
87 3stack-2ch-dig 3-jack with SPDIF I/O (ALC883)
88 alc883-6stack-dig 6-jack digital with SPDIF I/O (ALC883)
89 3stack-6ch 3-jack 6-channel
90 3stack-6ch-dig 3-jack 6-channel with SPDIF I/O
91 6stack-dig-demo 6-jack digital for Intel demo board
92 acer Acer laptops (Travelmate 3012WTMi, Aspire 5600, etc)
93 acer-aspire Acer Aspire 9810
94 acer-aspire-4930g Acer Aspire 4930G
95 acer-aspire-6530g Acer Aspire 6530G
96 acer-aspire-7730g Acer Aspire 7730G
97 acer-aspire-8930g Acer Aspire 8930G
98 medion Medion Laptops
99 targa-dig Targa/MSI
100 targa-2ch-dig Targa/MSI with 2-channel
101 targa-8ch-dig Targa/MSI with 8-channel (MSI GX620)
102 laptop-eapd 3-jack with SPDIF I/O and EAPD (Clevo M540JE, M550JE)
103 lenovo-101e Lenovo 101E
104 lenovo-nb0763 Lenovo NB0763
105 lenovo-ms7195-dig Lenovo MS7195
106 lenovo-sky Lenovo Sky
107 haier-w66 Haier W66
108 3stack-hp HP machines with 3stack (Lucknow, Samba boards)
109 6stack-dell Dell machines with 6stack (Inspiron 530)
110 mitac Mitac 8252D
111 clevo-m540r Clevo M540R (6ch + digital)
112 clevo-m720 Clevo M720 laptop series
113 fujitsu-pi2515 Fujitsu AMILO Pi2515
114 fujitsu-xa3530 Fujitsu AMILO XA3530
115 3stack-6ch-intel Intel DG33* boards
116 intel-alc889a Intel IbexPeak with ALC889A
117 intel-x58 Intel DX58 with ALC889
118 asus-p5q ASUS P5Q-EM boards
119 mb31 MacBook 3,1
120 sony-vaio-tt Sony VAIO TT
121 auto auto-config reading BIOS (default)
122 47
123ALC861/660 48ALC861/660
124========== 49==========
diff --git a/Documentation/sound/alsa/HD-Audio.txt b/Documentation/sound/alsa/HD-Audio.txt
index 91fee3b45fb8..7813c06a5c71 100644
--- a/Documentation/sound/alsa/HD-Audio.txt
+++ b/Documentation/sound/alsa/HD-Audio.txt
@@ -59,7 +59,12 @@ a case, you can change the default method via `position_fix` option.
59`position_fix=1` means to use LPIB method explicitly. 59`position_fix=1` means to use LPIB method explicitly.
60`position_fix=2` means to use the position-buffer. 60`position_fix=2` means to use the position-buffer.
61`position_fix=3` means to use a combination of both methods, needed 61`position_fix=3` means to use a combination of both methods, needed
62for some VIA and ATI controllers. 0 is the default value for all other 62for some VIA controllers. The capture stream position is corrected
63by comparing both LPIB and position-buffer values.
64`position_fix=4` is another combination available for all controllers,
65and uses LPIB for the playback and the position-buffer for the capture
66streams.
670 is the default value for all other
63controllers, the automatic check and fallback to LPIB as described in 68controllers, the automatic check and fallback to LPIB as described in
64the above. If you get a problem of repeated sounds, this option might 69the above. If you get a problem of repeated sounds, this option might
65help. 70help.
diff --git a/Documentation/sound/alsa/MIXART.txt b/Documentation/sound/alsa/MIXART.txt
index ef42c44fa1f2..4ee35b4fbe4a 100644
--- a/Documentation/sound/alsa/MIXART.txt
+++ b/Documentation/sound/alsa/MIXART.txt
@@ -76,9 +76,9 @@ FIRMWARE
76 when CONFIG_FW_LOADER is set. The mixartloader is necessary only 76 when CONFIG_FW_LOADER is set. The mixartloader is necessary only
77 for older versions or when you build the driver into kernel.] 77 for older versions or when you build the driver into kernel.]
78 78
79For loading the firmware automatically after the module is loaded, use 79For loading the firmware automatically after the module is loaded, use a
80the post-install command. For example, add the following entry to 80install command. For example, add the following entry to
81/etc/modprobe.conf for miXart driver: 81/etc/modprobe.d/mixart.conf for miXart driver:
82 82
83 install snd-mixart /sbin/modprobe --first-time -i snd-mixart && \ 83 install snd-mixart /sbin/modprobe --first-time -i snd-mixart && \
84 /usr/bin/mixartloader 84 /usr/bin/mixartloader
diff --git a/Documentation/sound/alsa/OSS-Emulation.txt b/Documentation/sound/alsa/OSS-Emulation.txt
index 022aaeb0e9dd..152ca2a3f1bd 100644
--- a/Documentation/sound/alsa/OSS-Emulation.txt
+++ b/Documentation/sound/alsa/OSS-Emulation.txt
@@ -19,7 +19,7 @@ the card number and the minor unit number. Usually you don't have to
19define these aliases by yourself. 19define these aliases by yourself.
20 20
21Only necessary step for auto-loading of OSS modules is to define the 21Only necessary step for auto-loading of OSS modules is to define the
22card alias in /etc/modprobe.conf, such as 22card alias in /etc/modprobe.d/alsa.conf, such as
23 23
24 alias sound-slot-0 snd-emu10k1 24 alias sound-slot-0 snd-emu10k1
25 25
diff --git a/Documentation/sound/oss/AudioExcelDSP16 b/Documentation/sound/oss/AudioExcelDSP16
index e0dc0641b480..ea8549faede9 100644
--- a/Documentation/sound/oss/AudioExcelDSP16
+++ b/Documentation/sound/oss/AudioExcelDSP16
@@ -41,7 +41,7 @@ mpu_base I/O base address for activate MPU-401 mode
41 (0x300, 0x310, 0x320 or 0x330) 41 (0x300, 0x310, 0x320 or 0x330)
42mpu_irq MPU-401 irq line (5, 7, 9, 10 or 0) 42mpu_irq MPU-401 irq line (5, 7, 9, 10 or 0)
43 43
44The /etc/modprobe.conf will have lines like this: 44A configuration file in /etc/modprobe.d/ directory will have lines like this:
45 45
46options opl3 io=0x388 46options opl3 io=0x388
47options ad1848 io=0x530 irq=11 dma=3 47options ad1848 io=0x530 irq=11 dma=3
@@ -51,11 +51,11 @@ Where the aedsp16 options are the options for this driver while opl3 and
51ad1848 are the corresponding options for the MSS and OPL3 modules. 51ad1848 are the corresponding options for the MSS and OPL3 modules.
52 52
53Loading MSS and OPL3 needs to pre load the aedsp16 module to set up correctly 53Loading MSS and OPL3 needs to pre load the aedsp16 module to set up correctly
54the sound card. Installation dependencies must be written in the modprobe.conf 54the sound card. Installation dependencies must be written in configuration
55file: 55files under /etc/modprobe.d/ directory:
56 56
57install ad1848 /sbin/modprobe aedsp16 && /sbin/modprobe -i ad1848 57softdep ad1848 pre: aedsp16
58install opl3 /sbin/modprobe aedsp16 && /sbin/modprobe -i opl3 58softdep opl3 pre: aedsp16
59 59
60Then you must load the sound modules stack in this order: 60Then you must load the sound modules stack in this order:
61sound -> aedsp16 -> [ ad1848, opl3 ] 61sound -> aedsp16 -> [ ad1848, opl3 ]
diff --git a/Documentation/sound/oss/CMI8330 b/Documentation/sound/oss/CMI8330
index 9c439f1a6dba..8a5fd1611c6f 100644
--- a/Documentation/sound/oss/CMI8330
+++ b/Documentation/sound/oss/CMI8330
@@ -143,11 +143,10 @@ CONFIG_SOUND_MSS=m
143 143
144 144
145 145
146Alma Chao <elysian@ethereal.torsion.org> suggests the following /etc/modprobe.conf: 146Alma Chao <elysian@ethereal.torsion.org> suggests the following in
147a /etc/modprobe.d/*conf file:
147 148
148alias sound ad1848 149alias sound ad1848
149alias synth0 opl3 150alias synth0 opl3
150options ad1848 io=0x530 irq=7 dma=0 soundpro=1 151options ad1848 io=0x530 irq=7 dma=0 soundpro=1
151options opl3 io=0x388 152options opl3 io=0x388
152
153
diff --git a/Documentation/sound/oss/Introduction b/Documentation/sound/oss/Introduction
index 75d967ff9266..42da2d8fa372 100644
--- a/Documentation/sound/oss/Introduction
+++ b/Documentation/sound/oss/Introduction
@@ -167,8 +167,8 @@ in a file such as /root/soundon.sh.
167MODPROBE: 167MODPROBE:
168========= 168=========
169 169
170If loading via modprobe, these common files are automatically loaded 170If loading via modprobe, these common files are automatically loaded when
171when requested by modprobe. For example, my /etc/modprobe.conf contains: 171requested by modprobe. For example, my /etc/modprobe.d/oss.conf contains:
172 172
173alias sound sb 173alias sound sb
174options sb io=0x240 irq=9 dma=3 dma16=5 mpu_io=0x300 174options sb io=0x240 irq=9 dma=3 dma16=5 mpu_io=0x300
@@ -228,7 +228,7 @@ http://www.opensound.com. Before loading the commercial sound
228driver, you should do the following: 228driver, you should do the following:
229 229
2301. remove sound modules (detailed above) 2301. remove sound modules (detailed above)
2312. remove the sound modules from /etc/modprobe.conf 2312. remove the sound modules from /etc/modprobe.d/*.conf
2323. move the sound modules from /lib/modules/<kernel>/misc 2323. move the sound modules from /lib/modules/<kernel>/misc
233 (for example, I make a /lib/modules/<kernel>/misc/tmp 233 (for example, I make a /lib/modules/<kernel>/misc/tmp
234 directory and copy the sound module files to that 234 directory and copy the sound module files to that
@@ -265,7 +265,7 @@ twice, you need to do the following:
265 sb.o could be copied (or symlinked) to sb1.o for the 265 sb.o could be copied (or symlinked) to sb1.o for the
266 second SoundBlaster. 266 second SoundBlaster.
267 267
2682. Make a second entry in /etc/modprobe.conf, for example, 2682. Make a second entry in /etc/modprobe.d/*conf, for example,
269 sound1 or sb1. This second entry should refer to the 269 sound1 or sb1. This second entry should refer to the
270 new module names for example sb1, and should include 270 new module names for example sb1, and should include
271 the I/O, etc. for the second sound card. 271 the I/O, etc. for the second sound card.
@@ -369,7 +369,7 @@ There are several ways of configuring your sound:
3692) On the command line when using insmod or in a bash script 3692) On the command line when using insmod or in a bash script
370 using command line calls to load sound. 370 using command line calls to load sound.
371 371
3723) In /etc/modprobe.conf when using modprobe. 3723) In /etc/modprobe.d/*conf when using modprobe.
373 373
3744) Via Red Hat's GPL'd /usr/sbin/sndconfig program (text based). 3744) Via Red Hat's GPL'd /usr/sbin/sndconfig program (text based).
375 375
diff --git a/Documentation/sound/oss/Opti b/Documentation/sound/oss/Opti
index c15af3c07d46..4cd5d9ab3580 100644
--- a/Documentation/sound/oss/Opti
+++ b/Documentation/sound/oss/Opti
@@ -18,7 +18,7 @@ force the card into a mode in which it can be programmed.
18If you have another OS installed on your computer it is recommended 18If you have another OS installed on your computer it is recommended
19that Linux and the other OS use the same resources. 19that Linux and the other OS use the same resources.
20 20
21Also, it is recommended that resources specified in /etc/modprobe.conf 21Also, it is recommended that resources specified in /etc/modprobe.d/*.conf
22and resources specified in /etc/isapnp.conf agree. 22and resources specified in /etc/isapnp.conf agree.
23 23
24Compiling the sound driver 24Compiling the sound driver
@@ -67,11 +67,7 @@ address is hard-coded into the driver.
67 67
68Using kmod and autoloading the sound driver 68Using kmod and autoloading the sound driver
69------------------------------------------- 69-------------------------------------------
70Comment: as of linux-2.1.90 kmod is replacing kerneld. 70Config files in '/etc/modprobe.d/' are used as below:
71The config file '/etc/modprobe.conf' is used as before.
72
73This is the sound part of my /etc/modprobe.conf file.
74Following that I will explain each line.
75 71
76alias mixer0 mad16 72alias mixer0 mad16
77alias audio0 mad16 73alias audio0 mad16
diff --git a/Documentation/sound/oss/PAS16 b/Documentation/sound/oss/PAS16
index 3dca4b75988e..5c27229eec8c 100644
--- a/Documentation/sound/oss/PAS16
+++ b/Documentation/sound/oss/PAS16
@@ -128,7 +128,7 @@ CONFIG_SOUND_YM3812
128 You can then get OPL3 functionality by issuing the command: 128 You can then get OPL3 functionality by issuing the command:
129 insmod opl3 129 insmod opl3
130 In addition, you must either add the following line to 130 In addition, you must either add the following line to
131 /etc/modprobe.conf: 131 /etc/modprobe.d/*.conf:
132 options opl3 io=0x388 132 options opl3 io=0x388
133 or else add the following line to /etc/lilo.conf: 133 or else add the following line to /etc/lilo.conf:
134 opl3=0x388 134 opl3=0x388
@@ -158,5 +158,5 @@ following line would be appropriate:
158append="pas2=0x388,10,3,-1,0,-1,-1,-1 opl3=0x388" 158append="pas2=0x388,10,3,-1,0,-1,-1,-1 opl3=0x388"
159 159
160If sound is built totally modular, the above options may be 160If sound is built totally modular, the above options may be
161specified in /etc/modprobe.conf for pas2, sb and opl3 161specified in /etc/modprobe.d/*.conf for pas2, sb and opl3
162respectively. 162respectively.
diff --git a/Documentation/sound/oss/README.modules b/Documentation/sound/oss/README.modules
index e691d74e1e5e..cdc039421a46 100644
--- a/Documentation/sound/oss/README.modules
+++ b/Documentation/sound/oss/README.modules
@@ -26,7 +26,7 @@ Note that it is no longer necessary or possible to configure sound in the
26drivers/sound dir. Now one simply configures and makes one's kernel and 26drivers/sound dir. Now one simply configures and makes one's kernel and
27modules in the usual way. 27modules in the usual way.
28 28
29 Then, add to your /etc/modprobe.conf something like: 29 Then, add to your /etc/modprobe.d/oss.conf something like:
30 30
31alias char-major-14-* sb 31alias char-major-14-* sb
32install sb /sbin/modprobe -i sb && /sbin/modprobe adlib_card 32install sb /sbin/modprobe -i sb && /sbin/modprobe adlib_card
@@ -36,7 +36,7 @@ options adlib_card io=0x388 # FM synthesizer
36 Alternatively, if you have compiled in kernel level ISAPnP support: 36 Alternatively, if you have compiled in kernel level ISAPnP support:
37 37
38alias char-major-14 sb 38alias char-major-14 sb
39post-install sb /sbin/modprobe "-k" "adlib_card" 39softdep sb post: adlib_card
40options adlib_card io=0x388 40options adlib_card io=0x388
41 41
42 The effect of this is that the sound driver and all necessary bits and 42 The effect of this is that the sound driver and all necessary bits and
@@ -66,12 +66,12 @@ args are expected.
66 Note that at present there is no way to configure the io, irq and other 66 Note that at present there is no way to configure the io, irq and other
67parameters for the modular drivers as one does for the wired drivers.. One 67parameters for the modular drivers as one does for the wired drivers.. One
68needs to pass the modules the necessary parameters as arguments, either 68needs to pass the modules the necessary parameters as arguments, either
69with /etc/modprobe.conf or with command-line args to modprobe, e.g. 69with /etc/modprobe.d/*.conf or with command-line args to modprobe, e.g.
70 70
71modprobe sb io=0x220 irq=7 dma=1 dma16=5 mpu_io=0x330 71modprobe sb io=0x220 irq=7 dma=1 dma16=5 mpu_io=0x330
72modprobe adlib_card io=0x388 72modprobe adlib_card io=0x388
73 73
74 recommend using /etc/modprobe.conf. 74 recommend using /etc/modprobe.d/*.conf.
75 75
76Persistent DMA Buffers: 76Persistent DMA Buffers:
77 77
@@ -89,7 +89,7 @@ wasteful of RAM, but it guarantees that sound always works.
89 89
90To make the sound driver use persistent DMA buffers we need to pass the 90To make the sound driver use persistent DMA buffers we need to pass the
91sound.o module a "dmabuf=1" command-line argument. This is normally done 91sound.o module a "dmabuf=1" command-line argument. This is normally done
92in /etc/modprobe.conf like so: 92in /etc/modprobe.d/*.conf files like so:
93 93
94options sound dmabuf=1 94options sound dmabuf=1
95 95
diff --git a/Documentation/spi/spi-summary b/Documentation/spi/spi-summary
index 4884cb33845d..7312ec14dd89 100644
--- a/Documentation/spi/spi-summary
+++ b/Documentation/spi/spi-summary
@@ -1,7 +1,7 @@
1Overview of Linux kernel SPI support 1Overview of Linux kernel SPI support
2==================================== 2====================================
3 3
421-May-2007 402-Feb-2012
5 5
6What is SPI? 6What is SPI?
7------------ 7------------
@@ -483,9 +483,9 @@ also initialize its own internal state. (See below about bus numbering
483and those methods.) 483and those methods.)
484 484
485After you initialize the spi_master, then use spi_register_master() to 485After you initialize the spi_master, then use spi_register_master() to
486publish it to the rest of the system. At that time, device nodes for 486publish it to the rest of the system. At that time, device nodes for the
487the controller and any predeclared spi devices will be made available, 487controller and any predeclared spi devices will be made available, and
488and the driver model core will take care of binding them to drivers. 488the driver model core will take care of binding them to drivers.
489 489
490If you need to remove your SPI controller driver, spi_unregister_master() 490If you need to remove your SPI controller driver, spi_unregister_master()
491will reverse the effect of spi_register_master(). 491will reverse the effect of spi_register_master().
@@ -521,21 +521,53 @@ SPI MASTER METHODS
521 ** When you code setup(), ASSUME that the controller 521 ** When you code setup(), ASSUME that the controller
522 ** is actively processing transfers for another device. 522 ** is actively processing transfers for another device.
523 523
524 master->transfer(struct spi_device *spi, struct spi_message *message)
525 This must not sleep. Its responsibility is arrange that the
526 transfer happens and its complete() callback is issued. The two
527 will normally happen later, after other transfers complete, and
528 if the controller is idle it will need to be kickstarted.
529
530 master->cleanup(struct spi_device *spi) 524 master->cleanup(struct spi_device *spi)
531 Your controller driver may use spi_device.controller_state to hold 525 Your controller driver may use spi_device.controller_state to hold
532 state it dynamically associates with that device. If you do that, 526 state it dynamically associates with that device. If you do that,
533 be sure to provide the cleanup() method to free that state. 527 be sure to provide the cleanup() method to free that state.
534 528
529 master->prepare_transfer_hardware(struct spi_master *master)
530 This will be called by the queue mechanism to signal to the driver
531 that a message is coming in soon, so the subsystem requests the
532 driver to prepare the transfer hardware by issuing this call.
533 This may sleep.
534
535 master->unprepare_transfer_hardware(struct spi_master *master)
536 This will be called by the queue mechanism to signal to the driver
537 that there are no more messages pending in the queue and it may
538 relax the hardware (e.g. by power management calls). This may sleep.
539
540 master->transfer_one_message(struct spi_master *master,
541 struct spi_message *mesg)
542 The subsystem calls the driver to transfer a single message while
543 queuing transfers that arrive in the meantime. When the driver is
544 finished with this message, it must call
545 spi_finalize_current_message() so the subsystem can issue the next
546 transfer. This may sleep.
547
548 DEPRECATED METHODS
549
550 master->transfer(struct spi_device *spi, struct spi_message *message)
551 This must not sleep. Its responsibility is arrange that the
552 transfer happens and its complete() callback is issued. The two
553 will normally happen later, after other transfers complete, and
554 if the controller is idle it will need to be kickstarted. This
555 method is not used on queued controllers and must be NULL if
556 transfer_one_message() and (un)prepare_transfer_hardware() are
557 implemented.
558
535 559
536SPI MESSAGE QUEUE 560SPI MESSAGE QUEUE
537 561
538The bulk of the driver will be managing the I/O queue fed by transfer(). 562If you are happy with the standard queueing mechanism provided by the
563SPI subsystem, just implement the queued methods specified above. Using
564the message queue has the upside of centralizing a lot of code and
565providing pure process-context execution of methods. The message queue
566can also be elevated to realtime priority on high-priority SPI traffic.
567
568Unless the queueing mechanism in the SPI subsystem is selected, the bulk
569of the driver will be managing the I/O queue fed by the now deprecated
570function transfer().
539 571
540That queue could be purely conceptual. For example, a driver used only 572That queue could be purely conceptual. For example, a driver used only
541for low-frequency sensor access might be fine using synchronous PIO. 573for low-frequency sensor access might be fine using synchronous PIO.
@@ -561,4 +593,6 @@ Stephen Street
561Mark Underwood 593Mark Underwood
562Andrew Victor 594Andrew Victor
563Vitaly Wool 595Vitaly Wool
564 596Grant Likely
597Mark Brown
598Linus Walleij
diff --git a/Documentation/static-keys.txt b/Documentation/static-keys.txt
new file mode 100644
index 000000000000..d93f3c00f245
--- /dev/null
+++ b/Documentation/static-keys.txt
@@ -0,0 +1,286 @@
1 Static Keys
2 -----------
3
4By: Jason Baron <jbaron@redhat.com>
5
60) Abstract
7
8Static keys allows the inclusion of seldom used features in
9performance-sensitive fast-path kernel code, via a GCC feature and a code
10patching technique. A quick example:
11
12 struct static_key key = STATIC_KEY_INIT_FALSE;
13
14 ...
15
16 if (static_key_false(&key))
17 do unlikely code
18 else
19 do likely code
20
21 ...
22 static_key_slow_inc();
23 ...
24 static_key_slow_inc();
25 ...
26
27The static_key_false() branch will be generated into the code with as little
28impact to the likely code path as possible.
29
30
311) Motivation
32
33
34Currently, tracepoints are implemented using a conditional branch. The
35conditional check requires checking a global variable for each tracepoint.
36Although the overhead of this check is small, it increases when the memory
37cache comes under pressure (memory cache lines for these global variables may
38be shared with other memory accesses). As we increase the number of tracepoints
39in the kernel this overhead may become more of an issue. In addition,
40tracepoints are often dormant (disabled) and provide no direct kernel
41functionality. Thus, it is highly desirable to reduce their impact as much as
42possible. Although tracepoints are the original motivation for this work, other
43kernel code paths should be able to make use of the static keys facility.
44
45
462) Solution
47
48
49gcc (v4.5) adds a new 'asm goto' statement that allows branching to a label:
50
51http://gcc.gnu.org/ml/gcc-patches/2009-07/msg01556.html
52
53Using the 'asm goto', we can create branches that are either taken or not taken
54by default, without the need to check memory. Then, at run-time, we can patch
55the branch site to change the branch direction.
56
57For example, if we have a simple branch that is disabled by default:
58
59 if (static_key_false(&key))
60 printk("I am the true branch\n");
61
62Thus, by default the 'printk' will not be emitted. And the code generated will
63consist of a single atomic 'no-op' instruction (5 bytes on x86), in the
64straight-line code path. When the branch is 'flipped', we will patch the
65'no-op' in the straight-line codepath with a 'jump' instruction to the
66out-of-line true branch. Thus, changing branch direction is expensive but
67branch selection is basically 'free'. That is the basic tradeoff of this
68optimization.
69
70This lowlevel patching mechanism is called 'jump label patching', and it gives
71the basis for the static keys facility.
72
733) Static key label API, usage and examples:
74
75
76In order to make use of this optimization you must first define a key:
77
78 struct static_key key;
79
80Which is initialized as:
81
82 struct static_key key = STATIC_KEY_INIT_TRUE;
83
84or:
85
86 struct static_key key = STATIC_KEY_INIT_FALSE;
87
88If the key is not initialized, it is default false. The 'struct static_key',
89must be a 'global'. That is, it can't be allocated on the stack or dynamically
90allocated at run-time.
91
92The key is then used in code as:
93
94 if (static_key_false(&key))
95 do unlikely code
96 else
97 do likely code
98
99Or:
100
101 if (static_key_true(&key))
102 do likely code
103 else
104 do unlikely code
105
106A key that is initialized via 'STATIC_KEY_INIT_FALSE', must be used in a
107'static_key_false()' construct. Likewise, a key initialized via
108'STATIC_KEY_INIT_TRUE' must be used in a 'static_key_true()' construct. A
109single key can be used in many branches, but all the branches must match the
110way that the key has been initialized.
111
112The branch(es) can then be switched via:
113
114 static_key_slow_inc(&key);
115 ...
116 static_key_slow_dec(&key);
117
118Thus, 'static_key_slow_inc()' means 'make the branch true', and
119'static_key_slow_dec()' means 'make the the branch false' with appropriate
120reference counting. For example, if the key is initialized true, a
121static_key_slow_dec(), will switch the branch to false. And a subsequent
122static_key_slow_inc(), will change the branch back to true. Likewise, if the
123key is initialized false, a 'static_key_slow_inc()', will change the branch to
124true. And then a 'static_key_slow_dec()', will again make the branch false.
125
126An example usage in the kernel is the implementation of tracepoints:
127
128 static inline void trace_##name(proto) \
129 { \
130 if (static_key_false(&__tracepoint_##name.key)) \
131 __DO_TRACE(&__tracepoint_##name, \
132 TP_PROTO(data_proto), \
133 TP_ARGS(data_args), \
134 TP_CONDITION(cond)); \
135 }
136
137Tracepoints are disabled by default, and can be placed in performance critical
138pieces of the kernel. Thus, by using a static key, the tracepoints can have
139absolutely minimal impact when not in use.
140
141
1424) Architecture level code patching interface, 'jump labels'
143
144
145There are a few functions and macros that architectures must implement in order
146to take advantage of this optimization. If there is no architecture support, we
147simply fall back to a traditional, load, test, and jump sequence.
148
149* select HAVE_ARCH_JUMP_LABEL, see: arch/x86/Kconfig
150
151* #define JUMP_LABEL_NOP_SIZE, see: arch/x86/include/asm/jump_label.h
152
153* __always_inline bool arch_static_branch(struct static_key *key), see:
154 arch/x86/include/asm/jump_label.h
155
156* void arch_jump_label_transform(struct jump_entry *entry, enum jump_label_type type),
157 see: arch/x86/kernel/jump_label.c
158
159* __init_or_module void arch_jump_label_transform_static(struct jump_entry *entry, enum jump_label_type type),
160 see: arch/x86/kernel/jump_label.c
161
162
163* struct jump_entry, see: arch/x86/include/asm/jump_label.h
164
165
1665) Static keys / jump label analysis, results (x86_64):
167
168
169As an example, let's add the following branch to 'getppid()', such that the
170system call now looks like:
171
172SYSCALL_DEFINE0(getppid)
173{
174 int pid;
175
176+ if (static_key_false(&key))
177+ printk("I am the true branch\n");
178
179 rcu_read_lock();
180 pid = task_tgid_vnr(rcu_dereference(current->real_parent));
181 rcu_read_unlock();
182
183 return pid;
184}
185
186The resulting instructions with jump labels generated by GCC is:
187
188ffffffff81044290 <sys_getppid>:
189ffffffff81044290: 55 push %rbp
190ffffffff81044291: 48 89 e5 mov %rsp,%rbp
191ffffffff81044294: e9 00 00 00 00 jmpq ffffffff81044299 <sys_getppid+0x9>
192ffffffff81044299: 65 48 8b 04 25 c0 b6 mov %gs:0xb6c0,%rax
193ffffffff810442a0: 00 00
194ffffffff810442a2: 48 8b 80 80 02 00 00 mov 0x280(%rax),%rax
195ffffffff810442a9: 48 8b 80 b0 02 00 00 mov 0x2b0(%rax),%rax
196ffffffff810442b0: 48 8b b8 e8 02 00 00 mov 0x2e8(%rax),%rdi
197ffffffff810442b7: e8 f4 d9 00 00 callq ffffffff81051cb0 <pid_vnr>
198ffffffff810442bc: 5d pop %rbp
199ffffffff810442bd: 48 98 cltq
200ffffffff810442bf: c3 retq
201ffffffff810442c0: 48 c7 c7 e3 54 98 81 mov $0xffffffff819854e3,%rdi
202ffffffff810442c7: 31 c0 xor %eax,%eax
203ffffffff810442c9: e8 71 13 6d 00 callq ffffffff8171563f <printk>
204ffffffff810442ce: eb c9 jmp ffffffff81044299 <sys_getppid+0x9>
205
206Without the jump label optimization it looks like:
207
208ffffffff810441f0 <sys_getppid>:
209ffffffff810441f0: 8b 05 8a 52 d8 00 mov 0xd8528a(%rip),%eax # ffffffff81dc9480 <key>
210ffffffff810441f6: 55 push %rbp
211ffffffff810441f7: 48 89 e5 mov %rsp,%rbp
212ffffffff810441fa: 85 c0 test %eax,%eax
213ffffffff810441fc: 75 27 jne ffffffff81044225 <sys_getppid+0x35>
214ffffffff810441fe: 65 48 8b 04 25 c0 b6 mov %gs:0xb6c0,%rax
215ffffffff81044205: 00 00
216ffffffff81044207: 48 8b 80 80 02 00 00 mov 0x280(%rax),%rax
217ffffffff8104420e: 48 8b 80 b0 02 00 00 mov 0x2b0(%rax),%rax
218ffffffff81044215: 48 8b b8 e8 02 00 00 mov 0x2e8(%rax),%rdi
219ffffffff8104421c: e8 2f da 00 00 callq ffffffff81051c50 <pid_vnr>
220ffffffff81044221: 5d pop %rbp
221ffffffff81044222: 48 98 cltq
222ffffffff81044224: c3 retq
223ffffffff81044225: 48 c7 c7 13 53 98 81 mov $0xffffffff81985313,%rdi
224ffffffff8104422c: 31 c0 xor %eax,%eax
225ffffffff8104422e: e8 60 0f 6d 00 callq ffffffff81715193 <printk>
226ffffffff81044233: eb c9 jmp ffffffff810441fe <sys_getppid+0xe>
227ffffffff81044235: 66 66 2e 0f 1f 84 00 data32 nopw %cs:0x0(%rax,%rax,1)
228ffffffff8104423c: 00 00 00 00
229
230Thus, the disable jump label case adds a 'mov', 'test' and 'jne' instruction
231vs. the jump label case just has a 'no-op' or 'jmp 0'. (The jmp 0, is patched
232to a 5 byte atomic no-op instruction at boot-time.) Thus, the disabled jump
233label case adds:
234
2356 (mov) + 2 (test) + 2 (jne) = 10 - 5 (5 byte jump 0) = 5 addition bytes.
236
237If we then include the padding bytes, the jump label code saves, 16 total bytes
238of instruction memory for this small fucntion. In this case the non-jump label
239function is 80 bytes long. Thus, we have have saved 20% of the instruction
240footprint. We can in fact improve this even further, since the 5-byte no-op
241really can be a 2-byte no-op since we can reach the branch with a 2-byte jmp.
242However, we have not yet implemented optimal no-op sizes (they are currently
243hard-coded).
244
245Since there are a number of static key API uses in the scheduler paths,
246'pipe-test' (also known as 'perf bench sched pipe') can be used to show the
247performance improvement. Testing done on 3.3.0-rc2:
248
249jump label disabled:
250
251 Performance counter stats for 'bash -c /tmp/pipe-test' (50 runs):
252
253 855.700314 task-clock # 0.534 CPUs utilized ( +- 0.11% )
254 200,003 context-switches # 0.234 M/sec ( +- 0.00% )
255 0 CPU-migrations # 0.000 M/sec ( +- 39.58% )
256 487 page-faults # 0.001 M/sec ( +- 0.02% )
257 1,474,374,262 cycles # 1.723 GHz ( +- 0.17% )
258 <not supported> stalled-cycles-frontend
259 <not supported> stalled-cycles-backend
260 1,178,049,567 instructions # 0.80 insns per cycle ( +- 0.06% )
261 208,368,926 branches # 243.507 M/sec ( +- 0.06% )
262 5,569,188 branch-misses # 2.67% of all branches ( +- 0.54% )
263
264 1.601607384 seconds time elapsed ( +- 0.07% )
265
266jump label enabled:
267
268 Performance counter stats for 'bash -c /tmp/pipe-test' (50 runs):
269
270 841.043185 task-clock # 0.533 CPUs utilized ( +- 0.12% )
271 200,004 context-switches # 0.238 M/sec ( +- 0.00% )
272 0 CPU-migrations # 0.000 M/sec ( +- 40.87% )
273 487 page-faults # 0.001 M/sec ( +- 0.05% )
274 1,432,559,428 cycles # 1.703 GHz ( +- 0.18% )
275 <not supported> stalled-cycles-frontend
276 <not supported> stalled-cycles-backend
277 1,175,363,994 instructions # 0.82 insns per cycle ( +- 0.04% )
278 206,859,359 branches # 245.956 M/sec ( +- 0.04% )
279 4,884,119 branch-misses # 2.36% of all branches ( +- 0.85% )
280
281 1.579384366 seconds time elapsed
282
283The percentage of saved branches is .7%, and we've saved 12% on
284'branch-misses'. This is where we would expect to get the most savings, since
285this optimization is about reducing the number of branches. In addition, we've
286saved .2% on instructions, and 2.8% on cycles and 1.4% on elapsed time.
diff --git a/Documentation/sysrq.txt b/Documentation/sysrq.txt
index 312e3754e8c5..642f84495b29 100644
--- a/Documentation/sysrq.txt
+++ b/Documentation/sysrq.txt
@@ -241,9 +241,8 @@ command you are interested in.
241 241
242* I have more questions, who can I ask? 242* I have more questions, who can I ask?
243~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 243~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
244And I'll answer any questions about the registration system you got, also 244Just ask them on the linux-kernel mailing list:
245responding as soon as possible. 245 linux-kernel@vger.kernel.org
246 -Crutcher
247 246
248* Credits 247* Credits
249~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 248~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
diff --git a/Documentation/target/tcm_mod_builder.py b/Documentation/target/tcm_mod_builder.py
index 6e21b8b52638..a78879b01f09 100755
--- a/Documentation/target/tcm_mod_builder.py
+++ b/Documentation/target/tcm_mod_builder.py
@@ -775,7 +775,7 @@ def tcm_mod_dump_fabric_ops(proto_ident, fabric_mod_dir_var, fabric_mod_name):
775 buf += " struct " + fabric_mod_name + "_nacl *nacl;\n\n" 775 buf += " struct " + fabric_mod_name + "_nacl *nacl;\n\n"
776 buf += " nacl = kzalloc(sizeof(struct " + fabric_mod_name + "_nacl), GFP_KERNEL);\n" 776 buf += " nacl = kzalloc(sizeof(struct " + fabric_mod_name + "_nacl), GFP_KERNEL);\n"
777 buf += " if (!nacl) {\n" 777 buf += " if (!nacl) {\n"
778 buf += " printk(KERN_ERR \"Unable to alocate struct " + fabric_mod_name + "_nacl\\n\");\n" 778 buf += " printk(KERN_ERR \"Unable to allocate struct " + fabric_mod_name + "_nacl\\n\");\n"
779 buf += " return NULL;\n" 779 buf += " return NULL;\n"
780 buf += " }\n\n" 780 buf += " }\n\n"
781 buf += " return &nacl->se_node_acl;\n" 781 buf += " return &nacl->se_node_acl;\n"
diff --git a/Documentation/trace/events-power.txt b/Documentation/trace/events-power.txt
index 96d87b67fe37..cf794af22855 100644
--- a/Documentation/trace/events-power.txt
+++ b/Documentation/trace/events-power.txt
@@ -57,7 +57,7 @@ power_end "cpu_id=%lu"
57The 'type' parameter takes one of those macros: 57The 'type' parameter takes one of those macros:
58 . POWER_NONE = 0, 58 . POWER_NONE = 0,
59 . POWER_CSTATE = 1, /* C-State */ 59 . POWER_CSTATE = 1, /* C-State */
60 . POWER_PSTATE = 2, /* Fequency change or DVFS */ 60 . POWER_PSTATE = 2, /* Frequency change or DVFS */
61 61
62The 'state' parameter is set depending on the type: 62The 'state' parameter is set depending on the type:
63 . Target C-state for type=POWER_CSTATE, 63 . Target C-state for type=POWER_CSTATE,
diff --git a/Documentation/trace/ftrace.txt b/Documentation/trace/ftrace.txt
index 1ebc24cf9a55..6f51fed45f2d 100644
--- a/Documentation/trace/ftrace.txt
+++ b/Documentation/trace/ftrace.txt
@@ -226,6 +226,13 @@ Here is the list of current tracers that may be configured.
226 Traces and records the max latency that it takes for 226 Traces and records the max latency that it takes for
227 the highest priority task to get scheduled after 227 the highest priority task to get scheduled after
228 it has been woken up. 228 it has been woken up.
229 Traces all tasks as an average developer would expect.
230
231 "wakeup_rt"
232
233 Traces and records the max latency that it takes for just
234 RT tasks (as the current "wakeup" does). This is useful
235 for those interested in wake up timings of RT tasks.
229 236
230 "hw-branch-tracer" 237 "hw-branch-tracer"
231 238
diff --git a/Documentation/usb/mtouchusb.txt b/Documentation/usb/mtouchusb.txt
index 86302cd53ed3..a91adb26ea7b 100644
--- a/Documentation/usb/mtouchusb.txt
+++ b/Documentation/usb/mtouchusb.txt
@@ -1,7 +1,7 @@
1CHANGES 1CHANGES
2 2
3- 0.3 - Created based off of scanner & INSTALL from the original touchscreen 3- 0.3 - Created based off of scanner & INSTALL from the original touchscreen
4 driver on freshmeat (http://freshmeat.net/projects/3mtouchscreendriver) 4 driver on freecode (http://freecode.com/projects/3mtouchscreendriver)
5- Amended for linux-2.4.18, then 2.4.19 5- Amended for linux-2.4.18, then 2.4.19
6 6
7- 0.5 - Complete rewrite using Linux Input in 2.6.3 7- 0.5 - Complete rewrite using Linux Input in 2.6.3
diff --git a/Documentation/usb/power-management.txt b/Documentation/usb/power-management.txt
index 12511c98cc4f..4204eb01fd38 100644
--- a/Documentation/usb/power-management.txt
+++ b/Documentation/usb/power-management.txt
@@ -179,7 +179,8 @@ do:
179 179
180 modprobe usbcore autosuspend=5 180 modprobe usbcore autosuspend=5
181 181
182Equivalently, you could add to /etc/modprobe.conf a line saying: 182Equivalently, you could add to a configuration file in /etc/modprobe.d
183a line saying:
183 184
184 options usbcore autosuspend=5 185 options usbcore autosuspend=5
185 186
@@ -345,7 +346,7 @@ autosuspend the device.
345Drivers need not be concerned about balancing changes to the usage 346Drivers need not be concerned about balancing changes to the usage
346counter; the USB core will undo any remaining "get"s when a driver 347counter; the USB core will undo any remaining "get"s when a driver
347is unbound from its interface. As a corollary, drivers must not call 348is unbound from its interface. As a corollary, drivers must not call
348any of the usb_autopm_* functions after their diconnect() routine has 349any of the usb_autopm_* functions after their disconnect() routine has
349returned. 350returned.
350 351
351Drivers using the async routines are responsible for their own 352Drivers using the async routines are responsible for their own
diff --git a/Documentation/usb/proc_usb_info.txt b/Documentation/usb/proc_usb_info.txt
index afe596d5f201..c9c3f0f5ad7b 100644
--- a/Documentation/usb/proc_usb_info.txt
+++ b/Documentation/usb/proc_usb_info.txt
@@ -7,7 +7,7 @@ The usbfs filesystem for USB devices is traditionally mounted at
7/proc/bus/usb. It provides the /proc/bus/usb/devices file, as well as 7/proc/bus/usb. It provides the /proc/bus/usb/devices file, as well as
8the /proc/bus/usb/BBB/DDD files. 8the /proc/bus/usb/BBB/DDD files.
9 9
10In many modern systems the usbfs filsystem isn't used at all. Instead 10In many modern systems the usbfs filesystem isn't used at all. Instead
11USB device nodes are created under /dev/usb/ or someplace similar. The 11USB device nodes are created under /dev/usb/ or someplace similar. The
12"devices" file is available in debugfs, typically as 12"devices" file is available in debugfs, typically as
13/sys/kernel/debug/usb/devices. 13/sys/kernel/debug/usb/devices.
diff --git a/Documentation/video4linux/CARDLIST.cx23885 b/Documentation/video4linux/CARDLIST.cx23885
index 23584d0c6a75..f316d1816fcd 100644
--- a/Documentation/video4linux/CARDLIST.cx23885
+++ b/Documentation/video4linux/CARDLIST.cx23885
@@ -32,3 +32,4 @@
32 31 -> Leadtek Winfast PxDVR3200 H XC4000 [107d:6f39] 32 31 -> Leadtek Winfast PxDVR3200 H XC4000 [107d:6f39]
33 32 -> MPX-885 33 32 -> MPX-885
34 33 -> Mygica X8507 [14f1:8502] 34 33 -> Mygica X8507 [14f1:8502]
35 34 -> TerraTec Cinergy T PCIe Dual [153b:117e]
diff --git a/Documentation/video4linux/CARDLIST.cx88 b/Documentation/video4linux/CARDLIST.cx88
index eee18e6962b6..fa4b3f947468 100644
--- a/Documentation/video4linux/CARDLIST.cx88
+++ b/Documentation/video4linux/CARDLIST.cx88
@@ -59,7 +59,7 @@
59 58 -> Pinnacle PCTV HD 800i [11bd:0051] 59 58 -> Pinnacle PCTV HD 800i [11bd:0051]
60 59 -> DViCO FusionHDTV 5 PCI nano [18ac:d530] 60 59 -> DViCO FusionHDTV 5 PCI nano [18ac:d530]
61 60 -> Pinnacle Hybrid PCTV [12ab:1788] 61 60 -> Pinnacle Hybrid PCTV [12ab:1788]
62 61 -> Leadtek TV2000 XP Global [107d:6f18,107d:6618] 62 61 -> Leadtek TV2000 XP Global [107d:6f18,107d:6618,107d:6619]
63 62 -> PowerColor RA330 [14f1:ea3d] 63 62 -> PowerColor RA330 [14f1:ea3d]
64 63 -> Geniatech X8000-MT DVBT [14f1:8852] 64 63 -> Geniatech X8000-MT DVBT [14f1:8852]
65 64 -> DViCO FusionHDTV DVB-T PRO [18ac:db30] 65 64 -> DViCO FusionHDTV DVB-T PRO [18ac:db30]
@@ -87,3 +87,5 @@
87 86 -> TeVii S464 DVB-S/S2 [d464:9022] 87 86 -> TeVii S464 DVB-S/S2 [d464:9022]
88 87 -> Leadtek WinFast DTV2000 H PLUS [107d:6f42] 88 87 -> Leadtek WinFast DTV2000 H PLUS [107d:6f42]
89 88 -> Leadtek WinFast DTV1800 H (XC4000) [107d:6f38] 89 88 -> Leadtek WinFast DTV1800 H (XC4000) [107d:6f38]
90 89 -> Leadtek TV2000 XP Global (SC4100) [107d:6f36]
91 90 -> Leadtek TV2000 XP Global (XC4100) [107d:6f43]
diff --git a/Documentation/video4linux/CARDLIST.em28xx b/Documentation/video4linux/CARDLIST.em28xx
index e7be3ac49ead..d99262dda533 100644
--- a/Documentation/video4linux/CARDLIST.em28xx
+++ b/Documentation/video4linux/CARDLIST.em28xx
@@ -7,7 +7,7 @@
7 6 -> Terratec Cinergy 200 USB (em2800) 7 6 -> Terratec Cinergy 200 USB (em2800)
8 7 -> Leadtek Winfast USB II (em2800) [0413:6023] 8 7 -> Leadtek Winfast USB II (em2800) [0413:6023]
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,093b:a003]
11 10 -> Hauppauge WinTV HVR 900 (em2880) [2040:6500] 11 10 -> Hauppauge WinTV HVR 900 (em2880) [2040:6500]
12 11 -> Terratec Hybrid XS (em2880) 12 11 -> Terratec Hybrid XS (em2880)
13 12 -> Kworld PVR TV 2800 RF (em2820/em2840) 13 12 -> Kworld PVR TV 2800 RF (em2820/em2840)
@@ -61,7 +61,7 @@
61 61 -> Pixelview PlayTV Box 4 USB 2.0 (em2820/em2840) 61 61 -> Pixelview PlayTV Box 4 USB 2.0 (em2820/em2840)
62 62 -> Gadmei TVR200 (em2820/em2840) 62 62 -> Gadmei TVR200 (em2820/em2840)
63 63 -> Kaiomy TVnPC U2 (em2860) [eb1a:e303] 63 63 -> Kaiomy TVnPC U2 (em2860) [eb1a:e303]
64 64 -> Easy Cap Capture DC-60 (em2860) 64 64 -> Easy Cap Capture DC-60 (em2860) [1b80:e309]
65 65 -> IO-DATA GV-MVP/SZ (em2820/em2840) [04bb:0515] 65 65 -> IO-DATA GV-MVP/SZ (em2820/em2840) [04bb:0515]
66 66 -> Empire dual TV (em2880) 66 66 -> Empire dual TV (em2880)
67 67 -> Terratec Grabby (em2860) [0ccd:0096,0ccd:10AF] 67 67 -> Terratec Grabby (em2860) [0ccd:0096,0ccd:10AF]
@@ -76,7 +76,11 @@
76 76 -> KWorld PlusTV 340U or UB435-Q (ATSC) (em2870) [1b80:a340] 76 76 -> KWorld PlusTV 340U or UB435-Q (ATSC) (em2870) [1b80:a340]
77 77 -> EM2874 Leadership ISDBT (em2874) 77 77 -> EM2874 Leadership ISDBT (em2874)
78 78 -> PCTV nanoStick T2 290e (em28174) 78 78 -> PCTV nanoStick T2 290e (em28174)
79 79 -> Terratec Cinergy H5 (em2884) [0ccd:10a2,0ccd:10ad] 79 79 -> Terratec Cinergy H5 (em2884) [0ccd:008e,0ccd:00ac,0ccd:10a2,0ccd:10ad]
80 80 -> PCTV DVB-S2 Stick (460e) (em28174) 80 80 -> PCTV DVB-S2 Stick (460e) (em28174)
81 81 -> Hauppauge WinTV HVR 930C (em2884) [2040:1605] 81 81 -> Hauppauge WinTV HVR 930C (em2884) [2040:1605]
82 82 -> Terratec Cinergy HTC Stick (em2884) [0ccd:00b2] 82 82 -> Terratec Cinergy HTC Stick (em2884) [0ccd:00b2]
83 83 -> Honestech Vidbox NW03 (em2860) [eb1a:5006]
84 84 -> MaxMedia UB425-TC (em2874) [1b80:e425]
85 85 -> PCTV QuatroStick (510e) (em2884) [2304:0242]
86 86 -> PCTV QuatroStick nano (520e) (em2884) [2013:0251]
diff --git a/Documentation/video4linux/CARDLIST.saa7134 b/Documentation/video4linux/CARDLIST.saa7134
index e7ef38a19859..34f3b330e5f4 100644
--- a/Documentation/video4linux/CARDLIST.saa7134
+++ b/Documentation/video4linux/CARDLIST.saa7134
@@ -187,3 +187,4 @@
187186 -> Beholder BeholdTV 501 [5ace:5010] 187186 -> Beholder BeholdTV 501 [5ace:5010]
188187 -> Beholder BeholdTV 503 FM [5ace:5030] 188187 -> Beholder BeholdTV 503 FM [5ace:5030]
189188 -> Sensoray 811/911 [6000:0811,6000:0911] 189188 -> Sensoray 811/911 [6000:0811,6000:0911]
190189 -> Kworld PC150-U [17de:a134]
diff --git a/Documentation/video4linux/CARDLIST.tuner b/Documentation/video4linux/CARDLIST.tuner
index 6323b7a20719..c83f6e418879 100644
--- a/Documentation/video4linux/CARDLIST.tuner
+++ b/Documentation/video4linux/CARDLIST.tuner
@@ -78,10 +78,11 @@ tuner=77 - TCL tuner MF02GIP-5N-E
78tuner=78 - Philips FMD1216MEX MK3 Hybrid Tuner 78tuner=78 - Philips FMD1216MEX MK3 Hybrid Tuner
79tuner=79 - Philips PAL/SECAM multi (FM1216 MK5) 79tuner=79 - Philips PAL/SECAM multi (FM1216 MK5)
80tuner=80 - Philips FQ1216LME MK3 PAL/SECAM w/active loopthrough 80tuner=80 - Philips FQ1216LME MK3 PAL/SECAM w/active loopthrough
81tuner=81 - Xceive 4000 tuner
82tuner=81 - Partsnic (Daewoo) PTI-5NF05 81tuner=81 - Partsnic (Daewoo) PTI-5NF05
83tuner=82 - Philips CU1216L 82tuner=82 - Philips CU1216L
84tuner=83 - NXP TDA18271 83tuner=83 - NXP TDA18271
85tuner=84 - Sony BTF-Pxn01Z 84tuner=84 - Sony BTF-Pxn01Z
86tuner=85 - Philips FQ1236 MK5 85tuner=85 - Philips FQ1236 MK5
87tuner=86 - Tena TNF5337 MFD 86tuner=86 - Tena TNF5337 MFD
87tuner=87 - Xceive 4000 tuner
88tuner=88 - Xceive 5000C tuner
diff --git a/Documentation/video4linux/CQcam.txt b/Documentation/video4linux/CQcam.txt
index 8977e7ce4dab..6e680fec1e9c 100644
--- a/Documentation/video4linux/CQcam.txt
+++ b/Documentation/video4linux/CQcam.txt
@@ -61,29 +61,19 @@ But that is my personal preference.
612.2 Configuration 612.2 Configuration
62 62
63 The configuration requires module configuration and device 63 The configuration requires module configuration and device
64configuration. I like kmod or kerneld process with the 64configuration. The following sections detail these procedures.
65/etc/modprobe.conf file so the modules can automatically load/unload as
66they are used. The video devices could already exist, be generated
67using MAKEDEV, or need to be created. The following sections detail
68these procedures.
69 65
70 66
712.1 Module Configuration 672.1 Module Configuration
72 68
73 Using modules requires a bit of work to install and pass the 69 Using modules requires a bit of work to install and pass the
74parameters. Understand that entries in /etc/modprobe.conf of: 70parameters. Understand that entries in /etc/modprobe.d/*.conf of:
75 71
76 alias parport_lowlevel parport_pc 72 alias parport_lowlevel parport_pc
77 options parport_pc io=0x378 irq=none 73 options parport_pc io=0x378 irq=none
78 alias char-major-81 videodev 74 alias char-major-81 videodev
79 alias char-major-81-0 c-qcam 75 alias char-major-81-0 c-qcam
80 76
81will cause the kmod/modprobe to do certain things. If you are
82using kmod, then a request for a 'char-major-81-0' will cause
83the 'c-qcam' module to load. If you have other video sources with
84modules, you might want to assign the different minor numbers to
85different modules.
86
872.2 Device Configuration 772.2 Device Configuration
88 78
89 At this point, we need to ensure that the device files exist. 79 At this point, we need to ensure that the device files exist.
diff --git a/Documentation/video4linux/Zoran b/Documentation/video4linux/Zoran
index 9ed629d4874b..b5a911fd0602 100644
--- a/Documentation/video4linux/Zoran
+++ b/Documentation/video4linux/Zoran
@@ -255,7 +255,7 @@ Load zr36067.o. If it can't autodetect your card, use the card=X insmod
255option with X being the card number as given in the previous section. 255option with X being the card number as given in the previous section.
256To have more than one card, use card=X1[,X2[,X3,[X4[..]]]] 256To have more than one card, use card=X1[,X2[,X3,[X4[..]]]]
257 257
258To automate this, add the following to your /etc/modprobe.conf: 258To automate this, add the following to your /etc/modprobe.d/zoran.conf:
259 259
260options zr36067 card=X1[,X2[,X3[,X4[..]]]] 260options zr36067 card=X1[,X2[,X3[,X4[..]]]]
261alias char-major-81-0 zr36067 261alias char-major-81-0 zr36067
diff --git a/Documentation/video4linux/bttv/Modules.conf b/Documentation/video4linux/bttv/Modules.conf
index 753f15956eb8..8f258faf18f1 100644
--- a/Documentation/video4linux/bttv/Modules.conf
+++ b/Documentation/video4linux/bttv/Modules.conf
@@ -1,4 +1,4 @@
1# For modern kernels (2.6 or above), this belongs in /etc/modprobe.conf 1# For modern kernels (2.6 or above), this belongs in /etc/modprobe.d/*.conf
2# For for 2.4 kernels or earlier, this belongs in /etc/modules.conf. 2# For for 2.4 kernels or earlier, this belongs in /etc/modules.conf.
3 3
4# i2c 4# i2c
diff --git a/Documentation/video4linux/fimc.txt b/Documentation/video4linux/fimc.txt
new file mode 100644
index 000000000000..eb049708f3e4
--- /dev/null
+++ b/Documentation/video4linux/fimc.txt
@@ -0,0 +1,178 @@
1Samsung S5P/EXYNOS4 FIMC driver
2
3Copyright (C) 2012 Samsung Electronics Co., Ltd.
4---------------------------------------------------------------------------
5
6The FIMC (Fully Interactive Mobile Camera) device available in Samsung
7SoC Application Processors is an integrated camera host interface, color
8space converter, image resizer and rotator. It's also capable of capturing
9data from LCD controller (FIMD) through the SoC internal writeback data
10path. There are multiple FIMC instances in the SoCs (up to 4), having
11slightly different capabilities, like pixel alignment constraints, rotator
12availability, LCD writeback support, etc. The driver is located at
13drivers/media/video/s5p-fimc directory.
14
151. Supported SoCs
16=================
17
18S5PC100 (mem-to-mem only), S5PV210, EXYNOS4210
19
202. Supported features
21=====================
22
23 - camera parallel interface capture (ITU-R.BT601/565);
24 - camera serial interface capture (MIPI-CSI2);
25 - memory-to-memory processing (color space conversion, scaling, mirror
26 and rotation);
27 - dynamic pipeline re-configuration at runtime (re-attachment of any FIMC
28 instance to any parallel video input or any MIPI-CSI front-end);
29 - runtime PM and system wide suspend/resume
30
31Not currently supported:
32 - LCD writeback input
33 - per frame clock gating (mem-to-mem)
34
353. Files partitioning
36=====================
37
38- media device driver
39 drivers/media/video/s5p-fimc/fimc-mdevice.[ch]
40
41 - camera capture video device driver
42 drivers/media/video/s5p-fimc/fimc-capture.c
43
44 - MIPI-CSI2 receiver subdev
45 drivers/media/video/s5p-fimc/mipi-csis.[ch]
46
47 - video post-processor (mem-to-mem)
48 drivers/media/video/s5p-fimc/fimc-core.c
49
50 - common files
51 drivers/media/video/s5p-fimc/fimc-core.h
52 drivers/media/video/s5p-fimc/fimc-reg.h
53 drivers/media/video/s5p-fimc/regs-fimc.h
54
554. User space interfaces
56========================
57
584.1. Media device interface
59
60The driver supports Media Controller API as defined at
61http://http://linuxtv.org/downloads/v4l-dvb-apis/media_common.html
62The media device driver name is "SAMSUNG S5P FIMC".
63
64The purpose of this interface is to allow changing assignment of FIMC instances
65to the SoC peripheral camera input at runtime and optionally to control internal
66connections of the MIPI-CSIS device(s) to the FIMC entities.
67
68The media device interface allows to configure the SoC for capturing image
69data from the sensor through more than one FIMC instance (e.g. for simultaneous
70viewfinder and still capture setup).
71Reconfiguration is done by enabling/disabling media links created by the driver
72during initialization. The internal device topology can be easily discovered
73through media entity and links enumeration.
74
754.2. Memory-to-memory video node
76
77V4L2 memory-to-memory interface at /dev/video? device node. This is standalone
78video device, it has no media pads. However please note the mem-to-mem and
79capture video node operation on same FIMC instance is not allowed. The driver
80detects such cases but the applications should prevent them to avoid an
81undefined behaviour.
82
834.3. Capture video node
84
85The driver supports V4L2 Video Capture Interface as defined at:
86http://linuxtv.org/downloads/v4l-dvb-apis/devices.html
87
88At the capture and mem-to-mem video nodes only the multi-planar API is
89supported. For more details see:
90http://linuxtv.org/downloads/v4l-dvb-apis/planar-apis.html
91
924.4. Camera capture subdevs
93
94Each FIMC instance exports a sub-device node (/dev/v4l-subdev?), a sub-device
95node is also created per each available and enabled at the platform level
96MIPI-CSI receiver device (currently up to two).
97
984.5. sysfs
99
100In order to enable more precise camera pipeline control through the sub-device
101API the driver creates a sysfs entry associated with "s5p-fimc-md" platform
102device. The entry path is: /sys/platform/devices/s5p-fimc-md/subdev_conf_mode.
103
104In typical use case there could be a following capture pipeline configuration:
105sensor subdev -> mipi-csi subdev -> fimc subdev -> video node
106
107When we configure these devices through sub-device API at user space, the
108configuration flow must be from left to right, and the video node is
109configured as last one.
110When we don't use sub-device user space API the whole configuration of all
111devices belonging to the pipeline is done at the video node driver.
112The sysfs entry allows to instruct the capture node driver not to configure
113the sub-devices (format, crop), to avoid resetting the subdevs' configuration
114when the last configuration steps at the video node is performed.
115
116For full sub-device control support (subdevs configured at user space before
117starting streaming):
118# echo "sub-dev" > /sys/platform/devices/s5p-fimc-md/subdev_conf_mode
119
120For V4L2 video node control only (subdevs configured internally by the host
121driver):
122# echo "vid-dev" > /sys/platform/devices/s5p-fimc-md/subdev_conf_mode
123This is a default option.
124
1255. Device mapping to video and subdev device nodes
126==================================================
127
128There are associated two video device nodes with each device instance in
129hardware - video capture and mem-to-mem and additionally a subdev node for
130more precise FIMC capture subsystem control. In addition a separate v4l2
131sub-device node is created per each MIPI-CSIS device.
132
133How to find out which /dev/video? or /dev/v4l-subdev? is assigned to which
134device?
135
136You can either grep through the kernel log to find relevant information, i.e.
137# dmesg | grep -i fimc
138(note that udev, if present, might still have rearranged the video nodes),
139
140or retrieve the information from /dev/media? with help of the media-ctl tool:
141# media-ctl -p
142
1436. Platform support
144===================
145
146The machine code (plat-s5p and arch/arm/mach-*) must select following options
147
148CONFIG_S5P_DEV_FIMC0 mandatory
149CONFIG_S5P_DEV_FIMC1 \
150CONFIG_S5P_DEV_FIMC2 | optional
151CONFIG_S5P_DEV_FIMC3 |
152CONFIG_S5P_SETUP_FIMC /
153CONFIG_S5P_SETUP_MIPIPHY \
154CONFIG_S5P_DEV_CSIS0 | optional for MIPI-CSI interface
155CONFIG_S5P_DEV_CSIS1 /
156
157Except that, relevant s5p_device_fimc? should be registered in the machine code
158in addition to a "s5p-fimc-md" platform device to which the media device driver
159is bound. The "s5p-fimc-md" device instance is required even if only mem-to-mem
160operation is used.
161
162The description of sensor(s) attached to FIMC/MIPI-CSIS camera inputs should be
163passed as the "s5p-fimc-md" device platform_data. The platform data structure
164is defined in file include/media/s5p_fimc.h.
165
1667. Build
167========
168
169This driver depends on following config options:
170PLAT_S5P,
171PM_RUNTIME,
172I2C,
173REGULATOR,
174VIDEO_V4L2_SUBDEV_API,
175
176If the driver is built as a loadable kernel module (CONFIG_VIDEO_SAMSUNG_S5P_FIMC=m)
177two modules are created (in addition to the core v4l2 modules): s5p-fimc.ko and
178optional s5p-csis.ko (MIPI-CSI receiver subdev).
diff --git a/Documentation/video4linux/gspca.txt b/Documentation/video4linux/gspca.txt
index f2060f0dc02c..e6c2842407a4 100644
--- a/Documentation/video4linux/gspca.txt
+++ b/Documentation/video4linux/gspca.txt
@@ -217,6 +217,7 @@ ov534_9 06f8:3003 Hercules Dualpix HD Weblog
217sonixj 06f8:3004 Hercules Classic Silver 217sonixj 06f8:3004 Hercules Classic Silver
218sonixj 06f8:3008 Hercules Deluxe Optical Glass 218sonixj 06f8:3008 Hercules Deluxe Optical Glass
219pac7302 06f8:3009 Hercules Classic Link 219pac7302 06f8:3009 Hercules Classic Link
220pac7302 06f8:301b Hercules Link
220nw80x 0728:d001 AVerMedia Camguard 221nw80x 0728:d001 AVerMedia Camguard
221spca508 0733:0110 ViewQuest VQ110 222spca508 0733:0110 ViewQuest VQ110
222spca501 0733:0401 Intel Create and Share 223spca501 0733:0401 Intel Create and Share
diff --git a/Documentation/video4linux/meye.txt b/Documentation/video4linux/meye.txt
index 34e2842c70ae..a051152ea99c 100644
--- a/Documentation/video4linux/meye.txt
+++ b/Documentation/video4linux/meye.txt
@@ -55,7 +55,7 @@ Module use:
55----------- 55-----------
56 56
57In order to automatically load the meye module on use, you can put those lines 57In order to automatically load the meye module on use, you can put those lines
58in your /etc/modprobe.conf file: 58in your /etc/modprobe.d/meye.conf file:
59 59
60 alias char-major-81 videodev 60 alias char-major-81 videodev
61 alias char-major-81-0 meye 61 alias char-major-81-0 meye
diff --git a/Documentation/video4linux/uvcvideo.txt b/Documentation/video4linux/uvcvideo.txt
index 848d620dcc5c..35ce19cddcf8 100644
--- a/Documentation/video4linux/uvcvideo.txt
+++ b/Documentation/video4linux/uvcvideo.txt
@@ -116,7 +116,7 @@ Description:
116 A UVC control can be mapped to several V4L2 controls. For instance, 116 A UVC control can be mapped to several V4L2 controls. For instance,
117 a UVC pan/tilt control could be mapped to separate pan and tilt V4L2 117 a UVC pan/tilt control could be mapped to separate pan and tilt V4L2
118 controls. The UVC control is divided into non overlapping fields using 118 controls. The UVC control is divided into non overlapping fields using
119 the 'size' and 'offset' fields and are then independantly mapped to 119 the 'size' and 'offset' fields and are then independently mapped to
120 V4L2 control. 120 V4L2 control.
121 121
122 For signed integer V4L2 controls the data_type field should be set to 122 For signed integer V4L2 controls the data_type field should be set to
diff --git a/Documentation/virtual/kvm/api.txt b/Documentation/virtual/kvm/api.txt
index e1d94bf4056e..6386f8c0482e 100644
--- a/Documentation/virtual/kvm/api.txt
+++ b/Documentation/virtual/kvm/api.txt
@@ -95,7 +95,7 @@ described as 'basic' will be available.
95Capability: basic 95Capability: basic
96Architectures: all 96Architectures: all
97Type: system ioctl 97Type: system ioctl
98Parameters: none 98Parameters: machine type identifier (KVM_VM_*)
99Returns: a VM fd that can be used to control the new virtual machine. 99Returns: a VM fd that can be used to control the new virtual machine.
100 100
101The new VM has no virtual cpus and no memory. An mmap() of a VM fd 101The new VM has no virtual cpus and no memory. An mmap() of a VM fd
@@ -103,6 +103,11 @@ will access the virtual machine's physical address space; offset zero
103corresponds to guest physical address zero. Use of mmap() on a VM fd 103corresponds to guest physical address zero. Use of mmap() on a VM fd
104is discouraged if userspace memory allocation (KVM_CAP_USER_MEMORY) is 104is discouraged if userspace memory allocation (KVM_CAP_USER_MEMORY) is
105available. 105available.
106You most certainly want to use 0 as machine type.
107
108In order to create user controlled virtual machines on S390, check
109KVM_CAP_S390_UCONTROL and use the flag KVM_VM_S390_UCONTROL as
110privileged user (CAP_SYS_ADMIN).
106 111
1074.3 KVM_GET_MSR_INDEX_LIST 1124.3 KVM_GET_MSR_INDEX_LIST
108 113
@@ -213,6 +218,11 @@ allocation of vcpu ids. For example, if userspace wants
213single-threaded guest vcpus, it should make all vcpu ids be a multiple 218single-threaded guest vcpus, it should make all vcpu ids be a multiple
214of the number of vcpus per vcore. 219of the number of vcpus per vcore.
215 220
221For virtual cpus that have been created with S390 user controlled virtual
222machines, the resulting vcpu fd can be memory mapped at page offset
223KVM_S390_SIE_PAGE_OFFSET in order to obtain a memory map of the virtual
224cpu's hardware control block.
225
2164.8 KVM_GET_DIRTY_LOG (vm ioctl) 2264.8 KVM_GET_DIRTY_LOG (vm ioctl)
217 227
218Capability: basic 228Capability: basic
@@ -1159,6 +1169,14 @@ following flags are specified:
1159 1169
1160/* Depends on KVM_CAP_IOMMU */ 1170/* Depends on KVM_CAP_IOMMU */
1161#define KVM_DEV_ASSIGN_ENABLE_IOMMU (1 << 0) 1171#define KVM_DEV_ASSIGN_ENABLE_IOMMU (1 << 0)
1172/* The following two depend on KVM_CAP_PCI_2_3 */
1173#define KVM_DEV_ASSIGN_PCI_2_3 (1 << 1)
1174#define KVM_DEV_ASSIGN_MASK_INTX (1 << 2)
1175
1176If KVM_DEV_ASSIGN_PCI_2_3 is set, the kernel will manage legacy INTx interrupts
1177via the PCI-2.3-compliant device-level mask, thus enable IRQ sharing with other
1178assigned devices or host devices. KVM_DEV_ASSIGN_MASK_INTX specifies the
1179guest's view on the INTx mask, see KVM_ASSIGN_SET_INTX_MASK for details.
1162 1180
1163The KVM_DEV_ASSIGN_ENABLE_IOMMU flag is a mandatory option to ensure 1181The KVM_DEV_ASSIGN_ENABLE_IOMMU flag is a mandatory option to ensure
1164isolation of the device. Usages not specifying this flag are deprecated. 1182isolation of the device. Usages not specifying this flag are deprecated.
@@ -1399,6 +1417,71 @@ The following flags are defined:
1399If datamatch flag is set, the event will be signaled only if the written value 1417If datamatch flag is set, the event will be signaled only if the written value
1400to the registered address is equal to datamatch in struct kvm_ioeventfd. 1418to the registered address is equal to datamatch in struct kvm_ioeventfd.
1401 1419
14204.59 KVM_DIRTY_TLB
1421
1422Capability: KVM_CAP_SW_TLB
1423Architectures: ppc
1424Type: vcpu ioctl
1425Parameters: struct kvm_dirty_tlb (in)
1426Returns: 0 on success, -1 on error
1427
1428struct kvm_dirty_tlb {
1429 __u64 bitmap;
1430 __u32 num_dirty;
1431};
1432
1433This must be called whenever userspace has changed an entry in the shared
1434TLB, prior to calling KVM_RUN on the associated vcpu.
1435
1436The "bitmap" field is the userspace address of an array. This array
1437consists of a number of bits, equal to the total number of TLB entries as
1438determined by the last successful call to KVM_CONFIG_TLB, rounded up to the
1439nearest multiple of 64.
1440
1441Each bit corresponds to one TLB entry, ordered the same as in the shared TLB
1442array.
1443
1444The array is little-endian: the bit 0 is the least significant bit of the
1445first byte, bit 8 is the least significant bit of the second byte, etc.
1446This avoids any complications with differing word sizes.
1447
1448The "num_dirty" field is a performance hint for KVM to determine whether it
1449should skip processing the bitmap and just invalidate everything. It must
1450be set to the number of set bits in the bitmap.
1451
14524.60 KVM_ASSIGN_SET_INTX_MASK
1453
1454Capability: KVM_CAP_PCI_2_3
1455Architectures: x86
1456Type: vm ioctl
1457Parameters: struct kvm_assigned_pci_dev (in)
1458Returns: 0 on success, -1 on error
1459
1460Allows userspace to mask PCI INTx interrupts from the assigned device. The
1461kernel will not deliver INTx interrupts to the guest between setting and
1462clearing of KVM_ASSIGN_SET_INTX_MASK via this interface. This enables use of
1463and emulation of PCI 2.3 INTx disable command register behavior.
1464
1465This may be used for both PCI 2.3 devices supporting INTx disable natively and
1466older devices lacking this support. Userspace is responsible for emulating the
1467read value of the INTx disable bit in the guest visible PCI command register.
1468When modifying the INTx disable state, userspace should precede updating the
1469physical device command register by calling this ioctl to inform the kernel of
1470the new intended INTx mask state.
1471
1472Note that the kernel uses the device INTx disable bit to internally manage the
1473device interrupt state for PCI 2.3 devices. Reads of this register may
1474therefore not match the expected value. Writes should always use the guest
1475intended INTx disable value rather than attempting to read-copy-update the
1476current physical device state. Races between user and kernel updates to the
1477INTx disable bit are handled lazily in the kernel. It's possible the device
1478may generate unintended interrupts, but they will not be injected into the
1479guest.
1480
1481See KVM_ASSIGN_DEV_IRQ for the data structure. The target device is specified
1482by assigned_dev_id. In the flags field, only KVM_DEV_ASSIGN_MASK_INTX is
1483evaluated.
1484
14024.62 KVM_CREATE_SPAPR_TCE 14854.62 KVM_CREATE_SPAPR_TCE
1403 1486
1404Capability: KVM_CAP_SPAPR_TCE 1487Capability: KVM_CAP_SPAPR_TCE
@@ -1491,6 +1574,101 @@ following algorithm:
1491Some guests configure the LINT1 NMI input to cause a panic, aiding in 1574Some guests configure the LINT1 NMI input to cause a panic, aiding in
1492debugging. 1575debugging.
1493 1576
15774.65 KVM_S390_UCAS_MAP
1578
1579Capability: KVM_CAP_S390_UCONTROL
1580Architectures: s390
1581Type: vcpu ioctl
1582Parameters: struct kvm_s390_ucas_mapping (in)
1583Returns: 0 in case of success
1584
1585The parameter is defined like this:
1586 struct kvm_s390_ucas_mapping {
1587 __u64 user_addr;
1588 __u64 vcpu_addr;
1589 __u64 length;
1590 };
1591
1592This ioctl maps the memory at "user_addr" with the length "length" to
1593the vcpu's address space starting at "vcpu_addr". All parameters need to
1594be alligned by 1 megabyte.
1595
15964.66 KVM_S390_UCAS_UNMAP
1597
1598Capability: KVM_CAP_S390_UCONTROL
1599Architectures: s390
1600Type: vcpu ioctl
1601Parameters: struct kvm_s390_ucas_mapping (in)
1602Returns: 0 in case of success
1603
1604The parameter is defined like this:
1605 struct kvm_s390_ucas_mapping {
1606 __u64 user_addr;
1607 __u64 vcpu_addr;
1608 __u64 length;
1609 };
1610
1611This ioctl unmaps the memory in the vcpu's address space starting at
1612"vcpu_addr" with the length "length". The field "user_addr" is ignored.
1613All parameters need to be alligned by 1 megabyte.
1614
16154.67 KVM_S390_VCPU_FAULT
1616
1617Capability: KVM_CAP_S390_UCONTROL
1618Architectures: s390
1619Type: vcpu ioctl
1620Parameters: vcpu absolute address (in)
1621Returns: 0 in case of success
1622
1623This call creates a page table entry on the virtual cpu's address space
1624(for user controlled virtual machines) or the virtual machine's address
1625space (for regular virtual machines). This only works for minor faults,
1626thus it's recommended to access subject memory page via the user page
1627table upfront. This is useful to handle validity intercepts for user
1628controlled virtual machines to fault in the virtual cpu's lowcore pages
1629prior to calling the KVM_RUN ioctl.
1630
16314.68 KVM_SET_ONE_REG
1632
1633Capability: KVM_CAP_ONE_REG
1634Architectures: all
1635Type: vcpu ioctl
1636Parameters: struct kvm_one_reg (in)
1637Returns: 0 on success, negative value on failure
1638
1639struct kvm_one_reg {
1640 __u64 id;
1641 __u64 addr;
1642};
1643
1644Using this ioctl, a single vcpu register can be set to a specific value
1645defined by user space with the passed in struct kvm_one_reg, where id
1646refers to the register identifier as described below and addr is a pointer
1647to a variable with the respective size. There can be architecture agnostic
1648and architecture specific registers. Each have their own range of operation
1649and their own constants and width. To keep track of the implemented
1650registers, find a list below:
1651
1652 Arch | Register | Width (bits)
1653 | |
1654 PPC | KVM_REG_PPC_HIOR | 64
1655
16564.69 KVM_GET_ONE_REG
1657
1658Capability: KVM_CAP_ONE_REG
1659Architectures: all
1660Type: vcpu ioctl
1661Parameters: struct kvm_one_reg (in and out)
1662Returns: 0 on success, negative value on failure
1663
1664This ioctl allows to receive the value of a single register implemented
1665in a vcpu. The register to read is indicated by the "id" field of the
1666kvm_one_reg struct passed in. On success, the register value can be found
1667at the memory location pointed to by "addr".
1668
1669The list of registers accessible using this interface is identical to the
1670list in 4.64.
1671
14945. The kvm_run structure 16725. The kvm_run structure
1495 1673
1496Application code obtains a pointer to the kvm_run structure by 1674Application code obtains a pointer to the kvm_run structure by
@@ -1651,6 +1829,20 @@ s390 specific.
1651 1829
1652s390 specific. 1830s390 specific.
1653 1831
1832 /* KVM_EXIT_S390_UCONTROL */
1833 struct {
1834 __u64 trans_exc_code;
1835 __u32 pgm_code;
1836 } s390_ucontrol;
1837
1838s390 specific. A page fault has occurred for a user controlled virtual
1839machine (KVM_VM_S390_UNCONTROL) on it's host page table that cannot be
1840resolved by the kernel.
1841The program code and the translation exception code that were placed
1842in the cpu's lowcore are presented here as defined by the z Architecture
1843Principles of Operation Book in the Chapter for Dynamic Address Translation
1844(DAT)
1845
1654 /* KVM_EXIT_DCR */ 1846 /* KVM_EXIT_DCR */
1655 struct { 1847 struct {
1656 __u32 dcrn; 1848 __u32 dcrn;
@@ -1693,6 +1885,29 @@ developer registration required to access it).
1693 /* Fix the size of the union. */ 1885 /* Fix the size of the union. */
1694 char padding[256]; 1886 char padding[256];
1695 }; 1887 };
1888
1889 /*
1890 * shared registers between kvm and userspace.
1891 * kvm_valid_regs specifies the register classes set by the host
1892 * kvm_dirty_regs specified the register classes dirtied by userspace
1893 * struct kvm_sync_regs is architecture specific, as well as the
1894 * bits for kvm_valid_regs and kvm_dirty_regs
1895 */
1896 __u64 kvm_valid_regs;
1897 __u64 kvm_dirty_regs;
1898 union {
1899 struct kvm_sync_regs regs;
1900 char padding[1024];
1901 } s;
1902
1903If KVM_CAP_SYNC_REGS is defined, these fields allow userspace to access
1904certain guest registers without having to call SET/GET_*REGS. Thus we can
1905avoid some system call overhead if userspace has to handle the exit.
1906Userspace can query the validity of the structure by checking
1907kvm_valid_regs for specific bits. These bits are architecture specific
1908and usually define the validity of a groups of registers. (e.g. one bit
1909 for general purpose registers)
1910
1696}; 1911};
1697 1912
16986. Capabilities that can be enabled 19136. Capabilities that can be enabled
@@ -1741,3 +1956,45 @@ HTAB address part of SDR1 contains an HVA instead of a GPA, as PAPR keeps the
1741HTAB invisible to the guest. 1956HTAB invisible to the guest.
1742 1957
1743When this capability is enabled, KVM_EXIT_PAPR_HCALL can occur. 1958When this capability is enabled, KVM_EXIT_PAPR_HCALL can occur.
1959
19606.3 KVM_CAP_SW_TLB
1961
1962Architectures: ppc
1963Parameters: args[0] is the address of a struct kvm_config_tlb
1964Returns: 0 on success; -1 on error
1965
1966struct kvm_config_tlb {
1967 __u64 params;
1968 __u64 array;
1969 __u32 mmu_type;
1970 __u32 array_len;
1971};
1972
1973Configures the virtual CPU's TLB array, establishing a shared memory area
1974between userspace and KVM. The "params" and "array" fields are userspace
1975addresses of mmu-type-specific data structures. The "array_len" field is an
1976safety mechanism, and should be set to the size in bytes of the memory that
1977userspace has reserved for the array. It must be at least the size dictated
1978by "mmu_type" and "params".
1979
1980While KVM_RUN is active, the shared region is under control of KVM. Its
1981contents are undefined, and any modification by userspace results in
1982boundedly undefined behavior.
1983
1984On return from KVM_RUN, the shared region will reflect the current state of
1985the guest's TLB. If userspace makes any changes, it must call KVM_DIRTY_TLB
1986to tell KVM which entries have been changed, prior to calling KVM_RUN again
1987on this vcpu.
1988
1989For mmu types KVM_MMU_FSL_BOOKE_NOHV and KVM_MMU_FSL_BOOKE_HV:
1990 - The "params" field is of type "struct kvm_book3e_206_tlb_params".
1991 - The "array" field points to an array of type "struct
1992 kvm_book3e_206_tlb_entry".
1993 - The array consists of all entries in the first TLB, followed by all
1994 entries in the second TLB.
1995 - Within a TLB, entries are ordered first by increasing set number. Within a
1996 set, entries are ordered by way (increasing ESEL).
1997 - The hash for determining set number in TLB0 is: (MAS2 >> 12) & (num_sets - 1)
1998 where "num_sets" is the tlb_sizes[] value divided by the tlb_ways[] value.
1999 - The tsize field of mas1 shall be set to 4K on TLB0, even though the
2000 hardware ignores this value for TLB0.
diff --git a/Documentation/virtual/kvm/mmu.txt b/Documentation/virtual/kvm/mmu.txt
index 5dc972c09b55..fa5f1dbc6b23 100644
--- a/Documentation/virtual/kvm/mmu.txt
+++ b/Documentation/virtual/kvm/mmu.txt
@@ -347,7 +347,7 @@ To instantiate a large spte, four constraints must be satisfied:
347 347
348- the spte must point to a large host page 348- the spte must point to a large host page
349- the guest pte must be a large pte of at least equivalent size (if tdp is 349- the guest pte must be a large pte of at least equivalent size (if tdp is
350 enabled, there is no guest pte and this condition is satisified) 350 enabled, there is no guest pte and this condition is satisfied)
351- if the spte will be writeable, the large page frame may not overlap any 351- if the spte will be writeable, the large page frame may not overlap any
352 write-protected pages 352 write-protected pages
353- the guest page must be wholly contained by a single memory slot 353- the guest page must be wholly contained by a single memory slot
@@ -356,7 +356,7 @@ To check the last two conditions, the mmu maintains a ->write_count set of
356arrays for each memory slot and large page size. Every write protected page 356arrays for each memory slot and large page size. Every write protected page
357causes its write_count to be incremented, thus preventing instantiation of 357causes its write_count to be incremented, thus preventing instantiation of
358a large spte. The frames at the end of an unaligned memory slot have 358a large spte. The frames at the end of an unaligned memory slot have
359artificically inflated ->write_counts so they can never be instantiated. 359artificially inflated ->write_counts so they can never be instantiated.
360 360
361Further reading 361Further reading
362=============== 362===============
diff --git a/Documentation/virtual/kvm/ppc-pv.txt b/Documentation/virtual/kvm/ppc-pv.txt
index 2b7ce190cde4..6e7c37050930 100644
--- a/Documentation/virtual/kvm/ppc-pv.txt
+++ b/Documentation/virtual/kvm/ppc-pv.txt
@@ -81,28 +81,8 @@ additional registers to the magic page. If you add fields to the magic page,
81also define a new hypercall feature to indicate that the host can give you more 81also define a new hypercall feature to indicate that the host can give you more
82registers. Only if the host supports the additional features, make use of them. 82registers. Only if the host supports the additional features, make use of them.
83 83
84The magic page has the following layout as described in 84The magic page layout is described by struct kvm_vcpu_arch_shared
85arch/powerpc/include/asm/kvm_para.h: 85in arch/powerpc/include/asm/kvm_para.h.
86
87struct kvm_vcpu_arch_shared {
88 __u64 scratch1;
89 __u64 scratch2;
90 __u64 scratch3;
91 __u64 critical; /* Guest may not get interrupts if == r1 */
92 __u64 sprg0;
93 __u64 sprg1;
94 __u64 sprg2;
95 __u64 sprg3;
96 __u64 srr0;
97 __u64 srr1;
98 __u64 dar;
99 __u64 msr;
100 __u32 dsisr;
101 __u32 int_pending; /* Tells the guest if we have an interrupt */
102};
103
104Additions to the page must only occur at the end. Struct fields are always 32
105or 64 bit aligned, depending on them being 32 or 64 bit wide respectively.
106 86
107Magic page features 87Magic page features
108=================== 88===================
diff --git a/Documentation/virtual/virtio-spec.txt b/Documentation/virtual/virtio-spec.txt
index a350ae135b8c..da094737e2f8 100644
--- a/Documentation/virtual/virtio-spec.txt
+++ b/Documentation/virtual/virtio-spec.txt
@@ -1403,7 +1403,7 @@ segmentation, if both guests are amenable.
1403 1403
1404Packets are transmitted by placing them in the transmitq, and 1404Packets are transmitted by placing them in the transmitq, and
1405buffers for incoming packets are placed in the receiveq. In each 1405buffers for incoming packets are placed in the receiveq. In each
1406case, the packet itself is preceeded by a header: 1406case, the packet itself is preceded by a header:
1407 1407
1408struct virtio_net_hdr { 1408struct virtio_net_hdr {
1409 1409
@@ -1642,7 +1642,7 @@ struct virtio_net_ctrl_mac {
1642 1642
1643The device can filter incoming packets by any number of 1643The device can filter incoming packets by any number of
1644destination MAC addresses.[footnote: 1644destination MAC addresses.[footnote:
1645Since there are no guarentees, it can use a hash filter 1645Since there are no guarantees, it can use a hash filter
1646orsilently switch to allmulti or promiscuous mode if it is given 1646orsilently switch to allmulti or promiscuous mode if it is given
1647too many addresses. 1647too many addresses.
1648] This table is set using the class VIRTIO_NET_CTRL_MAC and the 1648] This table is set using the class VIRTIO_NET_CTRL_MAC and the
@@ -1805,7 +1805,7 @@ the FLUSH and FLUSH_OUT types are equivalent, the device does not
1805distinguish between them 1805distinguish between them
1806]). If the device has VIRTIO_BLK_F_BARRIER feature the high bit 1806]). If the device has VIRTIO_BLK_F_BARRIER feature the high bit
1807(VIRTIO_BLK_T_BARRIER) indicates that this request acts as a 1807(VIRTIO_BLK_T_BARRIER) indicates that this request acts as a
1808barrier and that all preceeding requests must be complete before 1808barrier and that all preceding requests must be complete before
1809this one, and all following requests must not be started until 1809this one, and all following requests must not be started until
1810this is complete. Note that a barrier does not flush caches in 1810this is complete. Note that a barrier does not flush caches in
1811the underlying backend device in host, and thus does not serve as 1811the underlying backend device in host, and thus does not serve as
@@ -2118,7 +2118,7 @@ This is historical, and independent of the guest page size
2118 2118
2119 Otherwise, the guest may begin to re-use pages previously given 2119 Otherwise, the guest may begin to re-use pages previously given
2120 to the balloon before the device has acknowledged their 2120 to the balloon before the device has acknowledged their
2121 withdrawl. [footnote: 2121 withdrawal. [footnote:
2122In this case, deflation advice is merely a courtesy 2122In this case, deflation advice is merely a courtesy
2123] 2123]
2124 2124
diff --git a/Documentation/vm/Makefile b/Documentation/vm/Makefile
deleted file mode 100644
index 3fa4d0668864..000000000000
--- a/Documentation/vm/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 := page-types hugepage-mmap hugepage-shm map_hugetlb
6
7# Tell kbuild to always build the programs
8always := $(hostprogs-y)
diff --git a/Documentation/vm/cleancache.txt b/Documentation/vm/cleancache.txt
index 36c367c73084..142fbb0f325a 100644
--- a/Documentation/vm/cleancache.txt
+++ b/Documentation/vm/cleancache.txt
@@ -46,10 +46,11 @@ a negative return value indicates failure. A "put_page" will copy a
46the pool id, a file key, and a page index into the file. (The combination 46the pool id, a file key, and a page index into the file. (The combination
47of a pool id, a file key, and an index is sometimes called a "handle".) 47of a pool id, a file key, and an index is sometimes called a "handle".)
48A "get_page" will copy the page, if found, from cleancache into kernel memory. 48A "get_page" will copy the page, if found, from cleancache into kernel memory.
49A "flush_page" will ensure the page no longer is present in cleancache; 49An "invalidate_page" will ensure the page no longer is present in cleancache;
50a "flush_inode" will flush all pages associated with the specified file; 50an "invalidate_inode" will invalidate all pages associated with the specified
51and, when a filesystem is unmounted, a "flush_fs" will flush all pages in 51file; and, when a filesystem is unmounted, an "invalidate_fs" will invalidate
52all files specified by the given pool id and also surrender the pool id. 52all pages in all files specified by the given pool id and also surrender
53the pool id.
53 54
54An "init_shared_fs", like init_fs, obtains a pool id but tells cleancache 55An "init_shared_fs", like init_fs, obtains a pool id but tells cleancache
55to treat the pool as shared using a 128-bit UUID as a key. On systems 56to treat the pool as shared using a 128-bit UUID as a key. On systems
@@ -62,12 +63,12 @@ of the kernel (e.g. by "tools" that control cleancache). Or a
62cleancache implementation can simply disable shared_init by always 63cleancache implementation can simply disable shared_init by always
63returning a negative value. 64returning a negative value.
64 65
65If a get_page is successful on a non-shared pool, the page is flushed (thus 66If a get_page is successful on a non-shared pool, the page is invalidated
66making cleancache an "exclusive" cache). On a shared pool, the page 67(thus making cleancache an "exclusive" cache). On a shared pool, the page
67is NOT flushed on a successful get_page so that it remains accessible to 68is NOT invalidated on a successful get_page so that it remains accessible to
68other sharers. The kernel is responsible for ensuring coherency between 69other sharers. The kernel is responsible for ensuring coherency between
69cleancache (shared or not), the page cache, and the filesystem, using 70cleancache (shared or not), the page cache, and the filesystem, using
70cleancache flush operations as required. 71cleancache invalidate operations as required.
71 72
72Note that cleancache must enforce put-put-get coherency and get-get 73Note that cleancache must enforce put-put-get coherency and get-get
73coherency. For the former, if two puts are made to the same handle but 74coherency. For the former, if two puts are made to the same handle but
@@ -77,22 +78,22 @@ if a get for a given handle fails, subsequent gets for that handle will
77never succeed unless preceded by a successful put with that handle. 78never succeed unless preceded by a successful put with that handle.
78 79
79Last, cleancache provides no SMP serialization guarantees; if two 80Last, cleancache provides no SMP serialization guarantees; if two
80different Linux threads are simultaneously putting and flushing a page 81different Linux threads are simultaneously putting and invalidating a page
81with the same handle, the results are indeterminate. Callers must 82with the same handle, the results are indeterminate. Callers must
82lock the page to ensure serial behavior. 83lock the page to ensure serial behavior.
83 84
84CLEANCACHE PERFORMANCE METRICS 85CLEANCACHE PERFORMANCE METRICS
85 86
86Cleancache monitoring is done by sysfs files in the 87If properly configured, monitoring of cleancache is done via debugfs in
87/sys/kernel/mm/cleancache directory. The effectiveness of cleancache 88the /sys/kernel/debug/mm/cleancache directory. The effectiveness of cleancache
88can be measured (across all filesystems) with: 89can be measured (across all filesystems) with:
89 90
90succ_gets - number of gets that were successful 91succ_gets - number of gets that were successful
91failed_gets - number of gets that failed 92failed_gets - number of gets that failed
92puts - number of puts attempted (all "succeed") 93puts - number of puts attempted (all "succeed")
93flushes - number of flushes attempted 94invalidates - number of invalidates attempted
94 95
95A backend implementatation may provide additional metrics. 96A backend implementation may provide additional metrics.
96 97
97FAQ 98FAQ
98 99
@@ -143,7 +144,7 @@ systems.
143 144
144The core hooks for cleancache in VFS are in most cases a single line 145The core hooks for cleancache in VFS are in most cases a single line
145and the minimum set are placed precisely where needed to maintain 146and the minimum set are placed precisely where needed to maintain
146coherency (via cleancache_flush operations) between cleancache, 147coherency (via cleancache_invalidate operations) between cleancache,
147the page cache, and disk. All hooks compile into nothingness if 148the page cache, and disk. All hooks compile into nothingness if
148cleancache is config'ed off and turn into a function-pointer- 149cleancache is config'ed off and turn into a function-pointer-
149compare-to-NULL if config'ed on but no backend claims the ops 150compare-to-NULL if config'ed on but no backend claims the ops
@@ -184,15 +185,15 @@ or for real kernel-addressable RAM, it makes perfect sense for
184transcendent memory. 185transcendent memory.
185 186
1864) Why is non-shared cleancache "exclusive"? And where is the 1874) Why is non-shared cleancache "exclusive"? And where is the
187 page "flushed" after a "get"? (Minchan Kim) 188 page "invalidated" after a "get"? (Minchan Kim)
188 189
189The main reason is to free up space in transcendent memory and 190The main reason is to free up space in transcendent memory and
190to avoid unnecessary cleancache_flush calls. If you want inclusive, 191to avoid unnecessary cleancache_invalidate calls. If you want inclusive,
191the page can be "put" immediately following the "get". If 192the page can be "put" immediately following the "get". If
192put-after-get for inclusive becomes common, the interface could 193put-after-get for inclusive becomes common, the interface could
193be easily extended to add a "get_no_flush" call. 194be easily extended to add a "get_no_invalidate" call.
194 195
195The flush is done by the cleancache backend implementation. 196The invalidate is done by the cleancache backend implementation.
196 197
1975) What's the performance impact? 1985) What's the performance impact?
198 199
@@ -222,7 +223,7 @@ Some points for a filesystem to consider:
222 as tmpfs should not enable cleancache) 223 as tmpfs should not enable cleancache)
223- To ensure coherency/correctness, the FS must ensure that all 224- To ensure coherency/correctness, the FS must ensure that all
224 file removal or truncation operations either go through VFS or 225 file removal or truncation operations either go through VFS or
225 add hooks to do the equivalent cleancache "flush" operations 226 add hooks to do the equivalent cleancache "invalidate" operations
226- To ensure coherency/correctness, either inode numbers must 227- To ensure coherency/correctness, either inode numbers must
227 be unique across the lifetime of the on-disk file OR the 228 be unique across the lifetime of the on-disk file OR the
228 FS must provide an "encode_fh" function. 229 FS must provide an "encode_fh" function.
@@ -243,11 +244,11 @@ If cleancache would use the inode virtual address instead of
243inode/filehandle, the pool id could be eliminated. But, this 244inode/filehandle, the pool id could be eliminated. But, this
244won't work because cleancache retains pagecache data pages 245won't work because cleancache retains pagecache data pages
245persistently even when the inode has been pruned from the 246persistently even when the inode has been pruned from the
246inode unused list, and only flushes the data page if the file 247inode unused list, and only invalidates the data page if the file
247gets removed/truncated. So if cleancache used the inode kva, 248gets removed/truncated. So if cleancache used the inode kva,
248there would be potential coherency issues if/when the inode 249there would be potential coherency issues if/when the inode
249kva is reused for a different file. Alternately, if cleancache 250kva is reused for a different file. Alternately, if cleancache
250flushed the pages when the inode kva was freed, much of the value 251invalidated the pages when the inode kva was freed, much of the value
251of cleancache would be lost because the cache of pages in cleanache 252of cleancache would be lost because the cache of pages in cleanache
252is potentially much larger than the kernel pagecache and is most 253is potentially much larger than the kernel pagecache and is most
253useful if the pages survive inode cache removal. 254useful if the pages survive inode cache removal.
diff --git a/Documentation/vm/hugepage-mmap.c b/Documentation/vm/hugepage-mmap.c
deleted file mode 100644
index db0dd9a33d54..000000000000
--- a/Documentation/vm/hugepage-mmap.c
+++ /dev/null
@@ -1,91 +0,0 @@
1/*
2 * hugepage-mmap:
3 *
4 * Example of using huge page memory in a user application using the mmap
5 * system call. Before running this application, make sure that the
6 * administrator has mounted the hugetlbfs filesystem (on some directory
7 * like /mnt) using the command mount -t hugetlbfs nodev /mnt. In this
8 * example, the app is requesting memory of size 256MB that is backed by
9 * huge pages.
10 *
11 * For the ia64 architecture, the Linux kernel reserves Region number 4 for
12 * huge pages. That means that if one requires a fixed address, a huge page
13 * aligned address starting with 0x800000... will be required. If a fixed
14 * address is not required, the kernel will select an address in the proper
15 * range.
16 * Other architectures, such as ppc64, i386 or x86_64 are not so constrained.
17 */
18
19#include <stdlib.h>
20#include <stdio.h>
21#include <unistd.h>
22#include <sys/mman.h>
23#include <fcntl.h>
24
25#define FILE_NAME "/mnt/hugepagefile"
26#define LENGTH (256UL*1024*1024)
27#define PROTECTION (PROT_READ | PROT_WRITE)
28
29/* Only ia64 requires this */
30#ifdef __ia64__
31#define ADDR (void *)(0x8000000000000000UL)
32#define FLAGS (MAP_SHARED | MAP_FIXED)
33#else
34#define ADDR (void *)(0x0UL)
35#define FLAGS (MAP_SHARED)
36#endif
37
38static void check_bytes(char *addr)
39{
40 printf("First hex is %x\n", *((unsigned int *)addr));
41}
42
43static void write_bytes(char *addr)
44{
45 unsigned long i;
46
47 for (i = 0; i < LENGTH; i++)
48 *(addr + i) = (char)i;
49}
50
51static void read_bytes(char *addr)
52{
53 unsigned long i;
54
55 check_bytes(addr);
56 for (i = 0; i < LENGTH; i++)
57 if (*(addr + i) != (char)i) {
58 printf("Mismatch at %lu\n", i);
59 break;
60 }
61}
62
63int main(void)
64{
65 void *addr;
66 int fd;
67
68 fd = open(FILE_NAME, O_CREAT | O_RDWR, 0755);
69 if (fd < 0) {
70 perror("Open failed");
71 exit(1);
72 }
73
74 addr = mmap(ADDR, LENGTH, PROTECTION, FLAGS, fd, 0);
75 if (addr == MAP_FAILED) {
76 perror("mmap");
77 unlink(FILE_NAME);
78 exit(1);
79 }
80
81 printf("Returned address is %p\n", addr);
82 check_bytes(addr);
83 write_bytes(addr);
84 read_bytes(addr);
85
86 munmap(addr, LENGTH);
87 close(fd);
88 unlink(FILE_NAME);
89
90 return 0;
91}
diff --git a/Documentation/vm/hugepage-shm.c b/Documentation/vm/hugepage-shm.c
deleted file mode 100644
index 07956d8592c9..000000000000
--- a/Documentation/vm/hugepage-shm.c
+++ /dev/null
@@ -1,98 +0,0 @@
1/*
2 * hugepage-shm:
3 *
4 * Example of using huge page memory in a user application using Sys V shared
5 * memory system calls. In this example the app is requesting 256MB of
6 * memory that is backed by huge pages. The application uses the flag
7 * SHM_HUGETLB in the shmget system call to inform the kernel that it is
8 * requesting huge pages.
9 *
10 * For the ia64 architecture, the Linux kernel reserves Region number 4 for
11 * huge pages. That means that if one requires a fixed address, a huge page
12 * aligned address starting with 0x800000... will be required. If a fixed
13 * address is not required, the kernel will select an address in the proper
14 * range.
15 * Other architectures, such as ppc64, i386 or x86_64 are not so constrained.
16 *
17 * Note: The default shared memory limit is quite low on many kernels,
18 * you may need to increase it via:
19 *
20 * echo 268435456 > /proc/sys/kernel/shmmax
21 *
22 * This will increase the maximum size per shared memory segment to 256MB.
23 * The other limit that you will hit eventually is shmall which is the
24 * total amount of shared memory in pages. To set it to 16GB on a system
25 * with a 4kB pagesize do:
26 *
27 * echo 4194304 > /proc/sys/kernel/shmall
28 */
29
30#include <stdlib.h>
31#include <stdio.h>
32#include <sys/types.h>
33#include <sys/ipc.h>
34#include <sys/shm.h>
35#include <sys/mman.h>
36
37#ifndef SHM_HUGETLB
38#define SHM_HUGETLB 04000
39#endif
40
41#define LENGTH (256UL*1024*1024)
42
43#define dprintf(x) printf(x)
44
45/* Only ia64 requires this */
46#ifdef __ia64__
47#define ADDR (void *)(0x8000000000000000UL)
48#define SHMAT_FLAGS (SHM_RND)
49#else
50#define ADDR (void *)(0x0UL)
51#define SHMAT_FLAGS (0)
52#endif
53
54int main(void)
55{
56 int shmid;
57 unsigned long i;
58 char *shmaddr;
59
60 if ((shmid = shmget(2, LENGTH,
61 SHM_HUGETLB | IPC_CREAT | SHM_R | SHM_W)) < 0) {
62 perror("shmget");
63 exit(1);
64 }
65 printf("shmid: 0x%x\n", shmid);
66
67 shmaddr = shmat(shmid, ADDR, SHMAT_FLAGS);
68 if (shmaddr == (char *)-1) {
69 perror("Shared memory attach failure");
70 shmctl(shmid, IPC_RMID, NULL);
71 exit(2);
72 }
73 printf("shmaddr: %p\n", shmaddr);
74
75 dprintf("Starting the writes:\n");
76 for (i = 0; i < LENGTH; i++) {
77 shmaddr[i] = (char)(i);
78 if (!(i % (1024 * 1024)))
79 dprintf(".");
80 }
81 dprintf("\n");
82
83 dprintf("Starting the Check...");
84 for (i = 0; i < LENGTH; i++)
85 if (shmaddr[i] != (char)i)
86 printf("\nIndex %lu mismatched\n", i);
87 dprintf("Done.\n");
88
89 if (shmdt((const void *)shmaddr) != 0) {
90 perror("Detach failure");
91 shmctl(shmid, IPC_RMID, NULL);
92 exit(3);
93 }
94
95 shmctl(shmid, IPC_RMID, NULL);
96
97 return 0;
98}
diff --git a/Documentation/vm/map_hugetlb.c b/Documentation/vm/map_hugetlb.c
deleted file mode 100644
index eda1a6d3578a..000000000000
--- a/Documentation/vm/map_hugetlb.c
+++ /dev/null
@@ -1,77 +0,0 @@
1/*
2 * Example of using hugepage memory in a user application using the mmap
3 * system call with MAP_HUGETLB flag. Before running this program make
4 * sure the administrator has allocated enough default sized huge pages
5 * to cover the 256 MB allocation.
6 *
7 * For ia64 architecture, Linux kernel reserves Region number 4 for hugepages.
8 * That means the addresses starting with 0x800000... will need to be
9 * specified. Specifying a fixed address is not required on ppc64, i386
10 * or x86_64.
11 */
12#include <stdlib.h>
13#include <stdio.h>
14#include <unistd.h>
15#include <sys/mman.h>
16#include <fcntl.h>
17
18#define LENGTH (256UL*1024*1024)
19#define PROTECTION (PROT_READ | PROT_WRITE)
20
21#ifndef MAP_HUGETLB
22#define MAP_HUGETLB 0x40000 /* arch specific */
23#endif
24
25/* Only ia64 requires this */
26#ifdef __ia64__
27#define ADDR (void *)(0x8000000000000000UL)
28#define FLAGS (MAP_PRIVATE | MAP_ANONYMOUS | MAP_HUGETLB | MAP_FIXED)
29#else
30#define ADDR (void *)(0x0UL)
31#define FLAGS (MAP_PRIVATE | MAP_ANONYMOUS | MAP_HUGETLB)
32#endif
33
34static void check_bytes(char *addr)
35{
36 printf("First hex is %x\n", *((unsigned int *)addr));
37}
38
39static void write_bytes(char *addr)
40{
41 unsigned long i;
42
43 for (i = 0; i < LENGTH; i++)
44 *(addr + i) = (char)i;
45}
46
47static void read_bytes(char *addr)
48{
49 unsigned long i;
50
51 check_bytes(addr);
52 for (i = 0; i < LENGTH; i++)
53 if (*(addr + i) != (char)i) {
54 printf("Mismatch at %lu\n", i);
55 break;
56 }
57}
58
59int main(void)
60{
61 void *addr;
62
63 addr = mmap(ADDR, LENGTH, PROTECTION, FLAGS, 0, 0);
64 if (addr == MAP_FAILED) {
65 perror("mmap");
66 exit(1);
67 }
68
69 printf("Returned address is %p\n", addr);
70 check_bytes(addr);
71 write_bytes(addr);
72 read_bytes(addr);
73
74 munmap(addr, LENGTH);
75
76 return 0;
77}
diff --git a/Documentation/vm/page-types.c b/Documentation/vm/page-types.c
deleted file mode 100644
index 7445caa26d05..000000000000
--- a/Documentation/vm/page-types.c
+++ /dev/null
@@ -1,1100 +0,0 @@
1/*
2 * page-types: Tool for querying page flags
3 *
4 * This program is free software; you can redistribute it and/or modify it
5 * under the terms of the GNU General Public License as published by the Free
6 * Software Foundation; version 2.
7 *
8 * This program is distributed in the hope that it will be useful, but WITHOUT
9 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
10 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
11 * more details.
12 *
13 * You should find a copy of v2 of the GNU General Public License somewhere on
14 * your Linux system; if not, write to the Free Software Foundation, Inc., 59
15 * Temple Place, Suite 330, Boston, MA 02111-1307 USA.
16 *
17 * Copyright (C) 2009 Intel corporation
18 *
19 * Authors: Wu Fengguang <fengguang.wu@intel.com>
20 */
21
22#define _LARGEFILE64_SOURCE
23#include <stdio.h>
24#include <stdlib.h>
25#include <unistd.h>
26#include <stdint.h>
27#include <stdarg.h>
28#include <string.h>
29#include <getopt.h>
30#include <limits.h>
31#include <assert.h>
32#include <sys/types.h>
33#include <sys/errno.h>
34#include <sys/fcntl.h>
35#include <sys/mount.h>
36#include <sys/statfs.h>
37#include "../../include/linux/magic.h"
38
39
40#ifndef MAX_PATH
41# define MAX_PATH 256
42#endif
43
44#ifndef STR
45# define _STR(x) #x
46# define STR(x) _STR(x)
47#endif
48
49/*
50 * pagemap kernel ABI bits
51 */
52
53#define PM_ENTRY_BYTES sizeof(uint64_t)
54#define PM_STATUS_BITS 3
55#define PM_STATUS_OFFSET (64 - PM_STATUS_BITS)
56#define PM_STATUS_MASK (((1LL << PM_STATUS_BITS) - 1) << PM_STATUS_OFFSET)
57#define PM_STATUS(nr) (((nr) << PM_STATUS_OFFSET) & PM_STATUS_MASK)
58#define PM_PSHIFT_BITS 6
59#define PM_PSHIFT_OFFSET (PM_STATUS_OFFSET - PM_PSHIFT_BITS)
60#define PM_PSHIFT_MASK (((1LL << PM_PSHIFT_BITS) - 1) << PM_PSHIFT_OFFSET)
61#define PM_PSHIFT(x) (((u64) (x) << PM_PSHIFT_OFFSET) & PM_PSHIFT_MASK)
62#define PM_PFRAME_MASK ((1LL << PM_PSHIFT_OFFSET) - 1)
63#define PM_PFRAME(x) ((x) & PM_PFRAME_MASK)
64
65#define PM_PRESENT PM_STATUS(4LL)
66#define PM_SWAP PM_STATUS(2LL)
67
68
69/*
70 * kernel page flags
71 */
72
73#define KPF_BYTES 8
74#define PROC_KPAGEFLAGS "/proc/kpageflags"
75
76/* copied from kpageflags_read() */
77#define KPF_LOCKED 0
78#define KPF_ERROR 1
79#define KPF_REFERENCED 2
80#define KPF_UPTODATE 3
81#define KPF_DIRTY 4
82#define KPF_LRU 5
83#define KPF_ACTIVE 6
84#define KPF_SLAB 7
85#define KPF_WRITEBACK 8
86#define KPF_RECLAIM 9
87#define KPF_BUDDY 10
88
89/* [11-20] new additions in 2.6.31 */
90#define KPF_MMAP 11
91#define KPF_ANON 12
92#define KPF_SWAPCACHE 13
93#define KPF_SWAPBACKED 14
94#define KPF_COMPOUND_HEAD 15
95#define KPF_COMPOUND_TAIL 16
96#define KPF_HUGE 17
97#define KPF_UNEVICTABLE 18
98#define KPF_HWPOISON 19
99#define KPF_NOPAGE 20
100#define KPF_KSM 21
101
102/* [32-] kernel hacking assistances */
103#define KPF_RESERVED 32
104#define KPF_MLOCKED 33
105#define KPF_MAPPEDTODISK 34
106#define KPF_PRIVATE 35
107#define KPF_PRIVATE_2 36
108#define KPF_OWNER_PRIVATE 37
109#define KPF_ARCH 38
110#define KPF_UNCACHED 39
111
112/* [48-] take some arbitrary free slots for expanding overloaded flags
113 * not part of kernel API
114 */
115#define KPF_READAHEAD 48
116#define KPF_SLOB_FREE 49
117#define KPF_SLUB_FROZEN 50
118#define KPF_SLUB_DEBUG 51
119
120#define KPF_ALL_BITS ((uint64_t)~0ULL)
121#define KPF_HACKERS_BITS (0xffffULL << 32)
122#define KPF_OVERLOADED_BITS (0xffffULL << 48)
123#define BIT(name) (1ULL << KPF_##name)
124#define BITS_COMPOUND (BIT(COMPOUND_HEAD) | BIT(COMPOUND_TAIL))
125
126static const char *page_flag_names[] = {
127 [KPF_LOCKED] = "L:locked",
128 [KPF_ERROR] = "E:error",
129 [KPF_REFERENCED] = "R:referenced",
130 [KPF_UPTODATE] = "U:uptodate",
131 [KPF_DIRTY] = "D:dirty",
132 [KPF_LRU] = "l:lru",
133 [KPF_ACTIVE] = "A:active",
134 [KPF_SLAB] = "S:slab",
135 [KPF_WRITEBACK] = "W:writeback",
136 [KPF_RECLAIM] = "I:reclaim",
137 [KPF_BUDDY] = "B:buddy",
138
139 [KPF_MMAP] = "M:mmap",
140 [KPF_ANON] = "a:anonymous",
141 [KPF_SWAPCACHE] = "s:swapcache",
142 [KPF_SWAPBACKED] = "b:swapbacked",
143 [KPF_COMPOUND_HEAD] = "H:compound_head",
144 [KPF_COMPOUND_TAIL] = "T:compound_tail",
145 [KPF_HUGE] = "G:huge",
146 [KPF_UNEVICTABLE] = "u:unevictable",
147 [KPF_HWPOISON] = "X:hwpoison",
148 [KPF_NOPAGE] = "n:nopage",
149 [KPF_KSM] = "x:ksm",
150
151 [KPF_RESERVED] = "r:reserved",
152 [KPF_MLOCKED] = "m:mlocked",
153 [KPF_MAPPEDTODISK] = "d:mappedtodisk",
154 [KPF_PRIVATE] = "P:private",
155 [KPF_PRIVATE_2] = "p:private_2",
156 [KPF_OWNER_PRIVATE] = "O:owner_private",
157 [KPF_ARCH] = "h:arch",
158 [KPF_UNCACHED] = "c:uncached",
159
160 [KPF_READAHEAD] = "I:readahead",
161 [KPF_SLOB_FREE] = "P:slob_free",
162 [KPF_SLUB_FROZEN] = "A:slub_frozen",
163 [KPF_SLUB_DEBUG] = "E:slub_debug",
164};
165
166
167static const char *debugfs_known_mountpoints[] = {
168 "/sys/kernel/debug",
169 "/debug",
170 0,
171};
172
173/*
174 * data structures
175 */
176
177static int opt_raw; /* for kernel developers */
178static int opt_list; /* list pages (in ranges) */
179static int opt_no_summary; /* don't show summary */
180static pid_t opt_pid; /* process to walk */
181
182#define MAX_ADDR_RANGES 1024
183static int nr_addr_ranges;
184static unsigned long opt_offset[MAX_ADDR_RANGES];
185static unsigned long opt_size[MAX_ADDR_RANGES];
186
187#define MAX_VMAS 10240
188static int nr_vmas;
189static unsigned long pg_start[MAX_VMAS];
190static unsigned long pg_end[MAX_VMAS];
191
192#define MAX_BIT_FILTERS 64
193static int nr_bit_filters;
194static uint64_t opt_mask[MAX_BIT_FILTERS];
195static uint64_t opt_bits[MAX_BIT_FILTERS];
196
197static int page_size;
198
199static int pagemap_fd;
200static int kpageflags_fd;
201
202static int opt_hwpoison;
203static int opt_unpoison;
204
205static char hwpoison_debug_fs[MAX_PATH+1];
206static int hwpoison_inject_fd;
207static int hwpoison_forget_fd;
208
209#define HASH_SHIFT 13
210#define HASH_SIZE (1 << HASH_SHIFT)
211#define HASH_MASK (HASH_SIZE - 1)
212#define HASH_KEY(flags) (flags & HASH_MASK)
213
214static unsigned long total_pages;
215static unsigned long nr_pages[HASH_SIZE];
216static uint64_t page_flags[HASH_SIZE];
217
218
219/*
220 * helper functions
221 */
222
223#define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0]))
224
225#define min_t(type, x, y) ({ \
226 type __min1 = (x); \
227 type __min2 = (y); \
228 __min1 < __min2 ? __min1 : __min2; })
229
230#define max_t(type, x, y) ({ \
231 type __max1 = (x); \
232 type __max2 = (y); \
233 __max1 > __max2 ? __max1 : __max2; })
234
235static unsigned long pages2mb(unsigned long pages)
236{
237 return (pages * page_size) >> 20;
238}
239
240static void fatal(const char *x, ...)
241{
242 va_list ap;
243
244 va_start(ap, x);
245 vfprintf(stderr, x, ap);
246 va_end(ap);
247 exit(EXIT_FAILURE);
248}
249
250static int checked_open(const char *pathname, int flags)
251{
252 int fd = open(pathname, flags);
253
254 if (fd < 0) {
255 perror(pathname);
256 exit(EXIT_FAILURE);
257 }
258
259 return fd;
260}
261
262/*
263 * pagemap/kpageflags routines
264 */
265
266static unsigned long do_u64_read(int fd, char *name,
267 uint64_t *buf,
268 unsigned long index,
269 unsigned long count)
270{
271 long bytes;
272
273 if (index > ULONG_MAX / 8)
274 fatal("index overflow: %lu\n", index);
275
276 if (lseek(fd, index * 8, SEEK_SET) < 0) {
277 perror(name);
278 exit(EXIT_FAILURE);
279 }
280
281 bytes = read(fd, buf, count * 8);
282 if (bytes < 0) {
283 perror(name);
284 exit(EXIT_FAILURE);
285 }
286 if (bytes % 8)
287 fatal("partial read: %lu bytes\n", bytes);
288
289 return bytes / 8;
290}
291
292static unsigned long kpageflags_read(uint64_t *buf,
293 unsigned long index,
294 unsigned long pages)
295{
296 return do_u64_read(kpageflags_fd, PROC_KPAGEFLAGS, buf, index, pages);
297}
298
299static unsigned long pagemap_read(uint64_t *buf,
300 unsigned long index,
301 unsigned long pages)
302{
303 return do_u64_read(pagemap_fd, "/proc/pid/pagemap", buf, index, pages);
304}
305
306static unsigned long pagemap_pfn(uint64_t val)
307{
308 unsigned long pfn;
309
310 if (val & PM_PRESENT)
311 pfn = PM_PFRAME(val);
312 else
313 pfn = 0;
314
315 return pfn;
316}
317
318
319/*
320 * page flag names
321 */
322
323static char *page_flag_name(uint64_t flags)
324{
325 static char buf[65];
326 int present;
327 int i, j;
328
329 for (i = 0, j = 0; i < ARRAY_SIZE(page_flag_names); i++) {
330 present = (flags >> i) & 1;
331 if (!page_flag_names[i]) {
332 if (present)
333 fatal("unknown flag bit %d\n", i);
334 continue;
335 }
336 buf[j++] = present ? page_flag_names[i][0] : '_';
337 }
338
339 return buf;
340}
341
342static char *page_flag_longname(uint64_t flags)
343{
344 static char buf[1024];
345 int i, n;
346
347 for (i = 0, n = 0; i < ARRAY_SIZE(page_flag_names); i++) {
348 if (!page_flag_names[i])
349 continue;
350 if ((flags >> i) & 1)
351 n += snprintf(buf + n, sizeof(buf) - n, "%s,",
352 page_flag_names[i] + 2);
353 }
354 if (n)
355 n--;
356 buf[n] = '\0';
357
358 return buf;
359}
360
361
362/*
363 * page list and summary
364 */
365
366static void show_page_range(unsigned long voffset,
367 unsigned long offset, uint64_t flags)
368{
369 static uint64_t flags0;
370 static unsigned long voff;
371 static unsigned long index;
372 static unsigned long count;
373
374 if (flags == flags0 && offset == index + count &&
375 (!opt_pid || voffset == voff + count)) {
376 count++;
377 return;
378 }
379
380 if (count) {
381 if (opt_pid)
382 printf("%lx\t", voff);
383 printf("%lx\t%lx\t%s\n",
384 index, count, page_flag_name(flags0));
385 }
386
387 flags0 = flags;
388 index = offset;
389 voff = voffset;
390 count = 1;
391}
392
393static void show_page(unsigned long voffset,
394 unsigned long offset, uint64_t flags)
395{
396 if (opt_pid)
397 printf("%lx\t", voffset);
398 printf("%lx\t%s\n", offset, page_flag_name(flags));
399}
400
401static void show_summary(void)
402{
403 int i;
404
405 printf(" flags\tpage-count MB"
406 " symbolic-flags\t\t\tlong-symbolic-flags\n");
407
408 for (i = 0; i < ARRAY_SIZE(nr_pages); i++) {
409 if (nr_pages[i])
410 printf("0x%016llx\t%10lu %8lu %s\t%s\n",
411 (unsigned long long)page_flags[i],
412 nr_pages[i],
413 pages2mb(nr_pages[i]),
414 page_flag_name(page_flags[i]),
415 page_flag_longname(page_flags[i]));
416 }
417
418 printf(" total\t%10lu %8lu\n",
419 total_pages, pages2mb(total_pages));
420}
421
422
423/*
424 * page flag filters
425 */
426
427static int bit_mask_ok(uint64_t flags)
428{
429 int i;
430
431 for (i = 0; i < nr_bit_filters; i++) {
432 if (opt_bits[i] == KPF_ALL_BITS) {
433 if ((flags & opt_mask[i]) == 0)
434 return 0;
435 } else {
436 if ((flags & opt_mask[i]) != opt_bits[i])
437 return 0;
438 }
439 }
440
441 return 1;
442}
443
444static uint64_t expand_overloaded_flags(uint64_t flags)
445{
446 /* SLOB/SLUB overload several page flags */
447 if (flags & BIT(SLAB)) {
448 if (flags & BIT(PRIVATE))
449 flags ^= BIT(PRIVATE) | BIT(SLOB_FREE);
450 if (flags & BIT(ACTIVE))
451 flags ^= BIT(ACTIVE) | BIT(SLUB_FROZEN);
452 if (flags & BIT(ERROR))
453 flags ^= BIT(ERROR) | BIT(SLUB_DEBUG);
454 }
455
456 /* PG_reclaim is overloaded as PG_readahead in the read path */
457 if ((flags & (BIT(RECLAIM) | BIT(WRITEBACK))) == BIT(RECLAIM))
458 flags ^= BIT(RECLAIM) | BIT(READAHEAD);
459
460 return flags;
461}
462
463static uint64_t well_known_flags(uint64_t flags)
464{
465 /* hide flags intended only for kernel hacker */
466 flags &= ~KPF_HACKERS_BITS;
467
468 /* hide non-hugeTLB compound pages */
469 if ((flags & BITS_COMPOUND) && !(flags & BIT(HUGE)))
470 flags &= ~BITS_COMPOUND;
471
472 return flags;
473}
474
475static uint64_t kpageflags_flags(uint64_t flags)
476{
477 flags = expand_overloaded_flags(flags);
478
479 if (!opt_raw)
480 flags = well_known_flags(flags);
481
482 return flags;
483}
484
485/* verify that a mountpoint is actually a debugfs instance */
486static int debugfs_valid_mountpoint(const char *debugfs)
487{
488 struct statfs st_fs;
489
490 if (statfs(debugfs, &st_fs) < 0)
491 return -ENOENT;
492 else if (st_fs.f_type != (long) DEBUGFS_MAGIC)
493 return -ENOENT;
494
495 return 0;
496}
497
498/* find the path to the mounted debugfs */
499static const char *debugfs_find_mountpoint(void)
500{
501 const char **ptr;
502 char type[100];
503 FILE *fp;
504
505 ptr = debugfs_known_mountpoints;
506 while (*ptr) {
507 if (debugfs_valid_mountpoint(*ptr) == 0) {
508 strcpy(hwpoison_debug_fs, *ptr);
509 return hwpoison_debug_fs;
510 }
511 ptr++;
512 }
513
514 /* give up and parse /proc/mounts */
515 fp = fopen("/proc/mounts", "r");
516 if (fp == NULL)
517 perror("Can't open /proc/mounts for read");
518
519 while (fscanf(fp, "%*s %"
520 STR(MAX_PATH)
521 "s %99s %*s %*d %*d\n",
522 hwpoison_debug_fs, type) == 2) {
523 if (strcmp(type, "debugfs") == 0)
524 break;
525 }
526 fclose(fp);
527
528 if (strcmp(type, "debugfs") != 0)
529 return NULL;
530
531 return hwpoison_debug_fs;
532}
533
534/* mount the debugfs somewhere if it's not mounted */
535
536static void debugfs_mount(void)
537{
538 const char **ptr;
539
540 /* see if it's already mounted */
541 if (debugfs_find_mountpoint())
542 return;
543
544 ptr = debugfs_known_mountpoints;
545 while (*ptr) {
546 if (mount(NULL, *ptr, "debugfs", 0, NULL) == 0) {
547 /* save the mountpoint */
548 strcpy(hwpoison_debug_fs, *ptr);
549 break;
550 }
551 ptr++;
552 }
553
554 if (*ptr == NULL) {
555 perror("mount debugfs");
556 exit(EXIT_FAILURE);
557 }
558}
559
560/*
561 * page actions
562 */
563
564static void prepare_hwpoison_fd(void)
565{
566 char buf[MAX_PATH + 1];
567
568 debugfs_mount();
569
570 if (opt_hwpoison && !hwpoison_inject_fd) {
571 snprintf(buf, MAX_PATH, "%s/hwpoison/corrupt-pfn",
572 hwpoison_debug_fs);
573 hwpoison_inject_fd = checked_open(buf, O_WRONLY);
574 }
575
576 if (opt_unpoison && !hwpoison_forget_fd) {
577 snprintf(buf, MAX_PATH, "%s/hwpoison/unpoison-pfn",
578 hwpoison_debug_fs);
579 hwpoison_forget_fd = checked_open(buf, O_WRONLY);
580 }
581}
582
583static int hwpoison_page(unsigned long offset)
584{
585 char buf[100];
586 int len;
587
588 len = sprintf(buf, "0x%lx\n", offset);
589 len = write(hwpoison_inject_fd, buf, len);
590 if (len < 0) {
591 perror("hwpoison inject");
592 return len;
593 }
594 return 0;
595}
596
597static int unpoison_page(unsigned long offset)
598{
599 char buf[100];
600 int len;
601
602 len = sprintf(buf, "0x%lx\n", offset);
603 len = write(hwpoison_forget_fd, buf, len);
604 if (len < 0) {
605 perror("hwpoison forget");
606 return len;
607 }
608 return 0;
609}
610
611/*
612 * page frame walker
613 */
614
615static int hash_slot(uint64_t flags)
616{
617 int k = HASH_KEY(flags);
618 int i;
619
620 /* Explicitly reserve slot 0 for flags 0: the following logic
621 * cannot distinguish an unoccupied slot from slot (flags==0).
622 */
623 if (flags == 0)
624 return 0;
625
626 /* search through the remaining (HASH_SIZE-1) slots */
627 for (i = 1; i < ARRAY_SIZE(page_flags); i++, k++) {
628 if (!k || k >= ARRAY_SIZE(page_flags))
629 k = 1;
630 if (page_flags[k] == 0) {
631 page_flags[k] = flags;
632 return k;
633 }
634 if (page_flags[k] == flags)
635 return k;
636 }
637
638 fatal("hash table full: bump up HASH_SHIFT?\n");
639 exit(EXIT_FAILURE);
640}
641
642static void add_page(unsigned long voffset,
643 unsigned long offset, uint64_t flags)
644{
645 flags = kpageflags_flags(flags);
646
647 if (!bit_mask_ok(flags))
648 return;
649
650 if (opt_hwpoison)
651 hwpoison_page(offset);
652 if (opt_unpoison)
653 unpoison_page(offset);
654
655 if (opt_list == 1)
656 show_page_range(voffset, offset, flags);
657 else if (opt_list == 2)
658 show_page(voffset, offset, flags);
659
660 nr_pages[hash_slot(flags)]++;
661 total_pages++;
662}
663
664#define KPAGEFLAGS_BATCH (64 << 10) /* 64k pages */
665static void walk_pfn(unsigned long voffset,
666 unsigned long index,
667 unsigned long count)
668{
669 uint64_t buf[KPAGEFLAGS_BATCH];
670 unsigned long batch;
671 long pages;
672 unsigned long i;
673
674 while (count) {
675 batch = min_t(unsigned long, count, KPAGEFLAGS_BATCH);
676 pages = kpageflags_read(buf, index, batch);
677 if (pages == 0)
678 break;
679
680 for (i = 0; i < pages; i++)
681 add_page(voffset + i, index + i, buf[i]);
682
683 index += pages;
684 count -= pages;
685 }
686}
687
688#define PAGEMAP_BATCH (64 << 10)
689static void walk_vma(unsigned long index, unsigned long count)
690{
691 uint64_t buf[PAGEMAP_BATCH];
692 unsigned long batch;
693 unsigned long pages;
694 unsigned long pfn;
695 unsigned long i;
696
697 while (count) {
698 batch = min_t(unsigned long, count, PAGEMAP_BATCH);
699 pages = pagemap_read(buf, index, batch);
700 if (pages == 0)
701 break;
702
703 for (i = 0; i < pages; i++) {
704 pfn = pagemap_pfn(buf[i]);
705 if (pfn)
706 walk_pfn(index + i, pfn, 1);
707 }
708
709 index += pages;
710 count -= pages;
711 }
712}
713
714static void walk_task(unsigned long index, unsigned long count)
715{
716 const unsigned long end = index + count;
717 unsigned long start;
718 int i = 0;
719
720 while (index < end) {
721
722 while (pg_end[i] <= index)
723 if (++i >= nr_vmas)
724 return;
725 if (pg_start[i] >= end)
726 return;
727
728 start = max_t(unsigned long, pg_start[i], index);
729 index = min_t(unsigned long, pg_end[i], end);
730
731 assert(start < index);
732 walk_vma(start, index - start);
733 }
734}
735
736static void add_addr_range(unsigned long offset, unsigned long size)
737{
738 if (nr_addr_ranges >= MAX_ADDR_RANGES)
739 fatal("too many addr ranges\n");
740
741 opt_offset[nr_addr_ranges] = offset;
742 opt_size[nr_addr_ranges] = min_t(unsigned long, size, ULONG_MAX-offset);
743 nr_addr_ranges++;
744}
745
746static void walk_addr_ranges(void)
747{
748 int i;
749
750 kpageflags_fd = checked_open(PROC_KPAGEFLAGS, O_RDONLY);
751
752 if (!nr_addr_ranges)
753 add_addr_range(0, ULONG_MAX);
754
755 for (i = 0; i < nr_addr_ranges; i++)
756 if (!opt_pid)
757 walk_pfn(0, opt_offset[i], opt_size[i]);
758 else
759 walk_task(opt_offset[i], opt_size[i]);
760
761 close(kpageflags_fd);
762}
763
764
765/*
766 * user interface
767 */
768
769static const char *page_flag_type(uint64_t flag)
770{
771 if (flag & KPF_HACKERS_BITS)
772 return "(r)";
773 if (flag & KPF_OVERLOADED_BITS)
774 return "(o)";
775 return " ";
776}
777
778static void usage(void)
779{
780 int i, j;
781
782 printf(
783"page-types [options]\n"
784" -r|--raw Raw mode, for kernel developers\n"
785" -d|--describe flags Describe flags\n"
786" -a|--addr addr-spec Walk a range of pages\n"
787" -b|--bits bits-spec Walk pages with specified bits\n"
788" -p|--pid pid Walk process address space\n"
789#if 0 /* planned features */
790" -f|--file filename Walk file address space\n"
791#endif
792" -l|--list Show page details in ranges\n"
793" -L|--list-each Show page details one by one\n"
794" -N|--no-summary Don't show summary info\n"
795" -X|--hwpoison hwpoison pages\n"
796" -x|--unpoison unpoison pages\n"
797" -h|--help Show this usage message\n"
798"flags:\n"
799" 0x10 bitfield format, e.g.\n"
800" anon bit-name, e.g.\n"
801" 0x10,anon comma-separated list, e.g.\n"
802"addr-spec:\n"
803" N one page at offset N (unit: pages)\n"
804" N+M pages range from N to N+M-1\n"
805" N,M pages range from N to M-1\n"
806" N, pages range from N to end\n"
807" ,M pages range from 0 to M-1\n"
808"bits-spec:\n"
809" bit1,bit2 (flags & (bit1|bit2)) != 0\n"
810" bit1,bit2=bit1 (flags & (bit1|bit2)) == bit1\n"
811" bit1,~bit2 (flags & (bit1|bit2)) == bit1\n"
812" =bit1,bit2 flags == (bit1|bit2)\n"
813"bit-names:\n"
814 );
815
816 for (i = 0, j = 0; i < ARRAY_SIZE(page_flag_names); i++) {
817 if (!page_flag_names[i])
818 continue;
819 printf("%16s%s", page_flag_names[i] + 2,
820 page_flag_type(1ULL << i));
821 if (++j > 3) {
822 j = 0;
823 putchar('\n');
824 }
825 }
826 printf("\n "
827 "(r) raw mode bits (o) overloaded bits\n");
828}
829
830static unsigned long long parse_number(const char *str)
831{
832 unsigned long long n;
833
834 n = strtoll(str, NULL, 0);
835
836 if (n == 0 && str[0] != '0')
837 fatal("invalid name or number: %s\n", str);
838
839 return n;
840}
841
842static void parse_pid(const char *str)
843{
844 FILE *file;
845 char buf[5000];
846
847 opt_pid = parse_number(str);
848
849 sprintf(buf, "/proc/%d/pagemap", opt_pid);
850 pagemap_fd = checked_open(buf, O_RDONLY);
851
852 sprintf(buf, "/proc/%d/maps", opt_pid);
853 file = fopen(buf, "r");
854 if (!file) {
855 perror(buf);
856 exit(EXIT_FAILURE);
857 }
858
859 while (fgets(buf, sizeof(buf), file) != NULL) {
860 unsigned long vm_start;
861 unsigned long vm_end;
862 unsigned long long pgoff;
863 int major, minor;
864 char r, w, x, s;
865 unsigned long ino;
866 int n;
867
868 n = sscanf(buf, "%lx-%lx %c%c%c%c %llx %x:%x %lu",
869 &vm_start,
870 &vm_end,
871 &r, &w, &x, &s,
872 &pgoff,
873 &major, &minor,
874 &ino);
875 if (n < 10) {
876 fprintf(stderr, "unexpected line: %s\n", buf);
877 continue;
878 }
879 pg_start[nr_vmas] = vm_start / page_size;
880 pg_end[nr_vmas] = vm_end / page_size;
881 if (++nr_vmas >= MAX_VMAS) {
882 fprintf(stderr, "too many VMAs\n");
883 break;
884 }
885 }
886 fclose(file);
887}
888
889static void parse_file(const char *name)
890{
891}
892
893static void parse_addr_range(const char *optarg)
894{
895 unsigned long offset;
896 unsigned long size;
897 char *p;
898
899 p = strchr(optarg, ',');
900 if (!p)
901 p = strchr(optarg, '+');
902
903 if (p == optarg) {
904 offset = 0;
905 size = parse_number(p + 1);
906 } else if (p) {
907 offset = parse_number(optarg);
908 if (p[1] == '\0')
909 size = ULONG_MAX;
910 else {
911 size = parse_number(p + 1);
912 if (*p == ',') {
913 if (size < offset)
914 fatal("invalid range: %lu,%lu\n",
915 offset, size);
916 size -= offset;
917 }
918 }
919 } else {
920 offset = parse_number(optarg);
921 size = 1;
922 }
923
924 add_addr_range(offset, size);
925}
926
927static void add_bits_filter(uint64_t mask, uint64_t bits)
928{
929 if (nr_bit_filters >= MAX_BIT_FILTERS)
930 fatal("too much bit filters\n");
931
932 opt_mask[nr_bit_filters] = mask;
933 opt_bits[nr_bit_filters] = bits;
934 nr_bit_filters++;
935}
936
937static uint64_t parse_flag_name(const char *str, int len)
938{
939 int i;
940
941 if (!*str || !len)
942 return 0;
943
944 if (len <= 8 && !strncmp(str, "compound", len))
945 return BITS_COMPOUND;
946
947 for (i = 0; i < ARRAY_SIZE(page_flag_names); i++) {
948 if (!page_flag_names[i])
949 continue;
950 if (!strncmp(str, page_flag_names[i] + 2, len))
951 return 1ULL << i;
952 }
953
954 return parse_number(str);
955}
956
957static uint64_t parse_flag_names(const char *str, int all)
958{
959 const char *p = str;
960 uint64_t flags = 0;
961
962 while (1) {
963 if (*p == ',' || *p == '=' || *p == '\0') {
964 if ((*str != '~') || (*str == '~' && all && *++str))
965 flags |= parse_flag_name(str, p - str);
966 if (*p != ',')
967 break;
968 str = p + 1;
969 }
970 p++;
971 }
972
973 return flags;
974}
975
976static void parse_bits_mask(const char *optarg)
977{
978 uint64_t mask;
979 uint64_t bits;
980 const char *p;
981
982 p = strchr(optarg, '=');
983 if (p == optarg) {
984 mask = KPF_ALL_BITS;
985 bits = parse_flag_names(p + 1, 0);
986 } else if (p) {
987 mask = parse_flag_names(optarg, 0);
988 bits = parse_flag_names(p + 1, 0);
989 } else if (strchr(optarg, '~')) {
990 mask = parse_flag_names(optarg, 1);
991 bits = parse_flag_names(optarg, 0);
992 } else {
993 mask = parse_flag_names(optarg, 0);
994 bits = KPF_ALL_BITS;
995 }
996
997 add_bits_filter(mask, bits);
998}
999
1000static void describe_flags(const char *optarg)
1001{
1002 uint64_t flags = parse_flag_names(optarg, 0);
1003
1004 printf("0x%016llx\t%s\t%s\n",
1005 (unsigned long long)flags,
1006 page_flag_name(flags),
1007 page_flag_longname(flags));
1008}
1009
1010static const struct option opts[] = {
1011 { "raw" , 0, NULL, 'r' },
1012 { "pid" , 1, NULL, 'p' },
1013 { "file" , 1, NULL, 'f' },
1014 { "addr" , 1, NULL, 'a' },
1015 { "bits" , 1, NULL, 'b' },
1016 { "describe" , 1, NULL, 'd' },
1017 { "list" , 0, NULL, 'l' },
1018 { "list-each" , 0, NULL, 'L' },
1019 { "no-summary", 0, NULL, 'N' },
1020 { "hwpoison" , 0, NULL, 'X' },
1021 { "unpoison" , 0, NULL, 'x' },
1022 { "help" , 0, NULL, 'h' },
1023 { NULL , 0, NULL, 0 }
1024};
1025
1026int main(int argc, char *argv[])
1027{
1028 int c;
1029
1030 page_size = getpagesize();
1031
1032 while ((c = getopt_long(argc, argv,
1033 "rp:f:a:b:d:lLNXxh", opts, NULL)) != -1) {
1034 switch (c) {
1035 case 'r':
1036 opt_raw = 1;
1037 break;
1038 case 'p':
1039 parse_pid(optarg);
1040 break;
1041 case 'f':
1042 parse_file(optarg);
1043 break;
1044 case 'a':
1045 parse_addr_range(optarg);
1046 break;
1047 case 'b':
1048 parse_bits_mask(optarg);
1049 break;
1050 case 'd':
1051 describe_flags(optarg);
1052 exit(0);
1053 case 'l':
1054 opt_list = 1;
1055 break;
1056 case 'L':
1057 opt_list = 2;
1058 break;
1059 case 'N':
1060 opt_no_summary = 1;
1061 break;
1062 case 'X':
1063 opt_hwpoison = 1;
1064 prepare_hwpoison_fd();
1065 break;
1066 case 'x':
1067 opt_unpoison = 1;
1068 prepare_hwpoison_fd();
1069 break;
1070 case 'h':
1071 usage();
1072 exit(0);
1073 default:
1074 usage();
1075 exit(1);
1076 }
1077 }
1078
1079 if (opt_list && opt_pid)
1080 printf("voffset\t");
1081 if (opt_list == 1)
1082 printf("offset\tlen\tflags\n");
1083 if (opt_list == 2)
1084 printf("offset\tflags\n");
1085
1086 walk_addr_ranges();
1087
1088 if (opt_list == 1)
1089 show_page_range(0, 0, 0); /* drain the buffer */
1090
1091 if (opt_no_summary)
1092 return 0;
1093
1094 if (opt_list)
1095 printf("\n\n");
1096
1097 show_summary();
1098
1099 return 0;
1100}
diff --git a/Documentation/vm/pagemap.txt b/Documentation/vm/pagemap.txt
index df09b9650a81..4600cbe3d6be 100644
--- a/Documentation/vm/pagemap.txt
+++ b/Documentation/vm/pagemap.txt
@@ -60,6 +60,7 @@ There are three components to pagemap:
60 19. HWPOISON 60 19. HWPOISON
61 20. NOPAGE 61 20. NOPAGE
62 21. KSM 62 21. KSM
63 22. THP
63 64
64Short descriptions to the page flags: 65Short descriptions to the page flags:
65 66
@@ -97,6 +98,9 @@ Short descriptions to the page flags:
9721. KSM 9821. KSM
98 identical memory pages dynamically shared between one or more processes 99 identical memory pages dynamically shared between one or more processes
99 100
10122. THP
102 contiguous pages which construct transparent hugepages
103
100 [IO related page flags] 104 [IO related page flags]
101 1. ERROR IO error occurred 105 1. ERROR IO error occurred
102 3. UPTODATE page has up-to-date data 106 3. UPTODATE page has up-to-date data
diff --git a/Documentation/vm/unevictable-lru.txt b/Documentation/vm/unevictable-lru.txt
index 97bae3c576c2..fa206cccf89f 100644
--- a/Documentation/vm/unevictable-lru.txt
+++ b/Documentation/vm/unevictable-lru.txt
@@ -538,7 +538,7 @@ different reverse map mechanisms.
538 process because mlocked pages are migratable. However, for reclaim, if 538 process because mlocked pages are migratable. However, for reclaim, if
539 the page is mapped into a VM_LOCKED VMA, the scan stops. 539 the page is mapped into a VM_LOCKED VMA, the scan stops.
540 540
541 try_to_unmap_anon() attempts to acquire in read mode the mmap semphore of 541 try_to_unmap_anon() attempts to acquire in read mode the mmap semaphore of
542 the mm_struct to which the VMA belongs. If this is successful, it will 542 the mm_struct to which the VMA belongs. If this is successful, it will
543 mlock the page via mlock_vma_page() - we wouldn't have gotten to 543 mlock the page via mlock_vma_page() - we wouldn't have gotten to
544 try_to_unmap_anon() if the page were already mlocked - and will return 544 try_to_unmap_anon() if the page were already mlocked - and will return
@@ -619,11 +619,11 @@ all PTEs from the page. For this purpose, the unevictable/mlock infrastructure
619introduced a variant of try_to_unmap() called try_to_munlock(). 619introduced a variant of try_to_unmap() called try_to_munlock().
620 620
621try_to_munlock() calls the same functions as try_to_unmap() for anonymous and 621try_to_munlock() calls the same functions as try_to_unmap() for anonymous and
622mapped file pages with an additional argument specifing unlock versus unmap 622mapped file pages with an additional argument specifying unlock versus unmap
623processing. Again, these functions walk the respective reverse maps looking 623processing. Again, these functions walk the respective reverse maps looking
624for VM_LOCKED VMAs. When such a VMA is found for anonymous pages and file 624for VM_LOCKED VMAs. When such a VMA is found for anonymous pages and file
625pages mapped in linear VMAs, as in the try_to_unmap() case, the functions 625pages mapped in linear VMAs, as in the try_to_unmap() case, the functions
626attempt to acquire the associated mmap semphore, mlock the page via 626attempt to acquire the associated mmap semaphore, mlock the page via
627mlock_vma_page() and return SWAP_MLOCK. This effectively undoes the 627mlock_vma_page() and return SWAP_MLOCK. This effectively undoes the
628pre-clearing of the page's PG_mlocked done by munlock_vma_page. 628pre-clearing of the page's PG_mlocked done by munlock_vma_page.
629 629
@@ -641,7 +641,7 @@ with it - the usual fallback position.
641Note that try_to_munlock()'s reverse map walk must visit every VMA in a page's 641Note that try_to_munlock()'s reverse map walk must visit every VMA in a page's
642reverse map to determine that a page is NOT mapped into any VM_LOCKED VMA. 642reverse map to determine that a page is NOT mapped into any VM_LOCKED VMA.
643However, the scan can terminate when it encounters a VM_LOCKED VMA and can 643However, the scan can terminate when it encounters a VM_LOCKED VMA and can
644successfully acquire the VMA's mmap semphore for read and mlock the page. 644successfully acquire the VMA's mmap semaphore for read and mlock the page.
645Although try_to_munlock() might be called a great many times when munlocking a 645Although try_to_munlock() might be called a great many times when munlocking a
646large region or tearing down a large address space that has been mlocked via 646large region or tearing down a large address space that has been mlocked via
647mlockall(), overall this is a fairly rare event. 647mlockall(), overall this is a fairly rare event.
diff --git a/Documentation/watchdog/00-INDEX b/Documentation/watchdog/00-INDEX
deleted file mode 100644
index fc9082a1477a..000000000000
--- a/Documentation/watchdog/00-INDEX
+++ /dev/null
@@ -1,19 +0,0 @@
100-INDEX
2 - this file.
3convert_drivers_to_kernel_api.txt
4 - how-to for converting old watchdog drivers to the new kernel API.
5hpwdt.txt
6 - information on the HP iLO2 NMI watchdog
7pcwd-watchdog.txt
8 - documentation for Berkshire Products PC Watchdog ISA cards.
9src/
10 - directory holding watchdog related example programs.
11watchdog-api.txt
12 - description of the Linux Watchdog driver API.
13watchdog-kernel-api.txt
14 - description of the Linux WatchDog Timer Driver Core kernel API.
15watchdog-parameters.txt
16 - information on driver parameters (for drivers other than
17 the ones that have driver-specific files here)
18wdt.txt
19 - description of the Watchdog Timer Interfaces for Linux.
diff --git a/Documentation/watchdog/convert_drivers_to_kernel_api.txt b/Documentation/watchdog/convert_drivers_to_kernel_api.txt
index be8119bb15d2..271b8850dde7 100644
--- a/Documentation/watchdog/convert_drivers_to_kernel_api.txt
+++ b/Documentation/watchdog/convert_drivers_to_kernel_api.txt
@@ -59,6 +59,10 @@ Here is a overview of the functions and probably needed actions:
59 WDIOC_GETTIMEOUT: 59 WDIOC_GETTIMEOUT:
60 No preparations needed 60 No preparations needed
61 61
62 WDIOC_GETTIMELEFT:
63 It needs get_timeleft() callback to be defined. Otherwise it
64 will return EOPNOTSUPP
65
62 Other IOCTLs can be served using the ioctl-callback. Note that this is mainly 66 Other IOCTLs can be served using the ioctl-callback. Note that this is mainly
63 intended for porting old drivers; new drivers should not invent private IOCTLs. 67 intended for porting old drivers; new drivers should not invent private IOCTLs.
64 Private IOCTLs are processed first. When the callback returns with 68 Private IOCTLs are processed first. When the callback returns with
diff --git a/Documentation/watchdog/watchdog-kernel-api.txt b/Documentation/watchdog/watchdog-kernel-api.txt
index 4b93c28e35c6..227f6cd0e5fa 100644
--- a/Documentation/watchdog/watchdog-kernel-api.txt
+++ b/Documentation/watchdog/watchdog-kernel-api.txt
@@ -1,6 +1,6 @@
1The Linux WatchDog Timer Driver Core kernel API. 1The Linux WatchDog Timer Driver Core kernel API.
2=============================================== 2===============================================
3Last reviewed: 29-Nov-2011 3Last reviewed: 16-Mar-2012
4 4
5Wim Van Sebroeck <wim@iguana.be> 5Wim Van Sebroeck <wim@iguana.be>
6 6
@@ -77,6 +77,7 @@ struct watchdog_ops {
77 int (*ping)(struct watchdog_device *); 77 int (*ping)(struct watchdog_device *);
78 unsigned int (*status)(struct watchdog_device *); 78 unsigned int (*status)(struct watchdog_device *);
79 int (*set_timeout)(struct watchdog_device *, unsigned int); 79 int (*set_timeout)(struct watchdog_device *, unsigned int);
80 unsigned int (*get_timeleft)(struct watchdog_device *);
80 long (*ioctl)(struct watchdog_device *, unsigned int, unsigned long); 81 long (*ioctl)(struct watchdog_device *, unsigned int, unsigned long);
81}; 82};
82 83
@@ -117,11 +118,13 @@ they are supported. These optional routines/operations are:
117 status of the device is reported with watchdog WDIOF_* status flags/bits. 118 status of the device is reported with watchdog WDIOF_* status flags/bits.
118* set_timeout: this routine checks and changes the timeout of the watchdog 119* set_timeout: this routine checks and changes the timeout of the watchdog
119 timer device. It returns 0 on success, -EINVAL for "parameter out of range" 120 timer device. It returns 0 on success, -EINVAL for "parameter out of range"
120 and -EIO for "could not write value to the watchdog". On success the timeout 121 and -EIO for "could not write value to the watchdog". On success this
121 value of the watchdog_device will be changed to the value that was just used 122 routine should set the timeout value of the watchdog_device to the
122 to re-program the watchdog timer device. 123 achieved timeout value (which may be different from the requested one
124 because the watchdog does not necessarily has a 1 second resolution).
123 (Note: the WDIOF_SETTIMEOUT needs to be set in the options field of the 125 (Note: the WDIOF_SETTIMEOUT needs to be set in the options field of the
124 watchdog's info structure). 126 watchdog's info structure).
127* get_timeleft: this routines returns the time that's left before a reset.
125* ioctl: if this routine is present then it will be called first before we do 128* ioctl: if this routine is present then it will be called first before we do
126 our own internal ioctl call handling. This routine should return -ENOIOCTLCMD 129 our own internal ioctl call handling. This routine should return -ENOIOCTLCMD
127 if a command is not supported. The parameters that are passed to the ioctl 130 if a command is not supported. The parameters that are passed to the ioctl
@@ -167,4 +170,4 @@ driver specific data to and a pointer to the data itself.
167 170
168The watchdog_get_drvdata function allows you to retrieve driver specific data. 171The watchdog_get_drvdata function allows you to retrieve driver specific data.
169The argument of this function is the watchdog device where you want to retrieve 172The argument of this function is the watchdog device where you want to retrieve
170data from. The function retruns the pointer to the driver specific data. 173data from. The function returns the pointer to the driver specific data.
diff --git a/Documentation/zh_CN/HOWTO b/Documentation/zh_CN/HOWTO
index faf976c0c731..7fba5aab9ef9 100644
--- a/Documentation/zh_CN/HOWTO
+++ b/Documentation/zh_CN/HOWTO
@@ -316,7 +316,7 @@ linux-kernel邮件列表中提供反馈,告诉大家你遇到了问题还是
316 git.kernel.org:/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6.git 316 git.kernel.org:/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6.git
317 317
318 使用quilt管理的补丁集: 318 使用quilt管理的补丁集:
319 - USB, PCI, 驱动程序核心和I2C, Greg Kroah-Hartman <gregkh@suse.de> 319 - USB, PCI, 驱动程序核心和I2C, Greg Kroah-Hartman <gregkh@linuxfoundation.org>
320 kernel.org/pub/linux/kernel/people/gregkh/gregkh-2.6/ 320 kernel.org/pub/linux/kernel/people/gregkh/gregkh-2.6/
321 - x86-64, 部分i386, Andi Kleen <ak@suse.de> 321 - x86-64, 部分i386, Andi Kleen <ak@suse.de>
322 ftp.firstfloor.org:/pub/ak/x86_64/quilt/ 322 ftp.firstfloor.org:/pub/ak/x86_64/quilt/
diff --git a/Documentation/zh_CN/magic-number.txt b/Documentation/zh_CN/magic-number.txt
index c278f412dc65..f606ba8598cf 100644
--- a/Documentation/zh_CN/magic-number.txt
+++ b/Documentation/zh_CN/magic-number.txt
@@ -89,7 +89,7 @@ TTY_DRIVER_MAGIC 0x5402 tty_driver include/linux/tty_driver.h
89MGSLPC_MAGIC 0x5402 mgslpc_info drivers/char/pcmcia/synclink_cs.c 89MGSLPC_MAGIC 0x5402 mgslpc_info drivers/char/pcmcia/synclink_cs.c
90TTY_LDISC_MAGIC 0x5403 tty_ldisc include/linux/tty_ldisc.h 90TTY_LDISC_MAGIC 0x5403 tty_ldisc include/linux/tty_ldisc.h
91USB_SERIAL_MAGIC 0x6702 usb_serial drivers/usb/serial/usb-serial.h 91USB_SERIAL_MAGIC 0x6702 usb_serial drivers/usb/serial/usb-serial.h
92FULL_DUPLEX_MAGIC 0x6969 drivers/net/tulip/de2104x.c 92FULL_DUPLEX_MAGIC 0x6969 drivers/net/ethernet/dec/tulip/de2104x.c
93USB_BLUETOOTH_MAGIC 0x6d02 usb_bluetooth drivers/usb/class/bluetty.c 93USB_BLUETOOTH_MAGIC 0x6d02 usb_bluetooth drivers/usb/class/bluetty.c
94RFCOMM_TTY_MAGIC 0x6d02 net/bluetooth/rfcomm/tty.c 94RFCOMM_TTY_MAGIC 0x6d02 net/bluetooth/rfcomm/tty.c
95USB_SERIAL_PORT_MAGIC 0x7301 usb_serial_port drivers/usb/serial/usb-serial.h 95USB_SERIAL_PORT_MAGIC 0x7301 usb_serial_port drivers/usb/serial/usb-serial.h