aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation
diff options
context:
space:
mode:
Diffstat (limited to 'Documentation')
-rw-r--r--Documentation/Changes4
-rw-r--r--Documentation/CodingStyle18
-rw-r--r--Documentation/DMA-API.txt2
-rw-r--r--Documentation/DocBook/uio-howto.tmpl88
-rw-r--r--Documentation/IO-mapping.txt4
-rw-r--r--Documentation/block/biodoc.txt11
-rw-r--r--Documentation/block/queue-sysfs.txt63
-rw-r--r--Documentation/cgroups/memcg_test.txt24
-rw-r--r--Documentation/filesystems/proc.txt28
-rw-r--r--Documentation/ja_JP/stable_kernel_rules.txt15
-rw-r--r--Documentation/kernel-parameters.txt2
-rw-r--r--Documentation/lguest/Makefile2
-rw-r--r--Documentation/networking/alias.txt25
-rw-r--r--Documentation/powerpc/dts-bindings/fsl/mpc5200.txt180
-rw-r--r--Documentation/powerpc/mpc52xx-device-tree-bindings.txt277
-rw-r--r--Documentation/usb/dma.txt11
-rw-r--r--Documentation/video4linux/v4lgrab.c25
17 files changed, 448 insertions, 331 deletions
diff --git a/Documentation/Changes b/Documentation/Changes
index cb2b141b1c3e..b95082be4d5e 100644
--- a/Documentation/Changes
+++ b/Documentation/Changes
@@ -33,10 +33,12 @@ o Gnu make 3.79.1 # make --version
33o binutils 2.12 # ld -v 33o binutils 2.12 # ld -v
34o util-linux 2.10o # fdformat --version 34o util-linux 2.10o # fdformat --version
35o module-init-tools 0.9.10 # depmod -V 35o module-init-tools 0.9.10 # depmod -V
36o e2fsprogs 1.29 # tune2fs 36o e2fsprogs 1.41.4 # e2fsck -V
37o jfsutils 1.1.3 # fsck.jfs -V 37o jfsutils 1.1.3 # fsck.jfs -V
38o reiserfsprogs 3.6.3 # reiserfsck -V 2>&1|grep reiserfsprogs 38o reiserfsprogs 3.6.3 # reiserfsck -V 2>&1|grep reiserfsprogs
39o xfsprogs 2.6.0 # xfs_db -V 39o xfsprogs 2.6.0 # xfs_db -V
40o squashfs-tools 4.0 # mksquashfs -version
41o btrfs-progs 0.18 # btrfsck
40o pcmciautils 004 # pccardctl -V 42o pcmciautils 004 # pccardctl -V
41o quota-tools 3.09 # quota -V 43o quota-tools 3.09 # quota -V
42o PPP 2.4.0 # pppd --version 44o PPP 2.4.0 # pppd --version
diff --git a/Documentation/CodingStyle b/Documentation/CodingStyle
index 1875e502f872..72968cd5eaf3 100644
--- a/Documentation/CodingStyle
+++ b/Documentation/CodingStyle
@@ -483,17 +483,25 @@ values. To do the latter, you can stick the following in your .emacs file:
483 (* (max steps 1) 483 (* (max steps 1)
484 c-basic-offset))) 484 c-basic-offset)))
485 485
486(add-hook 'c-mode-common-hook
487 (lambda ()
488 ;; Add kernel style
489 (c-add-style
490 "linux-tabs-only"
491 '("linux" (c-offsets-alist
492 (arglist-cont-nonempty
493 c-lineup-gcc-asm-reg
494 c-lineup-arglist-tabs-only))))))
495
486(add-hook 'c-mode-hook 496(add-hook 'c-mode-hook
487 (lambda () 497 (lambda ()
488 (let ((filename (buffer-file-name))) 498 (let ((filename (buffer-file-name)))
489 ;; Enable kernel mode for the appropriate files 499 ;; Enable kernel mode for the appropriate files
490 (when (and filename 500 (when (and filename
491 (string-match "~/src/linux-trees" filename)) 501 (string-match (expand-file-name "~/src/linux-trees")
502 filename))
492 (setq indent-tabs-mode t) 503 (setq indent-tabs-mode t)
493 (c-set-style "linux") 504 (c-set-style "linux-tabs-only")))))
494 (c-set-offset 'arglist-cont-nonempty
495 '(c-lineup-gcc-asm-reg
496 c-lineup-arglist-tabs-only))))))
497 505
498This will make emacs go better with the kernel coding style for C 506This will make emacs go better with the kernel coding style for C
499files below ~/src/linux-trees. 507files below ~/src/linux-trees.
diff --git a/Documentation/DMA-API.txt b/Documentation/DMA-API.txt
index 52441694fe03..2a3fcc55e981 100644
--- a/Documentation/DMA-API.txt
+++ b/Documentation/DMA-API.txt
@@ -5,7 +5,7 @@
5 5
6This document describes the DMA API. For a more gentle introduction 6This document describes the DMA API. For a more gentle introduction
7phrased in terms of the pci_ equivalents (and actual examples) see 7phrased in terms of the pci_ equivalents (and actual examples) see
8DMA-mapping.txt 8Documentation/PCI/PCI-DMA-mapping.txt.
9 9
10This API is split into two pieces. Part I describes the API and the 10This API is split into two pieces. Part I describes the API and the
11corresponding pci_ API. Part II describes the extensions to the API 11corresponding pci_ API. Part II describes the extensions to the API
diff --git a/Documentation/DocBook/uio-howto.tmpl b/Documentation/DocBook/uio-howto.tmpl
index b787e4721c90..52e1b79ce0e6 100644
--- a/Documentation/DocBook/uio-howto.tmpl
+++ b/Documentation/DocBook/uio-howto.tmpl
@@ -42,6 +42,12 @@ GPL version 2.
42 42
43<revhistory> 43<revhistory>
44 <revision> 44 <revision>
45 <revnumber>0.7</revnumber>
46 <date>2008-12-23</date>
47 <authorinitials>hjk</authorinitials>
48 <revremark>Added generic platform drivers and offset attribute.</revremark>
49 </revision>
50 <revision>
45 <revnumber>0.6</revnumber> 51 <revnumber>0.6</revnumber>
46 <date>2008-12-05</date> 52 <date>2008-12-05</date>
47 <authorinitials>hjk</authorinitials> 53 <authorinitials>hjk</authorinitials>
@@ -312,6 +318,16 @@ interested in translating it, please email me
312 pointed to by addr. 318 pointed to by addr.
313 </para> 319 </para>
314</listitem> 320</listitem>
321<listitem>
322 <para>
323 <filename>offset</filename>: The offset, in bytes, that has to be
324 added to the pointer returned by <function>mmap()</function> to get
325 to the actual device memory. This is important if the device's memory
326 is not page aligned. Remember that pointers returned by
327 <function>mmap()</function> are always page aligned, so it is good
328 style to always add this offset.
329 </para>
330</listitem>
315</itemizedlist> 331</itemizedlist>
316 332
317<para> 333<para>
@@ -594,6 +610,78 @@ framework to set up sysfs files for this region. Simply leave it alone.
594 </para> 610 </para>
595</sect1> 611</sect1>
596 612
613<sect1 id="using_uio_pdrv">
614<title>Using uio_pdrv for platform devices</title>
615 <para>
616 In many cases, UIO drivers for platform devices can be handled in a
617 generic way. In the same place where you define your
618 <varname>struct platform_device</varname>, you simply also implement
619 your interrupt handler and fill your
620 <varname>struct uio_info</varname>. A pointer to this
621 <varname>struct uio_info</varname> is then used as
622 <varname>platform_data</varname> for your platform device.
623 </para>
624 <para>
625 You also need to set up an array of <varname>struct resource</varname>
626 containing addresses and sizes of your memory mappings. This
627 information is passed to the driver using the
628 <varname>.resource</varname> and <varname>.num_resources</varname>
629 elements of <varname>struct platform_device</varname>.
630 </para>
631 <para>
632 You now have to set the <varname>.name</varname> element of
633 <varname>struct platform_device</varname> to
634 <varname>"uio_pdrv"</varname> to use the generic UIO platform device
635 driver. This driver will fill the <varname>mem[]</varname> array
636 according to the resources given, and register the device.
637 </para>
638 <para>
639 The advantage of this approach is that you only have to edit a file
640 you need to edit anyway. You do not have to create an extra driver.
641 </para>
642</sect1>
643
644<sect1 id="using_uio_pdrv_genirq">
645<title>Using uio_pdrv_genirq for platform devices</title>
646 <para>
647 Especially in embedded devices, you frequently find chips where the
648 irq pin is tied to its own dedicated interrupt line. In such cases,
649 where you can be really sure the interrupt is not shared, we can take
650 the concept of <varname>uio_pdrv</varname> one step further and use a
651 generic interrupt handler. That's what
652 <varname>uio_pdrv_genirq</varname> does.
653 </para>
654 <para>
655 The setup for this driver is the same as described above for
656 <varname>uio_pdrv</varname>, except that you do not implement an
657 interrupt handler. The <varname>.handler</varname> element of
658 <varname>struct uio_info</varname> must remain
659 <varname>NULL</varname>. The <varname>.irq_flags</varname> element
660 must not contain <varname>IRQF_SHARED</varname>.
661 </para>
662 <para>
663 You will set the <varname>.name</varname> element of
664 <varname>struct platform_device</varname> to
665 <varname>"uio_pdrv_genirq"</varname> to use this driver.
666 </para>
667 <para>
668 The generic interrupt handler of <varname>uio_pdrv_genirq</varname>
669 will simply disable the interrupt line using
670 <function>disable_irq_nosync()</function>. After doing its work,
671 userspace can reenable the interrupt by writing 0x00000001 to the UIO
672 device file. The driver already implements an
673 <function>irq_control()</function> to make this possible, you must not
674 implement your own.
675 </para>
676 <para>
677 Using <varname>uio_pdrv_genirq</varname> not only saves a few lines of
678 interrupt handler code. You also do not need to know anything about
679 the chip's internal registers to create the kernel part of the driver.
680 All you need to know is the irq number of the pin the chip is
681 connected to.
682 </para>
683</sect1>
684
597</chapter> 685</chapter>
598 686
599<chapter id="userspace_driver" xreflabel="Writing a driver in user space"> 687<chapter id="userspace_driver" xreflabel="Writing a driver in user space">
diff --git a/Documentation/IO-mapping.txt b/Documentation/IO-mapping.txt
index 86edb61bdee6..78a440695e11 100644
--- a/Documentation/IO-mapping.txt
+++ b/Documentation/IO-mapping.txt
@@ -1,6 +1,6 @@
1[ NOTE: The virt_to_bus() and bus_to_virt() functions have been 1[ NOTE: The virt_to_bus() and bus_to_virt() functions have been
2 superseded by the functionality provided by the PCI DMA 2 superseded by the functionality provided by the PCI DMA interface
3 interface (see Documentation/DMA-mapping.txt). They continue 3 (see Documentation/PCI/PCI-DMA-mapping.txt). They continue
4 to be documented below for historical purposes, but new code 4 to be documented below for historical purposes, but new code
5 must not use them. --davidm 00/12/12 ] 5 must not use them. --davidm 00/12/12 ]
6 6
diff --git a/Documentation/block/biodoc.txt b/Documentation/block/biodoc.txt
index 3c5434c83daf..ecad6ee75705 100644
--- a/Documentation/block/biodoc.txt
+++ b/Documentation/block/biodoc.txt
@@ -186,8 +186,9 @@ a virtual address mapping (unlike the earlier scheme of virtual address
186do not have a corresponding kernel virtual address space mapping) and 186do not have a corresponding kernel virtual address space mapping) and
187low-memory pages. 187low-memory pages.
188 188
189Note: Please refer to DMA-mapping.txt for a discussion on PCI high mem DMA 189Note: Please refer to Documentation/PCI/PCI-DMA-mapping.txt for a discussion
190aspects and mapping of scatter gather lists, and support for 64 bit PCI. 190on PCI high mem DMA aspects and mapping of scatter gather lists, and support
191for 64 bit PCI.
191 192
192Special handling is required only for cases where i/o needs to happen on 193Special handling is required only for cases where i/o needs to happen on
193pages at physical memory addresses beyond what the device can support. In these 194pages at physical memory addresses beyond what the device can support. In these
@@ -953,14 +954,14 @@ elevator_allow_merge_fn called whenever the block layer determines
953 results in some sort of conflict internally, 954 results in some sort of conflict internally,
954 this hook allows it to do that. 955 this hook allows it to do that.
955 956
956elevator_dispatch_fn fills the dispatch queue with ready requests. 957elevator_dispatch_fn* fills the dispatch queue with ready requests.
957 I/O schedulers are free to postpone requests by 958 I/O schedulers are free to postpone requests by
958 not filling the dispatch queue unless @force 959 not filling the dispatch queue unless @force
959 is non-zero. Once dispatched, I/O schedulers 960 is non-zero. Once dispatched, I/O schedulers
960 are not allowed to manipulate the requests - 961 are not allowed to manipulate the requests -
961 they belong to generic dispatch queue. 962 they belong to generic dispatch queue.
962 963
963elevator_add_req_fn called to add a new request into the scheduler 964elevator_add_req_fn* called to add a new request into the scheduler
964 965
965elevator_queue_empty_fn returns true if the merge queue is empty. 966elevator_queue_empty_fn returns true if the merge queue is empty.
966 Drivers shouldn't use this, but rather check 967 Drivers shouldn't use this, but rather check
@@ -990,7 +991,7 @@ elevator_activate_req_fn Called when device driver first sees a request.
990elevator_deactivate_req_fn Called when device driver decides to delay 991elevator_deactivate_req_fn Called when device driver decides to delay
991 a request by requeueing it. 992 a request by requeueing it.
992 993
993elevator_init_fn 994elevator_init_fn*
994elevator_exit_fn Allocate and free any elevator specific storage 995elevator_exit_fn Allocate and free any elevator specific storage
995 for a queue. 996 for a queue.
996 997
diff --git a/Documentation/block/queue-sysfs.txt b/Documentation/block/queue-sysfs.txt
new file mode 100644
index 000000000000..e164403f60e1
--- /dev/null
+++ b/Documentation/block/queue-sysfs.txt
@@ -0,0 +1,63 @@
1Queue sysfs files
2=================
3
4This text file will detail the queue files that are located in the sysfs tree
5for each block device. Note that stacked devices typically do not export
6any settings, since their queue merely functions are a remapping target.
7These files are the ones found in the /sys/block/xxx/queue/ directory.
8
9Files denoted with a RO postfix are readonly and the RW postfix means
10read-write.
11
12hw_sector_size (RO)
13-------------------
14This is the hardware sector size of the device, in bytes.
15
16max_hw_sectors_kb (RO)
17----------------------
18This is the maximum number of kilobytes supported in a single data transfer.
19
20max_sectors_kb (RW)
21-------------------
22This is the maximum number of kilobytes that the block layer will allow
23for a filesystem request. Must be smaller than or equal to the maximum
24size allowed by the hardware.
25
26nomerges (RW)
27-------------
28This enables the user to disable the lookup logic involved with IO merging
29requests in the block layer. Merging may still occur through a direct
301-hit cache, since that comes for (almost) free. The IO scheduler will not
31waste cycles doing tree/hash lookups for merges if nomerges is 1. Defaults
32to 0, enabling all merges.
33
34nr_requests (RW)
35----------------
36This controls how many requests may be allocated in the block layer for
37read or write requests. Note that the total allocated number may be twice
38this amount, since it applies only to reads or writes (not the accumulated
39sum).
40
41read_ahead_kb (RW)
42------------------
43Maximum number of kilobytes to read-ahead for filesystems on this block
44device.
45
46rq_affinity (RW)
47----------------
48If this option is enabled, the block layer will migrate request completions
49to the CPU that originally submitted the request. For some workloads
50this provides a significant reduction in CPU cycles due to caching effects.
51
52scheduler (RW)
53--------------
54When read, this file will display the current and available IO schedulers
55for this block device. The currently active IO scheduler will be enclosed
56in [] brackets. Writing an IO scheduler name to this file will switch
57control of this block device to that new IO scheduler. Note that writing
58an IO scheduler name to this file will attempt to load that IO scheduler
59module, if it isn't already present in the system.
60
61
62
63Jens Axboe <jens.axboe@oracle.com>, February 2009
diff --git a/Documentation/cgroups/memcg_test.txt b/Documentation/cgroups/memcg_test.txt
index 19533f93b7a2..523a9c16c400 100644
--- a/Documentation/cgroups/memcg_test.txt
+++ b/Documentation/cgroups/memcg_test.txt
@@ -1,6 +1,6 @@
1Memory Resource Controller(Memcg) Implementation Memo. 1Memory Resource Controller(Memcg) Implementation Memo.
2Last Updated: 2008/12/15 2Last Updated: 2009/1/19
3Base Kernel Version: based on 2.6.28-rc8-mm. 3Base Kernel Version: based on 2.6.29-rc2.
4 4
5Because VM is getting complex (one of reasons is memcg...), memcg's behavior 5Because VM is getting complex (one of reasons is memcg...), memcg's behavior
6is complex. This is a document for memcg's internal behavior. 6is complex. This is a document for memcg's internal behavior.
@@ -340,3 +340,23 @@ Under below explanation, we assume CONFIG_MEM_RES_CTRL_SWAP=y.
340 # mount -t cgroup none /cgroup -t cpuset,memory,cpu,devices 340 # mount -t cgroup none /cgroup -t cpuset,memory,cpu,devices
341 341
342 and do task move, mkdir, rmdir etc...under this. 342 and do task move, mkdir, rmdir etc...under this.
343
344 9.7 swapoff.
345 Besides management of swap is one of complicated parts of memcg,
346 call path of swap-in at swapoff is not same as usual swap-in path..
347 It's worth to be tested explicitly.
348
349 For example, test like following is good.
350 (Shell-A)
351 # mount -t cgroup none /cgroup -t memory
352 # mkdir /cgroup/test
353 # echo 40M > /cgroup/test/memory.limit_in_bytes
354 # echo 0 > /cgroup/test/tasks
355 Run malloc(100M) program under this. You'll see 60M of swaps.
356 (Shell-B)
357 # move all tasks in /cgroup/test to /cgroup
358 # /sbin/swapoff -a
359 # rmdir /test/cgroup
360 # kill malloc task.
361
362 Of course, tmpfs v.s. swapoff test should be tested, too.
diff --git a/Documentation/filesystems/proc.txt b/Documentation/filesystems/proc.txt
index bbebc3a43ac0..a87be42f8211 100644
--- a/Documentation/filesystems/proc.txt
+++ b/Documentation/filesystems/proc.txt
@@ -2027,6 +2027,34 @@ increase the likelihood of this process being killed by the oom-killer. Valid
2027values are in the range -16 to +15, plus the special value -17, which disables 2027values are in the range -16 to +15, plus the special value -17, which disables
2028oom-killing altogether for this process. 2028oom-killing altogether for this process.
2029 2029
2030The process to be killed in an out-of-memory situation is selected among all others
2031based on its badness score. This value equals the original memory size of the process
2032and is then updated according to its CPU time (utime + stime) and the
2033run time (uptime - start time). The longer it runs the smaller is the score.
2034Badness score is divided by the square root of the CPU time and then by
2035the double square root of the run time.
2036
2037Swapped out tasks are killed first. Half of each child's memory size is added to
2038the parent's score if they do not share the same memory. Thus forking servers
2039are the prime candidates to be killed. Having only one 'hungry' child will make
2040parent less preferable than the child.
2041
2042/proc/<pid>/oom_score shows process' current badness score.
2043
2044The following heuristics are then applied:
2045 * if the task was reniced, its score doubles
2046 * superuser or direct hardware access tasks (CAP_SYS_ADMIN, CAP_SYS_RESOURCE
2047 or CAP_SYS_RAWIO) have their score divided by 4
2048 * if oom condition happened in one cpuset and checked task does not belong
2049 to it, its score is divided by 8
2050 * the resulting score is multiplied by two to the power of oom_adj, i.e.
2051 points <<= oom_adj when it is positive and
2052 points >>= -(oom_adj) otherwise
2053
2054The task with the highest badness score is then selected and its children
2055are killed, process itself will be killed in an OOM situation when it does
2056not have children or some of them disabled oom like described above.
2057
20302.13 /proc/<pid>/oom_score - Display current oom-killer score 20582.13 /proc/<pid>/oom_score - Display current oom-killer score
2031------------------------------------------------------------- 2059-------------------------------------------------------------
2032 2060
diff --git a/Documentation/ja_JP/stable_kernel_rules.txt b/Documentation/ja_JP/stable_kernel_rules.txt
index b3ffe870de33..14265837c4ce 100644
--- a/Documentation/ja_JP/stable_kernel_rules.txt
+++ b/Documentation/ja_JP/stable_kernel_rules.txt
@@ -12,11 +12,11 @@ file at first.
12 12
13================================== 13==================================
14これは、 14これは、
15linux-2.6.24/Documentation/stable_kernel_rules.txt 15linux-2.6.29/Documentation/stable_kernel_rules.txt
16の和訳です。 16の和訳です。
17 17
18翻訳団体: JF プロジェクト < http://www.linux.or.jp/JF/ > 18翻訳団体: JF プロジェクト < http://www.linux.or.jp/JF/ >
19翻訳日: 2007/12/30 19翻訳日: 2009/1/14
20翻訳者: Tsugikazu Shibata <tshibata at ab dot jp dot nec dot com> 20翻訳者: Tsugikazu Shibata <tshibata at ab dot jp dot nec dot com>
21校正者: 武井伸光さん、<takei at webmasters dot gr dot jp> 21校正者: 武井伸光さん、<takei at webmasters dot gr dot jp>
22 かねこさん (Seiji Kaneko) <skaneko at a2 dot mbn dot or dot jp> 22 かねこさん (Seiji Kaneko) <skaneko at a2 dot mbn dot or dot jp>
@@ -38,12 +38,15 @@ linux-2.6.24/Documentation/stable_kernel_rules.txt
38 - ビルドエラー(CONFIG_BROKENになっているものを除く), oops, ハング、デー 38 - ビルドエラー(CONFIG_BROKENになっているものを除く), oops, ハング、デー
39 タ破壊、現実のセキュリティ問題、その他 "ああ、これはダメだね"という 39 タ破壊、現実のセキュリティ問題、その他 "ああ、これはダメだね"という
40 ようなものを修正しなければならない。短く言えば、重大な問題。 40 ようなものを修正しなければならない。短く言えば、重大な問題。
41 - 新しい device ID とクオークも受け入れられる。
41 - どのように競合状態が発生するかの説明も一緒に書かれていない限り、 42 - どのように競合状態が発生するかの説明も一緒に書かれていない限り、
42 "理論的には競合状態になる"ようなものは不可。 43 "理論的には競合状態になる"ようなものは不可。
43 - いかなる些細な修正も含めることはできない。(スペルの修正、空白のクリー 44 - いかなる些細な修正も含めることはできない。(スペルの修正、空白のクリー
44 ンアップなど) 45 ンアップなど)
45 - 対応するサブシステムメンテナが受け入れたものでなければならない。
46 - Documentation/SubmittingPatches の規則に従ったものでなければならない。 46 - Documentation/SubmittingPatches の規則に従ったものでなければならない。
47 - パッチ自体か同等の修正が Linus のツリーに既に存在しなければならない。
48  Linus のツリーでのコミットID を -stable へのパッチ投稿の際に引用す
49 ること。
47 50
48-stable ツリーにパッチを送付する手続き- 51-stable ツリーにパッチを送付する手続き-
49 52
@@ -52,8 +55,10 @@ linux-2.6.24/Documentation/stable_kernel_rules.txt
52 - 送信者はパッチがキューに受け付けられた際には ACK を、却下された場合 55 - 送信者はパッチがキューに受け付けられた際には ACK を、却下された場合
53 には NAK を受け取る。この反応は開発者たちのスケジュールによって、数 56 には NAK を受け取る。この反応は開発者たちのスケジュールによって、数
54 日かかる場合がある。 57 日かかる場合がある。
55 - もし受け取られたら、パッチは他の開発者たちのレビューのために 58 - もし受け取られたら、パッチは他の開発者たちと関連するサブシステムの
56 -stable キューに追加される。 59 メンテナーによるレビューのために -stable キューに追加される。
60 - パッチに stable@kernel.org のアドレスが付加されているときには、それ
61 が Linus のツリーに入る時に自動的に stable チームに email される。
57 - セキュリティパッチはこのエイリアス (stable@kernel.org) に送られるべ 62 - セキュリティパッチはこのエイリアス (stable@kernel.org) に送られるべ
58 きではなく、代わりに security@kernel.org のアドレスに送られる。 63 きではなく、代わりに security@kernel.org のアドレスに送られる。
59 64
diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt
index d8362cf9909e..b182626739ea 100644
--- a/Documentation/kernel-parameters.txt
+++ b/Documentation/kernel-parameters.txt
@@ -937,6 +937,8 @@ and is between 256 and 4096 characters. It is defined in the file
937 937
938 938
939 intel_iommu= [DMAR] Intel IOMMU driver (DMAR) option 939 intel_iommu= [DMAR] Intel IOMMU driver (DMAR) option
940 on
941 Enable intel iommu driver.
940 off 942 off
941 Disable intel iommu driver. 943 Disable intel iommu driver.
942 igfx_off [Default Off] 944 igfx_off [Default Off]
diff --git a/Documentation/lguest/Makefile b/Documentation/lguest/Makefile
index 725eef81cd48..1f4f9e888bd1 100644
--- a/Documentation/lguest/Makefile
+++ b/Documentation/lguest/Makefile
@@ -1,5 +1,5 @@
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:=-Wall -Wmissing-declarations -Wmissing-prototypes -O3 -I../../include -I../../arch/x86/include 2CFLAGS:=-Wall -Wmissing-declarations -Wmissing-prototypes -O3 -I../../include -I../../arch/x86/include -U_FORTIFY_SOURCE
3LDLIBS:=-lz 3LDLIBS:=-lz
4 4
5all: lguest 5all: lguest
diff --git a/Documentation/networking/alias.txt b/Documentation/networking/alias.txt
index cd12c2ff518a..85046f53fcfc 100644
--- a/Documentation/networking/alias.txt
+++ b/Documentation/networking/alias.txt
@@ -2,13 +2,13 @@
2IP-Aliasing: 2IP-Aliasing:
3============ 3============
4 4
5IP-aliases are additional IP-addresses/masks hooked up to a base 5IP-aliases are an obsolete way to manage multiple IP-addresses/masks
6interface by adding a colon and a string when running ifconfig. 6per interface. Newer tools such as iproute2 support multiple
7This string is usually numeric, but this is not a must. 7address/prefixes per interface, but aliases are still supported
8 8for backwards compatibility.
9IP-Aliases are avail if CONFIG_INET (`standard' IPv4 networking)
10is configured in the kernel.
11 9
10An alias is formed by adding a colon and a string when running ifconfig.
11This string is usually numeric, but this is not a must.
12 12
13o Alias creation. 13o Alias creation.
14 Alias creation is done by 'magic' interface naming: eg. to create a 14 Alias creation is done by 'magic' interface naming: eg. to create a
@@ -38,16 +38,3 @@ o Relationship with main device
38 38
39 If the base device is shut down the added aliases will be deleted 39 If the base device is shut down the added aliases will be deleted
40 too. 40 too.
41
42
43Contact
44-------
45Please finger or e-mail me:
46 Juan Jose Ciarlante <jjciarla@raiz.uncu.edu.ar>
47
48Updated by Erik Schoenfelder <schoenfr@gaertner.DE>
49
50; local variables:
51; mode: indented-text
52; mode: auto-fill
53; end:
diff --git a/Documentation/powerpc/dts-bindings/fsl/mpc5200.txt b/Documentation/powerpc/dts-bindings/fsl/mpc5200.txt
new file mode 100644
index 000000000000..8447fd7090d0
--- /dev/null
+++ b/Documentation/powerpc/dts-bindings/fsl/mpc5200.txt
@@ -0,0 +1,180 @@
1MPC5200 Device Tree Bindings
2----------------------------
3
4(c) 2006-2009 Secret Lab Technologies Ltd
5Grant Likely <grant.likely@secretlab.ca>
6
7Naming conventions
8------------------
9For mpc5200 on-chip devices, the format for each compatible value is
10<chip>-<device>[-<mode>]. The OS should be able to match a device driver
11to the device based solely on the compatible value. If two drivers
12match on the compatible list; the 'most compatible' driver should be
13selected.
14
15The split between the MPC5200 and the MPC5200B leaves a bit of a
16conundrum. How should the compatible property be set up to provide
17maximum compatibility information; but still accurately describe the
18chip? For the MPC5200; the answer is easy. Most of the SoC devices
19originally appeared on the MPC5200. Since they didn't exist anywhere
20else; the 5200 compatible properties will contain only one item;
21"fsl,mpc5200-<device>".
22
23The 5200B is almost the same as the 5200, but not quite. It fixes
24silicon bugs and it adds a small number of enhancements. Most of the
25devices either provide exactly the same interface as on the 5200. A few
26devices have extra functions but still have a backwards compatible mode.
27To express this information as completely as possible, 5200B device trees
28should have two items in the compatible list:
29 compatible = "fsl,mpc5200b-<device>","fsl,mpc5200-<device>";
30
31It is *strongly* recommended that 5200B device trees follow this convention
32(instead of only listing the base mpc5200 item).
33
34ie. ethernet on mpc5200: compatible = "fsl,mpc5200-fec";
35 ethernet on mpc5200b: compatible = "fsl,mpc5200b-fec", "fsl,mpc5200-fec";
36
37Modal devices, like PSCs, also append the configured function to the
38end of the compatible field. ie. A PSC in i2s mode would specify
39"fsl,mpc5200-psc-i2s", not "fsl,mpc5200-i2s". This convention is chosen to
40avoid naming conflicts with non-psc devices providing the same
41function. For example, "fsl,mpc5200-spi" and "fsl,mpc5200-psc-spi" describe
42the mpc5200 simple spi device and a PSC spi mode respectively.
43
44At the time of writing, exact chip may be either 'fsl,mpc5200' or
45'fsl,mpc5200b'.
46
47The soc node
48------------
49This node describes the on chip SOC peripherals. Every mpc5200 based
50board will have this node, and as such there is a common naming
51convention for SOC devices.
52
53Required properties:
54name description
55---- -----------
56ranges Memory range of the internal memory mapped registers.
57 Should be <0 [baseaddr] 0xc000>
58reg Should be <[baseaddr] 0x100>
59compatible mpc5200: "fsl,mpc5200-immr"
60 mpc5200b: "fsl,mpc5200b-immr"
61system-frequency 'fsystem' frequency in Hz; XLB, IPB, USB and PCI
62 clocks are derived from the fsystem clock.
63bus-frequency IPB bus frequency in Hz. Clock rate
64 used by most of the soc devices.
65
66soc child nodes
67---------------
68Any on chip SOC devices available to Linux must appear as soc5200 child nodes.
69
70Note: The tables below show the value for the mpc5200. A mpc5200b device
71tree should use the "fsl,mpc5200b-<device>","fsl,mpc5200-<device>" form.
72
73Required soc5200 child nodes:
74name compatible Description
75---- ---------- -----------
76cdm@<addr> fsl,mpc5200-cdm Clock Distribution
77interrupt-controller@<addr> fsl,mpc5200-pic need an interrupt
78 controller to boot
79bestcomm@<addr> fsl,mpc5200-bestcomm Bestcomm DMA controller
80
81Recommended soc5200 child nodes; populate as needed for your board
82name compatible Description
83---- ---------- -----------
84timer@<addr> fsl,mpc5200-gpt General purpose timers
85gpio@<addr> fsl,mpc5200-gpio MPC5200 simple gpio controller
86gpio@<addr> fsl,mpc5200-gpio-wkup MPC5200 wakeup gpio controller
87rtc@<addr> fsl,mpc5200-rtc Real time clock
88mscan@<addr> fsl,mpc5200-mscan CAN bus controller
89pci@<addr> fsl,mpc5200-pci PCI bridge
90serial@<addr> fsl,mpc5200-psc-uart PSC in serial mode
91i2s@<addr> fsl,mpc5200-psc-i2s PSC in i2s mode
92ac97@<addr> fsl,mpc5200-psc-ac97 PSC in ac97 mode
93spi@<addr> fsl,mpc5200-psc-spi PSC in spi mode
94irda@<addr> fsl,mpc5200-psc-irda PSC in IrDA mode
95spi@<addr> fsl,mpc5200-spi MPC5200 spi device
96ethernet@<addr> fsl,mpc5200-fec MPC5200 ethernet device
97ata@<addr> fsl,mpc5200-ata IDE ATA interface
98i2c@<addr> fsl,mpc5200-i2c I2C controller
99usb@<addr> fsl,mpc5200-ohci,ohci-be USB controller
100xlb@<addr> fsl,mpc5200-xlb XLB arbitrator
101
102fsl,mpc5200-gpt nodes
103---------------------
104On the mpc5200 and 5200b, GPT0 has a watchdog timer function. If the board
105design supports the internal wdt, then the device node for GPT0 should
106include the empty property 'fsl,has-wdt'.
107
108An mpc5200-gpt can be used as a single line GPIO controller. To do so,
109add the following properties to the gpt node:
110 gpio-controller;
111 #gpio-cells = <2>;
112When referencing the GPIO line from another node, the first cell must always
113be zero and the second cell represents the gpio flags and described in the
114gpio device tree binding.
115
116An mpc5200-gpt can be used as a single line edge sensitive interrupt
117controller. To do so, add the following properties to the gpt node:
118 interrupt-controller;
119 #interrupt-cells = <1>;
120When referencing the IRQ line from another node, the cell represents the
121sense mode; 1 for edge rising, 2 for edge falling.
122
123fsl,mpc5200-psc nodes
124---------------------
125The PSCs should include a cell-index which is the index of the PSC in
126hardware. cell-index is used to determine which shared SoC registers to
127use when setting up PSC clocking. cell-index number starts at '0'. ie:
128 PSC1 has 'cell-index = <0>'
129 PSC4 has 'cell-index = <3>'
130
131PSC in i2s mode: The mpc5200 and mpc5200b PSCs are not compatible when in
132i2s mode. An 'mpc5200b-psc-i2s' node cannot include 'mpc5200-psc-i2s' in the
133compatible field.
134
135
136fsl,mpc5200-gpio and fsl,mpc5200-gpio-wkup nodes
137------------------------------------------------
138Each GPIO controller node should have the empty property gpio-controller and
139#gpio-cells set to 2. First cell is the GPIO number which is interpreted
140according to the bit numbers in the GPIO control registers. The second cell
141is for flags which is currently unused.
142
143fsl,mpc5200-fec nodes
144---------------------
145The FEC node can specify one of the following properties to configure
146the MII link:
147- fsl,7-wire-mode - An empty property that specifies the link uses 7-wire
148 mode instead of MII
149- current-speed - Specifies that the MII should be configured for a fixed
150 speed. This property should contain two cells. The
151 first cell specifies the speed in Mbps and the second
152 should be '0' for half duplex and '1' for full duplex
153- phy-handle - Contains a phandle to an Ethernet PHY.
154
155Interrupt controller (fsl,mpc5200-pic) node
156-------------------------------------------
157The mpc5200 pic binding splits hardware IRQ numbers into two levels. The
158split reflects the layout of the PIC hardware itself, which groups
159interrupts into one of three groups; CRIT, MAIN or PERP. Also, the
160Bestcomm dma engine has it's own set of interrupt sources which are
161cascaded off of peripheral interrupt 0, which the driver interprets as a
162fourth group, SDMA.
163
164The interrupts property for device nodes using the mpc5200 pic consists
165of three cells; <L1 L2 level>
166
167 L1 := [CRIT=0, MAIN=1, PERP=2, SDMA=3]
168 L2 := interrupt number; directly mapped from the value in the
169 "ICTL PerStat, MainStat, CritStat Encoded Register"
170 level := [LEVEL_HIGH=0, EDGE_RISING=1, EDGE_FALLING=2, LEVEL_LOW=3]
171
172For external IRQs, use the following interrupt property values (how to
173specify external interrupts is a frequently asked question):
174External interrupts:
175 external irq0: interrupts = <0 0 n>;
176 external irq1: interrupts = <1 1 n>;
177 external irq2: interrupts = <1 2 n>;
178 external irq3: interrupts = <1 3 n>;
179'n' is sense (0: level high, 1: edge rising, 2: edge falling 3: level low)
180
diff --git a/Documentation/powerpc/mpc52xx-device-tree-bindings.txt b/Documentation/powerpc/mpc52xx-device-tree-bindings.txt
deleted file mode 100644
index 6f12f1c79c0c..000000000000
--- a/Documentation/powerpc/mpc52xx-device-tree-bindings.txt
+++ /dev/null
@@ -1,277 +0,0 @@
1MPC5200 Device Tree Bindings
2----------------------------
3
4(c) 2006-2007 Secret Lab Technologies Ltd
5Grant Likely <grant.likely at secretlab.ca>
6
7********** DRAFT ***********
8* WARNING: Do not depend on the stability of these bindings just yet.
9* The MPC5200 device tree conventions are still in flux
10* Keep an eye on the linuxppc-dev mailing list for more details
11********** DRAFT ***********
12
13I - Introduction
14================
15Boards supported by the arch/powerpc architecture require device tree be
16passed by the boot loader to the kernel at boot time. The device tree
17describes what devices are present on the board and how they are
18connected. The device tree can either be passed as a binary blob (as
19described in Documentation/powerpc/booting-without-of.txt), or passed
20by Open Firmware (IEEE 1275) compatible firmware using an OF compatible
21client interface API.
22
23This document specifies the requirements on the device-tree for mpc5200
24based boards. These requirements are above and beyond the details
25specified in either the Open Firmware spec or booting-without-of.txt
26
27All new mpc5200-based boards are expected to match this document. In
28cases where this document is not sufficient to support a new board port,
29this document should be updated as part of adding the new board support.
30
31II - Philosophy
32===============
33The core of this document is naming convention. The whole point of
34defining this convention is to reduce or eliminate the number of
35special cases required to support a 5200 board. If all 5200 boards
36follow the same convention, then generic 5200 support code will work
37rather than coding special cases for each new board.
38
39This section tries to capture the thought process behind why the naming
40convention is what it is.
41
421. names
43---------
44There is strong convention/requirements already established for children
45of the root node. 'cpus' describes the processor cores, 'memory'
46describes memory, and 'chosen' provides boot configuration. Other nodes
47are added to describe devices attached to the processor local bus.
48
49Following convention already established with other system-on-chip
50processors, 5200 device trees should use the name 'soc5200' for the
51parent node of on chip devices, and the root node should be its parent.
52
53Child nodes are typically named after the configured function. ie.
54the FEC node is named 'ethernet', and a PSC in uart mode is named 'serial'.
55
562. device_type property
57-----------------------
58similar to the node name convention above; the device_type reflects the
59configured function of a device. ie. 'serial' for a uart and 'spi' for
60an spi controller. However, while node names *should* reflect the
61configured function, device_type *must* match the configured function
62exactly.
63
643. compatible property
65----------------------
66Since device_type isn't enough to match devices to drivers, there also
67needs to be a naming convention for the compatible property. Compatible
68is an list of device descriptions sorted from specific to generic. For
69the mpc5200, the required format for each compatible value is
70<chip>-<device>[-<mode>]. The OS should be able to match a device driver
71to the device based solely on the compatible value. If two drivers
72match on the compatible list; the 'most compatible' driver should be
73selected.
74
75The split between the MPC5200 and the MPC5200B leaves a bit of a
76conundrum. How should the compatible property be set up to provide
77maximum compatibility information; but still accurately describe the
78chip? For the MPC5200; the answer is easy. Most of the SoC devices
79originally appeared on the MPC5200. Since they didn't exist anywhere
80else; the 5200 compatible properties will contain only one item;
81"mpc5200-<device>".
82
83The 5200B is almost the same as the 5200, but not quite. It fixes
84silicon bugs and it adds a small number of enhancements. Most of the
85devices either provide exactly the same interface as on the 5200. A few
86devices have extra functions but still have a backwards compatible mode.
87To express this information as completely as possible, 5200B device trees
88should have two items in the compatible list;
89"mpc5200b-<device>\0mpc5200-<device>". It is *strongly* recommended
90that 5200B device trees follow this convention (instead of only listing
91the base mpc5200 item).
92
93If another chip appear on the market with one of the mpc5200 SoC
94devices, then the compatible list should include mpc5200-<device>.
95
96ie. ethernet on mpc5200: compatible = "mpc5200-ethernet"
97 ethernet on mpc5200b: compatible = "mpc5200b-ethernet\0mpc5200-ethernet"
98
99Modal devices, like PSCs, also append the configured function to the
100end of the compatible field. ie. A PSC in i2s mode would specify
101"mpc5200-psc-i2s", not "mpc5200-i2s". This convention is chosen to
102avoid naming conflicts with non-psc devices providing the same
103function. For example, "mpc5200-spi" and "mpc5200-psc-spi" describe
104the mpc5200 simple spi device and a PSC spi mode respectively.
105
106If the soc device is more generic and present on other SOCs, the
107compatible property can specify the more generic device type also.
108
109ie. mscan: compatible = "mpc5200-mscan\0fsl,mscan";
110
111At the time of writing, exact chip may be either 'mpc5200' or
112'mpc5200b'.
113
114Device drivers should always try to match as generically as possible.
115
116III - Structure
117===============
118The device tree for an mpc5200 board follows the structure defined in
119booting-without-of.txt with the following additional notes:
120
1210) the root node
122----------------
123Typical root description node; see booting-without-of
124
1251) The cpus node
126----------------
127The cpus node follows the basic layout described in booting-without-of.
128The bus-frequency property holds the XLB bus frequency
129The clock-frequency property holds the core frequency
130
1312) The memory node
132------------------
133Typical memory description node; see booting-without-of.
134
1353) The soc5200 node
136-------------------
137This node describes the on chip SOC peripherals. Every mpc5200 based
138board will have this node, and as such there is a common naming
139convention for SOC devices.
140
141Required properties:
142name type description
143---- ---- -----------
144device_type string must be "soc"
145ranges int should be <0 baseaddr baseaddr+10000>
146reg int must be <baseaddr 10000>
147compatible string mpc5200: "mpc5200-soc"
148 mpc5200b: "mpc5200b-soc\0mpc5200-soc"
149system-frequency int Fsystem frequency; source of all
150 other clocks.
151bus-frequency int IPB bus frequency in HZ. Clock rate
152 used by most of the soc devices.
153#interrupt-cells int must be <3>.
154
155Recommended properties:
156name type description
157---- ---- -----------
158model string Exact model of the chip;
159 ie: model="fsl,mpc5200"
160revision string Silicon revision of chip
161 ie: revision="M08A"
162
163The 'model' and 'revision' properties are *strongly* recommended. Having
164them presence acts as a bit of a safety net for working around as yet
165undiscovered bugs on one version of silicon. For example, device drivers
166can use the model and revision properties to decide if a bug fix should
167be turned on.
168
1694) soc5200 child nodes
170----------------------
171Any on chip SOC devices available to Linux must appear as soc5200 child nodes.
172
173Note: The tables below show the value for the mpc5200. A mpc5200b device
174tree should use the "mpc5200b-<device>\0mpc5200-<device> form.
175
176Required soc5200 child nodes:
177name device_type compatible Description
178---- ----------- ---------- -----------
179cdm@<addr> cdm mpc5200-cmd Clock Distribution
180pic@<addr> interrupt-controller mpc5200-pic need an interrupt
181 controller to boot
182bestcomm@<addr> dma-controller mpc5200-bestcomm 5200 pic also requires
183 the bestcomm device
184
185Recommended soc5200 child nodes; populate as needed for your board
186name device_type compatible Description
187---- ----------- ---------- -----------
188gpt@<addr> gpt fsl,mpc5200-gpt General purpose timers
189gpt@<addr> gpt fsl,mpc5200-gpt-gpio General purpose
190 timers in GPIO mode
191gpio@<addr> fsl,mpc5200-gpio MPC5200 simple gpio
192 controller
193gpio@<addr> fsl,mpc5200-gpio-wkup MPC5200 wakeup gpio
194 controller
195rtc@<addr> rtc mpc5200-rtc Real time clock
196mscan@<addr> mscan mpc5200-mscan CAN bus controller
197pci@<addr> pci mpc5200-pci PCI bridge
198serial@<addr> serial mpc5200-psc-uart PSC in serial mode
199i2s@<addr> sound mpc5200-psc-i2s PSC in i2s mode
200ac97@<addr> sound mpc5200-psc-ac97 PSC in ac97 mode
201spi@<addr> spi mpc5200-psc-spi PSC in spi mode
202irda@<addr> irda mpc5200-psc-irda PSC in IrDA mode
203spi@<addr> spi mpc5200-spi MPC5200 spi device
204ethernet@<addr> network mpc5200-fec MPC5200 ethernet device
205ata@<addr> ata mpc5200-ata IDE ATA interface
206i2c@<addr> i2c mpc5200-i2c I2C controller
207usb@<addr> usb-ohci-be mpc5200-ohci,ohci-be USB controller
208xlb@<addr> xlb mpc5200-xlb XLB arbitrator
209
210Important child node properties
211name type description
212---- ---- -----------
213cell-index int When multiple devices are present, is the
214 index of the device in the hardware (ie. There
215 are 6 PSC on the 5200 numbered PSC1 to PSC6)
216 PSC1 has 'cell-index = <0>'
217 PSC4 has 'cell-index = <3>'
218
2195) General Purpose Timer nodes (child of soc5200 node)
220On the mpc5200 and 5200b, GPT0 has a watchdog timer function. If the board
221design supports the internal wdt, then the device node for GPT0 should
222include the empty property 'fsl,has-wdt'.
223
2246) PSC nodes (child of soc5200 node)
225PSC nodes can define the optional 'port-number' property to force assignment
226order of serial ports. For example, PSC5 might be physically connected to
227the port labeled 'COM1' and PSC1 wired to 'COM1'. In this case, PSC5 would
228have a "port-number = <0>" property, and PSC1 would have "port-number = <1>".
229
230PSC in i2s mode: The mpc5200 and mpc5200b PSCs are not compatible when in
231i2s mode. An 'mpc5200b-psc-i2s' node cannot include 'mpc5200-psc-i2s' in the
232compatible field.
233
2347) GPIO controller nodes
235Each GPIO controller node should have the empty property gpio-controller and
236#gpio-cells set to 2. First cell is the GPIO number which is interpreted
237according to the bit numbers in the GPIO control registers. The second cell
238is for flags which is currently unsused.
239
2408) FEC nodes
241The FEC node can specify one of the following properties to configure
242the MII link:
243"fsl,7-wire-mode" - An empty property that specifies the link uses 7-wire
244 mode instead of MII
245"current-speed" - Specifies that the MII should be configured for a fixed
246 speed. This property should contain two cells. The
247 first cell specifies the speed in Mbps and the second
248 should be '0' for half duplex and '1' for full duplex
249"phy-handle" - Contains a phandle to an Ethernet PHY.
250
251IV - Extra Notes
252================
253
2541. Interrupt mapping
255--------------------
256The mpc5200 pic driver splits hardware IRQ numbers into two levels. The
257split reflects the layout of the PIC hardware itself, which groups
258interrupts into one of three groups; CRIT, MAIN or PERP. Also, the
259Bestcomm dma engine has it's own set of interrupt sources which are
260cascaded off of peripheral interrupt 0, which the driver interprets as a
261fourth group, SDMA.
262
263The interrupts property for device nodes using the mpc5200 pic consists
264of three cells; <L1 L2 level>
265
266 L1 := [CRIT=0, MAIN=1, PERP=2, SDMA=3]
267 L2 := interrupt number; directly mapped from the value in the
268 "ICTL PerStat, MainStat, CritStat Encoded Register"
269 level := [LEVEL_HIGH=0, EDGE_RISING=1, EDGE_FALLING=2, LEVEL_LOW=3]
270
2712. Shared registers
272-------------------
273Some SoC devices share registers between them. ie. the i2c devices use
274a single clock control register, and almost all device are affected by
275the port_config register. Devices which need to manipulate shared regs
276should look to the parent SoC node. The soc node is responsible
277for arbitrating all shared register access.
diff --git a/Documentation/usb/dma.txt b/Documentation/usb/dma.txt
index e8b50b7de9d9..cfdcd16e3abf 100644
--- a/Documentation/usb/dma.txt
+++ b/Documentation/usb/dma.txt
@@ -6,8 +6,9 @@ in the kernel usb programming guide (kerneldoc, from the source code).
6API OVERVIEW 6API OVERVIEW
7 7
8The big picture is that USB drivers can continue to ignore most DMA issues, 8The big picture is that USB drivers can continue to ignore most DMA issues,
9though they still must provide DMA-ready buffers (see DMA-mapping.txt). 9though they still must provide DMA-ready buffers (see
10That's how they've worked through the 2.4 (and earlier) kernels. 10Documentation/PCI/PCI-DMA-mapping.txt). That's how they've worked through
11the 2.4 (and earlier) kernels.
11 12
12OR: they can now be DMA-aware. 13OR: they can now be DMA-aware.
13 14
@@ -62,8 +63,8 @@ and effects like cache-trashing can impose subtle penalties.
62 force a consistent memory access ordering by using memory barriers. It's 63 force a consistent memory access ordering by using memory barriers. It's
63 not using a streaming DMA mapping, so it's good for small transfers on 64 not using a streaming DMA mapping, so it's good for small transfers on
64 systems where the I/O would otherwise thrash an IOMMU mapping. (See 65 systems where the I/O would otherwise thrash an IOMMU mapping. (See
65 Documentation/DMA-mapping.txt for definitions of "coherent" and "streaming" 66 Documentation/PCI/PCI-DMA-mapping.txt for definitions of "coherent" and
66 DMA mappings.) 67 "streaming" DMA mappings.)
67 68
68 Asking for 1/Nth of a page (as well as asking for N pages) is reasonably 69 Asking for 1/Nth of a page (as well as asking for N pages) is reasonably
69 space-efficient. 70 space-efficient.
@@ -93,7 +94,7 @@ WORKING WITH EXISTING BUFFERS
93Existing buffers aren't usable for DMA without first being mapped into the 94Existing buffers aren't usable for DMA without first being mapped into the
94DMA address space of the device. However, most buffers passed to your 95DMA address space of the device. However, most buffers passed to your
95driver can safely be used with such DMA mapping. (See the first section 96driver can safely be used with such DMA mapping. (See the first section
96of DMA-mapping.txt, titled "What memory is DMA-able?") 97of Documentation/PCI/PCI-DMA-mapping.txt, titled "What memory is DMA-able?")
97 98
98- When you're using scatterlists, you can map everything at once. On some 99- When you're using scatterlists, you can map everything at once. On some
99 systems, this kicks in an IOMMU and turns the scatterlists into single 100 systems, this kicks in an IOMMU and turns the scatterlists into single
diff --git a/Documentation/video4linux/v4lgrab.c b/Documentation/video4linux/v4lgrab.c
index 079b628481cf..d6e70bef8ad0 100644
--- a/Documentation/video4linux/v4lgrab.c
+++ b/Documentation/video4linux/v4lgrab.c
@@ -4,12 +4,21 @@
4 * 4 *
5 * Compile with: 5 * Compile with:
6 * gcc -s -Wall -Wstrict-prototypes v4lgrab.c -o v4lgrab 6 * gcc -s -Wall -Wstrict-prototypes v4lgrab.c -o v4lgrab
7 * Use as: 7 * Use as:
8 * v4lgrab >image.ppm 8 * v4lgrab >image.ppm
9 * 9 *
10 * Copyright (C) 1998-05-03, Phil Blundell <philb@gnu.org> 10 * Copyright (C) 1998-05-03, Phil Blundell <philb@gnu.org>
11 * Copied from http://www.tazenda.demon.co.uk/phil/vgrabber.c 11 * Copied from http://www.tazenda.demon.co.uk/phil/vgrabber.c
12 * with minor modifications (Dave Forrest, drf5n@virginia.edu). 12 * with minor modifications (Dave Forrest, drf5n@virginia.edu).
13 *
14 *
15 * For some cameras you may need to pre-load libv4l to perform
16 * the necessary decompression, e.g.:
17 *
18 * export LD_PRELOAD=/usr/lib/libv4l/v4l1compat.so
19 * ./v4lgrab >image.ppm
20 *
21 * see http://hansdegoede.livejournal.com/3636.html for details.
13 * 22 *
14 */ 23 */
15 24
@@ -24,7 +33,7 @@
24#include <linux/types.h> 33#include <linux/types.h>
25#include <linux/videodev.h> 34#include <linux/videodev.h>
26 35
27#define FILE "/dev/video0" 36#define VIDEO_DEV "/dev/video0"
28 37
29/* Stole this from tvset.c */ 38/* Stole this from tvset.c */
30 39
@@ -90,7 +99,7 @@ int get_brightness_adj(unsigned char *image, long size, int *brightness) {
90 99
91int main(int argc, char ** argv) 100int main(int argc, char ** argv)
92{ 101{
93 int fd = open(FILE, O_RDONLY), f; 102 int fd = open(VIDEO_DEV, O_RDONLY), f;
94 struct video_capability cap; 103 struct video_capability cap;
95 struct video_window win; 104 struct video_window win;
96 struct video_picture vpic; 105 struct video_picture vpic;
@@ -100,13 +109,13 @@ int main(int argc, char ** argv)
100 unsigned int i, src_depth; 109 unsigned int i, src_depth;
101 110
102 if (fd < 0) { 111 if (fd < 0) {
103 perror(FILE); 112 perror(VIDEO_DEV);
104 exit(1); 113 exit(1);
105 } 114 }
106 115
107 if (ioctl(fd, VIDIOCGCAP, &cap) < 0) { 116 if (ioctl(fd, VIDIOCGCAP, &cap) < 0) {
108 perror("VIDIOGCAP"); 117 perror("VIDIOGCAP");
109 fprintf(stderr, "(" FILE " not a video4linux device?)\n"); 118 fprintf(stderr, "(" VIDEO_DEV " not a video4linux device?)\n");
110 close(fd); 119 close(fd);
111 exit(1); 120 exit(1);
112 } 121 }