aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation
diff options
context:
space:
mode:
Diffstat (limited to 'Documentation')
-rw-r--r--Documentation/00-INDEX4
-rw-r--r--Documentation/ABI/obsolete/dv13949
-rw-r--r--Documentation/ABI/removed/dv139414
-rw-r--r--Documentation/ABI/removed/raw139415
-rw-r--r--Documentation/ABI/removed/raw1394_legacy_isochronous16
-rw-r--r--Documentation/ABI/removed/video139416
-rw-r--r--Documentation/ABI/testing/debugfs-ec20
-rw-r--r--Documentation/ABI/testing/debugfs-kmemtrace71
-rw-r--r--Documentation/ABI/testing/sysfs-ata99
-rw-r--r--Documentation/ABI/testing/sysfs-block-zram99
-rw-r--r--Documentation/ABI/testing/sysfs-bus-i2c-devices-hm635221
-rw-r--r--Documentation/ABI/testing/sysfs-bus-pci27
-rw-r--r--Documentation/ABI/testing/sysfs-devices-memory6
-rw-r--r--Documentation/ABI/testing/sysfs-devices-platform-_UDC_-gadget12
-rw-r--r--Documentation/ABI/testing/sysfs-devices-power88
-rw-r--r--Documentation/ABI/testing/sysfs-devices-system-cpu2
-rw-r--r--Documentation/ABI/testing/sysfs-devices-system-ibm-rtl22
-rw-r--r--Documentation/ABI/testing/sysfs-driver-hid-roccat-kone13
-rw-r--r--Documentation/ABI/testing/sysfs-driver-hid-roccat-pyra98
-rw-r--r--Documentation/ABI/testing/sysfs-i2c-bmp08531
-rw-r--r--Documentation/ABI/testing/sysfs-module12
-rw-r--r--Documentation/ABI/testing/sysfs-power44
-rw-r--r--Documentation/Changes12
-rw-r--r--Documentation/DMA-API-HOWTO.txt16
-rw-r--r--Documentation/DMA-API.txt6
-rw-r--r--Documentation/DocBook/80211.tmpl495
-rw-r--r--Documentation/DocBook/Makefile8
-rw-r--r--Documentation/DocBook/device-drivers.tmpl7
-rw-r--r--Documentation/DocBook/drm.tmpl1
-rw-r--r--Documentation/DocBook/dvb/dvbapi.xml19
-rw-r--r--Documentation/DocBook/dvb/frontend.h.xml1
-rw-r--r--Documentation/DocBook/dvb/frontend.xml10
-rw-r--r--Documentation/DocBook/genericirq.tmpl84
-rw-r--r--Documentation/DocBook/kernel-api.tmpl11
-rw-r--r--Documentation/DocBook/kernel-locking.tmpl27
-rw-r--r--Documentation/DocBook/kgdb.tmpl108
-rw-r--r--Documentation/DocBook/mac80211.tmpl337
-rw-r--r--Documentation/DocBook/media-entities.tmpl7
-rw-r--r--Documentation/DocBook/media.tmpl8
-rw-r--r--Documentation/DocBook/scsi.tmpl2
-rw-r--r--Documentation/DocBook/stylesheet.xsl1
-rw-r--r--Documentation/DocBook/tracepoint.tmpl5
-rw-r--r--Documentation/DocBook/v4l/compat.xml29
-rw-r--r--Documentation/DocBook/v4l/controls.xml12
-rw-r--r--Documentation/DocBook/v4l/dev-rds.xml68
-rw-r--r--Documentation/DocBook/v4l/dev-teletext.xml29
-rw-r--r--Documentation/DocBook/v4l/fdl-appendix.xml2
-rw-r--r--Documentation/DocBook/v4l/lirc_device_interface.xml251
-rw-r--r--Documentation/DocBook/v4l/pixfmt-packed-rgb.xml78
-rw-r--r--Documentation/DocBook/v4l/pixfmt-srggb10.xml90
-rw-r--r--Documentation/DocBook/v4l/pixfmt-srggb8.xml67
-rw-r--r--Documentation/DocBook/v4l/pixfmt-y10.xml79
-rw-r--r--Documentation/DocBook/v4l/pixfmt.xml32
-rw-r--r--Documentation/DocBook/v4l/remote_controllers.xml2
-rw-r--r--Documentation/DocBook/v4l/v4l2.xml10
-rw-r--r--Documentation/DocBook/v4l/videodev2.h.xml106
-rw-r--r--Documentation/DocBook/v4l/vidioc-g-dv-preset.xml3
-rw-r--r--Documentation/DocBook/v4l/vidioc-g-dv-timings.xml3
-rw-r--r--Documentation/DocBook/v4l/vidioc-query-dv-preset.xml2
-rw-r--r--Documentation/DocBook/v4l/vidioc-querycap.xml7
-rw-r--r--Documentation/DocBook/v4l/vidioc-queryctrl.xml18
-rw-r--r--Documentation/DocBook/v4l/vidioc-s-hw-freq-seek.xml10
-rw-r--r--Documentation/HOWTO6
-rw-r--r--Documentation/PCI/pci.txt2
-rw-r--r--Documentation/RCU/RTFP.txt2
-rw-r--r--Documentation/RCU/checklist.txt46
-rw-r--r--Documentation/RCU/stallwarn.txt18
-rw-r--r--Documentation/RCU/trace.txt13
-rw-r--r--Documentation/SubmittingDrivers2
-rw-r--r--Documentation/SubmittingPatches11
-rw-r--r--Documentation/accounting/getdelays.c38
-rw-r--r--Documentation/acpi/method-customizing.txt2
-rw-r--r--Documentation/aoe/aoe.txt2
-rw-r--r--Documentation/apparmor.txt39
-rw-r--r--Documentation/arm/00-INDEX2
-rw-r--r--Documentation/arm/IXP20002
-rw-r--r--Documentation/arm/IXP4xx14
-rw-r--r--Documentation/arm/README4
-rw-r--r--Documentation/arm/SA1100/Assabet5
-rw-r--r--Documentation/arm/SA1100/Brutus2
-rw-r--r--Documentation/arm/SA1100/FreeBird6
-rw-r--r--Documentation/arm/SA1100/GraphicsClient2
-rw-r--r--Documentation/arm/SA1100/GraphicsMaster2
-rw-r--r--Documentation/arm/SA1100/Itsy2
-rw-r--r--Documentation/arm/SA1100/PLEB2
-rw-r--r--Documentation/arm/SA1100/Victor2
-rw-r--r--Documentation/arm/SA1100/nanoEngine2
-rw-r--r--Documentation/arm/memory.txt8
-rw-r--r--Documentation/arm/msm/gpiomux.txt176
-rw-r--r--Documentation/arm/tcm.txt30
-rw-r--r--Documentation/binfmt_misc.txt2
-rw-r--r--Documentation/blackfin/00-INDEX11
-rw-r--r--Documentation/blackfin/Filesystems169
-rw-r--r--Documentation/blackfin/bfin-spi-notes.txt14
-rw-r--r--Documentation/blackfin/cachefeatures.txt55
-rw-r--r--Documentation/block/00-INDEX4
-rw-r--r--Documentation/block/barrier.txt261
-rw-r--r--Documentation/block/biodoc.txt2
-rw-r--r--Documentation/block/cfq-iosched.txt45
-rw-r--r--Documentation/block/writeback_cache_control.txt86
-rw-r--r--Documentation/blockdev/paride.txt2
-rw-r--r--Documentation/cdrom/packet-writing.txt2
-rw-r--r--Documentation/cgroups/blkio-controller.txt134
-rw-r--r--Documentation/cgroups/cgroups.txt14
-rw-r--r--Documentation/cgroups/cpusets.txt2
-rw-r--r--Documentation/coccinelle.txt258
-rw-r--r--Documentation/cpu-hotplug.txt2
-rw-r--r--Documentation/cputopology.txt23
-rw-r--r--Documentation/development-process/4.Coding2
-rw-r--r--Documentation/device-mapper/dm-crypt.txt2
-rw-r--r--Documentation/devices.txt25
-rw-r--r--Documentation/dvb/faq.txt2
-rw-r--r--Documentation/dvb/get_dvb_firmware69
-rw-r--r--Documentation/dvb/lmedm04.txt58
-rw-r--r--Documentation/dynamic-debug-howto.txt22
-rw-r--r--Documentation/fb/framebuffer.txt2
-rw-r--r--Documentation/fb/viafb.txt48
-rw-r--r--Documentation/feature-removal-schedule.txt284
-rw-r--r--Documentation/filesystems/00-INDEX2
-rw-r--r--Documentation/filesystems/9p.txt6
-rw-r--r--Documentation/filesystems/Locking61
-rw-r--r--Documentation/filesystems/affs.txt2
-rw-r--r--Documentation/filesystems/befs.txt4
-rw-r--r--Documentation/filesystems/caching/fscache.txt10
-rw-r--r--Documentation/filesystems/ext4.txt14
-rw-r--r--Documentation/filesystems/isofs.txt2
-rw-r--r--Documentation/filesystems/nfs/00-INDEX4
-rw-r--r--Documentation/filesystems/nfs/idmapper.txt67
-rw-r--r--Documentation/filesystems/nfs/nfsroot.txt24
-rw-r--r--Documentation/filesystems/nfs/pnfs.txt48
-rw-r--r--Documentation/filesystems/nilfs2.txt12
-rw-r--r--Documentation/filesystems/ocfs2.txt7
-rw-r--r--Documentation/filesystems/porting45
-rw-r--r--Documentation/filesystems/proc.txt126
-rw-r--r--Documentation/filesystems/sharedsubtree.txt4
-rw-r--r--Documentation/filesystems/smbfs.txt8
-rw-r--r--Documentation/filesystems/squashfs.txt2
-rw-r--r--Documentation/filesystems/sysfs-pci.txt7
-rw-r--r--Documentation/filesystems/sysfs.txt46
-rw-r--r--Documentation/filesystems/vfat.txt3
-rw-r--r--Documentation/filesystems/vfs.txt6
-rw-r--r--Documentation/filesystems/xfs.txt11
-rw-r--r--Documentation/firmware_class/hotplug-script17
-rw-r--r--Documentation/gpio.txt57
-rw-r--r--Documentation/hwmon/adm10262
-rw-r--r--Documentation/hwmon/coretemp105
-rw-r--r--Documentation/hwmon/emc210333
-rw-r--r--Documentation/hwmon/g760a2
-rw-r--r--Documentation/hwmon/gl518sm3
-rw-r--r--Documentation/hwmon/hpfall.c2
-rw-r--r--Documentation/hwmon/it8728
-rw-r--r--Documentation/hwmon/jc4297
-rw-r--r--Documentation/hwmon/k8temp2
-rw-r--r--Documentation/hwmon/lm8566
-rw-r--r--Documentation/hwmon/lm9042
-rw-r--r--Documentation/hwmon/ltc424524
-rw-r--r--Documentation/hwmon/ltc426163
-rw-r--r--Documentation/hwmon/pc8742727
-rw-r--r--Documentation/hwmon/pcf859118
-rw-r--r--Documentation/hwmon/pkgtemp36
-rw-r--r--Documentation/hwmon/smm665157
-rw-r--r--Documentation/hwmon/smsc47m111
-rw-r--r--Documentation/hwmon/sysfs-interface51
-rw-r--r--Documentation/hwmon/thmc502
-rw-r--r--Documentation/hwmon/via686a2
-rw-r--r--Documentation/hwmon/w83627ehf15
-rw-r--r--Documentation/hwmon/w83627hf6
-rw-r--r--Documentation/hwmon/w83781d2
-rw-r--r--Documentation/hwmon/w83792d2
-rw-r--r--Documentation/i2c/busses/i2c-ali15352
-rw-r--r--Documentation/i2c/busses/i2c-ali15632
-rw-r--r--Documentation/i2c/busses/i2c-ali15x32
-rw-r--r--Documentation/i2c/busses/i2c-piix42
-rw-r--r--Documentation/i2c/busses/i2c-sis6302
-rw-r--r--Documentation/i2c/instantiating-devices2
-rw-r--r--Documentation/ia64/aliasing.txt2
-rw-r--r--Documentation/ia64/serial.txt2
-rw-r--r--Documentation/infiniband/user_verbs.txt2
-rw-r--r--Documentation/input/appletouch.txt2
-rw-r--r--Documentation/input/bcm5974.txt2
-rw-r--r--Documentation/input/iforce-protocol.txt2
-rw-r--r--Documentation/input/multi-touch-protocol.txt218
-rw-r--r--Documentation/input/ntrig.txt126
-rw-r--r--Documentation/input/sentelic.txt2
-rw-r--r--Documentation/input/xpad.txt2
-rw-r--r--Documentation/intel_txt.txt12
-rw-r--r--Documentation/ioctl/ioctl-number.txt14
-rw-r--r--Documentation/isdn/INTERFACE.CAPI8
-rw-r--r--Documentation/isdn/README2
-rw-r--r--Documentation/isdn/README.HiSax2
-rw-r--r--Documentation/isdn/README.gigaset117
-rw-r--r--Documentation/ja_JP/HOWTO2
-rw-r--r--Documentation/ja_JP/SubmittingPatches6
-rw-r--r--Documentation/kbuild/kbuild.txt8
-rw-r--r--Documentation/kbuild/kconfig.txt2
-rw-r--r--Documentation/kbuild/makefiles.txt106
-rw-r--r--Documentation/kernel-doc-nano-HOWTO.txt5
-rw-r--r--Documentation/kernel-docs.txt39
-rw-r--r--Documentation/kernel-parameters.txt413
-rw-r--r--Documentation/ko_KR/HOWTO8
-rw-r--r--Documentation/kprobes.txt9
-rw-r--r--Documentation/kvm/api.txt265
-rw-r--r--Documentation/kvm/mmu.txt52
-rw-r--r--Documentation/kvm/msr.txt153
-rw-r--r--Documentation/kvm/ppc-pv.txt196
-rw-r--r--Documentation/kvm/review-checklist.txt38
-rw-r--r--Documentation/kvm/timekeeping.txt612
-rw-r--r--Documentation/laptops/acer-wmi.txt2
-rw-r--r--Documentation/laptops/thinkpad-acpi.txt75
-rw-r--r--Documentation/ldm.txt2
-rw-r--r--Documentation/lguest/Makefile3
-rw-r--r--Documentation/lguest/lguest.c52
-rw-r--r--Documentation/md.txt2
-rw-r--r--Documentation/misc-devices/apds990x.txt111
-rw-r--r--Documentation/misc-devices/bh1770glc.txt116
-rw-r--r--Documentation/misc-devices/c2port.txt4
-rw-r--r--Documentation/mmc/00-INDEX4
-rw-r--r--Documentation/mmc/mmc-dev-attrs.txt56
-rw-r--r--Documentation/mtd/nand_ecc.txt2
-rw-r--r--Documentation/mutex-design.txt3
-rw-r--r--Documentation/networking/3c509.txt2
-rw-r--r--Documentation/networking/README.ipw21003
-rw-r--r--Documentation/networking/README.ipw22004
-rw-r--r--Documentation/networking/README.sb10004
-rw-r--r--Documentation/networking/arcnet.txt4
-rw-r--r--Documentation/networking/bonding.txt94
-rw-r--r--Documentation/networking/caif/spi_porting.txt208
-rw-r--r--Documentation/networking/can.txt12
-rw-r--r--Documentation/networking/dccp.txt29
-rw-r--r--Documentation/networking/decnet.txt2
-rw-r--r--Documentation/networking/dns_resolver.txt146
-rw-r--r--Documentation/networking/e1000.txt373
-rw-r--r--Documentation/networking/e1000e.txt302
-rw-r--r--Documentation/networking/fore200e.txt2
-rw-r--r--Documentation/networking/igb.txt132
-rw-r--r--Documentation/networking/igbvf.txt78
-rw-r--r--Documentation/networking/ip-sysctl.txt29
-rw-r--r--Documentation/networking/ipddp.txt5
-rw-r--r--Documentation/networking/iphase.txt2
-rw-r--r--[-rwxr-xr-x]Documentation/networking/ixgbevf.txt40
-rw-r--r--Documentation/networking/packet_mmap.txt30
-rw-r--r--Documentation/networking/phonet.txt56
-rw-r--r--Documentation/networking/phy.txt18
-rw-r--r--Documentation/networking/pktgen.txt5
-rw-r--r--Documentation/networking/ray_cs.txt4
-rw-r--r--Documentation/networking/s2io.txt3
-rw-r--r--Documentation/networking/timestamping.txt22
-rw-r--r--Documentation/networking/tlan.txt4
-rw-r--r--Documentation/networking/udplite.txt13
-rw-r--r--Documentation/networking/wavelan.txt73
-rw-r--r--Documentation/padata.txt99
-rw-r--r--Documentation/pcmcia/driver-changes.txt37
-rw-r--r--Documentation/power/00-INDEX2
-rw-r--r--Documentation/power/apm-acpi.txt2
-rw-r--r--Documentation/power/basic-pm-debugging.txt3
-rw-r--r--Documentation/power/interface.txt2
-rw-r--r--Documentation/power/opp.txt375
-rw-r--r--Documentation/power/regulator/overview.txt2
-rw-r--r--Documentation/power/runtime_pm.txt227
-rw-r--r--Documentation/power/s2ram.txt7
-rw-r--r--Documentation/power/swsusp.txt3
-rw-r--r--Documentation/power/tricks.txt2
-rw-r--r--Documentation/power/video.txt12
-rw-r--r--Documentation/powerpc/booting-without-of.txt33
-rw-r--r--Documentation/powerpc/dts-bindings/fsl/diu.txt20
-rw-r--r--Documentation/powerpc/dts-bindings/fsl/esdhc.txt2
-rw-r--r--Documentation/powerpc/dts-bindings/fsl/i2c.txt2
-rw-r--r--Documentation/powerpc/dts-bindings/fsl/spi.txt24
-rw-r--r--Documentation/powerpc/dts-bindings/fsl/usb.txt22
-rw-r--r--Documentation/powerpc/hvcs.txt2
-rw-r--r--Documentation/rt-mutex-design.txt2
-rw-r--r--Documentation/s390/Debugging390.txt2
-rw-r--r--Documentation/scsi/BusLogic.txt2
-rw-r--r--Documentation/scsi/ChangeLog.lpfc2
-rw-r--r--Documentation/scsi/ChangeLog.megaraid2
-rw-r--r--Documentation/scsi/FlashPoint.txt4
-rw-r--r--Documentation/scsi/Mylex.txt2
-rw-r--r--Documentation/scsi/NinjaSCSI.txt2
-rw-r--r--Documentation/scsi/aic79xx.txt2
-rw-r--r--Documentation/scsi/aic7xxx.txt2
-rw-r--r--Documentation/scsi/hpsa.txt107
-rw-r--r--Documentation/scsi/ibmmca.txt2
-rw-r--r--Documentation/scsi/osst.txt2
-rw-r--r--Documentation/scsi/ppa.txt6
-rw-r--r--Documentation/scsi/scsi-generic.txt8
-rw-r--r--Documentation/scsi/scsi-parameters.txt139
-rw-r--r--Documentation/scsi/scsi.txt4
-rw-r--r--Documentation/scsi/scsi_mid_low_api.txt2
-rw-r--r--Documentation/scsi/st.txt15
-rw-r--r--Documentation/serial/moxa-smartio2
-rw-r--r--Documentation/slow-work.txt322
-rw-r--r--Documentation/sound/alsa/ALSA-Configuration.txt84
-rw-r--r--Documentation/sound/alsa/HD-Audio-Models.txt20
-rw-r--r--Documentation/sound/alsa/HD-Audio.txt10
-rw-r--r--Documentation/sound/alsa/Procfile.txt8
-rw-r--r--Documentation/sound/alsa/alsa-parameters.txt135
-rw-r--r--Documentation/sound/alsa/soc/DAI.txt2
-rw-r--r--Documentation/sound/alsa/soc/codec.txt2
-rw-r--r--Documentation/sound/alsa/soc/platform.txt2
-rw-r--r--Documentation/sound/oss/README.OSS5
-rw-r--r--Documentation/sound/oss/oss-parameters.txt51
-rw-r--r--Documentation/sparse.txt2
-rw-r--r--Documentation/sysctl/vm.txt16
-rw-r--r--Documentation/sysrq.txt7
-rw-r--r--Documentation/telephony/ixj.txt9
-rw-r--r--Documentation/timers/hpet_example.c27
-rw-r--r--Documentation/timers/timers-howto.txt105
-rw-r--r--Documentation/tomoyo.txt10
-rw-r--r--Documentation/trace/ftrace-design.txt153
-rw-r--r--Documentation/trace/kmemtrace.txt126
-rw-r--r--Documentation/trace/kprobetrace.txt2
-rw-r--r--Documentation/trace/postprocess/trace-vmscan-postprocess.pl705
-rw-r--r--Documentation/uml/UserModeLinux-HOWTO.txt73
-rw-r--r--Documentation/usb/ehci.txt2
-rw-r--r--Documentation/usb/gadget_multi.txt150
-rw-r--r--Documentation/usb/gadget_serial.txt87
-rw-r--r--Documentation/usb/hotplug.txt4
-rw-r--r--Documentation/usb/linux-cdc-acm.inf107
-rw-r--r--Documentation/usb/linux.inf228
-rw-r--r--Documentation/usb/mtouchusb.txt6
-rw-r--r--Documentation/usb/proc_usb_info.txt34
-rw-r--r--Documentation/usb/usb-serial.txt4
-rw-r--r--Documentation/video4linux/API.html2
-rw-r--r--Documentation/video4linux/CARDLIST.cx238856
-rw-r--r--Documentation/video4linux/CARDLIST.cx881
-rw-r--r--Documentation/video4linux/CARDLIST.em28xx4
-rw-r--r--Documentation/video4linux/CARDLIST.saa71345
-rw-r--r--Documentation/video4linux/CQcam.txt4
-rw-r--r--Documentation/video4linux/README.cpia2
-rw-r--r--Documentation/video4linux/README.ivtv2
-rw-r--r--Documentation/video4linux/Zoran6
-rw-r--r--Documentation/video4linux/bttv/Cards6
-rw-r--r--Documentation/video4linux/bttv/MAKEDEV3
-rw-r--r--Documentation/video4linux/bttv/Specs4
-rw-r--r--Documentation/video4linux/cx88/hauppauge-wintv-cx88-ir.txt2
-rw-r--r--Documentation/video4linux/gspca.txt10
-rw-r--r--Documentation/video4linux/hauppauge-wintv-cx88-ir.txt2
-rw-r--r--Documentation/video4linux/ibmcam.txt5
-rw-r--r--Documentation/video4linux/se401.txt2
-rw-r--r--Documentation/video4linux/v4l2-controls.txt648
-rw-r--r--Documentation/video4linux/v4l2-framework.txt35
-rw-r--r--Documentation/video4linux/w9966.txt2
-rw-r--r--Documentation/vm/highmem.txt162
-rw-r--r--Documentation/vm/numa_memory_policy.txt2
-rw-r--r--Documentation/vm/page-types.c4
-rw-r--r--Documentation/w1/masters/ds24824
-rw-r--r--Documentation/w1/masters/mxc-w13
-rw-r--r--Documentation/w1/masters/omap-hdq2
-rw-r--r--Documentation/workqueue.txt381
-rw-r--r--Documentation/x86/x86_64/kernel-stacks6
-rw-r--r--Documentation/x86/zero-page.txt1
-rw-r--r--Documentation/zh_CN/HOWTO8
-rw-r--r--Documentation/zh_CN/SubmittingDrivers2
-rw-r--r--Documentation/zh_CN/SubmittingPatches6
-rw-r--r--Documentation/zh_CN/sparse.txt2
355 files changed, 12019 insertions, 3809 deletions
diff --git a/Documentation/00-INDEX b/Documentation/00-INDEX
index 5405f7aecefc..8dfc6708a257 100644
--- a/Documentation/00-INDEX
+++ b/Documentation/00-INDEX
@@ -130,8 +130,6 @@ edac.txt
130 - information on EDAC - Error Detection And Correction 130 - information on EDAC - Error Detection And Correction
131eisa.txt 131eisa.txt
132 - info on EISA bus support. 132 - info on EISA bus support.
133exception.txt
134 - how Linux v2.2 handles exceptions without verify_area etc.
135fault-injection/ 133fault-injection/
136 - dir with docs about the fault injection capabilities infrastructure. 134 - dir with docs about the fault injection capabilities infrastructure.
137fb/ 135fb/
@@ -234,6 +232,8 @@ memory.txt
234 - info on typical Linux memory problems. 232 - info on typical Linux memory problems.
235mips/ 233mips/
236 - directory with info about Linux on MIPS architecture. 234 - directory with info about Linux on MIPS architecture.
235mmc/
236 - directory with info about the MMC subsystem
237mono.txt 237mono.txt
238 - how to execute Mono-based .NET binaries with the help of BINFMT_MISC. 238 - how to execute Mono-based .NET binaries with the help of BINFMT_MISC.
239mutex-design.txt 239mutex-design.txt
diff --git a/Documentation/ABI/obsolete/dv1394 b/Documentation/ABI/obsolete/dv1394
deleted file mode 100644
index 2ee36864ca10..000000000000
--- a/Documentation/ABI/obsolete/dv1394
+++ /dev/null
@@ -1,9 +0,0 @@
1What: dv1394 (a.k.a. "OHCI-DV I/O support" for FireWire)
2Contact: linux1394-devel@lists.sourceforge.net
3Description:
4 New application development should use raw1394 + userspace libraries
5 instead, notably libiec61883 which is functionally equivalent.
6
7Users:
8 ffmpeg/libavformat (used by a variety of media players)
9 dvgrab v1.x (replaced by dvgrab2 on top of raw1394 and resp. libraries)
diff --git a/Documentation/ABI/removed/dv1394 b/Documentation/ABI/removed/dv1394
new file mode 100644
index 000000000000..c2310b6676f4
--- /dev/null
+++ b/Documentation/ABI/removed/dv1394
@@ -0,0 +1,14 @@
1What: dv1394 (a.k.a. "OHCI-DV I/O support" for FireWire)
2Date: May 2010 (scheduled), finally removed in kernel v2.6.37
3Contact: linux1394-devel@lists.sourceforge.net
4Description:
5 /dev/dv1394/* were character device files, one for each FireWire
6 controller and for NTSC and PAL respectively, from which DV data
7 could be received by read() or transmitted by write(). A few
8 ioctl()s allowed limited control.
9 This special-purpose interface has been superseded by libraw1394 +
10 libiec61883 which are functionally equivalent, support HDV, and
11 transparently work on top of the newer firewire kernel drivers.
12
13Users:
14 ffmpeg/libavformat (if configured for DV1394)
diff --git a/Documentation/ABI/removed/raw1394 b/Documentation/ABI/removed/raw1394
new file mode 100644
index 000000000000..490aa1efc4ae
--- /dev/null
+++ b/Documentation/ABI/removed/raw1394
@@ -0,0 +1,15 @@
1What: raw1394 (a.k.a. "Raw IEEE1394 I/O support" for FireWire)
2Date: May 2010 (scheduled), finally removed in kernel v2.6.37
3Contact: linux1394-devel@lists.sourceforge.net
4Description:
5 /dev/raw1394 was a character device file that allowed low-level
6 access to FireWire buses. Its major drawbacks were its inability
7 to implement sensible device security policies, and its low level
8 of abstraction that required userspace clients do duplicate much
9 of the kernel's ieee1394 core functionality.
10 Replaced by /dev/fw*, i.e. the <linux/firewire-cdev.h> ABI of
11 firewire-core.
12
13Users:
14 libraw1394 (works with firewire-cdev too, transparent to library ABI
15 users)
diff --git a/Documentation/ABI/removed/raw1394_legacy_isochronous b/Documentation/ABI/removed/raw1394_legacy_isochronous
deleted file mode 100644
index 1b629622d883..000000000000
--- a/Documentation/ABI/removed/raw1394_legacy_isochronous
+++ /dev/null
@@ -1,16 +0,0 @@
1What: legacy isochronous ABI of raw1394 (1st generation iso ABI)
2Date: June 2007 (scheduled), removed in kernel v2.6.23
3Contact: linux1394-devel@lists.sourceforge.net
4Description:
5 The two request types RAW1394_REQ_ISO_SEND, RAW1394_REQ_ISO_LISTEN have
6 been deprecated for quite some time. They are very inefficient as they
7 come with high interrupt load and several layers of callbacks for each
8 packet. Because of these deficiencies, the video1394 and dv1394 drivers
9 and the 3rd-generation isochronous ABI in raw1394 (rawiso) were created.
10
11Users:
12 libraw1394 users via the long deprecated API raw1394_iso_write,
13 raw1394_start_iso_write, raw1394_start_iso_rcv, raw1394_stop_iso_rcv
14
15 libdc1394, which optionally uses these old libraw1394 calls
16 alternatively to the more efficient video1394 ABI
diff --git a/Documentation/ABI/removed/video1394 b/Documentation/ABI/removed/video1394
new file mode 100644
index 000000000000..c39c25aee77b
--- /dev/null
+++ b/Documentation/ABI/removed/video1394
@@ -0,0 +1,16 @@
1What: video1394 (a.k.a. "OHCI-1394 Video support" for FireWire)
2Date: May 2010 (scheduled), finally removed in kernel v2.6.37
3Contact: linux1394-devel@lists.sourceforge.net
4Description:
5 /dev/video1394/* were character device files, one for each FireWire
6 controller, which were used for isochronous I/O. It was added as an
7 alternative to raw1394's isochronous I/O functionality which had
8 performance issues in its first generation. Any video1394 user had
9 to use raw1394 + libraw1394 too because video1394 did not provide
10 asynchronous I/O for device discovery and configuration.
11 Replaced by /dev/fw*, i.e. the <linux/firewire-cdev.h> ABI of
12 firewire-core.
13
14Users:
15 libdc1394 (works with firewire-cdev too, transparent to library ABI
16 users)
diff --git a/Documentation/ABI/testing/debugfs-ec b/Documentation/ABI/testing/debugfs-ec
new file mode 100644
index 000000000000..6546115a94da
--- /dev/null
+++ b/Documentation/ABI/testing/debugfs-ec
@@ -0,0 +1,20 @@
1What: /sys/kernel/debug/ec/*/{gpe,use_global_lock,io}
2Date: July 2010
3Contact: Thomas Renninger <trenn@suse.de>
4Description:
5
6General information like which GPE is assigned to the EC and whether
7the global lock should get used.
8Knowing the EC GPE one can watch the amount of HW events related to
9the EC here (XY -> GPE number from /sys/kernel/debug/ec/*/gpe):
10/sys/firmware/acpi/interrupts/gpeXY
11
12The io file is binary and a userspace tool located here:
13ftp://ftp.suse.com/pub/people/trenn/sources/ec/
14should get used to read out the 256 Embedded Controller registers
15or writing to them.
16
17CAUTION: Do not write to the Embedded Controller if you don't know
18what you are doing! Rebooting afterwards also is a good idea.
19This can influence the way your machine is cooled and fans may
20not get switched on again after you did a wrong write.
diff --git a/Documentation/ABI/testing/debugfs-kmemtrace b/Documentation/ABI/testing/debugfs-kmemtrace
deleted file mode 100644
index 5e6a92a02d85..000000000000
--- a/Documentation/ABI/testing/debugfs-kmemtrace
+++ /dev/null
@@ -1,71 +0,0 @@
1What: /sys/kernel/debug/kmemtrace/
2Date: July 2008
3Contact: Eduard - Gabriel Munteanu <eduard.munteanu@linux360.ro>
4Description:
5
6In kmemtrace-enabled kernels, the following files are created:
7
8/sys/kernel/debug/kmemtrace/
9 cpu<n> (0400) Per-CPU tracing data, see below. (binary)
10 total_overruns (0400) Total number of bytes which were dropped from
11 cpu<n> files because of full buffer condition,
12 non-binary. (text)
13 abi_version (0400) Kernel's kmemtrace ABI version. (text)
14
15Each per-CPU file should be read according to the relay interface. That is,
16the reader should set affinity to that specific CPU and, as currently done by
17the userspace application (though there are other methods), use poll() with
18an infinite timeout before every read(). Otherwise, erroneous data may be
19read. The binary data has the following _core_ format:
20
21 Event ID (1 byte) Unsigned integer, one of:
22 0 - represents an allocation (KMEMTRACE_EVENT_ALLOC)
23 1 - represents a freeing of previously allocated memory
24 (KMEMTRACE_EVENT_FREE)
25 Type ID (1 byte) Unsigned integer, one of:
26 0 - this is a kmalloc() / kfree()
27 1 - this is a kmem_cache_alloc() / kmem_cache_free()
28 2 - this is a __get_free_pages() et al.
29 Event size (2 bytes) Unsigned integer representing the
30 size of this event. Used to extend
31 kmemtrace. Discard the bytes you
32 don't know about.
33 Sequence number (4 bytes) Signed integer used to reorder data
34 logged on SMP machines. Wraparound
35 must be taken into account, although
36 it is unlikely.
37 Caller address (8 bytes) Return address to the caller.
38 Pointer to mem (8 bytes) Pointer to target memory area. Can be
39 NULL, but not all such calls might be
40 recorded.
41
42In case of KMEMTRACE_EVENT_ALLOC events, the next fields follow:
43
44 Requested bytes (8 bytes) Total number of requested bytes,
45 unsigned, must not be zero.
46 Allocated bytes (8 bytes) Total number of actually allocated
47 bytes, unsigned, must not be lower
48 than requested bytes.
49 Requested flags (4 bytes) GFP flags supplied by the caller.
50 Target CPU (4 bytes) Signed integer, valid for event id 1.
51 If equal to -1, target CPU is the same
52 as origin CPU, but the reverse might
53 not be true.
54
55The data is made available in the same endianness the machine has.
56
57Other event ids and type ids may be defined and added. Other fields may be
58added by increasing event size, but see below for details.
59Every modification to the ABI, including new id definitions, are followed
60by bumping the ABI version by one.
61
62Adding new data to the packet (features) is done at the end of the mandatory
63data:
64 Feature size (2 byte)
65 Feature ID (1 byte)
66 Feature data (Feature size - 3 bytes)
67
68
69Users:
70 kmemtrace-user - git://repo.or.cz/kmemtrace-user.git
71
diff --git a/Documentation/ABI/testing/sysfs-ata b/Documentation/ABI/testing/sysfs-ata
new file mode 100644
index 000000000000..0a932155cbba
--- /dev/null
+++ b/Documentation/ABI/testing/sysfs-ata
@@ -0,0 +1,99 @@
1What: /sys/class/ata_...
2Date: August 2008
3Contact: Gwendal Grignou<gwendal@google.com>
4Description:
5
6Provide a place in sysfs for storing the ATA topology of the system. This allows
7retrieving various information about ATA objects.
8
9Files under /sys/class/ata_port
10-------------------------------
11
12 For each port, a directory ataX is created where X is the ata_port_id of
13 the port. The device parent is the ata host device.
14
15idle_irq (read)
16
17 Number of IRQ received by the port while idle [some ata HBA only].
18
19nr_pmp_links (read)
20
21 If a SATA Port Multiplier (PM) is connected, number of link behind it.
22
23Files under /sys/class/ata_link
24-------------------------------
25
26 Behind each port, there is a ata_link. If there is a SATA PM in the
27 topology, 15 ata_link objects are created.
28
29 If a link is behind a port, the directory name is linkX, where X is
30 ata_port_id of the port.
31 If a link is behind a PM, its name is linkX.Y where X is ata_port_id
32 of the parent port and Y the PM port.
33
34hw_sata_spd_limit
35
36 Maximum speed supported by the connected SATA device.
37
38sata_spd_limit
39
40 Maximum speed imposed by libata.
41
42sata_spd
43
44 Current speed of the link [1.5, 3Gps,...].
45
46Files under /sys/class/ata_device
47---------------------------------
48
49 Behind each link, up to two ata device are created.
50 The name of the directory is devX[.Y].Z where:
51 - X is ata_port_id of the port where the device is connected,
52 - Y the port of the PM if any, and
53 - Z the device id: for PATA, there is usually 2 devices [0,1],
54 only 1 for SATA.
55
56class
57 Device class. Can be "ata" for disk, "atapi" for packet device,
58 "pmp" for PM, or "none" if no device was found behind the link.
59
60dma_mode
61
62 Transfer modes supported by the device when in DMA mode.
63 Mostly used by PATA device.
64
65pio_mode
66
67 Transfer modes supported by the device when in PIO mode.
68 Mostly used by PATA device.
69
70xfer_mode
71
72 Current transfer mode.
73
74id
75
76 Cached result of IDENTIFY command, as described in ATA8 7.16 and 7.17.
77 Only valid if the device is not a PM.
78
79gscr
80
81 Cached result of the dump of PM GSCR register.
82 Valid registers are:
83 0: SATA_PMP_GSCR_PROD_ID,
84 1: SATA_PMP_GSCR_REV,
85 2: SATA_PMP_GSCR_PORT_INFO,
86 32: SATA_PMP_GSCR_ERROR,
87 33: SATA_PMP_GSCR_ERROR_EN,
88 64: SATA_PMP_GSCR_FEAT,
89 96: SATA_PMP_GSCR_FEAT_EN,
90 130: SATA_PMP_GSCR_SII_GPIO
91 Only valid if the device is a PM.
92
93spdn_cnt
94
95 Number of time libata decided to lower the speed of link due to errors.
96
97ering
98
99 Formatted output of the error ring of the device.
diff --git a/Documentation/ABI/testing/sysfs-block-zram b/Documentation/ABI/testing/sysfs-block-zram
new file mode 100644
index 000000000000..c8b3b48ec62c
--- /dev/null
+++ b/Documentation/ABI/testing/sysfs-block-zram
@@ -0,0 +1,99 @@
1What: /sys/block/zram<id>/disksize
2Date: August 2010
3Contact: Nitin Gupta <ngupta@vflare.org>
4Description:
5 The disksize file is read-write and specifies the disk size
6 which represents the limit on the *uncompressed* worth of data
7 that can be stored in this disk.
8
9What: /sys/block/zram<id>/initstate
10Date: August 2010
11Contact: Nitin Gupta <ngupta@vflare.org>
12Description:
13 The disksize file is read-only and shows the initialization
14 state of the device.
15
16What: /sys/block/zram<id>/reset
17Date: August 2010
18Contact: Nitin Gupta <ngupta@vflare.org>
19Description:
20 The disksize file is write-only and allows resetting the
21 device. The reset operation frees all the memory assocaited
22 with this device.
23
24What: /sys/block/zram<id>/num_reads
25Date: August 2010
26Contact: Nitin Gupta <ngupta@vflare.org>
27Description:
28 The num_reads file is read-only and specifies the number of
29 reads (failed or successful) done on this device.
30
31What: /sys/block/zram<id>/num_writes
32Date: August 2010
33Contact: Nitin Gupta <ngupta@vflare.org>
34Description:
35 The num_writes file is read-only and specifies the number of
36 writes (failed or successful) done on this device.
37
38What: /sys/block/zram<id>/invalid_io
39Date: August 2010
40Contact: Nitin Gupta <ngupta@vflare.org>
41Description:
42 The invalid_io file is read-only and specifies the number of
43 non-page-size-aligned I/O requests issued to this device.
44
45What: /sys/block/zram<id>/notify_free
46Date: August 2010
47Contact: Nitin Gupta <ngupta@vflare.org>
48Description:
49 The notify_free file is read-only and specifies the number of
50 swap slot free notifications received by this device. These
51 notifications are send to a swap block device when a swap slot
52 is freed. This statistic is applicable only when this disk is
53 being used as a swap disk.
54
55What: /sys/block/zram<id>/discard
56Date: August 2010
57Contact: Nitin Gupta <ngupta@vflare.org>
58Description:
59 The discard file is read-only and specifies the number of
60 discard requests received by this device. These requests
61 provide information to block device regarding blocks which are
62 no longer used by filesystem.
63
64What: /sys/block/zram<id>/zero_pages
65Date: August 2010
66Contact: Nitin Gupta <ngupta@vflare.org>
67Description:
68 The zero_pages file is read-only and specifies number of zero
69 filled pages written to this disk. No memory is allocated for
70 such pages.
71
72What: /sys/block/zram<id>/orig_data_size
73Date: August 2010
74Contact: Nitin Gupta <ngupta@vflare.org>
75Description:
76 The orig_data_size file is read-only and specifies uncompressed
77 size of data stored in this disk. This excludes zero-filled
78 pages (zero_pages) since no memory is allocated for them.
79 Unit: bytes
80
81What: /sys/block/zram<id>/compr_data_size
82Date: August 2010
83Contact: Nitin Gupta <ngupta@vflare.org>
84Description:
85 The compr_data_size file is read-only and specifies compressed
86 size of data stored in this disk. So, compression ratio can be
87 calculated using orig_data_size and this statistic.
88 Unit: bytes
89
90What: /sys/block/zram<id>/mem_used_total
91Date: August 2010
92Contact: Nitin Gupta <ngupta@vflare.org>
93Description:
94 The mem_used_total file is read-only and specifies the amount
95 of memory, including allocator fragmentation and metadata
96 overhead, allocated for this disk. So, allocator space
97 efficiency can be calculated using compr_data_size and this
98 statistic.
99 Unit: bytes \ No newline at end of file
diff --git a/Documentation/ABI/testing/sysfs-bus-i2c-devices-hm6352 b/Documentation/ABI/testing/sysfs-bus-i2c-devices-hm6352
new file mode 100644
index 000000000000..feb2e4a87075
--- /dev/null
+++ b/Documentation/ABI/testing/sysfs-bus-i2c-devices-hm6352
@@ -0,0 +1,21 @@
1Where: /sys/bus/i2c/devices/.../heading0_input
2Date: April 2010
3Kernel Version: 2.6.36?
4Contact: alan.cox@intel.com
5Description: Reports the current heading from the compass as a floating
6 point value in degrees.
7
8Where: /sys/bus/i2c/devices/.../power_state
9Date: April 2010
10Kernel Version: 2.6.36?
11Contact: alan.cox@intel.com
12Description: Sets the power state of the device. 0 sets the device into
13 sleep mode, 1 wakes it up.
14
15Where: /sys/bus/i2c/devices/.../calibration
16Date: April 2010
17Kernel Version: 2.6.36?
18Contact: alan.cox@intel.com
19Description: Sets the calibration on or off (1 = on, 0 = off). See the
20 chip data sheet.
21
diff --git a/Documentation/ABI/testing/sysfs-bus-pci b/Documentation/ABI/testing/sysfs-bus-pci
index 25be3250f7d6..f979d825d112 100644
--- a/Documentation/ABI/testing/sysfs-bus-pci
+++ b/Documentation/ABI/testing/sysfs-bus-pci
@@ -139,3 +139,30 @@ Contact: linux-pci@vger.kernel.org
139Description: 139Description:
140 This symbolic link points to the PCI hotplug controller driver 140 This symbolic link points to the PCI hotplug controller driver
141 module that manages the hotplug slot. 141 module that manages the hotplug slot.
142
143What: /sys/bus/pci/devices/.../label
144Date: July 2010
145Contact: Narendra K <narendra_k@dell.com>, linux-bugs@dell.com
146Description:
147 Reading this attribute will provide the firmware
148 given name(SMBIOS type 41 string) of the PCI device.
149 The attribute will be created only if the firmware
150 has given a name to the PCI device.
151Users:
152 Userspace applications interested in knowing the
153 firmware assigned name of the PCI device.
154
155What: /sys/bus/pci/devices/.../index
156Date: July 2010
157Contact: Narendra K <narendra_k@dell.com>, linux-bugs@dell.com
158Description:
159 Reading this attribute will provide the firmware
160 given instance(SMBIOS type 41 device type instance)
161 of the PCI device. The attribute will be created
162 only if the firmware has given a device type instance
163 to the PCI device.
164Users:
165 Userspace applications interested in knowing the
166 firmware assigned device type instance of the PCI
167 device that can help in understanding the firmware
168 intended order of the PCI device.
diff --git a/Documentation/ABI/testing/sysfs-devices-memory b/Documentation/ABI/testing/sysfs-devices-memory
index aba7d989208c..7405de26ee60 100644
--- a/Documentation/ABI/testing/sysfs-devices-memory
+++ b/Documentation/ABI/testing/sysfs-devices-memory
@@ -7,7 +7,7 @@ Description:
7 added or removed dynamically to represent hot-add/remove 7 added or removed dynamically to represent hot-add/remove
8 operations. 8 operations.
9Users: hotplug memory add/remove tools 9Users: hotplug memory add/remove tools
10 https://w3.opensource.ibm.com/projects/powerpc-utils/ 10 http://www.ibm.com/developerworks/wikis/display/LinuxP/powerpc-utils
11 11
12What: /sys/devices/system/memory/memoryX/removable 12What: /sys/devices/system/memory/memoryX/removable
13Date: June 2008 13Date: June 2008
@@ -19,7 +19,7 @@ Description:
19 identify removable sections of the memory before attempting 19 identify removable sections of the memory before attempting
20 potentially expensive hot-remove memory operation 20 potentially expensive hot-remove memory operation
21Users: hotplug memory remove tools 21Users: hotplug memory remove tools
22 https://w3.opensource.ibm.com/projects/powerpc-utils/ 22 http://www.ibm.com/developerworks/wikis/display/LinuxP/powerpc-utils
23 23
24What: /sys/devices/system/memory/memoryX/phys_device 24What: /sys/devices/system/memory/memoryX/phys_device
25Date: September 2008 25Date: September 2008
@@ -58,7 +58,7 @@ Description:
58 by root to offline that section. 58 by root to offline that section.
59 # echo offline > /sys/devices/system/memory/memory22/state 59 # echo offline > /sys/devices/system/memory/memory22/state
60Users: hotplug memory remove tools 60Users: hotplug memory remove tools
61 https://w3.opensource.ibm.com/projects/powerpc-utils/ 61 http://www.ibm.com/developerworks/wikis/display/LinuxP/powerpc-utils
62 62
63 63
64What: /sys/devices/system/memoryX/nodeY 64What: /sys/devices/system/memoryX/nodeY
diff --git a/Documentation/ABI/testing/sysfs-devices-platform-_UDC_-gadget b/Documentation/ABI/testing/sysfs-devices-platform-_UDC_-gadget
index 34034027b13c..d548eaac230a 100644
--- a/Documentation/ABI/testing/sysfs-devices-platform-_UDC_-gadget
+++ b/Documentation/ABI/testing/sysfs-devices-platform-_UDC_-gadget
@@ -7,3 +7,15 @@ Description:
7 0 -> resumed 7 0 -> resumed
8 8
9 (_UDC_ is the name of the USB Device Controller driver) 9 (_UDC_ is the name of the USB Device Controller driver)
10
11What: /sys/devices/platform/_UDC_/gadget/gadget-lunX/nofua
12Date: July 2010
13Contact: Andy Shevchenko <andy.shevchenko@gmail.com>
14Description:
15 Show or set the reaction on the FUA (Force Unit Access) bit in
16 the SCSI WRITE(10,12) commands when a gadget in USB Mass
17 Storage mode.
18
19 Possible values are:
20 1 -> ignore the FUA flag
21 0 -> obey the FUA flag
diff --git a/Documentation/ABI/testing/sysfs-devices-power b/Documentation/ABI/testing/sysfs-devices-power
index 6123c523bfd7..7628cd1bc36a 100644
--- a/Documentation/ABI/testing/sysfs-devices-power
+++ b/Documentation/ABI/testing/sysfs-devices-power
@@ -77,3 +77,91 @@ Description:
77 devices this attribute is set to "enabled" by bus type code or 77 devices this attribute is set to "enabled" by bus type code or
78 device drivers and in that cases it should be safe to leave the 78 device drivers and in that cases it should be safe to leave the
79 default value. 79 default value.
80
81What: /sys/devices/.../power/wakeup_count
82Date: September 2010
83Contact: Rafael J. Wysocki <rjw@sisk.pl>
84Description:
85 The /sys/devices/.../wakeup_count attribute contains the number
86 of signaled wakeup events associated with the device. This
87 attribute is read-only. If the device is not enabled to wake up
88 the system from sleep states, this attribute is empty.
89
90What: /sys/devices/.../power/wakeup_active_count
91Date: September 2010
92Contact: Rafael J. Wysocki <rjw@sisk.pl>
93Description:
94 The /sys/devices/.../wakeup_active_count attribute contains the
95 number of times the processing of wakeup events associated with
96 the device was completed (at the kernel level). This attribute
97 is read-only. If the device is not enabled to wake up the
98 system from sleep states, this attribute is empty.
99
100What: /sys/devices/.../power/wakeup_hit_count
101Date: September 2010
102Contact: Rafael J. Wysocki <rjw@sisk.pl>
103Description:
104 The /sys/devices/.../wakeup_hit_count attribute contains the
105 number of times the processing of a wakeup event associated with
106 the device might prevent the system from entering a sleep state.
107 This attribute is read-only. If the device is not enabled to
108 wake up the system from sleep states, this attribute is empty.
109
110What: /sys/devices/.../power/wakeup_active
111Date: September 2010
112Contact: Rafael J. Wysocki <rjw@sisk.pl>
113Description:
114 The /sys/devices/.../wakeup_active attribute contains either 1,
115 or 0, depending on whether or not a wakeup event associated with
116 the device is being processed (1). This attribute is read-only.
117 If the device is not enabled to wake up the system from sleep
118 states, this attribute is empty.
119
120What: /sys/devices/.../power/wakeup_total_time_ms
121Date: September 2010
122Contact: Rafael J. Wysocki <rjw@sisk.pl>
123Description:
124 The /sys/devices/.../wakeup_total_time_ms attribute contains
125 the total time of processing wakeup events associated with the
126 device, in milliseconds. This attribute is read-only. If the
127 device is not enabled to wake up the system from sleep states,
128 this attribute is empty.
129
130What: /sys/devices/.../power/wakeup_max_time_ms
131Date: September 2010
132Contact: Rafael J. Wysocki <rjw@sisk.pl>
133Description:
134 The /sys/devices/.../wakeup_max_time_ms attribute contains
135 the maximum time of processing a single wakeup event associated
136 with the device, in milliseconds. This attribute is read-only.
137 If the device is not enabled to wake up the system from sleep
138 states, this attribute is empty.
139
140What: /sys/devices/.../power/wakeup_last_time_ms
141Date: September 2010
142Contact: Rafael J. Wysocki <rjw@sisk.pl>
143Description:
144 The /sys/devices/.../wakeup_last_time_ms attribute contains
145 the value of the monotonic clock corresponding to the time of
146 signaling the last wakeup event associated with the device, in
147 milliseconds. This attribute is read-only. If the device is
148 not enabled to wake up the system from sleep states, this
149 attribute is empty.
150
151What: /sys/devices/.../power/autosuspend_delay_ms
152Date: September 2010
153Contact: Alan Stern <stern@rowland.harvard.edu>
154Description:
155 The /sys/devices/.../power/autosuspend_delay_ms attribute
156 contains the autosuspend delay value (in milliseconds). Some
157 drivers do not want their device to suspend as soon as it
158 becomes idle at run time; they want the device to remain
159 inactive for a certain minimum period of time first. That
160 period is called the autosuspend delay. Negative values will
161 prevent the device from being suspended at run time (similar
162 to writing "on" to the power/control attribute). Values >=
163 1000 will cause the autosuspend timer expiration to be rounded
164 up to the nearest second.
165
166 Not all drivers support this attribute. If it isn't supported,
167 attempts to read or write it will yield I/O errors.
diff --git a/Documentation/ABI/testing/sysfs-devices-system-cpu b/Documentation/ABI/testing/sysfs-devices-system-cpu
index 84a710f87c64..7564e88bfa43 100644
--- a/Documentation/ABI/testing/sysfs-devices-system-cpu
+++ b/Documentation/ABI/testing/sysfs-devices-system-cpu
@@ -197,7 +197,7 @@ Description: These files exist in every cpu's cache index directories.
197 Currently, only AMD Family 10h Processors support cache index 197 Currently, only AMD Family 10h Processors support cache index
198 disable, and only for their L3 caches. See the BIOS and 198 disable, and only for their L3 caches. See the BIOS and
199 Kernel Developer's Guide at 199 Kernel Developer's Guide at
200 http://www.amd.com/us-en/assets/content_type/white_papers_and_tech_docs/31116-Public-GH-BKDG_3.20_2-4-09.pdf 200 http://support.amd.com/us/Embedded_TechDocs/31116-Public-GH-BKDG_3-28_5-28-09.pdf
201 for formatting information and other details on the 201 for formatting information and other details on the
202 cache index disable. 202 cache index disable.
203Users: joachim.deguara@amd.com 203Users: joachim.deguara@amd.com
diff --git a/Documentation/ABI/testing/sysfs-devices-system-ibm-rtl b/Documentation/ABI/testing/sysfs-devices-system-ibm-rtl
new file mode 100644
index 000000000000..b82deeaec314
--- /dev/null
+++ b/Documentation/ABI/testing/sysfs-devices-system-ibm-rtl
@@ -0,0 +1,22 @@
1What: state
2Date: Sep 2010
3KernelVersion: 2.6.37
4Contact: Vernon Mauery <vernux@us.ibm.com>
5Description: The state file allows a means by which to change in and
6 out of Premium Real-Time Mode (PRTM), as well as the
7 ability to query the current state.
8 0 => PRTM off
9 1 => PRTM enabled
10Users: The ibm-prtm userspace daemon uses this interface.
11
12
13What: version
14Date: Sep 2010
15KernelVersion: 2.6.37
16Contact: Vernon Mauery <vernux@us.ibm.com>
17Description: The version file provides a means by which to query
18 the RTL table version that lives in the Extended
19 BIOS Data Area (EBDA).
20Users: The ibm-prtm userspace daemon uses this interface.
21
22
diff --git a/Documentation/ABI/testing/sysfs-driver-hid-roccat-kone b/Documentation/ABI/testing/sysfs-driver-hid-roccat-kone
index 88340a23ce91..063bda7fe707 100644
--- a/Documentation/ABI/testing/sysfs-driver-hid-roccat-kone
+++ b/Documentation/ABI/testing/sysfs-driver-hid-roccat-kone
@@ -33,19 +33,6 @@ Description: When read, this file returns the raw integer version number of the
33 left. E.g. a returned value of 138 means 1.38 33 left. E.g. a returned value of 138 means 1.38
34 This file is readonly. 34 This file is readonly.
35 35
36What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/kone_driver_version
37Date: March 2010
38Contact: Stefan Achatz <erazor_de@users.sourceforge.net>
39Description: When read, this file returns the driver version.
40 The format of the string is "v<major>.<minor>.<patchlevel>".
41 This attribute is used by the userland tools to find the sysfs-
42 paths of installed kone-mice and determine the capabilites of
43 the driver. Versions of this driver for old kernels replace
44 usbhid instead of generic-usb. The way to scan for this file
45 has been chosen to provide a consistent way for all supported
46 kernel versions.
47 This file is readonly.
48
49What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/profile[1-5] 36What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/profile[1-5]
50Date: March 2010 37Date: March 2010
51Contact: Stefan Achatz <erazor_de@users.sourceforge.net> 38Contact: Stefan Achatz <erazor_de@users.sourceforge.net>
diff --git a/Documentation/ABI/testing/sysfs-driver-hid-roccat-pyra b/Documentation/ABI/testing/sysfs-driver-hid-roccat-pyra
new file mode 100644
index 000000000000..ad1125b02ff4
--- /dev/null
+++ b/Documentation/ABI/testing/sysfs-driver-hid-roccat-pyra
@@ -0,0 +1,98 @@
1What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/actual_cpi
2Date: August 2010
3Contact: Stefan Achatz <erazor_de@users.sourceforge.net>
4Description: It is possible to switch the cpi setting of the mouse with the
5 press of a button.
6 When read, this file returns the raw number of the actual cpi
7 setting reported by the mouse. This number has to be further
8 processed to receive the real dpi value.
9
10 VALUE DPI
11 1 400
12 2 800
13 4 1600
14
15 This file is readonly.
16
17What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/actual_profile
18Date: August 2010
19Contact: Stefan Achatz <erazor_de@users.sourceforge.net>
20Description: When read, this file returns the number of the actual profile in
21 range 0-4.
22 This file is readonly.
23
24What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/firmware_version
25Date: August 2010
26Contact: Stefan Achatz <erazor_de@users.sourceforge.net>
27Description: When read, this file returns the raw integer version number of the
28 firmware reported by the mouse. Using the integer value eases
29 further usage in other programs. To receive the real version
30 number the decimal point has to be shifted 2 positions to the
31 left. E.g. a returned value of 138 means 1.38
32 This file is readonly.
33
34What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/profile_settings
35Date: August 2010
36Contact: Stefan Achatz <erazor_de@users.sourceforge.net>
37Description: The mouse can store 5 profiles which can be switched by the
38 press of a button. A profile is split in settings and buttons.
39 profile_settings holds informations like resolution, sensitivity
40 and light effects.
41 When written, this file lets one write the respective profile
42 settings back to the mouse. The data has to be 13 bytes long.
43 The mouse will reject invalid data.
44 Which profile to write is determined by the profile number
45 contained in the data.
46 This file is writeonly.
47
48What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/profile[1-5]_settings
49Date: August 2010
50Contact: Stefan Achatz <erazor_de@users.sourceforge.net>
51Description: The mouse can store 5 profiles which can be switched by the
52 press of a button. A profile is split in settings and buttons.
53 profile_settings holds informations like resolution, sensitivity
54 and light effects.
55 When read, these files return the respective profile settings.
56 The returned data is 13 bytes in size.
57 This file is readonly.
58
59What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/profile_buttons
60Date: August 2010
61Contact: Stefan Achatz <erazor_de@users.sourceforge.net>
62Description: The mouse can store 5 profiles which can be switched by the
63 press of a button. A profile is split in settings and buttons.
64 profile_buttons holds informations about button layout.
65 When written, this file lets one write the respective profile
66 buttons back to the mouse. The data has to be 19 bytes long.
67 The mouse will reject invalid data.
68 Which profile to write is determined by the profile number
69 contained in the data.
70 This file is writeonly.
71
72What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/profile[1-5]_buttons
73Date: August 2010
74Contact: Stefan Achatz <erazor_de@users.sourceforge.net>
75Description: The mouse can store 5 profiles which can be switched by the
76 press of a button. A profile is split in settings and buttons.
77 profile_buttons holds informations about button layout.
78 When read, these files return the respective profile buttons.
79 The returned data is 19 bytes in size.
80 This file is readonly.
81
82What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/startup_profile
83Date: August 2010
84Contact: Stefan Achatz <erazor_de@users.sourceforge.net>
85Description: The integer value of this attribute ranges from 0-4.
86 When read, this attribute returns the number of the profile
87 that's active when the mouse is powered on.
88 This file is readonly.
89
90What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/settings
91Date: August 2010
92Contact: Stefan Achatz <erazor_de@users.sourceforge.net>
93Description: When read, this file returns the settings stored in the mouse.
94 The size of the data is 3 bytes and holds information on the
95 startup_profile.
96 When written, this file lets write settings back to the mouse.
97 The data has to be 3 bytes long. The mouse will reject invalid
98 data.
diff --git a/Documentation/ABI/testing/sysfs-i2c-bmp085 b/Documentation/ABI/testing/sysfs-i2c-bmp085
new file mode 100644
index 000000000000..585962ad0465
--- /dev/null
+++ b/Documentation/ABI/testing/sysfs-i2c-bmp085
@@ -0,0 +1,31 @@
1What: /sys/bus/i2c/devices/<busnum>-<devaddr>/pressure0_input
2Date: June 2010
3Contact: Christoph Mair <christoph.mair@gmail.com>
4Description: Start a pressure measurement and read the result. Values
5 represent the ambient air pressure in pascal (0.01 millibar).
6
7 Reading: returns the current air pressure.
8
9
10What: /sys/bus/i2c/devices/<busnum>-<devaddr>/temp0_input
11Date: June 2010
12Contact: Christoph Mair <christoph.mair@gmail.com>
13Description: Measure the ambient temperature. The returned value represents
14 the ambient temperature in units of 0.1 degree celsius.
15
16 Reading: returns the current temperature.
17
18
19What: /sys/bus/i2c/devices/<busnum>-<devaddr>/oversampling
20Date: June 2010
21Contact: Christoph Mair <christoph.mair@gmail.com>
22Description: Tell the bmp085 to use more samples to calculate a pressure
23 value. When writing to this file the chip will use 2^x samples
24 to calculate the next pressure value with x being the value
25 written. Using this feature will decrease RMS noise and
26 increase the measurement time.
27
28 Reading: returns the current oversampling setting.
29
30 Writing: sets a new oversampling setting.
31 Accepted values: 0..3.
diff --git a/Documentation/ABI/testing/sysfs-module b/Documentation/ABI/testing/sysfs-module
new file mode 100644
index 000000000000..cfcec3bffc0a
--- /dev/null
+++ b/Documentation/ABI/testing/sysfs-module
@@ -0,0 +1,12 @@
1What: /sys/module/pch_phub/drivers/.../pch_mac
2Date: August 2010
3KernelVersion: 2.6.35
4Contact: masa-korg@dsn.okisemi.com
5Description: Write/read GbE MAC address.
6
7What: /sys/module/pch_phub/drivers/.../pch_firmware
8Date: August 2010
9KernelVersion: 2.6.35
10Contact: masa-korg@dsn.okisemi.com
11Description: Write/read Option ROM data.
12
diff --git a/Documentation/ABI/testing/sysfs-power b/Documentation/ABI/testing/sysfs-power
index d6a801f45b48..194ca446ac28 100644
--- a/Documentation/ABI/testing/sysfs-power
+++ b/Documentation/ABI/testing/sysfs-power
@@ -99,9 +99,38 @@ Description:
99 99
100 dmesg -s 1000000 | grep 'hash matches' 100 dmesg -s 1000000 | grep 'hash matches'
101 101
102 If you do not get any matches (or they appear to be false
103 positives), it is possible that the last PM event point
104 referred to a device created by a loadable kernel module. In
105 this case cat /sys/power/pm_trace_dev_match (see below) after
106 your system is started up and the kernel modules are loaded.
107
102 CAUTION: Using it will cause your machine's real-time (CMOS) 108 CAUTION: Using it will cause your machine's real-time (CMOS)
103 clock to be set to a random invalid time after a resume. 109 clock to be set to a random invalid time after a resume.
104 110
111What; /sys/power/pm_trace_dev_match
112Date: October 2010
113Contact: James Hogan <james@albanarts.com>
114Description:
115 The /sys/power/pm_trace_dev_match file contains the name of the
116 device associated with the last PM event point saved in the RTC
117 across reboots when pm_trace has been used. More precisely it
118 contains the list of current devices (including those
119 registered by loadable kernel modules since boot) which match
120 the device hash in the RTC at boot, with a newline after each
121 one.
122
123 The advantage of this file over the hash matches printed to the
124 kernel log (see /sys/power/pm_trace), is that it includes
125 devices created after boot by loadable kernel modules.
126
127 Due to the small hash size necessary to fit in the RTC, it is
128 possible that more than one device matches the hash, in which
129 case further investigation is required to determine which
130 device is causing the problem. Note that genuine RTC clock
131 values (such as when pm_trace has not been used), can still
132 match a device and output it's name here.
133
105What: /sys/power/pm_async 134What: /sys/power/pm_async
106Date: January 2009 135Date: January 2009
107Contact: Rafael J. Wysocki <rjw@sisk.pl> 136Contact: Rafael J. Wysocki <rjw@sisk.pl>
@@ -114,3 +143,18 @@ Description:
114 if this file contains "1", which is the default. It may be 143 if this file contains "1", which is the default. It may be
115 disabled by writing "0" to this file, in which case all devices 144 disabled by writing "0" to this file, in which case all devices
116 will be suspended and resumed synchronously. 145 will be suspended and resumed synchronously.
146
147What: /sys/power/wakeup_count
148Date: July 2010
149Contact: Rafael J. Wysocki <rjw@sisk.pl>
150Description:
151 The /sys/power/wakeup_count file allows user space to put the
152 system into a sleep state while taking into account the
153 concurrent arrival of wakeup events. Reading from it returns
154 the current number of registered wakeup events and it blocks if
155 some wakeup events are being processed at the time the file is
156 read from. Writing to it will only succeed if the current
157 number of wakeup events is equal to the written value and, if
158 successful, will make the kernel abort a subsequent transition
159 to a sleep state if any wakeup events are reported after the
160 write has returned.
diff --git a/Documentation/Changes b/Documentation/Changes
index eca9f6e6fbe6..4fb88f15f2ef 100644
--- a/Documentation/Changes
+++ b/Documentation/Changes
@@ -331,7 +331,7 @@ o <ftp://ftp.kernel.org/pub/linux/kernel/people/rusty/modules/>
331 331
332Mkinitrd 332Mkinitrd
333-------- 333--------
334o <ftp://rawhide.redhat.com/pub/rawhide/SRPMS/SRPMS/> 334o <https://code.launchpad.net/initrd-tools/main>
335 335
336E2fsprogs 336E2fsprogs
337--------- 337---------
@@ -343,11 +343,11 @@ o <http://jfs.sourceforge.net/>
343 343
344Reiserfsprogs 344Reiserfsprogs
345------------- 345-------------
346o <http://www.namesys.com/pub/reiserfsprogs/reiserfsprogs-3.6.3.tar.gz> 346o <http://www.kernel.org/pub/linux/utils/fs/reiserfs/>
347 347
348Xfsprogs 348Xfsprogs
349-------- 349--------
350o <ftp://oss.sgi.com/projects/xfs/download/> 350o <ftp://oss.sgi.com/projects/xfs/>
351 351
352Pcmciautils 352Pcmciautils
353----------- 353-----------
@@ -387,18 +387,18 @@ o <http://sourceforge.net/projects/fuse>
387 387
388mcelog 388mcelog
389------ 389------
390o <ftp://ftp.kernel.org/pub/linux/utils/cpu/mce/mcelog/> 390o <ftp://ftp.kernel.org/pub/linux/utils/cpu/mce/>
391 391
392Networking 392Networking
393********** 393**********
394 394
395PPP 395PPP
396--- 396---
397o <ftp://ftp.samba.org/pub/ppp/ppp-2.4.0.tar.gz> 397o <ftp://ftp.samba.org/pub/ppp/>
398 398
399Isdn4k-utils 399Isdn4k-utils
400------------ 400------------
401o <ftp://ftp.isdn4linux.de/pub/isdn4linux/utils/isdn4k-utils.v3.1pre1.tar.gz> 401o <ftp://ftp.isdn4linux.de/pub/isdn4linux/utils/>
402 402
403NFS-utils 403NFS-utils
404--------- 404---------
diff --git a/Documentation/DMA-API-HOWTO.txt b/Documentation/DMA-API-HOWTO.txt
index 98ce51796f71..d568bc235bc0 100644
--- a/Documentation/DMA-API-HOWTO.txt
+++ b/Documentation/DMA-API-HOWTO.txt
@@ -738,21 +738,31 @@ to "Closing".
738 CONFIG_NEED_SG_DMA_LENGTH if the architecture supports IOMMUs 738 CONFIG_NEED_SG_DMA_LENGTH if the architecture supports IOMMUs
739 (including software IOMMU). 739 (including software IOMMU).
740 740
7412) ARCH_KMALLOC_MINALIGN 7412) ARCH_DMA_MINALIGN
742 742
743 Architectures must ensure that kmalloc'ed buffer is 743 Architectures must ensure that kmalloc'ed buffer is
744 DMA-safe. Drivers and subsystems depend on it. If an architecture 744 DMA-safe. Drivers and subsystems depend on it. If an architecture
745 isn't fully DMA-coherent (i.e. hardware doesn't ensure that data in 745 isn't fully DMA-coherent (i.e. hardware doesn't ensure that data in
746 the CPU cache is identical to data in main memory), 746 the CPU cache is identical to data in main memory),
747 ARCH_KMALLOC_MINALIGN must be set so that the memory allocator 747 ARCH_DMA_MINALIGN must be set so that the memory allocator
748 makes sure that kmalloc'ed buffer doesn't share a cache line with 748 makes sure that kmalloc'ed buffer doesn't share a cache line with
749 the others. See arch/arm/include/asm/cache.h as an example. 749 the others. See arch/arm/include/asm/cache.h as an example.
750 750
751 Note that ARCH_KMALLOC_MINALIGN is about DMA memory alignment 751 Note that ARCH_DMA_MINALIGN is about DMA memory alignment
752 constraints. You don't need to worry about the architecture data 752 constraints. You don't need to worry about the architecture data
753 alignment constraints (e.g. the alignment constraints about 64-bit 753 alignment constraints (e.g. the alignment constraints about 64-bit
754 objects). 754 objects).
755 755
7563) Supporting multiple types of IOMMUs
757
758 If your architecture needs to support multiple types of IOMMUs, you
759 can use include/linux/asm-generic/dma-mapping-common.h. It's a
760 library to support the DMA API with multiple types of IOMMUs. Lots
761 of architectures (x86, powerpc, sh, alpha, ia64, microblaze and
762 sparc) use it. Choose one to see how it can be used. If you need to
763 support multiple types of IOMMUs in a single system, the example of
764 x86 or powerpc helps.
765
756 Closing 766 Closing
757 767
758This document, and the API itself, would not be in its current 768This document, and the API itself, would not be in its current
diff --git a/Documentation/DMA-API.txt b/Documentation/DMA-API.txt
index 05e2ae236865..fe2326906610 100644
--- a/Documentation/DMA-API.txt
+++ b/Documentation/DMA-API.txt
@@ -456,12 +456,6 @@ be identical to those passed in (and returned by
456dma_alloc_noncoherent()). 456dma_alloc_noncoherent()).
457 457
458int 458int
459dma_is_consistent(struct device *dev, dma_addr_t dma_handle)
460
461Returns true if the device dev is performing consistent DMA on the memory
462area pointed to by the dma_handle.
463
464int
465dma_get_cache_alignment(void) 459dma_get_cache_alignment(void)
466 460
467Returns the processor cache alignment. This is the absolute minimum 461Returns the processor cache alignment. This is the absolute minimum
diff --git a/Documentation/DocBook/80211.tmpl b/Documentation/DocBook/80211.tmpl
new file mode 100644
index 000000000000..19a1210c2530
--- /dev/null
+++ b/Documentation/DocBook/80211.tmpl
@@ -0,0 +1,495 @@
1<?xml version="1.0" encoding="UTF-8"?>
2<!DOCTYPE set PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
3 "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd" []>
4<set>
5 <setinfo>
6 <title>The 802.11 subsystems &ndash; for kernel developers</title>
7 <subtitle>
8 Explaining wireless 802.11 networking in the Linux kernel
9 </subtitle>
10
11 <copyright>
12 <year>2007-2009</year>
13 <holder>Johannes Berg</holder>
14 </copyright>
15
16 <authorgroup>
17 <author>
18 <firstname>Johannes</firstname>
19 <surname>Berg</surname>
20 <affiliation>
21 <address><email>johannes@sipsolutions.net</email></address>
22 </affiliation>
23 </author>
24 </authorgroup>
25
26 <legalnotice>
27 <para>
28 This documentation is free software; you can redistribute
29 it and/or modify it under the terms of the GNU General Public
30 License version 2 as published by the Free Software Foundation.
31 </para>
32 <para>
33 This documentation is distributed in the hope that it will be
34 useful, but WITHOUT ANY WARRANTY; without even the implied
35 warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
36 See the GNU General Public License for more details.
37 </para>
38 <para>
39 You should have received a copy of the GNU General Public
40 License along with this documentation; if not, write to the Free
41 Software Foundation, Inc., 59 Temple Place, Suite 330, Boston,
42 MA 02111-1307 USA
43 </para>
44 <para>
45 For more details see the file COPYING in the source
46 distribution of Linux.
47 </para>
48 </legalnotice>
49
50 <abstract>
51 <para>
52 These books attempt to give a description of the
53 various subsystems that play a role in 802.11 wireless
54 networking in Linux. Since these books are for kernel
55 developers they attempts to document the structures
56 and functions used in the kernel as well as giving a
57 higher-level overview.
58 </para>
59 <para>
60 The reader is expected to be familiar with the 802.11
61 standard as published by the IEEE in 802.11-2007 (or
62 possibly later versions). References to this standard
63 will be given as "802.11-2007 8.1.5".
64 </para>
65 </abstract>
66 </setinfo>
67 <book id="cfg80211-developers-guide">
68 <bookinfo>
69 <title>The cfg80211 subsystem</title>
70
71 <abstract>
72!Pinclude/net/cfg80211.h Introduction
73 </abstract>
74 </bookinfo>
75 <chapter>
76 <title>Device registration</title>
77!Pinclude/net/cfg80211.h Device registration
78!Finclude/net/cfg80211.h ieee80211_band
79!Finclude/net/cfg80211.h ieee80211_channel_flags
80!Finclude/net/cfg80211.h ieee80211_channel
81!Finclude/net/cfg80211.h ieee80211_rate_flags
82!Finclude/net/cfg80211.h ieee80211_rate
83!Finclude/net/cfg80211.h ieee80211_sta_ht_cap
84!Finclude/net/cfg80211.h ieee80211_supported_band
85!Finclude/net/cfg80211.h cfg80211_signal_type
86!Finclude/net/cfg80211.h wiphy_params_flags
87!Finclude/net/cfg80211.h wiphy_flags
88!Finclude/net/cfg80211.h wiphy
89!Finclude/net/cfg80211.h wireless_dev
90!Finclude/net/cfg80211.h wiphy_new
91!Finclude/net/cfg80211.h wiphy_register
92!Finclude/net/cfg80211.h wiphy_unregister
93!Finclude/net/cfg80211.h wiphy_free
94
95!Finclude/net/cfg80211.h wiphy_name
96!Finclude/net/cfg80211.h wiphy_dev
97!Finclude/net/cfg80211.h wiphy_priv
98!Finclude/net/cfg80211.h priv_to_wiphy
99!Finclude/net/cfg80211.h set_wiphy_dev
100!Finclude/net/cfg80211.h wdev_priv
101 </chapter>
102 <chapter>
103 <title>Actions and configuration</title>
104!Pinclude/net/cfg80211.h Actions and configuration
105!Finclude/net/cfg80211.h cfg80211_ops
106!Finclude/net/cfg80211.h vif_params
107!Finclude/net/cfg80211.h key_params
108!Finclude/net/cfg80211.h survey_info_flags
109!Finclude/net/cfg80211.h survey_info
110!Finclude/net/cfg80211.h beacon_parameters
111!Finclude/net/cfg80211.h plink_actions
112!Finclude/net/cfg80211.h station_parameters
113!Finclude/net/cfg80211.h station_info_flags
114!Finclude/net/cfg80211.h rate_info_flags
115!Finclude/net/cfg80211.h rate_info
116!Finclude/net/cfg80211.h station_info
117!Finclude/net/cfg80211.h monitor_flags
118!Finclude/net/cfg80211.h mpath_info_flags
119!Finclude/net/cfg80211.h mpath_info
120!Finclude/net/cfg80211.h bss_parameters
121!Finclude/net/cfg80211.h ieee80211_txq_params
122!Finclude/net/cfg80211.h cfg80211_crypto_settings
123!Finclude/net/cfg80211.h cfg80211_auth_request
124!Finclude/net/cfg80211.h cfg80211_assoc_request
125!Finclude/net/cfg80211.h cfg80211_deauth_request
126!Finclude/net/cfg80211.h cfg80211_disassoc_request
127!Finclude/net/cfg80211.h cfg80211_ibss_params
128!Finclude/net/cfg80211.h cfg80211_connect_params
129!Finclude/net/cfg80211.h cfg80211_pmksa
130!Finclude/net/cfg80211.h cfg80211_send_rx_auth
131!Finclude/net/cfg80211.h cfg80211_send_auth_timeout
132!Finclude/net/cfg80211.h __cfg80211_auth_canceled
133!Finclude/net/cfg80211.h cfg80211_send_rx_assoc
134!Finclude/net/cfg80211.h cfg80211_send_assoc_timeout
135!Finclude/net/cfg80211.h cfg80211_send_deauth
136!Finclude/net/cfg80211.h __cfg80211_send_deauth
137!Finclude/net/cfg80211.h cfg80211_send_disassoc
138!Finclude/net/cfg80211.h __cfg80211_send_disassoc
139!Finclude/net/cfg80211.h cfg80211_ibss_joined
140!Finclude/net/cfg80211.h cfg80211_connect_result
141!Finclude/net/cfg80211.h cfg80211_roamed
142!Finclude/net/cfg80211.h cfg80211_disconnected
143!Finclude/net/cfg80211.h cfg80211_ready_on_channel
144!Finclude/net/cfg80211.h cfg80211_remain_on_channel_expired
145!Finclude/net/cfg80211.h cfg80211_new_sta
146!Finclude/net/cfg80211.h cfg80211_rx_mgmt
147!Finclude/net/cfg80211.h cfg80211_mgmt_tx_status
148!Finclude/net/cfg80211.h cfg80211_cqm_rssi_notify
149!Finclude/net/cfg80211.h cfg80211_michael_mic_failure
150 </chapter>
151 <chapter>
152 <title>Scanning and BSS list handling</title>
153!Pinclude/net/cfg80211.h Scanning and BSS list handling
154!Finclude/net/cfg80211.h cfg80211_ssid
155!Finclude/net/cfg80211.h cfg80211_scan_request
156!Finclude/net/cfg80211.h cfg80211_scan_done
157!Finclude/net/cfg80211.h cfg80211_bss
158!Finclude/net/cfg80211.h cfg80211_inform_bss_frame
159!Finclude/net/cfg80211.h cfg80211_inform_bss
160!Finclude/net/cfg80211.h cfg80211_unlink_bss
161!Finclude/net/cfg80211.h cfg80211_find_ie
162!Finclude/net/cfg80211.h ieee80211_bss_get_ie
163 </chapter>
164 <chapter>
165 <title>Utility functions</title>
166!Pinclude/net/cfg80211.h Utility functions
167!Finclude/net/cfg80211.h ieee80211_channel_to_frequency
168!Finclude/net/cfg80211.h ieee80211_frequency_to_channel
169!Finclude/net/cfg80211.h ieee80211_get_channel
170!Finclude/net/cfg80211.h ieee80211_get_response_rate
171!Finclude/net/cfg80211.h ieee80211_hdrlen
172!Finclude/net/cfg80211.h ieee80211_get_hdrlen_from_skb
173!Finclude/net/cfg80211.h ieee80211_radiotap_iterator
174 </chapter>
175 <chapter>
176 <title>Data path helpers</title>
177!Pinclude/net/cfg80211.h Data path helpers
178!Finclude/net/cfg80211.h ieee80211_data_to_8023
179!Finclude/net/cfg80211.h ieee80211_data_from_8023
180!Finclude/net/cfg80211.h ieee80211_amsdu_to_8023s
181!Finclude/net/cfg80211.h cfg80211_classify8021d
182 </chapter>
183 <chapter>
184 <title>Regulatory enforcement infrastructure</title>
185!Pinclude/net/cfg80211.h Regulatory enforcement infrastructure
186!Finclude/net/cfg80211.h regulatory_hint
187!Finclude/net/cfg80211.h wiphy_apply_custom_regulatory
188!Finclude/net/cfg80211.h freq_reg_info
189 </chapter>
190 <chapter>
191 <title>RFkill integration</title>
192!Pinclude/net/cfg80211.h RFkill integration
193!Finclude/net/cfg80211.h wiphy_rfkill_set_hw_state
194!Finclude/net/cfg80211.h wiphy_rfkill_start_polling
195!Finclude/net/cfg80211.h wiphy_rfkill_stop_polling
196 </chapter>
197 <chapter>
198 <title>Test mode</title>
199!Pinclude/net/cfg80211.h Test mode
200!Finclude/net/cfg80211.h cfg80211_testmode_alloc_reply_skb
201!Finclude/net/cfg80211.h cfg80211_testmode_reply
202!Finclude/net/cfg80211.h cfg80211_testmode_alloc_event_skb
203!Finclude/net/cfg80211.h cfg80211_testmode_event
204 </chapter>
205 </book>
206 <book id="mac80211-developers-guide">
207 <bookinfo>
208 <title>The mac80211 subsystem</title>
209 <abstract>
210!Pinclude/net/mac80211.h Introduction
211!Pinclude/net/mac80211.h Warning
212 </abstract>
213 </bookinfo>
214
215 <toc></toc>
216
217 <!--
218 Generally, this document shall be ordered by increasing complexity.
219 It is important to note that readers should be able to read only
220 the first few sections to get a working driver and only advanced
221 usage should require reading the full document.
222 -->
223
224 <part>
225 <title>The basic mac80211 driver interface</title>
226 <partintro>
227 <para>
228 You should read and understand the information contained
229 within this part of the book while implementing a driver.
230 In some chapters, advanced usage is noted, that may be
231 skipped at first.
232 </para>
233 <para>
234 This part of the book only covers station and monitor mode
235 functionality, additional information required to implement
236 the other modes is covered in the second part of the book.
237 </para>
238 </partintro>
239
240 <chapter id="basics">
241 <title>Basic hardware handling</title>
242 <para>TBD</para>
243 <para>
244 This chapter shall contain information on getting a hw
245 struct allocated and registered with mac80211.
246 </para>
247 <para>
248 Since it is required to allocate rates/modes before registering
249 a hw struct, this chapter shall also contain information on setting
250 up the rate/mode structs.
251 </para>
252 <para>
253 Additionally, some discussion about the callbacks and
254 the general programming model should be in here, including
255 the definition of ieee80211_ops which will be referred to
256 a lot.
257 </para>
258 <para>
259 Finally, a discussion of hardware capabilities should be done
260 with references to other parts of the book.
261 </para>
262 <!-- intentionally multiple !F lines to get proper order -->
263!Finclude/net/mac80211.h ieee80211_hw
264!Finclude/net/mac80211.h ieee80211_hw_flags
265!Finclude/net/mac80211.h SET_IEEE80211_DEV
266!Finclude/net/mac80211.h SET_IEEE80211_PERM_ADDR
267!Finclude/net/mac80211.h ieee80211_ops
268!Finclude/net/mac80211.h ieee80211_alloc_hw
269!Finclude/net/mac80211.h ieee80211_register_hw
270!Finclude/net/mac80211.h ieee80211_get_tx_led_name
271!Finclude/net/mac80211.h ieee80211_get_rx_led_name
272!Finclude/net/mac80211.h ieee80211_get_assoc_led_name
273!Finclude/net/mac80211.h ieee80211_get_radio_led_name
274!Finclude/net/mac80211.h ieee80211_unregister_hw
275!Finclude/net/mac80211.h ieee80211_free_hw
276 </chapter>
277
278 <chapter id="phy-handling">
279 <title>PHY configuration</title>
280 <para>TBD</para>
281 <para>
282 This chapter should describe PHY handling including
283 start/stop callbacks and the various structures used.
284 </para>
285!Finclude/net/mac80211.h ieee80211_conf
286!Finclude/net/mac80211.h ieee80211_conf_flags
287 </chapter>
288
289 <chapter id="iface-handling">
290 <title>Virtual interfaces</title>
291 <para>TBD</para>
292 <para>
293 This chapter should describe virtual interface basics
294 that are relevant to the driver (VLANs, MGMT etc are not.)
295 It should explain the use of the add_iface/remove_iface
296 callbacks as well as the interface configuration callbacks.
297 </para>
298 <para>Things related to AP mode should be discussed there.</para>
299 <para>
300 Things related to supporting multiple interfaces should be
301 in the appropriate chapter, a BIG FAT note should be here about
302 this though and the recommendation to allow only a single
303 interface in STA mode at first!
304 </para>
305!Finclude/net/mac80211.h ieee80211_vif
306 </chapter>
307
308 <chapter id="rx-tx">
309 <title>Receive and transmit processing</title>
310 <sect1>
311 <title>what should be here</title>
312 <para>TBD</para>
313 <para>
314 This should describe the receive and transmit
315 paths in mac80211/the drivers as well as
316 transmit status handling.
317 </para>
318 </sect1>
319 <sect1>
320 <title>Frame format</title>
321!Pinclude/net/mac80211.h Frame format
322 </sect1>
323 <sect1>
324 <title>Packet alignment</title>
325!Pnet/mac80211/rx.c Packet alignment
326 </sect1>
327 <sect1>
328 <title>Calling into mac80211 from interrupts</title>
329!Pinclude/net/mac80211.h Calling mac80211 from interrupts
330 </sect1>
331 <sect1>
332 <title>functions/definitions</title>
333!Finclude/net/mac80211.h ieee80211_rx_status
334!Finclude/net/mac80211.h mac80211_rx_flags
335!Finclude/net/mac80211.h ieee80211_tx_info
336!Finclude/net/mac80211.h ieee80211_rx
337!Finclude/net/mac80211.h ieee80211_rx_irqsafe
338!Finclude/net/mac80211.h ieee80211_tx_status
339!Finclude/net/mac80211.h ieee80211_tx_status_irqsafe
340!Finclude/net/mac80211.h ieee80211_rts_get
341!Finclude/net/mac80211.h ieee80211_rts_duration
342!Finclude/net/mac80211.h ieee80211_ctstoself_get
343!Finclude/net/mac80211.h ieee80211_ctstoself_duration
344!Finclude/net/mac80211.h ieee80211_generic_frame_duration
345!Finclude/net/mac80211.h ieee80211_wake_queue
346!Finclude/net/mac80211.h ieee80211_stop_queue
347!Finclude/net/mac80211.h ieee80211_wake_queues
348!Finclude/net/mac80211.h ieee80211_stop_queues
349 </sect1>
350 </chapter>
351
352 <chapter id="filters">
353 <title>Frame filtering</title>
354!Pinclude/net/mac80211.h Frame filtering
355!Finclude/net/mac80211.h ieee80211_filter_flags
356 </chapter>
357 </part>
358
359 <part id="advanced">
360 <title>Advanced driver interface</title>
361 <partintro>
362 <para>
363 Information contained within this part of the book is
364 of interest only for advanced interaction of mac80211
365 with drivers to exploit more hardware capabilities and
366 improve performance.
367 </para>
368 </partintro>
369
370 <chapter id="hardware-crypto-offload">
371 <title>Hardware crypto acceleration</title>
372!Pinclude/net/mac80211.h Hardware crypto acceleration
373 <!-- intentionally multiple !F lines to get proper order -->
374!Finclude/net/mac80211.h set_key_cmd
375!Finclude/net/mac80211.h ieee80211_key_conf
376!Finclude/net/mac80211.h ieee80211_key_flags
377 </chapter>
378
379 <chapter id="powersave">
380 <title>Powersave support</title>
381!Pinclude/net/mac80211.h Powersave support
382 </chapter>
383
384 <chapter id="beacon-filter">
385 <title>Beacon filter support</title>
386!Pinclude/net/mac80211.h Beacon filter support
387!Finclude/net/mac80211.h ieee80211_beacon_loss
388 </chapter>
389
390 <chapter id="qos">
391 <title>Multiple queues and QoS support</title>
392 <para>TBD</para>
393!Finclude/net/mac80211.h ieee80211_tx_queue_params
394 </chapter>
395
396 <chapter id="AP">
397 <title>Access point mode support</title>
398 <para>TBD</para>
399 <para>Some parts of the if_conf should be discussed here instead</para>
400 <para>
401 Insert notes about VLAN interfaces with hw crypto here or
402 in the hw crypto chapter.
403 </para>
404!Finclude/net/mac80211.h ieee80211_get_buffered_bc
405!Finclude/net/mac80211.h ieee80211_beacon_get
406 </chapter>
407
408 <chapter id="multi-iface">
409 <title>Supporting multiple virtual interfaces</title>
410 <para>TBD</para>
411 <para>
412 Note: WDS with identical MAC address should almost always be OK
413 </para>
414 <para>
415 Insert notes about having multiple virtual interfaces with
416 different MAC addresses here, note which configurations are
417 supported by mac80211, add notes about supporting hw crypto
418 with it.
419 </para>
420 </chapter>
421
422 <chapter id="hardware-scan-offload">
423 <title>Hardware scan offload</title>
424 <para>TBD</para>
425!Finclude/net/mac80211.h ieee80211_scan_completed
426 </chapter>
427 </part>
428
429 <part id="rate-control">
430 <title>Rate control interface</title>
431 <partintro>
432 <para>TBD</para>
433 <para>
434 This part of the book describes the rate control algorithm
435 interface and how it relates to mac80211 and drivers.
436 </para>
437 </partintro>
438 <chapter id="dummy">
439 <title>dummy chapter</title>
440 <para>TBD</para>
441 </chapter>
442 </part>
443
444 <part id="internal">
445 <title>Internals</title>
446 <partintro>
447 <para>TBD</para>
448 <para>
449 This part of the book describes mac80211 internals.
450 </para>
451 </partintro>
452
453 <chapter id="key-handling">
454 <title>Key handling</title>
455 <sect1>
456 <title>Key handling basics</title>
457!Pnet/mac80211/key.c Key handling basics
458 </sect1>
459 <sect1>
460 <title>MORE TBD</title>
461 <para>TBD</para>
462 </sect1>
463 </chapter>
464
465 <chapter id="rx-processing">
466 <title>Receive processing</title>
467 <para>TBD</para>
468 </chapter>
469
470 <chapter id="tx-processing">
471 <title>Transmit processing</title>
472 <para>TBD</para>
473 </chapter>
474
475 <chapter id="sta-info">
476 <title>Station info handling</title>
477 <sect1>
478 <title>Programming information</title>
479!Fnet/mac80211/sta_info.h sta_info
480!Fnet/mac80211/sta_info.h ieee80211_sta_info_flags
481 </sect1>
482 <sect1>
483 <title>STA information lifetime rules</title>
484!Pnet/mac80211/sta_info.c STA information lifetime rules
485 </sect1>
486 </chapter>
487
488 <chapter id="synchronisation">
489 <title>Synchronisation</title>
490 <para>TBD</para>
491 <para>Locking, lots of RCU</para>
492 </chapter>
493 </part>
494 </book>
495</set>
diff --git a/Documentation/DocBook/Makefile b/Documentation/DocBook/Makefile
index c7e5dc7e8cb3..8b6e00a71034 100644
--- a/Documentation/DocBook/Makefile
+++ b/Documentation/DocBook/Makefile
@@ -12,7 +12,7 @@ DOCBOOKS := z8530book.xml mcabook.xml device-drivers.xml \
12 kernel-api.xml filesystems.xml lsm.xml usb.xml kgdb.xml \ 12 kernel-api.xml filesystems.xml lsm.xml usb.xml kgdb.xml \
13 gadget.xml libata.xml mtdnand.xml librs.xml rapidio.xml \ 13 gadget.xml libata.xml mtdnand.xml librs.xml rapidio.xml \
14 genericirq.xml s390-drivers.xml uio-howto.xml scsi.xml \ 14 genericirq.xml s390-drivers.xml uio-howto.xml scsi.xml \
15 mac80211.xml debugobjects.xml sh.xml regulator.xml \ 15 80211.xml debugobjects.xml sh.xml regulator.xml \
16 alsa-driver-api.xml writing-an-alsa-driver.xml \ 16 alsa-driver-api.xml writing-an-alsa-driver.xml \
17 tracepoint.xml media.xml drm.xml 17 tracepoint.xml media.xml drm.xml
18 18
@@ -35,7 +35,7 @@ PS_METHOD = $(prefer-db2x)
35PHONY += xmldocs sgmldocs psdocs pdfdocs htmldocs mandocs installmandocs cleandocs xmldoclinks 35PHONY += xmldocs sgmldocs psdocs pdfdocs htmldocs mandocs installmandocs cleandocs xmldoclinks
36 36
37BOOKS := $(addprefix $(obj)/,$(DOCBOOKS)) 37BOOKS := $(addprefix $(obj)/,$(DOCBOOKS))
38xmldocs: $(BOOKS) xmldoclinks 38xmldocs: $(BOOKS)
39sgmldocs: xmldocs 39sgmldocs: xmldocs
40 40
41PS := $(patsubst %.xml, %.ps, $(BOOKS)) 41PS := $(patsubst %.xml, %.ps, $(BOOKS))
@@ -45,7 +45,7 @@ PDF := $(patsubst %.xml, %.pdf, $(BOOKS))
45pdfdocs: $(PDF) 45pdfdocs: $(PDF)
46 46
47HTML := $(sort $(patsubst %.xml, %.html, $(BOOKS))) 47HTML := $(sort $(patsubst %.xml, %.html, $(BOOKS)))
48htmldocs: $(HTML) 48htmldocs: $(HTML) xmldoclinks
49 $(call build_main_index) 49 $(call build_main_index)
50 $(call build_images) 50 $(call build_images)
51 51
@@ -95,7 +95,7 @@ define rule_docproc
95 ) > $(dir $@).$(notdir $@).cmd 95 ) > $(dir $@).$(notdir $@).cmd
96endef 96endef
97 97
98%.xml: %.tmpl FORCE 98%.xml: %.tmpl xmldoclinks FORCE
99 $(call if_changed_rule,docproc) 99 $(call if_changed_rule,docproc)
100 100
101### 101###
diff --git a/Documentation/DocBook/device-drivers.tmpl b/Documentation/DocBook/device-drivers.tmpl
index 1b2dd4fc3db2..22edcbb9ddaf 100644
--- a/Documentation/DocBook/device-drivers.tmpl
+++ b/Documentation/DocBook/device-drivers.tmpl
@@ -46,14 +46,18 @@
46 46
47 <sect1><title>Atomic and pointer manipulation</title> 47 <sect1><title>Atomic and pointer manipulation</title>
48!Iarch/x86/include/asm/atomic.h 48!Iarch/x86/include/asm/atomic.h
49!Iarch/x86/include/asm/unaligned.h
50 </sect1> 49 </sect1>
51 50
52 <sect1><title>Delaying, scheduling, and timer routines</title> 51 <sect1><title>Delaying, scheduling, and timer routines</title>
53!Iinclude/linux/sched.h 52!Iinclude/linux/sched.h
54!Ekernel/sched.c 53!Ekernel/sched.c
54!Iinclude/linux/completion.h
55!Ekernel/timer.c 55!Ekernel/timer.c
56 </sect1> 56 </sect1>
57 <sect1><title>Wait queues and Wake events</title>
58!Iinclude/linux/wait.h
59!Ekernel/wait.c
60 </sect1>
57 <sect1><title>High-resolution timers</title> 61 <sect1><title>High-resolution timers</title>
58!Iinclude/linux/ktime.h 62!Iinclude/linux/ktime.h
59!Iinclude/linux/hrtimer.h 63!Iinclude/linux/hrtimer.h
@@ -111,6 +115,7 @@ X!Edrivers/base/attribute_container.c
111<!-- 115<!--
112X!Edrivers/base/interface.c 116X!Edrivers/base/interface.c
113--> 117-->
118!Iinclude/linux/platform_device.h
114!Edrivers/base/platform.c 119!Edrivers/base/platform.c
115!Edrivers/base/bus.c 120!Edrivers/base/bus.c
116 </sect1> 121 </sect1>
diff --git a/Documentation/DocBook/drm.tmpl b/Documentation/DocBook/drm.tmpl
index 910c923a9b86..2861055afd7a 100644
--- a/Documentation/DocBook/drm.tmpl
+++ b/Documentation/DocBook/drm.tmpl
@@ -136,6 +136,7 @@
136#ifdef CONFIG_COMPAT 136#ifdef CONFIG_COMPAT
137 .compat_ioctl = i915_compat_ioctl, 137 .compat_ioctl = i915_compat_ioctl,
138#endif 138#endif
139 .llseek = noop_llseek,
139 }, 140 },
140 .pci_driver = { 141 .pci_driver = {
141 .name = DRIVER_NAME, 142 .name = DRIVER_NAME,
diff --git a/Documentation/DocBook/dvb/dvbapi.xml b/Documentation/DocBook/dvb/dvbapi.xml
index 63c528fee624..e3a97fdd62a6 100644
--- a/Documentation/DocBook/dvb/dvbapi.xml
+++ b/Documentation/DocBook/dvb/dvbapi.xml
@@ -12,10 +12,12 @@
12<othername role="mi">O. C.</othername> 12<othername role="mi">O. C.</othername>
13<affiliation><address><email>rjkm@metzlerbros.de</email></address></affiliation> 13<affiliation><address><email>rjkm@metzlerbros.de</email></address></affiliation>
14</author> 14</author>
15</authorgroup>
16<authorgroup>
15<author> 17<author>
16<firstname>Mauro</firstname> 18<firstname>Mauro</firstname>
17<surname>Chehab</surname>
18<othername role="mi">Carvalho</othername> 19<othername role="mi">Carvalho</othername>
20<surname>Chehab</surname>
19<affiliation><address><email>mchehab@redhat.com</email></address></affiliation> 21<affiliation><address><email>mchehab@redhat.com</email></address></affiliation>
20<contrib>Ported document to Docbook XML.</contrib> 22<contrib>Ported document to Docbook XML.</contrib>
21</author> 23</author>
@@ -23,13 +25,24 @@
23<copyright> 25<copyright>
24 <year>2002</year> 26 <year>2002</year>
25 <year>2003</year> 27 <year>2003</year>
26 <year>2009</year>
27 <holder>Convergence GmbH</holder> 28 <holder>Convergence GmbH</holder>
28</copyright> 29</copyright>
30<copyright>
31 <year>2009-2010</year>
32 <holder>Mauro Carvalho Chehab</holder>
33</copyright>
29 34
30<revhistory> 35<revhistory>
31<!-- Put document revisions here, newest first. --> 36<!-- Put document revisions here, newest first. -->
32<revision> 37<revision>
38 <revnumber>2.0.3</revnumber>
39 <date>2010-07-03</date>
40 <authorinitials>mcc</authorinitials>
41 <revremark>
42 Add some frontend capabilities flags, present on kernel, but missing at the specs.
43 </revremark>
44</revision>
45<revision>
33 <revnumber>2.0.2</revnumber> 46 <revnumber>2.0.2</revnumber>
34 <date>2009-10-25</date> 47 <date>2009-10-25</date>
35 <authorinitials>mcc</authorinitials> 48 <authorinitials>mcc</authorinitials>
@@ -63,7 +76,7 @@ Added ISDB-T test originally written by Patrick Boettcher
63 76
64 77
65<title>LINUX DVB API</title> 78<title>LINUX DVB API</title>
66<subtitle>Version 3</subtitle> 79<subtitle>Version 5.2</subtitle>
67<!-- ADD THE CHAPTERS HERE --> 80<!-- ADD THE CHAPTERS HERE -->
68 <chapter id="dvb_introdution"> 81 <chapter id="dvb_introdution">
69 &sub-intro; 82 &sub-intro;
diff --git a/Documentation/DocBook/dvb/frontend.h.xml b/Documentation/DocBook/dvb/frontend.h.xml
index b99644f5340a..d08e0d401418 100644
--- a/Documentation/DocBook/dvb/frontend.h.xml
+++ b/Documentation/DocBook/dvb/frontend.h.xml
@@ -63,6 +63,7 @@ typedef enum fe_caps {
63 FE_CAN_8VSB = 0x200000, 63 FE_CAN_8VSB = 0x200000,
64 FE_CAN_16VSB = 0x400000, 64 FE_CAN_16VSB = 0x400000,
65 FE_HAS_EXTENDED_CAPS = 0x800000, /* We need more bitspace for newer APIs, indicate this. */ 65 FE_HAS_EXTENDED_CAPS = 0x800000, /* We need more bitspace for newer APIs, indicate this. */
66 FE_CAN_TURBO_FEC = 0x8000000, /* frontend supports "turbo fec modulation" */
66 FE_CAN_2G_MODULATION = 0x10000000, /* frontend supports "2nd generation modulation" (DVB-S2) */ 67 FE_CAN_2G_MODULATION = 0x10000000, /* frontend supports "2nd generation modulation" (DVB-S2) */
67 FE_NEEDS_BENDING = 0x20000000, /* not supported anymore, don't use (frontend requires frequency bending) */ 68 FE_NEEDS_BENDING = 0x20000000, /* not supported anymore, don't use (frontend requires frequency bending) */
68 FE_CAN_RECOVER = 0x40000000, /* frontend can recover from a cable unplug automatically */ 69 FE_CAN_RECOVER = 0x40000000, /* frontend can recover from a cable unplug automatically */
diff --git a/Documentation/DocBook/dvb/frontend.xml b/Documentation/DocBook/dvb/frontend.xml
index 300ba1f04177..78d756de5906 100644
--- a/Documentation/DocBook/dvb/frontend.xml
+++ b/Documentation/DocBook/dvb/frontend.xml
@@ -64,8 +64,14 @@ a specific frontend type.</para>
64 FE_CAN_BANDWIDTH_AUTO = 0x40000, 64 FE_CAN_BANDWIDTH_AUTO = 0x40000,
65 FE_CAN_GUARD_INTERVAL_AUTO = 0x80000, 65 FE_CAN_GUARD_INTERVAL_AUTO = 0x80000,
66 FE_CAN_HIERARCHY_AUTO = 0x100000, 66 FE_CAN_HIERARCHY_AUTO = 0x100000,
67 FE_CAN_MUTE_TS = 0x80000000, 67 FE_CAN_8VSB = 0x200000,
68 FE_CAN_CLEAN_SETUP = 0x40000000 68 FE_CAN_16VSB = 0x400000,
69 FE_HAS_EXTENDED_CAPS = 0x800000,
70 FE_CAN_TURBO_FEC = 0x8000000,
71 FE_CAN_2G_MODULATION = 0x10000000,
72 FE_NEEDS_BENDING = 0x20000000,
73 FE_CAN_RECOVER = 0x40000000,
74 FE_CAN_MUTE_TS = 0x80000000
69 } fe_caps_t; 75 } fe_caps_t;
70</programlisting> 76</programlisting>
71</section> 77</section>
diff --git a/Documentation/DocBook/genericirq.tmpl b/Documentation/DocBook/genericirq.tmpl
index 1448b33fd222..fb10fd08c05c 100644
--- a/Documentation/DocBook/genericirq.tmpl
+++ b/Documentation/DocBook/genericirq.tmpl
@@ -28,7 +28,7 @@
28 </authorgroup> 28 </authorgroup>
29 29
30 <copyright> 30 <copyright>
31 <year>2005-2006</year> 31 <year>2005-2010</year>
32 <holder>Thomas Gleixner</holder> 32 <holder>Thomas Gleixner</holder>
33 </copyright> 33 </copyright>
34 <copyright> 34 <copyright>
@@ -100,6 +100,10 @@
100 <listitem><para>Edge type</para></listitem> 100 <listitem><para>Edge type</para></listitem>
101 <listitem><para>Simple type</para></listitem> 101 <listitem><para>Simple type</para></listitem>
102 </itemizedlist> 102 </itemizedlist>
103 During the implementation we identified another type:
104 <itemizedlist>
105 <listitem><para>Fast EOI type</para></listitem>
106 </itemizedlist>
103 In the SMP world of the __do_IRQ() super-handler another type 107 In the SMP world of the __do_IRQ() super-handler another type
104 was identified: 108 was identified:
105 <itemizedlist> 109 <itemizedlist>
@@ -153,6 +157,7 @@
153 is still available. This leads to a kind of duality for the time 157 is still available. This leads to a kind of duality for the time
154 being. Over time the new model should be used in more and more 158 being. Over time the new model should be used in more and more
155 architectures, as it enables smaller and cleaner IRQ subsystems. 159 architectures, as it enables smaller and cleaner IRQ subsystems.
160 It's deprecated for three years now and about to be removed.
156 </para> 161 </para>
157 </chapter> 162 </chapter>
158 <chapter id="bugs"> 163 <chapter id="bugs">
@@ -217,6 +222,7 @@
217 <itemizedlist> 222 <itemizedlist>
218 <listitem><para>handle_level_irq</para></listitem> 223 <listitem><para>handle_level_irq</para></listitem>
219 <listitem><para>handle_edge_irq</para></listitem> 224 <listitem><para>handle_edge_irq</para></listitem>
225 <listitem><para>handle_fasteoi_irq</para></listitem>
220 <listitem><para>handle_simple_irq</para></listitem> 226 <listitem><para>handle_simple_irq</para></listitem>
221 <listitem><para>handle_percpu_irq</para></listitem> 227 <listitem><para>handle_percpu_irq</para></listitem>
222 </itemizedlist> 228 </itemizedlist>
@@ -233,33 +239,33 @@
233 are used by the default flow implementations. 239 are used by the default flow implementations.
234 The following helper functions are implemented (simplified excerpt): 240 The following helper functions are implemented (simplified excerpt):
235 <programlisting> 241 <programlisting>
236default_enable(irq) 242default_enable(struct irq_data *data)
237{ 243{
238 desc->chip->unmask(irq); 244 desc->chip->irq_unmask(data);
239} 245}
240 246
241default_disable(irq) 247default_disable(struct irq_data *data)
242{ 248{
243 if (!delay_disable(irq)) 249 if (!delay_disable(data))
244 desc->chip->mask(irq); 250 desc->chip->irq_mask(data);
245} 251}
246 252
247default_ack(irq) 253default_ack(struct irq_data *data)
248{ 254{
249 chip->ack(irq); 255 chip->irq_ack(data);
250} 256}
251 257
252default_mask_ack(irq) 258default_mask_ack(struct irq_data *data)
253{ 259{
254 if (chip->mask_ack) { 260 if (chip->irq_mask_ack) {
255 chip->mask_ack(irq); 261 chip->irq_mask_ack(data);
256 } else { 262 } else {
257 chip->mask(irq); 263 chip->irq_mask(data);
258 chip->ack(irq); 264 chip->irq_ack(data);
259 } 265 }
260} 266}
261 267
262noop(irq) 268noop(struct irq_data *data))
263{ 269{
264} 270}
265 271
@@ -278,12 +284,27 @@ noop(irq)
278 <para> 284 <para>
279 The following control flow is implemented (simplified excerpt): 285 The following control flow is implemented (simplified excerpt):
280 <programlisting> 286 <programlisting>
281desc->chip->start(); 287desc->chip->irq_mask();
282handle_IRQ_event(desc->action); 288handle_IRQ_event(desc->action);
283desc->chip->end(); 289desc->chip->irq_unmask();
284 </programlisting> 290 </programlisting>
285 </para> 291 </para>
286 </sect3> 292 </sect3>
293 <sect3 id="Default_FASTEOI_IRQ_flow_handler">
294 <title>Default Fast EOI IRQ flow handler</title>
295 <para>
296 handle_fasteoi_irq provides a generic implementation
297 for interrupts, which only need an EOI at the end of
298 the handler
299 </para>
300 <para>
301 The following control flow is implemented (simplified excerpt):
302 <programlisting>
303handle_IRQ_event(desc->action);
304desc->chip->irq_eoi();
305 </programlisting>
306 </para>
307 </sect3>
287 <sect3 id="Default_Edge_IRQ_flow_handler"> 308 <sect3 id="Default_Edge_IRQ_flow_handler">
288 <title>Default Edge IRQ flow handler</title> 309 <title>Default Edge IRQ flow handler</title>
289 <para> 310 <para>
@@ -294,20 +315,19 @@ desc->chip->end();
294 The following control flow is implemented (simplified excerpt): 315 The following control flow is implemented (simplified excerpt):
295 <programlisting> 316 <programlisting>
296if (desc->status &amp; running) { 317if (desc->status &amp; running) {
297 desc->chip->hold(); 318 desc->chip->irq_mask();
298 desc->status |= pending | masked; 319 desc->status |= pending | masked;
299 return; 320 return;
300} 321}
301desc->chip->start(); 322desc->chip->irq_ack();
302desc->status |= running; 323desc->status |= running;
303do { 324do {
304 if (desc->status &amp; masked) 325 if (desc->status &amp; masked)
305 desc->chip->enable(); 326 desc->chip->irq_unmask();
306 desc->status &amp;= ~pending; 327 desc->status &amp;= ~pending;
307 handle_IRQ_event(desc->action); 328 handle_IRQ_event(desc->action);
308} while (status &amp; pending); 329} while (status &amp; pending);
309desc->status &amp;= ~running; 330desc->status &amp;= ~running;
310desc->chip->end();
311 </programlisting> 331 </programlisting>
312 </para> 332 </para>
313 </sect3> 333 </sect3>
@@ -342,9 +362,9 @@ handle_IRQ_event(desc->action);
342 <para> 362 <para>
343 The following control flow is implemented (simplified excerpt): 363 The following control flow is implemented (simplified excerpt):
344 <programlisting> 364 <programlisting>
345desc->chip->start();
346handle_IRQ_event(desc->action); 365handle_IRQ_event(desc->action);
347desc->chip->end(); 366if (desc->chip->irq_eoi)
367 desc->chip->irq_eoi();
348 </programlisting> 368 </programlisting>
349 </para> 369 </para>
350 </sect3> 370 </sect3>
@@ -375,8 +395,7 @@ desc->chip->end();
375 mechanism. (It's necessary to enable CONFIG_HARDIRQS_SW_RESEND when 395 mechanism. (It's necessary to enable CONFIG_HARDIRQS_SW_RESEND when
376 you want to use the delayed interrupt disable feature and your 396 you want to use the delayed interrupt disable feature and your
377 hardware is not capable of retriggering an interrupt.) 397 hardware is not capable of retriggering an interrupt.)
378 The delayed interrupt disable can be runtime enabled, per interrupt, 398 The delayed interrupt disable is not configurable.
379 by setting the IRQ_DELAYED_DISABLE flag in the irq_desc status field.
380 </para> 399 </para>
381 </sect2> 400 </sect2>
382 </sect1> 401 </sect1>
@@ -387,13 +406,13 @@ desc->chip->end();
387 contains all the direct chip relevant functions, which 406 contains all the direct chip relevant functions, which
388 can be utilized by the irq flow implementations. 407 can be utilized by the irq flow implementations.
389 <itemizedlist> 408 <itemizedlist>
390 <listitem><para>ack()</para></listitem> 409 <listitem><para>irq_ack()</para></listitem>
391 <listitem><para>mask_ack() - Optional, recommended for performance</para></listitem> 410 <listitem><para>irq_mask_ack() - Optional, recommended for performance</para></listitem>
392 <listitem><para>mask()</para></listitem> 411 <listitem><para>irq_mask()</para></listitem>
393 <listitem><para>unmask()</para></listitem> 412 <listitem><para>irq_unmask()</para></listitem>
394 <listitem><para>retrigger() - Optional</para></listitem> 413 <listitem><para>irq_retrigger() - Optional</para></listitem>
395 <listitem><para>set_type() - Optional</para></listitem> 414 <listitem><para>irq_set_type() - Optional</para></listitem>
396 <listitem><para>set_wake() - Optional</para></listitem> 415 <listitem><para>irq_set_wake() - Optional</para></listitem>
397 </itemizedlist> 416 </itemizedlist>
398 These primitives are strictly intended to mean what they say: ack means 417 These primitives are strictly intended to mean what they say: ack means
399 ACK, masking means masking of an IRQ line, etc. It is up to the flow 418 ACK, masking means masking of an IRQ line, etc. It is up to the flow
@@ -458,6 +477,7 @@ desc->chip->end();
458 <para> 477 <para>
459 This chapter contains the autogenerated documentation of the internal functions. 478 This chapter contains the autogenerated documentation of the internal functions.
460 </para> 479 </para>
480!Ikernel/irq/irqdesc.c
461!Ikernel/irq/handle.c 481!Ikernel/irq/handle.c
462!Ikernel/irq/chip.c 482!Ikernel/irq/chip.c
463 </chapter> 483 </chapter>
diff --git a/Documentation/DocBook/kernel-api.tmpl b/Documentation/DocBook/kernel-api.tmpl
index 44b3def961a2..7160652a8736 100644
--- a/Documentation/DocBook/kernel-api.tmpl
+++ b/Documentation/DocBook/kernel-api.tmpl
@@ -57,7 +57,6 @@
57 </para> 57 </para>
58 58
59 <sect1><title>String Conversions</title> 59 <sect1><title>String Conversions</title>
60!Ilib/vsprintf.c
61!Elib/vsprintf.c 60!Elib/vsprintf.c
62 </sect1> 61 </sect1>
63 <sect1><title>String Manipulation</title> 62 <sect1><title>String Manipulation</title>
@@ -94,6 +93,12 @@ X!Ilib/string.c
94!Elib/crc32.c 93!Elib/crc32.c
95!Elib/crc-ccitt.c 94!Elib/crc-ccitt.c
96 </sect1> 95 </sect1>
96
97 <sect1 id="idr"><title>idr/ida Functions</title>
98!Pinclude/linux/idr.h idr sync
99!Plib/idr.c IDA description
100!Elib/idr.c
101 </sect1>
97 </chapter> 102 </chapter>
98 103
99 <chapter id="mm"> 104 <chapter id="mm">
@@ -132,7 +137,6 @@ X!Ilib/string.c
132 <title>FIFO Buffer</title> 137 <title>FIFO Buffer</title>
133 <sect1><title>kfifo interface</title> 138 <sect1><title>kfifo interface</title>
134!Iinclude/linux/kfifo.h 139!Iinclude/linux/kfifo.h
135!Ekernel/kfifo.c
136 </sect1> 140 </sect1>
137 </chapter> 141 </chapter>
138 142
@@ -259,7 +263,8 @@ X!Earch/x86/kernel/mca_32.c
259!Iblock/blk-sysfs.c 263!Iblock/blk-sysfs.c
260!Eblock/blk-settings.c 264!Eblock/blk-settings.c
261!Eblock/blk-exec.c 265!Eblock/blk-exec.c
262!Eblock/blk-barrier.c 266!Eblock/blk-flush.c
267!Eblock/blk-lib.c
263!Eblock/blk-tag.c 268!Eblock/blk-tag.c
264!Iblock/blk-tag.c 269!Iblock/blk-tag.c
265!Eblock/blk-integrity.c 270!Eblock/blk-integrity.c
diff --git a/Documentation/DocBook/kernel-locking.tmpl b/Documentation/DocBook/kernel-locking.tmpl
index 084f6ad7b7a0..f66f4df18690 100644
--- a/Documentation/DocBook/kernel-locking.tmpl
+++ b/Documentation/DocBook/kernel-locking.tmpl
@@ -1645,7 +1645,9 @@ the amount of locking which needs to be done.
1645 all the readers who were traversing the list when we deleted the 1645 all the readers who were traversing the list when we deleted the
1646 element are finished. We use <function>call_rcu()</function> to 1646 element are finished. We use <function>call_rcu()</function> to
1647 register a callback which will actually destroy the object once 1647 register a callback which will actually destroy the object once
1648 the readers are finished. 1648 all pre-existing readers are finished. Alternatively,
1649 <function>synchronize_rcu()</function> may be used to block until
1650 all pre-existing are finished.
1649 </para> 1651 </para>
1650 <para> 1652 <para>
1651 But how does Read Copy Update know when the readers are 1653 But how does Read Copy Update know when the readers are
@@ -1714,7 +1716,7 @@ the amount of locking which needs to be done.
1714- object_put(obj); 1716- object_put(obj);
1715+ list_del_rcu(&amp;obj-&gt;list); 1717+ list_del_rcu(&amp;obj-&gt;list);
1716 cache_num--; 1718 cache_num--;
1717+ call_rcu(&amp;obj-&gt;rcu, cache_delete_rcu, obj); 1719+ call_rcu(&amp;obj-&gt;rcu, cache_delete_rcu);
1718 } 1720 }
1719 1721
1720 /* Must be holding cache_lock */ 1722 /* Must be holding cache_lock */
@@ -1725,14 +1727,6 @@ the amount of locking which needs to be done.
1725 if (++cache_num > MAX_CACHE_SIZE) { 1727 if (++cache_num > MAX_CACHE_SIZE) {
1726 struct object *i, *outcast = NULL; 1728 struct object *i, *outcast = NULL;
1727 list_for_each_entry(i, &amp;cache, list) { 1729 list_for_each_entry(i, &amp;cache, list) {
1728@@ -85,6 +94,7 @@
1729 obj-&gt;popularity = 0;
1730 atomic_set(&amp;obj-&gt;refcnt, 1); /* The cache holds a reference */
1731 spin_lock_init(&amp;obj-&gt;lock);
1732+ INIT_RCU_HEAD(&amp;obj-&gt;rcu);
1733
1734 spin_lock_irqsave(&amp;cache_lock, flags);
1735 __cache_add(obj);
1736@@ -104,12 +114,11 @@ 1730@@ -104,12 +114,11 @@
1737 struct object *cache_find(int id) 1731 struct object *cache_find(int id)
1738 { 1732 {
@@ -1922,9 +1916,12 @@ machines due to caching.
1922 <function>mutex_lock()</function> 1916 <function>mutex_lock()</function>
1923 </para> 1917 </para>
1924 <para> 1918 <para>
1925 There is a <function>mutex_trylock()</function> which can be 1919 There is a <function>mutex_trylock()</function> which does not
1926 used inside interrupt context, as it will not sleep. 1920 sleep. Still, it must not be used inside interrupt context since
1921 its implementation is not safe for that.
1927 <function>mutex_unlock()</function> will also never sleep. 1922 <function>mutex_unlock()</function> will also never sleep.
1923 It cannot be used in interrupt context either since a mutex
1924 must be released by the same task that acquired it.
1928 </para> 1925 </para>
1929 </listitem> 1926 </listitem>
1930 </itemizedlist> 1927 </itemizedlist>
@@ -1958,6 +1955,12 @@ machines due to caching.
1958 </sect1> 1955 </sect1>
1959 </chapter> 1956 </chapter>
1960 1957
1958 <chapter id="apiref">
1959 <title>Mutex API reference</title>
1960!Iinclude/linux/mutex.h
1961!Ekernel/mutex.c
1962 </chapter>
1963
1961 <chapter id="references"> 1964 <chapter id="references">
1962 <title>Further reading</title> 1965 <title>Further reading</title>
1963 1966
diff --git a/Documentation/DocBook/kgdb.tmpl b/Documentation/DocBook/kgdb.tmpl
index 55f12ac37acd..490d862c5f0d 100644
--- a/Documentation/DocBook/kgdb.tmpl
+++ b/Documentation/DocBook/kgdb.tmpl
@@ -199,10 +199,33 @@
199 may be configured as a kernel built-in or a kernel loadable module. 199 may be configured as a kernel built-in or a kernel loadable module.
200 You can only make use of <constant>kgdbwait</constant> and early 200 You can only make use of <constant>kgdbwait</constant> and early
201 debugging if you build kgdboc into the kernel as a built-in. 201 debugging if you build kgdboc into the kernel as a built-in.
202 <para>Optionally you can elect to activate kms (Kernel Mode
203 Setting) integration. When you use kms with kgdboc and you have a
204 video driver that has atomic mode setting hooks, it is possible to
205 enter the debugger on the graphics console. When the kernel
206 execution is resumed, the previous graphics mode will be restored.
207 This integration can serve as a useful tool to aid in diagnosing
208 crashes or doing analysis of memory with kdb while allowing the
209 full graphics console applications to run.
210 </para>
202 </para> 211 </para>
203 <sect2 id="kgdbocArgs"> 212 <sect2 id="kgdbocArgs">
204 <title>kgdboc arguments</title> 213 <title>kgdboc arguments</title>
205 <para>Usage: <constant>kgdboc=[kbd][[,]serial_device][,baud]</constant></para> 214 <para>Usage: <constant>kgdboc=[kms][[,]kbd][[,]serial_device][,baud]</constant></para>
215 <para>The order listed above must be observed if you use any of the
216 optional configurations together.
217 </para>
218 <para>Abbreviations:
219 <itemizedlist>
220 <listitem><para>kms = Kernel Mode Setting</para></listitem>
221 <listitem><para>kbd = Keyboard</para></listitem>
222 </itemizedlist>
223 </para>
224 <para>You can configure kgdboc to use the keyboard, and or a serial
225 device depending on if you are using kdb and or kgdb, in one of the
226 following scenarios. The order listed above must be observed if
227 you use any of the optional configurations together. Using kms +
228 only gdb is generally not a useful combination.</para>
206 <sect3 id="kgdbocArgs1"> 229 <sect3 id="kgdbocArgs1">
207 <title>Using loadable module or built-in</title> 230 <title>Using loadable module or built-in</title>
208 <para> 231 <para>
@@ -212,7 +235,7 @@
212 <listitem> 235 <listitem>
213 <para>As a kernel loadable module:</para> 236 <para>As a kernel loadable module:</para>
214 <para>Use the command: <constant>modprobe kgdboc kgdboc=&lt;tty-device&gt;,[baud]</constant></para> 237 <para>Use the command: <constant>modprobe kgdboc kgdboc=&lt;tty-device&gt;,[baud]</constant></para>
215 <para>Here are two examples of how you might formate the kgdboc 238 <para>Here are two examples of how you might format the kgdboc
216 string. The first is for an x86 target using the first serial port. 239 string. The first is for an x86 target using the first serial port.
217 The second example is for the ARM Versatile AB using the second 240 The second example is for the ARM Versatile AB using the second
218 serial port. 241 serial port.
@@ -240,6 +263,9 @@
240 </sect3> 263 </sect3>
241 <sect3 id="kgdbocArgs3"> 264 <sect3 id="kgdbocArgs3">
242 <title>More examples</title> 265 <title>More examples</title>
266 <para>You can configure kgdboc to use the keyboard, and or a serial
267 device depending on if you are using kdb and or kgdb, in one of the
268 following scenarios.</para>
243 <para>You can configure kgdboc to use the keyboard, and or a serial device 269 <para>You can configure kgdboc to use the keyboard, and or a serial device
244 depending on if you are using kdb and or kgdb, in one of the 270 depending on if you are using kdb and or kgdb, in one of the
245 following scenarios. 271 following scenarios.
@@ -255,6 +281,12 @@
255 <listitem><para>kdb with a keyboard</para> 281 <listitem><para>kdb with a keyboard</para>
256 <para><constant>kgdboc=kbd</constant></para> 282 <para><constant>kgdboc=kbd</constant></para>
257 </listitem> 283 </listitem>
284 <listitem><para>kdb with kernel mode setting</para>
285 <para><constant>kgdboc=kms,kbd</constant></para>
286 </listitem>
287 <listitem><para>kdb with kernel mode setting and kgdb over a serial port</para>
288 <para><constant>kgdboc=kms,kbd,ttyS0,115200</constant></para>
289 </listitem>
258 </orderedlist> 290 </orderedlist>
259 </para> 291 </para>
260 </sect3> 292 </sect3>
@@ -637,6 +669,8 @@ Task Addr Pid Parent [*] cpu State Thread Command
637 <listitem><para>The logic to perform safe memory reads and writes to memory while using the debugger</para></listitem> 669 <listitem><para>The logic to perform safe memory reads and writes to memory while using the debugger</para></listitem>
638 <listitem><para>A full implementation for software breakpoints unless overridden by the arch</para></listitem> 670 <listitem><para>A full implementation for software breakpoints unless overridden by the arch</para></listitem>
639 <listitem><para>The API to invoke either the kdb or kgdb frontend to the debug core.</para></listitem> 671 <listitem><para>The API to invoke either the kdb or kgdb frontend to the debug core.</para></listitem>
672 <listitem><para>The structures and callback API for atomic kernel mode setting.</para>
673 <para>NOTE: kgdboc is where the kms callbacks are invoked.</para></listitem>
640 </itemizedlist> 674 </itemizedlist>
641 </para> 675 </para>
642 </listitem> 676 </listitem>
@@ -747,6 +781,8 @@ Task Addr Pid Parent [*] cpu State Thread Command
747 </sect1> 781 </sect1>
748 <sect1 id="kgdbocDesign"> 782 <sect1 id="kgdbocDesign">
749 <title>kgdboc internals</title> 783 <title>kgdboc internals</title>
784 <sect2>
785 <title>kgdboc and uarts</title>
750 <para> 786 <para>
751 The kgdboc driver is actually a very thin driver that relies on the 787 The kgdboc driver is actually a very thin driver that relies on the
752 underlying low level to the hardware driver having "polling hooks" 788 underlying low level to the hardware driver having "polling hooks"
@@ -754,11 +790,8 @@ Task Addr Pid Parent [*] cpu State Thread Command
754 implementation of kgdboc it the serial_core was changed to expose a 790 implementation of kgdboc it the serial_core was changed to expose a
755 low level UART hook for doing polled mode reading and writing of a 791 low level UART hook for doing polled mode reading and writing of a
756 single character while in an atomic context. When kgdb makes an I/O 792 single character while in an atomic context. When kgdb makes an I/O
757 request to the debugger, kgdboc invokes a call back in the serial 793 request to the debugger, kgdboc invokes a callback in the serial
758 core which in turn uses the call back in the UART driver. It is 794 core which in turn uses the callback in the UART driver.</para>
759 certainly possible to extend kgdboc to work with non-UART based
760 consoles in the future.
761 </para>
762 <para> 795 <para>
763 When using kgdboc with a UART, the UART driver must implement two callbacks in the <constant>struct uart_ops</constant>. Example from drivers/8250.c:<programlisting> 796 When using kgdboc with a UART, the UART driver must implement two callbacks in the <constant>struct uart_ops</constant>. Example from drivers/8250.c:<programlisting>
764#ifdef CONFIG_CONSOLE_POLL 797#ifdef CONFIG_CONSOLE_POLL
@@ -772,9 +805,68 @@ Task Addr Pid Parent [*] cpu State Thread Command
772 that they can be called from an atomic context and have to restore 805 that they can be called from an atomic context and have to restore
773 the state of the UART chip on return such that the system can return 806 the state of the UART chip on return such that the system can return
774 to normal when the debugger detaches. You need to be very careful 807 to normal when the debugger detaches. You need to be very careful
775 with any kind of lock you consider, because failing here is most 808 with any kind of lock you consider, because failing here is most likely
776 going to mean pressing the reset button. 809 going to mean pressing the reset button.
777 </para> 810 </para>
811 </sect2>
812 <sect2 id="kgdbocKbd">
813 <title>kgdboc and keyboards</title>
814 <para>The kgdboc driver contains logic to configure communications
815 with an attached keyboard. The keyboard infrastructure is only
816 compiled into the kernel when CONFIG_KDB_KEYBOARD=y is set in the
817 kernel configuration.</para>
818 <para>The core polled keyboard driver driver for PS/2 type keyboards
819 is in drivers/char/kdb_keyboard.c. This driver is hooked into the
820 debug core when kgdboc populates the callback in the array
821 called <constant>kdb_poll_funcs[]</constant>. The
822 kdb_get_kbd_char() is the top-level function which polls hardware
823 for single character input.
824 </para>
825 </sect2>
826 <sect2 id="kgdbocKms">
827 <title>kgdboc and kms</title>
828 <para>The kgdboc driver contains logic to request the graphics
829 display to switch to a text context when you are using
830 "kgdboc=kms,kbd", provided that you have a video driver which has a
831 frame buffer console and atomic kernel mode setting support.</para>
832 <para>
833 Every time the kernel
834 debugger is entered it calls kgdboc_pre_exp_handler() which in turn
835 calls con_debug_enter() in the virtual console layer. On resuming kernel
836 execution, the kernel debugger calls kgdboc_post_exp_handler() which
837 in turn calls con_debug_leave().</para>
838 <para>Any video driver that wants to be compatible with the kernel
839 debugger and the atomic kms callbacks must implement the
840 mode_set_base_atomic, fb_debug_enter and fb_debug_leave operations.
841 For the fb_debug_enter and fb_debug_leave the option exists to use
842 the generic drm fb helper functions or implement something custom for
843 the hardware. The following example shows the initialization of the
844 .mode_set_base_atomic operation in
845 drivers/gpu/drm/i915/intel_display.c:
846 <informalexample>
847 <programlisting>
848static const struct drm_crtc_helper_funcs intel_helper_funcs = {
849[...]
850 .mode_set_base_atomic = intel_pipe_set_base_atomic,
851[...]
852};
853 </programlisting>
854 </informalexample>
855 </para>
856 <para>Here is an example of how the i915 driver initializes the fb_debug_enter and fb_debug_leave functions to use the generic drm helpers in
857 drivers/gpu/drm/i915/intel_fb.c:
858 <informalexample>
859 <programlisting>
860static struct fb_ops intelfb_ops = {
861[...]
862 .fb_debug_enter = drm_fb_helper_debug_enter,
863 .fb_debug_leave = drm_fb_helper_debug_leave,
864[...]
865};
866 </programlisting>
867 </informalexample>
868 </para>
869 </sect2>
778 </sect1> 870 </sect1>
779 </chapter> 871 </chapter>
780 <chapter id="credits"> 872 <chapter id="credits">
diff --git a/Documentation/DocBook/mac80211.tmpl b/Documentation/DocBook/mac80211.tmpl
deleted file mode 100644
index affb15a344a1..000000000000
--- a/Documentation/DocBook/mac80211.tmpl
+++ /dev/null
@@ -1,337 +0,0 @@
1<?xml version="1.0" encoding="UTF-8"?>
2<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
3 "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd" []>
4
5<book id="mac80211-developers-guide">
6 <bookinfo>
7 <title>The mac80211 subsystem for kernel developers</title>
8
9 <authorgroup>
10 <author>
11 <firstname>Johannes</firstname>
12 <surname>Berg</surname>
13 <affiliation>
14 <address><email>johannes@sipsolutions.net</email></address>
15 </affiliation>
16 </author>
17 </authorgroup>
18
19 <copyright>
20 <year>2007-2009</year>
21 <holder>Johannes Berg</holder>
22 </copyright>
23
24 <legalnotice>
25 <para>
26 This documentation is free software; you can redistribute
27 it and/or modify it under the terms of the GNU General Public
28 License version 2 as published by the Free Software Foundation.
29 </para>
30
31 <para>
32 This documentation is distributed in the hope that it will be
33 useful, but WITHOUT ANY WARRANTY; without even the implied
34 warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
35 See the GNU General Public License for more details.
36 </para>
37
38 <para>
39 You should have received a copy of the GNU General Public
40 License along with this documentation; if not, write to the Free
41 Software Foundation, Inc., 59 Temple Place, Suite 330, Boston,
42 MA 02111-1307 USA
43 </para>
44
45 <para>
46 For more details see the file COPYING in the source
47 distribution of Linux.
48 </para>
49 </legalnotice>
50
51 <abstract>
52!Pinclude/net/mac80211.h Introduction
53!Pinclude/net/mac80211.h Warning
54 </abstract>
55 </bookinfo>
56
57 <toc></toc>
58
59<!--
60Generally, this document shall be ordered by increasing complexity.
61It is important to note that readers should be able to read only
62the first few sections to get a working driver and only advanced
63usage should require reading the full document.
64-->
65
66 <part>
67 <title>The basic mac80211 driver interface</title>
68 <partintro>
69 <para>
70 You should read and understand the information contained
71 within this part of the book while implementing a driver.
72 In some chapters, advanced usage is noted, that may be
73 skipped at first.
74 </para>
75 <para>
76 This part of the book only covers station and monitor mode
77 functionality, additional information required to implement
78 the other modes is covered in the second part of the book.
79 </para>
80 </partintro>
81
82 <chapter id="basics">
83 <title>Basic hardware handling</title>
84 <para>TBD</para>
85 <para>
86 This chapter shall contain information on getting a hw
87 struct allocated and registered with mac80211.
88 </para>
89 <para>
90 Since it is required to allocate rates/modes before registering
91 a hw struct, this chapter shall also contain information on setting
92 up the rate/mode structs.
93 </para>
94 <para>
95 Additionally, some discussion about the callbacks and
96 the general programming model should be in here, including
97 the definition of ieee80211_ops which will be referred to
98 a lot.
99 </para>
100 <para>
101 Finally, a discussion of hardware capabilities should be done
102 with references to other parts of the book.
103 </para>
104<!-- intentionally multiple !F lines to get proper order -->
105!Finclude/net/mac80211.h ieee80211_hw
106!Finclude/net/mac80211.h ieee80211_hw_flags
107!Finclude/net/mac80211.h SET_IEEE80211_DEV
108!Finclude/net/mac80211.h SET_IEEE80211_PERM_ADDR
109!Finclude/net/mac80211.h ieee80211_ops
110!Finclude/net/mac80211.h ieee80211_alloc_hw
111!Finclude/net/mac80211.h ieee80211_register_hw
112!Finclude/net/mac80211.h ieee80211_get_tx_led_name
113!Finclude/net/mac80211.h ieee80211_get_rx_led_name
114!Finclude/net/mac80211.h ieee80211_get_assoc_led_name
115!Finclude/net/mac80211.h ieee80211_get_radio_led_name
116!Finclude/net/mac80211.h ieee80211_unregister_hw
117!Finclude/net/mac80211.h ieee80211_free_hw
118 </chapter>
119
120 <chapter id="phy-handling">
121 <title>PHY configuration</title>
122 <para>TBD</para>
123 <para>
124 This chapter should describe PHY handling including
125 start/stop callbacks and the various structures used.
126 </para>
127!Finclude/net/mac80211.h ieee80211_conf
128!Finclude/net/mac80211.h ieee80211_conf_flags
129 </chapter>
130
131 <chapter id="iface-handling">
132 <title>Virtual interfaces</title>
133 <para>TBD</para>
134 <para>
135 This chapter should describe virtual interface basics
136 that are relevant to the driver (VLANs, MGMT etc are not.)
137 It should explain the use of the add_iface/remove_iface
138 callbacks as well as the interface configuration callbacks.
139 </para>
140 <para>Things related to AP mode should be discussed there.</para>
141 <para>
142 Things related to supporting multiple interfaces should be
143 in the appropriate chapter, a BIG FAT note should be here about
144 this though and the recommendation to allow only a single
145 interface in STA mode at first!
146 </para>
147!Finclude/net/mac80211.h ieee80211_vif
148 </chapter>
149
150 <chapter id="rx-tx">
151 <title>Receive and transmit processing</title>
152 <sect1>
153 <title>what should be here</title>
154 <para>TBD</para>
155 <para>
156 This should describe the receive and transmit
157 paths in mac80211/the drivers as well as
158 transmit status handling.
159 </para>
160 </sect1>
161 <sect1>
162 <title>Frame format</title>
163!Pinclude/net/mac80211.h Frame format
164 </sect1>
165 <sect1>
166 <title>Packet alignment</title>
167!Pnet/mac80211/rx.c Packet alignment
168 </sect1>
169 <sect1>
170 <title>Calling into mac80211 from interrupts</title>
171!Pinclude/net/mac80211.h Calling mac80211 from interrupts
172 </sect1>
173 <sect1>
174 <title>functions/definitions</title>
175!Finclude/net/mac80211.h ieee80211_rx_status
176!Finclude/net/mac80211.h mac80211_rx_flags
177!Finclude/net/mac80211.h ieee80211_tx_info
178!Finclude/net/mac80211.h ieee80211_rx
179!Finclude/net/mac80211.h ieee80211_rx_irqsafe
180!Finclude/net/mac80211.h ieee80211_tx_status
181!Finclude/net/mac80211.h ieee80211_tx_status_irqsafe
182!Finclude/net/mac80211.h ieee80211_rts_get
183!Finclude/net/mac80211.h ieee80211_rts_duration
184!Finclude/net/mac80211.h ieee80211_ctstoself_get
185!Finclude/net/mac80211.h ieee80211_ctstoself_duration
186!Finclude/net/mac80211.h ieee80211_generic_frame_duration
187!Finclude/net/mac80211.h ieee80211_wake_queue
188!Finclude/net/mac80211.h ieee80211_stop_queue
189!Finclude/net/mac80211.h ieee80211_wake_queues
190!Finclude/net/mac80211.h ieee80211_stop_queues
191 </sect1>
192 </chapter>
193
194 <chapter id="filters">
195 <title>Frame filtering</title>
196!Pinclude/net/mac80211.h Frame filtering
197!Finclude/net/mac80211.h ieee80211_filter_flags
198 </chapter>
199 </part>
200
201 <part id="advanced">
202 <title>Advanced driver interface</title>
203 <partintro>
204 <para>
205 Information contained within this part of the book is
206 of interest only for advanced interaction of mac80211
207 with drivers to exploit more hardware capabilities and
208 improve performance.
209 </para>
210 </partintro>
211
212 <chapter id="hardware-crypto-offload">
213 <title>Hardware crypto acceleration</title>
214!Pinclude/net/mac80211.h Hardware crypto acceleration
215<!-- intentionally multiple !F lines to get proper order -->
216!Finclude/net/mac80211.h set_key_cmd
217!Finclude/net/mac80211.h ieee80211_key_conf
218!Finclude/net/mac80211.h ieee80211_key_alg
219!Finclude/net/mac80211.h ieee80211_key_flags
220 </chapter>
221
222 <chapter id="powersave">
223 <title>Powersave support</title>
224!Pinclude/net/mac80211.h Powersave support
225 </chapter>
226
227 <chapter id="beacon-filter">
228 <title>Beacon filter support</title>
229!Pinclude/net/mac80211.h Beacon filter support
230!Finclude/net/mac80211.h ieee80211_beacon_loss
231 </chapter>
232
233 <chapter id="qos">
234 <title>Multiple queues and QoS support</title>
235 <para>TBD</para>
236!Finclude/net/mac80211.h ieee80211_tx_queue_params
237 </chapter>
238
239 <chapter id="AP">
240 <title>Access point mode support</title>
241 <para>TBD</para>
242 <para>Some parts of the if_conf should be discussed here instead</para>
243 <para>
244 Insert notes about VLAN interfaces with hw crypto here or
245 in the hw crypto chapter.
246 </para>
247!Finclude/net/mac80211.h ieee80211_get_buffered_bc
248!Finclude/net/mac80211.h ieee80211_beacon_get
249 </chapter>
250
251 <chapter id="multi-iface">
252 <title>Supporting multiple virtual interfaces</title>
253 <para>TBD</para>
254 <para>
255 Note: WDS with identical MAC address should almost always be OK
256 </para>
257 <para>
258 Insert notes about having multiple virtual interfaces with
259 different MAC addresses here, note which configurations are
260 supported by mac80211, add notes about supporting hw crypto
261 with it.
262 </para>
263 </chapter>
264
265 <chapter id="hardware-scan-offload">
266 <title>Hardware scan offload</title>
267 <para>TBD</para>
268!Finclude/net/mac80211.h ieee80211_scan_completed
269 </chapter>
270 </part>
271
272 <part id="rate-control">
273 <title>Rate control interface</title>
274 <partintro>
275 <para>TBD</para>
276 <para>
277 This part of the book describes the rate control algorithm
278 interface and how it relates to mac80211 and drivers.
279 </para>
280 </partintro>
281 <chapter id="dummy">
282 <title>dummy chapter</title>
283 <para>TBD</para>
284 </chapter>
285 </part>
286
287 <part id="internal">
288 <title>Internals</title>
289 <partintro>
290 <para>TBD</para>
291 <para>
292 This part of the book describes mac80211 internals.
293 </para>
294 </partintro>
295
296 <chapter id="key-handling">
297 <title>Key handling</title>
298 <sect1>
299 <title>Key handling basics</title>
300!Pnet/mac80211/key.c Key handling basics
301 </sect1>
302 <sect1>
303 <title>MORE TBD</title>
304 <para>TBD</para>
305 </sect1>
306 </chapter>
307
308 <chapter id="rx-processing">
309 <title>Receive processing</title>
310 <para>TBD</para>
311 </chapter>
312
313 <chapter id="tx-processing">
314 <title>Transmit processing</title>
315 <para>TBD</para>
316 </chapter>
317
318 <chapter id="sta-info">
319 <title>Station info handling</title>
320 <sect1>
321 <title>Programming information</title>
322!Fnet/mac80211/sta_info.h sta_info
323!Fnet/mac80211/sta_info.h ieee80211_sta_info_flags
324 </sect1>
325 <sect1>
326 <title>STA information lifetime rules</title>
327!Pnet/mac80211/sta_info.c STA information lifetime rules
328 </sect1>
329 </chapter>
330
331 <chapter id="synchronisation">
332 <title>Synchronisation</title>
333 <para>TBD</para>
334 <para>Locking, lots of RCU</para>
335 </chapter>
336 </part>
337</book>
diff --git a/Documentation/DocBook/media-entities.tmpl b/Documentation/DocBook/media-entities.tmpl
index 5d4d40f429a5..be34dcbe0d90 100644
--- a/Documentation/DocBook/media-entities.tmpl
+++ b/Documentation/DocBook/media-entities.tmpl
@@ -218,6 +218,7 @@
218<!ENTITY sub-dev-teletext SYSTEM "v4l/dev-teletext.xml"> 218<!ENTITY sub-dev-teletext SYSTEM "v4l/dev-teletext.xml">
219<!ENTITY sub-driver SYSTEM "v4l/driver.xml"> 219<!ENTITY sub-driver SYSTEM "v4l/driver.xml">
220<!ENTITY sub-libv4l SYSTEM "v4l/libv4l.xml"> 220<!ENTITY sub-libv4l SYSTEM "v4l/libv4l.xml">
221<!ENTITY sub-lirc_device_interface SYSTEM "v4l/lirc_device_interface.xml">
221<!ENTITY sub-remote_controllers SYSTEM "v4l/remote_controllers.xml"> 222<!ENTITY sub-remote_controllers SYSTEM "v4l/remote_controllers.xml">
222<!ENTITY sub-fdl-appendix SYSTEM "v4l/fdl-appendix.xml"> 223<!ENTITY sub-fdl-appendix SYSTEM "v4l/fdl-appendix.xml">
223<!ENTITY sub-close SYSTEM "v4l/func-close.xml"> 224<!ENTITY sub-close SYSTEM "v4l/func-close.xml">
@@ -249,6 +250,9 @@
249<!ENTITY sub-yuv422p SYSTEM "v4l/pixfmt-yuv422p.xml"> 250<!ENTITY sub-yuv422p SYSTEM "v4l/pixfmt-yuv422p.xml">
250<!ENTITY sub-yuyv SYSTEM "v4l/pixfmt-yuyv.xml"> 251<!ENTITY sub-yuyv SYSTEM "v4l/pixfmt-yuyv.xml">
251<!ENTITY sub-yvyu SYSTEM "v4l/pixfmt-yvyu.xml"> 252<!ENTITY sub-yvyu SYSTEM "v4l/pixfmt-yvyu.xml">
253<!ENTITY sub-srggb10 SYSTEM "v4l/pixfmt-srggb10.xml">
254<!ENTITY sub-srggb8 SYSTEM "v4l/pixfmt-srggb8.xml">
255<!ENTITY sub-y10 SYSTEM "v4l/pixfmt-y10.xml">
252<!ENTITY sub-pixfmt SYSTEM "v4l/pixfmt.xml"> 256<!ENTITY sub-pixfmt SYSTEM "v4l/pixfmt.xml">
253<!ENTITY sub-cropcap SYSTEM "v4l/vidioc-cropcap.xml"> 257<!ENTITY sub-cropcap SYSTEM "v4l/vidioc-cropcap.xml">
254<!ENTITY sub-dbg-g-register SYSTEM "v4l/vidioc-dbg-g-register.xml"> 258<!ENTITY sub-dbg-g-register SYSTEM "v4l/vidioc-dbg-g-register.xml">
@@ -346,6 +350,9 @@
346<!ENTITY yuv422p SYSTEM "v4l/pixfmt-yuv422p.xml"> 350<!ENTITY yuv422p SYSTEM "v4l/pixfmt-yuv422p.xml">
347<!ENTITY yuyv SYSTEM "v4l/pixfmt-yuyv.xml"> 351<!ENTITY yuyv SYSTEM "v4l/pixfmt-yuyv.xml">
348<!ENTITY yvyu SYSTEM "v4l/pixfmt-yvyu.xml"> 352<!ENTITY yvyu SYSTEM "v4l/pixfmt-yvyu.xml">
353<!ENTITY srggb10 SYSTEM "v4l/pixfmt-srggb10.xml">
354<!ENTITY srggb8 SYSTEM "v4l/pixfmt-srggb8.xml">
355<!ENTITY y10 SYSTEM "v4l/pixfmt-y10.xml">
349<!ENTITY cropcap SYSTEM "v4l/vidioc-cropcap.xml"> 356<!ENTITY cropcap SYSTEM "v4l/vidioc-cropcap.xml">
350<!ENTITY dbg-g-register SYSTEM "v4l/vidioc-dbg-g-register.xml"> 357<!ENTITY dbg-g-register SYSTEM "v4l/vidioc-dbg-g-register.xml">
351<!ENTITY encoder-cmd SYSTEM "v4l/vidioc-encoder-cmd.xml"> 358<!ENTITY encoder-cmd SYSTEM "v4l/vidioc-encoder-cmd.xml">
diff --git a/Documentation/DocBook/media.tmpl b/Documentation/DocBook/media.tmpl
index eea564bb12cb..f11048d4053f 100644
--- a/Documentation/DocBook/media.tmpl
+++ b/Documentation/DocBook/media.tmpl
@@ -28,7 +28,7 @@
28<title>LINUX MEDIA INFRASTRUCTURE API</title> 28<title>LINUX MEDIA INFRASTRUCTURE API</title>
29 29
30<copyright> 30<copyright>
31 <year>2009</year> 31 <year>2009-2010</year>
32 <holder>LinuxTV Developers</holder> 32 <holder>LinuxTV Developers</holder>
33</copyright> 33</copyright>
34 34
@@ -61,7 +61,7 @@ Foundation. A copy of the license is included in the chapter entitled
61 in fact it covers several different video standards including 61 in fact it covers several different video standards including
62 DVB-T, DVB-S, DVB-C and ATSC. The API is currently being updated 62 DVB-T, DVB-S, DVB-C and ATSC. The API is currently being updated
63 to documment support also for DVB-S2, ISDB-T and ISDB-S.</para> 63 to documment support also for DVB-S2, ISDB-T and ISDB-S.</para>
64 <para>The third part covers other API's used by all media infrastructure devices</para> 64 <para>The third part covers Remote Controller API</para>
65 <para>For additional information and for the latest development code, 65 <para>For additional information and for the latest development code,
66 see: <ulink url="http://linuxtv.org">http://linuxtv.org</ulink>.</para> 66 see: <ulink url="http://linuxtv.org">http://linuxtv.org</ulink>.</para>
67 <para>For discussing improvements, reporting troubles, sending new drivers, etc, please mail to: <ulink url="http://vger.kernel.org/vger-lists.html#linux-media">Linux Media Mailing List (LMML).</ulink>.</para> 67 <para>For discussing improvements, reporting troubles, sending new drivers, etc, please mail to: <ulink url="http://vger.kernel.org/vger-lists.html#linux-media">Linux Media Mailing List (LMML).</ulink>.</para>
@@ -86,7 +86,7 @@ Foundation. A copy of the license is included in the chapter entitled
86</author> 86</author>
87</authorgroup> 87</authorgroup>
88<copyright> 88<copyright>
89 <year>2009</year> 89 <year>2009-2010</year>
90 <holder>Mauro Carvalho Chehab</holder> 90 <holder>Mauro Carvalho Chehab</holder>
91</copyright> 91</copyright>
92 92
@@ -101,7 +101,7 @@ Foundation. A copy of the license is included in the chapter entitled
101</revhistory> 101</revhistory>
102</partinfo> 102</partinfo>
103 103
104<title>Other API's used by media infrastructure drivers</title> 104<title>Remote Controller API</title>
105<chapter id="remote_controllers"> 105<chapter id="remote_controllers">
106&sub-remote_controllers; 106&sub-remote_controllers;
107</chapter> 107</chapter>
diff --git a/Documentation/DocBook/scsi.tmpl b/Documentation/DocBook/scsi.tmpl
index d87f4569e768..324b53494f08 100644
--- a/Documentation/DocBook/scsi.tmpl
+++ b/Documentation/DocBook/scsi.tmpl
@@ -393,7 +393,7 @@
393 </para> 393 </para>
394 <para> 394 <para>
395 For documentation see 395 For documentation see
396 <ulink url='http://www.torque.net/sg/sdebug26.html'>http://www.torque.net/sg/sdebug26.html</ulink> 396 <ulink url='http://sg.danny.cz/sg/sdebug26.html'>http://sg.danny.cz/sg/sdebug26.html</ulink>
397 </para> 397 </para>
398<!-- !Edrivers/scsi/scsi_debug.c --> 398<!-- !Edrivers/scsi/scsi_debug.c -->
399 </sect2> 399 </sect2>
diff --git a/Documentation/DocBook/stylesheet.xsl b/Documentation/DocBook/stylesheet.xsl
index 254c1d5d2e50..85b25275196f 100644
--- a/Documentation/DocBook/stylesheet.xsl
+++ b/Documentation/DocBook/stylesheet.xsl
@@ -6,4 +6,5 @@
6<param name="callout.graphics">0</param> 6<param name="callout.graphics">0</param>
7<!-- <param name="paper.type">A4</param> --> 7<!-- <param name="paper.type">A4</param> -->
8<param name="generate.section.toc.level">2</param> 8<param name="generate.section.toc.level">2</param>
9<param name="use.id.as.filename">1</param>
9</stylesheet> 10</stylesheet>
diff --git a/Documentation/DocBook/tracepoint.tmpl b/Documentation/DocBook/tracepoint.tmpl
index e8473eae2a20..b57a9ede3224 100644
--- a/Documentation/DocBook/tracepoint.tmpl
+++ b/Documentation/DocBook/tracepoint.tmpl
@@ -104,4 +104,9 @@
104 <title>Block IO</title> 104 <title>Block IO</title>
105!Iinclude/trace/events/block.h 105!Iinclude/trace/events/block.h
106 </chapter> 106 </chapter>
107
108 <chapter id="workqueue">
109 <title>Workqueue</title>
110!Iinclude/trace/events/workqueue.h
111 </chapter>
107</book> 112</book>
diff --git a/Documentation/DocBook/v4l/compat.xml b/Documentation/DocBook/v4l/compat.xml
index b42b935913cd..c9ce61d981f5 100644
--- a/Documentation/DocBook/v4l/compat.xml
+++ b/Documentation/DocBook/v4l/compat.xml
@@ -21,11 +21,15 @@ API.</para>
21 <title>Opening and Closing Devices</title> 21 <title>Opening and Closing Devices</title>
22 22
23 <para>For compatibility reasons the character device file names 23 <para>For compatibility reasons the character device file names
24recommended for V4L2 video capture, overlay, radio, teletext and raw 24recommended for V4L2 video capture, overlay, radio and raw
25vbi capture devices did not change from those used by V4L. They are 25vbi capture devices did not change from those used by V4L. They are
26listed in <xref linkend="devices" /> and below in <xref 26listed in <xref linkend="devices" /> and below in <xref
27 linkend="v4l-dev" />.</para> 27 linkend="v4l-dev" />.</para>
28 28
29 <para>The teletext devices (minor range 192-223) have been removed in
30V4L2 and no longer exist. There is no hardware available anymore for handling
31pure teletext. Instead raw or sliced VBI is used.</para>
32
29 <para>The V4L <filename>videodev</filename> module automatically 33 <para>The V4L <filename>videodev</filename> module automatically
30assigns minor numbers to drivers in load order, depending on the 34assigns minor numbers to drivers in load order, depending on the
31registered device type. We recommend that V4L2 drivers by default 35registered device type. We recommend that V4L2 drivers by default
@@ -66,13 +70,6 @@ not compatible with V4L or V4L2.</para> </footnote>,
66 <entry>64-127</entry> 70 <entry>64-127</entry>
67 </row> 71 </row>
68 <row> 72 <row>
69 <entry>Teletext decoder</entry>
70 <entry><para><filename>/dev/vtx</filename>,
71<filename>/dev/vtx0</filename> to
72<filename>/dev/vtx31</filename></para></entry>
73 <entry>192-223</entry>
74 </row>
75 <row>
76 <entry>Raw VBI capture</entry> 73 <entry>Raw VBI capture</entry>
77 <entry><para><filename>/dev/vbi</filename>, 74 <entry><para><filename>/dev/vbi</filename>,
78<filename>/dev/vbi0</filename> to 75<filename>/dev/vbi0</filename> to
@@ -1091,8 +1088,9 @@ signed 64-bit integer. Output devices should not send a buffer out
1091until the time in the timestamp field has arrived. I would like to 1088until the time in the timestamp field has arrived. I would like to
1092follow SGI's lead, and adopt a multimedia timestamping system like 1089follow SGI's lead, and adopt a multimedia timestamping system like
1093their UST (Unadjusted System Time). See 1090their UST (Unadjusted System Time). See
1094http://reality.sgi.com/cpirazzi_engr/lg/time/intro.html. [This link is 1091http://web.archive.org/web/*/http://reality.sgi.com
1095no longer valid.] UST uses timestamps that are 64-bit signed integers 1092/cpirazzi_engr/lg/time/intro.html.
1093UST uses timestamps that are 64-bit signed integers
1096(not struct timeval's) and given in nanosecond units. The UST clock 1094(not struct timeval's) and given in nanosecond units. The UST clock
1097starts at zero when the system is booted and runs continuously and 1095starts at zero when the system is booted and runs continuously and
1098uniformly. It takes a little over 292 years for UST to overflow. There 1096uniformly. It takes a little over 292 years for UST to overflow. There
@@ -2344,6 +2342,17 @@ more information.</para>
2344 </listitem> 2342 </listitem>
2345 </orderedlist> 2343 </orderedlist>
2346 </section> 2344 </section>
2345 <section>
2346 <title>V4L2 in Linux 2.6.37</title>
2347 <orderedlist>
2348 <listitem>
2349 <para>Remove the vtx (videotext/teletext) API. This API was no longer
2350used and no hardware exists to verify the API. Nor were any userspace applications found
2351that used it. It was originally scheduled for removal in 2.6.35.
2352 </para>
2353 </listitem>
2354 </orderedlist>
2355 </section>
2347 2356
2348 <section id="other"> 2357 <section id="other">
2349 <title>Relation of V4L2 to other Linux multimedia APIs</title> 2358 <title>Relation of V4L2 to other Linux multimedia APIs</title>
diff --git a/Documentation/DocBook/v4l/controls.xml b/Documentation/DocBook/v4l/controls.xml
index 8408caaee276..2fae3e87ce73 100644
--- a/Documentation/DocBook/v4l/controls.xml
+++ b/Documentation/DocBook/v4l/controls.xml
@@ -312,10 +312,17 @@ minimum value disables backlight compensation.</entry>
312 information and bits 24-31 must be zero.</entry> 312 information and bits 24-31 must be zero.</entry>
313 </row> 313 </row>
314 <row> 314 <row>
315 <entry><constant>V4L2_CID_ILLUMINATORS_1</constant>
316 <constant>V4L2_CID_ILLUMINATORS_2</constant></entry>
317 <entry>boolean</entry>
318 <entry>Switch on or off the illuminator 1 or 2 of the device
319 (usually a microscope).</entry>
320 </row>
321 <row>
315 <entry><constant>V4L2_CID_LASTP1</constant></entry> 322 <entry><constant>V4L2_CID_LASTP1</constant></entry>
316 <entry></entry> 323 <entry></entry>
317 <entry>End of the predefined control IDs (currently 324 <entry>End of the predefined control IDs (currently
318<constant>V4L2_CID_BG_COLOR</constant> + 1).</entry> 325<constant>V4L2_CID_ILLUMINATORS_2</constant> + 1).</entry>
319 </row> 326 </row>
320 <row> 327 <row>
321 <entry><constant>V4L2_CID_PRIVATE_BASE</constant></entry> 328 <entry><constant>V4L2_CID_PRIVATE_BASE</constant></entry>
@@ -357,9 +364,6 @@ enumerate_menu (void)
357 querymenu.index++) { 364 querymenu.index++) {
358 if (0 == ioctl (fd, &VIDIOC-QUERYMENU;, &amp;querymenu)) { 365 if (0 == ioctl (fd, &VIDIOC-QUERYMENU;, &amp;querymenu)) {
359 printf (" %s\n", querymenu.name); 366 printf (" %s\n", querymenu.name);
360 } else {
361 perror ("VIDIOC_QUERYMENU");
362 exit (EXIT_FAILURE);
363 } 367 }
364 } 368 }
365} 369}
diff --git a/Documentation/DocBook/v4l/dev-rds.xml b/Documentation/DocBook/v4l/dev-rds.xml
index 0869d701b1e5..360d2737e649 100644
--- a/Documentation/DocBook/v4l/dev-rds.xml
+++ b/Documentation/DocBook/v4l/dev-rds.xml
@@ -3,15 +3,16 @@
3 <para>The Radio Data System transmits supplementary 3 <para>The Radio Data System transmits supplementary
4information in binary format, for example the station name or travel 4information in binary format, for example the station name or travel
5information, on an inaudible audio subcarrier of a radio program. This 5information, on an inaudible audio subcarrier of a radio program. This
6interface is aimed at devices capable of receiving and decoding RDS 6interface is aimed at devices capable of receiving and/or transmitting RDS
7information.</para> 7information.</para>
8 8
9 <para>For more information see the core RDS standard <xref linkend="en50067" /> 9 <para>For more information see the core RDS standard <xref linkend="en50067" />
10and the RBDS standard <xref linkend="nrsc4" />.</para> 10and the RBDS standard <xref linkend="nrsc4" />.</para>
11 11
12 <para>Note that the RBDS standard as is used in the USA is almost identical 12 <para>Note that the RBDS standard as is used in the USA is almost identical
13to the RDS standard. Any RDS decoder can also handle RBDS. Only some of the fields 13to the RDS standard. Any RDS decoder/encoder can also handle RBDS. Only some of the
14have slightly different meanings. See the RBDS standard for more information.</para> 14fields have slightly different meanings. See the RBDS standard for more
15information.</para>
15 16
16 <para>The RBDS standard also specifies support for MMBS (Modified Mobile Search). 17 <para>The RBDS standard also specifies support for MMBS (Modified Mobile Search).
17This is a proprietary format which seems to be discontinued. The RDS interface does not 18This is a proprietary format which seems to be discontinued. The RDS interface does not
@@ -21,16 +22,25 @@ be needed, then please contact the linux-media mailing list: &v4l-ml;.</para>
21 <section> 22 <section>
22 <title>Querying Capabilities</title> 23 <title>Querying Capabilities</title>
23 24
24 <para>Devices supporting the RDS capturing API 25 <para>Devices supporting the RDS capturing API set
25set the <constant>V4L2_CAP_RDS_CAPTURE</constant> flag in 26the <constant>V4L2_CAP_RDS_CAPTURE</constant> flag in
26the <structfield>capabilities</structfield> field of &v4l2-capability; 27the <structfield>capabilities</structfield> field of &v4l2-capability;
27returned by the &VIDIOC-QUERYCAP; ioctl. 28returned by the &VIDIOC-QUERYCAP; ioctl. Any tuner that supports RDS
28Any tuner that supports RDS will set the 29will set the <constant>V4L2_TUNER_CAP_RDS</constant> flag in
29<constant>V4L2_TUNER_CAP_RDS</constant> flag in the <structfield>capability</structfield> 30the <structfield>capability</structfield> field of &v4l2-tuner;. If
30field of &v4l2-tuner;. 31the driver only passes RDS blocks without interpreting the data
31Whether an RDS signal is present can be detected by looking at 32the <constant>V4L2_TUNER_SUB_RDS_BLOCK_IO</constant> flag has to be
32the <structfield>rxsubchans</structfield> field of &v4l2-tuner;: the 33set, see <link linkend="reading-rds-data">Reading RDS data</link>.
33<constant>V4L2_TUNER_SUB_RDS</constant> will be set if RDS data was detected.</para> 34For future use the
35flag <constant>V4L2_TUNER_SUB_RDS_CONTROLS</constant> has also been
36defined. However, a driver for a radio tuner with this capability does
37not yet exist, so if you are planning to write such a driver you
38should discuss this on the linux-media mailing list: &v4l-ml;.</para>
39
40 <para> Whether an RDS signal is present can be detected by looking
41at the <structfield>rxsubchans</structfield> field of &v4l2-tuner;:
42the <constant>V4L2_TUNER_SUB_RDS</constant> will be set if RDS data
43was detected.</para>
34 44
35 <para>Devices supporting the RDS output API 45 <para>Devices supporting the RDS output API
36set the <constant>V4L2_CAP_RDS_OUTPUT</constant> flag in 46set the <constant>V4L2_CAP_RDS_OUTPUT</constant> flag in
@@ -40,16 +50,31 @@ Any modulator that supports RDS will set the
40<constant>V4L2_TUNER_CAP_RDS</constant> flag in the <structfield>capability</structfield> 50<constant>V4L2_TUNER_CAP_RDS</constant> flag in the <structfield>capability</structfield>
41field of &v4l2-modulator;. 51field of &v4l2-modulator;.
42In order to enable the RDS transmission one must set the <constant>V4L2_TUNER_SUB_RDS</constant> 52In order to enable the RDS transmission one must set the <constant>V4L2_TUNER_SUB_RDS</constant>
43bit in the <structfield>txsubchans</structfield> field of &v4l2-modulator;.</para> 53bit in the <structfield>txsubchans</structfield> field of &v4l2-modulator;.
44 54If the driver only passes RDS blocks without interpreting the data
55the <constant>V4L2_TUNER_SUB_RDS_BLOCK_IO</constant> flag has to be set. If the
56tuner is capable of handling RDS entities like program identification codes and radio
57text, the flag <constant>V4L2_TUNER_SUB_RDS_CONTROLS</constant> should be set,
58see <link linkend="writing-rds-data">Writing RDS data</link> and
59<link linkend="fm-tx-controls">FM Transmitter Control Reference</link>.</para>
45 </section> 60 </section>
46 61
47 <section> 62 <section id="reading-rds-data">
48 <title>Reading RDS data</title> 63 <title>Reading RDS data</title>
49 64
50 <para>RDS data can be read from the radio device 65 <para>RDS data can be read from the radio device
51with the &func-read; function. The data is packed in groups of three bytes, 66with the &func-read; function. The data is packed in groups of three bytes.</para>
67 </section>
68
69 <section id="writing-rds-data">
70 <title>Writing RDS data</title>
71
72 <para>RDS data can be written to the radio device
73with the &func-write; function. The data is packed in groups of three bytes,
52as follows:</para> 74as follows:</para>
75 </section>
76
77 <section>
53 <table frame="none" pgwide="1" id="v4l2-rds-data"> 78 <table frame="none" pgwide="1" id="v4l2-rds-data">
54 <title>struct 79 <title>struct
55<structname>v4l2_rds_data</structname></title> 80<structname>v4l2_rds_data</structname></title>
@@ -111,48 +136,57 @@ as follows:</para>
111 <tbody valign="top"> 136 <tbody valign="top">
112 <row> 137 <row>
113 <entry>V4L2_RDS_BLOCK_MSK</entry> 138 <entry>V4L2_RDS_BLOCK_MSK</entry>
139 <entry> </entry>
114 <entry>7</entry> 140 <entry>7</entry>
115 <entry>Mask for bits 0-2 to get the block ID.</entry> 141 <entry>Mask for bits 0-2 to get the block ID.</entry>
116 </row> 142 </row>
117 <row> 143 <row>
118 <entry>V4L2_RDS_BLOCK_A</entry> 144 <entry>V4L2_RDS_BLOCK_A</entry>
145 <entry> </entry>
119 <entry>0</entry> 146 <entry>0</entry>
120 <entry>Block A.</entry> 147 <entry>Block A.</entry>
121 </row> 148 </row>
122 <row> 149 <row>
123 <entry>V4L2_RDS_BLOCK_B</entry> 150 <entry>V4L2_RDS_BLOCK_B</entry>
151 <entry> </entry>
124 <entry>1</entry> 152 <entry>1</entry>
125 <entry>Block B.</entry> 153 <entry>Block B.</entry>
126 </row> 154 </row>
127 <row> 155 <row>
128 <entry>V4L2_RDS_BLOCK_C</entry> 156 <entry>V4L2_RDS_BLOCK_C</entry>
157 <entry> </entry>
129 <entry>2</entry> 158 <entry>2</entry>
130 <entry>Block C.</entry> 159 <entry>Block C.</entry>
131 </row> 160 </row>
132 <row> 161 <row>
133 <entry>V4L2_RDS_BLOCK_D</entry> 162 <entry>V4L2_RDS_BLOCK_D</entry>
163 <entry> </entry>
134 <entry>3</entry> 164 <entry>3</entry>
135 <entry>Block D.</entry> 165 <entry>Block D.</entry>
136 </row> 166 </row>
137 <row> 167 <row>
138 <entry>V4L2_RDS_BLOCK_C_ALT</entry> 168 <entry>V4L2_RDS_BLOCK_C_ALT</entry>
169 <entry> </entry>
139 <entry>4</entry> 170 <entry>4</entry>
140 <entry>Block C'.</entry> 171 <entry>Block C'.</entry>
141 </row> 172 </row>
142 <row> 173 <row>
143 <entry>V4L2_RDS_BLOCK_INVALID</entry> 174 <entry>V4L2_RDS_BLOCK_INVALID</entry>
175 <entry>read-only</entry>
144 <entry>7</entry> 176 <entry>7</entry>
145 <entry>An invalid block.</entry> 177 <entry>An invalid block.</entry>
146 </row> 178 </row>
147 <row> 179 <row>
148 <entry>V4L2_RDS_BLOCK_CORRECTED</entry> 180 <entry>V4L2_RDS_BLOCK_CORRECTED</entry>
181 <entry>read-only</entry>
149 <entry>0x40</entry> 182 <entry>0x40</entry>
150 <entry>A bit error was detected but corrected.</entry> 183 <entry>A bit error was detected but corrected.</entry>
151 </row> 184 </row>
152 <row> 185 <row>
153 <entry>V4L2_RDS_BLOCK_ERROR</entry> 186 <entry>V4L2_RDS_BLOCK_ERROR</entry>
187 <entry>read-only</entry>
154 <entry>0x80</entry> 188 <entry>0x80</entry>
155 <entry>An incorrectable error occurred.</entry> 189 <entry>An uncorrectable error occurred.</entry>
156 </row> 190 </row>
157 </tbody> 191 </tbody>
158 </tgroup> 192 </tgroup>
diff --git a/Documentation/DocBook/v4l/dev-teletext.xml b/Documentation/DocBook/v4l/dev-teletext.xml
index 76184e8ed618..414b1cfff9f4 100644
--- a/Documentation/DocBook/v4l/dev-teletext.xml
+++ b/Documentation/DocBook/v4l/dev-teletext.xml
@@ -1,35 +1,32 @@
1 <title>Teletext Interface</title> 1 <title>Teletext Interface</title>
2 2
3 <para>This interface aims at devices receiving and demodulating 3 <para>This interface was aimed at devices receiving and demodulating
4Teletext data [<xref linkend="ets300706" />, <xref linkend="itu653" />], evaluating the 4Teletext data [<xref linkend="ets300706" />, <xref linkend="itu653" />], evaluating the
5Teletext packages and storing formatted pages in cache memory. Such 5Teletext packages and storing formatted pages in cache memory. Such
6devices are usually implemented as microcontrollers with serial 6devices are usually implemented as microcontrollers with serial
7interface (I<superscript>2</superscript>C) and can be found on older 7interface (I<superscript>2</superscript>C) and could be found on old
8TV cards, dedicated Teletext decoding cards and home-brew devices 8TV cards, dedicated Teletext decoding cards and home-brew devices
9connected to the PC parallel port.</para> 9connected to the PC parallel port.</para>
10 10
11 <para>The Teletext API was designed by Martin Buck. It is defined in 11 <para>The Teletext API was designed by Martin Buck. It was defined in
12the kernel header file <filename>linux/videotext.h</filename>, the 12the kernel header file <filename>linux/videotext.h</filename>, the
13specification is available from <ulink url="ftp://ftp.gwdg.de/pub/linux/misc/videotext/"> 13specification is available from <ulink url="ftp://ftp.gwdg.de/pub/linux/misc/videotext/">
14ftp://ftp.gwdg.de/pub/linux/misc/videotext/</ulink>. (Videotext is the name of 14ftp://ftp.gwdg.de/pub/linux/misc/videotext/</ulink>. (Videotext is the name of
15the German public television Teletext service.) Conventional character 15the German public television Teletext service.)</para>
16device file names are <filename>/dev/vtx</filename> and
17<filename>/dev/vttuner</filename>, with device number 83, 0 and 83, 16
18respectively. A similar interface exists for the Philips SAA5249
19Teletext decoder [specification?] with character device file names
20<filename>/dev/tlkN</filename>, device number 102, N.</para>
21 16
22 <para>Eventually the Teletext API was integrated into the V4L API 17 <para>Eventually the Teletext API was integrated into the V4L API
23with character device file names <filename>/dev/vtx0</filename> to 18with character device file names <filename>/dev/vtx0</filename> to
24<filename>/dev/vtx31</filename>, device major number 81, minor numbers 19<filename>/dev/vtx31</filename>, device major number 81, minor numbers
25192 to 223. For reference the V4L Teletext API specification is 20192 to 223.</para>
26reproduced here in full: "Teletext interfaces talk the existing VTX
27API." Teletext devices with major number 83 and 102 will be removed in
28Linux 2.6.</para>
29 21
30 <para>There are no plans to replace the Teletext API or to integrate 22 <para>However, teletext decoders were quickly replaced by more
31it into V4L2. Please write to the linux-media mailing list: &v4l-ml; 23generic VBI demodulators and those dedicated teletext decoders no longer exist.
32when the need arises.</para> 24For many years the vtx devices were still around, even though nobody used
25them. So the decision was made to finally remove support for the Teletext API in
26kernel 2.6.37.</para>
27
28 <para>Modern devices all use the <link linkend="raw-vbi">raw</link> or
29<link linkend="sliced">sliced</link> VBI API.</para>
33 30
34 <!-- 31 <!--
35Local Variables: 32Local Variables:
diff --git a/Documentation/DocBook/v4l/fdl-appendix.xml b/Documentation/DocBook/v4l/fdl-appendix.xml
index b6ce50dbe492..ae22394ba997 100644
--- a/Documentation/DocBook/v4l/fdl-appendix.xml
+++ b/Documentation/DocBook/v4l/fdl-appendix.xml
@@ -2,7 +2,7 @@
2 The GNU Free Documentation License 1.1 in DocBook 2 The GNU Free Documentation License 1.1 in DocBook
3 Markup by Eric Baudais <baudais@okstate.edu> 3 Markup by Eric Baudais <baudais@okstate.edu>
4 Maintained by the GNOME Documentation Project 4 Maintained by the GNOME Documentation Project
5 http://developer.gnome.org/projects/gdp 5 http://live.gnome.org/DocumentationProject
6 Version: 1.0.1 6 Version: 1.0.1
7 Last Modified: Nov 16, 2000 7 Last Modified: Nov 16, 2000
8--> 8-->
diff --git a/Documentation/DocBook/v4l/lirc_device_interface.xml b/Documentation/DocBook/v4l/lirc_device_interface.xml
new file mode 100644
index 000000000000..68134c0ab4d1
--- /dev/null
+++ b/Documentation/DocBook/v4l/lirc_device_interface.xml
@@ -0,0 +1,251 @@
1<section id="lirc_dev">
2<title>LIRC Device Interface</title>
3
4
5<section id="lirc_dev_intro">
6<title>Introduction</title>
7
8<para>The LIRC device interface is a bi-directional interface for
9transporting raw IR data between userspace and kernelspace. Fundamentally,
10it is just a chardev (/dev/lircX, for X = 0, 1, 2, ...), with a number
11of standard struct file_operations defined on it. With respect to
12transporting raw IR data to and fro, the essential fops are read, write
13and ioctl.</para>
14
15<para>Example dmesg output upon a driver registering w/LIRC:</para>
16 <blockquote>
17 <para>$ dmesg |grep lirc_dev</para>
18 <para>lirc_dev: IR Remote Control driver registered, major 248</para>
19 <para>rc rc0: lirc_dev: driver ir-lirc-codec (mceusb) registered at minor = 0</para>
20 </blockquote>
21
22<para>What you should see for a chardev:</para>
23 <blockquote>
24 <para>$ ls -l /dev/lirc*</para>
25 <para>crw-rw---- 1 root root 248, 0 Jul 2 22:20 /dev/lirc0</para>
26 </blockquote>
27</section>
28
29<section id="lirc_read">
30<title>LIRC read fop</title>
31
32<para>The lircd userspace daemon reads raw IR data from the LIRC chardev. The
33exact format of the data depends on what modes a driver supports, and what
34mode has been selected. lircd obtains supported modes and sets the active mode
35via the ioctl interface, detailed at <xref linkend="lirc_ioctl"/>. The generally
36preferred mode is LIRC_MODE_MODE2, in which packets containing an int value
37describing an IR signal are read from the chardev.</para>
38
39<para>See also <ulink url="http://www.lirc.org/html/technical.html">http://www.lirc.org/html/technical.html</ulink> for more info.</para>
40</section>
41
42<section id="lirc_write">
43<title>LIRC write fop</title>
44
45<para>The data written to the chardev is a pulse/space sequence of integer
46values. Pulses and spaces are only marked implicitly by their position. The
47data must start and end with a pulse, therefore, the data must always include
48an unevent number of samples. The write function must block until the data has
49been transmitted by the hardware.</para>
50</section>
51
52<section id="lirc_ioctl">
53<title>LIRC ioctl fop</title>
54
55<para>The LIRC device's ioctl definition is bound by the ioctl function
56definition of struct file_operations, leaving us with an unsigned int
57for the ioctl command and an unsigned long for the arg. For the purposes
58of ioctl portability across 32-bit and 64-bit, these values are capped
59to their 32-bit sizes.</para>
60
61<para>The following ioctls can be used to change specific hardware settings.
62In general each driver should have a default set of settings. The driver
63implementation is expected to re-apply the default settings when the device
64is closed by user-space, so that every application opening the device can rely
65on working with the default settings initially.</para>
66
67<variablelist>
68 <varlistentry>
69 <term>LIRC_GET_FEATURES</term>
70 <listitem>
71 <para>Obviously, get the underlying hardware device's features. If a driver
72 does not announce support of certain features, calling of the corresponding
73 ioctls is undefined.</para>
74 </listitem>
75 </varlistentry>
76 <varlistentry>
77 <term>LIRC_GET_SEND_MODE</term>
78 <listitem>
79 <para>Get supported transmit mode. Only LIRC_MODE_PULSE is supported by lircd.</para>
80 </listitem>
81 </varlistentry>
82 <varlistentry>
83 <term>LIRC_GET_REC_MODE</term>
84 <listitem>
85 <para>Get supported receive modes. Only LIRC_MODE_MODE2 and LIRC_MODE_LIRCCODE
86 are supported by lircd.</para>
87 </listitem>
88 </varlistentry>
89 <varlistentry>
90 <term>LIRC_GET_SEND_CARRIER</term>
91 <listitem>
92 <para>Get carrier frequency (in Hz) currently used for transmit.</para>
93 </listitem>
94 </varlistentry>
95 <varlistentry>
96 <term>LIRC_GET_REC_CARRIER</term>
97 <listitem>
98 <para>Get carrier frequency (in Hz) currently used for IR reception.</para>
99 </listitem>
100 </varlistentry>
101 <varlistentry>
102 <term>LIRC_{G,S}ET_{SEND,REC}_DUTY_CYCLE</term>
103 <listitem>
104 <para>Get/set the duty cycle (from 0 to 100) of the carrier signal. Currently,
105 no special meaning is defined for 0 or 100, but this could be used to switch
106 off carrier generation in the future, so these values should be reserved.</para>
107 </listitem>
108 </varlistentry>
109 <varlistentry>
110 <term>LIRC_GET_REC_RESOLUTION</term>
111 <listitem>
112 <para>Some receiver have maximum resolution which is defined by internal
113 sample rate or data format limitations. E.g. it's common that signals can
114 only be reported in 50 microsecond steps. This integer value is used by
115 lircd to automatically adjust the aeps tolerance value in the lircd
116 config file.</para>
117 </listitem>
118 </varlistentry>
119 <varlistentry>
120 <term>LIRC_GET_M{IN,AX}_TIMEOUT</term>
121 <listitem>
122 <para>Some devices have internal timers that can be used to detect when
123 there's no IR activity for a long time. This can help lircd in detecting
124 that a IR signal is finished and can speed up the decoding process.
125 Returns an integer value with the minimum/maximum timeout that can be
126 set. Some devices have a fixed timeout, in that case both ioctls will
127 return the same value even though the timeout cannot be changed.</para>
128 </listitem>
129 </varlistentry>
130 <varlistentry>
131 <term>LIRC_GET_M{IN,AX}_FILTER_{PULSE,SPACE}</term>
132 <listitem>
133 <para>Some devices are able to filter out spikes in the incoming signal
134 using given filter rules. These ioctls return the hardware capabilities
135 that describe the bounds of the possible filters. Filter settings depend
136 on the IR protocols that are expected. lircd derives the settings from
137 all protocols definitions found in its config file.</para>
138 </listitem>
139 </varlistentry>
140 <varlistentry>
141 <term>LIRC_GET_LENGTH</term>
142 <listitem>
143 <para>Retrieves the code length in bits (only for LIRC_MODE_LIRCCODE).
144 Reads on the device must be done in blocks matching the bit count.
145 The bit could should be rounded up so that it matches full bytes.</para>
146 </listitem>
147 </varlistentry>
148 <varlistentry>
149 <term>LIRC_SET_{SEND,REC}_MODE</term>
150 <listitem>
151 <para>Set send/receive mode. Largely obsolete for send, as only
152 LIRC_MODE_PULSE is supported.</para>
153 </listitem>
154 </varlistentry>
155 <varlistentry>
156 <term>LIRC_SET_{SEND,REC}_CARRIER</term>
157 <listitem>
158 <para>Set send/receive carrier (in Hz).</para>
159 </listitem>
160 </varlistentry>
161 <varlistentry>
162 <term>LIRC_SET_TRANSMITTER_MASK</term>
163 <listitem>
164 <para>This enables the given set of transmitters. The first transmitter
165 is encoded by the least significant bit, etc. When an invalid bit mask
166 is given, i.e. a bit is set, even though the device does not have so many
167 transitters, then this ioctl returns the number of available transitters
168 and does nothing otherwise.</para>
169 </listitem>
170 </varlistentry>
171 <varlistentry>
172 <term>LIRC_SET_REC_TIMEOUT</term>
173 <listitem>
174 <para>Sets the integer value for IR inactivity timeout (cf.
175 LIRC_GET_MIN_TIMEOUT and LIRC_GET_MAX_TIMEOUT). A value of 0 (if
176 supported by the hardware) disables all hardware timeouts and data should
177 be reported as soon as possible. If the exact value cannot be set, then
178 the next possible value _greater_ than the given value should be set.</para>
179 </listitem>
180 </varlistentry>
181 <varlistentry>
182 <term>LIRC_SET_REC_TIMEOUT_REPORTS</term>
183 <listitem>
184 <para>Enable (1) or disable (0) timeout reports in LIRC_MODE_MODE2. By
185 default, timeout reports should be turned off.</para>
186 </listitem>
187 </varlistentry>
188 <varlistentry>
189 <term>LIRC_SET_REC_FILTER_{,PULSE,SPACE}</term>
190 <listitem>
191 <para>Pulses/spaces shorter than this are filtered out by hardware. If
192 filters cannot be set independently for pulse/space, the corresponding
193 ioctls must return an error and LIRC_SET_REC_FILTER shall be used instead.</para>
194 </listitem>
195 </varlistentry>
196 <varlistentry>
197 <term>LIRC_SET_MEASURE_CARRIER_MODE</term>
198 <listitem>
199 <para>Enable (1)/disable (0) measure mode. If enabled, from the next key
200 press on, the driver will send LIRC_MODE2_FREQUENCY packets. By default
201 this should be turned off.</para>
202 </listitem>
203 </varlistentry>
204 <varlistentry>
205 <term>LIRC_SET_REC_{DUTY_CYCLE,CARRIER}_RANGE</term>
206 <listitem>
207 <para>To set a range use LIRC_SET_REC_DUTY_CYCLE_RANGE/LIRC_SET_REC_CARRIER_RANGE
208 with the lower bound first and later LIRC_SET_REC_DUTY_CYCLE/LIRC_SET_REC_CARRIER
209 with the upper bound.</para>
210 </listitem>
211 </varlistentry>
212 <varlistentry>
213 <term>LIRC_NOTIFY_DECODE</term>
214 <listitem>
215 <para>This ioctl is called by lircd whenever a successful decoding of an
216 incoming IR signal could be done. This can be used by supporting hardware
217 to give visual feedback to the user e.g. by flashing a LED.</para>
218 </listitem>
219 </varlistentry>
220 <varlistentry>
221 <term>LIRC_SETUP_{START,END}</term>
222 <listitem>
223 <para>Setting of several driver parameters can be optimized by encapsulating
224 the according ioctl calls with LIRC_SETUP_START/LIRC_SETUP_END. When a
225 driver receives a LIRC_SETUP_START ioctl it can choose to not commit
226 further setting changes to the hardware until a LIRC_SETUP_END is received.
227 But this is open to the driver implementation and every driver must also
228 handle parameter changes which are not encapsulated by LIRC_SETUP_START
229 and LIRC_SETUP_END. Drivers can also choose to ignore these ioctls.</para>
230 </listitem>
231 </varlistentry>
232 <varlistentry>
233 <term>LIRC_SET_WIDEBAND_RECEIVER</term>
234 <listitem>
235 <para>Some receivers are equipped with special wide band receiver which is intended
236 to be used to learn output of existing remote.
237 Calling that ioctl with (1) will enable it, and with (0) disable it.
238 This might be useful of receivers that have otherwise narrow band receiver
239 that prevents them to be used with some remotes.
240 Wide band receiver might also be more precise
241 On the other hand its disadvantage it usually reduced range of reception.
242 Note: wide band receiver might be implictly enabled if you enable
243 carrier reports. In that case it will be disabled as soon as you disable
244 carrier reports. Trying to disable wide band receiver while carrier
245 reports are active will do nothing.</para>
246 </listitem>
247 </varlistentry>
248</variablelist>
249
250</section>
251</section>
diff --git a/Documentation/DocBook/v4l/pixfmt-packed-rgb.xml b/Documentation/DocBook/v4l/pixfmt-packed-rgb.xml
index d2dd697a81d8..4db272b8a0d3 100644
--- a/Documentation/DocBook/v4l/pixfmt-packed-rgb.xml
+++ b/Documentation/DocBook/v4l/pixfmt-packed-rgb.xml
@@ -240,6 +240,45 @@ colorspace <constant>V4L2_COLORSPACE_SRGB</constant>.</para>
240 <entry>r<subscript>1</subscript></entry> 240 <entry>r<subscript>1</subscript></entry>
241 <entry>r<subscript>0</subscript></entry> 241 <entry>r<subscript>0</subscript></entry>
242 </row> 242 </row>
243 <row id="V4L2-PIX-FMT-BGR666">
244 <entry><constant>V4L2_PIX_FMT_BGR666</constant></entry>
245 <entry>'BGRH'</entry>
246 <entry></entry>
247 <entry>b<subscript>5</subscript></entry>
248 <entry>b<subscript>4</subscript></entry>
249 <entry>b<subscript>3</subscript></entry>
250 <entry>b<subscript>2</subscript></entry>
251 <entry>b<subscript>1</subscript></entry>
252 <entry>b<subscript>0</subscript></entry>
253 <entry>g<subscript>5</subscript></entry>
254 <entry>g<subscript>4</subscript></entry>
255 <entry></entry>
256 <entry>g<subscript>3</subscript></entry>
257 <entry>g<subscript>2</subscript></entry>
258 <entry>g<subscript>1</subscript></entry>
259 <entry>g<subscript>0</subscript></entry>
260 <entry>r<subscript>5</subscript></entry>
261 <entry>r<subscript>4</subscript></entry>
262 <entry>r<subscript>3</subscript></entry>
263 <entry>r<subscript>2</subscript></entry>
264 <entry></entry>
265 <entry>r<subscript>1</subscript></entry>
266 <entry>r<subscript>0</subscript></entry>
267 <entry></entry>
268 <entry></entry>
269 <entry></entry>
270 <entry></entry>
271 <entry></entry>
272 <entry></entry>
273 <entry></entry>
274 <entry></entry>
275 <entry></entry>
276 <entry></entry>
277 <entry></entry>
278 <entry></entry>
279 <entry></entry>
280 <entry></entry>
281 </row>
243 <row id="V4L2-PIX-FMT-BGR24"> 282 <row id="V4L2-PIX-FMT-BGR24">
244 <entry><constant>V4L2_PIX_FMT_BGR24</constant></entry> 283 <entry><constant>V4L2_PIX_FMT_BGR24</constant></entry>
245 <entry>'BGR3'</entry> 284 <entry>'BGR3'</entry>
@@ -700,6 +739,45 @@ defined in error. Drivers may interpret them as in <xref
700 <entry>b<subscript>1</subscript></entry> 739 <entry>b<subscript>1</subscript></entry>
701 <entry>b<subscript>0</subscript></entry> 740 <entry>b<subscript>0</subscript></entry>
702 </row> 741 </row>
742 <row><!-- id="V4L2-PIX-FMT-BGR666" -->
743 <entry><constant>V4L2_PIX_FMT_BGR666</constant></entry>
744 <entry>'BGRH'</entry>
745 <entry></entry>
746 <entry>b<subscript>5</subscript></entry>
747 <entry>b<subscript>4</subscript></entry>
748 <entry>b<subscript>3</subscript></entry>
749 <entry>b<subscript>2</subscript></entry>
750 <entry>b<subscript>1</subscript></entry>
751 <entry>b<subscript>0</subscript></entry>
752 <entry>g<subscript>5</subscript></entry>
753 <entry>g<subscript>4</subscript></entry>
754 <entry></entry>
755 <entry>g<subscript>3</subscript></entry>
756 <entry>g<subscript>2</subscript></entry>
757 <entry>g<subscript>1</subscript></entry>
758 <entry>g<subscript>0</subscript></entry>
759 <entry>r<subscript>5</subscript></entry>
760 <entry>r<subscript>4</subscript></entry>
761 <entry>r<subscript>3</subscript></entry>
762 <entry>r<subscript>2</subscript></entry>
763 <entry></entry>
764 <entry>r<subscript>1</subscript></entry>
765 <entry>r<subscript>0</subscript></entry>
766 <entry></entry>
767 <entry></entry>
768 <entry></entry>
769 <entry></entry>
770 <entry></entry>
771 <entry></entry>
772 <entry></entry>
773 <entry></entry>
774 <entry></entry>
775 <entry></entry>
776 <entry></entry>
777 <entry></entry>
778 <entry></entry>
779 <entry></entry>
780 </row>
703 <row><!-- id="V4L2-PIX-FMT-BGR24" --> 781 <row><!-- id="V4L2-PIX-FMT-BGR24" -->
704 <entry><constant>V4L2_PIX_FMT_BGR24</constant></entry> 782 <entry><constant>V4L2_PIX_FMT_BGR24</constant></entry>
705 <entry>'BGR3'</entry> 783 <entry>'BGR3'</entry>
diff --git a/Documentation/DocBook/v4l/pixfmt-srggb10.xml b/Documentation/DocBook/v4l/pixfmt-srggb10.xml
new file mode 100644
index 000000000000..7b274092e60c
--- /dev/null
+++ b/Documentation/DocBook/v4l/pixfmt-srggb10.xml
@@ -0,0 +1,90 @@
1 <refentry>
2 <refmeta>
3 <refentrytitle>V4L2_PIX_FMT_SRGGB10 ('RG10'),
4 V4L2_PIX_FMT_SGRBG10 ('BA10'),
5 V4L2_PIX_FMT_SGBRG10 ('GB10'),
6 V4L2_PIX_FMT_SBGGR10 ('BG10'),
7 </refentrytitle>
8 &manvol;
9 </refmeta>
10 <refnamediv>
11 <refname id="V4L2-PIX-FMT-SRGGB10"><constant>V4L2_PIX_FMT_SRGGB10</constant></refname>
12 <refname id="V4L2-PIX-FMT-SGRBG10"><constant>V4L2_PIX_FMT_SGRBG10</constant></refname>
13 <refname id="V4L2-PIX-FMT-SGBRG10"><constant>V4L2_PIX_FMT_SGBRG10</constant></refname>
14 <refname id="V4L2-PIX-FMT-SBGGR10"><constant>V4L2_PIX_FMT_SBGGR10</constant></refname>
15 <refpurpose>10-bit Bayer formats expanded to 16 bits</refpurpose>
16 </refnamediv>
17 <refsect1>
18 <title>Description</title>
19
20 <para>The following four pixel formats are raw sRGB / Bayer formats with
2110 bits per colour. Each colour component is stored in a 16-bit word, with 6
22unused high bits filled with zeros. Each n-pixel row contains n/2 green samples
23and n/2 blue or red samples, with alternating red and blue rows. Bytes are
24stored in memory in little endian order. They are conventionally described
25as GRGR... BGBG..., RGRG... GBGB..., etc. Below is an example of one of these
26formats</para>
27
28 <example>
29 <title><constant>V4L2_PIX_FMT_SBGGR10</constant> 4 &times; 4
30pixel image</title>
31
32 <formalpara>
33 <title>Byte Order.</title>
34 <para>Each cell is one byte, high 6 bits in high bytes are 0.
35 <informaltable frame="none">
36 <tgroup cols="5" align="center">
37 <colspec align="left" colwidth="2*" />
38 <tbody valign="top">
39 <row>
40 <entry>start&nbsp;+&nbsp;0:</entry>
41 <entry>B<subscript>00low</subscript></entry>
42 <entry>B<subscript>00high</subscript></entry>
43 <entry>G<subscript>01low</subscript></entry>
44 <entry>G<subscript>01high</subscript></entry>
45 <entry>B<subscript>02low</subscript></entry>
46 <entry>B<subscript>02high</subscript></entry>
47 <entry>G<subscript>03low</subscript></entry>
48 <entry>G<subscript>03high</subscript></entry>
49 </row>
50 <row>
51 <entry>start&nbsp;+&nbsp;8:</entry>
52 <entry>G<subscript>10low</subscript></entry>
53 <entry>G<subscript>10high</subscript></entry>
54 <entry>R<subscript>11low</subscript></entry>
55 <entry>R<subscript>11high</subscript></entry>
56 <entry>G<subscript>12low</subscript></entry>
57 <entry>G<subscript>12high</subscript></entry>
58 <entry>R<subscript>13low</subscript></entry>
59 <entry>R<subscript>13high</subscript></entry>
60 </row>
61 <row>
62 <entry>start&nbsp;+&nbsp;16:</entry>
63 <entry>B<subscript>20low</subscript></entry>
64 <entry>B<subscript>20high</subscript></entry>
65 <entry>G<subscript>21low</subscript></entry>
66 <entry>G<subscript>21high</subscript></entry>
67 <entry>B<subscript>22low</subscript></entry>
68 <entry>B<subscript>22high</subscript></entry>
69 <entry>G<subscript>23low</subscript></entry>
70 <entry>G<subscript>23high</subscript></entry>
71 </row>
72 <row>
73 <entry>start&nbsp;+&nbsp;24:</entry>
74 <entry>G<subscript>30low</subscript></entry>
75 <entry>G<subscript>30high</subscript></entry>
76 <entry>R<subscript>31low</subscript></entry>
77 <entry>R<subscript>31high</subscript></entry>
78 <entry>G<subscript>32low</subscript></entry>
79 <entry>G<subscript>32high</subscript></entry>
80 <entry>R<subscript>33low</subscript></entry>
81 <entry>R<subscript>33high</subscript></entry>
82 </row>
83 </tbody>
84 </tgroup>
85 </informaltable>
86 </para>
87 </formalpara>
88 </example>
89 </refsect1>
90</refentry>
diff --git a/Documentation/DocBook/v4l/pixfmt-srggb8.xml b/Documentation/DocBook/v4l/pixfmt-srggb8.xml
new file mode 100644
index 000000000000..2570e3be3cf1
--- /dev/null
+++ b/Documentation/DocBook/v4l/pixfmt-srggb8.xml
@@ -0,0 +1,67 @@
1 <refentry id="V4L2-PIX-FMT-SRGGB8">
2 <refmeta>
3 <refentrytitle>V4L2_PIX_FMT_SRGGB8 ('RGGB')</refentrytitle>
4 &manvol;
5 </refmeta>
6 <refnamediv>
7 <refname><constant>V4L2_PIX_FMT_SRGGB8</constant></refname>
8 <refpurpose>Bayer RGB format</refpurpose>
9 </refnamediv>
10 <refsect1>
11 <title>Description</title>
12
13 <para>This is commonly the native format of digital cameras,
14reflecting the arrangement of sensors on the CCD device. Only one red,
15green or blue value is given for each pixel. Missing components must
16be interpolated from neighbouring pixels. From left to right the first
17row consists of a red and green value, the second row of a green and
18blue value. This scheme repeats to the right and down for every two
19columns and rows.</para>
20
21 <example>
22 <title><constant>V4L2_PIX_FMT_SRGGB8</constant> 4 &times; 4
23pixel image</title>
24
25 <formalpara>
26 <title>Byte Order.</title>
27 <para>Each cell is one byte.
28 <informaltable frame="none">
29 <tgroup cols="5" align="center">
30 <colspec align="left" colwidth="2*" />
31 <tbody valign="top">
32 <row>
33 <entry>start&nbsp;+&nbsp;0:</entry>
34 <entry>R<subscript>00</subscript></entry>
35 <entry>G<subscript>01</subscript></entry>
36 <entry>R<subscript>02</subscript></entry>
37 <entry>G<subscript>03</subscript></entry>
38 </row>
39 <row>
40 <entry>start&nbsp;+&nbsp;4:</entry>
41 <entry>G<subscript>10</subscript></entry>
42 <entry>B<subscript>11</subscript></entry>
43 <entry>G<subscript>12</subscript></entry>
44 <entry>B<subscript>13</subscript></entry>
45 </row>
46 <row>
47 <entry>start&nbsp;+&nbsp;8:</entry>
48 <entry>R<subscript>20</subscript></entry>
49 <entry>G<subscript>21</subscript></entry>
50 <entry>R<subscript>22</subscript></entry>
51 <entry>G<subscript>23</subscript></entry>
52 </row>
53 <row>
54 <entry>start&nbsp;+&nbsp;12:</entry>
55 <entry>G<subscript>30</subscript></entry>
56 <entry>B<subscript>31</subscript></entry>
57 <entry>G<subscript>32</subscript></entry>
58 <entry>B<subscript>33</subscript></entry>
59 </row>
60 </tbody>
61 </tgroup>
62 </informaltable>
63 </para>
64 </formalpara>
65 </example>
66 </refsect1>
67 </refentry>
diff --git a/Documentation/DocBook/v4l/pixfmt-y10.xml b/Documentation/DocBook/v4l/pixfmt-y10.xml
new file mode 100644
index 000000000000..d065043db8d8
--- /dev/null
+++ b/Documentation/DocBook/v4l/pixfmt-y10.xml
@@ -0,0 +1,79 @@
1<refentry id="V4L2-PIX-FMT-Y10">
2 <refmeta>
3 <refentrytitle>V4L2_PIX_FMT_Y10 ('Y10 ')</refentrytitle>
4 &manvol;
5 </refmeta>
6 <refnamediv>
7 <refname><constant>V4L2_PIX_FMT_Y10</constant></refname>
8 <refpurpose>Grey-scale image</refpurpose>
9 </refnamediv>
10 <refsect1>
11 <title>Description</title>
12
13 <para>This is a grey-scale image with a depth of 10 bits per pixel. Pixels
14are stored in 16-bit words with unused high bits padded with 0. The least
15significant byte is stored at lower memory addresses (little-endian).</para>
16
17 <example>
18 <title><constant>V4L2_PIX_FMT_Y10</constant> 4 &times; 4
19pixel image</title>
20
21 <formalpara>
22 <title>Byte Order.</title>
23 <para>Each cell is one byte.
24 <informaltable frame="none">
25 <tgroup cols="9" align="center">
26 <colspec align="left" colwidth="2*" />
27 <tbody valign="top">
28 <row>
29 <entry>start&nbsp;+&nbsp;0:</entry>
30 <entry>Y'<subscript>00low</subscript></entry>
31 <entry>Y'<subscript>00high</subscript></entry>
32 <entry>Y'<subscript>01low</subscript></entry>
33 <entry>Y'<subscript>01high</subscript></entry>
34 <entry>Y'<subscript>02low</subscript></entry>
35 <entry>Y'<subscript>02high</subscript></entry>
36 <entry>Y'<subscript>03low</subscript></entry>
37 <entry>Y'<subscript>03high</subscript></entry>
38 </row>
39 <row>
40 <entry>start&nbsp;+&nbsp;8:</entry>
41 <entry>Y'<subscript>10low</subscript></entry>
42 <entry>Y'<subscript>10high</subscript></entry>
43 <entry>Y'<subscript>11low</subscript></entry>
44 <entry>Y'<subscript>11high</subscript></entry>
45 <entry>Y'<subscript>12low</subscript></entry>
46 <entry>Y'<subscript>12high</subscript></entry>
47 <entry>Y'<subscript>13low</subscript></entry>
48 <entry>Y'<subscript>13high</subscript></entry>
49 </row>
50 <row>
51 <entry>start&nbsp;+&nbsp;16:</entry>
52 <entry>Y'<subscript>20low</subscript></entry>
53 <entry>Y'<subscript>20high</subscript></entry>
54 <entry>Y'<subscript>21low</subscript></entry>
55 <entry>Y'<subscript>21high</subscript></entry>
56 <entry>Y'<subscript>22low</subscript></entry>
57 <entry>Y'<subscript>22high</subscript></entry>
58 <entry>Y'<subscript>23low</subscript></entry>
59 <entry>Y'<subscript>23high</subscript></entry>
60 </row>
61 <row>
62 <entry>start&nbsp;+&nbsp;24:</entry>
63 <entry>Y'<subscript>30low</subscript></entry>
64 <entry>Y'<subscript>30high</subscript></entry>
65 <entry>Y'<subscript>31low</subscript></entry>
66 <entry>Y'<subscript>31high</subscript></entry>
67 <entry>Y'<subscript>32low</subscript></entry>
68 <entry>Y'<subscript>32high</subscript></entry>
69 <entry>Y'<subscript>33low</subscript></entry>
70 <entry>Y'<subscript>33high</subscript></entry>
71 </row>
72 </tbody>
73 </tgroup>
74 </informaltable>
75 </para>
76 </formalpara>
77 </example>
78 </refsect1>
79</refentry>
diff --git a/Documentation/DocBook/v4l/pixfmt.xml b/Documentation/DocBook/v4l/pixfmt.xml
index c4ad0a8e42dc..d7c467187095 100644
--- a/Documentation/DocBook/v4l/pixfmt.xml
+++ b/Documentation/DocBook/v4l/pixfmt.xml
@@ -566,7 +566,9 @@ access the palette, this must be done with ioctls of the Linux framebuffer API.<
566 &sub-sbggr8; 566 &sub-sbggr8;
567 &sub-sgbrg8; 567 &sub-sgbrg8;
568 &sub-sgrbg8; 568 &sub-sgrbg8;
569 &sub-srggb8;
569 &sub-sbggr16; 570 &sub-sbggr16;
571 &sub-srggb10;
570 </section> 572 </section>
571 573
572 <section id="yuv-formats"> 574 <section id="yuv-formats">
@@ -589,6 +591,7 @@ information.</para>
589 591
590 &sub-packed-yuv; 592 &sub-packed-yuv;
591 &sub-grey; 593 &sub-grey;
594 &sub-y10;
592 &sub-y16; 595 &sub-y16;
593 &sub-yuyv; 596 &sub-yuyv;
594 &sub-uyvy; 597 &sub-uyvy;
@@ -685,6 +688,11 @@ http://www.ivtvdriver.org/</ulink></para><para>The format is documented in the
685kernel sources in the file <filename>Documentation/video4linux/cx2341x/README.hm12</filename> 688kernel sources in the file <filename>Documentation/video4linux/cx2341x/README.hm12</filename>
686</para></entry> 689</para></entry>
687 </row> 690 </row>
691 <row id="V4L2-PIX-FMT-CPIA1">
692 <entry><constant>V4L2_PIX_FMT_CPIA1</constant></entry>
693 <entry>'CPIA'</entry>
694 <entry>YUV format used by the gspca cpia1 driver.</entry>
695 </row>
688 <row id="V4L2-PIX-FMT-SPCA501"> 696 <row id="V4L2-PIX-FMT-SPCA501">
689 <entry><constant>V4L2_PIX_FMT_SPCA501</constant></entry> 697 <entry><constant>V4L2_PIX_FMT_SPCA501</constant></entry>
690 <entry>'S501'</entry> 698 <entry>'S501'</entry>
@@ -705,11 +713,6 @@ kernel sources in the file <filename>Documentation/video4linux/cx2341x/README.hm
705 <entry>'S561'</entry> 713 <entry>'S561'</entry>
706 <entry>Compressed GBRG Bayer format used by the gspca driver.</entry> 714 <entry>Compressed GBRG Bayer format used by the gspca driver.</entry>
707 </row> 715 </row>
708 <row id="V4L2-PIX-FMT-SGRBG10">
709 <entry><constant>V4L2_PIX_FMT_SGRBG10</constant></entry>
710 <entry>'DA10'</entry>
711 <entry>10 bit raw Bayer, expanded to 16 bits.</entry>
712 </row>
713 <row id="V4L2-PIX-FMT-SGRBG10DPCM8"> 716 <row id="V4L2-PIX-FMT-SGRBG10DPCM8">
714 <entry><constant>V4L2_PIX_FMT_SGRBG10DPCM8</constant></entry> 717 <entry><constant>V4L2_PIX_FMT_SGRBG10DPCM8</constant></entry>
715 <entry>'DB10'</entry> 718 <entry>'DB10'</entry>
@@ -770,6 +773,11 @@ kernel sources in the file <filename>Documentation/video4linux/cx2341x/README.hm
770 <entry>'S920'</entry> 773 <entry>'S920'</entry>
771 <entry>YUV 4:2:0 format of the gspca sn9c20x driver.</entry> 774 <entry>YUV 4:2:0 format of the gspca sn9c20x driver.</entry>
772 </row> 775 </row>
776 <row id="V4L2-PIX-FMT-SN9C2028">
777 <entry><constant>V4L2_PIX_FMT_SN9C2028</constant></entry>
778 <entry>'SONX'</entry>
779 <entry>Compressed GBRG bayer format of the gspca sn9c2028 driver.</entry>
780 </row>
773 <row id="V4L2-PIX-FMT-STV0680"> 781 <row id="V4L2-PIX-FMT-STV0680">
774 <entry><constant>V4L2_PIX_FMT_STV0680</constant></entry> 782 <entry><constant>V4L2_PIX_FMT_STV0680</constant></entry>
775 <entry>'S680'</entry> 783 <entry>'S680'</entry>
@@ -787,6 +795,20 @@ http://www.thedirks.org/winnov/</ulink></para></entry>
787 <entry>'TM60'</entry> 795 <entry>'TM60'</entry>
788 <entry><para>Used by Trident tm6000</para></entry> 796 <entry><para>Used by Trident tm6000</para></entry>
789 </row> 797 </row>
798 <row id="V4L2-PIX-FMT-CIT-YYVYUY">
799 <entry><constant>V4L2_PIX_FMT_CIT_YYVYUY</constant></entry>
800 <entry>'CITV'</entry>
801 <entry><para>Used by xirlink CIT, found at IBM webcams.</para>
802 <para>Uses one line of Y then 1 line of VYUY</para>
803 </entry>
804 </row>
805 <row id="V4L2-PIX-FMT-KONICA420">
806 <entry><constant>V4L2_PIX_FMT_KONICA420</constant></entry>
807 <entry>'KONI'</entry>
808 <entry><para>Used by Konica webcams.</para>
809 <para>YUV420 planar in blocks of 256 pixels.</para>
810 </entry>
811 </row>
790 <row id="V4L2-PIX-FMT-YYUV"> 812 <row id="V4L2-PIX-FMT-YYUV">
791 <entry><constant>V4L2_PIX_FMT_YYUV</constant></entry> 813 <entry><constant>V4L2_PIX_FMT_YYUV</constant></entry>
792 <entry>'YYUV'</entry> 814 <entry>'YYUV'</entry>
diff --git a/Documentation/DocBook/v4l/remote_controllers.xml b/Documentation/DocBook/v4l/remote_controllers.xml
index 73f5eab091f4..3c3b667b28e7 100644
--- a/Documentation/DocBook/v4l/remote_controllers.xml
+++ b/Documentation/DocBook/v4l/remote_controllers.xml
@@ -173,3 +173,5 @@ keymapping.</para>
173<para>This program demonstrates how to replace the keymap tables.</para> 173<para>This program demonstrates how to replace the keymap tables.</para>
174&sub-keytable-c; 174&sub-keytable-c;
175</section> 175</section>
176
177&sub-lirc_device_interface;
diff --git a/Documentation/DocBook/v4l/v4l2.xml b/Documentation/DocBook/v4l/v4l2.xml
index 7c3c098d5d08..839e93e875ae 100644
--- a/Documentation/DocBook/v4l/v4l2.xml
+++ b/Documentation/DocBook/v4l/v4l2.xml
@@ -99,6 +99,7 @@ Remote Controller chapter.</contrib>
99 <year>2007</year> 99 <year>2007</year>
100 <year>2008</year> 100 <year>2008</year>
101 <year>2009</year> 101 <year>2009</year>
102 <year>2010</year>
102 <holder>Bill Dirks, Michael H. Schimek, Hans Verkuil, Martin 103 <holder>Bill Dirks, Michael H. Schimek, Hans Verkuil, Martin
103Rubli, Andy Walls, Muralidharan Karicheri, Mauro Carvalho Chehab</holder> 104Rubli, Andy Walls, Muralidharan Karicheri, Mauro Carvalho Chehab</holder>
104 </copyright> 105 </copyright>
@@ -110,10 +111,17 @@ Rubli, Andy Walls, Muralidharan Karicheri, Mauro Carvalho Chehab</holder>
110 <!-- Put document revisions here, newest first. --> 111 <!-- Put document revisions here, newest first. -->
111 <!-- API revisions (changes and additions of defines, enums, 112 <!-- API revisions (changes and additions of defines, enums,
112structs, ioctls) must be noted in more detail in the history chapter 113structs, ioctls) must be noted in more detail in the history chapter
113(compat.sgml), along with the possible impact on existing drivers and 114(compat.xml), along with the possible impact on existing drivers and
114applications. --> 115applications. -->
115 116
116 <revision> 117 <revision>
118 <revnumber>2.6.37</revnumber>
119 <date>2010-08-06</date>
120 <authorinitials>hv</authorinitials>
121 <revremark>Removed obsolete vtx (videotext) API.</revremark>
122 </revision>
123
124 <revision>
117 <revnumber>2.6.33</revnumber> 125 <revnumber>2.6.33</revnumber>
118 <date>2009-12-03</date> 126 <date>2009-12-03</date>
119 <authorinitials>mk</authorinitials> 127 <authorinitials>mk</authorinitials>
diff --git a/Documentation/DocBook/v4l/videodev2.h.xml b/Documentation/DocBook/v4l/videodev2.h.xml
index 865b06d9e679..325b23b6964c 100644
--- a/Documentation/DocBook/v4l/videodev2.h.xml
+++ b/Documentation/DocBook/v4l/videodev2.h.xml
@@ -154,23 +154,13 @@ enum <link linkend="v4l2-buf-type">v4l2_buf_type</link> {
154 V4L2_BUF_TYPE_VBI_OUTPUT = 5, 154 V4L2_BUF_TYPE_VBI_OUTPUT = 5,
155 V4L2_BUF_TYPE_SLICED_VBI_CAPTURE = 6, 155 V4L2_BUF_TYPE_SLICED_VBI_CAPTURE = 6,
156 V4L2_BUF_TYPE_SLICED_VBI_OUTPUT = 7, 156 V4L2_BUF_TYPE_SLICED_VBI_OUTPUT = 7,
157#if 1 /*KEEP*/ 157#if 1
158 /* Experimental */ 158 /* Experimental */
159 V4L2_BUF_TYPE_VIDEO_OUTPUT_OVERLAY = 8, 159 V4L2_BUF_TYPE_VIDEO_OUTPUT_OVERLAY = 8,
160#endif 160#endif
161 V4L2_BUF_TYPE_PRIVATE = 0x80, 161 V4L2_BUF_TYPE_PRIVATE = 0x80,
162}; 162};
163 163
164enum <link linkend="v4l2-ctrl-type">v4l2_ctrl_type</link> {
165 V4L2_CTRL_TYPE_INTEGER = 1,
166 V4L2_CTRL_TYPE_BOOLEAN = 2,
167 V4L2_CTRL_TYPE_MENU = 3,
168 V4L2_CTRL_TYPE_BUTTON = 4,
169 V4L2_CTRL_TYPE_INTEGER64 = 5,
170 V4L2_CTRL_TYPE_CTRL_CLASS = 6,
171 V4L2_CTRL_TYPE_STRING = 7,
172};
173
174enum <link linkend="v4l2-tuner-type">v4l2_tuner_type</link> { 164enum <link linkend="v4l2-tuner-type">v4l2_tuner_type</link> {
175 V4L2_TUNER_RADIO = 1, 165 V4L2_TUNER_RADIO = 1,
176 V4L2_TUNER_ANALOG_TV = 2, 166 V4L2_TUNER_ANALOG_TV = 2,
@@ -288,6 +278,7 @@ struct <link linkend="v4l2-pix-format">v4l2_pix_format</link> {
288#define <link linkend="V4L2-PIX-FMT-RGB565">V4L2_PIX_FMT_RGB565</link> v4l2_fourcc('R', 'G', 'B', 'P') /* 16 RGB-5-6-5 */ 278#define <link linkend="V4L2-PIX-FMT-RGB565">V4L2_PIX_FMT_RGB565</link> v4l2_fourcc('R', 'G', 'B', 'P') /* 16 RGB-5-6-5 */
289#define <link linkend="V4L2-PIX-FMT-RGB555X">V4L2_PIX_FMT_RGB555X</link> v4l2_fourcc('R', 'G', 'B', 'Q') /* 16 RGB-5-5-5 BE */ 279#define <link linkend="V4L2-PIX-FMT-RGB555X">V4L2_PIX_FMT_RGB555X</link> v4l2_fourcc('R', 'G', 'B', 'Q') /* 16 RGB-5-5-5 BE */
290#define <link linkend="V4L2-PIX-FMT-RGB565X">V4L2_PIX_FMT_RGB565X</link> v4l2_fourcc('R', 'G', 'B', 'R') /* 16 RGB-5-6-5 BE */ 280#define <link linkend="V4L2-PIX-FMT-RGB565X">V4L2_PIX_FMT_RGB565X</link> v4l2_fourcc('R', 'G', 'B', 'R') /* 16 RGB-5-6-5 BE */
281#define <link linkend="V4L2-PIX-FMT-BGR666">V4L2_PIX_FMT_BGR666</link> v4l2_fourcc('B', 'G', 'R', 'H') /* 18 BGR-6-6-6 */
291#define <link linkend="V4L2-PIX-FMT-BGR24">V4L2_PIX_FMT_BGR24</link> v4l2_fourcc('B', 'G', 'R', '3') /* 24 BGR-8-8-8 */ 282#define <link linkend="V4L2-PIX-FMT-BGR24">V4L2_PIX_FMT_BGR24</link> v4l2_fourcc('B', 'G', 'R', '3') /* 24 BGR-8-8-8 */
292#define <link linkend="V4L2-PIX-FMT-RGB24">V4L2_PIX_FMT_RGB24</link> v4l2_fourcc('R', 'G', 'B', '3') /* 24 RGB-8-8-8 */ 283#define <link linkend="V4L2-PIX-FMT-RGB24">V4L2_PIX_FMT_RGB24</link> v4l2_fourcc('R', 'G', 'B', '3') /* 24 RGB-8-8-8 */
293#define <link linkend="V4L2-PIX-FMT-BGR32">V4L2_PIX_FMT_BGR32</link> v4l2_fourcc('B', 'G', 'R', '4') /* 32 BGR-8-8-8-8 */ 284#define <link linkend="V4L2-PIX-FMT-BGR32">V4L2_PIX_FMT_BGR32</link> v4l2_fourcc('B', 'G', 'R', '4') /* 32 BGR-8-8-8-8 */
@@ -295,6 +286,9 @@ struct <link linkend="v4l2-pix-format">v4l2_pix_format</link> {
295 286
296/* Grey formats */ 287/* Grey formats */
297#define <link linkend="V4L2-PIX-FMT-GREY">V4L2_PIX_FMT_GREY</link> v4l2_fourcc('G', 'R', 'E', 'Y') /* 8 Greyscale */ 288#define <link linkend="V4L2-PIX-FMT-GREY">V4L2_PIX_FMT_GREY</link> v4l2_fourcc('G', 'R', 'E', 'Y') /* 8 Greyscale */
289#define <link linkend="V4L2-PIX-FMT-Y4">V4L2_PIX_FMT_Y4</link> v4l2_fourcc('Y', '0', '4', ' ') /* 4 Greyscale */
290#define <link linkend="V4L2-PIX-FMT-Y6">V4L2_PIX_FMT_Y6</link> v4l2_fourcc('Y', '0', '6', ' ') /* 6 Greyscale */
291#define <link linkend="V4L2-PIX-FMT-Y10">V4L2_PIX_FMT_Y10</link> v4l2_fourcc('Y', '1', '0', ' ') /* 10 Greyscale */
298#define <link linkend="V4L2-PIX-FMT-Y16">V4L2_PIX_FMT_Y16</link> v4l2_fourcc('Y', '1', '6', ' ') /* 16 Greyscale */ 292#define <link linkend="V4L2-PIX-FMT-Y16">V4L2_PIX_FMT_Y16</link> v4l2_fourcc('Y', '1', '6', ' ') /* 16 Greyscale */
299 293
300/* Palette formats */ 294/* Palette formats */
@@ -330,7 +324,11 @@ struct <link linkend="v4l2-pix-format">v4l2_pix_format</link> {
330#define <link linkend="V4L2-PIX-FMT-SBGGR8">V4L2_PIX_FMT_SBGGR8</link> v4l2_fourcc('B', 'A', '8', '1') /* 8 BGBG.. GRGR.. */ 324#define <link linkend="V4L2-PIX-FMT-SBGGR8">V4L2_PIX_FMT_SBGGR8</link> v4l2_fourcc('B', 'A', '8', '1') /* 8 BGBG.. GRGR.. */
331#define <link linkend="V4L2-PIX-FMT-SGBRG8">V4L2_PIX_FMT_SGBRG8</link> v4l2_fourcc('G', 'B', 'R', 'G') /* 8 GBGB.. RGRG.. */ 325#define <link linkend="V4L2-PIX-FMT-SGBRG8">V4L2_PIX_FMT_SGBRG8</link> v4l2_fourcc('G', 'B', 'R', 'G') /* 8 GBGB.. RGRG.. */
332#define <link linkend="V4L2-PIX-FMT-SGRBG8">V4L2_PIX_FMT_SGRBG8</link> v4l2_fourcc('G', 'R', 'B', 'G') /* 8 GRGR.. BGBG.. */ 326#define <link linkend="V4L2-PIX-FMT-SGRBG8">V4L2_PIX_FMT_SGRBG8</link> v4l2_fourcc('G', 'R', 'B', 'G') /* 8 GRGR.. BGBG.. */
333#define <link linkend="V4L2-PIX-FMT-SGRBG10">V4L2_PIX_FMT_SGRBG10</link> v4l2_fourcc('B', 'A', '1', '0') /* 10bit raw bayer */ 327#define <link linkend="V4L2-PIX-FMT-SRGGB8">V4L2_PIX_FMT_SRGGB8</link> v4l2_fourcc('R', 'G', 'G', 'B') /* 8 RGRG.. GBGB.. */
328#define <link linkend="V4L2-PIX-FMT-SBGGR10">V4L2_PIX_FMT_SBGGR10</link> v4l2_fourcc('B', 'G', '1', '0') /* 10 BGBG.. GRGR.. */
329#define <link linkend="V4L2-PIX-FMT-SGBRG10">V4L2_PIX_FMT_SGBRG10</link> v4l2_fourcc('G', 'B', '1', '0') /* 10 GBGB.. RGRG.. */
330#define <link linkend="V4L2-PIX-FMT-SGRBG10">V4L2_PIX_FMT_SGRBG10</link> v4l2_fourcc('B', 'A', '1', '0') /* 10 GRGR.. BGBG.. */
331#define <link linkend="V4L2-PIX-FMT-SRGGB10">V4L2_PIX_FMT_SRGGB10</link> v4l2_fourcc('R', 'G', '1', '0') /* 10 RGRG.. GBGB.. */
334 /* 10bit raw bayer DPCM compressed to 8 bits */ 332 /* 10bit raw bayer DPCM compressed to 8 bits */
335#define <link linkend="V4L2-PIX-FMT-SGRBG10DPCM8">V4L2_PIX_FMT_SGRBG10DPCM8</link> v4l2_fourcc('B', 'D', '1', '0') 333#define <link linkend="V4L2-PIX-FMT-SGRBG10DPCM8">V4L2_PIX_FMT_SGRBG10DPCM8</link> v4l2_fourcc('B', 'D', '1', '0')
336 /* 334 /*
@@ -346,6 +344,7 @@ struct <link linkend="v4l2-pix-format">v4l2_pix_format</link> {
346#define <link linkend="V4L2-PIX-FMT-MPEG">V4L2_PIX_FMT_MPEG</link> v4l2_fourcc('M', 'P', 'E', 'G') /* MPEG-1/2/4 */ 344#define <link linkend="V4L2-PIX-FMT-MPEG">V4L2_PIX_FMT_MPEG</link> v4l2_fourcc('M', 'P', 'E', 'G') /* MPEG-1/2/4 */
347 345
348/* Vendor-specific formats */ 346/* Vendor-specific formats */
347#define <link linkend="V4L2-PIX-FMT-CPIA1">V4L2_PIX_FMT_CPIA1</link> v4l2_fourcc('C', 'P', 'I', 'A') /* cpia1 YUV */
349#define <link linkend="V4L2-PIX-FMT-WNVA">V4L2_PIX_FMT_WNVA</link> v4l2_fourcc('W', 'N', 'V', 'A') /* Winnov hw compress */ 348#define <link linkend="V4L2-PIX-FMT-WNVA">V4L2_PIX_FMT_WNVA</link> v4l2_fourcc('W', 'N', 'V', 'A') /* Winnov hw compress */
350#define <link linkend="V4L2-PIX-FMT-SN9C10X">V4L2_PIX_FMT_SN9C10X</link> v4l2_fourcc('S', '9', '1', '0') /* SN9C10x compression */ 349#define <link linkend="V4L2-PIX-FMT-SN9C10X">V4L2_PIX_FMT_SN9C10X</link> v4l2_fourcc('S', '9', '1', '0') /* SN9C10x compression */
351#define <link linkend="V4L2-PIX-FMT-SN9C20X-I420">V4L2_PIX_FMT_SN9C20X_I420</link> v4l2_fourcc('S', '9', '2', '0') /* SN9C20x YUV 4:2:0 */ 350#define <link linkend="V4L2-PIX-FMT-SN9C20X-I420">V4L2_PIX_FMT_SN9C20X_I420</link> v4l2_fourcc('S', '9', '2', '0') /* SN9C20x YUV 4:2:0 */
@@ -358,12 +357,15 @@ struct <link linkend="v4l2-pix-format">v4l2_pix_format</link> {
358#define <link linkend="V4L2-PIX-FMT-SPCA561">V4L2_PIX_FMT_SPCA561</link> v4l2_fourcc('S', '5', '6', '1') /* compressed GBRG bayer */ 357#define <link linkend="V4L2-PIX-FMT-SPCA561">V4L2_PIX_FMT_SPCA561</link> v4l2_fourcc('S', '5', '6', '1') /* compressed GBRG bayer */
359#define <link linkend="V4L2-PIX-FMT-PAC207">V4L2_PIX_FMT_PAC207</link> v4l2_fourcc('P', '2', '0', '7') /* compressed BGGR bayer */ 358#define <link linkend="V4L2-PIX-FMT-PAC207">V4L2_PIX_FMT_PAC207</link> v4l2_fourcc('P', '2', '0', '7') /* compressed BGGR bayer */
360#define <link linkend="V4L2-PIX-FMT-MR97310A">V4L2_PIX_FMT_MR97310A</link> v4l2_fourcc('M', '3', '1', '0') /* compressed BGGR bayer */ 359#define <link linkend="V4L2-PIX-FMT-MR97310A">V4L2_PIX_FMT_MR97310A</link> v4l2_fourcc('M', '3', '1', '0') /* compressed BGGR bayer */
360#define <link linkend="V4L2-PIX-FMT-SN9C2028">V4L2_PIX_FMT_SN9C2028</link> v4l2_fourcc('S', 'O', 'N', 'X') /* compressed GBRG bayer */
361#define <link linkend="V4L2-PIX-FMT-SQ905C">V4L2_PIX_FMT_SQ905C</link> v4l2_fourcc('9', '0', '5', 'C') /* compressed RGGB bayer */ 361#define <link linkend="V4L2-PIX-FMT-SQ905C">V4L2_PIX_FMT_SQ905C</link> v4l2_fourcc('9', '0', '5', 'C') /* compressed RGGB bayer */
362#define <link linkend="V4L2-PIX-FMT-PJPG">V4L2_PIX_FMT_PJPG</link> v4l2_fourcc('P', 'J', 'P', 'G') /* Pixart 73xx JPEG */ 362#define <link linkend="V4L2-PIX-FMT-PJPG">V4L2_PIX_FMT_PJPG</link> v4l2_fourcc('P', 'J', 'P', 'G') /* Pixart 73xx JPEG */
363#define <link linkend="V4L2-PIX-FMT-OV511">V4L2_PIX_FMT_OV511</link> v4l2_fourcc('O', '5', '1', '1') /* ov511 JPEG */ 363#define <link linkend="V4L2-PIX-FMT-OV511">V4L2_PIX_FMT_OV511</link> v4l2_fourcc('O', '5', '1', '1') /* ov511 JPEG */
364#define <link linkend="V4L2-PIX-FMT-OV518">V4L2_PIX_FMT_OV518</link> v4l2_fourcc('O', '5', '1', '8') /* ov518 JPEG */ 364#define <link linkend="V4L2-PIX-FMT-OV518">V4L2_PIX_FMT_OV518</link> v4l2_fourcc('O', '5', '1', '8') /* ov518 JPEG */
365#define <link linkend="V4L2-PIX-FMT-TM6000">V4L2_PIX_FMT_TM6000</link> v4l2_fourcc('T', 'M', '6', '0') /* tm5600/tm60x0 */
366#define <link linkend="V4L2-PIX-FMT-STV0680">V4L2_PIX_FMT_STV0680</link> v4l2_fourcc('S', '6', '8', '0') /* stv0680 bayer */ 365#define <link linkend="V4L2-PIX-FMT-STV0680">V4L2_PIX_FMT_STV0680</link> v4l2_fourcc('S', '6', '8', '0') /* stv0680 bayer */
366#define <link linkend="V4L2-PIX-FMT-TM6000">V4L2_PIX_FMT_TM6000</link> v4l2_fourcc('T', 'M', '6', '0') /* tm5600/tm60x0 */
367#define <link linkend="V4L2-PIX-FMT-CIT-YYVYUY">V4L2_PIX_FMT_CIT_YYVYUY</link> v4l2_fourcc('C', 'I', 'T', 'V') /* one line of Y then 1 line of VYUY */
368#define <link linkend="V4L2-PIX-FMT-KONICA420">V4L2_PIX_FMT_KONICA420</link> v4l2_fourcc('K', 'O', 'N', 'I') /* YUV420 planar in blocks of 256 pixels */
367 369
368/* 370/*
369 * F O R M A T E N U M E R A T I O N 371 * F O R M A T E N U M E R A T I O N
@@ -380,7 +382,7 @@ struct <link linkend="v4l2-fmtdesc">v4l2_fmtdesc</link> {
380#define V4L2_FMT_FLAG_COMPRESSED 0x0001 382#define V4L2_FMT_FLAG_COMPRESSED 0x0001
381#define V4L2_FMT_FLAG_EMULATED 0x0002 383#define V4L2_FMT_FLAG_EMULATED 0x0002
382 384
383#if 1 /*KEEP*/ 385#if 1
384 /* Experimental Frame Size and frame rate enumeration */ 386 /* Experimental Frame Size and frame rate enumeration */
385/* 387/*
386 * F R A M E S I Z E E N U M E R A T I O N 388 * F R A M E S I Z E E N U M E R A T I O N
@@ -544,6 +546,8 @@ struct <link linkend="v4l2-buffer">v4l2_buffer</link> {
544#define V4L2_BUF_FLAG_KEYFRAME 0x0008 /* Image is a keyframe (I-frame) */ 546#define V4L2_BUF_FLAG_KEYFRAME 0x0008 /* Image is a keyframe (I-frame) */
545#define V4L2_BUF_FLAG_PFRAME 0x0010 /* Image is a P-frame */ 547#define V4L2_BUF_FLAG_PFRAME 0x0010 /* Image is a P-frame */
546#define V4L2_BUF_FLAG_BFRAME 0x0020 /* Image is a B-frame */ 548#define V4L2_BUF_FLAG_BFRAME 0x0020 /* Image is a B-frame */
549/* Buffer is ready, but the data contained within is corrupted. */
550#define V4L2_BUF_FLAG_ERROR 0x0040
547#define V4L2_BUF_FLAG_TIMECODE 0x0100 /* timecode field is valid */ 551#define V4L2_BUF_FLAG_TIMECODE 0x0100 /* timecode field is valid */
548#define V4L2_BUF_FLAG_INPUT 0x0200 /* input field is valid */ 552#define V4L2_BUF_FLAG_INPUT 0x0200 /* input field is valid */
549 553
@@ -934,6 +938,16 @@ struct <link linkend="v4l2-ext-controls">v4l2_ext_controls</link> {
934#define V4L2_CTRL_ID2CLASS(id) ((id) &amp; 0x0fff0000UL) 938#define V4L2_CTRL_ID2CLASS(id) ((id) &amp; 0x0fff0000UL)
935#define V4L2_CTRL_DRIVER_PRIV(id) (((id) &amp; 0xffff) &gt;= 0x1000) 939#define V4L2_CTRL_DRIVER_PRIV(id) (((id) &amp; 0xffff) &gt;= 0x1000)
936 940
941enum <link linkend="v4l2-ctrl-type">v4l2_ctrl_type</link> {
942 V4L2_CTRL_TYPE_INTEGER = 1,
943 V4L2_CTRL_TYPE_BOOLEAN = 2,
944 V4L2_CTRL_TYPE_MENU = 3,
945 V4L2_CTRL_TYPE_BUTTON = 4,
946 V4L2_CTRL_TYPE_INTEGER64 = 5,
947 V4L2_CTRL_TYPE_CTRL_CLASS = 6,
948 V4L2_CTRL_TYPE_STRING = 7,
949};
950
937/* Used in the VIDIOC_QUERYCTRL ioctl for querying controls */ 951/* Used in the VIDIOC_QUERYCTRL ioctl for querying controls */
938struct <link linkend="v4l2-queryctrl">v4l2_queryctrl</link> { 952struct <link linkend="v4l2-queryctrl">v4l2_queryctrl</link> {
939 __u32 id; 953 __u32 id;
@@ -1018,21 +1032,27 @@ enum <link linkend="v4l2-colorfx">v4l2_colorfx</link> {
1018 V4L2_COLORFX_NONE = 0, 1032 V4L2_COLORFX_NONE = 0,
1019 V4L2_COLORFX_BW = 1, 1033 V4L2_COLORFX_BW = 1,
1020 V4L2_COLORFX_SEPIA = 2, 1034 V4L2_COLORFX_SEPIA = 2,
1021 V4L2_COLORFX_NEGATIVE = 3, 1035 V4L2_COLORFX_NEGATIVE = 3,
1022 V4L2_COLORFX_EMBOSS = 4, 1036 V4L2_COLORFX_EMBOSS = 4,
1023 V4L2_COLORFX_SKETCH = 5, 1037 V4L2_COLORFX_SKETCH = 5,
1024 V4L2_COLORFX_SKY_BLUE = 6, 1038 V4L2_COLORFX_SKY_BLUE = 6,
1025 V4L2_COLORFX_GRASS_GREEN = 7, 1039 V4L2_COLORFX_GRASS_GREEN = 7,
1026 V4L2_COLORFX_SKIN_WHITEN = 8, 1040 V4L2_COLORFX_SKIN_WHITEN = 8,
1027 V4L2_COLORFX_VIVID = 9. 1041 V4L2_COLORFX_VIVID = 9,
1028}; 1042};
1029#define V4L2_CID_AUTOBRIGHTNESS (V4L2_CID_BASE+32) 1043#define V4L2_CID_AUTOBRIGHTNESS (V4L2_CID_BASE+32)
1030#define V4L2_CID_BAND_STOP_FILTER (V4L2_CID_BASE+33) 1044#define V4L2_CID_BAND_STOP_FILTER (V4L2_CID_BASE+33)
1031 1045
1032#define V4L2_CID_ROTATE (V4L2_CID_BASE+34) 1046#define V4L2_CID_ROTATE (V4L2_CID_BASE+34)
1033#define V4L2_CID_BG_COLOR (V4L2_CID_BASE+35) 1047#define V4L2_CID_BG_COLOR (V4L2_CID_BASE+35)
1048
1049#define V4L2_CID_CHROMA_GAIN (V4L2_CID_BASE+36)
1050
1051#define V4L2_CID_ILLUMINATORS_1 (V4L2_CID_BASE+37)
1052#define V4L2_CID_ILLUMINATORS_2 (V4L2_CID_BASE+38)
1053
1034/* last CID + 1 */ 1054/* last CID + 1 */
1035#define V4L2_CID_LASTP1 (V4L2_CID_BASE+36) 1055#define V4L2_CID_LASTP1 (V4L2_CID_BASE+39)
1036 1056
1037/* MPEG-class control IDs defined by V4L2 */ 1057/* MPEG-class control IDs defined by V4L2 */
1038#define V4L2_CID_MPEG_BASE (V4L2_CTRL_CLASS_MPEG | 0x900) 1058#define V4L2_CID_MPEG_BASE (V4L2_CTRL_CLASS_MPEG | 0x900)
@@ -1349,6 +1369,8 @@ struct <link linkend="v4l2-modulator">v4l2_modulator</link> {
1349#define V4L2_TUNER_CAP_SAP 0x0020 1369#define V4L2_TUNER_CAP_SAP 0x0020
1350#define V4L2_TUNER_CAP_LANG1 0x0040 1370#define V4L2_TUNER_CAP_LANG1 0x0040
1351#define V4L2_TUNER_CAP_RDS 0x0080 1371#define V4L2_TUNER_CAP_RDS 0x0080
1372#define V4L2_TUNER_CAP_RDS_BLOCK_IO 0x0100
1373#define V4L2_TUNER_CAP_RDS_CONTROLS 0x0200
1352 1374
1353/* Flags for the 'rxsubchans' field */ 1375/* Flags for the 'rxsubchans' field */
1354#define V4L2_TUNER_SUB_MONO 0x0001 1376#define V4L2_TUNER_SUB_MONO 0x0001
@@ -1378,7 +1400,8 @@ struct <link linkend="v4l2-hw-freq-seek">v4l2_hw_freq_seek</link> {
1378 enum <link linkend="v4l2-tuner-type">v4l2_tuner_type</link> type; 1400 enum <link linkend="v4l2-tuner-type">v4l2_tuner_type</link> type;
1379 __u32 seek_upward; 1401 __u32 seek_upward;
1380 __u32 wrap_around; 1402 __u32 wrap_around;
1381 __u32 reserved[8]; 1403 __u32 spacing;
1404 __u32 reserved[7];
1382}; 1405};
1383 1406
1384/* 1407/*
@@ -1433,7 +1456,7 @@ struct <link linkend="v4l2-audioout">v4l2_audioout</link> {
1433 * 1456 *
1434 * NOTE: EXPERIMENTAL API 1457 * NOTE: EXPERIMENTAL API
1435 */ 1458 */
1436#if 1 /*KEEP*/ 1459#if 1
1437#define V4L2_ENC_IDX_FRAME_I (0) 1460#define V4L2_ENC_IDX_FRAME_I (0)
1438#define V4L2_ENC_IDX_FRAME_P (1) 1461#define V4L2_ENC_IDX_FRAME_P (1)
1439#define V4L2_ENC_IDX_FRAME_B (2) 1462#define V4L2_ENC_IDX_FRAME_B (2)
@@ -1626,6 +1649,38 @@ struct <link linkend="v4l2-streamparm">v4l2_streamparm</link> {
1626}; 1649};
1627 1650
1628/* 1651/*
1652 * E V E N T S
1653 */
1654
1655#define V4L2_EVENT_ALL 0
1656#define V4L2_EVENT_VSYNC 1
1657#define V4L2_EVENT_EOS 2
1658#define V4L2_EVENT_PRIVATE_START 0x08000000
1659
1660/* Payload for V4L2_EVENT_VSYNC */
1661struct <link linkend="v4l2-event-vsync">v4l2_event_vsync</link> {
1662 /* Can be V4L2_FIELD_ANY, _NONE, _TOP or _BOTTOM */
1663 __u8 field;
1664} __attribute__ ((packed));
1665
1666struct <link linkend="v4l2-event">v4l2_event</link> {
1667 __u32 type;
1668 union {
1669 struct <link linkend="v4l2-event-vsync">v4l2_event_vsync</link> vsync;
1670 __u8 data[64];
1671 } u;
1672 __u32 pending;
1673 __u32 sequence;
1674 struct timespec timestamp;
1675 __u32 reserved[9];
1676};
1677
1678struct <link linkend="v4l2-event-subscription">v4l2_event_subscription</link> {
1679 __u32 type;
1680 __u32 reserved[7];
1681};
1682
1683/*
1629 * A D V A N C E D D E B U G G I N G 1684 * A D V A N C E D D E B U G G I N G
1630 * 1685 *
1631 * NOTE: EXPERIMENTAL API, NEVER RELY ON THIS IN APPLICATIONS! 1686 * NOTE: EXPERIMENTAL API, NEVER RELY ON THIS IN APPLICATIONS!
@@ -1720,7 +1775,7 @@ struct <link linkend="v4l2-dbg-chip-ident">v4l2_dbg_chip_ident</link> {
1720#define VIDIOC_G_EXT_CTRLS _IOWR('V', 71, struct <link linkend="v4l2-ext-controls">v4l2_ext_controls</link>) 1775#define VIDIOC_G_EXT_CTRLS _IOWR('V', 71, struct <link linkend="v4l2-ext-controls">v4l2_ext_controls</link>)
1721#define VIDIOC_S_EXT_CTRLS _IOWR('V', 72, struct <link linkend="v4l2-ext-controls">v4l2_ext_controls</link>) 1776#define VIDIOC_S_EXT_CTRLS _IOWR('V', 72, struct <link linkend="v4l2-ext-controls">v4l2_ext_controls</link>)
1722#define VIDIOC_TRY_EXT_CTRLS _IOWR('V', 73, struct <link linkend="v4l2-ext-controls">v4l2_ext_controls</link>) 1777#define VIDIOC_TRY_EXT_CTRLS _IOWR('V', 73, struct <link linkend="v4l2-ext-controls">v4l2_ext_controls</link>)
1723#if 1 /*KEEP*/ 1778#if 1
1724#define VIDIOC_ENUM_FRAMESIZES _IOWR('V', 74, struct <link linkend="v4l2-frmsizeenum">v4l2_frmsizeenum</link>) 1779#define VIDIOC_ENUM_FRAMESIZES _IOWR('V', 74, struct <link linkend="v4l2-frmsizeenum">v4l2_frmsizeenum</link>)
1725#define VIDIOC_ENUM_FRAMEINTERVALS _IOWR('V', 75, struct <link linkend="v4l2-frmivalenum">v4l2_frmivalenum</link>) 1780#define VIDIOC_ENUM_FRAMEINTERVALS _IOWR('V', 75, struct <link linkend="v4l2-frmivalenum">v4l2_frmivalenum</link>)
1726#define VIDIOC_G_ENC_INDEX _IOR('V', 76, struct <link linkend="v4l2-enc-idx">v4l2_enc_idx</link>) 1781#define VIDIOC_G_ENC_INDEX _IOR('V', 76, struct <link linkend="v4l2-enc-idx">v4l2_enc_idx</link>)
@@ -1728,7 +1783,7 @@ struct <link linkend="v4l2-dbg-chip-ident">v4l2_dbg_chip_ident</link> {
1728#define VIDIOC_TRY_ENCODER_CMD _IOWR('V', 78, struct <link linkend="v4l2-encoder-cmd">v4l2_encoder_cmd</link>) 1783#define VIDIOC_TRY_ENCODER_CMD _IOWR('V', 78, struct <link linkend="v4l2-encoder-cmd">v4l2_encoder_cmd</link>)
1729#endif 1784#endif
1730 1785
1731#if 1 /*KEEP*/ 1786#if 1
1732/* Experimental, meant for debugging, testing and internal use. 1787/* Experimental, meant for debugging, testing and internal use.
1733 Only implemented if CONFIG_VIDEO_ADV_DEBUG is defined. 1788 Only implemented if CONFIG_VIDEO_ADV_DEBUG is defined.
1734 You must be root to use these ioctls. Never use these in applications! */ 1789 You must be root to use these ioctls. Never use these in applications! */
@@ -1747,6 +1802,9 @@ struct <link linkend="v4l2-dbg-chip-ident">v4l2_dbg_chip_ident</link> {
1747#define VIDIOC_QUERY_DV_PRESET _IOR('V', 86, struct <link linkend="v4l2-dv-preset">v4l2_dv_preset</link>) 1802#define VIDIOC_QUERY_DV_PRESET _IOR('V', 86, struct <link linkend="v4l2-dv-preset">v4l2_dv_preset</link>)
1748#define VIDIOC_S_DV_TIMINGS _IOWR('V', 87, struct <link linkend="v4l2-dv-timings">v4l2_dv_timings</link>) 1803#define VIDIOC_S_DV_TIMINGS _IOWR('V', 87, struct <link linkend="v4l2-dv-timings">v4l2_dv_timings</link>)
1749#define VIDIOC_G_DV_TIMINGS _IOWR('V', 88, struct <link linkend="v4l2-dv-timings">v4l2_dv_timings</link>) 1804#define VIDIOC_G_DV_TIMINGS _IOWR('V', 88, struct <link linkend="v4l2-dv-timings">v4l2_dv_timings</link>)
1805#define VIDIOC_DQEVENT _IOR('V', 89, struct <link linkend="v4l2-event">v4l2_event</link>)
1806#define VIDIOC_SUBSCRIBE_EVENT _IOW('V', 90, struct <link linkend="v4l2-event-subscription">v4l2_event_subscription</link>)
1807#define VIDIOC_UNSUBSCRIBE_EVENT _IOW('V', 91, struct <link linkend="v4l2-event-subscription">v4l2_event_subscription</link>)
1750 1808
1751/* Reminder: when adding new ioctls please add support for them to 1809/* Reminder: when adding new ioctls please add support for them to
1752 drivers/media/video/v4l2-compat-ioctl32.c as well! */ 1810 drivers/media/video/v4l2-compat-ioctl32.c as well! */
diff --git a/Documentation/DocBook/v4l/vidioc-g-dv-preset.xml b/Documentation/DocBook/v4l/vidioc-g-dv-preset.xml
index 3c6784e132f3..d733721a7519 100644
--- a/Documentation/DocBook/v4l/vidioc-g-dv-preset.xml
+++ b/Documentation/DocBook/v4l/vidioc-g-dv-preset.xml
@@ -16,8 +16,7 @@
16 <funcdef>int <function>ioctl</function></funcdef> 16 <funcdef>int <function>ioctl</function></funcdef>
17 <paramdef>int <parameter>fd</parameter></paramdef> 17 <paramdef>int <parameter>fd</parameter></paramdef>
18 <paramdef>int <parameter>request</parameter></paramdef> 18 <paramdef>int <parameter>request</parameter></paramdef>
19 <paramdef>&v4l2-dv-preset; 19 <paramdef>struct v4l2_dv_preset *<parameter>argp</parameter></paramdef>
20*<parameter>argp</parameter></paramdef>
21 </funcprototype> 20 </funcprototype>
22 </funcsynopsis> 21 </funcsynopsis>
23 </refsynopsisdiv> 22 </refsynopsisdiv>
diff --git a/Documentation/DocBook/v4l/vidioc-g-dv-timings.xml b/Documentation/DocBook/v4l/vidioc-g-dv-timings.xml
index ecc19576bb8f..d5ec6abf0ce2 100644
--- a/Documentation/DocBook/v4l/vidioc-g-dv-timings.xml
+++ b/Documentation/DocBook/v4l/vidioc-g-dv-timings.xml
@@ -16,8 +16,7 @@
16 <funcdef>int <function>ioctl</function></funcdef> 16 <funcdef>int <function>ioctl</function></funcdef>
17 <paramdef>int <parameter>fd</parameter></paramdef> 17 <paramdef>int <parameter>fd</parameter></paramdef>
18 <paramdef>int <parameter>request</parameter></paramdef> 18 <paramdef>int <parameter>request</parameter></paramdef>
19 <paramdef>&v4l2-dv-timings; 19 <paramdef>struct v4l2_dv_timings *<parameter>argp</parameter></paramdef>
20*<parameter>argp</parameter></paramdef>
21 </funcprototype> 20 </funcprototype>
22 </funcsynopsis> 21 </funcsynopsis>
23 </refsynopsisdiv> 22 </refsynopsisdiv>
diff --git a/Documentation/DocBook/v4l/vidioc-query-dv-preset.xml b/Documentation/DocBook/v4l/vidioc-query-dv-preset.xml
index 402229ee06f6..d272f7ab91b8 100644
--- a/Documentation/DocBook/v4l/vidioc-query-dv-preset.xml
+++ b/Documentation/DocBook/v4l/vidioc-query-dv-preset.xml
@@ -16,7 +16,7 @@ input</refpurpose>
16 <funcdef>int <function>ioctl</function></funcdef> 16 <funcdef>int <function>ioctl</function></funcdef>
17 <paramdef>int <parameter>fd</parameter></paramdef> 17 <paramdef>int <parameter>fd</parameter></paramdef>
18 <paramdef>int <parameter>request</parameter></paramdef> 18 <paramdef>int <parameter>request</parameter></paramdef>
19 <paramdef>&v4l2-dv-preset; *<parameter>argp</parameter></paramdef> 19 <paramdef>struct v4l2_dv_preset *<parameter>argp</parameter></paramdef>
20 </funcprototype> 20 </funcprototype>
21 </funcsynopsis> 21 </funcsynopsis>
22 </refsynopsisdiv> 22 </refsynopsisdiv>
diff --git a/Documentation/DocBook/v4l/vidioc-querycap.xml b/Documentation/DocBook/v4l/vidioc-querycap.xml
index 6ab7e25b31b6..d499da93a450 100644
--- a/Documentation/DocBook/v4l/vidioc-querycap.xml
+++ b/Documentation/DocBook/v4l/vidioc-querycap.xml
@@ -184,7 +184,7 @@ data.</entry>
184 <row> 184 <row>
185 <entry><constant>V4L2_CAP_RDS_CAPTURE</constant></entry> 185 <entry><constant>V4L2_CAP_RDS_CAPTURE</constant></entry>
186 <entry>0x00000100</entry> 186 <entry>0x00000100</entry>
187 <entry>The device supports the <link linkend="rds">RDS</link> interface.</entry> 187 <entry>The device supports the <link linkend="rds">RDS</link> capture interface.</entry>
188 </row> 188 </row>
189 <row> 189 <row>
190 <entry><constant>V4L2_CAP_VIDEO_OUTPUT_OVERLAY</constant></entry> 190 <entry><constant>V4L2_CAP_VIDEO_OUTPUT_OVERLAY</constant></entry>
@@ -206,6 +206,11 @@ driver capabilities.</para></footnote></entry>
206hardware frequency seeking.</entry> 206hardware frequency seeking.</entry>
207 </row> 207 </row>
208 <row> 208 <row>
209 <entry><constant>V4L2_CAP_RDS_OUTPUT</constant></entry>
210 <entry>0x00000800</entry>
211 <entry>The device supports the <link linkend="rds">RDS</link> output interface.</entry>
212 </row>
213 <row>
209 <entry><constant>V4L2_CAP_TUNER</constant></entry> 214 <entry><constant>V4L2_CAP_TUNER</constant></entry>
210 <entry>0x00010000</entry> 215 <entry>0x00010000</entry>
211 <entry>The device has some sort of tuner to 216 <entry>The device has some sort of tuner to
diff --git a/Documentation/DocBook/v4l/vidioc-queryctrl.xml b/Documentation/DocBook/v4l/vidioc-queryctrl.xml
index 8e0e055ac934..0d5e8283cf32 100644
--- a/Documentation/DocBook/v4l/vidioc-queryctrl.xml
+++ b/Documentation/DocBook/v4l/vidioc-queryctrl.xml
@@ -103,8 +103,12 @@ structure. The driver fills the rest of the structure or returns an
103<structfield>index</structfield> is invalid. Menu items are enumerated 103<structfield>index</structfield> is invalid. Menu items are enumerated
104by calling <constant>VIDIOC_QUERYMENU</constant> with successive 104by calling <constant>VIDIOC_QUERYMENU</constant> with successive
105<structfield>index</structfield> values from &v4l2-queryctrl; 105<structfield>index</structfield> values from &v4l2-queryctrl;
106<structfield>minimum</structfield> (0) to 106<structfield>minimum</structfield> to
107<structfield>maximum</structfield>, inclusive.</para> 107<structfield>maximum</structfield>, inclusive. Note that it is possible
108for <constant>VIDIOC_QUERYMENU</constant> to return an &EINVAL; for some
109indices between <structfield>minimum</structfield> and <structfield>maximum</structfield>.
110In that case that particular menu item is not supported by this driver. Also note that
111the <structfield>minimum</structfield> value is not necessarily 0.</para>
108 112
109 <para>See also the examples in <xref linkend="control" />.</para> 113 <para>See also the examples in <xref linkend="control" />.</para>
110 114
@@ -139,7 +143,7 @@ string. This information is intended for the user.</entry>
139 <entry><structfield>minimum</structfield></entry> 143 <entry><structfield>minimum</structfield></entry>
140 <entry>Minimum value, inclusive. This field gives a lower 144 <entry>Minimum value, inclusive. This field gives a lower
141bound for <constant>V4L2_CTRL_TYPE_INTEGER</constant> controls and the 145bound for <constant>V4L2_CTRL_TYPE_INTEGER</constant> controls and the
142lowest valid index (always 0) for <constant>V4L2_CTRL_TYPE_MENU</constant> controls. 146lowest valid index for <constant>V4L2_CTRL_TYPE_MENU</constant> controls.
143For <constant>V4L2_CTRL_TYPE_STRING</constant> controls the minimum value 147For <constant>V4L2_CTRL_TYPE_STRING</constant> controls the minimum value
144gives the minimum length of the string. This length <emphasis>does not include the terminating 148gives the minimum length of the string. This length <emphasis>does not include the terminating
145zero</emphasis>. It may not be valid for any other type of control, including 149zero</emphasis>. It may not be valid for any other type of control, including
@@ -279,7 +283,7 @@ values which are actually different on the hardware.</entry>
279 </row> 283 </row>
280 <row> 284 <row>
281 <entry><constant>V4L2_CTRL_TYPE_MENU</constant></entry> 285 <entry><constant>V4L2_CTRL_TYPE_MENU</constant></entry>
282 <entry>0</entry> 286 <entry>&ge; 0</entry>
283 <entry>1</entry> 287 <entry>1</entry>
284 <entry>N-1</entry> 288 <entry>N-1</entry>
285 <entry>The control has a menu of N choices. The names of 289 <entry>The control has a menu of N choices. The names of
@@ -405,8 +409,10 @@ writing a value will cause the device to carry out a given action
405 <term><errorcode>EINVAL</errorcode></term> 409 <term><errorcode>EINVAL</errorcode></term>
406 <listitem> 410 <listitem>
407 <para>The &v4l2-queryctrl; <structfield>id</structfield> 411 <para>The &v4l2-queryctrl; <structfield>id</structfield>
408is invalid. The &v4l2-querymenu; <structfield>id</structfield> or 412is invalid. The &v4l2-querymenu; <structfield>id</structfield> is
409<structfield>index</structfield> is invalid.</para> 413invalid or <structfield>index</structfield> is out of range (less than
414<structfield>minimum</structfield> or greater than <structfield>maximum</structfield>)
415or this particular menu item is not supported by the driver.</para>
410 </listitem> 416 </listitem>
411 </varlistentry> 417 </varlistentry>
412 <varlistentry> 418 <varlistentry>
diff --git a/Documentation/DocBook/v4l/vidioc-s-hw-freq-seek.xml b/Documentation/DocBook/v4l/vidioc-s-hw-freq-seek.xml
index 14b3ec7ed75b..c30dcc4232c0 100644
--- a/Documentation/DocBook/v4l/vidioc-s-hw-freq-seek.xml
+++ b/Documentation/DocBook/v4l/vidioc-s-hw-freq-seek.xml
@@ -51,7 +51,8 @@
51 51
52 <para>Start a hardware frequency seek from the current frequency. 52 <para>Start a hardware frequency seek from the current frequency.
53To do this applications initialize the <structfield>tuner</structfield>, 53To do this applications initialize the <structfield>tuner</structfield>,
54<structfield>type</structfield>, <structfield>seek_upward</structfield> and 54<structfield>type</structfield>, <structfield>seek_upward</structfield>,
55<structfield>spacing</structfield> and
55<structfield>wrap_around</structfield> fields, and zero out the 56<structfield>wrap_around</structfield> fields, and zero out the
56<structfield>reserved</structfield> array of a &v4l2-hw-freq-seek; and 57<structfield>reserved</structfield> array of a &v4l2-hw-freq-seek; and
57call the <constant>VIDIOC_S_HW_FREQ_SEEK</constant> ioctl with a pointer 58call the <constant>VIDIOC_S_HW_FREQ_SEEK</constant> ioctl with a pointer
@@ -89,7 +90,12 @@ field and the &v4l2-tuner; <structfield>index</structfield> field.</entry>
89 </row> 90 </row>
90 <row> 91 <row>
91 <entry>__u32</entry> 92 <entry>__u32</entry>
92 <entry><structfield>reserved</structfield>[8]</entry> 93 <entry><structfield>spacing</structfield></entry>
94 <entry>If non-zero, defines the hardware seek resolution in Hz. The driver selects the nearest value that is supported by the device. If spacing is zero a reasonable default value is used.</entry>
95 </row>
96 <row>
97 <entry>__u32</entry>
98 <entry><structfield>reserved</structfield>[7]</entry>
93 <entry>Reserved for future extensions. Drivers and 99 <entry>Reserved for future extensions. Drivers and
94 applications must set the array to zero.</entry> 100 applications must set the array to zero.</entry>
95 </row> 101 </row>
diff --git a/Documentation/HOWTO b/Documentation/HOWTO
index 40ada93b820a..365bda9a0d94 100644
--- a/Documentation/HOWTO
+++ b/Documentation/HOWTO
@@ -187,7 +187,7 @@ apply a patch.
187If you do not know where you want to start, but you want to look for 187If you do not know where you want to start, but you want to look for
188some task to start doing to join into the kernel development community, 188some task to start doing to join into the kernel development community,
189go to the Linux Kernel Janitor's project: 189go to the Linux Kernel Janitor's project:
190 http://janitor.kernelnewbies.org/ 190 http://kernelnewbies.org/KernelJanitors
191It is a great place to start. It describes a list of relatively simple 191It is a great place to start. It describes a list of relatively simple
192problems that need to be cleaned up and fixed within the Linux kernel 192problems that need to be cleaned up and fixed within the Linux kernel
193source tree. Working with the developers in charge of this project, you 193source tree. Working with the developers in charge of this project, you
@@ -315,7 +315,7 @@ process is tracked with the tool patchwork. Patchwork offers a web
315interface which shows patch postings, any comments on a patch or 315interface which shows patch postings, any comments on a patch or
316revisions to it, and maintainers can mark patches as under review, 316revisions to it, and maintainers can mark patches as under review,
317accepted, or rejected. Most of these patchwork sites are listed at 317accepted, or rejected. Most of these patchwork sites are listed at
318http://patchwork.kernel.org/ or http://patchwork.ozlabs.org/. 318http://patchwork.kernel.org/.
319 319
3202.6.x -next kernel tree for integration tests 3202.6.x -next kernel tree for integration tests
321--------------------------------------------- 321---------------------------------------------
@@ -595,7 +595,7 @@ start exactly where you are now.
595 595
596---------- 596----------
597Thanks to Paolo Ciarrocchi who allowed the "Development Process" 597Thanks to Paolo Ciarrocchi who allowed the "Development Process"
598(http://linux.tar.bz/articles/2.6-development_process) section 598(http://lwn.net/Articles/94386/) section
599to be based on text he had written, and to Randy Dunlap and Gerrit 599to be based on text he had written, and to Randy Dunlap and Gerrit
600Huizenga for some of the list of things you should and should not say. 600Huizenga for some of the list of things you should and should not say.
601Also thanks to Pat Mochel, Hanna Linder, Randy Dunlap, Kay Sievers, 601Also thanks to Pat Mochel, Hanna Linder, Randy Dunlap, Kay Sievers,
diff --git a/Documentation/PCI/pci.txt b/Documentation/PCI/pci.txt
index 7f6de6ea5b47..6148d4080f88 100644
--- a/Documentation/PCI/pci.txt
+++ b/Documentation/PCI/pci.txt
@@ -581,7 +581,7 @@ to be handled by platform and generic code, not individual drivers.
5818. Vendor and device identifications 5818. Vendor and device identifications
582~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 582~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
583 583
584One is not not required to add new device ids to include/linux/pci_ids.h. 584One is not required to add new device ids to include/linux/pci_ids.h.
585Please add PCI_VENDOR_ID_xxx for vendors and a hex constant for device ids. 585Please add PCI_VENDOR_ID_xxx for vendors and a hex constant for device ids.
586 586
587PCI_VENDOR_ID_xxx constants are re-used. The device ids are arbitrary 587PCI_VENDOR_ID_xxx constants are re-used. The device ids are arbitrary
diff --git a/Documentation/RCU/RTFP.txt b/Documentation/RCU/RTFP.txt
index 5aea459e3dd6..c43460dade0f 100644
--- a/Documentation/RCU/RTFP.txt
+++ b/Documentation/RCU/RTFP.txt
@@ -606,7 +606,7 @@ Suparna Bhattacharya"
606,Year="2006" 606,Year="2006"
607,pages="v2 123-138" 607,pages="v2 123-138"
608,note="Available: 608,note="Available:
609\url{http://www.linuxsymposium.org/2006/view_abstract.php?content_key=184} 609\url{http://www.linuxsymposium.org/2006/index_2006.php}
610\url{http://www.rdrop.com/users/paulmck/RCU/OLSrtRCU.2006.08.11a.pdf} 610\url{http://www.rdrop.com/users/paulmck/RCU/OLSrtRCU.2006.08.11a.pdf}
611[Viewed January 1, 2007]" 611[Viewed January 1, 2007]"
612,annotation=" 612,annotation="
diff --git a/Documentation/RCU/checklist.txt b/Documentation/RCU/checklist.txt
index 790d1a812376..0c134f8afc6f 100644
--- a/Documentation/RCU/checklist.txt
+++ b/Documentation/RCU/checklist.txt
@@ -218,13 +218,22 @@ over a rather long period of time, but improvements are always welcome!
218 include: 218 include:
219 219
220 a. Keeping a count of the number of data-structure elements 220 a. Keeping a count of the number of data-structure elements
221 used by the RCU-protected data structure, including those 221 used by the RCU-protected data structure, including
222 waiting for a grace period to elapse. Enforce a limit 222 those waiting for a grace period to elapse. Enforce a
223 on this number, stalling updates as needed to allow 223 limit on this number, stalling updates as needed to allow
224 previously deferred frees to complete. 224 previously deferred frees to complete. Alternatively,
225 225 limit only the number awaiting deferred free rather than
226 Alternatively, limit only the number awaiting deferred 226 the total number of elements.
227 free rather than the total number of elements. 227
228 One way to stall the updates is to acquire the update-side
229 mutex. (Don't try this with a spinlock -- other CPUs
230 spinning on the lock could prevent the grace period
231 from ever ending.) Another way to stall the updates
232 is for the updates to use a wrapper function around
233 the memory allocator, so that this wrapper function
234 simulates OOM when there is too much memory awaiting an
235 RCU grace period. There are of course many other
236 variations on this theme.
228 237
229 b. Limiting update rate. For example, if updates occur only 238 b. Limiting update rate. For example, if updates occur only
230 once per hour, then no explicit rate limiting is required, 239 once per hour, then no explicit rate limiting is required,
@@ -365,3 +374,26 @@ over a rather long period of time, but improvements are always welcome!
365 and the compiler to freely reorder code into and out of RCU 374 and the compiler to freely reorder code into and out of RCU
366 read-side critical sections. It is the responsibility of the 375 read-side critical sections. It is the responsibility of the
367 RCU update-side primitives to deal with this. 376 RCU update-side primitives to deal with this.
377
37817. Use CONFIG_PROVE_RCU, CONFIG_DEBUG_OBJECTS_RCU_HEAD, and
379 the __rcu sparse checks to validate your RCU code. These
380 can help find problems as follows:
381
382 CONFIG_PROVE_RCU: check that accesses to RCU-protected data
383 structures are carried out under the proper RCU
384 read-side critical section, while holding the right
385 combination of locks, or whatever other conditions
386 are appropriate.
387
388 CONFIG_DEBUG_OBJECTS_RCU_HEAD: check that you don't pass the
389 same object to call_rcu() (or friends) before an RCU
390 grace period has elapsed since the last time that you
391 passed that same object to call_rcu() (or friends).
392
393 __rcu sparse checks: tag the pointer to the RCU-protected data
394 structure with __rcu, and sparse will warn you if you
395 access that pointer without the services of one of the
396 variants of rcu_dereference().
397
398 These debugging aids can help you find problems that are
399 otherwise extremely difficult to spot.
diff --git a/Documentation/RCU/stallwarn.txt b/Documentation/RCU/stallwarn.txt
index 44c6dcc93d6d..862c08ef1fde 100644
--- a/Documentation/RCU/stallwarn.txt
+++ b/Documentation/RCU/stallwarn.txt
@@ -80,6 +80,24 @@ o A CPU looping with bottom halves disabled. This condition can
80o For !CONFIG_PREEMPT kernels, a CPU looping anywhere in the kernel 80o For !CONFIG_PREEMPT kernels, a CPU looping anywhere in the kernel
81 without invoking schedule(). 81 without invoking schedule().
82 82
83o A CPU-bound real-time task in a CONFIG_PREEMPT kernel, which might
84 happen to preempt a low-priority task in the middle of an RCU
85 read-side critical section. This is especially damaging if
86 that low-priority task is not permitted to run on any other CPU,
87 in which case the next RCU grace period can never complete, which
88 will eventually cause the system to run out of memory and hang.
89 While the system is in the process of running itself out of
90 memory, you might see stall-warning messages.
91
92o A CPU-bound real-time task in a CONFIG_PREEMPT_RT kernel that
93 is running at a higher priority than the RCU softirq threads.
94 This will prevent RCU callbacks from ever being invoked,
95 and in a CONFIG_TREE_PREEMPT_RCU kernel will further prevent
96 RCU grace periods from ever completing. Either way, the
97 system will eventually run out of memory and hang. In the
98 CONFIG_TREE_PREEMPT_RCU case, you might see stall-warning
99 messages.
100
83o A bug in the RCU implementation. 101o A bug in the RCU implementation.
84 102
85o A hardware failure. This is quite unlikely, but has occurred 103o A hardware failure. This is quite unlikely, but has occurred
diff --git a/Documentation/RCU/trace.txt b/Documentation/RCU/trace.txt
index efd8cc95c06b..a851118775d8 100644
--- a/Documentation/RCU/trace.txt
+++ b/Documentation/RCU/trace.txt
@@ -125,6 +125,17 @@ o "b" is the batch limit for this CPU. If more than this number
125 of RCU callbacks is ready to invoke, then the remainder will 125 of RCU callbacks is ready to invoke, then the remainder will
126 be deferred. 126 be deferred.
127 127
128o "ci" is the number of RCU callbacks that have been invoked for
129 this CPU. Note that ci+ql is the number of callbacks that have
130 been registered in absence of CPU-hotplug activity.
131
132o "co" is the number of RCU callbacks that have been orphaned due to
133 this CPU going offline.
134
135o "ca" is the number of RCU callbacks that have been adopted due to
136 other CPUs going offline. Note that ci+co-ca+ql is the number of
137 RCU callbacks registered on this CPU.
138
128There is also an rcu/rcudata.csv file with the same information in 139There is also an rcu/rcudata.csv file with the same information in
129comma-separated-variable spreadsheet format. 140comma-separated-variable spreadsheet format.
130 141
@@ -180,7 +191,7 @@ o "s" is the "signaled" state that drives force_quiescent_state()'s
180 191
181o "jfq" is the number of jiffies remaining for this grace period 192o "jfq" is the number of jiffies remaining for this grace period
182 before force_quiescent_state() is invoked to help push things 193 before force_quiescent_state() is invoked to help push things
183 along. Note that CPUs in dyntick-idle mode thoughout the grace 194 along. Note that CPUs in dyntick-idle mode throughout the grace
184 period will not report on their own, but rather must be check by 195 period will not report on their own, but rather must be check by
185 some other CPU via force_quiescent_state(). 196 some other CPU via force_quiescent_state().
186 197
diff --git a/Documentation/SubmittingDrivers b/Documentation/SubmittingDrivers
index 4947fd8fb182..38d2aab59cac 100644
--- a/Documentation/SubmittingDrivers
+++ b/Documentation/SubmittingDrivers
@@ -161,7 +161,7 @@ How to NOT write kernel driver by Arjan van de Ven:
161 http://www.fenrus.org/how-to-not-write-a-device-driver-paper.pdf 161 http://www.fenrus.org/how-to-not-write-a-device-driver-paper.pdf
162 162
163Kernel Janitor: 163Kernel Janitor:
164 http://janitor.kernelnewbies.org/ 164 http://kernelnewbies.org/KernelJanitors
165 165
166GIT, Fast Version Control System: 166GIT, Fast Version Control System:
167 http://git-scm.com/ 167 http://git-scm.com/
diff --git a/Documentation/SubmittingPatches b/Documentation/SubmittingPatches
index 72651f788f4e..689e2371095c 100644
--- a/Documentation/SubmittingPatches
+++ b/Documentation/SubmittingPatches
@@ -98,6 +98,17 @@ system, git, as a "commit log". See #15, below.
98If your description starts to get long, that's a sign that you probably 98If your description starts to get long, that's a sign that you probably
99need to split up your patch. See #3, next. 99need to split up your patch. See #3, next.
100 100
101When you submit or resubmit a patch or patch series, include the
102complete patch description and justification for it. Don't just
103say that this is version N of the patch (series). Don't expect the
104patch merger to refer back to earlier patch versions or referenced
105URLs to find the patch description and put that into the patch.
106I.e., the patch (series) and its description should be self-contained.
107This benefits both the patch merger(s) and reviewers. Some reviewers
108probably didn't even receive earlier versions of the patch.
109
110If the patch fixes a logged bug entry, refer to that bug entry by
111number and URL.
101 112
102 113
1033) Separate your changes. 1143) Separate your changes.
diff --git a/Documentation/accounting/getdelays.c b/Documentation/accounting/getdelays.c
index 6e25c2659e0a..a2976a6de033 100644
--- a/Documentation/accounting/getdelays.c
+++ b/Documentation/accounting/getdelays.c
@@ -21,6 +21,7 @@
21#include <sys/types.h> 21#include <sys/types.h>
22#include <sys/stat.h> 22#include <sys/stat.h>
23#include <sys/socket.h> 23#include <sys/socket.h>
24#include <sys/wait.h>
24#include <signal.h> 25#include <signal.h>
25 26
26#include <linux/genetlink.h> 27#include <linux/genetlink.h>
@@ -266,11 +267,13 @@ int main(int argc, char *argv[])
266 int containerset = 0; 267 int containerset = 0;
267 char containerpath[1024]; 268 char containerpath[1024];
268 int cfd = 0; 269 int cfd = 0;
270 int forking = 0;
271 sigset_t sigset;
269 272
270 struct msgtemplate msg; 273 struct msgtemplate msg;
271 274
272 while (1) { 275 while (!forking) {
273 c = getopt(argc, argv, "qdiw:r:m:t:p:vlC:"); 276 c = getopt(argc, argv, "qdiw:r:m:t:p:vlC:c:");
274 if (c < 0) 277 if (c < 0)
275 break; 278 break;
276 279
@@ -319,6 +322,28 @@ int main(int argc, char *argv[])
319 err(1, "Invalid pid\n"); 322 err(1, "Invalid pid\n");
320 cmd_type = TASKSTATS_CMD_ATTR_PID; 323 cmd_type = TASKSTATS_CMD_ATTR_PID;
321 break; 324 break;
325 case 'c':
326
327 /* Block SIGCHLD for sigwait() later */
328 if (sigemptyset(&sigset) == -1)
329 err(1, "Failed to empty sigset");
330 if (sigaddset(&sigset, SIGCHLD))
331 err(1, "Failed to set sigchld in sigset");
332 sigprocmask(SIG_BLOCK, &sigset, NULL);
333
334 /* fork/exec a child */
335 tid = fork();
336 if (tid < 0)
337 err(1, "Fork failed\n");
338 if (tid == 0)
339 if (execvp(argv[optind - 1],
340 &argv[optind - 1]) < 0)
341 exit(-1);
342
343 /* Set the command type and avoid further processing */
344 cmd_type = TASKSTATS_CMD_ATTR_PID;
345 forking = 1;
346 break;
322 case 'v': 347 case 'v':
323 printf("debug on\n"); 348 printf("debug on\n");
324 dbg = 1; 349 dbg = 1;
@@ -370,6 +395,15 @@ int main(int argc, char *argv[])
370 goto err; 395 goto err;
371 } 396 }
372 397
398 /*
399 * If we forked a child, wait for it to exit. Cannot use waitpid()
400 * as all the delicious data would be reaped as part of the wait
401 */
402 if (tid && forking) {
403 int sig_received;
404 sigwait(&sigset, &sig_received);
405 }
406
373 if (tid) { 407 if (tid) {
374 rc = send_cmd(nl_sd, id, mypid, TASKSTATS_CMD_GET, 408 rc = send_cmd(nl_sd, id, mypid, TASKSTATS_CMD_GET,
375 cmd_type, &tid, sizeof(__u32)); 409 cmd_type, &tid, sizeof(__u32));
diff --git a/Documentation/acpi/method-customizing.txt b/Documentation/acpi/method-customizing.txt
index e628cd23ca80..3e1d25aee3fb 100644
--- a/Documentation/acpi/method-customizing.txt
+++ b/Documentation/acpi/method-customizing.txt
@@ -19,6 +19,8 @@ Note: Only ACPI METHOD can be overridden, any other object types like
19 "Device", "OperationRegion", are not recognized. 19 "Device", "OperationRegion", are not recognized.
20Note: The same ACPI control method can be overridden for many times, 20Note: The same ACPI control method can be overridden for many times,
21 and it's always the latest one that used by Linux/kernel. 21 and it's always the latest one that used by Linux/kernel.
22Note: To get the ACPI debug object output (Store (AAAA, Debug)),
23 please run "echo 1 > /sys/module/acpi/parameters/aml_debug_output".
22 24
231. override an existing method 251. override an existing method
24 a) get the ACPI table via ACPI sysfs I/F. e.g. to get the DSDT, 26 a) get the ACPI table via ACPI sysfs I/F. e.g. to get the DSDT,
diff --git a/Documentation/aoe/aoe.txt b/Documentation/aoe/aoe.txt
index 3a4dbe4663c9..b5aada9f20cc 100644
--- a/Documentation/aoe/aoe.txt
+++ b/Documentation/aoe/aoe.txt
@@ -1,6 +1,6 @@
1The EtherDrive (R) HOWTO for users of 2.6 kernels is found at ... 1The EtherDrive (R) HOWTO for users of 2.6 kernels is found at ...
2 2
3 http://www.coraid.com/support/linux/EtherDrive-2.6-HOWTO.html 3 http://www.coraid.com/SUPPORT/EtherDrive-HBA
4 4
5 It has many tips and hints! 5 It has many tips and hints!
6 6
diff --git a/Documentation/apparmor.txt b/Documentation/apparmor.txt
new file mode 100644
index 000000000000..93c1fd7d0635
--- /dev/null
+++ b/Documentation/apparmor.txt
@@ -0,0 +1,39 @@
1--- What is AppArmor? ---
2
3AppArmor is MAC style security extension for the Linux kernel. It implements
4a task centered policy, with task "profiles" being created and loaded
5from user space. Tasks on the system that do not have a profile defined for
6them run in an unconfined state which is equivalent to standard Linux DAC
7permissions.
8
9--- How to enable/disable ---
10
11set CONFIG_SECURITY_APPARMOR=y
12
13If AppArmor should be selected as the default security module then
14 set CONFIG_DEFAULT_SECURITY="apparmor"
15 and CONFIG_SECURITY_APPARMOR_BOOTPARAM_VALUE=1
16
17Build the kernel
18
19If AppArmor is not the default security module it can be enabled by passing
20security=apparmor on the kernel's command line.
21
22If AppArmor is the default security module it can be disabled by passing
23apparmor=0, security=XXXX (where XXX is valid security module), on the
24kernel's command line
25
26For AppArmor to enforce any restrictions beyond standard Linux DAC permissions
27policy must be loaded into the kernel from user space (see the Documentation
28and tools links).
29
30--- Documentation ---
31
32Documentation can be found on the wiki.
33
34--- Links ---
35
36Mailing List - apparmor@lists.ubuntu.com
37Wiki - http://apparmor.wiki.kernel.org/
38User space tools - https://launchpad.net/apparmor
39Kernel module - git://git.kernel.org/pub/scm/linux/kernel/git/jj/apparmor-dev.git
diff --git a/Documentation/arm/00-INDEX b/Documentation/arm/00-INDEX
index 7f5fc3ba9c91..ecf7d04bca26 100644
--- a/Documentation/arm/00-INDEX
+++ b/Documentation/arm/00-INDEX
@@ -6,6 +6,8 @@ Interrupts
6 - ARM Interrupt subsystem documentation 6 - ARM Interrupt subsystem documentation
7IXP2000 7IXP2000
8 - Release Notes for Linux on Intel's IXP2000 Network Processor 8 - Release Notes for Linux on Intel's IXP2000 Network Processor
9msm
10 - MSM specific documentation
9Netwinder 11Netwinder
10 - Netwinder specific documentation 12 - Netwinder specific documentation
11Porting 13Porting
diff --git a/Documentation/arm/IXP2000 b/Documentation/arm/IXP2000
index e0148b6b2c40..68d21d92a30b 100644
--- a/Documentation/arm/IXP2000
+++ b/Documentation/arm/IXP2000
@@ -14,7 +14,7 @@ telecom systems. In addition to an XScale core, it contains up to 8
14interfaces (UTOPIA, SPI, etc), a PCI host bridge, one serial port, 14interfaces (UTOPIA, SPI, etc), a PCI host bridge, one serial port,
15flash interface, and some other odds and ends. For more information, see: 15flash interface, and some other odds and ends. For more information, see:
16 16
17http://developer.intel.com/design/network/products/npfamily/ixp2xxx.htm 17http://developer.intel.com
18 18
192. Linux Support 192. Linux Support
20 20
diff --git a/Documentation/arm/IXP4xx b/Documentation/arm/IXP4xx
index 72fbcc4fcab0..133c5fa6c7a1 100644
--- a/Documentation/arm/IXP4xx
+++ b/Documentation/arm/IXP4xx
@@ -45,7 +45,7 @@ require the use of Intel's propietary CSR softare:
45If you need to use any of the above, you need to download Intel's 45If you need to use any of the above, you need to download Intel's
46software from: 46software from:
47 47
48 http://developer.intel.com/design/network/products/npfamily/ixp425swr1.htm 48 http://developer.intel.com/design/network/products/npfamily/ixp425.htm
49 49
50DO NOT POST QUESTIONS TO THE LINUX MAILING LISTS REGARDING THE PROPIETARY 50DO NOT POST QUESTIONS TO THE LINUX MAILING LISTS REGARDING THE PROPIETARY
51SOFTWARE. 51SOFTWARE.
@@ -53,7 +53,7 @@ SOFTWARE.
53There are several websites that provide directions/pointers on using 53There are several websites that provide directions/pointers on using
54Intel's software: 54Intel's software:
55 55
56http://ixp4xx-osdg.sourceforge.net/ 56 http://sourceforge.net/projects/ixp4xx-osdg/
57 Open Source Developer's Guide for using uClinux and the Intel libraries 57 Open Source Developer's Guide for using uClinux and the Intel libraries
58 58
59http://gatewaymaker.sourceforge.net/ 59http://gatewaymaker.sourceforge.net/
@@ -112,21 +112,21 @@ http://www.adiengineering.com/productsCoyote.html
112 Finally, there is an IDE port hanging off the expansion bus. 112 Finally, there is an IDE port hanging off the expansion bus.
113 113
114Gateworks Avila Network Platform 114Gateworks Avila Network Platform
115http://www.gateworks.com/avila_sbc.htm 115http://www.gateworks.com/support/overview.php
116 116
117 The Avila platform is basically and IXDP425 with the 4 PCI slots 117 The Avila platform is basically and IXDP425 with the 4 PCI slots
118 replaced with mini-PCI slots and a CF IDE interface hanging off 118 replaced with mini-PCI slots and a CF IDE interface hanging off
119 the expansion bus. 119 the expansion bus.
120 120
121Intel IXDP425 Development Platform 121Intel IXDP425 Development Platform
122http://developer.intel.com/design/network/products/npfamily/ixdp425.htm 122http://www.intel.com/design/network/products/npfamily/ixdpg425.htm
123 123
124 This is Intel's standard reference platform for the IXDP425 and is 124 This is Intel's standard reference platform for the IXDP425 and is
125 also known as the Richfield board. It contains 4 PCI slots, 16MB 125 also known as the Richfield board. It contains 4 PCI slots, 16MB
126 of flash, two 10/100 ports and one ADSL port. 126 of flash, two 10/100 ports and one ADSL port.
127 127
128Intel IXDP465 Development Platform 128Intel IXDP465 Development Platform
129http://developer.intel.com/design/network/products/npfamily/ixdp465.htm 129http://www.intel.com/design/network/products/npfamily/ixdp465.htm
130 130
131 This is basically an IXDP425 with an IXP465 and 32M of flash instead 131 This is basically an IXDP425 with an IXP465 and 32M of flash instead
132 of just 16. 132 of just 16.
@@ -141,15 +141,13 @@ Intel IXDPG425 Development Platform
141 a pivot_root to NFS. 141 a pivot_root to NFS.
142 142
143Motorola PrPMC1100 Processor Mezanine Card 143Motorola PrPMC1100 Processor Mezanine Card
144http://www.fountainsys.com/datasheet/PrPMC1100.pdf 144http://www.fountainsys.com
145 145
146 The PrPMC1100 is based on the IXCP1100 and is meant to plug into 146 The PrPMC1100 is based on the IXCP1100 and is meant to plug into
147 and IXP2400/2800 system to act as the system controller. It simply 147 and IXP2400/2800 system to act as the system controller. It simply
148 contains a CPU and 16MB of flash on the board and needs to be 148 contains a CPU and 16MB of flash on the board and needs to be
149 plugged into a carrier board to function. Currently Linux only 149 plugged into a carrier board to function. Currently Linux only
150 supports the Motorola PrPMC carrier board for this platform. 150 supports the Motorola PrPMC carrier board for this platform.
151 See https://mcg.motorola.com/us/ds/pdf/ds0144.pdf for info
152 on the carrier board.
153 151
1545. TODO LIST 1525. TODO LIST
155 153
diff --git a/Documentation/arm/README b/Documentation/arm/README
index d98783fbe0c7..aea34095cdcf 100644
--- a/Documentation/arm/README
+++ b/Documentation/arm/README
@@ -41,12 +41,12 @@ Bug reports etc
41--------------- 41---------------
42 42
43 Please send patches to the patch system. For more information, see 43 Please send patches to the patch system. For more information, see
44 http://www.arm.linux.org.uk/patches/info.html Always include some 44 http://www.arm.linux.org.uk/developer/patches/info.php Always include some
45 explanation as to what the patch does and why it is needed. 45 explanation as to what the patch does and why it is needed.
46 46
47 Bug reports should be sent to linux-arm-kernel@lists.arm.linux.org.uk, 47 Bug reports should be sent to linux-arm-kernel@lists.arm.linux.org.uk,
48 or submitted through the web form at 48 or submitted through the web form at
49 http://www.arm.linux.org.uk/forms/solution.shtml 49 http://www.arm.linux.org.uk/developer/
50 50
51 When sending bug reports, please ensure that they contain all relevant 51 When sending bug reports, please ensure that they contain all relevant
52 information, eg. the kernel messages that were printed before/during 52 information, eg. the kernel messages that were printed before/during
diff --git a/Documentation/arm/SA1100/Assabet b/Documentation/arm/SA1100/Assabet
index 91f7ce7ba426..08b885d35674 100644
--- a/Documentation/arm/SA1100/Assabet
+++ b/Documentation/arm/SA1100/Assabet
@@ -2,8 +2,7 @@ The Intel Assabet (SA-1110 evaluation) board
2============================================ 2============================================
3 3
4Please see: 4Please see:
5http://developer.intel.com/design/strong/quicklist/eval-plat/sa-1110.htm 5http://developer.intel.com
6http://developer.intel.com/design/strong/guides/278278.htm
7 6
8Also some notes from John G Dorsey <jd5q@andrew.cmu.edu>: 7Also some notes from John G Dorsey <jd5q@andrew.cmu.edu>:
9http://www.cs.cmu.edu/~wearable/software/assabet.html 8http://www.cs.cmu.edu/~wearable/software/assabet.html
@@ -64,7 +63,7 @@ Initial RedBoot configuration
64----------------------------- 63-----------------------------
65 64
66The commands used here are explained in The RedBoot User's Guide available 65The commands used here are explained in The RedBoot User's Guide available
67on-line at http://sources.redhat.com/ecos/docs-latest/redboot/redboot.html. 66on-line at http://sources.redhat.com/ecos/docs.html.
68Please refer to it for explanations. 67Please refer to it for explanations.
69 68
70If you have a CF network card (my Assabet kit contained a CF+ LP-E from 69If you have a CF network card (my Assabet kit contained a CF+ LP-E from
diff --git a/Documentation/arm/SA1100/Brutus b/Documentation/arm/SA1100/Brutus
index b1cfd405dccc..6a3aa95e9bfd 100644
--- a/Documentation/arm/SA1100/Brutus
+++ b/Documentation/arm/SA1100/Brutus
@@ -1,7 +1,7 @@
1Brutus is an evaluation platform for the SA1100 manufactured by Intel. 1Brutus is an evaluation platform for the SA1100 manufactured by Intel.
2For more details, see: 2For more details, see:
3 3
4http://developer.intel.com/design/strong/applnots/sa1100lx/getstart.htm 4http://developer.intel.com
5 5
6To compile for Brutus, you must issue the following commands: 6To compile for Brutus, you must issue the following commands:
7 7
diff --git a/Documentation/arm/SA1100/FreeBird b/Documentation/arm/SA1100/FreeBird
index eda28b3232e7..ab9193663b2b 100644
--- a/Documentation/arm/SA1100/FreeBird
+++ b/Documentation/arm/SA1100/FreeBird
@@ -1,6 +1,6 @@
1Freebird-1.1 is produced by Legned(C) ,Inc. 1Freebird-1.1 is produced by Legend(C), Inc.
2(http://www.legend.com.cn) 2http://web.archive.org/web/*/http://www.legend.com.cn
3and software/linux mainatined by Coventive(C),Inc. 3and software/linux maintained by Coventive(C), Inc.
4(http://www.coventive.com) 4(http://www.coventive.com)
5 5
6Based on the Nicolas's strongarm kernel tree. 6Based on the Nicolas's strongarm kernel tree.
diff --git a/Documentation/arm/SA1100/GraphicsClient b/Documentation/arm/SA1100/GraphicsClient
index 6c9c4f5a36e1..867bb35943af 100644
--- a/Documentation/arm/SA1100/GraphicsClient
+++ b/Documentation/arm/SA1100/GraphicsClient
@@ -71,7 +71,7 @@ Supported peripherals:
71- serial ports (ttyS[0-2]) 71- serial ports (ttyS[0-2])
72 - ttyS0 is default for serial console 72 - ttyS0 is default for serial console
73- Smart I/O (ADC, keypad, digital inputs, etc) 73- Smart I/O (ADC, keypad, digital inputs, etc)
74 See http://www.applieddata.com/developers/linux for IOCTL documentation 74 See http://www.eurotech-inc.com/linux-sbc.asp for IOCTL documentation
75 and example user space code. ps/2 keybd is multiplexed through this driver 75 and example user space code. ps/2 keybd is multiplexed through this driver
76 76
77To do: 77To do:
diff --git a/Documentation/arm/SA1100/GraphicsMaster b/Documentation/arm/SA1100/GraphicsMaster
index ee7c6595f23f..9145088a0ba2 100644
--- a/Documentation/arm/SA1100/GraphicsMaster
+++ b/Documentation/arm/SA1100/GraphicsMaster
@@ -28,7 +28,7 @@ Supported peripherals:
28- serial ports (ttyS[0-2]) 28- serial ports (ttyS[0-2])
29 - ttyS0 is default for serial console 29 - ttyS0 is default for serial console
30- Smart I/O (ADC, keypad, digital inputs, etc) 30- Smart I/O (ADC, keypad, digital inputs, etc)
31 See http://www.applieddata.com/developers/linux for IOCTL documentation 31 See http://www.eurotech-inc.com/linux-sbc.asp for IOCTL documentation
32 and example user space code. ps/2 keybd is multiplexed through this driver 32 and example user space code. ps/2 keybd is multiplexed through this driver
33 33
34To do: 34To do:
diff --git a/Documentation/arm/SA1100/Itsy b/Documentation/arm/SA1100/Itsy
index 3b594534323b..44b94997fa0d 100644
--- a/Documentation/arm/SA1100/Itsy
+++ b/Documentation/arm/SA1100/Itsy
@@ -4,7 +4,7 @@ research projects at Compaq that are related to pocket computing.
4 4
5For more information, see: 5For more information, see:
6 6
7 http://www.research.digital.com/wrl/itsy/index.html 7 http://www.hpl.hp.com/downloads/crl/itsy/
8 8
9Notes on initial 2.4 Itsy support (8/27/2000) : 9Notes on initial 2.4 Itsy support (8/27/2000) :
10The port was done on an Itsy version 1.5 machine with a daughtercard with 10The port was done on an Itsy version 1.5 machine with a daughtercard with
diff --git a/Documentation/arm/SA1100/PLEB b/Documentation/arm/SA1100/PLEB
index 92cae066908d..b9c8a631a351 100644
--- a/Documentation/arm/SA1100/PLEB
+++ b/Documentation/arm/SA1100/PLEB
@@ -6,6 +6,6 @@ PLEB support has yet to be fully integrated.
6 6
7For more information, see: 7For more information, see:
8 8
9 http://www.cse.unsw.edu.au/~pleb/ 9 http://www.cse.unsw.edu.au
10 10
11 11
diff --git a/Documentation/arm/SA1100/Victor b/Documentation/arm/SA1100/Victor
index f938a29fdc20..9cff415da5a7 100644
--- a/Documentation/arm/SA1100/Victor
+++ b/Documentation/arm/SA1100/Victor
@@ -3,7 +3,7 @@ VisuAide, Inc. to be used by blind people.
3 3
4For more information related to Victor, see: 4For more information related to Victor, see:
5 5
6 http://www.visuaide.com/victor 6 http://www.humanware.com/en-usa/products
7 7
8Of course Victor is using Linux as its main operating system. 8Of course Victor is using Linux as its main operating system.
9The Victor implementation for Linux is maintained by Nicolas Pitre: 9The Victor implementation for Linux is maintained by Nicolas Pitre:
diff --git a/Documentation/arm/SA1100/nanoEngine b/Documentation/arm/SA1100/nanoEngine
index fc431cbfefc2..48a7934f95f6 100644
--- a/Documentation/arm/SA1100/nanoEngine
+++ b/Documentation/arm/SA1100/nanoEngine
@@ -7,5 +7,5 @@ for more info.
7(Ref: Stuart Adams <sja@brightstareng.com>) 7(Ref: Stuart Adams <sja@brightstareng.com>)
8 8
9Also visit Larry Doolittle's "Linux for the nanoEngine" site: 9Also visit Larry Doolittle's "Linux for the nanoEngine" site:
10http://recycle.lbl.gov/~ldoolitt/bse/ 10http://www.brightstareng.com/arm/nanoeng.htm
11 11
diff --git a/Documentation/arm/memory.txt b/Documentation/arm/memory.txt
index eb0fae18ffb1..771d48d3b335 100644
--- a/Documentation/arm/memory.txt
+++ b/Documentation/arm/memory.txt
@@ -33,7 +33,13 @@ ffff0000 ffff0fff CPU vector page.
33 33
34fffe0000 fffeffff XScale cache flush area. This is used 34fffe0000 fffeffff XScale cache flush area. This is used
35 in proc-xscale.S to flush the whole data 35 in proc-xscale.S to flush the whole data
36 cache. Free for other usage on non-XScale. 36 cache. (XScale does not have TCM.)
37
38fffe8000 fffeffff DTCM mapping area for platforms with
39 DTCM mounted inside the CPU.
40
41fffe0000 fffe7fff ITCM mapping area for platforms with
42 ITCM mounted inside the CPU.
37 43
38fff00000 fffdffff Fixmap mapping region. Addresses provided 44fff00000 fffdffff Fixmap mapping region. Addresses provided
39 by fix_to_virt() will be located here. 45 by fix_to_virt() will be located here.
diff --git a/Documentation/arm/msm/gpiomux.txt b/Documentation/arm/msm/gpiomux.txt
new file mode 100644
index 000000000000..67a81620adf6
--- /dev/null
+++ b/Documentation/arm/msm/gpiomux.txt
@@ -0,0 +1,176 @@
1This document provides an overview of the msm_gpiomux interface, which
2is used to provide gpio pin multiplexing and configuration on mach-msm
3targets.
4
5History
6=======
7
8The first-generation API for gpio configuration & multiplexing on msm
9is the function gpio_tlmm_config(). This function has a few notable
10shortcomings, which led to its deprecation and replacement by gpiomux:
11
12The 'disable' parameter: Setting the second parameter to
13gpio_tlmm_config to GPIO_CFG_DISABLE tells the peripheral
14processor in charge of the subsystem to perform a look-up into a
15low-power table and apply the low-power/sleep setting for the pin.
16As the msm family evolved this became problematic. Not all pins
17have sleep settings, not all peripheral processors will accept requests
18to apply said sleep settings, and not all msm targets have their gpio
19subsystems managed by a peripheral processor. In order to get consistent
20behavior on all targets, drivers are forced to ignore this parameter,
21rendering it useless.
22
23The 'direction' flag: for all mux-settings other than raw-gpio (0),
24the output-enable bit of a gpio is hard-wired to a known
25input (usually VDD or ground). For those settings, the direction flag
26is meaningless at best, and deceptive at worst. In addition, using the
27direction flag to change output-enable (OE) directly can cause trouble in
28gpiolib, which has no visibility into gpio direction changes made
29in this way. Direction control in gpio mode should be made through gpiolib.
30
31Key Features of gpiomux
32=======================
33
34- A consistent interface across all generations of msm. Drivers can expect
35the same results on every target.
36- gpiomux plays nicely with gpiolib. Functions that should belong to gpiolib
37are left to gpiolib and not duplicated here. gpiomux is written with the
38intent that gpio_chips will call gpiomux reference-counting methods
39from their request() and free() hooks, providing full integration.
40- Tabular configuration. Instead of having to call gpio_tlmm_config
41hundreds of times, gpio configuration is placed in a single table.
42- Per-gpio sleep. Each gpio is individually reference counted, allowing only
43those lines which are in use to be put in high-power states.
44- 0 means 'do nothing': all flags are designed so that the default memset-zero
45equates to a sensible default of 'no configuration', preventing users
46from having to provide hundreds of 'no-op' configs for unused or
47unwanted lines.
48
49Usage
50=====
51
52To use gpiomux, provide configuration information for relevant gpio lines
53in the msm_gpiomux_configs table. Since a 0 equates to "unconfigured",
54only those lines to be managed by gpiomux need to be specified. Here
55is a completely fictional example:
56
57struct msm_gpiomux_config msm_gpiomux_configs[GPIOMUX_NGPIOS] = {
58 [12] = {
59 .active = GPIOMUX_VALID | GPIOMUX_DRV_8MA | GPIOMUX_FUNC_1,
60 .suspended = GPIOMUX_VALID | GPIOMUX_PULL_DOWN,
61 },
62 [34] = {
63 .suspended = GPIOMUX_VALID | GPIOMUX_PULL_DOWN,
64 },
65};
66
67To indicate that a gpio is in use, call msm_gpiomux_get() to increase
68its reference count. To decrease the reference count, call msm_gpiomux_put().
69
70The effect of this configuration is as follows:
71
72When the system boots, gpios 12 and 34 will be initialized with their
73'suspended' configurations. All other gpios, which were left unconfigured,
74will not be touched.
75
76When msm_gpiomux_get() is called on gpio 12 to raise its reference count
77above 0, its active configuration will be applied. Since no other gpio
78line has a valid active configuration, msm_gpiomux_get() will have no
79effect on any other line.
80
81When msm_gpiomux_put() is called on gpio 12 or 34 to drop their reference
82count to 0, their suspended configurations will be applied.
83Since no other gpio line has a valid suspended configuration, no other
84gpio line will be effected by msm_gpiomux_put(). Since gpio 34 has no valid
85active configuration, this is effectively a no-op for gpio 34 as well,
86with one small caveat, see the section "About Output-Enable Settings".
87
88All of the GPIOMUX_VALID flags may seem like unnecessary overhead, but
89they address some important issues. As unused entries (all those
90except 12 and 34) are zero-filled, gpiomux needs a way to distinguish
91the used fields from the unused. In addition, the all-zero pattern
92is a valid configuration! Therefore, gpiomux defines an additional bit
93which is used to indicate when a field is used. This has the pleasant
94side-effect of allowing calls to msm_gpiomux_write to use '0' to indicate
95that a value should not be changed:
96
97 msm_gpiomux_write(0, GPIOMUX_VALID, 0);
98
99replaces the active configuration of gpio 0 with an all-zero configuration,
100but leaves the suspended configuration as it was.
101
102Static Configurations
103=====================
104
105To install a static configuration, which is applied at boot and does
106not change after that, install a configuration with a suspended component
107but no active component, as in the previous example:
108
109 [34] = {
110 .suspended = GPIOMUX_VALID | GPIOMUX_PULL_DOWN,
111 },
112
113The suspended setting is applied during boot, and the lack of any valid
114active setting prevents any other setting from being applied at runtime.
115If other subsystems attempting to access the line is a concern, one could
116*really* anchor the configuration down by calling msm_gpiomux_get on the
117line at initialization to move the line into active mode. With the line
118held, it will never be re-suspended, and with no valid active configuration,
119no new configurations will be applied.
120
121But then, if having other subsystems grabbing for the line is truly a concern,
122it should be reserved with gpio_request instead, which carries an implicit
123msm_gpiomux_get.
124
125gpiomux and gpiolib
126===================
127
128It is expected that msm gpio_chips will call msm_gpiomux_get() and
129msm_gpiomux_put() from their request and free hooks, like this fictional
130example:
131
132static int request(struct gpio_chip *chip, unsigned offset)
133{
134 return msm_gpiomux_get(chip->base + offset);
135}
136
137static void free(struct gpio_chip *chip, unsigned offset)
138{
139 msm_gpiomux_put(chip->base + offset);
140}
141
142 ...somewhere in a gpio_chip declaration...
143 .request = request,
144 .free = free,
145
146This provides important functionality:
147- It guarantees that a gpio line will have its 'active' config applied
148 when the line is requested, and will not be suspended while the line
149 remains requested; and
150- It guarantees that gpio-direction settings from gpiolib behave sensibly.
151 See "About Output-Enable Settings."
152
153This mechanism allows for "auto-request" of gpiomux lines via gpiolib
154when it is suitable. Drivers wishing more exact control are, of course,
155free to also use msm_gpiomux_set and msm_gpiomux_get.
156
157About Output-Enable Settings
158============================
159
160Some msm targets do not have the ability to query the current gpio
161configuration setting. This means that changes made to the output-enable
162(OE) bit by gpiolib cannot be consistently detected and preserved by gpiomux.
163Therefore, when gpiomux applies a configuration setting, any direction
164settings which may have been applied by gpiolib are lost and the default
165input settings are re-applied.
166
167For this reason, drivers should not assume that gpio direction settings
168continue to hold if they free and then re-request a gpio. This seems like
169common sense - after all, anybody could have obtained the line in the
170meantime - but it needs saying.
171
172This also means that calls to msm_gpiomux_write will reset the OE bit,
173which means that if the gpio line is held by a client of gpiolib and
174msm_gpiomux_write is called, the direction setting has been lost and
175gpiolib's internal state has been broken.
176Release gpio lines before reconfiguring them.
diff --git a/Documentation/arm/tcm.txt b/Documentation/arm/tcm.txt
index 77fd9376e6d7..7c15871c1885 100644
--- a/Documentation/arm/tcm.txt
+++ b/Documentation/arm/tcm.txt
@@ -19,8 +19,8 @@ defines a CPUID_TCM register that you can read out from the
19system control coprocessor. Documentation from ARM can be found 19system control coprocessor. Documentation from ARM can be found
20at http://infocenter.arm.com, search for "TCM Status Register" 20at http://infocenter.arm.com, search for "TCM Status Register"
21to see documents for all CPUs. Reading this register you can 21to see documents for all CPUs. Reading this register you can
22determine if ITCM (bit 0) and/or DTCM (bit 16) is present in the 22determine if ITCM (bits 1-0) and/or DTCM (bit 17-16) is present
23machine. 23in the machine.
24 24
25There is further a TCM region register (search for "TCM Region 25There is further a TCM region register (search for "TCM Region
26Registers" at the ARM site) that can report and modify the location 26Registers" at the ARM site) that can report and modify the location
@@ -35,7 +35,15 @@ The TCM memory can then be remapped to another address again using
35the MMU, but notice that the TCM if often used in situations where 35the MMU, but notice that the TCM if often used in situations where
36the MMU is turned off. To avoid confusion the current Linux 36the MMU is turned off. To avoid confusion the current Linux
37implementation will map the TCM 1 to 1 from physical to virtual 37implementation will map the TCM 1 to 1 from physical to virtual
38memory in the location specified by the machine. 38memory in the location specified by the kernel. Currently Linux
39will map ITCM to 0xfffe0000 and on, and DTCM to 0xfffe8000 and
40on, supporting a maximum of 32KiB of ITCM and 32KiB of DTCM.
41
42Newer versions of the region registers also support dividing these
43TCMs in two separate banks, so for example an 8KiB ITCM is divided
44into two 4KiB banks with its own control registers. The idea is to
45be able to lock and hide one of the banks for use by the secure
46world (TrustZone).
39 47
40TCM is used for a few things: 48TCM is used for a few things:
41 49
@@ -65,18 +73,18 @@ in <asm/tcm.h>. Using this interface it is possible to:
65 memory. Such a heap is great for things like saving 73 memory. Such a heap is great for things like saving
66 device state when shutting off device power domains. 74 device state when shutting off device power domains.
67 75
68A machine that has TCM memory shall select HAVE_TCM in 76A machine that has TCM memory shall select HAVE_TCM from
69arch/arm/Kconfig for itself, and then the 77arch/arm/Kconfig for itself. Code that needs to use TCM shall
70rest of the functionality will depend on the physical 78#include <asm/tcm.h>
71location and size of ITCM and DTCM to be defined in
72mach/memory.h for the machine. Code that needs to use
73TCM shall #include <asm/tcm.h> If the TCM is not located
74at the place given in memory.h it will be moved using
75the TCM Region registers.
76 79
77Functions to go into itcm can be tagged like this: 80Functions to go into itcm can be tagged like this:
78int __tcmfunc foo(int bar); 81int __tcmfunc foo(int bar);
79 82
83Since these are marked to become long_calls and you may want
84to have functions called locally inside the TCM without
85wasting space, there is also the __tcmlocalfunc prefix that
86will make the call relative.
87
80Variables to go into dtcm can be tagged like this: 88Variables to go into dtcm can be tagged like this:
81int __tcmdata foo; 89int __tcmdata foo;
82 90
diff --git a/Documentation/binfmt_misc.txt b/Documentation/binfmt_misc.txt
index f609ebf9c78f..c1ed6948ba80 100644
--- a/Documentation/binfmt_misc.txt
+++ b/Documentation/binfmt_misc.txt
@@ -111,6 +111,6 @@ cause unexpected behaviour and can be a security hazard.
111 111
112 112
113There is a web page about binfmt_misc at 113There is a web page about binfmt_misc at
114http://www.tat.physik.uni-tuebingen.de/~rguenth/linux/binfmt_misc.html 114http://www.tat.physik.uni-tuebingen.de
115 115
116Richard Günther <rguenth@tat.physik.uni-tuebingen.de> 116Richard Günther <rguenth@tat.physik.uni-tuebingen.de>
diff --git a/Documentation/blackfin/00-INDEX b/Documentation/blackfin/00-INDEX
index c34e12440fec..2df0365f2dff 100644
--- a/Documentation/blackfin/00-INDEX
+++ b/Documentation/blackfin/00-INDEX
@@ -1,11 +1,8 @@
100-INDEX 100-INDEX
2 - This file 2 - This file
3 3
4cachefeatures.txt 4bfin-gpio-notes.txt
5 - Supported cache features.
6
7Filesystems
8 - Requirements for mounting the root file system.
9
10bfin-gpio-note.txt
11 - Notes in developing/using bfin-gpio driver. 5 - Notes in developing/using bfin-gpio driver.
6
7bfin-spi-notes.txt
8 - Notes for using bfin spi bus driver.
diff --git a/Documentation/blackfin/Filesystems b/Documentation/blackfin/Filesystems
deleted file mode 100644
index 51260a1b8032..000000000000
--- a/Documentation/blackfin/Filesystems
+++ /dev/null
@@ -1,169 +0,0 @@
1/*
2 * File: Documentation/blackfin/Filesystems
3 * Based on:
4 * Author:
5 *
6 * Created:
7 * Description: This file contains the simple DMA Implementation for Blackfin
8 *
9 * Rev: $Id: Filesystems 2384 2006-11-01 04:12:43Z magicyang $
10 *
11 * Modified:
12 * Copyright 2004-2006 Analog Devices Inc.
13 *
14 * Bugs: Enter bugs at http://blackfin.uclinux.org/
15 *
16 */
17
18 How to mount the root file system in uClinux/Blackfin
19 -----------------------------------------------------
20
211 Mounting EXT3 File system.
22 ------------------------
23
24 Creating an EXT3 File system for uClinux/Blackfin:
25
26
27Please follow the steps to form the EXT3 File system and mount the same as root
28file system.
29
30a Make an ext3 file system as large as you want the final root file
31 system.
32
33 mkfs.ext3 /dev/ram0 <your-rootfs-size-in-1k-blocks>
34
35b Mount this Empty file system on a free directory as:
36
37 mount -t ext3 /dev/ram0 ./test
38 where ./test is the empty directory.
39
40c Copy your root fs directory that you have so carefully made over.
41
42 cp -af /tmp/my_final_rootfs_files/* ./test
43
44 (For ex: cp -af uClinux-dist/romfs/* ./test)
45
46d If you have done everything right till now you should be able to see
47 the required "root" dir's (that's etc, root, bin, lib, sbin...)
48
49e Now unmount the file system
50
51 umount ./test
52
53f Create the root file system image.
54
55 dd if=/dev/ram0 bs=1k count=<your-rootfs-size-in-1k-blocks> \
56 > ext3fs.img
57
58
59Now you have to tell the kernel that will be mounting this file system as
60rootfs.
61So do a make menuconfig under kernel and select the Ext3 journaling file system
62support under File system --> submenu.
63
64
652. Mounting EXT2 File system.
66 -------------------------
67
68By default the ext2 file system image will be created if you invoke make from
69the top uClinux-dist directory.
70
71
723. Mounting CRAMFS File System
73 ----------------------------
74
75To create a CRAMFS file system image execute the command
76
77 mkfs.cramfs ./test cramfs.img
78
79 where ./test is the target directory.
80
81
824. Mounting ROMFS File System
83 --------------------------
84
85To create a ROMFS file system image execute the command
86
87 genromfs -v -V "ROMdisk" -f romfs.img -d ./test
88
89 where ./test is the target directory
90
91
925. Mounting the JFFS2 Filesystem
93 -----------------------------
94
95To create a compressed JFFS filesystem (JFFS2), please execute the command
96
97 mkfs.jffs2 -d ./test -o jffs2.img
98
99 where ./test is the target directory.
100
101However, please make sure the following is in your kernel config.
102
103/*
104 * RAM/ROM/Flash chip drivers
105 */
106#define CONFIG_MTD_CFI 1
107#define CONFIG_MTD_ROM 1
108/*
109 * Mapping drivers for chip access
110 */
111#define CONFIG_MTD_COMPLEX_MAPPINGS 1
112#define CONFIG_MTD_BF533 1
113#undef CONFIG_MTD_UCLINUX
114
115Through the u-boot boot loader, use the jffs2.img in the corresponding
116partition made in linux-2.6.x/drivers/mtd/maps/bf533_flash.c.
117
118NOTE - Currently the Flash driver is available only for EZKIT. Watch out for a
119 STAMP driver soon.
120
121
1226. Mounting the NFS File system
123 -----------------------------
124
125 For mounting the NFS please do the following in the kernel config.
126
127 In Networking Support --> Networking options --> TCP/IP networking -->
128 IP: kernel level autoconfiguration
129
130 Enable BOOTP Support.
131
132 In Kernel hacking --> Compiled-in kernel boot parameter add the following
133
134 root=/dev/nfs rw ip=bootp
135
136 In File system --> Network File system, Enable
137
138 NFS file system support --> NFSv3 client support
139 Root File system on NFS
140
141 in uClibc menuconfig, do the following
142 In Networking Support
143 enable Remote Procedure Call (RPC) support
144 Full RPC Support
145
146 On the Host side, ensure that /etc/dhcpd.conf looks something like this
147
148 ddns-update-style ad-hoc;
149 allow bootp;
150 subnet 10.100.4.0 netmask 255.255.255.0 {
151 default-lease-time 122209600;
152 max-lease-time 31557600;
153 group {
154 host bf533 {
155 hardware ethernet 00:CF:52:49:C3:01;
156 fixed-address 10.100.4.50;
157 option root-path "/home/nfsmount";
158 }
159 }
160
161 ensure that /etc/exports looks something like this
162 /home/nfsmount *(rw,no_root_squash,no_all_squash)
163
164 run the following commands as root (may differ depending on your
165 distribution) :
166 - service nfs start
167 - service portmap start
168 - service dhcpd start
169 - /usr/sbin/exportfs
diff --git a/Documentation/blackfin/bfin-spi-notes.txt b/Documentation/blackfin/bfin-spi-notes.txt
new file mode 100644
index 000000000000..556fa877f2e8
--- /dev/null
+++ b/Documentation/blackfin/bfin-spi-notes.txt
@@ -0,0 +1,14 @@
1SPI Chip Select behavior:
2
3With the Blackfin on-chip SPI peripheral, there is some logic tied to the CPHA
4bit whether the Slave Select Line is controlled by hardware (CPHA=0) or
5controlled by software (CPHA=1). However, the Linux SPI bus driver assumes that
6the Slave Select is always under software control and being asserted during
7the entire SPI transfer. - And not just bits_per_word duration.
8
9In most cases you can utilize SPI MODE_3 instead of MODE_0 to work-around this
10behavior. If your SPI slave device in question requires SPI MODE_0 or MODE_2
11timing, you can utilize the GPIO controlled SPI Slave Select option instead.
12
13You can even use the same pin whose peripheral role is a SSEL,
14but use it as a GPIO instead.
diff --git a/Documentation/blackfin/cachefeatures.txt b/Documentation/blackfin/cachefeatures.txt
deleted file mode 100644
index 75de51f94515..000000000000
--- a/Documentation/blackfin/cachefeatures.txt
+++ /dev/null
@@ -1,55 +0,0 @@
1/*
2 * File: Documentation/blackfin/cachefeatures.txt
3 * Based on:
4 * Author:
5 *
6 * Created:
7 * Description: This file contains the simple DMA Implementation for Blackfin
8 *
9 * Rev: $Id: cachefeatures.txt 2384 2006-11-01 04:12:43Z magicyang $
10 *
11 * Modified:
12 * Copyright 2004-2006 Analog Devices Inc.
13 *
14 * Bugs: Enter bugs at http://blackfin.uclinux.org/
15 *
16 */
17
18 - Instruction and Data cache initialization.
19 icache_init();
20 dcache_init();
21
22 - Instruction and Data cache Invalidation Routines, when flushing the
23 same is not required.
24 _icache_invalidate();
25 _dcache_invalidate();
26
27 Also, for invalidating the entire instruction and data cache, the below
28 routines are provided (another method for invalidation, refer page no 267 and 287 of
29 ADSP-BF533 Hardware Reference manual)
30
31 invalidate_entire_dcache();
32 invalidate_entire_icache();
33
34 -External Flushing of Instruction and data cache routines.
35
36 flush_instruction_cache();
37 flush_data_cache();
38
39 - Internal Flushing of Instruction and Data Cache.
40
41 icplb_flush();
42 dcplb_flush();
43
44 - Miscellaneous cache functions.
45
46 flush_cache_all();
47 flush_cache_mm();
48 invalidate_dcache_range();
49 flush_dcache_range();
50 flush_dcache_page();
51 flush_cache_range();
52 flush_cache_page();
53 invalidate_dcache_range();
54 flush_page_to_ram();
55
diff --git a/Documentation/block/00-INDEX b/Documentation/block/00-INDEX
index a406286f6f3e..d111e3b23db0 100644
--- a/Documentation/block/00-INDEX
+++ b/Documentation/block/00-INDEX
@@ -1,7 +1,5 @@
100-INDEX 100-INDEX
2 - This file 2 - This file
3barrier.txt
4 - I/O Barriers
5biodoc.txt 3biodoc.txt
6 - Notes on the Generic Block Layer Rewrite in Linux 2.5 4 - Notes on the Generic Block Layer Rewrite in Linux 2.5
7capability.txt 5capability.txt
@@ -16,3 +14,5 @@ stat.txt
16 - Block layer statistics in /sys/block/<dev>/stat 14 - Block layer statistics in /sys/block/<dev>/stat
17switching-sched.txt 15switching-sched.txt
18 - Switching I/O schedulers at runtime 16 - Switching I/O schedulers at runtime
17writeback_cache_control.txt
18 - Control of volatile write back caches
diff --git a/Documentation/block/barrier.txt b/Documentation/block/barrier.txt
deleted file mode 100644
index 2c2f24f634e4..000000000000
--- a/Documentation/block/barrier.txt
+++ /dev/null
@@ -1,261 +0,0 @@
1I/O Barriers
2============
3Tejun Heo <htejun@gmail.com>, July 22 2005
4
5I/O barrier requests are used to guarantee ordering around the barrier
6requests. Unless you're crazy enough to use disk drives for
7implementing synchronization constructs (wow, sounds interesting...),
8the ordering is meaningful only for write requests for things like
9journal checkpoints. All requests queued before a barrier request
10must be finished (made it to the physical medium) before the barrier
11request is started, and all requests queued after the barrier request
12must be started only after the barrier request is finished (again,
13made it to the physical medium).
14
15In other words, I/O barrier requests have the following two properties.
16
171. Request ordering
18
19Requests cannot pass the barrier request. Preceding requests are
20processed before the barrier and following requests after.
21
22Depending on what features a drive supports, this can be done in one
23of the following three ways.
24
25i. For devices which have queue depth greater than 1 (TCQ devices) and
26support ordered tags, block layer can just issue the barrier as an
27ordered request and the lower level driver, controller and drive
28itself are responsible for making sure that the ordering constraint is
29met. Most modern SCSI controllers/drives should support this.
30
31NOTE: SCSI ordered tag isn't currently used due to limitation in the
32 SCSI midlayer, see the following random notes section.
33
34ii. For devices which have queue depth greater than 1 but don't
35support ordered tags, block layer ensures that the requests preceding
36a barrier request finishes before issuing the barrier request. Also,
37it defers requests following the barrier until the barrier request is
38finished. Older SCSI controllers/drives and SATA drives fall in this
39category.
40
41iii. Devices which have queue depth of 1. This is a degenerate case
42of ii. Just keeping issue order suffices. Ancient SCSI
43controllers/drives and IDE drives are in this category.
44
452. Forced flushing to physical medium
46
47Again, if you're not gonna do synchronization with disk drives (dang,
48it sounds even more appealing now!), the reason you use I/O barriers
49is mainly to protect filesystem integrity when power failure or some
50other events abruptly stop the drive from operating and possibly make
51the drive lose data in its cache. So, I/O barriers need to guarantee
52that requests actually get written to non-volatile medium in order.
53
54There are four cases,
55
56i. No write-back cache. Keeping requests ordered is enough.
57
58ii. Write-back cache but no flush operation. There's no way to
59guarantee physical-medium commit order. This kind of devices can't to
60I/O barriers.
61
62iii. Write-back cache and flush operation but no FUA (forced unit
63access). We need two cache flushes - before and after the barrier
64request.
65
66iv. Write-back cache, flush operation and FUA. We still need one
67flush to make sure requests preceding a barrier are written to medium,
68but post-barrier flush can be avoided by using FUA write on the
69barrier itself.
70
71
72How to support barrier requests in drivers
73------------------------------------------
74
75All barrier handling is done inside block layer proper. All low level
76drivers have to are implementing its prepare_flush_fn and using one
77the following two functions to indicate what barrier type it supports
78and how to prepare flush requests. Note that the term 'ordered' is
79used to indicate the whole sequence of performing barrier requests
80including draining and flushing.
81
82typedef void (prepare_flush_fn)(struct request_queue *q, struct request *rq);
83
84int blk_queue_ordered(struct request_queue *q, unsigned ordered,
85 prepare_flush_fn *prepare_flush_fn);
86
87@q : the queue in question
88@ordered : the ordered mode the driver/device supports
89@prepare_flush_fn : this function should prepare @rq such that it
90 flushes cache to physical medium when executed
91
92For example, SCSI disk driver's prepare_flush_fn looks like the
93following.
94
95static void sd_prepare_flush(struct request_queue *q, struct request *rq)
96{
97 memset(rq->cmd, 0, sizeof(rq->cmd));
98 rq->cmd_type = REQ_TYPE_BLOCK_PC;
99 rq->timeout = SD_TIMEOUT;
100 rq->cmd[0] = SYNCHRONIZE_CACHE;
101 rq->cmd_len = 10;
102}
103
104The following seven ordered modes are supported. The following table
105shows which mode should be used depending on what features a
106device/driver supports. In the leftmost column of table,
107QUEUE_ORDERED_ prefix is omitted from the mode names to save space.
108
109The table is followed by description of each mode. Note that in the
110descriptions of QUEUE_ORDERED_DRAIN*, '=>' is used whereas '->' is
111used for QUEUE_ORDERED_TAG* descriptions. '=>' indicates that the
112preceding step must be complete before proceeding to the next step.
113'->' indicates that the next step can start as soon as the previous
114step is issued.
115
116 write-back cache ordered tag flush FUA
117-----------------------------------------------------------------------
118NONE yes/no N/A no N/A
119DRAIN no no N/A N/A
120DRAIN_FLUSH yes no yes no
121DRAIN_FUA yes no yes yes
122TAG no yes N/A N/A
123TAG_FLUSH yes yes yes no
124TAG_FUA yes yes yes yes
125
126
127QUEUE_ORDERED_NONE
128 I/O barriers are not needed and/or supported.
129
130 Sequence: N/A
131
132QUEUE_ORDERED_DRAIN
133 Requests are ordered by draining the request queue and cache
134 flushing isn't needed.
135
136 Sequence: drain => barrier
137
138QUEUE_ORDERED_DRAIN_FLUSH
139 Requests are ordered by draining the request queue and both
140 pre-barrier and post-barrier cache flushings are needed.
141
142 Sequence: drain => preflush => barrier => postflush
143
144QUEUE_ORDERED_DRAIN_FUA
145 Requests are ordered by draining the request queue and
146 pre-barrier cache flushing is needed. By using FUA on barrier
147 request, post-barrier flushing can be skipped.
148
149 Sequence: drain => preflush => barrier
150
151QUEUE_ORDERED_TAG
152 Requests are ordered by ordered tag and cache flushing isn't
153 needed.
154
155 Sequence: barrier
156
157QUEUE_ORDERED_TAG_FLUSH
158 Requests are ordered by ordered tag and both pre-barrier and
159 post-barrier cache flushings are needed.
160
161 Sequence: preflush -> barrier -> postflush
162
163QUEUE_ORDERED_TAG_FUA
164 Requests are ordered by ordered tag and pre-barrier cache
165 flushing is needed. By using FUA on barrier request,
166 post-barrier flushing can be skipped.
167
168 Sequence: preflush -> barrier
169
170
171Random notes/caveats
172--------------------
173
174* SCSI layer currently can't use TAG ordering even if the drive,
175controller and driver support it. The problem is that SCSI midlayer
176request dispatch function is not atomic. It releases queue lock and
177switch to SCSI host lock during issue and it's possible and likely to
178happen in time that requests change their relative positions. Once
179this problem is solved, TAG ordering can be enabled.
180
181* Currently, no matter which ordered mode is used, there can be only
182one barrier request in progress. All I/O barriers are held off by
183block layer until the previous I/O barrier is complete. This doesn't
184make any difference for DRAIN ordered devices, but, for TAG ordered
185devices with very high command latency, passing multiple I/O barriers
186to low level *might* be helpful if they are very frequent. Well, this
187certainly is a non-issue. I'm writing this just to make clear that no
188two I/O barrier is ever passed to low-level driver.
189
190* Completion order. Requests in ordered sequence are issued in order
191but not required to finish in order. Barrier implementation can
192handle out-of-order completion of ordered sequence. IOW, the requests
193MUST be processed in order but the hardware/software completion paths
194are allowed to reorder completion notifications - eg. current SCSI
195midlayer doesn't preserve completion order during error handling.
196
197* Requeueing order. Low-level drivers are free to requeue any request
198after they removed it from the request queue with
199blkdev_dequeue_request(). As barrier sequence should be kept in order
200when requeued, generic elevator code takes care of putting requests in
201order around barrier. See blk_ordered_req_seq() and
202ELEVATOR_INSERT_REQUEUE handling in __elv_add_request() for details.
203
204Note that block drivers must not requeue preceding requests while
205completing latter requests in an ordered sequence. Currently, no
206error checking is done against this.
207
208* Error handling. Currently, block layer will report error to upper
209layer if any of requests in an ordered sequence fails. Unfortunately,
210this doesn't seem to be enough. Look at the following request flow.
211QUEUE_ORDERED_TAG_FLUSH is in use.
212
213 [0] [1] [2] [3] [pre] [barrier] [post] < [4] [5] [6] ... >
214 still in elevator
215
216Let's say request [2], [3] are write requests to update file system
217metadata (journal or whatever) and [barrier] is used to mark that
218those updates are valid. Consider the following sequence.
219
220 i. Requests [0] ~ [post] leaves the request queue and enters
221 low-level driver.
222 ii. After a while, unfortunately, something goes wrong and the
223 drive fails [2]. Note that any of [0], [1] and [3] could have
224 completed by this time, but [pre] couldn't have been finished
225 as the drive must process it in order and it failed before
226 processing that command.
227 iii. Error handling kicks in and determines that the error is
228 unrecoverable and fails [2], and resumes operation.
229 iv. [pre] [barrier] [post] gets processed.
230 v. *BOOM* power fails
231
232The problem here is that the barrier request is *supposed* to indicate
233that filesystem update requests [2] and [3] made it safely to the
234physical medium and, if the machine crashes after the barrier is
235written, filesystem recovery code can depend on that. Sadly, that
236isn't true in this case anymore. IOW, the success of a I/O barrier
237should also be dependent on success of some of the preceding requests,
238where only upper layer (filesystem) knows what 'some' is.
239
240This can be solved by implementing a way to tell the block layer which
241requests affect the success of the following barrier request and
242making lower lever drivers to resume operation on error only after
243block layer tells it to do so.
244
245As the probability of this happening is very low and the drive should
246be faulty, implementing the fix is probably an overkill. But, still,
247it's there.
248
249* In previous drafts of barrier implementation, there was fallback
250mechanism such that, if FUA or ordered TAG fails, less fancy ordered
251mode can be selected and the failed barrier request is retried
252automatically. The rationale for this feature was that as FUA is
253pretty new in ATA world and ordered tag was never used widely, there
254could be devices which report to support those features but choke when
255actually given such requests.
256
257 This was removed for two reasons 1. it's an overkill 2. it's
258impossible to implement properly when TAG ordering is used as low
259level drivers resume after an error automatically. If it's ever
260needed adding it back and modifying low level drivers accordingly
261shouldn't be difficult.
diff --git a/Documentation/block/biodoc.txt b/Documentation/block/biodoc.txt
index 508b5b2b0289..b9a83dd24732 100644
--- a/Documentation/block/biodoc.txt
+++ b/Documentation/block/biodoc.txt
@@ -7,7 +7,7 @@ Notes Written on Jan 15, 2002:
7 7
8Last Updated May 2, 2002 8Last Updated May 2, 2002
9September 2003: Updated I/O Scheduler portions 9September 2003: Updated I/O Scheduler portions
10 Nick Piggin <piggin@cyberone.com.au> 10 Nick Piggin <npiggin@kernel.dk>
11 11
12Introduction: 12Introduction:
13 13
diff --git a/Documentation/block/cfq-iosched.txt b/Documentation/block/cfq-iosched.txt
new file mode 100644
index 000000000000..e578feed6d81
--- /dev/null
+++ b/Documentation/block/cfq-iosched.txt
@@ -0,0 +1,45 @@
1CFQ ioscheduler tunables
2========================
3
4slice_idle
5----------
6This specifies how long CFQ should idle for next request on certain cfq queues
7(for sequential workloads) and service trees (for random workloads) before
8queue is expired and CFQ selects next queue to dispatch from.
9
10By default slice_idle is a non-zero value. That means by default we idle on
11queues/service trees. This can be very helpful on highly seeky media like
12single spindle SATA/SAS disks where we can cut down on overall number of
13seeks and see improved throughput.
14
15Setting slice_idle to 0 will remove all the idling on queues/service tree
16level and one should see an overall improved throughput on faster storage
17devices like multiple SATA/SAS disks in hardware RAID configuration. The down
18side is that isolation provided from WRITES also goes down and notion of
19IO priority becomes weaker.
20
21So depending on storage and workload, it might be useful to set slice_idle=0.
22In general I think for SATA/SAS disks and software RAID of SATA/SAS disks
23keeping slice_idle enabled should be useful. For any configurations where
24there are multiple spindles behind single LUN (Host based hardware RAID
25controller or for storage arrays), setting slice_idle=0 might end up in better
26throughput and acceptable latencies.
27
28CFQ IOPS Mode for group scheduling
29===================================
30Basic CFQ design is to provide priority based time slices. Higher priority
31process gets bigger time slice and lower priority process gets smaller time
32slice. Measuring time becomes harder if storage is fast and supports NCQ and
33it would be better to dispatch multiple requests from multiple cfq queues in
34request queue at a time. In such scenario, it is not possible to measure time
35consumed by single queue accurately.
36
37What is possible though is to measure number of requests dispatched from a
38single queue and also allow dispatch from multiple cfq queue at the same time.
39This effectively becomes the fairness in terms of IOPS (IO operations per
40second).
41
42If one sets slice_idle=0 and if storage supports NCQ, CFQ internally switches
43to IOPS mode and starts providing fairness in terms of number of requests
44dispatched. Note that this mode switching takes effect only for group
45scheduling. For non-cgroup users nothing should change.
diff --git a/Documentation/block/writeback_cache_control.txt b/Documentation/block/writeback_cache_control.txt
new file mode 100644
index 000000000000..83407d36630a
--- /dev/null
+++ b/Documentation/block/writeback_cache_control.txt
@@ -0,0 +1,86 @@
1
2Explicit volatile write back cache control
3=====================================
4
5Introduction
6------------
7
8Many storage devices, especially in the consumer market, come with volatile
9write back caches. That means the devices signal I/O completion to the
10operating system before data actually has hit the non-volatile storage. This
11behavior obviously speeds up various workloads, but it means the operating
12system needs to force data out to the non-volatile storage when it performs
13a data integrity operation like fsync, sync or an unmount.
14
15The Linux block layer provides two simple mechanisms that let filesystems
16control the caching behavior of the storage device. These mechanisms are
17a forced cache flush, and the Force Unit Access (FUA) flag for requests.
18
19
20Explicit cache flushes
21----------------------
22
23The REQ_FLUSH flag can be OR ed into the r/w flags of a bio submitted from
24the filesystem and will make sure the volatile cache of the storage device
25has been flushed before the actual I/O operation is started. This explicitly
26guarantees that previously completed write requests are on non-volatile
27storage before the flagged bio starts. In addition the REQ_FLUSH flag can be
28set on an otherwise empty bio structure, which causes only an explicit cache
29flush without any dependent I/O. It is recommend to use
30the blkdev_issue_flush() helper for a pure cache flush.
31
32
33Forced Unit Access
34-----------------
35
36The REQ_FUA flag can be OR ed into the r/w flags of a bio submitted from the
37filesystem and will make sure that I/O completion for this request is only
38signaled after the data has been committed to non-volatile storage.
39
40
41Implementation details for filesystems
42--------------------------------------
43
44Filesystems can simply set the REQ_FLUSH and REQ_FUA bits and do not have to
45worry if the underlying devices need any explicit cache flushing and how
46the Forced Unit Access is implemented. The REQ_FLUSH and REQ_FUA flags
47may both be set on a single bio.
48
49
50Implementation details for make_request_fn based block drivers
51--------------------------------------------------------------
52
53These drivers will always see the REQ_FLUSH and REQ_FUA bits as they sit
54directly below the submit_bio interface. For remapping drivers the REQ_FUA
55bits need to be propagated to underlying devices, and a global flush needs
56to be implemented for bios with the REQ_FLUSH bit set. For real device
57drivers that do not have a volatile cache the REQ_FLUSH and REQ_FUA bits
58on non-empty bios can simply be ignored, and REQ_FLUSH requests without
59data can be completed successfully without doing any work. Drivers for
60devices with volatile caches need to implement the support for these
61flags themselves without any help from the block layer.
62
63
64Implementation details for request_fn based block drivers
65--------------------------------------------------------------
66
67For devices that do not support volatile write caches there is no driver
68support required, the block layer completes empty REQ_FLUSH requests before
69entering the driver and strips off the REQ_FLUSH and REQ_FUA bits from
70requests that have a payload. For devices with volatile write caches the
71driver needs to tell the block layer that it supports flushing caches by
72doing:
73
74 blk_queue_flush(sdkp->disk->queue, REQ_FLUSH);
75
76and handle empty REQ_FLUSH requests in its prep_fn/request_fn. Note that
77REQ_FLUSH requests with a payload are automatically turned into a sequence
78of an empty REQ_FLUSH request followed by the actual write by the block
79layer. For devices that also support the FUA bit the block layer needs
80to be told to pass through the REQ_FUA bit using:
81
82 blk_queue_flush(sdkp->disk->queue, REQ_FLUSH | REQ_FUA);
83
84and the driver must handle write requests that have the REQ_FUA bit set
85in prep_fn/request_fn. If the FUA bit is not natively supported the block
86layer turns it into an empty REQ_FLUSH request after the actual write.
diff --git a/Documentation/blockdev/paride.txt b/Documentation/blockdev/paride.txt
index e4312676bdda..ee6717e3771d 100644
--- a/Documentation/blockdev/paride.txt
+++ b/Documentation/blockdev/paride.txt
@@ -412,6 +412,6 @@ have in your mail headers, when sending mail to the list server.
412You might also find some useful information on the linux-parport 412You might also find some useful information on the linux-parport
413web pages (although they are not always up to date) at 413web pages (although they are not always up to date) at
414 414
415 http://www.torque.net/parport/ 415 http://web.archive.org/web/*/http://www.torque.net/parport/
416 416
417 417
diff --git a/Documentation/cdrom/packet-writing.txt b/Documentation/cdrom/packet-writing.txt
index 1c407778c8b2..13c251d5add6 100644
--- a/Documentation/cdrom/packet-writing.txt
+++ b/Documentation/cdrom/packet-writing.txt
@@ -95,7 +95,7 @@ Using the pktcdvd sysfs interface
95 95
96Since Linux 2.6.20, the pktcdvd module has a sysfs interface 96Since Linux 2.6.20, the pktcdvd module has a sysfs interface
97and can be controlled by it. For example the "pktcdvd" tool uses 97and can be controlled by it. For example the "pktcdvd" tool uses
98this interface. (see http://people.freenet.de/BalaGi#pktcdvd ) 98this interface. (see http://tom.ist-im-web.de/download/pktcdvd )
99 99
100"pktcdvd" works similar to "pktsetup", e.g.: 100"pktcdvd" works similar to "pktsetup", e.g.:
101 101
diff --git a/Documentation/cgroups/blkio-controller.txt b/Documentation/cgroups/blkio-controller.txt
index 48e0b21b0059..d6da611f8f63 100644
--- a/Documentation/cgroups/blkio-controller.txt
+++ b/Documentation/cgroups/blkio-controller.txt
@@ -8,12 +8,17 @@ both at leaf nodes as well as at intermediate nodes in a storage hierarchy.
8Plan is to use the same cgroup based management interface for blkio controller 8Plan is to use the same cgroup based management interface for blkio controller
9and based on user options switch IO policies in the background. 9and based on user options switch IO policies in the background.
10 10
11In the first phase, this patchset implements proportional weight time based 11Currently two IO control policies are implemented. First one is proportional
12division of disk policy. It is implemented in CFQ. Hence this policy takes 12weight time based division of disk policy. It is implemented in CFQ. Hence
13effect only on leaf nodes when CFQ is being used. 13this policy takes effect only on leaf nodes when CFQ is being used. The second
14one is throttling policy which can be used to specify upper IO rate limits
15on devices. This policy is implemented in generic block layer and can be
16used on leaf nodes as well as higher level logical devices like device mapper.
14 17
15HOWTO 18HOWTO
16===== 19=====
20Proportional Weight division of bandwidth
21-----------------------------------------
17You can do a very simple testing of running two dd threads in two different 22You can do a very simple testing of running two dd threads in two different
18cgroups. Here is what you can do. 23cgroups. Here is what you can do.
19 24
@@ -55,6 +60,35 @@ cgroups. Here is what you can do.
55 group dispatched to the disk. We provide fairness in terms of disk time, so 60 group dispatched to the disk. We provide fairness in terms of disk time, so
56 ideally io.disk_time of cgroups should be in proportion to the weight. 61 ideally io.disk_time of cgroups should be in proportion to the weight.
57 62
63Throttling/Upper Limit policy
64-----------------------------
65- Enable Block IO controller
66 CONFIG_BLK_CGROUP=y
67
68- Enable throttling in block layer
69 CONFIG_BLK_DEV_THROTTLING=y
70
71- Mount blkio controller
72 mount -t cgroup -o blkio none /cgroup/blkio
73
74- Specify a bandwidth rate on particular device for root group. The format
75 for policy is "<major>:<minor> <byes_per_second>".
76
77 echo "8:16 1048576" > /cgroup/blkio/blkio.read_bps_device
78
79 Above will put a limit of 1MB/second on reads happening for root group
80 on device having major/minor number 8:16.
81
82- Run dd to read a file and see if rate is throttled to 1MB/s or not.
83
84 # dd if=/mnt/common/zerofile of=/dev/null bs=4K count=1024
85 # iflag=direct
86 1024+0 records in
87 1024+0 records out
88 4194304 bytes (4.2 MB) copied, 4.0001 s, 1.0 MB/s
89
90 Limits for writes can be put using blkio.write_bps_device file.
91
58Various user visible config options 92Various user visible config options
59=================================== 93===================================
60CONFIG_BLK_CGROUP 94CONFIG_BLK_CGROUP
@@ -68,8 +102,13 @@ CONFIG_CFQ_GROUP_IOSCHED
68 - Enables group scheduling in CFQ. Currently only 1 level of group 102 - Enables group scheduling in CFQ. Currently only 1 level of group
69 creation is allowed. 103 creation is allowed.
70 104
105CONFIG_BLK_DEV_THROTTLING
106 - Enable block device throttling support in block layer.
107
71Details of cgroup files 108Details of cgroup files
72======================= 109=======================
110Proportional weight policy files
111--------------------------------
73- blkio.weight 112- blkio.weight
74 - Specifies per cgroup weight. This is default weight of the group 113 - Specifies per cgroup weight. This is default weight of the group
75 on all the devices until and unless overridden by per device rule. 114 on all the devices until and unless overridden by per device rule.
@@ -210,6 +249,67 @@ Details of cgroup files
210 and minor number of the device and third field specifies the number 249 and minor number of the device and third field specifies the number
211 of times a group was dequeued from a particular device. 250 of times a group was dequeued from a particular device.
212 251
252Throttling/Upper limit policy files
253-----------------------------------
254- blkio.throttle.read_bps_device
255 - Specifies upper limit on READ rate from the device. IO rate is
256 specified in bytes per second. Rules are per deivce. Following is
257 the format.
258
259 echo "<major>:<minor> <rate_bytes_per_second>" > /cgrp/blkio.read_bps_device
260
261- blkio.throttle.write_bps_device
262 - Specifies upper limit on WRITE rate to the device. IO rate is
263 specified in bytes per second. Rules are per deivce. Following is
264 the format.
265
266 echo "<major>:<minor> <rate_bytes_per_second>" > /cgrp/blkio.write_bps_device
267
268- blkio.throttle.read_iops_device
269 - Specifies upper limit on READ rate from the device. IO rate is
270 specified in IO per second. Rules are per deivce. Following is
271 the format.
272
273 echo "<major>:<minor> <rate_io_per_second>" > /cgrp/blkio.read_iops_device
274
275- blkio.throttle.write_iops_device
276 - Specifies upper limit on WRITE rate to the device. IO rate is
277 specified in io per second. Rules are per deivce. Following is
278 the format.
279
280 echo "<major>:<minor> <rate_io_per_second>" > /cgrp/blkio.write_iops_device
281
282Note: If both BW and IOPS rules are specified for a device, then IO is
283 subjectd to both the constraints.
284
285- blkio.throttle.io_serviced
286 - Number of IOs (bio) completed to/from the disk by the group (as
287 seen by throttling policy). These are further divided by the type
288 of operation - read or write, sync or async. First two fields specify
289 the major and minor number of the device, third field specifies the
290 operation type and the fourth field specifies the number of IOs.
291
292 blkio.io_serviced does accounting as seen by CFQ and counts are in
293 number of requests (struct request). On the other hand,
294 blkio.throttle.io_serviced counts number of IO in terms of number
295 of bios as seen by throttling policy. These bios can later be
296 merged by elevator and total number of requests completed can be
297 lesser.
298
299- blkio.throttle.io_service_bytes
300 - Number of bytes transferred to/from the disk by the group. These
301 are further divided by the type of operation - read or write, sync
302 or async. First two fields specify the major and minor number of the
303 device, third field specifies the operation type and the fourth field
304 specifies the number of bytes.
305
306 These numbers should roughly be same as blkio.io_service_bytes as
307 updated by CFQ. The difference between two is that
308 blkio.io_service_bytes will not be updated if CFQ is not operating
309 on request queue.
310
311Common files among various policies
312-----------------------------------
213- blkio.reset_stats 313- blkio.reset_stats
214 - Writing an int to this file will result in resetting all the stats 314 - Writing an int to this file will result in resetting all the stats
215 for that cgroup. 315 for that cgroup.
@@ -217,6 +317,7 @@ Details of cgroup files
217CFQ sysfs tunable 317CFQ sysfs tunable
218================= 318=================
219/sys/block/<disk>/queue/iosched/group_isolation 319/sys/block/<disk>/queue/iosched/group_isolation
320-----------------------------------------------
220 321
221If group_isolation=1, it provides stronger isolation between groups at the 322If group_isolation=1, it provides stronger isolation between groups at the
222expense of throughput. By default group_isolation is 0. In general that 323expense of throughput. By default group_isolation is 0. In general that
@@ -243,6 +344,33 @@ By default one should run with group_isolation=0. If that is not sufficient
243and one wants stronger isolation between groups, then set group_isolation=1 344and one wants stronger isolation between groups, then set group_isolation=1
244but this will come at cost of reduced throughput. 345but this will come at cost of reduced throughput.
245 346
347/sys/block/<disk>/queue/iosched/slice_idle
348------------------------------------------
349On a faster hardware CFQ can be slow, especially with sequential workload.
350This happens because CFQ idles on a single queue and single queue might not
351drive deeper request queue depths to keep the storage busy. In such scenarios
352one can try setting slice_idle=0 and that would switch CFQ to IOPS
353(IO operations per second) mode on NCQ supporting hardware.
354
355That means CFQ will not idle between cfq queues of a cfq group and hence be
356able to driver higher queue depth and achieve better throughput. That also
357means that cfq provides fairness among groups in terms of IOPS and not in
358terms of disk time.
359
360/sys/block/<disk>/queue/iosched/group_idle
361------------------------------------------
362If one disables idling on individual cfq queues and cfq service trees by
363setting slice_idle=0, group_idle kicks in. That means CFQ will still idle
364on the group in an attempt to provide fairness among groups.
365
366By default group_idle is same as slice_idle and does not do anything if
367slice_idle is enabled.
368
369One can experience an overall throughput drop if you have created multiple
370groups and put applications in that group which are not driving enough
371IO to keep disk busy. In that case set group_idle=0, and CFQ will not idle
372on individual groups and throughput should improve.
373
246What works 374What works
247========== 375==========
248- Currently only sync IO queues are support. All the buffered writes are 376- Currently only sync IO queues are support. All the buffered writes are
diff --git a/Documentation/cgroups/cgroups.txt b/Documentation/cgroups/cgroups.txt
index b34823ff1646..190018b0c649 100644
--- a/Documentation/cgroups/cgroups.txt
+++ b/Documentation/cgroups/cgroups.txt
@@ -18,7 +18,8 @@ CONTENTS:
18 1.2 Why are cgroups needed ? 18 1.2 Why are cgroups needed ?
19 1.3 How are cgroups implemented ? 19 1.3 How are cgroups implemented ?
20 1.4 What does notify_on_release do ? 20 1.4 What does notify_on_release do ?
21 1.5 How do I use cgroups ? 21 1.5 What does clone_children do ?
22 1.6 How do I use cgroups ?
222. Usage Examples and Syntax 232. Usage Examples and Syntax
23 2.1 Basic Usage 24 2.1 Basic Usage
24 2.2 Attaching processes 25 2.2 Attaching processes
@@ -293,7 +294,16 @@ notify_on_release in the root cgroup at system boot is disabled
293value of their parents notify_on_release setting. The default value of 294value of their parents notify_on_release setting. The default value of
294a cgroup hierarchy's release_agent path is empty. 295a cgroup hierarchy's release_agent path is empty.
295 296
2961.5 How do I use cgroups ? 2971.5 What does clone_children do ?
298---------------------------------
299
300If the clone_children flag is enabled (1) in a cgroup, then all
301cgroups created beneath will call the post_clone callbacks for each
302subsystem of the newly created cgroup. Usually when this callback is
303implemented for a subsystem, it copies the values of the parent
304subsystem, this is the case for the cpuset.
305
3061.6 How do I use cgroups ?
297-------------------------- 307--------------------------
298 308
299To start a new job that is to be contained within a cgroup, using 309To start a new job that is to be contained within a cgroup, using
diff --git a/Documentation/cgroups/cpusets.txt b/Documentation/cgroups/cpusets.txt
index 51682ab2dd1a..5d0d5692a365 100644
--- a/Documentation/cgroups/cpusets.txt
+++ b/Documentation/cgroups/cpusets.txt
@@ -691,7 +691,7 @@ There are ways to query or modify cpusets:
691 cat, rmdir commands from the shell, or their equivalent from C. 691 cat, rmdir commands from the shell, or their equivalent from C.
692 - via the C library libcpuset. 692 - via the C library libcpuset.
693 - via the C library libcgroup. 693 - via the C library libcgroup.
694 (http://sourceforge.net/proects/libcg/) 694 (http://sourceforge.net/projects/libcg/)
695 - via the python application cset. 695 - via the python application cset.
696 (http://developer.novell.com/wiki/index.php/Cpuset) 696 (http://developer.novell.com/wiki/index.php/Cpuset)
697 697
diff --git a/Documentation/coccinelle.txt b/Documentation/coccinelle.txt
new file mode 100644
index 000000000000..cd2b02837066
--- /dev/null
+++ b/Documentation/coccinelle.txt
@@ -0,0 +1,258 @@
1Copyright 2010 Nicolas Palix <npalix@diku.dk>
2Copyright 2010 Julia Lawall <julia@diku.dk>
3Copyright 2010 Gilles Muller <Gilles.Muller@lip6.fr>
4
5
6 Getting Coccinelle
7~~~~~~~~~~~~~~~~~~~~
8
9The semantic patches included in the kernel use the 'virtual rule'
10feature which was introduced in Coccinelle version 0.1.11.
11
12Coccinelle (>=0.2.0) is available through the package manager
13of many distributions, e.g. :
14
15 - Debian (>=squeeze)
16 - Fedora (>=13)
17 - Ubuntu (>=10.04 Lucid Lynx)
18 - OpenSUSE
19 - Arch Linux
20 - NetBSD
21 - FreeBSD
22
23
24You can get the latest version released from the Coccinelle homepage at
25http://coccinelle.lip6.fr/
26
27Once you have it, run the following command:
28
29 ./configure
30 make
31
32as a regular user, and install it with
33
34 sudo make install
35
36
37 Using Coccinelle on the Linux kernel
38~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
39
40A Coccinelle-specific target is defined in the top level
41Makefile. This target is named 'coccicheck' and calls the 'coccicheck'
42front-end in the 'scripts' directory.
43
44Four modes are defined: report, patch, context, and org. The mode to
45use is specified by setting the MODE variable with 'MODE=<mode>'.
46
47'report' generates a list in the following format:
48 file:line:column-column: message
49
50'patch' proposes a fix, when possible.
51
52'context' highlights lines of interest and their context in a
53diff-like style.Lines of interest are indicated with '-'.
54
55'org' generates a report in the Org mode format of Emacs.
56
57Note that not all semantic patches implement all modes.
58
59To make a report for every semantic patch, run the following command:
60
61 make coccicheck MODE=report
62
63NB: The 'report' mode is the default one.
64
65To produce patches, run:
66
67 make coccicheck MODE=patch
68
69
70The coccicheck target applies every semantic patch available in the
71subdirectories of 'scripts/coccinelle' to the entire Linux kernel.
72
73For each semantic patch, a changelog message is proposed. It gives a
74description of the problem being checked by the semantic patch, and
75includes a reference to Coccinelle.
76
77As any static code analyzer, Coccinelle produces false
78positives. Thus, reports must be carefully checked, and patches
79reviewed.
80
81
82 Using Coccinelle with a single semantic patch
83~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
84
85The optional make variable COCCI can be used to check a single
86semantic patch. In that case, the variable must be initialized with
87the name of the semantic patch to apply.
88
89For instance:
90
91 make coccicheck COCCI=<my_SP.cocci> MODE=patch
92or
93 make coccicheck COCCI=<my_SP.cocci> MODE=report
94
95
96 Proposing new semantic patches
97~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
98
99New semantic patches can be proposed and submitted by kernel
100developers. For sake of clarity, they should be organized in the
101subdirectories of 'scripts/coccinelle/'.
102
103
104 Detailed description of the 'report' mode
105~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
106
107'report' generates a list in the following format:
108 file:line:column-column: message
109
110Example:
111
112Running
113
114 make coccicheck MODE=report COCCI=scripts/coccinelle/err_cast.cocci
115
116will execute the following part of the SmPL script.
117
118<smpl>
119@r depends on !context && !patch && (org || report)@
120expression x;
121position p;
122@@
123
124 ERR_PTR@p(PTR_ERR(x))
125
126@script:python depends on report@
127p << r.p;
128x << r.x;
129@@
130
131msg="ERR_CAST can be used with %s" % (x)
132coccilib.report.print_report(p[0], msg)
133</smpl>
134
135This SmPL excerpt generates entries on the standard output, as
136illustrated below:
137
138/home/user/linux/crypto/ctr.c:188:9-16: ERR_CAST can be used with alg
139/home/user/linux/crypto/authenc.c:619:9-16: ERR_CAST can be used with auth
140/home/user/linux/crypto/xts.c:227:9-16: ERR_CAST can be used with alg
141
142
143 Detailed description of the 'patch' mode
144~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
145
146When the 'patch' mode is available, it proposes a fix for each problem
147identified.
148
149Example:
150
151Running
152 make coccicheck MODE=patch COCCI=scripts/coccinelle/err_cast.cocci
153
154will execute the following part of the SmPL script.
155
156<smpl>
157@ depends on !context && patch && !org && !report @
158expression x;
159@@
160
161- ERR_PTR(PTR_ERR(x))
162+ ERR_CAST(x)
163</smpl>
164
165This SmPL excerpt generates patch hunks on the standard output, as
166illustrated below:
167
168diff -u -p a/crypto/ctr.c b/crypto/ctr.c
169--- a/crypto/ctr.c 2010-05-26 10:49:38.000000000 +0200
170+++ b/crypto/ctr.c 2010-06-03 23:44:49.000000000 +0200
171@@ -185,7 +185,7 @@ static struct crypto_instance *crypto_ct
172 alg = crypto_attr_alg(tb[1], CRYPTO_ALG_TYPE_CIPHER,
173 CRYPTO_ALG_TYPE_MASK);
174 if (IS_ERR(alg))
175- return ERR_PTR(PTR_ERR(alg));
176+ return ERR_CAST(alg);
177
178 /* Block size must be >= 4 bytes. */
179 err = -EINVAL;
180
181 Detailed description of the 'context' mode
182~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
183
184'context' highlights lines of interest and their context
185in a diff-like style.
186
187NOTE: The diff-like output generated is NOT an applicable patch. The
188 intent of the 'context' mode is to highlight the important lines
189 (annotated with minus, '-') and gives some surrounding context
190 lines around. This output can be used with the diff mode of
191 Emacs to review the code.
192
193Example:
194
195Running
196 make coccicheck MODE=context COCCI=scripts/coccinelle/err_cast.cocci
197
198will execute the following part of the SmPL script.
199
200<smpl>
201@ depends on context && !patch && !org && !report@
202expression x;
203@@
204
205* ERR_PTR(PTR_ERR(x))
206</smpl>
207
208This SmPL excerpt generates diff hunks on the standard output, as
209illustrated below:
210
211diff -u -p /home/user/linux/crypto/ctr.c /tmp/nothing
212--- /home/user/linux/crypto/ctr.c 2010-05-26 10:49:38.000000000 +0200
213+++ /tmp/nothing
214@@ -185,7 +185,6 @@ static struct crypto_instance *crypto_ct
215 alg = crypto_attr_alg(tb[1], CRYPTO_ALG_TYPE_CIPHER,
216 CRYPTO_ALG_TYPE_MASK);
217 if (IS_ERR(alg))
218- return ERR_PTR(PTR_ERR(alg));
219
220 /* Block size must be >= 4 bytes. */
221 err = -EINVAL;
222
223 Detailed description of the 'org' mode
224~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
225
226'org' generates a report in the Org mode format of Emacs.
227
228Example:
229
230Running
231 make coccicheck MODE=org COCCI=scripts/coccinelle/err_cast.cocci
232
233will execute the following part of the SmPL script.
234
235<smpl>
236@r depends on !context && !patch && (org || report)@
237expression x;
238position p;
239@@
240
241 ERR_PTR@p(PTR_ERR(x))
242
243@script:python depends on org@
244p << r.p;
245x << r.x;
246@@
247
248msg="ERR_CAST can be used with %s" % (x)
249msg_safe=msg.replace("[","@(").replace("]",")")
250coccilib.org.print_todo(p[0], msg_safe)
251</smpl>
252
253This SmPL excerpt generates Org entries on the standard output, as
254illustrated below:
255
256* TODO [[view:/home/user/linux/crypto/ctr.c::face=ovl-face1::linb=188::colb=9::cole=16][ERR_CAST can be used with alg]]
257* TODO [[view:/home/user/linux/crypto/authenc.c::face=ovl-face1::linb=619::colb=9::cole=16][ERR_CAST can be used with auth]]
258* TODO [[view:/home/user/linux/crypto/xts.c::face=ovl-face1::linb=227::colb=9::cole=16][ERR_CAST can be used with alg]]
diff --git a/Documentation/cpu-hotplug.txt b/Documentation/cpu-hotplug.txt
index a99d7031cdf9..45d5a217484f 100644
--- a/Documentation/cpu-hotplug.txt
+++ b/Documentation/cpu-hotplug.txt
@@ -2,7 +2,7 @@
2 2
3 Maintainers: 3 Maintainers:
4 CPU Hotplug Core: 4 CPU Hotplug Core:
5 Rusty Russell <rusty@rustycorp.com.au> 5 Rusty Russell <rusty@rustcorp.com.au>
6 Srivatsa Vaddagiri <vatsa@in.ibm.com> 6 Srivatsa Vaddagiri <vatsa@in.ibm.com>
7 i386: 7 i386:
8 Zwane Mwaikambo <zwane@arm.linux.org.uk> 8 Zwane Mwaikambo <zwane@arm.linux.org.uk>
diff --git a/Documentation/cputopology.txt b/Documentation/cputopology.txt
index f1c5c4bccd3e..902d3151f527 100644
--- a/Documentation/cputopology.txt
+++ b/Documentation/cputopology.txt
@@ -14,25 +14,39 @@ to /proc/cpuinfo.
14 identifier (rather than the kernel's). The actual value is 14 identifier (rather than the kernel's). The actual value is
15 architecture and platform dependent. 15 architecture and platform dependent.
16 16
173) /sys/devices/system/cpu/cpuX/topology/thread_siblings: 173) /sys/devices/system/cpu/cpuX/topology/book_id:
18
19 the book ID of cpuX. Typically it is the hardware platform's
20 identifier (rather than the kernel's). The actual value is
21 architecture and platform dependent.
22
234) /sys/devices/system/cpu/cpuX/topology/thread_siblings:
18 24
19 internel kernel map of cpuX's hardware threads within the same 25 internel kernel map of cpuX's hardware threads within the same
20 core as cpuX 26 core as cpuX
21 27
224) /sys/devices/system/cpu/cpuX/topology/core_siblings: 285) /sys/devices/system/cpu/cpuX/topology/core_siblings:
23 29
24 internal kernel map of cpuX's hardware threads within the same 30 internal kernel map of cpuX's hardware threads within the same
25 physical_package_id. 31 physical_package_id.
26 32
336) /sys/devices/system/cpu/cpuX/topology/book_siblings:
34
35 internal kernel map of cpuX's hardware threads within the same
36 book_id.
37
27To implement it in an architecture-neutral way, a new source file, 38To implement it in an architecture-neutral way, a new source file,
28drivers/base/topology.c, is to export the 4 attributes. 39drivers/base/topology.c, is to export the 4 or 6 attributes. The two book
40related sysfs files will only be created if CONFIG_SCHED_BOOK is selected.
29 41
30For an architecture to support this feature, it must define some of 42For an architecture to support this feature, it must define some of
31these macros in include/asm-XXX/topology.h: 43these macros in include/asm-XXX/topology.h:
32#define topology_physical_package_id(cpu) 44#define topology_physical_package_id(cpu)
33#define topology_core_id(cpu) 45#define topology_core_id(cpu)
46#define topology_book_id(cpu)
34#define topology_thread_cpumask(cpu) 47#define topology_thread_cpumask(cpu)
35#define topology_core_cpumask(cpu) 48#define topology_core_cpumask(cpu)
49#define topology_book_cpumask(cpu)
36 50
37The type of **_id is int. 51The type of **_id is int.
38The type of siblings is (const) struct cpumask *. 52The type of siblings is (const) struct cpumask *.
@@ -45,6 +59,9 @@ not defined by include/asm-XXX/topology.h:
453) thread_siblings: just the given CPU 593) thread_siblings: just the given CPU
464) core_siblings: just the given CPU 604) core_siblings: just the given CPU
47 61
62For architectures that don't support books (CONFIG_SCHED_BOOK) there are no
63default definitions for topology_book_id() and topology_book_cpumask().
64
48Additionally, CPU topology information is provided under 65Additionally, CPU topology information is provided under
49/sys/devices/system/cpu and includes these files. The internal 66/sys/devices/system/cpu and includes these files. The internal
50source for the output is in brackets ("[]"). 67source for the output is in brackets ("[]").
diff --git a/Documentation/development-process/4.Coding b/Documentation/development-process/4.Coding
index a5a3450faaa0..2278693c8ffa 100644
--- a/Documentation/development-process/4.Coding
+++ b/Documentation/development-process/4.Coding
@@ -281,7 +281,7 @@ With sparse, the programmer can be warned about confusion between
281user-space and kernel-space addresses, mixture of big-endian and 281user-space and kernel-space addresses, mixture of big-endian and
282small-endian quantities, the passing of integer values where a set of bit 282small-endian quantities, the passing of integer values where a set of bit
283flags is expected, and so on. Sparse must be installed separately (it can 283flags is expected, and so on. Sparse must be installed separately (it can
284be found at http://www.kernel.org/pub/software/devel/sparse/ if your 284be found at https://sparse.wiki.kernel.org/index.php/Main_Page if your
285distributor does not package it); it can then be run on the code by adding 285distributor does not package it); it can then be run on the code by adding
286"C=1" to your make command. 286"C=1" to your make command.
287 287
diff --git a/Documentation/device-mapper/dm-crypt.txt b/Documentation/device-mapper/dm-crypt.txt
index 6680cab2c705..524de926290d 100644
--- a/Documentation/device-mapper/dm-crypt.txt
+++ b/Documentation/device-mapper/dm-crypt.txt
@@ -36,7 +36,7 @@ Example scripts
36=============== 36===============
37LUKS (Linux Unified Key Setup) is now the preferred way to set up disk 37LUKS (Linux Unified Key Setup) is now the preferred way to set up disk
38encryption with dm-crypt using the 'cryptsetup' utility, see 38encryption with dm-crypt using the 'cryptsetup' utility, see
39http://luks.endorphin.org/ 39http://clemens.endorphin.org/cryptography
40 40
41[[ 41[[
42#!/bin/sh 42#!/bin/sh
diff --git a/Documentation/devices.txt b/Documentation/devices.txt
index 1d83d124056c..eccffe715229 100644
--- a/Documentation/devices.txt
+++ b/Documentation/devices.txt
@@ -239,6 +239,7 @@ Your cooperation is appreciated.
239 0 = /dev/tty Current TTY device 239 0 = /dev/tty Current TTY device
240 1 = /dev/console System console 240 1 = /dev/console System console
241 2 = /dev/ptmx PTY master multiplex 241 2 = /dev/ptmx PTY master multiplex
242 3 = /dev/ttyprintk User messages via printk TTY device
242 64 = /dev/cua0 Callout device for ttyS0 243 64 = /dev/cua0 Callout device for ttyS0
243 ... 244 ...
244 255 = /dev/cua191 Callout device for ttyS191 245 255 = /dev/cua191 Callout device for ttyS191
@@ -445,6 +446,7 @@ Your cooperation is appreciated.
445 233 = /dev/kmview View-OS A process with a view 446 233 = /dev/kmview View-OS A process with a view
446 234 = /dev/btrfs-control Btrfs control device 447 234 = /dev/btrfs-control Btrfs control device
447 235 = /dev/autofs Autofs control device 448 235 = /dev/autofs Autofs control device
449 236 = /dev/mapper/control Device-Mapper control device
448 240-254 Reserved for local use 450 240-254 Reserved for local use
449 255 Reserved for MISC_DYNAMIC_MINOR 451 255 Reserved for MISC_DYNAMIC_MINOR
450 452
@@ -1494,9 +1496,6 @@ Your cooperation is appreciated.
1494 64 = /dev/radio0 Radio device 1496 64 = /dev/radio0 Radio device
1495 ... 1497 ...
1496 127 = /dev/radio63 Radio device 1498 127 = /dev/radio63 Radio device
1497 192 = /dev/vtx0 Teletext device
1498 ...
1499 223 = /dev/vtx31 Teletext device
1500 224 = /dev/vbi0 Vertical blank interrupt 1499 224 = /dev/vbi0 Vertical blank interrupt
1501 ... 1500 ...
1502 255 = /dev/vbi31 Vertical blank interrupt 1501 255 = /dev/vbi31 Vertical blank interrupt
@@ -1517,7 +1516,7 @@ Your cooperation is appreciated.
1517 ... 1516 ...
1518 1517
1519 The driver and documentation may be obtained from 1518 The driver and documentation may be obtained from
1520 http://www.proximity.com.au/~brian/winradio/ 1519 http://www.winradio.com/
1521 1520
1522 82 block I2O hard disk 1521 82 block I2O hard disk
1523 0 = /dev/i2o/hdag 33rd I2O hard disk, whole disk 1522 0 = /dev/i2o/hdag 33rd I2O hard disk, whole disk
@@ -1723,7 +1722,7 @@ Your cooperation is appreciated.
1723 1 = /dev/comedi1 Second comedi device 1722 1 = /dev/comedi1 Second comedi device
1724 ... 1723 ...
1725 1724
1726 See http://stm.lbl.gov/comedi or http://www.llp.fu-berlin.de/. 1725 See http://stm.lbl.gov/comedi.
1727 1726
1728 98 block User-mode virtual block device 1727 98 block User-mode virtual block device
1729 0 = /dev/ubda First user-mode block device 1728 0 = /dev/ubda First user-mode block device
@@ -1984,7 +1983,7 @@ Your cooperation is appreciated.
1984 256 NetWare volumes can be supported in a single 1983 256 NetWare volumes can be supported in a single
1985 machine. 1984 machine.
1986 1985
1987 http://www.kernel.org/pub/linux/kernel/people/jmerkey/nwfs 1986 http://cgfa.telepac.pt/ftp2/kernel.org/linux/kernel/people/jmerkey/nwfs/
1988 1987
1989 0 = /dev/nwfs/v0 First NetWare (NWFS) Logical Volume 1988 0 = /dev/nwfs/v0 First NetWare (NWFS) Logical Volume
1990 1 = /dev/nwfs/v1 Second NetWare (NWFS) Logical Volume 1989 1 = /dev/nwfs/v1 Second NetWare (NWFS) Logical Volume
@@ -2518,6 +2517,12 @@ Your cooperation is appreciated.
2518 8 = /dev/mmcblk1 Second SD/MMC card 2517 8 = /dev/mmcblk1 Second SD/MMC card
2519 ... 2518 ...
2520 2519
2520 The start of next SD/MMC card can be configured with
2521 CONFIG_MMC_BLOCK_MINORS, or overridden at boot/modprobe
2522 time using the mmcblk.perdev_minors option. That would
2523 bump the offset between each card to be the configured
2524 value instead of the default 8.
2525
2521179 char CCube DVXChip-based PCI products 2526179 char CCube DVXChip-based PCI products
2522 0 = /dev/dvxirq0 First DVX device 2527 0 = /dev/dvxirq0 First DVX device
2523 1 = /dev/dvxirq1 Second DVX device 2528 1 = /dev/dvxirq1 Second DVX device
@@ -2552,7 +2557,10 @@ Your cooperation is appreciated.
2552 175 = /dev/usb/legousbtower15 16th USB Legotower device 2557 175 = /dev/usb/legousbtower15 16th USB Legotower device
2553 176 = /dev/usb/usbtmc1 First USB TMC device 2558 176 = /dev/usb/usbtmc1 First USB TMC device
2554 ... 2559 ...
2555 192 = /dev/usb/usbtmc16 16th USB TMC device 2560 191 = /dev/usb/usbtmc16 16th USB TMC device
2561 192 = /dev/usb/yurex1 First USB Yurex device
2562 ...
2563 209 = /dev/usb/yurex16 16th USB Yurex device
2556 240 = /dev/usb/dabusb0 First daubusb device 2564 240 = /dev/usb/dabusb0 First daubusb device
2557 ... 2565 ...
2558 243 = /dev/usb/dabusb3 Fourth dabusb device 2566 243 = /dev/usb/dabusb3 Fourth dabusb device
@@ -2591,7 +2599,8 @@ Your cooperation is appreciated.
2591 1 = /dev/intermezzo1 Second cache manager 2599 1 = /dev/intermezzo1 Second cache manager
2592 ... 2600 ...
2593 2601
2594 See http://www.inter-mezzo.org/ for more information. 2602 See http://web.archive.org/web/20080115195241/
2603 http://inter-mezzo.org/index.html
2595 2604
2596186 char Object-based storage control device 2605186 char Object-based storage control device
2597 0 = /dev/obd0 First obd control device 2606 0 = /dev/obd0 First obd control device
diff --git a/Documentation/dvb/faq.txt b/Documentation/dvb/faq.txt
index 2511a335abd6..121832e5d899 100644
--- a/Documentation/dvb/faq.txt
+++ b/Documentation/dvb/faq.txt
@@ -76,7 +76,7 @@ Some very frequently asked questions about linuxtv-dvb
76 the TuxBox CVS many interesting DVB applications and the dBox2 76 the TuxBox CVS many interesting DVB applications and the dBox2
77 DVB source 77 DVB source
78 78
79 http://sourceforge.net/projects/dvbsak/ 79 http://www.linuxtv.org/downloads/
80 DVB Swiss Army Knife library and utilities 80 DVB Swiss Army Knife library and utilities
81 81
82 http://www.nenie.org/misc/mpsys/ 82 http://www.nenie.org/misc/mpsys/
diff --git a/Documentation/dvb/get_dvb_firmware b/Documentation/dvb/get_dvb_firmware
index 239cbdbf4d12..59690de8ebfe 100644
--- a/Documentation/dvb/get_dvb_firmware
+++ b/Documentation/dvb/get_dvb_firmware
@@ -26,7 +26,8 @@ use IO::Handle;
26 "dec3000s", "vp7041", "dibusb", "nxt2002", "nxt2004", 26 "dec3000s", "vp7041", "dibusb", "nxt2002", "nxt2004",
27 "or51211", "or51132_qam", "or51132_vsb", "bluebird", 27 "or51211", "or51132_qam", "or51132_vsb", "bluebird",
28 "opera1", "cx231xx", "cx18", "cx23885", "pvrusb2", "mpc718", 28 "opera1", "cx231xx", "cx18", "cx23885", "pvrusb2", "mpc718",
29 "af9015", "ngene"); 29 "af9015", "ngene", "az6027", "lme2510_lg", "lme2510c_s7395",
30 "lme2510c_s7395_old");
30 31
31# Check args 32# Check args
32syntax() if (scalar(@ARGV) != 1); 33syntax() if (scalar(@ARGV) != 1);
@@ -518,11 +519,11 @@ sub bluebird {
518sub af9015 { 519sub af9015 {
519 my $sourcefile = "download.ashx?file=57"; 520 my $sourcefile = "download.ashx?file=57";
520 my $url = "http://www.ite.com.tw/EN/Services/$sourcefile"; 521 my $url = "http://www.ite.com.tw/EN/Services/$sourcefile";
521 my $hash = "ff5b096ed47c080870eacdab2de33ad6"; 522 my $hash = "e3f08935158038d385ad382442f4bb2d";
522 my $outfile = "dvb-usb-af9015.fw"; 523 my $outfile = "dvb-usb-af9015.fw";
523 my $tmpdir = tempdir(DIR => "/tmp", CLEANUP => 1); 524 my $tmpdir = tempdir(DIR => "/tmp", CLEANUP => 1);
524 my $fwoffset = 0x22708; 525 my $fwoffset = 0x25690;
525 my $fwlength = 18225; 526 my $fwlength = 18725;
526 my ($chunklength, $buf, $rcount); 527 my ($chunklength, $buf, $rcount);
527 528
528 checkstandard(); 529 checkstandard();
@@ -567,6 +568,66 @@ sub ngene {
567 "$file1, $file2"; 568 "$file1, $file2";
568} 569}
569 570
571sub az6027{
572 my $file = "AZ6027_Linux_Driver.tar.gz";
573 my $url = "http://linux.terratec.de/files/$file";
574 my $firmware = "dvb-usb-az6027-03.fw";
575
576 wgetfile($file, $url);
577
578 #untar
579 if( system("tar xzvf $file $firmware")){
580 die "failed to untar firmware";
581 }
582 if( system("rm $file")){
583 die ("unable to remove unnecessary files");
584 }
585
586 $firmware;
587}
588
589sub lme2510_lg {
590 my $sourcefile = "LMEBDA_DVBS.sys";
591 my $hash = "fc6017ad01e79890a97ec53bea157ed2";
592 my $outfile = "dvb-usb-lme2510-lg.fw";
593 my $hasho = "caa065d5fdbd2c09ad57b399bbf55cad";
594
595 checkstandard();
596
597 verify($sourcefile, $hash);
598 extract($sourcefile, 4168, 3841, $outfile);
599 verify($outfile, $hasho);
600 $outfile;
601}
602
603sub lme2510c_s7395 {
604 my $sourcefile = "US2A0D.sys";
605 my $hash = "b0155a8083fb822a3bd47bc360e74601";
606 my $outfile = "dvb-usb-lme2510c-s7395.fw";
607 my $hasho = "3a3cf1aeebd17b6ddc04cebe131e94cf";
608
609 checkstandard();
610
611 verify($sourcefile, $hash);
612 extract($sourcefile, 37248, 3720, $outfile);
613 verify($outfile, $hasho);
614 $outfile;
615}
616
617sub lme2510c_s7395_old {
618 my $sourcefile = "LMEBDA_DVBS7395C.sys";
619 my $hash = "7572ae0eb9cdf91baabd7c0ba9e09b31";
620 my $outfile = "dvb-usb-lme2510c-s7395.fw";
621 my $hasho = "90430c5b435eb5c6f88fd44a9d950674";
622
623 checkstandard();
624
625 verify($sourcefile, $hash);
626 extract($sourcefile, 4208, 3881, $outfile);
627 verify($outfile, $hasho);
628 $outfile;
629}
630
570# --------------------------------------------------------------- 631# ---------------------------------------------------------------
571# Utilities 632# Utilities
572 633
diff --git a/Documentation/dvb/lmedm04.txt b/Documentation/dvb/lmedm04.txt
new file mode 100644
index 000000000000..e175784b89bf
--- /dev/null
+++ b/Documentation/dvb/lmedm04.txt
@@ -0,0 +1,58 @@
1To extract firmware for the DM04/QQBOX you need to copy the
2following file(s) to this directory.
3
4for DM04+/QQBOX LME2510C (Sharp 7395 Tuner)
5-------------------------------------------
6
7The Sharp 7395 driver can be found in windows/system32/driver
8
9US2A0D.sys (dated 17 Mar 2009)
10
11
12and run
13./get_dvb_firmware lme2510c_s7395
14
15 will produce
16 dvb-usb-lme2510c-s7395.fw
17
18An alternative but older firmware can be found on the driver
19disk DVB-S_EN_3.5A in BDADriver/driver
20
21LMEBDA_DVBS7395C.sys (dated 18 Jan 2008)
22
23and run
24./get_dvb_firmware lme2510c_s7395_old
25
26 will produce
27 dvb-usb-lme2510c-s7395.fw
28
29--------------------------------------------------------------------
30
31The LG firmware can be found on the driver
32disk DM04+_5.1A[LG] in BDADriver/driver
33
34for DM04 LME2510 (LG Tuner)
35---------------------------
36
37LMEBDA_DVBS.sys (dated 13 Nov 2007)
38
39and run
40./get_dvb_firmware lme2510_lg
41
42 will produce
43 dvb-usb-lme2510-lg.fw
44
45
46Other LG firmware can be extracted manually from US280D.sys
47only found in windows/system32/driver.
48
49dd if=US280D.sys ibs=1 skip=42616 count=3668 of=dvb-usb-lme2510-lg.fw
50
51for DM04 LME2510C (LG Tuner)
52---------------------------
53
54dd if=US280D.sys ibs=1 skip=35200 count=3850 of=dvb-usb-lme2510c-lg.fw
55
56---------------------------------------------------------------------
57
58Copy the firmware file(s) to /lib/firmware
diff --git a/Documentation/dynamic-debug-howto.txt b/Documentation/dynamic-debug-howto.txt
index 674c5663d346..58ea64a96165 100644
--- a/Documentation/dynamic-debug-howto.txt
+++ b/Documentation/dynamic-debug-howto.txt
@@ -24,7 +24,7 @@ Dynamic debug has even more useful features:
24 read to display the complete list of known debug statements, to help guide you 24 read to display the complete list of known debug statements, to help guide you
25 25
26Controlling dynamic debug Behaviour 26Controlling dynamic debug Behaviour
27=============================== 27===================================
28 28
29The behaviour of pr_debug()/dev_debug()s are controlled via writing to a 29The behaviour of pr_debug()/dev_debug()s are controlled via writing to a
30control file in the 'debugfs' filesystem. Thus, you must first mount the debugfs 30control file in the 'debugfs' filesystem. Thus, you must first mount the debugfs
@@ -212,6 +212,26 @@ Note the regexp ^[-+=][scp]+$ matches a flags specification.
212Note also that there is no convenient syntax to remove all 212Note also that there is no convenient syntax to remove all
213the flags at once, you need to use "-psc". 213the flags at once, you need to use "-psc".
214 214
215
216Debug messages during boot process
217==================================
218
219To be able to activate debug messages during the boot process,
220even before userspace and debugfs exists, use the boot parameter:
221ddebug_query="QUERY"
222
223QUERY follows the syntax described above, but must not exceed 1023
224characters. The enablement of debug messages is done as an arch_initcall.
225Thus you can enable debug messages in all code processed after this
226arch_initcall via this boot parameter.
227On an x86 system for example ACPI enablement is a subsys_initcall and
228ddebug_query="file ec.c +p"
229will show early Embedded Controller transactions during ACPI setup if
230your machine (typically a laptop) has an Embedded Controller.
231PCI (or other devices) initialization also is a hot candidate for using
232this boot parameter for debugging purposes.
233
234
215Examples 235Examples
216======== 236========
217 237
diff --git a/Documentation/fb/framebuffer.txt b/Documentation/fb/framebuffer.txt
index fe79e3c8847d..58c5ae2e9f59 100644
--- a/Documentation/fb/framebuffer.txt
+++ b/Documentation/fb/framebuffer.txt
@@ -330,7 +330,7 @@ and on its mirrors.
330 330
331The latest version of fbset can be found at 331The latest version of fbset can be found at
332 332
333 http://home.tvd.be/cr26864/Linux/fbdev/ 333 http://www.linux-fbdev.org/
334 334
335 335
33610. Credits 33610. Credits
diff --git a/Documentation/fb/viafb.txt b/Documentation/fb/viafb.txt
index f3e046a6a987..1a2e8aa3fbb1 100644
--- a/Documentation/fb/viafb.txt
+++ b/Documentation/fb/viafb.txt
@@ -197,6 +197,54 @@ Notes:
197 example, 197 example,
198 # fbset -depth 16 198 # fbset -depth 16
199 199
200
201[Configure viafb via /proc]
202---------------------------
203 The following files exist in /proc/viafb
204
205 supported_output_devices
206
207 This read-only file contains a full ',' seperated list containing all
208 output devices that could be available on your platform. It is likely
209 that not all of those have a connector on your hardware but it should
210 provide a good starting point to figure out which of those names match
211 a real connector.
212 Example:
213 # cat /proc/viafb/supported_output_devices
214
215 iga1/output_devices
216 iga2/output_devices
217
218 These two files are readable and writable. iga1 and iga2 are the two
219 independent units that produce the screen image. Those images can be
220 forwarded to one or more output devices. Reading those files is a way
221 to query which output devices are currently used by an iga.
222 Example:
223 # cat /proc/viafb/iga1/output_devices
224 If there are no output devices printed the output of this iga is lost.
225 This can happen for example if only one (the other) iga is used.
226 Writing to these files allows adjusting the output devices during
227 runtime. One can add new devices, remove existing ones or switch
228 between igas. Essentially you can write a ',' seperated list of device
229 names (or a single one) in the same format as the output to those
230 files. You can add a '+' or '-' as a prefix allowing simple addition
231 and removal of devices. So a prefix '+' adds the devices from your list
232 to the already existing ones, '-' removes the listed devices from the
233 existing ones and if no prefix is given it replaces all existing ones
234 with the listed ones. If you remove devices they are expected to turn
235 off. If you add devices that are already part of the other iga they are
236 removed there and added to the new one.
237 Examples:
238 Add CRT as output device to iga1
239 # echo +CRT > /proc/viafb/iga1/output_devices
240
241 Remove (turn off) DVP1 and LVDS1 as output devices of iga2
242 # echo -DVP1,LVDS1 > /proc/viafb/iga2/output_devices
243
244 Replace all iga1 output devices by CRT
245 # echo CRT > /proc/viafb/iga1/output_devices
246
247
200[Bootup with viafb]: 248[Bootup with viafb]:
201-------------------- 249--------------------
202 Add the following line to your grub.conf: 250 Add the following line to your grub.conf:
diff --git a/Documentation/feature-removal-schedule.txt b/Documentation/feature-removal-schedule.txt
index 1571c0c83dba..d8f36f984faa 100644
--- a/Documentation/feature-removal-schedule.txt
+++ b/Documentation/feature-removal-schedule.txt
@@ -93,12 +93,12 @@ Why: Broken design for runtime control over driver power states, confusing
93 inputs. This framework was never widely used, and most attempts to 93 inputs. This framework was never widely used, and most attempts to
94 use it were broken. Drivers should instead be exposing domain-specific 94 use it were broken. Drivers should instead be exposing domain-specific
95 interfaces either to kernel or to userspace. 95 interfaces either to kernel or to userspace.
96Who: Pavel Machek <pavel@suse.cz> 96Who: Pavel Machek <pavel@ucw.cz>
97 97
98--------------------------- 98---------------------------
99 99
100What: Video4Linux API 1 ioctls and from Video devices. 100What: Video4Linux API 1 ioctls and from Video devices.
101When: July 2009 101When: kernel 2.6.38
102Files: include/linux/videodev.h 102Files: include/linux/videodev.h
103Check: include/linux/videodev.h 103Check: include/linux/videodev.h
104Why: V4L1 AP1 was replaced by V4L2 API during migration from 2.4 to 2.6 104Why: V4L1 AP1 was replaced by V4L2 API during migration from 2.4 to 2.6
@@ -116,26 +116,18 @@ Who: Mauro Carvalho Chehab <mchehab@infradead.org>
116 116
117--------------------------- 117---------------------------
118 118
119What: PCMCIA control ioctl (needed for pcmcia-cs [cardmgr, cardctl]) 119What: Video4Linux obsolete drivers using V4L1 API
120When: 2.6.35/2.6.36 120When: kernel 2.6.38
121Files: drivers/pcmcia/: pcmcia_ioctl.c 121Files: drivers/staging/cpia/* drivers/staging/stradis/*
122Why: With the 16-bit PCMCIA subsystem now behaving (almost) like a 122Check: drivers/staging/cpia/cpia.c drivers/staging/stradis/stradis.c
123 normal hotpluggable bus, and with it using the default kernel 123Why: There are some drivers still using V4L1 API, despite all efforts we've done
124 infrastructure (hotplug, driver core, sysfs) keeping the PCMCIA 124 to migrate. Those drivers are for obsolete hardware that the old maintainer
125 control ioctl needed by cardmgr and cardctl from pcmcia-cs is 125 didn't care (or not have the hardware anymore), and that no other developer
126 unnecessary and potentially harmful (it does not provide for 126 could find any hardware to buy. They probably have no practical usage today,
127 proper locking), and makes further cleanups and integration of the 127 and people with such old hardware could probably keep using an older version
128 PCMCIA subsystem into the Linux kernel device driver model more 128 of the kernel. Those drivers will be moved to staging on 2.6.37 and, if nobody
129 difficult. The features provided by cardmgr and cardctl are either 129 care enough to port and test them with V4L2 API, they'll be removed on 2.6.38.
130 handled by the kernel itself now or are available in the new 130Who: Mauro Carvalho Chehab <mchehab@infradead.org>
131 pcmciautils package available at
132 http://kernel.org/pub/linux/utils/kernel/pcmcia/
133
134 For all architectures except ARM, the associated config symbol
135 has been removed from kernel 2.6.34; for ARM, it will be likely
136 be removed from kernel 2.6.35. The actual code will then likely
137 be removed from kernel 2.6.36.
138Who: Dominik Brodowski <linux@dominikbrodowski.net>
139 131
140--------------------------- 132---------------------------
141 133
@@ -174,6 +166,31 @@ Who: Eric Biederman <ebiederm@xmission.com>
174 166
175--------------------------- 167---------------------------
176 168
169What: /proc/<pid>/oom_adj
170When: August 2012
171Why: /proc/<pid>/oom_adj allows userspace to influence the oom killer's
172 badness heuristic used to determine which task to kill when the kernel
173 is out of memory.
174
175 The badness heuristic has since been rewritten since the introduction of
176 this tunable such that its meaning is deprecated. The value was
177 implemented as a bitshift on a score generated by the badness()
178 function that did not have any precise units of measure. With the
179 rewrite, the score is given as a proportion of available memory to the
180 task allocating pages, so using a bitshift which grows the score
181 exponentially is, thus, impossible to tune with fine granularity.
182
183 A much more powerful interface, /proc/<pid>/oom_score_adj, was
184 introduced with the oom killer rewrite that allows users to increase or
185 decrease the badness() score linearly. This interface will replace
186 /proc/<pid>/oom_adj.
187
188 A warning will be emitted to the kernel log if an application uses this
189 deprecated interface. After it is printed once, future warnings will be
190 suppressed until the kernel is rebooted.
191
192---------------------------
193
177What: remove EXPORT_SYMBOL(kernel_thread) 194What: remove EXPORT_SYMBOL(kernel_thread)
178When: August 2006 195When: August 2006
179Files: arch/*/kernel/*_ksyms.c 196Files: arch/*/kernel/*_ksyms.c
@@ -303,15 +320,6 @@ Who: Johannes Berg <johannes@sipsolutions.net>
303 320
304--------------------------- 321---------------------------
305 322
306What: CONFIG_NF_CT_ACCT
307When: 2.6.29
308Why: Accounting can now be enabled/disabled without kernel recompilation.
309 Currently used only to set a default value for a feature that is also
310 controlled by a kernel/module/sysfs/sysctl parameter.
311Who: Krzysztof Piotr Oledzki <ole@ans.pl>
312
313---------------------------
314
315What: sysfs ui for changing p4-clockmod parameters 323What: sysfs ui for changing p4-clockmod parameters
316When: September 2009 324When: September 2009
317Why: See commits 129f8ae9b1b5be94517da76009ea956e89104ce8 and 325Why: See commits 129f8ae9b1b5be94517da76009ea956e89104ce8 and
@@ -367,24 +375,6 @@ When: 2.6.33
367Why: Should be implemented in userspace, policy daemon. 375Why: Should be implemented in userspace, policy daemon.
368Who: Johannes Berg <johannes@sipsolutions.net> 376Who: Johannes Berg <johannes@sipsolutions.net>
369 377
370---------------------------
371
372What: CONFIG_INOTIFY
373When: 2.6.33
374Why: last user (audit) will be converted to the newer more generic
375 and more easily maintained fsnotify subsystem
376Who: Eric Paris <eparis@redhat.com>
377
378----------------------------
379
380What: lock_policy_rwsem_* and unlock_policy_rwsem_* will not be
381 exported interface anymore.
382When: 2.6.33
383Why: cpu_policy_rwsem has a new cleaner definition making it local to
384 cpufreq core and contained inside cpufreq.c. Other dependent
385 drivers should not use it in order to safely avoid lockdep issues.
386Who: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>
387
388---------------------------- 378----------------------------
389 379
390What: sound-slot/service-* module aliases and related clutters in 380What: sound-slot/service-* module aliases and related clutters in
@@ -411,34 +401,6 @@ Who: Tejun Heo <tj@kernel.org>
411 401
412---------------------------- 402----------------------------
413 403
414What: Support for VMware's guest paravirtuliazation technique [VMI] will be
415 dropped.
416When: 2.6.37 or earlier.
417Why: With the recent innovations in CPU hardware acceleration technologies
418 from Intel and AMD, VMware ran a few experiments to compare these
419 techniques to guest paravirtualization technique on VMware's platform.
420 These hardware assisted virtualization techniques have outperformed the
421 performance benefits provided by VMI in most of the workloads. VMware
422 expects that these hardware features will be ubiquitous in a couple of
423 years, as a result, VMware has started a phased retirement of this
424 feature from the hypervisor. We will be removing this feature from the
425 Kernel too. Right now we are targeting 2.6.37 but can retire earlier if
426 technical reasons (read opportunity to remove major chunk of pvops)
427 arise.
428
429 Please note that VMI has always been an optimization and non-VMI kernels
430 still work fine on VMware's platform.
431 Latest versions of VMware's product which support VMI are,
432 Workstation 7.0 and VSphere 4.0 on ESX side, future maintainence
433 releases for these products will continue supporting VMI.
434
435 For more details about VMI retirement take a look at this,
436 http://blogs.vmware.com/guestosguide/2009/09/vmi-retirement.html
437
438Who: Alok N Kataria <akataria@vmware.com>
439
440----------------------------
441
442What: Support for lcd_switch and display_get in asus-laptop driver 404What: Support for lcd_switch and display_get in asus-laptop driver
443When: March 2010 405When: March 2010
444Why: These two features use non-standard interfaces. There are the 406Why: These two features use non-standard interfaces. There are the
@@ -459,57 +421,6 @@ Who: Corentin Chary <corentin.chary@gmail.com>
459 421
460---------------------------- 422----------------------------
461 423
462What: usbvideo quickcam_messenger driver
463When: 2.6.35
464Files: drivers/media/video/usbvideo/quickcam_messenger.[ch]
465Why: obsolete v4l1 driver replaced by gspca_stv06xx
466Who: Hans de Goede <hdegoede@redhat.com>
467
468----------------------------
469
470What: ov511 v4l1 driver
471When: 2.6.35
472Files: drivers/media/video/ov511.[ch]
473Why: obsolete v4l1 driver replaced by gspca_ov519
474Who: Hans de Goede <hdegoede@redhat.com>
475
476----------------------------
477
478What: w9968cf v4l1 driver
479When: 2.6.35
480Files: drivers/media/video/w9968cf*.[ch]
481Why: obsolete v4l1 driver replaced by gspca_ov519
482Who: Hans de Goede <hdegoede@redhat.com>
483
484----------------------------
485
486What: ovcamchip sensor framework
487When: 2.6.35
488Files: drivers/media/video/ovcamchip/*
489Why: Only used by obsoleted v4l1 drivers
490Who: Hans de Goede <hdegoede@redhat.com>
491
492----------------------------
493
494What: stv680 v4l1 driver
495When: 2.6.35
496Files: drivers/media/video/stv680.[ch]
497Why: obsolete v4l1 driver replaced by gspca_stv0680
498Who: Hans de Goede <hdegoede@redhat.com>
499
500----------------------------
501
502What: zc0301 v4l driver
503When: 2.6.35
504Files: drivers/media/video/zc0301/*
505Why: Duplicate functionality with the gspca_zc3xx driver, zc0301 only
506 supports 2 USB-ID's (because it only supports a limited set of
507 sensors) wich are also supported by the gspca_zc3xx driver
508 (which supports 53 USB-ID's in total)
509Who: Hans de Goede <hdegoede@redhat.com>
510
511----------------------------
512
513What: sysfs-class-rfkill state file 424What: sysfs-class-rfkill state file
514When: Feb 2014 425When: Feb 2014
515Files: net/rfkill/core.c 426Files: net/rfkill/core.c
@@ -538,37 +449,6 @@ Who: Jan Kiszka <jan.kiszka@web.de>
538 449
539---------------------------- 450----------------------------
540 451
541What: KVM memory aliases support
542When: July 2010
543Why: Memory aliasing support is used for speeding up guest vga access
544 through the vga windows.
545
546 Modern userspace no longer uses this feature, so it's just bitrotted
547 code and can be removed with no impact.
548Who: Avi Kivity <avi@redhat.com>
549
550----------------------------
551
552What: xtime, wall_to_monotonic
553When: 2.6.36+
554Files: kernel/time/timekeeping.c include/linux/time.h
555Why: Cleaning up timekeeping internal values. Please use
556 existing timekeeping accessor functions to access
557 the equivalent functionality.
558Who: John Stultz <johnstul@us.ibm.com>
559
560----------------------------
561
562What: KVM kernel-allocated memory slots
563When: July 2010
564Why: Since 2.6.25, kvm supports user-allocated memory slots, which are
565 much more flexible than kernel-allocated slots. All current userspace
566 supports the newer interface and this code can be removed with no
567 impact.
568Who: Avi Kivity <avi@redhat.com>
569
570----------------------------
571
572What: KVM paravirt mmu host support 452What: KVM paravirt mmu host support
573When: January 2011 453When: January 2011
574Why: The paravirt mmu host support is slower than non-paravirt mmu, both 454Why: The paravirt mmu host support is slower than non-paravirt mmu, both
@@ -605,29 +485,6 @@ When: April 2011
605Why: Superseded by xt_CT 485Why: Superseded by xt_CT
606Who: Netfilter developer team <netfilter-devel@vger.kernel.org> 486Who: Netfilter developer team <netfilter-devel@vger.kernel.org>
607 487
608---------------------------
609
610What: video4linux /dev/vtx teletext API support
611When: 2.6.35
612Files: drivers/media/video/saa5246a.c drivers/media/video/saa5249.c
613 include/linux/videotext.h
614Why: The vtx device nodes have been superseded by vbi device nodes
615 for many years. No applications exist that use the vtx support.
616 Of the two i2c drivers that actually support this API the saa5249
617 has been impossible to use for a year now and no known hardware
618 that supports this device exists. The saa5246a is theoretically
619 supported by the old mxb boards, but it never actually worked.
620
621 In summary: there is no hardware that can use this API and there
622 are no applications actually implementing this API.
623
624 The vtx support still reserves minors 192-223 and we would really
625 like to reuse those for upcoming new functionality. In the unlikely
626 event that new hardware appears that wants to use the functionality
627 provided by the vtx API, then that functionality should be build
628 around the sliced VBI API instead.
629Who: Hans Verkuil <hverkuil@xs4all.nl>
630
631---------------------------- 488----------------------------
632 489
633What: IRQF_DISABLED 490What: IRQF_DISABLED
@@ -637,16 +494,6 @@ Who: Thomas Gleixner <tglx@linutronix.de>
637 494
638---------------------------- 495----------------------------
639 496
640What: old ieee1394 subsystem (CONFIG_IEEE1394)
641When: 2.6.37
642Files: drivers/ieee1394/ except init_ohci1394_dma.c
643Why: superseded by drivers/firewire/ (CONFIG_FIREWIRE) which offers more
644 features, better performance, and better security, all with smaller
645 and more modern code base
646Who: Stefan Richter <stefanr@s5r6.in-berlin.de>
647
648----------------------------
649
650What: The acpi_sleep=s4_nonvs command line option 497What: The acpi_sleep=s4_nonvs command line option
651When: 2.6.37 498When: 2.6.37
652Files: arch/x86/kernel/acpi/sleep.c 499Files: arch/x86/kernel/acpi/sleep.c
@@ -654,3 +501,56 @@ Why: superseded by acpi_sleep=nonvs
654Who: Rafael J. Wysocki <rjw@sisk.pl> 501Who: Rafael J. Wysocki <rjw@sisk.pl>
655 502
656---------------------------- 503----------------------------
504
505What: PCI DMA unmap state API
506When: August 2012
507Why: PCI DMA unmap state API (include/linux/pci-dma.h) was replaced
508 with DMA unmap state API (DMA unmap state API can be used for
509 any bus).
510Who: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
511
512----------------------------
513
514What: DMA_xxBIT_MASK macros
515When: Jun 2011
516Why: DMA_xxBIT_MASK macros were replaced with DMA_BIT_MASK() macros.
517Who: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
518
519----------------------------
520
521What: namespace cgroup (ns_cgroup)
522When: 2.6.38
523Why: The ns_cgroup leads to some problems:
524 * cgroup creation is out-of-control
525 * cgroup name can conflict when pids are looping
526 * it is not possible to have a single process handling
527 a lot of namespaces without falling in a exponential creation time
528 * we may want to create a namespace without creating a cgroup
529
530 The ns_cgroup is replaced by a compatibility flag 'clone_children',
531 where a newly created cgroup will copy the parent cgroup values.
532 The userspace has to manually create a cgroup and add a task to
533 the 'tasks' file.
534Who: Daniel Lezcano <daniel.lezcano@free.fr>
535
536----------------------------
537
538What: iwlwifi disable_hw_scan module parameters
539When: 2.6.40
540Why: Hareware scan is the prefer method for iwlwifi devices for
541 scanning operation. Remove software scan support for all the
542 iwlwifi devices.
543
544Who: Wey-Yi Guy <wey-yi.w.guy@intel.com>
545
546----------------------------
547
548What: access to nfsd auth cache through sys_nfsservctl or '.' files
549 in the 'nfsd' filesystem.
550When: 2.6.40
551Why: This is a legacy interface which have been replaced by a more
552 dynamic cache. Continuing to maintain this interface is an
553 unnecessary burden.
554Who: NeilBrown <neilb@suse.de>
555
556----------------------------
diff --git a/Documentation/filesystems/00-INDEX b/Documentation/filesystems/00-INDEX
index 4303614b5add..8c624a18f67d 100644
--- a/Documentation/filesystems/00-INDEX
+++ b/Documentation/filesystems/00-INDEX
@@ -96,8 +96,6 @@ seq_file.txt
96 - how to use the seq_file API 96 - how to use the seq_file API
97sharedsubtree.txt 97sharedsubtree.txt
98 - a description of shared subtrees for namespaces. 98 - a description of shared subtrees for namespaces.
99smbfs.txt
100 - info on using filesystems with the SMB protocol (Win 3.11 and NT).
101spufs.txt 99spufs.txt
102 - info and mount options for the SPU filesystem used on Cell. 100 - info and mount options for the SPU filesystem used on Cell.
103sysfs-pci.txt 101sysfs-pci.txt
diff --git a/Documentation/filesystems/9p.txt b/Documentation/filesystems/9p.txt
index c0236e753bc8..b22abba78fed 100644
--- a/Documentation/filesystems/9p.txt
+++ b/Documentation/filesystems/9p.txt
@@ -111,7 +111,7 @@ OPTIONS
111 This can be used to share devices/named pipes/sockets between 111 This can be used to share devices/named pipes/sockets between
112 hosts. This functionality will be expanded in later versions. 112 hosts. This functionality will be expanded in later versions.
113 113
114 access there are three access modes. 114 access there are four access modes.
115 user = if a user tries to access a file on v9fs 115 user = if a user tries to access a file on v9fs
116 filesystem for the first time, v9fs sends an 116 filesystem for the first time, v9fs sends an
117 attach command (Tattach) for that user. 117 attach command (Tattach) for that user.
@@ -120,6 +120,8 @@ OPTIONS
120 the files on the mounted filesystem 120 the files on the mounted filesystem
121 any = v9fs does single attach and performs all 121 any = v9fs does single attach and performs all
122 operations as one user 122 operations as one user
123 client = ACL based access check on the 9p client
124 side for access validation
123 125
124 cachetag cache tag to use the specified persistent cache. 126 cachetag cache tag to use the specified persistent cache.
125 cache tags for existing cache sessions can be listed at 127 cache tags for existing cache sessions can be listed at
@@ -128,7 +130,7 @@ OPTIONS
128RESOURCES 130RESOURCES
129========= 131=========
130 132
131Our current recommendation is to use Inferno (http://www.vitanuova.com/inferno) 133Our current recommendation is to use Inferno (http://www.vitanuova.com/nferno/index.html)
132as the 9p server. You can start a 9p server under Inferno by issuing the 134as the 9p server. You can start a 9p server under Inferno by issuing the
133following command: 135following command:
134 ; styxlisten -A tcp!*!564 export '#U*' 136 ; styxlisten -A tcp!*!564 export '#U*'
diff --git a/Documentation/filesystems/Locking b/Documentation/filesystems/Locking
index 96d4293607ec..8a817f656f0a 100644
--- a/Documentation/filesystems/Locking
+++ b/Documentation/filesystems/Locking
@@ -92,8 +92,8 @@ prototypes:
92 void (*destroy_inode)(struct inode *); 92 void (*destroy_inode)(struct inode *);
93 void (*dirty_inode) (struct inode *); 93 void (*dirty_inode) (struct inode *);
94 int (*write_inode) (struct inode *, int); 94 int (*write_inode) (struct inode *, int);
95 void (*drop_inode) (struct inode *); 95 int (*drop_inode) (struct inode *);
96 void (*delete_inode) (struct inode *); 96 void (*evict_inode) (struct inode *);
97 void (*put_super) (struct super_block *); 97 void (*put_super) (struct super_block *);
98 void (*write_super) (struct super_block *); 98 void (*write_super) (struct super_block *);
99 int (*sync_fs)(struct super_block *sb, int wait); 99 int (*sync_fs)(struct super_block *sb, int wait);
@@ -101,14 +101,13 @@ prototypes:
101 int (*unfreeze_fs) (struct super_block *); 101 int (*unfreeze_fs) (struct super_block *);
102 int (*statfs) (struct dentry *, struct kstatfs *); 102 int (*statfs) (struct dentry *, struct kstatfs *);
103 int (*remount_fs) (struct super_block *, int *, char *); 103 int (*remount_fs) (struct super_block *, int *, char *);
104 void (*clear_inode) (struct inode *);
105 void (*umount_begin) (struct super_block *); 104 void (*umount_begin) (struct super_block *);
106 int (*show_options)(struct seq_file *, struct vfsmount *); 105 int (*show_options)(struct seq_file *, struct vfsmount *);
107 ssize_t (*quota_read)(struct super_block *, int, char *, size_t, loff_t); 106 ssize_t (*quota_read)(struct super_block *, int, char *, size_t, loff_t);
108 ssize_t (*quota_write)(struct super_block *, int, const char *, size_t, loff_t); 107 ssize_t (*quota_write)(struct super_block *, int, const char *, size_t, loff_t);
109 108
110locking rules: 109locking rules:
111 All may block. 110 All may block [not true, see below]
112 None have BKL 111 None have BKL
113 s_umount 112 s_umount
114alloc_inode: 113alloc_inode:
@@ -116,22 +115,25 @@ destroy_inode:
116dirty_inode: (must not sleep) 115dirty_inode: (must not sleep)
117write_inode: 116write_inode:
118drop_inode: !!!inode_lock!!! 117drop_inode: !!!inode_lock!!!
119delete_inode: 118evict_inode:
120put_super: write 119put_super: write
121write_super: read 120write_super: read
122sync_fs: read 121sync_fs: read
123freeze_fs: read 122freeze_fs: read
124unfreeze_fs: read 123unfreeze_fs: read
125statfs: no 124statfs: maybe(read) (see below)
126remount_fs: maybe (see below) 125remount_fs: write
127clear_inode:
128umount_begin: no 126umount_begin: no
129show_options: no (namespace_sem) 127show_options: no (namespace_sem)
130quota_read: no (see below) 128quota_read: no (see below)
131quota_write: no (see below) 129quota_write: no (see below)
132 130
133->remount_fs() will have the s_umount exclusive lock if it's already mounted. 131->statfs() has s_umount (shared) when called by ustat(2) (native or
134When called from get_sb_single, it does NOT have the s_umount lock. 132compat), but that's an accident of bad API; s_umount is used to pin
133the superblock down when we only have dev_t given us by userland to
134identify the superblock. Everything else (statfs(), fstatfs(), etc.)
135doesn't hold it when calling ->statfs() - superblock is pinned down
136by resolving the pathname passed to syscall.
135->quota_read() and ->quota_write() functions are both guaranteed to 137->quota_read() and ->quota_write() functions are both guaranteed to
136be the only ones operating on the quota file by the quota code (via 138be the only ones operating on the quota file by the quota code (via
137dqio_sem) (unless an admin really wants to screw up something and 139dqio_sem) (unless an admin really wants to screw up something and
@@ -347,21 +349,36 @@ call this method upon the IO completion.
347 349
348--------------------------- block_device_operations ----------------------- 350--------------------------- block_device_operations -----------------------
349prototypes: 351prototypes:
350 int (*open) (struct inode *, struct file *); 352 int (*open) (struct block_device *, fmode_t);
351 int (*release) (struct inode *, struct file *); 353 int (*release) (struct gendisk *, fmode_t);
352 int (*ioctl) (struct inode *, struct file *, unsigned, unsigned long); 354 int (*ioctl) (struct block_device *, fmode_t, unsigned, unsigned long);
355 int (*compat_ioctl) (struct block_device *, fmode_t, unsigned, unsigned long);
356 int (*direct_access) (struct block_device *, sector_t, void **, unsigned long *);
353 int (*media_changed) (struct gendisk *); 357 int (*media_changed) (struct gendisk *);
358 void (*unlock_native_capacity) (struct gendisk *);
354 int (*revalidate_disk) (struct gendisk *); 359 int (*revalidate_disk) (struct gendisk *);
360 int (*getgeo)(struct block_device *, struct hd_geometry *);
361 void (*swap_slot_free_notify) (struct block_device *, unsigned long);
355 362
356locking rules: 363locking rules:
357 BKL bd_sem 364 BKL bd_mutex
358open: yes yes 365open: no yes
359release: yes yes 366release: no yes
360ioctl: yes no 367ioctl: no no
368compat_ioctl: no no
369direct_access: no no
361media_changed: no no 370media_changed: no no
371unlock_native_capacity: no no
362revalidate_disk: no no 372revalidate_disk: no no
373getgeo: no no
374swap_slot_free_notify: no no (see below)
375
376media_changed, unlock_native_capacity and revalidate_disk are called only from
377check_disk_change().
378
379swap_slot_free_notify is called with swap_lock and sometimes the page lock
380held.
363 381
364The last two are called only from check_disk_change().
365 382
366--------------------------- file_operations ------------------------------- 383--------------------------- file_operations -------------------------------
367prototypes: 384prototypes:
@@ -372,8 +389,6 @@ prototypes:
372 ssize_t (*aio_write) (struct kiocb *, const struct iovec *, unsigned long, loff_t); 389 ssize_t (*aio_write) (struct kiocb *, const struct iovec *, unsigned long, loff_t);
373 int (*readdir) (struct file *, void *, filldir_t); 390 int (*readdir) (struct file *, void *, filldir_t);
374 unsigned int (*poll) (struct file *, struct poll_table_struct *); 391 unsigned int (*poll) (struct file *, struct poll_table_struct *);
375 int (*ioctl) (struct inode *, struct file *, unsigned int,
376 unsigned long);
377 long (*unlocked_ioctl) (struct file *, unsigned int, unsigned long); 392 long (*unlocked_ioctl) (struct file *, unsigned int, unsigned long);
378 long (*compat_ioctl) (struct file *, unsigned int, unsigned long); 393 long (*compat_ioctl) (struct file *, unsigned int, unsigned long);
379 int (*mmap) (struct file *, struct vm_area_struct *); 394 int (*mmap) (struct file *, struct vm_area_struct *);
@@ -407,8 +422,7 @@ write: no
407aio_write: no 422aio_write: no
408readdir: no 423readdir: no
409poll: no 424poll: no
410ioctl: yes (see below) 425unlocked_ioctl: no
411unlocked_ioctl: no (see below)
412compat_ioctl: no 426compat_ioctl: no
413mmap: no 427mmap: no
414open: no 428open: no
@@ -451,9 +465,6 @@ move ->readdir() to inode_operations and use a separate method for directory
451anything that resembles union-mount we won't have a struct file for all 465anything that resembles union-mount we won't have a struct file for all
452components. And there are other reasons why the current interface is a mess... 466components. And there are other reasons why the current interface is a mess...
453 467
454->ioctl() on regular files is superceded by the ->unlocked_ioctl() that
455doesn't take the BKL.
456
457->read on directories probably must go away - we should just enforce -EISDIR 468->read on directories probably must go away - we should just enforce -EISDIR
458in sys_read() and friends. 469in sys_read() and friends.
459 470
diff --git a/Documentation/filesystems/affs.txt b/Documentation/filesystems/affs.txt
index 2d1524469c25..81ac488e3758 100644
--- a/Documentation/filesystems/affs.txt
+++ b/Documentation/filesystems/affs.txt
@@ -216,4 +216,4 @@ due to an incompatibility with the Amiga floppy controller.
216 216
217If you are interested in an Amiga Emulator for Linux, look at 217If you are interested in an Amiga Emulator for Linux, look at
218 218
219http://www.freiburg.linux.de/~uae/ 219http://web.archive.org/web/*/http://www.freiburg.linux.de/~uae/
diff --git a/Documentation/filesystems/befs.txt b/Documentation/filesystems/befs.txt
index 67391a15949a..6e49c363938e 100644
--- a/Documentation/filesystems/befs.txt
+++ b/Documentation/filesystems/befs.txt
@@ -31,7 +31,7 @@ Current maintainer: Sergey S. Kostyliov <rathamahata@php4.ru>
31 31
32WHAT IS THIS DRIVER? 32WHAT IS THIS DRIVER?
33================== 33==================
34This module implements the native filesystem of BeOS <http://www.be.com/> 34This module implements the native filesystem of BeOS http://www.beincorporated.com/
35for the linux 2.4.1 and later kernels. Currently it is a read-only 35for the linux 2.4.1 and later kernels. Currently it is a read-only
36implementation. 36implementation.
37 37
@@ -61,7 +61,7 @@ step 2. Configuration & make kernel
61 61
62The linux kernel has many compile-time options. Most of them are beyond the 62The linux kernel has many compile-time options. Most of them are beyond the
63scope of this document. I suggest the Kernel-HOWTO document as a good general 63scope of this document. I suggest the Kernel-HOWTO document as a good general
64reference on this topic. <http://www.linux.com/howto/Kernel-HOWTO.html> 64reference on this topic. http://www.linuxdocs.org/HOWTOs/Kernel-HOWTO-4.html
65 65
66However, to use the BeFS module, you must enable it at configure time. 66However, to use the BeFS module, you must enable it at configure time.
67 67
diff --git a/Documentation/filesystems/caching/fscache.txt b/Documentation/filesystems/caching/fscache.txt
index a91e2e2095b0..770267af5b3e 100644
--- a/Documentation/filesystems/caching/fscache.txt
+++ b/Documentation/filesystems/caching/fscache.txt
@@ -343,8 +343,8 @@ This will look something like:
343 [root@andromeda ~]# head /proc/fs/fscache/objects 343 [root@andromeda ~]# head /proc/fs/fscache/objects
344 OBJECT PARENT STAT CHLDN OPS OOP IPR EX READS EM EV F S | NETFS_COOKIE_DEF TY FL NETFS_DATA OBJECT_KEY, AUX_DATA 344 OBJECT PARENT STAT CHLDN OPS OOP IPR EX READS EM EV F S | NETFS_COOKIE_DEF TY FL NETFS_DATA OBJECT_KEY, AUX_DATA
345 ======== ======== ==== ===== === === === == ===== == == = = | ================ == == ================ ================ 345 ======== ======== ==== ===== === === === == ===== == == = = | ================ == == ================ ================
346 17e4b 2 ACTV 0 0 0 0 0 0 7b 4 0 8 | NFS.fh DT 0 ffff88001dd82820 010006017edcf8bbc93b43298fdfbe71e50b57b13a172c0117f38472, e567634700000000000000000000000063f2404a000000000000000000000000c9030000000000000000000063f2404a 346 17e4b 2 ACTV 0 0 0 0 0 0 7b 4 0 0 | NFS.fh DT 0 ffff88001dd82820 010006017edcf8bbc93b43298fdfbe71e50b57b13a172c0117f38472, e567634700000000000000000000000063f2404a000000000000000000000000c9030000000000000000000063f2404a
347 1693a 2 ACTV 0 0 0 0 0 0 7b 4 0 8 | NFS.fh DT 0 ffff88002db23380 010006017edcf8bbc93b43298fdfbe71e50b57b1e0162c01a2df0ea6, 420ebc4a000000000000000000000000420ebc4a0000000000000000000000000e1801000000000000000000420ebc4a 347 1693a 2 ACTV 0 0 0 0 0 0 7b 4 0 0 | NFS.fh DT 0 ffff88002db23380 010006017edcf8bbc93b43298fdfbe71e50b57b1e0162c01a2df0ea6, 420ebc4a000000000000000000000000420ebc4a0000000000000000000000000e1801000000000000000000420ebc4a
348 348
349where the first set of columns before the '|' describe the object: 349where the first set of columns before the '|' describe the object:
350 350
@@ -362,7 +362,7 @@ where the first set of columns before the '|' describe the object:
362 EM Object's event mask 362 EM Object's event mask
363 EV Events raised on this object 363 EV Events raised on this object
364 F Object flags 364 F Object flags
365 S Object slow-work work item flags 365 S Object work item busy state mask (1:pending 2:running)
366 366
367and the second set of columns describe the object's cookie, if present: 367and the second set of columns describe the object's cookie, if present:
368 368
@@ -395,8 +395,8 @@ and the following paired letters:
395 w Show objects that don't have pending writes 395 w Show objects that don't have pending writes
396 R Show objects that have outstanding reads 396 R Show objects that have outstanding reads
397 r Show objects that don't have outstanding reads 397 r Show objects that don't have outstanding reads
398 S Show objects that have slow work queued 398 S Show objects that have work queued
399 s Show objects that don't have slow work queued 399 s Show objects that don't have work queued
400 400
401If neither side of a letter pair is given, then both are implied. For example: 401If neither side of a letter pair is given, then both are implied. For example:
402 402
diff --git a/Documentation/filesystems/ext4.txt b/Documentation/filesystems/ext4.txt
index e1def1786e50..6ab9442d7eeb 100644
--- a/Documentation/filesystems/ext4.txt
+++ b/Documentation/filesystems/ext4.txt
@@ -353,6 +353,20 @@ noauto_da_alloc replacing existing files via patterns such as
353 system crashes before the delayed allocation 353 system crashes before the delayed allocation
354 blocks are forced to disk. 354 blocks are forced to disk.
355 355
356noinit_itable Do not initialize any uninitialized inode table
357 blocks in the background. This feature may be
358 used by installation CD's so that the install
359 process can complete as quickly as possible; the
360 inode table initialization process would then be
361 deferred until the next time the file system
362 is unmounted.
363
364init_itable=n The lazy itable init code will wait n times the
365 number of milliseconds it took to zero out the
366 previous block group's inode table. This
367 minimizes the impact on the systme performance
368 while file system's inode table is being initialized.
369
356discard Controls whether ext4 should issue discard/TRIM 370discard Controls whether ext4 should issue discard/TRIM
357nodiscard(*) commands to the underlying block device when 371nodiscard(*) commands to the underlying block device when
358 blocks are freed. This is useful for SSD devices 372 blocks are freed. This is useful for SSD devices
diff --git a/Documentation/filesystems/isofs.txt b/Documentation/filesystems/isofs.txt
index 3c367c3b3608..ba0a93384de0 100644
--- a/Documentation/filesystems/isofs.txt
+++ b/Documentation/filesystems/isofs.txt
@@ -41,7 +41,7 @@ Mount options unique to the isofs filesystem.
41 sbsector=xxx Session begins from sector xxx 41 sbsector=xxx Session begins from sector xxx
42 42
43Recommended documents about ISO 9660 standard are located at: 43Recommended documents about ISO 9660 standard are located at:
44http://www.y-adagio.com/public/standards/iso_cdromr/tocont.htm 44http://www.y-adagio.com/
45ftp://ftp.ecma.ch/ecma-st/Ecma-119.pdf 45ftp://ftp.ecma.ch/ecma-st/Ecma-119.pdf
46Quoting from the PDF "This 2nd Edition of Standard ECMA-119 is technically 46Quoting from the PDF "This 2nd Edition of Standard ECMA-119 is technically
47identical with ISO 9660.", so it is a valid and gratis substitute of the 47identical with ISO 9660.", so it is a valid and gratis substitute of the
diff --git a/Documentation/filesystems/nfs/00-INDEX b/Documentation/filesystems/nfs/00-INDEX
index 2f68cd688769..a57e12411d2a 100644
--- a/Documentation/filesystems/nfs/00-INDEX
+++ b/Documentation/filesystems/nfs/00-INDEX
@@ -12,5 +12,9 @@ nfs-rdma.txt
12 - how to install and setup the Linux NFS/RDMA client and server software 12 - how to install and setup the Linux NFS/RDMA client and server software
13nfsroot.txt 13nfsroot.txt
14 - short guide on setting up a diskless box with NFS root filesystem. 14 - short guide on setting up a diskless box with NFS root filesystem.
15pnfs.txt
16 - short explanation of some of the internals of the pnfs client code
15rpc-cache.txt 17rpc-cache.txt
16 - introduction to the caching mechanisms in the sunrpc layer. 18 - introduction to the caching mechanisms in the sunrpc layer.
19idmapper.txt
20 - information for configuring request-keys to be used by idmapper
diff --git a/Documentation/filesystems/nfs/idmapper.txt b/Documentation/filesystems/nfs/idmapper.txt
new file mode 100644
index 000000000000..b9b4192ea8b5
--- /dev/null
+++ b/Documentation/filesystems/nfs/idmapper.txt
@@ -0,0 +1,67 @@
1
2=========
3ID Mapper
4=========
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
7performing an upcall to userspace to request the information. Id mapper will
8user request-key to perform this upcall and cache the result. The program
9/usr/sbin/nfs.idmap should be called by request-key, and will perform the
10translation and initialize a key with the resulting information.
11
12 NFS_USE_NEW_IDMAPPER must be selected when configuring the kernel to use this
13 feature.
14
15===========
16Configuring
17===========
18The file /etc/request-key.conf will need to be modified so /sbin/request-key can
19direct the upcall. The following line should be added:
20
21#OP TYPE DESCRIPTION CALLOUT INFO PROGRAM ARG1 ARG2 ARG3 ...
22#====== ======= =============== =============== ===============================
23create id_resolver * * /usr/sbin/nfs.idmap %k %d 600
24
25This will direct all id_resolver requests to the program /usr/sbin/nfs.idmap.
26The last parameter, 600, defines how many seconds into the future the key will
27expire. This parameter is optional for /usr/sbin/nfs.idmap. When the timeout
28is not specified, nfs.idmap will default to 600 seconds.
29
30id mapper uses for key descriptions:
31 uid: Find the UID for the given user
32 gid: Find the GID for the given group
33 user: Find the user name for the given UID
34 group: Find the group name for the given GID
35
36You can handle any of these individually, rather than using the generic upcall
37program. If you would like to use your own program for a uid lookup then you
38would edit your request-key.conf so it look similar to this:
39
40#OP TYPE DESCRIPTION CALLOUT INFO PROGRAM ARG1 ARG2 ARG3 ...
41#====== ======= =============== =============== ===============================
42create id_resolver uid:* * /some/other/program %k %d 600
43create id_resolver * * /usr/sbin/nfs.idmap %k %d 600
44
45Notice that the new line was added above the line for the generic program.
46request-key will find the first matching line and corresponding program. In
47this case, /some/other/program will handle all uid lookups and
48/usr/sbin/nfs.idmap will handle gid, user, and group lookups.
49
50See <file:Documentation/keys-request-keys.txt> for more information about the
51request-key function.
52
53
54=========
55nfs.idmap
56=========
57nfs.idmap is designed to be called by request-key, and should not be run "by
58hand". This program takes two arguments, a serialized key and a key
59description. The serialized key is first converted into a key_serial_t, and
60then passed as an argument to keyctl_instantiate (both are part of keyutils.h).
61
62The actual lookups are performed by functions found in nfsidmap.h. nfs.idmap
63determines the correct function to call by looking at the first part of the
64description string. For example, a uid lookup description will appear as
65"uid:user@domain".
66
67nfs.idmap will return 0 if the key was instantiated, and non-zero otherwise.
diff --git a/Documentation/filesystems/nfs/nfsroot.txt b/Documentation/filesystems/nfs/nfsroot.txt
index 3ba0b945aaf8..90c71c6f0d00 100644
--- a/Documentation/filesystems/nfs/nfsroot.txt
+++ b/Documentation/filesystems/nfs/nfsroot.txt
@@ -124,6 +124,8 @@ ip=<client-ip>:<server-ip>:<gw-ip>:<netmask>:<hostname>:<device>:<autoconf>
124 124
125 <hostname> Name of the client. May be supplied by autoconfiguration, 125 <hostname> Name of the client. May be supplied by autoconfiguration,
126 but its absence will not trigger autoconfiguration. 126 but its absence will not trigger autoconfiguration.
127 If specified and DHCP is used, the user provided hostname will
128 be carried in the DHCP request to hopefully update DNS record.
127 129
128 Default: Client IP address is used in ASCII notation. 130 Default: Client IP address is used in ASCII notation.
129 131
@@ -157,6 +159,28 @@ ip=<client-ip>:<server-ip>:<gw-ip>:<netmask>:<hostname>:<device>:<autoconf>
157 Default: any 159 Default: any
158 160
159 161
162nfsrootdebug
163
164 This parameter enables debugging messages to appear in the kernel
165 log at boot time so that administrators can verify that the correct
166 NFS mount options, server address, and root path are passed to the
167 NFS client.
168
169
170rdinit=<executable file>
171
172 To specify which file contains the program that starts system
173 initialization, administrators can use this command line parameter.
174 The default value of this parameter is "/init". If the specified
175 file exists and the kernel can execute it, root filesystem related
176 kernel command line parameters, including `nfsroot=', are ignored.
177
178 A description of the process of mounting the root file system can be
179 found in:
180
181 Documentation/early-userspace/README
182
183
160 184
161 185
1623.) Boot Loader 1863.) Boot Loader
diff --git a/Documentation/filesystems/nfs/pnfs.txt b/Documentation/filesystems/nfs/pnfs.txt
new file mode 100644
index 000000000000..bc0b9cfe095b
--- /dev/null
+++ b/Documentation/filesystems/nfs/pnfs.txt
@@ -0,0 +1,48 @@
1Reference counting in pnfs:
2==========================
3
4The are several inter-related caches. We have layouts which can
5reference multiple devices, each of which can reference multiple data servers.
6Each data server can be referenced by multiple devices. Each device
7can be referenced by multiple layouts. To keep all of this straight,
8we need to reference count.
9
10
11struct pnfs_layout_hdr
12----------------------
13The on-the-wire command LAYOUTGET corresponds to struct
14pnfs_layout_segment, usually referred to by the variable name lseg.
15Each nfs_inode may hold a pointer to a cache of of these layout
16segments in nfsi->layout, of type struct pnfs_layout_hdr.
17
18We reference the header for the inode pointing to it, across each
19outstanding RPC call that references it (LAYOUTGET, LAYOUTRETURN,
20LAYOUTCOMMIT), and for each lseg held within.
21
22Each header is also (when non-empty) put on a list associated with
23struct nfs_client (cl_layouts). Being put on this list does not bump
24the reference count, as the layout is kept around by the lseg that
25keeps it in the list.
26
27deviceid_cache
28--------------
29lsegs reference device ids, which are resolved per nfs_client and
30layout driver type. The device ids are held in a RCU cache (struct
31nfs4_deviceid_cache). The cache itself is referenced across each
32mount. The entries (struct nfs4_deviceid) themselves are held across
33the lifetime of each lseg referencing them.
34
35RCU is used because the deviceid is basically a write once, read many
36data structure. The hlist size of 32 buckets needs better
37justification, but seems reasonable given that we can have multiple
38deviceid's per filesystem, and multiple filesystems per nfs_client.
39
40The hash code is copied from the nfsd code base. A discussion of
41hashing and variations of this algorithm can be found at:
42http://groups.google.com/group/comp.lang.c/browse_thread/thread/9522965e2b8d3809
43
44data server cache
45-----------------
46file driver devices refer to data servers, which are kept in a module
47level cache. Its reference is held over the lifetime of the deviceid
48pointing to it.
diff --git a/Documentation/filesystems/nilfs2.txt b/Documentation/filesystems/nilfs2.txt
index d3e7673995eb..d5c0cef38a71 100644
--- a/Documentation/filesystems/nilfs2.txt
+++ b/Documentation/filesystems/nilfs2.txt
@@ -49,7 +49,10 @@ Mount options
49NILFS2 supports the following mount options: 49NILFS2 supports the following mount options:
50(*) == default 50(*) == default
51 51
52nobarrier Disables barriers. 52barrier(*) This enables/disables the use of write barriers. This
53nobarrier requires an IO stack which can support barriers, and
54 if nilfs gets an error on a barrier write, it will
55 disable again with a warning.
53errors=continue Keep going on a filesystem error. 56errors=continue Keep going on a filesystem error.
54errors=remount-ro(*) Remount the filesystem read-only on an error. 57errors=remount-ro(*) Remount the filesystem read-only on an error.
55errors=panic Panic and halt the machine if an error occurs. 58errors=panic Panic and halt the machine if an error occurs.
@@ -74,9 +77,10 @@ norecovery Disable recovery of the filesystem on mount.
74 This disables every write access on the device for 77 This disables every write access on the device for
75 read-only mounts or snapshots. This option will fail 78 read-only mounts or snapshots. This option will fail
76 for r/w mounts on an unclean volume. 79 for r/w mounts on an unclean volume.
77discard Issue discard/TRIM commands to the underlying block 80discard This enables/disables the use of discard/TRIM commands.
78 device when blocks are freed. This is useful for SSD 81nodiscard(*) The discard/TRIM commands are sent to the underlying
79 devices and sparse/thinly-provisioned LUNs. 82 block device when blocks are freed. This is useful
83 for SSD devices and sparse/thinly-provisioned LUNs.
80 84
81NILFS2 usage 85NILFS2 usage
82============ 86============
diff --git a/Documentation/filesystems/ocfs2.txt b/Documentation/filesystems/ocfs2.txt
index 1f7ae144f6d8..5393e6611691 100644
--- a/Documentation/filesystems/ocfs2.txt
+++ b/Documentation/filesystems/ocfs2.txt
@@ -87,3 +87,10 @@ dir_resv_level= (*) By default, directory reservations will scale with file
87 reservations - users should rarely need to change this 87 reservations - users should rarely need to change this
88 value. If allocation reservations are turned off, this 88 value. If allocation reservations are turned off, this
89 option will have no effect. 89 option will have no effect.
90coherency=full (*) Disallow concurrent O_DIRECT writes, cluster inode
91 lock will be taken to force other nodes drop cache,
92 therefore full cluster coherency is guaranteed even
93 for O_DIRECT writes.
94coherency=buffered Allow concurrent O_DIRECT writes without EX lock among
95 nodes, which gains high performance at risk of getting
96 stale data on other nodes.
diff --git a/Documentation/filesystems/porting b/Documentation/filesystems/porting
index a7e9746ee7ea..b12c89538680 100644
--- a/Documentation/filesystems/porting
+++ b/Documentation/filesystems/porting
@@ -273,3 +273,48 @@ it's safe to remove it. If you don't need it, remove it.
273deliberate; as soon as struct block_device * is propagated in a reasonable 273deliberate; as soon as struct block_device * is propagated in a reasonable
274way by that code fixing will become trivial; until then nothing can be 274way by that code fixing will become trivial; until then nothing can be
275done. 275done.
276
277[mandatory]
278
279 block truncatation on error exit from ->write_begin, and ->direct_IO
280moved from generic methods (block_write_begin, cont_write_begin,
281nobh_write_begin, blockdev_direct_IO*) to callers. Take a look at
282ext2_write_failed and callers for an example.
283
284[mandatory]
285
286 ->truncate is going away. The whole truncate sequence needs to be
287implemented in ->setattr, which is now mandatory for filesystems
288implementing on-disk size changes. Start with a copy of the old inode_setattr
289and vmtruncate, and the reorder the vmtruncate + foofs_vmtruncate sequence to
290be in order of zeroing blocks using block_truncate_page or similar helpers,
291size update and on finally on-disk truncation which should not fail.
292inode_change_ok now includes the size checks for ATTR_SIZE and must be called
293in the beginning of ->setattr unconditionally.
294
295[mandatory]
296
297 ->clear_inode() and ->delete_inode() are gone; ->evict_inode() should
298be used instead. It gets called whenever the inode is evicted, whether it has
299remaining links or not. Caller does *not* evict the pagecache or inode-associated
300metadata buffers; getting rid of those is responsibility of method, as it had
301been for ->delete_inode().
302 ->drop_inode() returns int now; it's called on final iput() with inode_lock
303held and it returns true if filesystems wants the inode to be dropped. As before,
304generic_drop_inode() is still the default and it's been updated appropriately.
305generic_delete_inode() is also alive and it consists simply of return 1. Note that
306all actual eviction work is done by caller after ->drop_inode() returns.
307 clear_inode() is gone; use end_writeback() instead. As before, it must
308be called exactly once on each call of ->evict_inode() (as it used to be for
309each call of ->delete_inode()). Unlike before, if you are using inode-associated
310metadata buffers (i.e. mark_buffer_dirty_inode()), it's your responsibility to
311call invalidate_inode_buffers() before end_writeback().
312 No async writeback (and thus no calls of ->write_inode()) will happen
313after end_writeback() returns, so actions that should not overlap with ->write_inode()
314(e.g. freeing on-disk inode if i_nlink is 0) ought to be done after that call.
315
316 NOTE: checking i_nlink in the beginning of ->write_inode() and bailing out
317if it's zero is not *and* *never* *had* *been* enough. Final unlink() and iput()
318may happen while the inode is in the middle of ->write_inode(); e.g. if you blindly
319free the on-disk inode, you may end up doing that while ->write_inode() is writing
320to it.
diff --git a/Documentation/filesystems/proc.txt b/Documentation/filesystems/proc.txt
index 9fb6cbe70bde..e73df2722ff3 100644
--- a/Documentation/filesystems/proc.txt
+++ b/Documentation/filesystems/proc.txt
@@ -33,7 +33,8 @@ Table of Contents
33 2 Modifying System Parameters 33 2 Modifying System Parameters
34 34
35 3 Per-Process Parameters 35 3 Per-Process Parameters
36 3.1 /proc/<pid>/oom_adj - Adjust the oom-killer score 36 3.1 /proc/<pid>/oom_adj & /proc/<pid>/oom_score_adj - Adjust the oom-killer
37 score
37 3.2 /proc/<pid>/oom_score - Display current oom-killer score 38 3.2 /proc/<pid>/oom_score - Display current oom-killer score
38 3.3 /proc/<pid>/io - Display the IO accounting fields 39 3.3 /proc/<pid>/io - Display the IO accounting fields
39 3.4 /proc/<pid>/coredump_filter - Core dump filtering settings 40 3.4 /proc/<pid>/coredump_filter - Core dump filtering settings
@@ -73,9 +74,9 @@ contact Bodo Bauer at bb@ricochet.net. We'll be happy to add them to this
73document. 74document.
74 75
75The latest version of this document is available online at 76The latest version of this document is available online at
76http://skaro.nightcrawler.com/~bb/Docs/Proc as HTML version. 77http://tldp.org/LDP/Linux-Filesystem-Hierarchy/html/proc.html
77 78
78If the above direction does not works for you, ypu could try the kernel 79If the above direction does not works for you, you could try the kernel
79mailing list at linux-kernel@vger.kernel.org and/or try to reach me at 80mailing list at linux-kernel@vger.kernel.org and/or try to reach me at
80comandante@zaralinux.com. 81comandante@zaralinux.com.
81 82
@@ -135,6 +136,7 @@ Table 1-1: Process specific entries in /proc
135 statm Process memory status information 136 statm Process memory status information
136 status Process status in human readable form 137 status Process status in human readable form
137 wchan If CONFIG_KALLSYMS is set, a pre-decoded wchan 138 wchan If CONFIG_KALLSYMS is set, a pre-decoded wchan
139 pagemap Page table
138 stack Report full stack trace, enable via CONFIG_STACKTRACE 140 stack Report full stack trace, enable via CONFIG_STACKTRACE
139 smaps a extension based on maps, showing the memory consumption of 141 smaps a extension based on maps, showing the memory consumption of
140 each mapping 142 each mapping
@@ -369,17 +371,24 @@ Shared_Dirty: 0 kB
369Private_Clean: 0 kB 371Private_Clean: 0 kB
370Private_Dirty: 0 kB 372Private_Dirty: 0 kB
371Referenced: 892 kB 373Referenced: 892 kB
374Anonymous: 0 kB
372Swap: 0 kB 375Swap: 0 kB
373KernelPageSize: 4 kB 376KernelPageSize: 4 kB
374MMUPageSize: 4 kB 377MMUPageSize: 4 kB
375 378
376The first of these lines shows the same information as is displayed for the 379The first of these lines shows the same information as is displayed for the
377mapping in /proc/PID/maps. The remaining lines show the size of the mapping, 380mapping in /proc/PID/maps. The remaining lines show the size of the mapping
378the amount of the mapping that is currently resident in RAM, the "proportional 381(size), the amount of the mapping that is currently resident in RAM (RSS), the
379set size” (divide each shared page by the number of processes sharing it), the 382process' proportional share of this mapping (PSS), the number of clean and
380number of clean and dirty shared pages in the mapping, and the number of clean 383dirty private pages in the mapping. Note that even a page which is part of a
381and dirty private pages in the mapping. The "Referenced" indicates the amount 384MAP_SHARED mapping, but has only a single pte mapped, i.e. is currently used
382of memory currently marked as referenced or accessed. 385by only one process, is accounted as private and not as shared. "Referenced"
386indicates the amount of memory currently marked as referenced or accessed.
387"Anonymous" shows the amount of memory that does not belong to any file. Even
388a mapping associated with a file may contain anonymous pages: when MAP_PRIVATE
389and a page is modified, the file page is replaced by a private anonymous copy.
390"Swap" shows how much would-be-anonymous memory is also used, but out on
391swap.
383 392
384This file is only present if the CONFIG_MMU kernel configuration option is 393This file is only present if the CONFIG_MMU kernel configuration option is
385enabled. 394enabled.
@@ -396,6 +405,9 @@ To clear the bits for the file mapped pages associated with the process
396 > echo 3 > /proc/PID/clear_refs 405 > echo 3 > /proc/PID/clear_refs
397Any other value written to /proc/PID/clear_refs will have no effect. 406Any other value written to /proc/PID/clear_refs will have no effect.
398 407
408The /proc/pid/pagemap gives the PFN, which can be used to find the pageflags
409using /proc/kpageflags and number of times a page is mapped using
410/proc/kpagecount. For detailed explanation, see Documentation/vm/pagemap.txt.
399 411
4001.2 Kernel data 4121.2 Kernel data
401--------------- 413---------------
@@ -1234,42 +1246,64 @@ of the kernel.
1234CHAPTER 3: PER-PROCESS PARAMETERS 1246CHAPTER 3: PER-PROCESS PARAMETERS
1235------------------------------------------------------------------------------ 1247------------------------------------------------------------------------------
1236 1248
12373.1 /proc/<pid>/oom_adj - Adjust the oom-killer score 12493.1 /proc/<pid>/oom_adj & /proc/<pid>/oom_score_adj- Adjust the oom-killer score
1238------------------------------------------------------ 1250--------------------------------------------------------------------------------
1239 1251
1240This file can be used to adjust the score used to select which processes 1252These file can be used to adjust the badness heuristic used to select which
1241should be killed in an out-of-memory situation. Giving it a high score will 1253process gets killed in out of memory conditions.
1242increase the likelihood of this process being killed by the oom-killer. Valid 1254
1243values are in the range -16 to +15, plus the special value -17, which disables 1255The badness heuristic assigns a value to each candidate task ranging from 0
1244oom-killing altogether for this process. 1256(never kill) to 1000 (always kill) to determine which process is targeted. The
1245 1257units are roughly a proportion along that range of allowed memory the process
1246The process to be killed in an out-of-memory situation is selected among all others 1258may allocate from based on an estimation of its current memory and swap use.
1247based on its badness score. This value equals the original memory size of the process 1259For example, if a task is using all allowed memory, its badness score will be
1248and is then updated according to its CPU time (utime + stime) and the 12601000. If it is using half of its allowed memory, its score will be 500.
1249run time (uptime - start time). The longer it runs the smaller is the score. 1261
1250Badness score is divided by the square root of the CPU time and then by 1262There is an additional factor included in the badness score: root
1251the double square root of the run time. 1263processes are given 3% extra memory over other tasks.
1252 1264
1253Swapped out tasks are killed first. Half of each child's memory size is added to 1265The amount of "allowed" memory depends on the context in which the oom killer
1254the parent's score if they do not share the same memory. Thus forking servers 1266was called. If it is due to the memory assigned to the allocating task's cpuset
1255are the prime candidates to be killed. Having only one 'hungry' child will make 1267being exhausted, the allowed memory represents the set of mems assigned to that
1256parent less preferable than the child. 1268cpuset. If it is due to a mempolicy's node(s) being exhausted, the allowed
1257 1269memory represents the set of mempolicy nodes. If it is due to a memory
1258/proc/<pid>/oom_score shows process' current badness score. 1270limit (or swap limit) being reached, the allowed memory is that configured
1259 1271limit. Finally, if it is due to the entire system being out of memory, the
1260The following heuristics are then applied: 1272allowed memory represents all allocatable resources.
1261 * if the task was reniced, its score doubles 1273
1262 * superuser or direct hardware access tasks (CAP_SYS_ADMIN, CAP_SYS_RESOURCE 1274The value of /proc/<pid>/oom_score_adj is added to the badness score before it
1263 or CAP_SYS_RAWIO) have their score divided by 4 1275is used to determine which task to kill. Acceptable values range from -1000
1264 * if oom condition happened in one cpuset and checked process does not belong 1276(OOM_SCORE_ADJ_MIN) to +1000 (OOM_SCORE_ADJ_MAX). This allows userspace to
1265 to it, its score is divided by 8 1277polarize the preference for oom killing either by always preferring a certain
1266 * the resulting score is multiplied by two to the power of oom_adj, i.e. 1278task or completely disabling it. The lowest possible value, -1000, is
1267 points <<= oom_adj when it is positive and 1279equivalent to disabling oom killing entirely for that task since it will always
1268 points >>= -(oom_adj) otherwise 1280report a badness score of 0.
1269 1281
1270The task with the highest badness score is then selected and its children 1282Consequently, it is very simple for userspace to define the amount of memory to
1271are killed, process itself will be killed in an OOM situation when it does 1283consider for each task. Setting a /proc/<pid>/oom_score_adj value of +500, for
1272not have children or some of them disabled oom like described above. 1284example, is roughly equivalent to allowing the remainder of tasks sharing the
1285same system, cpuset, mempolicy, or memory controller resources to use at least
128650% more memory. A value of -500, on the other hand, would be roughly
1287equivalent to discounting 50% of the task's allowed memory from being considered
1288as scoring against the task.
1289
1290For backwards compatibility with previous kernels, /proc/<pid>/oom_adj may also
1291be used to tune the badness score. Its acceptable values range from -16
1292(OOM_ADJUST_MIN) to +15 (OOM_ADJUST_MAX) and a special value of -17
1293(OOM_DISABLE) to disable oom killing entirely for that task. Its value is
1294scaled linearly with /proc/<pid>/oom_score_adj.
1295
1296Writing to /proc/<pid>/oom_score_adj or /proc/<pid>/oom_adj will change the
1297other with its scaled value.
1298
1299NOTICE: /proc/<pid>/oom_adj is deprecated and will be removed, please see
1300Documentation/feature-removal-schedule.txt.
1301
1302Caveat: when a parent task is selected, the oom killer will sacrifice any first
1303generation children with seperate address spaces instead, if possible. This
1304avoids servers and important system daemons from being killed and loses the
1305minimal amount of work.
1306
1273 1307
12743.2 /proc/<pid>/oom_score - Display current oom-killer score 13083.2 /proc/<pid>/oom_score - Display current oom-killer score
1275------------------------------------------------------------- 1309-------------------------------------------------------------
diff --git a/Documentation/filesystems/sharedsubtree.txt b/Documentation/filesystems/sharedsubtree.txt
index fc0e39af43c3..4ede421c9687 100644
--- a/Documentation/filesystems/sharedsubtree.txt
+++ b/Documentation/filesystems/sharedsubtree.txt
@@ -62,10 +62,10 @@ replicas continue to be exactly same.
62 # mount /dev/sd0 /tmp/a 62 # mount /dev/sd0 /tmp/a
63 63
64 #ls /tmp/a 64 #ls /tmp/a
65 t1 t2 t2 65 t1 t2 t3
66 66
67 #ls /mnt/a 67 #ls /mnt/a
68 t1 t2 t2 68 t1 t2 t3
69 69
70 Note that the mount has propagated to the mount at /mnt as well. 70 Note that the mount has propagated to the mount at /mnt as well.
71 71
diff --git a/Documentation/filesystems/smbfs.txt b/Documentation/filesystems/smbfs.txt
deleted file mode 100644
index 194fb0decd2c..000000000000
--- a/Documentation/filesystems/smbfs.txt
+++ /dev/null
@@ -1,8 +0,0 @@
1Smbfs is a filesystem that implements the SMB protocol, which is the
2protocol used by Windows for Workgroups, Windows 95 and Windows NT.
3Smbfs was inspired by Samba, the program written by Andrew Tridgell
4that turns any Unix host into a file server for DOS or Windows clients.
5
6Smbfs is a SMB client, but uses parts of samba for its operation. For
7more info on samba, including documentation, please go to
8http://www.samba.org/ and then on to your nearest mirror.
diff --git a/Documentation/filesystems/squashfs.txt b/Documentation/filesystems/squashfs.txt
index 203f7202cc9e..66699afd66ca 100644
--- a/Documentation/filesystems/squashfs.txt
+++ b/Documentation/filesystems/squashfs.txt
@@ -2,7 +2,7 @@ SQUASHFS 4.0 FILESYSTEM
2======================= 2=======================
3 3
4Squashfs is a compressed read-only filesystem for Linux. 4Squashfs is a compressed read-only filesystem for Linux.
5It uses zlib compression to compress files, inodes and directories. 5It uses zlib/lzo compression to compress files, inodes and directories.
6Inodes in the system are very small and all blocks are packed to minimise 6Inodes in the system are very small and all blocks are packed to minimise
7data overhead. Block sizes greater than 4K are supported up to a maximum 7data overhead. Block sizes greater than 4K are supported up to a maximum
8of 1Mbytes (default block size 128K). 8of 1Mbytes (default block size 128K).
diff --git a/Documentation/filesystems/sysfs-pci.txt b/Documentation/filesystems/sysfs-pci.txt
index 85354b32d731..74eaac26f8b8 100644
--- a/Documentation/filesystems/sysfs-pci.txt
+++ b/Documentation/filesystems/sysfs-pci.txt
@@ -39,7 +39,7 @@ files, each with their own function.
39 local_cpus nearby CPU mask (cpumask, ro) 39 local_cpus nearby CPU mask (cpumask, ro)
40 remove remove device from kernel's list (ascii, wo) 40 remove remove device from kernel's list (ascii, wo)
41 resource PCI resource host addresses (ascii, ro) 41 resource PCI resource host addresses (ascii, ro)
42 resource0..N PCI resource N, if present (binary, mmap) 42 resource0..N PCI resource N, if present (binary, mmap, rw[1])
43 resource0_wc..N_wc PCI WC map resource N, if prefetchable (binary, mmap) 43 resource0_wc..N_wc PCI WC map resource N, if prefetchable (binary, mmap)
44 rom PCI ROM resource, if present (binary, ro) 44 rom PCI ROM resource, if present (binary, ro)
45 subsystem_device PCI subsystem device (ascii, ro) 45 subsystem_device PCI subsystem device (ascii, ro)
@@ -54,13 +54,16 @@ files, each with their own function.
54 binary - file contains binary data 54 binary - file contains binary data
55 cpumask - file contains a cpumask type 55 cpumask - file contains a cpumask type
56 56
57[1] rw for RESOURCE_IO (I/O port) regions only
58
57The read only files are informational, writes to them will be ignored, with 59The read only files are informational, writes to them will be ignored, with
58the exception of the 'rom' file. Writable files can be used to perform 60the exception of the 'rom' file. Writable files can be used to perform
59actions on the device (e.g. changing config space, detaching a device). 61actions on the device (e.g. changing config space, detaching a device).
60mmapable files are available via an mmap of the file at offset 0 and can be 62mmapable files are available via an mmap of the file at offset 0 and can be
61used to do actual device programming from userspace. Note that some platforms 63used to do actual device programming from userspace. Note that some platforms
62don't support mmapping of certain resources, so be sure to check the return 64don't support mmapping of certain resources, so be sure to check the return
63value from any attempted mmap. 65value from any attempted mmap. The most notable of these are I/O port
66resources, which also provide read/write access.
64 67
65The 'enable' file provides a counter that indicates how many times the device 68The 'enable' file provides a counter that indicates how many times the device
66has been enabled. If the 'enable' file currently returns '4', and a '1' is 69has been enabled. If the 'enable' file currently returns '4', and a '1' is
diff --git a/Documentation/filesystems/sysfs.txt b/Documentation/filesystems/sysfs.txt
index 931c806642c5..5d1335faec2d 100644
--- a/Documentation/filesystems/sysfs.txt
+++ b/Documentation/filesystems/sysfs.txt
@@ -4,7 +4,7 @@ sysfs - _The_ filesystem for exporting kernel objects.
4Patrick Mochel <mochel@osdl.org> 4Patrick Mochel <mochel@osdl.org>
5Mike Murphy <mamurph@cs.clemson.edu> 5Mike Murphy <mamurph@cs.clemson.edu>
6 6
7Revised: 22 February 2009 7Revised: 15 July 2010
8Original: 10 January 2003 8Original: 10 January 2003
9 9
10 10
@@ -124,7 +124,7 @@ show and store methods of the attribute owners.
124 124
125struct sysfs_ops { 125struct sysfs_ops {
126 ssize_t (*show)(struct kobject *, struct attribute *, char *); 126 ssize_t (*show)(struct kobject *, struct attribute *, char *);
127 ssize_t (*store)(struct kobject *, struct attribute *, const char *); 127 ssize_t (*store)(struct kobject *, struct attribute *, const char *, size_t);
128}; 128};
129 129
130[ Subsystems should have already defined a struct kobj_type as a 130[ Subsystems should have already defined a struct kobj_type as a
@@ -139,18 +139,22 @@ calls the associated methods.
139 139
140To illustrate: 140To illustrate:
141 141
142#define to_dev(obj) container_of(obj, struct device, kobj)
142#define to_dev_attr(_attr) container_of(_attr, struct device_attribute, attr) 143#define to_dev_attr(_attr) container_of(_attr, struct device_attribute, attr)
143#define to_dev(d) container_of(d, struct device, kobj)
144 144
145static ssize_t 145static ssize_t dev_attr_show(struct kobject *kobj, struct attribute *attr,
146dev_attr_show(struct kobject * kobj, struct attribute * attr, char * buf) 146 char *buf)
147{ 147{
148 struct device_attribute * dev_attr = to_dev_attr(attr); 148 struct device_attribute *dev_attr = to_dev_attr(attr);
149 struct device * dev = to_dev(kobj); 149 struct device *dev = to_dev(kobj);
150 ssize_t ret = 0; 150 ssize_t ret = -EIO;
151 151
152 if (dev_attr->show) 152 if (dev_attr->show)
153 ret = dev_attr->show(dev, buf); 153 ret = dev_attr->show(dev, dev_attr, buf);
154 if (ret >= (ssize_t)PAGE_SIZE) {
155 print_symbol("dev_attr_show: %s returned bad count\n",
156 (unsigned long)dev_attr->show);
157 }
154 return ret; 158 return ret;
155} 159}
156 160
@@ -163,10 +167,9 @@ To read or write attributes, show() or store() methods must be
163specified when declaring the attribute. The method types should be as 167specified when declaring the attribute. The method types should be as
164simple as those defined for device attributes: 168simple as those defined for device attributes:
165 169
166ssize_t (*show)(struct device * dev, struct device_attribute * attr, 170ssize_t (*show)(struct device *dev, struct device_attribute *attr, char *buf);
167 char * buf); 171ssize_t (*store)(struct device *dev, struct device_attribute *attr,
168ssize_t (*store)(struct device * dev, struct device_attribute * attr, 172 const char *buf, size_t count);
169 const char * buf);
170 173
171IOW, they should take only an object, an attribute, and a buffer as parameters. 174IOW, they should take only an object, an attribute, and a buffer as parameters.
172 175
@@ -209,8 +212,8 @@ Other notes:
209 212
210- show() should always use snprintf(). 213- show() should always use snprintf().
211 214
212- store() should return the number of bytes used from the buffer. This 215- store() should return the number of bytes used from the buffer. If the
213 can be done using strlen(). 216 entire buffer has been used, just return the count argument.
214 217
215- show() or store() can always return errors. If a bad value comes 218- show() or store() can always return errors. If a bad value comes
216 through, be sure to return an error. 219 through, be sure to return an error.
@@ -223,15 +226,18 @@ Other notes:
223 226
224A very simple (and naive) implementation of a device attribute is: 227A very simple (and naive) implementation of a device attribute is:
225 228
226static ssize_t show_name(struct device *dev, struct device_attribute *attr, char *buf) 229static ssize_t show_name(struct device *dev, struct device_attribute *attr,
230 char *buf)
227{ 231{
228 return snprintf(buf, PAGE_SIZE, "%s\n", dev->name); 232 return snprintf(buf, PAGE_SIZE, "%s\n", dev->name);
229} 233}
230 234
231static ssize_t store_name(struct device * dev, const char * buf) 235static ssize_t store_name(struct device *dev, struct device_attribute *attr,
236 const char *buf, size_t count)
232{ 237{
233 sscanf(buf, "%20s", dev->name); 238 snprintf(dev->name, sizeof(dev->name), "%.*s",
234 return strnlen(buf, PAGE_SIZE); 239 (int)min(count, sizeof(dev->name) - 1), buf);
240 return count;
235} 241}
236 242
237static DEVICE_ATTR(name, S_IRUGO, show_name, store_name); 243static DEVICE_ATTR(name, S_IRUGO, show_name, store_name);
@@ -327,7 +333,7 @@ Structure:
327struct bus_attribute { 333struct bus_attribute {
328 struct attribute attr; 334 struct attribute attr;
329 ssize_t (*show)(struct bus_type *, char * buf); 335 ssize_t (*show)(struct bus_type *, char * buf);
330 ssize_t (*store)(struct bus_type *, const char * buf); 336 ssize_t (*store)(struct bus_type *, const char * buf, size_t count);
331}; 337};
332 338
333Declaring: 339Declaring:
diff --git a/Documentation/filesystems/vfat.txt b/Documentation/filesystems/vfat.txt
index eed520fd0c8e..ead764b2728f 100644
--- a/Documentation/filesystems/vfat.txt
+++ b/Documentation/filesystems/vfat.txt
@@ -165,7 +165,8 @@ TEST SUITE
165If you plan to make any modifications to the vfat filesystem, please 165If you plan to make any modifications to the vfat filesystem, please
166get the test suite that comes with the vfat distribution at 166get the test suite that comes with the vfat distribution at
167 167
168 http://bmrc.berkeley.edu/people/chaffee/vfat.html 168 http://web.archive.org/web/*/http://bmrc.berkeley.edu/
169 people/chaffee/vfat.html
169 170
170This tests quite a few parts of the vfat filesystem and additional 171This tests quite a few parts of the vfat filesystem and additional
171tests for new features or untested features would be appreciated. 172tests for new features or untested features would be appreciated.
diff --git a/Documentation/filesystems/vfs.txt b/Documentation/filesystems/vfs.txt
index 94677e7dcb13..ed7e5efc06d8 100644
--- a/Documentation/filesystems/vfs.txt
+++ b/Documentation/filesystems/vfs.txt
@@ -727,7 +727,6 @@ struct file_operations {
727 ssize_t (*aio_write) (struct kiocb *, const struct iovec *, unsigned long, loff_t); 727 ssize_t (*aio_write) (struct kiocb *, const struct iovec *, unsigned long, loff_t);
728 int (*readdir) (struct file *, void *, filldir_t); 728 int (*readdir) (struct file *, void *, filldir_t);
729 unsigned int (*poll) (struct file *, struct poll_table_struct *); 729 unsigned int (*poll) (struct file *, struct poll_table_struct *);
730 int (*ioctl) (struct inode *, struct file *, unsigned int, unsigned long);
731 long (*unlocked_ioctl) (struct file *, unsigned int, unsigned long); 730 long (*unlocked_ioctl) (struct file *, unsigned int, unsigned long);
732 long (*compat_ioctl) (struct file *, unsigned int, unsigned long); 731 long (*compat_ioctl) (struct file *, unsigned int, unsigned long);
733 int (*mmap) (struct file *, struct vm_area_struct *); 732 int (*mmap) (struct file *, struct vm_area_struct *);
@@ -768,10 +767,7 @@ otherwise noted.
768 activity on this file and (optionally) go to sleep until there 767 activity on this file and (optionally) go to sleep until there
769 is activity. Called by the select(2) and poll(2) system calls 768 is activity. Called by the select(2) and poll(2) system calls
770 769
771 ioctl: called by the ioctl(2) system call 770 unlocked_ioctl: called by the ioctl(2) system call.
772
773 unlocked_ioctl: called by the ioctl(2) system call. Filesystems that do not
774 require the BKL should use this method instead of the ioctl() above.
775 771
776 compat_ioctl: called by the ioctl(2) system call when 32 bit system calls 772 compat_ioctl: called by the ioctl(2) system call when 32 bit system calls
777 are used on 64 bit kernels. 773 are used on 64 bit kernels.
diff --git a/Documentation/filesystems/xfs.txt b/Documentation/filesystems/xfs.txt
index 9878f50d6ed6..7bff3e4f35df 100644
--- a/Documentation/filesystems/xfs.txt
+++ b/Documentation/filesystems/xfs.txt
@@ -131,17 +131,6 @@ When mounting an XFS filesystem, the following options are accepted.
131 Don't check for double mounted file systems using the file system uuid. 131 Don't check for double mounted file systems using the file system uuid.
132 This is useful to mount LVM snapshot volumes. 132 This is useful to mount LVM snapshot volumes.
133 133
134 osyncisosync
135 Make O_SYNC writes implement true O_SYNC. WITHOUT this option,
136 Linux XFS behaves as if an "osyncisdsync" option is used,
137 which will make writes to files opened with the O_SYNC flag set
138 behave as if the O_DSYNC flag had been used instead.
139 This can result in better performance without compromising
140 data safety.
141 However if this option is not in effect, timestamp updates from
142 O_SYNC writes can be lost if the system crashes.
143 If timestamp updates are critical, use the osyncisosync option.
144
145 uquota/usrquota/uqnoenforce/quota 134 uquota/usrquota/uqnoenforce/quota
146 User disk quota accounting enabled, and limits (optionally) 135 User disk quota accounting enabled, and limits (optionally)
147 enforced. Refer to xfs_quota(8) for further details. 136 enforced. Refer to xfs_quota(8) for further details.
diff --git a/Documentation/firmware_class/hotplug-script b/Documentation/firmware_class/hotplug-script
index 1990130f2ab1..8143a950b607 100644
--- a/Documentation/firmware_class/hotplug-script
+++ b/Documentation/firmware_class/hotplug-script
@@ -6,11 +6,12 @@
6 6
7HOTPLUG_FW_DIR=/usr/lib/hotplug/firmware/ 7HOTPLUG_FW_DIR=/usr/lib/hotplug/firmware/
8 8
9echo 1 > /sys/$DEVPATH/loading 9if [ "$SUBSYSTEM" == "firmware" -a "$ACTION" == "add" ]; then
10cat $HOTPLUG_FW_DIR/$FIRMWARE > /sys/$DEVPATH/data 10 if [ -f $HOTPLUG_FW_DIR/$FIRMWARE ]; then
11echo 0 > /sys/$DEVPATH/loading 11 echo 1 > /sys/$DEVPATH/loading
12 12 cat $HOTPLUG_FW_DIR/$FIRMWARE > /sys/$DEVPATH/data
13# To cancel the load in case of error: 13 echo 0 > /sys/$DEVPATH/loading
14# 14 else
15# echo -1 > /sys/$DEVPATH/loading 15 echo -1 > /sys/$DEVPATH/loading
16# 16 fi
17fi
diff --git a/Documentation/gpio.txt b/Documentation/gpio.txt
index c2c6e9b39bbe..9633da01ff46 100644
--- a/Documentation/gpio.txt
+++ b/Documentation/gpio.txt
@@ -109,17 +109,19 @@ use numbers 2000-2063 to identify GPIOs in a bank of I2C GPIO expanders.
109 109
110If you want to initialize a structure with an invalid GPIO number, use 110If you want to initialize a structure with an invalid GPIO number, use
111some negative number (perhaps "-EINVAL"); that will never be valid. To 111some negative number (perhaps "-EINVAL"); that will never be valid. To
112test if a number could reference a GPIO, you may use this predicate: 112test if such number from such a structure could reference a GPIO, you
113may use this predicate:
113 114
114 int gpio_is_valid(int number); 115 int gpio_is_valid(int number);
115 116
116A number that's not valid will be rejected by calls which may request 117A number that's not valid will be rejected by calls which may request
117or free GPIOs (see below). Other numbers may also be rejected; for 118or free GPIOs (see below). Other numbers may also be rejected; for
118example, a number might be valid but unused on a given board. 119example, a number might be valid but temporarily unused on a given board.
119
120Whether a platform supports multiple GPIO controllers is currently a
121platform-specific implementation issue.
122 120
121Whether a platform supports multiple GPIO controllers is a platform-specific
122implementation issue, as are whether that support can leave "holes" in the space
123of GPIO numbers, and whether new controllers can be added at runtime. Such issues
124can affect things including whether adjacent GPIO numbers are both valid.
123 125
124Using GPIOs 126Using GPIOs
125----------- 127-----------
@@ -158,10 +160,11 @@ and configure pullups/pulldowns appropriately.)
158Spinlock-Safe GPIO access 160Spinlock-Safe GPIO access
159------------------------- 161-------------------------
160Most GPIO controllers can be accessed with memory read/write instructions. 162Most GPIO controllers can be accessed with memory read/write instructions.
161That doesn't need to sleep, and can safely be done from inside IRQ handlers. 163Those don't need to sleep, and can safely be done from inside hard
162(That includes hardirq contexts on RT kernels.) 164(nonthreaded) IRQ handlers and similar contexts.
163 165
164Use these calls to access such GPIOs: 166Use the following calls to access such GPIOs,
167for which gpio_cansleep() will always return false (see below):
165 168
166 /* GPIO INPUT: return zero or nonzero */ 169 /* GPIO INPUT: return zero or nonzero */
167 int gpio_get_value(unsigned gpio); 170 int gpio_get_value(unsigned gpio);
@@ -210,9 +213,31 @@ To access such GPIOs, a different set of accessors is defined:
210 /* GPIO OUTPUT, might sleep */ 213 /* GPIO OUTPUT, might sleep */
211 void gpio_set_value_cansleep(unsigned gpio, int value); 214 void gpio_set_value_cansleep(unsigned gpio, int value);
212 215
213Other than the fact that these calls might sleep, and will not be ignored 216
214for GPIOs that can't be accessed from IRQ handlers, these calls act the 217Accessing such GPIOs requires a context which may sleep, for example
215same as the spinlock-safe calls. 218a threaded IRQ handler, and those accessors must be used instead of
219spinlock-safe accessors without the cansleep() name suffix.
220
221Other than the fact that these accessors might sleep, and will work
222on GPIOs that can't be accessed from hardIRQ handlers, these calls act
223the same as the spinlock-safe calls.
224
225 ** IN ADDITION ** calls to setup and configure such GPIOs must be made
226from contexts which may sleep, since they may need to access the GPIO
227controller chip too: (These setup calls are usually made from board
228setup or driver probe/teardown code, so this is an easy constraint.)
229
230 gpio_direction_input()
231 gpio_direction_output()
232 gpio_request()
233
234## gpio_request_one()
235## gpio_request_array()
236## gpio_free_array()
237
238 gpio_free()
239 gpio_set_debounce()
240
216 241
217 242
218Claiming and Releasing GPIOs 243Claiming and Releasing GPIOs
@@ -457,12 +482,16 @@ To support this framework, a platform's Kconfig will "select" either
457ARCH_REQUIRE_GPIOLIB or ARCH_WANT_OPTIONAL_GPIOLIB 482ARCH_REQUIRE_GPIOLIB or ARCH_WANT_OPTIONAL_GPIOLIB
458and arrange that its <asm/gpio.h> includes <asm-generic/gpio.h> and defines 483and arrange that its <asm/gpio.h> includes <asm-generic/gpio.h> and defines
459three functions: gpio_get_value(), gpio_set_value(), and gpio_cansleep(). 484three functions: gpio_get_value(), gpio_set_value(), and gpio_cansleep().
460They may also want to provide a custom value for ARCH_NR_GPIOS.
461 485
462ARCH_REQUIRE_GPIOLIB means that the gpio-lib code will always get compiled 486It may also provide a custom value for ARCH_NR_GPIOS, so that it better
487reflects the number of GPIOs in actual use on that platform, without
488wasting static table space. (It should count both built-in/SoC GPIOs and
489also ones on GPIO expanders.
490
491ARCH_REQUIRE_GPIOLIB means that the gpiolib code will always get compiled
463into the kernel on that architecture. 492into the kernel on that architecture.
464 493
465ARCH_WANT_OPTIONAL_GPIOLIB means the gpio-lib code defaults to off and the user 494ARCH_WANT_OPTIONAL_GPIOLIB means the gpiolib code defaults to off and the user
466can enable it and build it into the kernel optionally. 495can enable it and build it into the kernel optionally.
467 496
468If neither of these options are selected, the platform does not support 497If neither of these options are selected, the platform does not support
diff --git a/Documentation/hwmon/adm1026 b/Documentation/hwmon/adm1026
index f4327db2307e..d8fabe0c23ac 100644
--- a/Documentation/hwmon/adm1026
+++ b/Documentation/hwmon/adm1026
@@ -6,7 +6,7 @@ Supported chips:
6 Prefix: 'adm1026' 6 Prefix: 'adm1026'
7 Addresses scanned: I2C 0x2c, 0x2d, 0x2e 7 Addresses scanned: I2C 0x2c, 0x2d, 0x2e
8 Datasheet: Publicly available at the Analog Devices website 8 Datasheet: Publicly available at the Analog Devices website
9 http://www.analog.com/en/prod/0,,766_825_ADM1026,00.html 9 http://www.onsemi.com/PowerSolutions/product.do?id=ADM1026
10 10
11Authors: 11Authors:
12 Philip Pokorny <ppokorny@penguincomputing.com> for Penguin Computing 12 Philip Pokorny <ppokorny@penguincomputing.com> for Penguin Computing
diff --git a/Documentation/hwmon/coretemp b/Documentation/hwmon/coretemp
index 92267b62db59..25568f844804 100644
--- a/Documentation/hwmon/coretemp
+++ b/Documentation/hwmon/coretemp
@@ -21,8 +21,8 @@ Temperature is measured in degrees Celsius and measurement resolution is
211 degree C. Valid temperatures are from 0 to TjMax degrees C, because 211 degree C. Valid temperatures are from 0 to TjMax degrees C, because
22the actual value of temperature register is in fact a delta from TjMax. 22the actual value of temperature register is in fact a delta from TjMax.
23 23
24Temperature known as TjMax is the maximum junction temperature of processor. 24Temperature known as TjMax is the maximum junction temperature of processor,
25Intel defines this temperature as 85C or 100C. At this temperature, protection 25which depends on the CPU model. See table below. At this temperature, protection
26mechanism will perform actions to forcibly cool down the processor. Alarm 26mechanism will perform actions to forcibly cool down the processor. Alarm
27may be raised, if the temperature grows enough (more than TjMax) to trigger 27may be raised, if the temperature grows enough (more than TjMax) to trigger
28the Out-Of-Spec bit. Following table summarizes the exported sysfs files: 28the Out-Of-Spec bit. Following table summarizes the exported sysfs files:
@@ -38,3 +38,104 @@ temp1_label - Contains string "Core X", where X is processor
38The TjMax temperature is set to 85 degrees C if undocumented model specific 38The TjMax temperature is set to 85 degrees C if undocumented model specific
39register (UMSR) 0xee has bit 30 set. If not the TjMax is 100 degrees C as 39register (UMSR) 0xee has bit 30 set. If not the TjMax is 100 degrees C as
40(sometimes) documented in processor datasheet. 40(sometimes) documented in processor datasheet.
41
42Appendix A. Known TjMax lists (TBD):
43Some information comes from ark.intel.com
44
45Process Processor TjMax(C)
46
4732nm Core i3/i5/i7 Processors
48 i7 660UM/640/620, 640LM/620, 620M, 610E 105
49 i5 540UM/520/430, 540M/520/450/430 105
50 i3 330E, 370M/350/330 90 rPGA, 105 BGA
51 i3 330UM 105
52
5332nm Core i7 Extreme Processors
54 980X 100
55
5632nm Celeron Processors
57 U3400 105
58 P4505/P4500 90
59
6045nm Xeon Processors 5400 Quad-Core
61 X5492, X5482, X5472, X5470, X5460, X5450 85
62 E5472, E5462, E5450/40/30/20/10/05 85
63 L5408 95
64 L5430, L5420, L5410 70
65
6645nm Xeon Processors 5200 Dual-Core
67 X5282, X5272, X5270, X5260 90
68 E5240 90
69 E5205, E5220 70, 90
70 L5240 70
71 L5238, L5215 95
72
7345nm Atom Processors
74 D525/510/425/410 100
75 Z560/550/540/530P/530/520PT/520/515/510PT/510P 90
76 Z510/500 90
77 N475/470/455/450 100
78 N280/270 90
79 330/230 125
80
8145nm Core2 Processors
82 Solo ULV SU3500/3300 100
83 T9900/9800/9600/9550/9500/9400/9300/8300/8100 105
84 T6670/6500/6400 105
85 T6600 90
86 SU9600/9400/9300 105
87 SP9600/9400 105
88 SL9600/9400/9380/9300 105
89 P9700/9600/9500/8800/8700/8600/8400/7570 105
90 P7550/7450 90
91
9245nm Core2 Quad Processors
93 Q9100/9000 100
94
9545nm Core2 Extreme Processors
96 X9100/9000 105
97 QX9300 100
98
9945nm Core i3/i5/i7 Processors
100 i7 940XM/920 100
101 i7 840QM/820/740/720 100
102
10345nm Celeron Processors
104 SU2300 100
105 900 105
106
10765nm Core2 Duo Processors
108 Solo U2200, U2100 100
109 U7700/7600/7500 100
110 T7800/7700/7600/7500/7400/7300/7250/7200/7100 100
111 T5870/5670/5600/5550/5500/5470/5450/5300/5270 100
112 T5250 100
113 T5800/5750/5200 85
114 L7700/7500/7400/7300/7200 100
115
11665nm Core2 Extreme Processors
117 X7900/7800 100
118
11965nm Core Duo Processors
120 U2500/2400 100
121 T2700/2600/2450/2400/2350/2300E/2300/2250/2050 100
122 L2500/2400/2300 100
123
12465nm Core Solo Processors
125 U1500/1400/1300 100
126 T1400/1350/1300/1250 100
127
12865nm Xeon Processors 5000 Quad-Core
129 X5000 90-95
130 E5000 80
131 L5000 70
132 L5318 95
133
13465nm Xeon Processors 5000 Dual-Core
135 5080, 5063, 5060, 5050, 5030 80-90
136 5160, 5150, 5148, 5140, 5130, 5120, 5110 80
137 L5138 100
138
13965nm Celeron Processors
140 T1700/1600 100
141 560/550/540/530 100
diff --git a/Documentation/hwmon/emc2103 b/Documentation/hwmon/emc2103
new file mode 100644
index 000000000000..a12b2c127140
--- /dev/null
+++ b/Documentation/hwmon/emc2103
@@ -0,0 +1,33 @@
1Kernel driver emc2103
2======================
3
4Supported chips:
5 * SMSC EMC2103
6 Addresses scanned: I2C 0x2e
7 Prefix: 'emc2103'
8 Datasheet: Not public
9
10Authors:
11 Steve Glendinning <steve.glendinning@smsc.com>
12
13Description
14-----------
15
16The Standard Microsystems Corporation (SMSC) EMC2103 chips
17contain up to 4 temperature sensors and a single fan controller.
18
19Fan rotation speeds are reported in RPM (rotations per minute). An alarm is
20triggered if the rotation speed has dropped below a programmable limit. Fan
21readings can be divided by a programmable divider (1, 2, 4 or 8) to give
22the readings more range or accuracy. Not all RPM values can accurately be
23represented, so some rounding is done. With a divider of 1, the lowest
24representable value is 480 RPM.
25
26This driver supports RPM based control, to use this a fan target
27should be written to fan1_target and pwm1_enable should be set to 3.
28
29The 2103-2 and 2103-4 variants have a third temperature sensor, which can
30be connected to two anti-parallel diodes. These values can be read
31as temp3 and temp4. If only one diode is attached to this channel, temp4
32will show as "fault". The module parameter "apd=0" can be used to suppress
33this 4th channel when anti-parallel diodes are not fitted.
diff --git a/Documentation/hwmon/g760a b/Documentation/hwmon/g760a
index e032eeb75629..cfc894537061 100644
--- a/Documentation/hwmon/g760a
+++ b/Documentation/hwmon/g760a
@@ -5,7 +5,7 @@ Supported chips:
5 * Global Mixed-mode Technology Inc. G760A 5 * Global Mixed-mode Technology Inc. G760A
6 Prefix: 'g760a' 6 Prefix: 'g760a'
7 Datasheet: Publicly available at the GMT website 7 Datasheet: Publicly available at the GMT website
8 http://www.gmt.com.tw/datasheet/g760a.pdf 8 http://www.gmt.com.tw/product/datasheet/EDS-760A.pdf
9 9
10Author: Herbert Valerio Riedel <hvr@gnu.org> 10Author: Herbert Valerio Riedel <hvr@gnu.org>
11 11
diff --git a/Documentation/hwmon/gl518sm b/Documentation/hwmon/gl518sm
index 229f8b789185..26f9f3c02dc7 100644
--- a/Documentation/hwmon/gl518sm
+++ b/Documentation/hwmon/gl518sm
@@ -5,11 +5,10 @@ Supported chips:
5 * Genesys Logic GL518SM release 0x00 5 * Genesys Logic GL518SM release 0x00
6 Prefix: 'gl518sm' 6 Prefix: 'gl518sm'
7 Addresses scanned: I2C 0x2c and 0x2d 7 Addresses scanned: I2C 0x2c and 0x2d
8 Datasheet: http://www.genesyslogic.com/pdf
9 * Genesys Logic GL518SM release 0x80 8 * Genesys Logic GL518SM release 0x80
10 Prefix: 'gl518sm' 9 Prefix: 'gl518sm'
11 Addresses scanned: I2C 0x2c and 0x2d 10 Addresses scanned: I2C 0x2c and 0x2d
12 Datasheet: http://www.genesyslogic.com/pdf 11 Datasheet: http://www.genesyslogic.com/
13 12
14Authors: 13Authors:
15 Frodo Looijaard <frodol@dds.nl>, 14 Frodo Looijaard <frodol@dds.nl>,
diff --git a/Documentation/hwmon/hpfall.c b/Documentation/hwmon/hpfall.c
index 681ec22b9d0e..a4a8fc5d05d4 100644
--- a/Documentation/hwmon/hpfall.c
+++ b/Documentation/hwmon/hpfall.c
@@ -1,7 +1,7 @@
1/* Disk protection for HP machines. 1/* Disk protection for HP machines.
2 * 2 *
3 * Copyright 2008 Eric Piel 3 * Copyright 2008 Eric Piel
4 * Copyright 2009 Pavel Machek <pavel@suse.cz> 4 * Copyright 2009 Pavel Machek <pavel@ucw.cz>
5 * 5 *
6 * GPLv2. 6 * GPLv2.
7 */ 7 */
diff --git a/Documentation/hwmon/it87 b/Documentation/hwmon/it87
index 8d08bf0d38ed..38425f0f2645 100644
--- a/Documentation/hwmon/it87
+++ b/Documentation/hwmon/it87
@@ -22,6 +22,10 @@ Supported chips:
22 Prefix: 'it8720' 22 Prefix: 'it8720'
23 Addresses scanned: from Super I/O config space (8 I/O ports) 23 Addresses scanned: from Super I/O config space (8 I/O ports)
24 Datasheet: Not publicly available 24 Datasheet: Not publicly available
25 * IT8721F/IT8758E
26 Prefix: 'it8721'
27 Addresses scanned: from Super I/O config space (8 I/O ports)
28 Datasheet: Not publicly available
25 * SiS950 [clone of IT8705F] 29 * SiS950 [clone of IT8705F]
26 Prefix: 'it87' 30 Prefix: 'it87'
27 Addresses scanned: from Super I/O config space (8 I/O ports) 31 Addresses scanned: from Super I/O config space (8 I/O ports)
@@ -67,7 +71,7 @@ Description
67----------- 71-----------
68 72
69This driver implements support for the IT8705F, IT8712F, IT8716F, 73This driver implements support for the IT8705F, IT8712F, IT8716F,
70IT8718F, IT8720F, IT8726F and SiS950 chips. 74IT8718F, IT8720F, IT8721F, IT8726F, IT8758E and SiS950 chips.
71 75
72These chips are 'Super I/O chips', supporting floppy disks, infrared ports, 76These chips are 'Super I/O chips', supporting floppy disks, infrared ports,
73joysticks and other miscellaneous stuff. For hardware monitoring, they 77joysticks and other miscellaneous stuff. For hardware monitoring, they
@@ -86,14 +90,15 @@ the driver won't notice and report changes in the VID value. The two
86upper VID bits share their pins with voltage inputs (in5 and in6) so you 90upper VID bits share their pins with voltage inputs (in5 and in6) so you
87can't have both on a given board. 91can't have both on a given board.
88 92
89The IT8716F, IT8718F, IT8720F and later IT8712F revisions have support for 93The IT8716F, IT8718F, IT8720F, IT8721F/IT8758E and later IT8712F revisions
902 additional fans. The additional fans are supported by the driver. 94have support for 2 additional fans. The additional fans are supported by the
95driver.
91 96
92The IT8716F, IT8718F and IT8720F, and late IT8712F and IT8705F also have 97The IT8716F, IT8718F, IT8720F and IT8721F/IT8758E, and late IT8712F and
93optional 16-bit tachometer counters for fans 1 to 3. This is better (no more 98IT8705F also have optional 16-bit tachometer counters for fans 1 to 3. This
94fan clock divider mess) but not compatible with the older chips and 99is better (no more fan clock divider mess) but not compatible with the older
95revisions. The 16-bit tachometer mode is enabled by the driver when one 100chips and revisions. The 16-bit tachometer mode is enabled by the driver when
96of the above chips is detected. 101one of the above chips is detected.
97 102
98The IT8726F is just bit enhanced IT8716F with additional hardware 103The IT8726F is just bit enhanced IT8716F with additional hardware
99for AMD power sequencing. Therefore the chip will appear as IT8716F 104for AMD power sequencing. Therefore the chip will appear as IT8716F
@@ -115,7 +120,12 @@ alarm is triggered if the voltage has crossed a programmable minimum or
115maximum limit. Note that minimum in this case always means 'closest to 120maximum limit. Note that minimum in this case always means 'closest to
116zero'; this is important for negative voltage measurements. All voltage 121zero'; this is important for negative voltage measurements. All voltage
117inputs can measure voltages between 0 and 4.08 volts, with a resolution of 122inputs can measure voltages between 0 and 4.08 volts, with a resolution of
1180.016 volt. The battery voltage in8 does not have limit registers. 1230.016 volt (except IT8721F/IT8758E: 0.012 volt.) The battery voltage in8 does
124not have limit registers.
125
126On the IT8721F/IT8758E, some voltage inputs are internal and scaled inside
127the chip (in7, in8 and optionally in3). The driver handles this transparently
128so user-space doesn't have to care.
119 129
120The VID lines (IT8712F/IT8716F/IT8718F/IT8720F) encode the core voltage value: 130The VID lines (IT8712F/IT8716F/IT8718F/IT8720F) encode the core voltage value:
121the voltage level your processor should work with. This is hardcoded by 131the voltage level your processor should work with. This is hardcoded by
diff --git a/Documentation/hwmon/jc42 b/Documentation/hwmon/jc42
new file mode 100644
index 000000000000..0e76ef12e4c6
--- /dev/null
+++ b/Documentation/hwmon/jc42
@@ -0,0 +1,97 @@
1Kernel driver jc42
2==================
3
4Supported chips:
5 * Analog Devices ADT7408
6 Prefix: 'adt7408'
7 Addresses scanned: I2C 0x18 - 0x1f
8 Datasheets:
9 http://www.analog.com/static/imported-files/data_sheets/ADT7408.pdf
10 * IDT TSE2002B3, TS3000B3
11 Prefix: 'tse2002b3', 'ts3000b3'
12 Addresses scanned: I2C 0x18 - 0x1f
13 Datasheets:
14 http://www.idt.com/products/getdoc.cfm?docid=18715691
15 http://www.idt.com/products/getdoc.cfm?docid=18715692
16 * Maxim MAX6604
17 Prefix: 'max6604'
18 Addresses scanned: I2C 0x18 - 0x1f
19 Datasheets:
20 http://datasheets.maxim-ic.com/en/ds/MAX6604.pdf
21 * Microchip MCP9805, MCP98242, MCP98243, MCP9843
22 Prefixes: 'mcp9805', 'mcp98242', 'mcp98243', 'mcp9843'
23 Addresses scanned: I2C 0x18 - 0x1f
24 Datasheets:
25 http://ww1.microchip.com/downloads/en/DeviceDoc/21977b.pdf
26 http://ww1.microchip.com/downloads/en/DeviceDoc/21996a.pdf
27 http://ww1.microchip.com/downloads/en/DeviceDoc/22153c.pdf
28 * NXP Semiconductors SE97, SE97B
29 Prefix: 'se97'
30 Addresses scanned: I2C 0x18 - 0x1f
31 Datasheets:
32 http://www.nxp.com/documents/data_sheet/SE97.pdf
33 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
39 * ON Semiconductor CAT34TS02, CAT6095
40 Prefix: 'cat34ts02', 'cat6095'
41 Addresses scanned: I2C 0x18 - 0x1f
42 Datasheet:
43 http://www.onsemi.com/pub_link/Collateral/CAT34TS02-D.PDF
44 http://www.onsemi.com/pub/Collateral/CAT6095-D.PDF
45 * ST Microelectronics STTS424, STTS424E02
46 Prefix: 'stts424'
47 Addresses scanned: I2C 0x18 - 0x1f
48 Datasheets:
49 http://www.st.com/stonline/products/literature/ds/13447/stts424.pdf
50 http://www.st.com/stonline/products/literature/ds/13448/stts424e02.pdf
51 * JEDEC JC 42.4 compliant temperature sensor chips
52 Prefix: 'jc42'
53 Addresses scanned: I2C 0x18 - 0x1f
54 Datasheet: -
55
56Author:
57 Guenter Roeck <guenter.roeck@ericsson.com>
58
59
60Description
61-----------
62
63This driver implements support for JEDEC JC 42.4 compliant temperature sensors.
64The driver auto-detects the chips listed above, but can be manually instantiated
65to support other JC 42.4 compliant chips.
66
67Example: the following will load the driver for a generic JC 42.4 compliant
68temperature sensor at address 0x18 on I2C bus #1:
69
70# modprobe jc42
71# echo jc42 0x18 > /sys/bus/i2c/devices/i2c-1/new_device
72
73A JC 42.4 compliant chip supports a single temperature sensor. Minimum, maximum,
74and critical temperature can be configured. There are alarms for high, low,
75and critical thresholds.
76
77There is also an hysteresis to control the thresholds for resetting alarms.
78Per JC 42.4 specification, the hysteresis threshold can be configured to 0, 1.5,
793.0, and 6.0 degrees C. Configured hysteresis values will be rounded to those
80limits. The chip supports only a single register to configure the hysteresis,
81which applies to all limits. This register can be written by writing into
82temp1_crit_hyst. Other hysteresis attributes are read-only.
83
84Sysfs entries
85-------------
86
87temp1_input Temperature (RO)
88temp1_min Minimum temperature (RW)
89temp1_max Maximum temperature (RW)
90temp1_crit Critical high temperature (RW)
91
92temp1_crit_hyst Critical hysteresis temperature (RW)
93temp1_max_hyst Maximum hysteresis temperature (RO)
94
95temp1_min_alarm Temperature low alarm
96temp1_max_alarm Temperature high alarm
97temp1_crit_alarm Temperature critical alarm
diff --git a/Documentation/hwmon/k8temp b/Documentation/hwmon/k8temp
index 0005c7166146..716dc24c7237 100644
--- a/Documentation/hwmon/k8temp
+++ b/Documentation/hwmon/k8temp
@@ -5,7 +5,7 @@ Supported chips:
5 * AMD Athlon64/FX or Opteron CPUs 5 * AMD Athlon64/FX or Opteron CPUs
6 Prefix: 'k8temp' 6 Prefix: 'k8temp'
7 Addresses scanned: PCI space 7 Addresses scanned: PCI space
8 Datasheet: http://www.amd.com/us-en/assets/content_type/white_papers_and_tech_docs/32559.pdf 8 Datasheet: http://support.amd.com/us/Processor_TechDocs/32559.pdf
9 9
10Author: Rudolf Marek 10Author: Rudolf Marek
11Contact: Rudolf Marek <r.marek@assembler.cz> 11Contact: Rudolf Marek <r.marek@assembler.cz>
diff --git a/Documentation/hwmon/lm85 b/Documentation/hwmon/lm85
index a76aefeeb68a..239258a63c81 100644
--- a/Documentation/hwmon/lm85
+++ b/Documentation/hwmon/lm85
@@ -9,15 +9,19 @@ Supported chips:
9 * Analog Devices ADM1027 9 * Analog Devices ADM1027
10 Prefix: 'adm1027' 10 Prefix: 'adm1027'
11 Addresses scanned: I2C 0x2c, 0x2d, 0x2e 11 Addresses scanned: I2C 0x2c, 0x2d, 0x2e
12 Datasheet: http://www.analog.com/en/prod/0,,766_825_ADM1027,00.html 12 Datasheet: http://www.onsemi.com/PowerSolutions/product.do?id=ADM1027
13 * Analog Devices ADT7463 13 * Analog Devices ADT7463
14 Prefix: 'adt7463' 14 Prefix: 'adt7463'
15 Addresses scanned: I2C 0x2c, 0x2d, 0x2e 15 Addresses scanned: I2C 0x2c, 0x2d, 0x2e
16 Datasheet: http://www.analog.com/en/prod/0,,766_825_ADT7463,00.html 16 Datasheet: http://www.onsemi.com/PowerSolutions/product.do?id=ADT7463
17 * Analog Devices ADT7468
18 Prefix: 'adt7468'
19 Addresses scanned: I2C 0x2c, 0x2d, 0x2e
20 Datasheet: http://www.onsemi.com/PowerSolutions/product.do?id=ADT7468
17 * SMSC EMC6D100, SMSC EMC6D101 21 * SMSC EMC6D100, SMSC EMC6D101
18 Prefix: 'emc6d100' 22 Prefix: 'emc6d100'
19 Addresses scanned: I2C 0x2c, 0x2d, 0x2e 23 Addresses scanned: I2C 0x2c, 0x2d, 0x2e
20 Datasheet: http://www.smsc.com/main/tools/discontinued/6d100.pdf 24 Datasheet: http://www.smsc.com/media/Downloads_Public/discontinued/6d100.pdf
21 * SMSC EMC6D102 25 * SMSC EMC6D102
22 Prefix: 'emc6d102' 26 Prefix: 'emc6d102'
23 Addresses scanned: I2C 0x2c, 0x2d, 0x2e 27 Addresses scanned: I2C 0x2c, 0x2d, 0x2e
@@ -34,7 +38,7 @@ Description
34----------- 38-----------
35 39
36This driver implements support for the National Semiconductor LM85 and 40This driver implements support for the National Semiconductor LM85 and
37compatible chips including the Analog Devices ADM1027, ADT7463 and 41compatible chips including the Analog Devices ADM1027, ADT7463, ADT7468 and
38SMSC EMC6D10x chips family. 42SMSC EMC6D10x chips family.
39 43
40The LM85 uses the 2-wire interface compatible with the SMBUS 2.0 44The LM85 uses the 2-wire interface compatible with the SMBUS 2.0
@@ -87,14 +91,22 @@ To smooth the response of fans to changes in temperature, the LM85 has an
87optional filter for smoothing temperatures. The ADM1027 has the same 91optional filter for smoothing temperatures. The ADM1027 has the same
88config option but uses it to rate limit the changes to fan speed instead. 92config option but uses it to rate limit the changes to fan speed instead.
89 93
90The ADM1027 and ADT7463 have a 10-bit ADC and can therefore measure 94The ADM1027, ADT7463 and ADT7468 have a 10-bit ADC and can therefore
91temperatures with 0.25 degC resolution. They also provide an offset to the 95measure temperatures with 0.25 degC resolution. They also provide an offset
92temperature readings that is automatically applied during measurement. 96to the temperature readings that is automatically applied during
93This offset can be used to zero out any errors due to traces and placement. 97measurement. This offset can be used to zero out any errors due to traces
94The documentation says that the offset is in 0.25 degC steps, but in 98and placement. The documentation says that the offset is in 0.25 degC
95initial testing of the ADM1027 it was 1.00 degC steps. Analog Devices has 99steps, but in initial testing of the ADM1027 it was 1.00 degC steps. Analog
96confirmed this "bug". The ADT7463 is reported to work as described in the 100Devices has confirmed this "bug". The ADT7463 is reported to work as
97documentation. The current lm85 driver does not show the offset register. 101described in the documentation. The current lm85 driver does not show the
102offset register.
103
104The ADT7468 has a high-frequency PWM mode, where all PWM outputs are
105driven by a 22.5 kHz clock. This is a global mode, not per-PWM output,
106which means that setting any PWM frequency above 11.3 kHz will switch
107all 3 PWM outputs to a 22.5 kHz frequency. Conversely, setting any PWM
108frequency below 11.3 kHz will switch all 3 PWM outputs to a frequency
109between 10 and 100 Hz, which can then be tuned separately.
98 110
99See the vendor datasheets for more information. There is application note 111See the vendor datasheets for more information. There is application note
100from National (AN-1260) with some additional information about the LM85. 112from National (AN-1260) with some additional information about the LM85.
@@ -125,17 +137,17 @@ datasheet for a complete description of the differences. Other than
125identifying the chip, the driver behaves no differently with regard to 137identifying the chip, the driver behaves no differently with regard to
126these two chips. The LM85B is recommended for new designs. 138these two chips. The LM85B is recommended for new designs.
127 139
128The ADM1027 and ADT7463 chips have an optional SMBALERT output that can be 140The ADM1027, ADT7463 and ADT7468 chips have an optional SMBALERT output
129used to signal the chipset in case a limit is exceeded or the temperature 141that can be used to signal the chipset in case a limit is exceeded or the
130sensors fail. Individual sensor interrupts can be masked so they won't 142temperature sensors fail. Individual sensor interrupts can be masked so
131trigger SMBALERT. The SMBALERT output if configured replaces one of the other 143they won't trigger SMBALERT. The SMBALERT output if configured replaces one
132functions (PWM2 or IN0). This functionality is not implemented in current 144of the other functions (PWM2 or IN0). This functionality is not implemented
133driver. 145in current driver.
134 146
135The ADT7463 also has an optional THERM output/input which can be connected 147The ADT7463 and ADT7468 also have an optional THERM output/input which can
136to the processor PROC_HOT output. If available, the autofan control 148be connected to the processor PROC_HOT output. If available, the autofan
137dynamic Tmin feature can be enabled to keep the system temperature within 149control dynamic Tmin feature can be enabled to keep the system temperature
138spec (just?!) with the least possible fan noise. 150within spec (just?!) with the least possible fan noise.
139 151
140Configuration Notes 152Configuration Notes
141------------------- 153-------------------
@@ -201,8 +213,8 @@ the temperatures to compensate for systemic errors in the
201measurements. These features are not currently supported by the lm85 213measurements. These features are not currently supported by the lm85
202driver. 214driver.
203 215
204In addition to the ADM1027 features, the ADT7463 also has Tmin control 216In addition to the ADM1027 features, the ADT7463 and ADT7468 also have
205and THERM asserted counts. Automatic Tmin control acts to adjust the 217Tmin control and THERM asserted counts. Automatic Tmin control acts to
206Tmin value to maintain the measured temperature sensor at a specified 218adjust the Tmin value to maintain the measured temperature sensor at a
207temperature. There isn't much documentation on this feature in the 219specified temperature. There isn't much documentation on this feature in
208ADT7463 data sheet. This is not supported by current driver. 220the ADT7463 data sheet. This is not supported by current driver.
diff --git a/Documentation/hwmon/lm90 b/Documentation/hwmon/lm90
index 6a03dd4bcc94..fa475c0a48a3 100644
--- a/Documentation/hwmon/lm90
+++ b/Documentation/hwmon/lm90
@@ -63,8 +63,8 @@ Supported chips:
63 Datasheet: Publicly available at the Maxim website 63 Datasheet: Publicly available at the Maxim website
64 http://www.maxim-ic.com/quick_view2.cfm/qv_pk/2578 64 http://www.maxim-ic.com/quick_view2.cfm/qv_pk/2578
65 * Maxim MAX6659 65 * Maxim MAX6659
66 Prefix: 'max6657' 66 Prefix: 'max6659'
67 Addresses scanned: I2C 0x4c, 0x4d (unsupported 0x4e) 67 Addresses scanned: I2C 0x4c, 0x4d, 0x4e
68 Datasheet: Publicly available at the Maxim website 68 Datasheet: Publicly available at the Maxim website
69 http://www.maxim-ic.com/quick_view2.cfm/qv_pk/2578 69 http://www.maxim-ic.com/quick_view2.cfm/qv_pk/2578
70 * Maxim MAX6680 70 * Maxim MAX6680
@@ -84,6 +84,21 @@ Supported chips:
84 Addresses scanned: I2C 0x4c 84 Addresses scanned: I2C 0x4c
85 Datasheet: Publicly available at the Maxim website 85 Datasheet: Publicly available at the Maxim website
86 http://www.maxim-ic.com/quick_view2.cfm/qv_pk/3500 86 http://www.maxim-ic.com/quick_view2.cfm/qv_pk/3500
87 * Maxim MAX6695
88 Prefix: 'max6695'
89 Addresses scanned: I2C 0x18
90 Datasheet: Publicly available at the Maxim website
91 http://www.maxim-ic.com/datasheet/index.mvp/id/4199
92 * Maxim MAX6696
93 Prefix: 'max6695'
94 Addresses scanned: I2C 0x18, 0x19, 0x1a, 0x29, 0x2a, 0x2b,
95 0x4c, 0x4d and 0x4e
96 Datasheet: Publicly available at the Maxim website
97 http://www.maxim-ic.com/datasheet/index.mvp/id/4199
98 * Winbond/Nuvoton W83L771W/G
99 Prefix: 'w83l771'
100 Addresses scanned: I2C 0x4c
101 Datasheet: No longer available
87 * Winbond/Nuvoton W83L771AWG/ASG 102 * Winbond/Nuvoton W83L771AWG/ASG
88 Prefix: 'w83l771' 103 Prefix: 'w83l771'
89 Addresses scanned: I2C 0x4c 104 Addresses scanned: I2C 0x4c
@@ -101,10 +116,11 @@ well as the temperature of up to one external diode. It is compatible
101with many other devices, many of which are supported by this driver. 116with many other devices, many of which are supported by this driver.
102 117
103Note that there is no easy way to differentiate between the MAX6657, 118Note that there is no easy way to differentiate between the MAX6657,
104MAX6658 and MAX6659 variants. The extra address and features of the 119MAX6658 and MAX6659 variants. The extra features of the MAX6659 are only
105MAX6659 are not supported by this driver. The MAX6680 and MAX6681 only 120supported by this driver if the chip is located at address 0x4d or 0x4e,
106differ in their pinout, therefore they obviously can't (and don't need to) 121or if the chip type is explicitly selected as max6659.
107be distinguished. 122The MAX6680 and MAX6681 only differ in their pinout, therefore they obviously
123can't (and don't need to) be distinguished.
108 124
109The specificity of this family of chipsets over the ADM1021/LM84 125The specificity of this family of chipsets over the ADM1021/LM84
110family is that it features critical limits with hysteresis, and an 126family is that it features critical limits with hysteresis, and an
@@ -151,11 +167,21 @@ MAX6680 and MAX6681:
151 * Selectable address 167 * Selectable address
152 * Remote sensor type selection 168 * Remote sensor type selection
153 169
170MAX6695 and MAX6696:
171 * Better local resolution
172 * Selectable address (max6696)
173 * Second critical temperature limit
174 * Two remote sensors
175
176W83L771W/G
177 * The G variant is lead-free, otherwise similar to the W.
178 * Filter and alert configuration register at 0xBF
179 * Moving average (depending on conversion rate)
180
154W83L771AWG/ASG 181W83L771AWG/ASG
182 * Successor of the W83L771W/G, same features.
155 * The AWG and ASG variants only differ in package format. 183 * The AWG and ASG variants only differ in package format.
156 * Filter and alert configuration register at 0xBF
157 * Diode ideality factor configuration (remote sensor) at 0xE3 184 * Diode ideality factor configuration (remote sensor) at 0xE3
158 * Moving average (depending on conversion rate)
159 185
160All temperature values are given in degrees Celsius. Resolution 186All temperature values are given in degrees Celsius. Resolution
161is 1.0 degree for the local temperature, 0.125 degree for the remote 187is 1.0 degree for the local temperature, 0.125 degree for the remote
diff --git a/Documentation/hwmon/ltc4245 b/Documentation/hwmon/ltc4245
index 86b5880d8502..b478b0864965 100644
--- a/Documentation/hwmon/ltc4245
+++ b/Documentation/hwmon/ltc4245
@@ -72,9 +72,31 @@ in6_min_alarm 5v output undervoltage alarm
72in7_min_alarm 3v output undervoltage alarm 72in7_min_alarm 3v output undervoltage alarm
73in8_min_alarm Vee (-12v) output undervoltage alarm 73in8_min_alarm Vee (-12v) output undervoltage alarm
74 74
75in9_input GPIO voltage data 75in9_input GPIO voltage data (see note 1)
76in10_input GPIO voltage data (see note 1)
77in11_input GPIO voltage data (see note 1)
76 78
77power1_input 12v power usage (mW) 79power1_input 12v power usage (mW)
78power2_input 5v power usage (mW) 80power2_input 5v power usage (mW)
79power3_input 3v power usage (mW) 81power3_input 3v power usage (mW)
80power4_input Vee (-12v) power usage (mW) 82power4_input Vee (-12v) power usage (mW)
83
84
85Note 1
86------
87
88If you have NOT configured the driver to sample all GPIO pins as analog
89voltages, then the in10_input and in11_input sysfs attributes will not be
90created. The driver will sample the GPIO pin that is currently connected to the
91ADC as an analog voltage, and report the value in in9_input.
92
93If you have configured the driver to sample all GPIO pins as analog voltages,
94then they will be sampled in round-robin fashion. If userspace reads too
95slowly, -EAGAIN will be returned when you read the sysfs attribute containing
96the sensor reading.
97
98The LTC4245 chip can be configured to sample all GPIO pins with two methods:
991) platform data -- see include/linux/i2c/ltc4245.h
1002) OF device tree -- add the "ltc4245,use-extra-gpios" property to each chip
101
102The default mode of operation is to sample a single GPIO pin.
diff --git a/Documentation/hwmon/ltc4261 b/Documentation/hwmon/ltc4261
new file mode 100644
index 000000000000..eba2e2c4b94d
--- /dev/null
+++ b/Documentation/hwmon/ltc4261
@@ -0,0 +1,63 @@
1Kernel driver ltc4261
2=====================
3
4Supported chips:
5 * Linear Technology LTC4261
6 Prefix: 'ltc4261'
7 Addresses scanned: -
8 Datasheet:
9 http://cds.linear.com/docs/Datasheet/42612fb.pdf
10
11Author: Guenter Roeck <guenter.roeck@ericsson.com>
12
13
14Description
15-----------
16
17The LTC4261/LTC4261-2 negative voltage Hot Swap controllers allow a board
18to be safely inserted and removed from a live backplane.
19
20
21Usage Notes
22-----------
23
24This driver does not probe for LTC4261 devices, since there is no register
25which can be safely used to identify the chip. You will have to instantiate
26the devices explicitly.
27
28Example: the following will load the driver for an LTC4261 at address 0x10
29on I2C bus #1:
30$ modprobe ltc4261
31$ echo ltc4261 0x10 > /sys/bus/i2c/devices/i2c-1/new_device
32
33
34Sysfs entries
35-------------
36
37Voltage readings provided by this driver are reported as obtained from the ADC
38registers. If a set of voltage divider resistors is installed, calculate the
39real voltage by multiplying the reported value with (R1+R2)/R2, where R1 is the
40value of the divider resistor against the measured voltage and R2 is the value
41of the divider resistor against Ground.
42
43Current reading provided by this driver is reported as obtained from the ADC
44Current Sense register. The reported value assumes that a 1 mOhm sense resistor
45is installed. If a different sense resistor is installed, calculate the real
46current by dividing the reported value by the sense resistor value in mOhm.
47
48The chip has two voltage sensors, but only one set of voltage alarm status bits.
49In many many designs, those alarms are associated with the ADIN2 sensor, due to
50the proximity of the ADIN2 pin to the OV pin. ADIN2 is, however, not available
51on all chip variants. To ensure that the alarm condition is reported to the user,
52report it with both voltage sensors.
53
54in1_input ADIN2 voltage (mV)
55in1_min_alarm ADIN/ADIN2 Undervoltage alarm
56in1_max_alarm ADIN/ADIN2 Overvoltage alarm
57
58in2_input ADIN voltage (mV)
59in2_min_alarm ADIN/ADIN2 Undervoltage alarm
60in2_max_alarm ADIN/ADIN2 Overvoltage alarm
61
62curr1_input SENSE current (mA)
63curr1_alarm SENSE overcurrent alarm
diff --git a/Documentation/hwmon/pc87427 b/Documentation/hwmon/pc87427
index db5cc1227a83..8fdd08c9e48b 100644
--- a/Documentation/hwmon/pc87427
+++ b/Documentation/hwmon/pc87427
@@ -18,10 +18,11 @@ Description
18 18
19The National Semiconductor Super I/O chip includes complete hardware 19The National Semiconductor Super I/O chip includes complete hardware
20monitoring capabilities. It can monitor up to 18 voltages, 8 fans and 20monitoring capabilities. It can monitor up to 18 voltages, 8 fans and
216 temperature sensors. Only the fans are supported at the moment. 216 temperature sensors. Only the fans and temperatures are supported at
22the moment, voltages aren't.
22 23
23This chip also has fan controlling features, which are not yet supported 24This chip also has fan controlling features (up to 4 PWM outputs),
24by this driver either. 25which are partly supported by this driver.
25 26
26The driver assumes that no more than one chip is present, which seems 27The driver assumes that no more than one chip is present, which seems
27reasonable. 28reasonable.
@@ -36,3 +37,23 @@ signal. Speeds down to 83 RPM can be measured.
36An alarm is triggered if the rotation speed drops below a programmable 37An alarm is triggered if the rotation speed drops below a programmable
37limit. Another alarm is triggered if the speed is too low to be measured 38limit. Another alarm is triggered if the speed is too low to be measured
38(including stalled or missing fan). 39(including stalled or missing fan).
40
41
42Fan Speed Control
43-----------------
44
45Fan speed can be controlled by PWM outputs. There are 4 possible modes:
46always off, always on, manual and automatic. The latter isn't supported
47by the driver: you can only return to that mode if it was the original
48setting, and the configuration interface is missing.
49
50
51Temperature Monitoring
52----------------------
53
54The PC87427 relies on external sensors (following the SensorPath
55standard), so the resolution and range depend on the type of sensor
56connected. The integer part can be 8-bit or 9-bit, and can be signed or
57not. I couldn't find a way to figure out the external sensor data
58temperature format, so user-space adjustment (typically by a factor 2)
59may be required.
diff --git a/Documentation/hwmon/pcf8591 b/Documentation/hwmon/pcf8591
index e76a7892f68e..ac020b3bb7b3 100644
--- a/Documentation/hwmon/pcf8591
+++ b/Documentation/hwmon/pcf8591
@@ -4,7 +4,7 @@ Kernel driver pcf8591
4Supported chips: 4Supported chips:
5 * Philips/NXP PCF8591 5 * Philips/NXP PCF8591
6 Prefix: 'pcf8591' 6 Prefix: 'pcf8591'
7 Addresses scanned: I2C 0x48 - 0x4f 7 Addresses scanned: none
8 Datasheet: Publicly available at the NXP website 8 Datasheet: Publicly available at the NXP website
9 http://www.nxp.com/pip/PCF8591_6.html 9 http://www.nxp.com/pip/PCF8591_6.html
10 10
@@ -58,18 +58,16 @@ Module parameters
58Accessing PCF8591 via /sys interface 58Accessing PCF8591 via /sys interface
59------------------------------------- 59-------------------------------------
60 60
61! Be careful ! 61The PCF8591 is plainly impossible to detect! Thus the driver won't even
62The PCF8591 is plainly impossible to detect! Stupid chip. 62try. You have to explicitly instantiate the device at the relevant
63So every chip with address in the interval [0x48..0x4f] is 63address (in the interval [0x48..0x4f]) either through platform data, or
64detected as PCF8591. If you have other chips in this address 64using the sysfs interface. See Documentation/i2c/instantiating-devices
65range, the workaround is to load this module after the one 65for details.
66for your others chips.
67 66
68On detection (i.e. insmod, modprobe et al.), directories are being 67Directories are being created for each instantiated PCF8591:
69created for each detected PCF8591:
70 68
71/sys/bus/i2c/devices/<0>-<1>/ 69/sys/bus/i2c/devices/<0>-<1>/
72where <0> is the bus the chip was detected on (e. g. i2c-0) 70where <0> is the bus the chip is connected to (e. g. i2c-0)
73and <1> the chip address ([48..4f]) 71and <1> the chip address ([48..4f])
74 72
75Inside these directories, there are such files: 73Inside these directories, there are such files:
diff --git a/Documentation/hwmon/pkgtemp b/Documentation/hwmon/pkgtemp
new file mode 100644
index 000000000000..c8e1fb0fadd3
--- /dev/null
+++ b/Documentation/hwmon/pkgtemp
@@ -0,0 +1,36 @@
1Kernel driver pkgtemp
2======================
3
4Supported chips:
5 * Intel family
6 Prefix: 'pkgtemp'
7 CPUID:
8 Datasheet: Intel 64 and IA-32 Architectures Software Developer's Manual
9 Volume 3A: System Programming Guide
10
11Author: Fenghua Yu
12
13Description
14-----------
15
16This driver permits reading package level temperature sensor embedded inside
17Intel CPU package. The sensors can be in core, uncore, memory controller, or
18other components in a package. The feature is first implemented in Intel Sandy
19Bridge platform.
20
21Temperature is measured in degrees Celsius and measurement resolution is
221 degree C. Valid temperatures are from 0 to TjMax degrees C, because the actual
23value of temperature register is in fact a delta from TjMax.
24
25Temperature known as TjMax is the maximum junction temperature of package.
26We get this from MSR_IA32_TEMPERATURE_TARGET. If the MSR is not accessible,
27we define TjMax as 100 degrees Celsius. At this temperature, protection
28mechanism will perform actions to forcibly cool down the package. Alarm
29may be raised, if the temperature grows enough (more than TjMax) to trigger
30the Out-Of-Spec bit. Following table summarizes the exported sysfs files:
31
32temp1_input - Package temperature (in millidegrees Celsius).
33temp1_max - All cooling devices should be turned on.
34temp1_crit - Maximum junction temperature (in millidegrees Celsius).
35temp1_crit_alarm - Set when Out-of-spec bit is set, never clears.
36 Correct CPU operation is no longer guaranteed.
diff --git a/Documentation/hwmon/smm665 b/Documentation/hwmon/smm665
new file mode 100644
index 000000000000..3820fc9ca52d
--- /dev/null
+++ b/Documentation/hwmon/smm665
@@ -0,0 +1,157 @@
1Kernel driver smm665
2====================
3
4Supported chips:
5 * Summit Microelectronics SMM465
6 Prefix: 'smm465'
7 Addresses scanned: -
8 Datasheet:
9 http://www.summitmicro.com/prod_select/summary/SMM465/SMM465DS.pdf
10 * Summit Microelectronics SMM665, SMM665B
11 Prefix: 'smm665'
12 Addresses scanned: -
13 Datasheet:
14 http://www.summitmicro.com/prod_select/summary/SMM665/SMM665B_2089_20.pdf
15 * Summit Microelectronics SMM665C
16 Prefix: 'smm665c'
17 Addresses scanned: -
18 Datasheet:
19 http://www.summitmicro.com/prod_select/summary/SMM665C/SMM665C_2125.pdf
20 * Summit Microelectronics SMM764
21 Prefix: 'smm764'
22 Addresses scanned: -
23 Datasheet:
24 http://www.summitmicro.com/prod_select/summary/SMM764/SMM764_2098.pdf
25 * Summit Microelectronics SMM766, SMM766B
26 Prefix: 'smm766'
27 Addresses scanned: -
28 Datasheets:
29 http://www.summitmicro.com/prod_select/summary/SMM766/SMM766_2086.pdf
30 http://www.summitmicro.com/prod_select/summary/SMM766B/SMM766B_2122.pdf
31
32Author: Guenter Roeck <guenter.roeck@ericsson.com>
33
34
35Module Parameters
36-----------------
37
38* vref: int
39 Default: 1250 (mV)
40 Reference voltage on VREF_ADC pin in mV. It should not be necessary to set
41 this parameter unless a non-default reference voltage is used.
42
43
44Description
45-----------
46
47[From datasheet] The SMM665 is an Active DC Output power supply Controller
48that monitors, margins and cascade sequences power. The part monitors six
49power supply channels as well as VDD, 12V input, two general-purpose analog
50inputs and an internal temperature sensor using a 10-bit ADC.
51
52Each monitored channel has its own high and low limits, plus a critical
53limit.
54
55Support for SMM465, SMM764, and SMM766 has been implemented but is untested.
56
57
58Usage Notes
59-----------
60
61This driver does not probe for devices, since there is no register which
62can be safely used to identify the chip. You will have to instantiate
63the devices explicitly. When instantiating the device, you have to specify
64its configuration register address.
65
66Example: the following will load the driver for an SMM665 at address 0x57
67on I2C bus #1:
68$ modprobe smm665
69$ echo smm665 0x57 > /sys/bus/i2c/devices/i2c-1/new_device
70
71
72Sysfs entries
73-------------
74
75This driver uses the values in the datasheet to convert ADC register values
76into the values specified in the sysfs-interface document. All attributes are
77read only.
78
79Min, max, lcrit, and crit values are used by the chip to trigger external signals
80and/or other activity. Triggered signals can include HEALTHY, RST, Power Off,
81or Fault depending on the chip configuration. The driver reports values as lcrit
82or crit if exceeding the limits triggers RST, Power Off, or Fault, and as min or
83max otherwise. For details please see the SMM665 datasheet.
84
85For SMM465 and SMM764, values for Channel E and F are reported but undefined.
86
87in1_input 12V input voltage (mV)
88in2_input 3.3V (VDD) input voltage (mV)
89in3_input Channel A voltage (mV)
90in4_input Channel B voltage (mV)
91in5_input Channel C voltage (mV)
92in6_input Channel D voltage (mV)
93in7_input Channel E voltage (mV)
94in8_input Channel F voltage (mV)
95in9_input AIN1 voltage (mV)
96in10_input AIN2 voltage (mV)
97
98in1_min 12v input minimum voltage (mV)
99in2_min 3.3V (VDD) input minimum voltage (mV)
100in3_min Channel A minimum voltage (mV)
101in4_min Channel B minimum voltage (mV)
102in5_min Channel C minimum voltage (mV)
103in6_min Channel D minimum voltage (mV)
104in7_min Channel E minimum voltage (mV)
105in8_min Channel F minimum voltage (mV)
106in9_min AIN1 minimum voltage (mV)
107in10_min AIN2 minimum voltage (mV)
108
109in1_max 12v input maximum voltage (mV)
110in2_max 3.3V (VDD) input maximum voltage (mV)
111in3_max Channel A maximum voltage (mV)
112in4_max Channel B maximum voltage (mV)
113in5_max Channel C maximum voltage (mV)
114in6_max Channel D maximum voltage (mV)
115in7_max Channel E maximum voltage (mV)
116in8_max Channel F maximum voltage (mV)
117in9_max AIN1 maximum voltage (mV)
118in10_max AIN2 maximum voltage (mV)
119
120in1_lcrit 12v input critical minimum voltage (mV)
121in2_lcrit 3.3V (VDD) input critical minimum voltage (mV)
122in3_lcrit Channel A critical minimum voltage (mV)
123in4_lcrit Channel B critical minimum voltage (mV)
124in5_lcrit Channel C critical minimum voltage (mV)
125in6_lcrit Channel D critical minimum voltage (mV)
126in7_lcrit Channel E critical minimum voltage (mV)
127in8_lcrit Channel F critical minimum voltage (mV)
128in9_lcrit AIN1 critical minimum voltage (mV)
129in10_lcrit AIN2 critical minimum voltage (mV)
130
131in1_crit 12v input critical maximum voltage (mV)
132in2_crit 3.3V (VDD) input critical maximum voltage (mV)
133in3_crit Channel A critical maximum voltage (mV)
134in4_crit Channel B critical maximum voltage (mV)
135in5_crit Channel C critical maximum voltage (mV)
136in6_crit Channel D critical maximum voltage (mV)
137in7_crit Channel E critical maximum voltage (mV)
138in8_crit Channel F critical maximum voltage (mV)
139in9_crit AIN1 critical maximum voltage (mV)
140in10_crit AIN2 critical maximum voltage (mV)
141
142in1_crit_alarm 12v input critical alarm
143in2_crit_alarm 3.3V (VDD) input critical alarm
144in3_crit_alarm Channel A critical alarm
145in4_crit_alarm Channel B critical alarm
146in5_crit_alarm Channel C critical alarm
147in6_crit_alarm Channel D critical alarm
148in7_crit_alarm Channel E critical alarm
149in8_crit_alarm Channel F critical alarm
150in9_crit_alarm AIN1 critical alarm
151in10_crit_alarm AIN2 critical alarm
152
153temp1_input Chip tempererature
154temp1_min Mimimum chip tempererature
155temp1_max Maximum chip tempererature
156temp1_crit Critical chip tempererature
157temp1_crit_alarm Temperature critical alarm
diff --git a/Documentation/hwmon/smsc47m1 b/Documentation/hwmon/smsc47m1
index 42c8431b3c9d..2a13378dcf22 100644
--- a/Documentation/hwmon/smsc47m1
+++ b/Documentation/hwmon/smsc47m1
@@ -7,13 +7,10 @@ Supported chips:
7 Addresses scanned: none, address read from Super I/O config space 7 Addresses scanned: none, address read from Super I/O config space
8 Prefix: 'smsc47m1' 8 Prefix: 'smsc47m1'
9 Datasheets: 9 Datasheets:
10 http://www.smsc.com/main/datasheets/47b27x.pdf 10 http://www.smsc.com/media/Downloads_Public/Data_Sheets/47b272.pdf
11 http://www.smsc.com/main/datasheets/47m10x.pdf 11 http://www.smsc.com/media/Downloads_Public/Data_Sheets/47m10x.pdf
12 http://www.smsc.com/main/datasheets/47m112.pdf 12 http://www.smsc.com/media/Downloads_Public/Data_Sheets/47m112.pdf
13 http://www.smsc.com/main/tools/discontinued/47m13x.pdf 13 http://www.smsc.com/
14 http://www.smsc.com/main/datasheets/47m14x.pdf
15 http://www.smsc.com/main/tools/discontinued/47m15x.pdf
16 http://www.smsc.com/main/datasheets/47m192.pdf
17 * SMSC LPC47M292 14 * SMSC LPC47M292
18 Addresses scanned: none, address read from Super I/O config space 15 Addresses scanned: none, address read from Super I/O config space
19 Prefix: 'smsc47m2' 16 Prefix: 'smsc47m2'
diff --git a/Documentation/hwmon/sysfs-interface b/Documentation/hwmon/sysfs-interface
index d4e2917c6f18..645699010551 100644
--- a/Documentation/hwmon/sysfs-interface
+++ b/Documentation/hwmon/sysfs-interface
@@ -91,12 +91,11 @@ name The chip name.
91 I2C devices get this attribute created automatically. 91 I2C devices get this attribute created automatically.
92 RO 92 RO
93 93
94update_rate The rate at which the chip will update readings. 94update_interval The interval at which the chip will update readings.
95 Unit: millisecond 95 Unit: millisecond
96 RW 96 RW
97 Some devices have a variable update rate. This attribute 97 Some devices have a variable update rate or interval.
98 can be used to change the update rate to the desired 98 This attribute can be used to change it to the desired value.
99 frequency.
100 99
101 100
102************ 101************
@@ -107,10 +106,24 @@ in[0-*]_min Voltage min value.
107 Unit: millivolt 106 Unit: millivolt
108 RW 107 RW
109 108
109in[0-*]_lcrit Voltage critical min value.
110 Unit: millivolt
111 RW
112 If voltage drops to or below this limit, the system may
113 take drastic action such as power down or reset. At the very
114 least, it should report a fault.
115
110in[0-*]_max Voltage max value. 116in[0-*]_max Voltage max value.
111 Unit: millivolt 117 Unit: millivolt
112 RW 118 RW
113 119
120in[0-*]_crit Voltage critical max value.
121 Unit: millivolt
122 RW
123 If voltage reaches or exceeds this limit, the system may
124 take drastic action such as power down or reset. At the very
125 least, it should report a fault.
126
114in[0-*]_input Voltage input value. 127in[0-*]_input Voltage input value.
115 Unit: millivolt 128 Unit: millivolt
116 RO 129 RO
@@ -284,7 +297,7 @@ temp[1-*]_input Temperature input value.
284 Unit: millidegree Celsius 297 Unit: millidegree Celsius
285 RO 298 RO
286 299
287temp[1-*]_crit Temperature critical value, typically greater than 300temp[1-*]_crit Temperature critical max value, typically greater than
288 corresponding temp_max values. 301 corresponding temp_max values.
289 Unit: millidegree Celsius 302 Unit: millidegree Celsius
290 RW 303 RW
@@ -296,6 +309,25 @@ temp[1-*]_crit_hyst
296 from the critical value. 309 from the critical value.
297 RW 310 RW
298 311
312temp[1-*]_emergency
313 Temperature emergency max value, for chips supporting more than
314 two upper temperature limits. Must be equal or greater than
315 corresponding temp_crit values.
316 Unit: millidegree Celsius
317 RW
318
319temp[1-*]_emergency_hyst
320 Temperature hysteresis value for emergency limit.
321 Unit: millidegree Celsius
322 Must be reported as an absolute temperature, NOT a delta
323 from the emergency value.
324 RW
325
326temp[1-*]_lcrit Temperature critical min value, typically lower than
327 corresponding temp_min values.
328 Unit: millidegree Celsius
329 RW
330
299temp[1-*]_offset 331temp[1-*]_offset
300 Temperature offset which is added to the temperature reading 332 Temperature offset which is added to the temperature reading
301 by the chip. 333 by the chip.
@@ -344,9 +376,6 @@ Also see the Alarms section for status flags associated with temperatures.
344* Currents * 376* Currents *
345************ 377************
346 378
347Note that no known chip provides current measurements as of writing,
348so this part is theoretical, so to say.
349
350curr[1-*]_max Current max value 379curr[1-*]_max Current max value
351 Unit: milliampere 380 Unit: milliampere
352 RW 381 RW
@@ -471,6 +500,7 @@ limit-related alarms, not both. The driver should just reflect the hardware
471implementation. 500implementation.
472 501
473in[0-*]_alarm 502in[0-*]_alarm
503curr[1-*]_alarm
474fan[1-*]_alarm 504fan[1-*]_alarm
475temp[1-*]_alarm 505temp[1-*]_alarm
476 Channel alarm 506 Channel alarm
@@ -482,11 +512,14 @@ OR
482 512
483in[0-*]_min_alarm 513in[0-*]_min_alarm
484in[0-*]_max_alarm 514in[0-*]_max_alarm
515curr[1-*]_min_alarm
516curr[1-*]_max_alarm
485fan[1-*]_min_alarm 517fan[1-*]_min_alarm
486fan[1-*]_max_alarm 518fan[1-*]_max_alarm
487temp[1-*]_min_alarm 519temp[1-*]_min_alarm
488temp[1-*]_max_alarm 520temp[1-*]_max_alarm
489temp[1-*]_crit_alarm 521temp[1-*]_crit_alarm
522temp[1-*]_emergency_alarm
490 Limit alarm 523 Limit alarm
491 0: no alarm 524 0: no alarm
492 1: alarm 525 1: alarm
@@ -497,7 +530,6 @@ to notify open diodes, unconnected fans etc. where the hardware
497supports it. When this boolean has value 1, the measurement for that 530supports it. When this boolean has value 1, the measurement for that
498channel should not be trusted. 531channel should not be trusted.
499 532
500in[0-*]_fault
501fan[1-*]_fault 533fan[1-*]_fault
502temp[1-*]_fault 534temp[1-*]_fault
503 Input fault condition 535 Input fault condition
@@ -513,6 +545,7 @@ beep_enable Master beep enable
513 RW 545 RW
514 546
515in[0-*]_beep 547in[0-*]_beep
548curr[1-*]_beep
516fan[1-*]_beep 549fan[1-*]_beep
517temp[1-*]_beep 550temp[1-*]_beep
518 Channel beep 551 Channel beep
diff --git a/Documentation/hwmon/thmc50 b/Documentation/hwmon/thmc50
index 9639ca93d559..8a7772ade8d0 100644
--- a/Documentation/hwmon/thmc50
+++ b/Documentation/hwmon/thmc50
@@ -9,7 +9,7 @@ Supported chips:
9 * Texas Instruments THMC50 9 * Texas Instruments THMC50
10 Prefix: 'thmc50' 10 Prefix: 'thmc50'
11 Addresses scanned: I2C 0x2c - 0x2e 11 Addresses scanned: I2C 0x2c - 0x2e
12 Datasheet: http://focus.ti.com/docs/prod/folders/print/thmc50.html 12 Datasheet: http://www.ti.com/
13 13
14Author: Krzysztof Helt <krzysztof.h1@wp.pl> 14Author: Krzysztof Helt <krzysztof.h1@wp.pl>
15 15
diff --git a/Documentation/hwmon/via686a b/Documentation/hwmon/via686a
index d651b25f7519..e5f90ab5c48d 100644
--- a/Documentation/hwmon/via686a
+++ b/Documentation/hwmon/via686a
@@ -5,7 +5,7 @@ Supported chips:
5 * Via VT82C686A, VT82C686B Southbridge Integrated Hardware Monitor 5 * Via VT82C686A, VT82C686B Southbridge Integrated Hardware Monitor
6 Prefix: 'via686a' 6 Prefix: 'via686a'
7 Addresses scanned: ISA in PCI-space encoded address 7 Addresses scanned: ISA in PCI-space encoded address
8 Datasheet: On request through web form (http://www.via.com.tw/en/support/datasheets/) 8 Datasheet: On request through web form (http://www.via.com.tw/en/resources/download-center/)
9 9
10Authors: 10Authors:
11 Kyösti Mälkki <kmalkki@cc.hut.fi>, 11 Kyösti Mälkki <kmalkki@cc.hut.fi>,
diff --git a/Documentation/hwmon/w83627ehf b/Documentation/hwmon/w83627ehf
index b7e42ec4b26b..13d556112fc0 100644
--- a/Documentation/hwmon/w83627ehf
+++ b/Documentation/hwmon/w83627ehf
@@ -20,6 +20,10 @@ Supported chips:
20 Prefix: 'w83667hg' 20 Prefix: 'w83667hg'
21 Addresses scanned: ISA address retrieved from Super I/O registers 21 Addresses scanned: ISA address retrieved from Super I/O registers
22 Datasheet: not available 22 Datasheet: not available
23 * Winbond W83667HG-B
24 Prefix: 'w83667hg'
25 Addresses scanned: ISA address retrieved from Super I/O registers
26 Datasheet: Available from Nuvoton upon request
23 27
24Authors: 28Authors:
25 Jean Delvare <khali@linux-fr.org> 29 Jean Delvare <khali@linux-fr.org>
@@ -32,8 +36,8 @@ Description
32----------- 36-----------
33 37
34This driver implements support for the Winbond W83627EHF, W83627EHG, 38This driver implements support for the Winbond W83627EHF, W83627EHG,
35W83627DHG, W83627DHG-P and W83667HG super I/O chips. We will refer to them 39W83627DHG, W83627DHG-P, W83667HG and W83667HG-B super I/O chips.
36collectively as Winbond chips. 40We will refer to them collectively as Winbond chips.
37 41
38The chips implement three temperature sensors, five fan rotation 42The chips implement three temperature sensors, five fan rotation
39speed sensors, ten analog voltage sensors (only nine for the 627DHG), one 43speed sensors, ten analog voltage sensors (only nine for the 627DHG), one
@@ -68,14 +72,15 @@ follows:
68temp1 -> pwm1 72temp1 -> pwm1
69temp2 -> pwm2 73temp2 -> pwm2
70temp3 -> pwm3 74temp3 -> pwm3
71prog -> pwm4 (not on 667HG; the programmable setting is not supported by 75prog -> pwm4 (not on 667HG and 667HG-B; the programmable setting is not
72 the driver) 76 supported by the driver)
73 77
74/sys files 78/sys files
75---------- 79----------
76 80
77name - this is a standard hwmon device entry. For the W83627EHF and W83627EHG, 81name - this is a standard hwmon device entry. For the W83627EHF and W83627EHG,
78 it is set to "w83627ehf" and for the W83627DHG it is set to "w83627dhg" 82 it is set to "w83627ehf", for the W83627DHG it is set to "w83627dhg",
83 and for the W83667HG it is set to "w83667hg".
79 84
80pwm[1-4] - this file stores PWM duty cycle or DC value (fan speed) in range: 85pwm[1-4] - this file stores PWM duty cycle or DC value (fan speed) in range:
81 0 (stop) to 255 (full) 86 0 (stop) to 255 (full)
diff --git a/Documentation/hwmon/w83627hf b/Documentation/hwmon/w83627hf
index 44dd2bcc72bd..fb145e5e722a 100644
--- a/Documentation/hwmon/w83627hf
+++ b/Documentation/hwmon/w83627hf
@@ -5,23 +5,19 @@ Supported chips:
5 * Winbond W83627HF (ISA accesses ONLY) 5 * Winbond W83627HF (ISA accesses ONLY)
6 Prefix: 'w83627hf' 6 Prefix: 'w83627hf'
7 Addresses scanned: ISA address retrieved from Super I/O registers 7 Addresses scanned: ISA address retrieved from Super I/O registers
8 Datasheet: http://www.winbond.com/PDF/sheet/w83627hf.pdf
9 * Winbond W83627THF 8 * Winbond W83627THF
10 Prefix: 'w83627thf' 9 Prefix: 'w83627thf'
11 Addresses scanned: ISA address retrieved from Super I/O registers 10 Addresses scanned: ISA address retrieved from Super I/O registers
12 Datasheet: http://www.winbond.com/PDF/sheet/w83627thf.pdf
13 * Winbond W83697HF 11 * Winbond W83697HF
14 Prefix: 'w83697hf' 12 Prefix: 'w83697hf'
15 Addresses scanned: ISA address retrieved from Super I/O registers 13 Addresses scanned: ISA address retrieved from Super I/O registers
16 Datasheet: http://www.winbond.com/PDF/sheet/697hf.pdf
17 * Winbond W83637HF 14 * Winbond W83637HF
18 Prefix: 'w83637hf' 15 Prefix: 'w83637hf'
19 Addresses scanned: ISA address retrieved from Super I/O registers 16 Addresses scanned: ISA address retrieved from Super I/O registers
20 Datasheet: http://www.winbond.com/PDF/sheet/w83637hf.pdf
21 * Winbond W83687THF 17 * Winbond W83687THF
22 Prefix: 'w83687thf' 18 Prefix: 'w83687thf'
23 Addresses scanned: ISA address retrieved from Super I/O registers 19 Addresses scanned: ISA address retrieved from Super I/O registers
24 Datasheet: Provided by Winbond on request 20 Datasheet: Provided by Winbond on request(http://www.winbond.com/hq/enu)
25 21
26Authors: 22Authors:
27 Frodo Looijaard <frodol@dds.nl>, 23 Frodo Looijaard <frodol@dds.nl>,
diff --git a/Documentation/hwmon/w83781d b/Documentation/hwmon/w83781d
index c91e0b63ea1d..ecbc1e4574b4 100644
--- a/Documentation/hwmon/w83781d
+++ b/Documentation/hwmon/w83781d
@@ -9,7 +9,7 @@ Supported chips:
9 * Winbond W83782D 9 * Winbond W83782D
10 Prefix: 'w83782d' 10 Prefix: 'w83782d'
11 Addresses scanned: I2C 0x28 - 0x2f, ISA 0x290 (8 I/O ports) 11 Addresses scanned: I2C 0x28 - 0x2f, ISA 0x290 (8 I/O ports)
12 Datasheet: http://www.winbond.com/PDF/sheet/w83782d.pdf 12 Datasheet: http://www.winbond.com
13 * Winbond W83783S 13 * Winbond W83783S
14 Prefix: 'w83783s' 14 Prefix: 'w83783s'
15 Addresses scanned: I2C 0x2d 15 Addresses scanned: I2C 0x2d
diff --git a/Documentation/hwmon/w83792d b/Documentation/hwmon/w83792d
index 14a668ed8aaa..8a023ce0b72e 100644
--- a/Documentation/hwmon/w83792d
+++ b/Documentation/hwmon/w83792d
@@ -5,7 +5,7 @@ Supported chips:
5 * Winbond W83792D 5 * Winbond W83792D
6 Prefix: 'w83792d' 6 Prefix: 'w83792d'
7 Addresses scanned: I2C 0x2c - 0x2f 7 Addresses scanned: I2C 0x2c - 0x2f
8 Datasheet: http://www.winbond.com.tw/E-WINBONDHTM/partner/PDFresult.asp?Pname=1035 8 Datasheet: http://www.winbond.com.tw
9 9
10Author: Chunhao Huang 10Author: Chunhao Huang
11Contact: DZShen <DZShen@Winbond.com.tw> 11Contact: DZShen <DZShen@Winbond.com.tw>
diff --git a/Documentation/i2c/busses/i2c-ali1535 b/Documentation/i2c/busses/i2c-ali1535
index acbc65a08097..5d46342e486a 100644
--- a/Documentation/i2c/busses/i2c-ali1535
+++ b/Documentation/i2c/busses/i2c-ali1535
@@ -3,7 +3,7 @@ Kernel driver i2c-ali1535
3Supported adapters: 3Supported adapters:
4 * Acer Labs, Inc. ALI 1535 (south bridge) 4 * Acer Labs, Inc. ALI 1535 (south bridge)
5 Datasheet: Now under NDA 5 Datasheet: Now under NDA
6 http://www.ali.com.tw/eng/support/datasheet_request.php 6 http://www.ali.com.tw/
7 7
8Authors: 8Authors:
9 Frodo Looijaard <frodol@dds.nl>, 9 Frodo Looijaard <frodol@dds.nl>,
diff --git a/Documentation/i2c/busses/i2c-ali1563 b/Documentation/i2c/busses/i2c-ali1563
index 54691698d2dd..41b1a077e4c7 100644
--- a/Documentation/i2c/busses/i2c-ali1563
+++ b/Documentation/i2c/busses/i2c-ali1563
@@ -3,7 +3,7 @@ Kernel driver i2c-ali1563
3Supported adapters: 3Supported adapters:
4 * Acer Labs, Inc. ALI 1563 (south bridge) 4 * Acer Labs, Inc. ALI 1563 (south bridge)
5 Datasheet: Now under NDA 5 Datasheet: Now under NDA
6 http://www.ali.com.tw/eng/support/datasheet_request.php 6 http://www.ali.com.tw/
7 7
8Author: Patrick Mochel <mochel@digitalimplant.org> 8Author: Patrick Mochel <mochel@digitalimplant.org>
9 9
diff --git a/Documentation/i2c/busses/i2c-ali15x3 b/Documentation/i2c/busses/i2c-ali15x3
index 600da90b8f12..42888d8ac124 100644
--- a/Documentation/i2c/busses/i2c-ali15x3
+++ b/Documentation/i2c/busses/i2c-ali15x3
@@ -3,7 +3,7 @@ Kernel driver i2c-ali15x3
3Supported adapters: 3Supported adapters:
4 * Acer Labs, Inc. ALI 1533 and 1543C (south bridge) 4 * Acer Labs, Inc. ALI 1533 and 1543C (south bridge)
5 Datasheet: Now under NDA 5 Datasheet: Now under NDA
6 http://www.ali.com.tw/eng/support/datasheet_request.php 6 http://www.ali.com.tw/
7 7
8Authors: 8Authors:
9 Frodo Looijaard <frodol@dds.nl>, 9 Frodo Looijaard <frodol@dds.nl>,
diff --git a/Documentation/i2c/busses/i2c-piix4 b/Documentation/i2c/busses/i2c-piix4
index ac540c71c7eb..475bb4ae0720 100644
--- a/Documentation/i2c/busses/i2c-piix4
+++ b/Documentation/i2c/busses/i2c-piix4
@@ -97,4 +97,4 @@ of all affected systems, so the only safe solution was to prevent access to
97the SMBus on all IBM systems (detected using DMI data.) 97the SMBus on all IBM systems (detected using DMI data.)
98 98
99For additional information, read: 99For additional information, read:
100http://www.lm-sensors.org/browser/lm-sensors/trunk/README.thinkpad 100http://www.lm-sensors.org/browser/lm-sensors/trunk/README
diff --git a/Documentation/i2c/busses/i2c-sis630 b/Documentation/i2c/busses/i2c-sis630
index 629ea2c356fd..0b9697366930 100644
--- a/Documentation/i2c/busses/i2c-sis630
+++ b/Documentation/i2c/busses/i2c-sis630
@@ -2,7 +2,7 @@ Kernel driver i2c-sis630
2 2
3Supported adapters: 3Supported adapters:
4 * Silicon Integrated Systems Corp (SiS) 4 * Silicon Integrated Systems Corp (SiS)
5 630 chipset (Datasheet: available at http://amalysh.bei.t-online.de/docs/SIS/) 5 630 chipset (Datasheet: available at http://www.sfr-fresh.com/linux)
6 730 chipset 6 730 chipset
7 * Possible other SiS chipsets ? 7 * Possible other SiS chipsets ?
8 8
diff --git a/Documentation/i2c/instantiating-devices b/Documentation/i2c/instantiating-devices
index e89490270aba..87da405a8597 100644
--- a/Documentation/i2c/instantiating-devices
+++ b/Documentation/i2c/instantiating-devices
@@ -102,7 +102,7 @@ static int __devinit usb_hcd_pnx4008_probe(struct platform_device *pdev)
102 memset(&i2c_info, 0, sizeof(struct i2c_board_info)); 102 memset(&i2c_info, 0, sizeof(struct i2c_board_info));
103 strlcpy(i2c_info.name, "isp1301_pnx", I2C_NAME_SIZE); 103 strlcpy(i2c_info.name, "isp1301_pnx", I2C_NAME_SIZE);
104 isp1301_i2c_client = i2c_new_probed_device(i2c_adap, &i2c_info, 104 isp1301_i2c_client = i2c_new_probed_device(i2c_adap, &i2c_info,
105 normal_i2c); 105 normal_i2c, NULL);
106 i2c_put_adapter(i2c_adap); 106 i2c_put_adapter(i2c_adap);
107 (...) 107 (...)
108} 108}
diff --git a/Documentation/ia64/aliasing.txt b/Documentation/ia64/aliasing.txt
index aa3e953f0f7b..5a4dea6abebd 100644
--- a/Documentation/ia64/aliasing.txt
+++ b/Documentation/ia64/aliasing.txt
@@ -168,8 +168,6 @@ PAST PROBLEM CASES
168 168
169 mmap of 0x0-0x9FFFF /dev/mem by "hwinfo" on HP sx1000 with VGA enabled 169 mmap of 0x0-0x9FFFF /dev/mem by "hwinfo" on HP sx1000 with VGA enabled
170 170
171 See https://bugzilla.novell.com/show_bug.cgi?id=140858.
172
173 The EFI memory map reports the following attributes: 171 The EFI memory map reports the following attributes:
174 0x00000-0x9FFFF WB only 172 0x00000-0x9FFFF WB only
175 0xA0000-0xBFFFF UC only (VGA frame buffer) 173 0xA0000-0xBFFFF UC only (VGA frame buffer)
diff --git a/Documentation/ia64/serial.txt b/Documentation/ia64/serial.txt
index 040b9773209f..6869c73de4e2 100644
--- a/Documentation/ia64/serial.txt
+++ b/Documentation/ia64/serial.txt
@@ -133,7 +133,7 @@ TROUBLESHOOTING SERIAL CONSOLE PROBLEMS
133 133
134 134
135 135
136[1] http://www.dig64.org/specifications/DIG64_PCDPv20.pdf 136[1] http://www.dig64.org/specifications/agreement
137 The table was originally defined as the "HCDP" for "Headless 137 The table was originally defined as the "HCDP" for "Headless
138 Console/Debug Port." The current version is the "PCDP" for 138 Console/Debug Port." The current version is the "PCDP" for
139 "Primary Console and Debug Port Devices." 139 "Primary Console and Debug Port Devices."
diff --git a/Documentation/infiniband/user_verbs.txt b/Documentation/infiniband/user_verbs.txt
index afe3f8da9018..e5092d696da2 100644
--- a/Documentation/infiniband/user_verbs.txt
+++ b/Documentation/infiniband/user_verbs.txt
@@ -5,7 +5,7 @@ USERSPACE VERBS ACCESS
5 described in chapter 11 of the InfiniBand Architecture Specification. 5 described in chapter 11 of the InfiniBand Architecture Specification.
6 6
7 To use the verbs, the libibverbs library, available from 7 To use the verbs, the libibverbs library, available from
8 <http://openib.org/>, is required. libibverbs contains a 8 http://www.openfabrics.org/, is required. libibverbs contains a
9 device-independent API for using the ib_uverbs interface. 9 device-independent API for using the ib_uverbs interface.
10 libibverbs also requires appropriate device-dependent kernel and 10 libibverbs also requires appropriate device-dependent kernel and
11 userspace driver for your InfiniBand hardware. For example, to use 11 userspace driver for your InfiniBand hardware. For example, to use
diff --git a/Documentation/input/appletouch.txt b/Documentation/input/appletouch.txt
index 4f7c633a76d2..b13de3f89108 100644
--- a/Documentation/input/appletouch.txt
+++ b/Documentation/input/appletouch.txt
@@ -82,4 +82,4 @@ Links:
82------ 82------
83 83
84[1]: http://johannes.sipsolutions.net/PowerBook/touchpad/ 84[1]: http://johannes.sipsolutions.net/PowerBook/touchpad/
85[2]: http://web.telia.com/~u89404340/touchpad/index.html 85[2]: http://web.archive.org/web/*/http://web.telia.com/~u89404340/touchpad/index.html
diff --git a/Documentation/input/bcm5974.txt b/Documentation/input/bcm5974.txt
index 5e22dcf6d48d..74d3876d6f34 100644
--- a/Documentation/input/bcm5974.txt
+++ b/Documentation/input/bcm5974.txt
@@ -62,4 +62,4 @@ Links
62----- 62-----
63 63
64[1] http://ubuntuforums.org/showthread.php?t=840040 64[1] http://ubuntuforums.org/showthread.php?t=840040
65[2] http://http://bitmath.org/code/ 65[2] http://bitmath.org/code/
diff --git a/Documentation/input/iforce-protocol.txt b/Documentation/input/iforce-protocol.txt
index 3ac92413c874..2d5fbfd6023e 100644
--- a/Documentation/input/iforce-protocol.txt
+++ b/Documentation/input/iforce-protocol.txt
@@ -251,7 +251,7 @@ Check www.immerse.com for Immersion Studio, and www.fcoder.com for ComPortSpy.
251 251
252** Author of this document ** 252** Author of this document **
253Johann Deneux <johann.deneux@gmail.com> 253Johann Deneux <johann.deneux@gmail.com>
254Home page at http://www.esil.univ-mrs.fr/~jdeneux/projects/ff/ 254Home page at http://web.archive.org/web/*/http://www.esil.univ-mrs.fr
255 255
256Additions by Vojtech Pavlik. 256Additions by Vojtech Pavlik.
257 257
diff --git a/Documentation/input/multi-touch-protocol.txt b/Documentation/input/multi-touch-protocol.txt
index c0fc1c75fd88..bdcba154b83e 100644
--- a/Documentation/input/multi-touch-protocol.txt
+++ b/Documentation/input/multi-touch-protocol.txt
@@ -6,31 +6,149 @@ Multi-touch (MT) Protocol
6Introduction 6Introduction
7------------ 7------------
8 8
9In order to utilize the full power of the new multi-touch devices, a way to 9In order to utilize the full power of the new multi-touch and multi-user
10report detailed finger data to user space is needed. This document 10devices, a way to report detailed data from multiple contacts, i.e.,
11describes the multi-touch (MT) protocol which allows kernel drivers to 11objects in direct contact with the device surface, is needed. This
12report details for an arbitrary number of fingers. 12document describes the multi-touch (MT) protocol which allows kernel
13drivers to report details for an arbitrary number of contacts.
14
15The protocol is divided into two types, depending on the capabilities of the
16hardware. For devices handling anonymous contacts (type A), the protocol
17describes how to send the raw data for all contacts to the receiver. For
18devices capable of tracking identifiable contacts (type B), the protocol
19describes how to send updates for individual contacts via event slots.
20
21
22Protocol Usage
23--------------
24
25Contact details are sent sequentially as separate packets of ABS_MT
26events. Only the ABS_MT events are recognized as part of a contact
27packet. Since these events are ignored by current single-touch (ST)
28applications, the MT protocol can be implemented on top of the ST protocol
29in an existing driver.
30
31Drivers for type A devices separate contact packets by calling
32input_mt_sync() at the end of each packet. This generates a SYN_MT_REPORT
33event, which instructs the receiver to accept the data for the current
34contact and prepare to receive another.
35
36Drivers for type B devices separate contact packets by calling
37input_mt_slot(), with a slot as argument, at the beginning of each packet.
38This generates an ABS_MT_SLOT event, which instructs the receiver to
39prepare for updates of the given slot.
40
41All drivers mark the end of a multi-touch transfer by calling the usual
42input_sync() function. This instructs the receiver to act upon events
43accumulated since last EV_SYN/SYN_REPORT and prepare to receive a new set
44of events/packets.
45
46The main difference between the stateless type A protocol and the stateful
47type B slot protocol lies in the usage of identifiable contacts to reduce
48the amount of data sent to userspace. The slot protocol requires the use of
49the ABS_MT_TRACKING_ID, either provided by the hardware or computed from
50the raw data [5].
51
52For type A devices, the kernel driver should generate an arbitrary
53enumeration of the full set of anonymous contacts currently on the
54surface. The order in which the packets appear in the event stream is not
55important. Event filtering and finger tracking is left to user space [3].
56
57For type B devices, the kernel driver should associate a slot with each
58identified contact, and use that slot to propagate changes for the contact.
59Creation, replacement and destruction of contacts is achieved by modifying
60the ABS_MT_TRACKING_ID of the associated slot. A non-negative tracking id
61is interpreted as a contact, and the value -1 denotes an unused slot. A
62tracking id not previously present is considered new, and a tracking id no
63longer present is considered removed. Since only changes are propagated,
64the full state of each initiated contact has to reside in the receiving
65end. Upon receiving an MT event, one simply updates the appropriate
66attribute of the current slot.
67
68
69Protocol Example A
70------------------
71
72Here is what a minimal event sequence for a two-contact touch would look
73like for a type A device:
74
75 ABS_MT_POSITION_X x[0]
76 ABS_MT_POSITION_Y y[0]
77 SYN_MT_REPORT
78 ABS_MT_POSITION_X x[1]
79 ABS_MT_POSITION_Y y[1]
80 SYN_MT_REPORT
81 SYN_REPORT
13 82
83The sequence after moving one of the contacts looks exactly the same; the
84raw data for all present contacts are sent between every synchronization
85with SYN_REPORT.
14 86
15Usage 87Here is the sequence after lifting the first contact:
16----- 88
89 ABS_MT_POSITION_X x[1]
90 ABS_MT_POSITION_Y y[1]
91 SYN_MT_REPORT
92 SYN_REPORT
93
94And here is the sequence after lifting the second contact:
95
96 SYN_MT_REPORT
97 SYN_REPORT
98
99If the driver reports one of BTN_TOUCH or ABS_PRESSURE in addition to the
100ABS_MT events, the last SYN_MT_REPORT event may be omitted. Otherwise, the
101last SYN_REPORT will be dropped by the input core, resulting in no
102zero-contact event reaching userland.
17 103
18Anonymous finger details are sent sequentially as separate packets of ABS 104
19events. Only the ABS_MT events are recognized as part of a finger 105Protocol Example B
20packet. The end of a packet is marked by calling the input_mt_sync() 106------------------
21function, which generates a SYN_MT_REPORT event. This instructs the 107
22receiver to accept the data for the current finger and prepare to receive 108Here is what a minimal event sequence for a two-contact touch would look
23another. The end of a multi-touch transfer is marked by calling the usual 109like for a type B device:
24input_sync() function. This instructs the receiver to act upon events 110
25accumulated since last EV_SYN/SYN_REPORT and prepare to receive a new 111 ABS_MT_SLOT 0
26set of events/packets. 112 ABS_MT_TRACKING_ID 45
113 ABS_MT_POSITION_X x[0]
114 ABS_MT_POSITION_Y y[0]
115 ABS_MT_SLOT 1
116 ABS_MT_TRACKING_ID 46
117 ABS_MT_POSITION_X x[1]
118 ABS_MT_POSITION_Y y[1]
119 SYN_REPORT
120
121Here is the sequence after moving contact 45 in the x direction:
122
123 ABS_MT_SLOT 0
124 ABS_MT_POSITION_X x[0]
125 SYN_REPORT
126
127Here is the sequence after lifting the contact in slot 0:
128
129 ABS_MT_TRACKING_ID -1
130 SYN_REPORT
131
132The slot being modified is already 0, so the ABS_MT_SLOT is omitted. The
133message removes the association of slot 0 with contact 45, thereby
134destroying contact 45 and freeing slot 0 to be reused for another contact.
135
136Finally, here is the sequence after lifting the second contact:
137
138 ABS_MT_SLOT 1
139 ABS_MT_TRACKING_ID -1
140 SYN_REPORT
141
142
143Event Usage
144-----------
27 145
28A set of ABS_MT events with the desired properties is defined. The events 146A set of ABS_MT events with the desired properties is defined. The events
29are divided into categories, to allow for partial implementation. The 147are divided into categories, to allow for partial implementation. The
30minimum set consists of ABS_MT_POSITION_X and ABS_MT_POSITION_Y, which 148minimum set consists of ABS_MT_POSITION_X and ABS_MT_POSITION_Y, which
31allows for multiple fingers to be tracked. If the device supports it, the 149allows for multiple contacts to be tracked. If the device supports it, the
32ABS_MT_TOUCH_MAJOR and ABS_MT_WIDTH_MAJOR may be used to provide the size 150ABS_MT_TOUCH_MAJOR and ABS_MT_WIDTH_MAJOR may be used to provide the size
33of the contact area and approaching finger, respectively. 151of the contact area and approaching contact, respectively.
34 152
35The TOUCH and WIDTH parameters have a geometrical interpretation; imagine 153The TOUCH and WIDTH parameters have a geometrical interpretation; imagine
36looking through a window at someone gently holding a finger against the 154looking through a window at someone gently holding a finger against the
@@ -41,56 +159,26 @@ ABS_MT_TOUCH_MAJOR, the diameter of the outer region is
41ABS_MT_WIDTH_MAJOR. Now imagine the person pressing the finger harder 159ABS_MT_WIDTH_MAJOR. Now imagine the person pressing the finger harder
42against the glass. The inner region will increase, and in general, the 160against the glass. The inner region will increase, and in general, the
43ratio ABS_MT_TOUCH_MAJOR / ABS_MT_WIDTH_MAJOR, which is always smaller than 161ratio ABS_MT_TOUCH_MAJOR / ABS_MT_WIDTH_MAJOR, which is always smaller than
44unity, is related to the finger pressure. For pressure-based devices, 162unity, is related to the contact pressure. For pressure-based devices,
45ABS_MT_PRESSURE may be used to provide the pressure on the contact area 163ABS_MT_PRESSURE may be used to provide the pressure on the contact area
46instead. 164instead.
47 165
48In addition to the MAJOR parameters, the oval shape of the finger can be 166In addition to the MAJOR parameters, the oval shape of the contact can be
49described by adding the MINOR parameters, such that MAJOR and MINOR are the 167described by adding the MINOR parameters, such that MAJOR and MINOR are the
50major and minor axis of an ellipse. Finally, the orientation of the oval 168major and minor axis of an ellipse. Finally, the orientation of the oval
51shape can be describe with the ORIENTATION parameter. 169shape can be describe with the ORIENTATION parameter.
52 170
53The ABS_MT_TOOL_TYPE may be used to specify whether the touching tool is a 171The ABS_MT_TOOL_TYPE may be used to specify whether the touching tool is a
54finger or a pen or something else. Devices with more granular information 172contact or a pen or something else. Devices with more granular information
55may specify general shapes as blobs, i.e., as a sequence of rectangular 173may specify general shapes as blobs, i.e., as a sequence of rectangular
56shapes grouped together by an ABS_MT_BLOB_ID. Finally, for the few devices 174shapes grouped together by an ABS_MT_BLOB_ID. Finally, for the few devices
57that currently support it, the ABS_MT_TRACKING_ID event may be used to 175that currently support it, the ABS_MT_TRACKING_ID event may be used to
58report finger tracking from hardware [5]. 176report contact tracking from hardware [5].
59 177
60Here is what a minimal event sequence for a two-finger touch would look
61like:
62
63 ABS_MT_POSITION_X
64 ABS_MT_POSITION_Y
65 SYN_MT_REPORT
66 ABS_MT_POSITION_X
67 ABS_MT_POSITION_Y
68 SYN_MT_REPORT
69 SYN_REPORT
70
71Here is the sequence after lifting one of the fingers:
72
73 ABS_MT_POSITION_X
74 ABS_MT_POSITION_Y
75 SYN_MT_REPORT
76 SYN_REPORT
77
78And here is the sequence after lifting the remaining finger:
79
80 SYN_MT_REPORT
81 SYN_REPORT
82
83If the driver reports one of BTN_TOUCH or ABS_PRESSURE in addition to the
84ABS_MT events, the last SYN_MT_REPORT event may be omitted. Otherwise, the
85last SYN_REPORT will be dropped by the input core, resulting in no
86zero-finger event reaching userland.
87 178
88Event Semantics 179Event Semantics
89--------------- 180---------------
90 181
91The word "contact" is used to describe a tool which is in direct contact
92with the surface. A finger, a pen or a rubber all classify as contacts.
93
94ABS_MT_TOUCH_MAJOR 182ABS_MT_TOUCH_MAJOR
95 183
96The length of the major axis of the contact. The length should be given in 184The length of the major axis of the contact. The length should be given in
@@ -157,15 +245,16 @@ MT_TOOL_PEN [2].
157ABS_MT_BLOB_ID 245ABS_MT_BLOB_ID
158 246
159The BLOB_ID groups several packets together into one arbitrarily shaped 247The BLOB_ID groups several packets together into one arbitrarily shaped
160contact. This is a low-level anonymous grouping, and should not be confused 248contact. This is a low-level anonymous grouping for type A devices, and
161with the high-level trackingID [5]. Most kernel drivers will not have blob 249should not be confused with the high-level trackingID [5]. Most type A
162capability, and can safely omit the event. 250devices do not have blob capability, so drivers can safely omit this event.
163 251
164ABS_MT_TRACKING_ID 252ABS_MT_TRACKING_ID
165 253
166The TRACKING_ID identifies an initiated contact throughout its life cycle 254The TRACKING_ID identifies an initiated contact throughout its life cycle
167[5]. There are currently only a few devices that support it, so this event 255[5]. This event is mandatory for type B devices. The value range of the
168should normally be omitted. 256TRACKING_ID should be large enough to ensure unique identification of a
257contact maintained over an extended period of time.
169 258
170 259
171Event Computation 260Event Computation
@@ -192,20 +281,11 @@ finger along the X axis (1).
192Finger Tracking 281Finger Tracking
193--------------- 282---------------
194 283
195The kernel driver should generate an arbitrary enumeration of the set of
196anonymous contacts currently on the surface. The order in which the packets
197appear in the event stream is not important.
198
199The process of finger tracking, i.e., to assign a unique trackingID to each 284The process of finger tracking, i.e., to assign a unique trackingID to each
200initiated contact on the surface, is left to user space; preferably the 285initiated contact on the surface, is a Euclidian Bipartite Matching
201multi-touch X driver [3]. In that driver, the trackingID stays the same and 286problem. At each event synchronization, the set of actual contacts is
202unique until the contact vanishes (when the finger leaves the surface). The 287matched to the set of contacts from the previous synchronization. A full
203problem of assigning a set of anonymous fingers to a set of identified 288implementation can be found in [3].
204fingers is a euclidian bipartite matching problem at each event update, and
205relies on a sufficiently rapid update rate.
206
207There are a few devices that support trackingID in hardware. User space can
208make use of these native identifiers to reduce bandwidth and cpu usage.
209 289
210 290
211Gestures 291Gestures
diff --git a/Documentation/input/ntrig.txt b/Documentation/input/ntrig.txt
new file mode 100644
index 000000000000..be1fd981f73f
--- /dev/null
+++ b/Documentation/input/ntrig.txt
@@ -0,0 +1,126 @@
1N-Trig touchscreen Driver
2-------------------------
3 Copyright (c) 2008-2010 Rafi Rubin <rafi@seas.upenn.edu>
4 Copyright (c) 2009-2010 Stephane Chatty
5
6This driver provides support for N-Trig pen and multi-touch sensors. Single
7and multi-touch events are translated to the appropriate protocols for
8the hid and input systems. Pen events are sufficiently hid compliant and
9are left to the hid core. The driver also provides additional filtering
10and utility functions accessible with sysfs and module parameters.
11
12This driver has been reported to work properly with multiple N-Trig devices
13attached.
14
15
16Parameters
17----------
18
19Note: values set at load time are global and will apply to all applicable
20devices. Adjusting parameters with sysfs will override the load time values,
21but only for that one device.
22
23The following parameters are used to configure filters to reduce noise:
24
25activate_slack number of fingers to ignore before processing events
26
27activation_height size threshold to activate immediately
28activation_width
29
30min_height size threshold bellow which fingers are ignored
31min_width both to decide activation and during activity
32
33deactivate_slack the number of "no contact" frames to ignore before
34 propagating the end of activity events
35
36When the last finger is removed from the device, it sends a number of empty
37frames. By holding off on deactivation for a few frames we can tolerate false
38erroneous disconnects, where the sensor may mistakenly not detect a finger that
39is still present. Thus deactivate_slack addresses problems where a users might
40see breaks in lines during drawing, or drop an object during a long drag.
41
42
43Additional sysfs items
44----------------------
45
46These nodes just provide easy access to the ranges reported by the device.
47sensor_logical_height the range for positions reported during activity
48sensor_logical_width
49
50sensor_physical_height internal ranges not used for normal events but
51sensor_physical_width useful for tuning
52
53All N-Trig devices with product id of 1 report events in the ranges of
54X: 0-9600
55Y: 0-7200
56However not all of these devices have the same physical dimensions. Most
57seem to be 12" sensors (Dell Latitude XT and XT2 and the HP TX2), and
58at least one model (Dell Studio 17) has a 17" sensor. The ratio of physical
59to logical sizes is used to adjust the size based filter parameters.
60
61
62Filtering
63---------
64
65With the release of the early multi-touch firmwares it became increasingly
66obvious that these sensors were prone to erroneous events. Users reported
67seeing both inappropriately dropped contact and ghosts, contacts reported
68where no finger was actually touching the screen.
69
70Deactivation slack helps prevent dropped contact for single touch use, but does
71not address the problem of dropping one of more contacts while other contacts
72are still active. Drops in the multi-touch context require additional
73processing and should be handled in tandem with tacking.
74
75As observed ghost contacts are similar to actual use of the sensor, but they
76seem to have different profiles. Ghost activity typically shows up as small
77short lived touches. As such, I assume that the longer the continuous stream
78of events the more likely those events are from a real contact, and that the
79larger the size of each contact the more likely it is real. Balancing the
80goals of preventing ghosts and accepting real events quickly (to minimize
81user observable latency), the filter accumulates confidence for incoming
82events until it hits thresholds and begins propagating. In the interest in
83minimizing stored state as well as the cost of operations to make a decision,
84I've kept that decision simple.
85
86Time is measured in terms of the number of fingers reported, not frames since
87the probability of multiple simultaneous ghosts is expected to drop off
88dramatically with increasing numbers. Rather than accumulate weight as a
89function of size, I just use it as a binary threshold. A sufficiently large
90contact immediately overrides the waiting period and leads to activation.
91
92Setting the activation size thresholds to large values will result in deciding
93primarily on activation slack. If you see longer lived ghosts, turning up the
94activation slack while reducing the size thresholds may suffice to eliminate
95the ghosts while keeping the screen quite responsive to firm taps.
96
97Contacts continue to be filtered with min_height and min_width even after
98the initial activation filter is satisfied. The intent is to provide
99a mechanism for filtering out ghosts in the form of an extra finger while
100you actually are using the screen. In practice this sort of ghost has
101been far less problematic or relatively rare and I've left the defaults
102set to 0 for both parameters, effectively turning off that filter.
103
104I don't know what the optimal values are for these filters. If the defaults
105don't work for you, please play with the parameters. If you do find other
106values more comfortable, I would appreciate feedback.
107
108The calibration of these devices does drift over time. If ghosts or contact
109dropping worsen and interfere with the normal usage of your device, try
110recalibrating it.
111
112
113Calibration
114-----------
115
116The N-Trig windows tools provide calibration and testing routines. Also an
117unofficial unsupported set of user space tools including a calibrator is
118available at:
119http://code.launchpad.net/~rafi-seas/+junk/ntrig_calib
120
121
122Tracking
123--------
124
125As of yet, all tested N-Trig firmwares do not track fingers. When multiple
126contacts are active they seem to be sorted primarily by Y position.
diff --git a/Documentation/input/sentelic.txt b/Documentation/input/sentelic.txt
index b35affd5c649..b2ef125b71f8 100644
--- a/Documentation/input/sentelic.txt
+++ b/Documentation/input/sentelic.txt
@@ -341,7 +341,7 @@ Byte 5~8: Don't care (Absolute packet)
341FSP supports basic PS/2 commanding set and modes, refer to following URL for 341FSP supports basic PS/2 commanding set and modes, refer to following URL for
342details about PS/2 commands: 342details about PS/2 commands:
343 343
344http://www.computer-engineering.org/index.php?title=PS/2_Mouse_Interface 344http://www.computer-engineering.org/ps2mouse/
345 345
346============================================================================== 346==============================================================================
347* Programming Sequence for Determining Packet Parsing Flow 347* Programming Sequence for Determining Packet Parsing Flow
diff --git a/Documentation/input/xpad.txt b/Documentation/input/xpad.txt
index aae0d404c566..7cc9a436e6a1 100644
--- a/Documentation/input/xpad.txt
+++ b/Documentation/input/xpad.txt
@@ -150,7 +150,7 @@ the basic functionality.
150 150
1511. http://euc.jp/periphs/xbox-controller.ja.html (ITO Takayuki) 1511. http://euc.jp/periphs/xbox-controller.ja.html (ITO Takayuki)
1522. http://xpad.xbox-scene.com/ 1522. http://xpad.xbox-scene.com/
1533. http://www.xboxhackz.com/Hackz-Reference.htm 1533. http://www.markosweb.com/www/xboxhackz.com/
154 154
1554. /proc/bus/usb/devices - dump from InterAct PowerPad Pro (Germany): 1554. /proc/bus/usb/devices - dump from InterAct PowerPad Pro (Germany):
156 156
diff --git a/Documentation/intel_txt.txt b/Documentation/intel_txt.txt
index 5dc59b04a71f..849de1a78e77 100644
--- a/Documentation/intel_txt.txt
+++ b/Documentation/intel_txt.txt
@@ -25,20 +25,18 @@ which has been updated for the new released platforms.
25Intel TXT has been presented at various events over the past few 25Intel TXT has been presented at various events over the past few
26years, some of which are: 26years, some of which are:
27 LinuxTAG 2008: 27 LinuxTAG 2008:
28 http://www.linuxtag.org/2008/en/conf/events/vp-donnerstag/ 28 http://www.linuxtag.org/2008/en/conf/events/vp-donnerstag.html
29 details.html?talkid=110
30 TRUST2008: 29 TRUST2008:
31 http://www.trust2008.eu/downloads/Keynote-Speakers/ 30 http://www.trust-conference.eu/downloads/Keynote-Speakers/
32 3_David-Grawrock_The-Front-Door-of-Trusted-Computing.pdf 31 3_David-Grawrock_The-Front-Door-of-Trusted-Computing.pdf
33 IDF 2008, Shanghai: 32 IDF, Shanghai:
34 http://inteldeveloperforum.com.edgesuite.net/shanghai_2008/ 33 http://www.prcidf.com.cn/index_en.html
35 aep/PROS003/index.html
36 IDFs 2006, 2007 (I'm not sure if/where they are online) 34 IDFs 2006, 2007 (I'm not sure if/where they are online)
37 35
38Trusted Boot Project Overview: 36Trusted Boot Project Overview:
39============================= 37=============================
40 38
41Trusted Boot (tboot) is an open source, pre- kernel/VMM module that 39Trusted Boot (tboot) is an open source, pre-kernel/VMM module that
42uses Intel TXT to perform a measured and verified launch of an OS 40uses Intel TXT to perform a measured and verified launch of an OS
43kernel/VMM. 41kernel/VMM.
44 42
diff --git a/Documentation/ioctl/ioctl-number.txt b/Documentation/ioctl/ioctl-number.txt
index dd5806f4fcc4..63ffd78824d8 100644
--- a/Documentation/ioctl/ioctl-number.txt
+++ b/Documentation/ioctl/ioctl-number.txt
@@ -74,11 +74,12 @@ Code Seq#(hex) Include File Comments
740x10 00-0F drivers/char/s390/vmcp.h 740x10 00-0F drivers/char/s390/vmcp.h
750x12 all linux/fs.h 750x12 all linux/fs.h
76 linux/blkpg.h 76 linux/blkpg.h
770x1b all InfiniBand Subsystem <http://www.openib.org/> 770x1b all InfiniBand Subsystem <http://infiniband.sourceforge.net/>
780x20 all drivers/cdrom/cm206.h 780x20 all drivers/cdrom/cm206.h
790x22 all scsi/sg.h 790x22 all scsi/sg.h
80'#' 00-3F IEEE 1394 Subsystem Block for the entire subsystem 80'#' 00-3F IEEE 1394 Subsystem Block for the entire subsystem
81'$' 00-0F linux/perf_counter.h, linux/perf_event.h 81'$' 00-0F linux/perf_counter.h, linux/perf_event.h
82'&' 00-07 drivers/firewire/nosy-user.h
82'1' 00-1F <linux/timepps.h> PPS kit from Ulrich Windl 83'1' 00-1F <linux/timepps.h> PPS kit from Ulrich Windl
83 <ftp://ftp.de.kernel.org/pub/linux/daemons/ntp/PPS/> 84 <ftp://ftp.de.kernel.org/pub/linux/daemons/ntp/PPS/>
84'2' 01-04 linux/i2o.h 85'2' 01-04 linux/i2o.h
@@ -190,7 +191,7 @@ Code Seq#(hex) Include File Comments
190'[' 00-07 linux/usb/tmc.h USB Test and Measurement Devices 191'[' 00-07 linux/usb/tmc.h USB Test and Measurement Devices
191 <mailto:gregkh@suse.de> 192 <mailto:gregkh@suse.de>
192'a' all linux/atm*.h, linux/sonet.h ATM on linux 193'a' all linux/atm*.h, linux/sonet.h ATM on linux
193 <http://lrcwww.epfl.ch/linux-atm/magic.html> 194 <http://lrcwww.epfl.ch/>
194'b' 00-FF conflict! bit3 vme host bridge 195'b' 00-FF conflict! bit3 vme host bridge
195 <mailto:natalia@nikhefk.nikhef.nl> 196 <mailto:natalia@nikhefk.nikhef.nl>
196'b' 00-0F media/bt819.h conflict! 197'b' 00-0F media/bt819.h conflict!
@@ -225,7 +226,7 @@ Code Seq#(hex) Include File Comments
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!
227'l' 00-3F linux/tcfs_fs.h transparent cryptographic file system 228'l' 00-3F linux/tcfs_fs.h transparent cryptographic file system
228 <http://mikonos.dia.unisa.it/tcfs> 229 <http://web.archive.org/web/*/http://mikonos.dia.unisa.it/tcfs>
229'l' 40-7F linux/udf_fs_i.h in development: 230'l' 40-7F linux/udf_fs_i.h in development:
230 <http://sourceforge.net/projects/linux-udf/> 231 <http://sourceforge.net/projects/linux-udf/>
231'm' 00-09 linux/mmtimer.h conflict! 232'm' 00-09 linux/mmtimer.h conflict!
@@ -252,13 +253,13 @@ Code Seq#(hex) Include File Comments
252 <mailto:giometti@linux.it> 253 <mailto:giometti@linux.it>
253'q' 00-1F linux/serio.h 254'q' 00-1F linux/serio.h
254'q' 80-FF linux/telephony.h Internet PhoneJACK, Internet LineJACK 255'q' 80-FF linux/telephony.h Internet PhoneJACK, Internet LineJACK
255 linux/ixjuser.h <http://www.quicknet.net> 256 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 257'r' 00-1F linux/msdos_fs.h and fs/fat/dir.c
257's' all linux/cdk.h 258's' all linux/cdk.h
258't' 00-7F linux/if_ppp.h 259't' 00-7F linux/if_ppp.h
259't' 80-8F linux/isdn_ppp.h 260't' 80-8F linux/isdn_ppp.h
260't' 90 linux/toshiba.h 261't' 90 linux/toshiba.h
261'u' 00-1F linux/smb_fs.h 262'u' 00-1F linux/smb_fs.h gone
262'v' all linux/videodev.h conflict! 263'v' all linux/videodev.h conflict!
263'v' 00-1F linux/ext2_fs.h conflict! 264'v' 00-1F linux/ext2_fs.h conflict!
264'v' 00-1F linux/fs.h conflict! 265'v' 00-1F linux/fs.h conflict!
@@ -277,7 +278,6 @@ Code Seq#(hex) Include File Comments
277 <mailto:oe@port.de> 278 <mailto:oe@port.de>
278'z' 10-4F drivers/s390/crypto/zcrypt_api.h conflict! 279'z' 10-4F drivers/s390/crypto/zcrypt_api.h conflict!
2790x80 00-1F linux/fb.h 2800x80 00-1F linux/fb.h
2800x81 00-1F linux/videotext.h
2810x88 00-3F media/ovcamchip.h 2810x88 00-3F media/ovcamchip.h
2820x89 00-06 arch/x86/include/asm/sockios.h 2820x89 00-06 arch/x86/include/asm/sockios.h
2830x89 0B-DF linux/sockios.h 2830x89 0B-DF linux/sockios.h
@@ -286,7 +286,7 @@ Code Seq#(hex) Include File Comments
2860x89 F0-FF linux/sockios.h SIOCDEVPRIVATE range 2860x89 F0-FF linux/sockios.h SIOCDEVPRIVATE range
2870x8B all linux/wireless.h 2870x8B all linux/wireless.h
2880x8C 00-3F WiNRADiO driver 2880x8C 00-3F WiNRADiO driver
289 <http://www.proximity.com.au/~brian/winradio/> 289 <http://www.winradio.com.au/>
2900x90 00 drivers/cdrom/sbpcd.h 2900x90 00 drivers/cdrom/sbpcd.h
2910x92 00-0F drivers/usb/mon/mon_bin.c 2910x92 00-0F drivers/usb/mon/mon_bin.c
2920x93 60-7F linux/auto_fs.h 2920x93 60-7F linux/auto_fs.h
diff --git a/Documentation/isdn/INTERFACE.CAPI b/Documentation/isdn/INTERFACE.CAPI
index f172091fb7cd..309eb5ed942b 100644
--- a/Documentation/isdn/INTERFACE.CAPI
+++ b/Documentation/isdn/INTERFACE.CAPI
@@ -113,12 +113,16 @@ char *driver_name
113int (*load_firmware)(struct capi_ctr *ctrlr, capiloaddata *ldata) 113int (*load_firmware)(struct capi_ctr *ctrlr, capiloaddata *ldata)
114 (optional) pointer to a callback function for sending firmware and 114 (optional) pointer to a callback function for sending firmware and
115 configuration data to the device 115 configuration data to the device
116 The function may return before the operation has completed.
117 Completion must be signalled by a call to capi_ctr_ready().
116 Return value: 0 on success, error code on error 118 Return value: 0 on success, error code on error
117 Called in process context. 119 Called in process context.
118 120
119void (*reset_ctr)(struct capi_ctr *ctrlr) 121void (*reset_ctr)(struct capi_ctr *ctrlr)
120 (optional) pointer to a callback function for performing a reset on 122 (optional) pointer to a callback function for stopping the device,
121 the device, releasing all registered applications 123 releasing all registered applications
124 The function may return before the operation has completed.
125 Completion must be signalled by a call to capi_ctr_down().
122 Called in process context. 126 Called in process context.
123 127
124void (*register_appl)(struct capi_ctr *ctrlr, u16 applid, 128void (*register_appl)(struct capi_ctr *ctrlr, u16 applid,
diff --git a/Documentation/isdn/README b/Documentation/isdn/README
index 6783437f21c2..cfb1884342ee 100644
--- a/Documentation/isdn/README
+++ b/Documentation/isdn/README
@@ -36,7 +36,7 @@ README for the ISDN-subsystem
36 http://www.mhessler.de/i4lfaq/ 36 http://www.mhessler.de/i4lfaq/
37 It can be viewed online, or downloaded in sgml/text/html format. 37 It can be viewed online, or downloaded in sgml/text/html format.
38 The FAQ can also be viewed online at 38 The FAQ can also be viewed online at
39 http://www.isdn4inux.de/faq/ 39 http://www.isdn4linux.de/faq/
40 or downloaded from 40 or downloaded from
41 ftp://ftp.isdn4linux.de/pub/isdn4linux/FAQ/ 41 ftp://ftp.isdn4linux.de/pub/isdn4linux/FAQ/
42 42
diff --git a/Documentation/isdn/README.HiSax b/Documentation/isdn/README.HiSax
index 031c8d814337..99e87a61897d 100644
--- a/Documentation/isdn/README.HiSax
+++ b/Documentation/isdn/README.HiSax
@@ -486,7 +486,7 @@ Appendix: Teles PCMCIA driver
486----------------------------- 486-----------------------------
487 487
488See 488See
489 http://www.stud.uni-wuppertal.de/~ea0141/pcmcia.html 489 http://www.linux.no/teles_cs.txt
490for instructions. 490for instructions.
491 491
492Appendix: Linux and ISDN-leased lines 492Appendix: Linux and ISDN-leased lines
diff --git a/Documentation/isdn/README.gigaset b/Documentation/isdn/README.gigaset
index e472df842323..ef3343eaa002 100644
--- a/Documentation/isdn/README.gigaset
+++ b/Documentation/isdn/README.gigaset
@@ -47,9 +47,9 @@ GigaSet 307x Device Driver
47 47
481.2. Software 481.2. Software
49 -------- 49 --------
50 The driver works with ISDN4linux and so can be used with any software 50 The driver works with the Kernel CAPI subsystem as well as the old
51 which is able to use ISDN4linux for ISDN connections (voice or data). 51 ISDN4Linux subsystem, so it can be used with any software which is able
52 Experimental Kernel CAPI support is available as a compilation option. 52 to use CAPI 2.0 or ISDN4Linux for ISDN connections (voice or data).
53 53
54 There are some user space tools available at 54 There are some user space tools available at
55 http://sourceforge.net/projects/gigaset307x/ 55 http://sourceforge.net/projects/gigaset307x/
@@ -152,61 +152,42 @@ GigaSet 307x Device Driver
152 - GIGVER_FWBASE: retrieve the firmware version of the base 152 - GIGVER_FWBASE: retrieve the firmware version of the base
153 Upon return, version[] is filled with the requested version information. 153 Upon return, version[] is filled with the requested version information.
154 154
1552.3. ISDN4linux 1552.3. CAPI
156 ----------
157 This is the "normal" mode of operation. After loading the module you can
158 set up the ISDN system just as you'd do with any ISDN card supported by
159 the ISDN4Linux subsystem. Most distributions provide some configuration
160 utility. If not, you can use some HOWTOs like
161 http://www.linuxhaven.de/dlhp/HOWTO/DE-ISDN-HOWTO-5.html
162 If this doesn't work, because you have some device like SX100 where
163 debug output (see section 3.2.) shows something like this when dialing
164 CMD Received: ERROR
165 Available Params: 0
166 Connection State: 0, Response: -1
167 gigaset_process_response: resp_code -1 in ConState 0 !
168 Timeout occurred
169 you probably need to use unimodem mode. (see section 2.5.)
170
1712.4. CAPI
172 ---- 156 ----
173 If the driver is compiled with CAPI support (kernel configuration option 157 If the driver is compiled with CAPI support (kernel configuration option
174 GIGASET_CAPI, experimental) it can also be used with CAPI 2.0 kernel and 158 GIGASET_CAPI) the devices will show up as CAPI controllers as soon as the
175 user space applications. For user space access, the module capi.ko must 159 corresponding driver module is loaded, and can then be used with CAPI 2.0
176 be loaded. The capiinit command (included in the capi4k-utils package) 160 kernel and user space applications. For user space access, the module
177 does this for you. 161 capi.ko must be loaded.
178 162
179 The CAPI variant of the driver supports legacy ISDN4Linux applications 163 Legacy ISDN4Linux applications are supported via the capidrv
180 via the capidrv compatibility driver. The kernel module capidrv.ko must 164 compatibility driver. The kernel module capidrv.ko must be loaded
181 be loaded explicitly with the command 165 explicitly with the command
182 modprobe capidrv 166 modprobe capidrv
183 if needed, and cannot be unloaded again without unloading the driver 167 if needed, and cannot be unloaded again without unloading the driver
184 first. (These are limitations of capidrv.) 168 first. (These are limitations of capidrv.)
185 169
186 The note about unimodem mode in the preceding section applies here, too. 170 Most distributions handle loading and unloading of the various CAPI
187 171 modules automatically via the command capiinit(1) from the capi4k-utils
1882.5. Unimodem mode 172 package or a similar mechanism. Note that capiinit(1) cannot unload the
189 ------------- 173 Gigaset drivers because it doesn't support more than one module per
190 This is needed for some devices [e.g. SX100] as they have problems with 174 driver.
191 the "normal" commands.
192 175
193 If you have installed the command line tool gigacontr, you can enter 1762.4. ISDN4Linux
194 unimodem mode using 177 ----------
195 gigacontr --mode unimodem 178 If the driver is compiled without CAPI support (native ISDN4Linux
196 You can switch back using 179 variant), it registers the device with the legacy ISDN4Linux subsystem
197 gigacontr --mode isdn 180 after loading the module. It can then be used with ISDN4Linux
181 applications only. Most distributions provide some configuration utility
182 for setting up that subsystem. Otherwise you can use some HOWTOs like
183 http://www.linuxhaven.de/dlhp/HOWTO/DE-ISDN-HOWTO-5.html
198 184
199 You can also put the driver directly into Unimodem mode when it's loaded,
200 by passing the module parameter startmode=0 to the hardware specific
201 module, e.g.
202 modprobe usb_gigaset startmode=0
203 or by adding a line like
204 options usb_gigaset startmode=0
205 to an appropriate module configuration file, like /etc/modprobe.d/gigaset
206 or /etc/modprobe.conf.local.
207 185
1862.5. Unimodem mode
187 -------------
208 In this mode the device works like a modem connected to a serial port 188 In this mode the device works like a modem connected to a serial port
209 (the /dev/ttyGU0, ... mentioned above) which understands the commands 189 (the /dev/ttyGU0, ... mentioned above) which understands the commands
190
210 ATZ init, reset 191 ATZ init, reset
211 => OK or ERROR 192 => OK or ERROR
212 ATD 193 ATD
@@ -234,6 +215,31 @@ GigaSet 307x Device Driver
234 to an appropriate module configuration file, like /etc/modprobe.d/gigaset 215 to an appropriate module configuration file, like /etc/modprobe.d/gigaset
235 or /etc/modprobe.conf.local. 216 or /etc/modprobe.conf.local.
236 217
218 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
220 section 3.2.) shows something like this when dialing:
221 CMD Received: ERROR
222 Available Params: 0
223 Connection State: 0, Response: -1
224 gigaset_process_response: resp_code -1 in ConState 0 !
225 Timeout occurred
226 then switching to unimodem mode may help.
227
228 If you have installed the command line tool gigacontr, you can enter
229 unimodem mode using
230 gigacontr --mode unimodem
231 You can switch back using
232 gigacontr --mode isdn
233
234 You can also put the driver directly into Unimodem mode when it's loaded,
235 by passing the module parameter startmode=0 to the hardware specific
236 module, e.g.
237 modprobe usb_gigaset startmode=0
238 or by adding a line like
239 options usb_gigaset startmode=0
240 to an appropriate module configuration file, like /etc/modprobe.d/gigaset
241 or /etc/modprobe.conf.local.
242
2372.6. Call-ID (CID) mode 2432.6. Call-ID (CID) mode
238 ------------------ 244 ------------------
239 Call-IDs are numbers used to tag commands to, and responses from, the 245 Call-IDs are numbers used to tag commands to, and responses from, the
@@ -263,7 +269,22 @@ GigaSet 307x Device Driver
263 change its CID mode while the driver is loaded, eg. 269 change its CID mode while the driver is loaded, eg.
264 echo 0 > /sys/class/tty/ttyGU0/cidmode 270 echo 0 > /sys/class/tty/ttyGU0/cidmode
265 271
2662.7. Unregistered Wireless Devices (M101/M105) 2722.7. Dialing Numbers
273 ---------------
274 The called party number provided by an application for dialing out must
275 be a public network number according to the local dialing plan, without
276 any dial prefix for getting an outside line.
277
278 Internal calls can be made by providing an internal extension number
279 prefixed with "**" (two asterisks) as the called party number. So to dial
280 eg. the first registered DECT handset, give "**11" as the called party
281 number. Dialing "***" (three asterisks) calls all extensions
282 simultaneously (global call).
283
284 This holds for both CAPI 2.0 and ISDN4Linux applications. Unimodem mode
285 does not support internal calls.
286
2872.8. Unregistered Wireless Devices (M101/M105)
267 ----------------------------------------- 288 -----------------------------------------
268 The main purpose of the ser_gigaset and usb_gigaset drivers is to allow 289 The main purpose of the ser_gigaset and usb_gigaset drivers is to allow
269 the M101 and M105 wireless devices to be used as ISDN devices for ISDN 290 the M101 and M105 wireless devices to be used as ISDN devices for ISDN
diff --git a/Documentation/ja_JP/HOWTO b/Documentation/ja_JP/HOWTO
index 55476982b5ca..b63301a03811 100644
--- a/Documentation/ja_JP/HOWTO
+++ b/Documentation/ja_JP/HOWTO
@@ -223,7 +223,7 @@ web サイトには、コードの構成、サブシステム、現在存在す
223あなたがどこからスタートして良いかわからないが、Linux カーネル開発コミュ 223あなたがどこからスタートして良いかわからないが、Linux カーネル開発コミュ
224ニティに参加して何かすることをさがしている場合には、Linux kernel 224ニティに参加して何かすることをさがしている場合には、Linux kernel
225Janitor's プロジェクトにいけば良いでしょう - 225Janitor's プロジェクトにいけば良いでしょう -
226 http://janitor.kernelnewbies.org/ 226 http://kernelnewbies.org/KernelJanitors
227ここはそのようなスタートをするのにうってつけの場所です。ここには、 227ここはそのようなスタートをするのにうってつけの場所です。ここには、
228Linux カーネルソースツリーの中に含まれる、きれいにし、修正しなければな 228Linux カーネルソースツリーの中に含まれる、きれいにし、修正しなければな
229らない、単純な問題のリストが記述されています。このプロジェクトに関わる 229らない、単純な問題のリストが記述されています。このプロジェクトに関わる
diff --git a/Documentation/ja_JP/SubmittingPatches b/Documentation/ja_JP/SubmittingPatches
index a9dc1243e859..f107c834d242 100644
--- a/Documentation/ja_JP/SubmittingPatches
+++ b/Documentation/ja_JP/SubmittingPatches
@@ -97,7 +97,7 @@ Quilt:
97http://savannah.nongnu.org/projects/quilt 97http://savannah.nongnu.org/projects/quilt
98 98
99Andrew Morton's patch scripts: 99Andrew Morton's patch scripts:
100http://www.zip.com.au/~akpm/linux/patches/ 100http://userweb.kernel.org/~akpm/stuff/tpp.txt
101このリンクの先のスクリプトの代わりとして、quilt がパッチマネジメント 101このリンクの先のスクリプトの代わりとして、quilt がパッチマネジメント
102ツールとして推奨されています(上のリンクを見てください)。 102ツールとして推奨されています(上のリンクを見てください)。
103 103
@@ -210,7 +210,7 @@ VGER.KERNEL.ORG でホスティングされているメーリングリストの
210 ・移植性のないコードから移植性のあるコードへの置き換え(小さい範囲で 210 ・移植性のないコードから移植性のあるコードへの置き換え(小さい範囲で
211 あればアーキテクチャ特有のことでも他の人がコピーできます) 211 あればアーキテクチャ特有のことでも他の人がコピーできます)
212 ・作者やメンテナによる修正(すなわち patch monkey の再転送モード) 212 ・作者やメンテナによる修正(すなわち patch monkey の再転送モード)
213URL: <http://www.kernel.org/pub/linux/kernel/people/bunk/trivial/> 213EMAIL: <trivial@kernel.org>
214 214
2157) MIME やリンクや圧縮ファイルや添付ファイルではなくプレインテキストのみ 2157) MIME やリンクや圧縮ファイルや添付ファイルではなくプレインテキストのみ
216 216
@@ -534,7 +534,7 @@ gcc においては、マクロと同じくらい軽いです。
534---------------------- 534----------------------
535 535
536Andrew Morton, "The perfect patch" (tpp). 536Andrew Morton, "The perfect patch" (tpp).
537 <http://www.zip.com.au/~akpm/linux/patches/stuff/tpp.txt> 537 <http://userweb.kernel.org/~akpm/stuff/tpp.txt>
538 538
539Jeff Garzik, "Linux kernel patch submission format". 539Jeff Garzik, "Linux kernel patch submission format".
540 <http://linux.yyz.us/patch-format.html> 540 <http://linux.yyz.us/patch-format.html>
diff --git a/Documentation/kbuild/kbuild.txt b/Documentation/kbuild/kbuild.txt
index e903f20077cf..1e5165aa9e4e 100644
--- a/Documentation/kbuild/kbuild.txt
+++ b/Documentation/kbuild/kbuild.txt
@@ -62,15 +62,15 @@ Set the directory to look for the kernel source when building external
62modules. 62modules.
63The directory can be specified in several ways: 63The directory can be specified in several ways:
641) Use "M=..." on the command line 641) Use "M=..." on the command line
652) Environmnet variable KBUILD_EXTMOD 652) Environment variable KBUILD_EXTMOD
663) Environmnet variable SUBDIRS 663) Environment variable SUBDIRS
67The possibilities are listed in the order they take precedence. 67The possibilities are listed in the order they take precedence.
68Using "M=..." will always override the others. 68Using "M=..." will always override the others.
69 69
70KBUILD_OUTPUT 70KBUILD_OUTPUT
71-------------------------------------------------- 71--------------------------------------------------
72Specify the output directory when building the kernel. 72Specify the output directory when building the kernel.
73The output directory can also be specificed using "O=...". 73The output directory can also be specified using "O=...".
74Setting "O=..." takes precedence over KBUILD_OUTPUT. 74Setting "O=..." takes precedence over KBUILD_OUTPUT.
75 75
76ARCH 76ARCH
@@ -112,7 +112,7 @@ The script will be called with the following arguments:
112 $3 - kernel map file 112 $3 - kernel map file
113 $4 - default install path (use root directory if blank) 113 $4 - default install path (use root directory if blank)
114 114
115The implmentation of "make install" is architecture specific 115The implementation of "make install" is architecture specific
116and it may differ from the above. 116and it may differ from the above.
117 117
118INSTALLKERNEL is provided to enable the possibility to 118INSTALLKERNEL is provided to enable the possibility to
diff --git a/Documentation/kbuild/kconfig.txt b/Documentation/kbuild/kconfig.txt
index b2cb16ebcb16..cca46b1a0f6c 100644
--- a/Documentation/kbuild/kconfig.txt
+++ b/Documentation/kbuild/kconfig.txt
@@ -65,7 +65,7 @@ also use the environment variable KCONFIG_ALLCONFIG as a flag or a
65filename that contains config symbols that the user requires to be 65filename that contains config symbols that the user requires to be
66set to a specific value. If KCONFIG_ALLCONFIG is used without a 66set to a specific value. If KCONFIG_ALLCONFIG is used without a
67filename, "make *config" checks for a file named 67filename, "make *config" checks for a file named
68"all{yes/mod/no/random}.config" (corresponding to the *config command 68"all{yes/mod/no/def/random}.config" (corresponding to the *config command
69that was used) for symbol values that are to be forced. If this file 69that was used) for symbol values that are to be forced. If this file
70is not found, it checks for a file named "all.config" to contain forced 70is not found, it checks for a file named "all.config" to contain forced
71values. 71values.
diff --git a/Documentation/kbuild/makefiles.txt b/Documentation/kbuild/makefiles.txt
index c899192b37bb..0ef00bd6e54d 100644
--- a/Documentation/kbuild/makefiles.txt
+++ b/Documentation/kbuild/makefiles.txt
@@ -45,7 +45,6 @@ This document describes the Linux kernel Makefiles.
45 --- 7.1 header-y 45 --- 7.1 header-y
46 --- 7.2 objhdr-y 46 --- 7.2 objhdr-y
47 --- 7.3 destination-y 47 --- 7.3 destination-y
48 --- 7.4 unifdef-y (deprecated)
49 48
50 === 8 Kbuild Variables 49 === 8 Kbuild Variables
51 === 9 Makefile language 50 === 9 Makefile language
@@ -168,7 +167,7 @@ more details, with real examples.
168 #drivers/isdn/i4l/Makefile 167 #drivers/isdn/i4l/Makefile
169 # Makefile for the kernel ISDN subsystem and device drivers. 168 # Makefile for the kernel ISDN subsystem and device drivers.
170 # Each configuration option enables a list of files. 169 # Each configuration option enables a list of files.
171 obj-$(CONFIG_ISDN) += isdn.o 170 obj-$(CONFIG_ISDN_I4L) += isdn.o
172 obj-$(CONFIG_ISDN_PPP_BSDCOMP) += isdn_bsdcomp.o 171 obj-$(CONFIG_ISDN_PPP_BSDCOMP) += isdn_bsdcomp.o
173 172
174--- 3.3 Loadable module goals - obj-m 173--- 3.3 Loadable module goals - obj-m
@@ -187,34 +186,35 @@ more details, with real examples.
187 Note: In this example $(CONFIG_ISDN_PPP_BSDCOMP) evaluates to 'm' 186 Note: In this example $(CONFIG_ISDN_PPP_BSDCOMP) evaluates to 'm'
188 187
189 If a kernel module is built from several source files, you specify 188 If a kernel module is built from several source files, you specify
190 that you want to build a module in the same way as above. 189 that you want to build a module in the same way as above; however,
191 190 kbuild needs to know which object files you want to build your
192 Kbuild needs to know which the parts that you want to build your 191 module from, so you have to tell it by setting a $(<module_name>-y)
193 module from, so you have to tell it by setting an 192 variable.
194 $(<module_name>-objs) variable.
195 193
196 Example: 194 Example:
197 #drivers/isdn/i4l/Makefile 195 #drivers/isdn/i4l/Makefile
198 obj-$(CONFIG_ISDN) += isdn.o 196 obj-$(CONFIG_ISDN_I4L) += isdn.o
199 isdn-objs := isdn_net_lib.o isdn_v110.o isdn_common.o 197 isdn-y := isdn_net_lib.o isdn_v110.o isdn_common.o
200 198
201 In this example, the module name will be isdn.o. Kbuild will 199 In this example, the module name will be isdn.o. Kbuild will
202 compile the objects listed in $(isdn-objs) and then run 200 compile the objects listed in $(isdn-y) and then run
203 "$(LD) -r" on the list of these files to generate isdn.o. 201 "$(LD) -r" on the list of these files to generate isdn.o.
204 202
205 Kbuild recognises objects used for composite objects by the suffix 203 Due to kbuild recognizing $(<module_name>-y) for composite objects,
206 -objs, and the suffix -y. This allows the Makefiles to use 204 you can use the value of a CONFIG_ symbol to optionally include an
207 the value of a CONFIG_ symbol to determine if an object is part 205 object file as part of a composite object.
208 of a composite object.
209 206
210 Example: 207 Example:
211 #fs/ext2/Makefile 208 #fs/ext2/Makefile
212 obj-$(CONFIG_EXT2_FS) += ext2.o 209 obj-$(CONFIG_EXT2_FS) += ext2.o
213 ext2-y := balloc.o bitmap.o 210 ext2-y := balloc.o dir.o file.o ialloc.o inode.o ioctl.o \
214 ext2-$(CONFIG_EXT2_FS_XATTR) += xattr.o 211 namei.o super.o symlink.o
212 ext2-$(CONFIG_EXT2_FS_XATTR) += xattr.o xattr_user.o \
213 xattr_trusted.o
215 214
216 In this example, xattr.o is only part of the composite object 215 In this example, xattr.o, xattr_user.o and xattr_trusted.o are only
217 ext2.o if $(CONFIG_EXT2_FS_XATTR) evaluates to 'y'. 216 part of the composite object ext2.o if $(CONFIG_EXT2_FS_XATTR)
217 evaluates to 'y'.
218 218
219 Note: Of course, when you are building objects into the kernel, 219 Note: Of course, when you are building objects into the kernel,
220 the syntax above will also work. So, if you have CONFIG_EXT2_FS=y, 220 the syntax above will also work. So, if you have CONFIG_EXT2_FS=y,
@@ -244,12 +244,12 @@ more details, with real examples.
244 may contain both a built-in.o and a lib.a file. 244 may contain both a built-in.o and a lib.a file.
245 245
246 Example: 246 Example:
247 #arch/i386/lib/Makefile 247 #arch/x86/lib/Makefile
248 lib-y := checksum.o delay.o 248 lib-y := delay.o
249 249
250 This will create a library lib.a based on checksum.o and delay.o. 250 This will create a library lib.a based on delay.o. For kbuild to
251 For kbuild to actually recognize that there is a lib.a being built, 251 actually recognize that there is a lib.a being built, the directory
252 the directory shall be listed in libs-y. 252 shall be listed in libs-y.
253 See also "6.3 List directories to visit when descending". 253 See also "6.3 List directories to visit when descending".
254 254
255 Use of lib-y is normally restricted to lib/ and arch/*/lib. 255 Use of lib-y is normally restricted to lib/ and arch/*/lib.
@@ -284,43 +284,40 @@ more details, with real examples.
284--- 3.7 Compilation flags 284--- 3.7 Compilation flags
285 285
286 ccflags-y, asflags-y and ldflags-y 286 ccflags-y, asflags-y and ldflags-y
287 The three flags listed above applies only to the kbuild makefile 287 These three flags apply only to the kbuild makefile in which they
288 where they are assigned. They are used for all the normal 288 are assigned. They are used for all the normal cc, as and ld
289 cc, as and ld invocation happenign during a recursive build. 289 invocations happening during a recursive build.
290 Note: Flags with the same behaviour were previously named: 290 Note: Flags with the same behaviour were previously named:
291 EXTRA_CFLAGS, EXTRA_AFLAGS and EXTRA_LDFLAGS. 291 EXTRA_CFLAGS, EXTRA_AFLAGS and EXTRA_LDFLAGS.
292 They are yet supported but their use are deprecated. 292 They are still supported but their usage is deprecated.
293 293
294 ccflags-y specifies options for compiling C files with $(CC). 294 ccflags-y specifies options for compiling with $(CC).
295 295
296 Example: 296 Example:
297 # drivers/sound/emu10k1/Makefile 297 # drivers/acpi/Makefile
298 ccflags-y += -I$(obj) 298 ccflags-y := -Os
299 ccflags-$(DEBUG) += -DEMU10K1_DEBUG 299 ccflags-$(CONFIG_ACPI_DEBUG) += -DACPI_DEBUG_OUTPUT
300
301 300
302 This variable is necessary because the top Makefile owns the 301 This variable is necessary because the top Makefile owns the
303 variable $(KBUILD_CFLAGS) and uses it for compilation flags for the 302 variable $(KBUILD_CFLAGS) and uses it for compilation flags for the
304 entire tree. 303 entire tree.
305 304
306 asflags-y is a similar string for per-directory options 305 asflags-y specifies options for assembling with $(AS).
307 when compiling assembly language source.
308 306
309 Example: 307 Example:
310 #arch/x86_64/kernel/Makefile 308 #arch/sparc/kernel/Makefile
311 asflags-y := -traditional 309 asflags-y := -ansi
312 310
313 311 ldflags-y specifies options for linking with $(LD).
314 ldflags-y is a string for per-directory options to $(LD).
315 312
316 Example: 313 Example:
317 #arch/m68k/fpsp040/Makefile 314 #arch/cris/boot/compressed/Makefile
318 ldflags-y := -x 315 ldflags-y += -T $(srctree)/$(src)/decompress_$(arch-y).lds
319 316
320 subdir-ccflags-y, subdir-asflags-y 317 subdir-ccflags-y, subdir-asflags-y
321 The two flags listed above are similar to ccflags-y and as-falgs-y. 318 The two flags listed above are similar to ccflags-y and asflags-y.
322 The difference is that the subdir- variants has effect for the kbuild 319 The difference is that the subdir- variants have effect for the kbuild
323 file where tey are present and all subdirectories. 320 file where they are present and all subdirectories.
324 Options specified using subdir-* are added to the commandline before 321 Options specified using subdir-* are added to the commandline before
325 the options specified using the non-subdir variants. 322 the options specified using the non-subdir variants.
326 323
@@ -340,18 +337,18 @@ more details, with real examples.
340 CFLAGS_aha152x.o = -DAHA152X_STAT -DAUTOCONF 337 CFLAGS_aha152x.o = -DAHA152X_STAT -DAUTOCONF
341 CFLAGS_gdth.o = # -DDEBUG_GDTH=2 -D__SERIAL__ -D__COM2__ \ 338 CFLAGS_gdth.o = # -DDEBUG_GDTH=2 -D__SERIAL__ -D__COM2__ \
342 -DGDTH_STATISTICS 339 -DGDTH_STATISTICS
343 CFLAGS_seagate.o = -DARBITRATE -DPARITY -DSEAGATE_USE_ASM
344 340
345 These three lines specify compilation flags for aha152x.o, 341 These two lines specify compilation flags for aha152x.o and gdth.o.
346 gdth.o, and seagate.o
347 342
348 $(AFLAGS_$@) is a similar feature for source files in assembly 343 $(AFLAGS_$@) is a similar feature for source files in assembly
349 languages. 344 languages.
350 345
351 Example: 346 Example:
352 # arch/arm/kernel/Makefile 347 # arch/arm/kernel/Makefile
353 AFLAGS_head-armv.o := -DTEXTADDR=$(TEXTADDR) -traditional 348 AFLAGS_head.o := -DTEXT_OFFSET=$(TEXT_OFFSET)
354 AFLAGS_head-armo.o := -DTEXTADDR=$(TEXTADDR) -traditional 349 AFLAGS_crunch-bits.o := -Wa,-mcpu=ep9312
350 AFLAGS_iwmmxt.o := -Wa,-mcpu=iwmmxt
351
355 352
356--- 3.9 Dependency tracking 353--- 3.9 Dependency tracking
357 354
@@ -1200,14 +1197,14 @@ When kbuild executes, the following steps are followed (roughly):
1200=== 7 Kbuild syntax for exported headers 1197=== 7 Kbuild syntax for exported headers
1201 1198
1202The kernel include a set of headers that is exported to userspace. 1199The kernel include a set of headers that is exported to userspace.
1203Many headers can be exported as-is but other headers requires a 1200Many headers can be exported as-is but other headers require a
1204minimal pre-processing before they are ready for user-space. 1201minimal pre-processing before they are ready for user-space.
1205The pre-processing does: 1202The pre-processing does:
1206- drop kernel specific annotations 1203- drop kernel specific annotations
1207- drop include of compiler.h 1204- drop include of compiler.h
1208- drop all sections that is kernel internat (guarded by ifdef __KERNEL__) 1205- drop all sections that are kernel internal (guarded by ifdef __KERNEL__)
1209 1206
1210Each relevant directory contain a file name "Kbuild" which specify the 1207Each relevant directory contains a file name "Kbuild" which specifies the
1211headers to be exported. 1208headers to be exported.
1212See subsequent chapter for the syntax of the Kbuild file. 1209See subsequent chapter for the syntax of the Kbuild file.
1213 1210
@@ -1254,11 +1251,6 @@ See subsequent chapter for the syntax of the Kbuild file.
1254 will be located in the directory "include/linux" when exported. 1251 will be located in the directory "include/linux" when exported.
1255 1252
1256 1253
1257 --- 7.4 unifdef-y (deprecated)
1258
1259 unifdef-y is deprecated. A direct replacement is header-y.
1260
1261
1262=== 8 Kbuild Variables 1254=== 8 Kbuild Variables
1263 1255
1264The top Makefile exports the following variables: 1256The top Makefile exports the following variables:
diff --git a/Documentation/kernel-doc-nano-HOWTO.txt b/Documentation/kernel-doc-nano-HOWTO.txt
index 27a52b35d55b..3d8a97747f77 100644
--- a/Documentation/kernel-doc-nano-HOWTO.txt
+++ b/Documentation/kernel-doc-nano-HOWTO.txt
@@ -345,5 +345,10 @@ documentation, in <filename>, for the functions listed.
345section titled <section title> from <filename>. 345section titled <section title> from <filename>.
346Spaces are allowed in <section title>; do not quote the <section title>. 346Spaces are allowed in <section title>; do not quote the <section title>.
347 347
348!C<filename> is replaced by nothing, but makes the tools check that
349all DOC: sections and documented functions, symbols, etc. are used.
350This makes sense to use when you use !F/!P only and want to verify
351that all documentation is included.
352
348Tim. 353Tim.
349*/ <twaugh@redhat.com> 354*/ <twaugh@redhat.com>
diff --git a/Documentation/kernel-docs.txt b/Documentation/kernel-docs.txt
index ec8d31ee12e0..715eaaf1519d 100644
--- a/Documentation/kernel-docs.txt
+++ b/Documentation/kernel-docs.txt
@@ -75,7 +75,7 @@
75 75
76 * Title: "Conceptual Architecture of the Linux Kernel" 76 * Title: "Conceptual Architecture of the Linux Kernel"
77 Author: Ivan T. Bowman. 77 Author: Ivan T. Bowman.
78 URL: http://plg.uwaterloo.ca/~itbowman/papers/CS746G-a1.html 78 URL: http://plg.uwaterloo.ca/
79 Keywords: conceptual software architecture, extracted design, 79 Keywords: conceptual software architecture, extracted design,
80 reverse engineering, system structure. 80 reverse engineering, system structure.
81 Description: Conceptual software architecture of the Linux kernel, 81 Description: Conceptual software architecture of the Linux kernel,
@@ -84,7 +84,7 @@
84 84
85 * Title: "Concrete Architecture of the Linux Kernel" 85 * Title: "Concrete Architecture of the Linux Kernel"
86 Author: Ivan T. Bowman, Saheem Siddiqi, and Meyer C. Tanuan. 86 Author: Ivan T. Bowman, Saheem Siddiqi, and Meyer C. Tanuan.
87 URL: http://plg.uwaterloo.ca/~itbowman/papers/CS746G-a2.html 87 URL: http://plg.uwaterloo.ca/
88 Keywords: concrete architecture, extracted design, reverse 88 Keywords: concrete architecture, extracted design, reverse
89 engineering, system structure, dependencies. 89 engineering, system structure, dependencies.
90 Description: Concrete architecture of the Linux kernel, 90 Description: Concrete architecture of the Linux kernel,
@@ -95,7 +95,7 @@
95 * Title: "Linux as a Case Study: Its Extracted Software 95 * Title: "Linux as a Case Study: Its Extracted Software
96 Architecture" 96 Architecture"
97 Author: Ivan T. Bowman, Richard C. Holt and Neil V. Brewster. 97 Author: Ivan T. Bowman, Richard C. Holt and Neil V. Brewster.
98 URL: http://plg.uwaterloo.ca/~itbowman/papers/linuxcase.html 98 URL: http://plg.uwaterloo.ca/
99 Keywords: software architecture, architecture recovery, 99 Keywords: software architecture, architecture recovery,
100 redocumentation. 100 redocumentation.
101 Description: Paper appeared at ICSE'99, Los Angeles, May 16-22, 101 Description: Paper appeared at ICSE'99, Los Angeles, May 16-22,
@@ -104,7 +104,7 @@
104 104
105 * Title: "Overview of the Virtual File System" 105 * Title: "Overview of the Virtual File System"
106 Author: Richard Gooch. 106 Author: Richard Gooch.
107 URL: http://www.atnf.csiro.au/~rgooch/linux/vfs.txt 107 URL: http://www.mjmwired.net/kernel/Documentation/filesystems/vfs.txt
108 Keywords: VFS, File System, mounting filesystems, opening files, 108 Keywords: VFS, File System, mounting filesystems, opening files,
109 dentries, dcache. 109 dentries, dcache.
110 Description: Brief introduction to the Linux Virtual File System. 110 Description: Brief introduction to the Linux Virtual File System.
@@ -267,15 +267,13 @@
267 * Title: "Kernel API changes from 2.0 to 2.2" 267 * Title: "Kernel API changes from 2.0 to 2.2"
268 Author: Richard Gooch. 268 Author: Richard Gooch.
269 URL: 269 URL:
270 http://www.atnf.csiro.au/~rgooch/linux/docs/porting-to-2.2.html 270 http://www.linuxhq.com/guides/LKMPG/node28.html
271 Keywords: 2.2, changes. 271 Keywords: 2.2, changes.
272 Description: Kernel functions/structures/variables which changed 272 Description: Kernel functions/structures/variables which changed
273 from 2.0.x to 2.2.x. 273 from 2.0.x to 2.2.x.
274 274
275 * Title: "Kernel API changes from 2.2 to 2.4" 275 * Title: "Kernel API changes from 2.2 to 2.4"
276 Author: Richard Gooch. 276 Author: Richard Gooch.
277 URL:
278 http://www.atnf.csiro.au/~rgooch/linux/docs/porting-to-2.4.html
279 Keywords: 2.4, changes. 277 Keywords: 2.4, changes.
280 Description: Kernel functions/structures/variables which changed 278 Description: Kernel functions/structures/variables which changed
281 from 2.2.x to 2.4.x. 279 from 2.2.x to 2.4.x.
@@ -290,7 +288,6 @@
290 288
291 * Title: "I/O Event Handling Under Linux" 289 * Title: "I/O Event Handling Under Linux"
292 Author: Richard Gooch. 290 Author: Richard Gooch.
293 URL: http://www.atnf.csiro.au/~rgooch/linux/docs/io-events.html
294 Keywords: IO, I/O, select(2), poll(2), FDs, aio_read(2), readiness 291 Keywords: IO, I/O, select(2), poll(2), FDs, aio_read(2), readiness
295 event queues. 292 event queues.
296 Description: From the Introduction: "I/O Event handling is about 293 Description: From the Introduction: "I/O Event handling is about
@@ -386,64 +383,64 @@
386 383
387 * Title: "Porting Device Drivers To Linux 2.2: part II" 384 * Title: "Porting Device Drivers To Linux 2.2: part II"
388 Author: Alan Cox. 385 Author: Alan Cox.
389 URL: http://www.linux-mag.com/1999-06/gear_01.html 386 URL: http://www.linux-mag.com/id/238
390 Keywords: ports, porting. 387 Keywords: ports, porting.
391 Description: Second part on porting from 2.0 to 2.2 kernels. 388 Description: Second part on porting from 2.0 to 2.2 kernels.
392 389
393 * Title: "How To Make Sure Your Driver Will Work On The Power 390 * Title: "How To Make Sure Your Driver Will Work On The Power
394 Macintosh" 391 Macintosh"
395 Author: Paul Mackerras. 392 Author: Paul Mackerras.
396 URL: http://www.linux-mag.com/1999-07/gear_01.html 393 URL: http://www.linux-mag.com/id/261
397 Keywords: Mac, Power Macintosh, porting, drivers, compatibility. 394 Keywords: Mac, Power Macintosh, porting, drivers, compatibility.
398 Description: The title says it all. 395 Description: The title says it all.
399 396
400 * Title: "An Introduction to SCSI Drivers" 397 * Title: "An Introduction to SCSI Drivers"
401 Author: Alan Cox. 398 Author: Alan Cox.
402 URL: http://www.linux-mag.com/1999-08/gear_01.html 399 URL: http://www.linux-mag.com/id/284
403 Keywords: SCSI, device, driver. 400 Keywords: SCSI, device, driver.
404 Description: The title says it all. 401 Description: The title says it all.
405 402
406 * Title: "Advanced SCSI Drivers And Other Tales" 403 * Title: "Advanced SCSI Drivers And Other Tales"
407 Author: Alan Cox. 404 Author: Alan Cox.
408 URL: http://www.linux-mag.com/1999-09/gear_01.html 405 URL: http://www.linux-mag.com/id/307
409 Keywords: SCSI, device, driver, advanced. 406 Keywords: SCSI, device, driver, advanced.
410 Description: The title says it all. 407 Description: The title says it all.
411 408
412 * Title: "Writing Linux Mouse Drivers" 409 * Title: "Writing Linux Mouse Drivers"
413 Author: Alan Cox. 410 Author: Alan Cox.
414 URL: http://www.linux-mag.com/1999-10/gear_01.html 411 URL: http://www.linux-mag.com/id/330
415 Keywords: mouse, driver, gpm. 412 Keywords: mouse, driver, gpm.
416 Description: The title says it all. 413 Description: The title says it all.
417 414
418 * Title: "More on Mouse Drivers" 415 * Title: "More on Mouse Drivers"
419 Author: Alan Cox. 416 Author: Alan Cox.
420 URL: http://www.linux-mag.com/1999-11/gear_01.html 417 URL: http://www.linux-mag.com/id/356
421 Keywords: mouse, driver, gpm, races, asynchronous I/O. 418 Keywords: mouse, driver, gpm, races, asynchronous I/O.
422 Description: The title still says it all. 419 Description: The title still says it all.
423 420
424 * Title: "Writing Video4linux Radio Driver" 421 * Title: "Writing Video4linux Radio Driver"
425 Author: Alan Cox. 422 Author: Alan Cox.
426 URL: http://www.linux-mag.com/1999-12/gear_01.html 423 URL: http://www.linux-mag.com/id/381
427 Keywords: video4linux, driver, radio, radio devices. 424 Keywords: video4linux, driver, radio, radio devices.
428 Description: The title says it all. 425 Description: The title says it all.
429 426
430 * Title: "Video4linux Drivers, Part 1: Video-Capture Device" 427 * Title: "Video4linux Drivers, Part 1: Video-Capture Device"
431 Author: Alan Cox. 428 Author: Alan Cox.
432 URL: http://www.linux-mag.com/2000-01/gear_01.html 429 URL: http://www.linux-mag.com/id/406
433 Keywords: video4linux, driver, video capture, capture devices, 430 Keywords: video4linux, driver, video capture, capture devices,
434 camera driver. 431 camera driver.
435 Description: The title says it all. 432 Description: The title says it all.
436 433
437 * Title: "Video4linux Drivers, Part 2: Video-capture Devices" 434 * Title: "Video4linux Drivers, Part 2: Video-capture Devices"
438 Author: Alan Cox. 435 Author: Alan Cox.
439 URL: http://www.linux-mag.com/2000-02/gear_01.html 436 URL: http://www.linux-mag.com/id/429
440 Keywords: video4linux, driver, video capture, capture devices, 437 Keywords: video4linux, driver, video capture, capture devices,
441 camera driver, control, query capabilities, capability, facility. 438 camera driver, control, query capabilities, capability, facility.
442 Description: The title says it all. 439 Description: The title says it all.
443 440
444 * Title: "PCI Management in Linux 2.2" 441 * Title: "PCI Management in Linux 2.2"
445 Author: Alan Cox. 442 Author: Alan Cox.
446 URL: http://www.linux-mag.com/2000-03/gear_01.html 443 URL: http://www.linux-mag.com/id/452
447 Keywords: PCI, bus, bus-mastering. 444 Keywords: PCI, bus, bus-mastering.
448 Description: The title says it all. 445 Description: The title says it all.
449 446
@@ -502,7 +499,7 @@
502 499
503 * Title: "A Linux vm README" 500 * Title: "A Linux vm README"
504 Author: Kanoj Sarcar. 501 Author: Kanoj Sarcar.
505 URL: http://reality.sgi.com/kanoj_engr/vm229.html 502 URL: http://kos.enix.org/pub/linux-vmm.html
506 Keywords: virtual memory, mm, pgd, vma, page, page flags, page 503 Keywords: virtual memory, mm, pgd, vma, page, page flags, page
507 cache, swap cache, kswapd. 504 cache, swap cache, kswapd.
508 Description: Telegraphic, short descriptions and definitions 505 Description: Telegraphic, short descriptions and definitions
@@ -659,7 +656,7 @@
659 656
660 * Name: "Linux Kernel Source Reference" 657 * Name: "Linux Kernel Source Reference"
661 Author: Thomas Graichen. 658 Author: Thomas Graichen.
662 URL: http://innominate.org/~graichen/projects/lksr/ 659 URL: http://marc.info/?l=linux-kernel&m=96446640102205&w=4
663 Keywords: CVS, web, cvsweb, browsing source code. 660 Keywords: CVS, web, cvsweb, browsing source code.
664 Description: Web interface to a CVS server with the kernel 661 Description: Web interface to a CVS server with the kernel
665 sources. "Here you can have a look at any file of the Linux kernel 662 sources. "Here you can have a look at any file of the Linux kernel
@@ -682,7 +679,7 @@
682 produced during the week. Published every Thursday. 679 produced during the week. Published every Thursday.
683 680
684 * Name: "Kernel Traffic" 681 * Name: "Kernel Traffic"
685 URL: http://kt.zork.net/kernel-traffic/ 682 URL: http://kt.earth.li/kernel-traffic/index.html
686 Keywords: linux-kernel mailing list, weekly kernel news. 683 Keywords: linux-kernel mailing list, weekly kernel news.
687 Description: Weekly newsletter covering the most relevant 684 Description: Weekly newsletter covering the most relevant
688 discussions of the linux-kernel mailing list. 685 discussions of the linux-kernel mailing list.
diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt
index 2b2407d9a6d0..ed45e9802aa8 100644
--- a/Documentation/kernel-parameters.txt
+++ b/Documentation/kernel-parameters.txt
@@ -43,10 +43,11 @@ parameter is applicable:
43 AVR32 AVR32 architecture is enabled. 43 AVR32 AVR32 architecture is enabled.
44 AX25 Appropriate AX.25 support is enabled. 44 AX25 Appropriate AX.25 support is enabled.
45 BLACKFIN Blackfin architecture is enabled. 45 BLACKFIN Blackfin architecture is enabled.
46 DRM Direct Rendering Management support is enabled.
47 EDD BIOS Enhanced Disk Drive Services (EDD) is enabled 46 EDD BIOS Enhanced Disk Drive Services (EDD) is enabled
48 EFI EFI Partitioning (GPT) is enabled 47 EFI EFI Partitioning (GPT) is enabled
49 EIDE EIDE/ATAPI support is enabled. 48 EIDE EIDE/ATAPI support is enabled.
49 DRM Direct Rendering Management support is enabled.
50 DYNAMIC_DEBUG Build in debug messages and enable them at runtime
50 FB The frame buffer device is enabled. 51 FB The frame buffer device is enabled.
51 GCOV GCOV profiling is enabled. 52 GCOV GCOV profiling is enabled.
52 HW Appropriate hardware is enabled. 53 HW Appropriate hardware is enabled.
@@ -73,7 +74,6 @@ parameter is applicable:
73 MTD MTD (Memory Technology Device) support is enabled. 74 MTD MTD (Memory Technology Device) support is enabled.
74 NET Appropriate network support is enabled. 75 NET Appropriate network support is enabled.
75 NUMA NUMA support is enabled. 76 NUMA NUMA support is enabled.
76 GENERIC_TIME The generic timeofday code is enabled.
77 NFS Appropriate NFS support is enabled. 77 NFS Appropriate NFS support is enabled.
78 OSS OSS sound support is enabled. 78 OSS OSS sound support is enabled.
79 PV_OPS A paravirtualized kernel is enabled. 79 PV_OPS A paravirtualized kernel is enabled.
@@ -89,10 +89,11 @@ parameter is applicable:
89 RAM RAM disk support is enabled. 89 RAM RAM disk support is enabled.
90 S390 S390 architecture is enabled. 90 S390 S390 architecture is enabled.
91 SCSI Appropriate SCSI support is enabled. 91 SCSI Appropriate SCSI support is enabled.
92 A lot of drivers has their options described inside of 92 A lot of drivers have their options described inside
93 Documentation/scsi/. 93 the Documentation/scsi/ sub-directory.
94 SECURITY Different security models are enabled. 94 SECURITY Different security models are enabled.
95 SELINUX SELinux support is enabled. 95 SELINUX SELinux support is enabled.
96 APPARMOR AppArmor support is enabled.
96 SERIAL Serial support is enabled. 97 SERIAL Serial support is enabled.
97 SH SuperH architecture is enabled. 98 SH SuperH architecture is enabled.
98 SMP The kernel is an SMP kernel. 99 SMP The kernel is an SMP kernel.
@@ -115,6 +116,7 @@ parameter is applicable:
115 More X86-64 boot options can be found in 116 More X86-64 boot options can be found in
116 Documentation/x86/x86_64/boot-options.txt . 117 Documentation/x86/x86_64/boot-options.txt .
117 X86 Either 32bit or 64bit x86 (same as X86-32+X86-64) 118 X86 Either 32bit or 64bit x86 (same as X86-32+X86-64)
119 XEN Xen support is enabled
118 120
119In addition, the following text indicates that the option: 121In addition, the following text indicates that the option:
120 122
@@ -280,36 +282,17 @@ and is between 256 and 4096 characters. It is defined in the file
280 no: ACPI OperationRegions are not marked as reserved, 282 no: ACPI OperationRegions are not marked as reserved,
281 no further checks are performed. 283 no further checks are performed.
282 284
283 ad1848= [HW,OSS]
284 Format: <io>,<irq>,<dma>,<dma2>,<type>
285
286 add_efi_memmap [EFI; X86] Include EFI memory map in 285 add_efi_memmap [EFI; X86] Include EFI memory map in
287 kernel's map of available physical RAM. 286 kernel's map of available physical RAM.
288 287
289 advansys= [HW,SCSI]
290 See header of drivers/scsi/advansys.c.
291
292 aedsp16= [HW,OSS] Audio Excel DSP 16
293 Format: <io>,<irq>,<dma>,<mss_io>,<mpu_io>,<mpu_irq>
294 See also header of sound/oss/aedsp16.c.
295
296 agp= [AGP] 288 agp= [AGP]
297 { off | try_unsupported } 289 { off | try_unsupported }
298 off: disable AGP support 290 off: disable AGP support
299 try_unsupported: try to drive unsupported chipsets 291 try_unsupported: try to drive unsupported chipsets
300 (may crash computer or cause data corruption) 292 (may crash computer or cause data corruption)
301 293
302 aha152x= [HW,SCSI] 294 ALSA [HW,ALSA]
303 See Documentation/scsi/aha152x.txt. 295 See Documentation/sound/alsa/alsa-parameters.txt
304
305 aha1542= [HW,SCSI]
306 Format: <portbase>[,<buson>,<busoff>[,<dmaspeed>]]
307
308 aic7xxx= [HW,SCSI]
309 See Documentation/scsi/aic7xxx.txt.
310
311 aic79xx= [HW,SCSI]
312 See Documentation/scsi/aic79xx.txt.
313 296
314 alignment= [KNL,ARM] 297 alignment= [KNL,ARM]
315 Allow the default userspace alignment fault handler 298 Allow the default userspace alignment fault handler
@@ -371,8 +354,6 @@ and is between 256 and 4096 characters. It is defined in the file
371 354
372 atarimouse= [HW,MOUSE] Atari Mouse 355 atarimouse= [HW,MOUSE] Atari Mouse
373 356
374 atascsi= [HW,SCSI] Atari SCSI
375
376 atkbd.extra= [HW] Enable extra LEDs and keys on IBM RapidAccess, 357 atkbd.extra= [HW] Enable extra LEDs and keys on IBM RapidAccess,
377 EzKey and similar keyboards 358 EzKey and similar keyboards
378 359
@@ -422,10 +403,6 @@ and is between 256 and 4096 characters. It is defined in the file
422 bttv.pll= See Documentation/video4linux/bttv/Insmod-options 403 bttv.pll= See Documentation/video4linux/bttv/Insmod-options
423 bttv.tuner= and Documentation/video4linux/bttv/CARDLIST 404 bttv.tuner= and Documentation/video4linux/bttv/CARDLIST
424 405
425 BusLogic= [HW,SCSI]
426 See drivers/scsi/BusLogic.c, comment before function
427 BusLogic_ParseDriverOptions().
428
429 c101= [NET] Moxa C101 synchronous serial card 406 c101= [NET] Moxa C101 synchronous serial card
430 407
431 cachesize= [BUGS=X86-32] Override level 2 CPU cache size detection. 408 cachesize= [BUGS=X86-32] Override level 2 CPU cache size detection.
@@ -468,7 +445,7 @@ and is between 256 and 4096 characters. It is defined in the file
468 clocksource is not available, it defaults to PIT. 445 clocksource is not available, it defaults to PIT.
469 Format: { pit | tsc | cyclone | pmtmr } 446 Format: { pit | tsc | cyclone | pmtmr }
470 447
471 clocksource= [GENERIC_TIME] Override the default clocksource 448 clocksource= Override the default clocksource
472 Format: <string> 449 Format: <string>
473 Override the default clocksource and use the clocksource 450 Override the default clocksource and use the clocksource
474 with the name specified. 451 with the name specified.
@@ -479,7 +456,7 @@ and is between 256 and 4096 characters. It is defined in the file
479 [ARM] imx_timer1,OSTS,netx_timer,mpu_timer2, 456 [ARM] imx_timer1,OSTS,netx_timer,mpu_timer2,
480 pxa_timer,timer3,32k_counter,timer0_1 457 pxa_timer,timer3,32k_counter,timer0_1
481 [AVR32] avr32 458 [AVR32] avr32
482 [X86-32] pit,hpet,tsc,vmi-timer; 459 [X86-32] pit,hpet,tsc;
483 scx200_hrt on Geode; cyclone on IBM x440 460 scx200_hrt on Geode; cyclone on IBM x440
484 [MIPS] MIPS 461 [MIPS] MIPS
485 [PARISC] cr16 462 [PARISC] cr16
@@ -594,6 +571,10 @@ and is between 256 and 4096 characters. It is defined in the file
594 Format: <port#>,<type> 571 Format: <port#>,<type>
595 See also Documentation/input/joystick-parport.txt 572 See also Documentation/input/joystick-parport.txt
596 573
574 ddebug_query= [KNL,DYNAMIC_DEBUG] Enable debug messages at early boot
575 time. See Documentation/dynamic-debug-howto.txt for
576 details.
577
597 debug [KNL] Enable kernel debugging (events log level). 578 debug [KNL] Enable kernel debugging (events log level).
598 579
599 debug_locks_verbose= 580 debug_locks_verbose=
@@ -655,8 +636,6 @@ and is between 256 and 4096 characters. It is defined in the file
655 Disable PIN 1 of APIC timer 636 Disable PIN 1 of APIC timer
656 Can be useful to work around chipset bugs. 637 Can be useful to work around chipset bugs.
657 638
658 dmasound= [HW,OSS] Sound subsystem buffers
659
660 dma_debug=off If the kernel is compiled with DMA_API_DEBUG support, 639 dma_debug=off If the kernel is compiled with DMA_API_DEBUG support,
661 this option disables the debugging code at boot. 640 this option disables the debugging code at boot.
662 641
@@ -676,8 +655,6 @@ and is between 256 and 4096 characters. It is defined in the file
676 655
677 dscc4.setup= [NET] 656 dscc4.setup= [NET]
678 657
679 dtc3181e= [HW,SCSI]
680
681 dynamic_printk Enables pr_debug()/dev_dbg() calls if 658 dynamic_printk Enables pr_debug()/dev_dbg() calls if
682 CONFIG_DYNAMIC_PRINTK_DEBUG has been enabled. 659 CONFIG_DYNAMIC_PRINTK_DEBUG has been enabled.
683 These can also be switched on/off via 660 These can also be switched on/off via
@@ -686,8 +663,11 @@ and is between 256 and 4096 characters. It is defined in the file
686 earlycon= [KNL] Output early console device and options. 663 earlycon= [KNL] Output early console device and options.
687 uart[8250],io,<addr>[,options] 664 uart[8250],io,<addr>[,options]
688 uart[8250],mmio,<addr>[,options] 665 uart[8250],mmio,<addr>[,options]
666 uart[8250],mmio32,<addr>[,options]
689 Start an early, polled-mode console on the 8250/16550 667 Start an early, polled-mode console on the 8250/16550
690 UART at the specified I/O port or MMIO address. 668 UART at the specified I/O port or MMIO address.
669 MMIO inter-register address stride is either 8bit (mmio)
670 or 32bit (mmio32).
691 The options are the same as for ttyS, above. 671 The options are the same as for ttyS, above.
692 672
693 earlyprintk= [X86,SH,BLACKFIN] 673 earlyprintk= [X86,SH,BLACKFIN]
@@ -715,8 +695,6 @@ and is between 256 and 4096 characters. It is defined in the file
715 This is desgined to be used in conjunction with 695 This is desgined to be used in conjunction with
716 the boot argument: earlyprintk=vga 696 the boot argument: earlyprintk=vga
717 697
718 eata= [HW,SCSI]
719
720 edd= [EDD] 698 edd= [EDD]
721 Format: {"off" | "on" | "skip[mbr]"} 699 Format: {"off" | "on" | "skip[mbr]"}
722 700
@@ -772,12 +750,6 @@ and is between 256 and 4096 characters. It is defined in the file
772 Format: <interval>,<probability>,<space>,<times> 750 Format: <interval>,<probability>,<space>,<times>
773 See also /Documentation/fault-injection/. 751 See also /Documentation/fault-injection/.
774 752
775 fd_mcs= [HW,SCSI]
776 See header of drivers/scsi/fd_mcs.c.
777
778 fdomain= [HW,SCSI]
779 See header of drivers/scsi/fdomain.c.
780
781 floppy= [HW] 753 floppy= [HW]
782 See Documentation/blockdev/floppy.txt. 754 See Documentation/blockdev/floppy.txt.
783 755
@@ -837,14 +809,9 @@ and is between 256 and 4096 characters. It is defined in the file
837 When zero, profiling data is discarded and associated 809 When zero, profiling data is discarded and associated
838 debugfs files are removed at module unload time. 810 debugfs files are removed at module unload time.
839 811
840 gdth= [HW,SCSI]
841 See header of drivers/scsi/gdth.c.
842
843 gpt [EFI] Forces disk with valid GPT signature but 812 gpt [EFI] Forces disk with valid GPT signature but
844 invalid Protective MBR to be treated as GPT. 813 invalid Protective MBR to be treated as GPT.
845 814
846 gvp11= [HW,SCSI]
847
848 hashdist= [KNL,NUMA] Large hashes allocated during boot 815 hashdist= [KNL,NUMA] Large hashes allocated during boot
849 are distributed across NUMA nodes. Defaults on 816 are distributed across NUMA nodes. Defaults on
850 for 64bit NUMA, off otherwise. 817 for 64bit NUMA, off otherwise.
@@ -917,9 +884,6 @@ and is between 256 and 4096 characters. It is defined in the file
917 controller 884 controller
918 i8042.nopnp [HW] Don't use ACPIPnP / PnPBIOS to discover KBD/AUX 885 i8042.nopnp [HW] Don't use ACPIPnP / PnPBIOS to discover KBD/AUX
919 controllers 886 controllers
920 i8042.panicblink=
921 [HW] Frequency with which keyboard LEDs should blink
922 when kernel panics (default is 0.5 sec)
923 i8042.reset [HW] Reset the controller during init and cleanup 887 i8042.reset [HW] Reset the controller during init and cleanup
924 i8042.unlock [HW] Unlock (ignore) the keylock 888 i8042.unlock [HW] Unlock (ignore) the keylock
925 889
@@ -936,9 +900,6 @@ and is between 256 and 4096 characters. It is defined in the file
936 i8k.restricted [HW] Allow controlling fans only if SYS_ADMIN 900 i8k.restricted [HW] Allow controlling fans only if SYS_ADMIN
937 capability is set. 901 capability is set.
938 902
939 ibmmcascsi= [HW,MCA,SCSI] IBM MicroChannel SCSI adapter
940 See Documentation/mca.txt.
941
942 icn= [HW,ISDN] 903 icn= [HW,ISDN]
943 Format: <io>[,<membase>[,<icn_id>[,<icn_id2>]]] 904 Format: <io>[,<membase>[,<icn_id>[,<icn_id2>]]]
944 905
@@ -988,9 +949,6 @@ and is between 256 and 4096 characters. It is defined in the file
988 programs exec'd, files mmap'd for exec, and all files 949 programs exec'd, files mmap'd for exec, and all files
989 opened for read by uid=0. 950 opened for read by uid=0.
990 951
991 in2000= [HW,SCSI]
992 See header of drivers/scsi/in2000.c.
993
994 init= [KNL] 952 init= [KNL]
995 Format: <full_path> 953 Format: <full_path>
996 Run specified binary instead of /sbin/init as init 954 Run specified binary instead of /sbin/init as init
@@ -1028,6 +986,12 @@ and is between 256 and 4096 characters. It is defined in the file
1028 result in a hardware IOTLB flush operation as opposed 986 result in a hardware IOTLB flush operation as opposed
1029 to batching them for performance. 987 to batching them for performance.
1030 988
989 intremap= [X86-64, Intel-IOMMU]
990 Format: { on (default) | off | nosid }
991 on enable Interrupt Remapping (default)
992 off disable Interrupt Remapping
993 nosid disable Source ID checking
994
1031 inttest= [IA64] 995 inttest= [IA64]
1032 996
1033 iomem= Disable strict checking of access to MMIO memory 997 iomem= Disable strict checking of access to MMIO memory
@@ -1068,9 +1032,6 @@ and is between 256 and 4096 characters. It is defined in the file
1068 See comment before ip2_setup() in 1032 See comment before ip2_setup() in
1069 drivers/char/ip2/ip2base.c. 1033 drivers/char/ip2/ip2base.c.
1070 1034
1071 ips= [HW,SCSI] Adaptec / IBM ServeRAID controller
1072 See header of drivers/scsi/ips.c.
1073
1074 irqfixup [HW] 1035 irqfixup [HW]
1075 When an interrupt is not handled search all handlers 1036 When an interrupt is not handled search all handlers
1076 for it. Intended to get systems with badly broken 1037 for it. Intended to get systems with badly broken
@@ -1143,9 +1104,12 @@ and is between 256 and 4096 characters. It is defined in the file
1143 kgdboc= [KGDB,HW] kgdb over consoles. 1104 kgdboc= [KGDB,HW] kgdb over consoles.
1144 Requires a tty driver that supports console polling, 1105 Requires a tty driver that supports console polling,
1145 or a supported polling keyboard driver (non-usb). 1106 or a supported polling keyboard driver (non-usb).
1146 Serial only format: <serial_device>[,baud] 1107 Serial only format: <serial_device>[,baud]
1147 keyboard only format: kbd 1108 keyboard only format: kbd
1148 keyboard and serial format: kbd,<serial_device>[,baud] 1109 keyboard and serial format: kbd,<serial_device>[,baud]
1110 Optional Kernel mode setting:
1111 kms, kbd format: kms,kbd
1112 kms, kbd and serial format: kms,kbd,<ser_dev>[,baud]
1149 1113
1150 kgdbwait [KGDB] Stop kernel execution and enter the 1114 kgdbwait [KGDB] Stop kernel execution and enter the
1151 kernel debugger at the earliest opportunity. 1115 kernel debugger at the earliest opportunity.
@@ -1167,9 +1131,13 @@ and is between 256 and 4096 characters. It is defined in the file
1167 kvm.oos_shadow= [KVM] Disable out-of-sync shadow paging. 1131 kvm.oos_shadow= [KVM] Disable out-of-sync shadow paging.
1168 Default is 1 (enabled) 1132 Default is 1 (enabled)
1169 1133
1170 kvm-amd.nested= [KVM,AMD] Allow nested virtualization in KVM/SVM. 1134 kvm.mmu_audit= [KVM] This is a R/W parameter which allows audit
1135 KVM MMU at runtime.
1171 Default is 0 (off) 1136 Default is 0 (off)
1172 1137
1138 kvm-amd.nested= [KVM,AMD] Allow nested virtualization in KVM/SVM.
1139 Default is 1 (enabled)
1140
1173 kvm-amd.npt= [KVM,AMD] Disable nested paging (virtualized MMU) 1141 kvm-amd.npt= [KVM,AMD] Disable nested paging (virtualized MMU)
1174 for all guests. 1142 for all guests.
1175 Default is 1 (enabled) if in 64bit or 32bit-PAE mode 1143 Default is 1 (enabled) if in 64bit or 32bit-PAE mode
@@ -1343,9 +1311,6 @@ and is between 256 and 4096 characters. It is defined in the file
1343 ltpc= [NET] 1311 ltpc= [NET]
1344 Format: <io>,<irq>,<dma> 1312 Format: <io>,<irq>,<dma>
1345 1313
1346 mac5380= [HW,SCSI] Format:
1347 <can_queue>,<cmd_per_lun>,<sg_tablesize>,<hostid>,<use_tags>
1348
1349 machvec= [IA64] Force the use of a particular machine-vector 1314 machvec= [IA64] Force the use of a particular machine-vector
1350 (machvec) in a generic kernel. 1315 (machvec) in a generic kernel.
1351 Example: machvec=hpzx1_swiotlb 1316 Example: machvec=hpzx1_swiotlb
@@ -1367,13 +1332,6 @@ and is between 256 and 4096 characters. It is defined in the file
1367 be mounted 1332 be mounted
1368 Format: <1-256> 1333 Format: <1-256>
1369 1334
1370 max_luns= [SCSI] Maximum number of LUNs to probe.
1371 Should be between 1 and 2^32-1.
1372
1373 max_report_luns=
1374 [SCSI] Maximum number of LUNs received.
1375 Should be between 1 and 16384.
1376
1377 mcatest= [IA-64] 1335 mcatest= [IA-64]
1378 1336
1379 mce [X86-32] Machine Check Exception 1337 mce [X86-32] Machine Check Exception
@@ -1523,9 +1481,6 @@ and is between 256 and 4096 characters. It is defined in the file
1523 that the amount of memory usable for all allocations 1481 that the amount of memory usable for all allocations
1524 is not too small. 1482 is not too small.
1525 1483
1526 mpu401= [HW,OSS]
1527 Format: <io>,<irq>
1528
1529 MTD_Partition= [MTD] 1484 MTD_Partition= [MTD]
1530 Format: <name>,<region-number>,<size>,<offset> 1485 Format: <name>,<region-number>,<size>,<offset>
1531 1486
@@ -1573,19 +1528,6 @@ and is between 256 and 4096 characters. It is defined in the file
1573 1528
1574 n2= [NET] SDL Inc. RISCom/N2 synchronous serial card 1529 n2= [NET] SDL Inc. RISCom/N2 synchronous serial card
1575 1530
1576 NCR_D700= [HW,SCSI]
1577 See header of drivers/scsi/NCR_D700.c.
1578
1579 ncr5380= [HW,SCSI]
1580
1581 ncr53c400= [HW,SCSI]
1582
1583 ncr53c400a= [HW,SCSI]
1584
1585 ncr53c406a= [HW,SCSI]
1586
1587 ncr53c8xx= [HW,SCSI]
1588
1589 netdev= [NET] Network devices parameters 1531 netdev= [NET] Network devices parameters
1590 Format: <irq>,<io>,<mem_start>,<mem_end>,<name> 1532 Format: <irq>,<io>,<mem_start>,<mem_end>,<name>
1591 Note that mem_start is often overloaded to mean 1533 Note that mem_start is often overloaded to mean
@@ -1597,15 +1539,17 @@ and is between 256 and 4096 characters. It is defined in the file
1597 [NETFILTER] Enable connection tracking flow accounting 1539 [NETFILTER] Enable connection tracking flow accounting
1598 0 to disable accounting 1540 0 to disable accounting
1599 1 to enable accounting 1541 1 to enable accounting
1600 Default value depends on CONFIG_NF_CT_ACCT that is 1542 Default value is 0.
1601 going to be removed in 2.6.29.
1602 1543
1603 nfsaddrs= [NFS] 1544 nfsaddrs= [NFS] Deprecated. Use ip= instead.
1604 See Documentation/filesystems/nfs/nfsroot.txt. 1545 See Documentation/filesystems/nfs/nfsroot.txt.
1605 1546
1606 nfsroot= [NFS] nfs root filesystem for disk-less boxes. 1547 nfsroot= [NFS] nfs root filesystem for disk-less boxes.
1607 See Documentation/filesystems/nfs/nfsroot.txt. 1548 See Documentation/filesystems/nfs/nfsroot.txt.
1608 1549
1550 nfsrootdebug [NFS] enable nfsroot debugging messages.
1551 See Documentation/filesystems/nfs/nfsroot.txt.
1552
1609 nfs.callback_tcpport= 1553 nfs.callback_tcpport=
1610 [NFS] set the TCP port on which the NFSv4 callback 1554 [NFS] set the TCP port on which the NFSv4 callback
1611 channel should listen. 1555 channel should listen.
@@ -1755,11 +1699,14 @@ and is between 256 and 4096 characters. It is defined in the file
1755 1699
1756 nointremap [X86-64, Intel-IOMMU] Do not enable interrupt 1700 nointremap [X86-64, Intel-IOMMU] Do not enable interrupt
1757 remapping. 1701 remapping.
1702 [Deprecated - use intremap=off]
1758 1703
1759 nointroute [IA-64] 1704 nointroute [IA-64]
1760 1705
1761 nojitter [IA64] Disables jitter checking for ITC timers. 1706 nojitter [IA64] Disables jitter checking for ITC timers.
1762 1707
1708 no-kvmclock [X86,KVM] Disable paravirtualized KVM clock driver
1709
1763 nolapic [X86-32,APIC] Do not enable or use the local APIC. 1710 nolapic [X86-32,APIC] Do not enable or use the local APIC.
1764 1711
1765 nolapic_timer [X86-32,APIC] Do not use the local APIC timer. 1712 nolapic_timer [X86-32,APIC] Do not use the local APIC timer.
@@ -1780,7 +1727,7 @@ and is between 256 and 4096 characters. It is defined in the file
1780 norandmaps Don't use address space randomization. Equivalent to 1727 norandmaps Don't use address space randomization. Equivalent to
1781 echo 0 > /proc/sys/kernel/randomize_va_space 1728 echo 0 > /proc/sys/kernel/randomize_va_space
1782 1729
1783 noreplace-paravirt [X86-32,PV_OPS] Don't patch paravirt_ops 1730 noreplace-paravirt [X86,IA-64,PV_OPS] Don't patch paravirt_ops
1784 1731
1785 noreplace-smp [X86-32,SMP] Don't replace SMP instructions 1732 noreplace-smp [X86-32,SMP] Don't replace SMP instructions
1786 with UP alternatives 1733 with UP alternatives
@@ -1812,6 +1759,8 @@ and is between 256 and 4096 characters. It is defined in the file
1812 1759
1813 nousb [USB] Disable the USB subsystem 1760 nousb [USB] Disable the USB subsystem
1814 1761
1762 nowatchdog [KNL] Disable the lockup detector.
1763
1815 nowb [ARM] 1764 nowb [ARM]
1816 1765
1817 nox2apic [X86-64,APIC] Do not enable x2APIC mode. 1766 nox2apic [X86-64,APIC] Do not enable x2APIC mode.
@@ -1849,9 +1798,6 @@ and is between 256 and 4096 characters. It is defined in the file
1849 For example, to override I2C bus2: 1798 For example, to override I2C bus2:
1850 omap_mux=i2c2_scl.i2c2_scl=0x100,i2c2_sda.i2c2_sda=0x100 1799 omap_mux=i2c2_scl.i2c2_scl=0x100,i2c2_sda.i2c2_sda=0x100
1851 1800
1852 opl3= [HW,OSS]
1853 Format: <io>
1854
1855 oprofile.timer= [HW] 1801 oprofile.timer= [HW]
1856 Use timer interrupt instead of performance counters 1802 Use timer interrupt instead of performance counters
1857 1803
@@ -1863,9 +1809,8 @@ and is between 256 and 4096 characters. It is defined in the file
1863 perfmon on Intel CPUs instead of the 1809 perfmon on Intel CPUs instead of the
1864 CPU specific event set. 1810 CPU specific event set.
1865 1811
1866 osst= [HW,SCSI] SCSI Tape Driver 1812 OSS [HW,OSS]
1867 Format: <buffer_size>,<write_threshold> 1813 See Documentation/sound/oss/oss-parameters.txt
1868 See also Documentation/scsi/st.txt.
1869 1814
1870 panic= [KNL] Kernel behaviour on panic 1815 panic= [KNL] Kernel behaviour on panic
1871 Format: <timeout> 1816 Format: <timeout>
@@ -1899,12 +1844,6 @@ and is between 256 and 4096 characters. It is defined in the file
1899 Currently this function knows 686a and 8231 chips. 1844 Currently this function knows 686a and 8231 chips.
1900 Format: [spp|ps2|epp|ecp|ecpepp] 1845 Format: [spp|ps2|epp|ecp|ecpepp]
1901 1846
1902 pas2= [HW,OSS] Format:
1903 <io>,<irq>,<dma>,<dma16>,<sb_io>,<sb_irq>,<sb_dma>,<sb_dma16>
1904
1905 pas16= [HW,SCSI]
1906 See header of drivers/scsi/pas16.c.
1907
1908 pause_on_oops= 1847 pause_on_oops=
1909 Halt all CPUs after the first oops has been printed for 1848 Halt all CPUs after the first oops has been printed for
1910 the specified number of seconds. This is to be used if 1849 the specified number of seconds. This is to be used if
@@ -1970,6 +1909,8 @@ and is between 256 and 4096 characters. It is defined in the file
1970 norom [X86] Do not assign address space to 1909 norom [X86] Do not assign address space to
1971 expansion ROMs that do not already have 1910 expansion ROMs that do not already have
1972 BIOS assigned address ranges. 1911 BIOS assigned address ranges.
1912 nobar [X86] Do not assign address space to the
1913 BARs that weren't assigned by the BIOS.
1973 irqmask=0xMMMM [X86] Set a bit mask of IRQs allowed to be 1914 irqmask=0xMMMM [X86] Set a bit mask of IRQs allowed to be
1974 assigned automatically to PCI devices. You can 1915 assigned automatically to PCI devices. You can
1975 make the kernel exclude IRQs of your ISA cards 1916 make the kernel exclude IRQs of your ISA cards
@@ -2047,15 +1988,18 @@ and is between 256 and 4096 characters. It is defined in the file
2047 force Enable ASPM even on devices that claim not to support it. 1988 force Enable ASPM even on devices that claim not to support it.
2048 WARNING: Forcing ASPM on may cause system lockups. 1989 WARNING: Forcing ASPM on may cause system lockups.
2049 1990
1991 pcie_ports= [PCIE] PCIe ports handling:
1992 auto Ask the BIOS whether or not to use native PCIe services
1993 associated with PCIe ports (PME, hot-plug, AER). Use
1994 them only if that is allowed by the BIOS.
1995 native Use native PCIe services associated with PCIe ports
1996 unconditionally.
1997 compat Treat PCIe ports as PCI-to-PCI bridges, disable the PCIe
1998 ports driver.
1999
2050 pcie_pme= [PCIE,PM] Native PCIe PME signaling options: 2000 pcie_pme= [PCIE,PM] Native PCIe PME signaling options:
2051 Format: {auto|force}[,nomsi]
2052 auto Use native PCIe PME signaling if the BIOS allows the
2053 kernel to control PCIe config registers of root ports.
2054 force Use native PCIe PME signaling even if the BIOS refuses
2055 to allow the kernel to control the relevant PCIe config
2056 registers.
2057 nomsi Do not use MSI for native PCIe PME signaling (this makes 2001 nomsi Do not use MSI for native PCIe PME signaling (this makes
2058 all PCIe root ports use INTx for everything). 2002 all PCIe root ports use INTx for all services).
2059 2003
2060 pcmv= [HW,PCMCIA] BadgePAD 4 2004 pcmv= [HW,PCMCIA] BadgePAD 4
2061 2005
@@ -2171,10 +2115,6 @@ and is between 256 and 4096 characters. It is defined in the file
2171 [HW,MOUSE] Controls Logitech smartscroll autorepeat. 2115 [HW,MOUSE] Controls Logitech smartscroll autorepeat.
2172 0 = disabled, 1 = enabled (default). 2116 0 = disabled, 1 = enabled (default).
2173 2117
2174 pss= [HW,OSS] Personal Sound System (ECHO ESC614)
2175 Format:
2176 <io>,<mss_io>,<mss_irq>,<mss_dma>,<mpu_io>,<mpu_irq>
2177
2178 pt. [PARIDE] 2118 pt. [PARIDE]
2179 See Documentation/blockdev/paride.txt. 2119 See Documentation/blockdev/paride.txt.
2180 2120
@@ -2227,9 +2167,19 @@ and is between 256 and 4096 characters. It is defined in the file
2227 Reserves a hole at the top of the kernel virtual 2167 Reserves a hole at the top of the kernel virtual
2228 address space. 2168 address space.
2229 2169
2170 reservelow= [X86]
2171 Format: nn[K]
2172 Set the amount of memory to reserve for BIOS at
2173 the bottom of the address space.
2174
2230 reset_devices [KNL] Force drivers to reset the underlying device 2175 reset_devices [KNL] Force drivers to reset the underlying device
2231 during initialization. 2176 during initialization.
2232 2177
2178 resource_alloc_from_bottom
2179 Allocate new resources from the beginning of available
2180 space, not the end. If you need to use this, please
2181 report a bug.
2182
2233 resume= [SWSUSP] 2183 resume= [SWSUSP]
2234 Specify the partition device for software suspend 2184 Specify the partition device for software suspend
2235 2185
@@ -2239,6 +2189,11 @@ and is between 256 and 4096 characters. It is defined in the file
2239 in <PAGE_SIZE> units (needed only for swap files). 2189 in <PAGE_SIZE> units (needed only for swap files).
2240 See Documentation/power/swsusp-and-swap-files.txt 2190 See Documentation/power/swsusp-and-swap-files.txt
2241 2191
2192 hibernate= [HIBERNATION]
2193 noresume Don't check if there's a hibernation image
2194 present during boot.
2195 nocompress Don't compress/decompress hibernation images.
2196
2242 retain_initrd [RAM] Keep initrd memory after extraction 2197 retain_initrd [RAM] Keep initrd memory after extraction
2243 2198
2244 rhash_entries= [KNL,NET] 2199 rhash_entries= [KNL,NET]
@@ -2273,30 +2228,6 @@ and is between 256 and 4096 characters. It is defined in the file
2273 2228
2274 sched_debug [KNL] Enables verbose scheduler debug messages. 2229 sched_debug [KNL] Enables verbose scheduler debug messages.
2275 2230
2276 scsi_debug_*= [SCSI]
2277 See drivers/scsi/scsi_debug.c.
2278
2279 scsi_default_dev_flags=
2280 [SCSI] SCSI default device flags
2281 Format: <integer>
2282
2283 scsi_dev_flags= [SCSI] Black/white list entry for vendor and model
2284 Format: <vendor>:<model>:<flags>
2285 (flags are integer value)
2286
2287 scsi_logging_level= [SCSI] a bit mask of logging levels
2288 See drivers/scsi/scsi_logging.h for bits. Also
2289 settable via sysctl at dev.scsi.logging_level
2290 (/proc/sys/dev/scsi/logging_level).
2291 There is also a nice 'scsi_logging_level' script in the
2292 S390-tools package, available for download at
2293 http://www-128.ibm.com/developerworks/linux/linux390/s390-tools-1.5.4.html
2294
2295 scsi_mod.scan= [SCSI] sync (default) scans SCSI busses as they are
2296 discovered. async scans them in kernel threads,
2297 allowing boot to proceed. none ignores them, expecting
2298 user space to do the scan.
2299
2300 security= [SECURITY] Choose a security module to enable at boot. 2231 security= [SECURITY] Choose a security module to enable at boot.
2301 If this boot parameter is not specified, only the first 2232 If this boot parameter is not specified, only the first
2302 security module asking for security registration will be 2233 security module asking for security registration will be
@@ -2312,6 +2243,13 @@ and is between 256 and 4096 characters. It is defined in the file
2312 If enabled at boot time, /selinux/disable can be used 2243 If enabled at boot time, /selinux/disable can be used
2313 later to disable prior to initial policy load. 2244 later to disable prior to initial policy load.
2314 2245
2246 apparmor= [APPARMOR] Disable or enable AppArmor at boot time
2247 Format: { "0" | "1" }
2248 See security/apparmor/Kconfig help text
2249 0 -- disable.
2250 1 -- enable.
2251 Default value is set via kernel config option.
2252
2315 serialnumber [BUGS=X86-32] 2253 serialnumber [BUGS=X86-32]
2316 2254
2317 shapers= [NET] 2255 shapers= [NET]
@@ -2323,9 +2261,6 @@ and is between 256 and 4096 characters. It is defined in the file
2323 The parameter means the number of CPUs to show, 2261 The parameter means the number of CPUs to show,
2324 for example 1 means boot CPU only. 2262 for example 1 means boot CPU only.
2325 2263
2326 sim710= [SCSI,HW]
2327 See header of drivers/scsi/sim710.c.
2328
2329 simeth= [IA-64] 2264 simeth= [IA-64]
2330 simscsi= 2265 simscsi=
2331 2266
@@ -2383,128 +2318,6 @@ and is between 256 and 4096 characters. It is defined in the file
2383 1: Fast pin select (default) 2318 1: Fast pin select (default)
2384 2: ATC IRMode 2319 2: ATC IRMode
2385 2320
2386 snd-ad1816a= [HW,ALSA]
2387
2388 snd-ad1848= [HW,ALSA]
2389
2390 snd-ali5451= [HW,ALSA]
2391
2392 snd-als100= [HW,ALSA]
2393
2394 snd-als4000= [HW,ALSA]
2395
2396 snd-azt2320= [HW,ALSA]
2397
2398 snd-cmi8330= [HW,ALSA]
2399
2400 snd-cmipci= [HW,ALSA]
2401
2402 snd-cs4231= [HW,ALSA]
2403
2404 snd-cs4232= [HW,ALSA]
2405
2406 snd-cs4236= [HW,ALSA]
2407
2408 snd-cs4281= [HW,ALSA]
2409
2410 snd-cs46xx= [HW,ALSA]
2411
2412 snd-dt019x= [HW,ALSA]
2413
2414 snd-dummy= [HW,ALSA]
2415
2416 snd-emu10k1= [HW,ALSA]
2417
2418 snd-ens1370= [HW,ALSA]
2419
2420 snd-ens1371= [HW,ALSA]
2421
2422 snd-es968= [HW,ALSA]
2423
2424 snd-es1688= [HW,ALSA]
2425
2426 snd-es18xx= [HW,ALSA]
2427
2428 snd-es1938= [HW,ALSA]
2429
2430 snd-es1968= [HW,ALSA]
2431
2432 snd-fm801= [HW,ALSA]
2433
2434 snd-gusclassic= [HW,ALSA]
2435
2436 snd-gusextreme= [HW,ALSA]
2437
2438 snd-gusmax= [HW,ALSA]
2439
2440 snd-hdsp= [HW,ALSA]
2441
2442 snd-ice1712= [HW,ALSA]
2443
2444 snd-intel8x0= [HW,ALSA]
2445
2446 snd-interwave= [HW,ALSA]
2447
2448 snd-interwave-stb=
2449 [HW,ALSA]
2450
2451 snd-korg1212= [HW,ALSA]
2452
2453 snd-maestro3= [HW,ALSA]
2454
2455 snd-mpu401= [HW,ALSA]
2456
2457 snd-mtpav= [HW,ALSA]
2458
2459 snd-nm256= [HW,ALSA]
2460
2461 snd-opl3sa2= [HW,ALSA]
2462
2463 snd-opti92x-ad1848=
2464 [HW,ALSA]
2465
2466 snd-opti92x-cs4231=
2467 [HW,ALSA]
2468
2469 snd-opti93x= [HW,ALSA]
2470
2471 snd-pmac= [HW,ALSA]
2472
2473 snd-rme32= [HW,ALSA]
2474
2475 snd-rme96= [HW,ALSA]
2476
2477 snd-rme9652= [HW,ALSA]
2478
2479 snd-sb8= [HW,ALSA]
2480
2481 snd-sb16= [HW,ALSA]
2482
2483 snd-sbawe= [HW,ALSA]
2484
2485 snd-serial= [HW,ALSA]
2486
2487 snd-sgalaxy= [HW,ALSA]
2488
2489 snd-sonicvibes= [HW,ALSA]
2490
2491 snd-sun-amd7930=
2492 [HW,ALSA]
2493
2494 snd-sun-cs4231= [HW,ALSA]
2495
2496 snd-trident= [HW,ALSA]
2497
2498 snd-usb-audio= [HW,ALSA,USB]
2499
2500 snd-via82xx= [HW,ALSA]
2501
2502 snd-virmidi= [HW,ALSA]
2503
2504 snd-wavefront= [HW,ALSA]
2505
2506 snd-ymfpci= [HW,ALSA]
2507
2508 softlockup_panic= 2321 softlockup_panic=
2509 [KNL] Should the soft-lockup detector generate panics. 2322 [KNL] Should the soft-lockup detector generate panics.
2510 2323
@@ -2519,12 +2332,6 @@ and is between 256 and 4096 characters. It is defined in the file
2519 spia_pedr= 2332 spia_pedr=
2520 spia_peddr= 2333 spia_peddr=
2521 2334
2522 sscape= [HW,OSS]
2523 Format: <io>,<irq>,<dma>,<mpu_io>,<mpu_irq>
2524
2525 st= [HW,SCSI] SCSI tape parameters (buffers, etc.)
2526 See Documentation/scsi/st.txt.
2527
2528 stacktrace [FTRACE] 2335 stacktrace [FTRACE]
2529 Enabled the stack tracer on boot up. 2336 Enabled the stack tracer on boot up.
2530 2337
@@ -2582,8 +2389,14 @@ and is between 256 and 4096 characters. It is defined in the file
2582 2389
2583 switches= [HW,M68k] 2390 switches= [HW,M68k]
2584 2391
2585 sym53c416= [HW,SCSI] 2392 sysfs.deprecated=0|1 [KNL]
2586 See header of drivers/scsi/sym53c416.c. 2393 Enable/disable old style sysfs layout for old udev
2394 on older distributions. When this option is enabled
2395 very new udev will not work anymore. When this option
2396 is disabled (or CONFIG_SYSFS_DEPRECATED not compiled)
2397 in older udev will not work anymore.
2398 Default depends on CONFIG_SYSFS_DEPRECATED_V2 set in
2399 the kernel configuration.
2587 2400
2588 sysrq_always_enabled 2401 sysrq_always_enabled
2589 [KNL] 2402 [KNL]
@@ -2591,9 +2404,6 @@ and is between 256 and 4096 characters. It is defined in the file
2591 neutralize any effect of /proc/sys/kernel/sysrq. 2404 neutralize any effect of /proc/sys/kernel/sysrq.
2592 Useful for debugging. 2405 Useful for debugging.
2593 2406
2594 t128= [HW,SCSI]
2595 See header of drivers/scsi/t128.c.
2596
2597 tdfx= [HW,DRM] 2407 tdfx= [HW,DRM]
2598 2408
2599 test_suspend= [SUSPEND] 2409 test_suspend= [SUSPEND]
@@ -2630,17 +2440,13 @@ and is between 256 and 4096 characters. It is defined in the file
2630 <deci-seconds>: poll all this frequency 2440 <deci-seconds>: poll all this frequency
2631 0: no polling (default) 2441 0: no polling (default)
2632 2442
2633 tmscsim= [HW,SCSI]
2634 See comment before function dc390_setup() in
2635 drivers/scsi/tmscsim.c.
2636
2637 topology= [S390] 2443 topology= [S390]
2638 Format: {off | on} 2444 Format: {off | on}
2639 Specify if the kernel should make use of the cpu 2445 Specify if the kernel should make use of the cpu
2640 topology informations if the hardware supports these. 2446 topology informations if the hardware supports these.
2641 The scheduler will make use of these informations and 2447 The scheduler will make use of these informations and
2642 e.g. base its process migration decisions on it. 2448 e.g. base its process migration decisions on it.
2643 Default is off. 2449 Default is on.
2644 2450
2645 tp720= [HW,PS2] 2451 tp720= [HW,PS2]
2646 2452
@@ -2661,16 +2467,16 @@ and is between 256 and 4096 characters. It is defined in the file
2661 to facilitate early boot debugging. 2467 to facilitate early boot debugging.
2662 See also Documentation/trace/events.txt 2468 See also Documentation/trace/events.txt
2663 2469
2664 trix= [HW,OSS] MediaTrix AudioTrix Pro
2665 Format:
2666 <io>,<irq>,<dma>,<dma2>,<sb_io>,<sb_irq>,<sb_dma>,<mpu_io>,<mpu_irq>
2667
2668 tsc= Disable clocksource-must-verify flag for TSC. 2470 tsc= Disable clocksource-must-verify flag for TSC.
2669 Format: <string> 2471 Format: <string>
2670 [x86] reliable: mark tsc clocksource as reliable, this 2472 [x86] reliable: mark tsc clocksource as reliable, this
2671 disables clocksource verification at runtime. 2473 disables clocksource verification at runtime.
2672 Used to enable high-resolution timer mode on older 2474 Used to enable high-resolution timer mode on older
2673 hardware, and in virtualized environment. 2475 hardware, and in virtualized environment.
2476 [x86] noirqtime: Do not use TSC to do irq accounting.
2477 Used to run time disable IRQ_TIME_ACCOUNTING on any
2478 platforms where RDTSC is slow and this accounting
2479 can add overhead.
2674 2480
2675 turbografx.map[2|3]= [HW,JOY] 2481 turbografx.map[2|3]= [HW,JOY]
2676 TurboGraFX parallel port interface 2482 TurboGraFX parallel port interface
@@ -2678,15 +2484,6 @@ and is between 256 and 4096 characters. It is defined in the file
2678 <port#>,<js1>,<js2>,<js3>,<js4>,<js5>,<js6>,<js7> 2484 <port#>,<js1>,<js2>,<js3>,<js4>,<js5>,<js6>,<js7>
2679 See also Documentation/input/joystick-parport.txt 2485 See also Documentation/input/joystick-parport.txt
2680 2486
2681 u14-34f= [HW,SCSI] UltraStor 14F/34F SCSI host adapter
2682 See header of drivers/scsi/u14-34f.c.
2683
2684 uart401= [HW,OSS]
2685 Format: <io>,<irq>
2686
2687 uart6850= [HW,OSS]
2688 Format: <io>,<irq>
2689
2690 uhash_entries= [KNL,NET] 2487 uhash_entries= [KNL,NET]
2691 Set number of hash buckets for UDP/UDP-Lite connections 2488 Set number of hash buckets for UDP/UDP-Lite connections
2692 2489
@@ -2852,15 +2649,6 @@ and is between 256 and 4096 characters. It is defined in the file
2852 overridden by individual drivers. 0 will hide 2649 overridden by individual drivers. 0 will hide
2853 cursors, 1 will display them. 2650 cursors, 1 will display them.
2854 2651
2855 waveartist= [HW,OSS]
2856 Format: <io>,<irq>,<dma>,<dma2>
2857
2858 wd33c93= [HW,SCSI]
2859 See header of drivers/scsi/wd33c93.c.
2860
2861 wd7000= [HW,SCSI]
2862 See header of drivers/scsi/wd7000.c.
2863
2864 watchdog timers [HW,WDT] For information on watchdog timers, 2652 watchdog timers [HW,WDT] For information on watchdog timers,
2865 see Documentation/watchdog/watchdog-parameters.txt 2653 see Documentation/watchdog/watchdog-parameters.txt
2866 or other driver-specific files in the 2654 or other driver-specific files in the
@@ -2879,6 +2667,18 @@ and is between 256 and 4096 characters. It is defined in the file
2879 xd= [HW,XT] Original XT pre-IDE (RLL encoded) disks. 2667 xd= [HW,XT] Original XT pre-IDE (RLL encoded) disks.
2880 xd_geo= See header of drivers/block/xd.c. 2668 xd_geo= See header of drivers/block/xd.c.
2881 2669
2670 xen_emul_unplug= [HW,X86,XEN]
2671 Unplug Xen emulated devices
2672 Format: [unplug0,][unplug1]
2673 ide-disks -- unplug primary master IDE devices
2674 aux-ide-disks -- unplug non-primary-master IDE devices
2675 nics -- unplug network devices
2676 all -- unplug all emulated devices (NICs and IDE disks)
2677 unnecessary -- unplugging emulated devices is
2678 unnecessary even if the host did not respond to
2679 the unplug protocol
2680 never -- do not unplug even if version check succeeds
2681
2882 xirc2ps_cs= [NET,PCMCIA] 2682 xirc2ps_cs= [NET,PCMCIA]
2883 Format: 2683 Format:
2884 <irq>,<irq_mask>,<io>,<full_duplex>,<do_sound>,<lockup_hack>[,<irq2>[,<irq3>[,<irq4>]]] 2684 <irq>,<irq_mask>,<io>,<full_duplex>,<do_sound>,<lockup_hack>[,<irq2>[,<irq3>[,<irq4>]]]
@@ -2887,5 +2687,4 @@ ______________________________________________________________________
2887 2687
2888TODO: 2688TODO:
2889 2689
2890 Add documentation for ALSA options.
2891 Add more DRM drivers. 2690 Add more DRM drivers.
diff --git a/Documentation/ko_KR/HOWTO b/Documentation/ko_KR/HOWTO
index 029fca914c05..e3a55b6091e9 100644
--- a/Documentation/ko_KR/HOWTO
+++ b/Documentation/ko_KR/HOWTO
@@ -122,7 +122,7 @@ mtk.manpages@gmail.com의 메인테이너에게 보낼 것을 권장한다.
122 122
123 올바른 패치들을 만드는 법에 관한 훌륭한 다른 문서들이 있다. 123 올바른 패치들을 만드는 법에 관한 훌륭한 다른 문서들이 있다.
124 "The Perfect Patch" 124 "The Perfect Patch"
125 http://www.zip.com.au/~akpm/linux/patches/stuff/tpp.txt 125 http://userweb.kernel.org/~akpm/stuff/tpp.txt
126 "Linux kernel patch submission format" 126 "Linux kernel patch submission format"
127 http://linux.yyz.us/patch-format.html 127 http://linux.yyz.us/patch-format.html
128 128
@@ -192,7 +192,7 @@ Documentation/DocBook/ 디렉토리 내에서 만들어지며 PDF, Postscript, H
192 192
193여러분이 어디서 시작해야 할진 모르지만 커널 개발 커뮤니티에 참여할 수 193여러분이 어디서 시작해야 할진 모르지만 커널 개발 커뮤니티에 참여할 수
194있는 일들을 찾길 원한다면 리눅스 커널 Janitor 프로젝트를 살펴봐라. 194있는 일들을 찾길 원한다면 리눅스 커널 Janitor 프로젝트를 살펴봐라.
195 http://janitor.kernelnewbies.org/ 195 http://kernelnewbies.org/KernelJanitors
196그곳은 시작하기에 훌륭한 장소이다. 그곳은 리눅스 커널 소스 트리내에 196그곳은 시작하기에 훌륭한 장소이다. 그곳은 리눅스 커널 소스 트리내에
197간단히 정리되고 수정될 수 있는 문제들에 관하여 설명한다. 여러분은 이 197간단히 정리되고 수정될 수 있는 문제들에 관하여 설명한다. 여러분은 이
198프로젝트를 대표하는 개발자들과 일하면서 자신의 패치를 리눅스 커널 트리에 198프로젝트를 대표하는 개발자들과 일하면서 자신의 패치를 리눅스 커널 트리에
@@ -596,7 +596,7 @@ Pat이라는 이름을 가진 여자가 있을 수도 있는 것이다. 리눅
596 596
597이것이 무엇인지 더 자세한 것을 알고 싶다면 다음 문서의 ChageLog 항을 봐라. 597이것이 무엇인지 더 자세한 것을 알고 싶다면 다음 문서의 ChageLog 항을 봐라.
598 "The Perfect Patch" 598 "The Perfect Patch"
599 http://www.zip.com.au/~akpm/linux/patches/stuff/tpp.txt 599 http://userweb.kernel.org/~akpm/stuff/tpp.txt
600 600
601 601
602 602
@@ -610,7 +610,7 @@ Pat이라는 이름을 가진 여자가 있을 수도 있는 것이다. 리눅
610 610
611 611
612---------- 612----------
613"개발 프로세스"(http://linux.tar.gz/articles/2.6-development_process) 섹션을 613"개발 프로세스"(http://lwn.net/Articles/94386/) 섹션을
614작성하는데 있어 참고할 문서를 사용하도록 허락해준 Paolo Ciarrocchi에게 614작성하는데 있어 참고할 문서를 사용하도록 허락해준 Paolo Ciarrocchi에게
615감사한다. 여러분들이 말해야 할 것과 말해서는 안되는 것의 목록 중 일부를 제공해준 615감사한다. 여러분들이 말해야 할 것과 말해서는 안되는 것의 목록 중 일부를 제공해준
616Randy Dunlap과 Gerrit Huizenga에게 감사한다. 또한 검토와 의견 그리고 616Randy Dunlap과 Gerrit Huizenga에게 감사한다. 또한 검토와 의견 그리고
diff --git a/Documentation/kprobes.txt b/Documentation/kprobes.txt
index 6653017680dd..741fe66d6eca 100644
--- a/Documentation/kprobes.txt
+++ b/Documentation/kprobes.txt
@@ -285,6 +285,7 @@ architectures:
285- sparc64 (Return probes not yet implemented.) 285- sparc64 (Return probes not yet implemented.)
286- arm 286- arm
287- ppc 287- ppc
288- mips
288 289
2893. Configuring Kprobes 2903. Configuring Kprobes
290 291
@@ -541,9 +542,11 @@ Kprobes does not use mutexes or allocate memory except during
541registration and unregistration. 542registration and unregistration.
542 543
543Probe handlers are run with preemption disabled. Depending on the 544Probe handlers are run with preemption disabled. Depending on the
544architecture, handlers may also run with interrupts disabled. In any 545architecture and optimization state, handlers may also run with
545case, your handler should not yield the CPU (e.g., by attempting to 546interrupts disabled (e.g., kretprobe handlers and optimized kprobe
546acquire a semaphore). 547handlers run without interrupt disabled on x86/x86-64). In any case,
548your handler should not yield the CPU (e.g., by attempting to acquire
549a semaphore).
547 550
548Since a return probe is implemented by replacing the return 551Since a return probe is implemented by replacing the return
549address with the trampoline's address, stack backtraces and calls 552address with the trampoline's address, stack backtraces and calls
diff --git a/Documentation/kvm/api.txt b/Documentation/kvm/api.txt
index a237518e51b9..b336266bea5e 100644
--- a/Documentation/kvm/api.txt
+++ b/Documentation/kvm/api.txt
@@ -126,6 +126,10 @@ user fills in the size of the indices array in nmsrs, and in return
126kvm adjusts nmsrs to reflect the actual number of msrs and fills in 126kvm adjusts nmsrs to reflect the actual number of msrs and fills in
127the indices array with their numbers. 127the indices array with their numbers.
128 128
129Note: if kvm indicates supports MCE (KVM_CAP_MCE), then the MCE bank MSRs are
130not returned in the MSR list, as different vcpus can have a different number
131of banks, as set via the KVM_X86_SETUP_MCE ioctl.
132
1294.4 KVM_CHECK_EXTENSION 1334.4 KVM_CHECK_EXTENSION
130 134
131Capability: basic 135Capability: basic
@@ -160,29 +164,7 @@ Type: vm ioctl
160Parameters: struct kvm_memory_region (in) 164Parameters: struct kvm_memory_region (in)
161Returns: 0 on success, -1 on error 165Returns: 0 on success, -1 on error
162 166
163struct kvm_memory_region { 167This ioctl is obsolete and has been removed.
164 __u32 slot;
165 __u32 flags;
166 __u64 guest_phys_addr;
167 __u64 memory_size; /* bytes */
168};
169
170/* for kvm_memory_region::flags */
171#define KVM_MEM_LOG_DIRTY_PAGES 1UL
172
173This ioctl allows the user to create or modify a guest physical memory
174slot. When changing an existing slot, it may be moved in the guest
175physical memory space, or its flags may be modified. It may not be
176resized. Slots may not overlap.
177
178The flags field supports just one flag, KVM_MEM_LOG_DIRTY_PAGES, which
179instructs kvm to keep track of writes to memory within the slot. See
180the KVM_GET_DIRTY_LOG ioctl.
181
182It is recommended to use the KVM_SET_USER_MEMORY_REGION ioctl instead
183of this API, if available. This newer API allows placing guest memory
184at specified locations in the host address space, yielding better
185control and easy access.
186 168
1874.6 KVM_CREATE_VCPU 1694.6 KVM_CREATE_VCPU
188 170
@@ -226,17 +208,7 @@ Type: vm ioctl
226Parameters: struct kvm_memory_alias (in) 208Parameters: struct kvm_memory_alias (in)
227Returns: 0 (success), -1 (error) 209Returns: 0 (success), -1 (error)
228 210
229struct kvm_memory_alias { 211This ioctl is obsolete and has been removed.
230 __u32 slot; /* this has a different namespace than memory slots */
231 __u32 flags;
232 __u64 guest_phys_addr;
233 __u64 memory_size;
234 __u64 target_phys_addr;
235};
236
237Defines a guest physical address space region as an alias to another
238region. Useful for aliased address, for example the VGA low memory
239window. Should not be used with userspace memory.
240 212
2414.9 KVM_RUN 2134.9 KVM_RUN
242 214
@@ -348,13 +320,13 @@ struct kvm_translation {
3484.15 KVM_INTERRUPT 3204.15 KVM_INTERRUPT
349 321
350Capability: basic 322Capability: basic
351Architectures: x86 323Architectures: x86, ppc
352Type: vcpu ioctl 324Type: vcpu ioctl
353Parameters: struct kvm_interrupt (in) 325Parameters: struct kvm_interrupt (in)
354Returns: 0 on success, -1 on error 326Returns: 0 on success, -1 on error
355 327
356Queues a hardware interrupt vector to be injected. This is only 328Queues a hardware interrupt vector to be injected. This is only
357useful if in-kernel local APIC is not used. 329useful if in-kernel local APIC or equivalent is not used.
358 330
359/* for KVM_INTERRUPT */ 331/* for KVM_INTERRUPT */
360struct kvm_interrupt { 332struct kvm_interrupt {
@@ -362,8 +334,37 @@ struct kvm_interrupt {
362 __u32 irq; 334 __u32 irq;
363}; 335};
364 336
337X86:
338
365Note 'irq' is an interrupt vector, not an interrupt pin or line. 339Note 'irq' is an interrupt vector, not an interrupt pin or line.
366 340
341PPC:
342
343Queues an external interrupt to be injected. This ioctl is overleaded
344with 3 different irq values:
345
346a) KVM_INTERRUPT_SET
347
348 This injects an edge type external interrupt into the guest once it's ready
349 to receive interrupts. When injected, the interrupt is done.
350
351b) KVM_INTERRUPT_UNSET
352
353 This unsets any pending interrupt.
354
355 Only available with KVM_CAP_PPC_UNSET_IRQ.
356
357c) KVM_INTERRUPT_SET_LEVEL
358
359 This injects a level type external interrupt into the guest context. The
360 interrupt stays pending until a specific ioctl with KVM_INTERRUPT_UNSET
361 is triggered.
362
363 Only available with KVM_CAP_PPC_IRQ_LEVEL.
364
365Note that any value for 'irq' other than the ones stated above is invalid
366and incurs unexpected behavior.
367
3674.16 KVM_DEBUG_GUEST 3684.16 KVM_DEBUG_GUEST
368 369
369Capability: basic 370Capability: basic
@@ -892,6 +893,198 @@ arguments.
892This ioctl is only useful after KVM_CREATE_IRQCHIP. Without an in-kernel 893This ioctl is only useful after KVM_CREATE_IRQCHIP. Without an in-kernel
893irqchip, the multiprocessing state must be maintained by userspace. 894irqchip, the multiprocessing state must be maintained by userspace.
894 895
8964.39 KVM_SET_IDENTITY_MAP_ADDR
897
898Capability: KVM_CAP_SET_IDENTITY_MAP_ADDR
899Architectures: x86
900Type: vm ioctl
901Parameters: unsigned long identity (in)
902Returns: 0 on success, -1 on error
903
904This ioctl defines the physical address of a one-page region in the guest
905physical address space. The region must be within the first 4GB of the
906guest physical address space and must not conflict with any memory slot
907or any mmio address. The guest may malfunction if it accesses this memory
908region.
909
910This ioctl is required on Intel-based hosts. This is needed on Intel hardware
911because of a quirk in the virtualization implementation (see the internals
912documentation when it pops into existence).
913
9144.40 KVM_SET_BOOT_CPU_ID
915
916Capability: KVM_CAP_SET_BOOT_CPU_ID
917Architectures: x86, ia64
918Type: vm ioctl
919Parameters: unsigned long vcpu_id
920Returns: 0 on success, -1 on error
921
922Define which vcpu is the Bootstrap Processor (BSP). Values are the same
923as the vcpu id in KVM_CREATE_VCPU. If this ioctl is not called, the default
924is vcpu 0.
925
9264.41 KVM_GET_XSAVE
927
928Capability: KVM_CAP_XSAVE
929Architectures: x86
930Type: vcpu ioctl
931Parameters: struct kvm_xsave (out)
932Returns: 0 on success, -1 on error
933
934struct kvm_xsave {
935 __u32 region[1024];
936};
937
938This ioctl would copy current vcpu's xsave struct to the userspace.
939
9404.42 KVM_SET_XSAVE
941
942Capability: KVM_CAP_XSAVE
943Architectures: x86
944Type: vcpu ioctl
945Parameters: struct kvm_xsave (in)
946Returns: 0 on success, -1 on error
947
948struct kvm_xsave {
949 __u32 region[1024];
950};
951
952This ioctl would copy userspace's xsave struct to the kernel.
953
9544.43 KVM_GET_XCRS
955
956Capability: KVM_CAP_XCRS
957Architectures: x86
958Type: vcpu ioctl
959Parameters: struct kvm_xcrs (out)
960Returns: 0 on success, -1 on error
961
962struct kvm_xcr {
963 __u32 xcr;
964 __u32 reserved;
965 __u64 value;
966};
967
968struct kvm_xcrs {
969 __u32 nr_xcrs;
970 __u32 flags;
971 struct kvm_xcr xcrs[KVM_MAX_XCRS];
972 __u64 padding[16];
973};
974
975This ioctl would copy current vcpu's xcrs to the userspace.
976
9774.44 KVM_SET_XCRS
978
979Capability: KVM_CAP_XCRS
980Architectures: x86
981Type: vcpu ioctl
982Parameters: struct kvm_xcrs (in)
983Returns: 0 on success, -1 on error
984
985struct kvm_xcr {
986 __u32 xcr;
987 __u32 reserved;
988 __u64 value;
989};
990
991struct kvm_xcrs {
992 __u32 nr_xcrs;
993 __u32 flags;
994 struct kvm_xcr xcrs[KVM_MAX_XCRS];
995 __u64 padding[16];
996};
997
998This ioctl would set vcpu's xcr to the value userspace specified.
999
10004.45 KVM_GET_SUPPORTED_CPUID
1001
1002Capability: KVM_CAP_EXT_CPUID
1003Architectures: x86
1004Type: system ioctl
1005Parameters: struct kvm_cpuid2 (in/out)
1006Returns: 0 on success, -1 on error
1007
1008struct kvm_cpuid2 {
1009 __u32 nent;
1010 __u32 padding;
1011 struct kvm_cpuid_entry2 entries[0];
1012};
1013
1014#define KVM_CPUID_FLAG_SIGNIFCANT_INDEX 1
1015#define KVM_CPUID_FLAG_STATEFUL_FUNC 2
1016#define KVM_CPUID_FLAG_STATE_READ_NEXT 4
1017
1018struct kvm_cpuid_entry2 {
1019 __u32 function;
1020 __u32 index;
1021 __u32 flags;
1022 __u32 eax;
1023 __u32 ebx;
1024 __u32 ecx;
1025 __u32 edx;
1026 __u32 padding[3];
1027};
1028
1029This ioctl returns x86 cpuid features which are supported by both the hardware
1030and kvm. Userspace can use the information returned by this ioctl to
1031construct cpuid information (for KVM_SET_CPUID2) that is consistent with
1032hardware, kernel, and userspace capabilities, and with user requirements (for
1033example, the user may wish to constrain cpuid to emulate older hardware,
1034or for feature consistency across a cluster).
1035
1036Userspace invokes KVM_GET_SUPPORTED_CPUID by passing a kvm_cpuid2 structure
1037with the 'nent' field indicating the number of entries in the variable-size
1038array 'entries'. If the number of entries is too low to describe the cpu
1039capabilities, an error (E2BIG) is returned. If the number is too high,
1040the 'nent' field is adjusted and an error (ENOMEM) is returned. If the
1041number is just right, the 'nent' field is adjusted to the number of valid
1042entries in the 'entries' array, which is then filled.
1043
1044The entries returned are the host cpuid as returned by the cpuid instruction,
1045with unknown or unsupported features masked out. Some features (for example,
1046x2apic), may not be present in the host cpu, but are exposed by kvm if it can
1047emulate them efficiently. The fields in each entry are defined as follows:
1048
1049 function: the eax value used to obtain the entry
1050 index: the ecx value used to obtain the entry (for entries that are
1051 affected by ecx)
1052 flags: an OR of zero or more of the following:
1053 KVM_CPUID_FLAG_SIGNIFCANT_INDEX:
1054 if the index field is valid
1055 KVM_CPUID_FLAG_STATEFUL_FUNC:
1056 if cpuid for this function returns different values for successive
1057 invocations; there will be several entries with the same function,
1058 all with this flag set
1059 KVM_CPUID_FLAG_STATE_READ_NEXT:
1060 for KVM_CPUID_FLAG_STATEFUL_FUNC entries, set if this entry is
1061 the first entry to be read by a cpu
1062 eax, ebx, ecx, edx: the values returned by the cpuid instruction for
1063 this function/index combination
1064
10654.46 KVM_PPC_GET_PVINFO
1066
1067Capability: KVM_CAP_PPC_GET_PVINFO
1068Architectures: ppc
1069Type: vm ioctl
1070Parameters: struct kvm_ppc_pvinfo (out)
1071Returns: 0 on success, !0 on error
1072
1073struct kvm_ppc_pvinfo {
1074 __u32 flags;
1075 __u32 hcall[4];
1076 __u8 pad[108];
1077};
1078
1079This ioctl fetches PV specific information that need to be passed to the guest
1080using the device tree or other means from vm context.
1081
1082For now the only implemented piece of information distributed here is an array
1083of 4 instructions that make up a hypercall.
1084
1085If any additional field gets added to this structure later on, a bit for that
1086additional piece of information will be set in the flags bitmap.
1087
8955. The kvm_run structure 10885. The kvm_run structure
896 1089
897Application code obtains a pointer to the kvm_run structure by 1090Application code obtains a pointer to the kvm_run structure by
diff --git a/Documentation/kvm/mmu.txt b/Documentation/kvm/mmu.txt
index aaed6ab9d7ab..142cc5136650 100644
--- a/Documentation/kvm/mmu.txt
+++ b/Documentation/kvm/mmu.txt
@@ -77,10 +77,10 @@ Memory
77 77
78Guest memory (gpa) is part of the user address space of the process that is 78Guest memory (gpa) is part of the user address space of the process that is
79using kvm. Userspace defines the translation between guest addresses and user 79using kvm. Userspace defines the translation between guest addresses and user
80addresses (gpa->hva); note that two gpas may alias to the same gva, but not 80addresses (gpa->hva); note that two gpas may alias to the same hva, but not
81vice versa. 81vice versa.
82 82
83These gvas may be backed using any method available to the host: anonymous 83These hvas may be backed using any method available to the host: anonymous
84memory, file backed memory, and device memory. Memory might be paged by the 84memory, file backed memory, and device memory. Memory might be paged by the
85host at any time. 85host at any time.
86 86
@@ -161,7 +161,7 @@ Shadow pages contain the following information:
161 role.cr4_pae: 161 role.cr4_pae:
162 Contains the value of cr4.pae for which the page is valid (e.g. whether 162 Contains the value of cr4.pae for which the page is valid (e.g. whether
163 32-bit or 64-bit gptes are in use). 163 32-bit or 64-bit gptes are in use).
164 role.cr4_nxe: 164 role.nxe:
165 Contains the value of efer.nxe for which the page is valid. 165 Contains the value of efer.nxe for which the page is valid.
166 role.cr0_wp: 166 role.cr0_wp:
167 Contains the value of cr0.wp for which the page is valid. 167 Contains the value of cr0.wp for which the page is valid.
@@ -180,7 +180,9 @@ Shadow pages contain the following information:
180 guest pages as leaves. 180 guest pages as leaves.
181 gfns: 181 gfns:
182 An array of 512 guest frame numbers, one for each present pte. Used to 182 An array of 512 guest frame numbers, one for each present pte. Used to
183 perform a reverse map from a pte to a gfn. 183 perform a reverse map from a pte to a gfn. When role.direct is set, any
184 element of this array can be calculated from the gfn field when used, in
185 this case, the array of gfns is not allocated. See role.direct and gfn.
184 slot_bitmap: 186 slot_bitmap:
185 A bitmap containing one bit per memory slot. If the page contains a pte 187 A bitmap containing one bit per memory slot. If the page contains a pte
186 mapping a page from memory slot n, then bit n of slot_bitmap will be set 188 mapping a page from memory slot n, then bit n of slot_bitmap will be set
@@ -296,6 +298,48 @@ Host translation updates:
296 - look up affected sptes through reverse map 298 - look up affected sptes through reverse map
297 - drop (or update) translations 299 - drop (or update) translations
298 300
301Emulating cr0.wp
302================
303
304If tdp is not enabled, the host must keep cr0.wp=1 so page write protection
305works for the guest kernel, not guest guest userspace. When the guest
306cr0.wp=1, this does not present a problem. However when the guest cr0.wp=0,
307we cannot map the permissions for gpte.u=1, gpte.w=0 to any spte (the
308semantics require allowing any guest kernel access plus user read access).
309
310We handle this by mapping the permissions to two possible sptes, depending
311on fault type:
312
313- kernel write fault: spte.u=0, spte.w=1 (allows full kernel access,
314 disallows user access)
315- read fault: spte.u=1, spte.w=0 (allows full read access, disallows kernel
316 write access)
317
318(user write faults generate a #PF)
319
320Large pages
321===========
322
323The mmu supports all combinations of large and small guest and host pages.
324Supported page sizes include 4k, 2M, 4M, and 1G. 4M pages are treated as
325two separate 2M pages, on both guest and host, since the mmu always uses PAE
326paging.
327
328To instantiate a large spte, four constraints must be satisfied:
329
330- the spte must point to a large host page
331- the guest pte must be a large pte of at least equivalent size (if tdp is
332 enabled, there is no guest pte and this condition is satisified)
333- if the spte will be writeable, the large page frame may not overlap any
334 write-protected pages
335- the guest page must be wholly contained by a single memory slot
336
337To check the last two conditions, the mmu maintains a ->write_count set of
338arrays for each memory slot and large page size. Every write protected page
339causes its write_count to be incremented, thus preventing instantiation of
340a large spte. The frames at the end of an unaligned memory slot have
341artificically inflated ->write_counts so they can never be instantiated.
342
299Further reading 343Further reading
300=============== 344===============
301 345
diff --git a/Documentation/kvm/msr.txt b/Documentation/kvm/msr.txt
new file mode 100644
index 000000000000..8ddcfe84c09a
--- /dev/null
+++ b/Documentation/kvm/msr.txt
@@ -0,0 +1,153 @@
1KVM-specific MSRs.
2Glauber Costa <glommer@redhat.com>, Red Hat Inc, 2010
3=====================================================
4
5KVM makes use of some custom MSRs to service some requests.
6At present, this facility is only used by kvmclock.
7
8Custom MSRs have a range reserved for them, that goes from
90x4b564d00 to 0x4b564dff. There are MSRs outside this area,
10but they are deprecated and their use is discouraged.
11
12Custom MSR list
13--------
14
15The current supported Custom MSR list is:
16
17MSR_KVM_WALL_CLOCK_NEW: 0x4b564d00
18
19 data: 4-byte alignment physical address of a memory area which must be
20 in guest RAM. This memory is expected to hold a copy of the following
21 structure:
22
23 struct pvclock_wall_clock {
24 u32 version;
25 u32 sec;
26 u32 nsec;
27 } __attribute__((__packed__));
28
29 whose data will be filled in by the hypervisor. The hypervisor is only
30 guaranteed to update this data at the moment of MSR write.
31 Users that want to reliably query this information more than once have
32 to write more than once to this MSR. Fields have the following meanings:
33
34 version: guest has to check version before and after grabbing
35 time information and check that they are both equal and even.
36 An odd version indicates an in-progress update.
37
38 sec: number of seconds for wallclock.
39
40 nsec: number of nanoseconds for wallclock.
41
42 Note that although MSRs are per-CPU entities, the effect of this
43 particular MSR is global.
44
45 Availability of this MSR must be checked via bit 3 in 0x4000001 cpuid
46 leaf prior to usage.
47
48MSR_KVM_SYSTEM_TIME_NEW: 0x4b564d01
49
50 data: 4-byte aligned physical address of a memory area which must be in
51 guest RAM, plus an enable bit in bit 0. This memory is expected to hold
52 a copy of the following structure:
53
54 struct pvclock_vcpu_time_info {
55 u32 version;
56 u32 pad0;
57 u64 tsc_timestamp;
58 u64 system_time;
59 u32 tsc_to_system_mul;
60 s8 tsc_shift;
61 u8 flags;
62 u8 pad[2];
63 } __attribute__((__packed__)); /* 32 bytes */
64
65 whose data will be filled in by the hypervisor periodically. Only one
66 write, or registration, is needed for each VCPU. The interval between
67 updates of this structure is arbitrary and implementation-dependent.
68 The hypervisor may update this structure at any time it sees fit until
69 anything with bit0 == 0 is written to it.
70
71 Fields have the following meanings:
72
73 version: guest has to check version before and after grabbing
74 time information and check that they are both equal and even.
75 An odd version indicates an in-progress update.
76
77 tsc_timestamp: the tsc value at the current VCPU at the time
78 of the update of this structure. Guests can subtract this value
79 from current tsc to derive a notion of elapsed time since the
80 structure update.
81
82 system_time: a host notion of monotonic time, including sleep
83 time at the time this structure was last updated. Unit is
84 nanoseconds.
85
86 tsc_to_system_mul: a function of the tsc frequency. One has
87 to multiply any tsc-related quantity by this value to get
88 a value in nanoseconds, besides dividing by 2^tsc_shift
89
90 tsc_shift: cycle to nanosecond divider, as a power of two, to
91 allow for shift rights. One has to shift right any tsc-related
92 quantity by this value to get a value in nanoseconds, besides
93 multiplying by tsc_to_system_mul.
94
95 With this information, guests can derive per-CPU time by
96 doing:
97
98 time = (current_tsc - tsc_timestamp)
99 time = (time * tsc_to_system_mul) >> tsc_shift
100 time = time + system_time
101
102 flags: bits in this field indicate extended capabilities
103 coordinated between the guest and the hypervisor. Availability
104 of specific flags has to be checked in 0x40000001 cpuid leaf.
105 Current flags are:
106
107 flag bit | cpuid bit | meaning
108 -------------------------------------------------------------
109 | | time measures taken across
110 0 | 24 | multiple cpus are guaranteed to
111 | | be monotonic
112 -------------------------------------------------------------
113
114 Availability of this MSR must be checked via bit 3 in 0x4000001 cpuid
115 leaf prior to usage.
116
117
118MSR_KVM_WALL_CLOCK: 0x11
119
120 data and functioning: same as MSR_KVM_WALL_CLOCK_NEW. Use that instead.
121
122 This MSR falls outside the reserved KVM range and may be removed in the
123 future. Its usage is deprecated.
124
125 Availability of this MSR must be checked via bit 0 in 0x4000001 cpuid
126 leaf prior to usage.
127
128MSR_KVM_SYSTEM_TIME: 0x12
129
130 data and functioning: same as MSR_KVM_SYSTEM_TIME_NEW. Use that instead.
131
132 This MSR falls outside the reserved KVM range and may be removed in the
133 future. Its usage is deprecated.
134
135 Availability of this MSR must be checked via bit 0 in 0x4000001 cpuid
136 leaf prior to usage.
137
138 The suggested algorithm for detecting kvmclock presence is then:
139
140 if (!kvm_para_available()) /* refer to cpuid.txt */
141 return NON_PRESENT;
142
143 flags = cpuid_eax(0x40000001);
144 if (flags & 3) {
145 msr_kvm_system_time = MSR_KVM_SYSTEM_TIME_NEW;
146 msr_kvm_wall_clock = MSR_KVM_WALL_CLOCK_NEW;
147 return PRESENT;
148 } else if (flags & 0) {
149 msr_kvm_system_time = MSR_KVM_SYSTEM_TIME;
150 msr_kvm_wall_clock = MSR_KVM_WALL_CLOCK;
151 return PRESENT;
152 } else
153 return NON_PRESENT;
diff --git a/Documentation/kvm/ppc-pv.txt b/Documentation/kvm/ppc-pv.txt
new file mode 100644
index 000000000000..a7f2244b3be9
--- /dev/null
+++ b/Documentation/kvm/ppc-pv.txt
@@ -0,0 +1,196 @@
1The PPC KVM paravirtual interface
2=================================
3
4The basic execution principle by which KVM on PowerPC works is to run all kernel
5space code in PR=1 which is user space. This way we trap all privileged
6instructions and can emulate them accordingly.
7
8Unfortunately that is also the downfall. There are quite some privileged
9instructions that needlessly return us to the hypervisor even though they
10could be handled differently.
11
12This is what the PPC PV interface helps with. It takes privileged instructions
13and transforms them into unprivileged ones with some help from the hypervisor.
14This cuts down virtualization costs by about 50% on some of my benchmarks.
15
16The code for that interface can be found in arch/powerpc/kernel/kvm*
17
18Querying for existence
19======================
20
21To find out if we're running on KVM or not, we leverage the device tree. When
22Linux is running on KVM, a node /hypervisor exists. That node contains a
23compatible property with the value "linux,kvm".
24
25Once you determined you're running under a PV capable KVM, you can now use
26hypercalls as described below.
27
28KVM hypercalls
29==============
30
31Inside the device tree's /hypervisor node there's a property called
32'hypercall-instructions'. This property contains at most 4 opcodes that make
33up the hypercall. To call a hypercall, just call these instructions.
34
35The parameters are as follows:
36
37 Register IN OUT
38
39 r0 - volatile
40 r3 1st parameter Return code
41 r4 2nd parameter 1st output value
42 r5 3rd parameter 2nd output value
43 r6 4th parameter 3rd output value
44 r7 5th parameter 4th output value
45 r8 6th parameter 5th output value
46 r9 7th parameter 6th output value
47 r10 8th parameter 7th output value
48 r11 hypercall number 8th output value
49 r12 - volatile
50
51Hypercall definitions are shared in generic code, so the same hypercall numbers
52apply for x86 and powerpc alike with the exception that each KVM hypercall
53also needs to be ORed with the KVM vendor code which is (42 << 16).
54
55Return codes can be as follows:
56
57 Code Meaning
58
59 0 Success
60 12 Hypercall not implemented
61 <0 Error
62
63The magic page
64==============
65
66To enable communication between the hypervisor and guest there is a new shared
67page that contains parts of supervisor visible register state. The guest can
68map this shared page using the KVM hypercall KVM_HC_PPC_MAP_MAGIC_PAGE.
69
70With this hypercall issued the guest always gets the magic page mapped at the
71desired location in effective and physical address space. For now, we always
72map the page to -4096. This way we can access it using absolute load and store
73functions. The following instruction reads the first field of the magic page:
74
75 ld rX, -4096(0)
76
77The interface is designed to be extensible should there be need later to add
78additional registers to the magic page. If you add fields to the magic page,
79also define a new hypercall feature to indicate that the host can give you more
80registers. Only if the host supports the additional features, make use of them.
81
82The magic page has the following layout as described in
83arch/powerpc/include/asm/kvm_para.h:
84
85struct kvm_vcpu_arch_shared {
86 __u64 scratch1;
87 __u64 scratch2;
88 __u64 scratch3;
89 __u64 critical; /* Guest may not get interrupts if == r1 */
90 __u64 sprg0;
91 __u64 sprg1;
92 __u64 sprg2;
93 __u64 sprg3;
94 __u64 srr0;
95 __u64 srr1;
96 __u64 dar;
97 __u64 msr;
98 __u32 dsisr;
99 __u32 int_pending; /* Tells the guest if we have an interrupt */
100};
101
102Additions to the page must only occur at the end. Struct fields are always 32
103or 64 bit aligned, depending on them being 32 or 64 bit wide respectively.
104
105Magic page features
106===================
107
108When mapping the magic page using the KVM hypercall KVM_HC_PPC_MAP_MAGIC_PAGE,
109a second return value is passed to the guest. This second return value contains
110a bitmap of available features inside the magic page.
111
112The following enhancements to the magic page are currently available:
113
114 KVM_MAGIC_FEAT_SR Maps SR registers r/w in the magic page
115
116For enhanced features in the magic page, please check for the existence of the
117feature before using them!
118
119MSR bits
120========
121
122The MSR contains bits that require hypervisor intervention and bits that do
123not require direct hypervisor intervention because they only get interpreted
124when entering the guest or don't have any impact on the hypervisor's behavior.
125
126The following bits are safe to be set inside the guest:
127
128 MSR_EE
129 MSR_RI
130 MSR_CR
131 MSR_ME
132
133If any other bit changes in the MSR, please still use mtmsr(d).
134
135Patched instructions
136====================
137
138The "ld" and "std" instructions are transormed to "lwz" and "stw" instructions
139respectively on 32 bit systems with an added offset of 4 to accomodate for big
140endianness.
141
142The following is a list of mapping the Linux kernel performs when running as
143guest. Implementing any of those mappings is optional, as the instruction traps
144also act on the shared page. So calling privileged instructions still works as
145before.
146
147From To
148==== ==
149
150mfmsr rX ld rX, magic_page->msr
151mfsprg rX, 0 ld rX, magic_page->sprg0
152mfsprg rX, 1 ld rX, magic_page->sprg1
153mfsprg rX, 2 ld rX, magic_page->sprg2
154mfsprg rX, 3 ld rX, magic_page->sprg3
155mfsrr0 rX ld rX, magic_page->srr0
156mfsrr1 rX ld rX, magic_page->srr1
157mfdar rX ld rX, magic_page->dar
158mfdsisr rX lwz rX, magic_page->dsisr
159
160mtmsr rX std rX, magic_page->msr
161mtsprg 0, rX std rX, magic_page->sprg0
162mtsprg 1, rX std rX, magic_page->sprg1
163mtsprg 2, rX std rX, magic_page->sprg2
164mtsprg 3, rX std rX, magic_page->sprg3
165mtsrr0 rX std rX, magic_page->srr0
166mtsrr1 rX std rX, magic_page->srr1
167mtdar rX std rX, magic_page->dar
168mtdsisr rX stw rX, magic_page->dsisr
169
170tlbsync nop
171
172mtmsrd rX, 0 b <special mtmsr section>
173mtmsr rX b <special mtmsr section>
174
175mtmsrd rX, 1 b <special mtmsrd section>
176
177[Book3S only]
178mtsrin rX, rY b <special mtsrin section>
179
180[BookE only]
181wrteei [0|1] b <special wrteei section>
182
183
184Some instructions require more logic to determine what's going on than a load
185or store instruction can deliver. To enable patching of those, we keep some
186RAM around where we can live translate instructions to. What happens is the
187following:
188
189 1) copy emulation code to memory
190 2) patch that code to fit the emulated instruction
191 3) patch that code to return to the original pc + 4
192 4) patch the original instruction to branch to the new code
193
194That way we can inject an arbitrary amount of code as replacement for a single
195instruction. This allows us to check for pending interrupts when setting EE=1
196for example.
diff --git a/Documentation/kvm/review-checklist.txt b/Documentation/kvm/review-checklist.txt
new file mode 100644
index 000000000000..730475ae1b8d
--- /dev/null
+++ b/Documentation/kvm/review-checklist.txt
@@ -0,0 +1,38 @@
1Review checklist for kvm patches
2================================
3
41. The patch must follow Documentation/CodingStyle and
5 Documentation/SubmittingPatches.
6
72. Patches should be against kvm.git master branch.
8
93. If the patch introduces or modifies a new userspace API:
10 - the API must be documented in Documentation/kvm/api.txt
11 - the API must be discoverable using KVM_CHECK_EXTENSION
12
134. New state must include support for save/restore.
14
155. New features must default to off (userspace should explicitly request them).
16 Performance improvements can and should default to on.
17
186. New cpu features should be exposed via KVM_GET_SUPPORTED_CPUID2
19
207. Emulator changes should be accompanied by unit tests for qemu-kvm.git
21 kvm/test directory.
22
238. Changes should be vendor neutral when possible. Changes to common code
24 are better than duplicating changes to vendor code.
25
269. Similarly, prefer changes to arch independent code than to arch dependent
27 code.
28
2910. User/kernel interfaces and guest/host interfaces must be 64-bit clean
30 (all variables and sizes naturally aligned on 64-bit; use specific types
31 only - u64 rather than ulong).
32
3311. New guest visible features must either be documented in a hardware manual
34 or be accompanied by documentation.
35
3612. Features must be robust against reset and kexec - for example, shared
37 host/guest memory must be unshared to prevent the host from writing to
38 guest memory that the guest has not reserved for this purpose.
diff --git a/Documentation/kvm/timekeeping.txt b/Documentation/kvm/timekeeping.txt
new file mode 100644
index 000000000000..0c5033a58c9e
--- /dev/null
+++ b/Documentation/kvm/timekeeping.txt
@@ -0,0 +1,612 @@
1
2 Timekeeping Virtualization for X86-Based Architectures
3
4 Zachary Amsden <zamsden@redhat.com>
5 Copyright (c) 2010, Red Hat. All rights reserved.
6
71) Overview
82) Timing Devices
93) TSC Hardware
104) Virtualization Problems
11
12=========================================================================
13
141) Overview
15
16One of the most complicated parts of the X86 platform, and specifically,
17the virtualization of this platform is the plethora of timing devices available
18and the complexity of emulating those devices. In addition, virtualization of
19time introduces a new set of challenges because it introduces a multiplexed
20division of time beyond the control of the guest CPU.
21
22First, we will describe the various timekeeping hardware available, then
23present some of the problems which arise and solutions available, giving
24specific recommendations for certain classes of KVM guests.
25
26The purpose of this document is to collect data and information relevant to
27timekeeping which may be difficult to find elsewhere, specifically,
28information relevant to KVM and hardware-based virtualization.
29
30=========================================================================
31
322) Timing Devices
33
34First we discuss the basic hardware devices available. TSC and the related
35KVM clock are special enough to warrant a full exposition and are described in
36the following section.
37
382.1) i8254 - PIT
39
40One of the first timer devices available is the programmable interrupt timer,
41or PIT. The PIT has a fixed frequency 1.193182 MHz base clock and three
42channels which can be programmed to deliver periodic or one-shot interrupts.
43These three channels can be configured in different modes and have individual
44counters. Channel 1 and 2 were not available for general use in the original
45IBM PC, and historically were connected to control RAM refresh and the PC
46speaker. Now the PIT is typically integrated as part of an emulated chipset
47and a separate physical PIT is not used.
48
49The PIT uses I/O ports 0x40 - 0x43. Access to the 16-bit counters is done
50using single or multiple byte access to the I/O ports. There are 6 modes
51available, but not all modes are available to all timers, as only timer 2
52has a connected gate input, required for modes 1 and 5. The gate line is
53controlled by port 61h, bit 0, as illustrated in the following diagram.
54
55 -------------- ----------------
56| | | |
57| 1.1932 MHz |---------->| CLOCK OUT | ---------> IRQ 0
58| Clock | | | |
59 -------------- | +->| GATE TIMER 0 |
60 | ----------------
61 |
62 | ----------------
63 | | |
64 |------>| CLOCK OUT | ---------> 66.3 KHZ DRAM
65 | | | (aka /dev/null)
66 | +->| GATE TIMER 1 |
67 | ----------------
68 |
69 | ----------------
70 | | |
71 |------>| CLOCK OUT | ---------> Port 61h, bit 5
72 | | |
73Port 61h, bit 0 ---------->| GATE TIMER 2 | \_.---- ____
74 ---------------- _| )--|LPF|---Speaker
75 / *---- \___/
76Port 61h, bit 1 -----------------------------------/
77
78The timer modes are now described.
79
80Mode 0: Single Timeout. This is a one-shot software timeout that counts down
81 when the gate is high (always true for timers 0 and 1). When the count
82 reaches zero, the output goes high.
83
84Mode 1: Triggered One-shot. The output is intially set high. When the gate
85 line is set high, a countdown is initiated (which does not stop if the gate is
86 lowered), during which the output is set low. When the count reaches zero,
87 the output goes high.
88
89Mode 2: Rate Generator. The output is initially set high. When the countdown
90 reaches 1, the output goes low for one count and then returns high. The value
91 is reloaded and the countdown automatically resumes. If the gate line goes
92 low, the count is halted. If the output is low when the gate is lowered, the
93 output automatically goes high (this only affects timer 2).
94
95Mode 3: Square Wave. This generates a high / low square wave. The count
96 determines the length of the pulse, which alternates between high and low
97 when zero is reached. The count only proceeds when gate is high and is
98 automatically reloaded on reaching zero. The count is decremented twice at
99 each clock to generate a full high / low cycle at the full periodic rate.
100 If the count is even, the clock remains high for N/2 counts and low for N/2
101 counts; if the clock is odd, the clock is high for (N+1)/2 counts and low
102 for (N-1)/2 counts. Only even values are latched by the counter, so odd
103 values are not observed when reading. This is the intended mode for timer 2,
104 which generates sine-like tones by low-pass filtering the square wave output.
105
106Mode 4: Software Strobe. After programming this mode and loading the counter,
107 the output remains high until the counter reaches zero. Then the output
108 goes low for 1 clock cycle and returns high. The counter is not reloaded.
109 Counting only occurs when gate is high.
110
111Mode 5: Hardware Strobe. After programming and loading the counter, the
112 output remains high. When the gate is raised, a countdown is initiated
113 (which does not stop if the gate is lowered). When the counter reaches zero,
114 the output goes low for 1 clock cycle and then returns high. The counter is
115 not reloaded.
116
117In addition to normal binary counting, the PIT supports BCD counting. The
118command port, 0x43 is used to set the counter and mode for each of the three
119timers.
120
121PIT commands, issued to port 0x43, using the following bit encoding:
122
123Bit 7-4: Command (See table below)
124Bit 3-1: Mode (000 = Mode 0, 101 = Mode 5, 11X = undefined)
125Bit 0 : Binary (0) / BCD (1)
126
127Command table:
128
1290000 - Latch Timer 0 count for port 0x40
130 sample and hold the count to be read in port 0x40;
131 additional commands ignored until counter is read;
132 mode bits ignored.
133
1340001 - Set Timer 0 LSB mode for port 0x40
135 set timer to read LSB only and force MSB to zero;
136 mode bits set timer mode
137
1380010 - Set Timer 0 MSB mode for port 0x40
139 set timer to read MSB only and force LSB to zero;
140 mode bits set timer mode
141
1420011 - Set Timer 0 16-bit mode for port 0x40
143 set timer to read / write LSB first, then MSB;
144 mode bits set timer mode
145
1460100 - Latch Timer 1 count for port 0x41 - as described above
1470101 - Set Timer 1 LSB mode for port 0x41 - as described above
1480110 - Set Timer 1 MSB mode for port 0x41 - as described above
1490111 - Set Timer 1 16-bit mode for port 0x41 - as described above
150
1511000 - Latch Timer 2 count for port 0x42 - as described above
1521001 - Set Timer 2 LSB mode for port 0x42 - as described above
1531010 - Set Timer 2 MSB mode for port 0x42 - as described above
1541011 - Set Timer 2 16-bit mode for port 0x42 as described above
155
1561101 - General counter latch
157 Latch combination of counters into corresponding ports
158 Bit 3 = Counter 2
159 Bit 2 = Counter 1
160 Bit 1 = Counter 0
161 Bit 0 = Unused
162
1631110 - Latch timer status
164 Latch combination of counter mode into corresponding ports
165 Bit 3 = Counter 2
166 Bit 2 = Counter 1
167 Bit 1 = Counter 0
168
169 The output of ports 0x40-0x42 following this command will be:
170
171 Bit 7 = Output pin
172 Bit 6 = Count loaded (0 if timer has expired)
173 Bit 5-4 = Read / Write mode
174 01 = MSB only
175 10 = LSB only
176 11 = LSB / MSB (16-bit)
177 Bit 3-1 = Mode
178 Bit 0 = Binary (0) / BCD mode (1)
179
1802.2) RTC
181
182The second device which was available in the original PC was the MC146818 real
183time clock. The original device is now obsolete, and usually emulated by the
184system chipset, sometimes by an HPET and some frankenstein IRQ routing.
185
186The RTC is accessed through CMOS variables, which uses an index register to
187control which bytes are read. Since there is only one index register, read
188of the CMOS and read of the RTC require lock protection (in addition, it is
189dangerous to allow userspace utilities such as hwclock to have direct RTC
190access, as they could corrupt kernel reads and writes of CMOS memory).
191
192The RTC generates an interrupt which is usually routed to IRQ 8. The interrupt
193can function as a periodic timer, an additional once a day alarm, and can issue
194interrupts after an update of the CMOS registers by the MC146818 is complete.
195The type of interrupt is signalled in the RTC status registers.
196
197The RTC will update the current time fields by battery power even while the
198system is off. The current time fields should not be read while an update is
199in progress, as indicated in the status register.
200
201The clock uses a 32.768kHz crystal, so bits 6-4 of register A should be
202programmed to a 32kHz divider if the RTC is to count seconds.
203
204This is the RAM map originally used for the RTC/CMOS:
205
206Location Size Description
207------------------------------------------
20800h byte Current second (BCD)
20901h byte Seconds alarm (BCD)
21002h byte Current minute (BCD)
21103h byte Minutes alarm (BCD)
21204h byte Current hour (BCD)
21305h byte Hours alarm (BCD)
21406h byte Current day of week (BCD)
21507h byte Current day of month (BCD)
21608h byte Current month (BCD)
21709h byte Current year (BCD)
2180Ah byte Register A
219 bit 7 = Update in progress
220 bit 6-4 = Divider for clock
221 000 = 4.194 MHz
222 001 = 1.049 MHz
223 010 = 32 kHz
224 10X = test modes
225 110 = reset / disable
226 111 = reset / disable
227 bit 3-0 = Rate selection for periodic interrupt
228 000 = periodic timer disabled
229 001 = 3.90625 uS
230 010 = 7.8125 uS
231 011 = .122070 mS
232 100 = .244141 mS
233 ...
234 1101 = 125 mS
235 1110 = 250 mS
236 1111 = 500 mS
2370Bh byte Register B
238 bit 7 = Run (0) / Halt (1)
239 bit 6 = Periodic interrupt enable
240 bit 5 = Alarm interrupt enable
241 bit 4 = Update-ended interrupt enable
242 bit 3 = Square wave interrupt enable
243 bit 2 = BCD calendar (0) / Binary (1)
244 bit 1 = 12-hour mode (0) / 24-hour mode (1)
245 bit 0 = 0 (DST off) / 1 (DST enabled)
246OCh byte Register C (read only)
247 bit 7 = interrupt request flag (IRQF)
248 bit 6 = periodic interrupt flag (PF)
249 bit 5 = alarm interrupt flag (AF)
250 bit 4 = update interrupt flag (UF)
251 bit 3-0 = reserved
252ODh byte Register D (read only)
253 bit 7 = RTC has power
254 bit 6-0 = reserved
25532h byte Current century BCD (*)
256 (*) location vendor specific and now determined from ACPI global tables
257
2582.3) APIC
259
260On Pentium and later processors, an on-board timer is available to each CPU
261as part of the Advanced Programmable Interrupt Controller. The APIC is
262accessed through memory-mapped registers and provides interrupt service to each
263CPU, used for IPIs and local timer interrupts.
264
265Although in theory the APIC is a safe and stable source for local interrupts,
266in practice, many bugs and glitches have occurred due to the special nature of
267the APIC CPU-local memory-mapped hardware. Beware that CPU errata may affect
268the use of the APIC and that workarounds may be required. In addition, some of
269these workarounds pose unique constraints for virtualization - requiring either
270extra overhead incurred from extra reads of memory-mapped I/O or additional
271functionality that may be more computationally expensive to implement.
272
273Since the APIC is documented quite well in the Intel and AMD manuals, we will
274avoid repetition of the detail here. It should be pointed out that the APIC
275timer is programmed through the LVT (local vector timer) register, is capable
276of one-shot or periodic operation, and is based on the bus clock divided down
277by the programmable divider register.
278
2792.4) HPET
280
281HPET is quite complex, and was originally intended to replace the PIT / RTC
282support of the X86 PC. It remains to be seen whether that will be the case, as
283the de facto standard of PC hardware is to emulate these older devices. Some
284systems designated as legacy free may support only the HPET as a hardware timer
285device.
286
287The HPET spec is rather loose and vague, requiring at least 3 hardware timers,
288but allowing implementation freedom to support many more. It also imposes no
289fixed rate on the timer frequency, but does impose some extremal values on
290frequency, error and slew.
291
292In general, the HPET is recommended as a high precision (compared to PIT /RTC)
293time source which is independent of local variation (as there is only one HPET
294in any given system). The HPET is also memory-mapped, and its presence is
295indicated through ACPI tables by the BIOS.
296
297Detailed specification of the HPET is beyond the current scope of this
298document, as it is also very well documented elsewhere.
299
3002.5) Offboard Timers
301
302Several cards, both proprietary (watchdog boards) and commonplace (e1000) have
303timing chips built into the cards which may have registers which are accessible
304to kernel or user drivers. To the author's knowledge, using these to generate
305a clocksource for a Linux or other kernel has not yet been attempted and is in
306general frowned upon as not playing by the agreed rules of the game. Such a
307timer device would require additional support to be virtualized properly and is
308not considered important at this time as no known operating system does this.
309
310=========================================================================
311
3123) TSC Hardware
313
314The TSC or time stamp counter is relatively simple in theory; it counts
315instruction cycles issued by the processor, which can be used as a measure of
316time. In practice, due to a number of problems, it is the most complicated
317timekeeping device to use.
318
319The TSC is represented internally as a 64-bit MSR which can be read with the
320RDMSR, RDTSC, or RDTSCP (when available) instructions. In the past, hardware
321limitations made it possible to write the TSC, but generally on old hardware it
322was only possible to write the low 32-bits of the 64-bit counter, and the upper
32332-bits of the counter were cleared. Now, however, on Intel processors family
3240Fh, for models 3, 4 and 6, and family 06h, models e and f, this restriction
325has been lifted and all 64-bits are writable. On AMD systems, the ability to
326write the TSC MSR is not an architectural guarantee.
327
328The TSC is accessible from CPL-0 and conditionally, for CPL > 0 software by
329means of the CR4.TSD bit, which when enabled, disables CPL > 0 TSC access.
330
331Some vendors have implemented an additional instruction, RDTSCP, which returns
332atomically not just the TSC, but an indicator which corresponds to the
333processor number. This can be used to index into an array of TSC variables to
334determine offset information in SMP systems where TSCs are not synchronized.
335The presence of this instruction must be determined by consulting CPUID feature
336bits.
337
338Both VMX and SVM provide extension fields in the virtualization hardware which
339allows the guest visible TSC to be offset by a constant. Newer implementations
340promise to allow the TSC to additionally be scaled, but this hardware is not
341yet widely available.
342
3433.1) TSC synchronization
344
345The TSC is a CPU-local clock in most implementations. This means, on SMP
346platforms, the TSCs of different CPUs may start at different times depending
347on when the CPUs are powered on. Generally, CPUs on the same die will share
348the same clock, however, this is not always the case.
349
350The BIOS may attempt to resynchronize the TSCs during the poweron process and
351the operating system or other system software may attempt to do this as well.
352Several hardware limitations make the problem worse - if it is not possible to
353write the full 64-bits of the TSC, it may be impossible to match the TSC in
354newly arriving CPUs to that of the rest of the system, resulting in
355unsynchronized TSCs. This may be done by BIOS or system software, but in
356practice, getting a perfectly synchronized TSC will not be possible unless all
357values are read from the same clock, which generally only is possible on single
358socket systems or those with special hardware support.
359
3603.2) TSC and CPU hotplug
361
362As touched on already, CPUs which arrive later than the boot time of the system
363may not have a TSC value that is synchronized with the rest of the system.
364Either system software, BIOS, or SMM code may actually try to establish the TSC
365to a value matching the rest of the system, but a perfect match is usually not
366a guarantee. This can have the effect of bringing a system from a state where
367TSC is synchronized back to a state where TSC synchronization flaws, however
368small, may be exposed to the OS and any virtualization environment.
369
3703.3) TSC and multi-socket / NUMA
371
372Multi-socket systems, especially large multi-socket systems are likely to have
373individual clocksources rather than a single, universally distributed clock.
374Since these clocks are driven by different crystals, they will not have
375perfectly matched frequency, and temperature and electrical variations will
376cause the CPU clocks, and thus the TSCs to drift over time. Depending on the
377exact clock and bus design, the drift may or may not be fixed in absolute
378error, and may accumulate over time.
379
380In addition, very large systems may deliberately slew the clocks of individual
381cores. This technique, known as spread-spectrum clocking, reduces EMI at the
382clock frequency and harmonics of it, which may be required to pass FCC
383standards for telecommunications and computer equipment.
384
385It is recommended not to trust the TSCs to remain synchronized on NUMA or
386multiple socket systems for these reasons.
387
3883.4) TSC and C-states
389
390C-states, or idling states of the processor, especially C1E and deeper sleep
391states may be problematic for TSC as well. The TSC may stop advancing in such
392a state, resulting in a TSC which is behind that of other CPUs when execution
393is resumed. Such CPUs must be detected and flagged by the operating system
394based on CPU and chipset identifications.
395
396The TSC in such a case may be corrected by catching it up to a known external
397clocksource.
398
3993.5) TSC frequency change / P-states
400
401To make things slightly more interesting, some CPUs may change frequency. They
402may or may not run the TSC at the same rate, and because the frequency change
403may be staggered or slewed, at some points in time, the TSC rate may not be
404known other than falling within a range of values. In this case, the TSC will
405not be a stable time source, and must be calibrated against a known, stable,
406external clock to be a usable source of time.
407
408Whether the TSC runs at a constant rate or scales with the P-state is model
409dependent and must be determined by inspecting CPUID, chipset or vendor
410specific MSR fields.
411
412In addition, some vendors have known bugs where the P-state is actually
413compensated for properly during normal operation, but when the processor is
414inactive, the P-state may be raised temporarily to service cache misses from
415other processors. In such cases, the TSC on halted CPUs could advance faster
416than that of non-halted processors. AMD Turion processors are known to have
417this problem.
418
4193.6) TSC and STPCLK / T-states
420
421External signals given to the processor may also have the effect of stopping
422the TSC. This is typically done for thermal emergency power control to prevent
423an overheating condition, and typically, there is no way to detect that this
424condition has happened.
425
4263.7) TSC virtualization - VMX
427
428VMX provides conditional trapping of RDTSC, RDMSR, WRMSR and RDTSCP
429instructions, which is enough for full virtualization of TSC in any manner. In
430addition, VMX allows passing through the host TSC plus an additional TSC_OFFSET
431field specified in the VMCS. Special instructions must be used to read and
432write the VMCS field.
433
4343.8) TSC virtualization - SVM
435
436SVM provides conditional trapping of RDTSC, RDMSR, WRMSR and RDTSCP
437instructions, which is enough for full virtualization of TSC in any manner. In
438addition, SVM allows passing through the host TSC plus an additional offset
439field specified in the SVM control block.
440
4413.9) TSC feature bits in Linux
442
443In summary, there is no way to guarantee the TSC remains in perfect
444synchronization unless it is explicitly guaranteed by the architecture. Even
445if so, the TSCs in multi-sockets or NUMA systems may still run independently
446despite being locally consistent.
447
448The following feature bits are used by Linux to signal various TSC attributes,
449but they can only be taken to be meaningful for UP or single node systems.
450
451X86_FEATURE_TSC : The TSC is available in hardware
452X86_FEATURE_RDTSCP : The RDTSCP instruction is available
453X86_FEATURE_CONSTANT_TSC : The TSC rate is unchanged with P-states
454X86_FEATURE_NONSTOP_TSC : The TSC does not stop in C-states
455X86_FEATURE_TSC_RELIABLE : TSC sync checks are skipped (VMware)
456
4574) Virtualization Problems
458
459Timekeeping is especially problematic for virtualization because a number of
460challenges arise. The most obvious problem is that time is now shared between
461the host and, potentially, a number of virtual machines. Thus the virtual
462operating system does not run with 100% usage of the CPU, despite the fact that
463it may very well make that assumption. It may expect it to remain true to very
464exacting bounds when interrupt sources are disabled, but in reality only its
465virtual interrupt sources are disabled, and the machine may still be preempted
466at any time. This causes problems as the passage of real time, the injection
467of machine interrupts and the associated clock sources are no longer completely
468synchronized with real time.
469
470This same problem can occur on native harware to a degree, as SMM mode may
471steal cycles from the naturally on X86 systems when SMM mode is used by the
472BIOS, but not in such an extreme fashion. However, the fact that SMM mode may
473cause similar problems to virtualization makes it a good justification for
474solving many of these problems on bare metal.
475
4764.1) Interrupt clocking
477
478One of the most immediate problems that occurs with legacy operating systems
479is that the system timekeeping routines are often designed to keep track of
480time by counting periodic interrupts. These interrupts may come from the PIT
481or the RTC, but the problem is the same: the host virtualization engine may not
482be able to deliver the proper number of interrupts per second, and so guest
483time may fall behind. This is especially problematic if a high interrupt rate
484is selected, such as 1000 HZ, which is unfortunately the default for many Linux
485guests.
486
487There are three approaches to solving this problem; first, it may be possible
488to simply ignore it. Guests which have a separate time source for tracking
489'wall clock' or 'real time' may not need any adjustment of their interrupts to
490maintain proper time. If this is not sufficient, it may be necessary to inject
491additional interrupts into the guest in order to increase the effective
492interrupt rate. This approach leads to complications in extreme conditions,
493where host load or guest lag is too much to compensate for, and thus another
494solution to the problem has risen: the guest may need to become aware of lost
495ticks and compensate for them internally. Although promising in theory, the
496implementation of this policy in Linux has been extremely error prone, and a
497number of buggy variants of lost tick compensation are distributed across
498commonly used Linux systems.
499
500Windows uses periodic RTC clocking as a means of keeping time internally, and
501thus requires interrupt slewing to keep proper time. It does use a low enough
502rate (ed: is it 18.2 Hz?) however that it has not yet been a problem in
503practice.
504
5054.2) TSC sampling and serialization
506
507As the highest precision time source available, the cycle counter of the CPU
508has aroused much interest from developers. As explained above, this timer has
509many problems unique to its nature as a local, potentially unstable and
510potentially unsynchronized source. One issue which is not unique to the TSC,
511but is highlighted because of its very precise nature is sampling delay. By
512definition, the counter, once read is already old. However, it is also
513possible for the counter to be read ahead of the actual use of the result.
514This is a consequence of the superscalar execution of the instruction stream,
515which may execute instructions out of order. Such execution is called
516non-serialized. Forcing serialized execution is necessary for precise
517measurement with the TSC, and requires a serializing instruction, such as CPUID
518or an MSR read.
519
520Since CPUID may actually be virtualized by a trap and emulate mechanism, this
521serialization can pose a performance issue for hardware virtualization. An
522accurate time stamp counter reading may therefore not always be available, and
523it may be necessary for an implementation to guard against "backwards" reads of
524the TSC as seen from other CPUs, even in an otherwise perfectly synchronized
525system.
526
5274.3) Timespec aliasing
528
529Additionally, this lack of serialization from the TSC poses another challenge
530when using results of the TSC when measured against another time source. As
531the TSC is much higher precision, many possible values of the TSC may be read
532while another clock is still expressing the same value.
533
534That is, you may read (T,T+10) while external clock C maintains the same value.
535Due to non-serialized reads, you may actually end up with a range which
536fluctuates - from (T-1.. T+10). Thus, any time calculated from a TSC, but
537calibrated against an external value may have a range of valid values.
538Re-calibrating this computation may actually cause time, as computed after the
539calibration, to go backwards, compared with time computed before the
540calibration.
541
542This problem is particularly pronounced with an internal time source in Linux,
543the kernel time, which is expressed in the theoretically high resolution
544timespec - but which advances in much larger granularity intervals, sometimes
545at the rate of jiffies, and possibly in catchup modes, at a much larger step.
546
547This aliasing requires care in the computation and recalibration of kvmclock
548and any other values derived from TSC computation (such as TSC virtualization
549itself).
550
5514.4) Migration
552
553Migration of a virtual machine raises problems for timekeeping in two ways.
554First, the migration itself may take time, during which interrupts cannot be
555delivered, and after which, the guest time may need to be caught up. NTP may
556be able to help to some degree here, as the clock correction required is
557typically small enough to fall in the NTP-correctable window.
558
559An additional concern is that timers based off the TSC (or HPET, if the raw bus
560clock is exposed) may now be running at different rates, requiring compensation
561in some way in the hypervisor by virtualizing these timers. In addition,
562migrating to a faster machine may preclude the use of a passthrough TSC, as a
563faster clock cannot be made visible to a guest without the potential of time
564advancing faster than usual. A slower clock is less of a problem, as it can
565always be caught up to the original rate. KVM clock avoids these problems by
566simply storing multipliers and offsets against the TSC for the guest to convert
567back into nanosecond resolution values.
568
5694.5) Scheduling
570
571Since scheduling may be based on precise timing and firing of interrupts, the
572scheduling algorithms of an operating system may be adversely affected by
573virtualization. In theory, the effect is random and should be universally
574distributed, but in contrived as well as real scenarios (guest device access,
575causes of virtualization exits, possible context switch), this may not always
576be the case. The effect of this has not been well studied.
577
578In an attempt to work around this, several implementations have provided a
579paravirtualized scheduler clock, which reveals the true amount of CPU time for
580which a virtual machine has been running.
581
5824.6) Watchdogs
583
584Watchdog timers, such as the lock detector in Linux may fire accidentally when
585running under hardware virtualization due to timer interrupts being delayed or
586misinterpretation of the passage of real time. Usually, these warnings are
587spurious and can be ignored, but in some circumstances it may be necessary to
588disable such detection.
589
5904.7) Delays and precision timing
591
592Precise timing and delays may not be possible in a virtualized system. This
593can happen if the system is controlling physical hardware, or issues delays to
594compensate for slower I/O to and from devices. The first issue is not solvable
595in general for a virtualized system; hardware control software can't be
596adequately virtualized without a full real-time operating system, which would
597require an RT aware virtualization platform.
598
599The second issue may cause performance problems, but this is unlikely to be a
600significant issue. In many cases these delays may be eliminated through
601configuration or paravirtualization.
602
6034.8) Covert channels and leaks
604
605In addition to the above problems, time information will inevitably leak to the
606guest about the host in anything but a perfect implementation of virtualized
607time. This may allow the guest to infer the presence of a hypervisor (as in a
608red-pill type detection), and it may allow information to leak between guests
609by using CPU utilization itself as a signalling channel. Preventing such
610problems would require completely isolated virtual time which may not track
611real time any longer. This may be useful in certain security or QA contexts,
612but in general isn't recommended for real-world deployment scenarios.
diff --git a/Documentation/laptops/acer-wmi.txt b/Documentation/laptops/acer-wmi.txt
index 0768fcc3ba3e..4beafa663dd6 100644
--- a/Documentation/laptops/acer-wmi.txt
+++ b/Documentation/laptops/acer-wmi.txt
@@ -173,7 +173,7 @@ Credits
173******* 173*******
174 174
175Olaf Tauber, who did the real hard work when he developed acerhk 175Olaf Tauber, who did the real hard work when he developed acerhk
176http://www.informatik.hu-berlin.de/~tauber/acerhk 176http://www.cakey.de/acerhk/
177All the authors of laptop ACPI modules in the kernel, whose work 177All the authors of laptop ACPI modules in the kernel, whose work
178was an inspiration in the early days of acer_acpi 178was an inspiration in the early days of acer_acpi
179Mathieu Segaud, who solved the problem with having to modprobe the driver 179Mathieu Segaud, who solved the problem with having to modprobe the driver
diff --git a/Documentation/laptops/thinkpad-acpi.txt b/Documentation/laptops/thinkpad-acpi.txt
index fc15538d8b46..1565eefd6fd5 100644
--- a/Documentation/laptops/thinkpad-acpi.txt
+++ b/Documentation/laptops/thinkpad-acpi.txt
@@ -960,70 +960,21 @@ Sysfs notes:
960 subsystem, and follow all of the hwmon guidelines at 960 subsystem, and follow all of the hwmon guidelines at
961 Documentation/hwmon. 961 Documentation/hwmon.
962 962
963EXPERIMENTAL: Embedded controller register dump
964-----------------------------------------------
963 965
964EXPERIMENTAL: Embedded controller register dump -- /proc/acpi/ibm/ecdump 966This feature is not included in the thinkpad driver anymore.
965------------------------------------------------------------------------ 967Instead the EC can be accessed through /sys/kernel/debug/ec with
966 968a userspace tool which can be found here:
967This feature is marked EXPERIMENTAL because the implementation 969ftp://ftp.suse.com/pub/people/trenn/sources/ec
968directly accesses hardware registers and may not work as expected. USE
969WITH CAUTION! To use this feature, you need to supply the
970experimental=1 parameter when loading the module.
971
972This feature dumps the values of 256 embedded controller
973registers. Values which have changed since the last time the registers
974were dumped are marked with a star:
975
976[root@x40 ibm-acpi]# cat /proc/acpi/ibm/ecdump
977EC +00 +01 +02 +03 +04 +05 +06 +07 +08 +09 +0a +0b +0c +0d +0e +0f
978EC 0x00: a7 47 87 01 fe 96 00 08 01 00 cb 00 00 00 40 00
979EC 0x10: 00 00 ff ff f4 3c 87 09 01 ff 42 01 ff ff 0d 00
980EC 0x20: 00 00 00 00 00 00 00 00 00 00 00 03 43 00 00 80
981EC 0x30: 01 07 1a 00 30 04 00 00 *85 00 00 10 00 50 00 00
982EC 0x40: 00 00 00 00 00 00 14 01 00 04 00 00 00 00 00 00
983EC 0x50: 00 c0 02 0d 00 01 01 02 02 03 03 03 03 *bc *02 *bc
984EC 0x60: *02 *bc *02 00 00 00 00 00 00 00 00 00 00 00 00 00
985EC 0x70: 00 00 00 00 00 12 30 40 *24 *26 *2c *27 *20 80 *1f 80
986EC 0x80: 00 00 00 06 *37 *0e 03 00 00 00 0e 07 00 00 00 00
987EC 0x90: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
988EC 0xa0: *ff 09 ff 09 ff ff *64 00 *00 *00 *a2 41 *ff *ff *e0 00
989EC 0xb0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
990EC 0xc0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
991EC 0xd0: 03 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
992EC 0xe0: 00 00 00 00 00 00 00 00 11 20 49 04 24 06 55 03
993EC 0xf0: 31 55 48 54 35 38 57 57 08 2f 45 73 07 65 6c 1a
994
995This feature can be used to determine the register holding the fan
996speed on some models. To do that, do the following:
997 970
971Use it to determine the register holding the fan
972speed on some models. To do that, do the following:
998 - make sure the battery is fully charged 973 - make sure the battery is fully charged
999 - make sure the fan is running 974 - make sure the fan is running
1000 - run 'cat /proc/acpi/ibm/ecdump' several times, once per second or so 975 - use above mentioned tool to read out the EC
1001 976
1002The first step makes sure various charging-related values don't 977Often fan and temperature values vary between
1003vary. The second ensures that the fan-related values do vary, since
1004the fan speed fluctuates a bit. The third will (hopefully) mark the
1005fan register with a star:
1006
1007[root@x40 ibm-acpi]# cat /proc/acpi/ibm/ecdump
1008EC +00 +01 +02 +03 +04 +05 +06 +07 +08 +09 +0a +0b +0c +0d +0e +0f
1009EC 0x00: a7 47 87 01 fe 96 00 08 01 00 cb 00 00 00 40 00
1010EC 0x10: 00 00 ff ff f4 3c 87 09 01 ff 42 01 ff ff 0d 00
1011EC 0x20: 00 00 00 00 00 00 00 00 00 00 00 03 43 00 00 80
1012EC 0x30: 01 07 1a 00 30 04 00 00 85 00 00 10 00 50 00 00
1013EC 0x40: 00 00 00 00 00 00 14 01 00 04 00 00 00 00 00 00
1014EC 0x50: 00 c0 02 0d 00 01 01 02 02 03 03 03 03 bc 02 bc
1015EC 0x60: 02 bc 02 00 00 00 00 00 00 00 00 00 00 00 00 00
1016EC 0x70: 00 00 00 00 00 12 30 40 24 27 2c 27 21 80 1f 80
1017EC 0x80: 00 00 00 06 *be 0d 03 00 00 00 0e 07 00 00 00 00
1018EC 0x90: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
1019EC 0xa0: ff 09 ff 09 ff ff 64 00 00 00 a2 41 ff ff e0 00
1020EC 0xb0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
1021EC 0xc0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
1022EC 0xd0: 03 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
1023EC 0xe0: 00 00 00 00 00 00 00 00 11 20 49 04 24 06 55 03
1024EC 0xf0: 31 55 48 54 35 38 57 57 08 2f 45 73 07 65 6c 1a
1025
1026Another set of values that varies often is the temperature
1027readings. Since temperatures don't change vary fast, you can take 978readings. Since temperatures don't change vary fast, you can take
1028several quick dumps to eliminate them. 979several quick dumps to eliminate them.
1029 980
@@ -1073,6 +1024,10 @@ ThinkPad-specific interface. The driver will disable its native
1073backlight brightness control interface if it detects that the standard 1024backlight brightness control interface if it detects that the standard
1074ACPI interface is available in the ThinkPad. 1025ACPI interface is available in the ThinkPad.
1075 1026
1027If you want to use the thinkpad-acpi backlight brightness control
1028instead of the generic ACPI video backlight brightness control for some
1029reason, you should use the acpi_backlight=vendor kernel parameter.
1030
1076The brightness_enable module parameter can be used to control whether 1031The brightness_enable module parameter can be used to control whether
1077the LCD brightness control feature will be enabled when available. 1032the LCD brightness control feature will be enabled when available.
1078brightness_enable=0 forces it to be disabled. brightness_enable=1 1033brightness_enable=0 forces it to be disabled. brightness_enable=1
diff --git a/Documentation/ldm.txt b/Documentation/ldm.txt
index 718085bc9f1a..4f80edd14d0a 100644
--- a/Documentation/ldm.txt
+++ b/Documentation/ldm.txt
@@ -98,7 +98,7 @@ More Documentation
98There is an Overview of the LDM together with complete Technical Documentation. 98There is an Overview of the LDM together with complete Technical Documentation.
99It is available for download. 99It is available for download.
100 100
101 http://www.linux-ntfs.org/content/view/19/37/ 101 http://www.linux-ntfs.org/
102 102
103If you have any LDM questions that aren't answered in the documentation, email 103If you have any LDM questions that aren't answered in the documentation, email
104me. 104me.
diff --git a/Documentation/lguest/Makefile b/Documentation/lguest/Makefile
index 28c8cdfcafd8..bebac6b4f332 100644
--- a/Documentation/lguest/Makefile
+++ b/Documentation/lguest/Makefile
@@ -1,5 +1,6 @@
1# This creates the demonstration utility "lguest" which runs a Linux guest. 1# This creates the demonstration utility "lguest" which runs a Linux guest.
2CFLAGS:=-m32 -Wall -Wmissing-declarations -Wmissing-prototypes -O3 -I../../include -I../../arch/x86/include -U_FORTIFY_SOURCE 2# Missing headers? Add "-I../../include -I../../arch/x86/include"
3CFLAGS:=-m32 -Wall -Wmissing-declarations -Wmissing-prototypes -O3 -U_FORTIFY_SOURCE
3 4
4all: lguest 5all: lguest
5 6
diff --git a/Documentation/lguest/lguest.c b/Documentation/lguest/lguest.c
index e9ce3c554514..dc73bc54cc4e 100644
--- a/Documentation/lguest/lguest.c
+++ b/Documentation/lguest/lguest.c
@@ -39,14 +39,14 @@
39#include <limits.h> 39#include <limits.h>
40#include <stddef.h> 40#include <stddef.h>
41#include <signal.h> 41#include <signal.h>
42#include "linux/lguest_launcher.h" 42#include <linux/virtio_config.h>
43#include "linux/virtio_config.h" 43#include <linux/virtio_net.h>
44#include "linux/virtio_net.h" 44#include <linux/virtio_blk.h>
45#include "linux/virtio_blk.h" 45#include <linux/virtio_console.h>
46#include "linux/virtio_console.h" 46#include <linux/virtio_rng.h>
47#include "linux/virtio_rng.h" 47#include <linux/virtio_ring.h>
48#include "linux/virtio_ring.h" 48#include <asm/bootparam.h>
49#include "asm/bootparam.h" 49#include "../../include/linux/lguest_launcher.h"
50/*L:110 50/*L:110
51 * We can ignore the 42 include files we need for this program, but I do want 51 * We can ignore the 42 include files we need for this program, but I do want
52 * to draw attention to the use of kernel-style types. 52 * to draw attention to the use of kernel-style types.
@@ -1447,14 +1447,15 @@ static void add_to_bridge(int fd, const char *if_name, const char *br_name)
1447static void configure_device(int fd, const char *tapif, u32 ipaddr) 1447static void configure_device(int fd, const char *tapif, u32 ipaddr)
1448{ 1448{
1449 struct ifreq ifr; 1449 struct ifreq ifr;
1450 struct sockaddr_in *sin = (struct sockaddr_in *)&ifr.ifr_addr; 1450 struct sockaddr_in sin;
1451 1451
1452 memset(&ifr, 0, sizeof(ifr)); 1452 memset(&ifr, 0, sizeof(ifr));
1453 strcpy(ifr.ifr_name, tapif); 1453 strcpy(ifr.ifr_name, tapif);
1454 1454
1455 /* Don't read these incantations. Just cut & paste them like I did! */ 1455 /* Don't read these incantations. Just cut & paste them like I did! */
1456 sin->sin_family = AF_INET; 1456 sin.sin_family = AF_INET;
1457 sin->sin_addr.s_addr = htonl(ipaddr); 1457 sin.sin_addr.s_addr = htonl(ipaddr);
1458 memcpy(&ifr.ifr_addr, &sin, sizeof(sin));
1458 if (ioctl(fd, SIOCSIFADDR, &ifr) != 0) 1459 if (ioctl(fd, SIOCSIFADDR, &ifr) != 0)
1459 err(1, "Setting %s interface address", tapif); 1460 err(1, "Setting %s interface address", tapif);
1460 ifr.ifr_flags = IFF_UP; 1461 ifr.ifr_flags = IFF_UP;
@@ -1639,15 +1640,6 @@ static void blk_request(struct virtqueue *vq)
1639 off = out->sector * 512; 1640 off = out->sector * 512;
1640 1641
1641 /* 1642 /*
1642 * The block device implements "barriers", where the Guest indicates
1643 * that it wants all previous writes to occur before this write. We
1644 * don't have a way of asking our kernel to do a barrier, so we just
1645 * synchronize all the data in the file. Pretty poor, no?
1646 */
1647 if (out->type & VIRTIO_BLK_T_BARRIER)
1648 fdatasync(vblk->fd);
1649
1650 /*
1651 * In general the virtio block driver is allowed to try SCSI commands. 1643 * In general the virtio block driver is allowed to try SCSI commands.
1652 * It'd be nice if we supported eject, for example, but we don't. 1644 * It'd be nice if we supported eject, for example, but we don't.
1653 */ 1645 */
@@ -1679,6 +1671,13 @@ static void blk_request(struct virtqueue *vq)
1679 /* Die, bad Guest, die. */ 1671 /* Die, bad Guest, die. */
1680 errx(1, "Write past end %llu+%u", off, ret); 1672 errx(1, "Write past end %llu+%u", off, ret);
1681 } 1673 }
1674
1675 wlen = sizeof(*in);
1676 *in = (ret >= 0 ? VIRTIO_BLK_S_OK : VIRTIO_BLK_S_IOERR);
1677 } else if (out->type & VIRTIO_BLK_T_FLUSH) {
1678 /* Flush */
1679 ret = fdatasync(vblk->fd);
1680 verbose("FLUSH fdatasync: %i\n", ret);
1682 wlen = sizeof(*in); 1681 wlen = sizeof(*in);
1683 *in = (ret >= 0 ? VIRTIO_BLK_S_OK : VIRTIO_BLK_S_IOERR); 1682 *in = (ret >= 0 ? VIRTIO_BLK_S_OK : VIRTIO_BLK_S_IOERR);
1684 } else { 1683 } else {
@@ -1702,15 +1701,6 @@ static void blk_request(struct virtqueue *vq)
1702 } 1701 }
1703 } 1702 }
1704 1703
1705 /*
1706 * OK, so we noted that it was pretty poor to use an fdatasync as a
1707 * barrier. But Christoph Hellwig points out that we need a sync
1708 * *afterwards* as well: "Barriers specify no reordering to the front
1709 * or the back." And Jens Axboe confirmed it, so here we are:
1710 */
1711 if (out->type & VIRTIO_BLK_T_BARRIER)
1712 fdatasync(vblk->fd);
1713
1714 /* Finished that request. */ 1704 /* Finished that request. */
1715 add_used(vq, head, wlen); 1705 add_used(vq, head, wlen);
1716} 1706}
@@ -1735,8 +1725,8 @@ static void setup_block_file(const char *filename)
1735 vblk->fd = open_or_die(filename, O_RDWR|O_LARGEFILE); 1725 vblk->fd = open_or_die(filename, O_RDWR|O_LARGEFILE);
1736 vblk->len = lseek64(vblk->fd, 0, SEEK_END); 1726 vblk->len = lseek64(vblk->fd, 0, SEEK_END);
1737 1727
1738 /* We support barriers. */ 1728 /* We support FLUSH. */
1739 add_feature(dev, VIRTIO_BLK_F_BARRIER); 1729 add_feature(dev, VIRTIO_BLK_F_FLUSH);
1740 1730
1741 /* Tell Guest how many sectors this device has. */ 1731 /* Tell Guest how many sectors this device has. */
1742 conf.capacity = cpu_to_le64(vblk->len / 512); 1732 conf.capacity = cpu_to_le64(vblk->len / 512);
diff --git a/Documentation/md.txt b/Documentation/md.txt
index e4e893ef3e01..a81c7b4790f2 100644
--- a/Documentation/md.txt
+++ b/Documentation/md.txt
@@ -1,5 +1,5 @@
1Tools that manage md devices can be found at 1Tools that manage md devices can be found at
2 http://www.<country>.kernel.org/pub/linux/utils/raid/.... 2 http://www.kernel.org/pub/linux/utils/raid/
3 3
4 4
5Boot time assembly of RAID arrays 5Boot time assembly of RAID arrays
diff --git a/Documentation/misc-devices/apds990x.txt b/Documentation/misc-devices/apds990x.txt
new file mode 100644
index 000000000000..d5408cade32f
--- /dev/null
+++ b/Documentation/misc-devices/apds990x.txt
@@ -0,0 +1,111 @@
1Kernel driver apds990x
2======================
3
4Supported chips:
5Avago APDS990X
6
7Data sheet:
8Not freely available
9
10Author:
11Samu Onkalo <samu.p.onkalo@nokia.com>
12
13Description
14-----------
15
16APDS990x is a combined ambient light and proximity sensor. ALS and proximity
17functionality are highly connected. ALS measurement path must be running
18while the proximity functionality is enabled.
19
20ALS produces raw measurement values for two channels: Clear channel
21(infrared + visible light) and IR only. However, threshold comparisons happen
22using clear channel only. Lux value and the threshold level on the HW
23might vary quite much depending the spectrum of the light source.
24
25Driver makes necessary conversions to both directions so that user handles
26only lux values. Lux value is calculated using information from the both
27channels. HW threshold level is calculated from the given lux value to match
28with current type of the lightning. Sometimes inaccuracy of the estimations
29lead to false interrupt, but that doesn't harm.
30
31ALS contains 4 different gain steps. Driver automatically
32selects suitable gain step. After each measurement, reliability of the results
33is estimated and new measurement is trigged if necessary.
34
35Platform data can provide tuned values to the conversion formulas if
36values are known. Otherwise plain sensor default values are used.
37
38Proximity side is little bit simpler. There is no need for complex conversions.
39It produces directly usable values.
40
41Driver controls chip operational state using pm_runtime framework.
42Voltage regulators are controlled based on chip operational state.
43
44SYSFS
45-----
46
47
48chip_id
49 RO - shows detected chip type and version
50
51power_state
52 RW - enable / disable chip. Uses counting logic
53 1 enables the chip
54 0 disables the chip
55lux0_input
56 RO - measured lux value
57 sysfs_notify called when threshold interrupt occurs
58
59lux0_sensor_range
60 RO - lux0_input max value. Actually never reaches since sensor tends
61 to saturate much before that. Real max value varies depending
62 on the light spectrum etc.
63
64lux0_rate
65 RW - measurement rate in Hz
66
67lux0_rate_avail
68 RO - supported measurement rates
69
70lux0_calibscale
71 RW - calibration value. Set to neutral value by default.
72 Output results are multiplied with calibscale / calibscale_default
73 value.
74
75lux0_calibscale_default
76 RO - neutral calibration value
77
78lux0_thresh_above_value
79 RW - HI level threshold value. All results above the value
80 trigs an interrupt. 65535 (i.e. sensor_range) disables the above
81 interrupt.
82
83lux0_thresh_below_value
84 RW - LO level threshold value. All results below the value
85 trigs an interrupt. 0 disables the below interrupt.
86
87prox0_raw
88 RO - measured proximity value
89 sysfs_notify called when threshold interrupt occurs
90
91prox0_sensor_range
92 RO - prox0_raw max value (1023)
93
94prox0_raw_en
95 RW - enable / disable proximity - uses counting logic
96 1 enables the proximity
97 0 disables the proximity
98
99prox0_reporting_mode
100 RW - trigger / periodic. In "trigger" mode the driver tells two possible
101 values: 0 or prox0_sensor_range value. 0 means no proximity,
102 1023 means proximity. This causes minimal number of interrupts.
103 In "periodic" mode the driver reports all values above
104 prox0_thresh_above. This causes more interrupts, but it can give
105 _rough_ estimate about the distance.
106
107prox0_reporting_mode_avail
108 RO - accepted values to prox0_reporting_mode (trigger, periodic)
109
110prox0_thresh_above_value
111 RW - threshold level which trigs proximity events.
diff --git a/Documentation/misc-devices/bh1770glc.txt b/Documentation/misc-devices/bh1770glc.txt
new file mode 100644
index 000000000000..7d64c014dc70
--- /dev/null
+++ b/Documentation/misc-devices/bh1770glc.txt
@@ -0,0 +1,116 @@
1Kernel driver bh1770glc
2=======================
3
4Supported chips:
5ROHM BH1770GLC
6OSRAM SFH7770
7
8Data sheet:
9Not freely available
10
11Author:
12Samu Onkalo <samu.p.onkalo@nokia.com>
13
14Description
15-----------
16BH1770GLC and SFH7770 are combined ambient light and proximity sensors.
17ALS and proximity parts operates on their own, but they shares common I2C
18interface and interrupt logic. In principle they can run on their own,
19but ALS side results are used to estimate reliability of the proximity sensor.
20
21ALS produces 16 bit lux values. The chip contains interrupt logic to produce
22low and high threshold interrupts.
23
24Proximity part contains IR-led driver up to 3 IR leds. The chip measures
25amount of reflected IR light and produces proximity result. Resolution is
268 bit. Driver supports only one channel. Driver uses ALS results to estimate
27reliability of the proximity results. Thus ALS is always running while
28proximity detection is needed.
29
30Driver uses threshold interrupts to avoid need for polling the values.
31Proximity low interrupt doesn't exists in the chip. This is simulated
32by using a delayed work. As long as there is proximity threshold above
33interrupts the delayed work is pushed forward. So, when proximity level goes
34below the threshold value, there is no interrupt and the delayed work will
35finally run. This is handled as no proximity indication.
36
37Chip state is controlled via runtime pm framework when enabled in config.
38
39Calibscale factor is used to hide differences between the chips. By default
40value set to neutral state meaning factor of 1.00. To get proper values,
41calibrated source of light is needed as a reference. Calibscale factor is set
42so that measurement produces about the expected lux value.
43
44SYSFS
45-----
46
47chip_id
48 RO - shows detected chip type and version
49
50power_state
51 RW - enable / disable chip. Uses counting logic
52 1 enables the chip
53 0 disables the chip
54
55lux0_input
56 RO - measured lux value
57 sysfs_notify called when threshold interrupt occurs
58
59lux0_sensor_range
60 RO - lux0_input max value
61
62lux0_rate
63 RW - measurement rate in Hz
64
65lux0_rate_avail
66 RO - supported measurement rates
67
68lux0_thresh_above_value
69 RW - HI level threshold value. All results above the value
70 trigs an interrupt. 65535 (i.e. sensor_range) disables the above
71 interrupt.
72
73lux0_thresh_below_value
74 RW - LO level threshold value. All results below the value
75 trigs an interrupt. 0 disables the below interrupt.
76
77lux0_calibscale
78 RW - calibration value. Set to neutral value by default.
79 Output results are multiplied with calibscale / calibscale_default
80 value.
81
82lux0_calibscale_default
83 RO - neutral calibration value
84
85prox0_raw
86 RO - measured proximity value
87 sysfs_notify called when threshold interrupt occurs
88
89prox0_sensor_range
90 RO - prox0_raw max value
91
92prox0_raw_en
93 RW - enable / disable proximity - uses counting logic
94 1 enables the proximity
95 0 disables the proximity
96
97prox0_thresh_above_count
98 RW - number of proximity interrupts needed before triggering the event
99
100prox0_rate_above
101 RW - Measurement rate (in Hz) when the level is above threshold
102 i.e. when proximity on has been reported.
103
104prox0_rate_below
105 RW - Measurement rate (in Hz) when the level is below threshold
106 i.e. when proximity off has been reported.
107
108prox0_rate_avail
109 RO - Supported proximity measurement rates in Hz
110
111prox0_thresh_above0_value
112 RW - threshold level which trigs proximity events.
113 Filtered by persistence filter (prox0_thresh_above_count)
114
115prox0_thresh_above1_value
116 RW - threshold level which trigs event immediately
diff --git a/Documentation/misc-devices/c2port.txt b/Documentation/misc-devices/c2port.txt
index d9bf93ea4398..ea7344465610 100644
--- a/Documentation/misc-devices/c2port.txt
+++ b/Documentation/misc-devices/c2port.txt
@@ -32,10 +32,10 @@ The C2 Interface main references are at (http://www.silabs.com)
32Silicon Laboratories site], see: 32Silicon Laboratories site], see:
33 33
34- AN127: FLASH Programming via the C2 Interface at 34- AN127: FLASH Programming via the C2 Interface at
35http://www.silabs.com/public/documents/tpub_doc/anote/Microcontrollers/Small_Form_Factor/en/an127.pdf, and 35http://www.silabs.com/Support Documents/TechnicalDocs/an127.pdf
36 36
37- C2 Specification at 37- C2 Specification at
38http://www.silabs.com/public/documents/tpub_doc/spec/Microcontrollers/en/C2spec.pdf, 38http://www.silabs.com/pages/DownloadDoc.aspx?FILEURL=Support%20Documents/TechnicalDocs/an127.pdf&src=SearchResults
39 39
40however it implements a two wire serial communication protocol (bit 40however it implements a two wire serial communication protocol (bit
41banging) designed to enable in-system programming, debugging, and 41banging) designed to enable in-system programming, debugging, and
diff --git a/Documentation/mmc/00-INDEX b/Documentation/mmc/00-INDEX
new file mode 100644
index 000000000000..fca586f5b853
--- /dev/null
+++ b/Documentation/mmc/00-INDEX
@@ -0,0 +1,4 @@
100-INDEX
2 - this file
3mmc-dev-attrs.txt
4 - info on SD and MMC device attributes
diff --git a/Documentation/mmc/mmc-dev-attrs.txt b/Documentation/mmc/mmc-dev-attrs.txt
new file mode 100644
index 000000000000..ff2bd685bced
--- /dev/null
+++ b/Documentation/mmc/mmc-dev-attrs.txt
@@ -0,0 +1,56 @@
1SD and MMC Device Attributes
2============================
3
4All attributes are read-only.
5
6 cid Card Identifaction Register
7 csd Card Specific Data Register
8 scr SD Card Configuration Register (SD only)
9 date Manufacturing Date (from CID Register)
10 fwrev Firmware/Product Revision (from CID Register) (SD and MMCv1 only)
11 hwrev Hardware/Product Revision (from CID Register) (SD and MMCv1 only)
12 manfid Manufacturer ID (from CID Register)
13 name Product Name (from CID Register)
14 oemid OEM/Application ID (from CID Register)
15 serial Product Serial Number (from CID Register)
16 erase_size Erase group size
17 preferred_erase_size Preferred erase size
18
19Note on Erase Size and Preferred Erase Size:
20
21 "erase_size" is the minimum size, in bytes, of an erase
22 operation. For MMC, "erase_size" is the erase group size
23 reported by the card. Note that "erase_size" does not apply
24 to trim or secure trim operations where the minimum size is
25 always one 512 byte sector. For SD, "erase_size" is 512
26 if the card is block-addressed, 0 otherwise.
27
28 SD/MMC cards can erase an arbitrarily large area up to and
29 including the whole card. When erasing a large area it may
30 be desirable to do it in smaller chunks for three reasons:
31 1. A single erase command will make all other I/O on
32 the card wait. This is not a problem if the whole card
33 is being erased, but erasing one partition will make
34 I/O for another partition on the same card wait for the
35 duration of the erase - which could be a several
36 minutes.
37 2. To be able to inform the user of erase progress.
38 3. The erase timeout becomes too large to be very
39 useful. Because the erase timeout contains a margin
40 which is multiplied by the size of the erase area,
41 the value can end up being several minutes for large
42 areas.
43
44 "erase_size" is not the most efficient unit to erase
45 (especially for SD where it is just one sector),
46 hence "preferred_erase_size" provides a good chunk
47 size for erasing large areas.
48
49 For MMC, "preferred_erase_size" is the high-capacity
50 erase size if a card specifies one, otherwise it is
51 based on the capacity of the card.
52
53 For SD, "preferred_erase_size" is the allocation unit
54 size specified by the card.
55
56 "preferred_erase_size" is in bytes.
diff --git a/Documentation/mtd/nand_ecc.txt b/Documentation/mtd/nand_ecc.txt
index 274821b35a7f..990efd7a9818 100644
--- a/Documentation/mtd/nand_ecc.txt
+++ b/Documentation/mtd/nand_ecc.txt
@@ -91,7 +91,7 @@ ECC 1 rp15 rp14 rp13 rp12 rp11 rp10 rp09 rp08
91ECC 2 cp5 cp4 cp3 cp2 cp1 cp0 1 1 91ECC 2 cp5 cp4 cp3 cp2 cp1 cp0 1 1
92 92
93I detected after writing this that ST application note AN1823 93I detected after writing this that ST application note AN1823
94(http://www.st.com/stonline/books/pdf/docs/10123.pdf) gives a much 94(http://www.st.com/stonline/) gives a much
95nicer picture.(but they use line parity as term where I use row parity) 95nicer picture.(but they use line parity as term where I use row parity)
96Oh well, I'm graphically challenged, so suffer with me for a moment :-) 96Oh well, I'm graphically challenged, so suffer with me for a moment :-)
97And I could not reuse the ST picture anyway for copyright reasons. 97And I could not reuse the ST picture anyway for copyright reasons.
diff --git a/Documentation/mutex-design.txt b/Documentation/mutex-design.txt
index c91ccc0720fa..38c10fd7f411 100644
--- a/Documentation/mutex-design.txt
+++ b/Documentation/mutex-design.txt
@@ -9,7 +9,7 @@ firstly, there's nothing wrong with semaphores. But if the simpler
9mutex semantics are sufficient for your code, then there are a couple 9mutex semantics are sufficient for your code, then there are a couple
10of advantages of mutexes: 10of advantages of mutexes:
11 11
12 - 'struct mutex' is smaller on most architectures: .e.g on x86, 12 - 'struct mutex' is smaller on most architectures: E.g. on x86,
13 'struct semaphore' is 20 bytes, 'struct mutex' is 16 bytes. 13 'struct semaphore' is 20 bytes, 'struct mutex' is 16 bytes.
14 A smaller structure size means less RAM footprint, and better 14 A smaller structure size means less RAM footprint, and better
15 CPU-cache utilization. 15 CPU-cache utilization.
@@ -136,3 +136,4 @@ the APIs of 'struct mutex' have been streamlined:
136 void mutex_lock_nested(struct mutex *lock, unsigned int subclass); 136 void mutex_lock_nested(struct mutex *lock, unsigned int subclass);
137 int mutex_lock_interruptible_nested(struct mutex *lock, 137 int mutex_lock_interruptible_nested(struct mutex *lock,
138 unsigned int subclass); 138 unsigned int subclass);
139 int atomic_dec_and_mutex_lock(atomic_t *cnt, struct mutex *lock);
diff --git a/Documentation/networking/3c509.txt b/Documentation/networking/3c509.txt
index 3c45d5dcd63b..dcc9eaf59395 100644
--- a/Documentation/networking/3c509.txt
+++ b/Documentation/networking/3c509.txt
@@ -31,7 +31,7 @@ models:
31Large portions of this documentation were heavily borrowed from the guide 31Large portions of this documentation were heavily borrowed from the guide
32written the original author of the 3c509 driver, Donald Becker. The master 32written the original author of the 3c509 driver, Donald Becker. The master
33copy of that document, which contains notes on older versions of the driver, 33copy of that document, which contains notes on older versions of the driver,
34currently resides on Scyld web server: http://www.scyld.com/network/3c509.html. 34currently resides on Scyld web server: http://www.scyld.com/.
35 35
36 36
37(1) Special Driver Features 37(1) Special Driver Features
diff --git a/Documentation/networking/README.ipw2100 b/Documentation/networking/README.ipw2100
index f3fcaa41f774..6f85e1d06031 100644
--- a/Documentation/networking/README.ipw2100
+++ b/Documentation/networking/README.ipw2100
@@ -72,8 +72,7 @@ such, if you are interested in deploying or shipping a driver as part of
72solution intended to be used for purposes other than development, please 72solution intended to be used for purposes other than development, please
73obtain a tested driver from Intel Customer Support at: 73obtain a tested driver from Intel Customer Support at:
74 74
75http://support.intel.com/support/notebook/sb/CS-006408.htm 75http://www.intel.com/support/wireless/sb/CS-006408.htm
76
77 76
781. Introduction 771. Introduction
79----------------------------------------------- 78-----------------------------------------------
diff --git a/Documentation/networking/README.ipw2200 b/Documentation/networking/README.ipw2200
index 80c728522c4c..616a8e540b0b 100644
--- a/Documentation/networking/README.ipw2200
+++ b/Documentation/networking/README.ipw2200
@@ -85,7 +85,7 @@ such, if you are interested in deploying or shipping a driver as part of
85solution intended to be used for purposes other than development, please 85solution intended to be used for purposes other than development, please
86obtain a tested driver from Intel Customer Support at: 86obtain a tested driver from Intel Customer Support at:
87 87
88http://support.intel.com/support/notebook/sb/CS-006408.htm 88http://support.intel.com
89 89
90 90
911. Introduction 911. Introduction
@@ -171,7 +171,7 @@ Where the supported parameter are:
171 171
172 led 172 led
173 Can be used to turn on experimental LED code. 173 Can be used to turn on experimental LED code.
174 0 = Off, 1 = On. Default is 0. 174 0 = Off, 1 = On. Default is 1.
175 175
176 mode 176 mode
177 Can be used to set the default mode of the adapter. 177 Can be used to set the default mode of the adapter.
diff --git a/Documentation/networking/README.sb1000 b/Documentation/networking/README.sb1000
index f82d42584e98..f92c2aac56a9 100644
--- a/Documentation/networking/README.sb1000
+++ b/Documentation/networking/README.sb1000
@@ -27,8 +27,8 @@ cable modem easy.
27 in Franco's original source code distribution .tar.gz file. Support for 27 in Franco's original source code distribution .tar.gz file. Support for
28 the sb1000 driver can be found at: 28 the sb1000 driver can be found at:
29 29
30 http://home.adelphia.net/~siglercm/sb1000.html 30 http://web.archive.org/web/*/http://home.adelphia.net/~siglercm/sb1000.html
31 http://linuxpower.cx/~cable/ 31 http://web.archive.org/web/*/http://linuxpower.cx/~cable/
32 32
33 along with these utilities. 33 along with these utilities.
34 34
diff --git a/Documentation/networking/arcnet.txt b/Documentation/networking/arcnet.txt
index 796012540386..9ff579502151 100644
--- a/Documentation/networking/arcnet.txt
+++ b/Documentation/networking/arcnet.txt
@@ -68,7 +68,7 @@ REAL NAME" to listserv@tichy.ch.uj.edu.pl. Then, to submit messages to the
68list, mail to linux-arcnet@tichy.ch.uj.edu.pl. 68list, mail to linux-arcnet@tichy.ch.uj.edu.pl.
69 69
70There are archives of the mailing list at: 70There are archives of the mailing list at:
71 http://tichy.ch.uj.edu.pl/lists/linux-arcnet 71 http://epistolary.org/mailman/listinfo.cgi/arcnet
72 72
73The people on linux-net@vger.kernel.org have also been known to be very 73The people on linux-net@vger.kernel.org have also been known to be very
74helpful, especially when we're talking about ALPHA Linux kernels that may or 74helpful, especially when we're talking about ALPHA Linux kernels that may or
@@ -79,7 +79,7 @@ Other Drivers and Info
79---------------------- 79----------------------
80 80
81You can try my ARCNET page on the World Wide Web at: 81You can try my ARCNET page on the World Wide Web at:
82 http://www.worldvisions.ca/~apenwarr/arcnet/ 82 http://www.qis.net/~jschmitz/arcnet/
83 83
84Also, SMC (one of the companies that makes ARCnet cards) has a WWW site you 84Also, SMC (one of the companies that makes ARCnet cards) has a WWW site you
85might be interested in, which includes several drivers for various cards 85might be interested in, which includes several drivers for various cards
diff --git a/Documentation/networking/bonding.txt b/Documentation/networking/bonding.txt
index 61f516b135b4..5dc638791d97 100644
--- a/Documentation/networking/bonding.txt
+++ b/Documentation/networking/bonding.txt
@@ -49,6 +49,7 @@ Table of Contents
493.3 Configuring Bonding Manually with Ifenslave 493.3 Configuring Bonding Manually with Ifenslave
503.3.1 Configuring Multiple Bonds Manually 503.3.1 Configuring Multiple Bonds Manually
513.4 Configuring Bonding Manually via Sysfs 513.4 Configuring Bonding Manually via Sysfs
523.5 Overriding Configuration for Special Cases
52 53
534. Querying Bonding Configuration 544. Querying Bonding Configuration
544.1 Bonding Configuration 554.1 Bonding Configuration
@@ -764,6 +765,14 @@ xmit_hash_policy
764 does not exist, and the layer2 policy is the only policy. The 765 does not exist, and the layer2 policy is the only policy. The
765 layer2+3 value was added for bonding version 3.2.2. 766 layer2+3 value was added for bonding version 3.2.2.
766 767
768resend_igmp
769
770 Specifies the number of IGMP membership reports to be issued after
771 a failover event. One membership report is issued immediately after
772 the failover, subsequent packets are sent in each 200ms interval.
773
774 The valid range is 0 - 255; the default value is 1. This option
775 was added for bonding version 3.7.0.
767 776
7683. Configuring Bonding Devices 7773. Configuring Bonding Devices
769============================== 778==============================
@@ -1318,8 +1327,87 @@ echo 2000 > /sys/class/net/bond1/bonding/arp_interval
1318echo +eth2 > /sys/class/net/bond1/bonding/slaves 1327echo +eth2 > /sys/class/net/bond1/bonding/slaves
1319echo +eth3 > /sys/class/net/bond1/bonding/slaves 1328echo +eth3 > /sys/class/net/bond1/bonding/slaves
1320 1329
1321 13303.5 Overriding Configuration for Special Cases
13224. Querying Bonding Configuration 1331----------------------------------------------
1332When using the bonding driver, the physical port which transmits a frame is
1333typically selected by the bonding driver, and is not relevant to the user or
1334system administrator. The output port is simply selected using the policies of
1335the selected bonding mode. On occasion however, it is helpful to direct certain
1336classes of traffic to certain physical interfaces on output to implement
1337slightly more complex policies. For example, to reach a web server over a
1338bonded interface in which eth0 connects to a private network, while eth1
1339connects via a public network, it may be desirous to bias the bond to send said
1340traffic over eth0 first, using eth1 only as a fall back, while all other traffic
1341can safely be sent over either interface. Such configurations may be achieved
1342using the traffic control utilities inherent in linux.
1343
1344By default the bonding driver is multiqueue aware and 16 queues are created
1345when the driver initializes (see Documentation/networking/multiqueue.txt
1346for details). If more or less queues are desired the module parameter
1347tx_queues can be used to change this value. There is no sysfs parameter
1348available as the allocation is done at module init time.
1349
1350The output of the file /proc/net/bonding/bondX has changed so the output Queue
1351ID is now printed for each slave:
1352
1353Bonding Mode: fault-tolerance (active-backup)
1354Primary Slave: None
1355Currently Active Slave: eth0
1356MII Status: up
1357MII Polling Interval (ms): 0
1358Up Delay (ms): 0
1359Down Delay (ms): 0
1360
1361Slave Interface: eth0
1362MII Status: up
1363Link Failure Count: 0
1364Permanent HW addr: 00:1a:a0:12:8f:cb
1365Slave queue ID: 0
1366
1367Slave Interface: eth1
1368MII Status: up
1369Link Failure Count: 0
1370Permanent HW addr: 00:1a:a0:12:8f:cc
1371Slave queue ID: 2
1372
1373The queue_id for a slave can be set using the command:
1374
1375# echo "eth1:2" > /sys/class/net/bond0/bonding/queue_id
1376
1377Any interface that needs a queue_id set should set it with multiple calls
1378like the one above until proper priorities are set for all interfaces. On
1379distributions that allow configuration via initscripts, multiple 'queue_id'
1380arguments can be added to BONDING_OPTS to set all needed slave queues.
1381
1382These queue id's can be used in conjunction with the tc utility to configure
1383a multiqueue qdisc and filters to bias certain traffic to transmit on certain
1384slave devices. For instance, say we wanted, in the above configuration to
1385force all traffic bound to 192.168.1.100 to use eth1 in the bond as its output
1386device. The following commands would accomplish this:
1387
1388# tc qdisc add dev bond0 handle 1 root multiq
1389
1390# tc filter add dev bond0 protocol ip parent 1: prio 1 u32 match ip dst \
1391 192.168.1.100 action skbedit queue_mapping 2
1392
1393These commands tell the kernel to attach a multiqueue queue discipline to the
1394bond0 interface and filter traffic enqueued to it, such that packets with a dst
1395ip of 192.168.1.100 have their output queue mapping value overwritten to 2.
1396This value is then passed into the driver, causing the normal output path
1397selection policy to be overridden, selecting instead qid 2, which maps to eth1.
1398
1399Note that qid values begin at 1. Qid 0 is reserved to initiate to the driver
1400that normal output policy selection should take place. One benefit to simply
1401leaving the qid for a slave to 0 is the multiqueue awareness in the bonding
1402driver that is now present. This awareness allows tc filters to be placed on
1403slave devices as well as bond devices and the bonding driver will simply act as
1404a pass-through for selecting output queues on the slave device rather than
1405output port selection.
1406
1407This feature first appeared in bonding driver version 3.7.0 and support for
1408output slave selection was limited to round-robin and active-backup modes.
1409
14104 Querying Bonding Configuration
1323================================= 1411=================================
1324 1412
13254.1 Bonding Configuration 14134.1 Bonding Configuration
@@ -2432,7 +2520,7 @@ be found at:
2432https://lists.sourceforge.net/lists/listinfo/bonding-devel 2520https://lists.sourceforge.net/lists/listinfo/bonding-devel
2433 2521
2434Donald Becker's Ethernet Drivers and diag programs may be found at : 2522Donald Becker's Ethernet Drivers and diag programs may be found at :
2435 - http://www.scyld.com/network/ 2523 - http://web.archive.org/web/*/http://www.scyld.com/network/
2436 2524
2437You will also find a lot of information regarding Ethernet, NWay, MII, 2525You will also find a lot of information regarding Ethernet, NWay, MII,
2438etc. at www.scyld.com. 2526etc. at www.scyld.com.
diff --git a/Documentation/networking/caif/spi_porting.txt b/Documentation/networking/caif/spi_porting.txt
new file mode 100644
index 000000000000..61d7c9247453
--- /dev/null
+++ b/Documentation/networking/caif/spi_porting.txt
@@ -0,0 +1,208 @@
1- CAIF SPI porting -
2
3- CAIF SPI basics:
4
5Running CAIF over SPI needs some extra setup, owing to the nature of SPI.
6Two extra GPIOs have been added in order to negotiate the transfers
7 between the master and the slave. The minimum requirement for running
8CAIF over SPI is a SPI slave chip and two GPIOs (more details below).
9Please note that running as a slave implies that you need to keep up
10with the master clock. An overrun or underrun event is fatal.
11
12- CAIF SPI framework:
13
14To make porting as easy as possible, the CAIF SPI has been divided in
15two parts. The first part (called the interface part) deals with all
16generic functionality such as length framing, SPI frame negotiation
17and SPI frame delivery and transmission. The other part is the CAIF
18SPI slave device part, which is the module that you have to write if
19you want to run SPI CAIF on a new hardware. This part takes care of
20the physical hardware, both with regard to SPI and to GPIOs.
21
22- Implementing a CAIF SPI device:
23
24 - Functionality provided by the CAIF SPI slave device:
25
26 In order to implement a SPI device you will, as a minimum,
27 need to implement the following
28 functions:
29
30 int (*init_xfer) (struct cfspi_xfer * xfer, struct cfspi_dev *dev):
31
32 This function is called by the CAIF SPI interface to give
33 you a chance to set up your hardware to be ready to receive
34 a stream of data from the master. The xfer structure contains
35 both physical and logical adresses, as well as the total length
36 of the transfer in both directions.The dev parameter can be used
37 to map to different CAIF SPI slave devices.
38
39 void (*sig_xfer) (bool xfer, struct cfspi_dev *dev):
40
41 This function is called by the CAIF SPI interface when the output
42 (SPI_INT) GPIO needs to change state. The boolean value of the xfer
43 variable indicates whether the GPIO should be asserted (HIGH) or
44 deasserted (LOW). The dev parameter can be used to map to different CAIF
45 SPI slave devices.
46
47 - Functionality provided by the CAIF SPI interface:
48
49 void (*ss_cb) (bool assert, struct cfspi_ifc *ifc);
50
51 This function is called by the CAIF SPI slave device in order to
52 signal a change of state of the input GPIO (SS) to the interface.
53 Only active edges are mandatory to be reported.
54 This function can be called from IRQ context (recommended in order
55 not to introduce latency). The ifc parameter should be the pointer
56 returned from the platform probe function in the SPI device structure.
57
58 void (*xfer_done_cb) (struct cfspi_ifc *ifc);
59
60 This function is called by the CAIF SPI slave device in order to
61 report that a transfer is completed. This function should only be
62 called once both the transmission and the reception are completed.
63 This function can be called from IRQ context (recommended in order
64 not to introduce latency). The ifc parameter should be the pointer
65 returned from the platform probe function in the SPI device structure.
66
67 - Connecting the bits and pieces:
68
69 - Filling in the SPI slave device structure:
70
71 Connect the necessary callback functions.
72 Indicate clock speed (used to calculate toggle delays).
73 Chose a suitable name (helps debugging if you use several CAIF
74 SPI slave devices).
75 Assign your private data (can be used to map to your structure).
76
77 - Filling in the SPI slave platform device structure:
78 Add name of driver to connect to ("cfspi_sspi").
79 Assign the SPI slave device structure as platform data.
80
81- Padding:
82
83In order to optimize throughput, a number of SPI padding options are provided.
84Padding can be enabled independently for uplink and downlink transfers.
85Padding can be enabled for the head, the tail and for the total frame size.
86The padding needs to be correctly configured on both sides of the link.
87The padding can be changed via module parameters in cfspi_sspi.c or via
88the sysfs directory of the cfspi_sspi driver (before device registration).
89
90- CAIF SPI device template:
91
92/*
93 * Copyright (C) ST-Ericsson AB 2010
94 * Author: Daniel Martensson / Daniel.Martensson@stericsson.com
95 * License terms: GNU General Public License (GPL), version 2.
96 *
97 */
98
99#include <linux/init.h>
100#include <linux/module.h>
101#include <linux/device.h>
102#include <linux/wait.h>
103#include <linux/interrupt.h>
104#include <linux/dma-mapping.h>
105#include <net/caif/caif_spi.h>
106
107MODULE_LICENSE("GPL");
108
109struct sspi_struct {
110 struct cfspi_dev sdev;
111 struct cfspi_xfer *xfer;
112};
113
114static struct sspi_struct slave;
115static struct platform_device slave_device;
116
117static irqreturn_t sspi_irq(int irq, void *arg)
118{
119 /* You only need to trigger on an edge to the active state of the
120 * SS signal. Once a edge is detected, the ss_cb() function should be
121 * called with the parameter assert set to true. It is OK
122 * (and even advised) to call the ss_cb() function in IRQ context in
123 * order not to add any delay. */
124
125 return IRQ_HANDLED;
126}
127
128static void sspi_complete(void *context)
129{
130 /* Normally the DMA or the SPI framework will call you back
131 * in something similar to this. The only thing you need to
132 * do is to call the xfer_done_cb() function, providing the pointer
133 * to the CAIF SPI interface. It is OK to call this function
134 * from IRQ context. */
135}
136
137static int sspi_init_xfer(struct cfspi_xfer *xfer, struct cfspi_dev *dev)
138{
139 /* Store transfer info. For a normal implementation you should
140 * set up your DMA here and make sure that you are ready to
141 * receive the data from the master SPI. */
142
143 struct sspi_struct *sspi = (struct sspi_struct *)dev->priv;
144
145 sspi->xfer = xfer;
146
147 return 0;
148}
149
150void sspi_sig_xfer(bool xfer, struct cfspi_dev *dev)
151{
152 /* If xfer is true then you should assert the SPI_INT to indicate to
153 * the master that you are ready to recieve the data from the master
154 * SPI. If xfer is false then you should de-assert SPI_INT to indicate
155 * that the transfer is done.
156 */
157
158 struct sspi_struct *sspi = (struct sspi_struct *)dev->priv;
159}
160
161static void sspi_release(struct device *dev)
162{
163 /*
164 * Here you should release your SPI device resources.
165 */
166}
167
168static int __init sspi_init(void)
169{
170 /* Here you should initialize your SPI device by providing the
171 * necessary functions, clock speed, name and private data. Once
172 * done, you can register your device with the
173 * platform_device_register() function. This function will return
174 * with the CAIF SPI interface initialized. This is probably also
175 * the place where you should set up your GPIOs, interrupts and SPI
176 * resources. */
177
178 int res = 0;
179
180 /* Initialize slave device. */
181 slave.sdev.init_xfer = sspi_init_xfer;
182 slave.sdev.sig_xfer = sspi_sig_xfer;
183 slave.sdev.clk_mhz = 13;
184 slave.sdev.priv = &slave;
185 slave.sdev.name = "spi_sspi";
186 slave_device.dev.release = sspi_release;
187
188 /* Initialize platform device. */
189 slave_device.name = "cfspi_sspi";
190 slave_device.dev.platform_data = &slave.sdev;
191
192 /* Register platform device. */
193 res = platform_device_register(&slave_device);
194 if (res) {
195 printk(KERN_WARNING "sspi_init: failed to register dev.\n");
196 return -ENODEV;
197 }
198
199 return res;
200}
201
202static void __exit sspi_exit(void)
203{
204 platform_device_del(&slave_device);
205}
206
207module_init(sspi_init);
208module_exit(sspi_exit);
diff --git a/Documentation/networking/can.txt b/Documentation/networking/can.txt
index cd79735013f9..5b04b67ddca2 100644
--- a/Documentation/networking/can.txt
+++ b/Documentation/networking/can.txt
@@ -22,6 +22,7 @@ This file contains
22 4.1.2 RAW socket option CAN_RAW_ERR_FILTER 22 4.1.2 RAW socket option CAN_RAW_ERR_FILTER
23 4.1.3 RAW socket option CAN_RAW_LOOPBACK 23 4.1.3 RAW socket option CAN_RAW_LOOPBACK
24 4.1.4 RAW socket option CAN_RAW_RECV_OWN_MSGS 24 4.1.4 RAW socket option CAN_RAW_RECV_OWN_MSGS
25 4.1.5 RAW socket returned message flags
25 4.2 Broadcast Manager protocol sockets (SOCK_DGRAM) 26 4.2 Broadcast Manager protocol sockets (SOCK_DGRAM)
26 4.3 connected transport protocols (SOCK_SEQPACKET) 27 4.3 connected transport protocols (SOCK_SEQPACKET)
27 4.4 unconnected transport protocols (SOCK_DGRAM) 28 4.4 unconnected transport protocols (SOCK_DGRAM)
@@ -471,6 +472,17 @@ solution for a couple of reasons:
471 setsockopt(s, SOL_CAN_RAW, CAN_RAW_RECV_OWN_MSGS, 472 setsockopt(s, SOL_CAN_RAW, CAN_RAW_RECV_OWN_MSGS,
472 &recv_own_msgs, sizeof(recv_own_msgs)); 473 &recv_own_msgs, sizeof(recv_own_msgs));
473 474
475 4.1.5 RAW socket returned message flags
476
477 When using recvmsg() call, the msg->msg_flags may contain following flags:
478
479 MSG_DONTROUTE: set when the received frame was created on the local host.
480
481 MSG_CONFIRM: set when the frame was sent via the socket it is received on.
482 This flag can be interpreted as a 'transmission confirmation' when the
483 CAN driver supports the echo of frames on driver level, see 3.2 and 6.2.
484 In order to receive such messages, CAN_RAW_RECV_OWN_MSGS must be set.
485
474 4.2 Broadcast Manager protocol sockets (SOCK_DGRAM) 486 4.2 Broadcast Manager protocol sockets (SOCK_DGRAM)
475 4.3 connected transport protocols (SOCK_SEQPACKET) 487 4.3 connected transport protocols (SOCK_SEQPACKET)
476 4.4 unconnected transport protocols (SOCK_DGRAM) 488 4.4 unconnected transport protocols (SOCK_DGRAM)
diff --git a/Documentation/networking/dccp.txt b/Documentation/networking/dccp.txt
index a62fdf7a6bff..271d524a4c8d 100644
--- a/Documentation/networking/dccp.txt
+++ b/Documentation/networking/dccp.txt
@@ -1,18 +1,20 @@
1DCCP protocol 1DCCP protocol
2============ 2=============
3 3
4 4
5Contents 5Contents
6======== 6========
7
8- Introduction 7- Introduction
9- Missing features 8- Missing features
10- Socket options 9- Socket options
10- Sysctl variables
11- IOCTLs
12- Other tunables
11- Notes 13- Notes
12 14
15
13Introduction 16Introduction
14============ 17============
15
16Datagram Congestion Control Protocol (DCCP) is an unreliable, connection 18Datagram Congestion Control Protocol (DCCP) is an unreliable, connection
17oriented protocol designed to solve issues present in UDP and TCP, particularly 19oriented protocol designed to solve issues present in UDP and TCP, particularly
18for real-time and multimedia (streaming) traffic. 20for real-time and multimedia (streaming) traffic.
@@ -29,9 +31,9 @@ It has a base protocol and pluggable congestion control IDs (CCIDs).
29DCCP is a Proposed Standard (RFC 2026), and the homepage for DCCP as a protocol 31DCCP is a Proposed Standard (RFC 2026), and the homepage for DCCP as a protocol
30is at http://www.ietf.org/html.charters/dccp-charter.html 32is at http://www.ietf.org/html.charters/dccp-charter.html
31 33
34
32Missing features 35Missing features
33================ 36================
34
35The Linux DCCP implementation does not currently support all the features that are 37The Linux DCCP implementation does not currently support all the features that are
36specified in RFCs 4340...42. 38specified in RFCs 4340...42.
37 39
@@ -45,7 +47,6 @@ http://linux-net.osdl.org/index.php/DCCP_Testing#Experimental_DCCP_source_tree
45 47
46Socket options 48Socket options
47============== 49==============
48
49DCCP_SOCKOPT_SERVICE sets the service. The specification mandates use of 50DCCP_SOCKOPT_SERVICE sets the service. The specification mandates use of
50service codes (RFC 4340, sec. 8.1.2); if this socket option is not set, 51service codes (RFC 4340, sec. 8.1.2); if this socket option is not set,
51the socket will fall back to 0 (which means that no meaningful service code 52the socket will fall back to 0 (which means that no meaningful service code
@@ -112,6 +113,7 @@ DCCP_SOCKOPT_CCID_TX_INFO
112On unidirectional connections it is useful to close the unused half-connection 113On unidirectional connections it is useful to close the unused half-connection
113via shutdown (SHUT_WR or SHUT_RD): this will reduce per-packet processing costs. 114via shutdown (SHUT_WR or SHUT_RD): this will reduce per-packet processing costs.
114 115
116
115Sysctl variables 117Sysctl variables
116================ 118================
117Several DCCP default parameters can be managed by the following sysctls 119Several DCCP default parameters can be managed by the following sysctls
@@ -155,15 +157,30 @@ sync_ratelimit = 125 ms
155 sequence-invalid packets on the same socket (RFC 4340, 7.5.4). The unit 157 sequence-invalid packets on the same socket (RFC 4340, 7.5.4). The unit
156 of this parameter is milliseconds; a value of 0 disables rate-limiting. 158 of this parameter is milliseconds; a value of 0 disables rate-limiting.
157 159
160
158IOCTLS 161IOCTLS
159====== 162======
160FIONREAD 163FIONREAD
161 Works as in udp(7): returns in the `int' argument pointer the size of 164 Works as in udp(7): returns in the `int' argument pointer the size of
162 the next pending datagram in bytes, or 0 when no datagram is pending. 165 the next pending datagram in bytes, or 0 when no datagram is pending.
163 166
167
168Other tunables
169==============
170Per-route rto_min support
171 CCID-2 supports the RTAX_RTO_MIN per-route setting for the minimum value
172 of the RTO timer. This setting can be modified via the 'rto_min' option
173 of iproute2; for example:
174 > ip route change 10.0.0.0/24 rto_min 250j dev wlan0
175 > ip route add 10.0.0.254/32 rto_min 800j dev wlan0
176 > ip route show dev wlan0
177 CCID-3 also supports the rto_min setting: it is used to define the lower
178 bound for the expiry of the nofeedback timer. This can be useful on LANs
179 with very low RTTs (e.g., loopback, Gbit ethernet).
180
181
164Notes 182Notes
165===== 183=====
166
167DCCP does not travel through NAT successfully at present on many boxes. This is 184DCCP does not travel through NAT successfully at present on many boxes. This is
168because the checksum covers the pseudo-header as per TCP and UDP. Linux NAT 185because the checksum covers the pseudo-header as per TCP and UDP. Linux NAT
169support for DCCP has been added. 186support for DCCP has been added.
diff --git a/Documentation/networking/decnet.txt b/Documentation/networking/decnet.txt
index d8968958d839..e12a4900cf72 100644
--- a/Documentation/networking/decnet.txt
+++ b/Documentation/networking/decnet.txt
@@ -4,7 +4,7 @@
41) Other documentation.... 41) Other documentation....
5 5
6 o Project Home Pages 6 o Project Home Pages
7 http://www.chygwyn.com/DECnet/ - Kernel info 7 http://www.chygwyn.com/ - Kernel info
8 http://linux-decnet.sourceforge.net/ - Userland tools 8 http://linux-decnet.sourceforge.net/ - Userland tools
9 http://www.sourceforge.net/projects/linux-decnet/ - Status page 9 http://www.sourceforge.net/projects/linux-decnet/ - Status page
10 10
diff --git a/Documentation/networking/dns_resolver.txt b/Documentation/networking/dns_resolver.txt
new file mode 100644
index 000000000000..aefd1e681804
--- /dev/null
+++ b/Documentation/networking/dns_resolver.txt
@@ -0,0 +1,146 @@
1 ===================
2 DNS Resolver Module
3 ===================
4
5Contents:
6
7 - Overview.
8 - Compilation.
9 - Setting up.
10 - Usage.
11 - Mechanism.
12 - Debugging.
13
14
15========
16OVERVIEW
17========
18
19The DNS resolver module provides a way for kernel services to make DNS queries
20by way of requesting a key of key type dns_resolver. These queries are
21upcalled to userspace through /sbin/request-key.
22
23These routines must be supported by userspace tools dns.upcall, cifs.upcall and
24request-key. It is under development and does not yet provide the full feature
25set. The features it does support include:
26
27 (*) Implements the dns_resolver key_type to contact userspace.
28
29It does not yet support the following AFS features:
30
31 (*) Dns query support for AFSDB resource record.
32
33This code is extracted from the CIFS filesystem.
34
35
36===========
37COMPILATION
38===========
39
40The module should be enabled by turning on the kernel configuration options:
41
42 CONFIG_DNS_RESOLVER - tristate "DNS Resolver support"
43
44
45==========
46SETTING UP
47==========
48
49To set up this facility, the /etc/request-key.conf file must be altered so that
50/sbin/request-key can appropriately direct the upcalls. For example, to handle
51basic dname to IPv4/IPv6 address resolution, the following line should be
52added:
53
54 #OP TYPE DESC CO-INFO PROGRAM ARG1 ARG2 ARG3 ...
55 #====== ============ ======= ======= ==========================
56 create dns_resolver * * /usr/sbin/cifs.upcall %k
57
58To direct a query for query type 'foo', a line of the following should be added
59before the more general line given above as the first match is the one taken.
60
61 create dns_resolver foo:* * /usr/sbin/dns.foo %k
62
63
64
65=====
66USAGE
67=====
68
69To make use of this facility, one of the following functions that are
70implemented in the module can be called after doing:
71
72 #include <linux/dns_resolver.h>
73
74 (1) int dns_query(const char *type, const char *name, size_t namelen,
75 const char *options, char **_result, time_t *_expiry);
76
77 This is the basic access function. It looks for a cached DNS query and if
78 it doesn't find it, it upcalls to userspace to make a new DNS query, which
79 may then be cached. The key description is constructed as a string of the
80 form:
81
82 [<type>:]<name>
83
84 where <type> optionally specifies the particular upcall program to invoke,
85 and thus the type of query to do, and <name> specifies the string to be
86 looked up. The default query type is a straight hostname to IP address
87 set lookup.
88
89 The name parameter is not required to be a NUL-terminated string, and its
90 length should be given by the namelen argument.
91
92 The options parameter may be NULL or it may be a set of options
93 appropriate to the query type.
94
95 The return value is a string appropriate to the query type. For instance,
96 for the default query type it is just a list of comma-separated IPv4 and
97 IPv6 addresses. The caller must free the result.
98
99 The length of the result string is returned on success, and a negative
100 error code is returned otherwise. -EKEYREJECTED will be returned if the
101 DNS lookup failed.
102
103 If _expiry is non-NULL, the expiry time (TTL) of the result will be
104 returned also.
105
106
107=========
108MECHANISM
109=========
110
111The dnsresolver module registers a key type called "dns_resolver". Keys of
112this type are used to transport and cache DNS lookup results from userspace.
113
114When dns_query() is invoked, it calls request_key() to search the local
115keyrings for a cached DNS result. If that fails to find one, it upcalls to
116userspace to get a new result.
117
118Upcalls to userspace are made through the request_key() upcall vector, and are
119directed by means of configuration lines in /etc/request-key.conf that tell
120/sbin/request-key what program to run to instantiate the key.
121
122The upcall handler program is responsible for querying the DNS, processing the
123result into a form suitable for passing to the keyctl_instantiate_key()
124routine. This then passes the data to dns_resolver_instantiate() which strips
125off and processes any options included in the data, and then attaches the
126remainder of the string to the key as its payload.
127
128The upcall handler program should set the expiry time on the key to that of the
129lowest TTL of all the records it has extracted a result from. This means that
130the key will be discarded and recreated when the data it holds has expired.
131
132dns_query() returns a copy of the value attached to the key, or an error if
133that is indicated instead.
134
135See <file:Documentation/keys-request-key.txt> for further information about
136request-key function.
137
138
139=========
140DEBUGGING
141=========
142
143Debugging messages can be turned on dynamically by writing a 1 into the
144following file:
145
146 /sys/module/dnsresolver/parameters/debug
diff --git a/Documentation/networking/e1000.txt b/Documentation/networking/e1000.txt
index 2df71861e578..d9271e74e488 100644
--- a/Documentation/networking/e1000.txt
+++ b/Documentation/networking/e1000.txt
@@ -1,82 +1,35 @@
1Linux* Base Driver for the Intel(R) PRO/1000 Family of Adapters 1Linux* Base Driver for the Intel(R) PRO/1000 Family of Adapters
2=============================================================== 2===============================================================
3 3
4September 26, 2006 4Intel Gigabit Linux driver.
5 5Copyright(c) 1999 - 2010 Intel Corporation.
6 6
7Contents 7Contents
8======== 8========
9 9
10- In This Release
11- Identifying Your Adapter 10- Identifying Your Adapter
12- Building and Installation
13- Command Line Parameters 11- Command Line Parameters
14- Speed and Duplex Configuration 12- Speed and Duplex Configuration
15- Additional Configurations 13- Additional Configurations
16- Known Issues
17- Support 14- Support
18 15
19
20In This Release
21===============
22
23This file describes the Linux* Base Driver for the Intel(R) PRO/1000 Family
24of Adapters. This driver includes support for Itanium(R)2-based systems.
25
26For questions related to hardware requirements, refer to the documentation
27supplied with your Intel PRO/1000 adapter. All hardware requirements listed
28apply to use with Linux.
29
30The following features are now available in supported kernels:
31 - Native VLANs
32 - Channel Bonding (teaming)
33 - SNMP
34
35Channel Bonding documentation can be found in the Linux kernel source:
36/Documentation/networking/bonding.txt
37
38The driver information previously displayed in the /proc filesystem is not
39supported in this release. Alternatively, you can use ethtool (version 1.6
40or later), lspci, and ifconfig to obtain the same information.
41
42Instructions on updating ethtool can be found in the section "Additional
43Configurations" later in this document.
44
45NOTE: The Intel(R) 82562v 10/100 Network Connection only provides 10/100
46support.
47
48
49Identifying Your Adapter 16Identifying Your Adapter
50======================== 17========================
51 18
52For more information on how to identify your adapter, go to the Adapter & 19For more information on how to identify your adapter, go to the Adapter &
53Driver ID Guide at: 20Driver ID Guide at:
54 21
55 http://support.intel.com/support/network/adapter/pro100/21397.htm 22 http://support.intel.com/support/go/network/adapter/idguide.htm
56 23
57For the latest Intel network drivers for Linux, refer to the following 24For the latest Intel network drivers for Linux, refer to the following
58website. In the search field, enter your adapter name or type, or use the 25website. In the search field, enter your adapter name or type, or use the
59networking link on the left to search for your adapter: 26networking link on the left to search for your adapter:
60 27
61 http://downloadfinder.intel.com/scripts-df/support_intel.asp 28 http://support.intel.com/support/go/network/adapter/home.htm
62
63 29
64Command Line Parameters 30Command Line Parameters
65======================= 31=======================
66 32
67If the driver is built as a module, the following optional parameters
68are used by entering them on the command line with the modprobe command
69using this syntax:
70
71 modprobe e1000 [<option>=<VAL1>,<VAL2>,...]
72
73For example, with two PRO/1000 PCI adapters, entering:
74
75 modprobe e1000 TxDescriptors=80,128
76
77loads the e1000 driver with 80 TX descriptors for the first adapter and
78128 TX descriptors for the second adapter.
79
80The default value for each parameter is generally the recommended setting, 33The default value for each parameter is generally the recommended setting,
81unless otherwise noted. 34unless otherwise noted.
82 35
@@ -89,10 +42,6 @@ NOTES: For more information about the AutoNeg, Duplex, and Speed
89 parameters, see the application note at: 42 parameters, see the application note at:
90 http://www.intel.com/design/network/applnots/ap450.htm 43 http://www.intel.com/design/network/applnots/ap450.htm
91 44
92 A descriptor describes a data buffer and attributes related to
93 the data buffer. This information is accessed by the hardware.
94
95
96AutoNeg 45AutoNeg
97------- 46-------
98(Supported only on adapters with copper connections) 47(Supported only on adapters with copper connections)
@@ -106,7 +55,6 @@ Duplex parameters must not be specified.
106NOTE: Refer to the Speed and Duplex section of this readme for more 55NOTE: Refer to the Speed and Duplex section of this readme for more
107 information on the AutoNeg parameter. 56 information on the AutoNeg parameter.
108 57
109
110Duplex 58Duplex
111------ 59------
112(Supported only on adapters with copper connections) 60(Supported only on adapters with copper connections)
@@ -119,7 +67,6 @@ set to auto-negotiate, the board auto-detects the correct duplex. If the
119link partner is forced (either full or half), Duplex defaults to half- 67link partner is forced (either full or half), Duplex defaults to half-
120duplex. 68duplex.
121 69
122
123FlowControl 70FlowControl
124----------- 71-----------
125Valid Range: 0-3 (0=none, 1=Rx only, 2=Tx only, 3=Rx&Tx) 72Valid Range: 0-3 (0=none, 1=Rx only, 2=Tx only, 3=Rx&Tx)
@@ -128,16 +75,16 @@ Default Value: Reads flow control settings from the EEPROM
128This parameter controls the automatic generation(Tx) and response(Rx) 75This parameter controls the automatic generation(Tx) and response(Rx)
129to Ethernet PAUSE frames. 76to Ethernet PAUSE frames.
130 77
131
132InterruptThrottleRate 78InterruptThrottleRate
133--------------------- 79---------------------
134(not supported on Intel(R) 82542, 82543 or 82544-based adapters) 80(not supported on Intel(R) 82542, 82543 or 82544-based adapters)
135Valid Range: 0,1,3,100-100000 (0=off, 1=dynamic, 3=dynamic conservative) 81Valid Range: 0,1,3,4,100-100000 (0=off, 1=dynamic, 3=dynamic conservative,
82 4=simplified balancing)
136Default Value: 3 83Default Value: 3
137 84
138The driver can limit the amount of interrupts per second that the adapter 85The driver can limit the amount of interrupts per second that the adapter
139will generate for incoming packets. It does this by writing a value to the 86will generate for incoming packets. It does this by writing a value to the
140adapter that is based on the maximum amount of interrupts that the adapter 87adapter that is based on the maximum amount of interrupts that the adapter
141will generate per second. 88will generate per second.
142 89
143Setting InterruptThrottleRate to a value greater or equal to 100 90Setting InterruptThrottleRate to a value greater or equal to 100
@@ -146,37 +93,43 @@ per second, even if more packets have come in. This reduces interrupt
146load on the system and can lower CPU utilization under heavy load, 93load on the system and can lower CPU utilization under heavy load,
147but will increase latency as packets are not processed as quickly. 94but will increase latency as packets are not processed as quickly.
148 95
149The default behaviour of the driver previously assumed a static 96The default behaviour of the driver previously assumed a static
150InterruptThrottleRate value of 8000, providing a good fallback value for 97InterruptThrottleRate value of 8000, providing a good fallback value for
151all traffic types,but lacking in small packet performance and latency. 98all traffic types,but lacking in small packet performance and latency.
152The hardware can handle many more small packets per second however, and 99The hardware can handle many more small packets per second however, and
153for this reason an adaptive interrupt moderation algorithm was implemented. 100for this reason an adaptive interrupt moderation algorithm was implemented.
154 101
155Since 7.3.x, the driver has two adaptive modes (setting 1 or 3) in which 102Since 7.3.x, the driver has two adaptive modes (setting 1 or 3) in which
156it dynamically adjusts the InterruptThrottleRate value based on the traffic 103it dynamically adjusts the InterruptThrottleRate value based on the traffic
157that it receives. After determining the type of incoming traffic in the last 104that it receives. After determining the type of incoming traffic in the last
158timeframe, it will adjust the InterruptThrottleRate to an appropriate value 105timeframe, it will adjust the InterruptThrottleRate to an appropriate value
159for that traffic. 106for that traffic.
160 107
161The algorithm classifies the incoming traffic every interval into 108The algorithm classifies the incoming traffic every interval into
162classes. Once the class is determined, the InterruptThrottleRate value is 109classes. Once the class is determined, the InterruptThrottleRate value is
163adjusted to suit that traffic type the best. There are three classes defined: 110adjusted to suit that traffic type the best. There are three classes defined:
164"Bulk traffic", for large amounts of packets of normal size; "Low latency", 111"Bulk traffic", for large amounts of packets of normal size; "Low latency",
165for small amounts of traffic and/or a significant percentage of small 112for small amounts of traffic and/or a significant percentage of small
166packets; and "Lowest latency", for almost completely small packets or 113packets; and "Lowest latency", for almost completely small packets or
167minimal traffic. 114minimal traffic.
168 115
169In dynamic conservative mode, the InterruptThrottleRate value is set to 4000 116In dynamic conservative mode, the InterruptThrottleRate value is set to 4000
170for traffic that falls in class "Bulk traffic". If traffic falls in the "Low 117for traffic that falls in class "Bulk traffic". If traffic falls in the "Low
171latency" or "Lowest latency" class, the InterruptThrottleRate is increased 118latency" or "Lowest latency" class, the InterruptThrottleRate is increased
172stepwise to 20000. This default mode is suitable for most applications. 119stepwise to 20000. This default mode is suitable for most applications.
173 120
174For situations where low latency is vital such as cluster or 121For situations where low latency is vital such as cluster or
175grid computing, the algorithm can reduce latency even more when 122grid computing, the algorithm can reduce latency even more when
176InterruptThrottleRate is set to mode 1. In this mode, which operates 123InterruptThrottleRate is set to mode 1. In this mode, which operates
177the same as mode 3, the InterruptThrottleRate will be increased stepwise to 124the same as mode 3, the InterruptThrottleRate will be increased stepwise to
17870000 for traffic in class "Lowest latency". 12570000 for traffic in class "Lowest latency".
179 126
127In simplified mode the interrupt rate is based on the ratio of Tx and
128Rx traffic. If the bytes per second rate is approximately equal, the
129interrupt rate will drop as low as 2000 interrupts per second. If the
130traffic is mostly transmit or mostly receive, the interrupt rate could
131be as high as 8000.
132
180Setting InterruptThrottleRate to 0 turns off any interrupt moderation 133Setting InterruptThrottleRate to 0 turns off any interrupt moderation
181and may improve small packet latency, but is generally not suitable 134and may improve small packet latency, but is generally not suitable
182for bulk throughput traffic. 135for bulk throughput traffic.
@@ -212,8 +165,6 @@ NOTE: When e1000 is loaded with default settings and multiple adapters
212 be platform-specific. If CPU utilization is not a concern, use 165 be platform-specific. If CPU utilization is not a concern, use
213 RX_POLLING (NAPI) and default driver settings. 166 RX_POLLING (NAPI) and default driver settings.
214 167
215
216
217RxDescriptors 168RxDescriptors
218------------- 169-------------
219Valid Range: 80-256 for 82542 and 82543-based adapters 170Valid Range: 80-256 for 82542 and 82543-based adapters
@@ -225,15 +176,14 @@ by the driver. Increasing this value allows the driver to buffer more
225incoming packets, at the expense of increased system memory utilization. 176incoming packets, at the expense of increased system memory utilization.
226 177
227Each descriptor is 16 bytes. A receive buffer is also allocated for each 178Each descriptor is 16 bytes. A receive buffer is also allocated for each
228descriptor and can be either 2048, 4096, 8192, or 16384 bytes, depending 179descriptor and can be either 2048, 4096, 8192, or 16384 bytes, depending
229on the MTU setting. The maximum MTU size is 16110. 180on the MTU setting. The maximum MTU size is 16110.
230 181
231NOTE: MTU designates the frame size. It only needs to be set for Jumbo 182NOTE: MTU designates the frame size. It only needs to be set for Jumbo
232 Frames. Depending on the available system resources, the request 183 Frames. Depending on the available system resources, the request
233 for a higher number of receive descriptors may be denied. In this 184 for a higher number of receive descriptors may be denied. In this
234 case, use a lower number. 185 case, use a lower number.
235 186
236
237RxIntDelay 187RxIntDelay
238---------- 188----------
239Valid Range: 0-65535 (0=off) 189Valid Range: 0-65535 (0=off)
@@ -254,7 +204,6 @@ CAUTION: When setting RxIntDelay to a value other than 0, adapters may
254 restoring the network connection. To eliminate the potential 204 restoring the network connection. To eliminate the potential
255 for the hang ensure that RxIntDelay is set to 0. 205 for the hang ensure that RxIntDelay is set to 0.
256 206
257
258RxAbsIntDelay 207RxAbsIntDelay
259------------- 208-------------
260(This parameter is supported only on 82540, 82545 and later adapters.) 209(This parameter is supported only on 82540, 82545 and later adapters.)
@@ -268,7 +217,6 @@ packet is received within the set amount of time. Proper tuning,
268along with RxIntDelay, may improve traffic throughput in specific network 217along with RxIntDelay, may improve traffic throughput in specific network
269conditions. 218conditions.
270 219
271
272Speed 220Speed
273----- 221-----
274(This parameter is supported only on adapters with copper connections.) 222(This parameter is supported only on adapters with copper connections.)
@@ -280,7 +228,6 @@ Speed forces the line speed to the specified value in megabits per second
280partner is set to auto-negotiate, the board will auto-detect the correct 228partner is set to auto-negotiate, the board will auto-detect the correct
281speed. Duplex should also be set when Speed is set to either 10 or 100. 229speed. Duplex should also be set when Speed is set to either 10 or 100.
282 230
283
284TxDescriptors 231TxDescriptors
285------------- 232-------------
286Valid Range: 80-256 for 82542 and 82543-based adapters 233Valid Range: 80-256 for 82542 and 82543-based adapters
@@ -295,6 +242,36 @@ NOTE: Depending on the available system resources, the request for a
295 higher number of transmit descriptors may be denied. In this case, 242 higher number of transmit descriptors may be denied. In this case,
296 use a lower number. 243 use a lower number.
297 244
245TxDescriptorStep
246----------------
247Valid Range: 1 (use every Tx Descriptor)
248 4 (use every 4th Tx Descriptor)
249
250Default Value: 1 (use every Tx Descriptor)
251
252On certain non-Intel architectures, it has been observed that intense TX
253traffic bursts of short packets may result in an improper descriptor
254writeback. If this occurs, the driver will report a "TX Timeout" and reset
255the adapter, after which the transmit flow will restart, though data may
256have stalled for as much as 10 seconds before it resumes.
257
258The improper writeback does not occur on the first descriptor in a system
259memory cache-line, which is typically 32 bytes, or 4 descriptors long.
260
261Setting TxDescriptorStep to a value of 4 will ensure that all TX descriptors
262are aligned to the start of a system memory cache line, and so this problem
263will not occur.
264
265NOTES: Setting TxDescriptorStep to 4 effectively reduces the number of
266 TxDescriptors available for transmits to 1/4 of the normal allocation.
267 This has a possible negative performance impact, which may be
268 compensated for by allocating more descriptors using the TxDescriptors
269 module parameter.
270
271 There are other conditions which may result in "TX Timeout", which will
272 not be resolved by the use of the TxDescriptorStep parameter. As the
273 issue addressed by this parameter has never been observed on Intel
274 Architecture platforms, it should not be used on Intel platforms.
298 275
299TxIntDelay 276TxIntDelay
300---------- 277----------
@@ -307,7 +284,6 @@ efficiency if properly tuned for specific network traffic. If the
307system is reporting dropped transmits, this value may be set too high 284system is reporting dropped transmits, this value may be set too high
308causing the driver to run out of available transmit descriptors. 285causing the driver to run out of available transmit descriptors.
309 286
310
311TxAbsIntDelay 287TxAbsIntDelay
312------------- 288-------------
313(This parameter is supported only on 82540, 82545 and later adapters.) 289(This parameter is supported only on 82540, 82545 and later adapters.)
@@ -330,6 +306,35 @@ Default Value: 1
330A value of '1' indicates that the driver should enable IP checksum 306A value of '1' indicates that the driver should enable IP checksum
331offload for received packets (both UDP and TCP) to the adapter hardware. 307offload for received packets (both UDP and TCP) to the adapter hardware.
332 308
309Copybreak
310---------
311Valid Range: 0-xxxxxxx (0=off)
312Default Value: 256
313Usage: insmod e1000.ko copybreak=128
314
315Driver copies all packets below or equaling this size to a fresh Rx
316buffer before handing it up the stack.
317
318This parameter is different than other parameters, in that it is a
319single (not 1,1,1 etc.) parameter applied to all driver instances and
320it is also available during runtime at
321/sys/module/e1000/parameters/copybreak
322
323SmartPowerDownEnable
324--------------------
325Valid Range: 0-1
326Default Value: 0 (disabled)
327
328Allows PHY to turn off in lower power states. The user can turn off
329this parameter in supported chipsets.
330
331KumeranLockLoss
332---------------
333Valid Range: 0-1
334Default Value: 1 (enabled)
335
336This workaround skips resetting the PHY at shutdown for the initial
337silicon releases of ICH8 systems.
333 338
334Speed and Duplex Configuration 339Speed and Duplex Configuration
335============================== 340==============================
@@ -385,40 +390,9 @@ If the link partner is forced to a specific speed and duplex, then this
385parameter should not be used. Instead, use the Speed and Duplex parameters 390parameter should not be used. Instead, use the Speed and Duplex parameters
386previously mentioned to force the adapter to the same speed and duplex. 391previously mentioned to force the adapter to the same speed and duplex.
387 392
388
389Additional Configurations 393Additional Configurations
390========================= 394=========================
391 395
392 Configuring the Driver on Different Distributions
393 -------------------------------------------------
394 Configuring a network driver to load properly when the system is started
395 is distribution dependent. Typically, the configuration process involves
396 adding an alias line to /etc/modules.conf or /etc/modprobe.conf as well
397 as editing other system startup scripts and/or configuration files. Many
398 popular Linux distributions ship with tools to make these changes for you.
399 To learn the proper way to configure a network device for your system,
400 refer to your distribution documentation. If during this process you are
401 asked for the driver or module name, the name for the Linux Base Driver
402 for the Intel(R) PRO/1000 Family of Adapters is e1000.
403
404 As an example, if you install the e1000 driver for two PRO/1000 adapters
405 (eth0 and eth1) and set the speed and duplex to 10full and 100half, add
406 the following to modules.conf or or modprobe.conf:
407
408 alias eth0 e1000
409 alias eth1 e1000
410 options e1000 Speed=10,100 Duplex=2,1
411
412 Viewing Link Messages
413 ---------------------
414 Link messages will not be displayed to the console if the distribution is
415 restricting system messages. In order to see network driver link messages
416 on your console, set dmesg to eight by entering the following:
417
418 dmesg -n 8
419
420 NOTE: This setting is not saved across reboots.
421
422 Jumbo Frames 396 Jumbo Frames
423 ------------ 397 ------------
424 Jumbo Frames support is enabled by changing the MTU to a value larger than 398 Jumbo Frames support is enabled by changing the MTU to a value larger than
@@ -437,9 +411,11 @@ Additional Configurations
437 setting in a different location. 411 setting in a different location.
438 412
439 Notes: 413 Notes:
440 414 Degradation in throughput performance may be observed in some Jumbo frames
441 - To enable Jumbo Frames, increase the MTU size on the interface beyond 415 environments. If this is observed, increasing the application's socket buffer
442 1500. 416 size and/or increasing the /proc/sys/net/ipv4/tcp_*mem entry values may help.
417 See the specific application manual and /usr/src/linux*/Documentation/
418 networking/ip-sysctl.txt for more details.
443 419
444 - The maximum MTU setting for Jumbo Frames is 16110. This value coincides 420 - The maximum MTU setting for Jumbo Frames is 16110. This value coincides
445 with the maximum Jumbo Frames size of 16128. 421 with the maximum Jumbo Frames size of 16128.
@@ -447,40 +423,11 @@ Additional Configurations
447 - Using Jumbo Frames at 10 or 100 Mbps may result in poor performance or 423 - Using Jumbo Frames at 10 or 100 Mbps may result in poor performance or
448 loss of link. 424 loss of link.
449 425
450 - Some Intel gigabit adapters that support Jumbo Frames have a frame size
451 limit of 9238 bytes, with a corresponding MTU size limit of 9216 bytes.
452 The adapters with this limitation are based on the Intel(R) 82571EB,
453 82572EI, 82573L and 80003ES2LAN controller. These correspond to the
454 following product names:
455 Intel(R) PRO/1000 PT Server Adapter
456 Intel(R) PRO/1000 PT Desktop Adapter
457 Intel(R) PRO/1000 PT Network Connection
458 Intel(R) PRO/1000 PT Dual Port Server Adapter
459 Intel(R) PRO/1000 PT Dual Port Network Connection
460 Intel(R) PRO/1000 PF Server Adapter
461 Intel(R) PRO/1000 PF Network Connection
462 Intel(R) PRO/1000 PF Dual Port Server Adapter
463 Intel(R) PRO/1000 PB Server Connection
464 Intel(R) PRO/1000 PL Network Connection
465 Intel(R) PRO/1000 EB Network Connection with I/O Acceleration
466 Intel(R) PRO/1000 EB Backplane Connection with I/O Acceleration
467 Intel(R) PRO/1000 PT Quad Port Server Adapter
468
469 - Adapters based on the Intel(R) 82542 and 82573V/E controller do not 426 - Adapters based on the Intel(R) 82542 and 82573V/E controller do not
470 support Jumbo Frames. These correspond to the following product names: 427 support Jumbo Frames. These correspond to the following product names:
471 Intel(R) PRO/1000 Gigabit Server Adapter 428 Intel(R) PRO/1000 Gigabit Server Adapter
472 Intel(R) PRO/1000 PM Network Connection 429 Intel(R) PRO/1000 PM Network Connection
473 430
474 - The following adapters do not support Jumbo Frames:
475 Intel(R) 82562V 10/100 Network Connection
476 Intel(R) 82566DM Gigabit Network Connection
477 Intel(R) 82566DC Gigabit Network Connection
478 Intel(R) 82566MM Gigabit Network Connection
479 Intel(R) 82566MC Gigabit Network Connection
480 Intel(R) 82562GT 10/100 Network Connection
481 Intel(R) 82562G 10/100 Network Connection
482
483
484 Ethtool 431 Ethtool
485 ------- 432 -------
486 The driver utilizes the ethtool interface for driver configuration and 433 The driver utilizes the ethtool interface for driver configuration and
@@ -490,142 +437,14 @@ Additional Configurations
490 The latest release of ethtool can be found from 437 The latest release of ethtool can be found from
491 http://sourceforge.net/projects/gkernel. 438 http://sourceforge.net/projects/gkernel.
492 439
493 NOTE: Ethtool 1.6 only supports a limited set of ethtool options. Support
494 for a more complete ethtool feature set can be enabled by upgrading
495 ethtool to ethtool-1.8.1.
496
497 Enabling Wake on LAN* (WoL) 440 Enabling Wake on LAN* (WoL)
498 --------------------------- 441 ---------------------------
499 WoL is configured through the Ethtool* utility. Ethtool is included with 442 WoL is configured through the Ethtool* utility.
500 all versions of Red Hat after Red Hat 7.2. For other Linux distributions,
501 download and install Ethtool from the following website:
502 http://sourceforge.net/projects/gkernel.
503
504 For instructions on enabling WoL with Ethtool, refer to the website listed
505 above.
506 443
507 WoL will be enabled on the system during the next shut down or reboot. 444 WoL will be enabled on the system during the next shut down or reboot.
508 For this driver version, in order to enable WoL, the e1000 driver must be 445 For this driver version, in order to enable WoL, the e1000 driver must be
509 loaded when shutting down or rebooting the system. 446 loaded when shutting down or rebooting the system.
510 447
511 Wake On LAN is only supported on port A for the following devices:
512 Intel(R) PRO/1000 PT Dual Port Network Connection
513 Intel(R) PRO/1000 PT Dual Port Server Connection
514 Intel(R) PRO/1000 PT Dual Port Server Adapter
515 Intel(R) PRO/1000 PF Dual Port Server Adapter
516 Intel(R) PRO/1000 PT Quad Port Server Adapter
517
518 NAPI
519 ----
520 NAPI (Rx polling mode) is enabled in the e1000 driver.
521
522 See www.cyberus.ca/~hadi/usenix-paper.tgz for more information on NAPI.
523
524
525Known Issues
526============
527
528Dropped Receive Packets on Half-duplex 10/100 Networks
529------------------------------------------------------
530If you have an Intel PCI Express adapter running at 10mbps or 100mbps, half-
531duplex, you may observe occasional dropped receive packets. There are no
532workarounds for this problem in this network configuration. The network must
533be updated to operate in full-duplex, and/or 1000mbps only.
534
535Jumbo Frames System Requirement
536-------------------------------
537Memory allocation failures have been observed on Linux systems with 64 MB
538of RAM or less that are running Jumbo Frames. If you are using Jumbo
539Frames, your system may require more than the advertised minimum
540requirement of 64 MB of system memory.
541
542Performance Degradation with Jumbo Frames
543-----------------------------------------
544Degradation in throughput performance may be observed in some Jumbo frames
545environments. If this is observed, increasing the application's socket
546buffer size and/or increasing the /proc/sys/net/ipv4/tcp_*mem entry values
547may help. See the specific application manual and
548/usr/src/linux*/Documentation/
549networking/ip-sysctl.txt for more details.
550
551Jumbo Frames on Foundry BigIron 8000 switch
552-------------------------------------------
553There is a known issue using Jumbo frames when connected to a Foundry
554BigIron 8000 switch. This is a 3rd party limitation. If you experience
555loss of packets, lower the MTU size.
556
557Allocating Rx Buffers when Using Jumbo Frames
558---------------------------------------------
559Allocating Rx buffers when using Jumbo Frames on 2.6.x kernels may fail if
560the available memory is heavily fragmented. This issue may be seen with PCI-X
561adapters or with packet split disabled. This can be reduced or eliminated
562by changing the amount of available memory for receive buffer allocation, by
563increasing /proc/sys/vm/min_free_kbytes.
564
565Multiple Interfaces on Same Ethernet Broadcast Network
566------------------------------------------------------
567Due to the default ARP behavior on Linux, it is not possible to have
568one system on two IP networks in the same Ethernet broadcast domain
569(non-partitioned switch) behave as expected. All Ethernet interfaces
570will respond to IP traffic for any IP address assigned to the system.
571This results in unbalanced receive traffic.
572
573If you have multiple interfaces in a server, either turn on ARP
574filtering by entering:
575
576 echo 1 > /proc/sys/net/ipv4/conf/all/arp_filter
577(this only works if your kernel's version is higher than 2.4.5),
578
579NOTE: This setting is not saved across reboots. The configuration
580change can be made permanent by adding the line:
581 net.ipv4.conf.all.arp_filter = 1
582to the file /etc/sysctl.conf
583
584 or,
585
586install the interfaces in separate broadcast domains (either in
587different switches or in a switch partitioned to VLANs).
588
58982541/82547 can't link or are slow to link with some link partners
590-----------------------------------------------------------------
591There is a known compatibility issue with 82541/82547 and some
592low-end switches where the link will not be established, or will
593be slow to establish. In particular, these switches are known to
594be incompatible with 82541/82547:
595
596 Planex FXG-08TE
597 I-O Data ETG-SH8
598
599To workaround this issue, the driver can be compiled with an override
600of the PHY's master/slave setting. Forcing master or forcing slave
601mode will improve time-to-link.
602
603 # make CFLAGS_EXTRA=-DE1000_MASTER_SLAVE=<n>
604
605Where <n> is:
606
607 0 = Hardware default
608 1 = Master mode
609 2 = Slave mode
610 3 = Auto master/slave
611
612Disable rx flow control with ethtool
613------------------------------------
614In order to disable receive flow control using ethtool, you must turn
615off auto-negotiation on the same command line.
616
617For example:
618
619 ethtool -A eth? autoneg off rx off
620
621Unplugging network cable while ethtool -p is running
622----------------------------------------------------
623In kernel versions 2.5.50 and later (including 2.6 kernel), unplugging
624the network cable while ethtool -p is running will cause the system to
625become unresponsive to keyboard commands, except for control-alt-delete.
626Restarting the system appears to be the only remedy.
627
628
629Support 448Support
630======= 449=======
631 450
diff --git a/Documentation/networking/e1000e.txt b/Documentation/networking/e1000e.txt
new file mode 100644
index 000000000000..6aa048badf32
--- /dev/null
+++ b/Documentation/networking/e1000e.txt
@@ -0,0 +1,302 @@
1Linux* Driver for Intel(R) Network Connection
2===============================================================
3
4Intel Gigabit Linux driver.
5Copyright(c) 1999 - 2010 Intel Corporation.
6
7Contents
8========
9
10- Identifying Your Adapter
11- Command Line Parameters
12- Additional Configurations
13- Support
14
15Identifying Your Adapter
16========================
17
18The e1000e driver supports all PCI Express Intel(R) Gigabit Network
19Connections, except those that are 82575, 82576 and 82580-based*.
20
21* NOTE: The Intel(R) PRO/1000 P Dual Port Server Adapter is supported by
22 the e1000 driver, not the e1000e driver due to the 82546 part being used
23 behind a PCI Express bridge.
24
25For more information on how to identify your adapter, go to the Adapter &
26Driver ID Guide at:
27
28 http://support.intel.com/support/go/network/adapter/idguide.htm
29
30For the latest Intel network drivers for Linux, refer to the following
31website. In the search field, enter your adapter name or type, or use the
32networking link on the left to search for your adapter:
33
34 http://support.intel.com/support/go/network/adapter/home.htm
35
36Command Line Parameters
37=======================
38
39The default value for each parameter is generally the recommended setting,
40unless otherwise noted.
41
42NOTES: For more information about the InterruptThrottleRate,
43 RxIntDelay, TxIntDelay, RxAbsIntDelay, and TxAbsIntDelay
44 parameters, see the application note at:
45 http://www.intel.com/design/network/applnots/ap450.htm
46
47InterruptThrottleRate
48---------------------
49Valid Range: 0,1,3,4,100-100000 (0=off, 1=dynamic, 3=dynamic conservative,
50 4=simplified balancing)
51Default Value: 3
52
53The driver can limit the amount of interrupts per second that the adapter
54will generate for incoming packets. It does this by writing a value to the
55adapter that is based on the maximum amount of interrupts that the adapter
56will generate per second.
57
58Setting InterruptThrottleRate to a value greater or equal to 100
59will program the adapter to send out a maximum of that many interrupts
60per second, even if more packets have come in. This reduces interrupt
61load on the system and can lower CPU utilization under heavy load,
62but will increase latency as packets are not processed as quickly.
63
64The driver has two adaptive modes (setting 1 or 3) in which
65it dynamically adjusts the InterruptThrottleRate value based on the traffic
66that it receives. After determining the type of incoming traffic in the last
67timeframe, it will adjust the InterruptThrottleRate to an appropriate value
68for that traffic.
69
70The algorithm classifies the incoming traffic every interval into
71classes. Once the class is determined, the InterruptThrottleRate value is
72adjusted to suit that traffic type the best. There are three classes defined:
73"Bulk traffic", for large amounts of packets of normal size; "Low latency",
74for small amounts of traffic and/or a significant percentage of small
75packets; and "Lowest latency", for almost completely small packets or
76minimal traffic.
77
78In dynamic conservative mode, the InterruptThrottleRate value is set to 4000
79for traffic that falls in class "Bulk traffic". If traffic falls in the "Low
80latency" or "Lowest latency" class, the InterruptThrottleRate is increased
81stepwise to 20000. This default mode is suitable for most applications.
82
83For situations where low latency is vital such as cluster or
84grid computing, the algorithm can reduce latency even more when
85InterruptThrottleRate is set to mode 1. In this mode, which operates
86the same as mode 3, the InterruptThrottleRate will be increased stepwise to
8770000 for traffic in class "Lowest latency".
88
89In simplified mode the interrupt rate is based on the ratio of Tx and
90Rx traffic. If the bytes per second rate is approximately equal the
91interrupt rate will drop as low as 2000 interrupts per second. If the
92traffic is mostly transmit or mostly receive, the interrupt rate could
93be as high as 8000.
94
95Setting InterruptThrottleRate to 0 turns off any interrupt moderation
96and may improve small packet latency, but is generally not suitable
97for bulk throughput traffic.
98
99NOTE: InterruptThrottleRate takes precedence over the TxAbsIntDelay and
100 RxAbsIntDelay parameters. In other words, minimizing the receive
101 and/or transmit absolute delays does not force the controller to
102 generate more interrupts than what the Interrupt Throttle Rate
103 allows.
104
105NOTE: When e1000e is loaded with default settings and multiple adapters
106 are in use simultaneously, the CPU utilization may increase non-
107 linearly. In order to limit the CPU utilization without impacting
108 the overall throughput, we recommend that you load the driver as
109 follows:
110
111 modprobe e1000e InterruptThrottleRate=3000,3000,3000
112
113 This sets the InterruptThrottleRate to 3000 interrupts/sec for
114 the first, second, and third instances of the driver. The range
115 of 2000 to 3000 interrupts per second works on a majority of
116 systems and is a good starting point, but the optimal value will
117 be platform-specific. If CPU utilization is not a concern, use
118 RX_POLLING (NAPI) and default driver settings.
119
120RxIntDelay
121----------
122Valid Range: 0-65535 (0=off)
123Default Value: 0
124
125This value delays the generation of receive interrupts in units of 1.024
126microseconds. Receive interrupt reduction can improve CPU efficiency if
127properly tuned for specific network traffic. Increasing this value adds
128extra latency to frame reception and can end up decreasing the throughput
129of TCP traffic. If the system is reporting dropped receives, this value
130may be set too high, causing the driver to run out of available receive
131descriptors.
132
133CAUTION: When setting RxIntDelay to a value other than 0, adapters may
134 hang (stop transmitting) under certain network conditions. If
135 this occurs a NETDEV WATCHDOG message is logged in the system
136 event log. In addition, the controller is automatically reset,
137 restoring the network connection. To eliminate the potential
138 for the hang ensure that RxIntDelay is set to 0.
139
140RxAbsIntDelay
141-------------
142Valid Range: 0-65535 (0=off)
143Default Value: 8
144
145This value, in units of 1.024 microseconds, limits the delay in which a
146receive interrupt is generated. Useful only if RxIntDelay is non-zero,
147this value ensures that an interrupt is generated after the initial
148packet is received within the set amount of time. Proper tuning,
149along with RxIntDelay, may improve traffic throughput in specific network
150conditions.
151
152TxIntDelay
153----------
154Valid Range: 0-65535 (0=off)
155Default Value: 8
156
157This value delays the generation of transmit interrupts in units of
1581.024 microseconds. Transmit interrupt reduction can improve CPU
159efficiency if properly tuned for specific network traffic. If the
160system is reporting dropped transmits, this value may be set too high
161causing the driver to run out of available transmit descriptors.
162
163TxAbsIntDelay
164-------------
165Valid Range: 0-65535 (0=off)
166Default Value: 32
167
168This value, in units of 1.024 microseconds, limits the delay in which a
169transmit interrupt is generated. Useful only if TxIntDelay is non-zero,
170this value ensures that an interrupt is generated after the initial
171packet is sent on the wire within the set amount of time. Proper tuning,
172along with TxIntDelay, may improve traffic throughput in specific
173network conditions.
174
175Copybreak
176---------
177Valid Range: 0-xxxxxxx (0=off)
178Default Value: 256
179
180Driver copies all packets below or equaling this size to a fresh Rx
181buffer before handing it up the stack.
182
183This parameter is different than other parameters, in that it is a
184single (not 1,1,1 etc.) parameter applied to all driver instances and
185it is also available during runtime at
186/sys/module/e1000e/parameters/copybreak
187
188SmartPowerDownEnable
189--------------------
190Valid Range: 0-1
191Default Value: 0 (disabled)
192
193Allows PHY to turn off in lower power states. The user can set this parameter
194in supported chipsets.
195
196KumeranLockLoss
197---------------
198Valid Range: 0-1
199Default Value: 1 (enabled)
200
201This workaround skips resetting the PHY at shutdown for the initial
202silicon releases of ICH8 systems.
203
204IntMode
205-------
206Valid Range: 0-2 (0=legacy, 1=MSI, 2=MSI-X)
207Default Value: 2
208
209Allows changing the interrupt mode at module load time, without requiring a
210recompile. If the driver load fails to enable a specific interrupt mode, the
211driver will try other interrupt modes, from least to most compatible. The
212interrupt order is MSI-X, MSI, Legacy. If specifying MSI (IntMode=1)
213interrupts, only MSI and Legacy will be attempted.
214
215CrcStripping
216------------
217Valid Range: 0-1
218Default Value: 1 (enabled)
219
220Strip the CRC from received packets before sending up the network stack. If
221you have a machine with a BMC enabled but cannot receive IPMI traffic after
222loading or enabling the driver, try disabling this feature.
223
224WriteProtectNVM
225---------------
226Valid Range: 0-1
227Default Value: 1 (enabled)
228
229Set the hardware to ignore all write/erase cycles to the GbE region in the
230ICHx NVM (non-volatile memory). This feature can be disabled by the
231WriteProtectNVM module parameter (enabled by default) only after a hardware
232reset, but the machine must be power cycled before trying to enable writes.
233
234Note: the kernel boot option iomem=relaxed may need to be set if the kernel
235config option CONFIG_STRICT_DEVMEM=y, if the root user wants to write the
236NVM from user space via ethtool.
237
238Additional Configurations
239=========================
240
241 Jumbo Frames
242 ------------
243 Jumbo Frames support is enabled by changing the MTU to a value larger than
244 the default of 1500. Use the ifconfig command to increase the MTU size.
245 For example:
246
247 ifconfig eth<x> mtu 9000 up
248
249 This setting is not saved across reboots.
250
251 Notes:
252
253 - The maximum MTU setting for Jumbo Frames is 9216. This value coincides
254 with the maximum Jumbo Frames size of 9234 bytes.
255
256 - Using Jumbo Frames at 10 or 100 Mbps is not supported and may result in
257 poor performance or loss of link.
258
259 - Some adapters limit Jumbo Frames sized packets to a maximum of
260 4096 bytes and some adapters do not support Jumbo Frames.
261
262
263 Ethtool
264 -------
265 The driver utilizes the ethtool interface for driver configuration and
266 diagnostics, as well as displaying statistical information. We
267 strongly recommend downloading the latest version of Ethtool at:
268
269 http://sourceforge.net/projects/gkernel.
270
271 Speed and Duplex
272 ----------------
273 Speed and Duplex are configured through the Ethtool* utility. For
274 instructions, refer to the Ethtool man page.
275
276 Enabling Wake on LAN* (WoL)
277 ---------------------------
278 WoL is configured through the Ethtool* utility. For instructions on
279 enabling WoL with Ethtool, refer to the Ethtool man page.
280
281 WoL will be enabled on the system during the next shut down or reboot.
282 For this driver version, in order to enable WoL, the e1000e driver must be
283 loaded when shutting down or rebooting the system.
284
285 In most cases Wake On LAN is only supported on port A for multiple port
286 adapters. To verify if a port supports Wake on LAN run ethtool eth<X>.
287
288
289Support
290=======
291
292For general information, go to the Intel support website at:
293
294 www.intel.com/support/
295
296or the Intel Wired Networking project hosted by Sourceforge at:
297
298 http://sourceforge.net/projects/e1000
299
300If an issue is identified with the released source code on the supported
301kernel with a supported adapter, email the specific information related
302to the issue to e1000-devel@lists.sf.net
diff --git a/Documentation/networking/fore200e.txt b/Documentation/networking/fore200e.txt
index b1f337f0f4ca..6e0d2a9613ec 100644
--- a/Documentation/networking/fore200e.txt
+++ b/Documentation/networking/fore200e.txt
@@ -39,7 +39,7 @@ version. Alternative binary firmware images can be found somewhere on the
39ForeThought CD-ROM supplied with your adapter by FORE Systems. 39ForeThought CD-ROM supplied with your adapter by FORE Systems.
40 40
41You can also get the latest firmware images from FORE Systems at 41You can also get the latest firmware images from FORE Systems at
42http://www.fore.com. Register TACTics Online and go to 42http://en.wikipedia.org/wiki/FORE_Systems. Register TACTics Online and go to
43the 'software updates' pages. The firmware binaries are part of 43the 'software updates' pages. The firmware binaries are part of
44the various ForeThought software distributions. 44the various ForeThought software distributions.
45 45
diff --git a/Documentation/networking/igb.txt b/Documentation/networking/igb.txt
new file mode 100644
index 000000000000..ab2d71831892
--- /dev/null
+++ b/Documentation/networking/igb.txt
@@ -0,0 +1,132 @@
1Linux* Base Driver for Intel(R) Network Connection
2==================================================
3
4Intel Gigabit Linux driver.
5Copyright(c) 1999 - 2010 Intel Corporation.
6
7Contents
8========
9
10- Identifying Your Adapter
11- Additional Configurations
12- Support
13
14Identifying Your Adapter
15========================
16
17This driver supports all 82575, 82576 and 82580-based Intel (R) gigabit network
18connections.
19
20For specific information on how to identify your adapter, go to the Adapter &
21Driver ID Guide at:
22
23 http://support.intel.com/support/go/network/adapter/idguide.htm
24
25Command Line Parameters
26=======================
27
28The default value for each parameter is generally the recommended setting,
29unless otherwise noted.
30
31max_vfs
32-------
33Valid Range: 0-7
34Default Value: 0
35
36This parameter adds support for SR-IOV. It causes the driver to spawn up to
37max_vfs worth of virtual function.
38
39Additional Configurations
40=========================
41
42 Jumbo Frames
43 ------------
44 Jumbo Frames support is enabled by changing the MTU to a value larger than
45 the default of 1500. Use the ifconfig command to increase the MTU size.
46 For example:
47
48 ifconfig eth<x> mtu 9000 up
49
50 This setting is not saved across reboots.
51
52 Notes:
53
54 - The maximum MTU setting for Jumbo Frames is 9216. This value coincides
55 with the maximum Jumbo Frames size of 9234 bytes.
56
57 - Using Jumbo Frames at 10 or 100 Mbps may result in poor performance or
58 loss of link.
59
60 Ethtool
61 -------
62 The driver utilizes the ethtool interface for driver configuration and
63 diagnostics, as well as displaying statistical information.
64
65 http://sourceforge.net/projects/gkernel.
66
67 Enabling Wake on LAN* (WoL)
68 ---------------------------
69 WoL is configured through the Ethtool* utility.
70
71 For instructions on enabling WoL with Ethtool, refer to the Ethtool man page.
72
73 WoL will be enabled on the system during the next shut down or reboot.
74 For this driver version, in order to enable WoL, the igb driver must be
75 loaded when shutting down or rebooting the system.
76
77 Wake On LAN is only supported on port A of multi-port adapters.
78
79 Wake On LAN is not supported for the Intel(R) Gigabit VT Quad Port Server
80 Adapter.
81
82 Multiqueue
83 ----------
84 In this mode, a separate MSI-X vector is allocated for each queue and one
85 for "other" interrupts such as link status change and errors. All
86 interrupts are throttled via interrupt moderation. Interrupt moderation
87 must be used to avoid interrupt storms while the driver is processing one
88 interrupt. The moderation value should be at least as large as the expected
89 time for the driver to process an interrupt. Multiqueue is off by default.
90
91 REQUIREMENTS: MSI-X support is required for Multiqueue. If MSI-X is not
92 found, the system will fallback to MSI or to Legacy interrupts.
93
94 LRO
95 ---
96 Large Receive Offload (LRO) is a technique for increasing inbound throughput
97 of high-bandwidth network connections by reducing CPU overhead. It works by
98 aggregating multiple incoming packets from a single stream into a larger
99 buffer before they are passed higher up the networking stack, thus reducing
100 the number of packets that have to be processed. LRO combines multiple
101 Ethernet frames into a single receive in the stack, thereby potentially
102 decreasing CPU utilization for receives.
103
104 NOTE: You need to have inet_lro enabled via either the CONFIG_INET_LRO or
105 CONFIG_INET_LRO_MODULE kernel config option. Additionally, if
106 CONFIG_INET_LRO_MODULE is used, the inet_lro module needs to be loaded
107 before the igb driver.
108
109 You can verify that the driver is using LRO by looking at these counters in
110 Ethtool:
111
112 lro_aggregated - count of total packets that were combined
113 lro_flushed - counts the number of packets flushed out of LRO
114 lro_no_desc - counts the number of times an LRO descriptor was not available
115 for the LRO packet
116
117 NOTE: IPv6 and UDP are not supported by LRO.
118
119Support
120=======
121
122For general information, go to the Intel support website at:
123
124 www.intel.com/support/
125
126or the Intel Wired Networking project hosted by Sourceforge at:
127
128 http://sourceforge.net/projects/e1000
129
130If an issue is identified with the released source code on the supported
131kernel with a supported adapter, email the specific information related
132to the issue to e1000-devel@lists.sf.net
diff --git a/Documentation/networking/igbvf.txt b/Documentation/networking/igbvf.txt
new file mode 100644
index 000000000000..056028138d9c
--- /dev/null
+++ b/Documentation/networking/igbvf.txt
@@ -0,0 +1,78 @@
1Linux* Base Driver for Intel(R) Network Connection
2==================================================
3
4Intel Gigabit Linux driver.
5Copyright(c) 1999 - 2010 Intel Corporation.
6
7Contents
8========
9
10- Identifying Your Adapter
11- Additional Configurations
12- Support
13
14This file describes the igbvf Linux* Base Driver for Intel Network Connection.
15
16The igbvf driver supports 82576-based virtual function devices that can only
17be activated on kernels that support SR-IOV. SR-IOV requires the correct
18platform and OS support.
19
20The igbvf driver requires the igb driver, version 2.0 or later. The igbvf
21driver supports virtual functions generated by the igb driver with a max_vfs
22value of 1 or greater. For more information on the max_vfs parameter refer
23to the README included with the igb driver.
24
25The guest OS loading the igbvf driver must support MSI-X interrupts.
26
27This driver is only supported as a loadable module at this time. Intel is
28not supplying patches against the kernel source to allow for static linking
29of the driver. For questions related to hardware requirements, refer to the
30documentation supplied with your Intel Gigabit adapter. All hardware
31requirements listed apply to use with Linux.
32
33Instructions on updating ethtool can be found in the section "Additional
34Configurations" later in this document.
35
36VLANs: There is a limit of a total of 32 shared VLANs to 1 or more VFs.
37
38Identifying Your Adapter
39========================
40
41The igbvf driver supports 82576-based virtual function devices that can only
42be activated on kernels that support SR-IOV.
43
44For more information on how to identify your adapter, go to the Adapter &
45Driver ID Guide at:
46
47 http://support.intel.com/support/go/network/adapter/idguide.htm
48
49For the latest Intel network drivers for Linux, refer to the following
50website. In the search field, enter your adapter name or type, or use the
51networking link on the left to search for your adapter:
52
53 http://downloadcenter.intel.com/scripts-df-external/Support_Intel.aspx
54
55Additional Configurations
56=========================
57
58 Ethtool
59 -------
60 The driver utilizes the ethtool interface for driver configuration and
61 diagnostics, as well as displaying statistical information.
62
63 http://sourceforge.net/projects/gkernel.
64
65Support
66=======
67
68For general information, go to the Intel support website at:
69
70 http://support.intel.com
71
72or the Intel Wired Networking project hosted by Sourceforge at:
73
74 http://sourceforge.net/projects/e1000
75
76If an issue is identified with the released source code on the supported
77kernel with a supported adapter, email the specific information related
78to the issue to e1000-devel@lists.sf.net
diff --git a/Documentation/networking/ip-sysctl.txt b/Documentation/networking/ip-sysctl.txt
index d0536b5a4e01..c7165f4cb792 100644
--- a/Documentation/networking/ip-sysctl.txt
+++ b/Documentation/networking/ip-sysctl.txt
@@ -903,7 +903,7 @@ arp_ignore - INTEGER
903arp_notify - BOOLEAN 903arp_notify - BOOLEAN
904 Define mode for notification of address and device changes. 904 Define mode for notification of address and device changes.
905 0 - (default): do nothing 905 0 - (default): do nothing
906 1 - Generate gratuitous arp replies when device is brought up 906 1 - Generate gratuitous arp requests when device is brought up
907 or hardware address changes. 907 or hardware address changes.
908 908
909arp_accept - BOOLEAN 909arp_accept - BOOLEAN
@@ -1014,6 +1014,12 @@ conf/interface/*:
1014accept_ra - BOOLEAN 1014accept_ra - BOOLEAN
1015 Accept Router Advertisements; autoconfigure using them. 1015 Accept Router Advertisements; autoconfigure using them.
1016 1016
1017 Possible values are:
1018 0 Do not accept Router Advertisements.
1019 1 Accept Router Advertisements if forwarding is disabled.
1020 2 Overrule forwarding behaviour. Accept Router Advertisements
1021 even if forwarding is enabled.
1022
1017 Functional default: enabled if local forwarding is disabled. 1023 Functional default: enabled if local forwarding is disabled.
1018 disabled if local forwarding is enabled. 1024 disabled if local forwarding is enabled.
1019 1025
@@ -1075,7 +1081,12 @@ forwarding - BOOLEAN
1075 Note: It is recommended to have the same setting on all 1081 Note: It is recommended to have the same setting on all
1076 interfaces; mixed router/host scenarios are rather uncommon. 1082 interfaces; mixed router/host scenarios are rather uncommon.
1077 1083
1078 FALSE: 1084 Possible values are:
1085 0 Forwarding disabled
1086 1 Forwarding enabled
1087 2 Forwarding enabled (Hybrid Mode)
1088
1089 FALSE (0):
1079 1090
1080 By default, Host behaviour is assumed. This means: 1091 By default, Host behaviour is assumed. This means:
1081 1092
@@ -1085,18 +1096,24 @@ forwarding - BOOLEAN
1085 Advertisements (and do autoconfiguration). 1096 Advertisements (and do autoconfiguration).
1086 4. If accept_redirects is TRUE (default), accept Redirects. 1097 4. If accept_redirects is TRUE (default), accept Redirects.
1087 1098
1088 TRUE: 1099 TRUE (1):
1089 1100
1090 If local forwarding is enabled, Router behaviour is assumed. 1101 If local forwarding is enabled, Router behaviour is assumed.
1091 This means exactly the reverse from the above: 1102 This means exactly the reverse from the above:
1092 1103
1093 1. IsRouter flag is set in Neighbour Advertisements. 1104 1. IsRouter flag is set in Neighbour Advertisements.
1094 2. Router Solicitations are not sent. 1105 2. Router Solicitations are not sent.
1095 3. Router Advertisements are ignored. 1106 3. Router Advertisements are ignored unless accept_ra is 2.
1096 4. Redirects are ignored. 1107 4. Redirects are ignored.
1097 1108
1098 Default: FALSE if global forwarding is disabled (default), 1109 TRUE (2):
1099 otherwise TRUE. 1110
1111 Hybrid mode. Same behaviour as TRUE, except for:
1112
1113 2. Router Solicitations are being sent when necessary.
1114
1115 Default: 0 (disabled) if global forwarding is disabled (default),
1116 otherwise 1 (enabled).
1100 1117
1101hop_limit - INTEGER 1118hop_limit - INTEGER
1102 Default Hop Limit to set. 1119 Default Hop Limit to set.
diff --git a/Documentation/networking/ipddp.txt b/Documentation/networking/ipddp.txt
index 661a5558dd8e..ba5c217fffe0 100644
--- a/Documentation/networking/ipddp.txt
+++ b/Documentation/networking/ipddp.txt
@@ -36,11 +36,6 @@ AppleTalk-IP to IP decapsulation.
36Basic instructions for user space tools 36Basic instructions for user space tools
37======================================= 37=======================================
38 38
39To enable AppleTalk-IP decapsulation/encapsulation you will need the
40proper tools. You can get the tools for decapsulation from
41http://spacs1.spacs.k12.wi.us/~jschlst/index.html and for encapsulation
42from http://www.maths.unm.edu/~bradford/ltpc.html
43
44I will briefly describe the operation of the tools, but you will 39I will briefly describe the operation of the tools, but you will
45need to consult the supporting documentation for each set of tools. 40need to consult the supporting documentation for each set of tools.
46 41
diff --git a/Documentation/networking/iphase.txt b/Documentation/networking/iphase.txt
index 55eac4a784e2..670b72f16585 100644
--- a/Documentation/networking/iphase.txt
+++ b/Documentation/networking/iphase.txt
@@ -22,7 +22,7 @@ The features and limitations of this driver are as follows:
22 - All variants of Interphase ATM PCI (i)Chip adapter cards are supported, 22 - All variants of Interphase ATM PCI (i)Chip adapter cards are supported,
23 including x575 (OC3, control memory 128K , 512K and packet memory 128K, 23 including x575 (OC3, control memory 128K , 512K and packet memory 128K,
24 512K and 1M), x525 (UTP25) and x531 (DS3 and E3). See 24 512K and 1M), x525 (UTP25) and x531 (DS3 and E3). See
25 http://www.iphase.com/site/iphase-web/?epi_menuItemID=e196f04b4b3b40502f150882e21046a0 25 http://www.iphase.com/
26 for details. 26 for details.
27 - Only x86 platforms are supported. 27 - Only x86 platforms are supported.
28 - SMP is supported. 28 - SMP is supported.
diff --git a/Documentation/networking/ixgbevf.txt b/Documentation/networking/ixgbevf.txt
index 19015de6725f..21dd5d15b6b4 100755..100644
--- a/Documentation/networking/ixgbevf.txt
+++ b/Documentation/networking/ixgbevf.txt
@@ -1,19 +1,16 @@
1Linux* Base Driver for Intel(R) Network Connection 1Linux* Base Driver for Intel(R) Network Connection
2================================================== 2==================================================
3 3
4November 24, 2009 4Intel Gigabit Linux driver.
5Copyright(c) 1999 - 2010 Intel Corporation.
5 6
6Contents 7Contents
7======== 8========
8 9
9- In This Release
10- Identifying Your Adapter 10- Identifying Your Adapter
11- Known Issues/Troubleshooting 11- Known Issues/Troubleshooting
12- Support 12- Support
13 13
14In This Release
15===============
16
17This file describes the ixgbevf Linux* Base Driver for Intel Network 14This file describes the ixgbevf Linux* Base Driver for Intel Network
18Connection. 15Connection.
19 16
@@ -33,7 +30,7 @@ Identifying Your Adapter
33For more information on how to identify your adapter, go to the Adapter & 30For more information on how to identify your adapter, go to the Adapter &
34Driver ID Guide at: 31Driver ID Guide at:
35 32
36 http://support.intel.com/support/network/sb/CS-008441.htm 33 http://support.intel.com/support/go/network/adapter/idguide.htm
37 34
38Known Issues/Troubleshooting 35Known Issues/Troubleshooting
39============================ 36============================
@@ -57,34 +54,3 @@ or the Intel Wired Networking project hosted by Sourceforge at:
57If an issue is identified with the released source code on the supported 54If an issue is identified with the released source code on the supported
58kernel with a supported adapter, email the specific information related 55kernel with a supported adapter, email the specific information related
59to the issue to e1000-devel@lists.sf.net 56to the issue to e1000-devel@lists.sf.net
60
61License
62=======
63
64Intel 10 Gigabit Linux driver.
65Copyright(c) 1999 - 2009 Intel Corporation.
66
67This program is free software; you can redistribute it and/or modify it
68under the terms and conditions of the GNU General Public License,
69version 2, as published by the Free Software Foundation.
70
71This program is distributed in the hope it will be useful, but WITHOUT
72ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
73FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
74more details.
75
76You should have received a copy of the GNU General Public License along with
77this program; if not, write to the Free Software Foundation, Inc.,
7851 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
79
80The full GNU General Public License is included in this distribution in
81the file called "COPYING".
82
83Trademarks
84==========
85
86Intel, Itanium, and Pentium are trademarks or registered trademarks of
87Intel Corporation or its subsidiaries in the United States and other
88countries.
89
90* Other names and brands may be claimed as the property of others.
diff --git a/Documentation/networking/packet_mmap.txt b/Documentation/networking/packet_mmap.txt
index 98f71a5cef00..073894d1c093 100644
--- a/Documentation/networking/packet_mmap.txt
+++ b/Documentation/networking/packet_mmap.txt
@@ -8,7 +8,7 @@ capture network traffic with utilities like tcpdump or any other that needs
8raw access to network interface. 8raw access to network interface.
9 9
10You can find the latest version of this document at: 10You can find the latest version of this document at:
11 http://pusa.uv.es/~ulisses/packet_mmap/ 11 http://wiki.ipxwarzone.com/index.php5?title=Linux_packet_mmap
12 12
13Howto can be found at: 13Howto can be found at:
14 http://wiki.gnu-log.net (packet_mmap) 14 http://wiki.gnu-log.net (packet_mmap)
@@ -56,7 +56,7 @@ support for PACKET_MMAP, and also probably the libpcap included in your distribu
56 56
57I'm aware of two implementations of PACKET_MMAP in libpcap: 57I'm aware of two implementations of PACKET_MMAP in libpcap:
58 58
59 http://pusa.uv.es/~ulisses/packet_mmap/ (by Simon Patarin, based on libpcap 0.6.2) 59 http://wiki.ipxwarzone.com/ (by Simon Patarin, based on libpcap 0.6.2)
60 http://public.lanl.gov/cpw/ (by Phil Wood, based on lastest libpcap) 60 http://public.lanl.gov/cpw/ (by Phil Wood, based on lastest libpcap)
61 61
62The rest of this document is intended for people who want to understand 62The rest of this document is intended for people who want to understand
@@ -493,6 +493,32 @@ The user can also use poll() to check if a buffer is available:
493 pfd.events = POLLOUT; 493 pfd.events = POLLOUT;
494 retval = poll(&pfd, 1, timeout); 494 retval = poll(&pfd, 1, timeout);
495 495
496-------------------------------------------------------------------------------
497+ PACKET_TIMESTAMP
498-------------------------------------------------------------------------------
499
500The PACKET_TIMESTAMP setting determines the source of the timestamp in
501the packet meta information. If your NIC is capable of timestamping
502packets in hardware, you can request those hardware timestamps to used.
503Note: you may need to enable the generation of hardware timestamps with
504SIOCSHWTSTAMP.
505
506PACKET_TIMESTAMP accepts the same integer bit field as
507SO_TIMESTAMPING. However, only the SOF_TIMESTAMPING_SYS_HARDWARE
508and SOF_TIMESTAMPING_RAW_HARDWARE values are recognized by
509PACKET_TIMESTAMP. SOF_TIMESTAMPING_SYS_HARDWARE takes precedence over
510SOF_TIMESTAMPING_RAW_HARDWARE if both bits are set.
511
512 int req = 0;
513 req |= SOF_TIMESTAMPING_SYS_HARDWARE;
514 setsockopt(fd, SOL_PACKET, PACKET_TIMESTAMP, (void *) &req, sizeof(req))
515
516If PACKET_TIMESTAMP is not set, a software timestamp generated inside
517the networking stack is used (the behavior before this setting was added).
518
519See include/linux/net_tstamp.h and Documentation/networking/timestamping
520for more information on hardware timestamps.
521
496-------------------------------------------------------------------------------- 522--------------------------------------------------------------------------------
497+ THANKS 523+ THANKS
498-------------------------------------------------------------------------------- 524--------------------------------------------------------------------------------
diff --git a/Documentation/networking/phonet.txt b/Documentation/networking/phonet.txt
index 6e8ce09f9c73..24ad2adba6e5 100644
--- a/Documentation/networking/phonet.txt
+++ b/Documentation/networking/phonet.txt
@@ -112,6 +112,22 @@ However, connect() and getpeername() are not supported, as they did
112not seem useful with Phonet usages (could be added easily). 112not seem useful with Phonet usages (could be added easily).
113 113
114 114
115Resource subscription
116---------------------
117
118A Phonet datagram socket can be subscribed to any number of 8-bits
119Phonet resources, as follow:
120
121 uint32_t res = 0xXX;
122 ioctl(fd, SIOCPNADDRESOURCE, &res);
123
124Subscription is similarly cancelled using the SIOCPNDELRESOURCE I/O
125control request, or when the socket is closed.
126
127Note that no more than one socket can be subcribed to any given
128resource at a time. If not, ioctl() will return EBUSY.
129
130
115Phonet Pipe protocol 131Phonet Pipe protocol
116-------------------- 132--------------------
117 133
@@ -166,6 +182,46 @@ The pipe protocol provides two socket options at the SOL_PNPIPE level:
166 or zero if encapsulation is off. 182 or zero if encapsulation is off.
167 183
168 184
185Phonet Pipe-controller Implementation
186-------------------------------------
187
188Phonet Pipe-controller is enabled by selecting the CONFIG_PHONET_PIPECTRLR Kconfig
189option. It is useful when communicating with those Nokia Modems which do not
190implement Pipe controller in them e.g. Nokia Slim Modem used in ST-Ericsson
191U8500 platform.
192
193The implementation is based on the Data Connection Establishment Sequence
194depicted in 'Nokia Wireless Modem API - Wireless_modem_user_guide.pdf'
195document.
196
197It allows a phonet sequenced socket (host-pep) to initiate a Pipe connection
198between itself and a remote pipe-end point (e.g. modem).
199
200The implementation adds socket options at SOL_PNPIPE level:
201
202 PNPIPE_PIPE_HANDLE
203 It accepts an integer argument for setting value of pipe handle.
204
205 PNPIPE_ENABLE accepts one integer value (int). If set to zero, the pipe
206 is disabled. If the value is non-zero, the pipe is enabled. If the pipe
207 is not (yet) connected, ENOTCONN is error is returned.
208
209The implementation also adds socket 'connect'. On calling the 'connect', pipe
210will be created between the source socket and the destination, and the pipe
211state will be set to PIPE_DISABLED.
212
213After a pipe has been created and enabled successfully, the Pipe data can be
214exchanged between the host-pep and remote-pep (modem).
215
216User-space would typically follow below sequence with Pipe controller:-
217-socket
218-bind
219-setsockopt for PNPIPE_PIPE_HANDLE
220-connect
221-setsockopt for PNPIPE_ENCAP_IP
222-setsockopt for PNPIPE_ENABLE
223
224
169Authors 225Authors
170------- 226-------
171 227
diff --git a/Documentation/networking/phy.txt b/Documentation/networking/phy.txt
index 88bb71b46da4..9eb1ba52013d 100644
--- a/Documentation/networking/phy.txt
+++ b/Documentation/networking/phy.txt
@@ -177,18 +177,6 @@ Doing it all yourself
177 177
178 A convenience function to print out the PHY status neatly. 178 A convenience function to print out the PHY status neatly.
179 179
180 int phy_clear_interrupt(struct phy_device *phydev);
181 int phy_config_interrupt(struct phy_device *phydev, u32 interrupts);
182
183 Clear the PHY's interrupt, and configure which ones are allowed,
184 respectively. Currently only supports all on, or all off.
185
186 int phy_enable_interrupts(struct phy_device *phydev);
187 int phy_disable_interrupts(struct phy_device *phydev);
188
189 Functions which enable/disable PHY interrupts, clearing them
190 before and after, respectively.
191
192 int phy_start_interrupts(struct phy_device *phydev); 180 int phy_start_interrupts(struct phy_device *phydev);
193 int phy_stop_interrupts(struct phy_device *phydev); 181 int phy_stop_interrupts(struct phy_device *phydev);
194 182
@@ -213,12 +201,6 @@ Doing it all yourself
213 Fills the phydev structure with up-to-date information about the current 201 Fills the phydev structure with up-to-date information about the current
214 settings in the PHY. 202 settings in the PHY.
215 203
216 void phy_sanitize_settings(struct phy_device *phydev)
217
218 Resolves differences between currently desired settings, and
219 supported settings for the given PHY device. Does not make
220 the changes in the hardware, though.
221
222 int phy_ethtool_sset(struct phy_device *phydev, struct ethtool_cmd *cmd); 204 int phy_ethtool_sset(struct phy_device *phydev, struct ethtool_cmd *cmd);
223 int phy_ethtool_gset(struct phy_device *phydev, struct ethtool_cmd *cmd); 205 int phy_ethtool_gset(struct phy_device *phydev, struct ethtool_cmd *cmd);
224 206
diff --git a/Documentation/networking/pktgen.txt b/Documentation/networking/pktgen.txt
index 61bb645d50e0..75e4fd708ccb 100644
--- a/Documentation/networking/pktgen.txt
+++ b/Documentation/networking/pktgen.txt
@@ -151,6 +151,8 @@ Examples:
151 151
152 pgset stop aborts injection. Also, ^C aborts generator. 152 pgset stop aborts injection. Also, ^C aborts generator.
153 153
154 pgset "rate 300M" set rate to 300 Mb/s
155 pgset "ratep 1000000" set rate to 1Mpps
154 156
155Example scripts 157Example scripts
156=============== 158===============
@@ -241,6 +243,9 @@ src6
241flows 243flows
242flowlen 244flowlen
243 245
246rate
247ratep
248
244References: 249References:
245ftp://robur.slu.se/pub/Linux/net-development/pktgen-testing/ 250ftp://robur.slu.se/pub/Linux/net-development/pktgen-testing/
246ftp://robur.slu.se/pub/Linux/net-development/pktgen-testing/examples/ 251ftp://robur.slu.se/pub/Linux/net-development/pktgen-testing/examples/
diff --git a/Documentation/networking/ray_cs.txt b/Documentation/networking/ray_cs.txt
index 145d27a52395..c0c12307ed9d 100644
--- a/Documentation/networking/ray_cs.txt
+++ b/Documentation/networking/ray_cs.txt
@@ -13,8 +13,8 @@ wireless LAN cards.
13 13
14As of kernel 2.3.18, the ray_cs driver is part of the Linux kernel 14As of kernel 2.3.18, the ray_cs driver is part of the Linux kernel
15source. My web page for the development of ray_cs is at 15source. My web page for the development of ray_cs is at
16http://world.std.com/~corey/raylink.html and I can be emailed at 16http://web.ralinktech.com/ralink/Home/Support/Linux.html
17corey@world.std.com 17and I can be emailed at corey@world.std.com
18 18
19The kernel driver is based on ray_cs-1.62.tgz 19The kernel driver is based on ray_cs-1.62.tgz
20 20
diff --git a/Documentation/networking/s2io.txt b/Documentation/networking/s2io.txt
index c3d6b4d5d014..9d4e0f4df5a8 100644
--- a/Documentation/networking/s2io.txt
+++ b/Documentation/networking/s2io.txt
@@ -133,7 +133,8 @@ bring down CPU utilization.
133** For AMD opteron platforms with 8131 chipset, MMRBC=1 and MOST=1 are 133** For AMD opteron platforms with 8131 chipset, MMRBC=1 and MOST=1 are
134recommended as safe parameters. 134recommended as safe parameters.
135For more information, please review the AMD8131 errata at 135For more information, please review the AMD8131 errata at
136http://www.amd.com/us-en/assets/content_type/white_papers_and_tech_docs/26310.pdf 136http://vip.amd.com/us-en/assets/content_type/white_papers_and_tech_docs/
13726310_AMD-8131_HyperTransport_PCI-X_Tunnel_Revision_Guide_rev_3_18.pdf
137 138
1386. Available Downloads 1396. Available Downloads
139Neterion "s2io" driver in Red Hat and Suse 2.6-based distributions is kept up 140Neterion "s2io" driver in Red Hat and Suse 2.6-based distributions is kept up
diff --git a/Documentation/networking/timestamping.txt b/Documentation/networking/timestamping.txt
index e8c8f4f06c67..98097d8cb910 100644
--- a/Documentation/networking/timestamping.txt
+++ b/Documentation/networking/timestamping.txt
@@ -172,15 +172,19 @@ struct skb_shared_hwtstamps {
172}; 172};
173 173
174Time stamps for outgoing packets are to be generated as follows: 174Time stamps for outgoing packets are to be generated as follows:
175- In hard_start_xmit(), check if skb_tx(skb)->hardware is set no-zero. 175- In hard_start_xmit(), check if (skb_shinfo(skb)->tx_flags & SKBTX_HW_TSTAMP)
176 If yes, then the driver is expected to do hardware time stamping. 176 is set no-zero. If yes, then the driver is expected to do hardware time
177 stamping.
177- If this is possible for the skb and requested, then declare 178- If this is possible for the skb and requested, then declare
178 that the driver is doing the time stamping by setting the field 179 that the driver is doing the time stamping by setting the flag
179 skb_tx(skb)->in_progress non-zero. You might want to keep a pointer 180 SKBTX_IN_PROGRESS in skb_shinfo(skb)->tx_flags , e.g. with
180 to the associated skb for the next step and not free the skb. A driver 181
181 not supporting hardware time stamping doesn't do that. A driver must 182 skb_shinfo(skb)->tx_flags |= SKBTX_IN_PROGRESS;
182 never touch sk_buff::tstamp! It is used to store software generated 183
183 time stamps by the network subsystem. 184 You might want to keep a pointer to the associated skb for the next step
185 and not free the skb. A driver not supporting hardware time stamping doesn't
186 do that. A driver must never touch sk_buff::tstamp! It is used to store
187 software generated time stamps by the network subsystem.
184- As soon as the driver has sent the packet and/or obtained a 188- As soon as the driver has sent the packet and/or obtained a
185 hardware time stamp for it, it passes the time stamp back by 189 hardware time stamp for it, it passes the time stamp back by
186 calling skb_hwtstamp_tx() with the original skb, the raw 190 calling skb_hwtstamp_tx() with the original skb, the raw
@@ -191,6 +195,6 @@ Time stamps for outgoing packets are to be generated as follows:
191 this would occur at a later time in the processing pipeline than other 195 this would occur at a later time in the processing pipeline than other
192 software time stamping and therefore could lead to unexpected deltas 196 software time stamping and therefore could lead to unexpected deltas
193 between time stamps. 197 between time stamps.
194- If the driver did not call set skb_tx(skb)->in_progress, then 198- If the driver did not set the SKBTX_IN_PROGRESS flag (see above), then
195 dev_hard_start_xmit() checks whether software time stamping 199 dev_hard_start_xmit() checks whether software time stamping
196 is wanted as fallback and potentially generates the time stamp. 200 is wanted as fallback and potentially generates the time stamp.
diff --git a/Documentation/networking/tlan.txt b/Documentation/networking/tlan.txt
index 7e6aa5b20c37..34550dfcef74 100644
--- a/Documentation/networking/tlan.txt
+++ b/Documentation/networking/tlan.txt
@@ -2,7 +2,7 @@
2(C) 1998 James Banks 2(C) 1998 James Banks
3(C) 1999-2001 Torben Mathiasen <tmm@image.dk, torben.mathiasen@compaq.com> 3(C) 1999-2001 Torben Mathiasen <tmm@image.dk, torben.mathiasen@compaq.com>
4 4
5For driver information/updates visit http://opensource.compaq.com 5For driver information/updates visit http://www.compaq.com
6 6
7 7
8TLAN driver for Linux, version 1.14a 8TLAN driver for Linux, version 1.14a
@@ -113,5 +113,5 @@ III. Things to try if you have problems.
113 113
114There is also a tlan mailing list which you can join by sending "subscribe tlan" 114There is also a tlan mailing list which you can join by sending "subscribe tlan"
115in the body of an email to majordomo@vuser.vu.union.edu. 115in the body of an email to majordomo@vuser.vu.union.edu.
116There is also a tlan website at http://opensource.compaq.com 116There is also a tlan website at http://www.compaq.com
117 117
diff --git a/Documentation/networking/udplite.txt b/Documentation/networking/udplite.txt
index 855d8da57a23..d727a3829100 100644
--- a/Documentation/networking/udplite.txt
+++ b/Documentation/networking/udplite.txt
@@ -11,11 +11,13 @@
11 This file briefly describes the existing kernel support and the socket API. 11 This file briefly describes the existing kernel support and the socket API.
12 For in-depth information, you can consult: 12 For in-depth information, you can consult:
13 13
14 o The UDP-Lite Homepage: http://www.erg.abdn.ac.uk/users/gerrit/udp-lite/ 14 o The UDP-Lite Homepage:
15 http://web.archive.org/web/*/http://www.erg.abdn.ac.uk/users/gerrit/udp-lite/
15 From here you can also download some example application source code. 16 From here you can also download some example application source code.
16 17
17 o The UDP-Lite HOWTO on 18 o The UDP-Lite HOWTO on
18 http://www.erg.abdn.ac.uk/users/gerrit/udp-lite/files/UDP-Lite-HOWTO.txt 19 http://web.archive.org/web/*/http://www.erg.abdn.ac.uk/users/gerrit/udp-lite/
20 files/UDP-Lite-HOWTO.txt
19 21
20 o The Wireshark UDP-Lite WiKi (with capture files): 22 o The Wireshark UDP-Lite WiKi (with capture files):
21 http://wiki.wireshark.org/Lightweight_User_Datagram_Protocol 23 http://wiki.wireshark.org/Lightweight_User_Datagram_Protocol
@@ -26,12 +28,7 @@
26 I) APPLICATIONS 28 I) APPLICATIONS
27 29
28 Several applications have been ported successfully to UDP-Lite. Ethereal 30 Several applications have been ported successfully to UDP-Lite. Ethereal
29 (now called wireshark) has UDP-Litev4/v6 support by default. The tarball on 31 (now called wireshark) has UDP-Litev4/v6 support by default.
30
31 http://www.erg.abdn.ac.uk/users/gerrit/udp-lite/files/udplite_linux.tar.gz
32
33 has source code for several v4/v6 client-server and network testing examples.
34
35 Porting applications to UDP-Lite is straightforward: only socket level and 32 Porting applications to UDP-Lite is straightforward: only socket level and
36 IPPROTO need to be changed; senders additionally set the checksum coverage 33 IPPROTO need to be changed; senders additionally set the checksum coverage
37 length (default = header length = 8). Details are in the next section. 34 length (default = header length = 8). Details are in the next section.
diff --git a/Documentation/networking/wavelan.txt b/Documentation/networking/wavelan.txt
deleted file mode 100644
index afa6e521c685..000000000000
--- a/Documentation/networking/wavelan.txt
+++ /dev/null
@@ -1,73 +0,0 @@
1 The Wavelan drivers saga
2 ------------------------
3
4 By Jean Tourrilhes <jt@hpl.hp.com>
5
6 The Wavelan is a Radio network adapter designed by
7Lucent. Under this generic name is hidden quite a variety of hardware,
8and many Linux driver to support it.
9 The get the full story on Wireless LANs, please consult :
10 http://www.hpl.hp.com/personal/Jean_Tourrilhes/Linux/
11
12"wavelan" driver (old ISA Wavelan)
13----------------
14 o Config : Network device -> Wireless LAN -> AT&T WaveLAN
15 o Location : .../drivers/net/wireless/wavelan*
16 o in-line doc : .../drivers/net/wireless/wavelan.p.h
17 o on-line doc :
18 http://www.hpl.hp.com/personal/Jean_Tourrilhes/Linux/Wavelan.html
19
20 This is the driver for the ISA version of the first generation
21of the Wavelan, now discontinued. The device is 2 Mb/s, composed of a
22Intel 82586 controller and a Lucent Modem, and is NOT 802.11 compliant.
23 The driver has been tested with the following hardware :
24 o Wavelan ISA 915 MHz (full length ISA card)
25 o Wavelan ISA 915 MHz 2.0 (half length ISA card)
26 o Wavelan ISA 2.4 GHz (full length ISA card, fixed frequency)
27 o Wavelan ISA 2.4 GHz 2.0 (half length ISA card, frequency selectable)
28 o Above cards with the optional DES encryption feature
29
30"wavelan_cs" driver (old Pcmcia Wavelan)
31-------------------
32 o Config : Network device -> PCMCIA network ->
33 Pcmcia Wireless LAN -> AT&T/Lucent WaveLAN
34 o Location : .../drivers/net/pcmcia/wavelan*
35 o in-line doc : .../drivers/net/pcmcia/wavelan_cs.h
36 o on-line doc :
37 http://www.hpl.hp.com/personal/Jean_Tourrilhes/Linux/Wavelan.html
38
39 This is the driver for the PCMCIA version of the first
40generation of the Wavelan, now discontinued. The device is 2 Mb/s,
41composed of a Intel 82593 controller (totally different from the 82586)
42and a Lucent Modem, and NOT 802.11 compatible.
43 The driver has been tested with the following hardware :
44 o Wavelan Pcmcia 915 MHz 2.0 (Pcmcia card + separate
45 modem/antenna block)
46 o Wavelan Pcmcia 2.4 GHz 2.0 (Pcmcia card + separate
47 modem/antenna block)
48
49"wvlan_cs" driver (Wavelan IEEE, GPL)
50-----------------
51 o Config : Not yet in kernel
52 o Location : Pcmcia package 3.1.10+
53 o on-line doc : http://www.fasta.fh-dortmund.de/users/andy/wvlan/
54
55 This is the driver for the current generation of Wavelan IEEE,
56which is 802.11 compatible. Depending on version, it is 2 Mb/s or 11
57Mb/s, with or without encryption, all implemented in Lucent specific
58DSP (the Hermes).
59 This is a GPL full source PCMCIA driver (ISA is just a Pcmcia
60card with ISA-Pcmcia bridge).
61
62"wavelan2_cs" driver (Wavelan IEEE, binary)
63--------------------
64 o Config : Not yet in kernel
65 o Location : ftp://sourceforge.org/pcmcia/contrib/
66
67 This driver support exactly the same hardware as the previous
68driver, the main difference is that it is based on a binary library
69and supported by Lucent.
70
71 I hope it clears the confusion ;-)
72
73 Jean
diff --git a/Documentation/padata.txt b/Documentation/padata.txt
index 269d7d0d8335..7ddfe216a0aa 100644
--- a/Documentation/padata.txt
+++ b/Documentation/padata.txt
@@ -1,5 +1,5 @@
1The padata parallel execution mechanism 1The padata parallel execution mechanism
2Last updated for 2.6.34 2Last updated for 2.6.36
3 3
4Padata is a mechanism by which the kernel can farm work out to be done in 4Padata is a mechanism by which the kernel can farm work out to be done in
5parallel on multiple CPUs while retaining the ordering of tasks. It was 5parallel on multiple CPUs while retaining the ordering of tasks. It was
@@ -13,31 +13,86 @@ overall control of how tasks are to be run:
13 13
14 #include <linux/padata.h> 14 #include <linux/padata.h>
15 15
16 struct padata_instance *padata_alloc(const struct cpumask *cpumask, 16 struct padata_instance *padata_alloc(struct workqueue_struct *wq,
17 struct workqueue_struct *wq); 17 const struct cpumask *pcpumask,
18 const struct cpumask *cbcpumask);
18 19
19The cpumask describes which processors will be used to execute work 20The pcpumask describes which processors will be used to execute work
20submitted to this instance. The workqueue wq is where the work will 21submitted to this instance in parallel. The cbcpumask defines which
21actually be done; it should be a multithreaded queue, naturally. 22processors are allowed to be used as the serialization callback processor.
23The workqueue wq is where the work will actually be done; it should be
24a multithreaded queue, naturally.
25
26To allocate a padata instance with the cpu_possible_mask for both
27cpumasks this helper function can be used:
28
29 struct padata_instance *padata_alloc_possible(struct workqueue_struct *wq);
30
31Note: Padata maintains two kinds of cpumasks internally. The user supplied
32cpumasks, submitted by padata_alloc/padata_alloc_possible and the 'usable'
33cpumasks. The usable cpumasks are always a subset of active CPUs in the
34user supplied cpumasks; these are the cpumasks padata actually uses. So
35it is legal to supply a cpumask to padata that contains offline CPUs.
36Once an offline CPU in the user supplied cpumask comes online, padata
37is going to use it.
22 38
23There are functions for enabling and disabling the instance: 39There are functions for enabling and disabling the instance:
24 40
25 void padata_start(struct padata_instance *pinst); 41 int padata_start(struct padata_instance *pinst);
26 void padata_stop(struct padata_instance *pinst); 42 void padata_stop(struct padata_instance *pinst);
27 43
28These functions literally do nothing beyond setting or clearing the 44These functions are setting or clearing the "PADATA_INIT" flag;
29"padata_start() was called" flag; if that flag is not set, other functions 45if that flag is not set, other functions will refuse to work.
30will refuse to work. 46padata_start returns zero on success (flag set) or -EINVAL if the
47padata cpumask contains no active CPU (flag not set).
48padata_stop clears the flag and blocks until the padata instance
49is unused.
31 50
32The list of CPUs to be used can be adjusted with these functions: 51The list of CPUs to be used can be adjusted with these functions:
33 52
34 int padata_set_cpumask(struct padata_instance *pinst, 53 int padata_set_cpumasks(struct padata_instance *pinst,
54 cpumask_var_t pcpumask,
55 cpumask_var_t cbcpumask);
56 int padata_set_cpumask(struct padata_instance *pinst, int cpumask_type,
35 cpumask_var_t cpumask); 57 cpumask_var_t cpumask);
36 int padata_add_cpu(struct padata_instance *pinst, int cpu); 58 int padata_add_cpu(struct padata_instance *pinst, int cpu, int mask);
37 int padata_remove_cpu(struct padata_instance *pinst, int cpu); 59 int padata_remove_cpu(struct padata_instance *pinst, int cpu, int mask);
60
61Changing the CPU masks are expensive operations, though, so it should not be
62done with great frequency.
63
64It's possible to change both cpumasks of a padata instance with
65padata_set_cpumasks by specifying the cpumasks for parallel execution (pcpumask)
66and for the serial callback function (cbcpumask). padata_set_cpumask is used to
67change just one of the cpumasks. Here cpumask_type is one of PADATA_CPU_SERIAL,
68PADATA_CPU_PARALLEL and cpumask specifies the new cpumask to use.
69To simply add or remove one CPU from a certain cpumask the functions
70padata_add_cpu/padata_remove_cpu are used. cpu specifies the CPU to add or
71remove and mask is one of PADATA_CPU_SERIAL, PADATA_CPU_PARALLEL.
72
73If a user is interested in padata cpumask changes, he can register to
74the padata cpumask change notifier:
75
76 int padata_register_cpumask_notifier(struct padata_instance *pinst,
77 struct notifier_block *nblock);
78
79To unregister from that notifier:
80
81 int padata_unregister_cpumask_notifier(struct padata_instance *pinst,
82 struct notifier_block *nblock);
83
84The padata cpumask change notifier notifies about changes of the usable
85cpumasks, i.e. the subset of active CPUs in the user supplied cpumask.
86
87Padata calls the notifier chain with:
88
89 blocking_notifier_call_chain(&pinst->cpumask_change_notifier,
90 notification_mask,
91 &pd_new->cpumask);
38 92
39Changing the CPU mask has the look of an expensive operation, though, so it 93Here cpumask_change_notifier is registered notifier, notification_mask
40probably should not be done with great frequency. 94is one of PADATA_CPU_SERIAL, PADATA_CPU_PARALLEL and cpumask is a pointer
95to a struct padata_cpumask that contains the new cpumask information.
41 96
42Actually submitting work to the padata instance requires the creation of a 97Actually submitting work to the padata instance requires the creation of a
43padata_priv structure: 98padata_priv structure:
@@ -49,8 +104,8 @@ padata_priv structure:
49 }; 104 };
50 105
51This structure will almost certainly be embedded within some larger 106This structure will almost certainly be embedded within some larger
52structure specific to the work to be done. Most its fields are private to 107structure specific to the work to be done. Most of its fields are private to
53padata, but the structure should be zeroed at initialization time, and the 108padata, but the structure should be zeroed at initialisation time, and the
54parallel() and serial() functions should be provided. Those functions will 109parallel() and serial() functions should be provided. Those functions will
55be called in the process of getting the work done as we will see 110be called in the process of getting the work done as we will see
56momentarily. 111momentarily.
@@ -63,12 +118,10 @@ The submission of work is done with:
63The pinst and padata structures must be set up as described above; cb_cpu 118The pinst and padata structures must be set up as described above; cb_cpu
64specifies which CPU will be used for the final callback when the work is 119specifies which CPU will be used for the final callback when the work is
65done; it must be in the current instance's CPU mask. The return value from 120done; it must be in the current instance's CPU mask. The return value from
66padata_do_parallel() is a little strange; zero is an error return 121padata_do_parallel() is zero on success, indicating that the work is in
67indicating that the caller forgot the padata_start() formalities. -EBUSY 122progress. -EBUSY means that somebody, somewhere else is messing with the
68means that somebody, somewhere else is messing with the instance's CPU 123instance's CPU mask, while -EINVAL is a complaint about cb_cpu not being
69mask, while -EINVAL is a complaint about cb_cpu not being in that CPU mask. 124in that CPU mask or about a not running instance.
70If all goes well, this function will return -EINPROGRESS, indicating that
71the work is in progress.
72 125
73Each task submitted to padata_do_parallel() will, in turn, be passed to 126Each task submitted to padata_do_parallel() will, in turn, be passed to
74exactly one call to the above-mentioned parallel() function, on one CPU, so 127exactly one call to the above-mentioned parallel() function, on one CPU, so
diff --git a/Documentation/pcmcia/driver-changes.txt b/Documentation/pcmcia/driver-changes.txt
index 61bc4e943116..dd04361dd361 100644
--- a/Documentation/pcmcia/driver-changes.txt
+++ b/Documentation/pcmcia/driver-changes.txt
@@ -1,4 +1,41 @@
1This file details changes in 2.6 which affect PCMCIA card driver authors: 1This file details changes in 2.6 which affect PCMCIA card driver authors:
2* pcmcia_loop_config() and autoconfiguration (as of 2.6.36)
3 If struct pcmcia_device *p_dev->config_flags is set accordingly,
4 pcmcia_loop_config() now sets up certain configuration values
5 automatically, though the driver may still override the settings
6 in the callback function. The following autoconfiguration options
7 are provided at the moment:
8 CONF_AUTO_CHECK_VCC : check for matching Vcc
9 CONF_AUTO_SET_VPP : set Vpp
10 CONF_AUTO_AUDIO : auto-enable audio line, if required
11 CONF_AUTO_SET_IO : set ioport resources (->resource[0,1])
12 CONF_AUTO_SET_IOMEM : set first iomem resource (->resource[2])
13
14* pcmcia_request_configuration -> pcmcia_enable_device (as of 2.6.36)
15 pcmcia_request_configuration() got renamed to pcmcia_enable_device(),
16 as it mirrors pcmcia_disable_device(). Configuration settings are now
17 stored in struct pcmcia_device, e.g. in the fields config_flags,
18 config_index, config_base, vpp.
19
20* pcmcia_request_window changes (as of 2.6.36)
21 Instead of win_req_t, drivers are now requested to fill out
22 struct pcmcia_device *p_dev->resource[2,3,4,5] for up to four ioport
23 ranges. After a call to pcmcia_request_window(), the regions found there
24 are reserved and may be used immediately -- until pcmcia_release_window()
25 is called.
26
27* pcmcia_request_io changes (as of 2.6.36)
28 Instead of io_req_t, drivers are now requested to fill out
29 struct pcmcia_device *p_dev->resource[0,1] for up to two ioport
30 ranges. After a call to pcmcia_request_io(), the ports found there
31 are reserved, after calling pcmcia_request_configuration(), they may
32 be used.
33
34* No dev_info_t, no cs_types.h (as of 2.6.36)
35 dev_info_t and a few other typedefs are removed. No longer use them
36 in PCMCIA device drivers. Also, do not include pcmcia/cs_types.h, as
37 this file is gone.
38
2* No dev_node_t (as of 2.6.35) 39* No dev_node_t (as of 2.6.35)
3 There is no more need to fill out a "dev_node_t" structure. 40 There is no more need to fill out a "dev_node_t" structure.
4 41
diff --git a/Documentation/power/00-INDEX b/Documentation/power/00-INDEX
index fb742c213c9e..45e9d4a91284 100644
--- a/Documentation/power/00-INDEX
+++ b/Documentation/power/00-INDEX
@@ -14,6 +14,8 @@ interface.txt
14 - Power management user interface in /sys/power 14 - Power management user interface in /sys/power
15notifiers.txt 15notifiers.txt
16 - Registering suspend notifiers in device drivers 16 - Registering suspend notifiers in device drivers
17opp.txt
18 - Operating Performance Point library
17pci.txt 19pci.txt
18 - How the PCI Subsystem Does Power Management 20 - How the PCI Subsystem Does Power Management
19pm_qos_interface.txt 21pm_qos_interface.txt
diff --git a/Documentation/power/apm-acpi.txt b/Documentation/power/apm-acpi.txt
index 1bd799dc17e8..6cc423d3662e 100644
--- a/Documentation/power/apm-acpi.txt
+++ b/Documentation/power/apm-acpi.txt
@@ -28,5 +28,5 @@ and be sure that they are started sometime in the system boot process.
28Go ahead and start both. If ACPI or APM is not available on your 28Go ahead and start both. If ACPI or APM is not available on your
29system the associated daemon will exit gracefully. 29system the associated daemon will exit gracefully.
30 30
31 apmd: http://worldvisions.ca/~apenwarr/apmd/ 31 apmd: http://ftp.debian.org/pool/main/a/apmd/
32 acpid: http://acpid.sf.net/ 32 acpid: http://acpid.sf.net/
diff --git a/Documentation/power/basic-pm-debugging.txt b/Documentation/power/basic-pm-debugging.txt
index 1555001bc733..ddd78172ef73 100644
--- a/Documentation/power/basic-pm-debugging.txt
+++ b/Documentation/power/basic-pm-debugging.txt
@@ -179,8 +179,7 @@ use the PM_TRACE mechanism documented in Documentation/s2ram.txt .
179 179
180To verify that the STR works, it is generally more convenient to use the s2ram 180To verify that the STR works, it is generally more convenient to use the s2ram
181tool available from http://suspend.sf.net and documented at 181tool available from http://suspend.sf.net and documented at
182http://en.opensuse.org/s2ram . However, before doing that it is recommended to 182http://en.opensuse.org/SDB:Suspend_to_RAM.
183carry out STR testing using the facility described in section 1.
184 183
185Namely, after writing "freezer", "devices", "platform", "processors", or "core" 184Namely, after writing "freezer", "devices", "platform", "processors", or "core"
186into /sys/power/pm_test (available if the kernel is compiled with 185into /sys/power/pm_test (available if the kernel is compiled with
diff --git a/Documentation/power/interface.txt b/Documentation/power/interface.txt
index e67211fe0ee2..c537834af005 100644
--- a/Documentation/power/interface.txt
+++ b/Documentation/power/interface.txt
@@ -57,7 +57,7 @@ smallest image possible. In particular, if "0" is written to this file, the
57suspend image will be as small as possible. 57suspend image will be as small as possible.
58 58
59Reading from this file will display the current image size limit, which 59Reading from this file will display the current image size limit, which
60is set to 500 MB by default. 60is set to 2/5 of available RAM by default.
61 61
62/sys/power/pm_trace controls the code which saves the last PM event point in 62/sys/power/pm_trace controls the code which saves the last PM event point in
63the RTC across reboots, so that you can debug a machine that just hangs 63the RTC across reboots, so that you can debug a machine that just hangs
diff --git a/Documentation/power/opp.txt b/Documentation/power/opp.txt
new file mode 100644
index 000000000000..44d87ad3cea9
--- /dev/null
+++ b/Documentation/power/opp.txt
@@ -0,0 +1,375 @@
1*=============*
2* OPP Library *
3*=============*
4
5(C) 2009-2010 Nishanth Menon <nm@ti.com>, Texas Instruments Incorporated
6
7Contents
8--------
91. Introduction
102. Initial OPP List Registration
113. OPP Search Functions
124. OPP Availability Control Functions
135. OPP Data Retrieval Functions
146. Cpufreq Table Generation
157. Data Structures
16
171. Introduction
18===============
19Complex SoCs of today consists of a multiple sub-modules working in conjunction.
20In an operational system executing varied use cases, not all modules in the SoC
21need to function at their highest performing frequency all the time. To
22facilitate this, sub-modules in a SoC are grouped into domains, allowing some
23domains to run at lower voltage and frequency while other domains are loaded
24more. The set of discrete tuples consisting of frequency and voltage pairs that
25the device will support per domain are called Operating Performance Points or
26OPPs.
27
28OPP library provides a set of helper functions to organize and query the OPP
29information. The library is located in drivers/base/power/opp.c and the header
30is located in include/linux/opp.h. OPP library can be enabled by enabling
31CONFIG_PM_OPP from power management menuconfig menu. OPP library depends on
32CONFIG_PM as certain SoCs such as Texas Instrument's OMAP framework allows to
33optionally boot at a certain OPP without needing cpufreq.
34
35Typical usage of the OPP library is as follows:
36(users) -> registers a set of default OPPs -> (library)
37SoC framework -> modifies on required cases certain OPPs -> OPP layer
38 -> queries to search/retrieve information ->
39
40OPP layer expects each domain to be represented by a unique device pointer. SoC
41framework registers a set of initial OPPs per device with the OPP layer. This
42list is expected to be an optimally small number typically around 5 per device.
43This initial list contains a set of OPPs that the framework expects to be safely
44enabled by default in the system.
45
46Note on OPP Availability:
47------------------------
48As the system proceeds to operate, SoC framework may choose to make certain
49OPPs available or not available on each device based on various external
50factors. Example usage: Thermal management or other exceptional situations where
51SoC framework might choose to disable a higher frequency OPP to safely continue
52operations until that OPP could be re-enabled if possible.
53
54OPP library facilitates this concept in it's implementation. The following
55operational functions operate only on available opps:
56opp_find_freq_{ceil, floor}, opp_get_voltage, opp_get_freq, opp_get_opp_count
57and opp_init_cpufreq_table
58
59opp_find_freq_exact is meant to be used to find the opp pointer which can then
60be used for opp_enable/disable functions to make an opp available as required.
61
62WARNING: Users of OPP library should refresh their availability count using
63get_opp_count if opp_enable/disable functions are invoked for a device, the
64exact mechanism to trigger these or the notification mechanism to other
65dependent subsystems such as cpufreq are left to the discretion of the SoC
66specific framework which uses the OPP library. Similar care needs to be taken
67care to refresh the cpufreq table in cases of these operations.
68
69WARNING on OPP List locking mechanism:
70-------------------------------------------------
71OPP library uses RCU for exclusivity. RCU allows the query functions to operate
72in multiple contexts and this synchronization mechanism is optimal for a read
73intensive operations on data structure as the OPP library caters to.
74
75To ensure that the data retrieved are sane, the users such as SoC framework
76should ensure that the section of code operating on OPP queries are locked
77using RCU read locks. The opp_find_freq_{exact,ceil,floor},
78opp_get_{voltage, freq, opp_count} fall into this category.
79
80opp_{add,enable,disable} are updaters which use mutex and implement it's own
81RCU locking mechanisms. opp_init_cpufreq_table acts as an updater and uses
82mutex to implment RCU updater strategy. These functions should *NOT* be called
83under RCU locks and other contexts that prevent blocking functions in RCU or
84mutex operations from working.
85
862. Initial OPP List Registration
87================================
88The SoC implementation calls opp_add function iteratively to add OPPs per
89device. It is expected that the SoC framework will register the OPP entries
90optimally- typical numbers range to be less than 5. The list generated by
91registering the OPPs is maintained by OPP library throughout the device
92operation. The SoC framework can subsequently control the availability of the
93OPPs dynamically using the opp_enable / disable functions.
94
95opp_add - Add a new OPP for a specific domain represented by the device pointer.
96 The OPP is defined using the frequency and voltage. Once added, the OPP
97 is assumed to be available and control of it's availability can be done
98 with the opp_enable/disable functions. OPP library internally stores
99 and manages this information in the opp struct. This function may be
100 used by SoC framework to define a optimal list as per the demands of
101 SoC usage environment.
102
103 WARNING: Do not use this function in interrupt context.
104
105 Example:
106 soc_pm_init()
107 {
108 /* Do things */
109 r = opp_add(mpu_dev, 1000000, 900000);
110 if (!r) {
111 pr_err("%s: unable to register mpu opp(%d)\n", r);
112 goto no_cpufreq;
113 }
114 /* Do cpufreq things */
115 no_cpufreq:
116 /* Do remaining things */
117 }
118
1193. OPP Search Functions
120=======================
121High level framework such as cpufreq operates on frequencies. To map the
122frequency back to the corresponding OPP, OPP library provides handy functions
123to search the OPP list that OPP library internally manages. These search
124functions return the matching pointer representing the opp if a match is
125found, else returns error. These errors are expected to be handled by standard
126error checks such as IS_ERR() and appropriate actions taken by the caller.
127
128opp_find_freq_exact - Search for an OPP based on an *exact* frequency and
129 availability. This function is especially useful to enable an OPP which
130 is not available by default.
131 Example: In a case when SoC framework detects a situation where a
132 higher frequency could be made available, it can use this function to
133 find the OPP prior to call the opp_enable to actually make it available.
134 rcu_read_lock();
135 opp = opp_find_freq_exact(dev, 1000000000, false);
136 rcu_read_unlock();
137 /* dont operate on the pointer.. just do a sanity check.. */
138 if (IS_ERR(opp)) {
139 pr_err("frequency not disabled!\n");
140 /* trigger appropriate actions.. */
141 } else {
142 opp_enable(dev,1000000000);
143 }
144
145 NOTE: This is the only search function that operates on OPPs which are
146 not available.
147
148opp_find_freq_floor - Search for an available OPP which is *at most* the
149 provided frequency. This function is useful while searching for a lesser
150 match OR operating on OPP information in the order of decreasing
151 frequency.
152 Example: To find the highest opp for a device:
153 freq = ULONG_MAX;
154 rcu_read_lock();
155 opp_find_freq_floor(dev, &freq);
156 rcu_read_unlock();
157
158opp_find_freq_ceil - Search for an available OPP which is *at least* the
159 provided frequency. This function is useful while searching for a
160 higher match OR operating on OPP information in the order of increasing
161 frequency.
162 Example 1: To find the lowest opp for a device:
163 freq = 0;
164 rcu_read_lock();
165 opp_find_freq_ceil(dev, &freq);
166 rcu_read_unlock();
167 Example 2: A simplified implementation of a SoC cpufreq_driver->target:
168 soc_cpufreq_target(..)
169 {
170 /* Do stuff like policy checks etc. */
171 /* Find the best frequency match for the req */
172 rcu_read_lock();
173 opp = opp_find_freq_ceil(dev, &freq);
174 rcu_read_unlock();
175 if (!IS_ERR(opp))
176 soc_switch_to_freq_voltage(freq);
177 else
178 /* do something when we cant satisfy the req */
179 /* do other stuff */
180 }
181
1824. OPP Availability Control Functions
183=====================================
184A default OPP list registered with the OPP library may not cater to all possible
185situation. The OPP library provides a set of functions to modify the
186availability of a OPP within the OPP list. This allows SoC frameworks to have
187fine grained dynamic control of which sets of OPPs are operationally available.
188These functions are intended to *temporarily* remove an OPP in conditions such
189as thermal considerations (e.g. don't use OPPx until the temperature drops).
190
191WARNING: Do not use these functions in interrupt context.
192
193opp_enable - Make a OPP available for operation.
194 Example: Lets say that 1GHz OPP is to be made available only if the
195 SoC temperature is lower than a certain threshold. The SoC framework
196 implementation might choose to do something as follows:
197 if (cur_temp < temp_low_thresh) {
198 /* Enable 1GHz if it was disabled */
199 rcu_read_lock();
200 opp = opp_find_freq_exact(dev, 1000000000, false);
201 rcu_read_unlock();
202 /* just error check */
203 if (!IS_ERR(opp))
204 ret = opp_enable(dev, 1000000000);
205 else
206 goto try_something_else;
207 }
208
209opp_disable - Make an OPP to be not available for operation
210 Example: Lets say that 1GHz OPP is to be disabled if the temperature
211 exceeds a threshold value. The SoC framework implementation might
212 choose to do something as follows:
213 if (cur_temp > temp_high_thresh) {
214 /* Disable 1GHz if it was enabled */
215 rcu_read_lock();
216 opp = opp_find_freq_exact(dev, 1000000000, true);
217 rcu_read_unlock();
218 /* just error check */
219 if (!IS_ERR(opp))
220 ret = opp_disable(dev, 1000000000);
221 else
222 goto try_something_else;
223 }
224
2255. OPP Data Retrieval Functions
226===============================
227Since OPP library abstracts away the OPP information, a set of functions to pull
228information from the OPP structure is necessary. Once an OPP pointer is
229retrieved using the search functions, the following functions can be used by SoC
230framework to retrieve the information represented inside the OPP layer.
231
232opp_get_voltage - Retrieve the voltage represented by the opp pointer.
233 Example: At a cpufreq transition to a different frequency, SoC
234 framework requires to set the voltage represented by the OPP using
235 the regulator framework to the Power Management chip providing the
236 voltage.
237 soc_switch_to_freq_voltage(freq)
238 {
239 /* do things */
240 rcu_read_lock();
241 opp = opp_find_freq_ceil(dev, &freq);
242 v = opp_get_voltage(opp);
243 rcu_read_unlock();
244 if (v)
245 regulator_set_voltage(.., v);
246 /* do other things */
247 }
248
249opp_get_freq - Retrieve the freq represented by the opp pointer.
250 Example: Lets say the SoC framework uses a couple of helper functions
251 we could pass opp pointers instead of doing additional parameters to
252 handle quiet a bit of data parameters.
253 soc_cpufreq_target(..)
254 {
255 /* do things.. */
256 max_freq = ULONG_MAX;
257 rcu_read_lock();
258 max_opp = opp_find_freq_floor(dev,&max_freq);
259 requested_opp = opp_find_freq_ceil(dev,&freq);
260 if (!IS_ERR(max_opp) && !IS_ERR(requested_opp))
261 r = soc_test_validity(max_opp, requested_opp);
262 rcu_read_unlock();
263 /* do other things */
264 }
265 soc_test_validity(..)
266 {
267 if(opp_get_voltage(max_opp) < opp_get_voltage(requested_opp))
268 return -EINVAL;
269 if(opp_get_freq(max_opp) < opp_get_freq(requested_opp))
270 return -EINVAL;
271 /* do things.. */
272 }
273
274opp_get_opp_count - Retrieve the number of available opps for a device
275 Example: Lets say a co-processor in the SoC needs to know the available
276 frequencies in a table, the main processor can notify as following:
277 soc_notify_coproc_available_frequencies()
278 {
279 /* Do things */
280 rcu_read_lock();
281 num_available = opp_get_opp_count(dev);
282 speeds = kzalloc(sizeof(u32) * num_available, GFP_KERNEL);
283 /* populate the table in increasing order */
284 freq = 0;
285 while (!IS_ERR(opp = opp_find_freq_ceil(dev, &freq))) {
286 speeds[i] = freq;
287 freq++;
288 i++;
289 }
290 rcu_read_unlock();
291
292 soc_notify_coproc(AVAILABLE_FREQs, speeds, num_available);
293 /* Do other things */
294 }
295
2966. Cpufreq Table Generation
297===========================
298opp_init_cpufreq_table - cpufreq framework typically is initialized with
299 cpufreq_frequency_table_cpuinfo which is provided with the list of
300 frequencies that are available for operation. This function provides
301 a ready to use conversion routine to translate the OPP layer's internal
302 information about the available frequencies into a format readily
303 providable to cpufreq.
304
305 WARNING: Do not use this function in interrupt context.
306
307 Example:
308 soc_pm_init()
309 {
310 /* Do things */
311 r = opp_init_cpufreq_table(dev, &freq_table);
312 if (!r)
313 cpufreq_frequency_table_cpuinfo(policy, freq_table);
314 /* Do other things */
315 }
316
317 NOTE: This function is available only if CONFIG_CPU_FREQ is enabled in
318 addition to CONFIG_PM as power management feature is required to
319 dynamically scale voltage and frequency in a system.
320
3217. Data Structures
322==================
323Typically an SoC contains multiple voltage domains which are variable. Each
324domain is represented by a device pointer. The relationship to OPP can be
325represented as follows:
326SoC
327 |- device 1
328 | |- opp 1 (availability, freq, voltage)
329 | |- opp 2 ..
330 ... ...
331 | `- opp n ..
332 |- device 2
333 ...
334 `- device m
335
336OPP library maintains a internal list that the SoC framework populates and
337accessed by various functions as described above. However, the structures
338representing the actual OPPs and domains are internal to the OPP library itself
339to allow for suitable abstraction reusable across systems.
340
341struct opp - The internal data structure of OPP library which is used to
342 represent an OPP. In addition to the freq, voltage, availability
343 information, it also contains internal book keeping information required
344 for the OPP library to operate on. Pointer to this structure is
345 provided back to the users such as SoC framework to be used as a
346 identifier for OPP in the interactions with OPP layer.
347
348 WARNING: The struct opp pointer should not be parsed or modified by the
349 users. The defaults of for an instance is populated by opp_add, but the
350 availability of the OPP can be modified by opp_enable/disable functions.
351
352struct device - This is used to identify a domain to the OPP layer. The
353 nature of the device and it's implementation is left to the user of
354 OPP library such as the SoC framework.
355
356Overall, in a simplistic view, the data structure operations is represented as
357following:
358
359Initialization / modification:
360 +-----+ /- opp_enable
361opp_add --> | opp | <-------
362 | +-----+ \- opp_disable
363 \-------> domain_info(device)
364
365Search functions:
366 /-- opp_find_freq_ceil ---\ +-----+
367domain_info<---- opp_find_freq_exact -----> | opp |
368 \-- opp_find_freq_floor ---/ +-----+
369
370Retrieval functions:
371+-----+ /- opp_get_voltage
372| opp | <---
373+-----+ \- opp_get_freq
374
375domain_info <- opp_get_opp_count
diff --git a/Documentation/power/regulator/overview.txt b/Documentation/power/regulator/overview.txt
index 9363e056188a..8ed17587a74b 100644
--- a/Documentation/power/regulator/overview.txt
+++ b/Documentation/power/regulator/overview.txt
@@ -13,7 +13,7 @@ regulators (where voltage output is controllable) and current sinks (where
13current limit is controllable). 13current limit is controllable).
14 14
15(C) 2008 Wolfson Microelectronics PLC. 15(C) 2008 Wolfson Microelectronics PLC.
16Author: Liam Girdwood <lg@opensource.wolfsonmicro.com> 16Author: Liam Girdwood <lrg@slimlogic.co.uk>
17 17
18 18
19Nomenclature 19Nomenclature
diff --git a/Documentation/power/runtime_pm.txt b/Documentation/power/runtime_pm.txt
index 55b859b3bc72..489e9bacd165 100644
--- a/Documentation/power/runtime_pm.txt
+++ b/Documentation/power/runtime_pm.txt
@@ -1,6 +1,7 @@
1Run-time Power Management Framework for I/O Devices 1Run-time Power Management Framework for I/O Devices
2 2
3(C) 2009 Rafael J. Wysocki <rjw@sisk.pl>, Novell Inc. 3(C) 2009 Rafael J. Wysocki <rjw@sisk.pl>, Novell Inc.
4(C) 2010 Alan Stern <stern@rowland.harvard.edu>
4 5
51. Introduction 61. Introduction
6 7
@@ -157,7 +158,8 @@ rules:
157 to execute it, the other callbacks will not be executed for the same device. 158 to execute it, the other callbacks will not be executed for the same device.
158 159
159 * A request to execute ->runtime_resume() will cancel any pending or 160 * A request to execute ->runtime_resume() will cancel any pending or
160 scheduled requests to execute the other callbacks for the same device. 161 scheduled requests to execute the other callbacks for the same device,
162 except for scheduled autosuspends.
161 163
1623. Run-time PM Device Fields 1643. Run-time PM Device Fields
163 165
@@ -165,7 +167,7 @@ The following device run-time PM fields are present in 'struct dev_pm_info', as
165defined in include/linux/pm.h: 167defined in include/linux/pm.h:
166 168
167 struct timer_list suspend_timer; 169 struct timer_list suspend_timer;
168 - timer used for scheduling (delayed) suspend request 170 - timer used for scheduling (delayed) suspend and autosuspend requests
169 171
170 unsigned long timer_expires; 172 unsigned long timer_expires;
171 - timer expiration time, in jiffies (if this is different from zero, the 173 - timer expiration time, in jiffies (if this is different from zero, the
@@ -230,6 +232,28 @@ defined in include/linux/pm.h:
230 interface; it may only be modified with the help of the pm_runtime_allow() 232 interface; it may only be modified with the help of the pm_runtime_allow()
231 and pm_runtime_forbid() helper functions 233 and pm_runtime_forbid() helper functions
232 234
235 unsigned int no_callbacks;
236 - indicates that the device does not use the run-time PM callbacks (see
237 Section 8); it may be modified only by the pm_runtime_no_callbacks()
238 helper function
239
240 unsigned int use_autosuspend;
241 - indicates that the device's driver supports delayed autosuspend (see
242 Section 9); it may be modified only by the
243 pm_runtime{_dont}_use_autosuspend() helper functions
244
245 unsigned int timer_autosuspends;
246 - indicates that the PM core should attempt to carry out an autosuspend
247 when the timer expires rather than a normal suspend
248
249 int autosuspend_delay;
250 - the delay time (in milliseconds) to be used for autosuspend
251
252 unsigned long last_busy;
253 - the time (in jiffies) when the pm_runtime_mark_last_busy() helper
254 function was last called for this device; used in calculating inactivity
255 periods for autosuspend
256
233All of the above fields are members of the 'power' member of 'struct device'. 257All of the above fields are members of the 'power' member of 'struct device'.
234 258
2354. Run-time PM Device Helper Functions 2594. Run-time PM Device Helper Functions
@@ -255,6 +279,12 @@ drivers/base/power/runtime.c and include/linux/pm_runtime.h:
255 error code on failure, where -EAGAIN or -EBUSY means it is safe to attempt 279 error code on failure, where -EAGAIN or -EBUSY means it is safe to attempt
256 to suspend the device again in future 280 to suspend the device again in future
257 281
282 int pm_runtime_autosuspend(struct device *dev);
283 - same as pm_runtime_suspend() except that the autosuspend delay is taken
284 into account; if pm_runtime_autosuspend_expiration() says the delay has
285 not yet expired then an autosuspend is scheduled for the appropriate time
286 and 0 is returned
287
258 int pm_runtime_resume(struct device *dev); 288 int pm_runtime_resume(struct device *dev);
259 - execute the subsystem-level resume callback for the device; returns 0 on 289 - execute the subsystem-level resume callback for the device; returns 0 on
260 success, 1 if the device's run-time PM status was already 'active' or 290 success, 1 if the device's run-time PM status was already 'active' or
@@ -267,6 +297,11 @@ drivers/base/power/runtime.c and include/linux/pm_runtime.h:
267 device (the request is represented by a work item in pm_wq); returns 0 on 297 device (the request is represented by a work item in pm_wq); returns 0 on
268 success or error code if the request has not been queued up 298 success or error code if the request has not been queued up
269 299
300 int pm_request_autosuspend(struct device *dev);
301 - schedule the execution of the subsystem-level suspend callback for the
302 device when the autosuspend delay has expired; if the delay has already
303 expired then the work item is queued up immediately
304
270 int pm_schedule_suspend(struct device *dev, unsigned int delay); 305 int pm_schedule_suspend(struct device *dev, unsigned int delay);
271 - schedule the execution of the subsystem-level suspend callback for the 306 - schedule the execution of the subsystem-level suspend callback for the
272 device in future, where 'delay' is the time to wait before queuing up a 307 device in future, where 'delay' is the time to wait before queuing up a
@@ -298,12 +333,20 @@ drivers/base/power/runtime.c and include/linux/pm_runtime.h:
298 - decrement the device's usage counter 333 - decrement the device's usage counter
299 334
300 int pm_runtime_put(struct device *dev); 335 int pm_runtime_put(struct device *dev);
301 - decrement the device's usage counter, run pm_request_idle(dev) and return 336 - decrement the device's usage counter; if the result is 0 then run
302 its result 337 pm_request_idle(dev) and return its result
338
339 int pm_runtime_put_autosuspend(struct device *dev);
340 - decrement the device's usage counter; if the result is 0 then run
341 pm_request_autosuspend(dev) and return its result
303 342
304 int pm_runtime_put_sync(struct device *dev); 343 int pm_runtime_put_sync(struct device *dev);
305 - decrement the device's usage counter, run pm_runtime_idle(dev) and return 344 - decrement the device's usage counter; if the result is 0 then run
306 its result 345 pm_runtime_idle(dev) and return its result
346
347 int pm_runtime_put_sync_autosuspend(struct device *dev);
348 - decrement the device's usage counter; if the result is 0 then run
349 pm_runtime_autosuspend(dev) and return its result
307 350
308 void pm_runtime_enable(struct device *dev); 351 void pm_runtime_enable(struct device *dev);
309 - enable the run-time PM helper functions to run the device bus type's 352 - enable the run-time PM helper functions to run the device bus type's
@@ -349,19 +392,51 @@ drivers/base/power/runtime.c and include/linux/pm_runtime.h:
349 counter (used by the /sys/devices/.../power/control interface to 392 counter (used by the /sys/devices/.../power/control interface to
350 effectively prevent the device from being power managed at run time) 393 effectively prevent the device from being power managed at run time)
351 394
395 void pm_runtime_no_callbacks(struct device *dev);
396 - set the power.no_callbacks flag for the device and remove the run-time
397 PM attributes from /sys/devices/.../power (or prevent them from being
398 added when the device is registered)
399
400 void pm_runtime_mark_last_busy(struct device *dev);
401 - set the power.last_busy field to the current time
402
403 void pm_runtime_use_autosuspend(struct device *dev);
404 - set the power.use_autosuspend flag, enabling autosuspend delays
405
406 void pm_runtime_dont_use_autosuspend(struct device *dev);
407 - clear the power.use_autosuspend flag, disabling autosuspend delays
408
409 void pm_runtime_set_autosuspend_delay(struct device *dev, int delay);
410 - set the power.autosuspend_delay value to 'delay' (expressed in
411 milliseconds); if 'delay' is negative then run-time suspends are
412 prevented
413
414 unsigned long pm_runtime_autosuspend_expiration(struct device *dev);
415 - calculate the time when the current autosuspend delay period will expire,
416 based on power.last_busy and power.autosuspend_delay; if the delay time
417 is 1000 ms or larger then the expiration time is rounded up to the
418 nearest second; returns 0 if the delay period has already expired or
419 power.use_autosuspend isn't set, otherwise returns the expiration time
420 in jiffies
421
352It is safe to execute the following helper functions from interrupt context: 422It is safe to execute the following helper functions from interrupt context:
353 423
354pm_request_idle() 424pm_request_idle()
425pm_request_autosuspend()
355pm_schedule_suspend() 426pm_schedule_suspend()
356pm_request_resume() 427pm_request_resume()
357pm_runtime_get_noresume() 428pm_runtime_get_noresume()
358pm_runtime_get() 429pm_runtime_get()
359pm_runtime_put_noidle() 430pm_runtime_put_noidle()
360pm_runtime_put() 431pm_runtime_put()
432pm_runtime_put_autosuspend()
433pm_runtime_enable()
361pm_suspend_ignore_children() 434pm_suspend_ignore_children()
362pm_runtime_set_active() 435pm_runtime_set_active()
363pm_runtime_set_suspended() 436pm_runtime_set_suspended()
364pm_runtime_enable() 437pm_runtime_suspended()
438pm_runtime_mark_last_busy()
439pm_runtime_autosuspend_expiration()
365 440
3665. Run-time PM Initialization, Device Probing and Removal 4415. Run-time PM Initialization, Device Probing and Removal
367 442
@@ -524,3 +599,141 @@ poweroff and run-time suspend callback, and similarly for system resume, thaw,
524restore, and run-time resume, can achieve this with the help of the 599restore, and run-time resume, can achieve this with the help of the
525UNIVERSAL_DEV_PM_OPS macro defined in include/linux/pm.h (possibly setting its 600UNIVERSAL_DEV_PM_OPS macro defined in include/linux/pm.h (possibly setting its
526last argument to NULL). 601last argument to NULL).
602
6038. "No-Callback" Devices
604
605Some "devices" are only logical sub-devices of their parent and cannot be
606power-managed on their own. (The prototype example is a USB interface. Entire
607USB devices can go into low-power mode or send wake-up requests, but neither is
608possible for individual interfaces.) The drivers for these devices have no
609need of run-time PM callbacks; if the callbacks did exist, ->runtime_suspend()
610and ->runtime_resume() would always return 0 without doing anything else and
611->runtime_idle() would always call pm_runtime_suspend().
612
613Subsystems can tell the PM core about these devices by calling
614pm_runtime_no_callbacks(). This should be done after the device structure is
615initialized and before it is registered (although after device registration is
616also okay). The routine will set the device's power.no_callbacks flag and
617prevent the non-debugging run-time PM sysfs attributes from being created.
618
619When power.no_callbacks is set, the PM core will not invoke the
620->runtime_idle(), ->runtime_suspend(), or ->runtime_resume() callbacks.
621Instead it will assume that suspends and resumes always succeed and that idle
622devices should be suspended.
623
624As a consequence, the PM core will never directly inform the device's subsystem
625or driver about run-time power changes. Instead, the driver for the device's
626parent must take responsibility for telling the device's driver when the
627parent's power state changes.
628
6299. Autosuspend, or automatically-delayed suspends
630
631Changing a device's power state isn't free; it requires both time and energy.
632A device should be put in a low-power state only when there's some reason to
633think it will remain in that state for a substantial time. A common heuristic
634says that a device which hasn't been used for a while is liable to remain
635unused; following this advice, drivers should not allow devices to be suspended
636at run-time until they have been inactive for some minimum period. Even when
637the heuristic ends up being non-optimal, it will still prevent devices from
638"bouncing" too rapidly between low-power and full-power states.
639
640The term "autosuspend" is an historical remnant. It doesn't mean that the
641device is automatically suspended (the subsystem or driver still has to call
642the appropriate PM routines); rather it means that run-time suspends will
643automatically be delayed until the desired period of inactivity has elapsed.
644
645Inactivity is determined based on the power.last_busy field. Drivers should
646call pm_runtime_mark_last_busy() to update this field after carrying out I/O,
647typically just before calling pm_runtime_put_autosuspend(). The desired length
648of the inactivity period is a matter of policy. Subsystems can set this length
649initially by calling pm_runtime_set_autosuspend_delay(), but after device
650registration the length should be controlled by user space, using the
651/sys/devices/.../power/autosuspend_delay_ms attribute.
652
653In order to use autosuspend, subsystems or drivers must call
654pm_runtime_use_autosuspend() (preferably before registering the device), and
655thereafter they should use the various *_autosuspend() helper functions instead
656of the non-autosuspend counterparts:
657
658 Instead of: pm_runtime_suspend use: pm_runtime_autosuspend;
659 Instead of: pm_schedule_suspend use: pm_request_autosuspend;
660 Instead of: pm_runtime_put use: pm_runtime_put_autosuspend;
661 Instead of: pm_runtime_put_sync use: pm_runtime_put_sync_autosuspend.
662
663Drivers may also continue to use the non-autosuspend helper functions; they
664will behave normally, not taking the autosuspend delay into account.
665Similarly, if the power.use_autosuspend field isn't set then the autosuspend
666helper functions will behave just like the non-autosuspend counterparts.
667
668The implementation is well suited for asynchronous use in interrupt contexts.
669However such use inevitably involves races, because the PM core can't
670synchronize ->runtime_suspend() callbacks with the arrival of I/O requests.
671This synchronization must be handled by the driver, using its private lock.
672Here is a schematic pseudo-code example:
673
674 foo_read_or_write(struct foo_priv *foo, void *data)
675 {
676 lock(&foo->private_lock);
677 add_request_to_io_queue(foo, data);
678 if (foo->num_pending_requests++ == 0)
679 pm_runtime_get(&foo->dev);
680 if (!foo->is_suspended)
681 foo_process_next_request(foo);
682 unlock(&foo->private_lock);
683 }
684
685 foo_io_completion(struct foo_priv *foo, void *req)
686 {
687 lock(&foo->private_lock);
688 if (--foo->num_pending_requests == 0) {
689 pm_runtime_mark_last_busy(&foo->dev);
690 pm_runtime_put_autosuspend(&foo->dev);
691 } else {
692 foo_process_next_request(foo);
693 }
694 unlock(&foo->private_lock);
695 /* Send req result back to the user ... */
696 }
697
698 int foo_runtime_suspend(struct device *dev)
699 {
700 struct foo_priv foo = container_of(dev, ...);
701 int ret = 0;
702
703 lock(&foo->private_lock);
704 if (foo->num_pending_requests > 0) {
705 ret = -EBUSY;
706 } else {
707 /* ... suspend the device ... */
708 foo->is_suspended = 1;
709 }
710 unlock(&foo->private_lock);
711 return ret;
712 }
713
714 int foo_runtime_resume(struct device *dev)
715 {
716 struct foo_priv foo = container_of(dev, ...);
717
718 lock(&foo->private_lock);
719 /* ... resume the device ... */
720 foo->is_suspended = 0;
721 pm_runtime_mark_last_busy(&foo->dev);
722 if (foo->num_pending_requests > 0)
723 foo_process_requests(foo);
724 unlock(&foo->private_lock);
725 return 0;
726 }
727
728The important point is that after foo_io_completion() asks for an autosuspend,
729the foo_runtime_suspend() callback may race with foo_read_or_write().
730Therefore foo_runtime_suspend() has to check whether there are any pending I/O
731requests (while holding the private lock) before allowing the suspend to
732proceed.
733
734In addition, the power.autosuspend_delay field can be changed by user space at
735any time. If a driver cares about this, it can call
736pm_runtime_autosuspend_expiration() from within the ->runtime_suspend()
737callback while holding its private lock. If the function returns a nonzero
738value then the delay has not yet expired and the callback should return
739-EAGAIN.
diff --git a/Documentation/power/s2ram.txt b/Documentation/power/s2ram.txt
index 514b94fc931e..1bdfa0443773 100644
--- a/Documentation/power/s2ram.txt
+++ b/Documentation/power/s2ram.txt
@@ -49,6 +49,13 @@ machine that doesn't boot) is:
49 device (lspci and /sys/devices/pci* is your friend), and see if you can 49 device (lspci and /sys/devices/pci* is your friend), and see if you can
50 fix it, disable it, or trace into its resume function. 50 fix it, disable it, or trace into its resume function.
51 51
52 If no device matches the hash (or any matches appear to be false positives),
53 the culprit may be a device from a loadable kernel module that is not loaded
54 until after the hash is checked. You can check the hash against the current
55 devices again after more modules are loaded using sysfs:
56
57 cat /sys/power/pm_trace_dev_match
58
52For example, the above happens to be the VGA device on my EVO, which I 59For example, the above happens to be the VGA device on my EVO, which I
53used to run with "radeonfb" (it's an ATI Radeon mobility). It turns out 60used to run with "radeonfb" (it's an ATI Radeon mobility). It turns out
54that "radeonfb" simply cannot resume that device - it tries to set the 61that "radeonfb" simply cannot resume that device - it tries to set the
diff --git a/Documentation/power/swsusp.txt b/Documentation/power/swsusp.txt
index 9d60ab717a7b..ea718891a665 100644
--- a/Documentation/power/swsusp.txt
+++ b/Documentation/power/swsusp.txt
@@ -66,7 +66,8 @@ swsusp saves the state of the machine into active swaps and then reboots or
66powerdowns. You must explicitly specify the swap partition to resume from with 66powerdowns. You must explicitly specify the swap partition to resume from with
67``resume='' kernel option. If signature is found it loads and restores saved 67``resume='' kernel option. If signature is found it loads and restores saved
68state. If the option ``noresume'' is specified as a boot parameter, it skips 68state. If the option ``noresume'' is specified as a boot parameter, it skips
69the resuming. 69the resuming. If the option ``hibernate=nocompress'' is specified as a boot
70parameter, it saves hibernation image without compression.
70 71
71In the meantime while the system is suspended you should not add/remove any 72In the meantime while the system is suspended you should not add/remove any
72of the hardware, write to the filesystems, etc. 73of the hardware, write to the filesystems, etc.
diff --git a/Documentation/power/tricks.txt b/Documentation/power/tricks.txt
index 3b26bb502a4a..a1b8f7249f4c 100644
--- a/Documentation/power/tricks.txt
+++ b/Documentation/power/tricks.txt
@@ -1,6 +1,6 @@
1 swsusp/S3 tricks 1 swsusp/S3 tricks
2 ~~~~~~~~~~~~~~~~ 2 ~~~~~~~~~~~~~~~~
3Pavel Machek <pavel@suse.cz> 3Pavel Machek <pavel@ucw.cz>
4 4
5If you want to trick swsusp/S3 into working, you might want to try: 5If you want to trick swsusp/S3 into working, you might want to try:
6 6
diff --git a/Documentation/power/video.txt b/Documentation/power/video.txt
index 2b358498d095..3e6272bc4472 100644
--- a/Documentation/power/video.txt
+++ b/Documentation/power/video.txt
@@ -67,11 +67,11 @@ There are a few types of systems where video works after S3 resume:
67 POSTing bios works. Ole Rohne has patch to do just that at 67 POSTing bios works. Ole Rohne has patch to do just that at
68 http://dev.gentoo.org/~marineam/patch-radeonfb-2.6.11-rc2-mm2. 68 http://dev.gentoo.org/~marineam/patch-radeonfb-2.6.11-rc2-mm2.
69 69
70(8) on some systems, you can use the video_post utility mentioned here: 70(8) on some systems, you can use the video_post utility and or
71 http://bugzilla.kernel.org/show_bug.cgi?id=3670. Do echo 3 > /sys/power/state 71 do echo 3 > /sys/power/state && /usr/sbin/video_post - which will
72 && /usr/sbin/video_post - which will initialize the display in console mode. 72 initialize the display in console mode. If you are in X, you can switch
73 If you are in X, you can switch to a virtual terminal and back to X using 73 to a virtual terminal and back to X using CTRL+ALT+F1 - CTRL+ALT+F7 to get
74 CTRL+ALT+F1 - CTRL+ALT+F7 to get the display working in graphical mode again. 74 the display working in graphical mode again.
75 75
76Now, if you pass acpi_sleep=something, and it does not work with your 76Now, if you pass acpi_sleep=something, and it does not work with your
77bios, you'll get a hard crash during resume. Be careful. Also it is 77bios, you'll get a hard crash during resume. Be careful. Also it is
@@ -177,7 +177,7 @@ Mainboard Graphics card hack (or "how to do it")
177Asus A7V8X nVidia RIVA TNT2 model 64 s3_bios,s3_mode (4) 177Asus A7V8X nVidia RIVA TNT2 model 64 s3_bios,s3_mode (4)
178 178
179 179
180(*) from http://www.ubuntulinux.org/wiki/HoaryPMResults, not sure 180(*) from https://wiki.ubuntu.com/HoaryPMResults, not sure
181 which options to use. If you know, please tell me. 181 which options to use. If you know, please tell me.
182 182
183(***) To be tested with a newer kernel. 183(***) To be tested with a newer kernel.
diff --git a/Documentation/powerpc/booting-without-of.txt b/Documentation/powerpc/booting-without-of.txt
index 46d22105aa07..302db5da49b3 100644
--- a/Documentation/powerpc/booting-without-of.txt
+++ b/Documentation/powerpc/booting-without-of.txt
@@ -49,40 +49,13 @@ Table of Contents
49 f) MDIO on GPIOs 49 f) MDIO on GPIOs
50 g) SPI busses 50 g) SPI busses
51 51
52 VII - Marvell Discovery mv64[345]6x System Controller chips 52 VII - Specifying interrupt information for devices
53 1) The /system-controller node
54 2) Child nodes of /system-controller
55 a) Marvell Discovery MDIO bus
56 b) Marvell Discovery ethernet controller
57 c) Marvell Discovery PHY nodes
58 d) Marvell Discovery SDMA nodes
59 e) Marvell Discovery BRG nodes
60 f) Marvell Discovery CUNIT nodes
61 g) Marvell Discovery MPSCROUTING nodes
62 h) Marvell Discovery MPSCINTR nodes
63 i) Marvell Discovery MPSC nodes
64 j) Marvell Discovery Watch Dog Timer nodes
65 k) Marvell Discovery I2C nodes
66 l) Marvell Discovery PIC (Programmable Interrupt Controller) nodes
67 m) Marvell Discovery MPP (Multipurpose Pins) multiplexing nodes
68 n) Marvell Discovery GPP (General Purpose Pins) nodes
69 o) Marvell Discovery PCI host bridge node
70 p) Marvell Discovery CPU Error nodes
71 q) Marvell Discovery SRAM Controller nodes
72 r) Marvell Discovery PCI Error Handler nodes
73 s) Marvell Discovery Memory Controller nodes
74
75 VIII - Specifying interrupt information for devices
76 1) interrupts property 53 1) interrupts property
77 2) interrupt-parent property 54 2) interrupt-parent property
78 3) OpenPIC Interrupt Controllers 55 3) OpenPIC Interrupt Controllers
79 4) ISA Interrupt Controllers 56 4) ISA Interrupt Controllers
80 57
81 IX - Specifying GPIO information for devices 58 VIII - Specifying device power management information (sleep property)
82 1) gpios property
83 2) gpio-controller nodes
84
85 X - Specifying device power management information (sleep property)
86 59
87 Appendix A - Sample SOC node for MPC8540 60 Appendix A - Sample SOC node for MPC8540
88 61
@@ -1048,7 +1021,7 @@ IV - "dtc", the device tree compiler
1048 1021
1049 1022
1050dtc source code can be found at 1023dtc source code can be found at
1051<http://ozlabs.org/~dgibson/dtc/dtc.tar.gz> 1024<http://git.jdl.com/gitweb/?p=dtc.git>
1052 1025
1053WARNING: This version is still in early development stage; the 1026WARNING: This version is still in early development stage; the
1054resulting device-tree "blobs" have not yet been validated with the 1027resulting device-tree "blobs" have not yet been validated with the
diff --git a/Documentation/powerpc/dts-bindings/fsl/diu.txt b/Documentation/powerpc/dts-bindings/fsl/diu.txt
index deb35de70988..b66cb6d31d69 100644
--- a/Documentation/powerpc/dts-bindings/fsl/diu.txt
+++ b/Documentation/powerpc/dts-bindings/fsl/diu.txt
@@ -4,10 +4,17 @@ The Freescale DIU is a LCD controller, with proper hardware, it can also
4drive DVI monitors. 4drive DVI monitors.
5 5
6Required properties: 6Required properties:
7- compatible : should be "fsl-diu". 7- compatible : should be "fsl,diu" or "fsl,mpc5121-diu".
8- reg : should contain at least address and length of the DIU register 8- reg : should contain at least address and length of the DIU register
9 set. 9 set.
10- Interrupts : one DIU interrupt should be describe here. 10- interrupts : one DIU interrupt should be described here.
11- interrupt-parent : the phandle for the interrupt controller that
12 services interrupts for this device.
13
14Optional properties:
15- edid : verbatim EDID data block describing attached display.
16 Data from the detailed timing descriptor will be used to
17 program the display controller.
11 18
12Example (MPC8610HPCD): 19Example (MPC8610HPCD):
13 display@2c000 { 20 display@2c000 {
@@ -16,3 +23,12 @@ Example (MPC8610HPCD):
16 interrupts = <72 2>; 23 interrupts = <72 2>;
17 interrupt-parent = <&mpic>; 24 interrupt-parent = <&mpic>;
18 }; 25 };
26
27Example for MPC5121:
28 display@2100 {
29 compatible = "fsl,mpc5121-diu";
30 reg = <0x2100 0x100>;
31 interrupts = <64 0x8>;
32 interrupt-parent = <&ipic>;
33 edid = [edid-data];
34 };
diff --git a/Documentation/powerpc/dts-bindings/fsl/esdhc.txt b/Documentation/powerpc/dts-bindings/fsl/esdhc.txt
index 8a0040738969..64bcb8be973c 100644
--- a/Documentation/powerpc/dts-bindings/fsl/esdhc.txt
+++ b/Documentation/powerpc/dts-bindings/fsl/esdhc.txt
@@ -14,6 +14,8 @@ Required properties:
14 reports inverted write-protect state; 14 reports inverted write-protect state;
15 - sdhci,1-bit-only : (optional) specifies that a controller can 15 - sdhci,1-bit-only : (optional) specifies that a controller can
16 only handle 1-bit data transfers. 16 only handle 1-bit data transfers.
17 - sdhci,auto-cmd12: (optional) specifies that a controller can
18 only handle auto CMD12.
17 19
18Example: 20Example:
19 21
diff --git a/Documentation/powerpc/dts-bindings/fsl/i2c.txt b/Documentation/powerpc/dts-bindings/fsl/i2c.txt
index 50da20310585..1eacd6b20ed5 100644
--- a/Documentation/powerpc/dts-bindings/fsl/i2c.txt
+++ b/Documentation/powerpc/dts-bindings/fsl/i2c.txt
@@ -20,6 +20,7 @@ Recommended properties :
20 - fsl,preserve-clocking : boolean; if defined, the clock settings 20 - fsl,preserve-clocking : boolean; if defined, the clock settings
21 from the bootloader are preserved (not touched). 21 from the bootloader are preserved (not touched).
22 - clock-frequency : desired I2C bus clock frequency in Hz. 22 - clock-frequency : desired I2C bus clock frequency in Hz.
23 - fsl,timeout : I2C bus timeout in microseconds.
23 24
24Examples : 25Examples :
25 26
@@ -59,4 +60,5 @@ Examples :
59 interrupts = <43 2>; 60 interrupts = <43 2>;
60 interrupt-parent = <&mpic>; 61 interrupt-parent = <&mpic>;
61 clock-frequency = <400000>; 62 clock-frequency = <400000>;
63 fsl,timeout = <10000>;
62 }; 64 };
diff --git a/Documentation/powerpc/dts-bindings/fsl/spi.txt b/Documentation/powerpc/dts-bindings/fsl/spi.txt
index 80510c018eea..777abd7399d5 100644
--- a/Documentation/powerpc/dts-bindings/fsl/spi.txt
+++ b/Documentation/powerpc/dts-bindings/fsl/spi.txt
@@ -1,7 +1,9 @@
1* SPI (Serial Peripheral Interface) 1* SPI (Serial Peripheral Interface)
2 2
3Required properties: 3Required properties:
4- cell-index : SPI controller index. 4- cell-index : QE SPI subblock index.
5 0: QE subblock SPI1
6 1: QE subblock SPI2
5- compatible : should be "fsl,spi". 7- compatible : should be "fsl,spi".
6- mode : the SPI operation mode, it can be "cpu" or "cpu-qe". 8- mode : the SPI operation mode, it can be "cpu" or "cpu-qe".
7- reg : Offset and length of the register set for the device 9- reg : Offset and length of the register set for the device
@@ -29,3 +31,23 @@ Example:
29 gpios = <&gpio 18 1 // device reg=<0> 31 gpios = <&gpio 18 1 // device reg=<0>
30 &gpio 19 1>; // device reg=<1> 32 &gpio 19 1>; // device reg=<1>
31 }; 33 };
34
35
36* eSPI (Enhanced Serial Peripheral Interface)
37
38Required properties:
39- compatible : should be "fsl,mpc8536-espi".
40- reg : Offset and length of the register set for the device.
41- interrupts : should contain eSPI interrupt, the device has one interrupt.
42- fsl,espi-num-chipselects : the number of the chipselect signals.
43
44Example:
45 spi@110000 {
46 #address-cells = <1>;
47 #size-cells = <0>;
48 compatible = "fsl,mpc8536-espi";
49 reg = <0x110000 0x1000>;
50 interrupts = <53 0x2>;
51 interrupt-parent = <&mpic>;
52 fsl,espi-num-chipselects = <4>;
53 };
diff --git a/Documentation/powerpc/dts-bindings/fsl/usb.txt b/Documentation/powerpc/dts-bindings/fsl/usb.txt
index b00152402694..bd5723f0b67e 100644
--- a/Documentation/powerpc/dts-bindings/fsl/usb.txt
+++ b/Documentation/powerpc/dts-bindings/fsl/usb.txt
@@ -8,6 +8,7 @@ and additions :
8Required properties : 8Required properties :
9 - compatible : Should be "fsl-usb2-mph" for multi port host USB 9 - compatible : Should be "fsl-usb2-mph" for multi port host USB
10 controllers, or "fsl-usb2-dr" for dual role USB controllers 10 controllers, or "fsl-usb2-dr" for dual role USB controllers
11 or "fsl,mpc5121-usb2-dr" for dual role USB controllers of MPC5121
11 - phy_type : For multi port host USB controllers, should be one of 12 - phy_type : For multi port host USB controllers, should be one of
12 "ulpi", or "serial". For dual role USB controllers, should be 13 "ulpi", or "serial". For dual role USB controllers, should be
13 one of "ulpi", "utmi", "utmi_wide", or "serial". 14 one of "ulpi", "utmi", "utmi_wide", or "serial".
@@ -33,6 +34,12 @@ Recommended properties :
33 - interrupt-parent : the phandle for the interrupt controller that 34 - interrupt-parent : the phandle for the interrupt controller that
34 services interrupts for this device. 35 services interrupts for this device.
35 36
37Optional properties :
38 - fsl,invert-drvvbus : boolean; for MPC5121 USB0 only. Indicates the
39 port power polarity of internal PHY signal DRVVBUS is inverted.
40 - fsl,invert-pwr-fault : boolean; for MPC5121 USB0 only. Indicates
41 the PWR_FAULT signal polarity is inverted.
42
36Example multi port host USB controller device node : 43Example multi port host USB controller device node :
37 usb@22000 { 44 usb@22000 {
38 compatible = "fsl-usb2-mph"; 45 compatible = "fsl-usb2-mph";
@@ -57,3 +64,18 @@ Example dual role USB controller device node :
57 dr_mode = "otg"; 64 dr_mode = "otg";
58 phy = "ulpi"; 65 phy = "ulpi";
59 }; 66 };
67
68Example dual role USB controller device node for MPC5121ADS:
69
70 usb@4000 {
71 compatible = "fsl,mpc5121-usb2-dr";
72 reg = <0x4000 0x1000>;
73 #address-cells = <1>;
74 #size-cells = <0>;
75 interrupt-parent = < &ipic >;
76 interrupts = <44 0x8>;
77 dr_mode = "otg";
78 phy_type = "utmi_wide";
79 fsl,invert-drvvbus;
80 fsl,invert-pwr-fault;
81 };
diff --git a/Documentation/powerpc/hvcs.txt b/Documentation/powerpc/hvcs.txt
index f93462c5db25..6d8be3468d7d 100644
--- a/Documentation/powerpc/hvcs.txt
+++ b/Documentation/powerpc/hvcs.txt
@@ -560,7 +560,7 @@ The proper channel for reporting bugs is either through the Linux OS
560distribution company that provided your OS or by posting issues to the 560distribution company that provided your OS or by posting issues to the
561PowerPC development mailing list at: 561PowerPC development mailing list at:
562 562
563linuxppc-dev@ozlabs.org 563linuxppc-dev@lists.ozlabs.org
564 564
565This request is to provide a documented and searchable public exchange 565This request is to provide a documented and searchable public exchange
566of the problems and solutions surrounding this driver for the benefit of 566of the problems and solutions surrounding this driver for the benefit of
diff --git a/Documentation/rt-mutex-design.txt b/Documentation/rt-mutex-design.txt
index 8df0b782c4d7..33ed8007a845 100644
--- a/Documentation/rt-mutex-design.txt
+++ b/Documentation/rt-mutex-design.txt
@@ -364,7 +364,7 @@ process this is rather easy to know what needs to be adjusted.
364 364
365The functions implementing the task adjustments are rt_mutex_adjust_prio, 365The functions implementing the task adjustments are rt_mutex_adjust_prio,
366__rt_mutex_adjust_prio (same as the former, but expects the task pi_lock 366__rt_mutex_adjust_prio (same as the former, but expects the task pi_lock
367to already be taken), rt_mutex_get_prio, and rt_mutex_setprio. 367to already be taken), rt_mutex_getprio, and rt_mutex_setprio.
368 368
369rt_mutex_getprio and rt_mutex_setprio are only used in __rt_mutex_adjust_prio. 369rt_mutex_getprio and rt_mutex_setprio are only used in __rt_mutex_adjust_prio.
370 370
diff --git a/Documentation/s390/Debugging390.txt b/Documentation/s390/Debugging390.txt
index 1eb576a023bd..86f9f74b2b34 100644
--- a/Documentation/s390/Debugging390.txt
+++ b/Documentation/s390/Debugging390.txt
@@ -2531,5 +2531,5 @@ Special Thanks
2531============== 2531==============
2532Special thanks to Neale Ferguson who maintains a much 2532Special thanks to Neale Ferguson who maintains a much
2533prettier HTML version of this page at 2533prettier HTML version of this page at
2534http://penguinvm.princeton.edu/notes.html#Debug390 2534http://linuxvm.org/penguinvm/
2535Bob Grainger Stefan Bader & others for reporting bugs 2535Bob Grainger Stefan Bader & others for reporting bugs
diff --git a/Documentation/scsi/BusLogic.txt b/Documentation/scsi/BusLogic.txt
index 98023baa0f0d..d7fbc9488b98 100644
--- a/Documentation/scsi/BusLogic.txt
+++ b/Documentation/scsi/BusLogic.txt
@@ -47,7 +47,7 @@ tune driver performance and error recovery to their particular needs.
47The latest information on Linux support for BusLogic SCSI Host Adapters, as 47The latest information on Linux support for BusLogic SCSI Host Adapters, as
48well as the most recent release of this driver and the latest firmware for the 48well as the most recent release of this driver and the latest firmware for the
49BT-948/958/958D, will always be available from my Linux Home Page at URL 49BT-948/958/958D, will always be available from my Linux Home Page at URL
50"http://www.dandelion.com/Linux/". 50"http://sourceforge.net/projects/dandelion/".
51 51
52Bug reports should be sent via electronic mail to "lnz@dandelion.com". Please 52Bug reports should be sent via electronic mail to "lnz@dandelion.com". Please
53include with the bug report the complete configuration messages reported by the 53include with the bug report the complete configuration messages reported by the
diff --git a/Documentation/scsi/ChangeLog.lpfc b/Documentation/scsi/ChangeLog.lpfc
index e759e92e286d..337c924cc81f 100644
--- a/Documentation/scsi/ChangeLog.lpfc
+++ b/Documentation/scsi/ChangeLog.lpfc
@@ -807,7 +807,7 @@ Changes from 20040908 to 20040920
807 lpfc_disc_done/lpfc_do_dpc cleanup - lpfc_disc_done can return 807 lpfc_disc_done/lpfc_do_dpc cleanup - lpfc_disc_done can return
808 void - move lpfc_do_dpc and lpfc_disc_done to lpfc_hbadisc.c - 808 void - move lpfc_do_dpc and lpfc_disc_done to lpfc_hbadisc.c -
809 remove checking of list emptiness before calling lpfc_disc_done, 809 remove checking of list emptiness before calling lpfc_disc_done,
810 it handles the emtpy list case just fine and the additional 810 it handles the empty list case just fine and the additional
811 instructions cost less then the bustlocked spinlock operations. 811 instructions cost less then the bustlocked spinlock operations.
812 * Integrated patch from Christoph Hellwig: This adds a new 64bit 812 * Integrated patch from Christoph Hellwig: This adds a new 64bit
813 counter instead, brd_no isn't reused anymore. Also some tiny 813 counter instead, brd_no isn't reused anymore. Also some tiny
diff --git a/Documentation/scsi/ChangeLog.megaraid b/Documentation/scsi/ChangeLog.megaraid
index 38e9e7cadc90..5e07d320817d 100644
--- a/Documentation/scsi/ChangeLog.megaraid
+++ b/Documentation/scsi/ChangeLog.megaraid
@@ -215,7 +215,7 @@ Older Version : 2.20.4.5 (scsi module), 2.20.2.5 (cmm module)
215 215
2163. Convert pci_module_init to pci_register_driver 2163. Convert pci_module_init to pci_register_driver
217 Convert from pci_module_init to pci_register_driver 217 Convert from pci_module_init to pci_register_driver
218 (from:http://kerneljanitors.org/TODO) 218 (from:http://kernelnewbies.org/KernelJanitors/TODO)
219 - Signed-off-by: Domen Puncer <domen@coderock.org> 219 - Signed-off-by: Domen Puncer <domen@coderock.org>
220 220
2214. Use the pre defined DMA mask constants from dma-mapping.h 2214. Use the pre defined DMA mask constants from dma-mapping.h
diff --git a/Documentation/scsi/FlashPoint.txt b/Documentation/scsi/FlashPoint.txt
index 1540a92f6d2b..5b5f29cb9f8b 100644
--- a/Documentation/scsi/FlashPoint.txt
+++ b/Documentation/scsi/FlashPoint.txt
@@ -13,7 +13,7 @@ operating system support to its BusLogic brand of FlashPoint Ultra SCSI
13host adapters. All of BusLogic's other SCSI host adapters, including the 13host adapters. All of BusLogic's other SCSI host adapters, including the
14MultiMaster line, currently support the Linux operating system. Linux 14MultiMaster line, currently support the Linux operating system. Linux
15drivers and information will be available on October 15th at 15drivers and information will be available on October 15th at
16http://www.dandelion.com/Linux/. 16http://sourceforge.net/projects/dandelion/.
17 17
18"Mylex is committed to supporting the Linux community," says Peter Shambora, 18"Mylex is committed to supporting the Linux community," says Peter Shambora,
19vice president of marketing for Mylex. "We have supported Linux driver 19vice president of marketing for Mylex. "We have supported Linux driver
@@ -27,7 +27,7 @@ Linux is a freely-distributed implementation of UNIX for Intel x86, Sun
27SPARC, SGI MIPS, Motorola 68k, Digital Alpha AXP and Motorola PowerPC 27SPARC, SGI MIPS, Motorola 68k, Digital Alpha AXP and Motorola PowerPC
28machines. It supports a wide range of software, including the X Window 28machines. It supports a wide range of software, including the X Window
29System, Emacs, and TCP/IP networking. Further information is available at 29System, Emacs, and TCP/IP networking. Further information is available at
30http://www.linux.org and http://www.ssc.com/linux. 30http://www.linux.org and http://www.ssc.com/.
31 31
32FlashPoint Host Adapters 32FlashPoint Host Adapters
33 33
diff --git a/Documentation/scsi/Mylex.txt b/Documentation/scsi/Mylex.txt
index cdf69293f7d5..3797f3e6c2b5 100644
--- a/Documentation/scsi/Mylex.txt
+++ b/Documentation/scsi/Mylex.txt
@@ -2,4 +2,4 @@ Please see the file README.BusLogic for information about Linux support for
2Mylex (formerly BusLogic) MultiMaster and FlashPoint SCSI Host Adapters. 2Mylex (formerly BusLogic) MultiMaster and FlashPoint SCSI Host Adapters.
3 3
4The Mylex DAC960 PCI RAID Controllers are now supported. Please consult 4The Mylex DAC960 PCI RAID Controllers are now supported. Please consult
5http://www.dandelion.com/Linux/ for further information on the DAC960 driver. 5http://sourceforge.net/projects/dandelion for further information on the DAC960 driver.
diff --git a/Documentation/scsi/NinjaSCSI.txt b/Documentation/scsi/NinjaSCSI.txt
index 3229b64cf24e..ac8db8ceec77 100644
--- a/Documentation/scsi/NinjaSCSI.txt
+++ b/Documentation/scsi/NinjaSCSI.txt
@@ -3,8 +3,6 @@
3 3
41. Comment 41. Comment
5 This is Workbit corp.'s(http://www.workbit.co.jp/) NinjaSCSI-3 5 This is Workbit corp.'s(http://www.workbit.co.jp/) NinjaSCSI-3
6(http://www.workbit.co.jp/ts/z_nj3r.html) and NinjaSCSI-32Bi
7(http://www.workbit.co.jp/ts/z_njsc32bi.html) PCMCIA card driver module
8for Linux. 6for Linux.
9 7
102. My Linux environment 82. My Linux environment
diff --git a/Documentation/scsi/aic79xx.txt b/Documentation/scsi/aic79xx.txt
index c014eccaf19f..16e054c9c70b 100644
--- a/Documentation/scsi/aic79xx.txt
+++ b/Documentation/scsi/aic79xx.txt
@@ -447,7 +447,7 @@ The following information is available in this file:
447 http://www.adaptec.com/buy-cables/. 447 http://www.adaptec.com/buy-cables/.
448 448
449 Europe 449 Europe
450 - Visit our Web site at http://www.adaptec-europe.com/. 450 - Visit our Web site at http://www.adaptec.com/en-US/_common/world_index.
451 - To speak with a Technical Support Specialist, call, or email, 451 - To speak with a Technical Support Specialist, call, or email,
452 * German: +49 89 4366 5522, Monday-Friday, 9:00-17:00 CET, 452 * German: +49 89 4366 5522, Monday-Friday, 9:00-17:00 CET,
453 http://ask-de.adaptec.com/. 453 http://ask-de.adaptec.com/.
diff --git a/Documentation/scsi/aic7xxx.txt b/Documentation/scsi/aic7xxx.txt
index b7e238cbb5a7..18f8d1905e6a 100644
--- a/Documentation/scsi/aic7xxx.txt
+++ b/Documentation/scsi/aic7xxx.txt
@@ -344,7 +344,7 @@ The following information is available in this file:
344 http://www.adaptec.com/buy-cables/. 344 http://www.adaptec.com/buy-cables/.
345 345
346 Europe 346 Europe
347 - Visit our Web site at http://www.adaptec-europe.com/. 347 - Visit our Web site at http://www.adaptec.com/en-US/_common/world_index.
348 - To speak with a Technical Support Specialist, call, or email, 348 - To speak with a Technical Support Specialist, call, or email,
349 * German: +49 89 4366 5522, Monday-Friday, 9:00-17:00 CET, 349 * German: +49 89 4366 5522, Monday-Friday, 9:00-17:00 CET,
350 http://ask-de.adaptec.com/. 350 http://ask-de.adaptec.com/.
diff --git a/Documentation/scsi/hpsa.txt b/Documentation/scsi/hpsa.txt
new file mode 100644
index 000000000000..dca658362cbf
--- /dev/null
+++ b/Documentation/scsi/hpsa.txt
@@ -0,0 +1,107 @@
1
2HPSA - Hewlett Packard Smart Array driver
3-----------------------------------------
4
5This file describes the hpsa SCSI driver for HP Smart Array controllers.
6The hpsa driver is intended to supplant the cciss driver for newer
7Smart Array controllers. The hpsa driver is a SCSI driver, while the
8cciss driver is a "block" driver. Actually cciss is both a block
9driver (for logical drives) AND a SCSI driver (for tape drives). This
10"split-brained" design of the cciss driver is a source of excess
11complexity and eliminating that complexity is one of the reasons
12for hpsa to exist.
13
14Supported devices:
15------------------
16
17Smart Array P212
18Smart Array P410
19Smart Array P410i
20Smart Array P411
21Smart Array P812
22Smart Array P712m
23Smart Array P711m
24StorageWorks P1210m
25
26Additionally, older Smart Arrays may work with the hpsa driver if the kernel
27boot parameter "hpsa_allow_any=1" is specified, however these are not tested
28nor supported by HP with this driver. For older Smart Arrays, the cciss
29driver should still be used.
30
31HPSA specific entries in /sys
32-----------------------------
33
34 In addition to the generic SCSI attributes available in /sys, hpsa supports
35 the following attributes:
36
37 HPSA specific host attributes:
38 ------------------------------
39
40 /sys/class/scsi_host/host*/rescan
41 /sys/class/scsi_host/host*/firmware_revision
42
43 the host "rescan" attribute is a write only attribute. Writing to this
44 attribute will cause the driver to scan for new, changed, or removed devices
45 (e.g. hot-plugged tape drives, or newly configured or deleted logical drives,
46 etc.) and notify the SCSI midlayer of any changes detected. Normally this is
47 triggered automatically by HP's Array Configuration Utility (either the GUI or
48 command line variety) so for logical drive changes, the user should not
49 normally have to use this. It may be useful when hot plugging devices like
50 tape drives, or entire storage boxes containing pre-configured logical drives.
51
52 The "firmware_revision" attribute contains the firmware version of the Smart Array.
53 For example:
54
55 root@host:/sys/class/scsi_host/host4# cat firmware_revision
56 7.14
57
58 HPSA specific disk attributes:
59 ------------------------------
60
61 /sys/class/scsi_disk/c:b:t:l/device/unique_id
62 /sys/class/scsi_disk/c:b:t:l/device/raid_level
63 /sys/class/scsi_disk/c:b:t:l/device/lunid
64
65 (where c:b:t:l are the controller, bus, target and lun of the device)
66
67 For example:
68
69 root@host:/sys/class/scsi_disk/4:0:0:0/device# cat unique_id
70 600508B1001044395355323037570F77
71 root@host:/sys/class/scsi_disk/4:0:0:0/device# cat lunid
72 0x0000004000000000
73 root@host:/sys/class/scsi_disk/4:0:0:0/device# cat raid_level
74 RAID 0
75
76HPSA specific ioctls:
77---------------------
78
79 For compatibility with applications written for the cciss driver, many, but
80 not all of the ioctls supported by the cciss driver are also supported by the
81 hpsa driver. The data structures used by these are described in
82 include/linux/cciss_ioctl.h
83
84 CCISS_DEREGDISK
85 CCISS_REGNEWDISK
86 CCISS_REGNEWD
87
88 The above three ioctls all do exactly the same thing, which is to cause the driver
89 to rescan for new devices. This does exactly the same thing as writing to the
90 hpsa specific host "rescan" attribute.
91
92 CCISS_GETPCIINFO
93
94 Returns PCI domain, bus, device and function and "board ID" (PCI subsystem ID).
95
96 CCISS_GETDRIVVER
97
98 Returns driver version in three bytes encoded as:
99 (major_version << 16) | (minor_version << 8) | (subminor_version)
100
101 CCISS_PASSTHRU
102 CCISS_BIG_PASSTHRU
103
104 Allows "BMIC" and "CISS" commands to be passed through to the Smart Array.
105 These are used extensively by the HP Array Configuration Utility, SNMP storage
106 agents, etc. See cciss_vol_status at http://cciss.sf.net for some examples.
107
diff --git a/Documentation/scsi/ibmmca.txt b/Documentation/scsi/ibmmca.txt
index 3920f28710c4..45d61ad8c6f7 100644
--- a/Documentation/scsi/ibmmca.txt
+++ b/Documentation/scsi/ibmmca.txt
@@ -1109,7 +1109,7 @@
1109 Q: Where can I find the latest info about this driver? 1109 Q: Where can I find the latest info about this driver?
1110 A: See the file MAINTAINERS for the current WWW-address, which offers 1110 A: See the file MAINTAINERS for the current WWW-address, which offers
1111 updates, info and Q/A lists. At this file's origin, the webaddress 1111 updates, info and Q/A lists. At this file's origin, the webaddress
1112 was: http://www.uni-mainz.de/~langm000/linux.html 1112 was: http://www.staff.uni-mainz.de/mlang/linux.html
1113 Q: My SCSI-adapter is not recognized by the driver, what can I do? 1113 Q: My SCSI-adapter is not recognized by the driver, what can I do?
1114 A: Just force it to be recognized by kernel parameters. See section 5.1. 1114 A: Just force it to be recognized by kernel parameters. See section 5.1.
1115 If this really happens, do also send e-mail to the maintainer, as 1115 If this really happens, do also send e-mail to the maintainer, as
diff --git a/Documentation/scsi/osst.txt b/Documentation/scsi/osst.txt
index 2b21890bc983..ad86c6d1e898 100644
--- a/Documentation/scsi/osst.txt
+++ b/Documentation/scsi/osst.txt
@@ -135,7 +135,7 @@ The driver development is coordinated through a mailing list
135a CVS repository and some web pages. 135a CVS repository and some web pages.
136The tester's pages which contain recent news and updated drivers to download 136The tester's pages which contain recent news and updated drivers to download
137can be found on 137can be found on
138http://linux1.onstream.nl/test/ 138http://sourceforge.net/projects/osst/
139 139
140If you find any problems, please have a look at the tester's page in order 140If you find any problems, please have a look at the tester's page in order
141to see whether the problem is already known and solved. Otherwise, please 141to see whether the problem is already known and solved. Otherwise, please
diff --git a/Documentation/scsi/ppa.txt b/Documentation/scsi/ppa.txt
index 067ac394e0b2..05ff47dbe8d1 100644
--- a/Documentation/scsi/ppa.txt
+++ b/Documentation/scsi/ppa.txt
@@ -1,13 +1,13 @@
1-------- Terse where to get ZIP Drive help info -------- 1-------- Terse where to get ZIP Drive help info --------
2 2
3General Iomega ZIP drive page for Linux: 3General Iomega ZIP drive page for Linux:
4http://www.torque.net/~campbell/ 4http://web.archive.org/web/*/http://www.torque.net/~campbell/
5 5
6Driver archive for old drivers: 6Driver archive for old drivers:
7http://www.torque.net/~campbell/ppa/ 7http://web.archive.org/web/*/http://www.torque.net/~campbell/ppa
8 8
9Linux Parport page (parallel port) 9Linux Parport page (parallel port)
10http://www.torque.net/parport/ 10http://web.archive.org/web/*/http://www.torque.net/parport/
11 11
12Email list for Linux Parport 12Email list for Linux Parport
13linux-parport@torque.net 13linux-parport@torque.net
diff --git a/Documentation/scsi/scsi-generic.txt b/Documentation/scsi/scsi-generic.txt
index c38e2b3648e4..0a22ab8ea0c1 100644
--- a/Documentation/scsi/scsi-generic.txt
+++ b/Documentation/scsi/scsi-generic.txt
@@ -34,11 +34,11 @@ http://www.tldp.org/HOWTO/SCSI-Generic-HOWTO
34This describes the sg version 3 driver found in the lk 2.4 series. 34This describes the sg version 3 driver found in the lk 2.4 series.
35The LDP renders documents in single and multiple page HTML, postscript 35The LDP renders documents in single and multiple page HTML, postscript
36and pdf. This document can also be found at: 36and pdf. This document can also be found at:
37http://www.torque.net/sg/p/sg_v3_ho.html 37http://sg.danny.cz/sg/p/sg_v3_ho.html
38 38
39Documentation for the version 2 sg driver found in the lk 2.2 series can 39Documentation for the version 2 sg driver found in the lk 2.2 series can
40be found at http://www.torque.net/sg/p/scsi-generic.txt . A larger version 40be found at http://sg.danny.cz/sg/. A larger version
41is at: http://www.torque.net/sg/p/scsi-generic_long.txt . 41is at: http://sg.danny.cz/sg/p/scsi-generic_long.txt.
42 42
43The original documentation for the sg driver (prior to lk 2.2.6) can be 43The original documentation for the sg driver (prior to lk 2.2.6) can be
44found at http://www.torque.net/sg/p/original/SCSI-Programming-HOWTO.txt 44found at http://www.torque.net/sg/p/original/SCSI-Programming-HOWTO.txt
@@ -61,7 +61,7 @@ There are two packages of sg utilities:
61 - sg_utils for the sg version 2 (and original) driver found in lk 2.2 61 - sg_utils for the sg version 2 (and original) driver found in lk 2.2
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://www.torque.net/sg and 64capabilities. They can be found at: http://sg.danny.cz/sg/sg3_utils.html and
65freshmeat.net 65freshmeat.net
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.
diff --git a/Documentation/scsi/scsi-parameters.txt b/Documentation/scsi/scsi-parameters.txt
new file mode 100644
index 000000000000..21e5798526ee
--- /dev/null
+++ b/Documentation/scsi/scsi-parameters.txt
@@ -0,0 +1,139 @@
1 SCSI Kernel Parameters
2 ~~~~~~~~~~~~~~~~~~~~~~
3
4See Documentation/kernel-parameters.txt for general information on
5specifying module parameters.
6
7This document may not be entirely up to date and comprehensive. The command
8"modinfo -p ${modulename}" shows a current list of all parameters of a loadable
9module. Loadable modules, after being loaded into the running kernel, also
10reveal their parameters in /sys/module/${modulename}/parameters/. Some of these
11parameters may be changed at runtime by the command
12"echo -n ${value} > /sys/module/${modulename}/parameters/${parm}".
13
14
15 advansys= [HW,SCSI]
16 See header of drivers/scsi/advansys.c.
17
18 aha152x= [HW,SCSI]
19 See Documentation/scsi/aha152x.txt.
20
21 aha1542= [HW,SCSI]
22 Format: <portbase>[,<buson>,<busoff>[,<dmaspeed>]]
23
24 aic7xxx= [HW,SCSI]
25 See Documentation/scsi/aic7xxx.txt.
26
27 aic79xx= [HW,SCSI]
28 See Documentation/scsi/aic79xx.txt.
29
30 atascsi= [HW,SCSI] Atari SCSI
31
32 BusLogic= [HW,SCSI]
33 See drivers/scsi/BusLogic.c, comment before function
34 BusLogic_ParseDriverOptions().
35
36 dtc3181e= [HW,SCSI]
37
38 eata= [HW,SCSI]
39
40 fd_mcs= [HW,SCSI]
41 See header of drivers/scsi/fd_mcs.c.
42
43 fdomain= [HW,SCSI]
44 See header of drivers/scsi/fdomain.c.
45
46 gdth= [HW,SCSI]
47 See header of drivers/scsi/gdth.c.
48
49 gvp11= [HW,SCSI]
50
51 ibmmcascsi= [HW,MCA,SCSI] IBM MicroChannel SCSI adapter
52 See Documentation/mca.txt.
53
54 in2000= [HW,SCSI]
55 See header of drivers/scsi/in2000.c.
56
57 ips= [HW,SCSI] Adaptec / IBM ServeRAID controller
58 See header of drivers/scsi/ips.c.
59
60 mac5380= [HW,SCSI] Format:
61 <can_queue>,<cmd_per_lun>,<sg_tablesize>,<hostid>,<use_tags>
62
63 max_luns= [SCSI] Maximum number of LUNs to probe.
64 Should be between 1 and 2^32-1.
65
66 max_report_luns=
67 [SCSI] Maximum number of LUNs received.
68 Should be between 1 and 16384.
69
70 NCR_D700= [HW,SCSI]
71 See header of drivers/scsi/NCR_D700.c.
72
73 ncr5380= [HW,SCSI]
74
75 ncr53c400= [HW,SCSI]
76
77 ncr53c400a= [HW,SCSI]
78
79 ncr53c406a= [HW,SCSI]
80
81 ncr53c8xx= [HW,SCSI]
82
83 nodisconnect [HW,SCSI,M68K] Disables SCSI disconnects.
84
85 osst= [HW,SCSI] SCSI Tape Driver
86 Format: <buffer_size>,<write_threshold>
87 See also Documentation/scsi/st.txt.
88
89 pas16= [HW,SCSI]
90 See header of drivers/scsi/pas16.c.
91
92 scsi_debug_*= [SCSI]
93 See drivers/scsi/scsi_debug.c.
94
95 scsi_default_dev_flags=
96 [SCSI] SCSI default device flags
97 Format: <integer>
98
99 scsi_dev_flags= [SCSI] Black/white list entry for vendor and model
100 Format: <vendor>:<model>:<flags>
101 (flags are integer value)
102
103 scsi_logging_level= [SCSI] a bit mask of logging levels
104 See drivers/scsi/scsi_logging.h for bits. Also
105 settable via sysctl at dev.scsi.logging_level
106 (/proc/sys/dev/scsi/logging_level).
107 There is also a nice 'scsi_logging_level' script in the
108 S390-tools package, available for download at
109 http://www-128.ibm.com/developerworks/linux/linux390/s390-tools-1.5.4.html
110
111 scsi_mod.scan= [SCSI] sync (default) scans SCSI busses as they are
112 discovered. async scans them in kernel threads,
113 allowing boot to proceed. none ignores them, expecting
114 user space to do the scan.
115
116 sim710= [SCSI,HW]
117 See header of drivers/scsi/sim710.c.
118
119 st= [HW,SCSI] SCSI tape parameters (buffers, etc.)
120 See Documentation/scsi/st.txt.
121
122 sym53c416= [HW,SCSI]
123 See header of drivers/scsi/sym53c416.c.
124
125 t128= [HW,SCSI]
126 See header of drivers/scsi/t128.c.
127
128 tmscsim= [HW,SCSI]
129 See comment before function dc390_setup() in
130 drivers/scsi/tmscsim.c.
131
132 u14-34f= [HW,SCSI] UltraStor 14F/34F SCSI host adapter
133 See header of drivers/scsi/u14-34f.c.
134
135 wd33c93= [HW,SCSI]
136 See header of drivers/scsi/wd33c93.c.
137
138 wd7000= [HW,SCSI]
139 See header of drivers/scsi/wd7000.c.
diff --git a/Documentation/scsi/scsi.txt b/Documentation/scsi/scsi.txt
index dd1bbf4e98e3..3d99d38cb62a 100644
--- a/Documentation/scsi/scsi.txt
+++ b/Documentation/scsi/scsi.txt
@@ -4,8 +4,8 @@ The Linux Documentation Project (LDP) maintains a document describing
4the SCSI subsystem in the Linux kernel (lk) 2.4 series. See: 4the SCSI subsystem in the Linux kernel (lk) 2.4 series. See:
5http://www.tldp.org/HOWTO/SCSI-2.4-HOWTO . The LDP has single 5http://www.tldp.org/HOWTO/SCSI-2.4-HOWTO . The LDP has single
6and multiple page HTML renderings as well as postscript and pdf. 6and multiple page HTML renderings as well as postscript and pdf.
7It can also be found at http://www.torque.net/scsi/SCSI-2.4-HOWTO . 7It can also be found at:
8 8http://web.archive.org/web/*/http://www.torque.net/scsi/SCSI-2.4-HOWTO
9 9
10Notes on using modules in the SCSI subsystem 10Notes on using modules in the SCSI subsystem
11============================================ 11============================================
diff --git a/Documentation/scsi/scsi_mid_low_api.txt b/Documentation/scsi/scsi_mid_low_api.txt
index de67229251d8..570ef2b3d79b 100644
--- a/Documentation/scsi/scsi_mid_low_api.txt
+++ b/Documentation/scsi/scsi_mid_low_api.txt
@@ -43,7 +43,7 @@ There is a SCSI documentation directory within the kernel source tree,
43typically Documentation/scsi . Most documents are in plain 43typically Documentation/scsi . Most documents are in plain
44(i.e. ASCII) text. This file is named scsi_mid_low_api.txt and can be 44(i.e. ASCII) text. This file is named scsi_mid_low_api.txt and can be
45found in that directory. A more recent copy of this document may be found 45found in that directory. A more recent copy of this document may be found
46at http://www.torque.net/scsi/scsi_mid_low_api.txt.gz . 46at http://web.archive.org/web/20070107183357rn_1/sg.torque.net/scsi/.
47Many LLDs are documented there (e.g. aic7xxx.txt). The SCSI mid-level is 47Many LLDs are documented there (e.g. aic7xxx.txt). The SCSI mid-level is
48briefly described in scsi.txt which contains a url to a document 48briefly described in scsi.txt which contains a url to a document
49describing the SCSI subsystem in the lk 2.4 series. Two upper level 49describing the SCSI subsystem in the lk 2.4 series. Two upper level
diff --git a/Documentation/scsi/st.txt b/Documentation/scsi/st.txt
index 40752602c050..691ca292c24d 100644
--- a/Documentation/scsi/st.txt
+++ b/Documentation/scsi/st.txt
@@ -2,7 +2,7 @@ This file contains brief information about the SCSI tape driver.
2The driver is currently maintained by Kai Mäkisara (email 2The driver is currently maintained by Kai Mäkisara (email
3Kai.Makisara@kolumbus.fi) 3Kai.Makisara@kolumbus.fi)
4 4
5Last modified: Sun Feb 24 21:59:07 2008 by kai.makisara 5Last modified: Sun Aug 29 18:25:47 2010 by kai.makisara
6 6
7 7
8BASICS 8BASICS
@@ -85,6 +85,17 @@ writing and the last operation has been a write. Two filemarks can be
85optionally written. In both cases end of data is signified by 85optionally written. In both cases end of data is signified by
86returning zero bytes for two consecutive reads. 86returning zero bytes for two consecutive reads.
87 87
88Writing filemarks without the immediate bit set in the SCSI command block acts
89as a synchronization point, i.e., all remaining data form the drive buffers is
90written to tape before the command returns. This makes sure that write errors
91are caught at that point, but this takes time. In some applications, several
92consecutive files must be written fast. The MTWEOFI operation can be used to
93write the filemarks without flushing the drive buffer. Writing filemark at
94close() is always flushing the drive buffers. However, if the previous
95operation is MTWEOFI, close() does not write a filemark. This can be used if
96the program wants to close/open the tape device between files and wants to
97skip waiting.
98
88If rewind, offline, bsf, or seek is done and previous tape operation was 99If rewind, offline, bsf, or seek is done and previous tape operation was
89write, a filemark is written before moving tape. 100write, a filemark is written before moving tape.
90 101
@@ -301,6 +312,8 @@ MTBSR Space backward over count records.
301MTFSS Space forward over count setmarks. 312MTFSS Space forward over count setmarks.
302MTBSS Space backward over count setmarks. 313MTBSS Space backward over count setmarks.
303MTWEOF Write count filemarks. 314MTWEOF Write count filemarks.
315MTWEOFI Write count filemarks with immediate bit set (i.e., does not
316 wait until data is on tape)
304MTWSM Write count setmarks. 317MTWSM Write count setmarks.
305MTREW Rewind tape. 318MTREW Rewind tape.
306MTOFFL Set device off line (often rewind plus eject). 319MTOFFL Set device off line (often rewind plus eject).
diff --git a/Documentation/serial/moxa-smartio b/Documentation/serial/moxa-smartio
index 5337e80a5b96..d10443918684 100644
--- a/Documentation/serial/moxa-smartio
+++ b/Documentation/serial/moxa-smartio
@@ -76,7 +76,7 @@ Content
76 GNU General Public License in this version. Please refer to GNU General 76 GNU General Public License in this version. Please refer to GNU General
77 Public License announcement in each source code file for more detail. 77 Public License announcement in each source code file for more detail.
78 78
79 In Moxa's Web sites, you may always find latest driver at http://web.moxa.com. 79 In Moxa's Web sites, you may always find latest driver at http://www.moxa.com/.
80 80
81 This version of driver can be installed as Loadable Module (Module driver) 81 This version of driver can be installed as Loadable Module (Module driver)
82 or built-in into kernel (Static driver). You may refer to following 82 or built-in into kernel (Static driver). You may refer to following
diff --git a/Documentation/slow-work.txt b/Documentation/slow-work.txt
deleted file mode 100644
index 9dbf4470c7e1..000000000000
--- a/Documentation/slow-work.txt
+++ /dev/null
@@ -1,322 +0,0 @@
1 ====================================
2 SLOW WORK ITEM EXECUTION THREAD POOL
3 ====================================
4
5By: David Howells <dhowells@redhat.com>
6
7The slow work item execution thread pool is a pool of threads for performing
8things that take a relatively long time, such as making mkdir calls.
9Typically, when processing something, these items will spend a lot of time
10blocking a thread on I/O, thus making that thread unavailable for doing other
11work.
12
13The standard workqueue model is unsuitable for this class of work item as that
14limits the owner to a single thread or a single thread per CPU. For some
15tasks, however, more threads - or fewer - are required.
16
17There is just one pool per system. It contains no threads unless something
18wants to use it - and that something must register its interest first. When
19the pool is active, the number of threads it contains is dynamic, varying
20between a maximum and minimum setting, depending on the load.
21
22
23====================
24CLASSES OF WORK ITEM
25====================
26
27This pool support two classes of work items:
28
29 (*) Slow work items.
30
31 (*) Very slow work items.
32
33The former are expected to finish much quicker than the latter.
34
35An operation of the very slow class may do a batch combination of several
36lookups, mkdirs, and a create for instance.
37
38An operation of the ordinarily slow class may, for example, write stuff or
39expand files, provided the time taken to do so isn't too long.
40
41Operations of both types may sleep during execution, thus tying up the thread
42loaned to it.
43
44A further class of work item is available, based on the slow work item class:
45
46 (*) Delayed slow work items.
47
48These are slow work items that have a timer to defer queueing of the item for
49a while.
50
51
52THREAD-TO-CLASS ALLOCATION
53--------------------------
54
55Not all the threads in the pool are available to work on very slow work items.
56The number will be between one and one fewer than the number of active threads.
57This is configurable (see the "Pool Configuration" section).
58
59All the threads are available to work on ordinarily slow work items, but a
60percentage of the threads will prefer to work on very slow work items.
61
62The configuration ensures that at least one thread will be available to work on
63very slow work items, and at least one thread will be available that won't work
64on very slow work items at all.
65
66
67=====================
68USING SLOW WORK ITEMS
69=====================
70
71Firstly, a module or subsystem wanting to make use of slow work items must
72register its interest:
73
74 int ret = slow_work_register_user(struct module *module);
75
76This will return 0 if successful, or a -ve error upon failure. The module
77pointer should be the module interested in using this facility (almost
78certainly THIS_MODULE).
79
80
81Slow work items may then be set up by:
82
83 (1) Declaring a slow_work struct type variable:
84
85 #include <linux/slow-work.h>
86
87 struct slow_work myitem;
88
89 (2) Declaring the operations to be used for this item:
90
91 struct slow_work_ops myitem_ops = {
92 .get_ref = myitem_get_ref,
93 .put_ref = myitem_put_ref,
94 .execute = myitem_execute,
95 };
96
97 [*] For a description of the ops, see section "Item Operations".
98
99 (3) Initialising the item:
100
101 slow_work_init(&myitem, &myitem_ops);
102
103 or:
104
105 delayed_slow_work_init(&myitem, &myitem_ops);
106
107 or:
108
109 vslow_work_init(&myitem, &myitem_ops);
110
111 depending on its class.
112
113A suitably set up work item can then be enqueued for processing:
114
115 int ret = slow_work_enqueue(&myitem);
116
117This will return a -ve error if the thread pool is unable to gain a reference
118on the item, 0 otherwise, or (for delayed work):
119
120 int ret = delayed_slow_work_enqueue(&myitem, my_jiffy_delay);
121
122
123The items are reference counted, so there ought to be no need for a flush
124operation. But as the reference counting is optional, means to cancel
125existing work items are also included:
126
127 cancel_slow_work(&myitem);
128 cancel_delayed_slow_work(&myitem);
129
130can be used to cancel pending work. The above cancel function waits for
131existing work to have been executed (or prevent execution of them, depending
132on timing).
133
134
135When all a module's slow work items have been processed, and the
136module has no further interest in the facility, it should unregister its
137interest:
138
139 slow_work_unregister_user(struct module *module);
140
141The module pointer is used to wait for all outstanding work items for that
142module before completing the unregistration. This prevents the put_ref() code
143from being taken away before it completes. module should almost certainly be
144THIS_MODULE.
145
146
147================
148HELPER FUNCTIONS
149================
150
151The slow-work facility provides a function by which it can be determined
152whether or not an item is queued for later execution:
153
154 bool queued = slow_work_is_queued(struct slow_work *work);
155
156If it returns false, then the item is not on the queue (it may be executing
157with a requeue pending). This can be used to work out whether an item on which
158another depends is on the queue, thus allowing a dependent item to be queued
159after it.
160
161If the above shows an item on which another depends not to be queued, then the
162owner of the dependent item might need to wait. However, to avoid locking up
163the threads unnecessarily be sleeping in them, it can make sense under some
164circumstances to return the work item to the queue, thus deferring it until
165some other items have had a chance to make use of the yielded thread.
166
167To yield a thread and defer an item, the work function should simply enqueue
168the work item again and return. However, this doesn't work if there's nothing
169actually on the queue, as the thread just vacated will jump straight back into
170the item's work function, thus busy waiting on a CPU.
171
172Instead, the item should use the thread to wait for the dependency to go away,
173but rather than using schedule() or schedule_timeout() to sleep, it should use
174the following function:
175
176 bool requeue = slow_work_sleep_till_thread_needed(
177 struct slow_work *work,
178 signed long *_timeout);
179
180This will add a second wait and then sleep, such that it will be woken up if
181either something appears on the queue that could usefully make use of the
182thread - and behind which this item can be queued, or if the event the caller
183set up to wait for happens. True will be returned if something else appeared
184on the queue and this work function should perhaps return, of false if
185something else woke it up. The timeout is as for schedule_timeout().
186
187For example:
188
189 wq = bit_waitqueue(&my_flags, MY_BIT);
190 init_wait(&wait);
191 requeue = false;
192 do {
193 prepare_to_wait(wq, &wait, TASK_UNINTERRUPTIBLE);
194 if (!test_bit(MY_BIT, &my_flags))
195 break;
196 requeue = slow_work_sleep_till_thread_needed(&my_work,
197 &timeout);
198 } while (timeout > 0 && !requeue);
199 finish_wait(wq, &wait);
200 if (!test_bit(MY_BIT, &my_flags)
201 goto do_my_thing;
202 if (requeue)
203 return; // to slow_work
204
205
206===============
207ITEM OPERATIONS
208===============
209
210Each work item requires a table of operations of type struct slow_work_ops.
211Only ->execute() is required; the getting and putting of a reference and the
212describing of an item are all optional.
213
214 (*) Get a reference on an item:
215
216 int (*get_ref)(struct slow_work *work);
217
218 This allows the thread pool to attempt to pin an item by getting a
219 reference on it. This function should return 0 if the reference was
220 granted, or a -ve error otherwise. If an error is returned,
221 slow_work_enqueue() will fail.
222
223 The reference is held whilst the item is queued and whilst it is being
224 executed. The item may then be requeued with the same reference held, or
225 the reference will be released.
226
227 (*) Release a reference on an item:
228
229 void (*put_ref)(struct slow_work *work);
230
231 This allows the thread pool to unpin an item by releasing the reference on
232 it. The thread pool will not touch the item again once this has been
233 called.
234
235 (*) Execute an item:
236
237 void (*execute)(struct slow_work *work);
238
239 This should perform the work required of the item. It may sleep, it may
240 perform disk I/O and it may wait for locks.
241
242 (*) View an item through /proc:
243
244 void (*desc)(struct slow_work *work, struct seq_file *m);
245
246 If supplied, this should print to 'm' a small string describing the work
247 the item is to do. This should be no more than about 40 characters, and
248 shouldn't include a newline character.
249
250 See the 'Viewing executing and queued items' section below.
251
252
253==================
254POOL CONFIGURATION
255==================
256
257The slow-work thread pool has a number of configurables:
258
259 (*) /proc/sys/kernel/slow-work/min-threads
260
261 The minimum number of threads that should be in the pool whilst it is in
262 use. This may be anywhere between 2 and max-threads.
263
264 (*) /proc/sys/kernel/slow-work/max-threads
265
266 The maximum number of threads that should in the pool. This may be
267 anywhere between min-threads and 255 or NR_CPUS * 2, whichever is greater.
268
269 (*) /proc/sys/kernel/slow-work/vslow-percentage
270
271 The percentage of active threads in the pool that may be used to execute
272 very slow work items. This may be between 1 and 99. The resultant number
273 is bounded to between 1 and one fewer than the number of active threads.
274 This ensures there is always at least one thread that can process very
275 slow work items, and always at least one thread that won't.
276
277
278==================================
279VIEWING EXECUTING AND QUEUED ITEMS
280==================================
281
282If CONFIG_SLOW_WORK_DEBUG is enabled, a debugfs file is made available:
283
284 /sys/kernel/debug/slow_work/runqueue
285
286through which the list of work items being executed and the queues of items to
287be executed may be viewed. The owner of a work item is given the chance to
288add some information of its own.
289
290The contents look something like the following:
291
292 THR PID ITEM ADDR FL MARK DESC
293 === ===== ================ == ===== ==========
294 0 3005 ffff880023f52348 a 952ms FSC: OBJ17d3: LOOK
295 1 3006 ffff880024e33668 2 160ms FSC: OBJ17e5 OP60d3b: Write1/Store fl=2
296 2 3165 ffff8800296dd180 a 424ms FSC: OBJ17e4: LOOK
297 3 4089 ffff8800262c8d78 a 212ms FSC: OBJ17ea: CRTN
298 4 4090 ffff88002792bed8 2 388ms FSC: OBJ17e8 OP60d36: Write1/Store fl=2
299 5 4092 ffff88002a0ef308 2 388ms FSC: OBJ17e7 OP60d2e: Write1/Store fl=2
300 6 4094 ffff88002abaf4b8 2 132ms FSC: OBJ17e2 OP60d4e: Write1/Store fl=2
301 7 4095 ffff88002bb188e0 a 388ms FSC: OBJ17e9: CRTN
302 vsq - ffff880023d99668 1 308ms FSC: OBJ17e0 OP60f91: Write1/EnQ fl=2
303 vsq - ffff8800295d1740 1 212ms FSC: OBJ16be OP4d4b6: Write1/EnQ fl=2
304 vsq - ffff880025ba3308 1 160ms FSC: OBJ179a OP58dec: Write1/EnQ fl=2
305 vsq - ffff880024ec83e0 1 160ms FSC: OBJ17ae OP599f2: Write1/EnQ fl=2
306 vsq - ffff880026618e00 1 160ms FSC: OBJ17e6 OP60d33: Write1/EnQ fl=2
307 vsq - ffff880025a2a4b8 1 132ms FSC: OBJ16a2 OP4d583: Write1/EnQ fl=2
308 vsq - ffff880023cbe6d8 9 212ms FSC: OBJ17eb: LOOK
309 vsq - ffff880024d37590 9 212ms FSC: OBJ17ec: LOOK
310 vsq - ffff880027746cb0 9 212ms FSC: OBJ17ed: LOOK
311 vsq - ffff880024d37ae8 9 212ms FSC: OBJ17ee: LOOK
312 vsq - ffff880024d37cb0 9 212ms FSC: OBJ17ef: LOOK
313 vsq - ffff880025036550 9 212ms FSC: OBJ17f0: LOOK
314 vsq - ffff8800250368e0 9 212ms FSC: OBJ17f1: LOOK
315 vsq - ffff880025036aa8 9 212ms FSC: OBJ17f2: LOOK
316
317In the 'THR' column, executing items show the thread they're occupying and
318queued threads indicate which queue they're on. 'PID' shows the process ID of
319a slow-work thread that's executing something. 'FL' shows the work item flags.
320'MARK' indicates how long since an item was queued or began executing. Lastly,
321the 'DESC' column permits the owner of an item to give some information.
322
diff --git a/Documentation/sound/alsa/ALSA-Configuration.txt b/Documentation/sound/alsa/ALSA-Configuration.txt
index 2075bbb8b3e2..d0eb696d32e8 100644
--- a/Documentation/sound/alsa/ALSA-Configuration.txt
+++ b/Documentation/sound/alsa/ALSA-Configuration.txt
@@ -300,6 +300,74 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed.
300 control correctly. If you have problems regarding this, try 300 control correctly. If you have problems regarding this, try
301 another ALSA compliant mixer (alsamixer works). 301 another ALSA compliant mixer (alsamixer works).
302 302
303 Module snd-azt1605
304 ------------------
305
306 Module for Aztech Sound Galaxy soundcards based on the Aztech AZT1605
307 chipset.
308
309 port - port # for BASE (0x220,0x240,0x260,0x280)
310 wss_port - port # for WSS (0x530,0x604,0xe80,0xf40)
311 irq - IRQ # for WSS (7,9,10,11)
312 dma1 - DMA # for WSS playback (0,1,3)
313 dma2 - DMA # for WSS capture (0,1), -1 = disabled (default)
314 mpu_port - port # for MPU-401 UART (0x300,0x330), -1 = disabled (default)
315 mpu_irq - IRQ # for MPU-401 UART (3,5,7,9), -1 = disabled (default)
316 fm_port - port # for OPL3 (0x388), -1 = disabled (default)
317
318 This module supports multiple cards. It does not support autoprobe: port,
319 wss_port, irq and dma1 have to be specified. The other values are
320 optional.
321
322 "port" needs to match the BASE ADDRESS jumper on the card (0x220 or 0x240)
323 or the value stored in the card's EEPROM for cards that have an EEPROM and
324 their "CONFIG MODE" jumper set to "EEPROM SETTING". The other values can
325 be choosen freely from the options enumerated above.
326
327 If dma2 is specified and different from dma1, the card will operate in
328 full-duplex mode. When dma1=3, only dma2=0 is valid and the only way to
329 enable capture since only channels 0 and 1 are available for capture.
330
331 Generic settings are "port=0x220 wss_port=0x530 irq=10 dma1=1 dma2=0
332 mpu_port=0x330 mpu_irq=9 fm_port=0x388".
333
334 Whatever IRQ and DMA channels you pick, be sure to reserve them for
335 legacy ISA in your BIOS.
336
337 Module snd-azt2316
338 ------------------
339
340 Module for Aztech Sound Galaxy soundcards based on the Aztech AZT2316
341 chipset.
342
343 port - port # for BASE (0x220,0x240,0x260,0x280)
344 wss_port - port # for WSS (0x530,0x604,0xe80,0xf40)
345 irq - IRQ # for WSS (7,9,10,11)
346 dma1 - DMA # for WSS playback (0,1,3)
347 dma2 - DMA # for WSS capture (0,1), -1 = disabled (default)
348 mpu_port - port # for MPU-401 UART (0x300,0x330), -1 = disabled (default)
349 mpu_irq - IRQ # for MPU-401 UART (5,7,9,10), -1 = disabled (default)
350 fm_port - port # for OPL3 (0x388), -1 = disabled (default)
351
352 This module supports multiple cards. It does not support autoprobe: port,
353 wss_port, irq and dma1 have to be specified. The other values are
354 optional.
355
356 "port" needs to match the BASE ADDRESS jumper on the card (0x220 or 0x240)
357 or the value stored in the card's EEPROM for cards that have an EEPROM and
358 their "CONFIG MODE" jumper set to "EEPROM SETTING". The other values can
359 be choosen freely from the options enumerated above.
360
361 If dma2 is specified and different from dma1, the card will operate in
362 full-duplex mode. When dma1=3, only dma2=0 is valid and the only way to
363 enable capture since only channels 0 and 1 are available for capture.
364
365 Generic settings are "port=0x220 wss_port=0x530 irq=10 dma1=1 dma2=0
366 mpu_port=0x330 mpu_irq=9 fm_port=0x388".
367
368 Whatever IRQ and DMA channels you pick, be sure to reserve them for
369 legacy ISA in your BIOS.
370
303 Module snd-aw2 371 Module snd-aw2
304 -------------- 372 --------------
305 373
@@ -1285,7 +1353,7 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed.
1285 about this driver. Note that it has been discontinued, but the 1353 about this driver. Note that it has been discontinued, but the
1286 Voyetra Turtle Beach knowledge base entry for it is still available 1354 Voyetra Turtle Beach knowledge base entry for it is still available
1287 at 1355 at
1288 http://www.turtlebeach.com/site/kb_ftp/790.asp 1356 http://www.turtlebeach.com
1289 1357
1290 Module snd-msnd-pinnacle 1358 Module snd-msnd-pinnacle
1291 ------------------------ 1359 ------------------------
@@ -1641,20 +1709,6 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed.
1641 1709
1642 This card is also known as Audio Excel DSP 16 or Zoltrix AV302. 1710 This card is also known as Audio Excel DSP 16 or Zoltrix AV302.
1643 1711
1644 Module snd-sgalaxy
1645 ------------------
1646
1647 Module for Aztech Sound Galaxy sound card.
1648
1649 sbport - Port # for SB16 interface (0x220,0x240)
1650 wssport - Port # for WSS interface (0x530,0xe80,0xf40,0x604)
1651 irq - IRQ # (7,9,10,11)
1652 dma1 - DMA #
1653
1654 This module supports multiple cards.
1655
1656 The power-management is supported.
1657
1658 Module snd-sscape 1712 Module snd-sscape
1659 ----------------- 1713 -----------------
1660 1714
diff --git a/Documentation/sound/alsa/HD-Audio-Models.txt b/Documentation/sound/alsa/HD-Audio-Models.txt
index 1d38b0dfba95..37c6aad5e590 100644
--- a/Documentation/sound/alsa/HD-Audio-Models.txt
+++ b/Documentation/sound/alsa/HD-Audio-Models.txt
@@ -83,8 +83,8 @@ ALC269
83====== 83======
84 basic Basic preset 84 basic Basic preset
85 quanta Quanta FL1 85 quanta Quanta FL1
86 eeepc-p703 ASUS Eeepc P703 P900A 86 laptop-amic Laptops with analog-mic input
87 eeepc-p901 ASUS Eeepc P901 S101 87 laptop-dmic Laptops with digital-mic input
88 fujitsu FSC Amilo 88 fujitsu FSC Amilo
89 lifebook Fujitsu Lifebook S6420 89 lifebook Fujitsu Lifebook S6420
90 auto auto-config reading BIOS (default) 90 auto auto-config reading BIOS (default)
@@ -109,11 +109,18 @@ ALC662/663/272
109 asus-mode4 ASUS 109 asus-mode4 ASUS
110 asus-mode5 ASUS 110 asus-mode5 ASUS
111 asus-mode6 ASUS 111 asus-mode6 ASUS
112 asus-mode7 ASUS
113 asus-mode8 ASUS
112 dell Dell with ALC272 114 dell Dell with ALC272
113 dell-zm1 Dell ZM1 with ALC272 115 dell-zm1 Dell ZM1 with ALC272
114 samsung-nc10 Samsung NC10 mini notebook 116 samsung-nc10 Samsung NC10 mini notebook
115 auto auto-config reading BIOS (default) 117 auto auto-config reading BIOS (default)
116 118
119ALC680
120======
121 base Base model (ASUS NX90)
122 auto auto-config reading BIOS (default)
123
117ALC882/883/885/888/889 124ALC882/883/885/888/889
118====================== 125======================
119 3stack-dig 3-jack with SPDIF I/O 126 3stack-dig 3-jack with SPDIF I/O
@@ -282,15 +289,19 @@ Conexant 5051
282 hp HP Spartan laptop 289 hp HP Spartan laptop
283 hp-dv6736 HP dv6736 290 hp-dv6736 HP dv6736
284 hp-f700 HP Compaq Presario F700 291 hp-f700 HP Compaq Presario F700
292 ideapad Lenovo IdeaPad laptop
285 lenovo-x200 Lenovo X200 laptop 293 lenovo-x200 Lenovo X200 laptop
286 toshiba Toshiba Satellite M300 294 toshiba Toshiba Satellite M300
287 295
288Conexant 5066 296Conexant 5066
289============= 297=============
290 laptop Basic Laptop config (default) 298 laptop Basic Laptop config (default)
299 hp-laptop HP laptops, e g G60
291 dell-laptop Dell laptops 300 dell-laptop Dell laptops
301 dell-vostro Dell Vostro
292 olpc-xo-1_5 OLPC XO 1.5 302 olpc-xo-1_5 OLPC XO 1.5
293 ideapad Lenovo IdeaPad U150 303 ideapad Lenovo IdeaPad U150
304 thinkpad Lenovo Thinkpad
294 305
295STAC9200 306STAC9200
296======== 307========
@@ -398,6 +409,7 @@ STAC92HD83*
398 mic-ref Reference board with power management for ports 409 mic-ref Reference board with power management for ports
399 dell-s14 Dell laptop 410 dell-s14 Dell laptop
400 hp HP laptops with (inverted) mute-LED 411 hp HP laptops with (inverted) mute-LED
412 hp-dv7-4000 HP dv-7 4000
401 auto BIOS setup (default) 413 auto BIOS setup (default)
402 414
403STAC9872 415STAC9872
@@ -410,3 +422,7 @@ Cirrus Logic CS4206/4207
410 mbp55 MacBook Pro 5,5 422 mbp55 MacBook Pro 5,5
411 imac27 IMac 27 Inch 423 imac27 IMac 27 Inch
412 auto BIOS setup (default) 424 auto BIOS setup (default)
425
426VIA VT17xx/VT18xx/VT20xx
427========================
428 auto BIOS setup (default)
diff --git a/Documentation/sound/alsa/HD-Audio.txt b/Documentation/sound/alsa/HD-Audio.txt
index bdafdbd32561..c82beb007634 100644
--- a/Documentation/sound/alsa/HD-Audio.txt
+++ b/Documentation/sound/alsa/HD-Audio.txt
@@ -57,9 +57,11 @@ dead. However, this detection isn't perfect on some devices. In such
57a case, you can change the default method via `position_fix` option. 57a case, you can change the default method via `position_fix` option.
58 58
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. 0 is the default 60`position_fix=2` means to use the position-buffer.
61value, the automatic check and fallback to LPIB as described in the 61`position_fix=3` means to use a combination of both methods, needed
62above. If you get a problem of repeated sounds, this option might 62for some VIA and ATI controllers. 0 is the default value for all other
63controllers, the automatic check and fallback to LPIB as described in
64the above. If you get a problem of repeated sounds, this option might
63help. 65help.
64 66
65In addition to that, every controller is known to be broken regarding 67In addition to that, every controller is known to be broken regarding
@@ -562,7 +564,7 @@ compare the codec registers directly.
562Send a bug report either the followings: 564Send a bug report either the followings:
563 565
564kernel-bugzilla:: 566kernel-bugzilla::
565 http://bugme.linux-foundation.org/ 567 https://bugzilla.kernel.org/
566alsa-devel ML:: 568alsa-devel ML::
567 alsa-devel@alsa-project.org 569 alsa-devel@alsa-project.org
568 570
diff --git a/Documentation/sound/alsa/Procfile.txt b/Documentation/sound/alsa/Procfile.txt
index 07301de12cc4..7fcd1ad96fcc 100644
--- a/Documentation/sound/alsa/Procfile.txt
+++ b/Documentation/sound/alsa/Procfile.txt
@@ -103,6 +103,8 @@ card*/pcm*/xrun_debug
103 bit 2 = Enable additional jiffies check 103 bit 2 = Enable additional jiffies check
104 bit 3 = Log hwptr update at each period interrupt 104 bit 3 = Log hwptr update at each period interrupt
105 bit 4 = Log hwptr update at each snd_pcm_update_hw_ptr() 105 bit 4 = Log hwptr update at each snd_pcm_update_hw_ptr()
106 bit 5 = Show last 10 positions on error
107 bit 6 = Do above only once
106 108
107 When the bit 0 is set, the driver will show the messages to 109 When the bit 0 is set, the driver will show the messages to
108 kernel log when an xrun is detected. The debug message is 110 kernel log when an xrun is detected. The debug message is
@@ -122,6 +124,12 @@ card*/pcm*/xrun_debug
122 Bits 3 and 4 are for logging the hwptr records. Note that 124 Bits 3 and 4 are for logging the hwptr records. Note that
123 these will give flood of kernel messages. 125 these will give flood of kernel messages.
124 126
127 When bit 5 is set, the driver logs the last 10 xrun errors and
128 the proc file shows each jiffies, position, period_size,
129 buffer_size, old_hw_ptr, and hw_ptr_base values.
130
131 When bit 6 is set, the full xrun log is shown only once.
132
125card*/pcm*/sub*/info 133card*/pcm*/sub*/info
126 The general information of this PCM sub-stream. 134 The general information of this PCM sub-stream.
127 135
diff --git a/Documentation/sound/alsa/alsa-parameters.txt b/Documentation/sound/alsa/alsa-parameters.txt
new file mode 100644
index 000000000000..0fa40679b080
--- /dev/null
+++ b/Documentation/sound/alsa/alsa-parameters.txt
@@ -0,0 +1,135 @@
1 ALSA Kernel Parameters
2 ~~~~~~~~~~~~~~~~~~~~~~
3
4See Documentation/kernel-parameters.txt for general information on
5specifying module parameters.
6
7This document may not be entirely up to date and comprehensive. The command
8"modinfo -p ${modulename}" shows a current list of all parameters of a loadable
9module. Loadable modules, after being loaded into the running kernel, also
10reveal their parameters in /sys/module/${modulename}/parameters/. Some of these
11parameters may be changed at runtime by the command
12"echo -n ${value} > /sys/module/${modulename}/parameters/${parm}".
13
14
15 snd-ad1816a= [HW,ALSA]
16
17 snd-ad1848= [HW,ALSA]
18
19 snd-ali5451= [HW,ALSA]
20
21 snd-als100= [HW,ALSA]
22
23 snd-als4000= [HW,ALSA]
24
25 snd-azt2320= [HW,ALSA]
26
27 snd-cmi8330= [HW,ALSA]
28
29 snd-cmipci= [HW,ALSA]
30
31 snd-cs4231= [HW,ALSA]
32
33 snd-cs4232= [HW,ALSA]
34
35 snd-cs4236= [HW,ALSA]
36
37 snd-cs4281= [HW,ALSA]
38
39 snd-cs46xx= [HW,ALSA]
40
41 snd-dt019x= [HW,ALSA]
42
43 snd-dummy= [HW,ALSA]
44
45 snd-emu10k1= [HW,ALSA]
46
47 snd-ens1370= [HW,ALSA]
48
49 snd-ens1371= [HW,ALSA]
50
51 snd-es968= [HW,ALSA]
52
53 snd-es1688= [HW,ALSA]
54
55 snd-es18xx= [HW,ALSA]
56
57 snd-es1938= [HW,ALSA]
58
59 snd-es1968= [HW,ALSA]
60
61 snd-fm801= [HW,ALSA]
62
63 snd-gusclassic= [HW,ALSA]
64
65 snd-gusextreme= [HW,ALSA]
66
67 snd-gusmax= [HW,ALSA]
68
69 snd-hdsp= [HW,ALSA]
70
71 snd-ice1712= [HW,ALSA]
72
73 snd-intel8x0= [HW,ALSA]
74
75 snd-interwave= [HW,ALSA]
76
77 snd-interwave-stb=
78 [HW,ALSA]
79
80 snd-korg1212= [HW,ALSA]
81
82 snd-maestro3= [HW,ALSA]
83
84 snd-mpu401= [HW,ALSA]
85
86 snd-mtpav= [HW,ALSA]
87
88 snd-nm256= [HW,ALSA]
89
90 snd-opl3sa2= [HW,ALSA]
91
92 snd-opti92x-ad1848=
93 [HW,ALSA]
94
95 snd-opti92x-cs4231=
96 [HW,ALSA]
97
98 snd-opti93x= [HW,ALSA]
99
100 snd-pmac= [HW,ALSA]
101
102 snd-rme32= [HW,ALSA]
103
104 snd-rme96= [HW,ALSA]
105
106 snd-rme9652= [HW,ALSA]
107
108 snd-sb8= [HW,ALSA]
109
110 snd-sb16= [HW,ALSA]
111
112 snd-sbawe= [HW,ALSA]
113
114 snd-serial= [HW,ALSA]
115
116 snd-sgalaxy= [HW,ALSA]
117
118 snd-sonicvibes= [HW,ALSA]
119
120 snd-sun-amd7930=
121 [HW,ALSA]
122
123 snd-sun-cs4231= [HW,ALSA]
124
125 snd-trident= [HW,ALSA]
126
127 snd-usb-audio= [HW,ALSA,USB]
128
129 snd-via82xx= [HW,ALSA]
130
131 snd-virmidi= [HW,ALSA]
132
133 snd-wavefront= [HW,ALSA]
134
135 snd-ymfpci= [HW,ALSA]
diff --git a/Documentation/sound/alsa/soc/DAI.txt b/Documentation/sound/alsa/soc/DAI.txt
index 0ebd7ea9706c..c9679264c559 100644
--- a/Documentation/sound/alsa/soc/DAI.txt
+++ b/Documentation/sound/alsa/soc/DAI.txt
@@ -13,7 +13,7 @@ frame (FRAME) (usually 48kHz) is always driven by the controller. Each AC97
13frame is 21uS long and is divided into 13 time slots. 13frame is 21uS long and is divided into 13 time slots.
14 14
15The AC97 specification can be found at :- 15The AC97 specification can be found at :-
16http://www.intel.com/design/chipsets/audio/ac97_r23.pdf 16http://www.intel.com/p/en_US/business/design
17 17
18 18
19I2S 19I2S
diff --git a/Documentation/sound/alsa/soc/codec.txt b/Documentation/sound/alsa/soc/codec.txt
index 1e95342ed72e..37ba3a72cb76 100644
--- a/Documentation/sound/alsa/soc/codec.txt
+++ b/Documentation/sound/alsa/soc/codec.txt
@@ -143,7 +143,7 @@ struct snd_soc_ops {
143}; 143};
144 144
145Please refer to the ALSA driver PCM documentation for details. 145Please refer to the ALSA driver PCM documentation for details.
146http://www.alsa-project.org/~iwai/writing-an-alsa-driver/c436.htm 146http://www.alsa-project.org/~iwai/writing-an-alsa-driver/
147 147
148 148
1495 - DAPM description. 1495 - DAPM description.
diff --git a/Documentation/sound/alsa/soc/platform.txt b/Documentation/sound/alsa/soc/platform.txt
index b681d17fc388..06d835987c6a 100644
--- a/Documentation/sound/alsa/soc/platform.txt
+++ b/Documentation/sound/alsa/soc/platform.txt
@@ -39,7 +39,7 @@ struct snd_soc_platform {
39}; 39};
40 40
41Please refer to the ALSA driver documentation for details of audio DMA. 41Please refer to the ALSA driver documentation for details of audio DMA.
42http://www.alsa-project.org/~iwai/writing-an-alsa-driver/c436.htm 42http://www.alsa-project.org/~iwai/writing-an-alsa-driver/
43 43
44An example DMA driver is soc/pxa/pxa2xx-pcm.c 44An example DMA driver is soc/pxa/pxa2xx-pcm.c
45 45
diff --git a/Documentation/sound/oss/README.OSS b/Documentation/sound/oss/README.OSS
index fd42b05b2f55..c615debbf08d 100644
--- a/Documentation/sound/oss/README.OSS
+++ b/Documentation/sound/oss/README.OSS
@@ -36,7 +36,7 @@ with OSS API.
36 36
37Packages "snd-util-3.8.tar.gz" and "snd-data-0.1.tar.Z" 37Packages "snd-util-3.8.tar.gz" and "snd-data-0.1.tar.Z"
38contain useful utilities to be used with this driver. 38contain useful utilities to be used with this driver.
39See http://www.opensound.com/ossfree/getting.html for 39See http://www.opensound.com/ossfree/ for
40download instructions. 40download instructions.
41 41
42If you are looking for the installation instructions, please 42If you are looking for the installation instructions, please
@@ -1438,7 +1438,7 @@ of this driver (see http://www.4Front-tech.com/oss.html for more info).
1438There are some common audio chipsets that are not supported yet. For example 1438There are some common audio chipsets that are not supported yet. For example
1439Sierra Aria and IBM Mwave. It's possible that these architectures 1439Sierra Aria and IBM Mwave. It's possible that these architectures
1440get some support in future but I can't make any promises. Just look 1440get some support in future but I can't make any promises. Just look
1441at the home page (http://www.opensound.com/ossfree/new_cards.html) 1441at the home page (http://www.opensound.com/ossfree/)
1442for latest info. 1442for latest info.
1443 1443
1444Information about unsupported sound cards and chipsets is welcome as well 1444Information about unsupported sound cards and chipsets is welcome as well
@@ -1449,7 +1449,6 @@ If you have any corrections and/or comments, please contact me.
1449Hannu Savolainen 1449Hannu Savolainen
1450hannu@opensound.com 1450hannu@opensound.com
1451 1451
1452Personal home page: http://www.compusonic.fi/~hannu
1453home page of OSS/Free: http://www.opensound.com/ossfree 1452home page of OSS/Free: http://www.opensound.com/ossfree
1454 1453
1455home page of commercial OSS 1454home page of commercial OSS
diff --git a/Documentation/sound/oss/oss-parameters.txt b/Documentation/sound/oss/oss-parameters.txt
new file mode 100644
index 000000000000..3ab391e7c295
--- /dev/null
+++ b/Documentation/sound/oss/oss-parameters.txt
@@ -0,0 +1,51 @@
1 OSS Kernel Parameters
2 ~~~~~~~~~~~~~~~~~~~~~
3
4See Documentation/kernel-parameters.txt for general information on
5specifying module parameters.
6
7This document may not be entirely up to date and comprehensive. The command
8"modinfo -p ${modulename}" shows a current list of all parameters of a loadable
9module. Loadable modules, after being loaded into the running kernel, also
10reveal their parameters in /sys/module/${modulename}/parameters/. Some of these
11parameters may be changed at runtime by the command
12"echo -n ${value} > /sys/module/${modulename}/parameters/${parm}".
13
14
15 ad1848= [HW,OSS]
16 Format: <io>,<irq>,<dma>,<dma2>,<type>
17
18 aedsp16= [HW,OSS] Audio Excel DSP 16
19 Format: <io>,<irq>,<dma>,<mss_io>,<mpu_io>,<mpu_irq>
20 See also header of sound/oss/aedsp16.c.
21
22 dmasound= [HW,OSS] Sound subsystem buffers
23
24 mpu401= [HW,OSS]
25 Format: <io>,<irq>
26
27 opl3= [HW,OSS]
28 Format: <io>
29
30 pas2= [HW,OSS] Format:
31 <io>,<irq>,<dma>,<dma16>,<sb_io>,<sb_irq>,<sb_dma>,<sb_dma16>
32
33 pss= [HW,OSS] Personal Sound System (ECHO ESC614)
34 Format:
35 <io>,<mss_io>,<mss_irq>,<mss_dma>,<mpu_io>,<mpu_irq>
36
37 sscape= [HW,OSS]
38 Format: <io>,<irq>,<dma>,<mpu_io>,<mpu_irq>
39
40 trix= [HW,OSS] MediaTrix AudioTrix Pro
41 Format:
42 <io>,<irq>,<dma>,<dma2>,<sb_io>,<sb_irq>,<sb_dma>,<mpu_io>,<mpu_irq>
43
44 uart401= [HW,OSS]
45 Format: <io>,<irq>
46
47 uart6850= [HW,OSS]
48 Format: <io>,<irq>
49
50 waveartist= [HW,OSS]
51 Format: <io>,<irq>,<dma>,<dma2>
diff --git a/Documentation/sparse.txt b/Documentation/sparse.txt
index 9b659c79a547..4909d4116356 100644
--- a/Documentation/sparse.txt
+++ b/Documentation/sparse.txt
@@ -1,5 +1,5 @@
1Copyright 2004 Linus Torvalds 1Copyright 2004 Linus Torvalds
2Copyright 2004 Pavel Machek <pavel@suse.cz> 2Copyright 2004 Pavel Machek <pavel@ucw.cz>
3Copyright 2006 Bob Copeland <me@bobcopeland.com> 3Copyright 2006 Bob Copeland <me@bobcopeland.com>
4 4
5Using sparse for typechecking 5Using sparse for typechecking
diff --git a/Documentation/sysctl/vm.txt b/Documentation/sysctl/vm.txt
index 5fdbb612aeb8..30289fab86eb 100644
--- a/Documentation/sysctl/vm.txt
+++ b/Documentation/sysctl/vm.txt
@@ -80,8 +80,10 @@ dirty_background_bytes
80Contains the amount of dirty memory at which the pdflush background writeback 80Contains the amount of dirty memory at which the pdflush background writeback
81daemon will start writeback. 81daemon will start writeback.
82 82
83If dirty_background_bytes is written, dirty_background_ratio becomes a function 83Note: dirty_background_bytes is the counterpart of dirty_background_ratio. Only
84of its value (dirty_background_bytes / the amount of dirtyable system memory). 84one of them may be specified at a time. When one sysctl is written it is
85immediately taken into account to evaluate the dirty memory limits and the
86other appears as 0 when read.
85 87
86============================================================== 88==============================================================
87 89
@@ -97,8 +99,10 @@ dirty_bytes
97Contains the amount of dirty memory at which a process generating disk writes 99Contains the amount of dirty memory at which a process generating disk writes
98will itself start writeback. 100will itself start writeback.
99 101
100If dirty_bytes is written, dirty_ratio becomes a function of its value 102Note: dirty_bytes is the counterpart of dirty_ratio. Only one of them may be
101(dirty_bytes / the amount of dirtyable system memory). 103specified at a time. When one sysctl is written it is immediately taken into
104account to evaluate the dirty memory limits and the other appears as 0 when
105read.
102 106
103Note: the minimum value allowed for dirty_bytes is two pages (in bytes); any 107Note: the minimum value allowed for dirty_bytes is two pages (in bytes); any
104value lower than this limit will be ignored and the old configuration will be 108value lower than this limit will be ignored and the old configuration will be
@@ -196,7 +200,7 @@ controlled by this knob are discussed in Documentation/laptops/laptop-mode.txt.
196 200
197legacy_va_layout 201legacy_va_layout
198 202
199If non-zero, this sysctl disables the new 32-bit mmap mmap layout - the kernel 203If non-zero, this sysctl disables the new 32-bit mmap layout - the kernel
200will use the legacy (2.4) layout for all processes. 204will use the legacy (2.4) layout for all processes.
201 205
202============================================================== 206==============================================================
@@ -511,7 +515,7 @@ information may not be desired.
511If this is set to non-zero, this information is shown whenever the 515If this is set to non-zero, this information is shown whenever the
512OOM killer actually kills a memory-hogging task. 516OOM killer actually kills a memory-hogging task.
513 517
514The default value is 0. 518The default value is 1 (enabled).
515 519
516============================================================== 520==============================================================
517 521
diff --git a/Documentation/sysrq.txt b/Documentation/sysrq.txt
index 5c17196c8fe9..312e3754e8c5 100644
--- a/Documentation/sysrq.txt
+++ b/Documentation/sysrq.txt
@@ -75,7 +75,7 @@ On all - write a character to /proc/sysrq-trigger. e.g.:
75 75
76'f' - Will call oom_kill to kill a memory hog process. 76'f' - Will call oom_kill to kill a memory hog process.
77 77
78'g' - Used by kgdb on ppc and sh platforms. 78'g' - Used by kgdb (kernel debugger)
79 79
80'h' - Will display help (actually any other key than those listed 80'h' - Will display help (actually any other key than those listed
81 here will display help. but 'h' is easy to remember :-) 81 here will display help. but 'h' is easy to remember :-)
@@ -110,12 +110,15 @@ On all - write a character to /proc/sysrq-trigger. e.g.:
110 110
111'u' - Will attempt to remount all mounted filesystems read-only. 111'u' - Will attempt to remount all mounted filesystems read-only.
112 112
113'v' - Dumps Voyager SMP processor info to your console. 113'v' - Forcefully restores framebuffer console
114'v' - Causes ETM buffer dump [ARM-specific]
114 115
115'w' - Dumps tasks that are in uninterruptable (blocked) state. 116'w' - Dumps tasks that are in uninterruptable (blocked) state.
116 117
117'x' - Used by xmon interface on ppc/powerpc platforms. 118'x' - Used by xmon interface on ppc/powerpc platforms.
118 119
120'y' - Show global CPU Registers [SPARC-64 specific]
121
119'z' - Dump the ftrace buffer 122'z' - Dump the ftrace buffer
120 123
121'0'-'9' - Sets the console log level, controlling which kernel messages 124'0'-'9' - Sets the console log level, controlling which kernel messages
diff --git a/Documentation/telephony/ixj.txt b/Documentation/telephony/ixj.txt
index 44d124005bad..4fb314d51702 100644
--- a/Documentation/telephony/ixj.txt
+++ b/Documentation/telephony/ixj.txt
@@ -108,14 +108,9 @@ applications.
108 108
1091.4 Where to get things 1091.4 Where to get things
110 110
111You can download the latest versions of the driver from: 111Info on latest versions of the driver are here:
112
113http://www.quicknet.net/develop.htm
114
115You can download the latest version of this document from:
116
117http://www.quicknet.net/develop.htm
118 112
113http://web.archive.org/web/*/http://www.quicknet.net/develop.htm
119 114
1201.5 Mailing List 1151.5 Mailing List
121 116
diff --git a/Documentation/timers/hpet_example.c b/Documentation/timers/hpet_example.c
index 4bfafb7bc4c5..9a3e7012c190 100644
--- a/Documentation/timers/hpet_example.c
+++ b/Documentation/timers/hpet_example.c
@@ -97,6 +97,33 @@ hpet_open_close(int argc, const char **argv)
97void 97void
98hpet_info(int argc, const char **argv) 98hpet_info(int argc, const char **argv)
99{ 99{
100 struct hpet_info info;
101 int fd;
102
103 if (argc != 1) {
104 fprintf(stderr, "hpet_info: device-name\n");
105 return;
106 }
107
108 fd = open(argv[0], O_RDONLY);
109 if (fd < 0) {
110 fprintf(stderr, "hpet_info: open of %s failed\n", argv[0]);
111 return;
112 }
113
114 if (ioctl(fd, HPET_INFO, &info) < 0) {
115 fprintf(stderr, "hpet_info: failed to get info\n");
116 goto out;
117 }
118
119 fprintf(stderr, "hpet_info: hi_irqfreq 0x%lx hi_flags 0x%lx ",
120 info.hi_ireqfreq, info.hi_flags);
121 fprintf(stderr, "hi_hpet %d hi_timer %d\n",
122 info.hi_hpet, info.hi_timer);
123
124out:
125 close(fd);
126 return;
100} 127}
101 128
102void 129void
diff --git a/Documentation/timers/timers-howto.txt b/Documentation/timers/timers-howto.txt
new file mode 100644
index 000000000000..c9ef29d2ede3
--- /dev/null
+++ b/Documentation/timers/timers-howto.txt
@@ -0,0 +1,105 @@
1delays - Information on the various kernel delay / sleep mechanisms
2-------------------------------------------------------------------
3
4This document seeks to answer the common question: "What is the
5RightWay (TM) to insert a delay?"
6
7This question is most often faced by driver writers who have to
8deal with hardware delays and who may not be the most intimately
9familiar with the inner workings of the Linux Kernel.
10
11
12Inserting Delays
13----------------
14
15The first, and most important, question you need to ask is "Is my
16code in an atomic context?" This should be followed closely by "Does
17it really need to delay in atomic context?" If so...
18
19ATOMIC CONTEXT:
20 You must use the *delay family of functions. These
21 functions use the jiffie estimation of clock speed
22 and will busy wait for enough loop cycles to achieve
23 the desired delay:
24
25 ndelay(unsigned long nsecs)
26 udelay(unsigned long usecs)
27 mdelay(unsgined long msecs)
28
29 udelay is the generally preferred API; ndelay-level
30 precision may not actually exist on many non-PC devices.
31
32 mdelay is macro wrapper around udelay, to account for
33 possible overflow when passing large arguments to udelay.
34 In general, use of mdelay is discouraged and code should
35 be refactored to allow for the use of msleep.
36
37NON-ATOMIC CONTEXT:
38 You should use the *sleep[_range] family of functions.
39 There are a few more options here, while any of them may
40 work correctly, using the "right" sleep function will
41 help the scheduler, power management, and just make your
42 driver better :)
43
44 -- Backed by busy-wait loop:
45 udelay(unsigned long usecs)
46 -- Backed by hrtimers:
47 usleep_range(unsigned long min, unsigned long max)
48 -- Backed by jiffies / legacy_timers
49 msleep(unsigned long msecs)
50 msleep_interruptible(unsigned long msecs)
51
52 Unlike the *delay family, the underlying mechanism
53 driving each of these calls varies, thus there are
54 quirks you should be aware of.
55
56
57 SLEEPING FOR "A FEW" USECS ( < ~10us? ):
58 * Use udelay
59
60 - Why not usleep?
61 On slower systems, (embedded, OR perhaps a speed-
62 stepped PC!) the overhead of setting up the hrtimers
63 for usleep *may* not be worth it. Such an evaluation
64 will obviously depend on your specific situation, but
65 it is something to be aware of.
66
67 SLEEPING FOR ~USECS OR SMALL MSECS ( 10us - 20ms):
68 * Use usleep_range
69
70 - Why not msleep for (1ms - 20ms)?
71 Explained originally here:
72 http://lkml.org/lkml/2007/8/3/250
73 msleep(1~20) may not do what the caller intends, and
74 will often sleep longer (~20 ms actual sleep for any
75 value given in the 1~20ms range). In many cases this
76 is not the desired behavior.
77
78 - Why is there no "usleep" / What is a good range?
79 Since usleep_range is built on top of hrtimers, the
80 wakeup will be very precise (ish), thus a simple
81 usleep function would likely introduce a large number
82 of undesired interrupts.
83
84 With the introduction of a range, the scheduler is
85 free to coalesce your wakeup with any other wakeup
86 that may have happened for other reasons, or at the
87 worst case, fire an interrupt for your upper bound.
88
89 The larger a range you supply, the greater a chance
90 that you will not trigger an interrupt; this should
91 be balanced with what is an acceptable upper bound on
92 delay / performance for your specific code path. Exact
93 tolerances here are very situation specific, thus it
94 is left to the caller to determine a reasonable range.
95
96 SLEEPING FOR LARGER MSECS ( 10ms+ )
97 * Use msleep or possibly msleep_interruptible
98
99 - What's the difference?
100 msleep sets the current task to TASK_UNINTERRUPTIBLE
101 whereas msleep_interruptible sets the current task to
102 TASK_INTERRUPTIBLE before scheduling the sleep. In
103 short, the difference is whether the sleep can be ended
104 early by a signal. In general, just use msleep unless
105 you know you have a need for the interruptible variant.
diff --git a/Documentation/tomoyo.txt b/Documentation/tomoyo.txt
index b3a232cae7f8..200a2d37cbc8 100644
--- a/Documentation/tomoyo.txt
+++ b/Documentation/tomoyo.txt
@@ -3,8 +3,8 @@
3TOMOYO is a name-based MAC extension (LSM module) for the Linux kernel. 3TOMOYO is a name-based MAC extension (LSM module) for the Linux kernel.
4 4
5LiveCD-based tutorials are available at 5LiveCD-based tutorials are available at
6http://tomoyo.sourceforge.jp/en/1.6.x/1st-step/ubuntu8.04-live/ 6http://tomoyo.sourceforge.jp/1.7/1st-step/ubuntu10.04-live/
7http://tomoyo.sourceforge.jp/en/1.6.x/1st-step/centos5-live/ . 7http://tomoyo.sourceforge.jp/1.7/1st-step/centos5-live/ .
8Though these tutorials use non-LSM version of TOMOYO, they are useful for you 8Though these tutorials use non-LSM version of TOMOYO, they are useful for you
9to know what TOMOYO is. 9to know what TOMOYO is.
10 10
@@ -13,12 +13,12 @@ to know what TOMOYO is.
13Build the kernel with CONFIG_SECURITY_TOMOYO=y and pass "security=tomoyo" on 13Build the kernel with CONFIG_SECURITY_TOMOYO=y and pass "security=tomoyo" on
14kernel's command line. 14kernel's command line.
15 15
16Please see http://tomoyo.sourceforge.jp/en/2.2.x/ for details. 16Please see http://tomoyo.sourceforge.jp/2.3/ for details.
17 17
18--- Where is documentation? --- 18--- Where is documentation? ---
19 19
20User <-> Kernel interface documentation is available at 20User <-> Kernel interface documentation is available at
21http://tomoyo.sourceforge.jp/en/2.2.x/policy-reference.html . 21http://tomoyo.sourceforge.jp/2.3/policy-reference.html .
22 22
23Materials we prepared for seminars and symposiums are available at 23Materials we prepared for seminars and symposiums are available at
24http://sourceforge.jp/projects/tomoyo/docs/?category_id=532&language_id=1 . 24http://sourceforge.jp/projects/tomoyo/docs/?category_id=532&language_id=1 .
@@ -50,6 +50,6 @@ multiple LSM modules at the same time. We feel sorry that you have to give up
50SELinux/SMACK/AppArmor etc. when you want to use TOMOYO. 50SELinux/SMACK/AppArmor etc. when you want to use TOMOYO.
51 51
52We hope that LSM becomes stackable in future. Meanwhile, you can use non-LSM 52We hope that LSM becomes stackable in future. Meanwhile, you can use non-LSM
53version of TOMOYO, available at http://tomoyo.sourceforge.jp/en/1.6.x/ . 53version of TOMOYO, available at http://tomoyo.sourceforge.jp/1.7/ .
54LSM version of TOMOYO is a subset of non-LSM version of TOMOYO. We are planning 54LSM version of TOMOYO is a subset of non-LSM version of TOMOYO. We are planning
55to port non-LSM version's functionalities to LSM versions. 55to port non-LSM version's functionalities to LSM versions.
diff --git a/Documentation/trace/ftrace-design.txt b/Documentation/trace/ftrace-design.txt
index f1f81afee8a0..dc52bd442c92 100644
--- a/Documentation/trace/ftrace-design.txt
+++ b/Documentation/trace/ftrace-design.txt
@@ -13,6 +13,9 @@ Note that this focuses on architecture implementation details only. If you
13want more explanation of a feature in terms of common code, review the common 13want more explanation of a feature in terms of common code, review the common
14ftrace.txt file. 14ftrace.txt file.
15 15
16Ideally, everyone who wishes to retain performance while supporting tracing in
17their kernel should make it all the way to dynamic ftrace support.
18
16 19
17Prerequisites 20Prerequisites
18------------- 21-------------
@@ -215,7 +218,7 @@ An arch may pass in a unique value (frame pointer) to both the entering and
215exiting of a function. On exit, the value is compared and if it does not 218exiting of a function. On exit, the value is compared and if it does not
216match, then it will panic the kernel. This is largely a sanity check for bad 219match, then it will panic the kernel. This is largely a sanity check for bad
217code generation with gcc. If gcc for your port sanely updates the frame 220code generation with gcc. If gcc for your port sanely updates the frame
218pointer under different opitmization levels, then ignore this option. 221pointer under different optimization levels, then ignore this option.
219 222
220However, adding support for it isn't terribly difficult. In your assembly code 223However, adding support for it isn't terribly difficult. In your assembly code
221that calls prepare_ftrace_return(), pass the frame pointer as the 3rd argument. 224that calls prepare_ftrace_return(), pass the frame pointer as the 3rd argument.
@@ -234,7 +237,7 @@ If you can't trace NMI functions, then skip this option.
234 237
235 238
236HAVE_SYSCALL_TRACEPOINTS 239HAVE_SYSCALL_TRACEPOINTS
237--------------------- 240------------------------
238 241
239You need very few things to get the syscalls tracing in an arch. 242You need very few things to get the syscalls tracing in an arch.
240 243
@@ -250,12 +253,152 @@ You need very few things to get the syscalls tracing in an arch.
250HAVE_FTRACE_MCOUNT_RECORD 253HAVE_FTRACE_MCOUNT_RECORD
251------------------------- 254-------------------------
252 255
253See scripts/recordmcount.pl for more info. 256See scripts/recordmcount.pl for more info. Just fill in the arch-specific
257details for how to locate the addresses of mcount call sites via objdump.
258This option doesn't make much sense without also implementing dynamic ftrace.
254 259
260
261HAVE_DYNAMIC_FTRACE
262-------------------
263
264You will first need HAVE_FTRACE_MCOUNT_RECORD and HAVE_FUNCTION_TRACER, so
265scroll your reader back up if you got over eager.
266
267Once those are out of the way, you will need to implement:
268 - asm/ftrace.h:
269 - MCOUNT_ADDR
270 - ftrace_call_adjust()
271 - struct dyn_arch_ftrace{}
272 - asm code:
273 - mcount() (new stub)
274 - ftrace_caller()
275 - ftrace_call()
276 - ftrace_stub()
277 - C code:
278 - ftrace_dyn_arch_init()
279 - ftrace_make_nop()
280 - ftrace_make_call()
281 - ftrace_update_ftrace_func()
282
283First you will need to fill out some arch details in your asm/ftrace.h.
284
285Define MCOUNT_ADDR as the address of your mcount symbol similar to:
286 #define MCOUNT_ADDR ((unsigned long)mcount)
287Since no one else will have a decl for that function, you will need to:
288 extern void mcount(void);
289
290You will also need the helper function ftrace_call_adjust(). Most people
291will be able to stub it out like so:
292 static inline unsigned long ftrace_call_adjust(unsigned long addr)
293 {
294 return addr;
295 }
255<details to be filled> 296<details to be filled>
256 297
298Lastly you will need the custom dyn_arch_ftrace structure. If you need
299some extra state when runtime patching arbitrary call sites, this is the
300place. For now though, create an empty struct:
301 struct dyn_arch_ftrace {
302 /* No extra data needed */
303 };
304
305With the header out of the way, we can fill out the assembly code. While we
306did already create a mcount() function earlier, dynamic ftrace only wants a
307stub function. This is because the mcount() will only be used during boot
308and then all references to it will be patched out never to return. Instead,
309the guts of the old mcount() will be used to create a new ftrace_caller()
310function. Because the two are hard to merge, it will most likely be a lot
311easier to have two separate definitions split up by #ifdefs. Same goes for
312the ftrace_stub() as that will now be inlined in ftrace_caller().
313
314Before we get confused anymore, let's check out some pseudo code so you can
315implement your own stuff in assembly:
257 316
258HAVE_DYNAMIC_FTRACE 317void mcount(void)
259--------------------- 318{
319 return;
320}
321
322void ftrace_caller(void)
323{
324 /* implement HAVE_FUNCTION_TRACE_MCOUNT_TEST if you desire */
325
326 /* save all state needed by the ABI (see paragraph above) */
327
328 unsigned long frompc = ...;
329 unsigned long selfpc = <return address> - MCOUNT_INSN_SIZE;
330
331ftrace_call:
332 ftrace_stub(frompc, selfpc);
333
334 /* restore all state needed by the ABI */
335
336ftrace_stub:
337 return;
338}
339
340This might look a little odd at first, but keep in mind that we will be runtime
341patching multiple things. First, only functions that we actually want to trace
342will be patched to call ftrace_caller(). Second, since we only have one tracer
343active at a time, we will patch the ftrace_caller() function itself to call the
344specific tracer in question. That is the point of the ftrace_call label.
345
346With that in mind, let's move on to the C code that will actually be doing the
347runtime patching. You'll need a little knowledge of your arch's opcodes in
348order to make it through the next section.
349
350Every arch has an init callback function. If you need to do something early on
351to initialize some state, this is the time to do that. Otherwise, this simple
352function below should be sufficient for most people:
353
354int __init ftrace_dyn_arch_init(void *data)
355{
356 /* return value is done indirectly via data */
357 *(unsigned long *)data = 0;
358
359 return 0;
360}
361
362There are two functions that are used to do runtime patching of arbitrary
363functions. The first is used to turn the mcount call site into a nop (which
364is what helps us retain runtime performance when not tracing). The second is
365used to turn the mcount call site into a call to an arbitrary location (but
366typically that is ftracer_caller()). See the general function definition in
367linux/ftrace.h for the functions:
368 ftrace_make_nop()
369 ftrace_make_call()
370The rec->ip value is the address of the mcount call site that was collected
371by the scripts/recordmcount.pl during build time.
372
373The last function is used to do runtime patching of the active tracer. This
374will be modifying the assembly code at the location of the ftrace_call symbol
375inside of the ftrace_caller() function. So you should have sufficient padding
376at that location to support the new function calls you'll be inserting. Some
377people will be using a "call" type instruction while others will be using a
378"branch" type instruction. Specifically, the function is:
379 ftrace_update_ftrace_func()
380
381
382HAVE_DYNAMIC_FTRACE + HAVE_FUNCTION_GRAPH_TRACER
383------------------------------------------------
384
385The function grapher needs a few tweaks in order to work with dynamic ftrace.
386Basically, you will need to:
387 - update:
388 - ftrace_caller()
389 - ftrace_graph_call()
390 - ftrace_graph_caller()
391 - implement:
392 - ftrace_enable_ftrace_graph_caller()
393 - ftrace_disable_ftrace_graph_caller()
260 394
261<details to be filled> 395<details to be filled>
396Quick notes:
397 - add a nop stub after the ftrace_call location named ftrace_graph_call;
398 stub needs to be large enough to support a call to ftrace_graph_caller()
399 - update ftrace_graph_caller() to work with being called by the new
400 ftrace_caller() since some semantics may have changed
401 - ftrace_enable_ftrace_graph_caller() will runtime patch the
402 ftrace_graph_call location with a call to ftrace_graph_caller()
403 - ftrace_disable_ftrace_graph_caller() will runtime patch the
404 ftrace_graph_call location with nops
diff --git a/Documentation/trace/kmemtrace.txt b/Documentation/trace/kmemtrace.txt
deleted file mode 100644
index 6308735e58ca..000000000000
--- a/Documentation/trace/kmemtrace.txt
+++ /dev/null
@@ -1,126 +0,0 @@
1 kmemtrace - Kernel Memory Tracer
2
3 by Eduard - Gabriel Munteanu
4 <eduard.munteanu@linux360.ro>
5
6I. Introduction
7===============
8
9kmemtrace helps kernel developers figure out two things:
101) how different allocators (SLAB, SLUB etc.) perform
112) how kernel code allocates memory and how much
12
13To do this, we trace every allocation and export information to the userspace
14through the relay interface. We export things such as the number of requested
15bytes, the number of bytes actually allocated (i.e. including internal
16fragmentation), whether this is a slab allocation or a plain kmalloc() and so
17on.
18
19The actual analysis is performed by a userspace tool (see section III for
20details on where to get it from). It logs the data exported by the kernel,
21processes it and (as of writing this) can provide the following information:
22- the total amount of memory allocated and fragmentation per call-site
23- the amount of memory allocated and fragmentation per allocation
24- total memory allocated and fragmentation in the collected dataset
25- number of cross-CPU allocation and frees (makes sense in NUMA environments)
26
27Moreover, it can potentially find inconsistent and erroneous behavior in
28kernel code, such as using slab free functions on kmalloc'ed memory or
29allocating less memory than requested (but not truly failed allocations).
30
31kmemtrace also makes provisions for tracing on some arch and analysing the
32data on another.
33
34II. Design and goals
35====================
36
37kmemtrace was designed to handle rather large amounts of data. Thus, it uses
38the relay interface to export whatever is logged to userspace, which then
39stores it. Analysis and reporting is done asynchronously, that is, after the
40data is collected and stored. By design, it allows one to log and analyse
41on different machines and different arches.
42
43As of writing this, the ABI is not considered stable, though it might not
44change much. However, no guarantees are made about compatibility yet. When
45deemed stable, the ABI should still allow easy extension while maintaining
46backward compatibility. This is described further in Documentation/ABI.
47
48Summary of design goals:
49 - allow logging and analysis to be done across different machines
50 - be fast and anticipate usage in high-load environments (*)
51 - be reasonably extensible
52 - make it possible for GNU/Linux distributions to have kmemtrace
53 included in their repositories
54
55(*) - one of the reasons Pekka Enberg's original userspace data analysis
56 tool's code was rewritten from Perl to C (although this is more than a
57 simple conversion)
58
59
60III. Quick usage guide
61======================
62
631) Get a kernel that supports kmemtrace and build it accordingly (i.e. enable
64CONFIG_KMEMTRACE).
65
662) Get the userspace tool and build it:
67$ git clone git://repo.or.cz/kmemtrace-user.git # current repository
68$ cd kmemtrace-user/
69$ ./autogen.sh
70$ ./configure
71$ make
72
733) Boot the kmemtrace-enabled kernel if you haven't, preferably in the
74'single' runlevel (so that relay buffers don't fill up easily), and run
75kmemtrace:
76# '$' does not mean user, but root here.
77$ mount -t debugfs none /sys/kernel/debug
78$ mount -t proc none /proc
79$ cd path/to/kmemtrace-user/
80$ ./kmemtraced
81Wait a bit, then stop it with CTRL+C.
82$ cat /sys/kernel/debug/kmemtrace/total_overruns # Check if we didn't
83 # overrun, should
84 # be zero.
85$ (Optionally) [Run kmemtrace_check separately on each cpu[0-9]*.out file to
86 check its correctness]
87$ ./kmemtrace-report
88
89Now you should have a nice and short summary of how the allocator performs.
90
91IV. FAQ and known issues
92========================
93
94Q: 'cat /sys/kernel/debug/kmemtrace/total_overruns' is non-zero, how do I fix
95this? Should I worry?
96A: If it's non-zero, this affects kmemtrace's accuracy, depending on how
97large the number is. You can fix it by supplying a higher
98'kmemtrace.subbufs=N' kernel parameter.
99---
100
101Q: kmemtrace_check reports errors, how do I fix this? Should I worry?
102A: This is a bug and should be reported. It can occur for a variety of
103reasons:
104 - possible bugs in relay code
105 - possible misuse of relay by kmemtrace
106 - timestamps being collected unorderly
107Or you may fix it yourself and send us a patch.
108---
109
110Q: kmemtrace_report shows many errors, how do I fix this? Should I worry?
111A: This is a known issue and I'm working on it. These might be true errors
112in kernel code, which may have inconsistent behavior (e.g. allocating memory
113with kmem_cache_alloc() and freeing it with kfree()). Pekka Enberg pointed
114out this behavior may work with SLAB, but may fail with other allocators.
115
116It may also be due to lack of tracing in some unusual allocator functions.
117
118We don't want bug reports regarding this issue yet.
119---
120
121V. See also
122===========
123
124Documentation/kernel-parameters.txt
125Documentation/ABI/testing/debugfs-kmemtrace
126
diff --git a/Documentation/trace/kprobetrace.txt b/Documentation/trace/kprobetrace.txt
index ec94748ae65b..5f77d94598dd 100644
--- a/Documentation/trace/kprobetrace.txt
+++ b/Documentation/trace/kprobetrace.txt
@@ -42,7 +42,7 @@ Synopsis of kprobe_events
42 +|-offs(FETCHARG) : Fetch memory at FETCHARG +|- offs address.(**) 42 +|-offs(FETCHARG) : Fetch memory at FETCHARG +|- offs address.(**)
43 NAME=FETCHARG : Set NAME as the argument name of FETCHARG. 43 NAME=FETCHARG : Set NAME as the argument name of FETCHARG.
44 FETCHARG:TYPE : Set TYPE as the type of FETCHARG. Currently, basic types 44 FETCHARG:TYPE : Set TYPE as the type of FETCHARG. Currently, basic types
45 (u8/u16/u32/u64/s8/s16/s32/s64) are supported. 45 (u8/u16/u32/u64/s8/s16/s32/s64) and string are supported.
46 46
47 (*) only for return probe. 47 (*) only for return probe.
48 (**) this is useful for fetching a field of data structures. 48 (**) this is useful for fetching a field of data structures.
diff --git a/Documentation/trace/postprocess/trace-vmscan-postprocess.pl b/Documentation/trace/postprocess/trace-vmscan-postprocess.pl
new file mode 100644
index 000000000000..b3e73ddb1567
--- /dev/null
+++ b/Documentation/trace/postprocess/trace-vmscan-postprocess.pl
@@ -0,0 +1,705 @@
1#!/usr/bin/perl
2# This is a POC for reading the text representation of trace output related to
3# page reclaim. It makes an attempt to extract some high-level information on
4# what is going on. The accuracy of the parser may vary
5#
6# Example usage: trace-vmscan-postprocess.pl < /sys/kernel/debug/tracing/trace_pipe
7# other options
8# --read-procstat If the trace lacks process info, get it from /proc
9# --ignore-pid Aggregate processes of the same name together
10#
11# Copyright (c) IBM Corporation 2009
12# Author: Mel Gorman <mel@csn.ul.ie>
13use strict;
14use Getopt::Long;
15
16# Tracepoint events
17use constant MM_VMSCAN_DIRECT_RECLAIM_BEGIN => 1;
18use constant MM_VMSCAN_DIRECT_RECLAIM_END => 2;
19use constant MM_VMSCAN_KSWAPD_WAKE => 3;
20use constant MM_VMSCAN_KSWAPD_SLEEP => 4;
21use constant MM_VMSCAN_LRU_SHRINK_ACTIVE => 5;
22use constant MM_VMSCAN_LRU_SHRINK_INACTIVE => 6;
23use constant MM_VMSCAN_LRU_ISOLATE => 7;
24use constant MM_VMSCAN_WRITEPAGE_FILE_SYNC => 8;
25use constant MM_VMSCAN_WRITEPAGE_ANON_SYNC => 9;
26use constant MM_VMSCAN_WRITEPAGE_FILE_ASYNC => 10;
27use constant MM_VMSCAN_WRITEPAGE_ANON_ASYNC => 11;
28use constant MM_VMSCAN_WRITEPAGE_ASYNC => 12;
29use constant EVENT_UNKNOWN => 13;
30
31# Per-order events
32use constant MM_VMSCAN_DIRECT_RECLAIM_BEGIN_PERORDER => 11;
33use constant MM_VMSCAN_WAKEUP_KSWAPD_PERORDER => 12;
34use constant MM_VMSCAN_KSWAPD_WAKE_PERORDER => 13;
35use constant HIGH_KSWAPD_REWAKEUP_PERORDER => 14;
36
37# Constants used to track state
38use constant STATE_DIRECT_BEGIN => 15;
39use constant STATE_DIRECT_ORDER => 16;
40use constant STATE_KSWAPD_BEGIN => 17;
41use constant STATE_KSWAPD_ORDER => 18;
42
43# High-level events extrapolated from tracepoints
44use constant HIGH_DIRECT_RECLAIM_LATENCY => 19;
45use constant HIGH_KSWAPD_LATENCY => 20;
46use constant HIGH_KSWAPD_REWAKEUP => 21;
47use constant HIGH_NR_SCANNED => 22;
48use constant HIGH_NR_TAKEN => 23;
49use constant HIGH_NR_RECLAIMED => 24;
50use constant HIGH_NR_CONTIG_DIRTY => 25;
51
52my %perprocesspid;
53my %perprocess;
54my %last_procmap;
55my $opt_ignorepid;
56my $opt_read_procstat;
57
58my $total_wakeup_kswapd;
59my ($total_direct_reclaim, $total_direct_nr_scanned);
60my ($total_direct_latency, $total_kswapd_latency);
61my ($total_direct_nr_reclaimed);
62my ($total_direct_writepage_file_sync, $total_direct_writepage_file_async);
63my ($total_direct_writepage_anon_sync, $total_direct_writepage_anon_async);
64my ($total_kswapd_nr_scanned, $total_kswapd_wake);
65my ($total_kswapd_writepage_file_sync, $total_kswapd_writepage_file_async);
66my ($total_kswapd_writepage_anon_sync, $total_kswapd_writepage_anon_async);
67my ($total_kswapd_nr_reclaimed);
68
69# Catch sigint and exit on request
70my $sigint_report = 0;
71my $sigint_exit = 0;
72my $sigint_pending = 0;
73my $sigint_received = 0;
74sub sigint_handler {
75 my $current_time = time;
76 if ($current_time - 2 > $sigint_received) {
77 print "SIGINT received, report pending. Hit ctrl-c again to exit\n";
78 $sigint_report = 1;
79 } else {
80 if (!$sigint_exit) {
81 print "Second SIGINT received quickly, exiting\n";
82 }
83 $sigint_exit++;
84 }
85
86 if ($sigint_exit > 3) {
87 print "Many SIGINTs received, exiting now without report\n";
88 exit;
89 }
90
91 $sigint_received = $current_time;
92 $sigint_pending = 1;
93}
94$SIG{INT} = "sigint_handler";
95
96# Parse command line options
97GetOptions(
98 'ignore-pid' => \$opt_ignorepid,
99 'read-procstat' => \$opt_read_procstat,
100);
101
102# Defaults for dynamically discovered regex's
103my $regex_direct_begin_default = 'order=([0-9]*) may_writepage=([0-9]*) gfp_flags=([A-Z_|]*)';
104my $regex_direct_end_default = 'nr_reclaimed=([0-9]*)';
105my $regex_kswapd_wake_default = 'nid=([0-9]*) order=([0-9]*)';
106my $regex_kswapd_sleep_default = 'nid=([0-9]*)';
107my $regex_wakeup_kswapd_default = 'nid=([0-9]*) zid=([0-9]*) order=([0-9]*)';
108my $regex_lru_isolate_default = 'isolate_mode=([0-9]*) order=([0-9]*) nr_requested=([0-9]*) nr_scanned=([0-9]*) nr_taken=([0-9]*) contig_taken=([0-9]*) contig_dirty=([0-9]*) contig_failed=([0-9]*)';
109my $regex_lru_shrink_inactive_default = 'nid=([0-9]*) zid=([0-9]*) nr_scanned=([0-9]*) nr_reclaimed=([0-9]*) priority=([0-9]*) flags=([A-Z_|]*)';
110my $regex_lru_shrink_active_default = 'lru=([A-Z_]*) nr_scanned=([0-9]*) nr_rotated=([0-9]*) priority=([0-9]*)';
111my $regex_writepage_default = 'page=([0-9a-f]*) pfn=([0-9]*) flags=([A-Z_|]*)';
112
113# Dyanically discovered regex
114my $regex_direct_begin;
115my $regex_direct_end;
116my $regex_kswapd_wake;
117my $regex_kswapd_sleep;
118my $regex_wakeup_kswapd;
119my $regex_lru_isolate;
120my $regex_lru_shrink_inactive;
121my $regex_lru_shrink_active;
122my $regex_writepage;
123
124# Static regex used. Specified like this for readability and for use with /o
125# (process_pid) (cpus ) ( time ) (tpoint ) (details)
126my $regex_traceevent = '\s*([a-zA-Z0-9-]*)\s*(\[[0-9]*\])\s*([0-9.]*):\s*([a-zA-Z_]*):\s*(.*)';
127my $regex_statname = '[-0-9]*\s\((.*)\).*';
128my $regex_statppid = '[-0-9]*\s\(.*\)\s[A-Za-z]\s([0-9]*).*';
129
130sub generate_traceevent_regex {
131 my $event = shift;
132 my $default = shift;
133 my $regex;
134
135 # Read the event format or use the default
136 if (!open (FORMAT, "/sys/kernel/debug/tracing/events/$event/format")) {
137 print("WARNING: Event $event format string not found\n");
138 return $default;
139 } else {
140 my $line;
141 while (!eof(FORMAT)) {
142 $line = <FORMAT>;
143 $line =~ s/, REC->.*//;
144 if ($line =~ /^print fmt:\s"(.*)".*/) {
145 $regex = $1;
146 $regex =~ s/%s/\([0-9a-zA-Z|_]*\)/g;
147 $regex =~ s/%p/\([0-9a-f]*\)/g;
148 $regex =~ s/%d/\([-0-9]*\)/g;
149 $regex =~ s/%ld/\([-0-9]*\)/g;
150 $regex =~ s/%lu/\([0-9]*\)/g;
151 }
152 }
153 }
154
155 # Can't handle the print_flags stuff but in the context of this
156 # script, it really doesn't matter
157 $regex =~ s/\(REC.*\) \? __print_flags.*//;
158
159 # Verify fields are in the right order
160 my $tuple;
161 foreach $tuple (split /\s/, $regex) {
162 my ($key, $value) = split(/=/, $tuple);
163 my $expected = shift;
164 if ($key ne $expected) {
165 print("WARNING: Format not as expected for event $event '$key' != '$expected'\n");
166 $regex =~ s/$key=\((.*)\)/$key=$1/;
167 }
168 }
169
170 if (defined shift) {
171 die("Fewer fields than expected in format");
172 }
173
174 return $regex;
175}
176
177$regex_direct_begin = generate_traceevent_regex(
178 "vmscan/mm_vmscan_direct_reclaim_begin",
179 $regex_direct_begin_default,
180 "order", "may_writepage",
181 "gfp_flags");
182$regex_direct_end = generate_traceevent_regex(
183 "vmscan/mm_vmscan_direct_reclaim_end",
184 $regex_direct_end_default,
185 "nr_reclaimed");
186$regex_kswapd_wake = generate_traceevent_regex(
187 "vmscan/mm_vmscan_kswapd_wake",
188 $regex_kswapd_wake_default,
189 "nid", "order");
190$regex_kswapd_sleep = generate_traceevent_regex(
191 "vmscan/mm_vmscan_kswapd_sleep",
192 $regex_kswapd_sleep_default,
193 "nid");
194$regex_wakeup_kswapd = generate_traceevent_regex(
195 "vmscan/mm_vmscan_wakeup_kswapd",
196 $regex_wakeup_kswapd_default,
197 "nid", "zid", "order");
198$regex_lru_isolate = generate_traceevent_regex(
199 "vmscan/mm_vmscan_lru_isolate",
200 $regex_lru_isolate_default,
201 "isolate_mode", "order",
202 "nr_requested", "nr_scanned", "nr_taken",
203 "contig_taken", "contig_dirty", "contig_failed");
204$regex_lru_shrink_inactive = generate_traceevent_regex(
205 "vmscan/mm_vmscan_lru_shrink_inactive",
206 $regex_lru_shrink_inactive_default,
207 "nid", "zid",
208 "nr_scanned", "nr_reclaimed", "priority",
209 "flags");
210$regex_lru_shrink_active = generate_traceevent_regex(
211 "vmscan/mm_vmscan_lru_shrink_active",
212 $regex_lru_shrink_active_default,
213 "nid", "zid",
214 "lru",
215 "nr_scanned", "nr_rotated", "priority");
216$regex_writepage = generate_traceevent_regex(
217 "vmscan/mm_vmscan_writepage",
218 $regex_writepage_default,
219 "page", "pfn", "flags");
220
221sub read_statline($) {
222 my $pid = $_[0];
223 my $statline;
224
225 if (open(STAT, "/proc/$pid/stat")) {
226 $statline = <STAT>;
227 close(STAT);
228 }
229
230 if ($statline eq '') {
231 $statline = "-1 (UNKNOWN_PROCESS_NAME) R 0";
232 }
233
234 return $statline;
235}
236
237sub guess_process_pid($$) {
238 my $pid = $_[0];
239 my $statline = $_[1];
240
241 if ($pid == 0) {
242 return "swapper-0";
243 }
244
245 if ($statline !~ /$regex_statname/o) {
246 die("Failed to math stat line for process name :: $statline");
247 }
248 return "$1-$pid";
249}
250
251# Convert sec.usec timestamp format
252sub timestamp_to_ms($) {
253 my $timestamp = $_[0];
254
255 my ($sec, $usec) = split (/\./, $timestamp);
256 return ($sec * 1000) + ($usec / 1000);
257}
258
259sub process_events {
260 my $traceevent;
261 my $process_pid;
262 my $cpus;
263 my $timestamp;
264 my $tracepoint;
265 my $details;
266 my $statline;
267
268 # Read each line of the event log
269EVENT_PROCESS:
270 while ($traceevent = <STDIN>) {
271 if ($traceevent =~ /$regex_traceevent/o) {
272 $process_pid = $1;
273 $timestamp = $3;
274 $tracepoint = $4;
275
276 $process_pid =~ /(.*)-([0-9]*)$/;
277 my $process = $1;
278 my $pid = $2;
279
280 if ($process eq "") {
281 $process = $last_procmap{$pid};
282 $process_pid = "$process-$pid";
283 }
284 $last_procmap{$pid} = $process;
285
286 if ($opt_read_procstat) {
287 $statline = read_statline($pid);
288 if ($opt_read_procstat && $process eq '') {
289 $process_pid = guess_process_pid($pid, $statline);
290 }
291 }
292 } else {
293 next;
294 }
295
296 # Perl Switch() sucks majorly
297 if ($tracepoint eq "mm_vmscan_direct_reclaim_begin") {
298 $timestamp = timestamp_to_ms($timestamp);
299 $perprocesspid{$process_pid}->{MM_VMSCAN_DIRECT_RECLAIM_BEGIN}++;
300 $perprocesspid{$process_pid}->{STATE_DIRECT_BEGIN} = $timestamp;
301
302 $details = $5;
303 if ($details !~ /$regex_direct_begin/o) {
304 print "WARNING: Failed to parse mm_vmscan_direct_reclaim_begin as expected\n";
305 print " $details\n";
306 print " $regex_direct_begin\n";
307 next;
308 }
309 my $order = $1;
310 $perprocesspid{$process_pid}->{MM_VMSCAN_DIRECT_RECLAIM_BEGIN_PERORDER}[$order]++;
311 $perprocesspid{$process_pid}->{STATE_DIRECT_ORDER} = $order;
312 } elsif ($tracepoint eq "mm_vmscan_direct_reclaim_end") {
313 # Count the event itself
314 my $index = $perprocesspid{$process_pid}->{MM_VMSCAN_DIRECT_RECLAIM_END};
315 $perprocesspid{$process_pid}->{MM_VMSCAN_DIRECT_RECLAIM_END}++;
316
317 # Record how long direct reclaim took this time
318 if (defined $perprocesspid{$process_pid}->{STATE_DIRECT_BEGIN}) {
319 $timestamp = timestamp_to_ms($timestamp);
320 my $order = $perprocesspid{$process_pid}->{STATE_DIRECT_ORDER};
321 my $latency = ($timestamp - $perprocesspid{$process_pid}->{STATE_DIRECT_BEGIN});
322 $perprocesspid{$process_pid}->{HIGH_DIRECT_RECLAIM_LATENCY}[$index] = "$order-$latency";
323 }
324 } elsif ($tracepoint eq "mm_vmscan_kswapd_wake") {
325 $details = $5;
326 if ($details !~ /$regex_kswapd_wake/o) {
327 print "WARNING: Failed to parse mm_vmscan_kswapd_wake as expected\n";
328 print " $details\n";
329 print " $regex_kswapd_wake\n";
330 next;
331 }
332
333 my $order = $2;
334 $perprocesspid{$process_pid}->{STATE_KSWAPD_ORDER} = $order;
335 if (!$perprocesspid{$process_pid}->{STATE_KSWAPD_BEGIN}) {
336 $timestamp = timestamp_to_ms($timestamp);
337 $perprocesspid{$process_pid}->{MM_VMSCAN_KSWAPD_WAKE}++;
338 $perprocesspid{$process_pid}->{STATE_KSWAPD_BEGIN} = $timestamp;
339 $perprocesspid{$process_pid}->{MM_VMSCAN_KSWAPD_WAKE_PERORDER}[$order]++;
340 } else {
341 $perprocesspid{$process_pid}->{HIGH_KSWAPD_REWAKEUP}++;
342 $perprocesspid{$process_pid}->{HIGH_KSWAPD_REWAKEUP_PERORDER}[$order]++;
343 }
344 } elsif ($tracepoint eq "mm_vmscan_kswapd_sleep") {
345
346 # Count the event itself
347 my $index = $perprocesspid{$process_pid}->{MM_VMSCAN_KSWAPD_SLEEP};
348 $perprocesspid{$process_pid}->{MM_VMSCAN_KSWAPD_SLEEP}++;
349
350 # Record how long kswapd was awake
351 $timestamp = timestamp_to_ms($timestamp);
352 my $order = $perprocesspid{$process_pid}->{STATE_KSWAPD_ORDER};
353 my $latency = ($timestamp - $perprocesspid{$process_pid}->{STATE_KSWAPD_BEGIN});
354 $perprocesspid{$process_pid}->{HIGH_KSWAPD_LATENCY}[$index] = "$order-$latency";
355 $perprocesspid{$process_pid}->{STATE_KSWAPD_BEGIN} = 0;
356 } elsif ($tracepoint eq "mm_vmscan_wakeup_kswapd") {
357 $perprocesspid{$process_pid}->{MM_VMSCAN_WAKEUP_KSWAPD}++;
358
359 $details = $5;
360 if ($details !~ /$regex_wakeup_kswapd/o) {
361 print "WARNING: Failed to parse mm_vmscan_wakeup_kswapd as expected\n";
362 print " $details\n";
363 print " $regex_wakeup_kswapd\n";
364 next;
365 }
366 my $order = $3;
367 $perprocesspid{$process_pid}->{MM_VMSCAN_WAKEUP_KSWAPD_PERORDER}[$order]++;
368 } elsif ($tracepoint eq "mm_vmscan_lru_isolate") {
369 $details = $5;
370 if ($details !~ /$regex_lru_isolate/o) {
371 print "WARNING: Failed to parse mm_vmscan_lru_isolate as expected\n";
372 print " $details\n";
373 print " $regex_lru_isolate/o\n";
374 next;
375 }
376 my $nr_scanned = $4;
377 my $nr_contig_dirty = $7;
378 $perprocesspid{$process_pid}->{HIGH_NR_SCANNED} += $nr_scanned;
379 $perprocesspid{$process_pid}->{HIGH_NR_CONTIG_DIRTY} += $nr_contig_dirty;
380 } elsif ($tracepoint eq "mm_vmscan_lru_shrink_inactive") {
381 $details = $5;
382 if ($details !~ /$regex_lru_shrink_inactive/o) {
383 print "WARNING: Failed to parse mm_vmscan_lru_shrink_inactive as expected\n";
384 print " $details\n";
385 print " $regex_lru_shrink_inactive/o\n";
386 next;
387 }
388 my $nr_reclaimed = $4;
389 $perprocesspid{$process_pid}->{HIGH_NR_RECLAIMED} += $nr_reclaimed;
390 } elsif ($tracepoint eq "mm_vmscan_writepage") {
391 $details = $5;
392 if ($details !~ /$regex_writepage/o) {
393 print "WARNING: Failed to parse mm_vmscan_writepage as expected\n";
394 print " $details\n";
395 print " $regex_writepage\n";
396 next;
397 }
398
399 my $flags = $3;
400 my $file = 0;
401 my $sync_io = 0;
402 if ($flags =~ /RECLAIM_WB_FILE/) {
403 $file = 1;
404 }
405 if ($flags =~ /RECLAIM_WB_SYNC/) {
406 $sync_io = 1;
407 }
408 if ($sync_io) {
409 if ($file) {
410 $perprocesspid{$process_pid}->{MM_VMSCAN_WRITEPAGE_FILE_SYNC}++;
411 } else {
412 $perprocesspid{$process_pid}->{MM_VMSCAN_WRITEPAGE_ANON_SYNC}++;
413 }
414 } else {
415 if ($file) {
416 $perprocesspid{$process_pid}->{MM_VMSCAN_WRITEPAGE_FILE_ASYNC}++;
417 } else {
418 $perprocesspid{$process_pid}->{MM_VMSCAN_WRITEPAGE_ANON_ASYNC}++;
419 }
420 }
421 } else {
422 $perprocesspid{$process_pid}->{EVENT_UNKNOWN}++;
423 }
424
425 if ($sigint_pending) {
426 last EVENT_PROCESS;
427 }
428 }
429}
430
431sub dump_stats {
432 my $hashref = shift;
433 my %stats = %$hashref;
434
435 # Dump per-process stats
436 my $process_pid;
437 my $max_strlen = 0;
438
439 # Get the maximum process name
440 foreach $process_pid (keys %perprocesspid) {
441 my $len = length($process_pid);
442 if ($len > $max_strlen) {
443 $max_strlen = $len;
444 }
445 }
446 $max_strlen += 2;
447
448 # Work out latencies
449 printf("\n") if !$opt_ignorepid;
450 printf("Reclaim latencies expressed as order-latency_in_ms\n") if !$opt_ignorepid;
451 foreach $process_pid (keys %stats) {
452
453 if (!$stats{$process_pid}->{HIGH_DIRECT_RECLAIM_LATENCY}[0] &&
454 !$stats{$process_pid}->{HIGH_KSWAPD_LATENCY}[0]) {
455 next;
456 }
457
458 printf "%-" . $max_strlen . "s ", $process_pid if !$opt_ignorepid;
459 my $index = 0;
460 while (defined $stats{$process_pid}->{HIGH_DIRECT_RECLAIM_LATENCY}[$index] ||
461 defined $stats{$process_pid}->{HIGH_KSWAPD_LATENCY}[$index]) {
462
463 if ($stats{$process_pid}->{HIGH_DIRECT_RECLAIM_LATENCY}[$index]) {
464 printf("%s ", $stats{$process_pid}->{HIGH_DIRECT_RECLAIM_LATENCY}[$index]) if !$opt_ignorepid;
465 my ($dummy, $latency) = split(/-/, $stats{$process_pid}->{HIGH_DIRECT_RECLAIM_LATENCY}[$index]);
466 $total_direct_latency += $latency;
467 } else {
468 printf("%s ", $stats{$process_pid}->{HIGH_KSWAPD_LATENCY}[$index]) if !$opt_ignorepid;
469 my ($dummy, $latency) = split(/-/, $stats{$process_pid}->{HIGH_KSWAPD_LATENCY}[$index]);
470 $total_kswapd_latency += $latency;
471 }
472 $index++;
473 }
474 print "\n" if !$opt_ignorepid;
475 }
476
477 # Print out process activity
478 printf("\n");
479 printf("%-" . $max_strlen . "s %8s %10s %8s %8s %8s %8s %8s %8s\n", "Process", "Direct", "Wokeup", "Pages", "Pages", "Pages", "Pages", "Time");
480 printf("%-" . $max_strlen . "s %8s %10s %8s %8s %8s %8s %8s %8s\n", "details", "Rclms", "Kswapd", "Scanned", "Rclmed", "Sync-IO", "ASync-IO", "Stalled");
481 foreach $process_pid (keys %stats) {
482
483 if (!$stats{$process_pid}->{MM_VMSCAN_DIRECT_RECLAIM_BEGIN}) {
484 next;
485 }
486
487 $total_direct_reclaim += $stats{$process_pid}->{MM_VMSCAN_DIRECT_RECLAIM_BEGIN};
488 $total_wakeup_kswapd += $stats{$process_pid}->{MM_VMSCAN_WAKEUP_KSWAPD};
489 $total_direct_nr_scanned += $stats{$process_pid}->{HIGH_NR_SCANNED};
490 $total_direct_nr_reclaimed += $stats{$process_pid}->{HIGH_NR_RECLAIMED};
491 $total_direct_writepage_file_sync += $stats{$process_pid}->{MM_VMSCAN_WRITEPAGE_FILE_SYNC};
492 $total_direct_writepage_anon_sync += $stats{$process_pid}->{MM_VMSCAN_WRITEPAGE_ANON_SYNC};
493 $total_direct_writepage_file_async += $stats{$process_pid}->{MM_VMSCAN_WRITEPAGE_FILE_ASYNC};
494
495 $total_direct_writepage_anon_async += $stats{$process_pid}->{MM_VMSCAN_WRITEPAGE_ANON_ASYNC};
496
497 my $index = 0;
498 my $this_reclaim_delay = 0;
499 while (defined $stats{$process_pid}->{HIGH_DIRECT_RECLAIM_LATENCY}[$index]) {
500 my ($dummy, $latency) = split(/-/, $stats{$process_pid}->{HIGH_DIRECT_RECLAIM_LATENCY}[$index]);
501 $this_reclaim_delay += $latency;
502 $index++;
503 }
504
505 printf("%-" . $max_strlen . "s %8d %10d %8u %8u %8u %8u %8.3f",
506 $process_pid,
507 $stats{$process_pid}->{MM_VMSCAN_DIRECT_RECLAIM_BEGIN},
508 $stats{$process_pid}->{MM_VMSCAN_WAKEUP_KSWAPD},
509 $stats{$process_pid}->{HIGH_NR_SCANNED},
510 $stats{$process_pid}->{HIGH_NR_RECLAIMED},
511 $stats{$process_pid}->{MM_VMSCAN_WRITEPAGE_FILE_SYNC} + $stats{$process_pid}->{MM_VMSCAN_WRITEPAGE_ANON_SYNC},
512 $stats{$process_pid}->{MM_VMSCAN_WRITEPAGE_FILE_ASYNC} + $stats{$process_pid}->{MM_VMSCAN_WRITEPAGE_ANON_ASYNC},
513 $this_reclaim_delay / 1000);
514
515 if ($stats{$process_pid}->{MM_VMSCAN_DIRECT_RECLAIM_BEGIN}) {
516 print " ";
517 for (my $order = 0; $order < 20; $order++) {
518 my $count = $stats{$process_pid}->{MM_VMSCAN_DIRECT_RECLAIM_BEGIN_PERORDER}[$order];
519 if ($count != 0) {
520 print "direct-$order=$count ";
521 }
522 }
523 }
524 if ($stats{$process_pid}->{MM_VMSCAN_WAKEUP_KSWAPD}) {
525 print " ";
526 for (my $order = 0; $order < 20; $order++) {
527 my $count = $stats{$process_pid}->{MM_VMSCAN_WAKEUP_KSWAPD_PERORDER}[$order];
528 if ($count != 0) {
529 print "wakeup-$order=$count ";
530 }
531 }
532 }
533 if ($stats{$process_pid}->{HIGH_NR_CONTIG_DIRTY}) {
534 print " ";
535 my $count = $stats{$process_pid}->{HIGH_NR_CONTIG_DIRTY};
536 if ($count != 0) {
537 print "contig-dirty=$count ";
538 }
539 }
540
541 print "\n";
542 }
543
544 # Print out kswapd activity
545 printf("\n");
546 printf("%-" . $max_strlen . "s %8s %10s %8s %8s %8s %8s\n", "Kswapd", "Kswapd", "Order", "Pages", "Pages", "Pages", "Pages");
547 printf("%-" . $max_strlen . "s %8s %10s %8s %8s %8s %8s\n", "Instance", "Wakeups", "Re-wakeup", "Scanned", "Rclmed", "Sync-IO", "ASync-IO");
548 foreach $process_pid (keys %stats) {
549
550 if (!$stats{$process_pid}->{MM_VMSCAN_KSWAPD_WAKE}) {
551 next;
552 }
553
554 $total_kswapd_wake += $stats{$process_pid}->{MM_VMSCAN_KSWAPD_WAKE};
555 $total_kswapd_nr_scanned += $stats{$process_pid}->{HIGH_NR_SCANNED};
556 $total_kswapd_nr_reclaimed += $stats{$process_pid}->{HIGH_NR_RECLAIMED};
557 $total_kswapd_writepage_file_sync += $stats{$process_pid}->{MM_VMSCAN_WRITEPAGE_FILE_SYNC};
558 $total_kswapd_writepage_anon_sync += $stats{$process_pid}->{MM_VMSCAN_WRITEPAGE_ANON_SYNC};
559 $total_kswapd_writepage_file_async += $stats{$process_pid}->{MM_VMSCAN_WRITEPAGE_FILE_ASYNC};
560 $total_kswapd_writepage_anon_async += $stats{$process_pid}->{MM_VMSCAN_WRITEPAGE_ANON_ASYNC};
561
562 printf("%-" . $max_strlen . "s %8d %10d %8u %8u %8i %8u",
563 $process_pid,
564 $stats{$process_pid}->{MM_VMSCAN_KSWAPD_WAKE},
565 $stats{$process_pid}->{HIGH_KSWAPD_REWAKEUP},
566 $stats{$process_pid}->{HIGH_NR_SCANNED},
567 $stats{$process_pid}->{HIGH_NR_RECLAIMED},
568 $stats{$process_pid}->{MM_VMSCAN_WRITEPAGE_FILE_SYNC} + $stats{$process_pid}->{MM_VMSCAN_WRITEPAGE_ANON_SYNC},
569 $stats{$process_pid}->{MM_VMSCAN_WRITEPAGE_FILE_ASYNC} + $stats{$process_pid}->{MM_VMSCAN_WRITEPAGE_ANON_ASYNC});
570
571 if ($stats{$process_pid}->{MM_VMSCAN_KSWAPD_WAKE}) {
572 print " ";
573 for (my $order = 0; $order < 20; $order++) {
574 my $count = $stats{$process_pid}->{MM_VMSCAN_KSWAPD_WAKE_PERORDER}[$order];
575 if ($count != 0) {
576 print "wake-$order=$count ";
577 }
578 }
579 }
580 if ($stats{$process_pid}->{HIGH_KSWAPD_REWAKEUP}) {
581 print " ";
582 for (my $order = 0; $order < 20; $order++) {
583 my $count = $stats{$process_pid}->{HIGH_KSWAPD_REWAKEUP_PERORDER}[$order];
584 if ($count != 0) {
585 print "rewake-$order=$count ";
586 }
587 }
588 }
589 printf("\n");
590 }
591
592 # Print out summaries
593 $total_direct_latency /= 1000;
594 $total_kswapd_latency /= 1000;
595 print "\nSummary\n";
596 print "Direct reclaims: $total_direct_reclaim\n";
597 print "Direct reclaim pages scanned: $total_direct_nr_scanned\n";
598 print "Direct reclaim pages reclaimed: $total_direct_nr_reclaimed\n";
599 print "Direct reclaim write file sync I/O: $total_direct_writepage_file_sync\n";
600 print "Direct reclaim write anon sync I/O: $total_direct_writepage_anon_sync\n";
601 print "Direct reclaim write file async I/O: $total_direct_writepage_file_async\n";
602 print "Direct reclaim write anon async I/O: $total_direct_writepage_anon_async\n";
603 print "Wake kswapd requests: $total_wakeup_kswapd\n";
604 printf "Time stalled direct reclaim: %-1.2f seconds\n", $total_direct_latency;
605 print "\n";
606 print "Kswapd wakeups: $total_kswapd_wake\n";
607 print "Kswapd pages scanned: $total_kswapd_nr_scanned\n";
608 print "Kswapd pages reclaimed: $total_kswapd_nr_reclaimed\n";
609 print "Kswapd reclaim write file sync I/O: $total_kswapd_writepage_file_sync\n";
610 print "Kswapd reclaim write anon sync I/O: $total_kswapd_writepage_anon_sync\n";
611 print "Kswapd reclaim write file async I/O: $total_kswapd_writepage_file_async\n";
612 print "Kswapd reclaim write anon async I/O: $total_kswapd_writepage_anon_async\n";
613 printf "Time kswapd awake: %-1.2f seconds\n", $total_kswapd_latency;
614}
615
616sub aggregate_perprocesspid() {
617 my $process_pid;
618 my $process;
619 undef %perprocess;
620
621 foreach $process_pid (keys %perprocesspid) {
622 $process = $process_pid;
623 $process =~ s/-([0-9])*$//;
624 if ($process eq '') {
625 $process = "NO_PROCESS_NAME";
626 }
627
628 $perprocess{$process}->{MM_VMSCAN_DIRECT_RECLAIM_BEGIN} += $perprocesspid{$process_pid}->{MM_VMSCAN_DIRECT_RECLAIM_BEGIN};
629 $perprocess{$process}->{MM_VMSCAN_KSWAPD_WAKE} += $perprocesspid{$process_pid}->{MM_VMSCAN_KSWAPD_WAKE};
630 $perprocess{$process}->{MM_VMSCAN_WAKEUP_KSWAPD} += $perprocesspid{$process_pid}->{MM_VMSCAN_WAKEUP_KSWAPD};
631 $perprocess{$process}->{HIGH_KSWAPD_REWAKEUP} += $perprocesspid{$process_pid}->{HIGH_KSWAPD_REWAKEUP};
632 $perprocess{$process}->{HIGH_NR_SCANNED} += $perprocesspid{$process_pid}->{HIGH_NR_SCANNED};
633 $perprocess{$process}->{HIGH_NR_RECLAIMED} += $perprocesspid{$process_pid}->{HIGH_NR_RECLAIMED};
634 $perprocess{$process}->{MM_VMSCAN_WRITEPAGE_FILE_SYNC} += $perprocesspid{$process_pid}->{MM_VMSCAN_WRITEPAGE_FILE_SYNC};
635 $perprocess{$process}->{MM_VMSCAN_WRITEPAGE_ANON_SYNC} += $perprocesspid{$process_pid}->{MM_VMSCAN_WRITEPAGE_ANON_SYNC};
636 $perprocess{$process}->{MM_VMSCAN_WRITEPAGE_FILE_ASYNC} += $perprocesspid{$process_pid}->{MM_VMSCAN_WRITEPAGE_FILE_ASYNC};
637 $perprocess{$process}->{MM_VMSCAN_WRITEPAGE_ANON_ASYNC} += $perprocesspid{$process_pid}->{MM_VMSCAN_WRITEPAGE_ANON_ASYNC};
638
639 for (my $order = 0; $order < 20; $order++) {
640 $perprocess{$process}->{MM_VMSCAN_DIRECT_RECLAIM_BEGIN_PERORDER}[$order] += $perprocesspid{$process_pid}->{MM_VMSCAN_DIRECT_RECLAIM_BEGIN_PERORDER}[$order];
641 $perprocess{$process}->{MM_VMSCAN_WAKEUP_KSWAPD_PERORDER}[$order] += $perprocesspid{$process_pid}->{MM_VMSCAN_WAKEUP_KSWAPD_PERORDER}[$order];
642 $perprocess{$process}->{MM_VMSCAN_KSWAPD_WAKE_PERORDER}[$order] += $perprocesspid{$process_pid}->{MM_VMSCAN_KSWAPD_WAKE_PERORDER}[$order];
643
644 }
645
646 # Aggregate direct reclaim latencies
647 my $wr_index = $perprocess{$process}->{MM_VMSCAN_DIRECT_RECLAIM_END};
648 my $rd_index = 0;
649 while (defined $perprocesspid{$process_pid}->{HIGH_DIRECT_RECLAIM_LATENCY}[$rd_index]) {
650 $perprocess{$process}->{HIGH_DIRECT_RECLAIM_LATENCY}[$wr_index] = $perprocesspid{$process_pid}->{HIGH_DIRECT_RECLAIM_LATENCY}[$rd_index];
651 $rd_index++;
652 $wr_index++;
653 }
654 $perprocess{$process}->{MM_VMSCAN_DIRECT_RECLAIM_END} = $wr_index;
655
656 # Aggregate kswapd latencies
657 my $wr_index = $perprocess{$process}->{MM_VMSCAN_KSWAPD_SLEEP};
658 my $rd_index = 0;
659 while (defined $perprocesspid{$process_pid}->{HIGH_KSWAPD_LATENCY}[$rd_index]) {
660 $perprocess{$process}->{HIGH_KSWAPD_LATENCY}[$wr_index] = $perprocesspid{$process_pid}->{HIGH_KSWAPD_LATENCY}[$rd_index];
661 $rd_index++;
662 $wr_index++;
663 }
664 $perprocess{$process}->{MM_VMSCAN_DIRECT_RECLAIM_END} = $wr_index;
665 }
666}
667
668sub report() {
669 if (!$opt_ignorepid) {
670 dump_stats(\%perprocesspid);
671 } else {
672 aggregate_perprocesspid();
673 dump_stats(\%perprocess);
674 }
675}
676
677# Process events or signals until neither is available
678sub signal_loop() {
679 my $sigint_processed;
680 do {
681 $sigint_processed = 0;
682 process_events();
683
684 # Handle pending signals if any
685 if ($sigint_pending) {
686 my $current_time = time;
687
688 if ($sigint_exit) {
689 print "Received exit signal\n";
690 $sigint_pending = 0;
691 }
692 if ($sigint_report) {
693 if ($current_time >= $sigint_received + 2) {
694 report();
695 $sigint_report = 0;
696 $sigint_pending = 0;
697 $sigint_processed = 1;
698 }
699 }
700 }
701 } while ($sigint_pending || $sigint_processed);
702}
703
704signal_loop();
705report();
diff --git a/Documentation/uml/UserModeLinux-HOWTO.txt b/Documentation/uml/UserModeLinux-HOWTO.txt
index 628013f944c4..9b7e1904db1c 100644
--- a/Documentation/uml/UserModeLinux-HOWTO.txt
+++ b/Documentation/uml/UserModeLinux-HOWTO.txt
@@ -8,62 +8,6 @@
8 8
9 Table of Contents 9 Table of Contents
10 10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67 1. Introduction 11 1. Introduction
68 12
69 1.1 How is User Mode Linux Different? 13 1.1 How is User Mode Linux Different?
@@ -277,8 +221,7 @@
277 221
278 1. Download the latest UML patch from 222 1. Download the latest UML patch from
279 223
280 the download page <http://user-mode-linux.sourceforge.net/dl- 224 the download page <http://user-mode-linux.sourceforge.net/
281 sf.html>
282 225
283 In this example, the file is uml-patch-2.4.0-prerelease.bz2. 226 In this example, the file is uml-patch-2.4.0-prerelease.bz2.
284 227
@@ -438,7 +381,7 @@
438 as modules, especially filesystems and network protocols and filters, 381 as modules, especially filesystems and network protocols and filters,
439 so most symbols which need to be exported probably already are. 382 so most symbols which need to be exported probably already are.
440 However, if you do find symbols that need exporting, let us 383 However, if you do find symbols that need exporting, let us
441 <http://user-mode-linux.sourceforge.net/contacts.html> know, and 384 <http://user-mode-linux.sourceforge.net/> know, and
442 they'll be "taken care of". 385 they'll be "taken care of".
443 386
444 387
@@ -498,8 +441,8 @@
498 441
499 You will need a filesystem to boot UML from. There are a number 442 You will need a filesystem to boot UML from. There are a number
500 available for download from here <http://user-mode- 443 available for download from here <http://user-mode-
501 linux.sourceforge.net/dl-sf.html> . There are also several tools 444 linux.sourceforge.net/> . There are also several tools
502 <http://user-mode-linux.sourceforge.net/fs_making.html> which can be 445 <http://user-mode-linux.sourceforge.net/> which can be
503 used to generate UML-compatible filesystem images from media. 446 used to generate UML-compatible filesystem images from media.
504 The kernel will boot up and present you with a login prompt. 447 The kernel will boot up and present you with a login prompt.
505 448
@@ -1236,7 +1179,7 @@
1236 1179
1237 1180
1238 Harald's original README is here <http://user-mode-linux.source- 1181 Harald's original README is here <http://user-mode-linux.source-
1239 forge.net/text/mcast.txt> and explains these in detail, as well as 1182 forge.net/> and explains these in detail, as well as
1240 some other issues. 1183 some other issues.
1241 1184
1242 1185
@@ -1311,7 +1254,7 @@
1311 kernel. 1254 kernel.
1312 1255
1313 These were pointed out by Tim Robinson <timro at trkr dot net> in 1256 These were pointed out by Tim Robinson <timro at trkr dot net> in
1314 <http://www.geocrawler.com/lists/3/SourceForge/597/0/> name="this uml- 1257 <http://www.geocrawler.com/> name="this uml-
1315 user post"> . 1258 user post"> .
1316 1259
1317 1260
@@ -2038,7 +1981,7 @@
2038 1981
2039 uml_moo is installed with the UML deb and RPM. If you didn't install 1982 uml_moo is installed with the UML deb and RPM. If you didn't install
2040 UML from one of those packages, you can also get it from the UML 1983 UML from one of those packages, you can also get it from the UML
2041 utilities <http://user-mode-linux.sourceforge.net/dl-sf.html#UML 1984 utilities <http://user-mode-linux.sourceforge.net/
2042 utilities> tar file in tools/moo. 1985 utilities> tar file in tools/moo.
2043 1986
2044 1987
@@ -4599,7 +4542,7 @@
4599 4542
4600 Michael Jennings <mikejen at hevanet.com> sent in some material which 4543 Michael Jennings <mikejen at hevanet.com> sent in some material which
4601 is now gracing the top of the index page <http://user-mode- 4544 is now gracing the top of the index page <http://user-mode-
4602 linux.sourceforge.net/index.html> of this site. 4545 linux.sourceforge.net/> of this site.
4603 4546
4604 SGI <http://www.sgi.com> (and more specifically Ralf Baechle <ralf at 4547 SGI <http://www.sgi.com> (and more specifically Ralf Baechle <ralf at
4605 uni-koblenz.de> ) gave me an account on oss.sgi.com 4548 uni-koblenz.de> ) gave me an account on oss.sgi.com
diff --git a/Documentation/usb/ehci.txt b/Documentation/usb/ehci.txt
index 1536b7e75134..9dcafa7d930d 100644
--- a/Documentation/usb/ehci.txt
+++ b/Documentation/usb/ehci.txt
@@ -9,7 +9,7 @@ compatible with the USB 1.1 standard. It defines three transfer speeds:
9 - "Low Speed" 1.5 Mbit/sec 9 - "Low Speed" 1.5 Mbit/sec
10 10
11USB 1.1 only addressed full speed and low speed. High speed devices 11USB 1.1 only addressed full speed and low speed. High speed devices
12can be used on USB 1.1 systems, but they slow down to USB 1.1 speeds. 12can be used on USB 1.1 systems, but they slow down to USB 1.1 speeds.
13 13
14USB 1.1 devices may also be used on USB 2.0 systems. When plugged 14USB 1.1 devices may also be used on USB 2.0 systems. When plugged
15into an EHCI controller, they are given to a USB 1.1 "companion" 15into an EHCI controller, they are given to a USB 1.1 "companion"
diff --git a/Documentation/usb/gadget_multi.txt b/Documentation/usb/gadget_multi.txt
new file mode 100644
index 000000000000..80f4ef0eb75b
--- /dev/null
+++ b/Documentation/usb/gadget_multi.txt
@@ -0,0 +1,150 @@
1 -*- org -*-
2
3* Overview
4
5The Multifunction Composite Gadget (or g_multi) is a composite gadget
6that makes extensive use of the composite framework to provide
7a... multifunction gadget.
8
9In it's standard configuration it provides a single USB configuration
10with RNDIS[1] (that is Ethernet), USB CDC[2] ACM (that is serial) and
11USB Mass Storage functions.
12
13A CDC ECM (Ethernet) function may be turned on via a Kconfig option
14and RNDIS can be turned off. If they are both enabled the gadget will
15have two configurations -- one with RNDIS and another with CDC ECM[3].
16
17Please not that if you use non-standard configuration (that is enable
18CDC ECM) you may need to change vendor and/or product ID.
19
20* Host drivers
21
22To make use of the gadget one needs to make it work on host side --
23without that there's no hope of achieving anything with the gadget.
24As one might expect, things one need to do very from system to system.
25
26** Linux host drivers
27
28Since the gadget uses standard composite framework and appears as such
29to Linux host it does not need any additional drivers on Linux host
30side. All the functions are handled by respective drivers developed
31for them.
32
33This is also true for two configuration set-up with RNDIS
34configuration being the first one. Linux host will use the second
35configuration with CDC ECM which should work better under Linux.
36
37** Windows host drivers
38
39For the gadget two work under Windows two conditions have to be met:
40
41*** Detecting as composite gadget
42
43First of all, Windows need to detect the gadget as an USB composite
44gadget which on its own have some conditions[4]. If they are met,
45Windows lets USB Generic Parent Driver[5] handle the device which then
46tries to much drivers for each individual interface (sort of, don't
47get into too many details).
48
49The good news is: you do not have to worry about most of the
50conditions!
51
52The only thing to worry is that the gadget has to have a single
53configuration so a dual RNDIS and CDC ECM gadget won't work unless you
54create a proper INF -- and of course, if you do submit it!
55
56*** Installing drivers for each function
57
58The other, trickier thing is making Windows install drivers for each
59individual function.
60
61For mass storage it is trivial since Windows detect it's an interface
62implementing USB Mass Storage class and selects appropriate driver.
63
64Things are harder with RDNIS and CDC ACM.
65
66**** RNDIS
67
68To make Windows select RNDIS drivers for the first function in the
69gadget, one needs to use the [[file:linux.inf]] file provided with this
70document. It "attaches" Window's RNDIS driver to the first interface
71of the gadget.
72
73Please note, that while testing we encountered some issues[6] when
74RNDIS was not the first interface. You do not need to worry abut it
75unless you are trying to develop your own gadget in which case watch
76out for this bug.
77
78**** CDC ACM
79
80Similarly, [[file:linux-cdc-acm.inf]] is provided for CDC ACM.
81
82**** Customising the gadget
83
84If you intend to hack the g_multi gadget be advised that rearranging
85functions will obviously change interface numbers for each of the
86functionality. As an effect provided INFs won't work since they have
87interface numbers hard-coded in them (it's not hard to change those
88though[7]).
89
90This also means, that after experimenting with g_multi and changing
91provided functions one should change gadget's vendor and/or product ID
92so there will be no collision with other customised gadgets or the
93original gadget.
94
95Failing to comply may cause brain damage after wondering for hours why
96things don't work as intended before realising Windows have cached
97some drivers information (changing USB port may sometimes help plus
98you might try using USBDeview[8] to remove the phantom device).
99
100**** INF testing
101
102Provided INF files have been tested on Windows XP SP3, Windows Vista
103and Windows 7, all 32-bit versions. It should work on 64-bit versions
104as well. It most likely won't work on Windows prior to Windows XP
105SP2.
106
107** Other systems
108
109At this moment, drivers for any other systems have not been tested.
110Knowing how MacOS is based on BSD and BSD is an Open Source it is
111believed that it should (read: "I have no idea whether it will") work
112out-of-the-box.
113
114For more exotic systems I have even less to say...
115
116Any testing and drivers *are* *welcome*!
117
118* Authors
119
120This document has been written by Michal Nazarewicz
121([[mailto:mina86@mina86.com]]). INF files have been hacked with
122support of Marek Szyprowski ([[mailto:m.szyprowski@samsung.com]]) and
123Xiaofan Chen ([[mailto:xiaofanc@gmail.com]]) basing on the MS RNDIS
124template[9], Microchip's CDC ACM INF file and David Brownell's
125([[mailto:dbrownell@users.sourceforge.net]]) original INF files.
126
127* Footnotes
128
129[1] Remote Network Driver Interface Specification,
130[[http://msdn.microsoft.com/en-us/library/ee484414.aspx]].
131
132[2] Communications Device Class Abstract Control Model, spec for this
133and other USB classes can be found at
134[[http://www.usb.org/developers/devclass_docs/]].
135
136[3] CDC Ethernet Control Model.
137
138[4] [[http://msdn.microsoft.com/en-us/library/ff537109(v=VS.85).aspx]]
139
140[5] [[http://msdn.microsoft.com/en-us/library/ff539234(v=VS.85).aspx]]
141
142[6] To put it in some other nice words, Windows failed to respond to
143any user input.
144
145[7] You may find [[http://www.cygnal.org/ubb/Forum9/HTML/001050.html]]
146useful.
147
148[8] http://www.nirsoft.net/utils/usb_devices_view.html
149
150[9] [[http://msdn.microsoft.com/en-us/library/ff570620.aspx]]
diff --git a/Documentation/usb/gadget_serial.txt b/Documentation/usb/gadget_serial.txt
index eac7df94d8e3..61e67f6a20a0 100644
--- a/Documentation/usb/gadget_serial.txt
+++ b/Documentation/usb/gadget_serial.txt
@@ -151,88 +151,23 @@ instructions below to install the host side driver.
151 151
152Installing the Windows Host ACM Driver 152Installing the Windows Host ACM Driver
153-------------------------------------- 153--------------------------------------
154To use the Windows ACM driver you must have the files "gserial.inf" 154To use the Windows ACM driver you must have the "linux-cdc-acm.inf"
155and "usbser.sys" together in a folder on the Windows machine. 155file (provided along this document) which supports all recent versions
156 156of Windows.
157The "gserial.inf" file is given here.
158
159-------------------- CUT HERE --------------------
160[Version]
161Signature="$Windows NT$"
162Class=Ports
163ClassGuid={4D36E978-E325-11CE-BFC1-08002BE10318}
164Provider=%LINUX%
165DriverVer=08/17/2004,0.0.2.0
166; Copyright (C) 2004 Al Borchers (alborchers@steinerpoint.com)
167
168[Manufacturer]
169%LINUX%=GSerialDeviceList
170
171[GSerialDeviceList]
172%GSERIAL%=GSerialInstall, USB\VID_0525&PID_A4A7
173
174[DestinationDirs]
175DefaultDestDir=10,System32\Drivers
176
177[GSerialInstall]
178CopyFiles=GSerialCopyFiles
179AddReg=GSerialAddReg
180
181[GSerialCopyFiles]
182usbser.sys
183
184[GSerialAddReg]
185HKR,,DevLoader,,*ntkern
186HKR,,NTMPDriver,,usbser.sys
187HKR,,EnumPropPages32,,"MsPorts.dll,SerialPortPropPageProvider"
188
189[GSerialInstall.Services]
190AddService = usbser,0x0002,GSerialService
191
192[GSerialService]
193DisplayName = %GSERIAL_DISPLAY_NAME%
194ServiceType = 1 ; SERVICE_KERNEL_DRIVER
195StartType = 3 ; SERVICE_DEMAND_START
196ErrorControl = 1 ; SERVICE_ERROR_NORMAL
197ServiceBinary = %10%\System32\Drivers\usbser.sys
198LoadOrderGroup = Base
199
200[Strings]
201LINUX = "Linux"
202GSERIAL = "Gadget Serial"
203GSERIAL_DISPLAY_NAME = "USB Gadget Serial Driver"
204-------------------- CUT HERE --------------------
205
206The "usbser.sys" file comes with various versions of Windows.
207For example, it can be found on Windows XP typically in
208
209 C:\WINDOWS\Driver Cache\i386\driver.cab
210
211Or it can be found on the Windows 98SE CD in the "win98" folder
212in the "DRIVER11.CAB" through "DRIVER20.CAB" cab files. You will
213need the DOS "expand" program, the Cygwin "cabextract" program, or
214a similar program to unpack these cab files and extract "usbser.sys".
215
216For example, to extract "usbser.sys" into the current directory
217on Windows XP, open a DOS window and run a command like
218
219 expand C:\WINDOWS\Driver~1\i386\driver.cab -F:usbser.sys .
220
221(Thanks to Nishant Kamat for pointing out this DOS command.)
222 157
223When the gadget serial driver is loaded and the USB device connected 158When the gadget serial driver is loaded and the USB device connected
224to the Windows host with a USB cable, Windows should recognize the 159to the Windows host with a USB cable, Windows should recognize the
225gadget serial device and ask for a driver. Tell Windows to find the 160gadget serial device and ask for a driver. Tell Windows to find the
226driver in the folder that contains "gserial.inf" and "usbser.sys". 161driver in the folder that contains the "linux-cdc-acm.inf" file.
227 162
228For example, on Windows XP, when the gadget serial device is first 163For example, on Windows XP, when the gadget serial device is first
229plugged in, the "Found New Hardware Wizard" starts up. Select 164plugged in, the "Found New Hardware Wizard" starts up. Select
230"Install from a list or specific location (Advanced)", then on 165"Install from a list or specific location (Advanced)", then on the
231the next screen select "Include this location in the search" and 166next screen select "Include this location in the search" and enter the
232enter the path or browse to the folder containing "gserial.inf" and 167path or browse to the folder containing the "linux-cdc-acm.inf" file.
233"usbser.sys". Windows will complain that the Gadget Serial driver 168Windows will complain that the Gadget Serial driver has not passed
234has not passed Windows Logo testing, but select "Continue anyway" 169Windows Logo testing, but select "Continue anyway" and finish the
235and finish the driver installation. 170driver installation.
236 171
237On Windows XP, in the "Device Manager" (under "Control Panel", 172On Windows XP, in the "Device Manager" (under "Control Panel",
238"System", "Hardware") expand the "Ports (COM & LPT)" entry and you 173"System", "Hardware") expand the "Ports (COM & LPT)" entry and you
@@ -345,5 +280,3 @@ you should be able to send data back and forth between the gadget
345side and host side systems. Anything you type on the terminal 280side and host side systems. Anything you type on the terminal
346window on the gadget side should appear in the terminal window on 281window on the gadget side should appear in the terminal window on
347the host side and vice versa. 282the host side and vice versa.
348
349
diff --git a/Documentation/usb/hotplug.txt b/Documentation/usb/hotplug.txt
index f53170665f37..4c945716a660 100644
--- a/Documentation/usb/hotplug.txt
+++ b/Documentation/usb/hotplug.txt
@@ -10,7 +10,7 @@ immediately usable. That means the system must do many things, including:
10 10
11 - Bind a driver to that device. Bus frameworks do that using a 11 - Bind a driver to that device. Bus frameworks do that using a
12 device driver's probe() routine. 12 device driver's probe() routine.
13 13
14 - Tell other subsystems to configure the new device. Print 14 - Tell other subsystems to configure the new device. Print
15 queues may need to be enabled, networks brought up, disk 15 queues may need to be enabled, networks brought up, disk
16 partitions mounted, and so on. In some cases these will 16 partitions mounted, and so on. In some cases these will
@@ -84,7 +84,7 @@ USB MODUTILS SUPPORT
84Current versions of module-init-tools will create a "modules.usbmap" file 84Current versions of module-init-tools will create a "modules.usbmap" file
85which contains the entries from each driver's MODULE_DEVICE_TABLE. Such 85which contains the entries from each driver's MODULE_DEVICE_TABLE. Such
86files can be used by various user mode policy agents to make sure all the 86files can be used by various user mode policy agents to make sure all the
87right driver modules get loaded, either at boot time or later. 87right driver modules get loaded, either at boot time or later.
88 88
89See <linux/usb.h> for full information about such table entries; or look 89See <linux/usb.h> for full information about such table entries; or look
90at existing drivers. Each table entry describes one or more criteria to 90at existing drivers. Each table entry describes one or more criteria to
diff --git a/Documentation/usb/linux-cdc-acm.inf b/Documentation/usb/linux-cdc-acm.inf
new file mode 100644
index 000000000000..612e7220fb29
--- /dev/null
+++ b/Documentation/usb/linux-cdc-acm.inf
@@ -0,0 +1,107 @@
1; Windows USB CDC ACM Setup File
2
3; Based on INF template which was:
4; Copyright (c) 2000 Microsoft Corporation
5; Copyright (c) 2007 Microchip Technology Inc.
6; likely to be covered by the MLPL as found at:
7; <http://msdn.microsoft.com/en-us/cc300389.aspx#MLPL>.
8; For use only on Windows operating systems.
9
10[Version]
11Signature="$Windows NT$"
12Class=Ports
13ClassGuid={4D36E978-E325-11CE-BFC1-08002BE10318}
14Provider=%Linux%
15DriverVer=11/15/2007,5.1.2600.0
16
17[Manufacturer]
18%Linux%=DeviceList, NTamd64
19
20[DestinationDirs]
21DefaultDestDir=12
22
23
24;------------------------------------------------------------------------------
25; Windows 2000/XP/Vista-32bit Sections
26;------------------------------------------------------------------------------
27
28[DriverInstall.nt]
29include=mdmcpq.inf
30CopyFiles=DriverCopyFiles.nt
31AddReg=DriverInstall.nt.AddReg
32
33[DriverCopyFiles.nt]
34usbser.sys,,,0x20
35
36[DriverInstall.nt.AddReg]
37HKR,,DevLoader,,*ntkern
38HKR,,NTMPDriver,,USBSER.sys
39HKR,,EnumPropPages32,,"MsPorts.dll,SerialPortPropPageProvider"
40
41[DriverInstall.nt.Services]
42AddService=usbser, 0x00000002, DriverService.nt
43
44[DriverService.nt]
45DisplayName=%SERVICE%
46ServiceType=1
47StartType=3
48ErrorControl=1
49ServiceBinary=%12%\USBSER.sys
50
51;------------------------------------------------------------------------------
52; Vista-64bit Sections
53;------------------------------------------------------------------------------
54
55[DriverInstall.NTamd64]
56include=mdmcpq.inf
57CopyFiles=DriverCopyFiles.NTamd64
58AddReg=DriverInstall.NTamd64.AddReg
59
60[DriverCopyFiles.NTamd64]
61USBSER.sys,,,0x20
62
63[DriverInstall.NTamd64.AddReg]
64HKR,,DevLoader,,*ntkern
65HKR,,NTMPDriver,,USBSER.sys
66HKR,,EnumPropPages32,,"MsPorts.dll,SerialPortPropPageProvider"
67
68[DriverInstall.NTamd64.Services]
69AddService=usbser, 0x00000002, DriverService.NTamd64
70
71[DriverService.NTamd64]
72DisplayName=%SERVICE%
73ServiceType=1
74StartType=3
75ErrorControl=1
76ServiceBinary=%12%\USBSER.sys
77
78
79;------------------------------------------------------------------------------
80; Vendor and Product ID Definitions
81;------------------------------------------------------------------------------
82; When developing your USB device, the VID and PID used in the PC side
83; application program and the firmware on the microcontroller must match.
84; Modify the below line to use your VID and PID. Use the format as shown
85; below.
86; Note: One INF file can be used for multiple devices with different
87; VID and PIDs. For each supported device, append
88; ",USB\VID_xxxx&PID_yyyy" to the end of the line.
89;------------------------------------------------------------------------------
90[SourceDisksFiles]
91[SourceDisksNames]
92[DeviceList]
93%DESCRIPTION%=DriverInstall, USB\VID_0525&PID_A4A7, USB\VID_0525&PID_A4AB&MI_02
94
95[DeviceList.NTamd64]
96%DESCRIPTION%=DriverInstall, USB\VID_0525&PID_A4A7, USB\VID_0525&PID_A4AB&MI_02
97
98
99;------------------------------------------------------------------------------
100; String Definitions
101;------------------------------------------------------------------------------
102;Modify these strings to customize your device
103;------------------------------------------------------------------------------
104[Strings]
105Linux = "Linux Developer Community"
106DESCRIPTION = "Gadget Serial"
107SERVICE = "USB RS-232 Emulation Driver"
diff --git a/Documentation/usb/linux.inf b/Documentation/usb/linux.inf
index 2f7217d124ff..4dee95851224 100644
--- a/Documentation/usb/linux.inf
+++ b/Documentation/usb/linux.inf
@@ -1,200 +1,66 @@
1; MS-Windows driver config matching some basic modes of the 1; Based on template INF file found at
2; Linux-USB Ethernet/RNDIS gadget firmware: 2; <http://msdn.microsoft.com/en-us/library/ff570620.aspx>
3; 3; which was:
4; - RNDIS plus CDC Ethernet ... this may be familiar as a DOCSIS 4; Copyright (c) Microsoft Corporation
5; cable modem profile, and supports most non-Microsoft USB hosts 5; and released under the MLPL as found at:
6; 6; <http://msdn.microsoft.com/en-us/cc300389.aspx#MLPL>.
7; - RNDIS plus CDC Subset ... used by hardware that incapable of 7; For use only on Windows operating systems.
8; full CDC Ethernet support.
9;
10; Microsoft only directly supports RNDIS drivers, and bundled them into XP.
11; The Microsoft "Remote NDIS USB Driver Kit" is currently found at:
12; http://www.microsoft.com/whdc/hwdev/resources/HWservices/rndis.mspx
13
14 8
15[Version] 9[Version]
16Signature = "$CHICAGO$" 10Signature = "$Windows NT$"
17Class = Net 11Class = Net
18ClassGUID = {4d36e972-e325-11ce-bfc1-08002be10318} 12ClassGUID = {4d36e972-e325-11ce-bfc1-08002be10318}
19Provider = %Linux% 13Provider = %Linux%
20Compatible = 1 14DriverVer = 06/21/2006,6.0.6000.16384
21MillenniumPreferred = .ME
22DriverVer = 03/30/2004,0.0.0.0
23; catalog file would be used by WHQL
24;CatalogFile = Linux.cat
25 15
26[Manufacturer] 16[Manufacturer]
27%Linux% = LinuxDevices,NT.5.1 17%Linux% = LinuxDevices,NTx86,NTamd64,NTia64
18
19; Decoration for x86 architecture
20[LinuxDevices.NTx86]
21%LinuxDevice% = RNDIS.NT.5.1, USB\VID_0525&PID_a4a2, USB\VID_0525&PID_a4ab&MI_00
28 22
29[LinuxDevices] 23; Decoration for x64 architecture
30; NetChip IDs, used by both firmware modes 24[LinuxDevices.NTamd64]
31%LinuxDevice% = RNDIS, USB\VID_0525&PID_a4a2 25%LinuxDevice% = RNDIS.NT.5.1, USB\VID_0525&PID_a4a2, USB\VID_0525&PID_a4ab&MI_00
32 26
33[LinuxDevices.NT.5.1] 27; Decoration for ia64 architecture
34%LinuxDevice% = RNDIS.NT.5.1, USB\VID_0525&PID_a4a2 28[LinuxDevices.NTia64]
29%LinuxDevice% = RNDIS.NT.5.1, USB\VID_0525&PID_a4a2, USB\VID_0525&PID_a4ab&MI_00
35 30
31;@@@ This is the common setting for setup
36[ControlFlags] 32[ControlFlags]
37ExcludeFromSelect=* 33ExcludeFromSelect=*
38 34
39; Windows 98, Windows 98 Second Edition specific sections -------- 35; DDInstall section
40 36; References the in-build Netrndis.inf
41[RNDIS]
42DeviceID = usb8023
43MaxInstance = 512
44DriverVer = 03/30/2004,0.0.0.0
45AddReg = RNDIS_AddReg_98, RNDIS_AddReg_Common
46
47[RNDIS_AddReg_98]
48HKR, , DevLoader, 0, *ndis
49HKR, , DeviceVxDs, 0, usb8023.sys
50HKR, NDIS, LogDriverName, 0, "usb8023"
51HKR, NDIS, MajorNdisVersion, 1, 5
52HKR, NDIS, MinorNdisVersion, 1, 0
53HKR, Ndi\Interfaces, DefUpper, 0, "ndis3,ndis4,ndis5"
54HKR, Ndi\Interfaces, DefLower, 0, "ethernet"
55HKR, Ndi\Interfaces, UpperRange, 0, "ndis3,ndis4,ndis5"
56HKR, Ndi\Interfaces, LowerRange, 0, "ethernet"
57HKR, Ndi\Install, ndis3, 0, "RNDIS_Install_98"
58HKR, Ndi\Install, ndis4, 0, "RNDIS_Install_98"
59HKR, Ndi\Install, ndis5, 0, "RNDIS_Install_98"
60HKR, Ndi, DeviceId, 0, "USB\VID_0525&PID_a4a2"
61
62[RNDIS_Install_98]
63CopyFiles=RNDIS_CopyFiles_98
64
65[RNDIS_CopyFiles_98]
66usb8023.sys, usb8023w.sys, , 0
67rndismp.sys, rndismpw.sys, , 0
68
69; Windows Millennium Edition specific sections --------------------
70
71[RNDIS.ME]
72DeviceID = usb8023
73MaxInstance = 512
74DriverVer = 03/30/2004,0.0.0.0
75AddReg = RNDIS_AddReg_ME, RNDIS_AddReg_Common
76Characteristics = 0x84 ; NCF_PHYSICAL + NCF_HAS_UI
77BusType = 15
78
79[RNDIS_AddReg_ME]
80HKR, , DevLoader, 0, *ndis
81HKR, , DeviceVxDs, 0, usb8023.sys
82HKR, NDIS, LogDriverName, 0, "usb8023"
83HKR, NDIS, MajorNdisVersion, 1, 5
84HKR, NDIS, MinorNdisVersion, 1, 0
85HKR, Ndi\Interfaces, DefUpper, 0, "ndis3,ndis4,ndis5"
86HKR, Ndi\Interfaces, DefLower, 0, "ethernet"
87HKR, Ndi\Interfaces, UpperRange, 0, "ndis3,ndis4,ndis5"
88HKR, Ndi\Interfaces, LowerRange, 0, "ethernet"
89HKR, Ndi\Install, ndis3, 0, "RNDIS_Install_ME"
90HKR, Ndi\Install, ndis4, 0, "RNDIS_Install_ME"
91HKR, Ndi\Install, ndis5, 0, "RNDIS_Install_ME"
92HKR, Ndi, DeviceId, 0, "USB\VID_0525&PID_a4a2"
93
94[RNDIS_Install_ME]
95CopyFiles=RNDIS_CopyFiles_ME
96
97[RNDIS_CopyFiles_ME]
98usb8023.sys, usb8023m.sys, , 0
99rndismp.sys, rndismpm.sys, , 0
100
101; Windows 2000 specific sections ---------------------------------
102
103[RNDIS.NT]
104Characteristics = 0x84 ; NCF_PHYSICAL + NCF_HAS_UI
105BusType = 15
106DriverVer = 03/30/2004,0.0.0.0
107AddReg = RNDIS_AddReg_NT, RNDIS_AddReg_Common
108CopyFiles = RNDIS_CopyFiles_NT
109
110[RNDIS.NT.Services]
111AddService = USB_RNDIS, 2, RNDIS_ServiceInst_NT, RNDIS_EventLog
112
113[RNDIS_CopyFiles_NT]
114; no rename of files on Windows 2000, use the 'k' names as is
115usb8023k.sys, , , 0
116rndismpk.sys, , , 0
117
118[RNDIS_ServiceInst_NT]
119DisplayName = %ServiceDisplayName%
120ServiceType = 1
121StartType = 3
122ErrorControl = 1
123ServiceBinary = %12%\usb8023k.sys
124LoadOrderGroup = NDIS
125AddReg = RNDIS_WMI_AddReg_NT
126
127[RNDIS_WMI_AddReg_NT]
128HKR, , MofImagePath, 0x00020000, "System32\drivers\rndismpk.sys"
129
130; Windows XP specific sections -----------------------------------
131
132[RNDIS.NT.5.1] 37[RNDIS.NT.5.1]
133Characteristics = 0x84 ; NCF_PHYSICAL + NCF_HAS_UI 38Characteristics = 0x84 ; NCF_PHYSICAL + NCF_HAS_UI
134BusType = 15 39BusType = 15
135DriverVer = 03/30/2004,0.0.0.0 40; NEVER REMOVE THE FOLLOWING REFERENCE FOR NETRNDIS.INF
136AddReg = RNDIS_AddReg_NT, RNDIS_AddReg_Common 41include = netrndis.inf
137; no copyfiles - the files are already in place 42needs = Usb_Rndis.ndi
138 43AddReg = Rndis_AddReg_Vista
44
45; DDInstal.Services section
139[RNDIS.NT.5.1.Services] 46[RNDIS.NT.5.1.Services]
140AddService = USB_RNDIS, 2, RNDIS_ServiceInst_51, RNDIS_EventLog 47include = netrndis.inf
141 48needs = Usb_Rndis.ndi.Services
142[RNDIS_ServiceInst_51] 49
143DisplayName = %ServiceDisplayName% 50; Optional registry settings. You can modify as needed.
144ServiceType = 1 51[RNDIS_AddReg_Vista]
145StartType = 3 52HKR, NDI\params\VistaProperty, ParamDesc, 0, %Vista_Property%
146ErrorControl = 1 53HKR, NDI\params\VistaProperty, type, 0, "edit"
147ServiceBinary = %12%\usb8023.sys 54HKR, NDI\params\VistaProperty, LimitText, 0, "12"
148LoadOrderGroup = NDIS 55HKR, NDI\params\VistaProperty, UpperCase, 0, "1"
149AddReg = RNDIS_WMI_AddReg_51 56HKR, NDI\params\VistaProperty, default, 0, " "
150 57HKR, NDI\params\VistaProperty, optional, 0, "1"
151[RNDIS_WMI_AddReg_51] 58
152HKR, , MofImagePath, 0x00020000, "System32\drivers\rndismp.sys" 59; No sys copyfiles - the sys files are already in-build
153 60; (part of the operating system).
154; Windows 2000 and Windows XP common sections -------------------- 61; We do not support XP SP1-, 2003 SP1-, ME, 9x.
155
156[RNDIS_AddReg_NT]
157HKR, Ndi, Service, 0, "USB_RNDIS"
158HKR, Ndi\Interfaces, UpperRange, 0, "ndis5"
159HKR, Ndi\Interfaces, LowerRange, 0, "ethernet"
160
161[RNDIS_EventLog]
162AddReg = RNDIS_EventLog_AddReg
163
164[RNDIS_EventLog_AddReg]
165HKR, , EventMessageFile, 0x00020000, "%%SystemRoot%%\System32\netevent.dll"
166HKR, , TypesSupported, 0x00010001, 7
167
168; Common Sections -------------------------------------------------
169
170[RNDIS_AddReg_Common]
171HKR, NDI\params\NetworkAddress, ParamDesc, 0, %NetworkAddress%
172HKR, NDI\params\NetworkAddress, type, 0, "edit"
173HKR, NDI\params\NetworkAddress, LimitText, 0, "12"
174HKR, NDI\params\NetworkAddress, UpperCase, 0, "1"
175HKR, NDI\params\NetworkAddress, default, 0, " "
176HKR, NDI\params\NetworkAddress, optional, 0, "1"
177
178[SourceDisksNames]
1791=%SourceDisk%,,1
180
181[SourceDisksFiles]
182usb8023m.sys=1
183rndismpm.sys=1
184usb8023w.sys=1
185rndismpw.sys=1
186usb8023k.sys=1
187rndismpk.sys=1
188
189[DestinationDirs]
190RNDIS_CopyFiles_98 = 10, system32/drivers
191RNDIS_CopyFiles_ME = 10, system32/drivers
192RNDIS_CopyFiles_NT = 12
193 62
194[Strings] 63[Strings]
195ServiceDisplayName = "USB Remote NDIS Network Device Driver"
196NetworkAddress = "Network Address"
197Linux = "Linux Developer Community" 64Linux = "Linux Developer Community"
198LinuxDevice = "Linux USB Ethernet/RNDIS Gadget" 65LinuxDevice = "Linux USB Ethernet/RNDIS Gadget"
199SourceDisk = "Ethernet/RNDIS Gadget Driver Install Disk" 66Vista_Property = "Optional Vista Property"
200
diff --git a/Documentation/usb/mtouchusb.txt b/Documentation/usb/mtouchusb.txt
index e43cfffaa100..86302cd53ed3 100644
--- a/Documentation/usb/mtouchusb.txt
+++ b/Documentation/usb/mtouchusb.txt
@@ -54,10 +54,6 @@ generic functions like calibrations, resets, and vendor information can be
54requested from the userspace (And the drivers would handle the vendor specific 54requested from the userspace (And the drivers would handle the vendor specific
55tasks). 55tasks).
56 56
57ADDITIONAL INFORMATION/UPDATES/X CONFIGURATION EXAMPLE:
58
59http://groomlakelabs.com/grandamp/code/microtouch/
60
61TODO: 57TODO:
62 58
63Implement a control urb again to handle requests to and from the device 59Implement a control urb again to handle requests to and from the device
@@ -68,7 +64,7 @@ DISCLAIMER:
68I am not a MicroTouch/3M employee, nor have I ever been. 3M does not support 64I am not a MicroTouch/3M employee, nor have I ever been. 3M does not support
69this driver! If you want touch drivers only supported within X, please go to: 65this driver! If you want touch drivers only supported within X, please go to:
70 66
71http://www.3m.com/3MTouchSystems/downloads/ 67http://www.3m.com/3MTouchSystems/
72 68
73THANKS: 69THANKS:
74 70
diff --git a/Documentation/usb/proc_usb_info.txt b/Documentation/usb/proc_usb_info.txt
index fafcd4723260..afe596d5f201 100644
--- a/Documentation/usb/proc_usb_info.txt
+++ b/Documentation/usb/proc_usb_info.txt
@@ -1,12 +1,17 @@
1/proc/bus/usb filesystem output 1/proc/bus/usb filesystem output
2=============================== 2===============================
3(version 2003.05.30) 3(version 2010.09.13)
4 4
5 5
6The usbfs filesystem for USB devices is traditionally mounted at 6The usbfs filesystem for USB devices is traditionally mounted at
7/proc/bus/usb. It provides the /proc/bus/usb/devices file, as well as 7/proc/bus/usb. It provides the /proc/bus/usb/devices file, as well as
8the /proc/bus/usb/BBB/DDD files. 8the /proc/bus/usb/BBB/DDD files.
9 9
10In many modern systems the usbfs filsystem isn't used at all. Instead
11USB device nodes are created under /dev/usb/ or someplace similar. The
12"devices" file is available in debugfs, typically as
13/sys/kernel/debug/usb/devices.
14
10 15
11**NOTE**: If /proc/bus/usb appears empty, and a host controller 16**NOTE**: If /proc/bus/usb appears empty, and a host controller
12 driver has been linked, then you need to mount the 17 driver has been linked, then you need to mount the
@@ -106,8 +111,8 @@ Legend:
106 111
107Topology info: 112Topology info:
108 113
109T: Bus=dd Lev=dd Prnt=dd Port=dd Cnt=dd Dev#=ddd Spd=ddd MxCh=dd 114T: Bus=dd Lev=dd Prnt=dd Port=dd Cnt=dd Dev#=ddd Spd=dddd MxCh=dd
110| | | | | | | | |__MaxChildren 115| | | | | | | | |__MaxChildren
111| | | | | | | |__Device Speed in Mbps 116| | | | | | | |__Device Speed in Mbps
112| | | | | | |__DeviceNumber 117| | | | | | |__DeviceNumber
113| | | | | |__Count of devices at this level 118| | | | | |__Count of devices at this level
@@ -120,8 +125,13 @@ T: Bus=dd Lev=dd Prnt=dd Port=dd Cnt=dd Dev#=ddd Spd=ddd MxCh=dd
120 Speed may be: 125 Speed may be:
121 1.5 Mbit/s for low speed USB 126 1.5 Mbit/s for low speed USB
122 12 Mbit/s for full speed USB 127 12 Mbit/s for full speed USB
123 480 Mbit/s for high speed USB (added for USB 2.0) 128 480 Mbit/s for high speed USB (added for USB 2.0);
129 also used for Wireless USB, which has no fixed speed
130 5000 Mbit/s for SuperSpeed USB (added for USB 3.0)
124 131
132 For reasons lost in the mists of time, the Port number is always
133 too low by 1. For example, a device plugged into port 4 will
134 show up with "Port=03".
125 135
126Bandwidth info: 136Bandwidth info:
127B: Alloc=ddd/ddd us (xx%), #Int=ddd, #Iso=ddd 137B: Alloc=ddd/ddd us (xx%), #Int=ddd, #Iso=ddd
@@ -291,7 +301,7 @@ Here's an example, from a system which has a UHCI root hub,
291an external hub connected to the root hub, and a mouse and 301an external hub connected to the root hub, and a mouse and
292a serial converter connected to the external hub. 302a serial converter connected to the external hub.
293 303
294T: Bus=00 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#= 1 Spd=12 MxCh= 2 304T: Bus=00 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#= 1 Spd=12 MxCh= 2
295B: Alloc= 28/900 us ( 3%), #Int= 2, #Iso= 0 305B: Alloc= 28/900 us ( 3%), #Int= 2, #Iso= 0
296D: Ver= 1.00 Cls=09(hub ) Sub=00 Prot=00 MxPS= 8 #Cfgs= 1 306D: Ver= 1.00 Cls=09(hub ) Sub=00 Prot=00 MxPS= 8 #Cfgs= 1
297P: Vendor=0000 ProdID=0000 Rev= 0.00 307P: Vendor=0000 ProdID=0000 Rev= 0.00
@@ -301,21 +311,21 @@ C:* #Ifs= 1 Cfg#= 1 Atr=40 MxPwr= 0mA
301I: If#= 0 Alt= 0 #EPs= 1 Cls=09(hub ) Sub=00 Prot=00 Driver=hub 311I: If#= 0 Alt= 0 #EPs= 1 Cls=09(hub ) Sub=00 Prot=00 Driver=hub
302E: Ad=81(I) Atr=03(Int.) MxPS= 8 Ivl=255ms 312E: Ad=81(I) Atr=03(Int.) MxPS= 8 Ivl=255ms
303 313
304T: Bus=00 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 2 Spd=12 MxCh= 4 314T: Bus=00 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 2 Spd=12 MxCh= 4
305D: Ver= 1.00 Cls=09(hub ) Sub=00 Prot=00 MxPS= 8 #Cfgs= 1 315D: Ver= 1.00 Cls=09(hub ) Sub=00 Prot=00 MxPS= 8 #Cfgs= 1
306P: Vendor=0451 ProdID=1446 Rev= 1.00 316P: Vendor=0451 ProdID=1446 Rev= 1.00
307C:* #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr=100mA 317C:* #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr=100mA
308I: If#= 0 Alt= 0 #EPs= 1 Cls=09(hub ) Sub=00 Prot=00 Driver=hub 318I: If#= 0 Alt= 0 #EPs= 1 Cls=09(hub ) Sub=00 Prot=00 Driver=hub
309E: Ad=81(I) Atr=03(Int.) MxPS= 1 Ivl=255ms 319E: Ad=81(I) Atr=03(Int.) MxPS= 1 Ivl=255ms
310 320
311T: Bus=00 Lev=02 Prnt=02 Port=00 Cnt=01 Dev#= 3 Spd=1.5 MxCh= 0 321T: Bus=00 Lev=02 Prnt=02 Port=00 Cnt=01 Dev#= 3 Spd=1.5 MxCh= 0
312D: Ver= 1.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS= 8 #Cfgs= 1 322D: Ver= 1.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS= 8 #Cfgs= 1
313P: Vendor=04b4 ProdID=0001 Rev= 0.00 323P: Vendor=04b4 ProdID=0001 Rev= 0.00
314C:* #Ifs= 1 Cfg#= 1 Atr=80 MxPwr=100mA 324C:* #Ifs= 1 Cfg#= 1 Atr=80 MxPwr=100mA
315I: If#= 0 Alt= 0 #EPs= 1 Cls=03(HID ) Sub=01 Prot=02 Driver=mouse 325I: If#= 0 Alt= 0 #EPs= 1 Cls=03(HID ) Sub=01 Prot=02 Driver=mouse
316E: Ad=81(I) Atr=03(Int.) MxPS= 3 Ivl= 10ms 326E: Ad=81(I) Atr=03(Int.) MxPS= 3 Ivl= 10ms
317 327
318T: Bus=00 Lev=02 Prnt=02 Port=02 Cnt=02 Dev#= 4 Spd=12 MxCh= 0 328T: Bus=00 Lev=02 Prnt=02 Port=02 Cnt=02 Dev#= 4 Spd=12 MxCh= 0
319D: Ver= 1.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS= 8 #Cfgs= 1 329D: Ver= 1.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS= 8 #Cfgs= 1
320P: Vendor=0565 ProdID=0001 Rev= 1.08 330P: Vendor=0565 ProdID=0001 Rev= 1.08
321S: Manufacturer=Peracom Networks, Inc. 331S: Manufacturer=Peracom Networks, Inc.
@@ -330,12 +340,12 @@ E: Ad=82(I) Atr=03(Int.) MxPS= 8 Ivl= 8ms
330Selecting only the "T:" and "I:" lines from this (for example, by using 340Selecting only the "T:" and "I:" lines from this (for example, by using
331"procusb ti"), we have: 341"procusb ti"), we have:
332 342
333T: Bus=00 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#= 1 Spd=12 MxCh= 2 343T: Bus=00 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#= 1 Spd=12 MxCh= 2
334T: Bus=00 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 2 Spd=12 MxCh= 4 344T: Bus=00 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 2 Spd=12 MxCh= 4
335I: If#= 0 Alt= 0 #EPs= 1 Cls=09(hub ) Sub=00 Prot=00 Driver=hub 345I: If#= 0 Alt= 0 #EPs= 1 Cls=09(hub ) Sub=00 Prot=00 Driver=hub
336T: Bus=00 Lev=02 Prnt=02 Port=00 Cnt=01 Dev#= 3 Spd=1.5 MxCh= 0 346T: Bus=00 Lev=02 Prnt=02 Port=00 Cnt=01 Dev#= 3 Spd=1.5 MxCh= 0
337I: If#= 0 Alt= 0 #EPs= 1 Cls=03(HID ) Sub=01 Prot=02 Driver=mouse 347I: If#= 0 Alt= 0 #EPs= 1 Cls=03(HID ) Sub=01 Prot=02 Driver=mouse
338T: Bus=00 Lev=02 Prnt=02 Port=02 Cnt=02 Dev#= 4 Spd=12 MxCh= 0 348T: Bus=00 Lev=02 Prnt=02 Port=02 Cnt=02 Dev#= 4 Spd=12 MxCh= 0
339I: If#= 0 Alt= 0 #EPs= 3 Cls=00(>ifc ) Sub=00 Prot=00 Driver=serial 349I: If#= 0 Alt= 0 #EPs= 3 Cls=00(>ifc ) Sub=00 Prot=00 Driver=serial
340 350
341 351
diff --git a/Documentation/usb/usb-serial.txt b/Documentation/usb/usb-serial.txt
index f4d214510259..5bd7926185e8 100644
--- a/Documentation/usb/usb-serial.txt
+++ b/Documentation/usb/usb-serial.txt
@@ -83,7 +83,7 @@ HandSpring Visor, Palm USB, and Clié USB driver
83 parameters. e.g. modprobe visor vendor=0x54c product=0x66 83 parameters. e.g. modprobe visor vendor=0x54c product=0x66
84 84
85 There is a webpage and mailing lists for this portion of the driver at: 85 There is a webpage and mailing lists for this portion of the driver at:
86 http://usbvisor.sourceforge.net/ 86 http://sourceforge.net/projects/usbvisor/
87 87
88 For any questions or problems with this driver, please contact Greg 88 For any questions or problems with this driver, please contact Greg
89 Kroah-Hartman at greg@kroah.com 89 Kroah-Hartman at greg@kroah.com
@@ -184,7 +184,7 @@ Keyspan USA-series Serial Adapters
184 functionality. 184 functionality.
185 185
186 More information is available at: 186 More information is available at:
187 http://misc.nu/hugh/keyspan.html 187 http://www.carnationsoftware.com/carnation/Keyspan.html
188 188
189 For any questions or problems with this driver, please contact Hugh 189 For any questions or problems with this driver, please contact Hugh
190 Blemings at hugh@misc.nu 190 Blemings at hugh@misc.nu
diff --git a/Documentation/video4linux/API.html b/Documentation/video4linux/API.html
index d749d41f647b..d72fd2aa9158 100644
--- a/Documentation/video4linux/API.html
+++ b/Documentation/video4linux/API.html
@@ -17,7 +17,7 @@
17 </tr> 17 </tr>
18 <tr> 18 <tr>
19 <td> 19 <td>
20 <a href="http://www.linuxtv.org/downloads/video4linux/API/V4L2_API">V4L2 API</a> 20 <a href="http://v4l2spec.bytesex.org/spec-single/v4l2.html">V4L2 API</a>
21 </td> 21 </td>
22 <td>Should be used for new projects 22 <td>Should be used for new projects
23 </td> 23 </td>
diff --git a/Documentation/video4linux/CARDLIST.cx23885 b/Documentation/video4linux/CARDLIST.cx23885
index 16ca030e1185..87c46347bd63 100644
--- a/Documentation/video4linux/CARDLIST.cx23885
+++ b/Documentation/video4linux/CARDLIST.cx23885
@@ -17,9 +17,9 @@
17 16 -> DVBWorld DVB-S2 2005 [0001:2005] 17 16 -> DVBWorld DVB-S2 2005 [0001:2005]
18 17 -> NetUP Dual DVB-S2 CI [1b55:2a2c] 18 17 -> NetUP Dual DVB-S2 CI [1b55:2a2c]
19 18 -> Hauppauge WinTV-HVR1270 [0070:2211] 19 18 -> Hauppauge WinTV-HVR1270 [0070:2211]
20 19 -> Hauppauge WinTV-HVR1275 [0070:2215] 20 19 -> Hauppauge WinTV-HVR1275 [0070:2215,0070:221d,0070:22f2]
21 20 -> Hauppauge WinTV-HVR1255 [0070:2251] 21 20 -> Hauppauge WinTV-HVR1255 [0070:2251,0070:2259,0070:22f1]
22 21 -> Hauppauge WinTV-HVR1210 [0070:2291,0070:2295] 22 21 -> Hauppauge WinTV-HVR1210 [0070:2291,0070:2295,0070:2299,0070:229d,0070:22f0,0070:22f3,0070:22f4,0070:22f5]
23 22 -> Mygica X8506 DMB-TH [14f1:8651] 23 22 -> Mygica X8506 DMB-TH [14f1:8651]
24 23 -> Magic-Pro ProHDTV Extreme 2 [14f1:8657] 24 23 -> Magic-Pro ProHDTV Extreme 2 [14f1:8657]
25 24 -> Hauppauge WinTV-HVR1850 [0070:8541] 25 24 -> Hauppauge WinTV-HVR1850 [0070:8541]
diff --git a/Documentation/video4linux/CARDLIST.cx88 b/Documentation/video4linux/CARDLIST.cx88
index f2510541373b..42517d9121de 100644
--- a/Documentation/video4linux/CARDLIST.cx88
+++ b/Documentation/video4linux/CARDLIST.cx88
@@ -83,3 +83,4 @@
83 82 -> WinFast DTV2000 H rev. J [107d:6f2b] 83 82 -> WinFast DTV2000 H rev. J [107d:6f2b]
84 83 -> Prof 7301 DVB-S/S2 [b034:3034] 84 83 -> Prof 7301 DVB-S/S2 [b034:3034]
85 84 -> Samsung SMT 7020 DVB-S [18ac:dc00,18ac:dccd] 85 84 -> Samsung SMT 7020 DVB-S [18ac:dc00,18ac:dccd]
86 85 -> Twinhan VP-1027 DVB-S [1822:0023]
diff --git a/Documentation/video4linux/CARDLIST.em28xx b/Documentation/video4linux/CARDLIST.em28xx
index 3a623aaeae5f..ac2616a62fc3 100644
--- a/Documentation/video4linux/CARDLIST.em28xx
+++ b/Documentation/video4linux/CARDLIST.em28xx
@@ -31,6 +31,7 @@
31 30 -> Videology 20K14XUSB USB2.0 (em2820/em2840) 31 30 -> Videology 20K14XUSB USB2.0 (em2820/em2840)
32 31 -> Usbgear VD204v9 (em2821) 32 31 -> Usbgear VD204v9 (em2821)
33 32 -> Supercomp USB 2.0 TV (em2821) 33 32 -> Supercomp USB 2.0 TV (em2821)
34 33 -> Elgato Video Capture (em2860) [0fd9:0033]
34 34 -> Terratec Cinergy A Hybrid XS (em2860) [0ccd:004f] 35 34 -> Terratec Cinergy A Hybrid XS (em2860) [0ccd:004f]
35 35 -> Typhoon DVD Maker (em2860) 36 35 -> Typhoon DVD Maker (em2860)
36 36 -> NetGMBH Cam (em2860) 37 36 -> NetGMBH Cam (em2860)
@@ -45,7 +46,7 @@
45 45 -> Pinnacle PCTV DVB-T (em2870) 46 45 -> Pinnacle PCTV DVB-T (em2870)
46 46 -> Compro, VideoMate U3 (em2870) [185b:2870] 47 46 -> Compro, VideoMate U3 (em2870) [185b:2870]
47 47 -> KWorld DVB-T 305U (em2880) [eb1a:e305] 48 47 -> KWorld DVB-T 305U (em2880) [eb1a:e305]
48 48 -> KWorld DVB-T 310U (em2880) [eb1a:e310] 49 48 -> KWorld DVB-T 310U (em2880)
49 49 -> MSI DigiVox A/D (em2880) [eb1a:e310] 50 49 -> MSI DigiVox A/D (em2880) [eb1a:e310]
50 50 -> MSI DigiVox A/D II (em2880) [eb1a:e320] 51 50 -> MSI DigiVox A/D II (em2880) [eb1a:e320]
51 51 -> Terratec Hybrid XS Secam (em2880) [0ccd:004c] 52 51 -> Terratec Hybrid XS Secam (em2880) [0ccd:004c]
@@ -72,3 +73,4 @@
72 73 -> Reddo DVB-C USB TV Box (em2870) 73 73 -> Reddo DVB-C USB TV Box (em2870)
73 74 -> Actionmaster/LinXcel/Digitus VC211A (em2800) 74 74 -> Actionmaster/LinXcel/Digitus VC211A (em2800)
74 75 -> Dikom DK300 (em2882) 75 75 -> Dikom DK300 (em2882)
76 76 -> KWorld PlusTV 340U or UB435-Q (ATSC) (em2870) [1b80:a340]
diff --git a/Documentation/video4linux/CARDLIST.saa7134 b/Documentation/video4linux/CARDLIST.saa7134
index 1387a69ae3aa..8d9afc7d8014 100644
--- a/Documentation/video4linux/CARDLIST.saa7134
+++ b/Documentation/video4linux/CARDLIST.saa7134
@@ -126,7 +126,7 @@
126125 -> Beholder BeholdTV 409 [0000:4090] 126125 -> Beholder BeholdTV 409 [0000:4090]
127126 -> Beholder BeholdTV 505 FM [5ace:5050] 127126 -> Beholder BeholdTV 505 FM [5ace:5050]
128127 -> Beholder BeholdTV 507 FM / BeholdTV 509 FM [5ace:5070,5ace:5090] 128127 -> Beholder BeholdTV 507 FM / BeholdTV 509 FM [5ace:5070,5ace:5090]
129128 -> Beholder BeholdTV Columbus TVFM [0000:5201] 129128 -> Beholder BeholdTV Columbus TV/FM [0000:5201]
130129 -> Beholder BeholdTV 607 FM [5ace:6070] 130129 -> Beholder BeholdTV 607 FM [5ace:6070]
131130 -> Beholder BeholdTV M6 [5ace:6190] 131130 -> Beholder BeholdTV M6 [5ace:6190]
132131 -> Twinhan Hybrid DTV-DVB 3056 PCI [1822:0022] 132131 -> Twinhan Hybrid DTV-DVB 3056 PCI [1822:0022]
@@ -178,4 +178,5 @@
178177 -> Hawell HW-404M7 178177 -> Hawell HW-404M7
179178 -> Beholder BeholdTV H7 [5ace:7190] 179178 -> Beholder BeholdTV H7 [5ace:7190]
180179 -> Beholder BeholdTV A7 [5ace:7090] 180179 -> Beholder BeholdTV A7 [5ace:7090]
181180 -> Avermedia M733A [1461:4155,1461:4255] 181180 -> Avermedia PCI M733A [1461:4155,1461:4255]
182181 -> TechoTrend TT-budget T-3000 [13c2:2804]
diff --git a/Documentation/video4linux/CQcam.txt b/Documentation/video4linux/CQcam.txt
index d230878e473e..8977e7ce4dab 100644
--- a/Documentation/video4linux/CQcam.txt
+++ b/Documentation/video4linux/CQcam.txt
@@ -203,11 +203,11 @@ The V4L2 API spec:
203 http://v4l2spec.bytesex.org/ 203 http://v4l2spec.bytesex.org/
204 204
205Some web pages about the quickcams: 205Some web pages about the quickcams:
206 http://www.dkfz-heidelberg.de/Macromol/wedemann/mini-HOWTO-cqcam.html 206 http://www.pingouin-land.com/howto/QuickCam-HOWTO.html
207 207
208 http://www.crynwr.com/qcpc/ QuickCam Third-Party Drivers 208 http://www.crynwr.com/qcpc/ QuickCam Third-Party Drivers
209 http://www.crynwr.com/qcpc/re.html Some Reverse Engineering 209 http://www.crynwr.com/qcpc/re.html Some Reverse Engineering
210 http://cse.unl.edu/~cluening/gqcam/ v4l client 210 http://www.wirelesscouch.net/software/gqcam/ v4l client
211 http://phobos.illtel.denver.co.us/pub/qcread/ doesn't use v4l 211 http://phobos.illtel.denver.co.us/pub/qcread/ doesn't use v4l
212 ftp://ftp.cs.unm.edu/pub/chris/quickcam/ Has lots of drivers 212 ftp://ftp.cs.unm.edu/pub/chris/quickcam/ Has lots of drivers
213 http://www.cs.duke.edu/~reynolds/quickcam/ Has lots of information 213 http://www.cs.duke.edu/~reynolds/quickcam/ Has lots of information
diff --git a/Documentation/video4linux/README.cpia b/Documentation/video4linux/README.cpia
index 19cd3bf24981..8a747fee661f 100644
--- a/Documentation/video4linux/README.cpia
+++ b/Documentation/video4linux/README.cpia
@@ -185,7 +185,7 @@ THANKS (in no particular order):
185--------------------------------------------------------------------------- 185---------------------------------------------------------------------------
186REFERENCES 186REFERENCES
187 187
188 1. http://www.risc.uni-linz.ac.at/people/ppregler 188 1. http://www.risc.uni-linz.ac.at/
189 mailto:Peter_Pregler@email.com 189 mailto:Peter_Pregler@email.com
190 2. see the file COPYING in the top directory of the kernel tree 190 2. see the file COPYING in the top directory of the kernel tree
191 3. http://webcam.sourceforge.net/ 191 3. http://webcam.sourceforge.net/
diff --git a/Documentation/video4linux/README.ivtv b/Documentation/video4linux/README.ivtv
index 73df22c40bfe..42b06686eb78 100644
--- a/Documentation/video4linux/README.ivtv
+++ b/Documentation/video4linux/README.ivtv
@@ -10,7 +10,7 @@ Hauppauge PVR-350.
10NOTE: this driver requires the latest encoder firmware (version 2.06.039, size 10NOTE: this driver requires the latest encoder firmware (version 2.06.039, size
11376836 bytes). Get the firmware from here: 11376836 bytes). Get the firmware from here:
12 12
13http://dl.ivtvdriver.org/ivtv/firmware/firmware.tar.gz 13http://dl.ivtvdriver.org/ivtv/firmware/
14 14
15NOTE: 'normal' TV applications do not work with this driver, you need 15NOTE: 'normal' TV applications do not work with this driver, you need
16an application that can handle MPEG input such as mplayer, xine, MythTV, 16an application that can handle MPEG input such as mplayer, xine, MythTV,
diff --git a/Documentation/video4linux/Zoran b/Documentation/video4linux/Zoran
index 0e89e7676298..00e3f9267814 100644
--- a/Documentation/video4linux/Zoran
+++ b/Documentation/video4linux/Zoran
@@ -174,7 +174,7 @@ and is used in Argentinia, Uruguay, an a few others
174We do not talk about how the audio is broadcast ! 174We do not talk about how the audio is broadcast !
175 175
176A rather good sites about the TV standards are: 176A rather good sites about the TV standards are:
177http://www.sony.jp/ServiceArea/Voltage_map/ 177http://www.sony.jp/support/
178http://info.electronicwerkstatt.de/bereiche/fernsehtechnik/frequenzen_und_normen/Fernsehnormen/ 178http://info.electronicwerkstatt.de/bereiche/fernsehtechnik/frequenzen_und_normen/Fernsehnormen/
179and http://www.cabl.com/restaurant/channel.html 179and http://www.cabl.com/restaurant/channel.html
180 180
@@ -330,7 +330,7 @@ These extensions are known as the v4l/mjpeg extensions. See zoran.h for
330details (structs/ioctls). 330details (structs/ioctls).
331 331
332Information - video4linux: 332Information - video4linux:
333http://roadrunner.swansea.linux.org.uk/v4lapi.shtml 333http://linux.bytesex.org/v4l2/API.html
334Documentation/video4linux/API.html 334Documentation/video4linux/API.html
335/usr/include/linux/videodev.h 335/usr/include/linux/videodev.h
336 336
@@ -390,7 +390,7 @@ BUZIOC_G_STATUS
390Get the status of the input lines (video source connected/norm). 390Get the status of the input lines (video source connected/norm).
391 391
392For programming example, please, look at lavrec.c and lavplay.c code in 392For programming example, please, look at lavrec.c and lavplay.c code in
393lavtools-1.2p2 package (URL: http://www.cicese.mx/~mirsev/DC10plus/) 393lavtools-1.2p2 package (URL: http://www.cicese.mx/)
394and the 'examples' directory in the original Buz driver distribution. 394and the 'examples' directory in the original Buz driver distribution.
395 395
396Additional notes for software developers: 396Additional notes for software developers:
diff --git a/Documentation/video4linux/bttv/Cards b/Documentation/video4linux/bttv/Cards
index d3389655ad96..12217fc49725 100644
--- a/Documentation/video4linux/bttv/Cards
+++ b/Documentation/video4linux/bttv/Cards
@@ -802,7 +802,7 @@ Kworld (www.kworld.com.tw)
802 802
803 803
804 804
805JTT/ Justy Corp.http://www.justy.co.jp/ (www.jtt.com.jp website down) 805JTT/ Justy Corp.(http://www.jtt.ne.jp/)
806--------------------------------------------------------------------- 806---------------------------------------------------------------------
807 JTT-02 (JTT TV) "TV watchmate pro" (bt848) 807 JTT-02 (JTT TV) "TV watchmate pro" (bt848)
808 808
@@ -828,7 +828,7 @@ Eline www.eline-net.com/
828 Eline Vision TVMaster / TVMaster FM (ELV-TVM/ ELV-TVM-FM) = LR26 (bt878) 828 Eline Vision TVMaster / TVMaster FM (ELV-TVM/ ELV-TVM-FM) = LR26 (bt878)
829 Eline Vision TVMaster-2000 (ELV-TVM-2000, ELV-TVM-2000-FM)= LR138 (saa713x) 829 Eline Vision TVMaster-2000 (ELV-TVM-2000, ELV-TVM-2000-FM)= LR138 (saa713x)
830 830
831Spirit http://www.spiritmodems.com.au/ 831Spirit
832------ 832------
833 Spirit TV Tuner/Video Capture Card (bt848) 833 Spirit TV Tuner/Video Capture Card (bt848)
834 834
@@ -959,6 +959,6 @@ Asus www.asuscom.com
959 959
960Hoontech 960Hoontech
961-------- 961--------
962http://www.hoontech.com/korean/download/down_driver_list03.html 962http://www.hoontech.de/
963 HART Vision 848 (H-ART Vision 848) 963 HART Vision 848 (H-ART Vision 848)
964 HART Vision 878 (H-Art Vision 878) 964 HART Vision 878 (H-Art Vision 878)
diff --git a/Documentation/video4linux/bttv/MAKEDEV b/Documentation/video4linux/bttv/MAKEDEV
index 6c29ba43b6c6..093c0cd18042 100644
--- a/Documentation/video4linux/bttv/MAKEDEV
+++ b/Documentation/video4linux/bttv/MAKEDEV
@@ -14,12 +14,11 @@ function makedev () {
14 ln -s /dev/${1}0 /dev/$1 14 ln -s /dev/${1}0 /dev/$1
15} 15}
16 16
17# see http://roadrunner.swansea.uk.linux.org/v4lapi.shtml 17# see http://linux.bytesex.org/v4l2/API.html
18 18
19echo "*** new device names ***" 19echo "*** new device names ***"
20makedev video 0 20makedev video 0
21makedev radio 64 21makedev radio 64
22makedev vtx 192
23makedev vbi 224 22makedev vbi 224
24 23
25#echo "*** old device names (for compatibility only) ***" 24#echo "*** old device names (for compatibility only) ***"
diff --git a/Documentation/video4linux/bttv/Specs b/Documentation/video4linux/bttv/Specs
index 79b9e576fe79..f32466cdae05 100644
--- a/Documentation/video4linux/bttv/Specs
+++ b/Documentation/video4linux/bttv/Specs
@@ -1,3 +1,3 @@
1Philips http://www.Semiconductors.COM/pip/ 1Philips http://www.Semiconductors.COM/pip/
2Conexant http://www.conexant.com/techinfo/default.asp 2Conexant http://www.conexant.com/
3Micronas http://www.micronas.de/pages/product_documentation/index.html 3Micronas http://www.micronas.com/en/home/index.html
diff --git a/Documentation/video4linux/cx88/hauppauge-wintv-cx88-ir.txt b/Documentation/video4linux/cx88/hauppauge-wintv-cx88-ir.txt
index faccee68f603..f4329a38878e 100644
--- a/Documentation/video4linux/cx88/hauppauge-wintv-cx88-ir.txt
+++ b/Documentation/video4linux/cx88/hauppauge-wintv-cx88-ir.txt
@@ -44,7 +44,7 @@ http://www.atmel.com/dyn/resources/prod_documents/doc2817.pdf
44This data sheet (google search) seems to have a lovely description of the 44This data sheet (google search) seems to have a lovely description of the
45RC5 basics 45RC5 basics
46 46
47http://users.pandora.be/nenya/electronics/rc5/ and more data 47http://www.nenya.be/beor/electronics/rc5.htm and more data
48 48
49http://www.ee.washington.edu/circuit_archive/text/ir_decode.txt 49http://www.ee.washington.edu/circuit_archive/text/ir_decode.txt
50and even a reference to how to decode a bi-phase data stream. 50and even a reference to how to decode a bi-phase data stream.
diff --git a/Documentation/video4linux/gspca.txt b/Documentation/video4linux/gspca.txt
index f13eb036c439..6a562eeeb4cd 100644
--- a/Documentation/video4linux/gspca.txt
+++ b/Documentation/video4linux/gspca.txt
@@ -29,8 +29,12 @@ zc3xx 041e:4029 Creative WebCam Vista Pro
29zc3xx 041e:4034 Creative Instant P0620 29zc3xx 041e:4034 Creative Instant P0620
30zc3xx 041e:4035 Creative Instant P0620D 30zc3xx 041e:4035 Creative Instant P0620D
31zc3xx 041e:4036 Creative Live ! 31zc3xx 041e:4036 Creative Live !
32sq930x 041e:4038 Creative Joy-IT
32zc3xx 041e:403a Creative Nx Pro 2 33zc3xx 041e:403a Creative Nx Pro 2
33spca561 041e:403b Creative Webcam Vista (VF0010) 34spca561 041e:403b Creative Webcam Vista (VF0010)
35sq930x 041e:403c Creative Live! Ultra
36sq930x 041e:403d Creative Live! Ultra for Notebooks
37sq930x 041e:4041 Creative Live! Motion
34zc3xx 041e:4051 Creative Live!Cam Notebook Pro (VF0250) 38zc3xx 041e:4051 Creative Live!Cam Notebook Pro (VF0250)
35ov519 041e:4052 Creative Live! VISTA IM 39ov519 041e:4052 Creative Live! VISTA IM
36zc3xx 041e:4053 Creative Live!Cam Video IM 40zc3xx 041e:4053 Creative Live!Cam Video IM
@@ -138,6 +142,7 @@ finepix 04cb:013d Fujifilm FinePix unknown model
138finepix 04cb:013f Fujifilm FinePix F420 142finepix 04cb:013f Fujifilm FinePix F420
139sunplus 04f1:1001 JVC GC A50 143sunplus 04f1:1001 JVC GC A50
140spca561 04fc:0561 Flexcam 100 144spca561 04fc:0561 Flexcam 100
145spca1528 04fc:1528 Sunplus MD80 clone
141sunplus 04fc:500c Sunplus CA500C 146sunplus 04fc:500c Sunplus CA500C
142sunplus 04fc:504a Aiptek Mini PenCam 1.3 147sunplus 04fc:504a Aiptek Mini PenCam 1.3
143sunplus 04fc:504b Maxell MaxPocket LE 1.3 148sunplus 04fc:504b Maxell MaxPocket LE 1.3
@@ -253,6 +258,7 @@ pac7302 093a:2620 Apollo AC-905
253pac7302 093a:2621 PAC731x 258pac7302 093a:2621 PAC731x
254pac7302 093a:2622 Genius Eye 312 259pac7302 093a:2622 Genius Eye 312
255pac7302 093a:2624 PAC7302 260pac7302 093a:2624 PAC7302
261pac7302 093a:2625 Genius iSlim 310
256pac7302 093a:2626 Labtec 2200 262pac7302 093a:2626 Labtec 2200
257pac7302 093a:2628 Genius iLook 300 263pac7302 093a:2628 Genius iLook 300
258pac7302 093a:2629 Genious iSlim 300 264pac7302 093a:2629 Genious iSlim 300
@@ -296,12 +302,14 @@ sonixj 0c45:60fb Surfer NoName
296sonixj 0c45:60fc LG-LIC300 302sonixj 0c45:60fc LG-LIC300
297sonixj 0c45:60fe Microdia Audio 303sonixj 0c45:60fe Microdia Audio
298sonixj 0c45:6100 PC Camera (SN9C128) 304sonixj 0c45:6100 PC Camera (SN9C128)
305sonixj 0c45:6102 PC Camera (SN9C128)
299sonixj 0c45:610a PC Camera (SN9C128) 306sonixj 0c45:610a PC Camera (SN9C128)
300sonixj 0c45:610b PC Camera (SN9C128) 307sonixj 0c45:610b PC Camera (SN9C128)
301sonixj 0c45:610c PC Camera (SN9C128) 308sonixj 0c45:610c PC Camera (SN9C128)
302sonixj 0c45:610e PC Camera (SN9C128) 309sonixj 0c45:610e PC Camera (SN9C128)
303sonixj 0c45:6128 Microdia/Sonix SNP325 310sonixj 0c45:6128 Microdia/Sonix SNP325
304sonixj 0c45:612a Avant Camera 311sonixj 0c45:612a Avant Camera
312sonixj 0c45:612b Speed-Link REFLECT2
305sonixj 0c45:612c Typhoon Rasy Cam 1.3MPix 313sonixj 0c45:612c Typhoon Rasy Cam 1.3MPix
306sonixj 0c45:6130 Sonix Pccam 314sonixj 0c45:6130 Sonix Pccam
307sonixj 0c45:6138 Sn9c120 Mo4000 315sonixj 0c45:6138 Sn9c120 Mo4000
@@ -362,6 +370,8 @@ sq905c 2770:9052 Disney pix micro 2 (VGA)
362sq905c 2770:905c All 11 known cameras with this ID 370sq905c 2770:905c All 11 known cameras with this ID
363sq905 2770:9120 All 24 known cameras with this ID 371sq905 2770:9120 All 24 known cameras with this ID
364sq905c 2770:913d All 4 known cameras with this ID 372sq905c 2770:913d All 4 known cameras with this ID
373sq930x 2770:930b Sweex Motion Tracking / I-Tec iCam Tracer
374sq930x 2770:930c Trust WB-3500T / NSG Robbie 2.0
365spca500 2899:012c Toptro Industrial 375spca500 2899:012c Toptro Industrial
366ov519 8020:ef04 ov519 376ov519 8020:ef04 ov519
367spca508 8086:0110 Intel Easy PC Camera 377spca508 8086:0110 Intel Easy PC Camera
diff --git a/Documentation/video4linux/hauppauge-wintv-cx88-ir.txt b/Documentation/video4linux/hauppauge-wintv-cx88-ir.txt
index faccee68f603..a2fd363c40c8 100644
--- a/Documentation/video4linux/hauppauge-wintv-cx88-ir.txt
+++ b/Documentation/video4linux/hauppauge-wintv-cx88-ir.txt
@@ -44,7 +44,7 @@ http://www.atmel.com/dyn/resources/prod_documents/doc2817.pdf
44This data sheet (google search) seems to have a lovely description of the 44This data sheet (google search) seems to have a lovely description of the
45RC5 basics 45RC5 basics
46 46
47http://users.pandora.be/nenya/electronics/rc5/ and more data 47http://www.nenya.be/beor/electronics/rc5.htm and more data
48 48
49http://www.ee.washington.edu/circuit_archive/text/ir_decode.txt 49http://www.ee.washington.edu/circuit_archive/text/ir_decode.txt
50and even a reference to how to decode a bi-phase data stream. 50and even a reference to how to decode a bi-phase data stream.
diff --git a/Documentation/video4linux/ibmcam.txt b/Documentation/video4linux/ibmcam.txt
index 397a94eb77b8..a51055211e62 100644
--- a/Documentation/video4linux/ibmcam.txt
+++ b/Documentation/video4linux/ibmcam.txt
@@ -27,9 +27,8 @@ SUPPORTED CAMERAS:
27 27
28Xirlink "C-It" camera, also known as "IBM PC Camera". 28Xirlink "C-It" camera, also known as "IBM PC Camera".
29The device uses proprietary ASIC (and compression method); 29The device uses proprietary ASIC (and compression method);
30it is manufactured by Xirlink. See http://www.xirlink.com/ 30it is manufactured by Xirlink. See http://xirlinkwebcam.sourceforge.net,
31(renamed to http://www.veo.com), http://www.ibmpccamera.com, 31http://www.ibmpccamera.com, or http://www.c-itnow.com/ for details and pictures.
32or http://www.c-itnow.com/ for details and pictures.
33 32
34This very chipset ("X Chip", as marked at the factory) 33This very chipset ("X Chip", as marked at the factory)
35is used in several other cameras, and they are supported 34is used in several other cameras, and they are supported
diff --git a/Documentation/video4linux/se401.txt b/Documentation/video4linux/se401.txt
index 7b9d1c960a10..bd6526ec8dd7 100644
--- a/Documentation/video4linux/se401.txt
+++ b/Documentation/video4linux/se401.txt
@@ -49,6 +49,6 @@ order to increase the throughput (and thus framerate).
49HELP: 49HELP:
50 50
51The latest info on this driver can be found at: 51The latest info on this driver can be found at:
52http://www.chello.nl/~j.vreeken/se401/ 52http://members.chello.nl/~j.vreeken/se401/
53And questions to me can be send to: 53And questions to me can be send to:
54pe1rxq@amsat.org 54pe1rxq@amsat.org
diff --git a/Documentation/video4linux/v4l2-controls.txt b/Documentation/video4linux/v4l2-controls.txt
new file mode 100644
index 000000000000..8773778d23fc
--- /dev/null
+++ b/Documentation/video4linux/v4l2-controls.txt
@@ -0,0 +1,648 @@
1Introduction
2============
3
4The V4L2 control API seems simple enough, but quickly becomes very hard to
5implement correctly in drivers. But much of the code needed to handle controls
6is actually not driver specific and can be moved to the V4L core framework.
7
8After all, the only part that a driver developer is interested in is:
9
101) How do I add a control?
112) How do I set the control's value? (i.e. s_ctrl)
12
13And occasionally:
14
153) How do I get the control's value? (i.e. g_volatile_ctrl)
164) How do I validate the user's proposed control value? (i.e. try_ctrl)
17
18All the rest is something that can be done centrally.
19
20The control framework was created in order to implement all the rules of the
21V4L2 specification with respect to controls in a central place. And to make
22life as easy as possible for the driver developer.
23
24Note that the control framework relies on the presence of a struct v4l2_device
25for V4L2 drivers and struct v4l2_subdev for sub-device drivers.
26
27
28Objects in the framework
29========================
30
31There are two main objects:
32
33The v4l2_ctrl object describes the control properties and keeps track of the
34control's value (both the current value and the proposed new value).
35
36v4l2_ctrl_handler is the object that keeps track of controls. It maintains a
37list of v4l2_ctrl objects that it owns and another list of references to
38controls, possibly to controls owned by other handlers.
39
40
41Basic usage for V4L2 and sub-device drivers
42===========================================
43
441) Prepare the driver:
45
461.1) Add the handler to your driver's top-level struct:
47
48 struct foo_dev {
49 ...
50 struct v4l2_ctrl_handler ctrl_handler;
51 ...
52 };
53
54 struct foo_dev *foo;
55
561.2) Initialize the handler:
57
58 v4l2_ctrl_handler_init(&foo->ctrl_handler, nr_of_controls);
59
60 The second argument is a hint telling the function how many controls this
61 handler is expected to handle. It will allocate a hashtable based on this
62 information. It is a hint only.
63
641.3) Hook the control handler into the driver:
65
661.3.1) For V4L2 drivers do this:
67
68 struct foo_dev {
69 ...
70 struct v4l2_device v4l2_dev;
71 ...
72 struct v4l2_ctrl_handler ctrl_handler;
73 ...
74 };
75
76 foo->v4l2_dev.ctrl_handler = &foo->ctrl_handler;
77
78 Where foo->v4l2_dev is of type struct v4l2_device.
79
80 Finally, remove all control functions from your v4l2_ioctl_ops:
81 vidioc_queryctrl, vidioc_querymenu, vidioc_g_ctrl, vidioc_s_ctrl,
82 vidioc_g_ext_ctrls, vidioc_try_ext_ctrls and vidioc_s_ext_ctrls.
83 Those are now no longer needed.
84
851.3.2) For sub-device drivers do this:
86
87 struct foo_dev {
88 ...
89 struct v4l2_subdev sd;
90 ...
91 struct v4l2_ctrl_handler ctrl_handler;
92 ...
93 };
94
95 foo->sd.ctrl_handler = &foo->ctrl_handler;
96
97 Where foo->sd is of type struct v4l2_subdev.
98
99 And set all core control ops in your struct v4l2_subdev_core_ops to these
100 helpers:
101
102 .queryctrl = v4l2_subdev_queryctrl,
103 .querymenu = v4l2_subdev_querymenu,
104 .g_ctrl = v4l2_subdev_g_ctrl,
105 .s_ctrl = v4l2_subdev_s_ctrl,
106 .g_ext_ctrls = v4l2_subdev_g_ext_ctrls,
107 .try_ext_ctrls = v4l2_subdev_try_ext_ctrls,
108 .s_ext_ctrls = v4l2_subdev_s_ext_ctrls,
109
110 Note: this is a temporary solution only. Once all V4L2 drivers that depend
111 on subdev drivers are converted to the control framework these helpers will
112 no longer be needed.
113
1141.4) Clean up the handler at the end:
115
116 v4l2_ctrl_handler_free(&foo->ctrl_handler);
117
118
1192) Add controls:
120
121You add non-menu controls by calling v4l2_ctrl_new_std:
122
123 struct v4l2_ctrl *v4l2_ctrl_new_std(struct v4l2_ctrl_handler *hdl,
124 const struct v4l2_ctrl_ops *ops,
125 u32 id, s32 min, s32 max, u32 step, s32 def);
126
127Menu controls are added by calling v4l2_ctrl_new_std_menu:
128
129 struct v4l2_ctrl *v4l2_ctrl_new_std_menu(struct v4l2_ctrl_handler *hdl,
130 const struct v4l2_ctrl_ops *ops,
131 u32 id, s32 max, s32 skip_mask, s32 def);
132
133These functions are typically called right after the v4l2_ctrl_handler_init:
134
135 v4l2_ctrl_handler_init(&foo->ctrl_handler, nr_of_controls);
136 v4l2_ctrl_new_std(&foo->ctrl_handler, &foo_ctrl_ops,
137 V4L2_CID_BRIGHTNESS, 0, 255, 1, 128);
138 v4l2_ctrl_new_std(&foo->ctrl_handler, &foo_ctrl_ops,
139 V4L2_CID_CONTRAST, 0, 255, 1, 128);
140 v4l2_ctrl_new_std_menu(&foo->ctrl_handler, &foo_ctrl_ops,
141 V4L2_CID_POWER_LINE_FREQUENCY,
142 V4L2_CID_POWER_LINE_FREQUENCY_60HZ, 0,
143 V4L2_CID_POWER_LINE_FREQUENCY_DISABLED);
144 ...
145 if (foo->ctrl_handler.error) {
146 int err = foo->ctrl_handler.error;
147
148 v4l2_ctrl_handler_free(&foo->ctrl_handler);
149 return err;
150 }
151
152The v4l2_ctrl_new_std function returns the v4l2_ctrl pointer to the new
153control, but if you do not need to access the pointer outside the control ops,
154then there is no need to store it.
155
156The v4l2_ctrl_new_std function will fill in most fields based on the control
157ID except for the min, max, step and default values. These are passed in the
158last four arguments. These values are driver specific while control attributes
159like type, name, flags are all global. The control's current value will be set
160to the default value.
161
162The v4l2_ctrl_new_std_menu function is very similar but it is used for menu
163controls. There is no min argument since that is always 0 for menu controls,
164and instead of a step there is a skip_mask argument: if bit X is 1, then menu
165item X is skipped.
166
167Note that if something fails, the function will return NULL or an error and
168set ctrl_handler->error to the error code. If ctrl_handler->error was already
169set, then it will just return and do nothing. This is also true for
170v4l2_ctrl_handler_init if it cannot allocate the internal data structure.
171
172This makes it easy to init the handler and just add all controls and only check
173the error code at the end. Saves a lot of repetitive error checking.
174
175It is recommended to add controls in ascending control ID order: it will be
176a bit faster that way.
177
1783) Optionally force initial control setup:
179
180 v4l2_ctrl_handler_setup(&foo->ctrl_handler);
181
182This will call s_ctrl for all controls unconditionally. Effectively this
183initializes the hardware to the default control values. It is recommended
184that you do this as this ensures that both the internal data structures and
185the hardware are in sync.
186
1874) Finally: implement the v4l2_ctrl_ops
188
189 static const struct v4l2_ctrl_ops foo_ctrl_ops = {
190 .s_ctrl = foo_s_ctrl,
191 };
192
193Usually all you need is s_ctrl:
194
195 static int foo_s_ctrl(struct v4l2_ctrl *ctrl)
196 {
197 struct foo *state = container_of(ctrl->handler, struct foo, ctrl_handler);
198
199 switch (ctrl->id) {
200 case V4L2_CID_BRIGHTNESS:
201 write_reg(0x123, ctrl->val);
202 break;
203 case V4L2_CID_CONTRAST:
204 write_reg(0x456, ctrl->val);
205 break;
206 }
207 return 0;
208 }
209
210The control ops are called with the v4l2_ctrl pointer as argument.
211The new control value has already been validated, so all you need to do is
212to actually update the hardware registers.
213
214You're done! And this is sufficient for most of the drivers we have. No need
215to do any validation of control values, or implement QUERYCTRL/QUERYMENU. And
216G/S_CTRL as well as G/TRY/S_EXT_CTRLS are automatically supported.
217
218
219==============================================================================
220
221The remainder of this document deals with more advanced topics and scenarios.
222In practice the basic usage as described above is sufficient for most drivers.
223
224===============================================================================
225
226
227Inheriting Controls
228===================
229
230When a sub-device is registered with a V4L2 driver by calling
231v4l2_device_register_subdev() and the ctrl_handler fields of both v4l2_subdev
232and v4l2_device are set, then the controls of the subdev will become
233automatically available in the V4L2 driver as well. If the subdev driver
234contains controls that already exist in the V4L2 driver, then those will be
235skipped (so a V4L2 driver can always override a subdev control).
236
237What happens here is that v4l2_device_register_subdev() calls
238v4l2_ctrl_add_handler() adding the controls of the subdev to the controls
239of v4l2_device.
240
241
242Accessing Control Values
243========================
244
245The v4l2_ctrl struct contains these two unions:
246
247 /* The current control value. */
248 union {
249 s32 val;
250 s64 val64;
251 char *string;
252 } cur;
253
254 /* The new control value. */
255 union {
256 s32 val;
257 s64 val64;
258 char *string;
259 };
260
261Within the control ops you can freely use these. The val and val64 speak for
262themselves. The string pointers point to character buffers of length
263ctrl->maximum + 1, and are always 0-terminated.
264
265In most cases 'cur' contains the current cached control value. When you create
266a new control this value is made identical to the default value. After calling
267v4l2_ctrl_handler_setup() this value is passed to the hardware. It is generally
268a good idea to call this function.
269
270Whenever a new value is set that new value is automatically cached. This means
271that most drivers do not need to implement the g_volatile_ctrl() op. The
272exception is for controls that return a volatile register such as a signal
273strength read-out that changes continuously. In that case you will need to
274implement g_volatile_ctrl like this:
275
276 static int foo_g_volatile_ctrl(struct v4l2_ctrl *ctrl)
277 {
278 switch (ctrl->id) {
279 case V4L2_CID_BRIGHTNESS:
280 ctrl->cur.val = read_reg(0x123);
281 break;
282 }
283 }
284
285The 'new value' union is not used in g_volatile_ctrl. In general controls
286that need to implement g_volatile_ctrl are read-only controls.
287
288To mark a control as volatile you have to set the is_volatile flag:
289
290 ctrl = v4l2_ctrl_new_std(&sd->ctrl_handler, ...);
291 if (ctrl)
292 ctrl->is_volatile = 1;
293
294For try/s_ctrl the new values (i.e. as passed by the user) are filled in and
295you can modify them in try_ctrl or set them in s_ctrl. The 'cur' union
296contains the current value, which you can use (but not change!) as well.
297
298If s_ctrl returns 0 (OK), then the control framework will copy the new final
299values to the 'cur' union.
300
301While in g_volatile/s/try_ctrl you can access the value of all controls owned
302by the same handler since the handler's lock is held. If you need to access
303the value of controls owned by other handlers, then you have to be very careful
304not to introduce deadlocks.
305
306Outside of the control ops you have to go through to helper functions to get
307or set a single control value safely in your driver:
308
309 s32 v4l2_ctrl_g_ctrl(struct v4l2_ctrl *ctrl);
310 int v4l2_ctrl_s_ctrl(struct v4l2_ctrl *ctrl, s32 val);
311
312These functions go through the control framework just as VIDIOC_G/S_CTRL ioctls
313do. Don't use these inside the control ops g_volatile/s/try_ctrl, though, that
314will result in a deadlock since these helpers lock the handler as well.
315
316You can also take the handler lock yourself:
317
318 mutex_lock(&state->ctrl_handler.lock);
319 printk(KERN_INFO "String value is '%s'\n", ctrl1->cur.string);
320 printk(KERN_INFO "Integer value is '%s'\n", ctrl2->cur.val);
321 mutex_unlock(&state->ctrl_handler.lock);
322
323
324Menu Controls
325=============
326
327The v4l2_ctrl struct contains this union:
328
329 union {
330 u32 step;
331 u32 menu_skip_mask;
332 };
333
334For menu controls menu_skip_mask is used. What it does is that it allows you
335to easily exclude certain menu items. This is used in the VIDIOC_QUERYMENU
336implementation where you can return -EINVAL if a certain menu item is not
337present. Note that VIDIOC_QUERYCTRL always returns a step value of 1 for
338menu controls.
339
340A good example is the MPEG Audio Layer II Bitrate menu control where the
341menu is a list of standardized possible bitrates. But in practice hardware
342implementations will only support a subset of those. By setting the skip
343mask you can tell the framework which menu items should be skipped. Setting
344it to 0 means that all menu items are supported.
345
346You set this mask either through the v4l2_ctrl_config struct for a custom
347control, or by calling v4l2_ctrl_new_std_menu().
348
349
350Custom Controls
351===============
352
353Driver specific controls can be created using v4l2_ctrl_new_custom():
354
355 static const struct v4l2_ctrl_config ctrl_filter = {
356 .ops = &ctrl_custom_ops,
357 .id = V4L2_CID_MPEG_CX2341X_VIDEO_SPATIAL_FILTER,
358 .name = "Spatial Filter",
359 .type = V4L2_CTRL_TYPE_INTEGER,
360 .flags = V4L2_CTRL_FLAG_SLIDER,
361 .max = 15,
362 .step = 1,
363 };
364
365 ctrl = v4l2_ctrl_new_custom(&foo->ctrl_handler, &ctrl_filter, NULL);
366
367The last argument is the priv pointer which can be set to driver-specific
368private data.
369
370The v4l2_ctrl_config struct also has fields to set the is_private and is_volatile
371flags.
372
373If the name field is not set, then the framework will assume this is a standard
374control and will fill in the name, type and flags fields accordingly.
375
376
377Active and Grabbed Controls
378===========================
379
380If you get more complex relationships between controls, then you may have to
381activate and deactivate controls. For example, if the Chroma AGC control is
382on, then the Chroma Gain control is inactive. That is, you may set it, but
383the value will not be used by the hardware as long as the automatic gain
384control is on. Typically user interfaces can disable such input fields.
385
386You can set the 'active' status using v4l2_ctrl_activate(). By default all
387controls are active. Note that the framework does not check for this flag.
388It is meant purely for GUIs. The function is typically called from within
389s_ctrl.
390
391The other flag is the 'grabbed' flag. A grabbed control means that you cannot
392change it because it is in use by some resource. Typical examples are MPEG
393bitrate controls that cannot be changed while capturing is in progress.
394
395If a control is set to 'grabbed' using v4l2_ctrl_grab(), then the framework
396will return -EBUSY if an attempt is made to set this control. The
397v4l2_ctrl_grab() function is typically called from the driver when it
398starts or stops streaming.
399
400
401Control Clusters
402================
403
404By default all controls are independent from the others. But in more
405complex scenarios you can get dependencies from one control to another.
406In that case you need to 'cluster' them:
407
408 struct foo {
409 struct v4l2_ctrl_handler ctrl_handler;
410#define AUDIO_CL_VOLUME (0)
411#define AUDIO_CL_MUTE (1)
412 struct v4l2_ctrl *audio_cluster[2];
413 ...
414 };
415
416 state->audio_cluster[AUDIO_CL_VOLUME] =
417 v4l2_ctrl_new_std(&state->ctrl_handler, ...);
418 state->audio_cluster[AUDIO_CL_MUTE] =
419 v4l2_ctrl_new_std(&state->ctrl_handler, ...);
420 v4l2_ctrl_cluster(ARRAY_SIZE(state->audio_cluster), state->audio_cluster);
421
422From now on whenever one or more of the controls belonging to the same
423cluster is set (or 'gotten', or 'tried'), only the control ops of the first
424control ('volume' in this example) is called. You effectively create a new
425composite control. Similar to how a 'struct' works in C.
426
427So when s_ctrl is called with V4L2_CID_AUDIO_VOLUME as argument, you should set
428all two controls belonging to the audio_cluster:
429
430 static int foo_s_ctrl(struct v4l2_ctrl *ctrl)
431 {
432 struct foo *state = container_of(ctrl->handler, struct foo, ctrl_handler);
433
434 switch (ctrl->id) {
435 case V4L2_CID_AUDIO_VOLUME: {
436 struct v4l2_ctrl *mute = ctrl->cluster[AUDIO_CL_MUTE];
437
438 write_reg(0x123, mute->val ? 0 : ctrl->val);
439 break;
440 }
441 case V4L2_CID_CONTRAST:
442 write_reg(0x456, ctrl->val);
443 break;
444 }
445 return 0;
446 }
447
448In the example above the following are equivalent for the VOLUME case:
449
450 ctrl == ctrl->cluster[AUDIO_CL_VOLUME] == state->audio_cluster[AUDIO_CL_VOLUME]
451 ctrl->cluster[AUDIO_CL_MUTE] == state->audio_cluster[AUDIO_CL_MUTE]
452
453Note that controls in a cluster may be NULL. For example, if for some
454reason mute was never added (because the hardware doesn't support that
455particular feature), then mute will be NULL. So in that case we have a
456cluster of 2 controls, of which only 1 is actually instantiated. The
457only restriction is that the first control of the cluster must always be
458present, since that is the 'master' control of the cluster. The master
459control is the one that identifies the cluster and that provides the
460pointer to the v4l2_ctrl_ops struct that is used for that cluster.
461
462Obviously, all controls in the cluster array must be initialized to either
463a valid control or to NULL.
464
465
466VIDIOC_LOG_STATUS Support
467=========================
468
469This ioctl allow you to dump the current status of a driver to the kernel log.
470The v4l2_ctrl_handler_log_status(ctrl_handler, prefix) can be used to dump the
471value of the controls owned by the given handler to the log. You can supply a
472prefix as well. If the prefix didn't end with a space, then ': ' will be added
473for you.
474
475
476Different Handlers for Different Video Nodes
477============================================
478
479Usually the V4L2 driver has just one control handler that is global for
480all video nodes. But you can also specify different control handlers for
481different video nodes. You can do that by manually setting the ctrl_handler
482field of struct video_device.
483
484That is no problem if there are no subdevs involved but if there are, then
485you need to block the automatic merging of subdev controls to the global
486control handler. You do that by simply setting the ctrl_handler field in
487struct v4l2_device to NULL. Now v4l2_device_register_subdev() will no longer
488merge subdev controls.
489
490After each subdev was added, you will then have to call v4l2_ctrl_add_handler
491manually to add the subdev's control handler (sd->ctrl_handler) to the desired
492control handler. This control handler may be specific to the video_device or
493for a subset of video_device's. For example: the radio device nodes only have
494audio controls, while the video and vbi device nodes share the same control
495handler for the audio and video controls.
496
497If you want to have one handler (e.g. for a radio device node) have a subset
498of another handler (e.g. for a video device node), then you should first add
499the controls to the first handler, add the other controls to the second
500handler and finally add the first handler to the second. For example:
501
502 v4l2_ctrl_new_std(&radio_ctrl_handler, &radio_ops, V4L2_CID_AUDIO_VOLUME, ...);
503 v4l2_ctrl_new_std(&radio_ctrl_handler, &radio_ops, V4L2_CID_AUDIO_MUTE, ...);
504 v4l2_ctrl_new_std(&video_ctrl_handler, &video_ops, V4L2_CID_BRIGHTNESS, ...);
505 v4l2_ctrl_new_std(&video_ctrl_handler, &video_ops, V4L2_CID_CONTRAST, ...);
506 v4l2_ctrl_add_handler(&video_ctrl_handler, &radio_ctrl_handler);
507
508Or you can add specific controls to a handler:
509
510 volume = v4l2_ctrl_new_std(&video_ctrl_handler, &ops, V4L2_CID_AUDIO_VOLUME, ...);
511 v4l2_ctrl_new_std(&video_ctrl_handler, &ops, V4L2_CID_BRIGHTNESS, ...);
512 v4l2_ctrl_new_std(&video_ctrl_handler, &ops, V4L2_CID_CONTRAST, ...);
513 v4l2_ctrl_add_ctrl(&radio_ctrl_handler, volume);
514
515What you should not do is make two identical controls for two handlers.
516For example:
517
518 v4l2_ctrl_new_std(&radio_ctrl_handler, &radio_ops, V4L2_CID_AUDIO_MUTE, ...);
519 v4l2_ctrl_new_std(&video_ctrl_handler, &video_ops, V4L2_CID_AUDIO_MUTE, ...);
520
521This would be bad since muting the radio would not change the video mute
522control. The rule is to have one control for each hardware 'knob' that you
523can twiddle.
524
525
526Finding Controls
527================
528
529Normally you have created the controls yourself and you can store the struct
530v4l2_ctrl pointer into your own struct.
531
532But sometimes you need to find a control from another handler that you do
533not own. For example, if you have to find a volume control from a subdev.
534
535You can do that by calling v4l2_ctrl_find:
536
537 struct v4l2_ctrl *volume;
538
539 volume = v4l2_ctrl_find(sd->ctrl_handler, V4L2_CID_AUDIO_VOLUME);
540
541Since v4l2_ctrl_find will lock the handler you have to be careful where you
542use it. For example, this is not a good idea:
543
544 struct v4l2_ctrl_handler ctrl_handler;
545
546 v4l2_ctrl_new_std(&ctrl_handler, &video_ops, V4L2_CID_BRIGHTNESS, ...);
547 v4l2_ctrl_new_std(&ctrl_handler, &video_ops, V4L2_CID_CONTRAST, ...);
548
549...and in video_ops.s_ctrl:
550
551 case V4L2_CID_BRIGHTNESS:
552 contrast = v4l2_find_ctrl(&ctrl_handler, V4L2_CID_CONTRAST);
553 ...
554
555When s_ctrl is called by the framework the ctrl_handler.lock is already taken, so
556attempting to find another control from the same handler will deadlock.
557
558It is recommended not to use this function from inside the control ops.
559
560
561Inheriting Controls
562===================
563
564When one control handler is added to another using v4l2_ctrl_add_handler, then
565by default all controls from one are merged to the other. But a subdev might
566have low-level controls that make sense for some advanced embedded system, but
567not when it is used in consumer-level hardware. In that case you want to keep
568those low-level controls local to the subdev. You can do this by simply
569setting the 'is_private' flag of the control to 1:
570
571 static const struct v4l2_ctrl_config ctrl_private = {
572 .ops = &ctrl_custom_ops,
573 .id = V4L2_CID_...,
574 .name = "Some Private Control",
575 .type = V4L2_CTRL_TYPE_INTEGER,
576 .max = 15,
577 .step = 1,
578 .is_private = 1,
579 };
580
581 ctrl = v4l2_ctrl_new_custom(&foo->ctrl_handler, &ctrl_private, NULL);
582
583These controls will now be skipped when v4l2_ctrl_add_handler is called.
584
585
586V4L2_CTRL_TYPE_CTRL_CLASS Controls
587==================================
588
589Controls of this type can be used by GUIs to get the name of the control class.
590A fully featured GUI can make a dialog with multiple tabs with each tab
591containing the controls belonging to a particular control class. The name of
592each tab can be found by querying a special control with ID <control class | 1>.
593
594Drivers do not have to care about this. The framework will automatically add
595a control of this type whenever the first control belonging to a new control
596class is added.
597
598
599Differences from the Spec
600=========================
601
602There are a few places where the framework acts slightly differently from the
603V4L2 Specification. Those differences are described in this section. We will
604have to see whether we need to adjust the spec or not.
605
6061) It is no longer required to have all controls contained in a
607v4l2_ext_control array be from the same control class. The framework will be
608able to handle any type of control in the array. You need to set ctrl_class
609to 0 in order to enable this. If ctrl_class is non-zero, then it will still
610check that all controls belong to that control class.
611
612If you set ctrl_class to 0 and count to 0, then it will only return an error
613if there are no controls at all.
614
6152) Clarified the way error_idx works. For get and set it will be equal to
616count if nothing was done yet. If it is less than count then only the controls
617up to error_idx-1 were successfully applied.
618
6193) When attempting to read a button control the framework will return -EACCES
620instead of -EINVAL as stated in the spec. It seems to make more sense since
621button controls are write-only controls.
622
6234) Attempting to write to a read-only control will return -EACCES instead of
624-EINVAL as the spec says.
625
6265) The spec does not mention what should happen when you try to set/get a
627control class controls. ivtv currently returns -EINVAL (indicating that the
628control ID does not exist) while the framework will return -EACCES, which
629makes more sense.
630
631
632Proposals for Extensions
633========================
634
635Some ideas for future extensions to the spec:
636
6371) Add a V4L2_CTRL_FLAG_HEX to have values shown as hexadecimal instead of
638decimal. Useful for e.g. video_mute_yuv.
639
6402) It is possible to mark in the controls array which controls have been
641successfully written and which failed by for example adding a bit to the
642control ID. Not sure if it is worth the effort, though.
643
6443) Trying to set volatile inactive controls should result in -EACCESS.
645
6464) Add a new flag to mark volatile controls. Any application that wants
647to store the state of the controls can then skip volatile inactive controls.
648Currently it is not possible to detect such controls.
diff --git a/Documentation/video4linux/v4l2-framework.txt b/Documentation/video4linux/v4l2-framework.txt
index e831aaca66f8..f22f35c271f3 100644
--- a/Documentation/video4linux/v4l2-framework.txt
+++ b/Documentation/video4linux/v4l2-framework.txt
@@ -44,8 +44,8 @@ All drivers have the following structure:
44 44
452) A way of initializing and commanding sub-devices (if any). 452) A way of initializing and commanding sub-devices (if any).
46 46
473) Creating V4L2 device nodes (/dev/videoX, /dev/vbiX, /dev/radioX and 473) Creating V4L2 device nodes (/dev/videoX, /dev/vbiX and /dev/radioX)
48 /dev/vtxX) and keeping track of device-node specific data. 48 and keeping track of device-node specific data.
49 49
504) Filehandle-specific structs containing per-filehandle data; 504) Filehandle-specific structs containing per-filehandle data;
51 51
@@ -192,6 +192,11 @@ You also need a way to go from the low-level struct to v4l2_subdev. For the
192common i2c_client struct the i2c_set_clientdata() call is used to store a 192common i2c_client struct the i2c_set_clientdata() call is used to store a
193v4l2_subdev pointer, for other busses you may have to use other methods. 193v4l2_subdev pointer, for other busses you may have to use other methods.
194 194
195Bridges might also need to store per-subdev private data, such as a pointer to
196bridge-specific per-subdev private data. The v4l2_subdev structure provides
197host private data for that purpose that can be accessed with
198v4l2_get_subdev_hostdata() and v4l2_set_subdev_hostdata().
199
195From the bridge driver perspective you load the sub-device module and somehow 200From the bridge driver perspective you load the sub-device module and somehow
196obtain the v4l2_subdev pointer. For i2c devices this is easy: you call 201obtain the v4l2_subdev pointer. For i2c devices this is easy: you call
197i2c_get_clientdata(). For other busses something similar needs to be done. 202i2c_get_clientdata(). For other busses something similar needs to be done.
@@ -448,6 +453,10 @@ You should also set these fields:
448- ioctl_ops: if you use the v4l2_ioctl_ops to simplify ioctl maintenance 453- ioctl_ops: if you use the v4l2_ioctl_ops to simplify ioctl maintenance
449 (highly recommended to use this and it might become compulsory in the 454 (highly recommended to use this and it might become compulsory in the
450 future!), then set this to your v4l2_ioctl_ops struct. 455 future!), then set this to your v4l2_ioctl_ops struct.
456- lock: leave to NULL if you want to do all the locking in the driver.
457 Otherwise you give it a pointer to a struct mutex_lock and before any
458 of the v4l2_file_operations is called this lock will be taken by the
459 core and released afterwards.
451- parent: you only set this if v4l2_device was registered with NULL as 460- parent: you only set this if v4l2_device was registered with NULL as
452 the parent device struct. This only happens in cases where one hardware 461 the parent device struct. This only happens in cases where one hardware
453 device has multiple PCI devices that all share the same v4l2_device core. 462 device has multiple PCI devices that all share the same v4l2_device core.
@@ -464,6 +473,22 @@ If you use v4l2_ioctl_ops, then you should set either .unlocked_ioctl or
464The v4l2_file_operations struct is a subset of file_operations. The main 473The v4l2_file_operations struct is a subset of file_operations. The main
465difference is that the inode argument is omitted since it is never used. 474difference is that the inode argument is omitted since it is never used.
466 475
476v4l2_file_operations and locking
477--------------------------------
478
479You can set a pointer to a mutex_lock in struct video_device. Usually this
480will be either a top-level mutex or a mutex per device node. If you want
481finer-grained locking then you have to set it to NULL and do you own locking.
482
483If a lock is specified then all file operations will be serialized on that
484lock. If you use videobuf then you must pass the same lock to the videobuf
485queue initialize function: if videobuf has to wait for a frame to arrive, then
486it will temporarily unlock the lock and relock it afterwards. If your driver
487also waits in the code, then you should do the same to allow other processes
488to access the device node while the first process is waiting for something.
489
490The implementation of a hotplug disconnect should also take the lock before
491calling v4l2_device_disconnect.
467 492
468video_device registration 493video_device registration
469------------------------- 494-------------------------
@@ -483,7 +508,6 @@ types exist:
483VFL_TYPE_GRABBER: videoX for video input/output devices 508VFL_TYPE_GRABBER: videoX for video input/output devices
484VFL_TYPE_VBI: vbiX for vertical blank data (i.e. closed captions, teletext) 509VFL_TYPE_VBI: vbiX for vertical blank data (i.e. closed captions, teletext)
485VFL_TYPE_RADIO: radioX for radio tuners 510VFL_TYPE_RADIO: radioX for radio tuners
486VFL_TYPE_VTX: vtxX for teletext devices (deprecated, don't use)
487 511
488The last argument gives you a certain amount of control over the device 512The last argument gives you a certain amount of control over the device
489device node number used (i.e. the X in videoX). Normally you will pass -1 513device node number used (i.e. the X in videoX). Normally you will pass -1
@@ -547,9 +571,8 @@ from /dev).
547 571
548After video_unregister_device() returns no new opens can be done. However, 572After video_unregister_device() returns no new opens can be done. However,
549in the case of USB devices some application might still have one of these 573in the case of USB devices some application might still have one of these
550device nodes open. So after the unregister all file operations will return 574device nodes open. So after the unregister all file operations (except
551an error as well, except for the ioctl and unlocked_ioctl file operations: 575release, of course) will return an error as well.
552those will still be passed on since some buffer ioctls may still be needed.
553 576
554When the last user of the video device node exits, then the vdev->release() 577When the last user of the video device node exits, then the vdev->release()
555callback is called and you can do the final cleanup there. 578callback is called and you can do the final cleanup there.
diff --git a/Documentation/video4linux/w9966.txt b/Documentation/video4linux/w9966.txt
index 78a651254b84..855024525fd2 100644
--- a/Documentation/video4linux/w9966.txt
+++ b/Documentation/video4linux/w9966.txt
@@ -24,7 +24,7 @@ where every two pixels take 4 bytes. In SDL (www.libsdl.org) this format
24is called VIDEO_PALETTE_YUV422 (16 bpp). 24is called VIDEO_PALETTE_YUV422 (16 bpp).
25 25
26A minimal test application (with source) is available from: 26A minimal test application (with source) is available from:
27 http://hem.fyristorg.com/mogul/w9966.html 27 http://www.slackwaresupport.com/howtos/Webcam-HOWTO
28 28
29The slow framerate is due to missing DMA ECP read support in the 29The slow framerate is due to missing DMA ECP read support in the
30parport drivers. I might add working EPP support later. 30parport drivers. I might add working EPP support later.
diff --git a/Documentation/vm/highmem.txt b/Documentation/vm/highmem.txt
new file mode 100644
index 000000000000..4324d24ffacd
--- /dev/null
+++ b/Documentation/vm/highmem.txt
@@ -0,0 +1,162 @@
1
2 ====================
3 HIGH MEMORY HANDLING
4 ====================
5
6By: Peter Zijlstra <a.p.zijlstra@chello.nl>
7
8Contents:
9
10 (*) What is high memory?
11
12 (*) Temporary virtual mappings.
13
14 (*) Using kmap_atomic.
15
16 (*) Cost of temporary mappings.
17
18 (*) i386 PAE.
19
20
21====================
22WHAT IS HIGH MEMORY?
23====================
24
25High memory (highmem) is used when the size of physical memory approaches or
26exceeds the maximum size of virtual memory. At that point it becomes
27impossible for the kernel to keep all of the available physical memory mapped
28at all times. This means the kernel needs to start using temporary mappings of
29the pieces of physical memory that it wants to access.
30
31The part of (physical) memory not covered by a permanent mapping is what we
32refer to as 'highmem'. There are various architecture dependent constraints on
33where exactly that border lies.
34
35In the i386 arch, for example, we choose to map the kernel into every process's
36VM space so that we don't have to pay the full TLB invalidation costs for
37kernel entry/exit. This means the available virtual memory space (4GiB on
38i386) has to be divided between user and kernel space.
39
40The traditional split for architectures using this approach is 3:1, 3GiB for
41userspace and the top 1GiB for kernel space:
42
43 +--------+ 0xffffffff
44 | Kernel |
45 +--------+ 0xc0000000
46 | |
47 | User |
48 | |
49 +--------+ 0x00000000
50
51This means that the kernel can at most map 1GiB of physical memory at any one
52time, but because we need virtual address space for other things - including
53temporary maps to access the rest of the physical memory - the actual direct
54map will typically be less (usually around ~896MiB).
55
56Other architectures that have mm context tagged TLBs can have separate kernel
57and user maps. Some hardware (like some ARMs), however, have limited virtual
58space when they use mm context tags.
59
60
61==========================
62TEMPORARY VIRTUAL MAPPINGS
63==========================
64
65The kernel contains several ways of creating temporary mappings:
66
67 (*) vmap(). This can be used to make a long duration mapping of multiple
68 physical pages into a contiguous virtual space. It needs global
69 synchronization to unmap.
70
71 (*) kmap(). This permits a short duration mapping of a single page. It needs
72 global synchronization, but is amortized somewhat. It is also prone to
73 deadlocks when using in a nested fashion, and so it is not recommended for
74 new code.
75
76 (*) kmap_atomic(). This permits a very short duration mapping of a single
77 page. Since the mapping is restricted to the CPU that issued it, it
78 performs well, but the issuing task is therefore required to stay on that
79 CPU until it has finished, lest some other task displace its mappings.
80
81 kmap_atomic() may also be used by interrupt contexts, since it is does not
82 sleep and the caller may not sleep until after kunmap_atomic() is called.
83
84 It may be assumed that k[un]map_atomic() won't fail.
85
86
87=================
88USING KMAP_ATOMIC
89=================
90
91When and where to use kmap_atomic() is straightforward. It is used when code
92wants to access the contents of a page that might be allocated from high memory
93(see __GFP_HIGHMEM), for example a page in the pagecache. The API has two
94functions, and they can be used in a manner similar to the following:
95
96 /* Find the page of interest. */
97 struct page *page = find_get_page(mapping, offset);
98
99 /* Gain access to the contents of that page. */
100 void *vaddr = kmap_atomic(page);
101
102 /* Do something to the contents of that page. */
103 memset(vaddr, 0, PAGE_SIZE);
104
105 /* Unmap that page. */
106 kunmap_atomic(vaddr);
107
108Note that the kunmap_atomic() call takes the result of the kmap_atomic() call
109not the argument.
110
111If you need to map two pages because you want to copy from one page to
112another you need to keep the kmap_atomic calls strictly nested, like:
113
114 vaddr1 = kmap_atomic(page1);
115 vaddr2 = kmap_atomic(page2);
116
117 memcpy(vaddr1, vaddr2, PAGE_SIZE);
118
119 kunmap_atomic(vaddr2);
120 kunmap_atomic(vaddr1);
121
122
123==========================
124COST OF TEMPORARY MAPPINGS
125==========================
126
127The cost of creating temporary mappings can be quite high. The arch has to
128manipulate the kernel's page tables, the data TLB and/or the MMU's registers.
129
130If CONFIG_HIGHMEM is not set, then the kernel will try and create a mapping
131simply with a bit of arithmetic that will convert the page struct address into
132a pointer to the page contents rather than juggling mappings about. In such a
133case, the unmap operation may be a null operation.
134
135If CONFIG_MMU is not set, then there can be no temporary mappings and no
136highmem. In such a case, the arithmetic approach will also be used.
137
138
139========
140i386 PAE
141========
142
143The i386 arch, under some circumstances, will permit you to stick up to 64GiB
144of RAM into your 32-bit machine. This has a number of consequences:
145
146 (*) Linux needs a page-frame structure for each page in the system and the
147 pageframes need to live in the permanent mapping, which means:
148
149 (*) you can have 896M/sizeof(struct page) page-frames at most; with struct
150 page being 32-bytes that would end up being something in the order of 112G
151 worth of pages; the kernel, however, needs to store more than just
152 page-frames in that memory...
153
154 (*) PAE makes your page tables larger - which slows the system down as more
155 data has to be accessed to traverse in TLB fills and the like. One
156 advantage is that PAE has more PTE bits and can provide advanced features
157 like NX and PAT.
158
159The general recommendation is that you don't use more than 8GiB on a 32-bit
160machine - although more might work for you and your workload, you're pretty
161much on your own - don't expect kernel developers to really care much if things
162come apart.
diff --git a/Documentation/vm/numa_memory_policy.txt b/Documentation/vm/numa_memory_policy.txt
index 6690fc34ef6d..4e7da6543424 100644
--- a/Documentation/vm/numa_memory_policy.txt
+++ b/Documentation/vm/numa_memory_policy.txt
@@ -424,7 +424,7 @@ a command line tool, numactl(8), exists that allows one to:
424 424
425+ set the shared policy for a shared memory segment via mbind(2) 425+ set the shared policy for a shared memory segment via mbind(2)
426 426
427The numactl(8) tool is packages with the run-time version of the library 427The numactl(8) tool is packaged with the run-time version of the library
428containing the memory policy system call wrappers. Some distributions 428containing the memory policy system call wrappers. Some distributions
429package the headers and compile-time libraries in a separate development 429package the headers and compile-time libraries in a separate development
430package. 430package.
diff --git a/Documentation/vm/page-types.c b/Documentation/vm/page-types.c
index 66e9358e2144..cc96ee2666f2 100644
--- a/Documentation/vm/page-types.c
+++ b/Documentation/vm/page-types.c
@@ -478,7 +478,7 @@ static void prepare_hwpoison_fd(void)
478 } 478 }
479 479
480 if (opt_unpoison && !hwpoison_forget_fd) { 480 if (opt_unpoison && !hwpoison_forget_fd) {
481 sprintf(buf, "%s/renew-pfn", hwpoison_debug_fs); 481 sprintf(buf, "%s/unpoison-pfn", hwpoison_debug_fs);
482 hwpoison_forget_fd = checked_open(buf, O_WRONLY); 482 hwpoison_forget_fd = checked_open(buf, O_WRONLY);
483 } 483 }
484} 484}
@@ -694,7 +694,7 @@ static void usage(void)
694#endif 694#endif
695" -l|--list Show page details in ranges\n" 695" -l|--list Show page details in ranges\n"
696" -L|--list-each Show page details one by one\n" 696" -L|--list-each Show page details one by one\n"
697" -N|--no-summary Don't show summay info\n" 697" -N|--no-summary Don't show summary info\n"
698" -X|--hwpoison hwpoison pages\n" 698" -X|--hwpoison hwpoison pages\n"
699" -x|--unpoison unpoison pages\n" 699" -x|--unpoison unpoison pages\n"
700" -h|--help Show this usage message\n" 700" -h|--help Show this usage message\n"
diff --git a/Documentation/w1/masters/ds2482 b/Documentation/w1/masters/ds2482
index 299b91c7609f..56f8edace6ac 100644
--- a/Documentation/w1/masters/ds2482
+++ b/Documentation/w1/masters/ds2482
@@ -6,8 +6,8 @@ Supported chips:
6 Prefix: 'ds2482' 6 Prefix: 'ds2482'
7 Addresses scanned: None 7 Addresses scanned: None
8 Datasheets: 8 Datasheets:
9 http://pdfserv.maxim-ic.com/en/ds/DS2482-100-DS2482S-100.pdf 9 http://datasheets.maxim-ic.com/en/ds/DS2482-100.pdf
10 http://pdfserv.maxim-ic.com/en/ds/DS2482-800-DS2482S-800.pdf 10 http://datasheets.maxim-ic.com/en/ds/DS2482-800.pdf
11 11
12Author: Ben Gardner <bgardner@wabtec.com> 12Author: Ben Gardner <bgardner@wabtec.com>
13 13
diff --git a/Documentation/w1/masters/mxc-w1 b/Documentation/w1/masters/mxc-w1
index 97f6199a7f39..38be1ad65532 100644
--- a/Documentation/w1/masters/mxc-w1
+++ b/Documentation/w1/masters/mxc-w1
@@ -5,7 +5,8 @@ Supported chips:
5 * Freescale MX27, MX31 and probably other i.MX SoCs 5 * Freescale MX27, MX31 and probably other i.MX SoCs
6 Datasheets: 6 Datasheets:
7 http://www.freescale.com/files/32bit/doc/data_sheet/MCIMX31.pdf?fpsp=1 7 http://www.freescale.com/files/32bit/doc/data_sheet/MCIMX31.pdf?fpsp=1
8 http://www.freescale.com/files/dsp/MCIMX27.pdf?fpsp=1 8 http://cache.freescale.com/files/dsp/doc/archive/MCIMX27.pdf?fsrch=1&WT_TYPE=
9 Data%20Sheets&WT_VENDOR=FREESCALE&WT_FILE_FORMAT=pdf&WT_ASSET=Documentation
9 10
10Author: Originally based on Freescale code, prepared for mainline by 11Author: Originally based on Freescale code, prepared for mainline by
11 Sascha Hauer <s.hauer@pengutronix.de> 12 Sascha Hauer <s.hauer@pengutronix.de>
diff --git a/Documentation/w1/masters/omap-hdq b/Documentation/w1/masters/omap-hdq
index ca722e09b6a1..884dc284b215 100644
--- a/Documentation/w1/masters/omap-hdq
+++ b/Documentation/w1/masters/omap-hdq
@@ -7,7 +7,7 @@ Supported chips:
7 7
8A useful link about HDQ basics: 8A useful link about HDQ basics:
9=============================== 9===============================
10http://focus.ti.com/lit/an/slua408/slua408.pdf 10http://focus.ti.com/lit/an/slua408a/slua408a.pdf
11 11
12Description: 12Description:
13============ 13============
diff --git a/Documentation/workqueue.txt b/Documentation/workqueue.txt
new file mode 100644
index 000000000000..996a27d9b8db
--- /dev/null
+++ b/Documentation/workqueue.txt
@@ -0,0 +1,381 @@
1
2Concurrency Managed Workqueue (cmwq)
3
4September, 2010 Tejun Heo <tj@kernel.org>
5 Florian Mickler <florian@mickler.org>
6
7CONTENTS
8
91. Introduction
102. Why cmwq?
113. The Design
124. Application Programming Interface (API)
135. Example Execution Scenarios
146. Guidelines
15
16
171. Introduction
18
19There are many cases where an asynchronous process execution context
20is needed and the workqueue (wq) API is the most commonly used
21mechanism for such cases.
22
23When such an asynchronous execution context is needed, a work item
24describing which function to execute is put on a queue. An
25independent thread serves as the asynchronous execution context. The
26queue is called workqueue and the thread is called worker.
27
28While there are work items on the workqueue the worker executes the
29functions associated with the work items one after the other. When
30there is no work item left on the workqueue the worker becomes idle.
31When a new work item gets queued, the worker begins executing again.
32
33
342. Why cmwq?
35
36In the original wq implementation, a multi threaded (MT) wq had one
37worker thread per CPU and a single threaded (ST) wq had one worker
38thread system-wide. A single MT wq needed to keep around the same
39number of workers as the number of CPUs. The kernel grew a lot of MT
40wq users over the years and with the number of CPU cores continuously
41rising, some systems saturated the default 32k PID space just booting
42up.
43
44Although MT wq wasted a lot of resource, the level of concurrency
45provided was unsatisfactory. The limitation was common to both ST and
46MT wq albeit less severe on MT. Each wq maintained its own separate
47worker pool. A MT wq could provide only one execution context per CPU
48while a ST wq one for the whole system. Work items had to compete for
49those very limited execution contexts leading to various problems
50including proneness to deadlocks around the single execution context.
51
52The tension between the provided level of concurrency and resource
53usage also forced its users to make unnecessary tradeoffs like libata
54choosing to use ST wq for polling PIOs and accepting an unnecessary
55limitation that no two polling PIOs can progress at the same time. As
56MT wq don't provide much better concurrency, users which require
57higher level of concurrency, like async or fscache, had to implement
58their own thread pool.
59
60Concurrency Managed Workqueue (cmwq) is a reimplementation of wq with
61focus on the following goals.
62
63* Maintain compatibility with the original workqueue API.
64
65* Use per-CPU unified worker pools shared by all wq to provide
66 flexible level of concurrency on demand without wasting a lot of
67 resource.
68
69* Automatically regulate worker pool and level of concurrency so that
70 the API users don't need to worry about such details.
71
72
733. The Design
74
75In order to ease the asynchronous execution of functions a new
76abstraction, the work item, is introduced.
77
78A work item is a simple struct that holds a pointer to the function
79that is to be executed asynchronously. Whenever a driver or subsystem
80wants a function to be executed asynchronously it has to set up a work
81item pointing to that function and queue that work item on a
82workqueue.
83
84Special purpose threads, called worker threads, execute the functions
85off of the queue, one after the other. If no work is queued, the
86worker threads become idle. These worker threads are managed in so
87called thread-pools.
88
89The cmwq design differentiates between the user-facing workqueues that
90subsystems and drivers queue work items on and the backend mechanism
91which manages thread-pool and processes the queued work items.
92
93The backend is called gcwq. There is one gcwq for each possible CPU
94and one gcwq to serve work items queued on unbound workqueues.
95
96Subsystems and drivers can create and queue work items through special
97workqueue API functions as they see fit. They can influence some
98aspects of the way the work items are executed by setting flags on the
99workqueue they are putting the work item on. These flags include
100things like CPU locality, reentrancy, concurrency limits and more. To
101get a detailed overview refer to the API description of
102alloc_workqueue() below.
103
104When a work item is queued to a workqueue, the target gcwq is
105determined according to the queue parameters and workqueue attributes
106and appended on the shared worklist of the gcwq. For example, unless
107specifically overridden, a work item of a bound workqueue will be
108queued on the worklist of exactly that gcwq that is associated to the
109CPU the issuer is running on.
110
111For any worker pool implementation, managing the concurrency level
112(how many execution contexts are active) is an important issue. cmwq
113tries to keep the concurrency at a minimal but sufficient level.
114Minimal to save resources and sufficient in that the system is used at
115its full capacity.
116
117Each gcwq bound to an actual CPU implements concurrency management by
118hooking into the scheduler. The gcwq is notified whenever an active
119worker wakes up or sleeps and keeps track of the number of the
120currently runnable workers. Generally, work items are not expected to
121hog a CPU and consume many cycles. That means maintaining just enough
122concurrency to prevent work processing from stalling should be
123optimal. As long as there are one or more runnable workers on the
124CPU, the gcwq doesn't start execution of a new work, but, when the
125last running worker goes to sleep, it immediately schedules a new
126worker so that the CPU doesn't sit idle while there are pending work
127items. This allows using a minimal number of workers without losing
128execution bandwidth.
129
130Keeping idle workers around doesn't cost other than the memory space
131for kthreads, so cmwq holds onto idle ones for a while before killing
132them.
133
134For an unbound wq, the above concurrency management doesn't apply and
135the gcwq for the pseudo unbound CPU tries to start executing all work
136items as soon as possible. The responsibility of regulating
137concurrency level is on the users. There is also a flag to mark a
138bound wq to ignore the concurrency management. Please refer to the
139API section for details.
140
141Forward progress guarantee relies on that workers can be created when
142more execution contexts are necessary, which in turn is guaranteed
143through the use of rescue workers. All work items which might be used
144on code paths that handle memory reclaim are required to be queued on
145wq's that have a rescue-worker reserved for execution under memory
146pressure. Else it is possible that the thread-pool deadlocks waiting
147for execution contexts to free up.
148
149
1504. Application Programming Interface (API)
151
152alloc_workqueue() allocates a wq. The original create_*workqueue()
153functions are deprecated and scheduled for removal. alloc_workqueue()
154takes three arguments - @name, @flags and @max_active. @name is the
155name of the wq and also used as the name of the rescuer thread if
156there is one.
157
158A wq no longer manages execution resources but serves as a domain for
159forward progress guarantee, flush and work item attributes. @flags
160and @max_active control how work items are assigned execution
161resources, scheduled and executed.
162
163@flags:
164
165 WQ_NON_REENTRANT
166
167 By default, a wq guarantees non-reentrance only on the same
168 CPU. A work item may not be executed concurrently on the same
169 CPU by multiple workers but is allowed to be executed
170 concurrently on multiple CPUs. This flag makes sure
171 non-reentrance is enforced across all CPUs. Work items queued
172 to a non-reentrant wq are guaranteed to be executed by at most
173 one worker system-wide at any given time.
174
175 WQ_UNBOUND
176
177 Work items queued to an unbound wq are served by a special
178 gcwq which hosts workers which are not bound to any specific
179 CPU. This makes the wq behave as a simple execution context
180 provider without concurrency management. The unbound gcwq
181 tries to start execution of work items as soon as possible.
182 Unbound wq sacrifices locality but is useful for the following
183 cases.
184
185 * Wide fluctuation in the concurrency level requirement is
186 expected and using bound wq may end up creating large number
187 of mostly unused workers across different CPUs as the issuer
188 hops through different CPUs.
189
190 * Long running CPU intensive workloads which can be better
191 managed by the system scheduler.
192
193 WQ_FREEZEABLE
194
195 A freezeable wq participates in the freeze phase of the system
196 suspend operations. Work items on the wq are drained and no
197 new work item starts execution until thawed.
198
199 WQ_MEM_RECLAIM
200
201 All wq which might be used in the memory reclaim paths _MUST_
202 have this flag set. The wq is guaranteed to have at least one
203 execution context regardless of memory pressure.
204
205 WQ_HIGHPRI
206
207 Work items of a highpri wq are queued at the head of the
208 worklist of the target gcwq and start execution regardless of
209 the current concurrency level. In other words, highpri work
210 items will always start execution as soon as execution
211 resource is available.
212
213 Ordering among highpri work items is preserved - a highpri
214 work item queued after another highpri work item will start
215 execution after the earlier highpri work item starts.
216
217 Although highpri work items are not held back by other
218 runnable work items, they still contribute to the concurrency
219 level. Highpri work items in runnable state will prevent
220 non-highpri work items from starting execution.
221
222 This flag is meaningless for unbound wq.
223
224 WQ_CPU_INTENSIVE
225
226 Work items of a CPU intensive wq do not contribute to the
227 concurrency level. In other words, runnable CPU intensive
228 work items will not prevent other work items from starting
229 execution. This is useful for bound work items which are
230 expected to hog CPU cycles so that their execution is
231 regulated by the system scheduler.
232
233 Although CPU intensive work items don't contribute to the
234 concurrency level, start of their executions is still
235 regulated by the concurrency management and runnable
236 non-CPU-intensive work items can delay execution of CPU
237 intensive work items.
238
239 This flag is meaningless for unbound wq.
240
241 WQ_HIGHPRI | WQ_CPU_INTENSIVE
242
243 This combination makes the wq avoid interaction with
244 concurrency management completely and behave as a simple
245 per-CPU execution context provider. Work items queued on a
246 highpri CPU-intensive wq start execution as soon as resources
247 are available and don't affect execution of other work items.
248
249@max_active:
250
251@max_active determines the maximum number of execution contexts per
252CPU which can be assigned to the work items of a wq. For example,
253with @max_active of 16, at most 16 work items of the wq can be
254executing at the same time per CPU.
255
256Currently, for a bound wq, the maximum limit for @max_active is 512
257and the default value used when 0 is specified is 256. For an unbound
258wq, the limit is higher of 512 and 4 * num_possible_cpus(). These
259values are chosen sufficiently high such that they are not the
260limiting factor while providing protection in runaway cases.
261
262The number of active work items of a wq is usually regulated by the
263users of the wq, more specifically, by how many work items the users
264may queue at the same time. Unless there is a specific need for
265throttling the number of active work items, specifying '0' is
266recommended.
267
268Some users depend on the strict execution ordering of ST wq. The
269combination of @max_active of 1 and WQ_UNBOUND is used to achieve this
270behavior. Work items on such wq are always queued to the unbound gcwq
271and only one work item can be active at any given time thus achieving
272the same ordering property as ST wq.
273
274
2755. Example Execution Scenarios
276
277The following example execution scenarios try to illustrate how cmwq
278behave under different configurations.
279
280 Work items w0, w1, w2 are queued to a bound wq q0 on the same CPU.
281 w0 burns CPU for 5ms then sleeps for 10ms then burns CPU for 5ms
282 again before finishing. w1 and w2 burn CPU for 5ms then sleep for
283 10ms.
284
285Ignoring all other tasks, works and processing overhead, and assuming
286simple FIFO scheduling, the following is one highly simplified version
287of possible sequences of events with the original wq.
288
289 TIME IN MSECS EVENT
290 0 w0 starts and burns CPU
291 5 w0 sleeps
292 15 w0 wakes up and burns CPU
293 20 w0 finishes
294 20 w1 starts and burns CPU
295 25 w1 sleeps
296 35 w1 wakes up and finishes
297 35 w2 starts and burns CPU
298 40 w2 sleeps
299 50 w2 wakes up and finishes
300
301And with cmwq with @max_active >= 3,
302
303 TIME IN MSECS EVENT
304 0 w0 starts and burns CPU
305 5 w0 sleeps
306 5 w1 starts and burns CPU
307 10 w1 sleeps
308 10 w2 starts and burns CPU
309 15 w2 sleeps
310 15 w0 wakes up and burns CPU
311 20 w0 finishes
312 20 w1 wakes up and finishes
313 25 w2 wakes up and finishes
314
315If @max_active == 2,
316
317 TIME IN MSECS EVENT
318 0 w0 starts and burns CPU
319 5 w0 sleeps
320 5 w1 starts and burns CPU
321 10 w1 sleeps
322 15 w0 wakes up and burns CPU
323 20 w0 finishes
324 20 w1 wakes up and finishes
325 20 w2 starts and burns CPU
326 25 w2 sleeps
327 35 w2 wakes up and finishes
328
329Now, let's assume w1 and w2 are queued to a different wq q1 which has
330WQ_HIGHPRI set,
331
332 TIME IN MSECS EVENT
333 0 w1 and w2 start and burn CPU
334 5 w1 sleeps
335 10 w2 sleeps
336 10 w0 starts and burns CPU
337 15 w0 sleeps
338 15 w1 wakes up and finishes
339 20 w2 wakes up and finishes
340 25 w0 wakes up and burns CPU
341 30 w0 finishes
342
343If q1 has WQ_CPU_INTENSIVE set,
344
345 TIME IN MSECS EVENT
346 0 w0 starts and burns CPU
347 5 w0 sleeps
348 5 w1 and w2 start and burn CPU
349 10 w1 sleeps
350 15 w2 sleeps
351 15 w0 wakes up and burns CPU
352 20 w0 finishes
353 20 w1 wakes up and finishes
354 25 w2 wakes up and finishes
355
356
3576. Guidelines
358
359* Do not forget to use WQ_MEM_RECLAIM if a wq may process work items
360 which are used during memory reclaim. Each wq with WQ_MEM_RECLAIM
361 set has an execution context reserved for it. If there is
362 dependency among multiple work items used during memory reclaim,
363 they should be queued to separate wq each with WQ_MEM_RECLAIM.
364
365* Unless strict ordering is required, there is no need to use ST wq.
366
367* Unless there is a specific need, using 0 for @max_active is
368 recommended. In most use cases, concurrency level usually stays
369 well under the default limit.
370
371* A wq serves as a domain for forward progress guarantee
372 (WQ_MEM_RECLAIM, flush and work item attributes. Work items which
373 are not involved in memory reclaim and don't need to be flushed as a
374 part of a group of work items, and don't require any special
375 attribute, can use one of the system wq. There is no difference in
376 execution characteristics between using a dedicated wq and a system
377 wq.
378
379* Unless work items are expected to consume a huge amount of CPU
380 cycles, using a bound wq is usually beneficial due to the increased
381 level of locality in wq operations and work item execution.
diff --git a/Documentation/x86/x86_64/kernel-stacks b/Documentation/x86/x86_64/kernel-stacks
index 5ad65d51fb95..a01eec5d1d0b 100644
--- a/Documentation/x86/x86_64/kernel-stacks
+++ b/Documentation/x86/x86_64/kernel-stacks
@@ -18,9 +18,9 @@ specialized stacks contain no useful data. The main CPU stacks are:
18 Used for external hardware interrupts. If this is the first external 18 Used for external hardware interrupts. If this is the first external
19 hardware interrupt (i.e. not a nested hardware interrupt) then the 19 hardware interrupt (i.e. not a nested hardware interrupt) then the
20 kernel switches from the current task to the interrupt stack. Like 20 kernel switches from the current task to the interrupt stack. Like
21 the split thread and interrupt stacks on i386 (with CONFIG_4KSTACKS), 21 the split thread and interrupt stacks on i386, this gives more room
22 this gives more room for kernel interrupt processing without having 22 for kernel interrupt processing without having to increase the size
23 to increase the size of every per thread stack. 23 of every per thread stack.
24 24
25 The interrupt stack is also used when processing a softirq. 25 The interrupt stack is also used when processing a softirq.
26 26
diff --git a/Documentation/x86/zero-page.txt b/Documentation/x86/zero-page.txt
index feb37e177010..cf5437deda81 100644
--- a/Documentation/x86/zero-page.txt
+++ b/Documentation/x86/zero-page.txt
@@ -18,6 +18,7 @@ Offset Proto Name Meaning
18080/010 ALL hd0_info hd0 disk parameter, OBSOLETE!! 18080/010 ALL hd0_info hd0 disk parameter, OBSOLETE!!
19090/010 ALL hd1_info hd1 disk parameter, OBSOLETE!! 19090/010 ALL hd1_info hd1 disk parameter, OBSOLETE!!
200A0/010 ALL sys_desc_table System description table (struct sys_desc_table) 200A0/010 ALL sys_desc_table System description table (struct sys_desc_table)
210B0/010 ALL olpc_ofw_header OLPC's OpenFirmware CIF and friends
21140/080 ALL edid_info Video mode setup (struct edid_info) 22140/080 ALL edid_info Video mode setup (struct edid_info)
221C0/020 ALL efi_info EFI 32 information (struct efi_info) 231C0/020 ALL efi_info EFI 32 information (struct efi_info)
231E0/004 ALL alk_mem_k Alternative mem check, in KB 241E0/004 ALL alk_mem_k Alternative mem check, in KB
diff --git a/Documentation/zh_CN/HOWTO b/Documentation/zh_CN/HOWTO
index 3d80e8af36ec..69160779e432 100644
--- a/Documentation/zh_CN/HOWTO
+++ b/Documentation/zh_CN/HOWTO
@@ -112,7 +112,7 @@ Linux内核代码中包含有大量的文档。这些文档对于学习如何与
112 112
113 其他关于如何正确地生成补丁的优秀文档包括: 113 其他关于如何正确地生成补丁的优秀文档包括:
114 "The Perfect Patch" 114 "The Perfect Patch"
115 http://www.zip.com.au/~akpm/linux/patches/stuff/tpp.txt 115 http://userweb.kernel.org/~akpm/stuff/tpp.txt
116 "Linux kernel patch submission format" 116 "Linux kernel patch submission format"
117 http://linux.yyz.us/patch-format.html 117 http://linux.yyz.us/patch-format.html
118 118
@@ -168,7 +168,7 @@ Linux内核代码中包含有大量的文档。这些文档对于学习如何与
168 168
169如果你想加入内核开发社区并协助完成一些任务,却找不到从哪里开始,可以访问 169如果你想加入内核开发社区并协助完成一些任务,却找不到从哪里开始,可以访问
170“Linux内核房管员”计划: 170“Linux内核房管员”计划:
171 http://janitor.kernelnewbies.org/ 171 http://kernelnewbies.org/KernelJanitors
172这是极佳的起点。它提供一个相对简单的任务列表,列出内核代码中需要被重新 172这是极佳的起点。它提供一个相对简单的任务列表,列出内核代码中需要被重新
173整理或者改正的地方。通过和负责这个计划的开发者们一同工作,你会学到将补丁 173整理或者改正的地方。通过和负责这个计划的开发者们一同工作,你会学到将补丁
174集成进内核的基本原理。如果还没有决定下一步要做什么的话,你还可能会得到方 174集成进内核的基本原理。如果还没有决定下一步要做什么的话,你还可能会得到方
@@ -515,7 +515,7 @@ Linux内核社区并不喜欢一下接收大段的代码。修改需要被恰当
515 515
516想了解它具体应该看起来像什么,请查阅以下文档中的“ChangeLog”章节: 516想了解它具体应该看起来像什么,请查阅以下文档中的“ChangeLog”章节:
517 “The Perfect Patch” 517 “The Perfect Patch”
518 http://www.zip.com.au/~akpm/linux/patches/stuff/tpp.txt 518 http://userweb.kernel.org/~akpm/stuff/tpp.txt
519 519
520 520
521这些事情有时候做起来很难。要在任何方面都做到完美可能需要好几年时间。这是 521这些事情有时候做起来很难。要在任何方面都做到完美可能需要好几年时间。这是
@@ -525,7 +525,7 @@ Linux内核社区并不喜欢一下接收大段的代码。修改需要被恰当
525 525
526--------------- 526---------------
527感谢Paolo Ciarrocchi允许“开发流程”部分基于他所写的文章 527感谢Paolo Ciarrocchi允许“开发流程”部分基于他所写的文章
528(http://linux.tar.bz/articles/2.6-development_process),感谢Randy 528(http://www.kerneltravel.net/newbie/2.6-development_process),感谢Randy
529Dunlap和Gerrit Huizenga完善了应该说和不该说的列表。感谢Pat Mochel, Hanna 529Dunlap和Gerrit Huizenga完善了应该说和不该说的列表。感谢Pat Mochel, Hanna
530Linder, Randy Dunlap, Kay Sievers, Vojtech Pavlik, Jan Kara, Josh Boyer, 530Linder, Randy Dunlap, Kay Sievers, Vojtech Pavlik, Jan Kara, Josh Boyer,
531Kees Cook, Andrew Morton, Andi Kleen, Vadim Lobanov, Jesper Juhl, Adrian 531Kees Cook, Andrew Morton, Andi Kleen, Vadim Lobanov, Jesper Juhl, Adrian
diff --git a/Documentation/zh_CN/SubmittingDrivers b/Documentation/zh_CN/SubmittingDrivers
index 5f4815c63ec7..c27b0f6cdd39 100644
--- a/Documentation/zh_CN/SubmittingDrivers
+++ b/Documentation/zh_CN/SubmittingDrivers
@@ -165,4 +165,4 @@ Linux USB项目:
165 http://www.fenrus.org/how-to-not-write-a-device-driver-paper.pdf 165 http://www.fenrus.org/how-to-not-write-a-device-driver-paper.pdf
166 166
167内核清洁工 (Kernel Janitor): 167内核清洁工 (Kernel Janitor):
168 http://janitor.kernelnewbies.org/ 168 http://kernelnewbies.org/KernelJanitors
diff --git a/Documentation/zh_CN/SubmittingPatches b/Documentation/zh_CN/SubmittingPatches
index 985c92e20b73..9a1a6e1ed09e 100644
--- a/Documentation/zh_CN/SubmittingPatches
+++ b/Documentation/zh_CN/SubmittingPatches
@@ -83,7 +83,7 @@ Quilt:
83http://savannah.nongnu.org/projects/quilt 83http://savannah.nongnu.org/projects/quilt
84 84
85Andrew Morton 的补丁脚本: 85Andrew Morton 的补丁脚本:
86http://www.zip.com.au/~akpm/linux/patches/ 86http://userweb.kernel.org/~akpm/stuff/patch-scripts.tar.gz
87作为这些脚本的替代,quilt 是值得推荐的补丁管理工具(看上面的链接)。 87作为这些脚本的替代,quilt 是值得推荐的补丁管理工具(看上面的链接)。
88 88
892)描述你的改动。 892)描述你的改动。
@@ -166,7 +166,7 @@ MAITAINERS 文件里的)发送一个手册页(man-pages)补丁,或者至
166 人拷贝,只要它是琐碎的) 166 人拷贝,只要它是琐碎的)
167 任何文件的作者/维护者对该文件的改动(例如 patch monkey 在重传模式下) 167 任何文件的作者/维护者对该文件的改动(例如 patch monkey 在重传模式下)
168 168
169URL: <http://www.kernel.org/pub/linux/kernel/people/bunk/trivial/> 169EMAIL: trivial@kernel.org
170 170
171(译注,关于“琐碎补丁”的一些说明:因为原文的这一部分写得比较简单,所以不得不 171(译注,关于“琐碎补丁”的一些说明:因为原文的这一部分写得比较简单,所以不得不
172违例写一下译注。"trivial"这个英文单词的本意是“琐碎的,不重要的。”但是在这里 172违例写一下译注。"trivial"这个英文单词的本意是“琐碎的,不重要的。”但是在这里
@@ -394,7 +394,7 @@ Static inline 函数相比宏来说,是好得多的选择。Static inline 函
394---------------- 394----------------
395 395
396Andrew Morton, "The perfect patch" (tpp). 396Andrew Morton, "The perfect patch" (tpp).
397 <http://www.zip.com.au/~akpm/linux/patches/stuff/tpp.txt> 397 <http://userweb.kernel.org/~akpm/stuff/tpp.txt>
398 398
399Jeff Garzik, "Linux kernel patch submission format". 399Jeff Garzik, "Linux kernel patch submission format".
400 <http://linux.yyz.us/patch-format.html> 400 <http://linux.yyz.us/patch-format.html>
diff --git a/Documentation/zh_CN/sparse.txt b/Documentation/zh_CN/sparse.txt
index 75992a603ae3..cc144e581515 100644
--- a/Documentation/zh_CN/sparse.txt
+++ b/Documentation/zh_CN/sparse.txt
@@ -22,7 +22,7 @@ Documentation/sparse.txt 的中文翻译
22--------------------------------------------------------------------- 22---------------------------------------------------------------------
23 23
24Copyright 2004 Linus Torvalds 24Copyright 2004 Linus Torvalds
25Copyright 2004 Pavel Machek <pavel@suse.cz> 25Copyright 2004 Pavel Machek <pavel@ucw.cz>
26Copyright 2006 Bob Copeland <me@bobcopeland.com> 26Copyright 2006 Bob Copeland <me@bobcopeland.com>
27 27
28使用 sparse 工具做类型检查 28使用 sparse 工具做类型检查